From 7d174bb350fd280035ec9349472e355b0a1e5d64 Mon Sep 17 00:00:00 2001 From: reyk Date: Tue, 22 Apr 2014 10:01:15 +0000 Subject: [PATCH] The complexity and quality of kerberosV and the fact that almost nobody is using it doesn't justify to have it in base - disable and remove it. If the 2 two people who use it still want it, they can make a port or recompile OpenBSD on their own. There is a quote in theo.c from August 2010: "basically, dung beetles fucking. that's what kerberosV + openssl is like". Discussed with many. Tests by henning@ reyk@ and others. ok deraadt@ henning@ --- kerberosV/Makefile | 5 - kerberosV/Makefile.inc | 120 - kerberosV/README | 15 - kerberosV/doc/Makefile | 36 - kerberosV/include/config.h | 1635 - kerberosV/include/crypto-headers.h | 26 - kerberosV/include/krb5-types.h | 48 - kerberosV/include/roken.h | 327 - kerberosV/include/version.h | 5 - kerberosV/lib/Makefile | 8 - kerberosV/lib/Makefile.inc | 3 - kerberosV/lib/libasn1/Makefile | 77 - kerberosV/lib/libasn1/shlib_version | 2 - kerberosV/lib/libcom_err/Makefile | 12 - kerberosV/lib/libcom_err/shlib_version | 2 - kerberosV/lib/libgssapi/Makefile | 282 - kerberosV/lib/libgssapi/shlib_version | 2 - kerberosV/lib/libhdb/Makefile | 73 - kerberosV/lib/libhdb/shlib_version | 2 - kerberosV/lib/libheimbase/Makefile | 20 - kerberosV/lib/libheimbase/shlib_version | 2 - kerberosV/lib/libheimipcc/Makefile | 24 - kerberosV/lib/libheimipcs/Makefile | 24 - kerberosV/lib/libkadm5clnt/Makefile | 39 - kerberosV/lib/libkadm5clnt/shlib_version | 2 - kerberosV/lib/libkadm5srv/Makefile | 40 - kerberosV/lib/libkadm5srv/shlib_version | 2 - kerberosV/lib/libkafs/Makefile | 33 - kerberosV/lib/libkafs/shlib_version | 2 - kerberosV/lib/libkdc/Makefile | 30 - kerberosV/lib/libkdc/shlib_version | 2 - kerberosV/lib/libkrb5/Makefile | 504 - kerberosV/lib/libkrb5/shlib_version | 2 - kerberosV/lib/libroken/Makefile | 84 - kerberosV/lib/libroken/shlib_version | 2 - kerberosV/lib/libsl/Makefile | 12 - kerberosV/lib/libvers/Makefile | 12 - kerberosV/lib/libwind/Makefile | 31 - kerberosV/lib/libwind/shlib_version | 2 - kerberosV/libexec/Makefile | 6 - kerberosV/libexec/Makefile.inc | 5 - kerberosV/libexec/hprop/Makefile | 19 - kerberosV/libexec/hpropd/Makefile | 15 - kerberosV/libexec/ipropd-master/Makefile | 19 - kerberosV/libexec/ipropd-slave/Makefile | 15 - kerberosV/libexec/kadmind/Makefile | 21 - kerberosV/libexec/kdc/Makefile | 21 - kerberosV/libexec/kfd/Makefile | 17 - kerberosV/libexec/kpasswdd/Makefile | 15 - kerberosV/src/ChangeLog | 485 - kerberosV/src/ChangeLog.1998 | 3201 - kerberosV/src/ChangeLog.1999 | 2194 - kerberosV/src/ChangeLog.2000 | 1320 - kerberosV/src/ChangeLog.2001 | 1122 - kerberosV/src/ChangeLog.2002 | 726 - kerberosV/src/ChangeLog.2003 | 1795 - kerberosV/src/ChangeLog.2004 | 1485 - kerberosV/src/ChangeLog.2005 | 2004 - kerberosV/src/ChangeLog.2006 | 2047 - kerberosV/src/LICENSE | 33 - kerberosV/src/Makefile.am | 58 - kerberosV/src/Makefile.am.common | 4 - kerberosV/src/Makefile.in | 1104 - kerberosV/src/NEWS | 982 - kerberosV/src/NTMakefile | 42 - kerberosV/src/README | 18 - kerberosV/src/TODO | 30 - kerberosV/src/acinclude.m4 | 9 - kerberosV/src/aclocal.m4 | 1111 - kerberosV/src/admin/ChangeLog | 70 - kerberosV/src/admin/Makefile.am | 43 - kerberosV/src/admin/Makefile.in | 996 - kerberosV/src/admin/NTMakefile | 74 - kerberosV/src/admin/add.c | 157 - kerberosV/src/admin/change.c | 252 - kerberosV/src/admin/copy.c | 143 - kerberosV/src/admin/destroy.c | 52 - kerberosV/src/admin/get.c | 239 - kerberosV/src/admin/ktutil-commands.in | 247 - kerberosV/src/admin/ktutil-version.rc | 36 - kerberosV/src/admin/ktutil.8 | 124 - kerberosV/src/admin/ktutil.c | 177 - kerberosV/src/admin/ktutil.cat8 | 71 - kerberosV/src/admin/ktutil_locl.h | 74 - kerberosV/src/admin/list.c | 171 - kerberosV/src/admin/purge.c | 172 - kerberosV/src/admin/remove.c | 93 - kerberosV/src/admin/rename.c | 113 - kerberosV/src/appl/Makefile.am | 29 - kerberosV/src/appl/Makefile.in | 936 - kerberosV/src/appl/NTMakefile | 35 - kerberosV/src/appl/afsutil/ChangeLog | 125 - kerberosV/src/appl/afsutil/Makefile.am | 22 - kerberosV/src/appl/afsutil/Makefile.in | 970 - kerberosV/src/appl/afsutil/NTMakefile | 35 - kerberosV/src/appl/afsutil/afslog.1 | 152 - kerberosV/src/appl/afsutil/afslog.c | 302 - kerberosV/src/appl/afsutil/afslog.cat1 | 69 - kerberosV/src/appl/afsutil/pagsh.1 | 94 - kerberosV/src/appl/afsutil/pagsh.c | 215 - kerberosV/src/appl/afsutil/pagsh.cat1 | 47 - kerberosV/src/appl/dceutils/ChangeLog | 39 - kerberosV/src/appl/dceutils/Makefile.am | 37 - kerberosV/src/appl/dceutils/Makefile.in | 913 - kerberosV/src/appl/dceutils/NTMakefile | 35 - kerberosV/src/appl/dceutils/README.dcedfs | 59 - kerberosV/src/appl/dceutils/README.original | 335 - kerberosV/src/appl/dceutils/dfspag.exp | 3 - kerberosV/src/appl/dceutils/dpagaix.c | 23 - kerberosV/src/appl/dceutils/k5dce.h | 165 - kerberosV/src/appl/dceutils/k5dcecon.c | 792 - kerberosV/src/appl/dceutils/testpag.c | 150 - kerberosV/src/appl/ftp/ChangeLog | 1038 - kerberosV/src/appl/ftp/Makefile.am | 7 - kerberosV/src/appl/ftp/Makefile.in | 916 - kerberosV/src/appl/ftp/NTMakefile | 35 - kerberosV/src/appl/ftp/common/Makefile.am | 14 - kerberosV/src/appl/ftp/common/Makefile.in | 830 - kerberosV/src/appl/ftp/common/NTMakefile | 35 - kerberosV/src/appl/ftp/common/buffer.c | 69 - kerberosV/src/appl/ftp/common/common.h | 60 - kerberosV/src/appl/ftp/common/sockbuf.c | 70 - kerberosV/src/appl/ftp/ftp/Makefile.am | 44 - kerberosV/src/appl/ftp/ftp/Makefile.in | 992 - kerberosV/src/appl/ftp/ftp/NTMakefile | 35 - kerberosV/src/appl/ftp/ftp/cmds.c | 2148 - kerberosV/src/appl/ftp/ftp/cmdtab.c | 203 - kerberosV/src/appl/ftp/ftp/domacro.c | 148 - kerberosV/src/appl/ftp/ftp/extern.h | 174 - kerberosV/src/appl/ftp/ftp/ftp.1 | 1211 - kerberosV/src/appl/ftp/ftp/ftp.c | 1814 - kerberosV/src/appl/ftp/ftp/ftp.cat1 | 658 - kerberosV/src/appl/ftp/ftp/ftp_locl.h | 141 - kerberosV/src/appl/ftp/ftp/ftp_var.h | 130 - kerberosV/src/appl/ftp/ftp/globals.c | 79 - kerberosV/src/appl/ftp/ftp/gssapi.c | 511 - kerberosV/src/appl/ftp/ftp/kauth.c | 57 - kerberosV/src/appl/ftp/ftp/main.c | 590 - kerberosV/src/appl/ftp/ftp/pathnames.h | 44 - kerberosV/src/appl/ftp/ftp/ruserpass.c | 313 - kerberosV/src/appl/ftp/ftp/security.c | 883 - kerberosV/src/appl/ftp/ftp/security.h | 141 - kerberosV/src/appl/ftp/ftpd/Makefile.am | 54 - kerberosV/src/appl/ftp/ftpd/Makefile.in | 1055 - kerberosV/src/appl/ftp/ftpd/NTMakefile | 35 - kerberosV/src/appl/ftp/ftpd/extern.h | 150 - kerberosV/src/appl/ftp/ftpd/ftpcmd.c | 3532 - kerberosV/src/appl/ftp/ftpd/ftpcmd.y | 1478 - kerberosV/src/appl/ftp/ftpd/ftpd.8 | 503 - kerberosV/src/appl/ftp/ftpd/ftpd.c | 2367 - kerberosV/src/appl/ftp/ftpd/ftpd.cat8 | 309 - kerberosV/src/appl/ftp/ftpd/ftpd_locl.h | 171 - kerberosV/src/appl/ftp/ftpd/ftpusers.5 | 37 - kerberosV/src/appl/ftp/ftpd/ftpusers.cat5 | 27 - kerberosV/src/appl/ftp/ftpd/gss_userok.c | 75 - kerberosV/src/appl/ftp/ftpd/gssapi.c | 511 - kerberosV/src/appl/ftp/ftpd/kauth.c | 140 - kerberosV/src/appl/ftp/ftpd/klist.c | 178 - kerberosV/src/appl/ftp/ftpd/logwtmp.c | 199 - kerberosV/src/appl/ftp/ftpd/ls.c | 891 - kerberosV/src/appl/ftp/ftpd/pathnames.h | 63 - kerberosV/src/appl/ftp/ftpd/popen.c | 236 - kerberosV/src/appl/ftp/ftpd/security.c | 883 - kerberosV/src/appl/gssmask/Makefile.am | 13 - kerberosV/src/appl/gssmask/Makefile.in | 843 - kerberosV/src/appl/gssmask/NTMakefile | 35 - kerberosV/src/appl/gssmask/common.c | 97 - kerberosV/src/appl/gssmask/common.h | 114 - kerberosV/src/appl/gssmask/gssmaestro.c | 963 - kerberosV/src/appl/gssmask/gssmask.c | 1255 - kerberosV/src/appl/gssmask/protocol.h | 317 - kerberosV/src/appl/kf/Makefile.am | 20 - kerberosV/src/appl/kf/Makefile.in | 1052 - kerberosV/src/appl/kf/NTMakefile | 35 - kerberosV/src/appl/kf/kf.1 | 112 - kerberosV/src/appl/kf/kf.c | 346 - kerberosV/src/appl/kf/kf.cat1 | 46 - kerberosV/src/appl/kf/kf_locl.h | 81 - kerberosV/src/appl/kf/kfd.8 | 85 - kerberosV/src/appl/kf/kfd.c | 311 - kerberosV/src/appl/kf/kfd.cat8 | 31 - kerberosV/src/appl/kx/ChangeLog | 457 - kerberosV/src/appl/kx/Makefile.am | 70 - kerberosV/src/appl/kx/Makefile.in | 1142 - kerberosV/src/appl/kx/NTMakefile | 35 - kerberosV/src/appl/kx/common.c | 813 - kerberosV/src/appl/kx/context.c | 94 - kerberosV/src/appl/kx/krb5.c | 447 - kerberosV/src/appl/kx/kx.1 | 92 - kerberosV/src/appl/kx/kx.c | 711 - kerberosV/src/appl/kx/kx.cat1 | 39 - kerberosV/src/appl/kx/kx.h | 249 - kerberosV/src/appl/kx/kxd.8 | 83 - kerberosV/src/appl/kx/kxd.c | 779 - kerberosV/src/appl/kx/kxd.cat8 | 37 - kerberosV/src/appl/kx/rxtelnet.1 | 128 - kerberosV/src/appl/kx/rxtelnet.cat1 | 52 - kerberosV/src/appl/kx/rxtelnet.in | 72 - kerberosV/src/appl/kx/rxterm.1 | 120 - kerberosV/src/appl/kx/rxterm.cat1 | 47 - kerberosV/src/appl/kx/rxterm.in | 45 - kerberosV/src/appl/kx/tenletxr.1 | 91 - kerberosV/src/appl/kx/tenletxr.cat1 | 37 - kerberosV/src/appl/kx/tenletxr.in | 37 - kerberosV/src/appl/kx/writeauth.c | 73 - kerberosV/src/appl/login/ChangeLog | 366 - kerberosV/src/appl/login/Makefile.am | 40 - kerberosV/src/appl/login/Makefile.in | 1035 - kerberosV/src/appl/login/NTMakefile | 35 - kerberosV/src/appl/login/conf.c | 55 - kerberosV/src/appl/login/env.c | 105 - kerberosV/src/appl/login/limits_conf.c | 214 - kerberosV/src/appl/login/login-protos.h | 91 - kerberosV/src/appl/login/login.1 | 252 - kerberosV/src/appl/login/login.access.5 | 55 - kerberosV/src/appl/login/login.access.cat5 | 45 - kerberosV/src/appl/login/login.c | 733 - kerberosV/src/appl/login/login.cat1 | 164 - kerberosV/src/appl/login/login_access.c | 277 - kerberosV/src/appl/login/login_locl.h | 155 - kerberosV/src/appl/login/loginpaths.h | 52 - kerberosV/src/appl/login/osfc2.c | 79 - kerberosV/src/appl/login/read_string.c | 137 - kerberosV/src/appl/login/shadow.c | 95 - kerberosV/src/appl/login/stty_default.c | 100 - kerberosV/src/appl/login/tty.c | 70 - kerberosV/src/appl/login/utmp_login.c | 166 - kerberosV/src/appl/login/utmpx_login.c | 105 - kerberosV/src/appl/otp/ChangeLog | 58 - kerberosV/src/appl/otp/Makefile.am | 17 - kerberosV/src/appl/otp/Makefile.in | 958 - kerberosV/src/appl/otp/NTMakefile | 35 - kerberosV/src/appl/otp/otp.1 | 90 - kerberosV/src/appl/otp/otp.c | 366 - kerberosV/src/appl/otp/otp.cat1 | 43 - kerberosV/src/appl/otp/otp_locl.h | 56 - kerberosV/src/appl/otp/otpprint.1 | 82 - kerberosV/src/appl/otp/otpprint.c | 135 - kerberosV/src/appl/otp/otpprint.cat1 | 36 - kerberosV/src/appl/popper/ChangeLog | 269 - kerberosV/src/appl/popper/Makefile.am | 49 - kerberosV/src/appl/popper/Makefile.in | 1040 - kerberosV/src/appl/popper/NTMakefile | 35 - kerberosV/src/appl/popper/README | 381 - kerberosV/src/appl/popper/README-FIRST | 11 - kerberosV/src/appl/popper/auth_gssapi.c | 253 - kerberosV/src/appl/popper/maildir.c | 216 - kerberosV/src/appl/popper/pop3.rfc1081 | 898 - kerberosV/src/appl/popper/pop3e.rfc1082 | 619 - kerberosV/src/appl/popper/pop_auth.c | 183 - kerberosV/src/appl/popper/pop_auth.h | 60 - kerberosV/src/appl/popper/pop_debug.c | 230 - kerberosV/src/appl/popper/pop_dele.c | 107 - kerberosV/src/appl/popper/pop_dropcopy.c | 174 - kerberosV/src/appl/popper/pop_dropinfo.c | 231 - kerberosV/src/appl/popper/pop_get_command.c | 160 - kerberosV/src/appl/popper/pop_init.c | 364 - kerberosV/src/appl/popper/pop_last.c | 18 - kerberosV/src/appl/popper/pop_list.c | 59 - kerberosV/src/appl/popper/pop_log.c | 36 - kerberosV/src/appl/popper/pop_msg.c | 57 - kerberosV/src/appl/popper/pop_parse.c | 55 - kerberosV/src/appl/popper/pop_pass.c | 204 - kerberosV/src/appl/popper/pop_quit.c | 21 - kerberosV/src/appl/popper/pop_rset.c | 33 - kerberosV/src/appl/popper/pop_send.c | 176 - kerberosV/src/appl/popper/pop_stat.c | 26 - kerberosV/src/appl/popper/pop_uidl.c | 88 - kerberosV/src/appl/popper/pop_updt.c | 199 - kerberosV/src/appl/popper/pop_user.c | 35 - kerberosV/src/appl/popper/pop_xover.c | 37 - kerberosV/src/appl/popper/popper.8 | 103 - .../src/appl/popper/popper.README.release | 45 - kerberosV/src/appl/popper/popper.c | 120 - kerberosV/src/appl/popper/popper.cat8 | 56 - kerberosV/src/appl/popper/popper.h | 349 - kerberosV/src/appl/popper/version.h | 19 - kerberosV/src/appl/push/ChangeLog | 200 - kerberosV/src/appl/push/Makefile.am | 26 - kerberosV/src/appl/push/Makefile.in | 1038 - kerberosV/src/appl/push/NTMakefile | 35 - kerberosV/src/appl/push/pfrom.1 | 55 - kerberosV/src/appl/push/pfrom.cat1 | 17 - kerberosV/src/appl/push/pfrom.in | 6 - kerberosV/src/appl/push/push.8 | 132 - kerberosV/src/appl/push/push.c | 785 - kerberosV/src/appl/push/push.cat8 | 74 - kerberosV/src/appl/push/push_locl.h | 94 - kerberosV/src/appl/rcp/ChangeLog | 130 - kerberosV/src/appl/rcp/Makefile.am | 15 - kerberosV/src/appl/rcp/Makefile.in | 948 - kerberosV/src/appl/rcp/NTMakefile | 35 - kerberosV/src/appl/rcp/extern.h | 52 - kerberosV/src/appl/rcp/rcp.1 | 66 - kerberosV/src/appl/rcp/rcp.c | 789 - kerberosV/src/appl/rcp/rcp.cat1 | 38 - kerberosV/src/appl/rcp/rcp_locl.h | 67 - kerberosV/src/appl/rcp/util.c | 184 - kerberosV/src/appl/rsh/ChangeLog | 549 - kerberosV/src/appl/rsh/Makefile.am | 28 - kerberosV/src/appl/rsh/Makefile.in | 1063 - kerberosV/src/appl/rsh/NTMakefile | 35 - kerberosV/src/appl/rsh/common.c | 172 - kerberosV/src/appl/rsh/limits_conf.c | 214 - kerberosV/src/appl/rsh/login_access.c | 277 - kerberosV/src/appl/rsh/rsh.1 | 294 - kerberosV/src/appl/rsh/rsh.c | 1032 - kerberosV/src/appl/rsh/rsh.cat1 | 139 - kerberosV/src/appl/rsh/rsh_locl.h | 166 - kerberosV/src/appl/rsh/rshd.8 | 161 - kerberosV/src/appl/rsh/rshd.c | 979 - kerberosV/src/appl/rsh/rshd.cat8 | 79 - kerberosV/src/appl/su/ChangeLog | 129 - kerberosV/src/appl/su/Makefile.am | 18 - kerberosV/src/appl/su/Makefile.in | 957 - kerberosV/src/appl/su/NTMakefile | 35 - kerberosV/src/appl/su/su.1 | 123 - kerberosV/src/appl/su/su.c | 526 - kerberosV/src/appl/su/su.cat1 | 44 - kerberosV/src/appl/su/supaths.h | 51 - kerberosV/src/appl/telnet/ChangeLog | 831 - kerberosV/src/appl/telnet/Makefile.am | 11 - kerberosV/src/appl/telnet/Makefile.in | 920 - kerberosV/src/appl/telnet/NTMakefile | 35 - kerberosV/src/appl/telnet/README.ORIG | 743 - kerberosV/src/appl/telnet/arpa/telnet.h | 323 - .../src/appl/telnet/libtelnet/Makefile.am | 23 - .../src/appl/telnet/libtelnet/Makefile.in | 845 - .../src/appl/telnet/libtelnet/NTMakefile | 35 - .../src/appl/telnet/libtelnet/auth-proto.h | 111 - kerberosV/src/appl/telnet/libtelnet/auth.c | 628 - kerberosV/src/appl/telnet/libtelnet/auth.h | 81 - .../src/appl/telnet/libtelnet/enc-proto.h | 133 - kerberosV/src/appl/telnet/libtelnet/enc_des.c | 659 - kerberosV/src/appl/telnet/libtelnet/encrypt.c | 1006 - kerberosV/src/appl/telnet/libtelnet/encrypt.h | 103 - kerberosV/src/appl/telnet/libtelnet/genget.c | 106 - .../src/appl/telnet/libtelnet/kerberos5.c | 896 - .../src/appl/telnet/libtelnet/misc-proto.h | 79 - kerberosV/src/appl/telnet/libtelnet/misc.c | 95 - kerberosV/src/appl/telnet/libtelnet/misc.h | 42 - .../src/appl/telnet/libtelnet/rsaencpwd.c | 486 - kerberosV/src/appl/telnet/libtelnet/spx.c | 589 - kerberosV/src/appl/telnet/telnet.state | 80 - kerberosV/src/appl/telnet/telnet/Makefile.am | 24 - kerberosV/src/appl/telnet/telnet/Makefile.in | 970 - kerberosV/src/appl/telnet/telnet/NTMakefile | 35 - kerberosV/src/appl/telnet/telnet/authenc.c | 99 - kerberosV/src/appl/telnet/telnet/commands.c | 2675 - kerberosV/src/appl/telnet/telnet/defines.h | 60 - kerberosV/src/appl/telnet/telnet/externs.h | 443 - kerberosV/src/appl/telnet/telnet/main.c | 358 - kerberosV/src/appl/telnet/telnet/network.c | 173 - kerberosV/src/appl/telnet/telnet/ring.c | 321 - kerberosV/src/appl/telnet/telnet/ring.h | 99 - kerberosV/src/appl/telnet/telnet/sys_bsd.c | 979 - kerberosV/src/appl/telnet/telnet/telnet.1 | 1369 - kerberosV/src/appl/telnet/telnet/telnet.c | 2420 - kerberosV/src/appl/telnet/telnet/telnet.cat1 | 715 - .../src/appl/telnet/telnet/telnet_locl.h | 181 - kerberosV/src/appl/telnet/telnet/terminal.c | 221 - kerberosV/src/appl/telnet/telnet/types.h | 52 - kerberosV/src/appl/telnet/telnet/utilities.c | 865 - kerberosV/src/appl/telnet/telnetd/Makefile.am | 27 - kerberosV/src/appl/telnet/telnetd/Makefile.in | 973 - kerberosV/src/appl/telnet/telnetd/NTMakefile | 35 - kerberosV/src/appl/telnet/telnetd/authenc.c | 80 - kerberosV/src/appl/telnet/telnetd/defs.h | 190 - kerberosV/src/appl/telnet/telnetd/ext.h | 208 - kerberosV/src/appl/telnet/telnetd/global.c | 107 - kerberosV/src/appl/telnet/telnetd/slc.c | 57 - kerberosV/src/appl/telnet/telnetd/state.c | 1360 - kerberosV/src/appl/telnet/telnetd/sys_term.c | 1910 - kerberosV/src/appl/telnet/telnetd/telnetd.8 | 536 - kerberosV/src/appl/telnet/telnetd/telnetd.c | 1401 - .../src/appl/telnet/telnetd/telnetd.cat8 | 298 - kerberosV/src/appl/telnet/telnetd/telnetd.h | 247 - kerberosV/src/appl/telnet/telnetd/termstat.c | 138 - kerberosV/src/appl/telnet/telnetd/utility.c | 1170 - kerberosV/src/appl/test/Makefile.am | 44 - kerberosV/src/appl/test/Makefile.in | 948 - kerberosV/src/appl/test/NTMakefile | 35 - kerberosV/src/appl/test/common.c | 176 - kerberosV/src/appl/test/gss_common.c | 154 - kerberosV/src/appl/test/gss_common.h | 49 - kerberosV/src/appl/test/gssapi_client.c | 273 - kerberosV/src/appl/test/gssapi_server.c | 341 - kerberosV/src/appl/test/http_client.c | 510 - kerberosV/src/appl/test/nt_gss_client.c | 167 - kerberosV/src/appl/test/nt_gss_common.c | 133 - kerberosV/src/appl/test/nt_gss_common.h | 45 - kerberosV/src/appl/test/nt_gss_server.c | 244 - kerberosV/src/appl/test/tcp_client.c | 132 - kerberosV/src/appl/test/tcp_server.c | 168 - kerberosV/src/appl/test/test_locl.h | 88 - kerberosV/src/appl/test/uu_client.c | 193 - kerberosV/src/appl/test/uu_server.c | 212 - kerberosV/src/appl/xnlock/ChangeLog | 159 - kerberosV/src/appl/xnlock/Makefile.am | 32 - kerberosV/src/appl/xnlock/Makefile.in | 961 - kerberosV/src/appl/xnlock/NTMakefile | 35 - kerberosV/src/appl/xnlock/README | 21 - kerberosV/src/appl/xnlock/nose.0.left | 38 - kerberosV/src/appl/xnlock/nose.0.right | 38 - kerberosV/src/appl/xnlock/nose.1.left | 38 - kerberosV/src/appl/xnlock/nose.1.right | 38 - kerberosV/src/appl/xnlock/nose.down | 38 - kerberosV/src/appl/xnlock/nose.front | 38 - kerberosV/src/appl/xnlock/nose.left.front | 38 - kerberosV/src/appl/xnlock/nose.right.front | 38 - kerberosV/src/appl/xnlock/xnlock.1 | 123 - kerberosV/src/appl/xnlock/xnlock.c | 1087 - kerberosV/src/appl/xnlock/xnlock.cat1 | 110 - kerberosV/src/autogen.sh | 6 - kerberosV/src/base/Makefile.am | 31 - kerberosV/src/base/Makefile.in | 941 - kerberosV/src/base/NTMakefile | 53 - kerberosV/src/base/array.c | 234 - kerberosV/src/base/baselocl.h | 129 - kerberosV/src/base/bool.c | 58 - kerberosV/src/base/dict.c | 282 - kerberosV/src/base/heimbase.c | 559 - kerberosV/src/base/heimbase.h | 188 - kerberosV/src/base/heimbasepriv.h | 91 - kerberosV/src/base/heimqueue.h | 167 - kerberosV/src/base/null.c | 52 - kerberosV/src/base/number.c | 127 - kerberosV/src/base/string.c | 115 - kerberosV/src/base/test_base.c | 152 - kerberosV/src/base/version-script.map | 28 - kerberosV/src/cf/ChangeLog | 1295 - kerberosV/src/cf/Makefile.am.common | 257 - kerberosV/src/cf/aix.m4 | 62 - kerberosV/src/cf/auth-modules.m4 | 45 - kerberosV/src/cf/broken-getaddrinfo.m4 | 26 - kerberosV/src/cf/broken-glob.m4 | 29 - kerberosV/src/cf/broken-realloc.m4 | 25 - kerberosV/src/cf/broken-snprintf.m4 | 63 - kerberosV/src/cf/broken.m4 | 12 - kerberosV/src/cf/broken2.m4 | 25 - kerberosV/src/cf/c-attribute.m4 | 28 - kerberosV/src/cf/c-function.m4 | 33 - kerberosV/src/cf/capabilities.m4 | 14 - kerberosV/src/cf/check-compile-et.m4 | 113 - kerberosV/src/cf/check-getpwnam_r-posix.m4 | 40 - kerberosV/src/cf/check-man.m4 | 57 - kerberosV/src/cf/check-netinet-ip-and-tcp.m4 | 33 - kerberosV/src/cf/check-type-extra.m4 | 23 - kerberosV/src/cf/check-var.m4 | 28 - kerberosV/src/cf/check-x.m4 | 53 - kerberosV/src/cf/check-xau.m4 | 64 - kerberosV/src/cf/crypto.m4 | 179 - kerberosV/src/cf/db.m4 | 232 - kerberosV/src/cf/destdirs.m4 | 18 - kerberosV/src/cf/dispatch.m4 | 20 - kerberosV/src/cf/dlopen.m4 | 11 - kerberosV/src/cf/find-func-no-libs.m4 | 9 - kerberosV/src/cf/find-func-no-libs2.m4 | 63 - kerberosV/src/cf/find-func.m4 | 9 - kerberosV/src/cf/find-if-not-broken.m4 | 12 - kerberosV/src/cf/framework-security.m4 | 31 - kerberosV/src/cf/have-pragma-weak.m4 | 37 - kerberosV/src/cf/have-struct-field.m4 | 21 - kerberosV/src/cf/have-type.m4 | 30 - kerberosV/src/cf/have-types.m4 | 12 - kerberosV/src/cf/install-catman.sh | 74 - kerberosV/src/cf/irix.m4 | 15 - kerberosV/src/cf/krb-bigendian.m4 | 62 - kerberosV/src/cf/krb-func-getcwd-broken.m4 | 41 - kerberosV/src/cf/krb-func-getlogin.m4 | 22 - kerberosV/src/cf/krb-ipv6.m4 | 154 - kerberosV/src/cf/krb-prog-ln-s.m4 | 28 - kerberosV/src/cf/krb-prog-ranlib.m4 | 8 - kerberosV/src/cf/krb-prog-yacc.m4 | 12 - kerberosV/src/cf/krb-readline.m4 | 28 - kerberosV/src/cf/krb-struct-spwd.m4 | 21 - kerberosV/src/cf/krb-struct-winsize.m4 | 25 - kerberosV/src/cf/krb-sys-aix.m4 | 15 - kerberosV/src/cf/krb-sys-nextstep.m4 | 18 - kerberosV/src/cf/krb-version.m4 | 24 - kerberosV/src/cf/largefile.m4 | 16 - kerberosV/src/cf/libtool.m4 | 7831 - kerberosV/src/cf/ltoptions.m4 | 369 - kerberosV/src/cf/ltsugar.m4 | 123 - kerberosV/src/cf/ltversion.m4 | 23 - kerberosV/src/cf/lt~obsolete.m4 | 98 - kerberosV/src/cf/make-proto.pl | 404 - kerberosV/src/cf/mips-abi.m4 | 87 - kerberosV/src/cf/misc.m4 | 15 - kerberosV/src/cf/need-proto.m4 | 22 - kerberosV/src/cf/osfc2.m4 | 14 - kerberosV/src/cf/otp.m4 | 27 - kerberosV/src/cf/pkg.m4 | 157 - kerberosV/src/cf/proto-compat.m4 | 21 - kerberosV/src/cf/pthreads.m4 | 93 - kerberosV/src/cf/resolv.m4 | 118 - kerberosV/src/cf/retsigtype.m4 | 18 - kerberosV/src/cf/roken-frag.m4 | 763 - kerberosV/src/cf/roken.m4 | 64 - kerberosV/src/cf/socket-wrapper.m4 | 16 - kerberosV/src/cf/sunos.m4 | 22 - kerberosV/src/cf/telnet.m4 | 75 - kerberosV/src/cf/test-package.m4 | 135 - kerberosV/src/cf/valgrind-suppressions | 84 - kerberosV/src/cf/vararray.m4 | 16 - kerberosV/src/cf/version-script.m4 | 39 - kerberosV/src/cf/wflags.m4 | 29 - kerberosV/src/cf/win32.m4 | 16 - kerberosV/src/cf/with-all.m4 | 42 - kerberosV/src/compile | 143 - kerberosV/src/config.guess | 1501 - kerberosV/src/config.sub | 1705 - kerberosV/src/configure | 31300 ---- kerberosV/src/configure.ac | 704 - kerberosV/src/depcomp | 630 - kerberosV/src/doc/Makefile.am | 144 - kerberosV/src/doc/Makefile.in | 1123 - kerberosV/src/doc/NTMakefile | 119 - kerberosV/src/doc/ack.texi | 124 - kerberosV/src/doc/apps.texi | 270 - kerberosV/src/doc/copyright.texi | 518 - .../src/doc/doxyout/gssapi/html/doxygen.css | 473 - .../src/doc/doxyout/gssapi/html/doxygen.png | Bin 1281 -> 0 bytes .../doc/doxyout/gssapi/html/graph_legend.dot | 22 - .../doc/doxyout/gssapi/html/graph_legend.html | 88 - .../doc/doxyout/gssapi/html/graph_legend.png | Bin 4256 -> 0 bytes .../doxyout/gssapi/html/group__gssapi.html | 892 - .../gssapi/html/gssapi_mechs_intro.html | 30 - .../gssapi/html/gssapi_services_intro.html | 43 - .../src/doc/doxyout/gssapi/html/index.html | 36 - .../gssapi/html/internalvsmechname.html | 36 - .../src/doc/doxyout/gssapi/html/modules.html | 29 - .../src/doc/doxyout/gssapi/html/pages.html | 34 - .../src/doc/doxyout/gssapi/html/tab_b.gif | Bin 35 -> 0 bytes .../src/doc/doxyout/gssapi/html/tab_l.gif | Bin 706 -> 0 bytes .../src/doc/doxyout/gssapi/html/tab_r.gif | Bin 2585 -> 0 bytes .../src/doc/doxyout/gssapi/html/tabs.css | 102 - .../man3/__gss_c_attr_stream_sizes_oid_desc.3 | 1 - .../gssapi/man/man3/gss_add_oid_set_member.3 | 1 - .../gssapi/man/man3/gss_canonicalize_name.3 | 1 - .../doxyout/gssapi/man/man3/gss_import_name.3 | 1 - .../gssapi/man/man3/gss_init_sec_context.3 | 1 - .../man/man3/gss_inquire_attrs_for_mech.3 | 1 - .../man/man3/gss_inquire_saslname_for_mech.3 | 1 - .../doxyout/gssapi/man/man3/gss_oid_equal.3 | 1 - .../gssapi/man/man3/gss_release_cred.3 | 1 - .../gssapi/man/man3/gss_release_iov_buffer.3 | 1 - .../gssapi/man/man3/gss_release_name.3 | 1 - .../doxyout/gssapi/man/man3/gss_unwrap_iov.3 | 1 - .../doc/doxyout/gssapi/man/man3/gss_wrap.3 | 1 - .../doxyout/gssapi/man/man3/gss_wrap_iov.3 | 1 - .../gssapi/man/man3/gss_wrap_iov_length.3 | 1 - .../src/doc/doxyout/gssapi/man/man3/gssapi.3 | 389 - .../gssapi/man/man3/gssapi_mechs_intro.3 | 15 - .../gssapi/man/man3/gssapi_services_intro.3 | 65 - .../gssapi/man/man3/internalvsmechname.3 | 20 - kerberosV/src/doc/doxyout/gssapi/manpages | 19 - .../src/doc/doxyout/hcrypto/html/doxygen.css | 473 - .../src/doc/doxyout/hcrypto/html/doxygen.png | Bin 1281 -> 0 bytes .../html/example__evp__cipher_8c-example.html | 173 - .../doc/doxyout/hcrypto/html/examples.html | 29 - .../doc/doxyout/hcrypto/html/graph_legend.dot | 22 - .../doxyout/hcrypto/html/graph_legend.html | 88 - .../doc/doxyout/hcrypto/html/graph_legend.png | Bin 4256 -> 0 bytes .../hcrypto/html/group__hcrypto__core.html | 190 - .../hcrypto/html/group__hcrypto__des.html | 910 - .../hcrypto/html/group__hcrypto__dh.html | 581 - .../hcrypto/html/group__hcrypto__evp.html | 2366 - .../hcrypto/html/group__hcrypto__misc.html | 106 - .../hcrypto/html/group__hcrypto__rand.html | 425 - .../hcrypto/html/group__hcrypto__rsa.html | 278 - .../src/doc/doxyout/hcrypto/html/index.html | 47 - .../src/doc/doxyout/hcrypto/html/modules.html | 35 - .../doc/doxyout/hcrypto/html/page_des.html | 45 - .../src/doc/doxyout/hcrypto/html/page_dh.html | 30 - .../doc/doxyout/hcrypto/html/page_evp.html | 30 - .../doc/doxyout/hcrypto/html/page_rand.html | 28 - .../doc/doxyout/hcrypto/html/page_rsa.html | 31 - .../src/doc/doxyout/hcrypto/html/tab_b.gif | Bin 35 -> 0 bytes .../src/doc/doxyout/hcrypto/html/tab_l.gif | Bin 706 -> 0 bytes .../src/doc/doxyout/hcrypto/html/tab_r.gif | Bin 2585 -> 0 bytes .../src/doc/doxyout/hcrypto/html/tabs.css | 102 - .../doxyout/hcrypto/man/man3/DES_cbc_cksum.3 | 1 - .../hcrypto/man/man3/DES_cbc_encrypt.3 | 1 - .../hcrypto/man/man3/DES_cfb64_encrypt.3 | 1 - .../hcrypto/man/man3/DES_check_key_parity.3 | 1 - .../hcrypto/man/man3/DES_ecb3_encrypt.3 | 1 - .../hcrypto/man/man3/DES_ecb_encrypt.3 | 1 - .../hcrypto/man/man3/DES_ede3_cbc_encrypt.3 | 1 - .../doxyout/hcrypto/man/man3/DES_encrypt.3 | 1 - .../man3/DES_init_random_number_generator.3 | 1 - .../hcrypto/man/man3/DES_is_weak_key.3 | 1 - .../doxyout/hcrypto/man/man3/DES_key_sched.3 | 1 - .../hcrypto/man/man3/DES_new_random_key.3 | 1 - .../hcrypto/man/man3/DES_pcbc_encrypt.3 | 1 - .../doxyout/hcrypto/man/man3/DES_random_key.3 | 1 - .../doxyout/hcrypto/man/man3/DES_set_key.3 | 1 - .../hcrypto/man/man3/DES_set_key_checked.3 | 1 - .../hcrypto/man/man3/DES_set_key_unchecked.3 | 1 - .../hcrypto/man/man3/DES_set_odd_parity.3 | 1 - .../hcrypto/man/man3/DES_string_to_key.3 | 1 - .../hcrypto/man/man3/DH_check_pubkey.3 | 1 - .../doxyout/hcrypto/man/man3/DH_compute_key.3 | 1 - .../doc/doxyout/hcrypto/man/man3/DH_free.3 | 1 - .../hcrypto/man/man3/DH_generate_key.3 | 1 - .../man/man3/DH_generate_parameters_ex.3 | 1 - .../hcrypto/man/man3/DH_get_default_method.3 | 1 - .../doxyout/hcrypto/man/man3/DH_get_ex_data.3 | 1 - .../doxyout/hcrypto/man/man3/DH_ltm_method.3 | 1 - .../src/doc/doxyout/hcrypto/man/man3/DH_new.3 | 1 - .../doxyout/hcrypto/man/man3/DH_new_method.3 | 1 - .../doxyout/hcrypto/man/man3/DH_null_method.3 | 1 - .../hcrypto/man/man3/DH_set_default_method.3 | 1 - .../doxyout/hcrypto/man/man3/DH_set_ex_data.3 | 1 - .../doxyout/hcrypto/man/man3/DH_set_method.3 | 1 - .../doc/doxyout/hcrypto/man/man3/DH_size.3 | 1 - .../doc/doxyout/hcrypto/man/man3/DH_up_ref.3 | 1 - .../doxyout/hcrypto/man/man3/EVP_BytesToKey.3 | 1 - .../man/man3/EVP_CIPHER_CTX_block_size.3 | 1 - .../hcrypto/man/man3/EVP_CIPHER_CTX_cipher.3 | 1 - .../hcrypto/man/man3/EVP_CIPHER_CTX_cleanup.3 | 1 - .../hcrypto/man/man3/EVP_CIPHER_CTX_ctrl.3 | 1 - .../hcrypto/man/man3/EVP_CIPHER_CTX_flags.3 | 1 - .../man/man3/EVP_CIPHER_CTX_get_app_data.3 | 1 - .../hcrypto/man/man3/EVP_CIPHER_CTX_init.3 | 1 - .../man/man3/EVP_CIPHER_CTX_iv_length.3 | 1 - .../man/man3/EVP_CIPHER_CTX_key_length.3 | 1 - .../hcrypto/man/man3/EVP_CIPHER_CTX_mode.3 | 1 - .../man/man3/EVP_CIPHER_CTX_rand_key.3 | 1 - .../man/man3/EVP_CIPHER_CTX_set_app_data.3 | 1 - .../man/man3/EVP_CIPHER_CTX_set_key_length.3 | 1 - .../hcrypto/man/man3/EVP_CIPHER_block_size.3 | 1 - .../hcrypto/man/man3/EVP_CIPHER_iv_length.3 | 1 - .../hcrypto/man/man3/EVP_CIPHER_key_length.3 | 1 - .../hcrypto/man/man3/EVP_CipherFinal_ex.3 | 1 - .../hcrypto/man/man3/EVP_CipherInit_ex.3 | 1 - .../hcrypto/man/man3/EVP_CipherUpdate.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_Digest.3 | 1 - .../hcrypto/man/man3/EVP_DigestFinal_ex.3 | 1 - .../hcrypto/man/man3/EVP_DigestInit_ex.3 | 1 - .../hcrypto/man/man3/EVP_DigestUpdate.3 | 1 - .../hcrypto/man/man3/EVP_MD_CTX_block_size.3 | 1 - .../hcrypto/man/man3/EVP_MD_CTX_cleanup.3 | 1 - .../hcrypto/man/man3/EVP_MD_CTX_create.3 | 1 - .../hcrypto/man/man3/EVP_MD_CTX_destroy.3 | 1 - .../hcrypto/man/man3/EVP_MD_CTX_init.3 | 1 - .../doxyout/hcrypto/man/man3/EVP_MD_CTX_md.3 | 1 - .../hcrypto/man/man3/EVP_MD_CTX_size.3 | 1 - .../hcrypto/man/man3/EVP_MD_block_size.3 | 1 - .../doxyout/hcrypto/man/man3/EVP_MD_size.3 | 1 - .../hcrypto/man/man3/EVP_aes_128_cbc.3 | 1 - .../hcrypto/man/man3/EVP_aes_128_cfb8.3 | 1 - .../hcrypto/man/man3/EVP_aes_192_cbc.3 | 1 - .../hcrypto/man/man3/EVP_aes_192_cfb8.3 | 1 - .../hcrypto/man/man3/EVP_aes_256_cbc.3 | 1 - .../hcrypto/man/man3/EVP_aes_256_cfb8.3 | 1 - .../hcrypto/man/man3/EVP_camellia_128_cbc.3 | 1 - .../hcrypto/man/man3/EVP_camellia_192_cbc.3 | 1 - .../hcrypto/man/man3/EVP_camellia_256_cbc.3 | 1 - .../doxyout/hcrypto/man/man3/EVP_des_cbc.3 | 1 - .../hcrypto/man/man3/EVP_des_ede3_cbc.3 | 1 - .../doxyout/hcrypto/man/man3/EVP_enc_null.3 | 1 - .../hcrypto/man/man3/EVP_get_cipherbyname.3 | 1 - .../man/man3/EVP_hcrypto_aes_128_cbc.3 | 1 - .../man/man3/EVP_hcrypto_aes_128_cfb8.3 | 1 - .../man/man3/EVP_hcrypto_aes_192_cbc.3 | 1 - .../man/man3/EVP_hcrypto_aes_192_cfb8.3 | 1 - .../man/man3/EVP_hcrypto_aes_256_cbc.3 | 1 - .../man/man3/EVP_hcrypto_aes_256_cfb8.3 | 1 - .../man/man3/EVP_hcrypto_camellia_128_cbc.3 | 1 - .../man/man3/EVP_hcrypto_camellia_192_cbc.3 | 1 - .../man/man3/EVP_hcrypto_camellia_256_cbc.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_des_cbc.3 | 1 - .../man/man3/EVP_hcrypto_des_ede3_cbc.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_md2.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_md4.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_md5.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_rc2_40_cbc.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_rc2_64_cbc.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_rc2_cbc.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_sha1.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_sha256.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_sha384.3 | 1 - .../hcrypto/man/man3/EVP_hcrypto_sha512.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_md2.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_md4.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_md5.3 | 1 - .../doxyout/hcrypto/man/man3/EVP_md_null.3 | 1 - .../doxyout/hcrypto/man/man3/EVP_rc2_40_cbc.3 | 1 - .../doxyout/hcrypto/man/man3/EVP_rc2_64_cbc.3 | 1 - .../doxyout/hcrypto/man/man3/EVP_rc2_cbc.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_rc4.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_rc4_40.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_sha.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_sha1.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_sha256.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_sha384.3 | 1 - .../doc/doxyout/hcrypto/man/man3/EVP_sha512.3 | 1 - .../man/man3/EVP_wincrypt_des_ede3_cbc.3 | 1 - .../man/man3/OpenSSL_add_all_algorithms.3 | 1 - .../man3/OpenSSL_add_all_algorithms_conf.3 | 1 - .../man3/OpenSSL_add_all_algorithms_noconf.3 | 1 - .../hcrypto/man/man3/PKCS5_PBKDF2_HMAC_SHA1.3 | 1 - .../doc/doxyout/hcrypto/man/man3/RAND_add.3 | 1 - .../doc/doxyout/hcrypto/man/man3/RAND_bytes.3 | 1 - .../doxyout/hcrypto/man/man3/RAND_cleanup.3 | 1 - .../doxyout/hcrypto/man/man3/RAND_file_name.3 | 1 - .../hcrypto/man/man3/RAND_get_rand_method.3 | 1 - .../doxyout/hcrypto/man/man3/RAND_load_file.3 | 1 - .../hcrypto/man/man3/RAND_pseudo_bytes.3 | 1 - .../doc/doxyout/hcrypto/man/man3/RAND_seed.3 | 1 - .../hcrypto/man/man3/RAND_set_rand_engine.3 | 1 - .../hcrypto/man/man3/RAND_set_rand_method.3 | 1 - .../doxyout/hcrypto/man/man3/RAND_status.3 | 1 - .../hcrypto/man/man3/RAND_write_file.3 | 1 - .../doc/doxyout/hcrypto/man/man3/RSA_free.3 | 1 - .../hcrypto/man/man3/RSA_get_app_data.3 | 1 - .../doxyout/hcrypto/man/man3/RSA_get_method.3 | 1 - .../doc/doxyout/hcrypto/man/man3/RSA_new.3 | 1 - .../doxyout/hcrypto/man/man3/RSA_new_method.3 | 1 - .../hcrypto/man/man3/RSA_set_app_data.3 | 1 - .../doxyout/hcrypto/man/man3/RSA_set_method.3 | 1 - .../doc/doxyout/hcrypto/man/man3/RSA_up_ref.3 | 1 - .../doxyout/hcrypto/man/man3/hcrypto_core.3 | 76 - .../doxyout/hcrypto/man/man3/hcrypto_des.3 | 392 - .../doc/doxyout/hcrypto/man/man3/hcrypto_dh.3 | 310 - .../doxyout/hcrypto/man/man3/hcrypto_evp.3 | 1299 - .../doxyout/hcrypto/man/man3/hcrypto_misc.3 | 44 - .../doxyout/hcrypto/man/man3/hcrypto_rand.3 | 200 - .../doxyout/hcrypto/man/man3/hcrypto_rsa.3 | 152 - .../doc/doxyout/hcrypto/man/man3/page_des.3 | 35 - .../doc/doxyout/hcrypto/man/man3/page_dh.3 | 10 - .../doc/doxyout/hcrypto/man/man3/page_evp.3 | 9 - .../doc/doxyout/hcrypto/man/man3/page_rand.3 | 6 - .../doc/doxyout/hcrypto/man/man3/page_rsa.3 | 12 - kerberosV/src/doc/doxyout/hcrypto/manpages | 153 - .../src/doc/doxyout/hdb/html/annotated.html | 35 - .../src/doc/doxyout/hdb/html/doxygen.css | 473 - .../src/doc/doxyout/hdb/html/doxygen.png | Bin 1281 -> 0 bytes .../src/doc/doxyout/hdb/html/functions.html | 85 - .../doc/doxyout/hdb/html/functions_vars.html | 85 - .../src/doc/doxyout/hdb/html/graph_legend.dot | 22 - .../doc/doxyout/hdb/html/graph_legend.html | 87 - .../src/doc/doxyout/hdb/html/graph_legend.png | Bin 4256 -> 0 bytes kerberosV/src/doc/doxyout/hdb/html/index.html | 33 - .../doc/doxyout/hdb/html/struct_h_d_b.html | 430 - .../hdb/html/structhdb__entry__ex.html | 39 - kerberosV/src/doc/doxyout/hdb/html/tab_b.gif | Bin 35 -> 0 bytes kerberosV/src/doc/doxyout/hdb/html/tab_l.gif | Bin 706 -> 0 bytes kerberosV/src/doc/doxyout/hdb/html/tab_r.gif | Bin 2585 -> 0 bytes kerberosV/src/doc/doxyout/hdb/html/tabs.css | 102 - kerberosV/src/doc/doxyout/hdb/man/man3/HDB.3 | 185 - .../src/doc/doxyout/hdb/man/man3/hdb__del.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb__get.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb__put.3 | 1 - .../doxyout/hdb/man/man3/hdb_auth_status.3 | 1 - .../man3/hdb_check_constrained_delegation.3 | 1 - .../man/man3/hdb_check_pkinit_ms_upn_match.3 | 1 - .../doxyout/hdb/man/man3/hdb_check_s4u2self.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb_close.3 | 1 - .../doc/doxyout/hdb/man/man3/hdb_destroy.3 | 1 - .../doc/doxyout/hdb/man/man3/hdb_entry_ex.3 | 17 - .../doc/doxyout/hdb/man/man3/hdb_fetch_kvno.3 | 1 - .../doc/doxyout/hdb/man/man3/hdb_firstkey.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb_free.3 | 1 - .../doc/doxyout/hdb/man/man3/hdb_get_realms.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb_lock.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb_name.3 | 1 - .../doc/doxyout/hdb/man/man3/hdb_nextkey.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb_open.3 | 1 - .../doc/doxyout/hdb/man/man3/hdb_password.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb_remove.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb_rename.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb_store.3 | 1 - .../src/doc/doxyout/hdb/man/man3/hdb_unlock.3 | 1 - kerberosV/src/doc/doxyout/hdb/manpages | 24 - .../src/doc/doxyout/hx509/html/doxygen.css | 473 - .../src/doc/doxyout/hx509/html/doxygen.png | Bin 1281 -> 0 bytes .../doc/doxyout/hx509/html/graph_legend.dot | 22 - .../doc/doxyout/hx509/html/graph_legend.html | 88 - .../doc/doxyout/hx509/html/graph_legend.png | Bin 4256 -> 0 bytes .../doc/doxyout/hx509/html/group__hx509.html | 89 - .../doxyout/hx509/html/group__hx509__ca.html | 1179 - .../hx509/html/group__hx509__cert.html | 1425 - .../doxyout/hx509/html/group__hx509__cms.html | 504 - .../hx509/html/group__hx509__crypto.html | 92 - .../doxyout/hx509/html/group__hx509__env.html | 311 - .../hx509/html/group__hx509__error.html | 308 - .../hx509/html/group__hx509__keyset.html | 781 - .../hx509/html/group__hx509__lock.html | 29 - .../hx509/html/group__hx509__misc.html | 88 - .../hx509/html/group__hx509__name.html | 470 - .../hx509/html/group__hx509__peer.html | 237 - .../hx509/html/group__hx509__print.html | 452 - .../hx509/html/group__hx509__query.html | 29 - .../hx509/html/group__hx509__revoke.html | 378 - .../hx509/html/group__hx509__verify.html | 714 - .../src/doc/doxyout/hx509/html/index.html | 35 - .../src/doc/doxyout/hx509/html/modules.html | 44 - .../src/doc/doxyout/hx509/html/page_ca.html | 26 - .../src/doc/doxyout/hx509/html/page_cert.html | 28 - .../src/doc/doxyout/hx509/html/page_cms.html | 30 - .../src/doc/doxyout/hx509/html/page_env.html | 26 - .../doc/doxyout/hx509/html/page_error.html | 26 - .../doc/doxyout/hx509/html/page_keyset.html | 29 - .../src/doc/doxyout/hx509/html/page_lock.html | 26 - .../src/doc/doxyout/hx509/html/page_name.html | 32 - .../src/doc/doxyout/hx509/html/page_peer.html | 27 - .../doc/doxyout/hx509/html/page_print.html | 26 - .../doc/doxyout/hx509/html/page_revoke.html | 28 - .../src/doc/doxyout/hx509/html/pages.html | 50 - .../src/doc/doxyout/hx509/html/tab_b.gif | Bin 35 -> 0 bytes .../src/doc/doxyout/hx509/html/tab_l.gif | Bin 706 -> 0 bytes .../src/doc/doxyout/hx509/html/tab_r.gif | Bin 2585 -> 0 bytes kerberosV/src/doc/doxyout/hx509/html/tabs.css | 102 - .../src/doc/doxyout/hx509/man/man3/hx509.3 | 45 - .../hx509/man/man3/hx509_bitstring_print.3 | 1 - .../src/doc/doxyout/hx509/man/man3/hx509_ca.3 | 573 - .../doxyout/hx509/man/man3/hx509_ca_sign.3 | 1 - .../hx509/man/man3/hx509_ca_sign_self.3 | 1 - .../man/man3/hx509_ca_tbs_add_crl_dp_uri.3 | 1 - .../hx509/man/man3/hx509_ca_tbs_add_eku.3 | 1 - .../man/man3/hx509_ca_tbs_add_san_hostname.3 | 1 - .../hx509/man/man3/hx509_ca_tbs_add_san_jid.3 | 1 - .../man/man3/hx509_ca_tbs_add_san_ms_upn.3 | 1 - .../man/man3/hx509_ca_tbs_add_san_otherName.3 | 1 - .../man/man3/hx509_ca_tbs_add_san_pkinit.3 | 1 - .../man3/hx509_ca_tbs_add_san_rfc822name.3 | 1 - .../hx509/man/man3/hx509_ca_tbs_free.3 | 1 - .../hx509/man/man3/hx509_ca_tbs_init.3 | 1 - .../hx509/man/man3/hx509_ca_tbs_set_ca.3 | 1 - .../man3/hx509_ca_tbs_set_domaincontroller.3 | 1 - .../man/man3/hx509_ca_tbs_set_notAfter.3 | 1 - .../man3/hx509_ca_tbs_set_notAfter_lifetime.3 | 1 - .../man/man3/hx509_ca_tbs_set_notBefore.3 | 1 - .../hx509/man/man3/hx509_ca_tbs_set_proxy.3 | 1 - .../man/man3/hx509_ca_tbs_set_serialnumber.3 | 1 - .../hx509/man/man3/hx509_ca_tbs_set_spki.3 | 1 - .../hx509/man/man3/hx509_ca_tbs_set_subject.3 | 1 - .../man/man3/hx509_ca_tbs_set_template.3 | 1 - .../hx509/man/man3/hx509_ca_tbs_set_unique.3 | 1 - .../man/man3/hx509_ca_tbs_subject_expand.3 | 1 - .../man/man3/hx509_ca_tbs_template_units.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_cert.3 | 700 - .../hx509/man/man3/hx509_cert_binary.3 | 1 - .../hx509/man/man3/hx509_cert_check_eku.3 | 1 - .../doxyout/hx509/man/man3/hx509_cert_cmp.3 | 1 - ...hx509_cert_find_subjectAltName_otherName.3 | 1 - .../doxyout/hx509/man/man3/hx509_cert_free.3 | 1 - .../hx509/man/man3/hx509_cert_get_SPKI.3 | 1 - .../hx509_cert_get_SPKI_AlgorithmIdentifier.3 | 1 - .../hx509/man/man3/hx509_cert_get_attribute.3 | 1 - .../man/man3/hx509_cert_get_base_subject.3 | 1 - .../man/man3/hx509_cert_get_friendly_name.3 | 1 - .../hx509/man/man3/hx509_cert_get_issuer.3 | 1 - .../man3/hx509_cert_get_issuer_unique_id.3 | 1 - .../hx509/man/man3/hx509_cert_get_notAfter.3 | 1 - .../hx509/man/man3/hx509_cert_get_notBefore.3 | 1 - .../man/man3/hx509_cert_get_serialnumber.3 | 1 - .../hx509/man/man3/hx509_cert_get_subject.3 | 1 - .../man3/hx509_cert_get_subject_unique_id.3 | 1 - .../doxyout/hx509/man/man3/hx509_cert_init.3 | 1 - .../hx509/man/man3/hx509_cert_init_data.3 | 1 - .../man/man3/hx509_cert_keyusage_print.3 | 1 - .../doxyout/hx509/man/man3/hx509_cert_ref.3 | 1 - .../man/man3/hx509_cert_set_friendly_name.3 | 1 - .../doxyout/hx509/man/man3/hx509_certs_add.3 | 1 - .../hx509/man/man3/hx509_certs_append.3 | 1 - .../hx509/man/man3/hx509_certs_end_seq.3 | 1 - .../hx509/man/man3/hx509_certs_filter.3 | 1 - .../doxyout/hx509/man/man3/hx509_certs_find.3 | 1 - .../doxyout/hx509/man/man3/hx509_certs_free.3 | 1 - .../doxyout/hx509/man/man3/hx509_certs_info.3 | 1 - .../doxyout/hx509/man/man3/hx509_certs_init.3 | 1 - .../hx509/man/man3/hx509_certs_iter_f.3 | 1 - .../hx509/man/man3/hx509_certs_merge.3 | 1 - .../hx509/man/man3/hx509_certs_next_cert.3 | 1 - .../hx509/man/man3/hx509_certs_start_seq.3 | 1 - .../hx509/man/man3/hx509_certs_store.3 | 1 - .../hx509/man/man3/hx509_ci_print_names.3 | 1 - .../hx509/man/man3/hx509_clear_error_string.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_cms.3 | 206 - .../man/man3/hx509_cms_create_signed_1.3 | 1 - .../hx509/man/man3/hx509_cms_envelope_1.3 | 1 - .../hx509/man/man3/hx509_cms_unenvelope.3 | 1 - .../man/man3/hx509_cms_unwrap_ContentInfo.3 | 1 - .../hx509/man/man3/hx509_cms_verify_signed.3 | 1 - .../man/man3/hx509_cms_wrap_ContentInfo.3 | 1 - .../hx509/man/man3/hx509_context_free.3 | 1 - .../hx509/man/man3/hx509_context_init.3 | 1 - .../man3/hx509_context_set_missing_revoke.3 | 1 - .../man/man3/hx509_crl_add_revoked_certs.3 | 1 - .../doxyout/hx509/man/man3/hx509_crl_alloc.3 | 1 - .../doxyout/hx509/man/man3/hx509_crl_free.3 | 1 - .../hx509/man/man3/hx509_crl_lifetime.3 | 1 - .../doxyout/hx509/man/man3/hx509_crl_sign.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_crypto.3 | 40 - .../doc/doxyout/hx509/man/man3/hx509_env.3 | 143 - .../doxyout/hx509/man/man3/hx509_env_add.3 | 1 - .../hx509/man/man3/hx509_env_add_binding.3 | 1 - .../doxyout/hx509/man/man3/hx509_env_find.3 | 1 - .../hx509/man/man3/hx509_env_find_binding.3 | 1 - .../doxyout/hx509/man/man3/hx509_env_free.3 | 1 - .../doxyout/hx509/man/man3/hx509_env_lfind.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_err.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_error.3 | 129 - .../hx509/man/man3/hx509_free_error_string.3 | 1 - .../man/man3/hx509_free_octet_string_list.3 | 1 - .../man/man3/hx509_general_name_unparse.3 | 1 - .../hx509/man/man3/hx509_get_error_string.3 | 1 - .../hx509/man/man3/hx509_get_one_cert.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_keyset.3 | 373 - .../doc/doxyout/hx509/man/man3/hx509_lock.3 | 5 - .../doc/doxyout/hx509/man/man3/hx509_misc.3 | 40 - .../doc/doxyout/hx509/man/man3/hx509_name.3 | 235 - .../hx509/man/man3/hx509_name_binary.3 | 1 - .../doxyout/hx509/man/man3/hx509_name_cmp.3 | 1 - .../doxyout/hx509/man/man3/hx509_name_copy.3 | 1 - .../hx509/man/man3/hx509_name_expand.3 | 1 - .../doxyout/hx509/man/man3/hx509_name_free.3 | 1 - .../hx509/man/man3/hx509_name_is_null_p.3 | 1 - .../hx509/man/man3/hx509_name_to_Name.3 | 1 - .../hx509/man/man3/hx509_name_to_string.3 | 1 - .../hx509/man/man3/hx509_ocsp_request.3 | 1 - .../hx509/man/man3/hx509_ocsp_verify.3 | 1 - .../doxyout/hx509/man/man3/hx509_oid_print.3 | 1 - .../doxyout/hx509/man/man3/hx509_oid_sprint.3 | 1 - .../doxyout/hx509/man/man3/hx509_parse_name.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_peer.3 | 113 - .../man/man3/hx509_peer_info_add_cms_alg.3 | 1 - .../hx509/man/man3/hx509_peer_info_alloc.3 | 1 - .../hx509/man/man3/hx509_peer_info_free.3 | 1 - .../hx509/man/man3/hx509_peer_info_set_cert.3 | 1 - .../man/man3/hx509_peer_info_set_cms_algs.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_print.3 | 211 - .../doxyout/hx509/man/man3/hx509_print_cert.3 | 1 - .../hx509/man/man3/hx509_print_stdout.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_query.3 | 5 - .../hx509/man/man3/hx509_query_alloc.3 | 1 - .../doxyout/hx509/man/man3/hx509_query_free.3 | 1 - .../man/man3/hx509_query_match_cmp_func.3 | 1 - .../hx509/man/man3/hx509_query_match_eku.3 | 1 - .../man3/hx509_query_match_friendly_name.3 | 1 - .../man3/hx509_query_match_issuer_serial.3 | 1 - .../hx509/man/man3/hx509_query_match_option.3 | 1 - .../man/man3/hx509_query_statistic_file.3 | 1 - .../man/man3/hx509_query_unparse_stats.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_revoke.3 | 171 - .../hx509/man/man3/hx509_revoke_add_crl.3 | 1 - .../hx509/man/man3/hx509_revoke_add_ocsp.3 | 1 - .../hx509/man/man3/hx509_revoke_free.3 | 1 - .../hx509/man/man3/hx509_revoke_init.3 | 1 - .../hx509/man/man3/hx509_revoke_ocsp_print.3 | 1 - .../hx509/man/man3/hx509_revoke_verify.3 | 1 - .../hx509/man/man3/hx509_set_error_string.3 | 1 - .../hx509/man/man3/hx509_set_error_stringv.3 | 1 - .../hx509/man/man3/hx509_unparse_der_name.3 | 1 - .../hx509/man/man3/hx509_validate_cert.3 | 1 - .../man/man3/hx509_validate_ctx_add_flags.3 | 1 - .../hx509/man/man3/hx509_validate_ctx_free.3 | 1 - .../hx509/man/man3/hx509_validate_ctx_init.3 | 1 - .../man/man3/hx509_validate_ctx_set_print.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_verify.3 | 309 - .../man/man3/hx509_verify_attach_anchors.3 | 1 - .../man/man3/hx509_verify_attach_revoke.3 | 1 - ..._verify_ctx_f_allow_default_trustanchors.3 | 1 - .../hx509/man/man3/hx509_verify_destroy_ctx.3 | 1 - .../hx509/man/man3/hx509_verify_hostname.3 | 1 - .../hx509/man/man3/hx509_verify_init_ctx.3 | 1 - .../hx509/man/man3/hx509_verify_path.3 | 1 - .../man/man3/hx509_verify_set_max_depth.3 | 1 - .../man3/hx509_verify_set_proxy_certificate.3 | 1 - ...9_verify_set_strict_rfc3280_verification.3 | 1 - .../hx509/man/man3/hx509_verify_set_time.3 | 1 - .../hx509/man/man3/hx509_verify_signature.3 | 1 - .../doc/doxyout/hx509/man/man3/hx509_xfree.3 | 1 - .../src/doc/doxyout/hx509/man/man3/page_ca.3 | 6 - .../doc/doxyout/hx509/man/man3/page_cert.3 | 10 - .../src/doc/doxyout/hx509/man/man3/page_cms.3 | 18 - .../src/doc/doxyout/hx509/man/man3/page_env.3 | 6 - .../doc/doxyout/hx509/man/man3/page_error.3 | 6 - .../doc/doxyout/hx509/man/man3/page_keyset.3 | 25 - .../doc/doxyout/hx509/man/man3/page_lock.3 | 6 - .../doc/doxyout/hx509/man/man3/page_name.3 | 18 - .../doc/doxyout/hx509/man/man3/page_peer.3 | 8 - .../doc/doxyout/hx509/man/man3/page_print.3 | 6 - .../doc/doxyout/hx509/man/man3/page_revoke.3 | 10 - kerberosV/src/doc/doxyout/hx509/manpages | 172 - .../src/doc/doxyout/krb5/html/annotated.html | 35 - .../src/doc/doxyout/krb5/html/doxygen.css | 473 - .../src/doc/doxyout/krb5/html/doxygen.png | Bin 1281 -> 0 bytes .../doc/doxyout/krb5/html/graph_legend.dot | 22 - .../doc/doxyout/krb5/html/graph_legend.html | 89 - .../doc/doxyout/krb5/html/graph_legend.png | Bin 4256 -> 0 bytes .../doc/doxyout/krb5/html/group__krb5.html | 2237 - .../krb5/html/group__krb5__address.html | 1003 - .../doxyout/krb5/html/group__krb5__auth.html | 320 - .../krb5/html/group__krb5__ccache.html | 2264 - .../krb5/html/group__krb5__credential.html | 858 - .../krb5/html/group__krb5__crypto.html | 1262 - .../krb5/html/group__krb5__deprecated.html | 1289 - .../krb5/html/group__krb5__digest.html | 87 - .../doxyout/krb5/html/group__krb5__error.html | 239 - .../krb5/html/group__krb5__keytab.html | 1055 - .../doxyout/krb5/html/group__krb5__pac.html | 155 - .../krb5/html/group__krb5__principal.html | 1180 - .../krb5/html/group__krb5__storage.html | 2092 - .../krb5/html/group__krb5__support.html | 1320 - .../krb5/html/group__krb5__ticket.html | 73 - .../krb5/html/group__krb5__v4compat.html | 134 - .../src/doc/doxyout/krb5/html/index.html | 37 - .../doxyout/krb5/html/krb5_ccache_intro.html | 74 - .../doxyout/krb5/html/krb5_fileformats.html | 154 - .../krb5/html/krb5_init_creds_intro.html | 29 - .../doxyout/krb5/html/krb5_introduction.html | 204 - .../doxyout/krb5/html/krb5_keytab_intro.html | 82 - .../krb5/html/krb5_principal_intro.html | 32 - .../src/doc/doxyout/krb5/html/modules.html | 45 - .../src/doc/doxyout/krb5/html/pages.html | 41 - .../krb5/html/structkrb5__crypto__iov.html | 40 - kerberosV/src/doc/doxyout/krb5/html/tab_b.gif | Bin 35 -> 0 bytes kerberosV/src/doc/doxyout/krb5/html/tab_l.gif | Bin 706 -> 0 bytes kerberosV/src/doc/doxyout/krb5/html/tab_r.gif | Bin 2585 -> 0 bytes kerberosV/src/doc/doxyout/krb5/html/tabs.css | 102 - .../src/doc/doxyout/krb5/man/man3/krb5.3 | 1092 - .../krb5/man/man3/krb524_convert_creds_kdc.3 | 1 - .../man3/krb524_convert_creds_kdc_ccache.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_acc_ops.3 | 1 - .../krb5/man/man3/krb5_acl_match_file.3 | 1 - .../krb5/man/man3/krb5_acl_match_string.3 | 1 - .../doxyout/krb5/man/man3/krb5_add_et_list.3 | 1 - .../krb5/man/man3/krb5_add_extra_addresses.3 | 1 - .../krb5/man/man3/krb5_add_ignore_addresses.3 | 1 - .../krb5/man/man3/krb5_addr2sockaddr.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_address.3 | 461 - .../krb5/man/man3/krb5_address_compare.3 | 1 - .../krb5/man/man3/krb5_address_order.3 | 1 - .../man3/krb5_address_prefixlen_boundary.3 | 1 - .../krb5/man/man3/krb5_address_search.3 | 1 - .../krb5/man/man3/krb5_allow_weak_crypto.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_anyaddr.3 | 1 - .../krb5/man/man3/krb5_append_addresses.3 | 1 - .../src/doc/doxyout/krb5/man/man3/krb5_auth.3 | 138 - .../man/man3/krb5_auth_getremoteseqnumber.3 | 1 - .../krb5/man/man3/krb5_build_principal.3 | 1 - .../krb5/man/man3/krb5_c_enctype_compare.3 | 1 - .../krb5/man/man3/krb5_cc_cache_end_seq_get.3 | 1 - .../krb5/man/man3/krb5_cc_cache_get_first.3 | 1 - .../krb5/man/man3/krb5_cc_cache_match.3 | 1 - .../krb5/man/man3/krb5_cc_cache_next.3 | 1 - .../krb5/man/man3/krb5_cc_clear_mcred.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_cc_close.3 | 1 - .../krb5/man/man3/krb5_cc_copy_cache.3 | 1 - .../krb5/man/man3/krb5_cc_copy_creds.3 | 1 - .../krb5/man/man3/krb5_cc_copy_match_f.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_default.3 | 1 - .../krb5/man/man3/krb5_cc_default_name.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_destroy.3 | 1 - .../krb5/man/man3/krb5_cc_end_seq_get.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_gen_new.3 | 1 - .../krb5/man/man3/krb5_cc_get_config.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_get_flags.3 | 1 - .../krb5/man/man3/krb5_cc_get_friendly_name.3 | 1 - .../krb5/man/man3/krb5_cc_get_full_name.3 | 1 - .../krb5/man/man3/krb5_cc_get_kdc_offset.3 | 1 - .../krb5/man/man3/krb5_cc_get_lifetime.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_get_name.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_get_ops.3 | 1 - .../krb5/man/man3/krb5_cc_get_prefix_ops.3 | 1 - .../krb5/man/man3/krb5_cc_get_principal.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_get_type.3 | 1 - .../krb5/man/man3/krb5_cc_get_version.3 | 1 - .../krb5/man/man3/krb5_cc_initialize.3 | 1 - .../krb5/man/man3/krb5_cc_last_change_time.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_cc_move.3 | 1 - .../krb5/man/man3/krb5_cc_new_unique.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_next_cred.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_register.3 | 1 - .../krb5/man/man3/krb5_cc_remove_cred.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_resolve.3 | 1 - .../krb5/man/man3/krb5_cc_retrieve_cred.3 | 1 - .../krb5/man/man3/krb5_cc_set_config.3 | 1 - .../krb5/man/man3/krb5_cc_set_default_name.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_set_flags.3 | 1 - .../krb5/man/man3/krb5_cc_set_friendly_name.3 | 1 - .../krb5/man/man3/krb5_cc_set_kdc_offset.3 | 1 - .../krb5/man/man3/krb5_cc_start_seq_get.3 | 1 - .../krb5/man/man3/krb5_cc_store_cred.3 | 1 - .../krb5/man/man3/krb5_cc_support_switch.3 | 1 - .../doxyout/krb5/man/man3/krb5_cc_switch.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_ccache.3 | 888 - .../doxyout/krb5/man/man3/krb5_ccache_intro.3 | 69 - .../krb5/man/man3/krb5_cccol_cursor_free.3 | 1 - .../krb5/man/man3/krb5_cccol_cursor_new.3 | 1 - .../krb5/man/man3/krb5_cccol_cursor_next.3 | 1 - .../man/man3/krb5_cccol_last_change_time.3 | 1 - .../krb5/man/man3/krb5_change_password.3 | 1 - .../krb5/man/man3/krb5_cksumtype_to_enctype.3 | 1 - .../krb5/man/man3/krb5_clear_error_message.3 | 1 - .../krb5/man/man3/krb5_clear_error_string.3 | 1 - .../krb5/man/man3/krb5_compare_creds.3 | 1 - .../krb5/man/man3/krb5_config_file_free.3 | 1 - .../krb5/man/man3/krb5_config_free_strings.3 | 1 - .../krb5/man/man3/krb5_config_get_bool.3 | 1 - .../man/man3/krb5_config_get_bool_default.3 | 1 - .../krb5/man/man3/krb5_config_get_list.3 | 1 - .../krb5/man/man3/krb5_config_get_string.3 | 1 - .../man/man3/krb5_config_get_string_default.3 | 1 - .../krb5/man/man3/krb5_config_get_strings.3 | 1 - .../krb5/man/man3/krb5_config_get_time.3 | 1 - .../man/man3/krb5_config_get_time_default.3 | 1 - .../man/man3/krb5_config_parse_file_multi.3 | 1 - .../man/man3/krb5_config_parse_string_multi.3 | 1 - .../krb5/man/man3/krb5_config_vget_bool.3 | 1 - .../man/man3/krb5_config_vget_bool_default.3 | 1 - .../krb5/man/man3/krb5_config_vget_list.3 | 1 - .../krb5/man/man3/krb5_config_vget_string.3 | 1 - .../man3/krb5_config_vget_string_default.3 | 1 - .../krb5/man/man3/krb5_config_vget_strings.3 | 1 - .../krb5/man/man3/krb5_config_vget_time.3 | 1 - .../man/man3/krb5_config_vget_time_default.3 | 1 - .../doxyout/krb5/man/man3/krb5_copy_address.3 | 1 - .../krb5/man/man3/krb5_copy_addresses.3 | 1 - .../doxyout/krb5/man/man3/krb5_copy_context.3 | 1 - .../doxyout/krb5/man/man3/krb5_copy_creds.3 | 1 - .../krb5/man/man3/krb5_copy_creds_contents.3 | 1 - .../doxyout/krb5/man/man3/krb5_copy_data.3 | 1 - .../krb5/man/man3/krb5_copy_host_realm.3 | 1 - .../krb5/man/man3/krb5_copy_keyblock.3 | 1 - .../man/man3/krb5_copy_keyblock_contents.3 | 1 - .../krb5/man/man3/krb5_copy_principal.3 | 1 - .../doxyout/krb5/man/man3/krb5_copy_ticket.3 | 1 - .../krb5/man/man3/krb5_create_checksum_iov.3 | 1 - .../doxyout/krb5/man/man3/krb5_credential.3 | 279 - .../man/man3/krb5_creds_get_ticket_flags.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_crypto.3 | 550 - .../krb5/man/man3/krb5_crypto_destroy.3 | 1 - .../krb5/man/man3/krb5_crypto_fx_cf2.3 | 1 - .../krb5/man/man3/krb5_crypto_getblocksize.3 | 1 - .../man/man3/krb5_crypto_getconfoundersize.3 | 1 - .../krb5/man/man3/krb5_crypto_getenctype.3 | 1 - .../krb5/man/man3/krb5_crypto_getpadsize.3 | 1 - .../doxyout/krb5/man/man3/krb5_crypto_init.3 | 1 - .../doxyout/krb5/man/man3/krb5_crypto_iov.3 | 17 - .../doxyout/krb5/man/man3/krb5_data_alloc.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_data_cmp.3 | 1 - .../doxyout/krb5/man/man3/krb5_data_copy.3 | 1 - .../doxyout/krb5/man/man3/krb5_data_ct_cmp.3 | 1 - .../doxyout/krb5/man/man3/krb5_data_free.3 | 1 - .../doxyout/krb5/man/man3/krb5_data_realloc.3 | 1 - .../doxyout/krb5/man/man3/krb5_data_zero.3 | 1 - .../krb5/man/man3/krb5_decrypt_iov_ivec.3 | 1 - .../doxyout/krb5/man/man3/krb5_deprecated.3 | 269 - .../doc/doxyout/krb5/man/man3/krb5_digest.3 | 38 - .../doxyout/krb5/man/man3/krb5_digest_probe.3 | 1 - .../krb5/man/man3/krb5_eai_to_heim_errno.3 | 1 - .../krb5/man/man3/krb5_encrypt_iov_ivec.3 | 1 - .../krb5/man/man3/krb5_enctype_disable.3 | 1 - .../krb5/man/man3/krb5_enctype_enable.3 | 1 - .../krb5/man/man3/krb5_enctype_valid.3 | 1 - .../man/man3/krb5_enctypes_compatible_keys.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_error.3 | 105 - .../krb5/man/man3/krb5_expand_hostname.3 | 1 - .../man/man3/krb5_expand_hostname_realms.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_fcc_ops.3 | 1 - .../doxyout/krb5/man/man3/krb5_fileformats.3 | 233 - .../doxyout/krb5/man/man3/krb5_free_address.3 | 1 - .../krb5/man/man3/krb5_free_addresses.3 | 1 - .../krb5/man/man3/krb5_free_config_files.3 | 1 - .../doxyout/krb5/man/man3/krb5_free_context.3 | 1 - .../krb5/man/man3/krb5_free_cred_contents.3 | 1 - .../doxyout/krb5/man/man3/krb5_free_creds.3 | 1 - .../krb5/man/man3/krb5_free_creds_contents.3 | 1 - .../doxyout/krb5/man/man3/krb5_free_data.3 | 1 - .../krb5/man/man3/krb5_free_data_contents.3 | 1 - .../krb5/man/man3/krb5_free_error_string.3 | 1 - .../krb5/man/man3/krb5_free_host_realm.3 | 1 - .../krb5/man/man3/krb5_free_keyblock.3 | 1 - .../man/man3/krb5_free_keyblock_contents.3 | 1 - .../krb5/man/man3/krb5_free_principal.3 | 1 - .../doxyout/krb5/man/man3/krb5_free_ticket.3 | 1 - .../krb5/man/man3/krb5_free_unparsed_name.3 | 1 - .../krb5/man/man3/krb5_fwd_tgt_creds.3 | 1 - .../krb5/man/man3/krb5_generate_subkey.3 | 1 - .../man/man3/krb5_generate_subkey_extended.3 | 1 - .../krb5/man/man3/krb5_get_cred_from_kdc.3 | 1 - .../man/man3/krb5_get_cred_from_kdc_opt.3 | 1 - .../man/man3/krb5_get_default_config_files.3 | 1 - .../man/man3/krb5_get_default_in_tkt_etypes.3 | 1 - .../man3/krb5_get_dns_canonicalize_hostname.3 | 1 - .../krb5/man/man3/krb5_get_extra_addresses.3 | 1 - .../krb5/man/man3/krb5_get_fcache_version.3 | 1 - .../krb5/man/man3/krb5_get_forwarded_creds.3 | 1 - .../krb5/man/man3/krb5_get_ignore_addresses.3 | 1 - .../man/man3/krb5_get_in_tkt_with_keytab.3 | 1 - .../man/man3/krb5_get_in_tkt_with_password.3 | 1 - .../krb5/man/man3/krb5_get_in_tkt_with_skey.3 | 1 - .../man/man3/krb5_get_init_creds_keyblock.3 | 1 - .../man/man3/krb5_get_init_creds_keytab.3 | 1 - .../man/man3/krb5_get_init_creds_opt_alloc.3 | 1 - .../man/man3/krb5_get_init_creds_opt_free.3 | 1 - .../man3/krb5_get_init_creds_opt_get_error.3 | 1 - .../man/man3/krb5_get_init_creds_opt_init.3 | 1 - .../man/man3/krb5_get_init_creds_password.3 | 1 - .../krb5/man/man3/krb5_get_kdc_sec_offset.3 | 1 - .../krb5/man/man3/krb5_get_max_time_skew.3 | 1 - .../krb5/man/man3/krb5_get_use_admin_kdc.3 | 1 - .../krb5/man/man3/krb5_get_validated_creds.3 | 1 - .../doxyout/krb5/man/man3/krb5_h_addr2addr.3 | 1 - .../krb5/man/man3/krb5_h_addr2sockaddr.3 | 1 - .../man/man3/krb5_h_errno_to_heim_errno.3 | 1 - .../doxyout/krb5/man/man3/krb5_init_context.3 | 1 - .../krb5/man/man3/krb5_init_creds_free.3 | 1 - .../krb5/man/man3/krb5_init_creds_get.3 | 1 - .../krb5/man/man3/krb5_init_creds_get_error.3 | 1 - .../krb5/man/man3/krb5_init_creds_init.3 | 1 - .../krb5/man/man3/krb5_init_creds_intro.3 | 8 - .../man/man3/krb5_init_creds_set_keytab.3 | 1 - .../man/man3/krb5_init_creds_set_password.3 | 1 - .../man/man3/krb5_init_creds_set_service.3 | 1 - .../krb5/man/man3/krb5_init_creds_step.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_init_ets.3 | 1 - .../doxyout/krb5/man/man3/krb5_introduction.3 | 259 - .../krb5/man/man3/krb5_is_config_principal.3 | 1 - .../krb5/man/man3/krb5_is_thread_safe.3 | 1 - .../krb5/man/man3/krb5_kerberos_enctypes.3 | 1 - .../krb5/man/man3/krb5_keyblock_get_enctype.3 | 1 - .../krb5/man/man3/krb5_keyblock_init.3 | 1 - .../krb5/man/man3/krb5_keyblock_zero.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_keytab.3 | 486 - .../doxyout/krb5/man/man3/krb5_keytab_intro.3 | 74 - .../krb5/man/man3/krb5_keytab_key_proc.3 | 1 - .../krb5/man/man3/krb5_keytype_to_enctypes.3 | 1 - .../man3/krb5_keytype_to_enctypes_default.3 | 1 - .../krb5/man/man3/krb5_keytype_to_string.3 | 1 - .../krb5/man/man3/krb5_krbhst_get_addrinfo.3 | 1 - .../doxyout/krb5/man/man3/krb5_kt_add_entry.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_kt_close.3 | 1 - .../doxyout/krb5/man/man3/krb5_kt_compare.3 | 1 - .../man/man3/krb5_kt_copy_entry_contents.3 | 1 - .../doxyout/krb5/man/man3/krb5_kt_default.3 | 1 - .../man/man3/krb5_kt_default_modify_name.3 | 1 - .../krb5/man/man3/krb5_kt_default_name.3 | 1 - .../doxyout/krb5/man/man3/krb5_kt_destroy.3 | 1 - .../krb5/man/man3/krb5_kt_end_seq_get.3 | 1 - .../krb5/man/man3/krb5_kt_free_entry.3 | 1 - .../doxyout/krb5/man/man3/krb5_kt_get_entry.3 | 1 - .../krb5/man/man3/krb5_kt_get_full_name.3 | 1 - .../doxyout/krb5/man/man3/krb5_kt_get_name.3 | 1 - .../doxyout/krb5/man/man3/krb5_kt_get_type.3 | 1 - .../krb5/man/man3/krb5_kt_have_content.3 | 1 - .../krb5/man/man3/krb5_kt_next_entry.3 | 1 - .../krb5/man/man3/krb5_kt_read_service_key.3 | 1 - .../doxyout/krb5/man/man3/krb5_kt_register.3 | 1 - .../krb5/man/man3/krb5_kt_remove_entry.3 | 1 - .../doxyout/krb5/man/man3/krb5_kt_resolve.3 | 1 - .../krb5/man/man3/krb5_kt_start_seq_get.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_kuserok.3 | 1 - .../krb5/man/man3/krb5_make_addrport.3 | 1 - .../krb5/man/man3/krb5_make_principal.3 | 1 - .../krb5/man/man3/krb5_max_sockaddr_size.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_mcc_ops.3 | 1 - .../src/doc/doxyout/krb5/man/man3/krb5_pac.3 | 66 - .../krb5/man/man3/krb5_pac_get_buffer.3 | 1 - .../doxyout/krb5/man/man3/krb5_pac_verify.3 | 1 - .../krb5/man/man3/krb5_parse_address.3 | 1 - .../doxyout/krb5/man/man3/krb5_parse_name.3 | 1 - .../krb5/man/man3/krb5_parse_name_flags.3 | 1 - .../krb5/man/man3/krb5_parse_nametype.3 | 1 - .../krb5/man/man3/krb5_password_key_proc.3 | 1 - .../krb5/man/man3/krb5_plugin_register.3 | 1 - .../man3/krb5_prepend_config_files_default.3 | 1 - .../doxyout/krb5/man/man3/krb5_princ_realm.3 | 1 - .../krb5/man/man3/krb5_princ_set_realm.3 | 1 - .../doxyout/krb5/man/man3/krb5_principal.3 | 519 - .../krb5/man/man3/krb5_principal_compare.3 | 1 - .../man3/krb5_principal_compare_any_realm.3 | 1 - .../man/man3/krb5_principal_get_num_comp.3 | 1 - .../krb5/man/man3/krb5_principal_get_realm.3 | 1 - .../krb5/man/man3/krb5_principal_get_type.3 | 1 - .../krb5/man/man3/krb5_principal_intro.3 | 17 - .../krb5/man/man3/krb5_principal_is_krbtgt.3 | 1 - .../krb5/man/man3/krb5_principal_match.3 | 1 - .../krb5/man/man3/krb5_principal_set_realm.3 | 1 - .../krb5/man/man3/krb5_principal_set_type.3 | 1 - .../krb5/man/man3/krb5_print_address.3 | 1 - .../krb5/man/man3/krb5_random_to_key.3 | 1 - .../doxyout/krb5/man/man3/krb5_rd_req_ctx.3 | 1 - .../krb5/man/man3/krb5_rd_req_in_ctx_alloc.3 | 1 - .../krb5/man/man3/krb5_rd_req_in_set_keytab.3 | 1 - .../man/man3/krb5_rd_req_in_set_pac_check.3 | 1 - .../krb5/man/man3/krb5_rd_req_out_ctx_free.3 | 1 - .../man/man3/krb5_rd_req_out_get_server.3 | 1 - .../krb5/man/man3/krb5_realm_compare.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_address.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_addrs.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_authdata.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_creds.3 | 1 - .../krb5/man/man3/krb5_ret_creds_tag.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_ret_data.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_int16.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_int32.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_ret_int8.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_keyblock.3 | 1 - .../krb5/man/man3/krb5_ret_principal.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_string.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_stringz.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_times.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_uint16.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_uint32.3 | 1 - .../doxyout/krb5/man/man3/krb5_ret_uint8.3 | 1 - .../krb5/man/man3/krb5_set_config_files.3 | 1 - .../man/man3/krb5_set_default_in_tkt_etypes.3 | 1 - .../man3/krb5_set_dns_canonicalize_hostname.3 | 1 - .../krb5/man/man3/krb5_set_error_message.3 | 1 - .../krb5/man/man3/krb5_set_error_string.3 | 1 - .../krb5/man/man3/krb5_set_extra_addresses.3 | 1 - .../krb5/man/man3/krb5_set_fcache_version.3 | 1 - .../krb5/man/man3/krb5_set_home_dir_access.3 | 1 - .../krb5/man/man3/krb5_set_ignore_addresses.3 | 1 - .../krb5/man/man3/krb5_set_kdc_sec_offset.3 | 1 - .../krb5/man/man3/krb5_set_max_time_skew.3 | 1 - .../doxyout/krb5/man/man3/krb5_set_password.3 | 1 - .../krb5/man/man3/krb5_set_real_time.3 | 1 - .../krb5/man/man3/krb5_set_use_admin_kdc.3 | 1 - .../krb5/man/man3/krb5_sname_to_principal.3 | 1 - .../krb5/man/man3/krb5_sockaddr2address.3 | 1 - .../krb5/man/man3/krb5_sockaddr2port.3 | 1 - .../man/man3/krb5_sockaddr_uninteresting.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_storage.3 | 1055 - .../krb5/man/man3/krb5_storage_clear_flags.3 | 1 - .../doxyout/krb5/man/man3/krb5_storage_emem.3 | 1 - .../doxyout/krb5/man/man3/krb5_storage_free.3 | 1 - .../krb5/man/man3/krb5_storage_from_data.3 | 1 - .../krb5/man/man3/krb5_storage_from_fd.3 | 1 - .../krb5/man/man3/krb5_storage_from_mem.3 | 1 - .../man/man3/krb5_storage_from_readonly_mem.3 | 1 - .../man/man3/krb5_storage_get_byteorder.3 | 1 - .../krb5/man/man3/krb5_storage_get_eof_code.3 | 1 - .../krb5/man/man3/krb5_storage_is_flags.3 | 1 - .../doxyout/krb5/man/man3/krb5_storage_read.3 | 1 - .../doxyout/krb5/man/man3/krb5_storage_seek.3 | 1 - .../man/man3/krb5_storage_set_byteorder.3 | 1 - .../krb5/man/man3/krb5_storage_set_eof_code.3 | 1 - .../krb5/man/man3/krb5_storage_set_flags.3 | 1 - .../man/man3/krb5_storage_set_max_alloc.3 | 1 - .../krb5/man/man3/krb5_storage_to_data.3 | 1 - .../krb5/man/man3/krb5_storage_truncate.3 | 1 - .../krb5/man/man3/krb5_storage_write.3 | 1 - .../krb5/man/man3/krb5_store_address.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_addrs.3 | 1 - .../krb5/man/man3/krb5_store_authdata.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_creds.3 | 1 - .../krb5/man/man3/krb5_store_creds_tag.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_data.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_int16.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_int32.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_int8.3 | 1 - .../krb5/man/man3/krb5_store_keyblock.3 | 1 - .../krb5/man/man3/krb5_store_principal.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_string.3 | 1 - .../krb5/man/man3/krb5_store_stringz.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_times.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_uint16.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_uint32.3 | 1 - .../doxyout/krb5/man/man3/krb5_store_uint8.3 | 1 - .../krb5/man/man3/krb5_string_to_keytype.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_support.3 | 650 - .../doc/doxyout/krb5/man/man3/krb5_ticket.3 | 34 - .../krb5_ticket_get_authorization_data_type.3 | 1 - .../krb5/man/man3/krb5_ticket_get_client.3 | 1 - .../krb5/man/man3/krb5_ticket_get_endtime.3 | 1 - .../krb5/man/man3/krb5_ticket_get_flags.3 | 1 - .../krb5/man/man3/krb5_ticket_get_server.3 | 1 - .../doxyout/krb5/man/man3/krb5_unparse_name.3 | 1 - .../krb5/man/man3/krb5_unparse_name_fixed.3 | 1 - .../man/man3/krb5_unparse_name_fixed_flags.3 | 1 - .../man/man3/krb5_unparse_name_fixed_short.3 | 1 - .../krb5/man/man3/krb5_unparse_name_flags.3 | 1 - .../krb5/man/man3/krb5_unparse_name_short.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_v4compat.3 | 60 - .../krb5/man/man3/krb5_verify_checksum_iov.3 | 1 - .../krb5/man/man3/krb5_vset_error_string.3 | 1 - .../doc/doxyout/krb5/man/man3/krb5_vwarn.3 | 1 - kerberosV/src/doc/doxyout/krb5/manpages | 360 - .../src/doc/doxyout/ntlm/html/annotated.html | 39 - .../src/doc/doxyout/ntlm/html/doxygen.css | 473 - .../src/doc/doxyout/ntlm/html/doxygen.png | Bin 1281 -> 0 bytes .../src/doc/doxyout/ntlm/html/examples.html | 30 - .../src/doc/doxyout/ntlm/html/functions.html | 78 - .../doc/doxyout/ntlm/html/functions_vars.html | 78 - .../doc/doxyout/ntlm/html/graph_legend.dot | 22 - .../doc/doxyout/ntlm/html/graph_legend.html | 89 - .../doc/doxyout/ntlm/html/graph_legend.png | Bin 4256 -> 0 bytes .../doxyout/ntlm/html/group__ntlm__core.html | 936 - .../src/doc/doxyout/ntlm/html/index.html | 37 - .../src/doc/doxyout/ntlm/html/modules.html | 30 - .../doxyout/ntlm/html/structntlm__buf.html | 82 - .../doxyout/ntlm/html/structntlm__type1.html | 118 - .../doxyout/ntlm/html/structntlm__type2.html | 159 - .../html/structntlm__type2__coll__graph.map | 1 - .../html/structntlm__type2__coll__graph.md5 | 1 - .../html/structntlm__type2__coll__graph.png | Bin 821 -> 0 bytes .../doxyout/ntlm/html/structntlm__type3.html | 194 - .../html/structntlm__type3__coll__graph.map | 1 - .../html/structntlm__type3__coll__graph.md5 | 1 - .../html/structntlm__type3__coll__graph.png | Bin 951 -> 0 bytes kerberosV/src/doc/doxyout/ntlm/html/tab_b.gif | Bin 35 -> 0 bytes kerberosV/src/doc/doxyout/ntlm/html/tab_l.gif | Bin 706 -> 0 bytes kerberosV/src/doc/doxyout/ntlm/html/tab_r.gif | Bin 2585 -> 0 bytes kerberosV/src/doc/doxyout/ntlm/html/tabs.css | 102 - .../ntlm/html/test__ntlm_8c-example.html | 408 - .../src/doc/doxyout/ntlm/man/man3/challenge.3 | 1 - .../src/doc/doxyout/ntlm/man/man3/context.3 | 1 - .../src/doc/doxyout/ntlm/man/man3/data.3 | 1 - .../src/doc/doxyout/ntlm/man/man3/domain.3 | 1 - .../src/doc/doxyout/ntlm/man/man3/flags.3 | 1 - .../man/man3/heim_ntlm_build_ntlm1_master.3 | 1 - .../man/man3/heim_ntlm_build_ntlm2_master.3 | 1 - .../ntlm/man/man3/heim_ntlm_calculate_lm2.3 | 1 - .../ntlm/man/man3/heim_ntlm_calculate_ntlm1.3 | 1 - .../ntlm/man/man3/heim_ntlm_calculate_ntlm2.3 | 1 - .../man/man3/heim_ntlm_decode_targetinfo.3 | 1 - .../man/man3/heim_ntlm_encode_targetinfo.3 | 1 - .../ntlm/man/man3/heim_ntlm_encode_type1.3 | 1 - .../ntlm/man/man3/heim_ntlm_encode_type2.3 | 1 - .../ntlm/man/man3/heim_ntlm_encode_type3.3 | 1 - .../ntlm/man/man3/heim_ntlm_free_buf.3 | 1 - .../ntlm/man/man3/heim_ntlm_free_targetinfo.3 | 1 - .../ntlm/man/man3/heim_ntlm_free_type1.3 | 1 - .../ntlm/man/man3/heim_ntlm_free_type2.3 | 1 - .../ntlm/man/man3/heim_ntlm_free_type3.3 | 1 - .../ntlm/man/man3/heim_ntlm_keyex_unwrap.3 | 1 - .../doxyout/ntlm/man/man3/heim_ntlm_nt_key.3 | 1 - .../ntlm/man/man3/heim_ntlm_ntlmv2_key.3 | 1 - .../ntlm/man/man3/heim_ntlm_verify_ntlm2.3 | 1 - .../src/doc/doxyout/ntlm/man/man3/hostname.3 | 1 - .../src/doc/doxyout/ntlm/man/man3/length.3 | 1 - kerberosV/src/doc/doxyout/ntlm/man/man3/lm.3 | 1 - .../src/doc/doxyout/ntlm/man/man3/ntlm.3 | 1 - .../src/doc/doxyout/ntlm/man/man3/ntlm_buf.3 | 48 - .../src/doc/doxyout/ntlm/man/man3/ntlm_core.3 | 421 - .../doc/doxyout/ntlm/man/man3/ntlm_type1.3 | 68 - .../doc/doxyout/ntlm/man/man3/ntlm_type2.3 | 80 - .../doc/doxyout/ntlm/man/man3/ntlm_type3.3 | 96 - kerberosV/src/doc/doxyout/ntlm/man/man3/os.3 | 1 - .../doc/doxyout/ntlm/man/man3/sessionkey.3 | 1 - .../doc/doxyout/ntlm/man/man3/targetinfo.3 | 1 - .../doc/doxyout/ntlm/man/man3/targetname.3 | 1 - .../src/doc/doxyout/ntlm/man/man3/username.3 | 1 - kerberosV/src/doc/doxyout/ntlm/man/man3/ws.3 | 1 - kerberosV/src/doc/doxyout/ntlm/manpages | 39 - .../src/doc/doxyout/wind/html/doxygen.css | 473 - .../src/doc/doxyout/wind/html/doxygen.png | Bin 1281 -> 0 bytes .../doc/doxyout/wind/html/graph_legend.dot | 22 - .../doc/doxyout/wind/html/graph_legend.html | 87 - .../doc/doxyout/wind/html/graph_legend.png | Bin 4256 -> 0 bytes .../doc/doxyout/wind/html/group__wind.html | 680 - .../src/doc/doxyout/wind/html/index.html | 30 - .../src/doc/doxyout/wind/html/modules.html | 28 - kerberosV/src/doc/doxyout/wind/html/tab_b.gif | Bin 35 -> 0 bytes kerberosV/src/doc/doxyout/wind/html/tab_l.gif | Bin 706 -> 0 bytes kerberosV/src/doc/doxyout/wind/html/tab_r.gif | Bin 2585 -> 0 bytes kerberosV/src/doc/doxyout/wind/html/tabs.css | 102 - .../src/doc/doxyout/wind/man/man3/wind.3 | 326 - .../doc/doxyout/wind/man/man3/wind_profile.3 | 1 - .../man/man3/wind_punycode_label_toascii.3 | 1 - .../doxyout/wind/man/man3/wind_stringprep.3 | 1 - .../doc/doxyout/wind/man/man3/wind_ucs2read.3 | 1 - .../doc/doxyout/wind/man/man3/wind_ucs2utf8.3 | 1 - .../wind/man/man3/wind_ucs2utf8_length.3 | 1 - .../doxyout/wind/man/man3/wind_ucs2write.3 | 1 - .../doc/doxyout/wind/man/man3/wind_ucs4utf8.3 | 1 - .../wind/man/man3/wind_ucs4utf8_length.3 | 1 - .../doc/doxyout/wind/man/man3/wind_utf8ucs2.3 | 1 - .../wind/man/man3/wind_utf8ucs2_length.3 | 1 - .../doc/doxyout/wind/man/man3/wind_utf8ucs4.3 | 1 - .../wind/man/man3/wind_utf8ucs4_length.3 | 1 - kerberosV/src/doc/doxyout/wind/manpages | 14 - kerberosV/src/doc/doxytmpl.dxy | 256 - kerberosV/src/doc/footer.html | 4 - kerberosV/src/doc/gssapi.din | 16 - kerberosV/src/doc/hcrypto.din | 16 - kerberosV/src/doc/hdb.din | 15 - kerberosV/src/doc/header.html | 10 - kerberosV/src/doc/heimdal.css | 53 - kerberosV/src/doc/heimdal.info | 3426 - kerberosV/src/doc/heimdal.texi | 148 - kerberosV/src/doc/hx509.din | 15 - kerberosV/src/doc/hx509.info | 617 - kerberosV/src/doc/hx509.texi | 757 - kerberosV/src/doc/init-creds | 374 - kerberosV/src/doc/install.texi | 12 - kerberosV/src/doc/intro.texi | 98 - kerberosV/src/doc/kerberos4.texi | 173 - kerberosV/src/doc/krb5.din | 16 - kerberosV/src/doc/latin1.tex | 95 - kerberosV/src/doc/layman.asc | 1855 - kerberosV/src/doc/mdate-sh | 92 - kerberosV/src/doc/migration.texi | 53 - kerberosV/src/doc/misc.texi | 58 - kerberosV/src/doc/ntlm.din | 16 - kerberosV/src/doc/programming.texi | 7 - kerberosV/src/doc/setup.texi | 1656 - kerberosV/src/doc/vars.texi | 7 - kerberosV/src/doc/vars.tin | 7 - kerberosV/src/doc/whatis.texi | 161 - kerberosV/src/doc/win2k.texi | 314 - kerberosV/src/doc/wind.din | 15 - kerberosV/src/etc/Makefile.am | 5 - kerberosV/src/etc/Makefile.in | 714 - kerberosV/src/etc/NTMakefile | 35 - kerberosV/src/etc/services.append | 29 - kerberosV/src/include/Makefile.am | 107 - kerberosV/src/include/Makefile.in | 1139 - kerberosV/src/include/NTMakefile | 119 - kerberosV/src/include/bits.c | 297 - kerberosV/src/include/config.h.in | 1626 - kerberosV/src/include/crypto-headers.h | 57 - kerberosV/src/include/gssapi/Makefile.am | 7 - kerberosV/src/include/gssapi/Makefile.in | 716 - kerberosV/src/include/gssapi/NTMakefile | 34 - kerberosV/src/include/hcrypto/Makefile.am | 30 - kerberosV/src/include/hcrypto/Makefile.in | 740 - kerberosV/src/include/hcrypto/NTMakefile | 34 - kerberosV/src/include/heim_threads.h | 175 - kerberosV/src/include/kadm5/Makefile.am | 8 - kerberosV/src/include/kadm5/Makefile.in | 717 - kerberosV/src/include/kadm5/NTMakefile | 34 - kerberosV/src/include/krb5-types.cross | 61 - kerberosV/src/install-sh | 520 - kerberosV/src/kadmin/ChangeLog | 1048 - kerberosV/src/kadmin/Makefile.am | 97 - kerberosV/src/kadmin/Makefile.in | 1257 - kerberosV/src/kadmin/NTMakefile | 134 - kerberosV/src/kadmin/add-random-users.c | 190 - kerberosV/src/kadmin/add_enctype.c | 163 - kerberosV/src/kadmin/ank.c | 264 - kerberosV/src/kadmin/check.c | 235 - kerberosV/src/kadmin/cpw.c | 182 - kerberosV/src/kadmin/del.c | 55 - kerberosV/src/kadmin/del_enctype.c | 121 - kerberosV/src/kadmin/dump.c | 77 - kerberosV/src/kadmin/ext.c | 137 - kerberosV/src/kadmin/get.c | 526 - kerberosV/src/kadmin/init.c | 259 - kerberosV/src/kadmin/kadm_conn.c | 295 - kerberosV/src/kadmin/kadmin-commands.in | 430 - kerberosV/src/kadmin/kadmin-version.rc | 36 - kerberosV/src/kadmin/kadmin.8 | 347 - kerberosV/src/kadmin/kadmin.c | 286 - kerberosV/src/kadmin/kadmin.cat8 | 180 - kerberosV/src/kadmin/kadmin_locl.h | 157 - kerberosV/src/kadmin/kadmind-version.rc | 36 - kerberosV/src/kadmin/kadmind.8 | 160 - kerberosV/src/kadmin/kadmind.c | 201 - kerberosV/src/kadmin/kadmind.cat8 | 87 - kerberosV/src/kadmin/load.c | 567 - kerberosV/src/kadmin/mod.c | 267 - kerberosV/src/kadmin/pw_quality.c | 60 - kerberosV/src/kadmin/random_password.c | 161 - kerberosV/src/kadmin/rename.c | 61 - kerberosV/src/kadmin/rpc.c | 1106 - kerberosV/src/kadmin/server.c | 574 - kerberosV/src/kadmin/stash.c | 151 - kerberosV/src/kadmin/test_util.c | 90 - kerberosV/src/kadmin/util.c | 674 - kerberosV/src/kcm/Makefile.am | 45 - kerberosV/src/kcm/Makefile.in | 1001 - kerberosV/src/kcm/NTMakefile | 35 - kerberosV/src/kcm/acl.c | 201 - kerberosV/src/kcm/acquire.c | 145 - kerberosV/src/kcm/cache.c | 675 - kerberosV/src/kcm/client.c | 179 - kerberosV/src/kcm/config.c | 401 - kerberosV/src/kcm/connect.c | 84 - kerberosV/src/kcm/events.c | 439 - kerberosV/src/kcm/glue.c | 280 - kerberosV/src/kcm/headers.h | 90 - kerberosV/src/kcm/kcm-protos.h | 306 - kerberosV/src/kcm/kcm.8 | 174 - kerberosV/src/kcm/kcm.cat8 | 92 - kerberosV/src/kcm/kcm_locl.h | 188 - kerberosV/src/kcm/log.c | 85 - kerberosV/src/kcm/main.c | 121 - kerberosV/src/kcm/protocol.c | 1810 - kerberosV/src/kcm/renew.c | 124 - kerberosV/src/kcm/sessions.c | 83 - kerberosV/src/kdc/Makefile.am | 139 - kerberosV/src/kdc/Makefile.in | 1400 - kerberosV/src/kdc/NTMakefile | 161 - kerberosV/src/kdc/announce.c | 544 - kerberosV/src/kdc/config.c | 291 - kerberosV/src/kdc/connect.c | 955 - kerberosV/src/kdc/default_config.c | 287 - kerberosV/src/kdc/digest-service.c | 282 - kerberosV/src/kdc/digest.c | 1509 - kerberosV/src/kdc/headers.h | 115 - kerberosV/src/kdc/hprop-version.rc | 36 - kerberosV/src/kdc/hprop.8 | 130 - kerberosV/src/kdc/hprop.c | 474 - kerberosV/src/kdc/hprop.cat8 | 67 - kerberosV/src/kdc/hprop.h | 75 - kerberosV/src/kdc/hpropd-version.rc | 36 - kerberosV/src/kdc/hpropd.8 | 90 - kerberosV/src/kdc/hpropd.c | 281 - kerberosV/src/kdc/hpropd.cat8 | 44 - kerberosV/src/kdc/kdc-private.h | 232 - kerberosV/src/kdc/kdc-protos.h | 117 - kerberosV/src/kdc/kdc-replay.c | 212 - kerberosV/src/kdc/kdc-version.rc | 36 - kerberosV/src/kdc/kdc.8 | 230 - kerberosV/src/kdc/kdc.cat8 | 173 - kerberosV/src/kdc/kdc.h | 113 - kerberosV/src/kdc/kdc_locl.h | 84 - kerberosV/src/kdc/kerberos5.c | 1919 - kerberosV/src/kdc/krb5tgs.c | 2395 - kerberosV/src/kdc/kstash-version.rc | 36 - kerberosV/src/kdc/kstash.8 | 92 - kerberosV/src/kdc/kstash.c | 171 - kerberosV/src/kdc/kstash.cat8 | 43 - kerberosV/src/kdc/kx509.c | 468 - kerberosV/src/kdc/libkdc-exports.def | 14 - kerberosV/src/kdc/libkdc-version.rc | 36 - kerberosV/src/kdc/log.c | 97 - kerberosV/src/kdc/main.c | 173 - kerberosV/src/kdc/misc.c | 174 - kerberosV/src/kdc/mit_dump.c | 417 - kerberosV/src/kdc/pkinit.c | 2049 - kerberosV/src/kdc/process.c | 318 - kerberosV/src/kdc/rx.h | 79 - kerberosV/src/kdc/set_dbinfo.c | 113 - kerberosV/src/kdc/string2key-version.rc | 36 - kerberosV/src/kdc/string2key.8 | 85 - kerberosV/src/kdc/string2key.c | 184 - kerberosV/src/kdc/string2key.cat8 | 43 - kerberosV/src/kdc/version-script.map | 25 - kerberosV/src/kdc/windc.c | 127 - kerberosV/src/kdc/windc_plugin.h | 89 - kerberosV/src/kpasswd/Makefile.am | 32 - kerberosV/src/kpasswd/Makefile.in | 1084 - kerberosV/src/kpasswd/NTMakefile | 51 - kerberosV/src/kpasswd/kpasswd-generator.c | 214 - kerberosV/src/kpasswd/kpasswd.1 | 68 - kerberosV/src/kpasswd/kpasswd.c | 247 - kerberosV/src/kpasswd/kpasswd.cat1 | 32 - kerberosV/src/kpasswd/kpasswd_locl.h | 104 - kerberosV/src/kpasswd/kpasswdd.8 | 110 - kerberosV/src/kpasswd/kpasswdd.c | 901 - kerberosV/src/kpasswd/kpasswdd.cat8 | 59 - kerberosV/src/krb5.conf | 26 - kerberosV/src/kuser/Makefile.am | 88 - kerberosV/src/kuser/Makefile.in | 1212 - kerberosV/src/kuser/NTMakefile | 132 - kerberosV/src/kuser/copy_cred_cache.1 | 96 - kerberosV/src/kuser/copy_cred_cache.c | 163 - kerberosV/src/kuser/generate-requests.c | 152 - kerberosV/src/kuser/kcc-commands.in | 239 - kerberosV/src/kuser/kcc-version.rc | 36 - kerberosV/src/kuser/kcc.c | 165 - kerberosV/src/kuser/kdecode_ticket.c | 161 - kerberosV/src/kuser/kdestroy-version.rc | 36 - kerberosV/src/kuser/kdestroy.1 | 75 - kerberosV/src/kuser/kdestroy.c | 172 - kerberosV/src/kuser/kdestroy.cat1 | 37 - kerberosV/src/kuser/kdigest-commands.in | 280 - kerberosV/src/kuser/kdigest-version.rc | 36 - kerberosV/src/kuser/kdigest.8 | 256 - kerberosV/src/kuser/kdigest.c | 572 - kerberosV/src/kuser/kdigest.cat8 | 133 - kerberosV/src/kuser/kgetcred-version.rc | 36 - kerberosV/src/kuser/kgetcred.1 | 77 - kerberosV/src/kuser/kgetcred.c | 235 - kerberosV/src/kuser/kgetcred.cat1 | 38 - kerberosV/src/kuser/kimpersonate-version.rc | 36 - kerberosV/src/kuser/kimpersonate.8 | 107 - kerberosV/src/kuser/kimpersonate.c | 340 - kerberosV/src/kuser/kimpersonate.cat8 | 71 - kerberosV/src/kuser/kinit-version.rc | 36 - kerberosV/src/kuser/kinit.1 | 227 - kerberosV/src/kuser/kinit.c | 920 - kerberosV/src/kuser/kinit.cat1 | 130 - kerberosV/src/kuser/klist.1 | 135 - kerberosV/src/kuser/klist.c | 636 - kerberosV/src/kuser/klist.cat1 | 90 - kerberosV/src/kuser/kswitch.1 | 85 - kerberosV/src/kuser/kswitch.c | 172 - kerberosV/src/kuser/kswitch.cat1 | 32 - kerberosV/src/kuser/kuser_locl.h | 108 - kerberosV/src/kuser/kverify.c | 130 - kerberosV/src/lib/Makefile.am | 45 - kerberosV/src/lib/Makefile.in | 943 - kerberosV/src/lib/NTMakefile | 72 - kerberosV/src/lib/asn1/ChangeLog | 1665 - kerberosV/src/lib/asn1/Makefile.am | 254 - kerberosV/src/lib/asn1/Makefile.in | 1473 - kerberosV/src/lib/asn1/NTMakefile | 356 - kerberosV/src/lib/asn1/asn1-common.h | 79 - kerberosV/src/lib/asn1/asn1-template.h | 141 - .../src/lib/asn1/asn1_compile-version.rc | 36 - kerberosV/src/lib/asn1/asn1_err.et | 29 - kerberosV/src/lib/asn1/asn1_gen.c | 186 - kerberosV/src/lib/asn1/asn1_print.c | 352 - kerberosV/src/lib/asn1/asn1_queue.h | 167 - kerberosV/src/lib/asn1/asn1parse.y | 1037 - kerberosV/src/lib/asn1/canthandle.asn1 | 34 - kerberosV/src/lib/asn1/check-ber.c | 279 - kerberosV/src/lib/asn1/check-common.c | 422 - kerberosV/src/lib/asn1/check-common.h | 74 - kerberosV/src/lib/asn1/check-der.c | 1115 - kerberosV/src/lib/asn1/check-gen.c | 1311 - kerberosV/src/lib/asn1/check-template.c | 255 - kerberosV/src/lib/asn1/check-timegm.c | 81 - kerberosV/src/lib/asn1/cms.asn1 | 157 - kerberosV/src/lib/asn1/cms.opt | 2 - kerberosV/src/lib/asn1/der-private.h | 82 - kerberosV/src/lib/asn1/der-protos.h | 628 - kerberosV/src/lib/asn1/der.c | 142 - kerberosV/src/lib/asn1/der.h | 105 - kerberosV/src/lib/asn1/der_cmp.c | 116 - kerberosV/src/lib/asn1/der_copy.c | 181 - kerberosV/src/lib/asn1/der_format.c | 170 - kerberosV/src/lib/asn1/der_free.c | 144 - kerberosV/src/lib/asn1/der_get.c | 647 - kerberosV/src/lib/asn1/der_length.c | 248 - kerberosV/src/lib/asn1/der_locl.h | 63 - kerberosV/src/lib/asn1/der_put.c | 479 - kerberosV/src/lib/asn1/digest.asn1 | 179 - kerberosV/src/lib/asn1/extra.c | 141 - kerberosV/src/lib/asn1/gen.c | 1054 - kerberosV/src/lib/asn1/gen_copy.c | 251 - kerberosV/src/lib/asn1/gen_decode.c | 731 - kerberosV/src/lib/asn1/gen_encode.c | 550 - kerberosV/src/lib/asn1/gen_free.c | 191 - kerberosV/src/lib/asn1/gen_glue.c | 156 - kerberosV/src/lib/asn1/gen_length.c | 279 - kerberosV/src/lib/asn1/gen_locl.h | 102 - kerberosV/src/lib/asn1/gen_seq.c | 119 - kerberosV/src/lib/asn1/gen_template.c | 918 - kerberosV/src/lib/asn1/hash.c | 206 - kerberosV/src/lib/asn1/hash.h | 87 - kerberosV/src/lib/asn1/heim_asn1.h | 52 - kerberosV/src/lib/asn1/krb5.asn1 | 825 - kerberosV/src/lib/asn1/krb5.opt | 6 - kerberosV/src/lib/asn1/kx509.asn1 | 31 - kerberosV/src/lib/asn1/lex.h | 42 - kerberosV/src/lib/asn1/lex.l | 300 - kerberosV/src/lib/asn1/libasn1-exports.def | 1578 - kerberosV/src/lib/asn1/main.c | 207 - kerberosV/src/lib/asn1/pkcs12.asn1 | 81 - kerberosV/src/lib/asn1/pkcs8.asn1 | 30 - kerberosV/src/lib/asn1/pkcs9.asn1 | 28 - kerberosV/src/lib/asn1/pkinit.asn1 | 200 - kerberosV/src/lib/asn1/rfc2459.asn1 | 562 - kerberosV/src/lib/asn1/setchgpw2.asn1 | 193 - kerberosV/src/lib/asn1/symbol.c | 108 - kerberosV/src/lib/asn1/symbol.h | 162 - kerberosV/src/lib/asn1/template.c | 1119 - kerberosV/src/lib/asn1/test.asn1 | 138 - kerberosV/src/lib/asn1/test.gen | 14 - kerberosV/src/lib/asn1/timegm.c | 136 - kerberosV/src/lib/asn1/version-script.map | 6 - kerberosV/src/lib/com_err/ChangeLog | 235 - kerberosV/src/lib/com_err/Makefile.am | 48 - kerberosV/src/lib/com_err/Makefile.in | 1051 - kerberosV/src/lib/com_err/NTMakefile | 91 - kerberosV/src/lib/com_err/com_err.c | 171 - kerberosV/src/lib/com_err/com_err.h | 76 - kerberosV/src/lib/com_err/com_right.h | 87 - .../src/lib/com_err/compile_et-version.rc | 36 - kerberosV/src/lib/com_err/compile_et.c | 242 - kerberosV/src/lib/com_err/compile_et.h | 78 - kerberosV/src/lib/com_err/error.c | 114 - kerberosV/src/lib/com_err/lex.c | 1892 - kerberosV/src/lib/com_err/lex.h | 39 - kerberosV/src/lib/com_err/lex.l | 127 - .../src/lib/com_err/libcom_err-exports.def | 14 - .../src/lib/com_err/libcom_err-version.rc | 36 - kerberosV/src/lib/com_err/parse.y | 174 - kerberosV/src/lib/com_err/roken_rename.h | 62 - kerberosV/src/lib/com_err/version-script.map | 20 - kerberosV/src/lib/gssapi/ChangeLog | 2970 - kerberosV/src/lib/gssapi/Makefile.am | 358 - kerberosV/src/lib/gssapi/Makefile.in | 2544 - kerberosV/src/lib/gssapi/NTMakefile | 639 - kerberosV/src/lib/gssapi/gss-commands.in | 59 - kerberosV/src/lib/gssapi/gss_acquire_cred.3 | 688 - kerberosV/src/lib/gssapi/gssapi.3 | 172 - kerberosV/src/lib/gssapi/gssapi.h | 41 - kerberosV/src/lib/gssapi/gssapi/gssapi.h | 1120 - kerberosV/src/lib/gssapi/gssapi/gssapi_krb5.h | 225 - kerberosV/src/lib/gssapi/gssapi/gssapi_ntlm.h | 41 - kerberosV/src/lib/gssapi/gssapi/gssapi_oid.h | 245 - .../src/lib/gssapi/gssapi/gssapi_spnego.h | 55 - kerberosV/src/lib/gssapi/gssapi_mech.h | 594 - kerberosV/src/lib/gssapi/gsstool.c | 255 - kerberosV/src/lib/gssapi/krb5/8003.c | 245 - .../src/lib/gssapi/krb5/accept_sec_context.c | 935 - kerberosV/src/lib/gssapi/krb5/acquire_cred.c | 450 - kerberosV/src/lib/gssapi/krb5/add_cred.c | 239 - .../src/lib/gssapi/krb5/address_to_krb5addr.c | 77 - kerberosV/src/lib/gssapi/krb5/aeap.c | 100 - kerberosV/src/lib/gssapi/krb5/arcfour.c | 762 - .../src/lib/gssapi/krb5/authorize_localname.c | 66 - .../src/lib/gssapi/krb5/canonicalize_name.c | 58 - kerberosV/src/lib/gssapi/krb5/ccache_name.c | 77 - kerberosV/src/lib/gssapi/krb5/cfx.c | 1765 - kerberosV/src/lib/gssapi/krb5/cfx.h | 65 - kerberosV/src/lib/gssapi/krb5/compare_name.c | 53 - kerberosV/src/lib/gssapi/krb5/compat.c | 125 - kerberosV/src/lib/gssapi/krb5/context_time.c | 93 - kerberosV/src/lib/gssapi/krb5/copy_ccache.c | 193 - kerberosV/src/lib/gssapi/krb5/creds.c | 255 - kerberosV/src/lib/gssapi/krb5/decapsulate.c | 207 - .../src/lib/gssapi/krb5/delete_sec_context.c | 84 - kerberosV/src/lib/gssapi/krb5/display_name.c | 72 - .../src/lib/gssapi/krb5/display_status.c | 199 - .../src/lib/gssapi/krb5/duplicate_name.c | 58 - kerberosV/src/lib/gssapi/krb5/encapsulate.c | 153 - kerberosV/src/lib/gssapi/krb5/export_name.c | 92 - .../src/lib/gssapi/krb5/export_sec_context.c | 238 - kerberosV/src/lib/gssapi/krb5/external.c | 342 - kerberosV/src/lib/gssapi/krb5/get_mic.c | 329 - kerberosV/src/lib/gssapi/krb5/gkrb5_err.et | 31 - .../src/lib/gssapi/krb5/gsskrb5-private.h | 796 - kerberosV/src/lib/gssapi/krb5/gsskrb5_locl.h | 140 - kerberosV/src/lib/gssapi/krb5/import_name.c | 255 - .../src/lib/gssapi/krb5/import_sec_context.c | 229 - .../src/lib/gssapi/krb5/indicate_mechs.c | 55 - kerberosV/src/lib/gssapi/krb5/init.c | 81 - .../src/lib/gssapi/krb5/init_sec_context.c | 1015 - .../src/lib/gssapi/krb5/inquire_context.c | 110 - kerberosV/src/lib/gssapi/krb5/inquire_cred.c | 180 - .../lib/gssapi/krb5/inquire_cred_by_mech.c | 74 - .../src/lib/gssapi/krb5/inquire_cred_by_oid.c | 81 - .../lib/gssapi/krb5/inquire_mechs_for_name.c | 55 - .../lib/gssapi/krb5/inquire_names_for_mech.c | 77 - .../gssapi/krb5/inquire_sec_context_by_oid.c | 605 - kerberosV/src/lib/gssapi/krb5/pname_to_uid.c | 85 - kerberosV/src/lib/gssapi/krb5/prf.c | 148 - .../lib/gssapi/krb5/process_context_token.c | 66 - .../src/lib/gssapi/krb5/release_buffer.c | 46 - kerberosV/src/lib/gssapi/krb5/release_cred.c | 76 - kerberosV/src/lib/gssapi/krb5/release_name.c | 53 - kerberosV/src/lib/gssapi/krb5/sequence.c | 292 - .../src/lib/gssapi/krb5/set_cred_option.c | 248 - .../lib/gssapi/krb5/set_sec_context_option.c | 260 - kerberosV/src/lib/gssapi/krb5/store_cred.c | 116 - kerberosV/src/lib/gssapi/krb5/test_cfx.c | 173 - kerberosV/src/lib/gssapi/krb5/ticket_flags.c | 58 - kerberosV/src/lib/gssapi/krb5/unwrap.c | 448 - kerberosV/src/lib/gssapi/krb5/verify_mic.c | 362 - kerberosV/src/lib/gssapi/krb5/wrap.c | 590 - .../src/lib/gssapi/libgssapi-exports.def | 189 - kerberosV/src/lib/gssapi/libgssapi-version.rc | 36 - kerberosV/src/lib/gssapi/mech/compat.h | 94 - kerberosV/src/lib/gssapi/mech/context.c | 163 - kerberosV/src/lib/gssapi/mech/context.h | 41 - kerberosV/src/lib/gssapi/mech/cred.h | 57 - kerberosV/src/lib/gssapi/mech/doxygen.c | 132 - .../lib/gssapi/mech/gss_accept_sec_context.c | 308 - .../src/lib/gssapi/mech/gss_acquire_cred.c | 168 - .../lib/gssapi/mech/gss_acquire_cred_ext.c | 193 - .../mech/gss_acquire_cred_with_password.c | 118 - kerberosV/src/lib/gssapi/mech/gss_add_cred.c | 186 - .../gssapi/mech/gss_add_cred_with_password.c | 150 - .../lib/gssapi/mech/gss_add_oid_set_member.c | 84 - kerberosV/src/lib/gssapi/mech/gss_aeap.c | 216 - .../lib/gssapi/mech/gss_authorize_localname.c | 187 - .../src/lib/gssapi/mech/gss_buffer_set.c | 124 - .../lib/gssapi/mech/gss_canonicalize_name.c | 111 - .../src/lib/gssapi/mech/gss_compare_name.c | 76 - .../src/lib/gssapi/mech/gss_context_time.c | 40 - .../gssapi/mech/gss_create_empty_oid_set.c | 51 - kerberosV/src/lib/gssapi/mech/gss_cred.c | 224 - .../lib/gssapi/mech/gss_decapsulate_token.c | 72 - .../gssapi/mech/gss_delete_name_attribute.c | 65 - .../lib/gssapi/mech/gss_delete_sec_context.c | 57 - .../src/lib/gssapi/mech/gss_display_name.c | 82 - .../lib/gssapi/mech/gss_display_name_ext.c | 68 - .../src/lib/gssapi/mech/gss_display_status.c | 211 - .../src/lib/gssapi/mech/gss_duplicate_name.c | 95 - .../src/lib/gssapi/mech/gss_duplicate_oid.c | 68 - .../lib/gssapi/mech/gss_encapsulate_token.c | 66 - .../src/lib/gssapi/mech/gss_export_name.c | 54 - .../gssapi/mech/gss_export_name_composite.c | 66 - .../lib/gssapi/mech/gss_export_sec_context.c | 77 - kerberosV/src/lib/gssapi/mech/gss_get_mic.c | 51 - .../lib/gssapi/mech/gss_get_name_attribute.c | 81 - .../src/lib/gssapi/mech/gss_import_name.c | 291 - .../lib/gssapi/mech/gss_import_sec_context.c | 82 - .../src/lib/gssapi/mech/gss_indicate_mechs.c | 64 - .../lib/gssapi/mech/gss_init_sec_context.c | 212 - .../src/lib/gssapi/mech/gss_inquire_context.c | 105 - .../src/lib/gssapi/mech/gss_inquire_cred.c | 195 - .../gssapi/mech/gss_inquire_cred_by_mech.c | 92 - .../lib/gssapi/mech/gss_inquire_cred_by_oid.c | 86 - .../gssapi/mech/gss_inquire_mechs_for_name.c | 76 - .../src/lib/gssapi/mech/gss_inquire_name.c | 79 - .../gssapi/mech/gss_inquire_names_for_mech.c | 73 - .../mech/gss_inquire_sec_context_by_oid.c | 70 - kerberosV/src/lib/gssapi/mech/gss_krb5.c | 941 - .../src/lib/gssapi/mech/gss_mech_switch.c | 440 - kerberosV/src/lib/gssapi/mech/gss_mo.c | 635 - kerberosV/src/lib/gssapi/mech/gss_names.c | 110 - kerberosV/src/lib/gssapi/mech/gss_oid.c | 266 - kerberosV/src/lib/gssapi/mech/gss_oid_equal.c | 58 - .../src/lib/gssapi/mech/gss_oid_to_str.c | 98 - .../src/lib/gssapi/mech/gss_pname_to_uid.c | 167 - .../gssapi/mech/gss_process_context_token.c | 41 - .../src/lib/gssapi/mech/gss_pseudo_random.c | 70 - .../src/lib/gssapi/mech/gss_release_buffer.c | 42 - .../src/lib/gssapi/mech/gss_release_cred.c | 73 - .../src/lib/gssapi/mech/gss_release_name.c | 74 - .../src/lib/gssapi/mech/gss_release_oid.c | 58 - .../src/lib/gssapi/mech/gss_release_oid_set.c | 44 - kerberosV/src/lib/gssapi/mech/gss_seal.c | 45 - .../src/lib/gssapi/mech/gss_set_cred_option.c | 118 - .../lib/gssapi/mech/gss_set_name_attribute.c | 69 - .../gssapi/mech/gss_set_sec_context_option.c | 70 - kerberosV/src/lib/gssapi/mech/gss_sign.c | 41 - .../src/lib/gssapi/mech/gss_store_cred.c | 94 - .../lib/gssapi/mech/gss_test_oid_set_member.c | 46 - kerberosV/src/lib/gssapi/mech/gss_unseal.c | 43 - kerberosV/src/lib/gssapi/mech/gss_unwrap.c | 45 - kerberosV/src/lib/gssapi/mech/gss_utils.c | 78 - kerberosV/src/lib/gssapi/mech/gss_verify.c | 42 - .../src/lib/gssapi/mech/gss_verify_mic.c | 52 - kerberosV/src/lib/gssapi/mech/gss_wrap.c | 71 - .../src/lib/gssapi/mech/gss_wrap_size_limit.c | 52 - kerberosV/src/lib/gssapi/mech/gssapi.asn1 | 12 - kerberosV/src/lib/gssapi/mech/mech.5 | 94 - kerberosV/src/lib/gssapi/mech/mech.cat5 | 61 - kerberosV/src/lib/gssapi/mech/mech_locl.h | 81 - kerberosV/src/lib/gssapi/mech/mech_switch.h | 43 - kerberosV/src/lib/gssapi/mech/mechqueue.h | 97 - kerberosV/src/lib/gssapi/mech/name.h | 48 - kerberosV/src/lib/gssapi/mech/utils.h | 33 - .../src/lib/gssapi/ntlm/accept_sec_context.c | 267 - kerberosV/src/lib/gssapi/ntlm/acquire_cred.c | 89 - kerberosV/src/lib/gssapi/ntlm/add_cred.c | 60 - .../src/lib/gssapi/ntlm/canonicalize_name.c | 45 - kerberosV/src/lib/gssapi/ntlm/compare_name.c | 45 - kerberosV/src/lib/gssapi/ntlm/context_time.c | 45 - kerberosV/src/lib/gssapi/ntlm/creds.c | 160 - kerberosV/src/lib/gssapi/ntlm/crypto.c | 590 - .../src/lib/gssapi/ntlm/delete_sec_context.c | 63 - kerberosV/src/lib/gssapi/ntlm/display_name.c | 71 - .../src/lib/gssapi/ntlm/display_status.c | 54 - .../src/lib/gssapi/ntlm/duplicate_name.c | 48 - kerberosV/src/lib/gssapi/ntlm/export_name.c | 50 - .../src/lib/gssapi/ntlm/export_sec_context.c | 50 - kerberosV/src/lib/gssapi/ntlm/external.c | 129 - kerberosV/src/lib/gssapi/ntlm/import_name.c | 112 - .../src/lib/gssapi/ntlm/import_sec_context.c | 48 - .../src/lib/gssapi/ntlm/indicate_mechs.c | 46 - .../src/lib/gssapi/ntlm/init_sec_context.c | 501 - .../src/lib/gssapi/ntlm/inquire_context.c | 68 - .../lib/gssapi/ntlm/inquire_cred_by_mech.c | 58 - .../lib/gssapi/ntlm/inquire_mechs_for_name.c | 48 - .../lib/gssapi/ntlm/inquire_names_for_mech.c | 51 - .../gssapi/ntlm/inquire_sec_context_by_oid.c | 90 - kerberosV/src/lib/gssapi/ntlm/iter_cred.c | 99 - kerberosV/src/lib/gssapi/ntlm/kdc.c | 438 - kerberosV/src/lib/gssapi/ntlm/ntlm-private.h | 282 - kerberosV/src/lib/gssapi/ntlm/ntlm.h | 145 - .../lib/gssapi/ntlm/process_context_token.c | 44 - kerberosV/src/lib/gssapi/ntlm/release_cred.c | 63 - kerberosV/src/lib/gssapi/ntlm/release_name.c | 52 - .../lib/gssapi/spnego/accept_sec_context.c | 917 - kerberosV/src/lib/gssapi/spnego/compat.c | 317 - .../src/lib/gssapi/spnego/context_stubs.c | 812 - kerberosV/src/lib/gssapi/spnego/cred_stubs.c | 271 - kerberosV/src/lib/gssapi/spnego/external.c | 143 - .../src/lib/gssapi/spnego/init_sec_context.c | 660 - .../src/lib/gssapi/spnego/spnego-private.h | 323 - kerberosV/src/lib/gssapi/spnego/spnego.asn1 | 63 - kerberosV/src/lib/gssapi/spnego/spnego.opt | 1 - kerberosV/src/lib/gssapi/spnego/spnego_locl.h | 111 - kerberosV/src/lib/gssapi/test_acquire_cred.c | 329 - kerberosV/src/lib/gssapi/test_common.c | 73 - kerberosV/src/lib/gssapi/test_common.h | 36 - kerberosV/src/lib/gssapi/test_context.c | 970 - kerberosV/src/lib/gssapi/test_cred.c | 230 - kerberosV/src/lib/gssapi/test_kcred.c | 186 - kerberosV/src/lib/gssapi/test_names.c | 238 - kerberosV/src/lib/gssapi/test_ntlm.c | 337 - kerberosV/src/lib/gssapi/test_oid.c | 71 - kerberosV/src/lib/gssapi/version-script.map | 196 - kerberosV/src/lib/hcrypto/ChangeLog | 1227 - kerberosV/src/lib/hcrypto/DESperate.txt | 108 - kerberosV/src/lib/hcrypto/Makefile.am | 337 - kerberosV/src/lib/hcrypto/Makefile.in | 2858 - kerberosV/src/lib/hcrypto/NTMakefile | 248 - kerberosV/src/lib/hcrypto/aes.c | 144 - kerberosV/src/lib/hcrypto/aes.h | 83 - kerberosV/src/lib/hcrypto/bn.c | 531 - kerberosV/src/lib/hcrypto/bn.h | 132 - kerberosV/src/lib/hcrypto/camellia-ntt.c | 1469 - kerberosV/src/lib/hcrypto/camellia-ntt.h | 65 - kerberosV/src/lib/hcrypto/camellia.c | 116 - kerberosV/src/lib/hcrypto/camellia.h | 72 - kerberosV/src/lib/hcrypto/common.c | 69 - kerberosV/src/lib/hcrypto/common.h | 45 - kerberosV/src/lib/hcrypto/des-tables.h | 196 - kerberosV/src/lib/hcrypto/des.c | 1184 - kerberosV/src/lib/hcrypto/des.h | 146 - kerberosV/src/lib/hcrypto/destest.c | 623 - kerberosV/src/lib/hcrypto/dh-ltm.c | 240 - kerberosV/src/lib/hcrypto/dh.c | 554 - kerberosV/src/lib/hcrypto/dh.h | 146 - kerberosV/src/lib/hcrypto/dllmain.c | 49 - kerberosV/src/lib/hcrypto/doxygen.c | 102 - kerberosV/src/lib/hcrypto/dsa.c | 121 - kerberosV/src/lib/hcrypto/dsa.h | 140 - kerberosV/src/lib/hcrypto/ec.h | 93 - kerberosV/src/lib/hcrypto/ecdh.h | 47 - kerberosV/src/lib/hcrypto/ecdsa.h | 52 - kerberosV/src/lib/hcrypto/engine.c | 395 - kerberosV/src/lib/hcrypto/engine.h | 118 - kerberosV/src/lib/hcrypto/evp-cc.c | 856 - kerberosV/src/lib/hcrypto/evp-cc.h | 98 - kerberosV/src/lib/hcrypto/evp-hcrypto.c | 857 - kerberosV/src/lib/hcrypto/evp-hcrypto.h | 103 - kerberosV/src/lib/hcrypto/evp.c | 1495 - kerberosV/src/lib/hcrypto/evp.h | 329 - .../src/lib/hcrypto/example_evp_cipher.c | 146 - kerberosV/src/lib/hcrypto/gen-des.pl | 217 - kerberosV/src/lib/hcrypto/hash.h | 75 - kerberosV/src/lib/hcrypto/hmac.c | 162 - kerberosV/src/lib/hcrypto/hmac.h | 82 - .../src/lib/hcrypto/libhcrypto-exports.def | 293 - .../src/lib/hcrypto/libtommath/bn_error.c | 47 - .../hcrypto/libtommath/bn_fast_mp_invmod.c | 148 - .../libtommath/bn_fast_mp_montgomery_reduce.c | 172 - .../libtommath/bn_fast_s_mp_mul_digs.c | 107 - .../libtommath/bn_fast_s_mp_mul_high_digs.c | 98 - .../lib/hcrypto/libtommath/bn_fast_s_mp_sqr.c | 114 - .../src/lib/hcrypto/libtommath/bn_mp_2expt.c | 48 - .../src/lib/hcrypto/libtommath/bn_mp_abs.c | 43 - .../src/lib/hcrypto/libtommath/bn_mp_add.c | 53 - .../src/lib/hcrypto/libtommath/bn_mp_add_d.c | 112 - .../src/lib/hcrypto/libtommath/bn_mp_addmod.c | 41 - .../src/lib/hcrypto/libtommath/bn_mp_and.c | 57 - .../src/lib/hcrypto/libtommath/bn_mp_clamp.c | 44 - .../src/lib/hcrypto/libtommath/bn_mp_clear.c | 44 - .../hcrypto/libtommath/bn_mp_clear_multi.c | 34 - .../src/lib/hcrypto/libtommath/bn_mp_cmp.c | 43 - .../src/lib/hcrypto/libtommath/bn_mp_cmp_d.c | 44 - .../lib/hcrypto/libtommath/bn_mp_cmp_mag.c | 55 - .../lib/hcrypto/libtommath/bn_mp_cnt_lsb.c | 53 - .../src/lib/hcrypto/libtommath/bn_mp_copy.c | 68 - .../lib/hcrypto/libtommath/bn_mp_count_bits.c | 45 - .../src/lib/hcrypto/libtommath/bn_mp_div.c | 292 - .../src/lib/hcrypto/libtommath/bn_mp_div_2.c | 68 - .../src/lib/hcrypto/libtommath/bn_mp_div_2d.c | 97 - .../src/lib/hcrypto/libtommath/bn_mp_div_3.c | 79 - .../src/lib/hcrypto/libtommath/bn_mp_div_d.c | 115 - .../hcrypto/libtommath/bn_mp_dr_is_modulus.c | 43 - .../lib/hcrypto/libtommath/bn_mp_dr_reduce.c | 94 - .../lib/hcrypto/libtommath/bn_mp_dr_setup.c | 32 - .../src/lib/hcrypto/libtommath/bn_mp_exch.c | 34 - .../src/lib/hcrypto/libtommath/bn_mp_expt_d.c | 57 - .../lib/hcrypto/libtommath/bn_mp_exptmod.c | 112 - .../hcrypto/libtommath/bn_mp_exptmod_fast.c | 321 - .../lib/hcrypto/libtommath/bn_mp_exteuclid.c | 82 - .../lib/hcrypto/libtommath/bn_mp_find_prime.c | 26 - .../src/lib/hcrypto/libtommath/bn_mp_fread.c | 67 - .../src/lib/hcrypto/libtommath/bn_mp_fwrite.c | 52 - .../src/lib/hcrypto/libtommath/bn_mp_gcd.c | 105 - .../lib/hcrypto/libtommath/bn_mp_get_int.c | 45 - .../src/lib/hcrypto/libtommath/bn_mp_grow.c | 57 - .../src/lib/hcrypto/libtommath/bn_mp_init.c | 46 - .../lib/hcrypto/libtommath/bn_mp_init_copy.c | 32 - .../lib/hcrypto/libtommath/bn_mp_init_multi.c | 59 - .../lib/hcrypto/libtommath/bn_mp_init_set.c | 32 - .../hcrypto/libtommath/bn_mp_init_set_int.c | 31 - .../lib/hcrypto/libtommath/bn_mp_init_size.c | 48 - .../src/lib/hcrypto/libtommath/bn_mp_invmod.c | 43 - .../hcrypto/libtommath/bn_mp_invmod_slow.c | 175 - .../lib/hcrypto/libtommath/bn_mp_is_square.c | 109 - .../lib/hcrypto/libtommath/bn_mp_isprime.c | 75 - .../src/lib/hcrypto/libtommath/bn_mp_jacobi.c | 105 - .../hcrypto/libtommath/bn_mp_karatsuba_mul.c | 167 - .../hcrypto/libtommath/bn_mp_karatsuba_sqr.c | 121 - .../src/lib/hcrypto/libtommath/bn_mp_lcm.c | 60 - .../src/lib/hcrypto/libtommath/bn_mp_lshd.c | 67 - .../src/lib/hcrypto/libtommath/bn_mp_mod.c | 48 - .../src/lib/hcrypto/libtommath/bn_mp_mod_2d.c | 55 - .../src/lib/hcrypto/libtommath/bn_mp_mod_d.c | 27 - .../bn_mp_montgomery_calc_normalization.c | 59 - .../libtommath/bn_mp_montgomery_reduce.c | 118 - .../libtommath/bn_mp_montgomery_setup.c | 59 - .../src/lib/hcrypto/libtommath/bn_mp_mul.c | 66 - .../src/lib/hcrypto/libtommath/bn_mp_mul_2.c | 82 - .../src/lib/hcrypto/libtommath/bn_mp_mul_2d.c | 85 - .../src/lib/hcrypto/libtommath/bn_mp_mul_d.c | 79 - .../src/lib/hcrypto/libtommath/bn_mp_mulmod.c | 40 - .../src/lib/hcrypto/libtommath/bn_mp_n_root.c | 132 - .../src/lib/hcrypto/libtommath/bn_mp_neg.c | 40 - .../src/lib/hcrypto/libtommath/bn_mp_or.c | 50 - .../hcrypto/libtommath/bn_mp_prime_fermat.c | 62 - .../libtommath/bn_mp_prime_is_divisible.c | 50 - .../hcrypto/libtommath/bn_mp_prime_is_prime.c | 83 - .../libtommath/bn_mp_prime_miller_rabin.c | 103 - .../libtommath/bn_mp_prime_next_prime.c | 170 - .../bn_mp_prime_rabin_miller_trials.c | 52 - .../libtommath/bn_mp_prime_random_ex.c | 125 - .../lib/hcrypto/libtommath/bn_mp_radix_size.c | 78 - .../lib/hcrypto/libtommath/bn_mp_radix_smap.c | 24 - .../src/lib/hcrypto/libtommath/bn_mp_rand.c | 55 - .../lib/hcrypto/libtommath/bn_mp_read_radix.c | 85 - .../libtommath/bn_mp_read_signed_bin.c | 41 - .../libtommath/bn_mp_read_unsigned_bin.c | 55 - .../src/lib/hcrypto/libtommath/bn_mp_reduce.c | 100 - .../lib/hcrypto/libtommath/bn_mp_reduce_2k.c | 61 - .../hcrypto/libtommath/bn_mp_reduce_2k_l.c | 62 - .../libtommath/bn_mp_reduce_2k_setup.c | 47 - .../libtommath/bn_mp_reduce_2k_setup_l.c | 44 - .../hcrypto/libtommath/bn_mp_reduce_is_2k.c | 52 - .../hcrypto/libtommath/bn_mp_reduce_is_2k_l.c | 44 - .../hcrypto/libtommath/bn_mp_reduce_setup.c | 34 - .../src/lib/hcrypto/libtommath/bn_mp_rshd.c | 72 - .../src/lib/hcrypto/libtommath/bn_mp_set.c | 29 - .../lib/hcrypto/libtommath/bn_mp_set_int.c | 48 - .../src/lib/hcrypto/libtommath/bn_mp_shrink.c | 35 - .../libtommath/bn_mp_signed_bin_size.c | 27 - .../src/lib/hcrypto/libtommath/bn_mp_sqr.c | 58 - .../src/lib/hcrypto/libtommath/bn_mp_sqrmod.c | 41 - .../src/lib/hcrypto/libtommath/bn_mp_sqrt.c | 81 - .../src/lib/hcrypto/libtommath/bn_mp_sub.c | 59 - .../src/lib/hcrypto/libtommath/bn_mp_sub_d.c | 93 - .../src/lib/hcrypto/libtommath/bn_mp_submod.c | 42 - .../hcrypto/libtommath/bn_mp_to_signed_bin.c | 33 - .../libtommath/bn_mp_to_signed_bin_n.c | 31 - .../libtommath/bn_mp_to_unsigned_bin.c | 48 - .../libtommath/bn_mp_to_unsigned_bin_n.c | 31 - .../lib/hcrypto/libtommath/bn_mp_toom_mul.c | 284 - .../lib/hcrypto/libtommath/bn_mp_toom_sqr.c | 226 - .../lib/hcrypto/libtommath/bn_mp_toradix.c | 75 - .../lib/hcrypto/libtommath/bn_mp_toradix_n.c | 88 - .../libtommath/bn_mp_unsigned_bin_size.c | 28 - .../src/lib/hcrypto/libtommath/bn_mp_xor.c | 51 - .../src/lib/hcrypto/libtommath/bn_mp_zero.c | 36 - .../lib/hcrypto/libtommath/bn_mp_zero_multi.c | 35 - .../src/lib/hcrypto/libtommath/bn_prime_tab.c | 61 - .../src/lib/hcrypto/libtommath/bn_reverse.c | 39 - .../src/lib/hcrypto/libtommath/bn_s_mp_add.c | 109 - .../lib/hcrypto/libtommath/bn_s_mp_exptmod.c | 252 - .../lib/hcrypto/libtommath/bn_s_mp_mul_digs.c | 90 - .../libtommath/bn_s_mp_mul_high_digs.c | 81 - .../src/lib/hcrypto/libtommath/bn_s_mp_sqr.c | 84 - .../src/lib/hcrypto/libtommath/bn_s_mp_sub.c | 89 - kerberosV/src/lib/hcrypto/libtommath/bncore.c | 36 - .../src/lib/hcrypto/libtommath/tommath.h | 592 - .../lib/hcrypto/libtommath/tommath_class.h | 1000 - .../hcrypto/libtommath/tommath_superclass.h | 76 - kerberosV/src/lib/hcrypto/md2.c | 134 - kerberosV/src/lib/hcrypto/md2.h | 63 - kerberosV/src/lib/hcrypto/md4.c | 246 - kerberosV/src/lib/hcrypto/md4.h | 62 - kerberosV/src/lib/hcrypto/md5.c | 270 - kerberosV/src/lib/hcrypto/md5.h | 62 - kerberosV/src/lib/hcrypto/md5crypt_test.c | 77 - kerberosV/src/lib/hcrypto/mdtest.c | 348 - kerberosV/src/lib/hcrypto/passwd_dialog.aps | Bin 30428 -> 0 bytes kerberosV/src/lib/hcrypto/passwd_dialog.clw | 34 - kerberosV/src/lib/hcrypto/passwd_dialog.rc | 143 - kerberosV/src/lib/hcrypto/passwd_dialog.res | Bin 320 -> 0 bytes kerberosV/src/lib/hcrypto/passwd_dlg.c | 89 - kerberosV/src/lib/hcrypto/passwd_dlg.h | 47 - kerberosV/src/lib/hcrypto/pkcs12.c | 162 - kerberosV/src/lib/hcrypto/pkcs12.h | 57 - kerberosV/src/lib/hcrypto/pkcs5.c | 128 - kerberosV/src/lib/hcrypto/rand-fortuna.c | 655 - kerberosV/src/lib/hcrypto/rand-timer.c | 202 - kerberosV/src/lib/hcrypto/rand-unix.c | 165 - kerberosV/src/lib/hcrypto/rand.h | 103 - kerberosV/src/lib/hcrypto/randi.h | 49 - kerberosV/src/lib/hcrypto/rc2.c | 242 - kerberosV/src/lib/hcrypto/rc2.h | 71 - kerberosV/src/lib/hcrypto/rc2test.c | 169 - kerberosV/src/lib/hcrypto/rc4.c | 78 - kerberosV/src/lib/hcrypto/rc4.h | 46 - kerberosV/src/lib/hcrypto/rctest.c | 163 - kerberosV/src/lib/hcrypto/resource.h | 18 - kerberosV/src/lib/hcrypto/rijndael-alg-fst.c | 1224 - kerberosV/src/lib/hcrypto/rijndael-alg-fst.h | 46 - kerberosV/src/lib/hcrypto/rnd_keys.c | 139 - kerberosV/src/lib/hcrypto/rsa-gmp.c | 588 - kerberosV/src/lib/hcrypto/rsa-ltm.c | 632 - kerberosV/src/lib/hcrypto/rsa.c | 706 - kerberosV/src/lib/hcrypto/rsa.h | 181 - kerberosV/src/lib/hcrypto/rsakey.der | Bin 609 -> 0 bytes kerberosV/src/lib/hcrypto/rsakey2048.der | Bin 1192 -> 0 bytes kerberosV/src/lib/hcrypto/rsakey4096.der | Bin 2349 -> 0 bytes kerberosV/src/lib/hcrypto/sha.c | 296 - kerberosV/src/lib/hcrypto/sha.h | 115 - kerberosV/src/lib/hcrypto/sha256.c | 229 - kerberosV/src/lib/hcrypto/sha512.c | 294 - kerberosV/src/lib/hcrypto/test_bn.c | 397 - kerberosV/src/lib/hcrypto/test_cipher.c | 367 - kerberosV/src/lib/hcrypto/test_crypto.in | 120 - kerberosV/src/lib/hcrypto/test_dh.c | 476 - kerberosV/src/lib/hcrypto/test_engine_dso.c | 332 - kerberosV/src/lib/hcrypto/test_hmac.c | 76 - kerberosV/src/lib/hcrypto/test_pkcs12.c | 143 - kerberosV/src/lib/hcrypto/test_pkcs5.c | 152 - kerberosV/src/lib/hcrypto/test_rand.c | 189 - kerberosV/src/lib/hcrypto/test_rsa.c | 398 - kerberosV/src/lib/hcrypto/ui.c | 217 - kerberosV/src/lib/hcrypto/ui.h | 45 - kerberosV/src/lib/hcrypto/validate.c | 307 - kerberosV/src/lib/hcrypto/version-script.map | 299 - kerberosV/src/lib/hdb/Makefile.am | 144 - kerberosV/src/lib/hdb/Makefile.in | 1152 - kerberosV/src/lib/hdb/NTMakefile | 184 - kerberosV/src/lib/hdb/common.c | 347 - kerberosV/src/lib/hdb/data-mkey.mit.des3.be | Bin 46 -> 0 bytes kerberosV/src/lib/hdb/data-mkey.mit.des3.le | Bin 30 -> 0 bytes kerberosV/src/lib/hdb/db.c | 336 - kerberosV/src/lib/hdb/db3.c | 365 - kerberosV/src/lib/hdb/dbinfo.c | 266 - kerberosV/src/lib/hdb/ext.c | 435 - kerberosV/src/lib/hdb/hdb-keytab.c | 231 - kerberosV/src/lib/hdb/hdb-ldap.c | 1946 - kerberosV/src/lib/hdb/hdb-mitdb.c | 818 - kerberosV/src/lib/hdb/hdb-private.h | 61 - kerberosV/src/lib/hdb/hdb-protos.h | 418 - kerberosV/src/lib/hdb/hdb-sqlite.c | 879 - kerberosV/src/lib/hdb/hdb.asn1 | 139 - kerberosV/src/lib/hdb/hdb.c | 489 - kerberosV/src/lib/hdb/hdb.h | 283 - kerberosV/src/lib/hdb/hdb.schema | 139 - kerberosV/src/lib/hdb/hdb_err.et | 30 - kerberosV/src/lib/hdb/hdb_locl.h | 70 - kerberosV/src/lib/hdb/keys.c | 396 - kerberosV/src/lib/hdb/keytab.c | 424 - kerberosV/src/lib/hdb/libhdb-exports.def | 100 - kerberosV/src/lib/hdb/libhdb-version.rc | 36 - kerberosV/src/lib/hdb/mkey.c | 606 - kerberosV/src/lib/hdb/ndbm.c | 388 - kerberosV/src/lib/hdb/print.c | 293 - kerberosV/src/lib/hdb/test_dbinfo.c | 95 - kerberosV/src/lib/hdb/test_hdbkeys.c | 120 - kerberosV/src/lib/hdb/test_mkey.c | 55 - kerberosV/src/lib/hdb/version-script.map | 107 - kerberosV/src/lib/heimdal/NTMakefile | 93 - kerberosV/src/lib/heimdal/dllmain.c | 40 - kerberosV/src/lib/heimdal/heimdal-version.rc | 36 - kerberosV/src/lib/hx509/ChangeLog | 2749 - kerberosV/src/lib/hx509/Makefile.am | 436 - kerberosV/src/lib/hx509/Makefile.in | 2027 - kerberosV/src/lib/hx509/NTMakefile | 215 - kerberosV/src/lib/hx509/TODO | 61 - kerberosV/src/lib/hx509/ca.c | 1593 - kerberosV/src/lib/hx509/cert.c | 3612 - kerberosV/src/lib/hx509/char_map.h | 45 - kerberosV/src/lib/hx509/cms.c | 1645 - kerberosV/src/lib/hx509/collector.c | 330 - kerberosV/src/lib/hx509/crmf.asn1 | 113 - kerberosV/src/lib/hx509/crypto.c | 3207 - .../src/lib/hx509/data/bleichenbacher-bad.pem | 12 - .../lib/hx509/data/bleichenbacher-good.pem | 12 - .../data/bleichenbacher-sf-pad-correct.pem | 16 - kerberosV/src/lib/hx509/data/ca.crt | 15 - kerberosV/src/lib/hx509/data/ca.key | 16 - kerberosV/src/lib/hx509/data/crl1.crl | 8 - kerberosV/src/lib/hx509/data/crl1.der | Bin 264 -> 0 bytes kerberosV/src/lib/hx509/data/gen-req.sh | 353 - kerberosV/src/lib/hx509/data/j.pem | 26 - kerberosV/src/lib/hx509/data/kdc.crt | 59 - kerberosV/src/lib/hx509/data/kdc.key | 16 - kerberosV/src/lib/hx509/data/key.der | Bin 609 -> 0 bytes kerberosV/src/lib/hx509/data/key2.der | Bin 610 -> 0 bytes kerberosV/src/lib/hx509/data/n0ll.pem | 47 - kerberosV/src/lib/hx509/data/nist-data | 91 - kerberosV/src/lib/hx509/data/nist-data2 | 291 - .../src/lib/hx509/data/no-proxy-test.crt | 13 - .../src/lib/hx509/data/no-proxy-test.key | 16 - kerberosV/src/lib/hx509/data/ocsp-req1.der | Bin 105 -> 0 bytes kerberosV/src/lib/hx509/data/ocsp-req2.der | Bin 105 -> 0 bytes kerberosV/src/lib/hx509/data/ocsp-resp1-2.der | Bin 999 -> 0 bytes kerberosV/src/lib/hx509/data/ocsp-resp1-3.der | Bin 363 -> 0 bytes .../src/lib/hx509/data/ocsp-resp1-ca.der | Bin 999 -> 0 bytes .../src/lib/hx509/data/ocsp-resp1-keyhash.der | Bin 900 -> 0 bytes .../hx509/data/ocsp-resp1-ocsp-no-cert.der | Bin 363 -> 0 bytes .../src/lib/hx509/data/ocsp-resp1-ocsp.der | Bin 918 -> 0 bytes kerberosV/src/lib/hx509/data/ocsp-resp1.der | Bin 918 -> 0 bytes kerberosV/src/lib/hx509/data/ocsp-resp2.der | Bin 935 -> 0 bytes .../src/lib/hx509/data/ocsp-responder.crt | 56 - .../src/lib/hx509/data/ocsp-responder.key | 16 - kerberosV/src/lib/hx509/data/openssl.cnf | 190 - kerberosV/src/lib/hx509/data/pkinit-ec.crt | 51 - kerberosV/src/lib/hx509/data/pkinit-ec.key | 5 - .../src/lib/hx509/data/pkinit-proxy-chain.crt | 70 - kerberosV/src/lib/hx509/data/pkinit-proxy.crt | 14 - kerberosV/src/lib/hx509/data/pkinit-proxy.key | 16 - kerberosV/src/lib/hx509/data/pkinit-pw.key | 18 - kerberosV/src/lib/hx509/data/pkinit.crt | 56 - kerberosV/src/lib/hx509/data/pkinit.key | 16 - .../src/lib/hx509/data/proxy-level-test.crt | 15 - .../src/lib/hx509/data/proxy-level-test.key | 16 - kerberosV/src/lib/hx509/data/proxy-test.crt | 14 - kerberosV/src/lib/hx509/data/proxy-test.key | 16 - .../hx509/data/proxy10-child-child-test.crt | 16 - .../hx509/data/proxy10-child-child-test.key | 16 - .../src/lib/hx509/data/proxy10-child-test.crt | 15 - .../src/lib/hx509/data/proxy10-child-test.key | 16 - kerberosV/src/lib/hx509/data/proxy10-test.crt | 14 - kerberosV/src/lib/hx509/data/proxy10-test.key | 16 - kerberosV/src/lib/hx509/data/revoke.crt | 53 - kerberosV/src/lib/hx509/data/revoke.key | 16 - .../lib/hx509/data/secp160r1TestCA.cert.pem | 12 - .../lib/hx509/data/secp160r1TestCA.key.pem | 4 - .../src/lib/hx509/data/secp160r1TestCA.pem | 18 - .../hx509/data/secp160r2TestClient.cert.pem | 9 - .../hx509/data/secp160r2TestClient.key.pem | 4 - .../lib/hx509/data/secp160r2TestClient.pem | 15 - .../hx509/data/secp160r2TestServer.cert.pem | 9 - .../hx509/data/secp160r2TestServer.key.pem | 4 - .../lib/hx509/data/secp160r2TestServer.pem | 15 - .../src/lib/hx509/data/sf-class2-root.pem | 24 - kerberosV/src/lib/hx509/data/static-file | 84 - kerberosV/src/lib/hx509/data/sub-ca.crt | 60 - kerberosV/src/lib/hx509/data/sub-ca.key | 16 - kerberosV/src/lib/hx509/data/sub-cert.crt | 53 - kerberosV/src/lib/hx509/data/sub-cert.key | 16 - kerberosV/src/lib/hx509/data/sub-cert.p12 | Bin 3008 -> 0 bytes kerberosV/src/lib/hx509/data/test-ds-only.crt | 53 - kerberosV/src/lib/hx509/data/test-ds-only.key | 16 - .../src/lib/hx509/data/test-enveloped-aes-128 | Bin 3160 -> 0 bytes .../src/lib/hx509/data/test-enveloped-aes-256 | Bin 3160 -> 0 bytes .../src/lib/hx509/data/test-enveloped-des | Bin 3140 -> 0 bytes .../lib/hx509/data/test-enveloped-des-ede3 | Bin 3143 -> 0 bytes .../src/lib/hx509/data/test-enveloped-rc2-128 | Bin 3148 -> 0 bytes .../src/lib/hx509/data/test-enveloped-rc2-40 | Bin 3149 -> 0 bytes .../src/lib/hx509/data/test-enveloped-rc2-64 | Bin 3148 -> 0 bytes kerberosV/src/lib/hx509/data/test-ke-only.crt | 53 - kerberosV/src/lib/hx509/data/test-ke-only.key | 16 - kerberosV/src/lib/hx509/data/test-nopw.p12 | Bin 2221 -> 0 bytes kerberosV/src/lib/hx509/data/test-pw.key | 18 - kerberosV/src/lib/hx509/data/test-signed-data | Bin 3899 -> 0 bytes .../lib/hx509/data/test-signed-data-noattr | Bin 3656 -> 0 bytes .../data/test-signed-data-noattr-nocerts | Bin 3142 -> 0 bytes .../src/lib/hx509/data/test-signed-sha-1 | Bin 3899 -> 0 bytes .../src/lib/hx509/data/test-signed-sha-256 | Bin 3919 -> 0 bytes .../src/lib/hx509/data/test-signed-sha-512 | Bin 3952 -> 0 bytes .../src/lib/hx509/data/test.combined.crt | 69 - kerberosV/src/lib/hx509/data/test.crt | 53 - kerberosV/src/lib/hx509/data/test.key | 16 - kerberosV/src/lib/hx509/data/test.p12 | Bin 2320 -> 0 bytes .../hx509/data/win-u16-in-printablestring.der | Bin 772 -> 0 bytes .../lib/hx509/data/yutaka-pad-broken-ca.pem | 16 - .../lib/hx509/data/yutaka-pad-broken-cert.pem | 18 - .../src/lib/hx509/data/yutaka-pad-ok-ca.pem | 16 - .../src/lib/hx509/data/yutaka-pad-ok-cert.pem | 18 - kerberosV/src/lib/hx509/data/yutaka-pad.key | 15 - kerberosV/src/lib/hx509/doxygen.c | 85 - kerberosV/src/lib/hx509/env.c | 245 - kerberosV/src/lib/hx509/error.c | 227 - kerberosV/src/lib/hx509/file.c | 302 - kerberosV/src/lib/hx509/hx509-private.h | 481 - kerberosV/src/lib/hx509/hx509-protos.h | 1243 - kerberosV/src/lib/hx509/hx509.h | 186 - kerberosV/src/lib/hx509/hx509_err.et | 103 - kerberosV/src/lib/hx509/hx_locl.h | 220 - kerberosV/src/lib/hx509/hxtool-commands.in | 766 - kerberosV/src/lib/hx509/hxtool-version.rc | 36 - kerberosV/src/lib/hx509/hxtool.c | 2241 - kerberosV/src/lib/hx509/keyset.c | 801 - kerberosV/src/lib/hx509/ks_dir.c | 221 - kerberosV/src/lib/hx509/ks_file.c | 690 - kerberosV/src/lib/hx509/ks_keychain.c | 604 - kerberosV/src/lib/hx509/ks_mem.c | 223 - kerberosV/src/lib/hx509/ks_null.c | 97 - kerberosV/src/lib/hx509/ks_p11.c | 1190 - kerberosV/src/lib/hx509/ks_p12.c | 707 - kerberosV/src/lib/hx509/libhx509-exports.def | 235 - kerberosV/src/lib/hx509/lock.c | 249 - kerberosV/src/lib/hx509/name.c | 1026 - kerberosV/src/lib/hx509/ocsp.asn1 | 113 - kerberosV/src/lib/hx509/ocsp.opt | 2 - kerberosV/src/lib/hx509/peer.c | 237 - kerberosV/src/lib/hx509/pkcs10.asn1 | 25 - kerberosV/src/lib/hx509/pkcs10.opt | 1 - kerberosV/src/lib/hx509/print.c | 1039 - kerberosV/src/lib/hx509/quote.py | 101 - kerberosV/src/lib/hx509/ref/pkcs11.h | 1357 - kerberosV/src/lib/hx509/req.c | 326 - kerberosV/src/lib/hx509/revoke.c | 1543 - kerberosV/src/lib/hx509/sel-gram.c | 1713 - kerberosV/src/lib/hx509/sel-gram.h | 83 - kerberosV/src/lib/hx509/sel-gram.y | 114 - kerberosV/src/lib/hx509/sel-lex.c | 1925 - kerberosV/src/lib/hx509/sel-lex.l | 140 - kerberosV/src/lib/hx509/sel.c | 233 - kerberosV/src/lib/hx509/sel.h | 82 - kerberosV/src/lib/hx509/softp11.c | 1796 - kerberosV/src/lib/hx509/test_ca.in | 424 - kerberosV/src/lib/hx509/test_cert.in | 84 - kerberosV/src/lib/hx509/test_chain.in | 256 - kerberosV/src/lib/hx509/test_cms.in | 514 - kerberosV/src/lib/hx509/test_crypto.in | 192 - kerberosV/src/lib/hx509/test_expr.c | 87 - kerberosV/src/lib/hx509/test_java_pkcs11.in | 73 - kerberosV/src/lib/hx509/test_name.c | 382 - kerberosV/src/lib/hx509/test_nist.in | 116 - kerberosV/src/lib/hx509/test_nist2.in | 136 - kerberosV/src/lib/hx509/test_nist_cert.in | 68 - kerberosV/src/lib/hx509/test_nist_pkcs12.in | 77 - kerberosV/src/lib/hx509/test_pkcs11.in | 62 - kerberosV/src/lib/hx509/test_query.in | 203 - kerberosV/src/lib/hx509/test_req.in | 63 - kerberosV/src/lib/hx509/test_soft_pkcs11.c | 228 - kerberosV/src/lib/hx509/test_windows.in | 89 - kerberosV/src/lib/hx509/tst-crypto-available1 | 13 - kerberosV/src/lib/hx509/tst-crypto-available2 | 5 - kerberosV/src/lib/hx509/tst-crypto-available3 | 6 - kerberosV/src/lib/hx509/tst-crypto-select | 1 - kerberosV/src/lib/hx509/tst-crypto-select1 | 1 - kerberosV/src/lib/hx509/tst-crypto-select2 | 1 - kerberosV/src/lib/hx509/tst-crypto-select3 | 1 - kerberosV/src/lib/hx509/tst-crypto-select4 | 1 - kerberosV/src/lib/hx509/tst-crypto-select5 | 1 - kerberosV/src/lib/hx509/tst-crypto-select6 | 1 - kerberosV/src/lib/hx509/tst-crypto-select7 | 1 - kerberosV/src/lib/hx509/version-script.map | 250 - kerberosV/src/lib/ipc/Makefile.am | 67 - kerberosV/src/lib/ipc/Makefile.in | 1073 - kerberosV/src/lib/ipc/client.c | 574 - kerberosV/src/lib/ipc/common.c | 204 - kerberosV/src/lib/ipc/heim-ipc.h | 130 - kerberosV/src/lib/ipc/heim_ipc.defs | 66 - kerberosV/src/lib/ipc/heim_ipc_async.defs | 56 - kerberosV/src/lib/ipc/heim_ipc_reply.defs | 51 - kerberosV/src/lib/ipc/heim_ipc_types.h | 44 - kerberosV/src/lib/ipc/hi_locl.h | 83 - kerberosV/src/lib/ipc/server.c | 1191 - kerberosV/src/lib/ipc/tc.c | 127 - kerberosV/src/lib/ipc/ts-http.c | 136 - kerberosV/src/lib/ipc/ts.c | 105 - kerberosV/src/lib/kadm5/ChangeLog | 1389 - kerberosV/src/lib/kadm5/Makefile.am | 197 - kerberosV/src/lib/kadm5/Makefile.in | 1476 - kerberosV/src/lib/kadm5/NTMakefile | 273 - kerberosV/src/lib/kadm5/acl.c | 216 - kerberosV/src/lib/kadm5/ad.c | 1444 - kerberosV/src/lib/kadm5/admin.h | 258 - kerberosV/src/lib/kadm5/bump_pw_expire.c | 59 - kerberosV/src/lib/kadm5/check-cracklib.pl | 112 - kerberosV/src/lib/kadm5/chpass_c.c | 128 - kerberosV/src/lib/kadm5/chpass_s.c | 204 - kerberosV/src/lib/kadm5/client_glue.c | 150 - kerberosV/src/lib/kadm5/common_glue.c | 134 - kerberosV/src/lib/kadm5/context_s.c | 190 - kerberosV/src/lib/kadm5/create_c.c | 83 - kerberosV/src/lib/kadm5/create_s.c | 194 - kerberosV/src/lib/kadm5/default_keys.c | 120 - kerberosV/src/lib/kadm5/delete_c.c | 77 - kerberosV/src/lib/kadm5/delete_s.c | 75 - kerberosV/src/lib/kadm5/destroy_c.c | 55 - kerberosV/src/lib/kadm5/destroy_s.c | 87 - kerberosV/src/lib/kadm5/ent_setup.c | 215 - kerberosV/src/lib/kadm5/error.c | 48 - kerberosV/src/lib/kadm5/flush.c | 48 - kerberosV/src/lib/kadm5/flush_c.c | 41 - kerberosV/src/lib/kadm5/flush_s.c | 41 - kerberosV/src/lib/kadm5/free.c | 91 - kerberosV/src/lib/kadm5/get_c.c | 84 - kerberosV/src/lib/kadm5/get_princs_c.c | 92 - kerberosV/src/lib/kadm5/get_princs_s.c | 113 - kerberosV/src/lib/kadm5/get_s.c | 316 - kerberosV/src/lib/kadm5/init_c.c | 789 - kerberosV/src/lib/kadm5/init_s.c | 248 - kerberosV/src/lib/kadm5/iprop-commands.in | 130 - kerberosV/src/lib/kadm5/iprop-log-version.rc | 36 - kerberosV/src/lib/kadm5/iprop-log.8 | 141 - kerberosV/src/lib/kadm5/iprop-log.c | 489 - kerberosV/src/lib/kadm5/iprop-log.cat8 | 82 - kerberosV/src/lib/kadm5/iprop.8 | 183 - kerberosV/src/lib/kadm5/iprop.cat8 | 106 - kerberosV/src/lib/kadm5/iprop.h | 70 - .../src/lib/kadm5/ipropd-master-version.rc | 36 - .../src/lib/kadm5/ipropd-slave-version.rc | 36 - kerberosV/src/lib/kadm5/ipropd_common.c | 73 - kerberosV/src/lib/kadm5/ipropd_master.c | 974 - kerberosV/src/lib/kadm5/ipropd_slave.c | 748 - kerberosV/src/lib/kadm5/kadm5-private.h | 509 - kerberosV/src/lib/kadm5/kadm5-protos.h | 244 - kerberosV/src/lib/kadm5/kadm5-pwcheck.h | 73 - kerberosV/src/lib/kadm5/kadm5_err.et | 59 - kerberosV/src/lib/kadm5/kadm5_locl.h | 83 - kerberosV/src/lib/kadm5/kadm5_pwcheck.3 | 159 - kerberosV/src/lib/kadm5/keys.c | 102 - .../src/lib/kadm5/libkadm5srv-exports.def | 61 - .../src/lib/kadm5/libkadm5srv-version.rc | 36 - kerberosV/src/lib/kadm5/log.c | 1057 - kerberosV/src/lib/kadm5/marshall.c | 344 - kerberosV/src/lib/kadm5/modify_c.c | 81 - kerberosV/src/lib/kadm5/modify_s.c | 98 - kerberosV/src/lib/kadm5/password_quality.c | 512 - kerberosV/src/lib/kadm5/private.h | 148 - kerberosV/src/lib/kadm5/privs_c.c | 82 - kerberosV/src/lib/kadm5/privs_s.c | 44 - kerberosV/src/lib/kadm5/randkey_c.c | 97 - kerberosV/src/lib/kadm5/randkey_s.c | 107 - kerberosV/src/lib/kadm5/rename_c.c | 77 - kerberosV/src/lib/kadm5/rename_s.c | 111 - kerberosV/src/lib/kadm5/sample_passwd_check.c | 87 - kerberosV/src/lib/kadm5/send_recv.c | 101 - kerberosV/src/lib/kadm5/server_glue.c | 150 - kerberosV/src/lib/kadm5/set_keys.c | 273 - kerberosV/src/lib/kadm5/set_modifier.c | 54 - kerberosV/src/lib/kadm5/test_pw_quality.c | 95 - kerberosV/src/lib/kadm5/version-script.map | 66 - kerberosV/src/lib/kafs/ChangeLog | 572 - kerberosV/src/lib/kafs/Makefile.am | 93 - kerberosV/src/lib/kafs/Makefile.in | 1055 - kerberosV/src/lib/kafs/NTMakefile | 35 - kerberosV/src/lib/kafs/afskrb5.c | 357 - kerberosV/src/lib/kafs/afsl.exp | 6 - kerberosV/src/lib/kafs/afslib.c | 53 - kerberosV/src/lib/kafs/afslib.exp | 3 - kerberosV/src/lib/kafs/afssys.c | 570 - kerberosV/src/lib/kafs/afssysdefs.h | 113 - kerberosV/src/lib/kafs/common.c | 463 - kerberosV/src/lib/kafs/kafs.3 | 296 - kerberosV/src/lib/kafs/kafs.h | 213 - kerberosV/src/lib/kafs/kafs_locl.h | 158 - kerberosV/src/lib/kafs/roken_rename.h | 64 - kerberosV/src/lib/kdfs/ChangeLog | 28 - kerberosV/src/lib/kdfs/Makefile.am | 12 - kerberosV/src/lib/kdfs/Makefile.in | 882 - kerberosV/src/lib/kdfs/NTMakefile | 35 - kerberosV/src/lib/kdfs/k5dfspag.c | 368 - kerberosV/src/lib/krb5/Makefile.am | 382 - kerberosV/src/lib/krb5/Makefile.in | 3215 - kerberosV/src/lib/krb5/NTMakefile | 485 - kerberosV/src/lib/krb5/acache.c | 1122 - kerberosV/src/lib/krb5/acl.c | 295 - kerberosV/src/lib/krb5/add_et_list.c | 56 - kerberosV/src/lib/krb5/addr_families.c | 1559 - kerberosV/src/lib/krb5/aes-test.c | 878 - kerberosV/src/lib/krb5/aname_to_localname.c | 90 - kerberosV/src/lib/krb5/appdefault.c | 140 - kerberosV/src/lib/krb5/asn1_glue.c | 72 - kerberosV/src/lib/krb5/auth_context.c | 522 - kerberosV/src/lib/krb5/build_ap_req.c | 74 - kerberosV/src/lib/krb5/build_auth.c | 198 - kerberosV/src/lib/krb5/cache.c | 1763 - kerberosV/src/lib/krb5/ccache_plugin.h | 39 - kerberosV/src/lib/krb5/changepw.c | 856 - kerberosV/src/lib/krb5/codec.c | 214 - kerberosV/src/lib/krb5/config_file.c | 1325 - kerberosV/src/lib/krb5/constants.c | 61 - kerberosV/src/lib/krb5/context.c | 1516 - kerberosV/src/lib/krb5/convert_creds.c | 95 - kerberosV/src/lib/krb5/copy_host_realm.c | 77 - kerberosV/src/lib/krb5/crc.c | 69 - kerberosV/src/lib/krb5/creds.c | 285 - kerberosV/src/lib/krb5/crypto-aes.c | 170 - kerberosV/src/lib/krb5/crypto-algs.c | 87 - kerberosV/src/lib/krb5/crypto-arcfour.c | 325 - kerberosV/src/lib/krb5/crypto-des-common.c | 152 - kerberosV/src/lib/krb5/crypto-des.c | 377 - kerberosV/src/lib/krb5/crypto-des3.c | 226 - kerberosV/src/lib/krb5/crypto-evp.c | 182 - kerberosV/src/lib/krb5/crypto-null.c | 97 - kerberosV/src/lib/krb5/crypto-pk.c | 301 - kerberosV/src/lib/krb5/crypto-rand.c | 40 - kerberosV/src/lib/krb5/crypto-stubs.c | 102 - kerberosV/src/lib/krb5/crypto.c | 2652 - kerberosV/src/lib/krb5/crypto.h | 179 - kerberosV/src/lib/krb5/data.c | 228 - kerberosV/src/lib/krb5/deprecated.c | 609 - kerberosV/src/lib/krb5/derived-key-test.c | 121 - kerberosV/src/lib/krb5/digest.c | 1225 - kerberosV/src/lib/krb5/doxygen.c | 700 - kerberosV/src/lib/krb5/eai_to_heim_errno.c | 118 - kerberosV/src/lib/krb5/error_string.c | 342 - kerberosV/src/lib/krb5/expand_hostname.c | 183 - kerberosV/src/lib/krb5/expand_path.c | 500 - kerberosV/src/lib/krb5/fcache.c | 1124 - kerberosV/src/lib/krb5/free.c | 51 - kerberosV/src/lib/krb5/free_host_realm.c | 59 - kerberosV/src/lib/krb5/generate_seq_number.c | 48 - kerberosV/src/lib/krb5/generate_subkey.c | 75 - kerberosV/src/lib/krb5/get_addrs.c | 285 - kerberosV/src/lib/krb5/get_cred.c | 1527 - .../src/lib/krb5/get_default_principal.c | 165 - kerberosV/src/lib/krb5/get_default_realm.c | 83 - kerberosV/src/lib/krb5/get_for_creds.c | 459 - kerberosV/src/lib/krb5/get_host_realm.c | 258 - kerberosV/src/lib/krb5/get_in_tkt.c | 564 - kerberosV/src/lib/krb5/get_port.c | 52 - kerberosV/src/lib/krb5/heim_err.et | 47 - kerberosV/src/lib/krb5/init_creds.c | 434 - kerberosV/src/lib/krb5/init_creds_pw.c | 2150 - kerberosV/src/lib/krb5/k524_err.et | 20 - kerberosV/src/lib/krb5/kcm.c | 1319 - kerberosV/src/lib/krb5/kcm.h | 90 - kerberosV/src/lib/krb5/kerberos.8 | 107 - kerberosV/src/lib/krb5/kerberos.cat8 | 57 - kerberosV/src/lib/krb5/keyblock.c | 204 - kerberosV/src/lib/krb5/keytab.c | 893 - kerberosV/src/lib/krb5/keytab_any.c | 261 - kerberosV/src/lib/krb5/keytab_file.c | 808 - kerberosV/src/lib/krb5/keytab_keyfile.c | 468 - kerberosV/src/lib/krb5/keytab_memory.c | 236 - kerberosV/src/lib/krb5/krb5-private.h | 593 - kerberosV/src/lib/krb5/krb5-protos.h | 4527 - kerberosV/src/lib/krb5/krb5-v4compat.h | 143 - kerberosV/src/lib/krb5/krb5.conf.5 | 575 - kerberosV/src/lib/krb5/krb5.conf.cat5 | 600 - kerberosV/src/lib/krb5/krb5.h | 916 - kerberosV/src/lib/krb5/krb5.moduli | 3 - .../src/lib/krb5/krb524_convert_creds_kdc.3 | 86 - .../src/lib/krb5/krb5_425_conv_principal.3 | 224 - kerberosV/src/lib/krb5/krb5_acl_match_file.3 | 111 - .../src/lib/krb5/krb5_aname_to_localname.3 | 80 - kerberosV/src/lib/krb5/krb5_appdefault.3 | 88 - kerberosV/src/lib/krb5/krb5_auth_context.3 | 395 - kerberosV/src/lib/krb5/krb5_c_make_checksum.3 | 297 - kerberosV/src/lib/krb5/krb5_ccapi.h | 239 - kerberosV/src/lib/krb5/krb5_check_transited.3 | 106 - kerberosV/src/lib/krb5/krb5_create_checksum.3 | 226 - kerberosV/src/lib/krb5/krb5_creds.3 | 119 - kerberosV/src/lib/krb5/krb5_digest.3 | 260 - .../src/lib/krb5/krb5_eai_to_heim_errno.3 | 68 - kerberosV/src/lib/krb5/krb5_encrypt.3 | 278 - kerberosV/src/lib/krb5/krb5_err.et | 274 - kerberosV/src/lib/krb5/krb5_find_padata.3 | 87 - .../src/lib/krb5/krb5_generate_random_block.3 | 57 - .../src/lib/krb5/krb5_get_all_client_addrs.3 | 74 - kerberosV/src/lib/krb5/krb5_get_credentials.3 | 181 - kerberosV/src/lib/krb5/krb5_get_creds.3 | 173 - .../src/lib/krb5/krb5_get_forwarded_creds.3 | 79 - kerberosV/src/lib/krb5/krb5_get_in_cred.3 | 274 - kerberosV/src/lib/krb5/krb5_get_init_creds.3 | 398 - kerberosV/src/lib/krb5/krb5_get_krbhst.3 | 86 - kerberosV/src/lib/krb5/krb5_getportbyname.3 | 67 - kerberosV/src/lib/krb5/krb5_init_context.3 | 308 - kerberosV/src/lib/krb5/krb5_is_thread_safe.3 | 58 - kerberosV/src/lib/krb5/krb5_krbhst_init.3 | 174 - kerberosV/src/lib/krb5/krb5_locl.h | 363 - kerberosV/src/lib/krb5/krb5_mk_req.3 | 187 - kerberosV/src/lib/krb5/krb5_mk_safe.3 | 82 - kerberosV/src/lib/krb5/krb5_openlog.3 | 242 - kerberosV/src/lib/krb5/krb5_parse_name.3 | 68 - kerberosV/src/lib/krb5/krb5_principal.3 | 372 - kerberosV/src/lib/krb5/krb5_rcache.3 | 163 - kerberosV/src/lib/krb5/krb5_rd_error.3 | 98 - kerberosV/src/lib/krb5/krb5_rd_safe.3 | 81 - .../src/lib/krb5/krb5_set_default_realm.3 | 164 - kerberosV/src/lib/krb5/krb5_set_password.3 | 143 - kerberosV/src/lib/krb5/krb5_string_to_key.3 | 156 - kerberosV/src/lib/krb5/krb5_timeofday.3 | 118 - .../src/lib/krb5/krb5_verify_init_creds.3 | 103 - kerberosV/src/lib/krb5/krb5_verify_user.3 | 241 - kerberosV/src/lib/krb5/krb_err.et | 63 - kerberosV/src/lib/krb5/krbhst-test.c | 102 - kerberosV/src/lib/krb5/krbhst.c | 1121 - kerberosV/src/lib/krb5/kuserok.c | 303 - kerberosV/src/lib/krb5/locate_plugin.h | 64 - kerberosV/src/lib/krb5/log.c | 516 - kerberosV/src/lib/krb5/mcache.c | 520 - kerberosV/src/lib/krb5/misc.c | 128 - kerberosV/src/lib/krb5/mit_glue.c | 432 - kerberosV/src/lib/krb5/mk_error.c | 94 - kerberosV/src/lib/krb5/mk_priv.c | 153 - kerberosV/src/lib/krb5/mk_rep.c | 122 - kerberosV/src/lib/krb5/mk_req.c | 114 - kerberosV/src/lib/krb5/mk_req_ext.c | 162 - kerberosV/src/lib/krb5/mk_safe.c | 139 - kerberosV/src/lib/krb5/n-fold-test.c | 119 - kerberosV/src/lib/krb5/n-fold.c | 141 - kerberosV/src/lib/krb5/net_read.c | 44 - kerberosV/src/lib/krb5/net_write.c | 118 - kerberosV/src/lib/krb5/pac.c | 1145 - kerberosV/src/lib/krb5/padata.c | 65 - kerberosV/src/lib/krb5/parse-name-test.c | 192 - kerberosV/src/lib/krb5/pcache.c | 66 - kerberosV/src/lib/krb5/pkinit.c | 2641 - kerberosV/src/lib/krb5/plugin.c | 643 - kerberosV/src/lib/krb5/principal.c | 1136 - kerberosV/src/lib/krb5/prog_setup.c | 64 - kerberosV/src/lib/krb5/prompter_posix.c | 72 - kerberosV/src/lib/krb5/rd_cred.c | 348 - kerberosV/src/lib/krb5/rd_error.c | 125 - kerberosV/src/lib/krb5/rd_priv.c | 184 - kerberosV/src/lib/krb5/rd_rep.c | 119 - kerberosV/src/lib/krb5/rd_req.c | 1079 - kerberosV/src/lib/krb5/rd_safe.c | 215 - kerberosV/src/lib/krb5/read_message.c | 104 - kerberosV/src/lib/krb5/recvauth.c | 220 - kerberosV/src/lib/krb5/replay.c | 328 - kerberosV/src/lib/krb5/salt-aes.c | 103 - kerberosV/src/lib/krb5/salt-arcfour.c | 112 - kerberosV/src/lib/krb5/salt-des.c | 224 - kerberosV/src/lib/krb5/salt-des3.c | 150 - kerberosV/src/lib/krb5/salt.c | 305 - kerberosV/src/lib/krb5/scache.c | 1451 - kerberosV/src/lib/krb5/send_to_kdc.c | 732 - kerberosV/src/lib/krb5/send_to_kdc_plugin.h | 58 - kerberosV/src/lib/krb5/sendauth.c | 232 - kerberosV/src/lib/krb5/set_default_realm.c | 90 - kerberosV/src/lib/krb5/sock_principal.c | 68 - kerberosV/src/lib/krb5/store-int.c | 58 - kerberosV/src/lib/krb5/store-int.h | 49 - kerberosV/src/lib/krb5/store-test.c | 117 - kerberosV/src/lib/krb5/store.c | 1591 - kerberosV/src/lib/krb5/store_emem.c | 195 - kerberosV/src/lib/krb5/store_fd.c | 133 - kerberosV/src/lib/krb5/store_mem.c | 209 - kerberosV/src/lib/krb5/string-to-key-test.c | 140 - kerberosV/src/lib/krb5/test_acl.c | 118 - kerberosV/src/lib/krb5/test_addr.c | 239 - kerberosV/src/lib/krb5/test_alname.c | 154 - kerberosV/src/lib/krb5/test_ap-req.c | 227 - kerberosV/src/lib/krb5/test_cc.c | 736 - kerberosV/src/lib/krb5/test_config.c | 246 - .../src/lib/krb5/test_config_strings.cfg | 12 - kerberosV/src/lib/krb5/test_crypto.c | 212 - kerberosV/src/lib/krb5/test_crypto_wrapping.c | 166 - kerberosV/src/lib/krb5/test_forward.c | 134 - kerberosV/src/lib/krb5/test_fx.c | 210 - kerberosV/src/lib/krb5/test_get_addrs.c | 111 - kerberosV/src/lib/krb5/test_gic.c | 148 - kerberosV/src/lib/krb5/test_hostname.c | 150 - kerberosV/src/lib/krb5/test_keytab.c | 291 - kerberosV/src/lib/krb5/test_kuserok.c | 104 - kerberosV/src/lib/krb5/test_mem.c | 71 - kerberosV/src/lib/krb5/test_pac.c | 381 - kerberosV/src/lib/krb5/test_pkinit_dh2key.c | 216 - kerberosV/src/lib/krb5/test_pknistkdf.c | 365 - kerberosV/src/lib/krb5/test_plugin.c | 126 - kerberosV/src/lib/krb5/test_prf.c | 100 - kerberosV/src/lib/krb5/test_princ.c | 365 - kerberosV/src/lib/krb5/test_renew.c | 119 - kerberosV/src/lib/krb5/test_rfc3961.c | 212 - kerberosV/src/lib/krb5/test_store.c | 337 - kerberosV/src/lib/krb5/test_time.c | 85 - kerberosV/src/lib/krb5/test_x500.c | 110 - kerberosV/src/lib/krb5/ticket.c | 850 - kerberosV/src/lib/krb5/time.c | 129 - kerberosV/src/lib/krb5/transited.c | 490 - kerberosV/src/lib/krb5/verify_init.c | 243 - .../src/lib/krb5/verify_krb5_conf-version.rc | 36 - kerberosV/src/lib/krb5/verify_krb5_conf.8 | 95 - kerberosV/src/lib/krb5/verify_krb5_conf.c | 689 - kerberosV/src/lib/krb5/verify_krb5_conf.cat8 | 57 - kerberosV/src/lib/krb5/verify_user.c | 260 - kerberosV/src/lib/krb5/version-script.map | 774 - kerberosV/src/lib/krb5/version.c | 39 - kerberosV/src/lib/krb5/warn.c | 347 - kerberosV/src/lib/krb5/write_message.c | 87 - kerberosV/src/lib/libedit/COPYING | 30 - kerberosV/src/lib/libedit/ChangeLog | 300 - kerberosV/src/lib/libedit/INSTALL | 229 - kerberosV/src/lib/libedit/Makefile.am | 9 - kerberosV/src/lib/libedit/Makefile.in | 734 - kerberosV/src/lib/libedit/THANKS | 1 - kerberosV/src/lib/libedit/[config.h].in | 0 kerberosV/src/lib/libedit/acinclude.m4 | 85 - kerberosV/src/lib/libedit/aclocal.m4 | 9406 -- kerberosV/src/lib/libedit/config.guess | 1501 - kerberosV/src/lib/libedit/config.h.in | 278 - kerberosV/src/lib/libedit/config.sub | 1705 - kerberosV/src/lib/libedit/configure | 15262 -- kerberosV/src/lib/libedit/configure.ac | 92 - kerberosV/src/lib/libedit/depcomp | 630 - kerberosV/src/lib/libedit/install-sh | 520 - kerberosV/src/lib/libedit/ltmain.sh | 9636 -- kerberosV/src/lib/libedit/missing | 376 - kerberosV/src/lib/libedit/src/Makefile.am | 58 - kerberosV/src/lib/libedit/src/Makefile.in | 639 - kerberosV/src/lib/libedit/src/chared.c | 796 - kerberosV/src/lib/libedit/src/chared.h | 171 - kerberosV/src/lib/libedit/src/chartype.c | 360 - kerberosV/src/lib/libedit/src/chartype.h | 249 - kerberosV/src/lib/libedit/src/common.c | 921 - .../src/lib/libedit/src/editline/readline.h | 221 - kerberosV/src/lib/libedit/src/el.c | 618 - kerberosV/src/lib/libedit/src/el.h | 163 - kerberosV/src/lib/libedit/src/el_term.h | 134 - kerberosV/src/lib/libedit/src/eln.c | 371 - kerberosV/src/lib/libedit/src/emacs.c | 508 - kerberosV/src/lib/libedit/src/fgetln.c | 107 - kerberosV/src/lib/libedit/src/filecomplete.c | 589 - kerberosV/src/lib/libedit/src/filecomplete.h | 44 - kerberosV/src/lib/libedit/src/hist.c | 223 - kerberosV/src/lib/libedit/src/hist.h | 87 - kerberosV/src/lib/libedit/src/histedit.h | 319 - kerberosV/src/lib/libedit/src/history.c | 1097 - kerberosV/src/lib/libedit/src/key.c | 665 - kerberosV/src/lib/libedit/src/key.h | 80 - kerberosV/src/lib/libedit/src/makelist | 258 - kerberosV/src/lib/libedit/src/map.c | 1421 - kerberosV/src/lib/libedit/src/map.h | 77 - kerberosV/src/lib/libedit/src/parse.c | 285 - kerberosV/src/lib/libedit/src/parse.h | 48 - kerberosV/src/lib/libedit/src/prompt.c | 199 - kerberosV/src/lib/libedit/src/prompt.h | 60 - kerberosV/src/lib/libedit/src/read.c | 718 - kerberosV/src/lib/libedit/src/read.h | 50 - kerberosV/src/lib/libedit/src/readline.c | 2243 - kerberosV/src/lib/libedit/src/refresh.c | 1183 - kerberosV/src/lib/libedit/src/refresh.h | 59 - kerberosV/src/lib/libedit/src/search.c | 639 - kerberosV/src/lib/libedit/src/search.h | 66 - kerberosV/src/lib/libedit/src/shlib_version | 5 - kerberosV/src/lib/libedit/src/sig.c | 200 - kerberosV/src/lib/libedit/src/sig.h | 72 - kerberosV/src/lib/libedit/src/strlcat.c | 74 - kerberosV/src/lib/libedit/src/strlcpy.c | 70 - kerberosV/src/lib/libedit/src/sys.h | 161 - kerberosV/src/lib/libedit/src/term.c | 1745 - kerberosV/src/lib/libedit/src/tokenizer.c | 453 - kerberosV/src/lib/libedit/src/tty.c | 1357 - kerberosV/src/lib/libedit/src/tty.h | 481 - kerberosV/src/lib/libedit/src/unvis.c | 516 - kerberosV/src/lib/libedit/src/vi.c | 1162 - kerberosV/src/lib/libedit/src/vis.c | 425 - kerberosV/src/lib/libedit/src/vis.h | 91 - kerberosV/src/lib/libedit/src/wcsdup.c | 43 - kerberosV/src/lib/ntlm/ChangeLog | 120 - kerberosV/src/lib/ntlm/Makefile.am | 50 - kerberosV/src/lib/ntlm/Makefile.in | 1076 - kerberosV/src/lib/ntlm/NTMakefile | 90 - kerberosV/src/lib/ntlm/heimntlm-protos.h | 194 - kerberosV/src/lib/ntlm/heimntlm.h | 157 - .../src/lib/ntlm/libheimntlm-exports.def | 24 - kerberosV/src/lib/ntlm/libheimntlm-version.rc | 36 - kerberosV/src/lib/ntlm/ntlm.c | 1803 - kerberosV/src/lib/ntlm/ntlm_err.et | 24 - kerberosV/src/lib/ntlm/test_ntlm.c | 380 - kerberosV/src/lib/ntlm/version-script.map | 30 - kerberosV/src/lib/otp/ChangeLog | 128 - kerberosV/src/lib/otp/Makefile.am | 87 - kerberosV/src/lib/otp/Makefile.in | 1016 - kerberosV/src/lib/otp/NTMakefile | 35 - kerberosV/src/lib/otp/otp.c | 63 - kerberosV/src/lib/otp/otp.h | 101 - kerberosV/src/lib/otp/otp_challenge.c | 68 - kerberosV/src/lib/otp/otp_db.c | 233 - kerberosV/src/lib/otp/otp_locl.h | 70 - kerberosV/src/lib/otp/otp_md.c | 231 - kerberosV/src/lib/otp/otp_md.h | 46 - kerberosV/src/lib/otp/otp_parse.c | 2522 - kerberosV/src/lib/otp/otp_print.c | 99 - kerberosV/src/lib/otp/otp_verify.c | 78 - kerberosV/src/lib/otp/otptest.c | 142 - kerberosV/src/lib/otp/roken_rename.h | 73 - kerberosV/src/lib/otp/version-script.map | 25 - kerberosV/src/lib/roken/ChangeLog | 2229 - kerberosV/src/lib/roken/Makefile.am | 239 - kerberosV/src/lib/roken/Makefile.in | 2051 - kerberosV/src/lib/roken/NTMakefile | 274 - kerberosV/src/lib/roken/base64-test.c | 96 - kerberosV/src/lib/roken/base64.c | 142 - kerberosV/src/lib/roken/base64.h | 55 - kerberosV/src/lib/roken/bswap.c | 57 - kerberosV/src/lib/roken/chown.c | 42 - kerberosV/src/lib/roken/cloexec.c | 66 - kerberosV/src/lib/roken/closefrom.c | 57 - kerberosV/src/lib/roken/concat.c | 110 - kerberosV/src/lib/roken/copyhostent.c | 99 - kerberosV/src/lib/roken/ct.c | 64 - kerberosV/src/lib/roken/daemon.c | 80 - kerberosV/src/lib/roken/doxygen.c | 44 - kerberosV/src/lib/roken/dumpdata.c | 94 - kerberosV/src/lib/roken/ecalloc.3 | 84 - kerberosV/src/lib/roken/ecalloc.c | 53 - kerberosV/src/lib/roken/emalloc.c | 53 - kerberosV/src/lib/roken/environment.c | 153 - kerberosV/src/lib/roken/eread.c | 51 - kerberosV/src/lib/roken/erealloc.c | 53 - kerberosV/src/lib/roken/err.c | 45 - kerberosV/src/lib/roken/err.hin | 90 - kerberosV/src/lib/roken/errx.c | 45 - kerberosV/src/lib/roken/esetenv.c | 45 - kerberosV/src/lib/roken/estrdup.c | 53 - kerberosV/src/lib/roken/ewrite.c | 51 - kerberosV/src/lib/roken/fchown.c | 42 - kerberosV/src/lib/roken/flock.c | 154 - kerberosV/src/lib/roken/fnmatch.c | 175 - kerberosV/src/lib/roken/fnmatch.hin | 66 - kerberosV/src/lib/roken/freeaddrinfo.c | 54 - kerberosV/src/lib/roken/freehostent.c | 59 - kerberosV/src/lib/roken/gai_strerror.c | 74 - .../src/lib/roken/get_default_username.c | 83 - kerberosV/src/lib/roken/get_window_size.c | 132 - kerberosV/src/lib/roken/getaddrinfo-test.c | 147 - kerberosV/src/lib/roken/getaddrinfo.c | 414 - .../src/lib/roken/getaddrinfo_hostspec.c | 101 - kerberosV/src/lib/roken/getarg.3 | 341 - kerberosV/src/lib/roken/getarg.c | 607 - kerberosV/src/lib/roken/getarg.h | 112 - kerberosV/src/lib/roken/getcap.c | 1129 - kerberosV/src/lib/roken/getcwd.c | 54 - kerberosV/src/lib/roken/getdtablesize.c | 99 - kerberosV/src/lib/roken/getegid.c | 46 - kerberosV/src/lib/roken/geteuid.c | 46 - kerberosV/src/lib/roken/getgid.c | 45 - kerberosV/src/lib/roken/gethostname.c | 70 - kerberosV/src/lib/roken/getifaddrs-test.c | 137 - kerberosV/src/lib/roken/getifaddrs.c | 1309 - kerberosV/src/lib/roken/getipnodebyaddr.c | 71 - kerberosV/src/lib/roken/getipnodebyname.c | 83 - kerberosV/src/lib/roken/getnameinfo.c | 124 - .../src/lib/roken/getnameinfo_verified.c | 94 - kerberosV/src/lib/roken/getopt.c | 124 - kerberosV/src/lib/roken/getprogname.c | 48 - kerberosV/src/lib/roken/gettimeofday.c | 78 - kerberosV/src/lib/roken/getuid.c | 45 - kerberosV/src/lib/roken/getusershell.c | 185 - kerberosV/src/lib/roken/glob.c | 848 - kerberosV/src/lib/roken/glob.hin | 106 - kerberosV/src/lib/roken/h_errno.c | 38 - kerberosV/src/lib/roken/hex-test.c | 106 - kerberosV/src/lib/roken/hex.c | 104 - kerberosV/src/lib/roken/hex.h | 57 - kerberosV/src/lib/roken/hostent_find_fqdn.c | 56 - kerberosV/src/lib/roken/hstrerror.c | 78 - kerberosV/src/lib/roken/ifaddrs.hin | 79 - kerberosV/src/lib/roken/inet_aton.c | 46 - kerberosV/src/lib/roken/inet_ntop.c | 151 - kerberosV/src/lib/roken/inet_pton.c | 116 - kerberosV/src/lib/roken/initgroups.c | 42 - kerberosV/src/lib/roken/innetgr.c | 45 - kerberosV/src/lib/roken/install-sh | 251 - kerberosV/src/lib/roken/iruserok.c | 281 - kerberosV/src/lib/roken/issuid.c | 56 - kerberosV/src/lib/roken/k_getpwnam.c | 61 - kerberosV/src/lib/roken/k_getpwuid.c | 61 - kerberosV/src/lib/roken/localtime_r.c | 60 - kerberosV/src/lib/roken/lstat.c | 42 - kerberosV/src/lib/roken/memmove.c | 62 - kerberosV/src/lib/roken/mini_inetd.c | 197 - kerberosV/src/lib/roken/missing | 190 - kerberosV/src/lib/roken/mkinstalldirs | 40 - kerberosV/src/lib/roken/mkstemp.c | 82 - kerberosV/src/lib/roken/ndbm_wrap.c | 225 - kerberosV/src/lib/roken/ndbm_wrap.h | 93 - kerberosV/src/lib/roken/net_read.c | 118 - kerberosV/src/lib/roken/net_write.c | 107 - kerberosV/src/lib/roken/parse_bytes-test.c | 89 - kerberosV/src/lib/roken/parse_bytes.c | 75 - kerberosV/src/lib/roken/parse_bytes.h | 58 - kerberosV/src/lib/roken/parse_reply-test.c | 126 - kerberosV/src/lib/roken/parse_time-test.c | 117 - kerberosV/src/lib/roken/parse_time.3 | 173 - kerberosV/src/lib/roken/parse_time.c | 75 - kerberosV/src/lib/roken/parse_time.h | 61 - kerberosV/src/lib/roken/parse_units.c | 327 - kerberosV/src/lib/roken/parse_units.h | 81 - kerberosV/src/lib/roken/putenv.c | 79 - kerberosV/src/lib/roken/qsort.c | 203 - kerberosV/src/lib/roken/rand.c | 49 - kerberosV/src/lib/roken/rcmd.c | 49 - kerberosV/src/lib/roken/readv.c | 64 - kerberosV/src/lib/roken/realloc.c | 46 - kerberosV/src/lib/roken/recvmsg.c | 66 - kerberosV/src/lib/roken/resolve-test.c | 185 - kerberosV/src/lib/roken/resolve.c | 934 - kerberosV/src/lib/roken/resolve.h | 251 - kerberosV/src/lib/roken/rkpty.c | 381 - kerberosV/src/lib/roken/roken-common.h | 498 - kerberosV/src/lib/roken/roken.awk | 43 - kerberosV/src/lib/roken/roken.h.in | 1142 - kerberosV/src/lib/roken/roken_gethostby.c | 277 - kerberosV/src/lib/roken/rtbl.3 | 201 - kerberosV/src/lib/roken/rtbl.c | 487 - kerberosV/src/lib/roken/rtbl.h | 120 - kerberosV/src/lib/roken/search.hin | 44 - kerberosV/src/lib/roken/sendmsg.c | 148 - kerberosV/src/lib/roken/setegid.c | 54 - kerberosV/src/lib/roken/setenv.c | 74 - kerberosV/src/lib/roken/seteuid.c | 54 - kerberosV/src/lib/roken/setprogname.c | 91 - kerberosV/src/lib/roken/signal.c | 77 - kerberosV/src/lib/roken/simple_exec.c | 311 - kerberosV/src/lib/roken/snprintf-test.c | 264 - kerberosV/src/lib/roken/snprintf.c | 696 - kerberosV/src/lib/roken/socket.c | 336 - kerberosV/src/lib/roken/socket_wrapper.c | 1911 - kerberosV/src/lib/roken/socket_wrapper.h | 146 - kerberosV/src/lib/roken/strcasecmp.c | 55 - kerberosV/src/lib/roken/strcollect.c | 93 - kerberosV/src/lib/roken/strdup.c | 47 - kerberosV/src/lib/roken/strerror.c | 54 - kerberosV/src/lib/roken/strerror_r.c | 84 - kerberosV/src/lib/roken/strftime.c | 397 - kerberosV/src/lib/roken/strlcat.c | 60 - kerberosV/src/lib/roken/strlcpy.c | 73 - kerberosV/src/lib/roken/strlwr.c | 50 - kerberosV/src/lib/roken/strncasecmp.c | 59 - kerberosV/src/lib/roken/strndup.c | 53 - kerberosV/src/lib/roken/strnlen.c | 46 - kerberosV/src/lib/roken/strpftime-test.c | 295 - kerberosV/src/lib/roken/strpftime-test.h | 55 - kerberosV/src/lib/roken/strpool.c | 110 - kerberosV/src/lib/roken/strptime.c | 449 - kerberosV/src/lib/roken/strsep.c | 58 - kerberosV/src/lib/roken/strsep_copy.c | 66 - kerberosV/src/lib/roken/strtok_r.c | 62 - kerberosV/src/lib/roken/strupr.c | 50 - kerberosV/src/lib/roken/swab.c | 50 - kerberosV/src/lib/roken/test-mem.c | 212 - kerberosV/src/lib/roken/test-mem.h | 39 - kerberosV/src/lib/roken/test-readenv.c | 115 - kerberosV/src/lib/roken/timegm.c | 85 - kerberosV/src/lib/roken/timeval.c | 81 - kerberosV/src/lib/roken/tm2time.c | 58 - kerberosV/src/lib/roken/tsearch-test.c | 125 - kerberosV/src/lib/roken/tsearch.c | 180 - kerberosV/src/lib/roken/unsetenv.c | 69 - kerberosV/src/lib/roken/unvis.c | 283 - kerberosV/src/lib/roken/verify.c | 59 - kerberosV/src/lib/roken/verr.c | 44 - kerberosV/src/lib/roken/verrx.c | 44 - kerberosV/src/lib/roken/vis.c | 422 - kerberosV/src/lib/roken/vis.hin | 151 - kerberosV/src/lib/roken/vsyslog.c | 113 - kerberosV/src/lib/roken/vwarn.c | 43 - kerberosV/src/lib/roken/vwarnx.c | 44 - kerberosV/src/lib/roken/warn.c | 45 - kerberosV/src/lib/roken/warnerr.c | 58 - kerberosV/src/lib/roken/warnx.c | 45 - kerberosV/src/lib/roken/write_pid.c | 90 - kerberosV/src/lib/roken/writev.c | 61 - kerberosV/src/lib/roken/xdbm.h | 52 - kerberosV/src/lib/roken/xfree.c | 42 - kerberosV/src/lib/sl/ChangeLog | 329 - kerberosV/src/lib/sl/Makefile.am | 51 - kerberosV/src/lib/sl/Makefile.in | 1134 - kerberosV/src/lib/sl/NTMakefile | 74 - kerberosV/src/lib/sl/roken_rename.h | 67 - kerberosV/src/lib/sl/sl.c | 395 - kerberosV/src/lib/sl/sl.h | 69 - kerberosV/src/lib/sl/sl_locl.h | 45 - kerberosV/src/lib/sl/slc-gram.y | 785 - kerberosV/src/lib/sl/slc-lex.c | 1867 - kerberosV/src/lib/sl/slc-lex.l | 160 - kerberosV/src/lib/sl/slc.h | 55 - kerberosV/src/lib/sl/test_sl.c | 95 - kerberosV/src/lib/sqlite/Makefile.am | 13 - kerberosV/src/lib/sqlite/Makefile.in | 881 - kerberosV/src/lib/sqlite/NTMakefile | 47 - kerberosV/src/lib/sqlite/sqlite3.c | 131076 --------------- kerberosV/src/lib/sqlite/sqlite3.h | 6757 - kerberosV/src/lib/sqlite/sqlite3ext.h | 426 - kerberosV/src/lib/vers/ChangeLog | 74 - kerberosV/src/lib/vers/Makefile.am | 13 - kerberosV/src/lib/vers/Makefile.in | 829 - kerberosV/src/lib/vers/NTMakefile | 56 - kerberosV/src/lib/vers/print_version.c | 58 - kerberosV/src/lib/vers/vers.h | 41 - kerberosV/src/lib/wind/ChangeLog | 136 - .../lib/wind/CompositionExclusions-3.2.0.txt | 176 - .../lib/wind/DerivedNormalizationProps.txt | 2574 - kerberosV/src/lib/wind/Makefile.am | 149 - kerberosV/src/lib/wind/Makefile.in | 1305 - kerberosV/src/lib/wind/NTMakefile | 159 - .../src/lib/wind/NormalizationCorrections.txt | 43 - kerberosV/src/lib/wind/NormalizationTest.txt | 17166 -- kerberosV/src/lib/wind/UnicodeData.py | 57 - kerberosV/src/lib/wind/UnicodeData.txt | 15100 -- kerberosV/src/lib/wind/bidi.c | 92 - kerberosV/src/lib/wind/bidi_table.c | 411 - kerberosV/src/lib/wind/bidi_table.h | 20 - kerberosV/src/lib/wind/combining.c | 62 - kerberosV/src/lib/wind/combining_table.c | 363 - kerberosV/src/lib/wind/combining_table.h | 17 - kerberosV/src/lib/wind/doxygen.c | 47 - kerberosV/src/lib/wind/errorlist.c | 77 - kerberosV/src/lib/wind/errorlist_table.c | 89 - kerberosV/src/lib/wind/errorlist_table.h | 19 - kerberosV/src/lib/wind/gen-bidi.py | 102 - kerberosV/src/lib/wind/gen-combining.py | 105 - kerberosV/src/lib/wind/gen-errorlist.py | 121 - kerberosV/src/lib/wind/gen-map.py | 158 - kerberosV/src/lib/wind/gen-normalize.py | 211 - .../src/lib/wind/gen-punycode-examples.py | 131 - kerberosV/src/lib/wind/generate.py | 81 - kerberosV/src/lib/wind/idn-lookup.c | 162 - kerberosV/src/lib/wind/ldap.c | 91 - kerberosV/src/lib/wind/libwind-exports.def | 26 - kerberosV/src/lib/wind/map.c | 85 - kerberosV/src/lib/wind/map_table.c | 2613 - kerberosV/src/lib/wind/map_table.h | 22 - kerberosV/src/lib/wind/normalize.c | 325 - kerberosV/src/lib/wind/normalize_table.c | 22977 --- kerberosV/src/lib/wind/normalize_table.h | 33 - kerberosV/src/lib/wind/punycode.c | 168 - kerberosV/src/lib/wind/punycode_examples.c | 34 - kerberosV/src/lib/wind/punycode_examples.h | 21 - kerberosV/src/lib/wind/rfc3454.py | 60 - kerberosV/src/lib/wind/rfc3454.txt | 5099 - kerberosV/src/lib/wind/rfc3490.txt | 1235 - kerberosV/src/lib/wind/rfc3491.txt | 395 - kerberosV/src/lib/wind/rfc3492.txt | 1963 - kerberosV/src/lib/wind/rfc4013.txt | 339 - kerberosV/src/lib/wind/rfc4518.py | 150 - kerberosV/src/lib/wind/rfc4518.txt | 787 - kerberosV/src/lib/wind/stringprep.c | 145 - kerberosV/src/lib/wind/stringprep.py | 92 - kerberosV/src/lib/wind/test-bidi.c | 81 - kerberosV/src/lib/wind/test-ldap.c | 128 - kerberosV/src/lib/wind/test-map.c | 98 - kerberosV/src/lib/wind/test-normalize.c | 176 - kerberosV/src/lib/wind/test-prohibited.c | 138 - kerberosV/src/lib/wind/test-punycode.c | 83 - kerberosV/src/lib/wind/test-rw.c | 186 - kerberosV/src/lib/wind/test-utf8.c | 174 - kerberosV/src/lib/wind/utf8.c | 516 - kerberosV/src/lib/wind/util.py | 48 - kerberosV/src/lib/wind/version-script.map | 29 - kerberosV/src/lib/wind/wind.h | 86 - kerberosV/src/lib/wind/wind_err.et | 23 - kerberosV/src/lib/wind/windlocl.h | 67 - kerberosV/src/ltmain.sh | 9636 -- kerberosV/src/missing | 376 - kerberosV/src/packages/ChangeLog | 26 - kerberosV/src/packages/Makefile.am | 7 - kerberosV/src/packages/Makefile.in | 916 - kerberosV/src/packages/mac/Info.plist | 36 - kerberosV/src/packages/mac/Makefile.am | 9 - kerberosV/src/packages/mac/Makefile.in | 719 - .../packages/mac/Resources/Description.plist | 10 - .../mac/Resources/English.lproj/Welcome.rtf | 8 - kerberosV/src/packages/mac/mac.sh | 52 - kerberosV/src/packages/windows/NTMakefile | 40 - .../assembly/Heimdal.Application.manifest.in | 12 - .../assembly/Heimdal.Kerberos.manifest.in | 15 - .../src/packages/windows/assembly/NTMakefile | 167 - .../assembly/policy.Heimdal.Kerberos.in | 19 - .../src/packages/windows/installer/NTMakefile | 211 - .../windows/installer/heimdal-assemblies.wxs | 48 - .../windows/installer/heimdal-installer.wxs | 451 - .../windows/installer/heimdal-policy.wxs | 50 - .../packages/windows/installer/lang/en-us.wxl | 15 - .../windows/installer/lang/license-en-us.rtf | Bin 2007 -> 0 bytes kerberosV/src/packages/windows/sdk/NTMakefile | 151 - kerberosV/src/po/Makefile.am | 76 - kerberosV/src/po/Makefile.in | 580 - kerberosV/src/po/gen-po.in | 39 - .../heim_com_err-1750206208.pot | 56 - .../heim_com_err-1765328384.pot | 979 - .../src/po/heim_com_err-1765328384/sv_SE.mo | Bin 1549 -> 0 bytes .../src/po/heim_com_err-1765328384/sv_SE.po | 980 - .../heim_com_err-1980176640.pot | 256 - .../heim_com_err-969269760.pot | 71 - .../heim_com_err1859794432.pot | 91 - .../heim_com_err35224064.pot | 225 - .../heim_com_err36150272.pot | 82 - .../heim_com_err39525376.pot | 274 - .../heim_com_err43787520.pot | 262 - .../heim_com_err569856/heim_com_err569856.pot | 419 - .../src/po/heimdal_krb5/heimdal_krb5.pot | 1793 - kerberosV/src/po/heimdal_krb5/sv_SE.mo | Bin 1229 -> 0 bytes kerberosV/src/po/heimdal_krb5/sv_SE.po | 1759 - .../src/po/heimdal_kuser/heimdal_kuser.pot | 416 - kerberosV/src/tests/ChangeLog | 793 - kerberosV/src/tests/Makefile.am | 13 - kerberosV/src/tests/Makefile.in | 917 - kerberosV/src/tests/NTMakefile | 35 - kerberosV/src/tests/bin/Makefile.am | 22 - kerberosV/src/tests/bin/Makefile.in | 731 - kerberosV/src/tests/bin/setup-env.in | 59 - kerberosV/src/tests/can/Makefile.am | 58 - kerberosV/src/tests/can/Makefile.in | 861 - kerberosV/src/tests/can/NTMakefile | 35 - kerberosV/src/tests/can/apple-10.4.kadm | 4 - kerberosV/src/tests/can/apple-10.4.req | Bin 1199 -> 0 bytes kerberosV/src/tests/can/check-can.in | 66 - kerberosV/src/tests/can/heim-0.8.kadm | 4 - kerberosV/src/tests/can/heim-0.8.req | Bin 1177 -> 0 bytes kerberosV/src/tests/can/krb5.conf.in | 24 - .../src/tests/can/mit-pkinit-20070607.ca.crt | 23 - .../src/tests/can/mit-pkinit-20070607.kadm | 3 - .../src/tests/can/mit-pkinit-20070607.req | Bin 2352 -> 0 bytes .../src/tests/can/mit-pkinit-20070607.xf | 28 - kerberosV/src/tests/can/test_can.in | 79 - kerberosV/src/tests/db/Makefile.am | 86 - kerberosV/src/tests/db/Makefile.in | 890 - kerberosV/src/tests/db/NTMakefile | 35 - kerberosV/src/tests/db/add-modify-delete.in | 137 - kerberosV/src/tests/db/check-aliases.in | 110 - kerberosV/src/tests/db/check-dbinfo.in | 49 - kerberosV/src/tests/db/have-db.in | 58 - kerberosV/src/tests/db/krb5-mit.conf.in | 14 - kerberosV/src/tests/db/krb5.conf.in | 28 - kerberosV/src/tests/db/loaddump-db.in | 136 - kerberosV/src/tests/db/text-dump-0.7 | 7 - kerberosV/src/tests/db/text-dump-known-ext | 7 - kerberosV/src/tests/db/text-dump-no-ext | 7 - kerberosV/src/tests/db/text-dump-unknown-ext | 7 - kerberosV/src/tests/gss/Makefile.am | 81 - kerberosV/src/tests/gss/Makefile.in | 884 - kerberosV/src/tests/gss/NTMakefile | 35 - kerberosV/src/tests/gss/check-basic.in | 206 - kerberosV/src/tests/gss/check-context.in | 449 - kerberosV/src/tests/gss/check-gss.in | 50 - kerberosV/src/tests/gss/check-gssmask.in | 135 - kerberosV/src/tests/gss/check-ntlm.in | 170 - kerberosV/src/tests/gss/check-spnego.in | 215 - kerberosV/src/tests/gss/krb5.conf.in | 33 - kerberosV/src/tests/gss/ntlm-user-file.txt | 2 - kerberosV/src/tests/java/KerberosInit.java | 95 - kerberosV/src/tests/java/Makefile.am | 45 - kerberosV/src/tests/java/Makefile.in | 846 - kerberosV/src/tests/java/NTMakefile | 35 - kerberosV/src/tests/java/check-kinit.in | 101 - kerberosV/src/tests/java/have-java.sh | 58 - kerberosV/src/tests/java/jaas.conf | 5 - kerberosV/src/tests/java/krb5.conf.in | 28 - kerberosV/src/tests/kdc/Makefile.am | 216 - kerberosV/src/tests/kdc/Makefile.in | 1016 - kerberosV/src/tests/kdc/NTMakefile | 35 - kerberosV/src/tests/kdc/check-cc.in | 155 - kerberosV/src/tests/kdc/check-delegation.in | 158 - kerberosV/src/tests/kdc/check-des.in | 161 - kerberosV/src/tests/kdc/check-digest.in | 296 - kerberosV/src/tests/kdc/check-iprop.in | 288 - kerberosV/src/tests/kdc/check-kadmin.in | 310 - kerberosV/src/tests/kdc/check-kdc-weak.in | 37 - kerberosV/src/tests/kdc/check-kdc.in | 552 - kerberosV/src/tests/kdc/check-keys.in | 102 - kerberosV/src/tests/kdc/check-kpasswdd.in | 198 - kerberosV/src/tests/kdc/check-pkinit.in | 295 - kerberosV/src/tests/kdc/check-referral.in | 219 - kerberosV/src/tests/kdc/check-uu.in | 138 - kerberosV/src/tests/kdc/donotexists.txt | 1 - kerberosV/src/tests/kdc/heimdal.acl | 5 - kerberosV/src/tests/kdc/iprop-acl | 1 - kerberosV/src/tests/kdc/krb5-pkinit.conf.in | 32 - kerberosV/src/tests/kdc/krb5.conf.in | 93 - kerberosV/src/tests/kdc/krb5.conf.keys.in | 14 - kerberosV/src/tests/kdc/leaks-kill.sh | 32 - kerberosV/src/tests/kdc/ntlm-user-file.txt | 1 - kerberosV/src/tests/kdc/pki-mapping | 2 - kerberosV/src/tests/kdc/uuserver.txt | 4 - kerberosV/src/tests/kdc/wait-kdc.sh | 64 - kerberosV/src/tests/ldap/Makefile.am | 53 - kerberosV/src/tests/ldap/Makefile.in | 857 - kerberosV/src/tests/ldap/NTMakefile | 35 - kerberosV/src/tests/ldap/check-ldap.in | 154 - kerberosV/src/tests/ldap/init.ldif | 44 - kerberosV/src/tests/ldap/krb5.conf.in | 21 - kerberosV/src/tests/ldap/samba.schema | 554 - kerberosV/src/tests/ldap/slapd-init.in | 39 - kerberosV/src/tests/ldap/slapd-stop | 18 - kerberosV/src/tests/ldap/slapd.conf | 28 - kerberosV/src/tests/plugin/Makefile.am | 44 - kerberosV/src/tests/plugin/Makefile.in | 1008 - kerberosV/src/tests/plugin/NTMakefile | 35 - kerberosV/src/tests/plugin/check-pac.in | 148 - kerberosV/src/tests/plugin/krb5.conf.in | 29 - kerberosV/src/tests/plugin/windc.c | 85 - kerberosV/src/tools/Makefile.am | 54 - kerberosV/src/tools/Makefile.in | 899 - kerberosV/src/tools/NTMakefile | 35 - kerberosV/src/tools/heimdal-gssapi.pc.in | 14 - kerberosV/src/tools/kdc-log-analyze.pl | 549 - kerberosV/src/tools/krb5-config.1 | 88 - kerberosV/src/tools/krb5-config.cat1 | 52 - kerberosV/src/tools/krb5-config.in | 148 - kerberosV/src/windows/NTMakefile.config | 88 - kerberosV/src/windows/NTMakefile.version | 54 - kerberosV/src/windows/NTMakefile.w32 | 567 - kerberosV/src/windows/README | 147 - kerberosV/src/windows/maint.el | 34 - kerberosV/src/windows/version.rc | 147 - kerberosV/src/ylwrap | 222 - kerberosV/tools/Makefile | 5 - kerberosV/tools/Makefile.inc | 5 - kerberosV/tools/asn1_compile/Makefile | 45 - kerberosV/tools/compile_et/Makefile | 29 - kerberosV/tools/slc/Makefile | 29 - kerberosV/usr.bin/Makefile | 6 - kerberosV/usr.bin/Makefile.inc | 5 - kerberosV/usr.bin/kcc/Makefile | 30 - kerberosV/usr.bin/kdestroy/Makefile | 15 - kerberosV/usr.bin/kf/Makefile | 15 - kerberosV/usr.bin/kgetcred/Makefile | 14 - kerberosV/usr.bin/kinit/Makefile | 14 - kerberosV/usr.bin/krb5-config/Makefile | 36 - kerberosV/usr.bin/string2key/Makefile | 18 - kerberosV/usr.bin/verify_krb5_conf/Makefile | 14 - kerberosV/usr.sbin/Makefile | 5 - kerberosV/usr.sbin/Makefile.inc | 5 - kerberosV/usr.sbin/iprop-log/Makefile | 31 - kerberosV/usr.sbin/kadmin/Makefile | 47 - kerberosV/usr.sbin/kimpersonate/Makefile | 17 - kerberosV/usr.sbin/kstash/Makefile | 16 - kerberosV/usr.sbin/ktutil/Makefile | 35 - kerberosV/varsub | 3 - 3299 files changed, 949125 deletions(-) delete mode 100644 kerberosV/Makefile delete mode 100644 kerberosV/Makefile.inc delete mode 100644 kerberosV/README delete mode 100644 kerberosV/doc/Makefile delete mode 100644 kerberosV/include/config.h delete mode 100644 kerberosV/include/crypto-headers.h delete mode 100644 kerberosV/include/krb5-types.h delete mode 100644 kerberosV/include/roken.h delete mode 100644 kerberosV/include/version.h delete mode 100644 kerberosV/lib/Makefile delete mode 100644 kerberosV/lib/Makefile.inc delete mode 100644 kerberosV/lib/libasn1/Makefile delete mode 100644 kerberosV/lib/libasn1/shlib_version delete mode 100644 kerberosV/lib/libcom_err/Makefile delete mode 100644 kerberosV/lib/libcom_err/shlib_version delete mode 100644 kerberosV/lib/libgssapi/Makefile delete mode 100644 kerberosV/lib/libgssapi/shlib_version delete mode 100644 kerberosV/lib/libhdb/Makefile delete mode 100644 kerberosV/lib/libhdb/shlib_version delete mode 100644 kerberosV/lib/libheimbase/Makefile delete mode 100644 kerberosV/lib/libheimbase/shlib_version delete mode 100644 kerberosV/lib/libheimipcc/Makefile delete mode 100644 kerberosV/lib/libheimipcs/Makefile delete mode 100644 kerberosV/lib/libkadm5clnt/Makefile delete mode 100644 kerberosV/lib/libkadm5clnt/shlib_version delete mode 100644 kerberosV/lib/libkadm5srv/Makefile delete mode 100644 kerberosV/lib/libkadm5srv/shlib_version delete mode 100644 kerberosV/lib/libkafs/Makefile delete mode 100644 kerberosV/lib/libkafs/shlib_version delete mode 100644 kerberosV/lib/libkdc/Makefile delete mode 100644 kerberosV/lib/libkdc/shlib_version delete mode 100644 kerberosV/lib/libkrb5/Makefile delete mode 100644 kerberosV/lib/libkrb5/shlib_version delete mode 100644 kerberosV/lib/libroken/Makefile delete mode 100644 kerberosV/lib/libroken/shlib_version delete mode 100644 kerberosV/lib/libsl/Makefile delete mode 100644 kerberosV/lib/libvers/Makefile delete mode 100644 kerberosV/lib/libwind/Makefile delete mode 100644 kerberosV/lib/libwind/shlib_version delete mode 100644 kerberosV/libexec/Makefile delete mode 100644 kerberosV/libexec/Makefile.inc delete mode 100644 kerberosV/libexec/hprop/Makefile delete mode 100644 kerberosV/libexec/hpropd/Makefile delete mode 100644 kerberosV/libexec/ipropd-master/Makefile delete mode 100644 kerberosV/libexec/ipropd-slave/Makefile delete mode 100644 kerberosV/libexec/kadmind/Makefile delete mode 100644 kerberosV/libexec/kdc/Makefile delete mode 100644 kerberosV/libexec/kfd/Makefile delete mode 100644 kerberosV/libexec/kpasswdd/Makefile delete mode 100644 kerberosV/src/ChangeLog delete mode 100644 kerberosV/src/ChangeLog.1998 delete mode 100644 kerberosV/src/ChangeLog.1999 delete mode 100644 kerberosV/src/ChangeLog.2000 delete mode 100644 kerberosV/src/ChangeLog.2001 delete mode 100644 kerberosV/src/ChangeLog.2002 delete mode 100644 kerberosV/src/ChangeLog.2003 delete mode 100644 kerberosV/src/ChangeLog.2004 delete mode 100644 kerberosV/src/ChangeLog.2005 delete mode 100644 kerberosV/src/ChangeLog.2006 delete mode 100644 kerberosV/src/LICENSE delete mode 100644 kerberosV/src/Makefile.am delete mode 100644 kerberosV/src/Makefile.am.common delete mode 100644 kerberosV/src/Makefile.in delete mode 100644 kerberosV/src/NEWS delete mode 100644 kerberosV/src/NTMakefile delete mode 100644 kerberosV/src/README delete mode 100644 kerberosV/src/TODO delete mode 100644 kerberosV/src/acinclude.m4 delete mode 100644 kerberosV/src/aclocal.m4 delete mode 100644 kerberosV/src/admin/ChangeLog delete mode 100644 kerberosV/src/admin/Makefile.am delete mode 100644 kerberosV/src/admin/Makefile.in delete mode 100644 kerberosV/src/admin/NTMakefile delete mode 100644 kerberosV/src/admin/add.c delete mode 100644 kerberosV/src/admin/change.c delete mode 100644 kerberosV/src/admin/copy.c delete mode 100644 kerberosV/src/admin/destroy.c delete mode 100644 kerberosV/src/admin/get.c delete mode 100644 kerberosV/src/admin/ktutil-commands.in delete mode 100644 kerberosV/src/admin/ktutil-version.rc delete mode 100644 kerberosV/src/admin/ktutil.8 delete mode 100644 kerberosV/src/admin/ktutil.c delete mode 100644 kerberosV/src/admin/ktutil.cat8 delete mode 100644 kerberosV/src/admin/ktutil_locl.h delete mode 100644 kerberosV/src/admin/list.c delete mode 100644 kerberosV/src/admin/purge.c delete mode 100644 kerberosV/src/admin/remove.c delete mode 100644 kerberosV/src/admin/rename.c delete mode 100644 kerberosV/src/appl/Makefile.am delete mode 100644 kerberosV/src/appl/Makefile.in delete mode 100644 kerberosV/src/appl/NTMakefile delete mode 100644 kerberosV/src/appl/afsutil/ChangeLog delete mode 100644 kerberosV/src/appl/afsutil/Makefile.am delete mode 100644 kerberosV/src/appl/afsutil/Makefile.in delete mode 100644 kerberosV/src/appl/afsutil/NTMakefile delete mode 100644 kerberosV/src/appl/afsutil/afslog.1 delete mode 100644 kerberosV/src/appl/afsutil/afslog.c delete mode 100644 kerberosV/src/appl/afsutil/afslog.cat1 delete mode 100644 kerberosV/src/appl/afsutil/pagsh.1 delete mode 100644 kerberosV/src/appl/afsutil/pagsh.c delete mode 100644 kerberosV/src/appl/afsutil/pagsh.cat1 delete mode 100644 kerberosV/src/appl/dceutils/ChangeLog delete mode 100644 kerberosV/src/appl/dceutils/Makefile.am delete mode 100644 kerberosV/src/appl/dceutils/Makefile.in delete mode 100644 kerberosV/src/appl/dceutils/NTMakefile delete mode 100644 kerberosV/src/appl/dceutils/README.dcedfs delete mode 100644 kerberosV/src/appl/dceutils/README.original delete mode 100644 kerberosV/src/appl/dceutils/dfspag.exp delete mode 100644 kerberosV/src/appl/dceutils/dpagaix.c delete mode 100644 kerberosV/src/appl/dceutils/k5dce.h delete mode 100644 kerberosV/src/appl/dceutils/k5dcecon.c delete mode 100644 kerberosV/src/appl/dceutils/testpag.c delete mode 100644 kerberosV/src/appl/ftp/ChangeLog delete mode 100644 kerberosV/src/appl/ftp/Makefile.am delete mode 100644 kerberosV/src/appl/ftp/Makefile.in delete mode 100644 kerberosV/src/appl/ftp/NTMakefile delete mode 100644 kerberosV/src/appl/ftp/common/Makefile.am delete mode 100644 kerberosV/src/appl/ftp/common/Makefile.in delete mode 100644 kerberosV/src/appl/ftp/common/NTMakefile delete mode 100644 kerberosV/src/appl/ftp/common/buffer.c delete mode 100644 kerberosV/src/appl/ftp/common/common.h delete mode 100644 kerberosV/src/appl/ftp/common/sockbuf.c delete mode 100644 kerberosV/src/appl/ftp/ftp/Makefile.am delete mode 100644 kerberosV/src/appl/ftp/ftp/Makefile.in delete mode 100644 kerberosV/src/appl/ftp/ftp/NTMakefile delete mode 100644 kerberosV/src/appl/ftp/ftp/cmds.c delete mode 100644 kerberosV/src/appl/ftp/ftp/cmdtab.c delete mode 100644 kerberosV/src/appl/ftp/ftp/domacro.c delete mode 100644 kerberosV/src/appl/ftp/ftp/extern.h delete mode 100644 kerberosV/src/appl/ftp/ftp/ftp.1 delete mode 100644 kerberosV/src/appl/ftp/ftp/ftp.c delete mode 100644 kerberosV/src/appl/ftp/ftp/ftp.cat1 delete mode 100644 kerberosV/src/appl/ftp/ftp/ftp_locl.h delete mode 100644 kerberosV/src/appl/ftp/ftp/ftp_var.h delete mode 100644 kerberosV/src/appl/ftp/ftp/globals.c delete mode 100644 kerberosV/src/appl/ftp/ftp/gssapi.c delete mode 100644 kerberosV/src/appl/ftp/ftp/kauth.c delete mode 100644 kerberosV/src/appl/ftp/ftp/main.c delete mode 100644 kerberosV/src/appl/ftp/ftp/pathnames.h delete mode 100644 kerberosV/src/appl/ftp/ftp/ruserpass.c delete mode 100644 kerberosV/src/appl/ftp/ftp/security.c delete mode 100644 kerberosV/src/appl/ftp/ftp/security.h delete mode 100644 kerberosV/src/appl/ftp/ftpd/Makefile.am delete mode 100644 kerberosV/src/appl/ftp/ftpd/Makefile.in delete mode 100644 kerberosV/src/appl/ftp/ftpd/NTMakefile delete mode 100644 kerberosV/src/appl/ftp/ftpd/extern.h delete mode 100644 kerberosV/src/appl/ftp/ftpd/ftpcmd.c delete mode 100644 kerberosV/src/appl/ftp/ftpd/ftpcmd.y delete mode 100644 kerberosV/src/appl/ftp/ftpd/ftpd.8 delete mode 100644 kerberosV/src/appl/ftp/ftpd/ftpd.c delete mode 100644 kerberosV/src/appl/ftp/ftpd/ftpd.cat8 delete mode 100644 kerberosV/src/appl/ftp/ftpd/ftpd_locl.h delete mode 100644 kerberosV/src/appl/ftp/ftpd/ftpusers.5 delete mode 100644 kerberosV/src/appl/ftp/ftpd/ftpusers.cat5 delete mode 100644 kerberosV/src/appl/ftp/ftpd/gss_userok.c delete mode 100644 kerberosV/src/appl/ftp/ftpd/gssapi.c delete mode 100644 kerberosV/src/appl/ftp/ftpd/kauth.c delete mode 100644 kerberosV/src/appl/ftp/ftpd/klist.c delete mode 100644 kerberosV/src/appl/ftp/ftpd/logwtmp.c delete mode 100644 kerberosV/src/appl/ftp/ftpd/ls.c delete mode 100644 kerberosV/src/appl/ftp/ftpd/pathnames.h delete mode 100644 kerberosV/src/appl/ftp/ftpd/popen.c delete mode 100644 kerberosV/src/appl/ftp/ftpd/security.c delete mode 100644 kerberosV/src/appl/gssmask/Makefile.am delete mode 100644 kerberosV/src/appl/gssmask/Makefile.in delete mode 100644 kerberosV/src/appl/gssmask/NTMakefile delete mode 100644 kerberosV/src/appl/gssmask/common.c delete mode 100644 kerberosV/src/appl/gssmask/common.h delete mode 100644 kerberosV/src/appl/gssmask/gssmaestro.c delete mode 100644 kerberosV/src/appl/gssmask/gssmask.c delete mode 100644 kerberosV/src/appl/gssmask/protocol.h delete mode 100644 kerberosV/src/appl/kf/Makefile.am delete mode 100644 kerberosV/src/appl/kf/Makefile.in delete mode 100644 kerberosV/src/appl/kf/NTMakefile delete mode 100644 kerberosV/src/appl/kf/kf.1 delete mode 100644 kerberosV/src/appl/kf/kf.c delete mode 100644 kerberosV/src/appl/kf/kf.cat1 delete mode 100644 kerberosV/src/appl/kf/kf_locl.h delete mode 100644 kerberosV/src/appl/kf/kfd.8 delete mode 100644 kerberosV/src/appl/kf/kfd.c delete mode 100644 kerberosV/src/appl/kf/kfd.cat8 delete mode 100644 kerberosV/src/appl/kx/ChangeLog delete mode 100644 kerberosV/src/appl/kx/Makefile.am delete mode 100644 kerberosV/src/appl/kx/Makefile.in delete mode 100644 kerberosV/src/appl/kx/NTMakefile delete mode 100644 kerberosV/src/appl/kx/common.c delete mode 100644 kerberosV/src/appl/kx/context.c delete mode 100644 kerberosV/src/appl/kx/krb5.c delete mode 100644 kerberosV/src/appl/kx/kx.1 delete mode 100644 kerberosV/src/appl/kx/kx.c delete mode 100644 kerberosV/src/appl/kx/kx.cat1 delete mode 100644 kerberosV/src/appl/kx/kx.h delete mode 100644 kerberosV/src/appl/kx/kxd.8 delete mode 100644 kerberosV/src/appl/kx/kxd.c delete mode 100644 kerberosV/src/appl/kx/kxd.cat8 delete mode 100644 kerberosV/src/appl/kx/rxtelnet.1 delete mode 100644 kerberosV/src/appl/kx/rxtelnet.cat1 delete mode 100644 kerberosV/src/appl/kx/rxtelnet.in delete mode 100644 kerberosV/src/appl/kx/rxterm.1 delete mode 100644 kerberosV/src/appl/kx/rxterm.cat1 delete mode 100644 kerberosV/src/appl/kx/rxterm.in delete mode 100644 kerberosV/src/appl/kx/tenletxr.1 delete mode 100644 kerberosV/src/appl/kx/tenletxr.cat1 delete mode 100644 kerberosV/src/appl/kx/tenletxr.in delete mode 100644 kerberosV/src/appl/kx/writeauth.c delete mode 100644 kerberosV/src/appl/login/ChangeLog delete mode 100644 kerberosV/src/appl/login/Makefile.am delete mode 100644 kerberosV/src/appl/login/Makefile.in delete mode 100644 kerberosV/src/appl/login/NTMakefile delete mode 100644 kerberosV/src/appl/login/conf.c delete mode 100644 kerberosV/src/appl/login/env.c delete mode 100644 kerberosV/src/appl/login/limits_conf.c delete mode 100644 kerberosV/src/appl/login/login-protos.h delete mode 100644 kerberosV/src/appl/login/login.1 delete mode 100644 kerberosV/src/appl/login/login.access.5 delete mode 100644 kerberosV/src/appl/login/login.access.cat5 delete mode 100644 kerberosV/src/appl/login/login.c delete mode 100644 kerberosV/src/appl/login/login.cat1 delete mode 100644 kerberosV/src/appl/login/login_access.c delete mode 100644 kerberosV/src/appl/login/login_locl.h delete mode 100644 kerberosV/src/appl/login/loginpaths.h delete mode 100644 kerberosV/src/appl/login/osfc2.c delete mode 100644 kerberosV/src/appl/login/read_string.c delete mode 100644 kerberosV/src/appl/login/shadow.c delete mode 100644 kerberosV/src/appl/login/stty_default.c delete mode 100644 kerberosV/src/appl/login/tty.c delete mode 100644 kerberosV/src/appl/login/utmp_login.c delete mode 100644 kerberosV/src/appl/login/utmpx_login.c delete mode 100644 kerberosV/src/appl/otp/ChangeLog delete mode 100644 kerberosV/src/appl/otp/Makefile.am delete mode 100644 kerberosV/src/appl/otp/Makefile.in delete mode 100644 kerberosV/src/appl/otp/NTMakefile delete mode 100644 kerberosV/src/appl/otp/otp.1 delete mode 100644 kerberosV/src/appl/otp/otp.c delete mode 100644 kerberosV/src/appl/otp/otp.cat1 delete mode 100644 kerberosV/src/appl/otp/otp_locl.h delete mode 100644 kerberosV/src/appl/otp/otpprint.1 delete mode 100644 kerberosV/src/appl/otp/otpprint.c delete mode 100644 kerberosV/src/appl/otp/otpprint.cat1 delete mode 100644 kerberosV/src/appl/popper/ChangeLog delete mode 100644 kerberosV/src/appl/popper/Makefile.am delete mode 100644 kerberosV/src/appl/popper/Makefile.in delete mode 100644 kerberosV/src/appl/popper/NTMakefile delete mode 100644 kerberosV/src/appl/popper/README delete mode 100644 kerberosV/src/appl/popper/README-FIRST delete mode 100644 kerberosV/src/appl/popper/auth_gssapi.c delete mode 100644 kerberosV/src/appl/popper/maildir.c delete mode 100644 kerberosV/src/appl/popper/pop3.rfc1081 delete mode 100644 kerberosV/src/appl/popper/pop3e.rfc1082 delete mode 100644 kerberosV/src/appl/popper/pop_auth.c delete mode 100644 kerberosV/src/appl/popper/pop_auth.h delete mode 100644 kerberosV/src/appl/popper/pop_debug.c delete mode 100644 kerberosV/src/appl/popper/pop_dele.c delete mode 100644 kerberosV/src/appl/popper/pop_dropcopy.c delete mode 100644 kerberosV/src/appl/popper/pop_dropinfo.c delete mode 100644 kerberosV/src/appl/popper/pop_get_command.c delete mode 100644 kerberosV/src/appl/popper/pop_init.c delete mode 100644 kerberosV/src/appl/popper/pop_last.c delete mode 100644 kerberosV/src/appl/popper/pop_list.c delete mode 100644 kerberosV/src/appl/popper/pop_log.c delete mode 100644 kerberosV/src/appl/popper/pop_msg.c delete mode 100644 kerberosV/src/appl/popper/pop_parse.c delete mode 100644 kerberosV/src/appl/popper/pop_pass.c delete mode 100644 kerberosV/src/appl/popper/pop_quit.c delete mode 100644 kerberosV/src/appl/popper/pop_rset.c delete mode 100644 kerberosV/src/appl/popper/pop_send.c delete mode 100644 kerberosV/src/appl/popper/pop_stat.c delete mode 100644 kerberosV/src/appl/popper/pop_uidl.c delete mode 100644 kerberosV/src/appl/popper/pop_updt.c delete mode 100644 kerberosV/src/appl/popper/pop_user.c delete mode 100644 kerberosV/src/appl/popper/pop_xover.c delete mode 100644 kerberosV/src/appl/popper/popper.8 delete mode 100644 kerberosV/src/appl/popper/popper.README.release delete mode 100644 kerberosV/src/appl/popper/popper.c delete mode 100644 kerberosV/src/appl/popper/popper.cat8 delete mode 100644 kerberosV/src/appl/popper/popper.h delete mode 100644 kerberosV/src/appl/popper/version.h delete mode 100644 kerberosV/src/appl/push/ChangeLog delete mode 100644 kerberosV/src/appl/push/Makefile.am delete mode 100644 kerberosV/src/appl/push/Makefile.in delete mode 100644 kerberosV/src/appl/push/NTMakefile delete mode 100644 kerberosV/src/appl/push/pfrom.1 delete mode 100644 kerberosV/src/appl/push/pfrom.cat1 delete mode 100644 kerberosV/src/appl/push/pfrom.in delete mode 100644 kerberosV/src/appl/push/push.8 delete mode 100644 kerberosV/src/appl/push/push.c delete mode 100644 kerberosV/src/appl/push/push.cat8 delete mode 100644 kerberosV/src/appl/push/push_locl.h delete mode 100644 kerberosV/src/appl/rcp/ChangeLog delete mode 100644 kerberosV/src/appl/rcp/Makefile.am delete mode 100644 kerberosV/src/appl/rcp/Makefile.in delete mode 100644 kerberosV/src/appl/rcp/NTMakefile delete mode 100644 kerberosV/src/appl/rcp/extern.h delete mode 100644 kerberosV/src/appl/rcp/rcp.1 delete mode 100644 kerberosV/src/appl/rcp/rcp.c delete mode 100644 kerberosV/src/appl/rcp/rcp.cat1 delete mode 100644 kerberosV/src/appl/rcp/rcp_locl.h delete mode 100644 kerberosV/src/appl/rcp/util.c delete mode 100644 kerberosV/src/appl/rsh/ChangeLog delete mode 100644 kerberosV/src/appl/rsh/Makefile.am delete mode 100644 kerberosV/src/appl/rsh/Makefile.in delete mode 100644 kerberosV/src/appl/rsh/NTMakefile delete mode 100644 kerberosV/src/appl/rsh/common.c delete mode 100644 kerberosV/src/appl/rsh/limits_conf.c delete mode 100644 kerberosV/src/appl/rsh/login_access.c delete mode 100644 kerberosV/src/appl/rsh/rsh.1 delete mode 100644 kerberosV/src/appl/rsh/rsh.c delete mode 100644 kerberosV/src/appl/rsh/rsh.cat1 delete mode 100644 kerberosV/src/appl/rsh/rsh_locl.h delete mode 100644 kerberosV/src/appl/rsh/rshd.8 delete mode 100644 kerberosV/src/appl/rsh/rshd.c delete mode 100644 kerberosV/src/appl/rsh/rshd.cat8 delete mode 100644 kerberosV/src/appl/su/ChangeLog delete mode 100644 kerberosV/src/appl/su/Makefile.am delete mode 100644 kerberosV/src/appl/su/Makefile.in delete mode 100644 kerberosV/src/appl/su/NTMakefile delete mode 100644 kerberosV/src/appl/su/su.1 delete mode 100644 kerberosV/src/appl/su/su.c delete mode 100644 kerberosV/src/appl/su/su.cat1 delete mode 100644 kerberosV/src/appl/su/supaths.h delete mode 100644 kerberosV/src/appl/telnet/ChangeLog delete mode 100644 kerberosV/src/appl/telnet/Makefile.am delete mode 100644 kerberosV/src/appl/telnet/Makefile.in delete mode 100644 kerberosV/src/appl/telnet/NTMakefile delete mode 100644 kerberosV/src/appl/telnet/README.ORIG delete mode 100644 kerberosV/src/appl/telnet/arpa/telnet.h delete mode 100644 kerberosV/src/appl/telnet/libtelnet/Makefile.am delete mode 100644 kerberosV/src/appl/telnet/libtelnet/Makefile.in delete mode 100644 kerberosV/src/appl/telnet/libtelnet/NTMakefile delete mode 100644 kerberosV/src/appl/telnet/libtelnet/auth-proto.h delete mode 100644 kerberosV/src/appl/telnet/libtelnet/auth.c delete mode 100644 kerberosV/src/appl/telnet/libtelnet/auth.h delete mode 100644 kerberosV/src/appl/telnet/libtelnet/enc-proto.h delete mode 100644 kerberosV/src/appl/telnet/libtelnet/enc_des.c delete mode 100644 kerberosV/src/appl/telnet/libtelnet/encrypt.c delete mode 100644 kerberosV/src/appl/telnet/libtelnet/encrypt.h delete mode 100644 kerberosV/src/appl/telnet/libtelnet/genget.c delete mode 100644 kerberosV/src/appl/telnet/libtelnet/kerberos5.c delete mode 100644 kerberosV/src/appl/telnet/libtelnet/misc-proto.h delete mode 100644 kerberosV/src/appl/telnet/libtelnet/misc.c delete mode 100644 kerberosV/src/appl/telnet/libtelnet/misc.h delete mode 100644 kerberosV/src/appl/telnet/libtelnet/rsaencpwd.c delete mode 100644 kerberosV/src/appl/telnet/libtelnet/spx.c delete mode 100644 kerberosV/src/appl/telnet/telnet.state delete mode 100644 kerberosV/src/appl/telnet/telnet/Makefile.am delete mode 100644 kerberosV/src/appl/telnet/telnet/Makefile.in delete mode 100644 kerberosV/src/appl/telnet/telnet/NTMakefile delete mode 100644 kerberosV/src/appl/telnet/telnet/authenc.c delete mode 100644 kerberosV/src/appl/telnet/telnet/commands.c delete mode 100644 kerberosV/src/appl/telnet/telnet/defines.h delete mode 100644 kerberosV/src/appl/telnet/telnet/externs.h delete mode 100644 kerberosV/src/appl/telnet/telnet/main.c delete mode 100644 kerberosV/src/appl/telnet/telnet/network.c delete mode 100644 kerberosV/src/appl/telnet/telnet/ring.c delete mode 100644 kerberosV/src/appl/telnet/telnet/ring.h delete mode 100644 kerberosV/src/appl/telnet/telnet/sys_bsd.c delete mode 100644 kerberosV/src/appl/telnet/telnet/telnet.1 delete mode 100644 kerberosV/src/appl/telnet/telnet/telnet.c delete mode 100644 kerberosV/src/appl/telnet/telnet/telnet.cat1 delete mode 100644 kerberosV/src/appl/telnet/telnet/telnet_locl.h delete mode 100644 kerberosV/src/appl/telnet/telnet/terminal.c delete mode 100644 kerberosV/src/appl/telnet/telnet/types.h delete mode 100644 kerberosV/src/appl/telnet/telnet/utilities.c delete mode 100644 kerberosV/src/appl/telnet/telnetd/Makefile.am delete mode 100644 kerberosV/src/appl/telnet/telnetd/Makefile.in delete mode 100644 kerberosV/src/appl/telnet/telnetd/NTMakefile delete mode 100644 kerberosV/src/appl/telnet/telnetd/authenc.c delete mode 100644 kerberosV/src/appl/telnet/telnetd/defs.h delete mode 100644 kerberosV/src/appl/telnet/telnetd/ext.h delete mode 100644 kerberosV/src/appl/telnet/telnetd/global.c delete mode 100644 kerberosV/src/appl/telnet/telnetd/slc.c delete mode 100644 kerberosV/src/appl/telnet/telnetd/state.c delete mode 100644 kerberosV/src/appl/telnet/telnetd/sys_term.c delete mode 100644 kerberosV/src/appl/telnet/telnetd/telnetd.8 delete mode 100644 kerberosV/src/appl/telnet/telnetd/telnetd.c delete mode 100644 kerberosV/src/appl/telnet/telnetd/telnetd.cat8 delete mode 100644 kerberosV/src/appl/telnet/telnetd/telnetd.h delete mode 100644 kerberosV/src/appl/telnet/telnetd/termstat.c delete mode 100644 kerberosV/src/appl/telnet/telnetd/utility.c delete mode 100644 kerberosV/src/appl/test/Makefile.am delete mode 100644 kerberosV/src/appl/test/Makefile.in delete mode 100644 kerberosV/src/appl/test/NTMakefile delete mode 100644 kerberosV/src/appl/test/common.c delete mode 100644 kerberosV/src/appl/test/gss_common.c delete mode 100644 kerberosV/src/appl/test/gss_common.h delete mode 100644 kerberosV/src/appl/test/gssapi_client.c delete mode 100644 kerberosV/src/appl/test/gssapi_server.c delete mode 100644 kerberosV/src/appl/test/http_client.c delete mode 100644 kerberosV/src/appl/test/nt_gss_client.c delete mode 100644 kerberosV/src/appl/test/nt_gss_common.c delete mode 100644 kerberosV/src/appl/test/nt_gss_common.h delete mode 100644 kerberosV/src/appl/test/nt_gss_server.c delete mode 100644 kerberosV/src/appl/test/tcp_client.c delete mode 100644 kerberosV/src/appl/test/tcp_server.c delete mode 100644 kerberosV/src/appl/test/test_locl.h delete mode 100644 kerberosV/src/appl/test/uu_client.c delete mode 100644 kerberosV/src/appl/test/uu_server.c delete mode 100644 kerberosV/src/appl/xnlock/ChangeLog delete mode 100644 kerberosV/src/appl/xnlock/Makefile.am delete mode 100644 kerberosV/src/appl/xnlock/Makefile.in delete mode 100644 kerberosV/src/appl/xnlock/NTMakefile delete mode 100644 kerberosV/src/appl/xnlock/README delete mode 100644 kerberosV/src/appl/xnlock/nose.0.left delete mode 100644 kerberosV/src/appl/xnlock/nose.0.right delete mode 100644 kerberosV/src/appl/xnlock/nose.1.left delete mode 100644 kerberosV/src/appl/xnlock/nose.1.right delete mode 100644 kerberosV/src/appl/xnlock/nose.down delete mode 100644 kerberosV/src/appl/xnlock/nose.front delete mode 100644 kerberosV/src/appl/xnlock/nose.left.front delete mode 100644 kerberosV/src/appl/xnlock/nose.right.front delete mode 100644 kerberosV/src/appl/xnlock/xnlock.1 delete mode 100644 kerberosV/src/appl/xnlock/xnlock.c delete mode 100644 kerberosV/src/appl/xnlock/xnlock.cat1 delete mode 100755 kerberosV/src/autogen.sh delete mode 100644 kerberosV/src/base/Makefile.am delete mode 100644 kerberosV/src/base/Makefile.in delete mode 100644 kerberosV/src/base/NTMakefile delete mode 100644 kerberosV/src/base/array.c delete mode 100644 kerberosV/src/base/baselocl.h delete mode 100644 kerberosV/src/base/bool.c delete mode 100644 kerberosV/src/base/dict.c delete mode 100644 kerberosV/src/base/heimbase.c delete mode 100644 kerberosV/src/base/heimbase.h delete mode 100644 kerberosV/src/base/heimbasepriv.h delete mode 100644 kerberosV/src/base/heimqueue.h delete mode 100644 kerberosV/src/base/null.c delete mode 100644 kerberosV/src/base/number.c delete mode 100644 kerberosV/src/base/string.c delete mode 100644 kerberosV/src/base/test_base.c delete mode 100644 kerberosV/src/base/version-script.map delete mode 100644 kerberosV/src/cf/ChangeLog delete mode 100644 kerberosV/src/cf/Makefile.am.common delete mode 100644 kerberosV/src/cf/aix.m4 delete mode 100644 kerberosV/src/cf/auth-modules.m4 delete mode 100644 kerberosV/src/cf/broken-getaddrinfo.m4 delete mode 100644 kerberosV/src/cf/broken-glob.m4 delete mode 100644 kerberosV/src/cf/broken-realloc.m4 delete mode 100644 kerberosV/src/cf/broken-snprintf.m4 delete mode 100644 kerberosV/src/cf/broken.m4 delete mode 100644 kerberosV/src/cf/broken2.m4 delete mode 100644 kerberosV/src/cf/c-attribute.m4 delete mode 100644 kerberosV/src/cf/c-function.m4 delete mode 100644 kerberosV/src/cf/capabilities.m4 delete mode 100644 kerberosV/src/cf/check-compile-et.m4 delete mode 100644 kerberosV/src/cf/check-getpwnam_r-posix.m4 delete mode 100644 kerberosV/src/cf/check-man.m4 delete mode 100644 kerberosV/src/cf/check-netinet-ip-and-tcp.m4 delete mode 100644 kerberosV/src/cf/check-type-extra.m4 delete mode 100644 kerberosV/src/cf/check-var.m4 delete mode 100644 kerberosV/src/cf/check-x.m4 delete mode 100644 kerberosV/src/cf/check-xau.m4 delete mode 100644 kerberosV/src/cf/crypto.m4 delete mode 100644 kerberosV/src/cf/db.m4 delete mode 100644 kerberosV/src/cf/destdirs.m4 delete mode 100644 kerberosV/src/cf/dispatch.m4 delete mode 100644 kerberosV/src/cf/dlopen.m4 delete mode 100644 kerberosV/src/cf/find-func-no-libs.m4 delete mode 100644 kerberosV/src/cf/find-func-no-libs2.m4 delete mode 100644 kerberosV/src/cf/find-func.m4 delete mode 100644 kerberosV/src/cf/find-if-not-broken.m4 delete mode 100644 kerberosV/src/cf/framework-security.m4 delete mode 100644 kerberosV/src/cf/have-pragma-weak.m4 delete mode 100644 kerberosV/src/cf/have-struct-field.m4 delete mode 100644 kerberosV/src/cf/have-type.m4 delete mode 100644 kerberosV/src/cf/have-types.m4 delete mode 100644 kerberosV/src/cf/install-catman.sh delete mode 100644 kerberosV/src/cf/irix.m4 delete mode 100644 kerberosV/src/cf/krb-bigendian.m4 delete mode 100644 kerberosV/src/cf/krb-func-getcwd-broken.m4 delete mode 100644 kerberosV/src/cf/krb-func-getlogin.m4 delete mode 100644 kerberosV/src/cf/krb-ipv6.m4 delete mode 100644 kerberosV/src/cf/krb-prog-ln-s.m4 delete mode 100644 kerberosV/src/cf/krb-prog-ranlib.m4 delete mode 100644 kerberosV/src/cf/krb-prog-yacc.m4 delete mode 100644 kerberosV/src/cf/krb-readline.m4 delete mode 100644 kerberosV/src/cf/krb-struct-spwd.m4 delete mode 100644 kerberosV/src/cf/krb-struct-winsize.m4 delete mode 100644 kerberosV/src/cf/krb-sys-aix.m4 delete mode 100644 kerberosV/src/cf/krb-sys-nextstep.m4 delete mode 100644 kerberosV/src/cf/krb-version.m4 delete mode 100644 kerberosV/src/cf/largefile.m4 delete mode 100644 kerberosV/src/cf/libtool.m4 delete mode 100644 kerberosV/src/cf/ltoptions.m4 delete mode 100644 kerberosV/src/cf/ltsugar.m4 delete mode 100644 kerberosV/src/cf/ltversion.m4 delete mode 100644 kerberosV/src/cf/lt~obsolete.m4 delete mode 100644 kerberosV/src/cf/make-proto.pl delete mode 100644 kerberosV/src/cf/mips-abi.m4 delete mode 100644 kerberosV/src/cf/misc.m4 delete mode 100644 kerberosV/src/cf/need-proto.m4 delete mode 100644 kerberosV/src/cf/osfc2.m4 delete mode 100644 kerberosV/src/cf/otp.m4 delete mode 100644 kerberosV/src/cf/pkg.m4 delete mode 100644 kerberosV/src/cf/proto-compat.m4 delete mode 100644 kerberosV/src/cf/pthreads.m4 delete mode 100644 kerberosV/src/cf/resolv.m4 delete mode 100644 kerberosV/src/cf/retsigtype.m4 delete mode 100644 kerberosV/src/cf/roken-frag.m4 delete mode 100644 kerberosV/src/cf/roken.m4 delete mode 100644 kerberosV/src/cf/socket-wrapper.m4 delete mode 100644 kerberosV/src/cf/sunos.m4 delete mode 100644 kerberosV/src/cf/telnet.m4 delete mode 100644 kerberosV/src/cf/test-package.m4 delete mode 100644 kerberosV/src/cf/valgrind-suppressions delete mode 100644 kerberosV/src/cf/vararray.m4 delete mode 100644 kerberosV/src/cf/version-script.m4 delete mode 100644 kerberosV/src/cf/wflags.m4 delete mode 100644 kerberosV/src/cf/win32.m4 delete mode 100644 kerberosV/src/cf/with-all.m4 delete mode 100755 kerberosV/src/compile delete mode 100644 kerberosV/src/config.guess delete mode 100644 kerberosV/src/config.sub delete mode 100644 kerberosV/src/configure delete mode 100644 kerberosV/src/configure.ac delete mode 100755 kerberosV/src/depcomp delete mode 100644 kerberosV/src/doc/Makefile.am delete mode 100644 kerberosV/src/doc/Makefile.in delete mode 100644 kerberosV/src/doc/NTMakefile delete mode 100644 kerberosV/src/doc/ack.texi delete mode 100644 kerberosV/src/doc/apps.texi delete mode 100644 kerberosV/src/doc/copyright.texi delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/doxygen.css delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/doxygen.png delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/graph_legend.dot delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/graph_legend.html delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/graph_legend.png delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/group__gssapi.html delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/gssapi_mechs_intro.html delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/gssapi_services_intro.html delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/index.html delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/internalvsmechname.html delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/modules.html delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/pages.html delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/tab_b.gif delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/tab_l.gif delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/tab_r.gif delete mode 100644 kerberosV/src/doc/doxyout/gssapi/html/tabs.css delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/__gss_c_attr_stream_sizes_oid_desc.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_add_oid_set_member.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_canonicalize_name.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_import_name.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_init_sec_context.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_inquire_attrs_for_mech.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_inquire_saslname_for_mech.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_oid_equal.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_cred.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_iov_buffer.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_name.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_unwrap_iov.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap_iov.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap_iov_length.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi_mechs_intro.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi_services_intro.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/man/man3/internalvsmechname.3 delete mode 100644 kerberosV/src/doc/doxyout/gssapi/manpages delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/doxygen.css delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/doxygen.png delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/example__evp__cipher_8c-example.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/examples.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.dot delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.png delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__core.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__des.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__dh.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__evp.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__misc.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__rand.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__rsa.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/index.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/modules.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/page_des.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/page_dh.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/page_evp.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/page_rand.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/page_rsa.html delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/tab_b.gif delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/tab_l.gif delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/tab_r.gif delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/html/tabs.css delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cbc_cksum.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cbc_encrypt.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cfb64_encrypt.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_check_key_parity.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ecb3_encrypt.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ecb_encrypt.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ede3_cbc_encrypt.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_encrypt.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_init_random_number_generator.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_is_weak_key.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_key_sched.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_new_random_key.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_pcbc_encrypt.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_random_key.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key_checked.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key_unchecked.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_odd_parity.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_string_to_key.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_check_pubkey.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_compute_key.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_generate_key.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_generate_parameters_ex.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_get_default_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_get_ex_data.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_ltm_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_new.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_new_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_null_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_default_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_ex_data.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_size.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_up_ref.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_BytesToKey.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_block_size.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_cipher.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_cleanup.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_ctrl.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_get_app_data.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_init.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_iv_length.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_key_length.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_mode.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_rand_key.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_set_app_data.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_set_key_length.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_block_size.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_iv_length.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_key_length.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherFinal_ex.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherInit_ex.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherUpdate.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_Digest.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestFinal_ex.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestInit_ex.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestUpdate.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_block_size.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_cleanup.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_create.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_destroy.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_init.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_md.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_size.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_block_size.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_size.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_128_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_128_cfb8.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_192_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_192_cfb8.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_256_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_256_cfb8.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_128_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_192_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_256_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_des_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_des_ede3_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_enc_null.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_get_cipherbyname.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_128_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_128_cfb8.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_192_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_192_cfb8.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_256_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_256_cfb8.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_128_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_192_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_256_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_des_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_des_ede3_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md2.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md4.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md5.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_40_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_64_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha1.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha256.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha384.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha512.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md2.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md4.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md5.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md_null.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_40_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_64_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc4.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc4_40.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha1.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha256.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha384.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha512.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_wincrypt_des_ede3_cbc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms_conf.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms_noconf.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/PKCS5_PBKDF2_HMAC_SHA1.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_add.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_bytes.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_cleanup.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_file_name.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_get_rand_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_load_file.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_pseudo_bytes.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_seed.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_set_rand_engine.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_set_rand_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_status.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_write_file.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_get_app_data.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_get_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_new.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_new_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_set_app_data.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_set_method.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_up_ref.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_core.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_des.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_dh.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_evp.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_misc.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_rand.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_rsa.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/page_des.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/page_dh.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/page_evp.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/page_rand.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/man/man3/page_rsa.3 delete mode 100644 kerberosV/src/doc/doxyout/hcrypto/manpages delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/annotated.html delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/doxygen.css delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/doxygen.png delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/functions.html delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/functions_vars.html delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/graph_legend.dot delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/graph_legend.html delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/graph_legend.png delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/index.html delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/struct_h_d_b.html delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/structhdb__entry__ex.html delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/tab_b.gif delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/tab_l.gif delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/tab_r.gif delete mode 100644 kerberosV/src/doc/doxyout/hdb/html/tabs.css delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/HDB.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb__del.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb__get.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb__put.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_auth_status.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_constrained_delegation.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_pkinit_ms_upn_match.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_s4u2self.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_close.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_destroy.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_entry_ex.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_fetch_kvno.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_firstkey.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_get_realms.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_lock.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_name.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_nextkey.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_open.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_password.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_remove.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_rename.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_store.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/man/man3/hdb_unlock.3 delete mode 100644 kerberosV/src/doc/doxyout/hdb/manpages delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/doxygen.css delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/doxygen.png delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/graph_legend.dot delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/graph_legend.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/graph_legend.png delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__ca.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__cert.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__cms.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__crypto.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__env.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__error.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__keyset.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__lock.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__misc.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__name.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__peer.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__print.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__query.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__revoke.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/group__hx509__verify.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/index.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/modules.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_ca.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_cert.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_cms.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_env.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_error.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_keyset.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_lock.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_name.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_peer.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_print.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/page_revoke.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/pages.html delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/tab_b.gif delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/tab_l.gif delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/tab_r.gif delete mode 100644 kerberosV/src/doc/doxyout/hx509/html/tabs.css delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_bitstring_print.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_sign.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_sign_self.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_crl_dp_uri.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_eku.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_hostname.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_jid.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_ms_upn.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_otherName.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_pkinit.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_rfc822name.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_init.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_ca.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_domaincontroller.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notAfter.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notAfter_lifetime.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notBefore.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_proxy.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_serialnumber.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_spki.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_subject.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_template.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_unique.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_subject_expand.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_template_units.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_binary.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_check_eku.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_cmp.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_find_subjectAltName_otherName.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_SPKI.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_SPKI_AlgorithmIdentifier.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_attribute.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_base_subject.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_friendly_name.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_issuer.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_issuer_unique_id.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_notAfter.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_notBefore.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_serialnumber.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_subject.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_subject_unique_id.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_init.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_init_data.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_keyusage_print.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_ref.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_set_friendly_name.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_add.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_append.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_end_seq.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_filter.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_find.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_info.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_init.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_iter_f.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_merge.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_next_cert.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_start_seq.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_store.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ci_print_names.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_clear_error_string.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_create_signed_1.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_envelope_1.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_unenvelope.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_unwrap_ContentInfo.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_verify_signed.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_wrap_ContentInfo.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_init.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_set_missing_revoke.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_add_revoked_certs.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_alloc.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_lifetime.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_sign.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crypto.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_add.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_add_binding.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_find.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_find_binding.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_lfind.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_err.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_error.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_free_error_string.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_free_octet_string_list.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_general_name_unparse.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_get_error_string.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_get_one_cert.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_keyset.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_lock.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_misc.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_binary.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_cmp.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_copy.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_expand.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_is_null_p.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_to_Name.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_to_string.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ocsp_request.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ocsp_verify.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_oid_print.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_oid_sprint.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_parse_name.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_add_cms_alg.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_alloc.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_set_cert.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_set_cms_algs.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print_cert.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print_stdout.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_alloc.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_cmp_func.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_eku.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_friendly_name.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_issuer_serial.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_option.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_statistic_file.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_unparse_stats.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_add_crl.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_add_ocsp.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_init.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_ocsp_print.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_verify.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_set_error_string.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_set_error_stringv.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_unparse_der_name.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_cert.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_add_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_free.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_init.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_set_print.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_attach_anchors.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_attach_revoke.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_ctx_f_allow_default_trustanchors.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_destroy_ctx.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_hostname.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_init_ctx.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_path.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_max_depth.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_proxy_certificate.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_strict_rfc3280_verification.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_time.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_signature.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/hx509_xfree.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_ca.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_cert.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_cms.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_env.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_error.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_keyset.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_lock.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_name.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_peer.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_print.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/man/man3/page_revoke.3 delete mode 100644 kerberosV/src/doc/doxyout/hx509/manpages delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/annotated.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/doxygen.css delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/doxygen.png delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/graph_legend.dot delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/graph_legend.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/graph_legend.png delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__address.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__auth.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__ccache.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__credential.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__crypto.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__deprecated.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__digest.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__error.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__keytab.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__pac.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__principal.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__storage.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__support.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__ticket.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/group__krb5__v4compat.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/index.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/krb5_ccache_intro.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/krb5_fileformats.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/krb5_init_creds_intro.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/krb5_introduction.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/krb5_keytab_intro.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/krb5_principal_intro.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/modules.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/pages.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/structkrb5__crypto__iov.html delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/tab_b.gif delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/tab_l.gif delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/tab_r.gif delete mode 100644 kerberosV/src/doc/doxyout/krb5/html/tabs.css delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb524_convert_creds_kdc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb524_convert_creds_kdc_ccache.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acc_ops.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acl_match_file.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acl_match_string.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_et_list.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_extra_addresses.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_ignore_addresses.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_addr2sockaddr.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_compare.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_order.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_prefixlen_boundary.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_search.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_allow_weak_crypto.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_anyaddr.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_append_addresses.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_auth.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_auth_getremoteseqnumber.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_build_principal.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_c_enctype_compare.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_end_seq_get.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_get_first.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_match.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_next.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_clear_mcred.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_close.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_cache.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_creds.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_match_f.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_default.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_default_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_destroy.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_end_seq_get.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_gen_new.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_config.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_friendly_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_full_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_kdc_offset.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_lifetime.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_ops.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_prefix_ops.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_principal.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_type.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_version.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_initialize.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_last_change_time.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_move.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_new_unique.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_next_cred.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_register.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_remove_cred.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_resolve.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_retrieve_cred.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_config.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_default_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_friendly_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_kdc_offset.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_start_seq_get.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_store_cred.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_support_switch.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_switch.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ccache.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ccache_intro.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_free.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_new.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_next.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_last_change_time.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_change_password.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cksumtype_to_enctype.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_clear_error_message.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_clear_error_string.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_compare_creds.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_file_free.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_free_strings.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_bool.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_bool_default.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_list.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_string.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_string_default.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_strings.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_time.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_time_default.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_parse_file_multi.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_parse_string_multi.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_bool.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_bool_default.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_list.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_string.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_string_default.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_strings.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_time.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_time_default.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_address.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_addresses.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_context.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_creds.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_creds_contents.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_data.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_host_realm.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_keyblock.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_keyblock_contents.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_principal.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_ticket.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_create_checksum_iov.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_credential.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_creds_get_ticket_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_destroy.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_fx_cf2.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getblocksize.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getconfoundersize.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getenctype.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getpadsize.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_init.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_iov.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_alloc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_cmp.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_copy.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_ct_cmp.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_free.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_realloc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_zero.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_decrypt_iov_ivec.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_deprecated.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_digest.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_digest_probe.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_eai_to_heim_errno.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_encrypt_iov_ivec.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_disable.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_enable.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_valid.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctypes_compatible_keys.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_error.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_expand_hostname.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_expand_hostname_realms.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fcc_ops.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fileformats.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_address.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_addresses.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_config_files.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_context.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_cred_contents.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_creds.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_creds_contents.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_data.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_data_contents.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_error_string.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_host_realm.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_keyblock.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_keyblock_contents.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_principal.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_ticket.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_unparsed_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fwd_tgt_creds.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_generate_subkey.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_generate_subkey_extended.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_cred_from_kdc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_cred_from_kdc_opt.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_default_config_files.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_default_in_tkt_etypes.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_dns_canonicalize_hostname.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_extra_addresses.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_fcache_version.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_forwarded_creds.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_ignore_addresses.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_keytab.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_password.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_skey.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_keyblock.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_keytab.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_alloc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_free.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_get_error.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_init.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_password.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_kdc_sec_offset.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_max_time_skew.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_use_admin_kdc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_validated_creds.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_addr2addr.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_addr2sockaddr.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_errno_to_heim_errno.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_context.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_free.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_get.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_get_error.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_init.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_intro.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_keytab.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_password.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_service.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_step.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_ets.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_introduction.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_is_config_principal.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_is_thread_safe.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kerberos_enctypes.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_get_enctype.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_init.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_zero.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab_intro.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab_key_proc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_enctypes.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_enctypes_default.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_string.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_krbhst_get_addrinfo.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_add_entry.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_close.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_compare.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_copy_entry_contents.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default_modify_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_destroy.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_end_seq_get.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_free_entry.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_entry.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_full_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_type.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_have_content.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_next_entry.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_read_service_key.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_register.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_remove_entry.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_resolve.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_start_seq_get.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kuserok.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_make_addrport.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_make_principal.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_max_sockaddr_size.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_mcc_ops.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac_get_buffer.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac_verify.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_address.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_name_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_nametype.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_password_key_proc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_plugin_register.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_prepend_config_files_default.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_princ_realm.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_princ_set_realm.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_compare.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_compare_any_realm.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_num_comp.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_realm.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_type.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_intro.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_is_krbtgt.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_match.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_set_realm.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_set_type.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_print_address.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_random_to_key.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_ctx.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_ctx_alloc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_set_keytab.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_set_pac_check.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_out_ctx_free.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_out_get_server.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_realm_compare.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_address.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_addrs.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_authdata.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_creds.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_creds_tag.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_data.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int16.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int32.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int8.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_keyblock.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_principal.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_string.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_stringz.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_times.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint16.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint32.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint8.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_config_files.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_default_in_tkt_etypes.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_dns_canonicalize_hostname.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_error_message.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_error_string.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_extra_addresses.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_fcache_version.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_home_dir_access.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_ignore_addresses.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_kdc_sec_offset.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_max_time_skew.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_password.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_real_time.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_use_admin_kdc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sname_to_principal.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr2address.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr2port.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr_uninteresting.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_clear_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_emem.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_free.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_data.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_fd.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_mem.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_readonly_mem.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_get_byteorder.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_get_eof_code.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_is_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_read.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_seek.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_byteorder.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_eof_code.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_max_alloc.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_to_data.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_truncate.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_write.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_address.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_addrs.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_authdata.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_creds.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_creds_tag.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_data.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int16.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int32.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int8.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_keyblock.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_principal.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_string.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_stringz.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_times.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint16.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint32.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint8.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_string_to_keytype.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_support.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_authorization_data_type.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_client.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_endtime.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_server.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed_short.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_flags.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_short.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_v4compat.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_verify_checksum_iov.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_vset_error_string.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/man/man3/krb5_vwarn.3 delete mode 100644 kerberosV/src/doc/doxyout/krb5/manpages delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/annotated.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/doxygen.css delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/doxygen.png delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/examples.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/functions.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/functions_vars.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/graph_legend.dot delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/graph_legend.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/graph_legend.png delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/group__ntlm__core.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/index.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/modules.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/structntlm__buf.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/structntlm__type1.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.map delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.md5 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.png delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.map delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.md5 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.png delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/tab_b.gif delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/tab_l.gif delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/tab_r.gif delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/tabs.css delete mode 100644 kerberosV/src/doc/doxyout/ntlm/html/test__ntlm_8c-example.html delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/challenge.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/context.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/data.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/domain.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/flags.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_build_ntlm1_master.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_build_ntlm2_master.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_lm2.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_ntlm1.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_ntlm2.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_decode_targetinfo.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_targetinfo.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type1.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type2.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type3.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_buf.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_targetinfo.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type1.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type2.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type3.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_keyex_unwrap.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_nt_key.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_ntlmv2_key.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_verify_ntlm2.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/hostname.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/length.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/lm.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_buf.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_core.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type1.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type2.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type3.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/os.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/sessionkey.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/targetinfo.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/targetname.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/username.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/man/man3/ws.3 delete mode 100644 kerberosV/src/doc/doxyout/ntlm/manpages delete mode 100644 kerberosV/src/doc/doxyout/wind/html/doxygen.css delete mode 100644 kerberosV/src/doc/doxyout/wind/html/doxygen.png delete mode 100644 kerberosV/src/doc/doxyout/wind/html/graph_legend.dot delete mode 100644 kerberosV/src/doc/doxyout/wind/html/graph_legend.html delete mode 100644 kerberosV/src/doc/doxyout/wind/html/graph_legend.png delete mode 100644 kerberosV/src/doc/doxyout/wind/html/group__wind.html delete mode 100644 kerberosV/src/doc/doxyout/wind/html/index.html delete mode 100644 kerberosV/src/doc/doxyout/wind/html/modules.html delete mode 100644 kerberosV/src/doc/doxyout/wind/html/tab_b.gif delete mode 100644 kerberosV/src/doc/doxyout/wind/html/tab_l.gif delete mode 100644 kerberosV/src/doc/doxyout/wind/html/tab_r.gif delete mode 100644 kerberosV/src/doc/doxyout/wind/html/tabs.css delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_profile.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_punycode_label_toascii.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_stringprep.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2read.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2utf8.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2utf8_length.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2write.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs4utf8.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs4utf8_length.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs2.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs2_length.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs4.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs4_length.3 delete mode 100644 kerberosV/src/doc/doxyout/wind/manpages delete mode 100644 kerberosV/src/doc/doxytmpl.dxy delete mode 100644 kerberosV/src/doc/footer.html delete mode 100644 kerberosV/src/doc/gssapi.din delete mode 100644 kerberosV/src/doc/hcrypto.din delete mode 100644 kerberosV/src/doc/hdb.din delete mode 100644 kerberosV/src/doc/header.html delete mode 100644 kerberosV/src/doc/heimdal.css delete mode 100644 kerberosV/src/doc/heimdal.info delete mode 100644 kerberosV/src/doc/heimdal.texi delete mode 100644 kerberosV/src/doc/hx509.din delete mode 100644 kerberosV/src/doc/hx509.info delete mode 100644 kerberosV/src/doc/hx509.texi delete mode 100644 kerberosV/src/doc/init-creds delete mode 100644 kerberosV/src/doc/install.texi delete mode 100644 kerberosV/src/doc/intro.texi delete mode 100644 kerberosV/src/doc/kerberos4.texi delete mode 100644 kerberosV/src/doc/krb5.din delete mode 100644 kerberosV/src/doc/latin1.tex delete mode 100644 kerberosV/src/doc/layman.asc delete mode 100644 kerberosV/src/doc/mdate-sh delete mode 100644 kerberosV/src/doc/migration.texi delete mode 100644 kerberosV/src/doc/misc.texi delete mode 100644 kerberosV/src/doc/ntlm.din delete mode 100644 kerberosV/src/doc/programming.texi delete mode 100644 kerberosV/src/doc/setup.texi delete mode 100755 kerberosV/src/doc/vars.texi delete mode 100644 kerberosV/src/doc/vars.tin delete mode 100644 kerberosV/src/doc/whatis.texi delete mode 100644 kerberosV/src/doc/win2k.texi delete mode 100644 kerberosV/src/doc/wind.din delete mode 100644 kerberosV/src/etc/Makefile.am delete mode 100644 kerberosV/src/etc/Makefile.in delete mode 100644 kerberosV/src/etc/NTMakefile delete mode 100644 kerberosV/src/etc/services.append delete mode 100644 kerberosV/src/include/Makefile.am delete mode 100644 kerberosV/src/include/Makefile.in delete mode 100644 kerberosV/src/include/NTMakefile delete mode 100644 kerberosV/src/include/bits.c delete mode 100644 kerberosV/src/include/config.h.in delete mode 100644 kerberosV/src/include/crypto-headers.h delete mode 100644 kerberosV/src/include/gssapi/Makefile.am delete mode 100644 kerberosV/src/include/gssapi/Makefile.in delete mode 100644 kerberosV/src/include/gssapi/NTMakefile delete mode 100644 kerberosV/src/include/hcrypto/Makefile.am delete mode 100644 kerberosV/src/include/hcrypto/Makefile.in delete mode 100644 kerberosV/src/include/hcrypto/NTMakefile delete mode 100644 kerberosV/src/include/heim_threads.h delete mode 100644 kerberosV/src/include/kadm5/Makefile.am delete mode 100644 kerberosV/src/include/kadm5/Makefile.in delete mode 100644 kerberosV/src/include/kadm5/NTMakefile delete mode 100644 kerberosV/src/include/krb5-types.cross delete mode 100644 kerberosV/src/install-sh delete mode 100644 kerberosV/src/kadmin/ChangeLog delete mode 100644 kerberosV/src/kadmin/Makefile.am delete mode 100644 kerberosV/src/kadmin/Makefile.in delete mode 100644 kerberosV/src/kadmin/NTMakefile delete mode 100644 kerberosV/src/kadmin/add-random-users.c delete mode 100644 kerberosV/src/kadmin/add_enctype.c delete mode 100644 kerberosV/src/kadmin/ank.c delete mode 100644 kerberosV/src/kadmin/check.c delete mode 100644 kerberosV/src/kadmin/cpw.c delete mode 100644 kerberosV/src/kadmin/del.c delete mode 100644 kerberosV/src/kadmin/del_enctype.c delete mode 100644 kerberosV/src/kadmin/dump.c delete mode 100644 kerberosV/src/kadmin/ext.c delete mode 100644 kerberosV/src/kadmin/get.c delete mode 100644 kerberosV/src/kadmin/init.c delete mode 100644 kerberosV/src/kadmin/kadm_conn.c delete mode 100644 kerberosV/src/kadmin/kadmin-commands.in delete mode 100644 kerberosV/src/kadmin/kadmin-version.rc delete mode 100644 kerberosV/src/kadmin/kadmin.8 delete mode 100644 kerberosV/src/kadmin/kadmin.c delete mode 100644 kerberosV/src/kadmin/kadmin.cat8 delete mode 100644 kerberosV/src/kadmin/kadmin_locl.h delete mode 100644 kerberosV/src/kadmin/kadmind-version.rc delete mode 100644 kerberosV/src/kadmin/kadmind.8 delete mode 100644 kerberosV/src/kadmin/kadmind.c delete mode 100644 kerberosV/src/kadmin/kadmind.cat8 delete mode 100644 kerberosV/src/kadmin/load.c delete mode 100644 kerberosV/src/kadmin/mod.c delete mode 100644 kerberosV/src/kadmin/pw_quality.c delete mode 100644 kerberosV/src/kadmin/random_password.c delete mode 100644 kerberosV/src/kadmin/rename.c delete mode 100644 kerberosV/src/kadmin/rpc.c delete mode 100644 kerberosV/src/kadmin/server.c delete mode 100644 kerberosV/src/kadmin/stash.c delete mode 100644 kerberosV/src/kadmin/test_util.c delete mode 100644 kerberosV/src/kadmin/util.c delete mode 100644 kerberosV/src/kcm/Makefile.am delete mode 100644 kerberosV/src/kcm/Makefile.in delete mode 100644 kerberosV/src/kcm/NTMakefile delete mode 100644 kerberosV/src/kcm/acl.c delete mode 100644 kerberosV/src/kcm/acquire.c delete mode 100644 kerberosV/src/kcm/cache.c delete mode 100644 kerberosV/src/kcm/client.c delete mode 100644 kerberosV/src/kcm/config.c delete mode 100644 kerberosV/src/kcm/connect.c delete mode 100644 kerberosV/src/kcm/events.c delete mode 100644 kerberosV/src/kcm/glue.c delete mode 100644 kerberosV/src/kcm/headers.h delete mode 100644 kerberosV/src/kcm/kcm-protos.h delete mode 100644 kerberosV/src/kcm/kcm.8 delete mode 100644 kerberosV/src/kcm/kcm.cat8 delete mode 100644 kerberosV/src/kcm/kcm_locl.h delete mode 100644 kerberosV/src/kcm/log.c delete mode 100644 kerberosV/src/kcm/main.c delete mode 100644 kerberosV/src/kcm/protocol.c delete mode 100644 kerberosV/src/kcm/renew.c delete mode 100644 kerberosV/src/kcm/sessions.c delete mode 100644 kerberosV/src/kdc/Makefile.am delete mode 100644 kerberosV/src/kdc/Makefile.in delete mode 100644 kerberosV/src/kdc/NTMakefile delete mode 100644 kerberosV/src/kdc/announce.c delete mode 100644 kerberosV/src/kdc/config.c delete mode 100644 kerberosV/src/kdc/connect.c delete mode 100644 kerberosV/src/kdc/default_config.c delete mode 100644 kerberosV/src/kdc/digest-service.c delete mode 100644 kerberosV/src/kdc/digest.c delete mode 100644 kerberosV/src/kdc/headers.h delete mode 100644 kerberosV/src/kdc/hprop-version.rc delete mode 100644 kerberosV/src/kdc/hprop.8 delete mode 100644 kerberosV/src/kdc/hprop.c delete mode 100644 kerberosV/src/kdc/hprop.cat8 delete mode 100644 kerberosV/src/kdc/hprop.h delete mode 100644 kerberosV/src/kdc/hpropd-version.rc delete mode 100644 kerberosV/src/kdc/hpropd.8 delete mode 100644 kerberosV/src/kdc/hpropd.c delete mode 100644 kerberosV/src/kdc/hpropd.cat8 delete mode 100644 kerberosV/src/kdc/kdc-private.h delete mode 100644 kerberosV/src/kdc/kdc-protos.h delete mode 100644 kerberosV/src/kdc/kdc-replay.c delete mode 100644 kerberosV/src/kdc/kdc-version.rc delete mode 100644 kerberosV/src/kdc/kdc.8 delete mode 100644 kerberosV/src/kdc/kdc.cat8 delete mode 100644 kerberosV/src/kdc/kdc.h delete mode 100644 kerberosV/src/kdc/kdc_locl.h delete mode 100644 kerberosV/src/kdc/kerberos5.c delete mode 100644 kerberosV/src/kdc/krb5tgs.c delete mode 100644 kerberosV/src/kdc/kstash-version.rc delete mode 100644 kerberosV/src/kdc/kstash.8 delete mode 100644 kerberosV/src/kdc/kstash.c delete mode 100644 kerberosV/src/kdc/kstash.cat8 delete mode 100644 kerberosV/src/kdc/kx509.c delete mode 100644 kerberosV/src/kdc/libkdc-exports.def delete mode 100644 kerberosV/src/kdc/libkdc-version.rc delete mode 100644 kerberosV/src/kdc/log.c delete mode 100644 kerberosV/src/kdc/main.c delete mode 100644 kerberosV/src/kdc/misc.c delete mode 100644 kerberosV/src/kdc/mit_dump.c delete mode 100644 kerberosV/src/kdc/pkinit.c delete mode 100644 kerberosV/src/kdc/process.c delete mode 100644 kerberosV/src/kdc/rx.h delete mode 100644 kerberosV/src/kdc/set_dbinfo.c delete mode 100644 kerberosV/src/kdc/string2key-version.rc delete mode 100644 kerberosV/src/kdc/string2key.8 delete mode 100644 kerberosV/src/kdc/string2key.c delete mode 100644 kerberosV/src/kdc/string2key.cat8 delete mode 100644 kerberosV/src/kdc/version-script.map delete mode 100644 kerberosV/src/kdc/windc.c delete mode 100644 kerberosV/src/kdc/windc_plugin.h delete mode 100644 kerberosV/src/kpasswd/Makefile.am delete mode 100644 kerberosV/src/kpasswd/Makefile.in delete mode 100644 kerberosV/src/kpasswd/NTMakefile delete mode 100644 kerberosV/src/kpasswd/kpasswd-generator.c delete mode 100644 kerberosV/src/kpasswd/kpasswd.1 delete mode 100644 kerberosV/src/kpasswd/kpasswd.c delete mode 100644 kerberosV/src/kpasswd/kpasswd.cat1 delete mode 100644 kerberosV/src/kpasswd/kpasswd_locl.h delete mode 100644 kerberosV/src/kpasswd/kpasswdd.8 delete mode 100644 kerberosV/src/kpasswd/kpasswdd.c delete mode 100644 kerberosV/src/kpasswd/kpasswdd.cat8 delete mode 100644 kerberosV/src/krb5.conf delete mode 100644 kerberosV/src/kuser/Makefile.am delete mode 100644 kerberosV/src/kuser/Makefile.in delete mode 100644 kerberosV/src/kuser/NTMakefile delete mode 100644 kerberosV/src/kuser/copy_cred_cache.1 delete mode 100644 kerberosV/src/kuser/copy_cred_cache.c delete mode 100644 kerberosV/src/kuser/generate-requests.c delete mode 100644 kerberosV/src/kuser/kcc-commands.in delete mode 100644 kerberosV/src/kuser/kcc-version.rc delete mode 100644 kerberosV/src/kuser/kcc.c delete mode 100644 kerberosV/src/kuser/kdecode_ticket.c delete mode 100644 kerberosV/src/kuser/kdestroy-version.rc delete mode 100644 kerberosV/src/kuser/kdestroy.1 delete mode 100644 kerberosV/src/kuser/kdestroy.c delete mode 100644 kerberosV/src/kuser/kdestroy.cat1 delete mode 100644 kerberosV/src/kuser/kdigest-commands.in delete mode 100644 kerberosV/src/kuser/kdigest-version.rc delete mode 100644 kerberosV/src/kuser/kdigest.8 delete mode 100644 kerberosV/src/kuser/kdigest.c delete mode 100644 kerberosV/src/kuser/kdigest.cat8 delete mode 100644 kerberosV/src/kuser/kgetcred-version.rc delete mode 100644 kerberosV/src/kuser/kgetcred.1 delete mode 100644 kerberosV/src/kuser/kgetcred.c delete mode 100644 kerberosV/src/kuser/kgetcred.cat1 delete mode 100644 kerberosV/src/kuser/kimpersonate-version.rc delete mode 100644 kerberosV/src/kuser/kimpersonate.8 delete mode 100644 kerberosV/src/kuser/kimpersonate.c delete mode 100644 kerberosV/src/kuser/kimpersonate.cat8 delete mode 100644 kerberosV/src/kuser/kinit-version.rc delete mode 100644 kerberosV/src/kuser/kinit.1 delete mode 100644 kerberosV/src/kuser/kinit.c delete mode 100644 kerberosV/src/kuser/kinit.cat1 delete mode 100644 kerberosV/src/kuser/klist.1 delete mode 100644 kerberosV/src/kuser/klist.c delete mode 100644 kerberosV/src/kuser/klist.cat1 delete mode 100644 kerberosV/src/kuser/kswitch.1 delete mode 100644 kerberosV/src/kuser/kswitch.c delete mode 100644 kerberosV/src/kuser/kswitch.cat1 delete mode 100644 kerberosV/src/kuser/kuser_locl.h delete mode 100644 kerberosV/src/kuser/kverify.c delete mode 100644 kerberosV/src/lib/Makefile.am delete mode 100644 kerberosV/src/lib/Makefile.in delete mode 100644 kerberosV/src/lib/NTMakefile delete mode 100644 kerberosV/src/lib/asn1/ChangeLog delete mode 100644 kerberosV/src/lib/asn1/Makefile.am delete mode 100644 kerberosV/src/lib/asn1/Makefile.in delete mode 100644 kerberosV/src/lib/asn1/NTMakefile delete mode 100644 kerberosV/src/lib/asn1/asn1-common.h delete mode 100644 kerberosV/src/lib/asn1/asn1-template.h delete mode 100644 kerberosV/src/lib/asn1/asn1_compile-version.rc delete mode 100644 kerberosV/src/lib/asn1/asn1_err.et delete mode 100644 kerberosV/src/lib/asn1/asn1_gen.c delete mode 100644 kerberosV/src/lib/asn1/asn1_print.c delete mode 100644 kerberosV/src/lib/asn1/asn1_queue.h delete mode 100644 kerberosV/src/lib/asn1/asn1parse.y delete mode 100644 kerberosV/src/lib/asn1/canthandle.asn1 delete mode 100644 kerberosV/src/lib/asn1/check-ber.c delete mode 100644 kerberosV/src/lib/asn1/check-common.c delete mode 100644 kerberosV/src/lib/asn1/check-common.h delete mode 100644 kerberosV/src/lib/asn1/check-der.c delete mode 100644 kerberosV/src/lib/asn1/check-gen.c delete mode 100644 kerberosV/src/lib/asn1/check-template.c delete mode 100644 kerberosV/src/lib/asn1/check-timegm.c delete mode 100644 kerberosV/src/lib/asn1/cms.asn1 delete mode 100644 kerberosV/src/lib/asn1/cms.opt delete mode 100644 kerberosV/src/lib/asn1/der-private.h delete mode 100644 kerberosV/src/lib/asn1/der-protos.h delete mode 100644 kerberosV/src/lib/asn1/der.c delete mode 100644 kerberosV/src/lib/asn1/der.h delete mode 100644 kerberosV/src/lib/asn1/der_cmp.c delete mode 100644 kerberosV/src/lib/asn1/der_copy.c delete mode 100644 kerberosV/src/lib/asn1/der_format.c delete mode 100644 kerberosV/src/lib/asn1/der_free.c delete mode 100644 kerberosV/src/lib/asn1/der_get.c delete mode 100644 kerberosV/src/lib/asn1/der_length.c delete mode 100644 kerberosV/src/lib/asn1/der_locl.h delete mode 100644 kerberosV/src/lib/asn1/der_put.c delete mode 100644 kerberosV/src/lib/asn1/digest.asn1 delete mode 100644 kerberosV/src/lib/asn1/extra.c delete mode 100644 kerberosV/src/lib/asn1/gen.c delete mode 100644 kerberosV/src/lib/asn1/gen_copy.c delete mode 100644 kerberosV/src/lib/asn1/gen_decode.c delete mode 100644 kerberosV/src/lib/asn1/gen_encode.c delete mode 100644 kerberosV/src/lib/asn1/gen_free.c delete mode 100644 kerberosV/src/lib/asn1/gen_glue.c delete mode 100644 kerberosV/src/lib/asn1/gen_length.c delete mode 100644 kerberosV/src/lib/asn1/gen_locl.h delete mode 100644 kerberosV/src/lib/asn1/gen_seq.c delete mode 100644 kerberosV/src/lib/asn1/gen_template.c delete mode 100644 kerberosV/src/lib/asn1/hash.c delete mode 100644 kerberosV/src/lib/asn1/hash.h delete mode 100644 kerberosV/src/lib/asn1/heim_asn1.h delete mode 100644 kerberosV/src/lib/asn1/krb5.asn1 delete mode 100644 kerberosV/src/lib/asn1/krb5.opt delete mode 100644 kerberosV/src/lib/asn1/kx509.asn1 delete mode 100644 kerberosV/src/lib/asn1/lex.h delete mode 100644 kerberosV/src/lib/asn1/lex.l delete mode 100644 kerberosV/src/lib/asn1/libasn1-exports.def delete mode 100644 kerberosV/src/lib/asn1/main.c delete mode 100644 kerberosV/src/lib/asn1/pkcs12.asn1 delete mode 100644 kerberosV/src/lib/asn1/pkcs8.asn1 delete mode 100644 kerberosV/src/lib/asn1/pkcs9.asn1 delete mode 100644 kerberosV/src/lib/asn1/pkinit.asn1 delete mode 100644 kerberosV/src/lib/asn1/rfc2459.asn1 delete mode 100644 kerberosV/src/lib/asn1/setchgpw2.asn1 delete mode 100644 kerberosV/src/lib/asn1/symbol.c delete mode 100644 kerberosV/src/lib/asn1/symbol.h delete mode 100644 kerberosV/src/lib/asn1/template.c delete mode 100644 kerberosV/src/lib/asn1/test.asn1 delete mode 100644 kerberosV/src/lib/asn1/test.gen delete mode 100644 kerberosV/src/lib/asn1/timegm.c delete mode 100644 kerberosV/src/lib/asn1/version-script.map delete mode 100644 kerberosV/src/lib/com_err/ChangeLog delete mode 100644 kerberosV/src/lib/com_err/Makefile.am delete mode 100644 kerberosV/src/lib/com_err/Makefile.in delete mode 100644 kerberosV/src/lib/com_err/NTMakefile delete mode 100644 kerberosV/src/lib/com_err/com_err.c delete mode 100644 kerberosV/src/lib/com_err/com_err.h delete mode 100644 kerberosV/src/lib/com_err/com_right.h delete mode 100644 kerberosV/src/lib/com_err/compile_et-version.rc delete mode 100644 kerberosV/src/lib/com_err/compile_et.c delete mode 100644 kerberosV/src/lib/com_err/compile_et.h delete mode 100644 kerberosV/src/lib/com_err/error.c delete mode 100644 kerberosV/src/lib/com_err/lex.c delete mode 100644 kerberosV/src/lib/com_err/lex.h delete mode 100644 kerberosV/src/lib/com_err/lex.l delete mode 100644 kerberosV/src/lib/com_err/libcom_err-exports.def delete mode 100644 kerberosV/src/lib/com_err/libcom_err-version.rc delete mode 100644 kerberosV/src/lib/com_err/parse.y delete mode 100644 kerberosV/src/lib/com_err/roken_rename.h delete mode 100644 kerberosV/src/lib/com_err/version-script.map delete mode 100644 kerberosV/src/lib/gssapi/ChangeLog delete mode 100644 kerberosV/src/lib/gssapi/Makefile.am delete mode 100644 kerberosV/src/lib/gssapi/Makefile.in delete mode 100644 kerberosV/src/lib/gssapi/NTMakefile delete mode 100644 kerberosV/src/lib/gssapi/gss-commands.in delete mode 100644 kerberosV/src/lib/gssapi/gss_acquire_cred.3 delete mode 100644 kerberosV/src/lib/gssapi/gssapi.3 delete mode 100644 kerberosV/src/lib/gssapi/gssapi.h delete mode 100644 kerberosV/src/lib/gssapi/gssapi/gssapi.h delete mode 100644 kerberosV/src/lib/gssapi/gssapi/gssapi_krb5.h delete mode 100644 kerberosV/src/lib/gssapi/gssapi/gssapi_ntlm.h delete mode 100644 kerberosV/src/lib/gssapi/gssapi/gssapi_oid.h delete mode 100644 kerberosV/src/lib/gssapi/gssapi/gssapi_spnego.h delete mode 100644 kerberosV/src/lib/gssapi/gssapi_mech.h delete mode 100644 kerberosV/src/lib/gssapi/gsstool.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/8003.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/accept_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/acquire_cred.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/add_cred.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/address_to_krb5addr.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/aeap.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/arcfour.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/authorize_localname.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/canonicalize_name.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/ccache_name.c delete mode 100755 kerberosV/src/lib/gssapi/krb5/cfx.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/cfx.h delete mode 100644 kerberosV/src/lib/gssapi/krb5/compare_name.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/compat.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/context_time.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/copy_ccache.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/creds.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/decapsulate.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/delete_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/display_name.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/display_status.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/duplicate_name.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/encapsulate.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/export_name.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/export_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/external.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/get_mic.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/gkrb5_err.et delete mode 100644 kerberosV/src/lib/gssapi/krb5/gsskrb5-private.h delete mode 100644 kerberosV/src/lib/gssapi/krb5/gsskrb5_locl.h delete mode 100644 kerberosV/src/lib/gssapi/krb5/import_name.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/import_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/indicate_mechs.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/init.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/init_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/inquire_context.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/inquire_cred.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/inquire_cred_by_mech.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/inquire_cred_by_oid.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/inquire_mechs_for_name.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/inquire_names_for_mech.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/inquire_sec_context_by_oid.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/pname_to_uid.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/prf.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/process_context_token.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/release_buffer.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/release_cred.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/release_name.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/sequence.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/set_cred_option.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/set_sec_context_option.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/store_cred.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/test_cfx.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/ticket_flags.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/unwrap.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/verify_mic.c delete mode 100644 kerberosV/src/lib/gssapi/krb5/wrap.c delete mode 100644 kerberosV/src/lib/gssapi/libgssapi-exports.def delete mode 100644 kerberosV/src/lib/gssapi/libgssapi-version.rc delete mode 100644 kerberosV/src/lib/gssapi/mech/compat.h delete mode 100644 kerberosV/src/lib/gssapi/mech/context.c delete mode 100644 kerberosV/src/lib/gssapi/mech/context.h delete mode 100644 kerberosV/src/lib/gssapi/mech/cred.h delete mode 100644 kerberosV/src/lib/gssapi/mech/doxygen.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_accept_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_acquire_cred.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_acquire_cred_ext.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_acquire_cred_with_password.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_add_cred.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_add_cred_with_password.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_add_oid_set_member.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_aeap.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_authorize_localname.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_buffer_set.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_canonicalize_name.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_compare_name.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_context_time.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_create_empty_oid_set.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_cred.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_decapsulate_token.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_delete_name_attribute.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_delete_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_display_name.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_display_name_ext.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_display_status.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_duplicate_name.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_duplicate_oid.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_encapsulate_token.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_export_name.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_export_name_composite.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_export_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_get_mic.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_get_name_attribute.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_import_name.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_import_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_indicate_mechs.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_init_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_inquire_context.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_inquire_cred.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_inquire_cred_by_mech.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_inquire_cred_by_oid.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_inquire_mechs_for_name.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_inquire_name.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_inquire_names_for_mech.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_inquire_sec_context_by_oid.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_krb5.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_mech_switch.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_mo.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_names.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_oid.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_oid_equal.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_oid_to_str.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_pname_to_uid.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_process_context_token.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_pseudo_random.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_release_buffer.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_release_cred.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_release_name.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_release_oid.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_release_oid_set.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_seal.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_set_cred_option.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_set_name_attribute.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_set_sec_context_option.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_sign.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_store_cred.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_test_oid_set_member.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_unseal.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_unwrap.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_utils.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_verify.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_verify_mic.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_wrap.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gss_wrap_size_limit.c delete mode 100644 kerberosV/src/lib/gssapi/mech/gssapi.asn1 delete mode 100644 kerberosV/src/lib/gssapi/mech/mech.5 delete mode 100644 kerberosV/src/lib/gssapi/mech/mech.cat5 delete mode 100644 kerberosV/src/lib/gssapi/mech/mech_locl.h delete mode 100644 kerberosV/src/lib/gssapi/mech/mech_switch.h delete mode 100644 kerberosV/src/lib/gssapi/mech/mechqueue.h delete mode 100644 kerberosV/src/lib/gssapi/mech/name.h delete mode 100644 kerberosV/src/lib/gssapi/mech/utils.h delete mode 100644 kerberosV/src/lib/gssapi/ntlm/accept_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/acquire_cred.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/add_cred.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/canonicalize_name.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/compare_name.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/context_time.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/creds.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/crypto.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/delete_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/display_name.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/display_status.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/duplicate_name.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/export_name.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/export_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/external.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/import_name.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/import_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/indicate_mechs.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/init_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/inquire_context.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/inquire_cred_by_mech.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/inquire_mechs_for_name.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/inquire_names_for_mech.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/inquire_sec_context_by_oid.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/iter_cred.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/kdc.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/ntlm-private.h delete mode 100644 kerberosV/src/lib/gssapi/ntlm/ntlm.h delete mode 100644 kerberosV/src/lib/gssapi/ntlm/process_context_token.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/release_cred.c delete mode 100644 kerberosV/src/lib/gssapi/ntlm/release_name.c delete mode 100644 kerberosV/src/lib/gssapi/spnego/accept_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/spnego/compat.c delete mode 100644 kerberosV/src/lib/gssapi/spnego/context_stubs.c delete mode 100644 kerberosV/src/lib/gssapi/spnego/cred_stubs.c delete mode 100644 kerberosV/src/lib/gssapi/spnego/external.c delete mode 100644 kerberosV/src/lib/gssapi/spnego/init_sec_context.c delete mode 100644 kerberosV/src/lib/gssapi/spnego/spnego-private.h delete mode 100644 kerberosV/src/lib/gssapi/spnego/spnego.asn1 delete mode 100644 kerberosV/src/lib/gssapi/spnego/spnego.opt delete mode 100644 kerberosV/src/lib/gssapi/spnego/spnego_locl.h delete mode 100644 kerberosV/src/lib/gssapi/test_acquire_cred.c delete mode 100644 kerberosV/src/lib/gssapi/test_common.c delete mode 100644 kerberosV/src/lib/gssapi/test_common.h delete mode 100644 kerberosV/src/lib/gssapi/test_context.c delete mode 100644 kerberosV/src/lib/gssapi/test_cred.c delete mode 100644 kerberosV/src/lib/gssapi/test_kcred.c delete mode 100644 kerberosV/src/lib/gssapi/test_names.c delete mode 100644 kerberosV/src/lib/gssapi/test_ntlm.c delete mode 100644 kerberosV/src/lib/gssapi/test_oid.c delete mode 100644 kerberosV/src/lib/gssapi/version-script.map delete mode 100644 kerberosV/src/lib/hcrypto/ChangeLog delete mode 100644 kerberosV/src/lib/hcrypto/DESperate.txt delete mode 100644 kerberosV/src/lib/hcrypto/Makefile.am delete mode 100644 kerberosV/src/lib/hcrypto/Makefile.in delete mode 100644 kerberosV/src/lib/hcrypto/NTMakefile delete mode 100644 kerberosV/src/lib/hcrypto/aes.c delete mode 100644 kerberosV/src/lib/hcrypto/aes.h delete mode 100644 kerberosV/src/lib/hcrypto/bn.c delete mode 100644 kerberosV/src/lib/hcrypto/bn.h delete mode 100644 kerberosV/src/lib/hcrypto/camellia-ntt.c delete mode 100644 kerberosV/src/lib/hcrypto/camellia-ntt.h delete mode 100644 kerberosV/src/lib/hcrypto/camellia.c delete mode 100644 kerberosV/src/lib/hcrypto/camellia.h delete mode 100644 kerberosV/src/lib/hcrypto/common.c delete mode 100644 kerberosV/src/lib/hcrypto/common.h delete mode 100644 kerberosV/src/lib/hcrypto/des-tables.h delete mode 100644 kerberosV/src/lib/hcrypto/des.c delete mode 100644 kerberosV/src/lib/hcrypto/des.h delete mode 100644 kerberosV/src/lib/hcrypto/destest.c delete mode 100644 kerberosV/src/lib/hcrypto/dh-ltm.c delete mode 100644 kerberosV/src/lib/hcrypto/dh.c delete mode 100644 kerberosV/src/lib/hcrypto/dh.h delete mode 100644 kerberosV/src/lib/hcrypto/dllmain.c delete mode 100644 kerberosV/src/lib/hcrypto/doxygen.c delete mode 100644 kerberosV/src/lib/hcrypto/dsa.c delete mode 100644 kerberosV/src/lib/hcrypto/dsa.h delete mode 100644 kerberosV/src/lib/hcrypto/ec.h delete mode 100644 kerberosV/src/lib/hcrypto/ecdh.h delete mode 100644 kerberosV/src/lib/hcrypto/ecdsa.h delete mode 100644 kerberosV/src/lib/hcrypto/engine.c delete mode 100644 kerberosV/src/lib/hcrypto/engine.h delete mode 100644 kerberosV/src/lib/hcrypto/evp-cc.c delete mode 100644 kerberosV/src/lib/hcrypto/evp-cc.h delete mode 100644 kerberosV/src/lib/hcrypto/evp-hcrypto.c delete mode 100644 kerberosV/src/lib/hcrypto/evp-hcrypto.h delete mode 100644 kerberosV/src/lib/hcrypto/evp.c delete mode 100644 kerberosV/src/lib/hcrypto/evp.h delete mode 100644 kerberosV/src/lib/hcrypto/example_evp_cipher.c delete mode 100644 kerberosV/src/lib/hcrypto/gen-des.pl delete mode 100644 kerberosV/src/lib/hcrypto/hash.h delete mode 100644 kerberosV/src/lib/hcrypto/hmac.c delete mode 100644 kerberosV/src/lib/hcrypto/hmac.h delete mode 100644 kerberosV/src/lib/hcrypto/libhcrypto-exports.def delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_error.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_fast_mp_invmod.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_fast_mp_montgomery_reduce.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_fast_s_mp_mul_digs.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_fast_s_mp_mul_high_digs.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_fast_s_mp_sqr.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_2expt.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_abs.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_add.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_add_d.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_addmod.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_and.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_clamp.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_clear.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_clear_multi.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_cmp.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_cmp_d.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_cmp_mag.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_cnt_lsb.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_copy.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_count_bits.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_div.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_div_2.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_div_2d.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_div_3.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_div_d.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_dr_is_modulus.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_dr_reduce.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_dr_setup.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_exch.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_expt_d.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_exptmod.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_exptmod_fast.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_exteuclid.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_find_prime.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_fread.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_fwrite.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_gcd.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_get_int.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_grow.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_init.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_init_copy.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_init_multi.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_init_set.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_init_set_int.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_init_size.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_invmod.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_invmod_slow.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_is_square.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_isprime.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_jacobi.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_karatsuba_mul.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_karatsuba_sqr.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_lcm.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_lshd.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_mod.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_mod_2d.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_mod_d.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_montgomery_calc_normalization.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_montgomery_reduce.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_montgomery_setup.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_mul.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_mul_2.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_mul_2d.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_mul_d.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_mulmod.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_n_root.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_neg.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_or.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_prime_fermat.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_prime_is_divisible.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_prime_is_prime.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_prime_miller_rabin.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_prime_next_prime.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_prime_rabin_miller_trials.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_prime_random_ex.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_radix_size.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_radix_smap.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_rand.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_read_radix.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_read_signed_bin.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_read_unsigned_bin.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_reduce.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_reduce_2k.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_reduce_2k_l.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_reduce_2k_setup.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_reduce_2k_setup_l.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_reduce_is_2k.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_reduce_is_2k_l.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_reduce_setup.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_rshd.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_set.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_set_int.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_shrink.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_signed_bin_size.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_sqr.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_sqrmod.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_sqrt.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_sub.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_sub_d.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_submod.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_to_signed_bin.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_to_signed_bin_n.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_to_unsigned_bin.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_to_unsigned_bin_n.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_toom_mul.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_toom_sqr.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_toradix.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_toradix_n.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_unsigned_bin_size.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_xor.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_zero.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_mp_zero_multi.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_prime_tab.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_reverse.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_s_mp_add.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_s_mp_exptmod.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_s_mp_mul_digs.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_s_mp_mul_high_digs.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_s_mp_sqr.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bn_s_mp_sub.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/bncore.c delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/tommath.h delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/tommath_class.h delete mode 100644 kerberosV/src/lib/hcrypto/libtommath/tommath_superclass.h delete mode 100644 kerberosV/src/lib/hcrypto/md2.c delete mode 100644 kerberosV/src/lib/hcrypto/md2.h delete mode 100644 kerberosV/src/lib/hcrypto/md4.c delete mode 100644 kerberosV/src/lib/hcrypto/md4.h delete mode 100644 kerberosV/src/lib/hcrypto/md5.c delete mode 100644 kerberosV/src/lib/hcrypto/md5.h delete mode 100644 kerberosV/src/lib/hcrypto/md5crypt_test.c delete mode 100644 kerberosV/src/lib/hcrypto/mdtest.c delete mode 100644 kerberosV/src/lib/hcrypto/passwd_dialog.aps delete mode 100644 kerberosV/src/lib/hcrypto/passwd_dialog.clw delete mode 100644 kerberosV/src/lib/hcrypto/passwd_dialog.rc delete mode 100644 kerberosV/src/lib/hcrypto/passwd_dialog.res delete mode 100644 kerberosV/src/lib/hcrypto/passwd_dlg.c delete mode 100644 kerberosV/src/lib/hcrypto/passwd_dlg.h delete mode 100644 kerberosV/src/lib/hcrypto/pkcs12.c delete mode 100644 kerberosV/src/lib/hcrypto/pkcs12.h delete mode 100644 kerberosV/src/lib/hcrypto/pkcs5.c delete mode 100644 kerberosV/src/lib/hcrypto/rand-fortuna.c delete mode 100644 kerberosV/src/lib/hcrypto/rand-timer.c delete mode 100644 kerberosV/src/lib/hcrypto/rand-unix.c delete mode 100644 kerberosV/src/lib/hcrypto/rand.h delete mode 100644 kerberosV/src/lib/hcrypto/randi.h delete mode 100644 kerberosV/src/lib/hcrypto/rc2.c delete mode 100644 kerberosV/src/lib/hcrypto/rc2.h delete mode 100644 kerberosV/src/lib/hcrypto/rc2test.c delete mode 100644 kerberosV/src/lib/hcrypto/rc4.c delete mode 100644 kerberosV/src/lib/hcrypto/rc4.h delete mode 100644 kerberosV/src/lib/hcrypto/rctest.c delete mode 100644 kerberosV/src/lib/hcrypto/resource.h delete mode 100644 kerberosV/src/lib/hcrypto/rijndael-alg-fst.c delete mode 100644 kerberosV/src/lib/hcrypto/rijndael-alg-fst.h delete mode 100644 kerberosV/src/lib/hcrypto/rnd_keys.c delete mode 100644 kerberosV/src/lib/hcrypto/rsa-gmp.c delete mode 100644 kerberosV/src/lib/hcrypto/rsa-ltm.c delete mode 100644 kerberosV/src/lib/hcrypto/rsa.c delete mode 100644 kerberosV/src/lib/hcrypto/rsa.h delete mode 100644 kerberosV/src/lib/hcrypto/rsakey.der delete mode 100644 kerberosV/src/lib/hcrypto/rsakey2048.der delete mode 100644 kerberosV/src/lib/hcrypto/rsakey4096.der delete mode 100644 kerberosV/src/lib/hcrypto/sha.c delete mode 100644 kerberosV/src/lib/hcrypto/sha.h delete mode 100644 kerberosV/src/lib/hcrypto/sha256.c delete mode 100644 kerberosV/src/lib/hcrypto/sha512.c delete mode 100644 kerberosV/src/lib/hcrypto/test_bn.c delete mode 100644 kerberosV/src/lib/hcrypto/test_cipher.c delete mode 100644 kerberosV/src/lib/hcrypto/test_crypto.in delete mode 100644 kerberosV/src/lib/hcrypto/test_dh.c delete mode 100644 kerberosV/src/lib/hcrypto/test_engine_dso.c delete mode 100644 kerberosV/src/lib/hcrypto/test_hmac.c delete mode 100644 kerberosV/src/lib/hcrypto/test_pkcs12.c delete mode 100644 kerberosV/src/lib/hcrypto/test_pkcs5.c delete mode 100644 kerberosV/src/lib/hcrypto/test_rand.c delete mode 100644 kerberosV/src/lib/hcrypto/test_rsa.c delete mode 100644 kerberosV/src/lib/hcrypto/ui.c delete mode 100644 kerberosV/src/lib/hcrypto/ui.h delete mode 100644 kerberosV/src/lib/hcrypto/validate.c delete mode 100644 kerberosV/src/lib/hcrypto/version-script.map delete mode 100644 kerberosV/src/lib/hdb/Makefile.am delete mode 100644 kerberosV/src/lib/hdb/Makefile.in delete mode 100644 kerberosV/src/lib/hdb/NTMakefile delete mode 100644 kerberosV/src/lib/hdb/common.c delete mode 100644 kerberosV/src/lib/hdb/data-mkey.mit.des3.be delete mode 100644 kerberosV/src/lib/hdb/data-mkey.mit.des3.le delete mode 100644 kerberosV/src/lib/hdb/db.c delete mode 100644 kerberosV/src/lib/hdb/db3.c delete mode 100644 kerberosV/src/lib/hdb/dbinfo.c delete mode 100644 kerberosV/src/lib/hdb/ext.c delete mode 100644 kerberosV/src/lib/hdb/hdb-keytab.c delete mode 100644 kerberosV/src/lib/hdb/hdb-ldap.c delete mode 100644 kerberosV/src/lib/hdb/hdb-mitdb.c delete mode 100644 kerberosV/src/lib/hdb/hdb-private.h delete mode 100644 kerberosV/src/lib/hdb/hdb-protos.h delete mode 100644 kerberosV/src/lib/hdb/hdb-sqlite.c delete mode 100644 kerberosV/src/lib/hdb/hdb.asn1 delete mode 100644 kerberosV/src/lib/hdb/hdb.c delete mode 100644 kerberosV/src/lib/hdb/hdb.h delete mode 100644 kerberosV/src/lib/hdb/hdb.schema delete mode 100644 kerberosV/src/lib/hdb/hdb_err.et delete mode 100644 kerberosV/src/lib/hdb/hdb_locl.h delete mode 100644 kerberosV/src/lib/hdb/keys.c delete mode 100644 kerberosV/src/lib/hdb/keytab.c delete mode 100644 kerberosV/src/lib/hdb/libhdb-exports.def delete mode 100644 kerberosV/src/lib/hdb/libhdb-version.rc delete mode 100644 kerberosV/src/lib/hdb/mkey.c delete mode 100644 kerberosV/src/lib/hdb/ndbm.c delete mode 100644 kerberosV/src/lib/hdb/print.c delete mode 100644 kerberosV/src/lib/hdb/test_dbinfo.c delete mode 100644 kerberosV/src/lib/hdb/test_hdbkeys.c delete mode 100644 kerberosV/src/lib/hdb/test_mkey.c delete mode 100644 kerberosV/src/lib/hdb/version-script.map delete mode 100644 kerberosV/src/lib/heimdal/NTMakefile delete mode 100644 kerberosV/src/lib/heimdal/dllmain.c delete mode 100644 kerberosV/src/lib/heimdal/heimdal-version.rc delete mode 100644 kerberosV/src/lib/hx509/ChangeLog delete mode 100644 kerberosV/src/lib/hx509/Makefile.am delete mode 100644 kerberosV/src/lib/hx509/Makefile.in delete mode 100644 kerberosV/src/lib/hx509/NTMakefile delete mode 100644 kerberosV/src/lib/hx509/TODO delete mode 100644 kerberosV/src/lib/hx509/ca.c delete mode 100644 kerberosV/src/lib/hx509/cert.c delete mode 100644 kerberosV/src/lib/hx509/char_map.h delete mode 100644 kerberosV/src/lib/hx509/cms.c delete mode 100644 kerberosV/src/lib/hx509/collector.c delete mode 100644 kerberosV/src/lib/hx509/crmf.asn1 delete mode 100644 kerberosV/src/lib/hx509/crypto.c delete mode 100644 kerberosV/src/lib/hx509/data/bleichenbacher-bad.pem delete mode 100644 kerberosV/src/lib/hx509/data/bleichenbacher-good.pem delete mode 100644 kerberosV/src/lib/hx509/data/bleichenbacher-sf-pad-correct.pem delete mode 100644 kerberosV/src/lib/hx509/data/ca.crt delete mode 100644 kerberosV/src/lib/hx509/data/ca.key delete mode 100644 kerberosV/src/lib/hx509/data/crl1.crl delete mode 100644 kerberosV/src/lib/hx509/data/crl1.der delete mode 100644 kerberosV/src/lib/hx509/data/gen-req.sh delete mode 100644 kerberosV/src/lib/hx509/data/j.pem delete mode 100644 kerberosV/src/lib/hx509/data/kdc.crt delete mode 100644 kerberosV/src/lib/hx509/data/kdc.key delete mode 100644 kerberosV/src/lib/hx509/data/key.der delete mode 100644 kerberosV/src/lib/hx509/data/key2.der delete mode 100644 kerberosV/src/lib/hx509/data/n0ll.pem delete mode 100644 kerberosV/src/lib/hx509/data/nist-data delete mode 100644 kerberosV/src/lib/hx509/data/nist-data2 delete mode 100644 kerberosV/src/lib/hx509/data/no-proxy-test.crt delete mode 100644 kerberosV/src/lib/hx509/data/no-proxy-test.key delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-req1.der delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-req2.der delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-resp1-2.der delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-resp1-3.der delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-resp1-ca.der delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-resp1-keyhash.der delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-resp1-ocsp-no-cert.der delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-resp1-ocsp.der delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-resp1.der delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-resp2.der delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-responder.crt delete mode 100644 kerberosV/src/lib/hx509/data/ocsp-responder.key delete mode 100644 kerberosV/src/lib/hx509/data/openssl.cnf delete mode 100644 kerberosV/src/lib/hx509/data/pkinit-ec.crt delete mode 100644 kerberosV/src/lib/hx509/data/pkinit-ec.key delete mode 100644 kerberosV/src/lib/hx509/data/pkinit-proxy-chain.crt delete mode 100644 kerberosV/src/lib/hx509/data/pkinit-proxy.crt delete mode 100644 kerberosV/src/lib/hx509/data/pkinit-proxy.key delete mode 100644 kerberosV/src/lib/hx509/data/pkinit-pw.key delete mode 100644 kerberosV/src/lib/hx509/data/pkinit.crt delete mode 100644 kerberosV/src/lib/hx509/data/pkinit.key delete mode 100644 kerberosV/src/lib/hx509/data/proxy-level-test.crt delete mode 100644 kerberosV/src/lib/hx509/data/proxy-level-test.key delete mode 100644 kerberosV/src/lib/hx509/data/proxy-test.crt delete mode 100644 kerberosV/src/lib/hx509/data/proxy-test.key delete mode 100644 kerberosV/src/lib/hx509/data/proxy10-child-child-test.crt delete mode 100644 kerberosV/src/lib/hx509/data/proxy10-child-child-test.key delete mode 100644 kerberosV/src/lib/hx509/data/proxy10-child-test.crt delete mode 100644 kerberosV/src/lib/hx509/data/proxy10-child-test.key delete mode 100644 kerberosV/src/lib/hx509/data/proxy10-test.crt delete mode 100644 kerberosV/src/lib/hx509/data/proxy10-test.key delete mode 100644 kerberosV/src/lib/hx509/data/revoke.crt delete mode 100644 kerberosV/src/lib/hx509/data/revoke.key delete mode 100644 kerberosV/src/lib/hx509/data/secp160r1TestCA.cert.pem delete mode 100644 kerberosV/src/lib/hx509/data/secp160r1TestCA.key.pem delete mode 100644 kerberosV/src/lib/hx509/data/secp160r1TestCA.pem delete mode 100644 kerberosV/src/lib/hx509/data/secp160r2TestClient.cert.pem delete mode 100644 kerberosV/src/lib/hx509/data/secp160r2TestClient.key.pem delete mode 100644 kerberosV/src/lib/hx509/data/secp160r2TestClient.pem delete mode 100644 kerberosV/src/lib/hx509/data/secp160r2TestServer.cert.pem delete mode 100644 kerberosV/src/lib/hx509/data/secp160r2TestServer.key.pem delete mode 100644 kerberosV/src/lib/hx509/data/secp160r2TestServer.pem delete mode 100644 kerberosV/src/lib/hx509/data/sf-class2-root.pem delete mode 100644 kerberosV/src/lib/hx509/data/static-file delete mode 100644 kerberosV/src/lib/hx509/data/sub-ca.crt delete mode 100644 kerberosV/src/lib/hx509/data/sub-ca.key delete mode 100644 kerberosV/src/lib/hx509/data/sub-cert.crt delete mode 100644 kerberosV/src/lib/hx509/data/sub-cert.key delete mode 100644 kerberosV/src/lib/hx509/data/sub-cert.p12 delete mode 100644 kerberosV/src/lib/hx509/data/test-ds-only.crt delete mode 100644 kerberosV/src/lib/hx509/data/test-ds-only.key delete mode 100644 kerberosV/src/lib/hx509/data/test-enveloped-aes-128 delete mode 100644 kerberosV/src/lib/hx509/data/test-enveloped-aes-256 delete mode 100644 kerberosV/src/lib/hx509/data/test-enveloped-des delete mode 100644 kerberosV/src/lib/hx509/data/test-enveloped-des-ede3 delete mode 100644 kerberosV/src/lib/hx509/data/test-enveloped-rc2-128 delete mode 100644 kerberosV/src/lib/hx509/data/test-enveloped-rc2-40 delete mode 100644 kerberosV/src/lib/hx509/data/test-enveloped-rc2-64 delete mode 100644 kerberosV/src/lib/hx509/data/test-ke-only.crt delete mode 100644 kerberosV/src/lib/hx509/data/test-ke-only.key delete mode 100644 kerberosV/src/lib/hx509/data/test-nopw.p12 delete mode 100644 kerberosV/src/lib/hx509/data/test-pw.key delete mode 100644 kerberosV/src/lib/hx509/data/test-signed-data delete mode 100644 kerberosV/src/lib/hx509/data/test-signed-data-noattr delete mode 100644 kerberosV/src/lib/hx509/data/test-signed-data-noattr-nocerts delete mode 100644 kerberosV/src/lib/hx509/data/test-signed-sha-1 delete mode 100644 kerberosV/src/lib/hx509/data/test-signed-sha-256 delete mode 100644 kerberosV/src/lib/hx509/data/test-signed-sha-512 delete mode 100644 kerberosV/src/lib/hx509/data/test.combined.crt delete mode 100644 kerberosV/src/lib/hx509/data/test.crt delete mode 100644 kerberosV/src/lib/hx509/data/test.key delete mode 100644 kerberosV/src/lib/hx509/data/test.p12 delete mode 100644 kerberosV/src/lib/hx509/data/win-u16-in-printablestring.der delete mode 100644 kerberosV/src/lib/hx509/data/yutaka-pad-broken-ca.pem delete mode 100644 kerberosV/src/lib/hx509/data/yutaka-pad-broken-cert.pem delete mode 100644 kerberosV/src/lib/hx509/data/yutaka-pad-ok-ca.pem delete mode 100644 kerberosV/src/lib/hx509/data/yutaka-pad-ok-cert.pem delete mode 100644 kerberosV/src/lib/hx509/data/yutaka-pad.key delete mode 100644 kerberosV/src/lib/hx509/doxygen.c delete mode 100644 kerberosV/src/lib/hx509/env.c delete mode 100644 kerberosV/src/lib/hx509/error.c delete mode 100644 kerberosV/src/lib/hx509/file.c delete mode 100644 kerberosV/src/lib/hx509/hx509-private.h delete mode 100644 kerberosV/src/lib/hx509/hx509-protos.h delete mode 100644 kerberosV/src/lib/hx509/hx509.h delete mode 100644 kerberosV/src/lib/hx509/hx509_err.et delete mode 100644 kerberosV/src/lib/hx509/hx_locl.h delete mode 100644 kerberosV/src/lib/hx509/hxtool-commands.in delete mode 100644 kerberosV/src/lib/hx509/hxtool-version.rc delete mode 100644 kerberosV/src/lib/hx509/hxtool.c delete mode 100644 kerberosV/src/lib/hx509/keyset.c delete mode 100644 kerberosV/src/lib/hx509/ks_dir.c delete mode 100644 kerberosV/src/lib/hx509/ks_file.c delete mode 100644 kerberosV/src/lib/hx509/ks_keychain.c delete mode 100644 kerberosV/src/lib/hx509/ks_mem.c delete mode 100644 kerberosV/src/lib/hx509/ks_null.c delete mode 100644 kerberosV/src/lib/hx509/ks_p11.c delete mode 100644 kerberosV/src/lib/hx509/ks_p12.c delete mode 100644 kerberosV/src/lib/hx509/libhx509-exports.def delete mode 100644 kerberosV/src/lib/hx509/lock.c delete mode 100644 kerberosV/src/lib/hx509/name.c delete mode 100644 kerberosV/src/lib/hx509/ocsp.asn1 delete mode 100644 kerberosV/src/lib/hx509/ocsp.opt delete mode 100644 kerberosV/src/lib/hx509/peer.c delete mode 100644 kerberosV/src/lib/hx509/pkcs10.asn1 delete mode 100644 kerberosV/src/lib/hx509/pkcs10.opt delete mode 100644 kerberosV/src/lib/hx509/print.c delete mode 100644 kerberosV/src/lib/hx509/quote.py delete mode 100644 kerberosV/src/lib/hx509/ref/pkcs11.h delete mode 100644 kerberosV/src/lib/hx509/req.c delete mode 100644 kerberosV/src/lib/hx509/revoke.c delete mode 100644 kerberosV/src/lib/hx509/sel-gram.c delete mode 100644 kerberosV/src/lib/hx509/sel-gram.h delete mode 100644 kerberosV/src/lib/hx509/sel-gram.y delete mode 100644 kerberosV/src/lib/hx509/sel-lex.c delete mode 100644 kerberosV/src/lib/hx509/sel-lex.l delete mode 100644 kerberosV/src/lib/hx509/sel.c delete mode 100644 kerberosV/src/lib/hx509/sel.h delete mode 100644 kerberosV/src/lib/hx509/softp11.c delete mode 100644 kerberosV/src/lib/hx509/test_ca.in delete mode 100644 kerberosV/src/lib/hx509/test_cert.in delete mode 100644 kerberosV/src/lib/hx509/test_chain.in delete mode 100644 kerberosV/src/lib/hx509/test_cms.in delete mode 100644 kerberosV/src/lib/hx509/test_crypto.in delete mode 100644 kerberosV/src/lib/hx509/test_expr.c delete mode 100644 kerberosV/src/lib/hx509/test_java_pkcs11.in delete mode 100644 kerberosV/src/lib/hx509/test_name.c delete mode 100644 kerberosV/src/lib/hx509/test_nist.in delete mode 100644 kerberosV/src/lib/hx509/test_nist2.in delete mode 100644 kerberosV/src/lib/hx509/test_nist_cert.in delete mode 100644 kerberosV/src/lib/hx509/test_nist_pkcs12.in delete mode 100644 kerberosV/src/lib/hx509/test_pkcs11.in delete mode 100644 kerberosV/src/lib/hx509/test_query.in delete mode 100644 kerberosV/src/lib/hx509/test_req.in delete mode 100644 kerberosV/src/lib/hx509/test_soft_pkcs11.c delete mode 100644 kerberosV/src/lib/hx509/test_windows.in delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-available1 delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-available2 delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-available3 delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-select delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-select1 delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-select2 delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-select3 delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-select4 delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-select5 delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-select6 delete mode 100644 kerberosV/src/lib/hx509/tst-crypto-select7 delete mode 100644 kerberosV/src/lib/hx509/version-script.map delete mode 100644 kerberosV/src/lib/ipc/Makefile.am delete mode 100644 kerberosV/src/lib/ipc/Makefile.in delete mode 100644 kerberosV/src/lib/ipc/client.c delete mode 100644 kerberosV/src/lib/ipc/common.c delete mode 100644 kerberosV/src/lib/ipc/heim-ipc.h delete mode 100644 kerberosV/src/lib/ipc/heim_ipc.defs delete mode 100644 kerberosV/src/lib/ipc/heim_ipc_async.defs delete mode 100644 kerberosV/src/lib/ipc/heim_ipc_reply.defs delete mode 100644 kerberosV/src/lib/ipc/heim_ipc_types.h delete mode 100644 kerberosV/src/lib/ipc/hi_locl.h delete mode 100644 kerberosV/src/lib/ipc/server.c delete mode 100644 kerberosV/src/lib/ipc/tc.c delete mode 100644 kerberosV/src/lib/ipc/ts-http.c delete mode 100644 kerberosV/src/lib/ipc/ts.c delete mode 100644 kerberosV/src/lib/kadm5/ChangeLog delete mode 100644 kerberosV/src/lib/kadm5/Makefile.am delete mode 100644 kerberosV/src/lib/kadm5/Makefile.in delete mode 100644 kerberosV/src/lib/kadm5/NTMakefile delete mode 100644 kerberosV/src/lib/kadm5/acl.c delete mode 100644 kerberosV/src/lib/kadm5/ad.c delete mode 100644 kerberosV/src/lib/kadm5/admin.h delete mode 100644 kerberosV/src/lib/kadm5/bump_pw_expire.c delete mode 100755 kerberosV/src/lib/kadm5/check-cracklib.pl delete mode 100644 kerberosV/src/lib/kadm5/chpass_c.c delete mode 100644 kerberosV/src/lib/kadm5/chpass_s.c delete mode 100644 kerberosV/src/lib/kadm5/client_glue.c delete mode 100644 kerberosV/src/lib/kadm5/common_glue.c delete mode 100644 kerberosV/src/lib/kadm5/context_s.c delete mode 100644 kerberosV/src/lib/kadm5/create_c.c delete mode 100644 kerberosV/src/lib/kadm5/create_s.c delete mode 100644 kerberosV/src/lib/kadm5/default_keys.c delete mode 100644 kerberosV/src/lib/kadm5/delete_c.c delete mode 100644 kerberosV/src/lib/kadm5/delete_s.c delete mode 100644 kerberosV/src/lib/kadm5/destroy_c.c delete mode 100644 kerberosV/src/lib/kadm5/destroy_s.c delete mode 100644 kerberosV/src/lib/kadm5/ent_setup.c delete mode 100644 kerberosV/src/lib/kadm5/error.c delete mode 100644 kerberosV/src/lib/kadm5/flush.c delete mode 100644 kerberosV/src/lib/kadm5/flush_c.c delete mode 100644 kerberosV/src/lib/kadm5/flush_s.c delete mode 100644 kerberosV/src/lib/kadm5/free.c delete mode 100644 kerberosV/src/lib/kadm5/get_c.c delete mode 100644 kerberosV/src/lib/kadm5/get_princs_c.c delete mode 100644 kerberosV/src/lib/kadm5/get_princs_s.c delete mode 100644 kerberosV/src/lib/kadm5/get_s.c delete mode 100644 kerberosV/src/lib/kadm5/init_c.c delete mode 100644 kerberosV/src/lib/kadm5/init_s.c delete mode 100644 kerberosV/src/lib/kadm5/iprop-commands.in delete mode 100644 kerberosV/src/lib/kadm5/iprop-log-version.rc delete mode 100644 kerberosV/src/lib/kadm5/iprop-log.8 delete mode 100644 kerberosV/src/lib/kadm5/iprop-log.c delete mode 100644 kerberosV/src/lib/kadm5/iprop-log.cat8 delete mode 100644 kerberosV/src/lib/kadm5/iprop.8 delete mode 100644 kerberosV/src/lib/kadm5/iprop.cat8 delete mode 100644 kerberosV/src/lib/kadm5/iprop.h delete mode 100644 kerberosV/src/lib/kadm5/ipropd-master-version.rc delete mode 100644 kerberosV/src/lib/kadm5/ipropd-slave-version.rc delete mode 100644 kerberosV/src/lib/kadm5/ipropd_common.c delete mode 100644 kerberosV/src/lib/kadm5/ipropd_master.c delete mode 100644 kerberosV/src/lib/kadm5/ipropd_slave.c delete mode 100644 kerberosV/src/lib/kadm5/kadm5-private.h delete mode 100644 kerberosV/src/lib/kadm5/kadm5-protos.h delete mode 100644 kerberosV/src/lib/kadm5/kadm5-pwcheck.h delete mode 100644 kerberosV/src/lib/kadm5/kadm5_err.et delete mode 100644 kerberosV/src/lib/kadm5/kadm5_locl.h delete mode 100644 kerberosV/src/lib/kadm5/kadm5_pwcheck.3 delete mode 100644 kerberosV/src/lib/kadm5/keys.c delete mode 100644 kerberosV/src/lib/kadm5/libkadm5srv-exports.def delete mode 100644 kerberosV/src/lib/kadm5/libkadm5srv-version.rc delete mode 100644 kerberosV/src/lib/kadm5/log.c delete mode 100644 kerberosV/src/lib/kadm5/marshall.c delete mode 100644 kerberosV/src/lib/kadm5/modify_c.c delete mode 100644 kerberosV/src/lib/kadm5/modify_s.c delete mode 100644 kerberosV/src/lib/kadm5/password_quality.c delete mode 100644 kerberosV/src/lib/kadm5/private.h delete mode 100644 kerberosV/src/lib/kadm5/privs_c.c delete mode 100644 kerberosV/src/lib/kadm5/privs_s.c delete mode 100644 kerberosV/src/lib/kadm5/randkey_c.c delete mode 100644 kerberosV/src/lib/kadm5/randkey_s.c delete mode 100644 kerberosV/src/lib/kadm5/rename_c.c delete mode 100644 kerberosV/src/lib/kadm5/rename_s.c delete mode 100644 kerberosV/src/lib/kadm5/sample_passwd_check.c delete mode 100644 kerberosV/src/lib/kadm5/send_recv.c delete mode 100644 kerberosV/src/lib/kadm5/server_glue.c delete mode 100644 kerberosV/src/lib/kadm5/set_keys.c delete mode 100644 kerberosV/src/lib/kadm5/set_modifier.c delete mode 100644 kerberosV/src/lib/kadm5/test_pw_quality.c delete mode 100644 kerberosV/src/lib/kadm5/version-script.map delete mode 100644 kerberosV/src/lib/kafs/ChangeLog delete mode 100644 kerberosV/src/lib/kafs/Makefile.am delete mode 100644 kerberosV/src/lib/kafs/Makefile.in delete mode 100644 kerberosV/src/lib/kafs/NTMakefile delete mode 100644 kerberosV/src/lib/kafs/afskrb5.c delete mode 100644 kerberosV/src/lib/kafs/afsl.exp delete mode 100644 kerberosV/src/lib/kafs/afslib.c delete mode 100644 kerberosV/src/lib/kafs/afslib.exp delete mode 100644 kerberosV/src/lib/kafs/afssys.c delete mode 100644 kerberosV/src/lib/kafs/afssysdefs.h delete mode 100644 kerberosV/src/lib/kafs/common.c delete mode 100644 kerberosV/src/lib/kafs/kafs.3 delete mode 100644 kerberosV/src/lib/kafs/kafs.h delete mode 100644 kerberosV/src/lib/kafs/kafs_locl.h delete mode 100644 kerberosV/src/lib/kafs/roken_rename.h delete mode 100644 kerberosV/src/lib/kdfs/ChangeLog delete mode 100644 kerberosV/src/lib/kdfs/Makefile.am delete mode 100644 kerberosV/src/lib/kdfs/Makefile.in delete mode 100644 kerberosV/src/lib/kdfs/NTMakefile delete mode 100644 kerberosV/src/lib/kdfs/k5dfspag.c delete mode 100644 kerberosV/src/lib/krb5/Makefile.am delete mode 100644 kerberosV/src/lib/krb5/Makefile.in delete mode 100644 kerberosV/src/lib/krb5/NTMakefile delete mode 100644 kerberosV/src/lib/krb5/acache.c delete mode 100644 kerberosV/src/lib/krb5/acl.c delete mode 100644 kerberosV/src/lib/krb5/add_et_list.c delete mode 100644 kerberosV/src/lib/krb5/addr_families.c delete mode 100644 kerberosV/src/lib/krb5/aes-test.c delete mode 100644 kerberosV/src/lib/krb5/aname_to_localname.c delete mode 100644 kerberosV/src/lib/krb5/appdefault.c delete mode 100644 kerberosV/src/lib/krb5/asn1_glue.c delete mode 100644 kerberosV/src/lib/krb5/auth_context.c delete mode 100644 kerberosV/src/lib/krb5/build_ap_req.c delete mode 100644 kerberosV/src/lib/krb5/build_auth.c delete mode 100644 kerberosV/src/lib/krb5/cache.c delete mode 100644 kerberosV/src/lib/krb5/ccache_plugin.h delete mode 100644 kerberosV/src/lib/krb5/changepw.c delete mode 100644 kerberosV/src/lib/krb5/codec.c delete mode 100644 kerberosV/src/lib/krb5/config_file.c delete mode 100644 kerberosV/src/lib/krb5/constants.c delete mode 100644 kerberosV/src/lib/krb5/context.c delete mode 100644 kerberosV/src/lib/krb5/convert_creds.c delete mode 100644 kerberosV/src/lib/krb5/copy_host_realm.c delete mode 100644 kerberosV/src/lib/krb5/crc.c delete mode 100644 kerberosV/src/lib/krb5/creds.c delete mode 100644 kerberosV/src/lib/krb5/crypto-aes.c delete mode 100644 kerberosV/src/lib/krb5/crypto-algs.c delete mode 100644 kerberosV/src/lib/krb5/crypto-arcfour.c delete mode 100644 kerberosV/src/lib/krb5/crypto-des-common.c delete mode 100644 kerberosV/src/lib/krb5/crypto-des.c delete mode 100644 kerberosV/src/lib/krb5/crypto-des3.c delete mode 100644 kerberosV/src/lib/krb5/crypto-evp.c delete mode 100644 kerberosV/src/lib/krb5/crypto-null.c delete mode 100644 kerberosV/src/lib/krb5/crypto-pk.c delete mode 100644 kerberosV/src/lib/krb5/crypto-rand.c delete mode 100644 kerberosV/src/lib/krb5/crypto-stubs.c delete mode 100644 kerberosV/src/lib/krb5/crypto.c delete mode 100644 kerberosV/src/lib/krb5/crypto.h delete mode 100644 kerberosV/src/lib/krb5/data.c delete mode 100644 kerberosV/src/lib/krb5/deprecated.c delete mode 100644 kerberosV/src/lib/krb5/derived-key-test.c delete mode 100644 kerberosV/src/lib/krb5/digest.c delete mode 100644 kerberosV/src/lib/krb5/doxygen.c delete mode 100644 kerberosV/src/lib/krb5/eai_to_heim_errno.c delete mode 100644 kerberosV/src/lib/krb5/error_string.c delete mode 100644 kerberosV/src/lib/krb5/expand_hostname.c delete mode 100644 kerberosV/src/lib/krb5/expand_path.c delete mode 100644 kerberosV/src/lib/krb5/fcache.c delete mode 100644 kerberosV/src/lib/krb5/free.c delete mode 100644 kerberosV/src/lib/krb5/free_host_realm.c delete mode 100644 kerberosV/src/lib/krb5/generate_seq_number.c delete mode 100644 kerberosV/src/lib/krb5/generate_subkey.c delete mode 100644 kerberosV/src/lib/krb5/get_addrs.c delete mode 100644 kerberosV/src/lib/krb5/get_cred.c delete mode 100644 kerberosV/src/lib/krb5/get_default_principal.c delete mode 100644 kerberosV/src/lib/krb5/get_default_realm.c delete mode 100644 kerberosV/src/lib/krb5/get_for_creds.c delete mode 100644 kerberosV/src/lib/krb5/get_host_realm.c delete mode 100644 kerberosV/src/lib/krb5/get_in_tkt.c delete mode 100644 kerberosV/src/lib/krb5/get_port.c delete mode 100644 kerberosV/src/lib/krb5/heim_err.et delete mode 100644 kerberosV/src/lib/krb5/init_creds.c delete mode 100644 kerberosV/src/lib/krb5/init_creds_pw.c delete mode 100644 kerberosV/src/lib/krb5/k524_err.et delete mode 100644 kerberosV/src/lib/krb5/kcm.c delete mode 100644 kerberosV/src/lib/krb5/kcm.h delete mode 100644 kerberosV/src/lib/krb5/kerberos.8 delete mode 100644 kerberosV/src/lib/krb5/kerberos.cat8 delete mode 100644 kerberosV/src/lib/krb5/keyblock.c delete mode 100644 kerberosV/src/lib/krb5/keytab.c delete mode 100644 kerberosV/src/lib/krb5/keytab_any.c delete mode 100644 kerberosV/src/lib/krb5/keytab_file.c delete mode 100644 kerberosV/src/lib/krb5/keytab_keyfile.c delete mode 100644 kerberosV/src/lib/krb5/keytab_memory.c delete mode 100644 kerberosV/src/lib/krb5/krb5-private.h delete mode 100644 kerberosV/src/lib/krb5/krb5-protos.h delete mode 100644 kerberosV/src/lib/krb5/krb5-v4compat.h delete mode 100644 kerberosV/src/lib/krb5/krb5.conf.5 delete mode 100644 kerberosV/src/lib/krb5/krb5.conf.cat5 delete mode 100644 kerberosV/src/lib/krb5/krb5.h delete mode 100644 kerberosV/src/lib/krb5/krb5.moduli delete mode 100644 kerberosV/src/lib/krb5/krb524_convert_creds_kdc.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_425_conv_principal.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_acl_match_file.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_aname_to_localname.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_appdefault.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_auth_context.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_c_make_checksum.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_ccapi.h delete mode 100644 kerberosV/src/lib/krb5/krb5_check_transited.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_create_checksum.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_creds.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_digest.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_eai_to_heim_errno.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_encrypt.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_err.et delete mode 100644 kerberosV/src/lib/krb5/krb5_find_padata.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_generate_random_block.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_get_all_client_addrs.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_get_credentials.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_get_creds.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_get_forwarded_creds.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_get_in_cred.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_get_init_creds.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_get_krbhst.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_getportbyname.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_init_context.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_is_thread_safe.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_krbhst_init.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_locl.h delete mode 100644 kerberosV/src/lib/krb5/krb5_mk_req.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_mk_safe.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_openlog.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_parse_name.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_principal.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_rcache.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_rd_error.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_rd_safe.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_set_default_realm.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_set_password.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_string_to_key.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_timeofday.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_verify_init_creds.3 delete mode 100644 kerberosV/src/lib/krb5/krb5_verify_user.3 delete mode 100644 kerberosV/src/lib/krb5/krb_err.et delete mode 100644 kerberosV/src/lib/krb5/krbhst-test.c delete mode 100644 kerberosV/src/lib/krb5/krbhst.c delete mode 100644 kerberosV/src/lib/krb5/kuserok.c delete mode 100644 kerberosV/src/lib/krb5/locate_plugin.h delete mode 100644 kerberosV/src/lib/krb5/log.c delete mode 100644 kerberosV/src/lib/krb5/mcache.c delete mode 100644 kerberosV/src/lib/krb5/misc.c delete mode 100644 kerberosV/src/lib/krb5/mit_glue.c delete mode 100644 kerberosV/src/lib/krb5/mk_error.c delete mode 100644 kerberosV/src/lib/krb5/mk_priv.c delete mode 100644 kerberosV/src/lib/krb5/mk_rep.c delete mode 100644 kerberosV/src/lib/krb5/mk_req.c delete mode 100644 kerberosV/src/lib/krb5/mk_req_ext.c delete mode 100644 kerberosV/src/lib/krb5/mk_safe.c delete mode 100644 kerberosV/src/lib/krb5/n-fold-test.c delete mode 100644 kerberosV/src/lib/krb5/n-fold.c delete mode 100644 kerberosV/src/lib/krb5/net_read.c delete mode 100644 kerberosV/src/lib/krb5/net_write.c delete mode 100644 kerberosV/src/lib/krb5/pac.c delete mode 100644 kerberosV/src/lib/krb5/padata.c delete mode 100644 kerberosV/src/lib/krb5/parse-name-test.c delete mode 100644 kerberosV/src/lib/krb5/pcache.c delete mode 100644 kerberosV/src/lib/krb5/pkinit.c delete mode 100644 kerberosV/src/lib/krb5/plugin.c delete mode 100644 kerberosV/src/lib/krb5/principal.c delete mode 100644 kerberosV/src/lib/krb5/prog_setup.c delete mode 100644 kerberosV/src/lib/krb5/prompter_posix.c delete mode 100644 kerberosV/src/lib/krb5/rd_cred.c delete mode 100644 kerberosV/src/lib/krb5/rd_error.c delete mode 100644 kerberosV/src/lib/krb5/rd_priv.c delete mode 100644 kerberosV/src/lib/krb5/rd_rep.c delete mode 100644 kerberosV/src/lib/krb5/rd_req.c delete mode 100644 kerberosV/src/lib/krb5/rd_safe.c delete mode 100644 kerberosV/src/lib/krb5/read_message.c delete mode 100644 kerberosV/src/lib/krb5/recvauth.c delete mode 100644 kerberosV/src/lib/krb5/replay.c delete mode 100644 kerberosV/src/lib/krb5/salt-aes.c delete mode 100644 kerberosV/src/lib/krb5/salt-arcfour.c delete mode 100644 kerberosV/src/lib/krb5/salt-des.c delete mode 100644 kerberosV/src/lib/krb5/salt-des3.c delete mode 100644 kerberosV/src/lib/krb5/salt.c delete mode 100644 kerberosV/src/lib/krb5/scache.c delete mode 100644 kerberosV/src/lib/krb5/send_to_kdc.c delete mode 100644 kerberosV/src/lib/krb5/send_to_kdc_plugin.h delete mode 100644 kerberosV/src/lib/krb5/sendauth.c delete mode 100644 kerberosV/src/lib/krb5/set_default_realm.c delete mode 100644 kerberosV/src/lib/krb5/sock_principal.c delete mode 100644 kerberosV/src/lib/krb5/store-int.c delete mode 100644 kerberosV/src/lib/krb5/store-int.h delete mode 100644 kerberosV/src/lib/krb5/store-test.c delete mode 100644 kerberosV/src/lib/krb5/store.c delete mode 100644 kerberosV/src/lib/krb5/store_emem.c delete mode 100644 kerberosV/src/lib/krb5/store_fd.c delete mode 100644 kerberosV/src/lib/krb5/store_mem.c delete mode 100644 kerberosV/src/lib/krb5/string-to-key-test.c delete mode 100644 kerberosV/src/lib/krb5/test_acl.c delete mode 100644 kerberosV/src/lib/krb5/test_addr.c delete mode 100644 kerberosV/src/lib/krb5/test_alname.c delete mode 100644 kerberosV/src/lib/krb5/test_ap-req.c delete mode 100644 kerberosV/src/lib/krb5/test_cc.c delete mode 100644 kerberosV/src/lib/krb5/test_config.c delete mode 100644 kerberosV/src/lib/krb5/test_config_strings.cfg delete mode 100644 kerberosV/src/lib/krb5/test_crypto.c delete mode 100644 kerberosV/src/lib/krb5/test_crypto_wrapping.c delete mode 100644 kerberosV/src/lib/krb5/test_forward.c delete mode 100644 kerberosV/src/lib/krb5/test_fx.c delete mode 100644 kerberosV/src/lib/krb5/test_get_addrs.c delete mode 100644 kerberosV/src/lib/krb5/test_gic.c delete mode 100644 kerberosV/src/lib/krb5/test_hostname.c delete mode 100644 kerberosV/src/lib/krb5/test_keytab.c delete mode 100644 kerberosV/src/lib/krb5/test_kuserok.c delete mode 100644 kerberosV/src/lib/krb5/test_mem.c delete mode 100644 kerberosV/src/lib/krb5/test_pac.c delete mode 100644 kerberosV/src/lib/krb5/test_pkinit_dh2key.c delete mode 100644 kerberosV/src/lib/krb5/test_pknistkdf.c delete mode 100644 kerberosV/src/lib/krb5/test_plugin.c delete mode 100644 kerberosV/src/lib/krb5/test_prf.c delete mode 100644 kerberosV/src/lib/krb5/test_princ.c delete mode 100644 kerberosV/src/lib/krb5/test_renew.c delete mode 100644 kerberosV/src/lib/krb5/test_rfc3961.c delete mode 100644 kerberosV/src/lib/krb5/test_store.c delete mode 100644 kerberosV/src/lib/krb5/test_time.c delete mode 100644 kerberosV/src/lib/krb5/test_x500.c delete mode 100644 kerberosV/src/lib/krb5/ticket.c delete mode 100644 kerberosV/src/lib/krb5/time.c delete mode 100644 kerberosV/src/lib/krb5/transited.c delete mode 100644 kerberosV/src/lib/krb5/verify_init.c delete mode 100644 kerberosV/src/lib/krb5/verify_krb5_conf-version.rc delete mode 100644 kerberosV/src/lib/krb5/verify_krb5_conf.8 delete mode 100644 kerberosV/src/lib/krb5/verify_krb5_conf.c delete mode 100644 kerberosV/src/lib/krb5/verify_krb5_conf.cat8 delete mode 100644 kerberosV/src/lib/krb5/verify_user.c delete mode 100644 kerberosV/src/lib/krb5/version-script.map delete mode 100644 kerberosV/src/lib/krb5/version.c delete mode 100644 kerberosV/src/lib/krb5/warn.c delete mode 100644 kerberosV/src/lib/krb5/write_message.c delete mode 100644 kerberosV/src/lib/libedit/COPYING delete mode 100644 kerberosV/src/lib/libedit/ChangeLog delete mode 100644 kerberosV/src/lib/libedit/INSTALL delete mode 100644 kerberosV/src/lib/libedit/Makefile.am delete mode 100644 kerberosV/src/lib/libedit/Makefile.in delete mode 100644 kerberosV/src/lib/libedit/THANKS delete mode 100644 kerberosV/src/lib/libedit/[config.h].in delete mode 100644 kerberosV/src/lib/libedit/acinclude.m4 delete mode 100644 kerberosV/src/lib/libedit/aclocal.m4 delete mode 100755 kerberosV/src/lib/libedit/config.guess delete mode 100644 kerberosV/src/lib/libedit/config.h.in delete mode 100755 kerberosV/src/lib/libedit/config.sub delete mode 100755 kerberosV/src/lib/libedit/configure delete mode 100644 kerberosV/src/lib/libedit/configure.ac delete mode 100755 kerberosV/src/lib/libedit/depcomp delete mode 100755 kerberosV/src/lib/libedit/install-sh delete mode 100755 kerberosV/src/lib/libedit/ltmain.sh delete mode 100755 kerberosV/src/lib/libedit/missing delete mode 100644 kerberosV/src/lib/libedit/src/Makefile.am delete mode 100644 kerberosV/src/lib/libedit/src/Makefile.in delete mode 100644 kerberosV/src/lib/libedit/src/chared.c delete mode 100644 kerberosV/src/lib/libedit/src/chared.h delete mode 100644 kerberosV/src/lib/libedit/src/chartype.c delete mode 100644 kerberosV/src/lib/libedit/src/chartype.h delete mode 100644 kerberosV/src/lib/libedit/src/common.c delete mode 100644 kerberosV/src/lib/libedit/src/editline/readline.h delete mode 100644 kerberosV/src/lib/libedit/src/el.c delete mode 100644 kerberosV/src/lib/libedit/src/el.h delete mode 100644 kerberosV/src/lib/libedit/src/el_term.h delete mode 100644 kerberosV/src/lib/libedit/src/eln.c delete mode 100644 kerberosV/src/lib/libedit/src/emacs.c delete mode 100644 kerberosV/src/lib/libedit/src/fgetln.c delete mode 100644 kerberosV/src/lib/libedit/src/filecomplete.c delete mode 100644 kerberosV/src/lib/libedit/src/filecomplete.h delete mode 100644 kerberosV/src/lib/libedit/src/hist.c delete mode 100644 kerberosV/src/lib/libedit/src/hist.h delete mode 100644 kerberosV/src/lib/libedit/src/histedit.h delete mode 100644 kerberosV/src/lib/libedit/src/history.c delete mode 100644 kerberosV/src/lib/libedit/src/key.c delete mode 100644 kerberosV/src/lib/libedit/src/key.h delete mode 100644 kerberosV/src/lib/libedit/src/makelist delete mode 100644 kerberosV/src/lib/libedit/src/map.c delete mode 100644 kerberosV/src/lib/libedit/src/map.h delete mode 100644 kerberosV/src/lib/libedit/src/parse.c delete mode 100644 kerberosV/src/lib/libedit/src/parse.h delete mode 100644 kerberosV/src/lib/libedit/src/prompt.c delete mode 100644 kerberosV/src/lib/libedit/src/prompt.h delete mode 100644 kerberosV/src/lib/libedit/src/read.c delete mode 100644 kerberosV/src/lib/libedit/src/read.h delete mode 100644 kerberosV/src/lib/libedit/src/readline.c delete mode 100644 kerberosV/src/lib/libedit/src/refresh.c delete mode 100644 kerberosV/src/lib/libedit/src/refresh.h delete mode 100644 kerberosV/src/lib/libedit/src/search.c delete mode 100644 kerberosV/src/lib/libedit/src/search.h delete mode 100644 kerberosV/src/lib/libedit/src/shlib_version delete mode 100644 kerberosV/src/lib/libedit/src/sig.c delete mode 100644 kerberosV/src/lib/libedit/src/sig.h delete mode 100644 kerberosV/src/lib/libedit/src/strlcat.c delete mode 100644 kerberosV/src/lib/libedit/src/strlcpy.c delete mode 100644 kerberosV/src/lib/libedit/src/sys.h delete mode 100644 kerberosV/src/lib/libedit/src/term.c delete mode 100644 kerberosV/src/lib/libedit/src/tokenizer.c delete mode 100644 kerberosV/src/lib/libedit/src/tty.c delete mode 100644 kerberosV/src/lib/libedit/src/tty.h delete mode 100644 kerberosV/src/lib/libedit/src/unvis.c delete mode 100644 kerberosV/src/lib/libedit/src/vi.c delete mode 100644 kerberosV/src/lib/libedit/src/vis.c delete mode 100644 kerberosV/src/lib/libedit/src/vis.h delete mode 100644 kerberosV/src/lib/libedit/src/wcsdup.c delete mode 100644 kerberosV/src/lib/ntlm/ChangeLog delete mode 100644 kerberosV/src/lib/ntlm/Makefile.am delete mode 100644 kerberosV/src/lib/ntlm/Makefile.in delete mode 100644 kerberosV/src/lib/ntlm/NTMakefile delete mode 100644 kerberosV/src/lib/ntlm/heimntlm-protos.h delete mode 100644 kerberosV/src/lib/ntlm/heimntlm.h delete mode 100644 kerberosV/src/lib/ntlm/libheimntlm-exports.def delete mode 100644 kerberosV/src/lib/ntlm/libheimntlm-version.rc delete mode 100644 kerberosV/src/lib/ntlm/ntlm.c delete mode 100644 kerberosV/src/lib/ntlm/ntlm_err.et delete mode 100644 kerberosV/src/lib/ntlm/test_ntlm.c delete mode 100644 kerberosV/src/lib/ntlm/version-script.map delete mode 100644 kerberosV/src/lib/otp/ChangeLog delete mode 100644 kerberosV/src/lib/otp/Makefile.am delete mode 100644 kerberosV/src/lib/otp/Makefile.in delete mode 100644 kerberosV/src/lib/otp/NTMakefile delete mode 100644 kerberosV/src/lib/otp/otp.c delete mode 100644 kerberosV/src/lib/otp/otp.h delete mode 100644 kerberosV/src/lib/otp/otp_challenge.c delete mode 100644 kerberosV/src/lib/otp/otp_db.c delete mode 100644 kerberosV/src/lib/otp/otp_locl.h delete mode 100644 kerberosV/src/lib/otp/otp_md.c delete mode 100644 kerberosV/src/lib/otp/otp_md.h delete mode 100644 kerberosV/src/lib/otp/otp_parse.c delete mode 100644 kerberosV/src/lib/otp/otp_print.c delete mode 100644 kerberosV/src/lib/otp/otp_verify.c delete mode 100644 kerberosV/src/lib/otp/otptest.c delete mode 100644 kerberosV/src/lib/otp/roken_rename.h delete mode 100644 kerberosV/src/lib/otp/version-script.map delete mode 100644 kerberosV/src/lib/roken/ChangeLog delete mode 100644 kerberosV/src/lib/roken/Makefile.am delete mode 100644 kerberosV/src/lib/roken/Makefile.in delete mode 100644 kerberosV/src/lib/roken/NTMakefile delete mode 100644 kerberosV/src/lib/roken/base64-test.c delete mode 100644 kerberosV/src/lib/roken/base64.c delete mode 100644 kerberosV/src/lib/roken/base64.h delete mode 100644 kerberosV/src/lib/roken/bswap.c delete mode 100644 kerberosV/src/lib/roken/chown.c delete mode 100644 kerberosV/src/lib/roken/cloexec.c delete mode 100644 kerberosV/src/lib/roken/closefrom.c delete mode 100644 kerberosV/src/lib/roken/concat.c delete mode 100644 kerberosV/src/lib/roken/copyhostent.c delete mode 100644 kerberosV/src/lib/roken/ct.c delete mode 100644 kerberosV/src/lib/roken/daemon.c delete mode 100644 kerberosV/src/lib/roken/doxygen.c delete mode 100644 kerberosV/src/lib/roken/dumpdata.c delete mode 100644 kerberosV/src/lib/roken/ecalloc.3 delete mode 100644 kerberosV/src/lib/roken/ecalloc.c delete mode 100644 kerberosV/src/lib/roken/emalloc.c delete mode 100644 kerberosV/src/lib/roken/environment.c delete mode 100644 kerberosV/src/lib/roken/eread.c delete mode 100644 kerberosV/src/lib/roken/erealloc.c delete mode 100644 kerberosV/src/lib/roken/err.c delete mode 100644 kerberosV/src/lib/roken/err.hin delete mode 100644 kerberosV/src/lib/roken/errx.c delete mode 100644 kerberosV/src/lib/roken/esetenv.c delete mode 100644 kerberosV/src/lib/roken/estrdup.c delete mode 100644 kerberosV/src/lib/roken/ewrite.c delete mode 100644 kerberosV/src/lib/roken/fchown.c delete mode 100644 kerberosV/src/lib/roken/flock.c delete mode 100644 kerberosV/src/lib/roken/fnmatch.c delete mode 100644 kerberosV/src/lib/roken/fnmatch.hin delete mode 100644 kerberosV/src/lib/roken/freeaddrinfo.c delete mode 100644 kerberosV/src/lib/roken/freehostent.c delete mode 100644 kerberosV/src/lib/roken/gai_strerror.c delete mode 100644 kerberosV/src/lib/roken/get_default_username.c delete mode 100644 kerberosV/src/lib/roken/get_window_size.c delete mode 100644 kerberosV/src/lib/roken/getaddrinfo-test.c delete mode 100644 kerberosV/src/lib/roken/getaddrinfo.c delete mode 100644 kerberosV/src/lib/roken/getaddrinfo_hostspec.c delete mode 100644 kerberosV/src/lib/roken/getarg.3 delete mode 100644 kerberosV/src/lib/roken/getarg.c delete mode 100644 kerberosV/src/lib/roken/getarg.h delete mode 100644 kerberosV/src/lib/roken/getcap.c delete mode 100644 kerberosV/src/lib/roken/getcwd.c delete mode 100644 kerberosV/src/lib/roken/getdtablesize.c delete mode 100644 kerberosV/src/lib/roken/getegid.c delete mode 100644 kerberosV/src/lib/roken/geteuid.c delete mode 100644 kerberosV/src/lib/roken/getgid.c delete mode 100644 kerberosV/src/lib/roken/gethostname.c delete mode 100644 kerberosV/src/lib/roken/getifaddrs-test.c delete mode 100644 kerberosV/src/lib/roken/getifaddrs.c delete mode 100644 kerberosV/src/lib/roken/getipnodebyaddr.c delete mode 100644 kerberosV/src/lib/roken/getipnodebyname.c delete mode 100644 kerberosV/src/lib/roken/getnameinfo.c delete mode 100644 kerberosV/src/lib/roken/getnameinfo_verified.c delete mode 100644 kerberosV/src/lib/roken/getopt.c delete mode 100644 kerberosV/src/lib/roken/getprogname.c delete mode 100644 kerberosV/src/lib/roken/gettimeofday.c delete mode 100644 kerberosV/src/lib/roken/getuid.c delete mode 100644 kerberosV/src/lib/roken/getusershell.c delete mode 100644 kerberosV/src/lib/roken/glob.c delete mode 100644 kerberosV/src/lib/roken/glob.hin delete mode 100644 kerberosV/src/lib/roken/h_errno.c delete mode 100644 kerberosV/src/lib/roken/hex-test.c delete mode 100644 kerberosV/src/lib/roken/hex.c delete mode 100644 kerberosV/src/lib/roken/hex.h delete mode 100644 kerberosV/src/lib/roken/hostent_find_fqdn.c delete mode 100644 kerberosV/src/lib/roken/hstrerror.c delete mode 100644 kerberosV/src/lib/roken/ifaddrs.hin delete mode 100644 kerberosV/src/lib/roken/inet_aton.c delete mode 100644 kerberosV/src/lib/roken/inet_ntop.c delete mode 100644 kerberosV/src/lib/roken/inet_pton.c delete mode 100644 kerberosV/src/lib/roken/initgroups.c delete mode 100644 kerberosV/src/lib/roken/innetgr.c delete mode 100644 kerberosV/src/lib/roken/install-sh delete mode 100644 kerberosV/src/lib/roken/iruserok.c delete mode 100644 kerberosV/src/lib/roken/issuid.c delete mode 100644 kerberosV/src/lib/roken/k_getpwnam.c delete mode 100644 kerberosV/src/lib/roken/k_getpwuid.c delete mode 100644 kerberosV/src/lib/roken/localtime_r.c delete mode 100644 kerberosV/src/lib/roken/lstat.c delete mode 100644 kerberosV/src/lib/roken/memmove.c delete mode 100644 kerberosV/src/lib/roken/mini_inetd.c delete mode 100644 kerberosV/src/lib/roken/missing delete mode 100644 kerberosV/src/lib/roken/mkinstalldirs delete mode 100644 kerberosV/src/lib/roken/mkstemp.c delete mode 100644 kerberosV/src/lib/roken/ndbm_wrap.c delete mode 100644 kerberosV/src/lib/roken/ndbm_wrap.h delete mode 100644 kerberosV/src/lib/roken/net_read.c delete mode 100644 kerberosV/src/lib/roken/net_write.c delete mode 100644 kerberosV/src/lib/roken/parse_bytes-test.c delete mode 100644 kerberosV/src/lib/roken/parse_bytes.c delete mode 100644 kerberosV/src/lib/roken/parse_bytes.h delete mode 100644 kerberosV/src/lib/roken/parse_reply-test.c delete mode 100644 kerberosV/src/lib/roken/parse_time-test.c delete mode 100644 kerberosV/src/lib/roken/parse_time.3 delete mode 100644 kerberosV/src/lib/roken/parse_time.c delete mode 100644 kerberosV/src/lib/roken/parse_time.h delete mode 100644 kerberosV/src/lib/roken/parse_units.c delete mode 100644 kerberosV/src/lib/roken/parse_units.h delete mode 100644 kerberosV/src/lib/roken/putenv.c delete mode 100644 kerberosV/src/lib/roken/qsort.c delete mode 100644 kerberosV/src/lib/roken/rand.c delete mode 100644 kerberosV/src/lib/roken/rcmd.c delete mode 100644 kerberosV/src/lib/roken/readv.c delete mode 100644 kerberosV/src/lib/roken/realloc.c delete mode 100644 kerberosV/src/lib/roken/recvmsg.c delete mode 100644 kerberosV/src/lib/roken/resolve-test.c delete mode 100644 kerberosV/src/lib/roken/resolve.c delete mode 100644 kerberosV/src/lib/roken/resolve.h delete mode 100644 kerberosV/src/lib/roken/rkpty.c delete mode 100644 kerberosV/src/lib/roken/roken-common.h delete mode 100644 kerberosV/src/lib/roken/roken.awk delete mode 100644 kerberosV/src/lib/roken/roken.h.in delete mode 100644 kerberosV/src/lib/roken/roken_gethostby.c delete mode 100644 kerberosV/src/lib/roken/rtbl.3 delete mode 100644 kerberosV/src/lib/roken/rtbl.c delete mode 100644 kerberosV/src/lib/roken/rtbl.h delete mode 100644 kerberosV/src/lib/roken/search.hin delete mode 100644 kerberosV/src/lib/roken/sendmsg.c delete mode 100644 kerberosV/src/lib/roken/setegid.c delete mode 100644 kerberosV/src/lib/roken/setenv.c delete mode 100644 kerberosV/src/lib/roken/seteuid.c delete mode 100644 kerberosV/src/lib/roken/setprogname.c delete mode 100644 kerberosV/src/lib/roken/signal.c delete mode 100644 kerberosV/src/lib/roken/simple_exec.c delete mode 100644 kerberosV/src/lib/roken/snprintf-test.c delete mode 100644 kerberosV/src/lib/roken/snprintf.c delete mode 100644 kerberosV/src/lib/roken/socket.c delete mode 100644 kerberosV/src/lib/roken/socket_wrapper.c delete mode 100644 kerberosV/src/lib/roken/socket_wrapper.h delete mode 100644 kerberosV/src/lib/roken/strcasecmp.c delete mode 100644 kerberosV/src/lib/roken/strcollect.c delete mode 100644 kerberosV/src/lib/roken/strdup.c delete mode 100644 kerberosV/src/lib/roken/strerror.c delete mode 100644 kerberosV/src/lib/roken/strerror_r.c delete mode 100644 kerberosV/src/lib/roken/strftime.c delete mode 100644 kerberosV/src/lib/roken/strlcat.c delete mode 100644 kerberosV/src/lib/roken/strlcpy.c delete mode 100644 kerberosV/src/lib/roken/strlwr.c delete mode 100644 kerberosV/src/lib/roken/strncasecmp.c delete mode 100644 kerberosV/src/lib/roken/strndup.c delete mode 100644 kerberosV/src/lib/roken/strnlen.c delete mode 100644 kerberosV/src/lib/roken/strpftime-test.c delete mode 100644 kerberosV/src/lib/roken/strpftime-test.h delete mode 100644 kerberosV/src/lib/roken/strpool.c delete mode 100644 kerberosV/src/lib/roken/strptime.c delete mode 100644 kerberosV/src/lib/roken/strsep.c delete mode 100644 kerberosV/src/lib/roken/strsep_copy.c delete mode 100644 kerberosV/src/lib/roken/strtok_r.c delete mode 100644 kerberosV/src/lib/roken/strupr.c delete mode 100644 kerberosV/src/lib/roken/swab.c delete mode 100644 kerberosV/src/lib/roken/test-mem.c delete mode 100644 kerberosV/src/lib/roken/test-mem.h delete mode 100644 kerberosV/src/lib/roken/test-readenv.c delete mode 100644 kerberosV/src/lib/roken/timegm.c delete mode 100644 kerberosV/src/lib/roken/timeval.c delete mode 100644 kerberosV/src/lib/roken/tm2time.c delete mode 100644 kerberosV/src/lib/roken/tsearch-test.c delete mode 100644 kerberosV/src/lib/roken/tsearch.c delete mode 100644 kerberosV/src/lib/roken/unsetenv.c delete mode 100644 kerberosV/src/lib/roken/unvis.c delete mode 100644 kerberosV/src/lib/roken/verify.c delete mode 100644 kerberosV/src/lib/roken/verr.c delete mode 100644 kerberosV/src/lib/roken/verrx.c delete mode 100644 kerberosV/src/lib/roken/vis.c delete mode 100644 kerberosV/src/lib/roken/vis.hin delete mode 100644 kerberosV/src/lib/roken/vsyslog.c delete mode 100644 kerberosV/src/lib/roken/vwarn.c delete mode 100644 kerberosV/src/lib/roken/vwarnx.c delete mode 100644 kerberosV/src/lib/roken/warn.c delete mode 100644 kerberosV/src/lib/roken/warnerr.c delete mode 100644 kerberosV/src/lib/roken/warnx.c delete mode 100644 kerberosV/src/lib/roken/write_pid.c delete mode 100644 kerberosV/src/lib/roken/writev.c delete mode 100644 kerberosV/src/lib/roken/xdbm.h delete mode 100644 kerberosV/src/lib/roken/xfree.c delete mode 100644 kerberosV/src/lib/sl/ChangeLog delete mode 100644 kerberosV/src/lib/sl/Makefile.am delete mode 100644 kerberosV/src/lib/sl/Makefile.in delete mode 100644 kerberosV/src/lib/sl/NTMakefile delete mode 100644 kerberosV/src/lib/sl/roken_rename.h delete mode 100644 kerberosV/src/lib/sl/sl.c delete mode 100644 kerberosV/src/lib/sl/sl.h delete mode 100644 kerberosV/src/lib/sl/sl_locl.h delete mode 100644 kerberosV/src/lib/sl/slc-gram.y delete mode 100644 kerberosV/src/lib/sl/slc-lex.c delete mode 100644 kerberosV/src/lib/sl/slc-lex.l delete mode 100644 kerberosV/src/lib/sl/slc.h delete mode 100644 kerberosV/src/lib/sl/test_sl.c delete mode 100644 kerberosV/src/lib/sqlite/Makefile.am delete mode 100644 kerberosV/src/lib/sqlite/Makefile.in delete mode 100644 kerberosV/src/lib/sqlite/NTMakefile delete mode 100644 kerberosV/src/lib/sqlite/sqlite3.c delete mode 100644 kerberosV/src/lib/sqlite/sqlite3.h delete mode 100644 kerberosV/src/lib/sqlite/sqlite3ext.h delete mode 100644 kerberosV/src/lib/vers/ChangeLog delete mode 100644 kerberosV/src/lib/vers/Makefile.am delete mode 100644 kerberosV/src/lib/vers/Makefile.in delete mode 100644 kerberosV/src/lib/vers/NTMakefile delete mode 100644 kerberosV/src/lib/vers/print_version.c delete mode 100644 kerberosV/src/lib/vers/vers.h delete mode 100644 kerberosV/src/lib/wind/ChangeLog delete mode 100644 kerberosV/src/lib/wind/CompositionExclusions-3.2.0.txt delete mode 100644 kerberosV/src/lib/wind/DerivedNormalizationProps.txt delete mode 100644 kerberosV/src/lib/wind/Makefile.am delete mode 100644 kerberosV/src/lib/wind/Makefile.in delete mode 100644 kerberosV/src/lib/wind/NTMakefile delete mode 100644 kerberosV/src/lib/wind/NormalizationCorrections.txt delete mode 100644 kerberosV/src/lib/wind/NormalizationTest.txt delete mode 100644 kerberosV/src/lib/wind/UnicodeData.py delete mode 100644 kerberosV/src/lib/wind/UnicodeData.txt delete mode 100644 kerberosV/src/lib/wind/bidi.c delete mode 100644 kerberosV/src/lib/wind/bidi_table.c delete mode 100644 kerberosV/src/lib/wind/bidi_table.h delete mode 100644 kerberosV/src/lib/wind/combining.c delete mode 100644 kerberosV/src/lib/wind/combining_table.c delete mode 100644 kerberosV/src/lib/wind/combining_table.h delete mode 100644 kerberosV/src/lib/wind/doxygen.c delete mode 100644 kerberosV/src/lib/wind/errorlist.c delete mode 100644 kerberosV/src/lib/wind/errorlist_table.c delete mode 100644 kerberosV/src/lib/wind/errorlist_table.h delete mode 100644 kerberosV/src/lib/wind/gen-bidi.py delete mode 100644 kerberosV/src/lib/wind/gen-combining.py delete mode 100644 kerberosV/src/lib/wind/gen-errorlist.py delete mode 100644 kerberosV/src/lib/wind/gen-map.py delete mode 100644 kerberosV/src/lib/wind/gen-normalize.py delete mode 100644 kerberosV/src/lib/wind/gen-punycode-examples.py delete mode 100644 kerberosV/src/lib/wind/generate.py delete mode 100644 kerberosV/src/lib/wind/idn-lookup.c delete mode 100644 kerberosV/src/lib/wind/ldap.c delete mode 100644 kerberosV/src/lib/wind/libwind-exports.def delete mode 100644 kerberosV/src/lib/wind/map.c delete mode 100644 kerberosV/src/lib/wind/map_table.c delete mode 100644 kerberosV/src/lib/wind/map_table.h delete mode 100644 kerberosV/src/lib/wind/normalize.c delete mode 100644 kerberosV/src/lib/wind/normalize_table.c delete mode 100644 kerberosV/src/lib/wind/normalize_table.h delete mode 100644 kerberosV/src/lib/wind/punycode.c delete mode 100644 kerberosV/src/lib/wind/punycode_examples.c delete mode 100644 kerberosV/src/lib/wind/punycode_examples.h delete mode 100644 kerberosV/src/lib/wind/rfc3454.py delete mode 100644 kerberosV/src/lib/wind/rfc3454.txt delete mode 100644 kerberosV/src/lib/wind/rfc3490.txt delete mode 100644 kerberosV/src/lib/wind/rfc3491.txt delete mode 100644 kerberosV/src/lib/wind/rfc3492.txt delete mode 100644 kerberosV/src/lib/wind/rfc4013.txt delete mode 100644 kerberosV/src/lib/wind/rfc4518.py delete mode 100644 kerberosV/src/lib/wind/rfc4518.txt delete mode 100644 kerberosV/src/lib/wind/stringprep.c delete mode 100644 kerberosV/src/lib/wind/stringprep.py delete mode 100644 kerberosV/src/lib/wind/test-bidi.c delete mode 100644 kerberosV/src/lib/wind/test-ldap.c delete mode 100644 kerberosV/src/lib/wind/test-map.c delete mode 100644 kerberosV/src/lib/wind/test-normalize.c delete mode 100644 kerberosV/src/lib/wind/test-prohibited.c delete mode 100644 kerberosV/src/lib/wind/test-punycode.c delete mode 100644 kerberosV/src/lib/wind/test-rw.c delete mode 100644 kerberosV/src/lib/wind/test-utf8.c delete mode 100644 kerberosV/src/lib/wind/utf8.c delete mode 100644 kerberosV/src/lib/wind/util.py delete mode 100644 kerberosV/src/lib/wind/version-script.map delete mode 100644 kerberosV/src/lib/wind/wind.h delete mode 100644 kerberosV/src/lib/wind/wind_err.et delete mode 100644 kerberosV/src/lib/wind/windlocl.h delete mode 100644 kerberosV/src/ltmain.sh delete mode 100644 kerberosV/src/missing delete mode 100644 kerberosV/src/packages/ChangeLog delete mode 100644 kerberosV/src/packages/Makefile.am delete mode 100644 kerberosV/src/packages/Makefile.in delete mode 100644 kerberosV/src/packages/mac/Info.plist delete mode 100644 kerberosV/src/packages/mac/Makefile.am delete mode 100644 kerberosV/src/packages/mac/Makefile.in delete mode 100644 kerberosV/src/packages/mac/Resources/Description.plist delete mode 100644 kerberosV/src/packages/mac/Resources/English.lproj/Welcome.rtf delete mode 100644 kerberosV/src/packages/mac/mac.sh delete mode 100644 kerberosV/src/packages/windows/NTMakefile delete mode 100644 kerberosV/src/packages/windows/assembly/Heimdal.Application.manifest.in delete mode 100644 kerberosV/src/packages/windows/assembly/Heimdal.Kerberos.manifest.in delete mode 100644 kerberosV/src/packages/windows/assembly/NTMakefile delete mode 100644 kerberosV/src/packages/windows/assembly/policy.Heimdal.Kerberos.in delete mode 100644 kerberosV/src/packages/windows/installer/NTMakefile delete mode 100644 kerberosV/src/packages/windows/installer/heimdal-assemblies.wxs delete mode 100644 kerberosV/src/packages/windows/installer/heimdal-installer.wxs delete mode 100644 kerberosV/src/packages/windows/installer/heimdal-policy.wxs delete mode 100644 kerberosV/src/packages/windows/installer/lang/en-us.wxl delete mode 100644 kerberosV/src/packages/windows/installer/lang/license-en-us.rtf delete mode 100644 kerberosV/src/packages/windows/sdk/NTMakefile delete mode 100644 kerberosV/src/po/Makefile.am delete mode 100644 kerberosV/src/po/Makefile.in delete mode 100644 kerberosV/src/po/gen-po.in delete mode 100644 kerberosV/src/po/heim_com_err-1750206208/heim_com_err-1750206208.pot delete mode 100644 kerberosV/src/po/heim_com_err-1765328384/heim_com_err-1765328384.pot delete mode 100644 kerberosV/src/po/heim_com_err-1765328384/sv_SE.mo delete mode 100644 kerberosV/src/po/heim_com_err-1765328384/sv_SE.po delete mode 100644 kerberosV/src/po/heim_com_err-1980176640/heim_com_err-1980176640.pot delete mode 100644 kerberosV/src/po/heim_com_err-969269760/heim_com_err-969269760.pot delete mode 100644 kerberosV/src/po/heim_com_err1859794432/heim_com_err1859794432.pot delete mode 100644 kerberosV/src/po/heim_com_err35224064/heim_com_err35224064.pot delete mode 100644 kerberosV/src/po/heim_com_err36150272/heim_com_err36150272.pot delete mode 100644 kerberosV/src/po/heim_com_err39525376/heim_com_err39525376.pot delete mode 100644 kerberosV/src/po/heim_com_err43787520/heim_com_err43787520.pot delete mode 100644 kerberosV/src/po/heim_com_err569856/heim_com_err569856.pot delete mode 100644 kerberosV/src/po/heimdal_krb5/heimdal_krb5.pot delete mode 100644 kerberosV/src/po/heimdal_krb5/sv_SE.mo delete mode 100644 kerberosV/src/po/heimdal_krb5/sv_SE.po delete mode 100644 kerberosV/src/po/heimdal_kuser/heimdal_kuser.pot delete mode 100644 kerberosV/src/tests/ChangeLog delete mode 100644 kerberosV/src/tests/Makefile.am delete mode 100644 kerberosV/src/tests/Makefile.in delete mode 100644 kerberosV/src/tests/NTMakefile delete mode 100644 kerberosV/src/tests/bin/Makefile.am delete mode 100644 kerberosV/src/tests/bin/Makefile.in delete mode 100644 kerberosV/src/tests/bin/setup-env.in delete mode 100644 kerberosV/src/tests/can/Makefile.am delete mode 100644 kerberosV/src/tests/can/Makefile.in delete mode 100644 kerberosV/src/tests/can/NTMakefile delete mode 100644 kerberosV/src/tests/can/apple-10.4.kadm delete mode 100644 kerberosV/src/tests/can/apple-10.4.req delete mode 100644 kerberosV/src/tests/can/check-can.in delete mode 100644 kerberosV/src/tests/can/heim-0.8.kadm delete mode 100644 kerberosV/src/tests/can/heim-0.8.req delete mode 100644 kerberosV/src/tests/can/krb5.conf.in delete mode 100644 kerberosV/src/tests/can/mit-pkinit-20070607.ca.crt delete mode 100644 kerberosV/src/tests/can/mit-pkinit-20070607.kadm delete mode 100644 kerberosV/src/tests/can/mit-pkinit-20070607.req delete mode 100644 kerberosV/src/tests/can/mit-pkinit-20070607.xf delete mode 100644 kerberosV/src/tests/can/test_can.in delete mode 100644 kerberosV/src/tests/db/Makefile.am delete mode 100644 kerberosV/src/tests/db/Makefile.in delete mode 100644 kerberosV/src/tests/db/NTMakefile delete mode 100644 kerberosV/src/tests/db/add-modify-delete.in delete mode 100644 kerberosV/src/tests/db/check-aliases.in delete mode 100644 kerberosV/src/tests/db/check-dbinfo.in delete mode 100644 kerberosV/src/tests/db/have-db.in delete mode 100644 kerberosV/src/tests/db/krb5-mit.conf.in delete mode 100644 kerberosV/src/tests/db/krb5.conf.in delete mode 100644 kerberosV/src/tests/db/loaddump-db.in delete mode 100644 kerberosV/src/tests/db/text-dump-0.7 delete mode 100644 kerberosV/src/tests/db/text-dump-known-ext delete mode 100644 kerberosV/src/tests/db/text-dump-no-ext delete mode 100644 kerberosV/src/tests/db/text-dump-unknown-ext delete mode 100644 kerberosV/src/tests/gss/Makefile.am delete mode 100644 kerberosV/src/tests/gss/Makefile.in delete mode 100644 kerberosV/src/tests/gss/NTMakefile delete mode 100644 kerberosV/src/tests/gss/check-basic.in delete mode 100644 kerberosV/src/tests/gss/check-context.in delete mode 100644 kerberosV/src/tests/gss/check-gss.in delete mode 100644 kerberosV/src/tests/gss/check-gssmask.in delete mode 100644 kerberosV/src/tests/gss/check-ntlm.in delete mode 100644 kerberosV/src/tests/gss/check-spnego.in delete mode 100644 kerberosV/src/tests/gss/krb5.conf.in delete mode 100644 kerberosV/src/tests/gss/ntlm-user-file.txt delete mode 100644 kerberosV/src/tests/java/KerberosInit.java delete mode 100644 kerberosV/src/tests/java/Makefile.am delete mode 100644 kerberosV/src/tests/java/Makefile.in delete mode 100644 kerberosV/src/tests/java/NTMakefile delete mode 100644 kerberosV/src/tests/java/check-kinit.in delete mode 100644 kerberosV/src/tests/java/have-java.sh delete mode 100644 kerberosV/src/tests/java/jaas.conf delete mode 100644 kerberosV/src/tests/java/krb5.conf.in delete mode 100644 kerberosV/src/tests/kdc/Makefile.am delete mode 100644 kerberosV/src/tests/kdc/Makefile.in delete mode 100644 kerberosV/src/tests/kdc/NTMakefile delete mode 100644 kerberosV/src/tests/kdc/check-cc.in delete mode 100644 kerberosV/src/tests/kdc/check-delegation.in delete mode 100644 kerberosV/src/tests/kdc/check-des.in delete mode 100644 kerberosV/src/tests/kdc/check-digest.in delete mode 100644 kerberosV/src/tests/kdc/check-iprop.in delete mode 100644 kerberosV/src/tests/kdc/check-kadmin.in delete mode 100644 kerberosV/src/tests/kdc/check-kdc-weak.in delete mode 100644 kerberosV/src/tests/kdc/check-kdc.in delete mode 100644 kerberosV/src/tests/kdc/check-keys.in delete mode 100644 kerberosV/src/tests/kdc/check-kpasswdd.in delete mode 100644 kerberosV/src/tests/kdc/check-pkinit.in delete mode 100644 kerberosV/src/tests/kdc/check-referral.in delete mode 100644 kerberosV/src/tests/kdc/check-uu.in delete mode 100644 kerberosV/src/tests/kdc/donotexists.txt delete mode 100644 kerberosV/src/tests/kdc/heimdal.acl delete mode 100644 kerberosV/src/tests/kdc/iprop-acl delete mode 100644 kerberosV/src/tests/kdc/krb5-pkinit.conf.in delete mode 100644 kerberosV/src/tests/kdc/krb5.conf.in delete mode 100644 kerberosV/src/tests/kdc/krb5.conf.keys.in delete mode 100644 kerberosV/src/tests/kdc/leaks-kill.sh delete mode 100644 kerberosV/src/tests/kdc/ntlm-user-file.txt delete mode 100644 kerberosV/src/tests/kdc/pki-mapping delete mode 100644 kerberosV/src/tests/kdc/uuserver.txt delete mode 100644 kerberosV/src/tests/kdc/wait-kdc.sh delete mode 100644 kerberosV/src/tests/ldap/Makefile.am delete mode 100644 kerberosV/src/tests/ldap/Makefile.in delete mode 100644 kerberosV/src/tests/ldap/NTMakefile delete mode 100644 kerberosV/src/tests/ldap/check-ldap.in delete mode 100644 kerberosV/src/tests/ldap/init.ldif delete mode 100644 kerberosV/src/tests/ldap/krb5.conf.in delete mode 100644 kerberosV/src/tests/ldap/samba.schema delete mode 100644 kerberosV/src/tests/ldap/slapd-init.in delete mode 100644 kerberosV/src/tests/ldap/slapd-stop delete mode 100644 kerberosV/src/tests/ldap/slapd.conf delete mode 100644 kerberosV/src/tests/plugin/Makefile.am delete mode 100644 kerberosV/src/tests/plugin/Makefile.in delete mode 100644 kerberosV/src/tests/plugin/NTMakefile delete mode 100644 kerberosV/src/tests/plugin/check-pac.in delete mode 100644 kerberosV/src/tests/plugin/krb5.conf.in delete mode 100644 kerberosV/src/tests/plugin/windc.c delete mode 100644 kerberosV/src/tools/Makefile.am delete mode 100644 kerberosV/src/tools/Makefile.in delete mode 100644 kerberosV/src/tools/NTMakefile delete mode 100644 kerberosV/src/tools/heimdal-gssapi.pc.in delete mode 100755 kerberosV/src/tools/kdc-log-analyze.pl delete mode 100644 kerberosV/src/tools/krb5-config.1 delete mode 100644 kerberosV/src/tools/krb5-config.cat1 delete mode 100644 kerberosV/src/tools/krb5-config.in delete mode 100644 kerberosV/src/windows/NTMakefile.config delete mode 100644 kerberosV/src/windows/NTMakefile.version delete mode 100644 kerberosV/src/windows/NTMakefile.w32 delete mode 100644 kerberosV/src/windows/README delete mode 100644 kerberosV/src/windows/maint.el delete mode 100644 kerberosV/src/windows/version.rc delete mode 100755 kerberosV/src/ylwrap delete mode 100644 kerberosV/tools/Makefile delete mode 100644 kerberosV/tools/Makefile.inc delete mode 100644 kerberosV/tools/asn1_compile/Makefile delete mode 100644 kerberosV/tools/compile_et/Makefile delete mode 100644 kerberosV/tools/slc/Makefile delete mode 100644 kerberosV/usr.bin/Makefile delete mode 100644 kerberosV/usr.bin/Makefile.inc delete mode 100644 kerberosV/usr.bin/kcc/Makefile delete mode 100644 kerberosV/usr.bin/kdestroy/Makefile delete mode 100644 kerberosV/usr.bin/kf/Makefile delete mode 100644 kerberosV/usr.bin/kgetcred/Makefile delete mode 100644 kerberosV/usr.bin/kinit/Makefile delete mode 100644 kerberosV/usr.bin/krb5-config/Makefile delete mode 100644 kerberosV/usr.bin/string2key/Makefile delete mode 100644 kerberosV/usr.bin/verify_krb5_conf/Makefile delete mode 100644 kerberosV/usr.sbin/Makefile delete mode 100644 kerberosV/usr.sbin/Makefile.inc delete mode 100644 kerberosV/usr.sbin/iprop-log/Makefile delete mode 100644 kerberosV/usr.sbin/kadmin/Makefile delete mode 100644 kerberosV/usr.sbin/kimpersonate/Makefile delete mode 100644 kerberosV/usr.sbin/kstash/Makefile delete mode 100644 kerberosV/usr.sbin/ktutil/Makefile delete mode 100644 kerberosV/varsub diff --git a/kerberosV/Makefile b/kerberosV/Makefile deleted file mode 100644 index 9b58e62cc74..00000000000 --- a/kerberosV/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $OpenBSD: Makefile,v 1.15 2013/06/20 13:19:44 ajacoutot Exp $ - -SUBDIR= lib libexec tools usr.bin usr.sbin doc - -.include diff --git a/kerberosV/Makefile.inc b/kerberosV/Makefile.inc deleted file mode 100644 index 645be699b9a..00000000000 --- a/kerberosV/Makefile.inc +++ /dev/null @@ -1,120 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.22 2014/04/15 20:55:42 miod Exp $ - -KRB5DIR= ${.CURDIR}/../../../kerberosV/src -KRB5SUBST= ${KRB5DIR}/../varsub - -CPPFLAGS+= -DHAVE_CONFIG_H -DNO_NTLM -CPPFLAGS+= -I${.CURDIR}/../../include -I/usr/include/kerberosV - -LIBHEIMIPCC= ${.OBJDIR}/../../lib/libheimipcc/libheimipcc.a -LIBHEIMIPCS= ${.OBJDIR}/../../lib/libheimipcs/libheimipcs.a -LIBVERS= ${.OBJDIR}/../../lib/libvers/libvers.a -LIBSL= ${.OBJDIR}/../../lib/libsl/libsl.a - -.if defined(SRCS) - -ETSRCS= \ - ${KRB5DIR}/lib/asn1/asn1_err.et \ - ${KRB5DIR}/lib/hdb/hdb_err.et \ - ${KRB5DIR}/lib/kadm5/kadm5_err.et \ - ${KRB5DIR}/lib/krb5/heim_err.et \ - ${KRB5DIR}/lib/krb5/k524_err.et \ - ${KRB5DIR}/lib/krb5/krb5_err.et \ - ${KRB5DIR}/lib/krb5/krb_err.et \ - ${KRB5DIR}/lib/gssapi/krb5/gkrb5_err.et \ - ${KRB5DIR}/lib/wind/wind_err.et \ - ${KRB5DIR}/lib/ntlm/ntlm_err.et - -.for ET in ${ETSRCS} -. for _ET in ${ET:T:R} -. if ${SRCS:M${_ET}.[ch]} != "" -.ORDER: ${_ET}.c ${_ET}.h -${_ET}.c ${_ET}.h: ${ET} - ${COMPILE_ET} ${.ALLSRC} -CLEANFILES+= ${_ET}.h ${_ET}.c -. endif -. endfor -.endfor - -.endif # defined(SRCS) - -.if defined(MPAGES) - -MAN += ${MPAGES:S@^@${.OBJDIR}/@} -CLEANFILES += ${MAN} - -. for PAGE in ${MPAGES} -. for dir in ${MSRC} -. if exists(${dir}/${PAGE:T}) -${PAGE}: ${dir}/${PAGE:T} - sed -f ${KRB5SUBST} ${dir}/${PAGE:T} >$@.tmp && mv $@.tmp $@ -. endif -. endfor -. endfor - -.endif # defined(MPAGES) - -ASN1_COMPILE= asn1_compile -SLC= slc -COMPILE_ET= compile_et - - -INCSGROUPS?= INCS -INCLUDEDIR?= /usr/include/kerberosV -INCSDIR?= ${INCLUDEDIR} - -.if !target(includes) -. for group in ${INCSGROUPS} -. if defined(${group}) && !empty(${group}) - -${group}OWN?= ${BINOWN} -${group}GRP?= ${BINGRP} -${group}MODE?= ${NONBINMODE} -${group}DIR?= /usr/include - -_${group}INCS= -. for header in ${${group}} -. if defined(${group}OWN_${header:T}) || defined(${group}GRP_${header:T}) || \ - defined(${group}MODE_${header:T}) || defined(${group}DIR_${header:T}) || \ - defined(${group}NAME_${header:T}) -${group}OWN_${header:T} ?= ${${group}OWN} -${group}GRP_${header:T} ?= ${${group}GRP} -${group}MODE_${header:T} ?= ${${group}MODE} -${group}DIR_${header:T} ?= ${${group}DIR} -. if defined(${group}NAME) -${group}NAME_${header:T} ?= ${${group}NAME} -. else -${group}NAME_${header:T} ?= ${header:T} -. endif -includes: _${group}INS_${header:T} -_${group}INS_${header:T}: ${header} - test -d ${DESTDIR}${${group}DIR_${.ALLSRC:T}}) || \ - ${INSTALL} -d -o root -g bin -m 755 \ - ${DESTDIR}${${group}DIR_${.ALLSRC:T}} - ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ - -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ - ${.ALLSRC} \ - ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} -. else -_${group}INCS+= ${header} -. endif -. endfor -. if !empty(_${group}INCS) -includes: _${group}INS -_${group}INS: ${_${group}INCS} - test -d ${DESTDIR}${${group}DIR} || \ - ${INSTALL} -d -o root -g bin -m 755 \ - ${DESTDIR}${${group}DIR} -. if defined(${group}NAME) - ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ - ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} -. else - ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ - ${.ALLSRC} ${DESTDIR}${${group}DIR}/ -. endif -. endif -. endif # defined(${group}) && !empty(${group}) -. endfor -.endif - -.include diff --git a/kerberosV/README b/kerberosV/README deleted file mode 100644 index 5c4a3a4c4f1..00000000000 --- a/kerberosV/README +++ /dev/null @@ -1,15 +0,0 @@ -Documentation -============= - -The 'heimdal' infopage has information about how to set up a Kerberos -realm etc. There are also a number of manpages with reference information. - - -BSD Auth -======== - -There's also a BSD Authentication login script in src/libexec/login_krb5, -that is used to enable Kerberos authentication in login, sshd, xdm etc. - -Refer to login.conf(5), login(1), login_krb5(8) and login_krb5-or-pwd(8) -for more information on how to enable them. diff --git a/kerberosV/doc/Makefile b/kerberosV/doc/Makefile deleted file mode 100644 index 3010c4c3591..00000000000 --- a/kerberosV/doc/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# $OpenBSD: Makefile,v 1.13 2013/07/09 14:33:43 ajacoutot Exp $ - -KINFOSRC = ${.CURDIR}/../src/doc -KINFODIR = ${DESTDIR}${SHAREDIR}/info - -MAKEINFO = /usr/bin/makeinfo -INSTALL-INFO = /usr/bin/install-info - -INFO = heimdal.info - -SRCS = heimdal.texi intro.texi whatis.texi install.texi setup.texi apps.texi \ - misc.texi kerberos4.texi win2k.texi programming.texi migration.texi \ - ack.texi copyright.texi vars.texi - -all: ${INFO} - -heimdal.info: ${SRCS} -.for t in ${SRCS} - sed -f ${.CURDIR}/../varsub ${KINFOSRC}/${t} > ${.OBJDIR}/${t}.tmp && \ - mv ${.OBJDIR}/${t}.tmp ${.OBJDIR}/${t} -.endfor - ${MAKEINFO} --no-split -I${KINFOSRC} -o ${.TARGET} ${.OBJDIR}/heimdal.texi - -install: ${INFO} - ${INSTALL} ${INSTALL_COPY} -m ${DOCMODE} -o ${DOCOWN} -g ${DOCGRP} ${.OBJDIR}/${INFO} ${KINFODIR} - $(INSTALL-INFO) ${.OBJDIR}/${INFO} ${KINFODIR}/dir - -clean: - rm -f ${INFO} ${SRCS} - -cleandir: clean - -.PATH: ${KINFOSRC} - -.include -.include diff --git a/kerberosV/include/config.h b/kerberosV/include/config.h deleted file mode 100644 index eca848c876e..00000000000 --- a/kerberosV/include/config.h +++ /dev/null @@ -1,1635 +0,0 @@ -/* include/config.h. Generated from config.h.in by configure. */ -/* include/config.h.in. Generated from configure.ac by autoheader. */ - -#ifndef RCSID -#define RCSID(msg) \ -static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } -#endif - -/* Maximum values on all known systems */ -#define MaxHostNameLen (64+4) -#define MaxPathLen (1024+4) - - - -#ifdef BUILD_KRB5_LIB -#ifndef KRB5_LIB -#ifdef _WIN32_ -#define KRB5_LIB_FUNCTION __declspec(dllexport) -#define KRB5_LIB_CALL __stdcall -#define KRB5_LIB_VARIABLE __declspec(dllexport) -#else -#define KRB5_LIB_FUNCTION -#define KRB5_LIB_CALL -#define KRB5_LIB_VARIABLE -#endif -#endif -#endif - - -#ifdef BUILD_ROKEN_LIB -#ifndef ROKEN_LIB -#ifdef _WIN32_ -#define ROKEN_LIB_FUNCTION __declspec(dllexport) -#define ROKEN_LIB_CALL __stdcall -#define ROKEN_LIB_VARIABLE __declspec(dllexport) -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#define ROKEN_LIB_VARIABLE -#endif -#endif -#endif - - -#ifdef BUILD_GSSAPI_LIB -#ifndef GSSAPI_LIB -#ifdef _WIN32_ -#define GSSAPI_LIB_FUNCTION __declspec(dllexport) -#define GSSAPI_LIB_CALL __stdcall -#define GSSAPI_LIB_VARIABLE __declspec(dllexport) -#else -#define GSSAPI_LIB_FUNCTION -#define GSSAPI_LIB_CALL -#define GSSAPI_LIB_VARIABLE -#endif -#endif -#endif - - -/* Define if you want authentication support in telnet. */ -#define AUTHENTICATION 1 - -/* path to bin */ -#define BINDIR "/usr/bin" - -/* Define if realloc(NULL) doesn't work. */ -/* #undef BROKEN_REALLOC */ - -/* Define if you want support for DCE/DFS PAG's. */ -/* #undef DCE */ - -/* Define if you want to use DES encryption in telnet. */ -#define DES_ENCRYPTION 1 - -/* Define this to enable diagnostics in telnet. */ -#define DIAGNOSTICS 1 - -/* Define to enable DIGEST. */ -/* #undef DIGEST */ - -/* Define if want to use the weak AFS string to key functions. */ -#define ENABLE_AFS_STRING_TO_KEY 1 - -/* Define if you want have a thread safe libraries */ -/* #undef ENABLE_PTHREAD_SUPPORT */ - -/* Define if you want encryption support in telnet. */ -#define ENCRYPTION 1 - -/* define if sys/param.h defines the endiness */ -#define ENDIANESS_IN_SYS_PARAM_H 1 - -/* Define this if you want support for broken ENV_{VAR,VAL} telnets. */ -/* #undef ENV_HACK */ - -/* define if prototype of gethostbyaddr is compatible with struct hostent - *gethostbyaddr(const void *, size_t, int) */ -/* #undef GETHOSTBYADDR_PROTO_COMPATIBLE */ - -/* define if prototype of gethostbyname is compatible with struct hostent - *gethostbyname(const char *) */ -#define GETHOSTBYNAME_PROTO_COMPATIBLE 1 - -/* define if prototype of getservbyname is compatible with struct servent - *getservbyname(const char *, const char *) */ -#define GETSERVBYNAME_PROTO_COMPATIBLE 1 - -/* define if prototype of getsockname is compatible with int getsockname(int, - struct sockaddr*, socklen_t*) */ -#define GETSOCKNAME_PROTO_COMPATIBLE 1 - -/* Define if you have the `altzone' variable. */ -/* #undef HAVE_ALTZONE */ - -/* Define to 1 if you have the `arc4random' function. */ -#define HAVE_ARC4RANDOM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_FTP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_NAMESER_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_TELNET_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ASL_H */ - -/* Define to 1 if you have the `asnprintf' function. */ -/* #undef HAVE_ASNPRINTF */ - -/* Define to 1 if you have the `asprintf' function. */ -#define HAVE_ASPRINTF 1 - -/* Define to 1 if you have the `atexit' function. */ -#define HAVE_ATEXIT 1 - -/* Define to 1 if you have the `backtrace' function. */ -/* #undef HAVE_BACKTRACE */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BIND_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_BSDSETJMP_H */ - -/* Define to 1 if you have the `bswap16' function. */ -/* #undef HAVE_BSWAP16 */ - -/* Define to 1 if you have the `bswap32' function. */ -/* #undef HAVE_BSWAP32 */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CAPABILITY_H */ - -/* whether capng is available for privilege reduction */ -/* #undef HAVE_CAPNG */ - -/* Define to 1 if you have the `cap_set_proc' function. */ -/* #undef HAVE_CAP_SET_PROC */ - -/* Define to 1 if you have the `cgetent' function. */ -#define HAVE_CGETENT 1 - -/* Define if you have the function `chown'. */ -#define HAVE_CHOWN 1 - -/* Define if you have the function `closefrom'. */ -#define HAVE_CLOSEFROM 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_COMMONCRYPTO_COMMONCRYPTOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_COMMONCRYPTO_COMMONDIGEST_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CONFIG_H */ - -/* Define if you have the function `copyhostent'. */ -/* #undef HAVE_COPYHOSTENT */ - -/* Define to 1 if you have the `crypt' function. */ -#define HAVE_CRYPT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_CRYPT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_CURSES_H 1 - -/* Define if you have the function `daemon'. */ -#define HAVE_DAEMON 1 - -/* define if you have a berkeley db1/2 library */ -#define HAVE_DB1 1 - -/* define if you have a berkeley db3/4/5 library */ -/* #undef HAVE_DB3 */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DB3_DB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DB4_DB_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DB5_DB_H */ - -/* Define if you have user supplied header location */ -/* #undef HAVE_DBHEADER */ - -/* Define to 1 if you have the `dbm_firstkey' function. */ -#define HAVE_DBM_FIRSTKEY 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DBM_H 1 - -/* Define to 1 if you have the `dbopen' function. */ -#define HAVE_DBOPEN 1 - -/* Define to 1 if you have the `db_create' function. */ -/* #undef HAVE_DB_CREATE */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DB_H 1 - -/* define if you have ndbm compat in db */ -/* #undef HAVE_DB_NDBM */ - -/* Define to 1 if you have the declaration of `altzone', and to 0 if you - don't. */ -/* #undef HAVE_DECL_ALTZONE */ - -/* Define to 1 if you have the declaration of `environ', and to 0 if you - don't. */ -#define HAVE_DECL_ENVIRON 0 - -/* Define to 1 if you have the declaration of `h_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_H_ERRLIST 0 - -/* Define to 1 if you have the declaration of `h_errno', and to 0 if you - don't. */ -#define HAVE_DECL_H_ERRNO 1 - -/* Define to 1 if you have the declaration of `h_nerr', and to 0 if you don't. - */ -#define HAVE_DECL_H_NERR 0 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `opterr', and to 0 if you don't. - */ -#define HAVE_DECL_OPTERR 1 - -/* Define to 1 if you have the declaration of `optind', and to 0 if you don't. - */ -#define HAVE_DECL_OPTIND 1 - -/* Define to 1 if you have the declaration of `optopt', and to 0 if you don't. - */ -#define HAVE_DECL_OPTOPT 1 - -/* Define to 1 if you have the declaration of `timezone', and to 0 if you - don't. */ -#define HAVE_DECL_TIMEZONE 1 - -/* Define to 1 if you have the declaration of `_res', and to 0 if you don't. - */ -#define HAVE_DECL__RES 1 - -/* Define to 1 if you have the declaration of `__progname', and to 0 if you - don't. */ -#define HAVE_DECL___PROGNAME 0 - -/* Define to 1 if you have the header file. */ -#define HAVE_DIRENT_H 1 - -/* have a dirfd function/macro */ -#define HAVE_DIRFD 1 - -/* Define if DIR has field dd_fd. */ -/* #undef HAVE_DIR_DD_FD */ - -/* Define to 1 if you have the `dispatch_async_f' function. */ -/* #undef HAVE_DISPATCH_ASYNC_F */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DISPATCH_DISPATCH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `dlopen' function. */ -#if defined(__OpenBSD__) && (defined(__vax__)) -#undef HAVE_DLOPEN -#else -#define HAVE_DLOPEN 1 -#endif - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DNS_H */ - -/* Define to 1 if you have the `dns_search' function. */ -/* #undef HAVE_DNS_SEARCH */ - -/* Define to 1 if you have the `dn_expand' function. */ -#define HAVE_DN_EXPAND 1 - -/* Define to 1 if you have the `door_create' function. */ -/* #undef HAVE_DOOR_CREATE */ - -/* Define if you have the function `ecalloc'. */ -/* #undef HAVE_ECALLOC */ - -/* Define if you have the function `emalloc'. */ -/* #undef HAVE_EMALLOC */ - -/* Define if you have the function `erealloc'. */ -/* #undef HAVE_EREALLOC */ - -/* Define if you have the function `err'. */ -#define HAVE_ERR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define if you have the function `errx'. */ -#define HAVE_ERRX 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ERR_H 1 - -/* Define if you have the function `estrdup'. */ -/* #undef HAVE_ESTRDUP */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_EXECINFO_H */ - -/* Define if you have the function `fchown'. */ -#define HAVE_FCHOWN 1 - -/* Define to 1 if you have the `fcntl' function. */ -#define HAVE_FCNTL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the function `flock'. */ -#define HAVE_FLOCK 1 - -/* Define if you have the function `fnmatch'. */ -#define HAVE_FNMATCH 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FNMATCH_H 1 - -/* Have -framework Security */ -/* #undef HAVE_FRAMEWORK_SECURITY */ - -/* Define to 1 if you have the `freeaddrinfo' function. */ -#define HAVE_FREEADDRINFO 1 - -/* Define if you have the function `freehostent'. */ -/* #undef HAVE_FREEHOSTENT */ - -/* Define to 1 if you have the `gai_strerror' function. */ -#define HAVE_GAI_STRERROR 1 - -/* Define if os support gcd. */ -/* #undef HAVE_GCD */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_GDBM_NDBM_H */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `getconfattr' function. */ -/* #undef HAVE_GETCONFATTR */ - -/* Define if you have the function `getcwd'. */ -#define HAVE_GETCWD 1 - -/* Define if you have the function `getdtablesize'. */ -#define HAVE_GETDTABLESIZE 1 - -/* Define if you have the function `getegid'. */ -#define HAVE_GETEGID 1 - -/* Define if you have the function `geteuid'. */ -#define HAVE_GETEUID 1 - -/* Define if you have the function `getgid'. */ -#define HAVE_GETGID 1 - -/* Define to 1 if you have the `gethostbyname' function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the `gethostbyname2' function. */ -#define HAVE_GETHOSTBYNAME2 1 - -/* Define if you have the function `gethostname'. */ -#define HAVE_GETHOSTNAME 1 - -/* Define if you have the function `getifaddrs'. */ -#define HAVE_GETIFADDRS 1 - -/* Define if you have the function `getipnodebyaddr'. */ -/* #undef HAVE_GETIPNODEBYADDR */ - -/* Define if you have the function `getipnodebyname'. */ -/* #undef HAVE_GETIPNODEBYNAME */ - -/* Define to 1 if you have the `getlogin' function. */ -#define HAVE_GETLOGIN 1 - -/* Define if you have a working getmsg. */ -/* #undef HAVE_GETMSG */ - -/* Define to 1 if you have the `getnameinfo' function. */ -#define HAVE_GETNAMEINFO 1 - -/* Define if you have the function `getopt'. */ -#define HAVE_GETOPT 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getpeereid' function. */ -#define HAVE_GETPEEREID 1 - -/* Define to 1 if you have the `getpeerucred' function. */ -/* #undef HAVE_GETPEERUCRED */ - -/* Define to 1 if you have the `getprogname' function. */ -#define HAVE_GETPROGNAME 1 - -/* Define to 1 if you have the `getpwnam_r' function. */ -#define HAVE_GETPWNAM_R 1 - -/* Define to 1 if you have the `getrlimit' function. */ -#define HAVE_GETRLIMIT 1 - -/* Define to 1 if you have the `getsockopt' function. */ -#define HAVE_GETSOCKOPT 1 - -/* Define to 1 if you have the `getspnam' function. */ -/* #undef HAVE_GETSPNAM */ - -/* Define if you have the function `gettimeofday'. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the `getudbnam' function. */ -/* #undef HAVE_GETUDBNAM */ - -/* Define if you have the function `getuid'. */ -#define HAVE_GETUID 1 - -/* Define if you have the function `getusershell'. */ -#define HAVE_GETUSERSHELL 1 - -/* define if you have a glob() that groks GLOB_BRACE, GLOB_NOCHECK, - GLOB_QUOTE, GLOB_TILDE, and GLOB_LIMIT */ -#define HAVE_GLOB 1 - -/* Define to 1 if you have the `grantpt' function. */ -#define HAVE_GRANTPT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GRP_H 1 - -/* Define to 1 if you have the `hstrerror' function. */ -#define HAVE_HSTRERROR 1 - -/* Define if you have the `h_errlist' variable. */ -#define HAVE_H_ERRLIST 1 - -/* Define if you have the `h_errno' variable. */ -#define HAVE_H_ERRNO 1 - -/* Define if you have the `h_nerr' variable. */ -#define HAVE_H_NERR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_IFADDRS_H 1 - -/* Define if you have the in6addr_loopback variable */ -#define HAVE_IN6ADDR_LOOPBACK 1 - -/* define */ -#define HAVE_INET_ATON 1 - -/* define */ -#define HAVE_INET_NTOP 1 - -/* define */ -#define HAVE_INET_PTON 1 - -/* Define if you have the function `initgroups'. */ -#define HAVE_INITGROUPS 1 - -/* Define if you have the function `innetgr'. */ -#define HAVE_INNETGR 1 - -/* Define to 1 if the system has the type `int16_t'. */ -#define HAVE_INT16_T 1 - -/* Define to 1 if the system has the type `int32_t'. */ -#define HAVE_INT32_T 1 - -/* Define to 1 if the system has the type `int64_t'. */ -#define HAVE_INT64_T 1 - -/* Define to 1 if the system has the type `int8_t'. */ -#define HAVE_INT8_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_IO_H */ - -/* Define if you have IPv6. */ -#define HAVE_IPV6 1 - -/* Define if you have the function `iruserok'. */ -#define HAVE_IRUSEROK 1 - -/* Define to 1 if you have the `issetugid' function. */ -#define HAVE_ISSETUGID 1 - -/* Define if you want to use the Kerberos Credentials Manager. */ -/* #undef HAVE_KCM */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBUTIL_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `loadquery' function. */ -/* #undef HAVE_LOADQUERY */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define if you have the function `localtime_r'. */ -#define HAVE_LOCALTIME_R 1 - -/* Define to 1 if you have the `logout' function. */ -#define HAVE_LOGOUT 1 - -/* Define to 1 if you have the `logwtmp' function. */ -#define HAVE_LOGWTMP 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define if you have the function `lstat'. */ -#define HAVE_LSTAT 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MAILLOCK_H */ - -/* Define if you have the function `memmove'. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define if you have the function `mkstemp'. */ -#define HAVE_MKSTEMP 1 - -/* Define to 1 if you have the `mktime' function. */ -#define HAVE_MKTIME 1 - -/* Define to 1 if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 - -/* define if you have a ndbm library */ -#define HAVE_NDBM 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NDBM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETGROUP_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_IN6_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET6_IN6_VAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN6_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_NETINET_IN6_MACHTYPES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_SYSTM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_TCP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_H 1 - -/* Define if NDBM really is DB (creates files *.db) */ -#define HAVE_NEW_DB 1 - -/* Define to 1 if you have the `on_exit' function. */ -/* #undef HAVE_ON_EXIT */ - -/* Define to 1 if you have the `openpty' function. */ -#define HAVE_OPENPTY 1 - -/* define to use openssl's libcrypto */ -#define HAVE_OPENSSL 1 - -/* Define to enable basic OSF C2 support. */ -/* #undef HAVE_OSFC2 */ - -/* Define to 1 if you have the header file. */ -#define HAVE_PATHS_H 1 - -/* Define to 1 if you have the `pidfile' function. */ -#define HAVE_PIDFILE 1 - -/* Define to 1 if you have the `poll' function. */ -#define HAVE_POLL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_POLL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PTHREAD_H 1 - -/* Define to 1 if you have the `ptsname' function. */ -#define HAVE_PTSNAME 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PTY_H */ - -/* Define if you have the function `putenv'. */ -#define HAVE_PUTENV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PWD_H 1 - -/* Define to 1 if you have the `rand' function. */ -#define HAVE_RAND 1 - -/* Define to 1 if you have the `random' function. */ -#define HAVE_RANDOM 1 - -/* Define if you have the function `rcmd'. */ -#define HAVE_RCMD 1 - -/* Define if you have a readline compatible library. */ -#define HAVE_READLINE 1 - -/* Define to 1 if you have the - <[readline.h])[][]_AH_CHECK_HEADER([readline/readline.h]> header file. */ -/* #undef HAVE_READLINE_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_READLINE_READLINE_H_ */ - -/* Define if you have the function `readv'. */ -#define HAVE_READV 1 - -/* Define if you have the function `recvmsg'. */ -#define HAVE_RECVMSG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_RESOLV_H 1 - -/* Define to 1 if you have the `res_ndestroy' function. */ -/* #undef HAVE_RES_NDESTROY */ - -/* Define to 1 if you have the `res_nsearch' function. */ -/* #undef HAVE_RES_NSEARCH */ - -/* Define to 1 if you have the `res_search' function. */ -#define HAVE_RES_SEARCH 1 - -/* Define to 1 if you have the `revoke' function. */ -#define HAVE_REVOKE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_RPCSVC_YPCLNT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SAC_H */ - -/* Define to 1 if the system has the type `sa_family_t'. */ -#define HAVE_SA_FAMILY_T 1 - -/* Define if you want support for cache in sqlite. */ -/* #undef HAVE_SCC */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SEARCH_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SECURITY_PAM_MODULES_H */ - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define if you have the function `sendmsg'. */ -#define HAVE_SENDMSG 1 - -/* Define if you have the function `setegid'. */ -#define HAVE_SETEGID 1 - -/* Define if you have the function `setenv'. */ -#define HAVE_SETENV 1 - -/* Define if you have the function `seteuid'. */ -#define HAVE_SETEUID 1 - -/* Define to 1 if you have the `setitimer' function. */ -#define HAVE_SETITIMER 1 - -/* Define to 1 if you have the `setlim' function. */ -/* #undef HAVE_SETLIM */ - -/* Define to 1 if you have the `setlogin' function. */ -#define HAVE_SETLOGIN 1 - -/* Define to 1 if you have the `setpcred' function. */ -/* #undef HAVE_SETPCRED */ - -/* Define to 1 if you have the `setpgid' function. */ -#define HAVE_SETPGID 1 - -/* Define to 1 if you have the `setproctitle' function. */ -#define HAVE_SETPROCTITLE 1 - -/* Define to 1 if you have the `setprogname' function. */ -#define HAVE_SETPROGNAME 1 - -/* Define to 1 if you have the `setregid' function. */ -#define HAVE_SETREGID 1 - -/* Define to 1 if you have the `setresgid' function. */ -#define HAVE_SETRESGID 1 - -/* Define to 1 if you have the `setresuid' function. */ -#define HAVE_SETRESUID 1 - -/* Define to 1 if you have the `setreuid' function. */ -#define HAVE_SETREUID 1 - -/* Define to 1 if you have the `setsid' function. */ -#define HAVE_SETSID 1 - -/* Define to 1 if you have the `setsockopt' function. */ -#define HAVE_SETSOCKOPT 1 - -/* Define to 1 if you have the `setutent' function. */ -/* #undef HAVE_SETUTENT */ - -/* Define to 1 if you have the `sgi_getcapabilitybyname' function. */ -/* #undef HAVE_SGI_GETCAPABILITYBYNAME */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SGTTY_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SHADOW_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SIAD_H */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SIGNAL_H 1 - -/* define if you have a working snprintf */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if the system has the type `socklen_t'. */ -#define HAVE_SOCKLEN_T 1 - -/* Define if you want support for sqlite in Heimdal. */ -/* #undef HAVE_SQLITE3 */ - -/* Define to 1 if the system has the type `ssize_t'. */ -#define HAVE_SSIZE_T 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STANDARDS_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define if you have the function `strcasecmp'. */ -#define HAVE_STRCASECMP 1 - -/* Define if you have the function `strdup'. */ -#define HAVE_STRDUP 1 - -/* Define if you have the function `strerror'. */ -#define HAVE_STRERROR 1 - -/* Define if you have the function strerror_r. */ -#define HAVE_STRERROR_R 1 - -/* Define if you have the function `strftime'. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the function `strlcat'. */ -#define HAVE_STRLCAT 1 - -/* Define if you have the function `strlcpy'. */ -#define HAVE_STRLCPY 1 - -/* Define if you have the function `strlwr'. */ -/* #undef HAVE_STRLWR */ - -/* Define if you have the function `strncasecmp'. */ -#define HAVE_STRNCASECMP 1 - -/* Define if you have the function `strndup'. */ -#define HAVE_STRNDUP 1 - -/* Define if you have the function `strnlen'. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STROPTS_H */ - -/* Define if you have the function `strptime'. */ -#define HAVE_STRPTIME 1 - -/* Define if you have the function `strsep'. */ -#define HAVE_STRSEP 1 - -/* Define if you have the function `strsep_copy'. */ -/* #undef HAVE_STRSEP_COPY */ - -/* Define to 1 if you have the `strstr' function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the `strsvis' function. */ -/* #undef HAVE_STRSVIS */ - -/* Define to 1 if you have the `strsvisx' function. */ -/* #undef HAVE_STRSVISX */ - -/* Define if you have the function `strtok_r'. */ -#define HAVE_STRTOK_R 1 - -/* Define to 1 if the system has the type `struct addrinfo'. */ -#define HAVE_STRUCT_ADDRINFO 1 - -/* Define to 1 if the system has the type `struct ifaddrs'. */ -#define HAVE_STRUCT_IFADDRS 1 - -/* Define to 1 if the system has the type `struct iovec'. */ -#define HAVE_STRUCT_IOVEC 1 - -/* Define to 1 if the system has the type `struct msghdr'. */ -#define HAVE_STRUCT_MSGHDR 1 - -/* Define to 1 if the system has the type `struct sockaddr'. */ -#define HAVE_STRUCT_SOCKADDR 1 - -/* Define if struct sockaddr has field sa_len. */ -#define HAVE_STRUCT_SOCKADDR_SA_LEN 1 - -/* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 - -/* define if you have struct spwd */ -/* #undef HAVE_STRUCT_SPWD */ - -/* Define if struct tm has field tm_gmtoff. */ -#define HAVE_STRUCT_TM_TM_GMTOFF 1 - -/* Define if struct tm has field tm_zone. */ -#define HAVE_STRUCT_TM_TM_ZONE 1 - -/* Define if struct utmpx has field ut_exit. */ -/* #undef HAVE_STRUCT_UTMPX_UT_EXIT */ - -/* Define if struct utmpx has field ut_host. */ -/* #undef HAVE_STRUCT_UTMPX_UT_HOST */ - -/* Define if struct utmpx has field ut_id. */ -/* #undef HAVE_STRUCT_UTMPX_UT_ID */ - -/* Define if struct utmpx has field ut_line. */ -/* #undef HAVE_STRUCT_UTMPX_UT_LINE */ - -/* Define if struct utmpx has field ut_pid. */ -/* #undef HAVE_STRUCT_UTMPX_UT_PID */ - -/* Define if struct utmpx has field ut_syslen. */ -/* #undef HAVE_STRUCT_UTMPX_UT_SYSLEN */ - -/* Define if struct utmpx has field ut_tv. */ -/* #undef HAVE_STRUCT_UTMPX_UT_TV */ - -/* Define if struct utmpx has field ut_type. */ -/* #undef HAVE_STRUCT_UTMPX_UT_TYPE */ - -/* Define if struct utmpx has field ut_user. */ -/* #undef HAVE_STRUCT_UTMPX_UT_USER */ - -/* 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 winsize is declared in sys/termios.h */ -#define HAVE_STRUCT_WINSIZE 1 - -/* Define to 1 if you have the `strunvis' function. */ -#define HAVE_STRUNVIS 1 - -/* Define if you have the function `strupr'. */ -/* #undef HAVE_STRUPR */ - -/* Define to 1 if you have the `strvis' function. */ -#define HAVE_STRVIS 1 - -/* Define to 1 if you have the `strvisx' function. */ -#define HAVE_STRVISX 1 - -/* Define to 1 if you have the `svis' function. */ -/* #undef HAVE_SVIS */ - -/* Define if you have the function `swab'. */ -#define HAVE_SWAB 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `syslog' function. */ -#define HAVE_SYSLOG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYSLOG_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BITYPES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_BSWAP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CAPABILITY_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_CATEGORY_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_FILE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_FILIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCCOM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PROC_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PTYIO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PTYVAR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PTY_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STREAM_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STROPTS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STRTTY_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STR_TTY_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCALL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TERMIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMEB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TTY_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UCRED_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_UTSNAME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define to 1 if you have the `tdelete' function. */ -#define HAVE_TDELETE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TERMCAP_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TERMIOS_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TERMIO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_TERM_H 1 - -/* Define to 1 if you have the `tfind' function. */ -#define HAVE_TFIND 1 - -/* Define to 1 if you have the `tgetent' function. */ -#define HAVE_TGETENT 1 - -/* Define if you have the function `timegm'. */ -#define HAVE_TIMEGM 1 - -/* Define if you have the `timezone' variable. */ -#define HAVE_TIMEZONE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_TIME_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TMPDIR_H */ - -/* Define if you have the function `tsearch'. */ -#define HAVE_TSEARCH 1 - -/* Define to 1 if you have the `ttyname' function. */ -#define HAVE_TTYNAME 1 - -/* Define to 1 if you have the `ttyslot' function. */ -#define HAVE_TTYSLOT 1 - -/* Define to 1 if you have the `twalk' function. */ -#define HAVE_TWALK 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UDB_H */ - -/* Define to 1 if the system has the type `uint16_t'. */ -#define HAVE_UINT16_T 1 - -/* Define to 1 if the system has the type `uint32_t'. */ -#define HAVE_UINT32_T 1 - -/* Define to 1 if the system has the type `uint64_t'. */ -#define HAVE_UINT64_T 1 - -/* Define to 1 if the system has the type `uint8_t'. */ -#define HAVE_UINT8_T 1 - -/* Define to 1 if the system has the type `uintptr_t'. */ -#define HAVE_UINTPTR_T 1 - -/* Define to 1 if you have the `umask' function. */ -#define HAVE_UMASK 1 - -/* Define to 1 if you have the `uname' function. */ -#define HAVE_UNAME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `unlockpt' function. */ -#define HAVE_UNLOCKPT 1 - -/* Define if you have the function `unsetenv'. */ -#define HAVE_UNSETENV 1 - -/* Define to 1 if you have the `unvis' function. */ -#define HAVE_UNVIS 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_USERCONF_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_USERSEC_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_UTIL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UTMPX_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_UTMP_H 1 - -/* Define to 1 if the system has the type `u_int16_t'. */ -#define HAVE_U_INT16_T 1 - -/* Define to 1 if the system has the type `u_int32_t'. */ -#define HAVE_U_INT32_T 1 - -/* Define to 1 if the system has the type `u_int64_t'. */ -#define HAVE_U_INT64_T 1 - -/* Define to 1 if the system has the type `u_int8_t'. */ -#define HAVE_U_INT8_T 1 - -/* Define to 1 if you have the `vasnprintf' function. */ -/* #undef HAVE_VASNPRINTF */ - -/* Define to 1 if you have the `vasprintf' function. */ -#define HAVE_VASPRINTF 1 - -/* Define if you have the function `verr'. */ -#define HAVE_VERR 1 - -/* Define if you have the function `verrx'. */ -#define HAVE_VERRX 1 - -/* Define to 1 if you have the `vhangup' function. */ -/* #undef HAVE_VHANGUP */ - -/* Define to 1 if you have the `vis' function. */ -#undef HAVE_VIS - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_VIS_H */ - -/* define if you have a working vsnprintf */ -#define HAVE_VSNPRINTF 1 - -/* Define if you have the function `vsyslog'. */ -#define HAVE_VSYSLOG 1 - -/* Define if you have the function `vwarn'. */ -#define HAVE_VWARN 1 - -/* Define if you have the function `vwarnx'. */ -#define HAVE_VWARNX 1 - -/* Define if you have the function `warn'. */ -#define HAVE_WARN 1 - -/* Define if you have the function `warnx'. */ -#define HAVE_WARNX 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WINSOCK2_H */ - -/* Define if you have the function `writev'. */ -#define HAVE_WRITEV 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_WS2TCPIP_H */ - -/* define if struct winsize has ws_xpixel */ -#define HAVE_WS_XPIXEL 1 - -/* define if struct winsize has ws_ypixel */ -#define HAVE_WS_YPIXEL 1 - -/* Define to 1 if you have the `XauFileName' function. */ -/* #undef HAVE_XAUFILENAME */ - -/* Define to 1 if you have the `XauReadAuth' function. */ -/* #undef HAVE_XAUREADAUTH */ - -/* Define to 1 if you have the `XauWriteAuth' function. */ -/* #undef HAVE_XAUWRITEAUTH */ - -/* Define to 1 if you have the `yp_get_default_domain' function. */ -#define HAVE_YP_GET_DEFAULT_DOMAIN 1 - -/* Define to 1 if you have the `_getpty' function. */ -/* #undef HAVE__GETPTY */ - -/* Define if you have the `_res' variable. */ -#define HAVE__RES 1 - -/* Define to 1 if you have the `_scrsize' function. */ -/* #undef HAVE__SCRSIZE */ - -/* define if your compiler has __attribute__ */ -#define HAVE___ATTRIBUTE__ 1 - -/* Define if you have the `__progname' variable. */ -#define HAVE___PROGNAME 1 - -/* have __sync_add_and_fetch */ -#if defined(__OpenBSD__) && ((defined(__GNUC__) && __GNUC__ < 4) || defined(__arm__) || defined(__hppa__) || defined(__mips__) || defined(__sh__) || (defined(__sparc__) && !defined(__sparc64__))) -#undef HAVE___SYNC_ADD_AND_FETCH -#else -#define HAVE___SYNC_ADD_AND_FETCH 1 -#endif - -/* Define if you want support for weak crypto */ -#define HEIM_WEAK_CRYPTO 1 - -/* Define if you have the hesiod package. */ -/* #undef HESIOD */ - -/* Enable Kerberos 5 support in applications. */ -#define KRB5 1 - -/* Define to enable kx509. */ -/* #undef KX509 */ - -/* path to lib */ -#define LIBDIR "/usr/lib" - -/* Define if you have the libedit package. */ -/* #undef LIBEDIT */ - -/* path to libexec */ -#define LIBEXECDIR "/usr/libexec" - -/* Define if you have the libintl package. */ -/* #undef LIBINTL */ - -/* path to localstate */ -#define LOCALSTATEDIR "/var" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* define if the system is missing a prototype for asnprintf() */ -#define NEED_ASNPRINTF_PROTO 1 - -/* define if the system is missing a prototype for asprintf() */ -/* #undef NEED_ASPRINTF_PROTO */ - -/* define if the system is missing a prototype for crypt() */ -/* #undef NEED_CRYPT_PROTO */ - -/* define if the system is missing a prototype for daemon() */ -#define NEED_DAEMON_PROTO 1 - -/* define if the system is missing a prototype for gethostname() */ -/* #undef NEED_GETHOSTNAME_PROTO */ - -/* define if the system is missing a prototype for getusershell() */ -/* #undef NEED_GETUSERSHELL_PROTO */ - -/* define if the system is missing a prototype for glob() */ -/* #undef NEED_GLOB_PROTO */ - -/* define if the system is missing a prototype for hstrerror() */ -/* #undef NEED_HSTRERROR_PROTO */ - -/* define if the system is missing a prototype for inet_aton() */ -/* #undef NEED_INET_ATON_PROTO */ - -/* define if the system is missing a prototype for iruserok() */ -/* #undef NEED_IRUSEROK_PROTO */ - -/* define if the system is missing a prototype for mkstemp() */ -/* #undef NEED_MKSTEMP_PROTO */ - -/* if your qsort is not a stable sort */ -/* #undef NEED_QSORT */ - -/* define if the system is missing a prototype for SecKeyGetCSPHandle() */ -/* #undef NEED_SECKEYGETCSPHANDLE_PROTO */ - -/* define if the system is missing a prototype for setenv() */ -/* #undef NEED_SETENV_PROTO */ - -/* define if the system is missing a prototype for snprintf() */ -/* #undef NEED_SNPRINTF_PROTO */ - -/* define if the system is missing a prototype for strndup() */ -/* #undef NEED_STRNDUP_PROTO */ - -/* define if the system is missing a prototype for strsep() */ -/* #undef NEED_STRSEP_PROTO */ - -/* define if the system is missing a prototype for strsvisx() */ -#define NEED_STRSVISX_PROTO 1 - -/* define if the system is missing a prototype for strsvis() */ -#define NEED_STRSVIS_PROTO 1 - -/* 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 strunvis() */ -#define NEED_STRUNVIS_PROTO1 - -/* define if the system is missing a prototype for strvisx() */ -#define NEED_STRVISX_PROTO 1 - -/* define if the system is missing a prototype for strvis() */ -#define NEED_STRVIS_PROTO 1 - -/* define if the system is missing a prototype for svis() */ -#define NEED_SVIS_PROTO 1 - -/* define if the system is missing a prototype for unsetenv() */ -/* #undef NEED_UNSETENV_PROTO */ - -/* define if the system is missing a prototype for unvis() */ -#define NEED_UNVIS_PROTO 1 - -/* define if the system is missing a prototype for vasnprintf() */ -#define NEED_VASNPRINTF_PROTO 1 - -/* define if the system is missing a prototype for vasprintf() */ -/* #undef NEED_VASPRINTF_PROTO */ - -/* define if the system is missing a prototype for vis() */ -#define NEED_VIS_PROTO 1 - -/* define if the system is missing a prototype for vsnprintf() */ -/* #undef NEED_VSNPRINTF_PROTO */ - -/* Define if you don't wan't support for AFS. */ -/* #undef NO_AFS */ - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - -/* Define if you don't want to use mmap. */ -/* #undef NO_MMAP */ - -/* Define this to enable old environment option in telnet. */ -#define OLD_ENVIRON 1 - -/* Define if you have the openldap package. */ -/* #undef OPENLDAP */ - -/* Define if you want support for hdb ldap module */ -/* #undef OPENLDAP_MODULE */ - -/* define if prototype of openlog is compatible with void openlog(const char - *, int, int) */ -#define OPENLOG_PROTO_COMPATIBLE 1 - -/* Define if you want OTP support in applications. */ -#define OTP 1 - -/* Name of package */ -#define PACKAGE "heimdal" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bugs@openbsd.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "Heimdal" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Heimdal 1.5.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "heimdal" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.5.3" - -/* Define to enable PKINIT. */ -/* #undef PKINIT */ - -/* Define if getlogin has POSIX flavour (and not BSD). */ -/* #undef POSIX_GETLOGIN */ - -/* Define if getpwnam_r has POSIX flavour. */ -#define POSIX_GETPWNAM_R 1 - -/* Define if you have the readline package. */ -/* #undef READLINE */ - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* path to sbin */ -#define SBINDIR "/usr/sbin" - -/* Define if you want to use samba socket wrappers. */ -/* #undef SOCKET_WRAPPER_REPLACE */ - -/* Define if you have the sqlite3 package. */ -/* #undef SQLITE3 */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you have streams ptys. */ -/* #undef STREAMSPTY */ - -/* define if prototype of strerror_r is compatible with int strerror_r(int, - char *, size_t) */ -#define STRERROR_R_PROTO_COMPATIBLE 1 - -/* Define if os support want to detach is daemonens. */ -#define SUPPORT_DETACH 1 - -/* Enable use of inetd style startup. */ -#define SUPPORT_INETD 1 - -/* path to sysconf */ -#define SYSCONFDIR "/etc/kerberosV" - -/* Define to what version of SunOS you are running. */ -/* #undef SunOS */ - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to 1 if your declares `struct tm'. */ -/* #undef TM_IN_SYS_TIME */ - -/* Version number of package */ -#define VERSION "1.5.3" - -/* Define if signal handlers return void. */ -#define VOID_RETSIGTYPE 1 - -/* define if target is big endian */ -/* #undef WORDS_BIGENDIAN */ - -/* Define to 1 if the X Window System is missing or not being used. */ -#define X_DISPLAY_MISSING 1 - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Required for functional/sane headers on AIX */ -/* #undef _ALL_SOURCE */ - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define to enable extensions on glibc-based systems such as Linux. */ -#define _GNU_SOURCE 1 - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to get POSIX getpwnam_r in some systems. */ -/* #undef _POSIX_PTHREAD_SEMANTICS */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `int' if doesn't define. */ -/* #undef gid_t */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define this to what the type mode_t should be. */ -/* #undef mode_t */ - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to `int' if does not define. */ -/* #undef pid_t */ - -/* Path name delimiter */ -#define rk_PATH_DELIM '/' - -/* Define this to what the type sig_atomic_t should be. */ -/* #undef sig_atomic_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define to `int' if doesn't define. */ -/* #undef uid_t */ - -#if _AIX -/* XXX this is gross, but kills about a gazillion warnings */ -struct ether_addr; -struct sockaddr; -struct sockaddr_dl; -struct sockaddr_in; -#endif - -#ifdef __APPLE__ -#include -#endif - -#ifdef ROKEN_RENAME -#include "roken_rename.h" -#endif - -#ifdef VOID_RETSIGTYPE -#define SIGRETURN(x) return -#else -#define SIGRETURN(x) return (RETSIGTYPE)(x) -#endif - -#ifdef BROKEN_REALLOC -#define realloc(X, Y) rk_realloc((X), (Y)) -#endif - - -#ifdef ENDIANESS_IN_SYS_PARAM_H -# include -# include -# if BYTE_ORDER == BIG_ENDIAN -# define WORDS_BIGENDIAN 1 -# endif -#endif - - - - -/* 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 */ - -/* Used with login -p */ -/* #undef LOGIN_ARGS */ - -/* set this to a sensible login */ -#ifndef LOGIN_PATH -#define LOGIN_PATH BINDIR "/login" -#endif - diff --git a/kerberosV/include/crypto-headers.h b/kerberosV/include/crypto-headers.h deleted file mode 100644 index 823fddec199..00000000000 --- a/kerberosV/include/crypto-headers.h +++ /dev/null @@ -1,26 +0,0 @@ -/* $OpenBSD: crypto-headers.h,v 1.3 2013/06/17 18:57:39 robert Exp $ */ -#ifndef __crypto_headers_h__ -#define __crypto_headers_h__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef BN_is_negative -#define BN_set_negative(bn, flag) ((bn)->neg=(flag)?1:0) -#define BN_is_negative(bn) ((bn)->neg != 0) -#endif - -#endif /* __crypto_headers_h__ */ diff --git a/kerberosV/include/krb5-types.h b/kerberosV/include/krb5-types.h deleted file mode 100644 index 193777e5539..00000000000 --- a/kerberosV/include/krb5-types.h +++ /dev/null @@ -1,48 +0,0 @@ -/* krb5-types.h -- this file was generated for x86_64-unknown-openbsd5.3 by - $Id: krb5-types.h,v 1.3 2013/06/17 18:57:39 robert Exp $ */ - -#ifndef __krb5_types_h__ -#define __krb5_types_h__ - -#include -#include -#include - - -typedef socklen_t krb5_socklen_t; -#include -typedef ssize_t krb5_ssize_t; - -typedef int krb5_socket_t; - -#ifndef HEIMDAL_DEPRECATED -#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) -#define HEIMDAL_DEPRECATED __attribute__((deprecated)) -#elif defined(_MSC_VER) && (_MSC_VER>1200) -#define HEIMDAL_DEPRECATED __declspec(deprecated) -#else -#define HEIMDAL_DEPRECATED -#endif -#endif -#ifndef HEIMDAL_PRINTF_ATTRIBUTE -#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) -#define HEIMDAL_PRINTF_ATTRIBUTE(x) __attribute__((format x)) -#else -#define HEIMDAL_PRINTF_ATTRIBUTE(x) -#endif -#endif -#ifndef HEIMDAL_NORETURN_ATTRIBUTE -#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) -#define HEIMDAL_NORETURN_ATTRIBUTE __attribute__((noreturn)) -#else -#define HEIMDAL_NORETURN_ATTRIBUTE -#endif -#endif -#ifndef HEIMDAL_UNUSED_ATTRIBUTE -#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) -#define HEIMDAL_UNUSED_ATTRIBUTE __attribute__((unused)) -#else -#define HEIMDAL_UNUSED_ATTRIBUTE -#endif -#endif -#endif /* __krb5_types_h__ */ diff --git a/kerberosV/include/roken.h b/kerberosV/include/roken.h deleted file mode 100644 index 62ab7277a3a..00000000000 --- a/kerberosV/include/roken.h +++ /dev/null @@ -1,327 +0,0 @@ -/* This is an OS dependent, generated file */ - - -#ifndef __ROKEN_H__ -#define __ROKEN_H__ - -/* -*- C -*- */ -/* - * Copyright (c) 1995-2005 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 -#include -#include -#include -#include -#include - -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#define ROKEN_LIB_VARIABLE - - -typedef int rk_socket_t; - -#define rk_closesocket(x) close(x) -#define rk_SOCK_IOCTL(s,c,a) ioctl((s),(c),(a)) -#define rk_IS_BAD_SOCKET(s) ((s) < 0) -#define rk_IS_SOCKET_ERROR(rv) ((rv) < 0) -#define rk_SOCK_ERRNO errno -#define rk_INVALID_SOCKET (-1) - -#define rk_SOCK_INIT() 0 -#define rk_SOCK_EXIT() do { } while(0) - - -#define IN_LOOPBACKNET 127 - - -#define UNREACHABLE(x) -#define UNUSED_ARGUMENT(x) - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - - - -#include - -ROKEN_CPP_START - -#define rk_UNCONST(x) ((void *)(uintptr_t)(const void *)(x)) - - - - - - - - - - - - -#define asnprintf rk_asnprintf -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_asnprintf (char **, size_t, const char *, ...) - __attribute__ ((format (printf, 3, 4))); - -#define vasnprintf rk_vasnprintf -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - vasnprintf (char **, size_t, const char *, va_list) - __attribute__((format (printf, 3, 0))); - - - -#define strlwr rk_strlwr -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strlwr(char *); - - - -#define strsep_copy rk_strsep_copy -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL strsep_copy(const char**, const char*, char*, size_t); - - - - -#define strupr rk_strupr -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strupr(char *); - - - - - -#define rk_strerror_r strerror_r - - - - - - - -#include -ROKEN_LIB_FUNCTION struct passwd * ROKEN_LIB_CALL k_getpwnam (const char *); -ROKEN_LIB_FUNCTION struct passwd * ROKEN_LIB_CALL k_getpwuid (uid_t); - -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL get_default_username (void); - - - - - - - - -#define rk_rename(__rk_rn_from,__rk_rn_to) rename(__rk_rn_from,__rk_rn_to) - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL daemon(int, int); - - - - - - - - - -#define bswap32 rk_bswap32 -ROKEN_LIB_FUNCTION unsigned int ROKEN_LIB_CALL bswap32(unsigned int); - -#define bswap16 rk_bswap16 -ROKEN_LIB_FUNCTION unsigned short ROKEN_LIB_CALL bswap16(unsigned short); - - - -ROKEN_LIB_FUNCTION time_t ROKEN_LIB_CALL tm2time (struct tm, int); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL unix_verify_user(char *, char *); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL roken_concat (char *, size_t, ...); - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL roken_mconcat (char **, size_t, ...); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL roken_vconcat (char *, size_t, va_list); - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL - roken_vmconcat (char **, size_t, va_list); - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL - net_write (rk_socket_t, const void *, size_t); - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL - net_read (rk_socket_t, void *, size_t); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - issuid(void); - - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL get_window_size(int fd, int *, int *); - - - - -#define getipnodebyname rk_getipnodebyname -ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL -getipnodebyname (const char *, int, int, int *); - -#define getipnodebyaddr rk_getipnodebyaddr -ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL -getipnodebyaddr (const void *, size_t, int, int *); - -#define freehostent rk_freehostent -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -freehostent (struct hostent *); - -#define copyhostent rk_copyhostent -ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL -copyhostent (const struct hostent *); - - - - - - - - - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getnameinfo_verified(const struct sockaddr *, socklen_t, - char *, size_t, - char *, size_t, - int); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -roken_getaddrinfo_hostspec(const char *, int, struct addrinfo **); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -roken_getaddrinfo_hostspec2(const char *, int, int, struct addrinfo **); - - - - -#define emalloc rk_emalloc -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL emalloc (size_t); -#define ecalloc rk_ecalloc -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL ecalloc(size_t, size_t); -#define erealloc rk_erealloc -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL erealloc (void *, size_t); -#define estrdup rk_estrdup -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL estrdup (const char *); - -/* - * kludges and such - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -roken_gethostby_setup(const char*, const char*); -ROKEN_LIB_FUNCTION struct hostent* ROKEN_LIB_CALL -roken_gethostbyname(const char*); -ROKEN_LIB_FUNCTION struct hostent* ROKEN_LIB_CALL -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) - -#define roken_getsockname(a,b,c) getsockname(a,b,c) - - - - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -mini_inetd_addrinfo (struct addrinfo*, rk_socket_t *); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -mini_inetd (int, rk_socket_t *); - - -#define strsvis rk_strsvis -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strsvis(char *, const char *, int, const char *); - -#define strsvisx rk_strsvisx -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strsvisx(char *, const char *, size_t, int, const char *); - - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strvis(char *, const char *, int); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strvisx(char *, const char *, size_t, int); - -#define svis rk_svis -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -svis(char *, int, int, int, const char *); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unvis(char *, int, int *, int); - -#define vis rk_vis -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -vis(char *, int, int, int); - - - - -#define rk_random() arc4random() - - - - -ROKEN_CPP_END - -#endif /* __ROKEN_H__ */ diff --git a/kerberosV/include/version.h b/kerberosV/include/version.h deleted file mode 100644 index 3c0ce758c40..00000000000 --- a/kerberosV/include/version.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef VERSION_HIDDEN -#define VERSION_HIDDEN -#endif -VERSION_HIDDEN const char *heimdal_long_version = "@(#)$Version: Heimdal 1.5.3 (OpenBSD) $"; -VERSION_HIDDEN const char *heimdal_version = "Heimdal 1.5.3"; diff --git a/kerberosV/lib/Makefile b/kerberosV/lib/Makefile deleted file mode 100644 index 267058e5c0b..00000000000 --- a/kerberosV/lib/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# $OpenBSD: Makefile,v 1.11 2013/08/10 09:07:39 ajacoutot Exp $ - -SUBDIR= libasn1 libgssapi libhdb libkadm5clnt libkadm5srv \ - libkafs libkrb5 libroken libsl libvers libkdc \ - libwind libheimbase libheimipcc libheimipcs \ - libcom_err - -.include diff --git a/kerberosV/lib/Makefile.inc b/kerberosV/lib/Makefile.inc deleted file mode 100644 index 952e0dee0cf..00000000000 --- a/kerberosV/lib/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.5 2013/06/17 18:57:39 robert Exp $ - -.include "../Makefile.inc" diff --git a/kerberosV/lib/libasn1/Makefile b/kerberosV/lib/libasn1/Makefile deleted file mode 100644 index 2360a60deb5..00000000000 --- a/kerberosV/lib/libasn1/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# $OpenBSD: Makefile,v 1.5 2013/07/02 19:00:09 ajacoutot Exp $ - -LIB= asn1 -INCS= asn1_err.h asn1-common.h heim_asn1.h der.h der-protos.h der-private.h - -SRCS= asn1_err.c \ - asn1_err.h \ - der.c \ - der_copy.c \ - der_cmp.c \ - der_free.c \ - der_format.c \ - der_get.c \ - der_length.c \ - der_put.c \ - extra.c \ - template.c \ - timegm.c \ - roken.h \ - ${GEN:S/.x$/.c/:S/.hx$/.h/} - -CPPFLAGS= -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/com_err -I. - -GEN_RFC2459= asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx -GEN_CMS= asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx -GEN_K5= asn1_krb5_asn1.x krb5_asn1.hx krb5_asn1-priv.hx -GEN_DIGEST= asn1_digest_asn1.x digest_asn1.hx digest_asn1-priv.hx - -GEN+= ${GEN_RFC2459} -GEN+= ${GEN_CMS} -GEN+= ${GEN_K5} -GEN+= ${GEN_DIGEST} - -CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} *_asn1_files - -INCS+= krb5_asn1.h \ - cms_asn1.h \ - rfc2459_asn1.h \ - digest_asn1.h - -${GEN_CMS}: cms.asn1 cms.opt - ${ASN1_COMPILE} --one-code-file \ - --option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} cms_asn1 - -${GEN_RFC2459}: rfc2459.asn1 - ${ASN1_COMPILE} \ - --one-code-file \ - --preserve-binary=TBSCertificate \ - --preserve-binary=TBSCRLCertList \ - --preserve-binary=Name \ - --sequence=GeneralNames \ - --sequence=Extensions \ - --sequence=CRLDistributionPoints ${.ALLSRC:M*.asn1} rfc2459_asn1 - -${GEN_K5}: krb5.asn1 krb5.opt - ${ASN1_COMPILE} \ - --one-code-file \ - --option-file=${.ALLSRC:M*.opt} \ - ${.ALLSRC:M*.asn1} krb5_asn1 - -${GEN_DIGEST}: digest.asn1 - ${ASN1_COMPILE} --one-code-file \ - ${.ALLSRC:M*.asn1} digest_asn1 - -.SUFFIXES: .h .c .x .hx - -.x.c: - cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET} - -.hx.h: - cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET} - -.include - -.SUFFIXES: .h .c .x .hx - -.PATH: ${KRB5DIR}/lib/asn1 ${KRB5DIR}/include ${.CURDIR}/../../include diff --git a/kerberosV/lib/libasn1/shlib_version b/kerberosV/lib/libasn1/shlib_version deleted file mode 100644 index a5757c1bcc6..00000000000 --- a/kerberosV/lib/libasn1/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=20 -minor=0 diff --git a/kerberosV/lib/libcom_err/Makefile b/kerberosV/lib/libcom_err/Makefile deleted file mode 100644 index 2f3dc4e368a..00000000000 --- a/kerberosV/lib/libcom_err/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $OpenBSD: Makefile,v 1.3 2013/07/02 19:00:09 ajacoutot Exp $ - -LIB= com_err -SRCS= com_err.c error.c -INCS= com_err.h com_right.h - -CPPFLAGS= -I. -I${KRB5DIR}/lib/com_err \ - -I. -I${KRB5DIR}/lib/roken - -.include - -.PATH: ${KRB5DIR}/lib/com_err diff --git a/kerberosV/lib/libcom_err/shlib_version b/kerberosV/lib/libcom_err/shlib_version deleted file mode 100644 index a5757c1bcc6..00000000000 --- a/kerberosV/lib/libcom_err/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=20 -minor=0 diff --git a/kerberosV/lib/libgssapi/Makefile b/kerberosV/lib/libgssapi/Makefile deleted file mode 100644 index 55f03305cb8..00000000000 --- a/kerberosV/lib/libgssapi/Makefile +++ /dev/null @@ -1,282 +0,0 @@ -# $OpenBSD: Makefile,v 1.9 2013/11/02 14:15:07 ajacoutot Exp $ - -LIB= gssapi - -GEN_GSSAPI= asn1_GSSAPIContextToken.x gssapi_asn1-priv.hx gssapi_asn1.hx - -GEN_SPNEGO= asn1_ContextFlags.x asn1_MechType.x asn1_MechTypeList.x asn1_NegHints.x \ - asn1_NegTokenInit.x asn1_NegTokenInitWin.x asn1_NegTokenResp.x asn1_NegotiationToken.x \ - asn1_NegotiationTokenWin.x spnego_asn1-priv.hx spnego_asn1.hx - -GEN= ${GEN_GSSAPI} ${GEN_SPNEGO} - -GGEN= asn1_ContextFlags.x \ - asn1_GSSAPIContextToken.x \ - asn1_MechType.x \ - asn1_MechTypeList.x \ - asn1_NegotiationToken.x \ - asn1_NegotiationTokenWin.x \ - asn1_NegHints.x \ - asn1_NegTokenInit.x \ - asn1_NegTokenInitWin.x \ - asn1_NegTokenResp.x \ - -krb5src= \ - krb5/8003.c \ - krb5/accept_sec_context.c \ - krb5/acquire_cred.c \ - krb5/add_cred.c \ - krb5/address_to_krb5addr.c \ - krb5/aeap.c \ - krb5/arcfour.c \ - krb5/authorize_localname.c \ - krb5/canonicalize_name.c \ - krb5/creds.c \ - krb5/ccache_name.c \ - krb5/cfx.c \ - krb5/compare_name.c \ - krb5/compat.c \ - krb5/context_time.c \ - krb5/copy_ccache.c \ - krb5/decapsulate.c \ - krb5/delete_sec_context.c \ - krb5/display_name.c \ - krb5/display_status.c \ - krb5/duplicate_name.c \ - krb5/encapsulate.c \ - krb5/export_name.c \ - krb5/export_sec_context.c \ - krb5/external.c \ - krb5/get_mic.c \ - krb5/import_name.c \ - krb5/import_sec_context.c \ - krb5/indicate_mechs.c \ - krb5/init.c \ - krb5/init_sec_context.c \ - krb5/inquire_context.c \ - krb5/inquire_cred.c \ - krb5/inquire_cred_by_mech.c \ - krb5/inquire_cred_by_oid.c \ - krb5/inquire_mechs_for_name.c \ - krb5/inquire_names_for_mech.c \ - krb5/inquire_sec_context_by_oid.c \ - krb5/pname_to_uid.c \ - krb5/process_context_token.c \ - krb5/prf.c \ - krb5/release_buffer.c \ - krb5/release_cred.c \ - krb5/release_name.c \ - krb5/sequence.c \ - krb5/store_cred.c \ - krb5/set_cred_option.c \ - krb5/set_sec_context_option.c \ - krb5/ticket_flags.c \ - krb5/unwrap.c \ - krb5/verify_mic.c \ - krb5/wrap.c - -mechsrc = \ - mech/context.c \ - mech/doxygen.c \ - mech/gss_accept_sec_context.c \ - mech/gss_acquire_cred.c \ - mech/gss_acquire_cred_ext.c \ - mech/gss_acquire_cred_with_password.c \ - mech/gss_add_cred.c \ - mech/gss_add_oid_set_member.c \ - mech/gss_authorize_localname.c \ - mech/gss_aeap.c \ - mech/gss_buffer_set.c \ - mech/gss_canonicalize_name.c \ - mech/gss_compare_name.c \ - mech/gss_context_time.c \ - mech/gss_create_empty_oid_set.c \ - mech/gss_cred.c \ - mech/gss_decapsulate_token.c \ - mech/gss_delete_name_attribute.c \ - mech/gss_delete_sec_context.c \ - mech/gss_display_name.c \ - mech/gss_display_name_ext.c \ - mech/gss_display_status.c \ - mech/gss_duplicate_name.c \ - mech/gss_duplicate_oid.c \ - mech/gss_encapsulate_token.c \ - mech/gss_export_name.c \ - mech/gss_export_name_composite.c \ - mech/gss_export_sec_context.c \ - mech/gss_get_mic.c \ - mech/gss_get_name_attribute.c \ - mech/gss_import_name.c \ - mech/gss_import_sec_context.c \ - mech/gss_indicate_mechs.c \ - mech/gss_init_sec_context.c \ - mech/gss_inquire_context.c \ - mech/gss_inquire_cred.c \ - mech/gss_inquire_cred_by_mech.c \ - mech/gss_inquire_cred_by_oid.c \ - mech/gss_inquire_mechs_for_name.c \ - mech/gss_inquire_name.c \ - mech/gss_inquire_names_for_mech.c \ - mech/gss_krb5.c \ - mech/gss_mech_switch.c \ - mech/gss_mo.c \ - mech/gss_names.c \ - mech/gss_oid.c \ - mech/gss_oid_equal.c \ - mech/gss_oid_to_str.c \ - mech/gss_pname_to_uid.c \ - mech/gss_process_context_token.c \ - mech/gss_pseudo_random.c \ - mech/gss_release_buffer.c \ - mech/gss_release_cred.c \ - mech/gss_release_name.c \ - mech/gss_release_oid.c \ - mech/gss_release_oid_set.c \ - mech/gss_seal.c \ - mech/gss_set_cred_option.c \ - mech/gss_set_name_attribute.c \ - mech/gss_set_sec_context_option.c \ - mech/gss_sign.c \ - mech/gss_store_cred.c \ - mech/gss_test_oid_set_member.c \ - mech/gss_unseal.c \ - mech/gss_unwrap.c \ - mech/gss_utils.c \ - mech/gss_verify.c \ - mech/gss_verify_mic.c \ - mech/gss_wrap.c \ - mech/gss_wrap_size_limit.c \ - mech/gss_inquire_sec_context_by_oid.c - -spnegosrc = \ - spnego/accept_sec_context.c \ - spnego/compat.c \ - spnego/context_stubs.c \ - spnego/cred_stubs.c \ - spnego/external.c \ - spnego/init_sec_context.c - -KRB5SRC= ${krb5src:S@/@__@} -MECHSRC= ${mechsrc:S@/@__@} -SPNEGOSRC= ${spnegosrc:S@/@__@} - - -SRCS= ${KRB5SRC} \ - ${MECHSRC} \ - ${SPNEGOSRC} \ - gkrb5_err.c \ - gkrb5_err.h \ - ${GEN:S/.x$/.c/:S/.hx$/.h/} - -INCS= gssapi.h - -OIDINCS= gssapi_oid.h -OIDINCSDIR= ${INCLUDEDIR}/gssapi - -KRB5INCS= gssapi.h gssapi_krb5.h -KRB5INCSDIR= ${INCLUDEDIR}/gssapi - -SPNEGOINCS= gssapi_spnego.h -SPNEGOINCSDIR= ${INCLUDEDIR}/gssapi - -INCSGROUPS= INCS OIDINCS KRB5INCS SPNEGOINCS - -GEN+= gssapi_asn1.hx \ - gssapi_asn1-priv.hx \ - spnego_asn1.hx \ - spnego_asn1-priv.hx - -MPAGES= gssapi.3 \ - gss_acquire_cred.3 \ - mech.5 - -MSRC= ${KRB5DIR}/lib/gssapi \ - ${KRB5DIR}/lib/gssapi/mech - -MLINKS= \ - gss_acquire_cred.3 gss_accept_sec_context.3 \ - gss_acquire_cred.3 gss_add_cred.3 \ - gss_acquire_cred.3 gss_add_oid_set_member.3 \ - gss_acquire_cred.3 gss_canonicalize_name.3 \ - gss_acquire_cred.3 gss_compare_name.3 \ - gss_acquire_cred.3 gss_context_time.3 \ - gss_acquire_cred.3 gss_create_empty_oid_set.3 \ - gss_acquire_cred.3 gss_delete_sec_context.3 \ - gss_acquire_cred.3 gss_display_name.3 \ - gss_acquire_cred.3 gss_display_status.3 \ - gss_acquire_cred.3 gss_duplicate_name.3 \ - gss_acquire_cred.3 gss_export_name.3 \ - gss_acquire_cred.3 gss_export_sec_context.3 \ - gss_acquire_cred.3 gss_get_mic.3 \ - gss_acquire_cred.3 gss_import_name.3 \ - gss_acquire_cred.3 gss_import_sec_context.3 \ - gss_acquire_cred.3 gss_indicate_mechs.3 \ - gss_acquire_cred.3 gss_init_sec_context.3 \ - gss_acquire_cred.3 gss_inquire_context.3 \ - gss_acquire_cred.3 gss_inquire_cred.3 \ - gss_acquire_cred.3 gss_inquire_cred_by_mech.3 \ - gss_acquire_cred.3 gss_inquire_mechs_for_name.3 \ - gss_acquire_cred.3 gss_inquire_names_for_mech.3 \ - gss_acquire_cred.3 gss_krb5_ccache_name.3 \ - gss_acquire_cred.3 gss_krb5_compat_des3_mic.3 \ - gss_acquire_cred.3 gss_krb5_copy_ccache.3 \ - gss_acquire_cred.3 gss_krb5_get_tkt_flags.3 \ - gss_acquire_cred.3 gss_krb5_import_ccache.3 \ - gss_acquire_cred.3 gss_krb5_import_cred.3 \ - gss_acquire_cred.3 gss_process_context_token.3 \ - gss_acquire_cred.3 gss_release_buffer.3 \ - gss_acquire_cred.3 gss_release_cred.3 \ - gss_acquire_cred.3 gss_release_name.3 \ - gss_acquire_cred.3 gss_release_oid_set.3 \ - gss_acquire_cred.3 gss_seal.3 \ - gss_acquire_cred.3 gss_sign.3 \ - gss_acquire_cred.3 gss_test_oid_set_member.3 \ - gss_acquire_cred.3 gss_unseal.3 \ - gss_acquire_cred.3 gss_unwrap.3 \ - gss_acquire_cred.3 gss_verify.3 \ - gss_acquire_cred.3 gss_verify_mic.3 \ - gss_acquire_cred.3 gss_wrap.3 \ - gss_acquire_cred.3 gss_wrap_size_limit.3 \ - gss_acquire_cred.3 gsskrb5_extract_authz_data_from_sec_context.3 \ - gss_acquire_cred.3 gsskrb5_register_acceptor_identity.3 - -CPPFLAGS= -I${KRB5DIR}/lib/gssapi \ - -I${KRB5DIR}/lib/gssapi/gssapi \ - -I${KRB5DIR}/lib/gssapi/krb5 \ - -I${KRB5DIR}/lib/gssapi/mech \ - -I${KRB5DIR}/lib/gssapi/spnego \ - -I${KRB5DIR}/lib/krb5 \ - -I${KRB5DIR}/lib/asn1 \ - -I${KRB5DIR}/lib/roken -I. - -CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} gssapi_asn1_files spnego_asn1_files \ - gssapi_asn1-template.c spnego_asn1-template.c - -.for i in ${KRB5SRC} ${MECHSRC} ${SPNEGOSRC} -CLEANFILES+=$i -SRCS+=$i - -${i}: ${i:S@__@/@} - ln -s ${.ALLSRC} ${.OBJDIR}/${i} -.endfor - -${GEN_GSSAPI}: gssapi.asn1 - ${ASN1_COMPILE} ${.ALLSRC:M*.asn1} gssapi_asn1 - -${GEN_SPNEGO}: spnego.asn1 spnego.opt - ${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} ${.ALLSRC:M*.asn1} spnego_asn1 - -.SUFFIXES: .h .c .x .hx - -.x.c: - cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET} - -.hx.h: - cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET} - -.include - -.SUFFIXES: .h .c .x .hx - -.PATH: ${KRB5DIR}/lib/gssapi/gssapi ${KRB5DIR}/lib/gssapi ${KRB5DIR}/lib/gssapi/krb5 \ - ${KRB5DIR}/lib/gssapi/mech ${KRB5DIR}/lib/gssapi/spnego diff --git a/kerberosV/lib/libgssapi/shlib_version b/kerberosV/lib/libgssapi/shlib_version deleted file mode 100644 index b39addfcc64..00000000000 --- a/kerberosV/lib/libgssapi/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=7 -minor=1 diff --git a/kerberosV/lib/libhdb/Makefile b/kerberosV/lib/libhdb/Makefile deleted file mode 100644 index 789e649104e..00000000000 --- a/kerberosV/lib/libhdb/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# $OpenBSD: Makefile,v 1.8 2013/11/03 11:56:40 ajacoutot Exp $ - -LIB= hdb - -MSRC= ${KRB5DIR}/doc/doxyout/hdb/man/man3 - -INCS= hdb-protos.h \ - hdb.h - -INCS+= hdb_asn1.h \ - hdb_err.h - -SRCS= common.c \ - db.c \ - db3.c \ - dbinfo.c \ - ext.c \ - hdb-ldap.c \ - hdb.c \ - hdb_err.c \ - hdb_err.h \ - hdb-keytab.c \ - hdb-mitdb.c \ - keys.c \ - keytab.c \ - mkey.c \ - ndbm.c \ - print.c \ - ${GEN:S/.x$/.c/:S/.hx$/.h/} - -CPPFLAGS= -I${KRB5DIR}/lib/hdb -I${KRB5DIR}/lib/asn1 \ - -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/lib/krb5 \ - -I. - -CFLAGS= -DHDB_DB_DIR="\"/var/kerberosV\"" - -GEN= asn1_Salt.x \ - asn1_Key.x \ - asn1_Event.x \ - asn1_HDBFlags.x \ - asn1_GENERATION.x \ - asn1_HDB_Ext_Constrained_delegation_acl.x \ - asn1_HDB_Ext_Lan_Manager_OWF.x \ - asn1_HDB_Ext_Password.x \ - asn1_HDB_Ext_Aliases.x \ - asn1_HDB_extension.x \ - asn1_HDB_extensions.x \ - asn1_hdb_entry.x \ - asn1_hdb_entry_alias.x \ - asn1_hdb_keyset.x \ - hdb_asn1.hx \ - hdb_asn1-priv.hx - -CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx$/.h/} hdb_asn1_files \ - hdb_asn1-template.[ch]* - -${GEN}: hdb.asn1 - ${ASN1_COMPILE} ${.ALLSRC:M*.asn1} hdb_asn1 - -.SUFFIXES: .h .c .x .hx - -.x.c: - cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET} - -.hx.h: - cmp -s ${.IMPSRC} ${.TARGET} 2> /dev/null || cp ${.IMPSRC} ${.TARGET} - -.include - -.SUFFIXES: .h .c .x .hx - -.PATH: ${KRB5DIR}/lib/hdb ${KRB5DIR}/doc/doxyout/hdb/man/man3/ diff --git a/kerberosV/lib/libhdb/shlib_version b/kerberosV/lib/libhdb/shlib_version deleted file mode 100644 index 1edea46de91..00000000000 --- a/kerberosV/lib/libhdb/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=1 -minor=0 diff --git a/kerberosV/lib/libheimbase/Makefile b/kerberosV/lib/libheimbase/Makefile deleted file mode 100644 index aec47f5ce7c..00000000000 --- a/kerberosV/lib/libheimbase/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -#$OpenBSD: Makefile,v 1.3 2013/07/02 19:00:09 ajacoutot Exp $ - -LIB= heimbase - -INCS= heimbase.h - -SRCS= \ - array.c \ - bool.c \ - dict.c \ - heimbase.c \ - null.c \ - number.c \ - string.c - -CPPFLAGS= -I${KRB5DIR}/include - -.include - -.PATH: ${KRB5DIR}/base diff --git a/kerberosV/lib/libheimbase/shlib_version b/kerberosV/lib/libheimbase/shlib_version deleted file mode 100644 index 1edea46de91..00000000000 --- a/kerberosV/lib/libheimbase/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=1 -minor=0 diff --git a/kerberosV/lib/libheimipcc/Makefile b/kerberosV/lib/libheimipcc/Makefile deleted file mode 100644 index 31c0c19882c..00000000000 --- a/kerberosV/lib/libheimipcc/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -#$OpenBSD: Makefile,v 1.2 2013/07/02 19:00:09 ajacoutot Exp $ - -.include - -LIB= heimipcc - -SRCS= \ - client.c \ - common.c - -.if !defined(NOPIC) -CFLAGS+= -DPIC ${PICFLAG} -.endif - -CPPFLAGS= -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/base \ - -I${KRB5DIR}/lib/ipc - -# skip installation -install: - -.include - -.PATH: ${KRB5DIR}/lib/ipc diff --git a/kerberosV/lib/libheimipcs/Makefile b/kerberosV/lib/libheimipcs/Makefile deleted file mode 100644 index 674d1d1aba3..00000000000 --- a/kerberosV/lib/libheimipcs/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -#$OpenBSD: Makefile,v 1.2 2013/07/02 19:00:09 ajacoutot Exp $ - -.include - -LIB= heimipcs - -SRCS= \ - server.c \ - common.c - -.if !defined(NOPIC) -CFLAGS+= -DPIC ${PICFLAG} -.endif - -CPPFLAGS= -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/base \ - -I${KRB5DIR}/lib/ipc -I. - -# skip installation -install: - -.include - -.PATH: ${KRB5DIR}/lib/ipc diff --git a/kerberosV/lib/libkadm5clnt/Makefile b/kerberosV/lib/libkadm5clnt/Makefile deleted file mode 100644 index 537580183d7..00000000000 --- a/kerberosV/lib/libkadm5clnt/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# $OpenBSD: Makefile,v 1.3 2013/07/02 19:00:10 ajacoutot Exp $ - -LIB= kadm5clnt - -INCS= admin.h \ - kadm5-private.h \ - kadm5-protos.h \ - kadm5-pwcheck.h \ - kadm5_err.h \ - private.h - -INCSDIR=${INCLUDEDIR}/kadm5 - -SRCS= ad.c \ - chpass_c.c \ - client_glue.c \ - common_glue.c \ - create_c.c \ - delete_c.c \ - destroy_c.c \ - flush_c.c \ - free.c \ - get_c.c \ - get_princs_c.c \ - init_c.c \ - kadm5_err.c \ - kadm5_err.h \ - marshall.c \ - modify_c.c \ - privs_c.c \ - randkey_c.c \ - rename_c.c \ - send_recv.c - -CPPFLAGS= -I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. - -.include - -.PATH: ${KRB5DIR}/lib/kadm5 diff --git a/kerberosV/lib/libkadm5clnt/shlib_version b/kerberosV/lib/libkadm5clnt/shlib_version deleted file mode 100644 index 1edea46de91..00000000000 --- a/kerberosV/lib/libkadm5clnt/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=1 -minor=0 diff --git a/kerberosV/lib/libkadm5srv/Makefile b/kerberosV/lib/libkadm5srv/Makefile deleted file mode 100644 index 912c8b3fecd..00000000000 --- a/kerberosV/lib/libkadm5srv/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# $OpenBSD: Makefile,v 1.4 2013/07/02 19:00:10 ajacoutot Exp $ - -LIB= kadm5srv -MPAGES= kadm5_pwcheck.3 -MSRC= ${KRB5DIR}/lib/kadm5 - -SRCS= acl.c \ - bump_pw_expire.c \ - chpass_s.c \ - common_glue.c \ - context_s.c \ - create_s.c \ - delete_s.c \ - destroy_s.c \ - ent_setup.c \ - error.c \ - flush_s.c \ - free.c \ - get_princs_s.c \ - get_s.c \ - init_s.c \ - kadm5_err.c \ - kadm5_err.h \ - keys.c \ - log.c \ - marshall.c \ - modify_s.c \ - password_quality.c \ - privs_s.c \ - randkey_s.c \ - rename_s.c \ - server_glue.c \ - set_keys.c \ - set_modifier.c - -CPPFLAGS= -I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. - -.include - -.PATH: ${KRB5DIR}/lib/kadm5 diff --git a/kerberosV/lib/libkadm5srv/shlib_version b/kerberosV/lib/libkadm5srv/shlib_version deleted file mode 100644 index 1edea46de91..00000000000 --- a/kerberosV/lib/libkadm5srv/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=1 -minor=0 diff --git a/kerberosV/lib/libkafs/Makefile b/kerberosV/lib/libkafs/Makefile deleted file mode 100644 index 922b39d1fb5..00000000000 --- a/kerberosV/lib/libkafs/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 2013/11/03 11:56:40 ajacoutot Exp $ - -LIB= kafs -INCS= kafs.h -MPAGES= kafs.3 -MSRC= ${KRB5DIR}/lib/kafs - -MLINKS= kafs.3 k_afs_cell_of_file.3 \ - kafs.3 k_hasafs.3 \ - kafs.3 k_hasafs_recheck.3 \ - kafs.3 k_pioctl.3 \ - kafs.3 k_setpag.3 \ - kafs.3 k_unlog.3 \ - kafs.3 kafs_set_verbose.3 \ - kafs.3 kafs_settoken.3 \ - kafs.3 kafs_settoken5.3 \ - kafs.3 kafs_settoken_rxkad.3 \ - kafs.3 krb5_afslog.3 \ - kafs.3 krb5_afslog_uid.3 \ - kafs.3 krb_afslog.3 \ - kafs.3 krb_afslog_uid.3 - -SRCS= afssys.c \ - afskrb5.c \ - common.c - -CPPFLAGS= -I${KRB5DIR}/lib/kafs \ - -I${KRB5DIR}/lib/krb5 \ - -I${KRB5DIR}/lib/roken - -.include - -.PATH: ${KRB5DIR}/lib/kafs diff --git a/kerberosV/lib/libkafs/shlib_version b/kerberosV/lib/libkafs/shlib_version deleted file mode 100644 index a5757c1bcc6..00000000000 --- a/kerberosV/lib/libkafs/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=20 -minor=0 diff --git a/kerberosV/lib/libkdc/Makefile b/kerberosV/lib/libkdc/Makefile deleted file mode 100644 index b6e2a456363..00000000000 --- a/kerberosV/lib/libkdc/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -#$OpenBSD: Makefile,v 1.6 2013/07/02 19:00:10 ajacoutot Exp $ - -LIB= kdc - -INCS= kdc.h \ - kdc-protos.h - -KRB5INCS= windc_plugin.h -KRB5INCSDIR= ${INCLUDEDIR}/krb5 -INCSGROUPS= INCS KRB5INCS - -SRCS= \ - default_config.c \ - set_dbinfo.c \ - digest.c \ - kerberos5.c \ - krb5tgs.c \ - log.c \ - misc.c \ - process.c \ - windc.c - -CPPFLAGS= -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/lib/krb5 \ - -I${KRB5DIR}/lib/hdb \ - -I${KRB5DIR}/kdc - -.include - -.PATH: ${KRB5DIR}/kdc diff --git a/kerberosV/lib/libkdc/shlib_version b/kerberosV/lib/libkdc/shlib_version deleted file mode 100644 index 1edea46de91..00000000000 --- a/kerberosV/lib/libkdc/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=1 -minor=0 diff --git a/kerberosV/lib/libkrb5/Makefile b/kerberosV/lib/libkrb5/Makefile deleted file mode 100644 index b33d61f7857..00000000000 --- a/kerberosV/lib/libkrb5/Makefile +++ /dev/null @@ -1,504 +0,0 @@ -# $OpenBSD: Makefile,v 1.8 2013/11/03 11:56:40 ajacoutot Exp $ - -LIB= krb5 - -INCS= heim_err.h \ - heim_threads.h \ - k524_err.h \ - krb_err.h \ - krb5_err.h \ - krb5-protos.h \ - krb5-private.h \ - krb5-types.h \ - krb5.h \ - krb5_err.h \ - krb5_ccapi.h - -KRB5INCS= locate_plugin.h \ - send_to_kdc_plugin.h \ - ccache_plugin.h -KRB5INCSDIR= ${INCSDIR}/krb5 -INCSGROUPS= INCS KRB5INCS - -MPAGES= krb524_convert_creds_kdc.3 \ - krb5_425_conv_principal.3 \ - krb5_acl_match_file.3 \ - krb5_aname_to_localname.3 \ - krb5_appdefault.3 \ - krb5_auth_context.3 \ - krb5_c_make_checksum.3 \ - krb5_check_transited.3 \ - krb5_create_checksum.3 \ - krb5_creds.3 \ - krb5_digest.3 \ - krb5_eai_to_heim_errno.3 \ - krb5_encrypt.3 \ - krb5_find_padata.3 \ - krb5_generate_random_block.3 \ - krb5_get_all_client_addrs.3 \ - krb5_get_credentials.3 \ - krb5_get_creds.3 \ - krb5_get_forwarded_creds.3 \ - krb5_get_in_cred.3 \ - krb5_get_init_creds.3 \ - krb5_get_krbhst.3 \ - krb5_getportbyname.3 \ - krb5_init_context.3 \ - krb5_is_thread_safe.3 \ - krb5_krbhst_init.3 \ - krb5_mk_req.3 \ - krb5_mk_safe.3 \ - krb5_openlog.3 \ - krb5_parse_name.3 \ - krb5_principal.3 \ - krb5_rcache.3 \ - krb5_rd_error.3 \ - krb5_rd_safe.3 \ - krb5_set_default_realm.3 \ - krb5_set_password.3 \ - krb5_string_to_key.3 \ - krb5_timeofday.3 \ - krb5_verify_init_creds.3 \ - krb5_verify_user.3 - -MPAGES+= krb5.conf.5 -MPAGES+= kerberos.8 - -MSRC= ${KRB5DIR}/lib/krb5 \ - ${KRB5DIR}/doc/doxyout/krb5/man/man3 - -MLINKS= \ - krb524_convert_creds_kdc.3 krb524_convert_creds_kdc_ccache.3 \ - krb5_425_conv_principal.3 krb5_425_conv_principal_ext.3 \ - krb5_425_conv_principal.3 krb5_524_conv_principal.3 \ - krb5_acl_match_file.3 krb5_acl_match_string.3 \ - krb5_appdefault.3 krb5_appdefault_boolean.3 \ - krb5_appdefault.3 krb5_appdefault_string.3 \ - krb5_appdefault.3 krb5_appdefault_time.3 \ - krb5_auth_context.3 krb5_auth_con_addflags.3 \ - krb5_auth_context.3 krb5_auth_con_free.3 \ - krb5_auth_context.3 krb5_auth_con_genaddrs.3 \ - krb5_auth_context.3 krb5_auth_con_generatelocalsubkey.3 \ - krb5_auth_context.3 krb5_auth_con_getaddrs.3 \ - krb5_auth_context.3 krb5_auth_con_getauthenticator.3 \ - krb5_auth_context.3 krb5_auth_con_getflags.3 \ - krb5_auth_context.3 krb5_auth_con_getkey.3 \ - krb5_auth_context.3 krb5_auth_con_getlocalsubkey.3 \ - krb5_auth_context.3 krb5_auth_con_getrcache.3 \ - krb5_auth_context.3 krb5_auth_con_getremotesubkey.3 \ - krb5_auth_context.3 krb5_auth_con_getuserkey.3 \ - krb5_auth_context.3 krb5_auth_con_init.3 \ - krb5_auth_context.3 krb5_auth_con_initivector.3 \ - krb5_auth_context.3 krb5_auth_con_removeflags.3 \ - krb5_auth_context.3 krb5_auth_con_setaddrs.3 \ - krb5_auth_context.3 krb5_auth_con_setaddrs_from_fd.3 \ - krb5_auth_context.3 krb5_auth_con_setflags.3 \ - krb5_auth_context.3 krb5_auth_con_setivector.3 \ - krb5_auth_context.3 krb5_auth_con_setkey.3 \ - krb5_auth_context.3 krb5_auth_con_setlocalsubkey.3 \ - krb5_auth_context.3 krb5_auth_con_setrcache.3 \ - krb5_auth_context.3 krb5_auth_con_setremotesubkey.3 \ - krb5_auth_context.3 krb5_auth_con_setuserkey.3 \ - krb5_auth_context.3 krb5_auth_getcksumtype.3 \ - krb5_auth_context.3 krb5_auth_getkeytype.3 \ - krb5_auth_context.3 krb5_auth_getlocalseqnumber.3 \ - krb5_auth_context.3 krb5_auth_getremoteseqnumber.3 \ - krb5_auth_context.3 krb5_auth_setcksumtype.3 \ - krb5_auth_context.3 krb5_auth_setkeytype.3 \ - krb5_auth_context.3 krb5_auth_setlocalseqnumber.3 \ - krb5_auth_context.3 krb5_auth_setremoteseqnumber.3 \ - krb5_auth_context.3 krb5_free_authenticator.3 \ - krb5_c_make_checksum.3 krb5_c_block_size.3 \ - krb5_c_make_checksum.3 krb5_c_checksum_length.3 \ - krb5_c_make_checksum.3 krb5_c_decrypt.3 \ - krb5_c_make_checksum.3 krb5_c_encrypt.3 \ - krb5_c_make_checksum.3 krb5_c_encrypt_length.3 \ - krb5_c_make_checksum.3 krb5_c_enctype_compare.3 \ - krb5_c_make_checksum.3 krb5_c_get_checksum.3 \ - krb5_c_make_checksum.3 krb5_c_is_coll_proof_cksum.3 \ - krb5_c_make_checksum.3 krb5_c_is_keyed_cksum.3 \ - krb5_c_make_checksum.3 krb5_c_keylength.3 \ - krb5_c_make_checksum.3 krb5_c_make_random_key.3 \ - krb5_c_make_checksum.3 krb5_c_set_checksum.3 \ - krb5_c_make_checksum.3 krb5_c_valid_cksumtype.3 \ - krb5_c_make_checksum.3 krb5_c_valid_enctype.3 \ - krb5_c_make_checksum.3 krb5_c_verify_checksum.3 \ - krb5_check_transited.3 krb5_check_transited_realms.3 \ - krb5_check_transited.3 krb5_domain_x500_decode.3 \ - krb5_check_transited.3 krb5_domain_x500_encode.3 \ - krb5_create_checksum.3 krb5_checksum.3 \ - krb5_create_checksum.3 krb5_checksum_disable.3 \ - krb5_create_checksum.3 krb5_checksum_is_collision_proof.3 \ - krb5_create_checksum.3 krb5_checksum_is_keyed.3 \ - krb5_create_checksum.3 krb5_checksumsize.3 \ - krb5_create_checksum.3 krb5_cksumtype_valid.3 \ - krb5_create_checksum.3 krb5_copy_checksum.3 \ - krb5_create_checksum.3 krb5_crypto_get_checksum_type.3 \ - krb5_create_checksum.3 krb5_free_checksum.3 \ - krb5_create_checksum.3 krb5_free_checksum_contents.3 \ - krb5_create_checksum.3 krb5_hmac.3 \ - krb5_create_checksum.3 krb5_verify_checksum.3 \ - krb5_creds.3 krb5_copy_creds.3 \ - krb5_creds.3 krb5_copy_creds_contents.3 \ - krb5_creds.3 krb5_free_cred_contents.3 \ - krb5_creds.3 krb5_free_creds.3 \ - krb5_digest.3 krb5_digest_alloc.3 \ - krb5_digest.3 krb5_digest_free.3 \ - krb5_digest.3 krb5_digest_get_a1_hash.3 \ - krb5_digest.3 krb5_digest_get_client_binding.3 \ - krb5_digest.3 krb5_digest_get_identifier.3 \ - krb5_digest.3 krb5_digest_get_opaque.3 \ - krb5_digest.3 krb5_digest_get_responseData.3 \ - krb5_digest.3 krb5_digest_get_rsp.3 \ - krb5_digest.3 krb5_digest_get_server_nonce.3 \ - krb5_digest.3 krb5_digest_get_tickets.3 \ - krb5_digest.3 krb5_digest_init_request.3 \ - krb5_digest.3 krb5_digest_request.3 \ - krb5_digest.3 krb5_digest_set_authentication_user.3 \ - krb5_digest.3 krb5_digest_set_authid.3 \ - krb5_digest.3 krb5_digest_set_client_nonce.3 \ - krb5_digest.3 krb5_digest_set_digest.3 \ - krb5_digest.3 krb5_digest_set_hostname.3 \ - krb5_digest.3 krb5_digest_set_identifier.3 \ - krb5_digest.3 krb5_digest_set_method.3 \ - krb5_digest.3 krb5_digest_set_nonceCount.3 \ - krb5_digest.3 krb5_digest_set_opaque.3 \ - krb5_digest.3 krb5_digest_set_qop.3 \ - krb5_digest.3 krb5_digest_set_realm.3 \ - krb5_digest.3 krb5_digest_set_server_cb.3 \ - krb5_digest.3 krb5_digest_set_server_nonce.3 \ - krb5_digest.3 krb5_digest_set_type.3 \ - krb5_digest.3 krb5_digest_set_uri.3 \ - krb5_digest.3 krb5_digest_set_username.3 \ - krb5_eai_to_heim_errno.3 krb5_h_errno_to_heim_errno.3 \ - krb5_encrypt.3 krb5_crypto_getblocksize.3 \ - krb5_encrypt.3 krb5_crypto_getconfoundersize.3 \ - krb5_encrypt.3 krb5_crypto_getenctype.3 \ - krb5_encrypt.3 krb5_crypto_getpadsize.3 \ - krb5_encrypt.3 krb5_crypto_overhead.3 \ - krb5_encrypt.3 krb5_decrypt.3 \ - krb5_encrypt.3 krb5_decrypt_EncryptedData.3 \ - krb5_encrypt.3 krb5_decrypt_ivec.3 \ - krb5_encrypt.3 krb5_decrypt_ticket.3 \ - krb5_encrypt.3 krb5_encrypt_EncryptedData.3 \ - krb5_encrypt.3 krb5_encrypt_ivec.3 \ - krb5_encrypt.3 krb5_enctype_disable.3 \ - krb5_encrypt.3 krb5_enctype_keysize.3 \ - krb5_encrypt.3 krb5_enctype_to_string.3 \ - krb5_encrypt.3 krb5_enctype_valid.3 \ - krb5_encrypt.3 krb5_get_wrapped_length.3 \ - krb5_encrypt.3 krb5_string_to_enctype.3 \ - krb5_find_padata.3 krb5_padata_add.3 \ - krb5_get_all_client_addrs.3 krb5_get_all_server_addrs.3 \ - krb5_get_credentials.3 krb5_get_cred_from_kdc.3 \ - krb5_get_credentials.3 krb5_get_cred_from_kdc_opt.3 \ - krb5_get_credentials.3 krb5_get_credentials_with_flags.3 \ - krb5_get_credentials.3 krb5_get_kdc_cred.3 \ - krb5_get_credentials.3 krb5_get_renewed_creds.3 \ - krb5_get_creds.3 krb5_get_creds_opt_add_options.3 \ - krb5_get_creds.3 krb5_get_creds_opt_alloc.3 \ - krb5_get_creds.3 krb5_get_creds_opt_free.3 \ - krb5_get_creds.3 krb5_get_creds_opt_set_enctype.3 \ - krb5_get_creds.3 krb5_get_creds_opt_set_impersonate.3 \ - krb5_get_creds.3 krb5_get_creds_opt_set_options.3 \ - krb5_get_creds.3 krb5_get_creds_opt_set_ticket.3 \ - krb5_get_forwarded_creds.3 krb5_fwd_tgt_creds.3 \ - krb5_get_in_cred.3 krb5_free_kdc_rep.3 \ - krb5_get_in_cred.3 krb5_get_in_tkt.3 \ - krb5_get_in_cred.3 krb5_get_in_tkt_with_keytab.3 \ - krb5_get_in_cred.3 krb5_get_in_tkt_with_password.3 \ - krb5_get_in_cred.3 krb5_get_in_tkt_with_skey.3 \ - krb5_get_in_cred.3 krb5_password_key_proc.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_keytab.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_alloc.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_free.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_init.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_address_list.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_addressless.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_anonymous.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_canonicalize.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_default_flags.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_etype_list.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_forwardable.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_pa_password.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_paq_request.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_preauth_list.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_proxiable.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_renew_life.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_salt.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_tkt_life.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_opt_set_win2k.3 \ - krb5_get_init_creds.3 krb5_get_init_creds_password.3 \ - krb5_get_init_creds.3 krb5_prompt.3 \ - krb5_get_init_creds.3 krb5_prompter_posix.3 \ - krb5_get_krbhst.3 krb5_free_krbhst.3 \ - krb5_get_krbhst.3 krb5_get_krb524hst.3 \ - krb5_get_krbhst.3 krb5_get_krb_admin_hst.3 \ - krb5_get_krbhst.3 krb5_get_krb_changepw_hst.3 \ - krb5_init_context.3 krb5_add_et_list.3 \ - krb5_init_context.3 krb5_add_extra_addresses.3 \ - krb5_init_context.3 krb5_add_ignore_addresses.3 \ - krb5_init_context.3 krb5_context.3 \ - krb5_init_context.3 krb5_free_config_files.3 \ - krb5_init_context.3 krb5_free_context.3 \ - krb5_init_context.3 krb5_get_default_config_files.3 \ - krb5_init_context.3 krb5_get_dns_canonize_hostname.3 \ - krb5_init_context.3 krb5_get_extra_addresses.3 \ - krb5_init_context.3 krb5_get_fcache_version.3 \ - krb5_init_context.3 krb5_get_ignore_addresses.3 \ - krb5_init_context.3 krb5_get_kdc_sec_offset.3 \ - krb5_init_context.3 krb5_get_max_time_skew.3 \ - krb5_init_context.3 krb5_get_use_admin_kdc.3 \ - krb5_init_context.3 krb5_init_ets.3 \ - krb5_init_context.3 krb5_prepend_config_files.3 \ - krb5_init_context.3 krb5_prepend_config_files_default.3 \ - krb5_init_context.3 krb5_set_config_files.3 \ - krb5_init_context.3 krb5_set_dns_canonize_hostname.3 \ - krb5_init_context.3 krb5_set_extra_addresses.3 \ - krb5_init_context.3 krb5_set_fcache_version.3 \ - krb5_init_context.3 krb5_set_ignore_addresses.3 \ - krb5_init_context.3 krb5_set_max_time_skew.3 \ - krb5_init_context.3 krb5_set_use_admin_kdc.3 \ - krb5_krbhst_init.3 krb5_krbhst_format_string.3 \ - krb5_krbhst_init.3 krb5_krbhst_free.3 \ - krb5_krbhst_init.3 krb5_krbhst_get_addrinfo.3 \ - krb5_krbhst_init.3 krb5_krbhst_init_flags.3 \ - krb5_krbhst_init.3 krb5_krbhst_next.3 \ - krb5_krbhst_init.3 krb5_krbhst_next_as_string.3 \ - krb5_krbhst_init.3 krb5_krbhst_reset.3 \ - krb5_mk_safe.3 krb5_mk_priv.3 \ - krb5_mk_req.3 krb5_build_ap_req.3 \ - krb5_mk_req.3 krb5_mk_rep.3 \ - krb5_mk_req.3 krb5_mk_rep_exact.3 \ - krb5_mk_req.3 krb5_mk_rep_extended.3 \ - krb5_mk_req.3 krb5_mk_req_exact.3 \ - krb5_mk_req.3 krb5_mk_req_extended.3 \ - krb5_mk_req.3 krb5_rd_rep.3 \ - krb5_mk_req.3 krb5_rd_req.3 \ - krb5_mk_req.3 krb5_rd_req_with_keyblock.3 \ - krb5_mk_req.3 krb5_verify_ap_req.3 \ - krb5_openlog.3 krb5_addlog_dest.3 \ - krb5_openlog.3 krb5_addlog_func.3 \ - krb5_openlog.3 krb5_closelog.3 \ - krb5_openlog.3 krb5_initlog.3 \ - krb5_openlog.3 krb5_log.3 \ - krb5_openlog.3 krb5_log_msg.3 \ - krb5_openlog.3 krb5_vlog.3 \ - krb5_openlog.3 krb5_vlog_msg.3 \ - krb5_principal.3 krb5_build_principal.3 \ - krb5_principal.3 krb5_build_principal_ext.3 \ - krb5_principal.3 krb5_build_principal_va.3 \ - krb5_principal.3 krb5_build_principal_va_ext.3 \ - krb5_principal.3 krb5_copy_principal.3 \ - krb5_principal.3 krb5_free_principal.3 \ - krb5_principal.3 krb5_get_default_principal.3 \ - krb5_principal.3 krb5_make_principal.3 \ - krb5_principal.3 krb5_parse.3 \ - krb5_principal.3 krb5_parse_name_flags.3 \ - krb5_principal.3 krb5_parse_nametype.3 \ - krb5_principal.3 krb5_princ_realm.3 \ - krb5_principal.3 krb5_princ_set_realm.3 \ - krb5_principal.3 krb5_principal_compare.3 \ - krb5_principal.3 krb5_principal_compare_any_realm.3 \ - krb5_principal.3 krb5_principal_get_comp_string.3 \ - krb5_principal.3 krb5_principal_get_realm.3 \ - krb5_principal.3 krb5_principal_get_type.3 \ - krb5_principal.3 krb5_principal_match.3 \ - krb5_principal.3 krb5_principal_set_type.3 \ - krb5_principal.3 krb5_realm_compare.3 \ - krb5_principal.3 krb5_sname_to_principal.3 \ - krb5_principal.3 krb5_sock_to_principal.3 \ - krb5_principal.3 krb5_unparse_name.3 \ - krb5_principal.3 krb5_unparse_name_fixed.3 \ - krb5_principal.3 krb5_unparse_name_fixed_flags.3 \ - krb5_principal.3 krb5_unparse_name_fixed_short.3 \ - krb5_principal.3 krb5_unparse_name_flags.3 \ - krb5_principal.3 krb5_unparse_name_short.3 \ - krb5_rcache.3 krb5_get_server_rcache.3 \ - krb5_rcache.3 krb5_rc_close.3 \ - krb5_rcache.3 krb5_rc_default.3 \ - krb5_rcache.3 krb5_rc_default_name.3 \ - krb5_rcache.3 krb5_rc_default_type.3 \ - krb5_rcache.3 krb5_rc_destroy.3 \ - krb5_rcache.3 krb5_rc_expunge.3 \ - krb5_rcache.3 krb5_rc_get_lifespan.3 \ - krb5_rcache.3 krb5_rc_get_name.3 \ - krb5_rcache.3 krb5_rc_get_type.3 \ - krb5_rcache.3 krb5_rc_initialize.3 \ - krb5_rcache.3 krb5_rc_recover.3 \ - krb5_rcache.3 krb5_rc_resolve.3 \ - krb5_rcache.3 krb5_rc_resolve_full.3 \ - krb5_rcache.3 krb5_rc_resolve_type.3 \ - krb5_rcache.3 krb5_rc_store.3 \ - krb5_rd_error.3 krb5_error_from_rd_error.3 \ - krb5_rd_error.3 krb5_free_error.3 \ - krb5_rd_error.3 krb5_free_error_contents.3 \ - krb5_rd_safe.3 krb5_rd_priv.3 \ - krb5_set_default_realm.3 krb5_copy_host_realm.3 \ - krb5_set_default_realm.3 krb5_free_host_realm.3 \ - krb5_set_default_realm.3 krb5_get_default_realm.3 \ - krb5_set_default_realm.3 krb5_get_default_realms.3 \ - krb5_set_default_realm.3 krb5_get_host_realm.3 \ - krb5_set_password.3 krb5_change_password.3 \ - krb5_set_password.3 krb5_passwd_result_to_string.3 \ - krb5_set_password.3 krb5_set_password_using_ccache.3 \ - krb5_string_to_key.3 krb5_free_salt.3 \ - krb5_string_to_key.3 krb5_get_pw_salt.3 \ - krb5_string_to_key.3 krb5_string_to_key_data.3 \ - krb5_string_to_key.3 krb5_string_to_key_data_salt.3 \ - krb5_string_to_key.3 krb5_string_to_key_data_salt_opaque.3 \ - krb5_string_to_key.3 krb5_string_to_key_salt.3 \ - krb5_string_to_key.3 krb5_string_to_key_salt_opaque.3 \ - krb5_timeofday.3 krb5_format_time.3 \ - krb5_timeofday.3 krb5_set_real_time.3 \ - krb5_timeofday.3 krb5_string_to_deltat.3 \ - krb5_timeofday.3 krb5_us_timeofday.3 \ - krb5_verify_init_creds.3 krb5_verify_init_creds_opt_init.3 \ - krb5_verify_init_creds.3 krb5_verify_init_creds_opt_set_ap_req_nofail.3 \ - krb5_verify_user.3 krb5_verify_opt_alloc.3 \ - krb5_verify_user.3 krb5_verify_opt_free.3 \ - krb5_verify_user.3 krb5_verify_opt_init.3 \ - krb5_verify_user.3 krb5_verify_opt_set_ccache.3 \ - krb5_verify_user.3 krb5_verify_opt_set_flags.3 \ - krb5_verify_user.3 krb5_verify_opt_set_keytab.3 \ - krb5_verify_user.3 krb5_verify_opt_set_secure.3 \ - krb5_verify_user.3 krb5_verify_opt_set_service.3 \ - krb5_verify_user.3 krb5_verify_user_lrealm.3 \ - krb5_verify_user.3 krb5_verify_user_opt.3 - -SRCS= acache.c \ - acl.c \ - add_et_list.c \ - addr_families.c \ - aname_to_localname.c \ - appdefault.c \ - asn1_glue.c \ - auth_context.c \ - build_ap_req.c \ - build_auth.c \ - cache.c \ - changepw.c \ - codec.c \ - config_file.c \ - constants.c \ - context.c \ - convert_creds.c \ - copy_host_realm.c \ - crc.c \ - creds.c \ - crypto-aes.c \ - crypto-algs.c \ - crypto-arcfour.c \ - crypto-des-common.c \ - crypto-des.c \ - crypto-des3.c \ - crypto-evp.c \ - crypto-null.c \ - crypto-rand.c \ - crypto.c \ - data.c \ - deprecated.c \ - digest.c \ - doxygen.c \ - eai_to_heim_errno.c \ - error_string.c \ - expand_hostname.c \ - expand_path.c \ - fcache.c \ - free.c \ - free_host_realm.c \ - generate_seq_number.c \ - generate_subkey.c \ - get_addrs.c \ - get_cred.c \ - get_default_principal.c \ - get_default_realm.c \ - get_for_creds.c \ - get_host_realm.c \ - get_in_tkt.c \ - get_port.c \ - init_creds.c \ - init_creds_pw.c \ - kcm.c \ - keyblock.c \ - keytab.c \ - keytab_any.c \ - keytab_file.c \ - keytab_keyfile.c \ - keytab_memory.c \ - krbhst.c \ - kuserok.c \ - log.c \ - mcache.c \ - misc.c \ - mit_glue.c \ - mk_error.c \ - mk_priv.c \ - mk_rep.c \ - mk_req.c \ - mk_req_ext.c \ - mk_safe.c \ - n-fold.c \ - net_read.c \ - net_write.c \ - pac.c \ - padata.c \ - pcache.c \ - pkinit.c \ - plugin.c \ - principal.c \ - prog_setup.c \ - prompter_posix.c \ - rd_cred.c \ - rd_error.c \ - rd_priv.c \ - rd_rep.c \ - rd_req.c \ - rd_safe.c \ - read_message.c \ - recvauth.c \ - replay.c \ - salt-aes.c \ - salt-arcfour.c \ - salt-des.c \ - salt-des3.c \ - salt.c \ - send_to_kdc.c \ - sendauth.c \ - set_default_realm.c \ - sock_principal.c \ - store-int.c \ - store.c \ - store_emem.c \ - store_fd.c \ - store_mem.c \ - ticket.c \ - time.c \ - transited.c \ - verify_init.c \ - verify_user.c \ - version.c \ - warn.c \ - write_message.c - -SRCS+= heim_err.c \ - heim_err.h \ - k524_err.c \ - k524_err.h \ - krb5_err.c \ - krb5_err.h \ - krb_err.c \ - krb_err.h - -CPPFLAGS= -I${KRB5DIR}/lib/krb5 \ - -I${KRB5DIR}/lib/asn1 \ - -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/lib/ipc \ - -I${KRB5DIR}/base -I. - -CPPFLAGS+= -DBUILD_KRB5_LIB - -.include - -.PATH: ${KRB5DIR}/lib/krb5 ${KRB5DIR}/lib/asn1 ${KRB5DIR}/include ${.CURDIR}/../../include ${KRB5DIR}/doc/doxyout/krb5/man/man3/ diff --git a/kerberosV/lib/libkrb5/shlib_version b/kerberosV/lib/libkrb5/shlib_version deleted file mode 100644 index a5757c1bcc6..00000000000 --- a/kerberosV/lib/libkrb5/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=20 -minor=0 diff --git a/kerberosV/lib/libroken/Makefile b/kerberosV/lib/libroken/Makefile deleted file mode 100644 index e0e5e92f677..00000000000 --- a/kerberosV/lib/libroken/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# $OpenBSD: Makefile,v 1.9 2014/04/18 20:01:31 beck Exp $ - -LIB= roken -INCS= roken.h \ - roken-common.h \ - base64.h \ - getarg.h \ - hex.h \ - parse_bytes.h \ - parse_time.h \ - parse_units.h \ - resolve.h \ - rtbl.h \ - xdbm.h - -SRCS= base64.c \ - copyhostent.c \ - ecalloc.c \ - emalloc.c \ - erealloc.c \ - estrdup.c \ - strlwr.c \ - strsep_copy.c \ - strupr.c \ - bswap.c \ - cloexec.c \ - concat.c \ - ct.c \ - doxygen.c \ - dumpdata.c \ - environment.c \ - eread.c \ - esetenv.c \ - ewrite.c \ - freehostent.c \ - get_default_username.c \ - get_window_size.c \ - getaddrinfo_hostspec.c \ - getarg.c \ - getnameinfo_verified.c \ - h_errno.c \ - hex.c \ - hostent_find_fqdn.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 \ - qsort.c \ - rand.c \ - realloc.c \ - resolve.c \ - roken.h \ - roken_gethostby.c \ - rtbl.c \ - setprogname.c \ - simple_exec.c \ - snprintf.c \ - socket.c \ - strcollect.c \ - strerror_r.c \ - strpool.c \ - timeval.c \ - tm2time.c \ - unvis.c \ - verify.c \ - vis.c \ - warnerr.c \ - write_pid.c \ - xfree.c - -MPAGES= getarg.3 parse_time.3 rtbl.3 ecalloc.3 -MSRC= ${KRB5DIR}/lib/roken - -CPPFLAGS= -I${KRB5DIR}/lib/roken -I. -CPPFLAGS+= -DBUILD_ROKEN_LIB - -.include - -.PATH: ${KRB5DIR}/lib/roken ${KRB5DIR}/include ${.CURDIR}/../../include diff --git a/kerberosV/lib/libroken/shlib_version b/kerberosV/lib/libroken/shlib_version deleted file mode 100644 index 1edea46de91..00000000000 --- a/kerberosV/lib/libroken/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=1 -minor=0 diff --git a/kerberosV/lib/libsl/Makefile b/kerberosV/lib/libsl/Makefile deleted file mode 100644 index edf17002332..00000000000 --- a/kerberosV/lib/libsl/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 2013/07/02 19:00:10 ajacoutot Exp $ - -LIB= sl -SRCS= sl.c -CPPFLAGS= -I${KRB5DIR}/lib/sl - -# skip installation -install: - -.include - -.PATH: ${KRB5DIR}/lib/sl diff --git a/kerberosV/lib/libvers/Makefile b/kerberosV/lib/libvers/Makefile deleted file mode 100644 index 09eb45bb202..00000000000 --- a/kerberosV/lib/libvers/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $OpenBSD: Makefile,v 1.2 2013/07/02 19:00:10 ajacoutot Exp $ - -LIB= vers -SRCS= print_version.c roken.h -CPPFLAGS= -I. -I${KRB5DIR}/lib/roken - -# skip installation -install: - -.include - -.PATH: ${KRB5DIR}/lib/vers ${KRB5DIR}/include ${.CURDIR}/../../include diff --git a/kerberosV/lib/libwind/Makefile b/kerberosV/lib/libwind/Makefile deleted file mode 100644 index 538500e6241..00000000000 --- a/kerberosV/lib/libwind/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -#$OpenBSD: Makefile,v 1.3 2013/07/02 19:00:10 ajacoutot Exp $ - -LIB= wind - -INCS= wind.h \ - wind_err.h - -SRCS= bidi.c \ - bidi_table.c \ - combining.c \ - combining_table.c \ - doxygen.c \ - errorlist.c \ - errorlist_table.c \ - ldap.c \ - map.c \ - map_table.c \ - normalize.c \ - normalize_table.c \ - punycode.c \ - stringprep.c \ - utf8.c - -SRCS+= wind_err.c \ - wind_err.h - -CPPFLAGS= -I${KRB5DIR}/lib/roken -I. - -.include - -.PATH: ${KRB5DIR}/lib/wind diff --git a/kerberosV/lib/libwind/shlib_version b/kerberosV/lib/libwind/shlib_version deleted file mode 100644 index 1edea46de91..00000000000 --- a/kerberosV/lib/libwind/shlib_version +++ /dev/null @@ -1,2 +0,0 @@ -major=1 -minor=0 diff --git a/kerberosV/libexec/Makefile b/kerberosV/libexec/Makefile deleted file mode 100644 index 3e3916999c3..00000000000 --- a/kerberosV/libexec/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# $OpenBSD: Makefile,v 1.10 2013/06/21 13:36:31 robert Exp $ - -SUBDIR= ipropd-master ipropd-slave hprop hpropd kadmind kdc \ - kfd kpasswdd - -.include diff --git a/kerberosV/libexec/Makefile.inc b/kerberosV/libexec/Makefile.inc deleted file mode 100644 index e57aa8d381c..00000000000 --- a/kerberosV/libexec/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2013/06/17 18:57:39 robert Exp $ - -BINDIR= /usr/libexec - -.include "../Makefile.inc" diff --git a/kerberosV/libexec/hprop/Makefile b/kerberosV/libexec/hprop/Makefile deleted file mode 100644 index 880bf5e9631..00000000000 --- a/kerberosV/libexec/hprop/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# $OpenBSD: Makefile,v 1.16 2013/08/09 18:29:57 ajacoutot Exp $ - -PROG= hprop -MPAGES= hprop.8 -MSRC= ${KRB5DIR}/kdc -SRCS= hprop.c mit_dump.c -CPPFLAGS= -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/lib/krb5 \ - -I${KRB5DIR}/lib/asn1 \ - -I${KRB5DIR}/lib/ntlm \ - -I${KRB5DIR}/kdc -DPADD= ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCOM_ERR} -LDADD= -lhdb -lkrb5 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcom_err -lheimbase -lwind - -.include - -.PATH: ${KRB5DIR}/kdc diff --git a/kerberosV/libexec/hpropd/Makefile b/kerberosV/libexec/hpropd/Makefile deleted file mode 100644 index 2a90e30e34d..00000000000 --- a/kerberosV/libexec/hpropd/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $OpenBSD: Makefile,v 1.14 2013/07/10 11:14:39 ajacoutot Exp $ - -PROG= hpropd -MPAGES= hpropd.8 -MSRC= ${KRB5DIR}/kdc -CPPFLAGS= -I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 \ - -I${KRB5DIR}/kdc -DPADD= ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCOM_ERR} -LDADD= -lhdb -lkrb5 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcom_err -lheimbase -lwind - -.include - -.PATH: ${KRB5DIR}/kdc diff --git a/kerberosV/libexec/ipropd-master/Makefile b/kerberosV/libexec/ipropd-master/Makefile deleted file mode 100644 index 5db556f1c0c..00000000000 --- a/kerberosV/libexec/ipropd-master/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# $OpenBSD: Makefile,v 1.17 2013/11/03 18:20:02 ajacoutot Exp $ - -PROG= ipropd-master -MPAGES= iprop.8 -MLINKS= iprop.8 ipropd-master.8 \ - iprop.8 ipropd-slave.8 -MSRC= ${KRB5DIR}/lib/kadm5 -SRCS= ipropd_common.c ipropd_master.c kadm5_err.h -CPPFLAGS= -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ - -I. -DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCOM_ERR} -LDADD= -lkadm5srv -lhdb -lkrb5 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcom_err -lwind -lheimbase \ - -lutil - -.include - -.PATH: ${KRB5DIR}/lib/kadm5 diff --git a/kerberosV/libexec/ipropd-slave/Makefile b/kerberosV/libexec/ipropd-slave/Makefile deleted file mode 100644 index 93c165bee4d..00000000000 --- a/kerberosV/libexec/ipropd-slave/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $OpenBSD: Makefile,v 1.15 2013/07/10 11:14:40 ajacoutot Exp $ - -PROG= ipropd-slave -NOMAN= -SRCS= ipropd_common.c ipropd_slave.c kadm5_err.h -CPPFLAGS= -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ - -I. -DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCOM_ERR} -LDADD= -lkadm5srv -lhdb -lkrb5 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcom_err -lheimbase -lwind -lutil - -.include - -.PATH: ${KRB5DIR}/lib/kadm5 diff --git a/kerberosV/libexec/kadmind/Makefile b/kerberosV/libexec/kadmind/Makefile deleted file mode 100644 index 22d73a64358..00000000000 --- a/kerberosV/libexec/kadmind/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# $OpenBSD: Makefile,v 1.20 2013/07/22 14:42:31 ajacoutot Exp $ - -PROG= kadmind -MPAGES= kadmind.8 -MSRC= ${KRB5DIR}/kadmin -SRCS= rpc.c \ - server.c \ - kadmind.c \ - kadm_conn.c - -CPPFLAGS= -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/lib/gssapi/gssapi -DPADD= ${LIBKADM5SRV} ${LIBGSSAPI} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} \ - ${LIBASN1} ${LIBVERS} ${LIBCRYPTO} -LDADD= -lkadm5srv -lgssapi -lhdb -lkrb5 -lasn1 \ - -lroken ${LIBVERS} -lcrypto -lheimbase -lwind \ - -lcom_err -lutil - -.include - -.PATH: ${KRB5DIR}/kadmin diff --git a/kerberosV/libexec/kdc/Makefile b/kerberosV/libexec/kdc/Makefile deleted file mode 100644 index 8bdba09a8e7..00000000000 --- a/kerberosV/libexec/kdc/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# $OpenBSD: Makefile,v 1.18 2013/07/10 10:43:32 ajacoutot Exp $ - -PROG= kdc -MPAGES= kdc.8 -MSRC= ${KRB5DIR}/kdc - -SRCS= config.c \ - connect.c \ - announce.c \ - main.c - -CPPFLAGS= -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/kdc -DPADD= ${LIBKDC} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBASN1} \ - ${LIBCRYPTO} ${LIBVERS} -LDADD= -lkdc -lhdb -lkrb5 -lroken -lasn1 -lcrypto ${LIBVERS} -lheimbase \ - -lwind -lcom_err -lutil - -.include - -.PATH: ${KRB5DIR}/kdc diff --git a/kerberosV/libexec/kfd/Makefile b/kerberosV/libexec/kfd/Makefile deleted file mode 100644 index 6b88fdfec10..00000000000 --- a/kerberosV/libexec/kfd/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# $OpenBSD: Makefile,v 1.11 2013/07/10 10:43:32 ajacoutot Exp $ - -PROG= kfd -MPAGES= kfd.8 -MSRC= ${KRB5DIR}/appl/kf - -CPPFLAGS= -I${KRB5DIR}/lib/asn1 \ - -I${KRB5DIR}/lib/roken -DPADD= ${LIBKRB5} ${LIBROKEN} ${LIBASN1} ${LIBCRYPTO} \ - ${LIBVERS} -LDADD= -lkrb5 -lroken -lasn1 -lcrypto \ - ${LIBVERS} -lcom_err \ - -lwind -lheimbase - -.include - -.PATH: ${KRB5DIR}/appl/kf diff --git a/kerberosV/libexec/kpasswdd/Makefile b/kerberosV/libexec/kpasswdd/Makefile deleted file mode 100644 index 85e58d0c1c5..00000000000 --- a/kerberosV/libexec/kpasswdd/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $OpenBSD: Makefile,v 1.18 2013/07/22 13:20:48 ajacoutot Exp $ - -PROG= kpasswdd -MPAGES= kpasswdd.8 -MSRC= ${KRB5DIR}/kpasswd - -CPPFLAGS= -I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/hdb -DPADD= ${LIBKADM5SRV} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} ${LIBVERS} \ - ${LIBASN1} ${LIBCRYPTO} ${LIBCOM_ERR} -LDADD= -lkadm5srv -lhdb -lkrb5 -lroken ${LIBVERS} \ - -lasn1 -lcrypto -lcom_err -lheimbase -lwind -lutil - -.include - -.PATH: ${KRB5DIR}/kpasswd diff --git a/kerberosV/src/ChangeLog b/kerberosV/src/ChangeLog deleted file mode 100644 index 125740da326..00000000000 --- a/kerberosV/src/ChangeLog +++ /dev/null @@ -1,485 +0,0 @@ - -We stop writing change logs, see the source code version control systems history log instead - -2008-07-28 Love Hornquist Astrand - - * lib/krb5/v4_glue.c: The "kaserver" part of Heimdal occasionally - issues invalid AFS tokens - (here "occasionally" means for certain users in certain realms). - - In lib/krb5/v4_glue.c, in the routine storage_to_etext the ticket - is padded to a multiple of 8 bytes. If it is already a multiple of - 8 bytes, 8 additional 0-bytes are added. - - This catches the AFS krb4 ticket decoder by surprise: unless the - ticket is exactly 56 bytes, it only supports the minimum necessary - padding. It detects the superfluous padding by comparing the - ticket length decoded to the advertised ticket length. - - Hence a 7-letter userid in "cern.ch" which resulted in a ticket of - 40 bytes, got "padded" to 48 bytes which the rxkad decoder - rejected. - - From Rainer Toebbicke. - -2008-07-25 Love Hörnquist Åstrand - - * kuser/kinit.c: add --ok-as-delegate and --windows flags - - * kpasswd/kpasswd-generator.c: Switch to krb5_set_password. - - * kuser/kinit.c: Use krb5_cc_set_config. - - * lib/krb5/cache.c: Add krb5_cc_[gs]et_config. - -2008-07-22 Love Hörnquist Åstrand - - * lib/krb5/crypto.c: Allow numbers to be enctypes to as long as - they are valid. - -2008-07-17 Love Hörnquist Åstrand - - * lib/hdb/version-script.map: some random bits needed for libkadm - -2008-07-15 Love Hörnquist Åstrand - - * lib/krb5/send_to_kdc_plugin.h: add name for send_to_kdc plugin. - - * lib/krb5/krbhst.c: handle KRB5_PLUGIN_NO_HANDLE for lookup - plugin. - - * lib/krb5/send_to_kdc.c: Add support for the send_to_kdc plugin - interface. - - * lib/krb5/Makefile.am: add send_to_kdc_plugin.h - - * lib/krb5/krb5_err.et: add plugin error codes - -2008-07-14 Love Hornquist Astrand - - * lib/hdb/Makefile.am: EXTRA_DIST += version-script.map - -2008-07-14 Love Hornquist Astrand - - * lib/krb5/krb5_{address,ccache}.3: spelling, from openbsd via janne - johansson - -2008-07-13 Love Hörnquist Åstrand - - * lib/krb5/version-script.map: add krb5_free_error_message - -2008-06-21 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c: switch to krb5_set_password(). - -2008-06-18 Love Hörnquist Åstrand - - * lib/krb5/time.c (krb5_set_real_time): handle negative usec - -2008-05-31 Love Hörnquist Åstrand - - * lib/krb5/krb5_locl.h: Add - - * lib/krb5/crypto.c: Use wind_utf8ucs2_length to convert the password to utf16. - -2008-05-30 Love Hörnquist Åstrand - - * lib/krb5/kcm.c: Add back krb5_kcmcache argument to try_door(). - -2008-05-27 Love Hörnquist Åstrand - - * lib/krb5/error_string.c (krb5_free_error_message): constify - - * lib/krb5/error_string.c: Add krb5_get_error_message(). - - * lib/krb5/doxygen.c: krb5_cc_new_unique() is name of the creation - function. - -2008-04-30 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: Use the _ext api for OpenLDAP, from Honza - Machacek (gentoo). - -2008-04-28 Love Hörnquist Åstrand - - * lib/krb5/crypto.c: Use DES_set_key_unchecked(). - - * lib/krb5/krb5.conf.5: Document default_cc_type. - - * lib/krb5/cache.c: Pick up [libdefaults]default_cc_type - -2008-04-27 Love Hörnquist Åstrand - - * kdc/kaserver.c: Use DES_set_key_unchecked(). - -2008-04-21 Love Hörnquist Åstrand - - * doc/hx509.texi: About the pkcs11 module. - - * doc/hx509.texi: Pick up version from vars.texi - - * doc/hx509.texi: No MIT code in hx509. - - * hx509 now includes a pkcs11 implementation. - -2008-04-20 Love Hörnquist Åstrand - - * lib/hdb/Makefile.am: Move OpenLDAP includes to AM_CPPFLAGS to - avoid dropping other defines for the library. - -2008-04-17 Love Hörnquist Åstrand - - * lib/krb5: add __declspec() for windows. - - * configure.in: Update rk_WIN32_EXPORT, add gssapi to - rk_WIN32_EXPORT. - - * configure.in: Lets try dependency tracking for automake 1.10 and - later. - - * configure.in: Use at least libtool-2.2. - - * configure.in: Use LT_INIT the right way. - - * lib/krb5/Makefile.am: Update make-proto usage. - - * configure.in: Run autoupdate, use LT_INIT(). - -2008-04-15 Love Hörnquist Åstrand - - * lib/krb5/test_forward.c: Don't print krb5_error_code since we - are using krb5_err(). - - * lib/krb5/ticket.c: Cast krb5_error_code to int to avoid warning. - - * lib/krb5/scache.c: Cast krb5_error_code to int to avoid warning. - - * lib/krb5/principal.c: Cast enum to int to avoid warning. - - * lib/krb5/pkinit.c: Cast krb5_error_code to int to avoid warning. - - * lib/krb5/pac.c: Cast size_t to unsigned long to avoid warning. - - * lib/krb5/error_string.c: Cast krb5_error_code to int to avoid - warning. - - * lib/krb5/keytab_keyfile.c: Make num_entries an uint32 to avoid - negative numbers and type warnings. - - * lib/krb5: cc_get_version returns an int, update. - -2008-04-10 Love Hörnquist Åstrand - - * configure.in: Check for . - -2008-04-09 Love Hörnquist Åstrand - - * lib/krb5/version-script.map: sort and export _krb5_pk_kdf - - * lib/krb5/crypto.c: Check kdf params. calculate the second half - of the key. - - * lib/krb5/Makefile.am: Add test_pknistkdf - - * lib/krb5/test_pknistkdf.c: Test the new pkinit nist kdf. - - * lib/krb5/crypto.c: Complete _krb5_pk_kdf. - - * lib/krb5/crypto.c: First version of KDF in - draft-ietf-krb-wg-pkinit-alg-agility-03.txt. - -2008-04-08 Love Hörnquist Åstrand - - * doc/setup.texi: Add text about smbk5pwd overlay from Buchan - Milne. - - * lib/krb5/krb5_locl.h: Name the pkinit type enum. - - * kdc/pkinit.c: Rename constants to match global header. - - * lib/krb5/pkinit.c: Drop krb5_pk_identity and rename constants to - match global header. - - * kdc/pkinit.c: Pick up krb5_pk_identity from krb5_locl.h. - - * lib/krb5/scache.c (scc_alloc): %x is unsigned int. - -2008-04-07 Love Hörnquist Åstrand - - * lib/krb5/version-script.map: Sort and add krb5_cc_switch. - - * lib/krb5/acache.c: Use unsigned where appropriate. - - * kcm/glue.c: Adapt to chenge to krb5_cc_ops. - - * kcm/acl.c: Add missing op. - - * kdc/connect.c: Use unsigned where appropriate. - - * lib/krb5/n-fold.c: Use size_t where appropriate. - - * lib/krb5/get_addrs.c: Use unsigned where appropriate. - - * lib/krb5/crypto.c: Use unsigned where appropriate. - - * lib/krb5/crc.c: Use unsigned where appropriate. - - * lib/krb5/changepw.c: simplify - - * lib/krb5/copy_host_realm.c: simplify - - * kuser/kswitch.c: Implement --principal. - -2008-04-05 Love Hörnquist Åstrand - - * lib/krb5/cache.c: allow returning the default cc-type. - - * kuser/kswitch.c: Enable switching between existing caches. - - * lib/krb5/cache.c: Add krb5_cc_switch, to set the default - credential cache. - - * lib/krb5/acache.c: Implement set_default. - - * lib/krb5/krb5.h: Extend krb5_cc_ops and add set_default to set - the default cc name for a credential type. - -2008-04-04 Love Hörnquist Åstrand - - * lib/krb5/test_cc.c: test remove - - * lib/krb5/fcache.c: Make the remove cred slight more atomic, now - it might lose creds, but there will be no empty cache at any time. - - * lib/krb5/scache.c: Do credential iteration by temporary table. - -2008-04-02 Love Hörnquist Åstrand - - * lib/krb5/acache.c: Translate ccErrInvalidCCache. - - * lib/krb5/scache.c: implemetation of a sqlite3 backed credential - cache. - - * lib/krb5/test_cc.c: test acc and scc - - * lib/krb5/acache.c: Only release context if its in use. - -2008-04-01 Love Hörnquist Åstrand - - * doc/setup.texi: No patching of OpenLDAP is needed, from Buchan - Milne. - -2008-03-30 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: Add scache. - - * lib/krb5/scache.c: initial implementation - - * lib/Makefile.am: sqlite - - * configure.in: lib/sqlite/Makefile - -2008-03-26 Love Hörnquist Åstrand - - * lib/krb5/fcache.c: Make the storing credential an atomic - write(2) to avoid signal races, bug traced by Harald Barth and Lars - Malinowsky. - -2008-03-25 Love Hörnquist Åstrand - - * lib/krb5/fcache.c: Make erase_file() do locking too. - - * kcm/protocol.c: Make work when moving to a non-existant - cred-cache. - - * lib/krb5/test_cc.c: more verbose info. - - * lib/krb5/test_cc.c: test krb5_cc_move(). - -2008-03-23 Love Hörnquist Åstrand - - * lib/krb5/get_cred.c: Try both kdc server referral and the old - client chasing mode. - - * lib/krb5/get_cred.c: Don't do canonicalize by default, make - add_cred() sane, make loop detection in credential fetching - better. - - * lib/krb5/krb5_locl.h: Add flag EXTRACT_TICKET_AS_REQ. - - * lib/krb5/init_creds_pw.c: Tell _krb5_extract_ticket that this is - an AS-REQ. - - * lib/krb5/get_in_tkt.c: Make server referral work. - -2008-03-22 Love Hörnquist Åstrand - - * lib/krb5/get_in_tkt.c: check no server referral, don't use - stringent length tests since encryption layer does padding for - us... - - * kdc/kerberos5.c: Match name in ClientCanonicalizedNames with -10 - - * lib/krb5/principal.c (_krb5_principal_compare_PrincipalName): - new function to compare a principal to a PrincipalName. - - * lib/krb5/init_creds_pw.c: Move client referral checking to - _krb5_extract_ticket(). - - * lib/krb5/get_in_tkt.c: More bits for server referral. - - * lib/krb5/get_in_tkt.c: Make working with client referrals. - - * lib/krb5/get_cred.c: Try moving referrals checking into - _krb5_extract_ticket(). - - * lib/krb5/get_in_tkt.c: Try moving referrals checking into - _krb5_extract_ticket(). - -2008-03-21 Love Hörnquist Åstrand - - * kdc/krb5tgs.c: Send SERVER-REFERRAL data in rep.padata instead - of auth_data in ticket. - -2008-03-20 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c: remove lost bits from using - krb5_principal_set_realm - - * kdc/krb5tgs.c: Better referrals support, use canonicalize flag. - - * kdc/hprop.c: use krb5_principal_set_realm - - * lib/krb5/init_creds_pw.c: use krb5_principal_set_realm - - * lib/krb5/verify_user.c: use krb5_principal_set_realm - - * lib/krb5/version-script.map: add krb5_principal_set_realm - - * lib/krb5/principal.c: add krb5_principal_set_realm - - * lib/krb5/get_cred.c: Insecure tgs referrals. - - * lib/krb5/get_cred.c: Dont try key usage KRB5_KU_AP_REQ_AUTH for - TGS-REQ. This drop compatibility with pre 0.3d KDCs. - - * lib/krb5/get_cred.c: catch KRB5_GC_CANONICALIZE. - - * lib/krb5/krb5.h: set KRB5_GC_CANONICALIZE. - - * kuser/kgetcred.c: set KRB5_GC_CANONICALIZE. - - * kuser/kgetcred.c: Add stub --canonicalize implementation. - -2008-03-19 Love Hörnquist Åstrand - - * doc/setup.texi: Fix sasl-regexp, from Howard Chu. - -2008-03-14 Love Hörnquist Åstrand - - * kdc/kx509.c: Adapt to hx509_env changes. - -2008-03-10 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Try searchin the key by to use by first - looking for for PK-INIT EKU, then the Microsoft smart card EKU and - last, no special EKU at all. - -2008-03-09 Love Hörnquist Åstrand - - * lib/krb5/acache.c: Create a new credential cache is ->get_name - is called, make acc_initialize() reset the existing credential - cache if needed. - - * lib/krb5/acache.c (acc_get_name): just return the cache_name - directly instead of trying to resolve it. - -2008-02-23 Love Hörnquist Åstrand - - * include/Makefile.am (CLEANFILES): add wind.h and wind_err.h and - sort. - -2008-02-11 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: Use malloc() instead of static buffer. - - * lib/hdb/hdb-ldap.c: Use ldap_get_values_len, from LaMont Jones - via Brian May and Debian. - - * doc/Makefile.am: add libwind - -2008-02-05 Love Hörnquist Åstrand - - * lib/krb5/test_renew.c: Remove extra ;, From Dennis Davis. - - * lib/krb5/store_emem.c: Make compile on-pre c99 compilers. From - Dennis Davis. - -2008-02-03 Love Hörnquist Åstrand - - * tools/heimdal-gssapi.pc.in: Add wind. - - * tools/krb5-config.in: Add wind. - - * lib/krb5/pac.c: Use libwind. - -2008-02-01 Love Hörnquist Åstrand - - * lib/Makefile.am: SUBDIRS: add wind - -2008-01-29 Love Hörnquist Åstrand - - * doc/programming.texi: See the Kerberos 5 API introduction and - documentation on the Heimdal webpage. - -2008-01-27 Love Hörnquist Åstrand - - * lib/krb5: better error strings for the keytab fetching functions - - * lib/krb5/verify_krb5_conf.c: Catch deprecated entries. - - * lib/krb5/get_cred.c: Remove support - for [libdefaults]capath (not [libdefaults] capaths though). - -2008-01-25 Love Hörnquist Åstrand - - * tools/heimdal-gssapi.pc.in: Fix caps of prefix, from Joakim - Fallsjo. - -2008-01-24 Love Hörnquist Åstrand - - * lib/krb5/fcache.c (fcc_move): more explict why the fcc_move - failes, handle cross device moves. - -2008-01-21 Love Hörnquist Åstrand - - * lib/krb5/get_for_creds.c: Use on variable less. - - * lib/krb5/get_for_creds.c: Try to handle ticket full and - ticketless tickets better. Add doxygen comments while here. - - * lib/krb5/test_forward.c: Used for testing - krb5_get_forwarded_creds(). - - * lib/krb5/Makefile.am: noinst_PROGRAMS += test_forward - - * lib/krb5/Makefile.am: drop CHECK_SYMBOLS - - * lib/hdb/Makefile.am: drop CHECK_SYMBOLS - - * kdc/Makefile.am: drop CHECK_SYMBOLS - -2008-01-18 Love Hörnquist Åstrand - - * lib/krb5/version-script.map: Add krb5_digest_probe. - -2008-01-13 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Replace hx509_name_to_der_name with - hx509_name_binary. - -2008-01-12 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: add missing files - - * Happy new year. diff --git a/kerberosV/src/ChangeLog.1998 b/kerberosV/src/ChangeLog.1998 deleted file mode 100644 index f26dba777ed..00000000000 --- a/kerberosV/src/ChangeLog.1998 +++ /dev/null @@ -1,3201 +0,0 @@ -Sat Dec 5 19:49:34 1998 Johan Danielsson - - * lib/krb5/context.c: remove ktype_is_etype - - * lib/krb5/crypto.c, lib/krb5/krb5.h, acconfig.h: NEW_DES3_CODE - - * configure.in: fix for AIX install; better tests for AIX dynamic - AFS libs; `--enable-new-des3-code' - -Tue Dec 1 14:44:44 1998 Johan Danielsson - - * appl/afsutil/Makefile.am: link with extra libs for aix - - * kuser/Makefile.am: link with extra libs for aix - -Sun Nov 29 01:56:21 1998 Assar Westerlund - - * lib/krb5/get_addrs.c (krb5_get_all_server_addrs): add. almost - the same as krb5_get_all_client_addrs except that it includes - loopback addresses - - * kdc/connect.c (init_socket): bind to a particular address - (init_sockets): get all local addresses and bind to them all - - * lib/krb5/addr_families.c (addr2sockaddr, print_addr): new - methods - (find_af, find_atype): new functions. use them. - - * configure.in: add hesiod - -Wed Nov 25 11:37:48 1998 Johan Danielsson - - * lib/krb5/krb5_err.et: add some codes from kerberos-revisions-03 - -Mon Nov 23 12:53:48 1998 Assar Westerlund - - * lib/kadm5/log.c: rename delete -> remove - - * lib/kadm5/delete_s.c: rename delete -> remove - - * lib/hdb/common.c: rename delete -> remove - -Sun Nov 22 12:26:26 1998 Assar Westerlund - - * configure.in: check for environ and `struct spwd' - -Sun Nov 22 11:42:45 1998 Johan Danielsson - - * kdc/kerberos5.c (as_rep): set keytype to sess_ktype if - ktype_is_etype - - * lib/krb5/encrypt.c (krb5_keytype_to_etypes): zero terminate - etypes - (em): sort entries - -Sun Nov 22 06:54:48 1998 Assar Westerlund - - * lib/krb5/init_creds_pw.c: more type correctness - - * lib/krb5/get_cred.c: re-structure code. remove limits on ASN1 - generated bits. - -Sun Nov 22 01:49:50 1998 Johan Danielsson - - * kdc/hprop.c (v4_prop): fix bogus indexing - -Sat Nov 21 21:39:20 1998 Assar Westerlund - - * lib/krb5/verify_init.c (fail_verify_is_ok): new function - (krb5_verify_init_creds): if we cannot get a ticket for - host/`hostname` and fail_verify_is_ok just return. use - krb5_rd_req - -Sat Nov 21 23:12:27 1998 Assar Westerlund - - * lib/krb5/free.c (krb5_xfree): new function - - * lib/krb5/creds.c (krb5_free_creds_contents): new function - - * lib/krb5/context.c: more type correctness - - * lib/krb5/checksum.c: more type correctness - - * lib/krb5/auth_context.c (krb5_auth_con_init): more type - correctness - - * lib/asn1/der_get.c (der_get_length): fix test of len - (der_get_tag): more type correctness - - * kuser/klist.c (usage): void-ize - - * admin/ktutil.c (kt_remove): some more type correctness. - -Sat Nov 21 16:49:20 1998 Johan Danielsson - - * kuser/klist.c: try to list enctypes as keytypes - - * kuser/kinit.c: remove extra `--cache' option, add `--enctypes' - to set list of enctypes to use - - * kadmin/load.c: load strings as hex - - * kadmin/dump.c: dump hex as string is possible - - * admin/ktutil.c: use print_version() - - * configure.in, acconfig.h: test for hesiod - -Sun Nov 15 17:28:19 1998 Johan Danielsson - - * lib/krb5/crypto.c: add some crypto debug code - - * lib/krb5/get_in_tkt.c (_krb5_extract_ticket): don't use fixed - buffer when encoding ticket - - * lib/krb5/auth_context.c (re-)implement `krb5_auth_setenctype' - - * kdc/kerberos5.c: allow mis-match of tgt session key, and service - session key - - * admin/ktutil.c: keytype -> enctype - -Fri Nov 13 05:35:48 1998 Assar Westerlund - - * lib/krb5/krb5.h (KRB5_TGS_NAME, KRB5_TGS_NAME_SIZE): added - -Sat Nov 7 19:56:31 1998 Assar Westerlund - - * lib/krb5/get_cred.c (add_cred): add termination NULL pointer - -Mon Nov 2 01:15:06 1998 Assar Westerlund - - * lib/krb5/rd_req.c: adapt to new crypto api - - * lib/krb5/rd_rep.c: adapt to new crypto api - - * lib/krb5/rd_priv.c: adopt to new crypto api - - * lib/krb5/rd_cred.c: adopt to new crypto api - - * lib/krb5/principal.c: ENOMEM -> ERANGE - - * lib/krb5/mk_safe.c: cleanup and adopt to new crypto api - - * lib/krb5/mk_req_ext.c: adopt to new crypto api - - * lib/krb5/mk_req.c: get enctype from auth_context keyblock - - * lib/krb5/mk_rep.c: cleanup and adopt to new crypto api - - * lib/krb5/mk_priv.c: adopt to new crypto api - - * lib/krb5/keytab.c: adopt to new crypto api - - * lib/krb5/get_in_tkt_with_skey.c: adopt to new crypto api - - * lib/krb5/get_in_tkt_with_keytab.c: adopt to new crypto api - - * lib/krb5/get_in_tkt_pw.c: adopt to new crypto api - - * lib/krb5/get_in_tkt.c: adopt to new crypto api - - * lib/krb5/get_cred.c: adopt to new crypto api - - * lib/krb5/generate_subkey.c: use new crypto api - - * lib/krb5/context.c: rename etype functions to enctype ditto - - * lib/krb5/build_auth.c: use new crypto api - - * lib/krb5/auth_context.c: remove enctype and cksumtype from - auth_context - -Mon Nov 2 01:15:06 1998 Assar Westerlund - - * kdc/connect.c (handle_udp, handle_tcp): correct type of `n' - -Tue Sep 15 18:41:38 1998 Johan Danielsson - - * admin/ktutil.c: fix printing of unrecognized keytypes - -Tue Sep 15 17:02:33 1998 Johan Danielsson - - * lib/kadm5/set_keys.c: add KEYTYPE_USE_AFS3_SALT to keytype if - using AFS3 salt - -Tue Aug 25 23:30:52 1998 Assar Westerlund - - * lib/krb5/send_to_kdc.c (krb5_sendto_kdc): care about - `use_admin_kdc' - - * lib/krb5/changepw.c (get_kdc_address): use - krb5_get_krb_admin_hst - - * lib/krb5/krbhst.c (krb5_get_krb_admin_hst): new function - - * lib/krb5/krb5.h (krb5_context_data): add `use_admin_kdc' - - * lib/krb5/context.c (krb5_get_use_admin_kdc, - krb5_set_use_admin_kdc): new functions - -Tue Aug 18 22:24:12 1998 Johan Danielsson - - * lib/krb5/crypto.c: remove all calls to abort(); check return - value from _key_schedule; - (RSA_MD[45]_DES_verify): zero tmp and res; - (RSA_MD5_DES3_{verify,checksum}): implement - -Mon Aug 17 20:18:46 1998 Assar Westerlund - - * kdc/kerberos4.c (swap32): conditionalize - - * lib/krb5/mk_req_ext.c (krb5_mk_req_internal): new function - - * lib/krb5/get_host_realm.c (krb5_get_host_realm): if the hostname - returned from gethostby*() isn't a FQDN, try with the original - hostname - - * lib/krb5/get_cred.c (make_pa_tgs_req): use krb5_mk_req_internal - and correct key usage - - * lib/krb5/crypto.c (verify_checksum): make static - - * admin/ktutil.c (kt_list): use krb5_enctype_to_string - -Sun Aug 16 20:57:56 1998 Assar Westerlund - - * kadmin/cpw.c (do_cpw_entry): use asprintf for the prompt - - * kadmin/ank.c (ank): print principal name in prompt - - * lib/krb5/crypto.c (hmac): always allocate space for checksum. - never trust c.checksum.length - (_get_derived_key): try to return the derived key - -Sun Aug 16 19:48:42 1998 Johan Danielsson - - * lib/krb5/crypto.c (hmac): fix some peculiarities and bugs - (get_checksum_key): assume usage is `formatted' - (create_checksum,verify_checksum): moved the guts of the krb5_* - functions here, both take `formatted' key-usages - (encrypt_internal_derived): fix various bogosities - (derive_key): drop key_type parameter (already given by the - encryption_type) - - * kdc/kerberos5.c (check_flags): handle case where client is NULL - - * kdc/connect.c (process_request): return zero after processing - kerberos 4 request - -Sun Aug 16 18:38:15 1998 Johan Danielsson - - * lib/krb5/crypto.c: merge x-*.[ch] into one file - - * lib/krb5/cache.c: remove residual from krb5_ccache_data - -Fri Aug 14 16:28:23 1998 Johan Danielsson - - * lib/krb5/x-crypto.c (derive_key): move DES3 specific code to - separate function (will eventually end up someplace else) - - * lib/krb5/x-crypto.c (krb5_string_to_key_derived): allocate key - - * configure.in, acconfig.h: test for four valued krb_put_int - -Thu Aug 13 23:46:29 1998 Assar Westerlund - - * Release 0.0t - -Thu Aug 13 22:40:17 1998 Assar Westerlund - - * lib/krb5/config_file.c (parse_binding): remove trailing - whitespace - -Wed Aug 12 20:15:11 1998 Johan Danielsson - - * lib/krb5/x-checksum.c (krb5_verify_checksum): pass checksum type - to krb5_create_checksum - - * lib/krb5/x-key.c: implement DES3_string_to_key_derived; fix a - few typos - -Wed Aug 5 12:39:54 1998 Assar Westerlund - - * Release 0.0s - -Thu Jul 30 23:12:17 1998 Assar Westerlund - - * lib/krb5/mk_error.c (krb5_mk_error): realloc until you die - -Thu Jul 23 19:49:03 1998 Johan Danielsson - - * kdc/kdc_locl.h: proto for `get_des_key' - - * configure.in: test for four valued el_init - - * kuser/klist.c: keytype -> enctype - - * kpasswd/kpasswdd.c (change): use new `krb5_string_to_key*' - - * kdc/hprop.c (v4_prop, ka_convert): convert to a set of keys - - * kdc/kaserver.c: use `get_des_key' - - * kdc/524.c: use new crypto api - - * kdc/kerberos4.c: use new crypto api - - * kdc/kerberos5.c: always treat keytypes as enctypes; use new - crypto api - - * kdc/kstash.c: adapt to new crypto api - - * kdc/string2key.c: adapt to new crypto api - - * admin/srvconvert.c: add keys for all possible enctypes - - * admin/ktutil.c: keytype -> enctype - - * lib/gssapi/init_sec_context.c: get enctype from auth_context - keyblock - - * lib/hdb/hdb.c: remove hdb_*_keytype2key - - * lib/kadm5/set_keys.c: adapt to new crypto api - - * lib/kadm5/rename_s.c: adapt to new crypto api - - * lib/kadm5/get_s.c: adapt to new crypto api - - * lib/kadm5/create_s.c: add keys for des-cbc-crc, des-cbc-md4, - des-cbc-md5, and des3-cbc-sha1 - - * lib/krb5/heim_err.et: error message for unsupported salt - - * lib/krb5/codec.c: short-circuit these functions, since they are - not needed any more - - * lib/krb5/rd_safe.c: cleanup and adapt to new crypto api - -Mon Jul 13 23:00:59 1998 Assar Westerlund - - * lib/krb5/send_to_kdc.c (krb5_sendto_kdc): don't advance - hostent->h_addr_list, use a copy instead - -Mon Jul 13 15:00:31 1998 Johan Danielsson - - * lib/krb5/config_file.c (parse_binding, parse_section): make sure - everything is ok before adding to linked list - - * lib/krb5/config_file.c: skip ws before checking for comment - -Wed Jul 8 10:45:45 1998 Johan Danielsson - - * lib/asn1/k5.asn1: hmac-sha1-des3 = 12 - -Tue Jun 30 18:08:05 1998 Assar Westerlund - - * lib/krb5/send_to_kdc.c (krb5_sendto_kdc): do not close the - unopened file - - * lib/krb5/mk_priv.c: realloc correctly - - * lib/krb5/get_addrs.c (find_all_addresses): init j - - * lib/krb5/context.c (krb5_init_context): print error if parsing - of config file produced an error. - - * lib/krb5/config_file.c (parse_list, krb5_config_parse_file): - ignore more spaces - - * lib/krb5/codec.c (krb5_encode_EncKrbCredPart, - krb5_encode_ETYPE_INFO): initialize `ret' - - * lib/krb5/build_auth.c (krb5_build_authenticator): realloc - correctly - - * lib/kadm5/set_keys.c (_kadm5_set_keys): initialize `ret' - - * lib/kadm5/init_c.c (get_cred_cache): try to do the right thing - with default_client - - * kuser/kinit.c (main): initialize `ticket_life' - - * kdc/kerberos5.c (get_pa_etype_info): initialize `ret' - (tgs_rep2): initialize `krbtgt' - - * kdc/connect.c (do_request): check for errors from `sendto' - - * kdc/524.c (do_524): initialize `ret' - - * kadmin/util.c (foreach_principal): don't clobber `ret' - - * kadmin/del.c (del_entry): don't apply on zeroth argument - - * kadmin/cpw.c (do_cpw_entry): initialize `ret' - -Sat Jun 13 04:14:01 1998 Assar Westerlund - - * Release 0.0r - -Sun Jun 7 04:13:14 1998 Assar Westerlund - - * lib/krb5/addr_families.c: fall-back definition of - IN6_ADDR_V6_TO_V4 - - * configure.in: only set CFLAGS if it wasn't set look for - dn_expand and res_search - -Mon Jun 1 21:28:07 1998 Assar Westerlund - - * configure.in: remove duplicate seteuid - -Sat May 30 00:19:51 1998 Johan Danielsson - - * lib/krb5/convert_creds.c: import _krb_time_to_life, to avoid - runtime dependencies on libkrb with some shared library - implementations - -Fri May 29 00:09:02 1998 Johan Danielsson - - * kuser/kinit_options.c: Default options for kinit. - - * kuser/kauth_options.c: Default options for kauth. - - * kuser/kinit.c: Implement lots a new options. - - * kdc/kerberos5.c (check_tgs_flags): make sure kdc-req-body->rtime - is not NULL; set endtime to min of new starttime + old_life, and - requested endtime - - * lib/krb5/init_creds_pw.c (get_init_creds_common): if the - forwardable or proxiable flags are set in options, set the - kdc-flags to the value specified, and not always to one - -Thu May 28 21:28:06 1998 Johan Danielsson - - * kdc/kerberos5.c: Optionally compare client address to addresses - in ticket. - - * kdc/connect.c: Pass client address to as_rep() and tgs_rep(). - - * kdc/config.c: Add check_ticket_addresses, and - allow_null_ticket_addresses variables. - -Tue May 26 14:03:42 1998 Johan Danielsson - - * lib/kadm5/create_s.c: possibly make DES keys version 4 salted - - * lib/kadm5/set_keys.c: check config file for kadmin/use_v4_salt - before zapping version 4 salts - -Sun May 24 05:22:17 1998 Assar Westerlund - - * Release 0.0q - - * lib/krb5/aname_to_localname.c: new file - - * lib/gssapi/init_sec_context.c (repl_mutual): no output token - - * lib/gssapi/display_name.c (gss_display_name): zero terminate - output. - -Sat May 23 19:11:07 1998 Assar Westerlund - - * lib/gssapi/display_status.c: new file - - * Makefile.am: send -I to aclocal - - * configure.in: remove duplicate setenv - -Sat May 23 04:55:19 1998 Johan Danielsson - - * kadmin/util.c (foreach_principal): Check for expression before - wading through the whole database. - - * kadmin/kadmin.c: Pass NULL password to - kadm5_*_init_with_password. - - * lib/kadm5/init_c.c: Implement init_with_{skey,creds}*. Make use - of `password' parameter to init_with_password. - - * lib/kadm5/init_s.c: implement init_with_{skey,creds}* - - * lib/kadm5/server.c: Better arguments for - kadm5_init_with_password. - -Sat May 16 07:10:36 1998 Assar Westerlund - - * kdc/hprop.c: conditionalize ka-server reading support on - KASERVER_DB - - * configure.in: new option `--enable-kaserver-db' - -Fri May 15 19:39:18 1998 Johan Danielsson - - * lib/krb5/get_cred.c: Better error if local tgt couldn't be - found. - -Tue May 12 21:11:02 1998 Assar Westerlund - - * Release 0.0p - - * lib/krb5/mk_req_ext.c (krb5_mk_req_extended): only set - encryption type in auth_context if it's compatible with the type - of the session key - -Mon May 11 21:11:14 1998 Johan Danielsson - - * kdc/hprop.c: add support for ka-server databases - - * appl/ftp/ftpd: link with -lcrypt, if needed - -Fri May 1 07:29:52 1998 Assar Westerlund - - * configure.in: don't test for winsock.h - -Sat Apr 18 21:43:11 1998 Johan Danielsson - - * Release 0.0o - -Sat Apr 18 00:31:11 1998 Johan Danielsson - - * lib/krb5/sock_principal.c: Save hostname. - -Sun Apr 5 11:29:45 1998 Johan Danielsson - - * lib/krb5/mk_req_ext.c: Use same enctype as in ticket. - - * kdc/hprop.c (v4_prop): Check for null key. - -Fri Apr 3 03:54:54 1998 Johan Danielsson - - * lib/krb5/str2key.c: Fix DES3 string-to-key. - - * lib/krb5/keytab.c: Get default keytab name from context. - - * lib/krb5/context.c: Get `default_keytab_name' value. - - * kadmin/util.c (foreach_principal): Print error message if - `kadm5_get_principals' fails. - - * kadmin/kadmind.c: Use `kadmind_loop'. - - * lib/kadm5/server.c: Replace several other functions with - `kadmind_loop'. - -Sat Mar 28 09:49:18 1998 Assar Westerlund - - * lib/krb5/keytab.c (fkt_add_entry): use an explicit seek instead - of O_APPEND - - * configure.in: generate ftp Makefiles - - * kuser/klist.c (print_cred_verbose): print IPv4-address in a - portable way. - - * admin/srvconvert.c (srvconv): return 0 if successful - -Tue Mar 24 00:40:33 1998 Johan Danielsson - - * lib/krb5/keytab.c: MIT compatible changes: add and use sizes to - keytab entries, and change default keytab to `/etc/krb5.keytab'. - -Mon Mar 23 23:43:59 1998 Johan Danielsson - - * lib/gssapi/wrap.c: Use `gss_krb5_getsomekey'. - - * lib/gssapi/unwrap.c: Implement and use `gss_krb5_getsomekey'. - Fix bug in checking of pad. - - * lib/gssapi/{un,}wrap.c: Add support for just integrity - protecting data. - - * lib/gssapi/accept_sec_context.c: Use - `gssapi_krb5_verify_8003_checksum'. - - * lib/gssapi/8003.c: Implement `gssapi_krb5_verify_8003_checksum'. - - * lib/gssapi/init_sec_context.c: Zero cred, and store session key - properly in auth-context. - -Sun Mar 22 00:47:22 1998 Johan Danielsson - - * lib/kadm5/delete_s.c: Check immutable bit. - - * kadmin/kadmin.c: Pass client name to kadm5_init. - - * lib/kadm5/init_c.c: Get creds for client name passed in. - - * kdc/hprop.c (v4_prop): Check for `changepw.kerberos'. - -Sat Mar 21 22:57:13 1998 Johan Danielsson - - * lib/krb5/mk_error.c: Verify that error_code is in the range - [0,127]. - - * kdc/kerberos5.c: Move checking of principal flags to new - function `check_flags'. - -Sat Mar 21 14:38:51 1998 Assar Westerlund - - * lib/kadm5/get_s.c (kadm5_s_get_principal): handle an empty salt - - * configure.in: define SunOS if running solaris - -Sat Mar 21 00:26:34 1998 Johan Danielsson - - * lib/kadm5/server.c: Unifdef test for same principal when - changing password. - - * kadmin/util.c: If kadm5_get_principals failes, we might still be - able to perform the requested opreration (for instance someone if - trying to change his own password). - - * lib/kadm5/init_c.c: Try to get ticket via initial request, if - not possible via tgt. - - * lib/kadm5/server.c: Check for principals changing their own - passwords. - - * kdc/kerberos5.c (tgs_rep2): check for interesting flags on - involved principals. - - * kadmin/util.c: Fix order of flags. - -Thu Mar 19 16:54:10 1998 Johan Danielsson - - * kdc/kerberos4.c: Return sane error code if krb_rd_req fails. - -Wed Mar 18 17:11:47 1998 Assar Westerlund - - * acconfig.h: rename HAVE_STRUCT_SOCKADDR_IN6 to HAVE_IPV6 - -Wed Mar 18 09:58:18 1998 Johan Danielsson - - * lib/krb5/get_in_tkt_with_keytab.c (krb5_keytab_key_proc): don't - free keyseed; use correct keytab - -Tue Mar 10 09:56:16 1998 Assar Westerlund - - * acinclude.m4 (AC_KRB_IPV6): rewrote to avoid false positives - -Mon Mar 16 23:58:23 1998 Johan Danielsson - - * Release 0.0n - -Fri Mar 6 00:41:30 1998 Johan Danielsson - - * lib/gssapi/{accept_sec_context,release_cred}.c: Use - krb5_kt_close/krb5_kt_resolve. - - * lib/krb5/principal.c (krb5_425_conv_principal_ext): Use resolver - to lookup hosts, so CNAMEs can be ignored. - - * lib/krb5/send_to_kdc.c (krb5_sendto_kdc, send_and_recv_http): - Add support for using proxy. - - * lib/krb5/context.c: Initialize `http_proxy' from - `libdefaults/http_proxy'. - - * lib/krb5/krb5.h: Add `http_proxy' to context. - - * lib/krb5/send_to_kdc.c: Recognize `http/' and `udp/' as protocol - specifications. - -Wed Mar 4 01:47:29 1998 Johan Danielsson - - * admin/ktutil.c: Implement `add' and `remove' functions. Make - `--keytab' a global option. - - * lib/krb5/keytab.c: Implement remove with files. Add memory - operations. - -Tue Mar 3 20:09:59 1998 Johan Danielsson - - * lib/krb5/keytab.c: Use function pointers. - - * admin: Remove kdb_edit. - -Sun Mar 1 03:28:42 1998 Assar Westerlund - - * lib/kadm5/dump_log.c: print operation names - -Sun Mar 1 03:04:12 1998 Assar Westerlund - - * configure.in: add X-tests, and {bin,...}dir appl/{kx,kauth} - - * lib/krb5/build_auth.c,mk_priv.c,rd_safe.c,mk_safe.c,mk_rep.c: - remove arbitrary limit - - * kdc/hprop-common.c: use krb5_{read,write}_message - - * lib/kadm5/ipropd_master.c (send_diffs): more careful use - krb5_{write,read}_message - - * lib/kadm5/ipropd_slave.c (get_creds): get credentials for - `iprop/master' directly. - (main): use `krb5_read_message' - -Sun Mar 1 02:05:11 1998 Johan Danielsson - - * kadmin/kadmin.c: Cleanup commands list, and add help strings. - - * kadmin/get.c: Add long, short, and terse (equivalent to `list') - output formats. Short is the default. - - * kadmin/util.c: Add `include_time' flag to timeval2str. - - * kadmin/init.c: Max-life and max-renew can, infact, be zero. - - * kadmin/{cpw,del,ext,get}.c: Use `foreach_principal'. - - * kadmin/util.c: Add function `foreach_principal', that loops over - all principals matching an expression. - - * kadmin/kadmin.c: Add usage string to `privileges'. - - * lib/kadm5/get_princs_s.c: Also try to match aganist the - expression appended with `@default-realm'. - - * lib/krb5/principal.c: Add `krb5_unparse_name_fixed_short', that - excludes the realm if it's the same as the default realm. - -Fri Feb 27 05:02:21 1998 Assar Westerlund - - * configure.in: more WFLAGS and WFLAGS_NOUNUSED added missing - headers and functions error -> com_err - - (krb5_get_init_creds_keytab): use krb5_keytab_key_proc - - * lib/krb5/get_in_tkt_with_keytab.c: make `krb5_keytab_key_proc' - global - - * lib/kadm5/marshall.c (ret_principal_ent): set `n_tl_data' - - * lib/hdb/ndbm.c: use `struct ndbm_db' everywhere. - -Fri Feb 27 04:49:24 1998 Assar Westerlund - - * lib/krb5/mk_priv.c (krb5_mk_priv): bump static limit to 10240. - This should be fixed the correct way. - - * lib/kadm5/ipropd_master.c (check_acl:) truncate buf correctly - (send_diffs): compare versions correctly - (main): reorder handling of events - - * lib/kadm5/log.c (kadm5_log_previous): avoid bad type conversion - -Thu Feb 26 02:22:35 1998 Assar Westerlund - - * lib/kadm5/ipropd_{slave,master}.c: new files - - * lib/kadm5/log.c (kadm5_log_get_version): take an `fd' as - argument - - * lib/krb5/krb5.h (krb5_context_data): `et_list' should be `struct - et_list *' - - * aux/make-proto.pl: Should work with perl4 - -Mon Feb 16 17:20:22 1998 Johan Danielsson - - * lib/krb5/krb5_locl.h: Remove (it gets included via - {asn1,krb5}_err.h). - -Thu Feb 12 03:28:40 1998 Assar Westerlund - - * lib/krb5/get_in_tkt.c (_krb5_extract_ticket): if time difference - is larger than max_skew, return KRB5KRB_AP_ERR_SKEW - - * lib/kadm5/log.c (get_version): globalize - - * lib/kadm5/kadm5_locl.h: include - - * lib/asn1/Makefile.am: add PA_KEY_INFO and PA_KEY_INFO_ENTRY - - * kdc/kerberos5.c (get_pa_etype_info): remove gcc-ism of - initializing local struct in declaration. - -Sat Jan 31 17:28:58 1998 Johan Danielsson - - * kdc/524.c: Use krb5_decode_EncTicketPart. - - * kdc/kerberos5.c: Check at runtime whether to use enctypes - instead of keytypes. If so use the same value to encrypt ticket, - and kdc-rep as well as `keytype' for session key. Fix some obvious - bugs with the handling of additional tickets. - - * lib/krb5/rd_req.c: Use krb5_decode_EncTicketPart, and - krb5_decode_Authenticator. - - * lib/krb5/rd_rep.c: Use krb5_decode_EncAPRepPart. - - * lib/krb5/rd_cred.c: Use krb5_decode_EncKrbCredPart. - - * lib/krb5/mk_rep.c: Make sure enc_part.etype is an encryption - type, and not a key type. Use krb5_encode_EncAPRepPart. - - * lib/krb5/init_creds_pw.c: Use krb5_decode_PA_KEY_INFO. - - * lib/krb5/get_in_tkt.c: Use krb5_decode_Enc{AS,TGS}RepPart. - - * lib/krb5/get_for_creds.c: Use krb5_encode_EncKrbCredPart. - - * lib/krb5/get_cred.c: Use krb5_decode_Enc{AS,TGS}RepPart. - - * lib/krb5/build_auth.c: Use krb5_encode_Authenticator. - - * lib/krb5/codec.c: Enctype conversion stuff. - - * lib/krb5/context.c: Ignore KRB5_CONFIG if *not* running - setuid. Get configuration for libdefaults ktype_is_etype, and - default_etypes. - - * lib/krb5/encrypt.c: Add krb5_string_to_etype, rename - krb5_convert_etype to krb5_decode_keytype, and add - krb5_decode_keyblock. - -Fri Jan 23 00:32:09 1998 Johan Danielsson - - * lib/krb5/{get_in_tkt,rd_req}.c: Use krb5_convert_etype. - - * lib/krb5/encrypt.c: Add krb5_convert_etype function - converts - from protocol keytypes (that really are enctypes) to internal - representation. - -Thu Jan 22 21:24:36 1998 Johan Danielsson - - * lib/asn1/k5.asn1: Add PA-KEY-INFO structure to hold information - on keys in the database; and also a new `pa-key-info' padata-type. - - * kdc/kerberos5.c: If pre-authentication fails, return a list of - keytypes, salttypes, and salts. - - * lib/krb5/init_creds_pw.c: Add better support for - pre-authentication, by looking at hints from the KDC. - - * lib/krb5/get_in_tkt.c: Add better support for specifying what - pre-authentication to use. - - * lib/krb5/str2key.c: Merge entries for KEYTYPE_DES and - KEYTYPE_DES_AFS3. - - * lib/krb5/krb5.h: Add pre-authentication structures. - - * kdc/connect.c: Don't fail if realloc(X, 0) returns NULL. - -Wed Jan 21 06:20:40 1998 Assar Westerlund - - * lib/kadm5/init_s.c (kadm5_s_init_with_password_ctx): initialize - `log_context.socket_name' and `log_context.socket_fd' - - * lib/kadm5/log.c (kadm5_log_flush): send a unix domain datagram - to inform the possible running ipropd of an update. - -Wed Jan 21 01:34:09 1998 Johan Danielsson - - * lib/krb5/get_in_tkt.c: Return error-packet to caller. - - * lib/krb5/free.c (krb5_free_kdc_rep): Free krb5_kdc_rep->error. - - * kdc/kerberos5.c: Add some support for using enctypes instead of - keytypes. - - * lib/krb5/get_cred.c: Fixes to send authorization-data to the - KDC. - - * lib/krb5/build_auth.c: Only generate local subkey if there is - none. - - * lib/krb5/krb5.h: Add krb5_authdata type. - - * lib/krb5/auth_context.c: Add - krb5_auth_con_set{,localsub,remotesub}key. - - * lib/krb5/init_creds_pw.c: Return some error if prompter - functions return failure. - -Wed Jan 21 01:16:13 1998 Assar Westerlund - - * kpasswd/kpasswd.c: detect bad password. use krb5_err. - - * kadmin/util.c (edit_entry): remove unused variables - -Tue Jan 20 22:58:31 1998 Assar Westerlund - - * kuser/kinit.c: rename `-s' to `-S' to be MIT-compatible. - - * lib/kadm5/kadm5_locl.h: add kadm5_log_context and - kadm5_log*-functions - - * lib/kadm5/create_s.c (kadm5_s_create_principal): add change to - log - - * lib/kadm5/rename_s.c (kadm5_s_rename_principal): add change to - log - - * lib/kadm5/init_s.c (kadm5_s_init_with_password_ctx): initialize - log_context - - * lib/kadm5/delete_s.c (kadm5_s_delete_principal): add change to - log - - * lib/kadm5/modify_s.c (kadm5_s_modify_principal): add change to - log - - * lib/kadm5/randkey_s.c (kadm5_s_randkey_principal): add change to - log - - * lib/kadm5/chpass_s.c (kadm5_s_chpass_principal): add change to - log - - * lib/kadm5/Makefile.am: add log.c, dump_log and replay_log - - * lib/kadm5/replay_log.c: new file - - * lib/kadm5/dump_log.c: new file - - * lib/kadm5/log.c: new file - - * lib/krb5/str2key.c (get_str): initialize pad space to zero - - * lib/krb5/config_file.c (krb5_config_vget_next): handle c == NULL - - * kpasswd/kpasswdd.c: rewritten to use the kadm5 API - - * kpasswd/Makefile.am: link with kadm5srv - - * kdc/kerberos5.c (tgs_rep): initialize `i' - - * kadmin/kadmind.c (main): use kadm5_server_{send,recv}_sp - - * include/Makefile.am: added admin.h - -Sun Jan 18 01:41:34 1998 Johan Danielsson - - * lib/asn1/gen_copy.c: Don't return ENOMEM if allocating 0 bytes. - - * lib/krb5/mcache.c (mcc_store_cred): restore linked list if - copy_creds fails. - -Tue Jan 6 04:17:56 1998 Assar Westerlund - - * lib/kadm5/server.c: add kadm5_server_{send,recv}{,_sp} - - * lib/kadm5/marshall.c: add kadm5_{store,ret}_principal_ent_mask. - - * lib/kadm5/init_c.c (kadm5_c_init_with_password_ctx): use - krb5_getportbyname - - * kadmin/kadmind.c (main): htons correctly. - moved kadm5_server_{recv,send} - - * kadmin/kadmin.c (main): only set admin_server if explicitly - given - -Mon Jan 5 23:34:44 1998 Johan Danielsson - - * lib/hdb/ndbm.c: Implement locking of database. - - * kdc/kerberos5.c: Process AuthorizationData. - -Sat Jan 3 22:07:07 1998 Johan Danielsson - - * kdc/string2key.c: Use AFS string-to-key from libkrb5. - - * lib/krb5/get_in_tkt.c: Handle pa-afs3-salt case. - - * lib/krb5/krb5.h: Add value for AFS salts. - - * lib/krb5/str2key.c: Add support for AFS string-to-key. - - * lib/kadm5/rename_s.c: Use correct salt. - - * lib/kadm5/ent_setup.c: Always enable client. Only set max-life - and max-renew if != 0. - - * lib/krb5/config_file.c: Add context to all krb5_config_*get_*. - -Thu Dec 25 17:03:25 1997 Assar Westerlund - - * kadmin/ank.c (ank): don't zero password if --random-key was - given. - -Tue Dec 23 01:56:45 1997 Assar Westerlund - - * Release 0.0m - - * lib/kadm5/ent_setup.c (attr_to_flags): try to set `client' - - * kadmin/util.c (edit_time): only set mask if != 0 - (edit_attributes): only set mask if != 0 - - * kadmin/init.c (init): create `default' - -Sun Dec 21 09:44:05 1997 Assar Westerlund - - * kadmin/util.c (str2deltat, str2attr, get_deltat): return value - as pointer and have return value indicate success. - - (get_response): check NULL from fgets - - (edit_time, edit_attributes): new functions for reading values and - offering list of answers on '?' - - (edit_entry): use edit_time and edit_attributes - - * kadmin/ank.c (add_new_key): test the return value of - `krb5_parse_name' - - * kdc/kerberos5.c (tgs_check_authenticator): RFC1510 doesn't say - that the checksum has to be keyed, even though later drafts do. - Accept unkeyed checksums to be compatible with MIT. - - * kadmin/kadmin_locl.h: add some prototypes. - - * kadmin/util.c (edit_entry): return a value - - * appl/afsutil/afslog.c (main): return a exit code. - - * lib/krb5/get_cred.c (init_tgs_req): use krb5_keytype_to_enctypes - - * lib/krb5/encrypt.c (krb5_keytype_to_enctypes): new function. - - * lib/krb5/build_auth.c (krb5_build_authenticator): use - krb5_{free,copy}_keyblock instead of the _contents versions - -Fri Dec 12 14:20:58 1997 Johan Danielsson - - * lib/krb5/{mk,rd}_priv.c: fix check for local/remote subkey - -Mon Dec 8 08:48:09 1997 Johan Danielsson - - * lib/krb5/context.c: don't look at KRB5_CONFIG if running setuid - -Sat Dec 6 10:09:40 1997 Johan Danielsson - - * lib/krb5/keyblock.c (krb5_free_keyblock): check for NULL - keyblock - -Sat Dec 6 08:26:10 1997 Assar Westerlund - - * Release 0.0l - -Thu Dec 4 03:38:12 1997 Johan Danielsson - - * lib/krb5/send_to_kdc.c: Add TCP client support. - - * lib/krb5/store.c: Add k_{put,get}_int. - - * kadmin/ank.c: Set initial kvno to 1. - - * kdc/connect.c: Send version 5 TCP-reply as length+data. - -Sat Nov 29 07:10:11 1997 Assar Westerlund - - * lib/krb5/rd_req.c (krb5_rd_req): fixed obvious bug - - * kdc/kaserver.c (create_reply_ticket): use a random nonce in the - reply packet. - - * kdc/connect.c (init_sockets): less reallocing. - - * **/*.c: changed `struct fd_set' to `fd_set' - -Sat Nov 29 05:12:01 1997 Johan Danielsson - - * lib/krb5/get_default_principal.c: More guessing. - -Thu Nov 20 02:55:09 1997 Johan Danielsson - - * lib/krb5/rd_req.c: Use principal from ticket if no server is - given. - -Tue Nov 18 02:58:02 1997 Johan Danielsson - - * kuser/klist.c: Use krb5_err*(). - -Sun Nov 16 11:57:43 1997 Johan Danielsson - - * kadmin/kadmin.c: Add local `init', `load', `dump', and `merge' - commands. - -Sun Nov 16 02:52:20 1997 Assar Westerlund - - * lib/krb5/mk_req_ext.c (krb5_mk_req_ext): figure out the correct - `enctype' - - * lib/krb5/mk_req.c (krb5_mk_req): use `(*auth_context)->enctype' - if set. - - * lib/krb5/get_cred.c: handle the case of a specific keytype - - * lib/krb5/build_auth.c (krb5_build_authenticator): enctype as a - parameter instead of guessing it. - - * lib/krb5/build_ap_req.c (krb5_build_ap_req): new parameter - `enctype' - - * appl/test/common.c (common_setup): don't use `optarg' - - * lib/krb5/keytab.c (krb5_kt_copy_entry_contents): new function - (krb5_kt_get_entry): retrieve the latest version if kvno == 0 - - * lib/krb5/krb5.h: define KRB5_TC_MATCH_KEYTYPE - - * lib/krb5/creds.c (krb5_compare_creds): check for - KRB5_TC_MATCH_KEYTYPE - - * lib/gssapi/8003.c (gssapi_krb5_create_8003_checksum): remove - unused variable - - * lib/krb5/creds.c (krb5_copy_creds_contents): only free the - contents if we fail. - -Sun Nov 16 00:32:48 1997 Johan Danielsson - - * kpasswd/kpasswdd.c: Get password expiration time from config - file. - - * lib/asn1/{der_get,gen_decode}.c: Allow passing NULL size. - -Wed Nov 12 02:35:57 1997 Assar Westerlund - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): - restructured and fixed. - - * lib/krb5/addr_families.c (krb5_h_addr2addr): new function. - -Wed Nov 12 01:36:01 1997 Johan Danielsson - - * lib/krb5/get_addrs.c: Fall back to hostname's addresses if other - methods fail. - -Tue Nov 11 22:22:12 1997 Johan Danielsson - - * kadmin/kadmin.c: Add `-l' flag to use local database. - - * lib/kadm5/acl.c: Use KADM5_PRIV_ALL. - - * lib/kadm5: Use function pointer trampoline for easier dual use - (without radiation-hardening capability). - -Tue Nov 11 05:15:22 1997 Assar Westerlund - - * lib/krb5/encrypt.c (krb5_etype_valid): new function - - * lib/krb5/creds.c (krb5_copy_creds_contents): zero target - - * lib/krb5/context.c (valid_etype): remove - - * lib/krb5/checksum.c: remove dead code - - * lib/krb5/changepw.c (send_request): free memory on error. - - * lib/krb5/build_ap_req.c (krb5_build_ap_req): check return value - from malloc. - - * lib/krb5/auth_context.c (krb5_auth_con_init): free memory on - failure correctly. - (krb5_auth_con_setaddrs_from_fd): return error correctly. - - * lib/krb5/get_in_tkt_with_{keytab,skey}.c: new files - -Tue Nov 11 02:53:19 1997 Johan Danielsson - - * lib/krb5/auth_context.c: Implement auth_con_setuserkey. - - * lib/gssapi/init_sec_context.c: Use krb5_auth_con_getkey. - - * lib/krb5/keyblock.c: Rename krb5_free_keyblock to - krb5_free_keyblock_contents, and reimplement krb5_free_keyblock. - - * lib/krb5/rd_req.c: Use auth_context->keyblock if - ap_options.use_session_key. - -Tue Nov 11 02:35:17 1997 Assar Westerlund - - * lib/krb5/net_{read,write}.c: change `int fd' to `void *p_fd'. - fix callers. - - * lib/krb5/krb5_locl.h: include and - - * include/Makefile.am: add xdbm.h - -Tue Nov 11 01:58:22 1997 Johan Danielsson - - * lib/krb5/get_cred.c: Implement krb5_get_cred_from_kdc. - -Mon Nov 10 22:41:53 1997 Johan Danielsson - - * lib/krb5/ticket.c: Implement copy_ticket. - - * lib/krb5/get_in_tkt.c: Make `options' parameter MIT-compatible. - - * lib/krb5/data.c: Implement free_data and copy_data. - -Sun Nov 9 02:17:27 1997 Johan Danielsson - - * lib/kadm5: Implement kadm5_get_privs, and kadm5_get_principals. - - * kadmin/kadmin.c: Add get_privileges function. - - * lib/kadm5: Rename KADM5_ACL_* -> KADM5_PRIV_* to conform with - specification. - - * kdc/connect.c: Exit if no sockets could be bound. - - * kadmin/kadmind.c: Check return value from krb5_net_read(). - - * lib/kadm5,kadmin: Fix memory leaks. - -Fri Nov 7 02:45:26 1997 Johan Danielsson - - * lib/kadm5/create_s.c: Get some default values from `default' - principal. - - * lib/kadm5/ent_setup.c: Add optional default entry to get some - values from. - -Thu Nov 6 00:20:41 1997 Johan Danielsson - - * lib/error/compile_et.awk: Remove generated destroy_*_error_table - prototype - - * kadmin/kadmind.c: Crude admin server. - - * kadmin/kadmin.c: Update to use remote protocol. - - * kadmin/get.c: Fix principal formatting. - - * lib/kadm5: Add client support. - - * lib/kadm5/error.c: Error code mapping. - - * lib/kadm5/server.c: Kadmind support function. - - * lib/kadm5/marshall.c: Kadm5 marshalling. - - * lib/kadm5/acl.c: Simple acl system. - - * lib/kadm5/kadm5_locl.h: Add client stuff. - - * lib/kadm5/init_s.c: Initialize acl. - - * lib/kadm5/*: Return values. - - * lib/kadm5/create_s.c: Correct kvno. - -Wed Nov 5 22:06:50 1997 Johan Danielsson - - * lib/krb5/log.c: Fix parsing of log destinations. - -Mon Nov 3 20:33:55 1997 Johan Danielsson - - * lib/krb5/principal.c: Reduce number of reallocs in unparse_name. - -Sat Nov 1 01:40:53 1997 Johan Danielsson - - * kadmin: Simple kadmin utility. - - * admin/ktutil.c: Print keytype. - - * lib/kadm5/get_s.c: Set correct n_key_data. - - * lib/kadm5/init_s.c: Add kadm5_s_init_with_password_ctx. Use - master key. - - * lib/kadm5/destroy_s.c: Check for allocated context. - - * lib/kadm5/{create,chpass}_s.c: Use _kadm5_set_keys(). - -Sat Nov 1 00:21:00 1997 Assar Westerlund - - * configure.in: test for readv, writev - -Wed Oct 29 23:41:26 1997 Assar Westerlund - - * lib/krb5/warn.c (_warnerr): handle the case of an illegal error - code - - * kdc/kerberos5.c (encode_reply): return success - -Wed Oct 29 18:01:59 1997 Johan Danielsson - - * kdc/kerberos5.c (find_etype) Return correct index of selected - etype. - -Wed Oct 29 04:07:06 1997 Assar Westerlund - - * Release 0.0k - - * lib/krb5/context.c (krb5_init_context): support `KRB5_CONFIG' - environment variable - - * *: use the roken_get*-macros from roken.h for the benefit of - Crays. - - * configure.in: add --{enable,disable}-otp. check for compatible - prototypes for gethostbyname, gethostbyaddr, getservbyname, and - openlog (they have strange prototypes on Crays) - - * acinclude.m4: new macro `AC_PROTO_COMPAT' - -Tue Oct 28 00:11:22 1997 Johan Danielsson - - * kdc/connect.c: Log bad requests. - - * kdc/kerberos5.c: Move stuff that's in common between as_rep and - tgs_rep to separate functions. - - * kdc/kerberos5.c: Fix user-to-user authentication. - - * lib/krb5/get_cred.c: Some restructuring of krb5_get_credentials: - - add a kdc-options argument to krb5_get_credentials, and rename - it to krb5_get_credentials_with_flags - - honour the KRB5_GC_CACHED, and KRB5_GC_USER_USER options - - add some more user-to-user glue - - * lib/krb5/rd_req.c: Move parts of krb5_verify_ap_req into a new - function, krb5_decrypt_ticket, so it is easier to decrypt and - check a ticket without having an ap-req. - - * lib/krb5/krb5.h: Add KRB5_GC_CACHED, and KRB5_GC_USER_USER - flags. - - * lib/krb5/crc.c (crc_init_table): Check if table is already - inited. - -Sun Oct 26 04:51:02 1997 Johan Danielsson - - * lib/asn1/der_get.c (der_get_length, fix_dce): Special-case - indefinite encoding. - - * lib/asn1/gen_glue.c (generate_units): Check for empty - member-list. - -Sat Oct 25 07:24:57 1997 Johan Danielsson - - * lib/error/compile_et.awk: Allow specifying table-base. - -Tue Oct 21 20:21:40 1997 Johan Danielsson - - * kdc/kerberos5.c: Check version number of krbtgt. - -Mon Oct 20 01:14:53 1997 Assar Westerlund - - * lib/krb5/prompter_posix.c (krb5_prompter_posix): implement the - case of unhidden prompts. - - * lib/krb5/str2key.c (string_to_key_internal): return error - instead of aborting. always free memory - - * admin/ktutil.c: add `help' command - - * admin/kdb_edit.c: implement new commands: add_random_key(ark), - change_password(cpw), change_random_key(crk) - -Thu Oct 16 05:16:36 1997 Assar Westerlund - - * kpasswd/kpasswdd.c: change all the keys in the database - - * kdc: removed all unsealing, now done by the hdb layer - - * lib/hdb/hdb.c: new functions `hdb_create', `hdb_set_master_key' - and `hdb_clear_master_key' - - * admin/misc.c: removed - -Wed Oct 15 22:47:31 1997 Assar Westerlund - - * kuser/klist.c: print year as YYYY iff verbose - -Wed Oct 15 20:02:13 1997 Johan Danielsson - - * kuser/klist.c: print etype from ticket - -Mon Oct 13 17:18:57 1997 Johan Danielsson - - * Release 0.0j - - * lib/krb5/get_cred.c: Get the subkey from mk_req so it can be - used to decrypt the reply from DCE secds. - - * lib/krb5/auth_context.c: Add {get,set}enctype. - - * lib/krb5/get_cred.c: Fix for DCE secd. - - * lib/krb5/store.c: Store keytype twice, as MIT does. - - * lib/krb5/get_in_tkt.c: Use etype from reply. - -Fri Oct 10 00:39:48 1997 Johan Danielsson - - * kdc/connect.c: check for leading '/' in http request - -Tue Sep 30 21:50:18 1997 Assar Westerlund - - * Release 0.0i - -Mon Sep 29 15:58:43 1997 Assar Westerlund - - * lib/krb5/rd_req.c (krb5_rd_req): redone because we don't know - the kvno or keytype before receiving the AP-REQ - - * lib/krb5/mk_safe.c (krb5_mk_safe): figure out what cksumtype to - use from the keytype. - - * lib/krb5/mk_req_ext.c (krb5_mk_req_extended): figure out what - cksumtype to use from the keytype. - - * lib/krb5/mk_priv.c (krb5_mk_priv): figure out what etype to use - from the keytype. - - * lib/krb5/keytab.c (krb5_kt_get_entry): check the keytype - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): figure out - what etype to use from the keytype. - - * lib/krb5/generate_seq_number.c (krb5_generate_seq_number): - handle other key types than DES - - * lib/krb5/encrypt.c (key_type): add `best_cksumtype' - (krb5_keytype_to_cksumtype): new function - - * lib/krb5/build_auth.c (krb5_build_authenticator): figure out - what etype to use from the keytype. - - * lib/krb5/auth_context.c (krb5_auth_con_init): set `cksumtype' - and `enctype' to 0 - - * admin/extkeytab.c (ext_keytab): extract all keys - - * appl/telnet/telnet/commands.c: INET6_ADDRSTRLEN kludge - - * configure.in: check for . check for -linet6 - -Tue Sep 23 03:00:53 1997 Assar Westerlund - - * lib/krb5/encrypt.c: fix checksumtype for des3-cbc-sha1 - - * lib/krb5/rd_safe.c: fix check for keyed and collision-proof - checksum - - * lib/krb5/context.c (valid_etype): remove hard-coded constants - (default_etypes): include DES3 - - * kdc/kerberos5.c: fix check for keyed and collision-proof - checksum - - * admin/util.c (init_des_key, set_password): DES3 keys also - - * lib/krb/send_to_kdc.c (krb5_sendto_kdc): no data returned means - no contact? - - * lib/krb5/addr_families.c: fix typo in `ipv6_anyaddr' - -Mon Sep 22 11:44:27 1997 Johan Danielsson - - * kdc/kerberos5.c: Somewhat fix the etype usage. The list sent by - the client is used to select wich key to encrypt the kdc rep with - (in case of as-req), and with the server info to select the - session key type. The server key the ticket is encrypted is based - purely on the keys in the database. - - * kdc/string2key.c: Add keytype support. Default to version 5 - keys. - - * lib/krb5/get_in_tkt.c: Fix a lot of etype/keytype misuse. - - * lib/krb5/encrypt.c: Add des3-cbc-md5, and des3-cbc-sha1. Add - many *_to_* functions. - - * lib/krb5/str2key.c: Add des3 string-to-key. Add ktype argument - to krb5_string_to_key(). - - * lib/krb5/checksum.c: Some cleanup, and added: - - rsa-md5-des3 - - hmac-sha1-des3 - - keyed and collision proof flags to each checksum method - - checksum<->string functions. - - * lib/krb5/generate_subkey.c: Use krb5_generate_random_keyblock. - -Sun Sep 21 15:19:23 1997 Assar Westerlund - - * kdc/connect.c: use new addr_families functions - - * kpasswd/kpasswdd.c: use new addr_families functions. Now works - over IPv6 - - * kuser/klist.c: use correct symbols for address families - - * lib/krb5/sock_principal.c: use new addr_families functions - - * lib/krb5/send_to_kdc.c: use new addr_families functions - - * lib/krb5/krb5.h: add KRB5_ADDRESS_INET6 - - * lib/krb5/get_addrs.c: use new addr_families functions - - * lib/krb5/changepw.c: use new addr_families functions. Now works - over IPv6 - - * lib/krb5/auth_context.c: use new addr_families functions - - * lib/krb5/addr_families.c: new file - - * acconfig.h: AC_SOCKADDR_IN6 -> AC_STRUCT_SOCKADDR_IN6. Updated - uses. - - * acinclude.m4: new macro `AC_KRB_IPV6'. Use it. - -Sat Sep 13 23:04:23 1997 Johan Danielsson - - * kdc/hprop.c: Don't encrypt twice. Complain on non-convertable - principals. - -Sat Sep 13 00:59:36 1997 Assar Westerlund - - * Release 0.0h - - * appl/telnet/telnet/commands.c: AF_INET6 support - - * admin/misc.c: new file - - * lib/krb5/context.c: new configuration variable `max_retries' - - * lib/krb5/get_addrs.c: fixes and better #ifdef's - - * lib/krb5/config_file.c: implement krb5_config_get_int - - * lib/krb5/auth_context.c, send_to_kdc.c, sock_principal.c: - AF_INET6 support - - * kuser/klist.c: support for printing IPv6-addresses - - * kdc/connect.c: support AF_INET6 - - * configure.in: test for gethostbyname2 and struct sockaddr_in6 - -Thu Sep 11 07:25:28 1997 Assar Westerlund - - * lib/asn1/k5.asn1: Use `METHOD-DATA' instead of `SEQUENCE OF - PA-DATA' - -Wed Sep 10 21:20:17 1997 Johan Danielsson - - * kdc/kerberos5.c: Fixes for cross-realm, including (but not - limited to): - - allow client to be non-existant (should probably check for - "local realm") - - if server isn't found and it is a request for a krbtgt, try to - find a realm on the way to the requested realm - - update the transited encoding iff - client-realm != server-realm != tgt-realm - - * lib/krb5/get_cred.c: Several fixes for cross-realm. - -Tue Sep 9 15:59:20 1997 Johan Danielsson - - * kdc/string2key.c: Fix password handling. - - * lib/krb5/encrypt.c: krb5_key_to_string - -Tue Sep 9 07:46:05 1997 Assar Westerlund - - * lib/krb5/get_addrs.c: rewrote. Now should be able to handle - aliases and IPv6 addresses - - * kuser/klist.c: try printing IPv6 addresses - - * kdc/kerberos5.c: increase the arbitrary limit from 1024 to 8192 - - * configure.in: check for - -Mon Sep 8 02:57:14 1997 Assar Westerlund - - * doc: fixes - - * admin/util.c (init_des_key): increase kvno - (set_password): return -1 if `des_read_pw_string' failed - - * admin/mod.c (doit2): check the return value from `set_password' - - * admin/ank.c (doit): don't add a new entry if `set_password' - failed - -Mon Sep 8 02:20:16 1997 Johan Danielsson - - * lib/krb5/verify_init.c: fix ap_req_nofail semantics - - * lib/krb5/transited.c: something that might resemble - domain-x500-compress - -Mon Sep 8 01:24:42 1997 Assar Westerlund - - * kdc/hpropd.c (main): check number of arguments - - * appl/popper/pop_init.c (pop_init): check number of arguments - - * kpasswd/kpasswd.c (main): check number of arguments - - * kdc/string2key.c (main): check number of arguments - - * kuser/kdestroy.c (main): check number of arguments - - * kuser/kinit.c (main): check number of arguments - - * kpasswd/kpasswdd.c (main): use sigaction without SA_RESTART to - break out of select when a signal arrives - - * kdc/main.c (main): use sigaction without SA_RESTART to break out - of select when a signal arrives - - * kdc/kstash.c: default to HDB_DB_DIR "/m-key" - - * kdc/config.c (configure): add `--version'. Check the number of - arguments. Handle the case of there being no specification of port - numbers. - - * admin/util.c: seal and unseal key at appropriate places - - * admin/kdb_edit.c (main): parse arguments, config file and read - master key iff there's one. - - * admin/extkeytab.c (ext_keytab): unseal key while extracting - -Sun Sep 7 20:41:01 1997 Assar Westerlund - - * lib/roken/roken.h: include - - * kdc/kerberos5.c (set_salt_padata): new function - - * appl/telnet/telnetd/telnetd.c: Rename some variables that - conflict with cpp symbols on HP-UX 10.20 - - * change all calls of `gethostbyaddr' to cast argument 1 to `const - char *' - - * acconfig.h: only use SGTTY on nextstep - -Sun Sep 7 14:33:50 1997 Johan Danielsson - - * kdc/kerberos5.c: Check invalid flag. - -Fri Sep 5 14:19:38 1997 Johan Danielsson - - * lib/krb5/verify_user.c: Use get_init_creds/verify_init_creds. - - * lib/kafs: Move functions common to krb/krb5 modules to new file, - and make things more modular. - - * lib/krb5/krb5.h: rename STRING -> krb5_config_string, and LIST - -> krb5_config_list - -Thu Sep 4 23:39:43 1997 Johan Danielsson - - * lib/krb5/get_addrs.c: Fix loopback test. - -Thu Sep 4 04:45:49 1997 Assar Westerlund - - * lib/roken/roken.h: fallback definition of `O_ACCMODE' - - * lib/krb5/get_in_tkt.c (krb5_get_in_cred): be more careful when - checking for a v4 reply - -Wed Sep 3 18:20:14 1997 Johan Danielsson - - * kdc/hprop.c: Add `--decrypt' and `--encrypt' flags. - - * lib/hdb/hdb.c: new {seal,unseal}_keys functions - - * kdc/{hprop,hpropd}.c: Add support to dump database to stdout. - - * kdc/hprop.c: Don't use same master key as version 4. - - * admin/util.c: Don't dump core if no `default' is found. - -Wed Sep 3 16:01:07 1997 Johan Danielsson - - * kdc/connect.c: Allow run time port specification. - - * kdc/config.c: Add flags for http support, and port - specifications. - -Tue Sep 2 02:00:03 1997 Assar Westerlund - - * include/bits.c: Don't generate ifndef's in bits.h. Instead, use - them when building the program. This makes it possible to include - bits.h without having defined all HAVE_INT17_T symbols. - - * configure.in: test for sigaction - - * doc: updated documentation. - -Tue Sep 2 00:20:31 1997 Johan Danielsson - - * Release 0.0g - -Mon Sep 1 17:42:14 1997 Johan Danielsson - - * lib/krb5/data.c: don't return ENOMEM if len == 0 - -Sun Aug 31 17:15:49 1997 Johan Danielsson - - * lib/hdb/hdb.asn1: Include salt type in salt. - - * kdc/hprop.h: Change port to 754. - - * kdc/hpropd.c: Verify who tries to transmit a database. - - * appl/popper: Use getarg and krb5_log. - - * lib/krb5/get_port.c: Add context parameter. Now takes port in - host byte order. - -Sat Aug 30 18:48:19 1997 Johan Danielsson - - * kdc/connect.c: Add timeout to select, and log about expired tcp - connections. - - * kdc/config.c: Add `database' option. - - * kdc/hpropd.c: Log about duplicate entries. - - * lib/hdb/{db,ndbm}.c: Use common routines. - - * lib/hdb/common.c: Implement more generic fetch/store/delete - functions. - - * lib/hdb/hdb.h: Add `replace' parameter to store. - - * kdc/connect.c: Set filedecriptor to -1 on allocated decriptor - entries. - -Fri Aug 29 03:13:23 1997 Assar Westerlund - - * lib/krb5/get_in_tkt.c: extract_ticket -> _krb5_extract_ticket - - * aux/make-proto.pl: fix __P for stone age mode - -Fri Aug 29 02:45:46 1997 Johan Danielsson - - * lib/45/mk_req.c: implementation of krb_mk_req that uses 524 - protocol - - * lib/krb5/init_creds_pw.c: make change_password and - get_init_creds_common static - - * lib/krb5/krb5.h: Merge stuff from removed headerfiles. - - * lib/krb5/fcache.c: fcc_ops -> krb5_fcc_ops - - * lib/krb5/mcache.c: mcc_ops -> krb5_mcc_ops - -Fri Aug 29 01:45:25 1997 Johan Danielsson - - * lib/krb5/krb5.h: Remove all prototypes. - - * lib/krb5/convert_creds.c: Use `struct credentials' instead of - `CREDENTIALS'. - -Fri Aug 29 00:08:18 1997 Assar Westerlund - - * lib/asn1/gen_glue.c: new file. generates 2int and int2 functions - and units for bit strings. - - * admin/util.c: flags2int, int2flags, and flag_units are now - generated by asn1_compile - - * lib/roken/parse_units.c: generalised `parse_units' and - `unparse_units' and added new functions `parse_flags' and - `unparse_flags' that use these - - * lib/krb5/krb5_locl.h: moved krb5_data* functions to krb5.h - - * admin/util.c: Use {un,}parse_flags for printing and parsing - hdbflags. - -Thu Aug 28 03:26:12 1997 Assar Westerlund - - * lib/krb5/get_addrs.c: restructured - - * lib/krb5/warn.c (_warnerr): leak less memory - - * lib/hdb/hdb.c (hdb_free_entry): zero keys - (hdb_check_db_format): leak less memory - - * lib/hdb/ndbm.c (NDBM_seq): check for valid hdb_entries implement - NDBM__get, NDBM__put - - * lib/hdb/db.c (DB_seq): check for valid hdb_entries - -Thu Aug 28 02:06:58 1997 Johan Danielsson - - * lib/krb5/send_to_kdc.c: Don't use sendto on connected sockets. - -Thu Aug 28 01:13:17 1997 Assar Westerlund - - * kuser/kinit.1, klist.1, kdestroy.1: new man pages - - * kpasswd/kpasswd.1, kpasswdd.8: new man pages - - * kdc/kstash.8, hprop.8, hpropd.8: new man pages - - * admin/ktutil.8, admin/kdb_edit.8: new man pages - - * admin/mod.c: new file - - * admin/life.c: renamed gettime and puttime to getlife and putlife - and moved them to life.c - - * admin/util.c: add print_flags, parse_flags, init_entry, - set_created_by, set_modified_by, edit_entry, set_password. Use - them. - - * admin/get.c: use print_flags - - * admin: removed unused stuff. use krb5_{warn,err}* - - * admin/ank.c: re-organized and abstracted. - - * admin/gettime.c: removed - -Thu Aug 28 00:37:39 1997 Johan Danielsson - - * lib/krb5/{get_cred,get_in_tkt}.c: Check for v4 reply. - - * lib/roken/base64.c: Add base64 functions. - - * kdc/connect.c lib/krb5/send_to_kdc.c: Add http support. - -Wed Aug 27 00:29:20 1997 Johan Danielsson - - * include/Makefile.am: Don't make links to built files. - - * admin/kdb_edit.c: Add command to set the database path. - - * lib/hdb: Include version number in database. - -Tue Aug 26 20:14:54 1997 Johan Danielsson - - * admin/ktutil: Merged v4 srvtab conversion. - -Mon Aug 25 23:02:18 1997 Assar Westerlund - - * lib/roken/roken.h: add F_OK - - * lib/gssapi/acquire_creds.c: fix typo - - * configure.in: call AC_TYPE_MODE_T - - * acinclude.m4: Add AC_TYPE_MODE_T - -Sun Aug 24 16:46:53 1997 Assar Westerlund - - * Release 0.0f - -Sun Aug 24 08:06:54 1997 Assar Westerlund - - * appl/popper/pop_pass.c: log poppers - - * kdc/kaserver.c: some more checks - - * kpasswd/kpasswd.c: removed `-p' - - * kuser/kinit.c: removed `-p' - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_password): If - KDC_ERR_PREUATH_REQUIRED, add preauthentication and try again. - - * lib/krb5/get_in_tkt.c (krb5_get_in_cred): don't print out - krb-error text - - * lib/gssapi/import_name.c (input_name): more names types. - - * admin/load.c (parse_keys): handle the case of an empty salt - - * kdc/kaserver.c: fix up memory deallocation - - * kdc/kaserver.c: quick hack at talking kaserver protocol - - * kdc/kerberos4.c: Make `db-fetch4' global - - * configure.in: add --enable-kaserver - - * kdc/rx.h, kdc/kerberos4.h: new header files - - * lib/krb5/principal.c: fix krb5_build_principal_ext & c:o - -Sun Aug 24 03:52:44 1997 Johan Danielsson - - * lib/krb5/{get_in_tkt,mk_safe,mk_priv}.c: Fix some Cray specific - type conflicts. - - * lib/krb5/{get_cred,get_in_tkt}.c: Mask nonce to 32 bits. - - * lib/des/{md4,md5,sha}.c: Now works on Crays. - -Sat Aug 23 18:15:01 1997 Johan Danielsson - - * appl/afsutil/afslog.c: If no cells or files specified, get - tokens for all local cells. Better test for files. - -Thu Aug 21 23:33:38 1997 Assar Westerlund - - * lib/gssapi/v1.c: new file with v1 compatibility functions. - -Thu Aug 21 20:36:13 1997 Johan Danielsson - - * lib/kafs/afskrb5.c: Don't check ticket file for afs ticket. - - * kdc/kerberos4.c: Check database when converting v4 principals. - - * kdc/kerberos5.c: Include kvno in Ticket. - - * lib/krb5/encrypt.c: Add kvno parameter to encrypt_EncryptedData. - - * kuser/klist.c: Print version number of ticket, include more - flags. - -Wed Aug 20 21:26:58 1997 Johan Danielsson - - * lib/kafs/afskrb5.c (get_cred): Check cached afs tickets for - expiration. - -Wed Aug 20 17:40:31 1997 Assar Westerlund - - * lib/krb5/recvauth.c (krb5_recvauth): Send a KRB-ERROR iff - there's an error. - - * lib/krb5/sendauth.c (krb5_sendauth): correct the protocol - documentation and process KRB-ERROR's - -Tue Aug 19 20:41:30 1997 Johan Danielsson - - * kdc/kerberos4.c: Fix memory leak in v4 protocol handler. - -Mon Aug 18 05:15:09 1997 Assar Westerlund - - * lib/gssapi/accept_sec_context.c: Added - `gsskrb5_register_acceptor_identity' - -Sun Aug 17 01:40:20 1997 Assar Westerlund - - * lib/gssapi/accept_sec_context.c (gss_accept_sec_context): don't - always pass server == NULL to krb5_rd_req. - - * lib/gssapi: new files: canonicalize_name.c export_name.c - context_time.c compare_name.c release_cred.c acquire_cred.c - inquire_cred.c, from Luke Howard - - * lib/krb5/config_file.c: Add netinfo support from Luke Howard - - - * lib/editline/sysunix.c: sgtty-support from Luke Howard - - - * lib/krb5/principal.c: krb5_sname_to_principal fix from Luke - Howard - -Sat Aug 16 00:44:47 1997 Assar Westerlund - - * Release 0.0e - -Sat Aug 16 00:23:46 1997 Johan Danielsson - - * appl/afsutil/afslog.c: Use new libkafs. - - * lib/kafs/afskrb5.c: Get AFS tokens via 524 protocol. - - * lib/krb5/warn.c: Fix format string for *x type. - -Fri Aug 15 22:15:01 1997 Assar Westerlund - - * admin/get.c (get_entry): print more information about the entry - - * lib/des/Makefile.am: build destest, mdtest, des, rpw, speed - - * lib/krb5/config_file.c: new functions `krb5_config_get_time' and - `krb5_config_vget_time'. Use them. - -Fri Aug 15 00:09:37 1997 Johan Danielsson - - * admin/ktutil.c: Keytab manipulation program. - - * lib/krb5/keytab.c: Return sane values from resolve and - start_seq_get. - - * kdc/kerberos5.c: Fix for old clients passing 0 for `no endtime'. - - * lib/45/get_ad_tkt.c: Kerberos 4 get_ad_tkt using - krb524_convert_creds_kdc. - - * lib/krb5/convert_creds.c: Implementation of - krb524_convert_creds_kdc. - - * lib/asn1/k5.asn1: Make kdc-req-body.till OPTIONAL - - * kdc/524.c: A somewhat working 524-protocol module. - - * kdc/kerberos4.c: Add version 4 ticket encoding and encryption - functions. - - * lib/krb5/context.c: Fix kdc_timeout. - - * lib/hdb/{ndbm,db}.c: Free name in close. - - * kdc/kerberos5.c (tgs_check_autenticator): Return error code - -Thu Aug 14 21:29:03 1997 Johan Danielsson - - * kdc/kerberos5.c (tgs_make_reply): Fix endtime in reply. - - * lib/krb5/store_emem.c: Fix reallocation bug. - -Tue Aug 12 01:29:46 1997 Assar Westerlund - - * appl/telnet/libtelnet/kerberos5.c, appl/popper/pop_init.c: Use - `krb5_sock_to_principal'. Send server parameter to - krb5_rd_req/krb5_recvauth. Set addresses in auth_context. - - * lib/krb5/recvauth.c: Set addresses in auth_context if there - aren't any - - * lib/krb5/auth_context.c: New function - `krb5_auth_con_setaddrs_from_fd' - - * lib/krb5/sock_principal.c: new function - `krb5_sock_to_principal' - - * lib/krb5/time.c: new file with `krb5_timeofday' and - `krb5_us_timeofday'. Use these functions. - - * kuser/klist.c: print KDC offset iff verbose - - * lib/krb5/get_in_tkt.c: implement KDC time offset and use it if - [libdefaults]kdc_timesync is set. - - * lib/krb5/fcache.c: Implement version 4 of the ccache format. - -Mon Aug 11 05:34:43 1997 Assar Westerlund - - * lib/krb5/rd_rep.c (krb5_free_ap_rep_enc_part): free all memory - - * lib/krb5/principal.c (krb5_unparse_name): allocate memory - properly - - * kpasswd/kpasswd.c: Use `krb5_change_password' - - * lib/krb5/init_creds_pw.c (init_cred): set realm of server - correctly. - - * lib/krb5/init_creds_pw.c: support changing of password when it - has expired - - * lib/krb5/changepw.c: new file - - * kuser/klist.c: use getarg - - * admin/init.c (init): add `kadmin/changepw' - -Mon Aug 11 04:30:47 1997 Johan Danielsson - - * lib/krb5/get_cred.c: Make get_credentials handle cross-realm. - -Mon Aug 11 00:03:24 1997 Assar Westerlund - - * lib/krb5/config_file.c: implement support for #-comments - -Sat Aug 9 02:21:46 1997 Johan Danielsson - - * kdc/hprop*.c: Add database propagation programs. - - * kdc/connect.c: Max request size. - -Sat Aug 9 00:47:28 1997 Assar Westerlund - - * lib/otp: resurrected from krb4 - - * appl/push: new program for fetching mail with POP. - - * appl/popper/popper.h: new include files. new fields in `POP' - - * appl/popper/pop_pass.c: Implement both v4 and v5. - - * appl/popper/pop_init.c: Implement both v4 and v5. - - * appl/popper/pop_debug.c: use getarg. Talk both v4 and v5 - - * appl/popper: Popper from krb4. - - * configure.in: check for inline and generate - files in appl/popper, appl/push, and lib/otp - -Fri Aug 8 05:51:02 1997 Assar Westerlund - - * lib/krb5/get_cred.c: clean-up and try to free memory even when - there're errors - - * lib/krb5/get_cred.c: adapt to new `extract_ticket' - - * lib/krb5/get_in_tkt.c: reorganize. check everything and try to - return memory even if there are errors. - - * kuser/kverify.c: new file - - * lib/krb5/free_host_realm.c: new file - - * lib/krb5/principal.c (krb5_sname_to_principal): implement - different nametypes. Also free memory. - - * lib/krb5/verify_init.c: more functionality - - * lib/krb5/mk_req_ext.c (krb5_mk_req_extended): free the checksum - - * lib/krb5/get_in_tkt.c (extract_ticket): don't copy over the - principals in creds. Should also compare them with that received - from the KDC - - * lib/krb5/cache.c (krb5_cc_gen_new): copy the newly allocated - krb5_ccache - (krb5_cc_destroy): call krb5_cc_close - (krb5_cc_retrieve_cred): delete the unused creds - -Fri Aug 8 02:30:40 1997 Johan Danielsson - - * lib/krb5/log.c: Allow better control of destinations of logging - (like passing explicit destinations, and log-functions). - -Fri Aug 8 01:20:39 1997 Assar Westerlund - - * lib/krb5/get_default_principal.c: new file - - * kpasswd/kpasswdd.c: use krb5_log* - -Fri Aug 8 00:37:47 1997 Johan Danielsson - - * lib/krb5/init_creds_pw.c: Implement krb5_get_init_creds_keytab. - -Fri Aug 8 00:37:17 1997 Assar Westerlund - - * lib/krb5/init_creds_pw.c: Use `krb5_get_default_principal'. - Print password expire information. - - * kdc/config.c: new variable `kdc_warn_pwexpire' - - * kpasswd/kpasswd.c: converted to getarg and get_init_creds - -Thu Aug 7 22:17:09 1997 Assar Westerlund - - * lib/krb5/mcache.c: new file - - * admin/gettime.c: new function puttime. Use it. - - * lib/krb5/keyblock.c: Added krb5_free_keyblock and - krb5_copy_keyblock - - * lib/krb5/init_creds_pw.c: more functionality - - * lib/krb5/creds.c: Added krb5_free_creds_contents and - krb5_copy_creds. Changed callers. - - * lib/krb5/config_file.c: new functions krb5_config_get and - krb5_config_vget - - * lib/krb5/cache.c: cleanup added mcache - - * kdc/kerberos5.c: include last-req's of type 6 and 7, if - applicable - -Wed Aug 6 20:38:23 1997 Johan Danielsson - - * lib/krb5/log.c: New parameter `log-level'. Default to `SYSLOG'. - -Tue Aug 5 22:53:54 1997 Assar Westerlund - - * lib/krb5/verify_init.c, init_creds_pw.c, init_creds.c, - prompter_posix.c: the beginning of an implementation of the cygnus - initial-ticket API. - - * lib/krb5/get_in_tkt_pw.c: make `krb5_password_key_proc' global - - * lib/krb5/get_in_tkt.c (krb5_get_in_cred): new function that is - almost krb5_get_in_tkt but doesn't write the creds to the ccache. - Small fixes in krb5_get_in_tkt - - * lib/krb5/get_addrs.c (krb5_get_all_client_addrs): don't include - loopback. - -Mon Aug 4 20:20:48 1997 Johan Danielsson - - * kdc: Make context global. - -Fri Aug 1 17:23:56 1997 Assar Westerlund - - * Release 0.0d - - * lib/roken/flock.c: new file - - * kuser/kinit.c: check for and print expiry information in the - `kdc_rep' - - * lib/krb5/get_in_tkt.c: Set `ret_as_reply' if != NULL - - * kdc/kerberos5.c: Check the valid times on client and server. - Check the password expiration. - Check the require_preauth flag. - Send an lr_type == 6 with pw_end. - Set key.expiration to min(valid_end, pw_end) - - * lib/hdb/hdb.asn1: new flags `require_preauth' and `change_pw' - - * admin/util.c, admin/load.c: handle the new flags. - -Fri Aug 1 16:56:12 1997 Johan Danielsson - - * lib/hdb: Add some simple locking. - -Sun Jul 27 04:44:31 1997 Johan Danielsson - - * lib/krb5/log.c: Add some general logging functions. - - * kdc/kerberos4.c: Add version 4 protocol handler. The requrement - for this to work is that all involved principals has a des key in - the database, and that the client has a version 4 (un-)salted - key. Furthermore krb5_425_conv_principal has to do it's job, as - present it's not very clever. - - * lib/krb5/principal.c: Quick patch to make 425_conv work - somewhat. - - * lib/hdb/hdb.c: Add keytype->key and next key functions. - -Fri Jul 25 17:32:12 1997 Assar Westerlund - - * lib/krb5/build_auth.c (krb5_build_authenticator): don't free - `cksum'. It's allocated and freed by the caller - - * lib/krb5/get_cred.c (krb5_get_kdc_cred): Don't free `addresses'. - - * kdc/kerberos5.c (tgs_rep2): make sure we also have an defined - `client' to return as part of the KRB-ERROR - -Thu Jul 24 08:13:59 1997 Johan Danielsson - - * kdc/kerberos5.c: Unseal keys from database before use. - - * kdc/misc.c: New functions set_master_key, unseal_key and - free_key. - - * lib/roken/getarg.c: Handle `-f arg' correctly. - -Thu Jul 24 01:54:43 1997 Assar Westerlund - - * kuser/kinit.c: implement `-l' aka `--lifetime' - - * lib/roken/parse_units.c, parse_time.c: new files - - * admin/gettime.c (gettime): use `parse_time' - - * kdc/kerberos5.c (as_rep): Use `METHOD-DATA' when sending - KRB5KDC_ERR_PREAUTH_REQUIRED, not PA-DATA. - - * kpasswd/kpasswdd.c: fix freeing bug use sequence numbers set - addresses in auth_context bind one socket per interface. - - * kpasswd/kpasswd.c: use sequence numbers - - * lib/krb5/rd_req.c (krb5_verify_ap_req): do abs when verifying - the timestamps - - * lib/krb5/rd_priv.c (krb5_rd_priv): Fetch the correct session key - from auth_context - - * lib/krb5/mk_priv.c (krb5_mk_priv): Fetch the correct session key - from auth_context - - * lib/krb5/mk_error.c (krb5_mk_error): return an error number and - not a comerr'd number. - - * lib/krb5/get_in_tkt.c (krb5_get_in_tkt): interpret the error - number in KRB-ERROR correctly. - - * lib/krb5/get_cred.c (krb5_get_kdc_cred): interpret the error - number in KRB-ERROR correctly. - - * lib/asn1/k5.asn1: Add `METHOD-DATA' - - * removed some memory leaks. - -Wed Jul 23 07:53:18 1997 Assar Westerlund - - * Release 0.0c - - * lib/krb5/rd_cred.c, get_for_creds.c: new files - - * lib/krb5/get_host_realm.c: try default realm as last chance - - * kpasswd/kpasswdd.c: updated to hdb changes - - * appl/telnet/libtelnet/kerberos5.c: Implement forwarding - - * appl/telnet/libtelnet: removed totally unused files - - * admin/ank.c: fix prompts and generation of random keys - -Wed Jul 23 04:02:32 1997 Johan Danielsson - - * admin/dump.c: Include salt in dump. - - * admin: Mostly updated for new db-format. - - * kdc/kerberos5.c: Update to use new db format. Better checking of - flags and such. More logging. - - * lib/hdb/hdb.c: Use generated encode and decode functions. - - * lib/hdb/hdb.h: Get hdb_entry from ASN.1 generated code. - - * lib/krb5/get_cred.c: Get addresses from krbtgt if there are none - in the reply. - -Sun Jul 20 16:22:30 1997 Assar Westerlund - - * kuser/kinit.c: break if des_read_pw_string() != 0 - - * kpasswd/kpasswdd.c: send a reply - - * kpasswd/kpasswd.c: restructured code. better report on - krb-error break if des_read_pw_string() != 0 - - * kdc/kerberos5.c: Check `require_enc_timestamp' malloc space for - starttime and renew_till - - * appl/telnet/libtelnet/kerberos5.c (kerberos5_is): Send a - keyblock to krb5_verify_chekcsum - -Sun Jul 20 06:35:46 1997 Johan Danielsson - - * Release 0.0b - - * kpasswd/kpasswd.c: Avoid using non-standard struct names. - -Sat Jul 19 19:26:23 1997 Assar Westerlund - - * lib/krb5/keytab.c (krb5_kt_get_entry): check return from - `krb5_kt_start_seq_get'. From - -Sat Jul 19 04:07:39 1997 Johan Danielsson - - * lib/asn1/k5.asn1: Update with more pa-data types from - draft-ietf-cat-kerberos-revisions-00.txt - - * admin/load.c: Update to match current db-format. - - * kdc/kerberos5.c (as_rep): Try all valid pa-datas before giving - up. Send back an empty pa-data if the client has the v4 flag set. - - * lib/krb5/get_in_tkt.c: Pass both version5 and version4 salted - pa-data. DTRT if there is any pa-data in the reply. - - * lib/krb5/str2key.c: XOR with some sane value. - - * lib/hdb/hdb.h: Add `version 4 salted key' flag. - - * kuser/kinit.c: Ask for password before calling get_in_tkt. This - makes it possible to call key_proc more than once. - - * kdc/string2key.c: Add flags to output version 5 (DES only), - version 4, and AFS string-to-key of a password. - - * lib/asn1/gen_copy.c: copy_* functions now returns an int (0 or - ENOMEM). - -Fri Jul 18 02:54:58 1997 Assar Westerlund - - * lib/krb5/get_host_realm.c (krb5_get_host_realm): do the - name2name thing - - * kdc/misc.c: check result of hdb_open - - * admin/kdb_edit: updated to new sl - - * lib/sl: sl_func now returns an int. != 0 means to exit. - - * kpasswd/kpasswdd: A crude (but somewhat working) implementation - of `draft-ietf-cat-kerb-chg-password-00.txt' - -Fri Jul 18 00:55:39 1997 Johan Danielsson - - * kuser/krenew.c: Crude ticket renewing program. - - * kdc/kerberos5.c: Rewritten flags parsing, it now might work to - get forwarded and renewed tickets. - - * kuser/kinit.c: Add `-r' flag. - - * lib/krb5/get_cred.c: Move most of contents of get_creds to new - function get_kdc_cred, that always contacts the kdc and doesn't - save in the cache. This is a hack. - - * lib/krb5/get_in_tkt.c: Pass starttime and renew_till in request - (a bit kludgy). - - * lib/krb5/mk_req_ext.c: Make an auth_context if none passed in. - - * lib/krb5/send_to_kdc.c: Get timeout from context. - - * lib/krb5/context.c: Add kdc_timeout to context struct. - -Thu Jul 17 20:35:45 1997 Johan Danielsson - - * kuser/klist.c: Print start time of ticket if available. - - * lib/krb5/get_host_realm.c: Return error if no realm was found. - -Thu Jul 17 20:28:21 1997 Assar Westerlund - - * kpasswd: non-working kpasswd added - -Thu Jul 17 00:21:22 1997 Johan Danielsson - - * Release 0.0a - - * kdc/main.c: Add -p flag to disable pa-enc-timestamp requirement. - -Wed Jul 16 03:37:41 1997 Johan Danielsson - - * kdc/kerberos5.c (tgs_rep2): Free ticket and ap_req. - - * lib/krb5/auth_context.c (krb5_auth_con_free): Free remote - subkey. - - * lib/krb5/principal.c (krb5_free_principal): Check for NULL. - - * lib/krb5/send_to_kdc.c: Check for NULL return from - gethostbyname. - - * lib/krb5/set_default_realm.c: Try to get realm of local host if - no default realm is available. - - * Remove non ASN.1 principal code. - -Wed Jul 16 03:17:30 1997 Johan Danielsson - - * kdc/kerberos5.c: Split tgs_rep in smaller functions. Add better - error handing. Do some logging. - - * kdc/log.c: Some simple logging facilities. - - * kdc/misc.c (db_fetch): Take a krb5_principal. - - * kdc/connect.c: Pass address of request to as_rep and - tgs_rep. Send KRB-ERROR. - - * lib/krb5/mk_error.c: Add more fields. - - * lib/krb5/get_cred.c: Print normal error code if no e_text is - available. - -Wed Jul 16 03:07:50 1997 Assar Westerlund - - * lib/krb5/get_in_tkt.c: implement `krb5_init_etype'. - Change encryption type of pa_enc_timestamp to DES-CBC-MD5 - - * lib/krb5/context.c: recognize all encryption types actually - implemented - - * lib/krb5/auth_context.c (krb5_auth_con_init): Change default - encryption type to `DES_CBC_MD5' - - * lib/krb5/read_message.c, write_message.c: new files - -Tue Jul 15 17:14:21 1997 Assar Westerlund - - * lib/asn1: replaced asn1_locl.h by `der_locl.h' and `gen_locl.h'. - - * lib/error/compile_et.awk: generate a prototype for the - `destroy_foo_error_table' function. - -Mon Jul 14 12:24:40 1997 Assar Westerlund - - * lib/krb5/krbhst.c (krb5_get_krbhst): Get all kdc's and try also - with `kerberos.REALM' - - * kdc/kerberos5.c, lib/krb5/rd_priv.c, lib/krb5/rd_safe.c: use - `max_skew' - - * lib/krb5/rd_req.c (krb5_verify_ap_req): record authenticator - subkey - - * lib/krb5/build_auth.c (krb5_build_authenticator): always - generate a subkey. - - * lib/krb5/address.c: implement `krb5_address_order' - - * lib/gssapi/import_name.c: Implement `gss_import_name' - - * lib/gssapi/external.c: Use new OID - - * lib/gssapi/encapsulate.c: New functions - `gssapi_krb5_encap_length' and `gssapi_krb5_make_header'. Changed - callers. - - * lib/gssapi/decapsulate.c: New function - `gssaspi_krb5_verify_header'. Changed callers. - - * lib/asn1/gen*.c: Give tags to generated structs. - Use `err' and `asprintf' - - * appl/test/gss_common.c: new file - - * appl/test/gssapi_server.c: removed all krb5 calls - - * appl/telnet/libtelnet/kerberos5.c: Add support for genering and - verifying checksums. Also start using session subkeys. - -Mon Jul 14 12:08:25 1997 Johan Danielsson - - * lib/krb5/rd_req.c (krb5_rd_req_with_keyblock): Split up. - -Sun Jul 13 03:07:44 1997 Assar Westerlund - - * lib/krb5/rd_safe.c, mk_safe.c: made bug-compatible with MIT - - * lib/krb5/encrypt.c: new functions `DES_encrypt_null_ivec' and - `DES_encrypt_key_ivec' - - * lib/krb5/checksum.c: implement rsa-md4-des and rsa-md5-des - - * kdc/kerberos5.c (tgs_rep): support keyed checksums - - * lib/krb5/creds.c: new file - - * lib/krb5/get_in_tkt.c: better freeing - - * lib/krb5/context.c (krb5_free_context): more freeing - - * lib/krb5/config_file.c: New function `krb5_config_file_free' - - * lib/error/compile_et.awk: Generate a `destroy_' function. - - * kuser/kinit.c, klist.c: Don't leak memory. - -Sun Jul 13 02:46:27 1997 Johan Danielsson - - * kdc/connect.c: Check filedescriptor in select. - - * kdc/kerberos5.c: Remove most of the most common memory leaks. - - * lib/krb5/rd_req.c: Free allocated data. - - * lib/krb5/auth_context.c (krb5_auth_con_free): Free a lot of - fields. - -Sun Jul 13 00:32:16 1997 Assar Westerlund - - * appl/telnet: Conditionalize the krb4-support. - - * configure.in: Test for krb4 - -Sat Jul 12 17:14:12 1997 Assar Westerlund - - * kdc/kerberos5.c: check if the pre-auth was decrypted properly. - set the `pre_authent' flag - - * lib/krb5/get_cred.c, lib/krb5/get_in_tkt.c: generate a random nonce. - - * lib/krb5/encrypt.c: Made `generate_random_block' global. - - * appl/test: Added gssapi_client and gssapi_server. - - * lib/krb5/data.c: Add `krb5_data_zero' - - * appl/test/tcp_client.c: try `mk_safe' and `mk_priv' - - * appl/test/tcp_server.c: try `rd_safe' and `rd_priv' - -Sat Jul 12 16:45:58 1997 Johan Danielsson - - * lib/krb5/get_addrs.c: Fix for systems that has sa_len, but - returns zero length from SIOCGIFCONF. - -Sat Jul 12 16:38:34 1997 Assar Westerlund - - * appl/test: new programs - - * lib/krb5/rd_req.c: add address compare - - * lib/krb5/mk_req_ext.c: allow no checksum - - * lib/krb5/keytab.c (krb5_kt_ret_string): 0-terminate string - - * lib/krb5/address.c: fix `krb5_address_compare' - -Sat Jul 12 15:03:16 1997 Johan Danielsson - - * lib/krb5/get_addrs.c: Fix ip4 address extraction. - - * kuser/klist.c: Add verbose flag, and split main into smaller - pieces. - - * lib/krb5/fcache.c: Save ticket flags. - - * lib/krb5/get_in_tkt.c (extract_ticket): Extract addresses and - flags. - - * lib/krb5/krb5.h: Add ticket_flags to krb5_creds. - -Sat Jul 12 13:12:48 1997 Assar Westerlund - - * configure.in: Call `AC_KRB_PROG_LN_S' - - * acinclude.m4: Add `AC_KRB_PROG_LN_S' from krb4 - -Sat Jul 12 00:57:01 1997 Johan Danielsson - - * lib/krb5/get_in_tkt.c: Use union of krb5_flags and KDCOptions to - pass options. - -Fri Jul 11 15:04:22 1997 Assar Westerlund - - * appl/telnet: telnet & telnetd seems to be working. - - * lib/krb5/config_file.c: Added krb5_config_v?get_list Fixed - krb5_config_vget_next - - * appl/telnet/libtelnet/kerberos5.c: update to current API - -Thu Jul 10 14:54:39 1997 Assar Westerlund - - * appl/telnet/libtelnet/kerberos5.c (kerberos5_status): call - `krb5_kuserok' - - * appl/telnet: Added. - -Thu Jul 10 05:09:25 1997 Johan Danielsson - - * lib/error/compile_et.awk: Remove usage of sub, gsub, and - functions for compatibility with awk. - - * include/bits.c: Must use signed char. - - * lib/krb5/context.c: Move krb5_get_err_text, and krb5_init_ets - here. - - * lib/error/error.c: Replace krb5_get_err_text with new function - com_right. - - * lib/error/compile_et.awk: Avoid using static variables. - - * lib/error/error.c: Don't use krb5_locl.h - - * lib/error/error.h: Move definitions of error_table and - error_list from krb5.h. - - * lib/error: Moved from lib/krb5. - -Wed Jul 9 07:42:04 1997 Johan Danielsson - - * lib/krb5/encrypt.c: Temporary hack to avoid des_rand_data. - -Wed Jul 9 06:58:00 1997 Assar Westerlund - - * lib/krb5/{rd,mk}_{*}.c: more checking for addresses and stuff - according to pseudocode from 1510 - -Wed Jul 9 06:06:06 1997 Johan Danielsson - - * lib/hdb/hdb.c: Add hdb_etype2key. - - * kdc/kerberos5.c: Check authenticator. Use more general etype - functions. - -Wed Jul 9 03:51:12 1997 Assar Westerlund - - * lib/asn1/k5.asn1: Made all `s_address' OPTIONAL according to - draft-ietf-cat-kerberos-r-00.txt - - * lib/krb5/principal.c (krb5_parse_name): default to local realm - if none given - - * kuser/kinit.c: New option `-p' and prompt - -Wed Jul 9 02:30:06 1997 Johan Danielsson - - * lib/krb5/keyblock.c: Keyblock generation functions. - - * lib/krb5/encrypt.c: Use functions from checksum.c. - - * lib/krb5/checksum.c: Move checksum functions here. Add - krb5_cksumsize function. - -Wed Jul 9 01:15:38 1997 Assar Westerlund - - * lib/krb5/get_host_realm.c: implemented - - * lib/krb5/config_file.c: Redid part. New functions: - krb5_config_v?get_next - - * kuser/kdestroy.c: new program - - * kuser/kinit.c: new flag `-f' - - * lib/asn1/k5.asn1: Made HostAddresses = SEQUENCE OF HostAddress - - * acinclude.m4: Added AC_KRB_STRUCT_SOCKADDR_SA_LEN - - * lib/krb5/krb5.h: krb5_addresses == HostAddresses. Changed all - users. - - * lib/krb5/get_addrs.c: figure out all local addresses, possibly - even IPv6! - - * lib/krb5/checksum.c: table-driven checksum - -Mon Jul 7 21:13:28 1997 Johan Danielsson - - * lib/krb5/encrypt.c: Make krb5_decrypt use the same struct as - krb5_encrypt. - -Mon Jul 7 11:15:51 1997 Assar Westerlund - - * lib/roken/vsyslog.c: new file - - * lib/krb5/encrypt.c: add des-cbc-md4. - adjust krb5_encrypt and krb5_decrypt to reality - -Mon Jul 7 02:46:31 1997 Johan Danielsson - - * lib/krb5/encrypt.c: Implement as a vector of function pointers. - - * lib/krb5/{decrypt,encrypt}.c: Implement des-cbc-crc, and - des-cbc-md5 in separate functions. - - * lib/krb5/krb5.h: Add more checksum and encryption types. - - * lib/krb5/krb5_locl.h: Add etype to krb5_decrypt. - -Sun Jul 6 23:02:59 1997 Assar Westerlund - - * lib/krb5/[gs]et_default_realm.c, kuserok.c: new files - - * lib/krb5/config_file.[ch]: new c-based configuration reading - stuff - -Wed Jul 2 23:12:56 1997 Assar Westerlund - - * configure.in: Set WFLAGS if using gcc - -Wed Jul 2 17:47:03 1997 Johan Danielsson - - * lib/asn1/der_put.c (der_put_int): Return size correctly. - - * admin/ank.c: Be compatible with the asn1 principal format. - -Wed Jul 1 23:52:20 1997 Johan Danielsson - - * lib/asn1: Now all decode_* and encode_* functions now take a - final size_t* argument, that they return the size in. Return - values are zero for success, and anything else (such as some - ASN1_* constant) for error. - -Mon Jun 30 06:08:14 1997 Assar Westerlund - - * lib/krb5/keytab.c (krb5_kt_add_entry): change open mode to - O_WRONLY | O_APPEND - - * lib/krb5/get_cred.c: removed stale prototype for - `extract_ticket' and corrected call. - - * lib/asn1/gen_length.c (length_type): Make the length functions - for SequenceOf non-destructive - - * admin/ank.c (doit): Fix reading of `y/n'. - -Mon Jun 16 05:41:43 1997 Assar Westerlund - - * lib/gssapi/wrap.c, unwrap.c: do encrypt and add sequence number - - * lib/gssapi/get_mic.c, verify_mic.c: Add sequence number. - - * lib/gssapi/accept_sec_context.c (gss_accept_sec_context): Set - KRB5_AUTH_CONTEXT_DO_SEQUENCE. Verify 8003 checksum. - - * lib/gssapi/8003.c: New file. - - * lib/krb/krb5.h: Define a `krb_authenticator' as an ASN.1 - Authenticator. - - * lib/krb5/auth_context.c: New functions - `krb5_auth_setlocalseqnumber' and `krb5_auth_setremoteseqnumber' - -Tue Jun 10 00:35:54 1997 Johan Danielsson - - * lib/krb5: Preapre for use of some asn1-types. - - * lib/asn1/*.c (copy_*): Constness. - - * lib/krb5/krb5.h: Include asn1.h; krb5_data is now an - octet_string. - - * lib/asn1/der*,gen.c: krb5_data -> octet_string, char * -> - general_string - - * lib/asn1/libasn1.h: Moved stuff from asn1_locl.h that doesn't - have anything to do with asn1_compile. - - * lib/asn1/asn1_locl.h: Remove der.h. Add some prototypes. - -Sun Jun 8 03:51:55 1997 Assar Westerlund - - * kdc/kerberos5.c: Fix PA-ENC-TS-ENC - - * kdc/connect.c(process_request): Set `new' - - * lib/krb5/get_in_tkt.c: Do PA-ENC-TS-ENC the correct way. - - * lib: Added editline,sl,roken. - -Mon Jun 2 00:37:48 1997 Johan Danielsson - - * lib/krb5/fcache.c: Move file cache from cache.c. - - * lib/krb5/cache.c: Allow more than one cache type. - -Sun Jun 1 23:45:33 1997 Johan Danielsson - - * admin/extkeytab.c: Merged with kdb_edit. - -Sun Jun 1 23:23:08 1997 Assar Westerlund - - * kdc/kdc.c: more support for ENC-TS-ENC - - * lib/krb5/get_in_tkt.c: redone to enable pre-authentication - -Sun Jun 1 22:45:11 1997 Johan Danielsson - - * lib/hdb/db.c: Merge fetch and store. - - * admin: Merge to one program. - - * lib/krb5/str2key.c: Fill in keytype and length. - -Sun Jun 1 16:31:23 1997 Assar Westerlund - - * lib/krb5/rd_safe.c, lib/krb5/rd_priv.c, lib/krb5/mk_rep.c, - lib/krb5/mk_priv.c, lib/krb5/build_auth.c: Some support for - KRB5_AUTH_CONTEXT_DO_SEQUENCE - - * lib/krb5/get_in_tkt.c (get_in_tkt): be prepared to parse an - KRB_ERROR. Some support for PA_ENC_TS_ENC. - - * lib/krb5/auth_context.c: implemented seq_number functions - - * lib/krb5/generate_subkey.c, generate_seq_number.c: new files - - * lib/gssapi/gssapi.h: avoid including - - * lib/asn1/Makefile.am: SUFFIXES as a variable to make automake - happy - - * kdc/kdc.c: preliminary PREAUTH_ENC_TIMESTAMP - - * configure.in: adapted to automake 1.1p - -Mon May 26 22:26:21 1997 Johan Danielsson - - * lib/krb5/principal.c: Add contexts to many functions. - -Thu May 15 20:25:37 1997 Johan Danielsson - - * lib/krb5/verify_user.c: First stab at a verify user. - - * lib/auth/sia/sia5.c: SIA module for Kerberos 5. - -Mon Apr 14 00:09:03 1997 Assar Westerlund - - * lib/gssapi: Enough of a gssapi-over-krb5 implementation to be - able to (mostly) run gss-client and gss-server. - - * lib/krb5/keytab.c: implemented krb5_kt_add_entry, - krb5_kt_store_principal, krb5_kt_store_keyblock - - * lib/des/md5.[ch], sha.[ch]: new files - - * lib/asn1/der_get.c (generalizedtime2time): use `timegm' - - * lib/asn1/timegm.c: new file - - * admin/extkeytab.c: new program - - * admin/admin_locl.h: new file - - * admin/Makefile.am: Added extkeytab - - * configure.in: moved config to include - removed timezone garbage - added lib/gssapi and admin - - * Makefile.am: Added admin - -Mon Mar 17 11:34:05 1997 Johan Danielsson - - * kdc/kdc.c: Use new copying functions, and free some data. - - * lib/asn1/Makefile.am: Try to not always rebuild generated files. - - * lib/asn1/der_put.c: Add fix_dce(). - - * lib/asn1/der_{get,length,put}.c: Fix include files. - - * lib/asn1/der_free.c: Remove unused functions. - - * lib/asn1/gen.c: Split into gen_encode, gen_decode, gen_free, - gen_length, and gen_copy. - -Sun Mar 16 18:13:52 1997 Assar Westerlund - - * lib/krb5/sendauth.c: implemented functionality - - * lib/krb5/rd_rep.c: Use `krb5_decrypt' - - * lib/krb5/cache.c (krb5_cc_get_name): return default if `id' == - NULL - - * lib/krb5/principal.c (krb5_free_principal): added `context' - argument. Changed all callers. - - (krb5_sname_to_principal): new function - - * lib/krb5/auth_context.c (krb5_free_authenticator): add `context' - argument. Changed all callers - - * lib/krb5/{net_write.c,net_read.c,recvauth.c}: new files - - * lib/asn1/gen.c: Fix encoding and decoding of BitStrings - -Fri Mar 14 11:29:00 1997 Assar Westerlund - - * configure.in: look for *dbm? - - * lib/asn1/gen.c: Fix filename in generated files. Check fopens. - Put trailing newline in asn1_files. - -Fri Mar 14 05:06:44 1997 Johan Danielsson - - * lib/krb5/get_in_tkt.c: Fix some memory leaks. - - * lib/krb5/krbhst.c: Properly free hostlist. - - * lib/krb5/decrypt.c: CRCs are 32 bits. - -Fri Mar 14 04:39:15 1997 Johan Danielsson - - * lib/asn1/gen.c: Generate one file for each type. - -Fri Mar 14 04:13:47 1997 Assar Westerlund - - * lib/asn1/gen.c: Generate `length_FOO' functions - - * lib/asn1/der_length.c: new file - - * kuser/klist.c: renamed stime -> printable_time to avoid conflict - on HP/UX - -Fri Mar 14 03:37:23 1997 Johan Danielsson - - * lib/hdb/ndbm.c: Return NOENTRY if fetch fails. Don't free - datums. Don't add .db to filename. - -Fri Mar 14 02:49:51 1997 Johan Danielsson - - * kdc/dump.c: Database dump program. - - * kdc/ank.c: Trivial database editing program. - - * kdc/{kdc.c, load.c}: Use libhdb. - - * lib/hdb: New database routine library. - - * lib/krb5/error/Makefile.am: Add hdb_err. - -Wed Mar 12 17:41:14 1997 Johan Danielsson - - * kdc/kdc.c: Rewritten AS, and somewhat more working TGS support. - - * lib/asn1/gen.c: Generate free functions. - - * Some specific free functions. - -Wed Mar 12 12:30:13 1997 Assar Westerlund - - * lib/krb5/krb5_mk_req_ext.c: new file - - * lib/asn1/gen.c: optimize the case with a simple type - - * lib/krb5/get_cred.c (krb5_get_credentials): Use - `mk_req_extended' and remove old code. - - * lib/krb5/get_in_tkt.c (decrypt_tkt): First try with an - EncASRepPart, then with an EncTGSRepPart. - -Wed Mar 12 08:26:04 1997 Johan Danielsson - - * lib/krb5/store_emem.c: New resizable memory storage. - - * lib/krb5/{store.c, store_fd.c, store_mem.c}: Split of store.c - - * lib/krb5/krb5.h: Add free entry to krb5_storage. - - * lib/krb5/decrypt.c: Make keyblock const. - -Tue Mar 11 20:22:17 1997 Johan Danielsson - - * lib/krb5/krb5.h: Add EncTicketPart to krb5_ticket. - - * lib/krb5/rd_req.c: Return whole asn.1 ticket in - krb5_ticket->tkt. - - * lib/krb5/get_in_tkt.c: TGS -> AS - - * kuser/kfoo.c: Print error string rather than number. - - * kdc/kdc.c: Some kind of non-working TGS support. - -Mon Mar 10 01:43:22 1997 Assar Westerlund - - * lib/asn1/gen.c: reduced generated code by 1/5 - - * lib/asn1/der_put.c: (der_put_length_and_tag): new function - - * lib/asn1/der_get.c (der_match_tag_and_length): new function - - * lib/asn1/der.h: added prototypes - -Mon Mar 10 01:15:43 1997 Johan Danielsson - - * lib/krb5/krb5.h: Include . Add prototype for - krb5_rd_req_with_keyblock. - - * lib/krb5/rd_req.c: Add function krb5_rd_req_with_keyblock that - takes a precomputed keyblock. - - * lib/krb5/get_cred.c: Use krb5_mk_req rather than inlined code. - - * lib/krb5/mk_req.c: Calculate checksum of in_data. - -Sun Mar 9 21:17:58 1997 Johan Danielsson - - * lib/krb5/error/compile_et.awk: Add a declaration of struct - error_list, and multiple inclusion block to header files. - -Sun Mar 9 21:01:12 1997 Assar Westerlund - - * lib/krb5/rd_req.c: do some checks on times - - * lib/krb/{mk_priv.c, rd_priv.c, sendauth.c, decrypt.c, - address.c}: new files - - * lib/krb5/auth_context.c: more code - - * configure.in: try to figure out timezone - -Sat Mar 8 11:41:07 1997 Johan Danielsson - - * lib/krb5/error/error.c: Try strerror if error code wasn't found. - - * lib/krb5/get_in_tkt.c: Remove realm parameter from - krb5_get_salt. - - * lib/krb5/context.c: Initialize error table. - - * kdc: The beginnings of a kdc. - -Sat Mar 8 08:16:28 1997 Assar Westerlund - - * lib/krb5/rd_safe.c: new file - - * lib/krb5/checksum.c (krb5_verify_checksum): New function - - * lib/krb5/get_cred.c: use krb5_create_checksum - - * lib/krb5/checksum.c: new file - - * lib/krb5/store.c: no more arithmetic with void* - - * lib/krb5/cache.c: now seems to work again - -Sat Mar 8 06:58:09 1997 Johan Danielsson - - * lib/krb5/Makefile.am: Add asn1_glue.c and error/*.c to libkrb5. - - * lib/krb5/get_in_tkt.c: Moved some functions to asn1_glue.c. - - * lib/krb5/asn1_glue.c: Moved some asn1-stuff here. - - * lib/krb5/{cache,keytab}.c: Use new storage functions. - - * lib/krb5/krb5.h: Protypes for new storage functions. - - * lib/krb5/krb5.h: Make krb5_{ret,store}_* functions able to write - data to more than file descriptors. - -Sat Mar 8 01:01:17 1997 Assar Westerlund - - * lib/krb5/encrypt.c: New file. - - * lib/krb5/Makefile.am: More -I - - * configure.in: Test for big endian, random, rand, setitimer - - * lib/asn1/gen.c: perhaps even decodes bitstrings - -Thu Mar 6 19:05:29 1997 Johan Danielsson - - * lib/krb5/config_file.y: Better return values on error. - -Sat Feb 8 15:59:56 1997 Assar Westerlund - - * lib/asn1/parse.y: ifdef HAVE_STRDUP - - * lib/asn1/lex.l: ifdef strdup - brange-dead version of list of special characters to make stupid - lex accept it. - - * lib/asn1/gen.c: A DER integer should really be a `unsigned' - - * lib/asn1/der_put.c: A DER integer should really be a `unsigned' - - * lib/asn1/der_get.c: A DER integer should really be a `unsigned' - - * lib/krb5/error/Makefile.am: It seems "$(SHELL) ./compile_et" is - needed. - - * lib/krb/mk_rep.c, lib/krb/rd_req.c, lib/krb/store.c, - lib/krb/store.h: new files. - - * lib/krb5/keytab.c: now even with some functionality. - - * lib/asn1/gen.c: changed paramater from void * to Foo * - - * lib/asn1/der_get.c (der_get_octet_string): Fixed bug with empty - string. - -Sun Jan 19 06:17:39 1997 Assar Westerlund - - * lib/krb5/get_cred.c (krb5_get_credentials): Check for creds in - cc before getting new ones. - - * lib/krb5/krb5.h (krb5_free_keyblock): Fix prototype. - - * lib/krb5/build_auth.c (krb5_build_authenticator): It seems the - CRC should be stored LSW first. (?) - - * lib/krb5/auth_context.c: Implement `krb5_auth_con_getkey' and - `krb5_free_keyblock' - - * lib/**/Makefile.am: Rename foo libfoo.a - - * include/Makefile.in: Use test instead of [ - -e does not work with /bin/sh on psoriasis - - * configure.in: Search for awk - create lib/krb/error/compile_et - -Tue Jan 14 03:46:26 1997 Assar Westerlund - - * lib/krb5/Makefile.am: replaced mit-crc.c by crc.c - -Wed Dec 18 00:53:55 1996 Johan Danielsson - - * kuser/kinit.c: Guess principal. - - * lib/krb5/error/compile_et.awk: Don't include krb5.h. Fix some - warnings. - - * lib/krb5/error/asn1_err.et: Add ASN.1 error messages. - - * lib/krb5/mk_req.c: Get client from cache. - - * lib/krb5/cache.c: Add better error checking some useful return - values. - - * lib/krb5/krb5.h: Fix krb5_auth_context. - - * lib/asn1/der.h: Make krb5_data compatible with krb5.h - -Tue Dec 17 01:32:36 1996 Johan Danielsson - - * lib/krb5/error: Add primitive error library. - -Mon Dec 16 16:30:20 1996 Johan Danielsson - - * lib/krb5/cache.c: Get correct address type from cache. - - * lib/krb5/krb5.h: Change int16 to int to be compatible with asn1. - diff --git a/kerberosV/src/ChangeLog.1999 b/kerberosV/src/ChangeLog.1999 deleted file mode 100644 index e022b968246..00000000000 --- a/kerberosV/src/ChangeLog.1999 +++ /dev/null @@ -1,2194 +0,0 @@ -1999-12-30 Assar Westerlund - - * configure.in (krb4): use `-ldes' in tests - -1999-12-26 Assar Westerlund - - * lib/hdb/print.c (event2string): handle events without principal. - From Luke Howard - -1999-12-25 Assar Westerlund - - * Release 0.2j - -Tue Dec 21 18:03:17 1999 Assar Westerlund - - * lib/hdb/Makefile.am (asn1_files): add $(EXEEXT) for cygwin and - related systems - - * lib/asn1/Makefile.am (asn1_files): add $(EXEEXT) for cygwin and - related systems - - * include/Makefile.am (krb5-types.h): add $(EXEEXT) for cygwin and - related systems - -1999-12-20 Assar Westerlund - - * Release 0.2i - -1999-12-20 Assar Westerlund - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): bump version to 6:3:1 - - * lib/krb5/send_to_kdc.c (send_via_proxy): free data - * lib/krb5/send_to_kdc.c (send_via_proxy): new function use - getaddrinfo instead of gethostbyname{,2} - * lib/krb5/get_for_creds.c: use getaddrinfo instead of - getnodebyname{,2} - -1999-12-17 Assar Westerlund - - * Release 0.2h - -1999-12-17 Assar Westerlund - - * Release 0.2g - -1999-12-16 Assar Westerlund - - * lib/krb5/Makefile.am: bump version to 6:2:1 - - * lib/krb5/principal.c (krb5_sname_to_principal): handle - ai_canonname not being set - * lib/krb5/expand_hostname.c (krb5_expand_hostname): handle - ai_canonname not being set - - * appl/test/uu_server.c: print messages to stderr - * appl/test/tcp_server.c: print messages to stderr - * appl/test/nt_gss_server.c: print messages to stderr - * appl/test/gssapi_server.c: print messages to stderr - - * appl/test/tcp_client.c (proto): remove shadowing `context' - * appl/test/common.c (client_doit): add forgotten ntohs - -1999-12-13 Assar Westerlund - - * configure.in (VERISON): bump to 0.2g-pre - -1999-12-12 Assar Westerlund - - * lib/krb5/principal.c (krb5_425_conv_principal_ext): be more - robust and handle extra dot at the beginning of default_domain - -1999-12-12 Assar Westerlund - - * Release 0.2f - -1999-12-12 Assar Westerlund - - * lib/krb5/Makefile.am: bump version to 6:1:1 - - * lib/krb5/changepw.c (get_kdc_address): use - `krb5_get_krb_changepw_hst' - - * lib/krb5/krbhst.c (krb5_get_krb_changepw_hst): add - - * lib/krb5/get_host_realm.c: add support for _kerberos.domain - (according to draft-ietf-cat-krb-dns-locate-01.txt) - -1999-12-06 Assar Westerlund - - * Release 0.2e - -1999-12-06 Assar Westerlund - - * lib/krb5/changepw.c (krb5_change_password): use the correct - address - - * lib/krb5/Makefile.am: bump version to 6:0:1 - - * lib/asn1/Makefile.am: bump version to 1:4:0 - -1999-12-04 Assar Westerlund - - * configure.in: move AC_KRB_IPv6 to make sure it's performed - before AC_BROKEN - (el_init): use new feature of AC_FIND_FUNC_NO_LIBS - - * appl/test/uu_client.c: use client_doit - * appl/test/test_locl.h (client_doit): add prototype - * appl/test/tcp_client.c: use client_doit - * appl/test/nt_gss_client.c: use client_doit - * appl/test/gssapi_client.c: use client_doit - * appl/test/common.c (client_doit): move identical code here and - start using getaddrinfo - - * appl/kf/kf.c (doit): rewrite to use getaddrinfo - * kdc/hprop.c: re-write to use getaddrinfo - * lib/krb5/principal.c (krb5_sname_to_principal): use getaddrinfo - * lib/krb5/expand_hostname.c (krb5_expand_hostname): use - getaddrinfo - * lib/krb5/changepw.c: re-write to use getaddrinfo - * lib/krb5/addr_families.c (krb5_parse_address): use getaddrinfo - -1999-12-03 Assar Westerlund - - * configure.in (BROKEN): check for freeaddrinfo, getaddrinfo, - getnameinfo, gai_strerror - (socklen_t): check for - -1999-12-02 Johan Danielsson - - * lib/krb5/crypto.c: ARCFOUR_set_key -> RC4_set_key - -1999-11-23 Assar Westerlund - - * lib/krb5/crypto.c (ARCFOUR_string_to_key): change order of bytes - within unicode characters. this should probably be done in some - arbitrarly complex way to do it properly and you would have to - know what character encoding was used for the password and salt - string. - - * lib/krb5/addr_families.c (ipv4_uninteresting): ignore 0.0.0.0 - (INADDR_ANY) - (ipv6_uninteresting): remove unused macro - -1999-11-22 Johan Danielsson - - * lib/krb5/krb5.h: rc4->arcfour - - * lib/krb5/crypto.c: rc4->arcfour - -1999-11-17 Assar Westerlund - - * lib/krb5/krb5_locl.h: add - * lib/krb5/krb5.h (krb5_keytype): add KEYTYPE_RC4 - * lib/krb5/crypto.c: some code for doing RC4/MD5/HMAC which might - not be totally different from some small company up in the - north-west corner of the US - - * lib/krb5/get_addrs.c (find_all_addresses): change code to - actually increment buf_size - -1999-11-14 Assar Westerlund - - * lib/krb5/krb5.h (krb5_context_data): add `scan_interfaces' - * lib/krb5/get_addrs.c (krb5_get_all_client_addrs): make interaces - scanning optional - * lib/krb5/context.c (init_context_from_config_file): set - `scan_interfaces' - - * lib/krb5/Makefile.am (libkrb5_la_SOURCES): add add_et_list.c - * lib/krb5/add_et_list.c (krb5_add_et_list): new function - -1999-11-12 Assar Westerlund - - * lib/krb5/get_default_realm.c (krb5_get_default_realm, - krb5_get_default_realms): set realms if they were unset - * lib/krb5/context.c (init_context_from_config_file): don't - initialize default realms here. it's done lazily instead. - - * lib/krb5/krb5.h (KRB5_TC_*): make constants unsigned - * lib/asn1/gen_glue.c (generate_2int, generate_units): make sure - bit constants are unsigned - * lib/asn1/gen.c (define_type): make length in sequences be - unsigned. - - * configure.in: remove duplicate test for setsockopt test for - struct tm.tm_isdst - - * lib/krb5/get_in_tkt.c (krb5_get_in_cred): generate - preauthentication information if we get back ERR_PREAUTH_REQUIRED - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_password): remove - preauthentication generation code. it's now in krb5_get_in_cred - - * configure.in (AC_BROKEN_SNPRINTF): add strptime check for struct - tm.tm_gmtoff and timezone - -1999-11-11 Johan Danielsson - - * kdc/main.c: make this work with multi-db - - * kdc/kdc_locl.h: make this work with multi-db - - * kdc/config.c: make this work with multi-db - -1999-11-09 Johan Danielsson - - * kdc/misc.c: update for multi-database code - - * kdc/main.c: update for multi-database code - - * kdc/kdc_locl.h: update - - * kdc/config.c: allow us to have more than one database - -1999-11-04 Assar Westerlund - - * Release 0.2d - - * lib/krb5/Makefile.am: bump version to 5:0:0 to be safe - (krb5_context_data has changed and some code do (might) access - fields directly) - - * lib/krb5/krb5.h (krb5_context_data): add `etypes_des' - - * lib/krb5/get_cred.c (init_tgs_req): use - krb5_keytype_to_enctypes_default - - * lib/krb5/crypto.c (krb5_keytype_to_enctypes_default): new - function - - * lib/krb5/context.c (set_etypes): new function - (init_context_from_config_file): set both `etypes' and `etypes_des' - -1999-11-02 Assar Westerlund - - * configure.in (VERSION): bump to 0.2d-pre - -1999-10-29 Assar Westerlund - - * lib/krb5/principal.c (krb5_parse_name): check memory allocations - -1999-10-28 Assar Westerlund - - * Release 0.2c - - * lib/krb5/dump_config.c (print_tree): check for empty tree - - * lib/krb5/string-to-key-test.c (tests): update the test cases - with empty principals so that they actually use an empty realm and - not the default. use the correct etype for 3DES - - * lib/krb5/Makefile.am: bump version to 4:1:0 - - * kdc/config.c (configure): more careful with the port string - -1999-10-26 Assar Westerlund - - * Release 0.2b - -1999-10-20 Assar Westerlund - - * lib/krb5/Makefile.am: bump version to 4:0:0 - (krb524_convert_creds_kdc and potentially some other functions - have changed prototypes) - - * lib/hdb/Makefile.am: bump version to 4:0:1 - - * lib/asn1/Makefile.am: bump version to 1:3:0 - - * configure.in (LIB_roken): add dbopen. getcap in roken - references dbopen and with shared libraries we need to add this - dependency. - - * lib/krb5/verify_krb5_conf.c (main): support speicifying the - configuration file to test on the command line - - * lib/krb5/config_file.c (parse_binding): handle line with no - whitespace before = - (krb5_config_parse_file_debug): set lineno earlier so that we don't - use it unitialized - - * configure.in (AM_INIT_AUTOMAKE): bump to 0.2b-pre opt*: need - more include files for these tests - - * lib/krb5/set_default_realm.c (krb5_set_default_realm): use - krb5_config_get_strings, which means that your configuration file - should look like: - - [libdefaults] - default_realm = realm1 realm2 realm3 - - * lib/krb5/set_default_realm.c (config_binding_to_list): fix - copy-o. From Michal Vocu - - * kdc/config.c (configure): add a missing strdup. From Michal - Vocu - -1999-10-17 Assar Westerlund - - * Release 0.2a - - * configure.in: only test for db.h with using berkeley_db. remember - to link with LIB_tgetent when checking for el_init. add xnlock - - * appl/Makefile.am: add xnlock - - * kdc/kerberos5.c (find_etype): support null keys - - * kdc/kerberos4.c (get_des_key): support null keys - - * lib/krb5/crypto.c (krb5_get_wrapped_length): more correct - calculation - -1999-10-16 Johan Danielsson - - * kuser/kinit.c (main): pass ccache to krb524_convert_creds_kdc - -1999-10-12 Johan Danielsson - - * lib/krb5/crypto.c (krb5_enctype_to_keytype): remove warning - -1999-10-10 Assar Westerlund - - * lib/krb5/mk_req.c (krb5_mk_req): use krb5_free_host_realm - - * lib/krb5/krb5.h (krb5_ccache_data): make `ops' const - - * lib/krb5/crypto.c (krb5_string_to_salttype): new function - - * **/*.[ch]: const-ize - -1999-10-06 Assar Westerlund - - * lib/krb5/creds.c (krb5_compare_creds): const-ify - - * lib/krb5/cache.c: clean-up and comment-up - - * lib/krb5/copy_host_realm.c (krb5_copy_host_realm): copy all the - strings - - * lib/krb5/verify_user.c (krb5_verify_user_lrealm): free the - correct realm part - - * kdc/connect.c (handle_tcp): things work much better when ret is - initialized - -1999-10-03 Assar Westerlund - - * lib/krb5/convert_creds.c (krb524_convert_creds_kdc): look at the - type of the session key - - * lib/krb5/crypto.c (krb5_enctypes_compatible_keys): spell - correctly - - * lib/krb5/creds.c (krb5_compare_creds): fix spelling of - krb5_enctypes_compatible_keys - - * lib/krb5/convert_creds.c (krb524_convert_creds_kdc): get new - credentials from the KDC if the existing one doesn't have a DES - session key. - - * lib/45/get_ad_tkt.c (get_ad_tkt): update to new - krb524_convert_creds_kdc - -1999-10-03 Johan Danielsson - - * lib/krb5/keytab_keyfile.c: make krb5_akf_ops const - - * lib/krb5/keytab_memory.c: make krb5_mkt_ops const - - * lib/krb5/keytab_file.c: make krb5_fkt_ops const - -1999-10-01 Assar Westerlund - - * lib/krb5/config_file.c: rewritten to allow error messages - - * lib/krb5/Makefile.am (bin_PROGRAMS): add verify_krb5_conf - (libkrb5_la_SOURCES): add config_file_netinfo.c - - * lib/krb5/verify_krb5_conf.c: new program for verifying that - krb5.conf is corret - - * lib/krb5/config_file_netinfo.c: moved netinfo code here from - config_file.c - -1999-09-28 Assar Westerlund - - * kdc/hpropd.c (dump_krb4): kludge default_realm - - * lib/asn1/check-der.c: add test cases for Generalized time and - make sure we return the correct value - - * lib/asn1/der_put.c: simplify by using der_put_length_and_tag - - * lib/krb5/verify_user.c (krb5_verify_user_lrealm): ariant of - krb5_verify_user that tries in all the local realms - - * lib/krb5/set_default_realm.c: add support for having several - default realms - - * lib/krb5/kuserok.c (krb5_kuserok): use `krb5_get_default_realms' - - * lib/krb5/get_default_realm.c (krb5_get_default_realms): add - - * lib/krb5/krb5.h (krb5_context_data): change `default_realm' to - `default_realms' - - * lib/krb5/context.c: change from `default_realm' to - `default_realms' - - * lib/krb5/aname_to_localname.c (krb5_aname_to_localname): use - krb5_get_default_realms - - * lib/krb5/Makefile.am (libkrb5_la_SOURCES): add copy_host_realm.c - - * lib/krb5/copy_host_realm.c: new file - -1999-09-27 Johan Danielsson - - * lib/asn1/der_put.c (encode_generalized_time): encode length - - * lib/krb5/recvauth.c: new function `krb5_recvauth_match_version' - that allows more intelligent matching of the application version - -1999-09-26 Assar Westerlund - - * lib/asn1/asn1_print.c: add err.h - - * kdc/config.c (configure): use parse_bytes - - * appl/test/nt_gss_common.c: use the correct header file - -1999-09-24 Johan Danielsson - - * kuser/klist.c: add a `--cache' flag - - * kuser/kinit.c (main): only get default value for `get_v4_tgt' if - it's explicitly set in krb5.conf - -1999-09-23 Assar Westerlund - - * lib/asn1/asn1_print.c (tag_names); add another univeral tag - - * lib/asn1/der.h: update universal tags - -1999-09-22 Assar Westerlund - - * lib/asn1/asn1_print.c (loop): print length of octet string - -1999-09-21 Johan Danielsson - - * admin/ktutil.c (kt_get): add `--help' - -1999-09-21 Assar Westerlund - - * kuser/Makefile.am: add kdecode_ticket - - * kuser/kdecode_ticket.c: new debug program - - * appl/test/nt_gss_server.c: new program to test against `Sample * - SSPI Code' in Windows 2000 RC1 SDK. - - * appl/test/Makefile.am: add nt_gss_client and nt_gss_server - - * lib/asn1/der_get.c (decode_general_string): remember to advance - ret over the length-len - - * lib/asn1/Makefile.am: add asn1_print - - * lib/asn1/asn1_print.c: new program for printing DER-structures - - * lib/asn1/der_put.c: make functions more consistent - - * lib/asn1/der_get.c: make functions more consistent - -1999-09-20 Johan Danielsson - - * kdc/kerberos5.c: be more informative in pa-data error messages - -1999-09-16 Assar Westerlund - - * configure.in: test for strlcpy, strlcat - -1999-09-14 Assar Westerlund - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_password): return - KRB5_LIBOS_PWDINTR when interrupted - - * lib/krb5/get_in_tkt_pw.c (krb5_password_key_proc): check return - value from des_read_pw_string - - * kuser/kinit.c (main): don't print any error if reading the - password was interrupted - - * kpasswd/kpasswd.c (main): don't print any error if reading the - password was interrupted - - * kdc/string2key.c (main): check the return value from fgets - - * kdc/kstash.c (main): check return value from des_read_pw_string - - * admin/ktutil.c (kt_add): check the return-value from fgets and - overwrite the password for paranoid reasons - - * lib/krb5/keytab_keyfile.c (get_cell_and_realm): only remove the - newline if it's there - -1999-09-13 Assar Westerlund - - * kdc/hpropd.c (main): remove bogus error with `--print'. remove - sysloging of number of principals transferred - - * kdc/hprop.c (ka_convert): set flags correctly for krbtgt/CELL - principals - (main): get rid of bogus opening of hdb database when propagating - ka-server database - -1999-09-12 Assar Westerlund - - * lib/krb5/krb5_locl.h (O_BINARY): add fallback definition - - * lib/krb5/krb5.h (krb5_context_data): add keytab types - - * configure.in: revert back awk test, not worked around in - roken.awk - - * lib/krb5/keytab_krb4.c: remove O_BINARY - - * lib/krb5/keytab_keyfile.c: some support for AFS KeyFile's. From - Love - - * lib/krb5/keytab_file.c: remove O_BINARY - - * lib/krb5/keytab.c: move the list of keytab types to the context - - * lib/krb5/fcache.c: remove O_BINARY - - * lib/krb5/context.c (init_context_from_config_file): register all - standard cache and keytab types - (krb5_free_context): free `kt_types' - - * lib/krb5/cache.c (krb5_cc_resolve): move the registration of the - standard types of credential caches to context - - * lib/krb5/Makefile.am (libkrb5_la_SOURCES): add keytab_keyfile.c - -1999-09-10 Assar Westerlund - - * lib/krb5/keytab.c: add comments and clean-up - - * admin/ktutil.c: add `ktutil copy' - - * lib/krb5/keytab_krb4.c: new file - - * lib/krb5/krb5.h (krb5_kt_cursor): add a `data' field - - * lib/krb5/Makefile.am: add keytab_krb4.c - - * lib/krb5/keytab.c: add krb4 and correct some if's - - * admin/srvconvert.c (srvconv): move common code - - * lib/krb5/krb5.h (krb5_fkt_ops, krb5_mkt_ops): new variables - - * lib/krb5/keytab.c: move out file and memory functions - - * lib/krb5/Makefile.am (libkrb5_la_SOURCES): add keytab_file.c, - keytab_memory.c - - * lib/krb5/keytab_memory.c: new file - - * lib/krb5/keytab_file.c: new file - - * kpasswd/kpasswdd.c: move out password quality functions - -1999-09-07 Assar Westerlund - - * lib/hdb/Makefile.am (libhdb_la_SOURCES): add keytab.c. From - Love - - * lib/krb5/convert_creds.c (krb524_convert_creds_kdc): check - return value from `krb5_sendto_kdc' - -1999-09-06 Assar Westerlund - - * lib/krb5/send_to_kdc.c (send_and_recv): rename to recv_loop and - remove the sending of data. add a parameter `limit'. let callers - send the date themselves (and preferably with net_write on tcp - sockets) - (send_and_recv_tcp): read first the length field and then only that - many bytes - -1999-09-05 Assar Westerlund - - * kdc/connect.c (handle_tcp): try to print warning `TCP data of - strange type' less often - - * lib/krb5/send_to_kdc.c (send_and_recv): handle EINTR properly. - return on EOF. always free data. check return value from - realloc. - (send_and_recv_tcp, send_and_recv_http): check advertised length - against actual length - -1999-09-01 Johan Danielsson - - * configure.in: check for sgi capabilities - -1999-08-27 Johan Danielsson - - * lib/krb5/get_addrs.c: krb5_get_all_server_addrs shouldn't return - extra addresses - - * kpasswd/kpasswdd.c: use HDB keytabs; change some error messages; - add --realm flag - - * lib/krb5/address.c (krb5_append_addresses): remove duplicates - -1999-08-26 Johan Danielsson - - * lib/hdb/keytab.c: HDB keytab backend - -1999-08-25 Johan Danielsson - - * lib/krb5/keytab.c - (krb5_kt_{start_seq_get,next_entry,end_seq_get}): check for NULL - pointer - -1999-08-24 Johan Danielsson - - * kpasswd/kpasswdd.c: add `--keytab' flag - -1999-08-23 Assar Westerlund - - * lib/krb5/addr_families.c (IN6_ADDR_V6_TO_V4): use `s6_addr' - instead of the non-standard `s6_addr32'. From Yoshinobu Inoue - by way of the KAME repository - -1999-08-18 Assar Westerlund - - * configure.in (--enable-new-des3-code): remove check for `struct - addrinfo' - - * lib/krb5/crypto.c (etypes): remove NEW_DES3_CODE, enable - des3-cbc-sha1 and keep old-des3-cbc-sha1 for backwards - compatability - - * lib/krb5/krb5.h (krb5_enctype): des3-cbc-sha1 (with key - derivation) just got assigned etype 16 by . keep the - old etype at 7. - -1999-08-16 Assar Westerlund - - * lib/krb5/sendauth.c (krb5_sendauth): only look at errno if - krb5_net_read actually returns -1 - - * lib/krb5/recvauth.c (krb5_recvauth): only look at errno if - krb5_net_read actually returns -1 - - * appl/kf/kf.c (proto): don't trust errno if krb5_net_read hasn't - returned -1 - - * appl/test/tcp_server.c (proto): only trust errno if - krb5_net_read actually returns -1 - - * appl/kf/kfd.c (proto): be more careful with the return value - from krb5_net_read - -1999-08-13 Assar Westerlund - - * lib/krb5/get_addrs.c (get_addrs_int): try the different ways - sequentially instead of just one. this helps if your heimdal was - built with v6-support but your kernel doesn't have it, for - example. - -1999-08-12 Assar Westerlund - - * kdc/hpropd.c: add inetd flag. default means try to figure out - if stdin is a socket or not. - - * Makefile.am (ACLOCAL): just use `cf', this variable is only used - when the current directory is $(top_srcdir) anyways and having - $(top_srcdir) there breaks if it's a relative path - -1999-08-09 Johan Danielsson - - * configure.in: check for setproctitle - -1999-08-05 Assar Westerlund - - * lib/krb5/principal.c (krb5_sname_to_principal): remember to call - freehostent - - * appl/test/tcp_client.c: call freehostent - - * appl/kf/kf.c (doit): call freehostent - - * appl/kf/kf.c: make v6 friendly and simplify - - * appl/kf/kfd.c: make v6 friendly and simplify - - * appl/test/tcp_server.c: simplify by using krb5_err instead of - errx - - * appl/test/tcp_client.c: simplify by using krb5_err instead of - errx - - * appl/test/tcp_server.c: make v6 friendly and simplify - - * appl/test/tcp_client.c: make v6 friendly and simplify - -1999-08-04 Assar Westerlund - - * Release 0.1m - -1999-08-04 Assar Westerlund - - * kuser/kinit.c (main): some more KRB4-conditionalizing - - * lib/krb5/get_in_tkt.c: type correctness - - * lib/krb5/get_for_creds.c (krb5_fwd_tgs_creds): set forwarded in - flags. From Miroslav Ruda - - * kuser/kinit.c (main): add config file support for forwardable - and krb4 support. From Miroslav Ruda - - * kdc/kerberos5.c (as_rep): add an empty X500-compress string as - transited. - (fix_transited_encoding): check length. - From Miroslav Ruda - - * kdc/hpropd.c (dump_krb4): check the realm so that we don't dump - principals in some other realm. From Miroslav Ruda - - (main): rename sa_len -> sin_len, sa_lan is a define on some - platforms. - - * appl/kf/kfd.c: add regpag support. From Miroslav Ruda - - - * appl/kf/kf.c: add `-G' and forwardable option in krb5.conf. - From Miroslav Ruda - - * lib/krb5/config_file.c (parse_list): don't run past end of line - - * appl/test/gss_common.h: new prototypes - - * appl/test/gssapi_client.c: use gss_err instead of abort - - * appl/test/gss_common.c (gss_verr, gss_err): add - -1999-08-03 Assar Westerlund - - * lib/krb5/Makefile.am (n_fold_test_LDADD): need to set this - otherwise it doesn't build with shared libraries - - * kdc/hpropd.c: v6-ify - - * kdc/hprop.c: v6-ify - -1999-08-01 Assar Westerlund - - * lib/krb5/mk_req.c (krb5_mk_req): use krb5_expand_hostname - -1999-07-31 Assar Westerlund - - * lib/krb5/get_host_realm.c (krb5_get_host_realm_int): new - function that takes a FQDN - - * lib/krb5/Makefile.am (libkrb5_la_SOURCES): add exapnd_hostname.c - - * lib/krb5/expand_hostname.c: new file - -1999-07-28 Assar Westerlund - - * Release 0.1l - -1999-07-28 Assar Westerlund - - * lib/asn1/Makefile.am: bump version to 1:2:0 - - * lib/krb5/Makefile.am: bump version to 3:1:0 - - * configure.in: more inet_pton to roken - - * lib/krb5/principal.c (krb5_sname_to_principal): use - getipnodebyname - -1999-07-26 Assar Westerlund - - * Release 0.1k - -1999-07-26 Johan Danielsson - - * lib/krb5/Makefile.am: bump version number (changed function - signatures) - - * lib/hdb/Makefile.am: bump version number (changes to some - function signatures) - -1999-07-26 Assar Westerlund - - * lib/krb5/Makefile.am: bump version to 3:0:2 - - * lib/hdb/Makefile.am: bump version to 2:1:0 - - * lib/asn1/Makefile.am: bump version to 1:1:0 - -1999-07-26 Assar Westerlund - - * Release 0.1j - -1999-07-26 Assar Westerlund - - * configure.in: rokenize inet_ntop - - * lib/krb5/store_fd.c: lots of changes from size_t to ssize_t - - * lib/krb5/store_mem.c: lots of changes from size_t to ssize_t - - * lib/krb5/store_emem.c: lots of changes from size_t to ssize_t - - * lib/krb5/store.c: lots of changes from size_t to ssize_t - (krb5_ret_stringz): check return value from realloc - - * lib/krb5/mk_safe.c: some type correctness - - * lib/krb5/mk_priv.c: some type correctness - - * lib/krb5/krb5.h (krb5_storage): change return values of - functions from size_t to ssize_t - -1999-07-24 Assar Westerlund - - * Release 0.1i - - * configure.in (AC_PROG_AWK): disable. mawk seems to mishandle \# - in lib/roken/roken.awk - - * lib/krb5/get_addrs.c (find_all_addresses): try to use SA_LEN to - step over addresses if there's no `sa_lan' field - - * lib/krb5/sock_principal.c (krb5_sock_to_principal): simplify by - using `struct sockaddr_storage' - - * lib/krb5/send_to_kdc.c (krb5_sendto_kdc): simplify by using - `struct sockaddr_storage' - - * lib/krb5/changepw.c (krb5_change_password): simplify by using - `struct sockaddr_storage' - - * lib/krb5/auth_context.c (krb5_auth_con_setaddrs_from_fd): - simplify by using `struct sockaddr_storage' - - * kpasswd/kpasswdd.c (*): simplify by using `struct - sockaddr_storage' - - * kdc/connect.c (*): simplify by using `struct sockaddr_storage' - - * configure.in (sa_family_t): just test for existence - (sockaddr_storage): also specify include file - - * configure.in (AM_INIT_AUTOMAKE): bump version to 0.1i - (sa_family_t): test for - (struct sockaddr_storage): test for - - * kdc/hprop.c (propagate_database): typo, NULL should be - auth_context - - * lib/krb5/get_addrs.c: conditionalize on HAVE_IPV6 instead of - AF_INET6 - - * appl/kf/kf.c (main): use warnx - - * appl/kf/kf.c (proto): remove shadowing context - - * lib/krb5/get_addrs.c (find_all_addresses): try to handle the - case of getting back an `sockaddr_in6' address when sizeof(struct - sockaddr_in6) > sizeof(struct sockaddr) and we have no sa_len to - tell us how large the address is. This obviously doesn't work - with unknown protocol types. - -1999-07-24 Assar Westerlund - - * Release 0.1h - -1999-07-23 Assar Westerlund - - * appl/kf/kfd.c: clean-up and more paranoia - - * etc/services.append: add kf - - * appl/kf/kf.c: rename tk_file to ccache for consistency. clean-up - -1999-07-22 Assar Westerlund - - * lib/krb5/n-fold-test.c (main): print the correct data - - * appl/Makefile.am (SUBDIRS): add kf - - * appl/kf: new program. From Miroslav Ruda - - * kdc/hprop.c: declare some variables unconditionally to simplify - things - - * kpasswd/kpasswdd.c: initialize kadm5 connection for every change - (otherwise the modifier in the database doesn't get set) - - * kdc/hpropd.c: clean-up and re-organize - - * kdc/hprop.c: clean-up and re-organize - - * configure.in (SunOS): define to xy for SunOS x.y - -1999-07-19 Assar Westerlund - - * configure.in (AC_BROKEN): test for copyhostent, freehostent, - getipnodebyaddr, getipnodebyname - -1999-07-15 Assar Westerlund - - * lib/asn1/check-der.c: more test cases for integers - - * lib/asn1/der_length.c (length_int): handle the case of the - largest negative integer by not calling abs - -1999-07-14 Assar Westerlund - - * lib/asn1/check-der.c (generic_test): check malloc return value - properly - - * lib/krb5/Makefile.am: add string_to_key_test - - * lib/krb5/prog_setup.c (krb5_program_setup): always initialize - the context - - * lib/krb5/n-fold-test.c (main): return a relevant return value - - * lib/krb5/krbhst.c: do SRV lookups for admin server as well. - some clean-up. - -1999-07-12 Assar Westerlund - - * configure.in: handle not building X programs - -1999-07-06 Assar Westerlund - - * lib/krb5/addr_families.c (ipv6_parse_addr): remove duplicate - variable - (ipv6_sockaddr2port): fix typo - - * etc/services.append: beginning of a file with services - - * lib/krb5/cache.c (krb5_cc_resolve): fall-back to files if - there's no prefix. also clean-up a little bit. - - * kdc/hprop.c (--kaspecials): new flag for handling special KA - server entries. From "Brandon S. Allbery KF8NH" - - -1999-07-05 Assar Westerlund - - * kdc/connect.c (handle_tcp): make sure we have data before - starting to look for HTTP - - * kdc/connect.c (handle_tcp): always do getpeername, we can't - trust recvfrom to return anything sensible - -1999-07-04 Assar Westerlund - - * lib/krb5/get_in_tkt.c (add_padat): encrypt pre-auth data with - all enctypes - - * kpasswd/kpasswdd.c (change): fetch the salt-type from the entry - - * admin/srvconvert.c (srvconv): better error messages - -1999-07-03 Assar Westerlund - - * lib/krb5/principal.c (unparse_name): error check malloc properly - - * lib/krb5/get_in_tkt.c (krb5_init_etype): error check malloc - properly - - * lib/krb5/crypto.c (*): do some malloc return-value checks - properly - - * lib/hdb/hdb.c (hdb_process_master_key): simplify by using - krb5_data_alloc - - * lib/hdb/hdb.c (hdb_process_master_key): check return value from - malloc - - * lib/asn1/gen_decode.c (decode_type): fix generation of decoding - information for TSequenceOf. - - * kdc/kerberos5.c (get_pa_etype_info): check return value from - malloc - -1999-07-02 Assar Westerlund - - * lib/asn1/der_copy.c (copy_octet_string): don't fail if length == - 0 and malloc returns NULL - -1999-06-29 Assar Westerlund - - * lib/krb5/addr_families.c (ipv6_parse_addr): implement - -1999-06-24 Assar Westerlund - - * lib/krb5/rd_cred.c (krb5_rd_cred): compare the sender's address - as an addrport one - - * lib/krb5/krb5.h (KRB5_ADDRESS_ADDRPORT, KRB5_ADDRESS_IPPORT): - add - (krb5_auth_context): add local and remote port - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): get the - local and remote address and add them to the krb-cred packet - - * lib/krb5/auth_context.c: save the local and remove ports in the - auth_context - - * lib/krb5/address.c (krb5_make_addrport): create an address of - type KRB5_ADDRESS_ADDRPORT from (addr, port) - - * lib/krb5/addr_families.c (krb5_sockaddr2port): new function for - grabbing the port number out of the sockaddr - -1999-06-23 Assar Westerlund - - * admin/srvcreate.c (srvcreate): always take the DES-CBC-MD5 key. - increase possible verbosity. - - * lib/krb5/config_file.c (parse_list): handle blank lines at - another place - - * kdc/connect.c (add_port_string): don't return a value - - * lib/kadm5/init_c.c (get_cred_cache): you cannot reuse the cred - cache if the principals are different. close and NULL the old one - so that we create a new one. - - * configure.in: move around cgywin et al - (LIB_kdb): set at the end of krb4-block - (krb4): test for krb_enable_debug and krb_disable_debug - -1999-06-16 Assar Westerlund - - * kuser/kdestroy.c (main): try to destroy v4 ticket even if the - destruction of the v5 one fails - - * lib/krb5/crypto.c (DES3_postproc): new version that does the - right thing - (*): don't put and recover length in 3DES encoding - other small fixes - -1999-06-15 Assar Westerlund - - * lib/krb5/get_default_principal.c: rewrite to use - get_default_username - - * lib/krb5/Makefile.am: add n-fold-test - - * kdc/connect.c: add fallbacks for all lookups by service name - (handle_tcp): break-up and clean-up - -1999-06-09 Assar Westerlund - - * lib/krb5/addr_families.c (ipv6_uninteresting): don't consider - the loopback address as uninteresting - - * lib/krb5/get_addrs.c: new magic flag to get loopback address if - there are no other addresses. - (krb5_get_all_client_addrs): use that flag - -1999-06-04 Assar Westerlund - - * lib/krb5/crypto.c (HMAC_SHA1_DES3_checksum): don't include the - length - (checksum_sha1, checksum_hmac_sha1_des3): blocksize should be 64 - (encrypt_internal_derived): don't include the length and don't - decrease by the checksum size twice - (_get_derived_key): the constant should be 5 bytes - -1999-06-02 Johan Danielsson - - * configure.in: use KRB_CHECK_X - - * configure.in: check for netinet/ip.h - -1999-05-31 Assar Westerlund - - * kpasswd/kpasswdd.c (setup_passwd_quality_check): conditionalize - on RTLD_NOW - -1999-05-23 Assar Westerlund - - * appl/test/uu_server.c: removed unused stuff - - * appl/test/uu_client.c: removed unused stuff - -1999-05-21 Assar Westerlund - - * kuser/kgetcred.c (main): correct error message - - * lib/krb5/crypto.c (verify_checksum): call (*ct->checksum) - directly, avoiding redundant lookups and memory leaks - - * lib/krb5/auth_context.c (krb5_auth_con_setaddrs_from_fd): free - local and remote addresses - - * lib/krb5/get_default_principal.c (get_logname): also try - $USERNAME - - * lib/asn1/Makefile.am (asn1_files): add $(EXEEXT) - - * lib/krb5/principal.c (USE_RESOLVER): try to define only if we - have a libresolv (currently by checking for res_search) - -1999-05-18 Johan Danielsson - - * kdc/connect.c (handle_tcp): remove %-escapes in request - -1999-05-14 Assar Westerlund - - * Release 0.1g - - * admin/ktutil.c (kt_remove): -t should be -e - - * configure.in (CHECK_NETINET_IP_AND_TCP): use - - * kdc/hpropd.c: support for dumping to krb4. From Miroslav Ruda - - - * admin/ktutil.c (kt_add): new option `--no-salt'. From Miroslav - Ruda - - * configure.in: add cygwin and DOS tests replace sendmsg, recvmsg, - and innetgr with roken versions - - * kuser/kgetcred.c: new program - -Tue May 11 14:09:33 1999 Johan Danielsson - - * lib/krb5/mcache.c: fix paste-o - -1999-05-10 Johan Danielsson - - * configure.in: don't use uname - -1999-05-10 Assar Westerlund - - * acconfig.h (KRB_PUT_INT): if we don't have KRB4 use four - arguments :-) - - * appl/test/uu_server.c (setsockopt): cast to get rid of a warning - - * appl/test/tcp_server.c (setsockopt): cast to get rid of a - warning - - * appl/test/tcp_client.c (proto): call krb5_sendauth with ccache - == NULL - - * appl/test/gssapi_server.c (setsockopt): cast to get rid of a - warning - - * lib/krb5/sendauth.c (krb5_sendauth): handle ccache == NULL by - setting the default ccache. - - * configure.in (getsockopt, setsockopt): test for - (AM_INIT_AUTOMAKE): bump version to 0.1g - - * appl/Makefile.am (SUBDIRS): add kx - - * lib/hdb/convert_db.c (main): handle the case of no master key - -1999-05-09 Assar Westerlund - - * Release 0.1f - - * kuser/kinit.c: add --noaddresses - - * lib/krb5/get_in_tkt.c (init_as_req): interpret `addrs' being an - empty sit of list as to not ask for any addresses. - -1999-05-08 Assar Westerlund - - * acconfig.h (_GNU_SOURCE): define this to enable (used) - extensions on glibc-based systems such as linux - -1999-05-03 Assar Westerlund - - * lib/krb5/get_cred.c (get_cred_from_kdc_flags): allocate and free - `*out_creds' properly - - * lib/krb5/creds.c (krb5_compare_creds): just verify that the - keytypes/enctypes are compatible, not that they are the same - - * kuser/kdestroy.c (cache): const-correctness - -1999-05-03 Johan Danielsson - - * lib/hdb/hdb.c (hdb_set_master_key): initialise master key - version - - * lib/hdb/convert_db.c: add support for upgrading database - versions - - * kdc/misc.c: add flags to fetch - - * kdc/kstash.c: unlink keyfile on failure, chmod to 400 - - * kdc/hpropd.c: add --print option - - * kdc/hprop.c: pass flags to hdb_foreach - - * lib/hdb/convert_db.c: add some flags - - * lib/hdb/Makefile.am: remove extra LDFLAGS, update version to 2; - build prototype headers - - * lib/hdb/hdb_locl.h: update prototypes - - * lib/hdb/print.c: move printable version of entry from kadmin - - * lib/hdb/hdb.c: change hdb_{seal,unseal}_* to check if the key is - sealed or not; add flags to hdb_foreach - - * lib/hdb/ndbm.c: add flags to NDBM_seq, NDBM_firstkey, and - NDBM_nextkey - - * lib/hdb/db.c: add flags to DB_seq, DB_firstkey, and DB_nextkey - - * lib/hdb/common.c: add flags to _hdb_{fetch,store} - - * lib/hdb/hdb.h: add master_key_version to struct hdb, update - prototypes - - * lib/hdb/hdb.asn1: make mkvno optional, update version to 2 - - * configure.in: --enable-netinfo - - * lib/krb5/config_file.c: HAVE_NETINFO_NI_H -> HAVE_NETINFO - - * config.sub: fix for crays - - * config.guess: new version from automake 1.4 - - * config.sub: new version from automake 1.4 - -Wed Apr 28 00:21:17 1999 Assar Westerlund - - * Release 0.1e - - * lib/krb5/mcache.c (mcc_get_next): get the current cursor - correctly - - * acconfig.h: correct definition of KRB_PUT_INT for old krb4 code. - From Ake Sandgren - -1999-04-27 Johan Danielsson - - * kdc/kerberos5.c: fix arguments to decrypt_ticket - -1999-04-25 Assar Westerlund - - * lib/krb5/mk_req_ext.c (krb5_mk_req_internal): try to handle old - DCE secd's that are not able to handle MD5 checksums by defaulting - to MD4 if the keytype was DES-CBC-CRC - - * lib/krb5/mk_req.c (krb5_mk_req): use auth_context->keytype - - * lib/krb5/krb5.h (krb5_auth_context_data): add `keytype' and - `cksumtype' - - * lib/krb5/get_cred.c (make_pa_tgs_req): remove old kludge for - secd - (init_tgs_req): add all supported enctypes for the keytype in - `in_creds->session.keytype' if it's set - - * lib/krb5/crypto.c (F_PSEUDO): new flag for non-protocol - encryption types - (do_checksum): new function - (verify_checksum): take the checksum to use from the checksum message - and not from the crypto struct - (etypes): add F_PSEUDO flags - (krb5_keytype_to_enctypes): new function - - * lib/krb5/auth_context.c (krb5_auth_con_init): initalize keytype - and cksumtype - (krb5_auth_setcksumtype, krb5_auth_getcksumtype): implement - (krb5_auth_setkeytype, krb5_auth_getkeytype): implement - (krb5_auth_setenctype): comment out, it's rather bogus anyway - -Sun Apr 25 16:55:50 1999 Johan Danielsson - - * lib/krb5/krb5_locl.h: fix for stupid aix warnings - - * lib/krb5/fcache.c (erase_file): don't malloc - -Sat Apr 24 18:35:21 1999 Johan Danielsson - - * kdc/config.c: pass context to krb5_config_file_free - - * kuser/kinit.c: add `--fcache-version' to set cache version to - create - - * kuser/klist.c: print cache version if verbose - - * lib/krb5/transited.c (krb5_domain_x500_decode): don't abort - - * lib/krb5/principal.c: abort -> krb5_abortx - - * lib/krb5/mk_rep.c: abort -> krb5_abortx - - * lib/krb5/config_file.c: abort -> krb5_abortx - - * lib/krb5/context.c (init_context_from_config_file): init - fcache_version; add krb5_{get,set}_fcache_version - - * lib/krb5/keytab.c: add support for reading (and writing?) old - version keytabs - - * lib/krb5/cache.c: add krb5_cc_get_version - - * lib/krb5/fcache.c: add support for reading and writing old - version cache files - - * lib/krb5/store_mem.c (krb5_storage_from_mem): zero flags - - * lib/krb5/store_emem.c (krb5_storage_emem): zero flags - - * lib/krb5/store_fd.c (krb5_storage_from_fd): zero flags - - * lib/krb5/store.c: add flags to change how various fields are - stored, used for old cache version support - - * lib/krb5/krb5.h: add support for reading and writing old version - cache files, and keytabs - -Wed Apr 21 00:09:26 1999 Assar Westerlund - - * configure.in: fix test for readline.h remember to link with - $LIB_tgetent when trying linking with readline - - * lib/krb5/init_creds_pw.c (get_init_creds_common): if start_time - is given, request a postdated ticket. - - * lib/krb5/data.c (krb5_data_free): free data as long as it's not - NULL - -Tue Apr 20 20:18:14 1999 Assar Westerlund - - * kpasswd/Makefile.am (kpasswdd_LDADD): add LIB_dlopen - - * lib/krb5/krb5.h (KRB5_VERIFY_AP_REQ_IGNORE_INVALID): add - - * lib/krb5/rd_req.c (krb5_decrypt_ticket): add `flags` and - KRB5_VERIFY_AP_REQ_IGNORE_INVALID for ignoring that the ticket is - invalid - -Tue Apr 20 12:42:08 1999 Johan Danielsson - - * kpasswd/kpasswdd.c: don't try to load library by default; get - library and function name from krb5.conf - - * kpasswd/sample_passwd_check.c: sample password checking - functions - -Mon Apr 19 22:22:19 1999 Assar Westerlund - - * lib/krb5/store.c (krb5_storage_to_data, krb5_ret_data): use - krb5_data_alloc and be careful with checking allocation and sizes. - - * kuser/klist.c (--tokens): conditionalize on KRB4 - - * kuser/kinit.c (renew_validate): set all flags - (main): fix cut-n-paste error when setting start-time - - * kdc/kerberos5.c (check_tgs_flags): starttime of a validate - ticket should be > than current time - (*): send flags to krb5_verify_ap_req and krb5_decrypt_ticket - - * kuser/kinit.c (renew_validate): use the client realm instead of - the local realm when renewing tickets. - - * lib/krb5/get_for_creds.c (krb5_fwd_tgs_creds): compat function - (krb5_get_forwarded_creds): correct freeing of out_creds - - * kuser/kinit.c (renew_validate): hopefully fix up freeing of - memory - - * configure.in: do all the krb4 tests with "$krb4" != "no" - - * lib/krb5/keyblock.c (krb5_free_keyblock_contents): don't zero - keyvalue if it's NULL. noticed by Ake Sandgren - - * lib/krb5/get_in_tkt.c (add_padata): loop over all enctypes - instead of just taking the first one. fix all callers. From - "Brandon S. Allbery KF8NH" - - * kdc/kdc_locl.h (enable_kaserver): declaration - - * kdc/hprop.c (ka_convert): print the failing principal. AFS 3.4a - creates krbtgt.REALMOFCELL as NOTGS+NOSEAL, work around. From - "Brandon S. Allbery KF8NH" - - * kdc/hpropd.c (open_socket): stupid cast to get rid of a warning - - * kdc/connect.c (add_standard_ports, process_request): look at - enable_kaserver. From "Brandon S. Allbery KF8NH" - - - * kdc/config.c: new flag --kaserver and config file option - enable-kaserver. From "Brandon S. Allbery KF8NH" - - -Mon Apr 19 12:32:04 1999 Johan Danielsson - - * configure.in: check for dlopen, and dlfcn.h - - * kpasswd/kpasswdd.c: add support for dlopen:ing password quality - check library - - * configure.in: add appl/su - -Sun Apr 18 15:46:53 1999 Johan Danielsson - - * lib/krb5/cache.c: add krb5_cc_get_type that returns type of a - cache - -Fri Apr 16 17:58:51 1999 Assar Westerlund - - * configure.in: LIB_kdb: -L should be before -lkdb - test for prototype of strsep - -Thu Apr 15 11:34:38 1999 Johan Danielsson - - * lib/krb5/Makefile.am: update version - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): use - ALLOC_SEQ - - * lib/krb5/fcache.c: add some support for reading and writing old - cache formats; - (fcc_store_cred): use krb5_store_creds; (fcc_read_cred): use - krb5_ret_creds - - * lib/krb5/store_mem.c (krb5_storage_from_mem): check malloc, - initialize host_byteorder - - * lib/krb5/store_fd.c (krb5_storage_from_fd): initialize - host_byteorder - - * lib/krb5/store_emem.c (krb5_storage_emem): initialize - host_byteorder - - * lib/krb5/store.c (krb5_storage_set_host_byteorder): add; - (krb5_store_int32,krb5_ret_int32,krb5_store_int16,krb5_ret_int16): - check host_byteorder flag; (krb5_store_creds): add; - (krb5_ret_creds): add - - * lib/krb5/krb5.h (krb5_storage): add `host_byteorder' flag for - storage of numbers - - * lib/krb5/heim_err.et: add `host not found' error - - * kdc/connect.c: don't use data after clearing decriptor - - * lib/krb5/auth_context.c: abort -> krb5_abortx - - * lib/krb5/warn.c: add __attribute__; add *abort functions - - * configure.in: check for __attribute__ - - * kdc/connect.c: log bogus requests - -Tue Apr 13 18:38:05 1999 Johan Danielsson - - * lib/kadm5/create_s.c (kadm5_s_create_principal): create v4 salts - for all DES keys - -1999-04-12 Assar Westerlund - - * lib/krb5/get_cred.c (init_tgs_req): re-structure a little bit - - * lib/krb5/get_cred.c (init_tgs_req): some more error checking - - * lib/krb5/generate_subkey.c (krb5_generate_subkey): check return - value from malloc - -Sun Apr 11 03:47:23 1999 Johan Danielsson - - * lib/krb5/krb5.conf.5: update to reality - - * lib/krb5/krb5_425_conv_principal.3: update to reality - -1999-04-11 Assar Westerlund - - * lib/krb5/get_host_realm.c: handle more than one realm for a host - - * kpasswd/kpasswd.c (main): use krb5_program_setup and - print_version - - * kdc/string2key.c (main): use krb5_program_setup and - print_version - -Sun Apr 11 02:35:58 1999 Johan Danielsson - - * lib/krb5/principal.c (krb5_524_conv_principal): make it actually - work, and check built-in list of host-type first-components - - * lib/krb5/krbhst.c: lookup SRV-records to find a kdc for a realm - - * lib/krb5/context.c: add srv_* flags to context - - * lib/krb5/principal.c: add default v4_name_convert entries - - * lib/krb5/krb5.h: add srv_* flags to context - -Sat Apr 10 22:52:28 1999 Johan Danielsson - - * kadmin/kadmin.c: complain about un-recognised commands - - * admin/ktutil.c: complain about un-recognised commands - -Sat Apr 10 15:41:49 1999 Assar Westerlund - - * kadmin/load.c (doit): fix error message - - * lib/krb5/crypto.c (encrypt_internal): free checksum if lengths - fail to match. - (krb5_get_wrapped_length): new function - - * configure.in: security/pam_modules.h: check for - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_password): kludge - around `ret_as_reply' semantics by only freeing it when ret == 0 - -Fri Apr 9 20:24:04 1999 Assar Westerlund - - * kuser/klist.c (print_cred_verbose): handle the case of a bad - enctype - - * configure.in: test for more header files - (LIB_roken): set - -Thu Apr 8 15:01:59 1999 Johan Danielsson - - * configure.in: fixes for building w/o krb4 - - * ltmain.sh: update to libtool 1.2d - - * ltconfig: update to libtool 1.2d - -Wed Apr 7 23:37:26 1999 Assar Westerlund - - * kdc/hpropd.c: fix some error messages to be more understandable. - - * kdc/hprop.c (ka_dump): remove unused variables - - * appl/test/tcp_server.c: remove unused variables - - * appl/test/gssapi_server.c: remove unused variables - - * appl/test/gssapi_client.c: remove unused variables - -Wed Apr 7 14:05:15 1999 Johan Danielsson - - * lib/krb5/context.c (krb5_get_err_text): long -> krb5_error_code - - * kuser/klist.c: make it compile w/o krb4 - - * kuser/kdestroy.c: make it compile w/o krb4 - - * admin/ktutil.c: fix {srv,key}2{srv,key}tab confusion; add help - strings - -Mon Apr 5 16:13:46 1999 Johan Danielsson - - * configure.in: test for MIPS ABI; new test_package - -Thu Apr 1 11:00:40 1999 Johan Danielsson - - * include/Makefile.am: clean krb5-private.h - - * Release 0.1d - - * kpasswd/kpasswdd.c (doit): pass context to - krb5_get_all_client_addrs - - * kdc/connect.c (init_sockets): pass context to - krb5_get_all_server_addrs - - * lib/krb5/get_in_tkt.c (init_as_req): pass context to - krb5_get_all_client_addrs - - * lib/krb5/get_cred.c (get_cred_kdc_la): pass context to - krb5_get_all_client_addrs - - * lib/krb5/get_addrs.c (get_addrs_int): add extra host addresses - - * lib/krb5/krb5.h: add support for adding an extra set of - addresses - - * lib/krb5/context.c: add support for adding an extra set of - addresses - - * lib/krb5/addr_families.c: add krb5_parse_address - - * lib/krb5/address.c: krb5_append_addresses - - * lib/krb5/config_file.c (parse_binding): don't zap everything - after first whitespace - - * kuser/kinit.c (renew_validate): don't allocate out - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): don't - allocate out_creds - - * lib/krb5/get_cred.c (get_cred_kdc, get_cred_kdc_la): make - out_creds pointer; - (krb5_get_kdc_cred): allocate out_creds; (get_cred_from_kdc_flags): - free more memory - - * lib/krb5/crypto.c (encrypt_internal): free checksum - - * lib/krb5/convert_creds.c (krb524_convert_creds_kdc): free reply, - and ticket - - * kuser/Makefile.am: remove kfoo - - * lib/Makefile.am: add auth - - * lib/kadm5/iprop.h: getarg.h - - * lib/kadm5/replay_log.c: use getarg - - * lib/kadm5/ipropd_slave.c: use getarg - - * lib/kadm5/ipropd_master.c: use getarg - - * lib/kadm5/dump_log.c: use getarg - - * kpasswd/kpasswdd.c: use getarg - - * Makefile.am.common: make a more working check-local target - - * lib/asn1/main.c: use getargs - -Mon Mar 29 20:19:57 1999 Johan Danielsson - - * kuser/klist.c (print_cred_verbose): use krb5_print_address - - * lib/kadm5/server.c: k_{put,get}_int -> _krb5_{put,get}_int - - * lib/krb5/addr_families.c (krb5_print_address): handle unknown - address types; (ipv6_print_addr): print in 16-bit groups (as it - should) - - * lib/krb5/crc.c: crc_{init_table,update} -> - _krb5_crc_{init_table,update} - - * lib/krb5/crypto.c: k_{put,get}_int -> _krb5_{put,get}_int - crc_{init_table,update} -> _krb5_crc_{init_table,update} - - * lib/krb5/send_to_kdc.c: k_{put,get}_int -> _krb5_{put,get}_int - - * lib/krb5/store.c: k_{put,get}_int -> _krb5_{put,get}_int - - * lib/krb5/krb5_locl.h: include krb5-private.h - - * kdc/connect.c (addr_to_string): use krb5_print_address - - * lib/krb5/addr_families.c (krb5_print_address): int -> size_t - - * lib/krb5/addr_families.c: add support for printing ipv6 - addresses, either with inet_ntop, or ugly for-loop - - * kdc/524.c: check that the ticket came from a valid address; use - the address of the connection as the address to put in the v4 - ticket (if this address is AF_INET) - - * kdc/connect.c: pass addr to do_524 - - * kdc/kdc_locl.h: prototype for do_524 - -Sat Mar 27 17:48:31 1999 Johan Danielsson - - * configure.in: check for OSF C2; bind/bitypes.h, getudbnam, - setlim; check for auth modules; siad.h, getpwnam_r; - lib/auth/Makefile, lib/auth/sia/Makefile - - * lib/krb5/crypto.c: n_fold -> _krb5_n_fold - - * lib/krb5/n-fold.c: n_fold -> _krb5_n_fold - -Thu Mar 25 04:35:21 1999 Assar Westerlund - - * lib/kadm5/set_keys.c (_kadm5_set_keys): free salt when zapping - it - - * lib/kadm5/free.c (kadm5_free_principal_ent): free `key_data' - - * lib/hdb/ndbm.c (NDBM_destroy): clear master key - - * lib/hdb/db.c (DB_destroy): clear master key - (DB_open): check malloc - - * kdc/connect.c (init_sockets): free addresses - - * kadmin/kadmin.c (main): make code more consistent. always free - configuration information. - - * kadmin/init.c (create_random_entry): free the entry - -Wed Mar 24 04:02:03 1999 Assar Westerlund - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_password): - re-organize the code to always free `kdc_reply' - - * lib/krb5/get_in_tkt.c (krb5_get_in_cred): be more careful about - freeing memory - - * lib/krb5/fcache.c (fcc_destroy): don't call fcc_close - - * lib/krb5/crypto.c (krb5_crypto_destroy): free `crypto' - - * lib/hdb/hdb_locl.h: try db_185.h first in case db.h is a DB 2.0 - header - - * configure.in (db_185.h): check for - - * admin/srvcreate.c: new file. contributed by Daniel Kouril - - - * admin/ktutil.c: srvcreate: new command - - * kuser/klist.c: add support for printing AFS tokens - - * kuser/kdestroy.c: add support for destroying v4 tickets and AFS - tokens. based on code by Love - - * kuser/Makefile.am (kdestroy_LDADD, klist_LDADD): more libraries - - * configure.in: sys/ioccom.h: test for - - * kuser/klist.c (main): don't print `no ticket file' with --test. - From: Love - - * kpasswd/kpasswdd.c (doit): more braces to make gcc happy - - * kdc/connect.c (init_socket): get rid of a stupid warning - - * include/bits.c (my_strupr): cast away some stupid warnings - -Tue Mar 23 14:34:44 1999 Johan Danielsson - - * lib/krb5/get_host_realm.c (krb5_get_host_realm): no infinite - loops, please - -Tue Mar 23 00:00:45 1999 Assar Westerlund - - * lib/kadm5/Makefile.am (install_build_headers): recover from make - rewriting the names of the headers kludge to help solaris make - - * lib/krb5/Makefile.am: kludge to help solaris make - - * lib/hdb/Makefile.am: kludge to help solaris make - - * configure.in (LIB_kdb): make sure there's a -L option in here by - adding $(LIB_krb4) - - * lib/asn1/gen_glue.c (generate_2int, generate_int2): int -> - unsigned - - * configure.in (SunOS): set to a number KRB4, KRB5 conditionals: - remove the `dnl' to work around an automake flaw - -Sun Mar 21 15:08:49 1999 Johan Danielsson - - * lib/krb5/get_default_realm.c: char* -> krb5_realm - -Sun Mar 21 14:08:30 1999 Johan Danielsson - - * include/bits.c: - - * lib/krb5/Makefile.am: create krb5-private.h - -Sat Mar 20 00:08:59 1999 Assar Westerlund - - * configure.in (gethostname): remove duplicate - -Fri Mar 19 14:48:03 1999 Johan Danielsson - - * lib/hdb/Makefile.am: add version-info - - * lib/gssapi/Makefile.am: add version-info - - * lib/asn1/Makefile.am: use $(x:y=z) make syntax; move check-der - to check_PROGRAMS - - * lib/Makefile.am: add 45 - - * lib/kadm5/Makefile.am: split in client and server libraries - (breaks shared libraries otherwise) - -Thu Mar 18 11:33:30 1999 Johan Danielsson - - * include/kadm5/Makefile.am: clean a lot of header files (since - automake lacks a clean-hook) - - * include/Makefile.am: clean a lot of header files (since automake - lacks a clean-hook) - - * lib/kadm5/Makefile.am: fix build-installation of headers - - * lib/krb5/Makefile.am: remove include_dir hack - - * lib/hdb/Makefile.am: remove include_dir hack - - * lib/asn1/Makefile.am: remove include_dir hack - - * include/Makefile.am: remove include_dir hack - - * doc/whatis.texi: define sub for html - - * configure.in: LIB_kdb, have_err_h, have_fnmatch_h, have_glob_h - - * lib/asn1/Makefile.am: der.h - - * kpasswd/kpasswdd.c: admin.h -> kadm5/admin.h - - * kdc/Makefile.am: remove junk - - * kadmin/Makefile.am: sl.a -> sl.la - - * appl/afsutil/Makefile.am: remove EXTRA_bin_PROGRAMS - - * admin/Makefile.am: sl.a -> sl.la - - * configure.in: condition KRB5; AC_CHECK_XAU - - * Makefile.am: include Makefile.am.common - - * include/kadm5/Makefile.am: include Makefile.am.common; don't - install headers from here - - * include/Makefile.am: include Makefile.am.common; don't install - headers from here - - * doc/Makefile.am: include Makefile.am.common - - * lib/krb5/Makefile.am: include Makefile.am.common - - * lib/kadm5/Makefile.am: include Makefile.am.common - - * lib/hdb/Makefile.am: include Makefile.am.common - - * lib/gssapi/Makefile.am: include Makefile.am.common - - * lib/asn1/Makefile.am: include Makefile.am.common - - * lib/Makefile.am: include Makefile.am.common - - * lib/45/Makefile.am: include Makefile.am.common - - * kuser/Makefile.am: include Makefile.am.common - - * kpasswd/Makefile.am: include Makefile.am.common - - * kdc/Makefile.am: include Makefile.am.common - - * kadmin/Makefile.am: include Makefile.am.common - - * appl/test/Makefile.am: include Makefile.am.common - - * appl/afsutil/Makefile.am: include Makefile.am.common - - * appl/Makefile.am: include Makefile.am.common - - * admin/Makefile.am: include Makefile.am.common - -Wed Mar 17 03:04:38 1999 Assar Westerlund - - * lib/krb5/store.c (krb5_store_stringz): braces fix - - * lib/kadm5/get_s.c (kadm5_s_get_principal): braces fix - - * lib/kadm5/ent_setup.c (_kadm5_setup_entry): braces fix - - * kdc/connect.c (loop): braces fix - - * lib/krb5/config_file.c: cast to unsigned char to make is* happy - - * lib/krb5/log.c (krb5_addlog_dest): more braces to make gcc happy - - * lib/krb5/crypto.c (krb5_verify_checksum): rename C -> cksum to - be consistent - - * kadmin/util.c (timeval2str): more braces to make gcc happy - - * kadmin/load.c: cast in is* to get rid of stupid warning - - * kadmin/dump.c (append_hex): cast in isalnum to get rid of stupid - warning - - * kdc/kaserver.c: malloc checks and fixes - - * lib/krb5/get_host_realm.c (krb5_get_host_realm): include leading - dot (if any) when looking up realms. - -Fri Mar 12 13:57:56 1999 Johan Danielsson - - * lib/krb5/get_host_realm.c: add dns support - - * lib/krb5/set_default_realm.c: use krb5_free_host_realm - - * lib/krb5/free_host_realm.c: check for NULL realmlist - - * lib/krb5/context.c: don't print warning if there is no krb5.conf - -Wed Mar 10 19:29:46 1999 Johan Danielsson - - * configure.in: use AC_WFLAGS - -Mon Mar 8 11:49:43 1999 Johan Danielsson - - * Release 0.1c - - * kuser/klist.c: use print_version - - * kuser/kdestroy.c: use print_version - - * kdc/hpropd.c: use print_version - - * kdc/hprop.c: use print_version - - * kdc/config.c: use print_version - - * kadmin/kadmind.c: use print_version - - * kadmin/kadmin.c: use print_version - - * appl/test/common.c: use print_version - - * appl/afsutil/afslog.c: use print_version - -Mon Mar 1 10:49:14 1999 Johan Danielsson - - * lib/krb5/get_addrs.c: SOCKADDR_HAS_SA_LEN -> - HAVE_STRUCT_SOCKADDR_SA_LEN - - * configure.in, acconfig.h, cf/*: update to automake 1.4/autoconf 2.13 - -Sun Feb 28 18:19:20 1999 Johan Danielsson - - * lib/asn1/gen.c: make `BIT STRING's unsigned - - * lib/asn1/{symbol.h,gen.c}: add TUInteger type - - * lib/krb5/verify_user.c (krb5_verify_user): pass prompter to - krb5_get_init_creds_password - - * lib/krb5/fcache.c (fcc_gen_new): implement - -Sat Feb 27 22:41:23 1999 Johan Danielsson - - * doc/install.texi: krb4 is now automatically detected - - * doc/misc.texi: update procedure to set supported encryption - types - - * doc/setup.texi: change some silly wordings - -Sat Feb 27 22:17:30 1999 Johan Danielsson - - * lib/krb5/keytab.c (fkt_remove_entry): make this work - - * admin/ktutil.c: add minimally working `get' command - -Sat Feb 27 19:44:49 1999 Johan Danielsson - - * lib/hdb/convert_db.c: more typos - - * include/Makefile.am: remove EXTRA_DATA (as of autoconf - 2.13/automake 1.4) - - * appl/Makefile.am: OTP_dir - -Fri Feb 26 17:37:00 1999 Johan Danielsson - - * doc/setup.texi: add kadmin section - - * lib/asn1/check-der.c: fix printf warnings - -Thu Feb 25 11:16:49 1999 Johan Danielsson - - * configure.in: -O does not belong in WFLAGS - -Thu Feb 25 11:05:57 1999 Johan Danielsson - - * lib/asn1/der_put.c: fix der_put_int - -Tue Feb 23 20:35:12 1999 Johan Danielsson - - * configure.in: use AC_BROKEN_GLOB - -Mon Feb 22 15:12:44 1999 Johan Danielsson - - * configure.in: check for glob - -Mon Feb 22 11:32:42 1999 Johan Danielsson - - * Release 0.1b - -Sat Feb 20 15:48:06 1999 Johan Danielsson - - * lib/hdb/convert_db.c: convert DES3 keys to des3-cbc-sha1, and - des3-cbc-md5 - - * lib/krb5/crypto.c (DES3_string_to_key): make this actually do - what the draft said it should - - * lib/hdb/convert_db.c: little program for database conversion - - * lib/hdb/db.c (DB_open): try to open database w/o .db extension - - * lib/hdb/ndbm.c (NDBM_open): add test for database format - - * lib/hdb/db.c (DB_open): add test for database format - - * lib/asn1/gen_glue.c (generate_2int): don't depend on flags being - unsigned - - * lib/hdb/hdb.c: change `hdb_set_master_key' to take an - EncryptionKey, and add a new function `hdb_set_master_keyfile' to - do what `hdb_set_master_key' used to do - - * kdc/kstash.c: add `--convert-file' option to change keytype of - existing master key file - -Fri Feb 19 07:04:14 1999 Assar Westerlund - - * Release 0.1a - -Sat Feb 13 17:12:53 1999 Assar Westerlund - - * lib/krb5/mk_safe.c (krb5_mk_safe): sizeof(buf) -> buf_size, buf - is now a `u_char *' - - * lib/krb5/get_in_tkt.c (krb5_init_etype): etypes are now `int' - - * lib/krb5/get_host_realm.c (krb5_get_host_realm): constize - orig_host - - (krb5_salttype_to_string): new function (RSA_MD5_DES_verify, - RSA_MD5_DES3_verify): initialize ret - - * lib/gssapi/init_sec_context.c (init_auth): remove unnecessary - gssapi_krb5_init. ask for KEYTYPE_DES credentials - - * kadmin/get.c (print_entry_long): print the keytypes and salts - available for the principal - - * configure.in (WFLAGS): add `-O' to catch unitialized variables - and such - (gethostname, mkstemp, getusershell, inet_aton): more tests - - * lib/hdb/hdb.h: update prototypes - - * configure.in: homogenize broken detection with krb4 - - * lib/kadm5/init_c.c (kadm5_c_init_with_context): remove unused - `error' - - * lib/asn1/Makefile.am (check-der): add - - * lib/asn1/gen.c (define_type): map ASN1 Integer to `int' instead - of `unsigned' - - * lib/asn1/der_length.c (length_unsigned): new function - (length_int): handle signed integers - - * lib/asn1/der_put.c (der_put_unsigned): new function - (der_put_int): handle signed integers - - * lib/asn1/der_get.c (der_get_unsigned): new function - (der_get_int): handle signed integers - - * lib/asn1/der.h: all integer functions take `int' instead of - `unsigned' - - * lib/asn1/lex.l (filename): unused. remove. - - * lib/asn1/check-der.c: new test program for der encoding and - decoding. - -Mon Feb 1 04:09:06 1999 Assar Westerlund - - * lib/krb5/send_to_kdc.c (krb5_sendto_kdc): only call - gethostbyname2 with AF_INET6 if we actually have IPv6. From - "Brandon S. Allbery KF8NH" - - * lib/krb5/changepw.c (get_kdc_address): dito - -Sun Jan 31 06:26:36 1999 Assar Westerlund - - * kdc/connect.c (parse_prots): always bind to AF_INET, there are - v6-implementations without support for `mapped V4 addresses'. - From Jun-ichiro itojun Hagino - -Sat Jan 30 22:38:27 1999 Assar Westerlund - - * Release 0.0u - -Sat Jan 30 13:43:02 1999 Assar Westerlund - - * lib/krb5/Makefile.am: explicit rules for *.et files - - * lib/kadm5/init_c.c (get_kadm_ticket): only remove creds if - krb5_get_credentials was succesful. - (get_new_cache): return better error codes and return earlier. - (get_cred_cache): only delete default_client if it's different - from client - (kadm5_c_init_with_context): return a more descriptive error. - - * kdc/kerberos5.c (check_flags): handle NULL client or server - - * lib/krb5/sendauth.c (krb5_sendauth): return the error in - `ret_error' iff != NULL - - * lib/krb5/rd_error.c (krb5_free_error, krb5_free_error_contents): - new functions - - * lib/krb5/mk_req_ext.c (krb5_mk_req_extended): more - type-correctness - - * lib/krb5/krb5.h (krb5_error): typedef to KRB_ERROR - - * lib/krb5/init_creds_pw.c: KRB5_TGS_NAME: use - - * lib/krb5/get_cred.c: KRB5_TGS_NAME: use - - * lib/kafs/afskrb5.c (afslog_uid_int): update to changes - - * lib/kadm5/rename_s.c (kadm5_s_rename_principal): call remove - instead of rename, but shouldn't this just call rename? - - * lib/kadm5/get_s.c (kadm5_s_get_principal): always return an - error if the principal wasn't found. - - * lib/hdb/ndbm.c (NDBM_seq): unseal key - - * lib/hdb/db.c (DB_seq): unseal key - - * lib/asn1/Makefile.am: added explicit rules for asn1_err.[ch] - - * kdc/hprop.c (v4_prop): add krbtgt/THISREALM@OTHERREALM when - finding cross-realm tgts in the v4 database - - * kadmin/mod.c (mod_entry): check the number of arguments. check - that kadm5_get_principal worked. - - * lib/krb5/keytab.c (fkt_remove_entry): remove KRB5_KT_NOTFOUND if - we weren't able to remove it. - - * admin/ktutil.c: less drive-by-deleting. From Love - - - * kdc/connect.c (parse_ports): copy the string before mishandling - it with strtok_r - - * kdc/kerberos5.c (tgs_rep2): print the principal with mismatching - kvnos - - * kadmin/kadmind.c (main): convert `debug_port' to network byte - order - - * kadmin/kadmin.c: allow specification of port number. - - * lib/kadm5/kadm5_locl.h (kadm5_client_context): add - `kadmind_port'. - - * lib/kadm5/init_c.c (_kadm5_c_init_context): move up - initalize_kadm5_error_table_r. - allow specification of port number. - - From Love - - * kuser/klist.c: add option -t | --test - diff --git a/kerberosV/src/ChangeLog.2000 b/kerberosV/src/ChangeLog.2000 deleted file mode 100644 index a1cb687f550..00000000000 --- a/kerberosV/src/ChangeLog.2000 +++ /dev/null @@ -1,1320 +0,0 @@ -2000-12-31 Assar Westerlund - - * lib/krb5/test_get_addrs.c (main): handle krb5_init_context - failure consistently - * lib/krb5/string-to-key-test.c (main): handle krb5_init_context - failure consistently - * lib/krb5/prog_setup.c (krb5_program_setup): handle - krb5_init_context failure consistently - * lib/hdb/convert_db.c (main): handle krb5_init_context failure - consistently - * kuser/kverify.c (main): handle krb5_init_context failure - consistently - * kuser/klist.c (main): handle krb5_init_context failure - consistently - * kuser/kinit.c (main): handle krb5_init_context failure - consistently - * kuser/kgetcred.c (main): handle krb5_init_context failure - consistently - * kuser/kdestroy.c (main): handle krb5_init_context failure - consistently - * kuser/kdecode_ticket.c (main): handle krb5_init_context failure - consistently - * kuser/generate-requests.c (generate_requests): handle - krb5_init_context failure consistently - * kpasswd/kpasswd.c (main): handle krb5_init_context failure - consistently - * kpasswd/kpasswd-generator.c (generate_requests): handle - krb5_init_context failure consistently - * kdc/main.c (main): handle krb5_init_context failure consistently - * appl/test/uu_client.c (proto): handle krb5_init_context failure - consistently - * appl/kf/kf.c (main): handle krb5_init_context failure - consistently - * admin/ktutil.c (main): handle krb5_init_context failure - consistently - - * admin/get.c (kt_get): more error checking - -2000-12-29 Assar Westerlund - - * lib/asn1/asn1_print.c (loop): check for length longer than data. - inspired by lha@stacken.kth.se - -2000-12-16 Johan Danielsson - - * admin/ktutil.8: reflect recent changes - - * admin/copy.c: don't copy an entry that already exists in the - keytab, and warn if the keyblock differs - -2000-12-15 Johan Danielsson - - * admin/Makefile.am: merge srvconvert and srvcreate with copy - - * admin/copy.c: merge srvconvert and srvcreate with copy - - * lib/krb5/Makefile.am: always build keytab_krb4.c - - * lib/krb5/context.c: always register the krb4 keytab functions - - * lib/krb5/krb5.h: declare krb4_ftk_ops - - * lib/krb5/keytab_krb4.c: We don't really need to include krb.h - here, since we only use the principal size macros, so define these - here. Theoretically someone could have a krb4 system where these - values are != 40, but this is unlikely, and - krb5_524_conv_principal also assume they are 40. - -2000-12-13 Johan Danielsson - - * lib/krb5/krb5.h: s/krb5_donot_reply/krb5_donot_replay/ - - * lib/krb5/replay.c: fix query-replace-o from MD5 API change, and - the struct is called krb5_donot_replay - -2000-12-12 Assar Westerlund - - * admin/srvconvert.c (srvconvert): do not use data after free:ing - it - -2000-12-11 Assar Westerlund - - * Release 0.3d - -2000-12-11 Assar Westerlund - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): set version to 14:0:0 - * lib/hdb/Makefile.am (libhdb_la_LDFLAGS): update to 6:3:0 - * lib/krb5/Makefile.am (libkrb5_la_LIBADD): add library - dependencies - -2000-12-10 Johan Danielsson - - * lib/krb5/auth_context.c: implement krb5_auth_con_{get,set}rcache - -2000-12-08 Assar Westerlund - - * lib/krb5/krb5.h (krb5_enctype): add ETYPE_DES3_CBC_NONE_IVEC as - a new pseudo-type - - * lib/krb5/crypto.c (DES_AFS3_CMU_string_to_key): always treat - cell names as lower case - (krb5_encrypt_ivec, krb5_decrypt_ivec): new functions that allow an - explicit ivec to be specified. fix all sub-functions. - (DES3_CBC_encrypt_ivec): new function that takes an explicit ivec - -2000-12-06 Johan Danielsson - - * lib/krb5/Makefile.am: actually build replay cache code - - * lib/krb5/replay.c: implement krb5_get_server_rcache - - * kpasswd/kpasswdd.c: de-pointerise auth_context parameter to - krb5_mk_rep - - * lib/krb5/recvauth.c: de-pointerise auth_context parameter to - krb5_mk_rep - - * lib/krb5/mk_rep.c: auth_context should not be a pointer - - * lib/krb5/auth_context.c: implement krb5_auth_con_genaddrs, and - make setaddrs_from_fd use that - - * lib/krb5/krb5.h: add some more KRB5_AUTH_CONTEXT_* flags - -2000-12-05 Johan Danielsson - - * lib/krb5/Makefile.am: add kerberos.8 manpage - - * lib/krb5/cache.c: check for NULL remove_cred function - - * lib/krb5/fcache.c: pretend that empty files are non-existant - - * lib/krb5/get_addrs.c (find_all_addresses): use getifaddrs, from - Jason Thorpe - -2000-12-01 Assar Westerlund - - * configure.in: remove configure-time generation of krb5-config - * tools/Makefile.am: add generation of krb5-config at make-time - instead of configure-time - - * tools/krb5-config.in: add --prefix and --exec-prefix - -2000-11-30 Assar Westerlund - - * tools/Makefile.am: add krb5-config.1 - * tools/krb5-config.in: add kadm-client and kadm5-server as - libraries - -2000-11-29 Assar Westerlund - - * tools/krb5-config.in: add --prefix, --exec-prefix and gssapi - -2000-11-29 Johan Danielsson - - * configure.in: add roken/Makefile here, since it can't live in - rk_ROKEN - -2000-11-16 Assar Westerlund - - * configure.in: use the libtool -rpath, do not rely on ld - understanding -rpath - - * configure.in: fix the -Wl stuff for krb4 linking add some - gratuitous extra options when linking with an existing libdes - -2000-11-15 Assar Westerlund - - * lib/hdb/hdb.c (hdb_next_enctype2key): const-ize a little bit - * lib/Makefile.am (SUBDIRS): try to only build des when needed - * kuser/klist.c: print key versions numbers of v4 tickets in - verbose mode - - * kdc/kerberos5.c (tgs_rep2): adapt to new krb5_verify_ap_req2 - * appl/test/gss_common.c (read_token): remove unused variable - - * configure.in (krb4): add -Wl - (MD4Init et al): look for these in more libraries - (getmsg): only run test if we have the function - (AC_OUTPUT): create tools/krb5-config - - * tools/krb5-config.in: new script for storing flags to use - * Makefile.am (SUBDIRS): add tools - - * lib/krb5/get_cred.c (make_pa_tgs_req): update to new - krb5_mk_req_internal - * lib/krb5/mk_req_ext.c (krb5_mk_req_internal): allow different - usages for the encryption. change callers - * lib/krb5/rd_req.c (decrypt_authenticator): add an encryption - `usage'. also try the old - (and wrong) usage of KRB5_KU_AP_REQ_AUTH for backwards compatibility - (krb5_verify_ap_req2): new function for specifying the usage different - from the default (KRB5_KU_AP_REQ_AUTH) - * lib/krb5/build_auth.c (krb5_build_authenticator): add a `usage' - parameter to permit the generation of authenticators with - different crypto usage - - * lib/krb5/mk_req.c (krb5_mk_req_exact): new function that takes a - krb5_principal - (krb5_mk_req): use krb5_mk_req_exact - - * lib/krb5/mcache.c (mcc_close): free data - (mcc_destroy): don't free data - -2000-11-13 Assar Westerlund - - * lib/hdb/ndbm.c: handle both ndbm.h and gdbm/ndbm.h - * lib/hdb/hdb.c: handle both ndbm.h and gdbm/ndbm.h - -2000-11-12 Johan Danielsson - - * kdc/hpropd.8: remove extra .Xc - -2000-10-27 Johan Danielsson - - * kuser/kinit.c: fix v4 fallback lifetime calculation - -2000-10-10 Johan Danielsson - - * kdc/524.c: fix log messge - -2000-10-08 Assar Westerlund - - * lib/krb5/changepw.c (krb5_change_password): check for fd's being - too large to select on - * kpasswd/kpasswdd.c (add_new_tcp): check for the socket fd being - too large to select on - * kdc/connect.c (add_new_tcp): check for the socket fd being too - large to selct on - * kdc/connect.c (loop): check that the socket fd is not too large - to select on - * lib/krb5/send_to_kdc.c (recv_loop): check `fd' for being too - large to be able to select on - - * kdc/kaserver.c (do_authenticate): check for time skew - -2000-10-01 Assar Westerlund - - * kdc/524.c (set_address): allocate memory for storing addresses - in if the original request had an empty set of addresses - * kdc/524.c (set_address): fix bad return of pointer to automatic - data - - * config.sub: update to version 2000-09-11 (aka 1.181) from - subversions.gnu.org - - * config.guess: update to version 2000-09-05 (aka 1.156) from - subversions.gnu.org plus some minor tweaks - -2000-09-20 Assar Westerlund - - * Release 0.3c - -2000-09-19 Assar Westerlund - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): bump version to - 13:1:0 - - * lib/hdb/Makefile.am (libhdb_la_LDFLAGS): bump version to 6:2:0 - -2000-09-17 Assar Westerlund - - * lib/krb5/rd_req.c (krb5_decrypt_ticket): plug some memory leak - (krb5_rd_req): try not to return an allocated auth_context on error - - * lib/krb5/log.c (krb5_vlog_msg): fix const-ness - -2000-09-10 Assar Westerlund - - * kdc/524.c: re-organize - * kdc/kerberos5.c (tgs_rep2): try to avoid leaking auth_context - * kdc/kerberos4.c (valid_princ): check return value of functions - (encode_v4_ticket): add some const - * kdc/misc.c (db_fetch): check malloc - (free_ent): new function - - * lib/krb5/log.c (krb5_vlog_msg): log just the format string it we - fail to allocate the actual string to log, should at least provide - some hint as to where things went wrong - -2000-09-10 Johan Danielsson - - * kdc/log.c: use DEFAULT_LOG_DEST - - * kdc/config.c: use _PATH_KDC_CONF - - * kdc/kdc_locl.h: add macro constants for kdc.conf, and kdc.log - -2000-09-09 Assar Westerlund - - * lib/krb5/crypto.c (_key_schedule): re-use an existing schedule - -2000-09-06 Johan Danielsson - - * configure.in: fix dpagaix test - -2000-09-05 Assar Westerlund - - * configure.in: with_dce -> enable_dce. noticed by Ake Sandgren - - -2000-09-01 Johan Danielsson - - * kdc/kstash.8: update manual page - - * kdc/kstash.c: fix typo, and remove unused option - - * lib/krb5/kerberos.7: short kerberos intro page - -2000-08-27 Assar Westerlund - - * include/bits.c: add __attribute__ for gcc's pleasure - * lib/hdb/keytab.c: re-write to delay the opening of the database - till it's known which principal is being sought, thereby allowing - the usage of multiple databases, however they need to be specified - in /etc/krb5.conf since all the programs using this keytab do not - read kdc.conf - - * appl/test/test_locl.h (keytab): add - * appl/test/common.c: add --keytab - * lib/krb5/crypto.c: remove trailing commas - (KRB5_KU_USAGE_SEQ): renamed from KRB5_KU_USAGE_MIC - -2000-08-26 Assar Westerlund - - * lib/krb5/send_to_kdc.c (send_via_proxy): handle `http://' at the - beginning of the proxy specification. use getaddrinfo correctly - (krb5_sendto): always return a return code - - * lib/krb5/krb5.h (KRB5_KU_USAGE_MIC): rename to KRB5_KU_USAGE_SEQ - * lib/krb5/auth_context.c (krb5_auth_con_free): handle - auth_context == NULL - -2000-08-23 Assar Westerlund - - * kdc/kerberos5.c (find_type): make sure of always setting - `ret_etype' correctly. clean-up structure some - -2000-08-23 Johan Danielsson - - * lib/krb5/mcache.c: implement resolve - -2000-08-18 Assar Westerlund - - * kuser/kdecode_ticket.c: check return value from krb5_crypto_init - * kdc/kerberos5.c, kdc/524.c: check return value from krb5_crypto_init - * lib/krb5/*.c: check return value from krb5_crypto_init - -2000-08-16 Assar Westerlund - - * Release 0.3b - -2000-08-16 Assar Westerlund - - * lib/krb5/Makefile.am: bump version to 13:0:0 - - * lib/hdb/Makefile.am: set version to 6:1:0 - - * configure.in: do getmsg testing the same way as in krb4 - - * lib/krb5/config_file.c (krb5_config_parse_file_debug): make sure - of closing the file on error - - * lib/krb5/crypto.c (encrypt_internal_derived): free the checksum - after use - - * lib/krb5/warn.c (_warnerr): initialize args to make third, - purify et al happy - -2000-08-13 Assar Westerlund - - * kdc/kerberos5.c: re-write search for keys code. loop over all - supported enctypes in order, looping over all keys of each type, - and picking the one with the v5 default salt preferably - -2000-08-10 Assar Westerlund - - * appl/test/gss_common.c (enet_read): add and use - * lib/krb5/krb5.h (heimdal_version, heimdal_long_version): make - const - - * lib/krb5/mk_req_ext.c (krb5_mk_req_internal): add comment on - checksum type selection - - * lib/krb5/context.c (krb5_init_context): do not leak memory on - failure - (default_etypes): prefer arcfour-hmac-md5 to des-cbc-md5 - - * lib/krb5/principal.c: add fnmatch.h - -2000-08-09 Assar Westerlund - - * configure.in: call AC_PROG_CC and AC_PROG_CPP to make sure later - checks that should require them don't fail - * acconfig.h: add HAVE_UINT17_T - -2000-08-09 Johan Danielsson - - * kdc/mit_dump.c: handle all sorts of weird MIT salt types - -2000-08-08 Johan Danielsson - - * doc/setup.texi: port 212 -> 2121 - - * lib/krb5/principal.c: krb5_principal_match - -2000-08-04 Johan Danielsson - - * lib/asn1/der_get.c: add comment on *why* DCE sometimes used BER - encoding - - * kpasswd/Makefile.am: link with pidfile library - - * kpasswd/kpasswdd.c: write a pid file - - * kpasswd/kpasswd_locl.h: util.h - - * kdc/Makefile.am: link with pidfile library - - * kdc/main.c: write a pid file - - * kdc/headers.h: util.h - -2000-08-04 Assar Westerlund - - * lib/krb5/principal.c (krb5_425_conv_principal_ext): always put - hostnames in lower case - (default_v4_name_convert): add imap - -2000-08-03 Assar Westerlund - - * lib/krb5/crc.c (_krb5_crc_update): const-ize (finally) - -2000-07-31 Johan Danielsson - - * configure.in: check for uint*_t - * include/bits.c: define uint*_t - -2000-07-29 Assar Westerlund - - * kdc/kerberos5.c (check_tgs_flags): set endtime correctly when - renewing, From Derrick J Brashear - -2000-07-28 Assar Westerlund - - * Release 0.3a - -2000-07-27 Assar Westerlund - - * kdc/hprop.c (dump_database): write an empty message to signal - end of dump - -2000-07-26 Assar Westerlund - - * lib/krb5/changepw.c (krb5_change_password): try to be more - careful when not to resend - - * lib/hdb/db3.c: always create a cursor with db3. From Derrick J - Brashear - -2000-07-25 Johan Danielsson - - * lib/hdb/Makefile.am: bump version to 6:0:0 - - * lib/asn1/Makefile.am: bump version to 3:0:1 - - * lib/krb5/Makefile.am: bump version to 12:0:1 - - * lib/krb5/krb5_config.3: manpage - - * lib/krb5/krb5_appdefault.3: manpage - - * lib/krb5/appdefault.c: implementation of the krb5_appdefault set - of functions - -2000-07-23 Assar Westerlund - - * lib/krb5/init_creds_pw.c (change_password): reset forwardable - and proxiable. copy preauthentication list correctly from - supplied options - - * kdc/hpropd.c (main): check that the ticket was for `hprop/' for - paranoid reasons - - * lib/krb5/sock_principal.c (krb5_sock_to_principal): look in - aliases for the real name - -2000-07-22 Johan Danielsson - - * doc/setup.texi: say something about starting kadmind from the - command line - -2000-07-22 Assar Westerlund - - * kpasswd/kpasswdd.c: use kadm5_s_chpass_principal_cond instead of - mis-doing it here - - * lib/krb5/changepw.c (krb5_change_password): make timeout 1 + - 2^{0,1,...}. also keep track if we got an old packet back and - then just wait without sending a new packet - * lib/krb5/changepw.c: use a datagram socket and remove the - sequence numbers - * lib/krb5/changepw.c (krb5_change_password): clarify an - expression, avoiding a warning - -2000-07-22 Johan Danielsson - - * kuser/klist.c: make -a and -n aliases for -v - - * lib/krb5/write_message.c: ws - - * kdc/hprop-common.c: nuke extra definitions of - krb5_read_priv_message et.al - - * lib/krb5/read_message.c (krb5_read_message): return error if EOF - -2000-07-20 Assar Westerlund - - * kpasswd/kpasswd.c: print usage consistently - * kdc/hprop.h (HPROP_KEYTAB): use HDB for the keytab - * kdc/hpropd.c: add --keytab - * kdc/hpropd.c: don't care what principal we recvauth as - - * lib/krb5/get_cred.c: be more careful of not returning creds at - all when an error is returned - * lib/krb5/fcache.c (fcc_gen_new): do mkstemp correctly - -2000-07-19 Johan Danielsson - - * fix-export: use autoreconf - - * configure.in: remove stuff that belong in roken, and remove some - obsolete constructs - -2000-07-18 Johan Danielsson - - * configure.in: fix some typos - - * appl/Makefile.am: dceutil*s* - - * missing: update to missing from automake 1.4a - -2000-07-17 Johan Danielsson - - * configure.in: try to get xlc flags from ibmcxx.cfg use - conditional for X use readline cf macro - - * configure.in: subst AIX compiler flags - -2000-07-15 Johan Danielsson - - * configure.in: pass sixth parameter to test-package; use some - newer autoconf constructs - - * ltmain.sh: update to libtool 1.3c - - * ltconfig: update to libtool 1.3c - - * configure.in: update this to newer auto*/libtool - - * appl/Makefile.am: use conditional for dce - - * lib/Makefile.am: use conditional for dce - -2000-07-11 Johan Danielsson - - * lib/krb5/write_message.c: krb5_write_{priv,save}_message - * lib/krb5/read_message.c: krb5_read_{priv,save}_message - * lib/krb5/convert_creds.c: try port kerberos/88 if no response on - krb524/4444 - - * lib/krb5/convert_creds.c: use krb5_sendto - - * lib/krb5/send_to_kdc.c: add more generic krb5_sendto that send - to a port at arbitrary list of hosts - -2000-07-10 Johan Danielsson - - * doc/misc.texi: language; say something about kadmin del_enctype - -2000-07-10 Assar Westerlund - - * appl/kf/Makefile.am: actually install - -2000-07-08 Assar Westerlund - - * configure.in (AM_INIT_AUTOMAKE): bump to 0.3a-pre - (AC_ROKEN): roken is now at 10 - - * lib/krb5/string-to-key-test.c: add a arcfour-hmac-md5 test case - * kdc/Makefile.am (INCLUDES): add ../lib/krb5 - * configure.in: update for standalone roken - * lib/Makefile.am (SUBDIRS): make roken conditional - * kdc/hprop.c: update to new hdb_seal_keys_mkey - * lib/hdb/mkey.c (_hdb_unseal_keys_int, _hdb_seal_keys_int): - rename and export them - - * kdc/headers.h: add krb5_locl.h (since we just use some stuff - from there) - -2000-07-08 Johan Danielsson - - * kuser/klist.1: update for -f and add some more text for -v - - * kuser/klist.c: use rtbl to format cred listing, add -f and -s - - * lib/krb5/crypto.c: fix type in des3-cbc-none - - * lib/hdb/mkey.c: add key usage - - * kdc/kstash.c: remove writing of old keyfile, and treat - --convert-file as just reading and writing the keyfile without - asking for a new key - - * lib/hdb/mkey.c (read_master_encryptionkey): handle old keytype - based files, and convert the key to cfb64 - - * lib/hdb/mkey.c (hdb_read_master_key): set mkey to NULL before - doing anything else - - * lib/krb5/send_to_kdc.c: use krb5_eai_to_heim_errno - - * lib/krb5/get_for_creds.c: use krb5_eai_to_heim_errno - - * lib/krb5/changepw.c: use krb5_eai_to_heim_errno - - * lib/krb5/addr_families.c: use krb5_eai_to_heim_errno - - * lib/krb5/eai_to_heim_errno.c: convert getaddrinfo error codes to - something that can be passed to get_err_text - -2000-07-07 Assar Westerlund - - * lib/hdb/hdb.c (hdb_next_enctype2key): make sure of skipping - `*key' - - * kdc/kerberos4.c (get_des_key): rewrite some, be more careful - -2000-07-06 Assar Westerlund - - * kdc/kerberos5.c (as_rep): be careful as to now overflowing when - calculating the end of lifetime of a ticket. - - * lib/krb5/context.c (default_etypes): add ETYPE_ARCFOUR_HMAC_MD5 - - * lib/hdb/db3.c: only use a cursor when needed, from Derrick J - Brashear - - * lib/krb5/crypto.c: introduce the `special' encryption methods - that are not like all other encryption methods and implement - arcfour-hmac-md5 - -2000-07-05 Johan Danielsson - - * kdc/mit_dump.c: set initial master key version number to 0 - instead of 1; if we lated bump the mkvno we don't risk using the - wrong key to decrypt - - * kdc/hprop.c: only get master key if we're actually going to use - it; enable reading of MIT krb5 dump files - - * kdc/mit_dump.c: read MIT krb5 dump files - - * lib/hdb/mkey.c (read_master_mit): fix this - - * kdc/kstash.c: make this work with the new mkey code - - * lib/hdb/Makefile.am: add mkey.c, and bump version number - - * lib/hdb/hdb.h: rewrite master key handling - - * lib/hdb/mkey.c: rewrite master key handling - - * lib/krb5/crypto.c: add some more pseudo crypto types - - * lib/krb5/krb5.h: change some funny etypes to use negative - numbers, and add some more - -2000-07-04 Assar Westerlund - - * lib/krb5/krbhst.c (get_krbhst): only try SRV lookup if there are - none in the configuration file - -2000-07-02 Assar Westerlund - - * lib/krb5/keytab_keyfile.c (akf_add_entry): remove unused - variable - - * kpasswd/kpasswd-generator.c: new test program - * kpasswd/Makefile.am: add kpasswd-generator - - * include/Makefile.am (CLEANFILES): add rc4.h - - * kuser/generate-requests.c: new test program - * kuser/Makefile.am (noinst_PROGRAMS): add generate-requests - -2000-07-01 Assar Westerlund - - * configure.in: add --enable-dce and related stuff - * appl/Makefile.am (SUBDIRS): add $(APPL_dce) - -2000-06-29 Assar Westerlund - - * kdc/kerberos4.c (get_des_key): fix thinkos/typos - -2000-06-29 Johan Danielsson - - * admin/purge.c: use parse_time to parse age - - * lib/krb5/log.c (krb5_vlog_msg): use krb5_format_time - - * admin/list.c: add printing of timestamp and key data; some - cleanup - - * lib/krb5/time.c (krb5_format_time): new function to format time - - * lib/krb5/context.c (init_context_from_config_file): init - date_fmt, also do some cleanup - - * lib/krb5/krb5.h: add date_fmt to context - -2000-06-28 Johan Danielsson - - * kdc/{kerberos4,kaserver,524}.c (get_des_key): change to return - v4 or afs keys if possible - -2000-06-25 Johan Danielsson - - * kdc/hprop.c (ka_convert): allow using null salt, and treat 0 - pw_expire as never (from Derrick Brashear) - -2000-06-24 Johan Danielsson - - * kdc/connect.c (add_standard_ports): only listen to port 750 if - serving v4 requests - -2000-06-22 Assar Westerlund - - * lib/asn1/lex.l: fix includes, and lex stuff - * lib/asn1/lex.h (error_message): update prototype - (yylex): add - * lib/asn1/gen_length.c (length_type): fail on malloc error - * lib/asn1/gen_decode.c (decode_type): fail on malloc error - -2000-06-21 Assar Westerlund - - * lib/krb5/get_for_creds.c: be more compatible with MIT code. - From Daniel Kouril - * lib/krb5/rd_cred.c: be more compatible with MIT code. From - Daniel Kouril - * kdc/kerberos5.c (get_pa_etype_info): do not set salttype if it's - vanilla pw-salt, that keeps win2k happy. also do the malloc check - correctly. From Daniel Kouril - -2000-06-21 Johan Danielsson - - * kdc/hprop.c: add hdb keytabs - -2000-06-20 Johan Danielsson - - * lib/krb5/principal.c: back out rev. 1.64 - -2000-06-19 Johan Danielsson - - * kdc/kerberos5.c: pa_* -> KRB5_PADATA_* - - * kdc/hpropd.c: add realm override flag - - * kdc/v4_dump.c: code for reading krb4 dump files - - * kdc/hprop.c: generalize source database handing, add support for - non-standard local realms (from by Daniel Kouril - and Miroslav Ruda ), and - support for using different ports (requested by the Czechs, but - implemented differently) - - * lib/krb5/get_cred.c: pa_* -> KRB5_PADATA_* - - * lib/krb5/get_in_tkt.c: pa_* -> KRB5_PADATA_* - - * lib/krb5/krb5.h: use some definitions from asn1.h - - * lib/hdb/hdb.asn1: use new import syntax - - * lib/asn1/k5.asn1: use distinguished value integers - - * lib/asn1/gen_length.c: support for distinguished value integers - - * lib/asn1/gen_encode.c: support for distinguished value integers - - * lib/asn1/gen_decode.c: support for distinguished value integers - - * lib/asn1/gen.c: support for distinguished value integers - - * lib/asn1/lex.l: add support for more standards like import - statements - - * lib/asn1/parse.y: add support for more standards like import - statements, and distinguished value integers - -2000-06-11 Assar Westerlund - - * lib/krb5/get_for_creds.c (add_addrs): ignore addresses of - unknown type - * lib/krb5/get_for_creds.c (add_addrs): zero memory before - starting to copy memory - -2000-06-10 Assar Westerlund - - * lib/krb5/test_get_addrs.c: test program for get_addrs - * lib/krb5/get_addrs.c (find_all_addresses): remember to add in - the size of ifr->ifr_name when using SA_LEN. noticed by Ken - Raeburn - -2000-06-07 Assar Westerlund - - * configure.in: add db3 detection stuff do not use streamsptys on - HP-UX 11 - * lib/hdb/hdb.h (HDB): add dbc for db3 - * kdc/connect.c (add_standard_ports): also listen on krb524 aka - 4444 - * etc/services.append (krb524): add - * lib/hdb/db3.c: add berkeley db3 interface. contributed by - Derrick J Brashear - * lib/hdb/hdb.h (struct HDB): add - -2000-06-07 Johan Danielsson - - * kdc/524.c: if 524 is not enabled, just generate error reply and - exit - - * kdc/kerberos4.c: if v4 is not enabled, just generate error reply - and exit - - * kdc/connect.c: only listen to port 4444 if 524 is enabled - - * kdc/config.c: add options to enable/disable v4 and 524 requests - -2000-06-06 Johan Danielsson - - * kdc/524.c: handle non-existant server principals (from Daniel - Kouril) - -2000-06-03 Assar Westerlund - - * admin/ktutil.c: print name when failing to open keytab - - * kuser/kinit.c: try also to fallback to v4 when no KDC is found - -2000-05-28 Assar Westerlund - - * kuser/klist.c: continue even we have no v5 ccache. make showing - your krb4 tickets the default (if build with krb4 support) - * kuser/kinit.c: add a fallback that tries to get a v4 ticket if - built with krb4 support and we got back a version error from the - KDC - -2000-05-23 Johan Danielsson - - * lib/krb5/keytab_keyfile.c: make this actually work - -2000-05-19 Assar Westerlund - - * lib/krb5/store_emem.c (emem_store): make it write-compatible - * lib/krb5/store_fd.c (fd_store): make it write-compatible - * lib/krb5/store_mem.c (mem_store): make it write-compatible - * lib/krb5/krb5.h (krb5_storage): make store write-compatible - -2000-05-18 Assar Westerlund - - * configure.in: add stdio.h in dbopen test - -2000-05-16 Assar Westerlund - - * Release 0.2t - -2000-05-16 Assar Westerlund - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): set version to 11:1:0 - * lib/krb5/fcache.c: fix second lseek - * lib/krb5/principal.c (krb5_524_conv_principal): fix typo - -2000-05-15 Assar Westerlund - - * Release 0.2s - -2000-05-15 Assar Westerlund - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): set version to 11:0:0 - * lib/hdb/Makefile.am (libhdb_la_LDFLAGS): set version to 4:2:1 - * lib/asn1/Makefile.am (libasn1_la_LDFLAGS): bump to 2:0:0 - * lib/krb5/principal.c (krb5_524_conv_principal): comment-ize, and - simplify string copying - -2000-05-12 Assar Westerlund - - * lib/krb5/fcache.c (scrub_file): new function - (erase_file): re-write, use scrub_file - * lib/krb5/krb5.h (KRB5_DEFAULT_CCFILE_ROOT): add - - * configure.in (dbopen): add header files - - * lib/krb5/krb5.h (krb5_key_usage): add some more - * lib/krb5/fcache.c (erase_file): try to detect symlink games. - also call revoke. - * lib/krb5/changepw.c (krb5_change_password): remember to close - the socket on error - - * kdc/main.c (main): also call sigterm on SIGTERM - -2000-05-06 Assar Westerlund - - * lib/krb5/config_file.c (krb5_config_vget_string_default, - krb5_config_get_string_default): add - -2000-04-25 Assar Westerlund - - * lib/krb5/fcache.c (fcc_initialize): just forget about - over-writing the old cred cache. it's too much of a hazzle trying - to do this safely. - -2000-04-11 Assar Westerlund - - * lib/krb5/crypto.c (krb5_get_wrapped_length): rewrite into - different parts for the derived and non-derived cases - * lib/krb5/crypto.c (krb5_get_wrapped_length): the padding should - be done after having added confounder and checksum - -2000-04-09 Assar Westerlund - - * lib/krb5/get_addrs.c (find_all_addresses): apperently solaris - can return EINVAL when the buffer is too small. cope. - * lib/asn1/Makefile.am (gen_files): add asn1_UNSIGNED.x - * lib/asn1/gen_locl.h (filename): add prototype - (init_generate): const-ize - * lib/asn1/gen.c (filename): new function clean-up a little bit. - * lib/asn1/parse.y: be more tolerant in ranges - * lib/asn1/lex.l: count lines correctly. - (error_message): print filename in messages - -2000-04-08 Assar Westerlund - - * lib/krb5/rd_safe.c (krb5_rd_safe): increment sequence number - after comparing - * lib/krb5/rd_priv.c (krb5_rd_priv): increment sequence number - after comparing - * lib/krb5/mk_safe.c (krb5_mk_safe): make `tmp_seq' unsigned - * lib/krb5/mk_priv.c (krb5_mk_priv): make `tmp_seq' unsigned - * lib/krb5/generate_seq_number.c (krb5_generate_seq_number): make - `seqno' be unsigned - * lib/krb5/mk_safe.c (krb5_mk_safe): increment local sequence - number after the fact and only increment it if we were successful - * lib/krb5/mk_priv.c (krb5_mk_priv): increment local sequence - number after the fact and only increment it if we were successful - * lib/krb5/krb5.h (krb5_auth_context_data): make sequence number - unsigned - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_password): - `in_tkt_service' can be NULL - -2000-04-06 Assar Westerlund - - * lib/asn1/parse.y: regonize INTEGER (0..UNIT_MAX). - (DOTDOT): add - * lib/asn1/lex.l (DOTDOT): add - * lib/asn1/k5.asn1 (UNSIGNED): add. use UNSIGNED for all sequence - numbers. - * lib/asn1/gen_length.c (length_type): add TUInteger - * lib/asn1/gen_free.c (free_type): add TUInteger - * lib/asn1/gen_encode.c (encode_type, generate_type_encode): add - TUInteger - * lib/asn1/gen_decode.c (decode_type, generate_type_decode): add - TUInteger - * lib/asn1/gen_copy.c (copy_type): add TUInteger - * lib/asn1/gen.c (define_asn1): add TUInteger - * lib/asn1/der_put.c (encode_unsigned): add - * lib/asn1/der_length.c (length_unsigned): add - * lib/asn1/der_get.c (decode_unsigned): add - * lib/asn1/der.h (decode_unsigned, encode_unsigned, - length_unsigned): add prototypes - - * lib/asn1/k5.asn1: update pre-authentication types - * lib/krb5/krb5_err.et: add some error codes from pkinit - -2000-04-05 Assar Westerlund - - * lib/hdb/hdb.c: add support for hdb methods (aka back-ends). - include ldap. - * lib/hdb/hdb-ldap.c: tweak the ifdef to OPENLDAP - * lib/hdb/Makefile.am: add hdb-ldap.c and openldap - * kdc/Makefile.am, kpasswd/Makefile.am, kadmin/Makefile.am: add - * configure.in: bump version to 0.2s-pre add options and testing - for (open)ldap - -2000-04-04 Assar Westerlund - - * configure.in (krb4): fix the krb_mk_req test - -2000-04-03 Assar Westerlund - - * configure.in (krb4): add test for const arguments to krb_mk_req - * lib/45/mk_req.c (krb_mk_req): conditionalize const-ness of - arguments - -2000-04-03 Assar Westerlund - - * Release 0.2r - -2000-04-03 Assar Westerlund - - * lib/krb5/Makefile.am: set version to 10:0:0 - * lib/45/mk_req.c (krb_mk_req): const-ize the arguments - -2000-03-30 Assar Westerlund - - * lib/krb5/principal.c (krb5_425_conv_principal_ext): add some - comments. add fall-back on adding the realm name in lower case. - -2000-03-29 Assar Westerlund - - * kdc/connect.c: remember to repoint all descr->sa to _ss after - realloc as this might have moved the memory around. problem - discovered and diagnosed by Brandon S. Allbery - -2000-03-27 Assar Westerlund - - * configure.in: recognize solaris 2.8 - * config.guess, config.sub: update to current version from - :pserver:anoncvs@subversions.gnu.org:/home/cvs - - * lib/krb5/init_creds_pw.c (print_expire): do not assume anything - about the size of time_t, i.e. make it 64-bit happy - -2000-03-13 Assar Westerlund - - * kuser/klist.c: add support for display v4 tickets - -2000-03-11 Assar Westerlund - - * kdc/kaserver.c (do_authenticate, do_getticket): call check_flags - * kdc/kerberos4.c (do_version4): call check_flags. - * kdc/kerberos5.c (check_flags): make global - -2000-03-10 Assar Westerlund - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_password): evil - hack to avoid recursion - -2000-03-04 Assar Westerlund - - * kuser/kinit.c: add `krb4_get_tickets' per realm. add --anonymous - * lib/krb5/krb5.h (krb5_get_init_creds_opt): add `anonymous' and - KRB5_GET_INIT_CREDS_OPT_ANONYMOUS - * lib/krb5/init_creds_pw.c (get_init_creds_common): set - request_anonymous flag appropriatly - * lib/krb5/init_creds.c (krb5_get_init_creds_opt_set_anonymous): - add - - * lib/krb5/get_in_tkt.c (_krb5_extract_ticket): new parameter to - determine whetever to ignore client name of not. always copy - client name from kdc. fix callers. - - * kdc: add support for anonymous tickets - - * kdc/string2key.8: add man-page for string2key - -2000-03-03 Assar Westerlund - - * kdc/hpropd.c (dump_krb4): get expiration date from `valid_end' - and not `pw_end' - - * kdc/kadb.h (ka_entry): fix name pw_end -> valid_end. add some - more fields - - * kdc/hprop.c (v4_prop): set the `valid_end' from the v4 - expiration date instead of the `pw_expire' - (ka_convert): set `valid_end' from ka expiration data and `pw_expire' - from pw_change + pw_expire - (main): add a default database for ka dumping - -2000-02-28 Assar Westerlund - - * lib/krb5/context.c (init_context_from_config_file): change - rfc2052 default to no. 2782 says that underscore should be used. - -2000-02-24 Assar Westerlund - - * lib/krb5/fcache.c (fcc_initialize, fcc_store_cred): verify that - stores and close succeed - * lib/krb5/store.c (krb5_store_creds): check to see that the - stores are succesful. - -2000-02-23 Assar Westerlund - - * Release 0.2q - -2000-02-22 Assar Westerlund - - * lib/krb5/Makefile.am: set version to 9:2:0 - - * lib/krb5/expand_hostname.c (krb5_expand_hostname_realms): copy - the correct hostname - - * kdc/connect.c (add_new_tcp): use the correct entries in the - descriptor table - * kdc/connect.c: initialize `descr' uniformly and correctly - -2000-02-20 Assar Westerlund - - * Release 0.2p - -2000-02-19 Assar Westerlund - - * lib/krb5/Makefile.am: set version to 9:1:0 - - * lib/krb5/expand_hostname.c (krb5_expand_hostname): make sure - that realms is filled in even when getaddrinfo fails or does not - return any canonical name - - * kdc/connect.c (descr): add sockaddr and string representation - (*): re-write to use the above mentioned - -2000-02-16 Assar Westerlund - - * lib/krb5/addr_families.c (krb5_parse_address): use - krb5_sockaddr2address to copy the result from getaddrinfo. - -2000-02-14 Assar Westerlund - - * Release 0.2o - -2000-02-13 Assar Westerlund - - * lib/krb5/Makefile.am: set version to 9:0:0 - - * kdc/kaserver.c (do_authenticate): return the kvno of the server - and not the client. Thanks to Brandon S. Allbery KF8NH - and Chaskiel M Grundman - for debugging. - - * kdc/kerberos4.c (do_version4): if an tgs-req is received with an - old kvno, return an error reply and write a message in the log. - -2000-02-12 Assar Westerlund - - * appl/test/gssapi_server.c (proto): with `--fork', create a child - and send over/receive creds with export/import_sec_context - * appl/test/gssapi_client.c (proto): with `--fork', create a child - and send over/receive creds with export/import_sec_context - * appl/test/common.c: add `--fork' / `-f' (only used by gssapi) - -2000-02-11 Assar Westerlund - - * kdc/kdc_locl.h: remove keyfile add explicit_addresses - * kdc/connect.c (init_sockets): pay attention to - explicit_addresses some more comments. better error messages. - * kdc/config.c: add some comments. - remove --key-file. - add --addresses. - - * lib/krb5/context.c (krb5_set_extra_addresses): const-ize and use - proper abstraction - -2000-02-07 Johan Danielsson - - * lib/krb5/changepw.c: use roken_getaddrinfo_hostspec - -2000-02-07 Assar Westerlund - - * Release 0.2n - -2000-02-07 Assar Westerlund - - * lib/krb5/Makefile.am: set version to 8:0:0 - * lib/krb5/keytab.c (krb5_kt_default_name): use strlcpy - (krb5_kt_add_entry): set timestamp - -2000-02-06 Assar Westerlund - - * lib/krb5/krb5.h: add macros for accessing krb5_realm - * lib/krb5/time.c (krb5_timeofday): use `krb5_timestamp' instead - of `int32_t' - - * lib/krb5/replay.c (checksum_authenticator): update to new API - for md5 - - * lib/krb5/krb5.h: remove des.h, it's not needed and applications - should not have to make sure to find it. - -2000-02-03 Assar Westerlund - - * lib/krb5/rd_req.c (get_key_from_keytab): rename parameter to - `out_key' to avoid conflicting with label. reported by Sean Doran - - -2000-02-02 Assar Westerlund - - * lib/krb5/expand_hostname.c: remember to lower-case host names. - bug reported by - - * kdc/kerberos4.c (do_version4): look at check_ticket_addresses - and emulate that by setting krb_ignore_ip_address (not a great - interface but it doesn't seem like the time to go around fixing - libkrb stuff now) - -2000-02-01 Johan Danielsson - - * kuser/kinit.c: change --noaddresses into --no-addresses - -2000-01-28 Assar Westerlund - - * kpasswd/kpasswd.c (main): make sure the ticket is not - forwardable and not proxiable - -2000-01-26 Assar Westerlund - - * lib/krb5/crypto.c: update to pseudo-standard APIs for - md4,md5,sha. some changes to libdes calls to make them more - portable. - -2000-01-21 Assar Westerlund - - * lib/krb5/verify_init.c (krb5_verify_init_creds): make sure to - clean up the correct creds. - -2000-01-16 Assar Westerlund - - * lib/krb5/principal.c (append_component): change parameter to - `const char *'. check malloc - * lib/krb5/principal.c (append_component, va_ext_princ, va_princ): - const-ize - * lib/krb5/mk_req.c (krb5_mk_req): make `service' and `hostname' - const - * lib/krb5/principal.c (replace_chars): also add space here - * lib/krb5/principal.c: (quotable_chars): add space - -2000-01-12 Assar Westerlund - - * kdc/kerberos4.c (do_version4): check if preauth was required and - bail-out if so since there's no way that could be done in v4. - Return NULL_KEY as an error to the client (which is non-obvious, - but what can you do?) - -2000-01-09 Assar Westerlund - - * lib/krb5/principal.c (krb5_sname_to_principal): use - krb5_expand_hostname_realms - * lib/krb5/mk_req.c (krb5_km_req): use krb5_expand_hostname_realms - * lib/krb5/expand_hostname.c (krb5_expand_hostname_realms): new - variant of krb5_expand_hostname that tries until it expands into - something that's digestable by krb5_get_host_realm, returning also - the result from that function. - -2000-01-08 Assar Westerlund - - * Release 0.2m - -2000-01-08 Assar Westerlund - - * configure.in: replace AC_C_BIGENDIAN with KRB_C_BIGENDIAN - - * lib/krb5/Makefile.am: bump version to 7:1:0 - - * lib/krb5/principal.c (krb5_sname_to_principal): use - krb5_expand_hostname - * lib/krb5/expand_hostname.c (krb5_expand_hostname): handle - ai_canonname being set in any of the addresses returnedby - getaddrinfo. glibc apparently returns the reverse lookup of every - address in ai_canonname. - -2000-01-06 Assar Westerlund - - * Release 0.2l - -2000-01-06 Assar Westerlund - - * lib/krb5/Makefile.am: set version to 7:0:0 - * lib/krb5/principal.c (krb5_sname_to_principal): remove `hp' - - * lib/hdb/Makefile.am: set version to 4:1:1 - - * kdc/hpropd.c (dump_krb4): use `krb5_get_default_realms' - * lib/krb5/get_in_tkt.c (add_padata): change types to make - everything work out - (krb5_get_in_cred): remove const to make types match - * lib/krb5/crypto.c (ARCFOUR_string_to_key): correct signature - * lib/krb5/principal.c (krb5_sname_to_principal): handle not - getting back a canonname - -2000-01-06 Assar Westerlund - - * Release 0.2k - -2000-01-06 Assar Westerlund - - * lib/krb5/send_to_kdc.c (krb5_sendto_kdc): advance colon so that - we actually parse the port number. based on a patch from Leif - Johansson - -2000-01-02 Assar Westerlund - - * admin/purge.c: remove all non-current and old entries from a - keytab - - * admin: break up ktutil.c into files - - * admin/ktutil.c (list): support --verbose (also listning time - stamps) - (kt_add, kt_get): set timestamp in newly created entries - (kt_change): add `change' command - - * admin/srvconvert.c (srvconv): set timestamp in newly created - entries - * lib/krb5/keytab_keyfile.c (akf_next_entry): set timetsamp, - always go the a predicatble position on error - * lib/krb5/keytab.c (krb5_kt_copy_entry_contents): copy timestamp - * lib/krb5/keytab_file.c (fkt_add_entry): store timestamp - (fkt_next_entry_int): return timestamp - * lib/krb5/krb5.h (krb5_keytab_entry): add timestamp diff --git a/kerberosV/src/ChangeLog.2001 b/kerberosV/src/ChangeLog.2001 deleted file mode 100644 index b048488f8d4..00000000000 --- a/kerberosV/src/ChangeLog.2001 +++ /dev/null @@ -1,1122 +0,0 @@ -2001-12-20 Johan Danielsson - - * lib/krb5/crypto.c: use our own des string-to-key function, since - the one from openssl sometimes generates wrong output - -2001-12-05 Jacques Vidrine - - * lib/hdb/mkey.c: fix a bug in which kstash would crash if - there were no /etc/krb5.conf - -2001-11-09 Johan Danielsson - - * lib/krb5/krb5_verify_user.3: sort references (from Thomas - Klausner) - - * lib/krb5/krb5_principal_get_realm.3: add section to reference - (from Thomas Klausner) - - * lib/krb5/krb5_krbhst_init.3: sort references (from Thomas - Klausner) - - * lib/krb5/krb5_keytab.3: white space fixes (from Thomas Klausner) - - * lib/krb5/krb5_get_krbhst.3: remove extra white space (from - Thomas Klausner) - - * lib/krb5/krb5_get_all_client_addrs.3: add section to reference - (from Thomas Klausner) - -2001-10-29 Jacques Vidrine - - * admin/get.c: fix a bug in which a reference to a data - structure on the stack was being kept after the containing - function's lifetime, resulting in a segfault during `ktutil - get'. - -2001-10-22 Assar Westerlund - - * lib/krb5/crypto.c: make all high-level encrypting and decrypting - functions check the return value of the underlying function and - handle errors more consistently. noted by Sam Hartman - - -2001-10-21 Assar Westerlund - - * lib/krb5/crypto.c (enctype_arcfour_hmac_md5): actually use a - non-keyed checksum when it should be non-keyed - -2001-09-29 Assar Westerlund - - * kuser/kinit.1: add the kauth alias - * kuser/kinit.c: allow specification of afslog in krb5.conf, noted - by jhutz@cs.cmu.edu - -2001-09-27 Assar Westerlund - - * lib/asn1/gen.c: remove the need for libasn1.h, also make - generated files include all files from IMPORTed modules - - * lib/krb5/krb5.h (KRB5_KPASSWD_*): set correct values - * kpasswd/kpasswd.c: improve error message printing - * lib/krb5/changepw.c (krb5_passwd_result_to_string): add change - to use sequence numbers connect the udp socket so that we can - figure out the local address - -2001-09-25 Assar Westerlund - - * lib/asn1: implement OBJECT IDENTIFIER and ENUMERATED - -2001-09-20 Johan Danielsson - - * lib/krb5/principal.c (krb5_425_conv_principal_ext): try using - lower case realm as domain, but only when given a verification - function - -2001-09-20 Assar Westerlund - - * lib/asn1/der_put.c (der_put_length): do not even try writing - anything when len == 0 - -2001-09-18 Johan Danielsson - - * kdc/hpropd.c: add realm override option - - * lib/krb5/set_default_realm.c (krb5_set_default_realm): make - realm parameter const - - * kdc/hprop.c: more free's - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_keytab): free key - proc data - - * lib/krb5/expand_hostname.c (krb5_expand_hostname_realms): free - addrinfo - - * lib/hdb/mkey.c (hdb_set_master_keyfile): clear error string when - not returning error - -2001-09-16 Assar Westerlund - - * lib/krb5/appdefault.c (krb5_appdefault_{boolean,string,time): - make realm const - - * lib/krb5/crypto.c: use des functions to avoid generating - warnings with openssl's prototypes - -2001-09-05 Johan Danielsson - - * configure.in: check for termcap.h - - * lib/asn1/lex.l: add another undef ECHO to keep AIX lex happy - -2001-09-03 Assar Westerlund - - * lib/krb5/addr_families.c (krb5_print_address): handle snprintf - returning < 0. noticed by hin@stacken.kth.se - -2001-09-03 Assar Westerlund - - * Release 0.4e - -2001-09-02 Johan Danielsson - - * kuser/Makefile.am: install kauth as a symlink to kinit - - * kuser/kinit.c: get v4_tickets by default - - * lib/asn1/Makefile.am: fix for broken automake - -2001-08-31 Johan Danielsson - - * lib/hdb/hdb-ldap.c: some pretty much untested changes from Luke - Howard - - * kuser/kinit.1: remove references to kauth - - * kuser/Makefile.am: kauth is no more - - * kuser/kinit.c: use appdefaults for everything. defaults are now - as in kauth. - - * lib/krb5/appdefault.c: also check libdefaults, and realms/realm - - * lib/krb5/context.c (krb5_free_context): free more stuff - -2001-08-30 Johan Danielsson - - * lib/krb5/verify_krb5_conf.c: do some checks of the values in the - file - - * lib/krb5/krb5.conf.5: remove srv_try_txt, fix spelling - - * lib/krb5/context.c: don't init srv_try_txt, since it isn't used - anymore - -2001-08-29 Jacques Vidrine - - * configure.in: Check for already-installed com_err. - -2001-08-28 Assar Westerlund - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): set versoin to 18:2:1 - -2001-08-24 Assar Westerlund - - * kuser/Makefile.am: remove CHECK_LOCAL - non bin programs require - no special treatment now - - * kuser/generate-requests.c: parse arguments in a useful way - * kuser/kverify.c: add --help/--verify - -2001-08-22 Assar Westerlund - - * configure.in: bump prereq to 2.52 remove unused test_LIB_KRB4 - - * configure.in: re-write the handling of crypto libraries. try to - use the one of openssl's libcrypto or krb4's libdes that has all - the required functionality (md4, md5, sha1, des, rc4). if there - is no such library, the included lib/des is built. - - * kdc/headers.h: include libutil.h if it exists - * kpasswd/kpasswd_locl.h: include libutil.h if it exists - * kdc/kerberos4.c (get_des_key): check for null keys even if - is_server - -2001-08-21 Assar Westerlund - - * lib/asn1/asn1_print.c: print some size_t correctly - * configure.in: remove extra space after -L check for libutil.h - -2001-08-17 Johan Danielsson - - * kdc/kdc_locl.h: fix prototype for get_des_key - - * kdc/kaserver.c: fix call to get_des_key - - * kdc/524.c: fix call to get_des_key - - * kdc/kerberos4.c (get_des_key): if getting a key for a server, - return any des-key not just keys that can be string-to-keyed by - the client - -2001-08-10 Assar Westerlund - - * Release 0.4d - -2001-08-10 Assar Westerlund - - * configure.in: check for openpty - * lib/hdb/Makefile.am (libhdb_la_LDFLAGS): update to 7:4:0 - -2001-08-08 Assar Westerlund - - * configure.in: just add -L (if required) from krb4 when testing - for libdes/libcrypto - -2001-08-04 Assar Westerlund - - * lib/krb5/Makefile.am (man_MANS): add some missing man pages - * fix-export: fix the sed expression for finding the man pages - -2001-07-31 Assar Westerlund - - * kpasswd/kpasswd-generator.c (main): implement --version and - --help - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): update version to - 18:1:1 - -2001-07-27 Assar Westerlund - - * lib/krb5/context.c (init_context_from_config_file): check - parsing of addresses - -2001-07-26 Assar Westerlund - - * lib/krb5/sock_principal.c (krb5_sock_to_principal): rename - sa_len -> salen to avoid the macro that's defined on irix. noted - by "Jacques A. Vidrine" - -2001-07-24 Johan Danielsson - - * lib/krb5/addr_families.c: add support for type - KRB5_ADDRESS_ADDRPORT - - * lib/krb5/addr_families.c (krb5_address_order): complain about - unsuppored address types - -2001-07-23 Johan Danielsson - - * admin/get.c: don't open connection to server until we loop over - the principals, at that time we know the realm of the (first) - principal and we can default to that admin server - - * admin: add a rename command - -2001-07-19 Assar Westerlund - - * kdc/hprop.c (usage): clarify a tiny bit - -2001-07-19 Assar Westerlund - - * Release 0.4c - -2001-07-19 Assar Westerlund - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): bump version to - 18:0:1 - - * lib/krb5/get_for_creds.c (krb5_fwd_tgt_creds): make it behave - the same way as the MIT function - - * lib/hdb/Makefile.am (libhdb_la_LDFLAGS): update to 7:3:0 - * lib/krb5/sock_principal.c (krb5_sock_to_principal): use - getnameinfo - - * lib/krb5/krbhst.c (srv_find_realm): handle port numbers - consistenly in local byte order - - * lib/krb5/get_default_realm.c (krb5_get_default_realm): set an - error string - - * kuser/kinit.c (renew_validate): invert condition correctly. get - v4 tickets if we succeed renewing - * lib/krb5/principal.c (krb5_principal_get_type): add - (default_v4_name_convert): add "smtp" - -2001-07-13 Assar Westerlund - - * configure.in: remove make-print-version from LIBOBJS, it's no - longer in lib/roken but always built in lib/vers - -2001-07-12 Johan Danielsson - - * lib/hdb/mkey.c: more set_error_string - -2001-07-12 Assar Westerlund - - * lib/hdb/Makefile.am (libhdb_la_LIBADD): add required library - dependencies - - * lib/asn1/Makefile.am (libasn1_la_LIBADD): add required library - dependencies - -2001-07-11 Johan Danielsson - - * kdc/hprop.c: remove v4 master key handling; remove old v4-db and - ka-db flags; add defaults for v4_realm and afs_cell - -2001-07-09 Assar Westerlund - - * lib/krb5/sock_principal.c (krb5_sock_to_principal): copy hname - before calling krb5_sname_to_principal. from "Jacques A. Vidrine" - - -2001-07-08 Johan Danielsson - - * lib/krb5/context.c: use krb5_copy_addresses instead of - copy_HostAddresses - -2001-07-06 Assar Westerlund - - * configure.in (LIB_des_a, LIB_des_so): add these so that they can - be used by lib/auth/sia - - * kuser/kinit.c: re-do some of the v4 fallbacks: look at - get-tokens flag do not print extra errors do not try to do 524 if - we got tickets from a v4 server - -2001-07-03 Assar Westerlund - - * lib/krb5/replay.c (krb5_get_server_rcache): cast argument to - printf - - * lib/krb5/get_addrs.c (find_all_addresses): call free_addresses - on ignore_addresses correctly - * lib/krb5/init_creds.c - (krb5_get_init_creds_opt_set_default_flags): change to take a - const realm - - * lib/krb5/principal.c (krb5_425_conv_principal_ext): if the - instance is the first component of the local hostname, the - converted host should be the long hostname. from - - -2001-07-02 Johan Danielsson - - * lib/krb5/Makefile.am: address.c is no more; add a couple of - manpages - - * lib/krb5/krb5_timeofday.3: new manpage - - * lib/krb5/krb5_get_all_client_addrs.3: new manpage - - * lib/krb5/get_in_tkt.c (init_as_req): treat no addresses as - wildcard - - * lib/krb5/get_cred.c (get_cred_kdc_la): treat no addresses as - wildcard - - * lib/krb5/get_addrs.c: don't include client addresses that match - ignore_addresses - - * lib/krb5/context.c: initialise ignore_addresses - - * lib/krb5/addr_families.c: add new `arange' fake address type, - that matches more than one address; this required some internal - changes to many functions, so all of address.c got moved here - (wasn't much left there) - - * lib/krb5/krb5.h: add list of ignored addresses to context - -2001-07-03 Assar Westerlund - - * Release 0.4b - -2001-07-03 Assar Westerlund - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): set version to 17:0:0 - * lib/hdb/Makefile.am (libhdb_la_LDFLAGS): set version to 7:2:0 - -2001-07-03 Assar Westerlund - - * Release 0.4a - -2001-07-02 Johan Danielsson - - * kuser/kinit.c: make this compile without krb4 support - - * lib/krb5/write_message.c: remove priv parameter from - write_safe_message; don't know why it was there in the first place - - * doc/install.texi: remove kaserver switches, it's always compiled - in now - - * kdc/hprop.c: always include kadb support - - * kdc/kaserver.c: always include kaserver support - -2001-07-02 Assar Westerlund - - * kpasswd/kpasswdd.c (doit): make failing to bind a socket a - non-fatal error, and abort if no sockets were bound - -2001-07-01 Assar Westerlund - - * lib/krb5/krbhst.c: remember the real port number when falling - back from kpasswd -> kadmin, and krb524 -> kdc - -2001-06-29 Assar Westerlund - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): if - no_addresses is set, do not add any local addresses to KRB_CRED - - * kuser/kinit.c: remove extra clearing of password and some - redundant code - -2001-06-29 Johan Danielsson - - * kuser/kinit.c: move ticket conversion code to separate function, - and call that from a couple of places, like when renewing a - ticket; also add a flag for just converting a ticket - - * lib/krb5/init_creds_pw.c: set renew-life to some sane value - - * kdc/524.c: don't send more data than required - -2001-06-24 Assar Westerlund - - * lib/krb5/store_fd.c (krb5_storage_from_fd): check malloc returns - - * lib/krb5/keytab_any.c (any_resolve); improving parsing of ANY: - (any_start_seq_get): remove a double free - (any_next_entry): iterate over all (sub) keytabs and avoid leave data - around to be freed again - - * kdc/kdc_locl.h: add a define for des_new_random_key when using - openssl's libcrypto - - * configure.in: move v6 tests down - - * lib/krb5/krb5.h (krb5_context_data): remove srv_try_rfc2052 - - * update to libtool 1.4 and autoconf 2.50 - -2001-06-22 Johan Danielsson - - * lib/hdb/hdb.c: use krb5_add_et_list - -2001-06-21 Johan Danielsson - - * lib/hdb/Makefile.am: add generation number - * lib/hdb/common.c: add generation number code - * lib/hdb/hdb.asn1: add generation number - * lib/hdb/print.c: use krb5_storage to make it more dynamic - -2001-06-21 Assar Westerlund - - * lib/krb5/krb5.conf.5: update to changed names used by - krb5_get_init_creds_opt_set_default_flags - * lib/krb5/init_creds.c - (krb5_get_init_creds_opt_set_default_flags): make the appdefault - keywords have the same names - - * configure.in: only add -L and -R to the krb4 libdir if we are - actually using it - - * lib/krb5/krbhst.c (fallback_get_hosts): do not copy trailing - dot of hostname add some comments - * lib/krb5/krbhst.c: use getaddrinfo instead of dns_lookup when - testing for kerberos.REALM. this allows reusing that information - when actually contacting the server and thus avoids one DNS lookup - -2001-06-20 Johan Danielsson - - * lib/krb5/krb5.h: include k524_err.h - - * lib/krb5/convert_creds.c (krb524_convert_creds_kdc): don't test - for keytype, the server will do this for us if it has anything to - complain about - - * lib/krb5/context.c: add protocol compatible krb524 error codes - - * lib/krb5/Makefile.am: add protocol compatible krb524 error codes - - * lib/krb5/k524_err.et: add protocol compatible krb524 error codes - - * lib/krb5/krb5_principal_get_realm.3: manpage - - * lib/krb5/principal.c: add functions `krb5_principal_get_realm' - and `krb5_principal_get_comp_string' that returns parts of a - principal; this is a replacement for the internal - `krb5_princ_realm' and `krb5_princ_component' macros that everyone - seem to use - -2001-06-19 Assar Westerlund - - * kuser/kinit.c (main): dereference result from krb5_princ_realm. - from Thomas Nystrom - -2001-06-18 Johan Danielsson - - * lib/krb5/mk_req.c (krb5_mk_req_exact): free creds when done - * lib/krb5/crypto.c (krb5_string_to_key_derived): fix memory leak - * lib/krb5/krbhst.c (config_get_hosts): free hostlist - * kuser/kinit.c: free principal - -2001-06-18 Assar Westerlund - - * lib/krb5/send_to_kdc.c (krb5_sendto): remove an extra - freeaddrinfo - - * lib/krb5/convert_creds.c (krb524_convert_creds_kdc_ccache): - remove some unused variables - - * lib/krb5/krbhst.c (admin_get_next): spell kerberos correctly - * kdc/kerberos5.c: update to new krb5_auth_con* names - * kdc/hpropd.c: update to new krb5_auth_con* names - * lib/krb5/rd_req.c (krb5_rd_req): use krb5_auth_con* functions - and remove some comments - * lib/krb5/rd_safe.c (krb5_rd_safe): pick the keys in the right - order: remote - local - session - * lib/krb5/rd_rep.c (krb5_rd_rep): save the remote sub key in the - auth_context - * lib/krb5/rd_priv.c (krb5_rd_priv): pick keys in the correct - order: remote - local - session - * lib/krb5/mk_safe.c (krb5_mk_safe): pick keys in the right order, - local - remote - session - -2001-06-18 Johan Danielsson - - * lib/krb5/convert_creds.c: use starttime instead of authtime, - from Chris Chiappa - - * lib/krb5/convert_creds.c: make krb524_convert_creds_kdc match - the MIT function by the same name; add - krb524_convert_creds_kdc_ccache that does what the old version did - - * admin/list.c (do_list): make sure list of keys is NULL - terminated; similar to patch sent by Chris Chiappa - -2001-06-18 Assar Westerlund - - * lib/krb5/mcache.c (mcc_remove_cred): use - krb5_free_creds_contents - - * lib/krb5/auth_context.c: name function krb5_auth_con more - consistenly - * lib/krb5/rd_req.c (krb5_verify_authenticator_checksum): use - renamed krb5_auth_con_getauthenticator - - * lib/krb5/convert_creds.c (krb524_convert_creds_kdc): update to - use krb5_krbhst API - * lib/krb5/changepw.c (krb5_change_password): update to use - krb5_krbhst API - * lib/krb5/send_to_kdc.c: update to use krb5_krbhst API - * lib/krb5/krbhst.c (krb5_krbhst_get_addrinfo): add set def_port - in krb5_krbhst_info - (krb5_krbhst_free): free everything - - * lib/krb5/krb5.h (KRB5_VERIFY_NO_ADDRESSES): add - (krb5_krbhst_info): add def_port (default port for this service) - - * lib/krb5/krbhst-test.c: make it more verbose and useful - * lib/krb5/krbhst.c: remove some more memory leaks do not try any - dns operations if there is local configuration admin: fallback to - kerberos.REALM 524: fallback to kdcs kpasswd: fallback to admin - add some comments - - * configure.in: remove initstate and setstate, they should be in - cf/roken-frag.m4 - - * lib/krb5/Makefile.am (noinst_PROGRAMS): add krbhst-test - * lib/krb5/krbhst-test.c: new program for testing krbhst - * lib/krb5/krbhst.c (common_init): remove memory leak - (main): move test program into krbhst-test - -2001-06-17 Johan Danielsson - - * lib/krb5/krb5_krbhst_init.3: manpage - - * lib/krb5/krb5_get_krbhst.3: manpage - -2001-06-16 Johan Danielsson - - * lib/krb5/krb5.h: add opaque krb5_krbhst_handle type - - * lib/krb5/krbhst.c: change void* to krb5_krbhst_handle - - * lib/krb5/krb5.h: types for new krbhst api - - * lib/krb5/krbhst.c: implement a new api that looks up one host at - a time, instead of making a list of hosts - -2001-06-09 Johan Danielsson - - * configure.in: test for initstate and setstate - - * lib/krb5/krbhst.c: remove rfc2052 support - -2001-06-08 Johan Danielsson - - * fix some manpages for broken mdoc.old grog test - -2001-05-28 Assar Westerlund - - * lib/krb5/krb5.conf.5: add [appdefaults] - * lib/krb5/init_creds_pw.c: remove configuration reading that is - now done in krb5_get_init_creds_opt_set_default_flags - * lib/krb5/init_creds.c - (krb5_get_init_creds_opt_set_default_flags): add reading of - libdefaults versions of these and add no_addresses - - * lib/krb5/get_in_tkt.c (krb5_get_in_cred): clear error string - when preauth was required and we retry - -2001-05-25 Assar Westerlund - - * lib/krb5/convert_creds.c (krb524_convert_creds_kdc): call - krb5_get_krb524hst - * lib/krb5/krbhst.c (krb5_get_krb524hst): add and restructure the - support functions - -2001-05-22 Assar Westerlund - - * kdc/kerberos5.c (tgs_rep2): alloc and free csec and cusec - properly - -2001-05-17 Assar Westerlund - - * Release 0.3f - -2001-05-17 Assar Westerlund - - * lib/krb5/Makefile.am: bump version to 16:0:0 - * lib/hdb/Makefile.am: bump version to 7:1:0 - * lib/asn1/Makefile.am: bump version to 5:0:0 - * lib/krb5/keytab_krb4.c: add SRVTAB as an alias for krb4 - * lib/krb5/codec.c: remove dead code - -2001-05-17 Johan Danielsson - - * kdc/config.c: actually check the ticket addresses - -2001-05-15 Assar Westerlund - - * lib/krb5/rd_error.c (krb5_error_from_rd_error): use correct - parenthesis - - * lib/krb5/eai_to_heim_errno.c (krb5_eai_to_heim_errno): add - `errno' (called system_error) to allow callers to make sure they - pass the current and relevant value. update callers - -2001-05-14 Johan Danielsson - - * lib/krb5/verify_user.c: krb5_verify_user_opt - - * lib/krb5/krb5.h: verify_opt - - * kdc/kerberos5.c: pass context to krb5_domain_x500_decode - -2001-05-14 Assar Westerlund - - * kpasswd/kpasswdd.c: adapt to new address functions - * kdc/kerberos5.c: adapt to changing address functions use LR_TYPE - * kdc/connect.c: adapt to changing address functions - * kdc/config.c: new krb5_config_parse_file - * kdc/524.c: new krb5_sockaddr2address - * lib/krb5/*: add some krb5_{set,clear}_error_string - - * lib/asn1/k5.asn1 (LR_TYPE): add - * lib/asn1/Makefile.am (gen_files): add asn1_LR_TYPE.x - -2001-05-11 Assar Westerlund - - * kdc/kerberos5.c (tsg_rep): fix typo in variable name - - * kpasswd/kpasswd-generator.c (nop_prompter): update prototype - * lib/krb5/init_creds_pw.c: update to new prompter, use prompter - types and send two prompts at once when changning password - * lib/krb5/prompter_posix.c (krb5_prompter_posix): add name - * lib/krb5/krb5.h (krb5_prompt): add type - (krb5_prompter_fct): add anem - - * lib/krb5/cache.c (krb5_cc_next_cred): transpose last two - paramaters to krb5_cc_next_cred (as MIT does, and not as they - document). From "Jacques A. Vidrine" - -2001-05-11 Johan Danielsson - - * lib/krb5/Makefile.am: store-test - - * lib/krb5/store-test.c: simple bit storage test - - * lib/krb5/store.c: add more byteorder storage flags - - * lib/krb5/krb5.h: add more byteorder storage flags - - * kdc/kerberos5.c: don't use NULL where we mean 0 - - * kdc/kerberos5.c: put referral test code in separate function, - and test for KRB5_NT_SRV_INST - -2001-05-10 Assar Westerlund - - * admin/list.c (do_list): do not close the keytab if opening it - failed - * admin/list.c (do_list): always print complete names. print - everything to stdout. - * admin/list.c: print both v5 and v4 list by default - * admin/remove.c (kt_remove): reorganize some. open the keytab - (defaulting to the modify one). - * admin/purge.c (kt_purge): reorganize some. open the keytab - (defaulting to the modify one). correct usage strings - * admin/list.c (kt_list): reorganize some. open the keytab - * admin/get.c (kt_get): reorganize some. open the keytab - (defaulting to the modify one) - * admin/copy.c (kt_copy): default to modify key name. re-organise - * admin/change.c (kt_change): reorganize some. open the keytab - (defaulting to the modify one) - * admin/add.c (kt_add): reorganize some. open the keytab - (defaulting to the modify one) - * admin/ktutil.c (main): do not open the keytab, let every - sub-function handle it - - * kdc/config.c (configure): call free_getarg_strings - - * lib/krb5/get_in_tkt.c (krb5_get_in_cred): set error strings for - a few more errors - - * lib/krb5/get_host_realm.c (krb5_get_host_realm_int): make - `use_dns' parameter boolean - - * lib/krb5/krb5.h (krb5_context_data): add default_keytab_modify - * lib/krb5/context.c (init_context_from_config_file): set - default_keytab_modify - * lib/krb5/krb5_locl.h (KEYTAB_DEFAULT): change to - ANY:FILE:/etc/krb5.keytab,krb4:/etc/srvtab - (KEYTAB_DEFAULT_MODIFY): add - * lib/krb5/keytab.c (krb5_kt_default_modify_name): add - (krb5_kt_resolve): set error string for failed keytab type - -2001-05-08 Assar Westerlund - - * lib/krb5/crypto.c (encryption_type): make field names more - consistent - (create_checksum): separate usage and type - (krb5_create_checksum): add a separate type parameter - (encrypt_internal): only free once on mismatched checksum length - - * lib/krb5/send_to_kdc.c (krb5_sendto_kdc2): try to tell what - realm we didn't manage to reach any KDC for in the error string - - * lib/krb5/generate_seq_number.c (krb5_generate_seq_number): free - the entire subkey. from - -2001-05-07 Johan Danielsson - - * lib/krb5/keytab_keyfile.c (akf_start_seq_get): return - KT_NOTFOUND if the file is empty - -2001-05-07 Assar Westerlund - - * lib/krb5/fcache.c: call krb5_set_error_string when open fails - fatally - * lib/krb5/keytab_file.c: call krb5_set_error_string when open - fails fatally - - * lib/krb5/warn.c (_warnerr): print error_string in context in - preference to error string derived from error code - * kuser/kinit.c (main): try to print the error string - * lib/krb5/get_in_tkt.c (krb5_get_in_cred): set some sensible - error strings for errors - - * lib/krb5/krb5.h (krb5_context_data): add error_string and - error_buf - * lib/krb5/Makefile.am (libkrb5_la_SOURCES): add error_string.c - * lib/krb5/error_string.c: new file - -2001-05-02 Johan Danielsson - - * lib/krb5/time.c: krb5_string_to_deltat - - * lib/krb5/sock_principal.c: one less data copy - - * lib/krb5/eai_to_heim_errno.c: conversion function for h_errno's - - * lib/krb5/get_default_principal.c: change this slightly - - * lib/krb5/crypto.c: make checksum_types into an array of pointers - - * lib/krb5/convert_creds.c: make sure we always use a des-cbc-crc - ticket - -2001-04-29 Assar Westerlund - - * kdc/kerberos5.c (tgs_rep2): return a reference to a krbtgt for - the right realm if we fail to find a non-krbtgt service in the - database and the second component does a succesful non-dns lookup - to get the real realm (which has to be different from the - originally-supplied realm). this should help windows 2000 clients - that always start their lookups in `their' realm and do not have - any idea of how to map hostnames into realms - * kdc/kerberos5.c (is_krbtgt): rename to get_krbtgt_realm - -2001-04-27 Johan Danielsson - - * lib/krb5/get_host_realm.c (krb5_get_host_realm_int): add extra - parameter to request use of dns or not - -2001-04-25 Assar Westerlund - - * admin/get.c (kt_get): allow specification of encryption types - * lib/krb5/verify_init.c (krb5_verify_init_creds): do not try to - close an unopened ccache, noted by - - * lib/krb5/krb5.h (krb5_any_ops): add declaration - * lib/krb5/context.c (init_context_from_config_file): register - krb5_any_ops - - * lib/krb5/keytab_any.c: new file, implementing union of keytabs - * lib/krb5/Makefile.am (libkrb5_la_SOURCES): add keytab_any.c - - * lib/krb5/init_creds_pw.c (get_init_creds_common): handle options - == NULL. noted by - -2001-04-19 Johan Danielsson - - * lib/krb5/rd_cred.c: set ret_creds to NULL before doing anything - else, from Jacques Vidrine - -2001-04-18 Johan Danielsson - - * lib/hdb/libasn1.h: asn1.h -> krb5_asn1.h - - * lib/asn1/Makefile.am: add asn1_ENCTYPE.x - - * lib/krb5/krb5.h: adapt to asn1 changes - - * lib/asn1/k5.asn1: move enctypes here - - * lib/asn1/libasn1.h: rename asn1.h to krb5_asn1.h to avoid - conflicts - - * lib/asn1/Makefile.am: rename asn1.h to krb5_asn1.h to avoid - conflicts - - * lib/asn1/lex.l: use strtol to parse constants - -2001-04-06 Johan Danielsson - - * kuser/kinit.c: add simple support for running commands - -2001-03-26 Assar Westerlund - - * lib/hdb/hdb-ldap.c: change order of includes to allow it to work - with more versions of openldap - - * kdc/kerberos5.c (tgs_rep2): try to set sec and usec in error - replies - (*): update callers of krb5_km_error - (check_tgs_flags): handle renews requesting non-renewable tickets - - * lib/krb5/mk_error.c (krb5_mk_error): allow specifying both ctime - and cusec - - * lib/krb5/krb5.h (krb5_checksum, krb5_keyusage): add - compatibility names - - * lib/krb5/crypto.c (create_checksum): change so that `type == 0' - means pick from the `crypto' (context) and otherwise use that - type. this is not a large change in practice and allows callers - to specify the exact checksum algorithm to use - -2001-03-13 Assar Westerlund - - * lib/krb5/get_cred.c (get_cred_kdc): add support for falling back - to KRB5_KU_AP_REQ_AUTH when KRB5_KU_TGS_REQ_AUTH gives `bad - integrity'. this helps for talking to old (pre 0.3d) KDCs - -2001-03-12 Assar Westerlund - - * lib/krb5/crypto.c (krb5_derive_key): new function, used by - derived-key-test.c - * lib/krb5/string-to-key-test.c: add new test vectors posted by - Ken Raeburn in to - ietf-krb-wg@anl.gov - * lib/krb5/n-fold-test.c: more test vectors from same source - * lib/krb5/derived-key-test.c: more tests from same source - -2001-03-06 Assar Westerlund - - * acconfig.h: include roken_rename.h when appropriate - -2001-03-06 Assar Westerlund - - * lib/krb5/krb5.h (krb5_enctype): remove trailing comma - -2001-03-04 Assar Westerlund - - * lib/krb5/krb5.h (krb5_enctype): add ENCTYPE_* aliases for - compatibility with MIT krb5 - -2001-03-02 Assar Westerlund - - * kuser/kinit.c (main): only request a renewable ticket when - explicitly requested. it still gets a renewable one if the renew - life is specified - * kuser/kinit.c (renew_validate): treat -1 as flags not being set - -2001-02-28 Johan Danielsson - - * lib/krb5/context.c (krb5_init_ets): use krb5_add_et_list - -2001-02-27 Johan Danielsson - - * lib/krb5/get_cred.c: implement krb5_get_cred_from_kdc_opt - -2001-02-25 Assar Westerlund - - * configure.in: do not use -R when testing for des functions - -2001-02-14 Assar Westerlund - - * configure.in: test for lber.h when trying to link against - openldap to handle openldap v1, from Sumit Bose - - -2001-02-19 Assar Westerlund - - * lib/asn1/libasn1.h: add string.h (for memset) - -2001-02-15 Assar Westerlund - - * lib/krb5/warn.c (_warnerr): add printf attributes - * lib/krb5/send_to_kdc.c (krb5_sendto): loop over all address - returned by getaddrinfo before trying the next kdc. from - thorpej@netbsd.org - - * lib/krb5/krb5.conf.5: fix default_realm in example - - * kdc/connect.c: fix a few kdc_log format types - - * configure.in: try to handle libdes/libcrypto ont requiring -L - -2001-02-10 Assar Westerlund - - * lib/asn1/gen_decode.c (generate_type_decode): zero the data at - the beginning of the generated function, and add a label `fail' - that the code jumps to in case of errors that frees all allocated - data - -2001-02-07 Assar Westerlund - - * configure.in: aix dce: fix misquotes, from Ake Sandgren - - - * configure.in (dpagaix_LDFLAGS): try to add export file - -2001-02-05 Assar Westerlund - - * lib/krb5/krb5_keytab.3: new man page, contributed by - - - * kdc/kaserver.c: update to new db_fetch4 - -2001-02-05 Assar Westerlund - - * Release 0.3e - -2001-01-30 Assar Westerlund - - * kdc/hprop.c (v4_get_masterkey): check kdb_verify_master_key - properly - (kdb_prop): decrypt key properly - * kdc/hprop.c: handle building with KRB4 always try to decrypt v4 - data with the master key leave it up to the v5 how to encrypt with - that master key - - * kdc/kstash.c: include file name in error messages - * kdc/hprop.c: fix a typo and check some more return values - * lib/hdb/hdb-ldap.c (LDAP__lookup_princ): call ldap_search_s - correctly. From Jacques Vidrine - * kdc/misc.c (db_fetch): HDB_ERR_NOENTRY makes more sense than - ENOENT - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): bump version to - 15:0:0 - * lib/hdb/Makefile.am (libhdb_la_LDFLAGS): bump version to 7:0:0 - * lib/asn1/Makefile.am (libasn1_la_LDFLAGS): bump version to 4:0:2 - * kdc/misc.c (db_fetch): return an error code. change callers to - look at this and try to print it in log messages - - * lib/krb5/crypto.c (decrypt_internal_derived): check that there's - enough data - -2001-01-29 Assar Westerlund - - * kdc/hprop.c (realm_buf): move it so it becomes properly - conditional on KRB4 - - * lib/hdb/mkey.c (hdb_unseal_keys_mkey, hdb_seal_keys_mkey, - hdb_unseal_keys, hdb_seal_keys): check that we have the correct - master key and that we manage to decrypt the key properly, - returning an error code. fix all callers to check return value. - - * tools/krb5-config.in: use @LIB_des_appl@ - * tools/Makefile.am (krb5-config): add LIB_des_appl - * configure.in (LIB_des): set correctly - (LIB_des_appl): add for the use by krb5-config.in - - * lib/krb5/store_fd.c (fd_fetch, fd_store): use net_{read,write} - to make sure of not dropping data when doing it over a socket. - (this might break when used with ordinary files on win32) - - * lib/hdb/hdb_err.et (NO_MKEY): add - - * kdc/kerberos5.c (as_rep): be paranoid and check - krb5_enctype_to_string for failure, noted by - - * lib/krb5/krb5_init_context.3, lib/krb5/krb5_context.3, - lib/krb5/krb5_auth_context.3: add new man pages, contributed by - - - * use the openssl api for md4/md5/sha and handle openssl/*.h - - * kdc/kaserver.c (do_getticket): check length of ticket. noted by - - -2001-01-28 Assar Westerlund - - * configure.in: send -R instead of -rpath to libtool to set - runtime library paths - - * lib/krb5/Makefile.am: remove all dependencies on libkrb - -2001-01-27 Assar Westerlund - - * appl/rcp: add port of bsd rcp changed to use existing rsh, - contributed by Richard Nyberg - -2001-01-27 Johan Danielsson - - * lib/krb5/get_port.c: don't warn if the port name can't be found, - nobody cares anyway - -2001-01-26 Johan Danielsson - - * kdc/hprop.c: make it possible to convert a v4 dump file without - having any v4 libraries; the kdb backend still require them - - * kdc/v4_dump.c: include shadow definition of kdb Principal, so we - don't have to depend on any v4 libraries - - * kdc/hprop.h: include shadow definition of kdb Principal, so we - don't have to depend on any v4 libraries - - * lib/hdb/print.c: reduce number of memory allocations - - * lib/hdb/mkey.c: add support for reading krb4 /.k files - -2001-01-19 Assar Westerlund - - * lib/krb5/krb5.conf.5: document admin_server and kpasswd_server - for realms document capath better - - * lib/krb5/krbhst.c (krb5_get_krb_changepw_hst): preferably look - at kpasswd_server before admin_server - - * lib/krb5/get_cred.c (get_cred_from_kdc_flags): look in - [libdefaults]capath for better hint of realm to send request to. - this allows the client to specify `realm routing information' in - case it cannot be done at the server (which is preferred) - - * lib/krb5/rd_priv.c (krb5_rd_priv): handle no sequence number as - zero when we were expecting a sequence number. MIT krb5 cannot - generate a sequence number of zero, instead generating no sequence - number - * lib/krb5/rd_safe.c (krb5_rd_safe): dito - -2001-01-11 Assar Westerlund - - * kpasswd/kpasswdd.c: add --port option - -2001-01-10 Assar Westerlund - - * lib/krb5/appdefault.c (krb5_appdefault_string): fix condition - just before returning - -2001-01-09 Assar Westerlund - - * appl/kf/kfd.c (proto): use krb5_rd_cred2 instead of krb5_rd_cred - -2001-01-05 Johan Danielsson - - * kuser/kinit.c: call a time `time', and not `seconds' - - * lib/krb5/init_creds.c: not much point in setting the anonymous - flag here - - * lib/krb5/krb5_appdefault.3: document appdefault_time - -2001-01-04 Johan Danielsson - - * lib/krb5/verify_user.c: use - krb5_get_init_creds_opt_set_default_flags - - * kuser/kinit.c: use krb5_get_init_creds_opt_set_default_flags - - * lib/krb5/init_creds.c: new function - krb5_get_init_creds_opt_set_default_flags to set options from - krb5.conf - - * lib/krb5/rd_cred.c: make this match the MIT function - - * lib/krb5/appdefault.c (krb5_appdefault_string): handle NULL - def_val - (krb5_appdefault_time): new function - -2001-01-03 Assar Westerlund - - * kdc/hpropd.c (main): handle EOF when reading from stdin diff --git a/kerberosV/src/ChangeLog.2002 b/kerberosV/src/ChangeLog.2002 deleted file mode 100644 index 8101be14737..00000000000 --- a/kerberosV/src/ChangeLog.2002 +++ /dev/null @@ -1,726 +0,0 @@ -2002-12-19 Johan Danielsson - - * lib/krb5/mk_rep.c: free allocated storage; reported by Howard - Chu - -2002-12-08 Johan Danielsson - - * kdc/kdc_locl.h: remove old encrypt_v4_ticket prototype - -2002-12-02 Johan Danielsson - - * kpasswd/kpasswdd.c (doit): initialise sa_size to size of - sockaddr_storage - - * kdc/connect.c (init_socket): initialise sa_size to size of - sockaddr_storage - -2002-11-15 Johan Danielsson - - * lib/krb5/krb5.h: remove trailing comma in enum - -2002-11-07 Johan Danielsson - - * kdc/524.c: implement crude b2 style (non-)conversion for use - with afs - - * kdc/kerberos4.c: move encrypt_v4_ticket to 524.c, since that's - where it's used - -2002-10-21 Johan Danielsson - - * lib/krb5/keytab_keyfile.c: more strcspn - - * lib/krb5/store_emem.c (emem_store): limit how much we allocate - (from Olaf Kirch) - - * lib/krb5/principal.c: don't allow trailing backslashes in - components - - * kdc/connect.c: check that %-quotes are followed by two hex - digits - - * lib/krb5/keytab_any.c: properly close the open keytabs (from - Larry Greenfield) - - * kdc/kaserver.c: make sure life is positive (from John Godehn) - -2002-10-17 Johan Danielsson - - * kuser/klist.c (display_tokens): allow tokens up to size of - buffer (from Magnus Holmberg) - -2002-09-29 Johan Danielsson - - * lib/krb5/changepw.c (process_reply): fix reply length check - calculation (reported by various people) - -2002-09-24 Johan Danielsson - - * lib/krb5/keytab_file.c (fkt_remove_entry): check return value - from start_seq_get (from Wynn Wilkes) - -2002-09-19 Johan Danielsson - - * lib/krb5/context.c (krb5_set_config_files): return ENXIO instead - of ENOENT when "unconfigured" - -2002-09-16 Jacques Vidrine - - * lib/krb5/kuserok.c, lib/krb5/prompter_posix.c: use strcspn - to convert the newline to NUL in fgets results. - -2002-09-13 Johan Danielsson - - * kuser/kinit.1: remove unneeded Ns - - * lib/krb5/krb5_appdefault.3: remove extra "application" - - * fix-export: remove autom4ate.cache - -2002-09-10 Johan Danielsson - - * include/make_crypto.c: don't use function macros if possible - - * lib/krb5/krb5_locl.h: get limits.h for UINT_MAX - - * include/Makefile.am: use make_crypto to create crypto-headers.h - - * include/make_crypto.c: crypto header generation tool - - * configure.in: move crypto test to just after testing for krb4, - and move roken tests to after both, this speeds up various failure - cases with krb4 - - * lib/krb5/config_file.c: don't use NULL when we mean 0 - - * configure.in: we don't set package_libdir anymore, so no point - in testing for it - - * tools/Makefile.am: subst INCLUDE_des - - * tools/krb5-config.in: add INCLUDE_des to cflags - - * configure.in: use AC_CONFIG_SRCDIR - - * fix-export: remove some unneeded stuff - - * kuser/kinit.c (do_524init): free principals - -2002-09-09 Jacques Vidrine - - * kdc/kerberos5.c (get_pa_etype_info, fix_transited_encoding), - kdc/kaserver.c (krb5_ret_xdr_data), - lib/krb5/transited.c (krb5_domain_x500_decode): Validate some - counts: Check that they are non-negative, and that they are small - enough to avoid integer overflow when used in memory allocation - calculations. Potential problem areas pointed out by - Sebastian Krahmer . - - * lib/krb5/keytab_keyfile.c (akf_add_entry): Use O_EXCL when - creating a new keyfile. - -2002-09-09 Johan Danielsson - - * configure.in: don't try to build pam module - -2002-09-05 Johan Danielsson - - * appl/kf/kf.c: fix warning string - - * lib/krb5/log.c (krb5_vlog_msg): delay message formating till we - know we need it - -2002-09-04 Assar Westerlund - - * kdc/kerberos5.c (encode_reply): correct error logging - -2002-09-04 Johan Danielsson - - * lib/krb5/sendauth.c: close ccache if we opened it - - * appl/kf/kf.c: handle new protocol - - * appl/kf/kfd.c: use krb5_err instead of sysloging directly, - handle the new protocol, and bail out if an old client tries to - connect - - * appl/kf/kf_locl.h: we need a protocol version string - - * lib/hdb/hdb-ldap.c: use ASN1_MALLOC_ENCODE - - * kdc/kerberos5.c: use ASN1_MALLOC_ENCODE - - * kdc/hprop.c: set AP_OPTS_USE_SUBKEY - - * lib/hdb/common.c: use ASN1_MALLOC_ENCODE - - * lib/asn1/gen.c: add convenience macro that allocates a buffer - and encoded into that - - * lib/krb5/get_cred.c (init_tgs_req): use - in_creds->session.keytype literally instead of trying to convert - to a list of enctypes (it should already be an enctype) - - * lib/krb5/get_cred.c (init_tgs_req): init ret - -2002-09-03 Johan Danielsson - - * lib/asn1/k5.asn1: remove ETYPE_DES3_CBC_NONE_IVEC - - * lib/krb5/krb5.h: remove ENCTYPE_DES3_CBC_NONE_IVEC - - * lib/krb5/crypto.c: get rid of DES3_CBC_encrypt_ivec, just use - zero ivec in DES3_CBC_encrypt if passed ivec is NULL - - * lib/krb5/Makefile.am: back out 1.144, since it will re-create - krb5-protos.h at build-time, which requires perl, which is bad - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): don't - blindly use the local subkey - - * lib/krb5/crypto.c: add function krb5_crypto_getblocksize that - extracts the required blocksize from a crypto context - - * lib/krb5/build_auth.c: just get the length of the encoded - authenticator instead of trying to grow a buffer - -2002-09-03 Assar Westerlund - - * configure.in: add --disable-mmap option, and tests for - sys/mman.h and mmap - -2002-09-03 Jacques Vidrine - - * lib/krb5/changepw.c: verify lengths in response - - * lib/asn1/der_get.c (decode_integer, decode_unsigned): check for - truncated integers - -2002-09-02 Johan Danielsson - - * lib/krb5/mk_req_ext.c: generate a local subkey if - AP_OPTS_USE_SUBKEY is set - - * lib/krb5/build_auth.c: we don't have enough information about - whether to generate a local subkey here, so don't try to - - * lib/krb5/auth_context.c: new function - krb5_auth_con_generatelocalsubkey - - * lib/krb5/get_in_tkt.c: only set kdc_sec_offset if looking at an - initial ticket - - * lib/krb5/context.c (init_context_from_config_file): simplify - initialisation of srv_lookup - - * lib/krb5/changepw.c (send_request): set AP_OPTS_USE_SUBKEY - - * lib/krb5/krb5.h: add AP_OPTS_USE_SUBKEY - -2002-08-30 Assar Westerlund - - * lib/krb5/name-45-test.c: also test krb5_524_conv_principal - * lib/krb5/Makefile.am (TESTS): add name-45-test - * lib/krb5/name-45-test.c: add testcases for - krb5_425_conv_principal - -2002-08-29 Assar Westerlund - - * lib/krb5/parse-name-test.c: also test unparse_short functions - * lib/asn1/asn1_print.c: use com_err/error_message API - * lib/krb5/Makefile.am: add parse-name-test - * lib/krb5/parse-name-test.c: add a program for testing parsing - and unparsing principal names - -2002-08-28 Assar Westerlund - - * kdc/config.c: add missing ifdef DAEMON - -2002-08-28 Johan Danielsson - - * configure.in: use rk_SUNOS - - * kdc/config.c: add detach options - - * kdc/main.c: maybe detach from console? - - * kdc/kdc.8: markup changes - - * configure.in: AC_TEST_PACKAGE_NEW -> rk_TEST_PACKAGE - - * configure.in: use rk_TELNET, rename some other macros, and don't - add -ldes to krb4 link command - - * kuser/kinit.1: whitespace fix (from NetBSD) - - * include/bits.c: we may need unistd.h for ssize_t - -2002-08-26 Assar Westerlund - - * lib/krb5/principal.c (krb5_425_conv_principal_ext): lookup AAAA - rrs before A ones when using the resolver to verify a mapping, - also use getaddrinfo when resolver is not available - - * lib/hdb/keytab.c (find_db): const-correctness in parameters to - krb5_config_get_next - - * lib/asn1/gen.c: include in the generated files (for - memset) - -2002-08-22 Assar Westerlund - - * lib/krb5/test_get_addrs.c, lib/krb5/krbhst-test.c: make it use - getarg so that it can handle --help and --version (and thus make - check can pass) - - * lib/asn1/check-der.c: make this build again - -2002-08-22 Assar Westerlund - - * lib/asn1/der_get.c (der_get_int): handle len == 0. based on a - patch from Love - -2002-08-22 Johan Danielsson - - * lib/krb5/krb5.h: we seem to call KRB5KDC_ERR_KEY_EXP - KRB5KDC_ERR_KEY_EXPIRED, so define the former to the latter - - * kdc/kdc.8: add blurb about adding and removing addresses; update - kdc.conf section to match reality - - * configure.in: KRB_SENDAUTH_VLEN seems to always have existed, so - don't define it - -2002-08-21 Assar Westerlund - - * lib/asn1/asn1_print.c: print OIDs too, based on a patch from - Love - -2002-08-21 Johan Danielsson - - * kuser/kinit.c (do_v4_fallback): don't use krb_get_pw_in_tkt2 - since it might not exist, and we don't actually care about the key - -2002-08-20 Johan Danielsson - - * lib/krb5/krb5.conf.5: correct documentation for - verify_ap_req_nofail - - * lib/krb5/log.c: rename syslog_data to avoid name conflicts (from - Mattias Amnefelt) - - * kuser/klist.c (display_tokens): increase token buffer size, and - add more checks of the kernel data (from Love) - -2002-08-19 Johan Danielsson - - * fix-export: use make to parse Makefile.am instead of perl - - * configure.in: use argument-less AM_INIT_AUTOMAKE, now that it - groks AC_INIT with package name etc. - - * kpasswd/kpasswdd.c: include - - * lib/asn1/asn1_print.c: include com_right.h - - * lib/krb5/addr_families.c: socklen_t -> krb5_socklen_t - - * include/bits.c: define krb5_socklen_t type; this should really - go someplace else, but this was easy - - * lib/krb5/verify_krb5_conf.c: don't bail out if parsing of a file - fails, just warn about it - - * kdc/log.c (kdc_openlog): no need for a config_file parameter - - * kdc/config.c: just treat kdc.conf like any other config file - - * lib/krb5/context.c (krb5_get_default_config_files): ignore - duplicate files - -2002-08-16 Johan Danielsson - - * lib/krb5/krb5.h: turn strings into pointers, so we can assign to - them - - * lib/krb5/constants.c: turn strings into pointers, so we can - assign to them - - * lib/krb5/get_addrs.c (get_addrs_int): initialise res if - SCAN_INTERFACES is not set - - * lib/krb5/context.c: fix various borked stuff in previous commits - -2002-08-16 Jacques Vidrine - - * lib/krb5/krbhst.c (kpasswd_get_next): if we fall back to using - the `admin_server' entry for kpasswd, override the `proto' result - to be UDP. - -2002-08-15 Johan Danielsson - - * lib/krb5/auth_context.c: check return value of - krb5_sockaddr2address - - * lib/krb5/addr_families.c: check return value of - krb5_sockaddr2address - - * lib/krb5/context.c: get the default keytab from KRB5_KTNAME - -2002-08-14 Johan Danielsson - - * lib/krb5/verify_krb5_conf.c: allow parsing of more than one file - - * lib/krb5/context.c: allow changing config files with the - function krb5_set_config_files, there are also related functions - krb5_get_default_config_files and krb5_free_config_files; these - should work similar to their MIT counterparts - - * lib/krb5/config_file.c: allow the use of more than one config - file by using the new function krb5_config_parse_file_multi - -2002-08-12 Johan Danielsson - - * use sysconfdir instead of /etc - - * configure.in: require autoconf 2.53; rename dpagaix_LDFLAGS etc - to appease automake; force sysconfdir and localstatedir to /etc - and /var/heimdal for now - - * kdc/connect.c (addr_to_string): check return value of - sockaddr2address - -2002-08-09 Johan Danielsson - - * lib/krb5/rd_cred.c: if the remote address isn't an addrport, - don't try comparing to one; this should make old clients work with - new servers - - * lib/asn1/gen_decode.c: remove unused variable - -2002-07-31 Johan Danielsson - - * kdc/{kerberos5,524}.c: ENOENT -> HDB_ERR_NOENTRY (from Derrick - Brashear) - - * lib/krb5/principal.c: actually lower case the lower case - instance name (spotted by Derrick Brashear) - -2002-07-24 Johan Danielsson - - * fix-export: if DATEDVERSION is set, change the version to - current date - - * configure.in: don't use AC_PROG_RANLIB, and use magic foo to set - LTLIBOBJS - -2002-07-04 Johan Danielsson - - * kdc/connect.c: add some cache-control-foo to the http responses - (from Gombas Gabor) - - * lib/krb5/addr_families.c (krb5_print_address): don't copy size - if ret_len == NULL - -2002-06-28 Johan Danielsson - - * kuser/klist.c (display_tokens): don't bail out before we get - EDOM (signaling the end of the tokens), the kernel can also return - ENOTCONN, meaning that the index does not exist anymore (for - example if the token has expired) - -2002-06-06 Johan Danielsson - - * lib/krb5/changepw.c: make sure we return an error if there are - no changepw hosts found; from Wynn Wilkes - -2002-05-29 Johan Danielsson - - * lib/krb5/cache.c (krb5_cc_register): break out of loop when the - same type is found; spotted by Wynn Wilkes - -2002-05-28 Johan Danielsson - - * lib/krb5/keytab_file.c: check size of entry before trying to - read 32-bit kvno; also fix typo in previous - -2002-05-24 Johan Danielsson - - * include/Makefile.am: only add to INCLUDES - - * lib/45/mk_req.c: fix for storage change - - * lib/hdb/print.c: fix for storage change - -2002-05-15 Johan Danielsson - - * kdc/kerberos5.c: don't free encrypted padata until we're really - done with it - -2002-05-07 Johan Danielsson - - * kdc/kerberos5.c: when decrypting pa-data, try all keys matching - enctype - - * kuser/kinit.1: document -a - - * kuser/kinit.c: add command line switch for extra addresses - -2002-04-30 Johan Danielsson - - * configure.in: remove some duplicate tests - - * configure.in: use AC_HELP_STRING - -2002-04-29 Johan Danielsson - - * lib/krb5/crypto.c (usage2arcfour): don't abort if the usage is - unknown - -2002-04-25 Johan Danielsson - - * configure.in: use rk_DESTDIRS - -2002-04-22 Johan Danielsson - - * lib/krb5/krb5_verify_user.3: make it clear that _lrealm modifies - the principal - -2002-04-19 Johan Danielsson - - * lib/krb5/verify_init.c: fix typo in error string - -2002-04-18 Johan Danielsson - - * acconfig.h: remove some stuff that is defined elsewhere - - * lib/krb5/krb5_locl.h: include - - * lib/krb5/acl.c: rename acl_string parameter - - * lib/krb5/Makefile.am: remove __P from protos, and put parameter - names in comments - - * kuser/klist.c: better align some headers - - * kdc/kerberos4.c: storage tweaks - - * kdc/kaserver.c: storage tweaks - - * kdc/524.c: storage tweaks - - * lib/krb5/keytab_krb4.c: storage tweaks - - * lib/krb5/keytab_keyfile.c: storage tweaks - - * lib/krb5/keytab_file.c: storage tweaks; also try to handle zero - sized keytab files - - * lib/krb5/keytab_any.c: use KRB5_KT_END instead of KRB5_CC_END - - * lib/krb5/fcache.c: storage tweaks - - * lib/krb5/store_mem.c: make the krb5_storage opaque, and add - function wrappers for store/fetch/seek, and also make the eof-code - configurable - - * lib/krb5/store_fd.c: make the krb5_storage opaque, and add - function wrappers for store/fetch/seek, and also make the eof-code - configurable - - * lib/krb5/store_emem.c: make the krb5_storage opaque, and add - function wrappers for store/fetch/seek, and also make the eof-code - configurable - - * lib/krb5/store.c: make the krb5_storage opaque, and add function - wrappers for store/fetch/seek, and also make the eof-code - configurable - - * lib/krb5/store-int.h: make the krb5_storage opaque, and add - function wrappers for store/fetch/seek, and also make the eof-code - configurable - - * lib/krb5/krb5.h: make the krb5_storage opaque, and add function - wrappers for store/fetch/seek, and also make the eof-code - configurable - - * include/bits.c: include to get socklen_t - - * kdc/kerberos5.c (get_pa_etype_info): sort ETYPE-INFOs by - requested KDC-REQ etypes - - * kdc/hpropd.c: constify - - * kdc/hprop.c: constify - - * kdc/string2key.c: constify - - * kdc/kdc_locl.h: make port_str const - - * kdc/config.c: constify - - * lib/krb5/config_file.c: constify - - * kdc/kstash.c: constify - - * lib/krb5/verify_user.c: remove unnecessary cast - - * lib/krb5/recvauth.c: constify - - * lib/krb5/principal.c (krb5_parse_name): const qualify - - * lib/krb5/mcache.c (mcc_get_name): constify return type - - * lib/krb5/context.c (krb5_free_context): don't try to free the - ccache prefix - - * lib/krb5/cache.c (krb5_cc_register): don't make a copy of the - prefix - - * lib/krb5/krb5.h: constify some struct members - - * lib/krb5/log.c: constify - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_password): const - qualify - - * lib/krb5/get_in_tkt.c (krb5_init_etype): constify - - * lib/krb5/crypto.c: constify some - - * lib/krb5/config_file.c: constify - - * lib/krb5/aname_to_localname.c (krb5_aname_to_localname): - constify local variable - - * lib/krb5/addr_families.c (ipv4_sockaddr2port): constify - -2002-04-17 Johan Danielsson - - * lib/krb5/verify_krb5_conf.c: add some log checking - - * lib/krb5/log.c (krb5_addlog_dest): reorganise syslog parsing - -2002-04-16 Johan Danielsson - - * lib/krb5/crypto.c (krb5_crypto_init): check that the key size - matches the expected length - -2002-03-27 Johan Danielsson - - * lib/krb5/send_to_kdc.c: rename send parameter to send_data - - * lib/krb5/mk_error.c: rename ctime parameter to client_time - -2002-03-22 Johan Danielsson - - * kdc/kerberos5.c (find_etype): unsigned -> krb5_enctype (from - Reinoud Zandijk) - -2002-03-18 Johan Danielsson - - * lib/asn1/k5.asn1: add the GSS-API checksum type here - -2002-03-11 Assar Westerlund - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): bump version to - 18:3:1 - * lib/hdb/Makefile.am (libhdb_la_LDFLAGS): bump version to 7:5:0 - * lib/asn1/Makefile.am (libasn1_la_LDFLAGS): bump version to 6:0:0 - -2002-03-10 Assar Westerlund - - * lib/krb5/rd_cred.c: handle addresses with port numbers - - * lib/krb5/keytab_file.c, lib/krb5/keytab.c: - store the kvno % 256 as the byte and the complete 32 bit kvno after - the end of the current keytab entry - - * lib/krb5/init_creds_pw.c: - handle LR_PW_EXPTIME and LR_ACCT_EXPTIME in the same way - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): - handle ports giving for the remote address - - * lib/krb5/get_cred.c: - get a ticket with no addresses if no-addresses is set - - * lib/krb5/crypto.c: - rename functions DES_* to krb5_* to avoid colliding with modern - openssl - - * lib/krb5/addr_families.c: - make all functions taking 'struct sockaddr' actually take a socklen_t - instead of int and that acts as an in-out parameter (indicating the - maximum length of the sockaddr to be written) - - * kdc/kerberos4.c: - make the kvno's in the krb4 universe by the real one % 256, since they - cannot only be 8 bit, and the v5 ones are actually 32 bits - -2002-02-15 Johan Danielsson - - * lib/krb5/keytab_keyfile.c (akf_add_entry): don't create the file - before we need to write to it - (from Åke Sandgren) - -2002-02-14 Johan Danielsson - - * configure.in: rk_RETSIGTYPE and rk_BROKEN_REALLOC are called via - rk_ROKEN (from Gombas Gabor); find inttypes by CHECK_TYPES - directly - - * lib/krb5/rd_safe.c: actually use the correct key (from Daniel - Kouril) - -2002-02-12 Johan Danielsson - - * lib/krb5/context.c (krb5_get_err_text): protect against NULL - context - -2002-02-11 Johan Danielsson - - * admin/ktutil.c: no need to use the "modify" keytab anymore - - * lib/krb5/keytab_any.c: implement add and remove - - * lib/krb5/keytab_krb4.c: implement add and remove - - * lib/krb5/store_emem.c (emem_free): clear memory before freeing - (this should perhaps be selectable with a flag) - -2002-02-04 Johan Danielsson - - * kdc/config.c (get_dbinfo): if there are database specifications - in the config file, don't automatically try to use the default - values (from Gombas Gabor) - - * lib/krb5/log.c (krb5_closelog): don't pass pointer to pointer - (from Gombas Gabor) - -2002-01-30 Johan Danielsson - - * admin/list.c: get the default keytab from krb5.conf, and list - all parts of an ANY type keytab - - * lib/krb5/context.c: default default_keytab_modify to NULL - - * lib/krb5/keytab.c (krb5_kt_default_modify_name): if no modify - name is specified take it from the first component of the default - keytab name - -2002-01-29 Johan Danielsson - - * lib/krb5/keytab.c: compare keytab types case insensitively - -2002-01-07 Assar Westerlund - - * lib/krb5/crypto.c (create_checksum): make usage `unsigned' (it's - not really a krb5_key_usage). From Ben Harris - * lib/krb5/get_in_tkt.c: use krb5_enctype consistently. From Ben - Harris - * lib/krb5/crypto.c: use krb5_enctype consistently. From Ben - Harris - * kdc/kerberos5.c: use krb5_enctype consistently. From Ben Harris - diff --git a/kerberosV/src/ChangeLog.2003 b/kerberosV/src/ChangeLog.2003 deleted file mode 100644 index 1ffd9dec188..00000000000 --- a/kerberosV/src/ChangeLog.2003 +++ /dev/null @@ -1,1795 +0,0 @@ -2003-12-19 Love Hörnquist Åstrand - - * lib/krb5/error_string.c: protect error_string with mutex - - * lib/krb5/context.c: allocate and destroy mutex in krb5_context - - * lib/krb5/krb5.h (krb5_context_data): add mutex for error_string - -2003-12-18 Love Hörnquist Åstrand - - * kuser/kinit.c: make -9 work again - -2003-12-17 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c: try handle ts preauth better, still - not good, but at least it work with older heimdal releases that - doesn't send back KRB5KDC_ERR_PREAUTH_REQUIRED when preauth was - sent - -2003-12-16 Love Hörnquist Åstrand - - * lib/hdb/hdb.asn1: remove enforce-transited-policy, its no longer - used - -2003-12-11 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (_krb5_pk_create_sign): fill in NULL as - parameters, required by CMS - -2003-12-07 Love Hörnquist Åstrand - - * lib/krb5/get_in_tkt_with_keytab.c (krb5_get_in_tkt_with_keytab): - avoid memory leak that snuck in when krb5_keytab_key_proc was - exported, pointed out by Panases Inc - - * lib/krb5/keytab_file.c: do locking, found to be a problem for - Panasas Inc - - * lib/krb5/fcache.c: internally export x{,un}lock and thus prefix - them with _krb5_ - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): use - KRB5_AUTH_CONTEXT_DO_TIME if we want timestamp in forwarded - krb-cred - - * lib/krb5/krb5_auth_context.3: some text about - krb5_auth_con_{add,remove}flags - - * lib/krb5/auth_context.c: add krb5_auth_con_addflags and - krb5_auth_con_removeflags - -2003-12-03 Love Hörnquist Åstrand - - * lib/krb5/crypto.c (decrypt_internal_derived): move up padsize to - avoid memory leak - -2003-12-02 Love Hörnquist Åstrand - - * lib/krb5/crypto.c: require cipher-text to be padded to padsize - - * lib/krb5/eai_to_heim_errno.c: EAI_ADDRFAMILY and EAI_NODATA is - deprecated in RFC3493 - - * lib/krb5/verify_krb5_conf.c (check_host): don't check for - EAI_NODATA, because its depricated in RFC3493 Pointed out by - Hajimu UMEMOTO on heimdal-discuss - -2003-12-01 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: move test_crypto to noinst_PROGRAMS - - * lib/krb5/test_crypto.c: add --version,--help - - * kuser/kinit.c (main): return the return value from simple_execvp - -2003-11-26 Love Hörnquist Åstrand - - * kuser/kinit.c: don't use PKINIT DH per default since its too - slow - - * lib/krb5/pkinit.c: tweek to make pkinit work with the fact the - asn1_compile can't generate code for context tagless optionals - - * kdc/pkinit.c: add support for KDC side of DH PKINIT - - * lib/krb5/pkinit.c: clean up error handling, make enc-type work - again - -2003-11-25 Love Hörnquist Åstrand - - * kuser/kinit.c: add flag to make it work with pkinit dh - - * lib/krb5/pkinit.c: make PKINIT DH support work - -2003-11-24 Love Hörnquist Åstrand - - * lib/hdb/Makefile.am (LDADD): link with LIB_dlopen - - * kdc/pkinit.c: clean up - - * lib/krb5/krb5.h: make pkinit_win2k_compatible into a flag field - - * lib/krb5/pkinit.c: remove most compile depencies clean up - - * kdc/pkinit.c: print an error and turn of pkinit if openssl - failed to load - - * kdc/config.c: read pkinit (pki-mumble) configuration options - - * kdc/kerberos5.c: add pkinit support - - * kdc/kdc_locl.h: add prototypes for pkinit - - * kdc/pkinit.c: PKINIT patch from Daniel Kouril and Petr Holub, I - removed the dependency on valicert asn1 parser, remove smartcard - and globus support (for now). Work to be done on this: DH support, - Globus support, Smartcard support, windows support (MS implements - -09 of the draft), make it conform to the new draft - - * lib/krb5/pkinit.c: fix bugs, improve error reporting - -2003-11-23 Love Hörnquist Åstrand - - * kuser/kinit.c: add some "struct foo;" glue for pkinit - structures that isn't used - - * lib/krb5/pkinit.c: clean up, make remove depenency on openssl's - api - - * lib/krb5/krb5_locl.h: add some glue for pkinit add reference - counter to _krb5_get_init_creds_opt_private - - * lib/krb5/init_creds.c: reference count krb5_get_init_creds_opt - private component to avoid copy all the data in it - - * lib/krb5/crypto.c (AES_string_to_key): fix memory leak - - * lib/krb5/init_creds_pw.c (init_cred_loop): fix memory leak - - * lib/krb5/heim_threads.h: include pthread.h in the pthread case - -2003-11-18 Love Hörnquist Åstrand - - * kpasswd/kpasswdd.c (main): parse kdc.conf - From: Jeffrey Hutzelman - -2003-11-15 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am (TESTS): add test_crypto - - * lib/krb5/test_crypto.c: time crypto operations - -2003-11-14 Love Hörnquist Åstrand - - * doc/init-creds: spelling, Bruno Rohee - -2003-11-09 Love Hörnquist Åstrand - - * lib/krb5/rd_req.c (krb5_verify_ap_req2): krb5_free_ticket free - the ticket now, rewrite error handling to handle that - - * kpasswd/kpasswdd.c (process): don't free ticket, - krb5_free_ticket does that now - - * kdc/kerberos5.c (tgs_rep2): don't free ticket, krb5_free_ticket - does that now - - * lib/krb5/ticket.c (krb5_free_ticket): free the ticket itself to - match mit behavior, pointed out by Derrick Brashear - - * lib/krb5/krb5_ticket.3: krb5_free_ticket free the whole ticket - -2003-11-08 Love Hörnquist Åstrand - - * lib/krb5/padata.c: add krb5_padata_add - - * lib/krb5/krb5.h: krb5_context_data.pkinit_win2k_compatible - - * lib/krb5/Makefile.am: add pkinit.c - - * kuser/kinit.c: add pkinit support - - * lib/krb5/init_creds_pw.c: add support for pkinit - - * lib/krb5/krb5_locl.h: add the opaque krb5_pk_init_ctx to - _krb5_get_init_creds_opt_private - - * lib/krb5/pkinit.c: rename krb5_pk_init_openssl_ctx to - krb5_pk_init_ctx fix win2k error handling - - * lib/krb5/pkinit.c: PKINIT patch from Daniel Kouril and Petr - Holub, I removed the dependency on valicert asn1 parser, remove - smartcard and globus support (for now). Work to be done on this: - DH support, Globus support, Smartcard support, windows support (MS - implements -09 of the draft), verify that it conforms the new - draft - -2003-11-07 Love Hörnquist Åstrand - - * lib/asn1/der_copy.c (copy_oid): copy all components - -2003-10-27 Johan Danielsson - - * lib/krb5/krb5.conf.5: document capaths section - -2003-10-22 Johan Danielsson - - * kdc/kerberos5.c: make sure that the server realm and the krbtgt - second component are identical; get rpath from the capaths section - - * kdc/kerberos5.c: change logic for when to check transited policy - to a tri-state model involving per principal flags (to be - implemented) - - * kdc/kdc_locl.h: change enforce_transited_policy to a tri-state - variable - - * kdc/config.c: change enforce_transited_policy to a tri-state - variable - -2003-10-22 Love Hörnquist Åstrand - - * lib/krb5/transited.c (krb5_domain_x500_encode): always zero out - encoding to make sure it have a defined value on failure - - * lib/krb5/transited.c (krb5_domain_x500_encode): - if num_realms ==0, set encoding and return (avoids malloc(0)), - check return value for malloc - -2003-10-21 Johan Danielsson - - * kdc/kerberos5.c (fix_transited_encoding): always print - cross-realm information - -2003-10-21 Love Hörnquist Åstrand - - * doc/setup.texi: spelling, From: Tracy Di Marco White - - * kdc/kerberos5.c (fix_transited_encoding): set transited type - -2003-10-21 Johan Danielsson - - * kdc/kdc.8: document enforce-transited-policy - - * kdc/kerberos5.c: always check transited policy if flag set - either globally or on principal - - * kdc/config.c: add flag to always check transited policy - - * lib/hdb/hdb.asn1: add flag to enforce transited policy - -2003-10-21 Love Hörnquist Åstrand - - * lib/krb5/transited.c (krb5_domain_x500_decode): set *num_realms - to zero not num_realms - - * kuser/kgetcred.1: add --no-transit-check - - * kuser/kgetcred.c: add --no-transit-check - - * doc/setup.texi: describe Transit policy - -2003-10-20 Johan Danielsson - - * kdc/kerberos5.c (fix_transited_encoding): also verify with - policy, unless asked not to - - * lib/krb5/rd_req.c (krb5_decrypt_ticket): try to verify transited - realms, unless the transited-policy-checked flag is set - - * lib/krb5/transited.c (krb5_domain_x500_decode): handle zero - length tr data; - (krb5_check_transited): new function that does more useful stuff - - * lib/krb5/get_cred.c: get capath info from [capaths] section - -2003-10-16 Johan Danielsson - - * lib/krb5/fcache.c: Sleep forever waiting for lock. Previous - method doesn't work well with a large number of clients accessing - the cache at the same time, and there is no simple way to add a - timeout to the lock. - -2003-10-13 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.c: print the error value - krb5_init_context failed with - - * lib/krb5/config_file.c (krb5_config_parse_file_debug): punt if - there is binding before a section declaration. Bug found by - Arkadiusz Miskiewicz - -2003-10-13 Johan Danielsson - - * lib/krb5/fcache.c (erase_file): revert a change in previous; if - the ccache is a symlink, kdestroy should remove it - - * lib/krb5/fcache.c: implement locking - -2003-10-12 Johan Danielsson - - * kuser/klist.c (print_tickets): bail out if krb5_cc_next_cred - returns error other than KRB5_CC_END - -2003-10-07 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c: add some help function that is common - between ENC_TS and SAM2, free the etype{,2}-infos on failure, move - the pa counter into krb5_get_init_creds_ctx - -2003-10-06 Love Hörnquist Åstrand - - * kdc/kaserver.c (do_getticket): if times data is shorter then 8 - byte, request is malformed. - - * kdc/kaserver.c (do_authenticate): if request length is less then - 8 byte, its a bad request and fail. Pointed out by Marco Foglia - - - * lib/krb5/verify_krb5_conf.c: add flag --warn-mit-syntax that - warns for mit syntax is used and just ignore the mit syntax when - its used - - * lib/krb5/verify_krb5_conf.c: parse [kdc]use_2b and [gssapi] - -2003-10-04 Love Hörnquist Åstrand - - * lib/asn1/lex.l: add BOOLEAN - - * lib/asn1/parse.y: add BOOLEAN - -2003-10-03 Love Hörnquist Åstrand - - * kuser/kinit.c: When running kinit in "fork mode" do pagsh - independent of krb4, also always do krb4 setup of cc. Always try - to destroy the v4 cc. - - add boolean --{,no-}request-pac that will request pac or not - - * kuser/klist.c (check_for_tgt): set client as part of the - pattern/match cred - - * lib/krb5/convert_creds.c (_krb5_krb_dest_tkt): unlink v4 token - (get_krb4_cc_name): move out from _krb5_krb_tf_setup - (_krb5_krb_tf_setup): adapt to allocated filename instead of - static filename - - * lib/krb5/krb5-v4compat.h: add _krb5_krb_dest_tkt and TKT_ROOT - - * lib/krb5/init_creds_pw.c (*) send PA_PAC_REQUEST when the user - have requested either use PAC or not use PAC, if the option not - set from the user, leave it up to the kdc to decide. - (init_creds_loop): clear error string on success - - * lib/krb5/init_creds.c: add - krb5_get_init_creds_opt_set_paq_request break out common part of - extended opt functions to require_ext_opt - - * lib/krb5/krb5_locl.h: add enum krb5_get_init_creds_req_pac and - use it in struct _krb5_get_init_creds_opt_private - - * tools/kdc-log-analyze.pl: handle some more failure lines - - * doc/programming.texi: some diffrences between Heimdal and MIT - Kerberos in the API - - * doc/setup.texi: add Setting up DNS - - * lib/krb5/rd_req.c (krb5_rd_req): always free keyblock since its - alway used - - * lib/asn1/Makefile.am: add SAM types and PAC_REQUEST - - * lib/asn1/k5.asn1: add more preauth types, add PA-PAC-REQUEST - - * lib/asn1: add boolean support - -2003-10-02 Love Hörnquist Åstrand - - * lib/krb5/changepw.c (setpw_send_request): free ap_req_data on - failure - -2003-09-30 Love Hörnquist Åstrand - - * appl/test/http_client.c (do_connect): use ai_protocol 0 - - * lib/krb5/init_creds_pw.c (init_cred_loop): handle - KRB5KRB_ERR_RESPONSE_TOO_BIG and loop again, this time requesting - LARGE_MSG from send to kdc, and if this is the second time bail - out; try to free memory - - * lib/krb5/send_to_kdc.c (krb5_sendto_kdc_flags): new function, - and then implement the order krb5_sendto_kdc* function with this - function. - - * lib/krb5/krbhst.c (krb5_krbhst_init_flags): new function, use it - and adapt callers - (krbhst_get_default_proto): new function, returns udp, or in case - large_msg was requested for the krb5_krbhst_data, use tcp. - (*): if the flag KD_LARGE_MSG was set on the krb5_krbhst_data, avoid - using udp, use krbhst_get_default_proto - - * lib/krb5/krb5.h: flags for krb5_krbhst_init_flags (and - krb5_send_to_kdc_flags) - -2003-09-23 Love Hörnquist Åstrand - - * lib/krb5/rd_req.c (krb5_rd_req): if we have a keyblock in auth - context, use that - - * appl/test/uu_client.c: print authorization data if there are any - - * lib/asn1/asn1_print.c: decode IA5Stringa and UTF8String - -2003-09-21 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c: use _krb5_get_init_creds_opt_copy - * lib/krb5/init_creds.c: don't export krb5_get_init_creds_opt_copy - - * lib/hdb/Makefile.am: libhdb might depend on LIB_dlopen - - * kuser/kinit.c: don't get v4 tickets by default - -2003-09-20 Love Hörnquist Åstrand - - * kpasswd/kpasswdd.c (process): remove a abort() - - * doc/win2k.texi: add some text about netdom.exe and trusts - - * TODO-1.0: gssapi rc4 done - - * kpasswd/kpasswdd.c: add support for Set password protocol as - defined by RFC3244 -- Microsoft Windows 2000 Kerberos Change - Password and Set Password Protocols - -2003-09-19 Love Hörnquist Åstrand - - * lib/hdb/db3.c: improve readability of ->open ifdef, check if - version >= 4.1 - - * lib/krb5/init_creds.c (krb5_get_init_creds_opt_copy): add - - * lib/krb5/rd_req.c (krb5_rd_req): allow caller to pass in a key - in the auth_context, they way processes that doesn't use the - keytab can still pass in the key of the service (matches behavior - of MIT Kerberos). - -2003-09-18 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c: collect all init_creds context into a - structure so it can easier be passed around, also, while here, - change nonce for every request - - * lib/krb5/get_in_tkt.c (init_as_req): don't realloc data before - the loop, add_padata() will handle that itself - - * lib/krb5/get_for_creds.c (add_addrs): don't increase addr->len - until in contains interesting data, use right iteration counter - when clearing the addresses - - * lib/krb5/log.c (log_realloc): increase len after realloc returns - sucessfully - -2003-09-12 Love Hörnquist Åstrand - - * lib/krb5/config_file.c: fix prototypes - From: Fredrik Ljungberg - -2003-09-10 Love Hörnquist Åstrand - - * appl/test/http_client.c: close socket when we are done, don't - allow the server to restart gssapi negotiation - - * lib/hdb/hdb_locl.h: include for ULONG_MAX noted by - Wissler Magnus on heimdal-discuss - - * appl/test/gssapi_client.c (proto): use select_mech - - * appl/test/http_client.c: use getarg - - * appl/test/gss_common.h: prototype for select_mech - - * appl/test/gss_common.c (select_mech): return the gss_OID from a - mech name - - * appl/test/http_client.c: print both source and target - - * appl/test/Makefile.am: build http_client - -2003-09-09 Love Hörnquist Åstrand - - * lib/asn1/asn1_print.c: add support for printing Enumerated - - * appl/test/gssapi_client.c: allow user to select mech; krb5, - spnego, and no-oid - - * appl/test/test_locl.h: add mech - - * appl/test/common.c: add --mech,-m argument - - * appl/test/gssapi_server.c: print the mech that was used - - * kdc/kerberos5.c (only_older_enctype_p): check request if the - client only supports old enctypes, before it used the database - -2003-09-08 Love Hörnquist Åstrand - - * **/*.c: add context argument to krb5_get_init_creds_opt_alloc - - * lib/krb5/init_creds.c (krb5_get_init_creds_opt_alloc): add - context argument - - * lib/krb5/krb5_get_init_creds.3: spelling - -2003-09-04 Love Hörnquist Åstrand - - * lib/krb5/context.c (add_file): make len argument an pointer to - an integer - - * lib/asn1/k5.asn1: add SAM types - - * lib/krb5/init_creds_pw.c: break out the encrypt timestamp - preauth to its function break out the pa_data_to_key_plain to its - own function make more variables const - -2003-09-04 Johan Danielsson - - * lib/krb5/krb5.conf.5: document appdefaults/{forward,encrypt} - -2003-09-03 Love Hörnquist Åstrand - - * lib/krb5/krb5.h: Add key usage for encryption of the - SAM-NONCE-OR-SAD field. - - * include/make_crypto.c: include in the openssl - case - - * kdc/hprop.h: use new DES_ api - - * lib/krb5/krb5-v4compat.h: assume session key is a char array of - length 8 - - * lib/krb5/prompter_posix.c: - s/des_read_pw_string/UI_UTIL_read_pw_string/ - - * kuser/kinit.c: s/des_read_pw_string/UI_UTIL_read_pw_string/ - - * kdc/string2key.c: s/des_read_pw_string/UI_UTIL_read_pw_string/ - - * kdc/kstash.c: s/des_read_pw_string/UI_UTIL_read_pw_string/ - - * admin/add.c: s/des_read_pw_string/UI_UTIL_read_pw_string/ - - * lib/krb5/crypto.c: switch from the des_ to the DES_ api - - * kdc/hprop.c: use DES_KEY_SZ instead of sizeof(des_block) - - * kuser/kverify.c: use - krb5_get_init_creds_opt_alloc/krb5_get_init_creds_opt_free - - * kpasswd/kpasswd-generator.c: use - krb5_get_init_creds_opt_alloc/krb5_get_init_creds_opt_free - - * kdc/hprop.c: use - krb5_get_init_creds_opt_alloc/krb5_get_init_creds_opt_free compare - a uint32_t with 0xffffffff instead of -1 - - * lib/krb5/krb5_425_conv_principal.3: fix [Gt] - - * kuser/kinit.c: use - krb5_get_init_creds_opt_alloc/krb5_get_init_creds_opt_free - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_password): handle - password passed in though context - - * lib/krb5/Makefile.am (TESTS): += test_config - - * lib/krb5/aes-test.c: move variable thats used within a #ifdef to - be defined within that #ifdef - - * lib/krb5/data.c (krb5_data_free): reset whole krb5_data when - freeing it - - * lib/krb5/keyblock.c (krb5_keyblock_zero): new function, zeros - out a keyblock - - * lib/krb5/init_creds_pw.c: rewrite/implement - krb5_get_init_creds_password with new preauth handing, still it - can only work with krb5-pa-enc-timestamp for preauth, but now it - can handle etype-info2 - - * lib/krb5/init_creds.c (krb5_get_init_creds_opt_alloc): allocate - a opt structure - (krb5_get_init_creds_opt_free): free a opt structure - (krb5_get_init_creds_opt_set_pa_password): set preauth info for - enc-timestamp - - * lib/krb5/krb5_locl.h: add struct - _krb5_get_init_creds_opt_private - -2003-09-02 Love Hörnquist Åstrand - - * lib/krb5/krb5.h: add SAM keyusage numbers, add s2k proc typedef, - add a pointer to a private part of krb5_get_init_creds_opt - - * kdc/string2key.c (main): avoid const warning by using a extra - variable - -2003-08-31 Love Hörnquist Åstrand - - * lib/krb5/ticket.c (krb5_ticket_get_authorization_data_type): - reindent - - * lib/krb5/ticket.c (krb5_copy_ticket): free all data when - failing, copy data to right memory, the later pointed out by Luke - Howard. - -2003-08-30 Love Hörnquist Åstrand - - * lib/krb5/krb5.h: cfx-01 use diffrent usage numbers - -2003-08-29 Love Hörnquist Åstrand - - * lib/hdb/db3.c: try to include more db headers - - * lib/hdb/db3.c: patch for working with DB4 on heimdal-discuss - From: Luke Howard - -2003-08-28 Love Hörnquist Åstrand - - * lib/krb5/krb5.h: add KEYTYPE_ARCFOUR_56 - - * appl/test/gssapi_client.c: send both INT and CONF wrapped token - - * appl/test/gssapi_server.c: recv both INT and CONF wrapped token - - * lib/asn1/k5.asn1: add KRB5_NT_SMTP_NAME and KRB5_NT_ENTERPRISE - -2003-08-27 Love Hörnquist Åstrand - - * appl/test/uu_client.c (proto): fill in client in the match cred - -2003-08-26 Love Hörnquist Åstrand - - * lib/krb5/krb5.h: CFX uses slightly diffrent usage numbers - - * lib/krb5/crypto.c (usage2arcfour): simplify, only include - special cases From: Luke Howard - -2003-08-25 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: code rewrite from Luke Howard - - - * lib/krb5/crypto.c (arcfour_checksum_p): return true when is - arcfour, not when its not pointed out by Luke Howard - - * doc/ack.texi: update Luke Howard email address - -2003-08-24 Love Hörnquist Åstrand - - * lib/krb5/krb5_encrypt.3: document: - krb5_crypto_getconfoundersize, krb5_crypto_getblocksize - krb5_crypto_getenctype, krb5_crypto_getpadsize - - * lib/krb5/crypto.c (krb5_crypto_getpadsize, - krb5_crypto_getconfoundersize): added From: Luke Howard - - -2003-08-23 Love Hörnquist Åstrand - - * kdc/connect.c (handle_tcp): handle recvfrom returning 0 - (connection closed) - - * kdc/connect.c (grow_descr): increment the size after we succeed - to allocate the space - - * lib/krb5/krb5_create_checksum.3: text about when - krb5_crypto_get_checksum_type is useful - - * lib/krb5/crypto.c (krb5_crypto_get_checksum_type): fix format - string - - * lib/krb5/krb5_create_checksum.3: document - krb5_crypto_get_checksum_type - - * lib/krb5/crypto.c: add krb5_crypto_get_checksum_type - From: Luke Howard - - * lib/asn1/gen.c: s/UTF8String/heim_utf8_string/ in generated code - From: Luke Howard - -2003-08-21 Love Hörnquist Åstrand - - * include/make_crypto.c: include aes.h inc in the local libdes - case too - -2003-08-20 Johan Danielsson - - * lib/asn1/der_free.c: set free'd poiners to NULL - - * lib/asn1/gen_free.c: set free'd poiners to NULL - -2003-08-20 Love Hörnquist Åstrand - - * lib/krb5/heim_threads.h: XXX don't use "plain" pthread support - on netbsd - - * lib/krb5/crypto.c: Do the arcfour checksum mapping for - krb5_create_checksum and krb5_verify_checksum, From: Luke Howard - - -2003-08-18 Love Hörnquist Åstrand - - * lib/krb5/test_config.c: check krb5_prepend_config_files_default - and krb5_prepend_config_files - - * lib/krb5/context.c: add krb5_prepend_config_files and - krb5_prepend_config_files_default - -2003-08-17 Love Hörnquist Åstrand - - * lib/hdb/mkey.c (read_master_mit): krb5_ret_int16 takes a int16_t - as argument - - * lib/krb5/parse-name-test.c: please lint (and me) - - * kdc/config.c (configure): remove only set variable 'e' - - * kdc/connect.c (init_socket): sockaddr size argument to - krb5_addr2sockaddr is a krb5_addr2sockaddr * - - * kdc/kerberos5.c (as_rep): remove usused variable - (tgs_rep2): don't use a temporary ret-variable, ret is reset later - - * lib/krb5/krb5_get_in_cred.3: these function will be deprecated - - * lib/krb5/Makefile.am: man_MANS += krb5_get_init_creds.3 - - * lib/krb5/krb5_get_init_creds.3: begining of documentation of - krb5_get_init_creds - - * lib/krb5/get_in_tkt.c (krb5_get_in_tkt): for compatibility with - with the mit implemtation, don't free `creds' argument when done, - its up the the caller to do that, also allow a NULL ccache. - -2003-08-16 Love Hörnquist Åstrand - - * lib/krb5/krb5.conf.5: document tgs_require_subkey - - * lib/asn1/Makefile.am: remove trance of generate tests files, its - not really for consumption yet - - * lib/hdb/Makefile.am: split generated source from non generated - source we make-proto.pl can generate prototypes for non - generate-source only (make-proto.pl dies on asn1compile's .c - files) - - * lib/krb5/get_cred.c (init_tgs_req): make generation of subkey - optional on configuration parameter - [realms]realm={tgs_require_subkey=bool} - defaults to off. The RFC1510 weakly defines the correct behavior, - so old DCE secd apparently required the subkey to be there, and MS - will use it when its there. But the request isn't encrypted in the - subkey, so you get to choose if you want to talk to a MS mdc or a - old DCE secd. - - * kdc/kerberos5.c (*): handle krb5_unparse_name returning non-zero - -2003-08-15 Love Hörnquist Åstrand - - * lib/krb5/principal.c (unparse_name): len can't be zero, so, - don't check for that - -2003-08-13 Love Hörnquist Åstrand - - * lib/krb5/principal.c (unparse_name): make sure there are space - for a NUL, set *name to NULL when there is a failure (so caller - can't get hold of a freed pointer) - -2003-07-26 Love Hörnquist Åstrand - - * lib/krb5/kerberos.8: remove duplicate manual, from - cjep@netbsd.org - -2003-07-25 Love Hörnquist Åstrand - - * lib/krb5/cache.c: indent - - * lib/krb5/cache.c (krb5_cc_set_default_name): only read - KRB5CCNAME when not suid - -2003-07-24 Love Hörnquist Åstrand - - * lib/krb5/keytab_krb4.c (read_v4_entry): the des key is 8 bytes, - use a char array instead of des_cblock - -2003-07-23 Love Hörnquist Åstrand - - * kdc/kerberos5.c: add support for KRB5_PADATA_ETYPE_INFO2 - - * lib/krb5/crypto.c (hmac): make it return an error when out of - memory, update callsites to either return error or use krb5_abortx - (krb5_hmac): expose hmac - -2003-07-22 Love Hörnquist Åstrand - - * lib/krb5/keyblock.c (krb5_keyblock_get_enctype): return enctype - of keyblock - - * lib/krb5/Makefile.am (man_MANS): += krb5_keyblock.3 - - * lib/krb5/krb5_keyblock.3: some information about krb5_keyblock - and related functions - - * lib/krb5/heim_threads.h: make the non-debug version of the mutex - macros "use" the "mutex" integer so the compile wont complain - about defined unused variables - - * lib/krb5/heim_threads.h: make thread local storage macros take a - "return" argument so no functions need to be created for the - no-pthread case - - * lib/krb5/heim_threads.h: adding RWLOCKS and [sg]etspecific - - * configure.in: use KRB_PTHREADS - - * lib/asn1/Makefile.am (gen_files): add asn1_KerberosString and - sort - - * lib/asn1/k5.asn1 (ETYPE-INFO2-ENTRY): salt is a KerberosString - - * lib/krb5/krb5.3: add ticket access functions - * lib/krb5/krb5_ticket.3: ditto - * lib/krb5/ticket.c: ditto - * lib/krb5/Makefile.am: ditto - - * lib/krb5/mit_glue.c: add some more krb5_c functions - - * lib/krb5/krb5_c_make_checksum.3: add some more krb5_c functions - - * lib/krb5/crypto.c (krb5_cksumtype_valid): check is checksum type - is a valid one - - * lib/krb5/crypto.c (krb5_checksum_is_keyed): only set extented - error string when there is a context - (krb5_checksum_is_collision_proof): ditto - -2003-07-21 Love Hörnquist Åstrand - - * lib/krb5/mit_glue.c (krb5_c_get_checksum): make type and data - argument optional - (krb5_c_{encrypt,decrypt}): return "better" error codes for - invalid ivec length - - * lib/krb5/krb5_c_make_checksum.3: update krb5_c_get_checksum - usage - - * lib/krb5/crypto.c (krb5_crypto_getenctype): new function - - * include/make_crypto.c: avoid redefining - OPENSSL_DES_LIBDES_COMPATIBILITY - - * lib/krb5/krb5.h: add krb5_enc_data - -2003-07-19 Love Hörnquist Åstrand - - * lib/krb5/krb5.3: add krb5_c_ functions - - * lib/krb5/mit_glue.c: support passing in NULL as the - cipher_state/ivec - - * lib/krb5/aes-test.c: add test for krb5_c_encrypt_length and - krb5_c_decrypt - - * lib/krb5/krb5_c_make_checksum.3: krb5_c encryption glue - - * lib/krb5/crypto.c (wrapped_length/wrapped_length_derived): when - calculating the length of the encrypted data, use the keyed - checksum length if the enctype supports a keyed checksum. This - only matter for aes, for all other enctypes the key and unkeyed - checksum have the same length. - -2003-07-18 Love Hörnquist Åstrand - - * lib/krb5/mit_glue.c: first version of krb5_c encryption glue - - * doc/install.texi: update pointer to luke ldap documentation - - * lib/hdb/hdb.c (hdb_create): check for dynamic backend after - static to avoid warning from dynamic backend when using a known - static backend - -2003-07-16 Love Hörnquist Åstrand - - * lib/krb5/cache.c: don't return value in void function - -2003-07-15 Love Hörnquist Åstrand - - * lib/krb5/creds.c (krb5_compare_creds): if client is specified in - the mcreds, check that too - - * lib/krb5/{keytab_file.c,principal.c,mk_error.c,krb5.h,get_cred.c}: - prefix libasn1 types with heim_ - - * lib/asn1: prefix typedefs and structs with heim_ - -2003-07-13 Love Hörnquist Åstrand - - * lib/hdb/hdb.c: avoid unnecessary setting of variable - -2003-07-07 Love Hörnquist Åstrand - - * kuser/klist.c (check_for_tgt): use krb5_cc_clear_mcred - - * appl/test/uu_client.c (proto): use krb5_cc_clear_mcred - - * lib/krb5/get_cred.c (init_tgs_req): in case of error, don't free - in the req_body addresses since they where pass in by caller - (find_cred): use krb5_cc_clear_mcred - - * lib/krb5/krb5_ccache.3: document krb5_cc_clear_mcred - - * lib/krb5/cache.c (krb5_cc_clear_mcred): new function, clear a - krb5_creds to use with krb5_cc_retrieve_cred - -2003-06-30 Love Hörnquist Åstrand - - * lib/hdb/hdb.c (find_dynamic_method): if there isn't a prefix, - don't load anything - -2003-06-29 Love Hörnquist Åstrand - - * lib/hdb/hdb.c: Dynamic backend loading, based on patch from Luke - Howard - - * lib/hdb/hdb.h: add struct hdb_so_method and - HDB_INTERFACE_VERSION - -2003-06-28 Love Hörnquist Åstrand - - * lib/krb5/mk_req_ext.c (krb5_mk_req_internal): when using - arcfour-hmac-md5, use an unkeyed checksum (rsa-md5), since - Microsoft calculates the keyed checksum with the subkey of the - authenticator. - - * kuser/kinit.c: write out v4 credential caches with - _krb5_krb_tf_setup - - * lib/krb5/krb5-v4compat.h: add _krb5_krb_tf_setup - - * lib/krb5/convert_creds.c (_krb5_krb_tf_setup): create/append v4 - credential to a new krb4 ticket file - -2003-06-27 Johan Danielsson - - * lib/krb5/krb5_kuserok.3: put Nd argument in double quotes since - it contains more than 9 words; from wiz - -2003-06-25 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.c: add missing " within #if 0, from - stefan sokoll - -2003-06-24 Love Hörnquist Åstrand - - * lib/krb5/krb5_timeofday.3: improve krb5_set_real_time text - - * lib/krb5/time.c: improve comment for krb5_set_real_time - -2003-06-23 Johan Danielsson - - * kuser/kinit.1: document -A - - * kuser/kinit.c: add -A as an alias for --no-addresses - -2003-06-22 Love Hörnquist Åstrand - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): pass in a - krb5_timestamp to krb5_us_timeofday - - * lib/krb5/mk_error.c (krb5_mk_error): pass in a krb5_timestamp to - krb5_us_timeofday - - * lib/krb5/time.c (krb5_set_real_time): fix comment and make it - work - - * lib/krb5/time.c, lib/krb5/krb5_timeofday.3, - lib/krb5/Makefile.am lib/krb5/test_time.c: - - implement krb5_set_real_time, used by SAMBA, requested by Luke - Howard - - * lib/asn1/k5.asn1: make the aes and sha1 checksum types match - draft-ietf-krb-wg-crypto-05 - -2003-06-21 Love Hörnquist Åstrand - - * lib/krb5/aes-test.c: add a test for aes kcrypto encrypted data - - * lib/krb5/crypto.c: clean up AES code to use a structure instead - of a key array - (_krb5_AES_string_to_default_iterator): set to 4096 as described in - aes draft -04 - (derive_key): always remove the key->schedule since its - will contain the wrong (parent key) info - -2003-06-18 Love Hörnquist Åstrand - - * lib/krb5/aes-test.c: add aes256 test vectors from Ken Raeburn - * doc/setup.texi: add more kdc's to the example - -2003-06-17 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: use int2HDBFlags/HDBFlags2int From: Alberto - Patino , Luke Howard - Pointed out by Andrew Bartlett of Samba - - * lib/krb5/heim_threads.h: remove freebsd comment, don't use debug - pthread stubs by default - - * lib/krb5/Makefile.am (man_MANS): drop krb5_free_addresses.3 - - * lib/krb5/krb5_free_addresses.3: removed file, functions are - documented in krb5_address.3 - - * lib/krb5/codec.c: add krb5_{de,en}code_ETYPE_INFO2 - - * lib/krb5/crypto.c: add _krb5_AES_string_to_default_iterator add - krb5_string_to_key_salt_opaque() fix keylengh for keytype_aes256 - -2003-06-06 Love Hörnquist Åstrand - - * doc/setup.texi: Point out that slave needs /var/heimdal - directory and masterkey From: Mans Nilsson , - Fix spelling while here - -2003-06-02 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am, krb5_get_in_cred.3, krb5.3: - add manpage for: krb5_get_in_cred, krb5_get_in_tkt, - krb5_get_in_tkt_with_keytab, krb5_get_in_tkt_with_password, - krb5_get_in_tkt_with_skey - -2003-05-28 Assar Westerlund - - * lib/krb5/heim_threads.h: Fix unlock/destroy macros for the - non-threaded cases to work. Fix typo. - -2003-05-27 Johan Danielsson - - * lib/asn1/{der_put.c,der_length.c,check-der.c}: Fix encoding of - "unsigned" integers. If MSB is set, we need to pad with a zero - byte. - -2003-05-27 Love Hörnquist Åstrand - - * lib/krb5/krb5_c_make_checksum.3: some more mdoc fixes - - * lib/hdb/hdb-ldap.c (LDAP__connect): bind sasl "EXTERNAL" to ldap - connection - (LDAP_store): remove superfluous argument to asprintf - - From Alberto Patino - -2003-05-26 Love Hörnquist Åstrand - - * lib/krb5/*.[0-9]: pacify mdoclink - - * lib/krb5/krb5_ccache.3: document diffrences between mit and - heimdal krb5_cc_gen_new ccache -> credential cache s/[\t ]+$// - -2003-05-21 Love Hörnquist Åstrand - - * appl/test/gssapi_server.c (proto): start to use - gss_krb5_copy_ccache - - * appl/test/nt_gss_server.c (proto): comment out gss_ctx_id_t - groveling for now - -2003-05-20 Love Hörnquist Åstrand - - * lib/asn1: - - add parser/generate glue for UTF8String and NULL - (DER primitive encode/decode functions missing) - - handle parsing of DEFAULT and, ... - -2003-05-16 Love Hörnquist Åstrand - - * lib/krb5/heim_threads.h: add missing argument to mutex_init - - * lib/krb5/crypto.c: protect the random initiator with a mutex - - * lib/krb5/mcache.c: protect the mcc_head with a mutex - - * lib/krb5/krb5_locl.h: include heim_threads.h - - * lib/krb5/heim_threads.h: wrapper macros for thread - synchronization primitives - -2003-05-15 Love Hörnquist Åstrand - - * lib/krb5/krb5_principal.3 - lib/krb5/Makefile.am: - Add all Kerberos principal function to one manpage, add a few more - principal function to it, remove old now dup manpages - - * lib/krb5/krb5_build_principal.3: remove file - * lib/krb5/krb5_free_principal.3: remove file - * lib/krb5/krb5_sname_to_principal.3: remove file - * lib/krb5/krb5_principal_get_realm.3: remove file - -2003-05-14 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.8: sort sections, from netbsd - - * lib/krb5/krb5_verify_user.3: .Sh EXAMPLE -> .Sh EXAMPLES, from - netbsd - - * lib/krb5/krb5_openlog.3: .Sh EXAMPLE -> .Sh EXAMPLES, sort - sections, from netbsd - - * lib/krb5/krb5_keytab.3: .Sh EXAMPLE -> .Sh EXAMPLES, mdoc fixes, - from netbsd - - * lib/krb5/krb5_get_krbhst.3: .Sh EXAMPLE -> .Sh EXAMPLES, from - netbsd - - * lib/krb5/krb5_get_all_client_addrs.3: add .Os, from NetBSD - - * lib/krb5/krb5_build_principal.3: sort sections, from NetBSD - - * lib/krb5/krb5.conf.5: .Sh EXAMPLE -> .Sh EXAMPLES, from netbsd - - * lib/krb5/get_default_realm.c: compatability -> compatibility, - from netbsd - - * lib/krb5/krb5_warn.3: add copyright/license - - * lib/krb5/krb5_context.3: add SYNOPSIS and LIBRARY - - * lib/krb5/krb5.3: add RCSID - - * kdc/hprop.8: fix mdoc problem, from netbsd - - * lib/krb5/krb5_krbhst_init.3: uppercase url, from Thomas Klausner - - - * kuser/kinit.1: setup -> set up, new sentence, new line from - Thomas Klausner - -2003-05-13 Love Hörnquist Åstrand - - * kpasswd/kpasswd.1: handle setting passwords for multiple - principals at the same time - - * kpasswd/kpasswd.c: handle setting passwords for multiple - principals at the same time - - * lib/krb5/changepw.c: draft-ietf-cat-kerb-chg-password-02 and - rfc3244 share the response packet sure more constants now that - they exists - -2003-05-12 Love Hörnquist Åstrand - - * lib/krb5/krb5.h: some define for rfc3244 - - * lib/krb5/krb5.3: add krb5_change_password and krb5_set_password - - * kpasswd/kpasswd.1: document --admin-principal - - * kpasswd/kpasswd.c: use krb5_set_password - - * lib/krb5/krb5_set_password.3: document krb5_change_password and - krb5_set_password - - * lib/krb5/changepw.c: implement rfc3244, partly from - shadow@dementia.org - - * lib/asn1/Makefile.am (gen_files): asn1_ChangePasswdDataMS.x for - RFC3244 - - * lib/asn1/k5.asn1: add ChangePasswdDataMS, for - RFC3244 - -2003-05-08 Love Hörnquist Åstrand - - * kuser/kdestroy.c: destroy tokens even if there isn't v4 support - - * kuser/kinit.c: get token even if there isn't v4 support - - * kuser/klist.c: print tokens even if there isn't v4 support - -2003-05-06 Johan Danielsson - - * lib/krb5/name-45-test.c: need to use empty krb5.conf for some - tests - - * lib/asn1/check-gen.c: there is no \e escape sequence; replace - everything with hex-codes, and cast to unsigned char* to make some - compilers happy - -2003-05-06 Love Hörnquist Åstrand - - * lib/krb5/get_in_tkt.c (make_pa_enc_timestamp): make sure first - argument to krb5_us_timeofday have correct type - -2003-05-05 Assar Westerlund - - * include/make_crypto.c (main): include aes.h if ENABLE_AES - -2003-05-05 Love Hörnquist Åstrand - - * make-release: when fixing a valid cvs tag from release name - replace all number. to number- for all non-overlapping matches - -2003-05-04 Love Hörnquist Åstrand - - * lib/asn1/Makefile.am: gen_files += asn1_ETYPE_INFO2.x and - asn1_ETYPE_INFO2_ENTRY.x - (libasn1_la_LDFLAGS): set version to 6:1:1 - - * doc/Makefile.am: add apps.texi - - * doc/setup.texi: add move forward link to applications - - * doc/heimdal.texi: add applications - - * doc/misc.texi: move afs stuff to applications add link to - applications - - * doc/apps.texi: text about applications using kerberos - move afs text here - -2003-05-03 Love Hörnquist Åstrand - - * doc/setup.texi: add cross realm text - -2003-04-29 Love Hörnquist Åstrand - - * lib/krb5/krb5_crypto_init.3: document krb5_enctype_to_string and - krb5_string_to_enctype - -2003-04-28 Love Hörnquist Åstrand - - * kdc/v4_dump.c (v4_prop_dump): limit strings length, from openbsd - -2003-04-26 Love Hörnquist Åstrand - - * lib/krb5/aes-test.c: use _krb5_PKCS5_PBKDF2 - * lib/krb5/crypto.c: unexport krb5_PKCS5_PBKDF2 - -2003-04-25 Johan Danielsson - - * lib/krb5/build_auth.c (krb5_build_authenticator): if the local - sequence number is non-zero, don't generate a new one - - * lib/krb5/mk_rep.c (krb5_mk_rep): if the local sequence number is - non-zero, don't generate a new one - - * lib/krb5/time.c (krb5_us_timeofday): make the sec parameter a - krb5_timestamp - - * lib/krb5/mk_priv.c lib/krb5/mk_safe.c lib/krb5/rd_priv.c - lib/krb5/rd_safe.c lib/krb5/rd_cred.c: implement RET_SEQUENCE and - RET_TIME - - * lib/krb5/krb5.h (krb5_replay_data): make usec signed (matching - asn1) - -2003-04-24 Love Hörnquist Åstrand - - * doc/programming.texi: s/managment/management/, from jmc - - -2003-04-23 Love Hörnquist Åstrand - - * lib/krb5/context.c (default_etypes): also advertise that we - handle aes encryption types - - * lib/krb5/Makefile.am: add krb5_c_ checksum related functions - - * lib/krb5/krb5_c_make_checksum.3: document krb5_c_ checksum - related functions - - * lib/krb5/mit_glue.c: add compat mit krb5_c checksum related - functions - - * lib/asn1/k5.asn1: add ETYPE-INFO2 and ETYPE-INFO2-ENTRY - -2003-04-22 Love Hörnquist Åstrand - - * lib/krb5/krbhst.c: copy NUL too, from janj@wenf.org via openbsd - -2003-04-17 Love Hörnquist Åstrand - - * lib/asn1/der_copy.c (copy_general_string): use strdup - * lib/asn1/der_put.c: remove sprintf - * lib/asn1/gen.c: remove strcpy/sprintf - - * lib/krb5/name-45-test.c: use a more unique name then ratatosk so - that other (me) have such hosts in the local domain and the tests - fails, to take hokkigai.pdc.kth.se instead - - * lib/krb5/test_alname.c: add --version and --help - -2003-04-16 Love Hörnquist Åstrand - - * lib/krb5/krb5_warn.3: add krb5_get_err_text - - * lib/krb5/transited.c: use strlcat/strlcpy, from openbsd - * lib/krb5/krbhst.c (srv_find_realm): use strlcpy, from openbsd - * lib/krb5/aname_to_localname.c (krb5_aname_to_localname): use - strlcpy, from openbsd - * kdc/hpropd.c: s/strcat/strlcat/, inspired from openbsd - * appl/kf/kfd.c: use strlcpy, from openbsd - -2003-04-16 Johan Danielsson - - * configure.in: fix for large file support in AIX, _LARGE_FILES - needs to be defined on the command line, since lex likes to - include stdio.h before we get to config.h - -2003-04-16 Love Hörnquist Åstrand - - * lib/krb5/*.3: Change .Fd #include to .In header.h, - from Thomas Klausner - - * lib/krb5/krb5.conf.5: spelling, from Thomas Klausner - - -2003-04-15 Love Hörnquist Åstrand - - * kdc/kerberos5.c: fix some more memory leaks - -2003-04-11 Love Hörnquist Åstrand - - * appl/kf/kf.1: spelling, from jmc - -2003-04-08 Love Hörnquist Åstrand - - * admin/ktutil.8: typos, from jmc - -2003-04-06 Love Hörnquist Åstrand - - * lib/krb5/krb5.3: s/kerberos/Kerberos/ - * lib/krb5/krb5_data.3: s/kerberos/Kerberos/ - * lib/krb5/krb5_address.3: s/kerberos/Kerberos/ - * lib/krb5/krb5_ccache.3: s/kerberos/Kerberos/ - * lib/krb5/krb5.conf.5: s/kerberos/Kerberos/ - * kuser/kinit.1: s/kerberos/Kerberos/ - * kdc/kdc.8: s/kerberos/Kerberos/ - -2003-04-01 Love Hörnquist Åstrand - - * lib/krb5/test_alname.c: more krb5_aname_to_localname tests - - * lib/krb5/aname_to_localname.c (krb5_aname_to_localname): when - converting too root, make sure user is ok according to - krb5_kuserok before allowing it. - - * lib/krb5/Makefile.am (noinst_PROGRAMS): += test_alname - - * lib/krb5/test_alname.c: add test for krb5_aname_to_localname - - * lib/krb5/crypto.c (krb5_DES_AFS3_CMU_string_to_key): used p1 - instead of the "illegal" salt #~, same change as kth-krb did - 1999. Problems occur with crypt() that behaves like AT&T crypt - (openssl does this). Pointed out by Marcus Watts. - - * admin/change.c (kt_change): collect all principals we are going - to change, and pick the highest kvno and use that to guess what - kvno the resulting kvno is going to be. Now two ktutil change in a - row works. XXX fix the protocol to pass the kvno back. - -2003-03-31 Love Hörnquist Åstrand - - * appl/kf/kf.1: afs->AFS, from jmc - -2003-03-30 Love Hörnquist Åstrand - - * doc/setup.texi: add description on how to turn on v4, 524 and - kaserver support - -2003-03-29 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.c (appdefaults_entries): add afslog - and afs-use-524 - -2003-03-28 Love Hörnquist Åstrand - - * kdc/kerberos5.c (as_rep): when the second enctype_to_string - failes, remember to free memory from the first enctype_to_string - - * lib/krb5/crypto.c (usage2arcfour): map KRB5_KU_TICKET to 2, - from Harald Joerg - (enctype_arcfour_hmac_md5): disable checksum_hmac_md5_enc - - * lib/hdb/mkey.c (hdb_unseal_keys_mkey): truncate key to the key - length when key is longer then expected length, its probably - longer since the encrypted data was padded, reported by Aidan - Cully - - * lib/krb5/crypto.c (krb5_enctype_keysize): return key size of - encyption type, inspired by Aidan Cully - -2003-03-27 Love Hörnquist Åstrand - - * lib/krb5/keytab.c (krb5_kt_get_entry): avoid printing 0 - (wildcard kvno) after principal when the keytab entry isn't found, - reported by Chris Chiappa - -2003-03-26 Love Hörnquist Åstrand - - * doc/misc.texi: update 2b example to match reality (from - mattiasa@e.kth.se) - - * doc/misc.texi: spelling and add `Configuring AFS clients' - subsection - -2003-03-25 Love Hörnquist Åstrand - - * lib/krb5/krb5.3: add krb5_free_data_contents.3 - - * lib/krb5/data.c: add krb5_free_data_contents for compat with MIT - API - - * lib/krb5/krb5_data.3: add krb5_free_data_contents for compat - with MIT API - - * lib/krb5/krb5_verify_user.3: write more about how the ccache - argument should be inited when used - -2003-03-25 Johan Danielsson - - * lib/krb5/addr_families.c (krb5_print_address): make sure - print_addr is defined for the given address type; make addrports - printable - - * kdc/string2key.c: print the used enctype for kerberos 5 keys - -2003-03-25 Love Hörnquist Åstrand - - * lib/krb5/aes-test.c: add another arcfour test - -2003-03-22 Love Hörnquist Åstrand - - * lib/krb5/aes-test.c: sneek in a test for arcfour-hmac-md5 - -2003-03-20 Love Hörnquist Åstrand - - * lib/krb5/krb5_ccache.3: update .Dd - - * lib/krb5/krb5.3: sort in krb5_data functions - - * lib/krb5/Makefile.am (man_MANS): += krb5_data.3 - - * lib/krb5/krb5_data.3: document krb5_data - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds_password): if - prompter is NULL, don't try to ask for a password to - change. reported by Iain Moffat @ ufl.edu via Howard Chu - - -2003-03-19 Love Hörnquist Åstrand - - * lib/krb5/krb5_keytab.3: spelling, from - - - * lib/krb5/krb5.conf.5: . means new line - - * lib/krb5/krb5.conf.5: spelling, from - - - * lib/krb5/krb5_auth_context.3: spelling, from - - -2003-03-18 Love Hörnquist Åstrand - - * kuser/Makefile.am: INCLUDES: -I$(srcdir)/../lib/krb5 - - * lib/krb5/convert_creds.c: add _krb5_krb_life_to_time - - * lib/krb5/krb5-v4compat.h: add _krb5_krb_life_to_time - - * kdc/kdc_locl.h: 524 is independent of kerberos 4, so move out - #ifdef KRB4 from enable_v4_cross_realm since 524 needs it - - * kdc/config.c: 524 is independent of kerberos 4, so move out - enable_v4_cross_realm from #ifdef KRB4 since 524 needs it - -2003-03-17 Assar Westerlund - - * kdc/kdc.8: document --kerberos4-cross-realm - * kdc/kerberos4.c: pay attention to enable_v4_cross_realm - * kdc/kdc_locl.h (enable_v4_cross_realm): add - * kdc/524.c (encode_524_response): check the enable_v4_cross_realm - flag before giving out v4 tickets for foreign v5 principals - * kdc/config.c: add --enable-kerberos4-cross-realm option (default - to off) - -2003-03-17 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am (man_MANS) += krb5_aname_to_localname.3 - - * lib/krb5/krb5_aname_to_localname.3: manpage for - krb5_aname_to_localname - - * lib/krb5/krb5_kuserok.3: s/KRB5_USEROK/KRB5_KUSEROK/ - -2003-03-16 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am (man_MANS): add krb5_set_default_realm.3 - - * lib/krb5/krb5.3: add manpages from krb5_set_default_realm.3 - - * lib/krb5/krb5_set_default_realm.3: Manpage for - krb5_free_host_realm, krb5_get_default_realm, - krb5_get_default_realms, krb5_get_host_realm, and - krb5_set_default_realm. - - * admin/ktutil.8: s/entype/enctype/, from Igor Sobrado - via NetBSD - - * lib/krb5/krb5_keytab.3: add documention for krb5_kt_get_type - - * lib/krb5/keytab.c (krb5_kt_get_type): get prefix/type of keytab - - * lib/krb5/krb5.h (KRB5_KT_PREFIX_MAX_LEN): max length of prefix - - * lib/krb5/krb5_ccache.3: document krb5_cc_get_ops, add more - types, add krb5_fcc_ops and krb5_mcc_ops - - * lib/krb5/cache.c (krb5_cc_get_ops): new function, return ops for - a id - -2003-03-15 Love Hörnquist Åstrand - - * doc/intro.texi: add reference to source code, binaries and the - manual - - * lib/krb5/krb5.3: krb5.h isn't in krb5 directory in heimdal - -2003-03-14 Love Hörnquist Åstrand - - * kdc/kdc.8: better/difrent english - - * kdc/kdc.8: . -> .\n, copyright/license - - * kdc/kdc.8: changed configuration file -> restart kdc - - * kdc/kerberos4.c: add krb4 into the most error messages written - to the logfile - - * lib/krb5/krb5_ccache.3: add missing name of argument - (krb5_context) to most functions - -2003-03-13 Love Hörnquist Åstrand - - * lib/krb5/kuserok.c (krb5_kuserok): preserve old behviour of - function and return FALSE when there isn't a local account for - `luser'. - - * lib/krb5/krb5_kuserok.3: fix prototype, spelling and more text - describing the function - -2003-03-12 Love Hörnquist Åstrand - - * lib/krb5/cache.c (krb5_cc_default): if krb5_cc_default_name - returned memory, don't return ENOMEM - -2003-03-11 Love Hörnquist Åstrand - - * lib/krb5/krb5.3: add krb5_address stuff and sort - - * lib/krb5/krb5_address.3: fix krb5_addr2sockaddr description - - * lib/krb5/Makefile.am (man_MANS): += krb5_address.3 - - * lib/krb5/krb5_address.3: document types krb5_address and - krb5_addresses and their helper functions - -2003-03-10 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am (man_MANS): += krb5_kuserok.3 - - * lib/krb5/krb5_kuserok.3: spelling, from cizzi@it.su.se - - * lib/krb5/Makefile.am (man_MANS): += krb5_ccache.3 - - * lib/krb5/krb5_ccache.3: spelling, from cizzi@it.su.se - - * lib/krb5/krb5.3: add more functions - - * lib/krb5/krb5_ccache.3: document krb5_ccache and krb5_cc - functions - - * lib/krb5/krb5_kuserok.3: document krb5_kuserok - - * lib/krb5/krb5_verify_user.3: document - krb5_verify_opt_set_flags(opt, KRB5_VERIFY_LREALMS) behavior - - * lib/krb5/krb5_verify_user.3: document krb5_verify_opt* and - krb5_verify_user_opt - - * lib/krb5/*.[0-9]: add copyright/licenses on more manpages - - * kuser/kdestroy.c (main): handle that krb5_cc_default_name can - return NULL - - * lib/krb5/Makefile.am (libkrb5_la_LDFLAGS): bump minor - (TESTS): add test_cc - - * lib/krb5/test_cc.c: test some - krb5_cc_default_name/krb5_cc_set_default_name combinations - - * lib/krb5/context.c (init_context_from_config_file): set - default_cc_name to NULL - (krb5_free_context): free default_cc_name if set - - * lib/krb5/cache.c (krb5_cc_set_default_name): new function - (krb5_cc_default_name): use krb5_cc_set_default_name - - * lib/krb5/krb5.h (krb5_context_data): add default_cc_name - -2003-02-25 Love Hörnquist Åstrand - - * appl/kf/kf.1: s/securly/securely/ from NetBSD - -2003-02-18 Love Hörnquist Åstrand - - * kdc/connect.c: s/intialize/initialize, from - - -2003-02-17 Love Hörnquist Åstrand - - * configure.in: add AM_MAINTAINER_MODE - -2003-02-16 Love Hörnquist Åstrand - - * **/*.[0-9]: add copyright/licenses on all manpages - -2003-14-16 Jacques Vidrine - - * lib/krb5/get_in_tkt.c (init_as_req): Send only a single - PA-ENC-TIMESTAMP in the AS-REQ, using the first encryption - type specified by the KDC. - -2003-02-15 Love Hörnquist Åstrand - - * fix-export: some autoconf put their version number in - autom4te.cache, so remove autom4te*.cache - - * fix-export: make sure $1 is a directory - -2003-02-04 Love Hörnquist Åstrand - - * kpasswd/kpasswdd.8: spelling, from jmc - - * kdc/kdc.8: spelling, from jmc - -2003-01-31 Love Hörnquist Åstrand - - * kdc/hpropd.8: s/databases/a database/ s/Not/not/ - - * kdc/hprop.8: add missing . - -2003-01-30 Love Hörnquist Åstrand - - * lib/krb5/krb5.conf.5: documentation for of boolean, etypes, - address, write out encryption type in sentences, s/Host/host - -2003-01-26 Love Hörnquist Åstrand - - * lib/asn1/check-gen.c: add checks for Authenticator too - -2003-01-25 Love Hörnquist Åstrand - - * doc/setup.texi: in the hprop example, use hprop and the first - component, not host - - * lib/krb5/get_addrs.c (find_all_addresses): address-less - point-to-point might not have an address, just ignore - those. Reported by Harald Barth. - -2003-01-23 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.c (check_section): when key isn't - found, don't print out all known keys - - * lib/krb5/verify_krb5_conf.c (syslogvals): mark up where severity - and facility start resp - (check_log): find_value() returns -1 when key isn't found - - * lib/krb5/crypto.c (_krb5_aes_cts_encrypt): make key argument a - 'const void *' to avoid AES_KEY being exposed in krb5-private.h - - * lib/krb5/krb5.conf.5: add [kdc]use_2b - - * kdc/524.c (encode_524_response): its 2b not b2 - - * doc/misc.texi: quote @ where missing - - * lib/asn1/Makefile.am: add check-gen - - * lib/asn1/check-gen.c: add Principal check - - * lib/asn1/check-common.h: move generic asn1/der functions from - check-der.c to here - - * lib/asn1/check-common.c: move generic asn1/der functions from - check-der.c to here - - * lib/asn1/check-der.c: move out the generic asn1/der functions to - a common file - -2003-01-22 Love Hörnquist Åstrand - - * doc/misc.texi: more text about afs, how to get get your KeyFile, - and how to start use 2b tokens - - * lib/krb5/krb5.conf.5: spelling, from Jason McIntyre - - -2003-01-21 Jacques Vidrine - - * kuser/kuser_locl.h: include crypto-headers.h for - des_read_pw_string prototype - -2003-01-16 Love Hörnquist Åstrand - - * admin/ktutil.8: document -v, --verbose - - * admin/get.c (kt_get): make getarg usage consistent with other - other parts of ktutil - - * admin/copy.c (kt_copy): remove adding verbose_flag to args - struct, since it will overrun the args array (from Sumit Bose) - -2003-01-15 Love Hörnquist Åstrand - - * lib/krb5/krb5.conf.5: write more about [realms] REALM = { kdc = - ... } - - * lib/krb5/aes-test.c: test vectors in aes-draft - - * lib/krb5/Makefile.am: add aes-test.c - - * lib/krb5/crypto.c: Add support for AES - (draft-raeburn-krb-rijndael-krb-02), not enabled by default. - (HMAC_SHA1_DES3_checksum): rename to SP_HMAC_SHA1_checksum and modify - to support checksumtype that are have a shorter wireformat then - their output block size. - - * lib/krb5/crypto.c (struct encryption_type): split the blocksize - into blocksize and padsize, padsize is the minimum padding - size. they are the same for now - (enctype_*): add padsize - (encrypt_internal): use padsize - (encrypt_internal_derived): use padsize - (wrapped_length): use padsize - (wrapped_length_dervied): use padsize - - * lib/krb5/crypto.c: add extra `opaque' argument to string_to_key - function for each enctype in preparation enctypes that uses - `Encryption and Checksum Specifications for Kerberos 5' draft - - * lib/asn1/k5.asn1: add checksum and enctype for AES from - draft-raeburn-krb-rijndael-krb-02.txt - - * lib/krb5/krb5.h (krb5_keytype): add KEYTYPE_AES128, - KEYTYPE_AES256 - -2003-01-14 Love Hörnquist Åstrand - - * lib/hdb/common.c (_hdb_fetch): handle error code from - hdb_value2entry - - * kdc/Makefile.am: always include kerberos4.c and 524.c in - kdc_SOURCES to support 524 - - * kdc/524.c: always compile in support for 524 - - * kdc/kdc_locl.h: move out krb/524 protos from under #ifdef KRB4 - - * kdc/config.c: always compile in support for 524 - - * kdc/connect.c: always compile in support for 524 - - * kdc/kerberos4.c: export encode_v4_ticket() and get_des_key() - even when we build without kerberos 4, 524 needs them - - * lib/krb5/convert_creds.c, lib/krb5/krb5-v4compat.h: Split out - Kerberos 4 help functions/structures so other parts of the source - tree can use it (like the KDC) - diff --git a/kerberosV/src/ChangeLog.2004 b/kerberosV/src/ChangeLog.2004 deleted file mode 100644 index 47cd799e97f..00000000000 --- a/kerberosV/src/ChangeLog.2004 +++ /dev/null @@ -1,1485 +0,0 @@ -2004-12-30 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am (CHECK_SYMBOLS): add heim_ and pkcs7_ for - now (used in pkinit) - -2004-12-29 Love Hörnquist Åstrand - - * lib/hdb/Makefile.am: add CHECK_SYMBOLS - - * lib/hdb/keys.c: make all_etypes static - - * lib/krb5/Makefile.am: add CHECK_SYMBOLS, approve of: -com_err - -version krb5_ _krb5_ __heimdal krb524_ krb4_fkt_ops - - * kdc/kerberos5.c: use private version of principalname - - * kdc/kerberos4.c: use private version of principalname - - * kdc/hpropd.c: use private version of principalname - - * kdc/524.c: use private version of principalname - - * lib/krb5/rd_req.c: use private version of principalname - - * lib/krb5/rd_cred.c: use private version of principalname - - * lib/krb5/init_creds_pw.c: use private version of principalname - - * lib/krb5/get_in_tkt.c: use private version of principalname - - * lib/krb5/asn1_glue.c: make principalname functions private - - * lib/krb5/krb5.h: add key usage for server referrals - -2004-12-29 Love Hörnquist Åstrand - - * lib/krb5/principal.c: make default_v4_name_convert static - - * lib/krb5/crypto.c: make lots of crypto related variables static - - * lib/krb5/acache.c: make default_acc_name static - -2004-12-28 Love Hörnquist Åstrand - - * doc/setup.texi: add some text about samba, use example.com - - * lib/hdb/hdb-ldap.c: Add account expiration for samba from James - F. Hranicky . - Add LDAP_addmod_integer and use it. - -2004-12-27 Love Hörnquist Åstrand - - * doc/{Makefile.am,setup.texi,win2k.texi}: spelling and text - fixes, from Dave Love - -2004-12-18 Love Hörnquist Åstrand - - * lib/krb5/heim_threads.h: NetBSD 2.99.11 (any maybe 2.1) just - needs pthread.h, threadlib is dead - -2004-12-17 Love Hörnquist Åstrand - - * kdc/config.c (configure): check for deprecated - enforce-transited-policy is set and fail if it is - - * lib/asn1/asn1_print.c: don't print garabage for octet strings - -2004-12-13 Love Hörnquist Åstrand - - * kdc/main.c (main): catch sigpipe, we don't bother select()ing - for errors - - * kdc/connect.c (handle_http_tcp): handle error from write(2) - - * doc/setup.texi: clarify credentials refreshing stuff - - * doc/setup.texi: add new node: Providing Kerberos credentials to - servers and programs - - * doc/whatis.texi: fix spurious cross-reference makeinfo warning - - * lib/hdb/hdb-ldap.c (pos): uppercase in character - -2004-12-12 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c (LDAP__bytes2hex,LDAP__hex2bytes): encode - nibbels in the other order - - * lib/hdb/hdb-ldap.c: s/objectclass/objectClass/ check if - attribute exists before we try to delete it LDAP__bytes2hex - encodes in strange byte order, is this really right ? - -2004-12-11 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c (LDAP_firstkey): When iterating over all - entries, search for samba accounts too, From: "James F. Hranicky" - - - * lib/hdb/hdb-ldap.c (krb5kdcentry_attrs): ask for attribute uid - too - - * lib/hdb/hdb-ldap.c (LDAP_message2entry): if the entry is missing - both krb5PrincipalName and uid, it must be broken, ignore it and - return it doesn't exists. - -2004-12-10 Love Hörnquist Åstrand - - * kdc/hpropd.8: spelling, from OpenBSD - - * kdc/kdc.8: use keeps for options, From OpenBSD k - -2004-12-09 Love Hörnquist Åstrand - - * doc/setup.texi: document --random-key and the need to do backup - of the master key - - * kdc/kstash.8: add --random-key - - * kdc/kstash.c: add --random-key - -2004-12-08 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.8: spelling, from openbsd - - * lib/krb5/krb5_init_context.3: spelling, from openbsd - - * lib/krb5/krb5.conf.5: spelling, from openbsd - - * kuser/kdestroy.1: use keeps around options, spelling, from - openbsd - - * kpasswd/kpasswdd.8: use ., use keeps around options, from OpenBSD - - * kdc/hpropd.8: use keeps around options, from OpenBSD - - * kdc/hprop.8: use keeps around options, from OpenBSD - -2004-11-30 Love Hörnquist Åstrand - - * lib/krb5/context.c (krb5_free_context): clear error string - before destroying mutex - (krb5_init_context): don't call krb5_free_context before there is a - mutex initialized - -2004-11-18 Love Hörnquist Åstrand - - * kuser/kinit.c (get_new_tickets): only complain about ticket - renewable lifetime when the user asked for a specific renewable - lifetime - -2004-11-15 Love Hörnquist Åstrand - - * kdc/kerberos5.c (find_keys): log what principal is missing - enctypes - -2004-11-13 Love Hörnquist Åstrand - - * lib/krb5/get_in_tkt.c (krb5_get_in_cred): clear pointer after - freeing data - - * lib/krb5/init_creds_pw.c (change_password): handle old_options - being NULL From Guenther Deschner on samba-technical. - -2004-11-12 Love Hörnquist Åstrand - - * lib/krb5/krb5_get_init_creds.3: add more text describing the - krb5_get_init_creds functions - -2004-11-11 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c: make krb5_get_init_creds_keytab work - again - -2004-11-10 Love Hörnquist Åstrand - - * lib/hdb/hdb.asn1: use constrained integers - -2004-11-09 Love Hörnquist Åstrand - - * lib/krb5/krb5_get_init_creds.3: add description for opt_init, - opt_alloc, opt_free - - * lib/krb5/pkinit.c: unexport krb5_get_init_creds_opt_free_pkinit - - * lib/krb5/init_creds.c: unexport - krb5_get_init_creds_opt_free_pkinit - - * lib/krb5/init_creds_pw.c: fold init_init_creds_ctx into - get_init_creds_common - - * lib/krb5/init_creds.c (_krb5_get_init_creds_opt_copy): if the in - options NULL, just make a clean copy - -2004-11-01 Love Hörnquist Åstrand - - * lib/krb5/sendauth.c (krb5_rd_rep): free ap_rep message earlier - so we don't leak it on error - -2004-10-31 Love Hörnquist Åstrand - - * lib/krb5/krb5.conf.5: unbreak 2b entry - - * lib/krb5/acache.c (make_cred_from_ccred): the address isn't a - sockaddr but rather a kerberos address, deal with that. Based on - bug report from Jakob Schlyter . - -2004-10-30 Love Hörnquist Åstrand - - * kdc/connect.c: Make sure argument passed to ctype isn't signed - char - -2004-10-14 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: match new error names - - * lib/krb5/krb5_err.et: make error messages sane again - -2004-10-13 Love Hörnquist Åstrand - - * lib/krb5/keytab.c: use KRB5_KT_BADNAME - - * lib/krb5/krb5_err.et: sync with mit krb5_err.et (require major - version bump) add KRB5_DELTAT_BADFORMAT - - * lib/krb5/krb5.conf.5: time defaults to "s" - - * lib/krb5/time.c (krb5_string_to_deltat): default to "s" again, - MIT's behavior was actually that it failed to parse the number - (and thus used the default). Even better, ticket_lifetime (that - was a consumer supposed a of the interface) was documented but - never implemented, when it was implemented, people configuraiton - files started to fail. Also, use KRB5_DELTAT_BADFORMAT as a - failure code. - - * lib/asn1/k5.asn1: sync enctypes with pkinit branch - - * lib/asn1/parse.y (readd) support negative numbers - - * lib/asn1/lex.l: support hex numbers - -2004-10-12 Love Hörnquist Åstrand - - * kdc/pkinit.c: use ETYPE_DES3_CBC_NONE_CMS - - * lib/krb5/crypto.c: add enctype_des3_cbc_none_cms add cms padding - for rc2 don't to padding for blocksize 1 - - * lib/hdb/{keys.c,Makefile.am},lib/kadm5/{keys,set_keys}.c: - Move keyset parsing and password based keyset generation into hdb. - Requested by Andrew Bartlett for hdb-ldb - backend. - -2004-10-07 Love Hörnquist Åstrand - - * kuser/kinit.c: adapt to new signature of - krb5_get_init_creds_opt_set_pkinit - - * lib/krb5/pkinit.c: free openssl engine deal with - RecipientIdentifier -> CMSIdentifier and heim_any -> name change - improve error messages - - * kdc/pkinit.c: free openssl engine deal with RecipientIdentifier - -> CMSIdentifier and heim_any -> name change - -2004-10-04 Johan Danielsson - - * kuser/klist.c: use rtbl_set_separator - -2004-10-03 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: filter out dup openssl engine keys, parse - user options first - - * lib/krb5/pkinit.c: stop using AlgorithmIdentifierNonOpt, add - openssl engine support for private key - - * lib/krb5/crypto.c: support padding as its done in CMS - - * kdc/pkinit.c: improve error logging - - * kdc/pkinit.c: stop using AlgorithmIdentifierNonOpt - -2004-09-30 Love Hörnquist Åstrand - - * lib/krb5/krb5.conf.5: assume minutes for time - - * lib/krb5/config_file.c (krb5_config_vget_time_default): use - krb5_string_to_deltat - - * lib/krb5/appdefault.c (krb5_appdefault_time): use - krb5_string_to_deltat - - * lib/krb5/time.c (krb5_string_to_deltat): set default unit to - minute for compatibility with MIT Kerberos. - - -2004-09-28 Love Hörnquist Åstrand - - * lib/krb5/get_cred.c (get_cred_kdc_usage): retry using "large - message safe" transport if we get back - KRB5KRB_ERR_RESPONSE_TOO_BIG error. Idea from Guenther Deschner - - -2004-09-23 Johan Danielsson - - * admin/list.c: use rtbl - - * admin/ktutil-commands.in: slc source file - - * lib/krb5/constants.c: check - /Library/Preferences/edu.mit.Kerberos on OSX - -2004-09-21 Johan Danielsson - - * lib/krb5/time.c (krb5_format_time): check return value from - localtime and strftime - -2004-09-14 Johan Danielsson - - * kuser/kinit.c: make sure we don't always get renewable creds - -2004-09-11 Love Hörnquist Åstrand - - * lib/krb5/acache.c: use krb5_ccapi.h - - * lib/krb5/krb5_ccapi.h: break out krb5 api definitions to - separate (not installed) file - - * lib/krb5/Makefile.am: add AM_CPPFLAGS to libkrb5_la_CPPFLAGS - since AM_CPPFLAGS overridden by target specific _CPPFLAGS - -2004-09-08 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: make variable shorter, make error messages - from pkinit, make freeing easier - -2004-09-06 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: link libkrb5 with LIB_dlopen - - * lib/krb5/crypto.c (seed_something): avoid poking at memory that - is uninitialized, make valgrind unhappy. Pointd out by - abartlet@samba.org. While where, plug the fd leak. - -2004-09-05 Love Hörnquist Åstrand - - * lib/asn1/der_get.c (decode_*): name all tag-length variables the - same - (decode_enumerated): check that the tag-length is not longer the length - - * lib/asn1/der_get.c (decode_boolean): fail if length of tag is - larger then len - -2004-08-31 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c (krb5_get_init_creds): kdc_reply can be - set in case of failure too, free unconditionally on exit to avoid - memory leak - -2004-08-23 Love Hörnquist Åstrand - - * lib/krb5/get_cred.c (set_auth_data): set pointer to NULL after - free - -2004-08-20 Love Hörnquist Åstrand - - * lib/krb5/context.c (krb5_get_err_text): if neither of com_right - nor strerror finds the error-code, return Unknown error. - -2004-08-19 Johan Danielsson - - * lib/krb5/krb5_kuserok.3: update to reality - - * lib/krb5/kuserok.c: if a .k5login file exist, don't give - implicit rights to anyone; also check owner/mode of .k5login - -2004-08-15 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: man_MANS = krb5_getportbyname.3 - - * lib/krb5/krb5_getportbyname.3: manpage for krb5_getportbyname - - * lib/krb5/krb5.3: add krb5_getportbyname - - * lib/krb5/krb5.3: krb5_free_salt and krb5_enctype_valid - - * lib/krb5/krb5_encrypt.3: document krb5_enctype_valid - -2004-08-13 Love Hörnquist Åstrand - - * kdc/kerberos5.c (get_pa_etype_info{,2}): check for dup enctypes - from the client and filter them out. - - * lib/krb5/krb5_string_to_key.3: document krb5_free_salt - -2004-08-12 Love Hörnquist Åstrand - - * lib/krb5/krb5_ticket.3: data needs to be freed when using - krb5_ticket_get_authorization_data_type - -2004-08-11 Love Hörnquist Åstrand - - * lib/krb5/test_cc.c: test variables in default_cc_name - - * lib/krb5/krb5.conf.5: explain support for varibles in - [libdefaults]default_cc_name - - * lib/krb5/cache.c: drop ${time}, its not very useful - - * lib/krb5/cache.c: Add _krb5_expand_default_cc_name that expand - variables in the default cc name. Supported variables now are: - ${time},${uid} and ${null} - - * lib/krb5/krb5.conf.5: document default_cc_name - - * lib/krb5/cache.c (krb5_cc_set_default_name): - s/libdefault/libdefaults/ - -2004-08-06 Love Hörnquist Åstrand - - * lib/krb5/acache.c: replace magic 3 with ccapi_version_3 - - * lib/krb5/Makefile.am: libkrb5_la_SOURCES += acache.c - - * lib/krb5/krb5.h: add krb5_acc_ops - - * lib/krb5/acache.c: CCAPI v3 implementation, the read only - support was from Magnus Ahltorp and then extended by me to support - all other operations. Tested with MIT kerberos cc cache - implementation on MacOS 10.3.3 - - * lib/krb5/cache.c (krb5_cc_set_default_name): allow setting the - default cc name, this is not very useful for general purpose glue - since its not possible to glue in user information (like uid), but - for CCAPI it works just fine - -2004-08-05 Love Hörnquist Åstrand - - * kuser/kgetcred.1: document --cache/-c - - * kuser/kgetcred.c: allow to specify what credential cache to use - -2004-08-03 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: add krb5_eai_to_heim_errno.3 - - * lib/krb5/krb5_eai_to_heim_errno.3: document - krb5_eai_to_heim_errno, krb5_h_errno_to_heim_errno - - * lib/krb5/krb5.3: add krb5_eai_to_heim_errno, - krb5_h_errno_to_heim_errno - -2004-07-26 Love Hörnquist Åstrand - - * lib/krb5/krb5_expand_hostname.3: krb5_expand_hostname_realms - result should be free with krb5_free_host_realm drop - krb5_get_host_realm text - - * lib/krb5/krb5_set_default_realm.3: krb5_get_host_realm result - should be free with krb5_free_host_realm - - * lib/krb5/krb5_get_in_cred.3: document krb5_free_kdc_rep - - * lib/krb5/krb5_get_init_creds.3: remove dup krb5_get_init_creds - - * lib/krb5/krb5_auth_context.3: sort, add krb5_free_authenticator - - * lib/krb5/Makefile.am: man_MANS += krb5_rd_error - - * lib/krb5/krb5_rd_error.3: krb5_rd_error and friends - - * lib/krb5/krb5_warn.3: clarify on what string - krb5_free_error_string should operate on - - * lib/krb5/krb5_get_credentials.3: add krb5_get_kdc_cred - - * lib/krb5/Makefile.am: krb5_get_credentials, - krb5_get_forwarded_creds and friends - - * lib/krb5/krb5_get_forwarded_creds.3: krb5_get_forwarded_creds - and friends - - * lib/krb5/krb5_get_credentials.3: krb5_get_credentials and - friends - -2004-07-23 Love Hörnquist Åstrand - - * kuser/klist.c (print_cred_verbose): keytypes are no longer, use - enctype - -2004-07-22 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c (LDAP_entry2mods): allow for pre-c99 - compilers, From metze at samba.org - -2004-07-20 Love Hörnquist Åstrand - - * lib/krb5/test_cc.c: more cc tests - - * lib/krb5/krb5_check_transited.3: document krb5_check_transited - -2004-07-19 Love Hörnquist Åstrand - - * kdc/pkinit.c (pk_principal_from_X509): reverse test, makes - principal in cert work From: Mayur Patel - -2004-07-18 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: add krb5_verify_init_creds.3 - - * lib/krb5/krb5_verify_init_creds.3: add krb5_verify_init_creds - -2004-07-15 Love Hörnquist Åstrand - - * lib/krb5/krb5_set_password.3: spelling from wiz@netbsd.org - description for krb5_passwd_result_to_string - -2004-07-14 Love Hörnquist Åstrand - - * lib/krb5/krb5_set_password.3: Remove superfluous comma; grammar - fixes; split sentence in two for better understanding. From - wiz@NetBSD.org. Describe krb5_set_password_using_ccache while here. - - * lib/krb5/krb5_set_password.3: nroff and spelling, from Jonathan - Stone - - * lib/krb5/changepw.c (process_reply): cast ssize_t to long and - print that From NetBSD via Havard Eidnes. - -2004-07-09 Love Hörnquist Åstrand - - * configure.in: fix helpstring for hdb-openldap-module - - * lib/krb5/test_cc.c: don't use krb5_err on error code 0 - -2004-07-08 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c (LDAP_seq): try handling errors better - -2004-07-02 Love Hörnquist Åstrand - - * lib/krb5/get_in_tkt.c (set_ptypes): make ptypes const - -2004-07-01 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c (LDAP__connect): call ldap_initialize with - right argument - -2004-06-27 Johan Danielsson - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): if the - krbtgt is without addresses, default to not sending our own - addrport - - * lib/asn1/lex.l: add support for /* */ and partial line -- - comments - - * kuser/Makefile.am: don't install copy_cred_cache manpage - -2004-06-24 Johan Danielsson - - * lib/krb5/init_creds.c (_krb5_get_init_creds_opt_copy): if - copying a static opt, make sure to allocate the "private" field - -2004-06-24 Love - - * kdc/config.c: add enable_pkinit_princ_in_cert - - * kdc/kdc_locl.h: enable_pkinit_princ_in_cert - - * kdc/pkinit.c: Check certificate for Kerberos Principal in - OtherName of subjectAltName Based on patch from Mayur Patel - - -2004-06-21 Love Hörnquist Åstrand - - * lib/krb5/get_cred.c (init_tgs_req): if subkey not avaible, use - session key for authorization-data - -2004-06-15 Love Hörnquist Åstrand - - * kdc/connect.c (handle_tcp): note who is what that closed the - connection on us - -2004-06-09 Love Hörnquist Åstrand - - * admin/get.c (kt_get): catch errors from krb5_parse_name - -2004-06-05 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: if its the entry just contains the - structural object (no samba nor heimdal object), add an aux - heimdal object on to it. - -2004-06-02 Love Hörnquist Åstrand - - * kpasswd/kpasswd.c: use krb5_set_password_using_ccache - - * lib/krb5/krb5_set_password.3: add krb5_set_password_using_ccache - - * lib/krb5/changepw.c: implement krb5_set_password_using_ccache - - * lib/hdb/hdb-ldap.c: Allow the objectClass to be - "sambaSamAccount" or structural_object when searching for uid - entries. - - * lib/krb5/krb5.conf.5: document [kdc]hdb-ldap-create-base - - * lib/hdb/hdb-ldap.c: add creation base that defaults to the - search base - - * lib/hdb/hdb-ldap.c: indent like the rest of the code - -2004-06-01 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: check return values from ldap operations and - close it we get back LDAP_SERVER_DOWN. stupid ldap client lib, you - should retry by yourself. - - * lib/hdb/hdb-ldap.c: require search base to be configured, create - local context structure - -2004-05-31 Love Hörnquist Åstrand - - * doc/setup.texi: more ldap text, partly from Tarjei Huse - - -2004-05-28 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: clean, indent - - * lib/hdb/hdb-ldap.c (LDAP_entry2mods): make sure - krb5KeyVersionNumber is added on new entires - -2004-05-27 Love Hörnquist Åstrand - - * doc/setup.texi: minor fixes, partly from Tarjei Huse - - - * lib/krb5/krb5.conf.5: some text about dbname and realm - - * lib/krb5/krb5.conf.5: default value for - hdb-ldap-structural-object is account - -2004-05-26 Love Hörnquist Åstrand - - * tools/Makefile.am: use ! instead of , as sed delimiter - -2004-05-25 Love Hörnquist Åstrand - - * lib/krb5/*.c: add KRB5_LIB_FUNCTION to all exported functions - -2004-05-23 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: make samba_forwardable a krb5_boolean - - * lib/hdb/hdb-ldap.c: make samba forwarding a runtime configure - option - - * lib/hdb/hdb-ldap.c (LDAP_message2entry): fix [] test From: - Andrew Bartlett - - * lib/hdb/hdb-ldap.c (LDAP_message2entry): remove bogus length - check From: Andrew Bartlett - - * lib/hdb/hdb-ldap.c (LDAP_message2entry): in the sambaNTPassword - case, make sure ent->etypes are allocated, From: Andrew Bartlett - - -2004-05-14 Love Hörnquist Åstrand - - * kuser/kinit.c: move "setpag if (argc < 1)" to common path - -2004-05-12 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.c: pacify pre c99 compilers - - * fix-export: use right argument for -E - -2004-05-06 Johan Danielsson - - * kuser/kinit.c: print some diagnostics if the exec fails - -2004-04-29 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (pk_rd_pa_reply_dh): use krb5_random_to_key - From: Luke Howard - - * lib/krb5/rd_req.c (krb5_verify_ap_req2): clear the whole ticket, - not just a pointer size of it From: Luke Howard - -2004-04-28 Love Hörnquist Åstrand - - * fix-export: add -E flag where needed to make-proto - -2004-04-26 Love Hörnquist Åstrand - - * lib/krb5/crypto.c: add set_param for RC2 - - * lib/krb5/pkinit.c: use krb5_oid_to_enctype and remove all oids - that are no longer needed - - * kdc/pkinit.c: use krb5_enctype_to_oid - - * lib/krb5/crypto.c (krb5_oid_to_enctype): make sure oid exists - before we compare with it - - * lib/krb5/crypto.c (krb5_crypto_get_params): check ivec length - before returning it add aes-oids - - * lib/krb5/crypto.c: add krb5_enctype_to_oid and - krb5_oid_to_enctype - - * kdc/pkinit.c: use krb5_crypto_set_params - - * lib/krb5/crypto.c: add krb5_crypto_set_params, add aes-NNN-cbc-none - - * lib/krb5/krb5.h: add KEYTYPE_AES192 - - * lib/krb5/pkinit.c: use krb5_crypto_get_params to implement - kcrypto RC2 support - - * lib/asn1/k5.asn1: add CMS symmetrical parameters here, enctype - rc2-cbc XXX RC2CBCParameter is wrong because the compiler is - broken - - * lib/krb5/krb5.h: add KEYTYPE_RC2 - - * lib/krb5/crypto.c: add partial CMS parameter handling, this is - needed for RC2 - - * lib/asn1/der_cmp.c: add heim_oid_cmp and heim_octet_string_cmp - - * lib/asn1/Makefile.am (libasn1_la_SOURCES) += der_cmp.c - - * lib/asn1/der.h: add heim_oid_cmp and heim_octet_string_cmp - - * lib/asn1/k5.asn1: add ETYPE_AESNNN_CBC_NONE - - * lib/asn1/k5.asn1: add CMS symmetrical parameters here, enctype - rc2-cbc, XXX RC2CBCParameter is wrong because the compiler is broken - -2004-04-26 Johan Danielsson - - * lib/krb5/config_file.c: allow parsing directly from strings with - krb5_config_parse_string_multi - - * lib/krb5/verify_krb5_conf.c: try to resolve hostnames - -2004-04-25 Johan Danielsson - - * lib/krb5/store_fd.c (krb5_storage_from_fd): dup the file - descriptor so we don't have to keep track of it in two places - - * kuser/copy_cred_cache.c: krb5_cc_copy_cache_match now lives in - libkrb5 - - * lib/krb5/krb5_{,compare_}creds.3: move krb5_compare_creds to its - own manpage - - * replace krb5_free_creds_contents by krb5_free_cred_contents - - * lib/krb5/cache.c: add krb5_cc_next_cred_match() and - krb5_cc_copy_cred_match() - - * lib/krb5/creds.c (krb5_compare_creds): add more matching options - - * lib/krb5/krb5.h: add more creds match flags - - * kuser/copy_cred_cache: add --valid-for option - - * lib/krb5/store.c (krb5_store_creds): set is_skey flag if length - of second ticket is > 0 - -2004-04-25 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: use the right oid for pkauthdata - - * lib/krb5/pkinit.c: always send both win2k compat version and the - ietf draft one, this is possible since microsoft use - wrong/diffrent PA number. Make the configuration flag boolean - configuring if NOT to send the win2k compat glue. - - * lib/krb5/krb5_encrypt.3: document krb5_{de,en}crypt_ivec - - * kuser/copy_cred_cache.1: pacify mdoclint - - * kdc/pkinit.c: use IV for envelopeddata encryption, patch - originally from Luke Howard , tweeked by me. - - * lib/krb5/krb5_storage.3: document - KRB5_STORAGE_CREDS_FLAGS_WRONG_BITORDER - - * lib/krb5/krb5_data.3: document that krb5_data_free cleans the - structure too - - * lib/krb5/pkinit.c: use IV for envelopeddata encryption, patch - originally from Luke Howard , tweeked by me. - -2004-04-24 Johan Danielsson - - * kuser/copy_cred_cache.{c,1}: add cred cache copy tool - - * configure.in: use rk_SYS_LARGEFILE - - * lib/krb5/{krb5.h,store.c,fcache.c}: Fix the cache flags bitorder - issue with a storage flag instead of a separate function. - -2004-04-24 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: move out the oid check from get_reply_key - - * lib/krb5/pkinit.c: uniquify error messages - - * lib/krb5/init_creds_pw.c: make the pkinit nonce same os the - plain nonce for now - - * lib/krb5/pkinit.c: more w2k compat from Luke Howard - add RC2 support, clean up error messages - - * lib/krb5/pkinit.c: remove more dependency on - krb5_config->pkinit_flags - - * lib/krb5/pkinit.c (_krb5_pk_convert_rep): convert microsoft - style answer to IETF, From Luke Howard - (_krb5_pk_create_sign): ms handles NULL in param, so always send it - (_krb5_pk_mk_padata): look for [realms]REALM = { win2k_pkinit = bool } - - * lib/krb5/pkinit.c (_krb5_pk_create_sign): always set the - digestAlgorithm to sha1 (both for SignerInfo and SignedData, add - new function _set_digest_alg to set it - -2004-04-23 Love Hörnquist Åstrand - - * include/make_crypto.c: include rc2.h, and when I'm here, make - aes mandatory - - * lib/krb5/krb5.h: add ENCTYPE_ARCFOUR_HMAC as compat glue for MIT - kerberos - - * lib/krb5/crypto.c (krb5_crypto_init): clear return pointer on - failure - - * lib/krb5/crypto.c (DES3_random_to_key): make it produce the - right result - (DES3_postproc): use DES3_random_to_key - (krb5_random_to_key): check the required number of bits (not the size - of the key) - - * lib/krb5/aes-test.c: test random to key function - - * lib/krb5/string-to-key-test.c: comment out the "@"/"" test for - now - -2004-04-22 Love Hörnquist Åstrand - - * lib/krb5/krb5_string_to_key.3: document that - krb5_string_to_key_derived is broken for non 3des enctypes and - thus deprecated - - * kdc/pkinit.c (generate_dh_keyblock): use the new function - krb5_random_to_key - - * lib/krb5/crypto.c: add des and DES3 random_to_key hooks, they - need special processing - - * lib/krb5/crypto.c (krb5_random_to_key): new function - - * lib/krb5/krb5_keyblock.3: document krb5_random_to_key - -2004-04-21 Love Hörnquist Åstrand - - * kdc/pkinit.c: use the first proposed enable enctype - - * lib/krb5/context.c (krb5_set_default_in_tkt_etypes): use the - return from krb5_enctype_valid - - * kdc/pkinit.c: at least try to handle diffrent enveloped enctypes - -2004-04-21 Love Hörnquist Åstrand - - * lib/asn1/der_get.c: 1.28.2.16: (der_get_oid): handle all oid - components being smaller then 127 and allocate one extra element - since first byte is split to to elements. - -2004-04-20 Love Hörnquist Åstrand - - * lib/asn1/k5.asn1: ETYPE_DIGEST_MD5_NONE, ETYPE_CRAM_MD5_NONE: - private use, lukeh@padl.com - -2004-04-19 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (build_auth_pack): use heim_integer to encode - DH public key - -2004-04-18 Love Hörnquist Åstrand - - * lib/krb5/krb5_init_context.3: add krb5_context to so its added - as manpage-link too - -2004-04-17 Love Hörnquist Åstrand - - * lib/krb5/fcache.c (fcc_remove_cred): simplistic implementation, - XXX add locking - - * kuser/kdestroy.c: add --credential argument that just remove one - credential entry out of the cache specified - - * kdc/pkinit.c: replace the krb5.conf configuration option that - describes the mapping between principals and subject names with a - file, default /var/heimdal/pki-mapping. XXX this should be pushed - into HDB. XXX should add issuer too - - * kdc/config.c: merge certificate/private_key to a user_id - -2004-04-16 Love Hörnquist Åstrand - - * kdc/kdc_locl.h: update prototype for pk_initialize - - * kuser/kinit.c: merge certificate/private_key to a user_id - - * kdc/pkinit.c: adapt to heim_integer changes - - * lib/krb5/pkinit.c: merge certificate/private_key to a user_id - - * kdc/pkinit.c: adapt to heim_integer changes, - merge certificate/private_key to a user_id - -2004-04-15 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: use KRB5_PADATA_PK_AS_REQ_WIN free X509_STORE - -2004-04-13 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: define BUILD_KRB5_LIB when building - libkrb5.la, add KRB5_LIB_FUNCTION proto - - * lib/krb5/add_et_list.c: add KRB5_LIB_FUNCTION - - * configure.in: export KRB5_LIB_FUNCTION when building with - BUILD_KRB5_LIB - - * lib/krb5/ticket.c (krb5_ticket_get_authorization_data_type): add - error strings - - * lib/krb5/prompter_posix.c (krb5_prompter_posix): if some thing - is printed on stderr, fflush it - - * lib/krb5/krb5_keyblock.3: free functions also zeros out the key - - * lib/krb5/krb5_get_init_creds.3: some text about - krb5_prompter_posix - - * lib/krb5/krb5.conf.5: document hdb-ldap-structural-object - - * lib/krb5/cache.c: add krb5_cc_get_prefix_ops - - * lib/krb5/krb5_ccache.3: add krb5_cc_get_prefix_ops - -2004-04-05 Love Hörnquist Åstrand - - * appl/test/http_client.c: support GSS_C_DELEG_FLAG and - GSS_C_MUTUAL_FLAG - - * appl/test/http_client.c: verbose logging - -2004-04-02 Love Hörnquist Åstrand - - * kdc/connect.c: case size_t to unsigned long for LP64 platforms - -2004-04-01 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c (hdb_ldap_create): allow configuration of - default structural object - - * tools/Makefile.am: handle sed expression breaking - -2004-03-31 Love Hörnquist Åstrand - - * lib/krb5/krbhst.c: also lookup _kpasswd._tcp SRV-rr - - * lib/krb5/changepw.c: add tcp support to the set protocol, should - be cleaned up to enable sharing code with krb5_sendto - - * kpasswd/kpasswd.c (change_password): remove extra free - - * lib/krb5/krb5_acl_match_file.3: try to pacify mdoc macros on - osf/1 - -2004-03-30 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c (pa_data_add_pac_request): don't - increase md->len, krb5_padata_add already does that - - * lib/krb5/init_creds.c: its PAC not PAQ - - * kuser/kinit.c: its PAC not PAQ - - * kdc/kerberos4.c: stop the client from renewing tickets into the - future From: Jeffrey Hutzelman - -2004-03-29 Love Hörnquist Åstrand - - * configure.in: try to handle sys/strtty.h needing sys/stream.h - -2004-03-23 Love Hörnquist Åstrand - - * lib/krb5/send_to_kdc.c: remove function krb5_sendto_kdc2, its no - longer used - - * kdc/kerberos5.c: s/krb5_get_host_realm_int/_&/ - - * lib/krb5/get_host_realm.c: unexport krb5_get_host_realm_int to - external users by prefixing it with _ - - * lib/krb5/get_cred.c: s/krb5_mk_req_internal/_&/ - - * lib/krb5/mk_req_ext.c: unexport krb5_mk_req_internal to external - users by prefixing it with _ - -2004-03-22 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: add missing } - -2004-03-21 Love Hörnquist Åstrand - - * kdc/pkinit.c: adapt to change of signature of - _krb5_pk_load_openssl_id - - * lib/krb5/pkinit.c: (krb5_get_init_creds_opt_set_pkinit): add - prompter argument and use it - - * kuser/kinit.c: adapt to signature change of - krb5_get_init_creds_opt_set_pkinit - - * lib/krb5/krb5.3: add more stuff, 105 functions to go - - * lib/krb5/krb5_rcache.3: add krb5_get_server_rcache - - * lib/krb5/krb5_rcache.3: framework for replay cache manpage - - * lib/krb5/krb5_string_to_key.3: document string to key functions - - * lib/krb5/Makefile.am: man_MANS += krb5_expand_hostname.3 - krb5_find_padata.3 krb5_generate_random_block.3 - - * lib/krb5/krb5_encrypt.3: document krb5_get_wrapped_length - - * lib/krb5/krb5.3: add some more, 137 to go - - * lib/krb5/krb5_principal.3: document krb5_get_default_principal - - * lib/krb5/krb5_keyblock.3: document krb5_generate_subkey - - * lib/krb5/krb5_generate_random_block.3: document - krb5_generate_random_block - - * lib/krb5/krb5_find_padata.3: document padata functions - - * lib/krb5/krb5.3: add some more, 142 to go - - * lib/krb5/krb5_creds.3: drop .Pp before .Sh - - * lib/krb5/krb5_set_default_realm.3: document krb5_copy_host_realm - - * lib/krb5/krb5_expand_hostname.3: document krb5_expand_hostname - and krb5_expand_hostname_realms - - * lib/krb5/krb5.3: add more functions, 147 to go - - * lib/krb5/krb5_creds.3: document krb5_creds - - * lib/krb5/krb5_get_init_creds.3: add more functions, some more - text - - * lib/krb5/krb5_ticket.3: document - krb5_ticket_get_authorization_data_type - -2004-03-20 Love Hörnquist Åstrand - - * lib/krb5/aes-test.c: remove #if 0'ed code - - * lib/krb5/krb5.3: add keyblock functions, 177 functions to go - - * lib/krb5/krb5_verify_user.3: add krb5_verify_opt_set_ccache - - * lib/krb5/krb5_encrypt.3: document krb5_decrypt_ticket - - * lib/krb5/krb5_config.3: document krb5_config_free_strings and - krb5_config_file_free - - * lib/krb5/krb5_create_checksum.3: add krb5_hmac - - * lib/krb5/krb5.3: add keyblock functions, 190 functions to go - - * lib/krb5/krb5_keyblock.3: update .Dd - - * lib/krb5/krb5_keyblock.3: document krb5_copy_keyblock and - krb5_generate_random_keyblock - - * lib/krb5/krb5_init_context.3: add krb5_init_ets - - * lib/krb5/krb5_config.3: add more krb5_config_ functions and - prototypes - - * lib/krb5/krb5_init_context.3: document context modifcation - functions: address list, config file, use admin kdc, fcc version - - * lib/krb5/krb5_storage.3: document krb5_storage and related - functions - - * lib/krb5/Makefile.am: add acl and krb524_convert_creds_kdc - manpages and test_acl test program - - * lib/krb5/krb5.3: add error string functions and sort - - * lib/krb5/krb5_warn.3: document krb5_abort and error string - functions - - * lib/krb5/krb5.3: add missing functions, only 285 left to - document - - * lib/krb5/krb5_crypto_init.3: remove various enctype related - function - - * lib/krb5/krb5_encrypt.3: add various enctype related function - here - - * lib/krb5/krb5_create_checksum.3: add krb5_cksumtype_valid - krb5_cksumtype_valid - - * lib/krb5/crypto.c: real return values for - krb5_{enctype,cksumtype}_valid - - * lib/krb5/krb5_create_checksum.3: add some functions and - descriptions - - * lib/krb5/krb5_c_make_checksum.3: move out non krb5_c functions - - * lib/krb5/krb5_auth_context.3: document - krb5_auth_con_generatelocalsubkey - - * lib/krb5/krb5_krbhst_init.3: document krb5_krbhst_init_flags - - * lib/krb5/krb5_keytab.3: document krb5_kt_default_modify_name - - * lib/krb5/krb5_init_context.3: document krb5_add_et_list - - * lib/krb5/krb524_convert_creds_kdc.3: document - krb524_convert_creds_kdc, krb524_convert_creds_kdc_ccache - - * lib/krb5/krb5_acl_match_file.3: document krb5_acl_match_* - - * lib/krb5/test_acl.c: test for generic acl code - - * lib/krb5/acl.c: plug memory leak on file matching, - make it not fall over when no non matching acl, - make fnmatch matching useful by switching arguments - -2004-03-19 Love Hörnquist Åstrand - - * kdc/config.c: add --builtin-hdb command - - * lib/hdb/hdb.c (hdb_list_builtin): return a list of builtin - backends - - * doc/setup.texi: include Luke Howard of PADL.COM ldap hdb - documentation - - * doc/win2k.texi: fix bugs in examples, add more restrictions, use - example.com as an example. From: Pavel Ferdan - - -2004-03-18 Johan Danielsson - - * lib/krb5/krb5.conf.5: add a bunch of Li and document [kadmin] - password_lifetime; from Henry B. Hotz - -2004-03-14 Love Hörnquist Åstrand - - * lib/krb5/mk_rep.c (krb5_mk_rep): if KRB5_AUTH_CONTEXT_USE_SUBKEY - is set send subkey - (generate if needed) - - * lib/krb5/krb5.h: add KRB5_AUTH_CONTEXT_USE_SUBKEY - -2004-03-14 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: clean up error handling, plug memory leaks, - and free memory in error path, assume realloc(NULL, ...) works, - factor out common code, indent - -2004-03-12 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.c: understand [password_quality] - spelling - - * kuser/kgetcred.1: document --canonicalize - - * kuser/kgetcred.c: add --canonicalize - -2004-03-10 Love Hörnquist Åstrand - - * lib/krb5/fcache.c (fcc_store_cred): NULL terminate - krb5_config_get_bool_default' arglist - -2004-03-09 Love Hörnquist Åstrand - - * kdc/kerberos5.c: add missing req argument to pk_mk_pa_reply - - * kdc/pkinit.c (pk_mk_pa_reply): add hdb_entry - - * kdc/pkinit.c: pass client hdb_entry to pk_check_client - - * kdc/kdc_locl.h: pass client hdb_entry to pk_check_client - - * kuser/kinit.c: rename ca_dir to pkinit/x509_anchors since its - more like that language in RFC3280 - - * lib/krb5/pkinit.c: rename ca_dir to pkinit/x509_anchors since - its more like that language in RFC3280 - - * lib/krb5/krb5.conf.5: document - [libdefaults]fcc-mit-ticketflags=boolean - - * lib/krb5/fcache.c (fcc_store_cred): use - [libdefaults]fcc-mit-ticketflags=boolean to decide what format to - write the fcc in. Default to mit version (aka heimdal 0.7) - - * lib/krb5/store.c: add _krb5_store_creds_heimdal_0_7 and - _krb5_store_creds_heimdal_pre_0_7 that store the creds in just - that format make krb5_store_creds default to mit format - - * lib/krb5/store.c (krb5_ret_creds): Runtime detect the what is - the higher bits of the bitfield - -2004-03-08 Love Hörnquist Åstrand - - * lib/krb5/store.c (krb5_store_creds): add disabled code that - store the ticket flags in reverse order - (bitswap32): new function - - * lib/krb5/store.c (krb5_ret_creds): if the higher ticket flags - are set, its a mit cache, reverse the bits, bug pointed out by - Sergio Gelato - -2004-03-07 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: use macro for HDB * -> LDAP * - - * kuser/kinit.c: when running kinit with a subprocess, fetch new - tickets after half the tickets lifetime - - * lib/hdb/hdb.c: spelling - - * lib/hdb/hdb-ldap.c: Intergrate Heimdal's hdb-ldap and the Samba - password database. From: Andrew Bartlett - - * kdc/config.c: add --disable-DES - - * kdc/kdc.8: document --detach and --disable-DES - - * kdc/kerberos5.c: check if enctype is disabled before using it - - * lib/krb5/crypto.c: add support for disabling checksum/encryption - types - - * tools/kdc-log-analyze.pl: add more cases - - * kdc/connect.c: on strange tcp error; log local port number and - socket type - - * lib/asn1/der.h: fix prototype of encode_utf8string - - * lib/asn1/gen.c: catch CHOICE and generate dummy placeholder - - * lib/asn1/lex.l: added dummy parsing of CHOICE - - * lib/asn1/parse.y: added dummy parsing of CHOICE - - * lib/asn1/k5.asn1: drop SMTP_NAME - -2004-03-06 Love Hörnquist Åstrand - - * lib/hdb/Makefile.am: support building ldap backend as module - sort asn1 hdb files - - * lib/hdb/hdb.c: when building ldap as a shared module, don't - include it in the list - - * configure.in: add --enable-hdb-openldap-module - - * lib/hdb/hdb-ldap.c: make ldap possible to build as a shared - module - - * lib/hdb/mkey.c: add hdb_{,un}seal_key{,_mkey} from Andrew - Bartlett - - * lib/krb5/crypto.c (decrypt_internal_special): do not not modify - the original data test case from Ronnie Sahlberg - - -2004-03-03 Love Hörnquist Åstrand - - * lib/krb5/test_cc.c: more cc tests, mostly related to mcc - behavior - - * lib/krb5/mcache.c (mcc_get_principal): also check for - primary_principal == NULL now that that isn't used as dead flag - - * lib/krb5/mcache.c: don't overload the primary_principal == NULL - as dead since that doesn't always work. Based on patch from - Jeffrey Hutzelman , tweeked by me - -2004-02-22 Love Hörnquist Åstrand - - * kdc/pkinit.c: adapt to rename of oid_cmp to heim_oid_cmp - - * lib/krb5/pkinit.c: adapt to rename of oid_cmp to heim_oid_cmp - - * lib/hdb/db3.c: fix all db >= 4.1 cases - - * doc/setup.texi: add text about hostname to realm mapping using - DNS - -2004-02-20 Love Hörnquist Åstrand - - * kdc/pkinit.c: update error codes - - * lib/krb5/krb5_err.et: prefix pkinit error codes with KRB5_ - - * lib/krb5/pkinit.c: update error codes - -2004-02-19 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: indent, use krb5_abortx() instead of abort() - - * lib/krb5/init_creds_pw.c (process_pa_data_to_key): spelling - - * lib/krb5/store.c: handle memory allocate errors - - * lib/krb5/fcache.c (_krb5_xlock): handle that everything was ok, - and don't put an error in the error strings then - -2004-02-13 Love Hörnquist Åstrand - - * kdc/pkinit.c: s/heim_big_integer/heim_integer/ - - * lib/krb5/pkinit.c: s/heim_big_integer/heim_integer/ - - * kdc/pkinit.c: adapt to asn1 bignum code, use HEIM_PKINIT errors - - * lib/krb5/pkinit.c: adapt to asn1 bignum code, use HEIM_PKINIT - errors - - * lib/krb5/heim_err.et: add HEIM_PKINIT specific errors - -2004-02-12 Love Hörnquist Åstrand - - * configure.in: rename AC_WFLAGS to rk_WFLAGS - - * acinclude.m4: use m4_define, over-quote string - -2004-02-11 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c (change_password): handle that - printf("%.*s", 0, (void*)NULL); doesn't work on solaris - -2004-02-10 Love Hörnquist Åstrand - - * kpasswd/kpasswd.c (change_password): handle that printf("%.*s", - 0, (void*)NULL); doesn't work on solaris - - * lib/krb5/krb5.conf.5: don't use path's in first .Nm, it confuses - some locate.updatedb, use FILES section to describe where the file - is instead. - -2004-02-07 Love Hörnquist Åstrand - - * lib/asn1/check-der.c: test for "der_length.c: Fix len_unsigned - for certain negative integers, it got the length wrong" , from - Panasas, Inc. - - * lib/asn1/der_length.c: Fix len_unsigned for certain negative - integers, it got the length wrong, fix from Panasas, Inc. - - rename len_int and len_unsigned to _heim_\& - - * lib/asn1/der_locl.h: add _heim_len_unsigned, _heim_len_int - -2004-02-06 Dave Love - - * configure.in: Check for sys/socket.h, net/if.h. Modify term.h, - security/pam_appl.h tests. - -2004-02-03 Love Hörnquist Åstrand - - * lib/asn1/check-gen.c: test for: (length_type): TSequenceOf: add - up the size of all the elements, don't use just the size of the - last element. - - * lib/krb5/aes-test.c: add "next iv" test for aes128, check - decryption case too - - * lib/krb5/crypto.c (_krb5_aes_cts_encrypt): out iv is the iv of - the next to last block, fix decryption case too - - * lib/krb5/aes-test.c: add "next iv" test for aes128 - - * lib/krb5/crypto.c (_krb5_aes_cts_encrypt): out iv is the iv of - the next to last block - - * lib/krb5/mk_rep.c (krb5_mk_rep): abort on internal asn1 encode - error - - * lib/krb5/mk_rep.c (krb5_mk_rep): abort on internal asn1 encode - error - - * lib/krb5/get_in_tkt.c (krb5_get_in_cred): abort on internal asn1 - encode error - - * lib/krb5/mk_priv.c (krb5_mk_priv): abort on internal asn1 encode - error - - * lib/krb5/get_cred.c (make_pa_tgs_req): abort on internal asn1 - encode error - - * lib/krb5/build_auth.c (krb5_build_authenticator): abort on - internal asn1 encode error - - * lib/krb5/build_ap_req.c (krb5_build_ap_req): abort on internal - asn1 encode error - -2004-01-30 Love Hörnquist Åstrand - - * doc/setup.texi: some text about order of [capaths] realms - -2004-01-25 Love Hörnquist Åstrand - - * lib/krb5/context.c: register WRFILE ops - - * lib/krb5/keytab_file.c: add krb5_wrfkt_ops/WRFILE (same as FILE) - - * lib/krb5/krb5.h: add krb5_wrfkt_ops - - * kpasswd/kpasswdd.c (change): use the right password when - changing the password - -2004-01-21 Love Hörnquist Åstrand - - * lib/krb5/fcache.c (_krb5_xlock): catch EINVAL and assume that it - means that the filesystem doesn't support locking - - * lib/krb5/keytab.c: remove #if 0 out file locking code - -2004-01-19 Love Hörnquist Åstrand - - * lib/asn1/gen_length.c (length_type): TSequenceOf: add up the - size of all the elements, don't use just the size of the last - element. - -2004-01-13 Love Hörnquist Åstrand - - * kuser/kinit.c (renew_validate): if renewable_flag and not time - specifed, use "1 month" - -2004-01-08 Love Hörnquist Åstrand - - * lib/krb5/krb5_keyblock.3: add prototypes, describe - krb5_keyblock_zero - -2004-01-05 Love Hörnquist Åstrand - - * lib/krb5/get_for_creds.c (add_addrs): don't add same address - multiple times - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): try to - handle errors better for previous commit - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): If tickets - are address-less, forward address-less tickets. - - * lib/krb5/get_cred.c: rename get_krbtgt to _krb5_get_krbtgt and - export it - diff --git a/kerberosV/src/ChangeLog.2005 b/kerberosV/src/ChangeLog.2005 deleted file mode 100644 index a594d092404..00000000000 --- a/kerberosV/src/ChangeLog.2005 +++ /dev/null @@ -1,2004 +0,0 @@ -2005-12-15 Love Hörnquist Åstrand - - * kdc/kerberos5.c (tgs_make_reply): less const on hdb_entry_ex to - make samba happy - - * fix-export: Build kdc-private.h. - -2005-12-14 Love Hörnquist Åstrand - - * kdc/kerberos5.c (tgs_rep2): also print the principal for which - the enctype was missing - -2005-12-13 Love Hörnquist Åstrand - - * kdc/kaserver.c: Finish up transition from hdb_entry to - hdb_entry_ex. - - * kdc/kerberos4.c: Finish up transition from hdb_entry to - hdb_entry_ex. - - * kdc/524.c: Finish up transition from hdb_entry to hdb_entry_ex. - - * kdc/kerberos5.c: Finish up transition from hdb_entry with - hdb_entry_ex. - - * lib/krb5/cache.c (krb5_cc_set_default_name): use - KRB5_DEFAULT_CCNAME. - - * lib/krb5/krb5_locl.h: Add KRB5_DEFAULT_CCNAME, pointer to - default credential cache. - - * lib/hdb/ndbm.c: memset hdb_entry_ex before use - - * lib/hdb/db3.c: memset hdb_entry_ex before use - - * lib/hdb/db.c: memset hdb_entry_ex before use - -2005-12-12 Love Hörnquist Åstrand - - * lib/krb5/krb5.3: Add some more entrypoints. - - * lib/krb5/changepw.c: If there is a target principal, use the - realm of the realm to change the password with, - - * kuser/kinit.c: Default to use DH when fetching keys. - - * lib/hdb, kdc, kadmin/load.c: Wrap hdb_entry with hdb_entry_ex, patch - originally from Andrew Bartlet - - * lib/hdb/hdb-ldap.c: Wrap hdb_entry with hdb_entry_ex, add url - support, add ldapi support. - - * kdc/kerberos5.c (tgs_make_reply): there are no such things a - keytypes any more, just use enctypes. - - * kdc/kdc_locl.h: Remove private prototypes and instead include - . - - * kdc/Makefile.am: Build kdc-private.h and depend on it. - - * kdc/config.c (configure): wrap line - - * doc/kerberos4.texi: KDC 4 support is always compiled in. - - * TODO: Remove some stuff that have been done. - - * Makefile.am: Split long line - - * doc/apps.texi: Spelling, From Måns Nilsson. - - * doc/install.texi: spelling, From Måns Nilsson - -2005-12-11 Love Hörnquist Åstrand - - * lib/krb5/krb5_principal.3: Constify principal argument to on - krb5_principal_get_ functions. - - * lib/krb5/principal.c: Constify principal argument to on - krb5_principal_get_ functions. - -2005-12-08 Love Hörnquist Åstrand - - * lib/hdb: drop convert_db, 0.0 to 0.1 transition was a long long - time ago - -2005-12-05 Love Hörnquist Åstrand - - * lib/krb5/test_keytab.c: more tests, From Andrew Bartlet - - * lib/krb5/keytab_memory.c (mkt_remove_entry): realloc can return - NULL on success in the case 0 entries are allocated, From Andrew - Bartlet - -2005-12-02 Love Hörnquist Åstrand - - * lib/krb5/acl.c (acl_parse_format): tmp needs to be freed too on - failure to parse format specifier. - - * lib/krb5/store-test.c: Free more of the allocated memory. - - * lib/krb5/crypto.c (krb5_derive_key): Free more of the allocated - memory, this function is only used by the test program. - - * lib/krb5/parse-name-test.c: Free more of the allocated memory. - - * lib/krb5/derived-key-test.c: Free more of the allocated memory. - -2005-12-01 Love Hörnquist Åstrand - - * doc/setup.texi: spelling, From Måns Nilsson - - * lib/krb5/krb5_keytab.3: Memory keytab are now named and - refcounted. - - * lib/krb5/test_keytab.c: Test that memory keytab are refcounted. - - * lib/krb5/keytab_memory.c: Index by name and start reference - counting on entries. - -2005-11-30 Love Hörnquist Åstrand - - * lib/krb5/krb5.h (krb5_address_type): add - KRB5_ADDRESS_NETBIOS (20) - - * lib/hdb/hdb.c (find_method): accept relative paths as old db - format too. - - * lib/krb5/aes-test.c: Remove usage of krb5_enctype_to_keytype. - -2005-11-29 Dave Love - - * kcm/connect.c (kcm_loop): Use HAVE_DOOR_CREATE, not HAVE_DOORS. - -2005-11-29 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.c (libdefaults_entries): add - default_cc_name - - * lib/hdb/hdb.c: Only match db databases on filename starting with - '/'. - - * lib/krb5/rd_req.c (krb5_verify_ap_re2): check timestamp in - authenticator - - * lib/krb5/rd_req.c (check_transited): explain the TR-type 0 - better and why it matters. - - * lib/krb5/test_cc.c: test krb5_cc_get_prefix_ops - - * lib/krb5/cache.c (krb5_cc_get_prefix_ops): change the behavior - to return NULL when its not found, and fcc when the name starts - with a '/'. Almost matches behavior in other parts of the code, - but can't really do that since the name passed in to this function - may only contain the prefix itself without the colon. - - * lib/krb5/cache.c (krb5_cc_get_prefix_ops): if there are not - colon (:) in the name, its a file credential cache - - * lib/hdb/db3.c (hdb_db_create): use calloc to callocate memory - - * lib/hdb/ndbm.c (hdb_ndbm_create): use calloc to allocate memory - - * lib/hdb/db.c (hdb_db_create): use calloc to allocate memory - -2005-11-28 Love Hörnquist Åstrand - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): use session - key for delegated credentials - - * kdc/kerberos5.c (_kdc_as_rep): add comment when we send - ETYPE-INFO and ETYPE-INFO2, from Andrew Bartlett - -2005-11-25 Love Hörnquist Åstrand - - * lib/krb5/keytab.c (krb5_kt_get_full_name): new function - -2005-11-24 Love Hörnquist Åstrand - - * lib/krb5/test_crypto.c: Split encryption and s2k iterations to - diffrent counters, 38seconds of aes256 s2k is way too long. - - * lib/krb5/test_crypto.c: Add timing code for s2k function. - -2005-11-07 Love Hörnquist Åstrand - - * kdc/kerberos5.c: Print the time the principal expired, based on - patch from Andrew Bartlett. - -2005-11-01 Love Hörnquist Åstrand - - * lib/krb5/cache.c (krb5_cc_get_full_name): Add - -2005-11-01 Love Hörnquist Åstrand - - * configure.in: Spelling, From Michael Banck - -2005-10-30 Love Hörnquist Åstrand - - * kcm/headers.h: Maybe include . - -2005-10-27 Love Hörnquist Åstrand - - * lib/krb5/ticket.c (krb5_ticket_get_authorization_data_type): - understand KRB5_AUTHDATA_IF_RELEVANT and KRB5_AUTHDATA_AND_OR (but - have KRB5_AUTHDATA_KDC_ISSUED commented out for now) - -2005-10-26 Love Hörnquist Åstrand - - * kuser/klist.c: In the list caches view, rename the Status field - to Expires. - - * lib/krb5/krb5_encrypt.3: Fix mdoc for - krb5_encrypt_EncryptedData, Johnny Lam - -2005-10-25 Love Hörnquist Åstrand - - * appl/test/gssapi_client.c: Check return value from asprintf - instead of string != NULL since it undefined behavior on - Linux. From Björn Sandell - -2005-10-21 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (_krb5_dh_group_ok): if not enough bits are - generated from the DH groups, fail. - - * kdc/pkinit.c (get_dh_param): Pass down config so this function - can check pkinit_dh_min_bits - - * kdc/config.c: Fill in pkinit_dh_min_bits from configuration - file. - - * kdc/kdc.h: Add pkinit_dh_min_bits to krb5_kdc_configuration. - -2005-10-20 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Add option to require binding between reply - and response for the win2k version of the protocol. - -2005-10-19 Love Hörnquist Åstrand - - * doc/programming.texi: Text about Kerberos errors. - - * lib/krb5/pkinit.c: Try both ReplyKey and ReplyKey-Win2k for the - Windows case to support the updated -09 protocol (using - asChecksum). Tell KDC we support this by sending - KRB5-PADATA-PK-AS-09-BINDING in the pa-data. - - * lib/krb5/test_cc.c: Test copy FILE -> FILE, and MEMORY -> MEMORY - too. - - * lib/krb5/test_cc.c: Test krb5_cc_copy_cache and - krb5_cc_cache_match. - - * lib/krb5/cache.c (krb5_cc_cache_match): add function that - iterates over all credential caches for a user and returns a - match. - - * lib/krb5/krb5_ccache.3: Add krb5_cc_start_seq_get and an - example. - -2005-10-18 Love Hörnquist Åstrand - - * doc/programming.texi: Try to explain krb5_ccache, krb5_principal - and errors. - -2005-10-13 Love Hörnquist Åstrand - - * lib/krb5/krb5_get_credentials.3: Add example how to use - krb5_get_credentials. - -2005-10-12 Love Hörnquist Åstrand - - * lib/krb5/init_creds.c: Rename private to opt_private. - - * lib/krb5/init_creds_pw.c: Rename private to opt_private. - - * lib/krb5/pkinit.c: rename element private to opt_private to make - c++ picky compilers less upset. - - * lib/krb5/krb5.h (krb5_get_init_creds_opt): rename element - private to opt_private to make c++ picky compilers less upset. - -2005-10-08 Love Hörnquist Åstrand - - * lib/krb5/krbhst.c (_krb5_krbhost_info_move): new function - (_krb5_free_krbhst_info): expose to internal use - - * lib/krb5/init_creds_pw.c: Prepare to pass down a - krb5_krbhst_info into the pre-auth mechs - - * lib/krb5/pkinit.c: Inline short functions, share more code, - rename COMPAT_27 to COMPAT_IETF, pass down a krb5_krbhst_info for - verification of KDC info, and general cleaning up. - -2005-10-07 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: Install krb5.moduli in sysconfdir. - - * lib/krb5/krb5_locl.h: rename moduli file to SYSCONFDIR - "/krb5.moduli" - - * lib/krb5/krb5_locl.h: Add forward declaration for - krb5_dh_moduli. Add define for MODULI_FILE. - - * kdc/pkinit.c: Removing PK-INIT-19 support. - - * lib/krb5/pkinit.c: Removing PK-INIT-19 support. - - * lib/krb5/pkinit.c (_krb5_dh_group_ok): return DH group name on - success. - (krb5_get_init_creds_opt_set_pkinit): use moduli file if it exists - - * kdc/pkinit.c: Save DH group name and print it on success. - - * lib/krb5/pkinit.c (_krb5_dh_group_ok): if q is zero, ignore it. - - * kdc/pkinit.c: Check dh group parameters from client. - - * lib/krb5/krb5_err.et: Match error code with pk-init-27. - - * lib/krb5/pkinit.c: Update error codes. Add name to group. Change - return value of _krb5_dh_group_ok. - - * lib/krb5/pkinit.c: Add support for reading a moduli-file for DH - parameters. - -2005-10-06 Love Hörnquist Åstrand - - * kuser/klist.1: Document --list-caches - - * kuser/klist.c: Change short flag of --list-caches to -l (-v is - already used). - -2005-10-03 Love Hörnquist Åstrand - - * lib/krb5/kerberos.8: RFC 1510 was obsoleted by 4120. - - * lib/krb5/acache.c (init_ccapi): return kerberos errors, callers - expect it - (acc_get_cache_first): don't leak memory or abort on malloc - failure - -2005-10-02 Love Hörnquist Åstrand - - * lib/krb5/kerberos.8: Update text about Kerberos RFC's. - -2005-10-01 Love Hörnquist Åstrand - - * kuser/klist.c: Add option --list-caches that lists the avaible - caches and their status. - - $ klist --list-caches - Principal Cache name Status - lha@E.KTH.SE 2 Valid - lha@SU.SE 1 Expired - lha/root@SU.SE 0 Expired - lha@N.L.NXS.SE Initial default ccache Expired - -2005-09-30 Love Hörnquist Åstrand - - * lib/krb5/keytab_keyfile.c: Use all DES keys, not just - des-cbc-md5, verify that they all are the same. - - * lib/krb5/mcache.c Implement the cache iteration functions. - - * lib/krb5/acache.c: Implement the cache iteration functions. - - * lib/krb5/test_cc.c: Test the new cache iteration functions. - - * lib/krb5/cache.c: Add cache iteration funcations. Add internal - allocation function for the memory of a krb5_ccache, and use it. - - * lib/krb5/krb5.h (krb5_cc_ops): add cache iteration functions - -2005-09-25 Love Hörnquist Åstrand - - * lib/krb5/krb5_mk_req.3: Remove leftovers, remove extra space. - - * kdc/kerberos5.c: More verbose PK-INIT logging. - - * kdc/pkinit.c: The public DH key is encoded as an INTEGER in - subjectPublicKey. Don't verify OID's for now. - - * lib/krb5/pkinit.c: Support cached DH variable (still need to - store it though), don't check the oid of the DH signedData for - now. - -2005-09-22 Love Hörnquist Åstrand - - * lib/krb5/rd_cred.c (krb5_rd_cred): try both the session key and - the sender subkey. Both RFC1510 and RFC4120 say that you have to - use the session key, Heimdal uses subkey. - -2005-09-21 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Don't check oid's too closely, they change in - Windows Vista. - -2005-09-20 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Disable sending -19, fix parsing -27 of the - protocol. - - * kdc/pkinit.c: Support PK-INIT-27 DH (and remove -19) - - * lib/krb5/pkinit.c (pk_verify_chain_standard): set cert to NULL - to make sure its not freed. - -2005-09-19 Love Hörnquist Åstrand - - * lib/krb5/crypto.c (krb5_DES_string_to_key): If the opaque length - it set to 1, and content is 0x01, use the afs3 string-to-key. - - * kdc/kerberos5.c (make_etype_info2_entry): When its a afs3-salted - key, use send the opaque, length 1 (with content set to 0x01) in - ETYPE-INFO2-ENTRY. - - * lib/krb5/kcm.c: Remove signedness warnings. - -2005-09-15 Love Hörnquist Åstrand - - * configure.in: Use libtool's default values for building - shared/static libaries, ie remove AC_ENABLE_SHARED(no), solves - building problems users have on Mac OS X. - -2005-09-08 Love Hörnquist Åstrand - - * lib/krb5/changepw.c: Constify password. - -2005-09-05 Love Hörnquist Åstrand - - * lib/krb5/krb5_mk_req.3: Document krb5_rd_req. - - * lib/krb5/Makefile.am: MAN_mans+= krb5_mk_req.3 - - * lib/krb5/krb5_mk_req.3: Document krb5_mk_req, krb5_mk_req_exact, - krb5_mk_req_extended, krb5_rd_req, krb5_rd_req_with_keyblock, - krb5_mk_rep, krb5_mk_rep_exact, krb5_mk_rep_extended, krb5_rd_rep, - krb5_build_ap_req, krb5_verify_ap_req. - -2005-09-01 Love Hörnquist Åstrand - - * kdc/kerberos5.c (make_etype_info_entry): Dont send salttype at - all, use KRB5-PADATA-AFS3-SALT - -2005-08-31 Love Hörnquist Åstrand - - * kdc/kerberos5.c (log_timestamp): endtime, not endtype - -2005-08-30 Love Hörnquist Åstrand - - * configure.in: Check for . - - * kcm/connect.c (update_client_creds): in case there is no - UCRED_VERSION, skip LOCAL_PEERCRED - - * kcm/headers.h: include - -2005-08-27 Love Hörnquist Åstrand - - * lib/krb5/rd_req.c (check_transited): Allow empty content of type - 0 because that is was Microsoft generates in their TGT. - - * kdc/kerberos5.c (fix_transited_encoding): Allow empty content of - type 0 because that is was Microsoft enerates in their TGT. - -2005-08-26 Love Hörnquist Åstrand - - * doc/intro.texi: RFC 4120 replaces RFC 1510 - -2005-08-25 Love Hörnquist Åstrand - - * configure.in: Add --disable-afs-support. - -2005-08-23 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: Add test_hostname to check_PROGRAMS but - not TESTS, I have no same dns to use. - - * lib/krb5/test_hostname.c: Testprogram for krb5_expand_hostname() - and krb5_expand_hostname_realms(). - - * configure.in: Build KCM if we have doors or unix sockets. - - * lib/krb5/principal.c (krb5_425_conv_principal_ex2): Remove - shadowing variable. - - * lib/krb5/get_host_realm.c (dns_find_realm): Fix const warnings, - plug memory leak. From: Stefan Metzmacher - - * lib/krb5/krb5_config.3: Document what happens with NULL to - krb5_config_free_strings - (nothing). Mdoc nit. - -2005-08-22 Love Hörnquist Åstrand - - * kuser/klist.c (check_for_tgt): Re-order code so it only free the - credential if one was returned. - - * lib/krb5/test_crypto_wrapping.c: Fix printing of size_t. - -2005-08-19 Love Hörnquist Åstrand - - * lib/hdb/dbinfo.c: provide interface to find databases - - * lib/hdb/mkey.c: hdb_seal_key_mkey): dont double encrypt keys - -2005-08-15 Love Hörnquist Åstrand - - * kdc/kdc_locl.h: Update prototype for _kdc_pk_mk_pa_reply. - -2005-08-13 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c: Save the request buffer so that - pre-auth mechanism that needs it can verify the reply. - -2005-08-12 Love Hörnquist Åstrand - - * lib/krb5/test_mem.c: Rename logf to avoid shadowing. - - * lib/krb5/krb5_keytab.3: Fix the version number for - fcc-mit-ticketflags. - - * lib/krb5/fcache.c: Revert previous, I was confused. - - * lib/krb5/krb5_keytab.3: Document fcc-mit-ticketflags in - COMPATIBILITY section. - - * lib/krb5/fcache.c (fcc_store_cred): default to MIT style ticket - flags. - - * kdc/pkinit.c (pk_mk_pa_reply_enckey): add missing break; - - * lib/krb5/krb5_create_checksum.3: Update prototype for - krb5_create_checksum. - - * kdc/pkinit.c: Make compile. - - * lib/krb5/pkinit.c: Implement verification of asChecksum, now - client side code is using -27 of the pk-init draft. - - * kdc/kdc_locl.h: update prototype for _kdc_as_rep - - * kdc/pkinit.c: Fill in asChecksum, we now implements -27 in the KDC. - - * kdc/process.c: Pass down the request buffer to _kdc_as_rep(). - - * kdc/kerberos5.c (_kdc_as_rep): Pass down the request buffer to - _kdc_pk_mk_pa_reply. - -2005-08-11 Love Hörnquist Åstrand - - * lib/hdb/ext.c: HDB extensions access glue. - - * kcm/acquire.c: Use krb5_set_password instead of - krb5_change_password. - - * configure.in: Add tests/Makefile and tests/db/Makefile. - - * NEWS: New ASN.1 compiler - - * lib/hdb/Makefile.am: Build extensions. - - * lib/hdb/print.c: Print extensions. - - * lib/hdb/hdb_err.et: Add error "Entry contains unknown mandatory - extension". - - * lib/hdb/hdb.h: Update interface version (and indent). - - * lib/hdb/hdb.asn1: Add support for HDB-extension. - -2005-08-10 Love Hörnquist Åstrand - - * lib/krb5/test_pkinit_dh2key.c: add tests vectors from - "Liqiang(Larry) Zhu" - - * lib/hdb/mkey.c: Expose the crypto operations on the master key. - - * lib/krb5/test_pkinit_dh2key.c: even more bits, not done yet - -2005-08-09 Love Hörnquist Åstrand - - * kdc/kerberos5.c (_kdc_as_rep): preserve the error code in the - ENC-TS case. From: Andrew Bartlett - - * kdc/kerberos5.c (tgs_rep2): only needs to log "Failed to verify - authenticator" once, its already done by - tgs_check_authenticator(). - - * kdc/kerberos5.c: Indent strings. - - * kdc/kerberos5.c (log_timestamp): avoid shadow warnings From: - Andrew Bartlett - - * lib/krb5/verify_user.c: Add krb5_verify_opt_alloc and - krb5_verify_opt_free. - - * lib/krb5/krb5_verify_user.3: Document krb5_verify_opt_alloc and - krb5_verify_opt_free. - - * lib/hdb/db3.c (DB_open): catch errors from the d->open calls - instead of letting them slip though to d->cursor. Bug repport from - Andrew Bartlett - -2005-07-29 Love Hörnquist Åstrand - - * kdc/Makefile.am (kdc_LDADD): add LDADD - -2005-07-28 Love Hörnquist Åstrand - - * kdc/kerberos5.c (_kdc_as_rep): log what enctypes was using in - ENC-TS preauth, both for failure and success. - - * kdc/hprop.c: Use the _krb5_krb_life_to_time function from - libkrb5 instead of including our own here too. - - * kdc/kerberos5.c: indent printf strings - - * lib/hdb/mkey.c (hdb_unseal_key_mkey): try to unseal key with - keyusage 0 in case the key was encrypted with MIT Kerberos (old - patch from Johan) - -2005-07-26 Love Hörnquist Åstrand - - * kdc/pkinit.c: update to pkinit-27 - -2005-07-23 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Adapt to IMPLICIT changes in CMS module. - -2005-07-20 Love Hörnquist Åstrand - - * lib/krb5/test_pkinit_dh2key.c: framework for testing - _krb5_pk_octetstring2key - - * kpasswd/kpasswdd.c (doit): krb5_addr2sockaddr takes a - krb5_socklen_t - - * kdc/connect.c (de_http): sscanf takes a char *, not unsigned - ditto, cast approriately - - * lib/krb5/crypto.c (_krb5_pk_octetstring2key): make sha1 output - unsigned char to match openssl - -2005-07-14 Love Hörnquist Åstrand - - * lib/hdb/common.c: Check encoder lengths from ASN1_MALLOC_ENCODE. - -2005-07-13 Love Hörnquist Åstrand - - * lib/krb5/rd_cred.c (krb5_rd_cred): don't leak memory - - * lib/krb5/get_cred.c (krb5_get_credentials_with_flags): only call - krb5_cc_retrieve_cred once, and plug memory leak. - -2005-07-13 Love Hörnquist Åstrand - - * lib/hdb/Makefile.am: the new asn.1 compiler includes the modules - name in the depend file - - * lib/krb5/keytab_file.c (fkt_start_seq_get_int): check return - value from krb5_storage_from_fd - - * lib/krb5/pkinit.c (pk_rd_pa_reply_dh): client do not contribute - to the DH when the server doesn't support the cached DH request. - - * lib/krb5/crypto.c (_krb5_pk_octetstring2key): fix arguments - -2005-07-12 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: clean up pk-init DH support, not finished - yet; improve error reporting - - * lib/krb5/crypto.c (_krb5_pk_octetstring2key): string2key - function used in pk-init-25 - - * configure.in: Use a configure switch to turn on PK-INIT, not by - detecting existence of the new ASN.1 library. - - * lib/asn1: Much improved ASN.1 compiler from joda-choice-branch. - - Highlighs for the compiler is support for CHOICE and in general better - support for tags. This compiler support most of what is needed for - PK-INIT, LDAP, X.509, PKCS-12 and many other protocols. - -2005-07-10 Love Hörnquist Åstrand - - * lib/asn1: make scope variables unique to avoid shadow warnings - -2005-07-09 Love Hörnquist Åstrand - - * lib/krb5/krb5.h: comment out paramenter name in typedef - functions to avoid shadow warnings - - * lib/krb5/crypto.c: make input data to krb5_encrypt{,_ivec} const - - * kuser/klist.c: If there are no addresses, print addressless - instead of nothing. - - * lib/krb5/Makefile.am (TESTS): add test_crypto_wrapping - - * lib/krb5/crypto.c (wrapped_length): the underived encrypted - types checksum are all unkeyed (matches the code in - encrypt_internal() and encrypt_internal_special()) - - * lib/krb5/test_crypto_wrapping.c: ETYPE_ARCFOUR_HMAC_MD5_56 isn't - not supported - - * lib/krb5/test_crypto_wrapping.c: test encryption wrapping - - * lib/krb5/test_crypto.c (time_encryption): free cleartext buffer - -2005-07-08 Love Hörnquist Åstrand - - * configure.in: run AM_INIT_AUTOMAKE before AM_PROG_CC_C_O - otherwise am_aux_dir will be expanded using ac_aux_dir before the - later is set. - - * configure.in: check for strings.h explicitly instead of - depending on AC_HEADER_STDC to check it for us - -2005-07-07 Assar Westerlund - - * configure.in: add AM_PROG_CC_C_O for automake 1.9 - -2005-07-06 Love Hörnquist Åstrand - - * lib/krb5/keytab.c (krb5_kt_get_entry): clear error string when - returning a new error - - * lib/krb5/keytab.c: krb5_kt_close frees all resources, even on - error. - - * lib/krb5/verify_init.c (krb5_verify_init_creds): `entry' unused, - remove From: "Henry B. Hotz" - -2005-07-05 Love Hörnquist Åstrand - - * doc/win2k.texi: arcfour-hmac-md5 support for windows cross was - added in w2k3-sp1 From David Love - - * doc/setup.texi: document kadmin command password-quality instead - of the not installed test_pw_quality - - * lib/krb5/krb5_get_init_creds.3: Spelling, from David Love - - * fix-export: build kdc-protos.h - -2005-07-01 Love Hörnquist Åstrand - - * kdc: prefix pkinit symbols with _kdc - - * kuser/kinit.c: avoid shadowing variables - - * kuser: s/optind/optidx/ - - * kdc: adapt pkinit code to libkdc split - -2005-06-30 Love Hörnquist Åstrand - - * tools/Makefile.am: add depency on LIB_dlopen and LIB_door_create - - * tools/krb5-config.in: add depency on LIB_dlopen and LIB_door_create - - * kdc/kdc_locl.h: indent, remove dup prototypes - - * kdc/libkdc: don't pollute namespace, generate public headerfile - - * lib/krb5/principal.c: add krb5_425_conv_principal_ext2 that work - just like krb5_425_conv_principal_ext but takes a context variable - for the verification function - - * kdc/Makefile.am: there is no export script, not pretend there is - - * kdc: Merge in the libkdc/kdc configuration split from Andrew - Bartlet - - * lib/krb5/crypto.c: optionally compile in support for afs string2key - - * configure.in: add --disable-afs-string-to-key to allow removal - of support for afs string2key (and dependency on crypt) - -2005-06-29 Love Hörnquist Åstrand - - * kdc/kerberos5.c: Add logging of all timestamps in AS-REQ and - TGS-REQ, for auditing - - * kdc/kerberos5.c (as_req): print the supported encryption types - so its possible to know what clients to update. - (find_rpath): return const char * and update callers. - -2005-06-28 Luke Howard - - * kcm/connect.c: fix arguments to kcm_log() when reporting - sendmsg() error - - * kcm/connect.c: don't send socket address in msghdr, it - returns an already connected error on Linux - -2005-06-24 Love Hörnquist Åstrand - - * kdc/524.c: Always include . - -2005-06-23 Love Hörnquist Åstrand - - * doc/intro.texi: no more libdes, gssapi lib is complete - - * lib/krb5/krb5.conf.5: Documentation for password quality - control. From: "James F. Hranicky" - - * lib/krb5/verify_krb5_conf.c (password_quality_entries): add - min_length and min_classes - - * kdc/kaserver.c: log the kaserver requests, avoid shadowing - variables - - * lib/hdb/db3.c (DB_open): in case of error, close database - - * lib/hdb/ndbm.c (NDBM_open): in case of error, close database - - * lib/hdb/db.c (DB_open): in case of error, close database - -2005-06-20 Love Hörnquist Åstrand - - * kcm/kcm.8: fix example - -2005-06-17 Love Hörnquist Åstrand - - * lib/krb5/rd_rep.c: indent - - * lib/krb5/rd_rep.c (krb5_rd_rep): check if - KRB5_AUTH_CONTEXT_DO_TIME set and use that as a que that timestamp - should be checked, DCE-STYLE gssapi needs to be able to tweek this - - * kdc/string2key.c: rename optind to optidx - - * lib/hdb/convert_db.c: rename optind to optidx - - * lib/hdb/keytab.c: const poison, add a unconst where needed - - * lib/krb5/crypto.c (krb5_string_to_key): unconst password - - * lib/asn1/k5.asn1: rename pvno to krb5-pvno - - * lib/krb5/get_in_tkt_with_keytab.c (krb5_keytab_key_proc): - unconst argument - - * lib/krb5/verify_krb5_conf.c: rename optind to optidx - - * lib/krb5/transited.c: rename the temporary string variable to - `str' - - * lib/krb5/test_crypto.c: rename optind to optidx - - * lib/krb5/test_alname.c: rename optind to optidx - - * lib/krb5/store.c: unconst argument to krb5_store (XXX this - should be fixed, krb5_store doesn't need to modify its argument) - - * lib/krb5/send_to_kdc.c (krb5_sendto): remove shadowing - unnessecery variable ret - - * lib/krb5/rd_cred.c (krb5_rd_cred): remove shadowing unnessecery - variable len - - * lib/krb5/prog_setup.c: rename optind to optidx - - * lib/krb5/padata.c: rename variable index to idx - - * lib/krb5/log.c: rename variable time to timestr to avoid - shadowing - - * lib/krb5/krbhst.c (krb5_krbhst_init_flags): rename variable to - avoid shadowing - - * lib/krb5/krbhst-test.c: rename optind to optidx - - * lib/krb5/kcm.c: unconst argumen to connect, unconst argument to - krb5_store (XXX this should be fixed, krb5_store doesn't need to - modify its argument) - - * lib/krb5/init_creds_pw.c (default_s2k_func): unconst password - - * lib/krb5/crypto.c: rename `encrypt' to avoid shadow warning - -2005-06-16 Love Hörnquist Åstrand - - * lib/krb5/principal.c: rename index to idx - - * lib/krb5/mk_error.c: use rk_UNCONST - - * lib/krb5/fcache.c: rename to avoid shadowing - - * lib/krb5/config_file.c: rename to avoid shadowing - - * lib/krb5/cache.c (_krb5_expand_default_cc_name): just copy the - string instead of losing const - - * lib/krb5/addr_families.c: use rk_UNCONST to silence const - warning - - * lib/krb5/addr_families.c: rename sin to sin4 - - * lib/asn1/asn1_print.c: rename optind to optidx, remove shadowed - variables - - * lib/asn1/main.c: rename optind to optidx - - * lib/asn1/gen_copy.c: rename to avoid shadowing - - * lib/asn1/gen_locl.h: rename function filename to get_filename - - * lib/asn1/lex.l: use get_filename - - * lib/asn1/gen.c: rename function filename to get_filename - - * lib/krb5/acache.c: use HAVE_DLOPEN around cc_handle - - * configure.in: add headers and prototypes to logwtmp, logout and - openpty checks - - * configure.in: include headerfiles and set prototype for tgetent - - * kdc/kerberos5.c (make_etype_info2_entry): NUL terminate the - string - - * kdc/kerberos5.c: replace strndup with inline copy, free data on - failure - - * lib/krb5/cache.c (_krb5_expand_default_cc_name): replace strndup - with inline copy - - * lib/krb5/log.c: rename close and log to avoid shadow warnings - - * lib/krb5/get_in_tkt.c: rename index to i to avoid shadowing - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): rename two - of the local `realm' to srealm to avoid shadowing - - * kdc/kerberos5.c (tgs_rep2): rename one of the tkey to uukey to - avoid shadow warning - - * kdc/kerberos5.c (tgs_rep2): rename loop to nloop to avoid shadow - warning - -2005-06-15 Love Hörnquist Åstrand - - * Release 0.7, see branch - -2005-06-14 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: TESTS += test_mem libkrb5_la_SOURCES += - kcm.h - - * kuser/kinit.c (main): catch KRB5_CONFIG_BADFORMAT from - krb5_init_context - - * kdc/main.c (main): catch KRB5_CONFIG_BADFORMAT from - krb5_init_context - - * lib/krb5/verify_krb5_conf.c (main): catch KRB5_CONFIG_BADFORMAT - from krb5_init_context From: Mathias Feiler - - - * lib/krb5/verify_krb5_conf.c: Add more missig entires, from - Mathias Feiler - -2005-06-11 Love Hörnquist Åstrand - - * kdc/pkinit.c (pk_principal_from_X509): remember to free - KRB5PrincipalName - - * lib/krb5/log.c (krb5_closelog): free all content in - krb5_log_facility - -2005-06-08 Love Hörnquist Åstrand - - * kdc/524.c: init kvno to please gcc - - * kdc/kaserver.c (do_authenticate): check return value from - unparse_auth_args - -2005-06-07 Dave Love - - * doc/setup.texi: Spelling. - - * doc/programming.texi: Spelling. - -2005-06-02 Dave Love - - * kcm/connect.c (kcm_door_server): Make static. - - * kcm/kcm_locl.h (disallow_getting_krbtgt): Declare. - -2005-06-02 Love Hörnquist Åstrand - - * kdc/mit_dump.c (mit_prop_dump): cast argument to - krb5_parse_principal to avoid warning - - * kdc/mit_dump.c: rename KRB5_TL_MOD_PRINC to - mit_KRB5_TL_MOD_PRINC to hint its a constant originating from mit - codebase - -2005-06-01 Love Hörnquist Åstrand - - * lib/krb5/store.c: If we are allocating 0 entires, avoid failing - if ALLOC returns NULL - - * lib/krb5/verify_krb5_conf.c: Check for [kdc]v4-realm - - * lib/krb5/cache.c: When returning a new error code, set error - string. - -2005-05-31 Love Hörnquist Åstrand - - * lib/krb5/keytab_file.c: Adapt to changed signature of - _krb5_xunlock, clear more error string where needed. - - * lib/krb5/fcache.c (_krb5_xunlock): catch the error and turn it - into something sensable - -2005-05-30 Love Hörnquist Åstrand - - * kdc/kerberos5.c (tgs_make_reply): copy ok-as-delegate flag from - server entry to encrypted ticket flags - -2005-05-30 Johan Danielsson - - * kdc/connect.c: rename sendlength to prependlength (which - hopefully better represents its purpose), and change type to - krb5_boolean - - * kdc/connect.c: log signal causing exit - - * kdc/main.c (sigterm): set exit_flag to signal causing exit; - (main): trap SIGXCPU - -2005-05-30 Love Hörnquist Åstrand - - * kcm/kcm.8: document --disallow-getting-krbtgt and --door-path - - * kcm/protocol.c (kcm_op_retrieve): check server for krbtgt, not - client - - * kcm/main.c: ignore SIGPIPE - - * kcm/protocol.c: Add option to disallow getting krbtgt out from - from KCM. KCM will do the fetching part itself. - - * kcm/config.c: Add option to disallow getting krbtgt out from - from KCM. KCM will do the fetching part itself. - -2005-05-30 Luke Howard - - * kcm/events.c: if credentials have expired when attempting - to renew, attempt to reacquire them using initial creds - -2005-05-29 Love Hörnquist Åstrand - - * lib/krb5/krb5_principal.3: Spelling, from Björn Sandell - - * doc/setup.texi: spelling, from Björn Sandell - - * lib/krb5/name-45-test.c: XXX don't run the test unless the - machine is in kth.se or su.se because it depends on local resolver - configuration. - - * lib/hdb/hdb.c: provde RTLD_NOW and RTLD_GLOBAL if they don't - exists - - * kcm/connect.c: fix doors support, fix signedness warnings - - * kcm/config.c: add --door-path= - - * configure.in: comment what the "detect doors on solaris" - fragment tries to do - - * kcm/acquire.c (generate_random_pw): fix signed-ness warnings - - * kcm/connect.c (update_client_creds): fix compile error in the - getpeerucred case - - * lib/krb5/test_cc.c: change format for expantion variables in - default_cc_name to %{variable} to not confuse them with shell - ditto - - * kcm/headers.h: Maybe include . - - * kcm/kcm_locl.h: add extern door_path; - - * configure.in: detect doors using door_create - - * kcm/Makefile.am: add dependcy on kcm_protos.h add lib depency on - LIB_door_create - - * lib/krb5/kcm.h: add _PATH_KCM_DOOR, default path to kcm door - - * lib/krb5/kcm.c: use [libdefaults]kcm_door to find the door to - kcm - - * lib/krb5/Makefile.am: libkrb5_la_LIBADD += LIB_door_create - - * lib/krb5/krb5_locl.h: Maybe include , maybe include - . - - * lib/krb5/kcm.c (kcm_send_request): add support for doing a door - call to kcm - - * lib/asn1: prefix Der_class with ASN1_C_ to avoid problems with - system headerfiles that pollute the name space - - * kcm/kcm.8: change format for expantion variables in - default_cc_name to %{variable} to not confuse them with shell - ditto - - * lib/krb5/krb5.conf.5: change format for expantion variables in - default_cc_name to %{variable} to not confuse them with shell - ditto - - * lib/krb5/cache.c (_krb5_expand_default_cc_name): change format - for expantion variables to %{variable} to not confuse them with - shell ditto - - * kcm/connect.c: add LOCAL_PEERCRED and experimental doors support - -2005-05-27 Love Hörnquist Åstrand - - * appl/kf/kfd.c: case uid_t to unsigned long in printf format - -2005-05-25 Love Hörnquist Åstrand - - * lib/krb5/krb5_auth_context.3: remove trailing space - -2005-05-24 Love Hörnquist Åstrand - - * kcm/connect.c (do_request): use sendmsg to send the reply - - * fix-export: add make_proto for kcm/kcm_protos.h - - * kcm/kcm_locl.h: remove prototypes and add - - * kcm/Makefile.am (kcm_SOURCES): add headerfiles - (kcm_protos.h): generate prototypes - - * kcm/protocol.c: fix error in last commit, use right function - - * kcm/headers.h: include if we have getpeerucred - - * configure.in: check for functions getpeerucred and getpeereid - - * kcm/connect.c (update_client_creds): add support for - getpeerucred and getpeereid - - * lib/krb5/kcm.c (kcm_alloc): allow kcm socket to be configured by - [libdefaults]kcm_socket=/path - -2005-05-24 David Love - - * kcm/kcm.8: KRB5CCNAME needs an literal uid, not ${uid}, spelling - -2005-05-23 Love Hörnquist Åstrand - - * kcm/protocol.c: Merge the description and function jumptables - into one structure. Use the length of the array when checking if - opcode is value, not a constant. - - * kcm/kcm_locl.h: struct kcm_op: jumptable structure - - * kcm/main.c: move declaration of detach_from_console away from - here to kcm_locl.h, Don't test HAVE_DAEMON since roken supplies it. - - * kcm/kcm_locl.h: move declaration of detach_from_console here - - * kdc/config.c: Don't test HAVE_DAEMON since roken supplies it. - -2005-05-23 Dave Love - - * kcm/config.c: Don't test HAVE_DAEMON since roken supplies it. - - * kdc/main.c: Don't test HAVE_DAEMON since roken supplies it. - -2005-05-23 Love Hörnquist Åstrand - - * lib/krb5/krb5_keytab.3: document WRFILE and JAVA14 - -2005-05-20 Love Hörnquist Åstrand - - * lib/krb5/krbhst.c (srv_get_hosts): if srv_get_hosts failes, - return and ignore the error - - * lib/krb5/krbhst.c (srv_find_realm): make sure `res' and `count' - have good values - - * lib/krb5/test_keytab.c: tests all keytab format - -2005-05-19 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (_krb5_pk_rd_pa_reply): non non asn1 decoding - errors, fail. Make sure we free memory on error. - (pk_verify_chain_standard): make sure we provide good errors. - - * lib/krb5/verify_krb5_conf.c: add missing options, prompted by - James F. Hranicky mail to heimdal-discuss - - * lib/krb5/verify_krb5_conf.c: add pkinit and password quailty - check options - - * lib/krb5/pkinit.c (pk_verify_chain_standard): store better error - message in the context for certificate errors. - - * lib/krb5/keytab.c (krb5_kt_free_entry): zero out content of all - krb5_free_x_content like functions to make sure data doesnt get - reused, idea from Wynn Wilkes - - * configure.in: depend on automake 1.8, we don't test anything - older - - * lib/krb5/init_creds_pw.c (process_pa_data_to_md): add comment - that the caller always free out_md; remove comment about memory, - it doesn't happen. - (init_cred_loop): free ctx->as_req.padata when its reset (From Wynn - Wilkes ), move a comment close the the code - - * lib/krb5/keytab_krb4.c (fkt_remove_entry): need to call - krb5_kt_free_entry after each krb5_kt_next_entry. - - * lib/krb5/keytab_file.c (fkt_remove_entry): need to call - krb5_kt_free_entry after each fkt_next_entry_int. From: Wynn - Wilkes - -2005-05-18 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: TESTS += test_keytab - - * lib/krb5/keytab_krb4.c (krb4_kt_remove_entry): plug memory leaks, - avoid crashing on empty keytab - - * lib/krb5/krb5_keytab.3: document behavior of - krb5_kt_remove_entry - - * lib/krb5/keytab_memory.c (mkt_remove_entry): check if there - isn't any entries in the keytab before removing any since that - leads to bad pointer arithmetic and crashing. From: Wynn Wilkes - . Make the function return KRB5_KT_NOTFOUND - if the entry wasn't in the keytab (just like the filebased - keytab). - - * lib/krb5/test_keytab.c: test memory corruption in MEMORY keytab - - * lib/krb5{addr_families,context,creds,free,keyblock, - mit_glue,rd_error}.c:zero out content of all krb5_free_x_content - like functions to make sure data doesnt get reused, idea from - Wynn Wilkes - - * lib/krb5/krb5_get_credentials.3: document KRB5_GC_EXPIRED_OK - - * lib/krb5/krb5.3: add krb5_cc_new_unique - -2005-05-17 Love Hörnquist Åstrand - - * lib/krb5/fcache.c (fcc_get_first): check return value from - malloc, memset the structure, make sure cursor doesn't point to - freed memory on failure. From: Wynn Wilkes - - * lib/krb5/krb5_auth_context.3: document - KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED - - * lib/krb5/get_cred.c: Remove expired credentials, based on - patches and comments from Anders Magnusson and Wynn - Wilkes - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): honor - KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED and create unencrypted - (ENCTYPE_NULL) credentials. for use with old mit server and java based - ones as they can't handle encrypted KRB-CRED. Note that the option - needs to turned on because if the consumer sends the KRB-CRED in - clear bad things will happen. - - * lib/krb5/context.c (krb5_init_context): register krb5_javakt_ops - - * lib/krb5/krb5.h: KRB5_GC_EXPIRED_OK: expired credentials is ok - to return from krb5_get_credentials. - KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED: make forward credentials - be unencrypted, for compatibility with mit kerberos and java - kerberos. krb5_javakt_ops: export - -2005-05-16 Love Hörnquist Åstrand - - * lib/krb5/keytab_file.c: Add new keytab file format JAVA14 that - doesn't the use extended kvnos, as hinted, this is needed for - Java's Kerberos implementation. - -2005-05-10 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: handle pkinit-9, pkinit-19, and pkinit-25 - enckey, still no DH - - * kdc/pkinit.c: handle pkinit-9, pkinit-19, and pkinit-25 enckey, - still no DH - - * kdc/kerberos5.c (as_rep): search for pkinit-9, pkinit-19, and - pkinit-25 pa-data, return empty pkinit pa-data in the - PREAUTH_REQUIRED krb-error - - * doc/ack.texi: add pkinit people - - * lib/krb5/krb5_storage.3: document krb5_storage_is_flags - - * lib/krb5/{krb5_compare_creds.3,krb5_get_init_creds.3, - krb5_krbhst_init.3,krb5_storage.3}: - make more pretty, from Björn Sandell - -2005-05-09 Dave Love - - * doc/setup.texi: Fix and clarify password quality check examples. - -2005-05-09 Love Hörnquist Åstrand - - * lib/krb5/kuserok.c (krb5_kuserok): use POSIX_GETPWNAM_R instead - of HAVE_GETPWNAM_R From: Dave Love - -2005-05-07 Love Hörnquist Åstrand - - * lib/krb5/addr_families.c (krb5_print_address): catch when the - unknown adress don't fit. From Björn Sandell - -2005-05-05 Dave Love - - * configure.in: fix type right test, include for - sys/strtty.h, not sys/ptyvar.h - -2005-05-05 Love Hörnquist Åstrand - - * lib/krb5/krb5.conf.5: spelling - -2005-05-04 Love Hörnquist Åstrand - - * lib/krb5/krb5.conf.5: expand on what "trailing component" means - -2005-05-04 Johan Danielsson - - * lib/krb5/rd_cred.c: put address comparison in separate function - - * lib/krb5/krb5_kuserok.3: check the user's ~/.k5login.d directory - for access files, all of which is handled like the regular - ~/.k5login - - * lib/krb5/kuserok.c: check the user's ~/.k5login.d directory for - access files, all of which is handled like the regular ~/.k5login - -2005-05-03 Love Hörnquist Åstrand - - * doc/ack.texi: Clearify what version of libdes we are using and - who's code in it we are using. - - * kcm/kcm.8: more text about usage - - * kcm/Makefile.am: man_MANS += kcm.8 - - * kcm/kcm.8: initial manpage - - * configure.in: if we have a $srcdir/lib/asn1/pkcs12.asn1, define - PKINIT - -2005-05-02 Dave Love - - * configure.in: sys/tty.h (for sys/ptyvar.h) might need termios.h. - -2005-05-02 Love Hörnquist Åstrand - - * tools/krb5-config.in: add com_err to required libs - - * lib/krb5/pkinit.c (krb5_ui_method_read_string): use the fill in - length - - * lib/krb5/init_creds_pw.c: Now that we fixed the signed-ness of - nonce for windows, remove the code that removed the signed - bit. Instead add comment that they still need to be the same - (Kerberos protocol nonce and pk-init nonce) for Windows. - -2005-05-02 David Love - - * lib/krb5/crypto.c: Don't declare des_salt &c as static with - incomplete type (invalid in c89, at least). - -2005-05-02 Love Hörnquist Åstrand - - * lib/krb5/krb5_locl.h: include - -2005-05-02 David Love - - * kcm/connect.c (init_socket): rename variable sun to un to avoid - namespace collision. - (handle_stream): Cast arg of krb5_warnx. - -2005-04-30 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c: if we are using PKINIT, strip of the - highest bit to make windows PK-INIT happy. Also make the nonces - the same, again for windows, they are using pk-init-9. - - XXX check if it isn't the that nonce is an unsigned variable so - its just a asn1 mismatch. - - * kdc/pkinit.c: pass a NULL prompter data to _krb5_pk_load_openssl_id - - * kuser/kinit.c: krb5_get_init_creds_opt_set_pkinit - - * lib/krb5/pkinit.c: Pass prompter data to the prompter function, - implement a UI prompter function wrapping the kerberos prompter - function so that the the OpenSSL ENGINE can ask for a password - when loading the private key. From: Douglas E. Engert - - * lib/krb5: add in test programs - - * configure.in: sys/ptyvar.h might need - - * lib/krb5/Makefile.am: use LIB_com_err for libkrb5.la - -2005-04-29 Love Hörnquist Åstrand - - * lib/asn1/Makefile.am: use $(LIB_com_err) - -2005-04-28 Love Hörnquist Åstrand - - * lib/krb5/context.c (krb5_set_config_files): ignore permission - denied on configuration files, user might not be allowed to read - /var/heimdal/kdc.conf - -2005-04-26 Dave Love - - * lib/krb5/krb5_locl.h: define _POSIX_PTHREAD_SEMANTICS so we get - posix getpwnam_r - -2005-04-25 Love Hörnquist Åstrand - - * lib/asn1/gen_glue.c: switch the units variable to a - function. gcc-4.1 needs the size of the structure if its defined - as extern struct units foo_units[] an we don't want to include - in the generate headerfile - -2005-04-25 Love Hörnquist Åstrand - - * lib/hdb/hdb.schema: add EQUALITY rule for krb5ValidStart, - krb5ValidEnd, krb5PasswordEnd From Howard Chu - -2005-04-24 Love Hörnquist Åstrand - - * doc/whatis.texi: comment out docbook stuff for now - - * kuser/klist.c: use strlcpy - - * doc/ack.texi: we no longer use eay libdes, make acknowledgment - still be there, but claim that we no longer use it. Mark editline - to be a modified version as required by the license. - - * lib/krb5/pkinit.c: use the unexported oid_to_enctype function - - * lib/krb5/crypto.c: unexport the oid_to_enctype function, not for - external consumers - - * kdc/Makefile.am: always add kaserver - - * lib/krb5/krb5_ccache.3: document krb5_cc_new_unique - - * lib/krb5/cache.c (krb5_cc_new_unique): new function to create a - new credential cache - - * kdc/headers.h: don't include kerberos 4 headers here - - * kdc/hpropd.c: include kerberos 4 headers here - - * kdc/connect.c: add kaserver support independ of having krb4 - support - - * kdc/config.c: add kaserver support unconditionally, make kdc - only fail to start when there are no v4 realm configured and - krb4/kaserver is turned on - - * kdc/kaserver.c: Use the new Kerberos 4 functions in libkrb5 and - so kaserver support is always compiled in (still default disabled) - - * lib/krb5/v4_glue.c: simplify error handling - - * doc/whatis.texi: add docbook version macro of @sub - - * doc/heimdal.texi: change the wrapping around the Top node to - ifnottex, make html generation work - - * lib/krb5/krb5_krbhst_init.3: spelling, from Björn Sandell - - - * lib/krb5/krb5_get_krbhst.3: spelling, from Björn Sandell - - - * lib/krb5/krb5_data.3: spelling, from Björn Sandell - - - * lib/krb5/krb5_aname_to_localname.3: spelling, from Björn Sandell - - - * lib/krb5/krb5_address.3: spelling, from Björn Sandell - - -2005-04-23 Love Hörnquist Åstrand - - * kdc/config.c: Use the new Kerberos 4 functions in libkrb5 and so - kerberos 4 is always compiled in (still default disabled) - - * kdc/kerberos4.c: Use the new Kerberos 4 functions in libkrb5 and - so kerberos 4 is always compiled in (still default disabled) - - * lib/krb5/krb5_locl.h: forward declaration of _krb5_krb_auth_data - - * lib/krb5/convert_creds.c: Move the kerberos v4 replacement - functions to v4_glue.c - - * lib/krb5/v4_glue.c: Implement enough of kerberos 4 protocol to - be a KDC, move the v4 bits over here - - * lib/krb5/krb5-v4compat.h: add more v4 defines - -2005-04-22 Love Hörnquist Åstrand - - * kpasswd/kpasswdd.c: Support multi-realms databases, requires - that all the realms are configured on the KDC in krb5.conf with - [libdefaults]default_realm stanzas. - -2005-04-21 Love Hörnquist Åstrand - - * kdc/kerberos5.c: spell succeeded correctly, From Sean Chittenden - - * lib/krb5/addr_families.c: catch two more snprintf problems - -2005-04-20 Love Hörnquist Åstrand - - * lib/hdb/Makefile.am: this lib include com_err, add -com_err to - CHECK_SYMBOLS - - * appl/test/http_client.c: cast ssize_t to unsigned long, fix - printf format - -2005-04-19 Love Hörnquist Åstrand - - * lib/krb5/kuserok.c: use asprintf to avoid truncating pathnames - - * lib/krb5/get_host_realm.c: check return value of snprintf - - * lib/krb5/test_addr.c: check address truncation - - * lib/krb5/addr_families.c: check return values from snprintf and - clean up semantics of ret_len - - * lib/krb5/krb5_address.3: clarify what ret_len is in - krb5_print_address - - * lib/krb5/test_kuserok.c: add --version and --help - - * lib/krb5/kuserok.c: use getpwnamn_r if it exists - - * lib/krb5/Makefile.am: noinst_PROGRAMS += test_kuserok - - * lib/krb5/test_kuserok.c: test program for krb5_kuserok - -2005-04-18 Love Hörnquist Åstrand - - * lib/krb5/acache.c (acc_resolve): if open_default_ccache failed - with ccErrCCacheNotFound try again with create_default_ccache, - this fixes the problem where the security server apperenly haven't - started yet on Mac OS X - - * lib/krb5/get_default_principal.c - (_krb5_get_default_principal_local): add, for use of functions - that in ccache layer to avoid recursive calls. - - * lib/hdb/hdb-ldap.c: drop , no longer use any of the is* - macros in this file - - * include/make_crypto.c: cast to unsigned char to make sure its - not negative when passing it to is* functions - -2005-04-15 Love Hörnquist Åstrand - - * doc/programming.texi: remove manpage macro, add some more - references to manpages - - * doc/heimdal.texi: define manpage macro - - * doc/setup.texi: document new password policy code - - * kpasswd/kpasswdd.c: add verifier libraries with - kadm5_add_passwd_quality_verifier - - * lib/krb5/krb5_keyblock.3: document krb5_keyblock_init - -2005-04-14 Love Hörnquist Åstrand - - * kdc/kaserver.c: AUTHENTICATE and AUTHENTICATE_V2 is almost the - same, and clients - (klog) can deal with that the kaserver returns the same thing for - both - - * lib/krb5/keyblock.c: Add krb5_keyblock_init to allocate an fill - in a keyblock from key data. - -2005-04-12 Love Hörnquist Åstrand - - * configure.in: rk_WIN32_EXPORT for roken - -2005-04-10 Love Hörnquist Åstrand - - * appl/test/gssapi_server.c: print out client principla of - delegated credential - -2005-04-07 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c (process_pa_data_to_key): also check - for KRB5_PADATA_PK_AS_REP_19, From: Douglas Engert - -2005-04-07 Love Hörnquist Åstrand - - * .cvsignore: ignore more generate files - -2005-04-04 Love Hörnquist Åstrand - - * lib/asn1/check-der.c: use size_t, print size_t by casting to - unsigned long - - * lib/krb5/test_crypto.c: print size_t by casting to unsigned long - - * lib/krb5/acache.c: Argument to create_new_ccache is a principal, - not a credential cache name. Clean up lossage related to this - problem. - - * lib/hdb/Makefile.am: CHECK_SYMBOLS += HDBFlags2int - - * lib/krb5/addr_families.c - (krb5_address_prefixlen_boundary,krb5_free_address): - use find_atype when we are dealing with a kerberos address type - - * lib/krb5/aes-test.c: size_t vs int + fix printf - - * lib/krb5/pkinit.c: Since the decode can't make out the diffrence - between PA-PK-AS-REP-19 and PA-PK-AS-REQ-Win2k, try harder to - verify both cases - -2005-04-03 Love Hörnquist Åstrand - - * appl/test/uu_client.c: print size_t by casting to unsigned long - -2005-04-01 Johan Danielsson - - * kdc/kerberos4.c (do_version4): check client and server max_life - - * kdc/kaserver.c (do_getticket): check client max_life - -2005-03-31 Love - - * lib/krb5/verify_krb5_conf.c: const poison - - * lib/krb5/test_alname.c: const poison - - * lib/asn1/main.c: const poison - - * lib/krb5/test_addr.c: test parse IPv6 RANGE addresses - - * lib/krb5/addr_families.c: implement mask boundary for IPv6 - - * lib/asn1/gen.c: avoid const string warnings steming from - writeable-string - -2005-03-28 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: TESTS += test_addr - - * lib/krb5/test_addr.c: simple test for addresses - - * lib/krb5/addr_families.c: make RANGE parse prefixlen style - addresses too, fix printing of RANGE addresses, add - krb5_address_prefixlen_boundary - - * lib/krb5/krb5_keytab.3: stop memory leak in example, expand on - wildcards - -2005-03-26 Love Hörnquist Åstrand - - * lib/krb5/krb5_principal.3: spelling, from Tomas Olsson - - * lib/krb5/krb5_warn.3: spelling, from Tomas Olsson - -2005-03-19 Love Hörnquist Åstrand - - * lib/krb5/acache.c: add mutex for global variables, clean up - returned error codes, implement storing addresses into the ccapi - - * appl/test/gssapi_server.c: free memory, make error strings match - - * appl/test/gssapi_server.c: use print_gss_name, print server name - too - - * appl/test/gss_common.h (print_gss_name): common code for - printing gss name - - * appl/test/gss_common.c (print_gss_name): common code for - printing gss name - - * appl/test/http_client.c: Make constent with rest of the gssapi - test programs - -2005-03-17 Love Hörnquist Åstrand - - * lib/hdb/keys.c: AES is enabled by default, remove ifdefs - - * lib/krb5/crypto.c: AES is enabled by default, remove ifdefs - - * lib/krb5/aes-test.c: use hex encoder from roken AES is enabled - by default, remove ifdefs - - * kdc/kerberos5.c: AES is enabled by default, remove ifdefs - -2005-03-16 Love Hörnquist Åstrand - - * doc/setup.texi: Add some text about modifying the database - -2005-03-15 Love Hörnquist Åstrand - - * kuser/kinit.c: widen lifetime/renewal warning text field, also - make use of unparse_time_approx, no need to be specific to the - second when ticket needs to be renewed or their lifetime. - - * doc/heimdal.texi: copyright maintenance, drop eay, use updated - UCB license - - * lib/krb5/crypto.c: more static and unsigned issues - - * lib/krb5/crypto.c: fix signedness issues, prompted by report of - Magnus Ahltorp - -2005-03-13 Love Hörnquist Åstrand - - * lib/krb5/krb5_keytab.3: more text about how to free returned - resources - -2005-03-10 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: handle the -25 generation path - - * lib/krb5/pkinit.c: use KRB5_PADATA_PK_AS_REQ_19 - - * lib/krb5/pkinit.c: fold in pk-init-25 asn1 changes - -2005-03-09 Love Hörnquist Åstrand - - * kdc/pkinit.c: use generated oid's - - * lib/krb5/pkinit.c: use generated oid's - -2005-03-08 Love Hörnquist Åstrand - - * kdc/pkinit.c: update to the asn1 structures used in -25's - - * lib/krb5/pkinit.c: update to the asn1 structures used in -25's - -2005-03-04 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: use the newly written hex function from - roken and remove the old implementation - -2005-03-01 Love Hörnquist Åstrand - - * appl/test/http_client.c: allow specifing port to connect to - -2005-02-24 Love Hörnquist Åstrand - - * lib/krb5/Makefile.am: bump version to 21:0:4 - - * lib/hdb/Makefile.am: bump version to 8:0:1 - - * lib/asn1/Makefile.am: bump version to 7:0:1 - -2005-02-23 Love Hörnquist Åstrand - - * lib/krb5/crypto.c (DES_string_to_key_int): must check for weak - keys after doing the DES_cbc_cksum - -2005-02-19 Luke Howard - - * lib/krb5/krbhst.c: set KD_CONFIG after calling - config_get_hosts() in kpasswd_get_next() - From: Wynn Wilkes - -2005-02-15 Love Hörnquist Åstrand - - * lib/hdb/db3.c (DB_open): correct the check for O_RDONLY - From: Chaskiel M Grundman - -2005-02-09 Love Hörnquist Åstrand - - * lib/krb5/crypto.c (krb5_random_to_key): cast size_t to int to - make %d work - -2005-02-08 Love Hörnquist Åstrand - - * lib/krb5/keytab.c (krb5_kt_get_entry): tell what enctype the - caller requested to provide the user with a glue what the caller - was asking for. - -2005-02-05 Luke Howard - - * lib/krb5/kcm.c: add _krb5_kcm_is_running, _krb5_kcm_noop - - * kcm/acquire.c: don't leak salt if keyproc called multiple - times - - * kcm/config.c: allow KCM system ccache to be configured from - krb5.conf, in the system_ccache stanza of [kcm] - -2005-02-03 Love Hörnquist Åstrand - - * kcm/protocol.c: use -1 as the invalid pid number - - * kcm/connect.c: support SCM_CREDS (for NetBSD) - - * kcm/Makefile.am: LDADD += LIB_pidfile - - * kcm/connect.c: make it possible to build on systems without - SO_PEERCRED (still doesn't work) - - * kcm/config.c: cast argument to isdigit to unsigned char - - * lib/krb5/krb5.conf.5: document large_msg_size - - * lib/krb5/context.c (init_context_from_config_file): init - large_msg_size to 6000 - - * lib/krb5/krb5.h (krb5_context_data): add large_msg_size, - threshold where we start to use transport protocols without tiny - max data transport sizes. - - * lib/krb5/kcm.h: drop prototypes, they all live in krb5-private.h - by now - -2005-02-02 Luke Howard - - * configure.in: generate kcm/Makefile - - * Makefile.am: recurse into kcm/ if KCM defined - - * kcm: add KCM daemon - -2005-02-02 Love Hörnquist Åstrand - - * lib/krb5/send_to_kdc.c (send_and_recv_udp): make private again - - * lib/krb5/kcm.c: use AF_UNIX like the rest of the codebase, add - some more error strings - -2005-02-02 Luke Howard - - * configure.in: add --enable-kcm option for Kerberos - Credentials Manager (KCM) - - * lib/krb5/Makefile.am: add kcm.c - - * lib/krb5/cache.c: use cc_retrieve_cred if present rather - than enumerating ccache - - * lib/krb5/context.c: register KCM cc_ops - - * lib/krb5/get_cred.c: pass all options to cc_retrieve_cred - - * lib/krb5/init_creds_pw.c: add krb5_get_init_creds_keyblock - - * lib/krb5/kcm.[ch]: add initial implementation of KCM - client library - - * lib/krb5/krb5.h: fix cc_retrieve prototype, add KCM cc_ops - - * lib/krb5/send_to_kdc.c: add _krb5_send_and_recv_tcp - - * lib/krb5/store.c: add krb5_store_creds_tag, krb5_ret_creds_tag - -2005-01-24 Luke Howard - - * lib/krb5/init_creds_pw.c: allow NULL in_options to be passed - krb5_get_init_creds_password() - - * kdc/kerberos5.c: don't crash when logging no server etype - support if client == NULL - -2005-01-17 Love Hörnquist Åstrand - - * kdc/kstash.c: s/random_key/random_key_flag/, From Dave Love - - -2005-01-12 Love Hörnquist Åstrand - - * doc/apps.texi: Texinfo fixes. Text about irix 6.5 using - PAM. From: Dave Love - -2005-01-08 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.c: cast argument to isdigit to - unsigned char - - * lib/krb5/keytab_keyfile.c: cast argument to toupper to unsigned - char - - * lib/asn1/hash.c (hashcaseadd): cast argument to toupper to - unsigned char - - * appl/kf/kfd.c (kfd_match_version): cast argument to islower to - unsigned char - - * lib/krb5/krb5.3: drop krb5_{checksum,enctype}_is_disabled - - * lib/krb5/krb5_encrypt.3: drop krb5_enctype_is_disabled, more - text about krb5_enctype_valid - - * lib/krb5/krb5_create_checksum.3: drop - krb5_checksum_is_disabled - - * lib/krb5/crypto.c: drop krb5_{checksum,enctype}_isdisabled - - * lib/krb5/context.c: krb5_enctype_is_disabled is the same thing - as krb5_enctype_valid, so use the later since its older and the - api doesn't really need another entry point - - * lib/krb5/rd_req.c: krb5_enctype_is_disabled is the same thing as - krb5_enctype_valid, so use the later since its older and the api - doesn't really need another entry point - - * kdc/kerberos5.c: krb5_enctype_is_disabled is the same thing as - krb5_enctype_valid, so use the later since its older and the api - doesn't really need another entry point - -2005-01-05 Love Hörnquist Åstrand - - * kpasswd/kpasswdd.8: document --addresses, controls what - addresses kpasswd should listen too - - * kpasswd/kpasswdd.c: add --addresses, controls what addresses - kpasswd should listen too - - * lib/krb5/addr_families.c (krb5_parse_address): filter out dup - addresses from getaddrinfo - - * kpasswd/kpasswd.1: document -c - - * kpasswd/kpasswd.c: allow specifying a credential cache to use - for the admin principal - - * include/bits.c: constify to avoid warning with -Wwrite-string - - * NEWS: add 0.6.2 and 0.6.3 items - - * lib/krb5/krb5_keyblock.3: document krb5_generate_subkey_extended - - * lib/krb5/krb5_is_thread_safe.3: document function - - * lib/krb5/Makefile.am (man_MANS) += krb5_is_thread_safe.3 - - * lib/krb5/context.c (krb5_is_thread_safe): return TRUE is the - library was compiled with multithreading support. If not, - application must global lock the library, it it uses threads that - call kerberos functions at the same time. - -2005-01-05 Luke Howard - - * lib/krb5/auth_context.c: use krb5_generate_subkey_extended() - - * lib/krb5/appdefault.c: remove redundant KRB5_LIB_FUNCTION - - * lib/krb5/build_auth.c: support for enctype negotiation - (client sends EtypeList in Authenticator authz data) - - * lib/krb5/context.c: mutex should be destroyed last in - krb5_free_context() - - * lib/krb5/generate_subkey.c: add krb5_generate_subkey_extended(), - set *subkey to NULL if key geneartion fails - - * lib/krb5/krb5.h: add KRB5_KU_PA_SERVER_REFERRAL_DATA - - * lib/krb5/mk_req_ext.c: support ETYPE_ARCFOUR_HMAC_MD5_56 - - * lib/krb5/rd_req.c: support for enctype negotiation - (client sends EtypeList in Authenticator authz data) - -2005-01-04 Luke Howard - - * lib/asn1/k5.asn1: add authorization data types for enctype - negotiation implementation - -2005-01-04 Love Hörnquist Åstrand - - * lib/krb5/changepw.c (change_password_loop): on failing to find a - kdc, set result_code to KRB5_KPASSWD_HARDERROR - -2005-01-01 Love Hörnquist Åstrand - - * doc/heimdal.texi: Happy New Year - diff --git a/kerberosV/src/ChangeLog.2006 b/kerberosV/src/ChangeLog.2006 deleted file mode 100644 index d48ea8aba65..00000000000 --- a/kerberosV/src/ChangeLog.2006 +++ /dev/null @@ -1,2047 +0,0 @@ -2006-12-28 Love Hörnquist Åstrand - - * kdc/process.c: Handle kx509 requests. - - * kdc/connect.c: Listen to 9878 if kca is turned on. - - * kdc/headers.h: Include . - - * kdc/config.c: code to parse [kdc]enable-kx509 - - * kdc/kdc.h: add enable_kx509 - - * kdc/Makefile.am: add kx509.c - - * kdc/kx509.c: Kx509server (external certificate genration). - - * lib/krb5/ticket.c: add krb5_ticket_get_endtime - - * lib/krb5/krb5_ticket.3: Document krb5_ticket_get_endtime - - * kdc/digest.c: Remove , its already included in - headers.h - - * kdc/digest.c: Return session key for the NTLMv2 case too - - * lib/krb5/digest.c (krb5_ntlm_rep_get_sessionkey): return value - is krb5_error_code - -2006-12-27 Love Hörnquist Åstrand - - * lib/krb5/mk_req_ext.c (_krb5_mk_req_internal): use md5 for - des-cbc-md4 and des-cbc-md5. This is for (older) windows that - will be unhappy anything else. From Inna Bort-Shatsky - -2006-12-26 Love Hörnquist Åstrand - - * kdc/digest.c: Prefix internal symbol with _kdc_. - - * kdc/kdc.h: add digests_allowed - - * kdc/digest.c: return NTLM2 targetinfo structure. - - * lib/krb5/digest.c: Add krb5_ntlm_init_get_targetinfo. - - * kdc/config.c: Parse digest acl's - - * kdc/kdc_locl.h: forward decl; - - * kdc/digest.c: Add digest acl's - -2006-12-22 Love Hörnquist Åstrand - - * fix-export: build ntlm-private.h - -2006-12-20 Love Hörnquist Åstrand - - * include/make_crypto.c: Include <.../hmac.h>. - - * kdc/digest.c: reorder to show slot here ntlmv2 code will be - placed. - - * kdc/digest.c: Announce that we support key exchange and add bits - to detect when it wasn't used. - - * kdc/digest.c: Add support for generating NTLM2 session security - answer. - -2006-12-19 Love Hörnquist Åstrand - - * lib/krb5/digest.c: Add sessionkey accessor functions. - -2006-12-18 Love Hörnquist Åstrand - - * kdc/digest.c: Unwrap the NTLM session key and return it to the - server. - -2006-12-17 Love Hörnquist Åstrand - - * lib/krb5/store.c (krb5_ret_principal): Fix a bug in the malloc - failure part, noticed by Arnaud Lacombe in NetBSD coverity scan. - -2006-12-15 Love Hörnquist Åstrand - - * lib/krb5/fcache.c (fcc_get_cache_next): avoid const warning. - - * kdc/digest.c: Support NTLM verification, note that the KDC does - no NTLM packet parsing, its all done by the client side, the KDC - just calculate and verify the digest and return the result to the - service. - - * kuser/kdigest.c: add ntlm-server-init - - * kuser/Makefile.am: kdigest depends on libheimntlm.la - - * kdc/headers.h: Include . - - * kdc/Makefile.am: libkdc needs libheimntlm.la - - * autogen.sh: just run autoreconf -i -f - - * lib/Makefile.am: hook in ntlm - - * configure.in (AC_CONFIG_FILES): add lib/ntlm/Makefile - - * lib/krb5/digest.c: API to authenticate ntlm requests. - - * lib/krb5/fcache.c: Support "iteration" of file credential caches - by giving the user back the default file credential cache and only - that. - - * lib/krb5/krb5_locl.h: Expand the default root for some of the cc - type names. - -2006-12-14 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c (free_paid): free the krb5_data - structure too. Bug report from Stefan Metzmacher. - -2006-12-12 Love Hörnquist Åstrand - - * kuser/kinit.c: Read the appdefault configration before we try to - use the flags. Bug reported by Ingemar Nilsson. - - * kuser/kdigest.c: prefix digest commands with digest_ - - * kuser/kdigest-commands.in: prefix digest commands with digest- - -2006-12-10 Love Hörnquist Åstrand - - * kdc/hprop.c: Return error codes on failure, improve error - reporting. - -2006-12-08 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: sprinkle more _krb5_pk_copy_error - - * lib/krb5/pkinit.c: Copy more hx509 error strings to krb5 error - strings - -2006-12-07 Love Hörnquist Åstrand - - * include/Makefile.am: CLEANFILES += vis.h - -2006-12-06 Love Hörnquist Åstrand - - * kdc/kerberos5.c (_kdc_as_rep): add AD-INITAL-VERIFIED-CAS to the - encrypted ticket - - * kdc/pkinit.c (_kdc_add_inital_verified_cas): new function, adds - an empty (for now) AD_INITIAL_VERIFIED_CAS to tell the clients - that we vouches for the CA. - - * kdc/kerberos5.c (_kdc_tkt_add_if_relevant_ad): new function. - - * lib/Makefile.am: Make the directories test automake conditional - so automake can include directories in make dist step. - - * kdc/pkinit.c (_kdc_pk_rd_padata): leak less memory for - ExternalPrincipalIdentifiers - - * kdc/pkinit.c: Parse and use PA-PK-AS-REQ.trustedCertifiers - - * kdc/pkinit.c: Add comment that the anchors in the signed data - really should be the trust anchors of the client. - - * kuser/generate-requests.c: Use strcspn to remove \n from - string returned by fgets. From Björn Sandell - - * kpasswd/kpasswd-generator.c: Use strcspn to remove \n from - string returned by fgets. From Björn Sandell - -2006-12-05 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: Clear errno before calling the strtol - functions. From Paul Stoeber to OpenBSD by Ray Lai and Björn - Sandell. - - * lib/krb5/config_file.c: Use strcspn to remove \n from fgets - result. Prompted by change by Ray Lai of OpenBSD via Björn - Sandell. - - * kdc/string2key.c: Use strcspn to remove \n from fgets - result. Prompted by change by Ray Lai of OpenBSD via Björn - Sandell. - -2006-11-30 Love Hörnquist Åstrand - - * lib/krb5/krbhst.c (plugin_get_hosts): be more paranoid and pass - in a NULLed plugin list - -2006-11-29 Love Hörnquist Åstrand - - * lib/krb5/verify_krb5_conf.c: add more pkinit options. - - * lib/krb5/pkinit.c: Store what PK-INIT type we used to know reply - to expect, this avoids overwriting the real PK-INIT error from - just a failed requeat with a Windows PK-INIT error (that always - failes). - - * kdc/Makefile.am: Add LIB_pkinit to pacify AIX - - * lib/hdb/Makefile.am: Add LIB_com_err to pacify AIX - -2006-11-28 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: Make build again from the hdb_entry - wrapping. Patch from Andreas Hasenack. - - * kdc/pkinit.c: Need better code in the DH parameter rejection - case, add comment to that effect. - -2006-11-27 Love Hörnquist Åstrand - - * kdc/krb5tgs.c: Reply KRB5KRB_ERR_RESPONSE_TOO_BIG for too large - packets when using datagram based transports. - - * kdc/process.c: Pass down datagram_reply to _kdc_tgs_rep. - - * lib/krb5/pkinit.c (build_auth_pack): set supportedCMSTypes. - -2006-11-26 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Pass down hx509_peer_info. - - * kdc/pkinit.c (_kdc_pk_rd_padata): Pick up supportedCMSTypes and - pass in into hx509_cms_create_signed_1 via hx509_peer_info blob. - - * kdc/pkinit.c (_kdc_pk_rd_padata): Pick up supportedCMSTypes and - pass in into hx509_cms_create_signed_1 via hx509_peer_info blob. - -2006-11-24 Love Hörnquist Åstrand - - * lib/krb5/send_to_kdc.c: Set the large_msg_size to 1400, lets not - fragment packets and avoid stupid linklayers that doesn't allow - fragmented packets (unix dgram sockets on Mac OS X) - -2006-11-23 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (_krb5_pk_create_sign): stuff down the users - certs in the pool to make sure a path is returned, without this - proxy certificates wont work. - -2006-11-21 Love Hörnquist Åstrand - - * kdc/config.c: Make all pkinit options prefixed with pkinit_ - - * lib/krb5/log.c (krb5_get_warn_dest): return warn_dest from - krb5_context - - * lib/krb5/krb5_warn.3: document krb5_[gs]et_warn_dest - - * lib/krb5/krb5.h: Drop KRB5_KU_TGS_IMPERSONATE. - - * kdc/krb5tgs.c: Use KRB5_KU_OTHER_CKSUM for the impersonate - checksum. - - * lib/krb5/get_cred.c: Use KRB5_KU_OTHER_CKSUM for the impersonate - checksum. - -2006-11-20 Love Hörnquist Åstrand - - * lib/krb5/verify_user.c: Make krb5_get_init_creds_opt_free take a - context argument. - - * lib/krb5/krb5_get_init_creds.3: Make - krb5_get_init_creds_opt_free take a context argument. - - * lib/krb5/init_creds_pw.c: Make krb5_get_init_creds_opt_free take - a context argument. - - * kuser/kinit.c: Make krb5_get_init_creds_opt_free take a context - argument. - - * kpasswd/kpasswd.c: Make krb5_get_init_creds_opt_free take a - context argument. - - * kpasswd/kpasswd-generator.c: Make krb5_get_init_creds_opt_free - take a context argument. - - * kdc/hprop.c: Make krb5_get_init_creds_opt_free take a context - argument. - - * lib/krb5/init_creds.c: Make krb5_get_init_creds_opt_free take a - context argument. - - * appl/gssmask/gssmask.c: Make krb5_get_init_creds_opt_free take a - context argument. - -2006-11-19 Love Hörnquist Åstrand - - * doc/setup.texi: fix pkinit option (s/-/_/) - - * kdc/config.c: revert the enable-pkinit change, and make it - consistant with all other other enable- options - -2006-11-17 Love Hörnquist Åstrand - - * doc/setup.texi: Make all pkinit options prefixed with pkinit_ - - * kdc/config.c: Make all pkinit options prefixed with pkinit_ - - * kdc/pkinit.c: Make app pkinit options prefixed with pkinit_ - - * lib/krb5/pkinit.c: Make app pkinit options prefixed with pkinit_ - - * lib/krb5/mit_glue.c (krb5_c_keylengths): make compile again. - - * lib/krb5/mit_glue.c (krb5_c_keylengths): rename. - - * lib/krb5/mit_glue.c (krb5_c_keylength): mit changed the api, - deal. - -2006-11-13 Love Hörnquist Åstrand - - * lib/krb5/pac.c (fill_zeros): stop using MIN. - - * kuser/kinit.c: Forward decl - - * lib/krb5/test_plugin.c: Use NOTHERE.H5L.SE. - - * lib/krb5/krbhst.c: Fill in hints for picky getaddrinfo()s. - - * lib/krb5/test_plugin.c: Set sin_len if it exists. - - * lib/krb5/krbhst.c: Use plugin for the other realm locate types - too. - -2006-11-12 Love Hörnquist Åstrand - - * lib/krb5/krb5_locl.h: Add plugin api - - * lib/krb5/Makefile.am: Add plugin api. - - * lib/krb5/krbhst.c: Use the resolve plugin interface. - - * lib/krb5/locate_plugin.h: Add plugin interface for resolving - that is API compatible with MITs version. - - * lib/krb5/plugin.c: Add first version of the plugin interface. - - * lib/krb5/test_pac.c: Test signing. - - * lib/krb5/pac.c: Add code to sign PACs, only arcfour for now. - - * lib/krb5/krb5.h: Add struct krb5_pac. - -2006-11-09 Love Hörnquist Åstrand - - * lib/krb5/test_pac.c: PAC testing. - - * lib/krb5/pac.c: Sprinkle error strings. - - * lib/krb5/pac.c: Verify LOGON_NAME. - - * kdc/pkinit.c (_kdc_pk_check_client): drop client_princ as an - argument - - * kdc/kerberos5.c (_kdc_as_rep): drop client_princ from - _kdc_pk_check_client since its not valid in canonicalize case - - * lib/krb5/krb5_c_make_checksum.3: Document krb5_c_keylength. - - * lib/krb5/mit_glue.c: Add krb5_c_keylength. - -2006-11-08 Love Hörnquist Åstrand - - * lib/krb5/pac.c: Almost enough code to do PAC parsing and - verification, missing in the unix2NTTIME and ucs2 corner. The - later will be adressed by finally adding libwind. - - * lib/krb5/krb5_init_context.3: document krb5_[gs]et_max_time_skew - - * kdc/hpropd.c: Remove support dumping to a kerberos 4 database. - -2006-11-07 Love Hörnquist Åstrand - - * lib/krb5/context.c: rename krb5_[gs]et_time_wrap to - krb5_[gs]et_max_time_skew - - * kdc/pkinit.c: Catch error string from hx509_cms_verify_signed. - Check for id-pKKdcEkuOID and warn if its not there. - - * lib/krb5/rd_req.c: Add more krb5_rd_req_out_get functions. - -2006-11-06 Love Hörnquist Åstrand - - * lib/krb5/krb5.h: krb5_rd_req{,_in,_out}_ctx. - - * lib/krb5/rd_req.c (krb5_rd_req_ctx): Add context all singing-all - dancing version of the krb5_rd_req and implement krb5_rd_req and - krb5_rd_req_with_keyblock using it. - -2006-11-04 Love Hörnquist Åstrand - - * kdc/kerberos5.c (_kdc_as_rep): More verbose time skew logging. - -2006-11-03 Love Hörnquist Åstrand - - * lib/krb5/expand_hostname.c: Rename various routines and - constants from canonize to canonicalize. From Andrew Bartlett - - * lib/krb5/context.c: Add krb5_[gs]et_time_wrap - - * lib/krb5/krb5_locl.h: Rename various routines and constants from - canonize to canonicalize. From Andrew Bartlett - - * appl/gssmask/common.c (add_list): fix alloc statement. - From Alex Deiter - -2006-10-25 Love Hörnquist Åstrand - - * include/Makefile.am: Move version.h and version.h.in to - DISTCLEANFILES. - -2006-10-24 Love Hörnquist Åstrand - - * appl/gssmask/gssmask.c: Only log when there are resources left. - - * appl/gssmask/gssmask.c: make compile - - * appl/gssmask/gssmask.c (AcquireCreds): free - krb5_get_init_creds_opt - -2006-10-23 Love Hörnquist Åstrand - - * configure.in: heimdal 0.8-RC1 - -2006-10-22 Love Hörnquist Åstrand - - * lib/krb5/digest.c: Try to not leak memory. - - * kdc/digest.c: Try to not leak memory. - - * Makefile.am: remove valgrind target, it doesn't belong here. - - * kuser/kinit.c: Try to not leak memory. - - * kuser/kgetcred.c: Try to not leak memory. - - * kdc/krb5tgs.c (check_KRB5SignedPath): free KRB5SignedPath on - successful completion too, not just the error cases. - - * fix-export: Make make fix-export less verbose. - - * kuser/kgetcred.c: Try to not leak memory. - - * lib/hdb/keys.c (hdb_generate_key_set): free list of enctype when - done. - - * lib/krb5/crypto.c: Allocate the memory we later use. - - * lib/krb5/test_princ.c: Try to not leak memory. - - * lib/krb5/test_crypto_wrapping.c: Try to not leak memory. - - * lib/krb5/test_cc.c: Try to not leak memory. - - * lib/krb5/addr_families.c (arange_free): Try to not leak memory. - - * lib/krb5/crypto.c (AES_string_to_key): Try to not leak memory. - -2006-10-21 Love Hörnquist Åstrand - - * tools/heimdal-build.sh: Add --test-environment - - * tools/heimdal-build.sh: Add --ccache-dir - - * lib/hdb/Makefile.am: remove dependency on et files covert_db - that now is removed - -2006-10-20 Love Hörnquist Åstrand - - * include/Makefile.am: add gssapi to subdirs - - * lib/hdb/hdb-ldap.c: Make compile. - - * configure.in: add include/gssapi/Makefile. - - * include/Makefile.am: clean more files - - * include/make_crypto.c: Avoid creating a file called --version. - - * include/bits.c: Avoid creating a file called --version. - - * appl/test/Makefile.am: add nt_gss_common.h - - * doc/Makefile.am: Disable TEXI2DVI for now. - - * tools/Makefile.am: more files - - * lib/krb5/context.c (krb5_free_context): free send_to_kdc context - - * doc/heimdal.texi: Put Heimdal in the dircategory Security. - - * lib/krb5/send_to_kdc.c: Add sent_to_kdc hook, from Andrew - Bartlet. - - * lib/krb5/krb5_locl.h: Add send_to_kdc hook. - - * lib/krb5/krb5.h: Add krb5_send_to_kdc_func prototype. - - * kcm/Makefile.am: more files - - * kdc/Makefile.am: more files - - * lib/hdb/Makefile.am: more files - - * lib/krb5/Makefile.am: add more files - -2006-10-19 Love Hörnquist Åstrand - - * tools/Makefile.am: Add heimdal-build.sh to EXTRA_DIST. - - * configure.in: Don't check for timegm, libroken provides it for - us. - - * lib/krb5/acache.c: Does function typecasts instead of void * - type-casts. - - * lib/krb5/krb5.h: Remove bonus , that Love sneeked in. - - * configure.in: make --disable-pk-init help text also negative - -2006-10-18 Love Hörnquist Åstrand - - * kuser/kgetcred.c: Avoid memory leak. - - * tools/heimdal-build.sh: Add more verbose logging, add version of - script and heimdal to the mail. - - * lib/hdb/db3.c: Wrap function call pointer calls in (*func) to - avoid macros rewriting open and close. - - * lib/krb5/Makefile.am: Add test_princ. - - * lib/krb5/principal.c: More error strings, handle realm-less - printing. - - * lib/krb5/test_princ.c: Test principal parsing and unparsing. - -2006-10-17 Love Hörnquist Åstrand - - * lib/krb5/get_host_realm.c (krb5_get_host_realm): make sure we - don't recurse - - * lib/krb5/get_host_realm.c (krb5_get_host_realm): no components - -> no dns. no mapping, try local realm and hope KDC knows better. - - * lib/krb5/krb5.h: Add flags for krb5_unparse_name_flags - - * lib/krb5/krb5_principal.3: Document - krb5_unparse_name{_fixed,}_flags. - - * lib/krb5/principal.c: Add krb5_unparse_name_flags and - krb5_unparse_name_fixed_flags. - - * lib/krb5/krb5_principal.3: Document krb5_parse_name_flags. - - * lib/krb5/principal.c: Add krb5_parse_name_flags. - - * lib/krb5/principal.c: Add krb5_parse_name_flags. - - * lib/krb5/krb5.h: Add krb5_parse_name_flags flags. - - * lib/krb5/krb5_locl.h: Hide krb5_context_data from public - exposure. - - * lib/krb5/krb5.h: Hide krb5_context_data from public exposure. - - * kuser/klist.c: Use krb5_get_kdc_sec_offset. - - * lib/krb5/context.c: Document krb5_get_kdc_sec_offset() - - * lib/krb5/krb5_init_context.3: Add krb5_get_kdc_sec_offset() - - * lib/krb5/krb5_init_context.3: Add krb5_set_dns_canonize_hostname - and krb5_get_dns_canonize_hostname - - * lib/krb5/verify_krb5_conf.c: - add [libdefaults]dns_canonize_hostname - - * lib/krb5/expand_hostname.c: use dns_canonize_hostname to - determin if we should talk to dns to find the canonical name of - the host. - - * lib/krb5/krb5.h (krb5_context): add dns_canonize_hostname. - - * tools/heimdal-build.sh: Set status. - - * appl/gssmask/gssmask.c: handle more bits - - * kdc/kerberos5.c: Prefix asn1 primitives with der_. - -2006-10-16 Love Hörnquist Åstrand - - * fix-export: Build lib/asn1/der-protos.h. - -2006-10-14 Love Hörnquist Åstrand - - * appl/gssmask/Makefile.am: Add explit depenency on libroken. - - * kdc/krb5tgs.c: Prefix der primitives with der_. - - * kdc/pkinit.c: Prefix der primitives with der_. - - * lib/hdb/ext.c: Prefix der primitives with der_. - - * lib/hdb/ext.c: Prefix der primitives with der_. - - * lib/krb5/crypto.c: Remove workaround from when there wasn't - always aes. - - * lib/krb5/ticket.c: Prefix der primitives with der_. - - * lib/krb5/digest.c: Prefix der primitives with der_. - - * lib/krb5/crypto.c: Prefix der primitives with der_. - - * lib/krb5/data.c: Prefix der primitives with der_. - -2006-10-12 Love Hörnquist Åstrand - - * kdc/pkinit.c (pk_mk_pa_reply_enckey): add missing break. From - Olga Kornievskaia. - - * kdc/kdc.8: document max-kdc-datagram-reply-length - - * include/bits.c: Include Xint64 types. - -2006-10-10 Love Hörnquist Åstrand - - * tools/heimdal-build.sh: Add socketwrapper and cputime limit. - - * kdc/connect.c (loop): Log that the kdc have started. - -2006-10-09 Love Hörnquist Åstrand - - * kdc/connect.c (do_request): tell krb5_kdc_process_request if its - a datagram reply or not - - * kdc/kerberos5.c: Reply KRB5KRB_ERR_RESPONSE_TOO_BIG error if its - a datagram reply and the datagram reply length limit is reached. - - * kdc/process.c: Rename krb5_kdc_process_generic_request to - krb5_kdc_process_request Add datagram_reply argument. - - * kdc/config.c: check for [kdc]max-kdc-datagram-reply-length - - * kdc/kdc.h (krb5_kdc_config): Add max_datagram_reply_length. - - * lib/hdb/keytab.c: Change || to |, From metze. - - * lib/hdb/keytab.c: Add back :file to sample format. - - * lib/hdb/keytab.c: Add more HDB_F flags to hdb_fetch. Pointed out - by Andrew Bartlet. - - * kdc/krb5tgs.c (tgs_parse_request): set cusec, not csec from - auth->cusec. - -2006-10-08 Love Hörnquist Åstrand - - * fix-export: dist_-ify libkadm5clnt_la_SOURCES too - - * doc/heimdal.texi: Update (c) years. - - * appl/gssmask/protocol.h: Clarify protocol. - - * kdc/hpropd.c: Adapt to signature change of - _krb5_principalname2krb5_principal. - - * kdc/kerberos4.c: Adapt to signature change of - _krb5_principalname2krb5_principal. - - * kdc/connect.c (handle_vanilla_tcp): shorten length when we - shorten the buffer, this matter im the PK-INIT encKey case where a - checksum is done over the whole packet. Reported by Olga - Kornievskaia - -2006-10-07 Love Hörnquist Åstrand - - * include/Makefile.am: crypto-headers.h is a nodist header - - * lib/krb5/aes-test.c: Make argument to PKCS5_PBKDF2_HMAC_SHA1 - unsigned char to make OpenSSL happy. - - * appl/kf/Makefile.am: Add man_MANS to EXTRA_DIST - - * kuser/Makefile.am: split build files into dist_ and noinst_ - SOURCES - - * lib/hdb/Makefile.am: split build files into dist_ and noinst_ - SOURCES - - * lib/krb5/Makefile.am: split build files into dist_ and noinst_ - SOURCES - - * kdc/kerberos5.c: Adapt to signature change of - _krb5_principalname2krb5_principal. - -2006-10-06 Love Hörnquist Åstrand - - * lib/krb5/krbhst.c (common_init): don't try DNS when there is - realm w/o a dot. - - * kdc/524.c: Adapt to signature change of - _krb5_principalname2krb5_principal. - - * kdc/krb5tgs.c: Adapt to signature change of - _krb5_principalname2krb5_principal. - - * lib/krb5/get_in_tkt.c: Adapt to signature change of - _krb5_principalname2krb5_principal. - - * lib/krb5/rd_cred.c: Adapt to signature change of - _krb5_principalname2krb5_principal. - - * lib/krb5/rd_req.c: Adapt to signature change of - _krb5_principalname2krb5_principal. - - * lib/krb5/asn1_glue.c (_krb5_principalname2krb5_principal): add - krb5_context to signature. - - * kdc/524.c (_krb5_principalname2krb5_principal): adapt to - signature change - - * lib/hdb/keytab.c (hdb_get_entry): close and destroy the database - later, the hdb_entry_ex might still contain links to the database - that it expects to use. - - * kdc/digest.c: Make digest argument o MD5_final unsigned char to - help OpenSSL. - - * kuser/kdigest.c: Make digest argument o MD5_final unsigned char - to help OpenSSL. - - * appl/gssmask/common.h: Maybe include . - -2006-10-05 Love Hörnquist Åstrand - - * appl/gssmask/common.h: disable ENABLE_PTHREAD_SUPPORT and - explain why - - * tools/heimdal-build.sh: Another mail header. - - * tools/heimdal-build.sh: small fixes - - * fix-export: More liberal parsing of AC_INIT - - * tools/heimdal-build.sh: first cut - -2006-10-04 Love Hörnquist Åstrand - - * configure.in: Call AB_INIT. - - * kuser/kinit.c: Add flag --pk-use-enckey. - - * kdc/pkinit.c: Sign the request in the encKey case. Bug reported - by Olga Kornievskaia of Umich. - - * lib/krb5/Makefile.am: man_MANS += krb5_digest.3 - - * lib/krb5/krb5_digest.3: Add all protos - -2006-10-03 Love Hörnquist Åstrand - - * lib/krb5/krb5_digest.3: Basic krb5_digest manpage. - -2006-10-02 Love Hörnquist Åstrand - - * fix-export: build gssapi mech private files - - * lib/krb5/init_creds_pw.c: minimize layering and remove - krb5_kdc_flags - - * lib/krb5/get_in_tkt.c: Always use the kdc_flags in the right bit - order. - - * lib/krb5/init_creds_pw.c: Always use the kdc_flags in the right - bit order. - - * kuser/kdigest.c: Don't require --kerberos-realm. - - * lib/krb5/digest.c (digest_request): if NULL is passed in as - realm, use default realm. - - * fix-export: build gssapi mech private files - -2006-09-26 Love Hörnquist Åstrand - - * appl/gssmask/gssmaestro.c: Handle FIRST_CALL in the context - building, better error handling. - - * appl/gssmask/gssmaestro.c: switch from wrap/unwrap to - encrypt/decrypt - - * appl/gssmask/gssmask.c: Don't announce spn if there is none. - - * appl/gssmask/gssmaestro.c: Check that the pre-wrapped data is - the same as afterward. - -2006-09-25 Love Hörnquist Åstrand - - * appl/gssmask/gssmaestro.c: Remove stray GSS_C_DCE_STYLE. - - * appl/gssmask/gssmaestro.c: Add logsocket support. - -2006-09-22 Love Hörnquist Åstrand - - * appl/gssmask/gssmaestro.c (build_context): print the step the - context exchange. - -2006-09-21 Love Hörnquist Åstrand - - * appl/gssmask/gssmaestro.c: Add GSS_C_INTEG_FLAG|GSS_C_CONF_FLAG - to all context flags - - * appl/gssmask/gssmaestro.c: Add wrap and mic tests for all - elements - - * appl/gssmask/gssmask.c: Add mic tests - - * appl/gssmask/gssmaestro.c: dont exit early then when context - is half built. - - * lib/krb5/rd_req.c: disable ETypeList parsing usage for now, cfx - seems broken and its not good to upgrade to a broken enctype. - -2006-09-20 Love Hörnquist Åstrand - - * appl/gssmask/gssmask.c: Add wrap/unwrap ops - - * appl/gssmask/protocol.h: Add eGetVersionAndCapabilities flags - - * appl/gssmask/common.c: Add permutate_all (and support - functions). - - * appl/gssmask/common.h: Add permutate_all - - * appl/gssmask/gssmask.c: use new flags, return moniker - - * appl/gssmask/gssmaestro.c: test self context building and all - permutation of clients - -2006-09-19 Love Hörnquist Åstrand - - * appl/gssmask/gssmask.c: add --logfile option, use htons() on - port number - - * appl/gssmask/gssmaestro.c: Log port in connection message. - - * configure.in: Make pk-init turned on by default. - -2006-09-18 Love Hörnquist Åstrand - - * fix-export: Build lib/hx509/{hx509-protos.h,hx509-private.h}. - - * kuser/Makefile.am: Add tool for printing tickets. - - * kuser/kimpersonate.1: Add tool for printing tickets. - - * kuser/kimpersonate.c: Add tool for printing tickets. - - * kdc/krb5tgs.c: Check the adtkt in the constrained delegation - case too. - -2006-09-16 Love Hörnquist Åstrand - - * kdc/main.c (sigterm): don't _exit, let loop() catch the signal - instead. - - * lib/krb5/krb5_timeofday.3: Fixes from Björn Sandell. - - * lib/krb5/krb5_get_init_creds.3: Fixes from Björn Sandell. - -2006-09-15 Love Hörnquist Åstrand - - * tools/krb5-config.in: Add "kafs" option. - -2006-09-12 Love Hörnquist Åstrand - - * lib/hdb/db.c: By using full function calling conversion (*func) - we avoid problem when close(fd) is overridden using a macro. - - * lib/krb5/cache.c: By using full function calling - conversion (*func) we avoid problem when close(fd) is overridden - using a macro. - -2006-09-11 Love Hörnquist Åstrand - - * kdc/kerberos5.c: Signing outgoing tickets. - - * kdc/krb5tgs.c: Add signing and checking of tickets to s4u2self - works securely. - - * lib/krb5/pkinit.c: Adapt to new signature of - hx509_cms_unenvelope. - -2006-09-09 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (pk_verify_host): set errorstrings in a - sensable way - -2006-09-08 Love Hörnquist Åstrand - - * lib/krb5/krb5_init_context.3: Prevent a font generation warning, - from Jason McIntyre. - -2006-09-06 Love Hörnquist Åstrand - - * lib/krb5/context.c (krb5_init_ets): Add the hx errortable - - * lib/krb5/krb5_locl.h: Include hx509_err.h. - - * lib/krb5/pkinit.c (_krb5_pk_verify_sign): catch the error string - from the hx509 lib - -2006-09-04 Love Hörnquist Åstrand - - * lib/krb5/init_creds.c (krb5_get_init_creds_opt_set_default_flags): - fix argument to krb5_get_init_creds_opt_set_addressless. - - * lib/krb5/init_creds_pw.c (init_cred_loop): try to catch the - error when we actually have an error to catch. - - * lib/krb5/init_creds_pw.c: Remove debug printfs. - - * kuser/kinit.c: Remove debug printf - - * lib/krb5/krb5_get_init_creds.3: Document - krb5_get_init_creds_opt_set_addressless. - - * kuser/kinit.c: Use new function - krb5_get_init_creds_opt_set_addressless. - - * lib/krb5/krb5_locl.h: use new addressless, convert pa-pac option - to use the same tri-state option as the new addressless option. - - * lib/krb5/init_creds_pw.c: use new addressless, convert pa-pac - option to use the same tri-state option as the new addressless - option. - - * lib/krb5/init_creds.c (krb5_get_init_creds_opt_set_addressless): - used to control the address-lessness of the initial tickets - instead of passing in the empty set of address into - krb5_get_init_creds_opt_set_addresses. - -2006-09-01 Love Hörnquist Åstrand - - * kuser/kinit.c (renew_validate): inherit the proxiable and - forwardable from the orignal ticket, pointed out by Bernard - Antoine of CERN. - - * doc/setup.texi: More text about the acl_file entry and - hdb-ldap-structural-object. From Rüdiger Ranft. - - * lib/krb5/krbhst.c (fallback_get_hosts): limit the fallback - lookups to 5. Patch from Wesley Craig, umich.edu - - * configure.in: Add special tests for , include test - for sys/param.h and sys/types.h - - * appl/test/tcp_server.c (proto): use keytab for krb5_recvauth - Patch from Ingemar Nilsson - -2006-08-28 Love Hörnquist Åstrand - - * kuser/kdigest.c (help): use sl_slc_help(). - - * kdc/digest.c: Catch more error, add SASL DIGEST MD5. - - * lib/krb5/digest.c: Catch more error. - -2006-08-25 Love Hörnquist Åstrand - - * doc/setup.texi: language. - - * doc/heimdal.texi: Add last updated text. - - * doc/heimdal.css: make box around heimdal title - - * doc/heimdal.css: Inital Heimdal css for the info manual - - * lib/krb5/digest.c: In the case where we get a DigestError back, - save the error string and code. - -2006-08-24 Love Hörnquist Åstrand - - * kdc/kerberos5.c: Remove _kdc_find_etype(), its no longer used. - - * kdc/digest.c: Remove local error label and have just one exit - label, set error strings properly. - - * kdc/digest.c: Simply the disabled-service case. Check the - allow-digest flag in the HDB entry for the client. - - * kdc/process.c (krb5_kdc_process_generic_request): check if we - got a digest request and process it. - - * kdc/main.c: Register hdb keytab operations. - - * kdc/kdc.8: document [kdc]enable-digest=boolean - - * kdc/Makefile.am: add digest to libkdc - - * kdc/digest.c: Make a return a goto to avoid freeing un-inited - memory in cleanup code. - - * kdc/default_config.c (krb5_kdc_default_config): default to all - bits set to zero. - - * kdc/kdc.h (krb5_kdc_configuration): Add enable_digest - - * kdc/headers.h: Include . - - * lib/krb5/context.c (krb5_kerberos_enctypes): new function, - returns the list of Kerberos encryption types sorted in order of - most preferred to least preferred encryption type. - - * kdc/misc.c (_kdc_get_preferred_key): new function, Use the order - list of preferred encryption types and sort the available keys and - return the most preferred key. - - * kdc/krb5tgs.c: Adapt to the new sigature of _kdc_find_keys(). - - * kdc/kerberos5.c: Handle session key etype separately from the - tgt etype, now the krbtgt can be a aes-only key without the need - to support not-as-good etypes for the krbtgt. - -2006-08-23 Love Hörnquist Åstrand - - * kdc/misc.c: Change _kdc_db_fetch() to return the database - pointer to if needed by the consumer. - - * kdc/krb5tgs.c: Change _kdc_db_fetch() to return the database - pointer to if needed by the consumer. - - * kdc/kerberos5.c: Change _kdc_db_fetch() to return the database - pointer to if needed by the consumer. - - * kdc/kerberos4.c: Change _kdc_db_fetch() to return the database - pointer to if needed by the consumer. - - * kdc/kaserver.c: Change _kdc_db_fetch() to return the database - pointer to if needed by the consumer. - - * kdc/524.c: Change _kdc_db_fetch() to return the database pointer - to if needed by the consumer. - - * kuser/kdigest-commands.in: Add --kerberos-realm, add client - request command. - - * lib/krb5/Makefile.am: digest.c - - * lib/krb5/krb5.h: Add digest glue. - - * lib/krb5/digest.c (krb5_digest_set_authentication_user): use - krb5_principal - - * lib/krb5/digest.c: Add digest support to the client side. - -2006-08-21 Love Hörnquist Åstrand - - * lib/krb5/rd_rep.c (krb5_rd_rep): free krb5_ap_rep_enc_part on - error and set return pointer to NULL - (krb5_free_ap_rep_enc_part): permit freeing of NULL - -2006-08-18 Love Hörnquist Åstrand - - * kdc/{Makefile.am,kdigest.c,kdigest-commands.in}: - Frontend for remote digest service in KDC - - * lib/krb5/krb5_storage.3: Document krb5_{ret,store}_stringnl - functions. - - * lib/krb5/store.c: Add krb5_{ret,store}_stringnl functions, - stores/retrieves a \n terminated string. - - * lib/krb5/krb5_locl.h: Default to address-less tickets. - - * lib/krb5/init_creds.c (krb5_get_init_creds_opt_get_error): clear - error string on error. - -2006-07-20 Love Hörnquist Åstrand - - * lib/krb5/crypto.c: remove aes-192 (CMS) - - * lib/krb5/crypto.c: Remove more CMS bits. - - * lib/krb5/crypto.c: Remove CMS symmetric encryption support. - -2006-07-13 Love Hörnquist Åstrand - - * kdc/pkinit.c (_kdc_pk_check_client): make it not crash when - there are no acl - - * kdc/pkinit.c (_kdc_pk_check_client): use the acl in the kerberos - database - - * lib/hdb/hdb.asn1: Rename HDB-Ext-PKINIT-certificate to - HDB-Ext-PKINIT-hash. Add trust anchor to HDB-Ext-PKINIT-acl. - - * lib/hdb/Makefile.am: rename asn1_HDB_Ext_PKINIT_certificate to - asn1_HDB_Ext_PKINIT_hash - - * lib/hdb/ext.c: Add hdb_entry_get_pkinit_hash(). - -2006-07-10 Love Hörnquist Åstrand - - * kuser/kinit.c: If --password-file gets STDIN, read the password - from the standard input. - - * kuser/kinit.1: Document --password-file=STDIN. - - * lib/krb5/krb5_string_to_key.3: Remove duplicate to. - -2006-07-06 Love Hörnquist Åstrand - - * kdc/krb5tgs.c: (tgs_build_reply): when checking for removed - principals, check the second component of the krbtgt, otherwise - cross realm wont work. Prompted by report from Mattias Amnefelt. - -2006-07-05 Love Hörnquist Åstrand - - * kdc/connect.c (handle_vanilla_tcp): use unsigned integer for for - length - (handle_tcp): if the high bit it set in the unknown case, send - back a KRB_ERR_FIELD_TOOLONG - -2006-07-03 Love Hörnquist Åstrand - - * appl/gssmask/gssmaestro.c: Add get_version_capa, cache - target_name. - - * appl/gssmask/gssmask.c: use utname() to find the local hostname - and version of operatingsystem - - * appl/gssmask/common.h: include - - * appl/gssmask/gssmask.c: break out creation of a client and make - handleServer pthread_create compatible - - * appl/gssmask/gssmaestro.c: break out out the build context - function - -2006-07-01 Love Hörnquist Åstrand - - * appl/gssmask/gssmaestro.c: externalize slave handling, add - GetTargetName glue - - * appl/gssmask/gssmaestro.c: externalize principal/password handling - - * lib/krb5/principal.c (krb5_parse_name): set *principal to NULL - the first thing we do, so that on failure its set to a known value - - * appl/gssmask/gssmask.c: AcquireCreds: set principal to NULL to - avoid memory corruption GetTargetName: always send a string, even - though we don't have a targetname - - * appl/gssmask: break out common function; add gssmaestro (that - only tests one context for now) - -2006-06-30 Love Hörnquist Åstrand - - * lib/krb5/store_fd.c (krb5_storage_from_fd): don't leak fd on - malloc failure - - * appl/gssmask/gssmask.c: split out fetching of credentials for - easier reuse for pk-init testing - - * appl/gssmask: maggot replacement, handles context testing - - * lib/krb5/cache.c (krb5_cc_new_unique): use KRB5_DEFAULT_CCNAME - as the default prefix - -2006-06-28 Love Hörnquist Åstrand - - * doc/heimdal.texi: Add Doug Rabson's license - -2006-06-22 Love Hörnquist Åstrand - - * lib/krb5/init_creds.c: Add storing and getting KRB-ERROR in the - krb5_get_init_creds_opt structure. - - * lib/krb5/init_creds_pw.c: Save KRB-ERROR on error. - - * lib/krb5/krb5_locl.h (_krb5_get_init_creds_opt_private): add - KRB-ERROR - -2006-06-21 Love Hörnquist Åstrand - - * doc/setup.texi: section about verify_krb5_conf and kadmin check - -2006-06-15 Love Hörnquist Åstrand - - * lib/krb5/init_creds_pw.c (get_init_creds_common): drop cred - argument, its unused - - * lib/krb5/Makefile.am: install krb5_get_creds.3 - - * lib/krb5/krb5_get_creds.3: new file - -2006-06-14 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c: don't use the sambaNTPassword if there is - ARCFOUR key already. Idea from Andreas Hasenack. While here, set - pw change time using sambaPwdLastSet - - * kdc/kerberos4.c: Use enable_v4_per_principal and check the new - hdb flag. - - * kdc/kdc.h: Add enable_v4_per_principal - -2006-06-12 Love Hörnquist Åstrand - - * kdc/kerberos5.c (_kdc_as_rep): if kdc_time + - config->kdc_warn_pwexpire is past pw_end, add expiration - message. From Bernard Antoine. - - * kdc/default_config.c (krb5_kdc_default_config): set - kdc_warn_pwexpire to 0 - - * kdc/kerberos5.c: indent. - -2006-06-07 Love Hörnquist Åstrand - - * kdc/kerberos5.c: constify - -2006-06-06 Love Hörnquist Åstrand - - * lib/krb5/get_cred.c: Allow setting additional tickets in the - tgs-req - - * kuser/kgetcred.c: add --delegation-credential-cache - - * kdc/krb5tgs.c (tgs_build_reply): add constrained delegation. - - * kdc/krb5tgs.c: Add impersonation. - - * kuser/kgetcred.c: use new krb5_get_creds interface, add - impersonation. - - * lib/krb5/get_cred.c (krb5_get_creds): add - KRB5_GC_NO_TRANSIT_CHECK - - * lib/krb5/misc.c: Add impersonate support functions. - - * lib/krb5/get_cred.c: Add impersonate and new krb5_get_creds interface. - - * lib/hdb/hdb.asn1 (HDBFlags): add trusted-for-delegation - - * lib/krb5/krb5.h: Add krb5_get_creds_opt_data and some more - KRB5_GC flags. - -2006-06-01 Love Hörnquist Åstrand - - * lib/hdb/ext.c (hdb_entry_get_ConstrainedDelegACL): new function. - - * lib/krb5/pkinit.c: Avoid more shadowing. - - * kdc/connect.c (do_request): clean reply with krb5_data_zero - - * kdc/krb5tgs.c: Split up the reverse cross krbtgt check and local - clien must exists test. - - * kdc/krb5tgs.c: Plug old memory leaks, unify all goto's. - - * kdc/krb5tgs.c: Split tgs_rep2 into tgs_parse_request and - tgs_build_reply. - - * kdc/kerberos5.c: split out krb5 tgs req to make it easier to - reorganize the code. - -2006-05-29 Love Hörnquist Åstrand - - * lib/krb5/krb5_get_init_creds.3: spelling Björn Sandell - - * lib/krb5/krb5_get_in_cred.3: spelling Björn Sandell - -2006-05-13 Love Hörnquist Åstrand - - * kpasswd/kpasswdd.c (change): select the realm based on the - target principal From Gabor Gombas - - * lib/krb5/krb5_get_init_creds.3: Add KRB5_PROMPT_TYPE_INFO - - * lib/krb5/krb5.h: Add KRB5_PROMPT_TYPE_INFO - -2006-05-12 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Hidden field of hx509 prompter is removed. - Fix a warning. - - * doc/setup.texi: Point to more examples, hint that you have to - use openssl 0.9.8a or later. - - * doc/setup.texi: DIR now handles both PEM and DER. - - * kuser/kinit.c: Pass down prompter and password to - krb5_get_init_creds_opt_set_pkinit. - - * lib/krb5/pkinit.c (_krb5_pk_load_id): only use password if its - longer then 0 - - * doc/ack.texi: Add Jason McIntyre. - - * lib/krb5/krb5_acl_match_file.3: Various tweaks, from Jason - McIntyre. - -2006-05-11 Love Hörnquist Åstrand - - * kuser/kinit.c: Move parsing of the PK-INIT configuration file to - the library so application doesn't need to deal with it. - - * lib/krb5/pkinit.c (krb5_get_init_creds_opt_set_pkinit): move - parsing of the configuration file to the library so application - doesn't need to deal with it. - - * lib/krb5/pkinit.c (_krb5_pk_load_id): pass the hx509_lock to - when trying to read the user certificate. - - * lib/krb5/pkinit.c (hx_pass_prompter): return 0 on success and 1 - on failure. Pointed out by Douglas E. Engert. - -2006-05-08 Love Hörnquist Åstrand - - * lib/krb5/crypto.c: Catches both keyed checkout w/o crypto - context cases and doesn't reset the string, and corrects the - grammar. - - * lib/krb5/crypto.c: Drop aes-cbc, rc2 and CMS padding support, - its all containted in libhcrypto and libhx509 now. - -2006-05-07 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (_krb5_pk_verify_sign): Use - hx509_get_one_cert. - - * lib/krb5/crypto.c (create_checksum): provide a error message - that a key checksum needs a key. From Andew Bartlett. - -2006-05-06 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Now that hcrypto supports DH, remove check - for hx509 null DH. - - * kdc/pkinit.c: Don't call DH_check_pubkey, it doesn't exists in - older OpenSSL. - - * doc/heimdal.texi: Add blob about imath. - - * doc/ack.texi: Add blob about imath. - - * include/make_crypto.c: Move up evp.h to please OpenSSL, from - Douglas E. Engert. - - * kcm/acl.c: Multicache kcm interation isn't done yet, let wait - with this enum. - -2006-05-05 Love Hörnquist Åstrand - - * lib/krb5/krb5_set_default_realm.3: Spelling/mdoc from Björn - Sandell - - * lib/krb5/krb5_rcache.3: Spelling/mdoc from Björn Sandell - - * lib/krb5/krb5_keytab.3: Spelling/mdoc from Björn Sandell - - * lib/krb5/krb5_get_in_cred.3: Spelling/mdoc from Björn Sandell - - * lib/krb5/krb5_expand_hostname.3: Spelling/mdoc from Björn - Sandell - - * lib/krb5/krb5_c_make_checksum.3: Spelling/mdoc from Björn - Sandell - - * lib/krb5/keytab_file.c (fkt_next_entry_int): read the 32 bit - kvno if the reset of the data is longer then 4 bytes in hope to be - forward compatible. Pointed out by Michael B Allen. - - * doc/programming.texi: Add fileformats. - - * appl/test: Rename u_intXX_t to uintXX_t - - * kuser: Rename u_intXX_t to uintXX_t - - * kdc: Rename u_intXX_t to uintXX_t - - * lib/hdb: Rename u_intXX_t to uintXX_t - - * lib/45]: Rename u_intXX_t to uintXX_t - - * lib/krb5: Rename u_intXX_t to uintXX_t - - * lib/krb5/Makefile.am: Add test_store to TESTS - - * lib/krb5/pkinit.c: Catch using hx509 null DH and print a more - useful error message. - - * lib/krb5/store.c: Rewrite the krb5_ret_u as proposed by Johan. - -2006-05-04 Love Hörnquist Åstrand - - * kdc/kerberos4.c: Use the new unsigned integer storage types. - - * kdc/kaserver.c: Use the new unsigned integer storage - types. Sprinkle some error handling. - - * lib/krb5/krb5_storage.3: Document ret and store function for the - unsigned fixed size integer types. - - * lib/krb5/v4_glue.c: Use the new unsigned integer storage - types. Fail that the address doesn't match, not the reverse. - - * lib/krb5/store.c: Add ret and store function for the unsigned - fixed size integer types. - - * lib/krb5/test_store.c: Test the integer storage types. - -2006-05-03 Love Hörnquist Åstrand - - * lib/krb5/store.c (krb5_store_principal): make it take a - krb5_const_principal, indent - - * lib/krb5/krb5_storage.3: krb5_store_principal takes a - krb5_const_principal - - * lib/krb5/pkinit.c: Deal with that hx509_prompt.reply is no - longer a pointer. - - * kdc/kdc.h (krb5_kdc_configuration): add pkinit_kdc_ocsp_file - - * kdc/config.c: read [kdc]pki-kdc-ocsp - -2006-05-02 Love Hörnquist Åstrand - - * kdc/pkinit.c (_kdc_pk_mk_pa_reply): send back ocsp response if - it seems to be valid, simplfy the pkinit-windows DH case (it - doesn't exists). - -2006-05-01 Love Hörnquist Åstrand - - * lib/krb5/krb5_warn.3: Spelling/mdoc changes, from Björn Sandell. - - * lib/krb5/krb5_verify_user.3: Spelling/mdoc changes, from Björn - Sandell. - - * lib/krb5/krb5_verify_init_creds.3: Spelling/mdoc changes, from - Björn Sandell. - - * lib/krb5/krb5_timeofday.3: Spelling/mdoc changes, from Björn - Sandell. - - * lib/krb5/krb5_ticket.3: Spelling/mdoc changes, from Björn - Sandell. - - * lib/krb5/krb5_rd_safe.3: Spelling/mdoc changes, from Björn - Sandell. - - * lib/krb5/krb5_rcache.3: Spelling/mdoc changes, from Björn - Sandell. - - * lib/krb5/krb5_principal.3: Spelling/mdoc changes, from Björn - Sandell. - - * lib/krb5/krb5_parse_name.3: Spelling/mdoc changes, from Björn - Sandell. - - * lib/krb5/krb5_mk_safe.3: Spelling/mdoc changes, from Björn - Sandell. - - * lib/krb5/krb5_keyblock.3: Spelling/mdoc changes, from Björn - Sandell. - - * lib/krb5/krb5_is_thread_safe.3: Spelling/mdoc changes, from - Björn Sandell. - - * lib/krb5/krb5_generate_random_block.3: Spelling/mdoc changes, - from Björn Sandell. - - * lib/krb5/krb5_generate_random_block.3: Spelling/mdoc changes, - from Björn Sandell. - - * lib/krb5/krb5_expand_hostname.3: Spelling/mdoc changes, from - Björn Sandell. - - * lib/krb5/krb5_check_transited.3: Spelling/mdoc changes, from - Björn Sandell. - - * lib/krb5/krb5_c_make_checksum.3: Spelling/mdoc changes, from - Björn Sandell. - - * lib/krb5/krb5_address.3: Spelling/mdoc changes, from - Björn Sandell. - - * lib/krb5/krb5_acl_match_file.3: Spelling/mdoc changes, from - Björn Sandell. - - * lib/krb5/krb5.3: Spelling, from Björn Sandell. - - * doc/ack.texi: add Björn - -2006-04-30 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (cert2epi): don't include subject if its null - -2006-04-29 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Send over what trust anchors the client have - configured. - - * lib/krb5/pkinit.c (pk_verify_host): set better error string, - only check kdc name/address when we got a hostname/address passed - in the the function. - - * kdc/pkinit.c (_kdc_pk_check_client): reorganize and make log - when a SAN matches. - -2006-04-28 Love Hörnquist Åstrand - - * doc/setup.texi: More options and some text about windows - clients, certificate and KDCs. - - * doc/setup.texi: notice about pki-mappings file space sensitive - - * doc/setup.texi: Example pki-mapping file. - - * lib/krb5/pkinit.c (pk_verify_host): verify hostname/address - - * lib/hdb/hdb.h: Bump hdb interface version to 4. - -2006-04-27 Love Hörnquist Åstrand - - * kuser/kdestroy.1: Document --credential=principal. - - * kdc/kerberos5.c (tgs_rep2): check that the client exists in the - kerberos database if its local request. - - * kdc/{misc.c,524.c,kaserver.c,kerberos5.c}: pass down HDB_F_GET_ - flags as appropriate - - * kdc/kerberos4.c (_kdc_db_fetch4): pass down flags though - krb5_425_conv_principal_ext2 - - * kdc/misc.c (_kdc_db_fetch): Break out the that we request from - principal from the entry and pass it in as a seprate argument. - - * lib/hdb/keytab.c (hdb_get_entry): Break out the that we request - from principal from the entry and pass it in as a seprate - argument. - - * lib/hdb/common.c: Break out the that we request from principal - from the entry and pass it in as a seprate argument. - - * lib/hdb/hdb.h: Break out the that we request from principal from - the entry and pass it in as a seprate argument. Add more flags to - ->hdb_get(). Re-indent. - -2006-04-26 Love Hörnquist Åstrand - - * doc/setup.texi: document pki-allow-proxy-certificate - - * kdc/pkinit.c: Add option [kdc]pki-allow-proxy-certificate=bool - to allow using proxy certificate. - - * lib/krb5/pkinit.c (_krb5_pk_allow_proxy_certificates): expose - hx509_verify_set_proxy_certificate - - * kdc/pkinit.c (_kdc_pk_check_client): Use - hx509_cert_get_base_subject to get subject name of the - certificate, needed for proxy certificates. - - * kdc/kerberos5.c: Now that find_keys speaks for it self, remove - extra logging. - - * kdc/kerberos5.c (find_keys): add client_name and server_name - argument and use them, and adapt callers. - -2006-04-25 Love Hörnquist Åstrand - - * kuser/kinit.1: document option password-file - - * kuser/kinit.c: Add option password-file, read password from the - first line of a file. - - * configure.in: make tests/kdc/Makefile - - * kdc/kerberos5.c: Catch the case where the client sends no - encryption types or no pa-types. - - * lib/hdb/ext.c (hdb_replace_extension): set error message on - failure, not success. - - * lib/hdb/keys.c (parse_key_set): handle error case better - (hdb_generate_key_set): return better error - -2006-04-24 Love Hörnquist Åstrand - - * lib/hdb/hdb.c (hdb_create): print out what we don't support - - * lib/krb5/principal.c: Remove a double free introduced in 1.93 - - * lib/krb5/log.c (log_file): reset pointer to freed memory - - * lib/krb5/keytab_keyfile.c (get_cell_and_realm): reset d->cell to - make sure its not refereced - - * tools/krb5-config.in: libhcrypto might depend on libasn1, switch - order - - * lib/krb5/recvauth.c: indent - - * doc/heimdal.texi: Add Setting up PK-INIT to Detailed Node - Listing. - - * lib/krb5/pkinit.c: Pass down realm to pk_verify_host so the - function can verify the certificate is from the right realm. - - * lib/krb5/init_creds_pw.c: Pass down realm to - _krb5_pk_rd_pa_reply - -2006-04-23 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (pk_verify_host): Add begining of finding - subjectAltName_otherName pk-init-san and verifing it. - - * lib/krb5/sendauth.c: reindent - - * doc/Makefile.am: use --no-split to make one large file, mostly - for html - - * doc/setup.texi: "document" pkinit_require_eku and - pkinit_require_krbtgt_otherName - - * lib/krb5/pkinit.c: Add pkinit_require_eku and - pkinit_require_krbtgt_otherName - - * doc/setup.texi: Add text about pk-init - - * tools/kdc-log-analyze.pl: count v5 cross realms too - -2006-04-22 Love Hörnquist Åstrand - - * kdc/pkinit.c: Adapt to change in hx509_cms_create_signed_1. - - * lib/krb5/pkinit.c: Adapt to change in hx509_cms_create_signed_1. - -2006-04-20 Love Hörnquist Åstrand - - * kdc/pkinit.c (_kdc_pk_rd_padata): use - hx509_cms_unwrap_ContentInfo. - - * kdc/config.c: unbreak - - * lib/krb5/pkinit.c: Handle diffrences between libhcrypto and - libcrypto. - - * kdc/config.c: Rename pki-chain to pki-pool to match rest of - code. - -2006-04-12 Love Hörnquist Åstrand - - * lib/krb5/rd_priv.c: Fix argument to krb5_data_zero. - - * kdc/config.c: Added certificate revoke information from - configuration file. - - * kdc/pkinit.c: Added certificate revoke information. - - * kuser/kinit.c: Added certificate revoke information from - configuration file. - - * lib/krb5/pkinit.c (_krb5_pk_load_id): Added certificate revoke - information, ie CRL's - -2006-04-10 Love Hörnquist Åstrand - - * lib/krb5/replay.c (krb5_rc_resolve_full): make compile again. - - * lib/krb5/keytab_krb4.c (krb4_kt_start_seq_get_int): make compile - again. - - * lib/krb5/transited.c (make_path): make sure we return allocated - memory Coverity, NetBSD CID#1892 - - * lib/krb5/transited.c (make_path): make sure we return allocated - memory Coverity, NetBSD CID#1892 - - * lib/krb5/rd_req.c (krb5_verify_authenticator_checksum): on - protocol failure, avoid leaking memory Coverity, NetBSD CID#1900 - - * lib/krb5/principal.c (krb5_parse_name): remember to free realm - in case of error Coverity, NetBSD CID#1883 - - * lib/krb5/principal.c (krb5_425_conv_principal_ext2): remove - memory leak in case of weird formated dns replys. - Coverity, NetBSD CID#1885 - - * lib/krb5/replay.c (krb5_rc_resolve_full): don't return pointer - to a allocated krb5_rcache in case of error. - - * lib/krb5/log.c (krb5_addlog_dest): free fn in case of error - Coverity, NetBSD CID#1882 - - * lib/krb5/keytab_krb4.c: Fix deref before NULL check, fix error - handling. Coverity, NetBSD CID#2369 - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): - in_creds->client should always be set, assume so. - - * lib/krb5/keytab_any.c (any_next_entry): restructure to make it - easier to read Fixes Coverity, NetBSD CID#625 - - * lib/krb5/crypto.c (krb5_string_to_key_derived): deref after NULL - check. Coverity NetBSD CID#2367 - - * lib/krb5/build_auth.c (krb5_build_authenticator): use - calloc. removed check that was never really used. Coverity NetBSD - CID#2370 - -2006-04-09 Love Hörnquist Åstrand - - * lib/krb5/rd_req.c (krb5_verify_ap_req2): make sure `ticket´ - points to NULL in case of error, add error handling, use calloc. - - * kpasswd/kpasswdd.c (doit): when done, close all fd in the - sockets array and free it. Coverity NetBSD CID#1916 - -2006-04-08 Love Hörnquist Åstrand - - * lib/krb5/store.c (krb5_ret_principal): fix memory leak Coverity, - NetBSD CID#1695 - - * kdc/524.c (_kdc_do_524): Handle memory allocation failure - Coverity, NetBSD CID#2752 - -2006-04-07 Love Hörnquist Åstrand - - * lib/krb5/keytab_file.c (krb5_kt_ret_principal): plug a memory - leak Coverity NetBSD CID#1890 - - * kdc/hprop.c (main): make sure type doesn't need to be set - - * kdc/mit_dump.c (mit_prop_dump): close fd when done processing - Coverity NetBSD CID#1955 - - * kdc/string2key.c (tokey): catch warnings, free memory after use. - Based on Coverity NetBSD CID#1894 - - * kdc/hprop.c (main): remove dead code. Coverity NetBSD CID#633 - -2006-04-04 Love Hörnquist Åstrand - - * kpasswd/kpasswd-generator.c (read_words): catch empty file case, - will cause PBE (division by zero) later. From Tobias Stoeckmann. - -2006-04-02 Love Hörnquist Åstrand - - * lib/hdb/keytab.c: Remove a delta from last revision that should - have gone in later. - - * lib/krb5/krbhst.c: fix spelling - - * lib/krb5/send_to_kdc.c (send_and_recv_http): don't expose freed - pointer, found by IBM checker. - - * lib/krb5/rd_cred.c (krb5_rd_cred): don't expose freed pointer, - found by IBM checker. - - * lib/krb5/addr_families.c (krb5_make_addrport): clear return - value on error, found by IBM checker. - - * kdc/kerberos5.c (check_addresses): treat netbios as no addresses - - * kdc/{kerberos4,kaserver}.c: _kdc_check_flags takes hdb_entry_ex - - * kdc/kerberos5.c (_kdc_check_flags): make it take hdb_entry_ex to - avoid ?:'s at callers - - * lib/krb5/v4_glue.c: Avoid using free memory, found by IBM - checker. - - * lib/krb5/transited.c (expand_realm): avoid passing NULL to - strlen, found by IBM checker. - - * lib/krb5/rd_cred.c (krb5_rd_cred): avoid a memory leak on malloc - failure, found by IBM checker. - - * lib/krb5/krbhst.c (_krb5_krbhost_info_move): replace a strcpy - with a memcpy - - * lib/krb5/keytab_keyfile.c (get_cell_and_realm): plug a memory - leak, found by IBM checker. - - * lib/krb5/keytab_file.c (fkt_next_entry_int): remove a - dereferencing NULL pointer, found by IBM checker. - - * lib/krb5/init_creds_pw.c (init_creds_init_as_req): in AS-REQ the - cname must always be given, don't avoid that fact and remove a - cname == NULL case. Plugs a memory leak found by IBM checker. - - * lib/krb5/init_creds_pw.c (default_s2k_func): avoid exposing - free-ed memory on error. Found by IBM checker. - - * lib/krb5/init_creds.c (_krb5_get_init_creds_opt_copy): use - calloc to avoid uninitialized memory problem. - - * lib/krb5/data.c (krb5_copy_data): avoid exposing free-ed memory - on error. Found by IBM checker. - - * lib/krb5/fcache.c (fcc_gen_new): fix a use after free, found by - IBM checker. - - * lib/krb5/config_file.c (krb5_config_vget_strings): IBM checker - thought it found a memory leak, it didn't, but there was another - error in the code, lets fix that instead. - - * lib/krb5/cache.c (_krb5_expand_default_cc_name): plug memory - leak. Found by IBM checker. - - * lib/krb5/cache.c (_krb5_expand_default_cc_name): avoid return - pointer to freed memory in the error case. Found by IBM checker. - - * lib/hdb/keytab.c (hdb_resolve): off by one, found by IBM - checker. - - * lib/hdb/keys.c (hdb_generate_key_set): set ret_key_set before - going into the error clause and freeing key_set. Found by IBM - checker. Make sure ret == 0 after of parse error, we catch the - "no entries parsed" case later. - - * lib/krb5/log.c (krb5_addlog_dest): make string length match - strings in strcasecmp. Found by IBM checker. - -2006-03-30 Love Hörnquist Åstrand - - * lib/hdb/hdb-ldap.c (LDAP_message2entry): in declaration set - variable_name as "hdb_entry_ex" - (hdb_ldap_common): change "arg" in condition (if) to "search_base" - (hdb_ldapi_create): change "serach_base" to "search_base" From - Alex V. Labuta. - - * lib/krb5/pkinit.c (krb5_get_init_creds_opt_set_pkinit); fix - prototype - - * kuser/kinit.c: Add pool of certificates to help certificate path - building for clients sending incomplete path in the signedData. - -2006-03-28 Love Hörnquist Åstrand - - * kdc/pkinit.c: Add pool of certificates to help certificate path - building for clients sending incomplete path in the signedData. - - * lib/krb5/pkinit.c: Add pool of certificates to help certificate - path building for clients sending incomplete path in the - signedData. - -2006-03-27 Love Hörnquist Åstrand - - * kdc/config.c: Allow passing in related certificates used to - build the chain. - - * kdc/pkinit.c: Allow passing in related certificates used to - build the chain. - - * kdc/kerberos5.c (log_patype): Add case for - KRB5_PADATA_PA_PK_OCSP_RESPONSE. - - * tools/Makefile.am: Spelling - - * tools/krb5-config.in: Add hx509 when using PK-INIT. - - * tools/Makefile.am: Add hx509 when using PK-INIT. - -2006-03-26 Love Hörnquist Åstrand - - * lib/krb5/acache.c: Use ticket flags definition, might fix Mac OS - X Kerberos.app problems. - - * lib/krb5/krb5_ccapi.h: Add ticket flags definitions - - * lib/krb5/pkinit.c: Use less openssl, spell chelling. - - * kdc/pkinit.c (pk_mk_pa_reply_dh): encode the DH public key with - asn1 wrapping - - * configure.in (AC_CONFIG_FILES): add lib/hx509/Makefile - - * lib/Makefile.am: Add hx509. - - * lib/krb5/Makefile.am: Add libhx509.la when PKINIT is used. - - * configure.in: define automake PKINIT variable - - * kdc/pkinit.c: Switch to hx509. - - * lib/krb5/pkinit.c: Switch to hx509. - -2006-03-24 Love Hörnquist Åstrand - - * kdc/kerberos5.c (log_patypes): log the patypes requested by the - client - -2006-03-23 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c (_krb5_pk_rd_pa_reply): pass down the - req_buffer in the w2k case too. From Douglas E. Engert. - -2006-03-19 Love Hörnquist Åstrand - - * lib/krb5/mk_req_ext.c (_krb5_mk_req_internal): on failure, goto - error handling. Fixes Coverity NetBSD CID 2591 by catching a - failing krb5_copy_keyblock() - -2006-03-17 Love Hörnquist Åstrand - - * lib/krb5/addr_families.c (krb5_free_addresses): reset val,len in - address when free-ing. Fixes Coverity NetBSD bug #2605 - (krb5_parse_address): reset val,len before possibly return errors - Fixes Coverity NetBSD bug #2605 - -2006-03-07 Love Hörnquist Åstrand - - * lib/krb5/send_to_kdc.c (recv_loop): it should never happen, but - make sure nbytes > 0 - - * lib/krb5/get_for_creds.c (add_addrs): handle the case where - addr->len == 0 and n == 0, then realloc might return NULL. - - * lib/krb5/crypto.c (decrypt_*): handle the case where the - plaintext is 0 bytes long, realloc might then return NULL. - -2006-02-28 Love Hörnquist Åstrand - - * lib/krb5/krb5_string_to_key.3: Drop krb5_string_to_key_derived. - - * lib/krb5/krb5.3: Remove krb5_string_to_key_derived. - - * lib/krb5/crypto.c (AES_string_to_key): drop _krb5_PKCS5_PBKDF2 - and use PKCS5_PBKDF2_HMAC_SHA1 instead. - - * lib/krb5/aes-test.c: reformat, avoid free-ing un-init'd memory - - * lib/krb5/aes-test.c: Only use PKCS5_PBKDF2_HMAC_SHA1. - -2006-02-27 Johan Danielsson - - * doc/setup.texi: remove cartouches - we don't use them anywhere - else, they should be around the example, not inside it, and - probably shouldn't be used in html at all - -2006-02-18 Love Hörnquist Åstrand - - * lib/krb5/krb5_warn.3: Document that applications want to use - krb5_get_error_message, add example. - -2006-02-16 Love Hörnquist Åstrand - - * lib/krb5/crypto.c (krb5_generate_random_block): check return - value from RAND_bytes - - * lib/krb5/error_string.c: Change indentation, update (c) - -2006-02-14 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: Make struct krb5_dh_moduli available when - compiling w/o pkinit. - -2006-02-13 Love Hörnquist Åstrand - - * lib/krb5/pkinit.c: update to new paChecksum definition, update - the dhgroup handling - - * kdc/pkinit.c: update to new paChecksum definition, use - hdb_entry_ex - -2006-02-09 Love Hörnquist Åstrand - - * lib/krb5/krb5_locl.h: Move Configurable options to last in the - file. - - * lib/krb5/krb5_locl.h: Wrap KRB5_ADDRESSLESS_DEFAULT with #ifndef - -2006-02-03 Love Hörnquist Åstrand - - * kpasswd/kpasswdd.c: Send back a better error-message to the - client in case the password change was rejected. - - * lib/krb5/krb5_warn.3: Document krb5_get_error_message. - - * lib/krb5/error_string.c (krb5_get_error_message): new function, - and combination of krb5_get_error_string and krb5_get_err_text - - * lib/krb5/krb5.3: sort, and krb5_get_error_message - - * lib/hdb/hdb-ldap.c: Log the filter string to the error message - when doing searches. - - * lib/krb5/init_creds.c (krb5_get_init_creds_opt_set_default_flags): - Use KRB5_ADDRESSLESS_DEFAULT when - checking [appdefault]no-addresses. - - * lib/krb5/get_cred.c (get_cred_from_kdc_flags): Use - KRB5_ADDRESSLESS_DEFAULT when checking - [appdefault]no-addresses. - - * lib/krb5/get_for_creds.c (krb5_get_forwarded_creds): - Use [appdefault]no-addresses before checking if the krbtgt is - address-less, use KRB5_ADDRESSLESS_DEFAULT. - - * lib/krb5/krb5_locl.h: Introduce KRB5_ADDRESSLESS_DEFAULT that - controlls all address-less behavior. Defaults to false. - -2006-02-01 Love Hörnquist Åstrand - - * lib/krb5/n-fold-test.c: main is not a KRB5_LIB_FUNCTION - - * lib/krb5/mk_priv.c (krb5_mk_priv): abort if ASN1_MALLOC_ENCODE - failes to produce the matching lenghts. - -2006-01-27 Love Hörnquist Åstrand - - * kcm/protocol.c (kcm_op_retrieve): remove unused variable - -2006-01-15 Love Hörnquist Åstrand - - * tools/krb5-config.in: Move depenency on @LIB_dbopen@ to - kadm-server, kerberos library doesn't depend on db-library. - -2006-01-13 Love Hörnquist Åstrand - - * include/Makefile.am: Don't clean crypto headers, they now live - in hcrypto/. Add hcrypto to SUBDIRS. - - * include/hcrypto/Makefile.am: clean installed headers - - * include/make_crypto.c: include crypto headers from hcrypto/ - - * include/make_crypto.c: Include more crypto headerfiles. Remove - support for old hash names. - -2006-01-02 Love Hörnquist Åstrand - - * kdc/misc.c (_kdc_db_fetch): use calloc to allocate the entry, - from Andrew Bartlet. - - * Happy New Year. diff --git a/kerberosV/src/LICENSE b/kerberosV/src/LICENSE deleted file mode 100644 index 404347b4bda..00000000000 --- a/kerberosV/src/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -Copyright (c) 1995 - 2011 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. - - -Please see info documentation for the complete list of licenses. diff --git a/kerberosV/src/Makefile.am b/kerberosV/src/Makefile.am deleted file mode 100644 index 4fa9e5e3391..00000000000 --- a/kerberosV/src/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -# $Id: Makefile.am,v 1.2 2013/06/17 18:57:39 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -if KCM -kcm_dir = kcm -endif - -SUBDIRS= include base lib kuser kdc admin kadmin kpasswd -SUBDIRS+= $(kcm_dir) appl tools tests packages etc po - -if HEIMDAL_DOCUMENTATION -SUBDIRS+= doc -endif - - - -## ACLOCAL = @ACLOCAL@ -I cf -ACLOCAL_AMFLAGS = -I cf - -EXTRA_DIST = \ - NTMakefile \ - windows \ - TODO \ - LICENSE \ - README \ - ChangeLog \ - ChangeLog.1998 \ - ChangeLog.1999 \ - ChangeLog.2000 \ - ChangeLog.2001 \ - ChangeLog.2002 \ - ChangeLog.2003 \ - ChangeLog.2004 \ - ChangeLog.2005 \ - ChangeLog.2006 \ - Makefile.am.common \ - autogen.sh \ - krb5.conf \ - cf/make-proto.pl \ - cf/install-catman.sh \ - cf/ChangeLog \ - cf/c-function.m4 \ - cf/ChangeLog \ - cf/have-pragma-weak.m4 \ - cf/have-types.m4 \ - cf/krb-func-getcwd-broken.m4 \ - cf/krb-prog-ranlib.m4 \ - cf/krb-prog-yacc.m4 \ - cf/krb-sys-aix.m4 \ - cf/krb-sys-nextstep.m4 \ - cf/krb-version.m4 \ - cf/roken.m4 \ - cf/valgrind-suppressions \ - cf/vararray.m4 - -print-distdir: - @echo $(distdir) diff --git a/kerberosV/src/Makefile.am.common b/kerberosV/src/Makefile.am.common deleted file mode 100644 index 5815df70dc9..00000000000 --- a/kerberosV/src/Makefile.am.common +++ /dev/null @@ -1,4 +0,0 @@ -# $Id: Makefile.am.common,v 1.2 2013/06/17 18:57:39 robert Exp $ - -include $(top_srcdir)/cf/Makefile.am.common - diff --git a/kerberosV/src/Makefile.in b/kerberosV/src/Makefile.in deleted file mode 100644 index e8d923c8206..00000000000 --- a/kerberosV/src/Makefile.in +++ /dev/null @@ -1,1104 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.2 2013/06/17 18:57:39 robert Exp $ - -# $Id: Makefile.in,v 1.2 2013/06/17 18:57:39 robert Exp $ - -# $Id: Makefile.in,v 1.2 2013/06/17 18:57:39 robert Exp $ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common $(top_srcdir)/configure \ - ChangeLog NEWS TODO compile config.guess config.sub depcomp \ - install-sh ltmain.sh missing ylwrap -@HEIMDAL_DOCUMENTATION_TRUE@am__append_1 = doc -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = include base lib kuser kdc admin kadmin kpasswd kcm \ - tools tests packages etc po doc -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -@KCM_TRUE@kcm_dir = kcm -SUBDIRS = include base lib kuser kdc admin kadmin kpasswd $(kcm_dir) \ - tools tests packages etc po $(am__append_1) -ACLOCAL_AMFLAGS = -I cf -EXTRA_DIST = \ - NTMakefile \ - windows \ - TODO \ - LICENSE \ - README \ - ChangeLog \ - ChangeLog.1998 \ - ChangeLog.1999 \ - ChangeLog.2000 \ - ChangeLog.2001 \ - ChangeLog.2002 \ - ChangeLog.2003 \ - ChangeLog.2004 \ - ChangeLog.2005 \ - ChangeLog.2006 \ - Makefile.am.common \ - autogen.sh \ - krb5.conf \ - cf/make-proto.pl \ - cf/install-catman.sh \ - cf/ChangeLog \ - cf/c-function.m4 \ - cf/ChangeLog \ - cf/have-pragma-weak.m4 \ - cf/have-types.m4 \ - cf/krb-func-getcwd-broken.m4 \ - cf/krb-prog-ranlib.m4 \ - cf/krb-prog-yacc.m4 \ - cf/krb-sys-aix.m4 \ - cf/krb-sys-nextstep.m4 \ - cf/krb-version.m4 \ - cf/roken.m4 \ - cf/valgrind-suppressions \ - cf/vararray.m4 - -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c -am--refresh: - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-recursive -all-am: Makefile all-local -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ - ctags-recursive install-am install-data-am install-exec-am \ - install-strip tags-recursive uninstall-am - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local am--refresh check check-am check-local \ - clean clean-generic clean-libtool ctags ctags-recursive dist \ - dist-all dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar \ - dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-generic distclean-libtool distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-hook - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -print-distdir: - @echo $(distdir) - -# 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/kerberosV/src/NEWS b/kerberosV/src/NEWS deleted file mode 100644 index df8c95bbb14..00000000000 --- a/kerberosV/src/NEWS +++ /dev/null @@ -1,982 +0,0 @@ -Release Notes - Heimdal - Version Heimdal 1.5.3 - - Bug fixes - - Fix leaking file descriptors in KDC - - Better socket/timeout handling in libkrb5 - - General bug fixes - - Build fixes - -Release Notes - Heimdal - Version Heimdal 1.5.2 - - Security fixes - - CVE-2011-4862 Buffer overflow in libtelnet/encrypt.c in telnetd - escalation of privilege - - Check that key types strictly match - denial of service - -Release Notes - Heimdal - Version Heimdal 1.5.1 - - Bug fixes - - Fix building on Solaris, requires c99 - - Fix building on Windows - - Build system updates - -Release Notes - Heimdal - Version Heimdal 1.5 - -New features - - - Support GSS name extensions/attributes - - SHA512 support - - No Kerberos 4 support - - Basic support for MIT Admin protocol (SECGSS flavor) - in kadmind (extract keytab) - - Replace editline with libedit - -Release Notes - Heimdal - Version Heimdal 1.4 - - New features - - - Support for reading MIT database file directly - - KCM is polished up and now used in production - - NTLM first class citizen, credentials stored in KCM - - Table driven ASN.1 compiler, smaller!, not enabled by default - - Native Windows client support - -Notes - - - Disabled write support NDBM hdb backend (read still in there) since - it can't handle large records, please migrate to a diffrent backend - (like BDB4) - -Release Notes - Heimdal - Version Heimdal 1.3.3 - - Bug fixes - - Check the GSS-API checksum exists before trying to use it [CVE-2010-1321] - - Check NULL pointers before dereference them [kdc] - -Release Notes - Heimdal - Version Heimdal 1.3.2 - - Bug fixes - - - Don't mix length when clearing hmac (could memset too much) - - More paranoid underrun checking when decrypting packets - - Check the password change requests and refuse to answer empty packets - - Build on OpenSolaris - - Renumber AD-SIGNED-TICKET since it was stolen from US - - Don't cache /dev/*random file descriptor, it doesn't get unloaded - - Make C++ safe - - Misc warnings - -Release Notes - Heimdal - Version Heimdal 1.3.1 - - Bug fixes - - - Store KDC offset in credentials - - Many many more bug fixes - -Release Notes - Heimdal - Version Heimdal 1.3.1 - - New features - - - Make work with OpenLDAPs krb5 overlay - -Release Notes - Heimdal - Version Heimdal 1.3 - - New features - - - Partial support for MIT kadmind rpc protocol in kadmind - - Better support for finding keytab entries when using SPN aliases in the KDC - - Support BER in ASN.1 library (needed for CMS) - - Support decryption in Keychain private keys - - Support for new sqlite based credential cache - - Try both KDC referals and the common DNS reverse lookup in GSS-API - - Fix the KCM to not leak resources on failure - - Add IPv6 support to iprop - - Support localization of error strings in - kinit/klist/kdestroy and Kerberos library - - Remove Kerberos 4 support in application (still in KDC) - - Deprecate DES - - Support i18n password in windows domains (using UTF-8) - - More complete API emulation of OpenSSL in hcrypto - - Support for ECDSA and ECDH when linking with OpenSSL - - API changes - - - Support for settin friendly name on credential caches - - Move to using doxygen to generate documentation. - - Sprinkling __attribute__((depricated)) for old function to be removed - - Support to export LAST-REQUST information in AS-REQ - - Support for client deferrals in in AS-REQ - - Add seek support for krb5_storage. - - Support for split AS-REQ, first step for IA-KERB - - Fix many memory leaks and bugs - - Improved regression test - - Support krb5_cccol - - Switch to krb5_set_error_message - - Support krb5_crypto_*_iov - - Switch to use EVP for most function - - Use SOCK_CLOEXEC and O_CLOEXEC (close on exec) - - Add support for GSS_C_DELEG_POLICY_FLAG - - Add krb5_cc_[gs]et_config to store data in the credential caches - - PTY testing application - -Bugfixes - - Make building on AIX6 possible. - - Bugfixes in LDAP KDC code to make it more stable - - Make ipropd-slave reconnect when master down gown - - -Release Notes - Heimdal - Version Heimdal 1.2.1 - -* Bug - - [HEIMDAL-147] - Heimdal 1.2 not compiling on Solaris - [HEIMDAL-151] - Make canned tests work again after cert expired - [HEIMDAL-152] - iprop test: use full hostname to avoid realm - resolving errors - [HEIMDAL-153] - ftp: Use the correct length for unmap, msync - -Release Notes - Heimdal - Version Heimdal 1.2 - -* Bug - - [HEIMDAL-10] - Follow-up on bug report for SEGFAULT in - gss_display_name/gss_export_name when using SPNEGO - [HEIMDAL-15] - Re: [Heimdal-bugs] potential bug in Heimdal 1.1 - [HEIMDAL-17] - Remove support for depricated [libdefaults]capath - [HEIMDAL-52] - hdb overwrite aliases for db databases - [HEIMDAL-54] - Two issues which affect credentials delegation - [HEIMDAL-58] - sockbuf.c calls setsockopt with bad args - [HEIMDAL-62] - Fix printing of sig_atomic_t - [HEIMDAL-87] - heimdal 1.1 not building under cygwin in hcrypto - [HEIMDAL-105] - rcp: sync rcp with upstream bsd rcp codebase - [HEIMDAL-117] - Use libtool to detect symbol versioning (Debian Bug#453241) - -* Improvement - [HEIMDAL-67] - Fix locking and store credential in atomic writes - in the FILE credential cache - [HEIMDAL-106] - make compile on cygwin again - [HEIMDAL-107] - Replace old random key generation in des module - and use it with RAND_ function instead - [HEIMDAL-115] - Better documentation and compatibility in hcrypto - in regards to OpenSSL - -* New Feature - [HEIMDAL-3] - pkinit alg agility PRF test vectors - [HEIMDAL-14] - Add libwind to Heimdal - [HEIMDAL-16] - Use libwind in hx509 - [HEIMDAL-55] - Add flag to krb5 to not add GSS-API INT|CONF to - the negotiation - [HEIMDAL-74] - Add support to report extended error message back - in AS-REQ to support windows clients - [HEIMDAL-116] - test pty based application (using rkpty) - [HEIMDAL-120] - Use new OpenLDAP API (older deprecated) - -* Task - [HEIMDAL-63] - Dont try key usage KRB5_KU_AP_REQ_AUTH for TGS-REQ. - This drop compatibility with pre 0.3d KDCs. - [HEIMDAL-64] - kcm: first implementation of kcm-move-cache - [HEIMDAL-65] - Failed to compile with --disable-pk-init - [HEIMDAL-80] - verify that [VU#162289]: gcc silently discards some - wraparound checks doesn't apply to Heimdal - -Changes in release 1.1 - - * Read-only PKCS11 provider built-in to hx509. - - * Documentation for hx509, hcrypto and ntlm libraries improved. - - * Better compatibilty with Windows 2008 Server pre-releases and Vista. - - * Mac OS X 10.5 support for native credential cache. - - * Provide pkg-config file for Heimdal (heimdal-gssapi.pc). - - * Bug fixes. - -Changes in release 1.0.2 - -* Ubuntu packages. - -* Bug fixes. - -Changes in release 1.0.1 - - * Serveral bug fixes to iprop. - - * Make work on platforms without dlopen. - - * Add RFC3526 modp group14 as default. - - * Handle [kdc] database = { } entries without realm = stanzas. - - * Make krb5_get_renewed_creds work. - - * Make kaserver preauth work again. - - * Bug fixes. - -Changes in release 1.0 - - * Add gss_pseudo_random() for mechglue and krb5. - - * Make session key for the krbtgt be selected by the best encryption - type of the client. - - * Better interoperability with other PK-INIT implementations. - - * Inital support for Mac OS X Keychain for hx509. - - * Alias support for inital ticket requests. - - * Add symbol versioning to selected libraries on platforms that uses - GNU link editor: gssapi, hcrypto, heimntlm, hx509, krb5, and libkdc. - - * New version of imath included in hcrypto. - - * Fix memory leaks. - - * Bugs fixes. - -Changes in release 0.8.1 - - * Make ASN.1 library less paranoid to with regard to NUL in string to - make it inter-operate with MIT Kerberos again. - - * Make GSS-API library work again when using gss_acquire_cred - - * Add symbol versioning to libgssapi when using GNU ld. - - * Fix memory leaks - - * Bugs fixes - -Changes in release 0.8 - - * PK-INIT support. - - * HDB extensions support, used by PK-INIT. - - * New ASN.1 compiler. - - * GSS-API mechglue from FreeBSD. - - * Updated SPNEGO to support RFC4178. - - * Support for Cryptosystem Negotiation Extension (RFC 4537). - - * A new X.509 library (hx509) and related crypto functions. - - * A new ntlm library (heimntlm) and related crypto functions. - - * Updated the built-in crypto library with bignum support using - imath, support for RSA and DH and renamed it to libhcrypto. - - * Subsystem in the KDC, digest, that will perform the digest - operation in the KDC, currently supports: CHAP, MS-CHAP-V2, SASL - DIGEST-MD5 NTLMv1 and NTLMv2. - - * KDC will return the "response too big" error to force TCP retries - for large (default 1400 bytes) UDP replies. This is common for - PK-INIT requests. - - * Libkafs defaults to use 2b tokens. - - * Default to use the API cache on Mac OS X. - - * krb5_kuserok() also checks ~/.k5login.d directory for acl files, - see manpage for krb5_kuserok for description. - - * Many, many, other updates to code and info manual and manual pages. - - * Bug fixes - -Changes in release 0.7.2 - -* Fix security problem in rshd that enable an attacker to overwrite - and change ownership of any file that root could write. - -* Fix a DOS in telnetd. The attacker could force the server to crash - in a NULL de-reference before the user logged in, resulting in inetd - turning telnetd off because it forked too fast. - -* Make gss_acquire_cred(GSS_C_ACCEPT) check that the requested name - exists in the keytab before returning success. This allows servers - to check if its even possible to use GSSAPI. - -* Fix receiving end of token delegation for GSS-API. It still wrongly - uses subkey for sending for compatibility reasons, this will change - in 0.8. - -* telnetd, login and rshd are now more verbose in logging failed and - successful logins. - -* Bug fixes - -Changes in release 0.7.1 - -* Bug fixes - -Changes in release 0.7 - - * Support for KCM, a process based credential cache - - * Support CCAPI credential cache - - * SPNEGO support - - * AES (and the gssapi conterpart, CFX) support - - * Adding new and improve old documentation - - * Bug fixes - -Changes in release 0.6.6 - -* Fix security problem in rshd that enable an attacker to overwrite - and change ownership of any file that root could write. - -* Fix a DOS in telnetd. The attacker could force the server to crash - in a NULL de-reference before the user logged in, resulting in inetd - turning telnetd off because it forked too fast. - -Changes in release 0.6.5 - - * fix vulnerabilities in telnetd - - * unbreak Kerberos 4 and kaserver - -Changes in release 0.6.4 - - * fix vulnerabilities in telnet - - * rshd: encryption without a separate error socket should now work - - * telnet now uses appdefaults for the encrypt and forward/forwardable - settings - - * bug fixes - -Changes in release 0.6.3 - - * fix vulnerabilities in ftpd - - * support for linux AFS /proc "syscalls" - - * support for RFC3244 (Windows 2000 Kerberos Change/Set Password) in - kpasswdd - - * fix possible KDC denial of service - - * bug fixes - -Changes in release 0.6.2 - - * Fix possible buffer overrun in v4 kadmin (which now defaults to off) - -Changes in release 0.6.1 - - * Fixed ARCFOUR suppport - - * Cross realm vulnerability - - * kdc: fix denial of service attack - - * kdc: stop clients from renewing tickets into the future - - * bug fixes - -Changes in release 0.6 - -* The DES3 GSS-API mechanism has been changed to inter-operate with - other GSSAPI implementations. See man page for gssapi(3) how to turn - on generation of correct MIC messages. Next major release of heimdal - will generate correct MIC by default. - -* More complete GSS-API support - -* Better AFS support: kdc (524) supports 2b; 524 in kdc and AFS - support in applications no longer requires Kerberos 4 libs - -* Kerberos 4 support in kdc defaults to turned off (includes ka and 524) - -* other bug fixes - -Changes in release 0.5.2 - - * kdc: add option for disabling v4 cross-realm (defaults to off) - - * bug fixes - -Changes in release 0.5.1 - - * kadmind: fix remote exploit - - * kadmind: add option to disable kerberos 4 - - * kdc: make sure kaserver token life is positive - - * telnet: use the session key if there is no subkey - - * fix EPSV parsing in ftp - - * other bug fixes - -Changes in release 0.5 - - * add --detach option to kdc - - * allow setting forward and forwardable option in telnet from - .telnetrc, with override from command line - - * accept addresses with or without ports in krb5_rd_cred - - * make it work with modern openssl - - * use our own string2key function even with openssl (that handles weak - keys incorrectly) - - * more system-specific requirements in login - - * do not use getlogin() to determine root in su - - * telnet: abort if telnetd does not support encryption - - * update autoconf to 2.53 - - * update config.guess, config.sub - - * other bug fixes - -Changes in release 0.4e - - * improve libcrypto and database autoconf tests - - * do not care about salting of server principals when serving v4 requests - - * some improvements to gssapi library - - * test for existing compile_et/libcom_err - - * portability fixes - - * bug fixes - -Changes in release 0.4d - - * fix some problems when using libcrypto from openssl - - * handle /dev/ptmx `unix98' ptys on Linux - - * add some forgotten man pages - - * rsh: clean-up and add man page - - * fix -A and -a in builtin-ls in tpd - - * fix building problem on Irix - - * make `ktutil get' more efficient - - * bug fixes - -Changes in release 0.4c - - * fix buffer overrun in telnetd - - * repair some of the v4 fallback code in kinit - - * add more shared library dependencies - - * simplify and fix hprop handling of v4 databases - - * fix some building problems (osf's sia and osfc2 login) - - * bug fixes - -Changes in release 0.4b - - * update the shared library version numbers correctly - -Changes in release 0.4a - - * corrected key used for checksum in mk_safe, unfortunately this - makes it backwards incompatible - - * update to autoconf 2.50, libtool 1.4 - - * re-write dns/config lookups (krb5_krbhst API) - - * make order of using subkeys consistent - - * add man page links - - * add more man pages - - * remove rfc2052 support, now only rfc2782 is supported - - * always build with kaserver protocol support in the KDC (assuming - KRB4 is enabled) and support for reading kaserver databases in - hprop - -Changes in release 0.3f - - * change default keytab to ANY:FILE:/etc/krb5.keytab,krb4:/etc/srvtab, - the new keytab type that tries both of these in order (SRVTAB is - also an alias for krb4:) - - * improve error reporting and error handling (error messages should - be more detailed and more useful) - - * improve building with openssl - - * add kadmin -K, rcp -F - - * fix two incorrect weak DES keys - - * fix building of kaserver compat in KDC - - * the API is closer to what MIT krb5 is using - - * more compatible with windows 2000 - - * removed some memory leaks - - * bug fixes - -Changes in release 0.3e - - * rcp program included - - * fix buffer overrun in ftpd - - * handle omitted sequence numbers as zeroes to handle MIT krb5 that - cannot generate zero sequence numbers - - * handle v4 /.k files better - - * configure/portability fixes - - * fixes in parsing of options to kadmin (sub-)commands - - * handle errors in kadmin load better - - * bug fixes - -Changes in release 0.3d - - * add krb5-config - - * fix a bug in 3des gss-api mechanism, making it compatible with the - specification and the MIT implementation - - * make telnetd only allow a specific list of environment variables to - stop it from setting `sensitive' variables - - * try to use an existing libdes - - * lib/krb5, kdc: use correct usage type for ap-req messages. This - should improve compatability with MIT krb5 when using 3DES - encryption types - - * kdc: fix memory allocation problem - - * update config.guess and config.sub - - * lib/roken: more stuff implemented - - * bug fixes and portability enhancements - -Changes in release 0.3c - - * lib/krb5: memory caches now support the resolve operation - - * appl/login: set PATH to some sane default - - * kadmind: handle several realms - - * bug fixes (including memory leaks) - -Changes in release 0.3b - - * kdc: prefer default-salted keys on v5 requests - - * kdc: lowercase hostnames in v4 mode - - * hprop: handle more types of MIT salts - - * lib/krb5: fix memory leak - - * bug fixes - -Changes in release 0.3a: - - * implement arcfour-hmac-md5 to interoperate with W2K - - * modularise the handling of the master key, and allow for other - encryption types. This makes it easier to import a database from - some other source without having to re-encrypt all keys. - - * allow for better control over which encryption types are created - - * make kinit fallback to v4 if given a v4 KDC - - * make klist work better with v4 and v5, and add some more MIT - compatibility options - - * make the kdc listen on the krb524 (4444) port for compatibility - with MIT krb5 clients - - * implement more DCE/DFS support, enabled with --enable-dce, see - lib/kdfs and appl/dceutils - - * make the sequence numbers work correctly - - * bug fixes - -Changes in release 0.2t: - - * bug fixes - -Changes in release 0.2s: - - * add OpenLDAP support in hdb - - * login will get v4 tickets when it receives forwarded tickets - - * xnlock supports both v5 and v4 - - * repair source routing for telnet - - * fix building problems with krb4 (krb_mk_req) - - * bug fixes - -Changes in release 0.2r: - - * fix realloc memory corruption bug in kdc - - * `add --key' and `cpw --key' in kadmin - - * klist supports listing v4 tickets - - * update config.guess and config.sub - - * make v4 -> v5 principal name conversion more robust - - * support for anonymous tickets - - * new man-pages - - * telnetd: do not negotiate KERBEROS5 authentication if there's no keytab. - - * use and set expiration and not password expiration when dumping - to/from ka server databases / krb4 databases - - * make the code happier with 64-bit time_t - - * follow RFC2782 and by default do not look for non-underscore SRV names - -Changes in release 0.2q: - - * bug fix in tcp-handling in kdc - - * bug fix in expand_hostname - -Changes in release 0.2p: - - * bug fix in `kadmin load/merge' - - * bug fix in krb5_parse_address - -Changes in release 0.2o: - - * gss_{import,export}_sec_context added to libgssapi - - * new option --addresses to kdc (for listening on an explicit set of - addresses) - - * bug fixes in the krb4 and kaserver emulation part of the kdc - - * other bug fixes - -Changes in release 0.2n: - - * more robust parsing of dump files in kadmin - * changed default timestamp format for log messages to extended ISO - 8601 format (Y-M-DTH:M:S) - * changed md4/md5/sha1 APIes to be de-facto `standard' - * always make hostname into lower-case before creating principal - * small bits of more MIT-compatability - * bug fixes - -Changes in release 0.2m: - - * handle glibc's getaddrinfo() that returns several ai_canonname - - * new endian test - - * man pages fixes - -Changes in release 0.2l: - - * bug fixes - -Changes in release 0.2k: - - * better IPv6 test - - * make struct sockaddr_storage in roken work better on alphas - - * some missing [hn]to[hn]s fixed. - - * allow users to change their own passwords with kadmin (with initial - tickets) - - * fix stupid bug in parsing KDC specification - - * add `ktutil change' and `ktutil purge' - -Changes in release 0.2j: - - * builds on Irix - - * ftpd works in passive mode - - * should build on cygwin - - * work around broken IPv6-code on OpenBSD 2.6, also add configure - option --disable-ipv6 - -Changes in release 0.2i: - - * use getaddrinfo in the missing places. - - * fix SRV lookup for admin server - - * use get{addr,name}info everywhere. and implement it in terms of - getipnodeby{name,addr} (which uses gethostbyname{,2} and - gethostbyaddr) - -Changes in release 0.2h: - - * fix typo in kx (now compiles) - -Changes in release 0.2g: - - * lots of bug fixes: - * push works - * repair appl/test programs - * sockaddr_storage works on solaris (alignment issues) - * works better with non-roken getaddrinfo - * rsh works - * some non standard C constructs removed - -Changes in release 0.2f: - - * support SRV records for kpasswd - * look for both _kerberos and krb5-realm when doing host -> realm mapping - -Changes in release 0.2e: - - * changed copyright notices to remove `advertising'-clause. - * get{addr,name}info added to roken and used in the other code - (this makes things work much better with hosts with both v4 and v6 - addresses, among other things) - * do pre-auth for both password and key-based get_in_tkt - * support for having several databases - * new command `del_enctype' in kadmin - * strptime (and new strftime) add to roken - * more paranoia about finding libdb - * bug fixes - -Changes in release 0.2d: - - * new configuration option [libdefaults]default_etypes_des - * internal ls in ftpd builds without KRB4 - * kx/rsh/push/pop_debug tries v5 and v4 consistenly - * build bug fixes - * other bug fixes - -Changes in release 0.2c: - - * bug fixes (see ChangeLog's for details) - -Changes in release 0.2b: - - * bug fixes - * actually bump shared library versions - -Changes in release 0.2a: - - * a new program verify_krb5_conf for checking your /etc/krb5.conf - * add 3DES keys when changing password - * support null keys in database - * support multiple local realms - * implement a keytab backend for AFS KeyFile's - * implement a keytab backend for v4 srvtabs - * implement `ktutil copy' - * support password quality control in v4 kadmind - * improvements in v4 compat kadmind - * handle the case of having the correct cred in the ccache but with - the wrong encryption type better - * v6-ify the remaining programs. - * internal ls in ftpd - * rename strcpy_truncate/strcat_truncate to strlcpy/strlcat - * add `ank --random-password' and `cpw --random-password' in kadmin - * some programs and documentation for trying to talk to a W2K KDC - * bug fixes - -Changes in release 0.1m: - - * support for getting default from krb5.conf for kinit/kf/rsh/telnet. - From Miroslav Ruda - * v6-ify hprop and hpropd - * support numeric addresses in krb5_mk_req - * shadow support in login and su. From Miroslav Ruda - * make rsh/rshd IPv6-aware - * make the gssapi sample applications better at reporting errors - * lots of bug fixes - * handle systems with v6-aware libc and non-v6 kernels (like Linux - with glibc 2.1) better - * hide failure of ERPT in ftp - * lots of bug fixes - -Changes in release 0.1l: - - * make ftp and ftpd IPv6-aware - * add inet_pton to roken - * more IPv6-awareness - * make mini_inetd v6 aware - -Changes in release 0.1k: - - * bump shared libraries versions - * add roken version of inet_ntop - * merge more changes to rshd - -Changes in release 0.1j: - - * restore back to the `old' 3DES code. This was supposed to be done - in 0.1h and 0.1i but I did a CVS screw-up. - * make telnetd handle v6 connections - -Changes in release 0.1i: - - * start using `struct sockaddr_storage' which simplifies the code - (with a fallback definition if it's not defined) - * bug fixes (including in hprop and kf) - * don't use mawk which seems to mishandle roken.awk - * get_addrs should be able to handle v6 addresses on Linux (with the - required patch to the Linux kernel -- ask within) - * rshd builds with shadow passwords - -Changes in release 0.1h: - - * kf: new program for forwarding credentials - * portability fixes - * make forwarding credentials work with MIT code - * better conversion of ka database - * add etc/services.append - * correct `modified by' from kpasswdd - * lots of bug fixes - -Changes in release 0.1g: - - * kgetcred: new program for explicitly obtaining tickets - * configure fixes - * krb5-aware kx - * bug fixes - -Changes in release 0.1f; - - * experimental support for v4 kadmin protokoll in kadmind - * bug fixes - -Changes in release 0.1e: - - * try to handle old DCE and MIT kdcs - * support for older versions of credential cache files and keytabs - * postdated tickets work - * support for password quality checks in kpasswdd - * new flag --enable-kaserver for kdc - * renew fixes - * prototype su program - * updated (some) manpages - * support for KDC resource records - * should build with --without-krb4 - * bug fixes - -Changes in release 0.1d: - - * Support building with DB2 (uses 1.85-compat API) - * Support krb5-realm.DOMAIN in DNS - * new `ktutil srvcreate' - * v4/kafs support in klist/kdestroy - * bug fixes - -Changes in release 0.1c: - - * fix ASN.1 encoding of signed integers - * somewhat working `ktutil get' - * some documentation updates - * update to Autoconf 2.13 and Automake 1.4 - * the usual bug fixes - -Changes in release 0.1b: - - * some old -> new crypto conversion utils - * bug fixes - -Changes in release 0.1a: - - * new crypto code - * more bug fixes - * make sure we ask for DES keys in gssapi - * support signed ints in ASN1 - * IPv6-bug fixes - -Changes in release 0.0u: - - * lots of bug fixes - -Changes in release 0.0t: - - * more robust parsing of krb5.conf - * include net{read,write} in lib/roken - * bug fixes - -Changes in release 0.0s: - - * kludges for parsing options to rsh - * more robust parsing of krb5.conf - * removed some arbitrary limits - * bug fixes - -Changes in release 0.0r: - - * default options for some programs - * bug fixes - -Changes in release 0.0q: - - * support for building shared libraries with libtool - * bug fixes - -Changes in release 0.0p: - - * keytab moved to /etc/krb5.keytab - * avoid false detection of IPv6 on Linux - * Lots of more functionality in the gssapi-library - * hprop can now read ka-server databases - * bug fixes - -Changes in release 0.0o: - - * FTP with GSSAPI support. - * Bug fixes. - -Changes in release 0.0n: - - * Incremental database propagation. - * Somewhat improved kadmin ui; the stuff in admin is now removed. - * Some support for using enctypes instead of keytypes. - * Lots of other improvement and bug fixes, see ChangeLog for details. diff --git a/kerberosV/src/NTMakefile b/kerberosV/src/NTMakefile deleted file mode 100644 index fcd60a3d3cb..00000000000 --- a/kerberosV/src/NTMakefile +++ /dev/null @@ -1,42 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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 exist(thirdparty/NTMakefile) -thirdparty=thirdparty -!endif - -SUBDIRS = include lib\roken base lib kuser kdc admin kadmin kpasswd appl doc \ - tools tests packages etc $(thirdparty) packages\windows\installer - -!include windows/NTMakefile.w32 - -all:: - @echo Build finished succesfully diff --git a/kerberosV/src/README b/kerberosV/src/README deleted file mode 100644 index d2c4eba8ce6..00000000000 --- a/kerberosV/src/README +++ /dev/null @@ -1,18 +0,0 @@ - -Heimdal is a Kerberos 5 implementation. - -For information how to install see . - -There are briefer man pages for most of the commands. - -Bug reports and bugs are appreciated, see more under Bug reports in -the manual on how we prefer them: . - -For more information see the web-page at - or the mailing lists: - -heimdal-announce@sics.se low-volume announcement -heimdal-discuss@sics.se high-volume discussion - -send a mail to heimdal-announce-request@sics.se and -heimdal-discuss-request@sics.se respectively to subscribe. diff --git a/kerberosV/src/TODO b/kerberosV/src/TODO deleted file mode 100644 index 87c50b82b02..00000000000 --- a/kerberosV/src/TODO +++ /dev/null @@ -1,30 +0,0 @@ --*- indented-text -*- - -** lib/gssapi - -cache delegation credentials to avoid hitting the kdc ? require time -stampless tickets, and was supported in the recv'ing end with 0.6.1. - -make iov work for arcfour - -make iov work for ntlm - -interop test - -make TYPE_STREAM work - -** lib/kadm5 - -add policies? - -** lib/krb5 - -verify_user: handle non-secure verification failing because of -host->realm mapping - -* windows stuff - --- drop all double negation #ifndef NO_ --- got though windows specific ifdefs to minimized them --- switch to use heim-ipc for services, like the kadmin change notification socket --- Unify lib/krb5/expand_path_w32.c diff --git a/kerberosV/src/acinclude.m4 b/kerberosV/src/acinclude.m4 deleted file mode 100644 index 7d4f1b6bf28..00000000000 --- a/kerberosV/src/acinclude.m4 +++ /dev/null @@ -1,9 +0,0 @@ -dnl $Id: acinclude.m4,v 1.2 2013/06/17 18:57:39 robert 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 -m4_define([upcase],`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`)dnl diff --git a/kerberosV/src/aclocal.m4 b/kerberosV/src/aclocal.m4 deleted file mode 100644 index 005a99fb2c1..00000000000 --- a/kerberosV/src/aclocal.m4 +++ /dev/null @@ -1,1111 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file 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. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file 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. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 5 - -# AM_PROG_LEX -# ----------- -# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a -# "missing" invocation, for better error output. -AC_DEFUN([AM_PROG_LEX], -[AC_PREREQ(2.50)dnl -AC_REQUIRE([AM_MISSING_HAS_RUN])dnl -AC_REQUIRE([AC_PROG_LEX])dnl -if test "$LEX" = :; then - LEX=${am_missing_run}flex -fi]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 5 - -# AM_MAINTAINER_MODE([DEFAULT-MODE]) -# ---------------------------------- -# Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user -# can override the default with the --enable/--disable switch. -AC_DEFUN([AM_MAINTAINER_MODE], -[m4_case(m4_default([$1], [disable]), - [enable], [m4_define([am_maintainer_other], [disable])], - [disable], [m4_define([am_maintainer_other], [enable])], - [m4_define([am_maintainer_other], [enable]) - m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) - dnl maintainer-mode's default is 'disable' unless 'enable' is passed - AC_ARG_ENABLE([maintainer-mode], -[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST([MAINT])dnl -] -) - -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file 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. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([cf/aix.m4]) -m4_include([cf/auth-modules.m4]) -m4_include([cf/broken-getaddrinfo.m4]) -m4_include([cf/broken-glob.m4]) -m4_include([cf/broken-realloc.m4]) -m4_include([cf/broken-snprintf.m4]) -m4_include([cf/broken.m4]) -m4_include([cf/broken2.m4]) -m4_include([cf/c-attribute.m4]) -m4_include([cf/capabilities.m4]) -m4_include([cf/check-compile-et.m4]) -m4_include([cf/check-getpwnam_r-posix.m4]) -m4_include([cf/check-man.m4]) -m4_include([cf/check-netinet-ip-and-tcp.m4]) -m4_include([cf/check-type-extra.m4]) -m4_include([cf/check-var.m4]) -m4_include([cf/check-x.m4]) -m4_include([cf/check-xau.m4]) -m4_include([cf/crypto.m4]) -m4_include([cf/db.m4]) -m4_include([cf/destdirs.m4]) -m4_include([cf/dispatch.m4]) -m4_include([cf/dlopen.m4]) -m4_include([cf/find-func-no-libs.m4]) -m4_include([cf/find-func-no-libs2.m4]) -m4_include([cf/find-func.m4]) -m4_include([cf/find-if-not-broken.m4]) -m4_include([cf/framework-security.m4]) -m4_include([cf/have-struct-field.m4]) -m4_include([cf/have-type.m4]) -m4_include([cf/irix.m4]) -m4_include([cf/krb-bigendian.m4]) -m4_include([cf/krb-func-getlogin.m4]) -m4_include([cf/krb-ipv6.m4]) -m4_include([cf/krb-prog-ln-s.m4]) -m4_include([cf/krb-readline.m4]) -m4_include([cf/krb-struct-spwd.m4]) -m4_include([cf/krb-struct-winsize.m4]) -m4_include([cf/largefile.m4]) -m4_include([cf/libtool.m4]) -m4_include([cf/ltoptions.m4]) -m4_include([cf/ltsugar.m4]) -m4_include([cf/ltversion.m4]) -m4_include([cf/lt~obsolete.m4]) -m4_include([cf/mips-abi.m4]) -m4_include([cf/misc.m4]) -m4_include([cf/need-proto.m4]) -m4_include([cf/osfc2.m4]) -m4_include([cf/otp.m4]) -m4_include([cf/pkg.m4]) -m4_include([cf/proto-compat.m4]) -m4_include([cf/pthreads.m4]) -m4_include([cf/resolv.m4]) -m4_include([cf/retsigtype.m4]) -m4_include([cf/roken-frag.m4]) -m4_include([cf/socket-wrapper.m4]) -m4_include([cf/sunos.m4]) -m4_include([cf/telnet.m4]) -m4_include([cf/test-package.m4]) -m4_include([cf/version-script.m4]) -m4_include([cf/wflags.m4]) -m4_include([cf/win32.m4]) -m4_include([cf/with-all.m4]) -m4_include([acinclude.m4]) diff --git a/kerberosV/src/admin/ChangeLog b/kerberosV/src/admin/ChangeLog deleted file mode 100644 index 1cdc1536bc8..00000000000 --- a/kerberosV/src/admin/ChangeLog +++ /dev/null @@ -1,70 +0,0 @@ -2006-10-07 Love Hörnquist Åstrand - - * Makefile.am: Add man_MANS to EXTRA_DIST - - * Makefile.am: split build files into dist_ and noinst_ SOURCES - -2005-07-07 Love Hörnquist Åstrand - - * ktutil.c: rename optind to optidx - - * list.c: make a copy of realm and admin_server to avoid - un-consting avoid shadowing - - * get.c: make a copy of realm and admin_server to avoid - un-consting avoid shadowing - - * change.c (change_entry): just use global context to avoid - shadowing; make a copy of realm and admin_server to avoid - un-consting. - -2005-05-19 Love Hörnquist Åstrand - - * change.c (kt_change): plug memory leak from - krb5_kt_remove_entry, print principal on error. - -2005-05-02 Dave Love - - * ktutil.c (help): Don't use non-constant initializer for `fake'. - -2005-04-15 Love Hörnquist Åstrand - - * ktutil_locl.h: include - -2005-04-14 Love Hörnquist Åstrand - - * add.c: add option -H --hex to the add command - - * ktutil-commands.in: add option -H --hex to the add command - - * ktutil.8: document option -H --hex to the add command - -2004-09-29 Love Hörnquist Åstrand - - * list.c: un c99'ify, from Anders.Magnusson@ltu.se - -2004-09-23 Johan Danielsson - - * purge.c: convert to slc; don't purge keys older that a certain - time, instead purge keys that have newer versions that are at - least a certain age - - * rename.c: convert to slc - - * remove.c: convert to slc - - * get.c: convert to slc; warn if resetting disallow-all-tix - - * copy.c: convert to slc - - * change.c: convert to slc - - * add.c: convert to slc - - * list.c: convert to slc - - * ktutil_locl.h: convert to slc - - * ktutil.c: convert to slc - - * ktutil-commands.in: slc source file diff --git a/kerberosV/src/admin/Makefile.am b/kerberosV/src/admin/Makefile.am deleted file mode 100644 index 84a5c9094ee..00000000000 --- a/kerberosV/src/admin/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:40 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(INCLUDE_readline) $(INCLUDE_hcrypto) - -man_MANS = ktutil.8 - -sbin_PROGRAMS = ktutil - -dist_ktutil_SOURCES = \ - add.c \ - change.c \ - copy.c \ - destroy.c \ - get.c \ - ktutil.c \ - ktutil_locl.h \ - list.c \ - purge.c \ - remove.c \ - rename.c - -nodist_ktutil_SOURCES = \ - ktutil-commands.c - -$(ktutil_OBJECTS): ktutil-commands.h - -CLEANFILES = ktutil-commands.h ktutil-commands.c - -ktutil-commands.c ktutil-commands.h: ktutil-commands.in - $(SLC) $(srcdir)/ktutil-commands.in - -LDADD = \ - $(top_builddir)/lib/kadm5/libkadm5clnt.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/sl/libsl.la \ - $(LIB_readline) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile ktutil-version.rc $(man_MANS) ktutil-commands.in diff --git a/kerberosV/src/admin/Makefile.in b/kerberosV/src/admin/Makefile.in deleted file mode 100644 index dcc903cc0dd..00000000000 --- a/kerberosV/src/admin/Makefile.in +++ /dev/null @@ -1,996 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -sbin_PROGRAMS = ktutil$(EXEEXT) -subdir = admin -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" -PROGRAMS = $(sbin_PROGRAMS) -dist_ktutil_OBJECTS = add.$(OBJEXT) change.$(OBJEXT) copy.$(OBJEXT) \ - destroy.$(OBJEXT) get.$(OBJEXT) ktutil.$(OBJEXT) \ - list.$(OBJEXT) purge.$(OBJEXT) remove.$(OBJEXT) \ - rename.$(OBJEXT) -nodist_ktutil_OBJECTS = ktutil-commands.$(OBJEXT) -ktutil_OBJECTS = $(dist_ktutil_OBJECTS) $(nodist_ktutil_OBJECTS) -ktutil_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -ktutil_DEPENDENCIES = $(top_builddir)/lib/kadm5/libkadm5clnt.la \ - $(top_builddir)/lib/krb5/libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/sl/libsl.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(dist_ktutil_SOURCES) $(nodist_ktutil_SOURCES) -DIST_SOURCES = $(dist_ktutil_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man8dir = $(mandir)/man8 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(INCLUDE_readline) $(INCLUDE_hcrypto) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -man_MANS = ktutil.8 -dist_ktutil_SOURCES = \ - add.c \ - change.c \ - copy.c \ - destroy.c \ - get.c \ - ktutil.c \ - ktutil_locl.h \ - list.c \ - purge.c \ - remove.c \ - rename.c - -nodist_ktutil_SOURCES = \ - ktutil-commands.c - -CLEANFILES = ktutil-commands.h ktutil-commands.c -LDADD = \ - $(top_builddir)/lib/kadm5/libkadm5clnt.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/sl/libsl.la \ - $(LIB_readline) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile ktutil-version.rc $(man_MANS) ktutil-commands.in -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign admin/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign admin/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-sbinPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-sbinPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(sbindir)" && rm -f $$files - -clean-sbinPROGRAMS: - @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -ktutil$(EXEEXT): $(ktutil_OBJECTS) $(ktutil_DEPENDENCIES) - @rm -f ktutil$(EXEEXT) - $(LINK) $(ktutil_OBJECTS) $(ktutil_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/change.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/destroy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ktutil-commands.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ktutil.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/purge.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remove.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-man uninstall-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man8 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libtool clean-sbinPROGRAMS ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am install-man \ - install-man8 install-pdf install-pdf-am install-ps \ - install-ps-am install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook uninstall-man \ - uninstall-man8 uninstall-sbinPROGRAMS - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -$(ktutil_OBJECTS): ktutil-commands.h - -ktutil-commands.c ktutil-commands.h: ktutil-commands.in - $(SLC) $(srcdir)/ktutil-commands.in - -# 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/kerberosV/src/admin/NTMakefile b/kerberosV/src/admin/NTMakefile deleted file mode 100644 index 06f90c9fdbf..00000000000 --- a/kerberosV/src/admin/NTMakefile +++ /dev/null @@ -1,74 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=admin -cincdirs=$(cincdirs) -I$(OBJ) -!include ../windows/NTMakefile.w32 - -SBINPROGRAMS=$(SBINDIR)\ktutil.exe - -KTUTIL_OBJS= \ - $(OBJ)\add.obj \ - $(OBJ)\change.obj \ - $(OBJ)\copy.obj \ - $(OBJ)\destroy.obj \ - $(OBJ)\get.obj \ - $(OBJ)\ktutil.obj \ - $(OBJ)\ktutil-commands.obj \ - $(OBJ)\list.obj \ - $(OBJ)\purge.obj \ - $(OBJ)\remove.obj \ - $(OBJ)\rename.obj - -KTUTIL_LIBS= \ - $(LIBHEIMDAL) \ - $(LIBKADM5SRV) \ - $(LIBSL) \ - $(LIBROKEN) \ - $(LIBVERS) - -$(SBINDIR)\ktutil.exe: $(KTUTIL_OBJS) $(KTUTIL_LIBS) $(OBJ)\ktutil-version.res - $(EXECONLINK) - $(EXEPREP) - -$(OBJ)\ktutil-commands.c $(OBJ)\ktutil-commands.h: ktutil-commands.in - cd $(OBJ) - $(CP) $(SRCDIR)\ktutil-commands.in $(OBJ) - $(BINDIR)\slc.exe ktutil-commands.in - cd $(SRCDIR) - -INCFILES=\ - $(OBJ)\ktutil-commands.h - -all:: $(INCFILES) $(SBINPROGRAMS) - -clean:: - -$(RM) $(SBINPROGRAMS:.exe=.*) diff --git a/kerberosV/src/admin/add.c b/kerberosV/src/admin/add.c deleted file mode 100644 index 0f7d8c92b14..00000000000 --- a/kerberosV/src/admin/add.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 1997-2005 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 "ktutil_locl.h" - -RCSID("$Id: add.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -static char * -readstring(const char *prompt, char *buf, size_t len) -{ - printf("%s", prompt); - if (fgets(buf, len, stdin) == NULL) - return NULL; - buf[strcspn(buf, "\r\n")] = '\0'; - return buf; -} - -int -kt_add(struct add_options *opt, int argc, char **argv) -{ - krb5_error_code ret; - krb5_keytab keytab; - krb5_keytab_entry entry; - char buf[1024]; - krb5_enctype enctype; - - if((keytab = ktutil_open_keytab()) == NULL) - return 1; - - memset(&entry, 0, sizeof(entry)); - if(opt->principal_string == NULL) { - if(readstring("Principal: ", buf, sizeof(buf)) == NULL) - return 1; - opt->principal_string = buf; - } - ret = krb5_parse_name(context, opt->principal_string, &entry.principal); - if(ret) { - krb5_warn(context, ret, "%s", opt->principal_string); - goto out; - } - if(opt->enctype_string == NULL) { - if(readstring("Encryption type: ", buf, sizeof(buf)) == NULL) { - ret = 1; - goto out; - } - opt->enctype_string = buf; - } - ret = krb5_string_to_enctype(context, opt->enctype_string, &enctype); - if(ret) { - int t; - if(sscanf(opt->enctype_string, "%d", &t) == 1) - enctype = t; - else { - krb5_warn(context, ret, "%s", opt->enctype_string); - goto out; - } - } - if(opt->kvno_integer == -1) { - if(readstring("Key version: ", buf, sizeof(buf)) == NULL) { - ret = 1; - goto out; - } - if(sscanf(buf, "%u", &opt->kvno_integer) != 1) - goto out; - } - if(opt->password_string == NULL && opt->random_flag == 0) { - if(UI_UTIL_read_pw_string(buf, sizeof(buf), "Password: ", 1)) { - ret = 1; - goto out; - } - opt->password_string = buf; - } - if(opt->password_string) { - if (opt->hex_flag) { - size_t len; - void *data; - - len = (strlen(opt->password_string) + 1) / 2; - - data = malloc(len); - if (data == NULL) { - krb5_warn(context, ENOMEM, "malloc"); - goto out; - } - - if ((size_t)hex_decode(opt->password_string, data, len) != len) { - free(data); - krb5_warn(context, ENOMEM, "hex decode failed"); - goto out; - } - - ret = krb5_keyblock_init(context, enctype, - data, len, &entry.keyblock); - free(data); - } else if (!opt->salt_flag) { - krb5_salt salt; - krb5_data pw; - - salt.salttype = KRB5_PW_SALT; - salt.saltvalue.data = NULL; - salt.saltvalue.length = 0; - pw.data = (void*)opt->password_string; - pw.length = strlen(opt->password_string); - ret = krb5_string_to_key_data_salt(context, enctype, pw, salt, - &entry.keyblock); - } else { - ret = krb5_string_to_key(context, enctype, opt->password_string, - entry.principal, &entry.keyblock); - } - memset (opt->password_string, 0, strlen(opt->password_string)); - } else { - ret = krb5_generate_random_keyblock(context, enctype, &entry.keyblock); - } - if(ret) { - krb5_warn(context, ret, "add"); - goto out; - } - entry.vno = opt->kvno_integer; - entry.timestamp = time (NULL); - ret = krb5_kt_add_entry(context, keytab, &entry); - if(ret) - krb5_warn(context, ret, "add"); - out: - krb5_kt_free_entry(context, &entry); - krb5_kt_close(context, keytab); - return ret != 0; -} diff --git a/kerberosV/src/admin/change.c b/kerberosV/src/admin/change.c deleted file mode 100644 index 217a618bc47..00000000000 --- a/kerberosV/src/admin/change.c +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright (c) 1997-2005 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 "ktutil_locl.h" - -RCSID("$Id: change.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -static krb5_error_code -change_entry (krb5_keytab keytab, - krb5_principal principal, krb5_kvno kvno, - const char *realm, const char *admin_server, int server_port) -{ - krb5_error_code ret; - kadm5_config_params conf; - void *kadm_handle; - char *client_name; - krb5_keyblock *keys; - int num_keys; - int i; - - ret = krb5_unparse_name (context, principal, &client_name); - if (ret) { - krb5_warn (context, ret, "krb5_unparse_name"); - return ret; - } - - memset (&conf, 0, sizeof(conf)); - - if(realm == NULL) - realm = krb5_principal_get_realm(context, principal); - conf.realm = strdup(realm); - if (conf.realm == NULL) { - free (client_name); - krb5_set_error_message(context, ENOMEM, "malloc failed"); - return ENOMEM; - } - conf.mask |= KADM5_CONFIG_REALM; - - if (admin_server) { - conf.admin_server = strdup(admin_server); - if (conf.admin_server == NULL) { - free(client_name); - free(conf.realm); - krb5_set_error_message(context, ENOMEM, "malloc failed"); - return ENOMEM; - } - conf.mask |= KADM5_CONFIG_ADMIN_SERVER; - } - - if (server_port) { - conf.kadmind_port = htons(server_port); - conf.mask |= KADM5_CONFIG_KADMIND_PORT; - } - - ret = kadm5_init_with_skey_ctx (context, - client_name, - keytab_string, - KADM5_ADMIN_SERVICE, - &conf, 0, 0, - &kadm_handle); - free(conf.admin_server); - free(conf.realm); - if (ret) { - krb5_warn (context, ret, - "kadm5_c_init_with_skey_ctx: %s:", client_name); - free (client_name); - return ret; - } - ret = kadm5_randkey_principal (kadm_handle, principal, &keys, &num_keys); - kadm5_destroy (kadm_handle); - if (ret) { - krb5_warn(context, ret, "kadm5_randkey_principal: %s:", client_name); - free (client_name); - return ret; - } - free (client_name); - for (i = 0; i < num_keys; ++i) { - krb5_keytab_entry new_entry; - - new_entry.principal = principal; - new_entry.timestamp = time (NULL); - new_entry.vno = kvno + 1; - new_entry.keyblock = keys[i]; - - ret = krb5_kt_add_entry (context, keytab, &new_entry); - if (ret) - krb5_warn (context, ret, "krb5_kt_add_entry"); - krb5_free_keyblock_contents (context, &keys[i]); - } - return ret; -} - -/* - * loop over all the entries in the keytab (or those given) and change - * their keys, writing the new keys - */ - -struct change_set { - krb5_principal principal; - krb5_kvno kvno; -}; - -int -kt_change (struct change_options *opt, int argc, char **argv) -{ - krb5_error_code ret; - krb5_keytab keytab; - krb5_kt_cursor cursor; - krb5_keytab_entry entry; - int i, j, max; - struct change_set *changeset; - int errors = 0; - - if((keytab = ktutil_open_keytab()) == NULL) - return 1; - - j = 0; - max = 0; - changeset = NULL; - - ret = krb5_kt_start_seq_get(context, keytab, &cursor); - if(ret){ - krb5_warn(context, ret, "%s", keytab_string); - goto out; - } - - while((ret = krb5_kt_next_entry(context, keytab, &entry, &cursor)) == 0) { - int add = 0; - - for (i = 0; i < j; ++i) { - if (krb5_principal_compare (context, changeset[i].principal, - entry.principal)) { - if (changeset[i].kvno < entry.vno) - changeset[i].kvno = entry.vno; - break; - } - } - if (i < j) { - krb5_kt_free_entry (context, &entry); - continue; - } - - if (argc == 0) { - add = 1; - } else { - for (i = 0; i < argc; ++i) { - krb5_principal princ; - - ret = krb5_parse_name (context, argv[i], &princ); - if (ret) { - krb5_warn (context, ret, "%s", argv[i]); - continue; - } - if (krb5_principal_compare (context, princ, entry.principal)) - add = 1; - - krb5_free_principal (context, princ); - } - } - - if (add) { - if (j >= max) { - void *tmp; - - max = max(max * 2, 1); - tmp = realloc (changeset, max * sizeof(*changeset)); - if (tmp == NULL) { - krb5_kt_free_entry (context, &entry); - krb5_warnx (context, "realloc: out of memory"); - ret = ENOMEM; - break; - } - changeset = tmp; - } - ret = krb5_copy_principal (context, entry.principal, - &changeset[j].principal); - if (ret) { - krb5_warn (context, ret, "krb5_copy_principal"); - krb5_kt_free_entry (context, &entry); - break; - } - changeset[j].kvno = entry.vno; - ++j; - } - krb5_kt_free_entry (context, &entry); - } - krb5_kt_end_seq_get(context, keytab, &cursor); - - if (ret == KRB5_KT_END) { - ret = 0; - for (i = 0; i < j; i++) { - if (verbose_flag) { - char *client_name; - - ret = krb5_unparse_name (context, changeset[i].principal, - &client_name); - if (ret) { - krb5_warn (context, ret, "krb5_unparse_name"); - } else { - printf("Changing %s kvno %d\n", - client_name, changeset[i].kvno); - free(client_name); - } - } - ret = change_entry (keytab, - changeset[i].principal, changeset[i].kvno, - opt->realm_string, - opt->admin_server_string, - opt->server_port_integer); - if (ret != 0) - errors = 1; - } - } else - errors = 1; - for (i = 0; i < j; i++) - krb5_free_principal (context, changeset[i].principal); - free (changeset); - - out: - krb5_kt_close(context, keytab); - return errors; -} diff --git a/kerberosV/src/admin/copy.c b/kerberosV/src/admin/copy.c deleted file mode 100644 index 2f2b05666d5..00000000000 --- a/kerberosV/src/admin/copy.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 1997-2004 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 "ktutil_locl.h" - -RCSID("$Id: copy.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - - -static krb5_boolean -compare_keyblock(const krb5_keyblock *a, const krb5_keyblock *b) -{ - if(a->keytype != b->keytype || - a->keyvalue.length != b->keyvalue.length || - memcmp(a->keyvalue.data, b->keyvalue.data, a->keyvalue.length) != 0) - return FALSE; - return TRUE; -} - -int -kt_copy (void *opt, int argc, char **argv) -{ - krb5_error_code ret; - krb5_keytab src_keytab, dst_keytab; - krb5_kt_cursor cursor; - krb5_keytab_entry entry, dummy; - const char *from = argv[0]; - const char *to = argv[1]; - - ret = krb5_kt_resolve (context, from, &src_keytab); - if (ret) { - krb5_warn (context, ret, "resolving src keytab `%s'", from); - return 1; - } - - ret = krb5_kt_resolve (context, to, &dst_keytab); - if (ret) { - krb5_kt_close (context, src_keytab); - krb5_warn (context, ret, "resolving dst keytab `%s'", to); - return 1; - } - - ret = krb5_kt_start_seq_get (context, src_keytab, &cursor); - if (ret) { - krb5_warn (context, ret, "krb5_kt_start_seq_get %s", keytab_string); - goto out; - } - - if (verbose_flag) - fprintf(stderr, "copying %s to %s\n", from, to); - - while((ret = krb5_kt_next_entry(context, src_keytab, - &entry, &cursor)) == 0) { - char *name_str; - char *etype_str; - ret = krb5_unparse_name (context, entry.principal, &name_str); - if(ret) { - krb5_warn(context, ret, "krb5_unparse_name"); - name_str = NULL; /* XXX */ - } - ret = krb5_enctype_to_string(context, entry.keyblock.keytype, &etype_str); - if(ret) { - krb5_warn(context, ret, "krb5_enctype_to_string"); - etype_str = NULL; /* XXX */ - } - ret = krb5_kt_get_entry(context, dst_keytab, - entry.principal, - entry.vno, - entry.keyblock.keytype, - &dummy); - if(ret == 0) { - /* this entry is already in the new keytab, so no need to - copy it; if the keyblocks are not the same, something - is weird, so complain about that */ - if(!compare_keyblock(&entry.keyblock, &dummy.keyblock)) { - krb5_warnx(context, "entry with different keyvalue " - "already exists for %s, keytype %s, kvno %d", - name_str, etype_str, entry.vno); - } - krb5_kt_free_entry(context, &dummy); - krb5_kt_free_entry (context, &entry); - free(name_str); - free(etype_str); - continue; - } else if(ret != KRB5_KT_NOTFOUND) { - krb5_warn (context, ret, "%s: fetching %s/%s/%u", - to, name_str, etype_str, entry.vno); - krb5_kt_free_entry (context, &entry); - free(name_str); - free(etype_str); - break; - } - if (verbose_flag) - fprintf (stderr, "copying %s, keytype %s, kvno %d\n", name_str, - etype_str, entry.vno); - ret = krb5_kt_add_entry (context, dst_keytab, &entry); - krb5_kt_free_entry (context, &entry); - if (ret) { - krb5_warn (context, ret, "%s: adding %s/%s/%u", - to, name_str, etype_str, entry.vno); - free(name_str); - free(etype_str); - break; - } - free(name_str); - free(etype_str); - } - krb5_kt_end_seq_get (context, src_keytab, &cursor); - - out: - krb5_kt_close (context, src_keytab); - krb5_kt_close (context, dst_keytab); - return ret != 0; -} diff --git a/kerberosV/src/admin/destroy.c b/kerberosV/src/admin/destroy.c deleted file mode 100644 index 0e989d904fd..00000000000 --- a/kerberosV/src/admin/destroy.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2009 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 "ktutil_locl.h" - -int -kt_destroy (void *opt, int argc, char **argv) -{ - krb5_error_code ret; - krb5_keytab keytab; - - if((keytab = ktutil_open_keytab()) == NULL) - return 1; - - ret = krb5_kt_destroy (context, keytab); - if (ret) { - krb5_warn (context, ret, "destroy keytab failed"); - return 1; - } - - return 0; -} diff --git a/kerberosV/src/admin/get.c b/kerberosV/src/admin/get.c deleted file mode 100644 index ca5d45b202c..00000000000 --- a/kerberosV/src/admin/get.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (c) 1997-2004 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 "ktutil_locl.h" - -RCSID("$Id: get.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -static void* -open_kadmin_connection(char *principal, - const char *realm, - char *admin_server, - int server_port) -{ - static kadm5_config_params conf; - krb5_error_code ret; - void *kadm_handle; - memset(&conf, 0, sizeof(conf)); - - if(realm) { - conf.realm = strdup(realm); - if (conf.realm == NULL) { - krb5_set_error_message(context, 0, "malloc: out of memory"); - return NULL; - } - conf.mask |= KADM5_CONFIG_REALM; - } - - if (admin_server) { - conf.admin_server = admin_server; - conf.mask |= KADM5_CONFIG_ADMIN_SERVER; - } - - if (server_port) { - conf.kadmind_port = htons(server_port); - conf.mask |= KADM5_CONFIG_KADMIND_PORT; - } - - /* should get realm from each principal, instead of doing - everything with the same (local) realm */ - - ret = kadm5_init_with_password_ctx(context, - principal, - NULL, - KADM5_ADMIN_SERVICE, - &conf, 0, 0, - &kadm_handle); - free(conf.realm); - if(ret) { - krb5_warn(context, ret, "kadm5_init_with_password"); - return NULL; - } - return kadm_handle; -} - -int -kt_get(struct get_options *opt, int argc, char **argv) -{ - krb5_error_code ret = 0; - krb5_keytab keytab; - void *kadm_handle = NULL; - krb5_enctype *etypes = NULL; - size_t netypes = 0; - size_t i; - int a, j; - unsigned int failed = 0; - - if((keytab = ktutil_open_keytab()) == NULL) - return 1; - - if(opt->realm_string) - krb5_set_default_realm(context, opt->realm_string); - - if (opt->enctypes_strings.num_strings != 0) { - - etypes = malloc (opt->enctypes_strings.num_strings * sizeof(*etypes)); - if (etypes == NULL) { - krb5_warnx(context, "malloc failed"); - goto out; - } - netypes = opt->enctypes_strings.num_strings; - for(i = 0; i < netypes; i++) { - ret = krb5_string_to_enctype(context, - opt->enctypes_strings.strings[i], - &etypes[i]); - if(ret) { - krb5_warnx(context, "unrecognized enctype: %s", - opt->enctypes_strings.strings[i]); - goto out; - } - } - } - - - for(a = 0; a < argc; a++){ - krb5_principal princ_ent; - kadm5_principal_ent_rec princ; - int mask = 0; - krb5_keyblock *keys; - int n_keys; - int created = 0; - krb5_keytab_entry entry; - - ret = krb5_parse_name(context, argv[a], &princ_ent); - if (ret) { - krb5_warn(context, ret, "can't parse principal %s", argv[a]); - failed++; - continue; - } - memset(&princ, 0, sizeof(princ)); - princ.principal = princ_ent; - mask |= KADM5_PRINCIPAL; - princ.attributes |= KRB5_KDB_DISALLOW_ALL_TIX; - mask |= KADM5_ATTRIBUTES; - princ.princ_expire_time = 0; - mask |= KADM5_PRINC_EXPIRE_TIME; - - if(kadm_handle == NULL) { - const char *r; - if(opt->realm_string != NULL) - r = opt->realm_string; - else - r = krb5_principal_get_realm(context, princ_ent); - kadm_handle = open_kadmin_connection(opt->principal_string, - r, - opt->admin_server_string, - opt->server_port_integer); - if(kadm_handle == NULL) - break; - } - - ret = kadm5_create_principal(kadm_handle, &princ, mask, "x"); - if(ret == 0) - created = 1; - else if(ret != KADM5_DUP) { - krb5_warn(context, ret, "kadm5_create_principal(%s)", argv[a]); - krb5_free_principal(context, princ_ent); - failed++; - continue; - } - ret = kadm5_randkey_principal(kadm_handle, princ_ent, &keys, &n_keys); - if (ret) { - krb5_warn(context, ret, "kadm5_randkey_principal(%s)", argv[a]); - krb5_free_principal(context, princ_ent); - failed++; - continue; - } - - ret = kadm5_get_principal(kadm_handle, princ_ent, &princ, - KADM5_PRINCIPAL | KADM5_KVNO | KADM5_ATTRIBUTES); - if (ret) { - krb5_warn(context, ret, "kadm5_get_principal(%s)", argv[a]); - for (j = 0; j < n_keys; j++) - krb5_free_keyblock_contents(context, &keys[j]); - krb5_free_principal(context, princ_ent); - failed++; - continue; - } - if(!created && (princ.attributes & KRB5_KDB_DISALLOW_ALL_TIX)) - krb5_warnx(context, "%s: disallow-all-tix flag set - clearing", argv[a]); - princ.attributes &= (~KRB5_KDB_DISALLOW_ALL_TIX); - mask = KADM5_ATTRIBUTES; - if(created) { - princ.kvno = 1; - mask |= KADM5_KVNO; - } - ret = kadm5_modify_principal(kadm_handle, &princ, mask); - if (ret) { - krb5_warn(context, ret, "kadm5_modify_principal(%s)", argv[a]); - for (j = 0; j < n_keys; j++) - krb5_free_keyblock_contents(context, &keys[j]); - krb5_free_principal(context, princ_ent); - failed++; - continue; - } - for(j = 0; j < n_keys; j++) { - int do_add = TRUE; - - if (netypes) { - size_t k; - - do_add = FALSE; - for (k = 0; k < netypes; ++k) - if (keys[j].keytype == etypes[k]) { - do_add = TRUE; - break; - } - } - if (do_add) { - entry.principal = princ_ent; - entry.vno = princ.kvno; - entry.keyblock = keys[j]; - entry.timestamp = time (NULL); - ret = krb5_kt_add_entry(context, keytab, &entry); - if (ret) - krb5_warn(context, ret, "krb5_kt_add_entry"); - } - krb5_free_keyblock_contents(context, &keys[j]); - } - - kadm5_free_principal_ent(kadm_handle, &princ); - krb5_free_principal(context, princ_ent); - } - out: - free(etypes); - if (kadm_handle) - kadm5_destroy(kadm_handle); - krb5_kt_close(context, keytab); - return ret != 0 || failed > 0; -} diff --git a/kerberosV/src/admin/ktutil-commands.in b/kerberosV/src/admin/ktutil-commands.in deleted file mode 100644 index 438e5371f2a..00000000000 --- a/kerberosV/src/admin/ktutil-commands.in +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 2004 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: ktutil-commands.in,v 1.2 2013/06/17 18:57:40 robert Exp $ */ - -command = { - name = "add" - option = { - long = "principal" - short = "p" - type = "string" - help = "principal to add" - argument = "principal" - default = "" - } - option = { - long = "kvno" - short = "V" - type = "integer" - help = "key version number" - default = "-1" - } - option = { - long = "enctype" - short = "e" - type = "string" - argument = "enctype" - help = "encryption type" - } - option = { - long = "password" - short = "w" - type = "string" - help = "password for key" - } - option = { - long = "salt" - short = "s" - type = "-flag" - help = "use unsalted keys" - default = "1" - } - option = { - long = "random" - short = "r" - type = "flag" - help = "generate random key" - } - option = { - long = "hex" - short = "H" - type = "flag" - help = "password is a hexadecimal string" - } - function = "kt_add" - help = "Adds a key to a keytab." - max_args = "0" -} -command = { - name = "change" - option = { - long = "realm" - short = "r" - type = "string" - argument = "realm" - help = "realm to use" - } - option = { - long = "admin-server" - short = "a" - type = "string" - argument = "host" - help = "server to contact" - } - option = { - long = "server-port" - short = "s" - type = "integer" - argument = "port number" - help = "port number on server" - } - function = "kt_change" - argument = "[principal...]" - help = "Change keys for specified principals (default all)." -} -command = { - name = "copy" - function = "kt_copy" - argument = "source destination" - min_args = "2" - max_args = "2" - help = "Copies one keytab to another." -} -command = { - name = "get" - option = { - long = "principal" - short = "p" - type = "string" - help = "admin principal" - argument = "principal" - } - option = { - long = "enctypes" - short = "e" - type = "strings" - help = "encryption types to use" - argument = "enctype" - } - option = { - long = "realm" - short = "r" - type = "string" - argument = "realm" - help = "realm to use" - } - option = { - long = "admin-server" - short = "a" - type = "string" - argument = "host" - help = "server to contact" - } - option = { - long = "server-port" - short = "s" - type = "integer" - argument = "port number" - help = "port number on server" - } - function = "kt_get" - min_args = "1" - argument = "principal..." - help = "Change keys for specified principals, and add them to the keytab." -} -command = { - name = "list" - option = { - long = "keys" - type = "flag" - help = "show key values" - } - option = { - long = "timestamp" - type = "flag" - help = "show timestamps" - } - max_args = "0" - function = "kt_list" - help = "Show contents of keytab." -} -command = { - name = "purge" - option = { - long = "age" - type = "string" - help = "age to retiere" - default = "1 week"; - argument = "time" - } - max_args = "0" - function = "kt_purge" - help = "Remove superceded keys from keytab." -} -command = { - name = "remove" - name = "delete" - option = { - long = "principal" - short = "p" - type = "string" - help = "principal to remove" - argument = "principal" - } - option = { - long = "kvno" - short = "V" - type = "integer" - help = "key version to remove" - argument = "enctype" - default = "0" - } - option = { - long = "enctype" - short = "e" - type = "string" - help = "enctype to remove" - argument = "enctype" - } - max_args = "0" - function = "kt_remove" - help = "Remove keys from keytab." -} -command = { - name = "rename" - function = "kt_rename" - argument = "from to" - min_args = "2" - max_args = "2" - help = "Renames an entry in the keytab." - option = { - long = "delete" - type = "-flag" - help = "don't delete orignal entry" - } -} -command = { - name = "destroy" - function = "kt_destroy" - max_args = "0" - help = "Destroy (remove) the keytab." -} -command = { - name = "help" - argument = "command" - max_args = "1" - function = "help" -} diff --git a/kerberosV/src/admin/ktutil-version.rc b/kerberosV/src/admin/ktutil-version.rc deleted file mode 100644 index e0e91c5ce2c..00000000000 --- a/kerberosV/src/admin/ktutil-version.rc +++ /dev/null @@ -1,36 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2010, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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. - * - **********************************************************************/ - -#define RC_FILE_TYPE VFT_APP -#define RC_FILE_DESC_0409 "Kerberos Keytab Tool" -#define RC_FILE_ORIG_0409 "ktutil.exe" - -#include "../windows/version.rc" diff --git a/kerberosV/src/admin/ktutil.8 b/kerberosV/src/admin/ktutil.8 deleted file mode 100644 index 72d6ce71639..00000000000 --- a/kerberosV/src/admin/ktutil.8 +++ /dev/null @@ -1,124 +0,0 @@ -.\" Copyright (c) 1997-2004 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: ktutil.8,v 1.2 2013/06/17 18:57:40 robert Exp $ -.\" -.Dd April 14, 2005 -.Dt KTUTIL 8 -.Os HEIMDAL -.Sh NAME -.Nm ktutil -.Nd manage Kerberos keytabs -.Sh SYNOPSIS -.Nm -.Oo Fl k Ar keytab \*(Ba Xo -.Fl Fl keytab= Ns Ar keytab -.Xc -.Oc -.Op Fl v | Fl Fl verbose -.Op Fl Fl version -.Op Fl h | Fl Fl help -.Ar command -.Op Ar args -.Sh DESCRIPTION -.Nm -is a program for managing keytabs. -Supported options: -.Bl -tag -width Ds -.It Fl v , Fl Fl verbose -Verbose output. -.El -.Pp -.Ar command -can be one of the following: -.Bl -tag -width srvconvert -.It add Oo Fl p Ar principal Oc Oo Fl Fl principal= Ns Ar principal Oc \ -Oo Fl V Ar kvno Oc Oo Fl Fl kvno= Ns Ar kvno Oc Oo Fl e Ar enctype Oc \ -Oo Fl Fl enctype= Ns Ar enctype Oc Oo Fl w Ar password Oc \ -Oo Fl Fl password= Ns Ar password Oc Oo Fl r Oc Oo Fl Fl random Oc \ -Oo Fl s Oc Oo Fl Fl no-salt Oc Oo Fl H Oc Op Fl Fl hex -Adds a key to the keytab. Options that are not specified will be -prompted for. This requires that you know the password or the hex key of the -principal to add; if what you really want is to add a new principal to -the keytab, you should consider the -.Ar get -command, which talks to the kadmin server. -.It change Oo Fl r Ar realm Oc Oo Fl Fl realm= Ns Ar realm Oc \ -Oo Fl Fl a Ar host Oc Oo Fl Fl admin-server= Ns Ar host Oc \ -Oo Fl Fl s Ar port Oc Op Fl Fl server-port= Ns Ar port -Update one or several keys to new versions. By default, use the admin -server for the realm of a keytab entry. Otherwise it will use the -values specified by the options. -.Pp -If no principals are given, all the ones in the keytab are updated. -.It copy Ar keytab-src Ar keytab-dest -Copies all the entries from -.Ar keytab-src -to -.Ar keytab-dest . -.It get Oo Fl p Ar admin principal Oc \ -Oo Fl Fl principal= Ns Ar admin principal Oc Oo Fl e Ar enctype Oc \ -Oo Fl Fl enctypes= Ns Ar enctype Oc Oo Fl r Ar realm Oc \ -Oo Fl Fl realm= Ns Ar realm Oc Oo Fl a Ar admin server Oc \ -Oo Fl Fl admin-server= Ns Ar admin server Oc Oo Fl s Ar server port Oc \ -Oo Fl Fl server-port= Ns Ar server port Oc Ar principal ... -For each -.Ar principal , -generate a new key for it (creating it if it doesn't already exist), -and put that key in the keytab. -.Pp -If no -.Ar realm -is specified, the realm to operate on is taken from the first -principal. -.It list Oo Fl Fl keys Oc Op Fl Fl timestamp -List the keys stored in the keytab. -.It remove Oo Fl p Ar principal Oc Oo Fl Fl principal= Ns Ar principal Oc \ -Oo Fl V kvno Oc Oo Fl Fl kvno= Ns Ar kvno Oc Oo Fl e enctype Oc \ -Oo Fl Fl enctype= Ns Ar enctype Oc -Removes the specified key or keys. Not specifying a -.Ar kvno -removes keys with any version number. Not specifying an -.Ar enctype -removes keys of any type. -.It rename Ar from-principal Ar to-principal -Renames all entries in the keytab that match the -.Ar from-principal -to -.Ar to-principal . -.It purge Op Fl Fl age= Ns Ar age -Removes all old versions of a key for which there is a newer version -that is at least -.Ar age -(default one week) old. -.El -.Sh SEE ALSO -.Xr kadmin 8 diff --git a/kerberosV/src/admin/ktutil.c b/kerberosV/src/admin/ktutil.c deleted file mode 100644 index 5722932f0ed..00000000000 --- a/kerberosV/src/admin/ktutil.c +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (c) 1997-2004 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 "ktutil_locl.h" -#include - -RCSID("$Id: ktutil.c,v 1.5 2013/06/17 18:57:40 robert Exp $"); - -static int help_flag; -static int version_flag; -int verbose_flag; -char *keytab_string; -static char keytab_buf[256]; - -static struct getargs args[] = { - { - "version", - 0, - arg_flag, - &version_flag, - NULL, - NULL - }, - { - "help", - 'h', - arg_flag, - &help_flag, - NULL, - NULL - }, - { - "keytab", - 'k', - arg_string, - &keytab_string, - "keytab", - "keytab to operate on" - }, - { - "verbose", - 'v', - arg_flag, - &verbose_flag, - "verbose", - "run verbosely" - } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -krb5_context context; - -krb5_keytab -ktutil_open_keytab(void) -{ - krb5_error_code ret; - krb5_keytab keytab; - if (keytab_string == NULL) { - ret = krb5_kt_default_name (context, keytab_buf, sizeof(keytab_buf)); - if (ret) { - krb5_warn(context, ret, "krb5_kt_default_name"); - return NULL; - } - keytab_string = keytab_buf; - } - ret = krb5_kt_resolve(context, keytab_string, &keytab); - if (ret) { - krb5_warn(context, ret, "resolving keytab %s", keytab_string); - return NULL; - } - if (verbose_flag) - fprintf (stderr, "Using keytab %s\n", keytab_string); - - return keytab; -} - -int -help(void *opt, int argc, char **argv) -{ - if(argc == 0) { - sl_help(commands, 1, argv - 1 /* XXX */); - } else { - SL_cmd *c = sl_match (commands, argv[0], 0); - if(c == NULL) { - fprintf (stderr, "No such command: %s. " - "Try \"help\" for a list of commands\n", - argv[0]); - } else { - if(c->func) { - char shelp[] = "--help"; - char *fake[3]; - fake[0] = argv[0]; - fake[1] = shelp; - fake[2] = NULL; - (*c->func)(2, fake); - fprintf(stderr, "\n"); - } - if(c->help && *c->help) - fprintf (stderr, "%s\n", c->help); - if((++c)->name && c->func == NULL) { - int f = 0; - fprintf (stderr, "Synonyms:"); - while (c->name && c->func == NULL) { - fprintf (stderr, "%s%s", f ? ", " : " ", (c++)->name); - f = 1; - } - fprintf (stderr, "\n"); - } - } - } - return 0; -} - -static void -usage(int status) -{ - arg_printusage(args, num_args, NULL, "command"); - exit(status); -} - -int -main(int argc, char **argv) -{ - int optidx = 0; - krb5_error_code ret; - setprogname(argv[0]); - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - if(getarg(args, num_args, argc, argv, &optidx)) - usage(1); - if(help_flag) - usage(0); - if(version_flag) { - print_version(NULL); - exit(0); - } - argc -= optidx; - argv += optidx; - if(argc == 0) - usage(1); - ret = sl_command(commands, argc, argv); - if(ret == -1) - krb5_warnx (context, "unrecognized command: %s", argv[0]); - return ret; -} diff --git a/kerberosV/src/admin/ktutil.cat8 b/kerberosV/src/admin/ktutil.cat8 deleted file mode 100644 index 0dd9b615047..00000000000 --- a/kerberosV/src/admin/ktutil.cat8 +++ /dev/null @@ -1,71 +0,0 @@ - -KTUTIL(8) BSD System Manager's Manual KTUTIL(8) - -NNAAMMEE - kkttuuttiill -- manage Kerberos keytabs - -SSYYNNOOPPSSIISS - kkttuuttiill [--kk _k_e_y_t_a_b | ----kkeeyyttaabb==_k_e_y_t_a_b] [--vv | ----vveerrbboossee] [----vveerrssiioonn] - [--hh | ----hheellpp] _c_o_m_m_a_n_d [_a_r_g_s] - -DDEESSCCRRIIPPTTIIOONN - kkttuuttiill is a program for managing keytabs. Supported options: - - --vv, ----vveerrbboossee - Verbose output. - - _c_o_m_m_a_n_d can be one of the following: - - add [--pp _p_r_i_n_c_i_p_a_l] [----pprriinncciippaall==_p_r_i_n_c_i_p_a_l] [--VV _k_v_n_o] [----kkvvnnoo==_k_v_n_o] [--ee - _e_n_c_t_y_p_e] [----eennccttyyppee==_e_n_c_t_y_p_e] [--ww _p_a_s_s_w_o_r_d] - [----ppaasssswwoorrdd==_p_a_s_s_w_o_r_d] [--rr] [----rraannddoomm] [--ss] [----nnoo--ssaalltt] [--HH] - [----hheexx] - Adds a key to the keytab. Options that are not specified will - be prompted for. This requires that you know the password or - the hex key of the principal to add; if what you really want - is to add a new principal to the keytab, you should consider - the _g_e_t command, which talks to the kadmin server. - - change [--rr _r_e_a_l_m] [----rreeaallmm==_r_e_a_l_m] [----aa _h_o_s_t] [----aaddmmiinn--sseerrvveerr==_h_o_s_t] [----ss - _p_o_r_t] [----sseerrvveerr--ppoorrtt==_p_o_r_t] - Update one or several keys to new versions. By default, use - the admin server for the realm of a keytab entry. Otherwise - it will use the values specified by the options. - - If no principals are given, all the ones in the keytab are - updated. - - copy _k_e_y_t_a_b_-_s_r_c _k_e_y_t_a_b_-_d_e_s_t - Copies all the entries from _k_e_y_t_a_b_-_s_r_c to _k_e_y_t_a_b_-_d_e_s_t. - - get [--pp _a_d_m_i_n _p_r_i_n_c_i_p_a_l] [----pprriinncciippaall==_a_d_m_i_n _p_r_i_n_c_i_p_a_l] [--ee _e_n_c_t_y_p_e] - [----eennccttyyppeess==_e_n_c_t_y_p_e] [--rr _r_e_a_l_m] [----rreeaallmm==_r_e_a_l_m] [--aa _a_d_m_i_n - _s_e_r_v_e_r] [----aaddmmiinn--sseerrvveerr==_a_d_m_i_n _s_e_r_v_e_r] [--ss _s_e_r_v_e_r _p_o_r_t] - [----sseerrvveerr--ppoorrtt==_s_e_r_v_e_r _p_o_r_t] _p_r_i_n_c_i_p_a_l _._._. - For each _p_r_i_n_c_i_p_a_l, generate a new key for it (creating it if - it doesn't already exist), and put that key in the keytab. - - If no _r_e_a_l_m is specified, the realm to operate on is taken - from the first principal. - - list [----kkeeyyss] [----ttiimmeessttaammpp] - List the keys stored in the keytab. - - remove [--pp _p_r_i_n_c_i_p_a_l] [----pprriinncciippaall==_p_r_i_n_c_i_p_a_l] [--VV --kkvvnnoo] [----kkvvnnoo==_k_v_n_o] - [--ee --eennccttyyppee] [----eennccttyyppee==_e_n_c_t_y_p_e] - Removes the specified key or keys. Not specifying a _k_v_n_o - removes keys with any version number. Not specifying an - _e_n_c_t_y_p_e removes keys of any type. - - rename _f_r_o_m_-_p_r_i_n_c_i_p_a_l _t_o_-_p_r_i_n_c_i_p_a_l - Renames all entries in the keytab that match the - _f_r_o_m_-_p_r_i_n_c_i_p_a_l to _t_o_-_p_r_i_n_c_i_p_a_l. - - purge [----aaggee==_a_g_e] - Removes all old versions of a key for which there is a newer - version that is at least _a_g_e (default one week) old. - -SSEEEE AALLSSOO - kadmin(8) - -HEIMDAL April 14, 2005 HEIMDAL diff --git a/kerberosV/src/admin/ktutil_locl.h b/kerberosV/src/admin/ktutil_locl.h deleted file mode 100644 index b48fbf95cd8..00000000000 --- a/kerberosV/src/admin/ktutil_locl.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 1997-2004 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: ktutil_locl.h,v 1.5 2013/06/17 18:57:40 robert Exp $ - */ - -#ifndef __KTUTIL_LOCL_H__ -#define __KTUTIL_LOCL_H__ - -#include - -#include -#include -#include -#include -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#include -#include - -#include "crypto-headers.h" -#include -#include -#include - -#include -#include -#include - -extern krb5_context context; - -extern int verbose_flag; -extern char *keytab_string; - -krb5_keytab ktutil_open_keytab(void); - -#include "ktutil-commands.h" - -#endif /* __KTUTIL_LOCL_H__ */ diff --git a/kerberosV/src/admin/list.c b/kerberosV/src/admin/list.c deleted file mode 100644 index d1a7215c6d7..00000000000 --- a/kerberosV/src/admin/list.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 1997-2004 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 "ktutil_locl.h" -#include - -RCSID("$Id: list.c,v 1.7 2013/06/17 18:57:40 robert Exp $"); - -static int -do_list(struct list_options *opt, const char *keytab_str) -{ - krb5_error_code ret; - krb5_keytab keytab; - krb5_keytab_entry entry; - krb5_kt_cursor cursor; - rtbl_t table; - - /* XXX specialcase the ANY type */ - if(strncasecmp(keytab_str, "ANY:", 4) == 0) { - int flag = 0; - char buf[1024]; - keytab_str += 4; - ret = 0; - while (strsep_copy((const char**)&keytab_str, ",", - buf, sizeof(buf)) != -1) { - if(flag) - printf("\n"); - if(do_list(opt, buf)) - ret = 1; - flag = 1; - } - return ret; - } - - ret = krb5_kt_resolve(context, keytab_str, &keytab); - if (ret) { - krb5_warn(context, ret, "resolving keytab %s", keytab_str); - return ret; - } - - ret = krb5_kt_start_seq_get(context, keytab, &cursor); - if(ret) { - krb5_warn(context, ret, "krb5_kt_start_seq_get %s", keytab_str); - krb5_kt_close(context, keytab); - return ret; - } - - printf ("%s:\n\n", keytab_str); - - table = rtbl_create(); - rtbl_add_column_by_id(table, 0, "Vno", RTBL_ALIGN_RIGHT); - rtbl_add_column_by_id(table, 1, "Type", 0); - rtbl_add_column_by_id(table, 2, "Principal", 0); - if (opt->timestamp_flag) - rtbl_add_column_by_id(table, 3, "Date", 0); - if(opt->keys_flag) - rtbl_add_column_by_id(table, 4, "Key", 0); - rtbl_add_column_by_id(table, 5, "Aliases", 0); - rtbl_set_separator(table, " "); - - while(krb5_kt_next_entry(context, keytab, &entry, &cursor) == 0){ - char buf[1024], *s; - - snprintf(buf, sizeof(buf), "%d", entry.vno); - rtbl_add_column_entry_by_id(table, 0, buf); - - ret = krb5_enctype_to_string(context, - entry.keyblock.keytype, &s); - if (ret != 0) { - snprintf(buf, sizeof(buf), "unknown (%d)", entry.keyblock.keytype); - rtbl_add_column_entry_by_id(table, 1, buf); - } else { - rtbl_add_column_entry_by_id(table, 1, s); - free(s); - } - - krb5_unparse_name_fixed(context, entry.principal, buf, sizeof(buf)); - rtbl_add_column_entry_by_id(table, 2, buf); - - if (opt->timestamp_flag) { - krb5_format_time(context, entry.timestamp, buf, - sizeof(buf), FALSE); - rtbl_add_column_entry_by_id(table, 3, buf); - } - if(opt->keys_flag) { - size_t i; - s = malloc(2 * entry.keyblock.keyvalue.length + 1); - if (s == NULL) { - krb5_warnx(context, "malloc failed"); - ret = ENOMEM; - goto out; - } - for(i = 0; i < entry.keyblock.keyvalue.length; i++) - snprintf(s + 2 * i, 3, "%02x", - ((unsigned char*)entry.keyblock.keyvalue.data)[i]); - rtbl_add_column_entry_by_id(table, 4, s); - free(s); - } - if (entry.aliases) { - unsigned int i; - struct rk_strpool *p = NULL; - - for (i = 0; i< entry.aliases->len; i++) { - krb5_unparse_name_fixed(context, entry.principal, buf, sizeof(buf)); - rk_strpoolprintf(p, "%s%s", buf, - i + 1 < entry.aliases->len ? ", " : ""); - - } - rtbl_add_column_entry_by_id(table, 5, rk_strpoolcollect(p)); - } - - krb5_kt_free_entry(context, &entry); - } - ret = krb5_kt_end_seq_get(context, keytab, &cursor); - rtbl_format(table, stdout); - -out: - rtbl_destroy(table); - - krb5_kt_close(context, keytab); - return ret; -} - -int -kt_list(struct list_options *opt, int argc, char **argv) -{ - krb5_error_code ret; - char kt[1024]; - - if(verbose_flag) - opt->timestamp_flag = 1; - - if (keytab_string == NULL) { - if((ret = krb5_kt_default_name(context, kt, sizeof(kt))) != 0) { - krb5_warn(context, ret, "getting default keytab name"); - return 1; - } - keytab_string = kt; - } - return do_list(opt, keytab_string) != 0; -} diff --git a/kerberosV/src/admin/purge.c b/kerberosV/src/admin/purge.c deleted file mode 100644 index bfd67096bfc..00000000000 --- a/kerberosV/src/admin/purge.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 1997-2004 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 "ktutil_locl.h" - -RCSID("$Id: purge.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -/* - * keep track of the highest version for every principal. - */ - -struct e { - krb5_principal principal; - int max_vno; - time_t timestamp; - struct e *next; -}; - -static struct e * -get_entry (krb5_principal princ, struct e *head) -{ - struct e *e; - - for (e = head; e != NULL; e = e->next) - if (krb5_principal_compare (context, princ, e->principal)) - return e; - return NULL; -} - -static void -add_entry (krb5_principal princ, int vno, time_t timestamp, struct e **head) -{ - krb5_error_code ret; - struct e *e; - - e = get_entry (princ, *head); - if (e != NULL) { - if(e->max_vno < vno) { - e->max_vno = vno; - e->timestamp = timestamp; - } - return; - } - e = malloc (sizeof (*e)); - if (e == NULL) - krb5_errx (context, 1, "malloc: out of memory"); - ret = krb5_copy_principal (context, princ, &e->principal); - if (ret) - krb5_err (context, 1, ret, "krb5_copy_principal"); - e->max_vno = vno; - e->timestamp = timestamp; - e->next = *head; - *head = e; -} - -static void -delete_list (struct e *head) -{ - while (head != NULL) { - struct e *next = head->next; - krb5_free_principal (context, head->principal); - free (head); - head = next; - } -} - -/* - * Remove all entries that have newer versions and that are older - * than `age' - */ - -int -kt_purge(struct purge_options *opt, int argc, char **argv) -{ - krb5_error_code ret = 0; - krb5_kt_cursor cursor; - krb5_keytab keytab; - krb5_keytab_entry entry; - int age; - struct e *head = NULL; - time_t judgement_day; - - age = parse_time(opt->age_string, "s"); - if(age < 0) { - krb5_warnx(context, "unparasable time `%s'", opt->age_string); - return 1; - } - - if((keytab = ktutil_open_keytab()) == NULL) - return 1; - - ret = krb5_kt_start_seq_get(context, keytab, &cursor); - if(ret){ - krb5_warn(context, ret, "%s", keytab_string); - goto out; - } - - while(krb5_kt_next_entry(context, keytab, &entry, &cursor) == 0) { - add_entry (entry.principal, entry.vno, entry.timestamp, &head); - krb5_kt_free_entry(context, &entry); - } - krb5_kt_end_seq_get(context, keytab, &cursor); - - judgement_day = time (NULL); - - ret = krb5_kt_start_seq_get(context, keytab, &cursor); - if(ret){ - krb5_warn(context, ret, "%s", keytab_string); - goto out; - } - - while(krb5_kt_next_entry(context, keytab, &entry, &cursor) == 0) { - struct e *e = get_entry (entry.principal, head); - - if (e == NULL) { - krb5_warnx (context, "ignoring extra entry"); - continue; - } - - if (entry.vno < e->max_vno - && judgement_day - e->timestamp > age) { - if (verbose_flag) { - char *name_str; - - krb5_unparse_name (context, entry.principal, &name_str); - printf ("removing %s vno %d\n", name_str, entry.vno); - free (name_str); - } - ret = krb5_kt_remove_entry (context, keytab, &entry); - if (ret) - krb5_warn (context, ret, "remove"); - } - krb5_kt_free_entry(context, &entry); - } - ret = krb5_kt_end_seq_get(context, keytab, &cursor); - - delete_list (head); - - out: - krb5_kt_close (context, keytab); - return ret != 0; -} diff --git a/kerberosV/src/admin/remove.c b/kerberosV/src/admin/remove.c deleted file mode 100644 index 11cccbb2e02..00000000000 --- a/kerberosV/src/admin/remove.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 1997-2004 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 "ktutil_locl.h" - -RCSID("$Id: remove.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -int -kt_remove(struct remove_options *opt, int argc, char **argv) -{ - krb5_error_code ret = 0; - krb5_keytab_entry entry; - krb5_keytab keytab; - krb5_principal principal = NULL; - krb5_enctype enctype = 0; - - if(opt->principal_string) { - ret = krb5_parse_name(context, opt->principal_string, &principal); - if(ret) { - krb5_warn(context, ret, "%s", opt->principal_string); - return 1; - } - } - if(opt->enctype_string) { - ret = krb5_string_to_enctype(context, opt->enctype_string, &enctype); - if(ret) { - int t; - if(sscanf(opt->enctype_string, "%d", &t) == 1) - enctype = t; - else { - krb5_warn(context, ret, "%s", opt->enctype_string); - if(principal) - krb5_free_principal(context, principal); - return 1; - } - } - } - if (!principal && !enctype && !opt->kvno_integer) { - krb5_warnx(context, - "You must give at least one of " - "principal, enctype or kvno."); - ret = EINVAL; - goto out; - } - - if((keytab = ktutil_open_keytab()) == NULL) { - ret = 1; - goto out; - } - - entry.principal = principal; - entry.keyblock.keytype = enctype; - entry.vno = opt->kvno_integer; - ret = krb5_kt_remove_entry(context, keytab, &entry); - krb5_kt_close(context, keytab); - if(ret) - krb5_warn(context, ret, "remove"); - out: - if(principal) - krb5_free_principal(context, principal); - return ret != 0; -} - diff --git a/kerberosV/src/admin/rename.c b/kerberosV/src/admin/rename.c deleted file mode 100644 index 8a344e4d0bc..00000000000 --- a/kerberosV/src/admin/rename.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2001-2004 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 "ktutil_locl.h" - -RCSID("$Id: rename.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -int -kt_rename(struct rename_options *opt, int argc, char **argv) -{ - krb5_error_code ret = 0; - krb5_keytab_entry entry; - krb5_keytab keytab; - krb5_kt_cursor cursor; - krb5_principal from_princ, to_princ; - - ret = krb5_parse_name(context, argv[0], &from_princ); - if(ret != 0) { - krb5_warn(context, ret, "%s", argv[0]); - return 1; - } - - ret = krb5_parse_name(context, argv[1], &to_princ); - if(ret != 0) { - krb5_free_principal(context, from_princ); - krb5_warn(context, ret, "%s", argv[1]); - return 1; - } - - if((keytab = ktutil_open_keytab()) == NULL) { - krb5_free_principal(context, from_princ); - krb5_free_principal(context, to_princ); - return 1; - } - - ret = krb5_kt_start_seq_get(context, keytab, &cursor); - if(ret) { - krb5_kt_close(context, keytab); - krb5_free_principal(context, from_princ); - krb5_free_principal(context, to_princ); - return 1; - } - while(1) { - ret = krb5_kt_next_entry(context, keytab, &entry, &cursor); - if(ret != 0) { - if(ret != KRB5_CC_END && ret != KRB5_KT_END) - krb5_warn(context, ret, "getting entry from keytab"); - else - ret = 0; - break; - } - if(krb5_principal_compare(context, entry.principal, from_princ)) { - krb5_free_principal(context, entry.principal); - entry.principal = to_princ; - ret = krb5_kt_add_entry(context, keytab, &entry); - if(ret) { - entry.principal = NULL; - krb5_kt_free_entry(context, &entry); - krb5_warn(context, ret, "adding entry"); - break; - } - if (opt->delete_flag) { - entry.principal = from_princ; - ret = krb5_kt_remove_entry(context, keytab, &entry); - if(ret) { - entry.principal = NULL; - krb5_kt_free_entry(context, &entry); - krb5_warn(context, ret, "removing entry"); - break; - } - } - entry.principal = NULL; - } - krb5_kt_free_entry(context, &entry); - } - krb5_kt_end_seq_get(context, keytab, &cursor); - - krb5_free_principal(context, from_princ); - krb5_free_principal(context, to_princ); - - return ret != 0; -} - diff --git a/kerberosV/src/appl/Makefile.am b/kerberosV/src/appl/Makefile.am deleted file mode 100644 index cf24b09fa58..00000000000 --- a/kerberosV/src/appl/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:35 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -if OTP -dir_otp = otp -endif -if DCE -dir_dce = dceutils -endif -SUBDIRS = \ - afsutil \ - ftp \ - login \ - $(dir_otp) \ - gssmask \ - popper \ - push \ - rsh \ - rcp \ - su \ - xnlock \ - telnet \ - test \ - kx \ - kf \ - $(dir_dce) - -EXTRA_DIST = NTMakefile \ No newline at end of file diff --git a/kerberosV/src/appl/Makefile.in b/kerberosV/src/appl/Makefile.in deleted file mode 100644 index 9645b916d75..00000000000 --- a/kerberosV/src/appl/Makefile.in +++ /dev/null @@ -1,936 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -subdir = appl -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = afsutil ftp login otp gssmask popper push rsh rcp su \ - xnlock telnet test kx kf dceutils -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -@OTP_TRUE@dir_otp = otp -@DCE_TRUE@dir_dce = dceutils -SUBDIRS = \ - afsutil \ - ftp \ - login \ - $(dir_otp) \ - gssmask \ - popper \ - push \ - rsh \ - rcp \ - su \ - xnlock \ - telnet \ - test \ - kx \ - kf \ - $(dir_dce) - -EXTRA_DIST = NTMakefile -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-recursive -all-am: Makefile all-local -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ - ctags-recursive install-am install-data-am install-exec-am \ - install-strip tags-recursive uninstall-am - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local check check-am check-local clean \ - clean-generic clean-libtool ctags ctags-recursive dist-hook \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-data-hook \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-exec-hook install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-hook - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/NTMakefile b/kerberosV/src/appl/NTMakefile deleted file mode 100644 index 6bae479d0fa..00000000000 --- a/kerberosV/src/appl/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl - -!include ../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/afsutil/ChangeLog b/kerberosV/src/appl/afsutil/ChangeLog deleted file mode 100644 index 9825c55a6b9..00000000000 --- a/kerberosV/src/appl/afsutil/ChangeLog +++ /dev/null @@ -1,125 +0,0 @@ -2007-04-11 Love Hörnquist Åstrand - - * pagsh.1,afslog.1: - options must be lexicographically ordered; - again, options without arguments must be placed before options - with arguments. - manual page cross references are done using - the macro `.Xr', not the macro `.Nm' (used for command names - instead). - - From Igor Sobrado. - -2006-10-07 Love Hörnquist Åstrand - - * Makefile.am: Add man_MANS to EXTRA_DIST - -2006-01-03 Love Hörnquist Åstrand - - * afslog.1: Document options to allow select principal or - credential cache when doing afslog. - - * afslog.c: Add options to allow select principal or credential - cache when doing afslog. - -2005-02-12 Love Hörnquist Åstrand - - * Makefile.am: man_MANS += pagsh.1 - - * pagsh.c: add --cache-type that allows the user to control the - resulting credential cache type, inherit the type from the - invoking process - - * pagsh.1: manpage for pagsh - -2004-09-03 Love Hörnquist Åstrand - - * afslog.c: use negative string help string for arg_negative_flag - Pointed out by Harald Barth - -2004-07-27 Love Hörnquist Åstrand - - * pagsh.c: use setprogname, if we stripped off -c, try use the - fallback code - -2003-10-14 Johan Danielsson - - * pagsh.c: mkstemp formats must end in exactly six X's - -2003-07-15 Love Hörnquist Åstrand - - * afslog.c (do_afslog): is cell is unset, set it "" - for error printing - - * pagsh.c: unconditionally set KRBTKFILE - -2003-04-23 Love Hörnquist Åstrand - - * afslog.c (log_func): drop the error number - -2003-04-14 Love Hörnquist Åstrand - - * afslog.c: set kafs log function if verbose is turned on - -2003-03-18 Love Hörnquist Åstrand - - * Makefile.am (LDADD): use LIB_kafs - - * afslog.1: --no-v4, --no-v5 - - * Makefile.am: always build afsutils now - - * afslog.c: make build without KRB4 - -2002-11-26 Johan Danielsson - - * afslog.c: remove plural form in help string - - * Makefile.am: add afslog manpage - - * afslog.1: manpage - - * afslog.c: try more files when trying to expand a cell name - - * afslog.c: create a list of cells to get tokens for, before - actually doing anything, and try to get tokens via krb4 if krb5 - fails, and give it a chance to work with krb4-only; also some bug - fixes, partially from Tomas Olsson. - -2002-08-23 Assar Westerlund - - * pagsh.c: make it handle --version/--help - -2001-05-17 Assar Westerlund - - * afslog.c (main): call free_getarg_strings - -2000-12-31 Assar Westerlund - - * afslog.c (main): handle krb5_init_context failure consistently - -2000-12-25 Assar Westerlund - - * afslog.c: clarify usage strings - -1999-08-04 Assar Westerlund - - * pagsh.c (main): use mkstemp to generate temporary file names. - From Miroslav Ruda - -1999-07-04 Assar Westerlund - - * afslog.c (expand_cell_name): terminate on #. From Miroslav Ruda - - -1999-06-27 Assar Westerlund - - * Makefile.am (bin_PROGRAMS): only include pagsh if KRB4 - -1999-06-26 Assar Westerlund - - * Makefile.am: add pagsh - - * pagsh.c: new file. contributed by Miroslav Ruda - -Sat Mar 27 12:49:43 1999 Johan Danielsson - - * afslog.c: cleanup option parsing diff --git a/kerberosV/src/appl/afsutil/Makefile.am b/kerberosV/src/appl/afsutil/Makefile.am deleted file mode 100644 index d1c19e2d793..00000000000 --- a/kerberosV/src/appl/afsutil/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:40 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(INCLUDE_krb4) - -bin_PROGRAMS = afslog pagsh - -afslog_SOURCES = afslog.c - -pagsh_SOURCES = pagsh.c - -man_MANS = afslog.1 pagsh.1 - -LDADD = $(LIB_kafs) \ - $(LIB_krb4) \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_hcrypto) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) diff --git a/kerberosV/src/appl/afsutil/Makefile.in b/kerberosV/src/appl/afsutil/Makefile.in deleted file mode 100644 index 963f8bc4066..00000000000 --- a/kerberosV/src/appl/afsutil/Makefile.in +++ /dev/null @@ -1,970 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -bin_PROGRAMS = afslog$(EXEEXT) pagsh$(EXEEXT) -subdir = appl/afsutil -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -PROGRAMS = $(bin_PROGRAMS) -am_afslog_OBJECTS = afslog.$(OBJEXT) -afslog_OBJECTS = $(am_afslog_OBJECTS) -afslog_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/lib/kafs/libkafs.la \ - $(am__DEPENDENCIES_1) -afslog_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -am_pagsh_OBJECTS = pagsh.$(OBJEXT) -pagsh_OBJECTS = $(am_pagsh_OBJECTS) -pagsh_LDADD = $(LDADD) -pagsh_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(afslog_SOURCES) $(pagsh_SOURCES) -DIST_SOURCES = $(afslog_SOURCES) $(pagsh_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(INCLUDE_krb4) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -afslog_SOURCES = afslog.c -pagsh_SOURCES = pagsh.c -man_MANS = afslog.1 pagsh.1 -LDADD = $(LIB_kafs) \ - $(LIB_krb4) \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_hcrypto) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/afsutil/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/afsutil/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -afslog$(EXEEXT): $(afslog_OBJECTS) $(afslog_DEPENDENCIES) - @rm -f afslog$(EXEEXT) - $(LINK) $(afslog_OBJECTS) $(afslog_LDADD) $(LIBS) -pagsh$(EXEEXT): $(pagsh_OBJECTS) $(pagsh_DEPENDENCIES) - @rm -f pagsh$(EXEEXT) - $(LINK) $(pagsh_OBJECTS) $(pagsh_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afslog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pagsh.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-hook \ - uninstall-man uninstall-man1 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/afsutil/NTMakefile b/kerberosV/src/appl/afsutil/NTMakefile deleted file mode 100644 index f1f696c02ad..00000000000 --- a/kerberosV/src/appl/afsutil/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\afsutil - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/afsutil/afslog.1 b/kerberosV/src/appl/afsutil/afslog.1 deleted file mode 100644 index 70012fe9ace..00000000000 --- a/kerberosV/src/appl/afsutil/afslog.1 +++ /dev/null @@ -1,152 +0,0 @@ -.\" Copyright (c) 2002 - 2007 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: afslog.1,v 1.2 2013/06/17 18:57:40 robert Exp $ -.\" -.Dd November 26, 2002 -.Dt AFSLOG 1 -.Os HEIMDAL -.Sh NAME -.Nm afslog -.Nd obtain AFS tokens -.Sh SYNOPSIS -.Nm -.Op Fl h | Fl Fl help -.Op Fl Fl no-v4 -.Op Fl Fl no-v5 -.Op Fl u | Fl Fl unlog -.Op Fl v | Fl Fl verbose -.Op Fl Fl version -.Oo Fl c Ar cell \*(Ba Xo -.Fl Fl cell= Ns Ar cell -.Xc -.Oc -.Oo Fl k Ar realm \*(Ba Xo -.Fl Fl realm= Ns Ar realm -.Xc -.Oc -.Oo Fl P Ar principal \*(Ba Xo -.Fl Fl principal= Ns Ar principal -.Xc -.Oc -.Bk -words -.Oo Fl p Ar path \*(Ba Xo -.Fl Fl file= Ns Ar path -.Xc -.Oc -.Ek -.Op Ar cell | path ... -.Sh DESCRIPTION -.Nm -obtains AFS tokens for a number of cells. What cells to get tokens for -can either be specified as an explicit list, as file paths to get -tokens for, or be left unspecified, in which case -.Nm -will use whatever magic -.Xr krb_afslog 3 -decides upon. -.Pp -Supported options: -.Bl -tag -width Ds -.It Fl Fl no-v4 -This makes -.Nm -not try using Kerberos 4. -.It Fl Fl no-v5 -This makes -.Nm -not try using Kerberos 5. -.It Xo -.Fl P Ar principal , -.Fl Fl principal Ar principal -.Xc -select what Kerberos 5 principal to use. -.It Fl Fl cache Ar cache -select what Kerberos 5 credential cache to use. -.Fl Fl principal -overrides this option. -.It Xo -.Fl u , -.Fl Fl unlog -.Xc -Destroy tokens instead of obtaining new. If this is specified, all -other options are ignored (except for -.Fl Fl help -and -.Fl Fl version ) . -.It Xo -.Fl v , -.Fl Fl verbose -.Xc -Adds more verbosity for what is actually going on. -.It Xo -.Fl c Ar cell, -.Fl Fl cell= Ns Ar cell -.Xc -This specified one or more cell names to get tokens for. -.It Xo -.Fl k Ar realm , -.Fl Fl realm= Ns Ar realm -.Xc -This is the Kerberos realm the AFS servers live in, this should -normally not be specified. -.It Xo -.Fl p Ar path , -.Fl Fl file= Ns Ar path -.Xc -This specified one or more file paths for which tokens should be -obtained. -.El -.Pp -Instead of using -.Fl c -and -.Fl p , -you may also pass a list of cells and file paths after any other -options. These arguments are considered files if they are either -the strings -.Do . Dc -or -.Dq .. -or they contain a slash, or if there exists a file by that name. -.Sh EXAMPLES -Assuming that there is no file called -.Dq openafs.org -in the current directory, and that -.Pa /afs/openafs.org -points to that cell, the follwing should be identical: -.Bd -literal -offset indent -$ afslog -c openafs.org -$ afslog openafs.org -$ afslog /afs/openafs.org/some/file -.Ed -.Sh SEE ALSO -.Xr krb_afslog 3 diff --git a/kerberosV/src/appl/afsutil/afslog.c b/kerberosV/src/appl/afsutil/afslog.c deleted file mode 100644 index 9422aff22e4..00000000000 --- a/kerberosV/src/appl/afsutil/afslog.c +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Copyright (c) 1997-2003 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 -RCSID("$Id: afslog.c,v 1.9 2013/06/17 18:57:40 robert Exp $"); -#endif -#include -#ifdef KRB5 -#include -#endif -#include -#include -#include -#include - -static int help_flag; -static int version_flag; -static getarg_strings cells; -static char *realm; -static getarg_strings files; -static int unlog_flag; -static int verbose; -#ifdef KRB5 -static char *client_string; -static char *cache_string; -static int use_krb5 = 1; -#endif - -struct getargs args[] = { - { "cell", 'c', arg_strings, &cells, "cells to get tokens for", "cell" }, - { "file", 'p', arg_strings, &files, "files to get tokens for", "path" }, - { "realm", 'k', arg_string, &realm, "realm for afs cell", "realm" }, - { "unlog", 'u', arg_flag, &unlog_flag, "remove tokens" }, -#ifdef KRB5 - { "principal",'P',arg_string,&client_string,"principal to use","principal"}, - { "cache", 0, arg_string, &cache_string, "ccache to use", "cache"}, - { "v5", 0, arg_negative_flag, &use_krb5, "don't use Kerberos 5" }, -#endif - { "verbose",'v', arg_flag, &verbose }, - { "version", 0, arg_flag, &version_flag }, - { "help", 'h', arg_flag, &help_flag }, -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -#ifdef KRB5 -krb5_context context; -krb5_ccache id; -#endif - -static const char * -expand_one_file(FILE *f, const char *cell) -{ - static char buf[1024]; - char *p; - - while (fgets (buf, sizeof(buf), f) != NULL) { - if(buf[0] == '>') { - for(p = buf; *p && !isspace((unsigned char)*p) && *p != '#'; p++) - ; - *p = '\0'; - if(strncmp(buf + 1, cell, strlen(cell)) == 0) - return buf + 1; - } - buf[0] = '\0'; - } - return NULL; -} - -static const char * -expand_cell_name(const char *cell) -{ - FILE *f; - const char *c; - const char **fn, *files[] = { _PATH_CELLSERVDB, - _PATH_ARLA_CELLSERVDB, - _PATH_OPENAFS_DEBIAN_CELLSERVDB, - _PATH_ARLA_DEBIAN_CELLSERVDB, - NULL }; - for(fn = files; *fn; fn++) { - f = fopen(*fn, "r"); - if(f == NULL) - continue; - c = expand_one_file(f, cell); - fclose(f); - if(c) - return c; - } - return cell; -} - -static void -usage(int ecode) -{ - arg_printusage(args, num_args, NULL, "[cell|path]..."); - exit(ecode); -} - -struct cell_list { - char *cell; - struct cell_list *next; -} *cell_list; - -static int -afslog_cell(const char *cell, int expand) -{ - struct cell_list *p, **q; - const char *c = cell; - if(expand){ - c = expand_cell_name(cell); - if(c == NULL){ - warnx("No cell matching \"%s\" found.", cell); - return -1; - } - if(verbose && strcmp(c, cell) != 0) - warnx("Cell \"%s\" expanded to \"%s\"", cell, c); - } - /* add to list of cells to get tokens for, and also remove - duplicates; the actual afslog takes place later */ - for(p = cell_list, q = &cell_list; p; q = &p->next, p = p->next) - if(strcmp(p->cell, c) == 0) - return 0; - p = malloc(sizeof(*p)); - if(p == NULL) - return -1; - p->cell = strdup(c); - if(p->cell == NULL) { - free(p); - return -1; - } - p->next = NULL; - *q = p; - return 0; -} - -static int -afslog_file(const char *path) -{ - char cell[64]; - if(k_afs_cell_of_file(path, cell, sizeof(cell))){ - warnx("No cell found for file \"%s\".", path); - return -1; - } - if(verbose) - warnx("File \"%s\" lives in cell \"%s\"", path, cell); - return afslog_cell(cell, 0); -} - -static int -do_afslog(const char *cell) -{ - int k5ret; - - k5ret = 0; - -#ifdef KRB5 - if(context != NULL && id != NULL && use_krb5) { - k5ret = krb5_afslog(context, id, cell, realm); - if(k5ret == 0) - return 0; - } -#endif - if (cell == NULL) - cell = ""; -#ifdef KRB5 - if (k5ret) - krb5_warn(context, k5ret, "krb5_afslog(%s)", cell); -#endif - if (k5ret) - return 1; - return 0; -} - -static void -log_func(void *ctx, const char *str) -{ - fprintf(stderr, "%s\n", str); -} - -int -main(int argc, char **argv) -{ - int optind = 0; - int i; - int num; - int ret = 0; - int failed = 0; - struct cell_list *p; - - setprogname(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(!k_hasafs()) - errx(1, "AFS does not seem to be present on this machine"); - - if(unlog_flag){ - k_unlog(); - exit(0); - } -#ifdef KRB5 - ret = krb5_init_context(&context); - if (ret) { - context = NULL; - } else { - if (client_string) { - krb5_principal client; - - ret = krb5_parse_name(context, client_string, &client); - if (ret == 0) - ret = krb5_cc_cache_match(context, client, &id); - if (ret) - id = NULL; - } - if (id == NULL && cache_string) { - if(krb5_cc_resolve(context, cache_string, &id) != 0) { - krb5_warnx(context, "failed to open kerberos 5 cache '%s'", - cache_string); - id = NULL; - } - } - if (id == NULL) - if(krb5_cc_default(context, &id) != 0) - id = NULL; - } -#endif - - if (verbose) - kafs_set_verbose(log_func, NULL); - - num = 0; - for(i = 0; i < files.num_strings; i++){ - afslog_file(files.strings[i]); - num++; - } - free_getarg_strings (&files); - for(i = 0; i < cells.num_strings; i++){ - afslog_cell(cells.strings[i], 1); - num++; - } - free_getarg_strings (&cells); - for(i = optind; i < argc; i++){ - num++; - if(strcmp(argv[i], ".") == 0 || - strcmp(argv[i], "..") == 0 || - strchr(argv[i], '/') || - access(argv[i], F_OK) == 0) - afslog_file(argv[i]); - else - afslog_cell(argv[i], 1); - } - if(num == 0) { - if(do_afslog(NULL)) - failed++; - } else - for(p = cell_list; p; p = p->next) { - if(verbose) - warnx("Getting tokens for cell \"%s\"", p->cell); - if(do_afslog(p->cell)) - failed++; - } - - return failed; -} diff --git a/kerberosV/src/appl/afsutil/afslog.cat1 b/kerberosV/src/appl/afsutil/afslog.cat1 deleted file mode 100644 index 5716faeda25..00000000000 --- a/kerberosV/src/appl/afsutil/afslog.cat1 +++ /dev/null @@ -1,69 +0,0 @@ - -AFSLOG(1) BSD General Commands Manual AFSLOG(1) - -NNAAMMEE - aaffsslloogg -- obtain AFS tokens - -SSYYNNOOPPSSIISS - aaffsslloogg [--hh | ----hheellpp] [----nnoo--vv44] [----nnoo--vv55] [--uu | ----uunnlloogg] [--vv | ----vveerrbboossee] - [----vveerrssiioonn] [--cc _c_e_l_l | ----cceellll==_c_e_l_l] [--kk _r_e_a_l_m | ----rreeaallmm==_r_e_a_l_m] [--PP - _p_r_i_n_c_i_p_a_l | ----pprriinncciippaall==_p_r_i_n_c_i_p_a_l] [--pp _p_a_t_h | ----ffiillee==_p_a_t_h] - [_c_e_l_l | _p_a_t_h _._._.] - -DDEESSCCRRIIPPTTIIOONN - aaffsslloogg obtains AFS tokens for a number of cells. What cells to get tokens - for can either be specified as an explicit list, as file paths to get - tokens for, or be left unspecified, in which case aaffsslloogg will use what- - ever magic krb_afslog(3) decides upon. - - Supported options: - - ----nnoo--vv44 - This makes aaffsslloogg not try using Kerberos 4. - - ----nnoo--vv55 - This makes aaffsslloogg not try using Kerberos 5. - - --PP _p_r_i_n_c_i_p_a_l, ----pprriinncciippaall _p_r_i_n_c_i_p_a_l - select what Kerberos 5 principal to use. - - ----ccaacchhee _c_a_c_h_e - select what Kerberos 5 credential cache to use. ----pprriinncciippaall - overrides this option. - - --uu, ----uunnlloogg - Destroy tokens instead of obtaining new. If this is specified, - all other options are ignored (except for ----hheellpp and ----vveerrssiioonn). - - --vv, ----vveerrbboossee - Adds more verbosity for what is actually going on. - - --cc _c_e_l_l_, ----cceellll==_c_e_l_l - This specified one or more cell names to get tokens for. - - --kk _r_e_a_l_m, ----rreeaallmm==_r_e_a_l_m - This is the Kerberos realm the AFS servers live in, this should - normally not be specified. - - --pp _p_a_t_h, ----ffiillee==_p_a_t_h - This specified one or more file paths for which tokens should be - obtained. - - Instead of using --cc and --pp, you may also pass a list of cells and file - paths after any other options. These arguments are considered files if - they are either the strings ``.'' or ``..'' or they contain a slash, or - if there exists a file by that name. - -EEXXAAMMPPLLEESS - Assuming that there is no file called ``openafs.org'' in the current - directory, and that _/_a_f_s_/_o_p_e_n_a_f_s_._o_r_g points to that cell, the follwing - should be identical: - - $ afslog -c openafs.org - $ afslog openafs.org - $ afslog /afs/openafs.org/some/file - -SSEEEE AALLSSOO - krb_afslog(3) - -HEIMDAL November 26, 2002 HEIMDAL diff --git a/kerberosV/src/appl/afsutil/pagsh.1 b/kerberosV/src/appl/afsutil/pagsh.1 deleted file mode 100644 index a510f1066a3..00000000000 --- a/kerberosV/src/appl/afsutil/pagsh.1 +++ /dev/null @@ -1,94 +0,0 @@ -.\" Copyright (c) 2005 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: pagsh.1,v 1.2 2013/06/17 18:57:40 robert Exp $ -.\" -.Dd February 12, 2005 -.Dt PAGSH 1 -.Os Heimdal -.Sh NAME -.Nm pagsh -.Nd creates a new credential cache sandbox -.Sh SYNOPSIS -.Nm -.Op Fl c Ar command-string -.Op Fl h | Fl Fl help -.Op Fl Fl version -.Op Fl Fl cache-type= Ns Ar string -.Ar command [args...] -.Sh DESCRIPTION -Supported options: -.Bl -tag -width Ds -.It Xo -.Fl c Ar command-string -Executes command(s) contained in -.Ar command-string . -.Xc -.It Xo -.Fl Fl cache-type= Ns Ar string -.Xc -.It Xo -.Fl h , -.Fl Fl help -.Xc -.It Xo -.Fl Fl version -.Xc -.El -.Pp -.Nm -creates a new credential cache sandbox for the user to live in. -If AFS is installed on the computer, the user is put in a newly -created Process Authentication Group (PAG). -.Pp -For Kerberos 5, the credential cache type that is used is the same as -the credential cache type that was used at the time of -.Nm -invocation. -The credential cache type can be controlled by the option -.Fl Fl cache-type . -.Sh EXAMPLES -Create a new sandbox where new credentials can be used, while the old -credentials can be used by other processes. -.Bd -literal -offset indent -$ klist -Credentials cache: FILE:/tmp/krb5cc_913 - Principal: lha@E.KTH.SE - - Issued Expires Principal -Feb 12 10:08:31 Feb 12 20:06:36 krbtgt/E.KTH.SE@E.KTH.SE -$ pagsh -$ klist -klist: No ticket file: /tmp/krb5cc_03014a -.Ed -.Sh SEE ALSO -.Xr afslog 1 , -.Xr kinit 1 diff --git a/kerberosV/src/appl/afsutil/pagsh.c b/kerberosV/src/appl/afsutil/pagsh.c deleted file mode 100644 index 6b20cdcb8f7..00000000000 --- a/kerberosV/src/appl/afsutil/pagsh.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 1995 - 2005 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 -#endif - -RCSID("$Id: pagsh.c,v 1.6 2013/06/17 18:57:40 robert Exp $"); - -#include -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#include -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_PWD_H -#include -#endif - -#ifdef KRB5 -#include -#endif -#include - -#include -#include -#include - -#ifndef TKT_ROOT -#define TKT_ROOT "/tmp/tkt" -#endif - -static int help_flag; -static int version_flag; -static int c_flag; -#ifdef KRB5 -static char *typename_arg; -#endif - -struct getargs getargs[] = { - { NULL, 'c', arg_flag, &c_flag }, -#ifdef KRB5 - { "cache-type", 0, arg_string, &typename_arg }, -#endif - { "version", 0, arg_flag, &version_flag }, - { "help", 'h', arg_flag, &help_flag }, -}; - -static int num_args = sizeof(getargs) / sizeof(getargs[0]); - -static void -usage(int ecode) -{ - arg_printusage(getargs, num_args, NULL, "command [args...]"); - exit(ecode); -} - -/* - * Run command with a new ticket file / credentials cache / token - */ - -int -main(int argc, char **argv) -{ - int f; - char tf[1024]; - char *p; - - char *path; - char **args; - unsigned int i; - int optind = 0; - - setprogname(argv[0]); - if(getarg(getargs, num_args, argc, argv, &optind)) - usage(1); - if(help_flag) - usage(0); - if(version_flag) { - print_version(NULL); - exit(0); - } - - argc -= optind; - argv += optind; - -#ifdef KRB5 - { - krb5_error_code ret; - krb5_context context; - krb5_ccache id; - const char *name; - - ret = krb5_init_context(&context); - if (ret) /* XXX should this really call exit ? */ - errx(1, "no kerberos 5 support"); - - ret = krb5_cc_new_unique(context, typename_arg, NULL, &id); - if (ret) - krb5_err(context, 1, ret, "Failed generating credential cache"); - - name = krb5_cc_get_name(context, id); - if (name == NULL) - krb5_errx(context, 1, "Generated credential cache have no name"); - - snprintf(tf, sizeof(tf), "%s:%s", krb5_cc_get_type(context, id), name); - - ret = krb5_cc_close(context, id); - if (ret) - krb5_err(context, 1, ret, "Failed closing credential cache"); - - krb5_free_context(context); - - esetenv("KRB5CCNAME", tf, 1); - } -#endif - - snprintf (tf, sizeof(tf), "%s_XXXXXX", TKT_ROOT); - f = mkstemp (tf); - if (f < 0) - err(1, "mkstemp failed"); - close (f); - unlink (tf); - esetenv("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 *))); - - if(*argv == NULL) { - path = getenv("SHELL"); - if(path == NULL){ - struct passwd *pw = k_getpwuid(geteuid()); - if (pw == NULL) - errx(1, "no such user: %d", (int)geteuid()); - path = strdup(pw->pw_shell); - } - } else { - 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(); - - unsetenv("PAGPID"); - execvp(path, args); - if (errno == ENOENT || c_flag) { - char **sh_args = malloc ((i + 2) * sizeof(char *)); - unsigned 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); - } - err (1, "execvp"); -} diff --git a/kerberosV/src/appl/afsutil/pagsh.cat1 b/kerberosV/src/appl/afsutil/pagsh.cat1 deleted file mode 100644 index 9493f6f3007..00000000000 --- a/kerberosV/src/appl/afsutil/pagsh.cat1 +++ /dev/null @@ -1,47 +0,0 @@ - -PAGSH(1) BSD General Commands Manual PAGSH(1) - -NNAAMMEE - ppaaggsshh -- creates a new credential cache sandbox - -SSYYNNOOPPSSIISS - ppaaggsshh [--cc _c_o_m_m_a_n_d_-_s_t_r_i_n_g] [--hh | ----hheellpp] [----vveerrssiioonn] [----ccaacchhee--ttyyppee==_s_t_r_i_n_g] - _c_o_m_m_a_n_d _[_a_r_g_s_._._._] - -DDEESSCCRRIIPPTTIIOONN - Supported options: - - --cc _c_o_m_m_a_n_d_-_s_t_r_i_n_g Executes command(s) contained in _c_o_m_m_a_n_d_-_s_t_r_i_n_g. - - ----ccaacchhee--ttyyppee==_s_t_r_i_n_g - - --hh, ----hheellpp - - ----vveerrssiioonn - - ppaaggsshh creates a new credential cache sandbox for the user to live in. If - AFS is installed on the computer, the user is put in a newly created - Process Authentication Group (PAG). - - For Kerberos 5, the credential cache type that is used is the same as the - credential cache type that was used at the time of ppaaggsshh invocation. The - credential cache type can be controlled by the option ----ccaacchhee--ttyyppee. - -EEXXAAMMPPLLEESS - Create a new sandbox where new credentials can be used, while the old - credentials can be used by other processes. - - $ klist - Credentials cache: FILE:/tmp/krb5cc_913 - Principal: lha@E.KTH.SE - - Issued Expires Principal - Feb 12 10:08:31 Feb 12 20:06:36 krbtgt/E.KTH.SE@E.KTH.SE - $ pagsh - $ klist - klist: No ticket file: /tmp/krb5cc_03014a - -SSEEEE AALLSSOO - afslog(1), kinit(1) - -Heimdal February 12, 2005 Heimdal diff --git a/kerberosV/src/appl/dceutils/ChangeLog b/kerberosV/src/appl/dceutils/ChangeLog deleted file mode 100644 index f583aeb58b8..00000000000 --- a/kerberosV/src/appl/dceutils/ChangeLog +++ /dev/null @@ -1,39 +0,0 @@ -2007-12-13 Love Hörnquist Åstrand - - * Makefile.am: Add missing files, from Buchan Milne. - -2006-08-08 Love Hörnquist Åstrand - - * k5dcecon.c: Check for seteuid failure, prompted by MIT advisory. - -2005-04-06 Love Hörnquist Åstrand - - * testpag.c: use NULL as last argument to execl, not 0 - -2002-08-12 Johan Danielsson - - * Makefile.am: rename dpagaix_LDFLAGS etc to appease automake - -2001-08-24 Assar Westerlund - - * Makefile.am (dpagaix): make sure of using $(EXEEXT) just to - please automake (this is aix-only code) - -2001-02-07 Assar Westerlund - - * Makefile.am (dpagaix): needs to be linked with ld, add an - explicit command for it. from Ake Sandgren - -2000-10-02 Assar Westerlund - - * Makefile.am: link with roken on everything except irix, where - apperently it fails. reported by Ake Sandgren - -2000-07-17 Johan Danielsson - - * Makefile.am: set compiler flags - -2000-07-01 Assar Westerlund - - * imported stuff from Ake Sandgren - diff --git a/kerberosV/src/appl/dceutils/Makefile.am b/kerberosV/src/appl/dceutils/Makefile.am deleted file mode 100644 index 0e898f39cf9..00000000000 --- a/kerberosV/src/appl/dceutils/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:35 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - - -DFSPROGS = k5dcecon -if AIX -AIX_DFSPROGS = dpagaix -endif - -libexec_PROGRAMS = $(DFSPROGS) $(AIX_DFSPROGS) - -dpagaix_CFLAGS = $(dpagaix_cflags) -dpagaix_LDFLAGS = $(dpagaix_ldflags) -dpagaix_LDADD = $(dpagaix_ldadd) - -dpagaix$(EXEEXT): $(dpagaix_OBJECTS) - ld -edpagaix -o dpagaix$(EXEEXT) $(dpagaix_OBJECTS) $(srcdir)/dfspag.exp - -LIB_dce = -ldce - -k5dcecon_SOURCES = k5dcecon.c k5dce.h - -dpagaix_SOURCES = dpagaix.c - -EXTRA_DIST = \ - NTMakefile \ - dfspag.exp \ - README.dcedfs \ - README.original \ - testpag.c - -if IRIX -LDADD = $(LIB_dce) -else -LDADD = $(LIB_roken) $(LIB_dce) -endif diff --git a/kerberosV/src/appl/dceutils/Makefile.in b/kerberosV/src/appl/dceutils/Makefile.in deleted file mode 100644 index 745bd87b23a..00000000000 --- a/kerberosV/src/appl/dceutils/Makefile.in +++ /dev/null @@ -1,913 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -libexec_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) -subdir = appl/dceutils -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__EXEEXT_1 = k5dcecon$(EXEEXT) -@AIX_TRUE@am__EXEEXT_2 = dpagaix$(EXEEXT) -am__installdirs = "$(DESTDIR)$(libexecdir)" -PROGRAMS = $(libexec_PROGRAMS) -am_dpagaix_OBJECTS = dpagaix-dpagaix.$(OBJEXT) -dpagaix_OBJECTS = $(am_dpagaix_OBJECTS) -am__DEPENDENCIES_1 = -dpagaix_DEPENDENCIES = $(am__DEPENDENCIES_1) -dpagaix_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(dpagaix_CFLAGS) $(CFLAGS) \ - $(dpagaix_LDFLAGS) $(LDFLAGS) -o $@ -am_k5dcecon_OBJECTS = k5dcecon.$(OBJEXT) -k5dcecon_OBJECTS = $(am_k5dcecon_OBJECTS) -k5dcecon_LDADD = $(LDADD) -@IRIX_FALSE@k5dcecon_DEPENDENCIES = $(am__DEPENDENCIES_1) \ -@IRIX_FALSE@ $(am__DEPENDENCIES_1) -@IRIX_TRUE@k5dcecon_DEPENDENCIES = $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(dpagaix_SOURCES) $(k5dcecon_SOURCES) -DIST_SOURCES = $(dpagaix_SOURCES) $(k5dcecon_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -DFSPROGS = k5dcecon -@AIX_TRUE@AIX_DFSPROGS = dpagaix -dpagaix_CFLAGS = $(dpagaix_cflags) -dpagaix_LDFLAGS = $(dpagaix_ldflags) -dpagaix_LDADD = $(dpagaix_ldadd) -LIB_dce = -ldce -k5dcecon_SOURCES = k5dcecon.c k5dce.h -dpagaix_SOURCES = dpagaix.c -EXTRA_DIST = \ - NTMakefile \ - dfspag.exp \ - README.dcedfs \ - README.original \ - testpag.c - -@IRIX_FALSE@LDADD = $(LIB_roken) $(LIB_dce) -@IRIX_TRUE@LDADD = $(LIB_dce) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/dceutils/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/dceutils/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libexecPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexecdir)" && rm -f $$files - -clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -k5dcecon$(EXEEXT): $(k5dcecon_OBJECTS) $(k5dcecon_DEPENDENCIES) - @rm -f k5dcecon$(EXEEXT) - $(LINK) $(k5dcecon_OBJECTS) $(k5dcecon_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpagaix-dpagaix.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/k5dcecon.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -dpagaix-dpagaix.o: dpagaix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dpagaix_CFLAGS) $(CFLAGS) -MT dpagaix-dpagaix.o -MD -MP -MF $(DEPDIR)/dpagaix-dpagaix.Tpo -c -o dpagaix-dpagaix.o `test -f 'dpagaix.c' || echo '$(srcdir)/'`dpagaix.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dpagaix-dpagaix.Tpo $(DEPDIR)/dpagaix-dpagaix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dpagaix.c' object='dpagaix-dpagaix.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dpagaix_CFLAGS) $(CFLAGS) -c -o dpagaix-dpagaix.o `test -f 'dpagaix.c' || echo '$(srcdir)/'`dpagaix.c - -dpagaix-dpagaix.obj: dpagaix.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dpagaix_CFLAGS) $(CFLAGS) -MT dpagaix-dpagaix.obj -MD -MP -MF $(DEPDIR)/dpagaix-dpagaix.Tpo -c -o dpagaix-dpagaix.obj `if test -f 'dpagaix.c'; then $(CYGPATH_W) 'dpagaix.c'; else $(CYGPATH_W) '$(srcdir)/dpagaix.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dpagaix-dpagaix.Tpo $(DEPDIR)/dpagaix-dpagaix.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dpagaix.c' object='dpagaix-dpagaix.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(dpagaix_CFLAGS) $(CFLAGS) -c -o dpagaix-dpagaix.obj `if test -f 'dpagaix.c'; then $(CYGPATH_W) 'dpagaix.c'; else $(CYGPATH_W) '$(srcdir)/dpagaix.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) all-local -installdirs: - for dir in "$(DESTDIR)$(libexecdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libexecPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libexecPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libexecPROGRAMS clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ - install-libexecPROGRAMS install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-libexecPROGRAMS - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -dpagaix$(EXEEXT): $(dpagaix_OBJECTS) - ld -edpagaix -o dpagaix$(EXEEXT) $(dpagaix_OBJECTS) $(srcdir)/dfspag.exp - -# 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/kerberosV/src/appl/dceutils/NTMakefile b/kerberosV/src/appl/dceutils/NTMakefile deleted file mode 100644 index eb27eb4f6cf..00000000000 --- a/kerberosV/src/appl/dceutils/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\dceutils - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/dceutils/README.dcedfs b/kerberosV/src/appl/dceutils/README.dcedfs deleted file mode 100644 index 5849ad62498..00000000000 --- a/kerberosV/src/appl/dceutils/README.dcedfs +++ /dev/null @@ -1,59 +0,0 @@ -This is a set of patches and files to get a DFS ticket from a k5 ticket. -This code comes from Doug Engert, Argonne Nat. Lab (See dce/README.original -for more info) - -The files in dce are; -testpag: for testing if this is at all possible. -k5dfspag: included in libkrb5 -k5dcecon: Creates (or searches for) the actual DFSPAG ticketfile. -dpagaix: An AIX syscall stub. -README.original: Original README file from Doug Engert - - -Certain applications (rshd/telnetd) have been patched to call the -functions in k5dfspag when the situation is right. They are ifdef -with DCE. The patches are also originally from Doug but they -where against MIT krb5 code and have been merged into heimdal by me. -I will try to fix ftpd soon... - -There is also an ifdefs for DCE && AIX that can be used to make AIX -use DCE for getting group/passwd entries. This is needed if one is running -with a bare bones passwd/group file and AUTHSTATE set to DCE (This will be -more or less clear to people doing this...) I have forced this on for now. - -k5dfspag.c is in lib/krb5 -k5dfspag.c is dependent on DCE only. -It is also POSIX systems only. There are defines for the location of -k5dcecon and dpagaix that needs a correct configure setting. - -k5dcecon needs no special things for the compile except whatever is needed -on the target system to compile dce programs. -(On aix the dce compile flags are: -D_THREAD_SAFE -D_AIX32_THREADS=1 -D_AIX41 -D_AES_SOURCE or one can use xlc_r4 if it is version 3.6.4 or later) - -k5dcecon wants the following libs (on aix 4.3): --ldce (and setenv from somewhere) - -dpagaix is only needed on AIX (see k5dfspag.c). -dpagaix needs dfspag.exp and is linked with -ld -edpagaix -o dpagaix dpagaix.o dfspag.exp - - -Hope to get this into heimdal soon :-) although I know that you will have to -change some things to get it cleanly into configure. Since I don't know the -structure of the code (heimdal), nor enough of configure, good enough I -just won't try it myself. - -One more thing, to get this to work one has to put fcache_version = x in -krb5.conf where x = whatever the DCE implementation understands, (usually -1 or 2). -Thanks for adding that... - - -Åke Sandgren (ake@hpc2n.umu.se) -HPC2N -Umeå University -Sweden - -PS -I have now added patches for configure.in and some Makefile.am's to get this -all cleanly (I hope) into heimdal. diff --git a/kerberosV/src/appl/dceutils/README.original b/kerberosV/src/appl/dceutils/README.original deleted file mode 100644 index 088702307a3..00000000000 --- a/kerberosV/src/appl/dceutils/README.original +++ /dev/null @@ -1,335 +0,0 @@ -KERBEROS and DCE INTEROPERABILITY ROUTINES - -WHAT'S NEW - -When k5dcecon was examining the ticket caches looking to -update one with a newer TGT, it might update the wrong -one for the correct user. This problem was reported by PNNL, -and is now fixed. - -Any Kerberized application can now use a forwarded TGT to establish a -DCE context, or can use a previously established DCE context. This is -both a functional improvement and a performance improvement. - -BACKGROUND - -The MIT Kerberos 5 Release 1.x and DCE 1.1 can interoperate in a -number of ways. This is possible because: - - o DCE used Kerberos 5 internally. Based on the MIT code as of beta 4 - or so, with additional changes. - - o The DCE security server can act as a K5 KDC, as defined in RFC 1510 - and responds on port 88. - - o On the clients, DCE and Kerberos use the same format for the ticket - cache, and then can share it. The KRB5CCNAME environment variable points - at the cache. - - o On the clients, DCE and Kerberos use the same format for the srvtab - file. DCE refers to is a /krb5/v5srvtab and Kerberos as - /etc/krb5.keytab. They can be symlinked. - - o MIT has added many options to the krb5.conf configuration file - which allows newer features of Release 1.0 to be turned off to match - the earlier version of Kerberos upon which DCE is based. - - o DCE will accept a externally obtained Kerberos TGT in place of a - password when establishing a DCE context. - -There are some areas where they differ, including the following: - - o Administration of the database and the keytab files is done by the - DCE routines, rather the the Kerberos kadmin. - - o User password changes must be done using the DCE commands. Kpasswd - does not work. (But there are mods to Kerberos to use the v5passwd - with DCE. - - o DCE goes beyond authentication only, and provides authorization via - the PAC, and the dce-ptgt tickets stored in the cache. Thus a - Kerberos KDC can not act as a DCE security server. - - o A DCE cell and Kerberos realm can cross-realm authenticate, but - there can be no intermediate realms. (There are other problems - in this area as well. But directly connected realms/cells do work.) - - o You can't link a module with the DCE library and the Kerberos - library. They have conflicting routines, static data and structures. - -One of the main features of DCE is the Distributed File System -DFS. Access to DFS requires authentication and authorization, and when -one uses a Kerberized network utility such as telnet, a forwarded -Kerberos ticket can be used to establish the DCE context to allow -access to DFS. - - -NEW TO THIS RELEASE - -This release introduces sharing of a DCE context, and PAG, and allows -any Kerberized application to establish or share the context. This is -made possible by using an undocumented feature of DCE which is on at -least the Transarc and IBM releases of DCE 1.1. - -I am in the process of trying to get this contributed to the general -DCE 1.2.2 release as a patch, so it could be included in other vendors -products. HP has expressed interest in doing this, as well as the -OpenGroup if the modification is contributed. You can help by -requesting Transarc and/or IBM to submit this modification to the -OpenGroup and ask your vendor to adopt this modification. - -The feature is a modification to the setpag() system call which will -allow an authorized process to set the PAG to a specific value, and -thus allow unrelated processes to share the same PAG. - -This then allows the Kerberized daemons such as kshd, to exec a DCE -module which established the DCE context. Kshd then sets the -KRB5CCNAME environment variable and then issues the setpag() to use -this context. This solves the linking problem. This is done via the -k5dfspag.c routine. - -The k5dfspag.c code is compiled with the lib/krb5/os routines and -included in the libkrb5. A daemon calls krb5_dfs_pag after the -krb5_kuserok has determined that the Kerberos principal and local -userid pair are acceptable. This should be done early so as to give -the daemon access to the home directory which may be located on DFS. -If the .k5login file is used by krb5_kuserok it will need to be -accessed by the daemon and will need special ACL handling. - -The krb5_dfs_pag routine will exec the k5dcecon module to do all the -real work. Upon return, if a PAG is obtained, krb5_dfs_pag with set -the PAG for the current process to the returned PAG value. It will -also set the KRB5CCNAME environment as well. Under DCE the PAG value -is the nnnnnnn part of the name of the cache: -FILE:/opt/dcelocal/var/security/creds/dcecred_nnnnnnnn. - -The k5dcecon routine will attempt to use TGT which may have been -forwarded, to convert it to a DCE context. If there is no TGT, an -attempt will be made to join an existing PAG for the local userid, and -Kerberos principal. If there are existing PAGs, and a forwarded TGT, -k5dcecon will check the lifetime of the forwarded TGT, and if it is -less than the lifetime of the PAG, it will just join the PAG. If it -is greater, it will refresh the PAG using the forwarded TGT. -This approach has the advantage of not requiring many new tickets from -having to be obtained, and allows one to refresh a DCE context, or use -an already established context. - -If the system also has AFS, the AFS krb5_afs_pag should be called -after the krb5_dfs_pag, since cache pointed at via the KRB5CCNAME may -have changed, such as if a DFS PAG has been joined. The AFS code does -not have the capability to join an existing AFS PAG, but can use the -same cache which might already had a -afsx/@ service ticket. - - -WHAT'S IN THIS RELEASE - -The k5prelogin, k5dcelogin, k5afslogin (with ak5log) were designed to -be slipped in between telnetd or klogind and login.krb5. They would -use a forwarded Kerberos ticket to establish a DCE context. They are -the older programs which are included here. They work on all DCE -platforms, and don't take advantage of the undocumented setpag -feature. (A version of k5dcelogin is being included with DCE 1.2.2) - -K5dcecon is the new program which can be used to create, update or -join a DCE context. k5dcecon returns KRB5CCNAME string which contains -the PAG. - -k5dfspag.c is to be built in the MIT Kerberos 5 release 1.0 patchlevel -1 and added to the libkrb5. It will exec k5dcecon and upon return set -the KRB5CCNAME and PAG. Mods to Kerberized klogind, rshd, telnetd, -ftpd are available to use the k5dfspag. - -Testpag.c is a test programs to see if the PAG can be set. - -The cpwkey.c routine can be used to change a key in the DCE registry, -by adding the key directly, or by setting the salt/pepper and password -or by providing the key and the pepper. This could be useful when -coping keys from a K4 or AFS database to DCE. It can also be used when -setting a DCE to K5 cross-cell key. This program is a test program -For mass inserts, it should be rewritten to read from stdin. - -K5dcelogin can also be called directly, much like dce_login. -I use the following commands in effect do the same thing as dce_login -and get a forwardable ticket, DCE context and an AFS token: - - #!/bin/csh - # simulate a dce_login using krb5 kinit and k5dcelogin - # - setenv KRB5CCNAME FILE:/tmp/krb5cc_p$$ - /krb5/bin/kinit -f - exec /krb5/sbin/k5dcelogin /krb5/sbin/k5afslogin /bin/csh - #exec /krb5/sbin/k5dcelogin /bin/csh - -This could be useful in a mixed cell where "AS_REQ" messages are -handled by a K5 KDC, but DCE RPCs are handled by the DCE security -server. - -TESTING THE SETPAG - -The krb5_dfs_pag routine relies on an undocumented feature which is -in the AIX and Transarc Solaris ports of DCE and has been recently -added to the SGI version. To test if this feature is present -on some other DFS implementation use the testpag routine. - -The testpag routine attempts to set a PAG value to one you supply. It -uses the afs_syscall with the afs_setpag, and passes the supplied -PAG value as the next parameter. On an unmodifed system, this -will be ignored, and a new will be set. You should also check that -if run as a user, you cannot join a PAG owned by another user. -When run as root, any PAG should be usable. - -On a machine with DFS running, do a dce_login to get a DCE context and -PAG. ECHO the KRB5CCNAME and look at the nnnnnnnn at the end. It -should look like an 8 char hex value, which may be 41ffxxxx on some -systems. - -Su to root and unsetenv KRB5CCNAME. Do a testpag -n nnnnnnnn where -nnnnnnnn is the PAG obtained for the above name. - -It should look like this example on an AIX 4.1.4 system: - - pembroke# ./testpag -n 63dc9997 - calling k5dcepag newpag=63dc9997 - PAG returned = 63dc9997 - -You will be running under a new shell with the PAG and KRB5CCNAME set. -If the PAG returned is the same as the newpag, then it worked. You can -further verify this by doing a DCE klist, cd to DFS and a DCE klist -again. The klist should show some tickets for DFS servers. - -If the PAG returned is not the same, and repeated attempts show a -returned PAG decremented by 1 from the previous returned PAG, then -this system does not have the modification For example: - - # ./testpag -n 41fffff9 - calling k5dcepag newpag=41fffff9 - PAG returned = 41fffff8 - # ./testpag -n 41fffff9 - calling k5dcepag newpag=41fffff9 - PAG returned = 41fffff7 - -In this case the syscall is ignoring the newpag parameter. - -Running it with -n 0 should get the next PAG value with or without -this modification. - -If the DFS kernel extensions are not installed, you would get -something like this: - - caliban.ctd.anl.gov% ./testpag -n 012345678 - calling k5dcepag newpag=012345678 - Setpag failed with a system error - PAG returned = ffffffff - Not a good pag value - -If you DFS implementation does not have this modification, you could -attempt to install it yourself. But this requires source and requires -modifications to the kernel extensions. At the end of this note is an -untested sample using the DCE 1.2.2 source code. You can also contact -your system vendor and ask for this modification. - -UNICOS has a similar function setppag(newpag) which can be used to set -the PAG of the parent. Contact me if you are interested. - -HOW TO INSTALL - -Examine the k5dfspag.c file to make sure the DFS syscalls are correct -for your platform. See the /opt/dcelocal/share/include/dcedfs/syscall.h -on Solaris for example. - -You should build the testpag routine and make sure it works before -adding all the other mods. If it fails you can still use the klogind -and telnetd with the k5prelogin and k5dcelogin code. - -If you intend to install with a prefix other than /krb5, change: -DPAGAIX and K5DCECON in k5dfspag.c; the three references in -k5prelogin.c; and the DESTDIR in the Makefile. - -Get k5101.cdiff.xxxxxx.tar file and install the mods for ANL_DFS_PAG -and ANL_DCE to the MIT Kerberos 5 source. These mods turn on some DCE -related changes and the calls to krb5_dfs_pag. - -Symlink or copy the k5dfspag.c to the src/lib/krb5/os directory. - -Add the -DANL_DFS_PAG and -DANL_DCE flags to the configuration. - -Configure and Build the Kerberos v5. - -Modify the k5dce Makefile for your system. - -Build the k5dcecon and related programs. - -Install both the MIT Kerberos v5 and the k5dcecon and dpagaix if AIX. - -The makefile can also build k5dcelogin and k5prelogin. The install -can install k5dcelogin, k5prelogin and update the links for login.krb5 --> k5prelogin and moving login.krb5 to login.k5. If you will be using -the k5dcecon/k5dfspag with the Kerberos mods, you don't need -k5prelogin, or the links changed, and may not need k5dcelogin. - -Note that Transarc has obfuscated the entries to the lib, and -the 1.0.3a is different from the 1.1. You may need to build two -versions of the k5dcelogin and/or k5dcecon one for each. - -AIX ONLY - -The dpagaix routine is needed for AIX because of the way they do the -syscalls. - -The following fix.aix.libdce.mk is not needed if dce 2.1.0.21 -has been installed. This PTF exposed the needed entrypoints. - -The fix.aix.libdce.mk is a Makefile for AIX 4.x to add the required -external entry points to the libdce.a. These are needed by k5dcecon -and k5dcelogin. A bug report was submitted to IBM on this, and it was -rejected. But since DCE 1.2.2 will have a k5dcelogin, this should not -be needed with 1.2.2 - -Copy /usr/lib/libdce.a to /usr/libdce.a.orig before starting. Copy the -makefile to its own directory. It will create a new libdce.a which you -need to copy back to /usr/lib/libdce.a You will need to reboot the -machine. See the /usr/lpp/dce/examples/inst/README.AIX for a similar -procedure. IBM was not responsive in a request to have these added. - -UNTESTED KERNEL EXTENSION FOR SETPAG - -*** src/file/osi/,osi_pag.c Wed Oct 2 13:03:05 1996 ---- src/file/osi/osi_pag.c Mon Jul 28 13:53:13 1997 -*************** -*** 293,298 **** ---- 293,302 ---- - int code; - - osi_MakePreemptionRight(); -+ /* allow sharing of a PAG by non child processes DEE- 6/6/97 */ -+ if (unused && osi_GetUID(osi_getucred()) == 0) { -+ newpag = unused; -+ } else { - osi_mutex_enter(&osi_pagLock); - now = osi_Time(); - soonest = osi_firstPagTime + -*************** -*** 309,314 **** ---- 313,319 ---- - } - osi_mutex_exit(&osi_pagLock); - newpag = osi_genpag(); -+ } - osi_pcred_lock(p); - credp = crcopy(osi_getucred()); - code = osi_SetPagInCred(credp, newpag); - -Created 07/08/96 -Modified 09/30/96 -Modified 11/19/96 -Modified 12/19/96 -Modified 06/20/97 -Modified 07/28/97 -Modified 02/18/98 - - Douglas E. Engert - Argonne National Laboratory - 9700 South Cass Avenue - Argonne, Illinois 60439 - (630) 252-5444 diff --git a/kerberosV/src/appl/dceutils/dfspag.exp b/kerberosV/src/appl/dceutils/dfspag.exp deleted file mode 100644 index ed39788d5ed..00000000000 --- a/kerberosV/src/appl/dceutils/dfspag.exp +++ /dev/null @@ -1,3 +0,0 @@ -#!/unix -* kernel extentions used to get the pag -kafs_syscall syscall diff --git a/kerberosV/src/appl/dceutils/dpagaix.c b/kerberosV/src/appl/dceutils/dpagaix.c deleted file mode 100644 index 304a9a230ee..00000000000 --- a/kerberosV/src/appl/dceutils/dpagaix.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * dpagaix.c - * On AIX we need to get the kernel extentions - * with the DFS kafs_syscall in it. - * We might be running on a system - * where DFS is not active. - * So we use this dummy routine which - * might not load to do the dirty work - * - * DCE does this with the /usr/lib/drivers/dfsloadobj - * - */ - - int dpagaix(parm1, parm2, parm3, parm4, parm5, parm6) - int parm1; - int parm2; - int parm3; - int parm4; - int parm5; - int parm6; - { - return(kafs_syscall(parm1, parm2, parm3, parm4, parm5, parm6)); - } diff --git a/kerberosV/src/appl/dceutils/k5dce.h b/kerberosV/src/appl/dceutils/k5dce.h deleted file mode 100644 index 49036249f22..00000000000 --- a/kerberosV/src/appl/dceutils/k5dce.h +++ /dev/null @@ -1,165 +0,0 @@ -/* dummy K5 routines which are needed to get this to - * compile without having access ti the DCE versions - * of the header files. - * Thiis is very crude, and OSF needs to expose the K5 - * API. - */ - -#ifdef sun -/* Transarc obfascates these routines */ -#ifdef DCE_1_1 - -#define krb5_init_ets _dce_PkjKqOaklP -#define krb5_copy_creds _dce_LuFxPiITzD -#define krb5_unparse_name _dce_LWHtAuNgRV -#define krb5_get_default_realm _dce_vDruhprWGh -#define krb5_build_principal _dce_qwAalSzTtF -#define krb5_build_principal_ext _dce_vhafIQlejW -#define krb5_build_principal_va _dce_alsqToMmuJ -#define krb5_cc_default _dce_KZRshhTXhE -#define krb5_cc_default_name _dce_bzJVAjHXVQ -#define sec_login_krb5_add_cred _dce_ePDtOJTZvU - -#else /* DCE 1.0.3a */ - -#define krb5_init_ets _dce_BmLRpOVsBo -#define krb5_copy_creds _dce_VGwSEBNwaf -#define krb5_unparse_name _dce_PgAOkJoMXA -#define krb5_get_default_realm _dce_plVOzStKyK -#define krb5_build_principal _dce_uAKSsluIFy -#define krb5_build_principal_ext _dce_tRMpPiRada -#define krb5_build_principal_va _dce_SxnLejZemH -#define krb5_cc_default _dce_SeKosWFnsv -#define krb5_cc_default_name _dce_qJeaphJWVc -#define sec_login_krb5_add_cred _dce_uHwRasumsN - -#endif -#endif - -/* Define the bare minimum k5 structures which are needed - * by this program. Since the krb5 includes are not supplied - * with DCE, these were based on the MIT Kerberos 5 beta 3 - * which should match the DCE as of 1.0.3 at least. - * The tricky one is the krb5_creds, since one is allocated - * by this program, and it needs access to the client principal - * in it. - * Note that there are no function prototypes, so there is no - * compile time checking. - * DEE 07/11/95 - */ -#define NPROTOTYPE(x) () -typedef int krb5_int32; /* assuming all DCE systems are 32 bit */ -typedef short krb5short; /* assuming short is 16 bit */ -typedef krb5_int32 krb5_error_code; -typedef unsigned char krb5_octet; -typedef krb5_octet krb5_boolean; -typedef krb5short krb5_keytype; /* in k5.2 it's a short */ -typedef krb5_int32 krb5_flags; -typedef krb5_int32 krb5_timestamp; /* is a time_t in krb5.h */ - -typedef char * krb5_pointer; /* pointer to unexposed data */ - -typedef struct _krb5_ccache { - struct _krb5_cc_ops *ops; - krb5_pointer data; -} *krb5_ccache; - -typedef struct _krb5_cc_ops { - char *prefix; - char *(*get_name) NPROTOTYPE((krb5_ccache)); - krb5_error_code (*resolve) NPROTOTYPE((krb5_ccache *, char *)); - krb5_error_code (*gen_new) NPROTOTYPE((krb5_ccache *)); - krb5_error_code (*init) NPROTOTYPE((krb5_ccache, krb5_principal)); - krb5_error_code (*destroy) NPROTOTYPE((krb5_ccache)); - krb5_error_code (*close) NPROTOTYPE((krb5_ccache)); - krb5_error_code (*store) NPROTOTYPE((krb5_ccache, krb5_creds *)); - krb5_error_code (*retrieve) NPROTOTYPE((krb5_ccache, krb5_flags, - krb5_creds *, krb5_creds *)); - krb5_error_code (*get_princ) NPROTOTYPE((krb5_ccache, - krb5_principal *)); - krb5_error_code (*get_first) NPROTOTYPE((krb5_ccache, - krb5_cc_cursor *)); - krb5_error_code (*get_next) NPROTOTYPE((krb5_ccache, krb5_cc_cursor *, - krb5_creds *)); - krb5_error_code (*end_get) NPROTOTYPE((krb5_ccache, krb5_cc_cursor *)); - krb5_error_code (*remove_cred) NPROTOTYPE((krb5_ccache, krb5_flags, - krb5_creds *)); - krb5_error_code (*set_flags) NPROTOTYPE((krb5_ccache, krb5_flags)); -} krb5_cc_ops; - -typedef struct _krb5_keyblock { - krb5_keytype keytype; - int length; - krb5_octet *contents; -} krb5_keyblock; - -typedef struct _krb5_ticket_times { - krb5_timestamp authtime; - krb5_timestamp starttime; - krb5_timestamp endtime; - krb5_timestamp renew_till; -} krb5_ticket_times; - -typedef krb5_pointer krb5_cc_cursor; - -typedef struct _krb5_data { - int length; - char *data; -} krb5_data; - -typedef struct _krb5_authdata { - int ad_type; - int length; - krb5_octet *contents; -} krb5_authdata; - -typedef struct _krb5_creds { - krb5_pointer client; - krb5_pointer server; - krb5_keyblock keyblock; - krb5_ticket_times times; - krb5_boolean is_skey; - krb5_flags ticket_flags; - krb5_pointer **addresses; - krb5_data ticket; - krb5_data second_ticket; - krb5_pointer **authdata; -} krb5_creds; - -typedef krb5_pointer krb5_principal; - -#define KRB5_CC_END 336760974 -#define KRB5_TC_OPENCLOSE 0x00000001 - -/* Ticket flags */ -/* flags are 32 bits; each host is responsible to put the 4 bytes - representing these bits into net order before transmission */ -/* #define TKT_FLG_RESERVED 0x80000000 */ -#define TKT_FLG_FORWARDABLE 0x40000000 -#define TKT_FLG_FORWARDED 0x20000000 -#define TKT_FLG_PROXIABLE 0x10000000 -#define TKT_FLG_PROXY 0x08000000 -#define TKT_FLG_MAY_POSTDATE 0x04000000 -#define TKT_FLG_POSTDATED 0x02000000 -#define TKT_FLG_INVALID 0x01000000 -#define TKT_FLG_RENEWABLE 0x00800000 -#define TKT_FLG_INITIAL 0x00400000 -#define TKT_FLG_PRE_AUTH 0x00200000 -#define TKT_FLG_HW_AUTH 0x00100000 -#ifdef PK_INIT -#define TKT_FLG_PUBKEY_PREAUTH 0x00080000 -#define TKT_FLG_DIGSIGN_PREAUTH 0x00040000 -#define TKT_FLG_PRIVKEY_PREAUTH 0x00020000 -#endif - - -#define krb5_cc_get_principal(cache, principal) (*(cache)->ops->get_princ)(cache, principal) -#define krb5_cc_set_flags(cache, flags) (*(cache)->ops->set_flags)(cache, flags) -#define krb5_cc_get_name(cache) (*(cache)->ops->get_name)(cache) -#define krb5_cc_start_seq_get(cache, cursor) (*(cache)->ops->get_first)(cache, cursor) -#define krb5_cc_next_cred(cache, cursor, creds) (*(cache)->ops->get_next)(cache, cursor, creds) -#define krb5_cc_destroy(cache) (*(cache)->ops->destroy)(cache) -#define krb5_cc_end_seq_get(cache, cursor) (*(cache)->ops->end_get)(cache, cursor) - -/* end of k5 dummy typedefs */ - diff --git a/kerberosV/src/appl/dceutils/k5dcecon.c b/kerberosV/src/appl/dceutils/k5dcecon.c deleted file mode 100644 index 88cdf281fe7..00000000000 --- a/kerberosV/src/appl/dceutils/k5dcecon.c +++ /dev/null @@ -1,792 +0,0 @@ -/* - * (c) Copyright 1995 HEWLETT-PACKARD COMPANY - * - * To anyone who acknowledges that this file is provided - * "AS IS" without any express or implied warranty: - * permission to use, copy, modify, and distribute this - * file for any purpose is hereby granted without fee, - * provided that the above copyright notice and this - * notice appears in all copies, and that the name of - * Hewlett-Packard Company not be used in advertising or - * publicity pertaining to distribution of the software - * without specific, written prior permission. Hewlett- - * Packard Company makes no representations about the - * suitability of this software for any purpose. - * - */ -/* - * k5dcecon - Program to convert a K5 TGT to a DCE context, - * for use with DFS and its PAG. - * - * The program is designed to be called as a sub process, - * and return via stdout the name of the cache which implies - * the PAG which should be used. This program itself does not - * use the cache or PAG itself, so the PAG in the kernel for - * this program may not be set. - * - * The calling program can then use the name of the cache - * to set the KRB5CCNAME and PAG for itself and its children. - * - * If no ticket was passed, an attemplt to join an existing - * PAG will be made. - * - * If a forwarded K5 TGT is passed in, either a new DCE - * context will be created, or an existing one will be updated. - * If the same ticket was already used to create an existing - * context, it will be joined instead. - * - * Parts of this program are based on k5dceauth,c which was - * given to me by HP and by the k5dcelogin.c which I developed. - * A slightly different version of k5dcelogin.c, was added to - * DCE 1.2.2 - * - * D. E. Engert 6/17/97 ANL - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include "k5dce.h" - -#include -#include -#include - -/* #define DEBUG */ -#if defined(DEBUG) -#define DEEDEBUG(A) fprintf(stderr,A); fflush(stderr) -#define DEEDEBUG2(A,B) fprintf(stderr,A,B); fflush(stderr) -#else -#define DEEDEBUG(A) -#define DEEDEBUG2(A,B) -#endif - -#ifdef __hpux -#define seteuid(A) setresuid(-1,A,-1) -#endif - - -int k5dcecreate (uid_t, char *, char*, krb5_creds **); -int k5dcecon (uid_t, char *, char *); -int k5dcegettgt (krb5_ccache *, char *, char *, krb5_creds **); -int k5dcematch (uid_t, char *, char *, off_t *, krb5_creds **); -int k5dcesession (uid_t, char *, krb5_creds **, int *,krb5_flags); - - -char *progname = "k5dcecon"; -static time_t now; - -#ifdef notdef -#ifdef _AIX -/*---------------------------------------------*/ - /* AIX with DCE 1.1 does not have the com_err in the libdce.a - * do a half hearted job of substituting for it. - */ -void com_err(char *p1, int code, ...) -{ - int lst; - dce_error_string_t err_string; - dce_error_inq_text(code, err_string, &lst); - fprintf(stderr,"Error %d in %s: %s\n", code, p1, err_string ); -} - -/*---------------------------------------------*/ -void krb5_init_ets() -{ - -} -#endif -#endif - - -/*------------------------------------------------*/ -/* find a cache to use for our new pag */ -/* Since there is no simple way to determine which - * caches are associated with a pag, we will have - * do look around and see what makes most sense on - * different systems. - * on a Solaris system, and in the DCE source, - * the pags always start with a 41. - * this is not true on the IBM, where there does not - * appear to be any pattern. - * - * But since we are always certifing our creds when - * they are received, we can us that fact, and look - * at the first word of the associated data file - * to see that it has a "5". If not don't use. - */ - -int k5dcesession(luid, pname, tgt, ppag, tflags) - uid_t luid; - char *pname; - krb5_creds **tgt; - int *ppag; - krb5_flags tflags; -{ - DIR *dirp; - struct dirent *direntp; - off_t size; - krb5_timestamp endtime; - int better = 0; - krb5_creds *xtgt; - - char prev_name[17] = ""; - krb5_timestamp prev_endtime; - off_t prev_size; - u_long prev_pag = 0; - - char ccname[64] = "FILE:/opt/dcelocal/var/security/creds/"; - - error_status_t st; - sec_login_handle_t lcontext = 0; - dce_error_string_t err_string; - int lst; - - DEEDEBUG2("k5dcesession looking for flags %8.8x\n",tflags); - - dirp = opendir("/opt/dcelocal/var/security/creds/"); - if (dirp == NULL) { - return 1; - } - - while ( (direntp = readdir( dirp )) != NULL ) { - -/* - * (but root has the ffffffff which we are not interested in) - */ - if (!strncmp(direntp->d_name,"dcecred_",8) - && (strlen(direntp->d_name) == 16)) { - - /* looks like a cache name, lets do the stat, etc */ - - strcpy(ccname+38,direntp->d_name); - if (!k5dcematch(luid, pname, ccname, &size, &xtgt)) { - - /* it's one of our caches, see if it is better - * i.e. the endtime is farther, and if the endtimes - * are the same, take the larger, as he who has the - * most tickets wins. - * it must also had the same set of flags at least - * i.e. if the forwarded TGT is forwardable, this one must - * be as well. - */ - - DEEDEBUG2("Cache:%s",direntp->d_name); - DEEDEBUG2(" size:%d",size); - DEEDEBUG2(" flags:%8.8x",xtgt->ticket_flags); - DEEDEBUG2(" %s",ctime((time_t *)&xtgt->times.endtime)); - - if ((xtgt->ticket_flags & tflags) == tflags ) { - if (prev_name[0]) { - if (xtgt->times.endtime > prev_endtime) { - better = 1; - } else if ((xtgt->times.endtime = prev_endtime) - && (size > prev_size)){ - better = 1; - } - } else { /* the first */ - if (xtgt->times.endtime >= now) { - better = 1; - } - } - if (better) { - strcpy(prev_name, direntp->d_name); - prev_endtime = xtgt->times.endtime; - prev_size = size; - sscanf(prev_name+8,"%8X",&prev_pag); - *tgt = xtgt; - better = 0; - } - } - } - } - } - (void)closedir( dirp ); - - if (!prev_name[0]) - return 1; /* failed to find one */ - - DEEDEBUG2("Best: %s\n",prev_name); - - if (ppag) - *ppag = prev_pag; - - strcpy(ccname+38,prev_name); - setenv("KRB5CCNAME",ccname,1); - - return(0); -} - - -/*----------------------------------------------*/ -/* see if this cache is for this this principal */ - -int k5dcematch(luid, pname, ccname, sizep, tgt) - uid_t luid; - char *pname; - char *ccname; - off_t *sizep; /* size of the file */ - krb5_creds **tgt; -{ - - krb5_ccache cache; - struct stat stbuf; - char ccdata[256]; - int fd; - int status; - - /* DEEDEBUG2("k5dcematch called: cache=%s\n",ccname+38); */ - - if (!strncmp(ccname,"FILE:",5)) { - - strcpy(ccdata,ccname+5); - strcat(ccdata,".data"); - - /* DEEDEBUG2("Checking the .data file for %s\n",ccdata); */ - - if (stat(ccdata, &stbuf)) - return(1); - - if (stbuf.st_uid != luid) - return(1); - - if ((fd = open(ccdata,O_RDONLY)) == -1) - return(1); - - if ((read(fd,&status,4)) != 4) { - close(fd); - return(1); - } - - /* DEEDEBUG2(".data file status = %d\n", status); */ - - if (status != 5) - return(1); - - if (stat(ccname+5, &stbuf)) - return(1); - - if (stbuf.st_uid != luid) - return(1); - - *sizep = stbuf.st_size; - } - - return(k5dcegettgt(&cache, ccname, pname, tgt)); -} - - -/*----------------------------------------*/ -/* k5dcegettgt - get the tgt from a cache */ - -int k5dcegettgt(pcache, ccname, pname, tgt) - krb5_ccache *pcache; - char *ccname; - char *pname; - krb5_creds **tgt; - -{ - krb5_ccache cache; - krb5_cc_cursor cur; - krb5_creds creds; - int code; - int found = 1; - krb5_principal princ; - char *kusername; - krb5_flags flags; - char *sname, *realm, *tgtname = NULL; - - /* Since DCE does not expose much of the Kerberos interface, - * we will have to use what we can. This means setting the - * KRB5CCNAME for each file we want to test - * We will also not worry about freeing extra cache structures - * as this this routine is also not exposed, and this should not - * effect this module. - * We should also free the creds contents, but that is not exposed - * either. - */ - - setenv("KRB5CCNAME",ccname,1); - cache = NULL; - *tgt = NULL; - - if (code = krb5_cc_default(pcache)) { - com_err(progname, code, "while getting ccache"); - goto return2; - } - - DEEDEBUG("Got cache\n"); - flags = 0; - if (code = krb5_cc_set_flags(*pcache, flags)) { - com_err(progname, code,"While setting flags"); - goto return2; - } - DEEDEBUG("Set flags\n"); - if (code = krb5_cc_get_principal(*pcache, &princ)) { - com_err(progname, code, "While getting princ"); - goto return1; - } - DEEDEBUG("Got principal\n"); - if (code = krb5_unparse_name(princ, &kusername)) { - com_err(progname, code, "While unparsing principal"); - goto return1; - } - - DEEDEBUG2("Unparsed to \"%s\"\n", kusername); - DEEDEBUG2("pname is \"%s\"\n", pname); - if (strcmp(kusername, pname)) { - DEEDEBUG("Principals not equal\n"); - goto return1; - } - DEEDEBUG("Principals equal\n"); - - realm = strchr(pname,'@'); - realm++; - - if ((tgtname = malloc(9 + 2 * strlen(realm))) == 0) { - fprintf(stderr,"Malloc failed for tgtname\n"); - goto return1; - } - - strcpy(tgtname,"krbtgt/"); - strcat(tgtname,realm); - strcat(tgtname,"@"); - strcat(tgtname,realm); - - DEEDEBUG2("Getting tgt %s\n", tgtname); - if (code = krb5_cc_start_seq_get(*pcache, &cur)) { - com_err(progname, code, "while starting to retrieve tickets"); - goto return1; - } - - while (!(code = krb5_cc_next_cred(*pcache, &cur, &creds))) { - krb5_creds *cred = &creds; - - if (code = krb5_unparse_name(cred->server, &sname)) { - com_err(progname, code, "while unparsing server name"); - continue; - } - - if (strncmp(sname, tgtname, strlen(tgtname)) == 0) { - DEEDEBUG("FOUND\n"); - if (code = krb5_copy_creds(&creds, tgt)) { - com_err(progname, code, "while copying TGT"); - goto return1; - } - found = 0; - break; - } - /* we should do a krb5_free_cred_contents(creds); */ - } - - if (code = krb5_cc_end_seq_get(*pcache, &cur)) { - com_err(progname, code, "while finishing retrieval"); - goto return2; - } - -return1: - flags = KRB5_TC_OPENCLOSE; - krb5_cc_set_flags(*pcache, flags); /* force a close */ - -return2: - if (tgtname) - free(tgtname); - - return(found); -} - - -/*------------------------------------------*/ -/* Convert a forwarded TGT to a DCE context */ -int k5dcecon(luid, luser, pname) - uid_t luid; - char *luser; - char *pname; -{ - - krb5_creds *ftgt = NULL; - krb5_creds *tgt = NULL; - unsigned32 dfspag; - boolean32 reset_passwd = 0; - int lst; - dce_error_string_t err_string; - char *shell_prog; - krb5_ccache fcache; - char *ccname; - char *kusername; - char *urealm; - char *cp; - int pag; - int code; - krb5_timestamp endtime; - - - /* If there is no cache to be converted, we should not be here */ - - if ((ccname = getenv("KRB5CCNAME")) == NULL) { - DEEDEBUG("No KRB5CCNAME\n"); - return(1); - } - - if (k5dcegettgt(&fcache, ccname, pname, &ftgt)) { - fprintf(stderr, "%s: Did not find TGT\n", progname); - return(1); - } - - - DEEDEBUG2("flags=%x\n",ftgt->ticket_flags); - if (!(ftgt->ticket_flags & TKT_FLG_FORWARDABLE)){ - fprintf(stderr,"Ticket not forwardable\n"); - return(0); /* but OK to continue */ - } - - setenv("KRB5CCNAME","",1); - -#define TKT_ACCEPTABLE (TKT_FLG_FORWARDABLE | TKT_FLG_PROXIABLE \ - | TKT_FLG_MAY_POSTDATE | TKT_FLG_RENEWABLE | TKT_FLG_HW_AUTH \ - | TKT_FLG_PRE_AUTH) - - if (!k5dcesession(luid, pname, &tgt, &pag, - (ftgt->ticket_flags & TKT_ACCEPTABLE))) { - if (ftgt->times.endtime > tgt->times.endtime) { - DEEDEBUG("Updating existing cache\n"); - return(k5dceupdate(&ftgt, pag)); - } else { - DEEDEBUG("Using existing cache\n"); - return(0); /* use the original one */ - } - } - /* see if the tgts match up */ - - if ((code = k5dcecreate(luid, luser, pname, &ftgt))) { - return (code); - } - - /* - * Destroy the Kerberos5 cred cache file. - * but dont care aout the return code. - */ - - DEEDEBUG("Destroying the old cache\n"); - if ((code = krb5_cc_destroy(fcache))) { - com_err(progname, code, "while destroying Kerberos5 ccache"); - } - return (0); -} - - -/*--------------------------------------------------*/ -/* k5dceupdate - update the cache with a new TGT */ -/* Assumed that the KRB5CCNAME has been set */ - -int k5dceupdate(krbtgt, pag) - krb5_creds **krbtgt; - int pag; -{ - - krb5_ccache ccache; - int code; - - if (code = krb5_cc_default(&ccache)) { - com_err(progname, code, "while opening cache for update"); - return(2); - } - - if (code = ccache->ops->init(ccache,(*krbtgt)->client)) { - com_err(progname, code, "while reinitilizing cache"); - return(3); - } - - /* krb5_cc_store_cred */ - if (code = ccache->ops->store(ccache, *krbtgt)) { - com_err(progname, code, "while updating cache"); - return(2); - } - - sec_login_pag_new_tgt(pag, (*krbtgt)->times.endtime); - return(0); -} -/*--------------------------------------------------*/ -/* k5dcecreate - create a new DCE context */ - -int k5dcecreate(luid, luser, pname, krbtgt) - uid_t luid; - char *luser; - char *pname; - krb5_creds **krbtgt; -{ - - char *cp; - char *urealm; - char *username; - char *defrealm; - uid_t uid; - - error_status_t st; - sec_login_handle_t lcontext = 0; - sec_login_auth_src_t auth_src = 0; - boolean32 reset_passwd = 0; - int lst; - dce_error_string_t err_string; - - setenv("KRB5CCNAME","",1); /* make sure it not misused */ - - uid = getuid(); - DEEDEBUG2("uid=%d\n",uid); - - /* if run as root, change to user, so as to have the - * cache created for the local user even if cross-cell - * If run as a user, let standard file protection work. - */ - - if (uid == 0) { - if (seteuid(luid) < 0) - goto abort; - } - - cp = strchr(pname,'@'); - *cp = '\0'; - urealm = ++cp; - - DEEDEBUG2("basename=%s\n",cp); - DEEDEBUG2("realm=%s\n",urealm); - - /* now build the username as a single string or a /.../cell/user - * if this is a cross cell - */ - - if ((username = malloc(7+strlen(pname)+strlen(urealm))) == 0) { - fprintf(stderr,"Malloc failed for username\n"); - goto abort; - } - if (krb5_get_default_realm(&defrealm)) { - DEEDEBUG("krb5_get_default_realm failed\n"); - goto abort; - } - - - if (!strcmp(urealm,defrealm)) { - strcpy(username,pname); - } else { - strcpy(username,"/.../"); - strcat(username,urealm); - strcat(username,"/"); - strcat(username,pname); - } - - /* - * Setup a DCE login context - */ - - if (sec_login_setup_identity((unsigned_char_p_t)username, - (sec_login_external_tgt|sec_login_proxy_cred), - &lcontext, &st)) { - /* - * Add our TGT. - */ - DEEDEBUG("Adding our new TGT\n"); - sec_login_krb5_add_cred(lcontext, *krbtgt, &st); - if (st) { - dce_error_inq_text(st, err_string, &lst); - fprintf(stderr, - "Error while adding credentials for %s because %s\n", - username, err_string); - goto abort; - } - DEEDEBUG("validating and certifying\n"); - /* - * Now "validate" and certify the identity, - * usually we would pass a password here, but... - * sec_login_valid_and_cert_ident - * sec_login_validate_identity - */ - - if (sec_login_validate_identity(lcontext, 0, &reset_passwd, - &auth_src, &st)) { - DEEDEBUG2("validate_identity st=%d\n",st); - if (st) { - dce_error_inq_text(st, err_string, &lst); - fprintf(stderr, "Validation error for %s because %s\n", - username, err_string); - goto abort; - } - if (!sec_login_certify_identity(lcontext,&st)) { - dce_error_inq_text(st, err_string, &lst); - fprintf(stderr, - "Credentials not certified because %s\n",err_string); - } - if (reset_passwd) { - fprintf(stderr, - "Password must be changed for %s\n", username); - } - if (auth_src == sec_login_auth_src_local) { - fprintf(stderr, - "Credentials obtained from local registry for %s\n", - username); - } - if (auth_src == sec_login_auth_src_overridden) { - fprintf(stderr, "Validated %s from local override entry, no network credentials obtained\n", username); - goto abort; - - } - /* - * Actually create the cred files. - */ - DEEDEBUG("Ceating new cred files.\n"); - sec_login_set_context(lcontext, &st); - if (st) { - dce_error_inq_text(st, err_string, &lst); - fprintf(stderr, - "Unable to set context for %s because %s\n", - username, err_string); - goto abort; - } - - /* - * Now free up the local context and leave the - * network context with its pag - */ -#if 0 - sec_login_release_context(&lcontext, &st); - if (st) { - dce_error_inq_text(st, err_string, &lst); - fprintf(stderr, - "Unable to release context for %s because %s\n", - username, err_string); - goto abort; - } -#endif - } - else { - DEEDEBUG2("validate failed %d\n",st); - dce_error_inq_text(st, err_string, &lst); - fprintf(stderr, - "Unable to validate %s because %s\n", username, - err_string); - goto abort; - } - } - else { - dce_error_inq_text(st, err_string, &lst); - fprintf(stderr, - "Unable to setup login entry for %s because %s\n", - username, err_string); - goto abort; - } - - done: - /* if we were root, get back to root */ - - DEEDEBUG2("sec_login_inq_pag %8.8x\n", - sec_login_inq_pag(lcontext, &st)); - - if (uid == 0) { - seteuid(0); - } - - DEEDEBUG("completed\n"); - return(0); - - abort: - if (uid == 0) { - seteuid(0); - } - - DEEDEBUG("Aborting\n"); - return(2); -} - - - -/*-------------------------------------------------*/ -main(argc, argv) - int argc; - char *argv[]; -{ - int status; - extern int optind; - extern char *optarg; - int rv; - - char *lusername = NULL; - char *pname = NULL; - int fflag = 0; - struct passwd *pw; - uid_t luid; - uid_t myuid; - char *ccname; - krb5_creds *tgt = NULL; - -#ifdef DEBUG - close(2); - open("/tmp/k5dce.debug",O_WRONLY|O_CREAT|O_APPEND, 0600); -#endif - - if (myuid = getuid()) { - DEEDEBUG2("UID = %d\n",myuid); - exit(33); /* must be root to run this, get out now */ - } - - while ((rv = getopt(argc,argv,"l:p:fs")) != -1) { - DEEDEBUG2("Arg = %c\n", rv); - switch(rv) { - case 'l': /* user name */ - lusername = optarg; - DEEDEBUG2("Optarg = %s\n", optarg); - break; - case 'p': /* principal name */ - pname = optarg; - DEEDEBUG2("Optarg = %s\n", optarg); - break; - case 'f': /* convert a forwarded TGT to a context */ - fflag++; - break; - case 's': /* old test parameter, ignore it */ - break; - } - } - - setlocale(LC_ALL, ""); - krb5_init_ets(); - time(&now); /* set time to check expired tickets */ - - /* if lusername == NULL, Then user is passed as the USER= variable */ - - if (!lusername) { - lusername = getenv("USER"); - if (!lusername) { - fprintf(stderr, "USER not in environment\n"); - return(3); - } - } - - if ((pw = getpwnam(lusername)) == NULL) { - fprintf(stderr, "Who are you?\n"); - return(44); - } - - luid = pw->pw_uid; - - if (fflag) { - status = k5dcecon(luid, lusername, pname); - } else { - status = k5dcesession(luid, pname, &tgt, NULL, 0); - } - - if (!status) { - printf("%s",getenv("KRB5CCNAME")); /* return via stdout to caller */ - DEEDEBUG2("KRB5CCNAME=%s\n",getenv("KRB5CCNAME")); - } - - DEEDEBUG2("Returning status %d\n",status); - return (status); -} diff --git a/kerberosV/src/appl/dceutils/testpag.c b/kerberosV/src/appl/dceutils/testpag.c deleted file mode 100644 index 8c9bf4a653b..00000000000 --- a/kerberosV/src/appl/dceutils/testpag.c +++ /dev/null @@ -1,150 +0,0 @@ -/* Test the k5dcepag routine by setting a pag, and - * and execing a shell under this pag. - * - * This allows you to join a PAG which was created - * earlier by some other means. - * for example k5dcecon - * - * Must be run as root for testing only. - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#define POSIX_SETJMP -#define POSIX_SIGNALS - -#ifdef POSIX_SIGNALS -typedef struct sigaction handler; -#define handler_init(H,F) (sigemptyset(&(H).sa_mask), \ - (H).sa_flags=0, \ - (H).sa_handler=(F)) -#define handler_swap(S,NEW,OLD) sigaction(S, &NEW, &OLD) -#define handler_set(S,OLD) sigaction(S, &OLD, NULL) -#else -typedef sigtype (*handler)(); -#define handler_init(H,F) ((H) = (F)) -#define handler_swap(S,NEW,OLD) ((OLD) = signal ((S), (NEW))) - -#define handler_set(S,OLD) (signal ((S), (OLD))) -#endif - -typedef void sigtype; - -/* - * We could include the dcedfs/syscall.h which should have these - * numbers, but it has extra baggage. So for - * simplicity sake now, we define these here. - */ - - -#define AFSCALL_SETPAG 2 -#define AFSCALL_GETPAG 11 - -#if defined(sun) -#define AFS_SYSCALL 72 - -#elif defined(hpux) -/* assume HPUX 10 + or is it 50 */ -#define AFS_SYSCALL 326 - -#elif defined(_AIX) -#define DPAGAIX "dpagaix" -/* #define DPAGAIX "/krb5/sbin/dpagaix" */ - -#elif defined(sgi) || defined(_sgi) -#define AFS_SYSCALL 206+1000 - -#else -#define AFS_SYSCALL (Unknown_DFS_AFS_SYSCALL) -#endif - -static sigjmp_buf setpag_buf; - -static sigtype mysig() -{ - siglongjmp(setpag_buf, 1); -} - - -int krb5_dfs_newpag(new_pag) - int new_pag; -{ - handler sa1, osa1; - handler sa2, osa2; - int pag = -1; - - handler_init (sa1, mysig); - handler_init (sa2, mysig); - handler_swap (SIGSYS, sa1, osa1); - handler_swap (SIGSEGV, sa2, osa2); - - if (sigsetjmp(setpag_buf, 1) == 0) { -#if defined(_AIX) - int (*dpagaix)(int, int, int, int, int, int); - - if (dpagaix = load(DPAGAIX, 0, 0)) - pag = (*dpagaix)(AFSCALL_SETPAG, new_pag, 0, 0, 0, 0); -#else - pag = syscall(AFS_SYSCALL,AFSCALL_SETPAG, new_pag, 0, 0, 0, 0); -#endif - handler_set (SIGSYS, osa1); - handler_set (SIGSEGV, osa2); - return(pag); - } - - fprintf(stderr,"Setpag failed with a system error\n"); - /* syscall failed! return 0 */ - handler_set (SIGSYS, osa1); - handler_set (SIGSEGV, osa2); - return(-1); -} - -main(argc, argv) - int argc; - char *argv[]; -{ - extern int optind; - extern char *optarg; - int rv; - int rc; - unsigned int pag; - unsigned int newpag = 0; - char ccname[256]; - int nflag = 0; - - while((rv = getopt(argc,argv,"n:")) != -1) { - switch(rv) { - case 'n': - nflag++; - sscanf(optarg,"%8x",&newpag); - break; - default: - printf("Usage: k5dcepagt -n pag \n"); - exit(1); - } - } - - if (nflag) { - fprintf (stderr,"calling k5dcepag newpag=%8.8x\n",newpag); - pag = krb5_dfs_newpag(newpag); - - fprintf (stderr,"PAG returned = %8.8x\n",pag); - if ((pag != 0) && (pag != -1)) { - sprintf (ccname, - "FILE:/opt/dcelocal/var/security/creds/dcecred_%8.8x", - pag); - esetenv("KRB5CCNAME",ccname,1); - execl("/bin/csh", "csh", NULL); - } - else { - fprintf(stderr," Not a good pag value\n"); - } - } -} diff --git a/kerberosV/src/appl/ftp/ChangeLog b/kerberosV/src/appl/ftp/ChangeLog deleted file mode 100644 index 72df672d698..00000000000 --- a/kerberosV/src/appl/ftp/ChangeLog +++ /dev/null @@ -1,1038 +0,0 @@ -2008-05-29 Love Hörnquist Åstrand - - * ftp/ftp.c: use the correct length to munmap and use msync. - -2008-05-28 Love Hörnquist Åstrand - - * ftp/ftp.c: Rewrite sliding window code so it doesn't have a - integer overrun. - - * ftp/ftp.c: Try sliding mmap window over memory file (10MB - window), works better with larger files (ie doesn't fail). - -2008-04-10 Love Hörnquist Åstrand - - * ftpd/logwtmp.c: Use asl for logging ftpd wtmp messages. - -2007-07-12 Love Hörnquist Åstrand - - * ftp/gssapi.c: Fix pointer vs strict alias rules. - -2007-06-20 Love Hörnquist Åstrand - - * ftp/security.c: if no mech have no session, its ok, just don't - call it. - - * ftp/security.h: provide prototype for sec_userok(). - - * move ksetpag after initgroups to make it work on Linux when its - without syscall hooks to change sys_setgroups preserve the - pag. From Alexsander Boström. - -2007-06-09 Love Hörnquist Åstrand - - * ftpd/Makefile.am: don't clean yacc/lex files in CLEANFILES, - maintainers clean will do that for us. - -2006-10-07 Love Hörnquist Åstrand - - * ftpd/Makefile.am: Add man_MANS to EXTRA_DIST - - * ftp/Makefile.am: Add man_MANS to EXTRA_DIST - -2006-08-08 Love Hörnquist Åstrand - - * ftpd/ftpd.c: Add comment by seteuid call isn't not needed. - - * ftpd/ftpd.c: Check return values from seteuid, prompted by MIT - advisory. Thanks to Tom Yu at MIT, and Michael Calmer and Marcus - Meissner at SUSE. Either of CVE-2006-3083 or CVE-2006-3084. - -2006-06-27 Love Hörnquist Åstrand - - * ftpd/gss_userok.c (gss_userok): create a local krb5_context and - use that instead of the libgssapi context (that might not exist). - -2006-05-05 Love Hörnquist Åstrand - - * Rename u_intXX_t to uintXX_t - -2006-03-23 Love Hörnquist Åstrand - - * ftp/ftp.1: Add undocument flags and spelling, from Ted Percival - - -2006-02-27 Johan Danielsson - - * ftpd/ftpd.8: fix grammar in --no-insecure-oob option (partly - from Thomas Klausner) - -2006-01-24 Love Hörnquist Åstrand - - * ftp/ftp.c: Indent. - -2006-01-12 Johan Danielsson - - * ftpd/ftpd.c (pass): remove unused variable in the !OTP case - -2005-10-22 Love Hörnquist Åstrand - - * ftpd/ls.c: Check return value from asprintf instead of string != - NULL since it undefined behavior on Linux. From Björn Sandell - - * ftpd/gss_userok.c: Check return value from asprintf instead of - string != NULL since it undefined behavior on Linux. From Björn - Sandell - - * ftpd/ftpd.c: Check return value from asprintf instead of string - != NULL since it undefined behavior on Linux. From Björn Sandell - - * ftp/gssapi.c: Check return value from asprintf instead of string - != NULL since it undefined behavior on Linux. From Björn Sandell - -2005-10-12 Johan Danielsson - - * ftp/ftp.1: document -x - - * ftp/security.h: implement cprotect (from MIT) - - * ftp/security.c: add -x (encrypt) option; implement cprotect - (from MIT); make sure we CCC if switching to clear-text command - channel - - * ftp/cmdtab.c: implement cprotect (from MIT) - - * ftp/ruserpass.c: if doing command line encryption (-x), ignore - prot commands in .netrc - - * ftp/ftp_var.h: add -x (encrypt) option - - * ftp/globals.c: add -x (encrypt) option - - * ftp/main.c: add -x (encrypt) option - -2005-07-19 Love Hörnquist Åstrand - - * ftpd/ftpcmd.y: Fix shadow warning. - - * ftp/security.c: Fix shadow warning. - * ftp/security.c: Fix shadow warnings. - - * ftp/ruserpass.c: Fix shadow warnings. - - * ftp/ftp.c: Fix shadow warnings. - - * ftp/cmds.c: fix shadow warnings - - * Add Kerberos 5 klist, old patch from Tomas Nyström (remove krb4 - support). Support klist in client for kerberos 5 clase. - Clean up delegation of gss tokens and do afslog. - -2005-07-13 Love Hörnquist Åstrand - - * ftp/gssapi.c (gss_adat): avoid leaking memory - (gss_auth): always try next kname if there is one, independant of - min_stat - - * ftp/gssapi.c: avoid const warning, use sin4 instead of sin to - avoid shadow warning, free target_name - -2005-07-09 Love Hörnquist Åstrand - - * ftp/security.c: keep track of if CCC was passed - - * ftpd/extern.h: variable to keep track of if CCC was passed - - * ftpd/ftpcmd.y: sprinkel check_secure, check if CCC was passed in - check_secure - -2005-06-02 Love Hörnquist Åstrand - - * ftpd/ftpd.c (filename_check): change signednes of p to avoid - warning, move typecasts - -2005-05-29 Love Hörnquist Åstrand - - * ftpd/ftpd.c: avoid 'unused variable' warnings - -2005-05-10 David Love - - * ftpd/pathnames.h: #ifdef protect _PATH_ISSUE - -2005-04-25 Love Hörnquist Åstrand - - * ftp/domacro.c: handle string trunctions - -2005-04-24 Love Hörnquist Åstrand - - * ftp/security.c: use strlcat - - * ftp/domacro.c: use strlcpy - -2005-04-20 Love Hörnquist Åstrand - - * ftp/security.c: cast size_t to unsigned long - -2005-04-18 Love Hörnquist Åstrand - - * ftpd/ftpd.c (statcmd): cast argument to isdigit to unsigned char - - * ftp/cmds.c (mget): cast char to unsigned char to make sure its - not negative when passing it to tolower - -2005-04-07 Love Hörnquist Åstrand - - * ftp/ftp.c: fix 3 'var' might be used uninitialized warnings - -2005-04-04 Love Hörnquist Åstrand - - * ftp/cmds.c: MacOS is also a unix that doesn't define - __unix__/unix While here, rewrite this part of the function to not - modify that string, but rather take a copy of it and them modify - is, all this just to pacify gcc - -2005-01-09 Love Hörnquist Åstrand - - * ftp/domacro.c: cast argument to is* to unsigned char - - * ftp/ftp.c: cast argument to tolower to unsigned char - -2004-08-20 Love Hörnquist Åstrand - - * ftp/ftp.c: send ABOR protect with security layer if its there - - * ftpd/{ftpd_locl.h, extern.h, ftpcmd.y, ftpd.8, ftpd.c}: - Remove all traces of setjmp/longjmp. - Handle those command that is needed in oobhandler, - those are ABOR, STAT, ENC, CONF, MIC. - add options to turn off insecure OOB handling and document the option - - Changes inspired by openbsd and netbsd changes but quite diffrent is - most places since the code no longer look and is structured the same - way. - -2004-08-16 Johan Danielsson - - * ftp/main.c: reverse help strings for --no-gss-bindings and - --no-gss-delegate - -2004-06-20 Love Hörnquist Åstrand - - * ftpd/ftpcmd.y: make cbuf 64k to handle lager tickets From: - MAAAAA MOOOR - -2004-03-14 Love Hörnquist Åstrand - - * ftpd/ftpd.c (main): setpag if there is krb4 OR krb5 support - -2003-12-19 Love Hörnquist Åstrand - - * ftp/security.h: add ftp_do_gss_delegate - - * ftp/main.c (getargs): negative flag for delegating gss creds - - * ftp/gssapi.c (ftp_do_gss_delegate): delegate creds (default on) - -2003-09-03 Love Hörnquist Åstrand - - * ftp/ftp.c: s/des_read_pw_string/UI_UTIL_read_pw_string/ - - * ftp/cmds.c: s/des_read_pw_string/UI_UTIL_read_pw_string/ - -2003-07-19 Love Hörnquist Åstrand - - * ftp/security.h: add ftp_do_gss_bindings - - * ftp/ftp.1: fix mdoc bug - - * ftp/ftp.1: document --no-gss-bindings - - * ftp/gssapi.c: Optionally support gss bindings, client does it by - default, server not. This is to make it work for clients behind - NAT. - - * ftp/main.c (args): add gss-bindings - (main): set ftp_do_gss_bindings to 1 to make client use them - - * ftpd/ftpd.c (args): add gss-bindings - - * ftpd/ftpd.8: document --gss-bindings - -2003-06-13 Johan Danielsson - - * ftp/gssapi.c (gss_adat): fix name allocation bug - -2003-05-21 Love Hörnquist Åstrand - - * ftpd/gss_userok.c (gss_userok): release delegated cred handle - - * ftp/gssapi.c (gss_adat): remove poking inside the delegated - handle, also fixes problem where to much memory was allocated - - * ftpd/gss_userok.c (gss_userok): remove poking inside the - delegated handle - -2003-05-14 Love Hörnquist Åstrand - - * ftpd/ftpcmd.y: support afslog and afslog when compiled - with krb5 - -2003-05-07 Love Hörnquist Åstrand - - * ftp/cmdtab.c: include afslog in both the krb4 and krb5 case - - * ftp/kauth.c: include afslog in both the krb4 and krb5 case - - * ftp/Makefile.am: always include auth.c - -2003-05-07 Love Hörnquist Åstrand - - * ftpd/Makefile.am: always include auth.c - - * ftpd/kauth.c: do afslog in the krb5 case too - -2003-04-22 Love Hörnquist Åstrand - - * ftp/ftp.1: replace > with \*[Gt] - -2003-04-16 Love Hörnquist Åstrand - - * ftpd/ftpd.c: make sure argument to is* functions are unsigned - -2003-04-06 Love Hörnquist Åstrand - - * ftpd/ftpd.8: s/kerberos/Kerberos/ - -2003-03-23 Assar Westerlund - - * ftpd/pathnames.h (_PATH_FTPUSERS): conditionalize - -2003-03-18 Love Hörnquist Åstrand - - * ftpd/ftpd.c (krb5_verify): always do krb5_afslog, remove setpag - (its done in main) - - * ftpd/gss_userok.c: drop setpag - - * ftpd/ftpd.c (main): set afs PAG - - * ftpd/gss_userok.c: always try krb5_afslog, and while here do a - setpag too - - * ftpd/ftpd_locl.h: always include kafs - -2003-03-16 Love Hörnquist Åstrand - - * ftp/gssapi.c (gss_adat): now that gss_export_name exports a - principal, bandaid with gss_display_name, and check that oid is - GSS_KRB5_NT_PRINCIPAL_NAME, also free memory - -2003-02-25 Love Hörnquist Åstrand - - * ftp/gssapi.c (gss_auth): print out the name we authenticated too - -2003-02-25 Love Hörnquist Åstrand - - * ftpd/ls.c: use readlink with bufsize - 1, From NetBSD - - * ftp/ftp.1: s/utilizes/uses/ from NetBSD - - * ftpd/ftpd.8: s/utilize/use/ from NetBSD - -2003-02-10 Assar Westerlund - - * ftpd/ftpd.c (accept_with_timeout): use socklen_t - -2002-10-29 Johan Danielsson - - * ftp/main.c: reinstate -n flag (from Torbjörn Granlund) - -2002-10-16 Johan Danielsson - - * ftp/ftp.c: fix parsing of epsv ports (from Love) - -2002-09-05 Johan Danielsson - - * ftp/security.c (sec_vfprintf): free encoded data - - * ftp/gssapi.c (gss_decode): release buffer - - * ftp/ftp.c (active_mode): no need to allocate buffer for EPRT - -2002-08-28 Johan Danielsson - - * ftp/ftp.c (command): clean up va_{start,end}ing (from NetBSD) - -2002-08-23 Assar Westerlund - - * ftp/main.c: start using getarg - -2002-08-22 Johan Danielsson - - * ftpd/ls.c: uxp/v lacks _S_IFMT, but has S_IFMT - -2002-08-20 Johan Danielsson - - * ftp/gssapi.c: remove unused variable - -2002-04-24 Johan Danielsson - - * ftp/ftp.c: fix buffer overrun when receiving long replies - -2002-04-02 Johan Danielsson - - * ftpd/popen.c: make sure gl_pathc != 0 before referencing - gl_pathv - -2002-03-15 Johan Danielsson - - * ftp/gssapi.c (gss_adat): if accept_sec_context fails, syslog a - reason and give a temporary error message - -2002-02-28 Johan Danielsson - - * ftpd/ftpd.c: if builtin_ls failes, return error - - * ftpd/ls.c (builtin_ls): return status; also don't print fatal - error messages to the output stream, instead use syslog - -2001-09-14 Johan Danielsson - - * ftpd/ls.c: make sure we don't include . in recursive listings - -2001-09-13 Johan Danielsson - - * ftpd/ftpd.c (dataconn): don't wait forever on accept - -2001-09-04 Assar Westerlund - - * ftp/gssapi.c (gss_adat): leak less memory and check return value - from asprintf - -2001-08-28 Jacques Vidrine - - * ftpd/ftpd.c, ftpd/ftpd.8: On systems with IP_PORTRANGE, have - ftpd use `high-numbered' ports by default. Add a -U option - to get the old behavior. - -2001-08-28 Johan Danielsson - - * ftp/gssapi.c: try using "host" if there's no "ftp" principal - -2001-08-26 Johan Danielsson - - * ftpd/ls.c: implement -R - -2001-08-08 Assar Westerlund - - * ftpd/ls.c: make -a and -A do the same as in ls(1) - -2001-08-05 Assar Westerlund - - * ftpd/ftpcmd.y: add some (unsigned char) casts to is* - * ftp/cmds.c: add some (unsigned char) casts to is* - * ftpd/gss_userok.c (gss_userok): make argument to printf type - correct - -2001-08-05 Assar Westerlund - - * ftp/cmds.c (setpeer): __NetBSD__ is also a unix-like OS - -2001-06-19 Assar Westerlund - - * ftpd/popen.c, ftpd/ftpd.c: try to handle GLOB_MAXPATH (FreeBSD) - -2001-04-19 Johan Danielsson - - * ftpd/ftpd.c (do_store): call closefunc before claiming that - everything went ok, if the close fails the file might not have - been stored properly - -2001-03-26 Assar Westerlund - - * ftpd/ftpd.c, ftpd/popen.c: always use GLOB_LIMIT - * ftpd/popen.c (ftpd_popen): use GLOB_LIMIT if defined - * ftpd/ftpd.c (send_file_list): use GLOB_LIMIT if defined - -2001-02-15 Assar Westerlund - - * ftp/cmds.c (setpeer): handle both service names and port numbers - for the second optional argument. also make parsing more robust - -2001-02-07 Assar Westerlund - - * ftp/security.c (sec_end): only clean app_data if there is any - (*): do realloc consistently - -2001-02-05 Assar Westerlund - - * ftpd/popen.c (ftpd_popen): avoid overwriting the bounds of argv - and gargv - -2001-01-30 Assar Westerlund - - * ftpd/gss_userok.c: use gss_krb5_copy_ccache - -2001-01-29 Assar Westerlund - - * ftpd/Makefile.am: move up LIB_otp so we do not end up picking - one from /usr/athena - -2001-01-25 Johan Danielsson - - * ftpd/ls.c: fix bug in previous; make it easier to build test - version - -2001-01-19 Johan Danielsson - - * ftpd/ls.c (lstat_file): handle case where file lives in `/' - -2001-01-18 Johan Danielsson - - * ftpd/ftpd.c (pasv): close already open passive port - -2000-12-14 Johan Danielsson - - * ftpd/ls.c: reverse time and size sort order (pointed out by - tege) - -2000-12-11 Johan Danielsson - - * ftpd/ftpd.c: make it possible to set list of good filename - characters from command line - -2000-12-10 Johan Danielsson - - * ftpd/ftpd.c: some spec-violating mirror software assumes that - you can do things like `LIST -CF'; don't pass `--' to ls so this - actually works - - * ftpd/ls.c: implement -1CFx flags - -2000-12-08 Assar Westerlund - - * ftpd/gss_userok.c (gss_userok): handle getpwnam failing - * ftp/gssapi.c (gss_auth): be more explicit in error message - -2000-11-29 Johan Danielsson - - * ftpd/ftpd.8: close list - -2000-11-15 Assar Westerlund - - * ftp/main.c: add `-l' for no line-editing - * ftp/globals.c (readline): add - * ftp/ftp_var.h (lineedit): add variable indicated if we should - use readline - -2000-11-09 Johan Danielsson - - * ftp/security.c (sec_read): fix bug in previous (from Jacques A. - Vidrine ) - -2000-11-05 Johan Danielsson - - * ftpd/ftpcmd.y: only allow pasv if logged in - -2000-10-23 Johan Danielsson - - * ftpd/ftpd.c: change bad filename message slightly - - * common/buffer.c: HAVE_ST_BLKSIZE -> HAVE_STRUCT_STAT_ST_BLKSIZE - -2000-10-08 Assar Westerlund - - * ftp/ftp.c (*): check that fds are not too large to select on - * ftp/main.c (cmdscanner): print a newline upon EOF - -2000-09-19 Assar Westerlund - - * ftp/security.h: add some attributes to prototypes of sec* - * ftp/extern.h (command): add attributes - -2000-08-31 Johan Danielsson - - * ftpd/ftpd.c: change redundant password message to something - people can understand - -2000-07-27 Assar Westerlund - - * ftpd/gss_userok.c (gss_userok): only do AFS iff KRB4 - * ftpd/ftpd.c (krb5_verify): only do AFS stuff if KRB4 - -2000-07-07 Assar Westerlund - - * ftpd/ftpd.c: do not call setproctitle with a variable as the - format string - -2000-07-01 Assar Westerlund - - * ftpd/ftpd_locl.h: krb5.h before kafs.h - * ftpd/ftpd.c (krb5_verify): static-ize - * ftpd/ftpd.c (krb5_verify): conditionalize on KRB5 - -2000-06-21 Assar Westerlund - - * ftpd: support for authenticating passwords with krb5, by Daniel - Kouril - -2000-06-06 Johan Danielsson - - * ftpd/ftpcmd.y: change unix test to be negative - -2000-05-18 Assar Westerlund - - * ftpd/ftpd.c (args): should use `debug'. From Onno van der - Linden . - -2000-04-25 Assar Westerlund - - * ftp/ftp.c (login): re-structure code so that we prompt for - password for ftp/anonymous - -2000-04-11 Assar Westerlund - - * ftp/ftp.c (login): initialize tmp before calling fgets - -2000-04-02 Assar Westerlund - - * ftpd/ls.c: rename all st_mtime variables to avoid conflict with - #define. - * ftpd/ftpcmd.y: rename all st_mtime variables to avoid conflict - with #define. - * ftp/cmds.c: rename all st_mtime variables to avoid conflict with - #define. - -2000-03-26 Assar Westerlund - - * ftpd/ls.c, ftpd/ftpcmd.y, ftp/cmds.c: make sure to always call - time, ctime, and gmtime with `time_t's. there were some types - (like in lastlog) that we believed to always be time_t. this has - proven wrong on Solaris 8 in 64-bit mode, where they are stored as - 32-bit quantities but time_t has gone up to 64 bits - -2000-03-09 Johan Danielsson - - * call list_file for broken usages of nlst too - - * ftpd/ftpd.c: call list_file for broken usages of nlst too - -2000-02-07 Assar Westerlund - - * ftp/security.c (sec_read): more paranoia with return value from - sec_get_data - -2000-01-08 Assar Westerlund - - * ftp/ftp.c (hookup): handle ai_canonname being set in any of the - addresses returnedby getaddrinfo. glibc apparently returns the - reverse lookup of every address in ai_canonname. - * ftp/ruserpass.c (guess_domain): dito - -1999-12-21 Assar Westerlund - - * ftpd/ftpd.c: don't use sa_len as a parameter, it's defined on - Irix - -1999-12-21 Johan Danielsson - - * ftpd/ftpd.c (dataconn): make sure from points to actual data - -1999-12-16 Assar Westerlund - - * ftp/ruserpass.c (guess_domain): handle ai_canonname not being - set - * ftp/ftp.c (hookup): handle ai_canonname not being set - -1999-12-06 Assar Westerlund - - * ftp/krb4.c (krb4_auth): the nat-IP address might not be realm - bounded. - -1999-12-05 Assar Westerlund - - * ftpd/ftpd.c (dolog): update prototype - * ftpd/ftpd.c (dolog): use getnameinfo_verified - * ftpd/ftpd.c: replace inaddr2str by getnameinfo - -1999-12-04 Assar Westerlund - - * ftp/ruserpass.c (guess_domain): re-write to use getaddrinfo - * ftp/ftp.c (hookup): re-write to use getaddrinfo - -1999-11-30 Assar Westerlund - - * 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 - - * ftp/security.c (sec_login): check return value from realloc - (sec_end): set app_data to NULL - -1999-11-25 Assar Westerlund - - * ftp/krb4.c (krb4_auth): obtain the `local' address when doing - NAT. also turn on passive mode. From - -1999-11-20 Assar Westerlund - - * ftpd/ls.c (make_fileinfo): cast to allow for non-const - prototypes of readlink - -1999-11-12 Assar Westerlund - - * ftpd/ftpd.c (args): use arg_counter for `l' - -1999-11-04 Assar Westerlund - - * ftpd/ls.c (S_ISSOCK, S_ISLNK): fallback definitions for systems - that don't have them (such as ultrix) - -1999-10-29 Assar Westerlund - - * 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: is needed for kafs.h - -1999-10-28 Assar Westerlund - - * 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 - (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 - -1999-10-26 Assar Westerlund - - * 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 - - -1999-10-21 Johan Danielsson - - * 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 - - * 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 - - * ftpd/ftpcmd.y: FEAT - -1999-10-03 Assar Westerlund - - * ftpd/ls.c: fall-back definitions for constans and casts for - printfs - -1999-10-03 Johan Danielsson - - * 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 - - * ftpd/ftpd_locl.h: add prototype for fclose to make sunos happy - -1999-08-19 Johan Danielsson - - * ftpd/ftpd.c (do_login): show issue-file - (send_data): change handling of zero-byte files - -1999-08-18 Assar Westerlund - - * ftp/cmds.c (getit): be more suspicious when parsing the result - of MDTM. Do the comparison of timestamps correctly. - -1999-08-13 Assar Westerlund - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * ftp/krb4.c (krb4_auth): type correctness - -1999-06-02 Johan Danielsson - - * ftp/ftp.c (sendrequest): lmode != rmode - -1999-05-21 Assar Westerlund - - * 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 - - * 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 - - * ftpd/ftpd.c: remove definition of KRB_VERIFY_USER (moved to - config.h) - -Wed Apr 7 16:15:21 1999 Johan Danielsson - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * ftp/Makefile.in: WFLAGS - - * ftp/ruserpass.c: add some if-braces - -Wed Mar 10 20:02:55 1999 Johan Danielsson - - * ftpd/ftpd_locl.h: remove ifdef HAVE_FNMATCH - -Mon Mar 8 21:29:24 1999 Johan Danielsson - - * ftpd/ftpd.c: re-add version in greeting message - -Mon Mar 1 10:49:38 1999 Johan Danielsson - - * ftpd/logwtmp.c: HAVE_UT_* -> HAVE_STRUCT_UTMP*_UT_* - -Mon Feb 22 19:20:51 1999 Johan Danielsson - - * common/Makefile.in: remove glob - -Sat Feb 13 17:19:35 1999 Assar Westerlund - - * 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 - - * 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 - - * ftpd/Makefile.am: link with extra libs for aix - -Sun Nov 22 10:28:20 1998 Assar Westerlund - - * 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 - - * 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 - - * ftp/main.c (main): new option `-p' for enable passive mode. - -Mon Nov 2 01:57:49 1998 Assar Westerlund - - * 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 - - * ftp/cmds.c (quote1): fix % quoting bug - -Fri Aug 14 17:10:06 1998 Johan Danielsson - - * ftp/krb4.c: krb_put_int -> KRB_PUT_INT - -Tue Jun 30 18:07:15 1998 Assar Westerlund - - * ftp/security.c (auth): free `app_data' - (sec_end): only destroy if it was initialized - -Tue Jun 9 21:01:59 1998 Johan Danielsson - - * ftp/krb4.c: pass client address to krb_rd_req - -Sat May 16 00:02:07 1998 Assar Westerlund - - * ftpd/Makefile.am: link with DBLIB - -Tue May 12 14:15:32 1998 Johan Danielsson - - * ftp/gssapi.c: Save client name for userok(). - - * ftpd/gss_userok.c: Userok for gssapi. - -Fri May 1 07:15:01 1998 Assar Westerlund - - * ftp/ftp.c: unifdef -DHAVE_H_ERRNO - -Fri Mar 27 00:46:07 1998 Johan Danielsson - - * Make compile w/o krb4. - -Thu Mar 26 03:49:12 1998 Johan Danielsson - - * 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/kerberosV/src/appl/ftp/Makefile.am b/kerberosV/src/appl/ftp/Makefile.am deleted file mode 100644 index dc499481d92..00000000000 --- a/kerberosV/src/appl/ftp/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:35 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -SUBDIRS = common ftp ftpd - -EXTRA_DIST = NTMakefile \ No newline at end of file diff --git a/kerberosV/src/appl/ftp/Makefile.in b/kerberosV/src/appl/ftp/Makefile.in deleted file mode 100644 index dc150f7f670..00000000000 --- a/kerberosV/src/appl/ftp/Makefile.in +++ /dev/null @@ -1,916 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -subdir = appl/ftp -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -SUBDIRS = common ftp ftpd -EXTRA_DIST = NTMakefile -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/ftp/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/ftp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-recursive -all-am: Makefile all-local -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ - ctags-recursive install-am install-data-am install-exec-am \ - install-strip tags-recursive uninstall-am - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local check check-am check-local clean \ - clean-generic clean-libtool ctags ctags-recursive dist-hook \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-data-hook \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-exec-hook install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-hook - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/ftp/NTMakefile b/kerberosV/src/appl/ftp/NTMakefile deleted file mode 100644 index 097379d80be..00000000000 --- a/kerberosV/src/appl/ftp/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\ftp - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/ftp/common/Makefile.am b/kerberosV/src/appl/ftp/common/Makefile.am deleted file mode 100644 index e3b13c5f991..00000000000 --- a/kerberosV/src/appl/ftp/common/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:35 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(INCLUDE_krb4) - -noinst_LIBRARIES = libcommon.a - -libcommon_a_SOURCES = \ - sockbuf.c \ - buffer.c \ - common.h - -EXTRA_DIST = NTMakefile \ No newline at end of file diff --git a/kerberosV/src/appl/ftp/common/Makefile.in b/kerberosV/src/appl/ftp/common/Makefile.in deleted file mode 100644 index 210f6c948b5..00000000000 --- a/kerberosV/src/appl/ftp/common/Makefile.in +++ /dev/null @@ -1,830 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -subdir = appl/ftp/common -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libcommon_a_AR = $(AR) $(ARFLAGS) -libcommon_a_LIBADD = -am_libcommon_a_OBJECTS = sockbuf.$(OBJEXT) buffer.$(OBJEXT) -libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libcommon_a_SOURCES) -DIST_SOURCES = $(libcommon_a_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(INCLUDE_krb4) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -noinst_LIBRARIES = libcommon.a -libcommon_a_SOURCES = \ - sockbuf.c \ - buffer.c \ - common.h - -EXTRA_DIST = NTMakefile -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/ftp/common/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/ftp/common/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libcommon.a: $(libcommon_a_OBJECTS) $(libcommon_a_DEPENDENCIES) - -rm -f libcommon.a - $(libcommon_a_AR) libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD) - $(RANLIB) libcommon.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockbuf.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(LIBRARIES) all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libtool clean-noinstLIBRARIES ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am uninstall-hook - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/ftp/common/NTMakefile b/kerberosV/src/appl/ftp/common/NTMakefile deleted file mode 100644 index 8f61c745f31..00000000000 --- a/kerberosV/src/appl/ftp/common/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\ftp\common - -!include ../../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/ftp/common/buffer.c b/kerberosV/src/appl/ftp/common/buffer.c deleted file mode 100644 index 2aaa08a3d83..00000000000 --- a/kerberosV/src/appl/ftp/common/buffer.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 1995-2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "common.h" -#include -#include -#include "roken.h" - -RCSID("$Id: buffer.c,v 1.3 2013/06/17 19:11:35 robert Exp $"); - -/* - * Allocate a buffer enough to handle st->st_blksize, if - * there is such a field, otherwise BUFSIZ. - */ - -void * -alloc_buffer (void *oldbuf, size_t *sz, struct stat *st) -{ - size_t new_sz; - - new_sz = BUFSIZ; -#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE - if (st) - new_sz = max(BUFSIZ, st->st_blksize); -#endif - if(new_sz > *sz) { - if (oldbuf) - free (oldbuf); - oldbuf = malloc (new_sz); - if (oldbuf == NULL) { - warn ("malloc"); - *sz = 0; - return NULL; - } - *sz = new_sz; - } - return oldbuf; -} - diff --git a/kerberosV/src/appl/ftp/common/common.h b/kerberosV/src/appl/ftp/common/common.h deleted file mode 100644 index 4e8d3054294..00000000000 --- a/kerberosV/src/appl/ftp/common/common.h +++ /dev/null @@ -1,60 +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: common.h,v 1.3 2013/06/17 19:11:35 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifndef __COMMON_H__ -#define __COMMON_H__ - -#include "base64.h" - -void set_buffer_size(int, int); - -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -void *alloc_buffer (void *oldbuf, size_t *sz, struct stat *st); - -#endif /* __COMMON_H__ */ diff --git a/kerberosV/src/appl/ftp/common/sockbuf.c b/kerberosV/src/appl/ftp/common/sockbuf.c deleted file mode 100644 index 64609d3ba52..00000000000 --- a/kerberosV/src/appl/ftp/common/sockbuf.c +++ /dev/null @@ -1,70 +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. - */ - -#include "common.h" -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -RCSID("$Id: sockbuf.c,v 1.3 2013/06/17 19:11:35 robert Exp $"); - -void -set_buffer_size(int fd, int read) -{ -#if defined(SO_RCVBUF) && defined(SO_SNDBUF) && defined(HAVE_SETSOCKOPT) - int size = 4194304; - int optname = read ? SO_RCVBUF : SO_SNDBUF; - -#ifdef HAVE_GETSOCKOPT - int curr=0; - socklen_t optlen; - - optlen = sizeof(curr); - if(getsockopt(fd, SOL_SOCKET, optname, (void *)&curr, &optlen) == 0) { - if(curr >= size) { - /* Already large enough */ - return; - } - } -#endif /* HAVE_GETSOCKOPT */ - - while(size >= 131072 && - setsockopt(fd, SOL_SOCKET, optname, (void *)&size, sizeof(size)) < 0) - size /= 2; -#endif -} - - diff --git a/kerberosV/src/appl/ftp/ftp/Makefile.am b/kerberosV/src/appl/ftp/ftp/Makefile.am deleted file mode 100644 index 954a8ef268f..00000000000 --- a/kerberosV/src/appl/ftp/ftp/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:35 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += -I$(srcdir)/../common $(INCLUDE_readline) $(INCLUDE_hcrypto) - -bin_PROGRAMS = ftp - -CHECK_LOCAL = - -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 \ - kauth.c \ - $(krb5_sources) - -EXTRA_ftp_SOURCES = gssapi.c - -man_MANS = ftp.1 - -LDADD = \ - ../common/libcommon.a \ - $(LIB_gssapi) \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(LIB_readline) - -EXTRA_DIST = NTMakefile $(man_MANS) diff --git a/kerberosV/src/appl/ftp/ftp/Makefile.in b/kerberosV/src/appl/ftp/ftp/Makefile.in deleted file mode 100644 index 41dea8fc533..00000000000 --- a/kerberosV/src/appl/ftp/ftp/Makefile.in +++ /dev/null @@ -1,992 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -bin_PROGRAMS = ftp$(EXEEXT) -subdir = appl/ftp/ftp -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -PROGRAMS = $(bin_PROGRAMS) -am__ftp_SOURCES_DIST = 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 kauth.c gssapi.c -@KRB5_TRUE@am__objects_1 = gssapi.$(OBJEXT) -am_ftp_OBJECTS = cmds.$(OBJEXT) cmdtab.$(OBJEXT) ftp.$(OBJEXT) \ - main.$(OBJEXT) ruserpass.$(OBJEXT) domacro.$(OBJEXT) \ - globals.$(OBJEXT) security.$(OBJEXT) kauth.$(OBJEXT) \ - $(am__objects_1) -ftp_OBJECTS = $(am_ftp_OBJECTS) -ftp_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -ftp_DEPENDENCIES = ../common/libcommon.a $(LIB_gssapi) $(LIB_krb5) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(ftp_SOURCES) $(EXTRA_ftp_SOURCES) -DIST_SOURCES = $(am__ftp_SOURCES_DIST) $(EXTRA_ftp_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -I$(srcdir)/../common \ - $(INCLUDE_readline) $(INCLUDE_hcrypto) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -CHECK_LOCAL = -@KRB5_TRUE@krb5_sources = gssapi.c -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 \ - kauth.c \ - $(krb5_sources) - -EXTRA_ftp_SOURCES = gssapi.c -man_MANS = ftp.1 -LDADD = \ - ../common/libcommon.a \ - $(LIB_gssapi) \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(LIB_readline) - -EXTRA_DIST = NTMakefile $(man_MANS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/ftp/ftp/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/ftp/ftp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -ftp$(EXEEXT): $(ftp_OBJECTS) $(ftp_DEPENDENCIES) - @rm -f ftp$(EXEEXT) - $(LINK) $(ftp_OBJECTS) $(ftp_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmds.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmdtab.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/domacro.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssapi.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kauth.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ruserpass.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-hook \ - uninstall-man uninstall-man1 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/ftp/ftp/NTMakefile b/kerberosV/src/appl/ftp/ftp/NTMakefile deleted file mode 100644 index 8bb7c982e0a..00000000000 --- a/kerberosV/src/appl/ftp/ftp/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\ftp\ftp - -!include ../../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/ftp/ftp/cmds.c b/kerberosV/src/appl/ftp/ftp/cmds.c deleted file mode 100644 index 8eb6cab5fed..00000000000 --- a/kerberosV/src/appl/ftp/ftp/cmds.c +++ /dev/null @@ -1,2148 +0,0 @@ -/* - * Copyright (c) 1985, 1989, 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. - */ - -/* - * FTP User Program -- Command Routines. - */ - -#include "ftp_locl.h" -RCSID("$Id: cmds.c,v 1.3 2013/06/17 19:11:35 robert Exp $"); - -typedef void (*sighand)(int); - -jmp_buf jabort; -char *mname; -char *home = "/"; - -/* - * `Another' gets another argument, and stores the new argc and argv. - * It reverts to the top level (via main.c's intr()) on EOF/error. - * - * Returns false if no new arguments have been added. - */ -int -another(int *pargc, char ***pargv, char *prompt) -{ - int len = strlen(line), ret; - - if (len >= sizeof(line) - 3) { - printf("sorry, arguments too long\n"); - intr(0); - } - printf("(%s) ", prompt); - line[len++] = ' '; - if (fgets(&line[len], sizeof(line) - len, stdin) == NULL) - intr(0); - len += strlen(&line[len]); - if (len > 0 && line[len - 1] == '\n') - line[len - 1] = '\0'; - makeargv(); - ret = margc > *pargc; - *pargc = margc; - *pargv = margv; - return (ret); -} - -/* - * Connect to peer server and - * auto-login, if possible. - */ -void -setpeer(int argc, char **argv) -{ - char *host; - u_short port; - struct servent *sp; - - if (connected) { - printf("Already connected to %s, use close first.\n", - hostname); - code = -1; - return; - } - if (argc < 2) - another(&argc, &argv, "to"); - if (argc < 2 || argc > 3) { - printf("usage: %s host-name [port]\n", argv[0]); - code = -1; - return; - } - sp = getservbyname("ftp", "tcp"); - if (sp == NULL) - errx(1, "You bastard. You removed ftp/tcp from services"); - port = sp->s_port; - if (argc > 2) { - sp = getservbyname(argv[2], "tcp"); - if (sp != NULL) { - port = sp->s_port; - } else { - char *ep; - - port = strtol(argv[2], &ep, 0); - if (argv[2] == ep) { - printf("%s: bad port number-- %s\n", - argv[1], argv[2]); - printf ("usage: %s host-name [port]\n", - argv[0]); - code = -1; - return; - } - port = htons(port); - } - } - host = hookup(argv[1], port); - if (host) { - int overbose; - - connected = 1; - /* - * Set up defaults for FTP. - */ - strlcpy(typename, "ascii", sizeof(typename)); - type = TYPE_A; - curtype = TYPE_A; - strlcpy(formname, "non-print", sizeof(formname)); - form = FORM_N; - strlcpy(modename, "stream", sizeof(modename)); - mode = MODE_S; - strlcpy(structname, "file", sizeof(structname)); - stru = STRU_F; - strlcpy(bytename, "8", sizeof(bytename)); - bytesize = 8; - if (autologin) - login(argv[1]); - -#if (defined(unix) || defined(__unix__) || defined(__unix) || defined(_AIX) || defined(_CRAY) || defined(__NetBSD__) || defined(__APPLE__)) && NBBY == 8 -/* - * this ifdef is to keep someone form "porting" this to an incompatible - * system and not checking this out. This way they have to think about it. - */ - overbose = verbose; - if (debug == 0) - verbose = -1; - if (command("SYST") == COMPLETE && overbose && strlen(reply_string) > 4) { - char *cp, *p; - - cp = strdup(reply_string + 4); - if (cp == NULL) - errx(1, "strdup: out of memory"); - p = strchr(cp, ' '); - if (p == NULL) - p = strchr(cp, '\r'); - if (p) { - if (p[-1] == '.') - p--; - *p = '\0'; - } - - printf("Remote system type is %s.\n", cp); - free(cp); - } - if (!strncmp(reply_string, "215 UNIX Type: L8", 17)) { - if (proxy) - unix_proxy = 1; - else - unix_server = 1; - /* - * Set type to 0 (not specified by user), - * meaning binary by default, but don't bother - * telling server. We can use binary - * for text files unless changed by the user. - */ - type = 0; - strlcpy(typename, "binary", sizeof(typename)); - if (overbose) - printf("Using %s mode to transfer files.\n", - typename); - } else { - if (proxy) - unix_proxy = 0; - else - unix_server = 0; - if (overbose && - !strncmp(reply_string, "215 TOPS20", 10)) - printf( -"Remember to set tenex mode when transfering binary files from this machine.\n"); - } - verbose = overbose; -#endif /* unix */ - } -} - -struct types { - char *t_name; - char *t_mode; - int t_type; - char *t_arg; -} types[] = { - { "ascii", "A", TYPE_A, 0 }, - { "binary", "I", TYPE_I, 0 }, - { "image", "I", TYPE_I, 0 }, - { "ebcdic", "E", TYPE_E, 0 }, - { "tenex", "L", TYPE_L, bytename }, - { NULL } -}; - -/* - * Set transfer type. - */ -void -settype(int argc, char **argv) -{ - struct types *p; - int comret; - - if (argc > 2) { - char *sep; - - printf("usage: %s [", argv[0]); - sep = " "; - for (p = types; p->t_name; p++) { - printf("%s%s", sep, p->t_name); - sep = " | "; - } - printf(" ]\n"); - code = -1; - return; - } - if (argc < 2) { - printf("Using %s mode to transfer files.\n", typename); - code = 0; - return; - } - for (p = types; p->t_name; p++) - if (strcmp(argv[1], p->t_name) == 0) - break; - if (p->t_name == 0) { - printf("%s: unknown mode\n", argv[1]); - code = -1; - return; - } - if ((p->t_arg != NULL) && (*(p->t_arg) != '\0')) - comret = command ("TYPE %s %s", p->t_mode, p->t_arg); - else - comret = command("TYPE %s", p->t_mode); - if (comret == COMPLETE) { - strlcpy(typename, p->t_name, sizeof(typename)); - curtype = type = p->t_type; - } -} - -/* - * Internal form of settype; changes current type in use with server - * without changing our notion of the type for data transfers. - * Used to change to and from ascii for listings. - */ -void -changetype(int newtype, int show) -{ - struct types *p; - int comret, oldverbose = verbose; - - if (newtype == 0) - newtype = TYPE_I; - if (newtype == curtype) - return; - if (debug == 0 && show == 0) - verbose = 0; - for (p = types; p->t_name; p++) - if (newtype == p->t_type) - break; - if (p->t_name == 0) { - printf("ftp: internal error: unknown type %d\n", newtype); - return; - } - if (newtype == TYPE_L && bytename[0] != '\0') - comret = command("TYPE %s %s", p->t_mode, bytename); - else - comret = command("TYPE %s", p->t_mode); - if (comret == COMPLETE) - curtype = newtype; - verbose = oldverbose; -} - -char *stype[] = { - "type", - "", - 0 -}; - -/* - * Set binary transfer type. - */ -/*VARARGS*/ -void -setbinary(int argc, char **argv) -{ - - stype[1] = "binary"; - settype(2, stype); -} - -/* - * Set ascii transfer type. - */ -/*VARARGS*/ -void -setascii(int argc, char **argv) -{ - - stype[1] = "ascii"; - settype(2, stype); -} - -/* - * Set tenex transfer type. - */ -/*VARARGS*/ -void -settenex(int argc, char **argv) -{ - - stype[1] = "tenex"; - settype(2, stype); -} - -/* - * Set file transfer mode. - */ -/*ARGSUSED*/ -void -setftmode(int argc, char **argv) -{ - - printf("We only support %s mode, sorry.\n", modename); - code = -1; -} - -/* - * Set file transfer format. - */ -/*ARGSUSED*/ -void -setform(int argc, char **argv) -{ - - printf("We only support %s format, sorry.\n", formname); - code = -1; -} - -/* - * Set file transfer structure. - */ -/*ARGSUSED*/ -void -setstruct(int argc, char **argv) -{ - - printf("We only support %s structure, sorry.\n", structname); - code = -1; -} - -/* - * Send a single file. - */ -void -put(int argc, char **argv) -{ - char *cmd; - int loc = 0; - char *oldargv1, *oldargv2; - - if (argc == 2) { - argc++; - argv[2] = argv[1]; - loc++; - } - if (argc < 2 && !another(&argc, &argv, "local-file")) - goto usage; - if (argc < 3 && !another(&argc, &argv, "remote-file")) { -usage: - printf("usage: %s local-file remote-file\n", argv[0]); - code = -1; - return; - } - oldargv1 = argv[1]; - oldargv2 = argv[2]; - if (!globulize(&argv[1])) { - code = -1; - return; - } - /* - * If "globulize" modifies argv[1], and argv[2] is a copy of - * the old argv[1], make it a copy of the new argv[1]. - */ - if (argv[1] != oldargv1 && argv[2] == oldargv1) { - argv[2] = argv[1]; - } - cmd = (argv[0][0] == 'a') ? "APPE" : ((sunique) ? "STOU" : "STOR"); - if (loc && ntflag) { - argv[2] = dotrans(argv[2]); - } - if (loc && mapflag) { - argv[2] = domap(argv[2]); - } - sendrequest(cmd, argv[1], argv[2], - curtype == TYPE_I ? "rb" : "r", - argv[1] != oldargv1 || argv[2] != oldargv2); -} - -/* ARGSUSED */ -static RETSIGTYPE -mabort(int signo) -{ - int ointer; - - printf("\n"); - fflush(stdout); - if (mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with", mname)) { - interactive = ointer; - longjmp(jabort,0); - } - interactive = ointer; - } - mflag = 0; - longjmp(jabort,0); -} - -/* - * Send multiple files. - */ -void -mput(int argc, char **argv) -{ - int i; - RETSIGTYPE (*oldintr)(int); - int ointer; - char *tp; - - if (argc < 2 && !another(&argc, &argv, "local-files")) { - printf("usage: %s local-files\n", argv[0]); - code = -1; - return; - } - mname = argv[0]; - mflag = 1; - oldintr = signal(SIGINT, mabort); - setjmp(jabort); - if (proxy) { - char *cp, *tp2, tmpbuf[MaxPathLen]; - - while ((cp = remglob(argv,0)) != NULL) { - if (*cp == 0) { - mflag = 0; - continue; - } - if (mflag && confirm(argv[0], cp)) { - tp = cp; - if (mcase) { - while (*tp && !islower((unsigned char)*tp)) { - tp++; - } - if (!*tp) { - tp = cp; - tp2 = tmpbuf; - while ((*tp2 = *tp) != '\0') { - if (isupper((unsigned char)*tp2)) { - *tp2 = 'a' + *tp2 - 'A'; - } - tp++; - tp2++; - } - } - tp = tmpbuf; - } - if (ntflag) { - tp = dotrans(tp); - } - if (mapflag) { - tp = domap(tp); - } - sendrequest((sunique) ? "STOU" : "STOR", - cp, tp, - curtype == TYPE_I ? "rb" : "r", - cp != tp || !interactive); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with","mput")) { - mflag++; - } - interactive = ointer; - } - } - } - signal(SIGINT, oldintr); - mflag = 0; - return; - } - for (i = 1; i < argc; i++) { - char **cpp; - glob_t gl; - int flags; - - if (!doglob) { - if (mflag && confirm(argv[0], argv[i])) { - tp = (ntflag) ? dotrans(argv[i]) : argv[i]; - tp = (mapflag) ? domap(tp) : tp; - sendrequest((sunique) ? "STOU" : "STOR", - argv[i], - curtype == TYPE_I ? "rb" : "r", - tp, tp != argv[i] || !interactive); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with","mput")) { - mflag++; - } - interactive = ointer; - } - } - continue; - } - - memset(&gl, 0, sizeof(gl)); - flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE; - if (glob(argv[i], flags, NULL, &gl) || gl.gl_pathc == 0) { - warnx("%s: not found", argv[i]); - globfree(&gl); - continue; - } - for (cpp = gl.gl_pathv; cpp && *cpp != NULL; cpp++) { - if (mflag && confirm(argv[0], *cpp)) { - tp = (ntflag) ? dotrans(*cpp) : *cpp; - tp = (mapflag) ? domap(tp) : tp; - sendrequest((sunique) ? "STOU" : "STOR", - *cpp, tp, - curtype == TYPE_I ? "rb" : "r", - *cpp != tp || !interactive); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with","mput")) { - mflag++; - } - interactive = ointer; - } - } - } - globfree(&gl); - } - signal(SIGINT, oldintr); - mflag = 0; -} - -void -reget(int argc, char **argv) -{ - getit(argc, argv, 1, curtype == TYPE_I ? "r+wb" : "r+w"); -} - -void -get(int argc, char **argv) -{ - char *filemode; - - if (restart_point) { - if (curtype == TYPE_I) - filemode = "r+wb"; - else - filemode = "r+w"; - } else { - if (curtype == TYPE_I) - filemode = "wb"; - else - filemode = "w"; - } - - getit(argc, argv, 0, filemode); -} - -/* - * Receive one file. - */ -int -getit(int argc, char **argv, int restartit, char *filemode) -{ - int loc = 0; - int local_given = 1; - char *oldargv1, *oldargv2; - - if (argc == 2) { - argc++; - local_given = 0; - argv[2] = argv[1]; - loc++; - } - if ((argc < 2 && !another(&argc, &argv, "remote-file")) || - (argc < 3 && !another(&argc, &argv, "local-file"))) { - printf("usage: %s remote-file [ local-file ]\n", argv[0]); - code = -1; - return (0); - } - oldargv1 = argv[1]; - oldargv2 = argv[2]; - if (!globulize(&argv[2])) { - code = -1; - return (0); - } - if (loc && mcase) { - char *tp = argv[1], *tp2, tmpbuf[MaxPathLen]; - - while (*tp && !islower((unsigned char)*tp)) { - tp++; - } - if (!*tp) { - tp = argv[2]; - tp2 = tmpbuf; - while ((*tp2 = *tp) != '\0') { - if (isupper((unsigned char)*tp2)) { - *tp2 = 'a' + *tp2 - 'A'; - } - tp++; - tp2++; - } - argv[2] = tmpbuf; - } - } - if (loc && ntflag) - argv[2] = dotrans(argv[2]); - if (loc && mapflag) - argv[2] = domap(argv[2]); - if (restartit) { - struct stat stbuf; - int ret; - - ret = stat(argv[2], &stbuf); - if (restartit == 1) { - if (ret < 0) { - warn("local: %s", argv[2]); - return (0); - } - restart_point = stbuf.st_size; - } else if (ret == 0) { - int overbose; - int cmdret; - int yy, mo, day, hour, min, sec; - struct tm *tm; - time_t mtime = stbuf.st_mtime; - - overbose = verbose; - if (debug == 0) - verbose = -1; - cmdret = command("MDTM %s", argv[1]); - verbose = overbose; - if (cmdret != COMPLETE) { - printf("%s\n", reply_string); - return (0); - } - if (sscanf(reply_string, - "%*s %04d%02d%02d%02d%02d%02d", - &yy, &mo, &day, &hour, &min, &sec) - != 6) { - printf ("bad MDTM result\n"); - return (0); - } - - tm = gmtime(&mtime); - tm->tm_mon++; - tm->tm_year += 1900; - - if ((tm->tm_year > yy) || - (tm->tm_year == yy && - tm->tm_mon > mo) || - (tm->tm_mon == mo && - tm->tm_mday > day) || - (tm->tm_mday == day && - tm->tm_hour > hour) || - (tm->tm_hour == hour && - tm->tm_min > min) || - (tm->tm_min == min && - tm->tm_sec > sec)) - return (1); - } - } - - recvrequest("RETR", argv[2], argv[1], filemode, - argv[1] != oldargv1 || argv[2] != oldargv2, local_given); - restart_point = 0; - return (0); -} - -static int -suspicious_filename(const char *fn) -{ - return strstr(fn, "../") != NULL || *fn == '/'; -} - -/* - * Get multiple files. - */ -void -mget(int argc, char **argv) -{ - sighand oldintr; - int ch, ointer; - char *cp, *tp, *tp2, tmpbuf[MaxPathLen]; - - if (argc < 2 && !another(&argc, &argv, "remote-files")) { - printf("usage: %s remote-files\n", argv[0]); - code = -1; - return; - } - mname = argv[0]; - mflag = 1; - oldintr = signal(SIGINT, mabort); - setjmp(jabort); - while ((cp = remglob(argv,proxy)) != NULL) { - if (*cp == '\0') { - mflag = 0; - continue; - } - if (mflag && suspicious_filename(cp)) - printf("*** Suspicious filename: %s\n", cp); - if (mflag && confirm(argv[0], cp)) { - tp = cp; - if (mcase) { - for (tp2 = tmpbuf;(ch = (unsigned char)*tp++);) - *tp2++ = tolower(ch); - *tp2 = '\0'; - tp = tmpbuf; - } - if (ntflag) { - tp = dotrans(tp); - } - if (mapflag) { - tp = domap(tp); - } - recvrequest("RETR", tp, cp, - curtype == TYPE_I ? "wb" : "w", - tp != cp || !interactive, 0); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with","mget")) { - mflag++; - } - interactive = ointer; - } - } - } - signal(SIGINT,oldintr); - mflag = 0; -} - -char * -remglob(char **argv, int doswitch) -{ - char temp[16]; - static char buf[MaxPathLen]; - static FILE *ftemp = NULL; - static char **args; - int oldverbose, oldhash; - char *cp, *filemode; - - if (!mflag) { - if (!doglob) { - args = NULL; - } - else { - if (ftemp) { - fclose(ftemp); - ftemp = NULL; - } - } - return (NULL); - } - if (!doglob) { - if (args == NULL) - args = argv; - if ((cp = *++args) == NULL) - args = NULL; - return (cp); - } - if (ftemp == NULL) { - int fd; - strlcpy(temp, _PATH_TMP_XXX, sizeof(temp)); - fd = mkstemp(temp); - if(fd < 0){ - warn("unable to create temporary file %s", temp); - return NULL; - } - close(fd); - oldverbose = verbose, verbose = 0; - oldhash = hash, hash = 0; - if (doswitch) { - pswitch(!proxy); - } - for (filemode = "w"; *++argv != NULL; filemode = "a") - recvrequest ("NLST", temp, *argv, filemode, 0, 0); - if (doswitch) { - pswitch(!proxy); - } - verbose = oldverbose; hash = oldhash; - ftemp = fopen(temp, "r"); - unlink(temp); - if (ftemp == NULL) { - printf("can't find list of remote files, oops\n"); - return (NULL); - } - } - while(fgets(buf, sizeof (buf), ftemp)) { - if ((cp = strchr(buf, '\n')) != NULL) - *cp = '\0'; - if(!interactive && suspicious_filename(buf)){ - printf("Ignoring remote globbed file `%s'\n", buf); - continue; - } - return buf; - } - fclose(ftemp); - ftemp = NULL; - return (NULL); -} - -char * -onoff(int bool) -{ - - return (bool ? "on" : "off"); -} - -/* - * Show status. - */ -/*ARGSUSED*/ -void -status(int argc, char **argv) -{ - int i; - - if (connected) - printf("Connected to %s.\n", hostname); - else - printf("Not connected.\n"); - if (!proxy) { - pswitch(1); - if (connected) { - printf("Connected for proxy commands to %s.\n", hostname); - } - else { - printf("No proxy connection.\n"); - } - pswitch(0); - } - sec_status(); - printf("Mode: %s; Type: %s; Form: %s; Structure: %s\n", - modename, typename, formname, structname); - printf("Verbose: %s; Bell: %s; Prompting: %s; Globbing: %s\n", - onoff(verbose), onoff(bell), onoff(interactive), - onoff(doglob)); - printf("Store unique: %s; Receive unique: %s\n", onoff(sunique), - onoff(runique)); - printf("Case: %s; CR stripping: %s\n",onoff(mcase),onoff(crflag)); - if (ntflag) { - printf("Ntrans: (in) %s (out) %s\n", ntin,ntout); - } - else { - printf("Ntrans: off\n"); - } - if (mapflag) { - printf("Nmap: (in) %s (out) %s\n", mapin, mapout); - } - else { - printf("Nmap: off\n"); - } - printf("Hash mark printing: %s; Use of PORT cmds: %s\n", - onoff(hash), onoff(sendport)); - if (macnum > 0) { - printf("Macros:\n"); - for (i=0; i 1) { - val = atoi(argv[1]); - if (val < 0) { - printf("%s: bad debugging value.\n", argv[1]); - code = -1; - return; - } - } else - val = !debug; - debug = val; - if (debug) - options |= SO_DEBUG; - else - options &= ~SO_DEBUG; - printf("Debugging %s (debug=%d).\n", onoff(debug), debug); - code = debug > 0; -} - -/* - * Set current working directory - * on remote machine. - */ -void -cd(int argc, char **argv) -{ - - if (argc < 2 && !another(&argc, &argv, "remote-directory")) { - printf("usage: %s remote-directory\n", argv[0]); - code = -1; - return; - } - if (command("CWD %s", argv[1]) == ERROR && code == 500) { - if (verbose) - printf("CWD command not recognized, trying XCWD\n"); - command("XCWD %s", argv[1]); - } -} - -/* - * Set current working directory - * on local machine. - */ -void -lcd(int argc, char **argv) -{ - char buf[MaxPathLen]; - - if (argc < 2) - argc++, argv[1] = home; - if (argc != 2) { - printf("usage: %s local-directory\n", argv[0]); - code = -1; - return; - } - if (!globulize(&argv[1])) { - code = -1; - return; - } - if (chdir(argv[1]) < 0) { - warn("local: %s", argv[1]); - code = -1; - return; - } - if (getcwd(buf, sizeof(buf)) != NULL) - printf("Local directory now %s\n", buf); - else - warnx("getwd: %s", buf); - code = 0; -} - -/* - * Delete a single file. - */ -void -delete(int argc, char **argv) -{ - - if (argc < 2 && !another(&argc, &argv, "remote-file")) { - printf("usage: %s remote-file\n", argv[0]); - code = -1; - return; - } - command("DELE %s", argv[1]); -} - -/* - * Delete multiple files. - */ -void -mdelete(int argc, char **argv) -{ - sighand oldintr; - int ointer; - char *cp; - - if (argc < 2 && !another(&argc, &argv, "remote-files")) { - printf("usage: %s remote-files\n", argv[0]); - code = -1; - return; - } - mname = argv[0]; - mflag = 1; - oldintr = signal(SIGINT, mabort); - setjmp(jabort); - while ((cp = remglob(argv,0)) != NULL) { - if (*cp == '\0') { - mflag = 0; - continue; - } - if (mflag && confirm(argv[0], cp)) { - command("DELE %s", cp); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with", "mdelete")) { - mflag++; - } - interactive = ointer; - } - } - } - signal(SIGINT, oldintr); - mflag = 0; -} - -/* - * Rename a remote file. - */ -void -renamefile(int argc, char **argv) -{ - - if (argc < 2 && !another(&argc, &argv, "from-name")) - goto usage; - if (argc < 3 && !another(&argc, &argv, "to-name")) { -usage: - printf("%s from-name to-name\n", argv[0]); - code = -1; - return; - } - if (command("RNFR %s", argv[1]) == CONTINUE) - command("RNTO %s", argv[2]); -} - -/* - * Get a directory listing - * of remote files. - */ -void -ls(int argc, char **argv) -{ - char *cmd; - - if (argc < 2) - argc++, argv[1] = NULL; - if (argc < 3) - argc++, argv[2] = "-"; - if (argc > 3) { - printf("usage: %s remote-directory local-file\n", argv[0]); - code = -1; - return; - } - cmd = argv[0][0] == 'n' ? "NLST" : "LIST"; - if (strcmp(argv[2], "-") && !globulize(&argv[2])) { - code = -1; - return; - } - if (strcmp(argv[2], "-") && *argv[2] != '|') - if (!globulize(&argv[2]) || !confirm("output to local-file:", - argv[2])) { - code = -1; - return; - } - recvrequest(cmd, argv[2], argv[1], "w", 0, 1); -} - -/* - * Get a directory listing - * of multiple remote files. - */ -void -mls(int argc, char **argv) -{ - sighand oldintr; - int ointer, i; - char *cmd, filemode[2], *dest; - - if (argc < 2 && !another(&argc, &argv, "remote-files")) - goto usage; - if (argc < 3 && !another(&argc, &argv, "local-file")) { -usage: - printf("usage: %s remote-files local-file\n", argv[0]); - code = -1; - return; - } - dest = argv[argc - 1]; - argv[argc - 1] = NULL; - if (strcmp(dest, "-") && *dest != '|') - if (!globulize(&dest) || - !confirm("output to local-file:", dest)) { - code = -1; - return; - } - cmd = argv[0][1] == 'l' ? "NLST" : "LIST"; - mname = argv[0]; - mflag = 1; - oldintr = signal(SIGINT, mabort); - setjmp(jabort); - filemode[1] = '\0'; - for (i = 1; mflag && i < argc-1; ++i) { - *filemode = (i == 1) ? 'w' : 'a'; - recvrequest(cmd, dest, argv[i], filemode, 0, 1); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with", argv[0])) { - mflag ++; - } - interactive = ointer; - } - } - signal(SIGINT, oldintr); - mflag = 0; -} - -/* - * Do a shell escape - */ -/*ARGSUSED*/ -void -shell(int argc, char **argv) -{ - pid_t pid; - RETSIGTYPE (*old1)(int), (*old2)(int); - char shellnam[40], *shellpath, *namep; - int waitstatus; - - old1 = signal (SIGINT, SIG_IGN); - old2 = signal (SIGQUIT, SIG_IGN); - if ((pid = fork()) == 0) { - for (pid = 3; pid < 20; pid++) - close(pid); - signal(SIGINT, SIG_DFL); - signal(SIGQUIT, SIG_DFL); - shellpath = getenv("SHELL"); - if (shellpath == NULL) - shellpath = _PATH_BSHELL; - namep = strrchr(shellpath, '/'); - if (namep == NULL) - namep = shellpath; - snprintf (shellnam, sizeof(shellnam), - "-%s", ++namep); - if (strcmp(namep, "sh") != 0) - shellnam[0] = '+'; - if (debug) { - printf ("%s\n", shellpath); - fflush (stdout); - } - if (argc > 1) { - execl(shellpath,shellnam,"-c",altarg,(char *)0); - } - else { - execl(shellpath,shellnam,(char *)0); - } - warn("%s", shellpath); - code = -1; - exit(1); - } - if (pid > 0) - while (waitpid(-1, &waitstatus, 0) != pid) - ; - signal(SIGINT, old1); - signal(SIGQUIT, old2); - if (pid == -1) { - warn("%s", "Try again later"); - code = -1; - } - else { - code = 0; - } -} - -/* - * Send new user information (re-login) - */ -void -user(int argc, char **argv) -{ - char acctstr[80]; - int n, aflag = 0; - char tmp[256]; - - if (argc < 2) - another(&argc, &argv, "username"); - if (argc < 2 || argc > 4) { - printf("usage: %s username [password] [account]\n", argv[0]); - code = -1; - return; - } - n = command("USER %s", argv[1]); - if (n == CONTINUE) { - if (argc < 3 ) { - UI_UTIL_read_pw_string (tmp, - sizeof(tmp), - "Password: ", 0); - argv[2] = tmp; - argc++; - } - n = command("PASS %s", argv[2]); - } - if (n == CONTINUE) { - if (argc < 4) { - printf("Account: "); fflush(stdout); - fgets(acctstr, sizeof(acctstr) - 1, stdin); - acctstr[strcspn(acctstr, "\r\n")] = '\0'; - argv[3] = acctstr; argc++; - } - n = command("ACCT %s", argv[3]); - aflag++; - } - if (n != COMPLETE) { - fprintf(stdout, "Login failed.\n"); - return; - } - if (!aflag && argc == 4) { - command("ACCT %s", argv[3]); - } -} - -/* - * Print working directory. - */ -/*VARARGS*/ -void -pwd(int argc, char **argv) -{ - int oldverbose = verbose; - - /* - * If we aren't verbose, this doesn't do anything! - */ - verbose = 1; - if (command("PWD") == ERROR && code == 500) { - printf("PWD command not recognized, trying XPWD\n"); - command("XPWD"); - } - verbose = oldverbose; -} - -/* - * Make a directory. - */ -void -makedir(int argc, char **argv) -{ - - if (argc < 2 && !another(&argc, &argv, "directory-name")) { - printf("usage: %s directory-name\n", argv[0]); - code = -1; - return; - } - if (command("MKD %s", argv[1]) == ERROR && code == 500) { - if (verbose) - printf("MKD command not recognized, trying XMKD\n"); - command("XMKD %s", argv[1]); - } -} - -/* - * Remove a directory. - */ -void -removedir(int argc, char **argv) -{ - - if (argc < 2 && !another(&argc, &argv, "directory-name")) { - printf("usage: %s directory-name\n", argv[0]); - code = -1; - return; - } - if (command("RMD %s", argv[1]) == ERROR && code == 500) { - if (verbose) - printf("RMD command not recognized, trying XRMD\n"); - command("XRMD %s", argv[1]); - } -} - -/* - * Send a line, verbatim, to the remote machine. - */ -void -quote(int argc, char **argv) -{ - - if (argc < 2 && !another(&argc, &argv, "command line to send")) { - printf("usage: %s line-to-send\n", argv[0]); - code = -1; - return; - } - quote1("", argc, argv); -} - -/* - * Send a SITE command to the remote machine. The line - * is sent verbatim to the remote machine, except that the - * word "SITE" is added at the front. - */ -void -site(int argc, char **argv) -{ - - if (argc < 2 && !another(&argc, &argv, "arguments to SITE command")) { - printf("usage: %s line-to-send\n", argv[0]); - code = -1; - return; - } - quote1("SITE ", argc, argv); -} - -/* - * Turn argv[1..argc) into a space-separated string, then prepend initial text. - * Send the result as a one-line command and get response. - */ -void -quote1(char *initial, int argc, char **argv) -{ - int i; - char buf[BUFSIZ]; /* must be >= sizeof(line) */ - - strlcpy(buf, initial, sizeof(buf)); - for(i = 1; i < argc; i++) { - if(i > 1) - strlcat(buf, " ", sizeof(buf)); - strlcat(buf, argv[i], sizeof(buf)); - } - if (command("%s", buf) == PRELIM) { - while (getreply(0) == PRELIM) - continue; - } -} - -void -do_chmod(int argc, char **argv) -{ - - if (argc < 2 && !another(&argc, &argv, "mode")) - goto usage; - if (argc < 3 && !another(&argc, &argv, "file-name")) { -usage: - printf("usage: %s mode file-name\n", argv[0]); - code = -1; - return; - } - command("SITE CHMOD %s %s", argv[1], argv[2]); -} - -void -do_umask(int argc, char **argv) -{ - int oldverbose = verbose; - - verbose = 1; - command(argc == 1 ? "SITE UMASK" : "SITE UMASK %s", argv[1]); - verbose = oldverbose; -} - -void -ftp_idle(int argc, char **argv) -{ - int oldverbose = verbose; - - verbose = 1; - command(argc == 1 ? "SITE IDLE" : "SITE IDLE %s", argv[1]); - verbose = oldverbose; -} - -/* - * Ask the other side for help. - */ -void -rmthelp(int argc, char **argv) -{ - int oldverbose = verbose; - - verbose = 1; - command(argc == 1 ? "HELP" : "HELP %s", argv[1]); - verbose = oldverbose; -} - -/* - * Terminate session and exit. - */ -/*VARARGS*/ -void -quit(int argc, char **argv) -{ - - if (connected) - disconnect(0, 0); - pswitch(1); - if (connected) { - disconnect(0, 0); - } - exit(0); -} - -/* - * Terminate session, but don't exit. - */ -void -disconnect(int argc, char **argv) -{ - - if (!connected) - return; - command("QUIT"); - if (cout) { - fclose(cout); - } - cout = NULL; - connected = 0; - sec_end(); - data = -1; - if (!proxy) { - macnum = 0; - } -} - -int -confirm(char *cmd, char *file) -{ - char buf[BUFSIZ]; - - if (!interactive) - return (1); - printf("%s %s? ", cmd, file); - fflush(stdout); - if (fgets(buf, sizeof buf, stdin) == NULL) - return (0); - return (*buf == 'y' || *buf == 'Y'); -} - -void -fatal(char *msg) -{ - - errx(1, "%s", msg); -} - -/* - * Glob a local file name specification with - * the expectation of a single return value. - * Can't control multiple values being expanded - * from the expression, we return only the first. - */ -int -globulize(char **cpp) -{ - glob_t gl; - int flags; - - if (!doglob) - return (1); - - flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE; - memset(&gl, 0, sizeof(gl)); - if (glob(*cpp, flags, NULL, &gl) || - gl.gl_pathc == 0) { - warnx("%s: not found", *cpp); - globfree(&gl); - return (0); - } - *cpp = strdup(gl.gl_pathv[0]); /* XXX - wasted memory */ - globfree(&gl); - return (1); -} - -void -account(int argc, char **argv) -{ - char acctstr[50]; - - if (argc > 1) { - ++argv; - --argc; - strlcpy (acctstr, *argv, sizeof(acctstr)); - while (argc > 1) { - --argc; - ++argv; - strlcat(acctstr, *argv, sizeof(acctstr)); - } - } - else { - UI_UTIL_read_pw_string(acctstr, sizeof(acctstr), "Account:", 0); - } - command("ACCT %s", acctstr); -} - -jmp_buf abortprox; - -static RETSIGTYPE -proxabort(int sig) -{ - - if (!proxy) { - pswitch(1); - } - if (connected) { - proxflag = 1; - } - else { - proxflag = 0; - } - pswitch(0); - longjmp(abortprox,1); -} - -void -doproxy(int argc, char **argv) -{ - struct cmd *c; - RETSIGTYPE (*oldintr)(int); - - if (argc < 2 && !another(&argc, &argv, "command")) { - printf("usage: %s command\n", argv[0]); - code = -1; - return; - } - c = getcmd(argv[1]); - if (c == (struct cmd *) -1) { - printf("?Ambiguous command\n"); - fflush(stdout); - code = -1; - return; - } - if (c == 0) { - printf("?Invalid command\n"); - fflush(stdout); - code = -1; - return; - } - if (!c->c_proxy) { - printf("?Invalid proxy command\n"); - fflush(stdout); - code = -1; - return; - } - if (setjmp(abortprox)) { - code = -1; - return; - } - oldintr = signal(SIGINT, proxabort); - pswitch(1); - if (c->c_conn && !connected) { - printf("Not connected\n"); - fflush(stdout); - pswitch(0); - signal(SIGINT, oldintr); - code = -1; - return; - } - (*c->c_handler)(argc-1, argv+1); - if (connected) { - proxflag = 1; - } - else { - proxflag = 0; - } - pswitch(0); - signal(SIGINT, oldintr); -} - -void -setcase(int argc, char **argv) -{ - - mcase = !mcase; - printf("Case mapping %s.\n", onoff(mcase)); - code = mcase; -} - -void -setcr(int argc, char **argv) -{ - - crflag = !crflag; - printf("Carriage Return stripping %s.\n", onoff(crflag)); - code = crflag; -} - -void -setntrans(int argc, char **argv) -{ - if (argc == 1) { - ntflag = 0; - printf("Ntrans off.\n"); - code = ntflag; - return; - } - ntflag++; - code = ntflag; - strlcpy (ntin, argv[1], 17); - if (argc == 2) { - ntout[0] = '\0'; - return; - } - strlcpy (ntout, argv[2], 17); -} - -char * -dotrans(char *name) -{ - static char new[MaxPathLen]; - char *cp1, *cp2 = new; - int i, ostop, found; - - for (ostop = 0; *(ntout + ostop) && ostop < 16; ostop++) - continue; - for (cp1 = name; *cp1; cp1++) { - found = 0; - for (i = 0; *(ntin + i) && i < 16; i++) { - if (*cp1 == *(ntin + i)) { - found++; - if (i < ostop) { - *cp2++ = *(ntout + i); - } - break; - } - } - if (!found) { - *cp2++ = *cp1; - } - } - *cp2 = '\0'; - return (new); -} - -void -setnmap(int argc, char **argv) -{ - char *cp; - - if (argc == 1) { - mapflag = 0; - printf("Nmap off.\n"); - code = mapflag; - return; - } - if (argc < 3 && !another(&argc, &argv, "mapout")) { - printf("Usage: %s [mapin mapout]\n",argv[0]); - code = -1; - return; - } - mapflag = 1; - code = 1; - cp = strchr(altarg, ' '); - if (cp == NULL) { - printf("Usage: %s missing space\n",argv[0]); - code = -1; - return; - } - if (proxy) { - while(*++cp == ' ') - continue; - altarg = cp; - cp = strchr(altarg, ' '); - } - *cp = '\0'; - strlcpy(mapin, altarg, MaxPathLen); - while (*++cp == ' ') - continue; - strlcpy(mapout, cp, MaxPathLen); -} - -char * -domap(char *name) -{ - static char new[MaxPathLen]; - char *cp1 = name, *cp2 = mapin; - char *tp[9], *te[9]; - int i, toks[9], toknum = 0, match = 1; - - for (i=0; i < 9; ++i) { - toks[i] = 0; - } - while (match && *cp1 && *cp2) { - switch (*cp2) { - case '\\': - if (*++cp2 != *cp1) { - match = 0; - } - break; - case '$': - if (*(cp2+1) >= '1' && (*cp2+1) <= '9') { - if (*cp1 != *(++cp2+1)) { - toks[toknum = *cp2 - '1']++; - tp[toknum] = cp1; - while (*++cp1 && *(cp2+1) - != *cp1); - te[toknum] = cp1; - } - cp2++; - break; - } - /* FALLTHROUGH */ - default: - if (*cp2 != *cp1) { - match = 0; - } - break; - } - if (match && *cp1) { - cp1++; - } - if (match && *cp2) { - cp2++; - } - } - if (!match && *cp1) /* last token mismatch */ - { - toks[toknum] = 0; - } - cp1 = new; - *cp1 = '\0'; - cp2 = mapout; - while (*cp2) { - match = 0; - switch (*cp2) { - case '\\': - if (*(cp2 + 1)) { - *cp1++ = *++cp2; - } - break; - case '[': -LOOP: - if (*++cp2 == '$' && isdigit((unsigned char)*(cp2+1))) { - if (*++cp2 == '0') { - char *cp3 = name; - - while (*cp3) { - *cp1++ = *cp3++; - } - match = 1; - } - else if (toks[toknum = *cp2 - '1']) { - char *cp3 = tp[toknum]; - - while (cp3 != te[toknum]) { - *cp1++ = *cp3++; - } - match = 1; - } - } - else { - while (*cp2 && *cp2 != ',' && - *cp2 != ']') { - if (*cp2 == '\\') { - cp2++; - } - else if (*cp2 == '$' && - isdigit((unsigned char)*(cp2+1))) { - if (*++cp2 == '0') { - char *cp3 = name; - - while (*cp3) { - *cp1++ = *cp3++; - } - } - else if (toks[toknum = - *cp2 - '1']) { - char *cp3=tp[toknum]; - - while (cp3 != - te[toknum]) { - *cp1++ = *cp3++; - } - } - } - else if (*cp2) { - *cp1++ = *cp2++; - } - } - if (!*cp2) { - printf("nmap: unbalanced brackets\n"); - return (name); - } - match = 1; - cp2--; - } - if (match) { - while (*++cp2 && *cp2 != ']') { - if (*cp2 == '\\' && *(cp2 + 1)) { - cp2++; - } - } - if (!*cp2) { - printf("nmap: unbalanced brackets\n"); - return (name); - } - break; - } - switch (*++cp2) { - case ',': - goto LOOP; - case ']': - break; - default: - cp2--; - goto LOOP; - } - break; - case '$': - if (isdigit((unsigned char)*(cp2 + 1))) { - if (*++cp2 == '0') { - char *cp3 = name; - - while (*cp3) { - *cp1++ = *cp3++; - } - } - else if (toks[toknum = *cp2 - '1']) { - char *cp3 = tp[toknum]; - - while (cp3 != te[toknum]) { - *cp1++ = *cp3++; - } - } - break; - } - /* intentional drop through */ - default: - *cp1++ = *cp2; - break; - } - cp2++; - } - *cp1 = '\0'; - if (!*new) { - return (name); - } - return (new); -} - -void -setpassive(int argc, char **argv) -{ - - passivemode = !passivemode; - printf("Passive mode %s.\n", onoff(passivemode)); - code = passivemode; -} - -void -setsunique(int argc, char **argv) -{ - - sunique = !sunique; - printf("Store unique %s.\n", onoff(sunique)); - code = sunique; -} - -void -setrunique(int argc, char **argv) -{ - - runique = !runique; - printf("Receive unique %s.\n", onoff(runique)); - code = runique; -} - -/* change directory to perent directory */ -void -cdup(int argc, char **argv) -{ - - if (command("CDUP") == ERROR && code == 500) { - if (verbose) - printf("CDUP command not recognized, trying XCUP\n"); - command("XCUP"); - } -} - -/* restart transfer at specific point */ -void -restart(int argc, char **argv) -{ - - if (argc != 2) - printf("restart: offset not specified\n"); - else { - restart_point = atol(argv[1]); - printf("restarting at %ld. %s\n", (long)restart_point, - "execute get, put or append to initiate transfer"); - } -} - -/* show remote system type */ -void -syst(int argc, char **argv) -{ - - command("SYST"); -} - -void -macdef(int argc, char **argv) -{ - char *tmp; - int c; - - if (macnum == 16) { - printf("Limit of 16 macros have already been defined\n"); - code = -1; - return; - } - if (argc < 2 && !another(&argc, &argv, "macro name")) { - printf("Usage: %s macro_name\n",argv[0]); - code = -1; - return; - } - if (interactive) { - printf("Enter macro line by line, terminating it with a null line\n"); - } - strlcpy(macros[macnum].mac_name, - argv[1], - sizeof(macros[macnum].mac_name)); - if (macnum == 0) { - macros[macnum].mac_start = macbuf; - } - else { - macros[macnum].mac_start = macros[macnum - 1].mac_end + 1; - } - tmp = macros[macnum].mac_start; - while (tmp != macbuf+4096) { - if ((c = getchar()) == EOF) { - printf("macdef:end of file encountered\n"); - code = -1; - return; - } - if ((*tmp = c) == '\n') { - if (tmp == macros[macnum].mac_start) { - macros[macnum++].mac_end = tmp; - code = 0; - return; - } - if (*(tmp-1) == '\0') { - macros[macnum++].mac_end = tmp - 1; - code = 0; - return; - } - *tmp = '\0'; - } - tmp++; - } - while (1) { - while ((c = getchar()) != '\n' && c != EOF) - /* LOOP */; - if (c == EOF || getchar() == '\n') { - printf("Macro not defined - 4k buffer exceeded\n"); - code = -1; - return; - } - } -} - -/* - * get size of file on remote machine - */ -void -sizecmd(int argc, char **argv) -{ - - if (argc < 2 && !another(&argc, &argv, "filename")) { - printf("usage: %s filename\n", argv[0]); - code = -1; - return; - } - command("SIZE %s", argv[1]); -} - -/* - * get last modification time of file on remote machine - */ -void -modtime(int argc, char **argv) -{ - int overbose; - - if (argc < 2 && !another(&argc, &argv, "filename")) { - printf("usage: %s filename\n", argv[0]); - code = -1; - return; - } - overbose = verbose; - if (debug == 0) - verbose = -1; - if (command("MDTM %s", argv[1]) == COMPLETE) { - int yy, mo, day, hour, min, sec; - sscanf(reply_string, "%*s %04d%02d%02d%02d%02d%02d", &yy, &mo, - &day, &hour, &min, &sec); - /* might want to print this in local time */ - printf("%s\t%02d/%02d/%04d %02d:%02d:%02d GMT\n", argv[1], - mo, day, yy, hour, min, sec); - } else - printf("%s\n", reply_string); - verbose = overbose; -} - -/* - * show status on reomte machine - */ -void -rmtstatus(int argc, char **argv) -{ - - command(argc > 1 ? "STAT %s" : "STAT" , argv[1]); -} - -/* - * get file if modtime is more recent than current file - */ -void -newer(int argc, char **argv) -{ - - if (getit(argc, argv, -1, curtype == TYPE_I ? "wb" : "w")) - printf("Local file \"%s\" is newer than remote file \"%s\"\n", - argv[2], argv[1]); -} - -void -klist(int argc, char **argv) -{ - int ret; - if(argc != 1){ - printf("usage: %s\n", argv[0]); - code = -1; - return; - } - - ret = command("SITE KLIST"); - code = (ret == COMPLETE); -} diff --git a/kerberosV/src/appl/ftp/ftp/cmdtab.c b/kerberosV/src/appl/ftp/ftp/cmdtab.c deleted file mode 100644 index 7b4c3294253..00000000000 --- a/kerberosV/src/appl/ftp/ftp/cmdtab.c +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (c) 1985, 1989, 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. - */ - -#include "ftp_locl.h" - -/* - * User FTP -- Command Tables. - */ - -char accounthelp[] = "send account command to remote server"; -char appendhelp[] = "append to a file"; -char asciihelp[] = "set ascii transfer type"; -char beephelp[] = "beep when command completed"; -char binaryhelp[] = "set binary transfer type"; -char casehelp[] = "toggle mget upper/lower case id mapping"; -char cdhelp[] = "change remote working directory"; -char cduphelp[] = "change remote working directory to parent directory"; -char chmodhelp[] = "change file permissions of remote file"; -char connecthelp[] = "connect to remote tftp"; -char crhelp[] = "toggle carriage return stripping on ascii gets"; -char deletehelp[] = "delete remote file"; -char debughelp[] = "toggle/set debugging mode"; -char dirhelp[] = "list contents of remote directory"; -char disconhelp[] = "terminate ftp session"; -char domachelp[] = "execute macro"; -char formhelp[] = "set file transfer format"; -char globhelp[] = "toggle metacharacter expansion of local file names"; -char hashhelp[] = "toggle printing `#' for each buffer transferred"; -char helphelp[] = "print local help information"; -char idlehelp[] = "get (set) idle timer on remote side"; -char lcdhelp[] = "change local working directory"; -char lshelp[] = "list contents of remote directory"; -char macdefhelp[] = "define a macro"; -char mdeletehelp[] = "delete multiple files"; -char mdirhelp[] = "list contents of multiple remote directories"; -char mgethelp[] = "get multiple files"; -char mkdirhelp[] = "make directory on the remote machine"; -char mlshelp[] = "list contents of multiple remote directories"; -char modtimehelp[] = "show last modification time of remote file"; -char modehelp[] = "set file transfer mode"; -char mputhelp[] = "send multiple files"; -char newerhelp[] = "get file if remote file is newer than local file "; -char nlisthelp[] = "nlist contents of remote directory"; -char nmaphelp[] = "set templates for default file name mapping"; -char ntranshelp[] = "set translation table for default file name mapping"; -char porthelp[] = "toggle use of PORT cmd for each data connection"; -char prompthelp[] = "force interactive prompting on multiple commands"; -char proxyhelp[] = "issue command on alternate connection"; -char pwdhelp[] = "print working directory on remote machine"; -char quithelp[] = "terminate ftp session and exit"; -char quotehelp[] = "send arbitrary ftp command"; -char receivehelp[] = "receive file"; -char regethelp[] = "get file restarting at end of local file"; -char remotehelp[] = "get help from remote server"; -char renamehelp[] = "rename file"; -char restarthelp[]= "restart file transfer at bytecount"; -char rmdirhelp[] = "remove directory on the remote machine"; -char rmtstatushelp[]="show status of remote machine"; -char runiquehelp[] = "toggle store unique for local files"; -char resethelp[] = "clear queued command replies"; -char sendhelp[] = "send one file"; -char passivehelp[] = "enter passive transfer mode"; -char sitehelp[] = "send site specific command to remote server\n\t\tTry \"rhelp site\" or \"site help\" for more information"; -char shellhelp[] = "escape to the shell"; -char sizecmdhelp[] = "show size of remote file"; -char statushelp[] = "show current status"; -char structhelp[] = "set file transfer structure"; -char suniquehelp[] = "toggle store unique on remote machine"; -char systemhelp[] = "show remote system type"; -char tenexhelp[] = "set tenex file transfer type"; -char tracehelp[] = "toggle packet tracing"; -char typehelp[] = "set file transfer type"; -char umaskhelp[] = "get (set) umask on remote side"; -char userhelp[] = "send new user information"; -char verbosehelp[] = "toggle verbose mode"; - -char prothelp[] = "set protection level"; -char prothelp_c[] = "set command protection level"; -#if defined(KRB5) -char klisthelp[] = "show remote tickets"; -#endif -#if defined(KRB5) -char afsloghelp[] = "obtain remote AFS tokens"; -#endif - -struct cmd cmdtab[] = { - { "!", shellhelp, 0, 0, 0, shell }, - { "$", domachelp, 1, 0, 0, domacro }, - { "account", accounthelp, 0, 1, 1, account}, - { "append", appendhelp, 1, 1, 1, put }, - { "ascii", asciihelp, 0, 1, 1, setascii }, - { "bell", beephelp, 0, 0, 0, setbell }, - { "binary", binaryhelp, 0, 1, 1, setbinary }, - { "bye", quithelp, 0, 0, 0, quit }, - { "case", casehelp, 0, 0, 1, setcase }, - { "cd", cdhelp, 0, 1, 1, cd }, - { "cdup", cduphelp, 0, 1, 1, cdup }, - { "chmod", chmodhelp, 0, 1, 1, do_chmod }, - { "close", disconhelp, 0, 1, 1, disconnect }, - { "cr", crhelp, 0, 0, 0, setcr }, - { "delete", deletehelp, 0, 1, 1, delete }, - { "debug", debughelp, 0, 0, 0, setdebug }, - { "dir", dirhelp, 1, 1, 1, ls }, - { "disconnect", disconhelp, 0, 1, 1, disconnect }, - { "form", formhelp, 0, 1, 1, setform }, - { "get", receivehelp, 1, 1, 1, get }, - { "glob", globhelp, 0, 0, 0, setglob }, - { "hash", hashhelp, 0, 0, 0, sethash }, - { "help", helphelp, 0, 0, 1, help }, - { "idle", idlehelp, 0, 1, 1, ftp_idle }, - { "image", binaryhelp, 0, 1, 1, setbinary }, - { "lcd", lcdhelp, 0, 0, 0, lcd }, - { "ls", lshelp, 1, 1, 1, ls }, - { "macdef", macdefhelp, 0, 0, 0, macdef }, - { "mdelete", mdeletehelp, 1, 1, 1, mdelete }, - { "mdir", mdirhelp, 1, 1, 1, mls }, - { "mget", mgethelp, 1, 1, 1, mget }, - { "mkdir", mkdirhelp, 0, 1, 1, makedir }, - { "mls", mlshelp, 1, 1, 1, mls }, - { "mode", modehelp, 0, 1, 1, setftmode }, - { "modtime", modtimehelp, 0, 1, 1, modtime }, - { "mput", mputhelp, 1, 1, 1, mput }, - { "newer", newerhelp, 1, 1, 1, newer }, - { "nmap", nmaphelp, 0, 0, 1, setnmap }, - { "nlist", nlisthelp, 1, 1, 1, ls }, - { "ntrans", ntranshelp, 0, 0, 1, setntrans }, - { "open", connecthelp, 0, 0, 1, setpeer }, - { "passive", passivehelp, 0, 0, 0, setpassive }, - { "prompt", prompthelp, 0, 0, 0, setprompt }, - { "proxy", proxyhelp, 0, 0, 1, doproxy }, - { "sendport", porthelp, 0, 0, 0, setport }, - { "put", sendhelp, 1, 1, 1, put }, - { "pwd", pwdhelp, 0, 1, 1, pwd }, - { "quit", quithelp, 0, 0, 0, quit }, - { "quote", quotehelp, 1, 1, 1, quote }, - { "recv", receivehelp, 1, 1, 1, get }, - { "reget", regethelp, 1, 1, 1, reget }, - { "rstatus", rmtstatushelp, 0, 1, 1, rmtstatus }, - { "rhelp", remotehelp, 0, 1, 1, rmthelp }, - { "rename", renamehelp, 0, 1, 1, renamefile }, - { "reset", resethelp, 0, 1, 1, reset }, - { "restart", restarthelp, 1, 1, 1, restart }, - { "rmdir", rmdirhelp, 0, 1, 1, removedir }, - { "runique", runiquehelp, 0, 0, 1, setrunique }, - { "send", sendhelp, 1, 1, 1, put }, - { "site", sitehelp, 0, 1, 1, site }, - { "size", sizecmdhelp, 1, 1, 1, sizecmd }, - { "status", statushelp, 0, 0, 1, status }, - { "struct", structhelp, 0, 1, 1, setstruct }, - { "system", systemhelp, 0, 1, 1, syst }, - { "sunique", suniquehelp, 0, 0, 1, setsunique }, - { "tenex", tenexhelp, 0, 1, 1, settenex }, - { "trace", tracehelp, 0, 0, 0, settrace }, - { "type", typehelp, 0, 1, 1, settype }, - { "user", userhelp, 0, 1, 1, user }, - { "umask", umaskhelp, 0, 1, 1, do_umask }, - { "verbose", verbosehelp, 0, 0, 0, setverbose }, - { "?", helphelp, 0, 0, 1, help }, - - { "protect", prothelp, 0, 1, 0, sec_prot }, - /* what MIT uses */ - { "cprotect", prothelp_c, 0, 1, 1, sec_prot_command }, -#if defined(KRB5) - { "klist", klisthelp, 0, 1, 0, klist }, -#endif -#if defined(KRB5) - { "afslog", afsloghelp, 0, 1, 0, afslog }, -#endif - - { 0 }, -}; - -int NCMDS = (sizeof (cmdtab) / sizeof (cmdtab[0])) - 1; diff --git a/kerberosV/src/appl/ftp/ftp/domacro.c b/kerberosV/src/appl/ftp/ftp/domacro.c deleted file mode 100644 index f8e8b1da12a..00000000000 --- a/kerberosV/src/appl/ftp/ftp/domacro.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 1985, 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. - */ - -#include "ftp_locl.h" -RCSID("$Id: domacro.c,v 1.3 2013/06/17 19:11:35 robert Exp $"); - -void -domacro(int argc, char **argv) -{ - int i, j, count = 2, loopflg = 0; - char *cp1, *cp2, line2[200]; - struct cmd *c; - - if (argc < 2 && !another(&argc, &argv, "macro name")) { - printf("Usage: %s macro_name.\n", argv[0]); - code = -1; - return; - } - for (i = 0; i < macnum; ++i) { - if (!strncmp(argv[1], macros[i].mac_name, 9)) { - break; - } - } - if (i == macnum) { - printf("'%s' macro not found.\n", argv[1]); - code = -1; - return; - } - strlcpy(line2, line, sizeof(line2)); -TOP: - cp1 = macros[i].mac_start; - while (cp1 != macros[i].mac_end) { - while (isspace((unsigned char)*cp1)) { - cp1++; - } - cp2 = line; - while (*cp1 != '\0') { - size_t len; - switch(*cp1) { - case '\\': - if (line + sizeof(line) - 2 < cp2) - goto out; - *cp2++ = *++cp1; - break; - case '$': - if (isdigit((unsigned char)*(cp1+1))) { - j = 0; - while (isdigit((unsigned char)*++cp1)) { - j = 10*j + *cp1 - '0'; - } - cp1--; - if (argc - 2 >= j) { - len = sizeof(line) - (cp2 - line) - 1; - if (strlcpy(cp2, argv[j+1], len) >= len) - goto out; - cp2 += strlen(argv[j+1]); - } - break; - } - if (*(cp1+1) == 'i') { - loopflg = 1; - cp1++; - if (count < argc) { - len = sizeof(line) - (cp2 - line) - 1; - if (strlcpy(cp2, argv[count], len) >= len) - goto out; - cp2 += strlen(argv[count]); - } - break; - } - /* intentional drop through */ - default: - if (line + sizeof(line) - 2 < cp2) - goto out; - *cp2++ = *cp1; - break; - } - if (*cp1 != '\0') { - cp1++; - } - } - out: - *cp2 = '\0'; - makeargv(); - c = getcmd(margv[0]); - if (c == (struct cmd *)-1) { - printf("?Ambiguous command\n"); - code = -1; - } - else if (c == 0) { - printf("?Invalid command\n"); - code = -1; - } - else if (c->c_conn && !connected) { - printf("Not connected.\n"); - code = -1; - } - else { - if (verbose) { - printf("%s\n",line); - } - (*c->c_handler)(margc, margv); - if (bell && c->c_bell) { - putchar('\007'); - } - strlcpy(line, line2, sizeof(line)); - makeargv(); - argc = margc; - argv = margv; - } - if (cp1 != macros[i].mac_end) { - cp1++; - } - } - if (loopflg && ++count < argc) { - goto TOP; - } -} diff --git a/kerberosV/src/appl/ftp/ftp/extern.h b/kerberosV/src/appl/ftp/ftp/extern.h deleted file mode 100644 index 1b0fdf79453..00000000000 --- a/kerberosV/src/appl/ftp/ftp/extern.h +++ /dev/null @@ -1,174 +0,0 @@ -/*- - * Copyright (c) 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. - * - * @(#)extern.h 8.3 (Berkeley) 10/9/94 - */ - -/* $Id: extern.h,v 1.3 2013/06/17 19:11:35 robert Exp $ */ - -#include -#include -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -void abort_remote (FILE *); -void abortpt (int); -void abortrecv (int); -void account (int, char **); -int another (int *, char ***, char *); -void blkfree (char **); -void cd (int, char **); -void cdup (int, char **); -void changetype (int, int); -void cmdabort (int); -void cmdscanner (int); -int command (char *fmt, ...) - __attribute__ ((format (printf, 1,2))); -int confirm (char *, char *); -FILE *dataconn (const char *); -void delete (int, char **); -void disconnect (int, char **); -void do_chmod (int, char **); -void do_umask (int, char **); -void domacro (int, char **); -char *domap (char *); -void doproxy (int, char **); -char *dotrans (char *); -int empty (fd_set *, int); -void fatal (char *); -void get (int, char **); -struct cmd *getcmd (char *); -int getit (int, char **, int, char *); -int getreply (int); -int globulize (char **); -char *gunique (char *); -void help (int, char **); -char *hookup (const char *, int); -void ftp_idle (int, char **); -int initconn (void); -void intr (int); -void lcd (int, char **); -int login (char *); -RETSIGTYPE lostpeer (int); -void ls (int, char **); -void macdef (int, char **); -void makeargv (void); -void makedir (int, char **); -void mdelete (int, char **); -void mget (int, char **); -void mls (int, char **); -void modtime (int, char **); -void mput (int, char **); -char *onoff (int); -void newer (int, char **); -void proxtrans (char *, char *, char *); -void psabort (int); -void pswitch (int); -void ptransfer (char *, long, struct timeval *, struct timeval *); -void put (int, char **); -void pwd (int, char **); -void quit (int, char **); -void quote (int, char **); -void quote1 (char *, int, char **); -void recvrequest (char *, char *, char *, char *, int, int); -void reget (int, char **); -char *remglob (char **, int); -void removedir (int, char **); -void renamefile (int, char **); -void reset (int, char **); -void restart (int, char **); -void rmthelp (int, char **); -void rmtstatus (int, char **); -int ruserpassword (char *, char **, char **, char **); -void sendrequest (char *, char *, char *, char *, int); -void setascii (int, char **); -void setbell (int, char **); -void setbinary (int, char **); -void setcase (int, char **); -void setcr (int, char **); -void setdebug (int, char **); -void setform (int, char **); -void setftmode (int, char **); -void setglob (int, char **); -void sethash (int, char **); -void setnmap (int, char **); -void setntrans (int, char **); -void setpassive (int, char **); -void setpeer (int, char **); -void setport (int, char **); -void setprompt (int, char **); -void setrunique (int, char **); -void setstruct (int, char **); -void setsunique (int, char **); -void settenex (int, char **); -void settrace (int, char **); -void settype (int, char **); -void setverbose (int, char **); -void shell (int, char **); -void site (int, char **); -void sizecmd (int, char **); -char *slurpstring (void); -void status (int, char **); -void syst (int, char **); -void tvsub (struct timeval *, struct timeval *, struct timeval *); -void user (int, char **); - -extern jmp_buf abortprox; -extern int abrtflag; -extern struct cmd cmdtab[]; -extern FILE *cout; -extern int data; -extern char *home; -extern jmp_buf jabort; -extern int proxy; -extern char reply_string[]; -extern off_t restart_point; -extern int NCMDS; - -extern char username[32]; -extern char myhostname[]; -extern char *mydomain; - -void afslog (int, char **); -void kauth (int, char **); -void kdestroy (int, char **); -void klist (int, char **); -void krbtkfile (int, char **); diff --git a/kerberosV/src/appl/ftp/ftp/ftp.1 b/kerberosV/src/appl/ftp/ftp/ftp.1 deleted file mode 100644 index b0a837d863f..00000000000 --- a/kerberosV/src/appl/ftp/ftp/ftp.1 +++ /dev/null @@ -1,1211 +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 March 23, 2006 -.Dt FTP 1 -.Os BSD 4.2 -.Sh NAME -.Nm ftp -.Nd -.Tn ARPANET -file transfer program -.Sh SYNOPSIS -.Nm ftp -.Op Fl K -.Op Fl d -.Op Fl g -.Op Fl i -.Op Fl l -.Op Fl n -.Op Fl p -.Op Fl t -.Op Fl v -.Op Fl x -.Op Fl Fl no-gss-bindings -.Op Fl Fl no-gss-delegate -.Op Ar host -.Sh DESCRIPTION -.Nm -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 have been made so that it almost follows the FTP -Security Extensions, RFC 2228. -.Pp -Options may be specified at the command line, or to the -command interpreter. -.Bl -tag -width flag -.It Fl K -Disable Kerberos authentication. -.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. - .It Fl Fl no-gss-bindings -Don't use GSS-API bindings when talking to peer. IP addresses will not -be checked to ensure they match. -.It Fl Fl no-gss-delegate -Disable delegation of GSSAPI credentials. -.It Fl l -Disables command line editing. -.It Fl x -Encrypt command and data channel. -.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\*[Gt] -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 \-\-\*[Gt] -.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/ *$//" \*[Gt] $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\*[Gt] -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 -uses 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 -.Rs -.%T RFC2228 -.Re -.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/kerberosV/src/appl/ftp/ftp/ftp.c b/kerberosV/src/appl/ftp/ftp/ftp.c deleted file mode 100644 index a3915f39222..00000000000 --- a/kerberosV/src/appl/ftp/ftp/ftp.c +++ /dev/null @@ -1,1814 +0,0 @@ -/* - * Copyright (c) 1985, 1989, 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. - */ - -#include "ftp_locl.h" -RCSID ("$Id: ftp.c,v 1.5 2013/06/17 19:11:35 robert Exp $"); - -struct sockaddr_storage hisctladdr_ss; -struct sockaddr *hisctladdr = (struct sockaddr *)&hisctladdr_ss; -struct sockaddr_storage data_addr_ss; -struct sockaddr *data_addr = (struct sockaddr *)&data_addr_ss; -struct sockaddr_storage myctladdr_ss; -struct sockaddr *myctladdr = (struct sockaddr *)&myctladdr_ss; -int data = -1; -int abrtflag = 0; -jmp_buf ptabort; -int ptabflg; -int ptflag = 0; -off_t restart_point = 0; - - -FILE *cin, *cout; - -typedef void (*sighand) (int); - -char * -hookup (const char *host, int port) -{ - static char hostnamebuf[MaxHostNameLen]; - struct addrinfo *ai, *a; - struct addrinfo hints; - int error; - char portstr[NI_MAXSERV]; - socklen_t len; - int s; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - hints.ai_flags = AI_CANONNAME; - - snprintf (portstr, sizeof(portstr), "%u", ntohs(port)); - - error = getaddrinfo (host, portstr, &hints, &ai); - if (error) { - warnx ("%s: %s", host, gai_strerror(error)); - code = -1; - return NULL; - } - strlcpy (hostnamebuf, host, sizeof(hostnamebuf)); - hostname = hostnamebuf; - - s = -1; - for (a = ai; a != NULL; a = a->ai_next) { - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - - if (a->ai_canonname != NULL) - strlcpy (hostnamebuf, a->ai_canonname, sizeof(hostnamebuf)); - - memcpy (hisctladdr, a->ai_addr, a->ai_addrlen); - - error = connect (s, a->ai_addr, a->ai_addrlen); - if (error < 0) { - char addrstr[256]; - - if (getnameinfo (a->ai_addr, a->ai_addrlen, - addrstr, sizeof(addrstr), - NULL, 0, NI_NUMERICHOST) != 0) - strlcpy (addrstr, "unknown address", sizeof(addrstr)); - - warn ("connect %s", addrstr); - close (s); - s = -1; - continue; - } - break; - } - freeaddrinfo (ai); - if (s < 0) { - warnx ("failed to contact %s", host); - code = -1; - return NULL; - } - - len = sizeof(myctladdr_ss); - if (getsockname (s, myctladdr, &len) < 0) { - warn ("getsockname"); - code = -1; - close (s); - return NULL; - } -#ifdef IPTOS_LOWDELAY - socket_set_tos (s, IPTOS_LOWDELAY); -#endif - cin = fdopen (s, "r"); - cout = fdopen (s, "w"); - if (cin == NULL || cout == NULL) { - warnx ("fdopen failed."); - if (cin) - fclose (cin); - if (cout) - fclose (cout); - code = -1; - goto bad; - } - if (verbose) - printf ("Connected to %s.\n", hostname); - if (getreply (0) > 2) { /* read startup message from server */ - if (cin) - fclose (cin); - if (cout) - fclose (cout); - code = -1; - goto bad; - } -#if defined(SO_OOBINLINE) && defined(HAVE_SETSOCKOPT) - { - int on = 1; - - if (setsockopt (s, SOL_SOCKET, SO_OOBINLINE, (char *) &on, sizeof (on)) - < 0 && debug) { - warn ("setsockopt"); - } - } -#endif /* SO_OOBINLINE */ - - return (hostname); -bad: - close (s); - return NULL; -} - -int -login (char *host) -{ - char tmp[80]; - char defaultpass[128]; - char *userstr, *pass, *acctstr; - char *ruserstr, *rpass, *racctstr; - int n, aflag = 0; - - char *myname = NULL; - struct passwd *pw = k_getpwuid(getuid()); - - if (pw != NULL) - myname = pw->pw_name; - - ruserstr = rpass = racctstr = NULL; - - if(sec_login(host)) - printf("\n*** Using plaintext user and password ***\n\n"); - else{ - printf("Authentication successful.\n\n"); - } - - if (ruserpassword (host, &ruserstr, &rpass, &racctstr) < 0) { - code = -1; - return (0); - } - userstr = ruserstr; - pass = rpass; - acctstr = racctstr; - - while (userstr == NULL) { - if (myname) - printf ("Name (%s:%s): ", host, myname); - else - printf ("Name (%s): ", host); - *tmp = '\0'; - if (fgets (tmp, sizeof (tmp) - 1, stdin) != NULL) - tmp[strlen (tmp) - 1] = '\0'; - if (*tmp == '\0') - userstr = myname; - else - userstr = tmp; - } - strlcpy(username, userstr, sizeof(username)); - if (ruserstr) - free(ruserstr); - - n = command("USER %s", userstr); - if (n == COMPLETE) - n = command("PASS dummy"); /* DK: Compatibility with gssftp daemon */ - else if(n == CONTINUE) { - if (pass == NULL) { - char prompt[128]; - if(myname && - (!strcmp(userstr, "ftp") || !strcmp(userstr, "anonymous"))) { - snprintf(defaultpass, sizeof(defaultpass), - "%s@%s", myname, mydomain); - snprintf(prompt, sizeof(prompt), - "Password (%s): ", defaultpass); - } else if (sec_complete) { - pass = myname; - } else { - *defaultpass = '\0'; - snprintf(prompt, sizeof(prompt), "Password: "); - } - if (pass == NULL) { - pass = defaultpass; - UI_UTIL_read_pw_string (tmp, sizeof (tmp), prompt, 0); - if (tmp[0]) - pass = tmp; - } - } - n = command ("PASS %s", pass); - if (rpass) - free(rpass); - } - if (n == CONTINUE) { - aflag++; - UI_UTIL_read_pw_string (tmp, sizeof(tmp), "Account:", 0); - acctstr = tmp; - n = command ("ACCT %s", acctstr); - } - if (n != COMPLETE) { - if (racctstr) - free(racctstr); - warnx ("Login failed."); - return (0); - } - if (!aflag && acctstr != NULL) - command ("ACCT %s", acctstr); - if (racctstr) - free(racctstr); - if (proxy) - return (1); - for (n = 0; n < macnum; ++n) { - if (!strcmp("init", macros[n].mac_name)) { - strlcpy (line, "$init", sizeof (line)); - makeargv(); - domacro(margc, margv); - break; - } - } - sec_set_protection_level (); - return (1); -} - -void -cmdabort (int sig) -{ - - printf ("\n"); - fflush (stdout); - abrtflag++; - if (ptflag) - longjmp (ptabort, 1); -} - -int -command (char *fmt,...) -{ - va_list ap; - int r; - sighand oldintr; - - abrtflag = 0; - if (cout == NULL) { - warn ("No control connection for command"); - code = -1; - return (0); - } - oldintr = signal(SIGINT, cmdabort); - if(debug){ - printf("---> "); - if (strncmp("PASS ", fmt, 5) == 0) - printf("PASS XXXX"); - else { - va_start(ap, fmt); - vfprintf(stdout, fmt, ap); - va_end(ap); - } - } - va_start(ap, fmt); - sec_vfprintf(cout, fmt, ap); - va_end(ap); - if(debug){ - printf("\n"); - fflush(stdout); - } - fprintf (cout, "\r\n"); - fflush (cout); - cpend = 1; - r = getreply (!strcmp (fmt, "QUIT")); - if (abrtflag && oldintr != SIG_IGN) - (*oldintr) (SIGINT); - signal (SIGINT, oldintr); - return (r); -} - -char reply_string[BUFSIZ]; /* last line of previous reply */ - -int -getreply (int expecteof) -{ - char *p; - char *lead_string; - int c; - struct sigaction sa, osa; - char buf[8192]; - int reply_code; - int long_warn = 0; - - sigemptyset (&sa.sa_mask); - sa.sa_flags = 0; - sa.sa_handler = cmdabort; - sigaction (SIGINT, &sa, &osa); - - p = buf; - - reply_code = 0; - while (1) { - c = getc (cin); - switch (c) { - case EOF: - if (expecteof) { - sigaction (SIGINT, &osa, NULL); - code = 221; - return 0; - } - lostpeer (0); - if (verbose) { - printf ("421 Service not available, " - "remote server has closed connection\n"); - fflush (stdout); - } - code = 421; - return (4); - case IAC: - c = getc (cin); - if (c == WILL || c == WONT) - fprintf (cout, "%c%c%c", IAC, DONT, getc (cin)); - if (c == DO || c == DONT) - fprintf (cout, "%c%c%c", IAC, WONT, getc (cin)); - continue; - case '\n': - *p++ = '\0'; - if(isdigit((unsigned char)buf[0])){ - sscanf(buf, "%d", &code); - if(code == 631){ - code = 0; - sec_read_msg(buf, prot_safe); - sscanf(buf, "%d", &code); - lead_string = "S:"; - } else if(code == 632){ - code = 0; - sec_read_msg(buf, prot_private); - sscanf(buf, "%d", &code); - lead_string = "P:"; - }else if(code == 633){ - code = 0; - sec_read_msg(buf, prot_confidential); - sscanf(buf, "%d", &code); - lead_string = "C:"; - }else if(sec_complete) - lead_string = "!!"; - else - lead_string = ""; - if(code != 0 && reply_code == 0) - reply_code = code; - if (verbose > 0 || (verbose > -1 && code > 499)) - fprintf (stdout, "%s%s\n", lead_string, buf); - if (code == reply_code && buf[3] == ' ') { - strlcpy (reply_string, buf, sizeof(reply_string)); - if (code >= 200) - cpend = 0; - sigaction (SIGINT, &osa, NULL); - if (code == 421) - lostpeer (0); -#if 1 - if (abrtflag && - osa.sa_handler != cmdabort && - osa.sa_handler != SIG_IGN) - osa.sa_handler (SIGINT); -#endif - if (code == 227 || code == 229) { - char *q; - - q = strchr (reply_string, '('); - if (q) { - q++; - strlcpy(pasv, q, sizeof(pasv)); - q = strrchr(pasv, ')'); - if (q) - *q = '\0'; - } - } - return code / 100; - } - }else{ - if(verbose > 0 || (verbose > -1 && code > 499)){ - if(sec_complete) - fprintf(stdout, "!!"); - fprintf(stdout, "%s\n", buf); - } - } - p = buf; - long_warn = 0; - continue; - default: - if(p < buf + sizeof(buf) - 1) - *p++ = c; - else if(long_warn == 0) { - fprintf(stderr, "WARNING: incredibly long line received\n"); - long_warn = 1; - } - } - } - -} - - -#if 0 -int -getreply (int expecteof) -{ - int c, n; - int dig; - int originalcode = 0, continuation = 0; - sighand oldintr; - int pflag = 0; - char *cp, *pt = pasv; - - oldintr = signal (SIGINT, cmdabort); - for (;;) { - dig = n = code = 0; - cp = reply_string; - while ((c = getc (cin)) != '\n') { - if (c == IAC) { /* handle telnet commands */ - switch (c = getc (cin)) { - case WILL: - case WONT: - c = getc (cin); - fprintf (cout, "%c%c%c", IAC, DONT, c); - fflush (cout); - break; - case DO: - case DONT: - c = getc (cin); - fprintf (cout, "%c%c%c", IAC, WONT, c); - fflush (cout); - break; - default: - break; - } - continue; - } - dig++; - if (c == EOF) { - if (expecteof) { - signal (SIGINT, oldintr); - code = 221; - return (0); - } - lostpeer (0); - if (verbose) { - printf ("421 Service not available, remote server has closed connection\n"); - fflush (stdout); - } - code = 421; - return (4); - } - if (c != '\r' && (verbose > 0 || - (verbose > -1 && n == '5' && dig > 4))) { - if (proxflag && - (dig == 1 || dig == 5 && verbose == 0)) - printf ("%s:", hostname); - putchar (c); - } - if (dig < 4 && isdigit (c)) - code = code * 10 + (c - '0'); - if (!pflag && code == 227) - pflag = 1; - if (dig > 4 && pflag == 1 && isdigit (c)) - pflag = 2; - if (pflag == 2) { - if (c != '\r' && c != ')') - *pt++ = c; - else { - *pt = '\0'; - pflag = 3; - } - } - if (dig == 4 && c == '-') { - if (continuation) - code = 0; - continuation++; - } - if (n == 0) - n = c; - if (cp < &reply_string[sizeof (reply_string) - 1]) - *cp++ = c; - } - if (verbose > 0 || verbose > -1 && n == '5') { - putchar (c); - fflush (stdout); - } - if (continuation && code != originalcode) { - if (originalcode == 0) - originalcode = code; - continue; - } - *cp = '\0'; - if(sec_complete){ - if(code == 631) - sec_read_msg(reply_string, prot_safe); - else if(code == 632) - sec_read_msg(reply_string, prot_private); - else if(code == 633) - sec_read_msg(reply_string, prot_confidential); - n = code / 100 + '0'; - } - if (n != '1') - cpend = 0; - signal (SIGINT, oldintr); - if (code == 421 || originalcode == 421) - lostpeer (0); - if (abrtflag && oldintr != cmdabort && oldintr != SIG_IGN) - (*oldintr) (SIGINT); - return (n - '0'); - } -} - -#endif - -int -empty (fd_set * mask, int sec) -{ - struct timeval t; - - t.tv_sec = sec; - t.tv_usec = 0; - return (select (FD_SETSIZE, mask, NULL, NULL, &t)); -} - -jmp_buf sendabort; - -static RETSIGTYPE -abortsend (int sig) -{ - - mflag = 0; - abrtflag = 0; - printf ("\nsend aborted\nwaiting for remote to finish abort\n"); - fflush (stdout); - longjmp (sendabort, 1); -} - -#define HASHBYTES 1024 - -static int -copy_stream (FILE * from, FILE * to) -{ - static size_t bufsize; - static char *buf; - int n; - int bytes = 0; - int werr = 0; - int hashbytes = HASHBYTES; - struct stat st; - -#if defined(HAVE_MMAP) && !defined(NO_MMAP) - void *chunk; - size_t off; - -#define BLOCKSIZE (1024 * 1024 * 10) - -#ifndef MAP_FAILED -#define MAP_FAILED (-1) -#endif - - if (fstat (fileno (from), &st) == 0 && S_ISREG (st.st_mode)) { - /* - * mmap zero bytes has potential of loosing, don't do it. - */ - if (st.st_size == 0) - return 0; - off = 0; - while (off != st.st_size) { - size_t len; - ssize_t res; - - len = st.st_size - off; - if (len > BLOCKSIZE) - len = BLOCKSIZE; - - chunk = mmap (0, len, PROT_READ, MAP_SHARED, fileno (from), off); - if (chunk == (void *) MAP_FAILED) { - if (off == 0) /* try read if mmap doesn't work */ - goto try_read; - break; - } - - res = sec_write (fileno (to), chunk, len); - if (msync (chunk, len, MS_ASYNC)) - warn ("msync"); - if (munmap (chunk, len) < 0) - warn ("munmap"); - sec_fflush (to); - if (res != len) - return off; - off += len; - } - return off; - } -try_read: -#endif - - buf = alloc_buffer (buf, &bufsize, - fstat (fileno (from), &st) >= 0 ? &st : NULL); - if (buf == NULL) - return -1; - - while ((n = read (fileno (from), buf, bufsize)) > 0) { - werr = sec_write (fileno (to), buf, n); - if (werr < 0) - break; - bytes += werr; - while (hash && bytes > hashbytes) { - putchar ('#'); - hashbytes += HASHBYTES; - } - } - sec_fflush (to); - if (n < 0) - warn ("local"); - - if (werr < 0) { - if (errno != EPIPE) - warn ("netout"); - bytes = -1; - } - return bytes; -} - -void -sendrequest (char *cmd, char *local, char *remote, char *lmode, int printnames) -{ - struct stat st; - struct timeval start, stop; - int c, d; - FILE *fin, *dout = 0; - int (*closefunc) (FILE *); - RETSIGTYPE (*oldintr)(int), (*oldintp)(int); - long bytes = 0, hashbytes = HASHBYTES; - char *rmode = "w"; - - if (verbose && printnames) { - if (strcmp (local, "-") != 0) - printf ("local: %s ", local); - if (remote) - printf ("remote: %s\n", remote); - } - if (proxy) { - proxtrans (cmd, local, remote); - return; - } - if (curtype != type) - changetype (type, 0); - closefunc = NULL; - oldintr = NULL; - oldintp = NULL; - - if (setjmp (sendabort)) { - while (cpend) { - getreply (0); - } - if (data >= 0) { - close (data); - data = -1; - } - if (oldintr) - signal (SIGINT, oldintr); - if (oldintp) - signal (SIGPIPE, oldintp); - code = -1; - return; - } - oldintr = signal (SIGINT, abortsend); - if (strcmp (local, "-") == 0) - fin = stdin; - else if (*local == '|') { - oldintp = signal (SIGPIPE, SIG_IGN); - fin = popen (local + 1, lmode); - if (fin == NULL) { - warn ("%s", local + 1); - signal (SIGINT, oldintr); - signal (SIGPIPE, oldintp); - code = -1; - return; - } - closefunc = pclose; - } else { - fin = fopen (local, lmode); - if (fin == NULL) { - warn ("local: %s", local); - signal (SIGINT, oldintr); - code = -1; - return; - } - closefunc = fclose; - if (fstat (fileno (fin), &st) < 0 || !S_ISREG(st.st_mode)) { - fprintf (stdout, "%s: not a plain file.\n", local); - signal (SIGINT, oldintr); - fclose (fin); - code = -1; - return; - } - } - if (initconn ()) { - signal (SIGINT, oldintr); - if (oldintp) - signal (SIGPIPE, oldintp); - code = -1; - if (closefunc != NULL) - (*closefunc) (fin); - return; - } - if (setjmp (sendabort)) - goto abort; - - if (restart_point && - (strcmp (cmd, "STOR") == 0 || strcmp (cmd, "APPE") == 0)) { - int rc; - - switch (curtype) { - case TYPE_A: - rc = fseek (fin, (long) restart_point, SEEK_SET); - break; - case TYPE_I: - case TYPE_L: - rc = lseek (fileno (fin), restart_point, SEEK_SET); - break; - default: - abort(); - } - if (rc < 0) { - warn ("local: %s", local); - restart_point = 0; - if (closefunc != NULL) - (*closefunc) (fin); - return; - } - if (command ("REST %ld", (long) restart_point) - != CONTINUE) { - restart_point = 0; - if (closefunc != NULL) - (*closefunc) (fin); - return; - } - restart_point = 0; - rmode = "r+w"; - } - if (remote) { - if (command ("%s %s", cmd, remote) != PRELIM) { - signal (SIGINT, oldintr); - if (oldintp) - signal (SIGPIPE, oldintp); - if (closefunc != NULL) - (*closefunc) (fin); - return; - } - } else if (command ("%s", cmd) != PRELIM) { - signal(SIGINT, oldintr); - if (oldintp) - signal(SIGPIPE, oldintp); - if (closefunc != NULL) - (*closefunc)(fin); - return; - } - dout = dataconn(rmode); - if (dout == NULL) - goto abort; - set_buffer_size (fileno (dout), 0); - gettimeofday (&start, (struct timezone *) 0); - oldintp = signal (SIGPIPE, SIG_IGN); - switch (curtype) { - - case TYPE_I: - case TYPE_L: - errno = d = c = 0; - bytes = copy_stream (fin, dout); - break; - - case TYPE_A: - while ((c = getc (fin)) != EOF) { - if (c == '\n') { - while (hash && (bytes >= hashbytes)) { - putchar ('#'); - fflush (stdout); - hashbytes += HASHBYTES; - } - if (ferror (dout)) - break; - sec_putc ('\r', dout); - bytes++; - } - sec_putc (c, dout); - bytes++; - } - sec_fflush (dout); - if (hash) { - if (bytes < hashbytes) - putchar ('#'); - putchar ('\n'); - fflush (stdout); - } - if (ferror (fin)) - warn ("local: %s", local); - if (ferror (dout)) { - if (errno != EPIPE) - warn ("netout"); - bytes = -1; - } - break; - } - if (closefunc != NULL) - (*closefunc) (fin); - fclose (dout); - gettimeofday (&stop, (struct timezone *) 0); - getreply (0); - signal (SIGINT, oldintr); - if (oldintp) - signal (SIGPIPE, oldintp); - if (bytes > 0) - ptransfer ("sent", bytes, &start, &stop); - return; -abort: - signal (SIGINT, oldintr); - if (oldintp) - signal (SIGPIPE, oldintp); - if (!cpend) { - code = -1; - return; - } - if (data >= 0) { - close (data); - data = -1; - } - if (dout) - fclose (dout); - getreply (0); - code = -1; - if (closefunc != NULL && fin != NULL) - (*closefunc) (fin); - gettimeofday (&stop, (struct timezone *) 0); - if (bytes > 0) - ptransfer ("sent", bytes, &start, &stop); -} - -jmp_buf recvabort; - -void -abortrecv (int sig) -{ - - mflag = 0; - abrtflag = 0; - printf ("\nreceive aborted\nwaiting for remote to finish abort\n"); - fflush (stdout); - longjmp (recvabort, 1); -} - -void -recvrequest (char *cmd, char *local, char *remote, - char *lmode, int printnames, int local_given) -{ - FILE *fout = NULL, *din = NULL; - int (*closefunc) (FILE *); - sighand oldintr, oldintp; - int c, d, is_retr, tcrflag, bare_lfs = 0; - static size_t bufsize; - static char *buf; - long bytes = 0, hashbytes = HASHBYTES; - struct timeval start, stop; - struct stat st; - - is_retr = strcmp (cmd, "RETR") == 0; - if (is_retr && verbose && printnames) { - if (strcmp (local, "-") != 0) - printf ("local: %s ", local); - if (remote) - printf ("remote: %s\n", remote); - } - if (proxy && is_retr) { - proxtrans (cmd, local, remote); - return; - } - closefunc = NULL; - oldintr = NULL; - oldintp = NULL; - tcrflag = !crflag && is_retr; - if (setjmp (recvabort)) { - while (cpend) { - getreply (0); - } - if (data >= 0) { - close (data); - data = -1; - } - if (oldintr) - signal (SIGINT, oldintr); - code = -1; - return; - } - oldintr = signal (SIGINT, abortrecv); - if (!local_given || (strcmp(local, "-") && *local != '|')) { - if (access (local, 2) < 0) { - char *dir = strrchr (local, '/'); - - if (errno != ENOENT && errno != EACCES) { - warn ("local: %s", local); - signal (SIGINT, oldintr); - code = -1; - return; - } - if (dir != NULL) - *dir = 0; - d = access (dir ? local : ".", 2); - if (dir != NULL) - *dir = '/'; - if (d < 0) { - warn ("local: %s", local); - signal (SIGINT, oldintr); - code = -1; - return; - } - if (!runique && errno == EACCES && - chmod (local, 0600) < 0) { - warn ("local: %s", local); - signal (SIGINT, oldintr); - signal (SIGINT, oldintr); - code = -1; - return; - } - if (runique && errno == EACCES && - (local = gunique (local)) == NULL) { - signal (SIGINT, oldintr); - code = -1; - return; - } - } else if (runique && (local = gunique (local)) == NULL) { - signal(SIGINT, oldintr); - code = -1; - return; - } - } - if (!is_retr) { - if (curtype != TYPE_A) - changetype (TYPE_A, 0); - } else if (curtype != type) - changetype (type, 0); - if (initconn ()) { - signal (SIGINT, oldintr); - code = -1; - return; - } - if (setjmp (recvabort)) - goto abort; - if (is_retr && restart_point && - command ("REST %ld", (long) restart_point) != CONTINUE) - return; - if (remote) { - if (command ("%s %s", cmd, remote) != PRELIM) { - signal (SIGINT, oldintr); - return; - } - } else { - if (command ("%s", cmd) != PRELIM) { - signal (SIGINT, oldintr); - return; - } - } - din = dataconn ("r"); - if (din == NULL) - goto abort; - set_buffer_size (fileno (din), 1); - if (local_given && strcmp (local, "-") == 0) - fout = stdout; - else if (local_given && *local == '|') { - oldintp = signal (SIGPIPE, SIG_IGN); - fout = popen (local + 1, "w"); - if (fout == NULL) { - warn ("%s", local + 1); - goto abort; - } - closefunc = pclose; - } else { - fout = fopen (local, lmode); - if (fout == NULL) { - warn ("local: %s", local); - goto abort; - } - closefunc = fclose; - } - buf = alloc_buffer (buf, &bufsize, - fstat (fileno (fout), &st) >= 0 ? &st : NULL); - if (buf == NULL) - goto abort; - - gettimeofday (&start, (struct timezone *) 0); - switch (curtype) { - - case TYPE_I: - case TYPE_L: - if (restart_point && - lseek (fileno (fout), restart_point, SEEK_SET) < 0) { - warn ("local: %s", local); - if (closefunc != NULL) - (*closefunc) (fout); - return; - } - errno = d = 0; - while ((c = sec_read (fileno (din), buf, bufsize)) > 0) { - if ((d = write (fileno (fout), buf, c)) != c) - break; - bytes += c; - if (hash) { - while (bytes >= hashbytes) { - putchar ('#'); - hashbytes += HASHBYTES; - } - fflush (stdout); - } - } - if (hash && bytes > 0) { - if (bytes < HASHBYTES) - putchar ('#'); - putchar ('\n'); - fflush (stdout); - } - if (c < 0) { - if (errno != EPIPE) - warn ("netin"); - bytes = -1; - } - if (d < c) { - if (d < 0) - warn ("local: %s", local); - else - warnx ("%s: short write", local); - } - break; - - case TYPE_A: - if (restart_point) { - int i, n, ch; - - if (fseek (fout, 0L, SEEK_SET) < 0) - goto done; - n = restart_point; - for (i = 0; i++ < n;) { - if ((ch = sec_getc (fout)) == EOF) - goto done; - if (ch == '\n') - i++; - } - if (fseek (fout, 0L, SEEK_CUR) < 0) { - done: - warn ("local: %s", local); - if (closefunc != NULL) - (*closefunc) (fout); - return; - } - } - while ((c = sec_getc(din)) != EOF) { - if (c == '\n') - bare_lfs++; - while (c == '\r') { - while (hash && (bytes >= hashbytes)) { - putchar ('#'); - fflush (stdout); - hashbytes += HASHBYTES; - } - bytes++; - if ((c = sec_getc (din)) != '\n' || tcrflag) { - if (ferror (fout)) - goto break2; - putc ('\r', fout); - if (c == '\0') { - bytes++; - goto contin2; - } - if (c == EOF) - goto contin2; - } - } - putc (c, fout); - bytes++; - contin2:; - } -break2: - if (bare_lfs) { - printf ("WARNING! %d bare linefeeds received in ASCII mode\n", - bare_lfs); - printf ("File may not have transferred correctly.\n"); - } - if (hash) { - if (bytes < hashbytes) - putchar ('#'); - putchar ('\n'); - fflush (stdout); - } - if (ferror (din)) { - if (errno != EPIPE) - warn ("netin"); - bytes = -1; - } - if (ferror (fout)) - warn ("local: %s", local); - break; - } - if (closefunc != NULL) - (*closefunc) (fout); - signal (SIGINT, oldintr); - if (oldintp) - signal (SIGPIPE, oldintp); - fclose (din); - gettimeofday (&stop, (struct timezone *) 0); - getreply (0); - if (bytes > 0 && is_retr) - ptransfer ("received", bytes, &start, &stop); - return; -abort: - - /* abort using RFC959 recommended IP,SYNC sequence */ - - if (oldintp) - signal (SIGPIPE, oldintr); - signal (SIGINT, SIG_IGN); - if (!cpend) { - code = -1; - signal (SIGINT, oldintr); - return; - } - abort_remote(din); - code = -1; - if (data >= 0) { - close (data); - data = -1; - } - if (closefunc != NULL && fout != NULL) - (*closefunc) (fout); - if (din) - fclose (din); - gettimeofday (&stop, (struct timezone *) 0); - if (bytes > 0) - ptransfer ("received", bytes, &start, &stop); - signal (SIGINT, oldintr); -} - -static int -parse_epsv (const char *str) -{ - char sep; - char *end; - int port; - - if (*str == '\0') - return -1; - sep = *str++; - if (sep != *str++) - return -1; - if (sep != *str++) - return -1; - port = strtol (str, &end, 0); - if (str == end) - return -1; - if (end[0] != sep || end[1] != '\0') - return -1; - return htons(port); -} - -static int -parse_pasv (struct sockaddr_in *sin4, const char *str) -{ - int a0, a1, a2, a3, p0, p1; - - /* - * What we've got at this point is a string of comma separated - * one-byte unsigned integer values. The first four are the an IP - * address. The fifth is the MSB of the port number, the sixth is the - * LSB. From that we'll prepare a sockaddr_in. - */ - - if (sscanf (str, "%d,%d,%d,%d,%d,%d", - &a0, &a1, &a2, &a3, &p0, &p1) != 6) { - printf ("Passive mode address scan failure. " - "Shouldn't happen!\n"); - return -1; - } - if (a0 < 0 || a0 > 255 || - a1 < 0 || a1 > 255 || - a2 < 0 || a2 > 255 || - a3 < 0 || a3 > 255 || - p0 < 0 || p0 > 255 || - p1 < 0 || p1 > 255) { - printf ("Can't parse passive mode string.\n"); - return -1; - } - memset (sin4, 0, sizeof(*sin4)); - sin4->sin_family = AF_INET; - sin4->sin_addr.s_addr = htonl ((a0 << 24) | (a1 << 16) | - (a2 << 8) | a3); - sin4->sin_port = htons ((p0 << 8) | p1); - return 0; -} - -static int -passive_mode (void) -{ - int port; - - data = socket (myctladdr->sa_family, SOCK_STREAM, 0); - if (data < 0) { - warn ("socket"); - return (1); - } - if (options & SO_DEBUG) - socket_set_debug (data); - if (command ("EPSV") != COMPLETE) { - if (command ("PASV") != COMPLETE) { - printf ("Passive mode refused.\n"); - goto bad; - } - } - - /* - * Parse the reply to EPSV or PASV - */ - - port = parse_epsv (pasv); - if (port > 0) { - data_addr->sa_family = myctladdr->sa_family; - socket_set_address_and_port (data_addr, - socket_get_address (hisctladdr), - port); - } else { - if (parse_pasv ((struct sockaddr_in *)data_addr, pasv) < 0) - goto bad; - } - - if (connect (data, data_addr, socket_sockaddr_size (data_addr)) < 0) { - warn ("connect"); - goto bad; - } -#ifdef IPTOS_THROUGHPUT - socket_set_tos (data, IPTOS_THROUGHPUT); -#endif - return (0); -bad: - close (data); - data = -1; - sendport = 1; - return (1); -} - - -static int -active_mode (void) -{ - int tmpno = 0; - socklen_t len; - int result; - -noport: - data_addr->sa_family = myctladdr->sa_family; - socket_set_address_and_port (data_addr, socket_get_address (myctladdr), - sendport ? 0 : socket_get_port (myctladdr)); - - if (data != -1) - close (data); - data = socket (data_addr->sa_family, SOCK_STREAM, 0); - if (data < 0) { - warn ("socket"); - if (tmpno) - sendport = 1; - return (1); - } - if (!sendport) - socket_set_reuseaddr (data, 1); - if (bind (data, data_addr, socket_sockaddr_size (data_addr)) < 0) { - warn ("bind"); - goto bad; - } - if (options & SO_DEBUG) - socket_set_debug (data); - len = sizeof (data_addr_ss); - if (getsockname (data, data_addr, &len) < 0) { - warn ("getsockname"); - goto bad; - } - if (listen (data, 1) < 0) - warn ("listen"); - if (sendport) { - char addr_str[256]; - int inet_af; - int overbose; - - if (inet_ntop (data_addr->sa_family, socket_get_address (data_addr), - addr_str, sizeof(addr_str)) == NULL) - errx (1, "inet_ntop failed"); - switch (data_addr->sa_family) { - case AF_INET : - inet_af = 1; - break; -#ifdef HAVE_IPV6 - case AF_INET6 : - inet_af = 2; - break; -#endif - default : - errx (1, "bad address family %d", data_addr->sa_family); - } - - - overbose = verbose; - if (debug == 0) - verbose = -1; - - result = command ("EPRT |%d|%s|%d|", - inet_af, addr_str, - ntohs(socket_get_port (data_addr))); - verbose = overbose; - - if (result == ERROR) { - struct sockaddr_in *sin4 = (struct sockaddr_in *)data_addr; - - unsigned int a = ntohl(sin4->sin_addr.s_addr); - unsigned int p = ntohs(sin4->sin_port); - - if (data_addr->sa_family != AF_INET) { - warnx ("remote server doesn't support EPRT"); - goto bad; - } - - result = command("PORT %d,%d,%d,%d,%d,%d", - (a >> 24) & 0xff, - (a >> 16) & 0xff, - (a >> 8) & 0xff, - a & 0xff, - (p >> 8) & 0xff, - p & 0xff); - if (result == ERROR && sendport == -1) { - sendport = 0; - tmpno = 1; - goto noport; - } - return (result != COMPLETE); - } - return result != COMPLETE; - } - if (tmpno) - sendport = 1; - - -#ifdef IPTOS_THROUGHPUT - socket_set_tos (data, IPTOS_THROUGHPUT); -#endif - return (0); -bad: - close (data); - data = -1; - if (tmpno) - sendport = 1; - return (1); -} - -/* - * Need to start a listen on the data channel before we send the command, - * otherwise the server's connect may fail. - */ -int -initconn (void) -{ - if (passivemode) - return passive_mode (); - else - return active_mode (); -} - -FILE * -dataconn (const char *lmode) -{ - struct sockaddr_storage from_ss; - struct sockaddr *from = (struct sockaddr *)&from_ss; - socklen_t fromlen = sizeof(from_ss); - int s; - - if (passivemode) - return (fdopen (data, lmode)); - - s = accept (data, from, &fromlen); - if (s < 0) { - warn ("accept"); - close (data), data = -1; - return (NULL); - } - close (data); - data = s; -#ifdef IPTOS_THROUGHPUT - socket_set_tos (s, IPTOS_THROUGHPUT); -#endif - return (fdopen (data, lmode)); -} - -void -ptransfer (char *direction, long int bytes, - struct timeval * t0, struct timeval * t1) -{ - struct timeval td; - float s; - float bs; - int prec; - char *unit; - - if (verbose) { - td.tv_sec = t1->tv_sec - t0->tv_sec; - td.tv_usec = t1->tv_usec - t0->tv_usec; - if (td.tv_usec < 0) { - td.tv_sec--; - td.tv_usec += 1000000; - } - s = td.tv_sec + (td.tv_usec / 1000000.); - bs = bytes / (s ? s : 1); - if (bs >= 1048576) { - bs /= 1048576; - unit = "M"; - prec = 2; - } else if (bs >= 1024) { - bs /= 1024; - unit = "k"; - prec = 1; - } else { - unit = ""; - prec = 0; - } - - printf ("%ld bytes %s in %.3g seconds (%.*f %sbyte/s)\n", - bytes, direction, s, prec, bs, unit); - } -} - -void -psabort (int sig) -{ - - abrtflag++; -} - -void -pswitch (int flag) -{ - sighand oldintr; - static struct comvars { - int connect; - char name[MaxHostNameLen]; - struct sockaddr_storage mctl; - struct sockaddr_storage hctl; - FILE *in; - FILE *out; - int tpe; - int curtpe; - int cpnd; - int sunqe; - int runqe; - int mcse; - int ntflg; - char nti[17]; - char nto[17]; - int mapflg; - char mi[MaxPathLen]; - char mo[MaxPathLen]; - } proxstruct, tmpstruct; - struct comvars *ip, *op; - - abrtflag = 0; - oldintr = signal (SIGINT, psabort); - if (flag) { - if (proxy) - return; - ip = &tmpstruct; - op = &proxstruct; - proxy++; - } else { - if (!proxy) - return; - ip = &proxstruct; - op = &tmpstruct; - proxy = 0; - } - ip->connect = connected; - connected = op->connect; - if (hostname) { - strlcpy (ip->name, hostname, sizeof (ip->name)); - } else - ip->name[0] = 0; - hostname = op->name; - ip->hctl = hisctladdr_ss; - hisctladdr_ss = op->hctl; - ip->mctl = myctladdr_ss; - myctladdr_ss = op->mctl; - ip->in = cin; - cin = op->in; - ip->out = cout; - cout = op->out; - ip->tpe = type; - type = op->tpe; - ip->curtpe = curtype; - curtype = op->curtpe; - ip->cpnd = cpend; - cpend = op->cpnd; - ip->sunqe = sunique; - sunique = op->sunqe; - ip->runqe = runique; - runique = op->runqe; - ip->mcse = mcase; - mcase = op->mcse; - ip->ntflg = ntflag; - ntflag = op->ntflg; - strlcpy (ip->nti, ntin, sizeof (ip->nti)); - strlcpy (ntin, op->nti, 17); - strlcpy (ip->nto, ntout, sizeof (ip->nto)); - strlcpy (ntout, op->nto, 17); - ip->mapflg = mapflag; - mapflag = op->mapflg; - strlcpy (ip->mi, mapin, MaxPathLen); - strlcpy (mapin, op->mi, MaxPathLen); - strlcpy (ip->mo, mapout, MaxPathLen); - strlcpy (mapout, op->mo, MaxPathLen); - signal(SIGINT, oldintr); - if (abrtflag) { - abrtflag = 0; - (*oldintr) (SIGINT); - } -} - -void -abortpt (int sig) -{ - - printf ("\n"); - fflush (stdout); - ptabflg++; - mflag = 0; - abrtflag = 0; - longjmp (ptabort, 1); -} - -void -proxtrans (char *cmd, char *local, char *remote) -{ - sighand oldintr = NULL; - int secndflag = 0, prox_type, nfnd; - char *cmd2; - fd_set mask; - - if (strcmp (cmd, "RETR")) - cmd2 = "RETR"; - else - cmd2 = runique ? "STOU" : "STOR"; - if ((prox_type = type) == 0) { - if (unix_server && unix_proxy) - prox_type = TYPE_I; - else - prox_type = TYPE_A; - } - if (curtype != prox_type) - changetype (prox_type, 1); - if (command ("PASV") != COMPLETE) { - printf ("proxy server does not support third party transfers.\n"); - return; - } - pswitch (0); - if (!connected) { - printf ("No primary connection\n"); - pswitch (1); - code = -1; - return; - } - if (curtype != prox_type) - changetype (prox_type, 1); - if (command ("PORT %s", pasv) != COMPLETE) { - pswitch (1); - return; - } - if (setjmp (ptabort)) - goto abort; - oldintr = signal (SIGINT, abortpt); - if (command ("%s %s", cmd, remote) != PRELIM) { - signal (SIGINT, oldintr); - pswitch (1); - return; - } - sleep (2); - pswitch (1); - secndflag++; - if (command ("%s %s", cmd2, local) != PRELIM) - goto abort; - ptflag++; - getreply (0); - pswitch (0); - getreply (0); - signal (SIGINT, oldintr); - pswitch (1); - ptflag = 0; - printf ("local: %s remote: %s\n", local, remote); - return; -abort: - signal (SIGINT, SIG_IGN); - ptflag = 0; - if (strcmp (cmd, "RETR") && !proxy) - pswitch (1); - else if (!strcmp (cmd, "RETR") && proxy) - pswitch (0); - if (!cpend && !secndflag) { /* only here if cmd = "STOR" (proxy=1) */ - if (command ("%s %s", cmd2, local) != PRELIM) { - pswitch (0); - if (cpend) - abort_remote ((FILE *) NULL); - } - pswitch (1); - if (ptabflg) - code = -1; - if (oldintr) - signal (SIGINT, oldintr); - return; - } - if (cpend) - abort_remote ((FILE *) NULL); - pswitch (!proxy); - if (!cpend && !secndflag) { /* only if cmd = "RETR" (proxy=1) */ - if (command ("%s %s", cmd2, local) != PRELIM) { - pswitch (0); - if (cpend) - abort_remote ((FILE *) NULL); - pswitch (1); - if (ptabflg) - code = -1; - signal (SIGINT, oldintr); - return; - } - } - if (cpend) - abort_remote ((FILE *) NULL); - pswitch (!proxy); - if (cpend) { - FD_ZERO (&mask); - if (fileno(cin) >= FD_SETSIZE) - errx (1, "fd too large"); - FD_SET (fileno (cin), &mask); - if ((nfnd = empty (&mask, 10)) <= 0) { - if (nfnd < 0) { - warn ("abort"); - } - if (ptabflg) - code = -1; - lostpeer (0); - } - getreply (0); - getreply (0); - } - if (proxy) - pswitch (0); - pswitch (1); - if (ptabflg) - code = -1; - signal (SIGINT, oldintr); -} - -void -reset (int argc, char **argv) -{ - fd_set mask; - int nfnd = 1; - - FD_ZERO (&mask); - while (nfnd > 0) { - if (fileno (cin) >= FD_SETSIZE) - errx (1, "fd too large"); - FD_SET (fileno (cin), &mask); - if ((nfnd = empty (&mask, 0)) < 0) { - warn ("reset"); - code = -1; - lostpeer(0); - } else if (nfnd) { - getreply(0); - } - } -} - -char * -gunique (char *local) -{ - static char new[MaxPathLen]; - char *cp = strrchr (local, '/'); - int d, count = 0; - char ext = '1'; - - if (cp) - *cp = '\0'; - d = access (cp ? local : ".", 2); - if (cp) - *cp = '/'; - if (d < 0) { - warn ("local: %s", local); - return NULL; - } - strlcpy (new, local, sizeof(new)); - cp = new + strlen(new); - *cp++ = '.'; - while (!d) { - if (++count == 100) { - printf ("runique: can't find unique file name.\n"); - return NULL; - } - *cp++ = ext; - *cp = '\0'; - if (ext == '9') - ext = '0'; - else - ext++; - if ((d = access (new, 0)) < 0) - break; - if (ext != '0') - cp--; - else if (*(cp - 2) == '.') - *(cp - 1) = '1'; - else { - *(cp - 2) = *(cp - 2) + 1; - cp--; - } - } - return (new); -} - -void -abort_remote (FILE * din) -{ - char buf[BUFSIZ]; - int nfnd; - fd_set mask; - - /* - * send IAC in urgent mode instead of DM because 4.3BSD places oob mark - * after urgent byte rather than before as is protocol now - */ - snprintf (buf, sizeof (buf), "%c%c%c", IAC, IP, IAC); - if (send (fileno (cout), buf, 3, MSG_OOB) != 3) - warn ("abort"); - fprintf (cout, "%c", DM); - sec_fprintf(cout, "ABOR"); - sec_fflush (cout); - fprintf (cout, "\r\n"); - fflush(cout); - FD_ZERO (&mask); - if (fileno (cin) >= FD_SETSIZE) - errx (1, "fd too large"); - FD_SET (fileno (cin), &mask); - if (din) { - if (fileno (din) >= FD_SETSIZE) - errx (1, "fd too large"); - FD_SET (fileno (din), &mask); - } - if ((nfnd = empty (&mask, 10)) <= 0) { - if (nfnd < 0) { - warn ("abort"); - } - if (ptabflg) - code = -1; - lostpeer (0); - } - if (din && FD_ISSET (fileno (din), &mask)) { - while (read (fileno (din), buf, BUFSIZ) > 0) - /* LOOP */ ; - } - if (getreply (0) == ERROR && code == 552) { - /* 552 needed for nic style abort */ - getreply (0); - } - getreply (0); -} diff --git a/kerberosV/src/appl/ftp/ftp/ftp.cat1 b/kerberosV/src/appl/ftp/ftp/ftp.cat1 deleted file mode 100644 index f36c0da359d..00000000000 --- a/kerberosV/src/appl/ftp/ftp/ftp.cat1 +++ /dev/null @@ -1,658 +0,0 @@ - -FTP(1) BSD General Commands Manual FTP(1) - -NNAAMMEE - ffttpp -- ARPANET file transfer program - -SSYYNNOOPPSSIISS - ffttpp [--KK] [--dd] [--gg] [--ii] [--ll] [--nn] [--pp] [--tt] [--vv] [--xx] [----nnoo--ggssss--bbiinnddiinnggss] - [----nnoo--ggssss--ddeelleeggaattee] [_h_o_s_t] - -DDEESSCCRRIIPPTTIIOONN - ffttpp is the user interface to the ARPANET standard File Transfer Protocol. - The program allows a user to transfer files to and from a remote network - site. - - Modifications have been made so that it almost follows the FTP Security - Extensions, RFC 2228. - - Options may be specified at the command line, or to the command inter- - preter. - - --KK Disable Kerberos authentication. - - --tt Enables packet tracing. - - --vv Verbose option forces ffttpp to show all responses from the remote - server, as well as report on data transfer statistics. - - --nn Restrains ffttpp from attempting ``auto-login'' upon initial connec- - tion. If auto-login is enabled, ffttpp will check the _._n_e_t_r_c (see - below) file in the user's home directory for an entry describing an - account on the remote machine. If no entry exists, ffttpp 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. - - --ii Turns off interactive prompting during multiple file transfers. - - --pp Turn on passive mode. - - --dd Enables debugging. - - --gg Disables file name globbing. - .It Fl Fl no-gss-bindings Don't use GSS-API bindings when talking - to peer. IP addresses will not be checked to ensure they match. - - ----nnoo--ggssss--ddeelleeggaattee - Disable delegation of GSSAPI credentials. - - --ll Disables command line editing. - - --xx Encrypt command and data channel. - - The client host with which ffttpp is to communicate may be specified on the - command line. If this is done, ffttpp will immediately attempt to establish - a connection to an FTP server on that host; otherwise, ffttpp will enter its - command interpreter and await instructions from the user. When ffttpp is - awaiting commands from the user the prompt `ftp>' is provided to the - user. The following commands are recognized by ffttpp: - - !! [_c_o_m_m_a_n_d [_a_r_g_s]] - 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. - - $$ _m_a_c_r_o_-_n_a_m_e [_a_r_g_s] - Execute the macro _m_a_c_r_o_-_n_a_m_e that was defined with the mmaaccddeeff - command. Arguments are passed to the macro unglobbed. - - aaccccoouunntt [_p_a_s_s_w_d] - 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. - - aappppeenndd _l_o_c_a_l_-_f_i_l_e [_r_e_m_o_t_e_-_f_i_l_e] - Append a local file to a file on the remote machine. If - _r_e_m_o_t_e_-_f_i_l_e is left unspecified, the local file name is used - in naming the remote file after being altered by any nnttrraannss - or nnmmaapp setting. File transfer uses the current settings for - ttyyppee, ffoorrmmaatt, mmooddee, and ssttrruuccttuurree. - - aasscciiii Set the file transfer ttyyppee to network ASCII. This is the - default type. - - bbeellll Arrange that a bell be sounded after each file transfer com- - mand is completed. - - bbiinnaarryy Set the file transfer ttyyppee to support binary image transfer. - - bbyyee Terminate the FTP session with the remote server and exit - ffttpp. An end of file will also terminate the session and - exit. - - ccaassee Toggle remote computer file name case mapping during mmggeett - commands. When ccaassee 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. - - ccdd _r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y - Change the working directory on the remote machine to - _r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y. - - ccdduupp Change the remote machine working directory to the parent of - the current remote machine working directory. - - cchhmmoodd _m_o_d_e _f_i_l_e_-_n_a_m_e - Change the permission modes of the file _f_i_l_e_-_n_a_m_e on the - remote sytem to _m_o_d_e. - - cclloossee Terminate the FTP session with the remote server, and return - to the command interpreter. Any defined macros are erased. - - ccrr Toggle carriage return stripping during ascii type file - retrieval. Records are denoted by a carriage return/linefeed - sequence during ascii type file transfer. When ccrr is on (the - default), carriage returns are stripped from this sequence to - conform with the UNIX single linefeed record delimiter. - Records on non-UNIX remote systems may contain single line- - feeds; when an ascii type transfer is made, these linefeeds - may be distinguished from a record delimiter only when ccrr is - off. - - ddeelleettee _r_e_m_o_t_e_-_f_i_l_e - Delete the file _r_e_m_o_t_e_-_f_i_l_e on the remote machine. - - ddeebbuugg [_d_e_b_u_g_-_v_a_l_u_e] - Toggle debugging mode. If an optional _d_e_b_u_g_-_v_a_l_u_e is speci- - fied it is used to set the debugging level. When debugging - is on, ffttpp prints each command sent to the remote machine, - preceded by the string `-->' - - ddiirr [_r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y] [_l_o_c_a_l_-_f_i_l_e] - Print a listing of the directory contents in the directory, - _r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y, and, optionally, placing the output in - _l_o_c_a_l_-_f_i_l_e. If interactive prompting is on, ffttpp will prompt - the user to verify that the last argument is indeed the tar- - get local file for receiving ddiirr output. If no directory is - specified, the current working directory on the remote - machine is used. If no local file is specified, or - _l_o_c_a_l_-_f_i_l_e is --, output comes to the terminal. - - ddiissccoonnnneecctt A synonym for _c_l_o_s_e. - - ffoorrmm _f_o_r_m_a_t - Set the file transfer ffoorrmm to _f_o_r_m_a_t. The default format is - ``file''. - - ggeett _r_e_m_o_t_e_-_f_i_l_e [_l_o_c_a_l_-_f_i_l_e] - Retrieve the _r_e_m_o_t_e_-_f_i_l_e 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 ccaassee, nnttrraannss, and nnmmaapp settings. The current - settings for ttyyppee, ffoorrmm, mmooddee, and ssttrruuccttuurree are used while - transferring the file. - - gglloobb Toggle filename expansion for mmddeelleettee, mmggeett and mmppuutt. If - globbing is turned off with gglloobb, the file name arguments are - taken literally and not expanded. Globbing for mmppuutt is done - as in csh(1). For mmddeelleettee and mmggeett, 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 `mls remote-files -'. - As a security measure, remotely globbed files that starts - with `/' or contains `../', will not be automatically - received. If you have interactive prompting turned off, these - filenames will be ignored. Note: mmggeett and mmppuutt are not meant - to transfer entire directory subtrees of files. That can be - done by transferring a tar(1) archive of the subtree (in - binary mode). - - hhaasshh Toggle hash-sign (``#'') printing for each data block trans- - ferred. The size of a data block is 1024 bytes. - - hheellpp [_c_o_m_m_a_n_d] - Print an informative message about the meaning of _c_o_m_m_a_n_d. - If no argument is given, ffttpp prints a list of the known com- - mands. - - iiddllee [_s_e_c_o_n_d_s] - Set the inactivity timer on the remote server to _s_e_c_o_n_d_s sec- - onds. If _s_e_c_o_n_d_s is omitted, the current inactivity timer is - printed. - - llccdd [_d_i_r_e_c_t_o_r_y] - Change the working directory on the local machine. If no - _d_i_r_e_c_t_o_r_y is specified, the user's home directory is used. - - llss [_r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y] [_l_o_c_a_l_-_f_i_l_e] - Print a listing of the contents of a directory on the remote - machine. The listing includes any system-dependent informa- - tion that the server chooses to include; for example, most - UNIX systems will produce output from the command `ls -l'. - (See also nnlliisstt.) If _r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y is left unspecified, - the current working directory is used. If interactive - prompting is on, ffttpp will prompt the user to verify that the - last argument is indeed the target local file for receiving - llss output. If no local file is specified, or if _l_o_c_a_l_-_f_i_l_e - is `--', the output is sent to the terminal. - - mmaaccddeeff _m_a_c_r_o_-_n_a_m_e - Define a macro. Subsequent lines are stored as the macro - _m_a_c_r_o_-_n_a_m_e; 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 cclloossee command is executed. The macro processor - interprets `$' and `\' as special characters. A `$' followed - by a number (or numbers) is replaced by the corresponding - argument on the macro invocation command line. A `$' fol- - lowed by an `i' signals that macro processor that the execut- - ing macro is to be looped. On the first pass `$i' is - replaced by the first argument on the macro invocation com- - mand line, on the second pass it is replaced by the second - argument, and so on. A `\' followed by any character is - replaced by that character. Use the `\' to prevent special - treatment of the `$'. - - mmddeelleettee [_r_e_m_o_t_e_-_f_i_l_e_s] - Delete the _r_e_m_o_t_e_-_f_i_l_e_s on the remote machine. - - mmddiirr _r_e_m_o_t_e_-_f_i_l_e_s _l_o_c_a_l_-_f_i_l_e - Like ddiirr, except multiple remote files may be specified. If - interactive prompting is on, ffttpp will prompt the user to ver- - ify that the last argument is indeed the target local file - for receiving mmddiirr output. - - mmggeett _r_e_m_o_t_e_-_f_i_l_e_s - Expand the _r_e_m_o_t_e_-_f_i_l_e_s on the remote machine and do a ggeett - for each file name thus produced. See gglloobb for details on - the filename expansion. Resulting file names will then be - processed according to ccaassee, nnttrraannss, and nnmmaapp settings. - Files are transferred into the local working directory, which - can be changed with `lcd directory'; new local directories - can be created with `! mkdir directory'. - - mmkkddiirr _d_i_r_e_c_t_o_r_y_-_n_a_m_e - Make a directory on the remote machine. - - mmllss _r_e_m_o_t_e_-_f_i_l_e_s _l_o_c_a_l_-_f_i_l_e - Like nnlliisstt, except multiple remote files may be specified, - and the _l_o_c_a_l_-_f_i_l_e must be specified. If interactive prompt- - ing is on, ffttpp will prompt the user to verify that the last - argument is indeed the target local file for receiving mmllss - output. - - mmooddee [_m_o_d_e_-_n_a_m_e] - Set the file transfer mmooddee to _m_o_d_e_-_n_a_m_e. The default mode is - ``stream'' mode. - - mmooddttiimmee _f_i_l_e_-_n_a_m_e - Show the last modification time of the file on the remote - machine. - - mmppuutt _l_o_c_a_l_-_f_i_l_e_s - Expand wild cards in the list of local files given as argu- - ments and do a ppuutt for each file in the resulting list. See - gglloobb for details of filename expansion. Resulting file names - will then be processed according to nnttrraannss and nnmmaapp settings. - - nneewweerr _f_i_l_e_-_n_a_m_e - 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 nneewweerr. Otherwise, this command is identical to - _g_e_t. - - nnlliisstt [_r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y] [_l_o_c_a_l_-_f_i_l_e] - Print a list of the files in a directory on the remote - machine. If _r_e_m_o_t_e_-_d_i_r_e_c_t_o_r_y is left unspecified, the cur- - rent working directory is used. If interactive prompting is - on, ffttpp will prompt the user to verify that the last argument - is indeed the target local file for receiving nnlliisstt output. - If no local file is specified, or if _l_o_c_a_l_-_f_i_l_e is --, the - output is sent to the terminal. - - nnmmaapp [_i_n_p_a_t_t_e_r_n _o_u_t_p_a_t_t_e_r_n] - 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 - mmppuutt commands and ppuutt commands issued without a specified - remote target filename. If arguments are specified, local - filenames are mapped during mmggeett commands and ggeett commands - issued without a specified local target filename. This com- - mand is useful when connecting to a non-UNIX remote computer - with different file naming conventions or practices. The - mapping follows the pattern set by _i_n_p_a_t_t_e_r_n and _o_u_t_p_a_t_t_e_r_n. - [_I_n_p_a_t_t_e_r_n] is a template for incoming filenames (which may - have already been processed according to the nnttrraannss and ccaassee - settings). Variable templating is accomplished by including - the sequences `$1', `$2', ..., `$9' in _i_n_p_a_t_t_e_r_n. Use `\' to - prevent this special treatment of the `$' character. All - other characters are treated literally, and are used to - determine the nnmmaapp [_i_n_p_a_t_t_e_r_n] variable values. For example, - given _i_n_p_a_t_t_e_r_n $1.$2 and the remote file name "mydata.data", - $1 would have the value "mydata", and $2 would have the value - "data". The _o_u_t_p_a_t_t_e_r_n determines the resulting mapped file- - name. The sequences `$1', `$2', ...., `$9' are replaced by - any value resulting from the _i_n_p_a_t_t_e_r_n template. The - sequence `$0' is replace by the original filename. Addition- - ally, the sequence `[_s_e_q_1, _s_e_q_2]' is replaced by [_s_e_q_1] if - _s_e_q_1 is not a null string; otherwise it is replaced by _s_e_q_2. - For example, the command - - nmap $1.$2.$3 [$1,$2].[$2,file] - - would yield the output filename "myfile.data" for input file- - names "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 - _o_u_t_p_a_t_t_e_r_n, as in the example: `nmap $1 sed "s/ *$//" > $1' - . Use the `\' character to prevent special treatment of the - `$','[','[', and `,' characters. - - nnttrraannss [_i_n_c_h_a_r_s [_o_u_t_c_h_a_r_s]] - Set or unset the filename character translation mechanism. - If no arguments are specified, the filename character trans- - lation mechanism is unset. If arguments are specified, char- - acters in remote filenames are translated during mmppuutt com- - mands and ppuutt commands issued without a specified remote tar- - get filename. If arguments are specified, characters in - local filenames are translated during mmggeett commands and ggeett - commands issued without a specified local target filename. - This command is useful when connecting to a non-UNIX remote - computer with different file naming conventions or practices. - Characters in a filename matching a character in _i_n_c_h_a_r_s are - replaced with the corresponding character in _o_u_t_c_h_a_r_s. If - the character's position in _i_n_c_h_a_r_s is longer than the length - of _o_u_t_c_h_a_r_s, the character is deleted from the file name. - - ooppeenn _h_o_s_t [_p_o_r_t] - Establish a connection to the specified _h_o_s_t FTP server. An - optional port number may be supplied, in which case, ffttpp will - attempt to contact an FTP server at that port. If the - aauuttoo--llooggiinn option is on (default), ffttpp will also attempt to - automatically log the user in to the FTP server (see below). - - ppaassssiivvee Toggle passive mode. If passive mode is turned on (default - is off), the ftp client will send a PASV command for all data - connections instead of the usual PORT command. The PASV com- - mand 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 PORT command, the client lis- - tens on a port and sends that address to the remote server, - who connects back to it. Passive mode is useful when using - ffttpp through a gateway router or host that controls the direc- - tionality of traffic. (Note that though ftp servers are - required to support the PASV command by RFC 1123, some do - not.) - - pprroommpptt Toggle interactive prompting. Interactive prompting occurs - during multiple file transfers to allow the user to selec- - tively retrieve or store files. If prompting is turned off - (default is on), any mmggeett or mmppuutt will transfer all files, - and any mmddeelleettee will delete all files. - - pprrooxxyy _f_t_p_-_c_o_m_m_a_n_d - 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 pprrooxxyy command should be an ooppeenn, to establish the sec- - ondary control connection. Enter the command "proxy ?" to - see other ftp commands executable on the secondary connec- - tion. The following commands behave differently when pref- - aced by pprrooxxyy: ooppeenn will not define new macros during the - auto-login process, cclloossee will not erase existing macro defi- - nitions, ggeett and mmggeett transfer files from the host on the - primary control connection to the host on the secondary con- - trol connection, and ppuutt, mmppuutt, and aappppeenndd transfer files - from the host on the secondary control connection to the host - on the primary control connection. Third party file trans- - fers depend upon support of the ftp protocol PASV command by - the server on the secondary control connection. - - ppuutt _l_o_c_a_l_-_f_i_l_e [_r_e_m_o_t_e_-_f_i_l_e] - Store a local file on the remote machine. If _r_e_m_o_t_e_-_f_i_l_e is - left unspecified, the local file name is used after process- - ing according to any nnttrraannss or nnmmaapp settings in naming the - remote file. File transfer uses the current settings for - ttyyppee, ffoorrmmaatt, mmooddee, and ssttrruuccttuurree. - - ppwwdd Print the name of the current working directory on the remote - machine. - - qquuiitt A synonym for bbyyee. - - qquuoottee _a_r_g_1 _a_r_g_2 _._._. - The arguments specified are sent, verbatim, to the remote FTP - server. - - rreeccvv _r_e_m_o_t_e_-_f_i_l_e [_l_o_c_a_l_-_f_i_l_e] - A synonym for get. - - rreeggeett _r_e_m_o_t_e_-_f_i_l_e [_l_o_c_a_l_-_f_i_l_e] - Reget acts like get, except that if _l_o_c_a_l_-_f_i_l_e exists and is - smaller than _r_e_m_o_t_e_-_f_i_l_e, _l_o_c_a_l_-_f_i_l_e is presumed to be a par- - tially transferred copy of _r_e_m_o_t_e_-_f_i_l_e 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. - - rreemmootteehheellpp [_c_o_m_m_a_n_d_-_n_a_m_e] - Request help from the remote FTP server. If a _c_o_m_m_a_n_d_-_n_a_m_e - is specified it is supplied to the server as well. - - rreemmootteessttaattuuss [_f_i_l_e_-_n_a_m_e] - With no arguments, show status of remote machine. If - _f_i_l_e_-_n_a_m_e is specified, show status of _f_i_l_e_-_n_a_m_e on remote - machine. - - rreennaammee [_f_r_o_m] [_t_o] - Rename the file _f_r_o_m on the remote machine, to the file _t_o. - - rreesseett Clear reply queue. This command re-synchronizes com- - mand/reply sequencing with the remote ftp server. Resynchro- - nization may be necessary following a violation of the ftp - protocol by the remote server. - - rreessttaarrtt _m_a_r_k_e_r - Restart the immediately following ggeett or ppuutt at the indicated - _m_a_r_k_e_r. On UNIX systems, marker is usually a byte offset - into the file. - - rrmmddiirr _d_i_r_e_c_t_o_r_y_-_n_a_m_e - Delete a directory on the remote machine. - - rruunniiqquuee Toggle storing of files on the local system with unique file- - names. If a file already exists with a name equal to the - target local filename for a ggeett or mmggeett 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 rruunniiqquuee will not - affect local files generated from a shell command (see - below). The default value is off. - - sseenndd _l_o_c_a_l_-_f_i_l_e [_r_e_m_o_t_e_-_f_i_l_e] - A synonym for put. - - sseennddppoorrtt Toggle the use of PORT commands. By default, ffttpp will - attempt to use a PORT command when establishing a connection - for each data transfer. The use of PORT commands can prevent - delays when performing multiple file transfers. If the PORT - command fails, ffttpp will use the default data port. When the - use of PORT commands is disabled, no attempt will be made to - use PORT commands for each data transfer. This is useful for - certain FTP implementations which do ignore PORT commands - but, incorrectly, indicate they've been accepted. - - ssiittee _a_r_g_1 _a_r_g_2 _._._. - The arguments specified are sent, verbatim, to the remote FTP - server as a SITE command. - - ssiizzee _f_i_l_e_-_n_a_m_e - Return size of _f_i_l_e_-_n_a_m_e on remote machine. - - ssttaattuuss Show the current status of ffttpp. - - ssttrruucctt [_s_t_r_u_c_t_-_n_a_m_e] - Set the file transfer _s_t_r_u_c_t_u_r_e to _s_t_r_u_c_t_-_n_a_m_e. By default - ``stream'' structure is used. - - ssuunniiqquuee Toggle storing of files on remote machine under unique file - names. Remote ftp server must support ftp protocol STOU com- - mand for successful completion. The remote server will - report unique name. Default value is off. - - ssyysstteemm Show the type of operating system running on the remote - machine. - - tteenneexx Set the file transfer type to that needed to talk to TENEX - machines. - - ttrraaccee Toggle packet tracing. - - ttyyppee [_t_y_p_e_-_n_a_m_e] - Set the file transfer ttyyppee to _t_y_p_e_-_n_a_m_e. If no type is spec- - ified, the current type is printed. The default type is net- - work ASCII. - - uummaasskk [_n_e_w_m_a_s_k] - Set the default umask on the remote server to _n_e_w_m_a_s_k. If - _n_e_w_m_a_s_k is omitted, the current umask is printed. - - uusseerr _u_s_e_r_-_n_a_m_e [_p_a_s_s_w_o_r_d] [_a_c_c_o_u_n_t] - Identify yourself to the remote FTP server. If the _p_a_s_s_w_o_r_d - is not specified and the server requires it, ffttpp will prompt - the user for it (after disabling local echo). If an _a_c_c_o_u_n_t - field is not specified, and the FTP server requires it, the - user will be prompted for it. If an _a_c_c_o_u_n_t field is speci- - fied, 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 ffttpp is invoked - with ``auto-login'' disabled, this process is done automati- - cally on initial connection to the FTP server. - - vveerrbboossee Toggle verbose mode. In verbose mode, all responses from the - FTP server are displayed to the user. In addition, if ver- - bose is on, when a file transfer completes, statistics - regarding the efficiency of the transfer are reported. By - default, verbose is on. - - ?? [_c_o_m_m_a_n_d] - A synonym for help. - - The following command can be used with ftpsec-aware servers. - - pprroott _c_l_e_a_r | _s_a_f_e | _c_o_n_f_i_d_e_n_t_i_a_l | _p_r_i_v_a_t_e - Set the data protection level to the requested level. - - The following command can be used with ftp servers that has implemented - the KAUTH site command. - - kkaauutthh [_p_r_i_n_c_i_p_a_l] - Obtain remote tickets. - - Command arguments which have embedded spaces may be quoted with quote `"' - marks. - -AABBOORRTTIINNGG AA FFIILLEE TTRRAANNSSFFEERR - 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 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 ABOR - processing. If the remote server does not support the ABOR command, an - `ftp>' prompt will not appear until the remote server has completed send- - ing the requested file. - - The terminal interrupt key sequence will be ignored when ffttpp has com- - pleted 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 ffttpp program must be killed - by hand. - -FFIILLEE NNAAMMIINNGG CCOONNVVEENNTTIIOONNSS - Files specified as arguments to ffttpp commands are processed according to - the following rules. - - 1. If the file name `--' is specified, the _s_t_d_i_n (for reading) or _s_t_d_o_u_t - (for writing) is used. - - 2. If the first character of the file name is `|', the remainder of the - argument is interpreted as a shell command. FFttpp then forks a shell, - using popen(3) with the argument supplied, and reads (writes) from - the stdout (stdin). If the shell command includes spaces, the argu- - ment must be quoted; e.g. ``" ls -lt"''. A particularly useful - example of this mechanism is: ``dir more''. - - 3. Failing the above checks, if ``globbing'' is enabled, local file - names are expanded according to the rules used in the csh(1); c.f. - the gglloobb command. If the ffttpp command expects a single local file - (.e.g. ppuutt), only the first filename generated by the "globbing" - operation is used. - - 4. For mmggeett commands and ggeett commands with unspecified local file - names, the local filename is the remote filename, which may be - altered by a ccaassee, nnttrraannss, or nnmmaapp setting. The resulting filename - may then be altered if rruunniiqquuee is on. - - 5. For mmppuutt commands and ppuutt commands with unspecified remote file - names, the remote filename is the local filename, which may be - altered by a nnttrraannss or nnmmaapp setting. The resulting filename may - then be altered by the remote server if ssuunniiqquuee is on. - -FFIILLEE TTRRAANNSSFFEERR PPAARRAAMMEETTEERRSS - The FTP specification specifies many parameters which may affect a file - transfer. The ttyyppee may be one of ``ascii'', ``image'' (binary), - ``ebcdic'', and ``local byte size'' (for PDP-10's and PDP-20's mostly). - FFttpp supports the ascii and image types of file transfer, plus local byte - size 8 for tteenneexx mode transfers. - - FFttpp supports only the default values for the remaining file transfer - parameters: mmooddee, ffoorrmm, and ssttrruucctt. - -TTHHEE ..nneettrrcc FFIILLEE - The _._n_e_t_r_c file contains login and initialization information used by the - auto-login process. It resides in the user's home directory. The fol- - lowing tokens are recognized; they may be separated by spaces, tabs, or - new-lines: - - mmaacchhiinnee _n_a_m_e - Identify a remote machine _n_a_m_e. The auto-login process - searches the _._n_e_t_r_c file for a mmaacchhiinnee token that matches the - remote machine specified on the ffttpp command line or as an ooppeenn - command argument. Once a match is made, the subsequent _._n_e_t_r_c - tokens are processed, stopping when the end of file is reached - or another mmaacchhiinnee or a ddeeffaauulltt token is encountered. - - ddeeffaauulltt This is the same as mmaacchhiinnee _n_a_m_e except that ddeeffaauulltt matches - any name. There can be only one ddeeffaauulltt token, and it must be - after all mmaacchhiinnee tokens. This is normally used as: - - default login anonymous password user@site - - thereby giving the user _a_u_t_o_m_a_t_i_c anonymous ftp login to - machines not specified in _._n_e_t_r_c. This can be overridden by - using the --nn flag to disable auto-login. - - llooggiinn _n_a_m_e - Identify a user on the remote machine. If this token is - present, the auto-login process will initiate a login using the - specified _n_a_m_e. - - ppaasssswwoorrdd _s_t_r_i_n_g - 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 _._n_e_t_r_c file for any user other - than _a_n_o_n_y_m_o_u_s, ffttpp will abort the auto-login process if the - _._n_e_t_r_c is readable by anyone besides the user. - - aaccccoouunntt _s_t_r_i_n_g - 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 ACCT com- - mand if it does not. - - mmaaccddeeff _n_a_m_e - Define a macro. This token functions like the ffttpp mmaaccddeeff com- - mand functions. A macro is defined with the specified name; - its contents begin with the next _._n_e_t_r_c line and continue until - a null line (consecutive new-line characters) is encountered. - If a macro named iinniitt is defined, it is automatically executed - as the last step in the auto-login process. - -EENNVVIIRROONNMMEENNTT - FFttpp uses the following environment variables. - - HOME For default location of a _._n_e_t_r_c file, if one exists. - - SHELL For default shell. - -SSEEEE AALLSSOO - ftpd(8) - - _R_F_C_2_2_2_8. - -HHIISSTTOORRYY - The ffttpp command appeared in 4.2BSD. - -BBUUGGSS - Correct execution of many commands depends upon proper behavior by the - remote server. - - An error in the treatment of carriage returns in the 4.2BSD ascii-mode - transfer code has been corrected. This correction may result in incor- - rect transfers of binary files to and from 4.2BSD servers using the ascii - type. Avoid this problem by using the binary image type. - -4.2 Berkeley Distribution March 23, 2006 4.2 Berkeley Distribution diff --git a/kerberosV/src/appl/ftp/ftp/ftp_locl.h b/kerberosV/src/appl/ftp/ftp/ftp_locl.h deleted file mode 100644 index 24b127dea3c..00000000000 --- a/kerberosV/src/appl/ftp/ftp/ftp_locl.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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: ftp_locl.h,v 1.5 2013/06/17 19:11:35 robert Exp $ */ - -#ifndef __FTP_LOCL_H__ -#define __FTP_LOCL_H__ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#ifdef HAVE_PWD_H -#include -#endif -#include -#include -#include -#include -#include -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN_SYSTM_H -#include -#endif -#ifdef HAVE_NETINET_IP_H -#include -#endif - -#ifdef HAVE_ARPA_FTP_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_ARPA_TELNET_H -#include -#endif - -#include -#include -#include -#ifdef HAVE_NETDB_H -#include -#endif - -#ifdef HAVE_SYS_MMAN_H -#include -#endif - -#include - -#ifdef SOCKS -#include -extern int LIBPREFIX(fclose) (FILE *); - -/* This doesn't belong here. */ -struct tm *localtime(const time_t *); -struct hostent *gethostbyname(const char *); - -#endif - -#include "ftp_var.h" -#include "extern.h" -#include "common.h" -#include "pathnames.h" - -#include "roken.h" -#include "security.h" - -/* des_read_pw_string */ -#include "crypto-headers.h" - -#if defined(__sun__) && !defined(__svr4) -int fclose(FILE*); -int pclose(FILE*); -#endif - -#endif /* __FTP_LOCL_H__ */ diff --git a/kerberosV/src/appl/ftp/ftp/ftp_var.h b/kerberosV/src/appl/ftp/ftp/ftp_var.h deleted file mode 100644 index 75ec495b76e..00000000000 --- a/kerberosV/src/appl/ftp/ftp/ftp_var.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 1985, 1989, 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. - * - * @(#)ftp_var.h 8.4 (Berkeley) 10/9/94 - */ - -/* - * FTP global variables. - */ - -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#include - -/* - * Options and other state info. - */ -extern int trace; /* trace packets exchanged */ -extern int hash; /* print # for each buffer transferred */ -extern int sendport; /* use PORT cmd for each data connection */ -extern int verbose; /* print messages coming back from server */ -extern int connected; /* connected to server */ -extern int fromatty; /* input is from a terminal */ -extern int interactive; /* interactively prompt on m* cmds */ -extern int lineedit; /* use line-editing */ -extern int debug; /* debugging level */ -extern int bell; /* ring bell on cmd completion */ -extern int doglob; /* glob local file names */ -extern int autologin; /* establish user account on connection */ -extern int doencrypt; -extern int proxy; /* proxy server connection active */ -extern int proxflag; /* proxy connection exists */ -extern int sunique; /* store files on server with unique name */ -extern int runique; /* store local files with unique name */ -extern int mcase; /* map upper to lower case for mget names */ -extern int ntflag; /* use ntin ntout tables for name translation */ -extern int mapflag; /* use mapin mapout templates on file names */ -extern int code; /* return/reply code for ftp command */ -extern int crflag; /* if 1, strip car. rets. on ascii gets */ -extern char pasv[64]; /* passive port for proxy data connection */ -extern int passivemode; /* passive mode enabled */ -extern char *altarg; /* argv[1] with no shell-like preprocessing */ -extern char ntin[17]; /* input translation table */ -extern char ntout[17]; /* output translation table */ -extern char mapin[MaxPathLen]; /* input map template */ -extern char mapout[MaxPathLen]; /* output map template */ -extern char typename[32]; /* name of file transfer type */ -extern int type; /* requested file transfer type */ -extern int curtype; /* current file transfer type */ -extern char structname[32]; /* name of file transfer structure */ -extern int stru; /* file transfer structure */ -extern char formname[32]; /* name of file transfer format */ -extern int form; /* file transfer format */ -extern char modename[32]; /* name of file transfer mode */ -extern int mode; /* file transfer mode */ -extern char bytename[32]; /* local byte size in ascii */ -extern int bytesize; /* local byte size in binary */ - -extern char *hostname; /* name of host connected to */ -extern int unix_server; /* server is unix, can use binary for ascii */ -extern int unix_proxy; /* proxy is unix, can use binary for ascii */ - -extern jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ - -extern char line[200]; /* input line buffer */ -extern char *stringbase; /* current scan point in line buffer */ -extern char argbuf[200]; /* argument storage buffer */ -extern char *argbase; /* current storage point in arg buffer */ -extern int margc; /* count of arguments on input line */ -extern char **margv; /* args parsed from input line */ -extern int margvlen; /* how large margv is currently */ -extern int cpend; /* flag: if != 0, then pending server reply */ -extern int mflag; /* flag: if != 0, then active multi command */ - -extern int options; /* used during socket creation */ -extern int use_kerberos; /* use Kerberos authentication */ - -/* - * Format of command table. - */ -struct cmd { - char *c_name; /* name of command */ - char *c_help; /* help string */ - char c_bell; /* give bell when command completes */ - char c_conn; /* must be connected to use command */ - char c_proxy; /* proxy server may execute */ - void (*c_handler) (int, char **); /* function to call */ -}; - -struct macel { - char mac_name[9]; /* macro name */ - char *mac_start; /* start of macro in macbuf */ - char *mac_end; /* end of macro in macbuf */ -}; - -extern int macnum; /* number of defined macros */ -extern struct macel macros[16]; -extern char macbuf[4096]; - - diff --git a/kerberosV/src/appl/ftp/ftp/globals.c b/kerberosV/src/appl/ftp/ftp/globals.c deleted file mode 100644 index 5994ebbd703..00000000000 --- a/kerberosV/src/appl/ftp/ftp/globals.c +++ /dev/null @@ -1,79 +0,0 @@ -#include "ftp_locl.h" -RCSID("$Id: globals.c,v 1.3 2013/06/17 19:11:35 robert Exp $"); - -/* - * Options and other state info. - */ -int trace; /* trace packets exchanged */ -int hash; /* print # for each buffer transferred */ -int sendport; /* use PORT cmd for each data connection */ -int verbose; /* print messages coming back from server */ -int connected; /* connected to server */ -int fromatty; /* input is from a terminal */ -int interactive; /* interactively prompt on m* cmds */ -int lineedit; /* use line-editing */ -int debug; /* debugging level */ -int bell; /* ring bell on cmd completion */ -int doglob; /* glob local file names */ -int doencrypt; /* try to use encryption */ -int autologin; /* establish user account on connection */ -int proxy; /* proxy server connection active */ -int proxflag; /* proxy connection exists */ -int sunique; /* store files on server with unique name */ -int runique; /* store local files with unique name */ -int mcase; /* map upper to lower case for mget names */ -int ntflag; /* use ntin ntout tables for name translation */ -int mapflag; /* use mapin mapout templates on file names */ -int code; /* return/reply code for ftp command */ -int crflag; /* if 1, strip car. rets. on ascii gets */ -char pasv[64]; /* passive port for proxy data connection */ -int passivemode; /* passive mode enabled */ -char *altarg; /* argv[1] with no shell-like preprocessing */ -char ntin[17]; /* input translation table */ -char ntout[17]; /* output translation table */ -char mapin[MaxPathLen]; /* input map template */ -char mapout[MaxPathLen]; /* output map template */ -char typename[32]; /* name of file transfer type */ -int type; /* requested file transfer type */ -int curtype; /* current file transfer type */ -char structname[32]; /* name of file transfer structure */ -int stru; /* file transfer structure */ -char formname[32]; /* name of file transfer format */ -int form; /* file transfer format */ -char modename[32]; /* name of file transfer mode */ -int mode; /* file transfer mode */ -char bytename[32]; /* local byte size in ascii */ -int bytesize; /* local byte size in binary */ - -char *hostname; /* name of host connected to */ -int unix_server; /* server is unix, can use binary for ascii */ -int unix_proxy; /* proxy is unix, can use binary for ascii */ - -jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ - -char line[200]; /* input line buffer */ -char *stringbase; /* current scan point in line buffer */ -char argbuf[200]; /* argument storage buffer */ -char *argbase; /* current storage point in arg buffer */ -int margc; /* count of arguments on input line */ -char **margv; /* args parsed from input line */ -int margvlen; /* how large margv is currently */ -int cpend; /* flag: if != 0, then pending server reply */ -int mflag; /* flag: if != 0, then active multi command */ - -int options; /* used during socket creation */ -int use_kerberos; /* use Kerberos authentication */ - -/* - * Format of command table. - */ - -int macnum; /* number of defined macros */ -struct macel macros[16]; -char macbuf[4096]; - -char username[32]; - -/* these are set in ruserpassword */ -char myhostname[MaxHostNameLen]; -char *mydomain; diff --git a/kerberosV/src/appl/ftp/ftp/gssapi.c b/kerberosV/src/appl/ftp/ftp/gssapi.c deleted file mode 100644 index 4cdf22d1854..00000000000 --- a/kerberosV/src/appl/ftp/ftp/gssapi.c +++ /dev/null @@ -1,511 +0,0 @@ -/* - * Copyright (c) 1998 - 2005 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 -#include -#include - -RCSID("$Id: gssapi.c,v 1.3 2013/06/17 19:11:35 robert Exp $"); - -int ftp_do_gss_bindings = 0; -int ftp_do_gss_delegate = 1; - -struct gssapi_data { - gss_ctx_id_t context_hdl; - gss_name_t client_name; - gss_cred_id_t delegated_cred_handle; - void *mech_data; -}; - -static int -gss_init(void *app_data) -{ - struct gssapi_data *d = app_data; - d->context_hdl = GSS_C_NO_CONTEXT; - d->delegated_cred_handle = GSS_C_NO_CREDENTIAL; -#if defined(FTP_SERVER) - return 0; -#else - /* XXX Check the gss mechanism; with gss_indicate_mechs() ? */ -#ifdef KRB5 - return !use_kerberos; -#else - return 0; -#endif /* KRB5 */ -#endif /* FTP_SERVER */ -} - -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 gssapi_data *d = app_data; - size_t ret_len; - - 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); - ret_len = output.length; - gss_release_buffer(&min_stat, &output); - return ret_len; -} - -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 gssapi_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 (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 *sin4 = (struct sockaddr_in *)sa; - - gss_addr->length = 4; - gss_addr->value = &sin4->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 gssapi_data *d = app_data; - gss_channel_bindings_t bindings; - - if (ftp_do_gss_bindings) { - bindings = malloc(sizeof(*bindings)); - if (bindings == NULL) - errx(1, "out of memory"); - - 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; - } else - bindings = GSS_C_NO_CHANNEL_BINDINGS; - - 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, - &d->delegated_cred_handle); - - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - - if(output_token.length) { - if(base64_encode(output_token.value, output_token.length, &p) < 0) { - reply(535, "Out of memory base64-encoding."); - return -1; - } - gss_release_buffer(&min_stat, &output_token); - } - if(maj_stat == GSS_S_COMPLETE){ - d->client_name = client_name; - client_name = GSS_C_NO_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 { - 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); - syslog(LOG_ERR, "gss_accept_sec_context: %.*s", - (int)status_string.length, - (char*)status_string.value); - gss_release_buffer(&new_stat, &status_string); - reply(431, "Security resource unavailable"); - } - - if (client_name) - gss_release_name(&min_stat, &client_name); - free(p); - return 0; -} - -int gssapi_userok(void*, char*); -int gssapi_session(void*, char*); - -struct sec_server_mech gss_server_mech = { - "GSSAPI", - sizeof(struct gssapi_data), - gss_init, /* init */ - NULL, /* end */ - gss_check_prot, - gss_overhead, - gss_encode, - gss_decode, - /* */ - NULL, - gss_adat, - NULL, /* pbsz */ - NULL, /* ccc */ - gssapi_userok, - gssapi_session -}; - -#else /* FTP_SERVER */ - -extern struct sockaddr *hisctladdr, *myctladdr; - -static int -import_name(const char *kname, const char *host, gss_name_t *target_name) -{ - OM_uint32 maj_stat, min_stat; - gss_buffer_desc name; - char *str; - - name.length = asprintf(&str, "%s@%s", kname, host); - if (str == NULL) { - printf("Out of memory\n"); - return AUTH_ERROR; - } - name.value = str; - - 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", - (int)name.length, - (char *)name.value, - (int)status_string.length, - (char *)status_string.value); - free(name.value); - gss_release_buffer(&new_stat, &status_string); - return AUTH_ERROR; - } - free(name.value); - return 0; -} - -static int -gss_auth(void *app_data, char *host) -{ - - OM_uint32 maj_stat, min_stat; - 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 gssapi_data *d = app_data; - OM_uint32 mech_flags = GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG; - - const char *knames[] = { "ftp", "host", NULL }, **kname = knames; - - - if(import_name(*kname++, host, &target_name)) - return AUTH_ERROR; - - input.length = 0; - input.value = NULL; - - if (ftp_do_gss_bindings) { - bindings = malloc(sizeof(*bindings)); - if (bindings == NULL) - errx(1, "out of memory"); - - 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; - } else - bindings = GSS_C_NO_CHANNEL_BINDINGS; - - if (ftp_do_gss_delegate) - mech_flags |= GSS_C_DELEG_FLAG; - - while(!context_established) { - maj_stat = gss_init_sec_context(&min_stat, - GSS_C_NO_CREDENTIAL, - &d->context_hdl, - target_name, - GSS_C_NO_OID, - mech_flags, - 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; - - d->context_hdl = GSS_C_NO_CONTEXT; - - gss_release_name(&min_stat, &target_name); - - if(*kname != NULL) { - - if(import_name(*kname++, host, &target_name)) { - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - return AUTH_ERROR; - } - continue; - } - - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - - 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", - (int)status_string.length, - (char*)status_string.value); - gss_release_buffer(&new_stat, &status_string); - return AUTH_CONTINUE; - } - - if (input.value) { - free(input.value); - input.value = NULL; - input.length = 0; - } - 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. got: %s\n", - reply_string); - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - 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); - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - return AUTH_ERROR; - } - context_established = 1; - } - } - - gss_release_name(&min_stat, &target_name); - - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - if (input.value) - free(input.value); - - { - gss_name_t targ_name; - - maj_stat = gss_inquire_context(&min_stat, - d->context_hdl, - NULL, - &targ_name, - NULL, - NULL, - NULL, - NULL, - NULL); - if (GSS_ERROR(maj_stat) == 0) { - gss_buffer_desc name; - maj_stat = gss_display_name (&min_stat, - targ_name, - &name, - NULL); - if (GSS_ERROR(maj_stat) == 0) { - printf("Authenticated to <%.*s>\n", - (int)name.length, - (char *)name.value); - gss_release_buffer(&min_stat, &name); - } - gss_release_name(&min_stat, &targ_name); - } else - printf("Failed to get gss name of peer.\n"); - } - - - return AUTH_OK; -} - -struct sec_client_mech gss_client_mech = { - "GSSAPI", - sizeof(struct gssapi_data), - gss_init, - gss_auth, - NULL, /* end */ - gss_check_prot, - gss_overhead, - gss_encode, - gss_decode, -}; - -#endif /* FTP_SERVER */ diff --git a/kerberosV/src/appl/ftp/ftp/kauth.c b/kerberosV/src/appl/ftp/ftp/kauth.c deleted file mode 100644 index 7b9df907af7..00000000000 --- a/kerberosV/src/appl/ftp/ftp/kauth.c +++ /dev/null @@ -1,57 +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 "ftp_locl.h" -RCSID("$Id: kauth.c,v 1.3 2013/06/17 19:11:35 robert Exp $"); - -#if defined(KRB5) - -void -afslog(int argc, char **argv) -{ - int ret; - if(argc > 2) { - printf("usage: %s [cell]\n", argv[0]); - code = -1; - return; - } - if(argc == 2) - ret = command("SITE AFSLOG %s", argv[1]); - else - ret = command("SITE AFSLOG"); - code = (ret == COMPLETE); -} - -#else -int ftp_afslog_placeholder; -#endif diff --git a/kerberosV/src/appl/ftp/ftp/main.c b/kerberosV/src/appl/ftp/ftp/main.c deleted file mode 100644 index 5b8036b3812..00000000000 --- a/kerberosV/src/appl/ftp/ftp/main.c +++ /dev/null @@ -1,590 +0,0 @@ -/* - * Copyright (c) 1985, 1989, 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. - */ - -/* - * FTP User Program -- Command Interface. - */ - -#include "ftp_locl.h" -#include - -RCSID("$Id: main.c,v 1.5 2013/06/17 19:11:35 robert Exp $"); - -static int help_flag; -static int version_flag; -static int debug_flag; - -struct getargs getargs[] = { - { NULL, 'd', arg_flag, &debug_flag, - "debug", NULL }, - { NULL, 'g', arg_negative_flag, &doglob, - "disables globbing", NULL}, - { NULL, 'i', arg_negative_flag, &interactive, - "Turn off interactive prompting", NULL}, - { NULL, 'l', arg_negative_flag, &lineedit, - "Turn off line editing", NULL}, - { NULL, 'n', arg_negative_flag, &autologin, - "Turn off auto-login", NULL}, - { NULL, 'p', arg_flag, &passivemode, - "passive mode", NULL}, - { NULL, 't', arg_counter, &trace, - "Packet tracing", NULL}, -#ifdef KRB5 - { "gss-bindings", 0, arg_negative_flag, &ftp_do_gss_bindings, - "Don't use GSS-API bindings", NULL}, - { "gss-delegate", 0, arg_negative_flag, &ftp_do_gss_delegate, - "Disable delegation of GSS-API credentials", NULL}, -#endif - { NULL, 'v', arg_counter, &verbose, - "verbosity", NULL}, - { NULL, 'K', arg_negative_flag, &use_kerberos, - "Disable kerberos authentication", NULL}, - { "encrypt", 'x', arg_flag, &doencrypt, - "Encrypt command and data channel if possible" }, - { "version", 0, arg_flag, &version_flag }, - { "help", 'h', arg_flag, &help_flag }, -}; - -static int num_args = sizeof(getargs) / sizeof(getargs[0]); - -static void -usage(int ecode) -{ - arg_printusage(getargs, num_args, NULL, "[host [port]]"); - exit(ecode); -} - -int -main(int argc, char **argv) -{ - int top; - struct passwd *pw = NULL; - char homedir[MaxPathLen]; - struct servent *sp; - int optind = 0; - - setprogname(argv[0]); - - sp = getservbyname("ftp", "tcp"); - if (sp == 0) - errx(1, "ftp/tcp: unknown service"); - doglob = 1; - interactive = 1; - autologin = 1; - lineedit = 1; - passivemode = 0; /* passive mode not active */ - use_kerberos = 1; -#ifdef KRB5 - ftp_do_gss_bindings = 1; -#endif - - if(getarg(getargs, num_args, argc, argv, &optind)) - usage(1); - if(help_flag) - usage(0); - if(version_flag) { - print_version(NULL); - exit(0); - } - - if (debug_flag) { - options |= SO_DEBUG; - debug++; - } - - argc -= optind; - argv += optind; - - fromatty = isatty(fileno(stdin)); - if (fromatty) - verbose++; - cpend = 0; /* no pending replies */ - proxy = 0; /* proxy not active */ - crflag = 1; /* strip c.r. on ascii gets */ - sendport = -1; /* not using ports */ - /* - * Set up the home directory in case we're globbing. - */ - pw = k_getpwuid(getuid()); - if (pw != NULL) { - strlcpy(homedir, pw->pw_dir, sizeof(homedir)); - home = homedir; - } - if (argc > 0) { - char *xargv[5]; - - if (setjmp(toplevel)) - exit(0); - signal(SIGINT, intr); - signal(SIGPIPE, lostpeer); - xargv[0] = (char*)getprogname(); - xargv[1] = argv[0]; - xargv[2] = argv[1]; - xargv[3] = argv[2]; - xargv[4] = NULL; - setpeer(argc+1, xargv); - } - if(setjmp(toplevel) == 0) - top = 1; - else - top = 0; - if (top) { - signal(SIGINT, intr); - signal(SIGPIPE, lostpeer); - } - for (;;) { - cmdscanner(top); - top = 1; - } -} - -void -intr(int sig) -{ - - longjmp(toplevel, 1); -} - -#ifndef SHUT_RDWR -#define SHUT_RDWR 2 -#endif - -RETSIGTYPE -lostpeer(int sig) -{ - - if (connected) { - if (cout != NULL) { - shutdown(fileno(cout), SHUT_RDWR); - fclose(cout); - cout = NULL; - } - if (data >= 0) { - shutdown(data, SHUT_RDWR); - close(data); - data = -1; - } - connected = 0; - } - pswitch(1); - if (connected) { - if (cout != NULL) { - shutdown(fileno(cout), SHUT_RDWR); - fclose(cout); - cout = NULL; - } - connected = 0; - } - proxflag = 0; - pswitch(0); - sec_end(); - SIGRETURN(0); -} - -/* -char * -tail(filename) - char *filename; -{ - char *s; - - while (*filename) { - s = strrchr(filename, '/'); - if (s == NULL) - break; - if (s[1]) - return (s + 1); - *s = '\0'; - } - return (filename); -} -*/ - -static char * -simple_readline(char *prompt) -{ - char buf[BUFSIZ]; - printf ("%s", prompt); - fflush (stdout); - if(fgets(buf, sizeof(buf), stdin) == NULL) - return NULL; - if (buf[strlen(buf) - 1] == '\n') - buf[strlen(buf) - 1] = '\0'; - return strdup(buf); -} - -#ifndef HAVE_READLINE - -static char * -readline(char *prompt) -{ - return simple_readline (prompt); -} - -static void -add_history(char *p) -{ -} - -#else - -/* These should not really be here */ - -char *readline(char *); -void add_history(char *); - -#endif - -/* - * Command parser. - */ -void -cmdscanner(int top) -{ - struct cmd *c; - int l; - - if (!top) - putchar('\n'); - for (;;) { - if (fromatty) { - char *p; - if (lineedit) - p = readline("ftp> "); - else - p = simple_readline("ftp> "); - if(p == NULL) { - printf("\n"); - quit(0, 0); - } - strlcpy(line, p, sizeof(line)); - if (lineedit) - add_history(p); - free(p); - } else{ - if (fgets(line, sizeof line, stdin) == NULL) - quit(0, 0); - } - /* XXX will break on long lines */ - l = strlen(line); - if (l == 0) - break; - if (line[--l] == '\n') { - if (l == 0) - break; - line[l] = '\0'; - } else if (l == sizeof(line) - 2) { - printf("sorry, input line too long\n"); - while ((l = getchar()) != '\n' && l != EOF) - /* void */; - break; - } /* else it was a line without a newline */ - makeargv(); - if (margc == 0) { - continue; - } - c = getcmd(margv[0]); - if (c == (struct cmd *)-1) { - printf("?Ambiguous command\n"); - continue; - } - if (c == 0) { - printf("?Invalid command\n"); - continue; - } - if (c->c_conn && !connected) { - printf("Not connected.\n"); - continue; - } - (*c->c_handler)(margc, margv); - if (bell && c->c_bell) - putchar('\007'); - if (c->c_handler != help) - break; - } - signal(SIGINT, intr); - signal(SIGPIPE, lostpeer); -} - -struct cmd * -getcmd(char *name) -{ - char *p, *q; - struct cmd *c, *found; - int nmatches, longest; - - longest = 0; - nmatches = 0; - found = 0; - for (c = cmdtab; (p = c->c_name); c++) { - for (q = name; *q == *p++; q++) - if (*q == 0) /* exact match? */ - return (c); - if (!*q) { /* the name was a prefix */ - if (q - name > longest) { - longest = q - name; - nmatches = 1; - found = c; - } else if (q - name == longest) - nmatches++; - } - } - if (nmatches > 1) - return ((struct cmd *)-1); - return (found); -} - -/* - * Slice a string up into argc/argv. - */ - -int slrflag; - -void -makeargv(void) -{ - char **argp; - - argp = margv; - stringbase = line; /* scan from first of buffer */ - argbase = argbuf; /* store from first of buffer */ - slrflag = 0; - for (margc = 0; ; margc++) { - /* Expand array if necessary */ - if (margc == margvlen) { - int i; - - margv = (margvlen == 0) - ? (char **)malloc(20 * sizeof(char *)) - : (char **)realloc(margv, - (margvlen + 20)*sizeof(char *)); - if (margv == NULL) - errx(1, "cannot realloc argv array"); - for(i = margvlen; i < margvlen + 20; ++i) - margv[i] = NULL; - margvlen += 20; - argp = margv + margc; - } - - if ((*argp++ = slurpstring()) == NULL) - break; - } - -} - -/* - * Parse string into argbuf; - * implemented with FSM to - * handle quoting and strings - */ -char * -slurpstring(void) -{ - int got_one = 0; - char *sb = stringbase; - char *ap = argbase; - char *tmp = argbase; /* will return this if token found */ - - if (*sb == '!' || *sb == '$') { /* recognize ! as a token for shell */ - switch (slrflag) { /* and $ as token for macro invoke */ - case 0: - slrflag++; - stringbase++; - return ((*sb == '!') ? "!" : "$"); - /* NOTREACHED */ - case 1: - slrflag++; - altarg = stringbase; - break; - default: - break; - } - } - -S0: - switch (*sb) { - - case '\0': - goto OUT; - - case ' ': - case '\t': - sb++; goto S0; - - default: - switch (slrflag) { - case 0: - slrflag++; - break; - case 1: - slrflag++; - altarg = sb; - break; - default: - break; - } - goto S1; - } - -S1: - switch (*sb) { - - case ' ': - case '\t': - case '\0': - goto OUT; /* end of token */ - - case '\\': - sb++; goto S2; /* slurp next character */ - - case '"': - sb++; goto S3; /* slurp quoted string */ - - default: - *ap++ = *sb++; /* add character to token */ - got_one = 1; - goto S1; - } - -S2: - switch (*sb) { - - case '\0': - goto OUT; - - default: - *ap++ = *sb++; - got_one = 1; - goto S1; - } - -S3: - switch (*sb) { - - case '\0': - goto OUT; - - case '"': - sb++; goto S1; - - default: - *ap++ = *sb++; - got_one = 1; - goto S3; - } - -OUT: - if (got_one) - *ap++ = '\0'; - argbase = ap; /* update storage pointer */ - stringbase = sb; /* update scan pointer */ - if (got_one) { - return (tmp); - } - switch (slrflag) { - case 0: - slrflag++; - break; - case 1: - slrflag++; - altarg = (char *) 0; - break; - default: - break; - } - return NULL; -} - -#define HELPINDENT ((int) sizeof ("directory")) - -/* - * Help command. - * Call each command handler with argc == 0 and argv[0] == name. - */ -void -help(int argc, char **argv) -{ - struct cmd *c; - - if (argc == 1) { - int i, j, w, k; - int columns, width = 0, lines; - - printf("Commands may be abbreviated. Commands are:\n\n"); - for (c = cmdtab; c < &cmdtab[NCMDS]; c++) { - int len = strlen(c->c_name); - - if (len > width) - width = len; - } - width = (width + 8) &~ 7; - columns = 80 / width; - if (columns == 0) - columns = 1; - lines = (NCMDS + columns - 1) / columns; - for (i = 0; i < lines; i++) { - for (j = 0; j < columns; j++) { - c = cmdtab + j * lines + i; - if ((!proxy || c->c_proxy)) { - printf("%s", c->c_name); - } else { - for (k=0; k < strlen(c->c_name); k++) { - putchar(' '); - } - } - if (c + lines >= &cmdtab[NCMDS]) { - printf("\n"); - break; - } - w = strlen(c->c_name); - while (w < width) { - w = (w + 8) &~ 7; - putchar('\t'); - } - } - } - return; - } - while (--argc > 0) { - char *arg; - arg = *++argv; - c = getcmd(arg); - if (c == (struct cmd *)-1) - printf("?Ambiguous help command %s\n", arg); - else if (c == (struct cmd *)0) - printf("?Invalid help command %s\n", arg); - else - printf("%-*s\t%s\n", HELPINDENT, - c->c_name, c->c_help); - } -} diff --git a/kerberosV/src/appl/ftp/ftp/pathnames.h b/kerberosV/src/appl/ftp/ftp/pathnames.h deleted file mode 100644 index f7c1fb391d6..00000000000 --- a/kerberosV/src/appl/ftp/ftp/pathnames.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 1989, 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. - * - * @(#)pathnames.h 8.1 (Berkeley) 6/6/93 - */ - -#ifdef HAVE_PATHS_H -#include -#endif - -#define _PATH_TMP_XXX "/tmp/ftpXXXXXX" - -#ifndef _PATH_BSHELL -#define _PATH_BSHELL "/bin/sh" -#endif diff --git a/kerberosV/src/appl/ftp/ftp/ruserpass.c b/kerberosV/src/appl/ftp/ftp/ruserpass.c deleted file mode 100644 index 5b6f9aedbc5..00000000000 --- a/kerberosV/src/appl/ftp/ftp/ruserpass.c +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright (c) 1985, 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. - */ - -#include "ftp_locl.h" -RCSID("$Id: ruserpass.c,v 1.3 2013/06/17 19:11:35 robert Exp $"); - -static int token (void); -static FILE *cfile; - -#define DEFAULT 1 -#define LOGIN 2 -#define PASSWD 3 -#define ACCOUNT 4 -#define MACDEF 5 -#define PROT 6 -#define ID 10 -#define MACH 11 - -static char tokval[100]; - -static struct toktab { - char *tokstr; - int tval; -} toktab[]= { - { "default", DEFAULT }, - { "login", LOGIN }, - { "password", PASSWD }, - { "passwd", PASSWD }, - { "account", ACCOUNT }, - { "machine", MACH }, - { "macdef", MACDEF }, - { "prot", PROT }, - { NULL, 0 } -}; - -/* - * Write a copy of the hostname into `hostname, sz' and return a guess - * as to the `domain' of that hostname. - */ - -static char * -guess_domain (char *hostname_str, size_t sz) -{ - struct addrinfo *ai, *a; - struct addrinfo hints; - int error; - char *dot; - - if (gethostname (hostname_str, sz) < 0) { - strlcpy (hostname_str, "", sz); - return ""; - } - dot = strchr (hostname_str, '.'); - if (dot != NULL) - return dot + 1; - - memset (&hints, 0, sizeof(hints)); - hints.ai_flags = AI_CANONNAME; - - error = getaddrinfo (hostname_str, NULL, &hints, &ai); - if (error) - return hostname_str; - - for (a = ai; a != NULL; a = a->ai_next) - if (a->ai_canonname != NULL) { - strlcpy (hostname_str, ai->ai_canonname, sz); - break; - } - freeaddrinfo (ai); - dot = strchr (hostname_str, '.'); - if (dot != NULL) - return dot + 1; - else - return hostname_str; -} - -int -ruserpassword(char *host, char **aname, char **apass, char **aacct) -{ - char *hdir, buf[BUFSIZ], *tmp; - int t, i, c, usedefault = 0; - struct stat stb; - - mydomain = guess_domain (myhostname, MaxHostNameLen); - - hdir = getenv("HOME"); - if (hdir == NULL) - hdir = "."; - snprintf(buf, sizeof(buf), "%s/.netrc", hdir); - cfile = fopen(buf, "r"); - if (cfile == NULL) { - if (errno != ENOENT) - warn("%s", buf); - return (0); - } - -next: - while ((t = token())) switch(t) { - - case DEFAULT: - usedefault = 1; - /* FALL THROUGH */ - - case MACH: - if (!usedefault) { - if (token() != ID) - continue; - /* - * Allow match either for user's input host name - * or official hostname. Also allow match of - * incompletely-specified host in local domain. - */ - if (strcasecmp(host, tokval) == 0) - goto match; - if (strcasecmp(hostname, tokval) == 0) - goto match; - if ((tmp = strchr(hostname, '.')) != NULL && - tmp++ && - strcasecmp(tmp, mydomain) == 0 && - strncasecmp(hostname, tokval, tmp-hostname) == 0 && - tokval[tmp - hostname] == '\0') - goto match; - if ((tmp = strchr(host, '.')) != NULL && - tmp++ && - strcasecmp(tmp, mydomain) == 0 && - strncasecmp(host, tokval, tmp - host) == 0 && - tokval[tmp - host] == '\0') - goto match; - continue; - } - match: - while ((t = token()) && t != MACH && t != DEFAULT) switch(t) { - - case LOGIN: - if (token()) { - if (*aname == 0) { - *aname = strdup(tokval); - } else { - if (strcmp(*aname, tokval)) - goto next; - } - } - break; - case PASSWD: - if ((*aname == NULL || strcmp(*aname, "anonymous")) && - fstat(fileno(cfile), &stb) >= 0 && - (stb.st_mode & 077) != 0) { - warnx("Error: .netrc file is readable by others."); - warnx("Remove password or make file unreadable by others."); - goto bad; - } - if (token() && *apass == 0) { - *apass = strdup(tokval); - } - break; - case ACCOUNT: - if (fstat(fileno(cfile), &stb) >= 0 - && (stb.st_mode & 077) != 0) { - warnx("Error: .netrc file is readable by others."); - warnx("Remove account or make file unreadable by others."); - goto bad; - } - if (token() && *aacct == 0) { - *aacct = strdup(tokval); - } - break; - case MACDEF: - if (proxy) { - fclose(cfile); - return (0); - } - while ((c=getc(cfile)) != EOF && - (c == ' ' || c == '\t')); - if (c == EOF || c == '\n') { - printf("Missing macdef name argument.\n"); - goto bad; - } - if (macnum == 16) { - printf("Limit of 16 macros have already been defined\n"); - goto bad; - } - tmp = macros[macnum].mac_name; - *tmp++ = c; - for (i=0; i < 8 && (c=getc(cfile)) != EOF && - !isspace(c); ++i) { - *tmp++ = c; - } - if (c == EOF) { - printf("Macro definition missing null line terminator.\n"); - goto bad; - } - *tmp = '\0'; - if (c != '\n') { - while ((c=getc(cfile)) != EOF && c != '\n'); - } - if (c == EOF) { - printf("Macro definition missing null line terminator.\n"); - goto bad; - } - if (macnum == 0) { - macros[macnum].mac_start = macbuf; - } - else { - macros[macnum].mac_start = macros[macnum-1].mac_end + 1; - } - tmp = macros[macnum].mac_start; - while (tmp != macbuf + 4096) { - if ((c=getc(cfile)) == EOF) { - printf("Macro definition missing null line terminator.\n"); - goto bad; - } - *tmp = c; - if (*tmp == '\n') { - if (*(tmp-1) == '\0') { - macros[macnum++].mac_end = tmp - 1; - break; - } - *tmp = '\0'; - } - tmp++; - } - if (tmp == macbuf + 4096) { - printf("4K macro buffer exceeded\n"); - goto bad; - } - break; - case PROT: - token(); - if(doencrypt == 0 && sec_request_prot(tokval) < 0) - warnx("Unknown protection level \"%s\"", tokval); - break; - default: - warnx("Unknown .netrc keyword %s", tokval); - break; - } - goto done; - } -done: - fclose(cfile); - return (0); -bad: - fclose(cfile); - return (-1); -} - -static int -token(void) -{ - char *cp; - int c; - struct toktab *t; - - if (feof(cfile) || ferror(cfile)) - return (0); - while ((c = getc(cfile)) != EOF && - (c == '\n' || c == '\t' || c == ' ' || c == ',')) - continue; - if (c == EOF) - return (0); - cp = tokval; - if (c == '"') { - while ((c = getc(cfile)) != EOF && c != '"') { - if (c == '\\') - c = getc(cfile); - *cp++ = c; - } - } else { - *cp++ = c; - while ((c = getc(cfile)) != EOF - && c != '\n' && c != '\t' && c != ' ' && c != ',') { - if (c == '\\') - c = getc(cfile); - *cp++ = c; - } - } - *cp = 0; - if (tokval[0] == 0) - return (0); - for (t = toktab; t->tokstr; t++) - if (!strcmp(t->tokstr, tokval)) - return (t->tval); - return (ID); -} diff --git a/kerberosV/src/appl/ftp/ftp/security.c b/kerberosV/src/appl/ftp/ftp/security.c deleted file mode 100644 index 38b0c3d4ce2..00000000000 --- a/kerberosV/src/appl/ftp/ftp/security.c +++ /dev/null @@ -1,883 +0,0 @@ -/* - * Copyright (c) 1998-2002, 2005 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.3 2013/06/17 19:11:35 robert 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 prot_invalid; -} -#endif - -#ifdef FTP_SERVER - -static struct sec_server_mech *mechs[] = { -#ifdef KRB5 - &gss_server_mech, -#endif - NULL -}; - -static struct sec_server_mech *mech; - -#else - -static struct sec_client_mech *mechs[] = { -#ifdef KRB5 - &gss_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; - void *tmp; - - b = block_read(fd, &len, sizeof(len)); - if (b == 0) - return 0; - else if (b < 0) - return -1; - len = ntohl(len); - tmp = realloc(buf->data, len); - if (tmp == NULL) - return -1; - buf->data = tmp; - 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 *dataptr, size_t len) -{ - len = min(len, buf->size - buf->index); - memcpy(dataptr, (char*)buf->data + buf->index, len); - buf->index += len; - return len; -} - -static size_t -buffer_write(struct buffer *buf, void *dataptr, 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, dataptr, len); - buf->index += len; - return len; -} - -int -sec_read(int fd, void *dataptr, int length) -{ - size_t len; - int rx = 0; - - if(sec_complete == 0 || data_prot == 0) - return read(fd, dataptr, length); - - if(in_buffer.eof_flag){ - in_buffer.eof_flag = 0; - return 0; - } - - len = buffer_read(&in_buffer, dataptr, length); - length -= len; - rx += len; - dataptr = (char*)dataptr + len; - - while(length){ - int ret; - - ret = sec_get_data(fd, &in_buffer, data_prot); - if (ret < 0) - return -1; - if(ret == 0 && in_buffer.size == 0) { - if(rx) - in_buffer.eof_flag = 1; - return rx; - } - len = buffer_read(&in_buffer, dataptr, length); - length -= len; - rx += len; - dataptr = (char*)dataptr + 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 *dataptr, int length) -{ - int len = buffer_size; - int tx = 0; - - if(data_prot == prot_clear) - return write(fd, dataptr, length); - - len -= (*mech->overhead)(app_data, data_prot, len); - while(length){ - if(length < len) - len = length; - sec_send(fd, dataptr, len); - length -= len; - dataptr += 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 { - int len; - len = vasprintf(&buf, fmt, ap); - if (len == -1) - return len; - ret = buffer_write(&out_buffer, buf, len); - 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 return_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] == '-') - return_code = 0; - else - sscanf(buf, "%d", &return_code); - if(buf[len-1] == '\n') - buf[len-1] = '\0'; - strcpy(s, buf); - free(buf); - return 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); - - if (vasprintf(&buf, fmt, ap) == -1) { - printf("Failed to allocate command.\n"); - return -1; - } - 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){ - free(enc); - printf("Out of memory base64-encoding.\n"); - return -1; - } - free(enc); -#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 - -int ccc_passed; - -void -auth(char *auth_name) -{ - int i; - void *tmp; - - for(i = 0; (mech = mechs[i]) != NULL; i++){ - if(!strcasecmp(auth_name, mech->name)){ - tmp = realloc(app_data, mech->size); - if (tmp == NULL) { - reply(431, "Unable to accept %s at this time", mech->name); - return; - } - app_data = tmp; - - 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); - app_data = NULL; - 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; - ccc_passed = 1; - } 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, buf_size; - if(!sec_complete) { - reply(503, "Incomplete security data exchange."); - return; - } - buf_size = strlen(msg) + 2; - buf = malloc(buf_size); - if (buf == NULL) { - reply(501, "Failed to allocate %lu", (unsigned long)buf_size); - return; - } - len = base64_decode(msg, buf); - command_prot = level; - if(len == (size_t)-1) { - free(buf); - reply(501, "Failed to base64-decode command"); - return; - } - len = (*mech->decode)(app_data, buf, len, level); - if(len == (size_t)-1) { - free(buf); - reply(535, "Failed to decode command"); - return; - } - ((char*)buf)[len] = '\0'; - if(strstr((char*)buf, "\r\n") == NULL) - strlcat((char*)buf, "\r\n", buf_size); - new_ftp_command(buf); -} - -/* ------------------------------------------------------------ */ - -int -sec_userok(char *userstr) -{ - if(sec_complete) - return (*mech->userok)(app_data, userstr); - return 0; -} - -int -sec_session(char *user) -{ - if(sec_complete && mech->session) - return (*mech->session)(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) -{ - int ret; - enum protection_level old = command_prot; - if(level != command_prot && level == prot_clear) { - ret = command("CCC"); - if(ret != COMPLETE) { - printf("Failed to clear command channel.\n"); - return prot_invalid; - } - } - command_prot = level; - return old; -} - -void -sec_prot(int argc, char **argv) -{ - int level = -1; - - if(argc > 3) - goto usage; - - if(argc == 1) { - sec_status(); - return; - } - 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) { - if(set_command_prot(level) < 0) { - code = -1; - return; - } - } else - goto usage; - code = 0; - return; - usage: - printf("usage: %s [command|data] [clear|safe|confidential|private]\n", - argv[0]); - code = -1; -} - -void -sec_prot_command(int argc, char **argv) -{ - int level; - - if(argc > 2) - goto usage; - - if(!sec_complete) { - printf("No security data exchange has taken place.\n"); - code = -1; - return; - } - - if(argc == 1) { - sec_status(); - } else { - level = name_to_level(argv[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(set_command_prot(level) < 0) { - code = -1; - return; - } - } - code = 0; - return; - usage: - printf("usage: %s [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 %lu failed", (unsigned long)(*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; - if(doencrypt) { - command_prot = prot_private; - request_data_prot = prot_private; - } else { - 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); - if (app_data != NULL) { - 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/kerberosV/src/appl/ftp/ftp/security.h b/kerberosV/src/appl/ftp/ftp/security.h deleted file mode 100644 index 47a94f4a206..00000000000 --- a/kerberosV/src/appl/ftp/ftp/security.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 1998 - 2005 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.3 2013/06/17 19:11:35 robert Exp $ */ - -#ifndef __security_h__ -#define __security_h__ - -enum protection_level { - prot_invalid = -1, - prot_clear = 0, - prot_safe = 1, - prot_confidential = 2, - prot_private = 3 -}; - -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*); - int (*session)(void*, char*); -}; - -#define AUTH_OK 0 -#define AUTH_CONTINUE 1 -#define AUTH_ERROR 2 - -extern int ftp_do_gss_bindings; -extern int ftp_do_gss_delegate; -#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 *, ...) - __attribute__ ((format (printf, 2,3))); -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) - __attribute__ ((format (printf, 2,0))); -int sec_fprintf2(FILE *f, const char *fmt, ...) - __attribute__ ((format (printf, 2,3))); -int sec_vfprintf2(FILE *, const char *, va_list) - __attribute__ ((format (printf, 2,0))); -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 sec_session(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 **); -void sec_prot_command (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/kerberosV/src/appl/ftp/ftpd/Makefile.am b/kerberosV/src/appl/ftp/ftpd/Makefile.am deleted file mode 100644 index 8130f845a5b..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:35 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += -I$(srcdir)/../common $(INCLUDE_krb4) -DFTP_SERVER - -libexec_PROGRAMS = ftpd - -CHECK_LOCAL = - -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 \ - kauth.c \ - klist.c \ - $(krb4_sources) \ - $(krb5_sources) - -EXTRA_ftpd_SOURCES = 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 . -gssapi.c: - @test -f gssapi.c || $(LN_S) $(srcdir)/../ftp/gssapi.c . - -CLEANFILES = security.c security.h gssapi.c - -man_MANS = ftpd.8 ftpusers.5 - -LDADD = ../common/libcommon.a \ - $(LIB_otp) \ - $(LIB_gssapi) \ - $(LIB_krb5) \ - $(LIB_kafs) \ - $(LIB_krb4) \ - $(LIB_hcrypto) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) diff --git a/kerberosV/src/appl/ftp/ftpd/Makefile.in b/kerberosV/src/appl/ftp/ftpd/Makefile.in deleted file mode 100644 index 609147f26ee..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/Makefile.in +++ /dev/null @@ -1,1055 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:35 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ftpcmd.c -libexec_PROGRAMS = ftpd$(EXEEXT) -subdir = appl/ftp/ftpd -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man5dir)" \ - "$(DESTDIR)$(man8dir)" -PROGRAMS = $(libexec_PROGRAMS) -am__ftpd_SOURCES_DIST = extern.h ftpcmd.y ftpd.c ftpd_locl.h logwtmp.c \ - ls.c pathnames.h popen.c security.c kauth.c klist.c gssapi.c \ - gss_userok.c -@KRB5_TRUE@am__objects_1 = gssapi.$(OBJEXT) gss_userok.$(OBJEXT) -am_ftpd_OBJECTS = ftpcmd.$(OBJEXT) ftpd.$(OBJEXT) logwtmp.$(OBJEXT) \ - ls.$(OBJEXT) popen.$(OBJEXT) security.$(OBJEXT) \ - kauth.$(OBJEXT) klist.$(OBJEXT) $(am__objects_1) -ftpd_OBJECTS = $(am_ftpd_OBJECTS) -ftpd_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/lib/kafs/libkafs.la \ - $(am__DEPENDENCIES_1) -ftpd_DEPENDENCIES = ../common/libcommon.a $(am__DEPENDENCIES_1) \ - $(LIB_gssapi) $(LIB_krb5) $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) -LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS) -YLWRAP = $(top_srcdir)/ylwrap -SOURCES = $(ftpd_SOURCES) $(EXTRA_ftpd_SOURCES) -DIST_SOURCES = $(am__ftpd_SOURCES_DIST) $(EXTRA_ftpd_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man5dir = $(mandir)/man5 -man8dir = $(mandir)/man8 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -I$(srcdir)/../common $(INCLUDE_krb4) \ - -DFTP_SERVER -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -CHECK_LOCAL = -@KRB5_TRUE@krb5_sources = gssapi.c gss_userok.c -ftpd_SOURCES = \ - extern.h \ - ftpcmd.y \ - ftpd.c \ - ftpd_locl.h \ - logwtmp.c \ - ls.c \ - pathnames.h \ - popen.c \ - security.c \ - kauth.c \ - klist.c \ - $(krb4_sources) \ - $(krb5_sources) - -EXTRA_ftpd_SOURCES = kauth.c gssapi.c gss_userok.c -CLEANFILES = security.c security.h gssapi.c -man_MANS = ftpd.8 ftpusers.5 -LDADD = ../common/libcommon.a \ - $(LIB_otp) \ - $(LIB_gssapi) \ - $(LIB_krb5) \ - $(LIB_kafs) \ - $(LIB_krb4) \ - $(LIB_hcrypto) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj .y -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/ftp/ftpd/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/ftp/ftpd/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libexecPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexecdir)" && rm -f $$files - -clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -ftpd$(EXEEXT): $(ftpd_OBJECTS) $(ftpd_DEPENDENCIES) - @rm -f ftpd$(EXEEXT) - $(LINK) $(ftpd_OBJECTS) $(ftpd_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpcmd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gss_userok.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssapi.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kauth.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/klist.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logwtmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ls.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -.y.c: - $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man5: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" - @list=''; test -n "$(man5dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ - done; } - -uninstall-man5: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man5dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -rm -f ftpcmd.c -clean: clean-am - -clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libexecPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man5 install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libexecPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man5 uninstall-man8 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libexecPROGRAMS clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ - install-libexecPROGRAMS install-man install-man5 install-man8 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am uninstall-hook \ - uninstall-libexecPROGRAMS uninstall-man uninstall-man5 \ - uninstall-man8 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -$(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 . -gssapi.c: - @test -f gssapi.c || $(LN_S) $(srcdir)/../ftp/gssapi.c . - -# 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/kerberosV/src/appl/ftp/ftpd/NTMakefile b/kerberosV/src/appl/ftp/ftpd/NTMakefile deleted file mode 100644 index 3b88d326f81..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\ftp\ftpd - -!include ../../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/ftp/ftpd/extern.h b/kerberosV/src/appl/ftp/ftpd/extern.h deleted file mode 100644 index 3f48ec66eb5..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/extern.h +++ /dev/null @@ -1,150 +0,0 @@ -/*- - * 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. - * - * @(#)extern.h 8.2 (Berkeley) 4/4/94 - */ - -#ifndef _EXTERN_H_ -#define _EXTERN_H_ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif - -#include -#include -#ifdef HAVE_PWD_H -#include -#endif - -#ifdef HAVE_LIMITS_H -#include -#endif - -#ifndef NBBY -#define NBBY CHAR_BIT -#endif - -void abor(void); -void blkfree(char **); -char **copyblk(char **); -void cwd(const char *); -void do_delete(char *); -void dologout(int); -void eprt(char *); -void epsv(char *); -void fatal(char *); -int filename_check(char *); -int ftpd_pclose(FILE *); -FILE *ftpd_popen(char *, char *, int, int); -char *ftpd_getline(char *, int); -void ftpd_logwtmp(char *, char *, char *); -void lreply(int, const char *, ...) - __attribute__ ((format (printf, 2, 3))); -void makedir(char *); -void nack(char *); -void nreply(const char *, ...) - __attribute__ ((format (printf, 1, 2))); -void pass(char *); -void pasv(void); -void perror_reply(int, const char *); -void pwd(void); -void removedir(char *); -void renamecmd(char *, char *); -char *renamefrom(char *); -void reply(int, const char *, ...) - __attribute__ ((format (printf, 2, 3))); -void retrieve(const char *, char *); -void send_file_list(char *); -void setproctitle(const char *, ...) - __attribute__ ((format (printf, 1, 2))); -void statcmd(void); -void statfilecmd(char *); -void do_store(char *, char *, int); -void upper(char *); -void user(char *); -void yyerror(char *); - -void list_file(char*); - -void kauth(char *, char*); -void klist(void); -void cond_kdestroy(void); -void kdestroy(void); -void krbtkfile(const char *tkfile); -void afslog(const char *, int); -void afsunlog(void); - -extern int do_destroy_tickets; -extern char *k5ccname; - -int find(char *); - -int builtin_ls(FILE*, const char*); - -int do_login(int code, char *passwd); -int klogin(char *name, char *password); - -const char *ftp_rooted(const char *path); - -extern struct sockaddr *ctrl_addr, *his_addr; -extern char hostname[]; - -extern struct sockaddr *data_dest; -extern int logged_in; -extern struct passwd *pw; -extern int guest; -extern int dochroot; -extern int logging; -extern int type; -extern off_t file_size; -extern off_t byte_count; -extern int ccc_passed; - -extern int form; -extern int debug; -extern int ftpd_timeout; -extern int maxtimeout; -extern int pdata; -extern char hostname[], remotehost[]; -extern char proctitle[]; -extern int usedefault; -extern char tmpline[]; -extern int paranoid; - -#endif /* _EXTERN_H_ */ diff --git a/kerberosV/src/appl/ftp/ftpd/ftpcmd.c b/kerberosV/src/appl/ftp/ftpd/ftpcmd.c deleted file mode 100644 index 2e843f0f1c9..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/ftpcmd.c +++ /dev/null @@ -1,3532 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.3. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.3" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - A = 258, - B = 259, - C = 260, - E = 261, - F = 262, - I = 263, - L = 264, - N = 265, - P = 266, - R = 267, - S = 268, - T = 269, - SP = 270, - CRLF = 271, - COMMA = 272, - USER = 273, - PASS = 274, - ACCT = 275, - REIN = 276, - QUIT = 277, - PORT = 278, - PASV = 279, - TYPE = 280, - STRU = 281, - MODE = 282, - RETR = 283, - STOR = 284, - APPE = 285, - MLFL = 286, - MAIL = 287, - MSND = 288, - MSOM = 289, - MSAM = 290, - MRSQ = 291, - MRCP = 292, - ALLO = 293, - REST = 294, - RNFR = 295, - RNTO = 296, - ABOR = 297, - DELE = 298, - CWD = 299, - LIST = 300, - NLST = 301, - SITE = 302, - sTAT = 303, - HELP = 304, - NOOP = 305, - MKD = 306, - RMD = 307, - PWD = 308, - CDUP = 309, - STOU = 310, - SMNT = 311, - SYST = 312, - SIZE = 313, - MDTM = 314, - EPRT = 315, - EPSV = 316, - UMASK = 317, - IDLE = 318, - CHMOD = 319, - AUTH = 320, - ADAT = 321, - PROT = 322, - PBSZ = 323, - CCC = 324, - MIC = 325, - CONF = 326, - ENC = 327, - KAUTH = 328, - KLIST = 329, - KDESTROY = 330, - KRBTKFILE = 331, - AFSLOG = 332, - LOCATE = 333, - URL = 334, - FEAT = 335, - OPTS = 336, - LEXERR = 337, - STRING = 338, - NUMBER = 339 - }; -#endif -/* Tokens. */ -#define A 258 -#define B 259 -#define C 260 -#define E 261 -#define F 262 -#define I 263 -#define L 264 -#define N 265 -#define P 266 -#define R 267 -#define S 268 -#define T 269 -#define SP 270 -#define CRLF 271 -#define COMMA 272 -#define USER 273 -#define PASS 274 -#define ACCT 275 -#define REIN 276 -#define QUIT 277 -#define PORT 278 -#define PASV 279 -#define TYPE 280 -#define STRU 281 -#define MODE 282 -#define RETR 283 -#define STOR 284 -#define APPE 285 -#define MLFL 286 -#define MAIL 287 -#define MSND 288 -#define MSOM 289 -#define MSAM 290 -#define MRSQ 291 -#define MRCP 292 -#define ALLO 293 -#define REST 294 -#define RNFR 295 -#define RNTO 296 -#define ABOR 297 -#define DELE 298 -#define CWD 299 -#define LIST 300 -#define NLST 301 -#define SITE 302 -#define sTAT 303 -#define HELP 304 -#define NOOP 305 -#define MKD 306 -#define RMD 307 -#define PWD 308 -#define CDUP 309 -#define STOU 310 -#define SMNT 311 -#define SYST 312 -#define SIZE 313 -#define MDTM 314 -#define EPRT 315 -#define EPSV 316 -#define UMASK 317 -#define IDLE 318 -#define CHMOD 319 -#define AUTH 320 -#define ADAT 321 -#define PROT 322 -#define PBSZ 323 -#define CCC 324 -#define MIC 325 -#define CONF 326 -#define ENC 327 -#define KAUTH 328 -#define KLIST 329 -#define KDESTROY 330 -#define KRBTKFILE 331 -#define AFSLOG 332 -#define LOCATE 333 -#define URL 334 -#define FEAT 335 -#define OPTS 336 -#define LEXERR 337 -#define STRING 338 -#define NUMBER 339 - - - - -/* Copy the first part of user declarations. */ -#line 43 "ftpcmd.y" - - -#include "ftpd_locl.h" -RCSID("$Id: ftpcmd.c,v 1.1 2013/06/17 19:11:35 robert Exp $"); - -off_t restart_point; - -static int hasyyerrored; - - -static int cmd_type; -static int cmd_form; -static int cmd_bytesz; -char cbuf[64*1024]; -char *fromname; - -struct tab { - char *name; - short token; - short state; - short implemented; /* 1 if command is implemented */ - char *help; -}; - -extern struct tab cmdtab[]; -extern struct tab sitetab[]; - -static char *copy (char *); -static void help (struct tab *, char *); -static struct tab * - lookup (struct tab *, char *); -static void sizecmd (char *); -static RETSIGTYPE toolong (int); -static int yylex (void); - -/* This is for bison */ - -#if !defined(alloca) && !defined(HAVE_ALLOCA) -#define alloca(x) malloc(x) -#endif - - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 86 "ftpcmd.y" -{ - int i; - char *s; -} -/* Line 193 of yacc.c. */ -#line 312 "ftpcmd.c" - YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - -/* Copy the second part of user declarations. */ - - -/* Line 216 of yacc.c. */ -#line 325 "ftpcmd.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int i) -#else -static int -YYID (i) - int i; -#endif -{ - return i; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss; - YYSTYPE yyvs; - }; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 2 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 327 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 85 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 18 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 98 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 317 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 339 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 4, 7, 10, 16, 22, 28, 34, - 38, 42, 48, 54, 60, 66, 72, 82, 88, 94, - 100, 104, 110, 114, 120, 126, 130, 136, 142, 146, - 150, 156, 160, 166, 170, 176, 182, 186, 190, 194, - 200, 206, 214, 220, 228, 238, 244, 252, 260, 266, - 272, 280, 286, 294, 302, 308, 314, 318, 324, 330, - 334, 337, 343, 349, 354, 359, 365, 371, 375, 380, - 385, 390, 392, 393, 395, 397, 409, 411, 413, 415, - 417, 421, 423, 427, 429, 431, 435, 438, 440, 442, - 444, 446, 448, 450, 452, 454, 456, 458, 460 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 86, 0, -1, -1, 86, 87, -1, 86, 88, -1, - 18, 15, 89, 16, 102, -1, 19, 15, 90, 16, - 102, -1, 23, 15, 92, 16, 102, -1, 60, 15, - 83, 16, 102, -1, 24, 16, 101, -1, 61, 16, - 101, -1, 61, 15, 83, 16, 101, -1, 25, 15, - 94, 16, 102, -1, 26, 15, 95, 16, 102, -1, - 27, 15, 96, 16, 102, -1, 38, 15, 84, 16, - 102, -1, 38, 15, 84, 15, 12, 15, 84, 16, - 102, -1, 28, 15, 97, 16, 101, -1, 29, 15, - 97, 16, 101, -1, 30, 15, 97, 16, 101, -1, - 46, 16, 101, -1, 46, 15, 83, 16, 101, -1, - 45, 16, 101, -1, 45, 15, 97, 16, 101, -1, - 48, 15, 97, 16, 101, -1, 48, 16, 102, -1, - 43, 15, 97, 16, 100, -1, 41, 15, 97, 16, - 100, -1, 42, 16, 102, -1, 44, 16, 101, -1, - 44, 15, 97, 16, 101, -1, 49, 16, 102, -1, - 49, 15, 83, 16, 102, -1, 50, 16, 102, -1, - 51, 15, 97, 16, 101, -1, 52, 15, 97, 16, - 100, -1, 53, 16, 101, -1, 54, 16, 101, -1, - 80, 16, 102, -1, 81, 15, 83, 16, 102, -1, - 47, 15, 49, 16, 102, -1, 47, 15, 49, 15, - 83, 16, 102, -1, 47, 15, 62, 16, 101, -1, - 47, 15, 62, 15, 99, 16, 100, -1, 47, 15, - 64, 15, 99, 15, 97, 16, 100, -1, 47, 15, - 63, 16, 102, -1, 47, 15, 63, 15, 84, 16, - 102, -1, 47, 15, 73, 15, 83, 16, 101, -1, - 47, 15, 74, 16, 101, -1, 47, 15, 75, 16, - 101, -1, 47, 15, 76, 15, 83, 16, 101, -1, - 47, 15, 77, 16, 101, -1, 47, 15, 77, 15, - 83, 16, 101, -1, 47, 15, 78, 15, 83, 16, - 101, -1, 47, 15, 79, 16, 102, -1, 55, 15, - 97, 16, 101, -1, 57, 16, 102, -1, 58, 15, - 97, 16, 101, -1, 59, 15, 97, 16, 101, -1, - 22, 16, 102, -1, 1, 16, -1, 40, 15, 97, - 16, 100, -1, 39, 15, 91, 16, 102, -1, 65, - 15, 83, 16, -1, 66, 15, 83, 16, -1, 68, - 15, 84, 16, 102, -1, 67, 15, 83, 16, 102, - -1, 69, 16, 102, -1, 70, 15, 83, 16, -1, - 71, 15, 83, 16, -1, 72, 15, 83, 16, -1, - 83, -1, -1, 83, -1, 84, -1, 84, 17, 84, - 17, 84, 17, 84, 17, 84, 17, 84, -1, 10, - -1, 14, -1, 5, -1, 3, -1, 3, 15, 93, - -1, 6, -1, 6, 15, 93, -1, 8, -1, 9, - -1, 9, 15, 91, -1, 9, 91, -1, 7, -1, - 12, -1, 11, -1, 13, -1, 4, -1, 5, -1, - 98, -1, 83, -1, 84, -1, 101, -1, 102, -1, - -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 129, 129, 131, 136, 140, 146, 154, 175, 181, - 186, 191, 197, 234, 248, 262, 268, 274, 283, 292, - 301, 306, 315, 320, 326, 333, 338, 345, 359, 364, - 373, 380, 385, 402, 407, 414, 421, 426, 431, 441, - 448, 453, 458, 466, 479, 493, 500, 517, 521, 526, - 530, 534, 545, 558, 565, 570, 577, 595, 612, 640, - 647, 653, 663, 673, 678, 683, 688, 693, 698, 703, - 708, 716, 721, 724, 728, 732, 745, 749, 753, 760, - 765, 770, 775, 780, 784, 789, 795, 803, 807, 811, - 818, 822, 826, 833, 861, 865, 891, 899, 910 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "A", "B", "C", "E", "F", "I", "L", "N", - "P", "R", "S", "T", "SP", "CRLF", "COMMA", "USER", "PASS", "ACCT", - "REIN", "QUIT", "PORT", "PASV", "TYPE", "STRU", "MODE", "RETR", "STOR", - "APPE", "MLFL", "MAIL", "MSND", "MSOM", "MSAM", "MRSQ", "MRCP", "ALLO", - "REST", "RNFR", "RNTO", "ABOR", "DELE", "CWD", "LIST", "NLST", "SITE", - "sTAT", "HELP", "NOOP", "MKD", "RMD", "PWD", "CDUP", "STOU", "SMNT", - "SYST", "SIZE", "MDTM", "EPRT", "EPSV", "UMASK", "IDLE", "CHMOD", "AUTH", - "ADAT", "PROT", "PBSZ", "CCC", "MIC", "CONF", "ENC", "KAUTH", "KLIST", - "KDESTROY", "KRBTKFILE", "AFSLOG", "LOCATE", "URL", "FEAT", "OPTS", - "LEXERR", "STRING", "NUMBER", "$accept", "cmd_list", "cmd", "rcmd", - "username", "password", "byte_size", "host_port", "form_code", - "type_code", "struct_code", "mode_code", "pathname", "pathstring", - "octal_number", "check_login_no_guest", "check_login", "check_secure", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 85, 86, 86, 86, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 88, 88, 88, 88, 88, 88, 88, 88, 88, - 88, 89, 90, 90, 91, 92, 93, 93, 93, 94, - 94, 94, 94, 94, 94, 94, 94, 95, 95, 95, - 96, 96, 96, 97, 98, 99, 100, 101, 102 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 0, 2, 2, 5, 5, 5, 5, 3, - 3, 5, 5, 5, 5, 5, 9, 5, 5, 5, - 3, 5, 3, 5, 5, 3, 5, 5, 3, 3, - 5, 3, 5, 3, 5, 5, 3, 3, 3, 5, - 5, 7, 5, 7, 9, 5, 7, 7, 5, 5, - 7, 5, 7, 7, 5, 5, 3, 5, 5, 3, - 2, 5, 5, 4, 4, 5, 5, 3, 4, 4, - 4, 1, 0, 1, 1, 11, 1, 1, 1, 1, - 3, 1, 3, 1, 1, 3, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, - 60, 0, 72, 98, 0, 98, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 98, 0, 0, 98, - 0, 98, 0, 98, 0, 0, 98, 0, 98, 98, - 0, 0, 98, 98, 0, 98, 0, 0, 0, 0, - 98, 0, 0, 0, 0, 98, 0, 0, 0, 98, - 0, 71, 0, 73, 0, 59, 0, 0, 9, 97, - 79, 81, 83, 84, 0, 87, 89, 88, 0, 91, - 92, 90, 0, 94, 0, 93, 0, 0, 0, 74, - 0, 0, 0, 28, 0, 0, 29, 0, 22, 0, - 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 25, 0, 31, 33, 0, 0, 36, - 37, 0, 56, 0, 0, 0, 0, 10, 0, 0, - 0, 0, 67, 0, 0, 0, 38, 0, 98, 98, - 0, 98, 0, 0, 0, 86, 98, 98, 98, 98, - 98, 98, 0, 98, 98, 98, 98, 98, 98, 98, - 98, 0, 98, 0, 98, 0, 98, 0, 0, 98, - 98, 0, 0, 98, 0, 98, 98, 98, 98, 98, - 98, 98, 98, 98, 98, 63, 64, 98, 98, 68, - 69, 70, 98, 5, 6, 0, 7, 78, 76, 77, - 80, 82, 85, 12, 13, 14, 17, 18, 19, 0, - 15, 62, 61, 96, 27, 26, 30, 23, 21, 0, - 40, 95, 0, 42, 0, 45, 0, 0, 48, 49, - 0, 0, 51, 0, 54, 24, 32, 34, 35, 55, - 57, 58, 8, 11, 66, 65, 39, 0, 0, 98, - 98, 98, 0, 98, 98, 98, 98, 0, 0, 41, - 43, 46, 0, 47, 50, 52, 53, 0, 98, 98, - 0, 16, 44, 0, 0, 0, 75 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 1, 48, 49, 102, 104, 130, 107, 240, 114, - 118, 122, 124, 125, 262, 252, 253, 109 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -196 -static const yytype_int16 yypact[] = -{ - -196, 246, -196, 3, 13, 20, 11, 24, 21, 26, - 30, 45, 66, 67, 68, 69, 70, 71, 72, 76, - 73, -7, -5, 15, 78, 28, 32, 80, 79, 82, - 83, 91, 93, 94, 96, 97, 98, 38, 100, 101, - 102, 103, 104, 106, 107, 108, 111, 109, -196, -196, - -196, -66, 36, -196, 14, -196, 12, 22, 1, 46, - 46, 46, 25, 48, 46, 46, -196, 46, 46, -196, - 46, -196, 53, -196, 27, 46, -196, 55, -196, -196, - 46, 46, -196, -196, 46, -196, 46, 46, 56, 59, - -196, 60, 61, 62, 63, -196, 65, 77, 85, -196, - 86, -196, 114, -196, 115, -196, 120, 130, -196, -196, - 135, 136, -196, -11, 138, -196, -196, -196, 139, -196, - -196, -196, 143, -196, 145, -196, 147, 156, 47, -196, - 157, 162, 165, -196, 166, 168, -196, 170, -196, 174, - -196, 49, 52, 54, 137, 177, 178, 179, 181, 64, - 182, 183, 184, -196, 185, -196, -196, 186, 187, -196, - -196, 188, -196, 189, 190, 191, 192, -196, 193, 194, - 195, 196, -196, 197, 198, 199, -196, 200, -196, -196, - 133, -196, 2, 2, 48, -196, -196, -196, -196, -196, - -196, -196, 206, -196, -196, -196, -196, -196, -196, -196, - -196, 110, -196, 140, -196, 141, -196, 140, 144, -196, - -196, 146, 148, -196, 149, -196, -196, -196, -196, -196, - -196, -196, -196, -196, -196, -196, -196, -196, -196, -196, - -196, -196, -196, -196, -196, 202, -196, -196, -196, -196, - -196, -196, -196, -196, -196, -196, -196, -196, -196, 205, - -196, -196, -196, -196, -196, -196, -196, -196, -196, 207, - -196, -196, 210, -196, 212, -196, 215, 217, -196, -196, - 218, 219, -196, 221, -196, -196, -196, -196, -196, -196, - -196, -196, -196, -196, -196, -196, -196, 155, 158, -196, - -196, -196, 46, -196, -196, -196, -196, 204, 224, -196, - -196, -196, 225, -196, -196, -196, -196, 159, -196, -196, - 227, -196, -196, 161, 231, 167, -196 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -196, -196, -196, -196, -196, -196, -110, -196, 39, -196, - -196, -196, -9, -196, 42, -195, -33, -53 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const yytype_uint16 yytable[] = -{ - 105, 254, 255, 185, 184, 119, 120, 237, 68, 69, - 70, 71, 238, 133, 121, 110, 239, 101, 111, 50, - 112, 113, 108, 153, 278, 155, 156, 53, 51, 115, - 72, 73, 162, 116, 117, 52, 136, 55, 138, 54, - 140, 56, 172, 75, 76, 57, 176, 77, 78, 159, - 160, 126, 127, 89, 90, 131, 132, 167, 134, 135, - 58, 137, 192, 193, 201, 202, 152, 203, 204, 205, - 206, 157, 158, 129, 242, 161, 141, 163, 164, 212, - 213, 59, 60, 61, 62, 63, 64, 65, 67, 142, - 143, 144, 66, 74, 80, 300, 79, 81, 106, 82, - 145, 146, 147, 148, 149, 150, 151, 83, 84, 128, - 85, 86, 87, 88, 312, 91, 92, 93, 94, 103, - 95, 96, 97, 98, 100, 233, 234, 99, 236, 123, - 178, 179, 129, 243, 244, 245, 139, 180, 154, 165, - 250, 251, 166, 168, 169, 170, 181, 171, 173, 260, - 182, 183, 207, 265, 186, 187, 246, 247, 248, 188, - 174, 189, 274, 190, 276, 256, 257, 258, 175, 177, - 282, 263, 191, 194, 284, 285, 268, 269, 195, 286, - 272, 196, 197, 275, 198, 277, 199, 279, 280, 281, - 200, 283, 208, 259, 209, 210, 211, 214, 0, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 230, 231, 232, 235, 249, 287, - 288, 307, 241, 289, 261, 264, 290, 267, 291, 270, - 292, 271, 273, 293, 294, 295, 299, 296, 301, 297, - 308, 309, 298, 310, 313, 314, 2, 3, 315, 266, - 0, 316, 0, 0, 0, 311, 0, 0, 0, 0, - 303, 304, 305, 306, 4, 5, 0, 0, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 0, 0, 0, - 0, 0, 0, 302, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 0, 33, 34, 35, 36, 37, 0, 0, - 0, 38, 39, 40, 41, 42, 43, 44, 45, 0, - 0, 0, 0, 0, 0, 0, 46, 47 -}; - -static const yytype_int16 yycheck[] = -{ - 53, 196, 197, 113, 15, 4, 5, 5, 15, 16, - 15, 16, 10, 66, 13, 3, 14, 83, 6, 16, - 8, 9, 55, 76, 219, 78, 79, 16, 15, 7, - 15, 16, 85, 11, 12, 15, 69, 16, 71, 15, - 73, 15, 95, 15, 16, 15, 99, 15, 16, 82, - 83, 60, 61, 15, 16, 64, 65, 90, 67, 68, - 15, 70, 15, 16, 15, 16, 75, 15, 16, 15, - 16, 80, 81, 84, 184, 84, 49, 86, 87, 15, - 16, 15, 15, 15, 15, 15, 15, 15, 15, 62, - 63, 64, 16, 15, 15, 290, 16, 15, 84, 16, - 73, 74, 75, 76, 77, 78, 79, 16, 15, 84, - 16, 15, 15, 15, 309, 15, 15, 15, 15, 83, - 16, 15, 15, 15, 15, 178, 179, 16, 181, 83, - 16, 16, 84, 186, 187, 188, 83, 17, 83, 83, - 193, 194, 83, 83, 83, 83, 16, 84, 83, 202, - 15, 15, 15, 206, 16, 16, 189, 190, 191, 16, - 83, 16, 215, 16, 217, 198, 199, 200, 83, 83, - 223, 204, 16, 16, 227, 228, 209, 210, 16, 232, - 213, 16, 16, 216, 16, 218, 16, 220, 221, 222, - 16, 224, 15, 83, 16, 16, 15, 15, -1, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 84, 12, 17, - 15, 17, 183, 16, 84, 84, 16, 83, 16, 83, - 15, 83, 83, 16, 16, 16, 289, 16, 291, 84, - 16, 16, 84, 84, 17, 84, 0, 1, 17, 207, - -1, 84, -1, -1, -1, 308, -1, -1, -1, -1, - 293, 294, 295, 296, 18, 19, -1, -1, 22, 23, - 24, 25, 26, 27, 28, 29, 30, -1, -1, -1, - -1, -1, -1, 292, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, -1, 57, 58, 59, 60, 61, -1, -1, - -1, 65, 66, 67, 68, 69, 70, 71, 72, -1, - -1, -1, -1, -1, -1, -1, 80, 81 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 86, 0, 1, 18, 19, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 57, 58, 59, 60, 61, 65, 66, - 67, 68, 69, 70, 71, 72, 80, 81, 87, 88, - 16, 15, 15, 16, 15, 16, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 16, 15, 15, 16, - 15, 16, 15, 16, 15, 15, 16, 15, 16, 16, - 15, 15, 16, 16, 15, 16, 15, 15, 15, 15, - 16, 15, 15, 15, 15, 16, 15, 15, 15, 16, - 15, 83, 89, 83, 90, 102, 84, 92, 101, 102, - 3, 6, 8, 9, 94, 7, 11, 12, 95, 4, - 5, 13, 96, 83, 97, 98, 97, 97, 84, 84, - 91, 97, 97, 102, 97, 97, 101, 97, 101, 83, - 101, 49, 62, 63, 64, 73, 74, 75, 76, 77, - 78, 79, 97, 102, 83, 102, 102, 97, 97, 101, - 101, 97, 102, 97, 97, 83, 83, 101, 83, 83, - 83, 84, 102, 83, 83, 83, 102, 83, 16, 16, - 17, 16, 15, 15, 15, 91, 16, 16, 16, 16, - 16, 16, 15, 16, 16, 16, 16, 16, 16, 16, - 16, 15, 16, 15, 16, 15, 16, 15, 15, 16, - 16, 15, 15, 16, 15, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 102, 102, 84, 102, 5, 10, 14, - 93, 93, 91, 102, 102, 102, 101, 101, 101, 12, - 102, 102, 100, 101, 100, 100, 101, 101, 101, 83, - 102, 84, 99, 101, 84, 102, 99, 83, 101, 101, - 83, 83, 101, 83, 102, 101, 102, 101, 100, 101, - 101, 101, 102, 101, 102, 102, 102, 17, 15, 16, - 16, 16, 15, 16, 16, 16, 16, 84, 84, 102, - 100, 102, 97, 101, 101, 101, 101, 17, 16, 16, - 84, 102, 100, 17, 84, 17, 84 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) -#else -static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - fprintf (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - fprintf (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - -/* The look-ahead symbol. */ -int yychar; - -/* The semantic value of the look-ahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to look-ahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a look-ahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - if (yyn == YYFINAL) - YYACCEPT; - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 3: -#line 132 "ftpcmd.y" - { - fromname = (char *) 0; - restart_point = (off_t) 0; - } - break; - - case 5: -#line 141 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) - user((yyvsp[(3) - (5)].s)); - free((yyvsp[(3) - (5)].s)); - } - break; - - case 6: -#line 147 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) - pass((yyvsp[(3) - (5)].s)); - memset ((yyvsp[(3) - (5)].s), 0, strlen((yyvsp[(3) - (5)].s))); - free((yyvsp[(3) - (5)].s)); - } - break; - - case 7: -#line 155 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) { - if (paranoid && - (data_dest->sa_family != his_addr->sa_family || - (socket_get_port(data_dest) < IPPORT_RESERVED) || - memcmp(socket_get_address(data_dest), - socket_get_address(his_addr), - socket_addr_size(his_addr)) != 0)) { - usedefault = 1; - reply(500, "Illegal PORT range rejected."); - } else { - usedefault = 0; - if (pdata >= 0) { - close(pdata); - pdata = -1; - } - reply(200, "PORT command successful."); - } - } - } - break; - - case 8: -#line 176 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) - eprt ((yyvsp[(3) - (5)].s)); - free ((yyvsp[(3) - (5)].s)); - } - break; - - case 9: -#line 182 "ftpcmd.y" - { - if((yyvsp[(3) - (3)].i)) - pasv (); - } - break; - - case 10: -#line 187 "ftpcmd.y" - { - if((yyvsp[(3) - (3)].i)) - epsv (NULL); - } - break; - - case 11: -#line 192 "ftpcmd.y" - { - if((yyvsp[(5) - (5)].i)) - epsv ((yyvsp[(3) - (5)].s)); - free ((yyvsp[(3) - (5)].s)); - } - break; - - case 12: -#line 198 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) { - switch (cmd_type) { - - case TYPE_A: - if (cmd_form == FORM_N) { - reply(200, "Type set to A."); - type = cmd_type; - form = cmd_form; - } else - reply(504, "Form must be N."); - break; - - case TYPE_E: - reply(504, "Type E not implemented."); - break; - - case TYPE_I: - reply(200, "Type set to I."); - type = cmd_type; - break; - - case TYPE_L: -#if NBBY == 8 - if (cmd_bytesz == 8) { - reply(200, - "Type set to L (byte size 8)."); - type = cmd_type; - } else - reply(504, "Byte size must be 8."); -#else /* NBBY == 8 */ - UNIMPLEMENTED for NBBY != 8 -#endif /* NBBY == 8 */ - } - } - } - break; - - case 13: -#line 235 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) { - switch ((yyvsp[(3) - (5)].i)) { - - case STRU_F: - reply(200, "STRU F ok."); - break; - - default: - reply(504, "Unimplemented STRU type."); - } - } - } - break; - - case 14: -#line 249 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) { - switch ((yyvsp[(3) - (5)].i)) { - - case MODE_S: - reply(200, "MODE S ok."); - break; - - default: - reply(502, "Unimplemented MODE type."); - } - } - } - break; - - case 15: -#line 263 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) { - reply(202, "ALLO command ignored."); - } - } - break; - - case 16: -#line 269 "ftpcmd.y" - { - if ((yyvsp[(9) - (9)].i)) { - reply(202, "ALLO command ignored."); - } - } - break; - - case 17: -#line 275 "ftpcmd.y" - { - char *name = (yyvsp[(3) - (5)].s); - - if ((yyvsp[(5) - (5)].i) && name != NULL) - retrieve(0, name); - if (name != NULL) - free(name); - } - break; - - case 18: -#line 284 "ftpcmd.y" - { - char *name = (yyvsp[(3) - (5)].s); - - if ((yyvsp[(5) - (5)].i) && name != NULL) - do_store(name, "w", 0); - if (name != NULL) - free(name); - } - break; - - case 19: -#line 293 "ftpcmd.y" - { - char *name = (yyvsp[(3) - (5)].s); - - if ((yyvsp[(5) - (5)].i) && name != NULL) - do_store(name, "a", 0); - if (name != NULL) - free(name); - } - break; - - case 20: -#line 302 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) - send_file_list("."); - } - break; - - case 21: -#line 307 "ftpcmd.y" - { - char *name = (yyvsp[(3) - (5)].s); - - if ((yyvsp[(5) - (5)].i) && name != NULL) - send_file_list(name); - if (name != NULL) - free(name); - } - break; - - case 22: -#line 316 "ftpcmd.y" - { - if((yyvsp[(3) - (3)].i)) - list_file("."); - } - break; - - case 23: -#line 321 "ftpcmd.y" - { - if((yyvsp[(5) - (5)].i)) - list_file((yyvsp[(3) - (5)].s)); - free((yyvsp[(3) - (5)].s)); - } - break; - - case 24: -#line 327 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i) && (yyvsp[(3) - (5)].s) != NULL) - statfilecmd((yyvsp[(3) - (5)].s)); - if ((yyvsp[(3) - (5)].s) != NULL) - free((yyvsp[(3) - (5)].s)); - } - break; - - case 25: -#line 334 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) - statcmd(); - } - break; - - case 26: -#line 339 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i) && (yyvsp[(3) - (5)].s) != NULL) - do_delete((yyvsp[(3) - (5)].s)); - if ((yyvsp[(3) - (5)].s) != NULL) - free((yyvsp[(3) - (5)].s)); - } - break; - - case 27: -#line 346 "ftpcmd.y" - { - if((yyvsp[(5) - (5)].i)){ - if (fromname) { - renamecmd(fromname, (yyvsp[(3) - (5)].s)); - free(fromname); - fromname = (char *) 0; - } else { - reply(503, "Bad sequence of commands."); - } - } - if ((yyvsp[(3) - (5)].s) != NULL) - free((yyvsp[(3) - (5)].s)); - } - break; - - case 28: -#line 360 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) - reply(225, "ABOR command successful."); - } - break; - - case 29: -#line 365 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) { - const char *path = pw->pw_dir; - if (dochroot || guest) - path = "/"; - cwd(path); - } - } - break; - - case 30: -#line 374 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i) && (yyvsp[(3) - (5)].s) != NULL) - cwd((yyvsp[(3) - (5)].s)); - if ((yyvsp[(3) - (5)].s) != NULL) - free((yyvsp[(3) - (5)].s)); - } - break; - - case 31: -#line 381 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) - help(cmdtab, (char *) 0); - } - break; - - case 32: -#line 386 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) { - char *cp = (yyvsp[(3) - (5)].s); - - if (strncasecmp(cp, "SITE", 4) == 0) { - cp = (yyvsp[(3) - (5)].s) + 4; - if (*cp == ' ') - cp++; - if (*cp) - help(sitetab, cp); - else - help(sitetab, (char *) 0); - } else - help(cmdtab, (yyvsp[(3) - (5)].s)); - } - } - break; - - case 33: -#line 403 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) - reply(200, "NOOP command successful."); - } - break; - - case 34: -#line 408 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i) && (yyvsp[(3) - (5)].s) != NULL) - makedir((yyvsp[(3) - (5)].s)); - if ((yyvsp[(3) - (5)].s) != NULL) - free((yyvsp[(3) - (5)].s)); - } - break; - - case 35: -#line 415 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i) && (yyvsp[(3) - (5)].s) != NULL) - removedir((yyvsp[(3) - (5)].s)); - if ((yyvsp[(3) - (5)].s) != NULL) - free((yyvsp[(3) - (5)].s)); - } - break; - - case 36: -#line 422 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) - pwd(); - } - break; - - case 37: -#line 427 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) - cwd(".."); - } - break; - - case 38: -#line 432 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) { - lreply(211, "Supported features:"); - lreply(0, " MDTM"); - lreply(0, " REST STREAM"); - lreply(0, " SIZE"); - reply(211, "End"); - } - } - break; - - case 39: -#line 442 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) - reply(501, "Bad options"); - free ((yyvsp[(3) - (5)].s)); - } - break; - - case 40: -#line 449 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) - help(sitetab, (char *) 0); - } - break; - - case 41: -#line 454 "ftpcmd.y" - { - if ((yyvsp[(7) - (7)].i)) - help(sitetab, (yyvsp[(5) - (7)].s)); - } - break; - - case 42: -#line 459 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) { - int oldmask = umask(0); - umask(oldmask); - reply(200, "Current UMASK is %03o", oldmask); - } - } - break; - - case 43: -#line 467 "ftpcmd.y" - { - if ((yyvsp[(7) - (7)].i)) { - if (((yyvsp[(5) - (7)].i) == -1) || ((yyvsp[(5) - (7)].i) > 0777)) { - reply(501, "Bad UMASK value"); - } else { - int oldmask = umask((yyvsp[(5) - (7)].i)); - reply(200, - "UMASK set to %03o (was %03o)", - (yyvsp[(5) - (7)].i), oldmask); - } - } - } - break; - - case 44: -#line 480 "ftpcmd.y" - { - if ((yyvsp[(9) - (9)].i) && (yyvsp[(7) - (9)].s) != NULL) { - if ((yyvsp[(5) - (9)].i) > 0777) - reply(501, - "CHMOD: Mode value must be between 0 and 0777"); - else if (chmod((yyvsp[(7) - (9)].s), (yyvsp[(5) - (9)].i)) < 0) - perror_reply(550, (yyvsp[(7) - (9)].s)); - else - reply(200, "CHMOD command successful."); - } - if ((yyvsp[(7) - (9)].s) != NULL) - free((yyvsp[(7) - (9)].s)); - } - break; - - case 45: -#line 494 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) - reply(200, - "Current IDLE time limit is %d seconds; max %d", - ftpd_timeout, maxtimeout); - } - break; - - case 46: -#line 501 "ftpcmd.y" - { - if ((yyvsp[(7) - (7)].i)) { - if ((yyvsp[(5) - (7)].i) < 30 || (yyvsp[(5) - (7)].i) > maxtimeout) { - reply(501, - "Maximum IDLE time must be between 30 and %d seconds", - maxtimeout); - } else { - ftpd_timeout = (yyvsp[(5) - (7)].i); - alarm((unsigned) ftpd_timeout); - reply(200, - "Maximum IDLE time set to %d seconds", - ftpd_timeout); - } - } - } - break; - - case 47: -#line 518 "ftpcmd.y" - { - reply(500, "Command not implemented."); - } - break; - - case 48: -#line 522 "ftpcmd.y" - { - if((yyvsp[(5) - (5)].i)) - klist(); - } - break; - - case 49: -#line 527 "ftpcmd.y" - { - reply(500, "Command not implemented."); - } - break; - - case 50: -#line 531 "ftpcmd.y" - { - reply(500, "Command not implemented."); - } - break; - - case 51: -#line 535 "ftpcmd.y" - { -#if defined(KRB5) - if(guest) - reply(500, "Can't be done as guest."); - else if((yyvsp[(5) - (5)].i)) - afslog(NULL, 0); -#else - reply(500, "Command not implemented."); -#endif - } - break; - - case 52: -#line 546 "ftpcmd.y" - { -#if defined(KRB5) - if(guest) - reply(500, "Can't be done as guest."); - else if((yyvsp[(7) - (7)].i)) - afslog((yyvsp[(5) - (7)].s), 0); - if((yyvsp[(5) - (7)].s)) - free((yyvsp[(5) - (7)].s)); -#else - reply(500, "Command not implemented."); -#endif - } - break; - - case 53: -#line 559 "ftpcmd.y" - { - if((yyvsp[(7) - (7)].i) && (yyvsp[(5) - (7)].s) != NULL) - find((yyvsp[(5) - (7)].s)); - if((yyvsp[(5) - (7)].s) != NULL) - free((yyvsp[(5) - (7)].s)); - } - break; - - case 54: -#line 566 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) - reply(200, "http://www.pdc.kth.se/heimdal/"); - } - break; - - case 55: -#line 571 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i) && (yyvsp[(3) - (5)].s) != NULL) - do_store((yyvsp[(3) - (5)].s), "w", 1); - if ((yyvsp[(3) - (5)].s) != NULL) - free((yyvsp[(3) - (5)].s)); - } - break; - - case 56: -#line 578 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) { -#if !defined(WIN32) && !defined(__EMX__) && !defined(__OS2__) && !defined(__CYGWIN32__) - reply(215, "UNIX Type: L%d", NBBY); -#else - reply(215, "UNKNOWN Type: L%d", NBBY); -#endif - } - } - break; - - case 57: -#line 596 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i) && (yyvsp[(3) - (5)].s) != NULL) - sizecmd((yyvsp[(3) - (5)].s)); - if ((yyvsp[(3) - (5)].s) != NULL) - free((yyvsp[(3) - (5)].s)); - } - break; - - case 58: -#line 613 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i) && (yyvsp[(3) - (5)].s) != NULL) { - struct stat stbuf; - if (stat((yyvsp[(3) - (5)].s), &stbuf) < 0) - reply(550, "%s: %s", - (yyvsp[(3) - (5)].s), strerror(errno)); - else if (!S_ISREG(stbuf.st_mode)) { - reply(550, - "%s: not a plain file.", (yyvsp[(3) - (5)].s)); - } else { - struct tm *t; - time_t mtime = stbuf.st_mtime; - - t = gmtime(&mtime); - reply(213, - "%04d%02d%02d%02d%02d%02d", - t->tm_year + 1900, - t->tm_mon + 1, - t->tm_mday, - t->tm_hour, - t->tm_min, - t->tm_sec); - } - } - if ((yyvsp[(3) - (5)].s) != NULL) - free((yyvsp[(3) - (5)].s)); - } - break; - - case 59: -#line 641 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) { - reply(221, "Goodbye."); - dologout(0); - } - } - break; - - case 60: -#line 648 "ftpcmd.y" - { - yyerrok; - } - break; - - case 61: -#line 654 "ftpcmd.y" - { - restart_point = (off_t) 0; - if ((yyvsp[(5) - (5)].i) && (yyvsp[(3) - (5)].s)) { - fromname = renamefrom((yyvsp[(3) - (5)].s)); - if (fromname == (char *) 0 && (yyvsp[(3) - (5)].s)) { - free((yyvsp[(3) - (5)].s)); - } - } - } - break; - - case 62: -#line 664 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) { - fromname = (char *) 0; - restart_point = (yyvsp[(3) - (5)].i); /* XXX $3 is only "int" */ - reply(350, "Restarting at %ld. %s", - (long)restart_point, - "Send STORE or RETRIEVE to initiate transfer."); - } - } - break; - - case 63: -#line 674 "ftpcmd.y" - { - auth((yyvsp[(3) - (4)].s)); - free((yyvsp[(3) - (4)].s)); - } - break; - - case 64: -#line 679 "ftpcmd.y" - { - adat((yyvsp[(3) - (4)].s)); - free((yyvsp[(3) - (4)].s)); - } - break; - - case 65: -#line 684 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) - pbsz((yyvsp[(3) - (5)].i)); - } - break; - - case 66: -#line 689 "ftpcmd.y" - { - if ((yyvsp[(5) - (5)].i)) - prot((yyvsp[(3) - (5)].s)); - } - break; - - case 67: -#line 694 "ftpcmd.y" - { - if ((yyvsp[(3) - (3)].i)) - ccc(); - } - break; - - case 68: -#line 699 "ftpcmd.y" - { - mec((yyvsp[(3) - (4)].s), prot_safe); - free((yyvsp[(3) - (4)].s)); - } - break; - - case 69: -#line 704 "ftpcmd.y" - { - mec((yyvsp[(3) - (4)].s), prot_confidential); - free((yyvsp[(3) - (4)].s)); - } - break; - - case 70: -#line 709 "ftpcmd.y" - { - mec((yyvsp[(3) - (4)].s), prot_private); - free((yyvsp[(3) - (4)].s)); - } - break; - - case 72: -#line 721 "ftpcmd.y" - { - (yyval.s) = (char *)calloc(1, sizeof(char)); - } - break; - - case 75: -#line 734 "ftpcmd.y" - { - struct sockaddr_in *sin4 = (struct sockaddr_in *)data_dest; - - sin4->sin_family = AF_INET; - sin4->sin_port = htons((yyvsp[(9) - (11)].i) * 256 + (yyvsp[(11) - (11)].i)); - sin4->sin_addr.s_addr = - htonl(((yyvsp[(1) - (11)].i) << 24) | ((yyvsp[(3) - (11)].i) << 16) | ((yyvsp[(5) - (11)].i) << 8) | (yyvsp[(7) - (11)].i)); - } - break; - - case 76: -#line 746 "ftpcmd.y" - { - (yyval.i) = FORM_N; - } - break; - - case 77: -#line 750 "ftpcmd.y" - { - (yyval.i) = FORM_T; - } - break; - - case 78: -#line 754 "ftpcmd.y" - { - (yyval.i) = FORM_C; - } - break; - - case 79: -#line 761 "ftpcmd.y" - { - cmd_type = TYPE_A; - cmd_form = FORM_N; - } - break; - - case 80: -#line 766 "ftpcmd.y" - { - cmd_type = TYPE_A; - cmd_form = (yyvsp[(3) - (3)].i); - } - break; - - case 81: -#line 771 "ftpcmd.y" - { - cmd_type = TYPE_E; - cmd_form = FORM_N; - } - break; - - case 82: -#line 776 "ftpcmd.y" - { - cmd_type = TYPE_E; - cmd_form = (yyvsp[(3) - (3)].i); - } - break; - - case 83: -#line 781 "ftpcmd.y" - { - cmd_type = TYPE_I; - } - break; - - case 84: -#line 785 "ftpcmd.y" - { - cmd_type = TYPE_L; - cmd_bytesz = NBBY; - } - break; - - case 85: -#line 790 "ftpcmd.y" - { - cmd_type = TYPE_L; - cmd_bytesz = (yyvsp[(3) - (3)].i); - } - break; - - case 86: -#line 796 "ftpcmd.y" - { - cmd_type = TYPE_L; - cmd_bytesz = (yyvsp[(2) - (2)].i); - } - break; - - case 87: -#line 804 "ftpcmd.y" - { - (yyval.i) = STRU_F; - } - break; - - case 88: -#line 808 "ftpcmd.y" - { - (yyval.i) = STRU_R; - } - break; - - case 89: -#line 812 "ftpcmd.y" - { - (yyval.i) = STRU_P; - } - break; - - case 90: -#line 819 "ftpcmd.y" - { - (yyval.i) = MODE_S; - } - break; - - case 91: -#line 823 "ftpcmd.y" - { - (yyval.i) = MODE_B; - } - break; - - case 92: -#line 827 "ftpcmd.y" - { - (yyval.i) = MODE_C; - } - break; - - case 93: -#line 834 "ftpcmd.y" - { - /* - * Problem: this production is used for all pathname - * processing, but only gives a 550 error reply. - * This is a valid reply in some cases but not in others. - */ - if (logged_in && (yyvsp[(1) - (1)].s) && *(yyvsp[(1) - (1)].s) == '~') { - glob_t gl; - int flags = - GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE; - - memset(&gl, 0, sizeof(gl)); - if (glob((yyvsp[(1) - (1)].s), flags, NULL, &gl) || - gl.gl_pathc == 0) { - reply(550, "not found"); - (yyval.s) = NULL; - } else { - (yyval.s) = strdup(gl.gl_pathv[0]); - } - globfree(&gl); - free((yyvsp[(1) - (1)].s)); - } else - (yyval.s) = (yyvsp[(1) - (1)].s); - } - break; - - case 95: -#line 866 "ftpcmd.y" - { - int ret, dec, multby, digit; - - /* - * Convert a number that was read as decimal number - * to what it would be if it had been read as octal. - */ - dec = (yyvsp[(1) - (1)].i); - multby = 1; - ret = 0; - while (dec) { - digit = dec%10; - if (digit > 7) { - ret = -1; - break; - } - ret += digit * multby; - multby *= 8; - dec /= 10; - } - (yyval.i) = ret; - } - break; - - case 96: -#line 892 "ftpcmd.y" - { - (yyval.i) = (yyvsp[(1) - (1)].i) && !guest; - if((yyvsp[(1) - (1)].i) && !(yyval.i)) - reply(550, "Permission denied"); - } - break; - - case 97: -#line 900 "ftpcmd.y" - { - if((yyvsp[(1) - (1)].i)) { - if(((yyval.i) = logged_in) == 0) - reply(530, "Please login with USER and PASS."); - } else - (yyval.i) = 0; - } - break; - - case 98: -#line 910 "ftpcmd.y" - { - (yyval.i) = 1; - if(sec_complete && !ccc_passed && !secure_command()) { - (yyval.i) = 0; - reply(533, "Command protection level denied " - "for paranoid reasons."); - } - } - break; - - -/* Line 1267 of yacc.c. */ -#line 2759 "ftpcmd.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse look-ahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - if (yyn == YYFINAL) - YYACCEPT; - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - -#line 920 "ftpcmd.y" - - -#define CMD 0 /* beginning of command */ -#define ARGS 1 /* expect miscellaneous arguments */ -#define STR1 2 /* expect SP followed by STRING */ -#define STR2 3 /* expect STRING */ -#define OSTR 4 /* optional SP then STRING */ -#define ZSTR1 5 /* SP then optional STRING */ -#define ZSTR2 6 /* optional STRING after SP */ -#define SITECMD 7 /* SITE command */ -#define NSTR 8 /* Number followed by a string */ - -struct tab cmdtab[] = { /* In order defined in RFC 765 */ - { "USER", USER, STR1, 1, " username" }, - { "PASS", PASS, ZSTR1, 1, " password" }, - { "ACCT", ACCT, STR1, 0, "(specify account)" }, - { "SMNT", SMNT, ARGS, 0, "(structure mount)" }, - { "REIN", REIN, ARGS, 0, "(reinitialize server state)" }, - { "QUIT", QUIT, ARGS, 1, "(terminate service)", }, - { "PORT", PORT, ARGS, 1, " b0, b1, b2, b3, b4" }, - { "EPRT", EPRT, STR1, 1, " string" }, - { "PASV", PASV, ARGS, 1, "(set server in passive mode)" }, - { "EPSV", EPSV, OSTR, 1, "[ foo]" }, - { "TYPE", TYPE, ARGS, 1, " [ A | E | I | L ]" }, - { "STRU", STRU, ARGS, 1, "(specify file structure)" }, - { "MODE", MODE, ARGS, 1, "(specify transfer mode)" }, - { "RETR", RETR, STR1, 1, " file-name" }, - { "STOR", STOR, STR1, 1, " file-name" }, - { "APPE", APPE, STR1, 1, " file-name" }, - { "MLFL", MLFL, OSTR, 0, "(mail file)" }, - { "MAIL", MAIL, OSTR, 0, "(mail to user)" }, - { "MSND", MSND, OSTR, 0, "(mail send to terminal)" }, - { "MSOM", MSOM, OSTR, 0, "(mail send to terminal or mailbox)" }, - { "MSAM", MSAM, OSTR, 0, "(mail send to terminal and mailbox)" }, - { "MRSQ", MRSQ, OSTR, 0, "(mail recipient scheme question)" }, - { "MRCP", MRCP, STR1, 0, "(mail recipient)" }, - { "ALLO", ALLO, ARGS, 1, "allocate storage (vacuously)" }, - { "REST", REST, ARGS, 1, " offset (restart command)" }, - { "RNFR", RNFR, STR1, 1, " file-name" }, - { "RNTO", RNTO, STR1, 1, " file-name" }, - { "ABOR", ABOR, ARGS, 1, "(abort operation)" }, - { "DELE", DELE, STR1, 1, " file-name" }, - { "CWD", CWD, OSTR, 1, "[ directory-name ]" }, - { "XCWD", CWD, OSTR, 1, "[ directory-name ]" }, - { "LIST", LIST, OSTR, 1, "[ path-name ]" }, - { "NLST", NLST, OSTR, 1, "[ path-name ]" }, - { "SITE", SITE, SITECMD, 1, "site-cmd [ arguments ]" }, - { "SYST", SYST, ARGS, 1, "(get type of operating system)" }, - { "STAT", sTAT, OSTR, 1, "[ path-name ]" }, - { "HELP", HELP, OSTR, 1, "[ ]" }, - { "NOOP", NOOP, ARGS, 1, "" }, - { "MKD", MKD, STR1, 1, " path-name" }, - { "XMKD", MKD, STR1, 1, " path-name" }, - { "RMD", RMD, STR1, 1, " path-name" }, - { "XRMD", RMD, STR1, 1, " path-name" }, - { "PWD", PWD, ARGS, 1, "(return current directory)" }, - { "XPWD", PWD, ARGS, 1, "(return current directory)" }, - { "CDUP", CDUP, ARGS, 1, "(change to parent directory)" }, - { "XCUP", CDUP, ARGS, 1, "(change to parent directory)" }, - { "STOU", STOU, STR1, 1, " file-name" }, - { "SIZE", SIZE, OSTR, 1, " path-name" }, - { "MDTM", MDTM, OSTR, 1, " path-name" }, - - /* extensions from RFC2228 */ - { "AUTH", AUTH, STR1, 1, " auth-type" }, - { "ADAT", ADAT, STR1, 1, " auth-data" }, - { "PBSZ", PBSZ, ARGS, 1, " buffer-size" }, - { "PROT", PROT, STR1, 1, " prot-level" }, - { "CCC", CCC, ARGS, 1, "" }, - { "MIC", MIC, STR1, 1, " integrity command" }, - { "CONF", CONF, STR1, 1, " confidentiality command" }, - { "ENC", ENC, STR1, 1, " privacy command" }, - - /* RFC2389 */ - { "FEAT", FEAT, ARGS, 1, "" }, - { "OPTS", OPTS, ARGS, 1, " command [ options]" }, - - { NULL, 0, 0, 0, 0 } -}; - -struct tab sitetab[] = { - { "UMASK", UMASK, ARGS, 1, "[ umask ]" }, - { "IDLE", IDLE, ARGS, 1, "[ maximum-idle-time ]" }, - { "CHMOD", CHMOD, NSTR, 1, " mode file-name" }, - { "HELP", HELP, OSTR, 1, "[ ]" }, - - { "KAUTH", KAUTH, STR1, 1, " principal [ ticket ]" }, - { "KLIST", KLIST, ARGS, 1, "(show ticket file)" }, - { "KDESTROY", KDESTROY, ARGS, 1, "(destroy tickets)" }, - { "KRBTKFILE", KRBTKFILE, STR1, 1, " ticket-file" }, - { "AFSLOG", AFSLOG, OSTR, 1, "[ cell]" }, - - { "LOCATE", LOCATE, STR1, 1, " globexpr" }, - { "FIND", LOCATE, STR1, 1, " globexpr" }, - - { "URL", URL, ARGS, 1, "?" }, - - { NULL, 0, 0, 0, 0 } -}; - -static struct tab * -lookup(struct tab *p, char *cmd) -{ - - for (; p->name != NULL; p++) - if (strcmp(cmd, p->name) == 0) - return (p); - return (0); -} - -/* - * ftpd_getline - a hacked up version of fgets to ignore TELNET escape codes. - */ -char * -ftpd_getline(char *s, int n) -{ - int c; - char *cs; - - cs = s; - - /* might still be data within the security MIC/CONF/ENC */ - if(ftp_command){ - strlcpy(s, ftp_command, n); - if (debug) - syslog(LOG_DEBUG, "command: %s", s); - return s; - } - while ((c = getc(stdin)) != EOF) { - c &= 0377; - if (c == IAC) { - if ((c = getc(stdin)) != EOF) { - c &= 0377; - switch (c) { - case WILL: - case WONT: - c = getc(stdin); - printf("%c%c%c", IAC, DONT, 0377&c); - fflush(stdout); - continue; - case DO: - case DONT: - c = getc(stdin); - printf("%c%c%c", IAC, WONT, 0377&c); - fflush(stdout); - continue; - case IAC: - break; - default: - continue; /* ignore command */ - } - } - } - *cs++ = c; - if (--n <= 0 || c == '\n') - break; - } - if (c == EOF && cs == s) - return (NULL); - *cs++ = '\0'; - if (debug) { - if (!guest && strncasecmp("pass ", s, 5) == 0) { - /* Don't syslog passwords */ - syslog(LOG_DEBUG, "command: %.5s ???", s); - } else { - char *cp; - int len; - - /* Don't syslog trailing CR-LF */ - len = strlen(s); - cp = s + len - 1; - while (cp >= s && (*cp == '\n' || *cp == '\r')) { - --cp; - --len; - } - syslog(LOG_DEBUG, "command: %.*s", len, s); - } - } -#ifdef XXX - fprintf(stderr, "%s\n", s); -#endif - return (s); -} - -static RETSIGTYPE -toolong(int signo) -{ - - reply(421, - "Timeout (%d seconds): closing control connection.", - ftpd_timeout); - if (logging) - syslog(LOG_INFO, "User %s timed out after %d seconds", - (pw ? pw -> pw_name : "unknown"), ftpd_timeout); - dologout(1); - SIGRETURN(0); -} - -static int -yylex(void) -{ - static int cpos, state; - char *cp, *cp2; - struct tab *p; - int n; - char c; - - for (;;) { - switch (state) { - - case CMD: - hasyyerrored = 0; - - signal(SIGALRM, toolong); - alarm((unsigned) ftpd_timeout); - if (ftpd_getline(cbuf, sizeof(cbuf)-1) == NULL) { - reply(221, "You could at least say goodbye."); - dologout(0); - } - alarm(0); -#ifdef HAVE_SETPROCTITLE - if (strncasecmp(cbuf, "PASS", 4) != 0) - setproctitle("%s: %s", proctitle, cbuf); -#endif /* HAVE_SETPROCTITLE */ - if ((cp = strchr(cbuf, '\r'))) { - *cp++ = '\n'; - *cp = '\0'; - } - if ((cp = strpbrk(cbuf, " \n"))) - cpos = cp - cbuf; - if (cpos == 0) - cpos = 4; - c = cbuf[cpos]; - cbuf[cpos] = '\0'; - strupr(cbuf); - p = lookup(cmdtab, cbuf); - cbuf[cpos] = c; - if (p != 0) { - if (p->implemented == 0) { - nack(p->name); - hasyyerrored = 1; - break; - } - state = p->state; - yylval.s = p->name; - return (p->token); - } - break; - - case SITECMD: - if (cbuf[cpos] == ' ') { - cpos++; - return (SP); - } - cp = &cbuf[cpos]; - if ((cp2 = strpbrk(cp, " \n"))) - cpos = cp2 - cbuf; - c = cbuf[cpos]; - cbuf[cpos] = '\0'; - strupr(cp); - p = lookup(sitetab, cp); - cbuf[cpos] = c; - if (p != 0) { - if (p->implemented == 0) { - state = CMD; - nack(p->name); - hasyyerrored = 1; - break; - } - state = p->state; - yylval.s = p->name; - return (p->token); - } - state = CMD; - break; - - case OSTR: - if (cbuf[cpos] == '\n') { - state = CMD; - return (CRLF); - } - /* FALLTHROUGH */ - - case STR1: - case ZSTR1: - dostr1: - if (cbuf[cpos] == ' ') { - cpos++; - if(state == OSTR) - state = STR2; - else - state++; - return (SP); - } - break; - - case ZSTR2: - if (cbuf[cpos] == '\n') { - state = CMD; - return (CRLF); - } - /* FALLTHROUGH */ - - case STR2: - cp = &cbuf[cpos]; - n = strlen(cp); - cpos += n - 1; - /* - * Make sure the string is nonempty and \n terminated. - */ - if (n > 1 && cbuf[cpos] == '\n') { - cbuf[cpos] = '\0'; - yylval.s = copy(cp); - cbuf[cpos] = '\n'; - state = ARGS; - return (STRING); - } - break; - - case NSTR: - if (cbuf[cpos] == ' ') { - cpos++; - return (SP); - } - if (isdigit((unsigned char)cbuf[cpos])) { - cp = &cbuf[cpos]; - while (isdigit((unsigned char)cbuf[++cpos])) - ; - c = cbuf[cpos]; - cbuf[cpos] = '\0'; - yylval.i = atoi(cp); - cbuf[cpos] = c; - state = STR1; - return (NUMBER); - } - state = STR1; - goto dostr1; - - case ARGS: - if (isdigit((unsigned char)cbuf[cpos])) { - cp = &cbuf[cpos]; - while (isdigit((unsigned char)cbuf[++cpos])) - ; - c = cbuf[cpos]; - cbuf[cpos] = '\0'; - yylval.i = atoi(cp); - cbuf[cpos] = c; - return (NUMBER); - } - switch (cbuf[cpos++]) { - - case '\n': - state = CMD; - return (CRLF); - - case ' ': - return (SP); - - case ',': - return (COMMA); - - case 'A': - case 'a': - return (A); - - case 'B': - case 'b': - return (B); - - case 'C': - case 'c': - return (C); - - case 'E': - case 'e': - return (E); - - case 'F': - case 'f': - return (F); - - case 'I': - case 'i': - return (I); - - case 'L': - case 'l': - return (L); - - case 'N': - case 'n': - return (N); - - case 'P': - case 'p': - return (P); - - case 'R': - case 'r': - return (R); - - case 'S': - case 's': - return (S); - - case 'T': - case 't': - return (T); - - } - break; - - default: - fatal("Unknown state in scanner."); - } - yyerror(NULL); - state = CMD; - return (0); - } -} - -/* ARGSUSED */ -void -yyerror(char *s) -{ - char *cp; - - if (hasyyerrored) - return; - - if ((cp = strchr(cbuf,'\n'))) - *cp = '\0'; - reply(500, "'%s': command not understood.", cbuf); - hasyyerrored = 1; -} - -static char * -copy(char *s) -{ - char *p; - - p = strdup(s); - if (p == NULL) - fatal("Ran out of memory."); - return p; -} - -static void -help(struct tab *ctab, char *s) -{ - struct tab *c; - int width, NCMDS; - char *t; - char buf[1024]; - - if (ctab == sitetab) - t = "SITE "; - else - t = ""; - width = 0, NCMDS = 0; - for (c = ctab; c->name != NULL; c++) { - int len = strlen(c->name); - - if (len > width) - width = len; - NCMDS++; - } - width = (width + 8) &~ 7; - if (s == 0) { - int i, j, w; - int columns, lines; - - lreply(214, "The following %scommands are recognized %s.", - t, "(* =>'s unimplemented)"); - columns = 76 / width; - if (columns == 0) - columns = 1; - lines = (NCMDS + columns - 1) / columns; - for (i = 0; i < lines; i++) { - strlcpy (buf, " ", sizeof(buf)); - for (j = 0; j < columns; j++) { - c = ctab + j * lines + i; - snprintf (buf + strlen(buf), - sizeof(buf) - strlen(buf), - "%s%c", - c->name, - c->implemented ? ' ' : '*'); - if (c + lines >= &ctab[NCMDS]) - break; - w = strlen(c->name) + 1; - while (w < width) { - strlcat (buf, - " ", - sizeof(buf)); - w++; - } - } - lreply(214, "%s", buf); - } - reply(214, "Direct comments to kth-krb-bugs@pdc.kth.se"); - return; - } - strupr(s); - c = lookup(ctab, s); - if (c == (struct tab *)0) { - reply(502, "Unknown command %s.", s); - return; - } - if (c->implemented) - reply(214, "Syntax: %s%s %s", t, c->name, c->help); - else - reply(214, "%s%-*s\t%s; unimplemented.", t, width, - c->name, c->help); -} - -static void -sizecmd(char *filename) -{ - switch (type) { - case TYPE_L: - case TYPE_I: { - struct stat stbuf; - if (stat(filename, &stbuf) < 0 || !S_ISREG(stbuf.st_mode)) - reply(550, "%s: not a plain file.", filename); - else - reply(213, "%lu", (unsigned long)stbuf.st_size); - break; - } - case TYPE_A: { - FILE *fin; - int c; - size_t count; - struct stat stbuf; - fin = fopen(filename, "r"); - if (fin == NULL) { - perror_reply(550, filename); - return; - } - if (fstat(fileno(fin), &stbuf) < 0 || !S_ISREG(stbuf.st_mode)) { - reply(550, "%s: not a plain file.", filename); - fclose(fin); - return; - } - - count = 0; - while((c=getc(fin)) != EOF) { - if (c == '\n') /* will get expanded to \r\n */ - count++; - count++; - } - fclose(fin); - - reply(213, "%lu", (unsigned long)count); - break; - } - default: - reply(504, "SIZE not implemented for Type %c.", "?AEIL"[type]); - } -} - diff --git a/kerberosV/src/appl/ftp/ftpd/ftpcmd.y b/kerberosV/src/appl/ftp/ftpd/ftpcmd.y deleted file mode 100644 index ed049949061..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/ftpcmd.y +++ /dev/null @@ -1,1478 +0,0 @@ -/* $NetBSD: ftpcmd.y,v 1.6 1995/06/03 22:46:45 mycroft Exp $ */ - -/* - * Copyright (c) 1985, 1988, 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. - * - * @(#)ftpcmd.y 8.3 (Berkeley) 4/6/94 - */ - -/* - * Grammar for FTP commands. - * See RFC 959. - */ - -%{ - -#include "ftpd_locl.h" -RCSID("$Id: ftpcmd.y,v 1.3 2013/06/17 19:11:35 robert Exp $"); - -off_t restart_point; - -static int hasyyerrored; - - -static int cmd_type; -static int cmd_form; -static int cmd_bytesz; -char cbuf[64*1024]; -char *fromname; - -struct tab { - char *name; - short token; - short state; - short implemented; /* 1 if command is implemented */ - char *help; -}; - -extern struct tab cmdtab[]; -extern struct tab sitetab[]; - -static char *copy (char *); -static void help (struct tab *, char *); -static struct tab * - lookup (struct tab *, char *); -static void sizecmd (char *); -static RETSIGTYPE toolong (int); -static int yylex (void); - -/* This is for bison */ - -#if !defined(alloca) && !defined(HAVE_ALLOCA) -#define alloca(x) malloc(x) -#endif - -%} - -%union { - int i; - char *s; -} - -%token - A B C E F I - L N P R S T - - SP CRLF COMMA - - USER PASS ACCT REIN QUIT PORT - PASV TYPE STRU MODE RETR STOR - APPE MLFL MAIL MSND MSOM MSAM - MRSQ MRCP ALLO REST RNFR RNTO - ABOR DELE CWD LIST NLST SITE - sTAT HELP NOOP MKD RMD PWD - CDUP STOU SMNT SYST SIZE MDTM - EPRT EPSV - - UMASK IDLE CHMOD - - AUTH ADAT PROT PBSZ CCC MIC - CONF ENC - - KAUTH KLIST KDESTROY KRBTKFILE AFSLOG - LOCATE URL - - FEAT OPTS - - LEXERR - -%token STRING -%token NUMBER - -%type check_login check_login_no_guest check_secure octal_number byte_size -%type struct_code mode_code type_code form_code -%type pathstring pathname password username - -%start cmd_list - -%% - -cmd_list - : /* empty */ - | cmd_list cmd - { - fromname = (char *) 0; - restart_point = (off_t) 0; - } - | cmd_list rcmd - ; - -cmd - : USER SP username CRLF check_secure - { - if ($5) - user($3); - free($3); - } - | PASS SP password CRLF check_secure - { - if ($5) - pass($3); - memset ($3, 0, strlen($3)); - free($3); - } - - | PORT SP host_port CRLF check_secure - { - if ($5) { - if (paranoid && - (data_dest->sa_family != his_addr->sa_family || - (socket_get_port(data_dest) < IPPORT_RESERVED) || - memcmp(socket_get_address(data_dest), - socket_get_address(his_addr), - socket_addr_size(his_addr)) != 0)) { - usedefault = 1; - reply(500, "Illegal PORT range rejected."); - } else { - usedefault = 0; - if (pdata >= 0) { - close(pdata); - pdata = -1; - } - reply(200, "PORT command successful."); - } - } - } - | EPRT SP STRING CRLF check_secure - { - if ($5) - eprt ($3); - free ($3); - } - | PASV CRLF check_login - { - if($3) - pasv (); - } - | EPSV CRLF check_login - { - if($3) - epsv (NULL); - } - | EPSV SP STRING CRLF check_login - { - if($5) - epsv ($3); - free ($3); - } - | TYPE SP type_code CRLF check_secure - { - if ($5) { - switch (cmd_type) { - - case TYPE_A: - if (cmd_form == FORM_N) { - reply(200, "Type set to A."); - type = cmd_type; - form = cmd_form; - } else - reply(504, "Form must be N."); - break; - - case TYPE_E: - reply(504, "Type E not implemented."); - break; - - case TYPE_I: - reply(200, "Type set to I."); - type = cmd_type; - break; - - case TYPE_L: -#if NBBY == 8 - if (cmd_bytesz == 8) { - reply(200, - "Type set to L (byte size 8)."); - type = cmd_type; - } else - reply(504, "Byte size must be 8."); -#else /* NBBY == 8 */ - UNIMPLEMENTED for NBBY != 8 -#endif /* NBBY == 8 */ - } - } - } - | STRU SP struct_code CRLF check_secure - { - if ($5) { - switch ($3) { - - case STRU_F: - reply(200, "STRU F ok."); - break; - - default: - reply(504, "Unimplemented STRU type."); - } - } - } - | MODE SP mode_code CRLF check_secure - { - if ($5) { - switch ($3) { - - case MODE_S: - reply(200, "MODE S ok."); - break; - - default: - reply(502, "Unimplemented MODE type."); - } - } - } - | ALLO SP NUMBER CRLF check_secure - { - if ($5) { - reply(202, "ALLO command ignored."); - } - } - | ALLO SP NUMBER SP R SP NUMBER CRLF check_secure - { - if ($9) { - reply(202, "ALLO command ignored."); - } - } - | RETR SP pathname CRLF check_login - { - char *name = $3; - - if ($5 && name != NULL) - retrieve(0, name); - if (name != NULL) - free(name); - } - | STOR SP pathname CRLF check_login - { - char *name = $3; - - if ($5 && name != NULL) - do_store(name, "w", 0); - if (name != NULL) - free(name); - } - | APPE SP pathname CRLF check_login - { - char *name = $3; - - if ($5 && name != NULL) - do_store(name, "a", 0); - if (name != NULL) - free(name); - } - | NLST CRLF check_login - { - if ($3) - send_file_list("."); - } - | NLST SP STRING CRLF check_login - { - char *name = $3; - - if ($5 && name != NULL) - send_file_list(name); - if (name != NULL) - free(name); - } - | LIST CRLF check_login - { - if($3) - list_file("."); - } - | LIST SP pathname CRLF check_login - { - if($5) - list_file($3); - free($3); - } - | sTAT SP pathname CRLF check_login - { - if ($5 && $3 != NULL) - statfilecmd($3); - if ($3 != NULL) - free($3); - } - | sTAT CRLF check_secure - { - if ($3) - statcmd(); - } - | DELE SP pathname CRLF check_login_no_guest - { - if ($5 && $3 != NULL) - do_delete($3); - if ($3 != NULL) - free($3); - } - | RNTO SP pathname CRLF check_login_no_guest - { - if($5){ - if (fromname) { - renamecmd(fromname, $3); - free(fromname); - fromname = (char *) 0; - } else { - reply(503, "Bad sequence of commands."); - } - } - if ($3 != NULL) - free($3); - } - | ABOR CRLF check_secure - { - if ($3) - reply(225, "ABOR command successful."); - } - | CWD CRLF check_login - { - if ($3) { - const char *path = pw->pw_dir; - if (dochroot || guest) - path = "/"; - cwd(path); - } - } - | CWD SP pathname CRLF check_login - { - if ($5 && $3 != NULL) - cwd($3); - if ($3 != NULL) - free($3); - } - | HELP CRLF check_secure - { - if ($3) - help(cmdtab, (char *) 0); - } - | HELP SP STRING CRLF check_secure - { - if ($5) { - char *cp = $3; - - if (strncasecmp(cp, "SITE", 4) == 0) { - cp = $3 + 4; - if (*cp == ' ') - cp++; - if (*cp) - help(sitetab, cp); - else - help(sitetab, (char *) 0); - } else - help(cmdtab, $3); - } - } - | NOOP CRLF check_secure - { - if ($3) - reply(200, "NOOP command successful."); - } - | MKD SP pathname CRLF check_login - { - if ($5 && $3 != NULL) - makedir($3); - if ($3 != NULL) - free($3); - } - | RMD SP pathname CRLF check_login_no_guest - { - if ($5 && $3 != NULL) - removedir($3); - if ($3 != NULL) - free($3); - } - | PWD CRLF check_login - { - if ($3) - pwd(); - } - | CDUP CRLF check_login - { - if ($3) - cwd(".."); - } - | FEAT CRLF check_secure - { - if ($3) { - lreply(211, "Supported features:"); - lreply(0, " MDTM"); - lreply(0, " REST STREAM"); - lreply(0, " SIZE"); - reply(211, "End"); - } - } - | OPTS SP STRING CRLF check_secure - { - if ($5) - reply(501, "Bad options"); - free ($3); - } - - | SITE SP HELP CRLF check_secure - { - if ($5) - help(sitetab, (char *) 0); - } - | SITE SP HELP SP STRING CRLF check_secure - { - if ($7) - help(sitetab, $5); - } - | SITE SP UMASK CRLF check_login - { - if ($5) { - int oldmask = umask(0); - umask(oldmask); - reply(200, "Current UMASK is %03o", oldmask); - } - } - | SITE SP UMASK SP octal_number CRLF check_login_no_guest - { - if ($7) { - if (($5 == -1) || ($5 > 0777)) { - reply(501, "Bad UMASK value"); - } else { - int oldmask = umask($5); - reply(200, - "UMASK set to %03o (was %03o)", - $5, oldmask); - } - } - } - | SITE SP CHMOD SP octal_number SP pathname CRLF check_login_no_guest - { - if ($9 && $7 != NULL) { - if ($5 > 0777) - reply(501, - "CHMOD: Mode value must be between 0 and 0777"); - else if (chmod($7, $5) < 0) - perror_reply(550, $7); - else - reply(200, "CHMOD command successful."); - } - if ($7 != NULL) - free($7); - } - | SITE SP IDLE CRLF check_secure - { - if ($5) - reply(200, - "Current IDLE time limit is %d seconds; max %d", - ftpd_timeout, maxtimeout); - } - | SITE SP IDLE SP NUMBER CRLF check_secure - { - if ($7) { - if ($5 < 30 || $5 > maxtimeout) { - reply(501, - "Maximum IDLE time must be between 30 and %d seconds", - maxtimeout); - } else { - ftpd_timeout = $5; - alarm((unsigned) ftpd_timeout); - reply(200, - "Maximum IDLE time set to %d seconds", - ftpd_timeout); - } - } - } - - | SITE SP KAUTH SP STRING CRLF check_login - { - reply(500, "Command not implemented."); - } - | SITE SP KLIST CRLF check_login - { - if($5) - klist(); - } - | SITE SP KDESTROY CRLF check_login - { - reply(500, "Command not implemented."); - } - | SITE SP KRBTKFILE SP STRING CRLF check_login - { - reply(500, "Command not implemented."); - } - | SITE SP AFSLOG CRLF check_login - { -#if defined(KRB5) - if(guest) - reply(500, "Can't be done as guest."); - else if($5) - afslog(NULL, 0); -#else - reply(500, "Command not implemented."); -#endif - } - | SITE SP AFSLOG SP STRING CRLF check_login - { -#if defined(KRB5) - if(guest) - reply(500, "Can't be done as guest."); - else if($7) - afslog($5, 0); - if($5) - free($5); -#else - reply(500, "Command not implemented."); -#endif - } - | SITE SP LOCATE SP STRING CRLF check_login - { - if($7 && $5 != NULL) - find($5); - if($5 != NULL) - free($5); - } - | SITE SP URL CRLF check_secure - { - if ($5) - reply(200, "http://www.pdc.kth.se/heimdal/"); - } - | STOU SP pathname CRLF check_login - { - if ($5 && $3 != NULL) - do_store($3, "w", 1); - if ($3 != NULL) - free($3); - } - | SYST CRLF check_secure - { - if ($3) { -#if !defined(WIN32) && !defined(__EMX__) && !defined(__OS2__) && !defined(__CYGWIN32__) - reply(215, "UNIX Type: L%d", NBBY); -#else - reply(215, "UNKNOWN Type: L%d", NBBY); -#endif - } - } - - /* - * SIZE is not in RFC959, but Postel has blessed it and - * it will be in the updated RFC. - * - * Return size of file in a format suitable for - * using with RESTART (we just count bytes). - */ - | SIZE SP pathname CRLF check_login - { - if ($5 && $3 != NULL) - sizecmd($3); - if ($3 != NULL) - free($3); - } - - /* - * MDTM is not in RFC959, but Postel has blessed it and - * it will be in the updated RFC. - * - * Return modification time of file as an ISO 3307 - * style time. E.g. YYYYMMDDHHMMSS or YYYYMMDDHHMMSS.xxx - * where xxx is the fractional second (of any precision, - * not necessarily 3 digits) - */ - | MDTM SP pathname CRLF check_login - { - if ($5 && $3 != NULL) { - struct stat stbuf; - if (stat($3, &stbuf) < 0) - reply(550, "%s: %s", - $3, strerror(errno)); - else if (!S_ISREG(stbuf.st_mode)) { - reply(550, - "%s: not a plain file.", $3); - } else { - struct tm *t; - time_t mtime = stbuf.st_mtime; - - t = gmtime(&mtime); - reply(213, - "%04d%02d%02d%02d%02d%02d", - t->tm_year + 1900, - t->tm_mon + 1, - t->tm_mday, - t->tm_hour, - t->tm_min, - t->tm_sec); - } - } - if ($3 != NULL) - free($3); - } - | QUIT CRLF check_secure - { - if ($3) { - reply(221, "Goodbye."); - dologout(0); - } - } - | error CRLF - { - yyerrok; - } - ; -rcmd - : RNFR SP pathname CRLF check_login_no_guest - { - restart_point = (off_t) 0; - if ($5 && $3) { - fromname = renamefrom($3); - if (fromname == (char *) 0 && $3) { - free($3); - } - } - } - | REST SP byte_size CRLF check_secure - { - if ($5) { - fromname = (char *) 0; - restart_point = $3; /* XXX $3 is only "int" */ - reply(350, "Restarting at %ld. %s", - (long)restart_point, - "Send STORE or RETRIEVE to initiate transfer."); - } - } - | AUTH SP STRING CRLF - { - auth($3); - free($3); - } - | ADAT SP STRING CRLF - { - adat($3); - free($3); - } - | PBSZ SP NUMBER CRLF check_secure - { - if ($5) - pbsz($3); - } - | PROT SP STRING CRLF check_secure - { - if ($5) - prot($3); - } - | CCC CRLF check_secure - { - if ($3) - ccc(); - } - | MIC SP STRING CRLF - { - mec($3, prot_safe); - free($3); - } - | CONF SP STRING CRLF - { - mec($3, prot_confidential); - free($3); - } - | ENC SP STRING CRLF - { - mec($3, prot_private); - free($3); - } - ; - -username - : STRING - ; - -password - : /* empty */ - { - $$ = (char *)calloc(1, sizeof(char)); - } - | STRING - ; - -byte_size - : NUMBER - ; - -host_port - : NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA - NUMBER COMMA NUMBER - { - struct sockaddr_in *sin4 = (struct sockaddr_in *)data_dest; - - sin4->sin_family = AF_INET; - sin4->sin_port = htons($9 * 256 + $11); - sin4->sin_addr.s_addr = - htonl(($1 << 24) | ($3 << 16) | ($5 << 8) | $7); - } - ; - -form_code - : N - { - $$ = FORM_N; - } - | T - { - $$ = FORM_T; - } - | C - { - $$ = FORM_C; - } - ; - -type_code - : A - { - cmd_type = TYPE_A; - cmd_form = FORM_N; - } - | A SP form_code - { - cmd_type = TYPE_A; - cmd_form = $3; - } - | E - { - cmd_type = TYPE_E; - cmd_form = FORM_N; - } - | E SP form_code - { - cmd_type = TYPE_E; - cmd_form = $3; - } - | I - { - cmd_type = TYPE_I; - } - | L - { - cmd_type = TYPE_L; - cmd_bytesz = NBBY; - } - | L SP byte_size - { - cmd_type = TYPE_L; - cmd_bytesz = $3; - } - /* this is for a bug in the BBN ftp */ - | L byte_size - { - cmd_type = TYPE_L; - cmd_bytesz = $2; - } - ; - -struct_code - : F - { - $$ = STRU_F; - } - | R - { - $$ = STRU_R; - } - | P - { - $$ = STRU_P; - } - ; - -mode_code - : S - { - $$ = MODE_S; - } - | B - { - $$ = MODE_B; - } - | C - { - $$ = MODE_C; - } - ; - -pathname - : pathstring - { - /* - * Problem: this production is used for all pathname - * processing, but only gives a 550 error reply. - * This is a valid reply in some cases but not in others. - */ - if (logged_in && $1 && *$1 == '~') { - glob_t gl; - int flags = - GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE; - - memset(&gl, 0, sizeof(gl)); - if (glob($1, flags, NULL, &gl) || - gl.gl_pathc == 0) { - reply(550, "not found"); - $$ = NULL; - } else { - $$ = strdup(gl.gl_pathv[0]); - } - globfree(&gl); - free($1); - } else - $$ = $1; - } - ; - -pathstring - : STRING - ; - -octal_number - : NUMBER - { - int ret, dec, multby, digit; - - /* - * Convert a number that was read as decimal number - * to what it would be if it had been read as octal. - */ - dec = $1; - multby = 1; - ret = 0; - while (dec) { - digit = dec%10; - if (digit > 7) { - ret = -1; - break; - } - ret += digit * multby; - multby *= 8; - dec /= 10; - } - $$ = ret; - } - ; - - -check_login_no_guest : check_login - { - $$ = $1 && !guest; - if($1 && !$$) - reply(550, "Permission denied"); - } - ; - -check_login : check_secure - { - if($1) { - if(($$ = logged_in) == 0) - reply(530, "Please login with USER and PASS."); - } else - $$ = 0; - } - ; - -check_secure : /* empty */ - { - $$ = 1; - if(sec_complete && !ccc_passed && !secure_command()) { - $$ = 0; - reply(533, "Command protection level denied " - "for paranoid reasons."); - } - } - ; - -%% - -#define CMD 0 /* beginning of command */ -#define ARGS 1 /* expect miscellaneous arguments */ -#define STR1 2 /* expect SP followed by STRING */ -#define STR2 3 /* expect STRING */ -#define OSTR 4 /* optional SP then STRING */ -#define ZSTR1 5 /* SP then optional STRING */ -#define ZSTR2 6 /* optional STRING after SP */ -#define SITECMD 7 /* SITE command */ -#define NSTR 8 /* Number followed by a string */ - -struct tab cmdtab[] = { /* In order defined in RFC 765 */ - { "USER", USER, STR1, 1, " username" }, - { "PASS", PASS, ZSTR1, 1, " password" }, - { "ACCT", ACCT, STR1, 0, "(specify account)" }, - { "SMNT", SMNT, ARGS, 0, "(structure mount)" }, - { "REIN", REIN, ARGS, 0, "(reinitialize server state)" }, - { "QUIT", QUIT, ARGS, 1, "(terminate service)", }, - { "PORT", PORT, ARGS, 1, " b0, b1, b2, b3, b4" }, - { "EPRT", EPRT, STR1, 1, " string" }, - { "PASV", PASV, ARGS, 1, "(set server in passive mode)" }, - { "EPSV", EPSV, OSTR, 1, "[ foo]" }, - { "TYPE", TYPE, ARGS, 1, " [ A | E | I | L ]" }, - { "STRU", STRU, ARGS, 1, "(specify file structure)" }, - { "MODE", MODE, ARGS, 1, "(specify transfer mode)" }, - { "RETR", RETR, STR1, 1, " file-name" }, - { "STOR", STOR, STR1, 1, " file-name" }, - { "APPE", APPE, STR1, 1, " file-name" }, - { "MLFL", MLFL, OSTR, 0, "(mail file)" }, - { "MAIL", MAIL, OSTR, 0, "(mail to user)" }, - { "MSND", MSND, OSTR, 0, "(mail send to terminal)" }, - { "MSOM", MSOM, OSTR, 0, "(mail send to terminal or mailbox)" }, - { "MSAM", MSAM, OSTR, 0, "(mail send to terminal and mailbox)" }, - { "MRSQ", MRSQ, OSTR, 0, "(mail recipient scheme question)" }, - { "MRCP", MRCP, STR1, 0, "(mail recipient)" }, - { "ALLO", ALLO, ARGS, 1, "allocate storage (vacuously)" }, - { "REST", REST, ARGS, 1, " offset (restart command)" }, - { "RNFR", RNFR, STR1, 1, " file-name" }, - { "RNTO", RNTO, STR1, 1, " file-name" }, - { "ABOR", ABOR, ARGS, 1, "(abort operation)" }, - { "DELE", DELE, STR1, 1, " file-name" }, - { "CWD", CWD, OSTR, 1, "[ directory-name ]" }, - { "XCWD", CWD, OSTR, 1, "[ directory-name ]" }, - { "LIST", LIST, OSTR, 1, "[ path-name ]" }, - { "NLST", NLST, OSTR, 1, "[ path-name ]" }, - { "SITE", SITE, SITECMD, 1, "site-cmd [ arguments ]" }, - { "SYST", SYST, ARGS, 1, "(get type of operating system)" }, - { "STAT", sTAT, OSTR, 1, "[ path-name ]" }, - { "HELP", HELP, OSTR, 1, "[ ]" }, - { "NOOP", NOOP, ARGS, 1, "" }, - { "MKD", MKD, STR1, 1, " path-name" }, - { "XMKD", MKD, STR1, 1, " path-name" }, - { "RMD", RMD, STR1, 1, " path-name" }, - { "XRMD", RMD, STR1, 1, " path-name" }, - { "PWD", PWD, ARGS, 1, "(return current directory)" }, - { "XPWD", PWD, ARGS, 1, "(return current directory)" }, - { "CDUP", CDUP, ARGS, 1, "(change to parent directory)" }, - { "XCUP", CDUP, ARGS, 1, "(change to parent directory)" }, - { "STOU", STOU, STR1, 1, " file-name" }, - { "SIZE", SIZE, OSTR, 1, " path-name" }, - { "MDTM", MDTM, OSTR, 1, " path-name" }, - - /* extensions from RFC2228 */ - { "AUTH", AUTH, STR1, 1, " auth-type" }, - { "ADAT", ADAT, STR1, 1, " auth-data" }, - { "PBSZ", PBSZ, ARGS, 1, " buffer-size" }, - { "PROT", PROT, STR1, 1, " prot-level" }, - { "CCC", CCC, ARGS, 1, "" }, - { "MIC", MIC, STR1, 1, " integrity command" }, - { "CONF", CONF, STR1, 1, " confidentiality command" }, - { "ENC", ENC, STR1, 1, " privacy command" }, - - /* RFC2389 */ - { "FEAT", FEAT, ARGS, 1, "" }, - { "OPTS", OPTS, ARGS, 1, " command [ options]" }, - - { NULL, 0, 0, 0, 0 } -}; - -struct tab sitetab[] = { - { "UMASK", UMASK, ARGS, 1, "[ umask ]" }, - { "IDLE", IDLE, ARGS, 1, "[ maximum-idle-time ]" }, - { "CHMOD", CHMOD, NSTR, 1, " mode file-name" }, - { "HELP", HELP, OSTR, 1, "[ ]" }, - - { "KAUTH", KAUTH, STR1, 1, " principal [ ticket ]" }, - { "KLIST", KLIST, ARGS, 1, "(show ticket file)" }, - { "KDESTROY", KDESTROY, ARGS, 1, "(destroy tickets)" }, - { "KRBTKFILE", KRBTKFILE, STR1, 1, " ticket-file" }, - { "AFSLOG", AFSLOG, OSTR, 1, "[ cell]" }, - - { "LOCATE", LOCATE, STR1, 1, " globexpr" }, - { "FIND", LOCATE, STR1, 1, " globexpr" }, - - { "URL", URL, ARGS, 1, "?" }, - - { NULL, 0, 0, 0, 0 } -}; - -static struct tab * -lookup(struct tab *p, char *cmd) -{ - - for (; p->name != NULL; p++) - if (strcmp(cmd, p->name) == 0) - return (p); - return (0); -} - -/* - * ftpd_getline - a hacked up version of fgets to ignore TELNET escape codes. - */ -char * -ftpd_getline(char *s, int n) -{ - int c; - char *cs; - - cs = s; - - /* might still be data within the security MIC/CONF/ENC */ - if(ftp_command){ - strlcpy(s, ftp_command, n); - if (debug) - syslog(LOG_DEBUG, "command: %s", s); - return s; - } - while ((c = getc(stdin)) != EOF) { - c &= 0377; - if (c == IAC) { - if ((c = getc(stdin)) != EOF) { - c &= 0377; - switch (c) { - case WILL: - case WONT: - c = getc(stdin); - printf("%c%c%c", IAC, DONT, 0377&c); - fflush(stdout); - continue; - case DO: - case DONT: - c = getc(stdin); - printf("%c%c%c", IAC, WONT, 0377&c); - fflush(stdout); - continue; - case IAC: - break; - default: - continue; /* ignore command */ - } - } - } - *cs++ = c; - if (--n <= 0 || c == '\n') - break; - } - if (c == EOF && cs == s) - return (NULL); - *cs++ = '\0'; - if (debug) { - if (!guest && strncasecmp("pass ", s, 5) == 0) { - /* Don't syslog passwords */ - syslog(LOG_DEBUG, "command: %.5s ???", s); - } else { - char *cp; - int len; - - /* Don't syslog trailing CR-LF */ - len = strlen(s); - cp = s + len - 1; - while (cp >= s && (*cp == '\n' || *cp == '\r')) { - --cp; - --len; - } - syslog(LOG_DEBUG, "command: %.*s", len, s); - } - } -#ifdef XXX - fprintf(stderr, "%s\n", s); -#endif - return (s); -} - -static RETSIGTYPE -toolong(int signo) -{ - - reply(421, - "Timeout (%d seconds): closing control connection.", - ftpd_timeout); - if (logging) - syslog(LOG_INFO, "User %s timed out after %d seconds", - (pw ? pw -> pw_name : "unknown"), ftpd_timeout); - dologout(1); - SIGRETURN(0); -} - -static int -yylex(void) -{ - static int cpos, state; - char *cp, *cp2; - struct tab *p; - int n; - char c; - - for (;;) { - switch (state) { - - case CMD: - hasyyerrored = 0; - - signal(SIGALRM, toolong); - alarm((unsigned) ftpd_timeout); - if (ftpd_getline(cbuf, sizeof(cbuf)-1) == NULL) { - reply(221, "You could at least say goodbye."); - dologout(0); - } - alarm(0); -#ifdef HAVE_SETPROCTITLE - if (strncasecmp(cbuf, "PASS", 4) != 0) - setproctitle("%s: %s", proctitle, cbuf); -#endif /* HAVE_SETPROCTITLE */ - if ((cp = strchr(cbuf, '\r'))) { - *cp++ = '\n'; - *cp = '\0'; - } - if ((cp = strpbrk(cbuf, " \n"))) - cpos = cp - cbuf; - if (cpos == 0) - cpos = 4; - c = cbuf[cpos]; - cbuf[cpos] = '\0'; - strupr(cbuf); - p = lookup(cmdtab, cbuf); - cbuf[cpos] = c; - if (p != 0) { - if (p->implemented == 0) { - nack(p->name); - hasyyerrored = 1; - break; - } - state = p->state; - yylval.s = p->name; - return (p->token); - } - break; - - case SITECMD: - if (cbuf[cpos] == ' ') { - cpos++; - return (SP); - } - cp = &cbuf[cpos]; - if ((cp2 = strpbrk(cp, " \n"))) - cpos = cp2 - cbuf; - c = cbuf[cpos]; - cbuf[cpos] = '\0'; - strupr(cp); - p = lookup(sitetab, cp); - cbuf[cpos] = c; - if (p != 0) { - if (p->implemented == 0) { - state = CMD; - nack(p->name); - hasyyerrored = 1; - break; - } - state = p->state; - yylval.s = p->name; - return (p->token); - } - state = CMD; - break; - - case OSTR: - if (cbuf[cpos] == '\n') { - state = CMD; - return (CRLF); - } - /* FALLTHROUGH */ - - case STR1: - case ZSTR1: - dostr1: - if (cbuf[cpos] == ' ') { - cpos++; - if(state == OSTR) - state = STR2; - else - state++; - return (SP); - } - break; - - case ZSTR2: - if (cbuf[cpos] == '\n') { - state = CMD; - return (CRLF); - } - /* FALLTHROUGH */ - - case STR2: - cp = &cbuf[cpos]; - n = strlen(cp); - cpos += n - 1; - /* - * Make sure the string is nonempty and \n terminated. - */ - if (n > 1 && cbuf[cpos] == '\n') { - cbuf[cpos] = '\0'; - yylval.s = copy(cp); - cbuf[cpos] = '\n'; - state = ARGS; - return (STRING); - } - break; - - case NSTR: - if (cbuf[cpos] == ' ') { - cpos++; - return (SP); - } - if (isdigit((unsigned char)cbuf[cpos])) { - cp = &cbuf[cpos]; - while (isdigit((unsigned char)cbuf[++cpos])) - ; - c = cbuf[cpos]; - cbuf[cpos] = '\0'; - yylval.i = atoi(cp); - cbuf[cpos] = c; - state = STR1; - return (NUMBER); - } - state = STR1; - goto dostr1; - - case ARGS: - if (isdigit((unsigned char)cbuf[cpos])) { - cp = &cbuf[cpos]; - while (isdigit((unsigned char)cbuf[++cpos])) - ; - c = cbuf[cpos]; - cbuf[cpos] = '\0'; - yylval.i = atoi(cp); - cbuf[cpos] = c; - return (NUMBER); - } - switch (cbuf[cpos++]) { - - case '\n': - state = CMD; - return (CRLF); - - case ' ': - return (SP); - - case ',': - return (COMMA); - - case 'A': - case 'a': - return (A); - - case 'B': - case 'b': - return (B); - - case 'C': - case 'c': - return (C); - - case 'E': - case 'e': - return (E); - - case 'F': - case 'f': - return (F); - - case 'I': - case 'i': - return (I); - - case 'L': - case 'l': - return (L); - - case 'N': - case 'n': - return (N); - - case 'P': - case 'p': - return (P); - - case 'R': - case 'r': - return (R); - - case 'S': - case 's': - return (S); - - case 'T': - case 't': - return (T); - - } - break; - - default: - fatal("Unknown state in scanner."); - } - yyerror(NULL); - state = CMD; - return (0); - } -} - -/* ARGSUSED */ -void -yyerror(char *s) -{ - char *cp; - - if (hasyyerrored) - return; - - if ((cp = strchr(cbuf,'\n'))) - *cp = '\0'; - reply(500, "'%s': command not understood.", cbuf); - hasyyerrored = 1; -} - -static char * -copy(char *s) -{ - char *p; - - p = strdup(s); - if (p == NULL) - fatal("Ran out of memory."); - return p; -} - -static void -help(struct tab *ctab, char *s) -{ - struct tab *c; - int width, NCMDS; - char *t; - char buf[1024]; - - if (ctab == sitetab) - t = "SITE "; - else - t = ""; - width = 0, NCMDS = 0; - for (c = ctab; c->name != NULL; c++) { - int len = strlen(c->name); - - if (len > width) - width = len; - NCMDS++; - } - width = (width + 8) &~ 7; - if (s == 0) { - int i, j, w; - int columns, lines; - - lreply(214, "The following %scommands are recognized %s.", - t, "(* =>'s unimplemented)"); - columns = 76 / width; - if (columns == 0) - columns = 1; - lines = (NCMDS + columns - 1) / columns; - for (i = 0; i < lines; i++) { - strlcpy (buf, " ", sizeof(buf)); - for (j = 0; j < columns; j++) { - c = ctab + j * lines + i; - snprintf (buf + strlen(buf), - sizeof(buf) - strlen(buf), - "%s%c", - c->name, - c->implemented ? ' ' : '*'); - if (c + lines >= &ctab[NCMDS]) - break; - w = strlen(c->name) + 1; - while (w < width) { - strlcat (buf, - " ", - sizeof(buf)); - w++; - } - } - lreply(214, "%s", buf); - } - reply(214, "Direct comments to kth-krb-bugs@pdc.kth.se"); - return; - } - strupr(s); - c = lookup(ctab, s); - if (c == (struct tab *)0) { - reply(502, "Unknown command %s.", s); - return; - } - if (c->implemented) - reply(214, "Syntax: %s%s %s", t, c->name, c->help); - else - reply(214, "%s%-*s\t%s; unimplemented.", t, width, - c->name, c->help); -} - -static void -sizecmd(char *filename) -{ - switch (type) { - case TYPE_L: - case TYPE_I: { - struct stat stbuf; - if (stat(filename, &stbuf) < 0 || !S_ISREG(stbuf.st_mode)) - reply(550, "%s: not a plain file.", filename); - else - reply(213, "%lu", (unsigned long)stbuf.st_size); - break; - } - case TYPE_A: { - FILE *fin; - int c; - size_t count; - struct stat stbuf; - fin = fopen(filename, "r"); - if (fin == NULL) { - perror_reply(550, filename); - return; - } - if (fstat(fileno(fin), &stbuf) < 0 || !S_ISREG(stbuf.st_mode)) { - reply(550, "%s: not a plain file.", filename); - fclose(fin); - return; - } - - count = 0; - while((c=getc(fin)) != EOF) { - if (c == '\n') /* will get expanded to \r\n */ - count++; - count++; - } - fclose(fin); - - reply(213, "%lu", (unsigned long)count); - break; - } - default: - reply(504, "SIZE not implemented for Type %c.", "?AEIL"[type]); - } -} diff --git a/kerberosV/src/appl/ftp/ftpd/ftpd.8 b/kerberosV/src/appl/ftp/ftpd/ftpd.8 deleted file mode 100644 index b025b1ecdaa..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/ftpd.8 +++ /dev/null @@ -1,503 +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 July 19, 2003 -.Dt FTPD 8 -.Os BSD 4.2 -.Sh NAME -.Nm ftpd -.Nd Internet File Transfer Protocol server -.Sh SYNOPSIS -.Nm -.Op Fl a Ar authmode -.Op Fl dilvU -.Op Fl g Ar umask -.Op Fl p Ar port -.Op Fl T Ar maxtimeout -.Op Fl t Ar timeout -.Op Fl Fl gss-bindings -.Op Fl I | Fl Fl no-insecure-oob -.Op Fl u Ar default umask -.Op Fl B | Fl Fl builtin-ls -.Op Fl Fl good-chars= Ns Ar string -.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 -.Pp -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 Fl gss-bindings -require the peer to use GSS-API bindings (ie make sure IP addresses match). -.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 U -In previous versions of -.Nm ftpd , -when a passive mode client requested a data connection to the server, the -server would use data ports in the range 1024..4999. Now, by default, -if the system supports the IP_PORTRANGE socket option, the server will -use data ports in the range 49152..65535. Specifying this option will -revert to the old behavior. -.It Fl v -Verbose mode. -.It Xo -.Fl B , -.Fl Fl builtin-ls -.Xc -use built-in ls to list files -.It Xo -.Fl Fl good-chars= Ns Ar string -.Xc -allowed anonymous upload filename chars -.It Xo -.Fl I -.Fl Fl no-insecure-oob -.Xc -don't allow insecure out of band. -Heimdal ftp clients before 0.6.3 doesn't support secure oob, so turning -on this option makes them no longer work. -.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 use 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. -.Pp -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. -.Pp -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 -.Pp -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. -.El -.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/kerberosV/src/appl/ftp/ftpd/ftpd.c b/kerberosV/src/appl/ftp/ftpd/ftpd.c deleted file mode 100644 index f35b4198087..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/ftpd.c +++ /dev/null @@ -1,2367 +0,0 @@ -/* - * Copyright (c) 1985, 1988, 1990, 1992, 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. - */ - -#define FTP_NAMES -#include "ftpd_locl.h" -#ifdef KRB5 -#include -#endif -#include "getarg.h" - -RCSID("$Id: ftpd.c,v 1.7 2013/06/17 19:11:36 robert Exp $"); - -static char version[] = "Version 6.00"; - -extern off_t restart_point; -extern char cbuf[]; - -struct sockaddr_storage ctrl_addr_ss; -struct sockaddr *ctrl_addr = (struct sockaddr *)&ctrl_addr_ss; - -struct sockaddr_storage data_source_ss; -struct sockaddr *data_source = (struct sockaddr *)&data_source_ss; - -struct sockaddr_storage data_dest_ss; -struct sockaddr *data_dest = (struct sockaddr *)&data_dest_ss; - -struct sockaddr_storage his_addr_ss; -struct sockaddr *his_addr = (struct sockaddr *)&his_addr_ss; - -struct sockaddr_storage pasv_addr_ss; -struct sockaddr *pasv_addr = (struct sockaddr *)&pasv_addr_ss; - -int data; -int logged_in; -struct passwd *pw; -int debug = 0; -int ftpd_timeout = 900; /* timeout after 15 minutes of inactivity */ -int maxtimeout = 7200;/* don't allow idle time to be set beyond 2 hours */ -int restricted_data_ports = 1; -int logging; -int guest; -int dochroot; -int type; -int form; -int stru; /* avoid C keyword */ -int mode; -int usedefault = 1; /* for data transfers */ -int pdata = -1; /* for passive mode */ -int allow_insecure_oob = 1; -static int transflag; -static int urgflag; -off_t file_size; -off_t byte_count; -#if !defined(CMASK) || CMASK == 0 -#undef CMASK -#define CMASK 027 -#endif -int defumask = CMASK; /* default umask value */ -int guest_umask = 0777; /* Paranoia for anonymous users */ -char tmpline[10240]; -char hostname[MaxHostNameLen]; -char remotehost[MaxHostNameLen]; -static char ttyline[20]; -int paranoid = 1; - -#define AUTH_PLAIN (1 << 0) /* allow sending passwords */ -#define AUTH_OTP (1 << 1) /* passwords are one-time */ -#define AUTH_FTP (1 << 2) /* allow anonymous login */ - -static int auth_level = 0; /* Only allow kerberos login by default */ - -/* - * Timeout intervals for retrying connections - * to hosts that don't accept PORT cmds. This - * is a kludge, but given the problems with TCP... - */ -#define SWAITMAX 90 /* wait at most 90 seconds */ -#define SWAITINT 5 /* interval between retries */ - -int swaitmax = SWAITMAX; -int swaitint = SWAITINT; - -#ifdef HAVE_SETPROCTITLE -char proctitle[BUFSIZ]; /* initial part of title */ -#endif /* HAVE_SETPROCTITLE */ - -#define LOGCMD(cmd, file) \ - if (logging > 1) \ - syslog(LOG_INFO,"%s %s%s", cmd, \ - *(file) == '/' ? "" : curdir(), file); -#define LOGCMD2(cmd, file1, file2) \ - if (logging > 1) \ - syslog(LOG_INFO,"%s %s%s %s%s", cmd, \ - *(file1) == '/' ? "" : curdir(), file1, \ - *(file2) == '/' ? "" : curdir(), file2); -#define LOGBYTES(cmd, file, cnt) \ - if (logging > 1) { \ - if (cnt == (off_t)-1) \ - syslog(LOG_INFO,"%s %s%s", cmd, \ - *(file) == '/' ? "" : curdir(), file); \ - else \ - syslog(LOG_INFO, "%s %s%s = %ld bytes", \ - cmd, (*(file) == '/') ? "" : curdir(), file, (long)cnt); \ - } - -static void ack (char *); -static void myoob (int); -static int handleoobcmd(void); -static int checkuser (char *, char *); -static int checkaccess (char *); -static FILE *dataconn (const char *, off_t, const char *); -static void dolog (struct sockaddr *, int); -static void end_login (void); -static FILE *getdatasock (const char *, int); -static char *gunique (char *); -static RETSIGTYPE lostconn (int); -static int receive_data (FILE *, FILE *); -static void send_data (FILE *, FILE *); -static struct passwd * sgetpwnam (char *); - -static char * -curdir(void) -{ - static char path[MaxPathLen+1]; /* path + '/' + '\0' */ - - if (getcwd(path, sizeof(path)-1) == NULL) - return (""); - if (path[1] != '\0') /* special case for root dir. */ - strlcat(path, "/", sizeof(path)); - /* For guest account, skip / since it's chrooted */ - return (guest ? path+1 : path); -} - -#ifndef LINE_MAX -#define LINE_MAX 1024 -#endif - -static int -parse_auth_level(char *str) -{ - char *p; - int ret = 0; - char *foo = NULL; - - for(p = strtok_r(str, ",", &foo); - p; - p = strtok_r(NULL, ",", &foo)) { - if(strcmp(p, "user") == 0) - ; -#ifdef OTP - else if(strcmp(p, "otp") == 0) - ret |= AUTH_PLAIN|AUTH_OTP; -#endif - else if(strcmp(p, "ftp") == 0 || - strcmp(p, "safe") == 0) - ret |= AUTH_FTP; - else if(strcmp(p, "plain") == 0) - ret |= AUTH_PLAIN; - else if(strcmp(p, "none") == 0) - ret |= AUTH_PLAIN|AUTH_FTP; - else - warnx("bad value for -a: `%s'", p); - } - return ret; -} - -/* - * Print usage and die. - */ - -static int interactive_flag; -static char *guest_umask_string; -static char *port_string; -static char *umask_string; -static char *auth_string; - -int use_builtin_ls = -1; - -static int help_flag; -static int version_flag; - -static const char *good_chars = "+-=_,."; - -struct getargs args[] = { - { NULL, 'a', arg_string, &auth_string, "required authentication" }, - { NULL, 'i', arg_flag, &interactive_flag, "don't assume stdin is a socket" }, - { NULL, 'p', arg_string, &port_string, "what port to listen to" }, - { NULL, 'g', arg_string, &guest_umask_string, "umask for guest logins" }, - { NULL, 'l', arg_counter, &logging, "log more stuff", "" }, - { NULL, 't', arg_integer, &ftpd_timeout, "initial timeout" }, - { NULL, 'T', arg_integer, &maxtimeout, "max timeout" }, - { NULL, 'u', arg_string, &umask_string, "umask for user logins" }, - { NULL, 'U', arg_negative_flag, &restricted_data_ports, "don't use high data ports" }, - { NULL, 'd', arg_flag, &debug, "enable debugging" }, - { NULL, 'v', arg_flag, &debug, "enable debugging" }, - { "builtin-ls", 'B', arg_flag, &use_builtin_ls, "use built-in ls to list files" }, - { "good-chars", 0, arg_string, &good_chars, "allowed anonymous upload filename chars" }, - { "insecure-oob", 'I', arg_negative_flag, &allow_insecure_oob, "don't allow insecure OOB ABOR/STAT" }, -#ifdef KRB5 - { "gss-bindings", 0, arg_flag, &ftp_do_gss_bindings, "Require GSS-API bindings", NULL}, -#endif - { "version", 0, arg_flag, &version_flag }, - { "help", 'h', arg_flag, &help_flag } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -static void -usage (int code) -{ - arg_printusage(args, num_args, NULL, ""); - exit (code); -} - -/* output contents of a file */ -static int -show_file(const char *file, int code) -{ - FILE *f; - char buf[128]; - - f = fopen(file, "r"); - if(f == NULL) - return -1; - while(fgets(buf, sizeof(buf), f)){ - buf[strcspn(buf, "\r\n")] = '\0'; - lreply(code, "%s", buf); - } - fclose(f); - return 0; -} - -int -main(int argc, char **argv) -{ - socklen_t his_addr_len, ctrl_addr_len; - int on = 1; - int port; - struct servent *sp; - - int optind = 0; - - setprogname (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(auth_string) - auth_level = parse_auth_level(auth_string); - { - char *p; - long val = 0; - - if(guest_umask_string) { - val = strtol(guest_umask_string, &p, 8); - if (*p != '\0' || val < 0) - warnx("bad value for -g"); - else - guest_umask = val; - } - if(umask_string) { - val = strtol(umask_string, &p, 8); - if (*p != '\0' || val < 0) - warnx("bad value for -u"); - else - defumask = val; - } - } - sp = getservbyname("ftp", "tcp"); - if(sp) - port = sp->s_port; - else - port = htons(21); - if(port_string) { - sp = getservbyname(port_string, "tcp"); - if(sp) - port = sp->s_port; - else - if(isdigit((unsigned char)port_string[0])) - port = htons(atoi(port_string)); - else - warnx("bad value for -p"); - } - - if (maxtimeout < ftpd_timeout) - maxtimeout = ftpd_timeout; - -#if 0 - if (ftpd_timeout > maxtimeout) - ftpd_timeout = maxtimeout; -#endif - - if(interactive_flag) - mini_inetd(port, NULL); - - /* - * LOG_NDELAY sets up the logging connection immediately, - * necessary for anonymous ftp's that chroot and can't do it later. - */ - openlog("ftpd", LOG_PID | LOG_NDELAY, LOG_FTP); - his_addr_len = sizeof(his_addr_ss); - if (getpeername(STDIN_FILENO, his_addr, &his_addr_len) < 0) { - syslog(LOG_ERR, "getpeername (%s): %m",argv[0]); - exit(1); - } - ctrl_addr_len = sizeof(ctrl_addr_ss); - if (getsockname(STDIN_FILENO, ctrl_addr, &ctrl_addr_len) < 0) { - syslog(LOG_ERR, "getsockname (%s): %m",argv[0]); - exit(1); - } -#if defined(IP_TOS) - if (ctrl_addr->sa_family == AF_INET) - socket_set_tos(STDIN_FILENO, IP_TOS); -#endif - data_source->sa_family = ctrl_addr->sa_family; - socket_set_port (data_source, - htons(ntohs(socket_get_port(ctrl_addr)) - 1)); - - /* set this here so it can be put in wtmp */ - snprintf(ttyline, sizeof(ttyline), "ftp%u", (unsigned)getpid()); - - - /* freopen(_PATH_DEVNULL, "w", stderr); */ - signal(SIGPIPE, lostconn); - signal(SIGCHLD, SIG_IGN); -#ifdef SIGURG - if (signal(SIGURG, myoob) == SIG_ERR) - syslog(LOG_ERR, "signal: %m"); -#endif - - /* Try to handle urgent data inline */ -#if defined(SO_OOBINLINE) && defined(HAVE_SETSOCKOPT) - if (setsockopt(0, SOL_SOCKET, SO_OOBINLINE, (void *)&on, - sizeof(on)) < 0) - syslog(LOG_ERR, "setsockopt: %m"); -#endif - -#ifdef F_SETOWN - if (fcntl(fileno(stdin), F_SETOWN, getpid()) == -1) - syslog(LOG_ERR, "fcntl F_SETOWN: %m"); -#endif - dolog(his_addr, his_addr_len); - /* - * Set up default state - */ - data = -1; - type = TYPE_A; - form = FORM_N; - stru = STRU_F; - mode = MODE_S; - tmpline[0] = '\0'; - - /* If logins are disabled, print out the message. */ - if(show_file(_PATH_NOLOGIN, 530) == 0) { - reply(530, "System not available."); - exit(0); - } - show_file(_PATH_FTPWELCOME, 220); - /* reply(220,) must follow */ - gethostname(hostname, sizeof(hostname)); - - reply(220, "%s FTP server (%s" -#ifdef KRB5 - "+%s" -#endif - ") ready.", hostname, version -#ifdef KRB5 - ,heimdal_version -#endif - ); - - for (;;) - yyparse(); - /* NOTREACHED */ -} - -static RETSIGTYPE -lostconn(int signo) -{ - - if (debug) - syslog(LOG_DEBUG, "lost connection"); - dologout(-1); -} - -/* - * Helper function for sgetpwnam(). - */ -static char * -sgetsave(char *s) -{ - char *new = strdup(s); - - if (new == NULL) { - perror_reply(421, "Local resource failure: malloc"); - dologout(1); - /* NOTREACHED */ - } - return new; -} - -/* - * Save the result of a getpwnam. Used for USER command, since - * the data returned must not be clobbered by any other command - * (e.g., globbing). - */ -static struct passwd * -sgetpwnam(char *name) -{ - static struct passwd save; - struct passwd *p; - - if ((p = k_getpwnam(name)) == NULL) - return (p); - if (save.pw_name) { - free(save.pw_name); - free(save.pw_passwd); - free(save.pw_gecos); - free(save.pw_dir); - free(save.pw_shell); - } - save = *p; - save.pw_name = sgetsave(p->pw_name); - save.pw_passwd = sgetsave(p->pw_passwd); - save.pw_gecos = sgetsave(p->pw_gecos); - save.pw_dir = sgetsave(p->pw_dir); - save.pw_shell = sgetsave(p->pw_shell); - return (&save); -} - -static int login_attempts; /* number of failed login attempts */ -static int askpasswd; /* had user command, ask for passwd */ -static char curname[10]; /* current USER name */ -#ifdef OTP -OtpContext otp_ctx; -#endif - -/* - * USER command. - * Sets global passwd pointer pw if named account exists and is acceptable; - * sets askpasswd if a PASS command is expected. If logged in previously, - * need to reset state. If name is "ftp" or "anonymous", the name is not in - * _PATH_FTPUSERS, and ftp account exists, set guest and pw, then just return. - * If account doesn't exist, ask for passwd anyway. Otherwise, check user - * requesting login privileges. Disallow anyone who does not have a standard - * shell as returned by getusershell(). Disallow anyone mentioned in the file - * _PATH_FTPUSERS to allow people such as root and uucp to be avoided. - */ -void -user(char *name) -{ - char *cp, *shell; - - if(auth_level == 0 && !sec_complete){ - reply(530, "No login allowed without authorization."); - return; - } - - if (logged_in) { - if (guest) { - reply(530, "Can't change user from guest login."); - return; - } else if (dochroot) { - reply(530, "Can't change user from chroot user."); - return; - } - end_login(); - } - - guest = 0; - if (strcmp(name, "ftp") == 0 || strcmp(name, "anonymous") == 0) { - if ((auth_level & AUTH_FTP) == 0 || - checkaccess("ftp") || - checkaccess("anonymous")) - reply(530, "User %s access denied.", name); - else if ((pw = sgetpwnam("ftp")) != NULL) { - guest = 1; - defumask = guest_umask; /* paranoia for incoming */ - askpasswd = 1; - reply(331, "Guest login ok, type your name as password."); - } else - reply(530, "User %s unknown.", name); - if (!askpasswd && logging) { - char data_addr[256]; - - if (inet_ntop (his_addr->sa_family, - socket_get_address(his_addr), - data_addr, sizeof(data_addr)) == NULL) - strlcpy (data_addr, "unknown address", - sizeof(data_addr)); - - syslog(LOG_NOTICE, - "ANONYMOUS FTP LOGIN REFUSED FROM %s(%s)", - remotehost, data_addr); - } - return; - } - if((auth_level & AUTH_PLAIN) == 0 && !sec_complete){ - reply(530, "Only authorized and anonymous login allowed."); - return; - } - if ((pw = sgetpwnam(name))) { - if ((shell = pw->pw_shell) == NULL || *shell == 0) - shell = _PATH_BSHELL; - while ((cp = getusershell()) != NULL) - if (strcmp(cp, shell) == 0) - break; - endusershell(); - - if (cp == NULL || checkaccess(name)) { - reply(530, "User %s access denied.", name); - if (logging) { - char data_addr[256]; - - if (inet_ntop (his_addr->sa_family, - socket_get_address(his_addr), - data_addr, - sizeof(data_addr)) == NULL) - strlcpy (data_addr, - "unknown address", - sizeof(data_addr)); - - syslog(LOG_NOTICE, - "FTP LOGIN REFUSED FROM %s(%s), %s", - remotehost, - data_addr, - name); - } - pw = (struct passwd *) NULL; - return; - } - } - if (logging) - strlcpy(curname, name, sizeof(curname)); - if(sec_complete) { - if(sec_userok(name) == 0) { - do_login(232, name); - sec_session(name); - } else - reply(530, "User %s access denied.", name); - } else { -#ifdef OTP - char ss[256]; - - if (otp_challenge(&otp_ctx, name, ss, sizeof(ss)) == 0) { - reply(331, "Password %s for %s required.", - ss, name); - askpasswd = 1; - } else -#endif - if ((auth_level & AUTH_OTP) == 0) { - reply(331, "Password required for %s.", name); - askpasswd = 1; - } else { -#ifdef OTP - char *s; - - if ((s = otp_error (&otp_ctx)) != NULL) - lreply(530, "OTP: %s", s); -#endif - reply(530, - "Only authorized, anonymous" -#ifdef OTP - " and OTP " -#endif - "login allowed."); - } - - } - /* - * Delay before reading passwd after first failed - * attempt to slow down passwd-guessing programs. - */ - if (login_attempts) - sleep(login_attempts); -} - -/* - * Check if a user is in the file "fname" - */ -static int -checkuser(char *fname, char *name) -{ - FILE *fd; - int found = 0; - char *p, line[BUFSIZ]; - - if ((fd = fopen(fname, "r")) != NULL) { - while (fgets(line, sizeof(line), fd) != NULL) - if ((p = strchr(line, '\n')) != NULL) { - *p = '\0'; - if (line[0] == '#') - continue; - if (strcmp(line, name) == 0) { - found = 1; - break; - } - } - fclose(fd); - } - return (found); -} - - -/* - * Determine whether a user has access, based on information in - * _PATH_FTPUSERS. The users are listed one per line, with `allow' - * or `deny' after the username. If anything other than `allow', or - * just nothing, is given after the username, `deny' is assumed. - * - * If the user is not found in the file, but the pseudo-user `*' is, - * the permission is taken from that line. - * - * This preserves the old semantics where if a user was listed in the - * file he was denied, otherwise he was allowed. - * - * Return 1 if the user is denied, or 0 if he is allowed. */ - -static int -match(const char *pattern, const char *string) -{ - return fnmatch(pattern, string, FNM_NOESCAPE); -} - -static int -checkaccess(char *name) -{ -#define ALLOWED 0 -#define NOT_ALLOWED 1 - FILE *fd; - int allowed = ALLOWED; - char *user, *perm, line[BUFSIZ]; - char *foo; - - fd = fopen(_PATH_FTPUSERS, "r"); - - if(fd == NULL) - return allowed; - - while (fgets(line, sizeof(line), fd) != NULL) { - foo = NULL; - user = strtok_r(line, " \t\n", &foo); - if (user == NULL || user[0] == '#') - continue; - perm = strtok_r(NULL, " \t\n", &foo); - if (match(user, name) == 0){ - if(perm && strcmp(perm, "allow") == 0) - allowed = ALLOWED; - else - allowed = NOT_ALLOWED; - break; - } - } - fclose(fd); - return allowed; -} -#undef ALLOWED -#undef NOT_ALLOWED - - -int do_login(int code, char *passwd) -{ - login_attempts = 0; /* this time successful */ - if (setegid((gid_t)pw->pw_gid) < 0) { - reply(550, "Can't set gid."); - return -1; - } - initgroups(pw->pw_name, pw->pw_gid); -#if defined(KRB5) - if(k_hasafs()) - k_setpag(); -#endif - - /* open wtmp before chroot */ - ftpd_logwtmp(ttyline, pw->pw_name, remotehost); - logged_in = 1; - - dochroot = checkuser(_PATH_FTPCHROOT, pw->pw_name); - if (guest) { - /* - * We MUST do a chdir() after the chroot. Otherwise - * the old current directory will be accessible as "." - * outside the new root! - */ - if (chroot(pw->pw_dir) < 0 || chdir("/") < 0) { - reply(550, "Can't set guest privileges."); - return -1; - } - } else if (dochroot) { - if (chroot(pw->pw_dir) < 0 || chdir("/") < 0) { - reply(550, "Can't change root."); - return -1; - } - } else if (chdir(pw->pw_dir) < 0) { - if (chdir("/") < 0) { - reply(530, "User %s: can't change directory to %s.", - pw->pw_name, pw->pw_dir); - return -1; - } else - lreply(code, "No directory! Logging in with home=/"); - } - if (seteuid((uid_t)pw->pw_uid) < 0) { - reply(550, "Can't set uid."); - return -1; - } - - if(use_builtin_ls == -1) { - struct stat st; - /* if /bin/ls exist and is a regular file, use it, otherwise - use built-in ls */ - if(stat("/bin/ls", &st) == 0 && - S_ISREG(st.st_mode)) - use_builtin_ls = 0; - else - use_builtin_ls = 1; - } - - /* - * Display a login message, if it exists. - * N.B. reply(code,) must follow the message. - */ - show_file(_PATH_FTPLOGINMESG, code); - if(show_file(_PATH_ISSUE_NET, code) != 0) - show_file(_PATH_ISSUE, code); - if (guest) { - reply(code, "Guest login ok, access restrictions apply."); -#ifdef HAVE_SETPROCTITLE - snprintf (proctitle, sizeof(proctitle), - "%s: anonymous/%s", - remotehost, - passwd); - setproctitle("%s", proctitle); -#endif /* HAVE_SETPROCTITLE */ - if (logging) { - char data_addr[256]; - - if (inet_ntop (his_addr->sa_family, - socket_get_address(his_addr), - data_addr, sizeof(data_addr)) == NULL) - strlcpy (data_addr, "unknown address", - sizeof(data_addr)); - - syslog(LOG_INFO, "ANONYMOUS FTP LOGIN FROM %s(%s), %s", - remotehost, - data_addr, - passwd); - } - } else { - reply(code, "User %s logged in.", pw->pw_name); -#ifdef HAVE_SETPROCTITLE - snprintf(proctitle, sizeof(proctitle), "%s: %s", remotehost, pw->pw_name); - setproctitle("%s", proctitle); -#endif /* HAVE_SETPROCTITLE */ - if (logging) { - char data_addr[256]; - - if (inet_ntop (his_addr->sa_family, - socket_get_address(his_addr), - data_addr, sizeof(data_addr)) == NULL) - strlcpy (data_addr, "unknown address", - sizeof(data_addr)); - - syslog(LOG_INFO, "FTP LOGIN FROM %s(%s) as %s", - remotehost, - data_addr, - pw->pw_name); - } - } - umask(defumask); - return 0; -} - -/* - * Terminate login as previous user, if any, resetting state; - * used when USER command is given or login fails. - */ -static void -end_login(void) -{ - - if (seteuid((uid_t)0) < 0) - fatal("Failed to seteuid"); - if (logged_in) - ftpd_logwtmp(ttyline, "", ""); - pw = NULL; - logged_in = 0; - guest = 0; - dochroot = 0; -} - -#ifdef KRB5 -static int -krb5_verify(struct passwd *pwd, char *passwd) -{ - krb5_context context; - krb5_ccache id; - krb5_principal princ; - krb5_error_code ret; - - ret = krb5_init_context(&context); - if(ret) - return ret; - - ret = krb5_parse_name(context, pwd->pw_name, &princ); - if(ret){ - krb5_free_context(context); - return ret; - } - ret = krb5_cc_new_unique(context, "MEMORY", NULL, &id); - if(ret){ - krb5_free_principal(context, princ); - krb5_free_context(context); - return ret; - } - ret = krb5_verify_user(context, - princ, - id, - passwd, - 1, - NULL); - krb5_free_principal(context, princ); - if (k_hasafs()) { - krb5_afslog_uid_home(context, id,NULL, NULL,pwd->pw_uid, pwd->pw_dir); - } - krb5_cc_destroy(context, id); - krb5_free_context (context); - if(ret) - return ret; - return 0; -} -#endif /* KRB5 */ - -void -pass(char *passwd) -{ - int rval; - - /* some clients insists on sending a password */ - if (logged_in && askpasswd == 0){ - reply(230, "Password not necessary"); - return; - } - - if (logged_in || askpasswd == 0) { - reply(503, "Login with USER first."); - return; - } - askpasswd = 0; - rval = 1; - if (!guest) { /* "ftp" is only account allowed no password */ - if (pw == NULL) - rval = 1; /* failure below */ -#ifdef OTP - else if (otp_verify_user (&otp_ctx, passwd) == 0) { - rval = 0; - } -#endif - else if((auth_level & AUTH_OTP) == 0) { -#ifdef KRB5 - rval = krb5_verify(pw, passwd); -#endif - if (rval) - rval = unix_verify_user(pw->pw_name, passwd); - } else { -#ifdef OTP - char *s; - if ((s = otp_error(&otp_ctx)) != NULL) - lreply(530, "OTP: %s", s); -#endif - } - memset (passwd, 0, strlen(passwd)); - - /* - * If rval == 1, the user failed the authentication - * check above. If rval == 0, either Kerberos or - * local authentication succeeded. - */ - if (rval) { - char data_addr[256]; - - if (inet_ntop (his_addr->sa_family, - socket_get_address(his_addr), - data_addr, sizeof(data_addr)) == NULL) - strlcpy (data_addr, "unknown address", - sizeof(data_addr)); - - reply(530, "Login incorrect."); - if (logging) - syslog(LOG_NOTICE, - "FTP LOGIN FAILED FROM %s(%s), %s", - remotehost, - data_addr, - curname); - pw = NULL; - if (login_attempts++ >= 5) { - syslog(LOG_NOTICE, - "repeated login failures from %s(%s)", - remotehost, - data_addr); - exit(0); - } - return; - } - } - if(!do_login(230, passwd)) - return; - - /* Forget all about it... */ - end_login(); -} - -void -retrieve(const char *cmd, char *name) -{ - FILE *fin = NULL, *dout; - struct stat st; - int (*closefunc) (FILE *); - char line[BUFSIZ]; - - - if (cmd == 0) { - fin = fopen(name, "r"); - closefunc = fclose; - st.st_size = 0; - if(fin == NULL){ - int save_errno = errno; - struct cmds { - const char *ext; - const char *cmd; - const char *rev_cmd; - } cmds[] = { - {".tar", "/bin/gtar cPf - %s", NULL}, - {".tar.gz", "/bin/gtar zcPf - %s", NULL}, - {".tar.Z", "/bin/gtar ZcPf - %s", NULL}, - {".gz", "/bin/gzip -c -- %s", "/bin/gzip -c -d -- %s"}, - {".Z", "/bin/compress -c -- %s", "/bin/uncompress -c -- %s"}, - {NULL, NULL} - }; - struct cmds *p; - for(p = cmds; p->ext; p++){ - char *tail = name + strlen(name) - strlen(p->ext); - char c = *tail; - - if(strcmp(tail, p->ext) == 0 && - (*tail = 0) == 0 && - access(name, R_OK) == 0){ - snprintf (line, sizeof(line), p->cmd, name); - *tail = c; - break; - } - *tail = c; - if (p->rev_cmd != NULL) { - char *ext; - int ret; - - ret = asprintf(&ext, "%s%s", name, p->ext); - if (ret != -1) { - if (access(ext, R_OK) == 0) { - snprintf (line, sizeof(line), - p->rev_cmd, ext); - free(ext); - break; - } - free(ext); - } - } - - } - if(p->ext){ - fin = ftpd_popen(line, "r", 0, 0); - closefunc = ftpd_pclose; - st.st_size = -1; - cmd = line; - } else - errno = save_errno; - } - } else { - snprintf(line, sizeof(line), cmd, name); - name = line; - fin = ftpd_popen(line, "r", 1, 0); - closefunc = ftpd_pclose; - st.st_size = -1; - } - if (fin == NULL) { - if (errno != 0) { - perror_reply(550, name); - if (cmd == 0) { - LOGCMD("get", name); - } - } - return; - } - byte_count = -1; - if (cmd == 0){ - if(fstat(fileno(fin), &st) < 0 || !S_ISREG(st.st_mode)) { - reply(550, "%s: not a plain file.", name); - goto done; - } - } - if (restart_point) { - if (type == TYPE_A) { - off_t i, n; - int c; - - n = restart_point; - i = 0; - while (i++ < n) { - if ((c=getc(fin)) == EOF) { - perror_reply(550, name); - goto done; - } - if (c == '\n') - i++; - } - } else if (lseek(fileno(fin), restart_point, SEEK_SET) < 0) { - perror_reply(550, name); - goto done; - } - } - dout = dataconn(name, st.st_size, "w"); - if (dout == NULL) - goto done; - set_buffer_size(fileno(dout), 0); - send_data(fin, dout); - fclose(dout); - data = -1; - pdata = -1; -done: - if (cmd == 0) - LOGBYTES("get", name, byte_count); - (*closefunc)(fin); -} - -/* filename sanity check */ - -int -filename_check(char *filename) -{ - char *p; - - p = strrchr(filename, '/'); - if(p) - filename = p + 1; - - p = filename; - - if(isalnum((unsigned char)*p)){ - p++; - while(*p && (isalnum((unsigned char)*p) || strchr(good_chars, (unsigned char)*p))) - p++; - if(*p == '\0') - return 0; - } - lreply(553, "\"%s\" is not an acceptable filename.", filename); - lreply(553, "The filename must start with an alphanumeric " - "character and must only"); - reply(553, "consist of alphanumeric characters or any of the following: %s", - good_chars); - return 1; -} - -void -do_store(char *name, char *mode, int unique) -{ - FILE *fout, *din; - struct stat st; - int (*closefunc) (FILE *); - - if(guest && filename_check(name)) - return; - if (unique) { - char *uname; - if (stat(name, &st) == 0) { - if ((uname = gunique(name)) == NULL) - return; - name = uname; - } - LOGCMD(*mode == 'w' ? "put" : "append", name); - } - - if (restart_point) - mode = "r+"; - fout = fopen(name, mode); - closefunc = fclose; - if (fout == NULL) { - perror_reply(553, name); - LOGCMD(*mode == 'w' ? "put" : "append", name); - return; - } - byte_count = -1; - if (restart_point) { - if (type == TYPE_A) { - off_t i, n; - int c; - - n = restart_point; - i = 0; - while (i++ < n) { - if ((c=getc(fout)) == EOF) { - perror_reply(550, name); - goto done; - } - if (c == '\n') - i++; - } - /* - * We must do this seek to "current" position - * because we are changing from reading to - * writing. - */ - if (fseek(fout, 0L, SEEK_CUR) < 0) { - perror_reply(550, name); - goto done; - } - } else if (lseek(fileno(fout), restart_point, SEEK_SET) < 0) { - perror_reply(550, name); - goto done; - } - } - din = dataconn(name, (off_t)-1, "r"); - if (din == NULL) - goto done; - set_buffer_size(fileno(din), 1); - if (receive_data(din, fout) == 0) { - if((*closefunc)(fout) < 0) - perror_reply(552, name); - else { - if (unique) - reply(226, "Transfer complete (unique file name:%s).", - name); - else - reply(226, "Transfer complete."); - } - } else - (*closefunc)(fout); - fclose(din); - data = -1; - pdata = -1; -done: - LOGBYTES(*mode == 'w' ? "put" : "append", name, byte_count); -} - -static FILE * -getdatasock(const char *mode, int domain) -{ - int s, t, tries; - - if (data >= 0) - return (fdopen(data, mode)); - if (seteuid(0) < 0) - fatal("Failed to seteuid"); - s = socket(domain, SOCK_STREAM, 0); - if (s < 0) - goto bad; - socket_set_reuseaddr (s, 1); - /* anchor socket to avoid multi-homing problems */ - socket_set_address_and_port (data_source, - socket_get_address (ctrl_addr), - socket_get_port (data_source)); - - for (tries = 1; ; tries++) { - if (bind(s, data_source, - socket_sockaddr_size (data_source)) >= 0) - break; - if (errno != EADDRINUSE || tries > 10) - goto bad; - sleep(tries); - } - if (seteuid(pw->pw_uid) < 0) - fatal("Failed to seteuid"); -#ifdef IPTOS_THROUGHPUT - socket_set_tos (s, IPTOS_THROUGHPUT); -#endif - return (fdopen(s, mode)); -bad: - /* Return the real value of errno (close may change it) */ - t = errno; - if (seteuid((uid_t)pw->pw_uid) < 0) - fatal("Failed to seteuid"); - close(s); - errno = t; - return (NULL); -} - -static int -accept_with_timeout(int socket, - struct sockaddr *address, - socklen_t *address_len, - struct timeval *timeout) -{ - int ret; - fd_set rfd; - FD_ZERO(&rfd); - FD_SET(socket, &rfd); - ret = select(socket + 1, &rfd, NULL, NULL, timeout); - if(ret < 0) - return ret; - if(ret == 0) { - errno = ETIMEDOUT; - return -1; - } - return accept(socket, address, address_len); -} - -static FILE * -dataconn(const char *name, off_t size, const char *mode) -{ - char sizebuf[32]; - FILE *file; - int domain, retry = 0; - - file_size = size; - byte_count = 0; - if (size >= 0) - snprintf(sizebuf, sizeof(sizebuf), " (%ld bytes)", (long)size); - else - *sizebuf = '\0'; - if (pdata >= 0) { - struct sockaddr_storage from_ss; - struct sockaddr *from = (struct sockaddr *)&from_ss; - struct timeval timeout; - int s; - socklen_t fromlen = sizeof(from_ss); - - timeout.tv_sec = 15; - timeout.tv_usec = 0; - s = accept_with_timeout(pdata, from, &fromlen, &timeout); - if (s < 0) { - reply(425, "Can't open data connection."); - close(pdata); - pdata = -1; - return (NULL); - } - close(pdata); - pdata = s; -#if defined(IPTOS_THROUGHPUT) - if (from->sa_family == AF_INET) - socket_set_tos(s, IPTOS_THROUGHPUT); -#endif - reply(150, "Opening %s mode data connection for '%s'%s.", - type == TYPE_A ? "ASCII" : "BINARY", name, sizebuf); - return (fdopen(pdata, mode)); - } - if (data >= 0) { - reply(125, "Using existing data connection for '%s'%s.", - name, sizebuf); - usedefault = 1; - return (fdopen(data, mode)); - } - if (usedefault) - data_dest = his_addr; - usedefault = 1; - /* - * Default to using the same socket type as the ctrl address, - * unless we know the type of the data address. - */ - domain = data_dest->sa_family; - if (domain == PF_UNSPEC) - domain = ctrl_addr->sa_family; - - file = getdatasock(mode, domain); - if (file == NULL) { - char data_addr[256]; - - if (inet_ntop (data_source->sa_family, - socket_get_address(data_source), - data_addr, sizeof(data_addr)) == NULL) - strlcpy (data_addr, "unknown address", - sizeof(data_addr)); - - reply(425, "Can't create data socket (%s,%d): %s.", - data_addr, - socket_get_port (data_source), - strerror(errno)); - return (NULL); - } - data = fileno(file); - while (connect(data, data_dest, - socket_sockaddr_size(data_dest)) < 0) { - if (errno == EADDRINUSE && retry < swaitmax) { - sleep(swaitint); - retry += swaitint; - continue; - } - perror_reply(425, "Can't build data connection"); - fclose(file); - data = -1; - return (NULL); - } - reply(150, "Opening %s mode data connection for '%s'%s.", - type == TYPE_A ? "ASCII" : "BINARY", name, sizebuf); - return (file); -} - -/* - * Tranfer the contents of "instr" to "outstr" peer using the appropriate - * encapsulation of the data subject * to Mode, Structure, and Type. - * - * NB: Form isn't handled. - */ -static void -send_data(FILE *instr, FILE *outstr) -{ - int c, cnt, filefd, netfd; - static char *buf; - static size_t bufsize; - - transflag = 1; - switch (type) { - - case TYPE_A: - while ((c = getc(instr)) != EOF) { - if (urgflag && handleoobcmd()) - return; - byte_count++; - if(c == '\n') - sec_putc('\r', outstr); - sec_putc(c, outstr); - } - sec_fflush(outstr); - transflag = 0; - urgflag = 0; - if (ferror(instr)) - goto file_err; - if (ferror(outstr)) - goto data_err; - reply(226, "Transfer complete."); - return; - - case TYPE_I: - case TYPE_L: -#if 0 /* XXX handle urg flag */ -#if defined(HAVE_MMAP) && !defined(NO_MMAP) -#ifndef MAP_FAILED -#define MAP_FAILED (-1) -#endif - { - struct stat st; - char *chunk; - int in = fileno(instr); - if(fstat(in, &st) == 0 && S_ISREG(st.st_mode) - && st.st_size > 0) { - /* - * mmap zero bytes has potential of loosing, don't do it. - */ - chunk = mmap(0, st.st_size, PROT_READ, - MAP_SHARED, in, 0); - if((void *)chunk != (void *)MAP_FAILED) { - cnt = st.st_size - restart_point; - sec_write(fileno(outstr), chunk + restart_point, cnt); - if (munmap(chunk, st.st_size) < 0) - warn ("munmap"); - sec_fflush(outstr); - byte_count = cnt; - transflag = 0; - urgflag = 0; - } - } - } -#endif -#endif - if(transflag) { - struct stat st; - - netfd = fileno(outstr); - filefd = fileno(instr); - buf = alloc_buffer (buf, &bufsize, - fstat(filefd, &st) >= 0 ? &st : NULL); - if (buf == NULL) { - transflag = 0; - urgflag = 0; - perror_reply(451, "Local resource failure: malloc"); - return; - } - while ((cnt = read(filefd, buf, bufsize)) > 0 && - sec_write(netfd, buf, cnt) == cnt) { - byte_count += cnt; - if (urgflag && handleoobcmd()) - return; - } - sec_fflush(outstr); /* to end an encrypted stream */ - transflag = 0; - urgflag = 0; - if (cnt != 0) { - if (cnt < 0) - goto file_err; - goto data_err; - } - } - reply(226, "Transfer complete."); - return; - default: - transflag = 0; - urgflag = 0; - reply(550, "Unimplemented TYPE %d in send_data", type); - return; - } - -data_err: - transflag = 0; - urgflag = 0; - perror_reply(426, "Data connection"); - return; - -file_err: - transflag = 0; - urgflag = 0; - perror_reply(551, "Error on input file"); -} - -/* - * Transfer data from peer to "outstr" using the appropriate encapulation of - * the data subject to Mode, Structure, and Type. - * - * N.B.: Form isn't handled. - */ -static int -receive_data(FILE *instr, FILE *outstr) -{ - int cnt, bare_lfs = 0; - static char *buf; - static size_t bufsize; - struct stat st; - - transflag = 1; - - buf = alloc_buffer (buf, &bufsize, - fstat(fileno(outstr), &st) >= 0 ? &st : NULL); - if (buf == NULL) { - transflag = 0; - urgflag = 0; - perror_reply(451, "Local resource failure: malloc"); - return -1; - } - - switch (type) { - - case TYPE_I: - case TYPE_L: - while ((cnt = sec_read(fileno(instr), buf, bufsize)) > 0) { - if (write(fileno(outstr), buf, cnt) != cnt) - goto file_err; - byte_count += cnt; - if (urgflag && handleoobcmd()) - return (-1); - } - if (cnt < 0) - goto data_err; - transflag = 0; - urgflag = 0; - return (0); - - case TYPE_E: - reply(553, "TYPE E not implemented."); - transflag = 0; - urgflag = 0; - return (-1); - - case TYPE_A: - { - char *p, *q; - int cr_flag = 0; - while ((cnt = sec_read(fileno(instr), - buf + cr_flag, - bufsize - cr_flag)) > 0){ - if (urgflag && handleoobcmd()) - return (-1); - byte_count += cnt; - cnt += cr_flag; - cr_flag = 0; - for(p = buf, q = buf; p < buf + cnt;) { - if(*p == '\n') - bare_lfs++; - if(*p == '\r') { - if(p == buf + cnt - 1){ - cr_flag = 1; - p++; - continue; - }else if(p[1] == '\n'){ - *q++ = '\n'; - p += 2; - continue; - } - } - *q++ = *p++; - } - fwrite(buf, q - buf, 1, outstr); - if(cr_flag) - buf[0] = '\r'; - } - if(cr_flag) - putc('\r', outstr); - fflush(outstr); - if (ferror(instr)) - goto data_err; - if (ferror(outstr)) - goto file_err; - transflag = 0; - urgflag = 0; - if (bare_lfs) { - lreply(226, "WARNING! %d bare linefeeds received in ASCII mode\r\n" - " File may not have transferred correctly.\r\n", - bare_lfs); - } - return (0); - } - default: - reply(550, "Unimplemented TYPE %d in receive_data", type); - transflag = 0; - urgflag = 0; - return (-1); - } - -data_err: - transflag = 0; - urgflag = 0; - perror_reply(426, "Data Connection"); - return (-1); - -file_err: - transflag = 0; - urgflag = 0; - perror_reply(452, "Error writing file"); - return (-1); -} - -void -statfilecmd(char *filename) -{ - FILE *fin; - int c; - char line[LINE_MAX]; - - snprintf(line, sizeof(line), "/bin/ls -la -- %s", filename); - fin = ftpd_popen(line, "r", 1, 0); - lreply(211, "status of %s:", filename); - while ((c = getc(fin)) != EOF) { - if (c == '\n') { - if (ferror(stdout)){ - perror_reply(421, "control connection"); - ftpd_pclose(fin); - dologout(1); - /* NOTREACHED */ - } - if (ferror(fin)) { - perror_reply(551, filename); - ftpd_pclose(fin); - return; - } - putc('\r', stdout); - } - putc(c, stdout); - } - ftpd_pclose(fin); - reply(211, "End of Status"); -} - -void -statcmd(void) -{ -#if 0 - struct sockaddr_in *sin; - u_char *a, *p; - - lreply(211, "%s FTP server (%s) status:", hostname, version); - printf(" %s\r\n", version); - printf(" Connected to %s", remotehost); - if (!isdigit((unsigned char)remotehost[0])) - printf(" (%s)", inet_ntoa(his_addr.sin_addr)); - printf("\r\n"); - if (logged_in) { - if (guest) - printf(" Logged in anonymously\r\n"); - else - printf(" Logged in as %s\r\n", pw->pw_name); - } else if (askpasswd) - printf(" Waiting for password\r\n"); - else - printf(" Waiting for user name\r\n"); - printf(" TYPE: %s", typenames[type]); - if (type == TYPE_A || type == TYPE_E) - printf(", FORM: %s", formnames[form]); - if (type == TYPE_L) -#if NBBY == 8 - printf(" %d", NBBY); -#else - printf(" %d", bytesize); /* need definition! */ -#endif - printf("; STRUcture: %s; transfer MODE: %s\r\n", - strunames[stru], modenames[mode]); - if (data != -1) - printf(" Data connection open\r\n"); - else if (pdata != -1) { - printf(" in Passive mode"); - sin = &pasv_addr; - goto printaddr; - } else if (usedefault == 0) { - printf(" PORT"); - sin = &data_dest; -printaddr: - a = (u_char *) &sin->sin_addr; - p = (u_char *) &sin->sin_port; -#define UC(b) (((int) b) & 0xff) - printf(" (%d,%d,%d,%d,%d,%d)\r\n", UC(a[0]), - UC(a[1]), UC(a[2]), UC(a[3]), UC(p[0]), UC(p[1])); -#undef UC - } else - printf(" No data connection\r\n"); -#endif - reply(211, "End of status"); -} - -void -fatal(char *s) -{ - - reply(451, "Error in server: %s\n", s); - reply(221, "Closing connection due to server error."); - dologout(0); - /* NOTREACHED */ -} - -static void -int_reply(int, char *, const char *, va_list) -#ifdef __GNUC__ -__attribute__ ((format (printf, 3, 0))) -#endif -; - -static void -int_reply(int n, char *c, const char *fmt, va_list ap) -{ - char buf[10240]; - char *p; - p=buf; - if(n){ - snprintf(p, sizeof(buf), "%d%s", n, c); - p+=strlen(p); - } - vsnprintf(p, sizeof(buf) - strlen(p), fmt, ap); - p+=strlen(p); - snprintf(p, sizeof(buf) - strlen(p), "\r\n"); - p+=strlen(p); - sec_fprintf(stdout, "%s", buf); - fflush(stdout); - if (debug) - syslog(LOG_DEBUG, "<--- %s- ", buf); -} - -void -reply(int n, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - int_reply(n, " ", fmt, ap); - delete_ftp_command(); - va_end(ap); -} - -void -lreply(int n, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - int_reply(n, "-", fmt, ap); - va_end(ap); -} - -void -nreply(const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - int_reply(0, NULL, fmt, ap); - va_end(ap); -} - -static void -ack(char *s) -{ - - reply(250, "%s command successful.", s); -} - -void -nack(char *s) -{ - - reply(502, "%s command not implemented.", s); -} - -void -do_delete(char *name) -{ - struct stat st; - - LOGCMD("delete", name); - if (stat(name, &st) < 0) { - perror_reply(550, name); - return; - } - if (S_ISDIR(st.st_mode)) { - if (rmdir(name) < 0) { - perror_reply(550, name); - return; - } - goto done; - } - if (unlink(name) < 0) { - perror_reply(550, name); - return; - } -done: - ack("DELE"); -} - -void -cwd(const char *path) -{ - - if (chdir(path) < 0) - perror_reply(550, path); - else - ack("CWD"); -} - -void -makedir(char *name) -{ - - LOGCMD("mkdir", name); - if(guest && filename_check(name)) - return; - if (mkdir(name, 0777) < 0) - perror_reply(550, name); - else{ - if(guest) - chmod(name, 0700); /* guest has umask 777 */ - reply(257, "MKD command successful."); - } -} - -void -removedir(char *name) -{ - - LOGCMD("rmdir", name); - if (rmdir(name) < 0) - perror_reply(550, name); - else - ack("RMD"); -} - -void -pwd(void) -{ - char path[MaxPathLen]; - char *ret; - - /* SunOS has a broken getcwd that does popen(pwd) (!!!), this - * failes miserably when running chroot - */ - ret = getcwd(path, sizeof(path)); - if (ret == NULL) - reply(550, "%s.", strerror(errno)); - else - reply(257, "\"%s\" is current directory.", path); -} - -char * -renamefrom(char *name) -{ - struct stat st; - - if (stat(name, &st) < 0) { - perror_reply(550, name); - return NULL; - } - reply(350, "File exists, ready for destination name"); - return (name); -} - -void -renamecmd(char *from, char *to) -{ - - LOGCMD2("rename", from, to); - if(guest && filename_check(to)) - return; - if (rename(from, to) < 0) - perror_reply(550, "rename"); - else - ack("RNTO"); -} - -static void -dolog(struct sockaddr *sa, int len) -{ - getnameinfo_verified (sa, len, remotehost, sizeof(remotehost), - NULL, 0, 0); -#ifdef HAVE_SETPROCTITLE - snprintf(proctitle, sizeof(proctitle), "%s: connected", remotehost); - setproctitle("%s", proctitle); -#endif /* HAVE_SETPROCTITLE */ - - if (logging) { - char data_addr[256]; - - if (inet_ntop (his_addr->sa_family, - socket_get_address(his_addr), - data_addr, sizeof(data_addr)) == NULL) - strlcpy (data_addr, "unknown address", - sizeof(data_addr)); - - - syslog(LOG_INFO, "connection from %s(%s)", - remotehost, - data_addr); - } -} - -/* - * Record logout in wtmp file - * and exit with supplied status. - */ -void -dologout(int status) -{ - transflag = 0; - urgflag = 0; - if (logged_in) { -#if KRB5 - cond_kdestroy(); -#endif - seteuid((uid_t)0); /* No need to check, we call exit() below */ - ftpd_logwtmp(ttyline, "", ""); - } - /* beware of flushing buffers after a SIGPIPE */ -#ifdef XXX - exit(status); -#else - _exit(status); -#endif -} - -void abor(void) -{ - if (!transflag) - return; - reply(426, "Transfer aborted. Data connection closed."); - reply(226, "Abort successful"); - transflag = 0; -} - -static void -myoob(int signo) -{ - urgflag = 1; -} - -static char * -mec_space(char *p) -{ - while(isspace(*(unsigned char *)p)) - p++; - return p; -} - -static int -handleoobcmd(void) -{ - char *cp; - - /* only process if transfer occurring */ - if (!transflag) - return 0; - - urgflag = 0; - - cp = tmpline; - if (ftpd_getline(cp, sizeof(tmpline)) == NULL) { - reply(221, "You could at least say goodbye."); - dologout(0); - } - - if (strncasecmp("MIC", cp, 3) == 0) { - mec(mec_space(cp + 3), prot_safe); - } else if (strncasecmp("CONF", cp, 4) == 0) { - mec(mec_space(cp + 4), prot_confidential); - } else if (strncasecmp("ENC", cp, 3) == 0) { - mec(mec_space(cp + 3), prot_private); - } else if (!allow_insecure_oob) { - reply(533, "Command protection level denied " - "for paranoid reasons."); - goto out; - } - - if (secure_command()) - cp = ftp_command; - - if (strcasecmp(cp, "ABOR\r\n") == 0) { - abor(); - } else if (strcasecmp(cp, "STAT\r\n") == 0) { - if (file_size != (off_t) -1) - reply(213, "Status: %ld of %ld bytes transferred", - (long)byte_count, - (long)file_size); - else - reply(213, "Status: %ld bytes transferred", - (long)byte_count); - } -out: - return (transflag == 0); -} - -/* - * Note: a response of 425 is not mentioned as a possible response to - * the PASV command in RFC959. However, it has been blessed as - * a legitimate response by Jon Postel in a telephone conversation - * with Rick Adams on 25 Jan 89. - */ -void -pasv(void) -{ - socklen_t len; - char *p, *a; - struct sockaddr_in *sin; - - if (ctrl_addr->sa_family != AF_INET) { - reply(425, - "You cannot do PASV with something that's not IPv4"); - return; - } - - if(pdata != -1) - close(pdata); - - pdata = socket(ctrl_addr->sa_family, SOCK_STREAM, 0); - if (pdata < 0) { - perror_reply(425, "Can't open passive connection"); - return; - } - pasv_addr->sa_family = ctrl_addr->sa_family; - socket_set_address_and_port (pasv_addr, - socket_get_address (ctrl_addr), - 0); - socket_set_portrange(pdata, restricted_data_ports, - pasv_addr->sa_family); - if (seteuid(0) < 0) - fatal("Failed to seteuid"); - if (bind(pdata, pasv_addr, socket_sockaddr_size (pasv_addr)) < 0) { - if (seteuid(pw->pw_uid) < 0) - fatal("Failed to seteuid"); - goto pasv_error; - } - if (seteuid(pw->pw_uid) < 0) - fatal("Failed to seteuid"); - len = sizeof(pasv_addr_ss); - if (getsockname(pdata, pasv_addr, &len) < 0) - goto pasv_error; - if (listen(pdata, 1) < 0) - goto pasv_error; - sin = (struct sockaddr_in *)pasv_addr; - a = (char *) &sin->sin_addr; - p = (char *) &sin->sin_port; - -#define UC(b) (((int) b) & 0xff) - - reply(227, "Entering Passive Mode (%d,%d,%d,%d,%d,%d)", UC(a[0]), - UC(a[1]), UC(a[2]), UC(a[3]), UC(p[0]), UC(p[1])); - return; - -pasv_error: - close(pdata); - pdata = -1; - perror_reply(425, "Can't open passive connection"); - return; -} - -void -epsv(char *proto) -{ - socklen_t len; - - pdata = socket(ctrl_addr->sa_family, SOCK_STREAM, 0); - if (pdata < 0) { - perror_reply(425, "Can't open passive connection"); - return; - } - pasv_addr->sa_family = ctrl_addr->sa_family; - socket_set_address_and_port (pasv_addr, - socket_get_address (ctrl_addr), - 0); - socket_set_portrange(pdata, restricted_data_ports, - pasv_addr->sa_family); - if (seteuid(0) < 0) - fatal("Failed to seteuid"); - if (bind(pdata, pasv_addr, socket_sockaddr_size (pasv_addr)) < 0) { - if (seteuid(pw->pw_uid)) - fatal("Failed to seteuid"); - goto pasv_error; - } - if (seteuid(pw->pw_uid) < 0) - fatal("Failed to seteuid"); - len = sizeof(pasv_addr_ss); - if (getsockname(pdata, pasv_addr, &len) < 0) - goto pasv_error; - if (listen(pdata, 1) < 0) - goto pasv_error; - - reply(229, "Entering Extended Passive Mode (|||%d|)", - ntohs(socket_get_port (pasv_addr))); - return; - -pasv_error: - close(pdata); - pdata = -1; - perror_reply(425, "Can't open passive connection"); - return; -} - -void -eprt(char *str) -{ - char *end; - char sep; - int af; - int ret; - int port; - - usedefault = 0; - if (pdata >= 0) { - close(pdata); - pdata = -1; - } - - sep = *str++; - if (sep == '\0') { - reply(500, "Bad syntax in EPRT"); - return; - } - af = strtol (str, &end, 0); - if (af == 0 || *end != sep) { - reply(500, "Bad syntax in EPRT"); - return; - } - str = end + 1; - switch (af) { -#ifdef HAVE_IPV6 - case 2 : - data_dest->sa_family = AF_INET6; - break; -#endif - case 1 : - data_dest->sa_family = AF_INET; - break; - default : - reply(522, "Network protocol %d not supported, use (1" -#ifdef HAVE_IPV6 - ",2" -#endif - ")", af); - return; - } - end = strchr (str, sep); - if (end == NULL) { - reply(500, "Bad syntax in EPRT"); - return; - } - *end = '\0'; - ret = inet_pton (data_dest->sa_family, str, - socket_get_address (data_dest)); - - if (ret != 1) { - reply(500, "Bad address syntax in EPRT"); - return; - } - str = end + 1; - port = strtol (str, &end, 0); - if (port == 0 || *end != sep) { - reply(500, "Bad port syntax in EPRT"); - return; - } - if (port < IPPORT_RESERVED) { - reply(500, "Bad port in invalid range in EPRT"); - return; - } - socket_set_port (data_dest, htons(port)); - - if (paranoid && - (data_dest->sa_family != his_addr->sa_family || - memcmp(socket_get_address(data_dest), socket_get_address(his_addr), socket_sockaddr_size(data_dest)) != 0)) - { - reply(500, "Bad address in EPRT"); - } - reply(200, "EPRT command successful."); -} - -/* - * Generate unique name for file with basename "local". - * The file named "local" is already known to exist. - * Generates failure reply on error. - */ -static char * -gunique(char *local) -{ - static char new[MaxPathLen]; - struct stat st; - int count; - char *cp; - - cp = strrchr(local, '/'); - if (cp) - *cp = '\0'; - if (stat(cp ? local : ".", &st) < 0) { - perror_reply(553, cp ? local : "."); - return NULL; - } - if (cp) - *cp = '/'; - for (count = 1; count < 100; count++) { - snprintf (new, sizeof(new), "%s.%d", local, count); - if (stat(new, &st) < 0) - return (new); - } - reply(452, "Unique file name cannot be created."); - return (NULL); -} - -/* - * Format and send reply containing system error number. - */ -void -perror_reply(int code, const char *string) -{ - reply(code, "%s: %s.", string, strerror(errno)); -} - -static char *onefile[] = { - "", - 0 -}; - -void -list_file(char *file) -{ - if(use_builtin_ls) { - FILE *dout; - dout = dataconn(file, -1, "w"); - if (dout == NULL) - return; - set_buffer_size(fileno(dout), 0); - if(builtin_ls(dout, file) == 0) - reply(226, "Transfer complete."); - else - reply(451, "Requested action aborted. Local error in processing."); - fclose(dout); - data = -1; - pdata = -1; - } else { -#ifdef HAVE_LS_A - const char *cmd = "/bin/ls -lA %s"; -#else - const char *cmd = "/bin/ls -la %s"; -#endif - retrieve(cmd, file); - } -} - -void -send_file_list(char *whichf) -{ - struct stat st; - DIR *dirp = NULL; - struct dirent *dir; - FILE *dout = NULL; - char **dirlist, *dirname; - int simple = 0; - int freeglob = 0; - glob_t gl; - char buf[MaxPathLen]; - - if (strpbrk(whichf, "~{[*?") != NULL) { - int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE| -#ifdef GLOB_MAXPATH - GLOB_MAXPATH -#else - GLOB_LIMIT -#endif - ; - - memset(&gl, 0, sizeof(gl)); - freeglob = 1; - if (glob(whichf, flags, 0, &gl)) { - reply(550, "not found"); - goto out; - } else if (gl.gl_pathc == 0) { - errno = ENOENT; - perror_reply(550, whichf); - goto out; - } - dirlist = gl.gl_pathv; - } else { - onefile[0] = whichf; - dirlist = onefile; - simple = 1; - } - - while ((dirname = *dirlist++)) { - - if (urgflag && handleoobcmd()) - goto out; - - if (stat(dirname, &st) < 0) { - /* - * If user typed "ls -l", etc, and the client - * used NLST, do what the user meant. - */ - if (dirname[0] == '-' && *dirlist == NULL && - transflag == 0) { - list_file(dirname); - goto out; - } - perror_reply(550, whichf); - goto out; - } - - if (S_ISREG(st.st_mode)) { - if (dout == NULL) { - dout = dataconn("file list", (off_t)-1, "w"); - if (dout == NULL) - goto out; - transflag = 1; - } - snprintf(buf, sizeof(buf), "%s%s\n", dirname, - type == TYPE_A ? "\r" : ""); - sec_write(fileno(dout), buf, strlen(buf)); - byte_count += strlen(dirname) + 1; - continue; - } else if (!S_ISDIR(st.st_mode)) - continue; - - if ((dirp = opendir(dirname)) == NULL) - continue; - - while ((dir = readdir(dirp)) != NULL) { - char nbuf[MaxPathLen]; - - if (urgflag && handleoobcmd()) - goto out; - - if (!strcmp(dir->d_name, ".")) - continue; - if (!strcmp(dir->d_name, "..")) - continue; - - snprintf(nbuf, sizeof(nbuf), "%s/%s", dirname, dir->d_name); - - /* - * We have to do a stat to insure it's - * not a directory or special file. - */ - if (simple || (stat(nbuf, &st) == 0 && - S_ISREG(st.st_mode))) { - if (dout == NULL) { - dout = dataconn("file list", (off_t)-1, "w"); - if (dout == NULL) - goto out; - transflag = 1; - } - if(strncmp(nbuf, "./", 2) == 0) - snprintf(buf, sizeof(buf), "%s%s\n", nbuf +2, - type == TYPE_A ? "\r" : ""); - else - snprintf(buf, sizeof(buf), "%s%s\n", nbuf, - type == TYPE_A ? "\r" : ""); - sec_write(fileno(dout), buf, strlen(buf)); - byte_count += strlen(nbuf) + 1; - } - } - closedir(dirp); - } - if (dout == NULL) - reply(550, "No files found."); - else if (ferror(dout) != 0) - perror_reply(550, "Data connection"); - else - reply(226, "Transfer complete."); - -out: - transflag = 0; - if (dout != NULL){ - sec_write(fileno(dout), buf, 0); /* XXX flush */ - - fclose(dout); - } - data = -1; - pdata = -1; - if (freeglob) - globfree(&gl); -} - - -int -find(char *pattern) -{ - char line[1024]; - FILE *f; - - snprintf(line, sizeof(line), - "/bin/locate -d %s -- %s", - ftp_rooted("/etc/locatedb"), - pattern); - f = ftpd_popen(line, "r", 1, 1); - if(f == NULL){ - perror_reply(550, "/bin/locate"); - return 1; - } - lreply(200, "Output from find."); - while(fgets(line, sizeof(line), f)){ - if(line[strlen(line)-1] == '\n') - line[strlen(line)-1] = 0; - nreply("%s", line); - } - reply(200, "Done"); - ftpd_pclose(f); - return 0; -} - diff --git a/kerberosV/src/appl/ftp/ftpd/ftpd.cat8 b/kerberosV/src/appl/ftp/ftpd/ftpd.cat8 deleted file mode 100644 index 46530989b35..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/ftpd.cat8 +++ /dev/null @@ -1,309 +0,0 @@ - -FTPD(8) BSD System Manager's Manual FTPD(8) - -NNAAMMEE - ffttppdd -- Internet File Transfer Protocol server - -SSYYNNOOPPSSIISS - ffttppdd [--aa _a_u_t_h_m_o_d_e] [--ddiillvvUU] [--gg _u_m_a_s_k] [--pp _p_o_r_t] [--TT _m_a_x_t_i_m_e_o_u_t] - [--tt _t_i_m_e_o_u_t] [----ggssss--bbiinnddiinnggss] [--II | ----nnoo--iinnsseeccuurree--oooobb] - [--uu _d_e_f_a_u_l_t _u_m_a_s_k] [--BB | ----bbuuiillttiinn--llss] [----ggoooodd--cchhaarrss==_s_t_r_i_n_g] - -DDEESSCCRRIIPPTTIIOONN - FFttppdd is the Internet File Transfer Protocol server process. The server - uses the TCP protocol and listens at the port specified in the ``ftp'' - service specification; see services(5). - - Available options: - - --aa 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 --aa. Recognised flags - are: - - _p_l_a_i_n Allow logging in with plaintext password. The password can - be a(n) OTP or an ordinary password. - - _o_t_p Same as _p_l_a_i_n, but only OTP is allowed. - - _f_t_p Allow anonymous login. - - The following combination modes exists for backwards compatibil- - ity: - - _n_o_n_e Same as _p_l_a_i_n_,_f_t_p. - - _s_a_f_e Same as _f_t_p. - - _u_s_e_r Ignored. - - --dd Debugging information is written to the syslog using LOG_FTP. - - --gg Anonymous users will get a umask of _u_m_a_s_k. - - ----ggssss--bbiinnddiinnggss - require the peer to use GSS-API bindings (ie make sure IP - addresses match). - - --ii Open a socket and wait for a connection. This is mainly used for - debugging when ftpd isn't started by inetd. - - --ll Each successful and failed 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 argu- - ments are also logged. - - --pp Use _p_o_r_t (a service name or number) instead of the default - _f_t_p_/_t_c_p. - - --TT A client may also request a different timeout period; the maximum - period allowed may be set to _t_i_m_e_o_u_t seconds with the --TT option. - The default limit is 2 hours. - - --tt The inactivity timeout period is set to _t_i_m_e_o_u_t seconds (the - default is 15 minutes). - - --uu Set the initial umask to something else than the default 027. - - --UU In previous versions of ffttppdd, when a passive mode client - requested a data connection to the server, the server would use - data ports in the range 1024..4999. Now, by default, if the sys- - tem supports the IP_PORTRANGE socket option, the server will use - data ports in the range 49152..65535. Specifying this option - will revert to the old behavior. - - --vv Verbose mode. - - --BB, ----bbuuiillttiinn--llss - use built-in ls to list files - - ----ggoooodd--cchhaarrss==_s_t_r_i_n_g - allowed anonymous upload filename chars - - --II ----nnoo--iinnsseeccuurree--oooobb - don't allow insecure out of band. Heimdal ftp clients before - 0.6.3 doesn't support secure oob, so turning on this option makes - them no longer work. - - The file _/_e_t_c_/_n_o_l_o_g_i_n can be used to disable ftp access. If the file - exists, ffttppdd displays it and exits. If the file _/_e_t_c_/_f_t_p_w_e_l_c_o_m_e exists, - ffttppdd prints it before issuing the ``ready'' message. If the file - _/_e_t_c_/_m_o_t_d exists, ffttppdd prints it after a successful login. - - The ftp server currently supports the following ftp requests. The case - of the requests is ignored. - - Request Description - ABOR abort previous command - ACCT specify account (ignored) - ALLO allocate storage (vacuously) - APPE append to a file - CDUP change to parent of current working directory - CWD change working directory - DELE delete a file - HELP give help information - LIST give list files in a directory (``ls -lgA'') - MKD make a directory - MDTM show last modification time of file - MODE specify data transfer _m_o_d_e - NLST give name list of files in directory - NOOP do nothing - PASS specify password - PASV prepare for server-to-server transfer - PORT specify data connection port - PWD print the current working directory - QUIT terminate session - REST restart incomplete transfer - RETR retrieve a file - RMD remove a directory - RNFR specify rename-from file name - RNTO specify rename-to file name - SITE non-standard commands (see next section) - SIZE return size of file - STAT return status of server - STOR store a file - STOU store a file with a unique name - STRU specify data transfer _s_t_r_u_c_t_u_r_e - SYST show operating system type of server system - TYPE specify data transfer _t_y_p_e - USER specify user name - XCUP change to parent of current working directory - (deprecated) - XCWD change working directory (deprecated) - XMKD make a directory (deprecated) - XPWD print the current working directory (deprecated) - XRMD remove a directory (deprecated) - - The following commands are specified by RFC2228. - - AUTH authentication/security mechanism - ADAT authentication/security data - PROT data channel protection level - PBSZ protection buffer size - MIC integrity protected command - CONF confidentiality protected command - ENC privacy protected command - CCC clear command channel - - The following non-standard or UNIX specific commands are supported by the - SITE request. - - UMASK change umask, (e.g. SSIITTEE UUMMAASSKK 000022) - IDLE set idle-timer, (e.g. SSIITTEE IIDDLLEE 6600) - CHMOD change mode of a file (e.g. SSIITTEE CCHHMMOODD 775555 ffiilleennaammee) - FIND quickly find a specific file with GNU locate(1). - HELP give help information. - - The following Kerberos related site commands are understood. - - KAUTH obtain remote tickets. - KLIST show remote tickets - - 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. - - The ftp server will abort an active file transfer only when the ABOR com- - mand 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. - - FFttppdd interprets file names according to the ``globbing'' conventions used - by csh(1). This allows users to use the metacharacters ``*?[]{}~''. - - FFttppdd authenticates users according to these rules. - - 1. If Kerberos authentication is used, the user must pass valid - tickets and the principal must be allowed to login as the - remote user. - - 2. 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 com- - mand 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 otp(1) for more information - on OTP authentication. - - 3. The login name must not appear in the file _/_e_t_c_/_f_t_p_u_s_e_r_s. - - 4. The user must have a standard shell returned by - getusershell(3). - - 5. If the user name appears in the file _/_e_t_c_/_f_t_p_c_h_r_o_o_t the ses- - sion's root will be changed to the user's login directory by - chroot(2) as for an ``anonymous'' or ``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. - - 6. If the user name is ``anonymous'' or ``ftp'', an anonymous ftp - account must be present in the password file (user ``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). - - In the last case, ffttppdd takes special measures to restrict the client's - access privileges. The server performs a chroot(2) to the home directory - of the ``ftp'' user. In order that system security is not breached, it - is recommended that the ``ftp'' subtree be constructed with care, con- - sider following these guidelines for anonymous ftp. - - In general all files should be owned by ``root'', and have non-write per- - missions (644 or 755 depending on the kind of file). No files should be - owned or writable by ``ftp'' (possibly with exception for the - _~_f_t_p_/_i_n_c_o_m_i_n_g, as specified below). - - _~_f_t_p The ``ftp'' homedirectory should be owned by root. - - _~_f_t_p_/_b_i_n The directory for external programs (such as ls(1)). - These programs must either be statically linked, or you - must setup an environment for dynamic linking when run- - ning chrooted. These programs will be used if present: - - ls Used when listing files. - - compress - When retrieving a filename that ends in _._Z, - and that file isn't present, ffttppdd will try - to find the filename without _._Z and com- - press it on the fly. - - gzip Same as compress, just with files ending in - _._g_z. - - gtar Enables retrieval of whole directories as - files ending in _._t_a_r. Can also be combined - with compression. You must use GNU Tar (or - some other that supports the --zz and --ZZ - flags). - - locate Will enable ``fast find'' with the SSIITTEE - FFIINNDD command. You must also create a - _l_o_c_a_t_e_d_b file in _~_f_t_p_/_e_t_c. - - _~_f_t_p_/_e_t_c If you put copies of the passwd(5) and 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 _m_o_t_d, if present, will be printed after a suc- - cessful login. - - _~_f_t_p_/_d_e_v Put a copy of /dev/null(7) here. - - _~_f_t_p_/_p_u_b Traditional place to put whatever you want to make pub- - lic. - - If you want guests to be able to upload files, create a _~_f_t_p_/_i_n_c_o_m_i_n_g - directory owned by ``root'', and group ``ftp'' with mode 730 (make sure - ``ftp'' is member of group ``ftp''). The following restrictions apply to - anonymous users: - - ++oo Directories created will have mode 700. - - ++oo Uploaded files will be created with an umask of 777, if not changed - with the --gg option. - - ++oo These command are not accessible: DDEELLEE, RRMMDD, RRNNTTOO, RRNNFFRR, SSIITTEE UUMMAASSKK, - and SSIITTEE CCHHMMOODD. - - ++oo Filenames must start with an alpha-numeric character, and consist of - alpha-numeric characters or any of the following: + (plus), - - (minus), = (equal), _ (underscore), . (period), and , (comma). - -FFIILLEESS - /etc/ftpusers Access list for users. - /etc/ftpchroot List of normal users who should be chroot'd. - /etc/ftpwelcome Welcome notice. - /etc/motd Welcome notice after login. - /etc/nologin Displayed and access refused. - ~/.klogin Login access for Kerberos. - -SSEEEE AALLSSOO - ftp(1), otp(1), getusershell(3), ftpusers(5), syslogd(8) - -SSTTAANNDDAARRDDSS - RRFFCC 995599 FTP PROTOCOL SPECIFICATION - RRFFCC 11993388 OTP Specification - RRFFCC 22222288 FTP Security Extensions. - -BBUUGGSS - 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 possi- - bly incomplete. - -HHIISSTTOORRYY - The ffttppdd command appeared in 4.2BSD. - -4.2 Berkeley Distribution July 19, 2003 4.2 Berkeley Distribution diff --git a/kerberosV/src/appl/ftp/ftpd/ftpd_locl.h b/kerberosV/src/appl/ftp/ftpd/ftpd_locl.h deleted file mode 100644 index 163a8fd9a7b..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/ftpd_locl.h +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 1998 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: ftpd_locl.h,v 1.3 2013/06/17 19:11:36 robert Exp $ */ - -#ifndef __ftpd_locl_h__ -#define __ftpd_locl_h__ - -#ifdef HAVE_CONFIG_H -#include -#endif - -/* - * FTP server. - */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#if defined(HAVE_SYS_IOCTL_H) && SunOS != 40 -#include -#endif -#ifdef HAVE_SYS_IOCCOM_H -#include -#endif -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif -#ifdef HAVE_SYS_WAIT_H -#include -#endif - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN_SYSTM_H -#include -#endif -#ifdef HAVE_NETINET_IP_H -#include -#endif - -#ifdef HAVE_SYS_MMAN_H -#include -#endif - -#include -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_ARPA_TELNET_H -#include -#endif - -#include -#ifdef HAVE_DIRENT_H -#include -#endif -#include -#ifdef HAVE_FCNTL_H -#include -#endif -#include -#include -#ifdef HAVE_PWD_H -#include -#endif -#include -#include -#include -#include -#include -#ifdef HAVE_SYSLOG_H -#include -#endif -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_GRP_H -#include -#endif -#include - -#ifdef HAVE_BSD_BSD_H -#include -#endif - -#include -#include "roken.h" - -#include "pathnames.h" -#include "extern.h" -#include "common.h" - -#include "security.h" - -#ifdef KRB5 -#include -#endif /* KRB5 */ - -#if defined(KRB5) -#include -#endif - -#ifdef OTP -#include -#endif - -#ifdef SOCKS -#include -extern int LIBPREFIX(fclose) (FILE *); -#endif - -/* SunOS doesn't have any declaration of fclose */ - -int fclose(FILE *stream); - -int yyparse(void); - -#ifndef LOG_FTP -#define LOG_FTP LOG_DAEMON -#endif - -#endif /* __ftpd_locl_h__ */ diff --git a/kerberosV/src/appl/ftp/ftpd/ftpusers.5 b/kerberosV/src/appl/ftp/ftpd/ftpusers.5 deleted file mode 100644 index 04520a4ebd1..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/ftpusers.5 +++ /dev/null @@ -1,37 +0,0 @@ -.\" $Id: ftpusers.5,v 1.3 2013/06/17 19:11:36 robert 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. -.Pp -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/kerberosV/src/appl/ftp/ftpd/ftpusers.cat5 b/kerberosV/src/appl/ftp/ftpd/ftpusers.cat5 deleted file mode 100644 index 533b2b0015d..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/ftpusers.cat5 +++ /dev/null @@ -1,27 +0,0 @@ - -FTPUSERS(5) BSD File Formats Manual FTPUSERS(5) - -NNAAMMEE - _/_e_t_c_/_f_t_p_u_s_e_r_s -- FTP access list file - -DDEESSCCRRIIPPTTIIOONN - _/_e_t_c_/_f_t_p_u_s_e_r_s contains a list of users that should be allowed or denied - FTP access. Each line contains a user, optionally followed by ``allow'' - (anything but ``allow'' is ignored). The semi-user ``*'' matches any - user. Users that has an explicit ``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 con- - tained a list of users that should be denied access. - -EEXXAAMMPPLLEESS - This will deny anyone but ``foo'' and ``bar'' to use FTP: - - foo allow - bar allow - * - -SSEEEE AALLSSOO - ftpd(8) - -KTH-KRB May 7, 1997 KTH-KRB diff --git a/kerberosV/src/appl/ftp/ftpd/gss_userok.c b/kerberosV/src/appl/ftp/ftpd/gss_userok.c deleted file mode 100644 index 6031b52a87e..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/gss_userok.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1998 - 2001 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 - -/* XXX sync with gssapi.c */ -struct gssapi_data { - gss_ctx_id_t context_hdl; - gss_name_t client_name; - gss_cred_id_t delegated_cred_handle; - void *mech_data; -}; - -int gssapi_userok(void*, char*); /* to keep gcc happy */ -int gssapi_session(void*, char*); /* to keep gcc happy */ - -int -gssapi_userok(void *app_data, char *username) -{ - struct gssapi_data *data = app_data; - - /* Yes, this logic really is inverted. */ - return !gss_userok(data->client_name, username); -} - -int -gssapi_session(void *app_data, char *username) -{ - struct gssapi_data *data = app_data; - OM_uint32 major, minor; - int ret = 0; - - if (data->delegated_cred_handle != GSS_C_NO_CREDENTIAL) { - major = gss_store_cred(&minor, data->delegated_cred_handle, - GSS_C_INITIATE, GSS_C_NO_OID, - 1, 1, NULL, NULL); - if (GSS_ERROR(major)) - ret = 1; - afslog(NULL, 1); - } - - gss_release_cred(&minor, &data->delegated_cred_handle); - return ret; -} diff --git a/kerberosV/src/appl/ftp/ftpd/gssapi.c b/kerberosV/src/appl/ftp/ftpd/gssapi.c deleted file mode 100644 index e08223bfe24..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/gssapi.c +++ /dev/null @@ -1,511 +0,0 @@ -/* - * Copyright (c) 1998 - 2005 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 -#include -#include - -RCSID("$Id: gssapi.c,v 1.1 2013/06/17 19:11:36 robert Exp $"); - -int ftp_do_gss_bindings = 0; -int ftp_do_gss_delegate = 1; - -struct gssapi_data { - gss_ctx_id_t context_hdl; - gss_name_t client_name; - gss_cred_id_t delegated_cred_handle; - void *mech_data; -}; - -static int -gss_init(void *app_data) -{ - struct gssapi_data *d = app_data; - d->context_hdl = GSS_C_NO_CONTEXT; - d->delegated_cred_handle = GSS_C_NO_CREDENTIAL; -#if defined(FTP_SERVER) - return 0; -#else - /* XXX Check the gss mechanism; with gss_indicate_mechs() ? */ -#ifdef KRB5 - return !use_kerberos; -#else - return 0; -#endif /* KRB5 */ -#endif /* FTP_SERVER */ -} - -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 gssapi_data *d = app_data; - size_t ret_len; - - 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); - ret_len = output.length; - gss_release_buffer(&min_stat, &output); - return ret_len; -} - -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 gssapi_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 (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 *sin4 = (struct sockaddr_in *)sa; - - gss_addr->length = 4; - gss_addr->value = &sin4->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 gssapi_data *d = app_data; - gss_channel_bindings_t bindings; - - if (ftp_do_gss_bindings) { - bindings = malloc(sizeof(*bindings)); - if (bindings == NULL) - errx(1, "out of memory"); - - 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; - } else - bindings = GSS_C_NO_CHANNEL_BINDINGS; - - 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, - &d->delegated_cred_handle); - - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - - if(output_token.length) { - if(base64_encode(output_token.value, output_token.length, &p) < 0) { - reply(535, "Out of memory base64-encoding."); - return -1; - } - gss_release_buffer(&min_stat, &output_token); - } - if(maj_stat == GSS_S_COMPLETE){ - d->client_name = client_name; - client_name = GSS_C_NO_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 { - 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); - syslog(LOG_ERR, "gss_accept_sec_context: %.*s", - (int)status_string.length, - (char*)status_string.value); - gss_release_buffer(&new_stat, &status_string); - reply(431, "Security resource unavailable"); - } - - if (client_name) - gss_release_name(&min_stat, &client_name); - free(p); - return 0; -} - -int gssapi_userok(void*, char*); -int gssapi_session(void*, char*); - -struct sec_server_mech gss_server_mech = { - "GSSAPI", - sizeof(struct gssapi_data), - gss_init, /* init */ - NULL, /* end */ - gss_check_prot, - gss_overhead, - gss_encode, - gss_decode, - /* */ - NULL, - gss_adat, - NULL, /* pbsz */ - NULL, /* ccc */ - gssapi_userok, - gssapi_session -}; - -#else /* FTP_SERVER */ - -extern struct sockaddr *hisctladdr, *myctladdr; - -static int -import_name(const char *kname, const char *host, gss_name_t *target_name) -{ - OM_uint32 maj_stat, min_stat; - gss_buffer_desc name; - char *str; - - name.length = asprintf(&str, "%s@%s", kname, host); - if (str == NULL) { - printf("Out of memory\n"); - return AUTH_ERROR; - } - name.value = str; - - 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", - (int)name.length, - (char *)name.value, - (int)status_string.length, - (char *)status_string.value); - free(name.value); - gss_release_buffer(&new_stat, &status_string); - return AUTH_ERROR; - } - free(name.value); - return 0; -} - -static int -gss_auth(void *app_data, char *host) -{ - - OM_uint32 maj_stat, min_stat; - 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 gssapi_data *d = app_data; - OM_uint32 mech_flags = GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG; - - const char *knames[] = { "ftp", "host", NULL }, **kname = knames; - - - if(import_name(*kname++, host, &target_name)) - return AUTH_ERROR; - - input.length = 0; - input.value = NULL; - - if (ftp_do_gss_bindings) { - bindings = malloc(sizeof(*bindings)); - if (bindings == NULL) - errx(1, "out of memory"); - - 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; - } else - bindings = GSS_C_NO_CHANNEL_BINDINGS; - - if (ftp_do_gss_delegate) - mech_flags |= GSS_C_DELEG_FLAG; - - while(!context_established) { - maj_stat = gss_init_sec_context(&min_stat, - GSS_C_NO_CREDENTIAL, - &d->context_hdl, - target_name, - GSS_C_NO_OID, - mech_flags, - 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; - - d->context_hdl = GSS_C_NO_CONTEXT; - - gss_release_name(&min_stat, &target_name); - - if(*kname != NULL) { - - if(import_name(*kname++, host, &target_name)) { - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - return AUTH_ERROR; - } - continue; - } - - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - - 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", - (int)status_string.length, - (char*)status_string.value); - gss_release_buffer(&new_stat, &status_string); - return AUTH_CONTINUE; - } - - if (input.value) { - free(input.value); - input.value = NULL; - input.length = 0; - } - 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. got: %s\n", - reply_string); - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - 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); - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - return AUTH_ERROR; - } - context_established = 1; - } - } - - gss_release_name(&min_stat, &target_name); - - if (bindings != GSS_C_NO_CHANNEL_BINDINGS) - free(bindings); - if (input.value) - free(input.value); - - { - gss_name_t targ_name; - - maj_stat = gss_inquire_context(&min_stat, - d->context_hdl, - NULL, - &targ_name, - NULL, - NULL, - NULL, - NULL, - NULL); - if (GSS_ERROR(maj_stat) == 0) { - gss_buffer_desc name; - maj_stat = gss_display_name (&min_stat, - targ_name, - &name, - NULL); - if (GSS_ERROR(maj_stat) == 0) { - printf("Authenticated to <%.*s>\n", - (int)name.length, - (char *)name.value); - gss_release_buffer(&min_stat, &name); - } - gss_release_name(&min_stat, &targ_name); - } else - printf("Failed to get gss name of peer.\n"); - } - - - return AUTH_OK; -} - -struct sec_client_mech gss_client_mech = { - "GSSAPI", - sizeof(struct gssapi_data), - gss_init, - gss_auth, - NULL, /* end */ - gss_check_prot, - gss_overhead, - gss_encode, - gss_decode, -}; - -#endif /* FTP_SERVER */ diff --git a/kerberosV/src/appl/ftp/ftpd/kauth.c b/kerberosV/src/appl/ftp/ftpd/kauth.c deleted file mode 100644 index a3b770844ff..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/kauth.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 1995 - 1999, 2003 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" - -RCSID("$Id: kauth.c,v 1.3 2013/06/17 19:11:36 robert Exp $"); - -#if defined(KRB5) - -int do_destroy_tickets = 1; -char *k5ccname; - -#endif - -#ifdef KRB5 - -static void -dest_cc(void) -{ - krb5_context context; - krb5_error_code ret; - krb5_ccache id; - - ret = krb5_init_context(&context); - if (ret == 0) { - if (k5ccname) - ret = krb5_cc_resolve(context, k5ccname, &id); - else - ret = krb5_cc_default (context, &id); - if (ret) - krb5_free_context(context); - } - if (ret == 0) { - krb5_cc_destroy(context, id); - krb5_free_context (context); - } -} -#endif - -#if defined(KRB5) - -/* - * Only destroy if we created the tickets - */ - -void -cond_kdestroy(void) -{ - if (do_destroy_tickets) { -#if KRB5 - dest_cc(); -#endif - do_destroy_tickets = 0; - } - afsunlog(); -} - -void -kdestroy(void) -{ -#if KRB5 - dest_cc(); -#endif - afsunlog(); - reply(200, "Tickets destroyed"); -} - - -void -afslog(const char *cell, int quiet) -{ - if(k_hasafs()) { -#ifdef KRB5 - krb5_context context; - krb5_error_code ret; - krb5_ccache id; - - ret = krb5_init_context(&context); - if (ret == 0) { - if (k5ccname) - ret = krb5_cc_resolve(context, k5ccname, &id); - else - ret = krb5_cc_default(context, &id); - if (ret) - krb5_free_context(context); - } - if (ret == 0) { - krb5_afslog(context, id, cell, 0); - krb5_cc_close (context, id); - krb5_free_context (context); - } -#endif - if (!quiet) - reply(200, "afslog done"); - } else { - if (!quiet) - reply(200, "no AFS present"); - } -} - -void -afsunlog(void) -{ - if(k_hasafs()) - k_unlog(); -} - -#else -int ftpd_afslog_placeholder; -#endif /* KRB5 */ diff --git a/kerberosV/src/appl/ftp/ftpd/klist.c b/kerberosV/src/appl/ftp/ftpd/klist.c deleted file mode 100644 index 5da107d29b0..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/klist.c +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 1995 - 2005 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" - -#ifdef KRB5 - -static int -print_cred(krb5_context context, krb5_creds *cred) -{ - char t1[128], t2[128], *str; - krb5_error_code ret; - krb5_timestamp sec; - - krb5_timeofday (context, &sec); - - if(cred->times.starttime) - krb5_format_time(context, cred->times.starttime, t1, sizeof(t1), 1); - else - krb5_format_time(context, cred->times.authtime, t1, sizeof(t1), 1); - - if(cred->times.endtime > sec) - krb5_format_time(context, cred->times.endtime, t2, sizeof(t2), 1); - else - strlcpy(t2, ">>>Expired<<<", sizeof(t2)); - - ret = krb5_unparse_name (context, cred->server, &str); - if (ret) { - lreply(500, "krb5_unparse_name: %d", ret); - return 1; - } - - lreply(200, "%-20s %-20s %s", t1, t2, str); - free(str); - return 0; -} - -static int -print_tickets (krb5_context context, - krb5_ccache ccache, - krb5_principal principal) -{ - krb5_error_code ret; - krb5_cc_cursor cursor; - krb5_creds cred; - char *str; - - ret = krb5_unparse_name (context, principal, &str); - if (ret) { - lreply(500, "krb5_unparse_name: %d", ret); - return 500; - } - - lreply(200, "%17s: %s:%s", - "Credentials cache", - krb5_cc_get_type(context, ccache), - krb5_cc_get_name(context, ccache)); - lreply(200, "%17s: %s", "Principal", str); - free (str); - - ret = krb5_cc_start_seq_get (context, ccache, &cursor); - if (ret) { - lreply(500, "krb5_cc_start_seq_get: %d", ret); - return 500; - } - - lreply(200, " Issued Expires Principal"); - - while ((ret = krb5_cc_next_cred (context, - ccache, - &cursor, - &cred)) == 0) { - if (print_cred(context, &cred)) - return 500; - krb5_free_cred_contents (context, &cred); - } - if (ret != KRB5_CC_END) { - lreply(500, "krb5_cc_get_next: %d", ret); - return 500; - } - ret = krb5_cc_end_seq_get (context, ccache, &cursor); - if (ret) { - lreply(500, "krb5_cc_end_seq_get: %d", ret); - return 500; - } - - return 200; -} - -static int -klist5(void) -{ - krb5_error_code ret; - krb5_context context; - krb5_ccache ccache; - krb5_principal principal; - int exit_status = 200; - - ret = krb5_init_context (&context); - if (ret) { - lreply(500, "krb5_init_context failed: %d", ret); - return 500; - } - - if (k5ccname) - ret = krb5_cc_resolve(context, k5ccname, &ccache); - else - ret = krb5_cc_default (context, &ccache); - if (ret) { - lreply(500, "krb5_cc_default: %d", ret); - return 500; - } - - ret = krb5_cc_get_principal (context, ccache, &principal); - if (ret) { - if(ret == ENOENT) - lreply(500, "No ticket file: %s", - krb5_cc_get_name(context, ccache)); - else - lreply(500, "krb5_cc_get_principal: %d", ret); - - return 500; - } - exit_status = print_tickets (context, ccache, principal); - - ret = krb5_cc_close (context, ccache); - if (ret) { - lreply(500, "krb5_cc_close: %d", ret); - exit_status = 500; - } - - krb5_free_principal (context, principal); - krb5_free_context (context); - return exit_status; -} -#endif - -void -klist(void) -{ -#if KRB5 - int res = klist5(); - reply(res, " "); -#else - reply(500, "Command not implemented."); -#endif -} - diff --git a/kerberosV/src/appl/ftp/ftpd/logwtmp.c b/kerberosV/src/appl/ftp/ftpd/logwtmp.c deleted file mode 100644 index 503ec1e3d52..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/logwtmp.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -#include -RCSID("$Id: logwtmp.c,v 1.3 2013/06/17 19:11:36 robert Exp $"); -#endif - -#include -#include -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_UTMP_H -#include -#endif -#ifdef HAVE_UTMPX_H -#include -#endif -#ifdef HAVE_ASL_H -#include -#endif -#include -#include "extern.h" - -#ifndef HAVE_UTMPX_H -#ifndef WTMP_FILE -#ifdef _PATH_WTMP -#define WTMP_FILE _PATH_WTMP -#else -#define WTMP_FILE "/var/adm/wtmp" -#endif -#endif -#endif - -#ifdef HAVE_ASL_H - -#ifndef ASL_KEY_FACILITY -#define ASL_KEY_FACILITY "Facility" -#endif - -static void -ftpd_logwtmp_asl(char *line, char *name, char *host) -{ - static aslmsg m = NULL; - static int init = 0; - - if (!init) { - init = 1; - m = asl_new(ASL_TYPE_MSG); - if (m == NULL) - return; - asl_set(m, ASL_KEY_FACILITY, "org.h5l.ftpd"); - } - if (m) - asl_log(NULL, m, ASL_LEVEL_NOTICE, - "host %s/%s user %s%sconnected pid %d", - host, line, name, name[0] ? " " : "dis", (int)getpid()); -} - -#endif - -#ifndef HAVE_ASL_H - -static void -ftpd_logwtmp_wtmp(char *line, char *name, char *host) -{ - static int init = 0; - static int fd; -#ifdef WTMPX_FILE - static int fdx; -#endif -#ifdef HAVE_UTMP_H - struct utmp ut; -#endif -#if defined(WTMPX_FILE) || defined(HAVE_UTMPX_H) - struct utmpx utx; -#endif - -#ifdef HAVE_UTMPX_H - memset(&utx, 0, sizeof(struct utmpx)); -#endif -#ifdef HAVE_UTMP_H - memset(&ut, 0, sizeof(struct utmp)); -#ifdef HAVE_STRUCT_UTMP_UT_TYPE - if(name[0]) - ut.ut_type = USER_PROCESS; - else - ut.ut_type = DEAD_PROCESS; -#endif - strncpy(ut.ut_line, line, sizeof(ut.ut_line)); - strncpy(ut.ut_name, name, sizeof(ut.ut_name)); -#ifdef HAVE_STRUCT_UTMP_UT_PID - ut.ut_pid = getpid(); -#endif -#ifdef HAVE_STRUCT_UTMP_UT_HOST - strncpy(ut.ut_host, host, sizeof(ut.ut_host)); -#endif - ut.ut_time = time(NULL); -#endif - -#if defined(WTMPX_FILE) || defined(HAVE_UTMPX_H) - strncpy(utx.ut_line, line, sizeof(utx.ut_line)); - strncpy(utx.ut_user, name, sizeof(utx.ut_user)); - strncpy(utx.ut_host, host, sizeof(utx.ut_host)); -#ifdef HAVE_STRUCT_UTMPX_UT_SYSLEN - utx.ut_syslen = strlen(host) + 1; - if (utx.ut_syslen > sizeof(utx.ut_host)) - utx.ut_syslen = sizeof(utx.ut_host); -#endif - { - struct timeval tv; - - gettimeofday (&tv, 0); - utx.ut_tv.tv_sec = tv.tv_sec; - utx.ut_tv.tv_usec = tv.tv_usec; - } - - if(name[0]) - utx.ut_type = USER_PROCESS; - else - utx.ut_type = DEAD_PROCESS; -#endif - -#ifdef HAVE_UTMPX_H - pututxline(&utx); -#endif - - if(!init){ -#ifdef WTMP_FILE - fd = open(WTMP_FILE, O_WRONLY|O_APPEND, 0); -#endif -#ifdef WTMPX_FILE - fdx = open(WTMPX_FILE, O_WRONLY|O_APPEND, 0); -#endif - init = 1; - } - if(fd >= 0) { -#ifdef WTMP_FILE - write(fd, &ut, sizeof(struct utmp)); /* XXX */ -#endif -#ifdef WTMPX_FILE - write(fdx, &utx, sizeof(struct utmpx)); -#endif - } -} - -#endif /* !HAVE_ASL_H */ - -void -ftpd_logwtmp(char *line, char *name, char *host) -{ -#ifdef HAVE_ASL_H - ftpd_logwtmp_asl(line, name, host); -#else - ftpd_logwtmp_wtmp(line, name, host); -#endif -} diff --git a/kerberosV/src/appl/ftp/ftpd/ls.c b/kerberosV/src/appl/ftp/ftpd/ls.c deleted file mode 100644 index ebadd771d05..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/ls.c +++ /dev/null @@ -1,891 +0,0 @@ -/* - * Copyright (c) 1999 - 2002 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. */ - -#ifndef TEST -#include "ftpd_locl.h" - -RCSID("$Id: ls.c,v 1.5 2013/06/17 19:11:36 robert Exp $"); - -#else -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define sec_fprintf2 fprintf -#define sec_fflush fflush -static void list_files(FILE *out, const char **files, int n_files, int flags); -static int parse_flags(const char *options); - -int -main(int argc, char **argv) -{ - int i = 1; - int flags; - if(argc > 1 && argv[1][0] == '-') { - flags = parse_flags(argv[1]); - i = 2; - } else - flags = parse_flags(NULL); - - list_files(stdout, (const char **)argv + i, argc - i, flags); - return 0; -} -#endif - -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; -}; - -static void -free_fileinfo(struct fileinfo *f) -{ - free(f->user); - free(f->group); - free(f->size); - free(f->major); - free(f->minor); - free(f->date); - free(f->filename); - free(f->link); -} - -#define LS_DIRS (1 << 0) -#define LS_IGNORE_DOT (1 << 1) -#define LS_SORT_MODE (3 << 2) -#define SORT_MODE(f) ((f) & LS_SORT_MODE) -#define LS_SORT_NAME (1 << 2) -#define LS_SORT_MTIME (2 << 2) -#define LS_SORT_SIZE (3 << 2) -#define LS_SORT_REVERSE (1 << 4) - -#define LS_SIZE (1 << 5) -#define LS_INODE (1 << 6) -#define LS_TYPE (1 << 7) -#define LS_DISP_MODE (3 << 8) -#define DISP_MODE(f) ((f) & LS_DISP_MODE) -#define LS_DISP_LONG (1 << 8) -#define LS_DISP_COLUMN (2 << 8) -#define LS_DISP_CROSS (3 << 8) -#define LS_SHOW_ALL (1 << 10) -#define LS_RECURSIVE (1 << 11) -#define LS_EXTRA_BLANK (1 << 12) -#define LS_SHOW_DIRNAME (1 << 13) -#define LS_DIR_FLAG (1 << 14) /* these files come via list_dir */ - -#ifndef S_ISTXT -#define S_ISTXT S_ISVTX -#endif - -#if !defined(_S_IFMT) && defined(S_IFMT) -#define _S_IFMT S_IFMT -#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 size_t -block_convert(size_t blocks) -{ -#ifdef S_BLKSIZE - return blocks * S_BLKSIZE / 1024; -#else - return blocks * 512 / 1024; -#endif -} - -static int -make_fileinfo(FILE *out, const char *filename, struct fileinfo *file, int flags) -{ - char buf[128]; - int file_type = 0; - struct stat *st = &file->st; - - file->inode = st->st_ino; - file->bsize = block_convert(st->st_blocks); - - if(S_ISDIR(st->st_mode)) { - file->mode[0] = 'd'; - file_type = '/'; - } - 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] = '-'; - if(st->st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) - file_type = '*'; - } - else if(S_ISFIFO(st->st_mode)) { - file->mode[0] = 'p'; - file_type = '|'; - } - else if(S_ISLNK(st->st_mode)) { - file->mode[0] = 'l'; - file_type = '@'; - } - else if(S_ISSOCK(st->st_mode)) { - file->mode[0] = 's'; - file_type = '='; - } -#ifdef S_ISWHT - else if(S_ISWHT(st->st_mode)) { - file->mode[0] = 'w'; - file_type = '%'; - } -#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) { - if (asprintf(&file->user, "%u", (unsigned)st->st_uid) == -1) - file->user = NULL; - } else - file->user = strdup(pwd->pw_name); - if (file->user == NULL) { - syslog(LOG_ERR, "out of memory"); - return -1; - } - } - { - struct group *grp; - grp = getgrgid(st->st_gid); - if(grp == NULL) { - if (asprintf(&file->group, "%u", (unsigned)st->st_gid) == -1) - file->group = NULL; - } else - file->group = strdup(grp->gr_name); - if (file->group == NULL) { - syslog(LOG_ERR, "out of memory"); - return -1; - } - } - - if(S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) { -#if defined(major) && defined(minor) - if (asprintf(&file->major, "%u", (unsigned)major(st->st_rdev)) == -1) - file->major = NULL; - if (asprintf(&file->minor, "%u", (unsigned)minor(st->st_rdev)) == -1) - file->minor = NULL; -#else - /* Don't want to use the DDI/DKI crap. */ - if (asprintf(&file->major, "%u", (unsigned)st->st_rdev) == -1) - file->major = NULL; - if (asprintf(&file->minor, "%u", 0) == -1) - file->minor = NULL; -#endif - if (file->major == NULL || file->minor == NULL) { - syslog(LOG_ERR, "out of memory"); - return -1; - } - } else { - if (asprintf(&file->size, "%lu", (unsigned long)st->st_size) == -1) - file->size = NULL; - } - - { - time_t t = time(NULL); - time_t mtime = st->st_mtime; - struct tm *tm = localtime(&mtime); - if((t - mtime > 6*30*24*60*60) || - (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); - if (file->date == NULL) { - syslog(LOG_ERR, "out of memory"); - return -1; - } - } - { - const char *p = strrchr(filename, '/'); - if(p) - p++; - else - p = filename; - if((flags & LS_TYPE) && file_type != 0) { - if (asprintf(&file->filename, "%s%c", p, file_type) == -1) - file->filename = NULL; - } else - file->filename = strdup(p); - if (file->filename == NULL) { - syslog(LOG_ERR, "out of memory"); - return -1; - } - } - if(S_ISLNK(st->st_mode)) { - int n; - n = readlink((char *)filename, buf, sizeof(buf) - 1); - if(n >= 0) { - buf[n] = '\0'; - file->link = strdup(buf); - if (file->link == NULL) { - syslog(LOG_ERR, "out of memory"); - return -1; - } - } else - sec_fprintf2(out, "readlink(%s): %s", filename, strerror(errno)); - } - return 0; -} - -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 b->st.st_mtime - a->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 b->st.st_size - a->st.st_size; -} - -static int list_dir(FILE*, const char*, int); - -static int -find_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. - */ - -#ifdef KRB5 -static int do_the_afs_dance = 1; -#endif - -static int -lstat_file (const char *file, struct stat *sb) -{ -#ifdef KRB5 - if (do_the_afs_dance && - k_hasafs() - && strcmp(file, ".") - && strcmp(file, "..") - && strcmp(file, "/")) - { - struct ViceIoctl a_params; - char *dir, *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) { - if(last[1] == '\0') - /* if path ended in /, replace with `.' */ - a_params.in = "."; - else - a_params.in = last + 1; - while(last > path_bkp && *--last == '/'); - if(*last != '/' || last != path_bkp) { - *++last = '\0'; - dir = path_bkp; - } else - /* we got to the start, so this must be the root dir */ - dir = "/"; - } else { - /* file is relative to cdir */ - dir = "."; - a_params.in = path_bkp; - } - - a_params.in_size = strlen (a_params.in) + 1; - a_params.out_size = maxsize; - - ret = k_pioctl (dir, 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 (dir, 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 /* KRB5 */ - return lstat (file, sb); -} - -#define IS_DOT_DOTDOT(X) ((X)[0] == '.' && ((X)[1] == '\0' || \ - ((X)[1] == '.' && (X)[2] == '\0'))) - -static int -list_files(FILE *out, const char **files, int n_files, int flags) -{ - struct fileinfo *fi; - int i; - int *dirs = NULL; - size_t total_blocks = 0; - int n_print = 0; - int ret = 0; - - if(n_files == 0) - return 0; - - if(n_files > 1) - flags |= LS_SHOW_DIRNAME; - - fi = calloc(n_files, sizeof(*fi)); - if (fi == NULL) { - syslog(LOG_ERR, "out of memory"); - return -1; - } - 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 { - int include_in_list = 1; - total_blocks += block_convert(fi[i].st.st_blocks); - if(S_ISDIR(fi[i].st.st_mode)) { - if(dirs == NULL) - dirs = calloc(n_files, sizeof(*dirs)); - if(dirs == NULL) { - syslog(LOG_ERR, "%s: %m", files[i]); - ret = -1; - goto out; - } - dirs[i] = 1; - if((flags & LS_DIRS) == 0) - include_in_list = 0; - } - if(include_in_list) { - ret = make_fileinfo(out, files[i], &fi[i], flags); - if (ret) - goto out; - n_print++; - } - } - } - 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; - } - if(DISP_MODE(flags) == LS_DISP_LONG) { - 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 = find_log10(max_inode); - max_bsize = find_log10(max_bsize); - max_n_link = find_log10(max_n_link); - - if(n_print > 0) - sec_fprintf2(out, "total %lu\r\n", (unsigned long)total_blocks); - 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); - } else if(DISP_MODE(flags) == LS_DISP_COLUMN || - DISP_MODE(flags) == LS_DISP_CROSS) { - int max_len = 0; - int size_len = 0; - int num_files = n_files; - int columns; - int j; - for(i = 0; i < n_files; i++) { - if(fi[i].filename == NULL) { - num_files--; - continue; - } - if(strlen(fi[i].filename) > max_len) - max_len = strlen(fi[i].filename); - if(find_log10(fi[i].bsize) > size_len) - size_len = find_log10(fi[i].bsize); - } - if(num_files == 0) - goto next; - if(flags & LS_SIZE) { - columns = 80 / (size_len + 1 + max_len + 1); - max_len = 80 / columns - size_len - 1; - } else { - columns = 80 / (max_len + 1); /* get space between columns */ - max_len = 80 / columns; - } - if(flags & LS_SIZE) - sec_fprintf2(out, "total %lu\r\n", - (unsigned long)total_blocks); - if(DISP_MODE(flags) == LS_DISP_CROSS) { - for(i = 0, j = 0; i < n_files; i++) { - if(fi[i].filename == NULL) - continue; - if(flags & LS_SIZE) - sec_fprintf2(out, "%*u %-*s", size_len, fi[i].bsize, - max_len, fi[i].filename); - else - sec_fprintf2(out, "%-*s", max_len, fi[i].filename); - j++; - if(j == columns) { - sec_fprintf2(out, "\r\n"); - j = 0; - } - } - if(j > 0) - sec_fprintf2(out, "\r\n"); - } else { - int skip = (num_files + columns - 1) / columns; - - for(i = 0; i < skip; i++) { - for(j = i; j < n_files;) { - while(j < n_files && fi[j].filename == NULL) - j++; - if(flags & LS_SIZE) - sec_fprintf2(out, "%*u %-*s", size_len, fi[j].bsize, - max_len, fi[j].filename); - else - sec_fprintf2(out, "%-*s", max_len, fi[j].filename); - j += skip; - } - sec_fprintf2(out, "\r\n"); - } - } - } else { - for(i = 0; i < n_files; i++) { - if(fi[i].filename == NULL) - continue; - sec_fprintf2(out, "%s\r\n", fi[i].filename); - } - } - next: - if(((flags & LS_DIRS) == 0 || (flags & LS_RECURSIVE)) && dirs != NULL) { - for(i = 0; i < n_files; i++) { - if(dirs[i]) { - const char *p = strrchr(files[i], '/'); - if(p == NULL) - p = files[i]; - else - p++; - if(!(flags & LS_DIR_FLAG) || !IS_DOT_DOTDOT(p)) { - if((flags & LS_SHOW_DIRNAME)) { - if ((flags & LS_EXTRA_BLANK)) - sec_fprintf2(out, "\r\n"); - sec_fprintf2(out, "%s:\r\n", files[i]); - } - list_dir(out, files[i], flags | LS_DIRS | LS_EXTRA_BLANK); - } - } - } - } - out: - for(i = 0; i < n_files; i++) - free_fileinfo(&fi[i]); - free(fi); - if(dirs != NULL) - free(dirs); - return ret; -} - -static void -free_files (char **files, int n) -{ - int i; - - for (i = 0; i < n; ++i) - free (files[i]); - free (files); -} - -static int -hide_file(const char *filename, int flags) -{ - if(filename[0] != '.') - return 0; - if((flags & LS_IGNORE_DOT)) - return 1; - if(filename[1] == '\0' || (filename[1] == '.' && filename[2] == '\0')) { - if((flags & LS_SHOW_ALL)) - return 0; - else - return 1; - } - return 0; -} - -static int -list_dir(FILE *out, const char *directory, int flags) -{ - DIR *d = opendir(directory); - struct dirent *ent; - char **files = NULL; - int n_files = 0; - int ret; - - if(d == NULL) { - syslog(LOG_ERR, "%s: %m", directory); - return -1; - } - while((ent = readdir(d)) != NULL) { - void *tmp; - - if(hide_file(ent->d_name, flags)) - continue; - tmp = realloc(files, (n_files + 1) * sizeof(*files)); - if (tmp == NULL) { - syslog(LOG_ERR, "%s: out of memory", directory); - free_files (files, n_files); - closedir (d); - return -1; - } - files = tmp; - ret = asprintf(&files[n_files], "%s/%s", directory, ent->d_name); - if (ret == -1) { - syslog(LOG_ERR, "%s: out of memory", directory); - free_files (files, n_files); - closedir (d); - return -1; - } - ++n_files; - } - closedir(d); - return list_files(out, (const char**)files, n_files, flags | LS_DIR_FLAG); -} - -static int -parse_flags(const char *options) -{ -#ifdef TEST - int flags = LS_SORT_NAME | LS_IGNORE_DOT | LS_DISP_COLUMN; -#else - int flags = LS_SORT_NAME | LS_IGNORE_DOT | LS_DISP_LONG; -#endif - - const char *p; - if(options == NULL || *options != '-') - return flags; - for(p = options + 1; *p; p++) { - switch(*p) { - case '1': - flags = (flags & ~LS_DISP_MODE); - break; - case 'a': - flags |= LS_SHOW_ALL; - /*FALLTHROUGH*/ - case 'A': - flags &= ~LS_IGNORE_DOT; - break; - case 'C': - flags = (flags & ~LS_DISP_MODE) | LS_DISP_COLUMN; - break; - case 'd': - flags |= LS_DIRS; - break; - case 'f': - flags = (flags & ~LS_SORT_MODE); - break; - case 'F': - flags |= LS_TYPE; - break; - case 'i': - flags |= LS_INODE; - break; - case 'l': - flags = (flags & ~LS_DISP_MODE) | LS_DISP_LONG; - break; - case 'r': - flags |= LS_SORT_REVERSE; - break; - case 'R': - flags |= LS_RECURSIVE; - break; - case 's': - flags |= LS_SIZE; - break; - case 'S': - flags = (flags & ~LS_SORT_MODE) | LS_SORT_SIZE; - break; - case 't': - flags = (flags & ~LS_SORT_MODE) | LS_SORT_MTIME; - break; - case 'x': - flags = (flags & ~LS_DISP_MODE) | LS_DISP_CROSS; - break; - /* these are a bunch of unimplemented flags from BSD ls */ - case 'k': /* display sizes in kB */ - case 'c': /* last change time */ - case 'L': /* list symlink target */ - case 'm': /* stream output */ - case 'o': /* BSD file flags */ - case 'p': /* display / after directories */ - case 'q': /* print non-graphic characters */ - case 'u': /* use last access time */ - case 'T': /* display complete time */ - case 'W': /* include whiteouts */ - break; - } - } - return flags; -} - -int -builtin_ls(FILE *out, const char *file) -{ - int flags; - int ret; - - if(*file == '-') { - flags = parse_flags(file); - file = "."; - } else - flags = parse_flags(""); - - ret = list_files(out, &file, 1, flags); - sec_fflush(out); - return ret; -} diff --git a/kerberosV/src/appl/ftp/ftpd/pathnames.h b/kerberosV/src/appl/ftp/ftpd/pathnames.h deleted file mode 100644 index 884902905e3..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/pathnames.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 1989, 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. - * - * @(#)pathnames.h 8.1 (Berkeley) 6/4/93 - */ - -#ifdef HAVE_PATHS_H -#include -#endif - -#ifndef _PATH_DEVNULL -#define _PATH_DEVNULL "/dev/null" -#endif - -#ifndef _PATH_NOLOGIN -#define _PATH_NOLOGIN "/etc/nologin" -#endif - -#ifndef _PATH_BSHELL -#define _PATH_BSHELL "/bin/sh" -#endif - -#ifndef _PATH_FTPUSERS -#define _PATH_FTPUSERS SYSCONFDIR "/ftpusers" -#endif - -#define _PATH_FTPCHROOT SYSCONFDIR "/ftpchroot" -#define _PATH_FTPWELCOME SYSCONFDIR "/ftpwelcome" -#define _PATH_FTPLOGINMESG SYSCONFDIR "/motd" - -#ifndef _PATH_ISSUE -#define _PATH_ISSUE SYSCONFDIR "/issue" -#endif -#define _PATH_ISSUE_NET SYSCONFDIR "/issue.net" diff --git a/kerberosV/src/appl/ftp/ftpd/popen.c b/kerberosV/src/appl/ftp/ftpd/popen.c deleted file mode 100644 index 40b85e84fba..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/popen.c +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (c) 1988, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software written by Ken Arnold and - * published in UNIX Review, Vol. 6, No. 8. - * - * 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 -RCSID("$Id: popen.c,v 1.3 2013/06/17 19:11:36 robert Exp $"); -#endif - -#include -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include "extern.h" - - -/* - * Special version of popen which avoids call to shell. This ensures - * no one may create a pipe to a hidden program as a side effect of a - * list or dir command. - */ -static int *pids; -static int fds; - -/* return path prepended with ~ftp if that file exists, otherwise - * return path unchanged - */ - -const char * -ftp_rooted(const char *path) -{ - static char home[MaxPathLen] = ""; - static char newpath[MaxPathLen]; - struct passwd *pwd; - - if(!home[0]) - if((pwd = k_getpwnam("ftp"))) - strlcpy(home, pwd->pw_dir, sizeof(home)); - snprintf(newpath, sizeof(newpath), "%s/%s", home, path); - if(access(newpath, X_OK)) - strlcpy(newpath, path, sizeof(newpath)); - return newpath; -} - - -#define MAXARGS 100 -#define MAXGLOBS 1000 - -FILE * -ftpd_popen(char *program, char *type, int do_stderr, int no_glob) -{ - char *cp; - FILE *iop; - int argc, gargc, pdes[2], pid; - char **pop, *argv[MAXARGS], *gargv[MAXGLOBS]; - char *foo; - - if (strcmp(type, "r") && strcmp(type, "w")) - return (NULL); - - if (!pids) { - - /* This function is ugly and should be rewritten, in - * modern unices there is no such thing as a maximum - * filedescriptor. - */ - - fds = getdtablesize(); - pids = (int*)calloc(fds, sizeof(int)); - if(!pids) - return NULL; - } - if (pipe(pdes) < 0) - return (NULL); - - /* break up string into pieces */ - foo = NULL; - for (argc = 0, cp = program; argc < MAXARGS - 1; cp = NULL) { - if (!(argv[argc++] = strtok_r(cp, " \t\n", &foo))) - break; - } - argv[MAXARGS - 1] = NULL; - - gargv[0] = (char*)ftp_rooted(argv[0]); - /* glob each piece */ - for (gargc = argc = 1; argv[argc] && gargc < MAXGLOBS - 1; argc++) { - glob_t gl; - int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE - | -#ifdef GLOB_MAXPATH - GLOB_MAXPATH -#else - GLOB_LIMIT -#endif - ; - - memset(&gl, 0, sizeof(gl)); - if (no_glob || - glob(argv[argc], flags, NULL, &gl) || - gl.gl_pathc == 0) - gargv[gargc++] = strdup(argv[argc]); - else - for (pop = gl.gl_pathv; - *pop && gargc < MAXGLOBS - 1; - pop++) - gargv[gargc++] = strdup(*pop); - globfree(&gl); - } - gargv[gargc] = NULL; - - iop = NULL; - switch(pid = fork()) { - case -1: /* error */ - close(pdes[0]); - close(pdes[1]); - goto pfree; - /* NOTREACHED */ - case 0: /* child */ - if (*type == 'r') { - if (pdes[1] != STDOUT_FILENO) { - dup2(pdes[1], STDOUT_FILENO); - close(pdes[1]); - } - if(do_stderr) - dup2(STDOUT_FILENO, STDERR_FILENO); - close(pdes[0]); - } else { - if (pdes[0] != STDIN_FILENO) { - dup2(pdes[0], STDIN_FILENO); - close(pdes[0]); - } - close(pdes[1]); - } - execv(gargv[0], gargv); - gargv[0] = argv[0]; - execv(gargv[0], gargv); - _exit(1); - } - /* parent; assume fdopen can't fail... */ - if (*type == 'r') { - iop = fdopen(pdes[0], type); - close(pdes[1]); - } else { - iop = fdopen(pdes[1], type); - close(pdes[0]); - } - pids[fileno(iop)] = pid; - -pfree: - for (argc = 1; gargv[argc] != NULL; argc++) - free(gargv[argc]); - - - return (iop); -} - -int -ftpd_pclose(FILE *iop) -{ - int fdes, status; - pid_t pid; - sigset_t sigset, osigset; - - /* - * pclose returns -1 if stream is not associated with a - * `popened' command, or, if already `pclosed'. - */ - if (pids == 0 || pids[fdes = fileno(iop)] == 0) - return (-1); - fclose(iop); - sigemptyset(&sigset); - sigaddset(&sigset, SIGINT); - sigaddset(&sigset, SIGQUIT); - sigaddset(&sigset, SIGHUP); - sigprocmask(SIG_BLOCK, &sigset, &osigset); - while ((pid = waitpid(pids[fdes], &status, 0)) < 0 && errno == EINTR) - continue; - sigprocmask(SIG_SETMASK, &osigset, NULL); - pids[fdes] = 0; - if (pid < 0) - return (pid); - if (WIFEXITED(status)) - return (WEXITSTATUS(status)); - return (1); -} diff --git a/kerberosV/src/appl/ftp/ftpd/security.c b/kerberosV/src/appl/ftp/ftpd/security.c deleted file mode 100644 index 0c608791eb3..00000000000 --- a/kerberosV/src/appl/ftp/ftpd/security.c +++ /dev/null @@ -1,883 +0,0 @@ -/* - * Copyright (c) 1998-2002, 2005 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.1 2013/06/17 19:11:36 robert 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 prot_invalid; -} -#endif - -#ifdef FTP_SERVER - -static struct sec_server_mech *mechs[] = { -#ifdef KRB5 - &gss_server_mech, -#endif - NULL -}; - -static struct sec_server_mech *mech; - -#else - -static struct sec_client_mech *mechs[] = { -#ifdef KRB5 - &gss_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; - void *tmp; - - b = block_read(fd, &len, sizeof(len)); - if (b == 0) - return 0; - else if (b < 0) - return -1; - len = ntohl(len); - tmp = realloc(buf->data, len); - if (tmp == NULL) - return -1; - buf->data = tmp; - 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 *dataptr, size_t len) -{ - len = min(len, buf->size - buf->index); - memcpy(dataptr, (char*)buf->data + buf->index, len); - buf->index += len; - return len; -} - -static size_t -buffer_write(struct buffer *buf, void *dataptr, 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, dataptr, len); - buf->index += len; - return len; -} - -int -sec_read(int fd, void *dataptr, int length) -{ - size_t len; - int rx = 0; - - if(sec_complete == 0 || data_prot == 0) - return read(fd, dataptr, length); - - if(in_buffer.eof_flag){ - in_buffer.eof_flag = 0; - return 0; - } - - len = buffer_read(&in_buffer, dataptr, length); - length -= len; - rx += len; - dataptr = (char*)dataptr + len; - - while(length){ - int ret; - - ret = sec_get_data(fd, &in_buffer, data_prot); - if (ret < 0) - return -1; - if(ret == 0 && in_buffer.size == 0) { - if(rx) - in_buffer.eof_flag = 1; - return rx; - } - len = buffer_read(&in_buffer, dataptr, length); - length -= len; - rx += len; - dataptr = (char*)dataptr + 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 *dataptr, int length) -{ - int len = buffer_size; - int tx = 0; - - if(data_prot == prot_clear) - return write(fd, dataptr, length); - - len -= (*mech->overhead)(app_data, data_prot, len); - while(length){ - if(length < len) - len = length; - sec_send(fd, dataptr, len); - length -= len; - dataptr += 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 { - int len; - len = vasprintf(&buf, fmt, ap); - if (len == -1) - return len; - ret = buffer_write(&out_buffer, buf, len); - 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 return_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] == '-') - return_code = 0; - else - sscanf(buf, "%d", &return_code); - if(buf[len-1] == '\n') - buf[len-1] = '\0'; - strcpy(s, buf); - free(buf); - return 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); - - if (vasprintf(&buf, fmt, ap) == -1) { - printf("Failed to allocate command.\n"); - return -1; - } - 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){ - free(enc); - printf("Out of memory base64-encoding.\n"); - return -1; - } - free(enc); -#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 - -int ccc_passed; - -void -auth(char *auth_name) -{ - int i; - void *tmp; - - for(i = 0; (mech = mechs[i]) != NULL; i++){ - if(!strcasecmp(auth_name, mech->name)){ - tmp = realloc(app_data, mech->size); - if (tmp == NULL) { - reply(431, "Unable to accept %s at this time", mech->name); - return; - } - app_data = tmp; - - 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); - app_data = NULL; - 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; - ccc_passed = 1; - } 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, buf_size; - if(!sec_complete) { - reply(503, "Incomplete security data exchange."); - return; - } - buf_size = strlen(msg) + 2; - buf = malloc(buf_size); - if (buf == NULL) { - reply(501, "Failed to allocate %lu", (unsigned long)buf_size); - return; - } - len = base64_decode(msg, buf); - command_prot = level; - if(len == (size_t)-1) { - free(buf); - reply(501, "Failed to base64-decode command"); - return; - } - len = (*mech->decode)(app_data, buf, len, level); - if(len == (size_t)-1) { - free(buf); - reply(535, "Failed to decode command"); - return; - } - ((char*)buf)[len] = '\0'; - if(strstr((char*)buf, "\r\n") == NULL) - strlcat((char*)buf, "\r\n", buf_size); - new_ftp_command(buf); -} - -/* ------------------------------------------------------------ */ - -int -sec_userok(char *userstr) -{ - if(sec_complete) - return (*mech->userok)(app_data, userstr); - return 0; -} - -int -sec_session(char *user) -{ - if(sec_complete && mech->session) - return (*mech->session)(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) -{ - int ret; - enum protection_level old = command_prot; - if(level != command_prot && level == prot_clear) { - ret = command("CCC"); - if(ret != COMPLETE) { - printf("Failed to clear command channel.\n"); - return prot_invalid; - } - } - command_prot = level; - return old; -} - -void -sec_prot(int argc, char **argv) -{ - int level = -1; - - if(argc > 3) - goto usage; - - if(argc == 1) { - sec_status(); - return; - } - 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) { - if(set_command_prot(level) < 0) { - code = -1; - return; - } - } else - goto usage; - code = 0; - return; - usage: - printf("usage: %s [command|data] [clear|safe|confidential|private]\n", - argv[0]); - code = -1; -} - -void -sec_prot_command(int argc, char **argv) -{ - int level; - - if(argc > 2) - goto usage; - - if(!sec_complete) { - printf("No security data exchange has taken place.\n"); - code = -1; - return; - } - - if(argc == 1) { - sec_status(); - } else { - level = name_to_level(argv[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(set_command_prot(level) < 0) { - code = -1; - return; - } - } - code = 0; - return; - usage: - printf("usage: %s [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 %lu failed", (unsigned long)(*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; - if(doencrypt) { - command_prot = prot_private; - request_data_prot = prot_private; - } else { - 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); - if (app_data != NULL) { - 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/kerberosV/src/appl/gssmask/Makefile.am b/kerberosV/src/appl/gssmask/Makefile.am deleted file mode 100644 index 16b965b9258..00000000000 --- a/kerberosV/src/appl/gssmask/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -# $Id: Makefile.am,v 1.1 2013/06/17 19:11:36 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -noinst_PROGRAMS = gssmask gssmaestro - -gssmask_SOURCES = gssmask.c common.c common.h protocol.h - -gssmaestro_SOURCES = gssmaestro.c common.c common.h protocol.h - -LDADD = $(top_builddir)/lib/gssapi/libgssapi.la $(LIB_roken) $(top_builddir)/lib/krb5/libkrb5.la - -EXTRA_DIST = NTMakefile diff --git a/kerberosV/src/appl/gssmask/Makefile.in b/kerberosV/src/appl/gssmask/Makefile.in deleted file mode 100644 index d777c0f5277..00000000000 --- a/kerberosV/src/appl/gssmask/Makefile.in +++ /dev/null @@ -1,843 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:36 robert Exp $ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:36 robert Exp $ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:36 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -noinst_PROGRAMS = gssmask$(EXEEXT) gssmaestro$(EXEEXT) -subdir = appl/gssmask -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_gssmaestro_OBJECTS = gssmaestro.$(OBJEXT) common.$(OBJEXT) -gssmaestro_OBJECTS = $(am_gssmaestro_OBJECTS) -gssmaestro_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -gssmaestro_DEPENDENCIES = $(top_builddir)/lib/gssapi/libgssapi.la \ - $(am__DEPENDENCIES_1) $(top_builddir)/lib/krb5/libkrb5.la -am_gssmask_OBJECTS = gssmask.$(OBJEXT) common.$(OBJEXT) -gssmask_OBJECTS = $(am_gssmask_OBJECTS) -gssmask_LDADD = $(LDADD) -gssmask_DEPENDENCIES = $(top_builddir)/lib/gssapi/libgssapi.la \ - $(am__DEPENDENCIES_1) $(top_builddir)/lib/krb5/libkrb5.la -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(gssmaestro_SOURCES) $(gssmask_SOURCES) -DIST_SOURCES = $(gssmaestro_SOURCES) $(gssmask_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -gssmask_SOURCES = gssmask.c common.c common.h protocol.h -gssmaestro_SOURCES = gssmaestro.c common.c common.h protocol.h -LDADD = $(top_builddir)/lib/gssapi/libgssapi.la $(LIB_roken) $(top_builddir)/lib/krb5/libkrb5.la -EXTRA_DIST = NTMakefile -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/gssmask/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/gssmask/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -gssmaestro$(EXEEXT): $(gssmaestro_OBJECTS) $(gssmaestro_DEPENDENCIES) - @rm -f gssmaestro$(EXEEXT) - $(LINK) $(gssmaestro_OBJECTS) $(gssmaestro_LDADD) $(LIBS) -gssmask$(EXEEXT): $(gssmask_OBJECTS) $(gssmask_DEPENDENCIES) - @rm -f gssmask$(EXEEXT) - $(LINK) $(gssmask_OBJECTS) $(gssmask_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssmaestro.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssmask.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libtool clean-noinstPROGRAMS ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am uninstall-hook - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/gssmask/NTMakefile b/kerberosV/src/appl/gssmask/NTMakefile deleted file mode 100644 index 4ad1dc4f753..00000000000 --- a/kerberosV/src/appl/gssmask/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\gssmask - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/gssmask/common.c b/kerberosV/src/appl/gssmask/common.c deleted file mode 100644 index 29431a6d395..00000000000 --- a/kerberosV/src/appl/gssmask/common.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2006 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 -RCSID("$Id: common.c,v 1.1 2013/06/17 19:11:36 robert Exp $"); - -krb5_error_code -store_string(krb5_storage *sp, const char *str) -{ - size_t len = strlen(str) + 1; - krb5_error_code ret; - - ret = krb5_store_int32(sp, len); - if (ret) - return ret; - ret = krb5_storage_write(sp, str, len); - if (ret != len) - return EINVAL; - return 0; -} - -static void -add_list(char ****list, size_t *listlen, char **str, size_t len) -{ - size_t i; - *list = erealloc(*list, sizeof(**list) * (*listlen + 1)); - - (*list)[*listlen] = ecalloc(len, sizeof(**list)); - for (i = 0; i < len; i++) - (*list)[*listlen][i] = str[i]; - (*listlen)++; -} - -static void -permute(char ****list, size_t *listlen, - char **str, const int start, const int len) -{ - int i, j; - -#define SWAP(s,i,j) { char *t = str[i]; str[i] = str[j]; str[j] = t; } - - for (i = start; i < len - 1; i++) { - for (j = i+1; j < len; j++) { - SWAP(str,i,j); - permute(list, listlen, str, i+1, len); - SWAP(str,i,j); - } - } - add_list(list, listlen, str, len); -} - -char *** -permutate_all(struct getarg_strings *strings, size_t *size) -{ - char **list, ***all = NULL; - int i; - - *size = 0; - - list = ecalloc(strings->num_strings, sizeof(*list)); - for (i = 0; i < strings->num_strings; i++) - list[i] = strings->strings[i]; - - permute(&all, size, list, 0, strings->num_strings); - free(list); - return all; -} diff --git a/kerberosV/src/appl/gssmask/common.h b/kerberosV/src/appl/gssmask/common.h deleted file mode 100644 index 09bf82f2e52..00000000000 --- a/kerberosV/src/appl/gssmask/common.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2006 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: common.h,v 1.1 2013/06/17 19:11:36 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -/* - * pthread support is disable because the pthread - * test have no "application pthread libflags" variable, - * when this is fixed pthread support can be enabled again. - */ -#undef ENABLE_PTHREAD_SUPPORT - -#include -#ifdef HAVE_SYS_UTSNAME_H -#include -#endif - -#ifdef HAVE_SYS_WAIT_H -#include -#endif - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "protocol.h" - -krb5_error_code store_string(krb5_storage *, const char *); - - -#define ret16(_client, num) \ - do { \ - if (krb5_ret_int16((_client)->sock, &(num)) != 0) \ - errx(1, "krb5_ret_int16 " #num); \ - } while(0) - -#define ret32(_client, num) \ - do { \ - if (krb5_ret_int32((_client)->sock, &(num)) != 0) \ - errx(1, "krb5_ret_int32 " #num); \ - } while(0) - -#define retdata(_client, data) \ - do { \ - if (krb5_ret_data((_client)->sock, &(data)) != 0) \ - errx(1, "krb5_ret_data " #data); \ - } while(0) - -#define retstring(_client, data) \ - do { \ - if (krb5_ret_string((_client)->sock, &(data)) != 0) \ - errx(1, "krb5_ret_data " #data); \ - } while(0) - - -#define put32(_client, num) \ - do { \ - if (krb5_store_int32((_client)->sock, num) != 0) \ - errx(1, "krb5_store_int32 " #num); \ - } while(0) - -#define putdata(_client, data) \ - do { \ - if (krb5_store_data((_client)->sock, data) != 0) \ - errx(1, "krb5_store_data " #data); \ - } while(0) - -#define putstring(_client, str) \ - do { \ - if (store_string((_client)->sock, str) != 0) \ - errx(1, "krb5_store_str " #str); \ - } while(0) - -char *** permutate_all(struct getarg_strings *, size_t *); diff --git a/kerberosV/src/appl/gssmask/gssmaestro.c b/kerberosV/src/appl/gssmask/gssmaestro.c deleted file mode 100644 index 21693716657..00000000000 --- a/kerberosV/src/appl/gssmask/gssmaestro.c +++ /dev/null @@ -1,963 +0,0 @@ -/* - * Copyright (c) 2006 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 -RCSID("$Id: gssmaestro.c,v 1.1 2013/06/17 19:11:36 robert Exp $"); - -static FILE *logfile; - -/* - * - */ - -struct client { - char *name; - struct sockaddr *sa; - socklen_t salen; - krb5_storage *sock; - int32_t capabilities; - char *target_name; - char *moniker; - krb5_storage *logsock; - int have_log; -#ifdef ENABLE_PTHREAD_SUPPORT - pthread_t thr; -#else - pid_t child; -#endif -}; - -static struct client **clients; -static int num_clients; - -static int -init_sec_context(struct client *client, - int32_t *hContext, int32_t *hCred, - int32_t flags, - const char *targetname, - const krb5_data *itoken, krb5_data *otoken) -{ - int32_t val; - krb5_data_zero(otoken); - put32(client, eInitContext); - put32(client, *hContext); - put32(client, *hCred); - put32(client, flags); - putstring(client, targetname); - putdata(client, *itoken); - ret32(client, *hContext); - ret32(client, val); - retdata(client, *otoken); - return val; -} - -static int -accept_sec_context(struct client *client, - int32_t *hContext, - int32_t flags, - const krb5_data *itoken, - krb5_data *otoken, - int32_t *hDelegCred) -{ - int32_t val; - krb5_data_zero(otoken); - put32(client, eAcceptContext); - put32(client, *hContext); - put32(client, flags); - putdata(client, *itoken); - ret32(client, *hContext); - ret32(client, val); - retdata(client, *otoken); - ret32(client, *hDelegCred); - return val; -} - -static int -acquire_cred(struct client *client, - const char *username, - const char *password, - int32_t flags, - int32_t *hCred) -{ - int32_t val; - put32(client, eAcquireCreds); - putstring(client, username); - putstring(client, password); - put32(client, flags); - ret32(client, val); - ret32(client, *hCred); - return val; -} - -static int -toast_resource(struct client *client, - int32_t hCred) -{ - int32_t val; - put32(client, eToastResource); - put32(client, hCred); - ret32(client, val); - return val; -} - -static int -goodbye(struct client *client) -{ - put32(client, eGoodBye); - return GSMERR_OK; -} - -static int -get_targetname(struct client *client, - char **target) -{ - put32(client, eGetTargetName); - retstring(client, *target); - return GSMERR_OK; -} - -static int32_t -encrypt_token(struct client *client, int32_t hContext, int32_t flags, - krb5_data *in, krb5_data *out) -{ - int32_t val; - put32(client, eEncrypt); - put32(client, hContext); - put32(client, flags); - put32(client, 0); - putdata(client, *in); - ret32(client, val); - retdata(client, *out); - return val; -} - -static int32_t -decrypt_token(struct client *client, int32_t hContext, int flags, - krb5_data *in, krb5_data *out) -{ - int32_t val; - put32(client, eDecrypt); - put32(client, hContext); - put32(client, flags); - put32(client, 0); - putdata(client, *in); - ret32(client, val); - retdata(client, *out); - return val; -} - -static int32_t -wrap_token_ext(struct client *client, int32_t hContext, int32_t flags, - int32_t bflags, krb5_data *header, krb5_data *in, krb5_data *trailer, - krb5_data *out) -{ - int32_t val; - put32(client, eWrapExt); - put32(client, hContext); - put32(client, flags); - put32(client, bflags); - putdata(client, *header); - putdata(client, *in); - putdata(client, *trailer); - ret32(client, val); - retdata(client, *out); - return val; -} - -static int32_t -unwrap_token_ext(struct client *client, int32_t hContext, int32_t flags, - int32_t bflags, krb5_data *header, krb5_data *in, krb5_data *trailer, - krb5_data *out) -{ - int32_t val; - put32(client, eUnwrapExt); - put32(client, hContext); - put32(client, flags); - put32(client, bflags); - putdata(client, *header); - putdata(client, *in); - putdata(client, *trailer); - ret32(client, val); - retdata(client, *out); - return val; -} - -static int32_t -get_mic(struct client *client, int32_t hContext, - krb5_data *in, krb5_data *mic) -{ - int32_t val; - put32(client, eSign); - put32(client, hContext); - put32(client, 0); - put32(client, 0); - putdata(client, *in); - ret32(client, val); - retdata(client, *mic); - return val; -} - -static int32_t -verify_mic(struct client *client, int32_t hContext, - krb5_data *in, krb5_data *mic) -{ - int32_t val; - put32(client, eVerify); - put32(client, hContext); - put32(client, 0); - put32(client, 0); - putdata(client, *in); - putdata(client, *mic); - ret32(client, val); - return val; -} - - -static int32_t -get_version_capa(struct client *client, - int32_t *version, int32_t *capa, - char **version_str) -{ - put32(client, eGetVersionAndCapabilities); - ret32(client, *version); - ret32(client, *capa); - retstring(client, *version_str); - return GSMERR_OK; -} - -static int32_t -get_moniker(struct client *client, - char **moniker) -{ - put32(client, eGetMoniker); - retstring(client, *moniker); - return GSMERR_OK; -} - -static int -wait_log(struct client *c) -{ - int32_t port; - struct sockaddr_storage sast; - socklen_t salen = sizeof(sast); - int fd, fd2, ret; - - memset(&sast, 0, sizeof(sast)); - - assert(sizeof(sast) >= c->salen); - - fd = socket(c->sa->sa_family, SOCK_STREAM, 0); - if (fd < 0) - err(1, "failed to build socket for %s's logging port", c->moniker); - - ((struct sockaddr *)&sast)->sa_family = c->sa->sa_family; - ret = bind(fd, (struct sockaddr *)&sast, c->salen); - if (ret < 0) - err(1, "failed to bind %s's logging port", c->moniker); - - if (listen(fd, SOMAXCONN) < 0) - err(1, "failed to listen %s's logging port", c->moniker); - - salen = sizeof(sast); - ret = getsockname(fd, (struct sockaddr *)&sast, &salen); - if (ret < 0) - err(1, "failed to get address of local socket for %s", c->moniker); - - port = socket_get_port((struct sockaddr *)&sast); - - put32(c, eSetLoggingSocket); - put32(c, ntohs(port)); - - salen = sizeof(sast); - fd2 = accept(fd, (struct sockaddr *)&sast, &salen); - if (fd2 < 0) - err(1, "failed to accept local socket for %s", c->moniker); - close(fd); - - return fd2; -} - - - - -static int -build_context(struct client *ipeer, struct client *apeer, - int32_t flags, int32_t hCred, - int32_t *iContext, int32_t *aContext, int32_t *hDelegCred) -{ - int32_t val = GSMERR_ERROR, ic = 0, ac = 0, deleg = 0; - krb5_data itoken, otoken; - int iDone = 0, aDone = 0; - int step = 0; - int first_call = 0x80; - - if (apeer->target_name == NULL) - errx(1, "apeer %s have no target name", apeer->name); - - krb5_data_zero(&itoken); - - while (!iDone || !aDone) { - - if (iDone) { - warnx("iPeer already done, aPeer want extra rtt"); - val = GSMERR_ERROR; - goto out; - } - - val = init_sec_context(ipeer, &ic, &hCred, flags|first_call, - apeer->target_name, &itoken, &otoken); - step++; - switch(val) { - case GSMERR_OK: - iDone = 1; - if (aDone) - continue; - break; - case GSMERR_CONTINUE_NEEDED: - break; - default: - warnx("iPeer %s failed with %d (step %d)", - ipeer->name, (int)val, step); - goto out; - } - - if (aDone) { - warnx("aPeer already done, iPeer want extra rtt"); - val = GSMERR_ERROR; - goto out; - } - - val = accept_sec_context(apeer, &ac, flags|first_call, - &otoken, &itoken, &deleg); - step++; - switch(val) { - case GSMERR_OK: - aDone = 1; - if (iDone) - continue; - break; - case GSMERR_CONTINUE_NEEDED: - break; - default: - warnx("aPeer %s failed with %d (step %d)", - apeer->name, (int)val, step); - val = GSMERR_ERROR; - goto out; - } - first_call = 0; - val = GSMERR_OK; - } - - if (iContext == NULL || val != GSMERR_OK) { - if (ic) - toast_resource(ipeer, ic); - if (iContext) - *iContext = 0; - } else - *iContext = ic; - - if (aContext == NULL || val != GSMERR_OK) { - if (ac) - toast_resource(apeer, ac); - if (aContext) - *aContext = 0; - } else - *aContext = ac; - - if (hDelegCred == NULL || val != GSMERR_OK) { - if (deleg) - toast_resource(apeer, deleg); - if (hDelegCred) - *hDelegCred = 0; - } else - *hDelegCred = deleg; - -out: - return val; -} - -static void -test_mic(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2) -{ - krb5_data msg, mic; - int32_t val; - - msg.data = "foo"; - msg.length = 3; - - krb5_data_zero(&mic); - - val = get_mic(c1, hc1, &msg, &mic); - if (val) - errx(1, "get_mic failed to host: %s", c1->moniker); - val = verify_mic(c2, hc2, &msg, &mic); - if (val) - errx(1, "verify_mic failed to host: %s", c2->moniker); - - krb5_data_free(&mic); -} - -static int32_t -test_wrap(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2, - int conf) -{ - krb5_data msg, wrapped, out; - int32_t val; - - msg.data = "foo"; - msg.length = 3; - - krb5_data_zero(&wrapped); - krb5_data_zero(&out); - - val = encrypt_token(c1, hc1, conf, &msg, &wrapped); - if (val) { - warnx("encrypt_token failed to host: %s", c1->moniker); - return val; - } - val = decrypt_token(c2, hc2, conf, &wrapped, &out); - if (val) { - krb5_data_free(&wrapped); - warnx("decrypt_token failed to host: %s", c2->moniker); - return val; - } - - if (msg.length != out.length) { - warnx("decrypted'ed token have wrong length (%lu != %lu)", - (unsigned long)msg.length, (unsigned long)out.length); - val = GSMERR_ERROR; - } else if (memcmp(msg.data, out.data, msg.length) != 0) { - warnx("decryptd'ed token have wrong data"); - val = GSMERR_ERROR; - } - - krb5_data_free(&wrapped); - krb5_data_free(&out); - return val; -} - -static int32_t -test_wrap_ext(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2, - int conf, int bflags) -{ - krb5_data header, msg, trailer, wrapped, out; - int32_t val; - - header.data = "header"; - header.length = 6; - - msg.data = "0123456789abcdef"; /* padded for most enctypes */ - msg.length = 32; - - trailer.data = "trailer"; - trailer.length = 7; - - krb5_data_zero(&wrapped); - krb5_data_zero(&out); - - val = wrap_token_ext(c1, hc1, conf, bflags, &header, &msg, &trailer, &wrapped); - if (val) { - warnx("encrypt_token failed to host: %s", c1->moniker); - return val; - } - val = unwrap_token_ext(c2, hc2, conf, bflags, &header, &wrapped, &trailer, &out); - if (val) { - krb5_data_free(&wrapped); - warnx("decrypt_token failed to host: %s", c2->moniker); - return val; - } - - if (msg.length != out.length) { - warnx("decrypted'ed token have wrong length (%lu != %lu)", - (unsigned long)msg.length, (unsigned long)out.length); - val = GSMERR_ERROR; - } else if (memcmp(msg.data, out.data, msg.length) != 0) { - warnx("decryptd'ed token have wrong data"); - val = GSMERR_ERROR; - } - - krb5_data_free(&wrapped); - krb5_data_free(&out); - return val; -} - - -static int32_t -test_token(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2, int wrap_ext) -{ - int32_t val; - int i; - - for (i = 0; i < 10; i++) { - /* mic */ - test_mic(c1, hc1, c2, hc2); - test_mic(c2, hc2, c1, hc1); - - /* wrap */ - val = test_wrap(c1, hc1, c2, hc2, 0); - if (val) return val; - val = test_wrap(c2, hc2, c1, hc1, 0); - if (val) return val; - - val = test_wrap(c1, hc1, c2, hc2, 1); - if (val) return val; - val = test_wrap(c2, hc2, c1, hc1, 1); - if (val) return val; - - if (wrap_ext) { - /* wrap ext */ - val = test_wrap_ext(c1, hc1, c2, hc2, 1, 0); - if (val) return val; - val = test_wrap_ext(c2, hc2, c1, hc1, 1, 0); - if (val) return val; - - val = test_wrap_ext(c1, hc1, c2, hc2, 1, 1); - if (val) return val; - val = test_wrap_ext(c2, hc2, c1, hc1, 1, 1); - if (val) return val; - - val = test_wrap_ext(c1, hc1, c2, hc2, 0, 0); - if (val) return val; - val = test_wrap_ext(c2, hc2, c1, hc1, 0, 0); - if (val) return val; - - val = test_wrap_ext(c1, hc1, c2, hc2, 0, 1); - if (val) return val; - val = test_wrap_ext(c2, hc2, c1, hc1, 0, 1); - if (val) return val; - } - } - return GSMERR_OK; -} - -static int -log_function(void *ptr) -{ - struct client *c = ptr; - int32_t cmd, line; - char *file, *string; - - while (1) { - if (krb5_ret_int32(c->logsock, &cmd)) - goto out; - - switch (cmd) { - case eLogSetMoniker: - if (krb5_ret_string(c->logsock, &file)) - goto out; - free(file); - break; - case eLogInfo: - case eLogFailure: - if (krb5_ret_string(c->logsock, &file)) - goto out; - if (krb5_ret_int32(c->logsock, &line)) - goto out; - if (krb5_ret_string(c->logsock, &string)) - goto out; - printf("%s:%lu: %s\n", - file, (unsigned long)line, string); - fprintf(logfile, "%s:%lu: %s\n", - file, (unsigned long)line, string); - fflush(logfile); - free(file); - free(string); - if (krb5_store_int32(c->logsock, 0)) - goto out; - break; - default: - errx(1, "client send bad log command: %d", (int)cmd); - } - } -out: - - return 0; -} - -static void -connect_client(const char *slave) -{ - char *name, *port; - struct client *c = ecalloc(1, sizeof(*c)); - struct addrinfo hints, *res0, *res; - int ret, fd; - - name = estrdup(slave); - port = strchr(name, ':'); - if (port == NULL) - errx(1, "port missing from %s", name); - *port++ = 0; - - c->name = estrdup(slave); - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - - ret = getaddrinfo(name, port, &hints, &res0); - if (ret) - errx(1, "error resolving %s", name); - - for (res = res0, fd = -1; res; res = res->ai_next) { - fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); - if (fd < 0) - continue; - if (connect(fd, res->ai_addr, res->ai_addrlen) < 0) { - close(fd); - fd = -1; - continue; - } - c->sa = ecalloc(1, res->ai_addrlen); - memcpy(c->sa, res->ai_addr, res->ai_addrlen); - c->salen = res->ai_addrlen; - break; /* okay we got one */ - } - if (fd < 0) - err(1, "connect to host: %s", name); - freeaddrinfo(res); - - c->sock = krb5_storage_from_fd(fd); - close(fd); - if (c->sock == NULL) - errx(1, "krb5_storage_from_fd"); - - { - int32_t version; - char *str = NULL; - get_version_capa(c, &version, &c->capabilities, &str); - if (str) { - free(str); - } - if (c->capabilities & HAS_MONIKER) - get_moniker(c, &c->moniker); - else - c->moniker = c->name; - if (c->capabilities & ISSERVER) - get_targetname(c, &c->target_name); - } - - if (logfile) { - int fd; - - printf("starting log socket to client %s\n", c->moniker); - - fd = wait_log(c); - - c->logsock = krb5_storage_from_fd(fd); - close(fd); - if (c->logsock == NULL) - errx(1, "failed to create log krb5_storage"); -#ifdef ENABLE_PTHREAD_SUPPORT - pthread_create(&c->thr, NULL, log_function, c); -#else - c->child = fork(); - if (c->child == -1) - errx(1, "failed to fork"); - else if (c->child == 0) { - log_function(c); - fclose(logfile); - exit(0); - } -#endif - } - - - clients = erealloc(clients, (num_clients + 1) * sizeof(*clients)); - - clients[num_clients] = c; - num_clients++; - - free(name); -} - -static struct client * -get_client(const char *slave) -{ - size_t i; - for (i = 0; i < num_clients; i++) - if (strcmp(slave, clients[i]->name) == 0) - return clients[i]; - errx(1, "failed to find client %s", slave); -} - -/* - * - */ - -static int version_flag; -static int help_flag; -static int wrap_ext = 0; -static char *logfile_str; -static getarg_strings principals; -static getarg_strings slaves; - -struct getargs args[] = { - { "principals", 0, arg_strings, &principals, "Test principal", - NULL }, - { "slaves", 0, arg_strings, &slaves, "Slaves", - NULL }, - { "log-file", 0, arg_string, &logfile_str, "Logfile", - NULL }, - { "wrap-ext", 0, arg_flag, &wrap_ext, "test wrap extended", - NULL }, - { "version", 0, arg_flag, &version_flag, "Print version", - NULL }, - { "help", 0, arg_flag, &help_flag, NULL, - NULL } -}; - -static void -usage(int ret) -{ - arg_printusage (args, - sizeof(args) / sizeof(args[0]), - NULL, - ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - int optidx= 0; - char *user; - char *password; - char ***list, **p; - size_t num_list, i, j, k; - int failed = 0; - - setprogname (argv[0]); - - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage (1); - - if (help_flag) - usage (0); - - if (version_flag) { - print_version (NULL); - return 0; - } - - if (optidx != argc) - usage (1); - - if (principals.num_strings == 0) - errx(1, "no principals"); - - user = estrdup(principals.strings[0]); - password = strchr(user, ':'); - if (password == NULL) - errx(1, "password missing from %s", user); - *password++ = 0; - - if (slaves.num_strings == 0) - errx(1, "no principals"); - - if (logfile_str) { - printf("open logfile %s\n", logfile_str); - logfile = fopen(logfile_str, "w+"); - if (logfile == NULL) - err(1, "failed to open: %s", logfile_str); - } - - /* - * - */ - - list = permutate_all(&slaves, &num_list); - - /* - * Set up connection to all clients - */ - - printf("Connecting to slaves\n"); - for (i = 0; i < slaves.num_strings; i++) - connect_client(slaves.strings[i]); - - /* - * Test acquire credentials - */ - - printf("Test acquire credentials\n"); - for (i = 0; i < slaves.num_strings; i++) { - int32_t hCred, val; - - val = acquire_cred(clients[i], user, password, 1, &hCred); - if (val != GSMERR_OK) { - warnx("Failed to acquire_cred on host %s: %d", - clients[i]->moniker, (int)val); - failed = 1; - } else - toast_resource(clients[i], hCred); - } - - if (failed) - goto out; - - /* - * First test if all slaves can build context to them-self. - */ - - printf("Self context tests\n"); - for (i = 0; i < num_clients; i++) { - int32_t hCred, val, delegCred; - int32_t clientC, serverC; - struct client *c = clients[i]; - - if (c->target_name == NULL) - continue; - - printf("%s connects to self using %s\n", - c->moniker, c->target_name); - - val = acquire_cred(c, user, password, 1, &hCred); - if (val != GSMERR_OK) - errx(1, "failed to acquire_cred: %d", (int)val); - - val = build_context(c, c, - GSS_C_REPLAY_FLAG|GSS_C_SEQUENCE_FLAG| - GSS_C_INTEG_FLAG|GSS_C_CONF_FLAG| - GSS_C_DELEG_FLAG|GSS_C_MUTUAL_FLAG, - hCred, &clientC, &serverC, &delegCred); - if (val == GSMERR_OK) { - test_token(c, clientC, c, serverC, wrap_ext); - toast_resource(c, clientC); - toast_resource(c, serverC); - if (delegCred) - toast_resource(c, delegCred); - } else { - warnx("build_context failed: %d", (int)val); - } - /* - * - */ - - val = build_context(c, c, - GSS_C_INTEG_FLAG|GSS_C_CONF_FLAG, - hCred, &clientC, &serverC, &delegCred); - if (val == GSMERR_OK) { - test_token(c, clientC, c, serverC, wrap_ext); - toast_resource(c, clientC); - toast_resource(c, serverC); - if (delegCred) - toast_resource(c, delegCred); - } else { - warnx("build_context failed: %d", (int)val); - } - - toast_resource(c, hCred); - } - /* - * Build contexts though all entries in each lists, including the - * step from the last entry to the first, ie treat the list as a - * circle. - * - * Only follow the delegated credential, but test "all" - * flags. (XXX only do deleg|mutual right now. - */ - - printf("\"All\" permutation tests\n"); - - for (i = 0; i < num_list; i++) { - int32_t hCred, val, delegCred = 0; - int32_t clientC = 0, serverC = 0; - struct client *client, *server; - - p = list[i]; - - client = get_client(p[0]); - - val = acquire_cred(client, user, password, 1, &hCred); - if (val != GSMERR_OK) - errx(1, "failed to acquire_cred: %d", (int)val); - - for (j = 1; j < num_clients + 1; j++) { - server = get_client(p[j % num_clients]); - - if (server->target_name == NULL) - break; - - for (k = 1; k < j; k++) - printf("\t"); - printf("%s -> %s\n", client->moniker, server->moniker); - - val = build_context(client, server, - GSS_C_REPLAY_FLAG|GSS_C_SEQUENCE_FLAG| - GSS_C_INTEG_FLAG|GSS_C_CONF_FLAG| - GSS_C_DELEG_FLAG|GSS_C_MUTUAL_FLAG, - hCred, &clientC, &serverC, &delegCred); - if (val != GSMERR_OK) { - warnx("build_context failed: %d", (int)val); - break; - } - - val = test_token(client, clientC, server, serverC, wrap_ext); - if (val) - break; - - toast_resource(client, clientC); - toast_resource(server, serverC); - if (!delegCred) { - warnx("no delegated cred on %s", server->moniker); - break; - } - toast_resource(client, hCred); - hCred = delegCred; - client = server; - } - if (hCred) - toast_resource(client, hCred); - } - - /* - * Close all connections to clients - */ - -out: - printf("sending goodbye and waiting for log sockets\n"); - for (i = 0; i < num_clients; i++) { - goodbye(clients[i]); - if (clients[i]->logsock) { -#ifdef ENABLE_PTHREAD_SUPPORT - pthread_join(&clients[i]->thr, NULL); -#else - waitpid(clients[i]->child, NULL, 0); -#endif - } - } - - printf("done\n"); - - return 0; -} diff --git a/kerberosV/src/appl/gssmask/gssmask.c b/kerberosV/src/appl/gssmask/gssmask.c deleted file mode 100644 index 3d56099ab60..00000000000 --- a/kerberosV/src/appl/gssmask/gssmask.c +++ /dev/null @@ -1,1255 +0,0 @@ -/* - * Copyright (c) 2006 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 "common.h" -RCSID("$Id: gssmask.c,v 1.1 2013/06/17 19:11:36 robert Exp $"); - -/* - * - */ - -enum handle_type { handle_context, handle_cred }; - -struct handle { - int32_t idx; - enum handle_type type; - void *ptr; - struct handle *next; -}; - -struct client { - krb5_storage *sock; - krb5_storage *logging; - char *moniker; - int32_t nHandle; - struct handle *handles; - struct sockaddr_storage sa; - socklen_t salen; - char servername[MAXHOSTNAMELEN]; -}; - -FILE *logfile; -static char *targetname; -krb5_context context; - -/* - * - */ - -static void -logmessage(struct client *c, const char *file, unsigned int lineno, - int level, const char *fmt, ...) -{ - char *message; - va_list ap; - int32_t ackid; - - va_start(ap, fmt); - vasprintf(&message, fmt, ap); - va_end(ap); - - if (logfile) - fprintf(logfile, "%s:%u: %d %s\n", file, lineno, level, message); - - if (c->logging) { - if (krb5_store_int32(c->logging, eLogInfo) != 0) - errx(1, "krb5_store_int32: log level"); - if (krb5_store_string(c->logging, file) != 0) - errx(1, "krb5_store_string: filename"); - if (krb5_store_int32(c->logging, lineno) != 0) - errx(1, "krb5_store_string: filename"); - if (krb5_store_string(c->logging, message) != 0) - errx(1, "krb5_store_string: message"); - if (krb5_ret_int32(c->logging, &ackid) != 0) - errx(1, "krb5_ret_int32: ackid"); - } - free(message); -} - -/* - * - */ - -static int32_t -add_handle(struct client *c, enum handle_type type, void *data) -{ - struct handle *h; - - h = ecalloc(1, sizeof(*h)); - - h->idx = ++c->nHandle; - h->type = type; - h->ptr = data; - h->next = c->handles; - c->handles = h; - - return h->idx; -} - -static void -del_handle(struct handle **h, int32_t idx) -{ - OM_uint32 min_stat; - - if (idx == 0) - return; - - while (*h) { - if ((*h)->idx == idx) { - struct handle *p = *h; - *h = (*h)->next; - switch(p->type) { - case handle_context: { - gss_ctx_id_t c = p->ptr; - gss_delete_sec_context(&min_stat, &c, NULL); - break; } - case handle_cred: { - gss_cred_id_t c = p->ptr; - gss_release_cred(&min_stat, &c); - break; } - } - free(p); - return; - } - h = &((*h)->next); - } - errx(1, "tried to delete an unexisting handle"); -} - -static void * -find_handle(struct handle *h, int32_t idx, enum handle_type type) -{ - if (idx == 0) - return NULL; - - while (h) { - if (h->idx == idx) { - if (type == h->type) - return h->ptr; - errx(1, "monger switched type on handle!"); - } - h = h->next; - } - return NULL; -} - - -static int32_t -convert_gss_to_gsm(OM_uint32 maj_stat) -{ - switch(maj_stat) { - case 0: - return GSMERR_OK; - case GSS_S_CONTINUE_NEEDED: - return GSMERR_CONTINUE_NEEDED; - case GSS_S_DEFECTIVE_TOKEN: - return GSMERR_INVALID_TOKEN; - case GSS_S_BAD_MIC: - return GSMERR_AP_MODIFIED; - default: - return GSMERR_ERROR; - } -} - -static int32_t -convert_krb5_to_gsm(krb5_error_code ret) -{ - switch(ret) { - case 0: - return GSMERR_OK; - default: - return GSMERR_ERROR; - } -} - -/* - * - */ - -static int32_t -acquire_cred(struct client *c, - krb5_principal principal, - krb5_get_init_creds_opt *opt, - int32_t *handle) -{ - krb5_error_code ret; - krb5_creds cred; - krb5_ccache id; - gss_cred_id_t gcred; - OM_uint32 maj_stat, min_stat; - - *handle = 0; - - krb5_get_init_creds_opt_set_forwardable (opt, 1); - krb5_get_init_creds_opt_set_renew_life (opt, 3600 * 24 * 30); - - memset(&cred, 0, sizeof(cred)); - - ret = krb5_get_init_creds_password (context, - &cred, - principal, - NULL, - NULL, - NULL, - 0, - NULL, - opt); - if (ret) { - logmessage(c, __FILE__, __LINE__, 0, - "krb5_get_init_creds failed: %d", ret); - return convert_krb5_to_gsm(ret); - } - - ret = krb5_cc_new_unique(context, "MEMORY", NULL, &id); - if (ret) - krb5_err (context, 1, ret, "krb5_cc_initialize"); - - ret = krb5_cc_initialize (context, id, cred.client); - if (ret) - krb5_err (context, 1, ret, "krb5_cc_initialize"); - - ret = krb5_cc_store_cred (context, id, &cred); - if (ret) - krb5_err (context, 1, ret, "krb5_cc_store_cred"); - - krb5_free_cred_contents (context, &cred); - - maj_stat = gss_krb5_import_cred(&min_stat, - id, - NULL, - NULL, - &gcred); - krb5_cc_close(context, id); - if (maj_stat) { - logmessage(c, __FILE__, __LINE__, 0, - "krb5 import creds failed with: %d", maj_stat); - return convert_gss_to_gsm(maj_stat); - } - - *handle = add_handle(c, handle_cred, gcred); - - return 0; -} - - -/* - * - */ - -#define HandleOP(h) \ -handle##h(enum gssMaggotOp op, struct client *c) - -/* - * - */ - -static int -HandleOP(GetVersionInfo) -{ - put32(c, GSSMAGGOTPROTOCOL); - errx(1, "GetVersionInfo"); -} - -static int -HandleOP(GoodBye) -{ - struct handle *h = c->handles; - unsigned int i = 0; - - while (h) { - h = h->next; - i++; - } - - if (i) - logmessage(c, __FILE__, __LINE__, 0, - "Did not toast all resources: %d", i); - return 1; -} - -static int -HandleOP(InitContext) -{ - OM_uint32 maj_stat, min_stat, ret_flags; - int32_t hContext, hCred, flags; - krb5_data target_name, in_token; - int32_t new_context_id = 0, gsm_error = 0; - krb5_data out_token = { 0 , NULL }; - - gss_ctx_id_t ctx; - gss_cred_id_t creds; - gss_name_t gss_target_name; - gss_buffer_desc input_token, output_token; - gss_OID oid = GSS_C_NO_OID; - gss_buffer_t input_token_ptr = GSS_C_NO_BUFFER; - - ret32(c, hContext); - ret32(c, hCred); - ret32(c, flags); - retdata(c, target_name); - retdata(c, in_token); - - logmessage(c, __FILE__, __LINE__, 0, - "targetname: <%.*s>", (int)target_name.length, - (char *)target_name.data); - - ctx = find_handle(c->handles, hContext, handle_context); - if (ctx == NULL) - hContext = 0; - creds = find_handle(c->handles, hCred, handle_cred); - if (creds == NULL) - abort(); - - input_token.length = target_name.length; - input_token.value = target_name.data; - - maj_stat = gss_import_name(&min_stat, - &input_token, - GSS_KRB5_NT_PRINCIPAL_NAME, - &gss_target_name); - if (GSS_ERROR(maj_stat)) { - logmessage(c, __FILE__, __LINE__, 0, - "import name creds failed with: %d", maj_stat); - gsm_error = convert_gss_to_gsm(maj_stat); - goto out; - } - - /* oid from flags */ - - if (in_token.length) { - input_token.length = in_token.length; - input_token.value = in_token.data; - input_token_ptr = &input_token; - if (ctx == NULL) - krb5_errx(context, 1, "initcreds, context NULL, but not first req"); - } else { - input_token.length = 0; - input_token.value = NULL; - if (ctx) - krb5_errx(context, 1, "initcreds, context not NULL, but first req"); - } - - if ((flags & GSS_C_DELEG_FLAG) != 0) - logmessage(c, __FILE__, __LINE__, 0, "init_sec_context delegating"); - if ((flags & GSS_C_DCE_STYLE) != 0) - logmessage(c, __FILE__, __LINE__, 0, "init_sec_context dce-style"); - - maj_stat = gss_init_sec_context(&min_stat, - creds, - &ctx, - gss_target_name, - oid, - flags & 0x7f, - 0, - NULL, - input_token_ptr, - NULL, - &output_token, - &ret_flags, - NULL); - if (GSS_ERROR(maj_stat)) { - if (hContext != 0) - del_handle(&c->handles, hContext); - new_context_id = 0; - logmessage(c, __FILE__, __LINE__, 0, - "gss_init_sec_context returns code: %d/%d", - maj_stat, min_stat); - } else { - if (input_token.length == 0) - new_context_id = add_handle(c, handle_context, ctx); - else - new_context_id = hContext; - } - - gsm_error = convert_gss_to_gsm(maj_stat); - - if (output_token.length) { - out_token.data = output_token.value; - out_token.length = output_token.length; - } - -out: - logmessage(c, __FILE__, __LINE__, 0, - "InitContext return code: %d", gsm_error); - - put32(c, new_context_id); - put32(c, gsm_error); - putdata(c, out_token); - - gss_release_name(&min_stat, &gss_target_name); - if (output_token.length) - gss_release_buffer(&min_stat, &output_token); - krb5_data_free(&in_token); - krb5_data_free(&target_name); - - return 0; -} - -static int -HandleOP(AcceptContext) -{ - OM_uint32 maj_stat, min_stat, ret_flags; - int32_t hContext, deleg_hcred, flags; - krb5_data in_token; - int32_t new_context_id = 0, gsm_error = 0; - krb5_data out_token = { 0 , NULL }; - - gss_ctx_id_t ctx; - gss_cred_id_t deleg_cred = GSS_C_NO_CREDENTIAL; - gss_buffer_desc input_token, output_token; - gss_buffer_t input_token_ptr = GSS_C_NO_BUFFER; - - ret32(c, hContext); - ret32(c, flags); - retdata(c, in_token); - - ctx = find_handle(c->handles, hContext, handle_context); - if (ctx == NULL) - hContext = 0; - - if (in_token.length) { - input_token.length = in_token.length; - input_token.value = in_token.data; - input_token_ptr = &input_token; - } else { - input_token.length = 0; - input_token.value = NULL; - } - - maj_stat = gss_accept_sec_context(&min_stat, - &ctx, - GSS_C_NO_CREDENTIAL, - &input_token, - GSS_C_NO_CHANNEL_BINDINGS, - NULL, - NULL, - &output_token, - &ret_flags, - NULL, - &deleg_cred); - if (GSS_ERROR(maj_stat)) { - if (hContext != 0) - del_handle(&c->handles, hContext); - logmessage(c, __FILE__, __LINE__, 0, - "gss_accept_sec_context returns code: %d/%d", - maj_stat, min_stat); - new_context_id = 0; - } else { - if (hContext == 0) - new_context_id = add_handle(c, handle_context, ctx); - else - new_context_id = hContext; - } - if (output_token.length) { - out_token.data = output_token.value; - out_token.length = output_token.length; - } - if ((ret_flags & GSS_C_DCE_STYLE) != 0) - logmessage(c, __FILE__, __LINE__, 0, "accept_sec_context dce-style"); - if ((ret_flags & GSS_C_DELEG_FLAG) != 0) { - deleg_hcred = add_handle(c, handle_cred, deleg_cred); - logmessage(c, __FILE__, __LINE__, 0, - "accept_context delegated handle: %d", deleg_hcred); - } else { - gss_release_cred(&min_stat, &deleg_cred); - deleg_hcred = 0; - } - - - gsm_error = convert_gss_to_gsm(maj_stat); - - put32(c, new_context_id); - put32(c, gsm_error); - putdata(c, out_token); - put32(c, deleg_hcred); - - if (output_token.length) - gss_release_buffer(&min_stat, &output_token); - krb5_data_free(&in_token); - - return 0; -} - -static int -HandleOP(ToastResource) -{ - int32_t handle; - - ret32(c, handle); - logmessage(c, __FILE__, __LINE__, 0, "toasting %d", handle); - del_handle(&c->handles, handle); - put32(c, GSMERR_OK); - - return 0; -} - -static int -HandleOP(AcquireCreds) -{ - char *name, *password; - int32_t gsm_error, flags, handle = 0; - krb5_principal principal = NULL; - krb5_get_init_creds_opt *opt = NULL; - krb5_error_code ret; - - retstring(c, name); - retstring(c, password); - ret32(c, flags); - - logmessage(c, __FILE__, __LINE__, 0, - "username: %s password: %s", name, password); - - ret = krb5_parse_name(context, name, &principal); - if (ret) { - gsm_error = convert_krb5_to_gsm(ret); - goto out; - } - - ret = krb5_get_init_creds_opt_alloc (context, &opt); - if (ret) - krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc"); - - krb5_get_init_creds_opt_set_pa_password(context, opt, password, NULL); - - gsm_error = acquire_cred(c, principal, opt, &handle); - -out: - logmessage(c, __FILE__, __LINE__, 0, - "AcquireCreds handle: %d return code: %d", handle, gsm_error); - - if (opt) - krb5_get_init_creds_opt_free (context, opt); - if (principal) - krb5_free_principal(context, principal); - free(name); - free(password); - - put32(c, gsm_error); - put32(c, handle); - - return 0; -} - -static int -HandleOP(Sign) -{ - OM_uint32 maj_stat, min_stat; - int32_t hContext, flags, seqno; - krb5_data token; - gss_ctx_id_t ctx; - gss_buffer_desc input_token, output_token; - - ret32(c, hContext); - ret32(c, flags); - ret32(c, seqno); - retdata(c, token); - - ctx = find_handle(c->handles, hContext, handle_context); - if (ctx == NULL) - errx(1, "sign: reference to unknown context"); - - input_token.length = token.length; - input_token.value = token.data; - - maj_stat = gss_get_mic(&min_stat, ctx, 0, &input_token, - &output_token); - if (maj_stat != GSS_S_COMPLETE) - errx(1, "gss_get_mic failed"); - - krb5_data_free(&token); - - token.data = output_token.value; - token.length = output_token.length; - - put32(c, 0); /* XXX fix gsm_error */ - putdata(c, token); - - gss_release_buffer(&min_stat, &output_token); - - return 0; -} - -static int -HandleOP(Verify) -{ - OM_uint32 maj_stat, min_stat; - int32_t hContext, flags, seqno; - krb5_data msg, mic; - gss_ctx_id_t ctx; - gss_buffer_desc msg_token, mic_token; - gss_qop_t qop; - - ret32(c, hContext); - - ctx = find_handle(c->handles, hContext, handle_context); - if (ctx == NULL) - errx(1, "verify: reference to unknown context"); - - ret32(c, flags); - ret32(c, seqno); - retdata(c, msg); - - msg_token.length = msg.length; - msg_token.value = msg.data; - - retdata(c, mic); - - mic_token.length = mic.length; - mic_token.value = mic.data; - - maj_stat = gss_verify_mic(&min_stat, ctx, &msg_token, - &mic_token, &qop); - if (maj_stat != GSS_S_COMPLETE) - errx(1, "gss_verify_mic failed"); - - krb5_data_free(&mic); - krb5_data_free(&msg); - - put32(c, 0); /* XXX fix gsm_error */ - - return 0; -} - -static int -HandleOP(GetVersionAndCapabilities) -{ - int32_t cap = HAS_MONIKER; - char name[256] = "unknown", *str; - - if (targetname) - cap |= ISSERVER; /* is server */ - -#ifdef HAVE_UNAME - { - struct utsname ut; - if (uname(&ut) == 0) { - snprintf(name, sizeof(name), "%s-%s-%s", - ut.sysname, ut.version, ut.machine); - } - } -#endif - - asprintf(&str, "gssmask %s %s", PACKAGE_STRING, name); - - put32(c, GSSMAGGOTPROTOCOL); - put32(c, cap); - putstring(c, str); - free(str); - - return 0; -} - -static int -HandleOP(GetTargetName) -{ - if (targetname) - putstring(c, targetname); - else - putstring(c, ""); - return 0; -} - -static int -HandleOP(SetLoggingSocket) -{ - int32_t portnum; - int fd, ret; - - ret32(c, portnum); - - logmessage(c, __FILE__, __LINE__, 0, - "logging port on peer is: %d", (int)portnum); - - socket_set_port((struct sockaddr *)(&c->sa), htons(portnum)); - - fd = socket(((struct sockaddr *)&c->sa)->sa_family, SOCK_STREAM, 0); - if (fd < 0) - return 0; - - ret = connect(fd, (struct sockaddr *)&c->sa, c->salen); - if (ret < 0) { - logmessage(c, __FILE__, __LINE__, 0, "failed connect to log port: %s", - strerror(errno)); - close(fd); - return 0; - } - - if (c->logging) - krb5_storage_free(c->logging); - c->logging = krb5_storage_from_fd(fd); - close(fd); - - krb5_store_int32(c->logging, eLogSetMoniker); - store_string(c->logging, c->moniker); - - logmessage(c, __FILE__, __LINE__, 0, "logging turned on"); - - return 0; -} - - -static int -HandleOP(ChangePassword) -{ - errx(1, "ChangePassword"); -} - -static int -HandleOP(SetPasswordSelf) -{ - errx(1, "SetPasswordSelf"); -} - -static int -HandleOP(Wrap) -{ - OM_uint32 maj_stat, min_stat; - int32_t hContext, flags, seqno; - krb5_data token; - gss_ctx_id_t ctx; - gss_buffer_desc input_token, output_token; - int conf_state; - - ret32(c, hContext); - ret32(c, flags); - ret32(c, seqno); - retdata(c, token); - - ctx = find_handle(c->handles, hContext, handle_context); - if (ctx == NULL) - errx(1, "wrap: reference to unknown context"); - - input_token.length = token.length; - input_token.value = token.data; - - maj_stat = gss_wrap(&min_stat, ctx, flags, 0, &input_token, - &conf_state, &output_token); - if (maj_stat != GSS_S_COMPLETE) - errx(1, "gss_wrap failed"); - - krb5_data_free(&token); - - token.data = output_token.value; - token.length = output_token.length; - - put32(c, 0); /* XXX fix gsm_error */ - putdata(c, token); - - gss_release_buffer(&min_stat, &output_token); - - return 0; -} - - -static int -HandleOP(Unwrap) -{ - OM_uint32 maj_stat, min_stat; - int32_t hContext, flags, seqno; - krb5_data token; - gss_ctx_id_t ctx; - gss_buffer_desc input_token, output_token; - int conf_state; - gss_qop_t qop_state; - - ret32(c, hContext); - ret32(c, flags); - ret32(c, seqno); - retdata(c, token); - - ctx = find_handle(c->handles, hContext, handle_context); - if (ctx == NULL) - errx(1, "unwrap: reference to unknown context"); - - input_token.length = token.length; - input_token.value = token.data; - - maj_stat = gss_unwrap(&min_stat, ctx, &input_token, - &output_token, &conf_state, &qop_state); - - if (maj_stat != GSS_S_COMPLETE) - errx(1, "gss_unwrap failed: %d/%d", maj_stat, min_stat); - - krb5_data_free(&token); - if (maj_stat == GSS_S_COMPLETE) { - token.data = output_token.value; - token.length = output_token.length; - } else { - token.data = NULL; - token.length = 0; - } - put32(c, 0); /* XXX fix gsm_error */ - putdata(c, token); - - if (maj_stat == GSS_S_COMPLETE) - gss_release_buffer(&min_stat, &output_token); - - return 0; -} - -static int -HandleOP(Encrypt) -{ - return handleWrap(op, c); -} - -static int -HandleOP(Decrypt) -{ - return handleUnwrap(op, c); -} - -static int -HandleOP(ConnectLoggingService2) -{ - errx(1, "ConnectLoggingService2"); -} - -static int -HandleOP(GetMoniker) -{ - putstring(c, c->moniker); - return 0; -} - -static int -HandleOP(CallExtension) -{ - errx(1, "CallExtension"); -} - -static int -HandleOP(AcquirePKInitCreds) -{ - int32_t flags; - krb5_data pfxdata; - char fn[] = "FILE:/tmp/pkcs12-creds-XXXXXXX"; - krb5_principal principal = NULL; - int fd; - - ret32(c, flags); - retdata(c, pfxdata); - - fd = mkstemp(fn + 5); - if (fd < 0) - errx(1, "mkstemp"); - - net_write(fd, pfxdata.data, pfxdata.length); - krb5_data_free(&pfxdata); - close(fd); - - if (principal) - krb5_free_principal(context, principal); - - put32(c, -1); /* hResource */ - put32(c, GSMERR_NOT_SUPPORTED); - return 0; -} - -static int -HandleOP(WrapExt) -{ - OM_uint32 maj_stat, min_stat; - int32_t hContext, flags, bflags; - krb5_data token, header, trailer; - gss_ctx_id_t ctx; - unsigned char *p; - int conf_state, iov_len; - gss_iov_buffer_desc iov[6]; - - ret32(c, hContext); - ret32(c, flags); - ret32(c, bflags); - retdata(c, header); - retdata(c, token); - retdata(c, trailer); - - ctx = find_handle(c->handles, hContext, handle_context); - if (ctx == NULL) - errx(1, "wrap: reference to unknown context"); - - memset(&iov, 0, sizeof(iov)); - - iov_len = sizeof(iov)/sizeof(iov[0]); - - if (bflags & WRAP_EXP_ONLY_HEADER) - iov_len -= 2; /* skip trailer and padding, aka dce-style */ - - iov[0].type = GSS_IOV_BUFFER_TYPE_HEADER | GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATE; - if (header.length != 0) { - iov[1].type = GSS_IOV_BUFFER_TYPE_SIGN_ONLY; - iov[1].buffer.length = header.length; - iov[1].buffer.value = header.data; - } else { - iov[1].type = GSS_IOV_BUFFER_TYPE_EMPTY; - } - iov[2].type = GSS_IOV_BUFFER_TYPE_DATA; - iov[2].buffer.length = token.length; - iov[2].buffer.value = token.data; - if (trailer.length != 0) { - iov[3].type = GSS_IOV_BUFFER_TYPE_SIGN_ONLY; - iov[3].buffer.length = trailer.length; - iov[3].buffer.value = trailer.data; - } else { - iov[3].type = GSS_IOV_BUFFER_TYPE_EMPTY; - } - iov[4].type = GSS_IOV_BUFFER_TYPE_PADDING | GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATE; - iov[5].type = GSS_IOV_BUFFER_TYPE_TRAILER | GSS_IOV_BUFFER_TYPE_FLAG_ALLOCATE; - - maj_stat = gss_wrap_iov_length(&min_stat, ctx, flags, 0, &conf_state, - iov, iov_len); - if (maj_stat != GSS_S_COMPLETE) - errx(1, "gss_wrap_iov_length failed"); - - maj_stat = gss_wrap_iov(&min_stat, ctx, flags, 0, &conf_state, - iov, iov_len); - if (maj_stat != GSS_S_COMPLETE) - errx(1, "gss_wrap_iov failed"); - - krb5_data_free(&token); - - token.length = iov[0].buffer.length + iov[2].buffer.length + iov[4].buffer.length + iov[5].buffer.length; - token.data = malloc(token.length); - - p = token.data; - memcpy(p, iov[0].buffer.value, iov[0].buffer.length); - p += iov[0].buffer.length; - memcpy(p, iov[2].buffer.value, iov[2].buffer.length); - p += iov[2].buffer.length; - memcpy(p, iov[4].buffer.value, iov[4].buffer.length); - p += iov[4].buffer.length; - memcpy(p, iov[5].buffer.value, iov[5].buffer.length); - p += iov[5].buffer.length; - - gss_release_iov_buffer(NULL, iov, iov_len); - - put32(c, 0); /* XXX fix gsm_error */ - putdata(c, token); - - free(token.data); - - return 0; -} - - -static int -HandleOP(UnwrapExt) -{ - OM_uint32 maj_stat, min_stat; - int32_t hContext, flags, bflags; - krb5_data token, header, trailer; - gss_ctx_id_t ctx; - gss_iov_buffer_desc iov[3]; - int conf_state, iov_len; - gss_qop_t qop_state; - - ret32(c, hContext); - ret32(c, flags); - ret32(c, bflags); - retdata(c, header); - retdata(c, token); - retdata(c, trailer); - - iov_len = sizeof(iov)/sizeof(iov[0]); - - if (bflags & WRAP_EXP_ONLY_HEADER) - iov_len -= 1; /* skip trailer and padding, aka dce-style */ - - ctx = find_handle(c->handles, hContext, handle_context); - if (ctx == NULL) - errx(1, "unwrap: reference to unknown context"); - - if (header.length != 0) { - iov[0].type = GSS_IOV_BUFFER_TYPE_SIGN_ONLY; - iov[0].buffer.length = header.length; - iov[0].buffer.value = header.data; - } else { - iov[0].type = GSS_IOV_BUFFER_TYPE_EMPTY; - } - iov[1].type = GSS_IOV_BUFFER_TYPE_DATA; - iov[1].buffer.length = token.length; - iov[1].buffer.value = token.data; - - if (trailer.length != 0) { - iov[2].type = GSS_IOV_BUFFER_TYPE_SIGN_ONLY; - iov[2].buffer.length = trailer.length; - iov[2].buffer.value = trailer.data; - } else { - iov[2].type = GSS_IOV_BUFFER_TYPE_EMPTY; - } - - maj_stat = gss_unwrap_iov(&min_stat, ctx, &conf_state, &qop_state, - iov, iov_len); - - if (maj_stat != GSS_S_COMPLETE) - errx(1, "gss_unwrap failed: %d/%d", maj_stat, min_stat); - - if (maj_stat == GSS_S_COMPLETE) { - token.data = iov[1].buffer.value; - token.length = iov[1].buffer.length; - } else { - token.data = NULL; - token.length = 0; - } - put32(c, 0); /* XXX fix gsm_error */ - putdata(c, token); - - return 0; -} - -/* - * - */ - -struct handler { - enum gssMaggotOp op; - const char *name; - int (*func)(enum gssMaggotOp, struct client *); -}; - -#define S(a) { e##a, #a, handle##a } - -struct handler handlers[] = { - S(GetVersionInfo), - S(GoodBye), - S(InitContext), - S(AcceptContext), - S(ToastResource), - S(AcquireCreds), - S(Encrypt), - S(Decrypt), - S(Sign), - S(Verify), - S(GetVersionAndCapabilities), - S(GetTargetName), - S(SetLoggingSocket), - S(ChangePassword), - S(SetPasswordSelf), - S(Wrap), - S(Unwrap), - S(ConnectLoggingService2), - S(GetMoniker), - S(CallExtension), - S(AcquirePKInitCreds), - S(WrapExt), - S(UnwrapExt), -}; - -#undef S - -/* - * - */ - -static struct handler * -find_op(int32_t op) -{ - int i; - - for (i = 0; i < sizeof(handlers)/sizeof(handlers[0]); i++) - if (handlers[i].op == op) - return &handlers[i]; - return NULL; -} - -static struct client * -create_client(int fd, int port, const char *moniker) -{ - struct client *c; - - c = ecalloc(1, sizeof(*c)); - - if (moniker) { - c->moniker = estrdup(moniker); - } else { - char hostname[MAXHOSTNAMELEN]; - gethostname(hostname, sizeof(hostname)); - asprintf(&c->moniker, "gssmask: %s:%d", hostname, port); - } - - { - c->salen = sizeof(c->sa); - getpeername(fd, (struct sockaddr *)&c->sa, &c->salen); - - getnameinfo((struct sockaddr *)&c->sa, c->salen, - c->servername, sizeof(c->servername), - NULL, 0, NI_NUMERICHOST); - } - - c->sock = krb5_storage_from_fd(fd); - if (c->sock == NULL) - errx(1, "krb5_storage_from_fd"); - - close(fd); - - return c; -} - -static void -free_client(struct client *c) -{ - while(c->handles) - del_handle(&c->handles, c->handles->idx); - - free(c->moniker); - krb5_storage_free(c->sock); - if (c->logging) - krb5_storage_free(c->logging); - free(c); -} - - -static void * -handleServer(void *ptr) -{ - struct handler *handler; - struct client *c; - int32_t op; - - c = (struct client *)ptr; - - - while(1) { - ret32(c, op); - - handler = find_op(op); - if (handler == NULL) { - logmessage(c, __FILE__, __LINE__, 0, - "op %d not supported", (int)op); - exit(1); - } - - logmessage(c, __FILE__, __LINE__, 0, - "---> Got op %s from server %s", - handler->name, c->servername); - - if ((handler->func)(handler->op, c)) - break; - } - - return NULL; -} - - -static char *port_str; -static int version_flag; -static int help_flag; -static char *logfile_str; -static char *moniker_str; - -static int port = 4711; - -struct getargs args[] = { - { "spn", 0, arg_string, &targetname, "This host's SPN", - "service/host@REALM" }, - { "port", 'p', arg_string, &port_str, "Use this port", - "number-of-service" }, - { "logfile", 0, arg_string, &logfile_str, "logfile", - "number-of-service" }, - { "moniker", 0, arg_string, &moniker_str, "nickname", - "name" }, - { "version", 0, arg_flag, &version_flag, "Print version", - NULL }, - { "help", 0, arg_flag, &help_flag, NULL, - NULL } -}; - -static void -usage(int ret) -{ - arg_printusage (args, - sizeof(args) / sizeof(args[0]), - NULL, - ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - int optidx = 0; - - setprogname (argv[0]); - - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage (1); - - if (help_flag) - usage (0); - - if (version_flag) { - print_version (NULL); - return 0; - } - - if (optidx != argc) - usage (1); - - if (port_str) { - char *ptr; - - port = strtol (port_str, &ptr, 10); - if (port == 0 && ptr == port_str) - errx (1, "Bad port `%s'", port_str); - } - - krb5_init_context(&context); - - { - const char *lf = logfile_str; - if (lf == NULL) - lf = "/dev/tty"; - - logfile = fopen(lf, "w"); - if (logfile == NULL) - err(1, "error opening %s", lf); - } - - mini_inetd(htons(port), NULL); - fprintf(logfile, "connected\n"); - - { - struct client *c; - - c = create_client(0, port, moniker_str); - /* close(0); */ - - handleServer(c); - - free_client(c); - } - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/appl/gssmask/protocol.h b/kerberosV/src/appl/gssmask/protocol.h deleted file mode 100644 index ef0e787e40b..00000000000 --- a/kerberosV/src/appl/gssmask/protocol.h +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Copyright (c) 2006 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: protocol.h,v 1.1 2013/06/17 19:11:36 robert Exp $ - */ - -/* missing from tests: - * - export context - * - import context - */ - -/* - * wire encodings: - * int16: number, 2 bytes, in network order - * int32: number, 4 bytes, in network order - * length-encoded: [int32 length, data of length bytes] - * string: [int32 length, string of length + 1 bytes, includes trailing '\0' ] - */ - -enum gssMaggotErrorCodes { - GSMERR_OK = 0, - GSMERR_ERROR, - GSMERR_CONTINUE_NEEDED, - GSMERR_INVALID_TOKEN, - GSMERR_AP_MODIFIED, - GSMERR_TEST_ISSUE, - GSMERR_NOT_SUPPORTED -}; - -/* - * input: - * int32: message OP (enum gssMaggotProtocol) - * ... - * - * return: -- on error - * int32: not support (GSMERR_NOT_SUPPORTED) - * - * return: -- on existing message OP - * int32: support (GSMERR_OK) -- only sent for extensions - * ... - */ - -#define GSSMAGGOTPROTOCOL 14 - -enum gssMaggotOp { - eGetVersionInfo = 0, - /* - * input: - * none - * return: - * int32: last version handled - */ - eGoodBye, - /* - * input: - * none - * return: - * close socket - */ - eInitContext, - /* - * input: - * int32: hContext - * int32: hCred - * int32: Flags - * the lowest 0x7f flags maps directly to GSS-API flags - * DELEGATE 0x001 - * MUTUAL_AUTH 0x002 - * REPLAY_DETECT 0x004 - * SEQUENCE_DETECT 0x008 - * CONFIDENTIALITY 0x010 - * INTEGRITY 0x020 - * ANONYMOUS 0x040 - * - * FIRST_CALL 0x080 - * - * NTLM 0x100 - * SPNEGO 0x200 - * length-encoded: targetname - * length-encoded: token - * return: - * int32: hNewContextId - * int32: gssapi status val - * length-encoded: output token - */ - eAcceptContext, - /* - * input: - * int32: hContext - * int32: Flags -- unused ? - * flags are same as flags for eInitContext - * length-encoded: token - * return: - * int32: hNewContextId - * int32: gssapi status val - * length-encoded: output token - * int32: delegation cred id - */ - eToastResource, - /* - * input: - * int32: hResource - * return: - * int32: gsm status val - */ - eAcquireCreds, - /* - * input: - * string: principal name - * string: password - * int32: flags - * FORWARDABLE 0x001 - * DEFAULT_CREDS 0x002 - * - * NTLM 0x100 - * SPNEGO 0x200 - * return: - * int32: gsm status val - * int32: hCred - */ - eEncrypt, - /* - * input: - * int32: hContext - * int32: flags - * int32: seqno -- unused - * length-encode: plaintext - * return: - * int32: gsm status val - * length-encode: ciphertext - */ - eDecrypt, - /* - * input: - * int32: hContext - * int32: flags - * int32: seqno -- unused - * length-encode: ciphertext - * return: - * int32: gsm status val - * length-encode: plaintext - */ - eSign, - /* message same as eEncrypt */ - eVerify, - /* - * input: - * int32: hContext - * int32: flags - * int32: seqno -- unused - * length-encode: message - * length-encode: signature - * return: - * int32: gsm status val - */ - eGetVersionAndCapabilities, - /* - * return: - * int32: protocol version - * int32: capability flags */ -#define ISSERVER 0x01 -#define ISKDC 0x02 -#define MS_KERBEROS 0x04 -#define LOGSERVER 0x08 -#define HAS_MONIKER 0x10 - /* string: version string - */ - eGetTargetName, - /* - * return: - * string: target principal name - */ - eSetLoggingSocket, - /* - * input: - * int32: hostPort - * return to the port on the host: - * int32: opcode - for example eLogSetMoniker - */ - eChangePassword, - /* here ended version 7 of the protocol */ - /* - * input: - * string: principal name - * string: old password - * string: new password - * return: - * int32: gsm status val - */ - eSetPasswordSelf, - /* same as eChangePassword */ - eWrap, - /* message same as eEncrypt */ - eUnwrap, - /* message same as eDecrypt */ - eConnectLoggingService2, - /* - * return1: - * int16: log port number - * int32: master log prototocol version (0) - * - * wait for master to connect on the master log socket - * - * return2: - * int32: gsm connection status - * int32: maggot log prototocol version (2) - */ - eGetMoniker, - /* - * return: - * string: moniker (Nickname the master can refer to maggot) - */ - eCallExtension, - /* - * input: - * string: extension name - * int32: message id - * return: - * int32: gsm status val - */ - eAcquirePKInitCreds, - /* - * input: - * int32: flags - * length-encode: certificate (pkcs12 data) - * return: - * int32: hResource - * int32: gsm status val (GSMERR_NOT_SUPPORTED) - */ - /* here ended version 7 of the protocol */ - eWrapExt, - /* - * input: - * int32: hContext - * int32: flags - * int32: bflags - * length-encode: protocol header - * length-encode: plaintext - * length-encode: protocol trailer - * return: - * int32: gsm status val - * length-encode: ciphertext - */ - eUnwrapExt, - /* - * input: - * int32: hContext - * int32: flags - * int32: bflags - * length-encode: protocol header - * length-encode: ciphertext - * length-encode: protocol trailer - * return: - * int32: gsm status val - * length-encode: plaintext - */ - /* here ended version 8 of the protocol */ - - eLastProtocolMessage -}; - -/* bflags */ -#define WRAP_EXP_ONLY_HEADER 1 - -enum gssMaggotLogOp{ - eLogInfo = 0, - /* - string: File - int32: Line - string: message - reply: - int32: ackid - */ - eLogFailure, - /* - string: File - int32: Line - string: message - reply: - int32: ackid - */ - eLogSetMoniker - /* - string: moniker - */ -}; diff --git a/kerberosV/src/appl/kf/Makefile.am b/kerberosV/src/appl/kf/Makefile.am deleted file mode 100644 index 817af48d452..00000000000 --- a/kerberosV/src/appl/kf/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:36 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -bin_PROGRAMS = kf - -libexec_PROGRAMS = kfd - -man_MANS = kf.1 kfd.8 - -kf_SOURCES = kf.c kf_locl.h - -kfd_SOURCES = kfd.c kf_locl.h - -LDADD = $(top_builddir)/lib/krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) diff --git a/kerberosV/src/appl/kf/Makefile.in b/kerberosV/src/appl/kf/Makefile.in deleted file mode 100644 index cde24e3855e..00000000000 --- a/kerberosV/src/appl/kf/Makefile.in +++ /dev/null @@ -1,1052 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:36 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:36 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:36 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -bin_PROGRAMS = kf$(EXEEXT) -libexec_PROGRAMS = kfd$(EXEEXT) -subdir = appl/kf -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \ - "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" -PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) -am_kf_OBJECTS = kf.$(OBJEXT) -kf_OBJECTS = $(am_kf_OBJECTS) -kf_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -kf_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \ - $(am__DEPENDENCIES_1) $(top_builddir)/lib/asn1/libasn1.la \ - $(am__DEPENDENCIES_1) -am_kfd_OBJECTS = kfd.$(OBJEXT) -kfd_OBJECTS = $(am_kfd_OBJECTS) -kfd_LDADD = $(LDADD) -kfd_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \ - $(am__DEPENDENCIES_1) $(top_builddir)/lib/asn1/libasn1.la \ - $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(kf_SOURCES) $(kfd_SOURCES) -DIST_SOURCES = $(kf_SOURCES) $(kfd_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -man8dir = $(mandir)/man8 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -man_MANS = kf.1 kfd.8 -kf_SOURCES = kf.c kf_locl.h -kfd_SOURCES = kfd.c kf_locl.h -LDADD = $(top_builddir)/lib/krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/kf/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/kf/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -install-libexecPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexecdir)" && rm -f $$files - -clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -kf$(EXEEXT): $(kf_OBJECTS) $(kf_DEPENDENCIES) - @rm -f kf$(EXEEXT) - $(LINK) $(kf_OBJECTS) $(kf_LDADD) $(LIBS) -kfd$(EXEEXT): $(kfd_OBJECTS) $(kfd_DEPENDENCIES) - @rm -f kfd$(EXEEXT) - $(LINK) $(kfd_OBJECTS) $(kfd_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kfd.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libexecPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \ - uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 uninstall-man8 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \ - clean-libtool ctags dist-hook distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-info install-info-am install-libexecPROGRAMS \ - install-man install-man1 install-man8 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-hook uninstall-libexecPROGRAMS uninstall-man \ - uninstall-man1 uninstall-man8 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/kf/NTMakefile b/kerberosV/src/appl/kf/NTMakefile deleted file mode 100644 index 6ade4ab9bfe..00000000000 --- a/kerberosV/src/appl/kf/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\kf - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/kf/kf.1 b/kerberosV/src/appl/kf/kf.1 deleted file mode 100644 index 598b4adc998..00000000000 --- a/kerberosV/src/appl/kf/kf.1 +++ /dev/null @@ -1,112 +0,0 @@ -.\" Copyright (c) 2000 - 2001 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: kf.1,v 1.3 2013/06/17 19:11:36 robert Exp $ -.\" -.Dd July 2, 2000 -.Dt KF 1 -.Os Heimdal -.Sh NAME -.Nm kf -.Nd securely forward tickets -.Sh SYNOPSIS -.Nm -.Oo -.Fl p Ar port | -.Fl Fl port Ns = Ns Ar port -.Oc -.Oo -.Fl l Ar login | -.Fl Fl login Ns = Ns Ar login -.Oc -.Oo -.Fl c Ar ccache | -.Fl Fl ccache Ns = Ns Ar ccache -.Oc -.Op Fl F | -forwardable -.Op Fl G | -no-forwardable -.Op Fl h | -help -.Op Fl Fl version -.Ar host ... -.Sh DESCRIPTION -The -.Nm -program forwards tickets to a remote host through an authenticated -and encrypted stream. -Options supported are: -.Bl -tag -width indent -.It Xo -.Fl p Ar port , -.Fl Fl port Ns = Ns Ar port -.Xc -port to connect to -.It Xo -.Fl l Ar login , -.Fl Fl login Ns = Ns Ar login -.Xc -remote login name -.It Xo -.Fl c Ar ccache , -.Fl Fl ccache Ns = Ns Ar ccache -.Xc -remote cred cache -.It Fl F , -forwardable -forward forwardable credentials -.It Fl G , -no-forwardable -do not forward forwardable credentials -.It Fl h , -help -.It Fl Fl version -.El -.Pp -.Nm -is useful when you do not want to enter your password on a remote host -but want to have your tickets one for example AFS. -.Pp -In order for -.Nm -to work you will need to acquire your initial ticket with forwardable -flag, i.e. -.Nm kinit Fl Fl forwardable . -.Pp -.Nm telnet -is able to forward tickets by itself. -.\".Sh ENVIRONMENT -.\".Sh FILES -.\".Sh EXAMPLES -.\".Sh DIAGNOSTICS -.Sh SEE ALSO -.Xr kinit 1 , -.Xr telnet 1 , -.Xr kfd 8 -.\".Sh STANDARDS -.\".Sh HISTORY -.\".Sh AUTHORS -.\".Sh BUGS diff --git a/kerberosV/src/appl/kf/kf.c b/kerberosV/src/appl/kf/kf.c deleted file mode 100644 index 28ff99bb261..00000000000 --- a/kerberosV/src/appl/kf/kf.c +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Copyright (c) 1997 - 2000, 2002 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 "kf_locl.h" -RCSID("$Id: kf.c,v 1.4 2013/06/17 19:11:36 robert Exp $"); - -krb5_context context; -static int help_flag; -static int version_flag; -static char *port_str; -const char *service = KF_SERVICE; -const char *remote_name = NULL; -int forwardable = 0; -const char *ccache_name = NULL; - -static struct getargs args[] = { - { "port", 'p', arg_string, &port_str, "port to connect to", "port" }, - { "login", 'l',arg_string, &remote_name,"remote login name","login"}, - { "ccache", 'c',arg_string, &ccache_name, "remote cred cache","ccache"}, - { "forwardable",'F',arg_flag,&forwardable, - "Forward forwardable credentials", NULL }, - { "forwardable",'G',arg_negative_flag,&forwardable, - "Don't forward forwardable credentials", NULL }, - { "help", 'h', arg_flag, &help_flag }, - { "version", 0, arg_flag, &version_flag } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -static void -usage(int code, struct getargs *args, int num_args) -{ - arg_printusage(args, num_args, NULL, "hosts"); - exit(code); -} - -static int -client_setup(krb5_context *context, int *argc, char **argv) -{ - int optind = 0; - int port = 0; - int status; - - setprogname (argv[0]); - - status = krb5_init_context (context); - if (status) - errx(1, "krb5_init_context failed: %d", status); - - forwardable = krb5_config_get_bool (*context, NULL, - "libdefaults", - "forwardable", - NULL); - - if (getarg (args, num_args, *argc, argv, &optind)) - usage(1, args, num_args); - - if(help_flag) - usage (0, args, num_args); - if(version_flag) { - print_version(NULL); - exit(0); - } - - 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) - port = krb5_getportbyname (*context, KF_PORT_NAME, "tcp", KF_PORT_NUM); - - if(*argc - optind < 1) - usage(1, args, num_args); - *argc = optind; - - return port; -} - -/* - * forward creds to `hostname'/`service' over `sock' - * return 0 iff OK - */ - -static int -proto (int sock, const char *hostname, const char *service, - char *message, size_t len) -{ - krb5_auth_context auth_context; - krb5_error_code status; - krb5_principal server; - krb5_data data; - krb5_data data_send; - - krb5_ccache ccache; - krb5_creds creds; - krb5_kdc_flags flags; - krb5_principal principal; - - status = krb5_auth_con_init (context, &auth_context); - if (status) { - krb5_warn (context, status, "krb5_auth_con_init"); - return 1; - } - - status = krb5_auth_con_setaddrs_from_fd (context, - auth_context, - &sock); - if (status) { - krb5_auth_con_free(context, auth_context); - krb5_warn (context, status, "krb5_auth_con_setaddr"); - return 1; - } - - status = krb5_sname_to_principal (context, - hostname, - service, - KRB5_NT_SRV_HST, - &server); - if (status) { - krb5_auth_con_free(context, auth_context); - krb5_warn (context, status, "krb5_sname_to_principal"); - return 1; - } - - status = krb5_sendauth (context, - &auth_context, - &sock, - KF_VERSION_1, - NULL, - server, - AP_OPTS_MUTUAL_REQUIRED | AP_OPTS_USE_SUBKEY, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL); - if (status) { - krb5_auth_con_free(context, auth_context); - krb5_warn(context, status, "krb5_sendauth"); - return 1; - } - - if (ccache_name == NULL) - ccache_name = ""; - - data_send.data = (void *)remote_name; - data_send.length = strlen(remote_name) + 1; - status = krb5_write_priv_message(context, auth_context, &sock, &data_send); - if (status) { - krb5_auth_con_free(context, auth_context); - krb5_warn (context, status, "krb5_write_message"); - return 1; - } - data_send.data = (void *)ccache_name; - data_send.length = strlen(ccache_name)+1; - status = krb5_write_priv_message(context, auth_context, &sock, &data_send); - if (status) { - krb5_auth_con_free(context, auth_context); - krb5_warn (context, status, "krb5_write_message"); - return 1; - } - - memset (&creds, 0, sizeof(creds)); - - status = krb5_cc_default (context, &ccache); - if (status) { - krb5_auth_con_free(context, auth_context); - krb5_warn (context, status, "krb5_cc_default"); - return 1; - } - - status = krb5_cc_get_principal (context, ccache, &principal); - if (status) { - krb5_auth_con_free(context, auth_context); - krb5_warn (context, status, "krb5_cc_get_principal"); - return 1; - } - - creds.client = principal; - - status = krb5_make_principal (context, - &creds.server, - principal->realm, - KRB5_TGS_NAME, - principal->realm, - NULL); - - if (status) { - krb5_auth_con_free(context, auth_context); - krb5_warn (context, status, "krb5_make_principal"); - return 1; - } - - creds.times.endtime = 0; - - flags.i = 0; - flags.b.forwarded = 1; - flags.b.forwardable = forwardable; - - status = krb5_get_forwarded_creds (context, - auth_context, - ccache, - flags.i, - hostname, - &creds, - &data); - if (status) { - krb5_auth_con_free(context, auth_context); - krb5_warn (context, status, "krb5_get_forwarded_creds"); - return 1; - } - - status = krb5_write_priv_message(context, auth_context, &sock, &data); - - if (status) { - krb5_auth_con_free(context, auth_context); - krb5_warn (context, status, "krb5_mk_priv"); - return 1; - } - - krb5_data_free (&data); - - status = krb5_read_priv_message(context, auth_context, &sock, &data); - krb5_auth_con_free(context, auth_context); - if (status) { - krb5_warn (context, status, "krb5_mk_priv"); - return 1; - } - if(data.length >= len) { - krb5_warnx (context, "returned string is too long, truncating"); - memcpy(message, data.data, len); - message[len - 1] = '\0'; - } else { - memcpy(message, data.data, data.length); - message[data.length] = '\0'; - } - krb5_data_free (&data); - - return(strcmp(message, "ok")); -} - -static int -doit (const char *hostname, int port, const char *service, - char *message, size_t len) -{ - struct addrinfo *ai, *a; - struct addrinfo hints; - int error; - char portstr[NI_MAXSERV]; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - snprintf (portstr, sizeof(portstr), "%u", ntohs(port)); - - error = getaddrinfo (hostname, portstr, &hints, &ai); - if (error) { - errx (1, "getaddrinfo(%s): %s", hostname, gai_strerror(error)); - } - - for (a = ai; a != NULL; a = a->ai_next) { - int s; - - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - warn ("connect(%s)", hostname); - close (s); - continue; - } - freeaddrinfo (ai); - return proto (s, hostname, service, message, len); - } - warnx ("failed to contact %s", hostname); - freeaddrinfo (ai); - return 1; -} - -int -main(int argc, char **argv) -{ - int argcc,port,i; - int ret=0; - - argcc = argc; - port = client_setup(&context, &argcc, argv); - - if (remote_name == NULL) { - remote_name = get_default_username (); - if (remote_name == NULL) - errx (1, "who are you?"); - } - - for (i = argcc;i < argc; i++) { - char message[128]; - ret = doit (argv[i], port, service, message, sizeof(message)); - if(ret == 0) - warnx ("%s: ok", argv[i]); - else - warnx ("%s: failed: %s", argv[i], message); - } - return(ret); -} diff --git a/kerberosV/src/appl/kf/kf.cat1 b/kerberosV/src/appl/kf/kf.cat1 deleted file mode 100644 index 073adedcb5b..00000000000 --- a/kerberosV/src/appl/kf/kf.cat1 +++ /dev/null @@ -1,46 +0,0 @@ - -KF(1) BSD General Commands Manual KF(1) - -NNAAMMEE - kkff -- securely forward tickets - -SSYYNNOOPPSSIISS - kkff [--pp _p_o_r_t | ----ppoorrtt=_p_o_r_t] [--ll _l_o_g_i_n | ----llooggiinn=_l_o_g_i_n] [--cc _c_c_a_c_h_e | - ----ccccaacchhee=_c_c_a_c_h_e] [--FF | ----ffoorrwwaarrddaabbllee] [--GG | ----nnoo--ffoorrwwaarrddaabbllee] - [--hh | ----hheellpp] [----vveerrssiioonn] _h_o_s_t _._._. - -DDEESSCCRRIIPPTTIIOONN - The kkff program forwards tickets to a remote host through an authenticated - and encrypted stream. Options supported are: - - --pp _p_o_r_t, ----ppoorrtt=_p_o_r_t - port to connect to - - --ll _l_o_g_i_n, ----llooggiinn=_l_o_g_i_n - remote login name - - --cc _c_c_a_c_h_e, ----ccccaacchhee=_c_c_a_c_h_e - remote cred cache - - --FF, ----ffoorrwwaarrddaabbllee - forward forwardable credentials - - --GG, ----nnoo--ffoorrwwaarrddaabbllee - do not forward forwardable credentials - - --hh, ----hheellpp - - ----vveerrssiioonn - - kkff is useful when you do not want to enter your password on a remote host - but want to have your tickets one for example AFS. - - In order for kkff to work you will need to acquire your initial ticket with - forwardable flag, i.e. kkiinniitt ----ffoorrwwaarrddaabbllee. - - tteellnneett is able to forward tickets by itself. - -SSEEEE AALLSSOO - kinit(1), telnet(1), kfd(8) - -Heimdal July 2, 2000 Heimdal diff --git a/kerberosV/src/appl/kf/kf_locl.h b/kerberosV/src/appl/kf/kf_locl.h deleted file mode 100644 index e88a2af05e8..00000000000 --- a/kerberosV/src/appl/kf/kf_locl.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 1997 - 1999, 2002 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: kf_locl.h,v 1.3 2013/06/17 19:11:36 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif - -#ifdef HAVE_PWD_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#include -#include -#include -#include -#include - -#define KF_SERVICE "host" - -#define KF_PORT_NAME "kf" -#define KF_PORT_NUM 2110 -#define KF_VERSION_1 "KFWDV0.1" diff --git a/kerberosV/src/appl/kf/kfd.8 b/kerberosV/src/appl/kf/kfd.8 deleted file mode 100644 index 66ec5cc14ed..00000000000 --- a/kerberosV/src/appl/kf/kfd.8 +++ /dev/null @@ -1,85 +0,0 @@ -.\" Copyright (c) 2000 - 2002 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: kfd.8,v 1.4 2013/06/17 19:11:36 robert Exp $ -.\" -.Dd July 2, 2000 -.Dt KFD 8 -.Os Heimdal -.Sh NAME -.Nm kfd -.Nd receive forwarded tickets -.Sh SYNOPSIS -.Nm -.Oo -.Fl p Ar port | -.Fl Fl port Ns = Ns Ar port -.Oc -.Op Fl i | -inetd -.Oo -.Fl R Ar regpag | -.Fl Fl regpag Ns = Ns Ar regpag -.Oc -.Op Fl h | -help -.Op Fl Fl version -.Sh DESCRIPTION -This is the daemon for -.Xr kf 1 . -Supported options: -.Bl -tag -width indent -.It Xo -.Fl p Ar port , -.Fl Fl port Ns = Ns Ar port -.Xc -port to listen to -.It Fl i , -inetd -not started from inetd -.It Xo -.Fl R Ar regpag , -.Fl Fl regpag= Ns Ar regpag -.Xc -path to regpag binary -.El -.\".Sh ENVIRONMENT -.\".Sh FILES -.Sh EXAMPLES -Put the following in -.Pa /etc/inetd.conf : -.Bd -literal -kf stream tcp nowait root /usr/heimdal/libexec/kfd kfd -.Ed -.\".Sh DIAGNOSTICS -.Sh SEE ALSO -.Xr kf 1 -.\".Sh STANDARDS -.\".Sh HISTORY -.\".Sh AUTHORS -.\".Sh BUGS diff --git a/kerberosV/src/appl/kf/kfd.c b/kerberosV/src/appl/kf/kfd.c deleted file mode 100644 index 5ece999ecf1..00000000000 --- a/kerberosV/src/appl/kf/kfd.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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 "kf_locl.h" -RCSID("$Id: kfd.c,v 1.6 2013/06/17 19:11:36 robert Exp $"); - -krb5_context context; -char krb5_tkfile[MAXPATHLEN]; - -static int help_flag; -static int version_flag; -static char *port_str; -char *service = KF_SERVICE; -int do_inetd = 0; -static char *regpag_str=NULL; - -static struct getargs args[] = { - { "port", 'p', arg_string, &port_str, "port to listen to", "port" }, - { "inetd",'i',arg_flag, &do_inetd, - "Not started from inetd", NULL }, - { "regpag",'R',arg_string,®pag_str,"path to regpag binary","regpag"}, - { "help", 'h', arg_flag, &help_flag }, - { "version", 0, arg_flag, &version_flag } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -static void -usage(int code, struct getargs *args, int num_args) -{ - arg_printusage(args, num_args, NULL, ""); - exit(code); -} - -static int -server_setup(krb5_context *context, int argc, char **argv) -{ - int port = 0; - int local_argc; - - local_argc = krb5_program_setup(context, argc, argv, args, num_args, usage); - - if(help_flag) - (*usage)(0, args, num_args); - if(version_flag) { - print_version(NULL); - exit(0); - } - - 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) - port = krb5_getportbyname (*context, KF_PORT_NAME, "tcp", KF_PORT_NUM); - - if(argv[local_argc] != NULL) - usage(1, args, num_args); - - return port; -} - -static int protocol_version; - -static krb5_boolean -kfd_match_version(const void *arg, const char *version) -{ - if(strcmp(version, KF_VERSION_1) == 0) { - protocol_version = 1; - return TRUE; - } else if (strlen(version) == 4 && - version[0] == '0' && - version[1] == '.' && - (version[2] == '4' || version[2] == '3') && - islower((unsigned char)version[3])) { - protocol_version = 0; - return TRUE; - } - return FALSE; -} - -static int -proto (int sock, const char *service) -{ - krb5_auth_context auth_context; - krb5_error_code status; - krb5_principal server; - krb5_ticket *ticket; - char *name; - char ret_string[10]; - char hostname[MAXHOSTNAMELEN]; - krb5_data data; - krb5_data remotename; - krb5_data tk_file; - krb5_ccache ccache; - char ccname[MAXPATHLEN]; - struct passwd *pwd; - - status = krb5_auth_con_init (context, &auth_context); - if (status) - krb5_err(context, 1, status, "krb5_auth_con_init"); - - status = krb5_auth_con_setaddrs_from_fd (context, - auth_context, - &sock); - if (status) - krb5_err(context, 1, status, "krb5_auth_con_setaddr"); - - if(gethostname (hostname, sizeof(hostname)) < 0) - krb5_err(context, 1, errno, "gethostname"); - - status = krb5_sname_to_principal (context, - hostname, - service, - KRB5_NT_SRV_HST, - &server); - if (status) - krb5_err(context, 1, status, "krb5_sname_to_principal"); - - status = krb5_recvauth_match_version (context, - &auth_context, - &sock, - kfd_match_version, - NULL, - server, - 0, - NULL, - &ticket); - if (status) - krb5_err(context, 1, status, "krb5_recvauth"); - - status = krb5_unparse_name (context, - ticket->client, - &name); - if (status) - krb5_err(context, 1, status, "krb5_unparse_name"); - - if(protocol_version == 0) { - data.data = "old clnt"; /* XXX old clients only had room for - 10 bytes of message, and also - didn't show it to the user */ - data.length = strlen(data.data) + 1; - krb5_write_message(context, &sock, &data); - sleep(2); /* XXX give client time to finish */ - krb5_errx(context, 1, "old client; exiting"); - } - - status=krb5_read_priv_message (context, auth_context, - &sock, &remotename); - if (status) - krb5_err(context, 1, status, "krb5_read_message"); - status=krb5_read_priv_message (context, auth_context, - &sock, &tk_file); - if (status) - krb5_err(context, 1, status, "krb5_read_message"); - - krb5_data_zero (&data); - - if(((char*)remotename.data)[remotename.length-1] != '\0') - krb5_errx(context, 1, "unterminated received"); - if(((char*)tk_file.data)[tk_file.length-1] != '\0') - krb5_errx(context, 1, "unterminated received"); - - status = krb5_read_priv_message(context, auth_context, &sock, &data); - - if (status) { - krb5_err(context, 1, errno, "krb5_read_priv_message"); - goto out; - } - - pwd = getpwnam ((char *)(remotename.data)); - if (pwd == NULL) { - status=1; - krb5_warnx(context, "getpwnam: %s failed",(char *)(remotename.data)); - goto out; - } - - if(!krb5_kuserok (context, - ticket->client, - (char *)(remotename.data))) { - status=1; - krb5_warnx(context, "krb5_kuserok: permission denied"); - goto out; - } - - if (setgid(pwd->pw_gid) < 0) { - krb5_warn(context, errno, "setgid"); - goto out; - } - if (setuid(pwd->pw_uid) < 0) { - krb5_warn(context, errno, "setuid"); - goto out; - } - - if (tk_file.length != 1) - snprintf (ccname, sizeof(ccname), "%s", (char *)(tk_file.data)); - else - snprintf (ccname, sizeof(ccname), "FILE:/tmp/krb5cc_%lu", - (unsigned long)pwd->pw_uid); - - status = krb5_cc_resolve (context, ccname, &ccache); - if (status) { - krb5_warn(context, status, "krb5_cc_resolve"); - goto out; - } - status = krb5_cc_initialize (context, ccache, ticket->client); - if (status) { - krb5_warn(context, status, "krb5_cc_initialize"); - goto out; - } - status = krb5_rd_cred2 (context, auth_context, ccache, &data); - krb5_cc_close (context, ccache); - if (status) { - krb5_warn(context, status, "krb5_rd_cred"); - goto out; - - } - strlcpy(krb5_tkfile,ccname,sizeof(krb5_tkfile)); - krb5_warnx(context, "%s forwarded ticket to %s,%s", - name, - (char *)(remotename.data),ccname); - out: - if (status) { - strlcpy(ret_string, "no", sizeof(ret_string)); - krb5_warnx(context, "failed"); - } else { - strlcpy(ret_string, "ok", sizeof(ret_string)); - } - - krb5_data_free (&tk_file); - krb5_data_free (&remotename); - krb5_data_free (&data); - free(name); - - data.data = ret_string; - data.length = strlen(ret_string) + 1; - status = krb5_write_priv_message(context, auth_context, &sock, &data); - krb5_auth_con_free(context, auth_context); - - return status; -} - -static int -doit (int port, const char *service) -{ - if (do_inetd) - mini_inetd(port, NULL); - return proto (STDIN_FILENO, service); -} - -int -main(int argc, char **argv) -{ - int port; - int ret; - krb5_log_facility *fac; - - setprogname (argv[0]); - roken_openlog (argv[0], LOG_ODELAY | LOG_PID,LOG_AUTH); - port = server_setup(&context, argc, argv); - ret = krb5_openlog(context, "kfd", &fac); - if(ret) krb5_err(context, 1, ret, "krb5_openlog"); - ret = krb5_set_warn_dest(context, fac); - if(ret) krb5_err(context, 1, ret, "krb5_set_warn_dest"); - - ret = doit (port, service); - closelog(); - if (ret == 0 && regpag_str != NULL) - ret = execl(regpag_str, "regpag", "-t", krb5_tkfile, "-r", NULL); - return ret; -} diff --git a/kerberosV/src/appl/kf/kfd.cat8 b/kerberosV/src/appl/kf/kfd.cat8 deleted file mode 100644 index 1fb8700367f..00000000000 --- a/kerberosV/src/appl/kf/kfd.cat8 +++ /dev/null @@ -1,31 +0,0 @@ - -KFD(8) BSD System Manager's Manual KFD(8) - -NNAAMMEE - kkffdd -- receive forwarded tickets - -SSYYNNOOPPSSIISS - kkffdd [--pp _p_o_r_t | ----ppoorrtt=_p_o_r_t] [--ii | ----iinneettdd] [--RR _r_e_g_p_a_g | ----rreeggppaagg=_r_e_g_p_a_g] - [--hh | ----hheellpp] [----vveerrssiioonn] - -DDEESSCCRRIIPPTTIIOONN - This is the daemon for kf(1). Supported options: - - --pp _p_o_r_t, ----ppoorrtt=_p_o_r_t - port to listen to - - --ii, ----iinneettdd - not started from inetd - - --RR _r_e_g_p_a_g, ----rreeggppaagg==_r_e_g_p_a_g - path to regpag binary - -EEXXAAMMPPLLEESS - Put the following in _/_e_t_c_/_i_n_e_t_d_._c_o_n_f: - - kf stream tcp nowait root /usr/heimdal/libexec/kfd kfd - -SSEEEE AALLSSOO - kf(1) - -Heimdal July 2, 2000 Heimdal diff --git a/kerberosV/src/appl/kx/ChangeLog b/kerberosV/src/appl/kx/ChangeLog deleted file mode 100644 index 4784630276e..00000000000 --- a/kerberosV/src/appl/kx/ChangeLog +++ /dev/null @@ -1,457 +0,0 @@ -2007-04-19 Love Hörnquist Åstrand - - * make encoding function independent of krb4 and krb5, enable - removal of krb4 - -2006-10-07 Love Hörnquist Åstrand - - * Makefile.am: Add man_MANS to EXTRA_DIST - -2006-05-05 Love Hörnquist Åstrand - - * Rename u_intXX_t to uintXX_t - -2005-07-09 Love Hörquist Åstrand - - * kxd.c (doit): only cleaup for active sockets, passive does it - own cleaning up - - * fix unconst and shadow warnings - -2005-07-07 Assar Westerlund - - * krb4.c: Do not assume that des_key_schedule is an - array. - -2005-06-07 Love Hörquist Åstrand - - * (recv_conn): init variables to using them uninitialized - -2005-04-30 Love Hörquist Åstrand - - * kx.c (connect_host): make sure s is initialized - -2005-04-20 Love Hörquist Åstrand - - * krb5.c: cast size_t to unsigned long - -2004-03-15 Love Hörquist Åstrand - - * krb5.c (krb5_destroy): free allocated memory, not something else - -2004-03-07 Love Hörquist Åstrand - - * rxtelnet.1: document new behavior - - * rxtelnet.in: even if kx failes, start anyway From: Harald Barth - - -2004-02-18 Love Hörquist Åstrand - - * krb4.c: remove dup on - -2004-01-08 Love Hörquist Åstrand - - * krb5.c: clean up krb5 support, log to syslog instead of stdout - (very confusing for the other end tcp connection), patch - originally from joda - -2003-11-13 Johan Danielsson - - * rxtelnet.in: add telnet -F option - -2003-05-15 Love Hörquist Åstrand - - * kxd.c (recv_conn): pass pointer to sockaddr, not pointer to - pointer - - * kxd.c (recv_conn): get sizeof of the sockaddr_storage, not the - sockaddr pointer - - * kxd.c (recv_conn): if getnameinfo failes, send error to client - (and syslog) - -2003-04-16 Johan Danielsson - - * kx.c (doit_{passive,active}): use kc->thataddr directly - - * kx.h: don't directly use sockaddr_storage, since we can't always - know what it looks like - -2003-04-11 Love Hörquist Åstrand - - * rxterm.1: spelling, from jmc - * rxtelnet.1: spelling, from jmc - * kxd.8: spelling, from jmc - * kx.1: spelling, from jmc - -2003-02-25 Love Hörquist Åstrand - - * krb4.c: remove \n from warnx, from NetBSD - -2002-12-11 Johan Danielsson - - * kx.c (connect_host): pass size of thisaddr_ss to getsockname - -2002-10-15 Johan Danielsson - - * some ipv6 support (from Love) - -2002-09-09 Johan Danielsson - - * krb5.c (krb5_authenticate): use subkey - -2002-08-22 Johan Danielsson - - * common.c: remove only reference to strndup - -2002-05-07 Johan Danielsson - - * krb5.c: use krb5_warn where appropriate - -2002-03-18 Johan Danielsson - - * rxtelnet.in, rxterm.in: add forward (-f) option - -2001-09-17 Assar Westerlund - - * kx.h: add a kludge to make it build on aix (that defines NOERROR - in both sys/stream.h and arpa/nameser.h and considers that a fatal - error) - -2001-07-12 Assar Westerlund - - * common.c (connect_local_xsocket): handle a tcp socket as last - resort - - * rxterm.in: add -K (send arguments to kx) - * rxtelnet.in: add -K (send arguments to kx) - -2001-06-21 Assar Westerlund - - * rxterm.in: add -b for pointing to the rsh program. from - - * rxtelnet.in: add -b for pointing to the telnet program. from - - -2001-01-17 Johan Danielsson - - * common.c: don't write to string constants - -2000-12-31 Assar Westerlund - - * krb5.c (krb5_make_context): handle krb5_init_context failure - consistently - -2000-10-08 Assar Westerlund - - * kxd.c (doit_passive): check that fds are not too large to select - on - * kx.c (doit_active): check that fds are not too large to select - on - * krb5.c (krb5_copy_encrypted): check that fds are not too large - to select on - * krb4.c (krb4_copy_encrypted): check that fds are not too large - to select on - -2000-07-17 Johan Danielsson - - * Makefile.am: use conditional for X - -2000-06-10 Assar Westerlund - - * Makefile.in: use INSTALL_SCRIPT for installing rxterm, rxtelnet, - tenletxr - -2000-04-19 Assar Westerlund - - * common.c: try hostname uncanonified if getaddrinfo() fails - -2000-02-06 Assar Westerlund - - * kx.h: remove old prorotypes - -2000-01-08 Assar Westerlund - - * common.c (match_local_auth): handle ai_canonname being set in - any of the addresses returnedby getaddrinfo. glibc apparently - returns the reverse lookup of every address in ai_canonname. - -1999-12-28 Assar Westerlund - - * kxd.c (main): call krb5_getportbyname with the default in - host-byte-order - -1999-12-17 Assar Westerlund - - * common.c (match_local_auth): remove extra brace. spotted by - Jakob Schlyter - -1999-12-16 Assar Westerlund - - * common.c (match_local_auth): handle ai_canonname not being set - -1999-12-06 Assar Westerlund - - * krb4.c (krb4_authenticate): the NAT address might not be the one - for the relevant realm, try anyway. - * kxd.c (recv_conn): type correctness - * kx.c (connect_host): typo - -1999-12-05 Assar Westerlund - - * common.c (INADDR_LOOPBACK): remove. now in roken. - - * kxd.c (recv_conn): use getnameinfo_verified - * kxd.c (recv_conn): replace inaddr2str with getnameinfo - -1999-12-04 Assar Westerlund - - * kx.c (connect_host): use getaddrinfo - * common.c (find_auth_cookie, match_local_auth): re-write to use - getaddrinfo - -1999-11-27 Assar Westerlund - - * kxd.c (recv_conn): better errors when getting unrecognized data - -1999-11-25 Assar Westerlund - - * krb4.c (krb4_authenticate): obtain the `local' address when - doing NAT. also turn on passive mode. From - -1999-11-18 Assar Westerlund - - * krb5.c (krb5_destroy): free the correct part of the context - -1999-11-02 Assar Westerlund - - * kx.c (main): redo the v4/v5 selection for consistency. -4 -> - try only v4 -5 -> try only v5 none, -45 -> try v5, v4 - -1999-10-10 Assar Westerlund - - * Makefile.am (CLEANFILES): add generated files so that they get - cleaned away - -1999-09-29 Assar Westerlund - - * common.c (match_local_auth): only look for FamilyLocal (and - FamilyWild) cookies. This will not work when we start talking tcp - to the local X-server but `connect_local_xsocket' and the rest of - the code doesn't handle it anyway and the old code could (and did) - pick up the wrong cookie sometimes. If we have to match - FamilyInternet cookies, the search order has to be changed anyway - -1999-09-02 Assar Westerlund - - * kxd.c (childhandler): watch for child `wait_on_pid' to die. - (recv_conn): set `wait_on_pid' instead of looping on waitpid here - also. This should solve the problem of kxd looping which was - caused by the signal handler getting invoked before this waitpid - and reaping the child leaving this poor loop without any child - -1999-08-19 Assar Westerlund - - * kxd.c (recv_conn): give better error message - (doit_active): don't die if fork gives EAGAIN - -1999-08-19 Johan Danielsson - - * kxd.c (recv_conn): call setjob on crays; - (doit_passive): if fork fails with EAGAIN, don't shutdown, just close - the connection re-implement `-t' flag - -1999-07-12 Assar Westerlund - - * Makefile.am: handle not building X programs - -1999-06-23 Assar Westerlund - - * kx.c: conditionalize krb_enable_debug - -1999-06-20 Assar Westerlund - - * kxd.c (main): hopefully do inetd confusion right - -1999-06-15 Assar Westerlund - - * krb4.c (krb4_authenticate): get rid of a warning - - * kx.h: const-pollution - - * kx.c: use get_default_username and resulting const pollution - - * context.c (context_set): const pollution - -1999-05-22 Assar Westerlund - - * kxd.c (recv_conn): fix syslog messages - (main): fix inetd_flag thinko - -1999-05-21 Assar Westerlund - - * kx.c (main): don't byte-swap the argument to krb5_getportbyname - - * kx.c (main): try to use $USERNAME - -1999-05-10 Assar Westerlund - - * Makefile.in (SOURCES*): update sources list - - * kx.c (main): forgot to conditionalize some KRB5 code - - * kxd.c (main): use getarg - (*): handle v4 and/or v5 - - * kx.h: update - - * kx.c (main): use getarg. - (*): handle v4 and/or v5 - - * common.c (do_enccopy, copy_encrypted): remove use - net_{read,write} instead of krb_net_{read,write} - (krb_get_int, krb_put_int): include fallback of these for when we - compile without krb4 - - * Makefile.am (*_SOURCES): remove encdata, add krb[45].c, - context.c - (LDADD): add krb5 - - * krb4.c, krb5.c, context.c: new files - -1999-05-08 Assar Westerlund - - * kxd.c (doit_passive): handle error code from - create_and_write_cookie - - * kx.c (doit_active): handle error code from - create_and_write_cookie - - * common.c (create_and_write_cookie): try to return better (and - correct) errors. Based on a patch from Love - - * common.c (try_pie): more braces - (match_local_auth): new function - (find_auth_cookie): new function - (replace_cookie): don't just take the first auth cookie. based on - patch from Ake Sandgren - -Wed Apr 7 23:39:23 1999 Assar Westerlund - - * common.c (get_xsockets): init local variable to get rid of a gcc - warning - -Thu Apr 1 21:11:36 1999 Johan Danielsson - - * Makefile.in: fix for writeauth.o - -Fri Mar 19 15:12:31 1999 Johan Danielsson - - * kx.c: add gcc-braces - -Thu Mar 18 11:18:20 1999 Johan Danielsson - - * Makefile.am: include Makefile.am.common - -Thu Mar 11 14:58:32 1999 Johan Danielsson - - * writeauth.c: protoize - - * common.c: fix some warnings - -Wed Mar 10 19:33:39 1999 Johan Danielsson - - * kxd.c: openlog -> roken_openlog - -Wed Feb 3 22:01:55 1999 Assar Westerlund - - * rxtelnet.in: print out what telnet program we are running. From - - - * tenletxr.in: add --version, [-h | --help], -v - - * rxterm.in: add --version, [-h | --help], -v - - * rxtelnet.in: add --version, [-h | --help], -v - - * Makefile.in (rxterm, rxtelnet, telnetxr): substitute VERSION and - PACKAGE - - * rxtelnet.in: update usage string - -Fri Jan 22 23:51:05 1999 Assar Westerlund - - * common.c (verify_and_remove_cookies): give back a meaningful - error message if we're using the wrong cookie - -Fri Dec 18 17:42:02 1998 Assar Westerlund - - * common.c (replace_cookie): try to handle the case of not finding - any cookies - -Sun Nov 22 10:31:53 1998 Assar Westerlund - - * Makefile.in (WFLAGS): set - -Wed Nov 18 20:25:37 1998 Assar Westerlund - - * rxtelnet.in: new argument -n for not starting any terminal - emulator - - * kx.c (doit_passive): parse $DISPLAY correctly - -Fri Oct 2 06:34:51 1998 Assar Westerlund - - * kx.c (doit_active): check DISPLAY to figure out what local - socket to connect to. From Åke Sandgren - -Thu Oct 1 23:02:29 1998 Johan Danielsson - - * kx.h: case MAY_HAVE_X11_PIPES with Solaris - -Tue Sep 29 02:22:44 1998 Assar Westerlund - - * kx.c: fix from Ake Sandgren - -Mon Sep 28 18:04:03 1998 Johan Danielsson - - * common.c (try_pipe): return -1 if I_PUSH fails with ENOSYS - -Sat Sep 26 17:34:21 1998 Assar Westerlund - - * kxd.c: create sockets before setuid to handle Solaris' strange - permissions on /tmp/.X11-{unix,pipe} - - * common.c (chown_xsockets): new function - - * kx.h (chown_xsockets): new prototype - -Sun Aug 16 18:34:30 1998 Assar Westerlund - - * kxd.c (doit_passive): conditionalize stream pipe code - - * implement support for Solaris's named-pipe X transport - -Thu May 28 17:20:39 1998 Johan Danielsson - - * common.c: fix for (compiler?) bug in solaris 2.4 bind - - * kx.c: get_xsockets returns int, not unsigned - -Wed May 27 04:20:20 1998 Assar Westerlund - - * kxd.c (doit): better error reporting - -Tue May 26 17:41:23 1998 Johan Danielsson - - * kx.c: use krb_enable_debug - -Mon May 25 05:22:18 1998 Assar Westerlund - - * Makefile.in (clean): remove encdata.c - -Fri May 1 07:16:36 1998 Assar Westerlund - - * kx.c: unifdef -DHAVE_H_ERRNO - diff --git a/kerberosV/src/appl/kx/Makefile.am b/kerberosV/src/appl/kx/Makefile.am deleted file mode 100644 index 6fd70efcfa0..00000000000 --- a/kerberosV/src/appl/kx/Makefile.am +++ /dev/null @@ -1,70 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:36 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(X_CFLAGS) - -WFLAGS += $(WFLAGS_NOIMPLICITINT) - -if HAVE_X - -bin_PROGRAMS = kx -bin_SCRIPTS = rxterm rxtelnet tenletxr -libexec_PROGRAMS = kxd - -else - -bin_PROGRAMS = -bin_SCRIPTS = -libexec_PROGRAMS = - -endif - -CLEANFILES = rxterm rxtelnet tenletxr - -if NEED_WRITEAUTH -XauWriteAuth_c = writeauth.c -endif - -kx_SOURCES = \ - kx.c \ - kx.h \ - common.c \ - context.c \ - krb5.c \ - $(XauWriteAuth_c) - -EXTRA_kx_SOURCES = writeauth.c - -kxd_SOURCES = \ - kxd.c \ - kx.h \ - common.c \ - context.c \ - krb5.c \ - $(XauWriteAuth_c) - -EXTRA_kxd_SOURCES = writeauth.c - -EXTRA_DIST = NTMakefile rxterm.in rxtelnet.in tenletxr.in $(man_MANS) - -man_MANS = kx.1 rxtelnet.1 rxterm.1 tenletxr.1 kxd.8 - -rxterm: rxterm.in - sed -e "s!%bindir%!$(bindir)!" $(srcdir)/rxterm.in > $@ - chmod +x $@ - -rxtelnet: rxtelnet.in - sed -e "s!%bindir%!$(bindir)!" $(srcdir)/rxtelnet.in > $@ - chmod +x $@ - -tenletxr: tenletxr.in - sed -e "s!%bindir%!$(bindir)!" $(srcdir)/tenletxr.in > $@ - chmod +x $@ - -LDADD = \ - $(LIB_kafs) \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(X_LIBS) $(LIB_XauReadAuth) $(X_PRE_LIBS) $(X_EXTRA_LIBS) diff --git a/kerberosV/src/appl/kx/Makefile.in b/kerberosV/src/appl/kx/Makefile.in deleted file mode 100644 index 65f3aeb42e6..00000000000 --- a/kerberosV/src/appl/kx/Makefile.in +++ /dev/null @@ -1,1142 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:36 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:36 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:36 robert Exp $ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -@HAVE_X_TRUE@bin_PROGRAMS = kx$(EXEEXT) -@HAVE_X_TRUE@libexec_PROGRAMS = kxd$(EXEEXT) -subdir = appl/kx -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \ - "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ - "$(DESTDIR)$(man8dir)" -PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) -am__kx_SOURCES_DIST = kx.c kx.h common.c context.c krb5.c writeauth.c -@NEED_WRITEAUTH_TRUE@am__objects_1 = writeauth.$(OBJEXT) -am_kx_OBJECTS = kx.$(OBJEXT) common.$(OBJEXT) context.$(OBJEXT) \ - krb5.$(OBJEXT) $(am__objects_1) -kx_OBJECTS = $(am_kx_OBJECTS) -kx_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/lib/kafs/libkafs.la \ - $(am__DEPENDENCIES_1) -kx_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIB_krb5) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__kxd_SOURCES_DIST = kxd.c kx.h common.c context.c krb5.c \ - writeauth.c -am_kxd_OBJECTS = kxd.$(OBJEXT) common.$(OBJEXT) context.$(OBJEXT) \ - krb5.$(OBJEXT) $(am__objects_1) -kxd_OBJECTS = $(am_kxd_OBJECTS) -kxd_LDADD = $(LDADD) -kxd_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIB_krb5) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -SCRIPTS = $(bin_SCRIPTS) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(kx_SOURCES) $(EXTRA_kx_SOURCES) $(kxd_SOURCES) \ - $(EXTRA_kxd_SOURCES) -DIST_SOURCES = $(am__kx_SOURCES_DIST) $(EXTRA_kx_SOURCES) \ - $(am__kxd_SOURCES_DIST) $(EXTRA_kxd_SOURCES) -man1dir = $(mandir)/man1 -man8dir = $(mandir)/man8 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ $(WFLAGS_NOIMPLICITINT) -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(X_CFLAGS) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -@HAVE_X_FALSE@bin_SCRIPTS = -@HAVE_X_TRUE@bin_SCRIPTS = rxterm rxtelnet tenletxr -CLEANFILES = rxterm rxtelnet tenletxr -@NEED_WRITEAUTH_TRUE@XauWriteAuth_c = writeauth.c -kx_SOURCES = \ - kx.c \ - kx.h \ - common.c \ - context.c \ - krb5.c \ - $(XauWriteAuth_c) - -EXTRA_kx_SOURCES = writeauth.c -kxd_SOURCES = \ - kxd.c \ - kx.h \ - common.c \ - context.c \ - krb5.c \ - $(XauWriteAuth_c) - -EXTRA_kxd_SOURCES = writeauth.c -EXTRA_DIST = NTMakefile rxterm.in rxtelnet.in tenletxr.in $(man_MANS) -man_MANS = kx.1 rxtelnet.1 rxterm.1 tenletxr.1 kxd.8 -LDADD = \ - $(LIB_kafs) \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(X_LIBS) $(LIB_XauReadAuth) $(X_PRE_LIBS) $(X_EXTRA_LIBS) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/kx/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/kx/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -install-libexecPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexecdir)" && rm -f $$files - -clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -kx$(EXEEXT): $(kx_OBJECTS) $(kx_DEPENDENCIES) - @rm -f kx$(EXEEXT) - $(LINK) $(kx_OBJECTS) $(kx_LDADD) $(LIBS) -kxd$(EXEEXT): $(kxd_OBJECTS) $(kxd_DEPENDENCIES) - @rm -f kxd$(EXEEXT) - $(LINK) $(kxd_OBJECTS) $(kxd_LDADD) $(LIBS) -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) { files[d] = files[d] " " $$1; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$4, $$1 } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/krb5.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kx.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kxd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writeauth.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-binSCRIPTS \ - install-libexecPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-libexecPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 uninstall-man8 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \ - clean-libtool ctags dist-hook distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-binSCRIPTS install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ - install-libexecPROGRAMS install-man install-man1 install-man8 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-hook \ - uninstall-libexecPROGRAMS uninstall-man uninstall-man1 \ - uninstall-man8 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -rxterm: rxterm.in - sed -e "s!%bindir%!$(bindir)!" $(srcdir)/rxterm.in > $@ - chmod +x $@ - -rxtelnet: rxtelnet.in - sed -e "s!%bindir%!$(bindir)!" $(srcdir)/rxtelnet.in > $@ - chmod +x $@ - -tenletxr: tenletxr.in - sed -e "s!%bindir%!$(bindir)!" $(srcdir)/tenletxr.in > $@ - chmod +x $@ - -# 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/kerberosV/src/appl/kx/NTMakefile b/kerberosV/src/appl/kx/NTMakefile deleted file mode 100644 index 7d4b89a831e..00000000000 --- a/kerberosV/src/appl/kx/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\kx - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/kx/common.c b/kerberosV/src/appl/kx/common.c deleted file mode 100644 index 6ca275bee47..00000000000 --- a/kerberosV/src/appl/kx/common.c +++ /dev/null @@ -1,813 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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 "kx.h" - -RCSID("$Id: common.c,v 1.3 2013/06/17 19:11:36 robert Exp $"); - -char x_socket[MaxPathLen]; - -uint32_t display_num; -char display[MaxPathLen]; -int display_size = sizeof(display); -char xauthfile[MaxPathLen]; -int xauthfile_size = sizeof(xauthfile); -u_char cookie[16]; -size_t cookie_len = sizeof(cookie); - -#ifndef X_UNIX_PATH -#define X_UNIX_PATH "/tmp/.X11-unix/X" -#endif - -#ifndef X_PIPE_PATH -#define X_PIPE_PATH "/tmp/.X11-pipe/X" -#endif - -/* - * Allocate a unix domain socket in `s' for display `dpy' and with - * filename `pattern' - * - * 0 if all is OK - * -1 if bind failed badly - * 1 if dpy is already used */ - -static int -try_socket (struct x_socket *s, int dpy, const char *pattern) -{ - struct sockaddr_un addr; - int fd; - - fd = socket (AF_UNIX, SOCK_STREAM, 0); - if (fd < 0) - err (1, "socket AF_UNIX"); - memset (&addr, 0, sizeof(addr)); - addr.sun_family = AF_UNIX; - snprintf (addr.sun_path, sizeof(addr.sun_path), pattern, dpy); - if(bind(fd, - (struct sockaddr *)&addr, - sizeof(addr)) < 0) { - close (fd); - if (errno == EADDRINUSE || - errno == EACCES /* Cray return EACCESS */ -#ifdef ENOTUNIQ - || errno == ENOTUNIQ /* bug in Solaris 2.4 */ -#endif - ) - return 1; - else - return -1; - } - s->fd = fd; - s->pathname = strdup (addr.sun_path); - if (s->pathname == NULL) - errx (1, "strdup: out of memory"); - s->flags = UNIX_SOCKET; - return 0; -} - -#ifdef MAY_HAVE_X11_PIPES -/* - * Allocate a stream (masqueraded as a named pipe) - * - * 0 if all is OK - * -1 if bind failed badly - * 1 if dpy is already used - */ - -static int -try_pipe (struct x_socket *s, int dpy, const char *pattern) -{ - char path[MAXPATHLEN]; - int ret; - int fd; - int pipefd[2]; - - snprintf (path, sizeof(path), pattern, dpy); - fd = open (path, O_WRONLY | O_CREAT | O_EXCL, 0600); - if (fd < 0) { - if (errno == EEXIST) - return 1; - else - return -1; - } - - close (fd); - - ret = pipe (pipefd); - if (ret < 0) - err (1, "pipe"); - - ret = ioctl (pipefd[1], I_PUSH, "connld"); - if (ret < 0) { - if(errno == ENOSYS) - return -1; - err (1, "ioctl I_PUSH"); - } - - ret = fattach (pipefd[1], path); - if (ret < 0) - err (1, "fattach %s", path); - - s->fd = pipefd[0]; - close (pipefd[1]); - s->pathname = strdup (path); - if (s->pathname == NULL) - errx (1, "strdup: out of memory"); - s->flags = STREAM_PIPE; - return 0; -} -#endif /* MAY_HAVE_X11_PIPES */ - -/* - * Try to create a TCP socket in `s' corresponding to display `dpy'. - * - * 0 if all is OK - * -1 if bind failed badly - * 1 if dpy is already used - */ - -static int -try_tcp (struct x_socket *s, int dpy) -{ - struct sockaddr_in tcpaddr; - struct in_addr local; - int one = 1; - int fd; - - memset(&local, 0, sizeof(local)); - local.s_addr = htonl(INADDR_LOOPBACK); - - fd = socket (AF_INET, SOCK_STREAM, 0); - if (fd < 0) - err (1, "socket AF_INET"); -#if defined(TCP_NODELAY) && defined(HAVE_SETSOCKOPT) - setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, (void *)&one, - sizeof(one)); -#endif - memset (&tcpaddr, 0, sizeof(tcpaddr)); - tcpaddr.sin_family = AF_INET; - tcpaddr.sin_addr = local; - tcpaddr.sin_port = htons(6000 + dpy); - if (bind (fd, (struct sockaddr *)&tcpaddr, - sizeof(tcpaddr)) < 0) { - close (fd); - if (errno == EADDRINUSE) - return 1; - else - return -1; - } - s->fd = fd; - s->pathname = NULL; - s->flags = TCP; - return 0; -} - -/* - * The potential places to create unix sockets. - */ - -static char *x_sockets[] = { -X_UNIX_PATH "%u", -"/var/X/.X11-unix/X" "%u", -"/usr/spool/sockets/X11/" "%u", -NULL -}; - -/* - * Dito for stream pipes. - */ - -#ifdef MAY_HAVE_X11_PIPES -static char *x_pipes[] = { -X_PIPE_PATH "%u", -"/var/X/.X11-pipe/X" "%u", -NULL -}; -#endif - -/* - * Create the directory corresponding to dirname of `path' or fail. - */ - -static void -try_mkdir (const char *path) -{ - char *dir; - char *p; - int oldmask; - - if((dir = strdup (path)) == NULL) - errx (1, "strdup: out of memory"); - p = strrchr (dir, '/'); - if (p) - *p = '\0'; - - oldmask = umask(0); - mkdir (dir, 01777); - umask (oldmask); - free (dir); -} - -/* - * Allocate a display, returning the number of sockets in `number' and - * all the corresponding sockets in `sockets'. If `tcp_socket' is - * true, also allcoaet a TCP socket. - * - * The return value is the display allocated or -1 if an error occurred. - */ - -int -get_xsockets (int *number, struct x_socket **sockets, int tcp_socket) -{ - int dpy; - struct x_socket *s; - int n; - int i; - - s = malloc (sizeof(*s) * 5); - if (s == NULL) - errx (1, "malloc: out of memory"); - - try_mkdir (X_UNIX_PATH); - try_mkdir (X_PIPE_PATH); - - for(dpy = 4; dpy < 256; ++dpy) { - char **path; - int tmp = 0; - - n = 0; - for (path = x_sockets; *path; ++path) { - tmp = try_socket (&s[n], dpy, *path); - if (tmp == -1) { - if (errno != ENOTDIR && errno != ENOENT) - err(1, "failed to open '%s'", *path); - } else if (tmp == 1) { - while(--n >= 0) { - close (s[n].fd); - free (s[n].pathname); - } - break; - } else if (tmp == 0) - ++n; - } - if (tmp == 1) - continue; - -#ifdef MAY_HAVE_X11_PIPES - for (path = x_pipes; *path; ++path) { - tmp = try_pipe (&s[n], dpy, *path); - if (tmp == -1) { - if (errno != ENOTDIR && errno != ENOENT && errno != ENOSYS) - err(1, "failed to open '%s'", *path); - } else if (tmp == 1) { - while (--n >= 0) { - close (s[n].fd); - free (s[n].pathname); - } - break; - } else if (tmp == 0) - ++n; - } - - if (tmp == 1) - continue; -#endif - - if (tcp_socket) { - tmp = try_tcp (&s[n], dpy); - if (tmp == -1) - err(1, "failed to open tcp stocket"); - else if (tmp == 1) { - while (--n >= 0) { - close (s[n].fd); - free (s[n].pathname); - } - break; - } else if (tmp == 0) - ++n; - } - break; - } - if (dpy == 256) - errx (1, "no free x-servers"); - for (i = 0; i < n; ++i) - if (s[i].flags & LISTENP - && listen (s[i].fd, SOMAXCONN) < 0) - err (1, "listen %s", s[i].pathname ? s[i].pathname : "tcp"); - *number = n; - *sockets = s; - return dpy; -} - -/* - * Change owner on the `n' sockets in `sockets' to `uid', `gid'. - * Return 0 is succesful or -1 if an error occurred. - */ - -int -chown_xsockets (int n, struct x_socket *sockets, uid_t uid, gid_t gid) -{ - int i; - - for (i = 0; i < n; ++i) - if (sockets[i].pathname != NULL) - if (chown (sockets[i].pathname, uid, gid) < 0) - return -1; - return 0; -} - -/* - * Connect to local display `dnr' with local transport or TCP. - * Return a file descriptor. - */ - -int -connect_local_xsocket (unsigned dnr) -{ - int fd; - char **path; - - for (path = x_sockets; *path; ++path) { - struct sockaddr_un addr; - - fd = socket (AF_UNIX, SOCK_STREAM, 0); - if (fd < 0) - break; - memset (&addr, 0, sizeof(addr)); - addr.sun_family = AF_UNIX; - snprintf (addr.sun_path, sizeof(addr.sun_path), *path, dnr); - if (connect (fd, (struct sockaddr *)&addr, sizeof(addr)) == 0) - return fd; - close(fd); - } - { - struct sockaddr_in addr; - - fd = socket(AF_INET, SOCK_STREAM, 0); - if (fd < 0) - err (1, "socket AF_INET"); - memset (&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - addr.sin_port = htons(6000 + dnr); - if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) == 0) - return fd; - close(fd); - } - err (1, "connecting to local display %u", dnr); -} - -/* - * Create a cookie file with a random cookie for the localhost. The - * file name will be stored in `xauthfile' (but not larger than - * `xauthfile_size'), and the cookie returned in `cookie', `cookie_sz'. - * Return 0 if succesful, or errno. - */ - -int -create_and_write_cookie (char *file, - size_t file_size, - u_char *cookie_buf, - size_t cookie_sz) -{ - Xauth auth; - char tmp[64]; - int fd; - FILE *f; - char hostname[MaxHostNameLen]; - int saved_errno; - - gethostname (hostname, sizeof(hostname)); - - auth.family = FamilyLocal; - auth.address = hostname; - auth.address_length = strlen(auth.address); - snprintf (tmp, sizeof(tmp), "%d", display_num); - auth.number_length = strlen(tmp); - auth.number = tmp; - auth.name = COOKIE_TYPE; - auth.name_length = strlen(auth.name); - auth.data_length = cookie_sz; - auth.data = (char*)cookie_buf; -#ifdef KRB5 - krb5_generate_random_block (cookie_buf, cookie_sz); -#else - krb_generate_random_block (cookie_buf, cookie_sz); -#endif - - strlcpy(file, "/tmp/AXXXXXX", file_size); - fd = mkstemp(file); - if(fd < 0) { - saved_errno = errno; - syslog(LOG_ERR, "create_and_write_cookie: mkstemp: %m"); - return saved_errno; - } - f = fdopen(fd, "r+"); - if(f == NULL){ - saved_errno = errno; - close(fd); - return errno; - } - if(XauWriteAuth(f, &auth) == 0) { - saved_errno = errno; - fclose(f); - return saved_errno; - } - - /* - * I would like to write a cookie for localhost:n here, but some - * stupid code in libX11 will not look for cookies of that type, - * so we are forced to use FamilyWild instead. - */ - - auth.family = FamilyWild; - auth.address_length = 0; - - if (XauWriteAuth(f, &auth) == 0) { - saved_errno = errno; - fclose (f); - return saved_errno; - } - - if(fclose(f)) - return errno; - return 0; -} - -/* - * Verify and remove cookies. Read and parse a X-connection from - * `fd'. Check the cookie used is the same as in `cookie'. Remove the - * cookie and copy the rest of it to `sock'. - * Expect cookies iff cookiesp. - * Return 0 iff ok. - * - * The protocol is as follows: - * - * C->S: [Bl] 1 - * unused 1 - * protocol major version 2 - * protocol minor version 2 - * length of auth protocol name(n) 2 - * length of auth protocol data 2 - * unused 2 - * authorization protocol name n - * pad pad(n) - * authorization protocol data d - * pad pad(d) - * - * S->C: Failed - * 0 1 - * length of reason 1 - * protocol major version 2 - * protocol minor version 2 - * length in 4 bytes unit of - * additional data (n+p)/4 2 - * reason n - * unused p = pad(n) - */ - -int -verify_and_remove_cookies (int fd, int sock, int cookiesp) -{ - u_char beg[12]; - int bigendianp; - unsigned n, d, npad, dpad; - char *protocol_name, *protocol_data; - u_char zeros[6] = {0, 0, 0, 0, 0, 0}; - u_char refused[20] = {0, 10, - 0, 0, /* protocol major version */ - 0, 0, /* protocol minor version */ - 0, 0, /* length of additional data / 4 */ - 'b', 'a', 'd', ' ', 'c', 'o', 'o', 'k', 'i', 'e', - 0, 0}; - - if (net_read (fd, beg, sizeof(beg)) != sizeof(beg)) - return 1; - if (net_write (sock, beg, 6) != 6) - return 1; - bigendianp = beg[0] == 'B'; - if (bigendianp) { - n = (beg[6] << 8) | beg[7]; - d = (beg[8] << 8) | beg[9]; - } else { - n = (beg[7] << 8) | beg[6]; - d = (beg[9] << 8) | beg[8]; - } - npad = (4 - (n % 4)) % 4; - dpad = (4 - (d % 4)) % 4; - protocol_name = malloc(n + npad); - if (n + npad != 0 && protocol_name == NULL) - return 1; - protocol_data = malloc(d + dpad); - if (d + dpad != 0 && protocol_data == NULL) { - free (protocol_name); - return 1; - } - if (net_read (fd, protocol_name, n + npad) != n + npad) - goto fail; - if (net_read (fd, protocol_data, d + dpad) != d + dpad) - goto fail; - if (cookiesp) { - if (strncmp (protocol_name, COOKIE_TYPE, strlen(COOKIE_TYPE)) != 0) - goto refused; - if (d != cookie_len || - memcmp (protocol_data, cookie, cookie_len) != 0) - goto refused; - } - free (protocol_name); - free (protocol_data); - if (net_write (sock, zeros, 6) != 6) - return 1; - return 0; -refused: - refused[2] = beg[2]; - refused[3] = beg[3]; - refused[4] = beg[4]; - refused[5] = beg[5]; - if (bigendianp) - refused[7] = 3; - else - refused[6] = 3; - - net_write (fd, refused, sizeof(refused)); -fail: - free (protocol_name); - free (protocol_data); - return 1; -} - -/* - * Return 0 iff `cookie' is compatible with the cookie for the - * localhost with name given in `ai' (or `hostname') and display - * number in `disp_nr'. - */ - -static int -match_local_auth (Xauth* auth, - struct addrinfo *ai, const char *hostname, int disp_nr) -{ - int auth_disp; - char *tmp_disp; - struct addrinfo *a; - - tmp_disp = malloc(auth->number_length + 1); - if (tmp_disp == NULL) - return -1; - memcpy(tmp_disp, auth->number, auth->number_length); - tmp_disp[auth->number_length] = '\0'; - auth_disp = atoi(tmp_disp); - free (tmp_disp); - if (auth_disp != disp_nr) - return 1; - for (a = ai; a != NULL; a = a->ai_next) { - if ((auth->family == FamilyLocal - || auth->family == FamilyWild) - && a->ai_canonname != NULL - && strncmp (auth->address, - a->ai_canonname, - auth->address_length) == 0) - return 0; - } - if (hostname != NULL - && (auth->family == FamilyLocal - || auth->family == FamilyWild) - && strncmp (auth->address, hostname, auth->address_length) == 0) - return 0; - return 1; -} - -/* - * Find `our' cookie from the cookie file `f' and return it or NULL. - */ - -static Xauth* -find_auth_cookie (FILE *f) -{ - Xauth *ret = NULL; - char local_hostname[MaxHostNameLen]; - char *display_str = getenv("DISPLAY"); - char d[MaxHostNameLen + 4]; - char *colon; - struct addrinfo *ai; - struct addrinfo hints; - int disp; - int error; - - if(display_str == NULL) - display_str = ":0"; - strlcpy(d, display_str, sizeof(d)); - display_str = d; - colon = strchr (display_str, ':'); - if (colon == NULL) - disp = 0; - else { - *colon = '\0'; - disp = atoi (colon + 1); - } - if (strcmp (display_str, "") == 0 - || strncmp (display_str, "unix", 4) == 0 - || strncmp (display_str, "localhost", 9) == 0) { - gethostname (local_hostname, sizeof(local_hostname)); - display_str = local_hostname; - } - memset (&hints, 0, sizeof(hints)); - hints.ai_flags = AI_CANONNAME; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - error = getaddrinfo (display_str, NULL, &hints, &ai); - if (error) - ai = NULL; - - for (; (ret = XauReadAuth (f)) != NULL; XauDisposeAuth(ret)) { - if (match_local_auth (ret, ai, display_str, disp) == 0) { - if (ai != NULL) - freeaddrinfo (ai); - return ret; - } - } - if (ai != NULL) - freeaddrinfo (ai); - return NULL; -} - -/* - * Get rid of the cookie that we were sent and get the correct one - * from our own cookie file instead. - */ - -int -replace_cookie(int xserver, int fd, char *filename, int cookiesp) /* XXX */ -{ - u_char beg[12]; - int bigendianp; - unsigned n, d, npad, dpad; - FILE *f; - u_char zeros[6] = {0, 0, 0, 0, 0, 0}; - - if (net_read (fd, beg, sizeof(beg)) != sizeof(beg)) - return 1; - if (net_write (xserver, beg, 6) != 6) - return 1; - bigendianp = beg[0] == 'B'; - if (bigendianp) { - n = (beg[6] << 8) | beg[7]; - d = (beg[8] << 8) | beg[9]; - } else { - n = (beg[7] << 8) | beg[6]; - d = (beg[9] << 8) | beg[8]; - } - if (n != 0 || d != 0) - return 1; - f = fopen(filename, "r"); - if (f != NULL) { - Xauth *auth = find_auth_cookie (f); - u_char len[6] = {0, 0, 0, 0, 0, 0}; - - fclose (f); - - if (auth != NULL) { - n = auth->name_length; - d = auth->data_length; - } else { - n = 0; - d = 0; - } - if (bigendianp) { - len[0] = n >> 8; - len[1] = n & 0xFF; - len[2] = d >> 8; - len[3] = d & 0xFF; - } else { - len[0] = n & 0xFF; - len[1] = n >> 8; - len[2] = d & 0xFF; - len[3] = d >> 8; - } - if (net_write (xserver, len, 6) != 6) { - XauDisposeAuth(auth); - return 1; - } - if(n != 0 && net_write (xserver, auth->name, n) != n) { - XauDisposeAuth(auth); - return 1; - } - npad = (4 - (n % 4)) % 4; - if (npad && net_write (xserver, zeros, npad) != npad) { - XauDisposeAuth(auth); - return 1; - } - if (d != 0 && net_write (xserver, auth->data, d) != d) { - XauDisposeAuth(auth); - return 1; - } - XauDisposeAuth(auth); - dpad = (4 - (d % 4)) % 4; - if (dpad && net_write (xserver, zeros, dpad) != dpad) - return 1; - } else { - if(net_write(xserver, zeros, 6) != 6) - return 1; - } - return 0; -} - -/* - * Some simple controls on the address and corresponding socket - */ - -int -suspicious_address (int sock, struct sockaddr *addr) -{ - char data[40]; - socklen_t len = sizeof(data); - - switch (addr->sa_family) { - case AF_INET: - return ((struct sockaddr_in *)addr)->sin_addr.s_addr != - htonl(INADDR_LOOPBACK) -#if defined(IP_OPTIONS) && defined(HAVE_GETSOCKOPT) - || getsockopt (sock, IPPROTO_IP, IP_OPTIONS, data, &len) < 0 - || len != 0 -#endif - ; - break; -#ifdef HAVE_IPV6 - case AF_INET6: - /* XXX check route headers */ - return !IN6_IS_ADDR_LOOPBACK(&((struct sockaddr_in6*)addr)->sin6_addr); -#endif - default: - return 1; - } -} - -/* - * This really sucks, but these functions are used and if we're not - * linking against libkrb they don't exist. Using the heimdal storage - * functions will not work either cause we do not always link with - * libkrb5 either. - */ - -int -kx_get_int(void *f, uint32_t *to, int size, int lsb) -{ - int i; - unsigned char *from = (unsigned char *)f; - - *to = 0; - if(lsb){ - for(i = size-1; i >= 0; i--) - *to = (*to << 8) | from[i]; - }else{ - for(i = 0; i < size; i++) - *to = (*to << 8) | from[i]; - } - return size; -} - -int -kx_put_int(uint32_t from, void *to, size_t rem, int size) -{ - int i; - unsigned char *p = (unsigned char *)to; - - if (rem < size) - return -1; - - for(i = size - 1; i >= 0; i--){ - p[i] = from & 0xff; - from >>= 8; - } - return size; -} diff --git a/kerberosV/src/appl/kx/context.c b/kerberosV/src/appl/kx/context.c deleted file mode 100644 index 22b60b878a2..00000000000 --- a/kerberosV/src/appl/kx/context.c +++ /dev/null @@ -1,94 +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 "kx.h" - -RCSID("$Id: context.c,v 1.3 2013/06/17 19:11:36 robert Exp $"); - -/* - * Set the common part of the context `kc' - */ - -void -context_set (kx_context *kc, const char *host, const char *user, int port, - int debug_flag, int keepalive_flag, int tcp_flag) -{ - kc->thisaddr = (struct sockaddr*)&kc->__ss_this; - kc->thataddr = (struct sockaddr*)&kc->__ss_that; - kc->host = host; - kc->user = user; - kc->port = port; - kc->debug_flag = debug_flag; - kc->keepalive_flag = keepalive_flag; - kc->tcp_flag = tcp_flag; -} - -/* - * dispatch functions - */ - -void -context_destroy (kx_context *kc) -{ - (*kc->destroy)(kc); -} - -int -context_authenticate (kx_context *kc, int s) -{ - return (*kc->authenticate)(kc, s); -} - -int -context_userok (kx_context *kc, char *user) -{ - return (*kc->userok)(kc, user); -} - -ssize_t -kx_read (kx_context *kc, int fd, void *buf, size_t len) -{ - return (*kc->read)(kc, fd, buf, len); -} - -ssize_t -kx_write (kx_context *kc, int fd, const void *buf, size_t len) -{ - return (*kc->write)(kc, fd, buf, len); -} - -int -copy_encrypted (kx_context *kc, int fd1, int fd2) -{ - return (*kc->copy_encrypted)(kc, fd1, fd2); -} diff --git a/kerberosV/src/appl/kx/krb5.c b/kerberosV/src/appl/kx/krb5.c deleted file mode 100644 index ccaf48889f2..00000000000 --- a/kerberosV/src/appl/kx/krb5.c +++ /dev/null @@ -1,447 +0,0 @@ -/* - * Copyright (c) 1995 - 2005 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 "kx.h" - -RCSID("$Id: krb5.c,v 1.3 2013/06/17 19:11:36 robert Exp $"); - -#ifdef KRB5 - -struct krb5_kx_context { - krb5_context context; - krb5_keyblock *keyblock; - krb5_crypto crypto; - krb5_principal client; - krb5_log_facility *log; - -}; - -typedef struct krb5_kx_context krb5_kx_context; - -#define K5DATA(kc) ((krb5_kx_context*)kc->data) -#define CONTEXT(kc) (K5DATA(kc)->context) - -/* - * - */ - -static void -ksyslog(krb5_context context, krb5_error_code ret, const char *fmt, ...) - __attribute__((__format__(__printf__, 3, 0))); - -static void -ksyslog(krb5_context context, krb5_error_code ret, const char *fmt, ...) -{ - const char *msg; - char *str = NULL; - va_list va; - - msg = krb5_get_error_message(context, ret); - - va_start(va, fmt); - vasprintf(&str, fmt, va); - va_end(va); - - syslog(LOG_ERR, "%s: %s", str, msg); - - krb5_free_error_message(context, msg); - free(str); -} - -/* - * Destroy the krb5 context in `c'. - */ - -static void -krb5_destroy (kx_context *kc) -{ - if (K5DATA(kc)->keyblock) - krb5_free_keyblock (CONTEXT(kc), K5DATA(kc)->keyblock); - if (K5DATA(kc)->crypto) - krb5_crypto_destroy (CONTEXT(kc), K5DATA(kc)->crypto); - if (K5DATA(kc)->client) - krb5_free_principal (CONTEXT(kc), K5DATA(kc)->client); - if (CONTEXT(kc)) - krb5_free_context (CONTEXT(kc)); - memset (kc->data, 0, sizeof(krb5_kx_context)); - free (kc->data); -} - -/* - * Read the authentication information from `s' and return 0 if - * succesful, else -1. - */ - -static int -krb5_authenticate (kx_context *kc, int s) -{ - krb5_auth_context auth_context = NULL; - krb5_error_code ret; - krb5_principal server; - const char *host = kc->host; - - ret = krb5_sname_to_principal (CONTEXT(kc), - host, "host", KRB5_NT_SRV_HST, &server); - if (ret) { - krb5_warn (CONTEXT(kc), ret, "krb5_sname_to_principal: %s", host); - return 1; - } - - ret = krb5_sendauth (CONTEXT(kc), - &auth_context, - &s, - KX_VERSION, - NULL, - server, - AP_OPTS_MUTUAL_REQUIRED | AP_OPTS_USE_SUBKEY, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL); - if (ret) { - if(ret != KRB5_SENDAUTH_BADRESPONSE) - krb5_warn (CONTEXT(kc), ret, "krb5_sendauth: %s", host); - return 1; - } - - ret = krb5_auth_con_getkey (CONTEXT(kc), auth_context, - &K5DATA(kc)->keyblock); - if (ret) { - krb5_warn (CONTEXT(kc), ret, "krb5_auth_con_getkey: %s", host); - krb5_auth_con_free (CONTEXT(kc), auth_context); - return 1; - } - - ret = krb5_crypto_init (CONTEXT(kc), K5DATA(kc)->keyblock, - 0, &K5DATA(kc)->crypto); - if (ret) { - krb5_warn (CONTEXT(kc), ret, "krb5_crypto_init"); - krb5_auth_con_free (CONTEXT(kc), auth_context); - return 1; - } - return 0; -} - -/* - * Read an encapsulated krb5 packet from `fd' into `buf' (of size - * `len'). Return the number of bytes read or 0 on EOF or -1 on - * error. - */ - -static ssize_t -krb5_read (kx_context *kc, - int fd, void *buf, size_t len) -{ - size_t data_len, outer_len; - krb5_error_code ret; - unsigned char tmp[4]; - krb5_data data; - int l; - - l = krb5_net_read (CONTEXT(kc), &fd, tmp, 4); - if (l == 0) - return l; - if (l != 4) - return -1; - data_len = (tmp[0] << 24) | (tmp[1] << 16) | (tmp[2] << 8) | tmp[3]; - outer_len = krb5_get_wrapped_length (CONTEXT(kc), - K5DATA(kc)->crypto, data_len); - if (outer_len > len) - return -1; - if (krb5_net_read (CONTEXT(kc), &fd, buf, outer_len) != outer_len) - return -1; - - ret = krb5_decrypt (CONTEXT(kc), K5DATA(kc)->crypto, - KRB5_KU_OTHER_ENCRYPTED, - buf, outer_len, &data); - if (ret) { - krb5_warn (CONTEXT(kc), ret, "krb5_decrypt"); - return -1; - } - if (data_len > data.length) { - krb5_data_free (&data); - return -1; - } - memmove (buf, data.data, data_len); - krb5_data_free (&data); - return data_len; -} - -/* - * Write an encapsulated krb5 packet on `fd' with the data in `buf, - * len'. Return len or -1 on error. - */ - -static ssize_t -krb5_write(kx_context *kc, - int fd, const void *buf, size_t len) -{ - krb5_data data; - krb5_error_code ret; - unsigned char tmp[4]; - size_t outlen; - - ret = krb5_encrypt (CONTEXT(kc), K5DATA(kc)->crypto, - KRB5_KU_OTHER_ENCRYPTED, - buf, len, &data); - if (ret){ - krb5_warn (CONTEXT(kc), ret, "krb5_write"); - return -1; - } - - outlen = data.length; - tmp[0] = (len >> 24) & 0xFF; - tmp[1] = (len >> 16) & 0xFF; - tmp[2] = (len >> 8) & 0xFF; - tmp[3] = (len >> 0) & 0xFF; - - if (krb5_net_write (CONTEXT(kc), &fd, tmp, 4) != 4 || - krb5_net_write (CONTEXT(kc), &fd, data.data, outlen) != outlen) { - krb5_data_free (&data); - return -1; - } - krb5_data_free (&data); - return len; -} - -/* - * Copy from the unix socket `from_fd' encrypting to `to_fd'. - * Return 0, -1 or len. - */ - -static int -copy_out (kx_context *kc, int from_fd, int to_fd) -{ - char buf[32768]; - ssize_t len; - - len = read (from_fd, buf, sizeof(buf)); - if (len == 0) - return 0; - if (len < 0) { - krb5_warn (CONTEXT(kc), errno, "read"); - return len; - } - return krb5_write (kc, to_fd, buf, len); -} - -/* - * Copy from the socket `from_fd' decrypting to `to_fd'. - * Return 0, -1 or len. - */ - -static int -copy_in (kx_context *kc, int from_fd, int to_fd) -{ - char buf[33000]; /* XXX */ - - ssize_t len; - - len = krb5_read (kc, from_fd, buf, sizeof(buf)); - if (len == 0) - return 0; - if (len < 0) { - krb5_warn (CONTEXT(kc), errno, "krb5_read"); - return len; - } - - return krb5_net_write (CONTEXT(kc), &to_fd, buf, len); -} - -/* - * Copy data between `fd1' and `fd2', encrypting in one direction and - * decrypting in the other. - */ - -static int -krb5_copy_encrypted (kx_context *kc, int fd1, int fd2) -{ - for (;;) { - fd_set fdset; - int ret; - - if (fd1 >= FD_SETSIZE || fd2 >= FD_SETSIZE) { - krb5_warnx (CONTEXT(kc), "fd too large"); - return 1; - } - - FD_ZERO(&fdset); - FD_SET(fd1, &fdset); - FD_SET(fd2, &fdset); - - ret = select (max(fd1, fd2)+1, &fdset, NULL, NULL, NULL); - if (ret < 0 && errno != EINTR) { - krb5_warn (CONTEXT(kc), errno, "select"); - return 1; - } - if (FD_ISSET(fd1, &fdset)) { - ret = copy_out (kc, fd1, fd2); - if (ret <= 0) - return ret; - } - if (FD_ISSET(fd2, &fdset)) { - ret = copy_in (kc, fd2, fd1); - if (ret <= 0) - return ret; - } - } -} - -/* - * Return 0 if the user authenticated on `kc' is allowed to login as - * `user'. - */ - -static int -krb5_userok (kx_context *kc, char *user) -{ - krb5_error_code ret; - char *tmp; - - ret = krb5_unparse_name (CONTEXT(kc), K5DATA(kc)->client, &tmp); - if (ret) - krb5_err (CONTEXT(kc), 1, ret, "krb5_unparse_name"); - kc->user = tmp; - - return !krb5_kuserok (CONTEXT(kc), K5DATA(kc)->client, user); -} - -/* - * Create an instance of an krb5 context. - */ - -void -krb5_make_context (kx_context *kc) -{ - krb5_kx_context *c; - krb5_error_code ret; - - kc->authenticate = krb5_authenticate; - kc->userok = krb5_userok; - kc->read = krb5_read; - kc->write = krb5_write; - kc->copy_encrypted = krb5_copy_encrypted; - kc->destroy = krb5_destroy; - kc->user = NULL; - kc->data = malloc(sizeof(krb5_kx_context)); - - if (kc->data == NULL) { - syslog (LOG_ERR, "failed to malloc %lu bytes", - (unsigned long)sizeof(krb5_kx_context)); - exit(1); - } - memset (kc->data, 0, sizeof(krb5_kx_context)); - c = (krb5_kx_context *)kc->data; - ret = krb5_init_context (&c->context); - if (ret) { - syslog (LOG_ERR, "failed initialise krb5 context"); - exit(1); - } -} - -/* - * Receive authentication information on `sock' (first four bytes - * in `buf'). - */ - -int -recv_v5_auth (kx_context *kc, int sock, u_char *buf) -{ - uint32_t len; - krb5_error_code ret; - krb5_principal server; - krb5_auth_context auth_context = NULL; - krb5_ticket *ticket; - - if (memcmp (buf, "\x00\x00\x00\x13", 4) != 0) - return 1; - len = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3]); - if (net_read(sock, buf, len) != len) { - syslog (LOG_ERR, "read: %m"); - exit (1); - } - if (len != sizeof(KRB5_SENDAUTH_VERSION) - || memcmp (buf, KRB5_SENDAUTH_VERSION, len) != 0) { - syslog (LOG_ERR, "bad sendauth version: %.8s", buf); - exit (1); - } - - krb5_make_context (kc); - krb5_openlog(CONTEXT(kc), "kxd", &K5DATA(kc)->log); - krb5_set_warn_dest(CONTEXT(kc), K5DATA(kc)->log); - - ret = krb5_sock_to_principal (CONTEXT(kc), sock, "host", - KRB5_NT_SRV_HST, &server); - if (ret) { - ksyslog (CONTEXT(kc), ret, "krb5_sock_to_principal"); - exit (1); - } - - ret = krb5_recvauth (CONTEXT(kc), - &auth_context, - &sock, - KX_VERSION, - server, - KRB5_RECVAUTH_IGNORE_VERSION, - NULL, - &ticket); - krb5_free_principal (CONTEXT(kc), server); - if (ret) { - ksyslog (CONTEXT(kc), ret, "krb5_recvauth"); - exit (1); - } - - ret = krb5_auth_con_getkey (CONTEXT(kc), auth_context, &K5DATA(kc)->keyblock); - if (ret) { - ksyslog (CONTEXT(kc), ret, "krb5_auth_con_getkey"); - exit (1); - } - - ret = krb5_crypto_init (CONTEXT(kc), K5DATA(kc)->keyblock, 0, &K5DATA(kc)->crypto); - if (ret) { - ksyslog (CONTEXT(kc), ret, "krb5_crypto_init"); - exit (1); - } - - K5DATA(kc)->client = ticket->client; - ticket->client = NULL; - krb5_free_ticket (CONTEXT(kc), ticket); - - krb5_auth_con_free(CONTEXT(kc), auth_context); - - return 0; -} - -#endif /* KRB5 */ diff --git a/kerberosV/src/appl/kx/kx.1 b/kerberosV/src/appl/kx/kx.1 deleted file mode 100644 index d6700758a93..00000000000 --- a/kerberosV/src/appl/kx/kx.1 +++ /dev/null @@ -1,92 +0,0 @@ -.\" Copyright (c) 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: kx.1,v 1.3 2013/06/17 19:11:36 robert Exp $ -.\" -.Dd September 27, 1996 -.Dt KX 1 -.Os KTH-KRB -.Sh NAME -.Nm kx -.Nd securely forward X conections -.Sh SYNOPSIS -.Ar kx -.Op Fl l Ar username -.Op Fl k -.Op Fl d -.Op Fl t -.Op Fl p Ar port -.Op Fl P -.Ar host -.Sh DESCRIPTION -The -.Nm -program forwards an X connection from a remote client to a local screen -through an authenticated and encrypted stream. Options supported by -.Nm kx : -.Bl -tag -width Ds -.It Fl l -Log in on the remote the host as user -.Ar username . -.It Fl k -Do not enable keep-alives on the TCP connections. -.It Fl d -Do not fork. This is mainly useful for debugging. -.It Fl t -Listen not only on a UNIX-domain socket but on a TCP socket as well. -.It Fl p -Use the port -.Ar port . -.It Fl P -Force passive mode. -.El -.Pp -This program is used by -.Nm rxtelnet -and -.Nm rxterm -and you should not need to run it directly. -.Pp -It connects to a -.Nm kxd -on the host -.Ar host -and then will relay the traffic from the remote X clients to the local -server. When started, it prints the display and Xauthority-file to be -used on host -.Ar host -and then goes to the background, waiting for connections from the -remote -.Nm kxd . -.Sh SEE ALSO -.Xr rxtelnet 1 , -.Xr rxterm 1 , -.Xr kxd 8 diff --git a/kerberosV/src/appl/kx/kx.c b/kerberosV/src/appl/kx/kx.c deleted file mode 100644 index 1d6623e7143..00000000000 --- a/kerberosV/src/appl/kx/kx.c +++ /dev/null @@ -1,711 +0,0 @@ -/* - * Copyright (c) 1995-2003 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 "kx.h" - -RCSID("$Id: kx.c,v 1.5 2013/06/17 19:11:36 robert Exp $"); - -static int nchild; -static int donep; - -/* - * Signal handler that justs waits for the children when they die. - */ - -static RETSIGTYPE -childhandler (int sig) -{ - pid_t pid; - int status; - - do { - pid = waitpid (-1, &status, WNOHANG|WUNTRACED); - if (pid > 0 && (WIFEXITED(status) || WIFSIGNALED(status))) - if (--nchild == 0 && donep) - exit (0); - } while(pid > 0); - signal (SIGCHLD, childhandler); - SIGRETURN(0); -} - -/* - * Handler for SIGUSR1. - * This signal means that we should wait until there are no children - * left and then exit. - */ - -static RETSIGTYPE -usr1handler (int sig) -{ - donep = 1; - - SIGRETURN(0); -} - -/* - * Almost the same as for SIGUSR1, except we should exit immediately - * if there are no active children. - */ - -static RETSIGTYPE -usr2handler (int sig) -{ - donep = 1; - if (nchild == 0) - exit (0); - - SIGRETURN(0); -} - -/* - * Establish authenticated connection. Return socket or -1. - */ - -static int -connect_host (kx_context *kc) -{ - struct addrinfo *ai, *a; - struct addrinfo hints; - int error; - char portstr[NI_MAXSERV]; - socklen_t addrlen; - int s = -1; - struct sockaddr_storage thisaddr_ss; - struct sockaddr *thisaddr = (struct sockaddr *)&thisaddr_ss; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - snprintf (portstr, sizeof(portstr), "%u", ntohs(kc->port)); - - error = getaddrinfo (kc->host, portstr, &hints, &ai); - if (error) { - warnx ("%s: %s", kc->host, gai_strerror(error)); - return -1; - } - - for (a = ai; a != NULL; a = a->ai_next) { - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - warn ("connect(%s)", kc->host); - close (s); - continue; - } - break; - } - - if (a == NULL) { - freeaddrinfo (ai); - return -1; - } - - addrlen = sizeof(thisaddr_ss); - if (getsockname (s, thisaddr, &addrlen) < 0 || - addrlen != a->ai_addrlen) - err(1, "getsockname(%s)", kc->host); - memcpy (&kc->__ss_this, thisaddr, sizeof(kc->__ss_this)); - kc->thisaddr_len = addrlen; - memcpy (&kc->__ss_that, a->ai_addr, sizeof(kc->__ss_that)); - kc->thataddr_len = a->ai_addrlen; - freeaddrinfo (ai); - if ((*kc->authenticate)(kc, s)) - return -1; - return s; -} - -/* - * Get rid of the cookie that we were sent and get the correct one - * from our own cookie file instead and then just copy data in both - * directions. - */ - -static int -passive_session (int xserver, int fd, kx_context *kc) -{ - if (replace_cookie (xserver, fd, XauFileName(), 1)) - return 1; - else - return copy_encrypted (kc, xserver, fd); -} - -static int -active_session (int xserver, int fd, kx_context *kc) -{ - if (verify_and_remove_cookies (xserver, fd, 1)) - return 1; - else - return copy_encrypted (kc, xserver, fd); -} - -/* - * fork (unless debugp) and print the output that will be used by the - * script to capture the display, xauth cookie and pid. - */ - -static void -status_output (int debugp) -{ - if(debugp) - printf ("%u\t%s\t%s\n", (unsigned)getpid(), display, xauthfile); - else { - pid_t pid; - - pid = fork(); - if (pid < 0) { - err(1, "fork"); - } else if (pid > 0) { - printf ("%u\t%s\t%s\n", (unsigned)pid, display, xauthfile); - exit (0); - } else { - fclose(stdout); - } - } -} - -/* - * Obtain an authenticated connection on `kc'. Send a kx message - * saying we are `kc->user' and want to use passive mode. Wait for - * answer on that connection and fork of a child for every new - * connection we have to make. - */ - -static int -doit_passive (kx_context *kc) -{ - int otherside; - u_char msg[1024], *p; - int len; - uint32_t tmp; - const char *host = kc->host; - - otherside = connect_host (kc); - - if (otherside < 0) - return 1; -#if defined(SO_KEEPALIVE) && defined(HAVE_SETSOCKOPT) - if (kc->keepalive_flag) { - int one = 1; - - setsockopt (otherside, SOL_SOCKET, SO_KEEPALIVE, (void *)&one, - sizeof(one)); - } -#endif - - p = msg; - *p++ = INIT; - len = strlen(kc->user); - p += kx_put_int (len, p, sizeof(msg) - 1, 4); - memcpy(p, kc->user, len); - p += len; - *p++ = PASSIVE | (kc->keepalive_flag ? KEEP_ALIVE : 0); - if (kx_write (kc, otherside, msg, p - msg) != p - msg) - err (1, "write to %s", host); - len = kx_read (kc, otherside, msg, sizeof(msg)); - if (len <= 0) - errx (1, - "error reading initial message from %s: " - "this probably means it's using an old version.", - host); - p = (u_char *)msg; - if (*p == ERROR) { - p++; - p += kx_get_int (p, &tmp, 4, 0); - errx (1, "%s: %.*s", host, (int)tmp, p); - } else if (*p != ACK) { - errx (1, "%s: strange msg %d", host, *p); - } else - p++; - p += kx_get_int (p, &tmp, 4, 0); - memcpy(display, p, tmp); - display[tmp] = '\0'; - p += tmp; - - p += kx_get_int (p, &tmp, 4, 0); - memcpy(xauthfile, p, tmp); - xauthfile[tmp] = '\0'; - p += tmp; - - status_output (kc->debug_flag); - for (;;) { - pid_t child; - - len = kx_read (kc, otherside, msg, sizeof(msg)); - if (len < 0) - err (1, "read from %s", host); - else if (len == 0) - return 0; - - p = (u_char *)msg; - if (*p == ERROR) { - p++; - p += kx_get_int (p, &tmp, 4, 0); - errx (1, "%s: %.*s", host, (int)tmp, p); - } else if(*p != NEW_CONN) { - errx (1, "%s: strange msg %d", host, *p); - } else { - p++; - p += kx_get_int (p, &tmp, 4, 0); - } - - ++nchild; - child = fork (); - if (child < 0) { - warn("fork"); - continue; - } else if (child == 0) { - int fd; - int xserver; - - close (otherside); - - socket_set_port(kc->thataddr, htons(tmp)); - - fd = socket (kc->thataddr->sa_family, SOCK_STREAM, 0); - if (fd < 0) - err(1, "socket"); -#if defined(TCP_NODELAY) && defined(HAVE_SETSOCKOPT) - { - int one = 1; - - setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, (void *)&one, - sizeof(one)); - } -#endif -#if defined(SO_KEEPALIVE) && defined(HAVE_SETSOCKOPT) - if (kc->keepalive_flag) { - int one = 1; - - setsockopt (fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&one, - sizeof(one)); - } -#endif - - if (connect (fd, kc->thataddr, kc->thataddr_len) < 0) - err(1, "connect(%s)", host); - { - int d = 0; - char *s; - - s = getenv ("DISPLAY"); - if (s != NULL) { - s = strchr (s, ':'); - if (s != NULL) - d = atoi (s + 1); - } - - xserver = connect_local_xsocket (d); - if (xserver < 0) - return 1; - } - return passive_session (xserver, fd, kc); - } else { - } - } -} - -/* - * Allocate a local pseudo-xserver and wait for connections - */ - -static int -doit_active (kx_context *kc) -{ - int otherside; - int nsockets; - struct x_socket *sockets; - u_char msg[1024], *p; - int len; - int tmp, tmp2; - char *str; - int i; - size_t rem; - uint32_t other_port; - int error; - const char *host = kc->host; - - otherside = connect_host (kc); - if (otherside < 0) - return 1; -#if defined(SO_KEEPALIVE) && defined(HAVE_SETSOCKOPT) - if (kc->keepalive_flag) { - int one = 1; - - setsockopt (otherside, SOL_SOCKET, SO_KEEPALIVE, (void *)&one, - sizeof(one)); - } -#endif - p = msg; - rem = sizeof(msg); - *p++ = INIT; - --rem; - len = strlen(kc->user); - tmp = kx_put_int (len, p, rem, 4); - if (tmp < 0) - return 1; - p += tmp; - rem -= tmp; - memcpy(p, kc->user, len); - p += len; - rem -= len; - *p++ = (kc->keepalive_flag ? KEEP_ALIVE : 0); - --rem; - - str = getenv("DISPLAY"); - if (str == NULL || (str = strchr(str, ':')) == NULL) - str = ":0"; - len = strlen (str); - tmp = kx_put_int (len, p, rem, 4); - if (tmp < 0) - return 1; - rem -= tmp; - p += tmp; - memcpy (p, str, len); - p += len; - rem -= len; - - str = getenv("XAUTHORITY"); - if (str == NULL) - str = ""; - len = strlen (str); - tmp = kx_put_int (len, p, rem, 4); - if (tmp < 0) - return 1; - p += len; - rem -= len; - memcpy (p, str, len); - p += len; - rem -= len; - - if (kx_write (kc, otherside, msg, p - msg) != p - msg) - err (1, "write to %s", host); - - len = kx_read (kc, otherside, msg, sizeof(msg)); - if (len < 0) - err (1, "read from %s", host); - p = (u_char *)msg; - if (*p == ERROR) { - uint32_t u32; - - p++; - p += kx_get_int (p, &u32, 4, 0); - errx (1, "%s: %.*s", host, (int)u32, p); - } else if (*p != ACK) { - errx (1, "%s: strange msg %d", host, *p); - } - - tmp2 = get_xsockets (&nsockets, &sockets, kc->tcp_flag); - if (tmp2 < 0) - errx(1, "Failed to open sockets"); - display_num = tmp2; - if (kc->tcp_flag) - snprintf (display, display_size, "localhost:%u", display_num); - else - snprintf (display, display_size, ":%u", display_num); - error = create_and_write_cookie (xauthfile, xauthfile_size, - cookie, cookie_len); - if (error) - errx(1, "failed creating cookie file: %s", strerror(error)); - - status_output (kc->debug_flag); - for (;;) { - fd_set fdset; - pid_t child; - int fd, thisfd = -1; - socklen_t zero = 0; - - FD_ZERO(&fdset); - for (i = 0; i < nsockets; ++i) { - if (sockets[i].fd >= FD_SETSIZE) - errx (1, "fd too large"); - FD_SET(sockets[i].fd, &fdset); - } - if (select(FD_SETSIZE, &fdset, NULL, NULL, NULL) <= 0) - continue; - for (i = 0; i < nsockets; ++i) - if (FD_ISSET(sockets[i].fd, &fdset)) { - thisfd = sockets[i].fd; - break; - } - fd = accept (thisfd, NULL, &zero); - if (fd < 0) { - if (errno == EINTR) - continue; - else - err(1, "accept"); - } - - p = msg; - *p++ = NEW_CONN; - if (kx_write (kc, otherside, msg, p - msg) != p - msg) - err (1, "write to %s", host); - len = kx_read (kc, otherside, msg, sizeof(msg)); - if (len < 0) - err (1, "read from %s", host); - p = (u_char *)msg; - if (*p == ERROR) { - uint32_t val; - - p++; - p += kx_get_int (p, &val, 4, 0); - errx (1, "%s: %.*s", host, (int)val, p); - } else if (*p != NEW_CONN) { - errx (1, "%s: strange msg %d", host, *p); - } else { - p++; - p += kx_get_int (p, &other_port, 4, 0); - } - - ++nchild; - child = fork (); - if (child < 0) { - warn("fork"); - continue; - } else if (child == 0) { - int s; - - for (i = 0; i < nsockets; ++i) - close (sockets[i].fd); - - close (otherside); - - socket_set_port(kc->thataddr, htons(tmp)); - - s = socket (kc->thataddr->sa_family, SOCK_STREAM, 0); - if (s < 0) - err(1, "socket"); -#if defined(TCP_NODELAY) && defined(HAVE_SETSOCKOPT) - { - int one = 1; - - setsockopt (s, IPPROTO_TCP, TCP_NODELAY, (void *)&one, - sizeof(one)); - } -#endif -#if defined(SO_KEEPALIVE) && defined(HAVE_SETSOCKOPT) - if (kc->keepalive_flag) { - int one = 1; - - setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (void *)&one, - sizeof(one)); - } -#endif - - if (connect (s, kc->thataddr, kc->thataddr_len) < 0) - err(1, "connect"); - - return active_session (fd, s, kc); - } else { - close (fd); - } - } -} - -/* - * Should we interpret `disp' as this being a passive call? - */ - -static int -check_for_passive (const char *disp) -{ - char local_hostname[MaxHostNameLen]; - - gethostname (local_hostname, sizeof(local_hostname)); - - return disp != NULL && - (*disp == ':' - || strncmp(disp, "unix", 4) == 0 - || strncmp(disp, "localhost", 9) == 0 - || strncmp(disp, local_hostname, strlen(local_hostname)) == 0); -} - -/* - * Set up signal handlers and then call the functions. - */ - -static int -doit (kx_context *kc, int passive_flag) -{ - signal (SIGCHLD, childhandler); - signal (SIGUSR1, usr1handler); - signal (SIGUSR2, usr2handler); - if (passive_flag) - return doit_passive (kc); - else - return doit_active (kc); -} - -#ifdef KRB5 - -/* - * Start a v5-authenticatated kx connection. - */ - -static int -doit_v5 (const char *host, int port, const char *user, - int passive_flag, int debug_flag, int keepalive_flag, int tcp_flag) -{ - int ret; - kx_context context; - - krb5_make_context (&context); - context_set (&context, - host, user, port, debug_flag, keepalive_flag, tcp_flag); - - ret = doit (&context, passive_flag); - context_destroy (&context); - return ret; -} -#endif /* KRB5 */ - -/* - * Variables set from the arguments - */ - -#ifdef KRB5 -static int use_v5 = -1; -#endif -static char *port_str = NULL; -static const char *user = NULL; -static int tcp_flag = 0; -static int passive_flag = 0; -static int keepalive_flag = 1; -static int debug_flag = 0; -static int version_flag = 0; -static int help_flag = 0; - -struct getargs args[] = { -#ifdef KRB5 - { "krb5", '5', arg_flag, &use_v5, "Use Kerberos V5", - NULL }, -#endif - { "port", 'p', arg_string, &port_str, "Use this port", - "number-of-service" }, - { "user", 'l', arg_string, &user, "Run as this user", - NULL }, - { "tcp", 't', arg_flag, &tcp_flag, - "Use a TCP connection for X11" }, - { "passive", 'P', arg_flag, &passive_flag, - "Force a passive connection" }, - { "keepalive", 'k', arg_negative_flag, &keepalive_flag, - "disable keep-alives" }, - { "debug", 'd', arg_flag, &debug_flag, - "Enable debug information" }, - { "version", 0, arg_flag, &version_flag, "Print version", - NULL }, - { "help", 0, arg_flag, &help_flag, NULL, - NULL } -}; - -static void -usage(int ret) -{ - arg_printusage (args, - sizeof(args) / sizeof(args[0]), - NULL, - "host"); - exit (ret); -} - -/* - * kx - forward an x-connection over a kerberos-encrypted channel. - */ - -int -main(int argc, char **argv) -{ - int port = 0; - int optidx = 0; - int ret = 1; - char *host = NULL; - - setprogname (argv[0]); - - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, - &optidx)) - usage (1); - - if (help_flag) - usage (0); - - if (version_flag) { - print_version (NULL); - return 0; - } - - if (optidx != argc - 1) - usage (1); - - host = argv[optidx]; - - 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 (user == NULL) { - user = get_default_username (); - if (user == NULL) - errx (1, "who are you?"); - } - - if (!passive_flag) - passive_flag = check_for_passive (getenv("DISPLAY")); - -#if defined(HAVE_KERNEL_ENABLE_DEBUG) - if (krb_debug_flag) - krb_enable_debug (); -#endif - -#ifdef KRB5 - if (ret && use_v5) { - if (port == 0) - port = krb5_getportbyname(NULL, "kx", "tcp", KX_PORT); - ret = doit_v5 (host, port, user, - passive_flag, debug_flag, keepalive_flag, tcp_flag); - } -#endif - return ret; -} diff --git a/kerberosV/src/appl/kx/kx.cat1 b/kerberosV/src/appl/kx/kx.cat1 deleted file mode 100644 index 7a03ee512da..00000000000 --- a/kerberosV/src/appl/kx/kx.cat1 +++ /dev/null @@ -1,39 +0,0 @@ - -KX(1) BSD General Commands Manual KX(1) - -NNAAMMEE - kkxx -- securely forward X conections - -SSYYNNOOPPSSIISS - _k_x [--ll _u_s_e_r_n_a_m_e] [--kk] [--dd] [--tt] [--pp _p_o_r_t] [--PP] _h_o_s_t - -DDEESSCCRRIIPPTTIIOONN - The kkxx program forwards an X connection from a remote client to a local - screen through an authenticated and encrypted stream. Options supported - by kkxx: - - --ll Log in on the remote the host as user _u_s_e_r_n_a_m_e. - - --kk Do not enable keep-alives on the TCP connections. - - --dd Do not fork. This is mainly useful for debugging. - - --tt Listen not only on a UNIX-domain socket but on a TCP socket as - well. - - --pp Use the port _p_o_r_t. - - --PP Force passive mode. - - This program is used by rrxxtteellnneett and rrxxtteerrmm and you should not need to - run it directly. - - It connects to a kkxxdd on the host _h_o_s_t and then will relay the traffic - from the remote X clients to the local server. When started, it prints - the display and Xauthority-file to be used on host _h_o_s_t and then goes to - the background, waiting for connections from the remote kkxxdd. - -SSEEEE AALLSSOO - rxtelnet(1), rxterm(1), kxd(8) - -KTH-KRB September 27, 1996 KTH-KRB diff --git a/kerberosV/src/appl/kx/kx.h b/kerberosV/src/appl/kx/kx.h deleted file mode 100644 index 857dfb43ccf..00000000000 --- a/kerberosV/src/appl/kx/kx.h +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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: kx.h,v 1.3 2013/06/17 19:11:36 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif /* HAVE_CONFIG_H */ - -#include -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_PWD_H -#include -#endif -#ifdef HAVE_GRP_H -#include -#endif -#ifdef HAVE_SYSLOG_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_TCP_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_SYS_UN_H -#include -#endif -#include -#include -#include - -#ifdef HAVE_SYS_STREAM_H -#include -#endif -#ifdef HAVE_SYS_STROPTS_H -#include -#endif - -/* defined by aix's sys/stream.h and again by arpa/nameser.h */ - -#undef NOERROR - -/* as far as we know, this is only used with later versions of Slowlaris */ -#if SunOS >= 50 && defined(HAVE_SYS_STROPTS_H) && defined(HAVE_FATTACH) && defined(I_PUSH) -#define MAY_HAVE_X11_PIPES -#endif - -#ifdef SOCKS -#include -/* This doesn't belong here. */ -struct tm *localtime(const time_t *); -struct hostent *gethostbyname(const char *); -#endif - -#ifdef KRB5 -#include -#endif - -#include -#include -#include - -struct x_socket { - char *pathname; - int fd; - enum { - LISTENP = 0x80, - TCP = LISTENP | 1, - UNIX_SOCKET = LISTENP | 2, - STREAM_PIPE = 3 - } flags; -}; - -extern char x_socket[]; -extern uint32_t display_num; -extern char display[]; -extern int display_size; -extern char xauthfile[]; -extern int xauthfile_size; -extern u_char cookie[]; -extern size_t cookie_len; - -int get_xsockets (int *number, struct x_socket **sockets, int tcpp); -int chown_xsockets (int n, struct x_socket *sockets, uid_t uid, gid_t gid); - -int connect_local_xsocket (unsigned dnr); -int create_and_write_cookie (char *file, - size_t file_size, - u_char *cookie_buf, - size_t sz); -int verify_and_remove_cookies (int fd, int sock, int cookiesp); -int replace_cookie(int xserver, int fd, char *filename, int cookiesp); - -int suspicious_address (int sock, struct sockaddr *addr); - -#define KX_PORT 2111 - -#define KX_OLD_VERSION "KXSERV.1" -#define KX_VERSION "KXSERV.2" - -#define COOKIE_TYPE "MIT-MAGIC-COOKIE-1" - -enum { INIT = 0, ACK = 1, NEW_CONN = 2, ERROR = 3 }; - -enum kx_flags { PASSIVE = 1, KEEP_ALIVE = 2 }; - -typedef enum kx_flags kx_flags; - -struct kx_context { - int (*authenticate)(struct kx_context *kc, int s); - int (*userok)(struct kx_context *kc, char *user); - ssize_t (*read)(struct kx_context *kc, - int fd, void *buf, size_t len); - ssize_t (*write)(struct kx_context *kc, - int fd, const void *buf, size_t len); - int (*copy_encrypted)(struct kx_context *kc, - int fd1, int fd2); - void (*destroy)(struct kx_context *kc); - const char *host; - const char *user; - int port; - int debug_flag; - int keepalive_flag; - int tcp_flag; - struct sockaddr_storage __ss_this; - struct sockaddr_storage __ss_that; - struct sockaddr *thisaddr; - struct sockaddr *thataddr; - socklen_t thisaddr_len, thataddr_len; - void *data; -}; - -typedef struct kx_context kx_context; - -void -context_set (kx_context *kc, const char *host, const char *user, int port, - int debug_flag, int keepalive_flag, int tcp_flag); - -void -context_destroy (kx_context *kc); - -int -context_authenticate (kx_context *kc, int s); - -int -context_userok (kx_context *kc, char *user); - -ssize_t -kx_read (kx_context *kc, int fd, void *buf, size_t len); - -ssize_t -kx_write (kx_context *kc, int fd, const void *buf, size_t len); - -int -copy_encrypted (kx_context *kc, int fd1, int fd2); - -#ifdef KRB5 - -void -krb5_make_context (kx_context *c); - -int -recv_v5_auth (kx_context *kc, int sock, u_char *buf); - -#endif - -void -fatal (kx_context *kc, int fd, char *format, ...) -#ifdef __GNUC__ -__attribute__ ((format (printf, 3, 4))) -#endif -; - -int -kx_get_int(void *f, uint32_t *to, int size, int lsb); - -int -kx_put_int(uint32_t from, void *to, size_t rem, int size); diff --git a/kerberosV/src/appl/kx/kxd.8 b/kerberosV/src/appl/kx/kxd.8 deleted file mode 100644 index 374c03f4f47..00000000000 --- a/kerberosV/src/appl/kx/kxd.8 +++ /dev/null @@ -1,83 +0,0 @@ -.\" Copyright (c) 1996 - 1997, 2001 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: kxd.8,v 1.3 2013/06/17 19:11:36 robert Exp $ -.\" -.Dd September 27, 1996 -.Dt KXD 8 -.Os KTH-KRB -.Sh NAME -.Nm kxd -.Nd securely forward X conections -.Sh SYNOPSIS -.Ar kxd -.Op Fl t -.Op Fl i -.Op Fl p Ar port -.Sh DESCRIPTION -This is the daemon for -.Nm kx . -.Pp -Options supported by -.Nm kxd : -.Bl -tag -width Ds -.It Fl t -TCP. Normally -.Nm kxd -will only listen for X connections on a UNIX socket, but some machines -(for example, Cray) have X libraries that are not able to use UNIX -sockets and thus you need to use TCP to talk to the pseudo-xserver -created by -.Nm kxd . -This option decreases the security significantly and should only be -used when it is necessary and you have considered the consequences of -doing so. -.It Fl i -Interactive. Do not expect to be started by -.Nm inetd , -but allocate and listen to the socket yourself. Handy for testing -and debugging. -.It Fl p -Port. Listen on the port -.Ar port . -Only usable with -.Fl i . -.El -.Sh EXAMPLES -Put the following in -.Pa /etc/inetd.conf : -.Bd -literal -kx stream tcp nowait root /usr/athena/libexec/kxd kxd -.Ed -.Sh SEE ALSO -.Xr kx 1 , -.Xr rxtelnet 1 , -.Xr rxterm 1 diff --git a/kerberosV/src/appl/kx/kxd.c b/kerberosV/src/appl/kx/kxd.c deleted file mode 100644 index bcb3a11ff38..00000000000 --- a/kerberosV/src/appl/kx/kxd.c +++ /dev/null @@ -1,779 +0,0 @@ -/* - * Copyright (c) 1995 - 2003 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 "kx.h" - -RCSID("$Id: kxd.c,v 1.5 2013/06/17 19:11:36 robert Exp $"); - -static pid_t wait_on_pid = -1; -static int done = 0; - -/* - * Signal handler that justs waits for the children when they die. - */ - -static RETSIGTYPE -childhandler (int sig) -{ - pid_t pid; - int status; - - do { - pid = waitpid (-1, &status, WNOHANG|WUNTRACED); - if (pid > 0 && pid == wait_on_pid) - done = 1; - } while(pid > 0); - signal (SIGCHLD, childhandler); - SIGRETURN(0); -} - -/* - * Print the error message `format' and `...' on fd and die. - */ - -void -fatal (kx_context *kc, int fd, char *format, ...) -{ - u_char msg[1024]; - u_char *p; - va_list args; - int len; - - va_start(args, format); - p = msg; - *p++ = ERROR; - vsnprintf ((char *)p + 4, sizeof(msg) - 5, format, args); - syslog (LOG_ERR, "%s", (char *)p + 4); - len = strlen ((char *)p + 4); - p += kx_put_int (len, p, 4, 4); - p += len; - kx_write (kc, fd, msg, p - msg); - va_end(args); - exit (1); -} - -/* - * Remove all sockets and cookie files. - */ - -static void -cleanup(int nsockets, struct x_socket *sockets) -{ - int i; - - if(xauthfile[0]) - unlink(xauthfile); - for (i = 0; i < nsockets; ++i) { - if (sockets[i].pathname != NULL) { - unlink (sockets[i].pathname); - free (sockets[i].pathname); - } - } - free(sockets); -} - -/* - * Prepare to receive a connection on `sock'. - */ - -static int -recv_conn (int sock, kx_context *kc, - int *dispnr, int *nsockets, struct x_socket **sockets, - int tcp_flag) -{ - u_char msg[1024], *p; - char user[256]; - socklen_t addrlen; - struct passwd *passwd; - char remotehost[MaxHostNameLen]; - char remoteaddr[INET6_ADDRSTRLEN]; - int ret = 1; - int flags; - int len; - uint32_t tmp32; - - memset(kc, 0, sizeof(*kc)); - *nsockets = 0; - *sockets = NULL; - *dispnr = 0; - - addrlen = sizeof(kc->__ss_this); - kc->thisaddr = (struct sockaddr*)&kc->__ss_this; - if (getsockname (sock, kc->thisaddr, &addrlen) < 0) { - syslog (LOG_ERR, "getsockname: %m"); - exit (1); - } - kc->thisaddr_len = addrlen; - addrlen = sizeof(kc->__ss_that); - kc->thataddr = (struct sockaddr*)&kc->__ss_that; - if (getpeername (sock, kc->thataddr, &addrlen) < 0) { - syslog (LOG_ERR, "getpeername: %m"); - exit (1); - } - kc->thataddr_len = addrlen; - - getnameinfo_verified (kc->thataddr, - kc->thataddr_len, - remotehost, sizeof(remotehost), - NULL, 0, 0); - - if (net_read (sock, msg, 4) != 4) { - syslog (LOG_ERR, "read: %m"); - exit (1); - } - -#ifdef KRB5 - if (ret && recv_v5_auth (kc, sock, msg) == 0) - ret = 0; -#endif - if (ret) { - syslog (LOG_ERR, "unrecognized auth protocol: %x %x %x %x", - msg[0], msg[1], msg[2], msg[3]); - exit (1); - } - - len = kx_read (kc, sock, msg, sizeof(msg)); - if (len < 0) { - syslog (LOG_ERR, "kx_read failed"); - exit (1); - } - p = (u_char *)msg; - if (*p != INIT) - fatal(kc, sock, "Bad message"); - p++; - if ((p - msg) < sizeof(msg)) - fatal(kc, sock, "user"); - - p += kx_get_int (p, &tmp32, 4, 0); - if (tmp32 >= sizeof(user) - 1) - fatal(kc, sock, "user name too long"); - if ((p - msg) + tmp32 >= sizeof(msg)) - fatal(kc, sock, "user too long"); - memcpy (user, p, tmp32); - p += tmp32; - user[tmp32] = '\0'; - - passwd = k_getpwnam (user); - if (passwd == NULL) - fatal (kc, sock, "cannot find uid for %s", user); - - if (context_userok (kc, user) != 0) - fatal (kc, sock, "%s not allowed to login as %s", - kc->user, user); - - if ((p - msg) >= sizeof(msg)) - fatal(kc, sock, "user too long"); - - flags = *p++; - - if (flags & PASSIVE) { - pid_t pid; - int tmp; - - tmp = get_xsockets (nsockets, sockets, tcp_flag); - if (tmp < 0) { - fatal (kc, sock, "Cannot create X socket(s): %s", - strerror(errno)); - } - *dispnr = tmp; - - if (chown_xsockets (*nsockets, *sockets, - passwd->pw_uid, passwd->pw_gid)) { - cleanup (*nsockets, *sockets); - fatal (kc, sock, "Cannot chown sockets: %s", - strerror(errno)); - } - - pid = fork(); - if (pid == -1) { - cleanup (*nsockets, *sockets); - fatal (kc, sock, "fork: %s", strerror(errno)); - } else if (pid != 0) { - wait_on_pid = pid; - while (!done) - pause (); - cleanup (*nsockets, *sockets); - exit (0); - } - } - - if (setgid (passwd->pw_gid) || - initgroups(passwd->pw_name, passwd->pw_gid) || -#ifdef HAVE_GETUDBNAM /* XXX this happens on crays */ - setjob(passwd->pw_uid, 0) == -1 || -#endif - setuid(passwd->pw_uid)) { - syslog(LOG_ERR, "setting uid/groups: %m"); - fatal (kc, sock, "cannot set uid"); - } - - ret = getnameinfo(kc->thataddr, kc->thataddr_len, - remoteaddr, sizeof(remoteaddr), - NULL, 0, NI_NUMERICHOST); - if (ret != 0) - fatal (kc, sock, "getnameinfo failed: %s", gai_strerror(ret)); - - syslog (LOG_INFO, "from %s(%s): %s -> %s", - remotehost, remoteaddr, - kc->user, user); - umask(077); - if (!(flags & PASSIVE)) { - p += kx_get_int (p, &tmp32, 4, 0); - if (tmp32 > display_size) - fatal(kc, sock, "display too large"); - if ((p - msg) + tmp32 + 8 >= sizeof(msg)) - fatal(kc, sock, "user too long"); - memcpy (display, p, tmp32); - display[tmp32] = '\0'; - p += tmp32; - p += kx_get_int (p, &tmp32, 4, 0); - len = min(tmp32, xauthfile_size); - memcpy (xauthfile, p, len); - xauthfile[len] = '\0'; - } -#if defined(SO_KEEPALIVE) && defined(HAVE_SETSOCKOPT) - if (flags & KEEP_ALIVE) { - int one = 1; - - setsockopt (sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&one, - sizeof(one)); - } -#endif - return flags; -} - -/* - * - */ - -static int -passive_session (kx_context *kc, int fd, int sock, int cookiesp) -{ - if (verify_and_remove_cookies (fd, sock, cookiesp)) - return 1; - else - return copy_encrypted (kc, fd, sock); -} - -/* - * - */ - -static int -active_session (kx_context *kc, int fd, int sock, int cookiesp) -{ - fd = connect_local_xsocket(0); - - if (replace_cookie (fd, sock, xauthfile, cookiesp)) - return 1; - else - return copy_encrypted (kc, fd, sock); -} - -/* - * Handle a new connection. - */ - -static int -doit_conn (kx_context *kc, - int fd, int meta_sock, int flags, int cookiesp) -{ - int sock, sock2, port; - struct sockaddr_storage __ss_addr; - struct sockaddr *addr = (struct sockaddr*)&__ss_addr; - struct sockaddr_storage __ss_thisaddr; - struct sockaddr *thisaddr = (struct sockaddr*)&__ss_thisaddr; - socklen_t addrlen; - u_char msg[1024], *p; - - sock = socket (kc->thisaddr->sa_family, SOCK_STREAM, 0); - if (sock < 0) { - syslog (LOG_ERR, "socket: %m"); - return 1; - } -#if defined(TCP_NODELAY) && defined(HAVE_SETSOCKOPT) - { - int one = 1; - setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, (void *)&one, sizeof(one)); - } -#endif -#if defined(SO_KEEPALIVE) && defined(HAVE_SETSOCKOPT) - if (flags & KEEP_ALIVE) { - int one = 1; - - setsockopt (sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&one, - sizeof(one)); - } -#endif - memset (&__ss_addr, 0, sizeof(__ss_addr)); - addr->sa_family = kc->thisaddr->sa_family; - if (kc->thisaddr_len > sizeof(__ss_addr)) { - syslog(LOG_ERR, "error in af"); - return 1; - } - if (bind (sock, addr, kc->thisaddr_len) < 0) { - syslog (LOG_ERR, "bind: %m"); - return 1; - } - addrlen = sizeof(__ss_addr); - if (getsockname (sock, addr, &addrlen) < 0) { - syslog (LOG_ERR, "getsockname: %m"); - return 1; - } - if (listen (sock, SOMAXCONN) < 0) { - syslog (LOG_ERR, "listen: %m"); - return 1; - } - port = socket_get_port(addr); - - p = msg; - *p++ = NEW_CONN; - p += kx_put_int (ntohs(port), p, 4, 4); - - if (kx_write (kc, meta_sock, msg, p - msg) < 0) { - syslog (LOG_ERR, "write: %m"); - return 1; - } - - addrlen = sizeof(__ss_thisaddr); - sock2 = accept (sock, thisaddr, &addrlen); - if (sock2 < 0) { - syslog (LOG_ERR, "accept: %m"); - return 1; - } - close (sock); - close (meta_sock); - - if (flags & PASSIVE) - return passive_session (kc, fd, sock2, cookiesp); - else - return active_session (kc, fd, sock2, cookiesp); -} - -/* - * Is the current user the owner of the console? - */ - -static void -check_user_console (kx_context *kc, int fd) -{ - struct stat sb; - - if (stat ("/dev/console", &sb) < 0) - fatal (kc, fd, "Cannot stat /dev/console: %s", strerror(errno)); - if (getuid() != sb.st_uid) - fatal (kc, fd, "Permission denied"); -} - -/* close down the new connection with a reasonable error message */ -static void -close_connection(int fd, const char *message) -{ - char buf[264]; /* max message */ - char *p; - int lsb = 0; - size_t mlen; - - mlen = strlen(message); - if(mlen > 255) - mlen = 255; - - /* read first part of connection packet, to get byte order */ - if(read(fd, buf, 6) != 6) { - close(fd); - return; - } - if(buf[0] == 0x6c) - lsb++; - p = buf; - *p++ = 0; /* failed */ - *p++ = mlen; /* length of message */ - p += 4; /* skip protocol version */ - p += 2; /* skip additional length */ - memcpy(p, message, mlen); /* copy message */ - p += mlen; - while((p - buf) % 4) /* pad to multiple of 4 bytes */ - *p++ = 0; - - /* now fill in length of additional data */ - if(lsb) { - buf[6] = (p - buf - 8) / 4; - buf[7] = 0; - }else{ - buf[6] = 0; - buf[7] = (p - buf - 8) / 4; - } - write(fd, buf, p - buf); - close(fd); -} - - -/* - * Handle a passive session on `sock' - */ - -static int -doit_passive (kx_context *kc, - int sock, - int flags, - int dispnr, - int nsockets, - struct x_socket *sockets, - int tcp_flag) -{ - int tmp; - int len; - size_t rem; - u_char msg[1024], *p; - int error; - - display_num = dispnr; - if (tcp_flag) - snprintf (display, display_size, "localhost:%u", display_num); - else - snprintf (display, display_size, ":%u", display_num); - error = create_and_write_cookie (xauthfile, xauthfile_size, - cookie, cookie_len); - if (error) { - cleanup(nsockets, sockets); - fatal (kc, sock, "Cookie-creation failed: %s", strerror(error)); - return 1; - } - - p = msg; - rem = sizeof(msg); - *p++ = ACK; - --rem; - - len = strlen (display); - tmp = kx_put_int (len, p, rem, 4); - if (tmp < 0 || rem < len + 4) { - syslog (LOG_ERR, "doit: buffer too small"); - cleanup(nsockets, sockets); - return 1; - } - p += tmp; - rem -= tmp; - - memcpy (p, display, len); - p += len; - rem -= len; - - len = strlen (xauthfile); - tmp = kx_put_int (len, p, rem, 4); - if (tmp < 0 || rem < len + 4) { - syslog (LOG_ERR, "doit: buffer too small"); - cleanup(nsockets, sockets); - return 1; - } - p += tmp; - rem -= tmp; - - memcpy (p, xauthfile, len); - p += len; - rem -= len; - - if(kx_write (kc, sock, msg, p - msg) < 0) { - syslog (LOG_ERR, "write: %m"); - cleanup(nsockets, sockets); - return 1; - } - for (;;) { - pid_t child; - int fd = -1; - fd_set fds; - int i; - int ret; - int cookiesp = TRUE; - - FD_ZERO(&fds); - if (sock >= FD_SETSIZE) { - syslog (LOG_ERR, "fd too large"); - cleanup(nsockets, sockets); - return 1; - } - - FD_SET(sock, &fds); - for (i = 0; i < nsockets; ++i) { - if (sockets[i].fd >= FD_SETSIZE) { - syslog (LOG_ERR, "fd too large"); - cleanup(nsockets, sockets); - return 1; - } - FD_SET(sockets[i].fd, &fds); - } - ret = select(FD_SETSIZE, &fds, NULL, NULL, NULL); - if(ret <= 0) - continue; - if(FD_ISSET(sock, &fds)){ - /* there are no processes left on the remote side - */ - cleanup(nsockets, sockets); - exit(0); - } else if(ret) { - for (i = 0; i < nsockets; ++i) { - if (FD_ISSET(sockets[i].fd, &fds)) { - if (sockets[i].flags == TCP) { - struct sockaddr_storage __ss_peer; - struct sockaddr *peer = (struct sockaddr*)&__ss_peer; - socklen_t slen = sizeof(__ss_peer); - - fd = accept (sockets[i].fd, - peer, - &slen); - if (fd < 0 && errno != EINTR) - syslog (LOG_ERR, "accept: %m"); - - /* XXX */ - if (fd >= 0 && suspicious_address (fd, peer)) { - close (fd); - fd = -1; - errno = EINTR; - } - } else if(sockets[i].flags == UNIX_SOCKET) { - socklen_t zero = 0; - - fd = accept (sockets[i].fd, NULL, &zero); - - if (fd < 0 && errno != EINTR) - syslog (LOG_ERR, "accept: %m"); -#ifdef MAY_HAVE_X11_PIPES - } else if(sockets[i].flags == STREAM_PIPE) { - /* - * this code tries to handle the - * send fd-over-pipe stuff for - * solaris - */ - - struct strrecvfd strrecvfd; - - ret = ioctl (sockets[i].fd, - I_RECVFD, &strrecvfd); - if (ret < 0 && errno != EINTR) { - syslog (LOG_ERR, "ioctl I_RECVFD: %m"); - } - - /* XXX */ - if (ret == 0) { - if (strrecvfd.uid != getuid()) { - close (strrecvfd.fd); - fd = -1; - errno = EINTR; - } else { - fd = strrecvfd.fd; - cookiesp = FALSE; - } - } -#endif /* MAY_HAVE_X11_PIPES */ - } else - abort (); - break; - } - } - } - if (fd < 0) { - if (errno == EINTR) - continue; - else - return 1; - } - - child = fork (); - if (child < 0) { - syslog (LOG_ERR, "fork: %m"); - if(errno != EAGAIN) - return 1; - close_connection(fd, strerror(errno)); - } else if (child == 0) { - for (i = 0; i < nsockets; ++i) - close (sockets[i].fd); - return doit_conn (kc, fd, sock, flags, cookiesp); - } else { - close (fd); - } - } -} - -/* - * Handle an active session on `sock' - */ - -static int -doit_active (kx_context *kc, - int sock, - int flags, - int tcp_flag) -{ - u_char msg[1024], *p; - - check_user_console (kc, sock); - - p = msg; - *p++ = ACK; - - if(kx_write (kc, sock, msg, p - msg) < 0) { - syslog (LOG_ERR, "write: %m"); - return 1; - } - for (;;) { - pid_t child; - int len; - - len = kx_read (kc, sock, msg, sizeof(msg)); - if (len < 0) { - syslog (LOG_ERR, "read: %m"); - return 1; - } - p = (u_char *)msg; - if (*p != NEW_CONN) { - syslog (LOG_ERR, "bad_message: %d", *p); - return 1; - } - - child = fork (); - if (child < 0) { - syslog (LOG_ERR, "fork: %m"); - if (errno != EAGAIN) - return 1; - } else if (child == 0) { - return doit_conn (kc, sock, sock, flags, 1); - } else { - } - } -} - -/* - * Receive a connection on `sock' and process it. - */ - -static int -doit(int sock, int tcp_flag) -{ - int ret; - kx_context context; - int dispnr; - int nsockets; - struct x_socket *sockets; - int flags; - - flags = recv_conn (sock, &context, &dispnr, &nsockets, &sockets, tcp_flag); - - if (flags & PASSIVE) { - ret = doit_passive (&context, sock, flags, dispnr, - nsockets, sockets, tcp_flag); - } else { - ret = doit_active (&context, sock, flags, tcp_flag); - cleanup(nsockets, sockets); - } - context_destroy (&context); - return ret; -} - -static char *port_str = NULL; -static int inetd_flag = 1; -static int tcp_flag = 0; -static int version_flag = 0; -static int help_flag = 0; - -struct getargs args[] = { - { "inetd", 'i', arg_negative_flag, &inetd_flag, - "Not started from inetd" }, - { "tcp", 't', arg_flag, &tcp_flag, "Use TCP" }, - { "port", 'p', arg_string, &port_str, "Use this port", - "port" }, - { "version", 0, arg_flag, &version_flag }, - { "help", 0, arg_flag, &help_flag } -}; - -static void -usage(int ret) -{ - arg_printusage (args, - sizeof(args) / sizeof(args[0]), - NULL, - "host"); - exit (ret); -} - -/* - * kxd - receive a forwarded X conncection - */ - -int -main (int argc, char **argv) -{ - int port; - int optidx = 0; - - setprogname (argv[0]); - roken_openlog ("kxd", LOG_ODELAY | LOG_PID, LOG_DAEMON); - - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, - &optidx)) - usage (1); - - if (help_flag) - usage (0); - - if (version_flag) { - print_version (NULL); - return 0; - } - - 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); - } - } else { -#if defined(KRB5) - port = krb5_getportbyname(NULL, "kx", "tcp", KX_PORT); -#else -#error define KRB5 -#endif - } - - if (!inetd_flag) - mini_inetd (port, NULL); - - signal (SIGCHLD, childhandler); - return doit(STDIN_FILENO, tcp_flag); -} diff --git a/kerberosV/src/appl/kx/kxd.cat8 b/kerberosV/src/appl/kx/kxd.cat8 deleted file mode 100644 index 41567cd5beb..00000000000 --- a/kerberosV/src/appl/kx/kxd.cat8 +++ /dev/null @@ -1,37 +0,0 @@ - -KXD(8) BSD System Manager's Manual KXD(8) - -NNAAMMEE - kkxxdd -- securely forward X conections - -SSYYNNOOPPSSIISS - _k_x_d [--tt] [--ii] [--pp _p_o_r_t] - -DDEESSCCRRIIPPTTIIOONN - This is the daemon for kkxx. - - Options supported by kkxxdd: - - --tt TCP. Normally kkxxdd will only listen for X connections on a UNIX - socket, but some machines (for example, Cray) have X libraries - that are not able to use UNIX sockets and thus you need to use - TCP to talk to the pseudo-xserver created by kkxxdd. This option - decreases the security significantly and should only be used when - it is necessary and you have considered the consequences of doing - so. - - --ii Interactive. Do not expect to be started by iinneettdd, but allocate - and listen to the socket yourself. Handy for testing and debug- - ging. - - --pp Port. Listen on the port _p_o_r_t. Only usable with --ii. - -EEXXAAMMPPLLEESS - Put the following in _/_e_t_c_/_i_n_e_t_d_._c_o_n_f: - - kx stream tcp nowait root /usr/athena/libexec/kxd kxd - -SSEEEE AALLSSOO - kx(1), rxtelnet(1), rxterm(1) - -KTH-KRB September 27, 1996 KTH-KRB diff --git a/kerberosV/src/appl/kx/rxtelnet.1 b/kerberosV/src/appl/kx/rxtelnet.1 deleted file mode 100644 index ff84e551b2c..00000000000 --- a/kerberosV/src/appl/kx/rxtelnet.1 +++ /dev/null @@ -1,128 +0,0 @@ -.\" Copyright (c) 1996 - 1998, 2001 - 2002 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: rxtelnet.1,v 1.3 2013/06/17 19:11:36 robert Exp $ -.\" -.Dd March 7, 2004 -.Dt RXTELNET 1 -.Os KTH_KRB -.Sh NAME -.Nm rxtelnet -.Nd start a telnet and forward X-connections. -.Sh SYNOPSIS -.Nm rxtelnet -.Op Fl l Ar username -.Op Fl k -.Op Fl t Ar telnet_args -.Op Fl x Ar xterm_args -.Op Fl K Ar kx_args -.Op Fl w Ar term_emulator -.Op Fl b Ar telnet_program -.Op Fl n -.Op Fl v -.Ar host -.Op Ar port -.Sh DESCRIPTION -The -.Nm -program starts an -.Nm xterm -window with a telnet to host -.Ar host . -From this window you will also be able to run X clients that will be -able to connect securely to your X server. If -.Ar port -is given, that port will be used instead of the default. -.Pp -If setting up the X forwarding failes, -.Nm -will still telnet in to the remote host, but without X forwarding. -.Pp -The supported options are: -.Bl -tag -width Ds -.It Fl l -Log in on the remote host as user -.Ar username . -.It Fl k -Disables keep-alives. -.It Fl t -Send -.Ar telnet_args -as arguments to -.Nm telnet . -.It Fl x -Send -.Ar xterm_args -as arguments to -.Nm xterm . -.It Fl X -Send -.Ar kx_args -as arguments to -.Nm kx . -.It Fl w -Use -.Ar term_emulator -instead of xterm. -.It Fl b -Use -.Ar telnet_program -instead of telnet. -.It Fl n -Do not start any terminal emulator. -.It Fl v -Be verbose. -.El -.Sh EXAMPLE -To login from host -.Va foo -(where your display is) -to host -.Va bar , -you might do the following. -.Bl -enum -.It -On foo: -.Nm -.Va bar -.It -You will get a new window with a -.Nm telnet -to -.Va bar . -In this window you will be able to start X clients. -.El -.Sh SEE ALSO -.Xr kx 1 , -.Xr rxterm 1 , -.Xr telnet 1 , -.Xr tenletxr 1 , -.Xr kxd 8 diff --git a/kerberosV/src/appl/kx/rxtelnet.cat1 b/kerberosV/src/appl/kx/rxtelnet.cat1 deleted file mode 100644 index f11e2b7140d..00000000000 --- a/kerberosV/src/appl/kx/rxtelnet.cat1 +++ /dev/null @@ -1,52 +0,0 @@ - -RXTELNET(1) BSD General Commands Manual RXTELNET(1) - -NNAAMMEE - rrxxtteellnneett -- start a telnet and forward X-connections. - -SSYYNNOOPPSSIISS - rrxxtteellnneett [--ll _u_s_e_r_n_a_m_e] [--kk] [--tt _t_e_l_n_e_t___a_r_g_s] [--xx _x_t_e_r_m___a_r_g_s] [--KK _k_x___a_r_g_s] - [--ww _t_e_r_m___e_m_u_l_a_t_o_r] [--bb _t_e_l_n_e_t___p_r_o_g_r_a_m] [--nn] [--vv] _h_o_s_t [_p_o_r_t] - -DDEESSCCRRIIPPTTIIOONN - The rrxxtteellnneett program starts an xxtteerrmm window with a telnet to host _h_o_s_t. - From this window you will also be able to run X clients that will be able - to connect securely to your X server. If _p_o_r_t is given, that port will be - used instead of the default. - - If setting up the X forwarding failes, rrxxtteellnneett will still telnet in to - the remote host, but without X forwarding. - - The supported options are: - - --ll Log in on the remote host as user _u_s_e_r_n_a_m_e. - - --kk Disables keep-alives. - - --tt Send _t_e_l_n_e_t___a_r_g_s as arguments to tteellnneett. - - --xx Send _x_t_e_r_m___a_r_g_s as arguments to xxtteerrmm. - - --XX Send _k_x___a_r_g_s as arguments to kkxx. - - --ww Use _t_e_r_m___e_m_u_l_a_t_o_r instead of xterm. - - --bb Use _t_e_l_n_e_t___p_r_o_g_r_a_m instead of telnet. - - --nn Do not start any terminal emulator. - - --vv Be verbose. - -EEXXAAMMPPLLEE - To login from host _f_o_o (where your display is) to host _b_a_r, you might do - the following. - - 1. On foo: rrxxtteellnneett _b_a_r - - 2. You will get a new window with a tteellnneett to _b_a_r. In this window you - will be able to start X clients. - -SSEEEE AALLSSOO - kx(1), rxterm(1), telnet(1), tenletxr(1), kxd(8) - -KTH_KRB March 7, 2004 KTH_KRB diff --git a/kerberosV/src/appl/kx/rxtelnet.in b/kerberosV/src/appl/kx/rxtelnet.in deleted file mode 100644 index 6365a4090e7..00000000000 --- a/kerberosV/src/appl/kx/rxtelnet.in +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh -# $Id: rxtelnet.in,v 1.3 2013/06/17 19:11:36 robert Exp $ -# -usage="Usage: $0 [-l username] [-k] [-fF] [-t args_to_telnet] [-x args_to_xterm] [-K args_to_kx] [-w term_emulator] [-b telnet_binary] [-n] [-v] [-h | --help] [--version] host [port]" -binary=telnet -term= -kx_args=-P -while true -do - case $1 in - -l) telnet_args="${telnet_args} -l $2 "; kx_args="${kx_args} -l $2"; title="${2}@"; shift 2;; - -t) telnet_args="${telnet_args} $2 "; shift 2;; - -x) xterm_args="${xterm_args} $2 "; shift 2;; - -f) telnet_args="${telnet_args} -f"; shift;; - -F) telnet_args="${telnet_args} -F"; shift;; - -k) kx_args="${kx_args} -k"; shift;; - -K) kx_args="${kx_args} $2 "; shift 2;; - -n) term=none; shift;; - -w) term=$2; shift 2;; - -b) binary=$2; shift 2;; - --version) echo "$0: %PACKAGE% %VERSION%"; exit 0;; - -h) echo $usage; exit 0;; - --help) echo $usage; exit 0;; - -v) set -x; verb=1; shift;; - -*) echo "$0: Bad option $1"; echo $usage; exit 1;; - *) break;; - esac -done -if test $# -lt 1; then - echo $usage - exit 1 -fi -host=$1 -port=$2 -title="${title}${host}" -bindir=%bindir% -pdc_trams=`dirname $0` -PATH=$pdc_trams:$bindir:$PATH -export PATH -set -- `kx $kx_args $host` -if test $# -ne 3; then - echo "Warning: Cound not setup X forwarding" - pid=NO - disp="" - auth="" -else - screen=`echo $DISPLAY | sed -ne 's/[^:]*:[0-9]*\(\.[0-9]*\)/\1/p'` - pid=$1 - disp=${2}${screen} - auth=$3 -fi -oldifs=$IFS -IFS=: -set -- $PATH -IFS=$oldifs -if test -z "$term"; then - for j in xterm dtterm aixterm dxterm hpterm; do - for i in $*; do - test -n "$i" || i="." - if test -x $i/$j; then - term=$j; break 2 - fi - done - done -fi -test "$verb" && echo "Telnet command used is `type $binary`." -if test -n "$term" -a "$term" != "none"; then - ($term -title $title -n $title $xterm_args -e env DISPLAY=$disp XAUTHORITY=$auth $binary -D $telnet_args $host $port; test x"$pid" != xNO && kill -USR2 $pid) & -else - env DISPLAY=$disp XAUTHORITY=$auth $binary -D $telnet_args $host $port - test x"$pid" != xNO && kill -USR2 $pid -fi diff --git a/kerberosV/src/appl/kx/rxterm.1 b/kerberosV/src/appl/kx/rxterm.1 deleted file mode 100644 index 80428b2b8bc..00000000000 --- a/kerberosV/src/appl/kx/rxterm.1 +++ /dev/null @@ -1,120 +0,0 @@ -.\" Copyright (c) 1996 - 1997, 2001 - 2003 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: rxterm.1,v 1.3 2013/06/17 19:11:36 robert Exp $ -.\" -.Dd April 11, 2003 -.Dt RXTERM 1 -.Os KTH_KRB -.Sh NAME -.Nm rxterm -.Nd start a secure remote xterm -.Sh SYNOPSIS -.Nm rxterm -.Op Fl l Ar username -.Op Fl k -.Op Fl r Ar rsh_args -.Op Fl x Ar xterm_args -.Op Fl K Ar kx_args -.Op Fl w Ar term_emulator -.Op Fl b Ar rsh_program -.Ar host -.Op Ar port -.Sh DESCRIPTION -The -.Nm -program starts an -.Nm xterm -window on host -.Ar host . -From this window you will also be able to run X clients that will be -able to connect securely to your X server. If -.Ar port -is given, that port will be used instead of the default. -.Pp -The supported options are: -.Bl -tag -width Ds -.It Fl l -Log in on the remote host as user -.Ar username . -.It Fl k -Disable keep-alives. -.It Fl r -Send -.Ar rsh_args -as arguments to -.Nm rsh . -.It Fl x -Send -.Ar xterm_args -as arguments to -.Nm xterm . -.It Fl X -Send -.Ar kx_args -as arguments to -.Nm kx . -.It Fl w -Use -.Ar term_emulator -instead of xterm. -.It Fl b -Use -.Ar rsh_program -instead of rsh. -.It Fl v -Be verbose. -.El -.Sh EXAMPLE -To login from host -.Va foo -(where your display is) -to host -.Va bar , -you might do the following. -.Bl -enum -.It -On foo: -.Nm -.Va bar -.It -You will get a new window running an -.Nm xterm -on host -.Va bar . -In this window you will be able to start X clients. -.El -.Sh SEE ALSO -.Xr kx 1 , -.Xr rsh 1 , -.Xr rxtelnet 1 , -.Xr tenletxr 1 , -.Xr kxd 8 diff --git a/kerberosV/src/appl/kx/rxterm.cat1 b/kerberosV/src/appl/kx/rxterm.cat1 deleted file mode 100644 index 4d6ca6f0096..00000000000 --- a/kerberosV/src/appl/kx/rxterm.cat1 +++ /dev/null @@ -1,47 +0,0 @@ - -RXTERM(1) BSD General Commands Manual RXTERM(1) - -NNAAMMEE - rrxxtteerrmm -- start a secure remote xterm - -SSYYNNOOPPSSIISS - rrxxtteerrmm [--ll _u_s_e_r_n_a_m_e] [--kk] [--rr _r_s_h___a_r_g_s] [--xx _x_t_e_r_m___a_r_g_s] [--KK _k_x___a_r_g_s] - [--ww _t_e_r_m___e_m_u_l_a_t_o_r] [--bb _r_s_h___p_r_o_g_r_a_m] _h_o_s_t [_p_o_r_t] - -DDEESSCCRRIIPPTTIIOONN - The rrxxtteerrmm program starts an xxtteerrmm window on host _h_o_s_t. From this window - you will also be able to run X clients that will be able to connect - securely to your X server. If _p_o_r_t is given, that port will be used - instead of the default. - - The supported options are: - - --ll Log in on the remote host as user _u_s_e_r_n_a_m_e. - - --kk Disable keep-alives. - - --rr Send _r_s_h___a_r_g_s as arguments to rrsshh. - - --xx Send _x_t_e_r_m___a_r_g_s as arguments to xxtteerrmm. - - --XX Send _k_x___a_r_g_s as arguments to kkxx. - - --ww Use _t_e_r_m___e_m_u_l_a_t_o_r instead of xterm. - - --bb Use _r_s_h___p_r_o_g_r_a_m instead of rsh. - - --vv Be verbose. - -EEXXAAMMPPLLEE - To login from host _f_o_o (where your display is) to host _b_a_r, you might do - the following. - - 1. On foo: rrxxtteerrmm _b_a_r - - 2. You will get a new window running an xxtteerrmm on host _b_a_r. In this - window you will be able to start X clients. - -SSEEEE AALLSSOO - kx(1), rsh(1), rxtelnet(1), tenletxr(1), kxd(8) - -KTH_KRB April 11, 2003 KTH_KRB diff --git a/kerberosV/src/appl/kx/rxterm.in b/kerberosV/src/appl/kx/rxterm.in deleted file mode 100644 index 5639cb7e019..00000000000 --- a/kerberosV/src/appl/kx/rxterm.in +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# $Id: rxterm.in,v 1.3 2013/06/17 19:11:36 robert Exp $ -# -usage="Usage: $0 [-l username] [-k] [-f] [-r rsh_args] [-x xterm_args] [-K kx_args] [-w term_emulator] [-b rsh_binary][-v] [-h | --help] [--version] host" -binary=rsh -term=xterm -while true -do - case $1 in - -l) rsh_args="${rsh_args} -l $2 "; kx_args="${kx_args} -l $2"; title="${2}@"; shift 2;; - -r) rsh_args="${rsh_args} $2 "; shift 2;; - -x) xterm_args="${xterm_args} $2 "; shift 2;; - -f) rsh_args="${rsh_args} -f"; shift;; - -k) kx_args="${kx_args} -k"; shift;; - -K) kx_args="${kx_args} $2 "; shift 2;; - -w) term=$2; shift 2;; - -b) binary=$2; shift 2;; - --version) echo "$0: %PACKAGE% %VERSION%"; exit 0;; - -h) echo $usage; exit 0;; - --help) echo $usage; exit 0;; - -v) set -x; shift;; - -*) echo "$0: Bad option $1"; echo $usage; exit 1;; - *) break;; - esac -done -if test $# -lt 1; then - echo "Usage: $0 host [arguments to $term]" - exit 1 -fi -host=$1 -title="${title}${host}" -bindir=%bindir% -pdc_trams=`dirname $0` -PATH=$pdc_trams:$bindir:$PATH -export PATH -set -- `kx $kx_args $host` -if test $# -ne 3; then - exit 1 -fi -screen=`echo $DISPLAY | sed -ne 's/[^:]*:[0-9]*\(\.[0-9]*\)/\1/p'` -pid=$1 -disp=${2}${screen} -auth=$3 -kill -USR1 $pid -$binary -n $rsh_args $host "/bin/sh -c 'DISPLAY=$disp XAUTHORITY=$auth $term -T $title -n $title $xterm_args /dev/null 2>/dev/null &'" diff --git a/kerberosV/src/appl/kx/tenletxr.1 b/kerberosV/src/appl/kx/tenletxr.1 deleted file mode 100644 index bb861ccdae7..00000000000 --- a/kerberosV/src/appl/kx/tenletxr.1 +++ /dev/null @@ -1,91 +0,0 @@ -.\" Copyright (c) 1997, 2001 - 2002 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: tenletxr.1,v 1.3 2013/06/17 19:11:36 robert Exp $ -.\" -.Dd March 31, 1997 -.Dt TENLETXR 1 -.Os KTH_KRB -.Sh NAME -.Nm tenletxr -.Nd forward X-connections backwards. -.Sh SYNOPSIS -.Nm tenletxr -.Op Fl l Ar username -.Op Fl k -.Ar host -.Op Ar port -.Sh DESCRIPTION -The -.Nm -program -enables forwarding of X-connections from this machine to host -.Ar host . -If -.Ar port -is given, that port will be used instead of the default. -.Pp -The supported options are: -.Bl -tag -width Ds -.It Fl l -Log in on the remote host as user -.Ar username -.It Fl k -Disables keep-alives. -.El -.Sh EXAMPLE -To login from host -.Va foo -to host -.Va bar -(where your display is), -you might do the following. -.Bl -enum -.It -On foo: -.Nm -.Va bar -.It -You will get a new shell where you will be able to start X clients -that will show their windows on -.Va bar . -.El -.Sh BUGS -It currently checks if you have permission to run it by checking if -you own -.Pa /dev/console -on the remote host. -.Sh SEE ALSO -.Xr kx 1 , -.Xr rxtelnet 1 , -.Xr rxterm 1 , -.Xr telnet 1 , -.Xr kxd 8 diff --git a/kerberosV/src/appl/kx/tenletxr.cat1 b/kerberosV/src/appl/kx/tenletxr.cat1 deleted file mode 100644 index da659754bc3..00000000000 --- a/kerberosV/src/appl/kx/tenletxr.cat1 +++ /dev/null @@ -1,37 +0,0 @@ - -TENLETXR(1) BSD General Commands Manual TENLETXR(1) - -NNAAMMEE - tteennlleettxxrr -- forward X-connections backwards. - -SSYYNNOOPPSSIISS - tteennlleettxxrr [--ll _u_s_e_r_n_a_m_e] [--kk] _h_o_s_t [_p_o_r_t] - -DDEESSCCRRIIPPTTIIOONN - The tteennlleettxxrr program enables forwarding of X-connections from this - machine to host _h_o_s_t. If _p_o_r_t is given, that port will be used instead - of the default. - - The supported options are: - - --ll Log in on the remote host as user _u_s_e_r_n_a_m_e - - --kk Disables keep-alives. - -EEXXAAMMPPLLEE - To login from host _f_o_o to host _b_a_r (where your display is), you might do - the following. - - 1. On foo: tteennlleettxxrr _b_a_r - - 2. You will get a new shell where you will be able to start X clients - that will show their windows on _b_a_r. - -BBUUGGSS - It currently checks if you have permission to run it by checking if you - own _/_d_e_v_/_c_o_n_s_o_l_e on the remote host. - -SSEEEE AALLSSOO - kx(1), rxtelnet(1), rxterm(1), telnet(1), kxd(8) - -KTH_KRB March 31, 1997 KTH_KRB diff --git a/kerberosV/src/appl/kx/tenletxr.in b/kerberosV/src/appl/kx/tenletxr.in deleted file mode 100644 index 7e67b50aa30..00000000000 --- a/kerberosV/src/appl/kx/tenletxr.in +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# $Id: tenletxr.in,v 1.3 2013/06/17 19:11:36 robert Exp $ -# -usage="Usage: $0 [-l username] [-k] [-v] [-h | --help] [--version] host [port]" -while true -do - case $1 in - -l) kx_args="${kx_args} -l $2"; shift 2;; - -k) kx_args="${kx_args} -k"; shift;; - --version) echo "$0: %PACKAGE% %VERSION%"; exit 0;; - -h) echo $usage; exit 0;; - --help) echo $usage; exit 0;; - -v) set -x; shift;; - -*) echo "$0: Bad option $1"; echo $usage; exit 1;; - *) break;; - esac -done -if test $# -lt 1; then - echo $usage - exit 1 -fi -host=$1 -port=$2 -bindir=%bindir% -pdc_trams=`dirname $0` -PATH=$pdc_trams:$bindir:$PATH -export PATH -set -- `kx $kx_args $host` -if test $# -ne 3; then - exit 1 -fi -screen=`echo $DISPLAY | sed -ne 's/[^:]*:[0-9]*\(\.[0-9]*\)/\1/p'` -pid=$1 -disp=${2}${screen} -auth=$3 -env DISPLAY=$disp XAUTHORITY=$auth $SHELL -kill -USR2 $pid diff --git a/kerberosV/src/appl/kx/writeauth.c b/kerberosV/src/appl/kx/writeauth.c deleted file mode 100644 index 4908c5c96ba..00000000000 --- a/kerberosV/src/appl/kx/writeauth.c +++ /dev/null @@ -1,73 +0,0 @@ -/* $XConsortium: AuWrite.c,v 1.6 94/04/17 20:15:45 gildea Exp $ */ - -/* - -Copyright (c) 1988 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. - -*/ - -#ifdef HAVE_CONFIG_H -#include -RCSID("$Id: writeauth.c,v 1.3 2013/06/17 19:11:36 robert Exp $"); -#endif - -#include - -static int -write_short (unsigned short s, FILE *file) -{ - unsigned char file_short[2]; - - file_short[0] = (s & (unsigned)0xff00) >> 8; - file_short[1] = s & 0xff; - if (fwrite (file_short, sizeof (file_short), 1, file) != 1) - return 0; - return 1; -} - -static int -write_counted_string (unsigned short count, char *string, FILE *file) -{ - if (write_short (count, file) == 0) - return 0; - if (fwrite (string, (int) sizeof (char), (int) count, file) != count) - return 0; - return 1; -} - -int -XauWriteAuth (FILE *auth_file, Xauth *auth) -{ - if (write_short (auth->family, auth_file) == 0) - return 0; - if (write_counted_string (auth->address_length, auth->address, auth_file) == 0) - return 0; - if (write_counted_string (auth->number_length, auth->number, auth_file) == 0) - return 0; - if (write_counted_string (auth->name_length, auth->name, auth_file) == 0) - return 0; - if (write_counted_string (auth->data_length, auth->data, auth_file) == 0) - return 0; - return 1; -} diff --git a/kerberosV/src/appl/login/ChangeLog b/kerberosV/src/appl/login/ChangeLog deleted file mode 100644 index 68ab1d120a3..00000000000 --- a/kerberosV/src/appl/login/ChangeLog +++ /dev/null @@ -1,366 +0,0 @@ -2008-04-15 Love Hörnquist Åstrand - - * utmp_login.c: Reorder to avoid prototype. - - * login_locl.h: If cygwin doesnt have WTMPX_FILE, it uses wtmp for - wtmpx http://www.cygwin.com/ml/cygwin/2006-12/msg00630.html - -2008-04-10 Love Hörnquist Åstrand - - * utmp_login.c: Remove utmp warning on mac os x - -2006-12-05 Love Hörnquist Åstrand - - * limits_conf.c: Clear errno before calling the strtol - functions. From Paul Stoeber to OpenBSD by Ray Lai and Björn - Sandell. - - * limits_conf.c: Report to syslog strings that start with NUL; - prevents negative index array access. Ray Lai of OpenBSD via Björn - Sandell. - -2006-10-07 Love Hörnquist Åstrand - - * Makefile.am: Add man_MANS to EXTRA_DIST - -2006-09-22 Love Hörnquist Åstrand - - * read_string.c: try to not call signaction for signal 0 and use - NSIG if it exists to determin how many signals there exists, also, - only restore those signalhandlers that we got out. - -2006-04-27 Love Hörnquist Åstrand - - * login_locl.h: Include "loginpaths.h" - - * loginpaths.h: Shared paths between login and rshd. - -2006-01-09 Johan Danielsson - - * login.c: log successful logins - -2005-08-08 Love Hörnquist Åstrand - - * login.c (do_login): only do krb4_get_afs_tokens if we have done - v4 authentication or done a 5to4 conversion of tickets. This is to - avoid delays on a realm that only support Kerberos 5 and drop - Kerberos 4 requests. - -2005-05-10 Dave Love - - * login.c: Include . - -2005-05-02 Dave Love - - * limits_conf.c: Check RLIMIT_MEMLOCK, not RLIMIT_LOCK. - -2005-04-28 Dave Love - - * limits_conf.c: Maybe include sys/resource.h. Use various - RLIMIT_ macros conditionally. For Solaris, Irix and Tru64. - -2005-04-22 Johan Danielsson - - * login.1: document limits.conf - - * Makefile.am: limits_conf.c - - * login_locl.h: template for limits.conf - - * login.c: read limits.conf (from /etc/security by default, - overridable in login.conf) - - * limits_conf.c: implement a parser for limits.conf - -2004-09-08 Johan Danielsson - - * login.c: use krb5_appdefault_boolean instead of - krb5_config_get_bool - -2003-09-03 Love Hörnquist Åstrand - - * login.c (krb5_to4): set client princ of the mcred - -2003-07-07 Love Hörnquist Åstrand - - * login.c (krb5_to4): use krb5_cc_clear_mcred - -2003-03-24 Johan Danielsson - - * Makefile.am: install man pages - - * login.1: manpage for login - - * login.c: allow "welcome" as well as "motd" in login.conf - - * login.access.5: login.access manual page - -2003-03-18 Love Hörnquist Åstrand - - * login.c: also need pag_set - * login.c: if there is kerberos 5, call krb5_afslog\* - -2002-08-23 Johan Danielsson - - * login.c: if motd is set in login.conf, output its contents - before starting the shell - -2002-02-27 Johan Danielsson - - * login.c: reset signals to default, needed on solaris 8 - -2002-02-19 Johan Danielsson - - * login_locl.h: include netgroup.h and rpcsvc/ypclnt.h - - * login.c: make this build without krb5 - -2001-09-22 Assar Westerlund - - * login_locl.h: kludge: use absolute path to find prot.h so we do - not get confused by athena's prot.h - -2001-09-17 Assar Westerlund - - * login.c (do_login): add setpcred - -2001-07-06 Assar Westerlund - - * login.c: move osf2c magic earlier. from Mark Davies - - -2001-06-19 Assar Westerlund - - * login.c (krb5_to4): dereference result from krb5_princ_realm. - noted by Thomas Nystrom - -2001-06-04 Assar Westerlund - - * update copyright messages on Wietse Venema's code. - -2001-05-31 Assar Westerlund - - * login.c (krb5_to4): look for [realms]krb4_get_tickets to - decide whether to get kerberos 4 tickets - -2001-02-08 Assar Westerlund - - * utmp_login.c, utmpx_login.c: try to write a useful string as - host in utmp, using the same algoritm as telnetd - -2001-01-29 Assar Westerlund - - * login.c: remove some krb5_free_context that might happen at - unappropriate times - -2000-12-31 Assar Westerlund - - * login.c (main): handle krb5_init_context failure consistently - -2000-12-11 Assar Westerlund - - * login.c (do_login): set the group on the tty. - (r_flag): comment out - * login.c (krb5_to4): always return a value - -2000-10-15 Assar Westerlund - - * login.c (krb5_to4): check another return code - -2000-08-22 Johan Danielsson - - * login.c (do_login): set PATH to something sane; - (start_logout_process): avoid getting signals sent to the parent - - * login_locl.h: _PATH_DEFPATH - -2000-07-01 Assar Westerlund - - * login.c (login_timeout): add back - -2000-06-28 Johan Danielsson - - * env.c: new file for environment related functions - - * login.c: move environment stuff to separate file, allow - specifying list of environment files via login.conf - -2000-06-21 Assar Westerlund - - * Makefile.am (LDADD): add otp - * login.c: add reading of /etc/environment. From Ake Sandgren - - add otp support. From Daniel Kouril - -2000-06-09 Assar Westerlund - - * login.c (do_login): work-around for setuid and capabilities bug - fixed in Linux 2.2.16 - -2000-04-09 Assar Westerlund - - * login.c: allow conversion of v5 -> v4 tickets when logging in - with forwarded tickets - -1999-11-09 Johan Danielsson - - * conf.c: remove case for not having cgetent, since it's in roken - -1999-11-05 Assar Westerlund - - * login.c (do_login): conditionalize shadow stuff on getspnam - -1999-10-30 Assar Westerlund - - * Makefile.am (login_DEPENDENCIES): remove, it's not entirely - correct and was causing problems with non-GNU make - -1999-10-28 Assar Westerlund - - * login.c (start_logout_proceess): don't examine `prog' before - setting it. - -1999-10-27 Assar Westerlund - - * login.c (do_login): chown and chmod the tty. some clean-up. - -1999-10-03 Assar Westerlund - - * login.c (krb5_start_session): correct the ccache to - krb524_convert_creds_kdc - -1999-09-28 Assar Westerlund - - * login.c (krb5_verify): use krb5_verify_user_lrealm - -1999-09-01 Johan Danielsson - - * login.c: SGI capability mumbo-jumbo - -1999-08-09 Johan Danielsson - - * login.c (start_logout_process): call setproctitle - - * login_locl.h: declare struct spwd - - * login.c: add support for starting extra processes at login and - logout; always preserve TERM and TZ - - * conf.c: add configuration file support - -1999-08-07 Assar Westerlund - - * shadow.c (check_shadow): check for a NULL sp - -1999-08-05 Assar Westerlund - - * login.c (main): move down login incorrect to disallow account - guessing - -1999-08-04 Assar Westerlund - - * utmpx_login.c (utmpx_login): fix for Solaris. From Miroslav - Ruda - - * login_locl.h: add and some prototypes - - * login.c: fixes with v4 and shadow support. From Miroslav Ruda - - - * shadow.c: new file with functions for handling shadow passwords - - * Makefile.am: add shadow - -1999-07-22 Assar Westerlund - - * login.c (main): generate a better tty name - -1999-05-25 Johan Danielsson - - * login.c (do_login): set $SHELL - -1999-05-18 Assar Westerlund - - * add login-access - -1999-05-11 Assar Westerlund - - * login.c: copy the v5 ccache to a file after having done setuid - -1999-05-09 Assar Westerlund - - * login.c (krb5_verify): check seteuid for errors - -Mon Apr 19 22:30:55 1999 Assar Westerlund - - * login.c: conditionalize the kafs calls on KRB4 - - * Makefile.am (LDADD): add kafs - - * login.c: add support for getting afs tokens with v4 and v5 - -Sun Apr 18 14:12:28 1999 Johan Danielsson - - * login.c: check _PATH_NOLOGIN - - * login_locl.h: _PATH_NOLOGIN - -1999-04-11 Assar Westerlund - - * login.c (main): use print_version - -Thu Apr 8 15:03:55 1999 Johan Danielsson - - * login.c: remove definition of KRB_VERIFY_USER et.al. (moved to - config.h) - - * login_locl.h: include udb.h, sys/resource.h, and sys/category.h - -Sat Mar 27 17:58:37 1999 Johan Danielsson - - * Makefile.am: osfc2.c - - * login.c: magic for OSF C2, and Crays - - * login_locl.h: do_osfc2_magic proto - - * osfc2.c: bsd_locl -> login_locl - - * osfc2.c: OSF C2 magic - -Tue Mar 23 14:17:40 1999 Johan Danielsson - - * login_locl.h: _PATH_UTMP - -Sun Mar 21 15:02:31 1999 Johan Danielsson - - * login.c: `-h' is host, not help - -Sat Mar 20 00:11:13 1999 Assar Westerlund - - * login_locl.h: krb.h: add - - * login.c: static-size - (krb4_verify): add - -Thu Mar 18 11:36:10 1999 Johan Danielsson - - * Makefile.am: include Makefile.am.common - -Thu Mar 11 17:53:36 1999 Johan Danielsson - - * utmpx_login.c: add some consts - - * utmp_login.c: add some consts - - * login.c: staticize - - * login_locl.h: add prototypes, and defaults for - _PATH_* - -Mon Mar 1 10:49:14 1999 Johan Danielsson - - * utmpx_login.c: HAVE_UT_* -> HAVE_STRUCT_UTMP*_UT_* - - * utmp_login.c: HAVE_UT_* -> HAVE_STRUCT_UTMP*_UT_* - diff --git a/kerberosV/src/appl/login/Makefile.am b/kerberosV/src/appl/login/Makefile.am deleted file mode 100644 index e499547ccc2..00000000000 --- a/kerberosV/src/appl/login/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:40 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -man_MANS = login.1 login.access.5 - -bin_PROGRAMS = login - -login_SOURCES = \ - conf.c \ - env.c \ - login.c \ - login_access.c \ - login_locl.h \ - login-protos.h \ - loginpaths.h \ - limits_conf.c \ - osfc2.c \ - read_string.c \ - shadow.c \ - stty_default.c \ - tty.c \ - utmp_login.c \ - utmpx_login.c - -LDADD = $(LIB_otp) \ - $(LIB_kafs) \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_roken) \ - $(LIB_security) \ - $(DBLIB) - -$(srcdir)/login-protos.h: - cd $(srcdir); perl ../../cf/make-proto.pl -o login-protos.h -q -P comment $(login_SOURCES) || rm -f login-protos.h - -$(login_OBJECTS): $(srcdir)/login-protos.h - -EXTRA_DIST = NTMakefile $(man_MANS) diff --git a/kerberosV/src/appl/login/Makefile.in b/kerberosV/src/appl/login/Makefile.in deleted file mode 100644 index e06fac1f7ad..00000000000 --- a/kerberosV/src/appl/login/Makefile.in +++ /dev/null @@ -1,1035 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -bin_PROGRAMS = login$(EXEEXT) -subdir = appl/login -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ - "$(DESTDIR)$(man5dir)" -PROGRAMS = $(bin_PROGRAMS) -am_login_OBJECTS = conf.$(OBJEXT) env.$(OBJEXT) login.$(OBJEXT) \ - login_access.$(OBJEXT) limits_conf.$(OBJEXT) osfc2.$(OBJEXT) \ - read_string.$(OBJEXT) shadow.$(OBJEXT) stty_default.$(OBJEXT) \ - tty.$(OBJEXT) utmp_login.$(OBJEXT) utmpx_login.$(OBJEXT) -login_OBJECTS = $(am_login_OBJECTS) -login_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/lib/kafs/libkafs.la \ - $(am__DEPENDENCIES_1) -login_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ - $(top_builddir)/lib/krb5/libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(login_SOURCES) -DIST_SOURCES = $(login_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -man5dir = $(mandir)/man5 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -man_MANS = login.1 login.access.5 -login_SOURCES = \ - conf.c \ - env.c \ - login.c \ - login_access.c \ - login_locl.h \ - login-protos.h \ - loginpaths.h \ - limits_conf.c \ - osfc2.c \ - read_string.c \ - shadow.c \ - stty_default.c \ - tty.c \ - utmp_login.c \ - utmpx_login.c - -LDADD = $(LIB_otp) \ - $(LIB_kafs) \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_roken) \ - $(LIB_security) \ - $(DBLIB) - -EXTRA_DIST = NTMakefile $(man_MANS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/login/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/login/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -login$(EXEEXT): $(login_OBJECTS) $(login_DEPENDENCIES) - @rm -f login$(EXEEXT) - $(LINK) $(login_OBJECTS) $(login_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/limits_conf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login_access.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osfc2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_string.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shadow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stty_default.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tty.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utmp_login.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utmpx_login.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } -install-man5: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" - @list=''; test -n "$(man5dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ - done; } - -uninstall-man5: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man5dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 install-man5 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 uninstall-man5 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-man5 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-hook uninstall-man uninstall-man1 uninstall-man5 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -$(srcdir)/login-protos.h: - cd $(srcdir); perl ../../cf/make-proto.pl -o login-protos.h -q -P comment $(login_SOURCES) || rm -f login-protos.h - -$(login_OBJECTS): $(srcdir)/login-protos.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/kerberosV/src/appl/login/NTMakefile b/kerberosV/src/appl/login/NTMakefile deleted file mode 100644 index b19ecfa8b9e..00000000000 --- a/kerberosV/src/appl/login/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\login - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/login/conf.c b/kerberosV/src/appl/login/conf.c deleted file mode 100644 index e1aee24d1f4..00000000000 --- a/kerberosV/src/appl/login/conf.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of 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 "login_locl.h" - -RCSID("$Id: conf.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -static char *confbuf; - -static int -login_conf_init(void) -{ - char *files[] = { _PATH_LOGIN_CONF, NULL }; - return cgetent(&confbuf, files, "default"); -} - -char * -login_conf_get_string(const char *str) -{ - char *value; - if(login_conf_init() != 0) - return NULL; - if(cgetstr(confbuf, (char *)str, &value) < 0) - return NULL; - return value; -} diff --git a/kerberosV/src/appl/login/env.c b/kerberosV/src/appl/login/env.c deleted file mode 100644 index 7cf69afd675..00000000000 --- a/kerberosV/src/appl/login/env.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "login_locl.h" -RCSID("$Id: env.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * the environment we will send to execle and the shell. - */ - -char **env; -int num_env; - -void -extend_env(char *str) -{ - env = realloc(env, (num_env + 1) * sizeof(*env)); - if(env == NULL) - errx(1, "Out of memory!"); - env[num_env++] = str; -} - -void -add_env(const char *var, const char *value) -{ - int i; - char *str; - asprintf(&str, "%s=%s", var, value); - if(str == NULL) - errx(1, "Out of memory!"); - for(i = 0; i < num_env; i++) - if(strncmp(env[i], var, strlen(var)) == 0 && - env[i][strlen(var)] == '='){ - free(env[i]); - env[i] = str; - return; - } - - extend_env(str); -} - -#if !HAVE_DECL_ENVIRON -extern char **environ; -#endif - - -void -copy_env(void) -{ - char **p; - for(p = environ; *p; p++) - extend_env(*p); -} - -void -login_read_env(const char *file) -{ - char **newenv; - char *p; - int i, j; - - newenv = NULL; - i = read_environment(file, &newenv); - for (j = 0; j < i; j++) { - p = strchr(newenv[j], '='); - if (p == NULL) - errx(1, "%s: missing = in string %s", - file, newenv[j]); - *p++ = 0; - add_env(newenv[j], p); - *--p = '='; - free(newenv[j]); - } - free(newenv); -} diff --git a/kerberosV/src/appl/login/limits_conf.c b/kerberosV/src/appl/login/limits_conf.c deleted file mode 100644 index 449d3c78e63..00000000000 --- a/kerberosV/src/appl/login/limits_conf.c +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) 2005 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 "login_locl.h" - -RCSID("$Id: limits_conf.c,v 1.4 2013/06/17 18:57:40 robert Exp $"); - -#include -#include -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif - -struct limit { - const char *name; - int resource; - int scale; - int has_limit; - struct rlimit limit; -} limits[] = { -#define LIM(X, S) { #X, RLIMIT_##X, S, 0 } - LIM(CORE, 1024), - LIM(CPU, 60), - LIM(DATA, 1024), - LIM(FSIZE, 1024), -#ifdef RLIMIT_MEMLOCK - LIM(MEMLOCK, 1024), -#endif - LIM(NOFILE, 1), -#ifdef RLIMIT_NPROC - LIM(NPROC, 1), -#endif -#ifdef RLIMIT_RSS - LIM(RSS, 1024), -#endif - LIM(STACK, 1024), - -#ifdef RLIMIT_AS - LIM(AS, 1024), -#endif -#ifdef RLIMIT_LOCKS - LIM(LOCKS, 1), -#endif - /* - maxlogins - priority - */ - { NULL, 0 } -}; - -static struct limit * -find_limit(const char *name) -{ - struct limit *l; - for(l = limits; l->name != NULL; l++) - if(strcasecmp(name, l->name) == 0) - return l; - return NULL; -} - -/* this function reads limits.conf files similar to pam_limits - unimplemented features include: - % maxlogins - "-" no limits, - priorities etc that are not set via setrlimit - XXX uses static storage, and clobbers getgr* -*/ - -int -read_limits_conf(const char *file, const struct passwd *pwd) -{ - FILE *f; - char *args[4]; - int lineno = 0; - char buf[1024]; - struct limit *l; - rlim_t value; - - f = fopen(file, "r"); - if(f == NULL) { - if(errno != ENOENT && errno != ENOTDIR) - syslog(LOG_ERR, "%s: %m", file); - return -1; - } - - while(fgets(buf, sizeof(buf), f) != NULL) { - char *last = NULL; - char *end = NULL; - int level; - - lineno++; - - if(buf[0] == '\0') { - syslog(LOG_ERR, "%s: line %d: NUL character", file, lineno); - continue; - } - if(buf[strlen(buf) - 1] != '\n') { - /* file did not end with a newline, figure out if we're at - the EOF, or if our buffer was too small */ - int eof = 1; - int c; - while((c = fgetc(f)) != EOF) { - eof = 0; - if(c == '\n') - break; - } - if(!eof) { - syslog(LOG_ERR, "%s: line %d: line too long", file, lineno); - continue; - } - } - buf[strcspn(buf, "#\r\n")] = '\0'; - if((args[0] = strtok_r(buf, " \t", &last)) == NULL || - (args[1] = strtok_r(NULL, " \t", &last)) == NULL || - (args[2] = strtok_r(NULL, " \t", &last)) == NULL || - (args[3] = strtok_r(NULL, " \t", &last)) == NULL) { - if(args[0] != NULL) /* this would include comment lines */ - syslog(LOG_ERR, "%s: line %d: malformed line", file, lineno); - continue; - } - - l = find_limit(args[2]); - if(l == NULL) { - syslog(LOG_ERR, "%s: line %d: unknown limit %s", file, lineno, args[2]); - continue; - } - if(strcmp(args[3], "-") == 0) { - value = RLIM_INFINITY; - } else { - errno = 0; - value = strtol(args[3], &end, 10); - if(*end != '\0') { - syslog(LOG_ERR, "%s: line %d: bad value %s", file, lineno, args[3]); - continue; - } - if((value == LONG_MIN || value == LONG_MAX) && errno == ERANGE) { - syslog(LOG_ERR, "%s: line %d: bad value %s", file, lineno, args[3]); - continue; - } - if(value * l->scale < value) - value = RLIM_INFINITY; - else - value *= l->scale; - } - level = 0; - /* XXX unclear: if you set group hard and user soft limit, - should the hard limit still apply? this code doesn't. */ - if(strcmp(args[0], pwd->pw_name) == 0) - level = 3; - if(*args[0] == '@') { - struct group *gr; - gr = getgrnam(args[0] + 1); - if(gr != NULL && gr->gr_gid == pwd->pw_gid) - level = 2; - } - if(strcmp(args[0], "*") == 0) - level = 1; - if(level == 0 || level < l->has_limit) /* not for us */ - continue; - if(l->has_limit < level) { - if(getrlimit(l->resource, &l->limit) < 0) - continue; - l->has_limit = level; - } - - /* XXX unclear: if you soft to more than default hard, should - we set hard to soft? this code doesn't. */ - if(strcasecmp(args[1], "soft") == 0 || strcmp(args[1], "-") == 0) - l->limit.rlim_cur = value; - if(strcasecmp(args[1], "hard") == 0 || strcmp(args[1], "-") == 0) - l->limit.rlim_max = value; - } - fclose(f); - for(l = limits; l->name != NULL; l++) { - if(l->has_limit) { - if(l->limit.rlim_cur > l->limit.rlim_max) - l->limit.rlim_cur = l->limit.rlim_max; - if(setrlimit(l->resource, &l->limit) != 0) - syslog(LOG_ERR, "setrlimit RLIM_%s failed: %m", l->name); - } - l->has_limit = 0; - } - return 0; -} diff --git a/kerberosV/src/appl/login/login-protos.h b/kerberosV/src/appl/login/login-protos.h deleted file mode 100644 index 92b5b8721fa..00000000000 --- a/kerberosV/src/appl/login/login-protos.h +++ /dev/null @@ -1,91 +0,0 @@ -/* This is a generated file */ -#ifndef __login_protos_h__ -#define __login_protos_h__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -void -add_env ( - const char */*var*/, - const char */*value*/); - -void -check_shadow ( - const struct passwd */*pw*/, - const struct spwd */*sp*/); - -char * -clean_ttyname (char */*tty*/); - -void -copy_env (void); - -int -do_osfc2_magic (uid_t /*uid*/); - -void -extend_env (char */*str*/); - -int -login_access ( - struct passwd */*user*/, - char */*from*/); - -char * -login_conf_get_string (const char */*str*/); - -void -login_read_env (const char */*file*/); - -char * -make_id (char */*tty*/); - -void -prepare_utmp ( - struct utmp */*utmp*/, - char */*tty*/, - const char */*username*/, - const char */*hostname*/); - -int -read_limits_conf ( - const char */*file*/, - const struct passwd */*pwd*/); - -int -read_string ( - const char */*prompt*/, - char */*buf*/, - size_t /*len*/, - int /*echo*/); - -void -shrink_hostname ( - const char */*hostname*/, - char */*dst*/, - size_t /*dst_sz*/); - -void -stty_default (void); - -void -utmp_login ( - char */*tty*/, - const char */*username*/, - const char */*hostname*/); - -int -utmpx_login ( - char */*line*/, - const char */*user*/, - const char */*host*/); - -#ifdef __cplusplus -} -#endif - -#endif /* __login_protos_h__ */ diff --git a/kerberosV/src/appl/login/login.1 b/kerberosV/src/appl/login/login.1 deleted file mode 100644 index f1779cdd23b..00000000000 --- a/kerberosV/src/appl/login/login.1 +++ /dev/null @@ -1,252 +0,0 @@ -.\" $Id: login.1,v 1.3 2013/06/17 18:57:40 robert Exp $ -.\" -.Dd April 22, 2005 -.Dt LOGIN 1 -.Os HEIMDAL -.Sh NAME -.Nm login -.Nd authenticate a user and start new session -.Sh SYNOPSIS -.Nm -.Op Fl fp -.Op Fl a Ar level -.Op Fl h Ar hostname -.Ar [username] -.Sh DESCRIPTION -This manual page documents the -.Nm login -program distributed with the Heimdal Kerberos 5 implementation, it may -differ in important ways from your system version. -.Pp -The -.Nm login -programs logs users into the system. It is intended to be run by -system daemons like -.Xr getty 8 -or -.Xr telnetd 8 . -If you are already logged in, but want to change to another user, you -should use -.Xr su 1 . -.Pp -A username can be given on the command line, else one will be prompted -for. -.Pp -A password is required to login, unless the -.Fl f -option is given (indicating that the calling program has already done -proper authentication). With -.Fl f -the user will be logged in without further questions. -.Pp -For password authentication Kerberos 5, Kerberos 4 (if compiled in), -OTP (if compiled in) and local -.No ( Pa /etc/passwd ) -passwords are supported. OTP will be used if the the user is -registered to use it, and -.Nm login -is given the option -.Fl a Li otp . -When using OTP, a challenge is shown to the user. -.Pp -Further options are: -.Bl -tag -width Ds -.It Fl a Ar string -Which authentication mode to use, the only supported value is -currently -.Dq otp . -.It Fl f -Indicates that the user is already authenticated. This happens, for -instance, when login is started by telnetd, and the user has proved -authentic via Kerberos. -.It Fl h Ar hostname -Indicates which host the user is logging in from. This is passed from -telnetd, and is entered into the login database. -.It Fl p -This tells -.Nm login -to preserve all environment variables. If not given, only the -.Dv TERM -and -.Dv TZ -variables are preserved. It could be a security risk to pass random -variables to -.Nm login -or the user shell, so the calling daemon should make sure it only -passes -.Dq safe -variables. -.El -.Pp -The process of logging user in proceeds as follows. -.Pp -First a check is made that logins are allowed at all. This usually -means checking -.Pa /etc/nologin . -If it exists, and the user trying to login is not root, the contents -is printed, and then login exits. -.Pp -Then various system parameters are set up, like changing the owner of -the tty to the user, setting up signals, setting the group list, and -user and group id. Also various machine specific tasks are performed. -.Pp -Next -.Nm login -changes to the users home directory, or if that fails, to -.Pa / . -The environment is setup, by adding some required variables (such as -.Dv PATH ) , -and also authentication related ones (such as -.Dv KRB5CCNAME ) . -If an environment file exists -.No ( Pa /etc/environment ) , -variables are set according to -it. -.Pp -If one or more login message files are configured, their contents is -printed to the terminal. -.Pp -If a login time command is configured, it is executed. A logout time -command can also be configured, which makes -.Nm login -fork, and wait for the user shell to exit, and then run the command. -This can be used to clean up user credentials. -.Pp -Finally, the user's shell is executed. If the user logging in is root, -and root's login shell does not exist, a default shell (usually -.Pa /bin/sh ) -is also tried before giving up. -.Sh ENVIRONMENT -These environment variables are set by login (not including ones set by -.Pa /etc/environment ) : -.Pp -.Bl -tag -compact -width USERXXLOGNAME -.It Dv PATH -the default system path -.It Dv HOME -the user's home directory (or possibly -.Pa / ) -.It Dv USER , Dv LOGNAME -both set to the username -.It Dv SHELL -the user's shell -.It Dv TERM , Dv TZ -set to whatever is passed to -.Nm login -.It Dv KRB5CCNAME -if the password is verified via Kerberos 5, this will point to the -credentials cache file -.It Dv KRBTKFILE -if the password is verified via Kerberos 4, this will point to the -ticket file -.El -.Sh FILES -.Bl -tag -compact -width Ds -.It Pa /etc/environment -Contains a set of environment variables that should be set in addition -to the ones above. It should contain sh-style assignments like -.Dq VARIABLE=value . -Note that they are not parsed the way a shell would. No variable -expansion is performed, and all strings are literal, and quotation -marks should not be used. Everything after a hash mark is considered a -comment. The following are all different (the last will set the -variable -.Dv BAR , -not -.Dv FOO ) . -.Bd -literal -offset indent -FOO=this is a string -FOO="this is a string" -BAR= FOO='this is a string' -.Ed -.It Pa /etc/login.access -See -.Xr login.access 5 . -.It Pa /etc/login.conf -This is a termcap style configuration file, that contains various -settings used by -.Nm login . -Currently only the -.Dq default -capability record is used. The possible capability strings include: -.Pp -.Bl -tag -compact -width Ds -.It Li environment -This is a comma separated list of environment files that are read in -the order specified. If this is missing the default -.Pa /etc/environment -is used. -.It Li login_program -This program will be executed just before the user's shell is started. -It will be called without arguments. -.It Li logout_program -This program will be executed just after the user's shell has -terminated. It will be called without arguments. This program will be -the parent process of the spawned shell. -.It Li motd -A comma separated list of text files that will be printed to the -user's terminal before starting the shell. The string -.Li welcome -works similarly, but points to a single file. -.It Li limits -Points to a file containing ulimit settings for various users. Syntax -is inspired by what pam_limits uses, and the default is -.Pa /etc/security/limits.conf . -.El -.It Pa /etc/nologin -If it exists, login is denied to all but root. The contents of this -file is printed before login exits. -.El -.Pp -Other -.Nm login -programs typically print all sorts of information by default, such as -last time you logged in, if you have mail, and system message files. -This version of -.Nm login -does not, so there is no reason for -.Pa .hushlogin -files or similar. We feel that these tasks are best left to the user's -shell, but the -.Li login_program -facility allows for a shell independent solution, if that is desired. -.Sh EXAMPLES -A -.Pa login.conf -file could look like: -.Bd -literal -offset indent -default:\\ - :motd=/etc/motd,/etc/motd.local:\\ - :limits=/etc/limits.conf: -.Ed -.Pp -The -.Pa limits.conf -file consists of a table with four whitespace separated fields. First -field is a username or a groupname (prefixed with -.Sq @ ) , -or -.Sq * . -Second field is -.Sq soft , -.Sq hard , -or -.Sq - -(the last meaning both soft and hard). -Third field is a limit name (such as -.Sq cpu -or -.Sq core ) . -Last field is the limit value (a number or -.Sq - -for unlimited). In the case of data sizes, the value is in kilobytes, -and cputime is in minutes. -.Sh SEE ALSO -.Xr su 1 , -.Xr login.access 5 , -.Xr getty 8 , -.Xr telnetd 8 -.Sh AUTHORS -This login program was written for the Heimdal Kerberos 5 -implementation. The login.access code was written by Wietse Venema. -.\".Sh BUGS diff --git a/kerberosV/src/appl/login/login.access.5 b/kerberosV/src/appl/login/login.access.5 deleted file mode 100644 index 435cd723e88..00000000000 --- a/kerberosV/src/appl/login/login.access.5 +++ /dev/null @@ -1,55 +0,0 @@ -.\" $Id: login.access.5,v 1.3 2013/06/17 18:57:40 robert Exp $ -.\" -.Dd March 21, 2003 -.Dt LOGIN.ACCESS 5 -.Os HEIMDAL -.Sh NAME -.Nm login.access -.Nd login access control table -.Sh DESCRIPTION -The -.Nm login.access -file specifies on which ttys or from which hosts certain users are -allowed to login. -.Pp -At login, the -.Pa /etc/login.access -file is checked for the first entry that matches a specific user/host -or user/tty combination. That entry can either allow or deny login -access to that user. -.Pp -Each entry have three fields separated by colon: -.Bl -bullet -.It -The first field indicates the permission given if the entry matches. -It can be either -.Dq + -(allow access) -or -.Dq - -(deny access) . -.It -The second field is a comma separated list of users or groups for -which the current entry applies. NIS netgroups can used (if -configured) if preceeded by @. The magic string ALL matches all users. -A group will match if the user is a member of that group, or it is the -user's primary group. -.It -The third field is a list of ttys, or network names. A network name -can be either a hostname, a domain (indicated by a starting period), -or a netgroup. As with the user list, ALL matches anything. LOCAL -matches a string not containing a period. -.El -.Pp -If the string EXCEPT is found in either the user or from list, the -rest of the list are exceptions to the list before EXCEPT. -.Sh BUGS -If there's a user and a group with the same name, there is no way to -make the group match if the user also matches. -.Sh SEE ALSO -.Xr login 1 -.Sh AUTHORS -The -.Fn login_access -function was written by -Wietse Venema. This manual page was written for Heimdal. diff --git a/kerberosV/src/appl/login/login.access.cat5 b/kerberosV/src/appl/login/login.access.cat5 deleted file mode 100644 index 1bcce6a9160..00000000000 --- a/kerberosV/src/appl/login/login.access.cat5 +++ /dev/null @@ -1,45 +0,0 @@ - -LOGIN.ACCESS(5) BSD File Formats Manual LOGIN.ACCESS(5) - -NNAAMMEE - llooggiinn..aacccceessss -- login access control table - -DDEESSCCRRIIPPTTIIOONN - The llooggiinn..aacccceessss file specifies on which ttys or from which hosts certain - users are allowed to login. - - At login, the _/_e_t_c_/_l_o_g_i_n_._a_c_c_e_s_s file is checked for the first entry that - matches a specific user/host or user/tty combination. That entry can - either allow or deny login access to that user. - - Each entry have three fields separated by colon: - - ++oo The first field indicates the permission given if the entry matches. - It can be either ``+'' (allow access) or ``-'' (deny access) . - - ++oo The second field is a comma separated list of users or groups for - which the current entry applies. NIS netgroups can used (if config- - ured) if preceeded by @. The magic string ALL matches all users. A - group will match if the user is a member of that group, or it is the - user's primary group. - - ++oo The third field is a list of ttys, or network names. A network name - can be either a hostname, a domain (indicated by a starting period), - or a netgroup. As with the user list, ALL matches anything. LOCAL - matches a string not containing a period. - - If the string EXCEPT is found in either the user or from list, the rest - of the list are exceptions to the list before EXCEPT. - -BBUUGGSS - If there's a user and a group with the same name, there is no way to make - the group match if the user also matches. - -SSEEEE AALLSSOO - login(1) - -AAUUTTHHOORRSS - The llooggiinn__aacccceessss() function was written by Wietse Venema. This manual - page was written for Heimdal. - -HEIMDAL March 21, 2003 HEIMDAL diff --git a/kerberosV/src/appl/login/login.c b/kerberosV/src/appl/login/login.c deleted file mode 100644 index be3c4bd2874..00000000000 --- a/kerberosV/src/appl/login/login.c +++ /dev/null @@ -1,733 +0,0 @@ -/* - * Copyright (c) 1997 - 2006 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 "login_locl.h" -#ifdef HAVE_CAPABILITY_H -#include -#endif -#ifdef HAVE_SYS_CAPABILITY_H -#include -#endif -#ifdef HAVE_CRYPT_H -#include -#endif - -RCSID("$Id: login.c,v 1.6 2013/06/17 18:57:40 robert Exp $"); - -static int login_timeout = 60; - -static int -start_login_process(void) -{ - char *prog, *argv0; - prog = login_conf_get_string("login_program"); - if(prog == NULL) - return 0; - argv0 = strrchr(prog, '/'); - - if(argv0) - argv0++; - else - argv0 = prog; - - return simple_execle(prog, argv0, NULL, env); -} - -static int -start_logout_process(void) -{ - char *prog, *argv0; - pid_t pid; - - prog = login_conf_get_string("logout_program"); - if(prog == NULL) - return 0; - argv0 = strrchr(prog, '/'); - - if(argv0) - argv0++; - else - argv0 = prog; - - pid = fork(); - if(pid == 0) { - /* avoid getting signals sent to the shell */ - setpgid(0, getpid()); - return 0; - } - if(pid == -1) - err(1, "fork"); - /* wait for the real login process to exit */ -#ifdef HAVE_SETPROCTITLE - setproctitle("waitpid %d", pid); -#endif - while(1) { - int status; - int ret; - ret = waitpid(pid, &status, 0); - if(ret > 0) { - if(WIFEXITED(status) || WIFSIGNALED(status)) { - execle(prog, argv0, NULL, env); - err(1, "exec %s", prog); - } - } else if(ret < 0) - err(1, "waitpid"); - } -} - -static void -exec_shell(const char *shell, int fallback) -{ - char *sh; - const char *p; - - extend_env(NULL); - if(start_login_process() < 0) - warn("login process"); - start_logout_process(); - - p = strrchr(shell, '/'); - if(p) - p++; - else - p = shell; - if (asprintf(&sh, "-%s", p) == -1) - errx(1, "Out of memory"); - execle(shell, sh, NULL, env); - if(fallback){ - warnx("Can't exec %s, trying %s", - shell, _PATH_BSHELL); - execle(_PATH_BSHELL, "-sh", NULL, env); - err(1, "%s", _PATH_BSHELL); - } - err(1, "%s", shell); -} - -static enum { NONE = 0, AUTH_KRB5 = 2, AUTH_OTP = 3 } auth; - -#ifdef OTP -static OtpContext otp_ctx; - -static int -otp_verify(struct passwd *pwd, const char *password) -{ - return (otp_verify_user (&otp_ctx, password)); -} -#endif /* OTP */ - - -static int pag_set = 0; - -#ifdef KRB5 -static krb5_context context; -static krb5_ccache id, id2; - -static int -krb5_verify(struct passwd *pwd, const char *password) -{ - krb5_error_code ret; - krb5_principal princ; - - ret = krb5_parse_name(context, pwd->pw_name, &princ); - if(ret) - return 1; - ret = krb5_cc_new_unique(context, krb5_cc_type_memory, NULL, &id); - if(ret) { - krb5_free_principal(context, princ); - return 1; - } - ret = krb5_verify_user_lrealm(context, - princ, - id, - password, - 1, - NULL); - krb5_free_principal(context, princ); - return ret; -} - -static int -krb5_start_session (const struct passwd *pwd) -{ - krb5_error_code ret; - char residual[64]; - - /* copy credentials to file cache */ - snprintf(residual, sizeof(residual), "FILE:/tmp/krb5cc_%u", - (unsigned)pwd->pw_uid); - krb5_cc_resolve(context, residual, &id2); - ret = krb5_cc_copy_cache(context, id, id2); - if (ret == 0) - add_env("KRB5CCNAME", residual); - else { - krb5_cc_destroy (context, id2); - return ret; - } - krb5_cc_close(context, id2); - krb5_cc_destroy(context, id); - return 0; -} - -static void -krb5_finish (void) -{ - krb5_free_context(context); -} - -static void -krb5_get_afs_tokens (const struct passwd *pwd) -{ - char cell[64]; - char *pw_dir; - krb5_error_code ret; - - if (!k_hasafs ()) - return; - - ret = krb5_cc_default(context, &id2); - - if (ret == 0) { - pw_dir = pwd->pw_dir; - - if (!pag_set) { - k_setpag(); - pag_set = 1; - } - - if(k_afs_cell_of_file(pw_dir, cell, sizeof(cell)) == 0) - krb5_afslog_uid_home (context, id2, - cell, NULL, pwd->pw_uid, pwd->pw_dir); - krb5_afslog_uid_home (context, id2, NULL, NULL, - pwd->pw_uid, pwd->pw_dir); - krb5_cc_close (context, id2); - } -} - -#endif /* KRB5 */ - -static int f_flag; -static int p_flag; -#if 0 -static int r_flag; -#endif -static int version_flag; -static int help_flag; -static char *remote_host; -static char *auth_level = NULL; - -struct getargs args[] = { - { NULL, 'a', arg_string, &auth_level, "authentication mode" }, -#if 0 - { NULL, 'd' }, -#endif - { NULL, 'f', arg_flag, &f_flag, "pre-authenticated" }, - { NULL, 'h', arg_string, &remote_host, "remote host", "hostname" }, - { NULL, 'p', arg_flag, &p_flag, "don't purge environment" }, -#if 0 - { NULL, 'r', arg_flag, &r_flag, "rlogin protocol" }, -#endif - { "version", 0, arg_flag, &version_flag }, - { "help", 0, arg_flag,&help_flag, } -}; - -int nargs = sizeof(args) / sizeof(args[0]); - -static void -update_utmp(const char *username, const char *hostname, - char *tty, char *ttyn) -{ - /* - * Update the utmp files, both BSD and SYSV style. - */ - if (utmpx_login(tty, username, hostname) != 0 && !f_flag) { - printf("No utmpx entry. You must exec \"login\" from the " - "lowest level shell.\n"); - exit(1); - } - utmp_login(ttyn, username, hostname); -} - -static void -checknologin(void) -{ - FILE *f; - char buf[1024]; - - f = fopen(_PATH_NOLOGIN, "r"); - if(f == NULL) - return; - while(fgets(buf, sizeof(buf), f)) - fputs(buf, stdout); - fclose(f); - exit(0); -} - -/* print contents of a file */ -static void -show_file(const char *file) -{ - FILE *f; - char buf[BUFSIZ]; - if((f = fopen(file, "r")) == NULL) - return; - while (fgets(buf, sizeof(buf), f)) - fputs(buf, stdout); - fclose(f); -} - -/* - * Actually log in the user. `pwd' contains all the relevant - * information about the user. `ttyn' is the complete name of the tty - * and `tty' the short name. - */ - -static void -do_login(const struct passwd *pwd, char *tty, char *ttyn) -{ -#ifdef HAVE_GETSPNAM - struct spwd *sp; -#endif - int rootlogin = (pwd->pw_uid == 0); - gid_t tty_gid; - struct group *gr; - const char *home_dir; - int i; - - if(!rootlogin) - checknologin(); - -#ifdef HAVE_GETSPNAM - sp = getspnam(pwd->pw_name); -#endif - - update_utmp(pwd->pw_name, remote_host ? remote_host : "", - tty, ttyn); - - gr = getgrnam ("tty"); - if (gr != NULL) - tty_gid = gr->gr_gid; - else - tty_gid = pwd->pw_gid; - - if (chown (ttyn, pwd->pw_uid, tty_gid) < 0) { - warn("chown %s", ttyn); - if (rootlogin == 0) - exit (1); - } - - if (chmod (ttyn, S_IRUSR | S_IWUSR | S_IWGRP) < 0) { - warn("chmod %s", ttyn); - if (rootlogin == 0) - exit (1); - } - -#ifdef HAVE_SETLOGIN - if(setlogin(pwd->pw_name)){ - warn("setlogin(%s)", pwd->pw_name); - if(rootlogin == 0) - exit(1); - } -#endif - if(rootlogin == 0) { - const char *file = login_conf_get_string("limits"); - if(file == NULL) - file = _PATH_LIMITS_CONF; - - read_limits_conf(file, pwd); - } - -#ifdef HAVE_SETPCRED - if (setpcred (pwd->pw_name, NULL) == -1) - warn("setpcred(%s)", pwd->pw_name); -#endif /* HAVE_SETPCRED */ -#ifdef HAVE_INITGROUPS - if(initgroups(pwd->pw_name, pwd->pw_gid)){ - warn("initgroups(%s, %u)", pwd->pw_name, (unsigned)pwd->pw_gid); - if(rootlogin == 0) - exit(1); - } -#endif - if(do_osfc2_magic(pwd->pw_uid)) - exit(1); - if(setgid(pwd->pw_gid)){ - warn("setgid(%u)", (unsigned)pwd->pw_gid); - if(rootlogin == 0) - exit(1); - } - if(setuid(pwd->pw_uid) || (pwd->pw_uid != 0 && setuid(0) == 0)) { - warn("setuid(%u)", (unsigned)pwd->pw_uid); - if(rootlogin == 0) - exit(1); - } - - /* make sure signals are set to default actions, apparently some - OS:es like to ignore SIGINT, which is not very convenient */ - - for (i = 1; i < NSIG; ++i) - signal(i, SIG_DFL); - - /* all kinds of different magic */ - -#ifdef HAVE_GETSPNAM - check_shadow(pwd, sp); -#endif - -#if defined(HAVE_GETUDBNAM) && defined(HAVE_SETLIM) - { - struct udb *udb; - long t; - const long maxcpu = 46116860184; /* some random constant */ - udb = getudbnam(pwd->pw_name); - if(udb == UDB_NULL) - errx(1, "Failed to get UDB entry."); - t = udb->ue_pcpulim[UDBRC_INTER]; - if(t == 0 || t > maxcpu) - t = CPUUNLIM; - else - t *= 100 * CLOCKS_PER_SEC; - - if(limit(C_PROC, 0, L_CPU, t) < 0) - warn("limit C_PROC"); - - t = udb->ue_jcpulim[UDBRC_INTER]; - if(t == 0 || t > maxcpu) - t = CPUUNLIM; - else - t *= 100 * CLOCKS_PER_SEC; - - if(limit(C_JOBPROCS, 0, L_CPU, t) < 0) - warn("limit C_JOBPROCS"); - - nice(udb->ue_nice[UDBRC_INTER]); - } -#endif -#if defined(HAVE_SGI_GETCAPABILITYBYNAME) && defined(HAVE_CAP_SET_PROC) - /* XXX SGI capability hack IRIX 6.x (x >= 0?) has something - called capabilities, that allow you to give away - permissions (such as chown) to specific processes. From 6.5 - this is default on, and the default capability set seems to - not always be the empty set. The problem is that the - runtime linker refuses to do just about anything if the - process has *any* capabilities set, so we have to remove - them here (unless otherwise instructed by /etc/capability). - In IRIX < 6.5, these functions was called sgi_cap_setproc, - etc, but we ignore this fact (it works anyway). */ - { - struct user_cap *ucap = sgi_getcapabilitybyname(pwd->pw_name); - cap_t cap; - if(ucap == NULL) - cap = cap_from_text("all="); - else - cap = cap_from_text(ucap->ca_default); - if(cap == NULL) - err(1, "cap_from_text"); - if(cap_set_proc(cap) < 0) - err(1, "cap_set_proc"); - cap_free(cap); - free(ucap); - } -#endif - home_dir = pwd->pw_dir; - if (chdir(home_dir) < 0) { - fprintf(stderr, "No home directory \"%s\"!\n", pwd->pw_dir); - if (chdir("/")) - exit(0); - home_dir = "/"; - fprintf(stderr, "Logging in with home = \"/\".\n"); - } -#ifdef KRB5 - if (auth == AUTH_KRB5) { - krb5_start_session (pwd); - } - - krb5_get_afs_tokens (pwd); - - krb5_finish (); -#endif /* KRB5 */ - - add_env("PATH", _PATH_DEFPATH); - - { - const char *str = login_conf_get_string("environment"); - char buf[MAXPATHLEN]; - - if(str == NULL) { - login_read_env(_PATH_ETC_ENVIRONMENT); - } else { - while(strsep_copy(&str, ",", buf, sizeof(buf)) != -1) { - if(buf[0] == '\0') - continue; - login_read_env(buf); - } - } - } - { - const char *str = login_conf_get_string("motd"); - char buf[MAXPATHLEN]; - - if(str != NULL) { - while(strsep_copy(&str, ",", buf, sizeof(buf)) != -1) { - if(buf[0] == '\0') - continue; - show_file(buf); - } - } else { - str = login_conf_get_string("welcome"); - if(str != NULL) - show_file(str); - } - } - add_env("HOME", home_dir); - add_env("USER", pwd->pw_name); - add_env("LOGNAME", pwd->pw_name); - add_env("SHELL", pwd->pw_shell); - exec_shell(pwd->pw_shell, rootlogin); -} - -static int -check_password(struct passwd *pwd, const char *password) -{ - if(pwd->pw_passwd == NULL) - return 1; - if(pwd->pw_passwd[0] == '\0'){ -#ifdef ALLOW_NULL_PASSWORD - return password[0] != '\0'; -#else - return 1; -#endif - } - if(strcmp(pwd->pw_passwd, crypt(password, pwd->pw_passwd)) == 0) - return 0; -#ifdef KRB5 - if(krb5_verify(pwd, password) == 0) { - auth = AUTH_KRB5; - return 0; - } -#endif -#ifdef OTP - if (otp_verify (pwd, password) == 0) { - auth = AUTH_OTP; - return 0; - } -#endif - return 1; -} - -static void -usage(int status) -{ - arg_printusage(args, nargs, NULL, "[username]"); - exit(status); -} - -static RETSIGTYPE -sig_handler(int sig) -{ - if (sig == SIGALRM) - fprintf(stderr, "Login timed out after %d seconds\n", - login_timeout); - else - fprintf(stderr, "Login received signal, exiting\n"); - exit(0); -} - -int -main(int argc, char **argv) -{ - int max_tries = 5; - int try; - - char username[32]; - int optidx = 0; - - int ask = 1; - struct sigaction sa; - - setprogname(argv[0]); - -#ifdef KRB5 - { - krb5_error_code ret; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - } -#endif - - openlog("login", LOG_ODELAY | LOG_PID, LOG_AUTH); - - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, - &optidx)) - usage (1); - argc -= optidx; - argv += optidx; - - if(help_flag) - usage(0); - if (version_flag) { - print_version (NULL); - return 0; - } - - if (geteuid() != 0) - errx(1, "only root may use login, use su"); - - /* Default tty settings. */ - stty_default(); - - if(p_flag) - copy_env(); - else { - /* this set of variables is always preserved by BSD login */ - if(getenv("TERM")) - add_env("TERM", getenv("TERM")); - if(getenv("TZ")) - add_env("TZ", getenv("TZ")); - } - - if(*argv){ - if(strchr(*argv, '=') == NULL && strcmp(*argv, "-") != 0){ - strlcpy (username, *argv, sizeof(username)); - ask = 0; - } - } - -#if defined(DCE) && defined(AIX) - esetenv("AUTHSTATE", "DCE", 1); -#endif - - /* XXX should we care about environment on the command line? */ - - memset(&sa, 0, sizeof(sa)); - sa.sa_handler = sig_handler; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - sigaction(SIGALRM, &sa, NULL); - alarm(login_timeout); - - for(try = 0; try < max_tries; try++){ - struct passwd *pwd; - char password[128]; - int ret; - char ttname[32]; - char *tty, *ttyn; - char prompt[128]; -#ifdef OTP - char otp_str[256]; -#endif - - if(ask){ - f_flag = 0; -#if 0 - r_flag = 0; -#endif - ret = read_string("login: ", username, sizeof(username), 1); - if(ret == -3) - exit(0); - if(ret == -2) - sig_handler(0); /* exit */ - } - pwd = k_getpwnam(username); -#ifdef ALLOW_NULL_PASSWORD - if (pwd != NULL && (pwd->pw_passwd[0] == '\0')) { - strcpy(password,""); - } - else -#endif - - { -#ifdef OTP - if(auth_level && strcmp(auth_level, "otp") == 0 && - otp_challenge(&otp_ctx, username, - otp_str, sizeof(otp_str)) == 0) - snprintf (prompt, sizeof(prompt), "%s's %s Password: ", - username, otp_str); - else -#endif - strncpy(prompt, "Password: ", sizeof(prompt)); - - if (f_flag == 0) { - ret = read_string(prompt, password, sizeof(password), 0); - if (ret == -3) { - ask = 1; - continue; - } - if (ret == -2) - sig_handler(0); - } - } - - if(pwd == NULL){ - fprintf(stderr, "Login incorrect.\n"); - ask = 1; - continue; - } - - if(f_flag == 0 && check_password(pwd, password)){ - fprintf(stderr, "Login incorrect.\n"); - ask = 1; - continue; - } - ttyn = ttyname(STDIN_FILENO); - if(ttyn == NULL){ - snprintf(ttname, sizeof(ttname), "%s??", _PATH_TTY); - ttyn = ttname; - } - if (strncmp (ttyn, _PATH_DEV, strlen(_PATH_DEV)) == 0) - tty = ttyn + strlen(_PATH_DEV); - else - tty = ttyn; - - if (login_access (pwd, remote_host ? remote_host : tty) == 0) { - fprintf(stderr, "Permission denied\n"); - if (remote_host) - syslog(LOG_NOTICE, "%s LOGIN REFUSED FROM %s", - pwd->pw_name, remote_host); - else - syslog(LOG_NOTICE, "%s LOGIN REFUSED ON %s", - pwd->pw_name, tty); - exit (1); - } else { - if (remote_host) - syslog(LOG_NOTICE, "%s LOGIN ACCEPTED FROM %s ppid=%d", - pwd->pw_name, remote_host, (int) getppid()); - else - syslog(LOG_NOTICE, "%s LOGIN ACCEPTED ON %s ppid=%d", - pwd->pw_name, tty, (int) getppid()); - } - alarm(0); - do_login(pwd, tty, ttyn); - } - exit(1); -} diff --git a/kerberosV/src/appl/login/login.cat1 b/kerberosV/src/appl/login/login.cat1 deleted file mode 100644 index 155bd61b7bb..00000000000 --- a/kerberosV/src/appl/login/login.cat1 +++ /dev/null @@ -1,164 +0,0 @@ - -LOGIN(1) BSD General Commands Manual LOGIN(1) - -NNAAMMEE - llooggiinn -- authenticate a user and start new session - -SSYYNNOOPPSSIISS - llooggiinn [--ffpp] [--aa _l_e_v_e_l] [--hh _h_o_s_t_n_a_m_e] _[_u_s_e_r_n_a_m_e_] - -DDEESSCCRRIIPPTTIIOONN - This manual page documents the llooggiinn program distributed with the Heim- - dal Kerberos 5 implementation, it may differ in important ways from your - system version. - - The llooggiinn programs logs users into the system. It is intended to be run - by system daemons like getty(8) or telnetd(8). If you are already logged - in, but want to change to another user, you should use su(1). - - A username can be given on the command line, else one will be prompted - for. - - A password is required to login, unless the --ff option is given (indicat- - ing that the calling program has already done proper authentication). - With --ff the user will be logged in without further questions. - - For password authentication Kerberos 5, Kerberos 4 (if compiled in), OTP - (if compiled in) and local (_/_e_t_c_/_p_a_s_s_w_d) passwords are supported. OTP - will be used if the the user is registered to use it, and llooggiinn is given - the option --aa otp. When using OTP, a challenge is shown to the user. - - Further options are: - - --aa _s_t_r_i_n_g - Which authentication mode to use, the only supported value is - currently ``otp''. - - --ff Indicates that the user is already authenticated. This happens, - for instance, when login is started by telnetd, and the user has - proved authentic via Kerberos. - - --hh _h_o_s_t_n_a_m_e - Indicates which host the user is logging in from. This is passed - from telnetd, and is entered into the login database. - - --pp This tells llooggiinn to preserve all environment variables. If not - given, only the TERM and TZ variables are preserved. It could be - a security risk to pass random variables to llooggiinn or the user - shell, so the calling daemon should make sure it only passes - ``safe'' variables. - - The process of logging user in proceeds as follows. - - First a check is made that logins are allowed at all. This usually means - checking _/_e_t_c_/_n_o_l_o_g_i_n. If it exists, and the user trying to login is not - root, the contents is printed, and then login exits. - - Then various system parameters are set up, like changing the owner of the - tty to the user, setting up signals, setting the group list, and user and - group id. Also various machine specific tasks are performed. - - Next llooggiinn changes to the users home directory, or if that fails, to _/. - The environment is setup, by adding some required variables (such as - PATH), and also authentication related ones (such as KRB5CCNAME). If an - environment file exists (_/_e_t_c_/_e_n_v_i_r_o_n_m_e_n_t), variables are set according - to it. - - If one or more login message files are configured, their contents is - printed to the terminal. - - If a login time command is configured, it is executed. A logout time com- - mand can also be configured, which makes llooggiinn fork, and wait for the - user shell to exit, and then run the command. This can be used to clean - up user credentials. - - Finally, the user's shell is executed. If the user logging in is root, - and root's login shell does not exist, a default shell (usually _/_b_i_n_/_s_h) - is also tried before giving up. - -EENNVVIIRROONNMMEENNTT - These environment variables are set by login (not including ones set by - _/_e_t_c_/_e_n_v_i_r_o_n_m_e_n_t): - - PATH the default system path - HOME the user's home directory (or possibly _/) - USER, LOGNAME both set to the username - SHELL the user's shell - TERM, TZ set to whatever is passed to llooggiinn - KRB5CCNAME if the password is verified via Kerberos 5, this will - point to the credentials cache file - KRBTKFILE if the password is verified via Kerberos 4, this will - point to the ticket file - -FFIILLEESS - /etc/environment - Contains a set of environment variables that should be set in - addition to the ones above. It should contain sh-style assign- - ments like ``VARIABLE=value''. Note that they are not parsed the - way a shell would. No variable expansion is performed, and all - strings are literal, and quotation marks should not be used. - Everything after a hash mark is considered a comment. The follow- - ing are all different (the last will set the variable BAR, not - FOO). - - FOO=this is a string - FOO="this is a string" - BAR= FOO='this is a string' - /etc/login.access - See login.access(5). - /etc/login.conf - This is a termcap style configuration file, that contains various - settings used by llooggiinn. Currently only the ``default'' capabil- - ity record is used. The possible capability strings include: - - environment - This is a comma separated list of environment files that - are read in the order specified. If this is missing the - default _/_e_t_c_/_e_n_v_i_r_o_n_m_e_n_t is used. - login_program - This program will be executed just before the user's - shell is started. It will be called without arguments. - logout_program - This program will be executed just after the user's shell - has terminated. It will be called without arguments. This - program will be the parent process of the spawned shell. - motd A comma separated list of text files that will be printed - to the user's terminal before starting the shell. The - string welcome works similarly, but points to a single - file. - limits Points to a file containing ulimit settings for various - users. Syntax is inspired by what pam_limits uses, and - the default is _/_e_t_c_/_s_e_c_u_r_i_t_y_/_l_i_m_i_t_s_._c_o_n_f. - /etc/nologin - If it exists, login is denied to all but root. The contents of - this file is printed before login exits. - - Other llooggiinn programs typically print all sorts of information by default, - such as last time you logged in, if you have mail, and system message - files. This version of llooggiinn does not, so there is no reason for - _._h_u_s_h_l_o_g_i_n files or similar. We feel that these tasks are best left to - the user's shell, but the login_program facility allows for a shell inde- - pendent solution, if that is desired. - -EEXXAAMMPPLLEESS - A _l_o_g_i_n_._c_o_n_f file could look like: - - default:\ - :motd=/etc/motd,/etc/motd.local:\ - :limits=/etc/limits.conf: - - The _l_i_m_i_t_s_._c_o_n_f file consists of a table with four whitespace separated - fields. First field is a username or a groupname (prefixed with `@'), or - `*'. Second field is `soft', `hard', or `-' (the last meaning both soft - and hard). Third field is a limit name (such as `cpu' or `core'). Last - field is the limit value (a number or `-' for unlimited). In the case of - data sizes, the value is in kilobytes, and cputime is in minutes. - -SSEEEE AALLSSOO - su(1), login.access(5), getty(8), telnetd(8) - -AAUUTTHHOORRSS - This login program was written for the Heimdal Kerberos 5 implementation. - The login.access code was written by Wietse Venema. - -HEIMDAL April 22, 2005 HEIMDAL diff --git a/kerberosV/src/appl/login/login_access.c b/kerberosV/src/appl/login/login_access.c deleted file mode 100644 index dea99a90ac1..00000000000 --- a/kerberosV/src/appl/login/login_access.c +++ /dev/null @@ -1,277 +0,0 @@ -/************************************************************************ -* Copyright 1995 by Wietse Venema. All rights reserved. Some individual -* files may be covered by other copyrights. -* -* This material was originally written and compiled by Wietse Venema at -* Eindhoven University of Technology, The Netherlands, in 1990, 1991, -* 1992, 1993, 1994 and 1995. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that this entire copyright notice -* is duplicated in all such copies. -* -* This software is provided "as is" and without any expressed or implied -* warranties, including, without limitation, the implied warranties of -* merchantibility and fitness for any particular purpose. -************************************************************************/ - /* - * This module implements a simple but effective form of login access - * control based on login names and on host (or domain) names, internet - * addresses (or network numbers), or on terminal line names in case of - * non-networked logins. Diagnostics are reported through syslog(3). - * - * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. - */ - -#include "login_locl.h" - -RCSID("$Id: login_access.c,v 1.5 2013/06/17 18:57:40 robert Exp $"); - - /* Delimiters for fields and for lists of users, ttys or hosts. */ - -static char fs[] = ":"; /* field separator */ -static char sep[] = ", \t"; /* list-element separator */ - - /* Constants to be used in assignments only, not in comparisons... */ - -#define YES 1 -#define NO 0 - - /* - * A structure to bundle up all login-related information to keep the - * functional interfaces as generic as possible. - */ -struct login_info { - struct passwd *user; - char *from; -}; - -static int list_match(char *list, struct login_info *item, - int (*match_fn)(char *, struct login_info *)); -static int user_match(char *tok, struct login_info *item); -static int from_match(char *tok, struct login_info *item); -static int string_match(char *tok, char *string); - -/* login_access - match username/group and host/tty with access control file */ - -int login_access(struct passwd *user, char *from) -{ - struct login_info item; - FILE *fp; - char line[BUFSIZ]; - char *perm; /* becomes permission field */ - char *users; /* becomes list of login names */ - char *froms; /* becomes list of terminals or hosts */ - int match = NO; - int end; - int lineno = 0; /* for diagnostics */ - char *foo; - - /* - * Bundle up the arguments to avoid unnecessary clumsiness lateron. - */ - item.user = user; - item.from = from; - - /* - * Process the table one line at a time and stop at the first match. - * Blank lines and lines that begin with a '#' character are ignored. - * Non-comment lines are broken at the ':' character. All fields are - * mandatory. The first field should be a "+" or "-" character. A - * non-existing table means no access control. - */ - - if ((fp = fopen(_PATH_LOGACCESS, "r")) != 0) { - while (!match && fgets(line, sizeof(line), fp)) { - lineno++; - if (line[end = strlen(line) - 1] != '\n') { - syslog(LOG_ERR, "%s: line %d: missing newline or line too long", - _PATH_LOGACCESS, lineno); - continue; - } - if (line[0] == '#') - continue; /* comment line */ - while (end > 0 && isspace((unsigned char)line[end - 1])) - end--; - line[end] = 0; /* strip trailing whitespace */ - if (line[0] == 0) /* skip blank lines */ - continue; - foo = NULL; - if (!(perm = strtok_r(line, fs, &foo)) - || !(users = strtok_r(NULL, fs, &foo)) - || !(froms = strtok_r(NULL, fs, &foo)) - || strtok_r(NULL, fs, &foo)) { - syslog(LOG_ERR, "%s: line %d: bad field count", - _PATH_LOGACCESS, - lineno); - continue; - } - if (perm[0] != '+' && perm[0] != '-') { - syslog(LOG_ERR, "%s: line %d: bad first field", - _PATH_LOGACCESS, - lineno); - continue; - } - match = (list_match(froms, &item, from_match) - && list_match(users, &item, user_match)); - } - fclose(fp); - } else if (errno != ENOENT) { - syslog(LOG_ERR, "cannot open %s: %m", _PATH_LOGACCESS); - } - return (match == 0 || (line[0] == '+')); -} - -/* list_match - match an item against a list of tokens with exceptions */ - -static int -list_match(char *list, - struct login_info *item, - int (*match_fn)(char *, struct login_info *)) -{ - char *tok; - int match = NO; - char *foo = NULL; - - /* - * Process tokens one at a time. We have exhausted all possible matches - * when we reach an "EXCEPT" token or the end of the list. If we do find - * a match, look for an "EXCEPT" list and recurse to determine whether - * the match is affected by any exceptions. - */ - - for (tok = strtok_r(list, sep, &foo); - tok != NULL; - tok = strtok_r(NULL, sep, &foo)) { - if (strcasecmp(tok, "EXCEPT") == 0) /* EXCEPT: give up */ - break; - if ((match = (*match_fn) (tok, item)) != 0) /* YES */ - break; - } - /* Process exceptions to matches. */ - - if (match != NO) { - while ((tok = strtok_r(NULL, sep, &foo)) && strcasecmp(tok, "EXCEPT")) - /* VOID */ ; - if (tok == 0 || list_match(NULL, item, match_fn) == NO) - return (match); - } - return (NO); -} - -/* myhostname - figure out local machine name */ - -static char *myhostname(void) -{ - static char name[MAXHOSTNAMELEN + 1] = ""; - - if (name[0] == 0) { - gethostname(name, sizeof(name)); - name[MAXHOSTNAMELEN] = 0; - } - return (name); -} - -/* netgroup_match - match group against machine or user */ - -static int netgroup_match(char *group, char *machine, char *user) -{ -#ifdef HAVE_YP_GET_DEFAULT_DOMAIN - static char *mydomain = 0; - - if (mydomain == 0) - yp_get_default_domain(&mydomain); - return (innetgr(group, machine, user, mydomain)); -#else - syslog(LOG_ERR, "NIS netgroup support not configured"); - return 0; -#endif -} - -/* user_match - match a username against one token */ - -static int user_match(char *tok, struct login_info *item) -{ - char *string = item->user->pw_name; - struct login_info fake_item; - struct group *group; - int i; - char *at; - - /* - * If a token has the magic value "ALL" the match always succeeds. - * Otherwise, return YES if the token fully matches the username, if the - * token is a group that contains the username, or if the token is the - * name of the user's primary group. - */ - - if ((at = strchr(tok + 1, '@')) != 0) { /* split user@host pattern */ - *at = 0; - fake_item.from = myhostname(); - return (user_match(tok, item) && from_match(at + 1, &fake_item)); - } else if (tok[0] == '@') { /* netgroup */ - return (netgroup_match(tok + 1, (char *) 0, string)); - } else if (string_match(tok, string)) { /* ALL or exact match */ - return (YES); - } else if ((group = getgrnam(tok)) != 0) { /* try group membership */ - if (item->user->pw_gid == group->gr_gid) - return (YES); - for (i = 0; group->gr_mem[i]; i++) - if (strcasecmp(string, group->gr_mem[i]) == 0) - return (YES); - } - return (NO); -} - -/* from_match - match a host or tty against a list of tokens */ - -static int from_match(char *tok, struct login_info *item) -{ - char *string = item->from; - int tok_len; - int str_len; - - /* - * If a token has the magic value "ALL" the match always succeeds. Return - * YES if the token fully matches the string. If the token is a domain - * name, return YES if it matches the last fields of the string. If the - * token has the magic value "LOCAL", return YES if the string does not - * contain a "." character. If the token is a network number, return YES - * if it matches the head of the string. - */ - - if (tok[0] == '@') { /* netgroup */ - return (netgroup_match(tok + 1, string, (char *) 0)); - } else if (string_match(tok, string)) { /* ALL or exact match */ - return (YES); - } else if (tok[0] == '.') { /* domain: match last fields */ - if ((str_len = strlen(string)) > (tok_len = strlen(tok)) - && strcasecmp(tok, string + str_len - tok_len) == 0) - return (YES); - } else if (strcasecmp(tok, "LOCAL") == 0) { /* local: no dots */ - if (strchr(string, '.') == 0) - return (YES); - } else if (tok[(tok_len = strlen(tok)) - 1] == '.' /* network */ - && strncmp(tok, string, tok_len) == 0) { - return (YES); - } - return (NO); -} - -/* string_match - match a string against one token */ - -static int string_match(char *tok, char *string) -{ - - /* - * If the token has the magic value "ALL" the match always succeeds. - * Otherwise, return YES if the token fully matches the string. - */ - - if (strcasecmp(tok, "ALL") == 0) { /* all: always matches */ - return (YES); - } else if (strcasecmp(tok, string) == 0) { /* try exact match */ - return (YES); - } - return (NO); -} diff --git a/kerberosV/src/appl/login/login_locl.h b/kerberosV/src/appl/login/login_locl.h deleted file mode 100644 index 7fc758db73c..00000000000 --- a/kerberosV/src/appl/login/login_locl.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) 1997 - 2005 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: login_locl.h,v 1.3 2013/06/17 18:57:40 robert Exp $ */ - -#ifndef __LOGIN_LOCL_H__ -#define __LOGIN_LOCL_H__ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_PATHS_H -#include -#endif -#ifdef HAVE_UTMP_H -#include -#endif -#ifdef HAVE_UTMPX_H -#include -#endif -#ifdef HAVE_UDB_H -#include -#endif -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif -#ifdef HAVE_SYS_CATEGORY_H -#include -#endif -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_SHADOW_H -#include -#endif -#ifdef HAVE_NETGROUP_H -#include -#endif -#ifdef HAVE_RPCSVC_YPCLNT_H -#include -#endif -#ifdef KRB5 -#include -#endif -#include - -#ifdef OTP -#include -#endif - -#ifdef HAVE_OSFC2 -#define getargs OSFgetargs -#include "/usr/include/prot.h" -#undef getargs -#endif - -#ifndef _PATH_BSHELL -#define _PATH_BSHELL "/bin/sh" -#endif -#ifndef _PATH_TTY -#define _PATH_TTY "/dev/tty" -#endif -#ifndef _PATH_DEV -#define _PATH_DEV "/dev/" -#endif -#ifndef _PATH_WTMP -#ifdef WTMP_FILE -#define _PATH_WTMP WTMP_FILE -#else -#define _PATH_WTMP "/var/adm/wtmp" -#endif -#endif -#ifndef _PATH_UTMP -#ifdef UTMP_FILE -#define _PATH_UTMP UTMP_FILE -#else -#define _PATH_UTMP "/var/adm/utmp" -#endif -#endif - -/* if cygwin doesnt have WTMPX_FILE, it uses wtmp for wtmpx - * http://www.cygwin.com/ml/cygwin/2006-12/msg00630.html */ -#ifdef __CYGWIN__ -#ifndef WTMPX_FILE -#define WTMPX_FILE WTMP_FILE -#endif -#endif - -#ifndef _PATH_LOGACCESS -#define _PATH_LOGACCESS SYSCONFDIR "/login.access" -#endif /* _PATH_LOGACCESS */ - -#ifndef _PATH_LOGIN_CONF -#define _PATH_LOGIN_CONF SYSCONFDIR "/login.conf" -#endif /* _PATH_LOGIN_CONF */ - -#ifndef _PATH_DEFPATH -#define _PATH_DEFPATH "/usr/bin:/bin" -#endif - -#include "loginpaths.h" - -struct spwd; - -extern char **env; -extern int num_env; - -#include "login-protos.h" - -#endif /* __LOGIN_LOCL_H__ */ diff --git a/kerberosV/src/appl/login/loginpaths.h b/kerberosV/src/appl/login/loginpaths.h deleted file mode 100644 index af1f0c29a88..00000000000 --- a/kerberosV/src/appl/login/loginpaths.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1997 - 2005 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: loginpaths.h,v 1.1 2013/06/17 18:57:40 robert Exp $ */ - -#ifndef __LOGIN_PATH_H -#define __LOGIN_PATH_H - -#ifndef _PATH_NOLOGIN -#define _PATH_NOLOGIN "/etc/nologin" -#endif - -#ifndef _PATH_ETC_ENVIRONMENT -#define _PATH_ETC_ENVIRONMENT SYSCONFDIR "/environment" -#endif - -#ifndef _PATH_LIMITS_CONF -#define _PATH_LIMITS_CONF "/etc/security/limits.conf" -#endif - - -#endif /* __LOGIN_PATH_H */ diff --git a/kerberosV/src/appl/login/osfc2.c b/kerberosV/src/appl/login/osfc2.c deleted file mode 100644 index 74ca21f1988..00000000000 --- a/kerberosV/src/appl/login/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 "login_locl.h" -RCSID("$Id: osfc2.c,v 1.4 2013/06/17 18:57:40 robert Exp $"); - -int -do_osfc2_magic(uid_t uid) -{ -#ifdef HAVE_OSFC2 - struct es_passwd *epw; - char *argv[2]; - - /* fake */ - argv[0] = (char*)getprogname(); - 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 is 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/kerberosV/src/appl/login/read_string.c b/kerberosV/src/appl/login/read_string.c deleted file mode 100644 index 96a7461a024..00000000000 --- a/kerberosV/src/appl/login/read_string.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "login_locl.h" - -RCSID("$Id: read_string.c,v 1.4 2013/06/17 18:57:40 robert Exp $"); - -static sig_atomic_t intr_flag; - -static void -intr(int sig) -{ - intr_flag++; -} - -#ifndef NSIG -#define NSIG 47 -#endif - -int -read_string(const char *prompt, char *buf, size_t len, int echo) -{ - struct sigaction sigs[NSIG]; - int oksigs[NSIG]; - struct sigaction sa; - FILE *tty; - int ret = 0; - int of = 0; - int i; - int c; - char *p; - - struct termios t_new, t_old; - - memset(&oksigs, 0, sizeof(oksigs)); - - memset(&sa, 0, sizeof(sa)); - sa.sa_handler = intr; - sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; - for(i = 1; i < sizeof(sigs) / sizeof(sigs[0]); i++) - if (i != SIGALRM) - if (sigaction(i, &sa, &sigs[i]) == 0) - oksigs[i] = 1; - - if((tty = fopen("/dev/tty", "r")) == NULL) - tty = stdin; - - fprintf(stderr, "%s", prompt); - fflush(stderr); - - if(echo == 0){ - tcgetattr(fileno(tty), &t_old); - memcpy(&t_new, &t_old, sizeof(t_new)); - t_new.c_lflag &= ~ECHO; - tcsetattr(fileno(tty), TCSANOW, &t_new); - } - intr_flag = 0; - p = buf; - while(intr_flag == 0){ - c = getc(tty); - if(c == EOF){ - if(!ferror(tty)) - ret = 1; - break; - } - if(c == '\n') - break; - if(of == 0) - *p++ = c; - of = (p == buf + len); - } - if(of) - p--; - *p = 0; - - if(echo == 0){ - printf("\n"); - tcsetattr(fileno(tty), TCSANOW, &t_old); - } - - if(tty != stdin) - fclose(tty); - - for(i = 1; i < sizeof(sigs) / sizeof(sigs[0]); i++) - if (oksigs[i]) - sigaction(i, &sigs[i], NULL); - - if(ret) - return -3; - if(intr_flag) - return -2; - if(of) - return -1; - return 0; -} - - -#if 0 -int main() -{ - char s[128]; - int ret; - ret = read_string("foo: ", s, sizeof(s), 0); - printf("%d ->%s<-\n", ret, s); -} -#endif diff --git a/kerberosV/src/appl/login/shadow.c b/kerberosV/src/appl/login/shadow.c deleted file mode 100644 index 26dc4545416..00000000000 --- a/kerberosV/src/appl/login/shadow.c +++ /dev/null @@ -1,95 +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 "login_locl.h" - -RCSID("$Id: shadow.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -#ifdef HAVE_SHADOW_H - -#ifndef _PATH_CHPASS -#define _PATH_CHPASS "/usr/bin/passwd" -#endif - -static int -change_passwd(const struct passwd *who) -{ - int status; - pid_t pid; - - switch (pid = fork()) { - case -1: - printf("fork /bin/passwd"); - exit(1); - case 0: - execlp(_PATH_CHPASS, "passwd", who->pw_name, (char *) 0); - exit(1); - default: - waitpid(pid, &status, 0); - return (status); - } -} - -void -check_shadow(const struct passwd *pw, const struct spwd *sp) -{ - long today; - - today = time(0)/(24L * 60 * 60); - - if (sp == NULL) - return; - - if (sp->sp_expire > 0) { - if (today >= sp->sp_expire) { - printf("Your account has expired.\n"); - sleep(1); - exit(0); - } else if (sp->sp_expire - today < 14) { - printf("Your account will expire in %d days.\n", - (int)(sp->sp_expire - today)); - } - } - - if (sp->sp_max > 0) { - if (today >= (sp->sp_lstchg + sp->sp_max)) { - printf("Your password has expired. Choose a new one.\n"); - change_passwd(pw); - } else if (sp->sp_warn > 0 - && (today > (sp->sp_lstchg + sp->sp_max - sp->sp_warn))) { - printf("Your password will expire in %d days.\n", - (int)(sp->sp_lstchg + sp->sp_max - today)); - } - } -} -#endif /* HAVE_SHADOW_H */ diff --git a/kerberosV/src/appl/login/stty_default.c b/kerberosV/src/appl/login/stty_default.c deleted file mode 100644 index bab47f2e605..00000000000 --- a/kerberosV/src/appl/login/stty_default.c +++ /dev/null @@ -1,100 +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. - */ - -#include "login_locl.h" - -RCSID("$Id: stty_default.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -#include - -/* HP-UX 9.0 termios doesn't define these */ -#ifndef FLUSHO -#define FLUSHO 0 -#endif - -#ifndef XTABS -#define XTABS 0 -#endif - -#ifndef OXTABS -#define OXTABS XTABS -#endif - -/* Ultrix... */ -#ifndef ECHOPRT -#define ECHOPRT 0 -#endif - -#ifndef ECHOCTL -#define ECHOCTL 0 -#endif - -#ifndef ECHOKE -#define ECHOKE 0 -#endif - -#ifndef IMAXBEL -#define IMAXBEL 0 -#endif - -#define Ctl(x) ((x) ^ 0100) - -void -stty_default(void) -{ - struct termios termios; - - /* - * Finalize the terminal settings. Some systems default to 8 bits, - * others to 7, so we should leave that alone. - */ - tcgetattr(0, &termios); - - termios.c_iflag |= (BRKINT|IGNPAR|ICRNL|IXON|IMAXBEL); - termios.c_iflag &= ~IXANY; - - termios.c_lflag |= (ISIG|IEXTEN|ICANON|ECHO|ECHOE|ECHOK|ECHOCTL|ECHOKE); - termios.c_lflag &= ~(ECHOPRT|TOSTOP|FLUSHO); - - termios.c_oflag |= (OPOST|ONLCR); - termios.c_oflag &= ~OXTABS; - - termios.c_cc[VINTR] = Ctl('C'); - termios.c_cc[VERASE] = Ctl('H'); - termios.c_cc[VKILL] = Ctl('U'); - termios.c_cc[VEOF] = Ctl('D'); - - termios.c_cc[VSUSP] = Ctl('Z'); - - tcsetattr(0, TCSANOW, &termios); -} diff --git a/kerberosV/src/appl/login/tty.c b/kerberosV/src/appl/login/tty.c deleted file mode 100644 index ad83bb0aadf..00000000000 --- a/kerberosV/src/appl/login/tty.c +++ /dev/null @@ -1,70 +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. - */ - -#include "login_locl.h" - -RCSID("$Id: tty.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * Clean the tty name. Return a pointer to the cleaned version. - */ - -char * -clean_ttyname (char *tty) -{ - char *res = tty; - - if (strncmp (res, _PATH_DEV, strlen(_PATH_DEV)) == 0) - res += strlen(_PATH_DEV); - if (strncmp (res, "pty/", 4) == 0) - res += 4; - if (strncmp (res, "ptym/", 5) == 0) - res += 5; - return res; -} - -/* - * Generate a name usable as an `ut_id', typically without `tty'. - */ - -char * -make_id (char *tty) -{ - char *res = tty; - - if (strncmp (res, "pts/", 4) == 0) - res += 4; - if (strncmp (res, "tty", 3) == 0) - res += 3; - return res; -} diff --git a/kerberosV/src/appl/login/utmp_login.c b/kerberosV/src/appl/login/utmp_login.c deleted file mode 100644 index 10a43c126c0..00000000000 --- a/kerberosV/src/appl/login/utmp_login.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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 "login_locl.h" - -RCSID("$Id: utmp_login.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* try to put something useful from hostname into dst, dst_sz: - * full name, first component or address */ - -void -shrink_hostname (const char *hostname, - char *dst, size_t dst_sz) -{ - char local_hostname[MaxHostNameLen]; - char *ld, *hd; - int ret; - struct addrinfo *ai; - - if (strlen(hostname) < dst_sz) { - strlcpy (dst, hostname, dst_sz); - return; - } - gethostname (local_hostname, sizeof(local_hostname)); - hd = strchr (hostname, '.'); - ld = strchr (local_hostname, '.'); - if (hd != NULL && ld != NULL && strcmp(hd, ld) == 0 - && hd - hostname < dst_sz) { - strlcpy (dst, hostname, dst_sz); - dst[hd - hostname] = '\0'; - return; - } - - ret = getaddrinfo (hostname, NULL, NULL, &ai); - if (ret) { - strncpy (dst, hostname, dst_sz); - return; - } - ret = getnameinfo (ai->ai_addr, ai->ai_addrlen, - dst, dst_sz, - NULL, 0, - NI_NUMERICHOST); - freeaddrinfo (ai); - if (ret) { - strncpy (dst, hostname, dst_sz); - return; - } -} - -/* update utmp and wtmp - the BSD way */ - -#if !defined(HAVE_UTMPX_H) || (defined(WTMP_FILE) && !defined(WTMPX_FILE)) - -void -prepare_utmp (struct utmp *utmp, char *tty, - const char *username, const char *hostname) -{ - char *ttyx = clean_ttyname (tty); - - memset(utmp, 0, sizeof(*utmp)); - utmp->ut_time = time(NULL); - strncpy(utmp->ut_line, ttyx, sizeof(utmp->ut_line)); - strncpy(utmp->ut_name, username, sizeof(utmp->ut_name)); - -# ifdef HAVE_STRUCT_UTMP_UT_USER - strncpy(utmp->ut_user, username, sizeof(utmp->ut_user)); -# endif - -# ifdef HAVE_STRUCT_UTMP_UT_ADDR - if (hostname[0]) { - struct hostent *he; - if ((he = gethostbyname(hostname))) - memcpy(&utmp->ut_addr, he->h_addr_list[0], - sizeof(utmp->ut_addr)); - } -# endif - -# ifdef HAVE_STRUCT_UTMP_UT_HOST - shrink_hostname (hostname, utmp->ut_host, sizeof(utmp->ut_host)); -# endif - -# ifdef HAVE_STRUCT_UTMP_UT_TYPE - utmp->ut_type = USER_PROCESS; -# endif - -# ifdef HAVE_STRUCT_UTMP_UT_PID - utmp->ut_pid = getpid(); -# endif - -# ifdef HAVE_STRUCT_UTMP_UT_ID - strncpy(utmp->ut_id, make_id(ttyx), sizeof(utmp->ut_id)); -# endif -} -#endif - -#ifdef HAVE_UTMPX_H -void utmp_login(char *tty, const char *username, const char *hostname) -{ - return; -} -#else - -void utmp_login(char *tty, const char *username, const char *hostname) -{ - struct utmp utmp; - int fd; - - prepare_utmp (&utmp, tty, username, hostname); - -#ifdef HAVE_SETUTENT - utmpname(_PATH_UTMP); - setutent(); - pututline(&utmp); - endutent(); -#else - -#ifdef HAVE_TTYSLOT - { - int ttyno; - ttyno = ttyslot(); - if (ttyno > 0 && (fd = open(_PATH_UTMP, O_WRONLY, 0)) >= 0) { - lseek(fd, (long)(ttyno * sizeof(struct utmp)), SEEK_SET); - write(fd, &utmp, sizeof(struct utmp)); - close(fd); - } - } -#endif /* HAVE_TTYSLOT */ -#endif /* HAVE_SETUTENT */ - - if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) >= 0) { - write(fd, &utmp, sizeof(struct utmp)); - close(fd); - } -} - -#endif /* !HAVE_UTMPX_H */ diff --git a/kerberosV/src/appl/login/utmpx_login.c b/kerberosV/src/appl/login/utmpx_login.c deleted file mode 100644 index 6da803b57ba..00000000000 --- a/kerberosV/src/appl/login/utmpx_login.c +++ /dev/null @@ -1,105 +0,0 @@ -/************************************************************************ -* Copyright 1995 by Wietse Venema. All rights reserved. Some individual -* files may be covered by other copyrights. -* -* This material was originally written and compiled by Wietse Venema at -* Eindhoven University of Technology, The Netherlands, in 1990, 1991, -* 1992, 1993, 1994 and 1995. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that this entire copyright notice -* is duplicated in all such copies. -* -* This software is provided "as is" and without any expressed or implied -* warranties, including, without limitation, the implied warranties of -* merchantibility and fitness for any particular purpose. -************************************************************************/ -/* Author: Wietse Venema */ - -#include "login_locl.h" - -RCSID("$Id: utmpx_login.c,v 1.6 2013/06/17 18:57:40 robert Exp $"); - -/* utmpx_login - update utmp and wtmp after login */ - -#ifndef HAVE_UTMPX_H -int utmpx_login(char *line, const char *user, const char *host) { return 0; } -#else - -static void -utmpx_update(struct utmpx *ut, char *line, const char *user, const char *host) -{ - struct timeval tmp; - char *clean_tty = clean_ttyname(line); - - strncpy(ut->ut_line, clean_tty, sizeof(ut->ut_line)); -#ifdef HAVE_STRUCT_UTMPX_UT_ID - strncpy(ut->ut_id, make_id(clean_tty), sizeof(ut->ut_id)); -#endif - strncpy(ut->ut_user, user, sizeof(ut->ut_user)); - shrink_hostname (host, ut->ut_host, sizeof(ut->ut_host)); -#ifdef HAVE_STRUCT_UTMPX_UT_SYSLEN - ut->ut_syslen = strlen(host) + 1; - if (ut->ut_syslen > sizeof(ut->ut_host)) - ut->ut_syslen = sizeof(ut->ut_host); -#endif - ut->ut_type = USER_PROCESS; - gettimeofday (&tmp, 0); - ut->ut_tv.tv_sec = tmp.tv_sec; - ut->ut_tv.tv_usec = tmp.tv_usec; - pututxline(ut); -#ifdef WTMPX_FILE - updwtmpx(WTMPX_FILE, ut); -#elif defined(WTMP_FILE) - { /* XXX should be removed, just drop wtmp support */ - struct utmp utmp; - int fd; - - prepare_utmp (&utmp, line, user, host); - if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) >= 0) { - write(fd, &utmp, sizeof(struct utmp)); - close(fd); - } - } -#endif -} - -int -utmpx_login(char *line, const char *user, const char *host) -{ - struct utmpx *ut, save_ut; - pid_t mypid = getpid(); - int ret = (-1); - - /* - * SYSV4 ttymon and login use tty port names with the "/dev/" prefix - * stripped off. Rlogind and telnetd, on the other hand, make utmpx - * entries with device names like /dev/pts/nnn. We therefore cannot use - * getutxline(). Return nonzero if no utmp entry was found with our own - * process ID for a login or user process. - */ - - while ((ut = getutxent())) { - /* Try to find a reusable entry */ - if (ut->ut_pid == mypid - && ( ut->ut_type == INIT_PROCESS - || ut->ut_type == LOGIN_PROCESS - || ut->ut_type == USER_PROCESS)) { - save_ut = *ut; - utmpx_update(&save_ut, line, user, host); - ret = 0; - break; - } - } - if (ret == -1) { - /* Grow utmpx file by one record. */ - struct utmpx newut; - memset(&newut, 0, sizeof(newut)); - newut.ut_pid = mypid; - utmpx_update(&newut, line, user, host); - ret = 0; - } - endutxent(); - return (ret); -} -#endif /* HAVE_UTMPX_H */ diff --git a/kerberosV/src/appl/otp/ChangeLog b/kerberosV/src/appl/otp/ChangeLog deleted file mode 100644 index 76df17c6c1d..00000000000 --- a/kerberosV/src/appl/otp/ChangeLog +++ /dev/null @@ -1,58 +0,0 @@ -2006-10-07 Love Hörnquist Åstrand - - * Makefile.am: Add man_MANS to EXTRA_DIST - -2005-05-29 Love Hörquist Åstrand - - * Makefile.am: add LIB_roken as a explit dependency - -2003-09-03 Love Hörquist Åstrand - - * otpprint.c: s/des_read_pw_string/UI_UTIL_read_pw_string/ - - * otp.c: s/des_read_pw_string/UI_UTIL_read_pw_string/ - -2003-02-25 Love Hörquist Åstrand - - * otp.c: remove \n from errx, from NetBSD - -2000-11-29 Johan Danielsson - - * otpprint.1: sort parameters and close a list - - * otp.1: sort parameters and close a list - -1999-09-14 Assar Westerlund - - * otp.c (verify_user_otp): check return value from - des_read_pw_string - -Thu Apr 1 16:51:07 1999 Johan Danielsson - - * otpprint.c: use getarg - - * otp.c: use getarg - -Thu Mar 18 12:08:58 1999 Johan Danielsson - - * Makefile.am: include Makefile.am.common - -Thu Mar 4 19:45:40 1999 Johan Danielsson - - * Makefile.am: DESTDIR - -Sat Feb 27 19:44:25 1999 Johan Danielsson - - * Makefile.am: add - -Sun Nov 22 10:32:50 1998 Assar Westerlund - - * otpprint.c: more braces - - * Makefile.in (WFLAGS): set - -Sun Dec 21 09:31:30 1997 Assar Westerlund - - * otp.c (renew): don't set the OTP if the reading of the string - fails. - diff --git a/kerberosV/src/appl/otp/Makefile.am b/kerberosV/src/appl/otp/Makefile.am deleted file mode 100644 index 6e6b3e0e438..00000000000 --- a/kerberosV/src/appl/otp/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:36 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(INCLUDE_hcrypto) - -bin_PROGRAMS = otp otpprint -bin_SUIDS = otp -otp_SOURCES = otp.c otp_locl.h -otp_LDADD = $(LIB_hcrypto) $(LIB_roken) $(top_builddir)/lib/otp/libotp.la -otpprint_SOURCES = otpprint.c otp_locl.h - -otpprint_LDADD = $(LIB_hcrypto) $(LIB_roken) $(top_builddir)/lib/otp/libotp.la - -man_MANS = otp.1 otpprint.1 - -EXTRA_DIST = NTMakefile $(man_MANS) diff --git a/kerberosV/src/appl/otp/Makefile.in b/kerberosV/src/appl/otp/Makefile.in deleted file mode 100644 index 77b193353c9..00000000000 --- a/kerberosV/src/appl/otp/Makefile.in +++ /dev/null @@ -1,958 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:36 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:36 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:36 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -bin_PROGRAMS = otp$(EXEEXT) otpprint$(EXEEXT) -subdir = appl/otp -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -PROGRAMS = $(bin_PROGRAMS) -am_otp_OBJECTS = otp.$(OBJEXT) -otp_OBJECTS = $(am_otp_OBJECTS) -am__DEPENDENCIES_1 = -otp_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/otp/libotp.la -am_otpprint_OBJECTS = otpprint.$(OBJEXT) -otpprint_OBJECTS = $(am_otpprint_OBJECTS) -otpprint_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/otp/libotp.la -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(otp_SOURCES) $(otpprint_SOURCES) -DIST_SOURCES = $(otp_SOURCES) $(otpprint_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(INCLUDE_hcrypto) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -bin_SUIDS = otp -otp_SOURCES = otp.c otp_locl.h -otp_LDADD = $(LIB_hcrypto) $(LIB_roken) $(top_builddir)/lib/otp/libotp.la -otpprint_SOURCES = otpprint.c otp_locl.h -otpprint_LDADD = $(LIB_hcrypto) $(LIB_roken) $(top_builddir)/lib/otp/libotp.la -man_MANS = otp.1 otpprint.1 -EXTRA_DIST = NTMakefile $(man_MANS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/otp/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/otp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otp$(EXEEXT): $(otp_OBJECTS) $(otp_DEPENDENCIES) - @rm -f otp$(EXEEXT) - $(LINK) $(otp_OBJECTS) $(otp_LDADD) $(LIBS) -otpprint$(EXEEXT): $(otpprint_OBJECTS) $(otpprint_DEPENDENCIES) - @rm -f otpprint$(EXEEXT) - $(LINK) $(otpprint_OBJECTS) $(otpprint_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otpprint.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-hook \ - uninstall-man uninstall-man1 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/otp/NTMakefile b/kerberosV/src/appl/otp/NTMakefile deleted file mode 100644 index 6256309938f..00000000000 --- a/kerberosV/src/appl/otp/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\otp - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/otp/otp.1 b/kerberosV/src/appl/otp/otp.1 deleted file mode 100644 index 14ca417a3f5..00000000000 --- a/kerberosV/src/appl/otp/otp.1 +++ /dev/null @@ -1,90 +0,0 @@ -.\" Copyright (c) 1996, 2000 Kungliga Tekniska Högskolan -.\" (Royal Institute of Technology, Stockholm, Sweden). -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" 3. Neither the name of the Institute nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $Id: otp.1,v 1.3 2013/06/17 19:11:37 robert Exp $ -.\" -.Dd November 17, 1996 -.Dt OTP 1 -.Os KTH-KRB -.Sh NAME -.Nm otp -.Nd manages one-time passwords -.Sh SYNOPSIS -.Nm otp -.Op Fl dhlor -.Op Fl f Ar algorithm -.Op Fl u Ar user -.Ar sequence-number -.Ar seed -.Sh DESCRIPTION -The -.Nm -program initializes and updates your current series of one-time -passwords (OTPs). -.Pp -Use this to set a new series of one-time passwords. Only perform this -on the console or over an encrypted link as you will have to supply -your pass-phrase. The other two parameters are -.Ar sequence-number -and -.Ar seed . -.Pp -Options are: -.Bl -tag -width Ds -.It Fl d -To delete a one-time password. -.It Fl f -Choose a different -.Ar algorithm -from the default md5. Pick any of: md4, md5, and sha. -.It Fl h -For getting a help message. -.It Fl l -List the current table of one-time passwords. -.It Fl o -To open (unlock) the otp-entry for a user. -.It Fl r -To renew a one-time password series. This operation can be performed -over an potentially eavesdropped link because you do not supply the -pass-phrase. First you need to supply the current one-time password -and then the new one corresponding to the supplied -.Ar sequence-number -and -.Ar seed . -.It Fl u -To choose a different -.Ar user -to set one-time passwords for. This only works when running -.Nm -as root. -.El -.Sh SEE ALSO -.Xr otpprint 1 diff --git a/kerberosV/src/appl/otp/otp.c b/kerberosV/src/appl/otp/otp.c deleted file mode 100644 index ff2add6a4bf..00000000000 --- a/kerberosV/src/appl/otp/otp.c +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright (c) 1995-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 "otp_locl.h" -#include - -RCSID("$Id: otp.c,v 1.5 2013/06/17 19:11:37 robert Exp $"); - -static int listp; -static int deletep; -static int openp; -static int renewp; -static char* alg_string; -static char *user; -static int version_flag; -static int help_flag; - -struct getargs args[] = { - { "list", 'l', arg_flag, &listp, "list OTP status" }, - { "delete", 'd', arg_flag, &deletep, "delete OTP" }, - { "open", 'o', arg_flag, &openp, "open a locked OTP" }, - { "renew", 'r', arg_flag, &renewp, "securely renew OTP" }, - { "hash", 'f', arg_string, &alg_string, - "hash algorithm (md4, md5, or sha)", "algorithm"}, - { "user", 'u', arg_string, &user, - "user other than current user (root only)", "user" }, - { "version", 0, arg_flag, &version_flag }, - { "help", 'h', arg_flag, &help_flag } -}; - -int num_args = sizeof(args) / sizeof(args[0]); - -static void -usage(int code) -{ - arg_printusage(args, num_args, NULL, "[num seed]"); - exit(code); -} - -/* - * Renew the OTP for a user. - * The pass-phrase is not required (RFC 1938/8.0) - */ - -static int -renew (int argc, char **argv, OtpAlgorithm *alg, char *user) -{ - OtpContext newctx, *ctx; - char prompt[128]; - char pw[64]; - void *dbm; - int ret; - - newctx.alg = alg; - newctx.user = user; - newctx.n = atoi (argv[0]); - strlcpy (newctx.seed, argv[1], sizeof(newctx.seed)); - strlwr(newctx.seed); - snprintf (prompt, sizeof(prompt), - "[ otp-%s %u %s ]", - newctx.alg->name, - newctx.n, - newctx.seed); - if (UI_UTIL_read_pw_string (pw, sizeof(pw), prompt, 0) == 0 && - otp_parse (newctx.key, pw, alg) == 0) { - ctx = &newctx; - ret = 0; - } else - return 1; - - dbm = otp_db_open (); - if (dbm == NULL) { - warnx ("otp_db_open failed"); - return 1; - } - otp_put (dbm, ctx); - otp_db_close (dbm); - return ret; -} - -/* - * Return 0 if the user could enter the next OTP. - * I would rather have returned !=0 but it's shell-like here around. - */ - -static int -verify_user_otp(char *username) -{ - OtpContext ctx; - char passwd[OTP_MAX_PASSPHRASE + 1]; - char prompt[128], ss[256]; - - if (otp_challenge (&ctx, username, ss, sizeof(ss)) != 0) { - warnx("no otp challenge found for %s", username); - return 1; - } - - snprintf (prompt, sizeof(prompt), "%s's %s Password: ", username, ss); - if(UI_UTIL_read_pw_string(passwd, sizeof(passwd)-1, prompt, 0)) - return 1; - return otp_verify_user (&ctx, passwd); -} - -/* - * Set the OTP for a user - */ - -static int -set (int argc, char **argv, OtpAlgorithm *alg, char *user) -{ - void *db; - OtpContext ctx; - char pw[OTP_MAX_PASSPHRASE + 1]; - int ret; - int i; - - ctx.alg = alg; - ctx.user = strdup (user); - if (ctx.user == NULL) - err (1, "out of memory"); - - ctx.n = atoi (argv[0]); - strlcpy (ctx.seed, argv[1], sizeof(ctx.seed)); - strlwr(ctx.seed); - do { - if (UI_UTIL_read_pw_string (pw, sizeof(pw), "Pass-phrase: ", 1)) - return 1; - if (strlen (pw) < OTP_MIN_PASSPHRASE) - printf ("Too short pass-phrase. Use at least %d characters\n", - OTP_MIN_PASSPHRASE); - } while(strlen(pw) < OTP_MIN_PASSPHRASE); - ctx.alg->init (ctx.key, pw, ctx.seed); - for (i = 0; i < ctx.n; ++i) - ctx.alg->next (ctx.key); - db = otp_db_open (); - if(db == NULL) { - free (ctx.user); - err (1, "otp_db_open failed"); - } - ret = otp_put (db, &ctx); - otp_db_close (db); - free (ctx.user); - return ret; -} - -/* - * Delete otp of user from the database - */ - -static int -delete_otp (int argc, char **argv, char *user) -{ - void *db; - OtpContext ctx; - int ret; - - db = otp_db_open (); - if(db == NULL) - errx (1, "otp_db_open failed"); - - ctx.user = user; - ret = otp_delete(db, &ctx); - otp_db_close (db); - return ret; -} - -/* - * Tell whether the user has an otp - */ - -static int -has_an_otp(char *user) -{ - void *db; - OtpContext ctx; - int ret; - - db = otp_db_open (); - if(db == NULL) { - warnx ("otp_db_open failed"); - return 0; /* if no db no otp! */ - } - - ctx.user = user; - ret = otp_simple_get(db, &ctx); - - otp_db_close (db); - return !ret; -} - -/* - * Get and print out the otp entry for some user - */ - -static void -print_otp_entry_for_name (void *db, char *user) -{ - OtpContext ctx; - - ctx.user = user; - if (!otp_simple_get(db, &ctx)) { - fprintf(stdout, - "%s\totp-%s %d %s", - ctx.user, ctx.alg->name, ctx.n, ctx.seed); - if (ctx.lock_time) - fprintf(stdout, - "\tlocked since %s", - ctime(&ctx.lock_time)); - else - fprintf(stdout, "\n"); - } -} - -static int -open_otp (int argc, char **argv, char *user) -{ - void *db; - OtpContext ctx; - int ret; - - db = otp_db_open (); - if (db == NULL) - errx (1, "otp_db_open failed"); - - ctx.user = user; - ret = otp_simple_get (db, &ctx); - if (ret == 0) - ret = otp_put (db, &ctx); - otp_db_close (db); - return ret; -} - -/* - * Print otp entries for one or all users - */ - -static int -list_otps (int argc, char **argv, char *user) -{ - void *db; - struct passwd *pw; - - db = otp_db_open (); - if(db == NULL) - errx (1, "otp_db_open failed"); - - if (user) - print_otp_entry_for_name(db, user); - else - /* scans all users... so as to get a deterministic order */ - while ((pw = getpwent())) - print_otp_entry_for_name(db, pw->pw_name); - - otp_db_close (db); - return 0; -} - -int -main (int argc, char **argv) -{ - int defaultp = 0; - int uid = getuid(); - OtpAlgorithm *alg = otp_find_alg (OTP_ALG_DEFAULT); - int optind = 0; - - setprogname (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(deletep && uid != 0) - errx (1, "Only root can delete OTPs"); - if(alg_string) { - alg = otp_find_alg (alg_string); - if (alg == NULL) - errx (1, "Unknown algorithm: %s", alg_string); - } - if (user && uid != 0) - errx (1, "Only root can use `-u'"); - argc -= optind; - argv += optind; - - if (!(listp || deletep || renewp || openp)) - defaultp = 1; - - if ( listp + deletep + renewp + defaultp + openp != 1) - usage(1); /* one of -d or -l or -r or none */ - - if(deletep || openp || listp) { - if(argc != 0) - errx(1, "delete, open, and list requires no arguments"); - } else { - if(argc != 2) - errx(1, "setup, and renew requires `num', and `seed'"); - } - if (listp) - return list_otps (argc, argv, user); - - if (user == NULL) { - struct passwd *pwd; - - pwd = k_getpwuid(uid); - if (pwd == NULL) - err (1, "You don't exist"); - user = pwd->pw_name; - } - - /* - * users other that root must provide the next OTP to update the sequence. - * it avoids someone to use a pending session to change an OTP sequence. - * see RFC 1938/8.0. - */ - if (uid != 0 && (defaultp || renewp)) { - if (!has_an_otp(user)) { - errx (1, "Only root can set an initial OTP"); - } else { /* Check the next OTP (RFC 1938/8.0: SHOULD) */ - if (verify_user_otp(user) != 0) { - errx (1, "User authentification failed"); - } - } - } - - if (deletep) - return delete_otp (argc, argv, user); - else if (renewp) - return renew (argc, argv, alg, user); - else if (openp) - return open_otp (argc, argv, user); - else - return set (argc, argv, alg, user); -} diff --git a/kerberosV/src/appl/otp/otp.cat1 b/kerberosV/src/appl/otp/otp.cat1 deleted file mode 100644 index 9e0a1de33b3..00000000000 --- a/kerberosV/src/appl/otp/otp.cat1 +++ /dev/null @@ -1,43 +0,0 @@ - -OTP(1) BSD General Commands Manual OTP(1) - -NNAAMMEE - oottpp -- manages one-time passwords - -SSYYNNOOPPSSIISS - oottpp [--ddhhlloorr] [--ff _a_l_g_o_r_i_t_h_m] [--uu _u_s_e_r] _s_e_q_u_e_n_c_e_-_n_u_m_b_e_r _s_e_e_d - -DDEESSCCRRIIPPTTIIOONN - The oottpp program initializes and updates your current series of one-time - passwords (OTPs). - - Use this to set a new series of one-time passwords. Only perform this on - the console or over an encrypted link as you will have to supply your - pass-phrase. The other two parameters are _s_e_q_u_e_n_c_e_-_n_u_m_b_e_r and _s_e_e_d. - - Options are: - - --dd To delete a one-time password. - - --ff Choose a different _a_l_g_o_r_i_t_h_m from the default md5. Pick any of: - md4, md5, and sha. - - --hh For getting a help message. - - --ll List the current table of one-time passwords. - - --oo To open (unlock) the otp-entry for a user. - - --rr To renew a one-time password series. This operation can be per- - formed over an potentially eavesdropped link because you do not - supply the pass-phrase. First you need to supply the current - one-time password and then the new one corresponding to the sup- - plied _s_e_q_u_e_n_c_e_-_n_u_m_b_e_r and _s_e_e_d. - - --uu To choose a different _u_s_e_r to set one-time passwords for. This - only works when running oottpp as root. - -SSEEEE AALLSSOO - otpprint(1) - -KTH-KRB November 17, 1996 KTH-KRB diff --git a/kerberosV/src/appl/otp/otp_locl.h b/kerberosV/src/appl/otp/otp_locl.h deleted file mode 100644 index 38d47b2255b..00000000000 --- a/kerberosV/src/appl/otp/otp_locl.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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: otp_locl.h,v 1.4 2013/06/17 19:11:38 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_PWD_H -#include -#endif -#include -#include -#include "crypto-headers.h" /* for des_read_pw_string */ -#include diff --git a/kerberosV/src/appl/otp/otpprint.1 b/kerberosV/src/appl/otp/otpprint.1 deleted file mode 100644 index 79da1c675fa..00000000000 --- a/kerberosV/src/appl/otp/otpprint.1 +++ /dev/null @@ -1,82 +0,0 @@ -.\" Copyright (c) 1996, 2000 - 2001 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: otpprint.1,v 1.3 2013/06/17 19:11:38 robert Exp $ -.\" -.Dd November 17, 1996 -.Dt OTP 1 -.Os KTH-KRB -.Sh NAME -.Nm otpprint -.Nd print lists of one-time passwords -.Sh SYNOPSIS -.Nm otp -.Op Fl n Ar count -.Op Fl e -.Op Fl h -.Op Fl f Ar algorithm -.Ar sequence-number -.Ar seed -.Sh DESCRIPTION -The -.Nm -program prints lists of OTPs. -.Pp -Use this to print out a series of one-time passwords. You will have -to supply the -.Ar sequence number -and the -.Ar seed -as arguments and then the program will prompt you for your pass-phrase. -.Pp -There are several different print formats. The default is to print -each password with six short english words. -.Pp -Options are: -.Bl -tag -width Ds -.It Fl e -Print the passwords in ``extended'' format. In this format a prefix -that says ``hex:'' or ``word:'' is included. -.It Fl f -To choose a different -.Ar algorithm -from the default md5. Pick any of: md4, md5, and sha. -.It Fl h -Print the passwords in hex. -.It Fl n -Print -.Ar count -one-time passwords, starting at -.Ar sequence-number -and going backwards. The default is 10. -.El -.Sh SEE ALSO -.Xr otp 1 diff --git a/kerberosV/src/appl/otp/otpprint.c b/kerberosV/src/appl/otp/otpprint.c deleted file mode 100644 index edad30d98f2..00000000000 --- a/kerberosV/src/appl/otp/otpprint.c +++ /dev/null @@ -1,135 +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 "otp_locl.h" -#include - -RCSID("$Id: otpprint.c,v 1.4 2013/06/17 19:11:38 robert Exp $"); - -static int extendedp; -static int count = 10; -static int hexp; -static char* alg_string; -static int version_flag; -static int help_flag; - -struct getargs args[] = { - { "extended", 'e', arg_flag, &extendedp, "print keys in extended format" }, - { "count", 'n', arg_integer, &count, "number of keys to print" }, - { "hexadecimal", 'h', arg_flag, &hexp, "output in hexadecimal" }, - { "hash", 'f', arg_string, &alg_string, - "hash algorithm (md4, md5, or sha)", "algorithm"}, - { "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, "num seed"); - exit(code); -} - -static int -print (int argc, - char **argv, - int count, - OtpAlgorithm *alg, - void (*print_fn)(OtpKey, char *, size_t)) -{ - char pw[64]; - OtpKey key; - int n; - int i; - char *seed; - - if (argc != 2) - usage (1); - n = atoi(argv[0]); - seed = argv[1]; - if (UI_UTIL_read_pw_string (pw, sizeof(pw), "Pass-phrase: ", 0)) - return 1; - alg->init (key, pw, seed); - for (i = 0; i < n; ++i) { - char s[64]; - - alg->next (key); - if (i >= n - count) { - (*print_fn)(key, s, sizeof(s)); - printf ("%d: %s\n", i + 1, s); - } - } - return 0; -} - -int -main (int argc, char **argv) -{ - int optind = 0; - void (*fn)(OtpKey, char *, size_t); - OtpAlgorithm *alg = otp_find_alg (OTP_ALG_DEFAULT); - - setprogname (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(alg_string) { - alg = otp_find_alg (alg_string); - if (alg == NULL) - errx(1, "Unknown algorithm: %s", alg_string); - } - argc -= optind; - argv += optind; - - if (hexp) { - if (extendedp) - fn = otp_print_hex_extended; - else - fn = otp_print_hex; - } else { - if (extendedp) - fn = otp_print_stddict_extended; - else - fn = otp_print_stddict; - } - - return print (argc, argv, count, alg, fn); -} diff --git a/kerberosV/src/appl/otp/otpprint.cat1 b/kerberosV/src/appl/otp/otpprint.cat1 deleted file mode 100644 index 00479b0676e..00000000000 --- a/kerberosV/src/appl/otp/otpprint.cat1 +++ /dev/null @@ -1,36 +0,0 @@ - -OTP(1) BSD General Commands Manual OTP(1) - -NNAAMMEE - oottpppprriinntt -- print lists of one-time passwords - -SSYYNNOOPPSSIISS - oottpp [--nn _c_o_u_n_t] [--ee] [--hh] [--ff _a_l_g_o_r_i_t_h_m] _s_e_q_u_e_n_c_e_-_n_u_m_b_e_r _s_e_e_d - -DDEESSCCRRIIPPTTIIOONN - The oottpppprriinntt program prints lists of OTPs. - - Use this to print out a series of one-time passwords. You will have to - supply the _s_e_q_u_e_n_c_e _n_u_m_b_e_r and the _s_e_e_d as arguments and then the program - will prompt you for your pass-phrase. - - There are several different print formats. The default is to print each - password with six short english words. - - Options are: - - --ee Print the passwords in ``extended'' format. In this format a - prefix that says ``hex:'' or ``word:'' is included. - - --ff To choose a different _a_l_g_o_r_i_t_h_m from the default md5. Pick any - of: md4, md5, and sha. - - --hh Print the passwords in hex. - - --nn Print _c_o_u_n_t one-time passwords, starting at _s_e_q_u_e_n_c_e_-_n_u_m_b_e_r and - going backwards. The default is 10. - -SSEEEE AALLSSOO - otp(1) - -KTH-KRB November 17, 1996 KTH-KRB diff --git a/kerberosV/src/appl/popper/ChangeLog b/kerberosV/src/appl/popper/ChangeLog deleted file mode 100644 index b5d2d7571b2..00000000000 --- a/kerberosV/src/appl/popper/ChangeLog +++ /dev/null @@ -1,269 +0,0 @@ -2006-11-20 Love Hörnquist Åstrand - - * pop_pass.c: Make krb5_get_init_creds_opt_free take a context - argument. - -2006-10-07 Love Hörnquist Åstrand - - * Makefile.am: Add man_MANS to EXTRA_DIST - -2006-05-05 Love Hörnquist Åstrand - - * Rename u_intXX_t to uintXX_t - -2005-10-22 Love Hörnquist Åstrand - - * pop_dropinfo.c: Check return value from asprintf instead of - string != NULL since it undefined behavior on Linux. From Björn - Sandell - -2005-05-29 Love Hörnquist Åstrand - - * pop_user.c: avoid 'unused variable' warnings - -2005-05-10 Dave Love - - * pop_pass.c: Include . - -2004-08-27 Johan Danielsson - - * popper.c: add message to NOOP result to appease gcc - -2004-06-14 Johan Danielsson - - * Makefile.am: SASL - - * pop_auth.[ch], auth_gssapi.c, auth_krb4.c : improved SASL - support - - * pop_get_command.c: add SASL hooks - - * pop_user.c: if using SASL, don't allow plaintext USER/PASS - - * pop_init.c: recognise sasl auth level - - * popper.h: add AUTH_SASL flag - -2003-12-20 Love Hörnquist Åstrand - - * popper.c (main): avoid warning by sending empty string as - formatstring instead of NULL (even though pop_msg handles that - too) - -2003-10-10 Johan Danielsson - - * pop_init.c (pop_init): change call to authentication function, - from a ?: construct (which toubles some versions of gcc) to if; - from Björn Grönvall - -2003-09-03 Love Hörnquist Åstrand - - * pop_pass.c: use - krb5_get_init_creds_opt_alloc/krb5_get_init_creds_opt_free - -2003-09-02 Love Hörnquist Åstrand - - * popper.c (tgets): avoid be clobbered by `longjmp' or `vfork' - warning - -2003-04-16 Love Hörnquist Åstrand - - * popper.8: spelling, from jmc - -2002-07-04 Johan Danielsson - - * pop_dropcopy.c: use RESP-CODES - - * pop_get_command.c: implement CAPA - - * popper.c: don't print our version in the greeting string - - * popper.h: add a flags parameter to the pop context - -2002-05-02 Johan Danielsson - - * pop_debug.c: revert some accidentally commited code in previous - -2002-02-07 Johan Danielsson - - * pop_debug.c: only claim krb5 support if really present - -2001-09-10 Johan Danielsson - - * maildir.c: replace MAXDROPLEN with MAXPATHLEN - - * popper.h: replace MAXDROPLEN with MAXPATHLEN - -2001-08-13 Johan Danielsson - - * popper.8: rewritten man page - -2000-12-31 Assar Westerlund - - * pop_init.c (pop_init): handle krb5_init_context failure - consistently - * pop_debug.c (doit_v5): handle krb5_init_context failure - consistently - -2000-06-10 Assar Westerlund - - * pop_init.c (krb4_authenticate): do not exit on failure, just - return - (krb5_authenticate): log errors from krb5_recvauth - -2000-04-12 Assar Westerlund - - * *.c: replace all erroneous calls to pop_log with POP_FAILURE - with POP_PRIORITY. reported by Janne Johansson ' - -2000-01-27 Assar Westerlund - - * pop_debug.c (main): figure out port number - -1999-12-20 Assar Westerlund - - * pop_init.c (pop_init): use getnameinfo_verified - - * pop_debug.c (get_socket): use getaddrinfo - -1999-12-03 Johan Danielsson - - * pop_init.c: optionally trace connected addresses to a file - -1999-11-02 Assar Westerlund - - * pop_debug.c (main): redo the v4/v5 selection for consistency. - -4 -> try only v4 -5 -> try only v5 none, -45 -> try v5, v4 - -1999-10-16 Johan Danielsson - - * pop_init.c (krb5_authenticate): don't use the principal - associated with the socket for authentication, instead let - krb5_rd_req pick the correct one from the ticket; just check that - it actually was a pop-ticket - -1999-08-12 Johan Danielsson - - * pop_init.c (pop_init): don't freehostent if ch == NULL - - * pop_dele.c: implement XDELE to delete a range of messages - -1999-08-05 Assar Westerlund - - * pop_init.c: v6-ify - - * pop_debug.c: v6-ify - -1999-05-10 Assar Westerlund - - * pop_debug.c (doit_v5): call krb5_sendauth with ccache == NULL - -1999-04-11 Assar Westerlund - - * pop_debug.c (main): use print_version - -Thu Apr 8 15:07:11 1999 Johan Danielsson - - * pop_pass.c: remove definition of KRB_VERIFY_USER (moved to - config.h) - -Thu Mar 18 12:55:42 1999 Johan Danielsson - - * pop_pass.c: define KRB_VERIFY_SECURE if not defined - - * Makefile.am: include Makefile.am.common - -Wed Mar 17 23:36:21 1999 Assar Westerlund - - * pop_pass.c (krb4_verify_password): use KRB_VERIFY_SECURE instead - of 1 - -Tue Mar 16 22:28:52 1999 Assar Westerlund - - * pop_pass.c: krb_verify_user_multiple -> krb_verify_user - -Sat Mar 13 22:17:29 1999 Assar Westerlund - - * pop_parse.c (pop_parse): cast when calling is* to get rid of a - warning - -Mon Mar 8 11:50:06 1999 Johan Danielsson - - * pop_init.c: use print_version - -Fri Mar 5 15:14:29 1999 Johan Danielsson - - * pop_send.c: fix handling of messages w/o body - -Sun Nov 22 10:33:29 1998 Assar Westerlund - - * pop_pass.c (pop_pass): try to always log - - * Makefile.in (WFLAGS): set - -Fri Jul 10 01:14:25 1998 Assar Westerlund - - * pop_init.c: s/net_read/pop_net_read/ - -Tue Jun 2 17:33:54 1998 Johan Danielsson - - * pop_send.c: add missing newlines - -Sun May 24 20:59:45 1998 Johan Danielsson - - * maildir.c (make_path): fix reversed args - -Sat May 16 00:02:18 1998 Assar Westerlund - - * Makefile.am: link with DBLIB - -Sun Apr 26 11:47:58 1998 Assar Westerlund - - * pop_pass.c (pop_pass): check return value from changeuser - - * pop_dropcopy.c (changeuser): check that `setuid' and `setgid' - succeeded. - - * popper.h: changeuser now returns int - -Thu Apr 23 00:54:38 1998 Johan Danielsson - - * Add support for maildir spoolfiles. - - * popper.h (MsgInfoList): replace `del_flag' and `retr_flag' with - single `flags' - - * pop_dropcopy.c: Fix mismatched parenthesis. - -Sat Apr 4 15:13:56 1998 Assar Westerlund - - * pop_dropcopy.c (pop_dropcopy): first do mkstemp and then fdopen. - Originally from - - * popper.h: include - -Sat Feb 7 10:07:39 1998 Assar Westerlund - - * pop_pass.c(krb4_verify_password: Don't use REALM_SZ + 1, just - REALM_SZ - -Mon Dec 29 16:37:26 1997 Assar Westerlund - - * pop_updt.c (pop_updt): lseek before ftruncating the file. From - - -Sat Nov 22 13:46:39 1997 Johan Danielsson - - * pop_pass.c: Destroy tickets after verification. - -Sun Nov 9 09:11:14 1997 Assar Westerlund - - * pop_dropinfo.c: be careful with mails without msg-id, subject, - or from - -Wed Oct 29 02:09:24 1997 Assar Westerlund - - * pop_pass.c: conditionalize OTP-support - - * pop_init.c: conditionalize OTP-support - diff --git a/kerberosV/src/appl/popper/Makefile.am b/kerberosV/src/appl/popper/Makefile.am deleted file mode 100644 index 296485e67db..00000000000 --- a/kerberosV/src/appl/popper/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:40 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -noinst_PROGRAMS = pop_debug - -libexec_PROGRAMS = popper - -popper_SOURCES = \ - pop_auth.c \ - pop_auth.h \ - pop_dele.c \ - pop_dropcopy.c \ - pop_dropinfo.c \ - pop_get_command.c \ - pop_init.c \ - pop_last.c \ - pop_list.c \ - pop_log.c \ - pop_msg.c \ - pop_parse.c \ - pop_pass.c \ - pop_quit.c \ - pop_rset.c \ - pop_send.c \ - pop_stat.c \ - pop_uidl.c \ - pop_updt.c \ - pop_user.c \ - pop_xover.c \ - popper.c \ - maildir.c \ - auth_gssapi.c \ - popper.h \ - version.h - -LDADD = \ - $(LIB_otp) \ - $(top_builddir)/lib/gssapi/libgssapi.la \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(DBLIB) - -man_MANS = popper.8 - -EXTRA_DIST = NTMakefile pop3.rfc1081 pop3e.rfc1082 \ - popper.README.release README-FIRST \ - $(man_MANS) diff --git a/kerberosV/src/appl/popper/Makefile.in b/kerberosV/src/appl/popper/Makefile.in deleted file mode 100644 index 146b234ac5d..00000000000 --- a/kerberosV/src/appl/popper/Makefile.in +++ /dev/null @@ -1,1040 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -noinst_PROGRAMS = pop_debug$(EXEEXT) -libexec_PROGRAMS = popper$(EXEEXT) -subdir = appl/popper -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man8dir)" -PROGRAMS = $(libexec_PROGRAMS) $(noinst_PROGRAMS) -pop_debug_SOURCES = pop_debug.c -pop_debug_OBJECTS = pop_debug.$(OBJEXT) -pop_debug_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -pop_debug_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/gssapi/libgssapi.la $(LIB_krb5) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -am_popper_OBJECTS = pop_auth.$(OBJEXT) pop_dele.$(OBJEXT) \ - pop_dropcopy.$(OBJEXT) pop_dropinfo.$(OBJEXT) \ - pop_get_command.$(OBJEXT) pop_init.$(OBJEXT) \ - pop_last.$(OBJEXT) pop_list.$(OBJEXT) pop_log.$(OBJEXT) \ - pop_msg.$(OBJEXT) pop_parse.$(OBJEXT) pop_pass.$(OBJEXT) \ - pop_quit.$(OBJEXT) pop_rset.$(OBJEXT) pop_send.$(OBJEXT) \ - pop_stat.$(OBJEXT) pop_uidl.$(OBJEXT) pop_updt.$(OBJEXT) \ - pop_user.$(OBJEXT) pop_xover.$(OBJEXT) popper.$(OBJEXT) \ - maildir.$(OBJEXT) auth_gssapi.$(OBJEXT) -popper_OBJECTS = $(am_popper_OBJECTS) -popper_LDADD = $(LDADD) -popper_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/gssapi/libgssapi.la $(LIB_krb5) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = pop_debug.c $(popper_SOURCES) -DIST_SOURCES = pop_debug.c $(popper_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man8dir = $(mandir)/man8 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -popper_SOURCES = \ - pop_auth.c \ - pop_auth.h \ - pop_dele.c \ - pop_dropcopy.c \ - pop_dropinfo.c \ - pop_get_command.c \ - pop_init.c \ - pop_last.c \ - pop_list.c \ - pop_log.c \ - pop_msg.c \ - pop_parse.c \ - pop_pass.c \ - pop_quit.c \ - pop_rset.c \ - pop_send.c \ - pop_stat.c \ - pop_uidl.c \ - pop_updt.c \ - pop_user.c \ - pop_xover.c \ - popper.c \ - maildir.c \ - auth_gssapi.c \ - popper.h \ - version.h - -LDADD = \ - $(LIB_otp) \ - $(top_builddir)/lib/gssapi/libgssapi.la \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(DBLIB) - -man_MANS = popper.8 -EXTRA_DIST = NTMakefile pop3.rfc1081 pop3e.rfc1082 \ - popper.README.release README-FIRST \ - $(man_MANS) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/popper/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/popper/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libexecPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexecdir)" && rm -f $$files - -clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -pop_debug$(EXEEXT): $(pop_debug_OBJECTS) $(pop_debug_DEPENDENCIES) - @rm -f pop_debug$(EXEEXT) - $(LINK) $(pop_debug_OBJECTS) $(pop_debug_LDADD) $(LIBS) -popper$(EXEEXT): $(popper_OBJECTS) $(popper_DEPENDENCIES) - @rm -f popper$(EXEEXT) - $(LINK) $(popper_OBJECTS) $(popper_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_gssapi.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maildir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_auth.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_debug.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_dele.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_dropcopy.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_dropinfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_get_command.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_init.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_last.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_list.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_log.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_msg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_parse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_pass.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_quit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_rset.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_send.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_stat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_uidl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_updt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_user.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop_xover.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/popper.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libexecPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libexecPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man8 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libexecPROGRAMS clean-libtool \ - clean-noinstPROGRAMS ctags dist-hook distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-info install-info-am install-libexecPROGRAMS \ - install-man install-man8 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-hook uninstall-libexecPROGRAMS \ - uninstall-man uninstall-man8 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/popper/NTMakefile b/kerberosV/src/appl/popper/NTMakefile deleted file mode 100644 index 20f681bfdab..00000000000 --- a/kerberosV/src/appl/popper/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\popper - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/popper/README b/kerberosV/src/appl/popper/README deleted file mode 100644 index 0735fdd56c3..00000000000 --- a/kerberosV/src/appl/popper/README +++ /dev/null @@ -1,381 +0,0 @@ -@(#)@(#)README 2.6 2.6 4/2/91 - - -The Post Office Protocol Server: Installation Guide - - - -Introduction - -The Post Office Protocol server runs on a variety of Unix[1] computers -to manage electronic mail for Macintosh and MS-DOS computers. The -server was developed at the University of California at Berkeley and -conforms fully to the specifications in RFC 1081[2] and RFC 1082[3]. -The Berkeley server also has extensions to send electronic mail on -behalf of a client. - -This guide explains how to install the POP server on your Unix -computer. It assumes that you are not only familiar with Unix but also -capable of performing Unix system administration. - - -How to Obtain the Server - -The POP server is available via anonymous ftp from ftp.CC.Berkeley.EDU -(128.32.136.9, 128.32.206.12). It is in two files in the pub directory: -a compressed tar file popper-version.tar.Z and a Macintosh StuffIt archive -in BinHex format called MacPOP.sit.hqx. - - -Contents of the Distribution - -The distribution contains the following: - -+ All of the C source necessary to create the server program. - -+ A visual representation of how the POP system works. - -+ Reprints of RFC 1081 and RFC 1082. - -+ A HyperCard stack POP client implementation using MacTCP. - -+ A man page for the popper daemon. - -+ This guide. - - -Compatibility - -The Berkeley POP server has been successfully tested on the following -Unix operating systems: - -+ Berkeley Systems Distribution 4.3 - -+ Sun Microsystems Operating System versions 3.5 and 4.0 - -+ Ultrix version 2.3 - -The following POP clients operate correctly with the Berkeley POP server: - -+ The Berkeley HyperMail HyperCard stack for the Apple Macintosh - (distributed with the server). - -+ The Stanford University Macintosh Internet Protocol MacMH program. - -+ The Stanford University Personal Computer Internet Protocol MH - program. - -+ The mh version 6.0 programs for Unix. - - -Support - -The Berkeley POP server is not officially supported and is without any -warranty, explicit or implied. However, we are interested in your -experiences using the server. Bugs, comments and suggestions should be -sent electronically to netinfo@garnet.Berkeley.EDU. - - -Operational Characteristics - -The POP Transaction Cycle - -The Berkeley POP server is a single program (called popper) that is -launched by inetd when it gets a service request on the POP TCP port. -(The official port number specified in RFC 1081 for POP version 3 is -port 110. However, some POP3 clients attempt to contact the server at -port 109, the POP version 2 port. Unless you are running both POP2 and -POP3 servers, you can simply define both ports for use by the POP3 -server. This is explained in the installation instructions later on.) -The popper program initializes and verifies that the peer IP address is -registered in the local domain, logging a warning message when a -connection is made to a client whose IP address does not have a -canonical name. For systems using BSD 4.3 bind, it also checks to see -if a cannonical name lookup for the client returns the same peer IP -address, logging a warning message if it does not. The the server -enters the authorization state, during which the client must correctly -identify itself by providing a valid Unix userid and password on the -server's host machine. No other exchanges are allowed during this -state (other than a request to quit.) If authentication fails, a -warning message is logged and the session ends. Once the user is -identified, popper changes its user and group ids to match that of the -user and enters the transaction state. The server makes a temporary -copy of the user's maildrop (ordinarily in /usr/spool/mail) which is -used for all subsequent transactions. These include the bulk of POP -commands to retrieve mail, delete mail, undelete mail, and so forth. A -Berkeley extension also allows the user to submit a mail parcel to the -server who mails it using the sendmail program (this extension is -supported in the HyperMail client distributed with the server). When -the client quits, the server enters the final update state during which -the network connection is terminated and the user's maildrop is updated -with the (possibly) modified temporary maildrop. - - -Logging - -The POP server uses syslog to keep a record of its activities. On -systems with BSD 4.3 syslogging, the server logs (by default) to the -"local0" facility at priority "notice" for all messages except -debugging which is logged at priority "debug". The default log file is -/usr/spool/mqueue/POPlog. These can be changed, if desired. On -systems with 4.2 syslogging all messages are logged to the local log -file, usually /usr/spool/mqueue/syslog. - -Problems - -If the filesystem which holds the /usr/spool/mail fills up users will -experience difficulties. The filesystem must have enough space to hold -(approximately) two copies of the largest mail box. Popper (v1.81 and -above) is designed to be robust in the face of this problem, but you may -end up with a situation where some of the user's mail is in - - /usr/spool/mail/.userid.pop - -and some of the mail is in - - /usr/spool/mail/userid - -If this happens the System Administrator should clear enough disk space -so that the filesystem has at least as much free disk as both mailboxes -hold and probably a little more. Then the user should initiate a POP -session, and do nothing but quit. If the POP session ends without an -error the user can then use POP or another mail program to clean up his/her -mailbox. - -Alternatively, the System Administrator can combine the two files (but -popper will do this for you if there is enough disk space). - - -Debugging - -The popper program will log debugging information when the -d parameter -is specified after its invocation in the inetd.conf file. Care should -be exercised in using this option since it generates considerable -output in the syslog file. Alternatively, the "-t " option -will place debugging information into file "" using fprintf -instead of syslog. (To enable debugging, you must edit the Makefile -to add -DDEBUG to the compiler options.) - -For SunOS version 3.5, the popper program is launched by inetd from -/etc/servers. This file does not allow you to specify command line -arguments. Therefore, if you want to enable debugging, you can specify -a shell script in /etc/servers to be launched instead of popper and in -this script call popper with the desired arguments. - - -Installation - -1. Examine this file for the latest information, warnings, etc. - -2. Check the Makefile for conformity with your system. - -3. Issue the make command in the directory containing the popper - source. - -4. Issue the make install command in the directory containing the - popper source to copy the program to /usr/etc. - -5. Enable syslogging: - - + For systems with 4.3 syslogging: - - Add the following line to the /etc/syslog.conf file: - - local0.notice;local0.debug /usr/spool/mqueue/POPlog - - Create the empty file /usr/spool/mqueue/POPlog. - - Kill and restart the syslogd daemon. - - + For systems with 4.2 syslogging: - - Be sure that you are logging messages of priority 7 and higher. - For example: - - 7/usr/spool/mqueue/syslog - 9/dev/null - -6. Update /etc/services: - - Add the following line to the /etc/services file: - - pop 110/tcp - - Note: This is the official port number for version 3 of the - Post Office Protocol as defined in RFC 1081. However, some - POP3 clients use port 109, the port number for the previous - version (2) of POP. Therefore you may also want to add the - following line to the /etc/services file: - - pop2 109/tcp - - For Sun systems running yp, also do the following: - - + Change to the /var/yp directory. - - + Issue the make services command. - -7. Update the inetd daemon configuration. Include the second line ONLY if you - are running the server at both ports. - - + On BSD 4.3 and SunOS 4.0 systems, add the following line to the - /etc/inetd.conf file: - - pop stream tcp nowait root /usr/etc/popper popper - pop2 stream tcp nowait root /usr/etc/popper popper - - + On Ultrix systems, add the following line to the - /etc/inetd.conf file: - - pop stream tcp nowait /usr/etc/popper popper - pop2 stream tcp nowait /usr/etc/popper popper - - + On SunOS 3.5 systems, add the following line to the - /etc/servers file: - - pop tcp /usr/etc/popper - pop2 tcp /usr/etc/popper - - Kill and restart the inetd daemon. - -You can confirm that the POP server is running on Unix by telneting to -port 110 (or 109 if you set it up that way). For example: - -%telnet myhost 110 -Trying... -Connected to myhost.berkeley.edu. -Escape character is '^]'. -+OK UCB Pop server (version 1.6) at myhost starting. -quit -Connection closed by foreign host. - - -Release Notes - -1.83 Make sure that everything we do as root is non-destructive. - -1.82 Make the /usr/spool/mail/.userid.pop file owned by the user rather - than owned by root. - -1.81 There were two versions of 1.7 floating around, 1.7b4 and 1.7b5. - The difference is that 1.7b5 attempted to save disk space on - /usr/spool/mail by deleting the users permanent maildrop after - making the temporary copy. Unfortunately, if compiled with - -DDEBUG, this version could easily wipe out a users' mail file. - This is now fixed. - - This version also fixes a security hole for systems that have - /usr/spool/mail writeable by all users. - - With this version we go to all new SCCS IDs for all files. This - is unfortunate, and we hope it is not too much of a problem. - - Thanks to Steve Dorner of UIUC for pointing out the major problem. - -1.7 Extensive re-write of the maildrop processing code contributed by - Viktor Dukhovni that greatly reduces the - possibility that the maildrop can be corrupted as the result of - simultaneous access by two or more processes. - - Added "pop_dropcopy" module to create a temporary maildrop from - the existing, standard maildrop as root before the setuid and - setgid for the user is done. This allows the temporary maildrop - to be created in a mail spool area that is not world read-writable. - - This version does *not* send the sendmail "From " delimiter line - in response to a TOP or RETR command. - - Encased all debugging code in #ifdef DEBUG constructs. This code can - be included by specifying the DEGUG compiler flag. Note: You still - need to use the -d or -t option to obtain debugging output. - -1.6 Corrects a bug that causes the server to crash on SunOS - 4.0 systems. - - Uses varargs and vsprintf (if available) in pop_log and - pop_msg. This is enabled by the "HAVE_VSPRINTF" - compiler flag. - - For systems with BSD 4.3 bind, performs a cannonical - name lookup and searches the returned address(es) for - the client's address, logging a warning message if it - is not located. This is enabled by the "BIND43" - comiler flag. - - Removed all the includes from popper.h and distributed - them throughout the porgrams files, as needed. - - Reformatted the source to convert tabs to spaces and - shorten lines for display on 80-column terminals. - -1.5 Creates the temporary maildrop with mode "600" and - immediately unlinks it. - - Uses client's IP address in lieu of a canonical name if - the latter cannot be obtained. - - Added "-t " option. The presence of this - option causes debugging output to be placed in the file - "file-name" using fprintf instead of the system log - file using syslog. - - Corrected maildrop parsing problem. - -1.4 Copies user's mail into a temporary maildrop on which - all subsequent activity is performed. - - Added "pop_log" function and replaced "syslog" calls - throughout the code with it. - -1.3 Corrected updating of Status: header line. - - Added strncasecmp for systems that do not have one. - Used strncasecmp in all appropriate places. This is - enabled by the STRNCASECMP compiler flag. - -1.2 Support for version 4.2 syslogging added. This is - enabled by the SYSLOG42 compiler flag. - -1.1 Several bugs fixed. - -1.0 Original version. - - -Limitations - -+ The POP server copies the user's entire maildrop to /tmp and - then operates on that copy. If the maildrop is particularly - large, or inadequate space is available in /tmp, then the - server will refuse to continue and terminate the connection. - -+ Simultaneous modification of a single maildrop can result in - confusing results. For example, manipulating messages in a - maildrop using the Unix /usr/ucb/mail command while a copy of - it is being processed by the POP server can cause the changes - made by one program to be lost when the other terminates. This - problem is being worked on and will be fixed in a later - release. - - -Credits - -The POP server was written by Edward Moy and Austin Shelton with -contributions from Robert Campbell (U.C. Berkeley) and Viktor Dukhovni -(Princeton University). Edward Moy wrote the HyperMail stack and drew -the POP operation diagram. This installation guide was written by -Austin Shelton. - - -Footnotes - -[1] Copyright (c) 1990 Regents of the University of California. - All rights reserved. The Berkeley software License Agreement - specifies the terms and conditions for redistribution. Unix is - a registered trademark of AT&T corporation. HyperCard and - Macintosh are registered trademarks of Apple Corporation. - -[2] M. Rose, Post Office Protocol - Version 3. RFC 1081, NIC, - November 1988. - -[3] M. Rose, Post Office Protocol - Version 3 Extended Service - Offerings. RFC 1082, NIC, November 1988. diff --git a/kerberosV/src/appl/popper/README-FIRST b/kerberosV/src/appl/popper/README-FIRST deleted file mode 100644 index 3d78fb644b6..00000000000 --- a/kerberosV/src/appl/popper/README-FIRST +++ /dev/null @@ -1,11 +0,0 @@ -This kerberized popper was based on popper-1.831beta -which was later announced as "offical" and not beta. - -This program is able to talk both the pop3 and the kpop3 protocol. - -Please note that the server principal is pop.hostname and not -rcmd.hostname. I.e an additional entry is needed in your mailhub's -/etc/srvtab. Use ksrvutil to add the extra prinicpal. - -The server is usually started from inetd and there is already an entry -for that in inetd.conf.changes. diff --git a/kerberosV/src/appl/popper/auth_gssapi.c b/kerberosV/src/appl/popper/auth_gssapi.c deleted file mode 100644 index cd5156ebbe0..00000000000 --- a/kerberosV/src/appl/popper/auth_gssapi.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (c) 2004 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 -#include -#include -RCSID("$Id: auth_gssapi.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - - -#if defined(SASL) && defined(KRB5) -#include - -extern krb5_context gssapi_krb5_context; - -struct gss_state { - gss_ctx_id_t context_hdl; - gss_OID mech_oid; - gss_name_t client_name; - int stage; -}; - -static void -gss_set_error (struct gss_state *gs, int min_stat) -{ - OM_uint32 new_stat; - OM_uint32 msg_ctx = 0; - gss_buffer_desc status_string; - OM_uint32 ret; - - do { - char * cstr; - - ret = gss_display_status (&new_stat, - min_stat, - GSS_C_MECH_CODE, - gs->mech_oid, - &msg_ctx, - &status_string); - if (asprintf(&cstr, "%.*s", (int)status_string.length, - (const char *)status_string.value) >= 0) { - pop_auth_set_error(cstr); - free(cstr); - } else { - pop_auth_set_error("unknown error"); - } - gss_release_buffer (&new_stat, &status_string); - } while (!GSS_ERROR(ret) && msg_ctx != 0); -} - -static int -gss_loop(POP *p, void *state, - /* const */ void *input, size_t input_length, - void **output, size_t *output_length) -{ - struct gss_state *gs = state; - gss_buffer_desc real_input_token, real_output_token; - gss_buffer_t input_token = &real_input_token, - output_token = &real_output_token; - OM_uint32 maj_stat, min_stat; - gss_channel_bindings_t bindings = GSS_C_NO_CHANNEL_BINDINGS; - - if(gs->stage == 0) { - /* we require an initial response, so ask for one if not - present */ - gs->stage++; - if(input == NULL && input_length == 0) { - /* XXX this could be done better */ - fputs("+ \r\n", p->output); - fflush(p->output); - return POP_AUTH_CONTINUE; - } - } - if(gs->stage == 1) { - input_token->value = input; - input_token->length = input_length; - maj_stat = - gss_accept_sec_context (&min_stat, - &gs->context_hdl, - GSS_C_NO_CREDENTIAL, - input_token, - bindings, - &gs->client_name, - &gs->mech_oid, - output_token, - NULL, - NULL, - NULL); - if (GSS_ERROR(maj_stat)) { - gss_set_error(gs, min_stat); - return POP_AUTH_FAILURE; - } - if (output_token->length != 0) { - *output = output_token->value; - *output_length = output_token->length; - } - if(maj_stat == GSS_S_COMPLETE) - gs->stage++; - - return POP_AUTH_CONTINUE; - } - - if(gs->stage == 2) { - /* send wanted protection levels */ - unsigned char x[4] = { 1, 0, 0, 0 }; - - input_token->value = x; - input_token->length = 4; - - maj_stat = gss_wrap(&min_stat, - gs->context_hdl, - FALSE, - GSS_C_QOP_DEFAULT, - input_token, - NULL, - output_token); - if (GSS_ERROR(maj_stat)) { - gss_set_error(gs, min_stat); - return POP_AUTH_FAILURE; - } - *output = output_token->value; - *output_length = output_token->length; - gs->stage++; - return POP_AUTH_CONTINUE; - } - if(gs->stage == 3) { - /* receive protection levels and username */ - char *name; - krb5_principal principal; - gss_buffer_desc export_name; - gss_OID oid; - unsigned char *ptr; - - input_token->value = input; - input_token->length = input_length; - - maj_stat = gss_unwrap (&min_stat, - gs->context_hdl, - input_token, - output_token, - NULL, - NULL); - if (GSS_ERROR(maj_stat)) { - gss_set_error(gs, min_stat); - return POP_AUTH_FAILURE; - } - if(output_token->length < 5) { - pop_auth_set_error("response too short"); - return POP_AUTH_FAILURE; - } - ptr = output_token->value; - if(ptr[0] != 1) { - pop_auth_set_error("must use clear text"); - return POP_AUTH_FAILURE; - } - memmove(output_token->value, ptr + 4, output_token->length - 4); - ptr[output_token->length - 4] = '\0'; - - maj_stat = gss_display_name(&min_stat, gs->client_name, - &export_name, &oid); - if(maj_stat != GSS_S_COMPLETE) { - gss_set_error(gs, min_stat); - return POP_AUTH_FAILURE; - } - /* XXX kerberos */ - if(oid != GSS_KRB5_NT_PRINCIPAL_NAME) { - pop_auth_set_error("unexpected gss name type"); - gss_release_buffer(&min_stat, &export_name); - return POP_AUTH_FAILURE; - } - name = malloc(export_name.length + 1); - if(name == NULL) { - pop_auth_set_error("out of memory"); - gss_release_buffer(&min_stat, &export_name); - return POP_AUTH_FAILURE; - } - memcpy(name, export_name.value, export_name.length); - name[export_name.length] = '\0'; - gss_release_buffer(&min_stat, &export_name); - krb5_parse_name(gssapi_krb5_context, name, &principal); - - if(!krb5_kuserok(gssapi_krb5_context, principal, ptr)) { - pop_auth_set_error("Permission denied"); - return POP_AUTH_FAILURE; - } - - - strlcpy(p->user, ptr, sizeof(p->user)); - return POP_AUTH_COMPLETE; - } - return POP_AUTH_FAILURE; -} - - -static int -gss_init(POP *p, void **state) -{ - struct gss_state *gs = malloc(sizeof(*gs)); - if(gs == NULL) { - pop_auth_set_error("out of memory"); - return POP_AUTH_FAILURE; - } - gs->context_hdl = GSS_C_NO_CONTEXT; - gs->stage = 0; - *state = gs; - return POP_AUTH_CONTINUE; -} - -static int -gss_cleanup(POP *p, void *state) -{ - OM_uint32 min_stat; - struct gss_state *gs = state; - if(gs->context_hdl != GSS_C_NO_CONTEXT) - gss_delete_sec_context(&min_stat, &gs->context_hdl, GSS_C_NO_BUFFER); - free(state); - return POP_AUTH_CONTINUE; -} - -struct auth_mech gssapi_mech = { - "GSSAPI", gss_init, gss_loop, gss_cleanup -}; - -#endif /* KRB5 */ diff --git a/kerberosV/src/appl/popper/maildir.c b/kerberosV/src/appl/popper/maildir.c deleted file mode 100644 index 8b3513af891..00000000000 --- a/kerberosV/src/appl/popper/maildir.c +++ /dev/null @@ -1,216 +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 -#include -RCSID("$Id: maildir.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -static void -make_path(POP *p, MsgInfoList *mp, int new, char *buf, size_t len) -{ - snprintf(buf, len, "%s/%s%s%s", p->drop_name, - new ? "new" : "cur", mp ? "/" : "", mp ? mp->name : ""); -} - -static int -scan_file(POP *p, MsgInfoList *mp) -{ - char path[MAXPATHLEN]; - FILE *f; - char buf[1024]; - int eoh = 0; - - make_path(p, mp, mp->flags & NEW_FLAG, path, sizeof(path)); - f = fopen(path, "r"); - - if(f == NULL) { -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, - "Failed to open message file `%s': %s", - path, strerror(errno)); -#endif - return pop_msg (p, POP_FAILURE, - "Failed to open message file `%s'", path); - } - while(fgets(buf, sizeof(buf), f)) { - if(buf[strlen(buf) - 1] == '\n') - mp->lines++; - mp->length += strlen(buf); - if(eoh) - continue; - if(strcmp(buf, "\n") == 0) - eoh = 1; - parse_header(mp, buf); - } - fclose(f); - return add_missing_headers(p, mp); -} - -static int -scan_dir(POP *p, int new) -{ - char tmp[MAXPATHLEN]; - DIR *dir; - struct dirent *dent; - MsgInfoList *mp = p->mlp; - int n_mp = p->msg_count; - int e; - - make_path(p, NULL, new, tmp, sizeof(tmp)); - mkdir(tmp, 0700); - dir = opendir(tmp); - while((dent = readdir(dir)) != NULL) { - if(strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0) - continue; - mp = realloc(mp, (n_mp + 1) * sizeof(*mp)); - if(mp == NULL) { - p->msg_count = 0; - return pop_msg (p, POP_FAILURE, - "Can't build message list for '%s': Out of memory", - p->user); - } - memset(mp + n_mp, 0, sizeof(*mp)); - mp[n_mp].name = strdup(dent->d_name); - if(mp[n_mp].name == NULL) { - p->msg_count = 0; - return pop_msg (p, POP_FAILURE, - "Can't build message list for '%s': Out of memory", - p->user); - } - mp[n_mp].number = n_mp + 1; - mp[n_mp].flags = 0; - if(new) - mp[n_mp].flags |= NEW_FLAG; - e = scan_file(p, &mp[n_mp]); - if(e != POP_SUCCESS) - return e; - p->drop_size += mp[n_mp].length; - n_mp++; - } - closedir(dir); - p->mlp = mp; - p->msg_count = n_mp; - return POP_SUCCESS; -} - -int -pop_maildir_info(POP *p) -{ - int e; - - p->temp_drop[0] = '\0'; - p->mlp = NULL; - p->msg_count = 0; - - e = scan_dir(p, 0); - if(e != POP_SUCCESS) return e; - - e = scan_dir(p, 1); - if(e != POP_SUCCESS) return e; - return POP_SUCCESS; -} - -int -pop_maildir_update(POP *p) -{ - int i; - char tmp1[MAXPATHLEN], tmp2[MAXPATHLEN]; - for(i = 0; i < p->msg_count; i++) { - make_path(p, &p->mlp[i], p->mlp[i].flags & NEW_FLAG, - tmp1, sizeof(tmp1)); - if(p->mlp[i].flags & DEL_FLAG) { -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, "Removing `%s'", tmp1); -#endif - if(unlink(tmp1) < 0) { -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, "Failed to remove `%s': %s", - tmp1, strerror(errno)); -#endif - /* return failure? */ - } - } else if((p->mlp[i].flags & NEW_FLAG) && - (p->mlp[i].flags & RETR_FLAG)) { - make_path(p, &p->mlp[i], 0, tmp2, sizeof(tmp2)); -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, "Linking `%s' to `%s'", tmp1, tmp2); -#endif - if(link(tmp1, tmp2) == 0) { -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, "Removing `%s'", tmp1); -#endif - if(unlink(tmp1) < 0) { -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, "Failed to remove `%s'", tmp1); -#endif - /* return failure? */ - } - } else { - if(errno == EXDEV) { -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, "Trying to rename `%s' to `%s'", - tmp1, tmp2); -#endif - if(rename(tmp1, tmp2) < 0) { -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, "Failed to rename `%s' to `%s'", - tmp1, tmp2); -#endif - } - } - } - } - } - return(pop_quit(p)); -} - -int -pop_maildir_open(POP *p, MsgInfoList *mp) -{ - char tmp[MAXPATHLEN]; - make_path(p, mp, mp->flags & NEW_FLAG, tmp, sizeof(tmp)); - if(p->drop) - fclose(p->drop); - p->drop = fopen(tmp, "r"); - if(p->drop == NULL) - return pop_msg(p, POP_FAILURE, "Failed to open message file"); - return POP_SUCCESS; -} diff --git a/kerberosV/src/appl/popper/pop3.rfc1081 b/kerberosV/src/appl/popper/pop3.rfc1081 deleted file mode 100644 index 08ea6dd1430..00000000000 --- a/kerberosV/src/appl/popper/pop3.rfc1081 +++ /dev/null @@ -1,898 +0,0 @@ - - - - - - -Network Working Group M. Rose -Request for Comments: 1081 TWG - November 1988 - - Post Office Protocol - Version 3 - - -Status of this Memo - - This memo suggests a simple method for workstations to dynamically - access mail from a mailbox server. This RFC specifies a proposed - protocol for the Internet community, and requests discussion and - suggestions for improvements. Distribution of this memo is - unlimited. - - This memo is based on RFC 918 (since revised as RFC 937). Although - similar in form to the original Post Office Protocol (POP) proposed - for the Internet community, the protocol discussed in this memo is - similar in spirit to the ideas investigated by the MZnet project at - the University of California, Irvine. - - Further, substantial work was done on examining POP in a PC-based - environment. This work, which resulted in additional functionality - in this protocol, was performed by the ACIS Networking Systems Group - at Stanford University. The author gratefully acknowledges their - interest. - -Introduction - - On certain types of smaller nodes in the Internet it is often - impractical to maintain a message transport system (MTS). For - example, a workstation may not have sufficient resources (cycles, - disk space) in order to permit a SMTP server and associated local - mail delivery system to be kept resident and continuously running. - Similarly, it may be expensive (or impossible) to keep a personal - computer interconnected to an IP-style network for long amounts of - time (the node is lacking the resource known as "connectivity"). - - Despite this, it is often very useful to be able to manage mail on - these smaller nodes, and they often support a user agent (UA) to aid - the tasks of mail handling. To solve this problem, a node which can - support an MTS entity offers a maildrop service to these less endowed - nodes. The Post Office Protocol - Version 3 (POP3) is intended to - permit a workstation to dynamically access a maildrop on a server - host in a useful fashion. Usually, this means that the POP3 is used - to allow a workstation to retrieve mail that the server is holding - for it. - - - - -Rose [Page 1] - -RFC 1081 POP3 November 1988 - - - For the remainder of this memo, the term "client host" refers to a - host making use of the POP3 service, while the term "server host" - refers to a host which offers the POP3 service. - -A Short Digression - - This memo does not specify how a client host enters mail into the - transport system, although a method consistent with the philosophy of - this memo is presented here: - - When the user agent on a client host wishes to enter a message - into the transport system, it establishes an SMTP connection to - its relay host (this relay host could be, but need not be, the - POP3 server host for the client host). - - If this method is followed, then the client host appears to the MTS - as a user agent, and should NOT be regarded as a "trusted" MTS entity - in any sense whatsoever. This concept, along with the role of the - POP3 as a part of a split-UA model is discussed later in this memo. - - Initially, the server host starts the POP3 service by listening on - TCP port 110. When a client host wishes to make use of the service, - it establishes a TCP connection with the server host. When the - connection is established, the POP3 server sends a greeting. The - client and POP3 server then exchange commands and responses - (respectively) until the connection is closed or aborted. - - Commands in the POP3 consist of a keyword possibly followed by an - argument. All commands are terminated by a CRLF pair. - - Responses in the POP3 consist of a success indicator and a keyword - possibly followed by additional information. All responses are - terminated by a CRLF pair. There are currently two success - indicators: positive ("+OK") and negative ("-ERR"). - - Responses to certain commands are multi-line. In these cases, which - are clearly indicated below, after sending the first line of the - response and a CRLF, any additional lines are sent, each terminated - by a CRLF pair. When all lines of the response have been sent, a - final line is sent, consisting of a termination octet (decimal code - 046, ".") and a CRLF pair. If any line of the multi-line response - begins with the termination octet, the line is "byte-stuffed" by - pre-pending the termination octet to that line of the response. - Hence a multi-line response is terminated with the five octets - "CRLF.CRLF". When examining a multi-line response, the client checks - to see if the line begins with the termination octet. If so and if - octets other than CRLF follow, the the first octet of the line (the - termination octet) is stripped away. If so and if CRLF immediately - - - -Rose [Page 2] - -RFC 1081 POP3 November 1988 - - - follows the termination character, then the response from the POP - server is ended and the line containing ".CRLF" is not considered - part of the multi-line response. - - A POP3 session progresses through a number of states during its - lifetime. Once the TCP connection has been opened and the POP3 - server has sent the greeting, the session enters the AUTHORIZATION - state. In this state, the client must identify itself to the POP3 - server. Once the client has successfully done this, the server - acquires resources associated with the client's maildrop, and the - session enters the TRANSACTION state. In this state, the client - requests actions on the part of the POP3 server. When the client has - finished its transactions, the session enters the UPDATE state. In - this state, the POP3 server releases any resources acquired during - the TRANSACTION state and says goodbye. The TCP connection is then - closed. - -The AUTHORIZATION State - - Once the TCP connection has been opened by a POP3 client, the POP3 - server issues a one line greeting. This can be any string terminated - by CRLF. An example might be: - - S. +OK dewey POP3 server ready (Comments to: PostMaster@UDEL.EDU) - - Note that this greeting is a POP3 reply. The POP3 server should - always give a positive response as the greeting. - - The POP3 session is now in the AUTHORIZATION state. The client must - now issue the USER command. If the POP3 server responds with a - positive success indicator ("+OK"), then the client may issue either - the PASS command to complete the authorization, or the QUIT command - to terminate the POP3 session. If the POP3 server responds with a - negative success indicator ("-ERR") to the USER command, then the - client may either issue a new USER command or may issue the QUIT - command. - - When the client issues the PASS command, the POP3 server uses the - argument pair from the USER and PASS commands to determine if the - client should be given access to the appropriate maildrop. If so, - the POP3 server then acquires an exclusive-access lock on the - maildrop. If the lock is successfully acquired, the POP3 server - parses the maildrop into individual messages (read note below), - determines the last message (if any) present in the maildrop that was - referenced by the RETR command, and responds with a positive success - indicator. The POP3 session now enters the TRANSACTION state. If - the lock can not be acquired or the client should is denied access to - the appropriate maildrop or the maildrop can't be parsed for some - - - -Rose [Page 3] - -RFC 1081 POP3 November 1988 - - - reason, the POP3 server responds with a negative success indicator. - (If a lock was acquired but the POP3 server intends to respond with a - negative success indicator, the POP3 server must release the lock - prior to rejecting the command.) At this point, the client may - either issue a new USER command and start again, or the client may - issue the QUIT command. - - NOTE: Minimal implementations of the POP3 need only be - able to break a maildrop into its component messages; - they need NOT be able to parse individual messages. - More advanced implementations may wish to have this - capability, for reasons discussed later. - - After the POP3 server has parsed the maildrop into individual - messages, it assigns a message-id to each message, and notes the size - of the message in octets. The first message in the maildrop is - assigned a message-id of "1", the second is assigned "2", and so on, - so that the n'th message in a maildrop is assigned a message-id of - "n". In POP3 commands and responses, all message-id's and message - sizes are expressed in base-10 (i.e., decimal). - - It sets the "highest number accessed" to be that of the last message - referenced by the RETR command. - - Here are summaries for the three POP3 commands discussed thus far: - - USER name - Arguments: a server specific user-id (required) - Restrictions: may only be given in the AUTHORIZATION - state after the POP3 greeting or after an - unsuccessful USER or PASS command - Possible Responses: - +OK name is welcome here - -ERR never heard of name - Examples: - C: USER mrose - S: +OK mrose is a real hoopy frood - ... - C: USER frated - S: -ERR sorry, frated doesn't get his mail here - - PASS string - Arguments: a server/user-id specific password (required) - Restrictions: may only be given in the AUTHORIZATION - state after a successful USER command - Possible Responses: - +OK maildrop locked and ready - -ERR invalid password - - - -Rose [Page 4] - -RFC 1081 POP3 November 1988 - - - -ERR unable to lock maildrop - Examples: - C: USER mrose - S: +OK mrose is a real hoopy frood - C: PASS secret - S: +OK mrose's maildrop has 2 messages - (320 octets) - ... - C: USER mrose - S: +OK mrose is a real hoopy frood - C: PASS secret - S: -ERR unable to lock mrose's maildrop, file - already locked - - QUIT - Arguments: none - Restrictions: none - Possible Responses: - +OK - Examples: - C: QUIT - S: +OK dewey POP3 server signing off - - -The TRANSACTION State - - Once the client has successfully identified itself to the POP3 server - and the POP3 server has locked and burst the appropriate maildrop, - the POP3 session is now in the TRANSACTION state. The client may now - issue any of the following POP3 commands repeatedly. After each - command, the POP3 server issues a response. Eventually, the client - issues the QUIT command and the POP3 session enters the UPDATE state. - - Here are the POP3 commands valid in the TRANSACTION state: - - STAT - Arguments: none - Restrictions: may only be given in the TRANSACTION state. - Discussion: - - The POP3 server issues a positive response with a line - containing information for the maildrop. This line is - called a "drop listing" for that maildrop. - - In order to simplify parsing, all POP3 servers are - required to use a certain format for drop listings. - The first octets present must indicate the number of - messages in the maildrop. Following this is the size - - - -Rose [Page 5] - -RFC 1081 POP3 November 1988 - - - of the maildrop in octets. This memo makes no - requirement on what follows the maildrop size. - Minimal implementations should just end that line of - the response with a CRLF pair. More advanced - implementations may include other information. - - NOTE: This memo STRONGLY discourages - implementations from supplying additional - information in the drop listing. Other, - optional, facilities are discussed later on - which permit the client to parse the messages - in the maildrop. - - Note that messages marked as deleted are not counted in - either total. - - Possible Responses: - +OK nn mm - Examples: - C: STAT - S: +OK 2 320 - - LIST [msg] - Arguments: a message-id (optionally) If a message-id is - given, it may NOT refer to a message marked as - deleted. - Restrictions: may only be given in the TRANSACTION state. - Discussion: - - If an argument was given and the POP3 server issues a - positive response with a line containing information - for that message. This line is called a "scan listing" - for that message. - - If no argument was given and the POP3 server issues a - positive response, then the response given is - multi-line. After the initial +OK, for each message - in the maildrop, the POP3 server responds with a line - containing information for that message. This line - is called a "scan listing" for that message. - - In order to simplify parsing, all POP3 servers are - required to use a certain format for scan listings. - The first octets present must be the message-id of - the message. Following the message-id is the size of - the message in octets. This memo makes no requirement - on what follows the message size in the scan listing. - Minimal implementations should just end that line of - - - -Rose [Page 6] - -RFC 1081 POP3 November 1988 - - - the response with a CRLF pair. More advanced - implementations may include other information, as - parsed from the message. - - NOTE: This memo STRONGLY discourages - implementations from supplying additional - information in the scan listing. Other, optional, - facilities are discussed later on which permit - the client to parse the messages in the maildrop. - - Note that messages marked as deleted are not listed. - - Possible Responses: - +OK scan listing follows - -ERR no such message - Examples: - C: LIST - S: +OK 2 messages (320 octets) - S: 1 120 - S: 2 200 - S: . - ... - C: LIST 2 - S: +OK 2 200 - ... - C: LIST 3 - S: -ERR no such message, only 2 messages in - maildrop - - RETR msg - Arguments: a message-id (required) This message-id may - NOT refer to a message marked as deleted. - Restrictions: may only be given in the TRANSACTION state. - Discussion: - - If the POP3 server issues a positive response, then the - response given is multi-line. After the initial +OK, - the POP3 server sends the message corresponding to the - given message-id, being careful to byte-stuff the - termination character (as with all multi-line - responses). - - If the number associated with this message is higher - than the "highest number accessed" in the maildrop, the - POP3 server updates the "highest number accessed" to - the number associated with this message. - - - - - -Rose [Page 7] - -RFC 1081 POP3 November 1988 - - - Possible Responses: - +OK message follows - -ERR no such message - Examples: - C: RETR 1 - S: +OK 120 octets - S: - S: . - - DELE msg - Arguments: a message-id (required) This message-id - may NOT refer to a message marked as deleted. - Restrictions: may only be given in the TRANSACTION state. - Discussion: - - The POP3 server marks the message as deleted. Any - future reference to the message-id associated with the - message in a POP3 command generates an error. The POP3 - server does not actually delete the message until the - POP3 session enters the UPDATE state. - - If the number associated with this message is higher - than the "highest number accessed" in the maildrop, - the POP3 server updates the "highest number accessed" - to the number associated with this message. - - Possible Responses: - +OK message deleted - -ERR no such message - Examples: - C: DELE 1 - S: +OK message 1 deleted - ... - C: DELE 2 - S: -ERR message 2 already deleted - - NOOP - Arguments: none - Restrictions: may only be given in the TRANSACTION state. - Discussion: - - The POP3 server does nothing, it merely replies with a - positive response. - - Possible Responses: - +OK - - - - - -Rose [Page 8] - -RFC 1081 POP3 November 1988 - - - Examples: - C: NOOP - S: +OK - - LAST - Arguments: none - Restrictions: may only be issued in the TRANSACTION state. - Discussion: - - The POP3 server issues a positive response with a line - containing the highest message number which accessed. - Zero is returned in case no message in the maildrop has - been accessed during previous transactions. A client - may thereafter infer that messages, if any, numbered - greater than the response to the LAST command are - messages not yet accessed by the client. - - Possible Response: - +OK nn - - Examples: - C: STAT - S: +OK 4 320 - C: LAST - S: +OK 1 - C: RETR 3 - S: +OK 120 octets - S: - S: . - C: LAST - S: +OK 3 - C: DELE 2 - S: +OK message 2 deleted - C: LAST - S: +OK 3 - C: RSET - S: +OK - C: LAST - S: +OK 1 - - RSET - Arguments: none - Restrictions: may only be given in the TRANSACTION - state. - Discussion: - - If any messages have been marked as deleted by the POP3 - - - -Rose [Page 9] - -RFC 1081 POP3 November 1988 - - - server, they are unmarked. The POP3 server then - replies with a positive response. In addition, the - "highest number accessed" is also reset to the value - determined at the beginning of the POP3 session. - - Possible Responses: - +OK - Examples: - C: RSET - S: +OK maildrop has 2 messages (320 octets) - - - -The UPDATE State - - When the client issues the QUIT command from the TRANSACTION state, - the POP3 session enters the UPDATE state. (Note that if the client - issues the QUIT command from the AUTHORIZATION state, the POP3 - session terminates but does NOT enter the UPDATE state.) - - QUIT - Arguments: none - Restrictions: none - Discussion: - - The POP3 server removes all messages marked as deleted - from the maildrop. It then releases the - exclusive-access lock on the maildrop and replies as - to the success of - these operations. The TCP connection is then closed. - - Possible Responses: - +OK - Examples: - C: QUIT - S: +OK dewey POP3 server signing off (maildrop - empty) - ... - C: QUIT - S: +OK dewey POP3 server signing off (2 messages - left) - ... - - -Optional POP3 Commands - - The POP3 commands discussed above must be supported by all minimal - implementations of POP3 servers. - - - -Rose [Page 10] - -RFC 1081 POP3 November 1988 - - - The optional POP3 commands described below permit a POP3 client - greater freedom in message handling, while preserving a simple POP3 - server implementation. - - NOTE: This memo STRONGLY encourages implementations to - support these commands in lieu of developing augmented - drop and scan listings. In short, the philosophy of - this memo is to put intelligence in the part of the - POP3 client and not the POP3 server. - - TOP msg n - Arguments: a message-id (required) and a number. This - message-id may NOT refer to a message marked as - deleted. - Restrictions: may only be given in the TRANSACTION state. - Discussion: - - If the POP3 server issues a positive response, then - the response given is multi-line. After the initial - +OK, the POP3 server sends the headers of the message, - the blank line separating the headers from the body, - and then the number of lines indicated message's body, - being careful to byte-stuff the termination character - (as with all multi-line responses). - - Note that if the number of lines requested by the POP3 - client is greater than than the number of lines in the - body, then the POP3 server sends the entire message. - - Possible Responses: - +OK top of message follows - -ERR no such message - Examples: - C: TOP 10 - S: +OK - S: - S: . - ... - C: TOP 100 - S: -ERR no such message - - RPOP user - Arguments: a client specific user-id (required) - Restrictions: may only be given in the AUTHORIZATION - state after a successful USER command; in addition, - may only be given if the client used a reserved - - - -Rose [Page 11] - -RFC 1081 POP3 November 1988 - - - (privileged) TCP port to connect to the server. - Discussion: - - The RPOP command may be used instead of the PASS - command to authenticate access to the maildrop. In - order for this command to be successful, the POP3 - client must use a reserved TCP port (port < 1024) to - connect tothe server. The POP3 server uses the - argument pair from the USER and RPOP commands to - determine if the client should be given access to - the appropriate maildrop. Unlike the PASS command - however, the POP3 server considers if the remote user - specified by the RPOP command who resides on the POP3 - client host is allowed to access the maildrop for the - user specified by the USER command (e.g., on Berkeley - UNIX, the .rhosts mechanism is used). With the - exception of this differing in authentication, this - command is identical to the PASS command. - - Note that the use of this feature has allowed much wider - penetration into numerous hosts on local networks (and - sometimes remote networks) by those who gain illegal - access to computers by guessing passwords or otherwise - breaking into the system. - - Possible Responses: - +OK maildrop locked and ready - -ERR permission denied - Examples: - C: USER mrose - S: +OK mrose is a real hoopy frood - C: RPOP mrose - S: +OK mrose's maildrop has 2 messages (320 - octets) - - Minimal POP3 Commands: - USER name valid in the AUTHORIZATION state - PASS string - QUIT - - STAT valid in the TRANSACTION state - LIST [msg] - RETR msg - DELE msg - NOOP - LAST - RSET - - - - -Rose [Page 12] - -RFC 1081 POP3 November 1988 - - - QUIT valid in the UPDATE state - - Optional POP3 Commands: - RPOP user valid in the AUTHORIZATION state - - TOP msg n valid in the TRANSACTION state - - POP3 Replies: - +OK - -ERR - - Note that with the exception of the STAT command, the reply given - by the POP3 server to any command is significant only to "+OK" - and "-ERR". Any text occurring after this reply may be ignored - by the client. - -Example POP3 Session - - S: - ... - C: - S: +OK dewey POP3 server ready (Comments to: PostMaster@UDEL.EDU) - C: USER mrose - S: +OK mrose is a real hoopy frood - C: PASS secret - S: +OK mrose's maildrop has 2 messages (320 octets) - C: STAT - S: +OK 2 320 - C: LIST - S: +OK 2 messages (320 octets) - S: 1 120 - S: 2 200 - S: . - C: RETR 1 - S: +OK 120 octets - S: - S: . - C: DELE 1 - S: +OK message 1 deleted - C: RETR 2 - S: +OK 200 octets - S: - S: . - C: DELE 2 - S: +OK message 2 deleted - C: QUIT - - - - - -Rose [Page 13] - -RFC 1081 POP3 November 1988 - - - S: +OK dewey POP3 server signing off (maildrop empty) - C: - S: - -Message Format - - All messages transmitted during a POP3 session are assumed to conform - to the standard for the format of Internet text messages [RFC822]. - - It is important to note that the byte count for a message on the - server host may differ from the octet count assigned to that message - due to local conventions for designating end-of-line. Usually, - during the AUTHORIZATION state of the POP3 session, the POP3 client - can calculate the size of each message in octets when it parses the - maildrop into messages. For example, if the POP3 server host - internally represents end-of-line as a single character, then the - POP3 server simply counts each occurrence of this character in a - message as two octets. Note that lines in the message which start - with the termination octet need not be counted twice, since the POP3 - client will remove all byte-stuffed termination characters when it - receives a multi-line response. - -The POP and the Split-UA model - - The underlying paradigm in which the POP3 functions is that of a - split-UA model. The POP3 client host, being a remote PC based - workstation, acts solely as a client to the message transport system. - It does not provide delivery/authentication services to others. - Hence, it is acting as a UA, on behalf of the person using the - workstation. Furthermore, the workstation uses SMTP to enter mail - into the MTS. - - In this sense, we have two UA functions which interface to the - message transport system: Posting (SMTP) and Retrieval (POP3). The - entity which supports this type of environment is called a split-UA - (since the user agent is split between two hosts which must - interoperate to provide these functions). - - ASIDE: Others might term this a remote-UA instead. - There are arguments supporting the use of both terms. - - This memo has explicitly referenced TCP as the underlying transport - agent for the POP3. This need not be the case. In the MZnet split- - UA, for example, personal micro-computer systems are used which do - not have IP-style networking capability. To connect to the POP3 - server host, a PC establishes a terminal connection using some simple - protocol (PhoneNet). A program on the PC drives the connection, - first establishing a login session as a normal user. The login shell - - - -Rose [Page 14] - -RFC 1081 POP3 November 1988 - - - for this pseudo-user is a program which drives the other half of the - terminal protocol and communicates with one of two servers. Although - MZnet can support several PCs, a single pseudo-user login is present - on the server host. The user-id and password for this pseudo-user - login is known to all members of MZnet. Hence, the first action of - the login shell, after starting the terminal protocol, is to demand a - USER/PASS authorization pair from the PC. This second level of - authorization is used to ascertain who is interacting with the MTS. - Although the server host is deemed to support a "trusted" MTS entity, - PCs in MZnet are not. Naturally, the USER/PASS authorization pair - for a PC is known only to the owner of the PC (in theory, at least). - - After successfully verifying the identity of the client, a modified - SMTP server is started, and the PC posts mail with the server host. - After the QUIT command is given to the SMTP server and it terminates, - a modified POP3 server is started, and the PC retrieves mail from the - server host. After the QUIT command is given to the POP3 server and - it terminates, the login shell for the pseudo-user terminates the - terminal protocol and logs the job out. The PC then closes the - terminal connection to the server host. - - The SMTP server used by MZnet is modified in the sense that it knows - that it's talking to a user agent and not a "trusted" entity in the - message transport system. Hence, it does performs the validation - activities normally performed by an entity in the MTS when it accepts - a message from a UA. - - The POP3 server used by MZnet is modified in the sense that it does - not require a USER/PASS combination before entering the TRANSACTION - state. The reason for this (of course) is that the PC has already - identified itself during the second-level authorization step - described above. - - NOTE: Truth in advertising laws require that the author - of this memo state that MZnet has not actually been - fully implemented. The concepts presented and proven - by the project led to the notion of the MZnet - split-slot model. This notion has inspired the - split-UA concept described in this memo, led to the - author's interest in the POP, and heavily influenced - the the description of the POP3 herein. - - In fact, some UAs present in the Internet already support the notion - of posting directly to an SMTP server and retrieving mail directly - from a POP server, even if the POP server and client resided on the - same host! - - ASIDE: this discussion raises an issue which this memo - - - -Rose [Page 15] - -RFC 1081 POP3 November 1988 - - - purposedly avoids: how does SMTP know that it's talking - to a "trusted" MTS entity? - -References - - [MZnet] Stefferud, E., J. Sweet, and T. Domae, "MZnet: Mail - Service for Personal Micro-Computer Systems", - Proceedings, IFIP 6.5 International Conference on - Computer Message Systems, Nottingham, U.K., May 1984. - - [RFC821] Postel, J., "Simple Mail Transfer Protocol", - USC/Information Sciences Institute, August 1982. - - [RFC822] Crocker, D., "Standard for the Format of ARPA-Internet - Text Messages", University of Delaware, August 1982. - - [RFC937] Butler, M., J. Postel, D. Chase, J. Goldberger, and J. - Reynolds, "Post Office Protocol - Version 2", RFC 937, - USC/Information Sciences Institute, February 1985. - - [RFC1010] Reynolds, J., and J. Postel, "Assigned Numbers", RFC - 1010, USC/Information Sciences Institute, May 1987. - -Author's Address: - - - Marshall Rose - The Wollongong Group - 1129 San Antonio Rd. - Palo Alto, California 94303 - - Phone: (415) 962-7100 - - Email: MRose@TWG.COM - - - - - - - - - - - - - - - - - -Rose [Page 16] diff --git a/kerberosV/src/appl/popper/pop3e.rfc1082 b/kerberosV/src/appl/popper/pop3e.rfc1082 deleted file mode 100644 index ac49448b5e1..00000000000 --- a/kerberosV/src/appl/popper/pop3e.rfc1082 +++ /dev/null @@ -1,619 +0,0 @@ - - - - - - -Network Working Group M. Rose -Request for Comments: 1082 TWG - November 1988 - - - - Post Office Protocol - Version 3 - Extended Service Offerings - -Status of This Memo - - This memo suggests a simple method for workstations to dynamically - access mail from a discussion group server, as an extension to an - earlier memo which dealt with dynamically accessing mail from a - mailbox server using the Post Office Protocol - Version 3 (POP3). - This RFC specifies a proposed protocol for the Internet community, - and requests discussion and suggestions for improvements. All of the - extensions described in this memo to the POP3 are OPTIONAL. - Distribution of this memo is unlimited. - -Introduction and Motivation - - It is assumed that the reader is familiar with RFC 1081 that - discusses the Post Office Protocol - Version 3 (POP3) [RFC1081]. - This memo describes extensions to the POP3 which enhance the service - it offers to clients. This additional service permits a client host - to access discussion group mail, which is often kept in a separate - spool area, using the general POP3 facilities. - - The next section describes the evolution of discussion groups and the - technologies currently used to implement them. To summarize: - - o An exploder is used to map from a single address to - a list of addresses which subscribe to the list, and redirects - any subsequent error reports associated with the delivery of - each message. This has two primary advantages: - - Subscribers need know only a single address - - Responsible parties get the error reports and not - the subscribers - - - - - - - - - - - - -Rose [Page 1] - -RFC 1082 POP3 Extended Service November 1988 - - - o Typically, each subscription address is not a person's private - maildrop, but a system-wide maildrop, which can be accessed - by more than one user. This has several advantages: - - Only a single copy of each message need traverse the - net for a given site (which may contain several local - hosts). This conserves bandwidth and cycles. - - Only a single copy of each message need reside on each - subscribing host. This conserves disk space. - - The private maildrop for each user is not cluttered - with discussion group mail. - - Despite this optimization of resources, further economy can be - achieved at sites with more than one host. Typically, sites with - more than one host either: - - 1. Replicate discussion group mail on each host. This - results in literally gigabytes of disk space committed to - unnecessarily store redundant information. - - 2. Keep discussion group mail on one host and give all users a - login on that host (in addition to any other logins they may - have). This is usually a gross inconvenience for users who - work on other hosts, or a burden to users who are forced to - work on that host. - - As discussed in [RFC1081], the problem of giving workstations dynamic - access to mail from a mailbox server has been explored in great - detail (originally there was [RFC918], this prompted the author to - write [RFC1081], independently of this [RFC918] was upgraded to - [RFC937]). A natural solution to the problem outlined above is to - keep discussion group mail on a mailbox server at each site and - permit different hosts at that site to employ the POP3 to access - discussion group mail. If implemented properly, this avoids the - problems of both strategies outlined above. - - ASIDE: It might be noted that a good distributed filesystem - could also solve this problem. Sadly, "good" - distributed filesystems, which do not suffer - unacceptable response time for interactive use, are - few and far between these days! - - Given this motivation, now let's consider discussion groups, both in - general and from the point of view of a user agent. Following this, - extensions to the POP3 defined in [RFC1081] are presented. Finally, - some additional policy details are discussed along with some initial - experiences. - - - - - -Rose [Page 2] - -RFC 1082 POP3 Extended Service November 1988 - - -What's in a Discussion Group - - Since mailers and user agents first crawled out of the primordial - ARPAnet, the value of discussion groups have been appreciated, - (though their implementation has not always been well-understood). - - Described simply, a discussion group is composed of a number of - subscribers with a common interest. These subscribers post mail to a - single address, known as a distribution address. From this - distribution address, a copy of the message is sent to each - subscriber. Each group has a moderator, which is the person that - administrates the group. The moderator can usually be reached at a - special address, known as a request address. Usually, the - responsibilities of the moderator are quite simple, since the mail - system handles the distribution to subscribers automatically. In - some cases, the interest group, instead of being distributed directly - to its subscribers, is put into a digest format by the moderator and - then sent to the subscribers. Although this requires more work on - the part of the moderator, such groups tend to be better organized. - - Unfortunately, there are a few problems with the scheme outlined - above. First, if two users on the same host subscribe to the same - interest group, two copies of the message get delivered. This is - wasteful of both processor and disk resources. - - Second, some of these groups carry a lot of traffic. Although - subscription to an group does indicate interest on the part of a - subscriber, it is usually not interesting to get 50 messages or so - delivered to the user's private maildrop each day, interspersed with - personal mail, that is likely to be of a much more important and - timely nature. - - Third, if a subscriber on the distribution list for a group becomes - "bad" somehow, the originator of the message and not the moderator of - the group is notified. It is not uncommon for a large list to have - 10 or so bogus addresses present. This results in the originator - being flooded with "error messages" from mailers across the Internet - stating that a given address on the list was bad. Needless to say, - the originator usually could not care less if the bogus addresses got - a copy of the message or not. The originator is merely interested in - posting a message to the group at large. Furthermore, the moderator - of the group does care if there are bogus addresses on the list, but - ironically does not receive notification. - - There are various approaches which can be used to solve some or all - of these problems. Usually these involve placing an exploder agent - at the distribution source of the discussion group, which expands the - name of the group into the list of subscription addresses for the - - - -Rose [Page 3] - -RFC 1082 POP3 Extended Service November 1988 - - - group. In the process, the exploder will also change the address - that receives error notifications to be the request address or other - responsible party. - - A complementary approach, used in order to cut down on resource - utilization of all kinds, replaces all the subscribers at a single - host (or group of hosts under a single administration) with a single - address at that host. This address maps to a file on the host, - usually in a spool area, which all users can access. (Advanced - implementations can also implement private discussion groups this - way, in which a single copy of each message is kept, but is - accessible to only a select number of users on the host.) - - The two approaches can be combined to avoid all of the problems - described above. - - Finally, a third approach can be taken, which can be used to aid user - agents processing mail for the discussion group: In order to speed - querying of the maildrop which contains the local host's copy of the - discussion group, two other items are usually associated with the - discussion group, on a local basis. These are the maxima and the - last-date. Each time a message is received for the group on the - local host, the maxima is increased by at least one. Furthermore, - when a new maxima is generated, the current date is determined. This - is called the last date. As the message is entered into the local - maildrop, it is given the current maxima and last-date. This permits - the user agent to quickly determine if new messages are present in - the maildrop. - - NOTE: The maxima may be characterized as a monotonically - increasing quanity. Although sucessive values of the - maxima need not be consecutive, any maxima assigned - is always greater than any previously assigned value. - -Definition of Terms - - To formalize these notions somewhat, consider the following 7 - parameters which describe a given discussion group from the - perspective of the user agent (the syntax given is from [RFC822]): - - - - - - - - - - - - -Rose [Page 4] - -RFC 1082 POP3 Extended Service November 1988 - - - NAME Meaning: the name of the discussion group - Syntax: TOKEN (ALPHA *[ ALPHA / DIGIT / "-" ]) - (case-insensitive recognition) - Example: unix-wizards - - ALIASES Meaning: alternates names for the group, which - are locally meaningful; these are - typically used to shorten user typein - Syntax: TOKEN (case-insensitive recognition) - Example: uwiz - - ADDRESS Meaning: the primary source of the group - Syntax: 822 address - Example: Unix-Wizards@BRL.MIL - - REQUEST Meaning: the primary moderator of the group - Syntax: 822 address - Example: Unix-Wizards-Request@BRL.MIL - - FLAGS Meaning: locally meaningful flags associated - with the discussion group; this memo - leaves interpretation of this - parameter to each POP3 implementation - Syntax: octal number - Example: 01 - - MAXIMA Meaning: the magic cookie associated with the - last message locally received for the - group; it is the property of the magic - cookie that it's value NEVER - decreases, and increases by at least - one each time a message is locally - received - Syntax: decimal number - Example: 1004 - - LASTDATE Meaning: the date that the last message was - locally received - Syntax: 822 date - Example: Thu, 19 Dec 85 10:26:48 -0800 - - Note that the last two values are locally determined for the maildrop - associated with the discussion group and with each message in that - maildrop. Note however that the last message in the maildrop have a - different MAXIMA and LASTDATE than the discussion group. This often - occurs when the maildrop has been archived. - - - - - -Rose [Page 5] - -RFC 1082 POP3 Extended Service November 1988 - - - Finally, some local systems provide mechanisms for automatically - archiving discussion group mail. In some cases, a two-level archive - scheme is used: current mail is kept in the standard maildrop, - recent mail is kept in an archive maildrop, and older mail is kept - off-line. With this scheme, in addition to having a "standard" - maildrop for each discussion group, an "archive" maildrop may also be - available. This permits a user agent to examine the most recent - archive using the same mechanisms as those used on the current mail. - -The XTND Command - - The following commands are valid only in the TRANSACTION state of the - POP3. This implies that the POP3 server has already opened the - user's maildrop (which may be empty). This maildrop is called the - "default maildrop". The phrase "closes the current maildrop" has two - meanings, depending on whether the current maildrop is the default - maildrop or is a maildrop associated with a discussion group. - - In the former context, when the current maildrop is closed any - messages marked as deleted are removed from the maildrop currently in - use. The exclusive-access lock on the maildrop is then released - along with any implementation-specific resources (e.g., file- - descriptors). - - In the latter context, a maildrop associated with a discussion group - is considered to be read-only to the POP3 client. In this case, the - phrase "closes the current maildrop" merely means that any - implementation-specific resources are released. (Hence, the POP3 - command DELE is a no-op.) - - All the new facilities are introduced via a single POP3 command, - XTND. All positive reponses to the XTND command are multi-line. - - The most common multi-line response to the commands contains a - "discussion group listing" which presents the name of the discussion - group along with it's maxima. In order to simplify parsing all POP3 - servers are required to use a certain format for discussion group - listings: - - NAME SP MAXIMA - - This memo makes no requirement on what follows the maxima in the - listing. Minimal implementations should just end that line of the - response with a CRLF pair. More advanced implementations may include - other information, as parsed from the message. - - NOTE: This memo STRONGLY discourages implementations from - supplying additional information in the listing. - - - -Rose [Page 6] - -RFC 1082 POP3 Extended Service November 1988 - - - XTND BBOARDS [name] - Arguments: the name of a discussion group (optionally) - Restrictions: may only be given in the TRANSACTION state. - Discussion: - - If an argument was given, the POP3 server closes the current - maildrop. The POP3 server then validates the argument as the name of - a discussion group. If this is successful, it opens the maildrop - associated with the group, and returns a multi-line response - containing the discussion group listing. If the discussion group - named is not valid, or the associated archive maildrop is not - readable by the user, then an error response is returned. - - If no argument was given, the POP3 server issues a multi-line - response. After the initial +OK, for each discussion group known, - the POP3 server responds with a line containing the listing for that - discussion group. Note that only world-readable discussion groups - are included in the multi-line response. - - In order to aid user agents, this memo requires an extension to the - scan listing when an "XTND BBOARDS" command has been given. - Normally, a scan listing, as generated by the LIST, takes the form: - - MSGNO SIZE - - where MSGNO is the number of the message being listed and SIZE is the - size of the message in octets. When reading a maildrop accessed via - "XTND BBOARDS", the scan listing takes the form - - MSGNO SIZE MAXIMA - - where MAXIMA is the maxima that was assigned to the message when it - was placed in the BBoard. - - Possible Responses: - +OK XTND - -ERR no such bboard - Examples: - C: XTND BBOARDS - S: +OK XTND - S: system 10 - S: mh-users 100 - S: . - C: XTND BBOARDS system - S: + OK XTND - S: system 10 - S: . - - - - -Rose [Page 7] - -RFC 1082 POP3 Extended Service November 1988 - - - XTND ARCHIVE name - Arguments: the name of a discussion group (required) - Restrictions: may only be given in the TRANSACTION state. - Discussion: - - The POP3 server closes the current maildrop. The POP3 server then - validates the argument as the name of a discussion group. If this is - successful, it opens the archive maildrop associated with the group, - and returns a multi-line response containing the discussion group - listing. If the discussion group named is not valid, or the - associated archive maildrop is not readable by the user, then an - error response is returned. - - In addition, the scan listing generated by the LIST command is - augmented (as described above). - - Possible Responses: - +OK XTND - -ERR no such bboard Examples: - C: XTND ARCHIVE system - S: + OK XTND - S: system 3 - S: . - - XTND X-BBOARDS name - Arguments: the name of a discussion group (required) - Restrictions: may only be given in the TRANSACTION state. - Discussion: - - The POP3 server validates the argument as the name of a - discussion group. If this is unsuccessful, then an error - response is returned. Otherwise a multi-line response is - returned. The first 14 lines of this response (after the - initial +OK) are defined in this memo. Minimal implementations - need not include other information (and may omit certain - information, outputing a bare CRLF pair). More advanced - implementations may include other information. - - Line Information (refer to "Definition of Terms") - ---- ----------- - 1 NAME - 2 ALIASES, separated by SP - 3 system-specific: maildrop - 4 system-specific: archive maildrop - 5 system-specific: information - 6 system-specific: maildrop map - 7 system-specific: encrypted password - 8 system-specific: local leaders, separated by SP - - - -Rose [Page 8] - -RFC 1082 POP3 Extended Service November 1988 - - - 9 ADDRESS - 10 REQUEST - 11 system-specific: incoming feed - 12 system-specific: outgoing feeds - 13 FLAGS SP MAXIMA - 14 LASTDATE - - Most of this information is entirely too specific to the UCI Version - of the Rand MH Message Handling System [MRose85]. Nevertheless, - lines 1, 2, 9, 10, 13, and 14 are of general interest, regardless of - the implementation. - - Possible Responses: - +OK XTND - -ERR no such bboard - Examples: - C: XTND X-BBOARDS system - S: + OK XTND - S: system - S: local general - S: /usr/bboards/system.mbox - S: /usr/bboards/archive/system.mbox - S: /usr/bboards/.system.cnt - S: /usr/bboards/.system.map - S: * - S: mother - S: system@nrtc.northrop.com - S: system-request@nrtc.northrop.com - S: - S: dist-system@nrtc-gremlin.northrop.com - S: 01 10 - S: Thu, 19 Dec 85 00:08:49 -0800 - S: . - -Policy Notes - - Depending on the particular entity administrating the POP3 service - host, two additional policies might be implemented: - - 1. Private Discussion Groups - - In the general case, discussion groups are world-readable, any user, - once logged in (via a terminal, terminal server, or POP3, etc.), is - able to read the maildrop for each discussion group known to the POP3 - service host. Nevertheless, it is desirable, usually for privacy - reasons, to implement private discussion groups as well. - - Support of this is consistent with the extensions outlined in this - - - -Rose [Page 9] - -RFC 1082 POP3 Extended Service November 1988 - - - memo. Once the AUTHORIZATION state has successfully concluded, the - POP3 server grants the user access to exactly those discussion groups - the POP3 service host permits the authenticated user to access. As a - "security" feature, discussion groups associated with unreadable - maildrops should not be listed in a positive response to the XTND - BBOARDS command. - - 2. Anonymous POP3 Users - - In order to minimize the authentication problem, a policy permitting - "anonymous" access to the world-readable maildrops for discussion - groups on the POP3 server may be implemented. - - Support of this is consistent with the extensions outlined in this - memo. The POP3 server can be modified to accept a USER command for a - well-known pseudonym (i.e., "anonymous") which is valid with any PASS - command. As a "security" feature, it is advisable to limit this kind - of access to only hosts at the local site, or to hosts named in an - access list. - -Experiences and Conclusions - - All of the facilities described in this memo and in [RFC1081] have - been implemented in MH #6.1. Initial experiences have been, on the - whole, very positive. - - After the first implementation, some performance tuning was required. - This consisted primarily of caching the datastructures which describe - discussion groups in the POP3 server. A second optimization - pertained to the client: the program most commonly used to read - BBoards in MH was modified to retrieve messages only when needed. - Two schemes are used: - - o If only the headers (and the first few lines of the body) of - the message are required (e.g., for a scan listing), then only - these are retrieved. The resulting output is then cached, on - a per-message basis. - - o If the entire message is required, then it is retrieved intact, - and cached locally. - - With these optimizations, response time is quite adequate when the - POP3 server and client are connected via a high-speed local area - network. In fact, the author uses this mechanism to access certain - private discussion groups over the Internet. In this case, response - is still good. When a 9.6Kbps modem is inserted in the path, - response went from good to almost tolerable (fortunately the author - only reads a few discussion groups in this fashion). - - - -Rose [Page 10] - -RFC 1082 POP3 Extended Service November 1988 - - - To conclude: the POP3 is a good thing, not only for personal mail but - for discussion group mail as well. - - -References - - [RFC1081] Rose, M., "Post Office Protocol - Verison 3 (POP3)", RFC - 1081, TWG, November 1988. - - [MRose85] Rose, M., and J. Romine, "The Rand MH Message Handling - System: User's Manual", University of California, Irvine, - November 1985. - - [RFC822] Crocker, D., "Standard for the Format of ARPA-Internet - Text Messages", RFC 822, University of Delaware, August - 1982. - - [RFC918] Reynolds, J., "Post Office Protocol", RFC 918, - USC/Information Sciences Institute, October 1984. - - [RFC937] Butler, M., J. Postel, D. Chase, J. Goldberger, and J. - Reynolds, "Post Office Protocol - Version 2", RFC 937, - USC/Information Sciences Institute, February 1985. - -Author's Address: - - - Marshall Rose - The Wollongong Group - 1129 San Antonio Rd. - Palo Alto, California 94303 - - Phone: (415) 962-7100 - - Email: MRose@TWG.COM - - - - - - - - - - - - - - - - -Rose [Page 11] - diff --git a/kerberosV/src/appl/popper/pop_auth.c b/kerberosV/src/appl/popper/pop_auth.c deleted file mode 100644 index f902cdecc6b..00000000000 --- a/kerberosV/src/appl/popper/pop_auth.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2004 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 -#ifdef SASL -#include -#include -RCSID("$Id: pop_auth.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * auth: RFC1734 - */ - -static char * -getline(POP *p) -{ - char *buf = NULL; - size_t size = 1024; - buf = malloc(size); - if(buf == NULL) - return NULL; - *buf = '\0'; - while(fgets(buf + strlen(buf), size - strlen(buf), p->input) != NULL) { - char *p; - if((p = strchr(buf, '\n')) != NULL) { - while(p > buf && p[-1] == '\r') - p--; - *p = '\0'; - return buf; - } - /* just assume we ran out of buffer space, we'll catch eof - next round */ - size += 1024; - p = realloc(buf, size); - if(p == NULL) - break; - buf = p; - } - free(buf); - return NULL; -} - -static char auth_msg[128]; -void -pop_auth_set_error(const char *message) -{ - strlcpy(auth_msg, message, sizeof(auth_msg)); -} - -static struct auth_mech *methods[] = { -#ifdef KRB5 - &gssapi_mech, -#endif - NULL -}; - -static int -auth_execute(POP *p, struct auth_mech *m, void *state, const char *line) -{ - void *input, *output; - size_t input_length, output_length; - int status; - - if(line == NULL) { - input = NULL; - input_length = 0; - } else { - input = strdup(line); - if(input == NULL) { - pop_auth_set_error("out of memory"); - return POP_AUTH_FAILURE; - } - input_length = base64_decode(line, input); - if(input_length == (size_t)-1) { - pop_auth_set_error("base64 decode error"); - return POP_AUTH_FAILURE; - } - } - output = NULL; output_length = 0; - status = (*m->loop)(p, state, input, input_length, &output, &output_length); - if(output_length > 0) { - char *s; - base64_encode(output, output_length, &s); - fprintf(p->output, "+ %s\r\n", s); - fflush(p->output); - free(output); - free(s); - } - return status; -} - -static int -auth_loop(POP *p, struct auth_mech *m) -{ - int status; - void *state = NULL; - char *line; - - status = (*m->init)(p, &state); - - status = auth_execute(p, m, state, p->pop_parm[2]); - - while(status == POP_AUTH_CONTINUE) { - line = getline(p); - if(line == NULL) { - (*m->cleanup)(p, state); - return pop_msg(p, POP_FAILURE, "error reading data"); - } - if(strcmp(line, "*") == 0) { - (*m->cleanup)(p, state); - return pop_msg(p, POP_FAILURE, "terminated by client"); - } - status = auth_execute(p, m, state, line); - free(line); - } - - - (*m->cleanup)(p, state); - if(status == POP_AUTH_FAILURE) - return pop_msg(p, POP_FAILURE, "%s", auth_msg); - - status = login_user(p); - if(status != POP_SUCCESS) - return status; - return pop_msg(p, POP_SUCCESS, "authentication complete"); -} - -int -pop_auth (POP *p) -{ - int i; - - for (i = 0; methods[i] != NULL; ++i) - if (strcasecmp(p->pop_parm[1], methods[i]->name) == 0) - return auth_loop(p, methods[i]); - return pop_msg(p, POP_FAILURE, - "Authentication method %s unknown", p->pop_parm[1]); -} - -void -pop_capa_sasl(POP *p) -{ - int i; - - if(methods[0] == NULL) - return; - - fprintf(p->output, "SASL"); - for (i = 0; methods[i] != NULL; ++i) - fprintf(p->output, " %s", methods[i]->name); - fprintf(p->output, "\r\n"); -} -#endif diff --git a/kerberosV/src/appl/popper/pop_auth.h b/kerberosV/src/appl/popper/pop_auth.h deleted file mode 100644 index 92ef4147fc2..00000000000 --- a/kerberosV/src/appl/popper/pop_auth.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2004 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: pop_auth.h,v 1.2 2013/06/17 18:57:40 robert Exp $ */ - -#ifndef __pop_auth_h__ -#define __pop_auth_h__ - -struct auth_mech { - const char *name; - int (*init)(POP*, void**); - int (*loop)(POP*, void*, void*, size_t, void**, size_t*); - int (*cleanup)(POP*, void*); -}; - -#define POP_AUTH_CONTINUE 0 -#define POP_AUTH_FAILURE 1 -#define POP_AUTH_COMPLETE 2 - -void pop_auth_set_error(const char *message); - -#ifdef KRB5 -extern struct auth_mech gssapi_mech; -#endif -#ifdef KRB4 -extern struct auth_mech krb4_mech; -#endif - - -#endif /* __pop_auth_h__ */ diff --git a/kerberosV/src/appl/popper/pop_debug.c b/kerberosV/src/appl/popper/pop_debug.c deleted file mode 100644 index c820733395f..00000000000 --- a/kerberosV/src/appl/popper/pop_debug.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) 1995 - 2002 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. - */ - -/* Tiny program to help debug popper */ - -#include "popper.h" -RCSID("$Id: pop_debug.c,v 1.4 2013/06/17 18:57:40 robert Exp $"); - -static void -loop(int s) -{ - char cmd[1024]; - char buf[1024]; - fd_set fds; - while(1){ - FD_ZERO(&fds); - FD_SET(0, &fds); - FD_SET(s, &fds); - if(select(s+1, &fds, 0, 0, 0) < 0) - err(1, "select"); - if(FD_ISSET(0, &fds)){ - fgets(cmd, sizeof(cmd), stdin); - cmd[strlen(cmd) - 1] = '\0'; - strlcat (cmd, "\r\n", sizeof(cmd)); - write(s, cmd, strlen(cmd)); - } - if(FD_ISSET(s, &fds)){ - int n = read(s, buf, sizeof(buf)); - if(n == 0) - exit(0); - fwrite(buf, n, 1, stdout); - } - } -} - -static int -get_socket (const char *hostname, int port) -{ - int ret; - struct addrinfo *ai, *a; - struct addrinfo hints; - char portstr[NI_MAXSERV]; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - snprintf (portstr, sizeof(portstr), "%d", ntohs(port)); - ret = getaddrinfo (hostname, portstr, &hints, &ai); - if (ret) - errx (1, "getaddrinfo %s: %s", hostname, gai_strerror (ret)); - - for (a = ai; a != NULL; a = a->ai_next) { - int s; - - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - close (s); - continue; - } - freeaddrinfo (ai); - return s; - } - err (1, "failed to connect to %s", hostname); -} - -#ifdef KRB5 -static int -doit_v5 (char *host, int port) -{ - krb5_error_code ret; - krb5_context context; - krb5_auth_context auth_context = NULL; - krb5_principal server; - int s = get_socket (host, port); - - ret = krb5_init_context (&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - 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); - if (ret) { - warnx ("krb5_sendauth: %s", - krb5_get_err_text (context, ret)); - return 1; - } - loop (s); - return 0; -} -#endif - - -#ifdef KRB5 -static int use_v5 = -1; -#endif -static char *port_str; -static int do_version; -static int do_help; - -struct getargs args[] = { -#ifdef KRB5 - { "krb5", '5', arg_flag, &use_v5, "Use Kerberos V5", - NULL }, -#endif - { "port", 'p', arg_string, &port_str, "Use this port", - "number-or-service" }, - { "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, - "hostname"); - exit (ret); -} - -int -main(int argc, char **argv) -{ - int port = 0; - int ret = 1; - int optind = 0; - - setprogname(argv[0]); - - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, - &optind)) - usage (1); - - argc -= optind; - argv += optind; - - if (do_help) - usage (0); - - if (do_version) { - print_version (NULL); - return 0; - } - - if (argc < 1) - 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 (NULL, "kpop", "tcp", 1109); -#else -#error must define KRB5 -#endif - } - -#ifdef KRB5 - if (ret && use_v5) { - ret = doit_v5 (argv[0], port); - } -#endif - return ret; -} diff --git a/kerberosV/src/appl/popper/pop_dele.c b/kerberosV/src/appl/popper/pop_dele.c deleted file mode 100644 index b90627161cf..00000000000 --- a/kerberosV/src/appl/popper/pop_dele.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_dele.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * dele: Delete a message from the POP maildrop - */ -int -pop_dele (POP *p) -{ - MsgInfoList * mp; /* Pointer to message info list */ - int msg_num; - - /* Convert the message number parameter to an integer */ - msg_num = atoi(p->pop_parm[1]); - - /* Is requested message out of range? */ - if ((msg_num < 1) || (msg_num > p->msg_count)) - return (pop_msg (p,POP_FAILURE,"Message %d does not exist.",msg_num)); - - /* Get a pointer to the message in the message list */ - mp = &(p->mlp[msg_num-1]); - - /* Is the message already flagged for deletion? */ - if (mp->flags & DEL_FLAG) - return (pop_msg (p,POP_FAILURE,"Message %d has already been deleted.", - msg_num)); - - /* Flag the message for deletion */ - mp->flags |= DEL_FLAG; - -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, - "Deleting message %u at offset %ld of length %ld\n", - mp->number, mp->offset, mp->length); -#endif /* DEBUG */ - - /* Update the messages_deleted and bytes_deleted counters */ - p->msgs_deleted++; - p->bytes_deleted += mp->length; - - /* Update the last-message-accessed number if it is lower than - the deleted message */ - if (p->last_msg < msg_num) p->last_msg = msg_num; - - return (pop_msg (p,POP_SUCCESS,"Message %d has been deleted.",msg_num)); -} - -#ifdef XDELE -/* delete a range of messages */ -int -pop_xdele(POP *p) -{ - MsgInfoList * mp; /* Pointer to message info list */ - - int msg_min, msg_max; - int i; - - - msg_min = atoi(p->pop_parm[1]); - if(p->parm_count == 1) - msg_max = msg_min; - else - msg_max = atoi(p->pop_parm[2]); - - if (msg_min < 1) - return (pop_msg (p,POP_FAILURE,"Message %d does not exist.",msg_min)); - if(msg_max > p->msg_count) - return (pop_msg (p,POP_FAILURE,"Message %d does not exist.",msg_max)); - for(i = msg_min; i <= msg_max; i++) { - - /* Get a pointer to the message in the message list */ - mp = &(p->mlp[i - 1]); - - /* Is the message already flagged for deletion? */ - if (mp->flags & DEL_FLAG) - continue; /* no point in returning error */ - /* Flag the message for deletion */ - mp->flags |= DEL_FLAG; - -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, - "Deleting message %u at offset %ld of length %ld\n", - mp->number, mp->offset, mp->length); -#endif /* DEBUG */ - - /* Update the messages_deleted and bytes_deleted counters */ - p->msgs_deleted++; - p->bytes_deleted += mp->length; - } - - /* Update the last-message-accessed number if it is lower than - the deleted message */ - if (p->last_msg < msg_max) p->last_msg = msg_max; - - return (pop_msg (p,POP_SUCCESS,"Messages %d-%d has been deleted.", - msg_min, msg_max)); - -} -#endif /* XDELE */ diff --git a/kerberosV/src/appl/popper/pop_dropcopy.c b/kerberosV/src/appl/popper/pop_dropcopy.c deleted file mode 100644 index 0383319bf5d..00000000000 --- a/kerberosV/src/appl/popper/pop_dropcopy.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_dropcopy.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * Run as the user in `pwd' - */ - -int -changeuser(POP *p, struct passwd *pwd) -{ - if(setgid(pwd->pw_gid) < 0) { - pop_log (p, POP_PRIORITY, - "Unable to change to gid %u: %s", - (unsigned)pwd->pw_gid, - strerror(errno)); - return pop_msg (p, POP_FAILURE, - "Unable to change gid"); - } - if(setuid(pwd->pw_uid) < 0) { - pop_log (p, POP_PRIORITY, - "Unable to change to uid %u: %s", - (unsigned)pwd->pw_uid, - strerror(errno)); - return pop_msg (p, POP_FAILURE, - "Unable to change uid"); - } -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG,"uid = %u, gid = %u", - (unsigned)getuid(), - (unsigned)getgid()); -#endif /* DEBUG */ - return POP_SUCCESS; -} - -/* - * dropcopy: Make a temporary copy of the user's mail drop and - * save a stream pointer for it. - */ - -int -pop_dropcopy(POP *p, struct passwd *pwp) -{ - int mfd; /* File descriptor for - the user's maildrop */ - int dfd; /* File descriptor for - the SERVER maildrop */ - FILE *tf; /* The temp file */ - char template[POP_TMPSIZE]; /* Temp name holder */ - char buffer[BUFSIZ]; /* Read buffer */ - long offset; /* Old/New boundary */ - int nchar; /* Bytes written/read */ - int tf_fd; /* fd for temp file */ - int ret; - - /* Create a temporary maildrop into which to copy the updated maildrop */ - snprintf(p->temp_drop, sizeof(p->temp_drop), POP_DROP,p->user); - -#ifdef DEBUG - if(p->debug) - pop_log(p,POP_DEBUG,"Creating temporary maildrop '%s'", - p->temp_drop); -#endif /* DEBUG */ - - /* Here we work to make sure the user doesn't cause us to remove or - * write over existing files by limiting how much work we do while - * running as root. - */ - - strlcpy(template, POP_TMPDROP, sizeof(template)); - if ((tf_fd = mkstemp(template)) < 0 || - (tf = fdopen(tf_fd, "w+")) == NULL) { - pop_log(p,POP_PRIORITY, - "Unable to create temporary temporary maildrop '%s': %s",template, - strerror(errno)); - return pop_msg(p,POP_FAILURE, - "System error, can't create temporary file."); - } - - /* Now give this file to the user */ - chown(template, pwp->pw_uid, pwp->pw_gid); - chmod(template, 0600); - - /* Now link this file to the temporary maildrop. If this fails it - * is probably because the temporary maildrop already exists. If so, - * this is ok. We can just go on our way, because by the time we try - * to write into the file we will be running as the user. - */ - link(template,p->temp_drop); - fclose(tf); - unlink(template); - - ret = changeuser(p, pwp); - if (ret != POP_SUCCESS) - return ret; - - /* Open for append, this solves the crash recovery problem */ - if ((dfd = open(p->temp_drop,O_RDWR|O_APPEND|O_CREAT,0600)) == -1){ - pop_log(p,POP_PRIORITY, - "Unable to open temporary maildrop '%s': %s",p->temp_drop, - strerror(errno)); - return pop_msg(p,POP_FAILURE, - "System error, can't open temporary file, do you own it?"); - } - - /* Lock the temporary maildrop */ - if ( flock (dfd, (LOCK_EX | LOCK_NB)) == -1 ) - switch(errno) { - case EWOULDBLOCK: - return pop_msg(p,POP_FAILURE, - "%sMaildrop lock busy! Is another session active?", - (p->flags & POP_FLAG_CAPA) ? "[IN-USE] " : ""); - /* NOTREACHED */ - default: - return pop_msg(p,POP_FAILURE,"flock: '%s': %s", p->temp_drop, - strerror(errno)); - /* NOTREACHED */ - } - - /* May have grown or shrunk between open and lock! */ - offset = lseek(dfd,0, SEEK_END); - - /* Open the user's maildrop, If this fails, no harm in assuming empty */ - if ((mfd = open(p->drop_name,O_RDWR)) > 0) { - - /* Lock the maildrop */ - if (flock (mfd, LOCK_EX) == -1) { - close(mfd) ; - return pop_msg(p,POP_FAILURE, "flock: '%s': %s", p->temp_drop, - strerror(errno)); - } - - /* Copy the actual mail drop into the temporary mail drop */ - while ( (nchar=read(mfd,buffer,BUFSIZ)) > 0 ) - if ( nchar != write(dfd,buffer,nchar) ) { - nchar = -1 ; - break ; - } - - if ( nchar != 0 ) { - /* Error adding new mail. Truncate to original size, - and leave the maildrop as is. The user will not - see the new mail until the error goes away. - Should let them process the current backlog, in case - the error is a quota problem requiring deletions! */ - ftruncate(dfd,(int)offset) ; - } else { - /* Mail transferred! Zero the mail drop NOW, that we - do not have to do gymnastics to figure out what's new - and what is old later */ - ftruncate(mfd,0) ; - } - - /* Close the actual mail drop */ - close (mfd); - } - - /* Acquire a stream pointer for the temporary maildrop */ - if ( (p->drop = fdopen(dfd,"a+")) == NULL ) { - close(dfd) ; - return pop_msg(p,POP_FAILURE,"Cannot assign stream for %s", - p->temp_drop); - } - - rewind (p->drop); - - return(POP_SUCCESS); -} diff --git a/kerberosV/src/appl/popper/pop_dropinfo.c b/kerberosV/src/appl/popper/pop_dropinfo.c deleted file mode 100644 index e33b01e3ac8..00000000000 --- a/kerberosV/src/appl/popper/pop_dropinfo.c +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_dropinfo.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -#if defined(UIDL) || defined(XOVER) - -/* - * Copy the string found after after : into a malloced buffer. Stop - * copying at end of string or end of line. End of line delimiter is - * not part of the resulting copy. - */ -static -char * -find_value_after_colon(char *p) -{ - char *t, *tmp; - - for (; *p != 0 && *p != ':'; p++) /* Find : */ - ; - - if (*p == 0) - goto error; - - p++; /* Skip over : */ - - for(; *p == ' ' || *p == '\t'; p++) /* Remove white space */ - ; - - for (t = p; *t != 0 && *t != '\n' && *t != '\r'; t++) /* Find end of str */ - ; - - tmp = t = malloc(t - p + 1); - if (tmp == 0) - goto error; - - for (; *p != 0 && *p != '\n' && *p != '\r'; p++, t++) /* Copy characters */ - *t = *p; - *t = 0; /* Terminate string */ - return tmp; - -error: - return "ErrorUIDL"; -} -#endif - -void -parse_header(MsgInfoList *mp, char *buffer) -{ -#if defined(UIDL) || defined(XOVER) - if (strncasecmp("Message-Id:",buffer, 11) == 0) { - if (mp->msg_id == NULL) - mp->msg_id = find_value_after_colon(buffer); - } -#ifdef UIDL - else if (strncasecmp(buffer, "X-UIDL:", 7) == 0) { - /* Courtesy to Qualcomm, there really is no such - thing as X-UIDL */ - mp->msg_id = find_value_after_colon(buffer); - } -#endif -#endif -#ifdef XOVER - else if (strncasecmp("Subject:", buffer, 8) == 0) { - if(mp->subject == NULL){ - char *p; - mp->subject = find_value_after_colon(buffer); - for(p = mp->subject; *p; p++) - if(*p == '\t') *p = ' '; - } - } - else if (strncasecmp("From:", buffer, 5) == 0) { - if(mp->from == NULL){ - char *p; - mp->from = find_value_after_colon(buffer); - for(p = mp->from; *p; p++) - if(*p == '\t') *p = ' '; - } - } - else if (strncasecmp("Date:", buffer, 5) == 0) { - if(mp->date == NULL){ - char *p; - mp->date = find_value_after_colon(buffer); - for(p = mp->date; *p; p++) - if(*p == '\t') *p = ' '; - } - } -#endif -} - -int -add_missing_headers(POP *p, MsgInfoList *mp) -{ -#if defined(UIDL) || defined(XOVER) - if (mp->msg_id == NULL) { - if (asprintf(&mp->msg_id, "no-message-id-%d", mp->number) == -1) { - fclose (p->drop); - p->msg_count = 0; - return pop_msg (p,POP_FAILURE, - "Can't build message list for '%s': Out of memory", - p->user); - } - } -#endif -#ifdef XOVER - if (mp->subject == NULL) - mp->subject = ""; - if (mp->from == NULL) - mp->from = ""; - if (mp->date == NULL) - mp->date = ""; -#endif - return POP_SUCCESS; -} - -/* - * dropinfo: Extract information about the POP maildrop and store - * it for use by the other POP routines. - */ - -int -pop_dropinfo(POP *p) -{ - char buffer[BUFSIZ]; /* Read buffer */ - MsgInfoList * mp; /* Pointer to message - info list */ - int msg_num; /* Current message - counter */ - int nchar; /* Bytes written/read */ - int blank_line = 1; /* previous line was blank */ - int in_header = 0; /* if we are in a header block */ - - /* Initialize maildrop status variables in the POP parameter block */ - p->msg_count = 0; - p->msgs_deleted = 0; - p->last_msg = 0; - p->bytes_deleted = 0; - p->drop_size = 0; - - /* Allocate memory for message information structures */ - p->msg_count = ALLOC_MSGS; - p->mlp = (MsgInfoList *)calloc((unsigned)p->msg_count,sizeof(MsgInfoList)); - if (p->mlp == NULL){ - fclose (p->drop); - p->msg_count = 0; - return pop_msg (p,POP_FAILURE, - "Can't build message list for '%s': Out of memory", p->user); - } - - rewind (p->drop); - - /* Scan the file, loading the message information list with - information about each message */ - - for (msg_num = p->drop_size = 0, mp = p->mlp - 1; - fgets(buffer,MAXMSGLINELEN,p->drop);) { - - nchar = strlen(buffer); - - if (blank_line && strncmp(buffer,"From ",5) == 0) { - in_header = 1; - if (++msg_num > p->msg_count) { - p->mlp=(MsgInfoList *) realloc(p->mlp, - (p->msg_count+=ALLOC_MSGS)*sizeof(MsgInfoList)); - if (p->mlp == NULL){ - fclose (p->drop); - p->msg_count = 0; - return pop_msg (p,POP_FAILURE, - "Can't build message list for '%s': Out of memory", - p->user); - } - mp = p->mlp + msg_num - 2; - } - ++mp; - mp->number = msg_num; - mp->length = 0; - mp->lines = 0; - mp->offset = ftell(p->drop) - nchar; - mp->flags = 0; -#if defined(UIDL) || defined(XOVER) - mp->msg_id = 0; -#endif -#ifdef XOVER - mp->subject = 0; - mp->from = 0; - mp->date = 0; -#endif -#ifdef DEBUG - if(p->debug) - pop_log(p, POP_DEBUG, - "Msg %d at offset %ld being added to list", - mp->number, mp->offset); -#endif /* DEBUG */ - } else if(in_header) - parse_header(mp, buffer); - blank_line = (strncmp(buffer, "\n", nchar) == 0); - if(blank_line) { - int e; - in_header = 0; - e = add_missing_headers(p, mp); - if(e != POP_SUCCESS) - return e; - } - mp->length += nchar; - p->drop_size += nchar; - mp->lines++; - } - p->msg_count = msg_num; - -#ifdef DEBUG - if(p->debug && msg_num > 0) { - int i; - for (i = 0, mp = p->mlp; i < p->msg_count; i++, mp++) -#ifdef UIDL - pop_log(p,POP_DEBUG, - "Msg %d at offset %ld is %ld octets long and has %u lines and id %s.", - mp->number,mp->offset,mp->length,mp->lines, mp->msg_id); -#else - pop_log(p,POP_DEBUG, - "Msg %d at offset %d is %d octets long and has %u lines.", - mp->number,mp->offset,mp->length,mp->lines); -#endif - } -#endif /* DEBUG */ - - return(POP_SUCCESS); -} diff --git a/kerberosV/src/appl/popper/pop_get_command.c b/kerberosV/src/appl/popper/pop_get_command.c deleted file mode 100644 index 6ab35bd00a2..00000000000 --- a/kerberosV/src/appl/popper/pop_get_command.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_get_command.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * get_command: Extract the command from an input line form a POP client - */ - -int pop_capa (POP *p); -static state_table states[] = { - {auth1, "user", 1, 1, pop_user, {auth1, auth2}}, - {auth2, "pass", 1, 99, pop_pass, {auth1, trans}}, -#ifdef RPOP - {auth2, "rpop", 1, 1, pop_rpop, {auth1, trans}}, -#endif /* RPOP */ -#ifdef SASL - {auth1, "auth", 1, 2, pop_auth, {auth1, trans}}, -#endif - {auth1, "quit", 0, 0, pop_quit, {halt, halt}}, - {auth2, "quit", 0, 0, pop_quit, {halt, halt}}, -#ifdef CAPA - {auth1, "capa", 0, 0, pop_capa, {auth1, auth1}}, - {auth2, "capa", 0, 0, pop_capa, {auth2, auth2}}, - {trans, "capa", 0, 0, pop_capa, {trans, trans}}, -#endif - {trans, "stat", 0, 0, pop_stat, {trans, trans}}, - {trans, "list", 0, 1, pop_list, {trans, trans}}, - {trans, "retr", 1, 1, pop_send, {trans, trans}}, - {trans, "dele", 1, 1, pop_dele, {trans, trans}}, - {trans, "noop", 0, 0, NULL, {trans, trans}}, - {trans, "rset", 0, 0, pop_rset, {trans, trans}}, - {trans, "top", 2, 2, pop_send, {trans, trans}}, - {trans, "last", 0, 0, pop_last, {trans, trans}}, - {trans, "quit", 0, 0, pop_updt, {halt, halt}}, - {trans, "help", 0, 0, pop_help, {trans, trans}}, -#ifdef UIDL - {trans, "uidl", 0, 1, pop_uidl, {trans, trans}}, -#endif -#ifdef XOVER - {trans, "xover", 0, 0, pop_xover, {trans, trans}}, -#endif -#ifdef XDELE - {trans, "xdele", 1, 2, pop_xdele, {trans, trans}}, -#endif - {(state) 0, NULL, 0, 0, NULL, {halt, halt}}, -}; - -int -pop_capa (POP *p) -{ - /* Search for the POP command in the command/state table */ - pop_msg (p,POP_SUCCESS, "Capability list follows"); - if(p->auth_level == AUTH_NONE || p->auth_level == AUTH_OTP) - fprintf(p->output, "USER\r\n"); - fprintf(p->output, "TOP\r\n"); - fprintf(p->output, "PIPELINING\r\n"); - fprintf(p->output, "EXPIRE NEVER\r\n"); - fprintf(p->output, "RESP-CODES\r\n"); -#ifdef SASL - pop_capa_sasl(p); -#endif -#ifdef UIDL - fprintf(p->output, "UIDL\r\n"); -#endif -#ifdef XOVER - fprintf(p->output, "XOVER\r\n"); -#endif -#ifdef XDELE - fprintf(p->output, "XDELE\r\n"); -#endif - if(p->CurrentState == trans) - fprintf(p->output, "IMPLEMENTATION %s-%s\r\n", PACKAGE, VERSION); - fprintf(p->output,".\r\n"); - fflush(p->output); - - p->flags |= POP_FLAG_CAPA; - - return(POP_SUCCESS); -} - -state_table * -pop_get_command(POP *p, char *mp) -{ - state_table * s; - char buf[MAXMSGLINELEN]; - - /* Save a copy of the original client line */ -#ifdef DEBUG - if(p->debug) strlcpy (buf, mp, sizeof(buf)); -#endif /* DEBUG */ - - /* Parse the message into the parameter array */ - if ((p->parm_count = pop_parse(p,mp)) < 0) return(NULL); - - /* Do not log cleartext passwords */ -#ifdef DEBUG - if(p->debug){ - if(strcmp(p->pop_command,"pass") == 0) - pop_log(p,POP_DEBUG,"Received: \"%s xxxxxxxxx\"",p->pop_command); - else { - /* Remove trailing */ - buf[strlen(buf)-2] = '\0'; - pop_log(p,POP_DEBUG,"Received: \"%s\"",buf); - } - } -#endif /* DEBUG */ - - /* Search for the POP command in the command/state table */ - for (s = states; s->command; s++) { - - /* Is this a valid command for the current operating state? */ - if (strcmp(s->command,p->pop_command) == 0 - && s->ValidCurrentState == p->CurrentState) { - - /* Were too few parameters passed to the command? */ - if (p->parm_count < s->min_parms) { - pop_msg(p,POP_FAILURE, - "Too few arguments for the %s command.", - p->pop_command); - return NULL; - } - - /* Were too many parameters passed to the command? */ - if (p->parm_count > s->max_parms) { - pop_msg(p,POP_FAILURE, - "Too many arguments for the %s command.", - p->pop_command); - return NULL; - } - - /* Return a pointer to the entry for this command in - the command/state table */ - return (s); - } - } - /* The client command was not located in the command/state table */ - pop_msg(p,POP_FAILURE, - "Unknown command: \"%s\".",p->pop_command); - return NULL; -} - -int -pop_help (POP *p) -{ - state_table *s; - - pop_msg(p, POP_SUCCESS, "help"); - - for (s = states; s->command; s++) { - fprintf (p->output, "%s\r\n", s->command); - } - fprintf (p->output, ".\r\n"); - fflush (p->output); - return POP_SUCCESS; -} diff --git a/kerberosV/src/appl/popper/pop_init.c b/kerberosV/src/appl/popper/pop_init.c deleted file mode 100644 index 3cc5a30e957..00000000000 --- a/kerberosV/src/appl/popper/pop_init.c +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_init.c,v 1.4 2013/06/17 18:57:40 robert Exp $"); - - -#if defined(KRB5) - -static int -pop_net_read(POP *p, int fd, void *buf, size_t len) -{ -#ifdef KRB5 - return krb5_net_read(p->context, &fd, buf, len); -#else -#error must define KRB5 -#endif -} -#endif - -static char *addr_log; - -static void -pop_write_addr(POP *p, struct sockaddr *addr) -{ - char ts[32]; - char as[128]; - time_t t; - FILE *f; - if(addr_log == NULL) - return; - t = time(NULL); - strftime(ts, sizeof(ts), "%Y%m%d%H%M%S", localtime(&t)); - if(inet_ntop (addr->sa_family, socket_get_address(addr), - as, sizeof(as)) == NULL) { - pop_log(p, POP_PRIORITY, "failed to print address"); - return; - } - - f = fopen(addr_log, "a"); - if(f == NULL) { - pop_log(p, POP_PRIORITY, "failed to open address log (%s)", addr_log); - return; - } - fprintf(f, "%s %s\n", as, ts); - fclose(f); -} - -#ifdef KRB5 -static int -krb5_authenticate (POP *p, int s, u_char *buf, struct sockaddr *addr) -{ - krb5_error_code ret; - krb5_auth_context auth_context = NULL; - uint32_t len; - krb5_ticket *ticket; - char *server; - - if (memcmp (buf, "\x00\x00\x00\x13", 4) != 0) - return -1; - len = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3]); - - if (krb5_net_read(p->context, &s, buf, len) != len) - return -1; - if (len != sizeof(KRB5_SENDAUTH_VERSION) - || memcmp (buf, KRB5_SENDAUTH_VERSION, len) != 0) - return -1; - - ret = krb5_recvauth (p->context, - &auth_context, - &s, - "KPOPV1.0", - NULL, /* let rd_req figure out what server to use */ - KRB5_RECVAUTH_IGNORE_VERSION, - NULL, - &ticket); - if (ret) { - pop_log(p, POP_PRIORITY, "krb5_recvauth: %s", - krb5_get_err_text(p->context, ret)); - return -1; - } - - - ret = krb5_unparse_name(p->context, ticket->server, &server); - if(ret) { - pop_log(p, POP_PRIORITY, "krb5_unparse_name: %s", - krb5_get_err_text(p->context, ret)); - ret = -1; - goto out; - } - /* does this make sense? */ - if(strncmp(server, "pop/", 4) != 0) { - pop_log(p, POP_PRIORITY, - "Got ticket for service `%s'", server); - ret = -1; - goto out; - } else if(p->debug) - pop_log(p, POP_DEBUG, - "Accepted ticket for service `%s'", server); - free(server); - out: - krb5_auth_con_free (p->context, auth_context); - krb5_copy_principal (p->context, ticket->client, &p->principal); - krb5_free_ticket (p->context, ticket); - - return ret; -} -#endif - -static int -krb_authenticate(POP *p, struct sockaddr *addr) -{ -#if defined(KRB5) - u_char buf[BUFSIZ]; - - if (pop_net_read (p, 0, buf, 4) != 4) { - pop_msg(p, POP_FAILURE, "Reading four bytes: %s", - strerror(errno)); - exit (1); - } - if (krb5_authenticate (p, 0, buf, addr) == 0){ - pop_write_addr(p, addr); - p->version = 5; - return POP_SUCCESS; - } -#endif - exit (1); - - return(POP_SUCCESS); -} - -static int -plain_authenticate (POP *p, struct sockaddr *addr) -{ - return(POP_SUCCESS); -} - -static int kerberos_flag; -static char *auth_str; -static int debug_flag; -static int interactive_flag; -static char *port_str; -static char *trace_file; -static int timeout; -static int help_flag; -static int version_flag; - -static struct getargs args[] = { -#if defined(KRB5) - { "kerberos", 'k', arg_flag, &kerberos_flag, "use kerberos" }, -#endif - { "auth-mode", 'a', arg_string, &auth_str, "required authentication", - "plaintext" -#ifdef OTP - "|otp" -#endif -#ifdef SASL - "|sasl" -#endif - }, - { "debug", 'd', arg_flag, &debug_flag }, - { "interactive", 'i', arg_flag, &interactive_flag, "create new socket" }, - { "port", 'p', arg_string, &port_str, "port to listen to", "port" }, - { "trace-file", 't', arg_string, &trace_file, "trace all command to file", "file" }, - { "timeout", 'T', arg_integer, &timeout, "timeout", "seconds" }, - { "address-log", 0, arg_string, &addr_log, "enable address log", "file" }, - { "help", 'h', arg_flag, &help_flag }, - { "version", 'v', arg_flag, &version_flag } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -/* - * init: Start a Post Office Protocol session - */ - -static int -pop_getportbyname(POP *p, const char *service, - const char *proto, short def) -{ -#ifdef KRB5 - return krb5_getportbyname(p->context, service, proto, def); -#else - return htons(default); -#endif -} - -int -pop_init(POP *p,int argcount,char **argmessage) -{ - struct sockaddr_storage cs_ss; - struct sockaddr *cs = (struct sockaddr *)&cs_ss; - socklen_t len; - char * trace_file_name = "/tmp/popper-trace"; - int portnum = 0; - int optind = 0; - int error; - - /* Initialize the POP parameter block */ - memset (p, 0, sizeof(POP)); - - setprogname(argmessage[0]); - - /* Save my name in a global variable */ - p->myname = (char*)getprogname(); - - /* Get the name of our host */ - gethostname(p->myhost,MaxHostNameLen); - -#ifdef KRB5 - { - krb5_error_code ret; - - ret = krb5_init_context (&p->context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - krb5_openlog(p->context, p->myname, &p->logf); - krb5_set_warn_dest(p->context, p->logf); - } -#else - /* Open the log file */ - roken_openlog(p->myname,POP_LOGOPTS,POP_FACILITY); -#endif - - p->auth_level = AUTH_NONE; - - if(getarg(args, num_args, argcount, argmessage, &optind)){ - arg_printusage(args, num_args, NULL, ""); - exit(1); - } - if(help_flag){ - arg_printusage(args, num_args, NULL, ""); - exit(0); - } - if(version_flag){ - print_version(NULL); - exit(0); - } - - argcount -= optind; - argmessage += optind; - - if (argcount != 0) { - arg_printusage(args, num_args, NULL, ""); - exit(1); - } - - if(auth_str){ - if (strcasecmp (auth_str, "plaintext") == 0 || - strcasecmp (auth_str, "none") == 0) - p->auth_level = AUTH_NONE; - else if(strcasecmp(auth_str, "otp") == 0) { -#ifdef OTP - p->auth_level = AUTH_OTP; -#else - pop_log (p, POP_PRIORITY, "support for OTP not enabled"); - exit(1); -#endif - } else if(strcasecmp(auth_str, "sasl") == 0) { -#ifdef SASL - p->auth_level = AUTH_SASL; -#else - pop_log (p, POP_PRIORITY, "support for SASL not enabled"); - exit(1); -#endif - } else { - pop_log (p, POP_PRIORITY, "bad value for -a: %s", auth_str); - exit(1); - } - } - /* Debugging requested */ - p->debug = debug_flag; - - if(port_str) - portnum = htons(atoi(port_str)); - if(trace_file){ - p->debug++; - if ((p->trace = fopen(trace_file, "a+")) == NULL) { - pop_log(p, POP_PRIORITY, - "Unable to open trace file \"%s\", err = %d", - optarg,errno); - exit (1); - } - trace_file_name = trace_file; - } - -#if defined(KRB5) - p->kerberosp = kerberos_flag; -#endif - - if(timeout) - pop_timeout = timeout; - - /* Fake inetd */ - if (interactive_flag) { - if (portnum == 0) - portnum = p->kerberosp ? - pop_getportbyname(p, "kpop", "tcp", 1109) : - pop_getportbyname(p, "pop", "tcp", 110); - mini_inetd (portnum, NULL); - } - - /* Get the address and socket of the client to whom I am speaking */ - len = sizeof(cs_ss); - if (getpeername(STDIN_FILENO, cs, &len) < 0) { - pop_log(p,POP_PRIORITY, - "Unable to obtain socket and address of client, err = %d",errno); - exit (1); - } - - /* Save the dotted decimal form of the client's IP address - in the POP parameter block */ - inet_ntop (cs->sa_family, socket_get_address (cs), - p->ipaddr, sizeof(p->ipaddr)); - - /* Save the client's port */ - p->ipport = ntohs(socket_get_port (cs)); - - /* Get the canonical name of the host to whom I am speaking */ - error = getnameinfo_verified (cs, len, p->client, sizeof(p->client), - NULL, 0, 0); - if (error) { - pop_log (p, POP_PRIORITY, - "getnameinfo: %s", gai_strerror (error)); - strlcpy (p->client, p->ipaddr, sizeof(p->client)); - } - - /* Create input file stream for TCP/IP communication */ - if ((p->input = fdopen(STDIN_FILENO,"r")) == NULL){ - pop_log(p,POP_PRIORITY, - "Unable to open communication stream for input, err = %d",errno); - exit (1); - } - - /* Create output file stream for TCP/IP communication */ - if ((p->output = fdopen(STDOUT_FILENO,"w")) == NULL){ - pop_log(p,POP_PRIORITY, - "Unable to open communication stream for output, err = %d",errno); - exit (1); - } - - pop_log(p,POP_PRIORITY, - "(v%s) Servicing request from \"%s\" at %s\n", - VERSION,p->client,p->ipaddr); - -#ifdef DEBUG - if (p->trace) - pop_log(p,POP_PRIORITY, - "Tracing session and debugging information in file \"%s\"", - trace_file_name); - else if (p->debug) - pop_log(p,POP_PRIORITY,"Debugging turned on"); -#endif /* DEBUG */ - - - if(p->kerberosp) - return krb_authenticate(p, cs); - else - return plain_authenticate(p, cs); -} diff --git a/kerberosV/src/appl/popper/pop_last.c b/kerberosV/src/appl/popper/pop_last.c deleted file mode 100644 index e775bef4a98..00000000000 --- a/kerberosV/src/appl/popper/pop_last.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_last.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * last: Display the last message touched in a POP session - */ - -int -pop_last (POP *p) -{ - return (pop_msg(p,POP_SUCCESS,"%u is the last message seen.",p->last_msg)); -} diff --git a/kerberosV/src/appl/popper/pop_list.c b/kerberosV/src/appl/popper/pop_list.c deleted file mode 100644 index eba86897cfd..00000000000 --- a/kerberosV/src/appl/popper/pop_list.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_list.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * list: List the contents of a POP maildrop - */ - -int -pop_list (POP *p) -{ - MsgInfoList * mp; /* Pointer to message info list */ - int i; - int msg_num; - - /* Was a message number provided? */ - if (p->parm_count > 0) { - msg_num = atoi(p->pop_parm[1]); - - /* Is requested message out of range? */ - if ((msg_num < 1) || (msg_num > p->msg_count)) - return (pop_msg (p,POP_FAILURE, - "Message %d does not exist.",msg_num)); - - /* Get a pointer to the message in the message list */ - mp = &p->mlp[msg_num-1]; - - /* Is the message already flagged for deletion? */ - if (mp->flags & DEL_FLAG) - return (pop_msg (p,POP_FAILURE, - "Message %d has been deleted.",msg_num)); - - /* Display message information */ - return (pop_msg(p,POP_SUCCESS,"%d %ld",msg_num,mp->length)); - } - - /* Display the entire list of messages */ - pop_msg(p,POP_SUCCESS, - "%d messages (%ld octets)", - p->msg_count-p->msgs_deleted, - p->drop_size-p->bytes_deleted); - - /* Loop through the message information list. Skip deleted messages */ - for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) { - if (!(mp->flags & DEL_FLAG)) - fprintf(p->output,"%u %lu\r\n",mp->number,mp->length); - } - - /* "." signals the end of a multi-line transmission */ - fprintf(p->output,".\r\n"); - fflush(p->output); - - return(POP_SUCCESS); -} diff --git a/kerberosV/src/appl/popper/pop_log.c b/kerberosV/src/appl/popper/pop_log.c deleted file mode 100644 index a5e0711ac49..00000000000 --- a/kerberosV/src/appl/popper/pop_log.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_log.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * log: Make a log entry - */ - -int -pop_log(POP *p, int stat, char *format, ...) -{ - char msgbuf[MAXLINELEN]; - va_list ap; - - va_start(ap, format); - vsnprintf(msgbuf, sizeof(msgbuf), format, ap); - - if (p->debug && p->trace) { - fprintf(p->trace,"%s\n",msgbuf); - fflush(p->trace); - } else { -#ifdef KRB5 - krb5_log(p->context, p->logf, stat, "%s", msgbuf); -#else - syslog (stat,"%s",msgbuf); -#endif - } - va_end(ap); - - return(stat); -} diff --git a/kerberosV/src/appl/popper/pop_msg.c b/kerberosV/src/appl/popper/pop_msg.c deleted file mode 100644 index d8348e3a2bc..00000000000 --- a/kerberosV/src/appl/popper/pop_msg.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_msg.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * msg: Send a formatted line to the POP client - */ - -int -pop_msg(POP *p, int stat, const char *format, ...) -{ - char *mp; - char message[MAXLINELEN]; - va_list ap; - - va_start(ap, format); - - /* Point to the message buffer */ - mp = message; - - /* Format the POP status code at the beginning of the message */ - snprintf (mp, sizeof(message), "%s ", - (stat == POP_SUCCESS) ? POP_OK : POP_ERR); - - /* Point past the POP status indicator in the message message */ - mp += strlen(mp); - - /* Append the message (formatted, if necessary) */ - if (format) - vsnprintf (mp, sizeof(message) - strlen(message), - format, ap); - - /* Log the message if debugging is turned on */ -#ifdef DEBUG - if (p->debug && stat == POP_SUCCESS) - pop_log(p,POP_DEBUG,"%s",message); -#endif /* DEBUG */ - - /* Log the message if a failure occurred */ - if (stat != POP_SUCCESS) - pop_log(p,POP_PRIORITY,"%s",message); - - /* Append the */ - strlcat(message, "\r\n", sizeof(message)); - - /* Send the message to the client */ - fputs(message, p->output); - fflush(p->output); - - va_end(ap); - return(stat); -} diff --git a/kerberosV/src/appl/popper/pop_parse.c b/kerberosV/src/appl/popper/pop_parse.c deleted file mode 100644 index ca15cd360b7..00000000000 --- a/kerberosV/src/appl/popper/pop_parse.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_parse.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * parse: Parse a raw input line from a POP client - * into null-delimited tokens - */ - -int -pop_parse(POP *p, char *buf) -{ - char * mp; - int i; - - /* Loop through the POP command array */ - for (mp = buf, i = 0; ; i++) { - - /* Skip leading spaces and tabs in the message */ - while (isspace((unsigned char)*mp))mp++; - - /* Are we at the end of the message? */ - if (*mp == 0) break; - - /* Have we already obtained the maximum allowable parameters? */ - if (i >= MAXPARMCOUNT) { - pop_msg(p,POP_FAILURE,"Too many arguments supplied."); - return(-1); - } - - /* Point to the start of the token */ - p->pop_parm[i] = mp; - - /* Search for the first space character (end of the token) */ - while (!isspace((unsigned char)*mp) && *mp) mp++; - - /* Delimit the token with a null */ - if (*mp) *mp++ = 0; - } - - /* Were any parameters passed at all? */ - if (i == 0) return (-1); - - /* Convert the first token (POP command) to lower case */ - strlwr(p->pop_command); - - /* Return the number of tokens extracted minus the command itself */ - return (i-1); - -} diff --git a/kerberosV/src/appl/popper/pop_pass.c b/kerberosV/src/appl/popper/pop_pass.c deleted file mode 100644 index b666e8e5908..00000000000 --- a/kerberosV/src/appl/popper/pop_pass.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -#ifdef HAVE_CRYPT_H -#include -#endif - -RCSID("$Id: pop_pass.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -#ifdef KRB5 -static int -krb5_verify_password (POP *p) -{ - krb5_preauthtype pre_auth_types[] = {KRB5_PADATA_ENC_TIMESTAMP}; - krb5_get_init_creds_opt *get_options; - krb5_verify_init_creds_opt verify_options; - krb5_error_code ret; - krb5_principal client, server; - krb5_creds creds; - - ret = krb5_get_init_creds_opt_alloc (p->context, &get_options); - if (ret) { - pop_log(p, POP_PRIORITY, "krb5_get_init_creds_opt_alloc: %s", - krb5_get_err_text (p->context, ret)); - return 1; - } - - krb5_get_init_creds_opt_set_preauth_list (get_options, - pre_auth_types, - 1); - - krb5_verify_init_creds_opt_init (&verify_options); - - ret = krb5_parse_name (p->context, p->user, &client); - if (ret) { - krb5_get_init_creds_opt_free(p->context, get_options); - pop_log(p, POP_PRIORITY, "krb5_parse_name: %s", - krb5_get_err_text (p->context, ret)); - return 1; - } - - ret = krb5_get_init_creds_password (p->context, - &creds, - client, - p->pop_parm[1], - NULL, - NULL, - 0, - NULL, - get_options); - krb5_get_init_creds_opt_free(p->context, get_options); - if (ret) { - pop_log(p, POP_PRIORITY, - "krb5_get_init_creds_password: %s", - krb5_get_err_text (p->context, ret)); - return 1; - } - - ret = krb5_sname_to_principal (p->context, - p->myhost, - "pop", - KRB5_NT_SRV_HST, - &server); - if (ret) { - pop_log(p, POP_PRIORITY, - "krb5_get_init_creds_password: %s", - krb5_get_err_text (p->context, ret)); - return 1; - } - - ret = krb5_verify_init_creds (p->context, - &creds, - server, - NULL, - NULL, - &verify_options); - krb5_free_principal (p->context, client); - krb5_free_principal (p->context, server); - krb5_free_cred_contents (p->context, &creds); - return ret; -} -#endif -/* - * pass: Obtain the user password from a POP client - */ - -int -login_user(POP *p) -{ - struct stat st; - struct passwd *pw; - - /* Look for the user in the password file */ - if ((pw = k_getpwnam(p->user)) == NULL) { - pop_log(p, POP_PRIORITY, "user %s (from %s) not found", - p->user, p->ipaddr); - return pop_msg(p, POP_FAILURE, "Login incorrect."); - } - - pop_log(p, POP_INFO, "login from %s as %s", p->ipaddr, p->user); - - /* Build the name of the user's maildrop */ - snprintf(p->drop_name, sizeof(p->drop_name), "%s/%s", POP_MAILDIR, p->user); - if(stat(p->drop_name, &st) < 0 || !S_ISDIR(st.st_mode)){ - /* Make a temporary copy of the user's maildrop */ - /* and set the group and user id */ - if (pop_dropcopy(p, pw) != POP_SUCCESS) return (POP_FAILURE); - - /* Get information about the maildrop */ - if (pop_dropinfo(p) != POP_SUCCESS) return(POP_FAILURE); - } else { - if(changeuser(p, pw) != POP_SUCCESS) return POP_FAILURE; - if(pop_maildir_info(p) != POP_SUCCESS) return POP_FAILURE; - } - /* Initialize the last-message-accessed number */ - p->last_msg = 0; - return POP_SUCCESS; -} - -int -pop_pass (POP *p) -{ - struct passwd *pw; - int i; - int status; - - /* Make one string of all these parameters */ - - for (i = 1; i < p->parm_count; ++i) - p->pop_parm[i][strlen(p->pop_parm[i])] = ' '; - - /* Look for the user in the password file */ - if ((pw = k_getpwnam(p->user)) == NULL) - return (pop_msg(p,POP_FAILURE, - "Password supplied for \"%s\" is incorrect.", - p->user)); - - if (p->kerberosp) { -#ifdef KRB5 - if (p->version == 5) { - char *name; - - if (!krb5_kuserok (p->context, p->principal, p->user)) { - pop_log (p, POP_PRIORITY, - "krb5 permission denied"); - return pop_msg(p, POP_FAILURE, - "Popping not authorized"); - } - if(krb5_unparse_name (p->context, p->principal, &name) == 0) { - pop_log(p, POP_INFO, "%s: %s -> %s", - p->ipaddr, name, p->user); - free (name); - } - } else { - pop_log (p, POP_PRIORITY, "kerberos authentication failed"); - return pop_msg (p, POP_FAILURE, - "kerberos authentication failed"); - } -#endif - { } - } else { - /* We don't accept connections from users with null passwords */ - if (pw->pw_passwd == NULL) - return (pop_msg(p, - POP_FAILURE, - "Password supplied for \"%s\" is incorrect.", - p->user)); - -#ifdef OTP - if (otp_verify_user (&p->otp_ctx, p->pop_parm[1]) == 0) - /* pass OK */; - else -#endif - /* Compare the supplied password with the password file entry */ - if (p->auth_level != AUTH_NONE) - return pop_msg(p, POP_FAILURE, - "Password supplied for \"%s\" is incorrect.", - p->user); - else if (!strcmp(crypt(p->pop_parm[1], pw->pw_passwd), pw->pw_passwd)) - /* pass OK */; - else { - int ret = -1; -#ifdef KRB5 - if(ret) - ret = krb5_verify_password (p); -#endif - if(ret) - return pop_msg(p, POP_FAILURE, - "Password incorrect"); - } - } - status = login_user(p); - if(status != POP_SUCCESS) - return status; - - /* Authorization completed successfully */ - return (pop_msg (p, POP_SUCCESS, - "%s has %d message(s) (%ld octets).", - p->user, p->msg_count, p->drop_size)); -} diff --git a/kerberosV/src/appl/popper/pop_quit.c b/kerberosV/src/appl/popper/pop_quit.c deleted file mode 100644 index 5fa5d5e006e..00000000000 --- a/kerberosV/src/appl/popper/pop_quit.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_quit.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * quit: Terminate a POP session - */ - -int -pop_quit (POP *p) -{ - /* Release the message information list */ - if (p->mlp) free (p->mlp); - - return(POP_SUCCESS); -} diff --git a/kerberosV/src/appl/popper/pop_rset.c b/kerberosV/src/appl/popper/pop_rset.c deleted file mode 100644 index 3e3b927fd7f..00000000000 --- a/kerberosV/src/appl/popper/pop_rset.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_rset.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * rset: Unflag all messages flagged for deletion in a POP maildrop - */ - -int -pop_rset (POP *p) -{ - MsgInfoList * mp; /* Pointer to the message info list */ - int i; - - /* Unmark all the messages */ - for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) - mp->flags &= ~DEL_FLAG; - - /* Reset the messages-deleted and bytes-deleted counters */ - p->msgs_deleted = 0; - p->bytes_deleted = 0; - - /* Reset the last-message-access flag */ - p->last_msg = 0; - - return (pop_msg(p,POP_SUCCESS,"Maildrop has %u messages (%ld octets)", - p->msg_count, p->drop_size)); -} diff --git a/kerberosV/src/appl/popper/pop_send.c b/kerberosV/src/appl/popper/pop_send.c deleted file mode 100644 index d077afe6f74..00000000000 --- a/kerberosV/src/appl/popper/pop_send.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_send.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * sendline: Send a line of a multi-line response to a client. - */ -static int -pop_sendline(POP *p, char *buffer) -{ - char * bp; - - /* Byte stuff lines that begin with the termination octet */ - if (*buffer == POP_TERMINATE) - fputc(POP_TERMINATE,p->output); - - /* Look for a in the buffer */ - if ((bp = strchr(buffer, '\n'))) - *bp = 0; - - /* Send the line to the client */ - fputs(buffer,p->output); - -#ifdef DEBUG - if(p->debug) - pop_log(p,POP_DEBUG,"Sending line \"%s\"",buffer); -#endif /* DEBUG */ - - /* Put a if a newline was removed from the buffer */ - if (bp) - fputs ("\r\n",p->output); - return bp != NULL; -} - -/* - * send: Send the header and a specified number of lines - * from a mail message to a POP client. - */ - -int -pop_send(POP *p) -{ - MsgInfoList * mp; /* Pointer to message info list */ - int msg_num; - int msg_lines; - char buffer[MAXMSGLINELEN]; -#ifdef RETURN_PATH_HANDLING - char * return_path_adr; - char * return_path_end; - int return_path_sent; - int return_path_linlen; -#endif - int sent_nl = 0; - - /* Convert the first parameter into an integer */ - msg_num = atoi(p->pop_parm[1]); - - /* Is requested message out of range? */ - if ((msg_num < 1) || (msg_num > p->msg_count)) - return (pop_msg (p,POP_FAILURE,"Message %d does not exist.",msg_num)); - - /* Get a pointer to the message in the message list */ - mp = &p->mlp[msg_num-1]; - - /* Is the message flagged for deletion? */ - if (mp->flags & DEL_FLAG) - return (pop_msg (p,POP_FAILURE, - "Message %d has been deleted.",msg_num)); - - /* If this is a TOP command, get the number of lines to send */ - if (strcmp(p->pop_command, "top") == 0) { - /* Convert the second parameter into an integer */ - msg_lines = atoi(p->pop_parm[2]); - } - else { - /* Assume that a RETR (retrieve) command was issued */ - msg_lines = -1; - /* Flag the message as retreived */ - mp->flags |= RETR_FLAG; - } - - /* Display the number of bytes in the message */ - pop_msg(p, POP_SUCCESS, "%ld octets", mp->length); - - if(IS_MAILDIR(p)) { - int e = pop_maildir_open(p, mp); - if(e != POP_SUCCESS) - return e; - } - - /* Position to the start of the message */ - fseek(p->drop, mp->offset, 0); - - return_path_sent = 0; - - if(!IS_MAILDIR(p)) { - /* Skip the first line (the sendmail "From" line) */ - fgets (buffer,MAXMSGLINELEN,p->drop); - -#ifdef RETURN_PATH_HANDLING - if (strncmp(buffer,"From ",5) == 0) { - return_path_linlen = strlen(buffer); - for (return_path_adr = buffer+5; - (*return_path_adr == ' ' || *return_path_adr == '\t') && - return_path_adr < buffer + return_path_linlen; - return_path_adr++) - ; - if (return_path_adr < buffer + return_path_linlen) { - if ((return_path_end = strchr(return_path_adr, ' ')) != NULL) - *return_path_end = '\0'; - if (strlen(return_path_adr) != 0 && *return_path_adr != '\n') { - static char tmpbuf[MAXMSGLINELEN + 20]; - if (snprintf (tmpbuf, - sizeof(tmpbuf), - "Return-Path: %s\n", - return_path_adr) < MAXMSGLINELEN) { - pop_sendline (p,tmpbuf); - if (hangup) - return pop_msg (p, POP_FAILURE, - "SIGHUP or SIGPIPE flagged"); - return_path_sent++; - } - } - } - } -#endif - } - - /* Send the header of the message followed by a blank line */ - while (fgets(buffer,MAXMSGLINELEN,p->drop)) { -#ifdef RETURN_PATH_HANDLING - /* Don't send existing Return-Path-header if already sent own */ - if (!return_path_sent || strncasecmp(buffer, "Return-Path:", 12) != 0) -#endif - sent_nl = pop_sendline (p,buffer); - /* A single newline (blank line) signals the - end of the header. sendline() converts this to a NULL, - so that's what we look for. */ - if (*buffer == 0) break; - if (hangup) - return (pop_msg (p,POP_FAILURE,"SIGHUP or SIGPIPE flagged")); - } - /* Send the message body */ - { - int blank_line = 1; - while (fgets(buffer, MAXMSGLINELEN-1, p->drop)) { - /* Look for the start of the next message */ - if (!IS_MAILDIR(p) && blank_line && strncmp(buffer,"From ",5) == 0) - break; - blank_line = (strncmp(buffer, "\n", 1) == 0); - /* Decrement the lines sent (for a TOP command) */ - if (msg_lines >= 0 && msg_lines-- == 0) break; - sent_nl = pop_sendline(p,buffer); - if (hangup) - return (pop_msg (p,POP_FAILURE,"SIGHUP or SIGPIPE flagged")); - } - /* add missing newline at end */ - if(!sent_nl) - fputs("\r\n", p->output); - /* some pop-clients want a blank line at the end of the - message, we always add one here, but what the heck -- in - outer (white) space, no one can hear you scream */ - if(IS_MAILDIR(p)) - fputs("\r\n", p->output); - } - /* "." signals the end of a multi-line transmission */ - fputs(".\r\n",p->output); - fflush(p->output); - - return(POP_SUCCESS); -} diff --git a/kerberosV/src/appl/popper/pop_stat.c b/kerberosV/src/appl/popper/pop_stat.c deleted file mode 100644 index 002f1c747fe..00000000000 --- a/kerberosV/src/appl/popper/pop_stat.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_stat.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * stat: Display the status of a POP maildrop to its client - */ - -int -pop_stat (POP *p) -{ -#ifdef DEBUG - if (p->debug) pop_log(p,POP_DEBUG,"%d message(s) (%ld octets).", - p->msg_count-p->msgs_deleted, - p->drop_size-p->bytes_deleted); -#endif /* DEBUG */ - return (pop_msg (p,POP_SUCCESS, - "%d %ld", - p->msg_count-p->msgs_deleted, - p->drop_size-p->bytes_deleted)); -} diff --git a/kerberosV/src/appl/popper/pop_uidl.c b/kerberosV/src/appl/popper/pop_uidl.c deleted file mode 100644 index 0fbba935cfe..00000000000 --- a/kerberosV/src/appl/popper/pop_uidl.c +++ /dev/null @@ -1,88 +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. - */ - -#include -RCSID("$Id: pop_uidl.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -#ifdef UIDL -/* - * uidl: Uidl the contents of a POP maildrop - */ - -int -pop_uidl (POP *p) -{ - MsgInfoList * mp; /* Pointer to message info list */ - int i; - int msg_num; - - /* Was a message number provided? */ - if (p->parm_count > 0) { - msg_num = atoi(p->pop_parm[1]); - - /* Is requested message out of range? */ - if ((msg_num < 1) || (msg_num > p->msg_count)) - return (pop_msg (p,POP_FAILURE, - "Message %d does not exist.",msg_num)); - - /* Get a pointer to the message in the message list */ - mp = &p->mlp[msg_num-1]; - - /* Is the message already flagged for deletion? */ - if (mp->flags & DEL_FLAG) - return (pop_msg (p,POP_FAILURE, - "Message %d has been deleted.",msg_num)); - - /* Display message information */ - return (pop_msg(p,POP_SUCCESS,"%u %s",msg_num,mp->msg_id)); - } - - /* Display the entire list of messages */ - pop_msg(p,POP_SUCCESS, - "%d messages (%ld octets)", - p->msg_count-p->msgs_deleted, - p->drop_size-p->bytes_deleted); - - /* Loop through the message information list. Skip deleted messages */ - for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) { - if (!(mp->flags & DEL_FLAG)) - fprintf(p->output,"%u %s\r\n",mp->number,mp->msg_id); - } - - /* "." signals the end of a multi-line transmission */ - fprintf(p->output,".\r\n"); - fflush(p->output); - - return(POP_SUCCESS); -} -#endif /* UIDL */ diff --git a/kerberosV/src/appl/popper/pop_updt.c b/kerberosV/src/appl/popper/pop_updt.c deleted file mode 100644 index 1cb1ecde363..00000000000 --- a/kerberosV/src/appl/popper/pop_updt.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_updt.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -static const char standard_error[] = - "Error error updating primary drop. Mailbox unchanged"; - -/* - * updt: Apply changes to a user's POP maildrop - */ - -int -pop_updt (POP *p) -{ - FILE * md; /* Stream pointer for - the user's maildrop */ - int mfd; /* File descriptor for - above */ - char buffer[BUFSIZ]; /* Read buffer */ - - MsgInfoList * mp; /* Pointer to message - info list */ - int msg_num; /* Current message - counter */ - int status_written; /* Status header field - written */ - int nchar; /* Bytes read/written */ - - long offset; /* New mail offset */ - - int blank_line; - -#ifdef DEBUG - if (p->debug) { - pop_log(p,POP_DEBUG,"Performing maildrop update..."); - pop_log(p,POP_DEBUG,"Checking to see if all messages were deleted"); - } -#endif /* DEBUG */ - - if(IS_MAILDIR(p)) - return pop_maildir_update(p); - - if (p->msgs_deleted == p->msg_count) { - /* Truncate before close, to avoid race condition, DO NOT UNLINK! - Another process may have opened, and not yet tried to lock */ - ftruncate ((int)fileno(p->drop),0); - fclose(p->drop) ; - return (POP_SUCCESS); - } - -#ifdef DEBUG - if (p->debug) - pop_log(p,POP_DEBUG,"Opening mail drop \"%s\"",p->drop_name); -#endif /* DEBUG */ - - /* Open the user's real maildrop */ - if ((mfd = open(p->drop_name,O_RDWR|O_CREAT,0600)) == -1 || - (md = fdopen(mfd,"r+")) == NULL) { - return pop_msg(p,POP_FAILURE,standard_error); - } - - /* Lock the user's real mail drop */ - if ( flock(mfd, LOCK_EX) == -1 ) { - fclose(md) ; - return pop_msg(p,POP_FAILURE, "flock: '%s': %s", p->temp_drop, - strerror(errno)); - } - - /* Go to the right places */ - offset = lseek((int)fileno(p->drop),0,SEEK_END) ; - - /* Append any messages that may have arrived during the session - to the temporary maildrop */ - while ((nchar=read(mfd,buffer,BUFSIZ)) > 0) - if ( nchar != write((int)fileno(p->drop),buffer,nchar) ) { - nchar = -1; - break ; - } - if ( nchar != 0 ) { - fclose(md) ; - ftruncate((int)fileno(p->drop),(int)offset) ; - fclose(p->drop) ; - return pop_msg(p,POP_FAILURE,standard_error); - } - - rewind(md); - lseek(mfd,0,SEEK_SET); - ftruncate(mfd,0) ; - - /* Synch stdio and the kernel for the POP drop */ - rewind(p->drop); - lseek((int)fileno(p->drop),0,SEEK_SET); - - /* Transfer messages not flagged for deletion from the temporary - maildrop to the new maildrop */ -#ifdef DEBUG - if (p->debug) - pop_log(p,POP_DEBUG,"Creating new maildrop \"%s\" from \"%s\"", - p->drop_name,p->temp_drop); -#endif /* DEBUG */ - - for (msg_num = 0; msg_num < p->msg_count; ++msg_num) { - - int doing_body; - - /* Get a pointer to the message information list */ - mp = &p->mlp[msg_num]; - - if (mp->flags & DEL_FLAG) { -#ifdef DEBUG - if(p->debug) - pop_log(p,POP_DEBUG, - "Message %d flagged for deletion.",mp->number); -#endif /* DEBUG */ - continue; - } - - fseek(p->drop,mp->offset,0); - -#ifdef DEBUG - if(p->debug) - pop_log(p,POP_DEBUG,"Copying message %d.",mp->number); -#endif /* DEBUG */ - blank_line = 1; - for(status_written = doing_body = 0 ; - fgets(buffer,MAXMSGLINELEN,p->drop);) { - - if (doing_body == 0) { /* Header */ - - /* Update the message status */ - if (strncasecmp(buffer,"Status:",7) == 0) { - if (mp->flags & RETR_FLAG) - fputs("Status: RO\n",md); - else - fputs(buffer, md); - status_written++; - continue; - } - /* A blank line signals the end of the header. */ - if (*buffer == '\n') { - doing_body = 1; - if (status_written == 0) { - if (mp->flags & RETR_FLAG) - fputs("Status: RO\n\n",md); - else - fputs("Status: U\n\n",md); - } - else fputs ("\n", md); - continue; - } - /* Save another header line */ - fputs (buffer, md); - } - else { /* Body */ - if (blank_line && strncmp(buffer,"From ",5) == 0) break; - fputs (buffer, md); - blank_line = (*buffer == '\n'); - } - } - } - - /* flush and check for errors now! The new mail will writen - without stdio, since we need not separate messages */ - - fflush(md) ; - if (ferror(md)) { - ftruncate(mfd,0) ; - fclose(md) ; - fclose(p->drop) ; - return pop_msg(p,POP_FAILURE,standard_error); - } - - /* Go to start of new mail if any */ - lseek((int)fileno(p->drop),offset,SEEK_SET); - - while((nchar=read((int)fileno(p->drop),buffer,BUFSIZ)) > 0) - if ( nchar != write(mfd,buffer,nchar) ) { - nchar = -1; - break ; - } - if ( nchar != 0 ) { - ftruncate(mfd,0) ; - fclose(md) ; - fclose(p->drop) ; - return pop_msg(p,POP_FAILURE,standard_error); - } - - /* Close the maildrop and empty temporary maildrop */ - fclose(md); - ftruncate((int)fileno(p->drop),0); - fclose(p->drop); - - return(pop_quit(p)); -} diff --git a/kerberosV/src/appl/popper/pop_user.c b/kerberosV/src/appl/popper/pop_user.c deleted file mode 100644 index 6ec888b0e88..00000000000 --- a/kerberosV/src/appl/popper/pop_user.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: pop_user.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * user: Prompt for the user name at the start of a POP session - */ - -int -pop_user (POP *p) -{ - strlcpy(p->user, p->pop_parm[1], sizeof(p->user)); - - if (p->auth_level == AUTH_OTP) { -#ifdef OTP - char ss[256], *s; - - if(otp_challenge (&p->otp_ctx, p->user, ss, sizeof(ss)) == 0) - return pop_msg(p, POP_SUCCESS, "Password %s required for %s.", - ss, p->user); - s = otp_error(&p->otp_ctx); - return pop_msg(p, POP_FAILURE, "Permission denied%s%s", - s ? ":" : "", s ? s : ""); -#endif - } - if (p->auth_level == AUTH_SASL) { - return pop_msg(p, POP_FAILURE, "Permission denied"); - } - return pop_msg(p, POP_SUCCESS, "Password required for %s.", p->user); -} diff --git a/kerberosV/src/appl/popper/pop_xover.c b/kerberosV/src/appl/popper/pop_xover.c deleted file mode 100644 index 2e796951c08..00000000000 --- a/kerberosV/src/appl/popper/pop_xover.c +++ /dev/null @@ -1,37 +0,0 @@ -#include -RCSID("$Id: pop_xover.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -int -pop_xover (POP *p) -{ -#ifdef XOVER - MsgInfoList * mp; /* Pointer to message info list */ - int i; - - pop_msg(p,POP_SUCCESS, - "%d messages (%ld octets)", - p->msg_count-p->msgs_deleted, - p->drop_size-p->bytes_deleted); - - /* Loop through the message information list. Skip deleted messages */ - for (i = p->msg_count, mp = p->mlp; i > 0; i--, mp++) { - if (!(mp->flags & DEL_FLAG)) - fprintf(p->output,"%u\t%s\t%s\t%s\t%s\t%lu\t%u\r\n", - mp->number, - mp->subject, - mp->from, - mp->date, - mp->msg_id, - mp->length, - mp->lines); - } - - /* "." signals the end of a multi-line transmission */ - fprintf(p->output,".\r\n"); - fflush(p->output); - - return(POP_SUCCESS); -#else - return pop_msg(p, POP_FAILURE, "Command not implemented."); -#endif -} diff --git a/kerberosV/src/appl/popper/popper.8 b/kerberosV/src/appl/popper/popper.8 deleted file mode 100644 index 36ee2547944..00000000000 --- a/kerberosV/src/appl/popper/popper.8 +++ /dev/null @@ -1,103 +0,0 @@ -.\" Copyright (c) 2001 - 2004 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: popper.8,v 1.3 2013/06/17 18:57:40 robert Exp $ -.\" -.Dd July 14, 2004 -.Dt POPPER 8 -.Os HEIMDAL -.Sh NAME -.Nm popper -.Nd POP3 server -.Sh SYNOPSIS -.Nm -.Op Fl k -.Op Fl a Ar plaintext Ns \*(Ba Ns Ar otp Ns \*(Ba Ns Ar sasl -.Op Fl t Ar file -.Op Fl T Ar seconds -.Op Fl d -.Op Fl i -.Op Fl p Ar port -.Op Fl Fl address-log= Ns Pa file -.Sh DESCRIPTION -.Nm -serves mail via the Post Office Protocol. Supported options include: -.Bl -tag -width Ds -.It Fl a Ar plaintext Ns \*(Ba Ns Ar otp Ns \*(Ba Ns Ar sasl -Tells -.Nm -which authentication mode is acceptable, -.Ar sasl -enables SASL (RFC2222), and -.Ar otp -enables OTP (RFC1938) authentication. Both disable plaintext passwords. -.It Fl Fl address-log= Ns Pa file -Logs the addresses (along with a timestamp) of all clients to the -specified file. This can be used to implement POP-before-SMTP -authentication. -.It Fl d -Enables more verbose log messages. -.It Fl i -When not started by inetd, this flag tells -.Nm -that it has to create a socket by itself. -.It Fl k -Tells -.Nm -to use Kerberos for authentication. This is the traditional way of -doing Kerberos authentication, and is normally done on a separate port -(as it doesn't follow RFC1939), and should be used instead of using -SASL. -.It Fl p Ar port -Port to listen to, in combination with -.Fl i . -.It Fl t Ar file -Trace all commands to file. -.It Fl T Ar seconds -Set timeout to something other than the default of 120 seconds. -.El -.\".Sh ENVIRONMENT -.\".Sh FILES -.\".Sh EXAMPLES -.\".Sh DIAGNOSTICS -.Sh SEE ALSO -.Xr push 8 , -.Xr movemail 8 -.Sh STANDARDS -RFC1939 (Post Office Protocol - Version 3) -.\" RFC2449 (POP3 Extension Mechanism) -.\".Sh HISTORY -.Sh AUTHORS -The server was initially developed at the University of California, -Berkeley. -.Pp -Many changes have been made as part of the KTH Kerberos distributions. -.\".Sh BUGS diff --git a/kerberosV/src/appl/popper/popper.README.release b/kerberosV/src/appl/popper/popper.README.release deleted file mode 100644 index c0b313ecd96..00000000000 --- a/kerberosV/src/appl/popper/popper.README.release +++ /dev/null @@ -1,45 +0,0 @@ -Release Notes: - -popper-1.831beta is no longer beta 30 July 91 - Removed popper-1.7.tar.Z - -popper-1.831beta.tar.Z 03 April 91 - Changed mkstemp to mktemp for Ultrix. Sigh. - -popper-1.83beta.tar.Z 02 April 91 - - This version makes certain that while running as root we do nothing - at all destructive. - -popper-1.82beta.tar.Z 27 March 91 - - This version fixes problems on Encore MultiMax and some Sun releases - which wouldn't allow a user to ftruncate() a file from an open - file descripter unless the user owns the file. Now the user - owns the /usr/spool/mail/.userid.pop file. Thanks to Ben Levy - of FTP Software and Henry Holtzman of Apple. - -popper-1.81beta.tar.Z 20 March 91 - - This version of popper is supposed to fix three problems reported - with various versions of popper (all called 1.7 or 1.7something). - - 1) Dropped network connections meant lost mail files. Some 1.7 - versions also risked corrupting mail files. - - 2) Some versions of 1.7 created temporary drop files with world - read and write permissions. - - 3) Some versions of 1.7 were not careful about opening the temporary - drop file. - -popper-1.7.tar.Z 09 September 90 (updated 20 March 91) - - This version will exhibit the first problem listed above if it is - compiled with -DDEBUG and run without the "-d" (debug) flag. - - If it is compiled without -DDEBUG it will exhibit only the second - and third bug listed above. - -Cliff Frost poptest@nettlesome.berkeley.edu -UC Berkeley diff --git a/kerberosV/src/appl/popper/popper.c b/kerberosV/src/appl/popper/popper.c deleted file mode 100644 index 3b85d40e620..00000000000 --- a/kerberosV/src/appl/popper/popper.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#include -RCSID("$Id: popper.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -int hangup = FALSE ; - -static RETSIGTYPE -catchSIGHUP(int sig) -{ - hangup = TRUE ; - - /* This should not be a problem on BSD systems */ - signal(SIGHUP, catchSIGHUP); - signal(SIGPIPE, catchSIGHUP); - SIGRETURN(0); -} - -int pop_timeout = POP_TIMEOUT; - -jmp_buf env; - -static RETSIGTYPE -ring(int sig) -{ - longjmp(env,1); -} - -/* - * fgets, but with a timeout - */ -static char * -tgets(char *str, int size, FILE *fp, int timeout) -{ - char *ret; - - signal(SIGALRM, ring); - alarm(timeout); - if (setjmp(env)) { - alarm(0); - signal(SIGALRM, SIG_DFL); - return NULL; - } - ret = fgets(str, size, fp); - alarm(0); - signal(SIGALRM, SIG_DFL); - return ret; -} - -/* - * popper: Handle a Post Office Protocol version 3 session - */ -int -main (int argc, char **argv) -{ - POP p; - state_table * s; - char message[MAXLINELEN]; - - signal(SIGHUP, catchSIGHUP); - signal(SIGPIPE, catchSIGHUP); - - /* Start things rolling */ - pop_init(&p,argc,argv); - - /* Tell the user that we are listenting */ - pop_msg(&p,POP_SUCCESS, "POP3 server ready"); - - /* State loop. The POP server is always in a particular state in - which a specific suite of commands can be executed. The following - loop reads a line from the client, gets the command, and processes - it in the current context (if allowed) or rejects it. This continues - until the client quits or an error occurs. */ - - for (p.CurrentState=auth1;p.CurrentState!=halt&&p.CurrentState!=error;) { - if (hangup) { - pop_msg(&p, POP_FAILURE, "POP hangup: %s", p.myhost); - if (p.CurrentState > auth2 && !pop_updt(&p)) - pop_msg(&p, POP_FAILURE, - "POP mailbox update failed: %s", p.myhost); - p.CurrentState = error; - } else if (tgets(message, MAXLINELEN, p.input, pop_timeout) == NULL) { - pop_msg(&p, POP_FAILURE, "POP timeout: %s", p.myhost); - if (p.CurrentState > auth2 && !pop_updt(&p)) - pop_msg(&p,POP_FAILURE, - "POP mailbox update failed: %s", p.myhost); - p.CurrentState = error; - } - else { - /* Search for the command in the command/state table */ - if ((s = pop_get_command(&p,message)) == NULL) continue; - - /* Call the function associated with this command in - the current state */ - if (s->function) p.CurrentState = s->result[(*s->function)(&p)]; - - /* Otherwise assume NOOP and send an OK message to the client */ - else { - p.CurrentState = s->success_state; - pop_msg(&p,POP_SUCCESS,"time passes"); - } - } - } - - /* Say goodbye to the client */ - pop_msg(&p,POP_SUCCESS,"Pop server at %s signing off.",p.myhost); - - /* Log the end of activity */ - pop_log(&p,POP_PRIORITY, - "(v%s) Ending request from \"%s\" at %s\n",VERSION,p.client,p.ipaddr); - - /* Stop logging */ - closelog(); - - return(0); -} diff --git a/kerberosV/src/appl/popper/popper.cat8 b/kerberosV/src/appl/popper/popper.cat8 deleted file mode 100644 index a2d279b4a4d..00000000000 --- a/kerberosV/src/appl/popper/popper.cat8 +++ /dev/null @@ -1,56 +0,0 @@ - -POPPER(8) BSD System Manager's Manual POPPER(8) - -NNAAMMEE - ppooppppeerr -- POP3 server - -SSYYNNOOPPSSIISS - ppooppppeerr [--kk] [--aa _p_l_a_i_n_t_e_x_t|_o_t_p|_s_a_s_l] [--tt _f_i_l_e] [--TT _s_e_c_o_n_d_s] [--dd] [--ii] - [--pp _p_o_r_t] [----aaddddrreessss--lloogg==_f_i_l_e] - -DDEESSCCRRIIPPTTIIOONN - ppooppppeerr serves mail via the Post Office Protocol. Supported options - include: - - --aa _p_l_a_i_n_t_e_x_t|_o_t_p|_s_a_s_l - Tells ppooppppeerr which authentication mode is acceptable, _s_a_s_l - enables SASL (RFC2222), and _o_t_p enables OTP (RFC1938) authenti- - cation. Both disable plaintext passwords. - - ----aaddddrreessss--lloogg==_f_i_l_e - Logs the addresses (along with a timestamp) of all clients to the - specified file. This can be used to implement POP-before-SMTP - authentication. - - --dd Enables more verbose log messages. - - --ii When not started by inetd, this flag tells ppooppppeerr that it has to - create a socket by itself. - - --kk Tells ppooppppeerr to use Kerberos for authentication. This is the tra- - ditional way of doing Kerberos authentication, and is normally - done on a separate port (as it doesn't follow RFC1939), and - should be used instead of using SASL. - - --pp _p_o_r_t - Port to listen to, in combination with --ii. - - --tt _f_i_l_e - Trace all commands to file. - - --TT _s_e_c_o_n_d_s - Set timeout to something other than the default of 120 seconds. - -SSEEEE AALLSSOO - push(8), movemail(8) - -SSTTAANNDDAARRDDSS - RFC1939 (Post Office Protocol - Version 3) - -AAUUTTHHOORRSS - The server was initially developed at the University of California, - Berkeley. - - Many changes have been made as part of the KTH Kerberos distributions. - -HEIMDAL July 14, 2004 HEIMDAL diff --git a/kerberosV/src/appl/popper/popper.h b/kerberosV/src/appl/popper/popper.h deleted file mode 100644 index c39bbb7cf64..00000000000 --- a/kerberosV/src/appl/popper/popper.h +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - * static char copyright[] = "Copyright (c) 1990 Regents of the University of California.\nAll rights reserved.\n"; - * static char SccsId[] = "@(#)@(#)popper.h 2.2 2.2 4/2/91"; - * - */ - -/* $Id: popper.h,v 1.3 2013/06/17 18:57:40 robert Exp $ */ - -/* - * Header file for the POP programs - */ - -#ifdef HAVE_CONFIG_H -#include -#define UIDL -#define XOVER -#define XDELE -#define DEBUG -#define RETURN_PATH_HANDLING -#endif - -/* Common include files */ - -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_PWD_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_IO_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_SYS_FILE_H -#include -#endif -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif - -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#ifdef _AIX -struct sockaddr_dl; /* AIX fun */ -struct ether_addr; -#endif -#include -#endif -#ifdef HAVE_SYSLOG_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#include "version.h" - -#ifdef SOCKS -#include -#endif - -#include -#include -#include - -#ifdef KRB5 -#include -#endif - -#define MAXUSERNAMELEN 65 -#define MAXLINELEN 1024 -#define MAXMSGLINELEN 1024 -#define MAXCMDLEN 4 -#define MAXPARMCOUNT 10 -#define MAXPARMLEN 10 -#define ALLOC_MSGS 20 -#define MAIL_COMMAND "/usr/lib/sendmail" - -#define POP_FACILITY LOG_LOCAL0 -#define POP_PRIORITY LOG_NOTICE -#define POP_DEBUG LOG_DEBUG -#define POP_INFO LOG_INFO -#define POP_LOGOPTS 0 - -#ifdef HAVE_PATHS_H -#include -#endif -#ifdef HAVE_MAILLOCK_H -#include -#endif - -#ifdef OTP -#include -#endif - -#if defined(_PATH_MAILDIR) -#define POP_MAILDIR _PATH_MAILDIR -#elif defined(MAILDIR) -#define POP_MAILDIR MAILDIR -#else -#define POP_MAILDIR "/usr/spool/mail" -#endif - -#define POP_DROP POP_MAILDIR "/.%s.pop" - /* POP_TMPSIZE needs to be big enough to hold the string - * defined by POP_TMPDROP. POP_DROP and POP_TMPDROP - * must be in the same filesystem. - */ -#define POP_TMPDROP POP_MAILDIR "/tmpXXXXXX" -#define POP_TMPSIZE 256 -#define POP_TMPXMIT "/tmp/xmitXXXXXX" -#define POP_OK "+OK" -#define POP_ERR "-ERR" -#define POP_SUCCESS 1 -#define POP_FAILURE 0 -#define POP_TERMINATE '.' -#define POP_TIMEOUT 120 /* timeout connection after this many secs */ - -extern int pop_timeout; - -extern int hangup; - -#define AUTH_NONE 0 -#define AUTH_OTP 1 -#define AUTH_SASL 2 - -#define pop_command pop_parm[0] /* POP command is first token */ -#define pop_subcommand pop_parm[1] /* POP XTND subcommand is the - second token */ - -typedef enum { /* POP processing states */ - auth1, /* Authorization: waiting for - USER command */ - auth2, /* Authorization: waiting for - PASS command */ - trans, /* Transaction */ - update, /* Update: session ended, - process maildrop changes */ - halt, /* (Halt): stop processing - and exit */ - error /* (Error): something really - bad happened */ -} state; - - -#define DEL_FLAG 1 -#define RETR_FLAG 2 -#define NEW_FLAG 4 - -typedef struct { /* Message information */ - int number; /* Message number relative to - the beginning of list */ - long length; /* Length of message in - bytes */ - int lines; /* Number of (null-terminated) lines in the message */ - long offset; /* Offset from beginning of - file */ - unsigned flags; - -#if defined(UIDL) || defined(XOVER) - char *msg_id; /* The POP UIDL uniqueifier */ -#endif -#ifdef XOVER - char *subject; - char *from; - char *date; -#endif - char *name; -} MsgInfoList; - -#define IS_MAILDIR(P) ((P)->temp_drop[0] == '\0') - -typedef struct { /* POP parameter block */ - int debug; /* Debugging requested */ - char * myname; /* The name of this POP - daemon program */ - char myhost[MaxHostNameLen]; /* The name of our host - computer */ - char client[MaxHostNameLen]; /* Canonical name of client - computer */ - char ipaddr[MaxHostNameLen]; /* Dotted-notation format of - client IP address */ - unsigned short ipport; /* Client port for privileged - operations */ - char user[MAXUSERNAMELEN]; /* Name of the POP user */ - state CurrentState; /* The current POP operational state */ - MsgInfoList * mlp; /* Message information list */ - int msg_count; /* Number of messages in - the maildrop */ - int msgs_deleted; /* Number of messages flagged - for deletion */ - int last_msg; /* Last message touched by - the user */ - long bytes_deleted; /* Number of maildrop bytes - flagged for deletion */ - char drop_name[MAXPATHLEN]; /* The name of the user's - maildrop */ - char temp_drop[MAXPATHLEN]; /* The name of the user's - temporary maildrop */ - long drop_size; /* Size of the maildrop in - bytes */ - FILE * drop; /* (Temporary) mail drop */ - FILE * input; /* Input TCP/IP communication - stream */ - FILE * output; /* Output TCP/IP communication stream */ - FILE * trace; /* Debugging trace file */ - char * pop_parm[MAXPARMCOUNT]; /* Parse POP parameter list */ - int parm_count; /* Number of parameters in - parsed list */ - int kerberosp; /* Using KPOP? */ -#ifdef KRB5 - krb5_context context; - krb5_principal principal; /* principal auth as */ - krb5_log_facility* logf; -#endif - int version; /* 4 or 5? */ - int auth_level; /* Dont allow cleartext */ -#ifdef OTP - OtpContext otp_ctx; /* OTP context */ -#endif - unsigned int flags; -#define POP_FLAG_CAPA 1 -} POP; - -typedef struct { /* State information for - each POP command */ - state ValidCurrentState; /* The operating state of - the command */ - char * command; /* The POP command */ - int min_parms; /* Minimum number of parms - for the command */ - int max_parms; /* Maximum number of parms - for the command */ - int (*function) (); /* The function that process - the command */ - state result[2]; /* The resulting state after - command processing */ -#define success_state result[0] /* State when a command - succeeds */ -} state_table; - -typedef struct { /* Table of extensions */ - char * subcommand; /* The POP XTND subcommand */ - int min_parms; /* Minimum number of parms for - the subcommand */ - int max_parms; /* Maximum number of parms for - the subcommand */ - int (*function) (); /* The function that processes - the subcommand */ -} xtnd_table; - -int pop_dele(POP *p); -int pop_dropcopy(POP *p, struct passwd *pwp); -int pop_dropinfo(POP *p); -int pop_init(POP *p,int argcount,char **argmessage); -int pop_last(POP *p); -int pop_list(POP *p); -int pop_parse(POP *p, char *buf); -int pop_pass(POP *p); -int pop_quit(POP *p); -int pop_rset(POP *p); -int pop_send(POP *p); -int pop_stat(POP *p); -int pop_updt(POP *p); -int pop_user(POP *p); -#ifdef UIDL -int pop_uidl(POP *p); -#endif -#ifdef XOVER -int pop_xover(POP *p); -#endif -#ifdef XDELE -int pop_xdele(POP *p); -#endif -int pop_help(POP *p); -state_table *pop_get_command(POP *p, char *mp); -void pop_lower(char *buf); -#ifdef SASL -int pop_auth (POP *p); -void pop_capa_sasl(POP *p); -#endif - -int pop_log(POP *p, int stat, char *format, ...) -#ifdef __GNUC__ -__attribute__ ((format (printf, 3, 4))) -#endif -; - -int pop_msg(POP *p, int stat, const char *format, ...) -#ifdef __GNUC__ -__attribute__ ((format (printf, 3, 4))) -#endif -; - -int pop_maildir_info (POP*); -int pop_maildir_open (POP*, MsgInfoList*); -int pop_maildir_update (POP*); - -int changeuser(POP*, struct passwd*); -void parse_header(MsgInfoList*, char*); -int add_missing_headers(POP*, MsgInfoList*); -int login_user(POP *p); diff --git a/kerberosV/src/appl/popper/version.h b/kerberosV/src/appl/popper/version.h deleted file mode 100644 index b7b84d3a533..00000000000 --- a/kerberosV/src/appl/popper/version.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - * static char copyright[] = "Copyright (c) 1990 Regents of the University of California.\nAll rights reserved.\n"; - * static char SccsId[] = "@(#)@(#)version.h 2.6 2.6 4/3/91"; - * - */ - -/* $Id: version.h,v 1.3 2013/06/17 18:57:40 robert Exp $ */ - -/* - * Current version of this POP implementation - */ - -#if 0 -#define VERSION krb4_version -#endif diff --git a/kerberosV/src/appl/push/ChangeLog b/kerberosV/src/appl/push/ChangeLog deleted file mode 100644 index ac4cb1ad4df..00000000000 --- a/kerberosV/src/appl/push/ChangeLog +++ /dev/null @@ -1,200 +0,0 @@ -2005-04-19 Love Hörnquist Åstrand - - * push.c: catch when snprint needs a larger buffer - -2004-06-17 Johan Danielsson - - * push.c: alloc memory to handle very long lines - -2003-04-03 Assar Westerlund - - * push.c: fixed one incorrect fprintf to stderr - -2003-03-18 Love Hörnquist Åstrand - - * push.c: add names of pop states, add some more debugging and use - fprintf(stderr) for all dbg stmts. - -2001-09-04 Assar Westerlund - - * push.c (doit): check return values from snprintf being negative - -2000-12-31 Assar Westerlund - - * push.c (main): handle krb5_init_context failure consistently - -2000-12-26 Assar Westerlund - - * push.c: support several headers, from use - estrdup, emalloc, erealloc - -2000-11-29 Johan Danielsson - - * pfrom.1: work around bug in grog that makes it think it needs - mdoc.old - - * push.8: work around bug in grog that makes it think it needs - mdoc.old - -2000-11-27 Johan Danielsson - - * push.c: add space to usage - -2000-10-08 Assar Westerlund - - * push.c (doit): check that fds are not too large to select on - -2000-03-04 Assar Westerlund - - * add man-page for pfrom - -1999-12-28 Assar Westerlund - - * push.c (main): call k_getportbyname with port number in - network-byte-order - -1999-12-14 Assar Westerlund - - * push.c (do_connect): remove bogus local block variable - -1999-12-05 Assar Westerlund - - * push.c (do_connect): use `getaddrinfo' - * push.c: add --count (print number of messages and bytes at - beginning) - -1999-11-13 Assar Westerlund - - * push.c: make `-v' a arg_counter - -1999-11-02 Assar Westerlund - - * 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 - - * push.c (doit): remember to step over the error message when we - discover that XDELE is not supported - -1999-08-12 Johan Danielsson - - * push.c: use XDELE - -1999-08-05 Assar Westerlund - - * push.c (do_connect): v6-ify - -1999-06-15 Assar Westerlund - - * push.c: get_default_username and the resulting const propagation - -1999-05-21 Assar Westerlund - - * push.c (parse_pobox): try $USERNAME - -1999-05-11 Assar Westerlund - - * push.c (do_v5): remove unused and non-working code - -1999-05-10 Assar Westerlund - - * push.c (do_v5): call krb5_sendauth with ccache == NULL - -Wed Apr 7 23:40:00 1999 Assar Westerlund - - * Makefile.in: fix names of hesiod variables - -Wed Mar 24 04:37:04 1999 Assar Westerlund - - * 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 - - * Makefile.am: hesoid -> hesiod - -Sun Mar 21 18:02:10 1999 Johan Danielsson - - * Makefile.am: bindir -> libexecdir - -Sat Mar 20 00:12:26 1999 Assar Westerlund - - * Makefile.am: LDADD: add missing backslash - -Thu Mar 18 15:28:35 1999 Johan Danielsson - - * Makefile.am: clean pfrom - - * Makefile.am: include Makefile.am.common - -Mon Mar 15 18:26:16 1999 Johan Danielsson - - * push.c: strncasecmp headers - -Mon Feb 15 22:22:09 1999 Assar Westerlund - - * 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 - - * Makefile.in: build and install pfrom - - * pfrom.in: bindir -> libexecdir - -Sun Nov 22 15:33:52 1998 Johan Danielsson - - * push.c: eliminate some warnings - -Sun Nov 22 10:34:54 1998 Assar Westerlund - - * Makefile.in (WFLAGS): set - -Thu Nov 19 01:17:33 1998 Assar Westerlund - - * push_locl.h: add - - * Makefile.am, Makefile.in: link and include hesiod - - * push.c (get_pobox): new function. add hesiod support. - -1998-11-07 Assar Westerlund - - * push.8: updated - - * push.c: --from implementation from - -Fri Jul 10 01:14:45 1998 Assar Westerlund - - * push.c (net_{read,write}): remove - -Wed Jun 24 14:41:41 1998 Johan Danielsson - - * push.c: allow `po:user@host' mailbox syntax - -Tue Jun 2 17:35:06 1998 Johan Danielsson - - * push.c: quote '^From ' properly - -Mon May 25 05:22:47 1998 Assar Westerlund - - * Makefile.in (clean): PROGS -> PROGRAMS - -Sun Apr 26 11:42:13 1998 Assar Westerlund - - * 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/kerberosV/src/appl/push/Makefile.am b/kerberosV/src/appl/push/Makefile.am deleted file mode 100644 index 38a8632433a..00000000000 --- a/kerberosV/src/appl/push/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:38 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(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 pfrom.1 - -CLEANFILES = pfrom - -EXTRA_DIST = NTMakefile pfrom.in $(man_MANS) - -LDADD = $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(LIB_hesiod) diff --git a/kerberosV/src/appl/push/Makefile.in b/kerberosV/src/appl/push/Makefile.in deleted file mode 100644 index 0c03cb26db0..00000000000 --- a/kerberosV/src/appl/push/Makefile.in +++ /dev/null @@ -1,1038 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -libexec_PROGRAMS = push$(EXEEXT) -subdir = appl/push -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" -PROGRAMS = $(libexec_PROGRAMS) -am_push_OBJECTS = push.$(OBJEXT) -push_OBJECTS = $(am_push_OBJECTS) -push_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -push_DEPENDENCIES = $(LIB_krb5) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -SCRIPTS = $(bin_SCRIPTS) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(push_SOURCES) -DIST_SOURCES = $(push_SOURCES) -man1dir = $(mandir)/man1 -man8dir = $(mandir)/man8 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(INCLUDE_hesiod) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -bin_SCRIPTS = pfrom -push_SOURCES = push.c push_locl.h -man_MANS = push.8 pfrom.1 -CLEANFILES = pfrom -EXTRA_DIST = NTMakefile pfrom.in $(man_MANS) -LDADD = $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(LIB_hesiod) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/push/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/push/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libexecPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexecdir)" && rm -f $$files - -clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -push$(EXEEXT): $(push_OBJECTS) $(push_DEPENDENCIES) - @rm -f push$(EXEEXT) - $(LINK) $(push_OBJECTS) $(push_LDADD) $(LIBS) -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n' \ - -e 'h;s|.*|.|' \ - -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) { files[d] = files[d] " " $$1; \ - if (++n[d] == $(am__install_max)) { \ - print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ - else { print "f", d "/" $$4, $$1 } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/push.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binSCRIPTS install-libexecPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binSCRIPTS uninstall-libexecPROGRAMS \ - uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 uninstall-man8 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libexecPROGRAMS clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binSCRIPTS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-libexecPROGRAMS install-man install-man1 install-man8 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binSCRIPTS uninstall-hook uninstall-libexecPROGRAMS \ - uninstall-man uninstall-man1 uninstall-man8 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -pfrom: pfrom.in - sed -e "s!%libexecdir%!$(libexecdir)!" $(srcdir)/pfrom.in > $@ - chmod +x $@ - -# 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/kerberosV/src/appl/push/NTMakefile b/kerberosV/src/appl/push/NTMakefile deleted file mode 100644 index 52ce4b01f7c..00000000000 --- a/kerberosV/src/appl/push/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\push - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/push/pfrom.1 b/kerberosV/src/appl/push/pfrom.1 deleted file mode 100644 index 908afcda1c6..00000000000 --- a/kerberosV/src/appl/push/pfrom.1 +++ /dev/null @@ -1,55 +0,0 @@ -.\" Copyright (c) 2000 - 2002 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: pfrom.1,v 1.3 2013/06/17 19:11:38 robert Exp $ -.\" -.Dd March 4, 2000 -.Dt PFROM 1 -.Os HEIMDAL -.Sh NAME -.Nm pfrom -.Nd "fetch a list of the current mail via POP" -.Sh SYNOPSIS -.Nm -.Op Fl 4 | Fl Fl krb4 -.Op Fl 5 | Fl Fl krb5 -.Op Fl v | Fl Fl verbose -.Op Fl c | -count -.Op Fl Fl header -.Oo Fl p Ar port-spec \*(Ba Xo -.Fl Fl port= Ns Ar port-spec -.Xc -.Oc -.Sh DESCRIPTION -.Nm -is a script that does push --from. -.Sh SEE ALSO -.Xr push 8 diff --git a/kerberosV/src/appl/push/pfrom.cat1 b/kerberosV/src/appl/push/pfrom.cat1 deleted file mode 100644 index c2536ac8de7..00000000000 --- a/kerberosV/src/appl/push/pfrom.cat1 +++ /dev/null @@ -1,17 +0,0 @@ - -PFROM(1) BSD General Commands Manual PFROM(1) - -NNAAMMEE - ppffrroomm -- fetch a list of the current mail via POP - -SSYYNNOOPPSSIISS - ppffrroomm [--44 | ----kkrrbb44] [--55 | ----kkrrbb55] [--vv | ----vveerrbboossee] [--cc | ----ccoouunntt] - [----hheeaaddeerr] [--pp _p_o_r_t_-_s_p_e_c | ----ppoorrtt==_p_o_r_t_-_s_p_e_c] - -DDEESSCCRRIIPPTTIIOONN - ppffrroomm is a script that does push --from. - -SSEEEE AALLSSOO - push(8) - -HEIMDAL March 4, 2000 HEIMDAL diff --git a/kerberosV/src/appl/push/pfrom.in b/kerberosV/src/appl/push/pfrom.in deleted file mode 100644 index db5add5c27e..00000000000 --- a/kerberosV/src/appl/push/pfrom.in +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# $Id: pfrom.in,v 1.3 2013/06/17 19:11:38 robert Exp $ -libexecdir=%libexecdir% -PATH=$libexecdir:$PATH -export PATH -push --from $* diff --git a/kerberosV/src/appl/push/push.8 b/kerberosV/src/appl/push/push.8 deleted file mode 100644 index 8ce5111a051..00000000000 --- a/kerberosV/src/appl/push/push.8 +++ /dev/null @@ -1,132 +0,0 @@ -.\" $Id: push.8,v 1.3 2013/06/17 19:11:38 robert Exp $ -.\" -.Dd May 31, 1998 -.Dt PUSH 8 -.Os HEIMDAL -.Sh NAME -.Nm push -.Nd fetch mail via POP -.Sh SYNOPSIS -.Nm -.Op Fl 5 | Fl Fl krb5 -.Op Fl v | Fl Fl verbose -.Op Fl f | Fl Fl fork -.Op Fl l | -leave -.Op Fl Fl from -.Op Fl c | -count -.Op Fl Fl headers Ns = Ns Ar headers -.Oo Fl p Ar port-spec \*(Ba Xo -.Fl Fl port Ns = Ns Ar port-spec -.Xc -.Oc -.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 -.Pp -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. -.Pp -Supported options: -.Bl -tag -width Ds -.It Xo -.Fl 5 , -.Fl Fl krb5 -.Xc -use Kerberos 5 (if compiled with support for Kerberos 5) -.It Xo -.Fl f , -.Fl Fl fork -.Xc -fork before starting to delete messages -.It Xo -.Fl l , -.Fl Fl leave -.Xc -don't delete fetched mail -.It Xo -.Fl Fl from -.Xc -behave like from. -.It Xo -.Fl c , -.Fl Fl count -.Xc -first print how many messages and bytes there are. -.It Xo -.Fl Fl headers Ns = Ns Ar headers -.Xc -a list of comma-separated headers that should get printed. -.It Xo -.Fl p Ar port-spec , -.Fl Fl port Ns = Ns Ar port-spec -.Xc -use this port instead of the default -.Ql kpop -or -.Ql 1109 . -.El -.Pp -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 ~/.emacs-mail-crash-box -.Ed -.Pp -tries to fetch mail for the user -.Ar roosta -from the post office at -.Dq cornfield , -and stores the mail in -.Pa ~/.emacs-mail-crash-box -(you are using Gnus, aren't you?) -.Bd -literal -offset indent -$ push --from -5 havregryn -.Ed -.Pp -tries to fetch -.Sy From: -lines for current user at post office -.Dq havregryn -using Kerberos 5. -.\".Sh DIAGNOSTICS -.Sh SEE ALSO -.Xr from 1 , -.Xr pfrom 1 , -.Xr movemail 8 , -.Xr popper 8 -.\".Sh STANDARDS -.Sh HISTORY -.Nm -was written while waiting for -.Nm movemail -to finish getting the mail. -.\".Sh AUTHORS -.\".Sh BUGS diff --git a/kerberosV/src/appl/push/push.c b/kerberosV/src/appl/push/push.c deleted file mode 100644 index 3a22db15e64..00000000000 --- a/kerberosV/src/appl/push/push.c +++ /dev/null @@ -1,785 +0,0 @@ -/* - * Copyright (c) 1997-2004 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.6 2013/06/17 19:11:38 robert Exp $"); - -#if defined(_AIX) && defined(STAT) -/* - * AIX defines STAT to 1 in sys/dir.h - */ -# undef STAT -#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 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 }, - { "headers", 0, arg_string, &header_str, "Headers 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 addrinfo *ai, *a; - struct addrinfo hints; - int error; - int s = -1; - char portstr[NI_MAXSERV]; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - snprintf (portstr, sizeof(portstr), "%u", ntohs(port)); - - error = getaddrinfo (hostname, portstr, &hints, &ai); - if (error) - errx (1, "getaddrinfo(%s): %s", hostname, gai_strerror(error)); - - for (a = ai; a != NULL; a = a->ai_next) { - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - warn ("connect(%s)", hostname); - close (s); - continue; - } - break; - } - freeaddrinfo (ai); - if (a == NULL) { - warnx ("failed to contact %s", hostname); - 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; - -static char *pop_state_string[] = { - "INIT", "GREET", "USER", "PASS", "STAT", "RETR", "TOP", - "DELE", "XDELE", "QUIT" -}; - -#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 = emalloc(w->allociovecs * sizeof(*w->iovecs)); - 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 = erealloc (w->iovecs, - w->allociovecs * sizeof(*w->iovecs)); - } - } - 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]; - int out_len = 0; - char *in_buf; - size_t in_buf_size; - size_t in_len = 0; - char *in_ptr; - pop_state state = INIT; - unsigned count = 0, 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; - unsigned int numheaders = 1; - char **headers = NULL; - int i; - char *tmp = NULL; - - in_buf = emalloc(PUSH_BUFSIZ + 1); - in_ptr = in_buf; - in_buf_size = PUSH_BUFSIZ; - - if (do_from) { - char *tmp2; - - tmp2 = tmp = estrdup(header_str); - - out_fd = -1; - if (verbose) - fprintf (stderr, "%s@%s\n", user, host); - while (*tmp != '\0') { - tmp = strchr(tmp, ','); - if (tmp == NULL) - break; - tmp++; - numheaders++; - } - - headers = emalloc(sizeof(char *) * (numheaders + 1)); - for (i = 0; i < numheaders; i++) { - headers[i] = strtok_r(tmp2, ",", &tmp2); - } - headers[numheaders] = NULL; - } 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)); - if (from_line_length < 0 || from_line_length > sizeof(from_line)) - errx (1, "snprintf failed"); - - out_len = snprintf (out_buf, sizeof(out_buf), - "USER %s\r\nPASS hej\r\nSTAT\r\n", - user); - if (out_len < 0 || out_len > sizeof(out_buf)) - errx (1, "snprintf failed"); - if (net_write (s, out_buf, out_len) != out_len) - err (1, "write"); - if (verbose > 1) - fprintf (stderr, "%s", out_buf); - - if (!do_from) - write_state_init (&write_state, out_fd); - - while(state != QUIT) { - fd_set readset, writeset; - - FD_ZERO(&readset); - FD_ZERO(&writeset); - if (s >= FD_SETSIZE) - errx (1, "fd too large"); - FD_SET(s,&readset); - - if (verbose > 1) - fprintf (stderr, "state: %s count: %d asked_for: %d " - "retrieved: %d asked_deleted: %d\n", - pop_state_string[state], - count, asked_for, retrieved, asked_deleted); - - 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; - - if(in_len >= in_buf_size) { - char *tmp = erealloc(in_buf, in_buf_size + PUSH_BUFSIZ + 1); - in_ptr = tmp + (in_ptr - in_buf); - in_buf = tmp; - in_buf_size += PUSH_BUFSIZ; - } - - ret = read (s, in_ptr, in_buf_size - in_len); - 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; - - for (i = 0; i < numheaders; i++) { - size_t len; - - len = min(p - copy + 1, strlen(headers[i])); - if (strncasecmp(copy, headers[i], len) == 0) { - fprintf (stdout, "%.*s\n", (int)(p - copy), copy); - } - } - if (beg[0] == '.' && beg[1] == '\r' && beg[2] == '\n') { - if (numheaders > 1) - fprintf (stdout, "\n"); - state = STAT; - if (++retrieved == count) { - state = QUIT; - net_write (s, "QUIT\r\n", 6); - if (verbose > 1) - fprintf (stderr, "QUIT\r\n"); - } - } - 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) - fprintf (stderr, "QUIT\r\n"); - } 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) - fprintf (stderr, "QUIT\r\n"); - break; - } else if (state == DELE) { - if (++deleted == count) { - state = QUIT; - net_write (s, "QUIT\r\n", 6); - if (verbose > 1) - fprintf (stderr, "QUIT\r\n"); - 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) - fprintf (stderr, "QUIT\r\n"); - 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 (out_len < 0 || out_len > sizeof(out_buf)) - errx (1, "snprintf failed"); - if (net_write (s, out_buf, out_len) != out_len) - err (1, "write"); - if (verbose > 1) - fprintf (stderr, "%s", out_buf); - } - } - if (verbose) - fprintf (stderr, "Done\n"); - if (do_from) { - free (tmp); - free (headers); - } else { - 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 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 = estrdup(hpo->hesiod_po_host); - *user = estrdup(hpo->hesiod_po_name); - 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 = estrdup(hpo->po_host); - *user = estrdup(hpo->po_name); - } - 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 = estrdup (pwd->pw_name); - } - *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; - - setprogname (argv[0]); - -#ifdef KRB5 - { - krb5_error_code ret; - - ret = krb5_init_context (&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - } -#endif - - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, - &optind)) - usage (1); - - argc -= optind; - argv += optind; - - 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); -#else -#error must define 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 - return ret; -} diff --git a/kerberosV/src/appl/push/push.cat8 b/kerberosV/src/appl/push/push.cat8 deleted file mode 100644 index 1a60f8f112b..00000000000 --- a/kerberosV/src/appl/push/push.cat8 +++ /dev/null @@ -1,74 +0,0 @@ - -PUSH(8) BSD System Manager's Manual PUSH(8) - -NNAAMMEE - ppuusshh -- fetch mail via POP - -SSYYNNOOPPSSIISS - ppuusshh [--55 | ----kkrrbb55] [--vv | ----vveerrbboossee] [--ff | ----ffoorrkk] [--ll | ----lleeaavvee] [----ffrroomm] - [--cc | ----ccoouunntt] [----hheeaaddeerrss=_h_e_a_d_e_r_s] [--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 - formats: - `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: - - --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. - - ----hheeaaddeerrss=_h_e_a_d_e_r_s - a list of comma-separated headers that should get printed. - - --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 ~/.emacs-mail-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 _~_/_._e_m_a_c_s_-_m_a_i_l_-_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 - from(1), pfrom(1), movemail(8), popper(8) - -HHIISSTTOORRYY - ppuusshh was written while waiting for mmoovveemmaaiill to finish getting the mail. - -HEIMDAL May 31, 1998 HEIMDAL diff --git a/kerberosV/src/appl/push/push_locl.h b/kerberosV/src/appl/push/push_locl.h deleted file mode 100644 index 707897ae466..00000000000 --- a/kerberosV/src/appl/push/push_locl.h +++ /dev/null @@ -1,94 +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.3 2013/06/17 19:11:38 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_ERRNO_H -#include -#endif -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_UIO_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif -#ifdef HAVE_NETINET_TCP_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_PWD_H -#include -#endif -#ifdef HESIOD -#include -#endif - -#include -#include -#include -#ifdef KRB5 -#include -#endif diff --git a/kerberosV/src/appl/rcp/ChangeLog b/kerberosV/src/appl/rcp/ChangeLog deleted file mode 100644 index 25a0a5176c8..00000000000 --- a/kerberosV/src/appl/rcp/ChangeLog +++ /dev/null @@ -1,130 +0,0 @@ -2008-04-17 Love Hörnquist Åstrand - - * Sync with NetBSD rcp, add v6 parsing support and no setuid code - at all. - -2007-12-13 Love Hörnquist Åstrand - - * Makefile.am: Add missing files, from Buchan Milne. - -2006-10-20 Love Hörnquist Åstrand - - * Makefile.am: more files - -2006-08-08 Love Hörnquist Åstrand - - * util.c: Check return values from setuid, prompted by MIT - advisory. Thanks to Tom Yu at MIT, and Michael Calmer and Marcus - Meissner at SUSE. Either of CVE-2006-3083 or CVE-2006-3084. - - * rcp.c: Check return values from setuid, prompted by MIT - advisory. Thanks to Tom Yu at MIT, and Michael Calmer and Marcus - Meissner at SUSE. Either of CVE-2006-3083 or CVE-2006-3084. - - * rcp.c: Check return values from seteuid, prompted by MIT - advisory. Thanks to Tom Yu at MIT, and Michael Calmer and Marcus - Meissner at SUSE. Either of CVE-2006-3083 or CVE-2006-3084. - -2005-10-22 Love Hörnquist Åstrand - - * rcp.c: Check return value from asprintf instead of string != - NULL since it undefined behavior on Linux. From Björn Sandell - -2005-08-30 Love Hörnquist Åstrand - - * util.c: Explicit typecast to avoid signess warning. - -2005-05-29 Love Hörnquist Åstrand - - * rcp_locl.h: undef _PATH_RSH to make sure our version is used - -2005-05-11 David Love - - * rcp.c: MODEMASK is defined in sys/vnode.h on Solaris, so undef - it before we define our own. - -2005-04-27 Love Hörnquist Åstrand - - * rcp_locl.h: use BINDIR instead of "/usr/bin/ with _PATH_RSH - -2005-04-18 Love Hörnquist Åstrand - - * util.c: use unsigned char * to make sure its not negative when - passing it to is* functions - -2004-05-14 Johan Danielsson - - * rcp.c: add -e (passed to rsh) - -2003-04-16 Johan Danielsson - - * rcp.1: add a HISTORY section - - * rcp.1: brief manpage - - * rcp.c: add a -4 option - -2001-09-24 Johan Danielsson - - * rcp.c: more va_* fixing; from Thomas Klausner - -2001-09-08 Assar Westerlund - - * rcp.c (run_err): always match va_start and va_end - -2001-09-04 Assar Westerlund - - * util.c (allocbuf): do not leak memory on failure and zero - re-used memory, from Markus Friedl - -2001-07-19 Assar Westerlund - - * rcp.c (main): add missing setprogname - -2001-06-14 Assar Westerlund - - * rcp.c: add some const replace a few malloc/snprintf with - asprintf - * rcp.c (sizestr): remove and use snprintf to do this correctly - instead - -2001-04-21 Johan Danielsson - - * rcp.c: convert to use getarg - - * rcp.c: do a better job of supporting files larger than 2GB - -2001-02-07 Assar Westerlund - - * rcp.c: add -F for forwarding ticket, from Ake Sandgren - - -2001-01-29 Assar Westerlund - - * util.c (roundup): add fallback definition - - * rcp.c: remove non-STDC code - * rcp_locl.h: add sys/types.h and sys/wait.h - - * rcp.c: no calls to err with NULL - -2001-01-28 Assar Westerlund - - * rcp_locl.h: add - - * Makefile.am (LDADD): remove unused libraries - -2001-01-27 Assar Westerlund - - * util.c: replace vfork by fork - - * rcp.c: add RCSID S_ISTXT -> S_ISVTX printf sizes of files with - %lu instead of %q (which is not portable) - - * util.c: add RCSID do not use sig_t - * rcp.c: remove __P, use st_mtime et al from struct stat - * extern.h: remove __P - - * initial import of port of bsd rcp changed to use existing rsh, - contributed by Richard Nyberg - diff --git a/kerberosV/src/appl/rcp/Makefile.am b/kerberosV/src/appl/rcp/Makefile.am deleted file mode 100644 index b224f8408eb..00000000000 --- a/kerberosV/src/appl/rcp/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:38 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(INCLUDE_krb4) - -bin_PROGRAMS = rcp - -rcp_SOURCES = rcp.c util.c rcp_locl.h extern.h - -man_MANS = rcp.1 - -EXTRA_DIST = NTMakefile $(man_MANS) - -LDADD = $(LIB_roken) diff --git a/kerberosV/src/appl/rcp/Makefile.in b/kerberosV/src/appl/rcp/Makefile.in deleted file mode 100644 index 86479c69d39..00000000000 --- a/kerberosV/src/appl/rcp/Makefile.in +++ /dev/null @@ -1,948 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -bin_PROGRAMS = rcp$(EXEEXT) -subdir = appl/rcp -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -PROGRAMS = $(bin_PROGRAMS) -am_rcp_OBJECTS = rcp.$(OBJEXT) util.$(OBJEXT) -rcp_OBJECTS = $(am_rcp_OBJECTS) -rcp_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -rcp_DEPENDENCIES = $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(rcp_SOURCES) -DIST_SOURCES = $(rcp_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(INCLUDE_krb4) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -rcp_SOURCES = rcp.c util.c rcp_locl.h extern.h -man_MANS = rcp.1 -EXTRA_DIST = NTMakefile $(man_MANS) -LDADD = $(LIB_roken) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/rcp/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/rcp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -rcp$(EXEEXT): $(rcp_OBJECTS) $(rcp_DEPENDENCIES) - @rm -f rcp$(EXEEXT) - $(LINK) $(rcp_OBJECTS) $(rcp_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-hook \ - uninstall-man uninstall-man1 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/rcp/NTMakefile b/kerberosV/src/appl/rcp/NTMakefile deleted file mode 100644 index 48a05b82e7a..00000000000 --- a/kerberosV/src/appl/rcp/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\rcp - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/rcp/extern.h b/kerberosV/src/appl/rcp/extern.h deleted file mode 100644 index c957fa721e0..00000000000 --- a/kerberosV/src/appl/rcp/extern.h +++ /dev/null @@ -1,52 +0,0 @@ -/*- - * 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. - * - * @(#)extern.h 8.1 (Berkeley) 5/31/93 - * $FreeBSD: src/bin/rcp/extern.h,v 1.5 1999/08/27 23:14:57 peter Exp $ - */ - -typedef struct { - int cnt; - char *buf; -} BUF; - -extern int iamremote; - -BUF *allocbuf (BUF *, int, int); -char *colon (char *); -char *unbracket(char *); -void lostconn (int); -void nospace (void); -int okname (char *); -void run_err (const char *, ...); -int susystem (char *); -void verifydir (char *); diff --git a/kerberosV/src/appl/rcp/rcp.1 b/kerberosV/src/appl/rcp/rcp.1 deleted file mode 100644 index 14503b50c84..00000000000 --- a/kerberosV/src/appl/rcp/rcp.1 +++ /dev/null @@ -1,66 +0,0 @@ -.\" $Id: rcp.1,v 1.3 2013/06/17 19:11:38 robert Exp $ -.\" -.Dd April 16, 2003 -.Dt RCP 1 -.Os HEIMDAL -.Sh NAME -.Nm rcp -.Nd copy file to and from remote machines -.Sh SYNOPSIS -.Nm rcp -.Op Fl 45FKpxz -.Op Fl P Ar port -.Ar file1 file2 -.Nm rcp -.Op Fl 45FKprxz -.Op Fl P Ar port -.Ar file... directory -.Sh DESCRIPTION -.Nm rcp -copies files between machines. Each file argument is either a remote file name of the form -.Dq rname@rhost:path -or a local file (containing no colon or with a slash before the first -colon). -.Pp -Supported options: -.Bl -tag -width Ds -.It Xo -.Fl 4 , -.Fl 5 , -.Fl K , -.Fl F , -.Fl x , -.Fl z -.Xc -These options are passed on to -.Xr rsh 1 . -.It Fl P Ar port -This will pass the option -.Fl p Ar port -to -.Xr rsh 1 . -.It Fl p -Preserve file permissions. -.It Fl r -Copy source directories recursively. -.El -.\".Sh ENVIRONMENT -.\".Sh FILES -.\".Sh EXAMPLES -.Sh DIAGNOSTICS -.Nm rcp -is implemented as a protocol on top of -.Xr rsh 1 , -and thus requires a working rsh. If you intend to use Kerberos -authentication, rsh needs to be Kerberos aware, else you may see more -or less strange errors, such as "login incorrect", or "lost -connection". -.\".Sh SEE ALSO -.\".Sh STANDARDS -.Sh HISTORY -The -.Nm rcp -utility first appeared in 4.2BSD. This version is derived from -4.3BSD-Reno. -.\".Sh AUTHORS -.\".Sh BUGS diff --git a/kerberosV/src/appl/rcp/rcp.c b/kerberosV/src/appl/rcp/rcp.c deleted file mode 100644 index 9297af6d7b3..00000000000 --- a/kerberosV/src/appl/rcp/rcp.c +++ /dev/null @@ -1,789 +0,0 @@ -/* - * Copyright (c) 1983, 1990, 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. 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. - */ - -#include "rcp_locl.h" -#include - -#define RSH_PROGRAM "rsh" - -struct passwd *pwd; -uid_t userid; -int errs, remin, remout; -int pflag, iamremote, iamrecursive, targetshouldbedirectory; -int doencrypt, noencrypt; -int usebroken, usekrb4, usekrb5, forwardtkt; -char *port; -int eflag = 0; - -#define CMDNEEDS 64 -char cmd[CMDNEEDS]; /* must hold "rcp -r -p -d\0" */ - -int response (void); -void rsource (char *, struct stat *); -void sink (int, char *[]); -void source (int, char *[]); -void tolocal (int, char *[]); -void toremote (char *, int, char *[]); - -int do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout); - -static int fflag, tflag; - -static int version_flag, help_flag; - -struct getargs args[] = { - { NULL, '4', arg_flag, &usekrb4, "use Kerberos 4 authentication" }, - { NULL, '5', arg_flag, &usekrb5, "use Kerberos 5 authentication" }, - { NULL, 'F', arg_flag, &forwardtkt, "forward credentials" }, - { NULL, 'K', arg_flag, &usebroken, "use BSD authentication" }, - { NULL, 'P', arg_string, &port, "non-default port", "port" }, - { NULL, 'p', arg_flag, &pflag, "preserve file permissions" }, - { NULL, 'r', arg_flag, &iamrecursive, "recursive mode" }, - { NULL, 'x', arg_flag, &doencrypt, "use encryption" }, - { NULL, 'z', arg_flag, &noencrypt, "don't encrypt" }, - { NULL, 'd', arg_flag, &targetshouldbedirectory }, - { NULL, 'e', arg_flag, &eflag, "passed to rsh" }, - { NULL, 'f', arg_flag, &fflag }, - { NULL, 't', arg_flag, &tflag }, - { "version", 0, arg_flag, &version_flag }, - { "help", 0, arg_flag, &help_flag } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args) / sizeof(args[0]), - NULL, - "file1 file2|file... directory"); - exit (ret); -} - -int -main(int argc, char **argv) -{ - char *targ; - int optind = 0; - - setprogname(argv[0]); - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, - &optind)) - usage (1); - if(help_flag) - usage(0); - if (version_flag) { - print_version (NULL); - return 0; - } - - iamremote = (fflag || tflag); - - argc -= optind; - argv += optind; - - if ((pwd = getpwuid(userid = getuid())) == NULL) - errx(1, "unknown user %d", (int)userid); - - remin = STDIN_FILENO; /* XXX */ - remout = STDOUT_FILENO; - - if (fflag) { /* Follow "protocol", send data. */ - (void)response(); - source(argc, argv); - exit(errs); - } - - if (tflag) { /* Receive data. */ - sink(argc, argv); - exit(errs); - } - - if (argc < 2) - usage(1); - if (argc > 2) - targetshouldbedirectory = 1; - - remin = remout = -1; - /* Command to be executed on remote system using "rsh". */ - snprintf(cmd, sizeof(cmd), - "rcp%s%s%s", iamrecursive ? " -r" : "", - pflag ? " -p" : "", targetshouldbedirectory ? " -d" : ""); - - signal(SIGPIPE, lostconn); - - if ((targ = colon(argv[argc - 1]))) /* Dest is remote host. */ - toremote(targ, argc, argv); - else { - tolocal(argc, argv); /* Dest is local host. */ - if (targetshouldbedirectory) - verifydir(argv[argc - 1]); - } - exit(errs); -} - -void -toremote(char *targ, int argc, char **argv) -{ - int i; - char *bp, *host, *src, *suser, *thost, *tuser; - - *targ++ = 0; - if (*targ == 0) - targ = "."; - - if ((thost = strchr(argv[argc - 1], '@')) != NULL) { - /* user@host */ - *thost++ = 0; - tuser = argv[argc - 1]; - if (*tuser == '\0') - tuser = NULL; - else if (!okname(tuser)) - exit(1); - } else { - thost = argv[argc - 1]; - tuser = NULL; - } - thost = unbracket(thost); - - for (i = 0; i < argc - 1; i++) { - src = colon(argv[i]); - if (src) { /* remote to remote */ - int ret; - *src++ = 0; - if (*src == 0) - src = "."; - host = strchr(argv[i], '@'); - if (host) { - *host++ = '\0'; - host = unbracket(host); - suser = argv[i]; - if (*suser == '\0') - suser = pwd->pw_name; - else if (!okname(suser)) - continue; - ret = asprintf(&bp, - "%s%s %s -l %s -n %s %s '%s%s%s:%s'", - _PATH_RSH, eflag ? " -e" : "", - host, suser, cmd, src, - tuser ? tuser : "", tuser ? "@" : "", - thost, targ); - } else { - host = unbracket(argv[i]); - ret = asprintf(&bp, - "exec %s%s %s -n %s %s '%s%s%s:%s'", - _PATH_RSH, eflag ? " -e" : "", - host, cmd, src, - tuser ? tuser : "", tuser ? "@" : "", - thost, targ); - } - if (ret == -1) - err (1, "malloc"); - susystem(bp); - free(bp); - } else { /* local to remote */ - if (remin == -1) { - if (asprintf(&bp, "%s -t %s", cmd, targ) == -1) - err (1, "malloc"); - host = thost; - - if (do_cmd(host, tuser, bp, &remin, &remout) < 0) - exit(1); - - if (response() < 0) - exit(1); - free(bp); - } - source(1, argv+i); - } - } -} - -void -tolocal(int argc, char **argv) -{ - int i; - char *bp, *host, *src, *suser; - - for (i = 0; i < argc - 1; i++) { - int ret; - - if (!(src = colon(argv[i]))) { /* Local to local. */ - ret = asprintf(&bp, "exec %s%s%s %s %s", _PATH_CP, - iamrecursive ? " -PR" : "", pflag ? " -p" : "", - argv[i], argv[argc - 1]); - if (ret == -1) - err (1, "malloc"); - if (susystem(bp)) - ++errs; - free(bp); - continue; - } - *src++ = 0; - if (*src == 0) - src = "."; - if ((host = strchr(argv[i], '@')) == NULL) { - host = argv[i]; - suser = pwd->pw_name; - } else { - *host++ = 0; - suser = argv[i]; - if (*suser == '\0') - suser = pwd->pw_name; - else if (!okname(suser)) - continue; - } - ret = asprintf(&bp, "%s -f %s", cmd, src); - if (ret == -1) - err (1, "malloc"); - if (do_cmd(host, suser, bp, &remin, &remout) < 0) { - free(bp); - ++errs; - continue; - } - free(bp); - sink(1, argv + argc - 1); - close(remin); - remin = remout = -1; - } -} - -void -source(int argc, char **argv) -{ - struct stat stb; - static BUF buffer; - BUF *bp; - off_t i; - off_t amt; - int fd, haderr, indx, result; - char *last, *name, buf[BUFSIZ]; - - for (indx = 0; indx < argc; ++indx) { - name = argv[indx]; - if ((fd = open(name, O_RDONLY, 0)) < 0) - goto syserr; - if (fstat(fd, &stb)) { -syserr: run_err("%s: %s", name, strerror(errno)); - goto next; - } - if (S_ISDIR(stb.st_mode) && iamrecursive) { - rsource(name, &stb); - goto next; - } else if (!S_ISREG(stb.st_mode)) { - run_err("%s: not a regular file", name); - goto next; - } - if ((last = strrchr(name, '/')) == NULL) - last = name; - else - ++last; - if (pflag) { - /* - * Make it compatible with possible future - * versions expecting microseconds. - */ - snprintf(buf, sizeof(buf), "T%ld 0 %ld 0\n", - (long)stb.st_mtime, - (long)stb.st_atime); - write(remout, buf, strlen(buf)); - if (response() < 0) - goto next; - } -#undef MODEMASK -#define MODEMASK (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) - snprintf(buf, sizeof(buf), "C%04o %lu %s\n", - (unsigned int)(stb.st_mode & MODEMASK), - (unsigned long)stb.st_size, - last); - write(remout, buf, strlen(buf)); - if (response() < 0) - goto next; - if ((bp = allocbuf(&buffer, fd, BUFSIZ)) == NULL) { -next: close(fd); - continue; - } - - /* Keep writing after an error so that we stay sync'd up. */ - for (haderr = i = 0; i < stb.st_size; i += bp->cnt) { - amt = bp->cnt; - if (i + amt > stb.st_size) - amt = stb.st_size - i; - if (!haderr) { - result = read(fd, bp->buf, (size_t)amt); - if (result != amt) - haderr = result >= 0 ? EIO : errno; - } - if (haderr) - write(remout, bp->buf, amt); - else { - result = write(remout, bp->buf, (size_t)amt); - if (result != amt) - haderr = result >= 0 ? EIO : errno; - } - } - if (close(fd) && !haderr) - haderr = errno; - if (!haderr) - write(remout, "", 1); - else - run_err("%s: %s", name, strerror(haderr)); - response(); - } -} - -void -rsource(char *name, struct stat *statp) -{ - DIR *dirp; - struct dirent *dp; - char *last, *vect[1], path[MAXPATHLEN]; - - if (!(dirp = opendir(name))) { - run_err("%s: %s", name, strerror(errno)); - return; - } - last = strrchr(name, '/'); - if (last == 0) - last = name; - else - last++; - if (pflag) { - snprintf(path, sizeof(path), "T%ld 0 %ld 0\n", - (long)statp->st_mtime, - (long)statp->st_atime); - write(remout, path, strlen(path)); - if (response() < 0) { - closedir(dirp); - return; - } - } - snprintf(path, sizeof(path), - "D%04o %d %s\n", - (unsigned int)(statp->st_mode & MODEMASK), 0, last); - write(remout, path, strlen(path)); - if (response() < 0) { - closedir(dirp); - return; - } - while ((dp = readdir(dirp)) != NULL) { - if (dp->d_ino == 0) - continue; - if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) - continue; - if (strlen(name) + 1 + strlen(dp->d_name) >= MAXPATHLEN - 1) { - run_err("%s/%s: name too long", name, dp->d_name); - continue; - } - snprintf(path, sizeof(path), "%s/%s", name, dp->d_name); - vect[0] = path; - source(1, vect); - } - closedir(dirp); - write(remout, "E\n", 2); - response(); -} - -void -sink(int argc, char **argv) -{ - static BUF buffer; - struct stat stb; - struct timeval tv[2]; - enum { YES, NO, DISPLAYED } wrerr; - BUF *bp; - off_t i, j, size; - int amt, count, exists, first, mask, mode, ofd, omode; - int setimes, targisdir, wrerrno = 0; - char ch, *cp, *np, *targ, *why, *vect[1], buf[BUFSIZ]; - -#define atime tv[0] -#define mtime tv[1] -#define SCREWUP(str) { why = str; goto screwup; } - - setimes = targisdir = 0; - mask = umask(0); - if (!pflag) - umask(mask); - if (argc != 1) { - run_err("ambiguous target"); - exit(1); - } - targ = *argv; - if (targetshouldbedirectory) - verifydir(targ); - write(remout, "", 1); - if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode)) - targisdir = 1; - for (first = 1;; first = 0) { - cp = buf; - if (read(remin, cp, 1) <= 0) - return; - if (*cp++ == '\n') - SCREWUP("unexpected "); - do { - if (read(remin, &ch, sizeof(ch)) != sizeof(ch)) - SCREWUP("lost connection"); - *cp++ = ch; - } while (cp < &buf[BUFSIZ - 1] && ch != '\n'); - *cp = 0; - - if (buf[0] == '\01' || buf[0] == '\02') { - if (iamremote == 0) - write(STDERR_FILENO, - buf + 1, strlen(buf + 1)); - if (buf[0] == '\02') - exit(1); - ++errs; - continue; - } - if (buf[0] == 'E') { - write(remout, "", 1); - return; - } - - if (ch == '\n') - *--cp = 0; - - cp = buf; - if (*cp == 'T') { - setimes++; - cp++; - mtime.tv_sec = strtol(cp, &cp, 10); - if (!cp || *cp++ != ' ') - SCREWUP("mtime.sec not delimited"); - mtime.tv_usec = strtol(cp, &cp, 10); - if (!cp || *cp++ != ' ') - SCREWUP("mtime.usec not delimited"); - atime.tv_sec = strtol(cp, &cp, 10); - if (!cp || *cp++ != ' ') - SCREWUP("atime.sec not delimited"); - atime.tv_usec = strtol(cp, &cp, 10); - if (!cp || *cp++ != '\0') - SCREWUP("atime.usec not delimited"); - write(remout, "", 1); - continue; - } - if (*cp != 'C' && *cp != 'D') { - /* - * Check for the case "rcp remote:foo\* local:bar". - * In this case, the line "No match." can be returned - * by the shell before the rcp command on the remote is - * executed so the ^Aerror_message convention isn't - * followed. - */ - if (first) { - run_err("%s", cp); - exit(1); - } - SCREWUP("expected control record"); - } - mode = 0; - for (++cp; cp < buf + 5; cp++) { - if (*cp < '0' || *cp > '7') - SCREWUP("bad mode"); - mode = (mode << 3) | (*cp - '0'); - } - if (*cp++ != ' ') - SCREWUP("mode not delimited"); - - for (size = 0; isdigit((unsigned char)*cp);) - size = size * 10 + (*cp++ - '0'); - if (*cp++ != ' ') - SCREWUP("size not delimited"); - if (targisdir) { - static char *namebuf; - static int cursize; - size_t need; - - need = strlen(targ) + strlen(cp) + 250; - if (need > cursize) { - if (!(namebuf = malloc(need))) - run_err("%s", strerror(errno)); - } - snprintf(namebuf, need, "%s%s%s", targ, - *targ ? "/" : "", cp); - np = namebuf; - } else - np = targ; - exists = stat(np, &stb) == 0; - if (buf[0] == 'D') { - int mod_flag = pflag; - if (exists) { - if (!S_ISDIR(stb.st_mode)) { - errno = ENOTDIR; - goto bad; - } - if (pflag) - chmod(np, mode); - } else { - /* Handle copying from a read-only directory */ - mod_flag = 1; - if (mkdir(np, mode | S_IRWXU) < 0) - goto bad; - } - vect[0] = np; - sink(1, vect); - if (setimes) { - setimes = 0; - if (utimes(np, tv) < 0) - run_err("%s: set times: %s", - np, strerror(errno)); - } - if (mod_flag) - chmod(np, mode); - continue; - } - omode = mode; - mode |= S_IWRITE; - if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { -bad: run_err("%s: %s", np, strerror(errno)); - continue; - } - write(remout, "", 1); - if ((bp = allocbuf(&buffer, ofd, BUFSIZ)) == NULL) { - close(ofd); - continue; - } - cp = bp->buf; - wrerr = NO; - for (count = i = 0; i < size; i += BUFSIZ) { - amt = BUFSIZ; - if (i + amt > size) - amt = size - i; - count += amt; - if((j = net_read(remin, cp, amt)) != amt) { - run_err("%s", j ? strerror(errno) : - "dropped connection"); - exit(1); - } - amt -= j; - cp += j; - if (count == bp->cnt) { - /* Keep reading so we stay sync'd up. */ - if (wrerr == NO) { - j = write(ofd, bp->buf, (size_t)count); - if (j != count) { - wrerr = YES; - wrerrno = j >= 0 ? EIO : errno; - } - } - count = 0; - cp = bp->buf; - } - } - if (count != 0 && wrerr == NO && - (j = write(ofd, bp->buf, (size_t)count)) != count) { - wrerr = YES; - wrerrno = j >= 0 ? EIO : errno; - } - if (ftruncate(ofd, size)) { - run_err("%s: truncate: %s", np, strerror(errno)); - wrerr = DISPLAYED; - } - if (pflag) { - if (exists || omode != mode) - if (fchmod(ofd, omode)) - run_err("%s: set mode: %s", - np, strerror(errno)); - } else { - if (!exists && omode != mode) - if (fchmod(ofd, omode & ~mask)) - run_err("%s: set mode: %s", - np, strerror(errno)); - } - close(ofd); - response(); - if (setimes && wrerr == NO) { - setimes = 0; - if (utimes(np, tv) < 0) { - run_err("%s: set times: %s", - np, strerror(errno)); - wrerr = DISPLAYED; - } - } - switch(wrerr) { - case YES: - run_err("%s: %s", np, strerror(wrerrno)); - break; - case NO: - write(remout, "", 1); - break; - case DISPLAYED: - break; - } - } -screwup: - run_err("protocol error: %s", why); - exit(1); -} - -int -response(void) -{ - char ch, *cp, resp, rbuf[BUFSIZ]; - - if (read(remin, &resp, sizeof(resp)) != sizeof(resp)) - lostconn(0); - - cp = rbuf; - switch(resp) { - case 0: /* ok */ - return (0); - default: - *cp++ = resp; - /* FALLTHROUGH */ - case 1: /* error, followed by error msg */ - case 2: /* fatal error, "" */ - do { - if (read(remin, &ch, sizeof(ch)) != sizeof(ch)) - lostconn(0); - *cp++ = ch; - } while (cp < &rbuf[BUFSIZ] && ch != '\n'); - - if (!iamremote) - write(STDERR_FILENO, rbuf, cp - rbuf); - ++errs; - if (resp == 1) - return (-1); - exit(1); - } - /* NOTREACHED */ -} - -#include - -void -run_err(const char *fmt, ...) -{ - static FILE *fp; - va_list ap; - - ++errs; - if (fp == NULL && !(fp = fdopen(remout, "w"))) - return; - va_start(ap, fmt); - fprintf(fp, "%c", 0x01); - fprintf(fp, "rcp: "); - vfprintf(fp, fmt, ap); - fprintf(fp, "\n"); - fflush(fp); - va_end(ap); - - if (!iamremote) { - va_start(ap, fmt); - vwarnx(fmt, ap); - va_end(ap); - } -} - -/* - * This function executes the given command as the specified user on the - * given host. This returns < 0 if execution fails, and >= 0 otherwise. This - * assigns the input and output file descriptors on success. - * - * If it cannot create necessary pipes it exits with error message. - */ - -int -do_cmd(char *host, char *remuser, char *cmd, int *fdin, int *fdout) -{ - int pin[2], pout[2], reserved[2]; - - /* - * Reserve two descriptors so that the real pipes won't get - * descriptors 0 and 1 because that will screw up dup2 below. - */ - pipe(reserved); - - /* Create a socket pair for communicating with rsh. */ - if (pipe(pin) < 0) { - perror("pipe"); - exit(255); - } - if (pipe(pout) < 0) { - perror("pipe"); - exit(255); - } - - /* Free the reserved descriptors. */ - close(reserved[0]); - close(reserved[1]); - - /* For a child to execute the command on the remote host using rsh. */ - if (fork() == 0) { - char *args[100]; - unsigned int i; - - /* Child. */ - close(pin[1]); - close(pout[0]); - dup2(pin[0], 0); - dup2(pout[1], 1); - close(pin[0]); - close(pout[1]); - - i = 0; - args[i++] = RSH_PROGRAM; - if (usekrb4) - args[i++] = "-4"; - if (usekrb5) - args[i++] = "-5"; - if (usebroken) - args[i++] = "-K"; - if (doencrypt) - args[i++] = "-x"; - if (forwardtkt) - args[i++] = "-F"; - if (noencrypt) - args[i++] = "-z"; - if (port != NULL) { - args[i++] = "-p"; - args[i++] = port; - } - if (eflag) - args[i++] = "-e"; - if (remuser != NULL) { - args[i++] = "-l"; - args[i++] = remuser; - } - args[i++] = host; - args[i++] = cmd; - args[i++] = NULL; - - execvp(RSH_PROGRAM, args); - perror(RSH_PROGRAM); - exit(1); - } - /* Parent. Close the other side, and return the local side. */ - close(pin[0]); - *fdout = pin[1]; - close(pout[1]); - *fdin = pout[0]; - return 0; -} diff --git a/kerberosV/src/appl/rcp/rcp.cat1 b/kerberosV/src/appl/rcp/rcp.cat1 deleted file mode 100644 index 26c49606717..00000000000 --- a/kerberosV/src/appl/rcp/rcp.cat1 +++ /dev/null @@ -1,38 +0,0 @@ - -RCP(1) BSD General Commands Manual RCP(1) - -NNAAMMEE - rrccpp -- copy file to and from remote machines - -SSYYNNOOPPSSIISS - rrccpp [--4455FFKKppxxzz] [--PP _p_o_r_t] _f_i_l_e_1 _f_i_l_e_2 - rrccpp [--4455FFKKpprrxxzz] [--PP _p_o_r_t] _f_i_l_e_._._. _d_i_r_e_c_t_o_r_y - -DDEESSCCRRIIPPTTIIOONN - rrccpp copies files between machines. Each file argument is either a remote - file name of the form ``rname@rhost:path'' or a local file (containing no - colon or with a slash before the first colon). - - Supported options: - - --44, --55, --KK, --FF, --xx, --zz - These options are passed on to rsh(1). - - --PP _p_o_r_t - This will pass the option --pp _p_o_r_t to rsh(1). - - --pp Preserve file permissions. - - --rr Copy source directories recursively. - -DDIIAAGGNNOOSSTTIICCSS - rrccpp is implemented as a protocol on top of rsh(1), and thus requires a - working rsh. If you intend to use Kerberos authentication, rsh needs to - be Kerberos aware, else you may see more or less strange errors, such as - "login incorrect", or "lost connection". - -HHIISSTTOORRYY - The rrccpp utility first appeared in 4.2BSD. This version is derived from - 4.3BSD-Reno. - -HEIMDAL April 16, 2003 HEIMDAL diff --git a/kerberosV/src/appl/rcp/rcp_locl.h b/kerberosV/src/appl/rcp/rcp_locl.h deleted file mode 100644 index 096c594e5e5..00000000000 --- a/kerberosV/src/appl/rcp/rcp_locl.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2001 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: rcp_locl.h,v 1.3 2013/06/17 19:11:38 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "extern.h" - -#ifndef _PATH_CP -#define _PATH_CP "/bin/cp" -#endif -#undef _PATH_RSH -#define _PATH_RSH BINDIR "/rsh" diff --git a/kerberosV/src/appl/rcp/util.c b/kerberosV/src/appl/rcp/util.c deleted file mode 100644 index 85e3ec59a62..00000000000 --- a/kerberosV/src/appl/rcp/util.c +++ /dev/null @@ -1,184 +0,0 @@ -/*- - * 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. - */ - -#if 0 -#ifndef lint -#if 0 -static char sccsid[] = "@(#)util.c 8.2 (Berkeley) 4/2/94"; -#endif -static const char rcsid[] = - "$FreeBSD: src/bin/rcp/util.c,v 1.9 1999/08/27 23:14:58 peter Exp $"; -#endif /* not lint */ -#endif - -#include "rcp_locl.h" - -RCSID("$Id: util.c,v 1.4 2013/06/17 19:11:38 robert Exp $"); - -char * -colon(cp) - char *cp; -{ - if (*cp == ':') /* Leading colon is part of file name. */ - return (0); - - for (; *cp; ++cp) { - if (*cp == ':') - return (cp); - if (*cp == '/') - return (0); - } - return (0); -} - -char * -unbracket(char *cp) -{ - char *ep; - - if (*cp == '[') { - ep = cp + (strlen(cp) - 1); - if (*ep == ']') { - *ep = '\0'; - ++cp; - } - } - return (cp); -} - -void -verifydir(cp) - char *cp; -{ - struct stat stb; - - if (!stat(cp, &stb)) { - if (S_ISDIR(stb.st_mode)) - return; - errno = ENOTDIR; - } - run_err("%s: %s", cp, strerror(errno)); - exit(1); -} - -int -okname(cp0) - char *cp0; -{ - int c; - unsigned char *cp; - - cp = (unsigned char *)cp0; - do { - c = *cp; - if (c & 0200) - goto bad; - if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-') - goto bad; - } while (*++cp); - return (1); - -bad: warnx("%s: invalid user name", cp0); - return (0); -} - -int -susystem(s) - char *s; -{ - void (*istat)(int), (*qstat)(int); - int status; - pid_t pid; - - pid = fork(); - switch (pid) { - case -1: - return (127); - - case 0: - execl(_PATH_BSHELL, "sh", "-c", s, NULL); - _exit(127); - } - istat = signal(SIGINT, SIG_IGN); - qstat = signal(SIGQUIT, SIG_IGN); - if (waitpid(pid, &status, 0) < 0) - status = -1; - (void)signal(SIGINT, istat); - (void)signal(SIGQUIT, qstat); - return (status); -} - -#ifndef roundup -#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) -#endif - -BUF * -allocbuf(bp, fd, blksize) - BUF *bp; - int fd, blksize; -{ - struct stat stb; - size_t size; - char *p; - - if (fstat(fd, &stb) < 0) { - run_err("fstat: %s", strerror(errno)); - return (0); - } - size = roundup(stb.st_blksize, blksize); - if (size == 0) - size = blksize; - if (bp->cnt >= size) - return (bp); - if ((p = realloc(bp->buf, size)) == NULL) { - if (bp->buf) - free(bp->buf); - bp->buf = NULL; - bp->cnt = 0; - run_err("%s", strerror(errno)); - return (0); - } - memset(p, 0, size); - bp->buf = p; - bp->cnt = size; - return (bp); -} - -void -lostconn(signo) - int signo; -{ - if (!iamremote) - warnx("lost connection"); - exit(1); -} diff --git a/kerberosV/src/appl/rsh/ChangeLog b/kerberosV/src/appl/rsh/ChangeLog deleted file mode 100644 index 18202873f5a..00000000000 --- a/kerberosV/src/appl/rsh/ChangeLog +++ /dev/null @@ -1,549 +0,0 @@ -2007-07-12 Love Hörnquist Åstrand - - * rsh.c: Fix pointer vs strict alias rules. - - * rshd.c: Fix pointer vs strict alias rules. - -2007-01-04 Love Hörnquist Åstrand - - * rshd.c: Declare iruserok if needed, based on bug report from - David Love. - -2006-11-14 Love Hörnquist Åstrand - - * rsh_locl.h: Forward decl. - -2006-10-14 Love Hörnquist Åstrand - - * rsh_locl.h: Include "crypto-headers.h". - -2006-10-07 Love Hörnquist Åstrand - - * Makefile.am: Add man_MANS to EXTRA_DIST - -2006-04-27 Love Hörnquist Åstrand - - * Makefile.am: rshd_SOURCES += add limits_conf.c - - * rsh_locl.h: Include "loginpaths.h" - - * rshd.c: Read limits from limits.confon non-root login, patch - from Daniel Ahlin - -2006-02-27 Johan Danielsson - - * rshd.8: grammar (from Thomas Klausner) - -2006-01-31 Johan Danielsson - - * rshd.c (krb5_start_session): syslog failures to store cred cache - -2005-12-21 Love Hörnquist Åstrand - - * rshd.c (doit): move creation of users ticket file to later to - avoid seteuid/setuid dance. this breaks DCE, so remove support for - it completely. - -2005-10-22 Love Hörnquist Åstrand - - * rshd.c: Check return value from asprintf instead of string != - NULL since it undefined behavior on Linux. From Björn Sandell - - * rsh.c: Check return value from asprintf instead of string != - NULL since it undefined behavior on Linux. From Björn Sandell - -2005-06-08 Love Hörnquist Åstrand - - * rshd.c: init some important variables and check that they are - set checking authentication, all to please gcc - -2005-05-27 Love Hörnquist Åstrand - - * rshd.c: case uid_t to unsigned long in printf format - -2005-04-27 Love Hörnquist Åstrand - - * rsh_locl.h: Use larger buffer for recving data to be compatible - with older versions of heimdal (0.4 branch specificly) - - * rshd.c: Use larger buffer for recving data to be compatible with - older versions of heimdal (0.4 branch specificly) - -2005-04-25 Love Hörnquist Åstrand - - * rshd.c: use snprintf to format tkfile - -2005-04-24 Love Hörnquist Åstrand - - * rsh.c: use strlcat - - * rsh.c: use strlcpy - - * rsh_locl.h: forward declaration for private structures - -2005-04-20 Love Hörnquist Åstrand - - * rsh.c: cast size_t to unsigned long - -2004-09-21 Johan Danielsson - - * rshd.c: rename loop to rshd_loop - - * rshd.c: pass errsock status to init_ivecs - - * rsh.c: rename loop() to rsh_loop() - - * rsh.c (loop): pass errsock status to init_ivecs - - * common.c (init_ivecs): if we don't have an errsock the ivecs - should point to the same data - - * rshd.c: if we don't have an errsock, dup stdout to stderr (this - would normally be done by inetd, but not by mini_inetd). - - * rshd.c: move keepalive setting to after setting up sockets - -2004-02-20 Johan Danielsson - - * rsh.1: reorder and document some options - - * rsh_locl.h: include kafs.h if krb4 || krb5 - - * rsh.c: reorder some options - -2003-09-04 Johan Danielsson - - * rsh.1: document -d - -2003-08-19 Johan Danielsson - - * rshd.c: -P also with KRB5 - -2003-04-22 Love Hörnquist Åstrand - - * rsh.1: replace > with \*[Gt] - -2003-04-16 Johan Danielsson - - * rsh.c: use krb5_appdefault to get defaults for forward and - encrypt - - * rshd.c: use ARG_MAX + 1 - - * rshd.c (read_str): return allocated string - - * rsh_locl.h: set NCARGS to 8k if undefined - -2003-03-23 Assar Westerlund - - * rsh.c (loop): only check errsock if it's valid - -2003-03-18 Love Love Hörnquist Åstrand - - * rshd.c: do krb5_afslog when compling with afs support - - * rsh_locl.h: always include kafs.h - -2002-11-22 Johan Danielsson - - * rshd.8: clarify -x and kerberos 5 - -2002-11-01 Johan Danielsson - - * rsh_locl.h: bump COMMAND_SZ to NCARGS+1 - -2002-09-04 Johan Danielsson - - * rsh.c: free some memory - -2002-09-04 Assar Westerlund - - * common.c: krb5_crypto_block_size -> krb5_crypto_getblocksize - -2002-09-04 Johan Danielsson - - * rsh.1: document -P - -2002-09-03 Johan Danielsson - - * rsh.c: revert to protocol v1 if not asked for specific protocol - - * rshd.c: handle protocol version 2 - - * rsh.c: handle protocol version 2 - - * common.c: handle protocol version 2 - - * rsh_locl.h: handle protocol version 2 - -2002-02-18 Johan Danielsson - - * rshd.c: don't show options that doesn't apply - - * rsh.c: don't show options that doesn't apply - - * rsh_locl.h: if we're not building with any kerberos support, - just call read/write directly - - * common.c: if we're not building with any kerberos support, just - call read/write directly - - * rshd.c: make this build without krb5; also use the addrinfo - interface to mini_inetd, and set the keepalive option if requested - - * rsh.c: make this build without krb5 - - * rsh_locl.h: make this build without krb5 - - * common.c: make this build without krb5 - -2001-11-30 Johan Danielsson - - * rshd.c: make the syslog messages somewhat more informative - -2001-08-15 Johan Danielsson - - * rsh.c: only complain about encryption flag when old - authentication is requested - -2001-08-07 Johan Danielsson - - * rsh.c: don't try broken auth if rresvport failed; try to give - some more informative error messages - -2001-07-31 Johan Danielsson - - * rshd.8: add an EXAMPLE - * rshd.8: manual page - * rshd.c: add some compat flags - * rsh.1: manual page - * rsh.c: iff -d, set the SO_DEBUG flags of the stdout and stderr - socket; implement parsing user@host - -2001-07-19 Assar Westerlund - - * rshd.c (fatal): use vsnprintf correctly - -2001-02-07 Assar Westerlund - - * Makefile.am: add login_access - * rshd.c (login_access): add prototype - (syslog_and_die, fatal): add printf attributes - (*): AIX -> _AIX - (doit): use login_access - based on patches from Ake Sandgren - -2001-01-09 Assar Westerlund - - * rshd.c (save_krb5_creds): use krb5_rd_cred2 instead of - krb5_rd_cred - -2000-12-31 Assar Westerlund - - * rshd.c (main): handle krb5_init_context failure consistently - * rsh.c (main): handle krb5_init_context failure consistently - -2000-12-05 Johan Danielsson - - * rshd.c: require encryption if passed -x - -2000-11-15 Assar Westerlund - - * rshd.c (loop): check that the fd's aren't too large to select on - * rsh.c (loop, proto): check that the fd's aren't too large to - select on - -2000-08-10 Assar Westerlund - - * rsh.c: move code to do config/command parsing correctly. - -2000-08-09 Assar Westerlund - - * rsh.c (main): only fetch stuff from krb5.conf when no option has - been given - -2000-08-01 Assar Westerlund - - * rsh.c (doit): loop until we create an error socket of an - supported socket family - -2000-07-02 Assar Westerlund - - * rshd.c: DCE stuff from Ake Sandgren - do not call syslog with a variable as format string - - * rsh_locl.h (_PATH_ETC_ENVIRONMENT): add - -2000-06-09 Assar Westerlund - - * rsh.c (main): work-around for setuid and capabilities bug fixed - in Linux 2.2.16 - -2000-06-06 Johan Danielsson - - * rsh.c: nuke long option from -z - - * rsh.c: don't try to encrypt if auth is broken (Daniel Kouril) - -2000-06-03 Assar Westerlund - - * rshd.c (doit): check return value of getspnam. From - - -2000-05-23 Assar Westerlund - - * rsh.c (proto): select on the normal socket when waiting for the - daemon to connect back to the stderr port, so that we discover - when data arrives there before. when that happens, we assume that - the daemon did not manage to connect (because of NAT/whatever) and - continue as if `-e' was given - * rshd.c (doit): if we fail to connect back to the stderr port, - act as if `-e' was given on the client side, i.e. without the - special TCP-connection. This tries to make things better when - running the head against a NAT wall, for example. - -2000-02-07 Assar Westerlund - - * Makefile.am (LDADD): make sure we use the heimdal libdes - -2000-02-06 Assar Westerlund - - * *: conditionalize des stuff on KRB4 - -1999-12-16 Assar Westerlund - - * rsh.c (doit): addrinfo returned from getaddrinfo() is not usable - directly as hints. copy it and set AI_PASSIVE. - -1999-11-20 Assar Westerlund - - * rsh.c (main): remember to close the priviledged sockets before - calling rlogin - -1999-11-02 Assar Westerlund - - * rsh.c (main): redo the v4/v5 selection for consistency. -4 -> - try only v4 -5 -> try only v5 none, -45 -> try v5, v4 - -1999-10-26 Assar Westerlund - - * rshd.c (main): ignore SIGPIPE - - * common.c (do_read): the encoded length can be longer than the - buffer being used, allocate memory for it dynamically. From Brian - A May - -1999-10-14 Assar Westerlund - - * rsh.c (proto): be more careful and don't print errno when read() - returns 0 - -1999-09-20 Assar Westerlund - - * rshd.c (recv_krb4_auth): set `iv' - -1999-08-16 Assar Westerlund - - * common.c (do_read): be careful with the return value from - krb5_net_read - -1999-08-05 Assar Westerlund - - * rsh.c: call freehostent - - * rsh.c: remove some dead code - -1999-08-04 Assar Westerlund - - * rshd.c: re-write the handling of forwarded credentials and - stuff. From Miroslav Ruda - - * rsh_locl.h: always include kafs.h - - * rsh.c: add `-z' and `-G' options - - * rsh.c (loop): shutdown one side of the TCP connection on EOF. - From Brian A May - - * common.c (do_read): handle EOF. From Brian A May - - -1999-08-01 Assar Westerlund - - * rsh.c: const fixes - -1999-07-29 Assar Westerlund - - * rshd.c: v6-ify - - * rsh.c: v6-ify - -1999-07-28 Assar Westerlund - - * rsh_locl.h: move around kafs.h - -1999-07-24 Assar Westerlund - - * rsh_locl.h: - - * rsh.c, rshd.c: improve forwarding and implement unique ccache on - server. From Miroslav Ruda - -1999-07-03 Assar Westerlund - - * rsh.c (construct_command): handle argc == 0 for generality - -1999-06-23 Assar Westerlund - - * rsh.c: new option `-e' for not trying to open an stderr socket - -1999-06-17 Assar Westerlund - - * rsh_locl.h (RSH_BUFSIZ): bump to 16 * 1024 to be sure that we - don't leave any data inside des_enc_read. (that constant should - really be exported in some way...) - -1999-06-15 Assar Westerlund - - * rsh.c: use get_default_username and resulting const pollution - -1999-05-21 Assar Westerlund - - * rsh.c (main): try $USERNAME - -1999-05-14 Assar Westerlund - - * rshd.c (doit): afslog correctly - -1999-05-11 Assar Westerlund - - * rsh.c (main): add fallback to rlogin - -1999-05-10 Assar Westerlund - - * rsh.c (send_krb5_auth): call krb5_sendauth with ccache == NULL. - check return value from krb5_crypto_init - - * common.c (do_write, do_read): always return -1 for failure - (net_write, net_read): remove. they already exist in libroken - -1999-05-09 Assar Westerlund - - * rsh.c: make sure it tries with all other authentication methods - after one has failed - * rsh.c (main): detect the case of no command given. - -1999-04-11 Assar Westerlund - - * rsh.c: new option --forwardable. use print_version - -Sat Apr 10 17:10:55 1999 Assar Westerlund - - * rshd.c (setup_copier): use `socketpair' instead of `pipe'. Some - shells don't think it's a rsh session if they find a pipe at the - other end. - (setup_environment): add SSH_CLIENT just to make bash happy - - * common.c (do_read): use krb5_get_wrapped_length - -Wed Mar 24 03:59:42 1999 Assar Westerlund - - * rsh.c (loop): more braces to make gcc happy - -Tue Mar 23 17:08:32 1999 Johan Danielsson - - * rsh_locl.h: kafs.h - - * rshd.c: add `-P', `-v', and `-L' flags - -Thu Mar 18 11:37:24 1999 Johan Danielsson - - * Makefile.am: include Makefile.am.common - -Tue Dec 1 14:44:44 1998 Johan Danielsson - - * appl/rsh/rshd.c: update to new crypto framework - - * appl/rsh/rsh_locl.h: update to new crypto framework - - * appl/rsh/rsh.c: update to new crypto framework - - * appl/rsh/common.c: update to new crypto framework - -Mon Nov 2 01:15:06 1998 Assar Westerlund - - * appl/rsh/rsh.c (main): initialize host - - * appl/rsh/rshd.c (recv_krb5_auth): disable `do_encrypt' if not - encrypting. - -Thu Jul 30 23:12:17 1998 Assar Westerlund - - * appl/rsh/rsh.c: kludges for parsing `rsh hostname -l user' - -Thu Jul 23 19:49:03 1998 Johan Danielsson - - * appl/rsh/rshd.c: use krb5_verify_authenticator_checksum - -Sat Apr 18 21:13:06 1998 Johan Danielsson - - * appl/rsh/rsh.c: Don't try v5 if (only) `-4' is specified. - -Sun Dec 21 09:44:05 1997 Assar Westerlund - - * appl/rsh/rshd.c (recv_krb5_auth): swap the order of the - `local_user' and the `remote_user' - - * appl/rsh/rsh.c (send_krb5_auth): swap the order of the - `local_user' and the `remote_user' - -Sat Nov 29 07:10:11 1997 Assar Westerlund - - * appl/rsh/rshd.c: updated to use getarg. - changed `struct fd_set' to `fd_set'. - implemented broken/BSD authentication (requires iruserok) - -Wed Nov 12 02:35:57 1997 Assar Westerlund - - * appl/rsh/rsh_locl.h: add AUTH_BROKEN and PATH_RSH - - * appl/rsh/Makefile.am: set BINDIR - - * appl/rsh/rsh.c: implemented BSD-style reserved port - `authentication' - -Sun Aug 24 08:06:54 1997 Assar Westerlund - - * appl/rsh/rshd.c: syslog remote shells - -Tue Aug 12 01:29:46 1997 Assar Westerlund - - * appl/rshd/rshd.c: Use `krb5_sock_to_principal'. Send server - parameter to krb5_rd_req/krb5_recvauth. Set addresses in - auth_context. - -Fri Jul 25 17:32:12 1997 Assar Westerlund - - * appl/rsh/rshd.c: implement forwarding - - * appl/rsh/rsh.c: Use getarg. Implement forwarding. - -Sun Jul 13 00:32:16 1997 Assar Westerlund - - * appl/rsh: Conditionalize the krb4-support. - -Wed Jul 9 06:58:00 1997 Assar Westerlund - - * appl/rsh/rsh.c: use the correct user for the checksum - -Mon Jul 7 11:15:51 1997 Assar Westerlund - - * appl/rsh/rshd.c: Now works. Also implementd encryption and - `-p'. - - * appl/rsh/common.c: new file - -Mon Jun 30 06:08:14 1997 Assar Westerlund - - * appl/rsh: New program. - diff --git a/kerberosV/src/appl/rsh/Makefile.am b/kerberosV/src/appl/rsh/Makefile.am deleted file mode 100644 index b463e0f642f..00000000000 --- a/kerberosV/src/appl/rsh/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:38 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += -I$(srcdir)/../login $(INCLUDE_hcrypto) - -bin_PROGRAMS = rsh - -man_MANS = rsh.1 rshd.8 - -libexec_PROGRAMS = rshd - -rsh_SOURCES = rsh.c common.c rsh_locl.h - -rshd_SOURCES = rshd.c common.c login_access.c limits_conf.c rsh_locl.h - -login_access.c: - $(LN_S) $(srcdir)/../login/login_access.c . - -limits_conf.c: - $(LN_S) $(srcdir)/../login/limits_conf.c . - -LDADD = $(LIB_kafs) \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) diff --git a/kerberosV/src/appl/rsh/Makefile.in b/kerberosV/src/appl/rsh/Makefile.in deleted file mode 100644 index 73e03c6a2b3..00000000000 --- a/kerberosV/src/appl/rsh/Makefile.in +++ /dev/null @@ -1,1063 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -bin_PROGRAMS = rsh$(EXEEXT) -libexec_PROGRAMS = rshd$(EXEEXT) -subdir = appl/rsh -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \ - "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" -PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) -am_rsh_OBJECTS = rsh.$(OBJEXT) common.$(OBJEXT) -rsh_OBJECTS = $(am_rsh_OBJECTS) -rsh_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/lib/kafs/libkafs.la \ - $(am__DEPENDENCIES_1) -rsh_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIB_krb5) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_rshd_OBJECTS = rshd.$(OBJEXT) common.$(OBJEXT) \ - login_access.$(OBJEXT) limits_conf.$(OBJEXT) -rshd_OBJECTS = $(am_rshd_OBJECTS) -rshd_LDADD = $(LDADD) -rshd_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIB_krb5) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(rsh_SOURCES) $(rshd_SOURCES) -DIST_SOURCES = $(rsh_SOURCES) $(rshd_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -man8dir = $(mandir)/man8 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -I$(srcdir)/../login \ - $(INCLUDE_hcrypto) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -man_MANS = rsh.1 rshd.8 -rsh_SOURCES = rsh.c common.c rsh_locl.h -rshd_SOURCES = rshd.c common.c login_access.c limits_conf.c rsh_locl.h -LDADD = $(LIB_kafs) \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/rsh/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/rsh/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -install-libexecPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexecdir)" && rm -f $$files - -clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -rsh$(EXEEXT): $(rsh_OBJECTS) $(rsh_DEPENDENCIES) - @rm -f rsh$(EXEEXT) - $(LINK) $(rsh_OBJECTS) $(rsh_LDADD) $(LIBS) -rshd$(EXEEXT): $(rshd_OBJECTS) $(rshd_DEPENDENCIES) - @rm -f rshd$(EXEEXT) - $(LINK) $(rshd_OBJECTS) $(rshd_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/limits_conf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login_access.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsh.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rshd.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libexecPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \ - uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 uninstall-man8 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \ - clean-libtool ctags dist-hook distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-info install-info-am install-libexecPROGRAMS \ - install-man install-man1 install-man8 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-hook uninstall-libexecPROGRAMS uninstall-man \ - uninstall-man1 uninstall-man8 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -login_access.c: - $(LN_S) $(srcdir)/../login/login_access.c . - -limits_conf.c: - $(LN_S) $(srcdir)/../login/limits_conf.c . - -# 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/kerberosV/src/appl/rsh/NTMakefile b/kerberosV/src/appl/rsh/NTMakefile deleted file mode 100644 index c7b4e643d3e..00000000000 --- a/kerberosV/src/appl/rsh/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\rsh - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/rsh/common.c b/kerberosV/src/appl/rsh/common.c deleted file mode 100644 index 41ea33c3b72..00000000000 --- a/kerberosV/src/appl/rsh/common.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright (c) 1997-2004 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 "rsh_locl.h" -RCSID("$Id: common.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#if defined(KRB5) - -#ifdef KRB5 -int key_usage = 1026; - -void *ivec_in[2]; -void *ivec_out[2]; - -void -init_ivecs(int client, int have_errsock) -{ - size_t blocksize; - - krb5_crypto_getblocksize(context, crypto, &blocksize); - - ivec_in[0] = malloc(blocksize); - memset(ivec_in[0], client, blocksize); - - if(have_errsock) { - ivec_in[1] = malloc(blocksize); - memset(ivec_in[1], 2 | client, blocksize); - } else - ivec_in[1] = ivec_in[0]; - - ivec_out[0] = malloc(blocksize); - memset(ivec_out[0], !client, blocksize); - - if(have_errsock) { - ivec_out[1] = malloc(blocksize); - memset(ivec_out[1], 2 | !client, blocksize); - } else - ivec_out[1] = ivec_out[0]; -} -#endif - - -ssize_t -do_read (int fd, void *buf, size_t sz, void *ivec) -{ - if (do_encrypt) { -#ifdef KRB5 - if(auth_method == AUTH_KRB5) { - krb5_error_code ret; - uint32_t len, outer_len; - int status; - krb5_data data; - void *edata; - - ret = krb5_net_read (context, &fd, &len, 4); - if (ret <= 0) - return ret; - len = ntohl(len); - if (len > sz) - abort (); - /* ivec will be non null for protocol version 2 */ - if(ivec != NULL) - outer_len = krb5_get_wrapped_length (context, crypto, len + 4); - else - outer_len = krb5_get_wrapped_length (context, crypto, len); - edata = malloc (outer_len); - if (edata == NULL) - errx (1, "malloc: cannot allocate %u bytes", outer_len); - ret = krb5_net_read (context, &fd, edata, outer_len); - if (ret <= 0) { - free(edata); - return ret; - } - - status = krb5_decrypt_ivec(context, crypto, key_usage, - edata, outer_len, &data, ivec); - free (edata); - - if (status) - krb5_err (context, 1, status, "decrypting data"); - if(ivec != NULL) { - unsigned long l; - if(data.length < len + 4) - errx (1, "data received is too short"); - _krb5_get_int(data.data, &l, 4); - if(l != len) - errx (1, "inconsistency in received data"); - memcpy (buf, (unsigned char *)data.data+4, len); - } else - memcpy (buf, data.data, len); - krb5_data_free (&data); - return len; - } else -#endif /* KRB5 */ - abort (); - } else - return read (fd, buf, sz); -} - -ssize_t -do_write (int fd, void *buf, size_t sz, void *ivec) -{ - if (do_encrypt) { -#ifdef KRB5 - if(auth_method == AUTH_KRB5) { - krb5_error_code status; - krb5_data data; - unsigned char len[4]; - int ret; - - _krb5_put_int(len, sz, 4); - if(ivec != NULL) { - unsigned char *tmp = malloc(sz + 4); - if(tmp == NULL) - err(1, "malloc"); - _krb5_put_int(tmp, sz, 4); - memcpy(tmp + 4, buf, sz); - status = krb5_encrypt_ivec(context, crypto, key_usage, - tmp, sz + 4, &data, ivec); - free(tmp); - } else - status = krb5_encrypt_ivec(context, crypto, key_usage, - buf, sz, &data, ivec); - - if (status) - krb5_err(context, 1, status, "encrypting data"); - - ret = krb5_net_write (context, &fd, len, 4); - if (ret != 4) - return ret; - ret = krb5_net_write (context, &fd, data.data, data.length); - if (ret != data.length) - return ret; - free (data.data); - return sz; - } else -#endif /* KRB5 */ - abort(); - } else - return write (fd, buf, sz); -} -#endif /* KRB5 */ diff --git a/kerberosV/src/appl/rsh/limits_conf.c b/kerberosV/src/appl/rsh/limits_conf.c deleted file mode 100644 index 321db40b29c..00000000000 --- a/kerberosV/src/appl/rsh/limits_conf.c +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) 2005 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 "login_locl.h" - -RCSID("$Id: limits_conf.c,v 1.1 2013/06/17 19:11:38 robert Exp $"); - -#include -#include -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif - -struct limit { - const char *name; - int resource; - int scale; - int has_limit; - struct rlimit limit; -} limits[] = { -#define LIM(X, S) { #X, RLIMIT_##X, S, 0 } - LIM(CORE, 1024), - LIM(CPU, 60), - LIM(DATA, 1024), - LIM(FSIZE, 1024), -#ifdef RLIMIT_MEMLOCK - LIM(MEMLOCK, 1024), -#endif - LIM(NOFILE, 1), -#ifdef RLIMIT_NPROC - LIM(NPROC, 1), -#endif -#ifdef RLIMIT_RSS - LIM(RSS, 1024), -#endif - LIM(STACK, 1024), - -#ifdef RLIMIT_AS - LIM(AS, 1024), -#endif -#ifdef RLIMIT_LOCKS - LIM(LOCKS, 1), -#endif - /* - maxlogins - priority - */ - { NULL, 0 } -}; - -static struct limit * -find_limit(const char *name) -{ - struct limit *l; - for(l = limits; l->name != NULL; l++) - if(strcasecmp(name, l->name) == 0) - return l; - return NULL; -} - -/* this function reads limits.conf files similar to pam_limits - unimplemented features include: - % maxlogins - "-" no limits, - priorities etc that are not set via setrlimit - XXX uses static storage, and clobbers getgr* -*/ - -int -read_limits_conf(const char *file, const struct passwd *pwd) -{ - FILE *f; - char *args[4]; - int lineno = 0; - char buf[1024]; - struct limit *l; - rlim_t value; - - f = fopen(file, "r"); - if(f == NULL) { - if(errno != ENOENT && errno != ENOTDIR) - syslog(LOG_ERR, "%s: %m", file); - return -1; - } - - while(fgets(buf, sizeof(buf), f) != NULL) { - char *last = NULL; - char *end = NULL; - int level; - - lineno++; - - if(buf[0] == '\0') { - syslog(LOG_ERR, "%s: line %d: NUL character", file, lineno); - continue; - } - if(buf[strlen(buf) - 1] != '\n') { - /* file did not end with a newline, figure out if we're at - the EOF, or if our buffer was too small */ - int eof = 1; - int c; - while((c = fgetc(f)) != EOF) { - eof = 0; - if(c == '\n') - break; - } - if(!eof) { - syslog(LOG_ERR, "%s: line %d: line too long", file, lineno); - continue; - } - } - buf[strcspn(buf, "#\r\n")] = '\0'; - if((args[0] = strtok_r(buf, " \t", &last)) == NULL || - (args[1] = strtok_r(NULL, " \t", &last)) == NULL || - (args[2] = strtok_r(NULL, " \t", &last)) == NULL || - (args[3] = strtok_r(NULL, " \t", &last)) == NULL) { - if(args[0] != NULL) /* this would include comment lines */ - syslog(LOG_ERR, "%s: line %d: malformed line", file, lineno); - continue; - } - - l = find_limit(args[2]); - if(l == NULL) { - syslog(LOG_ERR, "%s: line %d: unknown limit %s", file, lineno, args[2]); - continue; - } - if(strcmp(args[3], "-") == 0) { - value = RLIM_INFINITY; - } else { - errno = 0; - value = strtol(args[3], &end, 10); - if(*end != '\0') { - syslog(LOG_ERR, "%s: line %d: bad value %s", file, lineno, args[3]); - continue; - } - if((value == LONG_MIN || value == LONG_MAX) && errno == ERANGE) { - syslog(LOG_ERR, "%s: line %d: bad value %s", file, lineno, args[3]); - continue; - } - if(value * l->scale < value) - value = RLIM_INFINITY; - else - value *= l->scale; - } - level = 0; - /* XXX unclear: if you set group hard and user soft limit, - should the hard limit still apply? this code doesn't. */ - if(strcmp(args[0], pwd->pw_name) == 0) - level = 3; - if(*args[0] == '@') { - struct group *gr; - gr = getgrnam(args[0] + 1); - if(gr != NULL && gr->gr_gid == pwd->pw_gid) - level = 2; - } - if(strcmp(args[0], "*") == 0) - level = 1; - if(level == 0 || level < l->has_limit) /* not for us */ - continue; - if(l->has_limit < level) { - if(getrlimit(l->resource, &l->limit) < 0) - continue; - l->has_limit = level; - } - - /* XXX unclear: if you soft to more than default hard, should - we set hard to soft? this code doesn't. */ - if(strcasecmp(args[1], "soft") == 0 || strcmp(args[1], "-") == 0) - l->limit.rlim_cur = value; - if(strcasecmp(args[1], "hard") == 0 || strcmp(args[1], "-") == 0) - l->limit.rlim_max = value; - } - fclose(f); - for(l = limits; l->name != NULL; l++) { - if(l->has_limit) { - if(l->limit.rlim_cur > l->limit.rlim_max) - l->limit.rlim_cur = l->limit.rlim_max; - if(setrlimit(l->resource, &l->limit) != 0) - syslog(LOG_ERR, "setrlimit RLIM_%s failed: %m", l->name); - } - l->has_limit = 0; - } - return 0; -} diff --git a/kerberosV/src/appl/rsh/login_access.c b/kerberosV/src/appl/rsh/login_access.c deleted file mode 100644 index 8edf0ebea42..00000000000 --- a/kerberosV/src/appl/rsh/login_access.c +++ /dev/null @@ -1,277 +0,0 @@ -/************************************************************************ -* Copyright 1995 by Wietse Venema. All rights reserved. Some individual -* files may be covered by other copyrights. -* -* This material was originally written and compiled by Wietse Venema at -* Eindhoven University of Technology, The Netherlands, in 1990, 1991, -* 1992, 1993, 1994 and 1995. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that this entire copyright notice -* is duplicated in all such copies. -* -* This software is provided "as is" and without any expressed or implied -* warranties, including, without limitation, the implied warranties of -* merchantibility and fitness for any particular purpose. -************************************************************************/ - /* - * This module implements a simple but effective form of login access - * control based on login names and on host (or domain) names, internet - * addresses (or network numbers), or on terminal line names in case of - * non-networked logins. Diagnostics are reported through syslog(3). - * - * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. - */ - -#include "login_locl.h" - -RCSID("$Id: login_access.c,v 1.1 2013/06/17 19:11:38 robert Exp $"); - - /* Delimiters for fields and for lists of users, ttys or hosts. */ - -static char fs[] = ":"; /* field separator */ -static char sep[] = ", \t"; /* list-element separator */ - - /* Constants to be used in assignments only, not in comparisons... */ - -#define YES 1 -#define NO 0 - - /* - * A structure to bundle up all login-related information to keep the - * functional interfaces as generic as possible. - */ -struct login_info { - struct passwd *user; - char *from; -}; - -static int list_match(char *list, struct login_info *item, - int (*match_fn)(char *, struct login_info *)); -static int user_match(char *tok, struct login_info *item); -static int from_match(char *tok, struct login_info *item); -static int string_match(char *tok, char *string); - -/* login_access - match username/group and host/tty with access control file */ - -int login_access(struct passwd *user, char *from) -{ - struct login_info item; - FILE *fp; - char line[BUFSIZ]; - char *perm; /* becomes permission field */ - char *users; /* becomes list of login names */ - char *froms; /* becomes list of terminals or hosts */ - int match = NO; - int end; - int lineno = 0; /* for diagnostics */ - char *foo; - - /* - * Bundle up the arguments to avoid unnecessary clumsiness lateron. - */ - item.user = user; - item.from = from; - - /* - * Process the table one line at a time and stop at the first match. - * Blank lines and lines that begin with a '#' character are ignored. - * Non-comment lines are broken at the ':' character. All fields are - * mandatory. The first field should be a "+" or "-" character. A - * non-existing table means no access control. - */ - - if ((fp = fopen(_PATH_LOGACCESS, "r")) != 0) { - while (!match && fgets(line, sizeof(line), fp)) { - lineno++; - if (line[end = strlen(line) - 1] != '\n') { - syslog(LOG_ERR, "%s: line %d: missing newline or line too long", - _PATH_LOGACCESS, lineno); - continue; - } - if (line[0] == '#') - continue; /* comment line */ - while (end > 0 && isspace((unsigned char)line[end - 1])) - end--; - line[end] = 0; /* strip trailing whitespace */ - if (line[0] == 0) /* skip blank lines */ - continue; - foo = NULL; - if (!(perm = strtok_r(line, fs, &foo)) - || !(users = strtok_r(NULL, fs, &foo)) - || !(froms = strtok_r(NULL, fs, &foo)) - || strtok_r(NULL, fs, &foo)) { - syslog(LOG_ERR, "%s: line %d: bad field count", - _PATH_LOGACCESS, - lineno); - continue; - } - if (perm[0] != '+' && perm[0] != '-') { - syslog(LOG_ERR, "%s: line %d: bad first field", - _PATH_LOGACCESS, - lineno); - continue; - } - match = (list_match(froms, &item, from_match) - && list_match(users, &item, user_match)); - } - fclose(fp); - } else if (errno != ENOENT) { - syslog(LOG_ERR, "cannot open %s: %m", _PATH_LOGACCESS); - } - return (match == 0 || (line[0] == '+')); -} - -/* list_match - match an item against a list of tokens with exceptions */ - -static int -list_match(char *list, - struct login_info *item, - int (*match_fn)(char *, struct login_info *)) -{ - char *tok; - int match = NO; - char *foo = NULL; - - /* - * Process tokens one at a time. We have exhausted all possible matches - * when we reach an "EXCEPT" token or the end of the list. If we do find - * a match, look for an "EXCEPT" list and recurse to determine whether - * the match is affected by any exceptions. - */ - - for (tok = strtok_r(list, sep, &foo); - tok != NULL; - tok = strtok_r(NULL, sep, &foo)) { - if (strcasecmp(tok, "EXCEPT") == 0) /* EXCEPT: give up */ - break; - if ((match = (*match_fn) (tok, item)) != 0) /* YES */ - break; - } - /* Process exceptions to matches. */ - - if (match != NO) { - while ((tok = strtok_r(NULL, sep, &foo)) && strcasecmp(tok, "EXCEPT")) - /* VOID */ ; - if (tok == 0 || list_match(NULL, item, match_fn) == NO) - return (match); - } - return (NO); -} - -/* myhostname - figure out local machine name */ - -static char *myhostname(void) -{ - static char name[MAXHOSTNAMELEN + 1] = ""; - - if (name[0] == 0) { - gethostname(name, sizeof(name)); - name[MAXHOSTNAMELEN] = 0; - } - return (name); -} - -/* netgroup_match - match group against machine or user */ - -static int netgroup_match(char *group, char *machine, char *user) -{ -#ifdef HAVE_YP_GET_DEFAULT_DOMAIN - static char *mydomain = 0; - - if (mydomain == 0) - yp_get_default_domain(&mydomain); - return (innetgr(group, machine, user, mydomain)); -#else - syslog(LOG_ERR, "NIS netgroup support not configured"); - return 0; -#endif -} - -/* user_match - match a username against one token */ - -static int user_match(char *tok, struct login_info *item) -{ - char *string = item->user->pw_name; - struct login_info fake_item; - struct group *group; - int i; - char *at; - - /* - * If a token has the magic value "ALL" the match always succeeds. - * Otherwise, return YES if the token fully matches the username, if the - * token is a group that contains the username, or if the token is the - * name of the user's primary group. - */ - - if ((at = strchr(tok + 1, '@')) != 0) { /* split user@host pattern */ - *at = 0; - fake_item.from = myhostname(); - return (user_match(tok, item) && from_match(at + 1, &fake_item)); - } else if (tok[0] == '@') { /* netgroup */ - return (netgroup_match(tok + 1, (char *) 0, string)); - } else if (string_match(tok, string)) { /* ALL or exact match */ - return (YES); - } else if ((group = getgrnam(tok)) != 0) { /* try group membership */ - if (item->user->pw_gid == group->gr_gid) - return (YES); - for (i = 0; group->gr_mem[i]; i++) - if (strcasecmp(string, group->gr_mem[i]) == 0) - return (YES); - } - return (NO); -} - -/* from_match - match a host or tty against a list of tokens */ - -static int from_match(char *tok, struct login_info *item) -{ - char *string = item->from; - int tok_len; - int str_len; - - /* - * If a token has the magic value "ALL" the match always succeeds. Return - * YES if the token fully matches the string. If the token is a domain - * name, return YES if it matches the last fields of the string. If the - * token has the magic value "LOCAL", return YES if the string does not - * contain a "." character. If the token is a network number, return YES - * if it matches the head of the string. - */ - - if (tok[0] == '@') { /* netgroup */ - return (netgroup_match(tok + 1, string, (char *) 0)); - } else if (string_match(tok, string)) { /* ALL or exact match */ - return (YES); - } else if (tok[0] == '.') { /* domain: match last fields */ - if ((str_len = strlen(string)) > (tok_len = strlen(tok)) - && strcasecmp(tok, string + str_len - tok_len) == 0) - return (YES); - } else if (strcasecmp(tok, "LOCAL") == 0) { /* local: no dots */ - if (strchr(string, '.') == 0) - return (YES); - } else if (tok[(tok_len = strlen(tok)) - 1] == '.' /* network */ - && strncmp(tok, string, tok_len) == 0) { - return (YES); - } - return (NO); -} - -/* string_match - match a string against one token */ - -static int string_match(char *tok, char *string) -{ - - /* - * If the token has the magic value "ALL" the match always succeeds. - * Otherwise, return YES if the token fully matches the string. - */ - - if (strcasecmp(tok, "ALL") == 0) { /* all: always matches */ - return (YES); - } else if (strcasecmp(tok, string) == 0) { /* try exact match */ - return (YES); - } - return (NO); -} diff --git a/kerberosV/src/appl/rsh/rsh.1 b/kerberosV/src/appl/rsh/rsh.1 deleted file mode 100644 index 5f0c3f49478..00000000000 --- a/kerberosV/src/appl/rsh/rsh.1 +++ /dev/null @@ -1,294 +0,0 @@ -.\" Copyright (c) 2002 - 2003 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: rsh.1,v 1.3 2013/06/17 19:11:38 robert Exp $ -.\" -.Dd February 20, 2004 -.Dt RSH 1 -.Os HEIMDAL -.Sh NAME -.Nm rsh -.Nd remote shell -.Sh SYNOPSIS -.Nm -.Op Fl 45FGKdefnuxz -.Op Fl U Pa string -.Op Fl p Ar port -.Op Fl l Ar username -.Op Fl P Ar N|O -.Ar host [command] -.Sh DESCRIPTION -.Nm -authenticates to the -.Xr rshd 8 -daemon on the remote -.Ar host , -and then executes the specified -.Ar command . -.Pp -.Nm -copies its standard input to the remote command, and the standard -output and error of the remote command to its own. -.Pp -Valid options are: -.Bl -tag -width Ds -.It Xo -.Fl 4 , -.Fl Fl krb4 -.Xc -The -.Fl 4 -option requests Kerberos 4 authentication. Normally all supported -authentication mechanisms will be tried, but in some cases more -explicit control is desired. -.It Xo -.Fl 5 , -.Fl Fl krb5 -.Xc -The -.Fl 5 -option requests Kerberos 5 authentication. This is analogous to the -.Fl 4 -option. -.It Xo -.Fl K , -.Fl Fl broken -.Xc -The -.Fl K -option turns off all Kerberos authentication. The security in this -mode relies on reserved ports. The long name is an indication of how -good this is. -.It Xo -.Fl n , -.Fl Fl no-input -.Xc -The -.Fl n -option directs the input from the -.Pa /dev/null -device (see the -.Sx BUGS -section of this manual page). -.It Fl d -Enable -.Xr setsockopt 2 -socket debugging. -.It Xo -.Fl e , -.Fl Fl no-stderr -.Xc -Don't use a separate socket for the stderr stream. This can be -necessary if rsh-ing through a NAT bridge. -.It Xo -.Fl x , -.Fl Fl encrypt -.Xc -The -.Fl x -option enables encryption for all data exchange. This is only valid -for Kerberos authenticated connections (see the -.Sx BUGS -section for limitations). -.It Xo -.Fl z -.Xc -The opposite of -.Fl x . -This is the default, and is mainly useful if encryption has been -enabled by default, for instance in the -.Li appdefaults -section of -.Pa /etc/krb5.conf -when using Kerberos 5. -.It Xo -.Fl f , -.Fl Fl forward -.Xc -Forward Kerberos 5 credentials to the remote host. -Also settable via -.Li appdefaults -(see -.Xr krb5.conf ) . -.It Xo -.Fl F , -.Fl Fl forwardable -.Xc -Make the forwarded credentials re-forwardable. -Also settable via -.Li appdefaults -(see -.Xr krb5.conf ) . -.It Xo -.Fl l Ar string , -.Fl Fl user= Ns Ar string -.Xc -By default the remote username is the same as the local. The -.Fl l -option or the -.Pa username@host -format allow the remote name to be specified. -.It Xo -.Fl n , -.Fl Fl no-input -.Xc -Direct input from -.Pa /dev/null -(see the -.Sx BUGS -section). -.It Xo -.Fl p Ar number-or-service , -.Fl Fl port= Ns Ar number-or-service -.Xc -Connect to this port instead of the default (which is 514 when using -old port based authentication, 544 for Kerberos 5 and non-encrypted -Kerberos 4, and 545 for encrytpted Kerberos 4; subject of course to -the contents of -.Pa /etc/services ) . -.It Xo -.Fl P Ar N|O|1|2 , -.Fl Fl protocol= Ns Ar N|O|1|2 -.Xc -Specifies the protocol version to use with Kerberos 5. -.Ar N -and -.Ar 2 -select protocol version 2, while -.Ar O -and -.Ar 1 -select version 1. Version 2 is believed to be more secure, and is the -default. Unless asked for a specific version, -.Nm -will try both. This behaviour may change in the future. -.It Xo -.Fl u , -.Fl Fl unique -.Xc -Make sure the remote credentials cache is unique, that is, don't reuse -any existing cache. Mutually exclusive to -.Fl U . -.It Xo -.Fl U Pa string , -.Fl Fl tkfile= Ns Pa string -.Xc -Name of the remote credentials cache. Mutually exclusive to -.Fl u . -.It Xo -.Fl x , -.Fl Fl encrypt -.Xc -The -.Fl x -option enables encryption for all data exchange. This is only valid -for Kerberos authenticated connections (see the -.Sx BUGS -section for limitations). -.It Fl z -The opposite of -.Fl x . -This is the default, but encryption can be enabled when using -Kerberos 5, by setting the -.Li libdefaults/encrypt -option in -.Xr krb5.conf 5 . -.El -.\".Pp -.\"Without a -.\".Ar command -.\".Nm -.\"will just exec -.\".Xr rlogin 1 -.\"with the same arguments. -.Sh EXAMPLES -Care should be taken when issuing commands containing shell meta -characters. Without quoting, these will be expanded on the local -machine. -.Pp -The following command: -.Pp -.Dl rsh otherhost cat remotefile \*[Gt] localfile -.Pp -will write the contents of the remote -.Pa remotefile -to the local -.Pa localfile , -but: -.Pp -.Dl rsh otherhost 'cat remotefile \*[Gt] remotefile2' -.Pp -will write it to the remote -.Pa remotefile2 . -.\".Sh ENVIRONMENT -.Sh FILES -.Bl -tag -width /etc/hosts -compact -.It Pa /etc/hosts -.El -.\".Sh DIAGNOSTICS -.Sh SEE ALSO -.Xr rlogin 1 , -.Xr krb_realmofhost 3 , -.Xr krb_sendauth 3 , -.Xr hosts.equiv 5 , -.Xr krb5.conf 5 , -.Xr rhosts 5 , -.Xr kerberos 8 -.Xr rshd 8 -.\".Sh STANDARDS -.Sh HISTORY -The -.Nm -command appeared in -.Bx 4.2 . -.Sh AUTHORS -This implementation of -.Nm -was written as part of the Heimdal Kerberos 5 implementation. -.Sh BUGS -Some shells (notably -.Xr csh 1 ) -will cause -.Nm -to block if run in the background, unless the standard input is directed away from the terminal. This is what the -.Fl n -option is for. -.Pp -The -.Fl x -options enables encryption for the session, but for both Kerberos 4 -and 5 the actual command is sent unencrypted, so you should not send -any secret information in the command line (which is probably a bad -idea anyway, since the command line can usually be read with tools -like -.Xr ps 1 ) . -Forthermore in Kerberos 4 the command is not even integrity -protected, so anyone with the right tools can modify the command. diff --git a/kerberosV/src/appl/rsh/rsh.c b/kerberosV/src/appl/rsh/rsh.c deleted file mode 100644 index e59e67caf5e..00000000000 --- a/kerberosV/src/appl/rsh/rsh.c +++ /dev/null @@ -1,1032 +0,0 @@ -/* - * Copyright (c) 1997 - 2004 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 "rsh_locl.h" -RCSID("$Id: rsh.c,v 1.4 2013/06/17 19:11:38 robert Exp $"); - -enum auth_method auth_method; -#if defined(KRB5) -int do_encrypt = -1; -#endif -#ifdef KRB5 -int do_unique_tkfile = 0; -char *unique_tkfile = NULL; -char tkfile[MAXPATHLEN]; -int do_forward = -1; -int do_forwardable = -1; -krb5_context context; -krb5_keyblock *keyblock; -krb5_crypto crypto; -#endif -int sock_debug = 0; - -#ifdef KRB5 -static int use_v5 = -1; -#endif -#if defined(KRB5) -static int use_only_broken = 0; -#else -static int use_only_broken = 1; -#endif -static int use_broken = 1; -static char *port_str; -static const char *user; -static int do_version; -static int do_help; -static int do_errsock = 1; -#ifdef KRB5 -static char *protocol_version_str; -static int protocol_version = 2; -#endif - -/* - * - */ - -static int input = 1; /* Read from stdin */ - -static int -rsh_loop (int s, int errsock) -{ - fd_set real_readset; - int count = 1; - -#ifdef KRB5 - if(auth_method == AUTH_KRB5 && protocol_version == 2) - init_ivecs(1, errsock != -1); -#endif - - if (s >= FD_SETSIZE || (errsock != -1 && errsock >= FD_SETSIZE)) - errx (1, "fd too large"); - - FD_ZERO(&real_readset); - FD_SET(s, &real_readset); - if (errsock != -1) { - FD_SET(errsock, &real_readset); - ++count; - } - if(input) - FD_SET(STDIN_FILENO, &real_readset); - - for (;;) { - int ret; - fd_set readset; - char buf[RSH_BUFSIZ]; - - readset = real_readset; - ret = select (max(s, errsock) + 1, &readset, NULL, NULL, NULL); - if (ret < 0) { - if (errno == EINTR) - continue; - else - err (1, "select"); - } - if (FD_ISSET(s, &readset)) { - ret = do_read (s, buf, sizeof(buf), ivec_in[0]); - if (ret < 0) - err (1, "read"); - else if (ret == 0) { - close (s); - FD_CLR(s, &real_readset); - if (--count == 0) - return 0; - } else - net_write (STDOUT_FILENO, buf, ret); - } - if (errsock != -1 && FD_ISSET(errsock, &readset)) { - ret = do_read (errsock, buf, sizeof(buf), ivec_in[1]); - if (ret < 0) - err (1, "read"); - else if (ret == 0) { - close (errsock); - FD_CLR(errsock, &real_readset); - if (--count == 0) - return 0; - } else - net_write (STDERR_FILENO, buf, ret); - } - if (FD_ISSET(STDIN_FILENO, &readset)) { - ret = read (STDIN_FILENO, buf, sizeof(buf)); - if (ret < 0) - err (1, "read"); - else if (ret == 0) { - close (STDIN_FILENO); - FD_CLR(STDIN_FILENO, &real_readset); - shutdown (s, SHUT_WR); - } else - do_write (s, buf, ret, ivec_out[0]); - } - } -} - -#ifdef KRB5 -/* - * Send forward information on `s' for host `hostname', them being - * forwardable themselves if `forwardable' - */ - -static int -krb5_forward_cred (krb5_auth_context auth_context, - int s, - const char *hostname, - int forwardable) -{ - krb5_error_code ret; - krb5_ccache ccache; - krb5_creds creds; - krb5_kdc_flags flags; - krb5_data out_data; - krb5_principal principal; - - memset (&creds, 0, sizeof(creds)); - - ret = krb5_cc_default (context, &ccache); - if (ret) { - warnx ("could not forward creds: krb5_cc_default: %s", - krb5_get_err_text (context, ret)); - return 1; - } - - ret = krb5_cc_get_principal (context, ccache, &principal); - if (ret) { - warnx ("could not forward creds: krb5_cc_get_principal: %s", - krb5_get_err_text (context, ret)); - return 1; - } - - creds.client = principal; - - ret = krb5_make_principal(context, - &creds.server, - principal->realm, - "krbtgt", - principal->realm, - NULL); - - if (ret) { - warnx ("could not forward creds: krb5_make_principal: %s", - krb5_get_err_text (context, ret)); - return 1; - } - - creds.times.endtime = 0; - - flags.i = 0; - flags.b.forwarded = 1; - flags.b.forwardable = forwardable; - - ret = krb5_get_forwarded_creds (context, - auth_context, - ccache, - flags.i, - hostname, - &creds, - &out_data); - if (ret) { - warnx ("could not forward creds: krb5_get_forwarded_creds: %s", - krb5_get_err_text (context, ret)); - return 1; - } - - ret = krb5_write_message (context, - (void *)&s, - &out_data); - krb5_data_free (&out_data); - - if (ret) - warnx ("could not forward creds: krb5_write_message: %s", - krb5_get_err_text (context, ret)); - return 0; -} - -static int sendauth_version_error; - -static int -send_krb5_auth(int s, - struct sockaddr *thisaddr, - struct sockaddr *thataddr, - const char *hostname, - const char *remote_user, - const char *local_user, - size_t cmd_len, - const char *cmd) -{ - krb5_principal server; - krb5_data cksum_data; - int status; - size_t len; - krb5_auth_context auth_context = NULL; - const char *protocol_string = NULL; - krb5_flags ap_opts; - char *str; - - status = krb5_sname_to_principal(context, - hostname, - "host", - KRB5_NT_SRV_HST, - &server); - if (status) { - warnx ("%s: %s", hostname, krb5_get_err_text(context, status)); - return 1; - } - - if(do_encrypt == -1) { - krb5_appdefault_boolean(context, NULL, - krb5_principal_get_realm(context, server), - "encrypt", - FALSE, - &do_encrypt); - } - - cksum_data.length = asprintf (&str, - "%u:%s%s%s", - ntohs(socket_get_port(thataddr)), - do_encrypt ? "-x " : "", - cmd, - remote_user); - if (str == NULL) { - warnx ("%s: failed to allocate command", hostname); - return 1; - } - cksum_data.data = str; - - ap_opts = 0; - - if(do_encrypt) - ap_opts |= AP_OPTS_MUTUAL_REQUIRED; - - switch(protocol_version) { - case 2: - ap_opts |= AP_OPTS_USE_SUBKEY; - protocol_string = KCMD_NEW_VERSION; - break; - case 1: - protocol_string = KCMD_OLD_VERSION; - key_usage = KRB5_KU_OTHER_ENCRYPTED; - break; - default: - abort(); - } - - status = krb5_sendauth (context, - &auth_context, - &s, - protocol_string, - NULL, - server, - ap_opts, - &cksum_data, - NULL, - NULL, - NULL, - NULL, - NULL); - - /* do this while we have a principal */ - if(do_forward == -1 || do_forwardable == -1) { - krb5_const_realm realm = krb5_principal_get_realm(context, server); - if (do_forwardable == -1) - krb5_appdefault_boolean(context, NULL, realm, - "forwardable", FALSE, - &do_forwardable); - if (do_forward == -1) - krb5_appdefault_boolean(context, NULL, realm, - "forward", FALSE, - &do_forward); - } - - krb5_free_principal(context, server); - krb5_data_free(&cksum_data); - - if (status) { - if(status == KRB5_SENDAUTH_REJECTED && - protocol_version == 2 && protocol_version_str == NULL) - sendauth_version_error = 1; - else - krb5_warn(context, status, "%s", hostname); - return 1; - } - - status = krb5_auth_con_getlocalsubkey (context, auth_context, &keyblock); - if(keyblock == NULL) - status = krb5_auth_con_getkey (context, auth_context, &keyblock); - if (status) { - warnx ("krb5_auth_con_getkey: %s", krb5_get_err_text(context, status)); - return 1; - } - - status = krb5_auth_con_setaddrs_from_fd (context, - auth_context, - &s); - if (status) { - warnx("krb5_auth_con_setaddrs_from_fd: %s", - krb5_get_err_text(context, status)); - return(1); - } - - status = krb5_crypto_init(context, keyblock, 0, &crypto); - if(status) { - warnx ("krb5_crypto_init: %s", krb5_get_err_text(context, status)); - return 1; - } - - len = strlen(remote_user) + 1; - if (net_write (s, remote_user, len) != len) { - warn ("write"); - return 1; - } - if (do_encrypt && net_write (s, "-x ", 3) != 3) { - warn ("write"); - return 1; - } - if (net_write (s, cmd, cmd_len) != cmd_len) { - warn ("write"); - return 1; - } - - if (do_unique_tkfile) { - if (net_write (s, tkfile, strlen(tkfile)) != strlen(tkfile)) { - warn ("write"); - return 1; - } - } - len = strlen(local_user) + 1; - if (net_write (s, local_user, len) != len) { - warn ("write"); - return 1; - } - - if (!do_forward - || krb5_forward_cred (auth_context, s, hostname, do_forwardable)) { - /* Empty forwarding info */ - - u_char zero[4] = {0, 0, 0, 0}; - write (s, &zero, 4); - } - krb5_auth_con_free (context, auth_context); - return 0; -} - -#endif /* KRB5 */ - -static int -send_broken_auth(int s, - struct sockaddr *thisaddr, - struct sockaddr *thataddr, - const char *hostname, - const char *remote_user, - const char *local_user, - size_t cmd_len, - const char *cmd) -{ - size_t len; - - len = strlen(local_user) + 1; - if (net_write (s, local_user, len) != len) { - warn ("write"); - return 1; - } - len = strlen(remote_user) + 1; - if (net_write (s, remote_user, len) != len) { - warn ("write"); - return 1; - } - if (net_write (s, cmd, cmd_len) != cmd_len) { - warn ("write"); - return 1; - } - return 0; -} - -static int -proto (int s, int errsock, - const char *hostname, const char *local_user, const char *remote_user, - const char *cmd, size_t cmd_len, - int (*auth_func)(int s, - struct sockaddr *this, struct sockaddr *that, - const char *hostname, const char *remote_user, - const char *local_user, size_t cmd_len, - const char *cmd)) -{ - int errsock2; - char buf[BUFSIZ]; - char *p; - size_t len; - char reply; - struct sockaddr_storage thisaddr_ss; - struct sockaddr *thisaddr = (struct sockaddr *)&thisaddr_ss; - struct sockaddr_storage thataddr_ss; - struct sockaddr *thataddr = (struct sockaddr *)&thataddr_ss; - struct sockaddr_storage erraddr_ss; - struct sockaddr *erraddr = (struct sockaddr *)&erraddr_ss; - socklen_t addrlen; - int ret; - - addrlen = sizeof(thisaddr_ss); - if (getsockname (s, thisaddr, &addrlen) < 0) { - warn ("getsockname(%s)", hostname); - return 1; - } - addrlen = sizeof(thataddr_ss); - if (getpeername (s, thataddr, &addrlen) < 0) { - warn ("getpeername(%s)", hostname); - return 1; - } - - if (errsock != -1) { - - addrlen = sizeof(erraddr_ss); - if (getsockname (errsock, erraddr, &addrlen) < 0) { - warn ("getsockname"); - return 1; - } - - if (listen (errsock, 1) < 0) { - warn ("listen"); - return 1; - } - - p = buf; - snprintf (p, sizeof(buf), "%u", - ntohs(socket_get_port(erraddr))); - len = strlen(buf) + 1; - if(net_write (s, buf, len) != len) { - warn ("write"); - close (errsock); - return 1; - } - - - for (;;) { - fd_set fdset; - - if (errsock >= FD_SETSIZE || s >= FD_SETSIZE) - errx (1, "fd too large"); - - FD_ZERO(&fdset); - FD_SET(errsock, &fdset); - FD_SET(s, &fdset); - - ret = select (max(errsock, s) + 1, &fdset, NULL, NULL, NULL); - if (ret < 0) { - if (errno == EINTR) - continue; - warn ("select"); - close (errsock); - return 1; - } - if (FD_ISSET(errsock, &fdset)) { - errsock2 = accept (errsock, NULL, NULL); - close (errsock); - if (errsock2 < 0) { - warn ("accept"); - return 1; - } - break; - } - - /* - * there should not arrive any data on this fd so if it's - * readable it probably indicates that the other side when - * away. - */ - - if (FD_ISSET(s, &fdset)) { - warnx ("socket closed"); - close (errsock); - errsock2 = -1; - break; - } - } - } else { - if (net_write (s, "0", 2) != 2) { - warn ("write"); - return 1; - } - errsock2 = -1; - } - - if ((*auth_func)(s, thisaddr, thataddr, hostname, - remote_user, local_user, - cmd_len, cmd)) { - close (errsock2); - return 1; - } - - ret = net_read (s, &reply, 1); - if (ret < 0) { - warn ("read"); - close (errsock2); - return 1; - } else if (ret == 0) { - warnx ("unexpected EOF from %s", hostname); - close (errsock2); - return 1; - } - if (reply != 0) { - - warnx ("Error from rshd at %s:", hostname); - - while ((ret = read (s, buf, sizeof(buf))) > 0) - write (STDOUT_FILENO, buf, ret); - write (STDOUT_FILENO,"\n",1); - close (errsock2); - return 1; - } - - if (sock_debug) { - int one = 1; - if (setsockopt(s, SOL_SOCKET, SO_DEBUG, (void *)&one, sizeof(one)) < 0) - warn("setsockopt remote"); - if (errsock2 != -1 && - setsockopt(errsock2, SOL_SOCKET, SO_DEBUG, - (void *)&one, sizeof(one)) < 0) - warn("setsockopt stderr"); - } - - return rsh_loop (s, errsock2); -} - -/* - * Return in `res' a copy of the concatenation of `argc, argv' into - * malloced space. */ - -static size_t -construct_command (char **res, int argc, char **argv) -{ - int i; - size_t len = 0; - char *tmp; - - for (i = 0; i < argc; ++i) - len += strlen(argv[i]) + 1; - len = max (1, len); - tmp = malloc (len); - if (tmp == NULL) - errx (1, "malloc %lu failed", (unsigned long)len); - - *tmp = '\0'; - for (i = 0; i < argc - 1; ++i) { - strlcat (tmp, argv[i], len); - strlcat (tmp, " ", len); - } - if (argc > 0) - strlcat (tmp, argv[argc-1], len); - *res = tmp; - return len; -} - -static char * -print_addr (const struct sockaddr *sa) -{ - char addr_str[256]; - char *res; - const char *as = NULL; - - if(sa->sa_family == AF_INET) - as = inet_ntop (sa->sa_family, &((struct sockaddr_in*)sa)->sin_addr, - addr_str, sizeof(addr_str)); -#ifdef HAVE_INET6 - else if(sa->sa_family == AF_INET6) - as = inet_ntop (sa->sa_family, &((struct sockaddr_in6*)sa)->sin6_addr, - addr_str, sizeof(addr_str)); -#endif - if(as == NULL) - return NULL; - res = strdup(as); - if (res == NULL) - errx (1, "malloc: out of memory"); - return res; -} - -static int -doit_broken (int argc, - char **argv, - int hostindex, - struct addrinfo *ai, - const char *remote_user, - const char *local_user, - int priv_socket1, - int priv_socket2, - const char *cmd, - size_t cmd_len) -{ - struct addrinfo *a; - - if (connect (priv_socket1, ai->ai_addr, ai->ai_addrlen) < 0) { - int save_errno = errno; - - close(priv_socket1); - close(priv_socket2); - - for (a = ai->ai_next; a != NULL; a = a->ai_next) { - pid_t pid; - char *adr = print_addr(a->ai_addr); - if(adr == NULL) - continue; - - pid = fork(); - if (pid < 0) - err (1, "fork"); - else if(pid == 0) { - char **new_argv; - int i = 0; - - new_argv = malloc((argc + 2) * sizeof(*new_argv)); - if (new_argv == NULL) - errx (1, "malloc: out of memory"); - new_argv[i] = argv[i]; - ++i; - if (hostindex == i) - new_argv[i++] = adr; - new_argv[i++] = "-K"; - for(; i <= argc; ++i) - new_argv[i] = argv[i - 1]; - if (hostindex > 1) - new_argv[hostindex + 1] = adr; - new_argv[argc + 1] = NULL; - execv(PATH_RSH, new_argv); - err(1, "execv(%s)", PATH_RSH); - } else { - int status; - free(adr); - - while(waitpid(pid, &status, 0) < 0) - ; - if(WIFEXITED(status) && WEXITSTATUS(status) == 0) - return 0; - } - } - errno = save_errno; - warn("%s", argv[hostindex]); - return 1; - } else { - int ret; - - ret = proto (priv_socket1, priv_socket2, - argv[hostindex], - local_user, remote_user, - cmd, cmd_len, - send_broken_auth); - return ret; - } -} - -#if defined(KRB5) -static int -doit (const char *hostname, - struct addrinfo *ai, - const char *remote_user, - const char *local_user, - const char *cmd, - size_t cmd_len, - int (*auth_func)(int s, - struct sockaddr *this, struct sockaddr *that, - const char *hostname, const char *remote_user, - const char *local_user, size_t cmd_len, - const char *cmd)) -{ - int error; - struct addrinfo *a; - int socketfailed = 1; - int ret; - - for (a = ai; a != NULL; a = a->ai_next) { - int s; - int errsock; - - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - socketfailed = 0; - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - char addr[128]; - if(getnameinfo(a->ai_addr, a->ai_addrlen, - addr, sizeof(addr), NULL, 0, NI_NUMERICHOST) == 0) - warn ("connect(%s [%s])", hostname, addr); - else - warn ("connect(%s)", hostname); - close (s); - continue; - } - if (do_errsock) { - struct addrinfo *ea, *eai; - struct addrinfo hints; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = a->ai_socktype; - hints.ai_protocol = a->ai_protocol; - hints.ai_family = a->ai_family; - hints.ai_flags = AI_PASSIVE; - - errsock = -1; - - error = getaddrinfo (NULL, "0", &hints, &eai); - if (error) - errx (1, "getaddrinfo: %s", gai_strerror(error)); - for (ea = eai; ea != NULL; ea = ea->ai_next) { - errsock = socket (ea->ai_family, ea->ai_socktype, - ea->ai_protocol); - if (errsock < 0) - continue; - if (bind (errsock, ea->ai_addr, ea->ai_addrlen) < 0) - err (1, "bind"); - break; - } - if (errsock < 0) - err (1, "socket"); - freeaddrinfo (eai); - } else - errsock = -1; - - ret = proto (s, errsock, - hostname, - local_user, remote_user, - cmd, cmd_len, auth_func); - close (s); - return ret; - } - if(socketfailed) - warnx ("failed to contact %s", hostname); - return -1; -} -#endif /* KRB5 */ - -struct getargs args[] = { -#ifdef KRB5 - { "krb5", '5', arg_flag, &use_v5, "Use Kerberos V5" }, - { "forward", 'f', arg_flag, &do_forward, "Forward credentials [krb5]"}, - { "forwardable", 'F', arg_flag, &do_forwardable, - "Forward forwardable credentials [krb5]" }, - { NULL, 'G', arg_negative_flag,&do_forward, "Don't forward credentials" }, - { "unique", 'u', arg_flag, &do_unique_tkfile, - "Use unique remote credentials cache [krb5]" }, - { "tkfile", 'U', arg_string, &unique_tkfile, - "Specifies remote credentials cache [krb5]" }, - { "protocol", 'P', arg_string, &protocol_version_str, - "Protocol version [krb5]", "protocol" }, -#endif - { "broken", 'K', arg_flag, &use_only_broken, "Use only priv port" }, -#if defined(KRB5) - { "encrypt", 'x', arg_flag, &do_encrypt, "Encrypt connection" }, - { NULL, 'z', arg_negative_flag, &do_encrypt, - "Don't encrypt connection", NULL }, -#endif - { NULL, 'd', arg_flag, &sock_debug, "Enable socket debugging" }, - { "input", 'n', arg_negative_flag, &input, "Close stdin" }, - { "port", 'p', arg_string, &port_str, "Use this port", - "port" }, - { "user", 'l', arg_string, &user, "Run as this user", "login" }, - { "stderr", 'e', arg_negative_flag, &do_errsock, "Don't open stderr"}, -#ifdef KRB5 -#endif - { "version", 0, arg_flag, &do_version, NULL }, - { "help", 0, arg_flag, &do_help, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args) / sizeof(args[0]), - NULL, - "[login@]host [command]"); - exit (ret); -} - -/* - * - */ - -int -main(int argc, char **argv) -{ - int priv_port1, priv_port2; - int priv_socket1, priv_socket2; - int argindex = 0; - int error; - struct addrinfo hints, *ai; - int ret = 1; - char *cmd; - char *tmp; - size_t cmd_len; - const char *local_user; - char *host = NULL; - int host_index = -1; -#ifdef KRB5 - int status; -#endif - uid_t uid; - - priv_port1 = priv_port2 = IPPORT_RESERVED-1; - priv_socket1 = rresvport(&priv_port1); - priv_socket2 = rresvport(&priv_port2); - uid = getuid (); - if (setuid (uid) || (uid != 0 && setuid(0) == 0)) - err (1, "setuid"); - - setprogname (argv[0]); - - if (argc >= 2 && argv[1][0] != '-') { - host = argv[host_index = 1]; - argindex = 1; - } - - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, - &argindex)) - usage (1); - - if (do_help) - usage (0); - - if (do_version) { - print_version (NULL); - return 0; - } - -#ifdef KRB5 - if(protocol_version_str != NULL) { - if(strcasecmp(protocol_version_str, "N") == 0) - protocol_version = 2; - else if(strcasecmp(protocol_version_str, "O") == 0) - protocol_version = 1; - else { - char *end; - int v; - v = strtol(protocol_version_str, &end, 0); - if(*end != '\0' || (v != 1 && v != 2)) { - errx(1, "unknown protocol version \"%s\"", - protocol_version_str); - } - protocol_version = v; - } - } - - status = krb5_init_context (&context); - if (status) { - if(use_v5 == 1) - errx(1, "krb5_init_context failed: %d", status); - else - use_v5 = 0; - } - - /* request for forwardable on the command line means we should - also forward */ - if (do_forwardable == 1) - do_forward = 1; - -#endif - - if (use_only_broken) { -#ifdef KRB5 - use_v5 = 0; -#endif - } - - if(priv_socket1 < 0) { - if (use_only_broken) - errx (1, "unable to bind reserved port: is rsh setuid root?"); - use_broken = 0; - } - -#if defined(KRB5) - if (do_encrypt == 1 && use_only_broken) - errx (1, "encryption not supported with old style authentication"); -#endif - - - -#ifdef KRB5 - if (do_unique_tkfile && unique_tkfile != NULL) - errx (1, "Only one of -u and -U allowed."); - - if (do_unique_tkfile) - strlcpy(tkfile,"-u ", sizeof(tkfile)); - else if (unique_tkfile != NULL) { - if (strchr(unique_tkfile,' ') != NULL) { - warnx("Space is not allowed in tkfilename"); - usage(1); - } - do_unique_tkfile = 1; - snprintf (tkfile, sizeof(tkfile), "-U %s ", unique_tkfile); - } -#endif - - if (host == NULL) { - if (argc - argindex < 1) - usage (1); - else - host = argv[host_index = argindex++]; - } - - if((tmp = strchr(host, '@')) != NULL) { - *tmp++ = '\0'; - user = host; - host = tmp; - } - - if (argindex == argc) { - close (priv_socket1); - close (priv_socket2); - argv[0] = "rlogin"; - execvp ("rlogin", argv); - err (1, "execvp rlogin"); - } - - local_user = get_default_username (); - if (local_user == NULL) - errx (1, "who are you?"); - - if (user == NULL) - user = local_user; - - cmd_len = construct_command(&cmd, argc - argindex, argv + argindex); - - /* - * Try all different authentication methods - */ - -#ifdef KRB5 - if (ret && use_v5) { - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - if(port_str == NULL) { - error = getaddrinfo(host, "kshell", &hints, &ai); - if(error == EAI_NONAME) - error = getaddrinfo(host, "544", &hints, &ai); - } else - error = getaddrinfo(host, port_str, &hints, &ai); - - if(error) - errx (1, "getaddrinfo: %s", gai_strerror(error)); - - auth_method = AUTH_KRB5; - again: - ret = doit (host, ai, user, local_user, cmd, cmd_len, - send_krb5_auth); - if(ret != 0 && sendauth_version_error && - protocol_version == 2) { - protocol_version = 1; - goto again; - } - freeaddrinfo(ai); - } -#endif - if (ret && use_broken) { - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - if(port_str == NULL) { - error = getaddrinfo(host, "shell", &hints, &ai); - if(error == EAI_NONAME) - error = getaddrinfo(host, "514", &hints, &ai); - } else - error = getaddrinfo(host, port_str, &hints, &ai); - - if(error) - errx (1, "getaddrinfo: %s", gai_strerror(error)); - - auth_method = AUTH_BROKEN; - ret = doit_broken (argc, argv, host_index, ai, - user, local_user, - priv_socket1, - do_errsock ? priv_socket2 : -1, - cmd, cmd_len); - freeaddrinfo(ai); - } - free(cmd); - return ret; -} diff --git a/kerberosV/src/appl/rsh/rsh.cat1 b/kerberosV/src/appl/rsh/rsh.cat1 deleted file mode 100644 index b5cda8fc390..00000000000 --- a/kerberosV/src/appl/rsh/rsh.cat1 +++ /dev/null @@ -1,139 +0,0 @@ - -RSH(1) BSD General Commands Manual RSH(1) - -NNAAMMEE - rrsshh -- remote shell - -SSYYNNOOPPSSIISS - rrsshh [--4455FFGGKKddeeffnnuuxxzz] [--UU _s_t_r_i_n_g] [--pp _p_o_r_t] [--ll _u_s_e_r_n_a_m_e] [--PP _N_|_O] _h_o_s_t - _[_c_o_m_m_a_n_d_] - -DDEESSCCRRIIPPTTIIOONN - rrsshh authenticates to the rshd(8) daemon on the remote _h_o_s_t, and then exe- - cutes the specified _c_o_m_m_a_n_d. - - rrsshh copies its standard input to the remote command, and the standard - output and error of the remote command to its own. - - Valid options are: - - --44, ----kkrrbb44 - The --44 option requests Kerberos 4 authentication. Normally all - supported authentication mechanisms will be tried, but in some - cases more explicit control is desired. - - --55, ----kkrrbb55 - The --55 option requests Kerberos 5 authentication. This is analo- - gous to the --44 option. - - --KK, ----bbrrookkeenn - The --KK option turns off all Kerberos authentication. The security - in this mode relies on reserved ports. The long name is an indi- - cation of how good this is. - - --nn, ----nnoo--iinnppuutt - The --nn option directs the input from the _/_d_e_v_/_n_u_l_l device (see - the _B_U_G_S section of this manual page). - - --dd Enable setsockopt(2) socket debugging. - - --ee, ----nnoo--ssttddeerrrr - Don't use a separate socket for the stderr stream. This can be - necessary if rsh-ing through a NAT bridge. - - --xx, ----eennccrryypptt - The --xx option enables encryption for all data exchange. This is - only valid for Kerberos authenticated connections (see the _B_U_G_S - section for limitations). - - --zz The opposite of --xx. This is the default, and is mainly useful if - encryption has been enabled by default, for instance in the - appdefaults section of _/_e_t_c_/_k_r_b_5_._c_o_n_f when using Kerberos 5. - - --ff, ----ffoorrwwaarrdd - Forward Kerberos 5 credentials to the remote host. Also settable - via appdefaults (see krb5.conf). - - --FF, ----ffoorrwwaarrddaabbllee - Make the forwarded credentials re-forwardable. Also settable via - appdefaults (see krb5.conf). - - --ll _s_t_r_i_n_g, ----uusseerr==_s_t_r_i_n_g - By default the remote username is the same as the local. The --ll - option or the _u_s_e_r_n_a_m_e_@_h_o_s_t format allow the remote name to be - specified. - - --nn, ----nnoo--iinnppuutt - Direct input from _/_d_e_v_/_n_u_l_l (see the _B_U_G_S section). - - --pp _n_u_m_b_e_r_-_o_r_-_s_e_r_v_i_c_e, ----ppoorrtt==_n_u_m_b_e_r_-_o_r_-_s_e_r_v_i_c_e - Connect to this port instead of the default (which is 514 when - using old port based authentication, 544 for Kerberos 5 and non- - encrypted Kerberos 4, and 545 for encrytpted Kerberos 4; subject - of course to the contents of _/_e_t_c_/_s_e_r_v_i_c_e_s). - - --PP _N_|_O_|_1_|_2, ----pprroottooccooll==_N_|_O_|_1_|_2 - Specifies the protocol version to use with Kerberos 5. _N and _2 - select protocol version 2, while _O and _1 select version 1. Ver- - sion 2 is believed to be more secure, and is the default. Unless - asked for a specific version, rrsshh will try both. This behaviour - may change in the future. - - --uu, ----uunniiqquuee - Make sure the remote credentials cache is unique, that is, don't - reuse any existing cache. Mutually exclusive to --UU. - - --UU _s_t_r_i_n_g, ----ttkkffiillee==_s_t_r_i_n_g - Name of the remote credentials cache. Mutually exclusive to --uu. - - --xx, ----eennccrryypptt - The --xx option enables encryption for all data exchange. This is - only valid for Kerberos authenticated connections (see the _B_U_G_S - section for limitations). - - --zz The opposite of --xx. This is the default, but encryption can be - enabled when using Kerberos 5, by setting the libdefaults/encrypt - option in krb5.conf(5). - -EEXXAAMMPPLLEESS - Care should be taken when issuing commands containing shell meta charac- - ters. Without quoting, these will be expanded on the local machine. - - The following command: - - rsh otherhost cat remotefile > localfile - - will write the contents of the remote _r_e_m_o_t_e_f_i_l_e to the local _l_o_c_a_l_f_i_l_e, - but: - - rsh otherhost 'cat remotefile > remotefile2' - - will write it to the remote _r_e_m_o_t_e_f_i_l_e_2. - -FFIILLEESS - /etc/hosts - -SSEEEE AALLSSOO - rlogin(1), krb_realmofhost(3), krb_sendauth(3), hosts.equiv(5), - krb5.conf(5), rhosts(5), kerberos(8) rshd(8) - -HHIISSTTOORRYY - The rrsshh command appeared in 4.2BSD. - -AAUUTTHHOORRSS - This implementation of rrsshh was written as part of the Heimdal Kerberos 5 - implementation. - -BBUUGGSS - Some shells (notably csh(1)) will cause rrsshh to block if run in the back- - ground, unless the standard input is directed away from the terminal. - This is what the --nn option is for. - - The --xx options enables encryption for the session, but for both Kerberos - 4 and 5 the actual command is sent unencrypted, so you should not send - any secret information in the command line (which is probably a bad idea - anyway, since the command line can usually be read with tools like - ps(1)). Forthermore in Kerberos 4 the command is not even integrity pro- - tected, so anyone with the right tools can modify the command. - -HEIMDAL February 20, 2004 HEIMDAL diff --git a/kerberosV/src/appl/rsh/rsh_locl.h b/kerberosV/src/appl/rsh/rsh_locl.h deleted file mode 100644 index d855dfbdd36..00000000000 --- a/kerberosV/src/appl/rsh/rsh_locl.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 1997 - 2004 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: rsh_locl.h,v 1.3 2013/06/17 19:11:38 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#ifdef HAVE_PWD_H -#include -#endif -#ifdef HAVE_SHADOW_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_LIMITS_H -#include -#endif -#include - -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifdef HAVE_SYSLOG_H -#include -#endif -#ifdef HAVE_PATHS_H -#include -#endif -#include -#include -#include -#ifdef KRB5 -#include -/* XXX */ -struct hx509_certs_data; -struct krb5_pk_identity; -struct krb5_pk_cert; -struct ContentInfo; -struct AlgorithmIdentifier; -struct _krb5_krb_auth_data; -struct krb5_dh_moduli; -struct _krb5_key_data; -struct _krb5_encryption_type; -struct _krb5_key_type; -#include "crypto-headers.h" -#include /* for _krb5_{get,put}_int */ -#endif -#if defined(KRB5) -#include -#endif - -#ifndef _PATH_BSHELL -#define _PATH_BSHELL "/bin/sh" -#endif - -#ifndef _PATH_DEFPATH -#define _PATH_DEFPATH "/usr/bin:/bin" -#endif - -#include "loginpaths.h" - -/* - * - */ - -enum auth_method { AUTH_KRB5, AUTH_BROKEN }; - -extern enum auth_method auth_method; -extern int do_encrypt; -#ifdef KRB5 -extern krb5_context context; -extern krb5_keyblock *keyblock; -extern krb5_crypto crypto; -extern int key_usage; -extern void *ivec_in[2]; -extern void *ivec_out[2]; -void init_ivecs(int, int); -#endif - -#define KCMD_OLD_VERSION "KCMDV0.1" -#define KCMD_NEW_VERSION "KCMDV0.2" - -#define USERNAME_SZ 16 -#ifndef ARG_MAX -#define ARG_MAX 8192 -#endif - -#define RSH_BUFSIZ (5 * 1024) /* MIT kcmd can't handle larger buffers */ -#define RSHD_BUFSIZ (16 * 1024) /* Old maxize for Heimdal 0.4 rsh */ - -#define PATH_RSH BINDIR "/rsh" - -#if defined(KRB5) -ssize_t do_read (int, void*, size_t, void*); -ssize_t do_write (int, void*, size_t, void*); -#else -#define do_write(F, B, L, I) write((F), (B), (L)) -#define do_read(F, B, L, I) read((F), (B), (L)) -#endif diff --git a/kerberosV/src/appl/rsh/rshd.8 b/kerberosV/src/appl/rsh/rshd.8 deleted file mode 100644 index 5164e395d32..00000000000 --- a/kerberosV/src/appl/rsh/rshd.8 +++ /dev/null @@ -1,161 +0,0 @@ -.\" Copyright (c) 2001 - 2006 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: rshd.8,v 1.3 2013/06/17 19:11:38 robert Exp $ -.\" -.Dd November 22, 2002 -.Dt RSHD 8 -.Os HEIMDAL -.Sh NAME -.Nm rshd -.Nd remote shell server -.Sh SYNOPSIS -.Nm -.Op Fl aiklnvxPL -.Op Fl p Ar port -.Sh DESCRIPTION -.Nm -is the server for -the -.Xr rsh 1 -program. It provides an authenticated remote command execution -service. Supported options are: -.Bl -tag -width Ds -.It Xo -.Fl n , -.Fl Fl no-keepalive -.Xc -Disables keep-alive messages. -Keep-alives are packets sent at certain intervals to make sure that the -client is still there, even when it doesn't send any data. -.It Xo -.Fl k , -.Fl Fl kerberos -.Xc -Assume that clients connecting to this server will use some form of -Kerberos authentication. See the -.Sx EXAMPLES -section for a sample -.Xr inetd.conf 5 -configuration. -.It Xo -.Fl x , -.Fl Fl encrypt -.Xc -For Kerberos 4 this means that the connections are encrypted. Kerberos -5 can negotiate encryption even without this option, but if it's -present -.Nm -will deny unencrypted connections. This option implies -.Fl k . -.\".It Xo -.\".Fl l , -.\".Fl Fl no-rhosts -.\".Xc -.\"When using old port-based authentication, the user's -.\".Pa .rhosts -.\"files are normally checked. This option disables this. -.It Xo -.Fl v , -.Fl Fl vacuous -.Xc -If the connecting client does not use any Kerberised authentication, -print a message that complains about this fact, and exit. This is -helpful if you want to move away from old port-based authentication. -.It Xo -.Fl P -.Xc -When using the AFS filesystem, users' authentication tokens are put in -something called a PAG (Process Authentication Group). Multiple -processes can share a PAG, but normally each login session has its own -PAG. This option disables the -.Fn setpag -call, so all tokens will be put in the default (uid-based) PAG, making -it possible to share tokens between sessions. This is only useful in -peculiar environments, such as some batch systems. -.It Xo -.Fl i , -.Fl Fl no-inetd -.Xc -The -.Fl i -option will cause -.Nm -to create a socket, instead of assuming that its stdin came from -.Xr inetd 8 . -This is mostly useful for debugging. -.It Xo -.Fl p Ar port , -.Fl Fl port= Ns Ar port -.Xc -Port to use with -.Fl i . -.It Xo -.Fl a -.Xc -This flag is for backwards compatibility only. -.It Xo -.Fl L -.Xc -This flag enables logging of connections to -.Xr syslogd 8 . -This option is always on in this implementation. -.El -.\".Sh ENVIRONMENT -.Sh FILES -.Bl -tag -width /etc/hosts.equiv -compact -.It Pa /etc/hosts.equiv -.It Pa ~/.rhosts -.El -.Sh EXAMPLES -The following can be used to enable Kerberised rsh in -.Xr inetd.cond 5 , -while disabling non-Kerberised connections: -.Bd -literal -shell stream tcp nowait root /usr/libexec/rshd rshd -v -kshell stream tcp nowait root /usr/libexec/rshd rshd -k -ekshell stream tcp nowait root /usr/libexec/rshd rshd -kx -.Ed -.\".Sh DIAGNOSTICS -.Sh SEE ALSO -.Xr rsh 1 , -.Xr iruserok 3 -.\".Sh STANDARDS -.Sh HISTORY -The -.Nm -command appeared in -.Bx 4.2 . -.Sh AUTHORS -This implementation of -.Nm -was written as part of the Heimdal Kerberos 5 implementation. -.\".Sh BUGS diff --git a/kerberosV/src/appl/rsh/rshd.c b/kerberosV/src/appl/rsh/rshd.c deleted file mode 100644 index 591858685f3..00000000000 --- a/kerberosV/src/appl/rsh/rshd.c +++ /dev/null @@ -1,979 +0,0 @@ -/* - * Copyright (c) 1997-2007 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 "rsh_locl.h" -#include "login_locl.h" -RCSID("$Id: rshd.c,v 1.6 2013/06/17 19:11:38 robert Exp $"); - -int -login_access( struct passwd *user, char *from); -int -read_limits_conf(const char *file, const struct passwd *pwd); - -#ifdef NEED_IRUSEROK_PROTO -int iruserok(uint32_t, int, const char *, const char *); -#endif - -enum auth_method auth_method; - -#ifdef KRB5 -krb5_context context; -krb5_keyblock *keyblock; -krb5_crypto crypto; -#endif - -#ifdef KRB5 -krb5_ccache ccache, ccache2; -int kerberos_status = 0; -#endif - -int do_encrypt = 0; - -static int do_unique_tkfile = 0; -static char tkfile[MAXPATHLEN] = ""; - -static int do_inetd = 1; -static char *port_str; -static int do_rhosts = 1; -static int do_kerberos = 0; -#define DO_KRB5 4 -static int do_vacuous = 0; -static int do_log = 1; -static int do_newpag = 1; -static int do_addr_verify = 0; -static int do_keepalive = 1; -static int do_version; -static int do_help = 0; - -static void -syslog_and_die (const char *m, ...) - __attribute__ ((format (printf, 1, 2))); - -static void -syslog_and_die (const char *m, ...) -{ - va_list args; - - va_start(args, m); - vsyslog (LOG_ERR, m, args); - va_end(args); - exit (1); -} - -static void -fatal (int, const char*, const char *, ...) - __attribute__ ((noreturn, format (printf, 3, 4))); - -static void -fatal (int sock, const char *what, const char *m, ...) -{ - va_list args; - char buf[BUFSIZ]; - size_t len; - - *buf = 1; - va_start(args, m); - len = vsnprintf (buf + 1, sizeof(buf) - 1, m, args); - len = min(len, sizeof(buf) - 1); - va_end(args); - if(what != NULL) - syslog (LOG_ERR, "%s: %s: %s", what, strerror(errno), buf + 1); - else - syslog (LOG_ERR, "%s", buf + 1); - net_write (sock, buf, len + 1); - exit (1); -} - -static char * -read_str (int s, size_t sz, char *expl) -{ - char *str = malloc(sz); - char *p = str; - if(str == NULL) - fatal(s, NULL, "%s too long", expl); - while(p < str + sz) { - if(net_read(s, p, 1) != 1) - syslog_and_die("read: %s", strerror(errno)); - if(*p == '\0') - return str; - p++; - } - fatal(s, NULL, "%s too long", expl); -} - -static int -recv_bsd_auth (int s, u_char *buf, - struct sockaddr_in *thisaddr, - struct sockaddr_in *thataddr, - char **client_username, - char **server_username, - char **cmd) -{ - struct passwd *pwd; - - *client_username = read_str (s, USERNAME_SZ, "local username"); - *server_username = read_str (s, USERNAME_SZ, "remote username"); - *cmd = read_str (s, ARG_MAX + 1, "command"); - pwd = getpwnam(*server_username); - if (pwd == NULL) - fatal(s, NULL, "Login incorrect."); - if (iruserok(thataddr->sin_addr.s_addr, pwd->pw_uid == 0, - *client_username, *server_username)) - fatal(s, NULL, "Login incorrect."); - return 0; -} - -#ifdef KRB5 -static int -save_krb5_creds (int s, - krb5_auth_context auth_context, - krb5_principal client) - -{ - int ret; - krb5_data remote_cred; - - krb5_data_zero (&remote_cred); - ret= krb5_read_message (context, (void *)&s, &remote_cred); - if (ret) { - krb5_data_free(&remote_cred); - return 0; - } - if (remote_cred.length == 0) - return 0; - - ret = krb5_cc_new_unique(context, krb5_cc_type_memory, NULL, &ccache); - if (ret) { - krb5_data_free(&remote_cred); - return 0; - } - - krb5_cc_initialize(context,ccache,client); - ret = krb5_rd_cred2(context, auth_context, ccache, &remote_cred); - if(ret != 0) - syslog(LOG_INFO|LOG_AUTH, - "reading creds: %s", krb5_get_err_text(context, ret)); - krb5_data_free (&remote_cred); - if (ret) - return 0; - return 1; -} - -static void -krb5_start_session (void) -{ - krb5_error_code ret; - char *estr; - - ret = krb5_cc_resolve (context, tkfile, &ccache2); - if (ret) { - estr = krb5_get_error_string(context); - syslog(LOG_WARNING, "resolve cred cache %s: %s", - tkfile, - estr ? estr : krb5_get_err_text(context, ret)); - free(estr); - krb5_cc_destroy(context, ccache); - return; - } - - ret = krb5_cc_copy_cache (context, ccache, ccache2); - if (ret) { - estr = krb5_get_error_string(context); - syslog(LOG_WARNING, "storing credentials: %s", - estr ? estr : krb5_get_err_text(context, ret)); - free(estr); - krb5_cc_destroy(context, ccache); - return ; - } - - krb5_cc_close(context, ccache2); - krb5_cc_destroy(context, ccache); - return; -} - -static int protocol_version; - -static krb5_boolean -match_kcmd_version(const void *data, const char *version) -{ - if(strcmp(version, KCMD_NEW_VERSION) == 0) { - protocol_version = 2; - return TRUE; - } - if(strcmp(version, KCMD_OLD_VERSION) == 0) { - protocol_version = 1; - key_usage = KRB5_KU_OTHER_ENCRYPTED; - return TRUE; - } - return FALSE; -} - - -static int -recv_krb5_auth (int s, u_char *buf, - struct sockaddr *thisaddr, - struct sockaddr *thataddr, - char **client_username, - char **server_username, - char **cmd) -{ - uint32_t len; - krb5_auth_context auth_context = NULL; - krb5_ticket *ticket; - krb5_error_code status; - krb5_data cksum_data; - krb5_principal server; - char *str; - - if (memcmp (buf, "\x00\x00\x00\x13", 4) != 0) - return -1; - len = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | (buf[3]); - - if (net_read(s, buf, len) != len) - syslog_and_die ("reading auth info: %s", strerror(errno)); - if (len != sizeof(KRB5_SENDAUTH_VERSION) - || memcmp (buf, KRB5_SENDAUTH_VERSION, len) != 0) - syslog_and_die ("bad sendauth version: %.8s", buf); - - status = krb5_sock_to_principal (context, - s, - "host", - KRB5_NT_SRV_HST, - &server); - if (status) - syslog_and_die ("krb5_sock_to_principal: %s", - krb5_get_err_text(context, status)); - - status = krb5_recvauth_match_version(context, - &auth_context, - &s, - match_kcmd_version, - NULL, - server, - KRB5_RECVAUTH_IGNORE_VERSION, - NULL, - &ticket); - krb5_free_principal (context, server); - if (status) - syslog_and_die ("krb5_recvauth: %s", - krb5_get_err_text(context, status)); - - *server_username = read_str (s, USERNAME_SZ, "remote username"); - *cmd = read_str (s, ARG_MAX + 1, "command"); - *client_username = read_str (s, ARG_MAX + 1, "local username"); - - if(protocol_version == 2) { - status = krb5_auth_con_getremotesubkey(context, auth_context, - &keyblock); - if(status != 0 || keyblock == NULL) - syslog_and_die("failed to get remote subkey"); - } else if(protocol_version == 1) { - status = krb5_auth_con_getkey (context, auth_context, &keyblock); - if(status != 0 || keyblock == NULL) - syslog_and_die("failed to get key"); - } - if (status != 0 || keyblock == NULL) - syslog_and_die ("krb5_auth_con_getkey: %s", - krb5_get_err_text(context, status)); - - status = krb5_crypto_init(context, keyblock, 0, &crypto); - if(status) - syslog_and_die("krb5_crypto_init: %s", - krb5_get_err_text(context, status)); - - - cksum_data.length = asprintf (&str, - "%u:%s%s", - ntohs(socket_get_port (thisaddr)), - *cmd, - *server_username); - if (str == NULL) - syslog_and_die ("asprintf: out of memory"); - cksum_data.data = str; - - status = krb5_verify_authenticator_checksum(context, - auth_context, - cksum_data.data, - cksum_data.length); - - if (status) - syslog_and_die ("krb5_verify_authenticator_checksum: %s", - krb5_get_err_text(context, status)); - - free (cksum_data.data); - - if (strncmp (*client_username, "-u ", 3) == 0) { - do_unique_tkfile = 1; - memmove (*client_username, *client_username + 3, - strlen(*client_username) - 2); - } - - if (strncmp (*client_username, "-U ", 3) == 0) { - char *end, *temp_tkfile; - - do_unique_tkfile = 1; - if (strncmp (*client_username + 3, "FILE:", 5) == 0) { - temp_tkfile = tkfile; - } else { - strlcpy (tkfile, "FILE:", sizeof(tkfile)); - temp_tkfile = tkfile + 5; - } - end = strchr(*client_username + 3,' '); - if (end == NULL) - syslog_and_die("missing argument after -U"); - snprintf(temp_tkfile, sizeof(tkfile) - (temp_tkfile - tkfile), - "%.*s", - (int)(end - *client_username - 3), - *client_username + 3); - memmove (*client_username, end + 1, strlen(end+1)+1); - } - - kerberos_status = save_krb5_creds (s, auth_context, ticket->client); - - if(!krb5_kuserok (context, - ticket->client, - *server_username)) - fatal (s, NULL, "Permission denied."); - - if (strncmp (*cmd, "-x ", 3) == 0) { - do_encrypt = 1; - memmove (*cmd, *cmd + 3, strlen(*cmd) - 2); - } else { - if(do_encrypt) - fatal (s, NULL, "Encryption is required."); - do_encrypt = 0; - } - - { - char *name; - - if (krb5_unparse_name (context, ticket->client, &name) == 0) { - char addr_str[256]; - - if (inet_ntop (thataddr->sa_family, - socket_get_address (thataddr), - addr_str, sizeof(addr_str)) == NULL) - strlcpy (addr_str, "unknown address", - sizeof(addr_str)); - - syslog(LOG_INFO|LOG_AUTH, - "kerberos v5 shell from %s on %s as %s, cmd '%.80s'", - name, - addr_str, - *server_username, - *cmd); - free (name); - } - } - - krb5_auth_con_free(context, auth_context); - - return 0; -} -#endif /* KRB5 */ - -static void -rshd_loop (int from0, int to0, - int to1, int from1, - int to2, int from2, - int have_errsock) -{ - fd_set real_readset; - int max_fd; - int count = 2; - char *buf; - - if(from0 >= FD_SETSIZE || from1 >= FD_SETSIZE || from2 >= FD_SETSIZE) - errx (1, "fd too large"); - -#ifdef KRB5 - if(auth_method == AUTH_KRB5 && protocol_version == 2) - init_ivecs(0, have_errsock); -#endif - - FD_ZERO(&real_readset); - FD_SET(from0, &real_readset); - FD_SET(from1, &real_readset); - FD_SET(from2, &real_readset); - max_fd = max(from0, max(from1, from2)) + 1; - - buf = malloc(max(RSHD_BUFSIZ, RSH_BUFSIZ)); - if (buf == NULL) - syslog_and_die("out of memory"); - - for (;;) { - int ret; - fd_set readset = real_readset; - - ret = select (max_fd, &readset, NULL, NULL, NULL); - if (ret < 0) { - if (errno == EINTR) - continue; - else - syslog_and_die ("select: %s", strerror(errno)); - } - if (FD_ISSET(from0, &readset)) { - ret = do_read (from0, buf, RSHD_BUFSIZ, ivec_in[0]); - if (ret < 0) - syslog_and_die ("read: %s", strerror(errno)); - else if (ret == 0) { - close (from0); - close (to0); - FD_CLR(from0, &real_readset); - } else - net_write (to0, buf, ret); - } - if (FD_ISSET(from1, &readset)) { - ret = read (from1, buf, RSH_BUFSIZ); - if (ret < 0) - syslog_and_die ("read: %s", strerror(errno)); - else if (ret == 0) { - close (from1); - close (to1); - FD_CLR(from1, &real_readset); - if (--count == 0) - exit (0); - } else - do_write (to1, buf, ret, ivec_out[0]); - } - if (FD_ISSET(from2, &readset)) { - ret = read (from2, buf, RSH_BUFSIZ); - if (ret < 0) - syslog_and_die ("read: %s", strerror(errno)); - else if (ret == 0) { - close (from2); - close (to2); - FD_CLR(from2, &real_readset); - if (--count == 0) - exit (0); - } else - do_write (to2, buf, ret, ivec_out[1]); - } - } -} - -/* - * Used by `setup_copier' to create some pipe-like means of - * communcation. Real pipes would probably be the best thing, but - * then the shell doesn't understand it's talking to rshd. If - * socketpair doesn't work everywhere, some autoconf magic would have - * to be added here. - * - * If it fails creating the `pipe', it aborts by calling fatal. - */ - -static void -pipe_a_like (int fd[2]) -{ - if (socketpair (AF_UNIX, SOCK_STREAM, 0, fd) < 0) - fatal (STDOUT_FILENO, "socketpair", "Pipe creation failed."); -} - -/* - * Start a child process and leave the parent copying data to and from it. */ - -static void -setup_copier (int have_errsock) -{ - int p0[2], p1[2], p2[2]; - pid_t pid; - - pipe_a_like(p0); - pipe_a_like(p1); - pipe_a_like(p2); - pid = fork (); - if (pid < 0) - fatal (STDOUT_FILENO, "fork", "Could not create child process."); - if (pid == 0) { /* child */ - close (p0[1]); - close (p1[0]); - close (p2[0]); - dup2 (p0[0], STDIN_FILENO); - dup2 (p1[1], STDOUT_FILENO); - dup2 (p2[1], STDERR_FILENO); - close (p0[0]); - close (p1[1]); - close (p2[1]); - } else { /* parent */ - close (p0[0]); - close (p1[1]); - close (p2[1]); - - if (net_write (STDOUT_FILENO, "", 1) != 1) - fatal (STDOUT_FILENO, "net_write", "Write failure."); - - rshd_loop (STDIN_FILENO, p0[1], - STDOUT_FILENO, p1[0], - STDERR_FILENO, p2[0], - have_errsock); - } -} - -/* - * Is `port' a ``reserverd'' port? - */ - -static int -is_reserved(u_short port) -{ - return ntohs(port) < IPPORT_RESERVED; -} - -/* - * Set the necessary part of the environment in `env'. - */ - -static void -setup_environment (char ***env, const struct passwd *pwd) -{ - int i, j, path; - char **e; - - i = 0; - path = 0; - *env = NULL; - - i = read_environment(_PATH_ETC_ENVIRONMENT, env); - e = *env; - for (j = 0; j < i; j++) { - if (!strncmp(e[j], "PATH=", 5)) { - path = 1; - } - } - - e = *env; - e = realloc(e, (i + 7) * sizeof(char *)); - - if (asprintf (&e[i++], "USER=%s", pwd->pw_name) == -1) - syslog_and_die ("asprintf: out of memory"); - if (asprintf (&e[i++], "HOME=%s", pwd->pw_dir) == -1) - syslog_and_die ("asprintf: out of memory"); - if (asprintf (&e[i++], "SHELL=%s", pwd->pw_shell) == -1) - syslog_and_die ("asprintf: out of memory"); - if (! path) { - if (asprintf (&e[i++], "PATH=%s", _PATH_DEFPATH) == -1) - syslog_and_die ("asprintf: out of memory"); - } - asprintf (&e[i++], "SSH_CLIENT=only_to_make_bash_happy"); - if (do_unique_tkfile) - if (asprintf (&e[i++], "KRB5CCNAME=%s", tkfile) == -1) - syslog_and_die ("asprintf: out of memory"); - e[i++] = NULL; - *env = e; -} - -static void -doit (void) -{ - u_char buf[BUFSIZ]; - u_char *p; - struct sockaddr_storage thisaddr_ss; - struct sockaddr *thisaddr = (struct sockaddr *)&thisaddr_ss; - struct sockaddr_storage thataddr_ss; - struct sockaddr *thataddr = (struct sockaddr *)&thataddr_ss; - struct sockaddr_storage erraddr_ss; - struct sockaddr *erraddr = (struct sockaddr *)&erraddr_ss; - socklen_t thisaddr_len, thataddr_len; - int port; - int errsock = -1; - char *client_user = NULL, *server_user = NULL, *cmd = NULL; - struct passwd *pwd; - int s = STDIN_FILENO; - char **env; - int ret; - char that_host[NI_MAXHOST]; - - thisaddr_len = sizeof(thisaddr_ss); - if (getsockname (s, thisaddr, &thisaddr_len) < 0) - syslog_and_die("getsockname: %s", strerror(errno)); - thataddr_len = sizeof(thataddr_ss); - if (getpeername (s, thataddr, &thataddr_len) < 0) - syslog_and_die ("getpeername: %s", strerror(errno)); - - /* check for V4MAPPED addresses? */ - - if (do_kerberos == 0 && !is_reserved(socket_get_port(thataddr))) - fatal(s, NULL, "Permission denied."); - - p = buf; - port = 0; - for(;;) { - if (net_read (s, p, 1) != 1) - syslog_and_die ("reading port number: %s", strerror(errno)); - if (*p == '\0') - break; - else if (isdigit(*p)) - port = port * 10 + *p - '0'; - else - syslog_and_die ("non-digit in port number: %c", *p); - } - - if (do_kerberos == 0 && !is_reserved(htons(port))) - fatal(s, NULL, "Permission denied."); - - if (port) { - int priv_port = IPPORT_RESERVED - 1; - - /* - * There's no reason to require a ``privileged'' port number - * here, but for some reason the brain dead rsh clients - * do... :-( - */ - - erraddr->sa_family = thataddr->sa_family; - socket_set_address_and_port (erraddr, - socket_get_address (thataddr), - htons(port)); - - /* - * we only do reserved port for IPv4 - */ - - if (erraddr->sa_family == AF_INET) - errsock = rresvport (&priv_port); - else - errsock = socket (erraddr->sa_family, SOCK_STREAM, 0); - if (errsock < 0) - syslog_and_die ("socket: %s", strerror(errno)); - if (connect (errsock, - erraddr, - socket_sockaddr_size (erraddr)) < 0) { - syslog (LOG_WARNING, "connect: %s", strerror(errno)); - close (errsock); - } - } - - if(do_kerberos) { - if (net_read (s, buf, 4) != 4) - syslog_and_die ("reading auth info: %s", strerror(errno)); - -#ifdef KRB5 - if((do_kerberos & DO_KRB5) && - recv_krb5_auth (s, buf, thisaddr, thataddr, - &client_user, - &server_user, - &cmd) == 0) - auth_method = AUTH_KRB5; - else -#endif /* KRB5 */ - syslog_and_die ("unrecognized auth protocol: %x %x %x %x", - buf[0], buf[1], buf[2], buf[3]); - } else { - if(recv_bsd_auth (s, buf, - (struct sockaddr_in *)thisaddr, - (struct sockaddr_in *)thataddr, - &client_user, - &server_user, - &cmd) == 0) { - auth_method = AUTH_BROKEN; - if(do_vacuous) { - printf("Remote host requires Kerberos authentication\n"); - exit(0); - } - } else - syslog_and_die("recv_bsd_auth failed"); - } - - if (client_user == NULL || server_user == NULL || cmd == NULL) - syslog_and_die("mising client/server/cmd"); - - pwd = getpwnam (server_user); - if (pwd == NULL) - fatal (s, NULL, "Login incorrect."); - - if (*pwd->pw_shell == '\0') - pwd->pw_shell = _PATH_BSHELL; - - if (pwd->pw_uid != 0 && access (_PATH_NOLOGIN, F_OK) == 0) - fatal (s, NULL, "Login disabled."); - - - ret = getnameinfo_verified (thataddr, thataddr_len, - that_host, sizeof(that_host), - NULL, 0, 0); - if (ret) - fatal (s, NULL, "getnameinfo: %s", gai_strerror(ret)); - - if (login_access(pwd, that_host) == 0) { - syslog(LOG_NOTICE, "Kerberos rsh denied to %s from %s", - server_user, that_host); - fatal(s, NULL, "Permission denied."); - } - -#ifdef HAVE_GETSPNAM - { - struct spwd *sp; - long today; - - sp = getspnam(server_user); - if (sp != NULL) { - today = time(0)/(24L * 60 * 60); - if (sp->sp_expire > 0) - if (today > sp->sp_expire) - fatal(s, NULL, "Account has expired."); - } - } -#endif - - -#ifdef HAVE_SETLOGIN - if (setlogin(pwd->pw_name) < 0) - syslog(LOG_ERR, "setlogin() failed: %s", strerror(errno)); -#endif - -#ifdef HAVE_SETPCRED - if (setpcred (pwd->pw_name, NULL) == -1) - syslog(LOG_ERR, "setpcred() failure: %s", strerror(errno)); -#endif /* HAVE_SETPCRED */ - - /* Apply limits if not root */ - if(pwd->pw_uid != 0) { - const char *file = _PATH_LIMITS_CONF; - read_limits_conf(file, pwd); - } - - if (initgroups (pwd->pw_name, pwd->pw_gid) < 0) - fatal (s, "initgroups", "Login incorrect."); - - if (setgid(pwd->pw_gid) < 0) - fatal (s, "setgid", "Login incorrect."); - - if (setuid (pwd->pw_uid) < 0) - fatal (s, "setuid", "Login incorrect."); - - if (chdir (pwd->pw_dir) < 0) - fatal (s, "chdir", "Remote directory."); - - if (errsock >= 0) { - if (dup2 (errsock, STDERR_FILENO) < 0) - fatal (s, "dup2", "Cannot dup stderr."); - close (errsock); - } else { - if (dup2 (STDOUT_FILENO, STDERR_FILENO) < 0) - fatal (s, "dup2", "Cannot dup stderr."); - } - -#ifdef KRB5 - { - int fd; - - if (!do_unique_tkfile) - snprintf(tkfile,sizeof(tkfile),"FILE:/tmp/krb5cc_%lu", - (unsigned long)pwd->pw_uid); - else if (*tkfile=='\0') { - snprintf(tkfile,sizeof(tkfile),"FILE:/tmp/krb5cc_XXXXXX"); - fd = mkstemp(tkfile+5); - close(fd); - unlink(tkfile+5); - } - - if (kerberos_status) - krb5_start_session(); - } -#endif - - setup_environment (&env, pwd); - - if (do_encrypt) { - setup_copier (errsock >= 0); - } else { - if (net_write (s, "", 1) != 1) - fatal (s, "net_write", "write failed"); - } - -#if defined(KRB5) - if(k_hasafs()) { - char cell[64]; - - if(do_newpag) - k_setpag(); - - /* XXX */ - if (kerberos_status) { - krb5_ccache ccache; - krb5_error_code status; - - status = krb5_cc_resolve (context, tkfile, &ccache); - if (!status) { - if (k_afs_cell_of_file (pwd->pw_dir, cell, sizeof(cell)) == 0) - krb5_afslog_uid_home(context, ccache, cell, NULL, - pwd->pw_uid, pwd->pw_dir); - krb5_afslog_uid_home(context, ccache, NULL, NULL, - pwd->pw_uid, pwd->pw_dir); - krb5_cc_close (context, ccache); - } - } - } -#endif /* KRB5 */ - execle (pwd->pw_shell, pwd->pw_shell, "-c", cmd, NULL, env); - err(1, "exec %s", pwd->pw_shell); -} - -struct getargs args[] = { - { NULL, 'a', arg_flag, &do_addr_verify }, - { "keepalive", 'n', arg_negative_flag, &do_keepalive }, - { "inetd", 'i', arg_negative_flag, &do_inetd, - "Not started from inetd" }, -#if defined(KRB5) - { "kerberos", 'k', arg_flag, &do_kerberos, - "Implement kerberised services" }, - { "encrypt", 'x', arg_flag, &do_encrypt, - "Implement encrypted service" }, -#endif - { "rhosts", 'l', arg_negative_flag, &do_rhosts, - "Don't check users .rhosts" }, - { "port", 'p', arg_string, &port_str, "Use this port", - "port" }, - { "vacuous", 'v', arg_flag, &do_vacuous, - "Don't accept non-kerberised connections" }, -#if defined(KRB5) - { NULL, 'P', arg_negative_flag, &do_newpag, - "Don't put process in new PAG" }, -#endif - /* compatibility flag: */ - { NULL, 'L', arg_flag, &do_log }, - { "version", 0, arg_flag, &do_version }, - { "help", 0, arg_flag, &do_help } -}; - -static void -usage (int ret) -{ - if(isatty(STDIN_FILENO)) - arg_printusage (args, - sizeof(args) / sizeof(args[0]), - NULL, - ""); - else - syslog (LOG_ERR, "Usage: %s [-ikxlvPL] [-p port]", getprogname()); - exit (ret); -} - - -int -main(int argc, char **argv) -{ - int optind = 0; - int on = 1; - - setprogname (argv[0]); - roken_openlog ("rshd", LOG_ODELAY | LOG_PID, LOG_AUTH); - - if (getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, - &optind)) - usage(1); - - if(do_help) - usage (0); - - if (do_version) { - print_version(NULL); - exit(0); - } - -#if defined(KRB5) - if (do_encrypt) - do_kerberos = 1; - - if(do_kerberos) - do_kerberos = DO_KRB5; -#endif - -#ifdef KRB5 - if((do_kerberos & DO_KRB5) && krb5_init_context (&context) != 0) - do_kerberos &= ~DO_KRB5; -#endif - - if (!do_inetd) { - int error; - struct addrinfo *ai = NULL, hints; - char portstr[NI_MAXSERV]; - - memset (&hints, 0, sizeof(hints)); - hints.ai_flags = AI_PASSIVE; - hints.ai_socktype = SOCK_STREAM; - hints.ai_family = PF_UNSPEC; - - if(port_str != NULL) { - error = getaddrinfo (NULL, port_str, &hints, &ai); - if (error) - errx (1, "getaddrinfo: %s", gai_strerror (error)); - } - if (ai == NULL) { -#if defined(KRB5) - if (do_kerberos) { - if (do_encrypt) { - error = getaddrinfo(NULL, "ekshell", &hints, &ai); - if(error == EAI_NONAME) { - snprintf(portstr, sizeof(portstr), "%d", 545); - error = getaddrinfo(NULL, portstr, &hints, &ai); - } - if(error) - errx (1, "getaddrinfo: %s", gai_strerror (error)); - } else { - error = getaddrinfo(NULL, "kshell", &hints, &ai); - if(error == EAI_NONAME) { - snprintf(portstr, sizeof(portstr), "%d", 544); - error = getaddrinfo(NULL, portstr, &hints, &ai); - } - if(error) - errx (1, "getaddrinfo: %s", gai_strerror (error)); - } - } else -#endif - { - error = getaddrinfo(NULL, "shell", &hints, &ai); - if(error == EAI_NONAME) { - snprintf(portstr, sizeof(portstr), "%d", 514); - error = getaddrinfo(NULL, portstr, &hints, &ai); - } - if(error) - errx (1, "getaddrinfo: %s", gai_strerror (error)); - } - } - mini_inetd_addrinfo (ai, NULL); - freeaddrinfo(ai); - } - - if (do_keepalive && - setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, (char *)&on, - sizeof(on)) < 0) - syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %s", strerror(errno)); - - /* set SO_LINGER? */ - - signal (SIGPIPE, SIG_IGN); - - doit (); - return 0; -} diff --git a/kerberosV/src/appl/rsh/rshd.cat8 b/kerberosV/src/appl/rsh/rshd.cat8 deleted file mode 100644 index 571a0122e95..00000000000 --- a/kerberosV/src/appl/rsh/rshd.cat8 +++ /dev/null @@ -1,79 +0,0 @@ - -RSHD(8) BSD System Manager's Manual RSHD(8) - -NNAAMMEE - rrsshhdd -- remote shell server - -SSYYNNOOPPSSIISS - rrsshhdd [--aaiikkllnnvvxxPPLL] [--pp _p_o_r_t] - -DDEESSCCRRIIPPTTIIOONN - rrsshhdd is the server for the rsh(1) program. It provides an authenticated - remote command execution service. Supported options are: - - --nn, ----nnoo--kkeeeeppaalliivvee - Disables keep-alive messages. Keep-alives are packets sent at - certain intervals to make sure that the client is still there, - even when it doesn't send any data. - - --kk, ----kkeerrbbeerrooss - Assume that clients connecting to this server will use some form - of Kerberos authentication. See the _E_X_A_M_P_L_E_S section for a sample - inetd.conf(5) configuration. - - --xx, ----eennccrryypptt - For Kerberos 4 this means that the connections are encrypted. - Kerberos 5 can negotiate encryption even without this option, but - if it's present rrsshhdd will deny unencrypted connections. This - option implies --kk. - - --vv, ----vvaaccuuoouuss - If the connecting client does not use any Kerberised authentica- - tion, print a message that complains about this fact, and exit. - This is helpful if you want to move away from old port-based - authentication. - - --PP When using the AFS filesystem, users' authentication tokens are - put in something called a PAG (Process Authentication Group). - Multiple processes can share a PAG, but normally each login ses- - sion has its own PAG. This option disables the sseettppaagg() call, so - all tokens will be put in the default (uid-based) PAG, making it - possible to share tokens between sessions. This is only useful in - peculiar environments, such as some batch systems. - - --ii, ----nnoo--iinneettdd - The --ii option will cause rrsshhdd to create a socket, instead of - assuming that its stdin came from inetd(8). This is mostly use- - ful for debugging. - - --pp _p_o_r_t, ----ppoorrtt==_p_o_r_t - Port to use with --ii. - - --aa This flag is for backwards compatibility only. - - --LL This flag enables logging of connections to syslogd(8). This - option is always on in this implementation. - -FFIILLEESS - /etc/hosts.equiv - ~/.rhosts - -EEXXAAMMPPLLEESS - The following can be used to enable Kerberised rsh in inetd.cond(5), - while disabling non-Kerberised connections: - - shell stream tcp nowait root /usr/libexec/rshd rshd -v - kshell stream tcp nowait root /usr/libexec/rshd rshd -k - ekshell stream tcp nowait root /usr/libexec/rshd rshd -kx - -SSEEEE AALLSSOO - rsh(1), iruserok(3) - -HHIISSTTOORRYY - The rrsshhdd command appeared in 4.2BSD. - -AAUUTTHHOORRSS - This implementation of rrsshhdd was written as part of the Heimdal Kerberos 5 - implementation. - -HEIMDAL November 22, 2002 HEIMDAL diff --git a/kerberosV/src/appl/su/ChangeLog b/kerberosV/src/appl/su/ChangeLog deleted file mode 100644 index 6e2e569265f..00000000000 --- a/kerberosV/src/appl/su/ChangeLog +++ /dev/null @@ -1,129 +0,0 @@ -2008-07-15 Love Hörnquist Åstrand - - * Makefile.am: no krb4 - - * su.c: Drop kerberos 4 support. - -2007-10-19 Love Hörnquist Åstrand - - * su.c: read environment from _PATH_ETC_ENVIRONMENT - - * supaths.c: paths - -2007-08-02 Love Hörnquist Åstrand - - * su.c: Check all local realms when su-ing, from Magnus Holmberg. - -2007-06-19 Love Hörnquist Åstrand - - * su.c: If not root and not setuid, print warning. - -2006-01-17 Love Hörnquist Åstrand - - * su.c (group_member_p): rename from group_member to avoid name - pollution from glibc headers. Fixed based on report from David Love. - -2006-01-12 Johan Danielsson - - * su.c: fix reversed logic when deciding to print tty or not - -2005-10-22 Love Hörnquist Åstrand - - * su.c: Check return value from asprintf instead of string != NULL - since it undefined behavior on Linux. From Björn Sandell - -2005-05-10 Dave Love - - * su.c: Include . - -2003-09-03 Love Hörnquist Åstrand - - * su.c: s/des_read_pw_string/UI_UTIL_read_pw_string/ - -2003-05-06 Johan Danielsson - - * su.c: remove accidentally committed code that prints the command - being executed - -2003-03-18 Love Hörnquist Åstrand - - * su.c (krb5_start_session): krb5_afslog doesn't depend on KRB4 - any more - -2002-02-19 Johan Danielsson - - * su.c: make this build without krb5 - -2002-01-09 Jacques Vidrine - - * su.c: Don't use getlogin() to determine whether we are root. - Patch by joda. - -2001-06-12 Assar Westerlund - - * su.c: check memory allocations. add some const - -2000-12-31 Assar Westerlund - - * su.c (krb5_verify): handle krb5_init_context failure - consistently - -2000-08-28 Johan Danielsson - - * su.c: set KRBTKFILE - -2000-07-10 Assar Westerlund - - * Makefile.am: actually install su - * su.c (krb5_verify): try harder freeing. do not get upset on - interrupted password read - -2000-06-09 Assar Westerlund - - * su.c (main): work-around for setuid and capabilities bug fixed - in Linux 2.2.16 - -2000-06-03 Assar Westerlund - - * su.c (main): just ignore shadow information if getspnam returns - NULL - -1999-10-20 Assar Westerlund - - * Makefile.am: use LIB_roken - -1999-09-28 Assar Westerlund - - * su.c (krb5_verify): use krb5_verify_user_lrealm - -1999-08-04 Assar Westerlund - - * su.c: add support for shadow passwords and rewrite some logic. - From Miroslav Ruda - - * Makefile.am: add libkafs - -1999-06-15 Assar Westerlund - - * su.c (main): conditionalize `getlogin' - -1999-05-11 Assar Westerlund - - * su.c (verfiy_krb5): get the name out of the ccache before - closing it - -1999-05-05 Assar Westerlund - - * su.c: some more error checking - -Wed Apr 21 21:04:36 1999 Assar Westerlund - - * su.c (-f): implement - - * su.c: implement -i - (verify_krb5): correct the ownership on the credential cache - -Tue Apr 20 13:26:13 1999 Johan Danielsson - - * su.c: don't depend on paths.h - diff --git a/kerberosV/src/appl/su/Makefile.am b/kerberosV/src/appl/su/Makefile.am deleted file mode 100644 index b4351b5b5d1..00000000000 --- a/kerberosV/src/appl/su/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:40 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(INCLUDE_krb4) $(INCLUDE_hcrypto) - -bin_PROGRAMS = su -bin_SUIDS = su -su_SOURCES = su.c supaths.h -man_MANS = su.1 - -LDADD = $(LIB_kafs) \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) diff --git a/kerberosV/src/appl/su/Makefile.in b/kerberosV/src/appl/su/Makefile.in deleted file mode 100644 index a0ec7e4ea23..00000000000 --- a/kerberosV/src/appl/su/Makefile.in +++ /dev/null @@ -1,957 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -bin_PROGRAMS = su$(EXEEXT) -subdir = appl/su -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -PROGRAMS = $(bin_PROGRAMS) -am_su_OBJECTS = su.$(OBJEXT) -su_OBJECTS = $(am_su_OBJECTS) -su_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/lib/kafs/libkafs.la \ - $(am__DEPENDENCIES_1) -su_DEPENDENCIES = $(am__DEPENDENCIES_2) \ - $(top_builddir)/lib/krb5/libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(su_SOURCES) -DIST_SOURCES = $(su_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(INCLUDE_krb4) $(INCLUDE_hcrypto) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -bin_SUIDS = su -su_SOURCES = su.c supaths.h -man_MANS = su.1 -LDADD = $(LIB_kafs) \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/su/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/su/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -su$(EXEEXT): $(su_OBJECTS) $(su_DEPENDENCIES) - @rm -f su$(EXEEXT) - $(LINK) $(su_OBJECTS) $(su_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-hook \ - uninstall-man uninstall-man1 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/su/NTMakefile b/kerberosV/src/appl/su/NTMakefile deleted file mode 100644 index 7afe814fa65..00000000000 --- a/kerberosV/src/appl/su/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\su - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/su/su.1 b/kerberosV/src/appl/su/su.1 deleted file mode 100644 index ea362e3bd49..00000000000 --- a/kerberosV/src/appl/su/su.1 +++ /dev/null @@ -1,123 +0,0 @@ -.\" Copyright (c) 2003 - 2006 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: su.1,v 1.2 2013/06/17 18:57:40 robert Exp $ -.\" -.Dd January 12, 2006 -.Dt SU 1 -.Os HEIMDAL -.Sh NAME -.Nm su -.Nd substitute user identity -.Sh SYNOPSIS -.Nm su -.Op Fl K | Fl Fl no-kerberos -.Op Fl f -.Op Fl l | Fl Fl full -.Op Fl m -.Oo Fl i Ar instance \*(Ba Xo -.Fl Fl instance= Ns Ar instance -.Xc -.Oc -.Oo Fl c Ar command \*(Ba Xo -.Fl Fl command= Ns Ar command -.Xc -.Oc -.Op Ar login Op Ar "shell arguments" -.Sh DESCRIPTION -.Nm su -will use Kerberos authentication provided that an instance for the -user wanting to change effective UID is present in a file named -.Pa .k5login -in the target user id's home directory -.Pp -A special case exists where -.Ql root Ap s -.Pa ~/.k5login -needs to contain an entry for: -.Ql user Ns / Ns Ao instance Ac Ns @ Ns REALM -for -.Nm su -to succed (where -.Aq instance -is -.Ql root -unless changed with -.Fl i ) . -.Pp -In the absence of either an entry for current user in said file or -other problems like missing -.Ql host/hostname@REALM -keys in the system's -keytab, or user typing the wrong password, -.Nm su -will fall back to traditional -.Pa /etc/passwd -authentication. -.Pp -When using -.Pa /etc/passwd -authentication, -.Nm su -allows -.Ql root -access only to members of the group -.Ql wheel , -or to any user (with knowledge of the -.Ql root -password) if that group -does not exist, or has no members. -.Pp -The options are as follows: -.Bl -item -width Ds -.It -.Fl K , -.Fl Fl no-kerberos -don't use Kerberos. -.It -.Fl f -don't read .cshrc. -.It -.Fl l , -.Fl Fl full -simulate full login. -.It -.Fl m -leave environment unmodified. -.It -.Fl i Ar instance , -.Fl Fl instance= Ns Ar instance -root instance to use. -.It -.Fl c Ar command , -.Fl Fl command= Ns Ar command -command to execute. -.El diff --git a/kerberosV/src/appl/su/su.c b/kerberosV/src/appl/su/su.c deleted file mode 100644 index 800e7b2745d..00000000000 --- a/kerberosV/src/appl/su/su.c +++ /dev/null @@ -1,526 +0,0 @@ -/* - * Copyright (c) 1999 - 2008 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 - -RCSID("$Id: su.c,v 1.5 2013/06/17 18:57:40 robert Exp $"); - -#include -#include -#include - -#include - -#ifdef HAVE_PATHS_H -#include -#endif - -#ifdef HAVE_SHADOW_H -#include -#endif - -#include -#ifdef HAVE_CRYPT_H -#include -#endif - -#include "crypto-headers.h" -#ifdef KRB5 -#include -#endif -#include -#include -#include -#include - -#include "supaths.h" - -#if !HAVE_DECL_ENVIRON -extern char **environ; -#endif - -int kerberos_flag = 1; -int csh_f_flag; -int full_login; -int env_flag; -char *kerberos_instance = "root"; -int help_flag; -int version_flag; -char *cmd; -char tkfile[256]; - -struct getargs args[] = { - { "kerberos", 'K', arg_negative_flag, &kerberos_flag, - "don't use kerberos" }, - { NULL, 'f', arg_flag, &csh_f_flag, - "don't read .cshrc" }, - { "full", 'l', arg_flag, &full_login, - "simulate full login" }, - { NULL, 'm', arg_flag, &env_flag, - "leave environment unmodified" }, - { "instance", 'i', arg_string, &kerberos_instance, - "root instance to use" }, - { "command", 'c', arg_string, &cmd, - "command to execute" }, - { "help", 'h', arg_flag, &help_flag }, - { "version", 0, arg_flag, &version_flag }, -}; - - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - "[login [shell arguments]]"); - exit (ret); -} - -static void -free_info(struct passwd *p) -{ - free (p->pw_name); - free (p->pw_passwd); - free (p->pw_dir); - free (p->pw_shell); - free (p); -} - -static struct passwd* -dup_info(const struct passwd *pwd) -{ - struct passwd *info; - - info = malloc(sizeof(*info)); - if(info == NULL) - return NULL; - info->pw_name = strdup(pwd->pw_name); - info->pw_passwd = strdup(pwd->pw_passwd); - info->pw_uid = pwd->pw_uid; - info->pw_gid = pwd->pw_gid; - info->pw_dir = strdup(pwd->pw_dir); - info->pw_shell = strdup(pwd->pw_shell); - if(info->pw_name == NULL || info->pw_passwd == NULL || - info->pw_dir == NULL || info->pw_shell == NULL) { - free_info (info); - return NULL; - } - return info; -} - -#ifdef KRB5 -static krb5_context context; -static krb5_ccache ccache; - -static int -krb5_verify(const struct passwd *login_info, - const struct passwd *su_info, - const char *kerberos_instance) -{ - krb5_error_code ret; - krb5_principal p; - krb5_realm *realms, *r; - char *login_name = NULL; - int user_ok = 0; - -#if defined(HAVE_GETLOGIN) && !defined(POSIX_GETLOGIN) - login_name = getlogin(); -#endif - ret = krb5_init_context (&context); - if (ret) { -#if 0 - warnx("krb5_init_context failed: %d", ret); -#endif - return 1; - } - - ret = krb5_get_default_realms(context, &realms); - if (ret) - return 1; - - /* Check all local realms */ - for (r = realms; *r != NULL && !user_ok; r++) { - - if (login_name == NULL || strcmp (login_name, "root") == 0) - login_name = login_info->pw_name; - if (strcmp (su_info->pw_name, "root") == 0) - ret = krb5_make_principal(context, &p, *r, - login_name, - kerberos_instance, - NULL); - else - ret = krb5_make_principal(context, &p, *r, - su_info->pw_name, - NULL); - if (ret) { - krb5_free_host_realm(context, realms); - return 1; - } - - /* if we are su-ing too root, check with krb5_kuserok */ - if (su_info->pw_uid == 0 && !krb5_kuserok(context, p, su_info->pw_name)) - continue; - - ret = krb5_cc_new_unique(context, krb5_cc_type_memory, NULL, &ccache); - if(ret) { - krb5_free_host_realm(context, realms); - krb5_free_principal (context, p); - return 1; - } - ret = krb5_verify_user(context, p, ccache, NULL, TRUE, NULL); - krb5_free_principal (context, p); - switch (ret) { - case 0: - user_ok = 1; - break; - case KRB5_LIBOS_PWDINTR : - krb5_cc_destroy(context, ccache); - break; - case KRB5KRB_AP_ERR_BAD_INTEGRITY: - case KRB5KRB_AP_ERR_MODIFIED: - krb5_cc_destroy(context, ccache); - krb5_warnx(context, "Password incorrect"); - break; - default : - krb5_cc_destroy(context, ccache); - krb5_warn(context, ret, "krb5_verify_user"); - break; - } - } - krb5_free_host_realm(context, realms); - if (!user_ok) - return 1; - return 0; -} - -static int -krb5_start_session(void) -{ - krb5_ccache ccache2; - char *cc_name; - int ret; - - ret = krb5_cc_new_unique(context, krb5_cc_type_file, NULL, &ccache2); - if (ret) { - krb5_cc_destroy(context, ccache); - return 1; - } - - ret = krb5_cc_copy_cache(context, ccache, ccache2); - if (ret) { - krb5_cc_destroy(context, ccache); - krb5_cc_destroy(context, ccache2); - return 1; - } - - ret = asprintf(&cc_name, "%s:%s", krb5_cc_get_type(context, ccache2), - krb5_cc_get_name(context, ccache2)); - if (ret == -1) { - krb5_cc_destroy(context, ccache); - krb5_cc_destroy(context, ccache2); - errx(1, "malloc - out of memory"); - } - esetenv("KRB5CCNAME", cc_name, 1); - - /* convert creds? */ - if(k_hasafs()) { - if (k_setpag() == 0) - krb5_afslog(context, ccache2, NULL, NULL); - } - - krb5_cc_close(context, ccache2); - krb5_cc_destroy(context, ccache); - return 0; -} -#endif - - -#define GROUP_MEMBER 0 -#define GROUP_MISSING 1 -#define GROUP_EMPTY 2 -#define GROUP_NOT_MEMBER 3 - -static int -group_member_p(const char *group, const char *user) -{ - struct group *g; - int i; - g = getgrnam(group); - if(g == NULL) - return GROUP_MISSING; - if(g->gr_mem[0] == NULL) - return GROUP_EMPTY; - for(i = 0; g->gr_mem[i] != NULL; i++) - if(strcmp(user, g->gr_mem[i]) == 0) - return GROUP_MEMBER; - return GROUP_NOT_MEMBER; -} - -static int -verify_unix(struct passwd *login, struct passwd *su) -{ - char prompt[128]; - char pw_buf[1024]; - char *pw; - int r; - if(su->pw_passwd != NULL && *su->pw_passwd != '\0') { - snprintf(prompt, sizeof(prompt), "%s's password: ", su->pw_name); - r = UI_UTIL_read_pw_string(pw_buf, sizeof(pw_buf), prompt, 0); - if(r != 0) - exit(0); - pw = crypt(pw_buf, su->pw_passwd); - memset(pw_buf, 0, sizeof(pw_buf)); - if(strcmp(pw, su->pw_passwd) != 0) { - syslog (LOG_ERR | LOG_AUTH, "%s to %s: incorrect password", - login->pw_name, su->pw_name); - return 1; - } - } - /* if su:ing to root, check membership of group wheel or root; if - that group doesn't exist, or is empty, allow anyone to su - root */ - if(su->pw_uid == 0) { -#ifndef ROOT_GROUP -#define ROOT_GROUP "wheel" -#endif - int gs = group_member_p(ROOT_GROUP, login->pw_name); - if(gs == GROUP_NOT_MEMBER) { - syslog (LOG_ERR | LOG_AUTH, "%s to %s: not in group %s", - login->pw_name, su->pw_name, ROOT_GROUP); - return 1; - } - return 0; - } - return 0; -} - -int -main(int argc, char **argv) -{ - int i, optind = 0; - char *su_user; - struct passwd *su_info; - struct passwd *login_info; - - struct passwd *pwd; - - char *shell; - - int ok = 0; - - setprogname (argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind)) - usage(1); - - for (i=0; i < optind; i++) - if (strcmp(argv[i], "-") == 0) { - full_login = 1; - break; - } - - if(help_flag) - usage(0); - if(version_flag) { - print_version(NULL); - exit(0); - } - if(optind >= argc) - su_user = "root"; - else - su_user = argv[optind++]; - - if (!issuid() && getuid() != 0) - warnx("Not setuid and you are not root, expect this to fail"); - - pwd = k_getpwnam(su_user); - if(pwd == NULL) - errx (1, "unknown login %s", su_user); - if (pwd->pw_uid == 0 && strcmp ("root", su_user) != 0) { - syslog (LOG_ALERT, "NIS attack, user %s has uid 0", su_user); - errx (1, "unknown login %s", su_user); - } - su_info = dup_info(pwd); - if (su_info == NULL) - errx (1, "malloc: out of memory"); - - pwd = getpwuid(getuid()); - if(pwd == NULL) - errx(1, "who are you?"); - login_info = dup_info(pwd); - if (login_info == NULL) - errx (1, "malloc: out of memory"); - if(env_flag) - shell = login_info->pw_shell; - else - shell = su_info->pw_shell; - if(shell == NULL || *shell == '\0') - shell = _PATH_BSHELL; - - -#ifdef KRB5 - if(kerberos_flag && ok == 0 && - krb5_verify(login_info, su_info, kerberos_instance) == 0) - ok = 5; -#endif - - if(ok == 0 && login_info->pw_uid && verify_unix(login_info, su_info) != 0) { - printf("Sorry!\n"); - exit(1); - } - -#ifdef HAVE_GETSPNAM - { struct spwd *sp; - long today; - - sp = getspnam(su_info->pw_name); - if (sp != NULL) { - today = time(0)/(24L * 60 * 60); - if (sp->sp_expire > 0) { - if (today >= sp->sp_expire) { - if (login_info->pw_uid) - errx(1,"Your account has expired."); - else - printf("Your account has expired."); - } - else if (sp->sp_expire - today < 14) - printf("Your account will expire in %d days.\n", - (int)(sp->sp_expire - today)); - } - if (sp->sp_max > 0) { - if (today >= sp->sp_lstchg + sp->sp_max) { - if (login_info->pw_uid) - errx(1,"Your password has expired. Choose a new one."); - else - printf("Your password has expired. Choose a new one."); - } - else if (today >= sp->sp_lstchg + sp->sp_max - sp->sp_warn) - printf("Your account will expire in %d days.\n", - (int)(sp->sp_lstchg + sp->sp_max -today)); - } - } - } -#endif - { - char *tty = ttyname (STDERR_FILENO); - syslog (LOG_NOTICE | LOG_AUTH, tty ? "%s to %s on %s" : "%s to %s", - login_info->pw_name, su_info->pw_name, tty); - } - - - if(!env_flag) { - if(full_login) { - char *t = getenv ("TERM"); - char **newenv = NULL; - int i, j; - - i = read_environment(_PATH_ETC_ENVIRONMENT, &newenv); - - environ = malloc ((10 + i) * sizeof (char *)); - if (environ == NULL) - err (1, "malloc"); - environ[0] = NULL; - - for (j = 0; j < i; j++) { - char *p = strchr(newenv[j], '='); - if (p == NULL) - errx(1, "enviroment '%s' missing '='", newenv[j]); - *p++ = 0; - esetenv (newenv[j], p, 1); - } - free(newenv); - - esetenv ("PATH", _PATH_DEFPATH, 1); - if (t) - esetenv ("TERM", t, 1); - if (chdir (su_info->pw_dir) < 0) - errx (1, "no directory"); - } - if (full_login || su_info->pw_uid) - esetenv ("USER", su_info->pw_name, 1); - esetenv("HOME", su_info->pw_dir, 1); - esetenv("SHELL", shell, 1); - } - - { - int i; - char **args; - char *p; - - p = strrchr(shell, '/'); - if(p) - p++; - else - p = shell; - - if (strcmp(p, "csh") != 0) - csh_f_flag = 0; - - args = malloc(((cmd ? 2 : 0) + 1 + argc - optind + 1 + csh_f_flag) * sizeof(*args)); - if (args == NULL) - err (1, "malloc"); - i = 0; - if(full_login) { - if (asprintf(&args[i++], "-%s", p) == -1) - errx (1, "malloc"); - } else - args[i++] = p; - if (cmd) { - args[i++] = "-c"; - args[i++] = cmd; - } - - if (csh_f_flag) - args[i++] = "-f"; - - for (argv += optind; *argv; ++argv) - args[i++] = *argv; - args[i] = NULL; - - if(setgid(su_info->pw_gid) < 0) - err(1, "setgid"); - if (initgroups (su_info->pw_name, su_info->pw_gid) < 0) - err (1, "initgroups"); - if(setuid(su_info->pw_uid) < 0 - || (su_info->pw_uid != 0 && setuid(0) == 0)) - err(1, "setuid"); - -#ifdef KRB5 - if (ok == 5) - krb5_start_session(); -#endif - execve(shell, args, environ); - } - - exit(1); -} diff --git a/kerberosV/src/appl/su/su.cat1 b/kerberosV/src/appl/su/su.cat1 deleted file mode 100644 index d8e4092b1fe..00000000000 --- a/kerberosV/src/appl/su/su.cat1 +++ /dev/null @@ -1,44 +0,0 @@ - -SU(1) BSD General Commands Manual SU(1) - -NNAAMMEE - ssuu -- substitute user identity - -SSYYNNOOPPSSIISS - ssuu [--KK | ----nnoo--kkeerrbbeerrooss] [--ff] [--ll | ----ffuullll] [--mm] [--ii _i_n_s_t_a_n_c_e | - ----iinnssttaannccee==_i_n_s_t_a_n_c_e] [--cc _c_o_m_m_a_n_d | ----ccoommmmaanndd==_c_o_m_m_a_n_d] [_l_o_g_i_n [_s_h_e_l_l - _a_r_g_u_m_e_n_t_s]] - -DDEESSCCRRIIPPTTIIOONN - ssuu will use Kerberos authentication provided that an instance for the - user wanting to change effective UID is present in a file named _._k_5_l_o_g_i_n - in the target user id's home directory - - A special case exists where `root's' _~_/_._k_5_l_o_g_i_n needs to contain an entry - for: `user/@REALM' for ssuu to succed (where is `root' - unless changed with --ii). - - In the absence of either an entry for current user in said file or other - problems like missing `host/hostname@REALM' keys in the system's keytab, - or user typing the wrong password, ssuu will fall back to traditional - _/_e_t_c_/_p_a_s_s_w_d authentication. - - When using _/_e_t_c_/_p_a_s_s_w_d authentication, ssuu allows `root' access only to - members of the group `wheel', or to any user (with knowledge of the - `root' password) if that group does not exist, or has no members. - - The options are as follows: - - --KK, ----nnoo--kkeerrbbeerrooss don't use Kerberos. - - --ff don't read .cshrc. - - --ll, ----ffuullll simulate full login. - - --mm leave environment unmodified. - - --ii _i_n_s_t_a_n_c_e, ----iinnssttaannccee==_i_n_s_t_a_n_c_e root instance to use. - - --cc _c_o_m_m_a_n_d, ----ccoommmmaanndd==_c_o_m_m_a_n_d command to execute. - -HEIMDAL January 12, 2006 HEIMDAL diff --git a/kerberosV/src/appl/su/supaths.h b/kerberosV/src/appl/su/supaths.h deleted file mode 100644 index 3caeaac8225..00000000000 --- a/kerberosV/src/appl/su/supaths.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2007 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: supaths.h,v 1.1 2013/06/17 18:57:40 robert Exp $ */ - -#ifndef __SU_PATH_H -#define __SU_PATH_H - -#ifndef _PATH_DEFPATH -#define _PATH_DEFPATH "/usr/bin:/bin" -#endif - -#ifndef _PATH_BSHELL -#define _PATH_BSHELL "/bin/sh" -#endif - -#ifndef _PATH_ETC_ENVIRONMENT -#define _PATH_ETC_ENVIRONMENT SYSCONFDIR "/environment" -#endif - -#endif /* __SU_PATH_H */ diff --git a/kerberosV/src/appl/telnet/ChangeLog b/kerberosV/src/appl/telnet/ChangeLog deleted file mode 100644 index 2d30af8e3dd..00000000000 --- a/kerberosV/src/appl/telnet/ChangeLog +++ /dev/null @@ -1,831 +0,0 @@ -2008-04-27 Love Hörnquist Åstrand - - * libtelnet/enc_des.c: Use RAND_bytes() + DES_is_weak_key() to - generate random DES key. Introdunce random by feeding the des - session key into the random pool when the keys is recived instead - of encrypt the random key with the kerberos key. - - This avoid depenency on DES_new_random_key() that doesn't exists - in OpenSSL. - -2008-04-18 Love Hörnquist Åstrand - - * libtelnet/enc_des.c: No need to call - DES_init_random_number_generator, hcrypto is sane now. - - * libtelnet/enc_des.c: Use DES_new_random_key(). - -2008-04-10 Love Hörnquist Åstrand - - * telnetd/sys_term.c: Really, mac os uses wtmpx (or asl). - -2008-03-09 Love Hörnquist Åstrand - - * telnetd/sys_term.c: Dont need to set this as the controlling PTY - on steams sockets, don't abort on failure. From Harald Barth and - Ian Delahorne. - -2007-12-31 Love Hörnquist Åstrand - - * telnetd/sys_term.c: Use strlcpy instead of strncpy, thanks to - Antoine Brodin. - -2007-07-31 Love Hörnquist Åstrand - - * telnetd/telnetd.c (usage): use exit_code, add --version and - --help. - - * telnetd/telnetd.c: Add --help, reported by David Love. - -2007-07-30 Love Hörnquist Åstrand - - * telnet/main.c: Catch --help, reported by David Love. - -2007-07-12 Love Hörnquist Åstrand - - * telnetd/sys_term.c: GLIBC made the choice that ut_tv should be - shared between 32 and 64 bit platforms so now we can no longer use - struct timeval functions to compare or set/get data that uses - pointer (gettimeofday for example) since ut_tv is now not a struct - timeval but rather a struct { int32_t tv_sec; int32_t tv_usec; }; - -2006-10-21 Love Hörnquist Åstrand - - * telnet/telnet_locl.h: Include roken.h before the local - headerfiles. - - * telnetd/telnetd.h: HP/UX defines SE in sys/uio.h, #undef it. - - * telnetd/sys_term.c: Dont't include some streamspty headers here. - - * telnetd/telnetd.c: Dont't include some streamspty headers here. - - * telnetd/telnetd.h: includes some STREAMSPTY header here to avoid - ioctl vs socket_wrapper horror. - -2006-10-20 Love Hörnquist Åstrand - - * telnet/Makefile.am: more files - - * telnetd/Makefile.am: more files - -2006-09-19 Love Hörnquist Åstrand - - * telnetd/telnetd.8: Add documentation for -e, require encryption. - - * telnetd/telnetd.h: Add require_encryption. - - * telnetd/telnetd.c: Allow encryption to be required, wait to the - client to turn it on, if failes, refuse the connection. - - * telnetd/state.c: If encryption is required, don't allow it to be - turned off. - -2006-09-04 Love Hörnquist Åstrand - - * libtelnet/kerberos5.c (kerberos5_forward): use KDCOptions2int on - flags before passing them to krb5_get_forwarded_creds. - -2006-05-05 Love Hörnquist Åstrand - - * Rename u_intXX_t to uintXX_t - -2006-03-23 Love Hörnquist Åstrand - - * libtelnet/encrypt.c: Spelling. - -2005-12-01 Love Hörnquist Åstrand - - * telnetd/telnetd.c: Initialize the slc mapping table before its - used. Based on bug report from Russell Sanford - - -2005-11-03 Love Hörnquist Åstrand - - * telnet/telnet.c: Spelling in comments, from Dave Love - - -2005-10-31 Love Hörnquist Åstrand - - * libtelnet/kerberos5.c (Data): Use right variable. From Tomas - Olsson - -2005-10-22 Love Hörnquist Åstrand - - * telnet/commands.c: Check return value from asprintf instead of - string != NULL since it undefined behavior on Linux. From Björn - Sandell - - * libtelnet/kerberos5.c: Check return value from asprintf instead - of string != NULL since it undefined behavior on Linux. From Björn - Sandell - - * libtelnet/kerberos.c: Check return value from asprintf instead - of string != NULL since it undefined behavior on Linux. From Björn - Sandell - -2005-08-08 Love Hörnquist Åstrand - - * telnetd/telnetd.c: Fix printing of /etc/issue{,.net}. - - * telnetd/utility.c: make writenet take const void * and size_t, - abort if size it too large - - * telnetd/state.c: Fix ansi c warning. - - * telnetd/sys_term.c: no need to typecast argument to writenet - - * telnetd/ext.h: make writenet take const void * and size_t - -2005-07-07 Assar Westerlund - - * libtelnet/kerberos.c: Do not assume that des_key_schedule is an - array. - -2005-05-27 Love Hörnquist Åstrand - - * libtelnet/kerberos5.c: case uid_t to unsigned long in printf - format - - * telnetd/sys_term.c (set_termbuf): use {} around if to make else - unambiguous - -2005-05-20 Love Hörnquist Åstrand - - * telnetd/sys_term.c (start_login): put utmpx code into a new - scope to avoid pre c99 problems. - -2005-05-19 Dave Love - - * telnet/telnet.c,telnet_locl.h: Make solaris find tgetent - -2005-05-13 Johan Danielsson - - * telnetd/sys_term.c (start_login): set encryption pointers to - NULL, so we don't try to do either - -2005-05-11 Dave Love - - * telnet/telnet.c: undef ISASCII before we define our own (problem - on Irix) - -2005-04-28 Johan Danielsson - - * telnetd/utility.c (putf): %t: the regular and streamspty case - are functionally equivalent, so merge them, this also makes it - work better on machines that puts their devices in a subdirectory - to /dev - -2005-04-27 Dave Love - - * telnetd/sys_term.c (getpty): Declare p. - -2005-04-25 Love Hörnquist Åstrand - - * telnetd/telnetd.c: use strlcpy - -2005-04-24 Love Hörnquist Åstrand - - * telnetd/global.c, telnetd/state.c, telnetd/telnetd.c, - telentd/ext.h: remove another strcpy - -2005-04-19 Love Hörnquist Åstrand - - * telnetd/sys_term.c: rewrite getpty to make use openpty when its - found, save the slave fd so that cleanopen can use it if its - available - -2005-04-07 Love Hörnquist Åstrand - - * telnetd/sys_term.c: clean_ttyname might be unused, mark it so - with __attribute__ - -2005-04-06 Love Hörnquist Åstrand - - * telnetd/sys_term.c: use NULL as last argument to execl, not 0 - - * telnet/commands.c: use NULL as last argument to execl, not 0 - -2005-03-29 Love Hörnquist Åstrand - - * telnet/telnet.c: From FreeBSD: - - Correct a pair of buffer overflows in the telnet(1) command: - - (CAN-2005-0468) A heap buffer overflow in env_opt_add() and related - functions. - - (CAN-2005-0469) A global uninitialized data section buffer overflow in - slc_add_reply() and related functions. - - As a result of these vulnerabilities, it may be possible for a - malicious telnet server or active network attacker to cause - telnet(1) to execute arbitrary code with the privileges of the - user running it. - - Security: CAN-2005-0468, CAN-2005-0469 Security: - FreeBSD-SA-05:01.telnet Security: - http://www.idefense.com/application/poi/display?id=220&type=vulnerabilities - Security: - http://www.idefense.com/application/poi/display?id=221&type=vulnerabilities - - These fixes are based in part on patches Submitted by: Solar - Designer - -2005-03-23 Love Hörnquist Åstrand - - * telnetd/telnetd.c: remove setting of DES_check_key, all code - uses DES_set_key_checked - - * libtelnet/enc_des.c: use DES_set_key_checked - -2005-01-09 Love Hörnquist Åstrand - - * telnet/telnet.c: cast argument to toupper to unsigned char - - * telnet/commands.c: cast argument to is* to unsigned char - -2004-06-20 Love Hörnquist Åstrand - - * telnet/network.c: make network rings larger From: MAAAAA MOOOR - - - * telnetd/state.c: make subbuffer larger XXX resize dynamicly - From: MAAAAA MOOOR - - * libtelnet/kerberos5.c (Data): allocate the data needed to be - send From: MAAAAA MOOOR - -2004-04-02 Love Hörnquist Åstrand - - * telnet/main.c: make encrypt, forwardable, forward use appdefault - (that also searches libdefaults), prompted by Thomas Nystrom - - -2004-03-22 Love Hörnquist Åstrand - - * telnetd/telnetd.c: call setprogname to make libvers happy - - * telnet/main.c: call setprogname to make libvers happy - -2003-09-25 Love Hörnquist Åstrand - - * telnet/externs.h: export Scheduler and scheduler_lockout_tty - - * telnet/telnet.c (my_telnet): if telnet_spin returns failure, - complain that the server disconnected and exit - - * telnet/authenc.c (telnet_spin): if Scheduler() returns failure - (-1) propagate to higher level - -2003-09-03 Love Hörnquist Åstrand - - * telnetd/telnetd.c: use new DES_ api - - * libtelnet/enc_des.c: use new DES_ api - -2003-04-22 Love Hörnquist Åstrand - - * telnet/telnet.1: replace <,> with \*[Lt],\*[Gt] - -2002-09-02 Johan Danielsson - - * libtelnet/kerberos5.c: set AP_OPTS_USE_SUBKEY - -2002-08-28 Johan Danielsson - - * telnet/commands.c: remove extra "Toggle"'s - - * telnet/commands.c: IRIX == 4 -> IRIX4 - - * telnet/main.c: rename functions to what they're really called - - * telnet/commands.c: kill some might be uninitialized warnings - - * telnet/commands.c: add forward and forwardable toggle options, - and call set_forward_options() after parsing .telnetrc - - * telnet/externs.h: proto for set_forward_options - - * telnet/main.c: only register what forwarding options are asked - for when parsing command line, we have to set the actual flags - later after we have read .telnetrc - - * libtelnet/auth-proto.h: kerberos5_set_forward{,able} protos - - * libtelnet/kerberos5.c: add kerberos5_set_forward{,able} - functions suitable for the command parser - -2002-08-23 Assar Westerlund - - * telnetd/telnetd.c: add --version as a special case - * telnet/main.c: add --version as a special case - -2002-05-03 Johan Danielsson - - * telnet/telnet.c: only try to negotiate encryption if we're - talking to a real telnet - -2002-03-31 Johan Danielsson - - * telnet/commands.c: fix an old cut-n-paste typo (via debian) - -2002-02-07 Johan Danielsson - - * telnet/telnet.c: print a more informative message than "done" - after negotiating encryption - -2001-09-17 Assar Westerlund - - * telnetd/telnetd.c: add a kludge to make it build on aix (that - defines NOERROR in both sys/stream.h and arpa/nameser.h and - considers that a fatal error) - - * telnet/telnet.c: undef PUTSHORT to avoid conflict - -2001-08-26 Assar Westerlund - - * telnetd/Makefile.am: also link with the library for logout - -2001-08-22 Assar Westerlund - - * telnetd/sys_term.c: include libutil.h if it exists - -2001-08-10 Assar Westerlund - - * telnetd/sys_term.c (getpty): call openpty if it exists - -2001-07-19 Assar Westerlund - - * telnetd/global.c (output_data): make sure of not forwarding - `nfrontp' too far, thereby allowing writes after the end of - `netobuf' - -2001-06-18 Assar Westerlund - - * libtelnet/kerberos5.c: update to new krb5_auth_con* names - -2001-04-25 Assar Westerlund - - * telnetd/sys_term.c (start_login): give the correct error if exec - fails - * telnetd/utility.c (fatalperror_errno): add a new function with - explicit errno parameter - -2001-03-07 Assar Westerlund - - * telnetd/sys_term.c: some minimal more amount of - const-correctness - -2001-02-24 Assar Westerlund - - * libtelnet/enc_des.c: learn to live with libcrypto (from openssl) - -2001-02-20 Assar Westerlund - - * telnet/commands.c (tn): copy the hostname so it doesn't get - overwritten while reading ~/.telnetrc - (*): removed some unneeded externs - -2001-02-08 Assar Westerlund - - * telnetd/sys_term.c (startslave, start_login): re-write code to - keep track both of remote hostname and utmp string to be used - * telnetd/telnetd.c (doit, my_telnet): re-write code to keep track - both of remote hostname and utmp string to be used - -2001-02-07 Assar Westerlund - - * telnet/Makefile.am, telnetd/Makefile.am: add LIB_kdfs - -2001-01-09 Assar Westerlund - - * libtelnet/kerberos5.c (kerberos5_is): use krb5_rd_cred2 instead - of krb5_rd_cred - -2000-12-31 Assar Westerlund - - * telnet/main.c (krb5_init): check krb5_init_context for success - * libtelnet/kerberos5.c (kerberos5_init): check krb5_init_context - for success - -2000-12-11 Assar Westerlund - - * telnet/commands.c (sourceroute): make it not break if the - rfc2292 api does not exist - -2000-12-09 Assar Westerlund - - * telnetd/sys_term.c (scrub_env): add supporting non-file TERMCAP - variables - -2000-12-07 Assar Westerlund - - * telnetd/telnetd.h: move include files around to avoid getting SE - from sys/*.h on HP to override SE from telnet.h - - * telnetd/sys_term.c (scrub_env): remove some const-ness - * telnetd/sys_term.c (scrub_env): add LOGNAME and POSIXLY_CORRECT - to the list of authorized environment variables to be compatible - with linux-telnetd - - * telnetd/sys_term.c (scrub_env): change filtering algoritm from - allowing everything except a few bad cases to not allowing - anything except a few non-dangerous cases - -2000-12-06 Johan Danielsson - - * libtelnet/kerberos5.c: de-pointerise auth_context parameter to - krb5_mk_rep - -2000-11-23 Johan Danielsson - - * libtelnet/kerberos5.c: print the principal we're trying to use - - * libtelnet/kerberos.c: print the principal we're trying to use - -2000-11-16 Assar Westerlund - - * libtelnet/misc-proto.h (telnet_getenv): const-ize some - -2000-11-08 Johan Danielsson - - * telnet/telnet.c: fake entry if no tgetent - -2000-10-08 Assar Westerlund - - * telnetd/utility.c (stilloob): check that fds are not too large - to select on - (ttloop): remove confusing output of errno - * telnetd/telnetd.c (my_telnet): check that fds are not too large - to select on - * telnet/utilities.c (EmptyTerminal): check that fds are not too - large to select on - * telnet/sys_bsd.c (process_rings): check that fds are not too - large to select on - * telnet/network.c (stilloob): check that fds are not too large to - select on - -2000-06-09 Assar Westerlund - - * telnet/commands.c: remove all setuid(getuid()). we do not - support telnet being setuid root - -2000-05-05 Assar Westerlund - - * telnet/externs.h (sourceroute): update prototype - * telnet/commands.c (tn): re-enable source routing - (sourceroute): make it work again based on the code from - itojun@kame.net - -2000-03-28 Assar Westerlund - - * telnet/commands.c (tn): clean-up a tiny little bit. give-up if - we do not manage to connect to any address - -2000-03-26 Assar Westerlund - - * telnetd/sys_term.c (*): make sure to always call time, ctime, - and gmtime with `time_t's. there were some types (like in - lastlog) that we believed to always be time_t. this has proven - wrong on Solaris 8 in 64-bit mode, where they are stored as 32-bit - quantities but time_t has gone up to 64 bits - -2000-03-03 Assar Westerlund - - * libtelnet/kerberos5.c (kerberos5_init): check that we do have a - keytab before saying that we will support KERBEROS5 - -2000-02-12 Assar Westerlund - - * telnet/commands.c (tn): only set tos for AF_INET. From - itojun@iijlab.net - -2000-02-07 Assar Westerlund - - * libtelnet/kerberos.c (kerberos4_is): send a reject back to the - client when we're not authorized - -2000-02-06 Assar Westerlund - - * telnet/ring.h (ring_encrypt): better proto - * telnet/ring.c (ring_encrypt): better proto - -2000-02-04 Assar Westerlund - - * telnet/telnet_locl.h: klduge-around KLUDGELINEMODE - -2000-01-18 Assar Westerlund - - * libtelnet/misc.c (auth_encrypt_user): const-ify - * libtelnet/misc.h (RemoteHostName, LocalHostName): const-ify - * libtelnet/misc.c (auth_encrypt_init, RemoteHostName, - LocalHostName): const-ify - * libtelnet/misc-proto.h (auth_encrypt_init, auth_encrypt_user): - const-ify - * libtelnet/encrypt.c (encrypt_init, Name): const-ify - * libtelnet/enc-proto.h (encrypt_init): const-ify - * libtelnet/auth.c (auth_init, Name): const-ify - * libtelnet/auth-proto.h (auth_init): const-ify - -2000-01-08 Assar Westerlund - - * telnet/commands.c (tn): handle ai_canonname being set in any of - the addresses returnedby getaddrinfo. glibc apparently returns - the reverse lookup of every address in ai_canonname. remove some - unused variables. - -2000-01-01 Assar Westerlund - - * telnetd/sys_term.c (addarg): make void (return value isn't check - anyway). fatal error when malloc fails - -1999-12-16 Assar Westerlund - - * telnet/commands.c (*): handle ai_canonname not being set - -1999-12-04 Assar Westerlund - - * telnetd/telnetd.c (doit): use getnameinfo_verified - * telnetd/telnetd.c: use getnameinfo - * telnet/commands.c: re-write to using getaddrinfo. disable - source-routing for the moment, it doesn't seem to be used anyways. - -1999-09-16 Assar Westerlund - - * telnet/commands.c: revert 1.54, get_default_username should DTRT - now - -1999-09-05 Assar Westerlund - - * telnetd/utility.c (ttloop): make it return 1 if interrupted by a - signal, which must have been what was meant from the beginning - - * telnetd/ext.h (ttloop): update prototype - - * telnetd/authenc.c (telnet_spin): actually return the value from - ttloop (otherwise it's kind of bogus) - -1999-08-05 Assar Westerlund - - * telnetd/sys_term.c (rmut): free utxp - -1999-08-04 Assar Westerlund - - * telnet/main.c: add -G and config file support. From Miroslav - Ruda - - * telnetd/sys_term.c (rmut): work around utmpx strangness. From - Miroslav Ruda - -1999-08-02 Assar Westerlund - - * telnetd/telnetd.c (doit): only free hp if != NULL. From: Jonas - Oberg - -1999-07-29 Assar Westerlund - - * telnetd/telnetd.c (doit): remove unused variable mapped_sin - -1999-07-26 Assar Westerlund - - * telnetd/ext.h: update prototypes - - * telnetd/telnetd.c: make it handle v4 and v6 sockets. (it - doesn't handle being given a v6 socket that's really talking to an - v4 adress (mapped) because the rest of the code in telnetd is not - able to handle it anyway). please run two telnetd from your - inetd, one for v4 and one for v6. - -1999-07-07 Assar Westerlund - - * telnet/commands.c (tn): extra bogus const-cast - -1999-07-06 Assar Westerlund - - * telnetd/sys_term.c (start_login): print a different warning with - `-a otp' - -1999-06-24 Assar Westerlund - - * libtelnet/kerberos5.c (kerberos5_send): set the addresses in the - auth_context - -1999-06-23 Assar Westerlund - - * telnet/Makefile.am (INCLUDES): add $(INCLUDE_krb4) - - * telnet/commands.c (togkrbdebug): conditionalize on - krb_disable_debug - -1999-06-16 Johan Danielsson - - * telnet/commands.c: add kerberos debugging option - -1999-06-15 Assar Westerlund - - * telnet/commands.c (tn): use get_default_username - -1999-05-14 Assar Westerlund - - * telnetd/state.c (telrcv): magic patch to make it work against - DOS Clarkson Telnet. From Miroslav Ruda - -1999-04-25 Assar Westerlund - - * libtelnet/kerberos5.c (kerberos5_send): use - `krb5_auth_setkeytype' instead of `krb5_auth_setenctype' to make - sure we get a DES session key. - -Thu Apr 1 16:59:27 1999 Johan Danielsson - - * telnetd/Makefile.am: don't run check-local - - * telnet/Makefile.am: don't run check-local - -Mon Mar 29 16:11:33 1999 Johan Danielsson - - * telnetd/sys_term.c: _CRAY -> HAVE_STRUCT_UTMP_UT_ID - -Sat Mar 20 00:12:54 1999 Assar Westerlund - - * telnet/authenc.c (telnet_gets): remove old extern declarations - -Thu Mar 18 11:20:16 1999 Johan Danielsson - - * telnetd/Makefile.am: include Makefile.am.common - - * telnet/Makefile.am: include Makefile.am.common - - * libtelnet/Makefile.am: include Makefile.am.common - - * Makefile.am: include Makefile.am.common - -Mon Mar 15 17:40:53 1999 Johan Danielsson - - * telnetd/telnetd.c: replace perror/exit with fatalperror - -Sat Mar 13 22:18:57 1999 Assar Westerlund - - * telnetd/telnetd.c (main): 0 -> STDIN_FILENO. remove abs - - * libtelnet/kerberos.c (kerberos4_is): syslog root logins - -Thu Mar 11 14:48:54 1999 Johan Danielsson - - * telnetd/Makefile.in: add WFLAGS - - * telnet/Makefile.in: add WFLAGS - - * libtelnet/Makefile.in: add WFLAGS - - * telnetd/sys_term.c: remove unused variables - - * telnet/telnet.c: fix some warnings - - * telnet/main.c: fix some warnings - - * telnet/commands.c: fix types in format string - - * libtelnet/auth.c: fix types in format string - -Mon Mar 1 10:50:30 1999 Johan Danielsson - - * telnetd/sys_term.c: HAVE_UT_* -> HAVE_STRUCT_UTMP*_UT_* - -Mon Feb 1 04:08:36 1999 Assar Westerlund - - * telnet/commands.c (tn): only call gethostbyname2 with AF_INET6 - if we actually have IPv6. From "Brandon S. Allbery KF8NH" - - -Sat Nov 21 16:51:00 1998 Johan Danielsson - - * telnetd/sys_term.c (cleanup): don't call vhangup() on sgi:s - -Fri Aug 14 16:29:18 1998 Johan Danielsson - - * libtelnet/kerberos.c: krb_put_int -> KRB_PUT_INT - -Thu Jul 23 20:29:05 1998 Johan Danielsson - - * libtelnet/kerberos5.c: use krb5_verify_authenticator_checksum - -Mon Jul 13 22:00:09 1998 Assar Westerlund - - * telnet/commands.c (tn): don't advance hostent->h_addr_list, use - a copy instead - -Wed May 27 04:19:17 1998 Assar Westerlund - - * telnet/sys_bsd.c (process_rings): correct call to `stilloob' - -Fri May 15 19:38:19 1998 Johan Danielsson - - * libtelnet/kerberos5.c: Always print errors from mk_req. - -Fri May 1 07:16:59 1998 Assar Westerlund - - * telnet/commands.c: unifdef -DHAVE_H_ERRNO - -Sat Apr 4 15:00:29 1998 Assar Westerlund - - * telnet/commands.c (tn): moved the printing of `trying...' to the - loop - -Thu Mar 12 02:33:48 1998 Assar Westerlund - - * telnet/telnet_locl.h: include . From Gregory S. Stark - - -Sat Feb 21 15:12:38 1998 Assar Westerlund - - * telnetd/ext.h: add prototype for login_tty - - * telnet/utilities.c (printsub): `direction' is now an int. - - * libtelnet/misc-proto.h: add prototype for `printsub' - -Tue Feb 17 02:45:01 1998 Assar Westerlund - - * libtelnet/kerberos.c (kerberos4_is): cred.pname should be - cred.pinst. From - -Sun Feb 15 02:46:39 1998 Assar Westerlund - - * telnet/*/*.c: renamed `telnet' to `my_telnet' to avoid - conflicts with system header files on mklinux. - -Tue Feb 10 02:09:03 1998 Assar Westerlund - - * telnetd/telnetd.c: new signature for `getterminaltype' and - `auth_wait' - - * libtelnet: changed the signature of the authentication method - `status' - -Sat Feb 7 07:21:29 1998 Assar Westerlund - - * */*.c: replace HAS_GETTOS by HAVE_PARSETOS and HAVE_GETTOSBYNAME - -Fri Dec 26 16:17:10 1997 Assar Westerlund - - * telnet/commands.c (tn): repair support for numeric addresses - -Sun Dec 21 09:40:31 1997 Assar Westerlund - - * libtelnet/kerberos.c: fix up lots of stuff related to the - forwarding of v4 tickets. - - * libtelnet/kerberos5.c (kerberos5_forward): zero out `creds'. - -Mon Dec 15 20:53:13 1997 Johan Danielsson - - * telnet/sys_bsd.c: Don't turn off OPOST in 8bit-mode. - -Tue Dec 9 19:26:50 1997 Assar Westerlund - - * telnet/main.c (main): add 'b' to getopt - -Sat Nov 29 03:28:54 1997 Johan Danielsson - - * telnet/telnet.c: Change binary mode to do just that, and add a - eight-bit mode for just passing all characters. - -Sun Nov 16 04:37:02 1997 Assar Westerlund - - * libtelnet/kerberos5.c (kerberos5_send): always ask for a session - key of type DES - - * libtelnet/kerberos5.c: remove old garbage and fix call to - krb5_auth_con_setaddrs_from_fd - -Fri Nov 14 20:35:18 1997 Johan Danielsson - - * telnetd/telnetd.c: Output contents of /etc/issue. - -Mon Nov 3 07:09:16 1997 Assar Westerlund - - * telnet/telnet_locl.h: only include iff - !defined(HAVE_TERMIOS_H) - - * libtelnet/kerberos.c (kerberos4_is): send the peer address to - krb_rd_req - - * telnetd/telnetd.c (terminaltypeok): always return OK. It used - to call `tgetent' to figure if it was a defined terminal type. - It's possible to overflow tgetent so that's a bad idea. The worst - that could happen by saying yes to all terminals is that the user - ends up with a terminal that has no definition on the local - system. And besides, most telnet client has no support for - falling back to a different terminal type. - -Mon Oct 20 05:47:19 1997 Assar Westerlund - - * libtelnet/kerberos5.c: remove lots of old junk. clean-up. - better error checking and reporting. tell the user permission - denied much earlier. - - * libtelnet/kerberos.c (kerberos4_is): only print - UserNameRequested if != NULL - diff --git a/kerberosV/src/appl/telnet/Makefile.am b/kerberosV/src/appl/telnet/Makefile.am deleted file mode 100644 index 436b87d5436..00000000000 --- a/kerberosV/src/appl/telnet/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:38 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -SUBDIRS = libtelnet telnet telnetd - -dist-hook: - $(mkinstalldirs) $(distdir)/arpa - $(INSTALL_DATA) $(srcdir)/arpa/telnet.h $(distdir)/arpa - -EXTRA_DIST = NTMakefile README.ORIG telnet.state diff --git a/kerberosV/src/appl/telnet/Makefile.in b/kerberosV/src/appl/telnet/Makefile.in deleted file mode 100644 index 090a66f09c1..00000000000 --- a/kerberosV/src/appl/telnet/Makefile.in +++ /dev/null @@ -1,920 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -subdir = appl/telnet -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -SUBDIRS = libtelnet telnet telnetd -EXTRA_DIST = NTMakefile README.ORIG telnet.state -all: all-recursive - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/telnet/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/telnet/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-recursive -all-am: Makefile all-local -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ - ctags-recursive install-am install-data-am install-exec-am \ - install-strip tags-recursive uninstall-am - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local check check-am check-local clean \ - clean-generic clean-libtool ctags ctags-recursive dist-hook \ - distclean distclean-generic distclean-libtool distclean-tags \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-data-hook \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-exec-hook install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-hook - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -dist-hook: - $(mkinstalldirs) $(distdir)/arpa - $(INSTALL_DATA) $(srcdir)/arpa/telnet.h $(distdir)/arpa - -# 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/kerberosV/src/appl/telnet/NTMakefile b/kerberosV/src/appl/telnet/NTMakefile deleted file mode 100644 index 38031e713fe..00000000000 --- a/kerberosV/src/appl/telnet/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\telnet - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/telnet/README.ORIG b/kerberosV/src/appl/telnet/README.ORIG deleted file mode 100644 index 37b588fafd6..00000000000 --- a/kerberosV/src/appl/telnet/README.ORIG +++ /dev/null @@ -1,743 +0,0 @@ - -This is a distribution of both client and server telnet. These programs -have been compiled on: - telnet telnetd - 4.4 BSD-Lite x x - 4.3 BSD Reno X X - UNICOS 9.1 X X - UNICOS 9.0 X X - UNICOS 8.0 X X - BSDI 2.0 X X - Solaris 2.4 x x (no linemode in server) - SunOs 4.1.4 X X (no linemode in server) - Ultrix 4.3 X X (no linemode in server) - Ultrix 4.1 X X (no linemode in server) - -In addition, previous versions have been compiled on the following -machines, but were not available for testing this version. - telnet telnetd - Next1.0 X X - UNICOS 8.3 X X - UNICOS 7.C X X - UNICOS 7.0 X X - SunOs 4.0.3c X X (no linemode in server) - 4.3 BSD X X (no linemode in server) - DYNIX V3.0.12 X X (no linemode in server) - Ultrix 3.1 X X (no linemode in server) - Ultrix 4.0 X X (no linemode in server) - SunOs 3.5 X X (no linemode in server) - SunOs 4.1.3 X X (no linemode in server) - Solaris 2.2 x x (no linemode in server) - Solaris 2.3 x x (no linemode in server) - BSDI 1.0 X X - BSDI 1.1 X X - DYNIX V3.0.17.9 X X (no linemode in server) - HP-UX 8.0 x x (no linemode in server) - -This code should work, but there are no guarantees. - -May 30, 1995 - -This release represents what is on the 4.4BSD-Lite2 release, which -should be the final BSD release. I will continue to support of -telnet, The code (without encryption) is available via anonymous ftp -from ftp.cray.com, in src/telnet/telnet.YY.MM.DD.NE.tar.Z, where -YY.MM.DD is replaced with the year, month and day of the release. -If you can't find it at one of these places, at some point in the -near future information about the latest releases should be available -from ftp.borman.com. - -In addition, the version with the encryption code is available via -ftp from net-dist.mit.edu, in the directory /pub/telnet. There -is a README file there that gives further information on how -to get the distribution. - -Questions, comments, bug reports and bug fixes can be sent to -one of these addresses: - dab@borman.com - dab@cray.com - dab@bsdi.com - -This release is mainly bug fixes and code cleanup. - - Replace all calls to bcopy()/bzero() with calls to - memmove()/memset() and all calls to index()/rindex() - with calls to strchr()/strrchr(). - - Add some missing diagnostics for option tracing - to telnetd. - - Add support for BSDI 2.0 and Solaris 2.4. - - Add support for UNICOS 8.0 - - Get rid of expanded tabs and trailing white spaces. - - From Paul Vixie: - Fix for telnet going into an endless spin - when the session dies abnormally. - - From Jef Poskanzer: - Changes to allow telnet to compile - under SunOS 3.5. - - From Philip Guenther: - makeutx() doesn't expand utmpx, - use pututxline() instead. - - From Chris Torek: - Add a sleep(1) before execing login - to avoid race condition that can eat - up the login prompt. - Use terminal speed directly if it is - not an encoded value. - - From Steve Parker: - Fix to realloc() call. Fix for execing - login on solaris with no user name. - -January 19, 1994 - -This is a list of some of the changes since the last tar release -of telnet/telnetd. There are probably other changes that aren't -listed here, but this should hit a lot of the main ones. - - General: - Changed #define for AUTHENTICATE to AUTHENTICATION - Changed #define for ENCRYPT to ENCRYPTION - Changed #define for DES_ENCRYPT to DES_ENCRYPTION - - Added support for SPX authentication: -DSPX - - Added support for Kerberos Version 5 authentication: -DKRB5 - - Added support for ANSI C function prototypes - - Added support for the NEW-ENVIRON option (RFC-1572) - including support for USERVAR. - - Made support for the old Environment Option (RFC-1408) - conditional on -DOLD_ENVIRON - - Added #define ENV_HACK - support for RFC 1571 - - The encryption code is removed from the public distributions. - Domestic 4.4 BSD distributions contain the encryption code. - - ENV_HACK: Code to deal with systems that only implement - the old ENVIRON option, and have reversed definitions - of ENV_VAR and ENV_VAL. Also fixes ENV processing in - client to handle things besides just the default set... - - NO_BSD_SETJMP: UNICOS configuration for - UNICOS 6.1/6.0/5.1/5.0 systems. - - STREAMSPTY: Use /dev/ptmx to get a clean pty. This - is for SVr4 derivatives (Like Solaris) - - UTMPX: For systems that have /etc/utmpx. This is for - SVr4 derivatives (Like Solaris) - - Definitions for BSDI 1.0 - - Definitions for 4.3 Reno and 4.4 BSD. - - Definitions for UNICOS 8.0 and UNICOS 7.C - - Definitions for Solaris 2.0 - - Definitions for HP-UX 8.0 - - Latest Copyright notices from Berkeley. - - FLOW-CONTROL: support for RFC-XXXx - - - Client Specific: - - Fix the "send" command to not send garbage... - - Fix status message for "skiprc" - - Make sure to send NAWS after telnet has been suspended - or an external command has been run, if the window size - has changed. - - sysV88 support. - - Server Specific: - - Support flowcontrol option in non-linemode servers. - - -k Server supports Kludge Linemode, but will default to - either single character mode or real Linemode support. - The user will have to explicitly ask to switch into - kludge linemode. ("stty extproc", or escape back to - to telnet and say "mode line".) - - -u Specify the length of the hostname field in the utmp - file. Hostname longer than this length will be put - into the utmp file in dotted decimal notation, rather - than putting in a truncated hostname. - - -U Registered hosts only. If a reverse hostname lookup - fails, the connection will be refused. - - -f/-F - Allows forwarding of credentials for KRB5. - -Februrary 22, 1991: - - Features: - - This version of telnet/telnetd has support for both - the AUTHENTICATION and ENCRYPTION options. The - AUTHENTICATION option is fairly well defined, and - an option number has been assigned to it. The - ENCRYPTION option is still in a state of flux; an - option number has been assigned to, but it is still - subject to change. The code is provided in this release - for experimental and testing purposes. - - The telnet "send" command can now be used to send - do/dont/will/wont commands, with any telnet option - name. The rules for when do/dont/will/wont are sent - are still followed, so just because the user requests - that one of these be sent doesn't mean that it will - be sent... - - The telnet "getstatus" command no longer requires - that option printing be enabled to see the response - to the "DO STATUS" command. - - A -n flag has been added to telnetd to disable - keepalives. - - A new telnet command, "auth" has been added (if - AUTHENTICATE is defined). It has four sub-commands, - "status", "disable", "enable" and "help". - - A new telnet command, "encrypt" has been added (if - ENCRYPT is defined). It has many sub-commands: - "enable", "type", "start", "stop", "input", - "-input", "output", "-output", "status", and "help". - - The LOGOUT option is now supported by both telnet - and telnetd, a new command, "logout", was added - to support this. - - Several new toggle options were added: - "autoencrypt", "autodecrypt", "autologin", "authdebug", - "encdebug", "skiprc", "verbose_encrypt" - - An "rlogin" interface has been added. If the program - is named "rlogin", or the "-r" flag is given, then - an rlogin type of interface will be used. - ~. Terminates the session - ~ Suspend the session - ~^] Escape to telnet command mode - ~~ Pass through the ~. - BUG: If you type the rlogin escape character - in the middle of a line while in rlogin - mode, you cannot erase it or any characters - before it. Hopefully this can be fixed - in a future release... - - General changes: - - A "libtelnet.a" has now been created. This libraray - contains code that is common to both telnet and - telnetd. This is also where library routines that - are needed, but are not in the standard C library, - are placed. - - The makefiles have been re-done. All of the site - specific configuration information has now been put - into a single "Config.generic" file, in the top level - directory. Changing this one file will take care of - all three subdirectories. Also, to add a new/local - definition, a "Config.local" file may be created - at the top level; if that file exists, the subdirectories - will use that file instead of "Config.generic". - - Many 1-2 line functions in commands.c have been - removed, and just inserted in-line, or replaced - with a macro. - - Bug Fixes: - - The non-termio code in both telnet and telnetd was - setting/clearing CTLECH in the sg_flags word. This - was incorrect, and has been changed to set/clear the - LCTLECH bit in the local mode word. - - The SRCRT #define has been removed. If IP_OPTIONS - and IPPROTO_IP are defined on the system, then the - source route code is automatically enabled. - - The NO_GETTYTAB #define has been removed; there - is a compatability routine that can be built into - libtelnet to achive the same results. - - The server, telnetd, has been switched to use getopt() - for parsing the argument list. - - The code for getting the input/output speeds via - cfgetispeed()/cfgetospeed() was still not quite - right in telnet. Posix says if the ispeed is 0, - then it is really equal to the ospeed. - - The suboption processing code in telnet now has - explicit checks to make sure that we received - the entire suboption (telnetd was already doing this). - - The telnet code for processing the terminal type - could cause a core dump if an existing connection - was closed, and a new connection opened without - exiting telnet. - - Telnetd was doing a TCSADRAIN when setting the new - terminal settings; This is not good, because it means - that the tcsetattr() will hang waiting for output to - drain, and telnetd is the only one that will drain - the output... The fix is to use TCSANOW which does - not wait. - - Telnetd was improperly setting/clearing the ISTRIP - flag in the c_lflag field, it should be using the - c_iflag field. - - When the child process of telnetd was opening the - slave side of the pty, it was re-setting the EXTPROC - bit too early, and some of the other initialization - code was wiping it out. This would cause telnetd - to go out of linemode and into single character mode. - - One instance of leaving linemode in telnetd forgot - to send a WILL ECHO to the client, the net result - would be that the user would see double character - echo. - - If the MODE was being changed several times very - quickly, telnetd could get out of sync with the - state changes and the returning acks; and wind up - being left in the wrong state. - -September 14, 1990: - - Switch the client to use getopt() for parsing the - argument list. The 4.3Reno getopt.c is included for - systems that don't have getopt(). - - Use the posix _POSIX_VDISABLE value for what value - to use when disabling special characters. If this - is undefined, it defaults to 0x3ff. - - For non-termio systems, TIOCSETP was being used to - change the state of the terminal. This causes the - input queue to be flushed, which we don't want. This - is now changed to TIOCSETN. - - Take out the "#ifdef notdef" around the code in the - server that generates a "sync" when the pty oputput - is flushed. The potential problem is that some older - telnet clients may go into an infinate loop when they - receive a "sync", if so, the server can be compiled - with "NO_URGENT" defined. - - Fix the client where it was setting/clearing the OPOST - bit in the c_lflag field, not the c_oflag field. - - Fix the client where it was setting/clearing the ISTRIP - bit in the c_lflag field, not the c_iflag field. (On - 4.3Reno, this is the ECHOPRT bit in the c_lflag field.) - The client also had its interpretation of WILL BINARY - and DO BINARY reversed. - - Fix a bug in client that would cause a core dump when - attempting to remove the last environment variable. - - In the client, there were a few places were switch() - was being passed a character, and if it was a negative - value, it could get sign extended, and not match - the 8 bit case statements. The fix is to and the - switch value with 0xff. - - Add a couple more printoption() calls in the client, I - don't think there are any more places were a telnet - command can be received and not printed out when - "options" is on. - - A new flag has been added to the client, "-a". Currently, - this just causes the USER name to be sent across, in - the future this may be used to signify that automatic - authentication is requested. - - The USER variable is now only sent by the client if - the "-a" or "-l user" options are explicity used, or - if the user explicitly asks for the "USER" environment - variable to be exported. In the server, if it receives - the "USER" environment variable, it won't print out the - banner message, so that only "Password:" will be printed. - This makes the symantics more like rlogin, and should be - more familiar to the user. (People are not used to - getting a banner message, and then getting just a - "Password:" prompt.) - - Re-vamp the code for starting up the child login - process. The code was getting ugly, and it was - hard to tell what was really going on. What we - do now is after the fork(), in the child: - 1) make sure we have no controlling tty - 2) open and initialize the tty - 3) do a setsid()/setpgrp() - 4) makes the tty our controlling tty. - On some systems, #2 makes the tty our controlling - tty, and #4 is a no-op. The parent process does - a gets rid of any controlling tty after the child - is fork()ed. - - Use the strdup() library routine in telnet, instead - of the local savestr() routine. If you don't have - strdup(), you need to define NO_STRDUP. - - Add support for ^T (SIGINFO/VSTATUS), found in the - 4.3Reno distribution. This maps to the AYT character. - You need a 4-line bugfix in the kernel to get this - to work properly: - - > *** tty_pty.c.ORG Tue Sep 11 09:41:53 1990 - > --- tty_pty.c Tue Sep 11 17:48:03 1990 - > *************** - > *** 609,613 **** - > if ((tp->t_lflag&NOFLSH) == 0) - > ttyflush(tp, FREAD|FWRITE); - > ! pgsignal(tp->t_pgrp, *(unsigned int *)data); - > return(0); - > } - > --- 609,616 ---- - > if ((tp->t_lflag&NOFLSH) == 0) - > ttyflush(tp, FREAD|FWRITE); - > ! pgsignal(tp->t_pgrp, *(unsigned int *)data, 1); - > ! if ((*(unsigned int *)data == SIGINFO) && - > ! ((tp->t_lflag&NOKERNINFO) == 0)) - > ! ttyinfo(tp); - > return(0); - > } - - The client is now smarter when setting the telnet escape - character; it only sets it to one of VEOL and VEOL2 if - one of them is undefined, and the other one is not already - defined to the telnet escape character. - - Handle TERMIOS systems that have seperate input and output - line speed settings imbedded in the flags. - - Many other minor bug fixes. - -June 20, 1990: - Re-organize makefiles and source tree. The telnet/Source - directory is now gone, and all the source that was in - telnet/Source is now just in the telnet directory. - - Seperate makefile for each system are now gone. There - are two makefiles, Makefile and Makefile.generic. - The "Makefile" has the definitions for the various - system, and "Makefile.generic" does all the work. - There is a variable called "WHAT" that is used to - specify what to make. For example, in the telnet - directory, you might say: - make 4.4bsd WHAT=clean - to clean out the directory. - - Add support for the ENVIRON and XDISPLOC options. - In order for the server to work, login has to have - the "-p" option to preserve environment variables. - - Add the SOFT_TAB and LIT_ECHO modes in the LINEMODE support. - - Add the "-l user" option to command line and open command - (This is passed through the ENVIRON option). - - Add the "-e" command line option, for setting the escape - character. - - Add the "-D", diagnostic, option to the server. This allows - the server to print out debug information, which is very - useful when trying to debug a telnet that doesn't have any - debugging ability. - - Turn off the literal next character when not in LINEMODE. - - Don't recognize ^Y locally, just pass it through. - - Make minor modifications for Sun4.0 and Sun4.1 - - Add support for both FORW1 and FORW2 characters. The - telnet escpape character is set to whichever of the - two is not being used. If both are in use, the escape - character is not set, so when in linemode the user will - have to follow the escape character with a or - -libtelnet/Makefile.4.4: -telnet/Makefile.4.4: -telnetd/Makefile.4.4: - These are the makefiles that can be used on a 4.3Reno - system when this software is installed in /usr/src/lib/libtelnet, - /usr/src/libexec/telnetd, and /usr/src/usr.bin/telnet. - - -The following TELNET options are supported: - - LINEMODE: - The LINEMODE option is supported as per RFC1116. The - FORWARDMASK option is not currently supported. - - BINARY: The client has the ability to turn on/off the BINARY - option in each direction. Turning on BINARY from - server to client causes the LITOUT bit to get set in - the terminal driver on both ends, turning on BINARY - from the client to the server causes the PASS8 bit - to get set in the terminal driver on both ends. - - TERMINAL-TYPE: - This is supported as per RFC1091. On the server side, - when a terminal type is received, termcap/terminfo - is consulted to determine if it is a known terminal - type. It keeps requesting terminal types until it - gets one that it recongnizes, or hits the end of the - list. The server side looks up the entry in the - termcap/terminfo data base, and generates a list of - names which it then passes one at a time to each - request for a terminal type, duplicating the last - entry in the list before cycling back to the beginning. - - NAWS: The Negotiate about Window Size, as per RFC 1073. - - TERMINAL-SPEED: - Implemented as per RFC 1079 - - TOGGLE-FLOW-CONTROL: - Implemented as per RFC 1080 - - TIMING-MARK: - As per RFC 860 - - SGA: As per RFC 858 - - ECHO: As per RFC 857 - - LOGOUT: As per RFC 727 - - STATUS: - The server will send its current status upon - request. It does not ask for the clients status. - The client will request the servers current status - from the "send getstatus" command. - - ENVIRON: - This option is currently being defined by the IETF - Telnet Working Group, and an RFC has not yet been - issued, but should be in the near future... - - X-DISPLAY-LOCATION: - This functionality can be done through the ENVIRON - option, it is added here for completeness. - - AUTHENTICATION: - This option is currently being defined by the IETF - Telnet Working Group, and an RFC has not yet been - issued. The basic framework is pretty much decided, - but the definitions for the specific authentication - schemes is still in a state of flux. - - ENCRYPTION: - This option is currently being defined by the IETF - Telnet Working Group, and an RFC has not yet been - issued. The draft RFC is still in a state of flux, - so this code may change in the future. diff --git a/kerberosV/src/appl/telnet/arpa/telnet.h b/kerberosV/src/appl/telnet/arpa/telnet.h deleted file mode 100644 index 5d9ef600162..00000000000 --- a/kerberosV/src/appl/telnet/arpa/telnet.h +++ /dev/null @@ -1,323 +0,0 @@ -/* - * Copyright (c) 1983, 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. - * - * @(#)telnet.h 8.2 (Berkeley) 12/15/93 - */ - -#ifndef _TELNET_H_ -#define _TELNET_H_ - -/* - * Definitions for the TELNET protocol. - */ -#define IAC 255 /* interpret as command: */ -#define DONT 254 /* you are not to use option */ -#define DO 253 /* please, you use option */ -#define WONT 252 /* I won't use option */ -#define WILL 251 /* I will use option */ -#define SB 250 /* interpret as subnegotiation */ -#define GA 249 /* you may reverse the line */ -#define EL 248 /* erase the current line */ -#define EC 247 /* erase the current character */ -#define AYT 246 /* are you there */ -#define AO 245 /* abort output--but let prog finish */ -#define IP 244 /* interrupt process--permanently */ -#define BREAK 243 /* break */ -#define DM 242 /* data mark--for connect. cleaning */ -#define NOP 241 /* nop */ -#define SE 240 /* end sub negotiation */ -#define EOR 239 /* end of record (transparent mode) */ -#define ABORT 238 /* Abort process */ -#define SUSP 237 /* Suspend process */ -#define xEOF 236 /* End of file: EOF is already used... */ - -#define SYNCH 242 /* for telfunc calls */ - -#ifdef TELCMDS -char *telcmds[] = { - "EOF", "SUSP", "ABORT", "EOR", - "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", - "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0, -}; -#else -extern char *telcmds[]; -#endif - -#define TELCMD_FIRST xEOF -#define TELCMD_LAST IAC -#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \ - (unsigned int)(x) >= TELCMD_FIRST) -#define TELCMD(x) telcmds[(x)-TELCMD_FIRST] - -/* telnet options */ -#define TELOPT_BINARY 0 /* 8-bit data path */ -#define TELOPT_ECHO 1 /* echo */ -#define TELOPT_RCP 2 /* prepare to reconnect */ -#define TELOPT_SGA 3 /* suppress go ahead */ -#define TELOPT_NAMS 4 /* approximate message size */ -#define TELOPT_STATUS 5 /* give status */ -#define TELOPT_TM 6 /* timing mark */ -#define TELOPT_RCTE 7 /* remote controlled transmission and echo */ -#define TELOPT_NAOL 8 /* negotiate about output line width */ -#define TELOPT_NAOP 9 /* negotiate about output page size */ -#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */ -#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */ -#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */ -#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */ -#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */ -#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */ -#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */ -#define TELOPT_XASCII 17 /* extended ascic character set */ -#define TELOPT_LOGOUT 18 /* force logout */ -#define TELOPT_BM 19 /* byte macro */ -#define TELOPT_DET 20 /* data entry terminal */ -#define TELOPT_SUPDUP 21 /* supdup protocol */ -#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */ -#define TELOPT_SNDLOC 23 /* send location */ -#define TELOPT_TTYPE 24 /* terminal type */ -#define TELOPT_EOR 25 /* end or record */ -#define TELOPT_TUID 26 /* TACACS user identification */ -#define TELOPT_OUTMRK 27 /* output marking */ -#define TELOPT_TTYLOC 28 /* terminal location number */ -#define TELOPT_3270REGIME 29 /* 3270 regime */ -#define TELOPT_X3PAD 30 /* X.3 PAD */ -#define TELOPT_NAWS 31 /* window size */ -#define TELOPT_TSPEED 32 /* terminal speed */ -#define TELOPT_LFLOW 33 /* remote flow control */ -#define TELOPT_LINEMODE 34 /* Linemode option */ -#define TELOPT_XDISPLOC 35 /* X Display Location */ -#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */ -#define TELOPT_AUTHENTICATION 37/* Authenticate */ -#define TELOPT_ENCRYPT 38 /* Encryption option */ -#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */ -#define TELOPT_EXOPL 255 /* extended-options-list */ - - -#define NTELOPTS (1+TELOPT_NEW_ENVIRON) -#ifdef TELOPTS -char *telopts[NTELOPTS+1] = { - "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", - "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP", - "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS", - "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO", - "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT", - "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", - "TACACS UID", "OUTPUT MARKING", "TTYLOC", - "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", - "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", - 0, -}; -#define TELOPT_FIRST TELOPT_BINARY -#define TELOPT_LAST TELOPT_NEW_ENVIRON -#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST) -#define TELOPT(x) telopts[(x)-TELOPT_FIRST] -#endif - -/* sub-option qualifiers */ -#define TELQUAL_IS 0 /* option is... */ -#define TELQUAL_SEND 1 /* send option */ -#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */ -#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */ -#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */ - -#define LFLOW_OFF 0 /* Disable remote flow control */ -#define LFLOW_ON 1 /* Enable remote flow control */ -#define LFLOW_RESTART_ANY 2 /* Restart output on any char */ -#define LFLOW_RESTART_XON 3 /* Restart output only on XON */ - -/* - * LINEMODE suboptions - */ - -#define LM_MODE 1 -#define LM_FORWARDMASK 2 -#define LM_SLC 3 - -#define MODE_EDIT 0x01 -#define MODE_TRAPSIG 0x02 -#define MODE_ACK 0x04 -#define MODE_SOFT_TAB 0x08 -#define MODE_LIT_ECHO 0x10 - -#define MODE_MASK 0x1f - -/* Not part of protocol, but needed to simplify things... */ -#define MODE_FLOW 0x0100 -#define MODE_ECHO 0x0200 -#define MODE_INBIN 0x0400 -#define MODE_OUTBIN 0x0800 -#define MODE_FORCE 0x1000 - -#define SLC_SYNCH 1 -#define SLC_BRK 2 -#define SLC_IP 3 -#define SLC_AO 4 -#define SLC_AYT 5 -#define SLC_EOR 6 -#define SLC_ABORT 7 -#define SLC_EOF 8 -#define SLC_SUSP 9 -#define SLC_EC 10 -#define SLC_EL 11 -#define SLC_EW 12 -#define SLC_RP 13 -#define SLC_LNEXT 14 -#define SLC_XON 15 -#define SLC_XOFF 16 -#define SLC_FORW1 17 -#define SLC_FORW2 18 - -#define NSLC 18 - -/* - * For backwards compatability, we define SLC_NAMES to be the - * list of names if SLC_NAMES is not defined. - */ -#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \ - "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \ - "LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0, -#ifdef SLC_NAMES -char *slc_names[] = { - SLC_NAMELIST -}; -#else -extern char *slc_names[]; -#define SLC_NAMES SLC_NAMELIST -#endif - -#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC) -#define SLC_NAME(x) slc_names[x] - -#define SLC_NOSUPPORT 0 -#define SLC_CANTCHANGE 1 -#define SLC_VARIABLE 2 -#define SLC_DEFAULT 3 -#define SLC_LEVELBITS 0x03 - -#define SLC_FUNC 0 -#define SLC_FLAGS 1 -#define SLC_VALUE 2 - -#define SLC_ACK 0x80 -#define SLC_FLUSHIN 0x40 -#define SLC_FLUSHOUT 0x20 - -#define OLD_ENV_VAR 1 -#define OLD_ENV_VALUE 0 -#define NEW_ENV_VAR 0 -#define NEW_ENV_VALUE 1 -#define ENV_ESC 2 -#define ENV_USERVAR 3 - -/* - * AUTHENTICATION suboptions - */ - -/* - * Who is authenticating who ... - */ -#define AUTH_WHO_CLIENT 0 /* Client authenticating server */ -#define AUTH_WHO_SERVER 1 /* Server authenticating client */ -#define AUTH_WHO_MASK 1 - -/* - * amount of authentication done - */ -#define AUTH_HOW_ONE_WAY 0 -#define AUTH_HOW_MUTUAL 2 -#define AUTH_HOW_MASK 2 - -#define AUTHTYPE_NULL 0 -#define AUTHTYPE_KERBEROS_V4 1 -#define AUTHTYPE_KERBEROS_V5 2 -#define AUTHTYPE_SPX 3 -#define AUTHTYPE_MINK 4 -#define AUTHTYPE_SRA 5 -#define AUTHTYPE_CNT 6 -/* #define AUTHTYPE_UNSECURE 6 */ - -#define AUTHTYPE_TEST 99 - -#ifdef AUTH_NAMES -char *authtype_names[] = { - "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", - "SRA", 0, -}; -#else -extern char *authtype_names[]; -#endif - -#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT) -#define AUTHTYPE_NAME(x) authtype_names[x] - -/* - * ENCRYPTion suboptions - */ -#define ENCRYPT_IS 0 /* I pick encryption type ... */ -#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */ -#define ENCRYPT_REPLY 2 /* Initial setup response */ -#define ENCRYPT_START 3 /* Am starting to send encrypted */ -#define ENCRYPT_END 4 /* Am ending encrypted */ -#define ENCRYPT_REQSTART 5 /* Request you start encrypting */ -#define ENCRYPT_REQEND 6 /* Request you send encrypting */ -#define ENCRYPT_ENC_KEYID 7 -#define ENCRYPT_DEC_KEYID 8 -#define ENCRYPT_CNT 9 - -#define ENCTYPE_ANY 0 -#define ENCTYPE_DES_CFB64 1 -#define ENCTYPE_DES_OFB64 2 -#define ENCTYPE_CNT 3 - -#ifdef ENCRYPT_NAMES -char *encrypt_names[] = { - "IS", "SUPPORT", "REPLY", "START", "END", - "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID", - 0, -}; -char *enctype_names[] = { - "ANY", "DES_CFB64", "DES_OFB64", 0, -}; -#else -extern char *encrypt_names[]; -extern char *enctype_names[]; -#endif - - -#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT) -#define ENCRYPT_NAME(x) encrypt_names[x] - -#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT) -#define ENCTYPE_NAME(x) enctype_names[x] - -#endif /* !_TELNET_H_ */ diff --git a/kerberosV/src/appl/telnet/libtelnet/Makefile.am b/kerberosV/src/appl/telnet/libtelnet/Makefile.am deleted file mode 100644 index 8f0d82c0aae..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:38 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += -I$(srcdir)/.. $(INCLUDE_hcrypto) - -noinst_LIBRARIES = libtelnet.a - -libtelnet_a_SOURCES = \ - auth-proto.h \ - auth.c \ - auth.h \ - enc-proto.h \ - enc_des.c \ - encrypt.c \ - encrypt.h \ - genget.c \ - kerberos5.c \ - misc-proto.h \ - misc.c \ - misc.h - -EXTRA_DIST = NTMakefile rsaencpwd.c spx.c diff --git a/kerberosV/src/appl/telnet/libtelnet/Makefile.in b/kerberosV/src/appl/telnet/libtelnet/Makefile.in deleted file mode 100644 index ef62dc5e89c..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/Makefile.in +++ /dev/null @@ -1,845 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -subdir = appl/telnet/libtelnet -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libtelnet_a_AR = $(AR) $(ARFLAGS) -libtelnet_a_LIBADD = -am_libtelnet_a_OBJECTS = auth.$(OBJEXT) enc_des.$(OBJEXT) \ - encrypt.$(OBJEXT) genget.$(OBJEXT) kerberos5.$(OBJEXT) \ - misc.$(OBJEXT) -libtelnet_a_OBJECTS = $(am_libtelnet_a_OBJECTS) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libtelnet_a_SOURCES) -DIST_SOURCES = $(libtelnet_a_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -I$(srcdir)/.. $(INCLUDE_hcrypto) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -noinst_LIBRARIES = libtelnet.a -libtelnet_a_SOURCES = \ - auth-proto.h \ - auth.c \ - auth.h \ - enc-proto.h \ - enc_des.c \ - encrypt.c \ - encrypt.h \ - genget.c \ - kerberos5.c \ - misc-proto.h \ - misc.c \ - misc.h - -EXTRA_DIST = NTMakefile rsaencpwd.c spx.c -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/telnet/libtelnet/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/telnet/libtelnet/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libtelnet.a: $(libtelnet_a_OBJECTS) $(libtelnet_a_DEPENDENCIES) - -rm -f libtelnet.a - $(libtelnet_a_AR) libtelnet.a $(libtelnet_a_OBJECTS) $(libtelnet_a_LIBADD) - $(RANLIB) libtelnet.a - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enc_des.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encrypt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genget.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kerberos5.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(LIBRARIES) all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libtool clean-noinstLIBRARIES ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am uninstall-hook - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/telnet/libtelnet/NTMakefile b/kerberosV/src/appl/telnet/libtelnet/NTMakefile deleted file mode 100644 index 25da4ec4def..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\telnet\libtelnet - -!include ../../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/telnet/libtelnet/auth-proto.h b/kerberosV/src/appl/telnet/libtelnet/auth-proto.h deleted file mode 100644 index e6346a8a6ac..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/auth-proto.h +++ /dev/null @@ -1,111 +0,0 @@ -/*- - * Copyright (c) 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. - * - * @(#)auth-proto.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * Copyright (C) 1990 by the Massachusetts Institute of Technology - * - * Export of this software from the United States of America is assumed - * to require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - */ - -/* $Id: auth-proto.h,v 1.3 2013/06/17 19:11:38 robert Exp $ */ - -#ifdef AUTHENTICATION -Authenticator *findauthenticator (int, int); - -int auth_wait (char *, size_t); -void auth_disable_name (char *); -void auth_finished (Authenticator *, int); -void auth_gen_printsub (unsigned char *, size_t, unsigned char *, size_t); -void auth_init (const char *, int); -void auth_is (unsigned char *, int); -void auth_name(unsigned char*, int); -void auth_reply (unsigned char *, int); -void auth_request (void); -void auth_send (unsigned char *, int); -void auth_send_retry (void); -void auth_printsub(unsigned char*, size_t, unsigned char*, size_t); -int getauthmask(char *type, int *maskp); -int auth_enable(char *type); -int auth_disable(char *type); -int auth_onoff(char *type, int on); -int auth_togdebug(int on); -int auth_status(void); -int auth_sendname(unsigned char *cp, int len); -void auth_debug(int mode); - -#ifdef UNSAFE -int unsafe_init (Authenticator *, int); -int unsafe_send (Authenticator *); -void unsafe_is (Authenticator *, unsigned char *, int); -void unsafe_reply (Authenticator *, unsigned char *, int); -int unsafe_status (Authenticator *, char *, int); -void unsafe_printsub (unsigned char *, size_t, unsigned char *, size_t); -#endif - -#ifdef SRA -int sra_init (Authenticator *, int); -int sra_send (Authenticator *); -void sra_is (Authenticator *, unsigned char *, int); -void sra_reply (Authenticator *, unsigned char *, int); -int sra_status (Authenticator *, char *, int); -void sra_printsub (unsigned char *, size_t, unsigned char *, size_t); -#endif - -#ifdef KRB5 -int kerberos5_init (Authenticator *, int); -int kerberos5_send_mutual (Authenticator *); -int kerberos5_send_oneway (Authenticator *); -void kerberos5_is (Authenticator *, unsigned char *, int); -void kerberos5_reply (Authenticator *, unsigned char *, int); -int kerberos5_status (Authenticator *, char *, size_t, int); -void kerberos5_printsub (unsigned char *, size_t, unsigned char *, size_t); -int kerberos5_set_forward(int); -int kerberos5_set_forwardable(int); -#endif -#endif diff --git a/kerberosV/src/appl/telnet/libtelnet/auth.c b/kerberosV/src/appl/telnet/libtelnet/auth.c deleted file mode 100644 index 09afdb60592..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/auth.c +++ /dev/null @@ -1,628 +0,0 @@ -/*- - * Copyright (c) 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. - */ - -/* - * Copyright (C) 1990 by the Massachusetts Institute of Technology - * - * Export of this software from the United States of America is assumed - * to require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - */ - -#include - -RCSID("$Id: auth.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#if defined(AUTHENTICATION) -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#include -#define AUTH_NAMES -#ifdef HAVE_ARPA_TELNET_H -#include -#endif -#include -#include - -#include - -#ifdef SOCKS -#include -#endif - -#include "encrypt.h" -#include "auth.h" -#include "misc-proto.h" -#include "auth-proto.h" - -#define typemask(x) (1<<((x)-1)) - -#ifdef RSA_ENCPWD -extern rsaencpwd_init(); -extern rsaencpwd_send(); -extern rsaencpwd_is(); -extern rsaencpwd_reply(); -extern rsaencpwd_status(); -extern rsaencpwd_printsub(); -#endif - -int auth_debug_mode = 0; -int auth_has_failed = 0; -int auth_enable_encrypt = 0; -static const char *Name = "Noname"; -static int Server = 0; -static Authenticator *authenticated = 0; -static int authenticating = 0; -static int validuser = 0; -static unsigned char _auth_send_data[256]; -static unsigned char *auth_send_data; -static int auth_send_cnt = 0; - -/* - * Authentication types supported. Plese note that these are stored - * in priority order, i.e. try the first one first. - */ -Authenticator authenticators[] = { -#ifdef UNSAFE - { AUTHTYPE_UNSAFE, AUTH_WHO_CLIENT|AUTH_HOW_ONE_WAY, - unsafe_init, - unsafe_send, - unsafe_is, - unsafe_reply, - unsafe_status, - unsafe_printsub }, -#endif -#ifdef SRA - { AUTHTYPE_SRA, AUTH_WHO_CLIENT|AUTH_HOW_ONE_WAY, - sra_init, - sra_send, - sra_is, - sra_reply, - sra_status, - sra_printsub }, -#endif -#ifdef SPX - { AUTHTYPE_SPX, AUTH_WHO_CLIENT|AUTH_HOW_MUTUAL, - spx_init, - spx_send, - spx_is, - spx_reply, - spx_status, - spx_printsub }, - { AUTHTYPE_SPX, AUTH_WHO_CLIENT|AUTH_HOW_ONE_WAY, - spx_init, - spx_send, - spx_is, - spx_reply, - spx_status, - spx_printsub }, -#endif -#ifdef KRB5 - { AUTHTYPE_KERBEROS_V5, AUTH_WHO_CLIENT|AUTH_HOW_MUTUAL, - kerberos5_init, - kerberos5_send_mutual, - kerberos5_is, - kerberos5_reply, - kerberos5_status, - kerberos5_printsub }, - { AUTHTYPE_KERBEROS_V5, AUTH_WHO_CLIENT|AUTH_HOW_ONE_WAY, - kerberos5_init, - kerberos5_send_oneway, - kerberos5_is, - kerberos5_reply, - kerberos5_status, - kerberos5_printsub }, -#endif -#ifdef RSA_ENCPWD - { AUTHTYPE_RSA_ENCPWD, AUTH_WHO_CLIENT|AUTH_HOW_ONE_WAY, - rsaencpwd_init, - rsaencpwd_send, - rsaencpwd_is, - rsaencpwd_reply, - rsaencpwd_status, - rsaencpwd_printsub }, -#endif - { 0, }, -}; - -static Authenticator NoAuth = { 0 }; - -static int i_support = 0; -static int i_wont_support = 0; - -Authenticator * -findauthenticator(int type, int way) -{ - Authenticator *ap = authenticators; - - while (ap->type && (ap->type != type || ap->way != way)) - ++ap; - return(ap->type ? ap : 0); -} - -void -auth_init(const char *name, int server) -{ - Authenticator *ap = authenticators; - - Server = server; - Name = name; - - i_support = 0; - authenticated = 0; - authenticating = 0; - while (ap->type) { - if (!ap->init || (*ap->init)(ap, server)) { - i_support |= typemask(ap->type); - if (auth_debug_mode) - printf(">>>%s: I support auth type %d %d\r\n", - Name, - ap->type, ap->way); - } - else if (auth_debug_mode) - printf(">>>%s: Init failed: auth type %d %d\r\n", - Name, ap->type, ap->way); - ++ap; - } -} - -void -auth_disable_name(char *name) -{ - int x; - for (x = 0; x < AUTHTYPE_CNT; ++x) { - if (!strcasecmp(name, AUTHTYPE_NAME(x))) { - i_wont_support |= typemask(x); - break; - } - } -} - -int -getauthmask(char *type, int *maskp) -{ - int x; - - if (!strcasecmp(type, AUTHTYPE_NAME(0))) { - *maskp = -1; - return(1); - } - - for (x = 1; x < AUTHTYPE_CNT; ++x) { - if (!strcasecmp(type, AUTHTYPE_NAME(x))) { - *maskp = typemask(x); - return(1); - } - } - return(0); -} - -int -auth_enable(char *type) -{ - return(auth_onoff(type, 1)); -} - -int -auth_disable(char *type) -{ - return(auth_onoff(type, 0)); -} - -int -auth_onoff(char *type, int on) -{ - int i, mask = -1; - Authenticator *ap; - - if (!strcasecmp(type, "?") || !strcasecmp(type, "help")) { - printf("auth %s 'type'\n", on ? "enable" : "disable"); - printf("Where 'type' is one of:\n"); - printf("\t%s\n", AUTHTYPE_NAME(0)); - mask = 0; - for (ap = authenticators; ap->type; ap++) { - if ((mask & (i = typemask(ap->type))) != 0) - continue; - mask |= i; - printf("\t%s\n", AUTHTYPE_NAME(ap->type)); - } - return(0); - } - - if (!getauthmask(type, &mask)) { - printf("%s: invalid authentication type\n", type); - return(0); - } - if (on) - i_wont_support &= ~mask; - else - i_wont_support |= mask; - return(1); -} - -int -auth_togdebug(int on) -{ - if (on < 0) - auth_debug_mode ^= 1; - else - auth_debug_mode = on; - printf("auth debugging %s\n", auth_debug_mode ? "enabled" : "disabled"); - return(1); -} - -int -auth_status(void) -{ - Authenticator *ap; - int i, mask; - - if (i_wont_support == -1) - printf("Authentication disabled\n"); - else - printf("Authentication enabled\n"); - - mask = 0; - for (ap = authenticators; ap->type; ap++) { - if ((mask & (i = typemask(ap->type))) != 0) - continue; - mask |= i; - printf("%s: %s\n", AUTHTYPE_NAME(ap->type), - (i_wont_support & typemask(ap->type)) ? - "disabled" : "enabled"); - } - return(1); -} - -/* - * This routine is called by the server to start authentication - * negotiation. - */ -void -auth_request(void) -{ - static unsigned char str_request[64] = { IAC, SB, - TELOPT_AUTHENTICATION, - TELQUAL_SEND, }; - Authenticator *ap = authenticators; - unsigned char *e = str_request + 4; - - if (!authenticating) { - authenticating = 1; - while (ap->type) { - if (i_support & ~i_wont_support & typemask(ap->type)) { - if (auth_debug_mode) { - printf(">>>%s: Sending type %d %d\r\n", - Name, ap->type, ap->way); - } - *e++ = ap->type; - *e++ = ap->way; - } - ++ap; - } - *e++ = IAC; - *e++ = SE; - telnet_net_write(str_request, e - str_request); - printsub('>', &str_request[2], e - str_request - 2); - } -} - -/* - * This is called when an AUTH SEND is received. - * It should never arrive on the server side (as only the server can - * send an AUTH SEND). - * You should probably respond to it if you can... - * - * If you want to respond to the types out of order (i.e. even - * if he sends LOGIN KERBEROS and you support both, you respond - * with KERBEROS instead of LOGIN (which is against what the - * protocol says)) you will have to hack this code... - */ -void -auth_send(unsigned char *data, int cnt) -{ - Authenticator *ap; - static unsigned char str_none[] = { IAC, SB, TELOPT_AUTHENTICATION, - TELQUAL_IS, AUTHTYPE_NULL, 0, - IAC, SE }; - if (Server) { - if (auth_debug_mode) { - printf(">>>%s: auth_send called!\r\n", Name); - } - return; - } - - if (auth_debug_mode) { - printf(">>>%s: auth_send got:", Name); - printd(data, cnt); printf("\r\n"); - } - - /* - * Save the data, if it is new, so that we can continue looking - * at it if the authorization we try doesn't work - */ - if (data < _auth_send_data || - data > _auth_send_data + sizeof(_auth_send_data)) { - auth_send_cnt = cnt > sizeof(_auth_send_data) - ? sizeof(_auth_send_data) - : cnt; - memmove(_auth_send_data, data, auth_send_cnt); - auth_send_data = _auth_send_data; - } else { - /* - * This is probably a no-op, but we just make sure - */ - auth_send_data = data; - auth_send_cnt = cnt; - } - while ((auth_send_cnt -= 2) >= 0) { - if (auth_debug_mode) - printf(">>>%s: He supports %d\r\n", - Name, *auth_send_data); - if ((i_support & ~i_wont_support) & typemask(*auth_send_data)) { - ap = findauthenticator(auth_send_data[0], - auth_send_data[1]); - if (ap && ap->send) { - if (auth_debug_mode) - printf(">>>%s: Trying %d %d\r\n", - Name, auth_send_data[0], - auth_send_data[1]); - if ((*ap->send)(ap)) { - /* - * Okay, we found one we like - * and did it. - * we can go home now. - */ - if (auth_debug_mode) - printf(">>>%s: Using type %d\r\n", - Name, *auth_send_data); - auth_send_data += 2; - return; - } - } - /* else - * just continue on and look for the - * next one if we didn't do anything. - */ - } - auth_send_data += 2; - } - telnet_net_write(str_none, sizeof(str_none)); - printsub('>', &str_none[2], sizeof(str_none) - 2); - if (auth_debug_mode) - printf(">>>%s: Sent failure message\r\n", Name); - auth_finished(0, AUTH_REJECT); - auth_has_failed = 1; -#ifdef KANNAN - /* - * We requested strong authentication, however no mechanisms worked. - * Therefore, exit on client end. - */ - printf("Unable to securely authenticate user ... exit\n"); - exit(0); -#endif /* KANNAN */ -} - -void -auth_send_retry(void) -{ - /* - * if auth_send_cnt <= 0 then auth_send will end up rejecting - * the authentication and informing the other side of this. - */ - auth_send(auth_send_data, auth_send_cnt); -} - -void -auth_is(unsigned char *data, int cnt) -{ - Authenticator *ap; - - if (cnt < 2) - return; - - if (data[0] == AUTHTYPE_NULL) { - auth_finished(0, AUTH_REJECT); - return; - } - - if ((ap = findauthenticator(data[0], data[1]))) { - if (ap->is) - (*ap->is)(ap, data+2, cnt-2); - } else if (auth_debug_mode) - printf(">>>%s: Invalid authentication in IS: %d\r\n", - Name, *data); -} - -void -auth_reply(unsigned char *data, int cnt) -{ - Authenticator *ap; - - if (cnt < 2) - return; - - if ((ap = findauthenticator(data[0], data[1]))) { - if (ap->reply) - (*ap->reply)(ap, data+2, cnt-2); - } else if (auth_debug_mode) - printf(">>>%s: Invalid authentication in SEND: %d\r\n", - Name, *data); -} - -void -auth_name(unsigned char *data, int cnt) -{ - char savename[256]; - - if (cnt < 1) { - if (auth_debug_mode) - printf(">>>%s: Empty name in NAME\r\n", Name); - return; - } - if (cnt > sizeof(savename) - 1) { - if (auth_debug_mode) - printf(">>>%s: Name in NAME (%d) exceeds %lu length\r\n", - Name, cnt, (unsigned long)(sizeof(savename)-1)); - return; - } - memmove(savename, data, cnt); - savename[cnt] = '\0'; /* Null terminate */ - if (auth_debug_mode) - printf(">>>%s: Got NAME [%s]\r\n", Name, savename); - auth_encrypt_user(savename); -} - -int -auth_sendname(unsigned char *cp, int len) -{ - static unsigned char str_request[256+6] - = { IAC, SB, TELOPT_AUTHENTICATION, TELQUAL_NAME, }; - unsigned char *e = str_request + 4; - unsigned char *ee = &str_request[sizeof(str_request)-2]; - - while (--len >= 0) { - if ((*e++ = *cp++) == IAC) - *e++ = IAC; - if (e >= ee) - return(0); - } - *e++ = IAC; - *e++ = SE; - telnet_net_write(str_request, e - str_request); - printsub('>', &str_request[2], e - &str_request[2]); - return(1); -} - -void -auth_finished(Authenticator *ap, int result) -{ - if (!(authenticated = ap)) - authenticated = &NoAuth; - validuser = result; -} - -/* ARGSUSED */ -static void -auth_intr(int sig) -{ - auth_finished(0, AUTH_REJECT); -} - -int -auth_wait(char *name, size_t name_sz) -{ - if (auth_debug_mode) - printf(">>>%s: in auth_wait.\r\n", Name); - - if (Server && !authenticating) - return(0); - - signal(SIGALRM, auth_intr); - alarm(30); - while (!authenticated) - if (telnet_spin()) - break; - alarm(0); - signal(SIGALRM, SIG_DFL); - - /* - * Now check to see if the user is valid or not - */ - if (!authenticated || authenticated == &NoAuth) - return(AUTH_REJECT); - - if (validuser == AUTH_VALID) - validuser = AUTH_USER; - - if (authenticated->status) - validuser = (*authenticated->status)(authenticated, - name, name_sz, - validuser); - return(validuser); -} - -void -auth_debug(int mode) -{ - auth_debug_mode = mode; -} - -void -auth_printsub(unsigned char *data, size_t cnt, - unsigned char *buf, size_t buflen) -{ - Authenticator *ap; - - if ((ap = findauthenticator(data[1], data[2])) && ap->printsub) - (*ap->printsub)(data, cnt, buf, buflen); - else - auth_gen_printsub(data, cnt, buf, buflen); -} - -void -auth_gen_printsub(unsigned char *data, size_t cnt, - unsigned char *buf, size_t buflen) -{ - unsigned char *cp; - unsigned char tbuf[16]; - - cnt -= 3; - data += 3; - buf[buflen-1] = '\0'; - buf[buflen-2] = '*'; - buflen -= 2; - for (; cnt > 0; cnt--, data++) { - snprintf((char*)tbuf, sizeof(tbuf), " %d", *data); - for (cp = tbuf; *cp && buflen > 0; --buflen) - *buf++ = *cp++; - if (buflen <= 0) - return; - } - *buf = '\0'; -} -#endif diff --git a/kerberosV/src/appl/telnet/libtelnet/auth.h b/kerberosV/src/appl/telnet/libtelnet/auth.h deleted file mode 100644 index 7ac3acca944..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/auth.h +++ /dev/null @@ -1,81 +0,0 @@ -/*- - * Copyright (c) 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. - * - * @(#)auth.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * Copyright (C) 1990 by the Massachusetts Institute of Technology - * - * Export of this software from the United States of America is assumed - * to require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - */ - -/* $Id: auth.h,v 1.3 2013/06/17 19:11:38 robert Exp $ */ - -#ifndef __AUTH__ -#define __AUTH__ - -#define AUTH_REJECT 0 /* Rejected */ -#define AUTH_UNKNOWN 1 /* We don't know who he is, but he's okay */ -#define AUTH_OTHER 2 /* We know him, but not his name */ -#define AUTH_USER 3 /* We know he name */ -#define AUTH_VALID 4 /* We know him, and he needs no password */ - -typedef struct XauthP { - int type; - int way; - int (*init) (struct XauthP *, int); - int (*send) (struct XauthP *); - void (*is) (struct XauthP *, unsigned char *, int); - void (*reply) (struct XauthP *, unsigned char *, int); - int (*status) (struct XauthP *, char *, size_t, int); - void (*printsub) (unsigned char *, size_t, unsigned char *, size_t); -} Authenticator; - -#include "auth-proto.h" - -extern int auth_debug_mode; -#endif diff --git a/kerberosV/src/appl/telnet/libtelnet/enc-proto.h b/kerberosV/src/appl/telnet/libtelnet/enc-proto.h deleted file mode 100644 index bda82407016..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/enc-proto.h +++ /dev/null @@ -1,133 +0,0 @@ -/*- - * Copyright (c) 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. - * - * @(#)enc-proto.h 8.1 (Berkeley) 6/4/93 - * - * @(#)enc-proto.h 5.2 (Berkeley) 3/22/91 - */ - -/* - * Copyright (C) 1990 by the Massachusetts Institute of Technology - * - * Export of this software from the United States of America is assumed - * to require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - */ - -/* $Id: enc-proto.h,v 1.3 2013/06/17 19:11:38 robert Exp $ */ - -#if defined(ENCRYPTION) -Encryptions *findencryption (int); -Encryptions *finddecryption(int); -int EncryptAutoDec(int); -int EncryptAutoEnc(int); -int EncryptDebug(int); -int EncryptDisable(char*, char*); -int EncryptEnable(char*, char*); -int EncryptStart(char*); -int EncryptStartInput(void); -int EncryptStartOutput(void); -int EncryptStatus(void); -int EncryptStop(char*); -int EncryptStopInput(void); -int EncryptStopOutput(void); -int EncryptType(char*, char*); -int EncryptVerbose(int); -void decrypt_auto(int); -void encrypt_auto(int); -void encrypt_debug(int); -void encrypt_dec_keyid(unsigned char*, int); -void encrypt_display(void); -void encrypt_enc_keyid(unsigned char*, int); -void encrypt_end(void); -void encrypt_gen_printsub(unsigned char*, size_t, unsigned char*, size_t); -void encrypt_init(const char*, int); -void encrypt_is(unsigned char*, int); -void encrypt_list_types(void); -void encrypt_not(void); -void encrypt_printsub(unsigned char*, size_t, unsigned char*, size_t); -void encrypt_reply(unsigned char*, int); -void encrypt_request_end(void); -void encrypt_request_start(unsigned char*, int); -void encrypt_send_end(void); -void encrypt_send_keyid(int, unsigned char*, int, int); -void encrypt_send_request_end(void); -int encrypt_is_encrypting(void); -void encrypt_send_request_start(void); -void encrypt_send_support(void); -void encrypt_session_key(Session_Key*, int); -void encrypt_start(unsigned char*, int); -void encrypt_start_output(int); -void encrypt_support(unsigned char*, int); -void encrypt_verbose_quiet(int); -void encrypt_wait(void); -int encrypt_delay(void); - -#ifdef TELENTD -void encrypt_wait (void); -#else -void encrypt_display (void); -#endif - -void cfb64_encrypt (unsigned char *, int); -int cfb64_decrypt (int); -void cfb64_init (int); -int cfb64_start (int, int); -int cfb64_is (unsigned char *, int); -int cfb64_reply (unsigned char *, int); -void cfb64_session (Session_Key *, int); -int cfb64_keyid (int, unsigned char *, int *); -void cfb64_printsub (unsigned char *, size_t, unsigned char *, size_t); - -void ofb64_encrypt (unsigned char *, int); -int ofb64_decrypt (int); -void ofb64_init (int); -int ofb64_start (int, int); -int ofb64_is (unsigned char *, int); -int ofb64_reply (unsigned char *, int); -void ofb64_session (Session_Key *, int); -int ofb64_keyid (int, unsigned char *, int *); -void ofb64_printsub (unsigned char *, size_t, unsigned char *, size_t); - -#endif diff --git a/kerberosV/src/appl/telnet/libtelnet/enc_des.c b/kerberosV/src/appl/telnet/libtelnet/enc_des.c deleted file mode 100644 index 96527f51dd4..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/enc_des.c +++ /dev/null @@ -1,659 +0,0 @@ -/*- - * Copyright (c) 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. - */ - -#include - -RCSID("$Id: enc_des.c,v 1.4 2013/06/17 19:11:38 robert Exp $"); - -#if defined(AUTHENTICATION) && defined(ENCRYPTION) && defined(DES_ENCRYPTION) -#include -#include -#ifdef __STDC__ -#include -#include -#endif -#include -#ifdef SOCKS -#include -#endif - -#include "encrypt.h" -#include "misc-proto.h" - -#include "crypto-headers.h" - -extern int encrypt_debug_mode; - -#define CFB 0 -#define OFB 1 - -#define NO_SEND_IV 1 -#define NO_RECV_IV 2 -#define NO_KEYID 4 -#define IN_PROGRESS (NO_SEND_IV|NO_RECV_IV|NO_KEYID) -#define SUCCESS 0 -#define FAILED -1 - - -struct stinfo { - DES_cblock str_output; - DES_cblock str_feed; - DES_cblock str_iv; - DES_cblock str_ikey; - DES_key_schedule str_sched; - int str_index; - int str_flagshift; -}; - -struct fb { - DES_cblock krbdes_key; - DES_key_schedule krbdes_sched; - DES_cblock temp_feed; - unsigned char fb_feed[64]; - int need_start; - int state[2]; - int keyid[2]; - struct stinfo streams[2]; -}; - -static struct fb fb[2]; - -struct keyidlist { - char *keyid; - int keyidlen; - char *key; - int keylen; - int flags; -} keyidlist [] = { - { "\0", 1, 0, 0, 0 }, /* default key of zero */ - { 0, 0, 0, 0, 0 } -}; - -#define KEYFLAG_MASK 03 - -#define KEYFLAG_NOINIT 00 -#define KEYFLAG_INIT 01 -#define KEYFLAG_OK 02 -#define KEYFLAG_BAD 03 - -#define KEYFLAG_SHIFT 2 - -#define SHIFT_VAL(a,b) (KEYFLAG_SHIFT*((a)+((b)*2))) - -#define FB64_IV 1 -#define FB64_IV_OK 2 -#define FB64_IV_BAD 3 - - -void fb64_stream_iv (DES_cblock, struct stinfo *); -void fb64_init (struct fb *); -static int fb64_start (struct fb *, int, int); -int fb64_is (unsigned char *, int, struct fb *); -int fb64_reply (unsigned char *, int, struct fb *); -static void fb64_session (Session_Key *, int, struct fb *); -void fb64_stream_key (DES_cblock, struct stinfo *); -int fb64_keyid (int, unsigned char *, int *, struct fb *); -void fb64_printsub(unsigned char *, size_t , - unsigned char *, size_t , char *); - -void cfb64_init(int server) -{ - fb64_init(&fb[CFB]); - fb[CFB].fb_feed[4] = ENCTYPE_DES_CFB64; - fb[CFB].streams[0].str_flagshift = SHIFT_VAL(0, CFB); - fb[CFB].streams[1].str_flagshift = SHIFT_VAL(1, CFB); -} - - -void ofb64_init(int server) -{ - fb64_init(&fb[OFB]); - fb[OFB].fb_feed[4] = ENCTYPE_DES_OFB64; - fb[CFB].streams[0].str_flagshift = SHIFT_VAL(0, OFB); - fb[CFB].streams[1].str_flagshift = SHIFT_VAL(1, OFB); -} - -void fb64_init(struct fb *fbp) -{ - memset(fbp,0, sizeof(*fbp)); - fbp->state[0] = fbp->state[1] = FAILED; - fbp->fb_feed[0] = IAC; - fbp->fb_feed[1] = SB; - fbp->fb_feed[2] = TELOPT_ENCRYPT; - fbp->fb_feed[3] = ENCRYPT_IS; -} - -/* - * Returns: - * -1: some error. Negotiation is done, encryption not ready. - * 0: Successful, initial negotiation all done. - * 1: successful, negotiation not done yet. - * 2: Not yet. Other things (like getting the key from - * Kerberos) have to happen before we can continue. - */ -int cfb64_start(int dir, int server) -{ - return(fb64_start(&fb[CFB], dir, server)); -} - -int ofb64_start(int dir, int server) -{ - return(fb64_start(&fb[OFB], dir, server)); -} - -static int fb64_start(struct fb *fbp, int dir, int server) -{ - int x; - unsigned char *p; - int state; - - switch (dir) { - case DIR_DECRYPT: - /* - * This is simply a request to have the other side - * start output (our input). He will negotiate an - * IV so we need not look for it. - */ - state = fbp->state[dir-1]; - if (state == FAILED) - state = IN_PROGRESS; - break; - - case DIR_ENCRYPT: - state = fbp->state[dir-1]; - if (state == FAILED) - state = IN_PROGRESS; - else if ((state & NO_SEND_IV) == 0) { - break; - } - - if (!VALIDKEY(fbp->krbdes_key)) { - fbp->need_start = 1; - break; - } - - state &= ~NO_SEND_IV; - state |= NO_RECV_IV; - if (encrypt_debug_mode) - printf("Creating new feed\r\n"); - /* - * Create a random feed and send it over. - */ - do { - if (RAND_bytes(fbp->temp_feed, - sizeof(*fbp->temp_feed)) != 1) - abort(); - DES_set_odd_parity(&fbp->temp_feed); - } while(DES_is_weak_key(&fbp->temp_feed)); - - p = fbp->fb_feed + 3; - *p++ = ENCRYPT_IS; - p++; - *p++ = FB64_IV; - for (x = 0; x < sizeof(DES_cblock); ++x) { - if ((*p++ = fbp->temp_feed[x]) == IAC) - *p++ = IAC; - } - *p++ = IAC; - *p++ = SE; - printsub('>', &fbp->fb_feed[2], p - &fbp->fb_feed[2]); - telnet_net_write(fbp->fb_feed, p - fbp->fb_feed); - break; - default: - return(FAILED); - } - return(fbp->state[dir-1] = state); -} - -/* - * Returns: - * -1: some error. Negotiation is done, encryption not ready. - * 0: Successful, initial negotiation all done. - * 1: successful, negotiation not done yet. - */ - -int cfb64_is(unsigned char *data, int cnt) -{ - return(fb64_is(data, cnt, &fb[CFB])); -} - -int ofb64_is(unsigned char *data, int cnt) -{ - return(fb64_is(data, cnt, &fb[OFB])); -} - - -int fb64_is(unsigned char *data, int cnt, struct fb *fbp) -{ - unsigned char *p; - int state = fbp->state[DIR_DECRYPT-1]; - - if (cnt-- < 1) - goto failure; - - switch (*data++) { - case FB64_IV: - if (cnt != sizeof(DES_cblock)) { - if (encrypt_debug_mode) - printf("CFB64: initial vector failed on size\r\n"); - state = FAILED; - goto failure; - } - - if (encrypt_debug_mode) - printf("CFB64: initial vector received\r\n"); - - if (encrypt_debug_mode) - printf("Initializing Decrypt stream\r\n"); - - fb64_stream_iv(data, &fbp->streams[DIR_DECRYPT-1]); - - p = fbp->fb_feed + 3; - *p++ = ENCRYPT_REPLY; - p++; - *p++ = FB64_IV_OK; - *p++ = IAC; - *p++ = SE; - printsub('>', &fbp->fb_feed[2], p - &fbp->fb_feed[2]); - telnet_net_write(fbp->fb_feed, p - fbp->fb_feed); - - state = fbp->state[DIR_DECRYPT-1] = IN_PROGRESS; - break; - - default: - if (encrypt_debug_mode) { - printf("Unknown option type: %d\r\n", *(data-1)); - printd(data, cnt); - printf("\r\n"); - } - /* FALL THROUGH */ - failure: - /* - * We failed. Send an FB64_IV_BAD option - * to the other side so it will know that - * things failed. - */ - p = fbp->fb_feed + 3; - *p++ = ENCRYPT_REPLY; - p++; - *p++ = FB64_IV_BAD; - *p++ = IAC; - *p++ = SE; - printsub('>', &fbp->fb_feed[2], p - &fbp->fb_feed[2]); - telnet_net_write(fbp->fb_feed, p - fbp->fb_feed); - - break; - } - return(fbp->state[DIR_DECRYPT-1] = state); -} - -/* - * Returns: - * -1: some error. Negotiation is done, encryption not ready. - * 0: Successful, initial negotiation all done. - * 1: successful, negotiation not done yet. - */ - -int cfb64_reply(unsigned char *data, int cnt) -{ - return(fb64_reply(data, cnt, &fb[CFB])); -} - -int ofb64_reply(unsigned char *data, int cnt) -{ - return(fb64_reply(data, cnt, &fb[OFB])); -} - - -int fb64_reply(unsigned char *data, int cnt, struct fb *fbp) -{ - int state = fbp->state[DIR_ENCRYPT-1]; - - if (cnt-- < 1) - goto failure; - - switch (*data++) { - case FB64_IV_OK: - fb64_stream_iv(fbp->temp_feed, &fbp->streams[DIR_ENCRYPT-1]); - if (state == FAILED) - state = IN_PROGRESS; - state &= ~NO_RECV_IV; - encrypt_send_keyid(DIR_ENCRYPT, (unsigned char *)"\0", 1, 1); - break; - - case FB64_IV_BAD: - memset(fbp->temp_feed, 0, sizeof(DES_cblock)); - fb64_stream_iv(fbp->temp_feed, &fbp->streams[DIR_ENCRYPT-1]); - state = FAILED; - break; - - default: - if (encrypt_debug_mode) { - printf("Unknown option type: %d\r\n", data[-1]); - printd(data, cnt); - printf("\r\n"); - } - /* FALL THROUGH */ - failure: - state = FAILED; - break; - } - return(fbp->state[DIR_ENCRYPT-1] = state); -} - -void cfb64_session(Session_Key *key, int server) -{ - fb64_session(key, server, &fb[CFB]); -} - -void ofb64_session(Session_Key *key, int server) -{ - fb64_session(key, server, &fb[OFB]); -} - -static void fb64_session(Session_Key *key, int server, struct fb *fbp) -{ - - if (!key || key->type != SK_DES) { - if (encrypt_debug_mode) - printf("Can't set krbdes's session key (%d != %d)\r\n", - key ? key->type : -1, SK_DES); - return; - } - memcpy(fbp->krbdes_key, key->data, sizeof(DES_cblock)); - - fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_ENCRYPT-1]); - fb64_stream_key(fbp->krbdes_key, &fbp->streams[DIR_DECRYPT-1]); - - RAND_seed(key->data, key->length); - - DES_set_key_checked((DES_cblock *)&fbp->krbdes_key, - &fbp->krbdes_sched); - /* - * Now look to see if krbdes_start() was waiting for the key to - * show up. If so, go ahead an call it now that we have the key. - */ - if (fbp->need_start) { - fbp->need_start = 0; - fb64_start(fbp, DIR_ENCRYPT, server); - } -} - -/* - * We only accept a keyid of 0. If we get a keyid of - * 0, then mark the state as SUCCESS. - */ - -int cfb64_keyid(int dir, unsigned char *kp, int *lenp) -{ - return(fb64_keyid(dir, kp, lenp, &fb[CFB])); -} - -int ofb64_keyid(int dir, unsigned char *kp, int *lenp) -{ - return(fb64_keyid(dir, kp, lenp, &fb[OFB])); -} - -int fb64_keyid(int dir, unsigned char *kp, int *lenp, struct fb *fbp) -{ - int state = fbp->state[dir-1]; - - if (*lenp != 1 || (*kp != '\0')) { - *lenp = 0; - return(state); - } - - if (state == FAILED) - state = IN_PROGRESS; - - state &= ~NO_KEYID; - - return(fbp->state[dir-1] = state); -} - -void fb64_printsub(unsigned char *data, size_t cnt, - unsigned char *buf, size_t buflen, char *type) -{ - char lbuf[32]; - int i; - char *cp; - - buf[buflen-1] = '\0'; /* make sure it's NULL terminated */ - buflen -= 1; - - switch(data[2]) { - case FB64_IV: - snprintf(lbuf, sizeof(lbuf), "%s_IV", type); - cp = lbuf; - goto common; - - case FB64_IV_OK: - snprintf(lbuf, sizeof(lbuf), "%s_IV_OK", type); - cp = lbuf; - goto common; - - case FB64_IV_BAD: - snprintf(lbuf, sizeof(lbuf), "%s_IV_BAD", type); - cp = lbuf; - goto common; - - default: - snprintf(lbuf, sizeof(lbuf), " %d (unknown)", data[2]); - cp = lbuf; - common: - for (; (buflen > 0) && (*buf = *cp++); buf++) - buflen--; - for (i = 3; i < cnt; i++) { - snprintf(lbuf, sizeof(lbuf), " %d", data[i]); - for (cp = lbuf; (buflen > 0) && (*buf = *cp++); buf++) - buflen--; - } - break; - } -} - -void cfb64_printsub(unsigned char *data, size_t cnt, - unsigned char *buf, size_t buflen) -{ - fb64_printsub(data, cnt, buf, buflen, "CFB64"); -} - -void ofb64_printsub(unsigned char *data, size_t cnt, - unsigned char *buf, size_t buflen) -{ - fb64_printsub(data, cnt, buf, buflen, "OFB64"); -} - -void fb64_stream_iv(DES_cblock seed, struct stinfo *stp) -{ - - memcpy(stp->str_iv, seed,sizeof(DES_cblock)); - memcpy(stp->str_output, seed, sizeof(DES_cblock)); - - DES_set_key_checked(&stp->str_ikey, &stp->str_sched); - - stp->str_index = sizeof(DES_cblock); -} - -void fb64_stream_key(DES_cblock key, struct stinfo *stp) -{ - memcpy(stp->str_ikey, key, sizeof(DES_cblock)); - DES_set_key_checked((DES_cblock*)key, &stp->str_sched); - - memcpy(stp->str_output, stp->str_iv, sizeof(DES_cblock)); - - stp->str_index = sizeof(DES_cblock); -} - -/* - * DES 64 bit Cipher Feedback - * - * key --->+-----+ - * +->| DES |--+ - * | +-----+ | - * | v - * INPUT --(--------->(+)+---> DATA - * | | - * +-------------+ - * - * - * Given: - * iV: Initial vector, 64 bits (8 bytes) long. - * Dn: the nth chunk of 64 bits (8 bytes) of data to encrypt (decrypt). - * On: the nth chunk of 64 bits (8 bytes) of encrypted (decrypted) output. - * - * V0 = DES(iV, key) - * On = Dn ^ Vn - * V(n+1) = DES(On, key) - */ - -void cfb64_encrypt(unsigned char *s, int c) -{ - struct stinfo *stp = &fb[CFB].streams[DIR_ENCRYPT-1]; - int index; - - index = stp->str_index; - while (c-- > 0) { - if (index == sizeof(DES_cblock)) { - DES_cblock b; - DES_ecb_encrypt(&stp->str_output, &b,&stp->str_sched, 1); - memcpy(stp->str_feed, b, sizeof(DES_cblock)); - index = 0; - } - - /* On encryption, we store (feed ^ data) which is cypher */ - *s = stp->str_output[index] = (stp->str_feed[index] ^ *s); - s++; - index++; - } - stp->str_index = index; -} - -int cfb64_decrypt(int data) -{ - struct stinfo *stp = &fb[CFB].streams[DIR_DECRYPT-1]; - int index; - - if (data == -1) { - /* - * Back up one byte. It is assumed that we will - * never back up more than one byte. If we do, this - * may or may not work. - */ - if (stp->str_index) - --stp->str_index; - return(0); - } - - index = stp->str_index++; - if (index == sizeof(DES_cblock)) { - DES_cblock b; - DES_ecb_encrypt(&stp->str_output,&b, &stp->str_sched, 1); - memcpy(stp->str_feed, b, sizeof(DES_cblock)); - stp->str_index = 1; /* Next time will be 1 */ - index = 0; /* But now use 0 */ - } - - /* On decryption we store (data) which is cypher. */ - stp->str_output[index] = data; - return(data ^ stp->str_feed[index]); -} - -/* - * DES 64 bit Output Feedback - * - * key --->+-----+ - * +->| DES |--+ - * | +-----+ | - * +-----------+ - * v - * INPUT -------->(+) ----> DATA - * - * Given: - * iV: Initial vector, 64 bits (8 bytes) long. - * Dn: the nth chunk of 64 bits (8 bytes) of data to encrypt (decrypt). - * On: the nth chunk of 64 bits (8 bytes) of encrypted (decrypted) output. - * - * V0 = DES(iV, key) - * V(n+1) = DES(Vn, key) - * On = Dn ^ Vn - */ - -void ofb64_encrypt(unsigned char *s, int c) -{ - struct stinfo *stp = &fb[OFB].streams[DIR_ENCRYPT-1]; - int index; - - index = stp->str_index; - while (c-- > 0) { - if (index == sizeof(DES_cblock)) { - DES_cblock b; - DES_ecb_encrypt(&stp->str_feed,&b, &stp->str_sched, 1); - memcpy(stp->str_feed, b, sizeof(DES_cblock)); - index = 0; - } - *s++ ^= stp->str_feed[index]; - index++; - } - stp->str_index = index; -} - -int ofb64_decrypt(int data) -{ - struct stinfo *stp = &fb[OFB].streams[DIR_DECRYPT-1]; - int index; - - if (data == -1) { - /* - * Back up one byte. It is assumed that we will - * never back up more than one byte. If we do, this - * may or may not work. - */ - if (stp->str_index) - --stp->str_index; - return(0); - } - - index = stp->str_index++; - if (index == sizeof(DES_cblock)) { - DES_cblock b; - DES_ecb_encrypt(&stp->str_feed,&b,&stp->str_sched, 1); - memcpy(stp->str_feed, b, sizeof(DES_cblock)); - stp->str_index = 1; /* Next time will be 1 */ - index = 0; /* But now use 0 */ - } - - return(data ^ stp->str_feed[index]); -} -#endif - diff --git a/kerberosV/src/appl/telnet/libtelnet/encrypt.c b/kerberosV/src/appl/telnet/libtelnet/encrypt.c deleted file mode 100644 index 0a34d7021d4..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/encrypt.c +++ /dev/null @@ -1,1006 +0,0 @@ -/*- - * Copyright (c) 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. - */ - -/* - * Copyright (C) 1990 by the Massachusetts Institute of Technology - * - * Export of this software from the United States of America is assumed - * to require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - */ - - -#include - -RCSID("$Id: encrypt.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#if defined(ENCRYPTION) - -#define ENCRYPT_NAMES -#include - -#include -#include -#include -#include -#ifdef SOCKS -#include -#endif - -#include "encrypt.h" -#include "misc.h" - - -/* - * These functions pointers point to the current routines - * for encrypting and decrypting data. - */ -void (*encrypt_output) (unsigned char *, int); -int (*decrypt_input) (int); -char *nclearto; - -int encrypt_debug_mode = 0; -static int decrypt_mode = 0; -static int encrypt_mode = 0; -static int encrypt_verbose = 0; -static int autoencrypt = 0; -static int autodecrypt = 0; -static int havesessionkey = 0; -static int Server = 0; -static const char *Name = "Noname"; - -#define typemask(x) ((x) > 0 ? 1 << ((x)-1) : 0) - -static long i_support_encrypt = typemask(ENCTYPE_DES_CFB64) - | typemask(ENCTYPE_DES_OFB64); - static long i_support_decrypt = typemask(ENCTYPE_DES_CFB64) - | typemask(ENCTYPE_DES_OFB64); - static long i_wont_support_encrypt = 0; - static long i_wont_support_decrypt = 0; -#define I_SUPPORT_ENCRYPT (i_support_encrypt & ~i_wont_support_encrypt) -#define I_SUPPORT_DECRYPT (i_support_decrypt & ~i_wont_support_decrypt) - - static long remote_supports_encrypt = 0; - static long remote_supports_decrypt = 0; - - static Encryptions encryptions[] = { -#if defined(DES_ENCRYPTION) - { "DES_CFB64", ENCTYPE_DES_CFB64, - cfb64_encrypt, - cfb64_decrypt, - cfb64_init, - cfb64_start, - cfb64_is, - cfb64_reply, - cfb64_session, - cfb64_keyid, - cfb64_printsub }, - { "DES_OFB64", ENCTYPE_DES_OFB64, - ofb64_encrypt, - ofb64_decrypt, - ofb64_init, - ofb64_start, - ofb64_is, - ofb64_reply, - ofb64_session, - ofb64_keyid, - ofb64_printsub }, -#endif - { 0, }, - }; - -static unsigned char str_send[64] = { IAC, SB, TELOPT_ENCRYPT, - ENCRYPT_SUPPORT }; -static unsigned char str_suplen = 0; -static unsigned char str_start[72] = { IAC, SB, TELOPT_ENCRYPT }; -static unsigned char str_end[] = { IAC, SB, TELOPT_ENCRYPT, 0, IAC, SE }; - -Encryptions * -findencryption(int type) -{ - Encryptions *ep = encryptions; - - if (!(I_SUPPORT_ENCRYPT & remote_supports_decrypt & typemask(type))) - return(0); - while (ep->type && ep->type != type) - ++ep; - return(ep->type ? ep : 0); -} - -Encryptions * -finddecryption(int type) -{ - Encryptions *ep = encryptions; - - if (!(I_SUPPORT_DECRYPT & remote_supports_encrypt & typemask(type))) - return(0); - while (ep->type && ep->type != type) - ++ep; - return(ep->type ? ep : 0); -} - -#define MAXKEYLEN 64 - -static struct key_info { - unsigned char keyid[MAXKEYLEN]; - int keylen; - int dir; - int *modep; - Encryptions *(*getcrypt)(); -} ki[2] = { - { { 0 }, 0, DIR_ENCRYPT, &encrypt_mode, findencryption }, - { { 0 }, 0, DIR_DECRYPT, &decrypt_mode, finddecryption }, -}; - -void -encrypt_init(const char *name, int server) -{ - Encryptions *ep = encryptions; - - Name = name; - Server = server; - i_support_encrypt = i_support_decrypt = 0; - remote_supports_encrypt = remote_supports_decrypt = 0; - encrypt_mode = 0; - decrypt_mode = 0; - encrypt_output = 0; - decrypt_input = 0; -#ifdef notdef - encrypt_verbose = !server; -#endif - - str_suplen = 4; - - while (ep->type) { - if (encrypt_debug_mode) - printf(">>>%s: I will support %s\r\n", - Name, ENCTYPE_NAME(ep->type)); - i_support_encrypt |= typemask(ep->type); - i_support_decrypt |= typemask(ep->type); - if ((i_wont_support_decrypt & typemask(ep->type)) == 0) - if ((str_send[str_suplen++] = ep->type) == IAC) - str_send[str_suplen++] = IAC; - if (ep->init) - (*ep->init)(Server); - ++ep; - } - str_send[str_suplen++] = IAC; - str_send[str_suplen++] = SE; -} - -void -encrypt_list_types(void) -{ - Encryptions *ep = encryptions; - - printf("Valid encryption types:\n"); - while (ep->type) { - printf("\t%s (%d)\r\n", ENCTYPE_NAME(ep->type), ep->type); - ++ep; - } -} - -int -EncryptEnable(char *type, char *mode) -{ - if (isprefix(type, "help") || isprefix(type, "?")) { - printf("Usage: encrypt enable [input|output]\n"); - encrypt_list_types(); - return(0); - } - if (EncryptType(type, mode)) - return(EncryptStart(mode)); - return(0); -} - -int -EncryptDisable(char *type, char *mode) -{ - Encryptions *ep; - int ret = 0; - - if (isprefix(type, "help") || isprefix(type, "?")) { - printf("Usage: encrypt disable [input|output]\n"); - encrypt_list_types(); - } else if ((ep = (Encryptions *)genget(type, (char**)encryptions, - sizeof(Encryptions))) == 0) { - printf("%s: invalid encryption type\n", type); - } else if (Ambiguous(ep)) { - printf("Ambiguous type '%s'\n", type); - } else { - if ((mode == 0) || (isprefix(mode, "input") ? 1 : 0)) { - if (decrypt_mode == ep->type) - EncryptStopInput(); - i_wont_support_decrypt |= typemask(ep->type); - ret = 1; - } - if ((mode == 0) || (isprefix(mode, "output"))) { - if (encrypt_mode == ep->type) - EncryptStopOutput(); - i_wont_support_encrypt |= typemask(ep->type); - ret = 1; - } - if (ret == 0) - printf("%s: invalid encryption mode\n", mode); - } - return(ret); -} - -int -EncryptType(char *type, char *mode) -{ - Encryptions *ep; - int ret = 0; - - if (isprefix(type, "help") || isprefix(type, "?")) { - printf("Usage: encrypt type [input|output]\n"); - encrypt_list_types(); - } else if ((ep = (Encryptions *)genget(type, (char**)encryptions, - sizeof(Encryptions))) == 0) { - printf("%s: invalid encryption type\n", type); - } else if (Ambiguous(ep)) { - printf("Ambiguous type '%s'\n", type); - } else { - if ((mode == 0) || isprefix(mode, "input")) { - decrypt_mode = ep->type; - i_wont_support_decrypt &= ~typemask(ep->type); - ret = 1; - } - if ((mode == 0) || isprefix(mode, "output")) { - encrypt_mode = ep->type; - i_wont_support_encrypt &= ~typemask(ep->type); - ret = 1; - } - if (ret == 0) - printf("%s: invalid encryption mode\n", mode); - } - return(ret); -} - -int -EncryptStart(char *mode) -{ - int ret = 0; - if (mode) { - if (isprefix(mode, "input")) - return(EncryptStartInput()); - if (isprefix(mode, "output")) - return(EncryptStartOutput()); - if (isprefix(mode, "help") || isprefix(mode, "?")) { - printf("Usage: encrypt start [input|output]\n"); - return(0); - } - printf("%s: invalid encryption mode 'encrypt start ?' for help\n", mode); - return(0); - } - ret += EncryptStartInput(); - ret += EncryptStartOutput(); - return(ret); -} - -int -EncryptStartInput(void) -{ - if (decrypt_mode) { - encrypt_send_request_start(); - return(1); - } - printf("No previous decryption mode, decryption not enabled\r\n"); - return(0); -} - -int -EncryptStartOutput(void) -{ - if (encrypt_mode) { - encrypt_start_output(encrypt_mode); - return(1); - } - printf("No previous encryption mode, encryption not enabled\r\n"); - return(0); -} - -int -EncryptStop(char *mode) -{ - int ret = 0; - if (mode) { - if (isprefix(mode, "input")) - return(EncryptStopInput()); - if (isprefix(mode, "output")) - return(EncryptStopOutput()); - if (isprefix(mode, "help") || isprefix(mode, "?")) { - printf("Usage: encrypt stop [input|output]\n"); - return(0); - } - printf("%s: invalid encryption mode 'encrypt stop ?' for help\n", mode); - return(0); - } - ret += EncryptStopInput(); - ret += EncryptStopOutput(); - return(ret); -} - -int -EncryptStopInput(void) -{ - encrypt_send_request_end(); - return(1); -} - -int -EncryptStopOutput(void) -{ - encrypt_send_end(); - return(1); -} - -void -encrypt_display(void) -{ - printf("Autoencrypt for output is %s. Autodecrypt for input is %s.\r\n", - autoencrypt?"on":"off", autodecrypt?"on":"off"); - - if (encrypt_output) - printf("Currently encrypting output with %s\r\n", - ENCTYPE_NAME(encrypt_mode)); - else - printf("Currently not encrypting output\r\n"); - - if (decrypt_input) - printf("Currently decrypting input with %s\r\n", - ENCTYPE_NAME(decrypt_mode)); - else - printf("Currently not decrypting input\r\n"); -} - -int -EncryptStatus(void) -{ - printf("Autoencrypt for output is %s. Autodecrypt for input is %s.\r\n", - autoencrypt?"on":"off", autodecrypt?"on":"off"); - - if (encrypt_output) - printf("Currently encrypting output with %s\r\n", - ENCTYPE_NAME(encrypt_mode)); - else if (encrypt_mode) { - printf("Currently output is clear text.\r\n"); - printf("Last encryption mode was %s\r\n", - ENCTYPE_NAME(encrypt_mode)); - } else - printf("Currently not encrypting output\r\n"); - - if (decrypt_input) { - printf("Currently decrypting input with %s\r\n", - ENCTYPE_NAME(decrypt_mode)); - } else if (decrypt_mode) { - printf("Currently input is clear text.\r\n"); - printf("Last decryption mode was %s\r\n", - ENCTYPE_NAME(decrypt_mode)); - } else - printf("Currently not decrypting input\r\n"); - - return 1; -} - -void -encrypt_send_support(void) -{ - if (str_suplen) { - /* - * If the user has requested that decryption start - * immediatly, then send a "REQUEST START" before - * we negotiate the type. - */ - if (!Server && autodecrypt) - encrypt_send_request_start(); - telnet_net_write(str_send, str_suplen); - printsub('>', &str_send[2], str_suplen - 2); - str_suplen = 0; - } -} - -int -EncryptDebug(int on) -{ - if (on < 0) - encrypt_debug_mode ^= 1; - else - encrypt_debug_mode = on; - printf("Encryption debugging %s\r\n", - encrypt_debug_mode ? "enabled" : "disabled"); - return(1); -} - -/* turn on verbose encryption, but dont keep telling the whole world - */ -void encrypt_verbose_quiet(int on) -{ - if(on < 0) - encrypt_verbose ^= 1; - else - encrypt_verbose = on ? 1 : 0; -} - -int -EncryptVerbose(int on) -{ - encrypt_verbose_quiet(on); - printf("Encryption %s verbose\r\n", - encrypt_verbose ? "is" : "is not"); - return(1); -} - -int -EncryptAutoEnc(int on) -{ - encrypt_auto(on); - printf("Automatic encryption of output is %s\r\n", - autoencrypt ? "enabled" : "disabled"); - return(1); -} - -int -EncryptAutoDec(int on) -{ - decrypt_auto(on); - printf("Automatic decryption of input is %s\r\n", - autodecrypt ? "enabled" : "disabled"); - return(1); -} - -/* Called when we receive a WONT or a DONT ENCRYPT after we sent a DO - encrypt */ -void -encrypt_not(void) -{ - if (encrypt_verbose) - printf("[ Connection is NOT encrypted ]\r\n"); - else - printf("\r\n*** Connection not encrypted! " - "Communication may be eavesdropped. ***\r\n"); -} - -/* - * Called when ENCRYPT SUPPORT is received. - */ -void -encrypt_support(unsigned char *typelist, int cnt) -{ - int type, use_type = 0; - Encryptions *ep; - - /* - * Forget anything the other side has previously told us. - */ - remote_supports_decrypt = 0; - - while (cnt-- > 0) { - type = *typelist++; - if (encrypt_debug_mode) - printf(">>>%s: He is supporting %s (%d)\r\n", - Name, - ENCTYPE_NAME(type), type); - if ((type < ENCTYPE_CNT) && - (I_SUPPORT_ENCRYPT & typemask(type))) { - remote_supports_decrypt |= typemask(type); - if (use_type == 0) - use_type = type; - } - } - if (use_type) { - ep = findencryption(use_type); - if (!ep) - return; - type = ep->start ? (*ep->start)(DIR_ENCRYPT, Server) : 0; - if (encrypt_debug_mode) - printf(">>>%s: (*ep->start)() returned %d\r\n", - Name, type); - if (type < 0) - return; - encrypt_mode = use_type; - if (type == 0) - encrypt_start_output(use_type); - } -} - -void -encrypt_is(unsigned char *data, int cnt) -{ - Encryptions *ep; - int type, ret; - - if (--cnt < 0) - return; - type = *data++; - if (type < ENCTYPE_CNT) - remote_supports_encrypt |= typemask(type); - if (!(ep = finddecryption(type))) { - if (encrypt_debug_mode) - printf(">>>%s: Can't find type %s (%d) for initial negotiation\r\n", - Name, - ENCTYPE_NAME_OK(type) - ? ENCTYPE_NAME(type) : "(unknown)", - type); - return; - } - if (!ep->is) { - if (encrypt_debug_mode) - printf(">>>%s: No initial negotiation needed for type %s (%d)\r\n", - Name, - ENCTYPE_NAME_OK(type) - ? ENCTYPE_NAME(type) : "(unknown)", - type); - ret = 0; - } else { - ret = (*ep->is)(data, cnt); - if (encrypt_debug_mode) - printf("(*ep->is)(%p, %d) returned %s(%d)\n", data, cnt, - (ret < 0) ? "FAIL " : - (ret == 0) ? "SUCCESS " : "MORE_TO_DO ", ret); - } - if (ret < 0) { - autodecrypt = 0; - } else { - decrypt_mode = type; - if (ret == 0 && autodecrypt) - encrypt_send_request_start(); - } -} - -void -encrypt_reply(unsigned char *data, int cnt) -{ - Encryptions *ep; - int ret, type; - - if (--cnt < 0) - return; - type = *data++; - if (!(ep = findencryption(type))) { - if (encrypt_debug_mode) - printf(">>>%s: Can't find type %s (%d) for initial negotiation\r\n", - Name, - ENCTYPE_NAME_OK(type) - ? ENCTYPE_NAME(type) : "(unknown)", - type); - return; - } - if (!ep->reply) { - if (encrypt_debug_mode) - printf(">>>%s: No initial negotiation needed for type %s (%d)\r\n", - Name, - ENCTYPE_NAME_OK(type) - ? ENCTYPE_NAME(type) : "(unknown)", - type); - ret = 0; - } else { - ret = (*ep->reply)(data, cnt); - if (encrypt_debug_mode) - printf("(*ep->reply)(%p, %d) returned %s(%d)\n", - data, cnt, - (ret < 0) ? "FAIL " : - (ret == 0) ? "SUCCESS " : "MORE_TO_DO ", ret); - } - if (encrypt_debug_mode) - printf(">>>%s: encrypt_reply returned %d\n", Name, ret); - if (ret < 0) { - autoencrypt = 0; - } else { - encrypt_mode = type; - if (ret == 0 && autoencrypt) - encrypt_start_output(type); - } -} - -/* - * Called when ENCRYPT START is received. - */ -void -encrypt_start(unsigned char *data, int cnt) -{ - Encryptions *ep; - - if (!decrypt_mode) { - /* - * Something is wrong. We should not get a START - * command without having already picked our - * decryption scheme. Send a REQUEST-END to - * attempt to clear the channel... - */ - printf("%s: Warning, Cannot decrypt input stream!!!\r\n", Name); - encrypt_send_request_end(); - return; - } - - if ((ep = finddecryption(decrypt_mode))) { - decrypt_input = ep->input; - if (encrypt_verbose) - printf("[ Input is now decrypted with type %s ]\r\n", - ENCTYPE_NAME(decrypt_mode)); - if (encrypt_debug_mode) - printf(">>>%s: Start to decrypt input with type %s\r\n", - Name, ENCTYPE_NAME(decrypt_mode)); - } else { - printf("%s: Warning, Cannot decrypt type %s (%d)!!!\r\n", - Name, - ENCTYPE_NAME_OK(decrypt_mode) - ? ENCTYPE_NAME(decrypt_mode) - : "(unknown)", - decrypt_mode); - encrypt_send_request_end(); - } -} - -void -encrypt_session_key(Session_Key *key, int server) -{ - Encryptions *ep = encryptions; - - havesessionkey = 1; - - while (ep->type) { - if (ep->session) - (*ep->session)(key, server); - ++ep; - } -} - -/* - * Called when ENCRYPT END is received. - */ -void -encrypt_end(void) -{ - decrypt_input = 0; - if (encrypt_debug_mode) - printf(">>>%s: Input is back to clear text\r\n", Name); - if (encrypt_verbose) - printf("[ Input is now clear text ]\r\n"); -} - -/* - * Called when ENCRYPT REQUEST-END is received. - */ -void -encrypt_request_end(void) -{ - encrypt_send_end(); -} - -/* - * Called when ENCRYPT REQUEST-START is received. If we receive - * this before a type is picked, then that indicates that the - * other side wants us to start encrypting data as soon as we - * can. - */ -void -encrypt_request_start(unsigned char *data, int cnt) -{ - if (encrypt_mode == 0) { - if (Server) - autoencrypt = 1; - return; - } - encrypt_start_output(encrypt_mode); -} - -static unsigned char str_keyid[(MAXKEYLEN*2)+5] = { IAC, SB, TELOPT_ENCRYPT }; - -static void -encrypt_keyid(struct key_info *kp, unsigned char *keyid, int len) -{ - Encryptions *ep; - int dir = kp->dir; - int ret = 0; - - if (len > MAXKEYLEN) - len = MAXKEYLEN; - - if (!(ep = (*kp->getcrypt)(*kp->modep))) { - if (len == 0) - return; - kp->keylen = 0; - } else if (len == 0) { - /* - * Empty option, indicates a failure. - */ - if (kp->keylen == 0) - return; - kp->keylen = 0; - if (ep->keyid) - (void)(*ep->keyid)(dir, kp->keyid, &kp->keylen); - - } else if ((len != kp->keylen) || (memcmp(keyid,kp->keyid,len) != 0)) { - /* - * Length or contents are different - */ - kp->keylen = len; - memcpy(kp->keyid,keyid, len); - if (ep->keyid) - (void)(*ep->keyid)(dir, kp->keyid, &kp->keylen); - } else { - if (ep->keyid) - ret = (*ep->keyid)(dir, kp->keyid, &kp->keylen); - if ((ret == 0) && (dir == DIR_ENCRYPT) && autoencrypt) - encrypt_start_output(*kp->modep); - return; - } - - encrypt_send_keyid(dir, kp->keyid, kp->keylen, 0); -} - -void encrypt_enc_keyid(unsigned char *keyid, int len) -{ - encrypt_keyid(&ki[1], keyid, len); -} - -void encrypt_dec_keyid(unsigned char *keyid, int len) -{ - encrypt_keyid(&ki[0], keyid, len); -} - - -void encrypt_send_keyid(int dir, unsigned char *keyid, int keylen, int saveit) -{ - unsigned char *strp; - - str_keyid[3] = (dir == DIR_ENCRYPT) - ? ENCRYPT_ENC_KEYID : ENCRYPT_DEC_KEYID; - if (saveit) { - struct key_info *kp = &ki[(dir == DIR_ENCRYPT) ? 0 : 1]; - memcpy(kp->keyid,keyid, keylen); - kp->keylen = keylen; - } - - for (strp = &str_keyid[4]; keylen > 0; --keylen) { - if ((*strp++ = *keyid++) == IAC) - *strp++ = IAC; - } - *strp++ = IAC; - *strp++ = SE; - telnet_net_write(str_keyid, strp - str_keyid); - printsub('>', &str_keyid[2], strp - str_keyid - 2); -} - -void -encrypt_auto(int on) -{ - if (on < 0) - autoencrypt ^= 1; - else - autoencrypt = on ? 1 : 0; -} - -void -decrypt_auto(int on) -{ - if (on < 0) - autodecrypt ^= 1; - else - autodecrypt = on ? 1 : 0; -} - -void -encrypt_start_output(int type) -{ - Encryptions *ep; - unsigned char *p; - int i; - - if (!(ep = findencryption(type))) { - if (encrypt_debug_mode) { - printf(">>>%s: Can't encrypt with type %s (%d)\r\n", - Name, - ENCTYPE_NAME_OK(type) - ? ENCTYPE_NAME(type) : "(unknown)", - type); - } - return; - } - if (ep->start) { - i = (*ep->start)(DIR_ENCRYPT, Server); - if (encrypt_debug_mode) { - printf(">>>%s: Encrypt start: %s (%d) %s\r\n", - Name, - (i < 0) ? "failed" : - "initial negotiation in progress", - i, ENCTYPE_NAME(type)); - } - if (i) - return; - } - p = str_start + 3; - *p++ = ENCRYPT_START; - for (i = 0; i < ki[0].keylen; ++i) { - if ((*p++ = ki[0].keyid[i]) == IAC) - *p++ = IAC; - } - *p++ = IAC; - *p++ = SE; - telnet_net_write(str_start, p - str_start); - net_encrypt(); - printsub('>', &str_start[2], p - &str_start[2]); - /* - * If we are already encrypting in some mode, then - * encrypt the ring (which includes our request) in - * the old mode, mark it all as "clear text" and then - * switch to the new mode. - */ - encrypt_output = ep->output; - encrypt_mode = type; - if (encrypt_debug_mode) - printf(">>>%s: Started to encrypt output with type %s\r\n", - Name, ENCTYPE_NAME(type)); - if (encrypt_verbose) - printf("[ Output is now encrypted with type %s ]\r\n", - ENCTYPE_NAME(type)); -} - -void -encrypt_send_end(void) -{ - if (!encrypt_output) - return; - - str_end[3] = ENCRYPT_END; - telnet_net_write(str_end, sizeof(str_end)); - net_encrypt(); - printsub('>', &str_end[2], sizeof(str_end) - 2); - /* - * Encrypt the output buffer now because it will not be done by - * netflush... - */ - encrypt_output = 0; - if (encrypt_debug_mode) - printf(">>>%s: Output is back to clear text\r\n", Name); - if (encrypt_verbose) - printf("[ Output is now clear text ]\r\n"); -} - -void -encrypt_send_request_start(void) -{ - unsigned char *p; - int i; - - p = &str_start[3]; - *p++ = ENCRYPT_REQSTART; - for (i = 0; i < ki[1].keylen; ++i) { - if ((*p++ = ki[1].keyid[i]) == IAC) - *p++ = IAC; - } - *p++ = IAC; - *p++ = SE; - telnet_net_write(str_start, p - str_start); - printsub('>', &str_start[2], p - &str_start[2]); - if (encrypt_debug_mode) - printf(">>>%s: Request input to be encrypted\r\n", Name); -} - -void -encrypt_send_request_end(void) -{ - str_end[3] = ENCRYPT_REQEND; - telnet_net_write(str_end, sizeof(str_end)); - printsub('>', &str_end[2], sizeof(str_end) - 2); - - if (encrypt_debug_mode) - printf(">>>%s: Request input to be clear text\r\n", Name); -} - - -void encrypt_wait(void) -{ - if (encrypt_debug_mode) - printf(">>>%s: in encrypt_wait\r\n", Name); - if (!havesessionkey || !(I_SUPPORT_ENCRYPT & remote_supports_decrypt)) - return; - while (autoencrypt && !encrypt_output) - if (telnet_spin()) - return; -} - -int -encrypt_delay(void) -{ - if(!havesessionkey || - (I_SUPPORT_ENCRYPT & remote_supports_decrypt) == 0 || - (I_SUPPORT_DECRYPT & remote_supports_encrypt) == 0) - return 0; - if(!(encrypt_output && decrypt_input)) - return 1; - return 0; -} - -int encrypt_is_encrypting() -{ - if (encrypt_output && decrypt_input) - return 1; - return 0; -} - -void -encrypt_debug(int mode) -{ - encrypt_debug_mode = mode; -} - -void encrypt_gen_printsub(unsigned char *data, size_t cnt, - unsigned char *buf, size_t buflen) -{ - char tbuf[16], *cp; - - cnt -= 2; - data += 2; - buf[buflen-1] = '\0'; - buf[buflen-2] = '*'; - buflen -= 2;; - for (; cnt > 0; cnt--, data++) { - snprintf(tbuf, sizeof(tbuf), " %d", *data); - for (cp = tbuf; *cp && buflen > 0; --buflen) - *buf++ = *cp++; - if (buflen <= 0) - return; - } - *buf = '\0'; -} - -void -encrypt_printsub(unsigned char *data, size_t cnt, - unsigned char *buf, size_t buflen) -{ - Encryptions *ep; - int type = data[1]; - - for (ep = encryptions; ep->type && ep->type != type; ep++) - ; - - if (ep->printsub) - (*ep->printsub)(data, cnt, buf, buflen); - else - encrypt_gen_printsub(data, cnt, buf, buflen); -} -#endif diff --git a/kerberosV/src/appl/telnet/libtelnet/encrypt.h b/kerberosV/src/appl/telnet/libtelnet/encrypt.h deleted file mode 100644 index a5b9288f06e..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/encrypt.h +++ /dev/null @@ -1,103 +0,0 @@ -/*- - * Copyright (c) 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. - * - * @(#)encrypt.h 8.1 (Berkeley) 6/4/93 - * - * @(#)encrypt.h 5.2 (Berkeley) 3/22/91 - */ - -/* - * Copyright (C) 1990 by the Massachusetts Institute of Technology - * - * Export of this software from the United States of America is assumed - * to require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - */ - -/* $Id: encrypt.h,v 1.4 2013/06/17 19:11:38 robert Exp $ */ - -#ifndef __ENCRYPT__ -#define __ENCRYPT__ - -#define DIR_DECRYPT 1 -#define DIR_ENCRYPT 2 - -#define VALIDKEY(key) ( key[0] | key[1] | key[2] | key[3] | \ - key[4] | key[5] | key[6] | key[7]) - -#define SAMEKEY(k1, k2) (!memcmp(k1, k2, sizeof(des_cblock))) - -typedef struct { - short type; - int length; - unsigned char *data; -} Session_Key; - -typedef struct { - char *name; - int type; - void (*output) (unsigned char *, int); - int (*input) (int); - void (*init) (int); - int (*start) (int, int); - int (*is) (unsigned char *, int); - int (*reply) (unsigned char *, int); - void (*session) (Session_Key *, int); - int (*keyid) (int, unsigned char *, int *); - void (*printsub) (unsigned char *, size_t, unsigned char *, size_t); -} Encryptions; - -#define SK_DES 1 /* Matched Kerberos v5 KEYTYPE_DES */ - -#include "crypto-headers.h" -#ifdef HAVE_OPENSSL -#define des_new_random_key des_random_key -#endif - -#include "enc-proto.h" - -extern int encrypt_debug_mode; -extern int (*decrypt_input) (int); -extern void (*encrypt_output) (unsigned char *, int); -#endif diff --git a/kerberosV/src/appl/telnet/libtelnet/genget.c b/kerberosV/src/appl/telnet/libtelnet/genget.c deleted file mode 100644 index 595f62c0f79..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/genget.c +++ /dev/null @@ -1,106 +0,0 @@ -/*- - * Copyright (c) 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. - */ - -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#include -#include "misc-proto.h" - -RCSID("$Id: genget.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - - -#define LOWER(x) (isupper(x) ? tolower(x) : (x)) -/* - * The prefix function returns 0 if *s1 is not a prefix - * of *s2. If *s1 exactly matches *s2, the negative of - * the length is returned. If *s1 is a prefix of *s2, - * the length of *s1 is returned. - */ - -int -isprefix(char *s1, char *s2) -{ - char *os1; - char c1, c2; - - if (*s1 == '\0') - return(-1); - os1 = s1; - c1 = *s1; - c2 = *s2; - while (tolower((unsigned char)c1) == tolower((unsigned char)c2)) { - if (c1 == '\0') - break; - c1 = *++s1; - c2 = *++s2; - } - return(*s1 ? 0 : (*s2 ? (s1 - os1) : (os1 - s1))); -} - -static char *ambiguous; /* special return value for command routines */ - -char ** -genget(char *name, char **table, int stlen) - /* name to match */ - /* name entry in table */ - -{ - char **c, **found; - int n; - - if (name == 0) - return 0; - - found = 0; - for (c = table; *c != 0; c = (char **)((char *)c + stlen)) { - if ((n = isprefix(name, *c)) == 0) - continue; - if (n < 0) /* exact match */ - return(c); - if (found) - return(&ambiguous); - found = c; - } - return(found); -} - -/* - * Function call version of Ambiguous() - */ -int -Ambiguous(void *s) -{ - return((char **)s == &ambiguous); -} diff --git a/kerberosV/src/appl/telnet/libtelnet/kerberos5.c b/kerberosV/src/appl/telnet/libtelnet/kerberos5.c deleted file mode 100644 index 27483cdbaee..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/kerberos5.c +++ /dev/null @@ -1,896 +0,0 @@ -/*- - * Copyright (c) 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. - */ - -/* - * Copyright (C) 1990 by the Massachusetts Institute of Technology - * - * Export of this software from the United States of America may - * require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - */ - -#include - -RCSID("$Id: kerberos5.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#ifdef KRB5 - -#include -#include -#include -#include -#include -#include -#include -#include -#define Authenticator k5_Authenticator -#include -#undef Authenticator -#include -#ifdef SOCKS -#include -#endif - - -#include "encrypt.h" -#include "auth.h" -#include "misc.h" - -#if defined(DCE) -int dfsk5ok = 0; -int dfspag = 0; -int dfsfwd = 0; -#endif - -int forward_flags = 0; /* Flags get set in telnet/main.c on -f and -F */ - -int forward(int); -int forwardable(int); - -/* These values need to be the same as those defined in telnet/main.c. */ -/* Either define them in both places, or put in some common header file. */ -#define OPTS_FORWARD_CREDS 0x00000002 -#define OPTS_FORWARDABLE_CREDS 0x00000001 - - -void kerberos5_forward (Authenticator *); - -static unsigned char str_data[4] = { IAC, SB, TELOPT_AUTHENTICATION, 0 }; - -#define KRB_AUTH 0 /* Authentication data follows */ -#define KRB_REJECT 1 /* Rejected (reason might follow) */ -#define KRB_ACCEPT 2 /* Accepted */ -#define KRB_RESPONSE 3 /* Response for mutual auth. */ - -#define KRB_FORWARD 4 /* Forwarded credentials follow */ -#define KRB_FORWARD_ACCEPT 5 /* Forwarded credentials accepted */ -#define KRB_FORWARD_REJECT 6 /* Forwarded credentials rejected */ - -static krb5_data auth; -static krb5_ticket *ticket; - -static krb5_context context; -static krb5_auth_context auth_context; - -static int -Data(Authenticator *ap, int type, const void *d, int c) -{ - const unsigned char *cp, *cd = d; - unsigned char *p0, *p; - size_t len = sizeof(str_data) + 3 + 2; - int ret; - - if (c == -1) - c = strlen((const char*)cd); - - for (cp = cd; cp - cd < c; cp++, len++) - if (*cp == IAC) - len++; - - p0 = malloc(len); - if (p0 == NULL) - return 0; - - memcpy(p0, str_data, sizeof(str_data)); - p = p0 + sizeof(str_data); - - if (auth_debug_mode) { - printf("%s:%d: [%d] (%d)", - str_data[3] == TELQUAL_IS ? ">>>IS" : ">>>REPLY", - str_data[3], - type, c); - printd(d, c); - printf("\r\n"); - } - *p++ = ap->type; - *p++ = ap->way; - *p++ = type; - while (c-- > 0) { - if ((*p++ = *cd++) == IAC) - *p++ = IAC; - } - *p++ = IAC; - *p++ = SE; - if (str_data[3] == TELQUAL_IS) - printsub('>', &p0[2], len - 2); - ret = telnet_net_write(p0, len); - free(p0); - return ret; -} - -int -kerberos5_init(Authenticator *ap, int server) -{ - krb5_error_code ret; - - ret = krb5_init_context(&context); - if (ret) - return 0; - if (server) { - krb5_keytab kt; - krb5_kt_cursor cursor; - - ret = krb5_kt_default(context, &kt); - if (ret) - return 0; - - ret = krb5_kt_start_seq_get (context, kt, &cursor); - if (ret) { - krb5_kt_close (context, kt); - return 0; - } - krb5_kt_end_seq_get (context, kt, &cursor); - krb5_kt_close (context, kt); - - str_data[3] = TELQUAL_REPLY; - } else - str_data[3] = TELQUAL_IS; - return(1); -} - -extern int net; -static int -kerberos5_send(char *name, Authenticator *ap) -{ - krb5_error_code ret; - krb5_ccache ccache; - int ap_opts; - krb5_data cksum_data; - char ap_msg[2]; - - if (!UserNameRequested) { - if (auth_debug_mode) { - printf("Kerberos V5: no user name supplied\r\n"); - } - return(0); - } - - ret = krb5_cc_default(context, &ccache); - if (ret) { - if (auth_debug_mode) { - printf("Kerberos V5: could not get default ccache: %s\r\n", - krb5_get_err_text (context, ret)); - } - return 0; - } - - if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) - ap_opts = AP_OPTS_MUTUAL_REQUIRED; - else - ap_opts = 0; - - ap_opts |= AP_OPTS_USE_SUBKEY; - - ret = krb5_auth_con_init (context, &auth_context); - if (ret) { - if (auth_debug_mode) { - printf("Kerberos V5: krb5_auth_con_init failed (%s)\r\n", - krb5_get_err_text(context, ret)); - } - return(0); - } - - ret = krb5_auth_con_setaddrs_from_fd (context, - auth_context, - &net); - if (ret) { - if (auth_debug_mode) { - printf ("Kerberos V5:" - " krb5_auth_con_setaddrs_from_fd failed (%s)\r\n", - krb5_get_err_text(context, ret)); - } - return(0); - } - - krb5_auth_con_setkeytype (context, auth_context, KRB5_ENCTYPE_DES_CBC_CRC); - - ap_msg[0] = ap->type; - ap_msg[1] = ap->way; - - cksum_data.length = sizeof(ap_msg); - cksum_data.data = ap_msg; - - - { - krb5_principal service; - char sname[128]; - - - ret = krb5_sname_to_principal (context, - RemoteHostName, - NULL, - KRB5_NT_SRV_HST, - &service); - if(ret) { - if (auth_debug_mode) { - printf ("Kerberos V5:" - " krb5_sname_to_principal(%s) failed (%s)\r\n", - RemoteHostName, krb5_get_err_text(context, ret)); - } - return 0; - } - ret = krb5_unparse_name_fixed(context, service, sname, sizeof(sname)); - if(ret) { - if (auth_debug_mode) { - printf ("Kerberos V5:" - " krb5_unparse_name_fixed failed (%s)\r\n", - krb5_get_err_text(context, ret)); - } - return 0; - } - printf("[ Trying %s (%s)... ]\r\n", name, sname); - ret = krb5_mk_req_exact(context, &auth_context, ap_opts, - service, - &cksum_data, ccache, &auth); - krb5_free_principal (context, service); - - } - if (ret) { - if (1 || auth_debug_mode) { - printf("Kerberos V5: mk_req failed (%s)\r\n", - krb5_get_err_text(context, ret)); - } - return(0); - } - - if (!auth_sendname((unsigned char *)UserNameRequested, - strlen(UserNameRequested))) { - if (auth_debug_mode) - printf("Not enough room for user name\r\n"); - return(0); - } - if (!Data(ap, KRB_AUTH, auth.data, auth.length)) { - if (auth_debug_mode) - printf("Not enough room for authentication data\r\n"); - return(0); - } - if (auth_debug_mode) { - printf("Sent Kerberos V5 credentials to server\r\n"); - } - return(1); -} - -int -kerberos5_send_mutual(Authenticator *ap) -{ - return kerberos5_send("mutual KERBEROS5", ap); -} - -int -kerberos5_send_oneway(Authenticator *ap) -{ - return kerberos5_send("KERBEROS5", ap); -} - -static void log_message(const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - if (auth_debug_mode) { - va_start(ap, fmt); - vfprintf(stdout, fmt, ap); - va_end(ap); - fprintf(stdout, "\r\n"); - } - va_start(ap, fmt); - vsyslog(LOG_NOTICE, fmt, ap); - va_end(ap); -} - -void -kerberos5_is(Authenticator *ap, unsigned char *data, int cnt) -{ - krb5_error_code ret; - krb5_data outbuf; - krb5_keyblock *key_block; - char *name; - krb5_principal server; - int zero = 0; - - if (cnt-- < 1) - return; - switch (*data++) { - case KRB_AUTH: - auth.data = (char *)data; - auth.length = cnt; - - auth_context = NULL; - - ret = krb5_auth_con_init (context, &auth_context); - if (ret) { - Data(ap, KRB_REJECT, "krb5_auth_con_init failed", -1); - auth_finished(ap, AUTH_REJECT); - log_message("Kerberos V5: krb5_auth_con_init failed (%s)", - krb5_get_err_text(context, ret)); - return; - } - - ret = krb5_auth_con_setaddrs_from_fd (context, - auth_context, - &zero); - if (ret) { - Data(ap, KRB_REJECT, "krb5_auth_con_setaddrs_from_fd failed", -1); - auth_finished(ap, AUTH_REJECT); - log_message("Kerberos V5: " - "krb5_auth_con_setaddrs_from_fd failed (%s)", - krb5_get_err_text(context, ret)); - return; - } - - ret = krb5_sock_to_principal (context, - 0, - "host", - KRB5_NT_SRV_HST, - &server); - if (ret) { - Data(ap, KRB_REJECT, "krb5_sock_to_principal failed", -1); - auth_finished(ap, AUTH_REJECT); - log_message("Kerberos V5: " - "krb5_sock_to_principal failed (%s)", - krb5_get_err_text(context, ret)); - return; - } - - ret = krb5_rd_req(context, - &auth_context, - &auth, - server, - NULL, - NULL, - &ticket); - - krb5_free_principal (context, server); - if (ret) { - const char *errbuf2 = "Read req failed"; - char *errbuf; - int ret2; - - ret2 = asprintf(&errbuf, - "Read req failed: %s", - krb5_get_err_text(context, ret)); - if (ret2 != -1) - errbuf2 = errbuf; - Data(ap, KRB_REJECT, errbuf2, -1); - log_message("%s", errbuf2); - if (ret2 != -1) - free (errbuf); - return; - } - - { - char ap_msg[2]; - - ap_msg[0] = ap->type; - ap_msg[1] = ap->way; - - ret = krb5_verify_authenticator_checksum(context, - auth_context, - ap_msg, - sizeof(ap_msg)); - - if (ret) { - const char *errbuf2 = "Bad checksum"; - char *errbuf; - int ret2; - - ret2 = asprintf(&errbuf, "Bad checksum: %s", - krb5_get_err_text(context, ret)); - if (ret2 != -1) - errbuf2 = errbuf; - Data(ap, KRB_REJECT, errbuf2, -1); - log_message("%s", errbuf2); - if (ret2 != -1) - free(errbuf); - return; - } - } - ret = krb5_auth_con_getremotesubkey (context, - auth_context, - &key_block); - - if (ret) { - Data(ap, KRB_REJECT, "krb5_auth_con_getremotesubkey failed", -1); - auth_finished(ap, AUTH_REJECT); - log_message("Kerberos V5: " - "krb5_auth_con_getremotesubkey failed (%s)", - krb5_get_err_text(context, ret)); - return; - } - - if (key_block == NULL) { - ret = krb5_auth_con_getkey(context, - auth_context, - &key_block); - } - if (ret) { - Data(ap, KRB_REJECT, "krb5_auth_con_getkey failed", -1); - auth_finished(ap, AUTH_REJECT); - log_message("Kerberos V5: " - "krb5_auth_con_getkey failed (%s)", - krb5_get_err_text(context, ret)); - return; - } - if (key_block == NULL) { - Data(ap, KRB_REJECT, "no subkey received", -1); - auth_finished(ap, AUTH_REJECT); - log_message("Kerberos V5: " - "krb5_auth_con_getremotesubkey returned NULL key"); - return; - } - - if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) { - ret = krb5_mk_rep(context, auth_context, &outbuf); - if (ret) { - Data(ap, KRB_REJECT, - "krb5_mk_rep failed", -1); - auth_finished(ap, AUTH_REJECT); - log_message("Kerberos V5: " - "krb5_mk_rep failed (%s)", - krb5_get_err_text(context, ret)); - krb5_free_keyblock(context, key_block); - return; - } - Data(ap, KRB_RESPONSE, outbuf.data, outbuf.length); - } - if (krb5_unparse_name(context, ticket->client, &name)) - name = 0; - - if(UserNameRequested && krb5_kuserok(context, - ticket->client, - UserNameRequested)) { - Data(ap, KRB_ACCEPT, name, name ? -1 : 0); - log_message("%s accepted as user %s from %s", - name ? name : "", - UserNameRequested ? UserNameRequested : "", - RemoteHostName ? RemoteHostName : ""); - - if(key_block->keytype == ETYPE_DES_CBC_MD5 || - key_block->keytype == ETYPE_DES_CBC_MD4 || - key_block->keytype == ETYPE_DES_CBC_CRC) { - Session_Key skey; - - skey.type = SK_DES; - skey.length = 8; - skey.data = key_block->keyvalue.data; - encrypt_session_key(&skey, 0); - } - - } else { - const char *msg2 = "user is not authorized to login"; - char *msg; - - ret = asprintf (&msg, "user `%s' is not authorized to " - "login as `%s'", - name ? name : "", - UserNameRequested ? UserNameRequested : ""); - if (ret != -1) - msg2 = msg; - Data(ap, KRB_REJECT, (void *)msg2, -1); - if (ret != -1) - free(msg); - auth_finished (ap, AUTH_REJECT); - krb5_free_keyblock(context, key_block); - break; - } - auth_finished(ap, AUTH_USER); - krb5_free_keyblock(context, key_block); - - break; - case KRB_FORWARD: { - struct passwd *pwd; - char ccname[1024]; /* XXX */ - krb5_data inbuf; - krb5_ccache ccache; - inbuf.data = (char *)data; - inbuf.length = cnt; - - pwd = getpwnam (UserNameRequested); - if (pwd == NULL) - break; - - snprintf (ccname, sizeof(ccname), - "FILE:/tmp/krb5cc_%lu", (unsigned long)pwd->pw_uid); - - ret = krb5_cc_resolve (context, ccname, &ccache); - if (ret) { - log_message("Kerberos V5: could not get ccache: %s", - krb5_get_err_text(context, ret)); - break; - } - - ret = krb5_cc_initialize (context, - ccache, - ticket->client); - if (ret) { - log_message("Kerberos V5: could not init ccache: %s", - krb5_get_err_text(context, ret)); - break; - } - -#if defined(DCE) - esetenv("KRB5CCNAME", ccname, 1); -#endif - ret = krb5_rd_cred2 (context, - auth_context, - ccache, - &inbuf); - if(ret) { - const char *errbuf2 = "Read forwarded creds failed"; - char *errbuf; - int ret2; - - ret2 = asprintf (&errbuf, - "Read forwarded creds failed: %s", - krb5_get_err_text (context, ret)); - if (ret2 != -1) - errbuf2 = errbuf; - Data(ap, KRB_FORWARD_REJECT, errbuf, -1); - log_message("Could not read forwarded credentials: %s", errbuf); - - if (ret2 != -1) - free (errbuf); - } else { - Data(ap, KRB_FORWARD_ACCEPT, 0, 0); -#if defined(DCE) - dfsfwd = 1; -#endif - } - chown (ccname + 5, pwd->pw_uid, -1); - log_message("Forwarded credentials obtained"); - break; - } - default: - log_message("Unknown Kerberos option %d", data[-1]); - Data(ap, KRB_REJECT, 0, 0); - break; - } -} - -void -kerberos5_reply(Authenticator *ap, unsigned char *data, int cnt) -{ - static int mutual_complete = 0; - - if (cnt-- < 1) - return; - switch (*data++) { - case KRB_REJECT: - if (cnt > 0) { - printf("[ Kerberos V5 refuses authentication because %.*s ]\r\n", - cnt, data); - } else - printf("[ Kerberos V5 refuses authentication ]\r\n"); - auth_send_retry(); - return; - case KRB_ACCEPT: { - krb5_error_code ret; - Session_Key skey; - krb5_keyblock *keyblock; - - if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL && - !mutual_complete) { - printf("[ Kerberos V5 accepted you, but didn't provide mutual authentication! ]\r\n"); - auth_send_retry(); - return; - } - if (cnt) - printf("[ Kerberos V5 accepts you as ``%.*s'' ]\r\n", cnt, data); - else - printf("[ Kerberos V5 accepts you ]\r\n"); - - ret = krb5_auth_con_getlocalsubkey (context, - auth_context, - &keyblock); - if (ret) - ret = krb5_auth_con_getkey (context, - auth_context, - &keyblock); - if(ret) { - printf("[ krb5_auth_con_getkey: %s ]\r\n", - krb5_get_err_text(context, ret)); - auth_send_retry(); - return; - } - - skey.type = SK_DES; - skey.length = 8; - skey.data = keyblock->keyvalue.data; - encrypt_session_key(&skey, 0); - krb5_free_keyblock (context, keyblock); - auth_finished(ap, AUTH_USER); - if (forward_flags & OPTS_FORWARD_CREDS) - kerberos5_forward(ap); - break; - } - case KRB_RESPONSE: - if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) { - /* the rest of the reply should contain a krb_ap_rep */ - krb5_ap_rep_enc_part *reply; - krb5_data inbuf; - krb5_error_code ret; - - inbuf.length = cnt; - inbuf.data = (char *)data; - - ret = krb5_rd_rep(context, auth_context, &inbuf, &reply); - if (ret) { - printf("[ Mutual authentication failed: %s ]\r\n", - krb5_get_err_text (context, ret)); - auth_send_retry(); - return; - } - krb5_free_ap_rep_enc_part(context, reply); - mutual_complete = 1; - } - return; - case KRB_FORWARD_ACCEPT: - printf("[ Kerberos V5 accepted forwarded credentials ]\r\n"); - return; - case KRB_FORWARD_REJECT: - printf("[ Kerberos V5 refuses forwarded credentials because %.*s ]\r\n", - cnt, data); - return; - default: - if (auth_debug_mode) - printf("Unknown Kerberos option %d\r\n", data[-1]); - return; - } -} - -int -kerberos5_status(Authenticator *ap, char *name, size_t name_sz, int level) -{ - if (level < AUTH_USER) - return(level); - - if (UserNameRequested && - krb5_kuserok(context, - ticket->client, - UserNameRequested)) - { - strlcpy(name, UserNameRequested, name_sz); -#if defined(DCE) - dfsk5ok = 1; -#endif - return(AUTH_VALID); - } else - return(AUTH_USER); -} - -#define BUMP(buf, len) while (*(buf)) {++(buf), --(len);} -#define ADDC(buf, len, c) if ((len) > 0) {*(buf)++ = (c); --(len);} - -void -kerberos5_printsub(unsigned char *data, size_t cnt, - unsigned char *buf, size_t buflen) -{ - int i; - - buf[buflen-1] = '\0'; /* make sure it's NULL terminated */ - buflen -= 1; - - switch(data[3]) { - case KRB_REJECT: /* Rejected (reason might follow) */ - strlcpy((char *)buf, " REJECT ", buflen); - goto common; - - case KRB_ACCEPT: /* Accepted (name might follow) */ - strlcpy((char *)buf, " ACCEPT ", buflen); - common: - BUMP(buf, buflen); - if (cnt <= 4) - break; - ADDC(buf, buflen, '"'); - for (i = 4; i < cnt; i++) - ADDC(buf, buflen, data[i]); - ADDC(buf, buflen, '"'); - ADDC(buf, buflen, '\0'); - break; - - - case KRB_AUTH: /* Authentication data follows */ - strlcpy((char *)buf, " AUTH", buflen); - goto common2; - - case KRB_RESPONSE: - strlcpy((char *)buf, " RESPONSE", buflen); - goto common2; - - case KRB_FORWARD: /* Forwarded credentials follow */ - strlcpy((char *)buf, " FORWARD", buflen); - goto common2; - - case KRB_FORWARD_ACCEPT: /* Forwarded credentials accepted */ - strlcpy((char *)buf, " FORWARD_ACCEPT", buflen); - goto common2; - - case KRB_FORWARD_REJECT: /* Forwarded credentials rejected */ - /* (reason might follow) */ - strlcpy((char *)buf, " FORWARD_REJECT", buflen); - goto common2; - - default: - snprintf((char*)buf, buflen, " %d (unknown)", data[3]); - common2: - BUMP(buf, buflen); - for (i = 4; i < cnt; i++) { - snprintf((char*)buf, buflen, " %d", data[i]); - BUMP(buf, buflen); - } - break; - } -} - -void -kerberos5_forward(Authenticator *ap) -{ - krb5_error_code ret; - krb5_ccache ccache; - krb5_creds creds; - KDCOptions flags; - krb5_data out_data; - krb5_principal principal; - - ret = krb5_cc_default (context, &ccache); - if (ret) { - if (auth_debug_mode) - printf ("KerberosV5: could not get default ccache: %s\r\n", - krb5_get_err_text (context, ret)); - return; - } - - ret = krb5_cc_get_principal (context, ccache, &principal); - if (ret) { - if (auth_debug_mode) - printf ("KerberosV5: could not get principal: %s\r\n", - krb5_get_err_text (context, ret)); - return; - } - - memset (&creds, 0, sizeof(creds)); - - creds.client = principal; - - ret = krb5_make_principal(context, - &creds.server, - principal->realm, - "krbtgt", - principal->realm, - NULL); - - if (ret) { - if (auth_debug_mode) - printf ("KerberosV5: could not get principal: %s\r\n", - krb5_get_err_text (context, ret)); - return; - } - - creds.times.endtime = 0; - - memset(&flags, 0, sizeof(flags)); - flags.forwarded = 1; - if (forward_flags & OPTS_FORWARDABLE_CREDS) - flags.forwardable = 1; - - ret = krb5_get_forwarded_creds (context, - auth_context, - ccache, - KDCOptions2int(flags), - RemoteHostName, - &creds, - &out_data); - if (ret) { - if (auth_debug_mode) - printf ("Kerberos V5: error getting forwarded creds: %s\r\n", - krb5_get_err_text (context, ret)); - return; - } - - if(!Data(ap, KRB_FORWARD, out_data.data, out_data.length)) { - if (auth_debug_mode) - printf("Not enough room for authentication data\r\n"); - } else { - if (auth_debug_mode) - printf("Forwarded local Kerberos V5 credentials to server\r\n"); - } -} - -#if defined(DCE) -/* if this was a K5 authentication try and join a PAG for the user. */ -void -kerberos5_dfspag(void) -{ - if (dfsk5ok) { - dfspag = krb5_dfs_pag(context, dfsfwd, ticket->client, - UserNameRequested); - } -} -#endif - -int -kerberos5_set_forward(int on) -{ - if(on == 0) - forward_flags &= ~OPTS_FORWARD_CREDS; - if(on == 1) - forward_flags |= OPTS_FORWARD_CREDS; - if(on == -1) - forward_flags ^= OPTS_FORWARD_CREDS; - return 0; -} - -int -kerberos5_set_forwardable(int on) -{ - if(on == 0) - forward_flags &= ~OPTS_FORWARDABLE_CREDS; - if(on == 1) - forward_flags |= OPTS_FORWARDABLE_CREDS; - if(on == -1) - forward_flags ^= OPTS_FORWARDABLE_CREDS; - return 0; -} - -#endif /* KRB5 */ diff --git a/kerberosV/src/appl/telnet/libtelnet/misc-proto.h b/kerberosV/src/appl/telnet/libtelnet/misc-proto.h deleted file mode 100644 index 052c79e83cb..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/misc-proto.h +++ /dev/null @@ -1,79 +0,0 @@ -/*- - * Copyright (c) 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. - * - * @(#)misc-proto.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * Copyright (C) 1990 by the Massachusetts Institute of Technology - * - * Export of this software from the United States of America is assumed - * to require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - */ - -/* $Id: misc-proto.h,v 1.3 2013/06/17 19:11:38 robert Exp $ */ - -#ifndef __MISC_PROTO__ -#define __MISC_PROTO__ - -void auth_encrypt_init (const char *, const char *, const char *, int); -void auth_encrypt_user(const char *name); -void auth_encrypt_connect (int); -void printd (const unsigned char *, int); - -char** genget (char *name, char **table, int stlen); -int isprefix(char *s1, char *s2); -int Ambiguous(void *s); - -/* - * These functions are imported from the application - */ -int telnet_net_write (unsigned char *, int); -void net_encrypt (void); -int telnet_spin (void); -char *telnet_getenv (const char *); -char *telnet_gets (char *, char *, int, int); -void printsub(int direction, unsigned char *pointer, size_t); -#endif diff --git a/kerberosV/src/appl/telnet/libtelnet/misc.c b/kerberosV/src/appl/telnet/libtelnet/misc.c deleted file mode 100644 index 2fec789bb7a..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/misc.c +++ /dev/null @@ -1,95 +0,0 @@ -/*- - * Copyright (c) 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. - */ - -#include - -RCSID("$Id: misc.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#include -#include -#include -#include -#ifdef SOCKS -#include -#endif -#include "misc.h" -#include "auth.h" -#include "encrypt.h" - - -const char *RemoteHostName; -const char *LocalHostName; -char *UserNameRequested = 0; -int ConnectedCount = 0; - -void -auth_encrypt_init(const char *local, const char *remote, const char *name, - int server) -{ - RemoteHostName = remote; - LocalHostName = local; -#ifdef AUTHENTICATION - auth_init(name, server); -#endif -#ifdef ENCRYPTION - encrypt_init(name, server); -#endif - if (UserNameRequested) { - free(UserNameRequested); - UserNameRequested = 0; - } -} - -void -auth_encrypt_user(const char *name) -{ - if (UserNameRequested) - free(UserNameRequested); - UserNameRequested = name ? strdup(name) : 0; -} - -void -auth_encrypt_connect(int cnt) -{ -} - -void -printd(const unsigned char *data, int cnt) -{ - if (cnt > 16) - cnt = 16; - while (cnt-- > 0) { - printf(" %02x", *data); - ++data; - } -} diff --git a/kerberosV/src/appl/telnet/libtelnet/misc.h b/kerberosV/src/appl/telnet/libtelnet/misc.h deleted file mode 100644 index e31556530aa..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/misc.h +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * Copyright (c) 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. - * - * @(#)misc.h 8.1 (Berkeley) 6/4/93 - */ - -extern char *UserNameRequested; -extern const char *LocalHostName; -extern const char *RemoteHostName; -extern int ConnectedCount; -extern int ReservedPort; - -#include "misc-proto.h" diff --git a/kerberosV/src/appl/telnet/libtelnet/rsaencpwd.c b/kerberosV/src/appl/telnet/libtelnet/rsaencpwd.c deleted file mode 100644 index fb9e66f208f..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/rsaencpwd.c +++ /dev/null @@ -1,486 +0,0 @@ -/*- - * 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. - */ - -#include - -RCSID("$Id: rsaencpwd.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#ifdef RSA_ENCPWD -/* - * COPYRIGHT (C) 1990 DIGITAL EQUIPMENT CORPORATION - * ALL RIGHTS RESERVED - * - * "Digital Equipment Corporation authorizes the reproduction, - * distribution and modification of this software subject to the following - * restrictions: - * - * 1. Any partial or whole copy of this software, or any modification - * thereof, must include this copyright notice in its entirety. - * - * 2. This software is supplied "as is" with no warranty of any kind, - * expressed or implied, for any purpose, including any warranty of fitness - * or merchantibility. DIGITAL assumes no responsibility for the use or - * reliability of this software, nor promises to provide any form of - * support for it on any basis. - * - * 3. Distribution of this software is authorized only if no profit or - * remuneration of any kind is received in exchange for such distribution. - * - * 4. This software produces public key authentication certificates - * bearing an expiration date established by DIGITAL and RSA Data - * Security, Inc. It may cease to generate certificates after the expiration - * date. Any modification of this software that changes or defeats - * the expiration date or its effect is unauthorized. - * - * 5. Software that will renew or extend the expiration date of - * authentication certificates produced by this software may be obtained - * from RSA Data Security, Inc., 10 Twin Dolphin Drive, Redwood City, CA - * 94065, (415)595-8782, or from DIGITAL" - * - */ - -#include -#ifdef HAVE_ARPA_TELNET_H -#include -#endif -#include -#include - -#include -#include -#ifdef SOCKS -#include -#endif - -#include "encrypt.h" -#include "auth.h" -#include "misc.h" -#include "cdc.h" - -extern auth_debug_mode; - -static unsigned char str_data[1024] = { IAC, SB, TELOPT_AUTHENTICATION, 0, - AUTHTYPE_RSA_ENCPWD, }; -static unsigned char str_name[1024] = { IAC, SB, TELOPT_AUTHENTICATION, - TELQUAL_NAME, }; - -#define RSA_ENCPWD_AUTH 0 /* Authentication data follows */ -#define RSA_ENCPWD_REJECT 1 /* Rejected (reason might follow) */ -#define RSA_ENCPWD_ACCEPT 2 /* Accepted */ -#define RSA_ENCPWD_CHALLENGEKEY 3 /* Challenge and public key */ - -#define NAME_SZ 40 -#define CHAL_SZ 20 -#define PWD_SZ 40 - -static KTEXT_ST auth; -static char name[NAME_SZ]; -static char user_passwd[PWD_SZ]; -static char key_file[2*NAME_SZ]; -static char lhostname[NAME_SZ]; -static char challenge[CHAL_SZ]; -static int challenge_len; - - static int -Data(ap, type, d, c) - Authenticator *ap; - int type; - void *d; - int c; -{ - unsigned char *p = str_data + 4; - unsigned char *cd = (unsigned char *)d; - - if (c == -1) - c = strlen((char *)cd); - - if (0) { - printf("%s:%d: [%d] (%d)", - str_data[3] == TELQUAL_IS ? ">>>IS" : ">>>REPLY", - str_data[3], - type, c); - printd(d, c); - printf("\r\n"); - } - *p++ = ap->type; - *p++ = ap->way; - if (type != NULL) *p++ = type; - while (c-- > 0) { - if ((*p++ = *cd++) == IAC) - *p++ = IAC; - } - *p++ = IAC; - *p++ = SE; - if (str_data[3] == TELQUAL_IS) - printsub('>', &str_data[2], p - (&str_data[2])); - return(telnet_net_write(str_data, p - str_data)); -} - - int -rsaencpwd_init(ap, server) - Authenticator *ap; - int server; -{ - char *cp; - FILE *fp; - - if (server) { - str_data[3] = TELQUAL_REPLY; - memset(key_file, 0, sizeof(key_file)); - gethostname(lhostname, sizeof(lhostname)); - if ((cp = strchr(lhostname, '.')) != 0) *cp = '\0'; - snprintf(key_file, sizeof(key_file), - SYSCONFDIR "/.%s_privkey", lhostname); - if ((fp=fopen(key_file, "r"))==NULL) return(0); - fclose(fp); - } else { - str_data[3] = TELQUAL_IS; - } - return(1); -} - - int -rsaencpwd_send(ap) - Authenticator *ap; -{ - - printf("[ Trying RSAENCPWD ... ]\r\n"); - if (!UserNameRequested) { - return(0); - } - if (!auth_sendname(UserNameRequested, strlen(UserNameRequested))) { - return(0); - } - if (!Data(ap, NULL, NULL, 0)) { - return(0); - } - - - return(1); -} - - void -rsaencpwd_is(ap, data, cnt) - Authenticator *ap; - unsigned char *data; - int cnt; -{ - Session_Key skey; - des_cblock datablock; - char r_passwd[PWD_SZ], r_user[NAME_SZ]; - char *cp, key[160]; - char chalkey[160], *ptr; - FILE *fp; - int r, i, j, chalkey_len, len; - time_t now; - - cnt--; - switch (*data++) { - case RSA_ENCPWD_AUTH: - memmove(auth.dat, data, auth.length = cnt); - - if ((fp=fopen(key_file, "r"))==NULL) { - Data(ap, RSA_ENCPWD_REJECT, "Auth failed", -1); - auth_finished(ap, AUTH_REJECT); - return; - } - /* - * get privkey - */ - fscanf(fp, "%x;", &len); - for (i=0;iway & AUTH_HOW_MASK) == AUTH_HOW_ONE_WAY) { - int i; - - - time(&now); - if ((now % 2) == 0) { - snprintf(challenge, sizeof(challenge), "%x", now); - challenge_len = strlen(challenge); - } else { - strlcpy(challenge, "randchal", sizeof(challenge)); - challenge_len = 8; - } - - if ((fp=fopen(key_file, "r"))==NULL) { - Data(ap, RSA_ENCPWD_REJECT, "Auth failed", -1); - auth_finished(ap, AUTH_REJECT); - return; - } - /* - * skip privkey - */ - fscanf(fp, "%x;", &len); - for (i=0;i 0) { - printf("[ RSA_ENCPWD refuses authentication because %.*s ]\r\n", - cnt, data); - } else - printf("[ RSA_ENCPWD refuses authentication ]\r\n"); - auth_send_retry(); - return; - case RSA_ENCPWD_ACCEPT: - printf("[ RSA_ENCPWD accepts you ]\r\n"); - auth_finished(ap, AUTH_USER); - return; - case RSA_ENCPWD_CHALLENGEKEY: - /* - * Verify that the response to the challenge is correct. - */ - - memmove(chalkey, data, cnt); - ptr = (char *) &chalkey[0]; - ptr += DecodeHeaderLength(chalkey); - if (*ptr != 0x04) { - return; - } - *ptr++; - challenge_len = DecodeValueLength(ptr); - ptr += NumEncodeLengthOctets(challenge_len); - memmove(challenge, ptr, challenge_len); - ptr += challenge_len; - if (*ptr != 0x04) { - return; - } - *ptr++; - pubkey_len = DecodeValueLength(ptr); - ptr += NumEncodeLengthOctets(pubkey_len); - memmove(pubkey, ptr, pubkey_len); - memset(user_passwd, 0, sizeof(user_passwd)); - des_read_pw_string(user_passwd, sizeof(user_passwd)-1, "Password: ", 0); - UserPassword = user_passwd; - Challenge = challenge; - r = init_rsa_encpwd(&token, user_passwd, challenge, challenge_len, pubkey); - if (r < 0) { - token.length = 1; - } - - if (!Data(ap, RSA_ENCPWD_AUTH, token.dat, token.length)) { - return; - } - - break; - - default: - return; - } -} - - int -rsaencpwd_status(ap, name, name_sz, level) - Authenticator *ap; - char *name; - size_t name_sz; - int level; -{ - - if (level < AUTH_USER) - return(level); - - if (UserNameRequested && rsaencpwd_passwdok(UserNameRequested, UserPassword)) { - strlcpy(name, UserNameRequested, name_sz); - return(AUTH_VALID); - } else { - return(AUTH_USER); - } -} - -#define BUMP(buf, len) while (*(buf)) {++(buf), --(len);} -#define ADDC(buf, len, c) if ((len) > 0) {*(buf)++ = (c); --(len);} - - void -rsaencpwd_printsub(unsigned char *data, size_t cnt, - unsigned char * buf, size_t buflen) -{ - size_t i; - - buf[buflen-1] = '\0'; /* make sure it's NULL terminated */ - buflen -= 1; - - switch(data[3]) { - case RSA_ENCPWD_REJECT: /* Rejected (reason might follow) */ - strlcpy((char *)buf, " REJECT ", buflen); - goto common; - - case RSA_ENCPWD_ACCEPT: /* Accepted (name might follow) */ - strlcpy((char *)buf, " ACCEPT ", buflen); - common: - BUMP(buf, buflen); - if (cnt <= 4) - break; - ADDC(buf, buflen, '"'); - for (i = 4; i < cnt; i++) - ADDC(buf, buflen, data[i]); - ADDC(buf, buflen, '"'); - ADDC(buf, buflen, '\0'); - break; - - case RSA_ENCPWD_AUTH: /* Authentication data follows */ - strlcpy((char *)buf, " AUTH", buflen); - goto common2; - - case RSA_ENCPWD_CHALLENGEKEY: - strlcpy((char *)buf, " CHALLENGEKEY", buflen); - goto common2; - - default: - snprintf(buf, buflen, " %d (unknown)", data[3]); - common2: - BUMP(buf, buflen); - for (i = 4; i < cnt; i++) { - snprintf(buf, buflen, " %d", data[i]); - BUMP(buf, buflen); - } - break; - } -} - -int rsaencpwd_passwdok(name, passwd) -char *name, *passwd; -{ - char *crypt(); - char *salt, *p; - struct passwd *pwd; - int passwdok_status = 0; - - if (pwd = k_getpwnam(name)) - salt = pwd->pw_passwd; - else salt = "xx"; - - p = crypt(passwd, salt); - - if (pwd && !strcmp(p, pwd->pw_passwd)) { - passwdok_status = 1; - } else passwdok_status = 0; - return(passwdok_status); -} - -#endif - -#ifdef notdef - -prkey(msg, key) - char *msg; - unsigned char *key; -{ - int i; - printf("%s:", msg); - for (i = 0; i < 8; i++) - printf(" %3d", key[i]); - printf("\r\n"); -} -#endif diff --git a/kerberosV/src/appl/telnet/libtelnet/spx.c b/kerberosV/src/appl/telnet/libtelnet/spx.c deleted file mode 100644 index 38add7c5bc1..00000000000 --- a/kerberosV/src/appl/telnet/libtelnet/spx.c +++ /dev/null @@ -1,589 +0,0 @@ -/*- - * 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. - */ - -#include - -RCSID("$Id: spx.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#ifdef SPX -/* - * COPYRIGHT (C) 1990 DIGITAL EQUIPMENT CORPORATION - * ALL RIGHTS RESERVED - * - * "Digital Equipment Corporation authorizes the reproduction, - * distribution and modification of this software subject to the following - * restrictions: - * - * 1. Any partial or whole copy of this software, or any modification - * thereof, must include this copyright notice in its entirety. - * - * 2. This software is supplied "as is" with no warranty of any kind, - * expressed or implied, for any purpose, including any warranty of fitness - * or merchantibility. DIGITAL assumes no responsibility for the use or - * reliability of this software, nor promises to provide any form of - * support for it on any basis. - * - * 3. Distribution of this software is authorized only if no profit or - * remuneration of any kind is received in exchange for such distribution. - * - * 4. This software produces public key authentication certificates - * bearing an expiration date established by DIGITAL and RSA Data - * Security, Inc. It may cease to generate certificates after the expiration - * date. Any modification of this software that changes or defeats - * the expiration date or its effect is unauthorized. - * - * 5. Software that will renew or extend the expiration date of - * authentication certificates produced by this software may be obtained - * from RSA Data Security, Inc., 10 Twin Dolphin Drive, Redwood City, CA - * 94065, (415)595-8782, or from DIGITAL" - * - */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_ARPA_TELNET_H -#include -#endif -#include -#include "gssapi_defs.h" -#include -#include - -#include -#ifdef SOCKS -#include -#endif - -#include "encrypt.h" -#include "auth.h" -#include "misc.h" - -extern auth_debug_mode; - -static unsigned char str_data[1024] = { IAC, SB, TELOPT_AUTHENTICATION, 0, - AUTHTYPE_SPX, }; -static unsigned char str_name[1024] = { IAC, SB, TELOPT_AUTHENTICATION, - TELQUAL_NAME, }; - -#define SPX_AUTH 0 /* Authentication data follows */ -#define SPX_REJECT 1 /* Rejected (reason might follow) */ -#define SPX_ACCEPT 2 /* Accepted */ - -static des_key_schedule sched; -static des_cblock challenge = { 0 }; - - -/*******************************************************************/ - -gss_OID_set actual_mechs; -gss_OID actual_mech_type, output_name_type; -int major_status, status, msg_ctx = 0, new_status; -int req_flags = 0, ret_flags, lifetime_rec; -gss_cred_id_t gss_cred_handle; -gss_ctx_id_t actual_ctxhandle, context_handle; -gss_buffer_desc output_token, input_token, input_name_buffer; -gss_buffer_desc status_string; -gss_name_t desired_targname, src_name; -gss_channel_bindings input_chan_bindings; -char lhostname[GSS_C_MAX_PRINTABLE_NAME]; -char targ_printable[GSS_C_MAX_PRINTABLE_NAME]; -int to_addr=0, from_addr=0; -char *address; -gss_buffer_desc fullname_buffer; -gss_OID fullname_type; -gss_cred_id_t gss_delegated_cred_handle; - -/*******************************************************************/ - - - - static int -Data(ap, type, d, c) - Authenticator *ap; - int type; - void *d; - int c; -{ - unsigned char *p = str_data + 4; - unsigned char *cd = (unsigned char *)d; - - if (c == -1) - c = strlen((char *)cd); - - if (0) { - printf("%s:%d: [%d] (%d)", - str_data[3] == TELQUAL_IS ? ">>>IS" : ">>>REPLY", - str_data[3], - type, c); - printd(d, c); - printf("\r\n"); - } - *p++ = ap->type; - *p++ = ap->way; - *p++ = type; - while (c-- > 0) { - if ((*p++ = *cd++) == IAC) - *p++ = IAC; - } - *p++ = IAC; - *p++ = SE; - if (str_data[3] == TELQUAL_IS) - printsub('>', &str_data[2], p - (&str_data[2])); - return(telnet_net_write(str_data, p - str_data)); -} - - int -spx_init(ap, server) - Authenticator *ap; - int server; -{ - gss_cred_id_t tmp_cred_handle; - - if (server) { - str_data[3] = TELQUAL_REPLY; - gethostname(lhostname, sizeof(lhostname)); - snprintf (targ_printable, sizeof(targ_printable), - "SERVICE:rcmd@%s", lhostname); - input_name_buffer.length = strlen(targ_printable); - input_name_buffer.value = targ_printable; - major_status = gss_import_name(&status, - &input_name_buffer, - GSS_C_NULL_OID, - &desired_targname); - major_status = gss_acquire_cred(&status, - desired_targname, - 0, - GSS_C_NULL_OID_SET, - GSS_C_ACCEPT, - &tmp_cred_handle, - &actual_mechs, - &lifetime_rec); - if (major_status != GSS_S_COMPLETE) return(0); - } else { - str_data[3] = TELQUAL_IS; - } - return(1); -} - - int -spx_send(ap) - Authenticator *ap; -{ - des_cblock enckey; - int r; - - gss_OID actual_mech_type, output_name_type; - int msg_ctx = 0, new_status, status; - int req_flags = 0, ret_flags, lifetime_rec, major_status; - gss_buffer_desc output_token, input_token, input_name_buffer; - gss_buffer_desc output_name_buffer, status_string; - gss_name_t desired_targname; - gss_channel_bindings input_chan_bindings; - char targ_printable[GSS_C_MAX_PRINTABLE_NAME]; - int from_addr=0, to_addr=0, myhostlen, j; - int deleg_flag=1, mutual_flag=0, replay_flag=0, seq_flag=0; - char *address; - - printf("[ Trying SPX ... ]\r\n"); - snprintf (targ_printable, sizeof(targ_printable), - "SERVICE:rcmd@%s", RemoteHostName); - - input_name_buffer.length = strlen(targ_printable); - input_name_buffer.value = targ_printable; - - if (!UserNameRequested) { - return(0); - } - - major_status = gss_import_name(&status, - &input_name_buffer, - GSS_C_NULL_OID, - &desired_targname); - - - major_status = gss_display_name(&status, - desired_targname, - &output_name_buffer, - &output_name_type); - - printf("target is '%.*s'\n", (int)output_name_buffer.length, - (char*)output_name_buffer.value); - fflush(stdout); - - major_status = gss_release_buffer(&status, &output_name_buffer); - - input_chan_bindings = (gss_channel_bindings) - malloc(sizeof(gss_channel_bindings_desc)); - - input_chan_bindings->initiator_addrtype = GSS_C_AF_INET; - input_chan_bindings->initiator_address.length = 4; - address = (char *) malloc(4); - input_chan_bindings->initiator_address.value = (char *) address; - address[0] = ((from_addr & 0xff000000) >> 24); - address[1] = ((from_addr & 0xff0000) >> 16); - address[2] = ((from_addr & 0xff00) >> 8); - address[3] = (from_addr & 0xff); - input_chan_bindings->acceptor_addrtype = GSS_C_AF_INET; - input_chan_bindings->acceptor_address.length = 4; - address = (char *) malloc(4); - input_chan_bindings->acceptor_address.value = (char *) address; - address[0] = ((to_addr & 0xff000000) >> 24); - address[1] = ((to_addr & 0xff0000) >> 16); - address[2] = ((to_addr & 0xff00) >> 8); - address[3] = (to_addr & 0xff); - input_chan_bindings->application_data.length = 0; - - req_flags = 0; - if (deleg_flag) req_flags = req_flags | 1; - if (mutual_flag) req_flags = req_flags | 2; - if (replay_flag) req_flags = req_flags | 4; - if (seq_flag) req_flags = req_flags | 8; - - major_status = gss_init_sec_context(&status, /* minor status */ - GSS_C_NO_CREDENTIAL, /* cred handle */ - &actual_ctxhandle, /* ctx handle */ - desired_targname, /* target name */ - GSS_C_NULL_OID, /* mech type */ - req_flags, /* req flags */ - 0, /* time req */ - input_chan_bindings, /* chan binding */ - GSS_C_NO_BUFFER, /* input token */ - &actual_mech_type, /* actual mech */ - &output_token, /* output token */ - &ret_flags, /* ret flags */ - &lifetime_rec); /* time rec */ - - if ((major_status != GSS_S_COMPLETE) && - (major_status != GSS_S_CONTINUE_NEEDED)) { - gss_display_status(&new_status, - status, - GSS_C_MECH_CODE, - GSS_C_NULL_OID, - &msg_ctx, - &status_string); - printf("%.*s\n", (int)status_string.length, - (char*)status_string.value); - return(0); - } - - if (!auth_sendname(UserNameRequested, strlen(UserNameRequested))) { - return(0); - } - - if (!Data(ap, SPX_AUTH, output_token.value, output_token.length)) { - return(0); - } - - return(1); -} - - void -spx_is(ap, data, cnt) - Authenticator *ap; - unsigned char *data; - int cnt; -{ - Session_Key skey; - des_cblock datablock; - int r; - - if (cnt-- < 1) - return; - switch (*data++) { - case SPX_AUTH: - input_token.length = cnt; - input_token.value = (char *) data; - - gethostname(lhostname, sizeof(lhostname)); - - snprintf(targ_printable, sizeof(targ_printable), - "SERVICE:rcmd@%s", lhostname); - - input_name_buffer.length = strlen(targ_printable); - input_name_buffer.value = targ_printable; - - major_status = gss_import_name(&status, - &input_name_buffer, - GSS_C_NULL_OID, - &desired_targname); - - major_status = gss_acquire_cred(&status, - desired_targname, - 0, - GSS_C_NULL_OID_SET, - GSS_C_ACCEPT, - &gss_cred_handle, - &actual_mechs, - &lifetime_rec); - - major_status = gss_release_name(&status, desired_targname); - - input_chan_bindings = (gss_channel_bindings) - malloc(sizeof(gss_channel_bindings_desc)); - - input_chan_bindings->initiator_addrtype = GSS_C_AF_INET; - input_chan_bindings->initiator_address.length = 4; - address = (char *) malloc(4); - input_chan_bindings->initiator_address.value = (char *) address; - address[0] = ((from_addr & 0xff000000) >> 24); - address[1] = ((from_addr & 0xff0000) >> 16); - address[2] = ((from_addr & 0xff00) >> 8); - address[3] = (from_addr & 0xff); - input_chan_bindings->acceptor_addrtype = GSS_C_AF_INET; - input_chan_bindings->acceptor_address.length = 4; - address = (char *) malloc(4); - input_chan_bindings->acceptor_address.value = (char *) address; - address[0] = ((to_addr & 0xff000000) >> 24); - address[1] = ((to_addr & 0xff0000) >> 16); - address[2] = ((to_addr & 0xff00) >> 8); - address[3] = (to_addr & 0xff); - input_chan_bindings->application_data.length = 0; - - major_status = gss_accept_sec_context(&status, - &context_handle, - gss_cred_handle, - &input_token, - input_chan_bindings, - &src_name, - &actual_mech_type, - &output_token, - &ret_flags, - &lifetime_rec, - &gss_delegated_cred_handle); - - - if (major_status != GSS_S_COMPLETE) { - - major_status = gss_display_name(&status, - src_name, - &fullname_buffer, - &fullname_type); - Data(ap, SPX_REJECT, "auth failed", -1); - auth_finished(ap, AUTH_REJECT); - return; - } - - major_status = gss_display_name(&status, - src_name, - &fullname_buffer, - &fullname_type); - - - Data(ap, SPX_ACCEPT, output_token.value, output_token.length); - auth_finished(ap, AUTH_USER); - break; - - default: - Data(ap, SPX_REJECT, 0, 0); - break; - } -} - - - void -spx_reply(ap, data, cnt) - Authenticator *ap; - unsigned char *data; - int cnt; -{ - Session_Key skey; - - if (cnt-- < 1) - return; - switch (*data++) { - case SPX_REJECT: - if (cnt > 0) { - printf("[ SPX refuses authentication because %.*s ]\r\n", - cnt, data); - } else - printf("[ SPX refuses authentication ]\r\n"); - auth_send_retry(); - return; - case SPX_ACCEPT: - printf("[ SPX accepts you ]\r\n"); - if ((ap->way & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) { - /* - * Send over the encrypted challenge. - */ - input_token.value = (char *) data; - input_token.length = cnt; - - major_status = gss_init_sec_context(&status, /* minor stat */ - GSS_C_NO_CREDENTIAL, /* cred handle */ - &actual_ctxhandle, /* ctx handle */ - desired_targname, /* target name */ - GSS_C_NULL_OID, /* mech type */ - req_flags, /* req flags */ - 0, /* time req */ - input_chan_bindings, /* chan binding */ - &input_token, /* input token */ - &actual_mech_type, /* actual mech */ - &output_token, /* output token */ - &ret_flags, /* ret flags */ - &lifetime_rec); /* time rec */ - - if (major_status != GSS_S_COMPLETE) { - gss_display_status(&new_status, - status, - GSS_C_MECH_CODE, - GSS_C_NULL_OID, - &msg_ctx, - &status_string); - printf("[ SPX mutual response fails ... '%.*s' ]\r\n", - (int)status_string.length, - (char*)status_string.value); - auth_send_retry(); - return; - } - } - auth_finished(ap, AUTH_USER); - return; - - default: - return; - } -} - - int -spx_status(ap, name, name_sz, level) - Authenticator *ap; - char *name; - size_t name_sz; - int level; -{ - - gss_buffer_desc fullname_buffer, acl_file_buffer; - gss_OID fullname_type; - char acl_file[160], fullname[160]; - int major_status, status = 0; - struct passwd *pwd; - - /* - * hard code fullname to - * "SPX:/C=US/O=Digital/OU=LKG/OU=Sphinx/OU=Users/CN=Kannan Alagappan" - * and acl_file to "~kannan/.sphinx" - */ - - pwd = k_getpwnam(UserNameRequested); - if (pwd == NULL) { - return(AUTH_USER); /* not authenticated */ - } - - snprintf (acl_file, sizeof(acl_file), - "%s/.sphinx", pwd->pw_dir); - - acl_file_buffer.value = acl_file; - acl_file_buffer.length = strlen(acl_file); - - major_status = gss_display_name(&status, - src_name, - &fullname_buffer, - &fullname_type); - - if (level < AUTH_USER) - return(level); - - major_status = gss__check_acl(&status, &fullname_buffer, - &acl_file_buffer); - - if (major_status == GSS_S_COMPLETE) { - strlcpy(name, UserNameRequested, name_sz); - return(AUTH_VALID); - } else { - return(AUTH_USER); - } - -} - -#define BUMP(buf, len) while (*(buf)) {++(buf), --(len);} -#define ADDC(buf, len, c) if ((len) > 0) {*(buf)++ = (c); --(len);} - - void -spx_printsub(unsigned char *data, size_t cnt, - unsigned char *buf, size_t buflen) -{ - size_t i; - - buf[buflen-1] = '\0'; /* make sure it's NULL terminated */ - buflen -= 1; - - switch(data[3]) { - case SPX_REJECT: /* Rejected (reason might follow) */ - strlcpy((char *)buf, " REJECT ", buflen); - goto common; - - case SPX_ACCEPT: /* Accepted (name might follow) */ - strlcpy((char *)buf, " ACCEPT ", buflen); - common: - BUMP(buf, buflen); - if (cnt <= 4) - break; - ADDC(buf, buflen, '"'); - for (i = 4; i < cnt; i++) - ADDC(buf, buflen, data[i]); - ADDC(buf, buflen, '"'); - ADDC(buf, buflen, '\0'); - break; - - case SPX_AUTH: /* Authentication data follows */ - strlcpy((char *)buf, " AUTH", buflen); - goto common2; - - default: - snprintf(buf, buflen, " %d (unknown)", data[3]); - common2: - BUMP(buf, buflen); - for (i = 4; i < cnt; i++) { - snprintf(buf, buflen, " %d", data[i]); - BUMP(buf, buflen); - } - break; - } -} - -#endif - -#ifdef notdef - -prkey(msg, key) - char *msg; - unsigned char *key; -{ - int i; - printf("%s:", msg); - for (i = 0; i < 8; i++) - printf(" %3d", key[i]); - printf("\r\n"); -} -#endif diff --git a/kerberosV/src/appl/telnet/telnet.state b/kerberosV/src/appl/telnet/telnet.state deleted file mode 100644 index 1927a2b4bb5..00000000000 --- a/kerberosV/src/appl/telnet/telnet.state +++ /dev/null @@ -1,80 +0,0 @@ - - Three pieces of state need to be kept for each side of each option. - (You need the localside, sending WILL/WONT & receiving DO/DONT, and - the remoteside, sending DO/DONT and receiving WILL/WONT) - - MY_STATE: What state am I in? - WANT_STATE: What state do I want? - WANT_RESP: How many requests have I initiated? - - Default values: - MY_STATE = WANT_STATE = DONT - WANT_RESP = 0 - - The local setup will change based on the state of the Telnet - variables. When we are the originator, we can either make the - local setup changes at option request time (in which case if - the option is denied we need to change things back) or when - the option is acknowledged. - - To initiate a switch to NEW_STATE: - - if ((WANT_RESP == 0 && NEW_STATE == MY_STATE) || - WANT_STATE == NEW_STATE) { - do nothing; - } else { - /* - * This is where the logic goes to change the local setup - * if we are doing so at request initiation - */ - WANT_STATE = NEW_STATE; - send NEW_STATE; - WANT_RESP += 1; - } - - When receiving NEW_STATE: - - if (WANT_RESP) { - --WANT_RESP; - if (WANT_RESP && (NEW_STATE == MY_STATE)) - --WANT_RESP; - } - if (WANT_RESP == 0) { - if (NEW_STATE != WANT_STATE) { - /* - * This is where the logic goes to decide if it is ok - * to switch to NEW_STATE, and if so, do any necessary - * local setup changes. - */ - if (ok_to_switch_to NEW_STATE) - WANT_STATE = NEW_STATE; - else - WANT_RESP++; -* if (MY_STATE != WANT_STATE) - reply with WANT_STATE; - } else { - /* - * This is where the logic goes to change the local setup - * if we are doing so at request acknowledgment - */ - } - } - MY_STATE = NEW_STATE; - -* This if() line is not needed, it should be ok to always do the - "reply with WANT_STATE". With the if() line, asking to turn on - an option that the other side doesn't understand is: - Send DO option - Recv WONT option - Without the if() line, it is: - Send DO option - Recv WONT option - Send DONT option - If the other side does not expect to receive the latter case, - but generates the latter case, then there is a potential for - option negotiation loops. An implementation that does not expect - to get the second case should not generate it, an implementation - that does expect to get it may or may not generate it, and things - will still work. Being conservative in what we send, we have the - if() statement in, but we expect the other side to generate the - last response. diff --git a/kerberosV/src/appl/telnet/telnet/Makefile.am b/kerberosV/src/appl/telnet/telnet/Makefile.am deleted file mode 100644 index 261d7a7693b..00000000000 --- a/kerberosV/src/appl/telnet/telnet/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:38 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += -I$(srcdir)/.. $(INCLUDE_hcrypto) - -bin_PROGRAMS = telnet - -CHECK_LOCAL = - -telnet_SOURCES = authenc.c commands.c main.c network.c ring.c \ - sys_bsd.c telnet.c terminal.c \ - utilities.c defines.h externs.h ring.h telnet_locl.h types.h - -man_MANS = telnet.1 - -LDADD = ../libtelnet/libtelnet.a \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_tgetent) \ - $(LIB_kdfs) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) diff --git a/kerberosV/src/appl/telnet/telnet/Makefile.in b/kerberosV/src/appl/telnet/telnet/Makefile.in deleted file mode 100644 index 798d9d4f1ad..00000000000 --- a/kerberosV/src/appl/telnet/telnet/Makefile.in +++ /dev/null @@ -1,970 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -bin_PROGRAMS = telnet$(EXEEXT) -subdir = appl/telnet/telnet -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -PROGRAMS = $(bin_PROGRAMS) -am_telnet_OBJECTS = authenc.$(OBJEXT) commands.$(OBJEXT) \ - main.$(OBJEXT) network.$(OBJEXT) ring.$(OBJEXT) \ - sys_bsd.$(OBJEXT) telnet.$(OBJEXT) terminal.$(OBJEXT) \ - utilities.$(OBJEXT) -telnet_OBJECTS = $(am_telnet_OBJECTS) -telnet_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -telnet_DEPENDENCIES = ../libtelnet/libtelnet.a $(LIB_krb5) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(LIB_kdfs) \ - $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(telnet_SOURCES) -DIST_SOURCES = $(telnet_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -I$(srcdir)/.. $(INCLUDE_hcrypto) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -CHECK_LOCAL = -telnet_SOURCES = authenc.c commands.c main.c network.c ring.c \ - sys_bsd.c telnet.c terminal.c \ - utilities.c defines.h externs.h ring.h telnet_locl.h types.h - -man_MANS = telnet.1 -LDADD = ../libtelnet/libtelnet.a \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_tgetent) \ - $(LIB_kdfs) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/telnet/telnet/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/telnet/telnet/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -telnet$(EXEEXT): $(telnet_OBJECTS) $(telnet_DEPENDENCIES) - @rm -f telnet$(EXEEXT) - $(LINK) $(telnet_OBJECTS) $(telnet_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authenc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commands.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ring.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_bsd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/telnet.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terminal.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utilities.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-hook \ - uninstall-man uninstall-man1 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/telnet/telnet/NTMakefile b/kerberosV/src/appl/telnet/telnet/NTMakefile deleted file mode 100644 index 9b0844692d3..00000000000 --- a/kerberosV/src/appl/telnet/telnet/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\telnet\telnet - -!include ../../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/telnet/telnet/authenc.c b/kerberosV/src/appl/telnet/telnet/authenc.c deleted file mode 100644 index 184ce6e486c..00000000000 --- a/kerberosV/src/appl/telnet/telnet/authenc.c +++ /dev/null @@ -1,99 +0,0 @@ -/*- - * Copyright (c) 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. - */ - -#include "telnet_locl.h" - -RCSID("$Id: authenc.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#if defined(AUTHENTICATION) || defined(ENCRYPTION) -int -telnet_net_write(unsigned char *str, int len) -{ - if (NETROOM() > len) { - ring_supply_data(&netoring, str, len); - if (str[0] == IAC && str[1] == SE) - printsub('>', &str[2], len-2); - return(len); - } - return(0); -} - -void -net_encrypt(void) -{ -#if defined(ENCRYPTION) - if (encrypt_output) - ring_encrypt(&netoring, encrypt_output); - else - ring_clearto(&netoring); -#endif -} - -int -telnet_spin(void) -{ - int ret = 0; - - scheduler_lockout_tty = 1; - if (Scheduler(0) == -1) - ret = 1; - scheduler_lockout_tty = 0; - - return ret; - -} - -char * -telnet_getenv(const char *val) -{ - return((char *)env_getvalue((unsigned char *)val)); -} - -char * -telnet_gets(char *prompt, char *result, int length, int echo) -{ - int om = globalmode; - char *res; - - TerminalNewMode(-1); - if (echo) { - printf("%s", prompt); - res = fgets(result, length, stdin); - } else if ((res = getpass(prompt))) { - strlcpy(result, res, length); - res = result; - } - TerminalNewMode(om); - return(res); -} -#endif diff --git a/kerberosV/src/appl/telnet/telnet/commands.c b/kerberosV/src/appl/telnet/telnet/commands.c deleted file mode 100644 index 6f9c5398271..00000000000 --- a/kerberosV/src/appl/telnet/telnet/commands.c +++ /dev/null @@ -1,2675 +0,0 @@ -/* - * Copyright (c) 1988, 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. - */ - -#include "telnet_locl.h" - -RCSID("$Id: commands.c,v 1.5 2013/06/17 19:11:38 robert Exp $"); - -#if defined(IPPROTO_IP) && defined(IP_TOS) -int tos = -1; -#endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ - -char *hostname; -static char _hostname[MaxHostNameLen]; - -typedef int (*intrtn_t)(int, char**); -static int call(intrtn_t, ...); - -typedef struct { - char *name; /* command name */ - char *help; /* help string (NULL for no help) */ - int (*handler)(); /* routine which executes command */ - int needconnect; /* Do we need to be connected to execute? */ -} Command; - -static char line[256]; -static char saveline[256]; -static int margc; -static char *margv[20]; - -static void -makeargv() -{ - char *cp, *cp2, c; - char **argp = margv; - - margc = 0; - cp = line; - if (*cp == '!') { /* Special case shell escape */ - /* save for shell command */ - strlcpy(saveline, line, sizeof(saveline)); - *argp++ = "!"; /* No room in string to get this */ - margc++; - cp++; - } - while ((c = *cp)) { - int inquote = 0; - while (isspace((unsigned char)c)) - c = *++cp; - if (c == '\0') - break; - *argp++ = cp; - margc += 1; - for (cp2 = cp; c != '\0'; c = *++cp) { - if (inquote) { - if (c == inquote) { - inquote = 0; - continue; - } - } else { - if (c == '\\') { - if ((c = *++cp) == '\0') - break; - } else if (c == '"') { - inquote = '"'; - continue; - } else if (c == '\'') { - inquote = '\''; - continue; - } else if (isspace((unsigned char)c)) - break; - } - *cp2++ = c; - } - *cp2 = '\0'; - if (c == '\0') - break; - cp++; - } - *argp++ = 0; -} - -/* - * Make a character string into a number. - * - * Todo: 1. Could take random integers (12, 0x12, 012, 0b1). - */ - -static char -special(char *s) -{ - char c; - char b; - - switch (*s) { - case '^': - b = *++s; - if (b == '?') { - c = b | 0x40; /* DEL */ - } else { - c = b & 0x1f; - } - break; - default: - c = *s; - break; - } - return c; -} - -/* - * Construct a control character sequence - * for a special character. - */ -static char * -control(cc_t c) -{ - static char buf[5]; - /* - * The only way I could get the Sun 3.5 compiler - * to shut up about - * if ((unsigned int)c >= 0x80) - * was to assign "c" to an unsigned int variable... - * Arggg.... - */ - unsigned int uic = (unsigned int)c; - - if (uic == 0x7f) - return ("^?"); - if (c == (cc_t)_POSIX_VDISABLE) { - return "off"; - } - if (uic >= 0x80) { - buf[0] = '\\'; - buf[1] = ((c>>6)&07) + '0'; - buf[2] = ((c>>3)&07) + '0'; - buf[3] = (c&07) + '0'; - buf[4] = 0; - } else if (uic >= 0x20) { - buf[0] = c; - buf[1] = 0; - } else { - buf[0] = '^'; - buf[1] = '@'+c; - buf[2] = 0; - } - return (buf); -} - - - -/* - * The following are data structures and routines for - * the "send" command. - * - */ - -struct sendlist { - char *name; /* How user refers to it (case independent) */ - char *help; /* Help information (0 ==> no help) */ - int needconnect; /* Need to be connected */ - int narg; /* Number of arguments */ - int (*handler)(); /* Routine to perform (for special ops) */ - int nbyte; /* Number of bytes to send this command */ - int what; /* Character to be sent (<0 ==> special) */ -}; - - -static int - send_esc (void), - send_help (void), - send_docmd (char *), - send_dontcmd (char *), - send_willcmd (char *), - send_wontcmd (char *); - -static struct sendlist Sendlist[] = { - { "ao", "Send Telnet Abort output", 1, 0, 0, 2, AO }, - { "ayt", "Send Telnet 'Are You There'", 1, 0, 0, 2, AYT }, - { "brk", "Send Telnet Break", 1, 0, 0, 2, BREAK }, - { "break", 0, 1, 0, 0, 2, BREAK }, - { "ec", "Send Telnet Erase Character", 1, 0, 0, 2, EC }, - { "el", "Send Telnet Erase Line", 1, 0, 0, 2, EL }, - { "escape", "Send current escape character", 1, 0, send_esc, 1, 0 }, - { "ga", "Send Telnet 'Go Ahead' sequence", 1, 0, 0, 2, GA }, - { "ip", "Send Telnet Interrupt Process", 1, 0, 0, 2, IP }, - { "intp", 0, 1, 0, 0, 2, IP }, - { "interrupt", 0, 1, 0, 0, 2, IP }, - { "intr", 0, 1, 0, 0, 2, IP }, - { "nop", "Send Telnet 'No operation'", 1, 0, 0, 2, NOP }, - { "eor", "Send Telnet 'End of Record'", 1, 0, 0, 2, EOR }, - { "abort", "Send Telnet 'Abort Process'", 1, 0, 0, 2, ABORT }, - { "susp", "Send Telnet 'Suspend Process'", 1, 0, 0, 2, SUSP }, - { "eof", "Send Telnet End of File Character", 1, 0, 0, 2, xEOF }, - { "synch", "Perform Telnet 'Synch operation'", 1, 0, dosynch, 2, 0 }, - { "getstatus", "Send request for STATUS", 1, 0, get_status, 6, 0 }, - { "?", "Display send options", 0, 0, send_help, 0, 0 }, - { "help", 0, 0, 0, send_help, 0, 0 }, - { "do", 0, 0, 1, send_docmd, 3, 0 }, - { "dont", 0, 0, 1, send_dontcmd, 3, 0 }, - { "will", 0, 0, 1, send_willcmd, 3, 0 }, - { "wont", 0, 0, 1, send_wontcmd, 3, 0 }, - { 0 } -}; - -#define GETSEND(name) ((struct sendlist *) genget(name, (char **) Sendlist, \ - sizeof(struct sendlist))) - -static int -sendcmd(int argc, char **argv) -{ - int count; /* how many bytes we are going to need to send */ - int i; - struct sendlist *s; /* pointer to current command */ - int success = 0; - int needconnect = 0; - - if (argc < 2) { - printf("need at least one argument for 'send' command\r\n"); - printf("'send ?' for help\r\n"); - return 0; - } - /* - * First, validate all the send arguments. - * In addition, we see how much space we are going to need, and - * whether or not we will be doing a "SYNCH" operation (which - * flushes the network queue). - */ - count = 0; - for (i = 1; i < argc; i++) { - s = GETSEND(argv[i]); - if (s == 0) { - printf("Unknown send argument '%s'\r\n'send ?' for help.\r\n", - argv[i]); - return 0; - } else if (Ambiguous(s)) { - printf("Ambiguous send argument '%s'\r\n'send ?' for help.\r\n", - argv[i]); - return 0; - } - if (i + s->narg >= argc) { - fprintf(stderr, - "Need %d argument%s to 'send %s' command. 'send %s ?' for help.\r\n", - s->narg, s->narg == 1 ? "" : "s", s->name, s->name); - return 0; - } - count += s->nbyte; - if (s->handler == send_help) { - send_help(); - return 0; - } - - i += s->narg; - needconnect += s->needconnect; - } - if (!connected && needconnect) { - printf("?Need to be connected first.\r\n"); - printf("'send ?' for help\r\n"); - return 0; - } - /* Now, do we have enough room? */ - if (NETROOM() < count) { - printf("There is not enough room in the buffer TO the network\r\n"); - printf("to process your request. Nothing will be done.\r\n"); - printf("('send synch' will throw away most data in the network\r\n"); - printf("buffer, if this might help.)\r\n"); - return 0; - } - /* OK, they are all OK, now go through again and actually send */ - count = 0; - for (i = 1; i < argc; i++) { - if ((s = GETSEND(argv[i])) == 0) { - fprintf(stderr, "Telnet 'send' error - argument disappeared!\r\n"); - quit(); - /*NOTREACHED*/ - } - if (s->handler) { - count++; - success += (*s->handler)((s->narg > 0) ? argv[i+1] : 0, - (s->narg > 1) ? argv[i+2] : 0); - i += s->narg; - } else { - NET2ADD(IAC, s->what); - printoption("SENT", IAC, s->what); - } - } - return (count == success); -} - -static int -send_tncmd(void (*func)(), char *cmd, char *name); - -static int -send_esc() -{ - NETADD(escape); - return 1; -} - -static int -send_docmd(char *name) -{ - return(send_tncmd(send_do, "do", name)); -} - -static int -send_dontcmd(char *name) -{ - return(send_tncmd(send_dont, "dont", name)); -} - -static int -send_willcmd(char *name) -{ - return(send_tncmd(send_will, "will", name)); -} - -static int -send_wontcmd(char *name) -{ - return(send_tncmd(send_wont, "wont", name)); -} - -extern char *telopts[]; /* XXX */ - -static int -send_tncmd(void (*func)(), char *cmd, char *name) -{ - char **cpp; - int val = 0; - - if (isprefix(name, "help") || isprefix(name, "?")) { - int col, len; - - printf("Usage: send %s \r\n", cmd); - printf("\"value\" must be from 0 to 255\r\n"); - printf("Valid options are:\r\n\t"); - - col = 8; - for (cpp = telopts; *cpp; cpp++) { - len = strlen(*cpp) + 3; - if (col + len > 65) { - printf("\r\n\t"); - col = 8; - } - printf(" \"%s\"", *cpp); - col += len; - } - printf("\r\n"); - return 0; - } - cpp = genget(name, telopts, sizeof(char *)); - if (Ambiguous(cpp)) { - fprintf(stderr,"'%s': ambiguous argument ('send %s ?' for help).\r\n", - name, cmd); - return 0; - } - if (cpp) { - val = cpp - telopts; - } else { - char *cp = name; - - while (*cp >= '0' && *cp <= '9') { - val *= 10; - val += *cp - '0'; - cp++; - } - if (*cp != 0) { - fprintf(stderr, "'%s': unknown argument ('send %s ?' for help).\r\n", - name, cmd); - return 0; - } else if (val < 0 || val > 255) { - fprintf(stderr, "'%s': bad value ('send %s ?' for help).\r\n", - name, cmd); - return 0; - } - } - if (!connected) { - printf("?Need to be connected first.\r\n"); - return 0; - } - (*func)(val, 1); - return 1; -} - -static int -send_help() -{ - struct sendlist *s; /* pointer to current command */ - for (s = Sendlist; s->name; s++) { - if (s->help) - printf("%-15s %s\r\n", s->name, s->help); - } - return(0); -} - -/* - * The following are the routines and data structures referred - * to by the arguments to the "toggle" command. - */ - -static int -lclchars() -{ - donelclchars = 1; - return 1; -} - -static int -togdebug() -{ -#ifndef NOT43 - if (net > 0 && - (SetSockOpt(net, SOL_SOCKET, SO_DEBUG, debug)) < 0) { - perror("setsockopt (SO_DEBUG)"); - } -#else /* NOT43 */ - if (debug) { - if (net > 0 && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 0, 0) < 0) - perror("setsockopt (SO_DEBUG)"); - } else - printf("Cannot turn off socket debugging\r\n"); -#endif /* NOT43 */ - return 1; -} - -static int -togcrlf() -{ - if (crlf) { - printf("Will send carriage returns as telnet .\r\n"); - } else { - printf("Will send carriage returns as telnet .\r\n"); - } - return 1; -} - -int binmode; - -static int -togbinary(int val) -{ - donebinarytoggle = 1; - - if (val >= 0) { - binmode = val; - } else { - if (my_want_state_is_will(TELOPT_BINARY) && - my_want_state_is_do(TELOPT_BINARY)) { - binmode = 1; - } else if (my_want_state_is_wont(TELOPT_BINARY) && - my_want_state_is_dont(TELOPT_BINARY)) { - binmode = 0; - } - val = binmode ? 0 : 1; - } - - if (val == 1) { - if (my_want_state_is_will(TELOPT_BINARY) && - my_want_state_is_do(TELOPT_BINARY)) { - printf("Already operating in binary mode with remote host.\r\n"); - } else { - printf("Negotiating binary mode with remote host.\r\n"); - tel_enter_binary(3); - } - } else { - if (my_want_state_is_wont(TELOPT_BINARY) && - my_want_state_is_dont(TELOPT_BINARY)) { - printf("Already in network ascii mode with remote host.\r\n"); - } else { - printf("Negotiating network ascii mode with remote host.\r\n"); - tel_leave_binary(3); - } - } - return 1; -} - -static int -togrbinary(int val) -{ - donebinarytoggle = 1; - - if (val == -1) - val = my_want_state_is_do(TELOPT_BINARY) ? 0 : 1; - - if (val == 1) { - if (my_want_state_is_do(TELOPT_BINARY)) { - printf("Already receiving in binary mode.\r\n"); - } else { - printf("Negotiating binary mode on input.\r\n"); - tel_enter_binary(1); - } - } else { - if (my_want_state_is_dont(TELOPT_BINARY)) { - printf("Already receiving in network ascii mode.\r\n"); - } else { - printf("Negotiating network ascii mode on input.\r\n"); - tel_leave_binary(1); - } - } - return 1; -} - -static int -togxbinary(int val) -{ - donebinarytoggle = 1; - - if (val == -1) - val = my_want_state_is_will(TELOPT_BINARY) ? 0 : 1; - - if (val == 1) { - if (my_want_state_is_will(TELOPT_BINARY)) { - printf("Already transmitting in binary mode.\r\n"); - } else { - printf("Negotiating binary mode on output.\r\n"); - tel_enter_binary(2); - } - } else { - if (my_want_state_is_wont(TELOPT_BINARY)) { - printf("Already transmitting in network ascii mode.\r\n"); - } else { - printf("Negotiating network ascii mode on output.\r\n"); - tel_leave_binary(2); - } - } - return 1; -} - - -static int togglehelp (void); -#if defined(AUTHENTICATION) -extern int auth_togdebug (int); -#endif -#if defined(ENCRYPTION) -extern int EncryptAutoEnc (int); -extern int EncryptAutoDec (int); -extern int EncryptDebug (int); -extern int EncryptVerbose (int); -#endif - -struct togglelist { - char *name; /* name of toggle */ - char *help; /* help message */ - int (*handler)(); /* routine to do actual setting */ - int *variable; - char *actionexplanation; -}; - -static struct togglelist Togglelist[] = { - { "autoflush", - "flushing of output when sending interrupt characters", - 0, - &autoflush, - "flush output when sending interrupt characters" }, - { "autosynch", - "automatic sending of interrupt characters in urgent mode", - 0, - &autosynch, - "send interrupt characters in urgent mode" }, -#if defined(AUTHENTICATION) - { "autologin", - "automatic sending of login and/or authentication info", - 0, - &autologin, - "send login name and/or authentication information" }, - { "authdebug", - "authentication debugging", - auth_togdebug, - 0, - "print authentication debugging information" }, -#endif -#if defined(ENCRYPTION) - { "autoencrypt", - "automatic encryption of data stream", - EncryptAutoEnc, - 0, - "automatically encrypt output" }, - { "autodecrypt", - "automatic decryption of data stream", - EncryptAutoDec, - 0, - "automatically decrypt input" }, - { "verbose_encrypt", - "verbose encryption output", - EncryptVerbose, - 0, - "print verbose encryption output" }, - { "encdebug", - "encryption debugging", - EncryptDebug, - 0, - "print encryption debugging information" }, -#endif -#if defined(KRB5) - { "forward", - "credentials forwarding", - kerberos5_set_forward, - 0, - "forward credentials" }, - { "forwardable", - "forwardable flag of forwarded credentials", - kerberos5_set_forwardable, - 0, - "forward forwardable credentials" }, -#endif - { "skiprc", - "don't read ~/.telnetrc file", - 0, - &skiprc, - "skip reading of ~/.telnetrc file" }, - { "binary", - "sending and receiving of binary data", - togbinary, - 0, - 0 }, - { "inbinary", - "receiving of binary data", - togrbinary, - 0, - 0 }, - { "outbinary", - "sending of binary data", - togxbinary, - 0, - 0 }, - { "crlf", - "sending carriage returns as telnet ", - togcrlf, - &crlf, - 0 }, - { "crmod", - "mapping of received carriage returns", - 0, - &crmod, - "map carriage return on output" }, - { "localchars", - "local recognition of certain control characters", - lclchars, - &localchars, - "recognize certain control characters" }, - { " ", "", 0 }, /* empty line */ - { "debug", - "debugging", - togdebug, - &debug, - "turn on socket level debugging" }, - { "netdata", - "printing of hexadecimal network data (debugging)", - 0, - &netdata, - "print hexadecimal representation of network traffic" }, - { "prettydump", - "output of \"netdata\" to user readable format (debugging)", - 0, - &prettydump, - "print user readable output for \"netdata\"" }, - { "options", - "viewing of options processing (debugging)", - 0, - &showoptions, - "show option processing" }, - { "termdata", - "printing of hexadecimal terminal data (debugging)", - 0, - &termdata, - "print hexadecimal representation of terminal traffic" }, - { "?", - 0, - togglehelp }, - { "help", - 0, - togglehelp }, - { 0 } -}; - -static int -togglehelp() -{ - struct togglelist *c; - - for (c = Togglelist; c->name; c++) { - if (c->help) { - if (*c->help) - printf("%-15s toggle %s\r\n", c->name, c->help); - else - printf("\r\n"); - } - } - printf("\r\n"); - printf("%-15s %s\r\n", "?", "display help information"); - return 0; -} - -static void -settogglehelp(int set) -{ - struct togglelist *c; - - for (c = Togglelist; c->name; c++) { - if (c->help) { - if (*c->help) - printf("%-15s %s %s\r\n", c->name, set ? "enable" : "disable", - c->help); - else - printf("\r\n"); - } - } -} - -#define GETTOGGLE(name) (struct togglelist *) \ - genget(name, (char **) Togglelist, sizeof(struct togglelist)) - -static int -toggle(int argc, char *argv[]) -{ - int retval = 1; - char *name; - struct togglelist *c; - - if (argc < 2) { - fprintf(stderr, - "Need an argument to 'toggle' command. 'toggle ?' for help.\r\n"); - return 0; - } - argc--; - argv++; - while (argc--) { - name = *argv++; - c = GETTOGGLE(name); - if (Ambiguous(c)) { - fprintf(stderr, "'%s': ambiguous argument ('toggle ?' for help).\r\n", - name); - return 0; - } else if (c == 0) { - fprintf(stderr, "'%s': unknown argument ('toggle ?' for help).\r\n", - name); - return 0; - } else { - if (c->variable) { - *c->variable = !*c->variable; /* invert it */ - if (c->actionexplanation) { - printf("%s %s.\r\n", *c->variable? "Will" : "Won't", - c->actionexplanation); - } - } - if (c->handler) { - retval &= (*c->handler)(-1); - } - } - } - return retval; -} - -/* - * The following perform the "set" command. - */ - -struct termios new_tc = { 0 }; - -struct setlist { - char *name; /* name */ - char *help; /* help information */ - void (*handler)(); - cc_t *charp; /* where it is located at */ -}; - -static struct setlist Setlist[] = { -#ifdef KLUDGELINEMODE - { "echo", "character to toggle local echoing on/off", 0, &echoc }, -#endif - { "escape", "character to escape back to telnet command mode", 0, &escape }, - { "rlogin", "rlogin escape character", 0, &rlogin }, - { "tracefile", "file to write trace information to", SetNetTrace, (cc_t *)NetTraceFile}, - { " ", "" }, - { " ", "The following need 'localchars' to be toggled true", 0, 0 }, - { "flushoutput", "character to cause an Abort Output", 0, &termFlushChar }, - { "interrupt", "character to cause an Interrupt Process", 0, &termIntChar }, - { "quit", "character to cause an Abort process", 0, &termQuitChar }, - { "eof", "character to cause an EOF ", 0, &termEofChar }, - { " ", "" }, - { " ", "The following are for local editing in linemode", 0, 0 }, - { "erase", "character to use to erase a character", 0, &termEraseChar }, - { "kill", "character to use to erase a line", 0, &termKillChar }, - { "lnext", "character to use for literal next", 0, &termLiteralNextChar }, - { "susp", "character to cause a Suspend Process", 0, &termSuspChar }, - { "reprint", "character to use for line reprint", 0, &termRprntChar }, - { "worderase", "character to use to erase a word", 0, &termWerasChar }, - { "start", "character to use for XON", 0, &termStartChar }, - { "stop", "character to use for XOFF", 0, &termStopChar }, - { "forw1", "alternate end of line character", 0, &termForw1Char }, - { "forw2", "alternate end of line character", 0, &termForw2Char }, - { "ayt", "alternate AYT character", 0, &termAytChar }, - { 0 } -}; - -static struct setlist * -getset(char *name) -{ - return (struct setlist *) - genget(name, (char **) Setlist, sizeof(struct setlist)); -} - -void -set_escape_char(char *s) -{ - if (rlogin != _POSIX_VDISABLE) { - rlogin = (s && *s) ? special(s) : _POSIX_VDISABLE; - printf("Telnet rlogin escape character is '%s'.\r\n", - control(rlogin)); - } else { - escape = (s && *s) ? special(s) : _POSIX_VDISABLE; - printf("Telnet escape character is '%s'.\r\n", control(escape)); - } -} - -static int -setcmd(int argc, char *argv[]) -{ - int value; - struct setlist *ct; - struct togglelist *c; - - if (argc < 2 || argc > 3) { - printf("Format is 'set Name Value'\r\n'set ?' for help.\r\n"); - return 0; - } - if ((argc == 2) && (isprefix(argv[1], "?") || isprefix(argv[1], "help"))) { - for (ct = Setlist; ct->name; ct++) - printf("%-15s %s\r\n", ct->name, ct->help); - printf("\r\n"); - settogglehelp(1); - printf("%-15s %s\r\n", "?", "display help information"); - return 0; - } - - ct = getset(argv[1]); - if (ct == 0) { - c = GETTOGGLE(argv[1]); - if (c == 0) { - fprintf(stderr, "'%s': unknown argument ('set ?' for help).\r\n", - argv[1]); - return 0; - } else if (Ambiguous(c)) { - fprintf(stderr, "'%s': ambiguous argument ('set ?' for help).\r\n", - argv[1]); - return 0; - } - if (c->variable) { - if ((argc == 2) || (strcmp("on", argv[2]) == 0)) - *c->variable = 1; - else if (strcmp("off", argv[2]) == 0) - *c->variable = 0; - else { - printf("Format is 'set togglename [on|off]'\r\n'set ?' for help.\r\n"); - return 0; - } - if (c->actionexplanation) { - printf("%s %s.\r\n", *c->variable? "Will" : "Won't", - c->actionexplanation); - } - } - if (c->handler) - (*c->handler)(1); - } else if (argc != 3) { - printf("Format is 'set Name Value'\r\n'set ?' for help.\r\n"); - return 0; - } else if (Ambiguous(ct)) { - fprintf(stderr, "'%s': ambiguous argument ('set ?' for help).\r\n", - argv[1]); - return 0; - } else if (ct->handler) { - (*ct->handler)(argv[2]); - printf("%s set to \"%s\".\r\n", ct->name, (char *)ct->charp); - } else { - if (strcmp("off", argv[2])) { - value = special(argv[2]); - } else { - value = _POSIX_VDISABLE; - } - *(ct->charp) = (cc_t)value; - printf("%s character is '%s'.\r\n", ct->name, control(*(ct->charp))); - } - slc_check(); - return 1; -} - -static int -unsetcmd(int argc, char *argv[]) -{ - struct setlist *ct; - struct togglelist *c; - char *name; - - if (argc < 2) { - fprintf(stderr, - "Need an argument to 'unset' command. 'unset ?' for help.\r\n"); - return 0; - } - if (isprefix(argv[1], "?") || isprefix(argv[1], "help")) { - for (ct = Setlist; ct->name; ct++) - printf("%-15s %s\r\n", ct->name, ct->help); - printf("\r\n"); - settogglehelp(0); - printf("%-15s %s\r\n", "?", "display help information"); - return 0; - } - - argc--; - argv++; - while (argc--) { - name = *argv++; - ct = getset(name); - if (ct == 0) { - c = GETTOGGLE(name); - if (c == 0) { - fprintf(stderr, "'%s': unknown argument ('unset ?' for help).\r\n", - name); - return 0; - } else if (Ambiguous(c)) { - fprintf(stderr, "'%s': ambiguous argument ('unset ?' for help).\r\n", - name); - return 0; - } - if (c->variable) { - *c->variable = 0; - if (c->actionexplanation) { - printf("%s %s.\r\n", *c->variable? "Will" : "Won't", - c->actionexplanation); - } - } - if (c->handler) - (*c->handler)(0); - } else if (Ambiguous(ct)) { - fprintf(stderr, "'%s': ambiguous argument ('unset ?' for help).\r\n", - name); - return 0; - } else if (ct->handler) { - (*ct->handler)(0); - printf("%s reset to \"%s\".\r\n", ct->name, (char *)ct->charp); - } else { - *(ct->charp) = _POSIX_VDISABLE; - printf("%s character is '%s'.\r\n", ct->name, control(*(ct->charp))); - } - } - return 1; -} - -/* - * The following are the data structures and routines for the - * 'mode' command. - */ -#ifdef KLUDGELINEMODE - -static int -dokludgemode(void) -{ - kludgelinemode = 1; - send_wont(TELOPT_LINEMODE, 1); - send_dont(TELOPT_SGA, 1); - send_dont(TELOPT_ECHO, 1); - return 1; -} -#endif - -static int -dolinemode() -{ -#ifdef KLUDGELINEMODE - if (kludgelinemode) - send_dont(TELOPT_SGA, 1); -#endif - send_will(TELOPT_LINEMODE, 1); - send_dont(TELOPT_ECHO, 1); - return 1; -} - -static int -docharmode() -{ -#ifdef KLUDGELINEMODE - if (kludgelinemode) - send_do(TELOPT_SGA, 1); - else -#endif - send_wont(TELOPT_LINEMODE, 1); - send_do(TELOPT_ECHO, 1); - return 1; -} - -static int -dolmmode(int bit, int on) -{ - unsigned char c; - - if (my_want_state_is_wont(TELOPT_LINEMODE)) { - printf("?Need to have LINEMODE option enabled first.\r\n"); - printf("'mode ?' for help.\r\n"); - return 0; - } - - if (on) - c = (linemode | bit); - else - c = (linemode & ~bit); - lm_mode(&c, 1, 1); - return 1; -} - -static int -tn_setmode(int bit) -{ - return dolmmode(bit, 1); -} - -static int -tn_clearmode(int bit) -{ - return dolmmode(bit, 0); -} - -struct modelist { - char *name; /* command name */ - char *help; /* help string */ - int (*handler)(); /* routine which executes command */ - int needconnect; /* Do we need to be connected to execute? */ - int arg1; -}; - -static int modehelp(void); - -static struct modelist ModeList[] = { - { "character", "Disable LINEMODE option", docharmode, 1 }, -#ifdef KLUDGELINEMODE - { "", "(or disable obsolete line-by-line mode)", 0 }, -#endif - { "line", "Enable LINEMODE option", dolinemode, 1 }, -#ifdef KLUDGELINEMODE - { "", "(or enable obsolete line-by-line mode)", 0 }, -#endif - { "", "", 0 }, - { "", "These require the LINEMODE option to be enabled", 0 }, - { "isig", "Enable signal trapping", tn_setmode, 1, MODE_TRAPSIG }, - { "+isig", 0, tn_setmode, 1, MODE_TRAPSIG }, - { "-isig", "Disable signal trapping", tn_clearmode, 1, MODE_TRAPSIG }, - { "edit", "Enable character editing", tn_setmode, 1, MODE_EDIT }, - { "+edit", 0, tn_setmode, 1, MODE_EDIT }, - { "-edit", "Disable character editing", tn_clearmode, 1, MODE_EDIT }, - { "softtabs", "Enable tab expansion", tn_setmode, 1, MODE_SOFT_TAB }, - { "+softtabs", 0, tn_setmode, 1, MODE_SOFT_TAB }, - { "-softtabs", "Disable tab expansion", tn_clearmode, 1, MODE_SOFT_TAB }, - { "litecho", "Enable literal character echo", tn_setmode, 1, MODE_LIT_ECHO }, - { "+litecho", 0, tn_setmode, 1, MODE_LIT_ECHO }, - { "-litecho", "Disable literal character echo", tn_clearmode, 1, MODE_LIT_ECHO }, - { "help", 0, modehelp, 0 }, -#ifdef KLUDGELINEMODE - { "kludgeline", 0, dokludgemode, 1 }, -#endif - { "", "", 0 }, - { "?", "Print help information", modehelp, 0 }, - { 0 }, -}; - - -static int -modehelp(void) -{ - struct modelist *mt; - - printf("format is: 'mode Mode', where 'Mode' is one of:\r\n\r\n"); - for (mt = ModeList; mt->name; mt++) { - if (mt->help) { - if (*mt->help) - printf("%-15s %s\r\n", mt->name, mt->help); - else - printf("\r\n"); - } - } - return 0; -} - -#define GETMODECMD(name) (struct modelist *) \ - genget(name, (char **) ModeList, sizeof(struct modelist)) - -static int -modecmd(int argc, char **argv) -{ - struct modelist *mt; - - if (argc != 2) { - printf("'mode' command requires an argument\r\n"); - printf("'mode ?' for help.\r\n"); - } else if ((mt = GETMODECMD(argv[1])) == 0) { - fprintf(stderr, "Unknown mode '%s' ('mode ?' for help).\r\n", argv[1]); - } else if (Ambiguous(mt)) { - fprintf(stderr, "Ambiguous mode '%s' ('mode ?' for help).\r\n", argv[1]); - } else if (mt->needconnect && !connected) { - printf("?Need to be connected first.\r\n"); - printf("'mode ?' for help.\r\n"); - } else if (mt->handler) { - return (*mt->handler)(mt->arg1); - } - return 0; -} - -/* - * The following data structures and routines implement the - * "display" command. - */ - -static int -display(int argc, char *argv[]) -{ - struct togglelist *tl; - struct setlist *sl; - -#define dotog(tl) if (tl->variable && tl->actionexplanation) { \ - if (*tl->variable) { \ - printf("will"); \ - } else { \ - printf("won't"); \ - } \ - printf(" %s.\r\n", tl->actionexplanation); \ - } - -#define doset(sl) if (sl->name && *sl->name != ' ') { \ - if (sl->handler == 0) \ - printf("%-15s [%s]\r\n", sl->name, control(*sl->charp)); \ - else \ - printf("%-15s \"%s\"\r\n", sl->name, (char *)sl->charp); \ - } - - if (argc == 1) { - for (tl = Togglelist; tl->name; tl++) { - dotog(tl); - } - printf("\r\n"); - for (sl = Setlist; sl->name; sl++) { - doset(sl); - } - } else { - int i; - - for (i = 1; i < argc; i++) { - sl = getset(argv[i]); - tl = GETTOGGLE(argv[i]); - if (Ambiguous(sl) || Ambiguous(tl)) { - printf("?Ambiguous argument '%s'.\r\n", argv[i]); - return 0; - } else if (!sl && !tl) { - printf("?Unknown argument '%s'.\r\n", argv[i]); - return 0; - } else { - if (tl) { - dotog(tl); - } - if (sl) { - doset(sl); - } - } - } - } -/*@*/optionstatus(); -#if defined(ENCRYPTION) - EncryptStatus(); -#endif - return 1; -#undef doset -#undef dotog -} - -/* - * The following are the data structures, and many of the routines, - * relating to command processing. - */ - -/* - * Set the escape character. - */ -static int -setescape(int argc, char *argv[]) -{ - char *arg; - char buf[50]; - - printf( - "Deprecated usage - please use 'set escape%s%s' in the future.\r\n", - (argc > 2)? " ":"", (argc > 2)? argv[1]: ""); - if (argc > 2) - arg = argv[1]; - else { - printf("new escape character: "); - fgets(buf, sizeof(buf), stdin); - arg = buf; - } - if (arg[0] != '\0') - escape = arg[0]; - printf("Escape character is '%s'.\r\n", control(escape)); - - fflush(stdout); - return 1; -} - -static int -togcrmod() -{ - crmod = !crmod; - printf("Deprecated usage - please use 'toggle crmod' in the future.\r\n"); - printf("%s map carriage return on output.\r\n", crmod ? "Will" : "Won't"); - fflush(stdout); - return 1; -} - -static int -telnetsuspend() -{ -#ifdef SIGTSTP - setcommandmode(); - { - long oldrows, oldcols, newrows, newcols, err; - - err = (TerminalWindowSize(&oldrows, &oldcols) == 0) ? 1 : 0; - kill(0, SIGTSTP); - /* - * If we didn't get the window size before the SUSPEND, but we - * can get them now (?), then send the NAWS to make sure that - * we are set up for the right window size. - */ - if (TerminalWindowSize(&newrows, &newcols) && connected && - (err || ((oldrows != newrows) || (oldcols != newcols)))) { - sendnaws(); - } - } - /* reget parameters in case they were changed */ - TerminalSaveState(); - setconnmode(0); -#else - printf("Suspend is not supported. Try the '!' command instead\r\n"); -#endif - return 1; -} - -static int -shell(int argc, char **argv) -{ - long oldrows, oldcols, newrows, newcols, err; - - setcommandmode(); - - err = (TerminalWindowSize(&oldrows, &oldcols) == 0) ? 1 : 0; - switch(fork()) { - case -1: - perror("Fork failed\r\n"); - break; - - case 0: - { - /* - * Fire up the shell in the child. - */ - char *shellp, *shellname; - - shellp = getenv("SHELL"); - if (shellp == NULL) - shellp = "/bin/sh"; - if ((shellname = strrchr(shellp, '/')) == 0) - shellname = shellp; - else - shellname++; - if (argc > 1) - execl(shellp, shellname, "-c", &saveline[1], NULL); - else - execl(shellp, shellname, NULL); - perror("Execl"); - _exit(1); - } - default: - wait((int *)0); /* Wait for the shell to complete */ - - if (TerminalWindowSize(&newrows, &newcols) && connected && - (err || ((oldrows != newrows) || (oldcols != newcols)))) { - sendnaws(); - } - break; - } - return 1; -} - -static int -bye(int argc, char **argv) -{ - if (connected) { - shutdown(net, 2); - printf("Connection closed.\r\n"); - NetClose(net); - connected = 0; - resettermname = 1; -#if defined(AUTHENTICATION) || defined(ENCRYPTION) - auth_encrypt_connect(connected); -#endif - /* reset options */ - tninit(); - } - if ((argc != 2) || (strcmp(argv[1], "fromquit") != 0)) - longjmp(toplevel, 1); - return 0; /* NOTREACHED */ -} - -int -quit(void) -{ - call(bye, "bye", "fromquit", 0); - Exit(0); - return 0; /*NOTREACHED*/ -} - -static int -logout() -{ - send_do(TELOPT_LOGOUT, 1); - netflush(); - return 1; -} - - -/* - * The SLC command. - */ - -struct slclist { - char *name; - char *help; - void (*handler)(); - int arg; -}; - -static void slc_help(void); - -struct slclist SlcList[] = { - { "export", "Use local special character definitions", - slc_mode_export, 0 }, - { "import", "Use remote special character definitions", - slc_mode_import, 1 }, - { "check", "Verify remote special character definitions", - slc_mode_import, 0 }, - { "help", 0, slc_help, 0 }, - { "?", "Print help information", slc_help, 0 }, - { 0 }, -}; - -static void -slc_help(void) -{ - struct slclist *c; - - for (c = SlcList; c->name; c++) { - if (c->help) { - if (*c->help) - printf("%-15s %s\r\n", c->name, c->help); - else - printf("\r\n"); - } - } -} - -static struct slclist * -getslc(char *name) -{ - return (struct slclist *) - genget(name, (char **) SlcList, sizeof(struct slclist)); -} - -static int -slccmd(int argc, char **argv) -{ - struct slclist *c; - - if (argc != 2) { - fprintf(stderr, - "Need an argument to 'slc' command. 'slc ?' for help.\r\n"); - return 0; - } - c = getslc(argv[1]); - if (c == 0) { - fprintf(stderr, "'%s': unknown argument ('slc ?' for help).\r\n", - argv[1]); - return 0; - } - if (Ambiguous(c)) { - fprintf(stderr, "'%s': ambiguous argument ('slc ?' for help).\r\n", - argv[1]); - return 0; - } - (*c->handler)(c->arg); - slcstate(); - return 1; -} - -/* - * The ENVIRON command. - */ - -struct envlist { - char *name; - char *help; - void (*handler)(); - int narg; -}; - -static void env_help (void); - -struct envlist EnvList[] = { - { "define", "Define an environment variable", - (void (*)())env_define, 2 }, - { "undefine", "Undefine an environment variable", - env_undefine, 1 }, - { "export", "Mark an environment variable for automatic export", - env_export, 1 }, - { "unexport", "Don't mark an environment variable for automatic export", - env_unexport, 1 }, - { "send", "Send an environment variable", env_send, 1 }, - { "list", "List the current environment variables", - env_list, 0 }, - { "help", 0, env_help, 0 }, - { "?", "Print help information", env_help, 0 }, - { 0 }, -}; - -static void -env_help() -{ - struct envlist *c; - - for (c = EnvList; c->name; c++) { - if (c->help) { - if (*c->help) - printf("%-15s %s\r\n", c->name, c->help); - else - printf("\r\n"); - } - } -} - -static struct envlist * -getenvcmd(char *name) -{ - return (struct envlist *) - genget(name, (char **) EnvList, sizeof(struct envlist)); -} - -static int -env_cmd(int argc, char **argv) -{ - struct envlist *c; - - if (argc < 2) { - fprintf(stderr, - "Need an argument to 'environ' command. 'environ ?' for help.\r\n"); - return 0; - } - c = getenvcmd(argv[1]); - if (c == 0) { - fprintf(stderr, "'%s': unknown argument ('environ ?' for help).\r\n", - argv[1]); - return 0; - } - if (Ambiguous(c)) { - fprintf(stderr, "'%s': ambiguous argument ('environ ?' for help).\r\n", - argv[1]); - return 0; - } - if (c->narg + 2 != argc) { - fprintf(stderr, - "Need %s%d argument%s to 'environ %s' command. 'environ ?' for help.\r\n", - c->narg < argc + 2 ? "only " : "", - c->narg, c->narg == 1 ? "" : "s", c->name); - return 0; - } - (*c->handler)(argv[2], argv[3]); - return 1; -} - -struct env_lst { - struct env_lst *next; /* pointer to next structure */ - struct env_lst *prev; /* pointer to previous structure */ - unsigned char *var; /* pointer to variable name */ - unsigned char *value; /* pointer to variable value */ - int export; /* 1 -> export with default list of variables */ - int welldefined; /* A well defined variable */ -}; - -struct env_lst envlisthead; - -struct env_lst * -env_find(unsigned char *var) -{ - struct env_lst *ep; - - for (ep = envlisthead.next; ep; ep = ep->next) { - if (strcmp((char *)ep->var, (char *)var) == 0) - return(ep); - } - return(NULL); -} - -#if !HAVE_DECL_ENVIRON -extern char **environ; -#endif - -void -env_init(void) -{ - char **epp, *cp; - struct env_lst *ep; - - for (epp = environ; *epp; epp++) { - if ((cp = strchr(*epp, '='))) { - *cp = '\0'; - ep = env_define((unsigned char *)*epp, - (unsigned char *)cp+1); - ep->export = 0; - *cp = '='; - } - } - /* - * Special case for DISPLAY variable. If it is ":0.0" or - * "unix:0.0", we have to get rid of "unix" and insert our - * hostname. - */ - if ((ep = env_find((unsigned char*)"DISPLAY")) - && (*ep->value == ':' - || strncmp((char *)ep->value, "unix:", 5) == 0)) { - char hbuf[256+1]; - char *cp2 = strchr((char *)ep->value, ':'); - int error; - - /* XXX - should be k_gethostname? */ - gethostname(hbuf, 256); - hbuf[256] = '\0'; - - /* If this is not the full name, try to get it via DNS */ - if (strchr(hbuf, '.') == 0) { - struct addrinfo hints, *ai, *a; - - memset (&hints, 0, sizeof(hints)); - hints.ai_flags = AI_CANONNAME; - - error = getaddrinfo (hbuf, NULL, &hints, &ai); - if (error == 0) { - for (a = ai; a != NULL; a = a->ai_next) - if (a->ai_canonname != NULL) { - strlcpy (hbuf, - ai->ai_canonname, - 256); - break; - } - freeaddrinfo (ai); - } - } - - error = asprintf (&cp, "%s%s", hbuf, cp2); - if (error != -1) { - free (ep->value); - ep->value = (unsigned char *)cp; - } - } - /* - * If USER is not defined, but LOGNAME is, then add - * USER with the value from LOGNAME. By default, we - * don't export the USER variable. - */ - if ((env_find((unsigned char*)"USER") == NULL) && - (ep = env_find((unsigned char*)"LOGNAME"))) { - env_define((unsigned char *)"USER", ep->value); - env_unexport((unsigned char *)"USER"); - } - env_export((unsigned char *)"DISPLAY"); - env_export((unsigned char *)"PRINTER"); - env_export((unsigned char *)"XAUTHORITY"); -} - -struct env_lst * -env_define(unsigned char *var, unsigned char *value) -{ - struct env_lst *ep; - - if ((ep = env_find(var))) { - if (ep->var) - free(ep->var); - if (ep->value) - free(ep->value); - } else { - ep = (struct env_lst *)malloc(sizeof(struct env_lst)); - ep->next = envlisthead.next; - envlisthead.next = ep; - ep->prev = &envlisthead; - if (ep->next) - ep->next->prev = ep; - } - ep->welldefined = opt_welldefined((char *)var); - ep->export = 1; - ep->var = (unsigned char *)strdup((char *)var); - ep->value = (unsigned char *)strdup((char *)value); - return(ep); -} - -void -env_undefine(unsigned char *var) -{ - struct env_lst *ep; - - if ((ep = env_find(var))) { - ep->prev->next = ep->next; - if (ep->next) - ep->next->prev = ep->prev; - if (ep->var) - free(ep->var); - if (ep->value) - free(ep->value); - free(ep); - } -} - -void -env_export(unsigned char *var) -{ - struct env_lst *ep; - - if ((ep = env_find(var))) - ep->export = 1; -} - -void -env_unexport(unsigned char *var) -{ - struct env_lst *ep; - - if ((ep = env_find(var))) - ep->export = 0; -} - -void -env_send(unsigned char *var) -{ - struct env_lst *ep; - - if (my_state_is_wont(TELOPT_NEW_ENVIRON) -#ifdef OLD_ENVIRON - && my_state_is_wont(TELOPT_OLD_ENVIRON) -#endif - ) { - fprintf(stderr, - "Cannot send '%s': Telnet ENVIRON option not enabled\r\n", - var); - return; - } - ep = env_find(var); - if (ep == 0) { - fprintf(stderr, "Cannot send '%s': variable not defined\r\n", - var); - return; - } - env_opt_start_info(); - env_opt_add(ep->var); - env_opt_end(0); -} - -void -env_list(void) -{ - struct env_lst *ep; - - for (ep = envlisthead.next; ep; ep = ep->next) { - printf("%c %-20s %s\r\n", ep->export ? '*' : ' ', - ep->var, ep->value); - } -} - -unsigned char * -env_default(int init, int welldefined) -{ - static struct env_lst *nep = NULL; - - if (init) { - nep = &envlisthead; - return NULL; - } - if (nep) { - while ((nep = nep->next)) { - if (nep->export && (nep->welldefined == welldefined)) - return(nep->var); - } - } - return(NULL); -} - -unsigned char * -env_getvalue(unsigned char *var) -{ - struct env_lst *ep; - - if ((ep = env_find(var))) - return(ep->value); - return(NULL); -} - - -#if defined(AUTHENTICATION) -/* - * The AUTHENTICATE command. - */ - -struct authlist { - char *name; - char *help; - int (*handler)(); - int narg; -}; - -static int - auth_help (void); - -struct authlist AuthList[] = { - { "status", "Display current status of authentication information", - auth_status, 0 }, - { "disable", "Disable an authentication type ('auth disable ?' for more)", - auth_disable, 1 }, - { "enable", "Enable an authentication type ('auth enable ?' for more)", - auth_enable, 1 }, - { "help", 0, auth_help, 0 }, - { "?", "Print help information", auth_help, 0 }, - { 0 }, -}; - -static int -auth_help() -{ - struct authlist *c; - - for (c = AuthList; c->name; c++) { - if (c->help) { - if (*c->help) - printf("%-15s %s\r\n", c->name, c->help); - else - printf("\r\n"); - } - } - return 0; -} - -static int -auth_cmd(int argc, char **argv) -{ - struct authlist *c; - - if (argc < 2) { - fprintf(stderr, - "Need an argument to 'auth' command. 'auth ?' for help.\r\n"); - return 0; - } - - c = (struct authlist *) - genget(argv[1], (char **) AuthList, sizeof(struct authlist)); - if (c == 0) { - fprintf(stderr, "'%s': unknown argument ('auth ?' for help).\r\n", - argv[1]); - return 0; - } - if (Ambiguous(c)) { - fprintf(stderr, "'%s': ambiguous argument ('auth ?' for help).\r\n", - argv[1]); - return 0; - } - if (c->narg + 2 != argc) { - fprintf(stderr, - "Need %s%d argument%s to 'auth %s' command. 'auth ?' for help.\r\n", - c->narg < argc + 2 ? "only " : "", - c->narg, c->narg == 1 ? "" : "s", c->name); - return 0; - } - return((*c->handler)(argv[2], argv[3])); -} -#endif - - -#if defined(ENCRYPTION) -/* - * The ENCRYPT command. - */ - -struct encryptlist { - char *name; - char *help; - int (*handler)(); - int needconnect; - int minarg; - int maxarg; -}; - -static int - EncryptHelp (void); - -struct encryptlist EncryptList[] = { - { "enable", "Enable encryption. ('encrypt enable ?' for more)", - EncryptEnable, 1, 1, 2 }, - { "disable", "Disable encryption. ('encrypt enable ?' for more)", - EncryptDisable, 0, 1, 2 }, - { "type", "Set encryptiong type. ('encrypt type ?' for more)", - EncryptType, 0, 1, 1 }, - { "start", "Start encryption. ('encrypt start ?' for more)", - EncryptStart, 1, 0, 1 }, - { "stop", "Stop encryption. ('encrypt stop ?' for more)", - EncryptStop, 1, 0, 1 }, - { "input", "Start encrypting the input stream", - EncryptStartInput, 1, 0, 0 }, - { "-input", "Stop encrypting the input stream", - EncryptStopInput, 1, 0, 0 }, - { "output", "Start encrypting the output stream", - EncryptStartOutput, 1, 0, 0 }, - { "-output", "Stop encrypting the output stream", - EncryptStopOutput, 1, 0, 0 }, - - { "status", "Display current status of authentication information", - EncryptStatus, 0, 0, 0 }, - { "help", 0, EncryptHelp, 0, 0, 0 }, - { "?", "Print help information", EncryptHelp, 0, 0, 0 }, - { 0 }, -}; - -static int -EncryptHelp() -{ - struct encryptlist *c; - - for (c = EncryptList; c->name; c++) { - if (c->help) { - if (*c->help) - printf("%-15s %s\r\n", c->name, c->help); - else - printf("\r\n"); - } - } - return 0; -} - -static int -encrypt_cmd(int argc, char **argv) -{ - struct encryptlist *c; - - c = (struct encryptlist *) - genget(argv[1], (char **) EncryptList, sizeof(struct encryptlist)); - if (c == 0) { - fprintf(stderr, "'%s': unknown argument ('encrypt ?' for help).\r\n", - argv[1]); - return 0; - } - if (Ambiguous(c)) { - fprintf(stderr, "'%s': ambiguous argument ('encrypt ?' for help).\r\n", - argv[1]); - return 0; - } - argc -= 2; - if (argc < c->minarg || argc > c->maxarg) { - if (c->minarg == c->maxarg) { - fprintf(stderr, "Need %s%d argument%s ", - c->minarg < argc ? "only " : "", c->minarg, - c->minarg == 1 ? "" : "s"); - } else { - fprintf(stderr, "Need %s%d-%d arguments ", - c->maxarg < argc ? "only " : "", c->minarg, c->maxarg); - } - fprintf(stderr, "to 'encrypt %s' command. 'encrypt ?' for help.\r\n", - c->name); - return 0; - } - if (c->needconnect && !connected) { - if (!(argc && (isprefix(argv[2], "help") || isprefix(argv[2], "?")))) { - printf("?Need to be connected first.\r\n"); - return 0; - } - } - return ((*c->handler)(argc > 0 ? argv[2] : 0, - argc > 1 ? argv[3] : 0, - argc > 2 ? argv[4] : 0)); -} -#endif - - -/* - * Print status about the connection. - */ - -static int -status(int argc, char **argv) -{ - if (connected) { - printf("Connected to %s.\r\n", hostname); - if ((argc < 2) || strcmp(argv[1], "notmuch")) { - int mode = getconnmode(); - - if (my_want_state_is_will(TELOPT_LINEMODE)) { - printf("Operating with LINEMODE option\r\n"); - printf("%s line editing\r\n", (mode&MODE_EDIT) ? "Local" : "No"); - printf("%s catching of signals\r\n", - (mode&MODE_TRAPSIG) ? "Local" : "No"); - slcstate(); -#ifdef KLUDGELINEMODE - } else if (kludgelinemode && my_want_state_is_dont(TELOPT_SGA)) { - printf("Operating in obsolete linemode\r\n"); -#endif - } else { - printf("Operating in single character mode\r\n"); - if (localchars) - printf("Catching signals locally\r\n"); - } - printf("%s character echo\r\n", (mode&MODE_ECHO) ? "Local" : "Remote"); - if (my_want_state_is_will(TELOPT_LFLOW)) - printf("%s flow control\r\n", (mode&MODE_FLOW) ? "Local" : "No"); -#if defined(ENCRYPTION) - encrypt_display(); -#endif - } - } else { - printf("No connection.\r\n"); - } - printf("Escape character is '%s'.\r\n", control(escape)); - fflush(stdout); - return 1; -} - -#ifdef SIGINFO -/* - * Function that gets called when SIGINFO is received. - */ -RETSIGTYPE -ayt_status(int ignore) -{ - call(status, "status", "notmuch", 0); -} -#endif - -static Command *getcmd(char *name); - -static void -cmdrc(char *m1, char *m2) -{ - static char rcname[128]; - Command *c; - FILE *rcfile; - int gotmachine = 0; - int l1 = strlen(m1); - int l2 = strlen(m2); - char m1save[64]; - - if (skiprc) - return; - - strlcpy(m1save, m1, sizeof(m1save)); - m1 = m1save; - - if (rcname[0] == 0) { - char *home = getenv("HOME"); - - snprintf (rcname, sizeof(rcname), "%s/.telnetrc", - home ? home : ""); - } - - if ((rcfile = fopen(rcname, "r")) == 0) { - return; - } - - for (;;) { - if (fgets(line, sizeof(line), rcfile) == NULL) - break; - if (line[0] == 0) - break; - if (line[0] == '#') - continue; - if (gotmachine) { - if (!isspace((unsigned char)line[0])) - gotmachine = 0; - } - if (gotmachine == 0) { - if (isspace((unsigned char)line[0])) - continue; - if (strncasecmp(line, m1, l1) == 0) - strncpy(line, &line[l1], sizeof(line) - l1); - else if (strncasecmp(line, m2, l2) == 0) - strncpy(line, &line[l2], sizeof(line) - l2); - else if (strncasecmp(line, "DEFAULT", 7) == 0) - strncpy(line, &line[7], sizeof(line) - 7); - else - continue; - if (line[0] != ' ' && line[0] != '\t' && line[0] != '\n') - continue; - gotmachine = 1; - } - makeargv(); - if (margv[0] == 0) - continue; - c = getcmd(margv[0]); - if (Ambiguous(c)) { - printf("?Ambiguous command: %s\r\n", margv[0]); - continue; - } - if (c == 0) { - printf("?Invalid command: %s\r\n", margv[0]); - continue; - } - /* - * This should never happen... - */ - if (c->needconnect && !connected) { - printf("?Need to be connected first for %s.\r\n", margv[0]); - continue; - } - (*c->handler)(margc, margv); - } - fclose(rcfile); -} - -int -tn(int argc, char **argv) -{ - struct servent *sp = 0; - char *cmd, *hostp = 0, *portp = 0; - char *user = 0; - int port = 0; - - /* clear the socket address prior to use */ - - if (connected) { - printf("?Already connected to %s\r\n", hostname); - return 0; - } - if (argc < 2) { - strlcpy(line, "open ", sizeof(line)); - printf("(to) "); - fgets(&line[strlen(line)], sizeof(line) - strlen(line), stdin); - makeargv(); - argc = margc; - argv = margv; - } - cmd = *argv; - --argc; ++argv; - while (argc) { - if (strcmp(*argv, "help") == 0 || isprefix(*argv, "?")) - goto usage; - if (strcmp(*argv, "-l") == 0) { - --argc; ++argv; - if (argc == 0) - goto usage; - user = strdup(*argv++); - --argc; - continue; - } - if (strcmp(*argv, "-a") == 0) { - --argc; ++argv; - autologin = 1; - continue; - } - if (hostp == 0) { - hostp = *argv++; - --argc; - continue; - } - if (portp == 0) { - portp = *argv++; - --argc; - continue; - } - usage: - printf("usage: %s [-l user] [-a] host-name [port]\r\n", cmd); - return 0; - } - if (hostp == 0) - goto usage; - - strlcpy (_hostname, hostp, sizeof(_hostname)); - hostp = _hostname; - if (hostp[0] == '@' || hostp[0] == '!') { - char *p; - hostname = NULL; - for (p = hostp + 1; *p; p++) { - if (*p == ',' || *p == '@') - hostname = p; - } - if (hostname == NULL) { - fprintf(stderr, "%s: bad source route specification\n", hostp); - return 0; - } - *hostname++ = '\0'; - } else - hostname = hostp; - - if (portp) { - if (*portp == '-') { - portp++; - telnetport = 1; - } else - telnetport = 0; - port = atoi(portp); - if (port == 0) { - sp = roken_getservbyname(portp, "tcp"); - if (sp) - port = sp->s_port; - else { - printf("%s: bad port number\r\n", portp); - return 0; - } - } else { - port = htons(port); - } - } else { - if (sp == 0) { - sp = roken_getservbyname("telnet", "tcp"); - if (sp == 0) { - fprintf(stderr, "telnet: tcp/telnet: unknown service\r\n"); - return 0; - } - port = sp->s_port; - } - telnetport = 1; - } - - { - struct addrinfo *ai, *a, hints; - int error; - char portstr[NI_MAXSERV]; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - hints.ai_flags = AI_CANONNAME; - - snprintf (portstr, sizeof(portstr), "%u", ntohs(port)); - - error = getaddrinfo (hostname, portstr, &hints, &ai); - if (error) { - fprintf (stderr, "%s: %s\r\n", hostname, gai_strerror (error)); - return 0; - } - - for (a = ai; a != NULL && connected == 0; a = a->ai_next) { - char addrstr[256]; - - if (a->ai_canonname != NULL) - strlcpy (_hostname, a->ai_canonname, sizeof(_hostname)); - - if (getnameinfo (a->ai_addr, a->ai_addrlen, - addrstr, sizeof(addrstr), - NULL, 0, NI_NUMERICHOST) != 0) - strlcpy (addrstr, "unknown address", sizeof(addrstr)); - - printf("Trying %s...\r\n", addrstr); - - net = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (net < 0) { - warn ("socket"); - continue; - } - -#if defined(IP_OPTIONS) && defined(IPPROTO_IP) && defined(HAVE_SETSOCKOPT) - if (hostp[0] == '@' || hostp[0] == '!') { - char *srp = 0; - int srlen; - int proto, opt; - - if ((srlen = sourceroute(a, hostp, &srp, &proto, &opt)) < 0) { - (void) NetClose(net); - net = -1; - continue; - } - if (srp && setsockopt(net, proto, opt, srp, srlen) < 0) - perror("setsockopt (source route)"); - } -#endif - -#if defined(IPPROTO_IP) && defined(IP_TOS) - if (a->ai_family == AF_INET) { -# if defined(HAVE_GETTOSBYNAME) - struct tosent *tp; - if (tos < 0 && (tp = gettosbyname("telnet", "tcp"))) - tos = tp->t_tos; -# endif - if (tos < 0) - tos = 020; /* Low Delay bit */ - if (tos - && (setsockopt(net, IPPROTO_IP, IP_TOS, - (void *)&tos, sizeof(int)) < 0) - && (errno != ENOPROTOOPT)) - perror("telnet: setsockopt (IP_TOS) (ignored)"); - } -#endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ - if (debug && SetSockOpt(net, SOL_SOCKET, SO_DEBUG, 1) < 0) { - perror("setsockopt (SO_DEBUG)"); - } - - if (connect (net, a->ai_addr, a->ai_addrlen) < 0) { - fprintf (stderr, "telnet: connect to address %s: %s\n", - addrstr, strerror(errno)); - NetClose(net); - if (a->ai_next != NULL) { - continue; - } else { - freeaddrinfo (ai); - return 0; - } - } - ++connected; -#if defined(AUTHENTICATION) || defined(ENCRYPTION) - auth_encrypt_connect(connected); -#endif - } - freeaddrinfo (ai); - if (connected == 0) - return 0; - } - cmdrc(hostp, hostname); - set_forward_options(); - if (autologin && user == NULL) - user = (char *)get_default_username (); - if (user) { - env_define((unsigned char *)"USER", (unsigned char *)user); - env_export((unsigned char *)"USER"); - } - call(status, "status", "notmuch", 0); - if (setjmp(peerdied) == 0) - my_telnet((char *)user); - NetClose(net); - ExitString("Connection closed by foreign host.\r\n",1); - /*NOTREACHED*/ - return 0; -} - -#define HELPINDENT ((int)sizeof ("connect")) - -static char - openhelp[] = "connect to a site", - closehelp[] = "close current connection", - logouthelp[] = "forcibly logout remote user and close the connection", - quithelp[] = "exit telnet", - statushelp[] = "print status information", - helphelp[] = "print help information", - sendhelp[] = "transmit special characters ('send ?' for more)", - sethelp[] = "set operating parameters ('set ?' for more)", - unsethelp[] = "unset operating parameters ('unset ?' for more)", - togglestring[] ="toggle operating parameters ('toggle ?' for more)", - slchelp[] = "change state of special charaters ('slc ?' for more)", - displayhelp[] = "display operating parameters", -#if defined(AUTHENTICATION) - authhelp[] = "turn on (off) authentication ('auth ?' for more)", -#endif -#if defined(ENCRYPTION) - encrypthelp[] = "turn on (off) encryption ('encrypt ?' for more)", -#endif - zhelp[] = "suspend telnet", - shellhelp[] = "invoke a subshell", - envhelp[] = "change environment variables ('environ ?' for more)", - modestring[] = "try to enter line or character mode ('mode ?' for more)"; - -static int help(int argc, char **argv); - -static Command cmdtab[] = { - { "close", closehelp, bye, 1 }, - { "logout", logouthelp, logout, 1 }, - { "display", displayhelp, display, 0 }, - { "mode", modestring, modecmd, 0 }, - { "open", openhelp, tn, 0 }, - { "quit", quithelp, quit, 0 }, - { "send", sendhelp, sendcmd, 0 }, - { "set", sethelp, setcmd, 0 }, - { "unset", unsethelp, unsetcmd, 0 }, - { "status", statushelp, status, 0 }, - { "toggle", togglestring, toggle, 0 }, - { "slc", slchelp, slccmd, 0 }, -#if defined(AUTHENTICATION) - { "auth", authhelp, auth_cmd, 0 }, -#endif -#if defined(ENCRYPTION) - { "encrypt", encrypthelp, encrypt_cmd, 0 }, -#endif - { "z", zhelp, telnetsuspend, 0 }, - { "!", shellhelp, shell, 0 }, - { "environ", envhelp, env_cmd, 0 }, - { "?", helphelp, help, 0 }, - { 0, 0, 0, 0 } -}; - -static char crmodhelp[] = "deprecated command -- use 'toggle crmod' instead"; -static char escapehelp[] = "deprecated command -- use 'set escape' instead"; - -static Command cmdtab2[] = { - { "help", 0, help, 0 }, - { "escape", escapehelp, setescape, 0 }, - { "crmod", crmodhelp, togcrmod, 0 }, - { 0, 0, 0, 0 } -}; - - -/* - * Call routine with argc, argv set from args (terminated by 0). - */ - -static int -call(intrtn_t routine, ...) -{ - va_list ap; - char *args[100]; - int argno = 0; - - va_start(ap, routine); - while ((args[argno++] = va_arg(ap, char *)) != 0); - va_end(ap); - return (*routine)(argno-1, args); -} - - -static Command -*getcmd(char *name) -{ - Command *cm; - - if ((cm = (Command *) genget(name, (char **) cmdtab, sizeof(Command)))) - return cm; - return (Command *) genget(name, (char **) cmdtab2, sizeof(Command)); -} - -void -command(int top, char *tbuf, int cnt) -{ - Command *c; - - setcommandmode(); - if (!top) { - putchar('\n'); - } else { - signal(SIGINT, SIG_DFL); - signal(SIGQUIT, SIG_DFL); - } - for (;;) { - if (rlogin == _POSIX_VDISABLE) - printf("%s> ", prompt); - if (tbuf) { - char *cp; - cp = line; - while (cnt > 0 && (*cp++ = *tbuf++) != '\n') - cnt--; - tbuf = 0; - if (cp == line || *--cp != '\n' || cp == line) - goto getline; - *cp = '\0'; - if (rlogin == _POSIX_VDISABLE) - printf("%s\r\n", line); - } else { - getline: - if (rlogin != _POSIX_VDISABLE) - printf("%s> ", prompt); - if (fgets(line, sizeof(line), stdin) == NULL) { - if (feof(stdin) || ferror(stdin)) { - quit(); - /*NOTREACHED*/ - } - break; - } - } - if (line[0] == 0) - break; - makeargv(); - if (margv[0] == 0) { - break; - } - c = getcmd(margv[0]); - if (Ambiguous(c)) { - printf("?Ambiguous command\r\n"); - continue; - } - if (c == 0) { - printf("?Invalid command\r\n"); - continue; - } - if (c->needconnect && !connected) { - printf("?Need to be connected first.\r\n"); - continue; - } - if ((*c->handler)(margc, margv)) { - break; - } - } - if (!top) { - if (!connected) { - longjmp(toplevel, 1); - /*NOTREACHED*/ - } - setconnmode(0); - } -} - -/* - * Help command. - */ -static int -help(int argc, char **argv) -{ - Command *c; - - if (argc == 1) { - printf("Commands may be abbreviated. Commands are:\r\n\r\n"); - for (c = cmdtab; c->name; c++) - if (c->help) { - printf("%-*s\t%s\r\n", HELPINDENT, c->name, - c->help); - } - return 0; - } - while (--argc > 0) { - char *arg; - arg = *++argv; - c = getcmd(arg); - if (Ambiguous(c)) - printf("?Ambiguous help command %s\r\n", arg); - else if (c == (Command *)0) - printf("?Invalid help command %s\r\n", arg); - else - printf("%s\r\n", c->help); - } - return 0; -} - - -#if defined(IP_OPTIONS) && defined(IPPROTO_IP) - -/* - * Source route is handed in as - * [!]@hop1@hop2...@dst - * - * If the leading ! is present, it is a strict source route, otherwise it is - * assmed to be a loose source route. Note that leading ! is effective - * only for IPv4 case. - * - * We fill in the source route option as - * hop1,hop2,hop3...dest - * and return a pointer to hop1, which will - * be the address to connect() to. - * - * Arguments: - * ai: The address (by struct addrinfo) for the final destination. - * - * arg: Pointer to route list to decipher - * - * cpp: Pointer to a pointer, so that sourceroute() can return - * the address of result buffer (statically alloc'ed). - * - * protop/optp: - * Pointer to an integer. The pointed variable - * lenp: pointer to an integer that contains the - * length of *cpp if *cpp != NULL. - * - * Return values: - * - * Returns the length of the option pointed to by *cpp. If the - * return value is -1, there was a syntax error in the - * option, either arg contained unknown characters or too many hosts, - * or hostname cannot be resolved. - * - * The caller needs to pass return value (len), *cpp, *protop and *optp - * to setsockopt(2). - * - * *cpp: Points to the result buffer. The region is statically - * allocated by the function. - * - * *protop: - * protocol # to be passed to setsockopt(2). - * - * *optp: option # to be passed to setsockopt(2). - * - */ -int -sourceroute(struct addrinfo *ai, - char *arg, - char **cpp, - int *protop, - int *optp) -{ - char *cp, *cp2, *lsrp = NULL, *lsrep = NULL; - struct addrinfo hints, *res; - int len, error; - struct sockaddr_in *sin; - register char c; - static char lsr[44]; -#ifdef INET6 - struct cmsghdr *cmsg = NULL; - struct sockaddr_in6 *sin6; - static char rhbuf[1024]; -#endif - - /* - * Verify the arguments. - */ - if (cpp == NULL) - return -1; - - cp = arg; - - *cpp = NULL; - switch (ai->ai_family) { - case AF_INET: - lsrp = lsr; - lsrep = lsrp + sizeof(lsr); - - /* - * Next, decide whether we have a loose source - * route or a strict source route, and fill in - * the begining of the option. - */ - if (*cp == '!') { - cp++; - *lsrp++ = IPOPT_SSRR; - } else - *lsrp++ = IPOPT_LSRR; - if (*cp != '@') - return -1; - lsrp++; /* skip over length, we'll fill it in later */ - *lsrp++ = 4; - cp++; - *protop = IPPROTO_IP; - *optp = IP_OPTIONS; - break; -#ifdef INET6 - case AF_INET6: -/* this needs to be updated for rfc2292bis */ -#ifdef IPV6_PKTOPTIONS - cmsg = inet6_rthdr_init(rhbuf, IPV6_RTHDR_TYPE_0); - if (*cp != '@') - return -1; - cp++; - *protop = IPPROTO_IPV6; - *optp = IPV6_PKTOPTIONS; - break; -#else - return -1; -#endif -#endif - default: - return -1; - } - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = ai->ai_family; - hints.ai_socktype = SOCK_STREAM; - - for (c = 0;;) { - if (c == ':') - cp2 = 0; - else for (cp2 = cp; (c = *cp2) != '\0'; cp2++) { - if (c == ',') { - *cp2++ = '\0'; - if (*cp2 == '@') - cp2++; - } else if (c == '@') { - *cp2++ = '\0'; - } -#if 0 /*colon conflicts with IPv6 address*/ - else if (c == ':') { - *cp2++ = '\0'; - } -#endif - else - continue; - break; - } - if (!c) - cp2 = 0; - - error = getaddrinfo(cp, NULL, &hints, &res); - if (error) { - fprintf(stderr, "%s: %s\n", cp, gai_strerror(error)); - return -1; - } - if (ai->ai_family != res->ai_family) { - freeaddrinfo(res); - return -1; - } - if (ai->ai_family == AF_INET) { - /* - * Check to make sure there is space for address - */ - if (lsrp + 4 > lsrep) { - freeaddrinfo(res); - return -1; - } - sin = (struct sockaddr_in *)res->ai_addr; - memcpy(lsrp, &sin->sin_addr, sizeof(struct in_addr)); - lsrp += sizeof(struct in_addr); - } -#ifdef INET6 - else if (ai->ai_family == AF_INET6) { - sin6 = (struct sockaddr_in6 *)res->ai_addr; - inet6_rthdr_add(cmsg, &sin6->sin6_addr, - IPV6_RTHDR_LOOSE); - } -#endif - else { - freeaddrinfo(res); - return -1; - } - freeaddrinfo(res); - if (cp2) - cp = cp2; - else - break; - } - if (ai->ai_family == AF_INET) { - /* record the last hop */ - if (lsrp + 4 > lsrep) - return -1; - sin = (struct sockaddr_in *)ai->ai_addr; - memcpy(lsrp, &sin->sin_addr, sizeof(struct in_addr)); - lsrp += sizeof(struct in_addr); -#ifndef sysV88 - lsr[IPOPT_OLEN] = lsrp - lsr; - if (lsr[IPOPT_OLEN] <= 7 || lsr[IPOPT_OLEN] > 40) - return -1; - *lsrp++ = IPOPT_NOP; /*32bit word align*/ - len = lsrp - lsr; - *cpp = lsr; -#else - ipopt.io_len = lsrp - lsr; - if (ipopt.io_len <= 5) /*is 3 better?*/ - return -1; - *cpp = (char 8)&ipopt; -#endif - } -#ifdef INET6 - else if (ai->ai_family == AF_INET6) { - inet6_rthdr_lasthop(cmsg, IPV6_RTHDR_LOOSE); - len = cmsg->cmsg_len; - *cpp = rhbuf; - } -#endif - else - return -1; - return len; -} -#endif diff --git a/kerberosV/src/appl/telnet/telnet/defines.h b/kerberosV/src/appl/telnet/telnet/defines.h deleted file mode 100644 index 5c1ac2bcc65..00000000000 --- a/kerberosV/src/appl/telnet/telnet/defines.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1988, 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. - * - * @(#)defines.h 8.1 (Berkeley) 6/6/93 - */ - -#define settimer(x) clocks.x = clocks.system++ - -#define NETADD(c) { *netoring.supply = c; ring_supplied(&netoring, 1); } -#define NET2ADD(c1,c2) { NETADD(c1); NETADD(c2); } -#define NETBYTES() (ring_full_count(&netoring)) -#define NETROOM() (ring_empty_count(&netoring)) - -#define TTYADD(c) if (!(SYNCHing||flushout)) { \ - *ttyoring.supply = c; \ - ring_supplied(&ttyoring, 1); \ - } -#define TTYBYTES() (ring_full_count(&ttyoring)) -#define TTYROOM() (ring_empty_count(&ttyoring)) - -/* Various modes */ -#define MODE_LOCAL_CHARS(m) ((m)&(MODE_EDIT|MODE_TRAPSIG)) -#define MODE_LOCAL_ECHO(m) ((m)&MODE_ECHO) -#define MODE_COMMAND_LINE(m) ((m)==-1) - -#define CONTROL(x) ((x)&0x1f) /* CTRL(x) is not portable */ - - -/* XXX extra mode bits, these should be synced with */ - -#define MODE_OUT8 0x8000 /* binary mode sans -opost */ diff --git a/kerberosV/src/appl/telnet/telnet/externs.h b/kerberosV/src/appl/telnet/telnet/externs.h deleted file mode 100644 index 7c430180d7b..00000000000 --- a/kerberosV/src/appl/telnet/telnet/externs.h +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Copyright (c) 1988, 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. - * - * @(#)externs.h 8.3 (Berkeley) 5/30/95 - */ - -/* $Id: externs.h,v 1.5 2013/06/17 19:11:38 robert Exp $ */ - -#ifndef BSD -# define BSD 43 -#endif - -#ifndef _POSIX_VDISABLE -# ifdef sun -# include /* pick up VDISABLE definition, mayby */ -# endif -# ifdef VDISABLE -# define _POSIX_VDISABLE VDISABLE -# else -# define _POSIX_VDISABLE ((cc_t)'\377') -# endif -#endif - -#define SUBBUFSIZE 256 - -extern int - autologin, /* Autologin enabled */ - skiprc, /* Don't process the ~/.telnetrc file */ - eight, /* use eight bit mode (binary in and/or out */ - binary, - flushout, /* flush output */ - connected, /* Are we connected to the other side? */ - globalmode, /* Mode tty should be in */ - telnetport, /* Are we connected to the telnet port? */ - localflow, /* Flow control handled locally */ - restartany, /* If flow control, restart output on any character */ - localchars, /* we recognize interrupt/quit */ - donelclchars, /* the user has set "localchars" */ - showoptions, - wantencryption, /* User has requested encryption */ - net, /* Network file descriptor */ - tin, /* Terminal input file descriptor */ - tout, /* Terminal output file descriptor */ - crlf, /* Should '\r' be mapped to (or )? */ - autoflush, /* flush output when interrupting? */ - autosynch, /* send interrupt characters with SYNCH? */ - SYNCHing, /* Is the stream in telnet SYNCH mode? */ - donebinarytoggle, /* the user has put us in binary */ - dontlecho, /* do we suppress local echoing right now? */ - crmod, - netdata, /* Print out network data flow */ - prettydump, /* Print "netdata" output in user readable format */ - termdata, /* Print out terminal data flow */ - debug; /* Debug level */ - -extern int intr_happened, intr_waiting; /* for interrupt handling */ - -extern cc_t escape; /* Escape to command mode */ -extern cc_t rlogin; /* Rlogin mode escape character */ -#ifdef KLUDGELINEMODE -extern cc_t echoc; /* Toggle local echoing */ -#endif - -extern char - *prompt; /* Prompt for command. */ - -extern char - doopt[], - dont[], - will[], - wont[], - do_dont_resp[], - will_wont_resp[], - options[], /* All the little options */ - *hostname; /* Who are we connected to? */ -#if defined(ENCRYPTION) -extern void (*encrypt_output) (unsigned char *, int); -extern int (*decrypt_input) (int); -#endif - -/* - * We keep track of each side of the option negotiation. - */ - -#define MY_STATE_WILL 0x01 -#define MY_WANT_STATE_WILL 0x02 -#define MY_STATE_DO 0x04 -#define MY_WANT_STATE_DO 0x08 - -/* - * Macros to check the current state of things - */ - -#define my_state_is_do(opt) (options[opt]&MY_STATE_DO) -#define my_state_is_will(opt) (options[opt]&MY_STATE_WILL) -#define my_want_state_is_do(opt) (options[opt]&MY_WANT_STATE_DO) -#define my_want_state_is_will(opt) (options[opt]&MY_WANT_STATE_WILL) - -#define my_state_is_dont(opt) (!my_state_is_do(opt)) -#define my_state_is_wont(opt) (!my_state_is_will(opt)) -#define my_want_state_is_dont(opt) (!my_want_state_is_do(opt)) -#define my_want_state_is_wont(opt) (!my_want_state_is_will(opt)) - -#define set_my_state_do(opt) {options[opt] |= MY_STATE_DO;} -#define set_my_state_will(opt) {options[opt] |= MY_STATE_WILL;} -#define set_my_want_state_do(opt) {options[opt] |= MY_WANT_STATE_DO;} -#define set_my_want_state_will(opt) {options[opt] |= MY_WANT_STATE_WILL;} - -#define set_my_state_dont(opt) {options[opt] &= ~MY_STATE_DO;} -#define set_my_state_wont(opt) {options[opt] &= ~MY_STATE_WILL;} -#define set_my_want_state_dont(opt) {options[opt] &= ~MY_WANT_STATE_DO;} -#define set_my_want_state_wont(opt) {options[opt] &= ~MY_WANT_STATE_WILL;} - -/* - * Make everything symmetrical - */ - -#define HIS_STATE_WILL MY_STATE_DO -#define HIS_WANT_STATE_WILL MY_WANT_STATE_DO -#define HIS_STATE_DO MY_STATE_WILL -#define HIS_WANT_STATE_DO MY_WANT_STATE_WILL - -#define his_state_is_do my_state_is_will -#define his_state_is_will my_state_is_do -#define his_want_state_is_do my_want_state_is_will -#define his_want_state_is_will my_want_state_is_do - -#define his_state_is_dont my_state_is_wont -#define his_state_is_wont my_state_is_dont -#define his_want_state_is_dont my_want_state_is_wont -#define his_want_state_is_wont my_want_state_is_dont - -#define set_his_state_do set_my_state_will -#define set_his_state_will set_my_state_do -#define set_his_want_state_do set_my_want_state_will -#define set_his_want_state_will set_my_want_state_do - -#define set_his_state_dont set_my_state_wont -#define set_his_state_wont set_my_state_dont -#define set_his_want_state_dont set_my_want_state_wont -#define set_his_want_state_wont set_my_want_state_dont - - -extern FILE - *NetTrace; /* Where debugging output goes */ -extern char - NetTraceFile[]; /* Name of file where debugging output goes */ -extern void - SetNetTrace (char *); /* Function to change where debugging goes */ - -extern jmp_buf - peerdied, - toplevel; /* For error conditions. */ - -int Scheduler(int); -extern int scheduler_lockout_tty; - - -/* authenc.c */ - -#if defined(AUTHENTICATION) || defined(ENCRYPTION) -int telnet_net_write(unsigned char *str, int len); -void net_encrypt(void); -int telnet_spin(void); -char *telnet_getenv(const char *val); -char *telnet_gets(char *prompt, char *result, int length, int echo); -#endif - -/* commands.c */ - -struct env_lst *env_define (unsigned char *, unsigned char *); -struct env_lst *env_find(unsigned char *var); -void env_init (void); -void env_undefine (unsigned char *); -void env_export (unsigned char *); -void env_unexport (unsigned char *); -void env_send (unsigned char *); -void env_list (void); -unsigned char * env_default(int init, int welldefined); -unsigned char * env_getvalue(unsigned char *var); - -void set_escape_char(char *s); -int sourceroute(struct addrinfo *ai, char *arg, char **cpp, - int *prototp, int *optp); - -#if defined(AUTHENTICATION) -int auth_enable (char *); -int auth_disable (char *); -int auth_status (void); -#endif - -#if defined(ENCRYPTION) -int EncryptEnable (char *, char *); -int EncryptDisable (char *, char *); -int EncryptType (char *, char *); -int EncryptStart (char *); -int EncryptStartInput (void); -int EncryptStartOutput (void); -int EncryptStop (char *); -int EncryptStopInput (void); -int EncryptStopOutput (void); -int EncryptStatus (void); -#endif - -#ifdef SIGINFO -RETSIGTYPE ayt_status(int); -#endif -int tn(int argc, char **argv); -void command(int top, char *tbuf, int cnt); - -/* main.c */ - -void tninit(void); -void set_forward_options(void); - -/* network.c */ - -void init_network(void); -int stilloob(void); -void setneturg(void); -int netflush(void); - -/* sys_bsd.c */ - -void init_sys(void); -int TerminalWrite(char *buf, int n); -int TerminalRead(unsigned char *buf, int n); -int TerminalAutoFlush(void); -int TerminalSpecialChars(int c); -void TerminalFlushOutput(void); -void TerminalSaveState(void); -void TerminalDefaultChars(void); -void TerminalNewMode(int f); -cc_t *tcval(int func); -void TerminalSpeeds(long *input_speed, long *output_speed); -int TerminalWindowSize(long *rows, long *cols); -int NetClose(int fd); -void NetNonblockingIO(int fd, int onoff); -int process_rings(int netin, int netout, int netex, int ttyin, int ttyout, - int poll); - -/* telnet.c */ - -void init_telnet(void); - -void tel_leave_binary(int rw); -void tel_enter_binary(int rw); -int opt_welldefined(char *ep); -int telrcv(void); -int rlogin_susp(void); -void intp(void); -void sendbrk(void); -void sendabort(void); -void sendsusp(void); -void sendeof(void); -void sendayt(void); - -void xmitAO(void); -void xmitEL(void); -void xmitEC(void); - - -void Dump (char, unsigned char *, int); -void printoption (char *, int, int); -void sendnaws (void); -void setconnmode (int); -void setcommandmode (void); -void setneturg (void); -void sys_telnet_init (void); -void my_telnet (char *); -void tel_enter_binary (int); -void TerminalFlushOutput (void); -void TerminalNewMode (int); -void TerminalRestoreState (void); -void TerminalSaveState (void); -void willoption (int); -void wontoption (int); - - -void send_do (int, int); -void send_dont (int, int); -void send_will (int, int); -void send_wont (int, int); - -void lm_will (unsigned char *, int); -void lm_wont (unsigned char *, int); -void lm_do (unsigned char *, int); -void lm_dont (unsigned char *, int); -void lm_mode (unsigned char *, int, int); - -void slc_init (void); -void slcstate (void); -void slc_mode_export (void); -void slc_mode_import (int); -void slc_import (int); -void slc_export (void); -void slc (unsigned char *, int); -void slc_check (void); -void slc_start_reply (void); -void slc_add_reply (unsigned char, unsigned char, cc_t); -void slc_end_reply (void); -int slc_update (void); - -void env_opt (unsigned char *, int); -void env_opt_start (void); -void env_opt_start_info (void); -void env_opt_add (unsigned char *); -void env_opt_end (int); - -unsigned char *env_default (int, int); -unsigned char *env_getvalue (unsigned char *); - -int get_status (void); -int dosynch (void); - -cc_t *tcval (int); - -int quit (void); - -/* terminal.c */ - -void init_terminal(void); -int ttyflush(int drop); -int getconnmode(void); - -/* utilities.c */ - -int SetSockOpt(int fd, int level, int option, int yesno); -void SetNetTrace(char *file); -void Dump(char direction, unsigned char *buffer, int length); -void printoption(char *direction, int cmd, int option); -void optionstatus(void); -void printsub(int direction, unsigned char *pointer, size_t length); -void EmptyTerminal(void); -void SetForExit(void); -void Exit(int returnCode); -void ExitString(char *string, int returnCode); - -extern struct termios new_tc; - -# define termEofChar new_tc.c_cc[VEOF] -# define termEraseChar new_tc.c_cc[VERASE] -# define termIntChar new_tc.c_cc[VINTR] -# define termKillChar new_tc.c_cc[VKILL] -# define termQuitChar new_tc.c_cc[VQUIT] - -# ifndef VSUSP -extern cc_t termSuspChar; -# else -# define termSuspChar new_tc.c_cc[VSUSP] -# endif -# if defined(VFLUSHO) && !defined(VDISCARD) -# define VDISCARD VFLUSHO -# endif -# ifndef VDISCARD -extern cc_t termFlushChar; -# else -# define termFlushChar new_tc.c_cc[VDISCARD] -# endif -# ifndef VWERASE -extern cc_t termWerasChar; -# else -# define termWerasChar new_tc.c_cc[VWERASE] -# endif -# ifndef VREPRINT -extern cc_t termRprntChar; -# else -# define termRprntChar new_tc.c_cc[VREPRINT] -# endif -# ifndef VLNEXT -extern cc_t termLiteralNextChar; -# else -# define termLiteralNextChar new_tc.c_cc[VLNEXT] -# endif -# ifndef VSTART -extern cc_t termStartChar; -# else -# define termStartChar new_tc.c_cc[VSTART] -# endif -# ifndef VSTOP -extern cc_t termStopChar; -# else -# define termStopChar new_tc.c_cc[VSTOP] -# endif -# ifndef VEOL -extern cc_t termForw1Char; -# else -# define termForw1Char new_tc.c_cc[VEOL] -# endif -# ifndef VEOL2 -extern cc_t termForw2Char; -# else -# define termForw2Char new_tc.c_cc[VEOL] -# endif -# ifndef VSTATUS -extern cc_t termAytChar; -#else -# define termAytChar new_tc.c_cc[VSTATUS] -#endif - -/* Ring buffer structures which are shared */ - -extern Ring - netoring, - netiring, - ttyoring, - ttyiring; - -extern int resettermname; -extern int linemode; -#ifdef KLUDGELINEMODE -extern int kludgelinemode; -#endif -extern int want_status_response; diff --git a/kerberosV/src/appl/telnet/telnet/main.c b/kerberosV/src/appl/telnet/telnet/main.c deleted file mode 100644 index d0bf2949cf6..00000000000 --- a/kerberosV/src/appl/telnet/telnet/main.c +++ /dev/null @@ -1,358 +0,0 @@ -/* - * Copyright (c) 1988, 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. - */ - -static char *copyright[] = { - "@(#) Copyright (c) 1988, 1990, 1993\n" - "\tThe Regents of the University of California. All rights reserved.\n", - (char*)copyright -}; - -#include "telnet_locl.h" -RCSID("$Id: main.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#if KRB5 -#define FORWARD -#endif - -/* - * Initialize variables. - */ -void -tninit(void) -{ - init_terminal(); - - init_network(); - - init_telnet(); - - init_sys(); -} - -static void -usage(int exit_code) -{ - fprintf(stderr, "Usage: %s %s%s%s%s\n", prompt, -#ifdef AUTHENTICATION - "[-8] [-E] [-K] [-L] [-G] [-S tos] [-X atype] [-a] [-c] [-d] [-e char]", - "\n\t[-k realm] [-l user] [-f/-F] [-n tracefile] ", -#else - "[-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user]", - "\n\t[-n tracefile]", -#endif - "[-r] ", -#ifdef ENCRYPTION - "[-x] [host-name [port]]" -#else - "[host-name [port]]" -#endif - ); - exit(exit_code); -} - -/* - * main. Parse arguments, invoke the protocol or command parser. - */ - - -#ifdef FORWARD -int forward_option = 0; /* forward flags set from command line */ -#endif /* FORWARD */ -void -set_forward_options(void) -{ -#ifdef FORWARD - switch(forward_option) { - case 'f': - kerberos5_set_forward(1); - kerberos5_set_forwardable(0); - break; - case 'F': - kerberos5_set_forward(1); - kerberos5_set_forwardable(1); - break; - case 'G': - kerberos5_set_forward(0); - kerberos5_set_forwardable(0); - break; - default: - break; - } -#endif -} - -#ifdef KRB5 -#define Authenticator asn1_Authenticator -#include -static void -krb5_init(void) -{ - krb5_context context; - krb5_error_code ret; - krb5_boolean ret_val; - - ret = krb5_init_context(&context); - if (ret) - return; - -#if defined(AUTHENTICATION) && defined(FORWARD) - krb5_appdefault_boolean(context, NULL, - NULL, "forward", - 0, &ret_val); - if (ret_val) - kerberos5_set_forward(1); - krb5_appdefault_boolean(context, NULL, - NULL, "forwardable", - 0, &ret_val); - if (ret_val) - kerberos5_set_forwardable(1); -#endif -#ifdef ENCRYPTION - krb5_appdefault_boolean(context, NULL, - NULL, "encrypt", - 0, &ret_val); - if (ret_val) { - encrypt_auto(1); - decrypt_auto(1); - wantencryption = 1; - EncryptVerbose(1); - } -#endif - - krb5_free_context(context); -} -#endif - -int -main(int argc, char **argv) -{ - int ch; - char *user; - - setprogname(argv[0]); - -#ifdef KRB5 - krb5_init(); -#endif - - tninit(); /* Clear out things */ - - TerminalSaveState(); - - if ((prompt = strrchr(argv[0], '/'))) - ++prompt; - else - prompt = argv[0]; - - user = NULL; - - rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE; - - /* - * if AUTHENTICATION and ENCRYPTION is set autologin will be - * se to true after the getopt switch; unless the -K option is - * passed - */ - autologin = -1; - - if (argc == 2 && strcmp(argv[1], "--version") == 0) { - print_version(NULL); - exit(0); - } - if (argc == 2 && strcmp(argv[1], "--help") == 0) - usage(0); - - - while((ch = getopt(argc, argv, - "78DEKLS:X:abcde:fFk:l:n:rxG")) != -1) { - switch(ch) { - case '8': - eight = 3; /* binary output and input */ - break; - case '7': - eight = 0; - break; - case 'b': - binary = 3; - break; - case 'D': { - /* sometimes we don't want a mangled display */ - char *p; - if((p = getenv("DISPLAY"))) - env_define((unsigned char*)"DISPLAY", (unsigned char*)p); - break; - } - case 'E': - rlogin = escape = _POSIX_VDISABLE; - break; - case 'K': -#ifdef AUTHENTICATION - autologin = 0; -#endif - break; - case 'L': - eight |= 2; /* binary output only */ - break; - case 'S': - { -#ifdef HAVE_PARSETOS - extern int tos; - - if ((tos = parsetos(optarg, "tcp")) < 0) - fprintf(stderr, "%s%s%s%s\n", - prompt, ": Bad TOS argument '", - optarg, - "; will try to use default TOS"); -#else - fprintf(stderr, - "%s: Warning: -S ignored, no parsetos() support.\n", - prompt); -#endif - } - break; - case 'X': -#ifdef AUTHENTICATION - auth_disable_name(optarg); -#endif - break; - case 'a': - autologin = 1; - break; - case 'c': - skiprc = 1; - break; - case 'd': - debug = 1; - break; - case 'e': - set_escape_char(optarg); - break; - case 'f': - case 'F': - case 'G': -#if defined(AUTHENTICATION) && defined(KRB5) && defined(FORWARD) - if (forward_option) { - fprintf(stderr, - "%s: Only one of -f, -F and -G allowed.\n", - prompt); - usage(1); - } - forward_option = ch; -#else - fprintf(stderr, - "%s: Warning: -%c ignored, no Kerberos V5 support.\n", - prompt, ch); -#endif - break; - case 'k': - fprintf(stderr, - "%s: Warning: -k ignored, no Kerberos V4 support.\n", - prompt); - break; - case 'l': - if(autologin == 0){ - fprintf(stderr, "%s: Warning: -K ignored\n", prompt); - autologin = -1; - } - user = optarg; - break; - case 'n': - SetNetTrace(optarg); - break; - case 'r': - rlogin = '~'; - break; - case 'x': -#ifdef ENCRYPTION - encrypt_auto(1); - decrypt_auto(1); - wantencryption = 1; - EncryptVerbose(1); -#else - fprintf(stderr, - "%s: Warning: -x ignored, no ENCRYPT support.\n", - prompt); -#endif - break; - - case '?': - default: - usage(1); - /* NOTREACHED */ - } - } - - if (autologin == -1) { /* esc@magic.fi; force */ -#if defined(AUTHENTICATION) - autologin = 1; -#endif -#if defined(ENCRYPTION) - encrypt_auto(1); - decrypt_auto(1); - wantencryption = -1; -#endif - } - - if (autologin == -1) - autologin = (rlogin == _POSIX_VDISABLE) ? 0 : 1; - - argc -= optind; - argv += optind; - - if (argc) { - char *args[7], **argp = args; - - if (argc > 2) - usage(1); - *argp++ = prompt; - if (user) { - *argp++ = "-l"; - *argp++ = user; - } - *argp++ = argv[0]; /* host */ - if (argc > 1) - *argp++ = argv[1]; /* port */ - *argp = 0; - - if (setjmp(toplevel) != 0) - Exit(0); - if (tn(argp - args, args) == 1) - return (0); - else - return (1); - } - setjmp(toplevel); - for (;;) { - command(1, 0, 0); - } -} diff --git a/kerberosV/src/appl/telnet/telnet/network.c b/kerberosV/src/appl/telnet/telnet/network.c deleted file mode 100644 index f7247c9aec6..00000000000 --- a/kerberosV/src/appl/telnet/telnet/network.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (c) 1988, 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. - */ - -#include "telnet_locl.h" - -RCSID("$Id: network.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -Ring netoring, netiring; -size_t netobufsize = 64*1024; -size_t netibufsize = 64*1024; - -/* - * Initialize internal network data structures. - */ - -void -init_network(void) -{ - void *obuf, *ibuf; - - if ((obuf = malloc(netobufsize)) == NULL) - exit(1); - if ((ibuf = malloc(netibufsize)) == NULL) - exit(1); - - if (ring_init(&netoring, obuf, netobufsize) != 1) { - exit(1); - } - if (ring_init(&netiring, ibuf, netibufsize) != 1) { - exit(1); - } - NetTrace = stdout; -} - - -/* - * Check to see if any out-of-band data exists on a socket (for - * Telnet "synch" processing). - */ - -int -stilloob(void) -{ - static struct timeval timeout = { 0 }; - fd_set excepts; - int value; - - do { - FD_ZERO(&excepts); - if (net >= FD_SETSIZE) - errx (1, "fd too large"); - FD_SET(net, &excepts); - value = select(net+1, 0, 0, &excepts, &timeout); - } while ((value == -1) && (errno == EINTR)); - - if (value < 0) { - perror("select"); - quit(); - /* NOTREACHED */ - } - if (FD_ISSET(net, &excepts)) { - return 1; - } else { - return 0; - } -} - - -/* - * setneturg() - * - * Sets "neturg" to the current location. - */ - -void -setneturg(void) -{ - ring_mark(&netoring); -} - - -/* - * netflush - * Send as much data as possible to the network, - * handling requests for urgent data. - * - * The return value indicates whether we did any - * useful work. - */ - - -int -netflush(void) -{ - int n, n1; - -#if defined(ENCRYPTION) - if (encrypt_output) - ring_encrypt(&netoring, encrypt_output); -#endif - if ((n1 = n = ring_full_consecutive(&netoring)) > 0) { - if (!ring_at_mark(&netoring)) { - n = send(net, (char *)netoring.consume, n, 0); /* normal write */ - } else { - /* - * In 4.2 (and 4.3) systems, there is some question about - * what byte in a sendOOB operation is the "OOB" data. - * To make ourselves compatible, we only send ONE byte - * out of band, the one WE THINK should be OOB (though - * we really have more the TCP philosophy of urgent data - * rather than the Unix philosophy of OOB data). - */ - n = send(net, (char *)netoring.consume, 1, MSG_OOB);/* URGENT data */ - } - } - if (n < 0) { - if (errno != ENOBUFS && errno != EWOULDBLOCK) { - setcommandmode(); - perror(hostname); - NetClose(net); - ring_clear_mark(&netoring); - longjmp(peerdied, -1); - /*NOTREACHED*/ - } - n = 0; - } - if (netdata && n) { - Dump('>', netoring.consume, n); - } - if (n) { - ring_consumed(&netoring, n); - /* - * If we sent all, and more to send, then recurse to pick - * up the other half. - */ - if ((n1 == n) && ring_full_consecutive(&netoring)) { - netflush(); - } - return 1; - } else { - return 0; - } -} diff --git a/kerberosV/src/appl/telnet/telnet/ring.c b/kerberosV/src/appl/telnet/telnet/ring.c deleted file mode 100644 index 2cdabc7127f..00000000000 --- a/kerberosV/src/appl/telnet/telnet/ring.c +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright (c) 1988, 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. - */ - -#include "telnet_locl.h" - -RCSID("$Id: ring.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -/* - * This defines a structure for a ring buffer. - * - * The circular buffer has two parts: - *((( - * full: [consume, supply) - * empty: [supply, consume) - *]]] - * - */ - -/* Internal macros */ - -#define ring_subtract(d,a,b) (((a)-(b) >= 0)? \ - (a)-(b): (((a)-(b))+(d)->size)) - -#define ring_increment(d,a,c) (((a)+(c) < (d)->top)? \ - (a)+(c) : (((a)+(c))-(d)->size)) - -#define ring_decrement(d,a,c) (((a)-(c) >= (d)->bottom)? \ - (a)-(c) : (((a)-(c))-(d)->size)) - - -/* - * The following is a clock, used to determine full, empty, etc. - * - * There is some trickiness here. Since the ring buffers are initialized - * to ZERO on allocation, we need to make sure, when interpreting the - * clock, that when the times are EQUAL, then the buffer is FULL. - */ -static u_long ring_clock = 0; - - -#define ring_empty(d) (((d)->consume == (d)->supply) && \ - ((d)->consumetime >= (d)->supplytime)) -#define ring_full(d) (((d)->supply == (d)->consume) && \ - ((d)->supplytime > (d)->consumetime)) - - - - - -/* Buffer state transition routines */ - -int -ring_init(Ring *ring, unsigned char *buffer, int count) -{ - memset(ring, 0, sizeof *ring); - - ring->size = count; - - ring->supply = ring->consume = ring->bottom = buffer; - - ring->top = ring->bottom+ring->size; - -#if defined(ENCRYPTION) - ring->clearto = 0; -#endif - - return 1; -} - -/* Mark routines */ - -/* - * Mark the most recently supplied byte. - */ - -void -ring_mark(Ring *ring) -{ - ring->mark = ring_decrement(ring, ring->supply, 1); -} - -/* - * Is the ring pointing to the mark? - */ - -int -ring_at_mark(Ring *ring) -{ - if (ring->mark == ring->consume) { - return 1; - } else { - return 0; - } -} - -/* - * Clear any mark set on the ring. - */ - -void -ring_clear_mark(Ring *ring) -{ - ring->mark = 0; -} - -/* - * Add characters from current segment to ring buffer. - */ -void -ring_supplied(Ring *ring, int count) -{ - ring->supply = ring_increment(ring, ring->supply, count); - ring->supplytime = ++ring_clock; -} - -/* - * We have just consumed "c" bytes. - */ -void -ring_consumed(Ring *ring, int count) -{ - if (count == 0) /* don't update anything */ - return; - - if (ring->mark && - (ring_subtract(ring, ring->mark, ring->consume) < count)) { - ring->mark = 0; - } -#if defined(ENCRYPTION) - if (ring->consume < ring->clearto && - ring->clearto <= ring->consume + count) - ring->clearto = 0; - else if (ring->consume + count > ring->top && - ring->bottom <= ring->clearto && - ring->bottom + ((ring->consume + count) - ring->top)) - ring->clearto = 0; -#endif - ring->consume = ring_increment(ring, ring->consume, count); - ring->consumetime = ++ring_clock; - /* - * Try to encourage "ring_empty_consecutive()" to be large. - */ - if (ring_empty(ring)) { - ring->consume = ring->supply = ring->bottom; - } -} - - - -/* Buffer state query routines */ - - -/* Number of bytes that may be supplied */ -int -ring_empty_count(Ring *ring) -{ - if (ring_empty(ring)) { /* if empty */ - return ring->size; - } else { - return ring_subtract(ring, ring->consume, ring->supply); - } -} - -/* number of CONSECUTIVE bytes that may be supplied */ -int -ring_empty_consecutive(Ring *ring) -{ - if ((ring->consume < ring->supply) || ring_empty(ring)) { - /* - * if consume is "below" supply, or empty, then - * return distance to the top - */ - return ring_subtract(ring, ring->top, ring->supply); - } else { - /* - * else, return what we may. - */ - return ring_subtract(ring, ring->consume, ring->supply); - } -} - -/* Return the number of bytes that are available for consuming - * (but don't give more than enough to get to cross over set mark) - */ - -int -ring_full_count(Ring *ring) -{ - if ((ring->mark == 0) || (ring->mark == ring->consume)) { - if (ring_full(ring)) { - return ring->size; /* nothing consumed, but full */ - } else { - return ring_subtract(ring, ring->supply, ring->consume); - } - } else { - return ring_subtract(ring, ring->mark, ring->consume); - } -} - -/* - * Return the number of CONSECUTIVE bytes available for consuming. - * However, don't return more than enough to cross over set mark. - */ -int -ring_full_consecutive(Ring *ring) -{ - if ((ring->mark == 0) || (ring->mark == ring->consume)) { - if ((ring->supply < ring->consume) || ring_full(ring)) { - return ring_subtract(ring, ring->top, ring->consume); - } else { - return ring_subtract(ring, ring->supply, ring->consume); - } - } else { - if (ring->mark < ring->consume) { - return ring_subtract(ring, ring->top, ring->consume); - } else { /* Else, distance to mark */ - return ring_subtract(ring, ring->mark, ring->consume); - } - } -} - -/* - * Move data into the "supply" portion of of the ring buffer. - */ -void -ring_supply_data(Ring *ring, unsigned char *buffer, int count) -{ - int i; - - while (count) { - i = min(count, ring_empty_consecutive(ring)); - memmove(ring->supply, buffer, i); - ring_supplied(ring, i); - count -= i; - buffer += i; - } -} - -#ifdef notdef - -/* - * Move data from the "consume" portion of the ring buffer - */ -void -ring_consume_data(Ring *ring, unsigned char *buffer, int count) -{ - int i; - - while (count) { - i = min(count, ring_full_consecutive(ring)); - memmove(buffer, ring->consume, i); - ring_consumed(ring, i); - count -= i; - buffer += i; - } -} -#endif - -#if defined(ENCRYPTION) -void -ring_encrypt(Ring *ring, void (*encryptor)(unsigned char *, int)) -{ - unsigned char *s, *c; - - if (ring_empty(ring) || ring->clearto == ring->supply) - return; - - if (!(c = ring->clearto)) - c = ring->consume; - - s = ring->supply; - - if (s <= c) { - (*encryptor)(c, ring->top - c); - (*encryptor)(ring->bottom, s - ring->bottom); - } else - (*encryptor)(c, s - c); - - ring->clearto = ring->supply; -} - -void -ring_clearto(Ring *ring) -{ - if (!ring_empty(ring)) - ring->clearto = ring->supply; - else - ring->clearto = 0; -} -#endif - diff --git a/kerberosV/src/appl/telnet/telnet/ring.h b/kerberosV/src/appl/telnet/telnet/ring.h deleted file mode 100644 index d072f61530b..00000000000 --- a/kerberosV/src/appl/telnet/telnet/ring.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 1988, 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. - * - * @(#)ring.h 8.1 (Berkeley) 6/6/93 - */ - -/* $Id: ring.h,v 1.3 2013/06/17 19:11:38 robert Exp $ */ - -/* - * This defines a structure for a ring buffer. - * - * The circular buffer has two parts: - *((( - * full: [consume, supply) - * empty: [supply, consume) - *]]] - * - */ -typedef struct { - unsigned char *consume, /* where data comes out of */ - *supply, /* where data comes in to */ - *bottom, /* lowest address in buffer */ - *top, /* highest address+1 in buffer */ - *mark; /* marker (user defined) */ -#if defined(ENCRYPTION) - unsigned char *clearto; /* Data to this point is clear text */ - unsigned char *encryyptedto; /* Data is encrypted to here */ -#endif - int size; /* size in bytes of buffer */ - u_long consumetime, /* help us keep straight full, empty, etc. */ - supplytime; -} Ring; - -/* Here are some functions and macros to deal with the ring buffer */ - -/* Initialization routine */ -extern int - ring_init (Ring *ring, unsigned char *buffer, int count); - -/* Data movement routines */ -extern void - ring_supply_data (Ring *ring, unsigned char *buffer, int count); -#ifdef notdef -extern void - ring_consume_data (Ring *ring, unsigned char *buffer, int count); -#endif - -/* Buffer state transition routines */ -extern void - ring_supplied (Ring *ring, int count), - ring_consumed (Ring *ring, int count); - -/* Buffer state query routines */ -extern int - ring_empty_count (Ring *ring), - ring_empty_consecutive (Ring *ring), - ring_full_count (Ring *ring), - ring_full_consecutive (Ring *ring); - -#if defined(ENCRYPTION) -extern void - ring_encrypt (Ring *ring, void (*func)(unsigned char *, int)), - ring_clearto (Ring *ring); -#endif - -extern int ring_at_mark(Ring *ring); - -extern void - ring_clear_mark(Ring *ring), - ring_mark(Ring *ring); diff --git a/kerberosV/src/appl/telnet/telnet/sys_bsd.c b/kerberosV/src/appl/telnet/telnet/sys_bsd.c deleted file mode 100644 index 296f49a39a5..00000000000 --- a/kerberosV/src/appl/telnet/telnet/sys_bsd.c +++ /dev/null @@ -1,979 +0,0 @@ -/* - * Copyright (c) 1988, 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. - */ - -#include "telnet_locl.h" - -RCSID("$Id: sys_bsd.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -/* - * The following routines try to encapsulate what is system dependent - * (at least between 4.x and dos) which is used in telnet.c. - */ - -int - tout, /* Output file descriptor */ - tin, /* Input file descriptor */ - net; - -struct termios old_tc = { 0 }; -extern struct termios new_tc; - -# ifndef TCSANOW -# ifdef TCSETS -# define TCSANOW TCSETS -# define TCSADRAIN TCSETSW -# define tcgetattr(f, t) ioctl(f, TCGETS, (char *)t) -# else -# ifdef TCSETA -# define TCSANOW TCSETA -# define TCSADRAIN TCSETAW -# define tcgetattr(f, t) ioctl(f, TCGETA, (char *)t) -# else -# define TCSANOW TIOCSETA -# define TCSADRAIN TIOCSETAW -# define tcgetattr(f, t) ioctl(f, TIOCGETA, (char *)t) -# endif -# endif -# define tcsetattr(f, a, t) ioctl(f, a, (char *)t) -# define cfgetospeed(ptr) ((ptr)->c_cflag&CBAUD) -# ifdef CIBAUD -# define cfgetispeed(ptr) (((ptr)->c_cflag&CIBAUD) >> IBSHIFT) -# else -# define cfgetispeed(ptr) cfgetospeed(ptr) -# endif -# endif /* TCSANOW */ - -static fd_set ibits, obits, xbits; - - -void -init_sys(void) -{ - tout = fileno(stdout); - tin = fileno(stdin); - FD_ZERO(&ibits); - FD_ZERO(&obits); - FD_ZERO(&xbits); - - errno = 0; -} - - -int -TerminalWrite(char *buf, int n) -{ - return write(tout, buf, n); -} - -int -TerminalRead(unsigned char *buf, int n) -{ - return read(tin, buf, n); -} - -/* - * - */ - -int -TerminalAutoFlush(void) -{ -#if defined(LNOFLSH) - int flush; - - ioctl(0, TIOCLGET, (char *)&flush); - return !(flush&LNOFLSH); /* if LNOFLSH, no autoflush */ -#else /* LNOFLSH */ - return 1; -#endif /* LNOFLSH */ -} - -/* - * TerminalSpecialChars() - * - * Look at an input character to see if it is a special character - * and decide what to do. - * - * Output: - * - * 0 Don't add this character. - * 1 Do add this character - */ - -int -TerminalSpecialChars(int c) -{ - if (c == termIntChar) { - intp(); - return 0; - } else if (c == termQuitChar) { -#ifdef KLUDGELINEMODE - if (kludgelinemode) - sendbrk(); - else -#endif - sendabort(); - return 0; - } else if (c == termEofChar) { - if (my_want_state_is_will(TELOPT_LINEMODE)) { - sendeof(); - return 0; - } - return 1; - } else if (c == termSuspChar) { - sendsusp(); - return(0); - } else if (c == termFlushChar) { - xmitAO(); /* Transmit Abort Output */ - return 0; - } else if (!MODE_LOCAL_CHARS(globalmode)) { - if (c == termKillChar) { - xmitEL(); - return 0; - } else if (c == termEraseChar) { - xmitEC(); /* Transmit Erase Character */ - return 0; - } - } - return 1; -} - - -/* - * Flush output to the terminal - */ - -void -TerminalFlushOutput(void) -{ -#ifdef TIOCFLUSH - ioctl(fileno(stdout), TIOCFLUSH, (char *) 0); -#else - ioctl(fileno(stdout), TCFLSH, (char *) 0); -#endif -} - -void -TerminalSaveState(void) -{ - tcgetattr(0, &old_tc); - - new_tc = old_tc; - -#ifndef VDISCARD - termFlushChar = CONTROL('O'); -#endif -#ifndef VWERASE - termWerasChar = CONTROL('W'); -#endif -#ifndef VREPRINT - termRprntChar = CONTROL('R'); -#endif -#ifndef VLNEXT - termLiteralNextChar = CONTROL('V'); -#endif -#ifndef VSTART - termStartChar = CONTROL('Q'); -#endif -#ifndef VSTOP - termStopChar = CONTROL('S'); -#endif -#ifndef VSTATUS - termAytChar = CONTROL('T'); -#endif -} - -cc_t* -tcval(int func) -{ - switch(func) { - case SLC_IP: return(&termIntChar); - case SLC_ABORT: return(&termQuitChar); - case SLC_EOF: return(&termEofChar); - case SLC_EC: return(&termEraseChar); - case SLC_EL: return(&termKillChar); - case SLC_XON: return(&termStartChar); - case SLC_XOFF: return(&termStopChar); - case SLC_FORW1: return(&termForw1Char); - case SLC_FORW2: return(&termForw2Char); -# ifdef VDISCARD - case SLC_AO: return(&termFlushChar); -# endif -# ifdef VSUSP - case SLC_SUSP: return(&termSuspChar); -# endif -# ifdef VWERASE - case SLC_EW: return(&termWerasChar); -# endif -# ifdef VREPRINT - case SLC_RP: return(&termRprntChar); -# endif -# ifdef VLNEXT - case SLC_LNEXT: return(&termLiteralNextChar); -# endif -# ifdef VSTATUS - case SLC_AYT: return(&termAytChar); -# endif - - case SLC_SYNCH: - case SLC_BRK: - case SLC_EOR: - default: - return((cc_t *)0); - } -} - -void -TerminalDefaultChars(void) -{ - memmove(new_tc.c_cc, old_tc.c_cc, sizeof(old_tc.c_cc)); -# ifndef VDISCARD - termFlushChar = CONTROL('O'); -# endif -# ifndef VWERASE - termWerasChar = CONTROL('W'); -# endif -# ifndef VREPRINT - termRprntChar = CONTROL('R'); -# endif -# ifndef VLNEXT - termLiteralNextChar = CONTROL('V'); -# endif -# ifndef VSTART - termStartChar = CONTROL('Q'); -# endif -# ifndef VSTOP - termStopChar = CONTROL('S'); -# endif -# ifndef VSTATUS - termAytChar = CONTROL('T'); -# endif -} - -#ifdef notdef -void -TerminalRestoreState() -{ -} -#endif - -/* - * TerminalNewMode - set up terminal to a specific mode. - * MODE_ECHO: do local terminal echo - * MODE_FLOW: do local flow control - * MODE_TRAPSIG: do local mapping to TELNET IAC sequences - * MODE_EDIT: do local line editing - * - * Command mode: - * MODE_ECHO|MODE_EDIT|MODE_FLOW|MODE_TRAPSIG - * local echo - * local editing - * local xon/xoff - * local signal mapping - * - * Linemode: - * local/no editing - * Both Linemode and Single Character mode: - * local/remote echo - * local/no xon/xoff - * local/no signal mapping - */ - - -#ifdef SIGTSTP -static RETSIGTYPE susp(int); -#endif /* SIGTSTP */ -#ifdef SIGINFO -static RETSIGTYPE ayt(int); -#endif - -void -TerminalNewMode(int f) -{ - static int prevmode = 0; - struct termios tmp_tc; - int onoff; - int old; - cc_t esc; - - globalmode = f&~MODE_FORCE; - if (prevmode == f) - return; - - /* - * Write any outstanding data before switching modes - * ttyflush() returns 0 only when there is no more data - * left to write out, it returns -1 if it couldn't do - * anything at all, otherwise it returns 1 + the number - * of characters left to write. - */ - old = ttyflush(SYNCHing|flushout); - if (old < 0 || old > 1) { - tcgetattr(tin, &tmp_tc); - do { - /* - * Wait for data to drain, then flush again. - */ - tcsetattr(tin, TCSADRAIN, &tmp_tc); - old = ttyflush(SYNCHing|flushout); - } while (old < 0 || old > 1); - } - - old = prevmode; - prevmode = f&~MODE_FORCE; - tmp_tc = new_tc; - - if (f&MODE_ECHO) { - tmp_tc.c_lflag |= ECHO; - tmp_tc.c_oflag |= ONLCR; - if (crlf) - tmp_tc.c_iflag |= ICRNL; - } else { - tmp_tc.c_lflag &= ~ECHO; - tmp_tc.c_oflag &= ~ONLCR; -# ifdef notdef - if (crlf) - tmp_tc.c_iflag &= ~ICRNL; -# endif - } - - if ((f&MODE_FLOW) == 0) { - tmp_tc.c_iflag &= ~(IXOFF|IXON); /* Leave the IXANY bit alone */ - } else { - if (restartany < 0) { - tmp_tc.c_iflag |= IXOFF|IXON; /* Leave the IXANY bit alone */ - } else if (restartany > 0) { - tmp_tc.c_iflag |= IXOFF|IXON|IXANY; - } else { - tmp_tc.c_iflag |= IXOFF|IXON; - tmp_tc.c_iflag &= ~IXANY; - } - } - - if ((f&MODE_TRAPSIG) == 0) { - tmp_tc.c_lflag &= ~ISIG; - localchars = 0; - } else { - tmp_tc.c_lflag |= ISIG; - localchars = 1; - } - - if (f&MODE_EDIT) { - tmp_tc.c_lflag |= ICANON; - } else { - tmp_tc.c_lflag &= ~ICANON; - tmp_tc.c_iflag &= ~ICRNL; - tmp_tc.c_cc[VMIN] = 1; - tmp_tc.c_cc[VTIME] = 0; - } - - if ((f&(MODE_EDIT|MODE_TRAPSIG)) == 0) { -# ifdef VLNEXT - tmp_tc.c_cc[VLNEXT] = (cc_t)(_POSIX_VDISABLE); -# endif - } - - if (f&MODE_SOFT_TAB) { -# ifdef OXTABS - tmp_tc.c_oflag |= OXTABS; -# endif -# ifdef TABDLY - tmp_tc.c_oflag &= ~TABDLY; - tmp_tc.c_oflag |= TAB3; -# endif - } else { -# ifdef OXTABS - tmp_tc.c_oflag &= ~OXTABS; -# endif -# ifdef TABDLY - tmp_tc.c_oflag &= ~TABDLY; -# endif - } - - if (f&MODE_LIT_ECHO) { -# ifdef ECHOCTL - tmp_tc.c_lflag &= ~ECHOCTL; -# endif - } else { -# ifdef ECHOCTL - tmp_tc.c_lflag |= ECHOCTL; -# endif - } - - if (f == -1) { - onoff = 0; - } else { - if (f & MODE_INBIN) - tmp_tc.c_iflag &= ~ISTRIP; - else - tmp_tc.c_iflag |= ISTRIP; - if ((f & MODE_OUTBIN) || (f & MODE_OUT8)) { - tmp_tc.c_cflag &= ~(CSIZE|PARENB); - tmp_tc.c_cflag |= CS8; - if(f & MODE_OUTBIN) - tmp_tc.c_oflag &= ~OPOST; - else - tmp_tc.c_oflag |= OPOST; - } else { - tmp_tc.c_cflag &= ~(CSIZE|PARENB); - tmp_tc.c_cflag |= old_tc.c_cflag & (CSIZE|PARENB); - tmp_tc.c_oflag |= OPOST; - } - onoff = 1; - } - - if (f != -1) { - -#ifdef SIGTSTP - signal(SIGTSTP, susp); -#endif /* SIGTSTP */ -#ifdef SIGINFO - signal(SIGINFO, ayt); -#endif -#ifdef NOKERNINFO - tmp_tc.c_lflag |= NOKERNINFO; -#endif - /* - * We don't want to process ^Y here. It's just another - * character that we'll pass on to the back end. It has - * to process it because it will be processed when the - * user attempts to read it, not when we send it. - */ -# ifdef VDSUSP - tmp_tc.c_cc[VDSUSP] = (cc_t)(_POSIX_VDISABLE); -# endif - /* - * If the VEOL character is already set, then use VEOL2, - * otherwise use VEOL. - */ - esc = (rlogin != _POSIX_VDISABLE) ? rlogin : escape; - if ((tmp_tc.c_cc[VEOL] != esc) -# ifdef VEOL2 - && (tmp_tc.c_cc[VEOL2] != esc) -# endif - ) { - if (tmp_tc.c_cc[VEOL] == (cc_t)(_POSIX_VDISABLE)) - tmp_tc.c_cc[VEOL] = esc; -# ifdef VEOL2 - else if (tmp_tc.c_cc[VEOL2] == (cc_t)(_POSIX_VDISABLE)) - tmp_tc.c_cc[VEOL2] = esc; -# endif - } - } else { - sigset_t sm; - -#ifdef SIGINFO - signal(SIGINFO, ayt_status); -#endif -#ifdef SIGTSTP - signal(SIGTSTP, SIG_DFL); - sigemptyset(&sm); - sigaddset(&sm, SIGTSTP); - sigprocmask(SIG_UNBLOCK, &sm, NULL); -#endif /* SIGTSTP */ - tmp_tc = old_tc; - } - if (tcsetattr(tin, TCSADRAIN, &tmp_tc) < 0) - tcsetattr(tin, TCSANOW, &tmp_tc); - - ioctl(tin, FIONBIO, (char *)&onoff); - ioctl(tout, FIONBIO, (char *)&onoff); - -} - -/* - * Try to guess whether speeds are "encoded" (4.2BSD) or just numeric (4.4BSD). - */ -#if B4800 != 4800 -#define DECODE_BAUD -#endif - -#ifdef DECODE_BAUD -#ifndef B7200 -#define B7200 B4800 -#endif - -#ifndef B14400 -#define B14400 B9600 -#endif - -#ifndef B19200 -# define B19200 B14400 -#endif - -#ifndef B28800 -#define B28800 B19200 -#endif - -#ifndef B38400 -# define B38400 B28800 -#endif - -#ifndef B57600 -#define B57600 B38400 -#endif - -#ifndef B76800 -#define B76800 B57600 -#endif - -#ifndef B115200 -#define B115200 B76800 -#endif - -#ifndef B230400 -#define B230400 B115200 -#endif - - -/* - * This code assumes that the values B0, B50, B75... - * are in ascending order. They do not have to be - * contiguous. - */ -struct termspeeds { - long speed; - long value; -} termspeeds[] = { - { 0, B0 }, { 50, B50 }, { 75, B75 }, - { 110, B110 }, { 134, B134 }, { 150, B150 }, - { 200, B200 }, { 300, B300 }, { 600, B600 }, - { 1200, B1200 }, { 1800, B1800 }, { 2400, B2400 }, - { 4800, B4800 }, { 7200, B7200 }, { 9600, B9600 }, - { 14400, B14400 }, { 19200, B19200 }, { 28800, B28800 }, - { 38400, B38400 }, { 57600, B57600 }, { 115200, B115200 }, - { 230400, B230400 }, { -1, B230400 } -}; -#endif /* DECODE_BAUD */ - -void -TerminalSpeeds(long *input_speed, long *output_speed) -{ -#ifdef DECODE_BAUD - struct termspeeds *tp; -#endif /* DECODE_BAUD */ - long in, out; - - out = cfgetospeed(&old_tc); - in = cfgetispeed(&old_tc); - if (in == 0) - in = out; - -#ifdef DECODE_BAUD - tp = termspeeds; - while ((tp->speed != -1) && (tp->value < in)) - tp++; - *input_speed = tp->speed; - - tp = termspeeds; - while ((tp->speed != -1) && (tp->value < out)) - tp++; - *output_speed = tp->speed; -#else /* DECODE_BAUD */ - *input_speed = in; - *output_speed = out; -#endif /* DECODE_BAUD */ -} - -int -TerminalWindowSize(long *rows, long *cols) -{ - int irows, icols; - - if (get_window_size(STDIN_FILENO, &irows, &icols) == 0) { - *rows = irows; - *cols = icols; - return 1; - } else - return 0; -} - -int -NetClose(int fd) -{ - return close(fd); -} - - -void -NetNonblockingIO(int fd, int onoff) -{ - ioctl(fd, FIONBIO, (char *)&onoff); -} - - -/* - * Various signal handling routines. - */ - -static RETSIGTYPE deadpeer(int), - intr(int), intr2(int), susp(int), sendwin(int); -#ifdef SIGINFO -static RETSIGTYPE ayt(int); -#endif - - - /* ARGSUSED */ -static RETSIGTYPE -deadpeer(int sig) -{ - setcommandmode(); - longjmp(peerdied, -1); -} - -int intr_happened = 0; -int intr_waiting = 0; - - /* ARGSUSED */ -static RETSIGTYPE -intr(int sig) -{ - if (intr_waiting) { - intr_happened = 1; - return; - } - if (localchars) { - intp(); - return; - } - setcommandmode(); - longjmp(toplevel, -1); -} - - /* ARGSUSED */ -static RETSIGTYPE -intr2(int sig) -{ - if (localchars) { -#ifdef KLUDGELINEMODE - if (kludgelinemode) - sendbrk(); - else -#endif - sendabort(); - return; - } -} - -#ifdef SIGTSTP - /* ARGSUSED */ -static RETSIGTYPE -susp(int sig) -{ - if ((rlogin != _POSIX_VDISABLE) && rlogin_susp()) - return; - if (localchars) - sendsusp(); -} -#endif - -#ifdef SIGWINCH - /* ARGSUSED */ -static RETSIGTYPE -sendwin(int sig) -{ - if (connected) { - sendnaws(); - } -} -#endif - -#ifdef SIGINFO - /* ARGSUSED */ -static RETSIGTYPE -ayt(int sig) -{ - if (connected) - sendayt(); - else - ayt_status(sig); -} -#endif - - -void -sys_telnet_init(void) -{ - signal(SIGINT, intr); - signal(SIGQUIT, intr2); - signal(SIGPIPE, deadpeer); -#ifdef SIGWINCH - signal(SIGWINCH, sendwin); -#endif -#ifdef SIGTSTP - signal(SIGTSTP, susp); -#endif -#ifdef SIGINFO - signal(SIGINFO, ayt); -#endif - - setconnmode(0); - - NetNonblockingIO(net, 1); - - -#if defined(SO_OOBINLINE) - if (SetSockOpt(net, SOL_SOCKET, SO_OOBINLINE, 1) == -1) - perror("setsockopt (SO_OOBINLINE) (ignored)"); -#endif /* defined(SO_OOBINLINE) */ -} - -/* - * Process rings - - * - * This routine tries to fill up/empty our various rings. - * - * The parameter specifies whether this is a poll operation, - * or a block-until-something-happens operation. - * - * The return value is 1 if something happened, 0 if not. - */ - -int -process_rings(int netin, - int netout, - int netex, - int ttyin, - int ttyout, - int poll) /* If 0, then block until something to do */ -{ - int c; - /* One wants to be a bit careful about setting returnValue - * to one, since a one implies we did some useful work, - * and therefore probably won't be called to block next - * time (TN3270 mode only). - */ - int returnValue = 0; - static struct timeval TimeValue = { 0 }; - - if (net >= FD_SETSIZE - || tout >= FD_SETSIZE - || tin >= FD_SETSIZE) - errx (1, "fd too large"); - - if (netout) { - FD_SET(net, &obits); - } - if (ttyout) { - FD_SET(tout, &obits); - } - if (ttyin) { - FD_SET(tin, &ibits); - } - if (netin) { - FD_SET(net, &ibits); - } -#if !defined(SO_OOBINLINE) - if (netex) { - FD_SET(net, &xbits); - } -#endif - if ((c = select(FD_SETSIZE, &ibits, &obits, &xbits, - (poll == 0)? (struct timeval *)0 : &TimeValue)) < 0) { - if (c == -1) { - /* - * we can get EINTR if we are in line mode, - * and the user does an escape (TSTP), or - * some other signal generator. - */ - if (errno == EINTR) { - return 0; - } - /* I don't like this, does it ever happen? */ - printf("sleep(5) from telnet, after select\r\n"); - sleep(5); - } - return 0; - } - - /* - * Any urgent data? - */ - if (FD_ISSET(net, &xbits)) { - FD_CLR(net, &xbits); - SYNCHing = 1; - ttyflush(1); /* flush already enqueued data */ - } - - /* - * Something to read from the network... - */ - if (FD_ISSET(net, &ibits)) { - int canread; - - FD_CLR(net, &ibits); - canread = ring_empty_consecutive(&netiring); -#if !defined(SO_OOBINLINE) - /* - * In 4.2 (and some early 4.3) systems, the - * OOB indication and data handling in the kernel - * is such that if two separate TCP Urgent requests - * come in, one byte of TCP data will be overlaid. - * This is fatal for Telnet, but we try to live - * with it. - * - * In addition, in 4.2 (and...), a special protocol - * is needed to pick up the TCP Urgent data in - * the correct sequence. - * - * What we do is: if we think we are in urgent - * mode, we look to see if we are "at the mark". - * If we are, we do an OOB receive. If we run - * this twice, we will do the OOB receive twice, - * but the second will fail, since the second - * time we were "at the mark", but there wasn't - * any data there (the kernel doesn't reset - * "at the mark" until we do a normal read). - * Once we've read the OOB data, we go ahead - * and do normal reads. - * - * There is also another problem, which is that - * since the OOB byte we read doesn't put us - * out of OOB state, and since that byte is most - * likely the TELNET DM (data mark), we would - * stay in the TELNET SYNCH (SYNCHing) state. - * So, clocks to the rescue. If we've "just" - * received a DM, then we test for the - * presence of OOB data when the receive OOB - * fails (and AFTER we did the normal mode read - * to clear "at the mark"). - */ - if (SYNCHing) { - int atmark; - static int bogus_oob = 0, first = 1; - - ioctl(net, SIOCATMARK, (char *)&atmark); - if (atmark) { - c = recv(net, netiring.supply, canread, MSG_OOB); - if ((c == -1) && (errno == EINVAL)) { - c = recv(net, netiring.supply, canread, 0); - if (clocks.didnetreceive < clocks.gotDM) { - SYNCHing = stilloob(); - } - } else if (first && c > 0) { - /* - * Bogosity check. Systems based on 4.2BSD - * do not return an error if you do a second - * recv(MSG_OOB). So, we do one. If it - * succeeds and returns exactly the same - * data, then assume that we are running - * on a broken system and set the bogus_oob - * flag. (If the data was different, then - * we probably got some valid new data, so - * increment the count...) - */ - int i; - i = recv(net, netiring.supply + c, canread - c, MSG_OOB); - if (i == c && - memcmp(netiring.supply, netiring.supply + c, i) == 0) { - bogus_oob = 1; - first = 0; - } else if (i < 0) { - bogus_oob = 0; - first = 0; - } else - c += i; - } - if (bogus_oob && c > 0) { - int i; - /* - * Bogosity. We have to do the read - * to clear the atmark to get out of - * an infinate loop. - */ - i = read(net, netiring.supply + c, canread - c); - if (i > 0) - c += i; - } - } else { - c = recv(net, netiring.supply, canread, 0); - } - } else { - c = recv(net, netiring.supply, canread, 0); - } - settimer(didnetreceive); -#else /* !defined(SO_OOBINLINE) */ - c = recv(net, (char *)netiring.supply, canread, 0); -#endif /* !defined(SO_OOBINLINE) */ - if (c < 0 && errno == EWOULDBLOCK) { - c = 0; - } else if (c <= 0) { - return -1; - } - if (netdata) { - Dump('<', netiring.supply, c); - } - if (c) - ring_supplied(&netiring, c); - returnValue = 1; - } - - /* - * Something to read from the tty... - */ - if (FD_ISSET(tin, &ibits)) { - FD_CLR(tin, &ibits); - c = TerminalRead(ttyiring.supply, ring_empty_consecutive(&ttyiring)); - if (c < 0 && errno == EIO) - c = 0; - if (c < 0 && errno == EWOULDBLOCK) { - c = 0; - } else { - /* EOF detection for line mode!!!! */ - if ((c == 0) && MODE_LOCAL_CHARS(globalmode) && isatty(tin)) { - /* must be an EOF... */ - *ttyiring.supply = termEofChar; - c = 1; - } - if (c <= 0) { - return -1; - } - if (termdata) { - Dump('<', ttyiring.supply, c); - } - ring_supplied(&ttyiring, c); - } - returnValue = 1; /* did something useful */ - } - - if (FD_ISSET(net, &obits)) { - FD_CLR(net, &obits); - returnValue |= netflush(); - } - if (FD_ISSET(tout, &obits)) { - FD_CLR(tout, &obits); - returnValue |= (ttyflush(SYNCHing|flushout) > 0); - } - - return returnValue; -} diff --git a/kerberosV/src/appl/telnet/telnet/telnet.1 b/kerberosV/src/appl/telnet/telnet/telnet.1 deleted file mode 100644 index 37f588a4c59..00000000000 --- a/kerberosV/src/appl/telnet/telnet/telnet.1 +++ /dev/null @@ -1,1369 +0,0 @@ -.\" 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. -.\" -.\" @(#)telnet.1 8.6 (Berkeley) 6/1/94 -.\" -.Dd June 1, 1994 -.Dt TELNET 1 -.Os BSD 4.2 -.Sh NAME -.Nm telnet -.Nd user interface to the -.Tn TELNET -protocol -.Sh SYNOPSIS -.Nm telnet -.Op Fl 78EFKLacdfrx -.Op Fl S Ar tos -.Op Fl X Ar authtype -.Op Fl e Ar escapechar -.Op Fl k Ar realm -.Op Fl l Ar user -.Op Fl n Ar tracefile -.Oo -.Ar host -.Op port -.Oc -.Sh DESCRIPTION -The -.Nm telnet -command -is used to communicate with another host using the -.Tn TELNET -protocol. -If -.Nm telnet -is invoked without the -.Ar host -argument, it enters command mode, -indicated by its prompt -.Pq Nm telnet\*[Gt] . -In this mode, it accepts and executes the commands listed below. -If it is invoked with arguments, it performs an -.Ic open -command with those arguments. -.Pp -Options: -.Bl -tag -width indent -.It Fl 8 -Specifies an 8-bit data path. This causes an attempt to -negotiate the -.Dv TELNET BINARY -option on both input and output. -.It Fl 7 -Do not try to negotiate -.Dv TELNET BINARY -option. -.It Fl E -Stops any character from being recognized as an escape character. -.It Fl F -If Kerberos V5 authentication is being used, the -.Fl F -option allows the local credentials to be forwarded -to the remote system, including any credentials that -have already been forwarded into the local environment. -.It Fl K -Specifies no automatic login to the remote system. -.It Fl L -Specifies an 8-bit data path on output. This causes the -BINARY option to be negotiated on output. -.It Fl S Ar tos -Sets the IP type-of-service (TOS) option for the telnet -connection to the value -.Ar tos , -which can be a numeric TOS value -or, on systems that support it, a symbolic -TOS name found in the /etc/iptos file. -.It Fl X Ar atype -Disables the -.Ar atype -type of authentication. -.It Fl a -Attempt automatic login. -Currently, this sends the user name via the -.Ev USER -variable -of the -.Ev ENVIRON -option if supported by the remote system. -The name used is that of the current user as returned by -.Xr getlogin 2 -if it agrees with the current user ID, -otherwise it is the name associated with the user ID. -.It Fl c -Disables the reading of the user's -.Pa \&.telnetrc -file. (See the -.Ic toggle skiprc -command on this man page.) -.It Fl d -Sets the initial value of the -.Ic debug -toggle to -.Dv TRUE -.It Fl e Ar escape char -Sets the initial -.Nm -.Nm telnet -escape character to -.Ar escape char . -If -.Ar escape char -is omitted, then -there will be no escape character. -.It Fl f -If Kerberos V5 authentication is being used, the -.Fl f -option allows the local credentials to be forwarded to the remote system. -.It Fl k Ar realm -If Kerberos authentication is being used, the -.Fl k -option requests that telnet obtain tickets for the remote host in -realm realm instead of the remote host's realm, as determined -by -.Xr krb_realmofhost 3 . -.It Fl l Ar user -When connecting to the remote system, if the remote system -understands the -.Ev ENVIRON -option, then -.Ar user -will be sent to the remote system as the value for the variable USER. -This option implies the -.Fl a -option. -This option may also be used with the -.Ic open -command. -.It Fl n Ar tracefile -Opens -.Ar tracefile -for recording trace information. -See the -.Ic set tracefile -command below. -.It Fl r -Specifies a user interface similar to -.Xr rlogin 1 . -In this -mode, the escape character is set to the tilde (~) character, -unless modified by the -e option. -.It Fl x -Turn on encryption of the data stream. When this option is turned on, -.B telnet -will exit with an error if authentication cannot be negotiated or if -encryption cannot be turned on. -.It Ar host -Indicates the official name, an alias, or the Internet address -of a remote host. -.It Ar port -Indicates a port number (address of an application). If a number is -not specified, the default -.Nm telnet -port is used. -.El -.Pp -When in rlogin mode, a line of the form ~. disconnects from the -remote host; ~ is the telnet escape character. -Similarly, the line ~^Z suspends the telnet session. -The line ~^] escapes to the normal telnet escape prompt. -.Pp -Once a connection has been opened, -.Nm telnet -will attempt to enable the -.Dv TELNET LINEMODE -option. -If this fails, then -.Nm telnet -will revert to one of two input modes: -either \*(Lqcharacter at a time\*(Rq -or \*(Lqold line by line\*(Rq -depending on what the remote system supports. -.Pp -When -.Dv LINEMODE -is enabled, character processing is done on the -local system, under the control of the remote system. When input -editing or character echoing is to be disabled, the remote system -will relay that information. The remote system will also relay -changes to any special characters that happen on the remote -system, so that they can take effect on the local system. -.Pp -In \*(Lqcharacter at a time\*(Rq mode, most -text typed is immediately sent to the remote host for processing. -.Pp -In \*(Lqold line by line\*(Rq mode, all text is echoed locally, -and (normally) only completed lines are sent to the remote host. -The \*(Lqlocal echo character\*(Rq (initially \*(Lq^E\*(Rq) may be used -to turn off and on the local echo -(this would mostly be used to enter passwords -without the password being echoed). -.Pp -If the -.Dv LINEMODE -option is enabled, or if the -.Ic localchars -toggle is -.Dv TRUE -(the default for \*(Lqold line by line\*(Lq; see below), -the user's -.Ic quit , -.Ic intr , -and -.Ic flush -characters are trapped locally, and sent as -.Tn TELNET -protocol sequences to the remote side. -If -.Dv LINEMODE -has ever been enabled, then the user's -.Ic susp -and -.Ic eof -are also sent as -.Tn TELNET -protocol sequences, -and -.Ic quit -is sent as a -.Dv TELNET ABORT -instead of -.Dv BREAK -There are options (see -.Ic toggle -.Ic autoflush -and -.Ic toggle -.Ic autosynch -below) -which cause this action to flush subsequent output to the terminal -(until the remote host acknowledges the -.Tn TELNET -sequence) and flush previous terminal input -(in the case of -.Ic quit -and -.Ic intr ) . -.Pp -While connected to a remote host, -.Nm telnet -command mode may be entered by typing the -.Nm telnet -\*(Lqescape character\*(Rq (initially \*(Lq^]\*(Rq). -When in command mode, the normal terminal editing conventions are available. -.Pp -The following -.Nm telnet -commands are available. -Only enough of each command to uniquely identify it need be typed -(this is also true for arguments to the -.Ic mode , -.Ic set , -.Ic toggle , -.Ic unset , -.Ic slc , -.Ic environ , -and -.Ic display -commands). -.Pp -.Bl -tag -width "mode type" -.It Ic auth Ar argument ... -The auth command manipulates the information sent through the -.Dv TELNET AUTHENTICATE -option. Valid arguments for the -auth command are as follows: -.Bl -tag -width "disable type" -.It Ic disable Ar type -Disables the specified type of authentication. To -obtain a list of available types, use the -.Ic auth disable ?\& -command. -.It Ic enable Ar type -Enables the specified type of authentication. To -obtain a list of available types, use the -.Ic auth enable ?\& -command. -.It Ic status -Lists the current status of the various types of -authentication. -.El -.It Ic close -Close a -.Tn TELNET -session and return to command mode. -.It Ic display Ar argument ... -Displays all, or some, of the -.Ic set -and -.Ic toggle -values (see below). -.It Ic encrypt Ar argument ... -The encrypt command manipulates the information sent through the -.Dv TELNET ENCRYPT -option. -.Pp -Note: Because of export controls, the -.Dv TELNET ENCRYPT -option is not supported outside of the United States and Canada. -.Pp -Valid arguments for the encrypt command are as follows: -.Bl -tag -width Ar -.It Ic disable Ar type Xo -.Op Cm input | output -.Xc -Disables the specified type of encryption. If you -omit the input and output, both input and output -are disabled. To obtain a list of available -types, use the -.Ic encrypt disable ?\& -command. -.It Ic enable Ar type Xo -.Op Cm input | output -.Xc -Enables the specified type of encryption. If you -omit input and output, both input and output are -enabled. To obtain a list of available types, use the -.Ic encrypt enable ?\& -command. -.It Ic input -This is the same as the -.Ic encrypt start input -command. -.It Ic -input -This is the same as the -.Ic encrypt stop input -command. -.It Ic output -This is the same as the -.Ic encrypt start output -command. -.It Ic -output -This is the same as the -.Ic encrypt stop output -command. -.It Ic start Op Cm input | output -Attempts to start encryption. If you omit -.Ic input -and -.Ic output , -both input and output are enabled. To -obtain a list of available types, use the -.Ic encrypt enable ?\& -command. -.It Ic status -Lists the current status of encryption. -.It Ic stop Op Cm input | output -Stops encryption. If you omit input and output, -encryption is on both input and output. -.It Ic type Ar type -Sets the default type of encryption to be used -with later -.Ic encrypt start -or -.Ic encrypt stop -commands. -.El -.It Ic environ Ar arguments ... -The -.Ic environ -command is used to manipulate the -the variables that my be sent through the -.Dv TELNET ENVIRON -option. -The initial set of variables is taken from the users -environment, with only the -.Ev DISPLAY -and -.Ev PRINTER -variables being exported by default. -The -.Ev USER -variable is also exported if the -.Fl a -or -.Fl l -options are used. -.Pp -Valid arguments for the -.Ic environ -command are: -.Bl -tag -width Fl -.It Ic define Ar variable value -Define the variable -.Ar variable -to have a value of -.Ar value . -Any variables defined by this command are automatically exported. -The -.Ar value -may be enclosed in single or double quotes so -that tabs and spaces may be included. -.It Ic undefine Ar variable -Remove -.Ar variable -from the list of environment variables. -.It Ic export Ar variable -Mark the variable -.Ar variable -to be exported to the remote side. -.It Ic unexport Ar variable -Mark the variable -.Ar variable -to not be exported unless -explicitly asked for by the remote side. -.It Ic list -List the current set of environment variables. -Those marked with a -.Cm * -will be sent automatically, -other variables will only be sent if explicitly requested. -.It Ic ?\& -Prints out help information for the -.Ic environ -command. -.El -.It Ic logout -Sends the -.Dv TELNET LOGOUT -option to the remote side. -This command is similar to a -.Ic close -command; however, if the remote side does not support the -.Dv LOGOUT -option, nothing happens. -If, however, the remote side does support the -.Dv LOGOUT -option, this command should cause the remote side to close the -.Tn TELNET -connection. -If the remote side also supports the concept of -suspending a user's session for later reattachment, -the logout argument indicates that you -should terminate the session immediately. -.It Ic mode Ar type -.Ar Type -is one of several options, depending on the state of the -.Tn TELNET -session. -The remote host is asked for permission to go into the requested mode. -If the remote host is capable of entering that mode, the requested -mode will be entered. -.Bl -tag -width Ar -.It Ic character -Disable the -.Dv TELNET LINEMODE -option, or, if the remote side does not understand the -.Dv LINEMODE -option, then enter \*(Lqcharacter at a time\*(Lq mode. -.It Ic line -Enable the -.Dv TELNET LINEMODE -option, or, if the remote side does not understand the -.Dv LINEMODE -option, then attempt to enter \*(Lqold-line-by-line\*(Lq mode. -.It Ic isig Pq Ic \-isig -Attempt to enable (disable) the -.Dv TRAPSIG -mode of the -.Dv LINEMODE -option. -This requires that the -.Dv LINEMODE -option be enabled. -.It Ic edit Pq Ic \-edit -Attempt to enable (disable) the -.Dv EDIT -mode of the -.Dv LINEMODE -option. -This requires that the -.Dv LINEMODE -option be enabled. -.It Ic softtabs Pq Ic \-softtabs -Attempt to enable (disable) the -.Dv SOFT_TAB -mode of the -.Dv LINEMODE -option. -This requires that the -.Dv LINEMODE -option be enabled. -.It Ic litecho Pq Ic \-litecho -Attempt to enable (disable) the -.Dv LIT_ECHO -mode of the -.Dv LINEMODE -option. -This requires that the -.Dv LINEMODE -option be enabled. -.It Ic ?\& -Prints out help information for the -.Ic mode -command. -.El -.It Xo -.Ic open Ar host -.Op Fl l Ar user -.Op Oo Fl Oc Ns Ar port -.Xc -Open a connection to the named host. -If no port number -is specified, -.Nm telnet -will attempt to contact a -.Tn TELNET -server at the default port. -The host specification may be either a host name (see -.Xr hosts 5 ) -or an Internet address specified in the \*(Lqdot notation\*(Rq (see -.Xr inet 3 ) . -The -.Op Fl l -option may be used to specify the user name -to be passed to the remote system via the -.Ev ENVIRON -option. -When connecting to a non-standard port, -.Nm telnet -omits any automatic initiation of -.Tn TELNET -options. When the port number is preceded by a minus sign, -the initial option negotiation is done. -After establishing a connection, the file -.Pa \&.telnetrc -in the -users home directory is opened. Lines beginning with a # are -comment lines. Blank lines are ignored. Lines that begin -without white space are the start of a machine entry. The -first thing on the line is the name of the machine that is -being connected to. The rest of the line, and successive -lines that begin with white space are assumed to be -.Nm telnet -commands and are processed as if they had been typed -in manually to the -.Nm telnet -command prompt. -.It Ic quit -Close any open -.Tn TELNET -session and exit -.Nm telnet . -An end of file (in command mode) will also close a session and exit. -.It Ic send Ar arguments -Sends one or more special character sequences to the remote host. -The following are the arguments which may be specified -(more than one argument may be specified at a time): -.Pp -.Bl -tag -width escape -.It Ic abort -Sends the -.Dv TELNET ABORT -(Abort -processes) -sequence. -.It Ic ao -Sends the -.Dv TELNET AO -(Abort Output) sequence, which should cause the remote system to flush -all output -.Em from -the remote system -.Em to -the user's terminal. -.It Ic ayt -Sends the -.Dv TELNET AYT -(Are You There) -sequence, to which the remote system may or may not choose to respond. -.It Ic brk -Sends the -.Dv TELNET BRK -(Break) sequence, which may have significance to the remote -system. -.It Ic ec -Sends the -.Dv TELNET EC -(Erase Character) -sequence, which should cause the remote system to erase the last character -entered. -.It Ic el -Sends the -.Dv TELNET EL -(Erase Line) -sequence, which should cause the remote system to erase the line currently -being entered. -.It Ic eof -Sends the -.Dv TELNET EOF -(End Of File) -sequence. -.It Ic eor -Sends the -.Dv TELNET EOR -(End of Record) -sequence. -.It Ic escape -Sends the current -.Nm telnet -escape character (initially \*(Lq^\*(Rq). -.It Ic ga -Sends the -.Dv TELNET GA -(Go Ahead) -sequence, which likely has no significance to the remote system. -.It Ic getstatus -If the remote side supports the -.Dv TELNET STATUS -command, -.Ic getstatus -will send the subnegotiation to request that the server send -its current option status. -.It Ic ip -Sends the -.Dv TELNET IP -(Interrupt Process) sequence, which should cause the remote -system to abort the currently running process. -.It Ic nop -Sends the -.Dv TELNET NOP -(No OPeration) -sequence. -.It Ic susp -Sends the -.Dv TELNET SUSP -(SUSPend process) -sequence. -.It Ic synch -Sends the -.Dv TELNET SYNCH -sequence. -This sequence causes the remote system to discard all previously typed -(but not yet read) input. -This sequence is sent as -.Tn TCP -urgent -data (and may not work if the remote system is a -.Bx 4.2 -system -- if -it doesn't work, a lower case \*(Lqr\*(Rq may be echoed on the terminal). -.It Ic do Ar cmd -.It Ic dont Ar cmd -.It Ic will Ar cmd -.It Ic wont Ar cmd -Sends the -.Dv TELNET DO -.Ar cmd -sequence. -.Ar Cmd -can be either a decimal number between 0 and 255, -or a symbolic name for a specific -.Dv TELNET -command. -.Ar Cmd -can also be either -.Ic help -or -.Ic ?\& -to print out help information, including -a list of known symbolic names. -.It Ic ?\& -Prints out help information for the -.Ic send -command. -.El -.It Ic set Ar argument value -.It Ic unset Ar argument value -The -.Ic set -command will set any one of a number of -.Nm telnet -variables to a specific value or to -.Dv TRUE . -The special value -.Ic off -turns off the function associated with -the variable, this is equivalent to using the -.Ic unset -command. -The -.Ic unset -command will disable or set to -.Dv FALSE -any of the specified functions. -The values of variables may be interrogated with the -.Ic display -command. -The variables which may be set or unset, but not toggled, are -listed here. In addition, any of the variables for the -.Ic toggle -command may be explicitly set or unset using -the -.Ic set -and -.Ic unset -commands. -.Bl -tag -width escape -.It Ic ayt -If -.Tn TELNET -is in localchars mode, or -.Dv LINEMODE -is enabled, and the status character is typed, a -.Dv TELNET AYT -sequence (see -.Ic send ayt -preceding) is sent to the -remote host. The initial value for the "Are You There" -character is the terminal's status character. -.It Ic echo -This is the value (initially \*(Lq^E\*(Rq) which, when in -\*(Lqline by line\*(Rq mode, toggles between doing local echoing -of entered characters (for normal processing), and suppressing -echoing of entered characters (for entering, say, a password). -.It Ic eof -If -.Nm telnet -is operating in -.Dv LINEMODE -or \*(Lqold line by line\*(Rq mode, entering this character -as the first character on a line will cause this character to be -sent to the remote system. -The initial value of the eof character is taken to be the terminal's -.Ic eof -character. -.It Ic erase -If -.Nm telnet -is in -.Ic localchars -mode (see -.Ic toggle -.Ic localchars -below), -.Sy and -if -.Nm telnet -is operating in \*(Lqcharacter at a time\*(Rq mode, then when this -character is typed, a -.Dv TELNET EC -sequence (see -.Ic send -.Ic ec -above) -is sent to the remote system. -The initial value for the erase character is taken to be -the terminal's -.Ic erase -character. -.It Ic escape -This is the -.Nm telnet -escape character (initially \*(Lq^[\*(Rq) which causes entry -into -.Nm telnet -command mode (when connected to a remote system). -.It Ic flushoutput -If -.Nm telnet -is in -.Ic localchars -mode (see -.Ic toggle -.Ic localchars -below) -and the -.Ic flushoutput -character is typed, a -.Dv TELNET AO -sequence (see -.Ic send -.Ic ao -above) -is sent to the remote host. -The initial value for the flush character is taken to be -the terminal's -.Ic flush -character. -.It Ic forw1 -.It Ic forw2 -If -.Tn TELNET -is operating in -.Dv LINEMODE , -these are the -characters that, when typed, cause partial lines to be -forwarded to the remote system. The initial value for -the forwarding characters are taken from the terminal's -eol and eol2 characters. -.It Ic interrupt -If -.Nm telnet -is in -.Ic localchars -mode (see -.Ic toggle -.Ic localchars -below) -and the -.Ic interrupt -character is typed, a -.Dv TELNET IP -sequence (see -.Ic send -.Ic ip -above) -is sent to the remote host. -The initial value for the interrupt character is taken to be -the terminal's -.Ic intr -character. -.It Ic kill -If -.Nm telnet -is in -.Ic localchars -mode (see -.Ic toggle -.Ic localchars -below), -.Ic and -if -.Nm telnet -is operating in \*(Lqcharacter at a time\*(Rq mode, then when this -character is typed, a -.Dv TELNET EL -sequence (see -.Ic send -.Ic el -above) -is sent to the remote system. -The initial value for the kill character is taken to be -the terminal's -.Ic kill -character. -.It Ic lnext -If -.Nm telnet -is operating in -.Dv LINEMODE -or \*(Lqold line by line\*(Lq mode, then this character is taken to -be the terminal's -.Ic lnext -character. -The initial value for the lnext character is taken to be -the terminal's -.Ic lnext -character. -.It Ic quit -If -.Nm telnet -is in -.Ic localchars -mode (see -.Ic toggle -.Ic localchars -below) -and the -.Ic quit -character is typed, a -.Dv TELNET BRK -sequence (see -.Ic send -.Ic brk -above) -is sent to the remote host. -The initial value for the quit character is taken to be -the terminal's -.Ic quit -character. -.It Ic reprint -If -.Nm telnet -is operating in -.Dv LINEMODE -or \*(Lqold line by line\*(Lq mode, then this character is taken to -be the terminal's -.Ic reprint -character. -The initial value for the reprint character is taken to be -the terminal's -.Ic reprint -character. -.It Ic rlogin -This is the rlogin escape character. -If set, the normal -.Tn TELNET -escape character is ignored unless it is -preceded by this character at the beginning of a line. -This character, at the beginning of a line followed by -a "." closes the connection; when followed by a ^Z it -suspends the telnet command. The initial state is to -disable the rlogin escape character. -.It Ic start -If the -.Dv TELNET TOGGLE-FLOW-CONTROL -option has been enabled, -then this character is taken to -be the terminal's -.Ic start -character. -The initial value for the kill character is taken to be -the terminal's -.Ic start -character. -.It Ic stop -If the -.Dv TELNET TOGGLE-FLOW-CONTROL -option has been enabled, -then this character is taken to -be the terminal's -.Ic stop -character. -The initial value for the kill character is taken to be -the terminal's -.Ic stop -character. -.It Ic susp -If -.Nm telnet -is in -.Ic localchars -mode, or -.Dv LINEMODE -is enabled, and the -.Ic suspend -character is typed, a -.Dv TELNET SUSP -sequence (see -.Ic send -.Ic susp -above) -is sent to the remote host. -The initial value for the suspend character is taken to be -the terminal's -.Ic suspend -character. -.It Ic tracefile -This is the file to which the output, caused by -.Ic netdata -or -.Ic option -tracing being -.Dv TRUE , -will be written. If it is set to -.Dq Fl , -then tracing information will be written to standard output (the default). -.It Ic worderase -If -.Nm telnet -is operating in -.Dv LINEMODE -or \*(Lqold line by line\*(Lq mode, then this character is taken to -be the terminal's -.Ic worderase -character. -The initial value for the worderase character is taken to be -the terminal's -.Ic worderase -character. -.It Ic ?\& -Displays the legal -.Ic set -.Pq Ic unset -commands. -.El -.It Ic slc Ar state -The -.Ic slc -command (Set Local Characters) is used to set -or change the state of the the special -characters when the -.Dv TELNET LINEMODE -option has -been enabled. Special characters are characters that get -mapped to -.Tn TELNET -commands sequences (like -.Ic ip -or -.Ic quit ) -or line editing characters (like -.Ic erase -and -.Ic kill ) . -By default, the local special characters are exported. -.Bl -tag -width Fl -.It Ic check -Verify the current settings for the current special characters. -The remote side is requested to send all the current special -character settings, and if there are any discrepancies with -the local side, the local side will switch to the remote value. -.It Ic export -Switch to the local defaults for the special characters. The -local default characters are those of the local terminal at -the time when -.Nm telnet -was started. -.It Ic import -Switch to the remote defaults for the special characters. -The remote default characters are those of the remote system -at the time when the -.Tn TELNET -connection was established. -.It Ic ?\& -Prints out help information for the -.Ic slc -command. -.El -.It Ic status -Show the current status of -.Nm telnet . -This includes the peer one is connected to, as well -as the current mode. -.It Ic toggle Ar arguments ... -Toggle (between -.Dv TRUE -and -.Dv FALSE ) -various flags that control how -.Nm telnet -responds to events. -These flags may be set explicitly to -.Dv TRUE -or -.Dv FALSE -using the -.Ic set -and -.Ic unset -commands listed above. -More than one argument may be specified. -The state of these flags may be interrogated with the -.Ic display -command. -Valid arguments are: -.Bl -tag -width Ar -.It Ic authdebug -Turns on debugging information for the authentication code. -.It Ic autoflush -If -.Ic autoflush -and -.Ic localchars -are both -.Dv TRUE , -then when the -.Ic ao , -or -.Ic quit -characters are recognized (and transformed into -.Tn TELNET -sequences; see -.Ic set -above for details), -.Nm telnet -refuses to display any data on the user's terminal -until the remote system acknowledges (via a -.Dv TELNET TIMING MARK -option) -that it has processed those -.Tn TELNET -sequences. -The initial value for this toggle is -.Dv TRUE -if the terminal user had not -done an "stty noflsh", otherwise -.Dv FALSE -(see -.Xr stty 1 ) . -.It Ic autodecrypt -When the -.Dv TELNET ENCRYPT -option is negotiated, by -default the actual encryption (decryption) of the data -stream does not start automatically. The autoencrypt -(autodecrypt) command states that encryption of the -output (input) stream should be enabled as soon as -possible. -.Pp -Note: Because of export controls, the -.Dv TELNET ENCRYPT -option is not supported outside the United States and Canada. -.It Ic autologin -If the remote side supports the -.Dv TELNET AUTHENTICATION -option -.Tn TELNET -attempts to use it to perform automatic authentication. If the -.Dv AUTHENTICATION -option is not supported, the user's login -name are propagated through the -.Dv TELNET ENVIRON -option. -This command is the same as specifying -.Ar a -option on the -.Ic open -command. -.It Ic autosynch -If -.Ic autosynch -and -.Ic localchars -are both -.Dv TRUE , -then when either the -.Ic intr -or -.Ic quit -characters is typed (see -.Ic set -above for descriptions of the -.Ic intr -and -.Ic quit -characters), the resulting -.Tn TELNET -sequence sent is followed by the -.Dv TELNET SYNCH -sequence. -This procedure -.Ic should -cause the remote system to begin throwing away all previously -typed input until both of the -.Tn TELNET -sequences have been read and acted upon. -The initial value of this toggle is -.Dv FALSE . -.It Ic binary -Enable or disable the -.Dv TELNET BINARY -option on both input and output. -.It Ic inbinary -Enable or disable the -.Dv TELNET BINARY -option on input. -.It Ic outbinary -Enable or disable the -.Dv TELNET BINARY -option on output. -.It Ic crlf -If this is -.Dv TRUE , -then carriage returns will be sent as -.Li \*[Lt]CR\*[Gt]\*[Lt]LF\*[Gt] . -If this is -.Dv FALSE , -then carriage returns will be send as -.Li \*[Lt]CR\*[Gt]\*[Lt]NUL\*[Gt] . -The initial value for this toggle is -.Dv FALSE . -.It Ic crmod -Toggle carriage return mode. -When this mode is enabled, most carriage return characters received from -the remote host will be mapped into a carriage return followed by -a line feed. -This mode does not affect those characters typed by the user, only -those received from the remote host. -This mode is not very useful unless the remote host -only sends carriage return, but never line feed. -The initial value for this toggle is -.Dv FALSE . -.It Ic debug -Toggles socket level debugging (useful only to the -.Ic super user ) . -The initial value for this toggle is -.Dv FALSE . -.It Ic encdebug -Turns on debugging information for the encryption code. -.It Ic localchars -If this is -.Dv TRUE , -then the -.Ic flush , -.Ic interrupt , -.Ic quit , -.Ic erase , -and -.Ic kill -characters (see -.Ic set -above) are recognized locally, and transformed into (hopefully) appropriate -.Tn TELNET -control sequences -(respectively -.Ic ao , -.Ic ip , -.Ic brk , -.Ic ec , -and -.Ic el ; -see -.Ic send -above). -The initial value for this toggle is -.Dv TRUE -in \*(Lqold line by line\*(Rq mode, -and -.Dv FALSE -in \*(Lqcharacter at a time\*(Rq mode. -When the -.Dv LINEMODE -option is enabled, the value of -.Ic localchars -is ignored, and assumed to always be -.Dv TRUE . -If -.Dv LINEMODE -has ever been enabled, then -.Ic quit -is sent as -.Ic abort , -and -.Ic eof -and -.Ic suspend -are sent as -.Ic eof -and -.Ic susp , -see -.Ic send -above). -.It Ic netdata -Toggles the display of all network data (in hexadecimal format). -The initial value for this toggle is -.Dv FALSE . -.It Ic options -Toggles the display of some internal -.Nm telnet -protocol processing (having to do with -.Tn TELNET -options). -The initial value for this toggle is -.Dv FALSE . -.It Ic prettydump -When the -.Ic netdata -toggle is enabled, if -.Ic prettydump -is enabled the output from the -.Ic netdata -command will be formatted in a more user readable format. -Spaces are put between each character in the output, and the -beginning of any -.Tn TELNET -escape sequence is preceded by a '*' to aid in locating them. -.It Ic skiprc -When the skiprc toggle is -.Dv TRUE , -.Tn TELNET -skips the reading of the -.Pa \&.telnetrc -file in the users home -directory when connections are opened. The initial -value for this toggle is -.Dv FALSE . -.It Ic termdata -Toggles the display of all terminal data (in hexadecimal format). -The initial value for this toggle is -.Dv FALSE . -.It Ic verbose_encrypt -When the -.Ic verbose_encrypt -toggle is -.Dv TRUE , -.Tn TELNET -prints out a message each time encryption is enabled or -disabled. The initial value for this toggle is -.Dv FALSE . -Note: Because of export controls, data encryption -is not supported outside of the United States and Canada. -.It Ic \&? -Displays the legal -.Ic toggle -commands. -.El -.It Ic z -Suspend -.Nm telnet . -This command only works when the user is using the -.Xr csh 1 . -.It Ic \&! Op Ar command -Execute a single command in a subshell on the local -system. If -.Ic command -is omitted, then an interactive -subshell is invoked. -.It Ic ?\& Op Ar command -Get help. With no arguments, -.Nm telnet -prints a help summary. -If a command is specified, -.Nm telnet -will print the help information for just that command. -.El -.Sh ENVIRONMENT -.Nm Telnet -uses at least the -.Ev HOME , -.Ev SHELL , -.Ev DISPLAY , -and -.Ev TERM -environment variables. -Other environment variables may be propagated -to the other side via the -.Dv TELNET ENVIRON -option. -.Sh FILES -.Bl -tag -width ~/.telnetrc -compact -.It Pa ~/.telnetrc -user customized telnet startup values -.El -.Sh HISTORY -The -.Nm Telnet -command appeared in -.Bx 4.2 . -.Sh NOTES -.Pp -On some remote systems, echo has to be turned off manually when in -\*(Lqold line by line\*(Rq mode. -.Pp -In \*(Lqold line by line\*(Rq mode or -.Dv LINEMODE -the terminal's -.Ic eof -character is only recognized (and sent to the remote system) -when it is the first character on a line. diff --git a/kerberosV/src/appl/telnet/telnet/telnet.c b/kerberosV/src/appl/telnet/telnet/telnet.c deleted file mode 100644 index d7244958a77..00000000000 --- a/kerberosV/src/appl/telnet/telnet/telnet.c +++ /dev/null @@ -1,2420 +0,0 @@ -/* - * Copyright (c) 1988, 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. - */ - -#include "telnet_locl.h" - -RCSID("$Id: telnet.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#define strip(x) (eight ? (x) : ((x) & 0x7f)) - -static unsigned char subbuffer[SUBBUFSIZE], - *subpointer, *subend; /* buffer for sub-options */ -#define SB_CLEAR() subpointer = subbuffer; -#define SB_TERM() { subend = subpointer; SB_CLEAR(); } -#define SB_ACCUM(c) if (subpointer < (subbuffer+sizeof subbuffer)) { \ - *subpointer++ = (c); \ - } - -#define SB_GET() ((*subpointer++)&0xff) -#define SB_PEEK() ((*subpointer)&0xff) -#define SB_EOF() (subpointer >= subend) -#define SB_LEN() (subend - subpointer) - -char options[256]; /* The combined options */ -char do_dont_resp[256]; -char will_wont_resp[256]; - -int - eight = 3, - binary = 0, - autologin = 0, /* Autologin anyone? */ - skiprc = 0, - connected, - showoptions, - ISend, /* trying to send network data in */ - debug = 0, - crmod, - netdata, /* Print out network data flow */ - crlf, /* Should '\r' be mapped to (or )? */ - telnetport, - wantencryption = 0, - SYNCHing, /* we are in TELNET SYNCH mode */ - flushout, /* flush output */ - autoflush = 0, /* flush output when interrupting? */ - autosynch, /* send interrupt characters with SYNCH? */ - localflow, /* we handle flow control locally */ - restartany, /* if flow control enabled, restart on any character */ - localchars, /* we recognize interrupt/quit */ - donelclchars, /* the user has set "localchars" */ - donebinarytoggle, /* the user has put us in binary */ - dontlecho, /* do we suppress local echoing right now? */ - globalmode; - -char *prompt = 0; - -int scheduler_lockout_tty = 0; - -cc_t escape; -cc_t rlogin; -#ifdef KLUDGELINEMODE -cc_t echoc; -#endif - -/* - * Telnet receiver states for fsm - */ -#define TS_DATA 0 -#define TS_IAC 1 -#define TS_WILL 2 -#define TS_WONT 3 -#define TS_DO 4 -#define TS_DONT 5 -#define TS_CR 6 -#define TS_SB 7 /* sub-option collection */ -#define TS_SE 8 /* looking for sub-option end */ - -static int telrcv_state; -#ifdef OLD_ENVIRON -unsigned char telopt_environ = TELOPT_NEW_ENVIRON; -#else -# define telopt_environ TELOPT_NEW_ENVIRON -#endif - -jmp_buf toplevel; -jmp_buf peerdied; - -int flushline; -int linemode; - -#ifdef KLUDGELINEMODE -int kludgelinemode = 1; -#endif - -/* - * The following are some clocks used to decide how to interpret - * the relationship between various variables. - */ - -Clocks clocks; - -static int is_unique(char *name, char **as, char **ae); - - -/* - * Initialize telnet environment. - */ - -void -init_telnet(void) -{ - env_init(); - - SB_CLEAR(); - memset(options, 0, sizeof options); - - connected = ISend = localflow = donebinarytoggle = 0; -#if defined(AUTHENTICATION) || defined(ENCRYPTION) - auth_encrypt_connect(connected); -#endif /* defined(AUTHENTICATION) || defined(ENCRYPTION) */ - restartany = -1; - - SYNCHing = 0; - - /* Don't change NetTrace */ - - escape = CONTROL(']'); - rlogin = _POSIX_VDISABLE; -#ifdef KLUDGELINEMODE - echoc = CONTROL('E'); -#endif - - flushline = 1; - telrcv_state = TS_DATA; -} - - -/* - * These routines are in charge of sending option negotiations - * to the other side. - * - * The basic idea is that we send the negotiation if either side - * is in disagreement as to what the current state should be. - */ - -void -send_do(int c, int init) -{ - if (init) { - if (((do_dont_resp[c] == 0) && my_state_is_do(c)) || - my_want_state_is_do(c)) - return; - set_my_want_state_do(c); - do_dont_resp[c]++; - } - NET2ADD(IAC, DO); - NETADD(c); - printoption("SENT", DO, c); -} - -void -send_dont(int c, int init) -{ - if (init) { - if (((do_dont_resp[c] == 0) && my_state_is_dont(c)) || - my_want_state_is_dont(c)) - return; - set_my_want_state_dont(c); - do_dont_resp[c]++; - } - NET2ADD(IAC, DONT); - NETADD(c); - printoption("SENT", DONT, c); -} - -void -send_will(int c, int init) -{ - if (init) { - if (((will_wont_resp[c] == 0) && my_state_is_will(c)) || - my_want_state_is_will(c)) - return; - set_my_want_state_will(c); - will_wont_resp[c]++; - } - NET2ADD(IAC, WILL); - NETADD(c); - printoption("SENT", WILL, c); -} - -void -send_wont(int c, int init) -{ - if (init) { - if (((will_wont_resp[c] == 0) && my_state_is_wont(c)) || - my_want_state_is_wont(c)) - return; - set_my_want_state_wont(c); - will_wont_resp[c]++; - } - NET2ADD(IAC, WONT); - NETADD(c); - printoption("SENT", WONT, c); -} - - -void -willoption(int option) -{ - int new_state_ok = 0; - - if (do_dont_resp[option]) { - --do_dont_resp[option]; - if (do_dont_resp[option] && my_state_is_do(option)) - --do_dont_resp[option]; - } - - if ((do_dont_resp[option] == 0) && my_want_state_is_dont(option)) { - - switch (option) { - - case TELOPT_ECHO: - case TELOPT_BINARY: - case TELOPT_SGA: - settimer(modenegotiated); - /* FALL THROUGH */ - case TELOPT_STATUS: -#if defined(AUTHENTICATION) - case TELOPT_AUTHENTICATION: -#endif -#if defined(ENCRYPTION) - case TELOPT_ENCRYPT: -#endif - new_state_ok = 1; - break; - - case TELOPT_TM: - if (flushout) - flushout = 0; - /* - * Special case for TM. If we get back a WILL, - * pretend we got back a WONT. - */ - set_my_want_state_dont(option); - set_my_state_dont(option); - return; /* Never reply to TM will's/wont's */ - - case TELOPT_LINEMODE: - default: - break; - } - - if (new_state_ok) { - set_my_want_state_do(option); - send_do(option, 0); - setconnmode(0); /* possibly set new tty mode */ - } else { - do_dont_resp[option]++; - send_dont(option, 0); - } - } - set_my_state_do(option); -#if defined(ENCRYPTION) - if (option == TELOPT_ENCRYPT) - encrypt_send_support(); -#endif -} - -void -wontoption(int option) -{ - if (do_dont_resp[option]) { - --do_dont_resp[option]; - if (do_dont_resp[option] && my_state_is_dont(option)) - --do_dont_resp[option]; - } - - if ((do_dont_resp[option] == 0) && my_want_state_is_do(option)) { - - switch (option) { - -#ifdef KLUDGELINEMODE - case TELOPT_SGA: - if (!kludgelinemode) - break; - /* FALL THROUGH */ -#endif - case TELOPT_ECHO: - settimer(modenegotiated); - break; - - case TELOPT_TM: - if (flushout) - flushout = 0; - set_my_want_state_dont(option); - set_my_state_dont(option); - return; /* Never reply to TM will's/wont's */ - -#ifdef ENCRYPTION - case TELOPT_ENCRYPT: - encrypt_not(); - break; -#endif - default: - break; - } - set_my_want_state_dont(option); - if (my_state_is_do(option)) - send_dont(option, 0); - setconnmode(0); /* Set new tty mode */ - } else if (option == TELOPT_TM) { - /* - * Special case for TM. - */ - if (flushout) - flushout = 0; - set_my_want_state_dont(option); - } - set_my_state_dont(option); -} - -static void -dooption(int option) -{ - int new_state_ok = 0; - - if (will_wont_resp[option]) { - --will_wont_resp[option]; - if (will_wont_resp[option] && my_state_is_will(option)) - --will_wont_resp[option]; - } - - if (will_wont_resp[option] == 0) { - if (my_want_state_is_wont(option)) { - - switch (option) { - - case TELOPT_TM: - /* - * Special case for TM. We send a WILL, but pretend - * we sent WONT. - */ - send_will(option, 0); - set_my_want_state_wont(TELOPT_TM); - set_my_state_wont(TELOPT_TM); - return; - - case TELOPT_BINARY: /* binary mode */ - case TELOPT_NAWS: /* window size */ - case TELOPT_TSPEED: /* terminal speed */ - case TELOPT_LFLOW: /* local flow control */ - case TELOPT_TTYPE: /* terminal type option */ - case TELOPT_SGA: /* no big deal */ -#if defined(ENCRYPTION) - case TELOPT_ENCRYPT: /* encryption variable option */ -#endif - new_state_ok = 1; - break; - - case TELOPT_NEW_ENVIRON: /* New environment variable option */ -#ifdef OLD_ENVIRON - if (my_state_is_will(TELOPT_OLD_ENVIRON)) - send_wont(TELOPT_OLD_ENVIRON, 1); /* turn off the old */ - goto env_common; - case TELOPT_OLD_ENVIRON: /* Old environment variable option */ - if (my_state_is_will(TELOPT_NEW_ENVIRON)) - break; /* Don't enable if new one is in use! */ - env_common: - telopt_environ = option; -#endif - new_state_ok = 1; - break; - -#if defined(AUTHENTICATION) - case TELOPT_AUTHENTICATION: - if (autologin) - new_state_ok = 1; - break; -#endif - - case TELOPT_XDISPLOC: /* X Display location */ - if (env_getvalue((unsigned char *)"DISPLAY")) - new_state_ok = 1; - break; - - case TELOPT_LINEMODE: -#ifdef KLUDGELINEMODE - kludgelinemode = 0; - send_do(TELOPT_SGA, 1); -#endif - set_my_want_state_will(TELOPT_LINEMODE); - send_will(option, 0); - set_my_state_will(TELOPT_LINEMODE); - slc_init(); - return; - - case TELOPT_ECHO: /* We're never going to echo... */ - default: - break; - } - - if (new_state_ok) { - set_my_want_state_will(option); - send_will(option, 0); - setconnmode(0); /* Set new tty mode */ - } else { - will_wont_resp[option]++; - send_wont(option, 0); - } - } else { - /* - * Handle options that need more things done after the - * other side has acknowledged the option. - */ - switch (option) { - case TELOPT_LINEMODE: -#ifdef KLUDGELINEMODE - kludgelinemode = 0; - send_do(TELOPT_SGA, 1); -#endif - set_my_state_will(option); - slc_init(); - send_do(TELOPT_SGA, 0); - return; - } - } - } - set_my_state_will(option); -} - -static void -dontoption(int option) -{ - - if (will_wont_resp[option]) { - --will_wont_resp[option]; - if (will_wont_resp[option] && my_state_is_wont(option)) - --will_wont_resp[option]; - } - - if ((will_wont_resp[option] == 0) && my_want_state_is_will(option)) { - switch (option) { - case TELOPT_LINEMODE: - linemode = 0; /* put us back to the default state */ - break; -#ifdef OLD_ENVIRON - case TELOPT_NEW_ENVIRON: - /* - * The new environ option wasn't recognized, try - * the old one. - */ - send_will(TELOPT_OLD_ENVIRON, 1); - telopt_environ = TELOPT_OLD_ENVIRON; - break; -#endif -#if 0 -#ifdef ENCRYPTION - case TELOPT_ENCRYPT: - encrypt_not(); - break; -#endif -#endif - } - /* we always accept a DONT */ - set_my_want_state_wont(option); - if (my_state_is_will(option)) - send_wont(option, 0); - setconnmode(0); /* Set new tty mode */ - } - set_my_state_wont(option); -} - -/* - * Given a buffer returned by tgetent(), this routine will turn - * the pipe separated list of names in the buffer into an array - * of pointers to null terminated names. We toss out any bad, - * duplicate, or verbose names (names with spaces). - */ - -static char *name_unknown = "UNKNOWN"; -static char *unknown[] = { 0, 0 }; - -static char ** -mklist(char *buf, char *name) -{ - int n; - char c, *cp, **argvp, *cp2, **argv, **avt; - - if (name) { - if ((int)strlen(name) > 40) { - name = 0; - unknown[0] = name_unknown; - } else { - unknown[0] = name; - strupr(name); - } - } else - unknown[0] = name_unknown; - /* - * Count up the number of names. - */ - for (n = 1, cp = buf; *cp && *cp != ':'; cp++) { - if (*cp == '|') - n++; - } - /* - * Allocate an array to put the name pointers into - */ - argv = (char **)malloc((n+3)*sizeof(char *)); - if (argv == 0) - return(unknown); - - /* - * Fill up the array of pointers to names. - */ - *argv = 0; - argvp = argv+1; - n = 0; - for (cp = cp2 = buf; (c = *cp); cp++) { - if (c == '|' || c == ':') { - *cp++ = '\0'; - /* - * Skip entries that have spaces or are over 40 - * characters long. If this is our environment - * name, then put it up front. Otherwise, as - * long as this is not a duplicate name (case - * insensitive) add it to the list. - */ - if (n || (cp - cp2 > 41)) - ; - else if (name && (strncasecmp(name, cp2, cp-cp2) == 0)) - *argv = cp2; - else if (is_unique(cp2, argv+1, argvp)) - *argvp++ = cp2; - if (c == ':') - break; - /* - * Skip multiple delimiters. Reset cp2 to - * the beginning of the next name. Reset n, - * the flag for names with spaces. - */ - while ((c = *cp) == '|') - cp++; - cp2 = cp; - n = 0; - } - /* - * Skip entries with spaces or non-ascii values. - * Convert lower case letters to upper case. - */ -#undef ISASCII -#define ISASCII(c) (!((c)&0x80)) - if ((c == ' ') || !ISASCII(c)) - n = 1; - else if (islower((unsigned char)c)) - *cp = toupper((unsigned char)c); - } - - /* - * Check for an old V6 2 character name. If the second - * name points to the beginning of the buffer, and is - * only 2 characters long, move it to the end of the array. - */ - if ((argv[1] == buf) && (strlen(argv[1]) == 2)) { - --argvp; - for (avt = &argv[1]; avt < argvp; avt++) - *avt = *(avt+1); - *argvp++ = buf; - } - - /* - * Duplicate last name, for TTYPE option, and null - * terminate the array. If we didn't find a match on - * our terminal name, put that name at the beginning. - */ - cp = *(argvp-1); - *argvp++ = cp; - *argvp = 0; - - if (*argv == 0) { - if (name) - *argv = name; - else { - --argvp; - for (avt = argv; avt < argvp; avt++) - *avt = *(avt+1); - } - } - if (*argv) - return(argv); - else - return(unknown); -} - -static int -is_unique(char *name, char **as, char **ae) -{ - char **ap; - int n; - - n = strlen(name) + 1; - for (ap = as; ap < ae; ap++) - if (strncasecmp(*ap, name, n) == 0) - return(0); - return (1); -} - -static char termbuf[1024]; - -static int -telnet_setupterm(const char *tname, int fd, int *errp) -{ -#ifdef HAVE_TGETENT - if (tgetent(termbuf, tname) == 1) { - termbuf[1023] = '\0'; - if (errp) - *errp = 1; - return(0); - } - if (errp) - *errp = 0; - return(-1); -#else - strlcpy(termbuf, tname, sizeof(termbuf)); - if(errp) *errp = 1; - return 0; -#endif -} - -int resettermname = 1; - -static char * -gettermname() -{ - char *tname; - static char **tnamep = 0; - static char **next; - int err; - - if (resettermname) { - resettermname = 0; - if (tnamep && tnamep != unknown) - free(tnamep); - if ((tname = (char *)env_getvalue((unsigned char *)"TERM")) && - telnet_setupterm(tname, 1, &err) == 0) { - tnamep = mklist(termbuf, tname); - } else { - if (tname && ((int)strlen(tname) <= 40)) { - unknown[0] = tname; - strupr(tname); - } else - unknown[0] = name_unknown; - tnamep = unknown; - } - next = tnamep; - } - if (*next == 0) - next = tnamep; - return(*next++); -} -/* - * suboption() - * - * Look at the sub-option buffer, and try to be helpful to the other - * side. - * - * Currently we recognize: - * - * Terminal type, send request. - * Terminal speed (send request). - * Local flow control (is request). - * Linemode - */ - -static void -suboption() -{ - unsigned char subchar; - - printsub('<', subbuffer, SB_LEN()+2); - switch (subchar = SB_GET()) { - case TELOPT_TTYPE: - if (my_want_state_is_wont(TELOPT_TTYPE)) - return; - if (SB_EOF() || SB_GET() != TELQUAL_SEND) { - return; - } else { - char *name; - unsigned char temp[50]; - int len; - - name = gettermname(); - len = strlen(name) + 4 + 2; - if (len < NETROOM()) { - snprintf((char *)temp, sizeof(temp), - "%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE, - TELQUAL_IS, name, IAC, SE); - ring_supply_data(&netoring, temp, len); - printsub('>', &temp[2], len-2); - } else { - ExitString("No room in buffer for terminal type.\n", 1); - /*NOTREACHED*/ - } - } - break; - case TELOPT_TSPEED: - if (my_want_state_is_wont(TELOPT_TSPEED)) - return; - if (SB_EOF()) - return; - if (SB_GET() == TELQUAL_SEND) { - long output_speed, input_speed; - unsigned char temp[50]; - int len; - - TerminalSpeeds(&input_speed, &output_speed); - - snprintf((char *)temp, sizeof(temp), - "%c%c%c%c%u,%u%c%c", IAC, SB, TELOPT_TSPEED, - TELQUAL_IS, - (unsigned)output_speed, - (unsigned)input_speed, IAC, SE); - len = strlen((char *)temp+4) + 4; /* temp[3] is 0 ... */ - - if (len < NETROOM()) { - ring_supply_data(&netoring, temp, len); - printsub('>', temp+2, len - 2); - } -/*@*/ else printf("lm_will: not enough room in buffer\n"); - } - break; - case TELOPT_LFLOW: - if (my_want_state_is_wont(TELOPT_LFLOW)) - return; - if (SB_EOF()) - return; - switch(SB_GET()) { - case LFLOW_RESTART_ANY: - restartany = 1; - break; - case LFLOW_RESTART_XON: - restartany = 0; - break; - case LFLOW_ON: - localflow = 1; - break; - case LFLOW_OFF: - localflow = 0; - break; - default: - return; - } - setcommandmode(); - setconnmode(0); - break; - - case TELOPT_LINEMODE: - if (my_want_state_is_wont(TELOPT_LINEMODE)) - return; - if (SB_EOF()) - return; - switch (SB_GET()) { - case WILL: - lm_will(subpointer, SB_LEN()); - break; - case WONT: - lm_wont(subpointer, SB_LEN()); - break; - case DO: - lm_do(subpointer, SB_LEN()); - break; - case DONT: - lm_dont(subpointer, SB_LEN()); - break; - case LM_SLC: - slc(subpointer, SB_LEN()); - break; - case LM_MODE: - lm_mode(subpointer, SB_LEN(), 0); - break; - default: - break; - } - break; - -#ifdef OLD_ENVIRON - case TELOPT_OLD_ENVIRON: -#endif - case TELOPT_NEW_ENVIRON: - if (SB_EOF()) - return; - switch(SB_PEEK()) { - case TELQUAL_IS: - case TELQUAL_INFO: - if (my_want_state_is_dont(subchar)) - return; - break; - case TELQUAL_SEND: - if (my_want_state_is_wont(subchar)) { - return; - } - break; - default: - return; - } - env_opt(subpointer, SB_LEN()); - break; - - case TELOPT_XDISPLOC: - if (my_want_state_is_wont(TELOPT_XDISPLOC)) - return; - if (SB_EOF()) - return; - if (SB_GET() == TELQUAL_SEND) { - unsigned char temp[50], *dp; - int len; - - if ((dp = env_getvalue((unsigned char *)"DISPLAY")) == NULL) { - /* - * Something happened, we no longer have a DISPLAY - * variable. So, turn off the option. - */ - send_wont(TELOPT_XDISPLOC, 1); - break; - } - snprintf((char *)temp, sizeof(temp), - "%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC, - TELQUAL_IS, dp, IAC, SE); - len = strlen((char *)temp+4) + 4; /* temp[3] is 0 ... */ - - if (len < NETROOM()) { - ring_supply_data(&netoring, temp, len); - printsub('>', temp+2, len - 2); - } -/*@*/ else printf("lm_will: not enough room in buffer\n"); - } - break; - -#if defined(AUTHENTICATION) - case TELOPT_AUTHENTICATION: { - if (!autologin) - break; - if (SB_EOF()) - return; - switch(SB_GET()) { - case TELQUAL_IS: - if (my_want_state_is_dont(TELOPT_AUTHENTICATION)) - return; - auth_is(subpointer, SB_LEN()); - break; - case TELQUAL_SEND: - if (my_want_state_is_wont(TELOPT_AUTHENTICATION)) - return; - auth_send(subpointer, SB_LEN()); - break; - case TELQUAL_REPLY: - if (my_want_state_is_wont(TELOPT_AUTHENTICATION)) - return; - auth_reply(subpointer, SB_LEN()); - break; - case TELQUAL_NAME: - if (my_want_state_is_dont(TELOPT_AUTHENTICATION)) - return; - auth_name(subpointer, SB_LEN()); - break; - } - } - break; -#endif -#if defined(ENCRYPTION) - case TELOPT_ENCRYPT: - if (SB_EOF()) - return; - switch(SB_GET()) { - case ENCRYPT_START: - if (my_want_state_is_dont(TELOPT_ENCRYPT)) - return; - encrypt_start(subpointer, SB_LEN()); - break; - case ENCRYPT_END: - if (my_want_state_is_dont(TELOPT_ENCRYPT)) - return; - encrypt_end(); - break; - case ENCRYPT_SUPPORT: - if (my_want_state_is_wont(TELOPT_ENCRYPT)) - return; - encrypt_support(subpointer, SB_LEN()); - break; - case ENCRYPT_REQSTART: - if (my_want_state_is_wont(TELOPT_ENCRYPT)) - return; - encrypt_request_start(subpointer, SB_LEN()); - break; - case ENCRYPT_REQEND: - if (my_want_state_is_wont(TELOPT_ENCRYPT)) - return; - /* - * We can always send an REQEND so that we cannot - * get stuck encrypting. We should only get this - * if we have been able to get in the correct mode - * anyhow. - */ - encrypt_request_end(); - break; - case ENCRYPT_IS: - if (my_want_state_is_dont(TELOPT_ENCRYPT)) - return; - encrypt_is(subpointer, SB_LEN()); - break; - case ENCRYPT_REPLY: - if (my_want_state_is_wont(TELOPT_ENCRYPT)) - return; - encrypt_reply(subpointer, SB_LEN()); - break; - case ENCRYPT_ENC_KEYID: - if (my_want_state_is_dont(TELOPT_ENCRYPT)) - return; - encrypt_enc_keyid(subpointer, SB_LEN()); - break; - case ENCRYPT_DEC_KEYID: - if (my_want_state_is_wont(TELOPT_ENCRYPT)) - return; - encrypt_dec_keyid(subpointer, SB_LEN()); - break; - default: - break; - } - break; -#endif - default: - break; - } -} - -static unsigned char str_lm[] = { IAC, SB, TELOPT_LINEMODE, 0, 0, IAC, SE }; - -void -lm_will(unsigned char *cmd, int len) -{ - if (len < 1) { -/*@*/ printf("lm_will: no command!!!\n"); /* Should not happen... */ - return; - } - switch(cmd[0]) { - case LM_FORWARDMASK: /* We shouldn't ever get this... */ - default: - str_lm[3] = DONT; - str_lm[4] = cmd[0]; - if (NETROOM() > sizeof(str_lm)) { - ring_supply_data(&netoring, str_lm, sizeof(str_lm)); - printsub('>', &str_lm[2], sizeof(str_lm)-2); - } -/*@*/ else printf("lm_will: not enough room in buffer\n"); - break; - } -} - -void -lm_wont(unsigned char *cmd, int len) -{ - if (len < 1) { -/*@*/ printf("lm_wont: no command!!!\n"); /* Should not happen... */ - return; - } - switch(cmd[0]) { - case LM_FORWARDMASK: /* We shouldn't ever get this... */ - default: - /* We are always DONT, so don't respond */ - return; - } -} - -void -lm_do(unsigned char *cmd, int len) -{ - if (len < 1) { -/*@*/ printf("lm_do: no command!!!\n"); /* Should not happen... */ - return; - } - switch(cmd[0]) { - case LM_FORWARDMASK: - default: - str_lm[3] = WONT; - str_lm[4] = cmd[0]; - if (NETROOM() > sizeof(str_lm)) { - ring_supply_data(&netoring, str_lm, sizeof(str_lm)); - printsub('>', &str_lm[2], sizeof(str_lm)-2); - } -/*@*/ else printf("lm_do: not enough room in buffer\n"); - break; - } -} - -void -lm_dont(unsigned char *cmd, int len) -{ - if (len < 1) { -/*@*/ printf("lm_dont: no command!!!\n"); /* Should not happen... */ - return; - } - switch(cmd[0]) { - case LM_FORWARDMASK: - default: - /* we are always WONT, so don't respond */ - break; - } -} - -static unsigned char str_lm_mode[] = { - IAC, SB, TELOPT_LINEMODE, LM_MODE, 0, IAC, SE -}; - -void -lm_mode(unsigned char *cmd, int len, int init) -{ - if (len != 1) - return; - if ((linemode&MODE_MASK&~MODE_ACK) == *cmd) - return; - if (*cmd&MODE_ACK) - return; - linemode = *cmd&(MODE_MASK&~MODE_ACK); - str_lm_mode[4] = linemode; - if (!init) - str_lm_mode[4] |= MODE_ACK; - if (NETROOM() > sizeof(str_lm_mode)) { - ring_supply_data(&netoring, str_lm_mode, sizeof(str_lm_mode)); - printsub('>', &str_lm_mode[2], sizeof(str_lm_mode)-2); - } -/*@*/ else printf("lm_mode: not enough room in buffer\n"); - setconnmode(0); /* set changed mode */ -} - - - -/* - * slc() - * Handle special character suboption of LINEMODE. - */ - -struct spc { - cc_t val; - cc_t *valp; - char flags; /* Current flags & level */ - char mylevel; /* Maximum level & flags */ -} spc_data[NSLC+1]; - -#define SLC_IMPORT 0 -#define SLC_EXPORT 1 -#define SLC_RVALUE 2 -static int slc_mode = SLC_EXPORT; - -void -slc_init() -{ - struct spc *spcp; - - localchars = 1; - for (spcp = spc_data; spcp < &spc_data[NSLC+1]; spcp++) { - spcp->val = 0; - spcp->valp = 0; - spcp->flags = spcp->mylevel = SLC_NOSUPPORT; - } - -#define initfunc(func, flags) { \ - spcp = &spc_data[func]; \ - if ((spcp->valp = tcval(func))) { \ - spcp->val = *spcp->valp; \ - spcp->mylevel = SLC_VARIABLE|flags; \ - } else { \ - spcp->val = 0; \ - spcp->mylevel = SLC_DEFAULT; \ - } \ - } - - initfunc(SLC_SYNCH, 0); - /* No BRK */ - initfunc(SLC_AO, 0); - initfunc(SLC_AYT, 0); - /* No EOR */ - initfunc(SLC_ABORT, SLC_FLUSHIN|SLC_FLUSHOUT); - initfunc(SLC_EOF, 0); - initfunc(SLC_SUSP, SLC_FLUSHIN); - initfunc(SLC_EC, 0); - initfunc(SLC_EL, 0); - initfunc(SLC_EW, 0); - initfunc(SLC_RP, 0); - initfunc(SLC_LNEXT, 0); - initfunc(SLC_XON, 0); - initfunc(SLC_XOFF, 0); - initfunc(SLC_FORW1, 0); - initfunc(SLC_FORW2, 0); - /* No FORW2 */ - - initfunc(SLC_IP, SLC_FLUSHIN|SLC_FLUSHOUT); -#undef initfunc - - if (slc_mode == SLC_EXPORT) - slc_export(); - else - slc_import(1); - -} - -void -slcstate() -{ - printf("Special characters are %s values\n", - slc_mode == SLC_IMPORT ? "remote default" : - slc_mode == SLC_EXPORT ? "local" : - "remote"); -} - -void -slc_mode_export() -{ - slc_mode = SLC_EXPORT; - if (my_state_is_will(TELOPT_LINEMODE)) - slc_export(); -} - -void -slc_mode_import(int def) -{ - slc_mode = def ? SLC_IMPORT : SLC_RVALUE; - if (my_state_is_will(TELOPT_LINEMODE)) - slc_import(def); -} - -unsigned char slc_import_val[] = { - IAC, SB, TELOPT_LINEMODE, LM_SLC, 0, SLC_VARIABLE, 0, IAC, SE -}; -unsigned char slc_import_def[] = { - IAC, SB, TELOPT_LINEMODE, LM_SLC, 0, SLC_DEFAULT, 0, IAC, SE -}; - -void -slc_import(int def) -{ - if (NETROOM() > sizeof(slc_import_val)) { - if (def) { - ring_supply_data(&netoring, slc_import_def, sizeof(slc_import_def)); - printsub('>', &slc_import_def[2], sizeof(slc_import_def)-2); - } else { - ring_supply_data(&netoring, slc_import_val, sizeof(slc_import_val)); - printsub('>', &slc_import_val[2], sizeof(slc_import_val)-2); - } - } -/*@*/ else printf("slc_import: not enough room\n"); -} - -void -slc_export() -{ - struct spc *spcp; - - TerminalDefaultChars(); - - slc_start_reply(); - for (spcp = &spc_data[1]; spcp < &spc_data[NSLC+1]; spcp++) { - if (spcp->mylevel != SLC_NOSUPPORT) { - if (spcp->val == (cc_t)(_POSIX_VDISABLE)) - spcp->flags = SLC_NOSUPPORT; - else - spcp->flags = spcp->mylevel; - if (spcp->valp) - spcp->val = *spcp->valp; - slc_add_reply(spcp - spc_data, spcp->flags, spcp->val); - } - } - slc_end_reply(); - slc_update(); - setconnmode(1); /* Make sure the character values are set */ -} - -void -slc(unsigned char *cp, int len) -{ - struct spc *spcp; - int func,level; - - slc_start_reply(); - - for (; len >= 3; len -=3, cp +=3) { - - func = cp[SLC_FUNC]; - - if (func == 0) { - /* - * Client side: always ignore 0 function. - */ - continue; - } - if (func > NSLC) { - if ((cp[SLC_FLAGS] & SLC_LEVELBITS) != SLC_NOSUPPORT) - slc_add_reply(func, SLC_NOSUPPORT, 0); - continue; - } - - spcp = &spc_data[func]; - - level = cp[SLC_FLAGS]&(SLC_LEVELBITS|SLC_ACK); - - if ((cp[SLC_VALUE] == (unsigned char)spcp->val) && - ((level&SLC_LEVELBITS) == (spcp->flags&SLC_LEVELBITS))) { - continue; - } - - if (level == (SLC_DEFAULT|SLC_ACK)) { - /* - * This is an error condition, the SLC_ACK - * bit should never be set for the SLC_DEFAULT - * level. Our best guess to recover is to - * ignore the SLC_ACK bit. - */ - cp[SLC_FLAGS] &= ~SLC_ACK; - } - - if (level == ((spcp->flags&SLC_LEVELBITS)|SLC_ACK)) { - spcp->val = (cc_t)cp[SLC_VALUE]; - spcp->flags = cp[SLC_FLAGS]; /* include SLC_ACK */ - continue; - } - - level &= ~SLC_ACK; - - if (level <= (spcp->mylevel&SLC_LEVELBITS)) { - spcp->flags = cp[SLC_FLAGS]|SLC_ACK; - spcp->val = (cc_t)cp[SLC_VALUE]; - } - if (level == SLC_DEFAULT) { - if ((spcp->mylevel&SLC_LEVELBITS) != SLC_DEFAULT) - spcp->flags = spcp->mylevel; - else - spcp->flags = SLC_NOSUPPORT; - } - slc_add_reply(func, spcp->flags, spcp->val); - } - slc_end_reply(); - if (slc_update()) - setconnmode(1); /* set the new character values */ -} - -void -slc_check() -{ - struct spc *spcp; - - slc_start_reply(); - for (spcp = &spc_data[1]; spcp < &spc_data[NSLC+1]; spcp++) { - if (spcp->valp && spcp->val != *spcp->valp) { - spcp->val = *spcp->valp; - if (spcp->val == (cc_t)(_POSIX_VDISABLE)) - spcp->flags = SLC_NOSUPPORT; - else - spcp->flags = spcp->mylevel; - slc_add_reply(spcp - spc_data, spcp->flags, spcp->val); - } - } - slc_end_reply(); - setconnmode(1); -} - - -unsigned char slc_reply[128]; -unsigned char const * const slc_reply_eom = &slc_reply[sizeof(slc_reply)]; -unsigned char *slc_replyp; - -void -slc_start_reply() -{ - slc_replyp = slc_reply; - *slc_replyp++ = IAC; - *slc_replyp++ = SB; - *slc_replyp++ = TELOPT_LINEMODE; - *slc_replyp++ = LM_SLC; -} - -void -slc_add_reply(unsigned char func, unsigned char flags, cc_t value) -{ - /* A sequence of up to 6 bytes my be written for this member of the SLC - * suboption list by this function. The end of negotiation command, - * which is written by slc_end_reply(), will require 2 additional - * bytes. Do not proceed unless there is sufficient space for these - * items. - */ - if (&slc_replyp[6+2] > slc_reply_eom) - return; - if ((*slc_replyp++ = func) == IAC) - *slc_replyp++ = IAC; - if ((*slc_replyp++ = flags) == IAC) - *slc_replyp++ = IAC; - if ((*slc_replyp++ = (unsigned char)value) == IAC) - *slc_replyp++ = IAC; -} - -void -slc_end_reply() -{ - int len; - - /* The end of negotiation command requires 2 bytes. */ - if (&slc_replyp[2] > slc_reply_eom) - return; - *slc_replyp++ = IAC; - *slc_replyp++ = SE; - len = slc_replyp - slc_reply; - if (len <= 6) - return; - if (NETROOM() > len) { - ring_supply_data(&netoring, slc_reply, slc_replyp - slc_reply); - printsub('>', &slc_reply[2], slc_replyp - slc_reply - 2); - } -/*@*/else printf("slc_end_reply: not enough room\n"); -} - -int -slc_update() -{ - struct spc *spcp; - int need_update = 0; - - for (spcp = &spc_data[1]; spcp < &spc_data[NSLC+1]; spcp++) { - if (!(spcp->flags&SLC_ACK)) - continue; - spcp->flags &= ~SLC_ACK; - if (spcp->valp && (*spcp->valp != spcp->val)) { - *spcp->valp = spcp->val; - need_update = 1; - } - } - return(need_update); -} - -#ifdef OLD_ENVIRON -# define old_env_var OLD_ENV_VAR -# define old_env_value OLD_ENV_VALUE -#endif - -void -env_opt(unsigned char *buf, int len) -{ - unsigned char *ep = 0, *epc = 0; - int i; - - switch(buf[0]&0xff) { - case TELQUAL_SEND: - env_opt_start(); - if (len == 1) { - env_opt_add(NULL); - } else for (i = 1; i < len; i++) { - switch (buf[i]&0xff) { -#ifdef OLD_ENVIRON - case OLD_ENV_VAR: - case OLD_ENV_VALUE: - /* - * Although OLD_ENV_VALUE is not legal, we will - * still recognize it, just in case it is an - * old server that has VAR & VALUE mixed up... - */ - /* FALL THROUGH */ -#else - case NEW_ENV_VAR: -#endif - case ENV_USERVAR: - if (ep) { - *epc = 0; - env_opt_add(ep); - } - ep = epc = &buf[i+1]; - break; - case ENV_ESC: - i++; - /*FALL THROUGH*/ - default: - if (epc) - *epc++ = buf[i]; - break; - } - } - if (ep) { - *epc = 0; - env_opt_add(ep); - } - env_opt_end(1); - break; - - case TELQUAL_IS: - case TELQUAL_INFO: - /* Ignore for now. We shouldn't get it anyway. */ - break; - - default: - break; - } -} - -#define OPT_REPLY_SIZE (2 * SUBBUFSIZE) -unsigned char *opt_reply; -unsigned char *opt_replyp; -unsigned char *opt_replyend; - -void -env_opt_start() -{ - if (opt_reply) { - void *tmp = realloc (opt_reply, OPT_REPLY_SIZE); - if (tmp != NULL) { - opt_reply = tmp; - } else { - free (opt_reply); - opt_reply = NULL; - } - } else - opt_reply = (unsigned char *)malloc(OPT_REPLY_SIZE); - if (opt_reply == NULL) { -/*@*/ printf("env_opt_start: malloc()/realloc() failed!!!\n"); - opt_reply = opt_replyp = opt_replyend = NULL; - return; - } - opt_replyp = opt_reply; - opt_replyend = opt_reply + OPT_REPLY_SIZE; - *opt_replyp++ = IAC; - *opt_replyp++ = SB; - *opt_replyp++ = telopt_environ; - *opt_replyp++ = TELQUAL_IS; -} - -void -env_opt_start_info() -{ - env_opt_start(); - if (opt_replyp) - opt_replyp[-1] = TELQUAL_INFO; -} - -void -env_opt_add(unsigned char *ep) -{ - unsigned char *vp, c; - - if (opt_reply == NULL) /*XXX*/ - return; /*XXX*/ - - if (ep == NULL || *ep == '\0') { - /* Send user defined variables first. */ - env_default(1, 0); - while ((ep = env_default(0, 0))) - env_opt_add(ep); - - /* Now add the list of well know variables. */ - env_default(1, 1); - while ((ep = env_default(0, 1))) - env_opt_add(ep); - return; - } - vp = env_getvalue(ep); - if (opt_replyp + (vp ? 2 * strlen((char *)vp) : 0) + - 2 * strlen((char *)ep) + 6 > opt_replyend) - { - int len; - void *tmp; - opt_replyend += OPT_REPLY_SIZE; - len = opt_replyend - opt_reply; - tmp = realloc(opt_reply, len); - if (tmp == NULL) { -/*@*/ printf("env_opt_add: realloc() failed!!!\n"); - opt_reply = opt_replyp = opt_replyend = NULL; - return; - } - opt_reply = tmp; - opt_replyp = opt_reply + len - (opt_replyend - opt_replyp); - opt_replyend = opt_reply + len; - } - if (opt_welldefined((char *)ep)) { -#ifdef OLD_ENVIRON - if (telopt_environ == TELOPT_OLD_ENVIRON) - *opt_replyp++ = old_env_var; - else -#endif - *opt_replyp++ = NEW_ENV_VAR; - } else - *opt_replyp++ = ENV_USERVAR; - for (;;) { - while ((c = *ep++)) { - if (opt_replyp + (2 + 2) > opt_replyend) - return; - switch(c&0xff) { - case IAC: - *opt_replyp++ = IAC; - break; - case NEW_ENV_VAR: - case NEW_ENV_VALUE: - case ENV_ESC: - case ENV_USERVAR: - *opt_replyp++ = ENV_ESC; - break; - } - *opt_replyp++ = c; - } - if ((ep = vp)) { - if (opt_replyp + (1 + 2 + 2) > opt_replyend) - return; -#ifdef OLD_ENVIRON - if (telopt_environ == TELOPT_OLD_ENVIRON) - *opt_replyp++ = old_env_value; - else -#endif - *opt_replyp++ = NEW_ENV_VALUE; - vp = NULL; - } else - break; - } -} - -int -opt_welldefined(char *ep) -{ - if ((strcmp(ep, "USER") == 0) || - (strcmp(ep, "DISPLAY") == 0) || - (strcmp(ep, "PRINTER") == 0) || - (strcmp(ep, "SYSTEMTYPE") == 0) || - (strcmp(ep, "JOB") == 0) || - (strcmp(ep, "ACCT") == 0)) - return(1); - return(0); -} - -void -env_opt_end(int emptyok) -{ - int len; - - if (opt_replyp + 2 > opt_replyend) - return; - len = opt_replyp + 2 - opt_reply; - if (emptyok || len > 6) { - *opt_replyp++ = IAC; - *opt_replyp++ = SE; - if (NETROOM() > len) { - ring_supply_data(&netoring, opt_reply, len); - printsub('>', &opt_reply[2], len - 2); - } -/*@*/ else printf("slc_end_reply: not enough room\n"); - } - if (opt_reply) { - free(opt_reply); - opt_reply = opt_replyp = opt_replyend = NULL; - } -} - - - -int -telrcv(void) -{ - int c; - int scc; - unsigned char *sbp = NULL; - int count; - int returnValue = 0; - - scc = 0; - count = 0; - while (TTYROOM() > 2) { - if (scc == 0) { - if (count) { - ring_consumed(&netiring, count); - returnValue = 1; - count = 0; - } - sbp = netiring.consume; - scc = ring_full_consecutive(&netiring); - if (scc == 0) { - /* No more data coming in */ - break; - } - } - - c = *sbp++ & 0xff, scc--; count++; -#if defined(ENCRYPTION) - if (decrypt_input) - c = (*decrypt_input)(c); -#endif - - switch (telrcv_state) { - - case TS_CR: - telrcv_state = TS_DATA; - if (c == '\0') { - break; /* Ignore \0 after CR */ - } - else if ((c == '\n') && my_want_state_is_dont(TELOPT_ECHO) && !crmod) { - TTYADD(c); - break; - } - /* Else, fall through */ - - case TS_DATA: - if (c == IAC) { - telrcv_state = TS_IAC; - break; - } - /* - * The 'crmod' hack (see following) is needed - * since we can't set CRMOD on output only. - * Machines like MULTICS like to send \r without - * \n; since we must turn off CRMOD to get proper - * input, the mapping is done here (sigh). - */ - if ((c == '\r') && my_want_state_is_dont(TELOPT_BINARY)) { - if (scc > 0) { - c = *sbp&0xff; -#if defined(ENCRYPTION) - if (decrypt_input) - c = (*decrypt_input)(c); -#endif - if (c == 0) { - sbp++, scc--; count++; - /* a "true" CR */ - TTYADD('\r'); - } else if (my_want_state_is_dont(TELOPT_ECHO) && - (c == '\n')) { - sbp++, scc--; count++; - TTYADD('\n'); - } else { -#if defined(ENCRYPTION) - if (decrypt_input) - (*decrypt_input)(-1); -#endif - - TTYADD('\r'); - if (crmod) { - TTYADD('\n'); - } - } - } else { - telrcv_state = TS_CR; - TTYADD('\r'); - if (crmod) { - TTYADD('\n'); - } - } - } else { - TTYADD(c); - } - continue; - - case TS_IAC: -process_iac: - switch (c) { - - case WILL: - telrcv_state = TS_WILL; - continue; - - case WONT: - telrcv_state = TS_WONT; - continue; - - case DO: - telrcv_state = TS_DO; - continue; - - case DONT: - telrcv_state = TS_DONT; - continue; - - case DM: - /* - * We may have missed an urgent notification, - * so make sure we flush whatever is in the - * buffer currently. - */ - printoption("RCVD", IAC, DM); - SYNCHing = 1; - ttyflush(1); - SYNCHing = stilloob(); - settimer(gotDM); - break; - - case SB: - SB_CLEAR(); - telrcv_state = TS_SB; - continue; - - - case IAC: - TTYADD(IAC); - break; - - case NOP: - case GA: - default: - printoption("RCVD", IAC, c); - break; - } - telrcv_state = TS_DATA; - continue; - - case TS_WILL: - printoption("RCVD", WILL, c); - willoption(c); - telrcv_state = TS_DATA; - continue; - - case TS_WONT: - printoption("RCVD", WONT, c); - wontoption(c); - telrcv_state = TS_DATA; - continue; - - case TS_DO: - printoption("RCVD", DO, c); - dooption(c); - if (c == TELOPT_NAWS) { - sendnaws(); - } else if (c == TELOPT_LFLOW) { - localflow = 1; - setcommandmode(); - setconnmode(0); - } - telrcv_state = TS_DATA; - continue; - - case TS_DONT: - printoption("RCVD", DONT, c); - dontoption(c); - flushline = 1; - setconnmode(0); /* set new tty mode (maybe) */ - telrcv_state = TS_DATA; - continue; - - case TS_SB: - if (c == IAC) { - telrcv_state = TS_SE; - } else { - SB_ACCUM(c); - } - continue; - - case TS_SE: - if (c != SE) { - if (c != IAC) { - /* - * This is an error. We only expect to get - * "IAC IAC" or "IAC SE". Several things may - * have happened. An IAC was not doubled, the - * IAC SE was left off, or another option got - * inserted into the suboption are all possibilities. - * If we assume that the IAC was not doubled, - * and really the IAC SE was left off, we could - * get into an infinite loop here. So, instead, - * we terminate the suboption, and process the - * partial suboption if we can. - */ - SB_ACCUM(IAC); - SB_ACCUM(c); - subpointer -= 2; - SB_TERM(); - - printoption("In SUBOPTION processing, RCVD", IAC, c); - suboption(); /* handle sub-option */ - telrcv_state = TS_IAC; - goto process_iac; - } - SB_ACCUM(c); - telrcv_state = TS_SB; - } else { - SB_ACCUM(IAC); - SB_ACCUM(SE); - subpointer -= 2; - SB_TERM(); - suboption(); /* handle sub-option */ - telrcv_state = TS_DATA; - } - } - } - if (count) - ring_consumed(&netiring, count); - return returnValue||count; -} - -static int bol = 1, local = 0; - -int -rlogin_susp(void) -{ - if (local) { - local = 0; - bol = 1; - command(0, "z\n", 2); - return(1); - } - return(0); -} - -static int -telsnd() -{ - int tcc; - int count; - int returnValue = 0; - unsigned char *tbp = NULL; - - tcc = 0; - count = 0; - while (NETROOM() > 2) { - int sc; - int c; - - if (tcc == 0) { - if (count) { - ring_consumed(&ttyiring, count); - returnValue = 1; - count = 0; - } - tbp = ttyiring.consume; - tcc = ring_full_consecutive(&ttyiring); - if (tcc == 0) { - break; - } - } - c = *tbp++ & 0xff, sc = strip(c), tcc--; count++; - if (rlogin != _POSIX_VDISABLE) { - if (bol) { - bol = 0; - if (sc == rlogin) { - local = 1; - continue; - } - } else if (local) { - local = 0; - if (sc == '.' || c == termEofChar) { - bol = 1; - command(0, "close\n", 6); - continue; - } - if (sc == termSuspChar) { - bol = 1; - command(0, "z\n", 2); - continue; - } - if (sc == escape) { - command(0, (char *)tbp, tcc); - bol = 1; - count += tcc; - tcc = 0; - flushline = 1; - break; - } - if (sc != rlogin) { - ++tcc; - --tbp; - --count; - c = sc = rlogin; - } - } - if ((sc == '\n') || (sc == '\r')) - bol = 1; - } else if (sc == escape) { - /* - * Double escape is a pass through of a single escape character. - */ - if (tcc && strip(*tbp) == escape) { - tbp++; - tcc--; - count++; - bol = 0; - } else { - command(0, (char *)tbp, tcc); - bol = 1; - count += tcc; - tcc = 0; - flushline = 1; - break; - } - } else - bol = 0; -#ifdef KLUDGELINEMODE - if (kludgelinemode && (globalmode&MODE_EDIT) && (sc == echoc)) { - if (tcc > 0 && strip(*tbp) == echoc) { - tcc--; tbp++; count++; - } else { - dontlecho = !dontlecho; - settimer(echotoggle); - setconnmode(0); - flushline = 1; - break; - } - } -#endif - if (MODE_LOCAL_CHARS(globalmode)) { - if (TerminalSpecialChars(sc) == 0) { - bol = 1; - break; - } - } - if (my_want_state_is_wont(TELOPT_BINARY)) { - switch (c) { - case '\n': - /* - * If we are in CRMOD mode (\r ==> \n) - * on our local machine, then probably - * a newline (unix) is CRLF (TELNET). - */ - if (MODE_LOCAL_CHARS(globalmode)) { - NETADD('\r'); - } - NETADD('\n'); - bol = flushline = 1; - break; - case '\r': - if (!crlf) { - NET2ADD('\r', '\0'); - } else { - NET2ADD('\r', '\n'); - } - bol = flushline = 1; - break; - case IAC: - NET2ADD(IAC, IAC); - break; - default: - NETADD(c); - break; - } - } else if (c == IAC) { - NET2ADD(IAC, IAC); - } else { - NETADD(c); - } - } - if (count) - ring_consumed(&ttyiring, count); - return returnValue||count; /* Non-zero if we did anything */ -} - -/* - * Scheduler() - * - * Try to do something. - * - * If we do something useful, return 1; else return 0. - * - */ - - - int -Scheduler(int block) /* should we block in the select ? */ -{ - /* One wants to be a bit careful about setting returnValue - * to one, since a one implies we did some useful work, - * and therefore probably won't be called to block next - * time (TN3270 mode only). - */ - int returnValue; - int netin, netout, netex, ttyin, ttyout; - - /* Decide which rings should be processed */ - - netout = ring_full_count(&netoring) && - (flushline || - (my_want_state_is_wont(TELOPT_LINEMODE) -#ifdef KLUDGELINEMODE - && (!kludgelinemode || my_want_state_is_do(TELOPT_SGA)) -#endif - ) || - my_want_state_is_will(TELOPT_BINARY)); - ttyout = ring_full_count(&ttyoring); - - ttyin = ring_empty_count(&ttyiring); - - netin = !ISend && ring_empty_count(&netiring); - - netex = !SYNCHing; - - /* If we have seen a signal recently, reset things */ - - if (scheduler_lockout_tty) { - ttyin = ttyout = 0; - } - - /* Call to system code to process rings */ - - returnValue = process_rings(netin, netout, netex, ttyin, ttyout, !block); - - /* Now, look at the input rings, looking for work to do. */ - - if (ring_full_count(&ttyiring)) { - returnValue |= telsnd(); - } - - if (ring_full_count(&netiring)) { - returnValue |= telrcv(); - } - return returnValue; -} - -extern int auth_has_failed; /* XXX should be somewhere else */ - -/* - * Select from tty and network... - */ -void -my_telnet(char *user) -{ - int printed_encrypt = 0; - - sys_telnet_init(); - -#if defined(AUTHENTICATION) || defined(ENCRYPTION) - { - static char local_host[256] = { 0 }; - - if (!local_host[0]) { - /* XXX - should be k_gethostname? */ - gethostname(local_host, sizeof(local_host)); - local_host[sizeof(local_host)-1] = 0; - } - auth_encrypt_init(local_host, hostname, "TELNET", 0); - auth_encrypt_user(user); - } -#endif - if (telnetport) { -#if defined(AUTHENTICATION) - if (autologin) - send_will(TELOPT_AUTHENTICATION, 1); -#endif -#if defined(ENCRYPTION) - send_do(TELOPT_ENCRYPT, 1); - send_will(TELOPT_ENCRYPT, 1); -#endif - send_do(TELOPT_SGA, 1); - send_will(TELOPT_TTYPE, 1); - send_will(TELOPT_NAWS, 1); - send_will(TELOPT_TSPEED, 1); - send_will(TELOPT_LFLOW, 1); - send_will(TELOPT_LINEMODE, 1); - send_will(TELOPT_NEW_ENVIRON, 1); - send_do(TELOPT_STATUS, 1); - if (env_getvalue((unsigned char *)"DISPLAY")) - send_will(TELOPT_XDISPLOC, 1); - if (binary) - tel_enter_binary(binary); - } - -#ifdef ENCRYPTION - /* - * Note: we assume a tie to the authentication option here. This - * is necessary so that authentication fails, we don't spin - * forever. - */ - if (telnetport && wantencryption) { - time_t timeout = time(0) + 60; - - send_do(TELOPT_ENCRYPT, 1); - send_will(TELOPT_ENCRYPT, 1); - while (1) { - if (my_want_state_is_wont(TELOPT_AUTHENTICATION)) { - if (wantencryption == -1) { - break; - } else { - printf("\nServer refused to negotiate authentication,\n"); - printf("which is required for encryption.\n"); - Exit(1); - } - } - if (auth_has_failed) { - printf("\nAuthentication negotiation has failed,\n"); - printf("which is required for encryption.\n"); - Exit(1); - } - if (my_want_state_is_dont(TELOPT_ENCRYPT) || - my_want_state_is_wont(TELOPT_ENCRYPT)) { - printf("\nServer refused to negotiate encryption.\n"); - Exit(1); - } - if (encrypt_is_encrypting()) - break; - if (time(0) > timeout) { - printf("\nEncryption could not be enabled.\n"); - Exit(1); - } - if (printed_encrypt == 0) { - printed_encrypt = 1; - printf("Waiting for encryption to be negotiated...\n"); - /* - * Turn on MODE_TRAPSIG and then turn off localchars - * so that ^C will cause telnet to exit. - */ - TerminalNewMode(getconnmode()|MODE_TRAPSIG); - intr_waiting = 1; - } - if (intr_happened) { - printf("\nUser interrupt.\n"); - Exit(1); - } - if (telnet_spin()) { - printf("\nServer disconnected.\n"); - Exit(1); - } - - } - if (printed_encrypt) { - printf("Encryption negotiated.\n"); - intr_waiting = 0; - setconnmode(0); - } - } -#endif - - for (;;) { - int schedValue; - - while ((schedValue = Scheduler(0)) != 0) { - if (schedValue == -1) { - setcommandmode(); - return; - } - } - - if (Scheduler(1) == -1) { - setcommandmode(); - return; - } - } -} - -/* - * netclear() - * - * We are about to do a TELNET SYNCH operation. Clear - * the path to the network. - * - * Things are a bit tricky since we may have sent the first - * byte or so of a previous TELNET command into the network. - * So, we have to scan the network buffer from the beginning - * until we are up to where we want to be. - * - * A side effect of what we do, just to keep things - * simple, is to clear the urgent data pointer. The principal - * caller should be setting the urgent data pointer AFTER calling - * us in any case. - */ - -static void -netclear() -{ -#if 0 /* XXX */ - char *thisitem, *next; - char *good; -#define wewant(p) ((nfrontp > p) && ((*p&0xff) == IAC) && \ - ((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL)) - - thisitem = netobuf; - - while ((next = nextitem(thisitem)) <= netobuf.send) { - thisitem = next; - } - - /* Now, thisitem is first before/at boundary. */ - - good = netobuf; /* where the good bytes go */ - - while (netoring.add > thisitem) { - if (wewant(thisitem)) { - int length; - - next = thisitem; - do { - next = nextitem(next); - } while (wewant(next) && (nfrontp > next)); - length = next-thisitem; - memmove(good, thisitem, length); - good += length; - thisitem = next; - } else { - thisitem = nextitem(thisitem); - } - } - -#endif /* 0 */ -} - -/* - * These routines add various telnet commands to the data stream. - */ - -static void -doflush() -{ - NET2ADD(IAC, DO); - NETADD(TELOPT_TM); - flushline = 1; - flushout = 1; - ttyflush(1); /* Flush/drop output */ - /* do printoption AFTER flush, otherwise the output gets tossed... */ - printoption("SENT", DO, TELOPT_TM); -} - -void -xmitAO(void) -{ - NET2ADD(IAC, AO); - printoption("SENT", IAC, AO); - if (autoflush) { - doflush(); - } -} - - -void -xmitEL(void) -{ - NET2ADD(IAC, EL); - printoption("SENT", IAC, EL); -} - -void -xmitEC(void) -{ - NET2ADD(IAC, EC); - printoption("SENT", IAC, EC); -} - - -int -dosynch() -{ - netclear(); /* clear the path to the network */ - NETADD(IAC); - setneturg(); - NETADD(DM); - printoption("SENT", IAC, DM); - return 1; -} - -int want_status_response = 0; - -int -get_status() -{ - unsigned char tmp[16]; - unsigned char *cp; - - if (my_want_state_is_dont(TELOPT_STATUS)) { - printf("Remote side does not support STATUS option\n"); - return 0; - } - cp = tmp; - - *cp++ = IAC; - *cp++ = SB; - *cp++ = TELOPT_STATUS; - *cp++ = TELQUAL_SEND; - *cp++ = IAC; - *cp++ = SE; - if (NETROOM() >= cp - tmp) { - ring_supply_data(&netoring, tmp, cp-tmp); - printsub('>', tmp+2, cp - tmp - 2); - } - ++want_status_response; - return 1; -} - -void -intp(void) -{ - NET2ADD(IAC, IP); - printoption("SENT", IAC, IP); - flushline = 1; - if (autoflush) { - doflush(); - } - if (autosynch) { - dosynch(); - } -} - -void -sendbrk(void) -{ - NET2ADD(IAC, BREAK); - printoption("SENT", IAC, BREAK); - flushline = 1; - if (autoflush) { - doflush(); - } - if (autosynch) { - dosynch(); - } -} - -void -sendabort(void) -{ - NET2ADD(IAC, ABORT); - printoption("SENT", IAC, ABORT); - flushline = 1; - if (autoflush) { - doflush(); - } - if (autosynch) { - dosynch(); - } -} - -void -sendsusp(void) -{ - NET2ADD(IAC, SUSP); - printoption("SENT", IAC, SUSP); - flushline = 1; - if (autoflush) { - doflush(); - } - if (autosynch) { - dosynch(); - } -} - -void -sendeof(void) -{ - NET2ADD(IAC, xEOF); - printoption("SENT", IAC, xEOF); -} - -void -sendayt(void) -{ - NET2ADD(IAC, AYT); - printoption("SENT", IAC, AYT); -} - -/* - * Send a window size update to the remote system. - */ - -void -sendnaws() -{ - long rows, cols; - unsigned char tmp[16]; - unsigned char *cp; - - if (my_state_is_wont(TELOPT_NAWS)) - return; - -#undef PUTSHORT -#define PUTSHORT(cp, x) { if ((*cp++ = ((x)>>8)&0xff) == IAC) *cp++ = IAC; \ - if ((*cp++ = ((x))&0xff) == IAC) *cp++ = IAC; } - - if (TerminalWindowSize(&rows, &cols) == 0) { /* Failed */ - return; - } - - cp = tmp; - - *cp++ = IAC; - *cp++ = SB; - *cp++ = TELOPT_NAWS; - PUTSHORT(cp, cols); - PUTSHORT(cp, rows); - *cp++ = IAC; - *cp++ = SE; - if (NETROOM() >= cp - tmp) { - ring_supply_data(&netoring, tmp, cp-tmp); - printsub('>', tmp+2, cp - tmp - 2); - } -} - -void -tel_enter_binary(int rw) -{ - if (rw&1) - send_do(TELOPT_BINARY, 1); - if (rw&2) - send_will(TELOPT_BINARY, 1); -} - -void -tel_leave_binary(int rw) -{ - if (rw&1) - send_dont(TELOPT_BINARY, 1); - if (rw&2) - send_wont(TELOPT_BINARY, 1); -} diff --git a/kerberosV/src/appl/telnet/telnet/telnet.cat1 b/kerberosV/src/appl/telnet/telnet/telnet.cat1 deleted file mode 100644 index f112a55e581..00000000000 --- a/kerberosV/src/appl/telnet/telnet/telnet.cat1 +++ /dev/null @@ -1,715 +0,0 @@ - -TELNET(1) BSD General Commands Manual TELNET(1) - -NNAAMMEE - tteellnneett -- user interface to the TELNET protocol - -SSYYNNOOPPSSIISS - tteellnneett [--7788EEFFKKLLaaccddffrrxx] [--SS _t_o_s] [--XX _a_u_t_h_t_y_p_e] [--ee _e_s_c_a_p_e_c_h_a_r] [--kk _r_e_a_l_m] - [--ll _u_s_e_r] [--nn _t_r_a_c_e_f_i_l_e] [_h_o_s_t [port]] - -DDEESSCCRRIIPPTTIIOONN - The tteellnneett command is used to communicate with another host using the - TELNET protocol. If tteellnneett is invoked without the _h_o_s_t argument, it - enters command mode, indicated by its prompt (tteellnneett>>). In this mode, it - accepts and executes the commands listed below. If it is invoked with - arguments, it performs an ooppeenn command with those arguments. - - Options: - - --88 Specifies an 8-bit data path. This causes an attempt to negoti- - ate the TELNET BINARY option on both input and output. - - --77 Do not try to negotiate TELNET BINARY option. - - --EE Stops any character from being recognized as an escape character. - - --FF If Kerberos V5 authentication is being used, the --FF option allows - the local credentials to be forwarded to the remote system, - including any credentials that have already been forwarded into - the local environment. - - --KK Specifies no automatic login to the remote system. - - --LL Specifies an 8-bit data path on output. This causes the BINARY - option to be negotiated on output. - - --SS _t_o_s Sets the IP type-of-service (TOS) option for the telnet connec- - tion to the value _t_o_s, which can be a numeric TOS value or, on - systems that support it, a symbolic TOS name found in the - /etc/iptos file. - - --XX _a_t_y_p_e - Disables the _a_t_y_p_e type of authentication. - - --aa Attempt automatic login. Currently, this sends the user name via - the USER variable of the ENVIRON option if supported by the - remote system. The name used is that of the current user as - returned by getlogin(2) if it agrees with the current user ID, - otherwise it is the name associated with the user ID. - - --cc Disables the reading of the user's _._t_e_l_n_e_t_r_c file. (See the - ttooggggllee sskkiipprrcc command on this man page.) - - --dd Sets the initial value of the ddeebbuugg toggle to TRUE - - --ee _e_s_c_a_p_e _c_h_a_r - Sets the initial tteellnneett tteellnneett escape character to _e_s_c_a_p_e _c_h_a_r. - If _e_s_c_a_p_e _c_h_a_r is omitted, then there will be no escape charac- - ter. - - --ff If Kerberos V5 authentication is being used, the --ff option allows - the local credentials to be forwarded to the remote system. - - --kk _r_e_a_l_m - If Kerberos authentication is being used, the --kk option requests - that telnet obtain tickets for the remote host in realm realm - instead of the remote host's realm, as determined by - krb_realmofhost(3). - - --ll _u_s_e_r - When connecting to the remote system, if the remote system under- - stands the ENVIRON option, then _u_s_e_r will be sent to the remote - system as the value for the variable USER. This option implies - the --aa option. This option may also be used with the ooppeenn com- - mand. - - --nn _t_r_a_c_e_f_i_l_e - Opens _t_r_a_c_e_f_i_l_e for recording trace information. See the sseett - ttrraacceeffiillee command below. - - --rr Specifies a user interface similar to rlogin(1). In this mode, - the escape character is set to the tilde (~) character, unless - modified by the -e option. - - --xx Turn on encryption of the data stream. When this option is - turned on, will exit with an error if authentication cannot be - negotiated or if encryption cannot be turned on. - - _h_o_s_t Indicates the official name, an alias, or the Internet address of - a remote host. - - _p_o_r_t Indicates a port number (address of an application). If a number - is not specified, the default tteellnneett port is used. - - When in rlogin mode, a line of the form ~. disconnects from the remote - host; ~ is the telnet escape character. Similarly, the line ~^Z suspends - the telnet session. The line ~^] escapes to the normal telnet escape - prompt. - - Once a connection has been opened, tteellnneett will attempt to enable the - TELNET LINEMODE option. If this fails, then tteellnneett will revert to one of - two input modes: either ``character at a time'' or ``old line by line'' - depending on what the remote system supports. - - When LINEMODE is enabled, character processing is done on the local sys- - tem, under the control of the remote system. When input editing or char- - acter echoing is to be disabled, the remote system will relay that infor- - mation. The remote system will also relay changes to any special charac- - ters that happen on the remote system, so that they can take effect on - the local system. - - In ``character at a time'' mode, most text typed is immediately sent to - the remote host for processing. - - In ``old line by line'' mode, all text is echoed locally, and (normally) - only completed lines are sent to the remote host. The ``local echo char- - acter'' (initially ``^E'') may be used to turn off and on the local echo - (this would mostly be used to enter passwords without the password being - echoed). - - If the LINEMODE option is enabled, or if the llooccaallcchhaarrss toggle is TRUE - (the default for ``old line by line``; see below), the user's qquuiitt, iinnttrr, - and fflluusshh characters are trapped locally, and sent as TELNET protocol - sequences to the remote side. If LINEMODE has ever been enabled, then - the user's ssuusspp and eeooff are also sent as TELNET protocol sequences, and - qquuiitt is sent as a TELNET ABORT instead of BREAK There are options (see - ttooggggllee aauuttoofflluusshh and ttooggggllee aauuttoossyynncchh below) which cause this action to - flush subsequent output to the terminal (until the remote host acknowl- - edges the TELNET sequence) and flush previous terminal input (in the case - of qquuiitt and iinnttrr). - - While connected to a remote host, tteellnneett command mode may be entered by - typing the tteellnneett ``escape character'' (initially ``^]''). When in com- - mand mode, the normal terminal editing conventions are available. - - The following tteellnneett commands are available. Only enough of each command - to uniquely identify it need be typed (this is also true for arguments to - the mmooddee, sseett, ttooggggllee, uunnsseett, ssllcc, eennvviirroonn, and ddiissppllaayy commands). - - aauutthh _a_r_g_u_m_e_n_t _._._. - The auth command manipulates the information sent through the - TELNET AUTHENTICATE option. Valid arguments for the auth com- - mand are as follows: - - ddiissaabbllee _t_y_p_e Disables the specified type of authentication. - To obtain a list of available types, use the - aauutthh ddiissaabbllee ?? command. - - eennaabbllee _t_y_p_e Enables the specified type of authentication. - To obtain a list of available types, use the - aauutthh eennaabbllee ?? command. - - ssttaattuuss Lists the current status of the various types of - authentication. - - cclloossee Close a TELNET session and return to command mode. - - ddiissppllaayy _a_r_g_u_m_e_n_t _._._. - Displays all, or some, of the sseett and ttooggggllee values (see - below). - - eennccrryypptt _a_r_g_u_m_e_n_t _._._. - The encrypt command manipulates the information sent through - the TELNET ENCRYPT option. - - Note: Because of export controls, the TELNET ENCRYPT option - is not supported outside of the United States and Canada. - - Valid arguments for the encrypt command are as follows: - - ddiissaabbllee _t_y_p_e [iinnppuutt | oouuttppuutt] - Disables the specified type of encryption. If - you omit the input and output, both input and - output are disabled. To obtain a list of avail- - able types, use the eennccrryypptt ddiissaabbllee ?? command. - - eennaabbllee _t_y_p_e [iinnppuutt | oouuttppuutt] - Enables the specified type of encryption. If - you omit input and output, both input and output - are enabled. To obtain a list of available - types, use the eennccrryypptt eennaabbllee ?? command. - - iinnppuutt This is the same as the eennccrryypptt ssttaarrtt iinnppuutt com- - mand. - - --iinnppuutt This is the same as the eennccrryypptt ssttoopp iinnppuutt com- - mand. - - oouuttppuutt This is the same as the eennccrryypptt ssttaarrtt oouuttppuutt - command. - - --oouuttppuutt This is the same as the eennccrryypptt ssttoopp oouuttppuutt com- - mand. - - ssttaarrtt [iinnppuutt | oouuttppuutt] - Attempts to start encryption. If you omit iinnppuutt - and oouuttppuutt, both input and output are enabled. - To obtain a list of available types, use the - eennccrryypptt eennaabbllee ?? command. - - ssttaattuuss Lists the current status of encryption. - - ssttoopp [iinnppuutt | oouuttppuutt] - Stops encryption. If you omit input and output, - encryption is on both input and output. - - ttyyppee _t_y_p_e Sets the default type of encryption to be used - with later eennccrryypptt ssttaarrtt or eennccrryypptt ssttoopp com- - mands. - - eennvviirroonn _a_r_g_u_m_e_n_t_s _._._. - The eennvviirroonn command is used to manipulate the the variables - that my be sent through the TELNET ENVIRON option. The ini- - tial set of variables is taken from the users environment, - with only the DISPLAY and PRINTER variables being exported by - default. The USER variable is also exported if the --aa or --ll - options are used. - - Valid arguments for the eennvviirroonn command are: - - ddeeffiinnee _v_a_r_i_a_b_l_e _v_a_l_u_e - Define the variable _v_a_r_i_a_b_l_e to have a value of - _v_a_l_u_e. Any variables defined by this command are - automatically exported. The _v_a_l_u_e may be enclosed - in single or double quotes so that tabs and spaces - may be included. - - uunnddeeffiinnee _v_a_r_i_a_b_l_e - Remove _v_a_r_i_a_b_l_e from the list of environment vari- - ables. - - eexxppoorrtt _v_a_r_i_a_b_l_e - Mark the variable _v_a_r_i_a_b_l_e to be exported to the - remote side. - - uunneexxppoorrtt _v_a_r_i_a_b_l_e - Mark the variable _v_a_r_i_a_b_l_e to not be exported - unless explicitly asked for by the remote side. - - lliisstt List the current set of environment variables. - Those marked with a ** will be sent automatically, - other variables will only be sent if explicitly - requested. - - ?? Prints out help information for the eennvviirroonn com- - mand. - - llooggoouutt Sends the TELNET LOGOUT option to the remote side. This com- - mand is similar to a cclloossee command; however, if the remote - side does not support the LOGOUT option, nothing happens. If, - however, the remote side does support the LOGOUT option, this - command should cause the remote side to close the TELNET con- - nection. If the remote side also supports the concept of sus- - pending a user's session for later reattachment, the logout - argument indicates that you should terminate the session imme- - diately. - - mmooddee _t_y_p_e _T_y_p_e is one of several options, depending on the state of the - TELNET session. The remote host is asked for permission to go - into the requested mode. If the remote host is capable of - entering that mode, the requested mode will be entered. - - cchhaarraacctteerr Disable the TELNET LINEMODE option, or, if the - remote side does not understand the LINEMODE - option, then enter ``character at a time`` mode. - - lliinnee Enable the TELNET LINEMODE option, or, if the - remote side does not understand the LINEMODE - option, then attempt to enter ``old-line-by- - line`` mode. - - iissiigg (--iissiigg) Attempt to enable (disable) the TRAPSIG mode of - the LINEMODE option. This requires that the - LINEMODE option be enabled. - - eeddiitt (--eeddiitt) Attempt to enable (disable) the EDIT mode of the - LINEMODE option. This requires that the - LINEMODE option be enabled. - - ssooffttttaabbss (--ssooffttttaabbss) - Attempt to enable (disable) the SOFT_TAB mode of - the LINEMODE option. This requires that the - LINEMODE option be enabled. - - lliitteecchhoo (--lliitteecchhoo) - Attempt to enable (disable) the LIT_ECHO mode of - the LINEMODE option. This requires that the - LINEMODE option be enabled. - - ?? Prints out help information for the mmooddee com- - mand. - - ooppeenn _h_o_s_t [--ll _u_s_e_r] [[--]_p_o_r_t] - Open a connection to the named host. If no port number is - specified, tteellnneett will attempt to contact a TELNET server at - the default port. The host specification may be either a host - name (see hosts(5)) or an Internet address specified in the - ``dot notation'' (see inet(3)). The [--ll] option may be used - to specify the user name to be passed to the remote system via - the ENVIRON option. When connecting to a non-standard port, - tteellnneett omits any automatic initiation of TELNET options. When - the port number is preceded by a minus sign, the initial - option negotiation is done. After establishing a connection, - the file _._t_e_l_n_e_t_r_c in the users home directory is opened. - Lines beginning with a # are comment lines. Blank lines are - ignored. Lines that begin without white space are the start - of a machine entry. The first thing on the line is the name - of the machine that is being connected to. The rest of the - line, and successive lines that begin with white space are - assumed to be tteellnneett commands and are processed as if they had - been typed in manually to the tteellnneett command prompt. - - qquuiitt Close any open TELNET session and exit tteellnneett. An end of file - (in command mode) will also close a session and exit. - - sseenndd _a_r_g_u_m_e_n_t_s - Sends one or more special character sequences to the remote - host. The following are the arguments which may be specified - (more than one argument may be specified at a time): - - aabboorrtt Sends the TELNET ABORT (Abort processes) sequence. - - aaoo Sends the TELNET AO (Abort Output) sequence, which - should cause the remote system to flush all output - _f_r_o_m the remote system _t_o the user's terminal. - - aayytt Sends the TELNET AYT (Are You There) sequence, to - which the remote system may or may not choose to - respond. - - bbrrkk Sends the TELNET BRK (Break) sequence, which may have - significance to the remote system. - - eecc Sends the TELNET EC (Erase Character) sequence, which - should cause the remote system to erase the last char- - acter entered. - - eell Sends the TELNET EL (Erase Line) sequence, which - should cause the remote system to erase the line cur- - rently being entered. - - eeooff Sends the TELNET EOF (End Of File) sequence. - - eeoorr Sends the TELNET EOR (End of Record) sequence. - - eessccaappee Sends the current tteellnneett escape character (initially - ``^''). - - ggaa Sends the TELNET GA (Go Ahead) sequence, which likely - has no significance to the remote system. - - ggeettssttaattuuss - If the remote side supports the TELNET STATUS command, - ggeettssttaattuuss will send the subnegotiation to request that - the server send its current option status. - - iipp Sends the TELNET IP (Interrupt Process) sequence, - which should cause the remote system to abort the cur- - rently running process. - - nnoopp Sends the TELNET NOP (No OPeration) sequence. - - ssuusspp Sends the TELNET SUSP (SUSPend process) sequence. - - ssyynncchh Sends the TELNET SYNCH sequence. This sequence causes - the remote system to discard all previously typed (but - not yet read) input. This sequence is sent as TCP - urgent data (and may not work if the remote system is - a 4.2BSD system -- if it doesn't work, a lower case - ``r'' may be echoed on the terminal). - - ddoo _c_m_d - - ddoonntt _c_m_d - - wwiillll _c_m_d - - wwoonntt _c_m_d - Sends the TELNET DO _c_m_d sequence. _C_m_d can be either a - decimal number between 0 and 255, or a symbolic name - for a specific TELNET command. _C_m_d can also be either - hheellpp or ?? to print out help information, including a - list of known symbolic names. - - ?? Prints out help information for the sseenndd command. - - sseett _a_r_g_u_m_e_n_t _v_a_l_u_e - - uunnsseett _a_r_g_u_m_e_n_t _v_a_l_u_e - The sseett command will set any one of a number of tteellnneett vari- - ables to a specific value or to TRUE. The special value ooffff - turns off the function associated with the variable, this is - equivalent to using the uunnsseett command. The uunnsseett command will - disable or set to FALSE any of the specified functions. The - values of variables may be interrogated with the ddiissppllaayy com- - mand. The variables which may be set or unset, but not tog- - gled, are listed here. In addition, any of the variables for - the ttooggggllee command may be explicitly set or unset using the - sseett and uunnsseett commands. - - aayytt If TELNET is in localchars mode, or LINEMODE is - enabled, and the status character is typed, a TELNET - AYT sequence (see sseenndd aayytt preceding) is sent to the - remote host. The initial value for the "Are You - There" character is the terminal's status character. - - eecchhoo This is the value (initially ``^E'') which, when in - ``line by line'' mode, toggles between doing local - echoing of entered characters (for normal processing), - and suppressing echoing of entered characters (for - entering, say, a password). - - eeooff If tteellnneett is operating in LINEMODE or ``old line by - line'' mode, entering this character as the first - character on a line will cause this character to be - sent to the remote system. The initial value of the - eof character is taken to be the terminal's eeooff char- - acter. - - eerraassee If tteellnneett is in llooccaallcchhaarrss mode (see ttooggggllee llooccaallcchhaarrss - below), aanndd if tteellnneett is operating in ``character at a - time'' mode, then when this character is typed, a - TELNET EC sequence (see sseenndd eecc above) is sent to the - remote system. The initial value for the erase char- - acter is taken to be the terminal's eerraassee character. - - eessccaappee This is the tteellnneett escape character (initially ``^['') - which causes entry into tteellnneett command mode (when con- - nected to a remote system). - - fflluusshhoouuttppuutt - If tteellnneett is in llooccaallcchhaarrss mode (see ttooggggllee llooccaallcchhaarrss - below) and the fflluusshhoouuttppuutt character is typed, a - TELNET AO sequence (see sseenndd aaoo above) is sent to the - remote host. The initial value for the flush charac- - ter is taken to be the terminal's fflluusshh character. - - ffoorrww11 - - ffoorrww22 If TELNET is operating in LINEMODE, these are the - characters that, when typed, cause partial lines to be - forwarded to the remote system. The initial value for - the forwarding characters are taken from the termi- - nal's eol and eol2 characters. - - iinntteerrrruupptt - If tteellnneett is in llooccaallcchhaarrss mode (see ttooggggllee llooccaallcchhaarrss - below) and the iinntteerrrruupptt character is typed, a TELNET - IP sequence (see sseenndd iipp above) is sent to the remote - host. The initial value for the interrupt character - is taken to be the terminal's iinnttrr character. - - kkiillll If tteellnneett is in llooccaallcchhaarrss mode (see ttooggggllee llooccaallcchhaarrss - below), aanndd if tteellnneett is operating in ``character at a - time'' mode, then when this character is typed, a - TELNET EL sequence (see sseenndd eell above) is sent to the - remote system. The initial value for the kill charac- - ter is taken to be the terminal's kkiillll character. - - llnneexxtt If tteellnneett is operating in LINEMODE or ``old line by - line`` mode, then this character is taken to be the - terminal's llnneexxtt character. The initial value for the - lnext character is taken to be the terminal's llnneexxtt - character. - - qquuiitt If tteellnneett is in llooccaallcchhaarrss mode (see ttooggggllee llooccaallcchhaarrss - below) and the qquuiitt character is typed, a TELNET BRK - sequence (see sseenndd bbrrkk above) is sent to the remote - host. The initial value for the quit character is - taken to be the terminal's qquuiitt character. - - rreepprriinntt - If tteellnneett is operating in LINEMODE or ``old line by - line`` mode, then this character is taken to be the - terminal's rreepprriinntt character. The initial value for - the reprint character is taken to be the terminal's - rreepprriinntt character. - - rrllooggiinn This is the rlogin escape character. If set, the nor- - mal TELNET escape character is ignored unless it is - preceded by this character at the beginning of a line. - This character, at the beginning of a line followed by - a "." closes the connection; when followed by a ^Z it - suspends the telnet command. The initial state is to - disable the rlogin escape character. - - ssttaarrtt If the TELNET TOGGLE-FLOW-CONTROL option has been - enabled, then this character is taken to be the termi- - nal's ssttaarrtt character. The initial value for the kill - character is taken to be the terminal's ssttaarrtt charac- - ter. - - ssttoopp If the TELNET TOGGLE-FLOW-CONTROL option has been - enabled, then this character is taken to be the termi- - nal's ssttoopp character. The initial value for the kill - character is taken to be the terminal's ssttoopp charac- - ter. - - ssuusspp If tteellnneett is in llooccaallcchhaarrss mode, or LINEMODE is - enabled, and the ssuussppeenndd character is typed, a TELNET - SUSP sequence (see sseenndd ssuusspp above) is sent to the - remote host. The initial value for the suspend char- - acter is taken to be the terminal's ssuussppeenndd character. - - ttrraacceeffiillee - This is the file to which the output, caused by - nneettddaattaa or ooppttiioonn tracing being TRUE, will be written. - If it is set to ``--'', then tracing information will - be written to standard output (the default). - - wwoorrddeerraassee - If tteellnneett is operating in LINEMODE or ``old line by - line`` mode, then this character is taken to be the - terminal's wwoorrddeerraassee character. The initial value for - the worderase character is taken to be the terminal's - wwoorrddeerraassee character. - - ?? Displays the legal sseett (uunnsseett) commands. - - ssllcc _s_t_a_t_e The ssllcc command (Set Local Characters) is used to set or - change the state of the the special characters when the TELNET - LINEMODE option has been enabled. Special characters are - characters that get mapped to TELNET commands sequences (like - iipp or qquuiitt) or line editing characters (like eerraassee and kkiillll). - By default, the local special characters are exported. - - cchheecckk Verify the current settings for the current spe- - cial characters. The remote side is requested to - send all the current special character settings, - and if there are any discrepancies with the local - side, the local side will switch to the remote - value. - - eexxppoorrtt Switch to the local defaults for the special char- - acters. The local default characters are those of - the local terminal at the time when tteellnneett was - started. - - iimmppoorrtt Switch to the remote defaults for the special - characters. The remote default characters are - those of the remote system at the time when the - TELNET connection was established. - - ?? Prints out help information for the ssllcc command. - - ssttaattuuss Show the current status of tteellnneett. This includes the peer one - is connected to, as well as the current mode. - - ttooggggllee _a_r_g_u_m_e_n_t_s _._._. - Toggle (between TRUE and FALSE) various flags that control how - tteellnneett responds to events. These flags may be set explicitly - to TRUE or FALSE using the sseett and uunnsseett commands listed - above. More than one argument may be specified. The state of - these flags may be interrogated with the ddiissppllaayy command. - Valid arguments are: - - aauutthhddeebbuugg Turns on debugging information for the authenti- - cation code. - - aauuttoofflluusshh If aauuttoofflluusshh and llooccaallcchhaarrss are both TRUE, then - when the aaoo, or qquuiitt characters are recognized - (and transformed into TELNET sequences; see sseett - above for details), tteellnneett refuses to display - any data on the user's terminal until the remote - system acknowledges (via a TELNET TIMING MARK - option) that it has processed those TELNET - sequences. The initial value for this toggle is - TRUE if the terminal user had not done an "stty - noflsh", otherwise FALSE (see stty(1)). - - aauuttooddeeccrryypptt When the TELNET ENCRYPT option is negotiated, by - default the actual encryption (decryption) of - the data stream does not start automatically. - The autoencrypt (autodecrypt) command states - that encryption of the output (input) stream - should be enabled as soon as possible. - - Note: Because of export controls, the TELNET - ENCRYPT option is not supported outside the - United States and Canada. - - aauuttoollooggiinn If the remote side supports the TELNET - AUTHENTICATION option TELNET attempts to use it - to perform automatic authentication. If the - AUTHENTICATION option is not supported, the - user's login name are propagated through the - TELNET ENVIRON option. This command is the same - as specifying _a option on the ooppeenn command. - - aauuttoossyynncchh If aauuttoossyynncchh and llooccaallcchhaarrss are both TRUE, then - when either the iinnttrr or qquuiitt characters is typed - (see sseett above for descriptions of the iinnttrr and - qquuiitt characters), the resulting TELNET sequence - sent is followed by the TELNET SYNCH sequence. - This procedure sshhoouulldd cause the remote system to - begin throwing away all previously typed input - until both of the TELNET sequences have been - read and acted upon. The initial value of this - toggle is FALSE. - - bbiinnaarryy Enable or disable the TELNET BINARY option on - both input and output. - - iinnbbiinnaarryy Enable or disable the TELNET BINARY option on - input. - - oouuttbbiinnaarryy Enable or disable the TELNET BINARY option on - output. - - ccrrllff If this is TRUE, then carriage returns will be - sent as . If this is FALSE, then car- - riage returns will be send as . The - initial value for this toggle is FALSE. - - ccrrmmoodd Toggle carriage return mode. When this mode is - enabled, most carriage return characters - received from the remote host will be mapped - into a carriage return followed by a line feed. - This mode does not affect those characters typed - by the user, only those received from the remote - host. This mode is not very useful unless the - remote host only sends carriage return, but - never line feed. The initial value for this - toggle is FALSE. - - ddeebbuugg Toggles socket level debugging (useful only to - the ssuuppeerr uusseerr). The initial value for this - toggle is FALSE. - - eennccddeebbuugg Turns on debugging information for the encryp- - tion code. - - llooccaallcchhaarrss If this is TRUE, then the fflluusshh, iinntteerrrruupptt, - qquuiitt, eerraassee, and kkiillll characters (see sseett above) - are recognized locally, and transformed into - (hopefully) appropriate TELNET control sequences - (respectively aaoo, iipp, bbrrkk, eecc, and eell; see sseenndd - above). The initial value for this toggle is - TRUE in ``old line by line'' mode, and FALSE in - ``character at a time'' mode. When the LINEMODE - option is enabled, the value of llooccaallcchhaarrss is - ignored, and assumed to always be TRUE. If - LINEMODE has ever been enabled, then qquuiitt is - sent as aabboorrtt, and eeooff and ssuussppeenndd are sent as - eeooff and ssuusspp, see sseenndd above). - - nneettddaattaa Toggles the display of all network data (in - hexadecimal format). The initial value for this - toggle is FALSE. - - ooppttiioonnss Toggles the display of some internal tteellnneett pro- - tocol processing (having to do with TELNET - options). The initial value for this toggle is - FALSE. - - pprreettttyydduummpp When the nneettddaattaa toggle is enabled, if - pprreettttyydduummpp is enabled the output from the - nneettddaattaa command will be formatted in a more user - readable format. Spaces are put between each - character in the output, and the beginning of - any TELNET escape sequence is preceded by a '*' - to aid in locating them. - - sskkiipprrcc When the skiprc toggle is TRUE, TELNET skips the - reading of the _._t_e_l_n_e_t_r_c file in the users home - directory when connections are opened. The ini- - tial value for this toggle is FALSE. - - tteerrmmddaattaa Toggles the display of all terminal data (in - hexadecimal format). The initial value for this - toggle is FALSE. - - vveerrbboossee__eennccrryypptt - When the vveerrbboossee__eennccrryypptt toggle is TRUE, TELNET - prints out a message each time encryption is - enabled or disabled. The initial value for this - toggle is FALSE. Note: Because of export con- - trols, data encryption is not supported outside - of the United States and Canada. - - ?? Displays the legal ttooggggllee commands. - - zz Suspend tteellnneett. This command only works when the user is - using the csh(1). - - !! [_c_o_m_m_a_n_d] - Execute a single command in a subshell on the local system. - If ccoommmmaanndd is omitted, then an interactive subshell is - invoked. - - ?? [_c_o_m_m_a_n_d] - Get help. With no arguments, tteellnneett prints a help summary. - If a command is specified, tteellnneett will print the help informa- - tion for just that command. - -EENNVVIIRROONNMMEENNTT - TTeellnneett uses at least the HOME, SHELL, DISPLAY, and TERM environment vari- - ables. Other environment variables may be propagated to the other side - via the TELNET ENVIRON option. - -FFIILLEESS - ~/.telnetrc user customized telnet startup values - -HHIISSTTOORRYY - The TTeellnneett command appeared in 4.2BSD. - -NNOOTTEESS - On some remote systems, echo has to be turned off manually when in ``old - line by line'' mode. - - In ``old line by line'' mode or LINEMODE the terminal's eeooff character is - only recognized (and sent to the remote system) when it is the first - character on a line. - -4.2 Berkeley Distribution June 1, 1994 4.2 Berkeley Distribution diff --git a/kerberosV/src/appl/telnet/telnet/telnet_locl.h b/kerberosV/src/appl/telnet/telnet/telnet_locl.h deleted file mode 100644 index 7c075e0c248..00000000000 --- a/kerberosV/src/appl/telnet/telnet/telnet_locl.h +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: telnet_locl.h,v 1.3 2013/06/17 19:11:38 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#ifdef HAVE_SIGNAL_H -#include -#endif -#include -#include -#ifdef HAVE_BSDSETJMP_H -#include -#endif - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#ifdef HAVE_UNISTD_H -#include -#endif - -/* termios.h *must* be included before curses.h, but not on Solaris 9, - at least, where we end up with - "/usr/include/term.h", line 1060: incomplete struct/union/enum termio: Ottyb -*/ -#if defined HAVE_TERMIOS_H && !defined __sun -#include -#endif - -#if defined(HAVE_CURSES_H) -#include -#ifdef HAVE_TERM_H -#include -#endif -#elif defined(HAVE_TERMCAP_H) -#include -#endif - -#if defined(HAVE_SYS_TERMIO_H) && !defined(HAVE_TERMIOS_H) -#include -#endif - -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_NETDB_H -#include -#endif - -#ifdef HAVE_PWD_H -#include -#endif - -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif -/* not with SunOS 4 */ -#if defined(HAVE_SYS_IOCTL_H) && SunOS != 40 -#include -#endif -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif /* HAVE_SYS_RESOURCE_H */ -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_SYS_FILIO_H -#include -#endif -#ifdef HAVE_SYS_FILE_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif - -#ifdef HAVE_NETINET_IN_SYSTM_H -#include -#endif -#ifdef HAVE_NETINET_IP_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#ifdef _AIX -struct sockaddr_dl; /* AIX fun */ -struct ether_addr; -#endif -#include -#endif - -#ifdef HAVE_ARPA_TELNET_H -#include -#endif - -#ifdef SOCKS -#include -#endif - -#if defined(AUTHENTICATION) || defined(ENCRYPTION) -#include -#include -#endif -#include -#include - -#define LINEMODE -#ifndef KLUDGELINEMODE -#define KLUDGELINEMODE -#endif - -#include -#include - -#include "ring.h" -#include "externs.h" -#include "defines.h" -#include "types.h" - -/* prototypes */ - diff --git a/kerberosV/src/appl/telnet/telnet/terminal.c b/kerberosV/src/appl/telnet/telnet/terminal.c deleted file mode 100644 index 4eb54e3f13c..00000000000 --- a/kerberosV/src/appl/telnet/telnet/terminal.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 1988, 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. - */ - -#include "telnet_locl.h" - -RCSID("$Id: terminal.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -Ring ttyoring, ttyiring; -unsigned char ttyobuf[2*BUFSIZ], ttyibuf[BUFSIZ]; - -int termdata; /* Debugging flag */ - -# ifndef VDISCARD -cc_t termFlushChar; -# endif -# ifndef VLNEXT -cc_t termLiteralNextChar; -# endif -# ifndef VSUSP -cc_t termSuspChar; -# endif -# ifndef VWERASE -cc_t termWerasChar; -# endif -# ifndef VREPRINT -cc_t termRprntChar; -# endif -# ifndef VSTART -cc_t termStartChar; -# endif -# ifndef VSTOP -cc_t termStopChar; -# endif -# ifndef VEOL -cc_t termForw1Char; -# endif -# ifndef VEOL2 -cc_t termForw2Char; -# endif -# ifndef VSTATUS -cc_t termAytChar; -# endif - -/* - * initialize the terminal data structures. - */ - -void -init_terminal(void) -{ - if (ring_init(&ttyoring, ttyobuf, sizeof ttyobuf) != 1) { - exit(1); - } - if (ring_init(&ttyiring, ttyibuf, sizeof ttyibuf) != 1) { - exit(1); - } - autoflush = TerminalAutoFlush(); -} - - -/* - * Send as much data as possible to the terminal. - * - * Return value: - * -1: No useful work done, data waiting to go out. - * 0: No data was waiting, so nothing was done. - * 1: All waiting data was written out. - * n: All data - n was written out. - */ - - -int -ttyflush(int drop) -{ - int n, n0, n1; - - n0 = ring_full_count(&ttyoring); - if ((n1 = n = ring_full_consecutive(&ttyoring)) > 0) { - if (drop) { - TerminalFlushOutput(); - /* we leave 'n' alone! */ - } else { - n = TerminalWrite((char *)ttyoring.consume, n); - } - } - if (n > 0) { - if (termdata && n) { - Dump('>', ttyoring.consume, n); - } - /* - * If we wrote everything, and the full count is - * larger than what we wrote, then write the - * rest of the buffer. - */ - if (n1 == n && n0 > n) { - n1 = n0 - n; - if (!drop) - n1 = TerminalWrite((char *)ttyoring.bottom, n1); - if (n1 > 0) - n += n1; - } - ring_consumed(&ttyoring, n); - } - if (n < 0) - return -1; - if (n == n0) { - if (n0) - return -1; - return 0; - } - return n0 - n + 1; -} - - -/* - * These routines decides on what the mode should be (based on the values - * of various global variables). - */ - - -int -getconnmode(void) -{ - int mode = 0; - - if (my_want_state_is_dont(TELOPT_ECHO)) - mode |= MODE_ECHO; - - if (localflow) - mode |= MODE_FLOW; - - if ((eight & 1) || my_want_state_is_will(TELOPT_BINARY)) - mode |= MODE_INBIN; - - if (eight & 2) - mode |= MODE_OUT8; - if (his_want_state_is_will(TELOPT_BINARY)) - mode |= MODE_OUTBIN; - -#ifdef KLUDGELINEMODE - if (kludgelinemode) { - if (my_want_state_is_dont(TELOPT_SGA)) { - mode |= (MODE_TRAPSIG|MODE_EDIT); - if (dontlecho && (clocks.echotoggle > clocks.modenegotiated)) { - mode &= ~MODE_ECHO; - } - } - return(mode); - } -#endif - if (my_want_state_is_will(TELOPT_LINEMODE)) - mode |= linemode; - return(mode); -} - - void -setconnmode(force) - int force; -{ -#ifdef ENCRYPTION - static int enc_passwd = 0; -#endif - int newmode; - - newmode = getconnmode()|(force?MODE_FORCE:0); - - TerminalNewMode(newmode); - -#ifdef ENCRYPTION - if ((newmode & (MODE_ECHO|MODE_EDIT)) == MODE_EDIT) { - if (my_want_state_is_will(TELOPT_ENCRYPT) - && (enc_passwd == 0) && !encrypt_output) { - encrypt_request_start(0, 0); - enc_passwd = 1; - } - } else { - if (enc_passwd) { - encrypt_request_end(); - enc_passwd = 0; - } - } -#endif - -} - - - void -setcommandmode() -{ - TerminalNewMode(-1); -} diff --git a/kerberosV/src/appl/telnet/telnet/types.h b/kerberosV/src/appl/telnet/telnet/types.h deleted file mode 100644 index 191d311fd15..00000000000 --- a/kerberosV/src/appl/telnet/telnet/types.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1988, 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. - * - * @(#)types.h 8.1 (Berkeley) 6/6/93 - */ - -typedef struct { - char *modedescriptions; - char modetype; -} Modelist; - -extern Modelist modelist[]; - -typedef struct { - int - system, /* what the current time is */ - echotoggle, /* last time user entered echo character */ - modenegotiated, /* last time operating mode negotiated */ - didnetreceive, /* last time we read data from network */ - gotDM; /* when did we last see a data mark */ -} Clocks; - -extern Clocks clocks; diff --git a/kerberosV/src/appl/telnet/telnet/utilities.c b/kerberosV/src/appl/telnet/telnet/utilities.c deleted file mode 100644 index 2d6fbfbcf77..00000000000 --- a/kerberosV/src/appl/telnet/telnet/utilities.c +++ /dev/null @@ -1,865 +0,0 @@ -/* - * Copyright (c) 1988, 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. - */ - -#define TELOPTS -#define TELCMDS -#define SLC_NAMES - -#include "telnet_locl.h" - -RCSID("$Id: utilities.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -FILE *NetTrace = 0; /* Not in bss, since needs to stay */ -int prettydump; - -/* - * SetSockOpt() - * - * Compensate for differences in 4.2 and 4.3 systems. - */ - -int -SetSockOpt(int fd, int level, int option, int yesno) -{ -#ifdef HAVE_SETSOCKOPT -#ifndef NOT43 - return setsockopt(fd, level, option, - (void *)&yesno, sizeof yesno); -#else /* NOT43 */ - if (yesno == 0) { /* Can't do that in 4.2! */ - fprintf(stderr, "Error: attempt to turn off an option 0x%x.\n", - option); - return -1; - } - return setsockopt(fd, level, option, 0, 0); -#endif /* NOT43 */ -#else - return -1; -#endif -} - -/* - * The following are routines used to print out debugging information. - */ - -char NetTraceFile[256] = "(standard output)"; - -void -SetNetTrace(char *file) -{ - if (NetTrace && NetTrace != stdout) - fclose(NetTrace); - if (file && (strcmp(file, "-") != 0)) { - NetTrace = fopen(file, "w"); - if (NetTrace) { - strlcpy(NetTraceFile, file, sizeof(NetTraceFile)); - return; - } - fprintf(stderr, "Cannot open %s.\n", file); - } - NetTrace = stdout; - strlcpy(NetTraceFile, "(standard output)", sizeof(NetTraceFile)); -} - -void -Dump(char direction, unsigned char *buffer, int length) -{ -# define BYTES_PER_LINE 32 - unsigned char *pThis; - int offset; - - offset = 0; - - while (length) { - /* print one line */ - fprintf(NetTrace, "%c 0x%x\t", direction, offset); - pThis = buffer; - if (prettydump) { - buffer = buffer + min(length, BYTES_PER_LINE/2); - while (pThis < buffer) { - fprintf(NetTrace, "%c%.2x", - (((*pThis)&0xff) == 0xff) ? '*' : ' ', - (*pThis)&0xff); - pThis++; - } - length -= BYTES_PER_LINE/2; - offset += BYTES_PER_LINE/2; - } else { - buffer = buffer + min(length, BYTES_PER_LINE); - while (pThis < buffer) { - fprintf(NetTrace, "%.2x", (*pThis)&0xff); - pThis++; - } - length -= BYTES_PER_LINE; - offset += BYTES_PER_LINE; - } - if (NetTrace == stdout) { - fprintf(NetTrace, "\r\n"); - } else { - fprintf(NetTrace, "\n"); - } - if (length < 0) { - fflush(NetTrace); - return; - } - /* find next unique line */ - } - fflush(NetTrace); -} - - -void -printoption(char *direction, int cmd, int option) -{ - if (!showoptions) - return; - if (cmd == IAC) { - if (TELCMD_OK(option)) - fprintf(NetTrace, "%s IAC %s", direction, TELCMD(option)); - else - fprintf(NetTrace, "%s IAC %d", direction, option); - } else { - char *fmt; - fmt = (cmd == WILL) ? "WILL" : (cmd == WONT) ? "WONT" : - (cmd == DO) ? "DO" : (cmd == DONT) ? "DONT" : 0; - if (fmt) { - fprintf(NetTrace, "%s %s ", direction, fmt); - if (TELOPT_OK(option)) - fprintf(NetTrace, "%s", TELOPT(option)); - else if (option == TELOPT_EXOPL) - fprintf(NetTrace, "EXOPL"); - else - fprintf(NetTrace, "%d", option); - } else - fprintf(NetTrace, "%s %d %d", direction, cmd, option); - } - if (NetTrace == stdout) { - fprintf(NetTrace, "\r\n"); - fflush(NetTrace); - } else { - fprintf(NetTrace, "\n"); - } - return; -} - -void -optionstatus(void) -{ - int i; - - for (i = 0; i < 256; i++) { - if (do_dont_resp[i]) { - if (TELOPT_OK(i)) - printf("resp DO_DONT %s: %d\n", TELOPT(i), do_dont_resp[i]); - else if (TELCMD_OK(i)) - printf("resp DO_DONT %s: %d\n", TELCMD(i), do_dont_resp[i]); - else - printf("resp DO_DONT %d: %d\n", i, - do_dont_resp[i]); - if (my_want_state_is_do(i)) { - if (TELOPT_OK(i)) - printf("want DO %s\n", TELOPT(i)); - else if (TELCMD_OK(i)) - printf("want DO %s\n", TELCMD(i)); - else - printf("want DO %d\n", i); - } else { - if (TELOPT_OK(i)) - printf("want DONT %s\n", TELOPT(i)); - else if (TELCMD_OK(i)) - printf("want DONT %s\n", TELCMD(i)); - else - printf("want DONT %d\n", i); - } - } else { - if (my_state_is_do(i)) { - if (TELOPT_OK(i)) - printf(" DO %s\n", TELOPT(i)); - else if (TELCMD_OK(i)) - printf(" DO %s\n", TELCMD(i)); - else - printf(" DO %d\n", i); - } - } - if (will_wont_resp[i]) { - if (TELOPT_OK(i)) - printf("resp WILL_WONT %s: %d\n", TELOPT(i), will_wont_resp[i]); - else if (TELCMD_OK(i)) - printf("resp WILL_WONT %s: %d\n", TELCMD(i), will_wont_resp[i]); - else - printf("resp WILL_WONT %d: %d\n", - i, will_wont_resp[i]); - if (my_want_state_is_will(i)) { - if (TELOPT_OK(i)) - printf("want WILL %s\n", TELOPT(i)); - else if (TELCMD_OK(i)) - printf("want WILL %s\n", TELCMD(i)); - else - printf("want WILL %d\n", i); - } else { - if (TELOPT_OK(i)) - printf("want WONT %s\n", TELOPT(i)); - else if (TELCMD_OK(i)) - printf("want WONT %s\n", TELCMD(i)); - else - printf("want WONT %d\n", i); - } - } else { - if (my_state_is_will(i)) { - if (TELOPT_OK(i)) - printf(" WILL %s\n", TELOPT(i)); - else if (TELCMD_OK(i)) - printf(" WILL %s\n", TELCMD(i)); - else - printf(" WILL %d\n", i); - } - } - } - -} - -static void __attribute__((format (printf, 3, 4))) -qprintf(int quote, FILE *f, const char *fmt, ...) - -{ - va_list va; - if (quote) - fprintf(f, "\" "); - va_start(va, fmt); - vfprintf(f, fmt, va); - va_end(va); -} - -void -printsub(int direction, unsigned char *pointer, size_t length) -{ - int i; - unsigned char buf[512]; - - if (showoptions || direction == 0 || - (want_status_response && (pointer[0] == TELOPT_STATUS))) { - if (direction) { - fprintf(NetTrace, "%s IAC SB ", - (direction == '<')? "RCVD":"SENT"); - if (length >= 3) { - int j; - - i = pointer[length-2]; - j = pointer[length-1]; - - if (i != IAC || j != SE) { - fprintf(NetTrace, "(terminated by "); - if (TELOPT_OK(i)) - fprintf(NetTrace, "%s ", TELOPT(i)); - else if (TELCMD_OK(i)) - fprintf(NetTrace, "%s ", TELCMD(i)); - else - fprintf(NetTrace, "%d ", i); - if (TELOPT_OK(j)) - fprintf(NetTrace, "%s", TELOPT(j)); - else if (TELCMD_OK(j)) - fprintf(NetTrace, "%s", TELCMD(j)); - else - fprintf(NetTrace, "%d", j); - fprintf(NetTrace, ", not IAC SE!) "); - } - } - length -= 2; - } - if (length < 1) { - fprintf(NetTrace, "(Empty suboption??\?)"); - if (NetTrace == stdout) - fflush(NetTrace); - return; - } - switch (pointer[0]) { - case TELOPT_TTYPE: - fprintf(NetTrace, "TERMINAL-TYPE "); - switch (pointer[1]) { - case TELQUAL_IS: - fprintf(NetTrace, "IS \"%.*s\"", - (int)(length-2), - (char *)pointer+2); - break; - case TELQUAL_SEND: - fprintf(NetTrace, "SEND"); - break; - default: - fprintf(NetTrace, - "- unknown qualifier %d (0x%x).", - pointer[1], pointer[1]); - } - break; - case TELOPT_TSPEED: - fprintf(NetTrace, "TERMINAL-SPEED"); - if (length < 2) { - fprintf(NetTrace, " (empty suboption??\?)"); - break; - } - switch (pointer[1]) { - case TELQUAL_IS: - fprintf(NetTrace, " IS "); - fprintf(NetTrace, "%.*s", (int)(length-2), (char *)pointer+2); - break; - default: - if (pointer[1] == 1) - fprintf(NetTrace, " SEND"); - else - fprintf(NetTrace, " %d (unknown)", pointer[1]); - for (i = 2; i < length; i++) - fprintf(NetTrace, " ?%d?", pointer[i]); - break; - } - break; - - case TELOPT_LFLOW: - fprintf(NetTrace, "TOGGLE-FLOW-CONTROL"); - if (length < 2) { - fprintf(NetTrace, " (empty suboption??\?)"); - break; - } - switch (pointer[1]) { - case LFLOW_OFF: - fprintf(NetTrace, " OFF"); break; - case LFLOW_ON: - fprintf(NetTrace, " ON"); break; - case LFLOW_RESTART_ANY: - fprintf(NetTrace, " RESTART-ANY"); break; - case LFLOW_RESTART_XON: - fprintf(NetTrace, " RESTART-XON"); break; - default: - fprintf(NetTrace, " %d (unknown)", pointer[1]); - } - for (i = 2; i < length; i++) - fprintf(NetTrace, " ?%d?", pointer[i]); - break; - - case TELOPT_NAWS: - fprintf(NetTrace, "NAWS"); - if (length < 2) { - fprintf(NetTrace, " (empty suboption??\?)"); - break; - } - if (length == 2) { - fprintf(NetTrace, " ?%d?", pointer[1]); - break; - } - fprintf(NetTrace, " %d %d (%d)", - pointer[1], pointer[2], - (int)((((unsigned int)pointer[1])<<8)|((unsigned int)pointer[2]))); - if (length == 4) { - fprintf(NetTrace, " ?%d?", pointer[3]); - break; - } - fprintf(NetTrace, " %d %d (%d)", - pointer[3], pointer[4], - (int)((((unsigned int)pointer[3])<<8)|((unsigned int)pointer[4]))); - for (i = 5; i < length; i++) - fprintf(NetTrace, " ?%d?", pointer[i]); - break; - -#if defined(AUTHENTICATION) - case TELOPT_AUTHENTICATION: - fprintf(NetTrace, "AUTHENTICATION"); - if (length < 2) { - fprintf(NetTrace, " (empty suboption??\?)"); - break; - } - switch (pointer[1]) { - case TELQUAL_REPLY: - case TELQUAL_IS: - fprintf(NetTrace, " %s ", (pointer[1] == TELQUAL_IS) ? - "IS" : "REPLY"); - if (AUTHTYPE_NAME_OK(pointer[2])) - fprintf(NetTrace, "%s ", AUTHTYPE_NAME(pointer[2])); - else - fprintf(NetTrace, "%d ", pointer[2]); - if (length < 3) { - fprintf(NetTrace, "(partial suboption??\?)"); - break; - } - fprintf(NetTrace, "%s|%s", - ((pointer[3] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT) ? - "CLIENT" : "SERVER", - ((pointer[3] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) ? - "MUTUAL" : "ONE-WAY"); - - auth_printsub(&pointer[1], length - 1, buf, sizeof(buf)); - fprintf(NetTrace, "%s", buf); - break; - - case TELQUAL_SEND: - i = 2; - fprintf(NetTrace, " SEND "); - while (i < length) { - if (AUTHTYPE_NAME_OK(pointer[i])) - fprintf(NetTrace, "%s ", AUTHTYPE_NAME(pointer[i])); - else - fprintf(NetTrace, "%d ", pointer[i]); - if (++i >= length) { - fprintf(NetTrace, "(partial suboption??\?)"); - break; - } - fprintf(NetTrace, "%s|%s ", - ((pointer[i] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT) ? - "CLIENT" : "SERVER", - ((pointer[i] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) ? - "MUTUAL" : "ONE-WAY"); - ++i; - } - break; - - case TELQUAL_NAME: - i = 2; - fprintf(NetTrace, " NAME \""); - while (i < length) - putc(pointer[i++], NetTrace); - putc('"', NetTrace); - break; - - default: - for (i = 2; i < length; i++) - fprintf(NetTrace, " ?%d?", pointer[i]); - break; - } - break; -#endif - -#if defined(ENCRYPTION) - case TELOPT_ENCRYPT: - fprintf(NetTrace, "ENCRYPT"); - if (length < 2) { - fprintf(NetTrace, " (empty suboption?)"); - break; - } - switch (pointer[1]) { - case ENCRYPT_START: - fprintf(NetTrace, " START"); - break; - - case ENCRYPT_END: - fprintf(NetTrace, " END"); - break; - - case ENCRYPT_REQSTART: - fprintf(NetTrace, " REQUEST-START"); - break; - - case ENCRYPT_REQEND: - fprintf(NetTrace, " REQUEST-END"); - break; - - case ENCRYPT_IS: - case ENCRYPT_REPLY: - fprintf(NetTrace, " %s ", (pointer[1] == ENCRYPT_IS) ? - "IS" : "REPLY"); - if (length < 3) { - fprintf(NetTrace, " (partial suboption?)"); - break; - } - if (ENCTYPE_NAME_OK(pointer[2])) - fprintf(NetTrace, "%s ", ENCTYPE_NAME(pointer[2])); - else - fprintf(NetTrace, " %d (unknown)", pointer[2]); - - encrypt_printsub(&pointer[1], length - 1, buf, sizeof(buf)); - fprintf(NetTrace, "%s", buf); - break; - - case ENCRYPT_SUPPORT: - i = 2; - fprintf(NetTrace, " SUPPORT "); - while (i < length) { - if (ENCTYPE_NAME_OK(pointer[i])) - fprintf(NetTrace, "%s ", ENCTYPE_NAME(pointer[i])); - else - fprintf(NetTrace, "%d ", pointer[i]); - i++; - } - break; - - case ENCRYPT_ENC_KEYID: - fprintf(NetTrace, " ENC_KEYID "); - goto encommon; - - case ENCRYPT_DEC_KEYID: - fprintf(NetTrace, " DEC_KEYID "); - goto encommon; - - default: - fprintf(NetTrace, " %d (unknown)", pointer[1]); - encommon: - for (i = 2; i < length; i++) - fprintf(NetTrace, " %d", pointer[i]); - break; - } - break; -#endif - - case TELOPT_LINEMODE: - fprintf(NetTrace, "LINEMODE "); - if (length < 2) { - fprintf(NetTrace, " (empty suboption??\?)"); - break; - } - switch (pointer[1]) { - case WILL: - fprintf(NetTrace, "WILL "); - goto common; - case WONT: - fprintf(NetTrace, "WONT "); - goto common; - case DO: - fprintf(NetTrace, "DO "); - goto common; - case DONT: - fprintf(NetTrace, "DONT "); - common: - if (length < 3) { - fprintf(NetTrace, "(no option??\?)"); - break; - } - switch (pointer[2]) { - case LM_FORWARDMASK: - fprintf(NetTrace, "Forward Mask"); - for (i = 3; i < length; i++) - fprintf(NetTrace, " %x", pointer[i]); - break; - default: - fprintf(NetTrace, "%d (unknown)", pointer[2]); - for (i = 3; i < length; i++) - fprintf(NetTrace, " %d", pointer[i]); - break; - } - break; - - case LM_SLC: - fprintf(NetTrace, "SLC"); - for (i = 2; i < length - 2; i += 3) { - if (SLC_NAME_OK(pointer[i+SLC_FUNC])) - fprintf(NetTrace, " %s", SLC_NAME(pointer[i+SLC_FUNC])); - else - fprintf(NetTrace, " %d", pointer[i+SLC_FUNC]); - switch (pointer[i+SLC_FLAGS]&SLC_LEVELBITS) { - case SLC_NOSUPPORT: - fprintf(NetTrace, " NOSUPPORT"); break; - case SLC_CANTCHANGE: - fprintf(NetTrace, " CANTCHANGE"); break; - case SLC_VARIABLE: - fprintf(NetTrace, " VARIABLE"); break; - case SLC_DEFAULT: - fprintf(NetTrace, " DEFAULT"); break; - } - fprintf(NetTrace, "%s%s%s", - pointer[i+SLC_FLAGS]&SLC_ACK ? "|ACK" : "", - pointer[i+SLC_FLAGS]&SLC_FLUSHIN ? "|FLUSHIN" : "", - pointer[i+SLC_FLAGS]&SLC_FLUSHOUT ? "|FLUSHOUT" : ""); - if (pointer[i+SLC_FLAGS]& ~(SLC_ACK|SLC_FLUSHIN| - SLC_FLUSHOUT| SLC_LEVELBITS)) - fprintf(NetTrace, "(0x%x)", pointer[i+SLC_FLAGS]); - fprintf(NetTrace, " %d;", pointer[i+SLC_VALUE]); - if ((pointer[i+SLC_VALUE] == IAC) && - (pointer[i+SLC_VALUE+1] == IAC)) - i++; - } - for (; i < length; i++) - fprintf(NetTrace, " ?%d?", pointer[i]); - break; - - case LM_MODE: - fprintf(NetTrace, "MODE "); - if (length < 3) { - fprintf(NetTrace, "(no mode??\?)"); - break; - } - { - char tbuf[64]; - snprintf(tbuf, sizeof(tbuf), - "%s%s%s%s%s", - pointer[2]&MODE_EDIT ? "|EDIT" : "", - pointer[2]&MODE_TRAPSIG ? "|TRAPSIG" : "", - pointer[2]&MODE_SOFT_TAB ? "|SOFT_TAB" : "", - pointer[2]&MODE_LIT_ECHO ? "|LIT_ECHO" : "", - pointer[2]&MODE_ACK ? "|ACK" : ""); - fprintf(NetTrace, "%s", tbuf[1] ? &tbuf[1] : "0"); - } - if (pointer[2]&~(MODE_MASK)) - fprintf(NetTrace, " (0x%x)", pointer[2]); - for (i = 3; i < length; i++) - fprintf(NetTrace, " ?0x%x?", pointer[i]); - break; - default: - fprintf(NetTrace, "%d (unknown)", pointer[1]); - for (i = 2; i < length; i++) - fprintf(NetTrace, " %d", pointer[i]); - } - break; - - case TELOPT_STATUS: { - char *cp; - int j, k; - - fprintf(NetTrace, "STATUS"); - - switch (pointer[1]) { - default: - if (pointer[1] == TELQUAL_SEND) - fprintf(NetTrace, " SEND"); - else - fprintf(NetTrace, " %d (unknown)", pointer[1]); - for (i = 2; i < length; i++) - fprintf(NetTrace, " ?%d?", pointer[i]); - break; - case TELQUAL_IS: - if (--want_status_response < 0) - want_status_response = 0; - if (NetTrace == stdout) - fprintf(NetTrace, " IS\r\n"); - else - fprintf(NetTrace, " IS\n"); - - for (i = 2; i < length; i++) { - switch(pointer[i]) { - case DO: cp = "DO"; goto common2; - case DONT: cp = "DONT"; goto common2; - case WILL: cp = "WILL"; goto common2; - case WONT: cp = "WONT"; goto common2; - common2: - i++; - if (TELOPT_OK((int)pointer[i])) - fprintf(NetTrace, " %s %s", cp, TELOPT(pointer[i])); - else - fprintf(NetTrace, " %s %d", cp, pointer[i]); - - if (NetTrace == stdout) - fprintf(NetTrace, "\r\n"); - else - fprintf(NetTrace, "\n"); - break; - - case SB: - fprintf(NetTrace, " SB "); - i++; - j = k = i; - while (j < length) { - if (pointer[j] == SE) { - if (j+1 == length) - break; - if (pointer[j+1] == SE) - j++; - else - break; - } - pointer[k++] = pointer[j++]; - } - printsub(0, &pointer[i], k - i); - if (i < length) { - fprintf(NetTrace, " SE"); - i = j; - } else - i = j - 1; - - if (NetTrace == stdout) - fprintf(NetTrace, "\r\n"); - else - fprintf(NetTrace, "\n"); - - break; - - default: - fprintf(NetTrace, " %d", pointer[i]); - break; - } - } - break; - } - break; - } - - case TELOPT_XDISPLOC: - fprintf(NetTrace, "X-DISPLAY-LOCATION "); - switch (pointer[1]) { - case TELQUAL_IS: - fprintf(NetTrace, "IS \"%.*s\"", (int)(length-2), (char *)pointer+2); - break; - case TELQUAL_SEND: - fprintf(NetTrace, "SEND"); - break; - default: - fprintf(NetTrace, "- unknown qualifier %d (0x%x).", - pointer[1], pointer[1]); - } - break; - - case TELOPT_NEW_ENVIRON: - fprintf(NetTrace, "NEW-ENVIRON "); -#ifdef OLD_ENVIRON - goto env_common1; - case TELOPT_OLD_ENVIRON: - fprintf(NetTrace, "OLD-ENVIRON"); - env_common1: -#endif - switch (pointer[1]) { - case TELQUAL_IS: - fprintf(NetTrace, "IS "); - goto env_common; - case TELQUAL_SEND: - fprintf(NetTrace, "SEND "); - goto env_common; - case TELQUAL_INFO: - fprintf(NetTrace, "INFO "); - env_common: - { - int quote = 0; - for (i = 2; i < length; i++ ) { - switch (pointer[i]) { - case NEW_ENV_VAR: - qprintf(quote, NetTrace, "VAR "); - quote = 0; - break; - - case NEW_ENV_VALUE: - qprintf(quote, NetTrace, "VALUE"); - quote = 0; - break; - - case ENV_ESC: - qprintf(quote, NetTrace, "ESC "); - quote = 0; - break; - - case ENV_USERVAR: - qprintf(quote, NetTrace, "USERVAR "); - quote = 0; - break; - - default: - if (isprint(pointer[i]) && pointer[i] != '"') { - if (!quote) { - putc('"', NetTrace); - quote = 1; - } - putc(pointer[i], NetTrace); - } else { - qprintf(quote, NetTrace, "%03o ", pointer[i]); - quote = 0; - } - break; - } - } - if (quote) - putc('"', NetTrace); - break; - } - } - break; - - default: - if (TELOPT_OK(pointer[0])) - fprintf(NetTrace, "%s (unknown)", TELOPT(pointer[0])); - else - fprintf(NetTrace, "%d (unknown)", pointer[0]); - for (i = 1; i < length; i++) - fprintf(NetTrace, " %d", pointer[i]); - break; - } - if (direction) { - if (NetTrace == stdout) - fprintf(NetTrace, "\r\n"); - else - fprintf(NetTrace, "\n"); - } - if (NetTrace == stdout) - fflush(NetTrace); - } -} - -/* EmptyTerminal - called to make sure that the terminal buffer is empty. - * Note that we consider the buffer to run all the - * way to the kernel (thus the select). - */ - -void -EmptyTerminal(void) -{ - fd_set outs; - - FD_ZERO(&outs); - - if (tout >= FD_SETSIZE) - ExitString("fd too large", 1); - - if (TTYBYTES() == 0) { - FD_SET(tout, &outs); - select(tout+1, 0, &outs, 0, - (struct timeval *) 0); /* wait for TTLOWAT */ - } else { - while (TTYBYTES()) { - ttyflush(0); - FD_SET(tout, &outs); - select(tout+1, 0, &outs, 0, - (struct timeval *) 0); /* wait for TTLOWAT */ - } - } -} - -void -SetForExit(void) -{ - setconnmode(0); - do { - telrcv(); /* Process any incoming data */ - EmptyTerminal(); - } while (ring_full_count(&netiring)); /* While there is any */ - setcommandmode(); - fflush(stdout); - fflush(stderr); - setconnmode(0); - EmptyTerminal(); /* Flush the path to the tty */ - setcommandmode(); -} - -void -Exit(int returnCode) -{ - SetForExit(); - exit(returnCode); -} - -void -ExitString(char *string, int returnCode) -{ - SetForExit(); - fwrite(string, 1, strlen(string), stderr); - exit(returnCode); -} diff --git a/kerberosV/src/appl/telnet/telnetd/Makefile.am b/kerberosV/src/appl/telnet/telnetd/Makefile.am deleted file mode 100644 index 038b9b32829..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:38 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += -I$(srcdir)/.. $(INCLUDE_hcrypto) - -libexec_PROGRAMS = telnetd - -CHECK_LOCAL = - -telnetd_SOURCES = telnetd.c state.c termstat.c slc.c sys_term.c \ - utility.c global.c authenc.c defs.h ext.h telnetd.h - -man_MANS = telnetd.8 - -LDADD = \ - ../libtelnet/libtelnet.a \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_tgetent) \ - $(LIB_logwtmp) \ - $(LIB_logout) \ - $(LIB_openpty) \ - $(LIB_kdfs) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) diff --git a/kerberosV/src/appl/telnet/telnetd/Makefile.in b/kerberosV/src/appl/telnet/telnetd/Makefile.in deleted file mode 100644 index 8f61522bcc0..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/Makefile.in +++ /dev/null @@ -1,973 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -libexec_PROGRAMS = telnetd$(EXEEXT) -subdir = appl/telnet/telnetd -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man8dir)" -PROGRAMS = $(libexec_PROGRAMS) -am_telnetd_OBJECTS = telnetd.$(OBJEXT) state.$(OBJEXT) \ - termstat.$(OBJEXT) slc.$(OBJEXT) sys_term.$(OBJEXT) \ - utility.$(OBJEXT) global.$(OBJEXT) authenc.$(OBJEXT) -telnetd_OBJECTS = $(am_telnetd_OBJECTS) -telnetd_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -telnetd_DEPENDENCIES = ../libtelnet/libtelnet.a $(LIB_krb5) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(LIB_kdfs) $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(telnetd_SOURCES) -DIST_SOURCES = $(telnetd_SOURCES) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man8dir = $(mandir)/man8 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -I$(srcdir)/.. $(INCLUDE_hcrypto) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -CHECK_LOCAL = -telnetd_SOURCES = telnetd.c state.c termstat.c slc.c sys_term.c \ - utility.c global.c authenc.c defs.h ext.h telnetd.h - -man_MANS = telnetd.8 -LDADD = \ - ../libtelnet/libtelnet.a \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_tgetent) \ - $(LIB_logwtmp) \ - $(LIB_logout) \ - $(LIB_openpty) \ - $(LIB_kdfs) \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile $(man_MANS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/telnet/telnetd/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/telnet/telnetd/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libexecPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexecdir)" && rm -f $$files - -clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -telnetd$(EXEEXT): $(telnetd_OBJECTS) $(telnetd_DEPENDENCIES) - @rm -f telnetd$(EXEEXT) - $(LINK) $(telnetd_OBJECTS) $(telnetd_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/authenc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/global.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys_term.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/telnetd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/termstat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utility.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libexecPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libexecPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man8 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libexecPROGRAMS clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ - install-libexecPROGRAMS install-man install-man8 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-libexecPROGRAMS uninstall-man uninstall-man8 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/telnet/telnetd/NTMakefile b/kerberosV/src/appl/telnet/telnetd/NTMakefile deleted file mode 100644 index 03bead1015f..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\telnet\telnetd - -!include ../../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/telnet/telnetd/authenc.c b/kerberosV/src/appl/telnet/telnetd/authenc.c deleted file mode 100644 index 4bf073a37ed..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/authenc.c +++ /dev/null @@ -1,80 +0,0 @@ -/*- - * Copyright (c) 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. - */ - -#include "telnetd.h" - -RCSID("$Id: authenc.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#ifdef AUTHENTICATION - -int -telnet_net_write(unsigned char *str, int len) -{ - if (nfrontp + len < netobuf + BUFSIZ) { - memmove(nfrontp, str, len); - nfrontp += len; - return(len); - } - return(0); -} - -void -net_encrypt(void) -{ -#ifdef ENCRYPTION - char *s = (nclearto > nbackp) ? nclearto : nbackp; - if (s < nfrontp && encrypt_output) { - (*encrypt_output)((unsigned char *)s, nfrontp - s); - } - nclearto = nfrontp; -#endif -} - -int -telnet_spin(void) -{ - return ttloop(); -} - -char * -telnet_getenv(const char *val) -{ - return(getenv(val)); -} - -char * -telnet_gets(char *prompt, char *result, int length, int echo) -{ - return NULL; -} -#endif diff --git a/kerberosV/src/appl/telnet/telnetd/defs.h b/kerberosV/src/appl/telnet/telnetd/defs.h deleted file mode 100644 index dde22cbe35e..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/defs.h +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 1989, 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. - * - * @(#)defs.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * Telnet server defines - */ - -#ifndef __DEFS_H__ -#define __DEFS_H__ - -#ifndef BSD -# define BSD 43 -#endif - -#if defined(PRINTOPTIONS) && defined(DIAGNOSTICS) -#define TELOPTS -#define TELCMDS -#define SLC_NAMES -#endif - -#if !defined(TIOCSCTTY) && defined(TCSETCTTY) -# define TIOCSCTTY TCSETCTTY -#endif - -#ifndef TIOCPKT_FLUSHWRITE -#define TIOCPKT_FLUSHWRITE 0x02 -#endif - -#ifndef TIOCPKT_NOSTOP -#define TIOCPKT_NOSTOP 0x10 -#endif - -#ifndef TIOCPKT_DOSTOP -#define TIOCPKT_DOSTOP 0x20 -#endif - -/* - * I/O data buffers defines - */ -#define NETSLOP 64 -#ifdef _CRAY -#undef BUFSIZ -#define BUFSIZ 2048 -#endif - -#define NIACCUM(c) { *netip++ = c; \ - ncc++; \ - } - -/* clock manipulations */ -#define settimer(x) (clocks.x = ++clocks.system) -#define sequenceIs(x,y) (clocks.x < clocks.y) - -/* - * Structures of information for each special character function. - */ -typedef struct { - unsigned char flag; /* the flags for this function */ - cc_t val; /* the value of the special character */ -} slcent, *Slcent; - -typedef struct { - slcent defset; /* the default settings */ - slcent current; /* the current settings */ - cc_t *sptr; /* a pointer to the char in */ - /* system data structures */ -} slcfun, *Slcfun; - -#ifdef DIAGNOSTICS -/* - * Diagnostics capabilities - */ -#define TD_REPORT 0x01 /* Report operations to client */ -#define TD_EXERCISE 0x02 /* Exercise client's implementation */ -#define TD_NETDATA 0x04 /* Display received data stream */ -#define TD_PTYDATA 0x08 /* Display data passed to pty */ -#define TD_OPTIONS 0x10 /* Report just telnet options */ -#endif /* DIAGNOSTICS */ - -/* - * We keep track of each side of the option negotiation. - */ - -#define MY_STATE_WILL 0x01 -#define MY_WANT_STATE_WILL 0x02 -#define MY_STATE_DO 0x04 -#define MY_WANT_STATE_DO 0x08 - -/* - * Macros to check the current state of things - */ - -#define my_state_is_do(opt) (options[opt]&MY_STATE_DO) -#define my_state_is_will(opt) (options[opt]&MY_STATE_WILL) -#define my_want_state_is_do(opt) (options[opt]&MY_WANT_STATE_DO) -#define my_want_state_is_will(opt) (options[opt]&MY_WANT_STATE_WILL) - -#define my_state_is_dont(opt) (!my_state_is_do(opt)) -#define my_state_is_wont(opt) (!my_state_is_will(opt)) -#define my_want_state_is_dont(opt) (!my_want_state_is_do(opt)) -#define my_want_state_is_wont(opt) (!my_want_state_is_will(opt)) - -#define set_my_state_do(opt) (options[opt] |= MY_STATE_DO) -#define set_my_state_will(opt) (options[opt] |= MY_STATE_WILL) -#define set_my_want_state_do(opt) (options[opt] |= MY_WANT_STATE_DO) -#define set_my_want_state_will(opt) (options[opt] |= MY_WANT_STATE_WILL) - -#define set_my_state_dont(opt) (options[opt] &= ~MY_STATE_DO) -#define set_my_state_wont(opt) (options[opt] &= ~MY_STATE_WILL) -#define set_my_want_state_dont(opt) (options[opt] &= ~MY_WANT_STATE_DO) -#define set_my_want_state_wont(opt) (options[opt] &= ~MY_WANT_STATE_WILL) - -/* - * Tricky code here. What we want to know is if the MY_STATE_WILL - * and MY_WANT_STATE_WILL bits have the same value. Since the two - * bits are adjacent, a little arithmatic will show that by adding - * in the lower bit, the upper bit will be set if the two bits were - * different, and clear if they were the same. - */ -#define my_will_wont_is_changing(opt) \ - ((options[opt]+MY_STATE_WILL) & MY_WANT_STATE_WILL) - -#define my_do_dont_is_changing(opt) \ - ((options[opt]+MY_STATE_DO) & MY_WANT_STATE_DO) - -/* - * Make everything symmetrical - */ - -#define HIS_STATE_WILL MY_STATE_DO -#define HIS_WANT_STATE_WILL MY_WANT_STATE_DO -#define HIS_STATE_DO MY_STATE_WILL -#define HIS_WANT_STATE_DO MY_WANT_STATE_WILL - -#define his_state_is_do my_state_is_will -#define his_state_is_will my_state_is_do -#define his_want_state_is_do my_want_state_is_will -#define his_want_state_is_will my_want_state_is_do - -#define his_state_is_dont my_state_is_wont -#define his_state_is_wont my_state_is_dont -#define his_want_state_is_dont my_want_state_is_wont -#define his_want_state_is_wont my_want_state_is_dont - -#define set_his_state_do set_my_state_will -#define set_his_state_will set_my_state_do -#define set_his_want_state_do set_my_want_state_will -#define set_his_want_state_will set_my_want_state_do - -#define set_his_state_dont set_my_state_wont -#define set_his_state_wont set_my_state_dont -#define set_his_want_state_dont set_my_want_state_wont -#define set_his_want_state_wont set_my_want_state_dont - -#define his_will_wont_is_changing my_do_dont_is_changing -#define his_do_dont_is_changing my_will_wont_is_changing - -#endif /* __DEFS_H__ */ diff --git a/kerberosV/src/appl/telnet/telnetd/ext.h b/kerberosV/src/appl/telnet/telnetd/ext.h deleted file mode 100644 index 8d84b1665cc..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/ext.h +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright (c) 1989, 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. - * - * @(#)ext.h 8.2 (Berkeley) 12/15/93 - */ - -/* $Id: ext.h,v 1.3 2013/06/17 19:11:38 robert Exp $ */ - -#ifndef __EXT_H__ -#define __EXT_H__ - -/* - * Telnet server variable declarations - */ -extern char options[256]; -extern char do_dont_resp[256]; -extern char will_wont_resp[256]; -extern int flowmode; /* current flow control state */ -extern int restartany; /* restart output on any character state */ -#ifdef DIAGNOSTICS -extern int diagnostic; /* telnet diagnostic capabilities */ -#endif /* DIAGNOSTICS */ -extern int require_otp; -#ifdef AUTHENTICATION -extern int auth_level; -#endif -extern const char *new_login; - -extern slcfun slctab[NSLC + 1]; /* slc mapping table */ - -extern char terminaltype[41]; - -/* - * I/O data buffers, pointers, and counters. - */ -extern char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp; - -extern char netibuf[BUFSIZ], *netip; - -extern char netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp; -extern char *neturg; /* one past last bye of urgent data */ - -extern int pcc, ncc; - -extern int ourpty, net; -extern char *line; -extern int SYNCHing; /* we are in TELNET SYNCH mode */ - -int telnet_net_write (unsigned char *str, int len); -void net_encrypt (void); -int telnet_spin (void); -char *telnet_getenv (const char *val); -char *telnet_gets (char *prompt, char *result, int length, int echo); -void get_slc_defaults (void); -void telrcv (void); -void send_do (int option, int init); -void willoption (int option); -void send_dont (int option, int init); -void wontoption (int option); -void send_will (int option, int init); -void dooption (int option); -void send_wont (int option, int init); -void dontoption (int option); -void suboption (void); -void doclientstat (void); -void send_status (void); -void init_termbuf (void); -void set_termbuf (void); -int spcset (int func, cc_t *valp, cc_t **valpp); -void set_utid (void); -int getpty (int *ptynum); -int tty_isecho (void); -int tty_flowmode (void); -int tty_restartany (void); -void tty_setecho (int on); -int tty_israw (void); -void tty_binaryin (int on); -void tty_binaryout (int on); -int tty_isbinaryin (void); -int tty_isbinaryout (void); -int tty_issofttab (void); -void tty_setsofttab (int on); -int tty_islitecho (void); -void tty_setlitecho (int on); -int tty_iscrnl (void); -void tty_tspeed (int val); -void tty_rspeed (int val); -void getptyslave (void); -int cleanopen (char *); -void startslave (const char *host, const char *, int autologin, char *autoname); -void init_env (void); -void start_login (const char *host, int autologin, char *name); -void cleanup (int sig); -int main (int argc, char **argv); -int getterminaltype (char *name, size_t); -void _gettermname (void); -int terminaltypeok (char *s); -void my_telnet (int f, int p, const char*, const char *, int, char*); -void interrupt (void); -void sendbrk (void); -void sendsusp (void); -void recv_ayt (void); -void doeof (void); -void flowstat (void); -void clientstat (int code, int parm1, int parm2); -int ttloop (void); -int stilloob (int s); -void ptyflush (void); -char *nextitem (char *current); -void netclear (void); -void netflush (void); -void writenet (const void *, size_t); -void fatal (int f, char *msg); -void fatalperror (int f, const char *msg); -void fatalperror_errno (int f, const char *msg, int error); -void edithost (char *pat, char *host); -void putstr (char *s); -void putchr (int cc); -void putf (char *cp, char *where); -void printoption (char *fmt, int option); -void printsub (int direction, unsigned char *pointer, size_t length); -void printdata (char *tag, char *ptr, size_t cnt); -int login_tty(int t); - -#ifdef ENCRYPTION -extern void (*encrypt_output) (unsigned char *, int); -extern int (*decrypt_input) (int); -extern char *nclearto; -#endif - - -/* - * The following are some clocks used to decide how to interpret - * the relationship between various variables. - */ - -struct clocks_t{ - int - system, /* what the current time is */ - echotoggle, /* last time user entered echo character */ - modenegotiated, /* last time operating mode negotiated */ - didnetreceive, /* last time we read data from network */ - ttypesubopt, /* ttype subopt is received */ - tspeedsubopt, /* tspeed subopt is received */ - environsubopt, /* environ subopt is received */ - oenvironsubopt, /* old environ subopt is received */ - xdisplocsubopt, /* xdisploc subopt is received */ - baseline, /* time started to do timed action */ - gotDM; /* when did we last see a data mark */ -}; -extern struct clocks_t clocks; - -extern int log_unauth; -extern int no_warn; - -extern int def_tspeed, def_rspeed; -#ifdef TIOCSWINSZ -extern int def_row, def_col; -#endif - -#ifdef STREAMSPTY -extern int really_stream; -#endif - -#ifndef USE_IM -# ifdef CRAY -# define USE_IM "Cray UNICOS (%h) (%t)" -# endif -# ifdef _AIX -# define USE_IM "%s %v.%r (%h) (%t)" -# endif -# ifndef USE_IM -# define USE_IM "%s %r (%h) (%t)" -# endif -#endif - -#define DEFAULT_IM "\r\n\r\n" USE_IM "\r\n\r\n\r\n" - -#endif /* __EXT_H__ */ diff --git a/kerberosV/src/appl/telnet/telnetd/global.c b/kerberosV/src/appl/telnet/telnetd/global.c deleted file mode 100644 index a8f422e4462..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/global.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 1989, 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. - */ - -/* a *lot* of ugly global definitions that really should be removed... - */ - -#include "telnetd.h" - -RCSID("$Id: global.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -/* - * Telnet server variable declarations - */ -char options[256]; -char do_dont_resp[256]; -char will_wont_resp[256]; -int linemode; /* linemode on/off */ -int flowmode; /* current flow control state */ -int restartany; /* restart output on any character state */ -#ifdef DIAGNOSTICS -int diagnostic; /* telnet diagnostic capabilities */ -#endif /* DIAGNOSTICS */ -int require_otp; - -slcfun slctab[NSLC + 1]; /* slc mapping table */ - -char terminaltype[41]; - -/* - * I/O data buffers, pointers, and counters. - */ -char ptyobuf[BUFSIZ+NETSLOP], *pfrontp, *pbackp; - -char netibuf[BUFSIZ], *netip; - -char netobuf[BUFSIZ+NETSLOP], *nfrontp, *nbackp; -char *neturg; /* one past last bye of urgent data */ - -int pcc, ncc; - -int ourpty, net; -int SYNCHing; /* we are in TELNET SYNCH mode */ - -/* - * The following are some clocks used to decide how to interpret - * the relationship between various variables. - */ - -struct clocks_t clocks; - - -/* whether to log unauthenticated login attempts */ -int log_unauth; - -/* do not print warning if connection is not encrypted */ -int no_warn; - -/* - * This function appends data to nfrontp and advances nfrontp. - */ - -int -output_data (const char *format, ...) -{ - va_list args; - int remaining, ret; - - va_start(args, format); - remaining = BUFSIZ - (nfrontp - netobuf); - ret = vsnprintf (nfrontp, - remaining, - format, - args); - nfrontp += min(ret, remaining-1); - va_end(args); - return ret; -} diff --git a/kerberosV/src/appl/telnet/telnetd/slc.c b/kerberosV/src/appl/telnet/telnetd/slc.c deleted file mode 100644 index 22e6b462eca..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/slc.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 1989, 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. - */ - -#include "telnetd.h" - -RCSID("$Id: slc.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -/* - * get_slc_defaults - * - * Initialize the slc mapping table. - */ -void -get_slc_defaults(void) -{ - int i; - - init_termbuf(); - - for (i = 1; i <= NSLC; i++) { - slctab[i].defset.flag = - spcset(i, &slctab[i].defset.val, &slctab[i].sptr); - slctab[i].current.flag = SLC_NOSUPPORT; - slctab[i].current.val = 0; - } - -} diff --git a/kerberosV/src/appl/telnet/telnetd/state.c b/kerberosV/src/appl/telnet/telnetd/state.c deleted file mode 100644 index 742fec8201b..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/state.c +++ /dev/null @@ -1,1360 +0,0 @@ -/* - * Copyright (c) 1989, 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. - */ - -#include "telnetd.h" - -RCSID("$Id: state.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -unsigned char doopt[] = { IAC, DO, '%', 'c', 0 }; -unsigned char dont[] = { IAC, DONT, '%', 'c', 0 }; -unsigned char will[] = { IAC, WILL, '%', 'c', 0 }; -unsigned char wont[] = { IAC, WONT, '%', 'c', 0 }; -int not42 = 1; - -/* - * Buffer for sub-options, and macros - * for suboptions buffer manipulations - */ -unsigned char subbuffer[1024*64], *subpointer= subbuffer, *subend= subbuffer; - -#define SB_CLEAR() subpointer = subbuffer -#define SB_TERM() { subend = subpointer; SB_CLEAR(); } -#define SB_ACCUM(c) if (subpointer < (subbuffer+sizeof subbuffer)) { \ - *subpointer++ = (c); \ - } -#define SB_GET() ((*subpointer++)&0xff) -#define SB_EOF() (subpointer >= subend) -#define SB_LEN() (subend - subpointer) - -#ifdef ENV_HACK -unsigned char *subsave; -#define SB_SAVE() subsave = subpointer; -#define SB_RESTORE() subpointer = subsave; -#endif - - -/* - * State for recv fsm - */ -#define TS_DATA 0 /* base state */ -#define TS_IAC 1 /* look for double IAC's */ -#define TS_CR 2 /* CR-LF ->'s CR */ -#define TS_SB 3 /* throw away begin's... */ -#define TS_SE 4 /* ...end's (suboption negotiation) */ -#define TS_WILL 5 /* will option negotiation */ -#define TS_WONT 6 /* wont -''- */ -#define TS_DO 7 /* do -''- */ -#define TS_DONT 8 /* dont -''- */ - -void -telrcv(void) -{ - int c; - static int state = TS_DATA; - - while (ncc > 0) { - if ((&ptyobuf[BUFSIZ] - pfrontp) < 2) - break; - c = *netip++ & 0377, ncc--; -#ifdef ENCRYPTION - if (decrypt_input) - c = (*decrypt_input)(c); -#endif - switch (state) { - - case TS_CR: - state = TS_DATA; - /* Strip off \n or \0 after a \r */ - if ((c == 0) || (c == '\n')) { - break; - } - /* FALL THROUGH */ - - case TS_DATA: - if (c == IAC) { - state = TS_IAC; - break; - } - /* - * We now map \r\n ==> \r for pragmatic reasons. - * Many client implementations send \r\n when - * the user hits the CarriageReturn key. - * - * We USED to map \r\n ==> \n, since \r\n says - * that we want to be in column 1 of the next - * printable line, and \n is the standard - * unix way of saying that (\r is only good - * if CRMOD is set, which it normally is). - */ - if ((c == '\r') && his_state_is_wont(TELOPT_BINARY)) { - int nc = *netip; -#ifdef ENCRYPTION - if (decrypt_input) - nc = (*decrypt_input)(nc & 0xff); -#endif - { -#ifdef ENCRYPTION - if (decrypt_input) - (void)(*decrypt_input)(-1); -#endif - state = TS_CR; - } - } - *pfrontp++ = c; - break; - - case TS_IAC: - gotiac: switch (c) { - - /* - * Send the process on the pty side an - * interrupt. Do this with a NULL or - * interrupt char; depending on the tty mode. - */ - case IP: - DIAG(TD_OPTIONS, - printoption("td: recv IAC", c)); - interrupt(); - break; - - case BREAK: - DIAG(TD_OPTIONS, - printoption("td: recv IAC", c)); - sendbrk(); - break; - - /* - * Are You There? - */ - case AYT: - DIAG(TD_OPTIONS, - printoption("td: recv IAC", c)); - recv_ayt(); - break; - - /* - * Abort Output - */ - case AO: - { - DIAG(TD_OPTIONS, - printoption("td: recv IAC", c)); - ptyflush(); /* half-hearted */ - init_termbuf(); - - if (slctab[SLC_AO].sptr && - *slctab[SLC_AO].sptr != (cc_t)(_POSIX_VDISABLE)) { - *pfrontp++ = - (unsigned char)*slctab[SLC_AO].sptr; - } - - netclear(); /* clear buffer back */ - output_data ("%c%c", IAC, DM); - neturg = nfrontp-1; /* off by one XXX */ - DIAG(TD_OPTIONS, - printoption("td: send IAC", DM)); - break; - } - - /* - * Erase Character and - * Erase Line - */ - case EC: - case EL: - { - cc_t ch; - - DIAG(TD_OPTIONS, - printoption("td: recv IAC", c)); - ptyflush(); /* half-hearted */ - init_termbuf(); - if (c == EC) - ch = *slctab[SLC_EC].sptr; - else - ch = *slctab[SLC_EL].sptr; - if (ch != (cc_t)(_POSIX_VDISABLE)) - *pfrontp++ = (unsigned char)ch; - break; - } - - /* - * Check for urgent data... - */ - case DM: - DIAG(TD_OPTIONS, - printoption("td: recv IAC", c)); - SYNCHing = stilloob(net); - settimer(gotDM); - break; - - - /* - * Begin option subnegotiation... - */ - case SB: - state = TS_SB; - SB_CLEAR(); - continue; - - case WILL: - state = TS_WILL; - continue; - - case WONT: - state = TS_WONT; - continue; - - case DO: - state = TS_DO; - continue; - - case DONT: - state = TS_DONT; - continue; - case EOR: - if (his_state_is_will(TELOPT_EOR)) - doeof(); - break; - - /* - * Handle RFC 10xx Telnet linemode option additions - * to command stream (EOF, SUSP, ABORT). - */ - case xEOF: - doeof(); - break; - - case SUSP: - sendsusp(); - break; - - case ABORT: - sendbrk(); - break; - - case IAC: - *pfrontp++ = c; - break; - } - state = TS_DATA; - break; - - case TS_SB: - if (c == IAC) { - state = TS_SE; - } else { - SB_ACCUM(c); - } - break; - - case TS_SE: - if (c != SE) { - if (c != IAC) { - /* - * bad form of suboption negotiation. - * handle it in such a way as to avoid - * damage to local state. Parse - * suboption buffer found so far, - * then treat remaining stream as - * another command sequence. - */ - - /* for DIAGNOSTICS */ - SB_ACCUM(IAC); - SB_ACCUM(c); - subpointer -= 2; - - SB_TERM(); - suboption(); - state = TS_IAC; - goto gotiac; - } - SB_ACCUM(c); - state = TS_SB; - } else { - /* for DIAGNOSTICS */ - SB_ACCUM(IAC); - SB_ACCUM(SE); - subpointer -= 2; - - SB_TERM(); - suboption(); /* handle sub-option */ - state = TS_DATA; - } - break; - - case TS_WILL: - willoption(c); - state = TS_DATA; - continue; - - case TS_WONT: - wontoption(c); - if (c==TELOPT_ENCRYPT && his_do_dont_is_changing(TELOPT_ENCRYPT) ) - dontoption(c); - state = TS_DATA; - continue; - - case TS_DO: - dooption(c); - state = TS_DATA; - continue; - - case TS_DONT: - dontoption(c); - state = TS_DATA; - continue; - - default: - syslog(LOG_ERR, "telnetd: panic state=%d\n", state); - printf("telnetd: panic state=%d\n", state); - exit(1); - } - } -} /* end of telrcv */ - -/* - * The will/wont/do/dont state machines are based on Dave Borman's - * Telnet option processing state machine. - * - * These correspond to the following states: - * my_state = the last negotiated state - * want_state = what I want the state to go to - * want_resp = how many requests I have sent - * All state defaults are negative, and resp defaults to 0. - * - * When initiating a request to change state to new_state: - * - * if ((want_resp == 0 && new_state == my_state) || want_state == new_state) { - * do nothing; - * } else { - * want_state = new_state; - * send new_state; - * want_resp++; - * } - * - * When receiving new_state: - * - * if (want_resp) { - * want_resp--; - * if (want_resp && (new_state == my_state)) - * want_resp--; - * } - * if ((want_resp == 0) && (new_state != want_state)) { - * if (ok_to_switch_to new_state) - * want_state = new_state; - * else - * want_resp++; - * send want_state; - * } - * my_state = new_state; - * - * Note that new_state is implied in these functions by the function itself. - * will and do imply positive new_state, wont and dont imply negative. - * - * Finally, there is one catch. If we send a negative response to a - * positive request, my_state will be the positive while want_state will - * remain negative. my_state will revert to negative when the negative - * acknowlegment arrives from the peer. Thus, my_state generally tells - * us not only the last negotiated state, but also tells us what the peer - * wants to be doing as well. It is important to understand this difference - * as we may wish to be processing data streams based on our desired state - * (want_state) or based on what the peer thinks the state is (my_state). - * - * This all works fine because if the peer sends a positive request, the data - * that we receive prior to negative acknowlegment will probably be affected - * by the positive state, and we can process it as such (if we can; if we - * can't then it really doesn't matter). If it is that important, then the - * peer probably should be buffering until this option state negotiation - * is complete. - * - */ -void -send_do(int option, int init) -{ - if (init) { - if ((do_dont_resp[option] == 0 && his_state_is_will(option)) || - his_want_state_is_will(option)) - return; - /* - * Special case for TELOPT_TM: We send a DO, but pretend - * that we sent a DONT, so that we can send more DOs if - * we want to. - */ - if (option == TELOPT_TM) - set_his_want_state_wont(option); - else - set_his_want_state_will(option); - do_dont_resp[option]++; - } - output_data((const char *)doopt, option); - - DIAG(TD_OPTIONS, printoption("td: send do", option)); -} - -#ifdef AUTHENTICATION -extern void auth_request(void); -#endif -#ifdef ENCRYPTION -extern void encrypt_send_support(void); -#endif - -void -willoption(int option) -{ - int changeok = 0; - void (*func)(void) = NULL; - - /* - * process input from peer. - */ - - DIAG(TD_OPTIONS, printoption("td: recv will", option)); - - if (do_dont_resp[option]) { - do_dont_resp[option]--; - if (do_dont_resp[option] && his_state_is_will(option)) - do_dont_resp[option]--; - } - if (do_dont_resp[option] == 0) { - if (his_want_state_is_wont(option)) { - switch (option) { - - case TELOPT_BINARY: - init_termbuf(); - tty_binaryin(1); - set_termbuf(); - changeok++; - break; - - case TELOPT_ECHO: - /* - * See comments below for more info. - */ - not42 = 0; /* looks like a 4.2 system */ - break; - - case TELOPT_TM: - /* - * We never respond to a WILL TM, and - * we leave the state WONT. - */ - return; - - case TELOPT_LFLOW: - /* - * If we are going to support flow control - * option, then don't worry peer that we can't - * change the flow control characters. - */ - slctab[SLC_XON].defset.flag &= ~SLC_LEVELBITS; - slctab[SLC_XON].defset.flag |= SLC_DEFAULT; - slctab[SLC_XOFF].defset.flag &= ~SLC_LEVELBITS; - slctab[SLC_XOFF].defset.flag |= SLC_DEFAULT; - case TELOPT_TTYPE: - case TELOPT_SGA: - case TELOPT_NAWS: - case TELOPT_TSPEED: - case TELOPT_XDISPLOC: - case TELOPT_NEW_ENVIRON: - case TELOPT_OLD_ENVIRON: - changeok++; - break; - - -#ifdef AUTHENTICATION - case TELOPT_AUTHENTICATION: - func = auth_request; - changeok++; - break; -#endif - -#ifdef ENCRYPTION - case TELOPT_ENCRYPT: - func = encrypt_send_support; - changeok++; - break; -#endif - - default: - break; - } - if (changeok) { - set_his_want_state_will(option); - send_do(option, 0); - } else { - do_dont_resp[option]++; - send_dont(option, 0); - } - } else { - /* - * Option processing that should happen when - * we receive conformation of a change in - * state that we had requested. - */ - switch (option) { - case TELOPT_ECHO: - not42 = 0; /* looks like a 4.2 system */ - /* - * Egads, he responded "WILL ECHO". Turn - * it off right now! - */ - send_dont(option, 1); - /* - * "WILL ECHO". Kludge upon kludge! - * A 4.2 client is now echoing user input at - * the tty. This is probably undesireable and - * it should be stopped. The client will - * respond WONT TM to the DO TM that we send to - * check for kludge linemode. When the WONT TM - * arrives, linemode will be turned off and a - * change propogated to the pty. This change - * will cause us to process the new pty state - * in localstat(), which will notice that - * linemode is off and send a WILL ECHO - * so that we are properly in character mode and - * all is well. - */ - break; - -#ifdef AUTHENTICATION - case TELOPT_AUTHENTICATION: - func = auth_request; - break; -#endif - -#ifdef ENCRYPTION - case TELOPT_ENCRYPT: - func = encrypt_send_support; - break; -#endif - - case TELOPT_LFLOW: - func = flowstat; - break; - } - } - } - set_his_state_will(option); - if (func) - (*func)(); -} /* end of willoption */ - -void -send_dont(int option, int init) -{ - if (init) { - if ((do_dont_resp[option] == 0 && his_state_is_wont(option)) || - his_want_state_is_wont(option)) - return; - set_his_want_state_wont(option); - do_dont_resp[option]++; - } - output_data((const char *)dont, option); - - DIAG(TD_OPTIONS, printoption("td: send dont", option)); -} - -void -wontoption(int option) -{ - /* - * Process client input. - */ - - DIAG(TD_OPTIONS, printoption("td: recv wont", option)); - - if (do_dont_resp[option]) { - do_dont_resp[option]--; - if (do_dont_resp[option] && his_state_is_wont(option)) - do_dont_resp[option]--; - } - if (do_dont_resp[option] == 0) { - if (his_want_state_is_will(option)) { - /* it is always ok to change to negative state */ - switch (option) { - case TELOPT_ECHO: - not42 = 1; /* doesn't seem to be a 4.2 system */ - break; - - case TELOPT_BINARY: - init_termbuf(); - tty_binaryin(0); - set_termbuf(); - break; - - case TELOPT_TM: - /* - * If we get a WONT TM, and had sent a DO TM, - * don't respond with a DONT TM, just leave it - * as is. Short circut the state machine to - * achive this. - */ - set_his_want_state_wont(TELOPT_TM); - return; - - case TELOPT_LFLOW: - /* - * If we are not going to support flow control - * option, then let peer know that we can't - * change the flow control characters. - */ - slctab[SLC_XON].defset.flag &= ~SLC_LEVELBITS; - slctab[SLC_XON].defset.flag |= SLC_CANTCHANGE; - slctab[SLC_XOFF].defset.flag &= ~SLC_LEVELBITS; - slctab[SLC_XOFF].defset.flag |= SLC_CANTCHANGE; - break; - -#ifdef AUTHENTICATION - case TELOPT_AUTHENTICATION: - auth_finished(0, AUTH_REJECT); - break; -#endif - - /* - * For options that we might spin waiting for - * sub-negotiation, if the client turns off the - * option rather than responding to the request, - * we have to treat it here as if we got a response - * to the sub-negotiation, (by updating the timers) - * so that we'll break out of the loop. - */ - case TELOPT_TTYPE: - settimer(ttypesubopt); - break; - - case TELOPT_TSPEED: - settimer(tspeedsubopt); - break; - - case TELOPT_XDISPLOC: - settimer(xdisplocsubopt); - break; - - case TELOPT_OLD_ENVIRON: - settimer(oenvironsubopt); - break; - - case TELOPT_NEW_ENVIRON: - settimer(environsubopt); - break; - - default: - break; - } - set_his_want_state_wont(option); - if (his_state_is_will(option)) - send_dont(option, 0); - } else { - switch (option) { - case TELOPT_TM: - break; - -#ifdef AUTHENTICATION - case TELOPT_AUTHENTICATION: - auth_finished(0, AUTH_REJECT); - break; -#endif - default: - break; - } - } - } - set_his_state_wont(option); - -} /* end of wontoption */ - -void -send_will(int option, int init) -{ - if (init) { - if ((will_wont_resp[option] == 0 && my_state_is_will(option))|| - my_want_state_is_will(option)) - return; - set_my_want_state_will(option); - will_wont_resp[option]++; - } - output_data ((const char *)will, option); - - DIAG(TD_OPTIONS, printoption("td: send will", option)); -} - -/* - * When we get a DONT SGA, we will try once to turn it - * back on. If the other side responds DONT SGA, we - * leave it at that. This is so that when we talk to - * clients that understand KLUDGELINEMODE but not LINEMODE, - * we'll keep them in char-at-a-time mode. - */ -int turn_on_sga = 0; - -void -dooption(int option) -{ - int changeok = 0; - - /* - * Process client input. - */ - - DIAG(TD_OPTIONS, printoption("td: recv do", option)); - - if (will_wont_resp[option]) { - will_wont_resp[option]--; - if (will_wont_resp[option] && my_state_is_will(option)) - will_wont_resp[option]--; - } - if ((will_wont_resp[option] == 0) && (my_want_state_is_wont(option))) { - switch (option) { - case TELOPT_ECHO: - { - init_termbuf(); - tty_setecho(1); - set_termbuf(); - } - changeok++; - break; - - case TELOPT_BINARY: - init_termbuf(); - tty_binaryout(1); - set_termbuf(); - changeok++; - break; - - case TELOPT_SGA: - turn_on_sga = 0; - changeok++; - break; - - case TELOPT_STATUS: - changeok++; - break; - - case TELOPT_TM: - /* - * Special case for TM. We send a WILL, but - * pretend we sent a WONT. - */ - send_will(option, 0); - set_my_want_state_wont(option); - set_my_state_wont(option); - return; - - case TELOPT_LOGOUT: - /* - * When we get a LOGOUT option, respond - * with a WILL LOGOUT, make sure that - * it gets written out to the network, - * and then just go away... - */ - set_my_want_state_will(TELOPT_LOGOUT); - send_will(TELOPT_LOGOUT, 0); - set_my_state_will(TELOPT_LOGOUT); - netflush(); - cleanup(0); - /* NOT REACHED */ - break; - -#ifdef ENCRYPTION - case TELOPT_ENCRYPT: - changeok++; - break; -#endif - case TELOPT_LINEMODE: - case TELOPT_TTYPE: - case TELOPT_NAWS: - case TELOPT_TSPEED: - case TELOPT_LFLOW: - case TELOPT_XDISPLOC: -#ifdef TELOPT_ENVIRON - case TELOPT_NEW_ENVIRON: -#endif - case TELOPT_OLD_ENVIRON: - default: - break; - } - if (changeok) { - set_my_want_state_will(option); - send_will(option, 0); - } else { - will_wont_resp[option]++; - send_wont(option, 0); - } - } - set_my_state_will(option); - -} /* end of dooption */ - -void -send_wont(int option, int init) -{ - if (init) { - if ((will_wont_resp[option] == 0 && my_state_is_wont(option)) || - my_want_state_is_wont(option)) - return; - set_my_want_state_wont(option); - will_wont_resp[option]++; - } - output_data ((const char *)wont, option); - - DIAG(TD_OPTIONS, printoption("td: send wont", option)); -} - -void -dontoption(int option) -{ - /* - * Process client input. - */ - - - DIAG(TD_OPTIONS, printoption("td: recv dont", option)); - - if (will_wont_resp[option]) { - will_wont_resp[option]--; - if (will_wont_resp[option] && my_state_is_wont(option)) - will_wont_resp[option]--; - } - if ((will_wont_resp[option] == 0) && (my_want_state_is_will(option))) { - switch (option) { - case TELOPT_BINARY: - init_termbuf(); - tty_binaryout(0); - set_termbuf(); - break; - - case TELOPT_ECHO: /* we should stop echoing */ - { - init_termbuf(); - tty_setecho(0); - set_termbuf(); - } - break; - - case TELOPT_SGA: - set_my_want_state_wont(option); - if (my_state_is_will(option)) - send_wont(option, 0); - set_my_state_wont(option); - if (turn_on_sga ^= 1) - send_will(option, 1); - return; - - default: - break; - } - - set_my_want_state_wont(option); - if (my_state_is_will(option)) - send_wont(option, 0); - } - set_my_state_wont(option); - -} /* end of dontoption */ - -#ifdef ENV_HACK -int env_ovar = -1; -int env_ovalue = -1; -#else /* ENV_HACK */ -# define env_ovar OLD_ENV_VAR -# define env_ovalue OLD_ENV_VALUE -#endif /* ENV_HACK */ - -/* - * suboption() - * - * Look at the sub-option buffer, and try to be helpful to the other - * side. - * - * Currently we recognize: - * - * Terminal type is - * Linemode - * Window size - * Terminal speed - */ -void -suboption(void) -{ - int subchar; - - DIAG(TD_OPTIONS, {netflush(); printsub('<', subpointer, SB_LEN()+2);}); - - subchar = SB_GET(); - switch (subchar) { - case TELOPT_TSPEED: { - int xspeed, rspeed; - - if (his_state_is_wont(TELOPT_TSPEED)) /* Ignore if option disabled */ - break; - - settimer(tspeedsubopt); - - if (SB_EOF() || SB_GET() != TELQUAL_IS) - return; - - xspeed = atoi((char *)subpointer); - - while (SB_GET() != ',' && !SB_EOF()); - if (SB_EOF()) - return; - - rspeed = atoi((char *)subpointer); - clientstat(TELOPT_TSPEED, xspeed, rspeed); - - break; - - } /* end of case TELOPT_TSPEED */ - - case TELOPT_TTYPE: { /* Yaaaay! */ - char *p; - - if (his_state_is_wont(TELOPT_TTYPE)) /* Ignore if option disabled */ - break; - settimer(ttypesubopt); - - if (SB_EOF() || SB_GET() != TELQUAL_IS) { - return; /* ??? XXX but, this is the most robust */ - } - - p = terminaltype; - - while ((p < (terminaltype + sizeof terminaltype-1)) && - !SB_EOF()) { - int c; - - c = SB_GET(); - if (isupper(c)) { - c = tolower(c); - } - *p++ = c; /* accumulate name */ - } - *p = 0; - break; - } /* end of case TELOPT_TTYPE */ - - case TELOPT_NAWS: { - int xwinsize, ywinsize; - - if (his_state_is_wont(TELOPT_NAWS)) /* Ignore if option disabled */ - break; - - if (SB_EOF()) - return; - xwinsize = SB_GET() << 8; - if (SB_EOF()) - return; - xwinsize |= SB_GET(); - if (SB_EOF()) - return; - ywinsize = SB_GET() << 8; - if (SB_EOF()) - return; - ywinsize |= SB_GET(); - clientstat(TELOPT_NAWS, xwinsize, ywinsize); - - break; - - } /* end of case TELOPT_NAWS */ - - case TELOPT_STATUS: { - int mode; - - if (SB_EOF()) - break; - mode = SB_GET(); - switch (mode) { - case TELQUAL_SEND: - if (my_state_is_will(TELOPT_STATUS)) - send_status(); - break; - - case TELQUAL_IS: - break; - - default: - break; - } - break; - } /* end of case TELOPT_STATUS */ - - case TELOPT_XDISPLOC: { - if (SB_EOF() || SB_GET() != TELQUAL_IS) - return; - settimer(xdisplocsubopt); - subpointer[SB_LEN()] = '\0'; - esetenv("DISPLAY", (char *)subpointer, 1); - break; - } /* end of case TELOPT_XDISPLOC */ - -#ifdef TELOPT_NEW_ENVIRON - case TELOPT_NEW_ENVIRON: -#endif - case TELOPT_OLD_ENVIRON: { - int c; - char *cp, *varp, *valp; - - if (SB_EOF()) - return; - c = SB_GET(); - if (c == TELQUAL_IS) { - if (subchar == TELOPT_OLD_ENVIRON) - settimer(oenvironsubopt); - else - settimer(environsubopt); - } else if (c != TELQUAL_INFO) { - return; - } - -#ifdef TELOPT_NEW_ENVIRON - if (subchar == TELOPT_NEW_ENVIRON) { - while (!SB_EOF()) { - c = SB_GET(); - if ((c == NEW_ENV_VAR) || (c == ENV_USERVAR)) - break; - } - } else -#endif - { -#ifdef ENV_HACK - /* - * We only want to do this if we haven't already decided - * whether or not the other side has its VALUE and VAR - * reversed. - */ - if (env_ovar < 0) { - int last = -1; /* invalid value */ - int empty = 0; - int got_var = 0, got_value = 0, got_uservar = 0; - - /* - * The other side might have its VALUE and VAR values - * reversed. To be interoperable, we need to determine - * which way it is. If the first recognized character - * is a VAR or VALUE, then that will tell us what - * type of client it is. If the fist recognized - * character is a USERVAR, then we continue scanning - * the suboption looking for two consecutive - * VAR or VALUE fields. We should not get two - * consecutive VALUE fields, so finding two - * consecutive VALUE or VAR fields will tell us - * what the client is. - */ - SB_SAVE(); - while (!SB_EOF()) { - c = SB_GET(); - switch(c) { - case OLD_ENV_VAR: - if (last < 0 || last == OLD_ENV_VAR - || (empty && (last == OLD_ENV_VALUE))) - goto env_ovar_ok; - got_var++; - last = OLD_ENV_VAR; - break; - case OLD_ENV_VALUE: - if (last < 0 || last == OLD_ENV_VALUE - || (empty && (last == OLD_ENV_VAR))) - goto env_ovar_wrong; - got_value++; - last = OLD_ENV_VALUE; - break; - case ENV_USERVAR: - /* count strings of USERVAR as one */ - if (last != ENV_USERVAR) - got_uservar++; - if (empty) { - if (last == OLD_ENV_VALUE) - goto env_ovar_ok; - if (last == OLD_ENV_VAR) - goto env_ovar_wrong; - } - last = ENV_USERVAR; - break; - case ENV_ESC: - if (!SB_EOF()) - c = SB_GET(); - /* FALL THROUGH */ - default: - empty = 0; - continue; - } - empty = 1; - } - if (empty) { - if (last == OLD_ENV_VALUE) - goto env_ovar_ok; - if (last == OLD_ENV_VAR) - goto env_ovar_wrong; - } - /* - * Ok, the first thing was a USERVAR, and there - * are not two consecutive VAR or VALUE commands, - * and none of the VAR or VALUE commands are empty. - * If the client has sent us a well-formed option, - * then the number of VALUEs received should always - * be less than or equal to the number of VARs and - * USERVARs received. - * - * If we got exactly as many VALUEs as VARs and - * USERVARs, the client has the same definitions. - * - * If we got exactly as many VARs as VALUEs and - * USERVARS, the client has reversed definitions. - */ - if (got_uservar + got_var == got_value) { - env_ovar_ok: - env_ovar = OLD_ENV_VAR; - env_ovalue = OLD_ENV_VALUE; - } else if (got_uservar + got_value == got_var) { - env_ovar_wrong: - env_ovar = OLD_ENV_VALUE; - env_ovalue = OLD_ENV_VAR; - DIAG(TD_OPTIONS, { - output_data("ENVIRON VALUE and VAR are reversed!\r\n"); - }); - - } - } - SB_RESTORE(); -#endif - - while (!SB_EOF()) { - c = SB_GET(); - if ((c == env_ovar) || (c == ENV_USERVAR)) - break; - } - } - - if (SB_EOF()) - return; - - cp = varp = (char *)subpointer; - valp = 0; - - while (!SB_EOF()) { - c = SB_GET(); - if (subchar == TELOPT_OLD_ENVIRON) { - if (c == env_ovar) - c = NEW_ENV_VAR; - else if (c == env_ovalue) - c = NEW_ENV_VALUE; - } - switch (c) { - - case NEW_ENV_VALUE: - *cp = '\0'; - cp = valp = (char *)subpointer; - break; - - case NEW_ENV_VAR: - case ENV_USERVAR: - *cp = '\0'; - if (valp) - esetenv(varp, valp, 1); - else - unsetenv(varp); - cp = varp = (char *)subpointer; - valp = 0; - break; - - case ENV_ESC: - if (SB_EOF()) - break; - c = SB_GET(); - /* FALL THROUGH */ - default: - *cp++ = c; - break; - } - } - *cp = '\0'; - if (valp) - esetenv(varp, valp, 1); - else - unsetenv(varp); - break; - } /* end of case TELOPT_NEW_ENVIRON */ -#ifdef AUTHENTICATION - case TELOPT_AUTHENTICATION: - if (SB_EOF()) - break; - switch(SB_GET()) { - case TELQUAL_SEND: - case TELQUAL_REPLY: - /* - * These are sent by us and cannot be sent by - * the client. - */ - break; - case TELQUAL_IS: - auth_is(subpointer, SB_LEN()); - break; - case TELQUAL_NAME: - auth_name(subpointer, SB_LEN()); - break; - } - break; -#endif -#ifdef ENCRYPTION - case TELOPT_ENCRYPT: - if (SB_EOF()) - break; - switch(SB_GET()) { - case ENCRYPT_SUPPORT: - encrypt_support(subpointer, SB_LEN()); - break; - case ENCRYPT_IS: - encrypt_is(subpointer, SB_LEN()); - break; - case ENCRYPT_REPLY: - encrypt_reply(subpointer, SB_LEN()); - break; - case ENCRYPT_START: - encrypt_start(subpointer, SB_LEN()); - break; - case ENCRYPT_END: - if (require_encryption) - fatal(net, "Output encryption is not possible to turn off"); - encrypt_end(); - break; - case ENCRYPT_REQSTART: - encrypt_request_start(subpointer, SB_LEN()); - break; - case ENCRYPT_REQEND: - /* - * We can always send an REQEND so that we cannot - * get stuck encrypting. We should only get this - * if we have been able to get in the correct mode - * anyhow. - */ - if (require_encryption) - fatal(net, "Input encryption is not possible to turn off"); - encrypt_request_end(); - break; - case ENCRYPT_ENC_KEYID: - encrypt_enc_keyid(subpointer, SB_LEN()); - break; - case ENCRYPT_DEC_KEYID: - encrypt_dec_keyid(subpointer, SB_LEN()); - break; - default: - break; - } - break; -#endif - - default: - break; - } /* end of switch */ - -} /* end of suboption */ - -void -doclientstat(void) -{ - clientstat(TELOPT_LINEMODE, WILL, 0); -} - -#undef ADD -#define ADD(c) *ncp++ = c -#define ADD_DATA(c) { *ncp++ = c; if (c == SE || c == IAC) *ncp++ = c; } - -void -send_status(void) -{ - unsigned char statusbuf[256]; - unsigned char *ncp; - unsigned char i; - - ncp = statusbuf; - - netflush(); /* get rid of anything waiting to go out */ - - ADD(IAC); - ADD(SB); - ADD(TELOPT_STATUS); - ADD(TELQUAL_IS); - - /* - * We check the want_state rather than the current state, - * because if we received a DO/WILL for an option that we - * don't support, and the other side didn't send a DONT/WONT - * in response to our WONT/DONT, then the "state" will be - * WILL/DO, and the "want_state" will be WONT/DONT. We - * need to go by the latter. - */ - for (i = 0; i < (unsigned char)NTELOPTS; i++) { - if (my_want_state_is_will(i)) { - ADD(WILL); - ADD_DATA(i); - } - if (his_want_state_is_will(i)) { - ADD(DO); - ADD_DATA(i); - } - } - - if (his_want_state_is_will(TELOPT_LFLOW)) { - ADD(SB); - ADD(TELOPT_LFLOW); - if (flowmode) { - ADD(LFLOW_ON); - } else { - ADD(LFLOW_OFF); - } - ADD(SE); - - if (restartany >= 0) { - ADD(SB); - ADD(TELOPT_LFLOW); - if (restartany) { - ADD(LFLOW_RESTART_ANY); - } else { - ADD(LFLOW_RESTART_XON); - } - ADD(SE); - } - } - - - ADD(IAC); - ADD(SE); - - writenet(statusbuf, ncp - statusbuf); - netflush(); /* Send it on its way */ - - DIAG(TD_OPTIONS, - {printsub('>', statusbuf, ncp - statusbuf); netflush();}); -} diff --git a/kerberosV/src/appl/telnet/telnetd/sys_term.c b/kerberosV/src/appl/telnet/telnetd/sys_term.c deleted file mode 100644 index 01b42e541a7..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/sys_term.c +++ /dev/null @@ -1,1910 +0,0 @@ -/* - * Copyright (c) 1989, 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. - */ - -#include "telnetd.h" - -RCSID("$Id: sys_term.c,v 1.5 2013/06/17 19:11:38 robert Exp $"); - -#if defined(_CRAY) || (defined(__hpux) && !defined(HAVE_UTMPX_H)) -# define PARENT_DOES_UTMP -#endif - -#ifdef HAVE_UTMP_H -#include -#endif - -#ifdef HAVE_UTMPX_H -#include -#endif - -#ifdef HAVE_UTMPX_H -struct utmpx wtmp; -#elif defined(HAVE_UTMP_H) -struct utmp wtmp; -#endif /* HAVE_UTMPX_H */ - -#ifdef HAVE_STRUCT_UTMP_UT_HOST -int utmp_len = sizeof(wtmp.ut_host); -#else -int utmp_len = MaxHostNameLen; -#endif - -#ifndef UTMP_FILE -#ifdef _PATH_UTMP -#define UTMP_FILE _PATH_UTMP -#else -#define UTMP_FILE "/etc/utmp" -#endif -#endif - -/* really, mac os uses wtmpx (or asl) */ -#ifdef __APPLE__ -#undef _PATH_WTMP -#endif - -#if !defined(WTMP_FILE) && defined(_PATH_WTMP) -#define WTMP_FILE _PATH_WTMP -#endif - -#ifndef PARENT_DOES_UTMP -#ifdef WTMP_FILE -char wtmpf[] = WTMP_FILE; -#else -char wtmpf[] = "/usr/adm/wtmp"; -#endif -char utmpf[] = UTMP_FILE; -#else /* PARENT_DOES_UTMP */ -#ifdef WTMP_FILE -char wtmpf[] = WTMP_FILE; -#else -char wtmpf[] = "/etc/wtmp"; -#endif -#endif /* PARENT_DOES_UTMP */ - -#ifdef HAVE_TMPDIR_H -#include -#endif /* CRAY */ - -#if !(defined(__sgi) || defined(__linux) || defined(_AIX)) && defined(HAVE_SYS_TTY) -#include -#endif -#ifdef t_erase -#undef t_erase -#undef t_kill -#undef t_intrc -#undef t_quitc -#undef t_startc -#undef t_stopc -#undef t_eofc -#undef t_brkc -#undef t_suspc -#undef t_dsuspc -#undef t_rprntc -#undef t_flushc -#undef t_werasc -#undef t_lnextc -#endif - -#ifdef HAVE_TERMIOS_H -#include -#else -#ifdef HAVE_TERMIO_H -#include -#endif -#endif - -#ifdef HAVE_UTIL_H -#include -#endif -#ifdef HAVE_LIBUTIL_H -#include -#endif - -# ifndef TCSANOW -# ifdef TCSETS -# define TCSANOW TCSETS -# define TCSADRAIN TCSETSW -# define tcgetattr(f, t) ioctl(f, TCGETS, (char *)t) -# else -# ifdef TCSETA -# define TCSANOW TCSETA -# define TCSADRAIN TCSETAW -# define tcgetattr(f, t) ioctl(f, TCGETA, (char *)t) -# else -# define TCSANOW TIOCSETA -# define TCSADRAIN TIOCSETAW -# define tcgetattr(f, t) ioctl(f, TIOCGETA, (char *)t) -# endif -# endif -# define tcsetattr(f, a, t) ioctl(f, a, t) -# define cfsetospeed(tp, val) (tp)->c_cflag &= ~CBAUD; \ -(tp)->c_cflag |= (val) -# define cfgetospeed(tp) ((tp)->c_cflag & CBAUD) -# ifdef CIBAUD -# define cfsetispeed(tp, val) (tp)->c_cflag &= ~CIBAUD; \ - (tp)->c_cflag |= ((val)<c_cflag & CIBAUD)>>IBSHIFT) -# else -# define cfsetispeed(tp, val) (tp)->c_cflag &= ~CBAUD; \ - (tp)->c_cflag |= (val) -# define cfgetispeed(tp) ((tp)->c_cflag & CBAUD) -# endif -# endif /* TCSANOW */ - struct termios termbuf, termbuf2; /* pty control structure */ -# ifdef STREAMSPTY - static int ttyfd = -1; - int really_stream = 0; -# else -#define really_stream 0 -# endif - - const char *new_login = _PATH_LOGIN; - -/* - * init_termbuf() - * copy_termbuf(cp) - * set_termbuf() - * - * These three routines are used to get and set the "termbuf" structure - * to and from the kernel. init_termbuf() gets the current settings. - * copy_termbuf() hands in a new "termbuf" to write to the kernel, and - * set_termbuf() writes the structure into the kernel. - */ - - void - init_termbuf(void) -{ -# ifdef STREAMSPTY - if (really_stream) - tcgetattr(ttyfd, &termbuf); - else -# endif - tcgetattr(ourpty, &termbuf); - termbuf2 = termbuf; -} - -void -set_termbuf(void) -{ - /* - * Only make the necessary changes. - */ - if (memcmp(&termbuf, &termbuf2, sizeof(termbuf))) { -# ifdef STREAMSPTY - if (really_stream) - tcsetattr(ttyfd, TCSANOW, &termbuf); - else -# endif - tcsetattr(ourpty, TCSANOW, &termbuf); - } -} - - -/* - * spcset(func, valp, valpp) - * - * This function takes various special characters (func), and - * sets *valp to the current value of that character, and - * *valpp to point to where in the "termbuf" structure that - * value is kept. - * - * It returns the SLC_ level of support for this function. - */ - - -int -spcset(int func, cc_t *valp, cc_t **valpp) -{ - -#define setval(a, b) *valp = termbuf.c_cc[a]; \ - *valpp = &termbuf.c_cc[a]; \ - return(b); -#define defval(a) *valp = ((cc_t)a); *valpp = (cc_t *)0; return(SLC_DEFAULT); - - switch(func) { - case SLC_EOF: - setval(VEOF, SLC_VARIABLE); - case SLC_EC: - setval(VERASE, SLC_VARIABLE); - case SLC_EL: - setval(VKILL, SLC_VARIABLE); - case SLC_IP: - setval(VINTR, SLC_VARIABLE|SLC_FLUSHIN|SLC_FLUSHOUT); - case SLC_ABORT: - setval(VQUIT, SLC_VARIABLE|SLC_FLUSHIN|SLC_FLUSHOUT); - case SLC_XON: -#ifdef VSTART - setval(VSTART, SLC_VARIABLE); -#else - defval(0x13); -#endif - case SLC_XOFF: -#ifdef VSTOP - setval(VSTOP, SLC_VARIABLE); -#else - defval(0x11); -#endif - case SLC_EW: -#ifdef VWERASE - setval(VWERASE, SLC_VARIABLE); -#else - defval(0); -#endif - case SLC_RP: -#ifdef VREPRINT - setval(VREPRINT, SLC_VARIABLE); -#else - defval(0); -#endif - case SLC_LNEXT: -#ifdef VLNEXT - setval(VLNEXT, SLC_VARIABLE); -#else - defval(0); -#endif - case SLC_AO: -#if !defined(VDISCARD) && defined(VFLUSHO) -# define VDISCARD VFLUSHO -#endif -#ifdef VDISCARD - setval(VDISCARD, SLC_VARIABLE|SLC_FLUSHOUT); -#else - defval(0); -#endif - case SLC_SUSP: -#ifdef VSUSP - setval(VSUSP, SLC_VARIABLE|SLC_FLUSHIN); -#else - defval(0); -#endif -#ifdef VEOL - case SLC_FORW1: - setval(VEOL, SLC_VARIABLE); -#endif -#ifdef VEOL2 - case SLC_FORW2: - setval(VEOL2, SLC_VARIABLE); -#endif - case SLC_AYT: -#ifdef VSTATUS - setval(VSTATUS, SLC_VARIABLE); -#else - defval(0); -#endif - - case SLC_BRK: - case SLC_SYNCH: - case SLC_EOR: - defval(0); - - default: - *valp = 0; - *valpp = 0; - return(SLC_NOSUPPORT); - } -} - -#ifdef _CRAY -/* - * getnpty() - * - * Return the number of pty's configured into the system. - */ -int -getnpty() -{ -#ifdef _SC_CRAY_NPTY - int numptys; - - if ((numptys = sysconf(_SC_CRAY_NPTY)) != -1) - return numptys; - else -#endif /* _SC_CRAY_NPTY */ - return 128; -} -#endif /* CRAY */ - -/* - * getpty() - * - * Allocate a pty. As a side effect, the external character - * array "line" contains the name of the slave side. - * - * Returns the file descriptor of the opened pty. - */ - -static int ptyslavefd = -1; - -static char Xline[] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; -char *line = Xline; - -#ifdef _CRAY -char myline[] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; -#endif /* CRAY */ - -#if !defined(HAVE_PTSNAME) && defined(STREAMSPTY) -static char *ptsname(int fd) -{ -#ifdef HAVE_TTYNAME - return ttyname(fd); -#else - return NULL; -#endif -} -#endif - -int getpty(int *ptynum) -{ -#if defined(HAVE_OPENPTY) || defined(__linux) || defined(__osf__) /* XXX */ - { - int master; - int slave; - if(openpty(&master, &slave, line, 0, 0) == 0){ - ptyslavefd = slave; - return master; - } - } -#endif /* HAVE_OPENPTY .... */ -#ifdef HAVE__GETPTY - { - int master; - char *p; - p = _getpty(&master, O_RDWR, 0600, 1); - if(p == NULL) - return -1; - strlcpy(line, p, sizeof(Xline)); - return master; - } -#endif - -#ifdef STREAMSPTY - { - char *clone[] = { "/dev/ptc", "/dev/ptmx", "/dev/ptm", - "/dev/ptym/clone", 0 }; - - char **q; - int p; - for(q=clone; *q; q++){ - p=open(*q, O_RDWR); - if(p >= 0){ -#ifdef HAVE_GRANTPT - grantpt(p); -#endif -#ifdef HAVE_UNLOCKPT - unlockpt(p); -#endif - strlcpy(line, ptsname(p), sizeof(Xline)); - really_stream = 1; - return p; - } - } - } -#endif /* STREAMSPTY */ -#ifndef _CRAY - { - int p; - char *cp, *p1, *p2; - int i; - -#ifndef __hpux - snprintf(line, sizeof(Xline), "/dev/ptyXX"); - p1 = &line[8]; - p2 = &line[9]; -#else - snprintf(line, sizeof(Xline), "/dev/ptym/ptyXX"); - p1 = &line[13]; - p2 = &line[14]; -#endif - - - for (cp = "pqrstuvwxyzPQRST"; *cp; cp++) { - struct stat stb; - - *p1 = *cp; - *p2 = '0'; - /* - * This stat() check is just to keep us from - * looping through all 256 combinations if there - * aren't that many ptys available. - */ - if (stat(line, &stb) < 0) - break; - for (i = 0; i < 16; i++) { - *p2 = "0123456789abcdef"[i]; - p = open(line, O_RDWR); - if (p > 0) { -#if SunOS == 40 - int dummy; -#endif - -#ifndef __hpux - line[5] = 't'; -#else - for (p1 = &line[8]; *p1; p1++) - *p1 = *(p1+1); - line[9] = 't'; -#endif - chown(line, 0, 0); - chmod(line, 0600); -#if SunOS == 40 - if (ioctl(p, TIOCGPGRP, &dummy) == 0 - || errno != EIO) { - chmod(line, 0666); - close(p); - line[5] = 'p'; - } else -#endif /* SunOS == 40 */ - return(p); - } - } - } - } -#else /* CRAY */ - { - extern lowpty, highpty; - struct stat sb; - int p; - - for (*ptynum = lowpty; *ptynum <= highpty; (*ptynum)++) { - snprintf(myline, sizeof(myline), "/dev/pty/%03d", *ptynum); - p = open(myline, 2); - if (p < 0) - continue; - snprintf(line, sizeof(Xline), "/dev/ttyp%03d", *ptynum); - /* - * Here are some shenanigans to make sure that there - * are no listeners lurking on the line. - */ - if(stat(line, &sb) < 0) { - close(p); - continue; - } - if(sb.st_uid || sb.st_gid || sb.st_mode != 0600) { - chown(line, 0, 0); - chmod(line, 0600); - close(p); - p = open(myline, 2); - if (p < 0) - continue; - } - /* - * Now it should be safe...check for accessability. - */ - if (access(line, 6) == 0) - return(p); - else { - /* no tty side to pty so skip it */ - close(p); - } - } - } -#endif /* CRAY */ - return(-1); -} - - -int -tty_isecho(void) -{ - return (termbuf.c_lflag & ECHO); -} - -int -tty_flowmode(void) -{ - return((termbuf.c_iflag & IXON) ? 1 : 0); -} - -int -tty_restartany(void) -{ - return((termbuf.c_iflag & IXANY) ? 1 : 0); -} - -void -tty_setecho(int on) -{ - if (on) - termbuf.c_lflag |= ECHO; - else - termbuf.c_lflag &= ~ECHO; -} - -int -tty_israw(void) -{ - return(!(termbuf.c_lflag & ICANON)); -} - -void -tty_binaryin(int on) -{ - if (on) { - termbuf.c_iflag &= ~ISTRIP; - } else { - termbuf.c_iflag |= ISTRIP; - } -} - -void -tty_binaryout(int on) -{ - if (on) { - termbuf.c_cflag &= ~(CSIZE|PARENB); - termbuf.c_cflag |= CS8; - termbuf.c_oflag &= ~OPOST; - } else { - termbuf.c_cflag &= ~CSIZE; - termbuf.c_cflag |= CS7|PARENB; - termbuf.c_oflag |= OPOST; - } -} - -int -tty_isbinaryin(void) -{ - return(!(termbuf.c_iflag & ISTRIP)); -} - -int -tty_isbinaryout(void) -{ - return(!(termbuf.c_oflag&OPOST)); -} - - -int -tty_issofttab(void) -{ -# ifdef OXTABS - return (termbuf.c_oflag & OXTABS); -# endif -# ifdef TABDLY - return ((termbuf.c_oflag & TABDLY) == TAB3); -# endif -} - -void -tty_setsofttab(int on) -{ - if (on) { -# ifdef OXTABS - termbuf.c_oflag |= OXTABS; -# endif -# ifdef TABDLY - termbuf.c_oflag &= ~TABDLY; - termbuf.c_oflag |= TAB3; -# endif - } else { -# ifdef OXTABS - termbuf.c_oflag &= ~OXTABS; -# endif -# ifdef TABDLY - termbuf.c_oflag &= ~TABDLY; - termbuf.c_oflag |= TAB0; -# endif - } -} - -int -tty_islitecho(void) -{ -# ifdef ECHOCTL - return (!(termbuf.c_lflag & ECHOCTL)); -# endif -# ifdef TCTLECH - return (!(termbuf.c_lflag & TCTLECH)); -# endif -# if !defined(ECHOCTL) && !defined(TCTLECH) - return (0); /* assumes ctl chars are echoed '^x' */ -# endif -} - -void -tty_setlitecho(int on) -{ -# ifdef ECHOCTL - if (on) - termbuf.c_lflag &= ~ECHOCTL; - else - termbuf.c_lflag |= ECHOCTL; -# endif -# ifdef TCTLECH - if (on) - termbuf.c_lflag &= ~TCTLECH; - else - termbuf.c_lflag |= TCTLECH; -# endif -} - -int -tty_iscrnl(void) -{ - return (termbuf.c_iflag & ICRNL); -} - -/* - * Try to guess whether speeds are "encoded" (4.2BSD) or just numeric (4.4BSD). - */ -#if B4800 != 4800 -#define DECODE_BAUD -#endif - -#ifdef DECODE_BAUD - -/* - * A table of available terminal speeds - */ -struct termspeeds { - int speed; - int value; -} termspeeds[] = { - { 0, B0 }, { 50, B50 }, { 75, B75 }, - { 110, B110 }, { 134, B134 }, { 150, B150 }, - { 200, B200 }, { 300, B300 }, { 600, B600 }, - { 1200, B1200 }, { 1800, B1800 }, { 2400, B2400 }, - { 4800, B4800 }, -#ifdef B7200 - { 7200, B7200 }, -#endif - { 9600, B9600 }, -#ifdef B14400 - { 14400, B14400 }, -#endif -#ifdef B19200 - { 19200, B19200 }, -#endif -#ifdef B28800 - { 28800, B28800 }, -#endif -#ifdef B38400 - { 38400, B38400 }, -#endif -#ifdef B57600 - { 57600, B57600 }, -#endif -#ifdef B115200 - { 115200, B115200 }, -#endif -#ifdef B230400 - { 230400, B230400 }, -#endif - { -1, 0 } -}; -#endif /* DECODE_BUAD */ - -void -tty_tspeed(int val) -{ -#ifdef DECODE_BAUD - struct termspeeds *tp; - - for (tp = termspeeds; (tp->speed != -1) && (val > tp->speed); tp++) - ; - if (tp->speed == -1) /* back up to last valid value */ - --tp; - cfsetospeed(&termbuf, tp->value); -#else /* DECODE_BUAD */ - cfsetospeed(&termbuf, val); -#endif /* DECODE_BUAD */ -} - -void -tty_rspeed(int val) -{ -#ifdef DECODE_BAUD - struct termspeeds *tp; - - for (tp = termspeeds; (tp->speed != -1) && (val > tp->speed); tp++) - ; - if (tp->speed == -1) /* back up to last valid value */ - --tp; - cfsetispeed(&termbuf, tp->value); -#else /* DECODE_BAUD */ - cfsetispeed(&termbuf, val); -#endif /* DECODE_BAUD */ -} - -#ifdef PARENT_DOES_UTMP -extern struct utmp wtmp; -extern char wtmpf[]; - -extern void utmp_sig_init (void); -extern void utmp_sig_reset (void); -extern void utmp_sig_wait (void); -extern void utmp_sig_notify (int); -# endif /* PARENT_DOES_UTMP */ - -#ifdef STREAMSPTY - -/* I_FIND seems to live a life of its own */ -static int my_find(int fd, char *module) -{ -#if defined(I_FIND) && defined(I_LIST) - static int flag; - static struct str_list sl; - int n; - int i; - - if(!flag){ - n = ioctl(fd, I_LIST, 0); - if(n < 0){ - perror("ioctl(fd, I_LIST, 0)"); - return -1; - } - sl.sl_modlist=(struct str_mlist*)malloc(n * sizeof(struct str_mlist)); - sl.sl_nmods = n; - n = ioctl(fd, I_LIST, &sl); - if(n < 0){ - perror("ioctl(fd, I_LIST, n)"); - return -1; - } - flag = 1; - } - - for(i=0; i= modules; p--){ - err = ioctl(fd, I_PUSH, *p); - if(err < 0 && errno != EINVAL) - fatalperror(net, "I_PUSH"); - } -} -#endif - -/* - * getptyslave() - * - * Open the slave side of the pty, and do any initialization - * that is necessary. The return value is a file descriptor - * for the slave side. - */ -void getptyslave(void) -{ - int t = -1; - - struct winsize ws; - /* - * Opening the slave side may cause initilization of the - * kernel tty structure. We need remember the state of - * if linemode was turned on - * terminal window size - * terminal speed - * so that we can re-set them if we need to. - */ - - - /* - * Make sure that we don't have a controlling tty, and - * that we are the session (process group) leader. - */ - -#ifdef HAVE_SETSID - if(setsid()<0) - fatalperror(net, "setsid()"); -#else -# ifdef TIOCNOTTY - t = open(_PATH_TTY, O_RDWR); - if (t >= 0) { - ioctl(t, TIOCNOTTY, (char *)0); - close(t); - } -# endif -#endif - -# ifdef PARENT_DOES_UTMP - /* - * Wait for our parent to get the utmp stuff to get done. - */ - utmp_sig_wait(); -# endif - - t = cleanopen(line); - if (t < 0) - fatalperror(net, line); - -#ifdef STREAMSPTY - ttyfd = t; - - - /* - * Not all systems have (or need) modules ttcompat and pckt so - * don't flag it as a fatal error if they don't exist. - */ - - if (really_stream) - { - /* these are the streams modules that we want pushed. note - that they are in reverse order, ptem will be pushed - first. maybe_push_modules() will try to push all modules - before the first one that isn't already pushed. i.e if - ldterm is pushed, only ttcompat will be attempted. - - all this is because we don't know which modules are - available, and we don't know which modules are already - pushed (via autopush, for instance). - - */ - - char *ttymodules[] = { "ttcompat", "ldterm", "ptem", NULL }; - char *ptymodules[] = { "pckt", NULL }; - - maybe_push_modules(t, ttymodules); - maybe_push_modules(ourpty, ptymodules); - } -#endif - /* - * set up the tty modes as we like them to be. - */ - init_termbuf(); -# ifdef TIOCSWINSZ - if (def_row || def_col) { - memset(&ws, 0, sizeof(ws)); - ws.ws_col = def_col; - ws.ws_row = def_row; - ioctl(t, TIOCSWINSZ, (char *)&ws); - } -# endif - - /* - * Settings for sgtty based systems - */ - - /* - * Settings for UNICOS (and HPUX) - */ -# if defined(_CRAY) || defined(__hpux) - termbuf.c_oflag = OPOST|ONLCR|TAB3; - termbuf.c_iflag = IGNPAR|ISTRIP|ICRNL|IXON; - termbuf.c_lflag = ISIG|ICANON|ECHO|ECHOE|ECHOK; - termbuf.c_cflag = EXTB|HUPCL|CS8; -# endif - - /* - * Settings for all other termios/termio based - * systems, other than 4.4BSD. In 4.4BSD the - * kernel does the initial terminal setup. - */ -# if !(defined(_CRAY) || defined(__hpux)) && (BSD <= 43) -# ifndef OXTABS -# define OXTABS 0 -# endif - termbuf.c_lflag |= ECHO; - termbuf.c_oflag |= ONLCR|OXTABS; - termbuf.c_iflag |= ICRNL; - termbuf.c_iflag &= ~IXOFF; -# endif - tty_rspeed((def_rspeed > 0) ? def_rspeed : 9600); - tty_tspeed((def_tspeed > 0) ? def_tspeed : 9600); - - /* - * Set the tty modes, and make this our controlling tty. - */ - set_termbuf(); - if (login_tty(t) == -1) - fatalperror(net, "login_tty"); - if (net > 2) - close(net); - if (ourpty > 2) { - close(ourpty); - ourpty = -1; - } -} - -#ifndef O_NOCTTY -#define O_NOCTTY 0 -#endif -/* - * Open the specified slave side of the pty, - * making sure that we have a clean tty. - */ - -int cleanopen(char *line) -{ - int t; - - if (ptyslavefd != -1) - return ptyslavefd; - -#ifdef STREAMSPTY - if (!really_stream) -#endif - { - /* - * Make sure that other people can't open the - * slave side of the connection. - */ - chown(line, 0, 0); - chmod(line, 0600); - } - -#ifdef HAVE_REVOKE - revoke(line); -#endif - - t = open(line, O_RDWR|O_NOCTTY); - - if (t < 0) - return(-1); - - /* - * Hangup anybody else using this ttyp, then reopen it for - * ourselves. - */ -# if !(defined(_CRAY) || defined(__hpux)) && (BSD <= 43) && !defined(STREAMSPTY) - signal(SIGHUP, SIG_IGN); -#ifdef HAVE_VHANGUP - vhangup(); -#else -#endif - signal(SIGHUP, SIG_DFL); - t = open(line, O_RDWR|O_NOCTTY); - if (t < 0) - return(-1); -# endif -# if defined(_CRAY) && defined(TCVHUP) - { - int i; - signal(SIGHUP, SIG_IGN); - ioctl(t, TCVHUP, (char *)0); - signal(SIGHUP, SIG_DFL); - - i = open(line, O_RDWR); - - if (i < 0) - return(-1); - close(t); - t = i; - } -# endif /* defined(CRAY) && defined(TCVHUP) */ - return(t); -} - -#if !defined(BSD4_4) - -int login_tty(int t) -{ - /* Dont need to set this as the controlling PTY on steams sockets, - * don't abort on failure. */ -# if defined(TIOCSCTTY) && !defined(__hpux) - if (ioctl(t, TIOCSCTTY, (char *)0) < 0 && !really_stream) - fatalperror(net, "ioctl(sctty)"); -# ifdef _CRAY - /* - * Close the hard fd to /dev/ttypXXX, and re-open through - * the indirect /dev/tty interface. - */ - close(t); - if ((t = open("/dev/tty", O_RDWR)) < 0) - fatalperror(net, "open(/dev/tty)"); -# endif -# else - /* - * We get our controlling tty assigned as a side-effect - * of opening up a tty device. But on BSD based systems, - * this only happens if our process group is zero. The - * setsid() call above may have set our pgrp, so clear - * it out before opening the tty... - */ -#ifdef HAVE_SETPGID - setpgid(0, 0); -#else - setpgrp(0, 0); /* if setpgid isn't available, setpgrp - probably takes arguments */ -#endif - close(open(line, O_RDWR)); -# endif - if (t != 0) - dup2(t, 0); - if (t != 1) - dup2(t, 1); - if (t != 2) - dup2(t, 2); - if (t > 2) - close(t); - return(0); -} -#endif /* BSD <= 43 */ - -/* - * This comes from ../../bsd/tty.c and should not really be here. - */ - -/* - * Clean the tty name. Return a pointer to the cleaned version. - */ - -static char * clean_ttyname (char *) __attribute__((unused)); - -static char * -clean_ttyname (char *tty) -{ - char *res = tty; - - if (strncmp (res, _PATH_DEV, strlen(_PATH_DEV)) == 0) - res += strlen(_PATH_DEV); - if (strncmp (res, "pty/", 4) == 0) - res += 4; - if (strncmp (res, "ptym/", 5) == 0) - res += 5; - return res; -} - -/* - * Generate a name usable as an `ut_id', typically without `tty'. - */ - -#ifdef HAVE_STRUCT_UTMP_UT_ID -static char * -make_id (char *tty) -{ - char *res = tty; - - if (strncmp (res, "pts/", 4) == 0) - res += 4; - if (strncmp (res, "tty", 3) == 0) - res += 3; - return res; -} -#endif - -/* - * startslave(host) - * - * Given a hostname, do whatever - * is necessary to startup the login process on the slave side of the pty. - */ - -/* ARGSUSED */ -void -startslave(const char *host, const char *utmp_host, - int autologin, char *autoname) -{ - int i; - -#ifdef AUTHENTICATION - if (!autoname || !autoname[0]) - autologin = 0; - - if (autologin < auth_level) { - fatal(net, "Authorization failed"); - exit(1); - } -#endif - - { - char *tbuf = - "\r\n*** Connection not encrypted! " - "Communication may be eavesdropped. ***\r\n"; -#ifdef ENCRYPTION - if (!no_warn && (encrypt_output == 0 || decrypt_input == 0)) -#endif - writenet(tbuf, strlen(tbuf)); - } -# ifdef PARENT_DOES_UTMP - utmp_sig_init(); -# endif /* PARENT_DOES_UTMP */ - - if ((i = fork()) < 0) - fatalperror(net, "fork"); - if (i) { -# ifdef PARENT_DOES_UTMP - /* - * Cray parent will create utmp entry for child and send - * signal to child to tell when done. Child waits for signal - * before doing anything important. - */ - int pid = i; - void sigjob (int); - - setpgrp(); - utmp_sig_reset(); /* reset handler to default */ - /* - * Create utmp entry for child - */ - wtmp.ut_time = time(NULL); - wtmp.ut_type = LOGIN_PROCESS; - wtmp.ut_pid = pid; - strncpy(wtmp.ut_user, "LOGIN", sizeof(wtmp.ut_user)); - strncpy(wtmp.ut_host, utmp_host, sizeof(wtmp.ut_host)); - strncpy(wtmp.ut_line, clean_ttyname(line), sizeof(wtmp.ut_line)); -#ifdef HAVE_STRUCT_UTMP_UT_ID - strncpy(wtmp.ut_id, wtmp.ut_line + 3, sizeof(wtmp.ut_id)); -#endif - - pututline(&wtmp); - endutent(); - if ((i = open(wtmpf, O_WRONLY|O_APPEND)) >= 0) { - write(i, &wtmp, sizeof(struct utmp)); - close(i); - } -#ifdef _CRAY - signal(WJSIGNAL, sigjob); -#endif - utmp_sig_notify(pid); -# endif /* PARENT_DOES_UTMP */ - } else { - getptyslave(); -#if defined(DCE) - /* if we authenticated via K5, try and join the PAG */ - kerberos5_dfspag(); -#endif - start_login(host, autologin, autoname); - /*NOTREACHED*/ - } -} - -char *envinit[3]; -#if !HAVE_DECL_ENVIRON -extern char **environ; -#endif - -void -init_env(void) -{ - char **envp; - - envp = envinit; - if ((*envp = getenv("TZ"))) - *envp++ -= 3; -#if defined(_CRAY) || defined(__hpux) - else - *envp++ = "TZ=GMT0"; -#endif - *envp = 0; - environ = envinit; -} - -/* - * scrub_env() - * - * We only accept the environment variables listed below. - */ - -static void -scrub_env(void) -{ - static const char *reject[] = { - "TERMCAP=/", - NULL - }; - - static const char *accept[] = { - "XAUTH=", "XAUTHORITY=", "DISPLAY=", - "TERM=", - "EDITOR=", - "PAGER=", - "PRINTER=", - "LOGNAME=", - "POSIXLY_CORRECT=", - "TERMCAP=", - NULL - }; - - char **cpp, **cpp2; - const char **p; - - for (cpp2 = cpp = environ; *cpp; cpp++) { - int reject_it = 0; - - for(p = reject; *p; p++) - if(strncmp(*cpp, *p, strlen(*p)) == 0) { - reject_it = 1; - break; - } - if (reject_it) - continue; - - for(p = accept; *p; p++) - if(strncmp(*cpp, *p, strlen(*p)) == 0) - break; - if(*p != NULL) - *cpp2++ = *cpp; - } - *cpp2 = NULL; -} - - -struct arg_val { - int size; - int argc; - char **argv; -}; - -static void addarg(struct arg_val*, const char*); - -/* - * start_login(host) - * - * Assuming that we are now running as a child processes, this - * function will turn us into the login process. - */ - -void -start_login(const char *host, int autologin, char *name) -{ - struct arg_val argv; - char *user; - int save_errno; - -#ifdef ENCRYPTION - encrypt_output = NULL; - decrypt_input = NULL; -#endif - -#ifdef HAVE_UTMPX_H - { - int pid = getpid(); - struct utmpx utmpx; - struct timeval tv; - char *clean_tty; - - /* - * Create utmp entry for child - */ - - clean_tty = clean_ttyname(line); - memset(&utmpx, 0, sizeof(utmpx)); - strncpy(utmpx.ut_user, ".telnet", sizeof(utmpx.ut_user)); - strncpy(utmpx.ut_line, clean_tty, sizeof(utmpx.ut_line)); -#ifdef HAVE_STRUCT_UTMP_UT_ID - strncpy(utmpx.ut_id, make_id(clean_tty), sizeof(utmpx.ut_id)); -#endif - utmpx.ut_pid = pid; - - utmpx.ut_type = LOGIN_PROCESS; - - gettimeofday (&tv, NULL); - utmpx.ut_tv.tv_sec = tv.tv_sec; - utmpx.ut_tv.tv_usec = tv.tv_usec; - - if (pututxline(&utmpx) == NULL) - fatal(net, "pututxline failed"); - } -#endif - - scrub_env(); - - /* - * -h : pass on name of host. - * WARNING: -h is accepted by login if and only if - * getuid() == 0. - * -p : don't clobber the environment (so terminal type stays set). - * - * -f : force this login, he has already been authenticated - */ - - /* init argv structure */ - argv.size=0; - argv.argc=0; - argv.argv=malloc(0); /*so we can call realloc later */ - addarg(&argv, "login"); - addarg(&argv, "-h"); - addarg(&argv, host); - addarg(&argv, "-p"); - if(name && name[0]) - user = name; - else - user = getenv("USER"); -#ifdef AUTHENTICATION - if (auth_level < 0 || autologin != AUTH_VALID) { - if(!no_warn) { - printf("User not authenticated. "); - if (require_otp) - printf("Using one-time password\r\n"); - else - printf("Using plaintext username and password\r\n"); - } - if (require_otp) { - addarg(&argv, "-a"); - addarg(&argv, "otp"); - } - if(log_unauth) - syslog(LOG_INFO, "unauthenticated access from %s (%s)", - host, user ? user : "unknown user"); - } - if (auth_level >= 0 && autologin == AUTH_VALID) - addarg(&argv, "-f"); -#endif - if(user){ - addarg(&argv, "--"); - addarg(&argv, strdup(user)); - } - if (getenv("USER")) { - /* - * Assume that login will set the USER variable - * correctly. For SysV systems, this means that - * USER will no longer be set, just LOGNAME by - * login. (The problem is that if the auto-login - * fails, and the user then specifies a different - * account name, he can get logged in with both - * LOGNAME and USER in his environment, but the - * USER value will be wrong. - */ - unsetenv("USER"); - } - closelog(); - /* - * This sleep(1) is in here so that telnetd can - * finish up with the tty. There's a race condition - * the login banner message gets lost... - */ - sleep(1); - - execv(new_login, argv.argv); - save_errno = errno; - syslog(LOG_ERR, "%s: %m", new_login); - fatalperror_errno(net, new_login, save_errno); - /*NOTREACHED*/ -} - -static void -addarg(struct arg_val *argv, const char *val) -{ - if(argv->size <= argv->argc+1) { - argv->argv = realloc(argv->argv, sizeof(char*) * (argv->size + 10)); - if (argv->argv == NULL) - fatal (net, "realloc: out of memory"); - argv->size+=10; - } - if((argv->argv[argv->argc++] = strdup(val)) == NULL) - fatal (net, "strdup: out of memory"); - argv->argv[argv->argc] = NULL; -} - - -/* - * rmut() - * - * This is the function called by cleanup() to - * remove the utmp entry for this person. - */ - -#ifdef HAVE_UTMPX_H -static void -rmut(void) -{ - struct utmpx utmpx, *non_save_utxp; - char *clean_tty = clean_ttyname(line); - - /* - * This updates the utmpx and utmp entries and make a wtmp/x entry - */ - - setutxent(); - memset(&utmpx, 0, sizeof(utmpx)); - strncpy(utmpx.ut_line, clean_tty, sizeof(utmpx.ut_line)); - utmpx.ut_type = LOGIN_PROCESS; - non_save_utxp = getutxline(&utmpx); - if (non_save_utxp) { - struct utmpx *utxp; - struct timeval tv; - char user0; - - utxp = malloc(sizeof(struct utmpx)); - *utxp = *non_save_utxp; - user0 = utxp->ut_user[0]; - utxp->ut_user[0] = '\0'; - utxp->ut_type = DEAD_PROCESS; -#ifdef HAVE_STRUCT_UTMPX_UT_EXIT -#ifdef _STRUCT___EXIT_STATUS - utxp->ut_exit.__e_termination = 0; - utxp->ut_exit.__e_exit = 0; -#elif defined(__osf__) /* XXX */ - utxp->ut_exit.ut_termination = 0; - utxp->ut_exit.ut_exit = 0; -#else - utxp->ut_exit.e_termination = 0; - utxp->ut_exit.e_exit = 0; -#endif -#endif - gettimeofday (&tv, NULL); - utxp->ut_tv.tv_sec = tv.tv_sec; - utxp->ut_tv.tv_usec = tv.tv_usec; - - pututxline(utxp); -#ifdef WTMPX_FILE - utxp->ut_user[0] = user0; - updwtmpx(WTMPX_FILE, utxp); -#elif defined(WTMP_FILE) - /* This is a strange system with a utmpx and a wtmp! */ - { - int f = open(wtmpf, O_WRONLY|O_APPEND); - struct utmp wtmp; - if (f >= 0) { - strncpy(wtmp.ut_line, clean_tty, sizeof(wtmp.ut_line)); - strncpy(wtmp.ut_name, "", sizeof(wtmp.ut_name)); -#ifdef HAVE_STRUCT_UTMP_UT_HOST - strncpy(wtmp.ut_host, "", sizeof(wtmp.ut_host)); -#endif - wtmp.ut_time = time(NULL); - write(f, &wtmp, sizeof(wtmp)); - close(f); - } - } -#endif - free (utxp); - } - endutxent(); -} /* end of rmut */ -#endif - -#if !defined(HAVE_UTMPX_H) && !(defined(_CRAY) || defined(__hpux)) && BSD <= 43 -static void -rmut(void) -{ - int f; - int found = 0; - struct utmp *u, *utmp; - int nutmp; - struct stat statbf; - char *clean_tty = clean_ttyname(line); - - f = open(utmpf, O_RDWR); - if (f >= 0) { - fstat(f, &statbf); - utmp = (struct utmp *)malloc((unsigned)statbf.st_size); - if (!utmp) - syslog(LOG_ERR, "utmp malloc failed"); - if (statbf.st_size && utmp) { - nutmp = read(f, utmp, (int)statbf.st_size); - nutmp /= sizeof(struct utmp); - - for (u = utmp ; u < &utmp[nutmp] ; u++) { - if (strncmp(u->ut_line, - clean_tty, - sizeof(u->ut_line)) || - u->ut_name[0]==0) - continue; - lseek(f, ((long)u)-((long)utmp), L_SET); - strncpy(u->ut_name, "", sizeof(u->ut_name)); -#ifdef HAVE_STRUCT_UTMP_UT_HOST - strncpy(u->ut_host, "", sizeof(u->ut_host)); -#endif - u->ut_time = time(NULL); - write(f, u, sizeof(wtmp)); - found++; - } - } - close(f); - } - if (found) { - f = open(wtmpf, O_WRONLY|O_APPEND); - if (f >= 0) { - strncpy(wtmp.ut_line, clean_tty, sizeof(wtmp.ut_line)); - strncpy(wtmp.ut_name, "", sizeof(wtmp.ut_name)); -#ifdef HAVE_STRUCT_UTMP_UT_HOST - strncpy(wtmp.ut_host, "", sizeof(wtmp.ut_host)); -#endif - wtmp.ut_time = time(NULL); - write(f, &wtmp, sizeof(wtmp)); - close(f); - } - } - chmod(line, 0666); - chown(line, 0, 0); - line[strlen("/dev/")] = 'p'; - chmod(line, 0666); - chown(line, 0, 0); -} /* end of rmut */ -#endif /* CRAY */ - -#if defined(__hpux) && !defined(HAVE_UTMPX_H) -static void -rmut (char *line) -{ - struct utmp utmp; - struct utmp *utptr; - int fd; /* for /etc/wtmp */ - - utmp.ut_type = USER_PROCESS; - strncpy(utmp.ut_line, clean_ttyname(line), sizeof(utmp.ut_line)); - setutent(); - utptr = getutline(&utmp); - /* write it out only if it exists */ - if (utptr) { - utptr->ut_type = DEAD_PROCESS; - utptr->ut_time = time(NULL); - pututline(utptr); - /* set wtmp entry if wtmp file exists */ - if ((fd = open(wtmpf, O_WRONLY | O_APPEND)) >= 0) { - write(fd, utptr, sizeof(utmp)); - close(fd); - } - } - endutent(); - - chmod(line, 0666); - chown(line, 0, 0); - line[14] = line[13]; - line[13] = line[12]; - line[8] = 'm'; - line[9] = '/'; - line[10] = 'p'; - line[11] = 't'; - line[12] = 'y'; - chmod(line, 0666); - chown(line, 0, 0); -} -#endif - -/* - * cleanup() - * - * This is the routine to call when we are all through, to - * clean up anything that needs to be cleaned up. - */ - -#ifdef PARENT_DOES_UTMP - -void -cleanup(int sig) -{ -#ifdef _CRAY - static int incleanup = 0; - int t; - int child_status; /* status of child process as returned by waitpid */ - int flags = WNOHANG|WUNTRACED; - - /* - * 1: Pick up the zombie, if we are being called - * as the signal handler. - * 2: If we are a nested cleanup(), return. - * 3: Try to clean up TMPDIR. - * 4: Fill in utmp with shutdown of process. - * 5: Close down the network and pty connections. - * 6: Finish up the TMPDIR cleanup, if needed. - */ - if (sig == SIGCHLD) { - while (waitpid(-1, &child_status, flags) > 0) - ; /* VOID */ - /* Check if the child process was stopped - * rather than exited. We want cleanup only if - * the child has died. - */ - if (WIFSTOPPED(child_status)) { - return; - } - } - t = sigblock(sigmask(SIGCHLD)); - if (incleanup) { - sigsetmask(t); - return; - } - incleanup = 1; - sigsetmask(t); - - t = cleantmp(&wtmp); - setutent(); /* just to make sure */ -#endif /* CRAY */ - rmut(line); - close(ourpty); - shutdown(net, 2); -#ifdef _CRAY - if (t == 0) - cleantmp(&wtmp); -#endif /* CRAY */ - exit(1); -} - -#else /* PARENT_DOES_UTMP */ - -void -cleanup(int sig) -{ -#if defined(HAVE_UTMPX_H) || !defined(HAVE_LOGWTMP) - rmut(); -#ifdef HAVE_VHANGUP -#ifndef __sgi - vhangup(); /* XXX */ -#endif -#endif -#else - char *p; - - p = line + sizeof("/dev/") - 1; - if (logout(p)) - logwtmp(p, "", ""); - chmod(line, 0666); - chown(line, 0, 0); - *p = 'p'; - chmod(line, 0666); - chown(line, 0, 0); -#endif - shutdown(net, 2); - exit(1); -} - -#endif /* PARENT_DOES_UTMP */ - -#ifdef PARENT_DOES_UTMP -/* - * _utmp_sig_rcv - * utmp_sig_init - * utmp_sig_wait - * These three functions are used to coordinate the handling of - * the utmp file between the server and the soon-to-be-login shell. - * The server actually creates the utmp structure, the child calls - * utmp_sig_wait(), until the server calls utmp_sig_notify() and - * signals the future-login shell to proceed. - */ -static int caught=0; /* NZ when signal intercepted */ -static void (*func)(); /* address of previous handler */ - -void -_utmp_sig_rcv(sig) - int sig; -{ - caught = 1; - signal(SIGUSR1, func); -} - -void -utmp_sig_init() -{ - /* - * register signal handler for UTMP creation - */ - if ((int)(func = signal(SIGUSR1, _utmp_sig_rcv)) == -1) - fatalperror(net, "telnetd/signal"); -} - -void -utmp_sig_reset() -{ - signal(SIGUSR1, func); /* reset handler to default */ -} - -# ifdef __hpux -# define sigoff() /* do nothing */ -# define sigon() /* do nothing */ -# endif - -void -utmp_sig_wait() -{ - /* - * Wait for parent to write our utmp entry. - */ - sigoff(); - while (caught == 0) { - pause(); /* wait until we get a signal (sigon) */ - sigoff(); /* turn off signals while we check caught */ - } - sigon(); /* turn on signals again */ -} - -void -utmp_sig_notify(pid) -{ - kill(pid, SIGUSR1); -} - -#ifdef _CRAY -static int gotsigjob = 0; - - /*ARGSUSED*/ -void -sigjob(sig) - int sig; -{ - int jid; - struct jobtemp *jp; - - while ((jid = waitjob(NULL)) != -1) { - if (jid == 0) { - return; - } - gotsigjob++; - jobend(jid, NULL, NULL); - } -} - -/* - * jid_getutid: - * called by jobend() before calling cleantmp() - * to find the correct $TMPDIR to cleanup. - */ - -struct utmp * -jid_getutid(jid) - int jid; -{ - struct utmp *cur = NULL; - - setutent(); /* just to make sure */ - while (cur = getutent()) { - if ( (cur->ut_type != NULL) && (jid == cur->ut_jid) ) { - return(cur); - } - } - - return(0); -} - -/* - * Clean up the TMPDIR that login created. - * The first time this is called we pick up the info - * from the utmp. If the job has already gone away, - * then we'll clean up and be done. If not, then - * when this is called the second time it will wait - * for the signal that the job is done. - */ -int -cleantmp(wtp) - struct utmp *wtp; -{ - struct utmp *utp; - static int first = 1; - int mask, omask, ret; - extern struct utmp *getutid (const struct utmp *_Id); - - - mask = sigmask(WJSIGNAL); - - if (first == 0) { - omask = sigblock(mask); - while (gotsigjob == 0) - sigpause(omask); - return(1); - } - first = 0; - setutent(); /* just to make sure */ - - utp = getutid(wtp); - if (utp == 0) { - syslog(LOG_ERR, "Can't get /etc/utmp entry to clean TMPDIR"); - return(-1); - } - /* - * Nothing to clean up if the user shell was never started. - */ - if (utp->ut_type != USER_PROCESS || utp->ut_jid == 0) - return(1); - - /* - * Block the WJSIGNAL while we are in jobend(). - */ - omask = sigblock(mask); - ret = jobend(utp->ut_jid, utp->ut_tpath, utp->ut_user); - sigsetmask(omask); - return(ret); -} - -int -jobend(jid, path, user) - int jid; - char *path; - char *user; -{ - static int saved_jid = 0; - static int pty_saved_jid = 0; - static char saved_path[sizeof(wtmp.ut_tpath)+1]; - static char saved_user[sizeof(wtmp.ut_user)+1]; - - /* - * this little piece of code comes into play - * only when ptyreconnect is used to reconnect - * to an previous session. - * - * this is the only time when the - * "saved_jid != jid" code is executed. - */ - - if ( saved_jid && saved_jid != jid ) { - if (!path) { /* called from signal handler */ - pty_saved_jid = jid; - } else { - pty_saved_jid = saved_jid; - } - } - - if (path) { - strlcpy(saved_path, path, sizeof(saved_path)); - strlcpy(saved_user, user, sizeof(saved_user)); - } - if (saved_jid == 0) { - saved_jid = jid; - return(0); - } - - /* if the jid has changed, get the correct entry from the utmp file */ - - if ( saved_jid != jid ) { - struct utmp *utp = NULL; - struct utmp *jid_getutid(); - - utp = jid_getutid(pty_saved_jid); - - if (utp == 0) { - syslog(LOG_ERR, "Can't get /etc/utmp entry to clean TMPDIR"); - return(-1); - } - - cleantmpdir(jid, utp->ut_tpath, utp->ut_user); - return(1); - } - - cleantmpdir(jid, saved_path, saved_user); - return(1); -} - -/* - * Fork a child process to clean up the TMPDIR - */ -cleantmpdir(jid, tpath, user) - int jid; - char *tpath; - char *user; -{ - switch(fork()) { - case -1: - syslog(LOG_ERR, "TMPDIR cleanup(%s): fork() failed: %m\n", - tpath); - break; - case 0: - execl(CLEANTMPCMD, CLEANTMPCMD, user, tpath, NULL); - syslog(LOG_ERR, "TMPDIR cleanup(%s): execl(%s) failed: %m\n", - tpath, CLEANTMPCMD); - exit(1); - default: - /* - * Forget about child. We will exit, and - * /etc/init will pick it up. - */ - break; - } -} -#endif /* CRAY */ -#endif /* defined(PARENT_DOES_UTMP) */ diff --git a/kerberosV/src/appl/telnet/telnetd/telnetd.8 b/kerberosV/src/appl/telnet/telnetd/telnetd.8 deleted file mode 100644 index a7dd67024c4..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/telnetd.8 +++ /dev/null @@ -1,536 +0,0 @@ -.\" Copyright (c) 1983, 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. -.\" -.\" @(#)telnetd.8 8.4 (Berkeley) 6/1/94 -.\" -.Dd September 19, 2006 -.Dt TELNETD 8 -.Os BSD 4.2 -.Sh NAME -.Nm telnetd -.Nd DARPA -.Tn TELNET -protocol server -.Sh SYNOPSIS -.Nm telnetd -.Op Fl BeUhkln -.Op Fl D Ar debugmode -.Op Fl S Ar tos -.Op Fl X Ar authtype -.Op Fl a Ar authmode -.Op Fl r Ns Ar lowpty-highpty -.Op Fl u Ar len -.Op Fl debug -.Op Fl L Ar /bin/login -.Op Fl y -.Op Ar port -.Sh DESCRIPTION -The -.Nm telnetd -command is a server which supports the -.Tn DARPA -standard -.Tn TELNET -virtual terminal protocol. -.Nm Telnetd -is normally invoked by the internet server (see -.Xr inetd 8 ) -for requests to connect to the -.Tn TELNET -port as indicated by the -.Pa /etc/services -file (see -.Xr services 5 ) . -The -.Fl debug -option may be used to start up -.Nm telnetd -manually, instead of through -.Xr inetd 8 . -If started up this way, -.Ar port -may be specified to run -.Nm telnetd -on an alternate -.Tn TCP -port number. -.Pp -The -.Nm telnetd -command accepts the following options: -.Bl -tag -width "-a authmode" -.It Fl a Ar authmode -This option may be used for specifying what mode should -be used for authentication. -Note that this option is only useful if -.Nm telnetd -has been compiled with support for the -.Dv AUTHENTICATION -option. -There are several valid values for -.Ar authmode : -.Bl -tag -width debug -.It debug -Turns on authentication debugging code. -.It user -Only allow connections when the remote user -can provide valid authentication information -to identify the remote user, -and is allowed access to the specified account -without providing a password. -.It valid -Only allow connections when the remote user -can provide valid authentication information -to identify the remote user. -The -.Xr login 1 -command will provide any additional user verification -needed if the remote user is not allowed automatic -access to the specified account. -.It other -Only allow connections that supply some authentication information. -This option is currently not supported -by any of the existing authentication mechanisms, -and is thus the same as specifying -.Fl a -.Cm valid . -.It otp -Only allow authenticated connections (as with -.Fl a -.Cm user ) -and also logins with one-time passwords (OTPs). This option will call -login with an option so that only OTPs are accepted. The user can of -course still type secret information at the prompt. -.It none -This is the default state. -Authentication information is not required. -If no or insufficient authentication information -is provided, then the -.Xr login 1 -program will provide the necessary user -verification. -.It off -This disables the authentication code. -All user verification will happen through the -.Xr login 1 -program. -.El -.It Fl B -Ignored. -.It Fl D Ar debugmode -This option may be used for debugging purposes. -This allows -.Nm telnetd -to print out debugging information -to the connection, allowing the user to see what -.Nm telnetd -is doing. -There are several possible values for -.Ar debugmode : -.Bl -tag -width exercise -.It Cm options -Prints information about the negotiation of -.Tn TELNET -options. -.It Cm report -Prints the -.Cm options -information, plus some additional information -about what processing is going on. -.It Cm netdata -Displays the data stream received by -.Nm telnetd . -.It Cm ptydata -Displays data written to the pty. -.It Cm exercise -Has not been implemented yet. -.El -.It Fl e -require encryption to be turned on (in both direction) by the client -and disconnects if the client tries to turn the encryption off (in -either direction). -.It Fl h -Disables the printing of host-specific information before -login has been completed. -.It Fl k -.It Fl l -Ignored. -.It Fl n -Disable -.Dv TCP -keep-alives. Normally -.Nm telnetd -enables the -.Tn TCP -keep-alive mechanism to probe connections that -have been idle for some period of time to determine -if the client is still there, so that idle connections -from machines that have crashed or can no longer -be reached may be cleaned up. -.It Fl r Ar lowpty-highpty -This option is only enabled when -.Nm telnetd -is compiled for -.Dv UNICOS . -It specifies an inclusive range of pseudo-terminal devices to -use. If the system has sysconf variable -.Dv _SC_CRAY_NPTY -configured, the default pty search range is 0 to -.Dv _SC_CRAY_NPTY ; -otherwise, the default range is 0 to 128. Either -.Ar lowpty -or -.Ar highpty -may be omitted to allow changing -either end of the search range. If -.Ar lowpty -is omitted, the - character is still required so that -.Nm telnetd -can differentiate -.Ar highpty -from -.Ar lowpty . -.It Fl S Ar tos -.It Fl u Ar len -This option is used to specify the size of the field -in the -.Dv utmp -structure that holds the remote host name. -If the resolved host name is longer than -.Ar len , -the dotted decimal value will be used instead. -This allows hosts with very long host names that -overflow this field to still be uniquely identified. -Specifying -.Fl u0 -indicates that only dotted decimal addresses -should be put into the -.Pa utmp -file. -.It Fl U -This option causes -.Nm telnetd -to refuse connections from addresses that -cannot be mapped back into a symbolic name -via the -.Xr gethostbyaddr 3 -routine. -.It Fl X Ar authtype -This option is only valid if -.Nm telnetd -has been built with support for the authentication option. -It disables the use of -.Ar authtype -authentication, and -can be used to temporarily disable -a specific authentication type without having to recompile -.Nm telnetd . -.It Fl L Ar pathname -Specify pathname to an alternative login program. -.It Fl y -Makes -.Nm -not warn when a user is trying to login with a cleartext password. -.El -.Pp -.Nm Telnetd -operates by allocating a pseudo-terminal device (see -.Xr pty 4 ) -for a client, then creating a login process which has -the slave side of the pseudo-terminal as -.Dv stdin , -.Dv stdout -and -.Dv stderr . -.Nm Telnetd -manipulates the master side of the pseudo-terminal, -implementing the -.Tn TELNET -protocol and passing characters -between the remote client and the login process. -.Pp -When a -.Tn TELNET -session is started up, -.Nm telnetd -sends -.Tn TELNET -options to the client side indicating -a willingness to do the -following -.Tn TELNET -options, which are described in more detail below: -.Bd -literal -offset indent -DO AUTHENTICATION -WILL ENCRYPT -DO TERMINAL TYPE -DO TSPEED -DO XDISPLOC -DO NEW-ENVIRON -DO ENVIRON -WILL SUPPRESS GO AHEAD -DO ECHO -DO LINEMODE -DO NAWS -WILL STATUS -DO LFLOW -DO TIMING-MARK -.Ed -.Pp -The pseudo-terminal allocated to the client is configured -to operate in -.Dq cooked -mode, and with -.Dv XTABS and -.Dv CRMOD -enabled (see -.Xr tty 4 ) . -.Pp -.Nm Telnetd -has support for enabling locally the following -.Tn TELNET -options: -.Bl -tag -width "DO AUTHENTICATION" -.It "WILL ECHO" -When the -.Dv LINEMODE -option is enabled, a -.Dv WILL ECHO -or -.Dv WONT ECHO -will be sent to the client to indicate the -current state of terminal echoing. -When terminal echo is not desired, a -.Dv WILL ECHO -is sent to indicate that -.Tn telnetd -will take care of echoing any data that needs to be -echoed to the terminal, and then nothing is echoed. -When terminal echo is desired, a -.Dv WONT ECHO -is sent to indicate that -.Tn telnetd -will not be doing any terminal echoing, so the -client should do any terminal echoing that is needed. -.It "WILL BINARY" -Indicates that the client is willing to send a -8 bits of data, rather than the normal 7 bits -of the Network Virtual Terminal. -.It "WILL SGA" -Indicates that it will not be sending -.Dv IAC GA , -go ahead, commands. -.It "WILL STATUS" -Indicates a willingness to send the client, upon -request, of the current status of all -.Tn TELNET -options. -.It "WILL TIMING-MARK" -Whenever a -.Dv DO TIMING-MARK -command is received, it is always responded -to with a -.Dv WILL TIMING-MARK -.It "WILL LOGOUT" -When a -.Dv DO LOGOUT -is received, a -.Dv WILL LOGOUT -is sent in response, and the -.Tn TELNET -session is shut down. -.It "WILL ENCRYPT" -Only sent if -.Nm telnetd -is compiled with support for data encryption, and -indicates a willingness to decrypt -the data stream. -.El -.Pp -.Nm Telnetd -has support for enabling remotely the following -.Tn TELNET -options: -.Bl -tag -width "DO AUTHENTICATION" -.It "DO BINARY" -Sent to indicate that -.Tn telnetd -is willing to receive an 8 bit data stream. -.It "DO LFLOW" -Requests that the client handle flow control -characters remotely. -.It "DO ECHO" -This is not really supported, but is sent to identify a 4.2BSD -.Xr telnet 1 -client, which will improperly respond with -.Dv WILL ECHO . -If a -.Dv WILL ECHO -is received, a -.Dv DONT ECHO -will be sent in response. -.It "DO TERMINAL-TYPE" -Indicates a desire to be able to request the -name of the type of terminal that is attached -to the client side of the connection. -.It "DO SGA" -Indicates that it does not need to receive -.Dv IAC GA , -the go ahead command. -.It "DO NAWS" -Requests that the client inform the server when -the window (display) size changes. -.It "DO TERMINAL-SPEED" -Indicates a desire to be able to request information -about the speed of the serial line to which -the client is attached. -.It "DO XDISPLOC" -Indicates a desire to be able to request the name -of the X windows display that is associated with -the telnet client. -.It "DO NEW-ENVIRON" -Indicates a desire to be able to request environment -variable information, as described in RFC 1572. -.It "DO ENVIRON" -Indicates a desire to be able to request environment -variable information, as described in RFC 1408. -.It "DO LINEMODE" -Only sent if -.Nm telnetd -is compiled with support for linemode, and -requests that the client do line by line processing. -.It "DO TIMING-MARK" -Only sent if -.Nm telnetd -is compiled with support for both linemode and -kludge linemode, and the client responded with -.Dv WONT LINEMODE . -If the client responds with -.Dv WILL TM , -the it is assumed that the client supports -kludge linemode. -Note that the -.Op Fl k -option can be used to disable this. -.It "DO AUTHENTICATION" -Only sent if -.Nm telnetd -is compiled with support for authentication, and -indicates a willingness to receive authentication -information for automatic login. -.It "DO ENCRYPT" -Only sent if -.Nm telnetd -is compiled with support for data encryption, and -indicates a willingness to decrypt -the data stream. -.El -.Sh FILES -.Bl -tag -width /etc/services -compact -.It Pa /etc/services -.It Pa /etc/inittab -(UNICOS systems only) -.It Pa /etc/iptos -(if supported) -.El -.Sh "SEE ALSO" -.Xr telnet 1 , -.Xr login 1 -.Sh STANDARDS -.Bl -tag -compact -width RFC-1572 -.It Cm RFC-854 -.Tn TELNET -PROTOCOL SPECIFICATION -.It Cm RFC-855 -TELNET OPTION SPECIFICATIONS -.It Cm RFC-856 -TELNET BINARY TRANSMISSION -.It Cm RFC-857 -TELNET ECHO OPTION -.It Cm RFC-858 -TELNET SUPPRESS GO AHEAD OPTION -.It Cm RFC-859 -TELNET STATUS OPTION -.It Cm RFC-860 -TELNET TIMING MARK OPTION -.It Cm RFC-861 -TELNET EXTENDED OPTIONS - LIST OPTION -.It Cm RFC-885 -TELNET END OF RECORD OPTION -.It Cm RFC-1073 -Telnet Window Size Option -.It Cm RFC-1079 -Telnet Terminal Speed Option -.It Cm RFC-1091 -Telnet Terminal-Type Option -.It Cm RFC-1096 -Telnet X Display Location Option -.It Cm RFC-1123 -Requirements for Internet Hosts -- Application and Support -.It Cm RFC-1184 -Telnet Linemode Option -.It Cm RFC-1372 -Telnet Remote Flow Control Option -.It Cm RFC-1416 -Telnet Authentication Option -.It Cm RFC-1411 -Telnet Authentication: Kerberos Version 4 -.It Cm RFC-1412 -Telnet Authentication: SPX -.It Cm RFC-1571 -Telnet Environment Option Interoperability Issues -.It Cm RFC-1572 -Telnet Environment Option -.El -.Sh BUGS -Some -.Tn TELNET -commands are only partially implemented. -.Pp -Because of bugs in the original 4.2 BSD -.Xr telnet 1 , -.Nm telnetd -performs some dubious protocol exchanges to try to discover if the remote -client is, in fact, a 4.2 BSD -.Xr telnet 1 . -.Pp -Binary mode -has no common interpretation except between similar operating systems -(Unix in this case). -.Pp -The terminal type name received from the remote client is converted to -lower case. -.Pp -.Nm Telnetd -never sends -.Tn TELNET -.Dv IAC GA -(go ahead) commands. diff --git a/kerberosV/src/appl/telnet/telnetd/telnetd.c b/kerberosV/src/appl/telnet/telnetd/telnetd.c deleted file mode 100644 index bae567cda36..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/telnetd.c +++ /dev/null @@ -1,1401 +0,0 @@ -/* - * Copyright (c) 1989, 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. - */ - -#include "telnetd.h" - -RCSID("$Id: telnetd.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -#ifdef _SC_CRAY_SECURE_SYS -#include -#include -#include -#include -int secflag; -char tty_dev[16]; -struct secdev dv; -struct sysv sysv; -struct socksec ss; -#endif /* _SC_CRAY_SECURE_SYS */ - -#ifdef AUTHENTICATION -int auth_level = 0; -#endif - -#ifdef KRB5 -#define Authenticator k5_Authenticator -#include -#undef Authenticator -#endif - -extern int utmp_len; -int registerd_host_only = 0; -#ifdef ENCRYPTION -int require_encryption = 0; -#endif - -#ifdef STREAMSPTY - -#ifdef _AIX -#include -#endif -# ifdef HAVE_SYS_STRTTY_H -# include -# endif -# ifdef HAVE_SYS_STR_TTY_H -# include -# endif -/* make sure we don't get the bsd version */ -/* what is this here for? solaris? /joda */ -# ifdef HAVE_SYS_TTY_H -# include "/usr/include/sys/tty.h" -# endif -# ifdef HAVE_SYS_PTYVAR_H -# include -# endif - -/* - * Because of the way ptyibuf is used with streams messages, we need - * ptyibuf+1 to be on a full-word boundary. The following wierdness - * is simply to make that happen. - */ -long ptyibufbuf[BUFSIZ/sizeof(long)+1]; -char *ptyibuf = ((char *)&ptyibufbuf[1])-1; -char *ptyip = ((char *)&ptyibufbuf[1])-1; -char ptyibuf2[BUFSIZ]; -unsigned char ctlbuf[BUFSIZ]; -struct strbuf strbufc, strbufd; - -int readstream(int, char*, int); - -#else /* ! STREAMPTY */ - -/* - * I/O data buffers, - * pointers, and counters. - */ -char ptyibuf[BUFSIZ], *ptyip = ptyibuf; -char ptyibuf2[BUFSIZ]; - -#endif /* ! STREAMPTY */ - -int hostinfo = 1; /* do we print login banner? */ - -#ifdef _CRAY -extern int newmap; /* nonzero if \n maps to ^M^J */ -int lowpty = 0, highpty; /* low, high pty numbers */ -#endif /* CRAY */ - -int debug = 0; -int keepalive = 1; -char *progname; - -static void usage (int error_code); - -/* - * The string to pass to getopt(). We do it this way so - * that only the actual options that we support will be - * passed off to getopt(). - */ -char valid_opts[] = "Bd:hklnS:u:UL:y" -#ifdef AUTHENTICATION - "a:X:z" -#endif -#ifdef ENCRYPTION - "e" -#endif -#ifdef DIAGNOSTICS - "D:" -#endif -#ifdef _CRAY - "r:" -#endif - ; - -static void doit(struct sockaddr*, int); - -int -main(int argc, char **argv) -{ - struct sockaddr_storage __ss; - struct sockaddr *sa = (struct sockaddr *)&__ss; - int on = 1; - socklen_t sa_size; - int ch; -#if defined(IPPROTO_IP) && defined(IP_TOS) - int tos = -1; -#endif - pfrontp = pbackp = ptyobuf; - netip = netibuf; - nfrontp = nbackp = netobuf; - - setprogname(argv[0]); - - progname = *argv; -#ifdef ENCRYPTION - nclearto = 0; -#endif - -#ifdef _CRAY - /* - * Get number of pty's before trying to process options, - * which may include changing pty range. - */ - highpty = getnpty(); -#endif /* CRAY */ - - if (argc == 2 && strcmp(argv[1], "--version") == 0) { - print_version(NULL); - exit(0); - } - if (argc == 2 && strcmp(argv[1], "--help") == 0) - usage(0); - - while ((ch = getopt(argc, argv, valid_opts)) != -1) { - switch(ch) { - -#ifdef AUTHENTICATION - case 'a': - /* - * Check for required authentication level - */ - if (strcmp(optarg, "debug") == 0) { - auth_debug_mode = 1; - } else if (strcasecmp(optarg, "none") == 0) { - auth_level = 0; - } else if (strcasecmp(optarg, "otp") == 0) { - auth_level = 0; - require_otp = 1; - } else if (strcasecmp(optarg, "other") == 0) { - auth_level = AUTH_OTHER; - } else if (strcasecmp(optarg, "user") == 0) { - auth_level = AUTH_USER; - } else if (strcasecmp(optarg, "valid") == 0) { - auth_level = AUTH_VALID; - } else if (strcasecmp(optarg, "off") == 0) { - /* - * This hack turns off authentication - */ - auth_level = -1; - } else { - fprintf(stderr, - "telnetd: unknown authorization level for -a\n"); - } - break; -#endif /* AUTHENTICATION */ - - case 'B': /* BFTP mode is not supported any more */ - break; - case 'd': - if (strcmp(optarg, "ebug") == 0) { - debug++; - break; - } - usage(1); - /* NOTREACHED */ - break; - -#ifdef DIAGNOSTICS - case 'D': - /* - * Check for desired diagnostics capabilities. - */ - if (!strcmp(optarg, "report")) { - diagnostic |= TD_REPORT|TD_OPTIONS; - } else if (!strcmp(optarg, "exercise")) { - diagnostic |= TD_EXERCISE; - } else if (!strcmp(optarg, "netdata")) { - diagnostic |= TD_NETDATA; - } else if (!strcmp(optarg, "ptydata")) { - diagnostic |= TD_PTYDATA; - } else if (!strcmp(optarg, "options")) { - diagnostic |= TD_OPTIONS; - } else { - usage(1); - /* NOT REACHED */ - } - break; -#endif /* DIAGNOSTICS */ - -#ifdef ENCRYPTION - case 'e': - require_encryption = 1; - break; -#endif - - case 'h': - hostinfo = 0; - break; - - case 'k': /* Linemode is not supported any more */ - case 'l': - break; - - case 'n': - keepalive = 0; - break; - -#ifdef _CRAY - case 'r': - { - char *strchr(); - char *c; - - /* - * Allow the specification of alterations - * to the pty search range. It is legal to - * specify only one, and not change the - * other from its default. - */ - c = strchr(optarg, '-'); - if (c) { - *c++ = '\0'; - highpty = atoi(c); - } - if (*optarg != '\0') - lowpty = atoi(optarg); - if ((lowpty > highpty) || (lowpty < 0) || - (highpty > 32767)) { - usage(1); - /* NOT REACHED */ - } - break; - } -#endif /* CRAY */ - - case 'S': -#ifdef HAVE_PARSETOS - if ((tos = parsetos(optarg, "tcp")) < 0) - fprintf(stderr, "%s%s%s\n", - "telnetd: Bad TOS argument '", optarg, - "'; will try to use default TOS"); -#else - fprintf(stderr, "%s%s\n", "TOS option unavailable; ", - "-S flag not supported\n"); -#endif - break; - - case 'u': { - char *eptr; - - utmp_len = strtol(optarg, &eptr, 0); - if (optarg == eptr) - fprintf(stderr, "telnetd: unknown utmp len (%s)\n", optarg); - break; - } - - case 'U': - registerd_host_only = 1; - break; - -#ifdef AUTHENTICATION - case 'X': - /* - * Check for invalid authentication types - */ - auth_disable_name(optarg); - break; -#endif - case 'y': - no_warn = 1; - break; -#ifdef AUTHENTICATION - case 'z': - log_unauth = 1; - break; - -#endif /* AUTHENTICATION */ - - case 'L': - new_login = optarg; - break; - - default: - fprintf(stderr, "telnetd: %c: unknown option\n", ch); - /* FALLTHROUGH */ - case '?': - usage(0); - /* NOTREACHED */ - } - } - - argc -= optind; - argv += optind; - - if (debug) { - int port = 0; - struct servent *sp; - - if (argc > 1) { - usage (1); - } else if (argc == 1) { - sp = roken_getservbyname (*argv, "tcp"); - if (sp) - port = sp->s_port; - else - port = htons(atoi(*argv)); - } else { -#ifdef KRB5 - port = krb5_getportbyname (NULL, "telnet", "tcp", 23); -#else - port = k_getportbyname("telnet", "tcp", htons(23)); -#endif - } - mini_inetd (port, NULL); - } else if (argc > 0) { - usage(1); - /* NOT REACHED */ - } - -#ifdef _SC_CRAY_SECURE_SYS - secflag = sysconf(_SC_CRAY_SECURE_SYS); - - /* - * Get socket's security label - */ - if (secflag) { - socklen_t szss = sizeof(ss); - int sock_multi; - socklen_t szi = sizeof(int); - - memset(&dv, 0, sizeof(dv)); - - if (getsysv(&sysv, sizeof(struct sysv)) != 0) - fatalperror(net, "getsysv"); - - /* - * Get socket security label and set device values - * {security label to be set on ttyp device} - */ -#ifdef SO_SEC_MULTI /* 8.0 code */ - if ((getsockopt(0, SOL_SOCKET, SO_SECURITY, - (void *)&ss, &szss) < 0) || - (getsockopt(0, SOL_SOCKET, SO_SEC_MULTI, - (void *)&sock_multi, &szi) < 0)) - fatalperror(net, "getsockopt"); - else { - dv.dv_actlvl = ss.ss_actlabel.lt_level; - dv.dv_actcmp = ss.ss_actlabel.lt_compart; - if (!sock_multi) { - dv.dv_minlvl = dv.dv_maxlvl = dv.dv_actlvl; - dv.dv_valcmp = dv.dv_actcmp; - } else { - dv.dv_minlvl = ss.ss_minlabel.lt_level; - dv.dv_maxlvl = ss.ss_maxlabel.lt_level; - dv.dv_valcmp = ss.ss_maxlabel.lt_compart; - } - dv.dv_devflg = 0; - } -#else /* SO_SEC_MULTI */ /* 7.0 code */ - if (getsockopt(0, SOL_SOCKET, SO_SECURITY, - (void *)&ss, &szss) >= 0) { - dv.dv_actlvl = ss.ss_slevel; - dv.dv_actcmp = ss.ss_compart; - dv.dv_minlvl = ss.ss_minlvl; - dv.dv_maxlvl = ss.ss_maxlvl; - dv.dv_valcmp = ss.ss_maxcmp; - } -#endif /* SO_SEC_MULTI */ - } -#endif /* _SC_CRAY_SECURE_SYS */ - - roken_openlog("telnetd", LOG_PID | LOG_ODELAY, LOG_DAEMON); - sa_size = sizeof (__ss); - if (getpeername(STDIN_FILENO, sa, &sa_size) < 0) { - fprintf(stderr, "%s: ", progname); - perror("getpeername"); - _exit(1); - } - if (keepalive && - setsockopt(STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE, - (void *)&on, sizeof (on)) < 0) { - syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m"); - } - -#if defined(IPPROTO_IP) && defined(IP_TOS) && defined(HAVE_SETSOCKOPT) - { -# ifdef HAVE_GETTOSBYNAME - struct tosent *tp; - if (tos < 0 && (tp = gettosbyname("telnet", "tcp"))) - tos = tp->t_tos; -# endif - if (tos < 0) - tos = 020; /* Low Delay bit */ - if (tos - && sa->sa_family == AF_INET - && (setsockopt(STDIN_FILENO, IPPROTO_IP, IP_TOS, - (void *)&tos, sizeof(tos)) < 0) - && (errno != ENOPROTOOPT) ) - syslog(LOG_WARNING, "setsockopt (IP_TOS): %m"); - } -#endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ - net = STDIN_FILENO; - doit(sa, sa_size); - /* NOTREACHED */ - return 0; -} /* end of main */ - -static void -usage(int exit_code) -{ - fprintf(stderr, "Usage: telnetd"); - fprintf(stderr, " [--help]"); - fprintf(stderr, " [--version]"); -#ifdef AUTHENTICATION - fprintf(stderr, " [-a (debug|other|otp|user|valid|off|none)]\n\t"); -#endif - fprintf(stderr, " [-debug]"); -#ifdef DIAGNOSTICS - fprintf(stderr, " [-D (options|report|exercise|netdata|ptydata)]\n\t"); -#endif -#ifdef AUTHENTICATION - fprintf(stderr, " [-edebug]"); -#endif - fprintf(stderr, " [-h]"); - fprintf(stderr, " [-L login]"); - fprintf(stderr, " [-n]"); -#ifdef _CRAY - fprintf(stderr, " [-r[lowpty]-[highpty]]"); -#endif - fprintf(stderr, "\n\t"); -#ifdef HAVE_GETTOSBYNAME - fprintf(stderr, " [-S tos]"); -#endif -#ifdef AUTHENTICATION - fprintf(stderr, " [-X auth-type] [-y] [-z]"); -#endif - fprintf(stderr, " [-u utmp_hostname_length] [-U]"); - fprintf(stderr, " [port]\n"); - exit(exit_code); -} - -/* - * getterminaltype - * - * Ask the other end to send along its terminal type and speed. - * Output is the variable terminaltype filled in. - */ -static unsigned char ttytype_sbbuf[] = { - IAC, SB, TELOPT_TTYPE, TELQUAL_SEND, IAC, SE -}; - -int -getterminaltype(char *name, size_t name_sz) -{ - int retval = -1; - - settimer(baseline); -#ifdef AUTHENTICATION - /* - * Handle the Authentication option before we do anything else. - */ - send_do(TELOPT_AUTHENTICATION, 1); - while (his_will_wont_is_changing(TELOPT_AUTHENTICATION)) - ttloop(); - if (his_state_is_will(TELOPT_AUTHENTICATION)) { - retval = auth_wait(name, name_sz); - } -#endif - -#ifdef ENCRYPTION - send_will(TELOPT_ENCRYPT, 1); - send_do(TELOPT_ENCRYPT, 1); /* esc@magic.fi */ -#endif - send_do(TELOPT_TTYPE, 1); - send_do(TELOPT_TSPEED, 1); - send_do(TELOPT_XDISPLOC, 1); - send_do(TELOPT_NEW_ENVIRON, 1); - send_do(TELOPT_OLD_ENVIRON, 1); - while ( -#ifdef ENCRYPTION - his_do_dont_is_changing(TELOPT_ENCRYPT) || -#endif - his_will_wont_is_changing(TELOPT_TTYPE) || - his_will_wont_is_changing(TELOPT_TSPEED) || - his_will_wont_is_changing(TELOPT_XDISPLOC) || - his_will_wont_is_changing(TELOPT_NEW_ENVIRON) || - his_will_wont_is_changing(TELOPT_OLD_ENVIRON)) { - ttloop(); - } -#ifdef ENCRYPTION - /* - * Wait for the negotiation of what type of encryption we can - * send with. If autoencrypt is not set, this will just return. - */ - if (his_state_is_will(TELOPT_ENCRYPT)) { - encrypt_wait(); - } - if (require_encryption) { - - while (encrypt_delay()) - if (telnet_spin()) - fatal(net, "Failed while waiting for encryption"); - - if (!encrypt_is_encrypting()) - fatal(net, "Encryption required but not turned on by client"); - } -#endif - if (his_state_is_will(TELOPT_TSPEED)) { - static unsigned char sb[] = - { IAC, SB, TELOPT_TSPEED, TELQUAL_SEND, IAC, SE }; - - telnet_net_write (sb, sizeof sb); - DIAG(TD_OPTIONS, printsub('>', sb + 2, sizeof sb - 2);); - } - if (his_state_is_will(TELOPT_XDISPLOC)) { - static unsigned char sb[] = - { IAC, SB, TELOPT_XDISPLOC, TELQUAL_SEND, IAC, SE }; - - telnet_net_write (sb, sizeof sb); - DIAG(TD_OPTIONS, printsub('>', sb + 2, sizeof sb - 2);); - } - if (his_state_is_will(TELOPT_NEW_ENVIRON)) { - static unsigned char sb[] = - { IAC, SB, TELOPT_NEW_ENVIRON, TELQUAL_SEND, IAC, SE }; - - telnet_net_write (sb, sizeof sb); - DIAG(TD_OPTIONS, printsub('>', sb + 2, sizeof sb - 2);); - } - else if (his_state_is_will(TELOPT_OLD_ENVIRON)) { - static unsigned char sb[] = - { IAC, SB, TELOPT_OLD_ENVIRON, TELQUAL_SEND, IAC, SE }; - - telnet_net_write (sb, sizeof sb); - DIAG(TD_OPTIONS, printsub('>', sb + 2, sizeof sb - 2);); - } - if (his_state_is_will(TELOPT_TTYPE)) { - - telnet_net_write (ttytype_sbbuf, sizeof ttytype_sbbuf); - DIAG(TD_OPTIONS, printsub('>', ttytype_sbbuf + 2, - sizeof ttytype_sbbuf - 2);); - } - if (his_state_is_will(TELOPT_TSPEED)) { - while (sequenceIs(tspeedsubopt, baseline)) - ttloop(); - } - if (his_state_is_will(TELOPT_XDISPLOC)) { - while (sequenceIs(xdisplocsubopt, baseline)) - ttloop(); - } - if (his_state_is_will(TELOPT_NEW_ENVIRON)) { - while (sequenceIs(environsubopt, baseline)) - ttloop(); - } - if (his_state_is_will(TELOPT_OLD_ENVIRON)) { - while (sequenceIs(oenvironsubopt, baseline)) - ttloop(); - } - if (his_state_is_will(TELOPT_TTYPE)) { - char first[256], last[256]; - - while (sequenceIs(ttypesubopt, baseline)) - ttloop(); - - /* - * If the other side has already disabled the option, then - * we have to just go with what we (might) have already gotten. - */ - if (his_state_is_will(TELOPT_TTYPE) && !terminaltypeok(terminaltype)) { - strlcpy(first, terminaltype, sizeof(first)); - for(;;) { - /* - * Save the unknown name, and request the next name. - */ - strlcpy(last, terminaltype, sizeof(last)); - _gettermname(); - if (terminaltypeok(terminaltype)) - break; - if ((strncmp(last, terminaltype, sizeof(last)) == 0) || - his_state_is_wont(TELOPT_TTYPE)) { - /* - * We've hit the end. If this is the same as - * the first name, just go with it. - */ - if (strncmp(first, terminaltype, sizeof(first)) == 0) - break; - /* - * Get the terminal name one more time, so that - * RFC1091 compliant telnets will cycle back to - * the start of the list. - */ - _gettermname(); - if (strncmp(first, terminaltype, sizeof(first)) != 0) - strlcpy(terminaltype, first, sizeof(terminaltype)); - break; - } - } - } - } - return(retval); -} /* end of getterminaltype */ - -void -_gettermname(void) -{ - /* - * If the client turned off the option, - * we can't send another request, so we - * just return. - */ - if (his_state_is_wont(TELOPT_TTYPE)) - return; - settimer(baseline); - telnet_net_write (ttytype_sbbuf, sizeof ttytype_sbbuf); - DIAG(TD_OPTIONS, printsub('>', ttytype_sbbuf + 2, - sizeof ttytype_sbbuf - 2);); - while (sequenceIs(ttypesubopt, baseline)) - ttloop(); -} - -int -terminaltypeok(char *s) -{ - return 1; -} - - -char host_name[MaxHostNameLen]; -char remote_host_name[MaxHostNameLen]; -char remote_utmp_name[MaxHostNameLen]; - -/* - * Get a pty, scan input lines. - */ -static void -doit(struct sockaddr *who, int who_len) -{ - int level; - int ptynum; - char user_name[256]; - int error; - - /* - * Find an available pty to use. - */ - ourpty = getpty(&ptynum); - if (ourpty < 0) - fatal(net, "All network ports in use"); - -#ifdef _SC_CRAY_SECURE_SYS - /* - * set ttyp line security label - */ - if (secflag) { - char slave_dev[16]; - - snprintf(tty_dev, sizeof(tty_dev), "/dev/pty/%03d", ptynum); - if (setdevs(tty_dev, &dv) < 0) - fatal(net, "cannot set pty security"); - snprintf(slave_dev, sizeof(slave_dev), "/dev/ttyp%03d", ptynum); - if (setdevs(slave_dev, &dv) < 0) - fatal(net, "cannot set tty security"); - } -#endif /* _SC_CRAY_SECURE_SYS */ - - error = getnameinfo_verified (who, who_len, - remote_host_name, - sizeof(remote_host_name), - NULL, 0, - registerd_host_only ? NI_NAMEREQD : 0); - if (error) - fatal(net, "Couldn't resolve your address into a host name.\r\n\ -Please contact your net administrator"); - - gethostname(host_name, sizeof (host_name)); - - strlcpy (remote_utmp_name, remote_host_name, sizeof(remote_utmp_name)); - - /* Only trim if too long (and possible) */ - if (strlen(remote_utmp_name) > utmp_len) { - char *domain = strchr(host_name, '.'); - char *p = strchr(remote_utmp_name, '.'); - if (domain != NULL && p != NULL && (strcmp(p, domain) == 0)) - *p = '\0'; /* remove domain part */ - } - - /* - * If hostname still doesn't fit utmp, use ipaddr. - */ - if (strlen(remote_utmp_name) > utmp_len) { - error = getnameinfo (who, who_len, - remote_utmp_name, - sizeof(remote_utmp_name), - NULL, 0, - NI_NUMERICHOST); - if (error) - fatal(net, "Couldn't get numeric address\r\n"); - } - -#ifdef AUTHENTICATION - auth_encrypt_init(host_name, remote_host_name, "TELNETD", 1); -#endif - - init_env(); - - /* begin server processing */ - - /* - * Initialize the slc mapping table. - */ - - get_slc_defaults(); - - /* - * get terminal type. - */ - *user_name = 0; - level = getterminaltype(user_name, sizeof(user_name)); - esetenv("TERM", terminaltype[0] ? terminaltype : "network", 1); - -#ifdef _SC_CRAY_SECURE_SYS - if (secflag) { - if (setulvl(dv.dv_actlvl) < 0) - fatal(net,"cannot setulvl()"); - if (setucmp(dv.dv_actcmp) < 0) - fatal(net, "cannot setucmp()"); - } -#endif /* _SC_CRAY_SECURE_SYS */ - - my_telnet(net, ourpty, remote_host_name, remote_utmp_name, - level, user_name); - /*NOTREACHED*/ -} /* end of doit */ - -/* output contents of /etc/issue.net, or /etc/issue */ -static void -show_issue(void) -{ - FILE *f; - char buf[128]; - f = fopen(SYSCONFDIR "/issue.net", "r"); - if(f == NULL) - f = fopen(SYSCONFDIR "/issue", "r"); - if(f){ - while(fgets(buf, sizeof(buf), f) != NULL) { - size_t len = strcspn(buf, "\r\n"); - if(len == strlen(buf)) { - /* there's no newline */ - writenet(buf, len); - } else { - /* replace newline with \r\n */ - buf[len] = '\0'; - writenet(buf, len); - writenet("\r\n", 2); - } - } - fclose(f); - } -} - -/* - * Main loop. Select from pty and network, and - * hand data to telnet receiver finite state machine. - */ -void -my_telnet(int f, int p, const char *host, const char *utmp_host, - int level, char *autoname) -{ - int on = 1; - char *he; - char *IM; - int nfd; - int startslave_called = 0; - time_t timeout; - - /* - * Do some tests where it is desireable to wait for a response. - * Rather than doing them slowly, one at a time, do them all - * at once. - */ - if (my_state_is_wont(TELOPT_SGA)) - send_will(TELOPT_SGA, 1); - /* - * Is the client side a 4.2 (NOT 4.3) system? We need to know this - * because 4.2 clients are unable to deal with TCP urgent data. - * - * To find out, we send out a "DO ECHO". If the remote system - * answers "WILL ECHO" it is probably a 4.2 client, and we note - * that fact ("WILL ECHO" ==> that the client will echo what - * WE, the server, sends it; it does NOT mean that the client will - * echo the terminal input). - */ - send_do(TELOPT_ECHO, 1); - - /* - * Send along a couple of other options that we wish to negotiate. - */ - send_do(TELOPT_NAWS, 1); - send_will(TELOPT_STATUS, 1); - flowmode = 1; /* default flow control state */ - restartany = -1; /* uninitialized... */ - send_do(TELOPT_LFLOW, 1); - - /* - * Spin, waiting for a response from the DO ECHO. However, - * some REALLY DUMB telnets out there might not respond - * to the DO ECHO. So, we spin looking for NAWS, (most dumb - * telnets so far seem to respond with WONT for a DO that - * they don't understand...) because by the time we get the - * response, it will already have processed the DO ECHO. - * Kludge upon kludge. - */ - while (his_will_wont_is_changing(TELOPT_NAWS)) - ttloop(); - - /* - * But... - * The client might have sent a WILL NAWS as part of its - * startup code; if so, we'll be here before we get the - * response to the DO ECHO. We'll make the assumption - * that any implementation that understands about NAWS - * is a modern enough implementation that it will respond - * to our DO ECHO request; hence we'll do another spin - * waiting for the ECHO option to settle down, which is - * what we wanted to do in the first place... - */ - if (his_want_state_is_will(TELOPT_ECHO) && - his_state_is_will(TELOPT_NAWS)) { - while (his_will_wont_is_changing(TELOPT_ECHO)) - ttloop(); - } - /* - * On the off chance that the telnet client is broken and does not - * respond to the DO ECHO we sent, (after all, we did send the - * DO NAWS negotiation after the DO ECHO, and we won't get here - * until a response to the DO NAWS comes back) simulate the - * receipt of a will echo. This will also send a WONT ECHO - * to the client, since we assume that the client failed to - * respond because it believes that it is already in DO ECHO - * mode, which we do not want. - */ - if (his_want_state_is_will(TELOPT_ECHO)) { - DIAG(TD_OPTIONS, - {output_data("td: simulating recv\r\n"); - }); - willoption(TELOPT_ECHO); - } - - /* - * Finally, to clean things up, we turn on our echo. This - * will break stupid 4.2 telnets out of local terminal echo. - */ - - if (my_state_is_wont(TELOPT_ECHO)) - send_will(TELOPT_ECHO, 1); - -#ifdef TIOCPKT -#ifdef STREAMSPTY - if (!really_stream) -#endif - /* - * Turn on packet mode - */ - ioctl(p, TIOCPKT, (char *)&on); -#endif - - - /* - * Call telrcv() once to pick up anything received during - * terminal type negotiation, 4.2/4.3 determination, and - * linemode negotiation. - */ - telrcv(); - - ioctl(f, FIONBIO, (char *)&on); - ioctl(p, FIONBIO, (char *)&on); - -#if defined(SO_OOBINLINE) && defined(HAVE_SETSOCKOPT) - setsockopt(net, SOL_SOCKET, SO_OOBINLINE, - (void *)&on, sizeof on); -#endif /* defined(SO_OOBINLINE) */ - -#ifdef SIGTSTP - signal(SIGTSTP, SIG_IGN); -#endif -#ifdef SIGTTOU - /* - * Ignoring SIGTTOU keeps the kernel from blocking us - * in ttioct() in /sys/tty.c. - */ - signal(SIGTTOU, SIG_IGN); -#endif - - signal(SIGCHLD, cleanup); - -#ifdef TIOCNOTTY - { - int t; - t = open(_PATH_TTY, O_RDWR); - if (t >= 0) { - ioctl(t, TIOCNOTTY, (char *)0); - close(t); - } - } -#endif - - show_issue(); - /* - * Show banner that getty never gave. - * - * We put the banner in the pty input buffer. This way, it - * gets carriage return null processing, etc., just like all - * other pty --> client data. - */ - - if (getenv("USER")) - hostinfo = 0; - - IM = DEFAULT_IM; - he = 0; - edithost(he, host_name); - if (hostinfo && *IM) - putf(IM, ptyibuf2); - - if (pcc) - strncat(ptyibuf2, ptyip, pcc+1); - ptyip = ptyibuf2; - pcc = strlen(ptyip); - - DIAG(TD_REPORT, { - output_data("td: Entering processing loop\r\n"); - }); - - - nfd = ((f > p) ? f : p) + 1; - timeout = time(NULL) + 5; - for (;;) { - fd_set ibits, obits, xbits; - int c; - - /* wait for encryption to be turned on, but don't wait - indefinitely */ - if(!startslave_called && (!encrypt_delay() || timeout > time(NULL))){ - startslave_called = 1; - startslave(host, utmp_host, level, autoname); - } - - if (ncc < 0 && pcc < 0) - break; - - FD_ZERO(&ibits); - FD_ZERO(&obits); - FD_ZERO(&xbits); - - if (f >= FD_SETSIZE - || p >= FD_SETSIZE) - fatal(net, "fd too large"); - - /* - * Never look for input if there's still - * stuff in the corresponding output buffer - */ - if (nfrontp - nbackp || pcc > 0) { - FD_SET(f, &obits); - } else { - FD_SET(p, &ibits); - } - if (pfrontp - pbackp || ncc > 0) { - FD_SET(p, &obits); - } else { - FD_SET(f, &ibits); - } - if (!SYNCHing) { - FD_SET(f, &xbits); - } - if ((c = select(nfd, &ibits, &obits, &xbits, - (struct timeval *)0)) < 1) { - if (c == -1) { - if (errno == EINTR) { - continue; - } - } - sleep(5); - continue; - } - - /* - * Any urgent data? - */ - if (FD_ISSET(net, &xbits)) { - SYNCHing = 1; - } - - /* - * Something to read from the network... - */ - if (FD_ISSET(net, &ibits)) { -#ifndef SO_OOBINLINE - /* - * In 4.2 (and 4.3 beta) systems, the - * OOB indication and data handling in the kernel - * is such that if two separate TCP Urgent requests - * come in, one byte of TCP data will be overlaid. - * This is fatal for Telnet, but we try to live - * with it. - * - * In addition, in 4.2 (and...), a special protocol - * is needed to pick up the TCP Urgent data in - * the correct sequence. - * - * What we do is: if we think we are in urgent - * mode, we look to see if we are "at the mark". - * If we are, we do an OOB receive. If we run - * this twice, we will do the OOB receive twice, - * but the second will fail, since the second - * time we were "at the mark", but there wasn't - * any data there (the kernel doesn't reset - * "at the mark" until we do a normal read). - * Once we've read the OOB data, we go ahead - * and do normal reads. - * - * There is also another problem, which is that - * since the OOB byte we read doesn't put us - * out of OOB state, and since that byte is most - * likely the TELNET DM (data mark), we would - * stay in the TELNET SYNCH (SYNCHing) state. - * So, clocks to the rescue. If we've "just" - * received a DM, then we test for the - * presence of OOB data when the receive OOB - * fails (and AFTER we did the normal mode read - * to clear "at the mark"). - */ - if (SYNCHing) { - int atmark; - - ioctl(net, SIOCATMARK, (char *)&atmark); - if (atmark) { - ncc = recv(net, netibuf, sizeof (netibuf), MSG_OOB); - if ((ncc == -1) && (errno == EINVAL)) { - ncc = read(net, netibuf, sizeof (netibuf)); - if (sequenceIs(didnetreceive, gotDM)) { - SYNCHing = stilloob(net); - } - } - } else { - ncc = read(net, netibuf, sizeof (netibuf)); - } - } else { - ncc = read(net, netibuf, sizeof (netibuf)); - } - settimer(didnetreceive); -#else /* !defined(SO_OOBINLINE)) */ - ncc = read(net, netibuf, sizeof (netibuf)); -#endif /* !defined(SO_OOBINLINE)) */ - if (ncc < 0 && errno == EWOULDBLOCK) - ncc = 0; - else { - if (ncc <= 0) { - break; - } - netip = netibuf; - } - DIAG((TD_REPORT | TD_NETDATA), { - output_data("td: netread %d chars\r\n", ncc); - }); - DIAG(TD_NETDATA, printdata("nd", netip, ncc)); - } - - /* - * Something to read from the pty... - */ - if (FD_ISSET(p, &ibits)) { -#ifdef STREAMSPTY - if (really_stream) - pcc = readstream(p, ptyibuf, BUFSIZ); - else -#endif - pcc = read(p, ptyibuf, BUFSIZ); - - /* - * On some systems, if we try to read something - * off the master side before the slave side is - * opened, we get EIO. - */ - if (pcc < 0 && (errno == EWOULDBLOCK || -#ifdef EAGAIN - errno == EAGAIN || -#endif - errno == EIO)) { - pcc = 0; - } else { - if (pcc <= 0) - break; - if (ptyibuf[0] & TIOCPKT_FLUSHWRITE) { - netclear(); /* clear buffer back */ -#ifndef NO_URGENT - /* - * There are client telnets on some - * operating systems get screwed up - * royally if we send them urgent - * mode data. - */ - output_data ("%c%c", IAC, DM); - - neturg = nfrontp-1; /* off by one XXX */ - DIAG(TD_OPTIONS, - printoption("td: send IAC", DM)); - -#endif - } - if (his_state_is_will(TELOPT_LFLOW) && - (ptyibuf[0] & - (TIOCPKT_NOSTOP|TIOCPKT_DOSTOP))) { - int newflow = - ptyibuf[0] & TIOCPKT_DOSTOP ? 1 : 0; - if (newflow != flowmode) { - flowmode = newflow; - output_data("%c%c%c%c%c%c", - IAC, SB, TELOPT_LFLOW, - flowmode ? LFLOW_ON - : LFLOW_OFF, - IAC, SE); - DIAG(TD_OPTIONS, printsub('>', - (unsigned char *)nfrontp-4, - 4);); - } - } - pcc--; - ptyip = ptyibuf+1; - } - } - - while (pcc > 0) { - if ((&netobuf[BUFSIZ] - nfrontp) < 3) - break; - c = *ptyip++ & 0377, pcc--; - if (c == IAC) - *nfrontp++ = c; - *nfrontp++ = c; - if ((c == '\r') && (my_state_is_wont(TELOPT_BINARY))) { - if (pcc > 0 && ((*ptyip & 0377) == '\n')) { - *nfrontp++ = *ptyip++ & 0377; - pcc--; - } else - *nfrontp++ = '\0'; - } - } - - if (FD_ISSET(f, &obits) && (nfrontp - nbackp) > 0) - netflush(); - if (ncc > 0) - telrcv(); - if (FD_ISSET(p, &obits) && (pfrontp - pbackp) > 0) - ptyflush(); - } - cleanup(0); -} - -#ifndef TCSIG -# ifdef TIOCSIG -# define TCSIG TIOCSIG -# endif -#endif - -#ifdef STREAMSPTY - - int flowison = -1; /* current state of flow: -1 is unknown */ - -int -readstream(int p, char *ibuf, int bufsize) -{ - int flags = 0; - int ret = 0; - struct termios *tsp; -#if 0 - struct termio *tp; -#endif - struct iocblk *ip; - char vstop, vstart; - int ixon; - int newflow; - - strbufc.maxlen = BUFSIZ; - strbufc.buf = (char *)ctlbuf; - strbufd.maxlen = bufsize-1; - strbufd.len = 0; - strbufd.buf = ibuf+1; - ibuf[0] = 0; - - ret = getmsg(p, &strbufc, &strbufd, &flags); - if (ret < 0) /* error of some sort -- probably EAGAIN */ - return(-1); - - if (strbufc.len <= 0 || ctlbuf[0] == M_DATA) { - /* data message */ - if (strbufd.len > 0) { /* real data */ - return(strbufd.len + 1); /* count header char */ - } else { - /* nothing there */ - errno = EAGAIN; - return(-1); - } - } - - /* - * It's a control message. Return 1, to look at the flag we set - */ - - switch (ctlbuf[0]) { - case M_FLUSH: - if (ibuf[1] & FLUSHW) - ibuf[0] = TIOCPKT_FLUSHWRITE; - return(1); - - case M_IOCTL: - ip = (struct iocblk *) (ibuf+1); - - switch (ip->ioc_cmd) { -#ifdef TCSETS - case TCSETS: - case TCSETSW: - case TCSETSF: - tsp = (struct termios *) - (ibuf+1 + sizeof(struct iocblk)); - vstop = tsp->c_cc[VSTOP]; - vstart = tsp->c_cc[VSTART]; - ixon = tsp->c_iflag & IXON; - break; -#endif -#if 0 - case TCSETA: - case TCSETAW: - case TCSETAF: - tp = (struct termio *) (ibuf+1 + sizeof(struct iocblk)); - vstop = tp->c_cc[VSTOP]; - vstart = tp->c_cc[VSTART]; - ixon = tp->c_iflag & IXON; - break; -#endif - default: - errno = EAGAIN; - return(-1); - } - - newflow = (ixon && (vstart == 021) && (vstop == 023)) ? 1 : 0; - if (newflow != flowison) { /* it's a change */ - flowison = newflow; - ibuf[0] = newflow ? TIOCPKT_DOSTOP : TIOCPKT_NOSTOP; - return(1); - } - } - - /* nothing worth doing anything about */ - errno = EAGAIN; - return(-1); -} -#endif /* STREAMSPTY */ - -/* - * Send interrupt to process on other side of pty. - * If it is in raw mode, just write NULL; - * otherwise, write intr char. - */ -void -interrupt() -{ - ptyflush(); /* half-hearted */ - -#if defined(STREAMSPTY) && defined(TIOCSIGNAL) - /* Streams PTY style ioctl to post a signal */ - if (really_stream) - { - int sig = SIGINT; - ioctl(ourpty, TIOCSIGNAL, &sig); - ioctl(ourpty, I_FLUSH, FLUSHR); - } -#else -#ifdef TCSIG - ioctl(ourpty, TCSIG, (char *)SIGINT); -#else /* TCSIG */ - init_termbuf(); - *pfrontp++ = slctab[SLC_IP].sptr ? - (unsigned char)*slctab[SLC_IP].sptr : '\177'; -#endif /* TCSIG */ -#endif -} - -/* - * Send quit to process on other side of pty. - * If it is in raw mode, just write NULL; - * otherwise, write quit char. - */ -void -sendbrk() -{ - ptyflush(); /* half-hearted */ -#ifdef TCSIG - ioctl(ourpty, TCSIG, (char *)SIGQUIT); -#else /* TCSIG */ - init_termbuf(); - *pfrontp++ = slctab[SLC_ABORT].sptr ? - (unsigned char)*slctab[SLC_ABORT].sptr : '\034'; -#endif /* TCSIG */ -} - -void -sendsusp() -{ -#ifdef SIGTSTP - ptyflush(); /* half-hearted */ -# ifdef TCSIG - ioctl(ourpty, TCSIG, (char *)SIGTSTP); -# else /* TCSIG */ - *pfrontp++ = slctab[SLC_SUSP].sptr ? - (unsigned char)*slctab[SLC_SUSP].sptr : '\032'; -# endif /* TCSIG */ -#endif /* SIGTSTP */ -} - -/* - * When we get an AYT, if ^T is enabled, use that. Otherwise, - * just send back "[Yes]". - */ -void -recv_ayt() -{ -#if defined(SIGINFO) && defined(TCSIG) - if (slctab[SLC_AYT].sptr && *slctab[SLC_AYT].sptr != _POSIX_VDISABLE) { - ioctl(ourpty, TCSIG, (char *)SIGINFO); - return; - } -#endif - output_data("\r\n[Yes]\r\n"); -} - -void -doeof() -{ - init_termbuf(); - - *pfrontp++ = slctab[SLC_EOF].sptr ? - (unsigned char)*slctab[SLC_EOF].sptr : '\004'; -} diff --git a/kerberosV/src/appl/telnet/telnetd/telnetd.cat8 b/kerberosV/src/appl/telnet/telnetd/telnetd.cat8 deleted file mode 100644 index f497c6581cc..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/telnetd.cat8 +++ /dev/null @@ -1,298 +0,0 @@ - -TELNETD(8) BSD System Manager's Manual TELNETD(8) - -NNAAMMEE - tteellnneettdd -- DARPA TELNET protocol server - -SSYYNNOOPPSSIISS - tteellnneettdd [--BBeeUUhhkkllnn] [--DD _d_e_b_u_g_m_o_d_e] [--SS _t_o_s] [--XX _a_u_t_h_t_y_p_e] [--aa _a_u_t_h_m_o_d_e] - [--rr_l_o_w_p_t_y_-_h_i_g_h_p_t_y] [--uu _l_e_n] [--ddeebbuugg] [--LL _/_b_i_n_/_l_o_g_i_n] [--yy] [_p_o_r_t] - -DDEESSCCRRIIPPTTIIOONN - The tteellnneettdd command is a server which supports the DARPA standard TELNET - virtual terminal protocol. TTeellnneettdd is normally invoked by the internet - server (see inetd(8)) for requests to connect to the TELNET port as indi- - cated by the _/_e_t_c_/_s_e_r_v_i_c_e_s file (see services(5)). The --ddeebbuugg option may - be used to start up tteellnneettdd manually, instead of through inetd(8). If - started up this way, _p_o_r_t may be specified to run tteellnneettdd on an alternate - TCP port number. - - The tteellnneettdd command accepts the following options: - - --aa _a_u_t_h_m_o_d_e This option may be used for specifying what mode should be - used for authentication. Note that this option is only use- - ful if tteellnneettdd has been compiled with support for the - AUTHENTICATION option. There are several valid values for - _a_u_t_h_m_o_d_e: - - debug Turns on authentication debugging code. - - user Only allow connections when the remote user can pro- - vide valid authentication information to identify the - remote user, and is allowed access to the specified - account without providing a password. - - valid Only allow connections when the remote user can pro- - vide valid authentication information to identify the - remote user. The login(1) command will provide any - additional user verification needed if the remote - user is not allowed automatic access to the specified - account. - - other Only allow connections that supply some authentica- - tion information. This option is currently not sup- - ported by any of the existing authentication mecha- - nisms, and is thus the same as specifying --aa vvaalliidd. - - otp Only allow authenticated connections (as with --aa - uusseerr) and also logins with one-time passwords (OTPs). - This option will call login with an option so that - only OTPs are accepted. The user can of course still - type secret information at the prompt. - - none This is the default state. Authentication informa- - tion is not required. If no or insufficient authen- - tication information is provided, then the login(1) - program will provide the necessary user verification. - - off This disables the authentication code. All user ver- - ification will happen through the login(1) program. - - --BB Ignored. - - --DD _d_e_b_u_g_m_o_d_e - This option may be used for debugging purposes. This allows - tteellnneettdd to print out debugging information to the connec- - tion, allowing the user to see what tteellnneettdd is doing. There - are several possible values for _d_e_b_u_g_m_o_d_e: - - ooppttiioonnss Prints information about the negotiation of TELNET - options. - - rreeppoorrtt Prints the ooppttiioonnss information, plus some addi- - tional information about what processing is going - on. - - nneettddaattaa Displays the data stream received by tteellnneettdd. - - ppttyyddaattaa Displays data written to the pty. - - eexxeerrcciissee Has not been implemented yet. - - --ee require encryption to be turned on (in both direction) by - the client and disconnects if the client tries to turn the - encryption off (in either direction). - - --hh Disables the printing of host-specific information before - login has been completed. - - --kk - - --ll Ignored. - - --nn Disable TCP keep-alives. Normally tteellnneettdd enables the TCP - keep-alive mechanism to probe connections that have been - idle for some period of time to determine if the client is - still there, so that idle connections from machines that - have crashed or can no longer be reached may be cleaned up. - - --rr _l_o_w_p_t_y_-_h_i_g_h_p_t_y - This option is only enabled when tteellnneettdd is compiled for - UNICOS. It specifies an inclusive range of pseudo-terminal - devices to use. If the system has sysconf variable - _SC_CRAY_NPTY configured, the default pty search range is 0 - to _SC_CRAY_NPTY; otherwise, the default range is 0 to 128. - Either _l_o_w_p_t_y or _h_i_g_h_p_t_y may be omitted to allow changing - either end of the search range. If _l_o_w_p_t_y is omitted, the - - character is still required so that tteellnneettdd can differenti- - ate _h_i_g_h_p_t_y from _l_o_w_p_t_y. - - --SS _t_o_s - - --uu _l_e_n This option is used to specify the size of the field in the - utmp structure that holds the remote host name. If the - resolved host name is longer than _l_e_n, the dotted decimal - value will be used instead. This allows hosts with very - long host names that overflow this field to still be - uniquely identified. Specifying --uu00 indicates that only - dotted decimal addresses should be put into the _u_t_m_p file. - - --UU This option causes tteellnneettdd to refuse connections from - addresses that cannot be mapped back into a symbolic name - via the gethostbyaddr(3) routine. - - --XX _a_u_t_h_t_y_p_e This option is only valid if tteellnneettdd has been built with - support for the authentication option. It disables the use - of _a_u_t_h_t_y_p_e authentication, and can be used to temporarily - disable a specific authentication type without having to - recompile tteellnneettdd. - - --LL _p_a_t_h_n_a_m_e Specify pathname to an alternative login program. - - --yy Makes tteellnneettdd not warn when a user is trying to login with a - cleartext password. - - TTeellnneettdd operates by allocating a pseudo-terminal device (see pty(4)) for - a client, then creating a login process which has the slave side of the - pseudo-terminal as stdin, stdout and stderr. TTeellnneettdd manipulates the - master side of the pseudo-terminal, implementing the TELNET protocol and - passing characters between the remote client and the login process. - - When a TELNET session is started up, tteellnneettdd sends TELNET options to the - client side indicating a willingness to do the following TELNET options, - which are described in more detail below: - - DO AUTHENTICATION - WILL ENCRYPT - DO TERMINAL TYPE - DO TSPEED - DO XDISPLOC - DO NEW-ENVIRON - DO ENVIRON - WILL SUPPRESS GO AHEAD - DO ECHO - DO LINEMODE - DO NAWS - WILL STATUS - DO LFLOW - DO TIMING-MARK - - The pseudo-terminal allocated to the client is configured to operate in - ``cooked'' mode, and with XTABS and CRMOD enabled (see tty(4)). - - TTeellnneettdd has support for enabling locally the following TELNET options: - - WILL ECHO When the LINEMODE option is enabled, a WILL ECHO or - WONT ECHO will be sent to the client to indicate the - current state of terminal echoing. When terminal echo - is not desired, a WILL ECHO is sent to indicate that - telnetd will take care of echoing any data that needs - to be echoed to the terminal, and then nothing is - echoed. When terminal echo is desired, a WONT ECHO is - sent to indicate that telnetd will not be doing any - terminal echoing, so the client should do any terminal - echoing that is needed. - - WILL BINARY Indicates that the client is willing to send a 8 bits - of data, rather than the normal 7 bits of the Network - Virtual Terminal. - - WILL SGA Indicates that it will not be sending IAC GA, go - ahead, commands. - - WILL STATUS Indicates a willingness to send the client, upon - request, of the current status of all TELNET options. - - WILL TIMING-MARK Whenever a DO TIMING-MARK command is received, it is - always responded to with a WILL TIMING-MARK - - WILL LOGOUT When a DO LOGOUT is received, a WILL LOGOUT is sent in - response, and the TELNET session is shut down. - - WILL ENCRYPT Only sent if tteellnneettdd is compiled with support for data - encryption, and indicates a willingness to decrypt the - data stream. - - TTeellnneettdd has support for enabling remotely the following TELNET options: - - DO BINARY Sent to indicate that telnetd is willing to receive an - 8 bit data stream. - - DO LFLOW Requests that the client handle flow control charac- - ters remotely. - - DO ECHO This is not really supported, but is sent to identify - a 4.2BSD telnet(1) client, which will improperly - respond with WILL ECHO. If a WILL ECHO is received, a - DONT ECHO will be sent in response. - - DO TERMINAL-TYPE Indicates a desire to be able to request the name of - the type of terminal that is attached to the client - side of the connection. - - DO SGA Indicates that it does not need to receive IAC GA, the - go ahead command. - - DO NAWS Requests that the client inform the server when the - window (display) size changes. - - DO TERMINAL-SPEED Indicates a desire to be able to request information - about the speed of the serial line to which the client - is attached. - - DO XDISPLOC Indicates a desire to be able to request the name of - the X windows display that is associated with the tel- - net client. - - DO NEW-ENVIRON Indicates a desire to be able to request environment - variable information, as described in RFC 1572. - - DO ENVIRON Indicates a desire to be able to request environment - variable information, as described in RFC 1408. - - DO LINEMODE Only sent if tteellnneettdd is compiled with support for - linemode, and requests that the client do line by line - processing. - - DO TIMING-MARK Only sent if tteellnneettdd is compiled with support for both - linemode and kludge linemode, and the client responded - with WONT LINEMODE. If the client responds with WILL - TM, the it is assumed that the client supports kludge - linemode. Note that the [--kk] option can be used to - disable this. - - DO AUTHENTICATION Only sent if tteellnneettdd is compiled with support for - authentication, and indicates a willingness to receive - authentication information for automatic login. - - DO ENCRYPT Only sent if tteellnneettdd is compiled with support for data - encryption, and indicates a willingness to decrypt the - data stream. - -FFIILLEESS - /etc/services - /etc/inittab (UNICOS systems only) - /etc/iptos (if supported) - -SSEEEE AALLSSOO - telnet(1), login(1) - -SSTTAANNDDAARRDDSS - RRFFCC--885544 TELNET PROTOCOL SPECIFICATION - RRFFCC--885555 TELNET OPTION SPECIFICATIONS - RRFFCC--885566 TELNET BINARY TRANSMISSION - RRFFCC--885577 TELNET ECHO OPTION - RRFFCC--885588 TELNET SUPPRESS GO AHEAD OPTION - RRFFCC--885599 TELNET STATUS OPTION - RRFFCC--886600 TELNET TIMING MARK OPTION - RRFFCC--886611 TELNET EXTENDED OPTIONS - LIST OPTION - RRFFCC--888855 TELNET END OF RECORD OPTION - RRFFCC--11007733 Telnet Window Size Option - RRFFCC--11007799 Telnet Terminal Speed Option - RRFFCC--11009911 Telnet Terminal-Type Option - RRFFCC--11009966 Telnet X Display Location Option - RRFFCC--11112233 Requirements for Internet Hosts -- Application and Support - RRFFCC--11118844 Telnet Linemode Option - RRFFCC--11337722 Telnet Remote Flow Control Option - RRFFCC--11441166 Telnet Authentication Option - RRFFCC--11441111 Telnet Authentication: Kerberos Version 4 - RRFFCC--11441122 Telnet Authentication: SPX - RRFFCC--11557711 Telnet Environment Option Interoperability Issues - RRFFCC--11557722 Telnet Environment Option - -BBUUGGSS - Some TELNET commands are only partially implemented. - - Because of bugs in the original 4.2 BSD telnet(1), tteellnneettdd performs some - dubious protocol exchanges to try to discover if the remote client is, in - fact, a 4.2 BSD telnet(1). - - Binary mode has no common interpretation except between similar operating - systems (Unix in this case). - - The terminal type name received from the remote client is converted to - lower case. - - TTeellnneettdd never sends TELNET IAC GA (go ahead) commands. - -4.2 Berkeley Distribution September 19, 2006 4.2 Berkeley Distribution diff --git a/kerberosV/src/appl/telnet/telnetd/telnetd.h b/kerberosV/src/appl/telnet/telnetd/telnetd.h deleted file mode 100644 index 828bfb36011..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/telnetd.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 1989, 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. - * - * @(#)telnetd.h 8.1 (Berkeley) 6/4/93 - */ - - -#include - -#include -#include -#include -#include - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif - -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif /* HAVE_SYS_RESOURCE_H */ - -#ifdef HAVE_SYS_WAIT_H -#include -#endif - -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_SYS_FILE_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif - -/* including both and in SunOS 4 generates a - lot of warnings */ - -#if defined(HAVE_SYS_IOCTL_H) && SunOS != 40 -#include -#endif -#ifdef HAVE_SYS_FILIO_H -#include -#endif - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif - -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#include -#include -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_SYSLOG_H -#include -#endif -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include - -#ifdef HAVE_PTY_H -#include -#endif - -#ifdef STREAMSPTY -#ifdef HAVE_SAC_H -#include -#endif -#ifdef HAVE_SYS_STROPTS_H -#include -#endif - -# include - -#ifdef HAVE_SYS_UIO_H -#include -#ifdef __hpux -#undef SE -#endif -#endif -#ifdef HAVE_SYS_STREAM_H -#include -#endif - -#endif /* STREAMSPTY */ - -#undef NOERROR - -#include "defs.h" - -#ifndef _POSIX_VDISABLE -# ifdef VDISABLE -# define _POSIX_VDISABLE VDISABLE -# else -# define _POSIX_VDISABLE ((unsigned char)'\377') -# endif -#endif - - -#ifdef HAVE_SYS_PTY_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#ifdef HAVE_SYS_PTYIO_H -#include -#endif - -#ifdef HAVE_SYS_UTSNAME_H -#include -#endif - -#ifdef HAVE_PATHS_H -#include -#endif - -#ifdef HAVE_ARPA_TELNET_H -#include -#endif - -#include "ext.h" - -#ifdef SOCKS -#include -/* This doesn't belong here. */ -struct tm *localtime(const time_t *); -struct hostent *gethostbyname(const char *); -#endif - -#ifdef AUTHENTICATION -#include -#include -#ifdef ENCRYPTION -#include -#endif -#endif - -#ifdef HAVE_LIBUTIL_H -#include -#endif - -#include - -/* Don't use the system login, use our version instead */ - -/* BINDIR should be defined somewhere else... */ - -#ifndef BINDIR -#define BINDIR "/usr/athena/bin" -#endif - -#undef _PATH_LOGIN -#define _PATH_LOGIN BINDIR "/login" - -/* fallbacks */ - -#ifndef _PATH_DEV -#define _PATH_DEV "/dev/" -#endif - -#ifndef _PATH_TTY -#define _PATH_TTY "/dev/tty" -#endif /* _PATH_TTY */ - -#ifdef DIAGNOSTICS -#define DIAG(a,b) if (diagnostic & (a)) b -#else -#define DIAG(a,b) -#endif - -/* other external variables */ -extern char **environ; - -/* prototypes */ - -/* appends data to nfrontp and advances */ -int output_data (const char *format, ...) -#ifdef __GNUC__ -__attribute__ ((format (printf, 1, 2))) -#endif -; - -#ifdef ENCRYPTION -extern int require_encryption; -#endif diff --git a/kerberosV/src/appl/telnet/telnetd/termstat.c b/kerberosV/src/appl/telnet/telnetd/termstat.c deleted file mode 100644 index d1a51fd824c..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/termstat.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 1989, 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. - */ - -#include "telnetd.h" - -RCSID("$Id: termstat.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -/* - * local variables - */ -int def_tspeed = -1, def_rspeed = -1; -#ifdef TIOCSWINSZ -int def_row = 0, def_col = 0; -#endif - -/* - * flowstat - * - * Check for changes to flow control - */ -void -flowstat(void) -{ - if (his_state_is_will(TELOPT_LFLOW)) { - if (tty_flowmode() != flowmode) { - flowmode = tty_flowmode(); - output_data("%c%c%c%c%c%c", - IAC, SB, TELOPT_LFLOW, - flowmode ? LFLOW_ON : LFLOW_OFF, - IAC, SE); - } - if (tty_restartany() != restartany) { - restartany = tty_restartany(); - output_data("%c%c%c%c%c%c", - IAC, SB, TELOPT_LFLOW, - restartany ? LFLOW_RESTART_ANY - : LFLOW_RESTART_XON, - IAC, SE); - } - } -} - -/* - * clientstat - * - * Process linemode related requests from the client. - * Client can request a change to only one of linemode, editmode or slc's - * at a time, and if using kludge linemode, then only linemode may be - * affected. - */ -void -clientstat(int code, int parm1, int parm2) -{ - /* - * Get a copy of terminal characteristics. - */ - init_termbuf(); - - /* - * Process request from client. code tells what it is. - */ - switch (code) { - case TELOPT_NAWS: -#ifdef TIOCSWINSZ - { - struct winsize ws; - - def_col = parm1; - def_row = parm2; - - /* - * Change window size as requested by client. - */ - - ws.ws_col = parm1; - ws.ws_row = parm2; - ioctl(ourpty, TIOCSWINSZ, (char *)&ws); - } -#endif /* TIOCSWINSZ */ - - break; - - case TELOPT_TSPEED: - { - def_tspeed = parm1; - def_rspeed = parm2; - /* - * Change terminal speed as requested by client. - * We set the receive speed first, so that if we can't - * store seperate receive and transmit speeds, the transmit - * speed will take precedence. - */ - tty_rspeed(parm2); - tty_tspeed(parm1); - set_termbuf(); - - break; - - } /* end of case TELOPT_TSPEED */ - - default: - /* What? */ - break; - } /* end of switch */ - - netflush(); - -} diff --git a/kerberosV/src/appl/telnet/telnetd/utility.c b/kerberosV/src/appl/telnet/telnetd/utility.c deleted file mode 100644 index fc2b573ab93..00000000000 --- a/kerberosV/src/appl/telnet/telnetd/utility.c +++ /dev/null @@ -1,1170 +0,0 @@ -/* - * Copyright (c) 1989, 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. - */ - -#define PRINTOPTIONS -#include "telnetd.h" - -RCSID("$Id: utility.c,v 1.3 2013/06/17 19:11:38 robert Exp $"); - -/* - * utility functions performing io related tasks - */ - -/* - * ttloop - * - * A small subroutine to flush the network output buffer, get some - * data from the network, and pass it through the telnet state - * machine. We also flush the pty input buffer (by dropping its data) - * if it becomes too full. - * - * return 0 if OK or 1 if interrupted by a signal. - */ - -int -ttloop(void) -{ - DIAG(TD_REPORT, { - output_data("td: ttloop\r\n"); - }); - if (nfrontp-nbackp) - netflush(); - ncc = read(net, netibuf, sizeof netibuf); - if (ncc < 0) { - if (errno == EINTR) - return 1; - syslog(LOG_INFO, "ttloop: read: %m\n"); - exit(1); - } else if (ncc == 0) { - syslog(LOG_INFO, "ttloop: peer died\n"); - exit(1); - } - DIAG(TD_REPORT, { - output_data("td: ttloop read %d chars\r\n", ncc); - }); - netip = netibuf; - telrcv(); /* state machine */ - if (ncc > 0) { - pfrontp = pbackp = ptyobuf; - telrcv(); - } - return 0; -} /* end of ttloop */ - -/* - * Check a descriptor to see if out of band data exists on it. - */ -int -stilloob(int s) -{ - static struct timeval timeout = { 0 }; - fd_set excepts; - int value; - - if (s >= FD_SETSIZE) - fatal(ourpty, "fd too large"); - - do { - FD_ZERO(&excepts); - FD_SET(s, &excepts); - value = select(s+1, 0, 0, &excepts, &timeout); - } while ((value == -1) && (errno == EINTR)); - - if (value < 0) { - fatalperror(ourpty, "select"); - } - if (FD_ISSET(s, &excepts)) { - return 1; - } else { - return 0; - } -} - -void -ptyflush(void) -{ - int n; - - if ((n = pfrontp - pbackp) > 0) { - DIAG((TD_REPORT | TD_PTYDATA), { - output_data("td: ptyflush %d chars\r\n", n); - }); - DIAG(TD_PTYDATA, printdata("pd", pbackp, n)); - n = write(ourpty, pbackp, n); - } - if (n < 0) { - if (errno == EWOULDBLOCK || errno == EINTR) - return; - cleanup(0); - } - pbackp += n; - if (pbackp == pfrontp) - pbackp = pfrontp = ptyobuf; -} - -/* - * nextitem() - * - * Return the address of the next "item" in the TELNET data - * stream. This will be the address of the next character if - * the current address is a user data character, or it will - * be the address of the character following the TELNET command - * if the current address is a TELNET IAC ("I Am a Command") - * character. - */ -char * -nextitem(char *current) -{ - if ((*current&0xff) != IAC) { - return current+1; - } - switch (*(current+1)&0xff) { - case DO: - case DONT: - case WILL: - case WONT: - return current+3; - case SB:{ - /* loop forever looking for the SE */ - char *look = current+2; - - for (;;) { - if ((*look++&0xff) == IAC) { - if ((*look++&0xff) == SE) { - return look; - } - } - } - } - default: - return current+2; - } -} - - -/* - * netclear() - * - * We are about to do a TELNET SYNCH operation. Clear - * the path to the network. - * - * Things are a bit tricky since we may have sent the first - * byte or so of a previous TELNET command into the network. - * So, we have to scan the network buffer from the beginning - * until we are up to where we want to be. - * - * A side effect of what we do, just to keep things - * simple, is to clear the urgent data pointer. The principal - * caller should be setting the urgent data pointer AFTER calling - * us in any case. - */ -void -netclear(void) -{ - char *thisitem, *next; - char *good; -#define wewant(p) ((nfrontp > p) && ((*p&0xff) == IAC) && \ - ((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL)) - -#ifdef ENCRYPTION - thisitem = nclearto > netobuf ? nclearto : netobuf; -#else - thisitem = netobuf; -#endif - - while ((next = nextitem(thisitem)) <= nbackp) { - thisitem = next; - } - - /* Now, thisitem is first before/at boundary. */ - -#ifdef ENCRYPTION - good = nclearto > netobuf ? nclearto : netobuf; -#else - good = netobuf; /* where the good bytes go */ -#endif - - while (nfrontp > thisitem) { - if (wewant(thisitem)) { - int length; - - next = thisitem; - do { - next = nextitem(next); - } while (wewant(next) && (nfrontp > next)); - length = next-thisitem; - memmove(good, thisitem, length); - good += length; - thisitem = next; - } else { - thisitem = nextitem(thisitem); - } - } - - nbackp = netobuf; - nfrontp = good; /* next byte to be sent */ - neturg = 0; -} /* end of netclear */ - -extern int not42; - -/* - * netflush - * Send as much data as possible to the network, - * handling requests for urgent data. - */ -void -netflush(void) -{ - int n; - - if ((n = nfrontp - nbackp) > 0) { - DIAG(TD_REPORT, - { n += output_data("td: netflush %d chars\r\n", n); - }); -#ifdef ENCRYPTION - if (encrypt_output) { - char *s = nclearto ? nclearto : nbackp; - if (nfrontp - s > 0) { - (*encrypt_output)((unsigned char *)s, nfrontp-s); - nclearto = nfrontp; - } - } -#endif - /* - * if no urgent data, or if the other side appears to be an - * old 4.2 client (and thus unable to survive TCP urgent data), - * write the entire buffer in non-OOB mode. - */ -#if 1 /* remove this to make it work between solaris 2.6 and linux */ - if ((neturg == 0) || (not42 == 0)) { -#endif - n = write(net, nbackp, n); /* normal write */ -#if 1 /* remove this to make it work between solaris 2.6 and linux */ - } else { - n = neturg - nbackp; - /* - * In 4.2 (and 4.3) systems, there is some question about - * what byte in a sendOOB operation is the "OOB" data. - * To make ourselves compatible, we only send ONE byte - * out of band, the one WE THINK should be OOB (though - * we really have more the TCP philosophy of urgent data - * rather than the Unix philosophy of OOB data). - */ - if (n > 1) { - n = send(net, nbackp, n-1, 0); /* send URGENT all by itself */ - } else { - n = send(net, nbackp, n, MSG_OOB); /* URGENT data */ - } - } -#endif - } - if (n < 0) { - if (errno == EWOULDBLOCK || errno == EINTR) - return; - cleanup(0); - } - nbackp += n; -#ifdef ENCRYPTION - if (nbackp > nclearto) - nclearto = 0; -#endif - if (nbackp >= neturg) { - neturg = 0; - } - if (nbackp == nfrontp) { - nbackp = nfrontp = netobuf; -#ifdef ENCRYPTION - nclearto = 0; -#endif - } - return; -} - - -/* - * writenet - * - * Just a handy little function to write a bit of raw data to the net. - * It will force a transmit of the buffer if necessary - * - * arguments - * ptr - A pointer to a character string to write - * len - How many bytes to write - */ -void -writenet(const void *ptr, size_t len) -{ - /* flush buffer if no room for new data) */ - while ((&netobuf[BUFSIZ] - nfrontp) < len) { - /* if this fails, don't worry, buffer is a little big */ - netflush(); - } - if ((&netobuf[BUFSIZ] - nfrontp) < len) - abort(); - - memmove(nfrontp, ptr, len); - nfrontp += len; -} - - -/* - * miscellaneous functions doing a variety of little jobs follow ... - */ - - -void fatal(int f, char *msg) -{ - char buf[BUFSIZ]; - - snprintf(buf, sizeof(buf), "telnetd: %s.\r\n", msg); -#ifdef ENCRYPTION - if (encrypt_output) { - /* - * Better turn off encryption first.... - * Hope it flushes... - */ - encrypt_send_end(); - netflush(); - } -#endif - write(f, buf, (int)strlen(buf)); - sleep(1); /*XXX*/ - exit(1); -} - -void -fatalperror_errno(int f, const char *msg, int error) -{ - char buf[BUFSIZ]; - - snprintf(buf, sizeof(buf), "%s: %s", msg, strerror(error)); - fatal(f, buf); -} - -void -fatalperror(int f, const char *msg) -{ - fatalperror_errno(f, msg, errno); -} - -char editedhost[32]; - -void edithost(char *pat, char *host) -{ - char *res = editedhost; - - if (!pat) - pat = ""; - while (*pat) { - switch (*pat) { - - case '#': - if (*host) - host++; - break; - - case '@': - if (*host) - *res++ = *host++; - break; - - default: - *res++ = *pat; - break; - } - if (res == &editedhost[sizeof editedhost - 1]) { - *res = '\0'; - return; - } - pat++; - } - if (*host) - strlcpy (res, host, - sizeof editedhost - (res - editedhost)); - else - *res = '\0'; - editedhost[sizeof editedhost - 1] = '\0'; -} - -static char *putlocation; - -void -putstr(char *s) -{ - - while (*s) - putchr(*s++); -} - -void -putchr(int cc) -{ - *putlocation++ = cc; -} - -static char fmtstr[] = { "%l:%M%P on %A, %d %B %Y" }; - -void putf(char *cp, char *where) -{ -#ifdef HAVE_UNAME - struct utsname name; -#endif - char *slash; - time_t t; - char db[100]; - - /* if we don't have uname, set these to sensible values */ - char *sysname = "Unix", - *machine = "", - *release = "", - *version = ""; - -#ifdef HAVE_UNAME - uname(&name); - sysname=name.sysname; - machine=name.machine; - release=name.release; - version=name.version; -#endif - - putlocation = where; - - while (*cp) { - if (*cp != '%') { - putchr(*cp++); - continue; - } - switch (*++cp) { - - case 't': - slash = strchr(line+1, '/'); - if (slash == (char *) 0) - putstr(line); - else - putstr(&slash[1]); - break; - - case 'h': - putstr(editedhost); - break; - - case 's': - putstr(sysname); - break; - - case 'm': - putstr(machine); - break; - - case 'r': - putstr(release); - break; - - case 'v': - putstr(version); - break; - - case 'd': - time(&t); - strftime(db, sizeof(db), fmtstr, localtime(&t)); - putstr(db); - break; - - case '%': - putchr('%'); - break; - } - cp++; - } -} - -#ifdef DIAGNOSTICS -/* - * Print telnet options and commands in plain text, if possible. - */ -void -printoption(char *fmt, int option) -{ - if (TELOPT_OK(option)) - output_data("%s %s\r\n", - fmt, - TELOPT(option)); - else if (TELCMD_OK(option)) - output_data("%s %s\r\n", - fmt, - TELCMD(option)); - else - output_data("%s %d\r\n", - fmt, - option); - return; -} - -void -printsub(int direction, unsigned char *pointer, size_t length) - /* '<' or '>' */ - /* where suboption data sits */ - /* length of suboption data */ -{ - int i = 0; - unsigned char buf[512]; - - if (!(diagnostic & TD_OPTIONS)) - return; - - if (direction) { - output_data("td: %s suboption ", - direction == '<' ? "recv" : "send"); - if (length >= 3) { - int j; - - i = pointer[length-2]; - j = pointer[length-1]; - - if (i != IAC || j != SE) { - output_data("(terminated by "); - if (TELOPT_OK(i)) - output_data("%s ", - TELOPT(i)); - else if (TELCMD_OK(i)) - output_data("%s ", - TELCMD(i)); - else - output_data("%d ", - i); - if (TELOPT_OK(j)) - output_data("%s", - TELOPT(j)); - else if (TELCMD_OK(j)) - output_data("%s", - TELCMD(j)); - else - output_data("%d", - j); - output_data(", not IAC SE!) "); - } - } - length -= 2; - } - if (length < 1) { - output_data("(Empty suboption??\?)"); - return; - } - switch (pointer[0]) { - case TELOPT_TTYPE: - output_data("TERMINAL-TYPE "); - switch (pointer[1]) { - case TELQUAL_IS: - output_data("IS \"%.*s\"", - (int)(length-2), - (char *)pointer+2); - break; - case TELQUAL_SEND: - output_data("SEND"); - break; - default: - output_data("- unknown qualifier %d (0x%x).", - pointer[1], pointer[1]); - } - break; - case TELOPT_TSPEED: - output_data("TERMINAL-SPEED"); - if (length < 2) { - output_data(" (empty suboption??\?)"); - break; - } - switch (pointer[1]) { - case TELQUAL_IS: - output_data(" IS %.*s", (int)(length-2), (char *)pointer+2); - break; - default: - if (pointer[1] == 1) - output_data(" SEND"); - else - output_data(" %d (unknown)", pointer[1]); - for (i = 2; i < length; i++) { - output_data(" ?%d?", pointer[i]); - } - break; - } - break; - - case TELOPT_LFLOW: - output_data("TOGGLE-FLOW-CONTROL"); - if (length < 2) { - output_data(" (empty suboption??\?)"); - break; - } - switch (pointer[1]) { - case LFLOW_OFF: - output_data(" OFF"); - break; - case LFLOW_ON: - output_data(" ON"); - break; - case LFLOW_RESTART_ANY: - output_data(" RESTART-ANY"); - break; - case LFLOW_RESTART_XON: - output_data(" RESTART-XON"); - break; - default: - output_data(" %d (unknown)", - pointer[1]); - } - for (i = 2; i < length; i++) { - output_data(" ?%d?", - pointer[i]); - } - break; - - case TELOPT_NAWS: - output_data("NAWS"); - if (length < 2) { - output_data(" (empty suboption??\?)"); - break; - } - if (length == 2) { - output_data(" ?%d?", - pointer[1]); - break; - } - output_data(" %u %u(%u)", - pointer[1], - pointer[2], - (((unsigned int)pointer[1])<<8) + pointer[2]); - if (length == 4) { - output_data(" ?%d?", - pointer[3]); - break; - } - output_data(" %u %u(%u)", - pointer[3], - pointer[4], - (((unsigned int)pointer[3])<<8) + pointer[4]); - for (i = 5; i < length; i++) { - output_data(" ?%d?", - pointer[i]); - } - break; - - case TELOPT_LINEMODE: - output_data("LINEMODE "); - if (length < 2) { - output_data(" (empty suboption??\?)"); - break; - } - switch (pointer[1]) { - case WILL: - output_data("WILL "); - goto common; - case WONT: - output_data("WONT "); - goto common; - case DO: - output_data("DO "); - goto common; - case DONT: - output_data("DONT "); - common: - if (length < 3) { - output_data("(no option??\?)"); - break; - } - switch (pointer[2]) { - case LM_FORWARDMASK: - output_data("Forward Mask"); - for (i = 3; i < length; i++) { - output_data(" %x", pointer[i]); - } - break; - default: - output_data("%d (unknown)", - pointer[2]); - for (i = 3; i < length; i++) { - output_data(" %d", - pointer[i]); - } - break; - } - break; - - case LM_SLC: - output_data("SLC"); - for (i = 2; i < length - 2; i += 3) { - if (SLC_NAME_OK(pointer[i+SLC_FUNC])) - output_data(" %s", - SLC_NAME(pointer[i+SLC_FUNC])); - else - output_data(" %d", - pointer[i+SLC_FUNC]); - switch (pointer[i+SLC_FLAGS]&SLC_LEVELBITS) { - case SLC_NOSUPPORT: - output_data(" NOSUPPORT"); - break; - case SLC_CANTCHANGE: - output_data(" CANTCHANGE"); - break; - case SLC_VARIABLE: - output_data(" VARIABLE"); - break; - case SLC_DEFAULT: - output_data(" DEFAULT"); - break; - } - output_data("%s%s%s", - pointer[i+SLC_FLAGS]&SLC_ACK ? "|ACK" : "", - pointer[i+SLC_FLAGS]&SLC_FLUSHIN ? "|FLUSHIN" : "", - pointer[i+SLC_FLAGS]&SLC_FLUSHOUT ? "|FLUSHOUT" : ""); - if (pointer[i+SLC_FLAGS]& ~(SLC_ACK|SLC_FLUSHIN| - SLC_FLUSHOUT| SLC_LEVELBITS)) { - output_data("(0x%x)", - pointer[i+SLC_FLAGS]); - } - output_data(" %d;", - pointer[i+SLC_VALUE]); - if ((pointer[i+SLC_VALUE] == IAC) && - (pointer[i+SLC_VALUE+1] == IAC)) - i++; - } - for (; i < length; i++) { - output_data(" ?%d?", - pointer[i]); - } - break; - - case LM_MODE: - output_data("MODE "); - if (length < 3) { - output_data("(no mode??\?)"); - break; - } - { - char tbuf[32]; - snprintf(tbuf, - sizeof(tbuf), - "%s%s%s%s%s", - pointer[2]&MODE_EDIT ? "|EDIT" : "", - pointer[2]&MODE_TRAPSIG ? "|TRAPSIG" : "", - pointer[2]&MODE_SOFT_TAB ? "|SOFT_TAB" : "", - pointer[2]&MODE_LIT_ECHO ? "|LIT_ECHO" : "", - pointer[2]&MODE_ACK ? "|ACK" : ""); - output_data("%s", - tbuf[1] ? &tbuf[1] : "0"); - } - if (pointer[2]&~(MODE_EDIT|MODE_TRAPSIG|MODE_ACK)) { - output_data(" (0x%x)", - pointer[2]); - } - for (i = 3; i < length; i++) { - output_data(" ?0x%x?", - pointer[i]); - } - break; - default: - output_data("%d (unknown)", - pointer[1]); - for (i = 2; i < length; i++) { - output_data(" %d", pointer[i]); - } - } - break; - - case TELOPT_STATUS: { - char *cp; - int j, k; - - output_data("STATUS"); - - switch (pointer[1]) { - default: - if (pointer[1] == TELQUAL_SEND) - output_data(" SEND"); - else - output_data(" %d (unknown)", - pointer[1]); - for (i = 2; i < length; i++) { - output_data(" ?%d?", - pointer[i]); - } - break; - case TELQUAL_IS: - output_data(" IS\r\n"); - - for (i = 2; i < length; i++) { - switch(pointer[i]) { - case DO: cp = "DO"; goto common2; - case DONT: cp = "DONT"; goto common2; - case WILL: cp = "WILL"; goto common2; - case WONT: cp = "WONT"; goto common2; - common2: - i++; - if (TELOPT_OK(pointer[i])) - output_data(" %s %s", - cp, - TELOPT(pointer[i])); - else - output_data(" %s %d", - cp, - pointer[i]); - - output_data("\r\n"); - break; - - case SB: - output_data(" SB "); - i++; - j = k = i; - while (j < length) { - if (pointer[j] == SE) { - if (j+1 == length) - break; - if (pointer[j+1] == SE) - j++; - else - break; - } - pointer[k++] = pointer[j++]; - } - printsub(0, &pointer[i], k - i); - if (i < length) { - output_data(" SE"); - i = j; - } else - i = j - 1; - - output_data("\r\n"); - - break; - - default: - output_data(" %d", - pointer[i]); - break; - } - } - break; - } - break; - } - - case TELOPT_XDISPLOC: - output_data("X-DISPLAY-LOCATION "); - switch (pointer[1]) { - case TELQUAL_IS: - output_data("IS \"%.*s\"", - (int)(length-2), - (char *)pointer+2); - break; - case TELQUAL_SEND: - output_data("SEND"); - break; - default: - output_data("- unknown qualifier %d (0x%x).", - pointer[1], pointer[1]); - } - break; - - case TELOPT_NEW_ENVIRON: - output_data("NEW-ENVIRON "); - goto env_common1; - case TELOPT_OLD_ENVIRON: - output_data("OLD-ENVIRON"); - env_common1: - switch (pointer[1]) { - case TELQUAL_IS: - output_data("IS "); - goto env_common; - case TELQUAL_SEND: - output_data("SEND "); - goto env_common; - case TELQUAL_INFO: - output_data("INFO "); - env_common: - { - int quote = 0; - for (i = 2; i < length; i++ ) { - switch (pointer[i]) { - case NEW_ENV_VAR: - if (quote) - output_data("\" "); - output_data("VAR "); - quote = 0; - break; - - case NEW_ENV_VALUE: - if (quote) - output_data("\" "); - output_data("VALUE "); - quote = 0; - break; - - case ENV_ESC: - if (quote) - output_data("\" "); - output_data("ESC "); - quote = 0; - break; - - case ENV_USERVAR: - if (quote) - output_data("\" "); - output_data("USERVAR "); - quote = 0; - break; - - default: - if (isprint(pointer[i]) && pointer[i] != '"') { - if (!quote) { - output_data("\""); - quote = 1; - } - output_data("%c", pointer[i]); - } else { - output_data("%03o ", pointer[i]); - quote = 0; - } - break; - } - } - if (quote) - output_data("\""); - break; - } - } - break; - -#ifdef AUTHENTICATION - case TELOPT_AUTHENTICATION: - output_data("AUTHENTICATION"); - - if (length < 2) { - output_data(" (empty suboption??\?)"); - break; - } - switch (pointer[1]) { - case TELQUAL_REPLY: - case TELQUAL_IS: - output_data(" %s ", - (pointer[1] == TELQUAL_IS) ? - "IS" : "REPLY"); - if (AUTHTYPE_NAME_OK(pointer[2])) - output_data("%s ", - AUTHTYPE_NAME(pointer[2])); - else - output_data("%d ", - pointer[2]); - if (length < 3) { - output_data("(partial suboption??\?)"); - break; - } - output_data("%s|%s", - ((pointer[3] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT) ? - "CLIENT" : "SERVER", - ((pointer[3] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) ? - "MUTUAL" : "ONE-WAY"); - - auth_printsub(&pointer[1], length - 1, buf, sizeof(buf)); - output_data("%s", - buf); - break; - - case TELQUAL_SEND: - i = 2; - output_data(" SEND "); - while (i < length) { - if (AUTHTYPE_NAME_OK(pointer[i])) - output_data("%s ", - AUTHTYPE_NAME(pointer[i])); - else - output_data("%d ", - pointer[i]); - if (++i >= length) { - output_data("(partial suboption??\?)"); - break; - } - output_data("%s|%s ", - ((pointer[i] & AUTH_WHO_MASK) == AUTH_WHO_CLIENT) ? - "CLIENT" : "SERVER", - ((pointer[i] & AUTH_HOW_MASK) == AUTH_HOW_MUTUAL) ? - "MUTUAL" : "ONE-WAY"); - ++i; - } - break; - - case TELQUAL_NAME: - i = 2; - output_data(" NAME \"%.*s\"", - (int)(length - 2), - pointer); - break; - - default: - for (i = 2; i < length; i++) { - output_data(" ?%d?", - pointer[i]); - } - break; - } - break; -#endif - -#ifdef ENCRYPTION - case TELOPT_ENCRYPT: - output_data("ENCRYPT"); - if (length < 2) { - output_data(" (empty suboption?)"); - break; - } - switch (pointer[1]) { - case ENCRYPT_START: - output_data(" START"); - break; - - case ENCRYPT_END: - output_data(" END"); - break; - - case ENCRYPT_REQSTART: - output_data(" REQUEST-START"); - break; - - case ENCRYPT_REQEND: - output_data(" REQUEST-END"); - break; - - case ENCRYPT_IS: - case ENCRYPT_REPLY: - output_data(" %s ", - (pointer[1] == ENCRYPT_IS) ? - "IS" : "REPLY"); - if (length < 3) { - output_data(" (partial suboption?)"); - break; - } - if (ENCTYPE_NAME_OK(pointer[2])) - output_data("%s ", - ENCTYPE_NAME(pointer[2])); - else - output_data(" %d (unknown)", - pointer[2]); - - encrypt_printsub(&pointer[1], length - 1, buf, sizeof(buf)); - output_data("%s", - buf); - break; - - case ENCRYPT_SUPPORT: - i = 2; - output_data(" SUPPORT "); - while (i < length) { - if (ENCTYPE_NAME_OK(pointer[i])) - output_data("%s ", - ENCTYPE_NAME(pointer[i])); - else - output_data("%d ", - pointer[i]); - i++; - } - break; - - case ENCRYPT_ENC_KEYID: - output_data(" ENC_KEYID %d", pointer[1]); - goto encommon; - - case ENCRYPT_DEC_KEYID: - output_data(" DEC_KEYID %d", pointer[1]); - goto encommon; - - default: - output_data(" %d (unknown)", pointer[1]); - encommon: - for (i = 2; i < length; i++) { - output_data(" %d", pointer[i]); - } - break; - } - break; -#endif - - default: - if (TELOPT_OK(pointer[0])) - output_data("%s (unknown)", - TELOPT(pointer[0])); - else - output_data("%d (unknown)", - pointer[i]); - for (i = 1; i < length; i++) { - output_data(" %d", pointer[i]); - } - break; - } - output_data("\r\n"); -} - -/* - * Dump a data buffer in hex and ascii to the output data stream. - */ -void -printdata(char *tag, char *ptr, size_t cnt) -{ - size_t i; - char xbuf[30]; - - while (cnt) { - /* flush net output buffer if no room for new data) */ - if ((&netobuf[BUFSIZ] - nfrontp) < 80) { - netflush(); - } - - /* add a line of output */ - output_data("%s: ", tag); - for (i = 0; i < 20 && cnt; i++) { - output_data("%02x", *ptr); - if (isprint((unsigned char)*ptr)) { - xbuf[i] = *ptr; - } else { - xbuf[i] = '.'; - } - if (i % 2) { - output_data(" "); - } - cnt--; - ptr++; - } - xbuf[i] = '\0'; - output_data(" %s\r\n", xbuf); - } -} -#endif /* DIAGNOSTICS */ diff --git a/kerberosV/src/appl/test/Makefile.am b/kerberosV/src/appl/test/Makefile.am deleted file mode 100644 index 077ea74e65f..00000000000 --- a/kerberosV/src/appl/test/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:40 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -noinst_PROGRAMS = tcp_client tcp_server gssapi_server gssapi_client \ - uu_server uu_client nt_gss_server nt_gss_client http_client - -tcp_client_SOURCES = tcp_client.c common.c test_locl.h - -tcp_server_SOURCES = tcp_server.c common.c test_locl.h - -gssapi_server_SOURCES = gssapi_server.c gss_common.c common.c \ - gss_common.h test_locl.h - -gssapi_client_SOURCES = gssapi_client.c gss_common.c common.c \ - gss_common.h test_locl.h - -http_client_SOURCES = http_client.c gss_common.c common.c \ - gss_common.h test_locl.h - -uu_server_SOURCES = uu_server.c common.c test_locl.h - -uu_client_SOURCES = uu_client.c common.c test_locl.h - -gssapi_server_LDADD = $(top_builddir)/lib/gssapi/libgssapi.la $(LDADD) - -gssapi_client_LDADD = $(gssapi_server_LDADD) - -http_client_LDADD = $(top_builddir)/lib/gssapi/libgssapi.la $(LDADD) - -nt_gss_client_SOURCES = nt_gss_client.c nt_gss_common.c nt_gss_common.h common.c - -nt_gss_server_SOURCES = nt_gss_server.c nt_gss_common.c nt_gss_common.h - -nt_gss_client_LDADD = $(gssapi_server_LDADD) - -nt_gss_server_LDADD = $(nt_gss_client_LDADD) - -LDADD = $(top_builddir)/lib/krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile diff --git a/kerberosV/src/appl/test/Makefile.in b/kerberosV/src/appl/test/Makefile.in deleted file mode 100644 index 087cbb5be99..00000000000 --- a/kerberosV/src/appl/test/Makefile.in +++ /dev/null @@ -1,948 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:40 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -noinst_PROGRAMS = tcp_client$(EXEEXT) tcp_server$(EXEEXT) \ - gssapi_server$(EXEEXT) gssapi_client$(EXEEXT) \ - uu_server$(EXEEXT) uu_client$(EXEEXT) nt_gss_server$(EXEEXT) \ - nt_gss_client$(EXEEXT) http_client$(EXEEXT) -subdir = appl/test -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_gssapi_client_OBJECTS = gssapi_client.$(OBJEXT) \ - gss_common.$(OBJEXT) common.$(OBJEXT) -gssapi_client_OBJECTS = $(am_gssapi_client_OBJECTS) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/lib/krb5/libkrb5.la \ - $(am__DEPENDENCIES_1) $(top_builddir)/lib/asn1/libasn1.la \ - $(am__DEPENDENCIES_1) -am__DEPENDENCIES_3 = $(top_builddir)/lib/gssapi/libgssapi.la \ - $(am__DEPENDENCIES_2) -gssapi_client_DEPENDENCIES = $(am__DEPENDENCIES_3) -am_gssapi_server_OBJECTS = gssapi_server.$(OBJEXT) \ - gss_common.$(OBJEXT) common.$(OBJEXT) -gssapi_server_OBJECTS = $(am_gssapi_server_OBJECTS) -gssapi_server_DEPENDENCIES = $(top_builddir)/lib/gssapi/libgssapi.la \ - $(am__DEPENDENCIES_2) -am_http_client_OBJECTS = http_client.$(OBJEXT) gss_common.$(OBJEXT) \ - common.$(OBJEXT) -http_client_OBJECTS = $(am_http_client_OBJECTS) -http_client_DEPENDENCIES = $(top_builddir)/lib/gssapi/libgssapi.la \ - $(am__DEPENDENCIES_2) -am_nt_gss_client_OBJECTS = nt_gss_client.$(OBJEXT) \ - nt_gss_common.$(OBJEXT) common.$(OBJEXT) -nt_gss_client_OBJECTS = $(am_nt_gss_client_OBJECTS) -nt_gss_client_DEPENDENCIES = $(am__DEPENDENCIES_3) -am_nt_gss_server_OBJECTS = nt_gss_server.$(OBJEXT) \ - nt_gss_common.$(OBJEXT) -nt_gss_server_OBJECTS = $(am_nt_gss_server_OBJECTS) -am__DEPENDENCIES_4 = $(am__DEPENDENCIES_3) -nt_gss_server_DEPENDENCIES = $(am__DEPENDENCIES_4) -am_tcp_client_OBJECTS = tcp_client.$(OBJEXT) common.$(OBJEXT) -tcp_client_OBJECTS = $(am_tcp_client_OBJECTS) -tcp_client_LDADD = $(LDADD) -tcp_client_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \ - $(am__DEPENDENCIES_1) $(top_builddir)/lib/asn1/libasn1.la \ - $(am__DEPENDENCIES_1) -am_tcp_server_OBJECTS = tcp_server.$(OBJEXT) common.$(OBJEXT) -tcp_server_OBJECTS = $(am_tcp_server_OBJECTS) -tcp_server_LDADD = $(LDADD) -tcp_server_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \ - $(am__DEPENDENCIES_1) $(top_builddir)/lib/asn1/libasn1.la \ - $(am__DEPENDENCIES_1) -am_uu_client_OBJECTS = uu_client.$(OBJEXT) common.$(OBJEXT) -uu_client_OBJECTS = $(am_uu_client_OBJECTS) -uu_client_LDADD = $(LDADD) -uu_client_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \ - $(am__DEPENDENCIES_1) $(top_builddir)/lib/asn1/libasn1.la \ - $(am__DEPENDENCIES_1) -am_uu_server_OBJECTS = uu_server.$(OBJEXT) common.$(OBJEXT) -uu_server_OBJECTS = $(am_uu_server_OBJECTS) -uu_server_LDADD = $(LDADD) -uu_server_DEPENDENCIES = $(top_builddir)/lib/krb5/libkrb5.la \ - $(am__DEPENDENCIES_1) $(top_builddir)/lib/asn1/libasn1.la \ - $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(gssapi_client_SOURCES) $(gssapi_server_SOURCES) \ - $(http_client_SOURCES) $(nt_gss_client_SOURCES) \ - $(nt_gss_server_SOURCES) $(tcp_client_SOURCES) \ - $(tcp_server_SOURCES) $(uu_client_SOURCES) \ - $(uu_server_SOURCES) -DIST_SOURCES = $(gssapi_client_SOURCES) $(gssapi_server_SOURCES) \ - $(http_client_SOURCES) $(nt_gss_client_SOURCES) \ - $(nt_gss_server_SOURCES) $(tcp_client_SOURCES) \ - $(tcp_server_SOURCES) $(uu_client_SOURCES) \ - $(uu_server_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -tcp_client_SOURCES = tcp_client.c common.c test_locl.h -tcp_server_SOURCES = tcp_server.c common.c test_locl.h -gssapi_server_SOURCES = gssapi_server.c gss_common.c common.c \ - gss_common.h test_locl.h - -gssapi_client_SOURCES = gssapi_client.c gss_common.c common.c \ - gss_common.h test_locl.h - -http_client_SOURCES = http_client.c gss_common.c common.c \ - gss_common.h test_locl.h - -uu_server_SOURCES = uu_server.c common.c test_locl.h -uu_client_SOURCES = uu_client.c common.c test_locl.h -gssapi_server_LDADD = $(top_builddir)/lib/gssapi/libgssapi.la $(LDADD) -gssapi_client_LDADD = $(gssapi_server_LDADD) -http_client_LDADD = $(top_builddir)/lib/gssapi/libgssapi.la $(LDADD) -nt_gss_client_SOURCES = nt_gss_client.c nt_gss_common.c nt_gss_common.h common.c -nt_gss_server_SOURCES = nt_gss_server.c nt_gss_common.c nt_gss_common.h -nt_gss_client_LDADD = $(gssapi_server_LDADD) -nt_gss_server_LDADD = $(nt_gss_client_LDADD) -LDADD = $(top_builddir)/lib/krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_roken) - -EXTRA_DIST = NTMakefile -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/test/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/test/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -gssapi_client$(EXEEXT): $(gssapi_client_OBJECTS) $(gssapi_client_DEPENDENCIES) - @rm -f gssapi_client$(EXEEXT) - $(LINK) $(gssapi_client_OBJECTS) $(gssapi_client_LDADD) $(LIBS) -gssapi_server$(EXEEXT): $(gssapi_server_OBJECTS) $(gssapi_server_DEPENDENCIES) - @rm -f gssapi_server$(EXEEXT) - $(LINK) $(gssapi_server_OBJECTS) $(gssapi_server_LDADD) $(LIBS) -http_client$(EXEEXT): $(http_client_OBJECTS) $(http_client_DEPENDENCIES) - @rm -f http_client$(EXEEXT) - $(LINK) $(http_client_OBJECTS) $(http_client_LDADD) $(LIBS) -nt_gss_client$(EXEEXT): $(nt_gss_client_OBJECTS) $(nt_gss_client_DEPENDENCIES) - @rm -f nt_gss_client$(EXEEXT) - $(LINK) $(nt_gss_client_OBJECTS) $(nt_gss_client_LDADD) $(LIBS) -nt_gss_server$(EXEEXT): $(nt_gss_server_OBJECTS) $(nt_gss_server_DEPENDENCIES) - @rm -f nt_gss_server$(EXEEXT) - $(LINK) $(nt_gss_server_OBJECTS) $(nt_gss_server_LDADD) $(LIBS) -tcp_client$(EXEEXT): $(tcp_client_OBJECTS) $(tcp_client_DEPENDENCIES) - @rm -f tcp_client$(EXEEXT) - $(LINK) $(tcp_client_OBJECTS) $(tcp_client_LDADD) $(LIBS) -tcp_server$(EXEEXT): $(tcp_server_OBJECTS) $(tcp_server_DEPENDENCIES) - @rm -f tcp_server$(EXEEXT) - $(LINK) $(tcp_server_OBJECTS) $(tcp_server_LDADD) $(LIBS) -uu_client$(EXEEXT): $(uu_client_OBJECTS) $(uu_client_DEPENDENCIES) - @rm -f uu_client$(EXEEXT) - $(LINK) $(uu_client_OBJECTS) $(uu_client_LDADD) $(LIBS) -uu_server$(EXEEXT): $(uu_server_OBJECTS) $(uu_server_DEPENDENCIES) - @rm -f uu_server$(EXEEXT) - $(LINK) $(uu_server_OBJECTS) $(uu_server_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gss_common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssapi_client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssapi_server.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nt_gss_client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nt_gss_common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nt_gss_server.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcp_client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcp_server.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uu_client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uu_server.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libtool clean-noinstPROGRAMS ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am uninstall-hook - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/test/NTMakefile b/kerberosV/src/appl/test/NTMakefile deleted file mode 100644 index 15bea96eed4..00000000000 --- a/kerberosV/src/appl/test/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\test - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/test/common.c b/kerberosV/src/appl/test/common.c deleted file mode 100644 index d589ded37e9..00000000000 --- a/kerberosV/src/appl/test/common.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "test_locl.h" - -RCSID("$Id: common.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -static int help_flag; -static int version_flag; -static char *port_str; -static char *keytab_str; -krb5_keytab keytab; -char *service = SERVICE; -char *mech = "krb5"; -int fork_flag; -char *password = NULL; - -static struct getargs args[] = { - { "port", 'p', arg_string, &port_str, "port to listen to", "port" }, - { "service", 's', arg_string, &service, "service to use", "service" }, - { "keytab", 'k', arg_string, &keytab_str, "keytab to use", "keytab" }, - { "mech", 'm', arg_string, &mech, "gssapi mech to use", "mech" }, - { "password", 'P', arg_string, &password, "password to use", "password" }, - { "fork", 'f', arg_flag, &fork_flag, "do fork" }, - { "help", 'h', arg_flag, &help_flag }, - { "version", 0, arg_flag, &version_flag } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -static void -server_usage(int code, struct getargs *args, int num_args) -{ - arg_printusage(args, num_args, NULL, ""); - exit(code); -} - -static void -client_usage(int code, struct getargs *args, int num_args) -{ - arg_printusage(args, num_args, NULL, "host"); - exit(code); -} - - -static int -common_setup(krb5_context *context, int *argc, char **argv, - void (*usage)(int, struct getargs*, int)) -{ - int port = 0; - *argc = krb5_program_setup(context, *argc, argv, args, num_args, usage); - - if(help_flag) - (*usage)(0, args, num_args); - if(version_flag) { - print_version(NULL); - exit(0); - } - - 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) - port = krb5_getportbyname (*context, PORT, "tcp", 4711); - - return port; -} - -int -server_setup(krb5_context *context, int argc, char **argv) -{ - int port = common_setup(context, &argc, argv, server_usage); - krb5_error_code ret; - - if(argv[argc] != NULL) - server_usage(1, args, num_args); - if (keytab_str != NULL) - ret = krb5_kt_resolve (*context, keytab_str, &keytab); - else - ret = krb5_kt_default (*context, &keytab); - if (ret) - krb5_err (*context, 1, ret, "krb5_kt_resolve/default"); - return port; -} - -int -client_setup(krb5_context *context, int *argc, char **argv) -{ - int optind = *argc; - int port = common_setup(context, &optind, argv, client_usage); - if(*argc - optind != 1) - client_usage(1, args, num_args); - *argc = optind; - return port; -} - -int -client_doit (const char *hostname, int port, const char *service, - int (*func)(int, const char *hostname, const char *service)) -{ - struct addrinfo *ai, *a; - struct addrinfo hints; - int error; - char portstr[NI_MAXSERV]; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - snprintf (portstr, sizeof(portstr), "%u", ntohs(port)); - - error = getaddrinfo (hostname, portstr, &hints, &ai); - if (error) { - errx (1, "%s: %s", hostname, gai_strerror(error)); - return -1; - } - - for (a = ai; a != NULL; a = a->ai_next) { - int s; - - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - warn ("connect(%s)", hostname); - close (s); - continue; - } - freeaddrinfo (ai); - return (*func) (s, hostname, service); - } - warnx ("failed to contact %s", hostname); - freeaddrinfo (ai); - return 1; -} diff --git a/kerberosV/src/appl/test/gss_common.c b/kerberosV/src/appl/test/gss_common.c deleted file mode 100644 index d2a92e8ecf0..00000000000 --- a/kerberosV/src/appl/test/gss_common.c +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "test_locl.h" -#include -#include -#include -#include "gss_common.h" -RCSID("$Id: gss_common.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -void -write_token (int sock, gss_buffer_t buf) -{ - uint32_t len, net_len; - OM_uint32 min_stat; - - len = buf->length; - - net_len = htonl(len); - - if (net_write (sock, &net_len, 4) != 4) - err (1, "write"); - if (net_write (sock, buf->value, len) != len) - err (1, "write"); - - gss_release_buffer (&min_stat, buf); -} - -static void -enet_read(int fd, void *buf, size_t len) -{ - ssize_t ret; - - ret = net_read (fd, buf, len); - if (ret == 0) - errx (1, "EOF in read"); - else if (ret < 0) - errx (1, "read"); -} - -void -read_token (int sock, gss_buffer_t buf) -{ - uint32_t len, net_len; - - enet_read (sock, &net_len, 4); - len = ntohl(net_len); - buf->length = len; - buf->value = emalloc(len); - enet_read (sock, buf->value, len); -} - -void -gss_print_errors (int min_stat) -{ - OM_uint32 new_stat; - OM_uint32 msg_ctx = 0; - gss_buffer_desc status_string; - OM_uint32 ret; - - do { - ret = gss_display_status (&new_stat, - min_stat, - GSS_C_MECH_CODE, - GSS_C_NO_OID, - &msg_ctx, - &status_string); - fprintf (stderr, "%.*s\n", (int)status_string.length, - (char *)status_string.value); - gss_release_buffer (&new_stat, &status_string); - } while (!GSS_ERROR(ret) && msg_ctx != 0); -} - -void -gss_verr(int exitval, int status, const char *fmt, va_list ap) -{ - vwarnx (fmt, ap); - gss_print_errors (status); - exit (exitval); -} - -void -gss_err(int exitval, int status, const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - gss_verr (exitval, status, fmt, args); - va_end(args); -} - -gss_OID -select_mech(const char *mech) -{ - if (strcasecmp(mech, "krb5") == 0) - return GSS_KRB5_MECHANISM; - else if (strcasecmp(mech, "spnego") == 0) - return GSS_SPNEGO_MECHANISM; - else if (strcasecmp(mech, "no-oid") == 0) - return GSS_C_NO_OID; - else - errx (1, "Unknown mechanism '%s' (spnego, krb5, no-oid)", mech); -} - -void -print_gss_name(const char *prefix, gss_name_t name) -{ - OM_uint32 maj_stat, min_stat; - gss_buffer_desc name_token; - - maj_stat = gss_display_name (&min_stat, - name, - &name_token, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_display_name"); - - fprintf (stderr, "%s `%.*s'\n", prefix, - (int)name_token.length, - (char *)name_token.value); - - gss_release_buffer (&min_stat, &name_token); - -} diff --git a/kerberosV/src/appl/test/gss_common.h b/kerberosV/src/appl/test/gss_common.h deleted file mode 100644 index b4967bcc05d..00000000000 --- a/kerberosV/src/appl/test/gss_common.h +++ /dev/null @@ -1,49 +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: gss_common.h,v 1.2 2013/06/17 18:57:40 robert Exp $ */ - -void write_token (int sock, gss_buffer_t buf); -void read_token (int sock, gss_buffer_t buf); - -void gss_print_errors (int min_stat); - -void gss_verr(int exitval, int status, const char *fmt, va_list ap) - __attribute__ ((format (printf, 3, 0))); - -void gss_err(int exitval, int status, const char *fmt, ...) - __attribute__ ((format (printf, 3, 4))); - -gss_OID select_mech(const char *); - -void print_gss_name(const char *, gss_name_t); diff --git a/kerberosV/src/appl/test/gssapi_client.c b/kerberosV/src/appl/test/gssapi_client.c deleted file mode 100644 index b4ca625ddbe..00000000000 --- a/kerberosV/src/appl/test/gssapi_client.c +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "test_locl.h" -#include -#include -#include -#include "gss_common.h" -RCSID("$Id: gssapi_client.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -static int -do_trans (int sock, gss_ctx_id_t context_hdl) -{ - OM_uint32 maj_stat, min_stat; - gss_buffer_desc real_input_token, real_output_token; - gss_buffer_t input_token = &real_input_token, - output_token = &real_output_token; - - /* get_mic */ - - input_token->length = 3; - input_token->value = strdup("hej"); - - maj_stat = gss_get_mic(&min_stat, - context_hdl, - GSS_C_QOP_DEFAULT, - input_token, - output_token); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_get_mic"); - - write_token (sock, input_token); - write_token (sock, output_token); - - /* wrap */ - - input_token->length = 7; - input_token->value = "hemligt"; - - maj_stat = gss_wrap (&min_stat, - context_hdl, - 0, - GSS_C_QOP_DEFAULT, - input_token, - NULL, - output_token); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_wrap"); - - write_token (sock, output_token); - - maj_stat = gss_wrap (&min_stat, - context_hdl, - 1, - GSS_C_QOP_DEFAULT, - input_token, - NULL, - output_token); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_wrap"); - - write_token (sock, output_token); - - return 0; -} - -extern char *password; - -static int -proto (int sock, const char *hostname, const char *service) -{ - struct sockaddr_storage remote, local; - socklen_t addrlen; - - int context_established = 0; - gss_ctx_id_t context_hdl = GSS_C_NO_CONTEXT; - gss_cred_id_t cred = GSS_C_NO_CREDENTIAL; - gss_buffer_desc real_input_token, real_output_token; - gss_buffer_t input_token = &real_input_token, - output_token = &real_output_token; - OM_uint32 maj_stat, min_stat; - gss_name_t server; - gss_buffer_desc name_token; - u_char init_buf[4]; - u_char acct_buf[4]; - gss_OID mech_oid; - char *str; - - mech_oid = select_mech(mech); - - name_token.length = asprintf (&str, - "%s@%s", service, hostname); - if (str == NULL) - errx(1, "malloc - out of memory"); - name_token.value = str; - - maj_stat = gss_import_name (&min_stat, - &name_token, - GSS_C_NT_HOSTBASED_SERVICE, - &server); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, - "Error importing name `%s@%s':\n", service, hostname); - - if (password) { - gss_buffer_desc pw; - - pw.value = password; - pw.length = strlen(password); - - maj_stat = gss_acquire_cred_with_password(&min_stat, - GSS_C_NO_NAME, - &pw, - GSS_C_INDEFINITE, - GSS_C_NO_OID_SET, - GSS_C_INITIATE, - &cred, - NULL, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, - "Error acquiring default initiator credentials"); - } - - addrlen = sizeof(local); - if (getsockname (sock, (struct sockaddr *)&local, &addrlen) < 0 - || addrlen > sizeof(local)) - err (1, "getsockname(%s)", hostname); - - addrlen = sizeof(remote); - if (getpeername (sock, (struct sockaddr *)&remote, &addrlen) < 0 - || addrlen > sizeof(remote)) - err (1, "getpeername(%s)", hostname); - - input_token->length = 0; - output_token->length = 0; - -#if 0 - struct gss_channel_bindings_struct input_chan_bindings; - - input_chan_bindings.initiator_addrtype = GSS_C_AF_INET; - input_chan_bindings.initiator_address.length = 4; - init_buf[0] = (local.sin_addr.s_addr >> 24) & 0xFF; - init_buf[1] = (local.sin_addr.s_addr >> 16) & 0xFF; - init_buf[2] = (local.sin_addr.s_addr >> 8) & 0xFF; - init_buf[3] = (local.sin_addr.s_addr >> 0) & 0xFF; - input_chan_bindings.initiator_address.value = init_buf; - - input_chan_bindings.acceptor_addrtype = GSS_C_AF_INET; - input_chan_bindings.acceptor_address.length = 4; - acct_buf[0] = (remote.sin_addr.s_addr >> 24) & 0xFF; - acct_buf[1] = (remote.sin_addr.s_addr >> 16) & 0xFF; - acct_buf[2] = (remote.sin_addr.s_addr >> 8) & 0xFF; - acct_buf[3] = (remote.sin_addr.s_addr >> 0) & 0xFF; - input_chan_bindings.acceptor_address.value = acct_buf; - - input_chan_bindings.application_data.value = emalloc(4); - * (unsigned short*)input_chan_bindings.application_data.value = local.sin_port; - * ((unsigned short *)input_chan_bindings.application_data.value + 1) = remote.sin_port; - input_chan_bindings.application_data.length = 4; - - input_chan_bindings.application_data.length = 0; - input_chan_bindings.application_data.value = NULL; -#endif - - while(!context_established) { - maj_stat = - gss_init_sec_context(&min_stat, - cred, - &context_hdl, - server, - mech_oid, - GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG, - 0, - NULL, - input_token, - NULL, - output_token, - NULL, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_init_sec_context"); - if (output_token->length != 0) - write_token (sock, output_token); - if (GSS_ERROR(maj_stat)) { - if (context_hdl != GSS_C_NO_CONTEXT) - gss_delete_sec_context (&min_stat, - &context_hdl, - GSS_C_NO_BUFFER); - break; - } - if (maj_stat & GSS_S_CONTINUE_NEEDED) { - read_token (sock, input_token); - } else { - context_established = 1; - } - - } - if (fork_flag) { - pid_t pid; - int pipefd[2]; - - if (pipe (pipefd) < 0) - err (1, "pipe"); - - pid = fork (); - if (pid < 0) - err (1, "fork"); - if (pid != 0) { - gss_buffer_desc buf; - - maj_stat = gss_export_sec_context (&min_stat, - &context_hdl, - &buf); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_export_sec_context"); - write_token (pipefd[1], &buf); - exit (0); - } else { - gss_ctx_id_t context_hdl; - gss_buffer_desc buf; - - close (pipefd[1]); - read_token (pipefd[0], &buf); - close (pipefd[0]); - maj_stat = gss_import_sec_context (&min_stat, &buf, &context_hdl); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_import_sec_context"); - gss_release_buffer (&min_stat, &buf); - return do_trans (sock, context_hdl); - } - } else { - return do_trans (sock, context_hdl); - } -} - -int -main(int argc, char **argv) -{ - krb5_context context; /* XXX */ - int port = client_setup(&context, &argc, argv); - return client_doit (argv[argc], port, service, proto); -} diff --git a/kerberosV/src/appl/test/gssapi_server.c b/kerberosV/src/appl/test/gssapi_server.c deleted file mode 100644 index 6b91330fbd7..00000000000 --- a/kerberosV/src/appl/test/gssapi_server.c +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "test_locl.h" -#include -#include -#include -#include "gss_common.h" -RCSID("$Id: gssapi_server.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -static int -process_it(int sock, - gss_ctx_id_t context_hdl, - gss_name_t client_name - ) -{ - OM_uint32 maj_stat, min_stat; - gss_buffer_desc real_input_token, real_output_token; - gss_buffer_t input_token = &real_input_token, - output_token = &real_output_token; - gss_name_t server_name; - int conf_flag; - - print_gss_name("User is", client_name); - - maj_stat = gss_inquire_context(&min_stat, - context_hdl, - NULL, - &server_name, - NULL, - NULL, - NULL, - NULL, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_inquire_context"); - - print_gss_name("Server is", server_name); - - maj_stat = gss_release_name(&min_stat, &server_name); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_release_name"); - - /* gss_verify_mic */ - - read_token (sock, input_token); - read_token (sock, output_token); - - maj_stat = gss_verify_mic (&min_stat, - context_hdl, - input_token, - output_token, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_verify_mic"); - - fprintf (stderr, "gss_verify_mic: %.*s\n", (int)input_token->length, - (char *)input_token->value); - - gss_release_buffer (&min_stat, input_token); - gss_release_buffer (&min_stat, output_token); - - /* gss_unwrap */ - - read_token (sock, input_token); - - maj_stat = gss_unwrap (&min_stat, - context_hdl, - input_token, - output_token, - &conf_flag, - NULL); - if(GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_unwrap"); - - fprintf (stderr, "gss_unwrap: %.*s %s\n", (int)output_token->length, - (char *)output_token->value, - conf_flag ? "CONF" : "INT"); - - gss_release_buffer (&min_stat, input_token); - gss_release_buffer (&min_stat, output_token); - - read_token (sock, input_token); - - maj_stat = gss_unwrap (&min_stat, - context_hdl, - input_token, - output_token, - &conf_flag, - NULL); - if(GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_unwrap"); - - fprintf (stderr, "gss_unwrap: %.*s %s\n", (int)output_token->length, - (char *)output_token->value, - conf_flag ? "CONF" : "INT"); - - gss_release_buffer (&min_stat, input_token); - gss_release_buffer (&min_stat, output_token); - - return 0; -} - -static int -proto (int sock, const char *service) -{ - struct sockaddr_in remote, local; - socklen_t addrlen; - gss_ctx_id_t context_hdl = GSS_C_NO_CONTEXT; - gss_buffer_desc real_input_token, real_output_token; - gss_buffer_t input_token = &real_input_token, - output_token = &real_output_token; - OM_uint32 maj_stat, min_stat; - gss_name_t client_name; - struct gss_channel_bindings_struct input_chan_bindings; - gss_cred_id_t delegated_cred_handle = NULL; - krb5_ccache ccache; - u_char init_buf[4]; - u_char acct_buf[4]; - gss_OID mech_oid; - char *mech, *p; - - addrlen = sizeof(local); - if (getsockname (sock, (struct sockaddr *)&local, &addrlen) < 0 - || addrlen != sizeof(local)) - err (1, "getsockname)"); - - addrlen = sizeof(remote); - if (getpeername (sock, (struct sockaddr *)&remote, &addrlen) < 0 - || addrlen != sizeof(remote)) - err (1, "getpeername"); - - input_chan_bindings.initiator_addrtype = GSS_C_AF_INET; - input_chan_bindings.initiator_address.length = 4; - init_buf[0] = (remote.sin_addr.s_addr >> 24) & 0xFF; - init_buf[1] = (remote.sin_addr.s_addr >> 16) & 0xFF; - init_buf[2] = (remote.sin_addr.s_addr >> 8) & 0xFF; - init_buf[3] = (remote.sin_addr.s_addr >> 0) & 0xFF; - - input_chan_bindings.initiator_address.value = init_buf; - input_chan_bindings.acceptor_addrtype = GSS_C_AF_INET; - - input_chan_bindings.acceptor_address.length = 4; - acct_buf[0] = (local.sin_addr.s_addr >> 24) & 0xFF; - acct_buf[1] = (local.sin_addr.s_addr >> 16) & 0xFF; - acct_buf[2] = (local.sin_addr.s_addr >> 8) & 0xFF; - acct_buf[3] = (local.sin_addr.s_addr >> 0) & 0xFF; - input_chan_bindings.acceptor_address.value = acct_buf; - input_chan_bindings.application_data.value = emalloc(4); -#if 0 - * (unsigned short *)input_chan_bindings.application_data.value = - remote.sin_port; - * ((unsigned short *)input_chan_bindings.application_data.value + 1) = - local.sin_port; - input_chan_bindings.application_data.length = 4; -#else - input_chan_bindings.application_data.length = 0; - input_chan_bindings.application_data.value = NULL; -#endif - - delegated_cred_handle = GSS_C_NO_CREDENTIAL; - - do { - read_token (sock, input_token); - maj_stat = - gss_accept_sec_context (&min_stat, - &context_hdl, - GSS_C_NO_CREDENTIAL, - input_token, - &input_chan_bindings, - &client_name, - &mech_oid, - output_token, - NULL, - NULL, - &delegated_cred_handle); - if(GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_accept_sec_context"); - if (output_token->length != 0) - write_token (sock, output_token); - if (GSS_ERROR(maj_stat)) { - if (context_hdl != GSS_C_NO_CONTEXT) - gss_delete_sec_context (&min_stat, - &context_hdl, - GSS_C_NO_BUFFER); - break; - } - } while(maj_stat & GSS_S_CONTINUE_NEEDED); - - p = (char *)mech_oid->elements; - if (mech_oid->length == GSS_KRB5_MECHANISM->length - && memcmp(p, GSS_KRB5_MECHANISM->elements, mech_oid->length) == 0) - mech = "Kerberos 5"; - else if (mech_oid->length == GSS_SPNEGO_MECHANISM->length - && memcmp(p, GSS_SPNEGO_MECHANISM->elements, mech_oid->length) == 0) - mech = "SPNEGO"; /* XXX Silly, wont show up */ - else - mech = "Unknown"; - - printf("Using mech: %s\n", mech); - - if (delegated_cred_handle != GSS_C_NO_CREDENTIAL) { - krb5_context context; - - printf("Delegated cred found\n"); - - maj_stat = krb5_init_context(&context); - maj_stat = krb5_cc_resolve(context, "FILE:/tmp/krb5cc_test", &ccache); - maj_stat = gss_krb5_copy_ccache(&min_stat, - delegated_cred_handle, - ccache); - if (maj_stat == 0) { - krb5_principal p; - maj_stat = krb5_cc_get_principal(context, ccache, &p); - if (maj_stat == 0) { - char *name; - maj_stat = krb5_unparse_name(context, p, &name); - if (maj_stat == 0) { - printf("Delegated user is: `%s'\n", name); - free(name); - } - krb5_free_principal(context, p); - } - } - krb5_cc_close(context, ccache); - gss_release_cred(&min_stat, &delegated_cred_handle); - } - - if (fork_flag) { - pid_t pid; - int pipefd[2]; - - if (pipe (pipefd) < 0) - err (1, "pipe"); - - pid = fork (); - if (pid < 0) - err (1, "fork"); - if (pid != 0) { - gss_buffer_desc buf; - - maj_stat = gss_export_sec_context (&min_stat, - &context_hdl, - &buf); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_export_sec_context"); - write_token (pipefd[1], &buf); - exit (0); - } else { - gss_ctx_id_t context_hdl; - gss_buffer_desc buf; - - close (pipefd[1]); - read_token (pipefd[0], &buf); - close (pipefd[0]); - maj_stat = gss_import_sec_context (&min_stat, &buf, &context_hdl); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_import_sec_context"); - gss_release_buffer (&min_stat, &buf); - return process_it (sock, context_hdl, client_name); - } - } else { - return process_it (sock, context_hdl, client_name); - } -} - -static int -doit (int port, const char *service) -{ - int sock, sock2; - struct sockaddr_in my_addr; - int one = 1; - int ret; - - sock = socket (AF_INET, SOCK_STREAM, 0); - if (sock < 0) - err (1, "socket"); - - memset (&my_addr, 0, sizeof(my_addr)); - my_addr.sin_family = AF_INET; - my_addr.sin_port = port; - my_addr.sin_addr.s_addr = INADDR_ANY; - - if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, - (void *)&one, sizeof(one)) < 0) - warn ("setsockopt SO_REUSEADDR"); - - if (bind (sock, (struct sockaddr *)&my_addr, sizeof(my_addr)) < 0) - err (1, "bind"); - - while (1) { - if (listen (sock, 1) < 0) - err (1, "listen"); - - sock2 = accept (sock, NULL, NULL); - if (sock2 < 0) - err (1, "accept"); - - ret = proto (sock2, service); - } - return ret; -} - -int -main(int argc, char **argv) -{ - krb5_context context = NULL; /* XXX */ - int port = server_setup(&context, argc, argv); - return doit (port, service); -} - diff --git a/kerberosV/src/appl/test/http_client.c b/kerberosV/src/appl/test/http_client.c deleted file mode 100644 index 7bc44a79d55..00000000000 --- a/kerberosV/src/appl/test/http_client.c +++ /dev/null @@ -1,510 +0,0 @@ -/* - * Copyright (c) 2003 - 2005 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 "test_locl.h" -#include -#include -#include -#include "gss_common.h" -#include - -RCSID("$Id: http_client.c,v 1.3 2013/06/17 18:57:40 robert Exp $"); - -/* - * A simplistic client implementing draft-brezak-spnego-http-04.txt - */ - -static int -do_connect (const char *hostname, const char *port) -{ - struct addrinfo *ai, *a; - struct addrinfo hints; - int error; - int s = -1; - - memset (&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = 0; - - error = getaddrinfo (hostname, port, &hints, &ai); - if (error) - errx (1, "getaddrinfo(%s): %s", hostname, gai_strerror(error)); - - for (a = ai; a != NULL; a = a->ai_next) { - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - warn ("connect(%s)", hostname); - close (s); - continue; - } - break; - } - freeaddrinfo (ai); - if (a == NULL) - errx (1, "failed to contact %s", hostname); - - return s; -} - -static void -fdprintf(int s, const char *fmt, ...) -{ - size_t len; - ssize_t ret; - va_list ap; - char *str, *buf; - - va_start(ap, fmt); - vasprintf(&str, fmt, ap); - va_end(ap); - - if (str == NULL) - errx(1, "vasprintf"); - - buf = str; - len = strlen(buf); - while (len) { - ret = write(s, buf, len); - if (ret == 0) - err(1, "connection closed"); - else if (ret < 0) - err(1, "error"); - len -= ret; - buf += ret; - } - free(str); -} - -static int help_flag; -static int version_flag; -static int verbose_flag; -static int mutual_flag = 1; -static int delegate_flag; -static char *port_str = "http"; -static char *gss_service = "HTTP"; - -static struct getargs http_args[] = { - { "verbose", 'v', arg_flag, &verbose_flag, "verbose logging", }, - { "port", 'p', arg_string, &port_str, "port to connect to", "port" }, - { "delegate", 0, arg_flag, &delegate_flag, "gssapi delegate credential" }, - { "gss-service", 's', arg_string, &gss_service, "gssapi service to use", - "service" }, - { "mech", 'm', arg_string, &mech, "gssapi mech to use", "mech" }, - { "mutual", 0, arg_negative_flag, &mutual_flag, "no gssapi mutual auth" }, - { "help", 'h', arg_flag, &help_flag }, - { "version", 0, arg_flag, &version_flag } -}; - -static int num_http_args = sizeof(http_args) / sizeof(http_args[0]); - -static void -usage(int code) -{ - arg_printusage(http_args, num_http_args, NULL, "host [page]"); - exit(code); -} - -/* - * - */ - -struct http_req { - char *response; - char **headers; - int num_headers; - void *body; - size_t body_size; -}; - - -static void -http_req_zero(struct http_req *req) -{ - req->response = NULL; - req->headers = NULL; - req->num_headers = 0; - req->body = NULL; - req->body_size = 0; -} - -static void -http_req_free(struct http_req *req) -{ - int i; - - free(req->response); - for (i = 0; i < req->num_headers; i++) - free(req->headers[i]); - free(req->headers); - free(req->body); - http_req_zero(req); -} - -static const char * -http_find_header(struct http_req *req, const char *header) -{ - int i, len = strlen(header); - - for (i = 0; i < req->num_headers; i++) { - if (strncasecmp(header, req->headers[i], len) == 0) { - return req->headers[i] + len + 1; - } - } - return NULL; -} - - -static int -http_query(const char *host, const char *page, - char **headers, int num_headers, struct http_req *req) -{ - enum { RESPONSE, HEADER, BODY } state; - ssize_t ret; - char in_buf[1024], *in_ptr = in_buf; - size_t in_len = 0; - int s, i; - - http_req_zero(req); - - s = do_connect(host, port_str); - if (s < 0) - errx(1, "connection failed"); - - fdprintf(s, "GET %s HTTP/1.0\r\n", page); - for (i = 0; i < num_headers; i++) - fdprintf(s, "%s\r\n", headers[i]); - fdprintf(s, "Host: %s\r\n\r\n", host); - - state = RESPONSE; - - while (1) { - ret = read (s, in_ptr, sizeof(in_buf) - in_len - 1); - if (ret == 0) - break; - else if (ret < 0) - err (1, "read: %lu", (unsigned long)ret); - - in_buf[ret + in_len] = '\0'; - - if (state == HEADER || state == RESPONSE) { - char *p; - - in_len += ret; - in_ptr += ret; - - while (1) { - p = strstr(in_buf, "\r\n"); - - if (p == NULL) { - break; - } else if (p == in_buf) { - memmove(in_buf, in_buf + 2, sizeof(in_buf) - 2); - state = BODY; - in_len -= 2; - in_ptr -= 2; - break; - } else if (state == RESPONSE) { - req->response = emalloc(p - in_buf + 1); - memcpy(req->response, in_buf, p - in_buf); - req->response[p - in_buf] = '\0'; - state = HEADER; - } else { - req->headers = realloc(req->headers, - (req->num_headers + 1) * sizeof(req->headers[0])); - req->headers[req->num_headers] = emalloc(p - in_buf + 1); - memcpy(req->headers[req->num_headers], in_buf, p - in_buf); - req->headers[req->num_headers][p - in_buf] = '\0'; - if (req->headers[req->num_headers] == NULL) - errx(1, "strdup"); - req->num_headers++; - } - memmove(in_buf, p + 2, sizeof(in_buf) - (p - in_buf) - 2); - in_len -= (p - in_buf) + 2; - in_ptr -= (p - in_buf) + 2; - } - } - - if (state == BODY) { - - req->body = erealloc(req->body, req->body_size + ret + 1); - - memcpy((char *)req->body + req->body_size, in_buf, ret); - req->body_size += ret; - ((char *)req->body)[req->body_size] = '\0'; - - in_ptr = in_buf; - in_len = 0; - } else - abort(); - } - - if (verbose_flag) { - int i; - printf("response: %s\n", req->response); - for (i = 0; i < req->num_headers; i++) - printf("header[%d] %s\n", i, req->headers[i]); - printf("body: %.*s\n", (int)req->body_size, (char *)req->body); - } - - close(s); - return 0; -} - - -int -main(int argc, char **argv) -{ - struct http_req req; - const char *host, *page; - int i, done, print_body, gssapi_done, gssapi_started; - char *headers[10]; /* XXX */ - int num_headers; - gss_ctx_id_t context_hdl = GSS_C_NO_CONTEXT; - gss_name_t server = GSS_C_NO_NAME; - int optind = 0; - gss_OID mech_oid; - OM_uint32 flags; - - setprogname(argv[0]); - - if(getarg(http_args, num_http_args, argc, argv, &optind)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag) { - print_version(NULL); - exit(0); - } - - argc -= optind; - argv += optind; - - mech_oid = select_mech(mech); - - if (argc != 1 && argc != 2) - errx(1, "usage: %s host [page]", getprogname()); - host = argv[0]; - if (argc == 2) - page = argv[1]; - else - page = "/"; - - flags = 0; - if (delegate_flag) - flags |= GSS_C_DELEG_FLAG; - if (mutual_flag) - flags |= GSS_C_MUTUAL_FLAG; - - done = 0; - num_headers = 0; - gssapi_done = 1; - gssapi_started = 0; - do { - print_body = 0; - - http_query(host, page, headers, num_headers, &req); - for (i = 0 ; i < num_headers; i++) - free(headers[i]); - num_headers = 0; - - if (strstr(req.response, " 200 ") != NULL) { - print_body = 1; - done = 1; - } else if (strstr(req.response, " 401 ") != NULL) { - if (http_find_header(&req, "WWW-Authenticate:") == NULL) - errx(1, "Got %s but missed `WWW-Authenticate'", req.response); - gssapi_done = 0; - } - - if (!gssapi_done) { - const char *h = http_find_header(&req, "WWW-Authenticate:"); - if (h == NULL) - errx(1, "Got %s but missed `WWW-Authenticate'", req.response); - - if (strncasecmp(h, "Negotiate", 9) == 0) { - OM_uint32 maj_stat, min_stat; - gss_buffer_desc input_token, output_token; - - if (verbose_flag) - printf("Negotiate found\n"); - - if (server == GSS_C_NO_NAME) { - char *name; - asprintf(&name, "%s@%s", gss_service, host); - input_token.length = strlen(name); - input_token.value = name; - - maj_stat = gss_import_name(&min_stat, - &input_token, - GSS_C_NT_HOSTBASED_SERVICE, - &server); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_inport_name"); - free(name); - input_token.length = 0; - input_token.value = NULL; - } - - i = 9; - while(h[i] && isspace((unsigned char)h[i])) - i++; - if (h[i] != '\0') { - int len = strlen(&h[i]); - if (len == 0) - errx(1, "invalid Negotiate token"); - input_token.value = emalloc(len); - len = base64_decode(&h[i], input_token.value); - if (len < 0) - errx(1, "invalid base64 Negotiate token %s", &h[i]); - input_token.length = len; - } else { - if (gssapi_started) - errx(1, "Negotiate already started"); - gssapi_started = 1; - - input_token.length = 0; - input_token.value = NULL; - } - - maj_stat = - gss_init_sec_context(&min_stat, - GSS_C_NO_CREDENTIAL, - &context_hdl, - server, - mech_oid, - flags, - 0, - GSS_C_NO_CHANNEL_BINDINGS, - &input_token, - NULL, - &output_token, - NULL, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_init_sec_context"); - else if (maj_stat & GSS_S_CONTINUE_NEEDED) - gssapi_done = 0; - else { - gss_name_t targ_name, src_name; - gss_buffer_desc name_buffer; - gss_OID mech_type; - - gssapi_done = 1; - - printf("Negotiate done: %s\n", mech); - - maj_stat = gss_inquire_context(&min_stat, - context_hdl, - &src_name, - &targ_name, - NULL, - &mech_type, - NULL, - NULL, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_inquire_context"); - - maj_stat = gss_display_name(&min_stat, - src_name, - &name_buffer, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_display_name"); - - printf("Source: %.*s\n", - (int)name_buffer.length, - (char *)name_buffer.value); - - gss_release_buffer(&min_stat, &name_buffer); - - maj_stat = gss_display_name(&min_stat, - targ_name, - &name_buffer, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_display_name"); - - printf("Target: %.*s\n", - (int)name_buffer.length, - (char *)name_buffer.value); - - gss_release_name(&min_stat, &targ_name); - gss_release_buffer(&min_stat, &name_buffer); - } - - if (output_token.length) { - char *neg_token; - - base64_encode(output_token.value, - output_token.length, - &neg_token); - - asprintf(&headers[0], "Authorization: Negotiate %s", - neg_token); - - num_headers = 1; - free(neg_token); - gss_release_buffer(&min_stat, &output_token); - } - if (input_token.length) - free(input_token.value); - - } else - done = 1; - } else - done = 1; - - if (verbose_flag) { - printf("%s\n\n", req.response); - - for (i = 0; i < req.num_headers; i++) - printf("%s\n", req.headers[i]); - printf("\n"); - } - if (print_body || verbose_flag) - printf("%.*s\n", (int)req.body_size, (char *)req.body); - - http_req_free(&req); - } while (!done); - - if (gssapi_done == 0) - errx(1, "gssapi not done but http dance done"); - - return 0; -} diff --git a/kerberosV/src/appl/test/nt_gss_client.c b/kerberosV/src/appl/test/nt_gss_client.c deleted file mode 100644 index 9ae673cccdd..00000000000 --- a/kerberosV/src/appl/test/nt_gss_client.c +++ /dev/null @@ -1,167 +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 "test_locl.h" -#include -#include "nt_gss_common.h" - -RCSID("$Id: nt_gss_client.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -/* - * This program tries to act as a client for the sample in `Sample - * SSPI Code' in Windows 2000 RC1 SDK. - */ - -static int -proto (int sock, const char *hostname, const char *service) -{ - struct sockaddr_in remote, local; - socklen_t addrlen; - - int context_established = 0; - gss_ctx_id_t context_hdl = GSS_C_NO_CONTEXT; - gss_buffer_t input_token, output_token; - gss_buffer_desc real_input_token, real_output_token; - OM_uint32 maj_stat, min_stat; - gss_name_t server; - gss_buffer_desc name_token; - char *str; - - name_token.length = asprintf (&str, - "%s@%s", service, hostname); - if (str == NULL) - errx(1, "out of memory"); - name_token.value = str; - - maj_stat = gss_import_name (&min_stat, - &name_token, - GSS_C_NT_HOSTBASED_SERVICE, - &server); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, - "Error importing name `%s@%s':\n", service, hostname); - - addrlen = sizeof(local); - if (getsockname (sock, (struct sockaddr *)&local, &addrlen) < 0 - || addrlen != sizeof(local)) - err (1, "getsockname(%s)", hostname); - - addrlen = sizeof(remote); - if (getpeername (sock, (struct sockaddr *)&remote, &addrlen) < 0 - || addrlen != sizeof(remote)) - err (1, "getpeername(%s)", hostname); - - input_token = &real_input_token; - output_token = &real_output_token; - - input_token->length = 0; - output_token->length = 0; - - while(!context_established) { - maj_stat = - gss_init_sec_context(&min_stat, - GSS_C_NO_CREDENTIAL, - &context_hdl, - server, - GSS_C_NO_OID, - GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG, - 0, - GSS_C_NO_CHANNEL_BINDINGS, - input_token, - NULL, - output_token, - NULL, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_init_sec_context"); - if (output_token->length != 0) - nt_write_token (sock, output_token); - if (GSS_ERROR(maj_stat)) { - if (context_hdl != GSS_C_NO_CONTEXT) - gss_delete_sec_context (&min_stat, - &context_hdl, - GSS_C_NO_BUFFER); - break; - } - if (maj_stat & GSS_S_CONTINUE_NEEDED) { - nt_read_token (sock, input_token); - } else { - context_established = 1; - } - - } - - /* get_mic */ - - input_token->length = 3; - input_token->value = strdup("hej"); - - maj_stat = gss_get_mic(&min_stat, - context_hdl, - GSS_C_QOP_DEFAULT, - input_token, - output_token); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_get_mic"); - - nt_write_token (sock, input_token); - nt_write_token (sock, output_token); - - /* wrap */ - - input_token->length = 7; - input_token->value = "hemligt"; - - - maj_stat = gss_wrap (&min_stat, - context_hdl, - 1, - GSS_C_QOP_DEFAULT, - input_token, - NULL, - output_token); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_wrap"); - - nt_write_token (sock, output_token); - - return 0; -} - -int -main(int argc, char **argv) -{ - krb5_context context; /* XXX */ - int port = client_setup(&context, &argc, argv); - return client_doit (argv[argc], port, service, proto); -} diff --git a/kerberosV/src/appl/test/nt_gss_common.c b/kerberosV/src/appl/test/nt_gss_common.c deleted file mode 100644 index 6f8146e61c9..00000000000 --- a/kerberosV/src/appl/test/nt_gss_common.c +++ /dev/null @@ -1,133 +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 "test_locl.h" -#include -#include "nt_gss_common.h" - -RCSID("$Id: nt_gss_common.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -/* - * These are functions that are needed to interoperate with the - * `Sample SSPI Code' in Windows 2000 RC1 SDK. - */ - -/* - * Write the `gss_buffer_t' in `buf' onto the fd `sock', but remember that - * the length is written in little-endian-order. - */ - -void -nt_write_token (int sock, gss_buffer_t buf) -{ - unsigned char net_len[4]; - uint32_t len; - OM_uint32 min_stat; - - len = buf->length; - - net_len[0] = (len >> 0) & 0xFF; - net_len[1] = (len >> 8) & 0xFF; - net_len[2] = (len >> 16) & 0xFF; - net_len[3] = (len >> 24) & 0xFF; - - if (write (sock, net_len, 4) != 4) - err (1, "write"); - if (write (sock, buf->value, len) != len) - err (1, "write"); - - gss_release_buffer (&min_stat, buf); -} - -/* - * - */ - -void -nt_read_token (int sock, gss_buffer_t buf) -{ - unsigned char net_len[4]; - uint32_t len; - - if (read(sock, net_len, 4) != 4) - err (1, "read"); - len = (net_len[0] << 0) - | (net_len[1] << 8) - | (net_len[2] << 16) - | (net_len[3] << 24); - - buf->length = len; - buf->value = malloc(len); - if (read (sock, buf->value, len) != len) - err (1, "read"); -} - -void -gss_print_errors (int min_stat) -{ - OM_uint32 new_stat; - OM_uint32 msg_ctx = 0; - gss_buffer_desc status_string; - OM_uint32 ret; - - do { - ret = gss_display_status (&new_stat, - min_stat, - GSS_C_MECH_CODE, - GSS_C_NO_OID, - &msg_ctx, - &status_string); - fprintf (stderr, "%.*s\n", - (int)status_string.length, - (char *)status_string.value); - gss_release_buffer (&new_stat, &status_string); - } while (!GSS_ERROR(ret) && msg_ctx != 0); -} - -void -gss_verr(int exitval, int status, const char *fmt, va_list ap) -{ - vwarnx (fmt, ap); - gss_print_errors (status); - exit (exitval); -} - -void -gss_err(int exitval, int status, const char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - gss_verr (exitval, status, fmt, args); - va_end(args); -} diff --git a/kerberosV/src/appl/test/nt_gss_common.h b/kerberosV/src/appl/test/nt_gss_common.h deleted file mode 100644 index 783300eb6b3..00000000000 --- a/kerberosV/src/appl/test/nt_gss_common.h +++ /dev/null @@ -1,45 +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: nt_gss_common.h,v 1.2 2013/06/17 18:57:40 robert Exp $ */ - -void nt_write_token (int sock, gss_buffer_t buf); -void nt_read_token (int sock, gss_buffer_t buf); - -void gss_print_errors (int min_stat); - -void gss_verr(int exitval, int status, const char *fmt, va_list ap) - __attribute__ ((format (printf, 3, 0))); - -void gss_err(int exitval, int status, const char *fmt, ...) - __attribute__ ((format (printf, 3, 4))); diff --git a/kerberosV/src/appl/test/nt_gss_server.c b/kerberosV/src/appl/test/nt_gss_server.c deleted file mode 100644 index f7229af6fa6..00000000000 --- a/kerberosV/src/appl/test/nt_gss_server.c +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "test_locl.h" -#include -#include -#include -#include -#include "nt_gss_common.h" - -RCSID("$Id: nt_gss_server.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -/* - * This program tries to act as a server for the sample in `Sample - * SSPI Code' in Windows 2000 RC1 SDK. - * - * use --dump-auth to get a binary dump of the authorization data in the ticket - */ - -static int help_flag; -static int version_flag; -static char *port_str; -char *service = SERVICE; -static char *auth_file; - -static struct getargs args[] = { - { "port", 'p', arg_string, &port_str, "port to listen to", "port" }, - { "service", 's', arg_string, &service, "service to use", "service" }, - { "dump-auth", 0, arg_string, &auth_file, "dump authorization data", - "file" }, - { "help", 'h', arg_flag, &help_flag }, - { "version", 0, arg_flag, &version_flag } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -static int -proto (int sock, const char *service) -{ - struct sockaddr_in remote, local; - socklen_t addrlen; - gss_ctx_id_t context_hdl = GSS_C_NO_CONTEXT; - gss_buffer_t input_token, output_token; - gss_buffer_desc real_input_token, real_output_token; - OM_uint32 maj_stat, min_stat; - gss_name_t client_name; - gss_buffer_desc name_token; - - addrlen = sizeof(local); - if (getsockname (sock, (struct sockaddr *)&local, &addrlen) < 0 - || addrlen != sizeof(local)) - err (1, "getsockname)"); - - addrlen = sizeof(remote); - if (getpeername (sock, (struct sockaddr *)&remote, &addrlen) < 0 - || addrlen != sizeof(remote)) - err (1, "getpeername"); - - input_token = &real_input_token; - output_token = &real_output_token; - - do { - nt_read_token (sock, input_token); - maj_stat = - gss_accept_sec_context (&min_stat, - &context_hdl, - GSS_C_NO_CREDENTIAL, - input_token, - GSS_C_NO_CHANNEL_BINDINGS, - &client_name, - NULL, - output_token, - NULL, - NULL, - NULL); - if(GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_accept_sec_context"); - if (output_token->length != 0) - nt_write_token (sock, output_token); - if (GSS_ERROR(maj_stat)) { - if (context_hdl != GSS_C_NO_CONTEXT) - gss_delete_sec_context (&min_stat, - &context_hdl, - GSS_C_NO_BUFFER); - break; - } - } while(maj_stat & GSS_S_CONTINUE_NEEDED); - - if (auth_file != NULL) { - gss_buffer_desc data; - - maj_stat = gsskrb5_extract_authz_data_from_sec_context(&min_stat, - context_hdl, - KRB5_AUTHDATA_WIN2K_PAC, - &data); - if (maj_stat == GSS_S_COMPLETE) { - rk_dumpdata(auth_file, data.value, data.length); - gss_release_buffer(&min_stat, &data); - } - } - - maj_stat = gss_display_name (&min_stat, - client_name, - &name_token, - NULL); - if (GSS_ERROR(maj_stat)) - gss_err (1, min_stat, "gss_display_name"); - - fprintf (stderr, "User is `%.*s'\n", (int)name_token.length, - (char *)name_token.value); - - /* write something back */ - - output_token->value = strdup ("hejsan"); - output_token->length = strlen (output_token->value) + 1; - nt_write_token (sock, output_token); - - output_token->value = strdup ("hoppsan"); - output_token->length = strlen (output_token->value) + 1; - nt_write_token (sock, output_token); - - return 0; -} - -static int -doit (int port, const char *service) -{ - int sock, sock2; - struct sockaddr_in my_addr; - int one = 1; - - sock = socket (AF_INET, SOCK_STREAM, 0); - if (sock < 0) - err (1, "socket"); - - memset (&my_addr, 0, sizeof(my_addr)); - my_addr.sin_family = AF_INET; - my_addr.sin_port = port; - my_addr.sin_addr.s_addr = INADDR_ANY; - - if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, - (void *)&one, sizeof(one)) < 0) - warn ("setsockopt SO_REUSEADDR"); - - if (bind (sock, (struct sockaddr *)&my_addr, sizeof(my_addr)) < 0) - err (1, "bind"); - - if (listen (sock, 1) < 0) - err (1, "listen"); - - sock2 = accept (sock, NULL, NULL); - if (sock2 < 0) - err (1, "accept"); - - return proto (sock2, service); -} - -static void -usage(int code, struct getargs *args, int num_args) -{ - arg_printusage(args, num_args, NULL, ""); - exit(code); -} - -static int -common_setup(krb5_context *context, int *argc, char **argv, - void (*usage)(int, struct getargs*, int)) -{ - int port = 0; - *argc = krb5_program_setup(context, *argc, argv, args, num_args, usage); - - if(help_flag) - (*usage)(0, args, num_args); - if(version_flag) { - print_version(NULL); - exit(0); - } - - 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) - port = krb5_getportbyname (*context, PORT, "tcp", 4711); - - return port; -} - -static int -setup(krb5_context *context, int argc, char **argv) -{ - int port = common_setup(context, &argc, argv, usage); - if(argv[argc] != NULL) - usage(1, args, num_args); - return port; -} - -int -main(int argc, char **argv) -{ - krb5_context context = NULL; /* XXX */ - int port = setup(&context, argc, argv); - return doit (port, service); -} diff --git a/kerberosV/src/appl/test/tcp_client.c b/kerberosV/src/appl/test/tcp_client.c deleted file mode 100644 index c04e6e31e60..00000000000 --- a/kerberosV/src/appl/test/tcp_client.c +++ /dev/null @@ -1,132 +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 "test_locl.h" -RCSID("$Id: tcp_client.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -krb5_context context; - -static int -proto (int sock, const char *hostname, const char *service) -{ - krb5_auth_context auth_context; - krb5_error_code status; - krb5_principal server; - krb5_data data; - krb5_data packet; - uint32_t len, net_len; - - status = krb5_auth_con_init (context, &auth_context); - if (status) - krb5_err (context, 1, status, "krb5_auth_con_init"); - - status = krb5_auth_con_setaddrs_from_fd (context, - auth_context, - &sock); - if (status) - krb5_err (context, 1, status, "krb5_auth_con_setaddrs_from_fd"); - - status = krb5_sname_to_principal (context, - hostname, - service, - KRB5_NT_SRV_HST, - &server); - if (status) - krb5_err (context, 1, status, "krb5_sname_to_principal"); - - status = krb5_sendauth (context, - &auth_context, - &sock, - VERSION, - NULL, - server, - AP_OPTS_MUTUAL_REQUIRED, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL); - if (status) - krb5_err (context, 1, status, "krb5_sendauth"); - - data.data = "hej"; - data.length = 3; - - krb5_data_zero (&packet); - - status = krb5_mk_safe (context, - auth_context, - &data, - &packet, - NULL); - if (status) - krb5_err (context, 1, status, "krb5_mk_safe"); - - len = packet.length; - net_len = htonl(len); - - if (krb5_net_write (context, &sock, &net_len, 4) != 4) - err (1, "krb5_net_write"); - if (krb5_net_write (context, &sock, packet.data, len) != len) - err (1, "krb5_net_write"); - - data.data = "hemligt"; - data.length = 7; - - krb5_data_free (&packet); - - status = krb5_mk_priv (context, - auth_context, - &data, - &packet, - NULL); - if (status) - krb5_err (context, 1, status, "krb5_mk_priv"); - - len = packet.length; - net_len = htonl(len); - - if (krb5_net_write (context, &sock, &net_len, 4) != 4) - err (1, "krb5_net_write"); - if (krb5_net_write (context, &sock, packet.data, len) != len) - err (1, "krb5_net_write"); - return 0; -} - -int -main(int argc, char **argv) -{ - int port = client_setup(&context, &argc, argv); - return client_doit (argv[argc], port, service, proto); -} diff --git a/kerberosV/src/appl/test/tcp_server.c b/kerberosV/src/appl/test/tcp_server.c deleted file mode 100644 index ba1fb76f69a..00000000000 --- a/kerberosV/src/appl/test/tcp_server.c +++ /dev/null @@ -1,168 +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 "test_locl.h" -RCSID("$Id: tcp_server.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -krb5_context context; - -static int -proto (int sock, const char *service) -{ - krb5_auth_context auth_context; - krb5_error_code status; - krb5_principal server; - krb5_ticket *ticket; - char *name; - char hostname[MAXHOSTNAMELEN]; - krb5_data packet; - krb5_data data; - uint32_t len, net_len; - ssize_t n; - - status = krb5_auth_con_init (context, &auth_context); - if (status) - krb5_err (context, 1, status, "krb5_auth_con_init"); - - status = krb5_auth_con_setaddrs_from_fd (context, - auth_context, - &sock); - - if (status) - krb5_err (context, 1, status, "krb5_auth_con_setaddrs_from_fd"); - - if(gethostname (hostname, sizeof(hostname)) < 0) - krb5_err (context, 1, errno, "gethostname"); - - status = krb5_sname_to_principal (context, - hostname, - service, - KRB5_NT_SRV_HST, - &server); - if (status) - krb5_err (context, 1, status, "krb5_sname_to_principal"); - - status = krb5_recvauth (context, - &auth_context, - &sock, - VERSION, - server, - 0, - keytab, - &ticket); - if (status) - krb5_err (context, 1, status, "krb5_recvauth"); - - status = krb5_unparse_name (context, - ticket->client, - &name); - if (status) - krb5_err (context, 1, status, "krb5_unparse_name"); - - fprintf (stderr, "User is `%s'\n", name); - free (name); - - krb5_data_zero (&data); - krb5_data_zero (&packet); - - n = krb5_net_read (context, &sock, &net_len, 4); - if (n == 0) - krb5_errx (context, 1, "EOF in krb5_net_read"); - if (n < 0) - krb5_err (context, 1, errno, "krb5_net_read"); - - len = ntohl(net_len); - - krb5_data_alloc (&packet, len); - - n = krb5_net_read (context, &sock, packet.data, len); - if (n == 0) - krb5_errx (context, 1, "EOF in krb5_net_read"); - if (n < 0) - krb5_err (context, 1, errno, "krb5_net_read"); - - status = krb5_rd_safe (context, - auth_context, - &packet, - &data, - NULL); - if (status) - krb5_err (context, 1, status, "krb5_rd_safe"); - - fprintf (stderr, "safe packet: %.*s\n", (int)data.length, - (char *)data.data); - - n = krb5_net_read (context, &sock, &net_len, 4); - if (n == 0) - krb5_errx (context, 1, "EOF in krb5_net_read"); - if (n < 0) - krb5_err (context, 1, errno, "krb5_net_read"); - - len = ntohl(net_len); - - krb5_data_alloc (&packet, len); - - n = krb5_net_read (context, &sock, packet.data, len); - if (n == 0) - krb5_errx (context, 1, "EOF in krb5_net_read"); - if (n < 0) - krb5_err (context, 1, errno, "krb5_net_read"); - - status = krb5_rd_priv (context, - auth_context, - &packet, - &data, - NULL); - if (status) - krb5_err (context, 1, status, "krb5_rd_priv"); - - fprintf (stderr, "priv packet: %.*s\n", (int)data.length, - (char *)data.data); - - return 0; -} - -static int -doit (int port, const char *service) -{ - mini_inetd (port, NULL); - - return proto (STDIN_FILENO, service); -} - -int -main(int argc, char **argv) -{ - int port = server_setup(&context, argc, argv); - return doit (port, service); -} diff --git a/kerberosV/src/appl/test/test_locl.h b/kerberosV/src/appl/test/test_locl.h deleted file mode 100644 index 25795f3f65e..00000000000 --- a/kerberosV/src/appl/test/test_locl.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: test_locl.h,v 1.2 2013/06/17 18:57:40 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif - -#ifdef HAVE_PWD_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#include -#include -#include -#include -#include - -#define SERVICE "test" - -#define PORT "test" - -extern char *service; -extern char *mech; -extern krb5_keytab keytab; -extern int fork_flag; -int server_setup(krb5_context*, int, char**); -int client_setup(krb5_context*, int*, char**); -int client_doit (const char *hostname, int port, const char *service, - int (*func)(int, const char *hostname, const char *service)); diff --git a/kerberosV/src/appl/test/uu_client.c b/kerberosV/src/appl/test/uu_client.c deleted file mode 100644 index dfb0c09fa45..00000000000 --- a/kerberosV/src/appl/test/uu_client.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "test_locl.h" -RCSID("$Id: uu_client.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -krb5_context context; - -static int -proto (int sock, const char *hostname, const char *service) -{ - struct sockaddr_in remote, local; - socklen_t addrlen; - krb5_address remote_addr, local_addr; - krb5_context context; - krb5_ccache ccache; - krb5_auth_context auth_context; - krb5_error_code status; - krb5_principal client; - krb5_data data; - krb5_data packet; - krb5_creds mcred, cred; - krb5_ticket *ticket; - - addrlen = sizeof(local); - if (getsockname (sock, (struct sockaddr *)&local, &addrlen) < 0 - || addrlen != sizeof(local)) - err (1, "getsockname(%s)", hostname); - - addrlen = sizeof(remote); - if (getpeername (sock, (struct sockaddr *)&remote, &addrlen) < 0 - || addrlen != sizeof(remote)) - err (1, "getpeername(%s)", hostname); - - status = krb5_init_context(&context); - if (status) - errx(1, "krb5_init_context failed: %d", status); - - status = krb5_cc_default (context, &ccache); - if (status) - krb5_err(context, 1, status, "krb5_cc_default"); - - status = krb5_auth_con_init (context, &auth_context); - if (status) - krb5_err(context, 1, status, "krb5_auth_con_init"); - - local_addr.addr_type = AF_INET; - local_addr.address.length = sizeof(local.sin_addr); - local_addr.address.data = &local.sin_addr; - - remote_addr.addr_type = AF_INET; - remote_addr.address.length = sizeof(remote.sin_addr); - remote_addr.address.data = &remote.sin_addr; - - status = krb5_auth_con_setaddrs (context, - auth_context, - &local_addr, - &remote_addr); - if (status) - krb5_err(context, 1, status, "krb5_auth_con_setaddr"); - - krb5_cc_clear_mcred(&mcred); - - status = krb5_cc_get_principal(context, ccache, &client); - if(status) - krb5_err(context, 1, status, "krb5_cc_get_principal"); - status = krb5_make_principal(context, &mcred.server, - krb5_principal_get_realm(context, client), - "krbtgt", - krb5_principal_get_realm(context, client), - NULL); - if(status) - krb5_err(context, 1, status, "krb5_make_principal"); - mcred.client = client; - - status = krb5_cc_retrieve_cred(context, ccache, 0, &mcred, &cred); - if(status) - krb5_err(context, 1, status, "krb5_cc_retrieve_cred"); - - { - char *client_name; - krb5_data data; - status = krb5_unparse_name(context, cred.client, &client_name); - if(status) - krb5_err(context, 1, status, "krb5_unparse_name"); - data.data = client_name; - data.length = strlen(client_name) + 1; - status = krb5_write_message(context, &sock, &data); - if(status) - krb5_err(context, 1, status, "krb5_write_message"); - free(client_name); - } - - status = krb5_write_message(context, &sock, &cred.ticket); - if(status) - krb5_err(context, 1, status, "krb5_write_message"); - - status = krb5_auth_con_setuserkey(context, auth_context, &cred.session); - if(status) - krb5_err(context, 1, status, "krb5_auth_con_setuserkey"); - - status = krb5_recvauth(context, &auth_context, &sock, - VERSION, client, 0, NULL, &ticket); - - if (status) - krb5_err(context, 1, status, "krb5_recvauth"); - - if (ticket->ticket.authorization_data) { - AuthorizationData *authz; - int i; - - printf("Authorization data:\n"); - - authz = ticket->ticket.authorization_data; - for (i = 0; i < authz->len; i++) { - printf("\ttype %d, length %lu\n", - authz->val[i].ad_type, - (unsigned long)authz->val[i].ad_data.length); - } - } - - data.data = "hej"; - data.length = 3; - - krb5_data_zero (&packet); - - status = krb5_mk_safe (context, - auth_context, - &data, - &packet, - NULL); - if (status) - krb5_err(context, 1, status, "krb5_mk_safe"); - - status = krb5_write_message(context, &sock, &packet); - if(status) - krb5_err(context, 1, status, "krb5_write_message"); - - data.data = "hemligt"; - data.length = 7; - - krb5_data_free (&packet); - - status = krb5_mk_priv (context, - auth_context, - &data, - &packet, - NULL); - if (status) - krb5_err(context, 1, status, "krb5_mk_priv"); - - status = krb5_write_message(context, &sock, &packet); - if(status) - krb5_err(context, 1, status, "krb5_write_message"); - return 0; -} - -int -main(int argc, char **argv) -{ - int port = client_setup(&context, &argc, argv); - return client_doit (argv[argc], port, service, proto); -} diff --git a/kerberosV/src/appl/test/uu_server.c b/kerberosV/src/appl/test/uu_server.c deleted file mode 100644 index efcbed81e79..00000000000 --- a/kerberosV/src/appl/test/uu_server.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 1997 - 2000, 2007 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 "test_locl.h" -RCSID("$Id: uu_server.c,v 1.2 2013/06/17 18:57:40 robert Exp $"); - -krb5_context context; - -static int -proto (int sock, const char *service) -{ - struct sockaddr_in remote, local; - socklen_t addrlen; - krb5_address remote_addr, local_addr; - krb5_ccache ccache; - krb5_auth_context auth_context; - krb5_error_code status; - krb5_data packet; - krb5_data data; - krb5_data client_name; - krb5_creds in_creds, *out_creds; - - addrlen = sizeof(local); - if (getsockname (sock, (struct sockaddr *)&local, &addrlen) < 0 - || addrlen != sizeof(local)) - err (1, "getsockname)"); - - addrlen = sizeof(remote); - if (getpeername (sock, (struct sockaddr *)&remote, &addrlen) < 0 - || addrlen != sizeof(remote)) - err (1, "getpeername"); - - status = krb5_auth_con_init (context, &auth_context); - if (status) - krb5_err(context, 1, status, "krb5_auth_con_init"); - - local_addr.addr_type = AF_INET; - local_addr.address.length = sizeof(local.sin_addr); - local_addr.address.data = &local.sin_addr; - - remote_addr.addr_type = AF_INET; - remote_addr.address.length = sizeof(remote.sin_addr); - remote_addr.address.data = &remote.sin_addr; - - status = krb5_auth_con_setaddrs (context, - auth_context, - &local_addr, - &remote_addr); - if (status) - krb5_err(context, 1, status, "krb5_auth_con_setaddr"); - - status = krb5_read_message(context, &sock, &client_name); - if(status) - krb5_err(context, 1, status, "krb5_read_message"); - - memset(&in_creds, 0, sizeof(in_creds)); - status = krb5_cc_default(context, &ccache); - if(status) - krb5_err(context, 1, status, "krb5_cc_default"); - status = krb5_cc_get_principal(context, ccache, &in_creds.client); - if(status) - krb5_err(context, 1, status, "krb5_cc_get_principal"); - - status = krb5_read_message(context, &sock, &in_creds.second_ticket); - if(status) - krb5_err(context, 1, status, "krb5_read_message"); - - status = krb5_parse_name(context, client_name.data, &in_creds.server); - if(status) - krb5_err(context, 1, status, "krb5_parse_name"); - - status = krb5_get_credentials(context, KRB5_GC_USER_USER, ccache, - &in_creds, &out_creds); - if(status) - krb5_err(context, 1, status, "krb5_get_credentials"); - - status = krb5_cc_default(context, &ccache); - if(status) - krb5_err(context, 1, status, "krb5_cc_default"); - - status = krb5_sendauth(context, - &auth_context, - &sock, - VERSION, - in_creds.client, - in_creds.server, - AP_OPTS_USE_SESSION_KEY, - NULL, - out_creds, - ccache, - NULL, - NULL, - NULL); - - if (status) - krb5_err(context, 1, status, "krb5_sendauth"); - - { - char *str; - krb5_unparse_name(context, in_creds.server, &str); - printf ("User is `%s'\n", str); - free(str); - krb5_unparse_name(context, in_creds.client, &str); - printf ("Server is `%s'\n", str); - free(str); - } - - krb5_data_zero (&data); - krb5_data_zero (&packet); - - status = krb5_read_message(context, &sock, &packet); - if(status) - krb5_err(context, 1, status, "krb5_read_message"); - - status = krb5_rd_safe (context, - auth_context, - &packet, - &data, - NULL); - if (status) - krb5_err(context, 1, status, "krb5_rd_safe"); - - printf ("safe packet: %.*s\n", (int)data.length, - (char *)data.data); - - status = krb5_read_message(context, &sock, &packet); - if(status) - krb5_err(context, 1, status, "krb5_read_message"); - - status = krb5_rd_priv (context, - auth_context, - &packet, - &data, - NULL); - if (status) - krb5_err(context, 1, status, "krb5_rd_priv"); - - printf ("priv packet: %.*s\n", (int)data.length, - (char *)data.data); - - return 0; -} - -static int -doit (int port, const char *service) -{ - int sock, sock2; - struct sockaddr_in my_addr; - int one = 1; - - sock = socket (AF_INET, SOCK_STREAM, 0); - if (sock < 0) - err (1, "socket"); - - memset (&my_addr, 0, sizeof(my_addr)); - my_addr.sin_family = AF_INET; - my_addr.sin_port = port; - my_addr.sin_addr.s_addr = INADDR_ANY; - - if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, - (void *)&one, sizeof(one)) < 0) - warn ("setsockopt SO_REUSEADDR"); - - if (bind (sock, (struct sockaddr *)&my_addr, sizeof(my_addr)) < 0) - err (1, "bind"); - - if (listen (sock, 1) < 0) - err (1, "listen"); - - sock2 = accept (sock, NULL, NULL); - if (sock2 < 0) - err (1, "accept"); - - return proto (sock2, service); -} - -int -main(int argc, char **argv) -{ - int port = server_setup(&context, argc, argv); - return doit (port, service); -} diff --git a/kerberosV/src/appl/xnlock/ChangeLog b/kerberosV/src/appl/xnlock/ChangeLog deleted file mode 100644 index c1188ef08dc..00000000000 --- a/kerberosV/src/appl/xnlock/ChangeLog +++ /dev/null @@ -1,159 +0,0 @@ -2007-07-28 Love Hörnquist Åstrand - - * xnlock.c: Add --help. - -2006-10-21 Love Hörnquist Åstrand - - * xnlock.c: Don't include , its x11's "roken.h" and we - do that just fine ourself thanks. - -2006-05-13 Love Hörnquist Åstrand - - * xnlock.c (main): argc_in_out argument to XtVaAppInitialize - should be an 'int *' accoring to manpage and headerfile, so remove - the cast added in 1996 - (rev 1.54) - -2005-10-22 Love Hörnquist Åstrand - - * xnlock.c: Check return value from asprintf instead of string != - NULL since it undefined behavior on Linux. From Björn Sandell - -2005-04-06 Love Hörnquist Åstrand - - * xnlock.c: use NULL as last argument to execl, not 0 - -2005-01-09 Love Hörnquist Åstrand - - * xnlock.c: get_v4_tgt only used when compileing with kerberos 4 - support - -2004-09-08 Johan Danielsson - - * xnlock.c: use krb5_appdefault_boolean instead of - krb5_config_get_bool - -2004-03-22 Johan Danielsson - - * xnlock.c: protect the world from des_encrypt in crypt.h - -2004-03-01 Love Hörnquist Åstrand - - * xnlock.c: include , From: Fredrik Ljungberg - - -2003-09-30 Love Hörnquist Åstrand - - * xnlock.c (verify_krb5): set mcred.client too - -2003-08-25 Johan Danielsson - - * Makefile.am: fix automake conditional foo - -2003-08-16 Love Hörnquist Åstrand - - * Makefile.am: Don't do local checks on xnlock, it only passes if - there is a working X11 socket, XXX should really be fixed in - xnlock - -2003-07-07 Love Hörnquist Åstrand - - * xnlock.c (verify_krb5): use krb5_cc_clear_mcred - -2003-05-06 Johan Danielsson - - * no checks here - -2003-04-29 Love Hörnquist Åstrand - - * xnlock.c: include kafs.h in the krb5 case - -2003-04-14 Love Hörnquist Åstrand - - * xnlock.c (GetPasswd): cast argument to isprint to unsigned char, - From Christian Biere via NetBSD - -2003-03-18 Love Hörnquist Åstrand - - * xnlock.c: do krb5_afslog when compling with afs support - -2003-02-10 Assar Westerlund - - * xnlock.c (verify): move ret to where it's used - -2002-08-23 Assar Westerlund - - * xnlock.c: add --version as a special case - -2001-06-24 Assar Westerlund - - * xnlock.c (verify_krb5): remove unused variable - -2001-03-15 Johan Danielsson - - * xnlock.c: don't explicitly set the krb4 ticket file - -2000-12-31 Assar Westerlund - - * xnlock.c (main): handle krb5_init_context failure consistently - -2000-07-17 Johan Danielsson - - * Makefile.am: use conditional for X - -2000-04-09 Assar Westerlund - - * xnlock.c (verfiy_krb5): get the v4-realm from the v5-ticket and - not from the default one. - * xnlock.c (verify_krb5): add obtainting of v4 tickets. - -1999-11-17 Assar Westerlund - - * Makefile.am: only build when we have X11. From: Simon Josefsson - - -Thu Mar 18 11:21:44 1999 Johan Danielsson - - * Makefile.am: include Makefile.am.common - -Wed Mar 17 23:35:51 1999 Assar Westerlund - - * xnlock.c (verify): use KRB_VERIFY_SECURE instead of 1 - -Tue Mar 16 22:29:14 1999 Assar Westerlund - - * xnlock.c: krb_verify_user_multiple -> krb_verify_user - -Thu Mar 11 14:59:20 1999 Johan Danielsson - - * xnlock.c: add some if-braces to keep gcc happy - -Sun Nov 22 10:36:45 1998 Assar Westerlund - - * Makefile.in (WFLAGS): set - -Wed Jul 8 01:37:37 1998 Assar Westerlund - - * xnlock.c (main): create place-holder ticket file with - open(O_EXCL | O_CREAT) instead of creat - -Sat Mar 28 12:53:46 1998 Assar Westerlund - - * Makefile.in (install, uninstall): transform the man page - -Tue Mar 24 05:20:34 1998 Assar Westerlund - - * xnlock.c: remove redundant preprocessor stuff - -Sat Mar 21 14:36:21 1998 Assar Westerlund - - * xnlock.c (init_words): recognize both `-p' and `-prog' - -Sat Feb 7 10:08:07 1998 Assar Westerlund - - * xnlock.c: Don't use REALM_SZ + 1, just REALM_SZ - -Sat Nov 29 04:58:19 1997 Johan Danielsson - - * xnlock.c: Make it build w/o krb4. - diff --git a/kerberosV/src/appl/xnlock/Makefile.am b/kerberosV/src/appl/xnlock/Makefile.am deleted file mode 100644 index 76d10a422a9..00000000000 --- a/kerberosV/src/appl/xnlock/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:38 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(X_CFLAGS) - -WFLAGS += $(WFLAGS_NOIMPLICITINT) - -if HAVE_X - -bin_PROGRAMS = xnlock - -else - -bin_PROGRAMS = - -endif - -CHECK_LOCAL = no-check-local - -man_MANS = xnlock.1 - -EXTRA_DIST = $(man_MANS) nose.0.left nose.0.right nose.1.left nose.1.right \ - nose.down nose.front nose.left.front nose.right.front \ - NTMakefile - -LDADD = \ - $(LIB_kafs) \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(X_LIBS) -lXt $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) diff --git a/kerberosV/src/appl/xnlock/Makefile.in b/kerberosV/src/appl/xnlock/Makefile.in deleted file mode 100644 index 23b751a0985..00000000000 --- a/kerberosV/src/appl/xnlock/Makefile.in +++ /dev/null @@ -1,961 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:38 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -@HAVE_X_TRUE@bin_PROGRAMS = xnlock$(EXEEXT) -subdir = appl/xnlock -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" -PROGRAMS = $(bin_PROGRAMS) -xnlock_SOURCES = xnlock.c -xnlock_OBJECTS = xnlock.$(OBJEXT) -xnlock_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/lib/kafs/libkafs.la \ - $(am__DEPENDENCIES_1) -xnlock_DEPENDENCIES = $(am__DEPENDENCIES_2) $(LIB_krb5) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = xnlock.c -DIST_SOURCES = xnlock.c -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -man1dir = $(mandir)/man1 -MANS = $(man_MANS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ $(WFLAGS_NOIMPLICITINT) -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(X_CFLAGS) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -CHECK_LOCAL = no-check-local -man_MANS = xnlock.1 -EXTRA_DIST = $(man_MANS) nose.0.left nose.0.right nose.1.left nose.1.right \ - nose.down nose.front nose.left.front nose.right.front \ - NTMakefile - -LDADD = \ - $(LIB_kafs) \ - $(LIB_krb5) \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(X_LIBS) -lXt $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign appl/xnlock/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign appl/xnlock/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -xnlock$(EXEEXT): $(xnlock_OBJECTS) $(xnlock_DEPENDENCIES) - @rm -f xnlock$(EXEEXT) - $(LINK) $(xnlock_OBJECTS) $(xnlock_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xnlock.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man1 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-binPROGRAMS clean-generic clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-hook \ - uninstall-man uninstall-man1 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/appl/xnlock/NTMakefile b/kerberosV/src/appl/xnlock/NTMakefile deleted file mode 100644 index 16f305b882a..00000000000 --- a/kerberosV/src/appl/xnlock/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=appl\xnlock - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/appl/xnlock/README b/kerberosV/src/appl/xnlock/README deleted file mode 100644 index 5b16c522fd6..00000000000 --- a/kerberosV/src/appl/xnlock/README +++ /dev/null @@ -1,21 +0,0 @@ -xnlock -- Dan Heller, 1990 -"nlock" is a "new lockscreen" type program... something that prevents -screen burnout by making most of it "black" while providing something -of interest to be displayed in case anyone is watching. The program -also provides added security. - -"xnlock" is the X11 version of the program. - -Original sunview version written by Dan Heller 1985 (not included). - -For a real description of how this program works, read the -man page or just try running it. - -The one major outstanding bug with this program is that every -once in a while, two horizontal lines appear below the little -figure that runs around the screen. If someone can find and -fix this bug, *please* let me know -- I don't have time to -look and if I waited till I had time, you'd never see this -program... It has something to do with the "looking down" -position and then directly moving up and right or left... - diff --git a/kerberosV/src/appl/xnlock/nose.0.left b/kerberosV/src/appl/xnlock/nose.0.left deleted file mode 100644 index cb3d152863a..00000000000 --- a/kerberosV/src/appl/xnlock/nose.0.left +++ /dev/null @@ -1,38 +0,0 @@ -#define nose_0_left_width 64 -#define nose_0_left_height 64 -static unsigned char nose_0_left_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x40,0x00, - 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40, - 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00, - 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, - 0x08,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x20,0x00, - 0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xf0,0x03,0x00,0x00,0x80,0x00, - 0x00,0x00,0x0e,0x0c,0x00,0x00,0x80,0x01,0x00,0x00,0x03,0x30,0x00,0x00,0x00, - 0x01,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x40,0x00,0xc0,0x00,0x00, - 0x00,0x02,0x00,0x20,0x00,0x80,0x00,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00, - 0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x08,0x00,0x00, - 0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00, - 0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08, - 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00, - 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10, - 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x01,0x00,0x00, - 0x18,0x00,0x20,0x00,0x00,0x01,0x00,0x00,0x08,0x00,0x40,0x00,0x80,0x00,0x00, - 0x00,0x08,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x0c,0x00,0x00,0x01,0x20,0x00, - 0x00,0x00,0x04,0x00,0x00,0x06,0x18,0x00,0x00,0x00,0x06,0x00,0x00,0xf8,0x07, - 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00, - 0x00,0xff,0x00,0x04,0x10,0x00,0x00,0x00,0xc0,0x00,0x03,0x03,0x10,0x00,0x00, - 0x00,0x30,0x00,0x0c,0x01,0x20,0x00,0x00,0x00,0x08,0x00,0x98,0x00,0x20,0x00, - 0x00,0x00,0x0c,0x03,0x60,0x00,0x20,0x00,0x00,0x00,0xc2,0x00,0xc0,0x00,0x20, - 0x00,0x00,0x00,0x42,0x00,0x80,0x00,0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x01, - 0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x21,0x00,0x00, - 0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x01,0x00, - 0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02, - 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00, - 0x18,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x10,0x00,0x00, - 0x00,0xc0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00}; diff --git a/kerberosV/src/appl/xnlock/nose.0.right b/kerberosV/src/appl/xnlock/nose.0.right deleted file mode 100644 index f387baa7304..00000000000 --- a/kerberosV/src/appl/xnlock/nose.0.right +++ /dev/null @@ -1,38 +0,0 @@ -#define nose_0_right_width 64 -#define nose_0_right_height 64 -static unsigned char nose_0_right_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00, - 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20, - 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00, - 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00, - 0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x0f, - 0x00,0x00,0x80,0x01,0x00,0x00,0x30,0x70,0x00,0x00,0x80,0x00,0x00,0x00,0x0c, - 0xc0,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x40,0x00,0x00,0x00, - 0x03,0x00,0x02,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x20,0x00,0x00, - 0x00,0x00,0x00,0x08,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00, - 0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08, - 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00, - 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10, - 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00, - 0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x18,0x00,0x00,0x80,0x00, - 0x00,0x08,0x00,0x10,0x00,0x00,0x80,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00, - 0x01,0x00,0x02,0x00,0x30,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x20,0x00,0x00, - 0x00,0x04,0x80,0x00,0x00,0x60,0x00,0x00,0x00,0x18,0x60,0x00,0x00,0x40,0x00, - 0x00,0x00,0xe0,0x1f,0x00,0x00,0x80,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00, - 0x00,0x08,0x20,0x00,0xff,0x00,0x00,0x00,0x00,0x08,0xc0,0xc0,0x00,0x03,0x00, - 0x00,0x00,0x04,0x80,0x30,0x00,0x0c,0x00,0x00,0x00,0x04,0x00,0x19,0x00,0x10, - 0x00,0x00,0x00,0x04,0x00,0x06,0xc0,0x30,0x00,0x00,0x00,0x04,0x00,0x03,0x00, - 0x43,0x00,0x00,0x00,0x04,0x00,0x01,0x00,0x42,0x00,0x00,0x00,0x04,0x80,0x00, - 0x00,0x84,0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x84,0x00,0x00,0x00,0x04,0x00, - 0x00,0x00,0x84,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02, - 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00, - 0x00,0x04,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0e,0x00, - 0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00}; diff --git a/kerberosV/src/appl/xnlock/nose.1.left b/kerberosV/src/appl/xnlock/nose.1.left deleted file mode 100644 index 8a6b8295261..00000000000 --- a/kerberosV/src/appl/xnlock/nose.1.left +++ /dev/null @@ -1,38 +0,0 @@ -#define nose_1_left_width 64 -#define nose_1_left_height 64 -static unsigned char nose_1_left_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x40,0x00, - 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40, - 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00, - 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, - 0x08,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x20,0x00, - 0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00,0xf0,0x03,0x00,0x00,0x80,0x00, - 0x00,0x00,0x0e,0x0c,0x00,0x00,0x80,0x01,0x00,0x00,0x03,0x30,0x00,0x00,0x00, - 0x01,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x40,0x00,0xc0,0x00,0x00, - 0x00,0x02,0x00,0x20,0x00,0x80,0x00,0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00, - 0x00,0x00,0x04,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x08,0x00,0x00, - 0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x08,0x00, - 0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08, - 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00, - 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10, - 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x01,0x00,0x00, - 0x18,0x00,0x10,0x00,0x00,0x01,0x00,0x00,0x08,0x00,0x20,0x00,0x80,0x00,0x00, - 0x00,0x08,0x00,0x40,0x00,0x40,0x00,0x00,0x00,0x0c,0x00,0x80,0x00,0x20,0x00, - 0x00,0x00,0xe4,0x00,0x00,0x03,0x18,0x00,0x00,0x00,0x26,0x03,0x00,0xfc,0x07, - 0x00,0x00,0x00,0x12,0x0c,0x00,0x00,0xf8,0xff,0xff,0xff,0x11,0x10,0x80,0x1f, - 0x00,0x00,0x00,0x00,0x08,0x20,0x60,0x60,0xc0,0x07,0x00,0x00,0x04,0x40,0x10, - 0xc0,0x20,0x08,0x00,0x1f,0x02,0x40,0x08,0x00,0x21,0x10,0xc0,0x60,0x02,0x40, - 0x04,0x00,0x12,0x20,0x20,0x80,0x02,0x20,0xc2,0x00,0x14,0x40,0x18,0x00,0x03, - 0x20,0x22,0x00,0x0c,0x80,0x04,0x03,0x02,0x10,0x12,0x00,0x08,0x80,0x86,0x00, - 0x04,0x10,0x12,0x00,0x10,0x80,0x42,0x00,0x18,0x08,0x12,0x00,0x10,0x40,0x42, - 0x00,0x00,0x04,0x02,0x00,0x20,0x40,0x42,0x00,0x00,0x04,0x02,0x00,0x00,0x20, - 0x42,0x00,0x00,0x02,0x04,0x00,0x00,0x20,0x02,0x00,0x00,0x01,0x04,0x00,0x00, - 0x20,0x02,0x00,0x00,0x01,0x08,0x00,0x00,0x20,0x04,0x00,0x80,0x00,0x10,0x00, - 0x00,0x20,0x0c,0x00,0x80,0x00,0x60,0x00,0x00,0x10,0x08,0x00,0x40,0x00,0x80, - 0xff,0xff,0x0f,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x0f,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00}; diff --git a/kerberosV/src/appl/xnlock/nose.1.right b/kerberosV/src/appl/xnlock/nose.1.right deleted file mode 100644 index f7c8962c026..00000000000 --- a/kerberosV/src/appl/xnlock/nose.1.right +++ /dev/null @@ -1,38 +0,0 @@ -#define nose_1_right_width 64 -#define nose_1_right_height 64 -static unsigned char nose_1_right_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00, - 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20, - 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00, - 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00, - 0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00, - 0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x01,0x00,0x00,0xc0,0x0f, - 0x00,0x00,0x80,0x01,0x00,0x00,0x30,0x70,0x00,0x00,0x80,0x00,0x00,0x00,0x0c, - 0xc0,0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x01,0x00,0x40,0x00,0x00,0x00, - 0x03,0x00,0x02,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x20,0x00,0x00, - 0x00,0x00,0x00,0x08,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x00, - 0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08, - 0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00, - 0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10, - 0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00, - 0x10,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x18,0x00,0x00,0x80,0x00, - 0x00,0x08,0x00,0x10,0x00,0x00,0x80,0x00,0x00,0x08,0x00,0x10,0x00,0x00,0x00, - 0x01,0x00,0x04,0x00,0x30,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x27,0x00,0x00, - 0x00,0x04,0x00,0x01,0xc0,0x64,0x00,0x00,0x00,0x18,0xc0,0x00,0x30,0x48,0x00, - 0x00,0x00,0xe0,0x3f,0x00,0x08,0x88,0xff,0xff,0xff,0x1f,0x00,0x00,0x04,0x10, - 0x00,0x00,0x00,0x00,0xf8,0x01,0x02,0x20,0x00,0x00,0xe0,0x03,0x06,0x06,0x02, - 0x40,0xf8,0x00,0x10,0x04,0x03,0x08,0x02,0x40,0x06,0x03,0x08,0x84,0x00,0x10, - 0x04,0x40,0x01,0x04,0x04,0x48,0x00,0x20,0x04,0xc0,0x00,0x18,0x02,0x28,0x00, - 0x43,0x08,0x40,0xc0,0x20,0x01,0x30,0x00,0x44,0x08,0x20,0x00,0x61,0x01,0x10, - 0x00,0x48,0x10,0x18,0x00,0x42,0x01,0x08,0x00,0x48,0x20,0x00,0x00,0x42,0x02, - 0x08,0x00,0x48,0x20,0x00,0x00,0x42,0x02,0x04,0x00,0x40,0x40,0x00,0x00,0x42, - 0x04,0x00,0x00,0x40,0x80,0x00,0x00,0x40,0x04,0x00,0x00,0x20,0x80,0x00,0x00, - 0x40,0x04,0x00,0x00,0x20,0x00,0x01,0x00,0x20,0x04,0x00,0x00,0x10,0x00,0x01, - 0x00,0x30,0x04,0x00,0x00,0x08,0x00,0x02,0x00,0x10,0x08,0x00,0x00,0x06,0x00, - 0x0c,0x00,0x0c,0xf0,0xff,0xff,0x01,0x00,0xf0,0xff,0x03,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00}; diff --git a/kerberosV/src/appl/xnlock/nose.down b/kerberosV/src/appl/xnlock/nose.down deleted file mode 100644 index e8bdba4f45b..00000000000 --- a/kerberosV/src/appl/xnlock/nose.down +++ /dev/null @@ -1,38 +0,0 @@ -#define nose_down_width 64 -#define nose_down_height 64 -static unsigned char nose_down_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xfc,0xff,0x01,0x00,0x00,0x00,0x00,0xc0,0x03,0x00,0x1e,0x00, - 0x00,0x00,0x00,0x38,0x00,0x00,0xe0,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00, - 0x03,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x40,0x00,0x00,0x00, - 0x00,0x08,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x10,0x00,0x80, - 0x1f,0x00,0x40,0x00,0x00,0x08,0x00,0x60,0x60,0x00,0x80,0x00,0x00,0x08,0x00, - 0x10,0x80,0x00,0x80,0x00,0x00,0x04,0x00,0x08,0x00,0x01,0x00,0x01,0x00,0x04, - 0x00,0x08,0x00,0x01,0x00,0x01,0x00,0x02,0x00,0x18,0x80,0x01,0x00,0x02,0x00, - 0x02,0x00,0x68,0x60,0x01,0x00,0x02,0x00,0x02,0x00,0x88,0x1f,0x01,0x00,0x02, - 0x00,0x02,0x00,0x08,0x00,0x01,0x00,0x02,0x00,0x02,0x00,0x10,0x80,0x00,0x00, - 0x03,0x00,0x06,0x00,0x60,0x60,0x00,0x80,0x02,0x00,0x0c,0x00,0x80,0x1f,0x00, - 0x40,0x01,0x00,0x14,0x00,0x00,0x00,0x00,0x20,0x01,0x00,0x28,0x00,0x00,0x00, - 0x00,0x90,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x48,0x00,0x00,0xa0,0x01,0x00, - 0x00,0x00,0x26,0x00,0x00,0x40,0x1e,0x00,0x00,0xc0,0x11,0x00,0x00,0x80,0xe1, - 0x03,0x00,0x3c,0x0c,0x00,0x00,0x00,0x0e,0xfc,0xff,0x83,0x03,0x00,0x00,0x00, - 0xf0,0x01,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0xfe,0xff,0x0f,0x00,0x00,0x00, - 0x00,0x80,0x03,0x00,0x0c,0x00,0x00,0x00,0x00,0x80,0x02,0x00,0x14,0x00,0x00, - 0x00,0x00,0x60,0x04,0x00,0x12,0x00,0x00,0xc0,0x7f,0x10,0x04,0x00,0x22,0xe0, - 0x01,0x70,0xc0,0x18,0x08,0x00,0x61,0x1c,0x06,0x10,0x00,0x0f,0x30,0xc0,0x80, - 0x07,0x08,0x08,0x00,0x06,0xc0,0x3f,0x80,0x01,0x08,0x08,0x00,0x18,0x00,0x02, - 0xc0,0x00,0x10,0x04,0x00,0x30,0x00,0x05,0x30,0x00,0x10,0x04,0x00,0x00,0x80, - 0x08,0x18,0x00,0x20,0x04,0x00,0x00,0x80,0x08,0x00,0x00,0x20,0x04,0x00,0x00, - 0x40,0x10,0x00,0x00,0x20,0x24,0x00,0x00,0x40,0x10,0x00,0x00,0x22,0x24,0x00, - 0x00,0x40,0x10,0x00,0x00,0x22,0x44,0x00,0x00,0x40,0x10,0x00,0x00,0x11,0x84, - 0x01,0x00,0xc0,0x18,0x00,0xc0,0x10,0x08,0x00,0x00,0x80,0x08,0x00,0x00,0x08, - 0x30,0x00,0x00,0x80,0x08,0x00,0x00,0x04,0xe0,0xff,0xff,0xff,0xf8,0xff,0xff, - 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00}; diff --git a/kerberosV/src/appl/xnlock/nose.front b/kerberosV/src/appl/xnlock/nose.front deleted file mode 100644 index 64b82015c6a..00000000000 --- a/kerberosV/src/appl/xnlock/nose.front +++ /dev/null @@ -1,38 +0,0 @@ -#define nose_front_width 64 -#define nose_front_height 64 -static unsigned char nose_front_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x40,0x00, - 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40, - 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00, - 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, - 0x08,0x00,0xc0,0x1f,0x00,0x20,0x00,0x00,0x08,0x00,0x30,0x60,0x00,0x20,0x00, - 0x00,0xf8,0xff,0x0f,0x80,0xff,0x3f,0x00,0x00,0x00,0x02,0x02,0x00,0x82,0x00, - 0x00,0x00,0x00,0x03,0x01,0x00,0x84,0x01,0x00,0x00,0x00,0x81,0x00,0x00,0x08, - 0x01,0x00,0x00,0x80,0x80,0x00,0x00,0x08,0x02,0x00,0x00,0x80,0x40,0x00,0x00, - 0x10,0x02,0x00,0x00,0x40,0x40,0x00,0x00,0x10,0x04,0x00,0x00,0x40,0x20,0x00, - 0x00,0x20,0x04,0x00,0x00,0x60,0x20,0x00,0x00,0x20,0x0c,0x00,0x00,0x20,0x20, - 0x00,0x00,0x20,0x08,0x00,0x00,0x20,0x20,0x00,0x00,0x20,0x08,0x00,0x00,0x10, - 0x20,0x00,0x00,0x20,0x10,0x00,0x00,0x10,0x20,0x00,0x00,0x20,0x10,0x00,0x00, - 0x10,0x20,0x00,0x00,0x20,0x10,0x00,0x00,0x10,0x40,0x00,0x00,0x10,0x10,0x00, - 0x00,0x10,0x40,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x80,0x00,0x00,0x08,0x10, - 0x00,0x00,0x10,0x80,0x00,0x00,0x08,0x10,0x00,0x00,0x30,0x00,0x01,0x00,0x04, - 0x18,0x00,0x00,0x20,0x00,0x02,0x00,0x02,0x08,0x00,0x00,0x20,0x00,0x0c,0x80, - 0x01,0x08,0x00,0x00,0x60,0x00,0x30,0x60,0x00,0x0c,0x00,0x00,0x40,0x00,0xc0, - 0x1f,0x00,0x04,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01, - 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0f,0xc0,0x0f,0x00,0x00,0x00, - 0x00,0x40,0x10,0x20,0x10,0x00,0x00,0x00,0x00,0x20,0x60,0x30,0x20,0x00,0x00, - 0x00,0x00,0x20,0xc0,0x18,0x20,0x00,0x00,0xc0,0x7f,0x10,0x80,0x0d,0x40,0xe0, - 0x01,0x70,0xc0,0x18,0x00,0x05,0x40,0x1c,0x06,0x10,0x00,0x0f,0x00,0x05,0x80, - 0x07,0x08,0x08,0x00,0x06,0x00,0x05,0x80,0x01,0x08,0x08,0x00,0x18,0x00,0x05, - 0xc0,0x00,0x10,0x04,0x00,0x30,0x00,0x05,0x30,0x00,0x10,0x04,0x00,0x00,0x80, - 0x08,0x18,0x00,0x20,0x04,0x00,0x00,0x80,0x08,0x00,0x00,0x20,0x04,0x00,0x00, - 0x40,0x10,0x00,0x00,0x20,0x24,0x00,0x00,0x40,0x10,0x00,0x00,0x22,0x24,0x00, - 0x00,0x40,0x10,0x00,0x00,0x22,0x44,0x00,0x00,0x40,0x10,0x00,0x00,0x11,0x84, - 0x01,0x00,0xc0,0x18,0x00,0xc0,0x10,0x08,0x00,0x00,0x80,0x08,0x00,0x00,0x08, - 0x30,0x00,0x00,0x80,0x08,0x00,0x00,0x04,0xe0,0xff,0xff,0xff,0xf8,0xff,0xff, - 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00}; diff --git a/kerberosV/src/appl/xnlock/nose.left.front b/kerberosV/src/appl/xnlock/nose.left.front deleted file mode 100644 index 3a871eaaa15..00000000000 --- a/kerberosV/src/appl/xnlock/nose.left.front +++ /dev/null @@ -1,38 +0,0 @@ -#define nose_left_front_width 64 -#define nose_left_front_height 64 -static unsigned char nose_left_front_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x07,0x00,0x00,0x00,0x00,0x40,0x00, - 0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40, - 0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x04,0x00,0x00,0x00,0x00, - 0x40,0x00,0x00,0x04,0x00,0x00,0x00,0xf8,0xff,0xff,0xff,0xff,0x3f,0x00,0x00, - 0x08,0x00,0xe0,0x0f,0x00,0x20,0x00,0x00,0x08,0x00,0x18,0x30,0x00,0x20,0x00, - 0x00,0xf8,0xff,0x07,0xc0,0xff,0x3f,0x00,0x00,0x00,0x02,0x01,0x00,0x81,0x00, - 0x00,0x00,0x00,0x83,0x00,0x00,0x82,0x01,0x00,0x00,0x00,0x41,0x00,0x00,0x04, - 0x01,0x00,0x00,0x80,0x40,0x00,0x00,0x04,0x02,0x00,0x00,0x80,0x20,0x00,0x00, - 0x08,0x02,0x00,0x00,0x40,0x20,0x00,0x00,0x08,0x04,0x00,0x00,0x40,0x10,0x00, - 0x00,0x10,0x04,0x00,0x00,0x60,0x10,0x00,0x00,0x10,0x0c,0x00,0x00,0x20,0x10, - 0x00,0x00,0x10,0x08,0x00,0x00,0x30,0x10,0x00,0x00,0x10,0x08,0x00,0x00,0x10, - 0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00, - 0x10,0x10,0x00,0x00,0x10,0x10,0x00,0x00,0x10,0x20,0x00,0x00,0x08,0x10,0x00, - 0x00,0x10,0x20,0x00,0x00,0x08,0x10,0x00,0x00,0x10,0x40,0x00,0x00,0x04,0x10, - 0x00,0x00,0x30,0x40,0x00,0x00,0x04,0x10,0x00,0x00,0x20,0x80,0x00,0x00,0x02, - 0x18,0x00,0x00,0x20,0x00,0x01,0x00,0x01,0x08,0x00,0x00,0x60,0x00,0x06,0xc0, - 0x00,0x08,0x00,0x00,0x80,0x00,0x18,0x30,0x00,0x0c,0x00,0x00,0x80,0x00,0xe0, - 0x0f,0x00,0x04,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x01, - 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0x01,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00, - 0x00,0xff,0x00,0x04,0x10,0x00,0x00,0x00,0xe0,0x00,0x07,0x02,0x10,0x00,0x00, - 0x00,0x30,0x00,0x8c,0x01,0x20,0x00,0x00,0x00,0x0c,0x00,0x90,0x00,0x20,0x00, - 0x00,0x00,0x04,0x03,0x60,0x00,0x20,0x00,0x00,0x00,0xc2,0x00,0xc0,0x00,0x20, - 0x00,0x00,0x00,0x42,0x00,0x00,0x01,0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x02, - 0x20,0x00,0x00,0x00,0x21,0x00,0x00,0x06,0x20,0x00,0x00,0x00,0x21,0x00,0x00, - 0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x03,0x00, - 0x00,0x00,0x40,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x02, - 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00,0x00, - 0x18,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x10,0x00,0x00, - 0x00,0xc0,0xff,0xff,0xff,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00}; diff --git a/kerberosV/src/appl/xnlock/nose.right.front b/kerberosV/src/appl/xnlock/nose.right.front deleted file mode 100644 index f8214174e87..00000000000 --- a/kerberosV/src/appl/xnlock/nose.right.front +++ /dev/null @@ -1,38 +0,0 @@ -#define nose_right_front_width 64 -#define nose_right_front_height 64 -static unsigned char nose_right_front_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x20,0x00, - 0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20, - 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x00, - 0x20,0x00,0x00,0x02,0x00,0x00,0x00,0xfc,0xff,0xff,0xff,0xff,0x1f,0x00,0x00, - 0x04,0x00,0xf0,0x07,0x00,0x10,0x00,0x00,0x04,0x00,0x0c,0x18,0x00,0x10,0x00, - 0x00,0xfc,0xff,0x03,0xe0,0xff,0x1f,0x00,0x00,0x00,0x81,0x00,0x80,0x40,0x00, - 0x00,0x00,0x80,0x41,0x00,0x00,0xc1,0x00,0x00,0x00,0x80,0x20,0x00,0x00,0x82, - 0x00,0x00,0x00,0x40,0x20,0x00,0x00,0x02,0x01,0x00,0x00,0x40,0x10,0x00,0x00, - 0x04,0x01,0x00,0x00,0x20,0x10,0x00,0x00,0x04,0x02,0x00,0x00,0x20,0x08,0x00, - 0x00,0x08,0x02,0x00,0x00,0x30,0x08,0x00,0x00,0x08,0x06,0x00,0x00,0x10,0x08, - 0x00,0x00,0x08,0x04,0x00,0x00,0x10,0x08,0x00,0x00,0x08,0x0c,0x00,0x00,0x08, - 0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00, - 0x08,0x08,0x00,0x00,0x08,0x08,0x00,0x00,0x08,0x10,0x00,0x00,0x04,0x08,0x00, - 0x00,0x08,0x10,0x00,0x00,0x04,0x08,0x00,0x00,0x08,0x20,0x00,0x00,0x02,0x08, - 0x00,0x00,0x08,0x20,0x00,0x00,0x02,0x0c,0x00,0x00,0x18,0x40,0x00,0x00,0x01, - 0x04,0x00,0x00,0x10,0x80,0x00,0x80,0x00,0x04,0x00,0x00,0x10,0x00,0x03,0x60, - 0x00,0x06,0x00,0x00,0x30,0x00,0x0c,0x18,0x00,0x01,0x00,0x00,0x20,0x00,0xf0, - 0x07,0x00,0x01,0x00,0x00,0x60,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x40,0x00, - 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00, - 0x00,0x08,0x20,0x00,0xff,0x00,0x00,0x00,0x00,0x08,0x40,0xe0,0x00,0x07,0x00, - 0x00,0x00,0x04,0x80,0x31,0x00,0x0c,0x00,0x00,0x00,0x04,0x00,0x09,0x00,0x30, - 0x00,0x00,0x00,0x04,0x00,0x06,0xc0,0x20,0x00,0x00,0x00,0x04,0x00,0x03,0x00, - 0x43,0x00,0x00,0x00,0x04,0x80,0x00,0x00,0x42,0x00,0x00,0x00,0x04,0x40,0x00, - 0x00,0x84,0x00,0x00,0x00,0x04,0x60,0x00,0x00,0x84,0x00,0x00,0x00,0x04,0x00, - 0x00,0x00,0x84,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x02, - 0x00,0x00,0x00,0xc0,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00, - 0x02,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x20,0x00,0x00, - 0x00,0x04,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0e,0x00, - 0x00,0x00,0xf0,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00}; diff --git a/kerberosV/src/appl/xnlock/xnlock.1 b/kerberosV/src/appl/xnlock/xnlock.1 deleted file mode 100644 index 1adc9b5771c..00000000000 --- a/kerberosV/src/appl/xnlock/xnlock.1 +++ /dev/null @@ -1,123 +0,0 @@ -.\" xnlock -- Dan Heller 1985 -.TH XNLOCK 1 "19 April 1990" -.SH NAME -xnlock \- amusing lock screen program with message for passers-by -.SH SYNOPSIS -.B xnlock -[ -\fIoptions\fP -] -[ -\fImessage\fP -] -.SH DESCRIPTION -.I xnlock -is a program that acts as a screen saver for workstations running X11. -It also "locks" the screen such that the workstation can be left -unattended without worry that someone else will walk up to it and -mess everything up. When \fIxnlock\fP is running, a little man with -a big nose and a hat runs around spewing out messages to the screen. -By default, the messages are "humorous", but that depends on your -sense of humor. -.LP -If a key or mouse button is pressed, a prompt is printed requesting the -user's password. If a RETURN is not typed within 30 seconds, -the little man resumes running around. -.LP -Text on the command line is used as the message. For example: -.br - % xnlock I\'m out to lunch for a couple of hours. -.br -Note the need to quote shell metacharacters. -.LP -In the absence of flags or text, \fIxnlock\fP displays random fortunes. -.SH OPTIONS -Command line options override all resource specifications. -All arguments that are not associated with a command line option -is taken to be message text that the little man will "say" every -once in a while. The resource \fBxnlock.text\fP may be set to -a string. -.TP -.BI \-fn " fontname" -The default font is the first 18 point font in the \fInew century schoolbook\fP -family. While larger fonts are recokmmended over smaller ones, any font -in the server's font list will work. The resource to use for this option -is \fBxnlock.font\fP. -.TP -.BI \-filename " filename" -Take the message to be displayed from the file \fIfilename\fP. -If \fIfilename\fP is not specified, \fI$HOME/.msgfile\fP is used. -If the contents of the file are changed during runtime, the most recent text -of the file is used (allowing the displayed message to be altered remotely). -Carriage returns within the text are allowed, but tabs or other control -characters are not translated and should not be used. -The resource available for this option is \fBxnlock.file\fP. -.TP -.BI \-ar -Accept root's password to unlock screen. This option is true by -default. The reason for this is so that someone's screen may be -unlocked by autorized users in case of emergency and the person -running the program is still out to lunch. The resource available -for specifying this option is \fBxnlock.acceptRootPasswd\fP. -.TP -.BI \-noar -Don't accept root's password. This option is for paranoids who -fear their peers might breakin using root's password and remove -their files anyway. Specifying this option on the command line -overrides the \fBxnlock.acceptRootPasswd\fP if set to True. -.TP -.BI \-ip -Ignore password prompt. -The resource available for this option is \fBxnlock.ignorePasswd\fP. -.TP -.BI \-noip -Don't ignore password prompt. This is available in order to -override the resource \fBignorePasswd\fP if set to True. -.TP -.BI -fg " color" -Specifies the foreground color. The resource available for this -is \fBxnlock.foreground\fP. -.TP -.BI -bg " color" -Specifies the background color. The resource available for this -is \fBxnlock.background\fP. -.TP -.BI \-rv -Reverse the foreground and background colors. -The resource for this is \fBxvnlock.reverseVideo\fP. -.TP -.BI \-norv -Don't use reverse video. This is available to override the reverseVideo -resource if set to True. -.TP -.BI \-prog " program" -Receive message text from the running program \fIprogram\fP. If there -are arguments to \fIprogram\fP, encase them with the name of the program in -quotes (e.g. xnlock -t "fortune -o"). -The resource for this is \fBxnlock.program\fP. -.SH RESOURCES -.br -xnlock.font: fontname -.br -xnlock.foreground: color -.br -xnlock.background: color -.br -xnlock.reverseVideo: True/False -.br -xnlock.text: Some random text string -.br -xnlock.program: program [args] -.br -xnlock.ignorePasswd: True/False -.br -xnlock.acceptRootPasswd: True/False -.SH FILES -\fIxnlock\fP executable file -.br -~/.msgfile default message file -.SH AUTHOR -Dan Heller Copyright (c) 1985, 1990. -.br -The original version of this program was written using pixrects on -a Sun 2 running SunOS 1.1. diff --git a/kerberosV/src/appl/xnlock/xnlock.c b/kerberosV/src/appl/xnlock/xnlock.c deleted file mode 100644 index 27ef7cb6a41..00000000000 --- a/kerberosV/src/appl/xnlock/xnlock.c +++ /dev/null @@ -1,1087 +0,0 @@ -/* - * xnlock -- Dan Heller, 1990 - * "nlock" is a "new lockscreen" type program... something that prevents - * screen burnout by making most of it "black" while providing something - * of interest to be displayed in case anyone is watching. - * "xnlock" is the X11 version of the program. - * Original sunview version written by Dan Heller 1985 (not included here). - */ -#ifdef HAVE_CONFIG_H -#include -RCSID("$Id: xnlock.c,v 1.7 2013/11/30 18:11:59 deraadt Exp $"); -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_PWD_H -#include -#endif -#ifdef HAVE_CRYPT_H -#undef des_encrypt -#define des_encrypt wingless_pigs_mostly_fail_to_fly -#include -#undef des_encrypt -#endif - -#ifdef KRB5 -#include -#include -#endif - -#include -#include - -static char login[16]; -static char userprompt[128]; -#ifdef KRB5 -static krb5_context context; -static krb5_principal client; -#endif - -#define font_height(font) (font->ascent + font->descent) - -static char *SPACE_STRING = " "; -static char STRING[] = "****************"; - -#define STRING_LENGTH (sizeof(STRING)) -#define MAX_PASSWD_LENGTH 256 -/* (sizeof(STRING)) */ - -#define PROMPT "Password: " -#define FAIL_MSG "Sorry, try again" -#define LEFT 001 -#define RIGHT 002 -#define DOWN 004 -#define UP 010 -#define FRONT 020 -#define X_INCR 3 -#define Y_INCR 2 -#define XNLOCK_CTRL 1 -#define XNLOCK_NOCTRL 0 - -static XtAppContext app; -static Display *dpy; -static unsigned short Width, Height; -static Widget widget; -static GC gc; -static XtIntervalId timeout_id; -static char *words; -static int x, y; -static Pixel Black, White; -static XFontStruct *font; -static char root_cpass[128]; -static char user_cpass[128]; -static int time_left, prompt_x, prompt_y, time_x, time_y; -static unsigned long interval; -static Pixmap left0, left1, right0, right1, left_front, - right_front, front, down; - -#define MAXLINES 40 - -#define IS_MOVING 1 -#define GET_PASSWD 2 -static int state; /* indicates states: walking or getting passwd */ - -static int ALLOW_LOGOUT = (60*10); /* Allow logout after nn seconds */ -#define LOGOUT_PASSWD "enuHDmTo5Lq4g" /* when given password "LOGOUT" */ -static time_t locked_at; - -struct appres_t { - Pixel bg; - Pixel fg; - XFontStruct *font; - Boolean ignore_passwd; - Boolean do_reverse; - Boolean accept_root; - char *text, *text_prog, *file, *logoutPasswd; - Boolean no_screensaver; - Boolean destroytickets; -} appres; - -static XtResource resources[] = { - { XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel), - XtOffsetOf(struct appres_t, bg), XtRString, "black" }, - - { XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), - XtOffsetOf(struct appres_t, fg), XtRString, "white" }, - - { XtNfont, XtCFont, XtRFontStruct, sizeof (XFontStruct *), - XtOffsetOf(struct appres_t, font), - XtRString, "-*-new century schoolbook-*-*-*-18-*" }, - - { "ignorePasswd", "IgnorePasswd", XtRBoolean, sizeof(Boolean), - XtOffsetOf(struct appres_t,ignore_passwd),XtRImmediate,(XtPointer)False }, - - { "acceptRootPasswd", "AcceptRootPasswd", XtRBoolean, sizeof(Boolean), - XtOffsetOf(struct appres_t, accept_root), XtRImmediate, (XtPointer)True }, - - { "text", "Text", XtRString, sizeof(String), - XtOffsetOf(struct appres_t, text), XtRString, "I'm out running around." }, - - { "program", "Program", XtRString, sizeof(String), - XtOffsetOf(struct appres_t, text_prog), XtRImmediate, NULL }, - - { "file", "File", XtRString, sizeof(String), - XtOffsetOf(struct appres_t,file), XtRImmediate, NULL }, - - { "logoutPasswd", "logoutPasswd", XtRString, sizeof(String), - XtOffsetOf(struct appres_t, logoutPasswd), XtRString, LOGOUT_PASSWD }, - - { "noScreenSaver", "NoScreenSaver", XtRBoolean, sizeof(Boolean), - XtOffsetOf(struct appres_t,no_screensaver), XtRImmediate, (XtPointer)True }, - - { "destroyTickets", "DestroyTickets", XtRBoolean, sizeof(Boolean), - XtOffsetOf(struct appres_t,destroytickets), XtRImmediate, (XtPointer)True }, -}; - -static XrmOptionDescRec options[] = { - { "-fg", ".foreground", XrmoptionSepArg, NULL }, - { "-foreground", ".foreground", XrmoptionSepArg, NULL }, - { "-fn", ".font", XrmoptionSepArg, NULL }, - { "-font", ".font", XrmoptionSepArg, NULL }, - { "-ip", ".ignorePasswd", XrmoptionNoArg, "True" }, - { "-noip", ".ignorePasswd", XrmoptionNoArg, "False" }, - { "-ar", ".acceptRootPasswd", XrmoptionNoArg, "True" }, - { "-noar", ".acceptRootPasswd", XrmoptionNoArg, "False" }, - { "-nonoscreensaver", ".noScreenSaver", XrmoptionNoArg, "False" }, - { "-nodestroytickets", ".destroyTickets", XrmoptionNoArg, "False" }, -}; - -static char* -get_words(void) -{ - FILE *pp = NULL; - static char buf[512]; - long n; - - if (appres.text_prog) { - pp = popen(appres.text_prog, "r"); - if (!pp) { - warn("popen %s", appres.text_prog); - return appres.text; - } - n = fread(buf, 1, sizeof(buf) - 1, pp); - buf[n] = 0; - pclose(pp); - return buf; - } - if (appres.file) { - pp = fopen(appres.file, "r"); - if (!pp) { - warn("fopen %s", appres.file); - return appres.text; - } - n = fread(buf, 1, sizeof(buf) - 1, pp); - buf[n] = 0; - fclose(pp); - return buf; - } - - return appres.text; -} - -static void -usage(int exit_code) -{ - fprintf(stderr, "usage: %s [options] [message]\n", getprogname()); - fprintf(stderr, "-fg color foreground color\n"); - fprintf(stderr, "-bg color background color\n"); - fprintf(stderr, "-rv reverse foreground/background colors\n"); - fprintf(stderr, "-nrv no reverse video\n"); - fprintf(stderr, "-ip ignore passwd\n"); - fprintf(stderr, "-nip don't ignore passwd\n"); - fprintf(stderr, "-ar accept root's passwd to unlock\n"); - fprintf(stderr, "-nar don't accept root's passwd\n"); - fprintf(stderr, "-f [file] message is read from file or ~/.msgfile\n"); - fprintf(stderr, "-prog program text is gotten from executing `program'\n"); - fprintf(stderr, "-nodestroytickets keep kerberos tickets\n"); - fprintf(stderr, "--version\n"); - fprintf(stderr, "--help\n"); - exit(exit_code); -} - -static void -init_words (int argc, char **argv) -{ - int i = 0; - - while(argv[i]) { - if(strcmp(argv[i], "-p") == 0 - || strcmp(argv[i], "-prog") == 0) { - i++; - if(argv[i]) { - appres.text_prog = argv[i]; - i++; - } else { - warnx ("-p requires an argument"); - usage(1); - } - } else if(strcmp(argv[i], "-f") == 0) { - i++; - if(argv[i]) { - appres.file = argv[i]; - i++; - } else { - int ret; - ret = asprintf (&appres.file, - "%s/.msgfile", getenv("HOME")); - if (ret == -1) - errx (1, "cannot allocate memory for message"); - } - } else if(strcmp(argv[i], "--version") == 0) { - print_version(NULL); - exit(0); - } else if(strcmp(argv[i], "--help") == 0) { - usage(0); - } else { - int j; - int len = 1; - for(j = i; argv[j]; j++) - len += strlen(argv[j]) + 1; - appres.text = malloc(len); - if (appres.text == NULL) - errx (1, "cannot allocate memory for message"); - appres.text[0] = 0; - for(; i < j; i++){ - strlcat(appres.text, argv[i], len); - strlcat(appres.text, " ", len); - } - } - } -} - -static void -ScreenSaver(int save) -{ - static int timeout, interval, prefer_blank, allow_exp; - if(!appres.no_screensaver){ - if (save) { - XGetScreenSaver(dpy, &timeout, &interval, - &prefer_blank, &allow_exp); - XSetScreenSaver(dpy, 0, interval, prefer_blank, allow_exp); - } else - /* restore state */ - XSetScreenSaver(dpy, timeout, interval, prefer_blank, allow_exp); - } -} - -/* Forward decls necessary */ -static void talk(int force_erase); -static unsigned long look(void); - -static int -zrefresh(void) -{ - switch (fork()) { - case -1: - warn ("zrefresh: fork"); - return -1; - case 0: - /* Child */ - execlp("zrefresh", "zrefresh", NULL); - execl(BINDIR "/zrefresh", "zrefresh", NULL); - return -1; - default: - /* Parent */ - break; - } - return 0; -} - -static void -leave(void) -{ - XUngrabPointer(dpy, CurrentTime); - XUngrabKeyboard(dpy, CurrentTime); - ScreenSaver(0); - XCloseDisplay(dpy); - zrefresh(); - exit(0); -} - -static void -walk(int dir) -{ - int incr = 0; - static int lastdir; - static int up = 1; - static Pixmap frame; - - XSetForeground(dpy, gc, White); - XSetBackground(dpy, gc, Black); - if (dir & (LEFT|RIGHT)) { /* left/right movement (mabye up/down too) */ - up = -up; /* bouncing effect (even if hit a wall) */ - if (dir & LEFT) { - incr = X_INCR; - frame = (up < 0) ? left0 : left1; - } else { - incr = -X_INCR; - frame = (up < 0) ? right0 : right1; - } - if ((lastdir == FRONT || lastdir == DOWN) && dir & UP) { - /* workaround silly bug that leaves screen dust when - * guy is facing forward or down and moves up-left/right. - */ - XCopyPlane(dpy, frame, XtWindow(widget), gc, 0, 0, 64,64, x, y, 1L); - XFlush(dpy); - } - /* note that maybe neither UP nor DOWN is set! */ - if (dir & UP && y > Y_INCR) - y -= Y_INCR; - else if (dir & DOWN && y < (int)Height - 64) - y += Y_INCR; - } - /* Explicit up/down movement only (no left/right) */ - else if (dir == UP) - XCopyPlane(dpy, front, XtWindow(widget), gc, - 0,0, 64,64, x, y -= Y_INCR, 1L); - else if (dir == DOWN) - XCopyPlane(dpy, down, XtWindow(widget), gc, - 0,0, 64,64, x, y += Y_INCR, 1L); - else if (dir == FRONT && frame != front) { - if (up > 0) - up = -up; - if (lastdir & LEFT) - frame = left_front; - else if (lastdir & RIGHT) - frame = right_front; - else - frame = front; - XCopyPlane(dpy, frame, XtWindow(widget), gc, 0, 0, 64,64, x, y, 1L); - } - if (dir & LEFT) - while(--incr >= 0) { - XCopyPlane(dpy, frame, XtWindow(widget), gc, - 0,0, 64,64, --x, y+up, 1L); - XFlush(dpy); - } - else if (dir & RIGHT) - while(++incr <= 0) { - XCopyPlane(dpy, frame, XtWindow(widget), gc, - 0,0, 64,64, ++x, y+up, 1L); - XFlush(dpy); - } - lastdir = dir; -} - -static long -my_random (void) -{ -#ifdef HAVE_ARC4RANDOM - return arc4random(); -#ifdef HAVE_RANDOM - return random(); -#else - return rand(); -#endif -} - -static int -think(void) -{ - if (my_random() & 1) - walk(FRONT); - if (my_random() & 1) { - words = get_words(); - return 1; - } - return 0; -} - -static void -move(XtPointer _p, XtIntervalId *_id) -{ - static int dir; - static unsigned int length; - - if (!length) { - int tries = 0; - dir = 0; - if ((my_random() & 1) && think()) { - talk(0); /* sets timeout to itself */ - return; - } - if (!(my_random() % 3) && (interval = look())) { - timeout_id = XtAppAddTimeOut(app, interval, move, NULL); - return; - } - interval = 20 + my_random() % 100; - do { - if (!tries) - length = Width/100 + my_random() % 90, tries = 8; - else - tries--; - switch (my_random() % 8) { - case 0: - if (x - X_INCR*length >= 5) - dir = LEFT; - case 1: - if (x + X_INCR*length <= (int)Width - 70) - dir = RIGHT; - case 2: - if (y - (Y_INCR*length) >= 5) - dir = UP, interval = 40; - case 3: - if (y + Y_INCR*length <= (int)Height - 70) - dir = DOWN, interval = 20; - case 4: - if (x - X_INCR*length >= 5 && y - (Y_INCR*length) >= 5) - dir = (LEFT|UP); - case 5: - if (x + X_INCR * length <= (int)Width - 70 && - y-Y_INCR * length >= 5) - dir = (RIGHT|UP); - case 6: - if (x - X_INCR * length >= 5 && - y + Y_INCR * length <= (int)Height - 70) - dir = (LEFT|DOWN); - case 7: - if (x + X_INCR*length <= (int)Width - 70 && - y + Y_INCR*length <= (int)Height - 70) - dir = (RIGHT|DOWN); - } - } while (!dir); - } - walk(dir); - --length; - timeout_id = XtAppAddTimeOut(app, interval, move, NULL); -} - -static void -post_prompt_box(Window window) -{ - int width = (Width / 3); - int height = font_height(font) * 6; - int box_x, box_y; - - /* make sure the entire nose icon fits in the box */ - if (height < 100) - height = 100; - - if(width < 105 + font->max_bounds.width*STRING_LENGTH) - width = 105 + font->max_bounds.width*STRING_LENGTH; - box_x = (Width - width) / 2; - time_x = prompt_x = box_x + 105; - - time_y = prompt_y = Height / 2; - box_y = prompt_y - 3 * font_height(font); - - /* erase current guy -- text message may still exist */ - XSetForeground(dpy, gc, Black); - XFillRectangle(dpy, window, gc, x, y, 64, 64); - talk(1); /* forcefully erase message if one is being displayed */ - /* Clear area in middle of screen for prompt box */ - XSetForeground(dpy, gc, White); - XFillRectangle(dpy, window, gc, box_x, box_y, width, height); - - /* make a box that's 5 pixels thick. Then add a thin box inside it */ - XSetForeground(dpy, gc, Black); - XSetLineAttributes(dpy, gc, 5, 0, 0, 0); - XDrawRectangle(dpy, window, gc, box_x+5, box_y+5, width-10, height-10); - XSetLineAttributes(dpy, gc, 0, 0, 0, 0); - XDrawRectangle(dpy, window, gc, box_x+12, box_y+12, width-23, height-23); - - XDrawString(dpy, window, gc, - prompt_x, prompt_y-font_height(font), - userprompt, strlen(userprompt)); - XDrawString(dpy, window, gc, prompt_x, prompt_y, PROMPT, strlen(PROMPT)); - /* set background for copyplane and DrawImageString; need reverse video */ - XSetBackground(dpy, gc, White); - XCopyPlane(dpy, right0, window, gc, 0,0, 64,64, - box_x + 20, box_y + (height - 64)/2, 1L); - prompt_x += XTextWidth(font, PROMPT, strlen(PROMPT)); - time_y += 2*font_height(font); -} - -static void -RaiseWindow(Widget w, XEvent *ev, String *s, Cardinal *n) -{ - Widget x; - if(!XtIsRealized(w)) - return; - x = XtParent(w); - XRaiseWindow(dpy, XtWindow(x)); -} - - -static void -ClearWindow(Widget w, XEvent *_event, String *_s, Cardinal *_n) -{ - XExposeEvent *event = (XExposeEvent *)_event; - if (!XtIsRealized(w)) - return; - XClearArea(dpy, XtWindow(w), event->x, event->y, - event->width, event->height, False); - if (state == GET_PASSWD) - post_prompt_box(XtWindow(w)); - if (timeout_id == 0 && event->count == 0) { - timeout_id = XtAppAddTimeOut(app, 1000L, move, NULL); - /* first grab the input focus */ - XSetInputFocus(dpy, XtWindow(w), RevertToPointerRoot, CurrentTime); - /* now grab the pointer and keyboard and contrain to this window */ - XGrabPointer(dpy, XtWindow(w), TRUE, 0, GrabModeAsync, - GrabModeAsync, XtWindow(w), None, CurrentTime); - } -} - -static void -countdown(XtPointer _t, XtIntervalId *_d) -{ - int *timeout = (int *)_t; - char buf[128]; - time_t seconds; - - if (--(*timeout) < 0) { - XExposeEvent event; - XtRemoveTimeOut(timeout_id); - state = IS_MOVING; - event.x = event.y = 0; - event.width = Width, event.height = Height; - ClearWindow(widget, (XEvent *)&event, 0, 0); - timeout_id = XtAppAddTimeOut(app, 200L, move, NULL); - return; - } - seconds = time(0) - locked_at; - if (seconds >= 3600) - snprintf(buf, sizeof(buf), - "Locked for %d:%02d:%02d ", - (int)seconds/3600, (int)seconds/60%60, (int)seconds%60); - else - snprintf(buf, sizeof(buf), - "Locked for %2d:%02d ", - (int)seconds/60, (int)seconds%60); - - XDrawImageString(dpy, XtWindow(widget), gc, - time_x, time_y, buf, strlen(buf)); - XtAppAddTimeOut(app, 1000L, countdown, timeout); - return; -} - -#ifdef KRB5 -static int -verify_krb5(const char *password) -{ - krb5_error_code ret; - krb5_ccache id; - - krb5_cc_default(context, &id); - ret = krb5_verify_user(context, - client, - id, - password, - 0, - NULL); - if (ret == 0){ - if (k_hasafs()) - krb5_afslog(context, id, NULL, NULL); - return 0; - } - if (ret != KRB5KRB_AP_ERR_MODIFIED) - krb5_warn(context, ret, "verify_krb5"); - - return -1; -} -#endif - -static int -verify(char *password) -{ - /* - * First try with root password, if allowed. - */ - if ( appres.accept_root - && strcmp(crypt(password, root_cpass), root_cpass) == 0) - return 0; - - /* - * Password that log out user - */ - if (getuid() != 0 && - geteuid() != 0 && - (time(0) - locked_at) > ALLOW_LOGOUT && - strcmp(crypt(password, appres.logoutPasswd), appres.logoutPasswd) == 0) - { - signal(SIGHUP, SIG_IGN); - kill(-1, SIGHUP); - sleep(5); - /* If the X-server shut down then so will we, else - * continue */ - signal(SIGHUP, SIG_DFL); - } - - /* - * Try copy of users password. - */ - if (strcmp(crypt(password, user_cpass), user_cpass) == 0) - return 0; - - /* - * Try to verify as user in case password change. - */ - if (unix_verify_user(login, password) == 0) - return 0; - -#ifdef KRB5 - /* - * Try to verify as user with kerberos 5. - */ - if(verify_krb5(password) == 0) - return 0; -#endif - - return -1; -} - - -static void -GetPasswd(Widget w, XEvent *_event, String *_s, Cardinal *_n) -{ - XKeyEvent *event = (XKeyEvent *)_event; - static char passwd[MAX_PASSWD_LENGTH]; - static unsigned int cnt; - static int is_ctrl = XNLOCK_NOCTRL; - char c; - KeySym keysym; - int echolen; - int old_state = state; - - if (event->type == ButtonPress) { - x = event->x, y = event->y; - return; - } - if (state == IS_MOVING) { - /* guy is running around--change to post prompt box. */ - XtRemoveTimeOut(timeout_id); - state = GET_PASSWD; - if (appres.ignore_passwd || !strlen(user_cpass)) - leave(); - post_prompt_box(XtWindow(w)); - cnt = 0; - time_left = 30; - countdown((XtPointer)&time_left, 0); - } - if (event->type == KeyRelease) { - keysym = XLookupKeysym(event, 0); - if (keysym == XK_Control_L || keysym == XK_Control_R) { - is_ctrl = XNLOCK_NOCTRL; - } - } - if (event->type != KeyPress) - return; - - time_left = 30; - - keysym = XLookupKeysym(event, 0); - if (keysym == XK_Control_L || keysym == XK_Control_R) { - is_ctrl = XNLOCK_CTRL; - return; - } - if (!XLookupString(event, &c, 1, &keysym, 0)) - return; - if (keysym == XK_Return || keysym == XK_Linefeed) { - passwd[cnt] = 0; - if(old_state == IS_MOVING) - return; - XtRemoveTimeOut(timeout_id); - - if(verify(passwd) == 0) - leave(); - - cnt = 0; - - XDrawImageString(dpy, XtWindow(widget), gc, - time_x, time_y, FAIL_MSG, strlen(FAIL_MSG)); - time_left = 0; - timeout_id = XtAppAddTimeOut(app, 2000L, countdown, &time_left); - return; - } - if (keysym == XK_BackSpace || keysym == XK_Delete || keysym == XK_Left) { - if (cnt) - passwd[cnt--] = ' '; - } else if (keysym == XK_u && is_ctrl == XNLOCK_CTRL) { - while (cnt) { - passwd[cnt--] = ' '; - echolen = min(cnt, STRING_LENGTH); - XDrawImageString(dpy, XtWindow(w), gc, - prompt_x, prompt_y, STRING, echolen); - XDrawImageString(dpy, XtWindow(w), gc, - prompt_x + XTextWidth(font, STRING, echolen), - prompt_y, SPACE_STRING, STRING_LENGTH - echolen + 1); - } - } else if (isprint((unsigned char)c)) { - if ((cnt + 1) >= MAX_PASSWD_LENGTH) - XBell(dpy, 50); - else - passwd[cnt++] = c; - } else - return; - echolen = min(cnt, STRING_LENGTH); - XDrawImageString(dpy, XtWindow(w), gc, - prompt_x, prompt_y, STRING, echolen); - XDrawImageString(dpy, XtWindow(w), gc, - prompt_x + XTextWidth(font, STRING, echolen), - prompt_y, SPACE_STRING, STRING_LENGTH - echolen +1); -} - -#include "nose.0.left" -#include "nose.1.left" -#include "nose.0.right" -#include "nose.1.right" -#include "nose.left.front" -#include "nose.right.front" -#include "nose.front" -#include "nose.down" - -static void -init_images(void) -{ - static Pixmap *images[] = { - &left0, &left1, &right0, &right1, - &left_front, &right_front, &front, &down - }; - static unsigned char *bits[] = { - nose_0_left_bits, nose_1_left_bits, nose_0_right_bits, - nose_1_right_bits, nose_left_front_bits, nose_right_front_bits, - nose_front_bits, nose_down_bits - }; - int i; - - for (i = 0; i < XtNumber(images); i++) - if (!(*images[i] = - XCreatePixmapFromBitmapData(dpy, DefaultRootWindow(dpy), - (char*)(bits[i]), 64, 64, 1, 0, 1))) - XtError("Can't load nose images"); -} - -static void -talk(int force_erase) -{ - unsigned int width = 0, height, Z, total = 0; - static unsigned int X, Y; - static int talking; - static struct { int x, y, width, height; } s_rect; - char *p, *p2; - char buf[BUFSIZ], args[MAXLINES][256]; - - /* clear what we've written */ - if (talking || force_erase) { - if (!talking) - return; - if (talking == 2) { - XSetForeground(dpy, gc, Black); - XDrawString(dpy, XtWindow(widget), gc, X, Y, words, strlen(words)); - } else if (talking == 1) { - XSetForeground(dpy, gc, Black); - XFillRectangle(dpy, XtWindow(widget), gc, s_rect.x-5, s_rect.y-5, - s_rect.width+10, s_rect.height+10); - } - talking = 0; - if (!force_erase) - timeout_id = XtAppAddTimeOut(app, 40L, - (XtTimerCallbackProc)move, - NULL); - return; - } - XSetForeground(dpy, gc, White); - talking = 1; - walk(FRONT); - strlcpy (buf, words, sizeof(buf)); - p = buf; - - /* possibly avoid a lot of work here - * if no CR or only one, then just print the line - */ - if (!(p2 = strchr(p, '\n')) || !p2[1]) { - int w; - - if (p2) - *p2 = 0; - w = XTextWidth(font, words, strlen(words)); - X = x + 32 - w/2; - Y = y - 5 - font_height(font); - /* give us a nice 5 pixel margin */ - if (X < 5) - X = 5; - else if (X + w + 15 > (int)Width + 5) - X = Width - w - 5; - if (Y < 5) - Y = y + 64 + 5 + font_height(font); - XDrawString(dpy, XtWindow(widget), gc, X, Y, words, strlen(words)); - timeout_id = XtAppAddTimeOut(app, 5000L, (XtTimerCallbackProc)talk, - NULL); - talking++; - return; - } - - /* p2 now points to the first '\n' */ - for (height = 0; p[0]; height++) { - int w; - *p2 = 0; - if ((w = XTextWidth(font, p, p2 - p)) > width) - width = w; - total += p2 - p; /* total chars; count to determine reading time */ - strlcpy(args[height], p, sizeof(args[height])); - if (height == MAXLINES - 1) { - puts("Message too long!"); - break; - } - p = p2+1; - if (!(p2 = strchr(p, '\n'))) - break; - } - height++; - - /* Figure out the height and width in pixels (height, width) extend - * the new box by 15 pixels on the sides (30 total) top and bottom. - */ - s_rect.width = width + 30; - s_rect.height = height * font_height(font) + 30; - if (x - s_rect.width - 10 < 5) - s_rect.x = 5; - else - if ((s_rect.x = x+32-(s_rect.width+15)/2) - + s_rect.width+15 > (int)Width-5) - s_rect.x = Width - 15 - s_rect.width; - if (y - s_rect.height - 10 < 5) - s_rect.y = y + 64 + 5; - else - s_rect.y = y - 5 - s_rect.height; - - XSetForeground(dpy, gc, White); - XFillRectangle(dpy, XtWindow(widget), gc, - s_rect.x-5, s_rect.y-5, s_rect.width+10, s_rect.height+10); - - /* make a box that's 5 pixels thick. Then add a thin box inside it */ - XSetForeground(dpy, gc, Black); - XSetLineAttributes(dpy, gc, 5, 0, 0, 0); - XDrawRectangle(dpy, XtWindow(widget), gc, - s_rect.x, s_rect.y, s_rect.width-1, s_rect.height-1); - XSetLineAttributes(dpy, gc, 0, 0, 0, 0); - XDrawRectangle(dpy, XtWindow(widget), gc, - s_rect.x + 7, s_rect.y + 7, s_rect.width - 15, - s_rect.height - 15); - - X = 15; - Y = 15 + font_height(font); - - /* now print each string in reverse order (start at bottom of box) */ - for (Z = 0; Z < height; Z++) { - XDrawString(dpy, XtWindow(widget), gc, s_rect.x+X, s_rect.y+Y, - args[Z], strlen(args[Z])); - Y += font_height(font); - } - timeout_id = XtAppAddTimeOut(app, (total/15) * 1000, - (XtTimerCallbackProc)talk, NULL); -} - -static unsigned long -look(void) -{ - XSetForeground(dpy, gc, White); - XSetBackground(dpy, gc, Black); - if (my_random() % 3) { - XCopyPlane(dpy, (my_random() & 1)? down : front, XtWindow(widget), gc, - 0, 0, 64,64, x, y, 1L); - return 1000L; - } - if (!(my_random() % 5)) - return 0; - if (my_random() % 3) { - XCopyPlane(dpy, (my_random() & 1)? left_front : right_front, - XtWindow(widget), gc, 0, 0, 64,64, x, y, 1L); - return 1000L; - } - if (!(my_random() % 5)) - return 0; - XCopyPlane(dpy, (my_random() & 1)? left0 : right0, XtWindow(widget), gc, - 0, 0, 64,64, x, y, 1L); - return 1000L; -} - -int -main (int argc, char **argv) -{ - int i; - Widget override; - XGCValues gcvalues; - - setprogname (argv[0]); - - /* - * Must be setuid root to read /etc/shadow, copy encrypted - * passwords here and then switch to sane uid. - */ - { - struct passwd *pw; - uid_t uid = getuid(); - if (!(pw = k_getpwuid(0))) - errx (1, "can't get root's passwd!"); - strlcpy(root_cpass, pw->pw_passwd, sizeof(root_cpass)); - - if (!(pw = k_getpwuid(uid))) - errx (1, "Can't get your password entry!"); - strlcpy(user_cpass, pw->pw_passwd, sizeof(user_cpass)); - setuid(uid); - if (uid != 0 && setuid(0) != -1) { - fprintf(stderr, "Failed to drop privileges!\n"); - exit(1); - } - /* Now we're no longer running setuid root. */ - strlcpy(login, pw->pw_name, sizeof(login)); - } - -#if defined(HAVE_ARC4RANDOM) - /* do nothing */ -#elif defined(HAVE_SRANDOMDEV) - srandomdev(); -#elif defined(HAVE_RANDOM) - srandom(time(NULL)); -#else - srand (time(NULL)); -#endif - for (i = 0; i < STRING_LENGTH; i++) - STRING[i] = ((unsigned long)my_random() % ('~' - ' ')) + ' '; - - locked_at = time(0); - - snprintf(userprompt, sizeof(userprompt), "User: %s", login); -#ifdef KRB5 - { - krb5_error_code ret; - char *str; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - krb5_get_default_principal(context, &client); - krb5_unparse_name(context, client, &str); - snprintf(userprompt, sizeof(userprompt), "User: %s", str); - free(str); - } -#endif - - override = XtVaAppInitialize(&app, "XNlock", options, XtNumber(options), - &argc, argv, NULL, - XtNoverrideRedirect, True, - NULL); - - XtVaGetApplicationResources(override,(XtPointer)&appres, - resources,XtNumber(resources), - NULL); - /* the background is black and the little guy is white */ - Black = appres.bg; - White = appres.fg; - - if (appres.destroytickets) { -#ifdef KRB5 - /*XXX add krb4 code here */ -#endif - } - - dpy = XtDisplay(override); - - if (dpy == 0) - errx (1, "Error: Can't open display"); - - Width = DisplayWidth(dpy, DefaultScreen(dpy)) + 2; - Height = DisplayHeight(dpy, DefaultScreen(dpy)) + 2; - - for(i = 0; i < ScreenCount(dpy); i++){ - Widget shell, core; - - struct xxx{ - Pixel bg; - }res; - - XtResource Res[] = { - { XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel), - XtOffsetOf(struct xxx, bg), XtRString, "black" } - }; - - if(i == DefaultScreen(dpy)) - continue; - - shell = XtVaAppCreateShell(NULL,NULL, applicationShellWidgetClass, dpy, - XtNscreen, ScreenOfDisplay(dpy, i), - XtNoverrideRedirect, True, - XtNx, -1, - XtNy, -1, - NULL); - - XtVaGetApplicationResources(shell, (XtPointer)&res, - Res, XtNumber(Res), - NULL); - - core = XtVaCreateManagedWidget("_foo", widgetClass, shell, - XtNwidth, DisplayWidth(dpy, i), - XtNheight, DisplayHeight(dpy, i), - XtNbackground, res.bg, - NULL); - XtRealizeWidget(shell); - } - - widget = XtVaCreateManagedWidget("_foo", widgetClass, override, - XtNwidth, Width, - XtNheight, Height, - XtNbackground, Black, - NULL); - - init_words(--argc, ++argv); - init_images(); - - gcvalues.foreground = Black; - gcvalues.background = White; - - - font = appres.font; - gcvalues.font = font->fid; - gcvalues.graphics_exposures = False; - gc = XCreateGC(dpy, DefaultRootWindow(dpy), - GCForeground | GCBackground | GCGraphicsExposures | GCFont, - &gcvalues); - - x = Width / 2; - y = Height / 2; - srand (time(0)); - state = IS_MOVING; - - { - static XtActionsRec actions[] = { - { "ClearWindow", ClearWindow }, - { "GetPasswd", GetPasswd }, - { "RaiseWindow", RaiseWindow }, - }; - XtAppAddActions(app, actions, XtNumber(actions)); - XtOverrideTranslations(widget, - XtParseTranslationTable( - ": ClearWindow() \n" - ": GetPasswd() \n" - ": RaiseWindow() \n" - ": GetPasswd() \n" - ": GetPasswd()")); - } - - XtRealizeWidget(override); - if((i = XGrabPointer(dpy, XtWindow(widget), True, 0, GrabModeAsync, - GrabModeAsync, XtWindow(widget), - None, CurrentTime)) != 0) - errx(1, "Failed to grab pointer (%d)", i); - - if((i = XGrabKeyboard(dpy, XtWindow(widget), True, GrabModeAsync, - GrabModeAsync, CurrentTime)) != 0) - errx(1, "Failed to grab keyboard (%d)", i); - ScreenSaver(1); - XtAppMainLoop(app); - exit(0); -} - diff --git a/kerberosV/src/appl/xnlock/xnlock.cat1 b/kerberosV/src/appl/xnlock/xnlock.cat1 deleted file mode 100644 index 5e95199f2bc..00000000000 --- a/kerberosV/src/appl/xnlock/xnlock.cat1 +++ /dev/null @@ -1,110 +0,0 @@ -XNLOCK(1) XNLOCK(1) - - - -NNAAMMEE - xnlock - amusing lock screen program with message for passers-by - -SSYYNNOOPPSSIISS - xxnnlloocckk [ _o_p_t_i_o_n_s ] [ _m_e_s_s_a_g_e ] - -DDEESSCCRRIIPPTTIIOONN - _x_n_l_o_c_k is a program that acts as a screen saver for workstations run- - ning X11. It also "locks" the screen such that the workstation can be - left unattended without worry that someone else will walk up to it and - mess everything up. When _x_n_l_o_c_k is running, a little man with a big - nose and a hat runs around spewing out messages to the screen. By - default, the messages are "humorous", but that depends on your sense of - humor. - - If a key or mouse button is pressed, a prompt is printed requesting the - user's password. If a RETURN is not typed within 30 seconds, the lit- - tle man resumes running around. - - Text on the command line is used as the message. For example: - % xnlock I'm out to lunch for a couple of hours. - Note the need to quote shell metacharacters. - - In the absence of flags or text, _x_n_l_o_c_k displays random fortunes. - -OOPPTTIIOONNSS - Command line options override all resource specifications. All argu- - ments that are not associated with a command line option is taken to be - message text that the little man will "say" every once in a while. The - resource xxnnlloocckk..tteexxtt may be set to a string. - - --ffnn _f_o_n_t_n_a_m_e - The default font is the first 18 point font in the _n_e_w _c_e_n_t_u_r_y - _s_c_h_o_o_l_b_o_o_k family. While larger fonts are recokmmended over - smaller ones, any font in the server's font list will work. The - resource to use for this option is xxnnlloocckk..ffoonntt. - - --ffiilleennaammee _f_i_l_e_n_a_m_e - Take the message to be displayed from the file _f_i_l_e_n_a_m_e. If - _f_i_l_e_n_a_m_e is not specified, _$_H_O_M_E_/_._m_s_g_f_i_l_e is used. If the con- - tents of the file are changed during runtime, the most recent - text of the file is used (allowing the displayed message to be - altered remotely). Carriage returns within the text are - allowed, but tabs or other control characters are not translated - and should not be used. The resource available for this option - is xxnnlloocckk..ffiillee. - - --aarr Accept root's password to unlock screen. This option is true by - default. The reason for this is so that someone's screen may be - unlocked by autorized users in case of emergency and the person - running the program is still out to lunch. The resource avail- - able for specifying this option is xxnnlloocckk..aacccceeppttRRoooottPPaasssswwdd. - - --nnooaarr Don't accept root's password. This option is for paranoids who - fear their peers might breakin using root's password and remove - their files anyway. Specifying this option on the command line - overrides the xxnnlloocckk..aacccceeppttRRoooottPPaasssswwdd if set to True. - - --iipp Ignore password prompt. The resource available for this option - is xxnnlloocckk..iiggnnoorreePPaasssswwdd. - - --nnooiipp Don't ignore password prompt. This is available in order to - override the resource iiggnnoorreePPaasssswwdd if set to True. - - --ffgg _c_o_l_o_r - Specifies the foreground color. The resource available for this - is xxnnlloocckk..ffoorreeggrroouunndd. - - --bbgg _c_o_l_o_r - Specifies the background color. The resource available for this - is xxnnlloocckk..bbaacckkggrroouunndd. - - --rrvv Reverse the foreground and background colors. The resource for - this is xxvvnnlloocckk..rreevveerrsseeVViiddeeoo. - - --nnoorrvv Don't use reverse video. This is available to override the - reverseVideo resource if set to True. - - --pprroogg _p_r_o_g_r_a_m - Receive message text from the running program _p_r_o_g_r_a_m. If there - are arguments to _p_r_o_g_r_a_m, encase them with the name of the pro- - gram in quotes (e.g. xnlock -t "fortune -o"). The resource for - this is xxnnlloocckk..pprrooggrraamm. - -RREESSOOUURRCCEESS - xnlock.font: fontname - xnlock.foreground: color - xnlock.background: color - xnlock.reverseVideo: True/False - xnlock.text: Some random text string - xnlock.program: program [args] - xnlock.ignorePasswd: True/False - xnlock.acceptRootPasswd: True/False - -FFIILLEESS - _x_n_l_o_c_k executable file - ~/.msgfile default message file - -AAUUTTHHOORR - Dan Heller Copyright (c) 1985, 1990. - The original version of this program was written using pixrects on a - Sun 2 running SunOS 1.1. - - - - 19 April 1990 XNLOCK(1) diff --git a/kerberosV/src/autogen.sh b/kerberosV/src/autogen.sh deleted file mode 100755 index c8ae49af07b..00000000000 --- a/kerberosV/src/autogen.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# to really generate all files you need to run "make distcheck" in a -# object tree, but this will do if you have all parts of the required -# tool-chain installed -autoreconf -f -i || { echo "autoreconf failed: $?"; exit 1; } -find . \( -name '*-private.h' -o -name '*-protos.h' \) -delete diff --git a/kerberosV/src/base/Makefile.am b/kerberosV/src/base/Makefile.am deleted file mode 100644 index 639136f79c3..00000000000 --- a/kerberosV/src/base/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ - -include $(top_srcdir)/Makefile.am.common - -lib_LTLIBRARIES = libheimbase.la -check_PROGRAMS = test_base - -libheimbase_la_LDFLAGS = -version-info 1:0:0 - -if versionscript -libheimbase_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -endif - -include_HEADERS = heimbase.h - -dist_libheimbase_la_SOURCES = \ - array.c \ - baselocl.h \ - bool.c \ - dict.c \ - heimbase.c \ - heimbasepriv.h \ - heimqueue.h \ - null.c \ - number.c \ - string.c - -libheimbase_la_DEPENDENCIES = version-script.map - -test_base_LDADD = $(LIB_heimbase) - -EXTRA_DIST = NTMakefile version-script.map diff --git a/kerberosV/src/base/Makefile.in b/kerberosV/src/base/Makefile.in deleted file mode 100644 index 111904fb388..00000000000 --- a/kerberosV/src/base/Makefile.in +++ /dev/null @@ -1,941 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:38 robert Exp $ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:38 robert Exp $ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -check_PROGRAMS = test_base$(EXEEXT) -@versionscript_TRUE@am__append_1 = $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -subdir = base -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libheimbase_la_LIBADD = -dist_libheimbase_la_OBJECTS = array.lo bool.lo dict.lo heimbase.lo \ - null.lo number.lo string.lo -libheimbase_la_OBJECTS = $(dist_libheimbase_la_OBJECTS) -libheimbase_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libheimbase_la_LDFLAGS) $(LDFLAGS) -o $@ -test_base_SOURCES = test_base.c -test_base_OBJECTS = test_base.$(OBJEXT) -test_base_DEPENDENCIES = $(LIB_heimbase) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(dist_libheimbase_la_SOURCES) test_base.c -DIST_SOURCES = $(dist_libheimbase_la_SOURCES) test_base.c -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -lib_LTLIBRARIES = libheimbase.la -libheimbase_la_LDFLAGS = -version-info 1:0:0 $(am__append_1) -include_HEADERS = heimbase.h -dist_libheimbase_la_SOURCES = \ - array.c \ - baselocl.h \ - bool.c \ - dict.c \ - heimbase.c \ - heimbasepriv.h \ - heimqueue.h \ - null.c \ - number.c \ - string.c - -libheimbase_la_DEPENDENCIES = version-script.map -test_base_LDADD = $(LIB_heimbase) -EXTRA_DIST = NTMakefile version-script.map -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign base/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign base/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libheimbase.la: $(libheimbase_la_OBJECTS) $(libheimbase_la_DEPENDENCIES) - $(libheimbase_la_LINK) -rpath $(libdir) $(libheimbase_la_OBJECTS) $(libheimbase_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -test_base$(EXEEXT): $(test_base_OBJECTS) $(test_base_DEPENDENCIES) - @rm -f test_base$(EXEEXT) - $(LINK) $(test_base_OBJECTS) $(test_base_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bool.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dict.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heimbase.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/number.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_base.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool ctags dist-hook distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-includeHEADERS \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-hook uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/base/NTMakefile b/kerberosV/src/base/NTMakefile deleted file mode 100644 index 0668cd6990a..00000000000 --- a/kerberosV/src/base/NTMakefile +++ /dev/null @@ -1,53 +0,0 @@ -######################################################################## -# -# Copyright (c) 2010, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=base - -!include ../windows/NTMakefile.w32 - -INCFILES=$(INCDIR)\heimbase.h - -libheimbase_OBJS = \ - $(OBJ)\array.obj \ - $(OBJ)\bool.obj \ - $(OBJ)\dict.obj \ - $(OBJ)\heimbase.obj \ - $(OBJ)\null.obj \ - $(OBJ)\number.obj \ - $(OBJ)\string.obj - -$(LIBHEIMBASE): $(libheimbase_OBJS) - $(LIBCON) - -all:: $(INCFILES) $(LIBHEIMBASE) - -clean:: - -$(RM) $(INCFILES) diff --git a/kerberosV/src/base/array.c b/kerberosV/src/base/array.c deleted file mode 100644 index 9266411aabe..00000000000 --- a/kerberosV/src/base/array.c +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Copyright (c) 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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 "baselocl.h" - -/* - * - */ - -struct heim_array_data { - size_t len; - heim_object_t *val; -}; - -static void -array_dealloc(heim_object_t ptr) -{ - heim_array_t array = ptr; - size_t n; - for (n = 0; n < array->len; n++) - heim_release(array->val[n]); - free(array->val); -} - -struct heim_type_data array_object = { - HEIM_TID_ARRAY, - "dict-object", - NULL, - array_dealloc, - NULL, - NULL, - NULL -}; - -/** - * Allocate an array - * - * @return A new allocated array, free with heim_release() - */ - -heim_array_t -heim_array_create(void) -{ - heim_array_t array; - - array = _heim_alloc_object(&array_object, sizeof(*array)); - if (array == NULL) - return NULL; - - array->val = NULL; - array->len = 0; - - return array; -} - -/** - * Get type id of an dict - * - * @return the type id - */ - -heim_tid_t -heim_array_get_type_id(void) -{ - return HEIM_TID_ARRAY; -} - -/** - * Append object to array - * - * @param array array to add too - * @param object the object to add - * - * @return zero if added, errno otherwise - */ - -int -heim_array_append_value(heim_array_t array, heim_object_t object) -{ - heim_object_t *ptr; - - ptr = realloc(array->val, (array->len + 1) * sizeof(array->val[0])); - if (ptr == NULL) - return ENOMEM; - array->val = ptr; - array->val[array->len++] = heim_retain(object); - - return 0; -} - -/** - * Iterate over all objects in array - * - * @param array array to iterate over - * @param fn function to call on each object - * @param ctx context passed to fn - */ - -void -heim_array_iterate_f(heim_array_t array, heim_array_iterator_f_t fn, void *ctx) -{ - size_t n; - for (n = 0; n < array->len; n++) - fn(array->val[n], ctx); -} - -#ifdef __BLOCKS__ -/** - * Iterate over all objects in array - * - * @param array array to iterate over - * @param fn block to call on each object - */ - -void -heim_array_iterate(heim_array_t array, void (^fn)(heim_object_t)) -{ - size_t n; - for (n = 0; n < array->len; n++) - fn(array->val[n]); -} -#endif - -/** - * Get length of array - * - * @param array array to get length of - * - * @return length of array - */ - -size_t -heim_array_get_length(heim_array_t array) -{ - return array->len; -} - -/** - * Copy value of array - * - * @param array array copy object from - * @param idx index of object, 0 based, must be smaller then - * heim_array_get_length() - * - * @return a retained copy of the object - */ - -heim_object_t -heim_array_copy_value(heim_array_t array, size_t idx) -{ - if (idx >= array->len) - heim_abort("index too large"); - return heim_retain(array->val[idx]); -} - -/** - * Delete value at idx - * - * @param array the array to modify - * @param idx the key to delete - */ - -void -heim_array_delete_value(heim_array_t array, size_t idx) -{ - heim_object_t obj; - if (idx >= array->len) - heim_abort("index too large"); - obj = array->val[idx]; - - array->len--; - - if (idx < array->len) - memmove(&array->val[idx], &array->val[idx + 1], - (array->len - idx) * sizeof(array->val[0])); - - heim_release(obj); -} - -#ifdef __BLOCKS__ -/** - * Get value at idx - * - * @param array the array to modify - * @param idx the key to delete - */ - -void -heim_array_filter(heim_array_t array, int (^block)(heim_object_t)) -{ - size_t n = 0; - - while (n < array->len) { - if (block(array->val[n])) { - heim_array_delete_value(array, n); - } else { - n++; - } - } -} - -#endif /* __BLOCKS__ */ diff --git a/kerberosV/src/base/baselocl.h b/kerberosV/src/base/baselocl.h deleted file mode 100644 index 901e8606fd9..00000000000 --- a/kerberosV/src/base/baselocl.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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 "config.h" - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#include -#include -#include -#include -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "heimqueue.h" -#include "heim_threads.h" -#include "heimbase.h" -#include "heimbasepriv.h" - -#ifdef HAVE_DISPATCH_DISPATCH_H -#include -#endif - -#if defined(__GNUC__) && defined(HAVE___SYNC_ADD_AND_FETCH) - -#define heim_base_atomic_inc(x) __sync_add_and_fetch((x), 1) -#define heim_base_atomic_dec(x) __sync_sub_and_fetch((x), 1) -#define heim_base_atomic_type unsigned int -#define heim_base_atomic_max UINT_MAX - -#define heim_base_exchange_pointer(t,v) __sync_lock_test_and_set((t), (v)) - -#elif defined(_WIN32) - -#define heim_base_atomic_inc(x) InterlockedIncrement(x) -#define heim_base_atomic_dec(x) InterlockedDecrement(x) -#define heim_base_atomic_type LONG -#define heim_base_atomic_max MAXLONG - -#define heim_base_exchange_pointer(t,v) InterlockedExchangePointer((t),(v)) - -#else - -#define HEIM_BASE_NEED_ATOMIC_MUTEX 1 -extern HEIMDAL_MUTEX _heim_base_mutex; - -#define heim_base_atomic_type unsigned int - -static inline heim_base_atomic_type -heim_base_atomic_inc(heim_base_atomic_type *x) -{ - heim_base_atomic_type t; - HEIMDAL_MUTEX_lock(&_heim_base_mutex); - t = ++(*x); - HEIMDAL_MUTEX_unlock(&_heim_base_mutex); - return t; -} - -static inline heim_base_atomic_type -heim_base_atomic_dec(heim_base_atomic_type *x) -{ - heim_base_atomic_type t; - HEIMDAL_MUTEX_lock(&_heim_base_mutex); - t = --(*x); - HEIMDAL_MUTEX_unlock(&_heim_base_mutex); - return t; -} - -#define heim_base_atomic_max UINT_MAX - -#endif - -/* tagged strings/object/XXX */ -#define heim_base_is_tagged(x) (((uintptr_t)(x)) & 0x3) - -#define heim_base_is_tagged_object(x) ((((uintptr_t)(x)) & 0x3) == 1) -#define heim_base_make_tagged_object(x, tid) \ - ((heim_object_t)((((uintptr_t)(x)) << 5) | ((tid) << 2) | 0x1)) -#define heim_base_tagged_object_tid(x) ((((uintptr_t)(x)) & 0x1f) >> 2) -#define heim_base_tagged_object_value(x) (((uintptr_t)(x)) >> 5) - -/* - * - */ - -#undef HEIMDAL_NORETURN_ATTRIBUTE -#define HEIMDAL_NORETURN_ATTRIBUTE -#undef HEIMDAL_PRINTF_ATTRIBUTE -#define HEIMDAL_PRINTF_ATTRIBUTE(x) diff --git a/kerberosV/src/base/bool.c b/kerberosV/src/base/bool.c deleted file mode 100644 index 72edcc71ed4..00000000000 --- a/kerberosV/src/base/bool.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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 "baselocl.h" - -struct heim_type_data _heim_bool_object = { - HEIM_TID_BOOL, - "bool-object", - NULL, - NULL, - NULL, - NULL, - NULL -}; - -heim_bool_t -heim_bool_create(int val) -{ - return heim_base_make_tagged_object(!!val, HEIM_TID_BOOL); -} - -int -heim_bool_val(heim_bool_t ptr) -{ - return heim_base_tagged_object_value(ptr); -} diff --git a/kerberosV/src/base/dict.c b/kerberosV/src/base/dict.c deleted file mode 100644 index 1f9d71a0f50..00000000000 --- a/kerberosV/src/base/dict.c +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright (c) 2002, 1997 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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 "baselocl.h" - -struct hashentry { - struct hashentry **prev; - struct hashentry *next; - heim_object_t key; - heim_object_t value; -}; - -struct heim_dict_data { - size_t size; - struct hashentry **tab; -}; - -static void -dict_dealloc(void *ptr) -{ - heim_dict_t dict = ptr; - struct hashentry **h, *g, *i; - - for (h = dict->tab; h < &dict->tab[dict->size]; ++h) { - for (g = h[0]; g; g = i) { - i = g->next; - heim_release(g->key); - heim_release(g->value); - free(g); - } - } - free(dict->tab); -} - -struct heim_type_data dict_object = { - HEIM_TID_DICT, - "dict-object", - NULL, - dict_dealloc, - NULL, - NULL, - NULL -}; - -static size_t -isprime(size_t p) -{ - size_t q, i; - - for(i = 2 ; i < p; i++) { - q = p / i; - - if (i * q == p) - return 0; - if (i * i > p) - return 1; - } - return 1; -} - -static size_t -findprime(size_t p) -{ - if (p % 2 == 0) - p++; - - while (isprime(p) == 0) - p += 2; - - return p; -} - -/** - * Allocate an array - * - * @return A new allocated array, free with heim_release() - */ - -heim_dict_t -heim_dict_create(size_t size) -{ - heim_dict_t dict; - - dict = _heim_alloc_object(&dict_object, sizeof(*dict)); - - dict->size = findprime(size); - if (dict->size == 0) { - heim_release(dict); - return NULL; - } - - dict->tab = calloc(dict->size, sizeof(dict->tab[0])); - if (dict->tab == NULL) { - dict->size = 0; - heim_release(dict); - return NULL; - } - - return dict; -} - -/** - * Get type id of an dict - * - * @return the type id - */ - -heim_tid_t -heim_dict_get_type_id(void) -{ - return HEIM_TID_DICT; -} - -/* Intern search function */ - -static struct hashentry * -_search(heim_dict_t dict, heim_object_t ptr) -{ - unsigned long v = heim_get_hash(ptr); - struct hashentry *p; - - for (p = dict->tab[v % dict->size]; p != NULL; p = p->next) - if (heim_cmp(ptr, p->key) == 0) - return p; - - return NULL; -} - -/** - * Search for element in hash table - * - * @value dict the dict to search in - * @value key the key to search for - * - * @return a retained copy of the value for key or NULL if not found - */ - -heim_object_t -heim_dict_copy_value(heim_dict_t dict, heim_object_t key) -{ - struct hashentry *p; - p = _search(dict, key); - if (p == NULL) - return NULL; - - return heim_retain(p->value); -} - -/** - * Add key and value to dict - * - * @value dict the dict to add too - * @value key the key to add - * @value value the value to add - * - * @return 0 if added, errno if not - */ - -int -heim_dict_add_value(heim_dict_t dict, heim_object_t key, heim_object_t value) -{ - struct hashentry **tabptr, *h; - - h = _search(dict, key); - if (h) { - heim_release(h->value); - h->value = heim_retain(value); - } else { - unsigned long v; - - h = malloc(sizeof(*h)); - if (h == NULL) - return ENOMEM; - - h->key = heim_retain(key); - h->value = heim_retain(value); - - v = heim_get_hash(key); - - tabptr = &dict->tab[v % dict->size]; - h->next = *tabptr; - *tabptr = h; - h->prev = tabptr; - if (h->next) - h->next->prev = &h->next; - } - - return 0; -} - -/** - * Delete element with key key - * - * @value dict the dict to delete from - * @value key the key to delete - */ - -void -heim_dict_delete_key(heim_dict_t dict, heim_object_t key) -{ - struct hashentry *h = _search(dict, key); - - if (h == NULL) - return; - - heim_release(h->key); - heim_release(h->value); - - if ((*(h->prev) = h->next) != NULL) - h->next->prev = h->prev; - - free(h); -} - -/** - * Do something for each element - * - * @value dict the dict to interate over - * @value func the function to search for - * @value arg argument to func - */ - -void -heim_dict_iterate_f(heim_dict_t dict, heim_dict_iterator_f_t func, void *arg) -{ - struct hashentry **h, *g; - - for (h = dict->tab; h < &dict->tab[dict->size]; ++h) - for (g = *h; g; g = g->next) - func(g->key, g->value, arg); -} - -#ifdef __BLOCKS__ -/** - * Do something for each element - * - * @value dict the dict to interate over - * @value func the function to search for - */ - -void -heim_dict_iterate(heim_dict_t dict, void (^func)(heim_object_t, heim_object_t)) -{ - struct hashentry **h, *g; - - for (h = dict->tab; h < &dict->tab[dict->size]; ++h) - for (g = *h; g; g = g->next) - func(g->key, g->value); -} -#endif diff --git a/kerberosV/src/base/heimbase.c b/kerberosV/src/base/heimbase.c deleted file mode 100644 index 7031af9e498..00000000000 --- a/kerberosV/src/base/heimbase.c +++ /dev/null @@ -1,559 +0,0 @@ -/* - * Copyright (c) 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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 "baselocl.h" -#include - -static heim_base_atomic_type tidglobal = HEIM_TID_USER; - -struct heim_base { - heim_type_t isa; - heim_base_atomic_type ref_cnt; - HEIM_TAILQ_ENTRY(heim_base) autorel; - heim_auto_release_t autorelpool; - uintptr_t isaextra[3]; -}; - -/* specialized version of base */ -struct heim_base_mem { - heim_type_t isa; - heim_base_atomic_type ref_cnt; - HEIM_TAILQ_ENTRY(heim_base) autorel; - heim_auto_release_t autorelpool; - const char *name; - void (*dealloc)(void *); - uintptr_t isaextra[1]; -}; - -#define PTR2BASE(ptr) (((struct heim_base *)ptr) - 1) -#define BASE2PTR(ptr) ((void *)(((struct heim_base *)ptr) + 1)) - -#ifdef HEIM_BASE_NEED_ATOMIC_MUTEX -HEIMDAL_MUTEX _heim_base_mutex = HEIMDAL_MUTEX_INITIALIZER; -#endif - -/* - * Auto release structure - */ - -struct heim_auto_release { - HEIM_TAILQ_HEAD(, heim_base) pool; - HEIMDAL_MUTEX pool_mutex; - struct heim_auto_release *parent; -}; - - -/** - * Retain object - * - * @param object to be released, NULL is ok - * - * @return the same object as passed in - */ - -void * -heim_retain(void *ptr) -{ - struct heim_base *p = PTR2BASE(ptr); - - if (ptr == NULL || heim_base_is_tagged(ptr)) - return ptr; - - if (p->ref_cnt == heim_base_atomic_max) - return ptr; - - if ((heim_base_atomic_inc(&p->ref_cnt) - 1) == 0) - heim_abort("resurection"); - return ptr; -} - -/** - * Release object, free is reference count reaches zero - * - * @param object to be released - */ - -void -heim_release(void *ptr) -{ - heim_base_atomic_type old; - struct heim_base *p = PTR2BASE(ptr); - - if (ptr == NULL || heim_base_is_tagged(ptr)) - return; - - if (p->ref_cnt == heim_base_atomic_max) - return; - - old = heim_base_atomic_dec(&p->ref_cnt) + 1; - - if (old > 1) - return; - - if (old == 1) { - heim_auto_release_t ar = p->autorelpool; - /* remove from autorel pool list */ - if (ar) { - p->autorelpool = NULL; - HEIMDAL_MUTEX_lock(&ar->pool_mutex); - HEIM_TAILQ_REMOVE(&ar->pool, p, autorel); - HEIMDAL_MUTEX_unlock(&ar->pool_mutex); - } - if (p->isa->dealloc) - p->isa->dealloc(ptr); - free(p); - } else - heim_abort("over release"); -} - -static heim_type_t tagged_isa[9] = { - &_heim_number_object, - &_heim_null_object, - &_heim_bool_object, - - NULL, - NULL, - NULL, - - NULL, - NULL, - NULL -}; - -heim_type_t -_heim_get_isa(heim_object_t ptr) -{ - struct heim_base *p; - if (heim_base_is_tagged(ptr)) { - if (heim_base_is_tagged_object(ptr)) - return tagged_isa[heim_base_tagged_object_tid(ptr)]; - heim_abort("not a supported tagged type"); - } - p = PTR2BASE(ptr); - return p->isa; -} - -/** - * Get type ID of object - * - * @param object object to get type id of - * - * @return type id of object - */ - -heim_tid_t -heim_get_tid(heim_object_t ptr) -{ - heim_type_t isa = _heim_get_isa(ptr); - return isa->tid; -} - -/** - * Get hash value of object - * - * @param object object to get hash value for - * - * @return a hash value - */ - -unsigned long -heim_get_hash(heim_object_t ptr) -{ - heim_type_t isa = _heim_get_isa(ptr); - if (isa->hash) - return isa->hash(ptr); - return (unsigned long)ptr; -} - -/** - * Compare two objects, returns 0 if equal, can use used for qsort() - * and friends. - * - * @param a first object to compare - * @param b first object to compare - * - * @return 0 if objects are equal - */ - -int -heim_cmp(heim_object_t a, heim_object_t b) -{ - heim_tid_t ta, tb; - heim_type_t isa; - - ta = heim_get_tid(a); - tb = heim_get_tid(b); - - if (ta != tb) - return ta - tb; - - isa = _heim_get_isa(a); - - if (isa->cmp) - return isa->cmp(a, b); - - return (uintptr_t)a - (uintptr_t)b; -} - -/* - * Private - allocates an memory object - */ - -static void -memory_dealloc(void *ptr) -{ - struct heim_base_mem *p = (struct heim_base_mem *)PTR2BASE(ptr); - if (p->dealloc) - p->dealloc(ptr); -} - -struct heim_type_data memory_object = { - HEIM_TID_MEMORY, - "memory-object", - NULL, - memory_dealloc, - NULL, - NULL, - NULL -}; - -void * -heim_alloc(size_t size, const char *name, heim_type_dealloc dealloc) -{ - /* XXX use posix_memalign */ - - struct heim_base_mem *p = calloc(1, size + sizeof(*p)); - if (p == NULL) - return NULL; - p->isa = &memory_object; - p->ref_cnt = 1; - p->name = name; - p->dealloc = dealloc; - return BASE2PTR(p); -} - -heim_type_t -_heim_create_type(const char *name, - heim_type_init init, - heim_type_dealloc dealloc, - heim_type_copy copy, - heim_type_cmp cmp, - heim_type_hash hash) -{ - heim_type_t type; - - type = calloc(1, sizeof(*type)); - if (type == NULL) - return NULL; - - type->tid = heim_base_atomic_inc(&tidglobal); - type->name = name; - type->init = init; - type->dealloc = dealloc; - type->copy = copy; - type->cmp = cmp; - type->hash = hash; - - return type; -} - -heim_object_t -_heim_alloc_object(heim_type_t type, size_t size) -{ - /* XXX should use posix_memalign */ - struct heim_base *p = calloc(1, size + sizeof(*p)); - if (p == NULL) - return NULL; - p->isa = type; - p->ref_cnt = 1; - - return BASE2PTR(p); -} - -heim_tid_t -_heim_type_get_tid(heim_type_t type) -{ - return type->tid; -} - -/** - * Call func once and only once - * - * @param once pointer to a heim_base_once_t - * @param ctx context passed to func - * @param func function to be called - */ - -void -heim_base_once_f(heim_base_once_t *once, void *ctx, void (*func)(void *)) -{ -#ifdef HAVE_DISPATCH_DISPATCH_H - dispatch_once_f(once, ctx, func); -#else - static HEIMDAL_MUTEX mutex = HEIMDAL_MUTEX_INITIALIZER; - HEIMDAL_MUTEX_lock(&mutex); - if (*once == 0) { - *once = 1; - HEIMDAL_MUTEX_unlock(&mutex); - func(ctx); - HEIMDAL_MUTEX_lock(&mutex); - *once = 2; - HEIMDAL_MUTEX_unlock(&mutex); - } else if (*once == 2) { - HEIMDAL_MUTEX_unlock(&mutex); - } else { - HEIMDAL_MUTEX_unlock(&mutex); - while (1) { - struct timeval tv = { 0, 1000 }; - select(0, NULL, NULL, NULL, &tv); - HEIMDAL_MUTEX_lock(&mutex); - if (*once == 2) - break; - HEIMDAL_MUTEX_unlock(&mutex); - } - HEIMDAL_MUTEX_unlock(&mutex); - } -#endif -} - -/** - * Abort and log the failure (using syslog) - */ - -void -heim_abort(const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - heim_abortv(fmt, ap); - va_end(ap); -} - -/** - * Abort and log the failure (using syslog) - */ - -void -heim_abortv(const char *fmt, va_list ap) -{ - static char str[1024]; - - vsnprintf(str, sizeof(str), fmt, ap); - syslog(LOG_ERR, "heim_abort: %s", str); - abort(); -} - -/* - * - */ - -static int ar_created = 0; -static HEIMDAL_thread_key ar_key; - -struct ar_tls { - struct heim_auto_release *head; - struct heim_auto_release *current; - HEIMDAL_MUTEX tls_mutex; -}; - -static void -ar_tls_delete(void *ptr) -{ - struct ar_tls *tls = ptr; - if (tls->head) - heim_release(tls->head); - free(tls); -} - -static void -init_ar_tls(void *ptr) -{ - int ret; - HEIMDAL_key_create(&ar_key, ar_tls_delete, ret); - if (ret == 0) - ar_created = 1; -} - -static struct ar_tls * -autorel_tls(void) -{ - static heim_base_once_t once = HEIM_BASE_ONCE_INIT; - struct ar_tls *arp; - int ret; - - heim_base_once_f(&once, NULL, init_ar_tls); - if (!ar_created) - return NULL; - - arp = HEIMDAL_getspecific(ar_key); - if (arp == NULL) { - - arp = calloc(1, sizeof(*arp)); - if (arp == NULL) - return NULL; - HEIMDAL_setspecific(ar_key, arp, ret); - if (ret) { - free(arp); - return NULL; - } - } - return arp; - -} - -static void -autorel_dealloc(void *ptr) -{ - heim_auto_release_t ar = ptr; - struct ar_tls *tls; - - tls = autorel_tls(); - if (tls == NULL) - heim_abort("autorelease pool released on thread w/o autorelease inited"); - - heim_auto_release_drain(ar); - - if (!HEIM_TAILQ_EMPTY(&ar->pool)) - heim_abort("pool not empty after draining"); - - HEIMDAL_MUTEX_lock(&tls->tls_mutex); - if (tls->current != ptr) - heim_abort("autorelease not releaseing top pool"); - - if (tls->current != tls->head) - tls->current = ar->parent; - HEIMDAL_MUTEX_unlock(&tls->tls_mutex); -} - -static int -autorel_cmp(void *a, void *b) -{ - return (a == b); -} - -static unsigned long -autorel_hash(void *ptr) -{ - return (unsigned long)ptr; -} - - -static struct heim_type_data _heim_autorel_object = { - HEIM_TID_AUTORELEASE, - "autorelease-pool", - NULL, - autorel_dealloc, - NULL, - autorel_cmp, - autorel_hash -}; - -/** - * - */ - -heim_auto_release_t -heim_auto_release_create(void) -{ - struct ar_tls *tls = autorel_tls(); - heim_auto_release_t ar; - - if (tls == NULL) - heim_abort("Failed to create/get autorelease head"); - - ar = _heim_alloc_object(&_heim_autorel_object, sizeof(struct heim_auto_release)); - if (ar) { - HEIMDAL_MUTEX_lock(&tls->tls_mutex); - if (tls->head == NULL) - tls->head = ar; - ar->parent = tls->current; - tls->current = ar; - HEIMDAL_MUTEX_unlock(&tls->tls_mutex); - } - - return ar; -} - -/** - * Mark the current object as a - */ - -void -heim_auto_release(heim_object_t ptr) -{ - struct heim_base *p = PTR2BASE(ptr); - struct ar_tls *tls = autorel_tls(); - heim_auto_release_t ar; - - if (ptr == NULL || heim_base_is_tagged(ptr)) - return; - - /* drop from old pool */ - if ((ar = p->autorelpool) != NULL) { - HEIMDAL_MUTEX_lock(&ar->pool_mutex); - HEIM_TAILQ_REMOVE(&ar->pool, p, autorel); - p->autorelpool = NULL; - HEIMDAL_MUTEX_unlock(&ar->pool_mutex); - } - - if (tls == NULL || (ar = tls->current) == NULL) - heim_abort("no auto relase pool in place, would leak"); - - HEIMDAL_MUTEX_lock(&ar->pool_mutex); - HEIM_TAILQ_INSERT_HEAD(&ar->pool, p, autorel); - p->autorelpool = ar; - HEIMDAL_MUTEX_unlock(&ar->pool_mutex); -} - -/** - * - */ - -void -heim_auto_release_drain(heim_auto_release_t autorel) -{ - heim_object_t obj; - - /* release all elements on the tail queue */ - - HEIMDAL_MUTEX_lock(&autorel->pool_mutex); - while(!HEIM_TAILQ_EMPTY(&autorel->pool)) { - obj = HEIM_TAILQ_FIRST(&autorel->pool); - HEIMDAL_MUTEX_unlock(&autorel->pool_mutex); - heim_release(BASE2PTR(obj)); - HEIMDAL_MUTEX_lock(&autorel->pool_mutex); - } - HEIMDAL_MUTEX_unlock(&autorel->pool_mutex); -} diff --git a/kerberosV/src/base/heimbase.h b/kerberosV/src/base/heimbase.h deleted file mode 100644 index f1ca2317845..00000000000 --- a/kerberosV/src/base/heimbase.h +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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. - */ - -#ifndef HEIM_BASE_H -#define HEIM_BASE_H 1 - -#include -#include -#include -#include - -typedef void * heim_object_t; -typedef unsigned int heim_tid_t; -typedef heim_object_t heim_bool_t; -typedef heim_object_t heim_null_t; -#define HEIM_BASE_ONCE_INIT 0 -typedef long heim_base_once_t; /* XXX arch dependant */ - -#if !defined(__has_extension) -#define __has_extension(x) 0 -#endif - -#define HEIM_REQUIRE_GNUC(m,n,p) \ - (((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100) + __GNUC_PATCHLEVEL__) >= \ - (((m) * 10000) + ((n) * 100) + (p))) - - -#if __has_extension(__builtin_expect) || HEIM_REQUIRE_GNUC(3,0,0) -#define heim_builtin_expect(_op,_res) __builtin_expect(_op,_res) -#else -#define heim_builtin_expect(_op,_res) (_op) -#endif - - -void * heim_retain(heim_object_t); -void heim_release(heim_object_t); - -typedef void (*heim_type_dealloc)(void *); - -void * -heim_alloc(size_t size, const char *name, heim_type_dealloc dealloc); - -heim_tid_t -heim_get_tid(heim_object_t object); - -int -heim_cmp(heim_object_t a, heim_object_t b); - -unsigned long -heim_get_hash(heim_object_t ptr); - -void -heim_base_once_f(heim_base_once_t *, void *, void (*)(void *)); - -void -heim_abort(const char *fmt, ...) - HEIMDAL_NORETURN_ATTRIBUTE - HEIMDAL_PRINTF_ATTRIBUTE((printf, 1, 2)); - -void -heim_abortv(const char *fmt, va_list ap) - HEIMDAL_NORETURN_ATTRIBUTE - HEIMDAL_PRINTF_ATTRIBUTE((printf, 1, 0)); - -#define heim_assert(e,t) \ - (heim_builtin_expect(!(e), 0) ? heim_abort(t ":" #e) : (void)0) - -/* - * - */ - -heim_null_t -heim_null_create(void); - -heim_bool_t -heim_bool_create(int); - -int -heim_bool_val(heim_bool_t); - -/* - * Array - */ - -typedef struct heim_array_data *heim_array_t; - -heim_array_t heim_array_create(void); -heim_tid_t heim_array_get_type_id(void); - -typedef void (*heim_array_iterator_f_t)(heim_object_t, void *); - -int heim_array_append_value(heim_array_t, heim_object_t); -void heim_array_iterate_f(heim_array_t, heim_array_iterator_f_t, void *); -#ifdef __BLOCKS__ -void heim_array_iterate(heim_array_t, void (^)(heim_object_t)); -#endif -size_t heim_array_get_length(heim_array_t); -heim_object_t - heim_array_copy_value(heim_array_t, size_t); -void heim_array_delete_value(heim_array_t, size_t); -#ifdef __BLOCKS__ -void heim_array_filter(heim_array_t, int (^)(heim_object_t)); -#endif - -/* - * Dict - */ - -typedef struct heim_dict_data *heim_dict_t; - -heim_dict_t heim_dict_create(size_t size); -heim_tid_t heim_dict_get_type_id(void); - -typedef void (*heim_dict_iterator_f_t)(heim_object_t, heim_object_t, void *); - -int heim_dict_add_value(heim_dict_t, heim_object_t, heim_object_t); -void heim_dict_iterate_f(heim_dict_t, heim_dict_iterator_f_t, void *); -#ifdef __BLOCKS__ -void heim_dict_iterate(heim_dict_t, void (^)(heim_object_t, heim_object_t)); -#endif - -heim_object_t - heim_dict_copy_value(heim_dict_t, heim_object_t); -void heim_dict_delete_key(heim_dict_t, heim_object_t); - -/* - * String - */ - -typedef struct heim_string_data *heim_string_t; - -heim_string_t heim_string_create(const char *); -heim_tid_t heim_string_get_type_id(void); -const char * heim_string_get_utf8(heim_string_t); - -/* - * Number - */ - -typedef struct heim_number_data *heim_number_t; - -heim_number_t heim_number_create(int); -heim_tid_t heim_number_get_type_id(void); -int heim_number_get_int(heim_number_t); - -/* - * - */ - -typedef struct heim_auto_release * heim_auto_release_t; - -heim_auto_release_t heim_auto_release_create(void); -void heim_auto_release_drain(heim_auto_release_t); -void heim_auto_release(heim_object_t); - -#endif /* HEIM_BASE_H */ diff --git a/kerberosV/src/base/heimbasepriv.h b/kerberosV/src/base/heimbasepriv.h deleted file mode 100644 index 772962548f4..00000000000 --- a/kerberosV/src/base/heimbasepriv.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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. - */ - -typedef void (*heim_type_init)(void *); -typedef heim_object_t (*heim_type_copy)(void *); -typedef int (*heim_type_cmp)(void *, void *); -typedef unsigned long (*heim_type_hash)(void *); - -typedef struct heim_type_data *heim_type_t; - -enum { - HEIM_TID_NUMBER = 0, - HEIM_TID_NULL = 1, - HEIM_TID_BOOL = 2, - HEIM_TID_TAGGED_UNUSED2 = 3, - HEIM_TID_TAGGED_UNUSED3 = 4, - HEIM_TID_TAGGED_UNUSED4 = 5, - HEIM_TID_TAGGED_UNUSED5 = 6, - HEIM_TID_TAGGED_UNUSED6 = 7, - HEIM_TID_MEMORY = 128, - HEIM_TID_ARRAY = 129, - HEIM_TID_DICT = 130, - HEIM_TID_STRING = 131, - HEIM_TID_AUTORELEASE = 132, - HEIM_TID_USER = 255 - -}; - -struct heim_type_data { - heim_tid_t tid; - const char *name; - heim_type_init init; - heim_type_dealloc dealloc; - heim_type_copy copy; - heim_type_cmp cmp; - heim_type_hash hash; -}; - -heim_type_t _heim_get_isa(heim_object_t); - -heim_type_t -_heim_create_type(const char *name, - heim_type_init init, - heim_type_dealloc dealloc, - heim_type_copy copy, - heim_type_cmp cmp, - heim_type_hash hash); - -heim_object_t -_heim_alloc_object(heim_type_t type, size_t size); - -heim_tid_t -_heim_type_get_tid(heim_type_t type); - -/* tagged tid */ -extern struct heim_type_data _heim_null_object; -extern struct heim_type_data _heim_bool_object; -extern struct heim_type_data _heim_number_object; -extern struct heim_type_data _heim_string_object; diff --git a/kerberosV/src/base/heimqueue.h b/kerberosV/src/base/heimqueue.h deleted file mode 100644 index 8d4f3276616..00000000000 --- a/kerberosV/src/base/heimqueue.h +++ /dev/null @@ -1,167 +0,0 @@ -/* $NetBSD: queue.h,v 1.38 2004/04/18 14:12:05 lukem Exp $ */ -/* $Id: heimqueue.h,v 1.1 2013/06/17 19:11:38 robert Exp $ */ - -/* - * Copyright (c) 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. 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. - * - * @(#)queue.h 8.5 (Berkeley) 8/20/94 - */ - -#ifndef _HEIM_QUEUE_H_ -#define _HEIM_QUEUE_H_ - -/* - * Tail queue definitions. - */ -#define HEIM_TAILQ_HEAD(name, type) \ -struct name { \ - struct type *tqh_first; /* first element */ \ - struct type **tqh_last; /* addr of last next element */ \ -} - -#define HEIM_TAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).tqh_first } -#define HEIM_TAILQ_ENTRY(type) \ -struct { \ - struct type *tqe_next; /* next element */ \ - struct type **tqe_prev; /* address of previous next element */ \ -} - -/* - * Tail queue functions. - */ -#if defined(_KERNEL) && defined(QUEUEDEBUG) -#define QUEUEDEBUG_HEIM_TAILQ_INSERT_HEAD(head, elm, field) \ - if ((head)->tqh_first && \ - (head)->tqh_first->field.tqe_prev != &(head)->tqh_first) \ - panic("HEIM_TAILQ_INSERT_HEAD %p %s:%d", (head), __FILE__, __LINE__); -#define QUEUEDEBUG_HEIM_TAILQ_INSERT_TAIL(head, elm, field) \ - if (*(head)->tqh_last != NULL) \ - panic("HEIM_TAILQ_INSERT_TAIL %p %s:%d", (head), __FILE__, __LINE__); -#define QUEUEDEBUG_HEIM_TAILQ_OP(elm, field) \ - if ((elm)->field.tqe_next && \ - (elm)->field.tqe_next->field.tqe_prev != \ - &(elm)->field.tqe_next) \ - panic("HEIM_TAILQ_* forw %p %s:%d", (elm), __FILE__, __LINE__);\ - if (*(elm)->field.tqe_prev != (elm)) \ - panic("HEIM_TAILQ_* back %p %s:%d", (elm), __FILE__, __LINE__); -#define QUEUEDEBUG_HEIM_TAILQ_PREREMOVE(head, elm, field) \ - if ((elm)->field.tqe_next == NULL && \ - (head)->tqh_last != &(elm)->field.tqe_next) \ - panic("HEIM_TAILQ_PREREMOVE head %p elm %p %s:%d", \ - (head), (elm), __FILE__, __LINE__); -#define QUEUEDEBUG_HEIM_TAILQ_POSTREMOVE(elm, field) \ - (elm)->field.tqe_next = (void *)1L; \ - (elm)->field.tqe_prev = (void *)1L; -#else -#define QUEUEDEBUG_HEIM_TAILQ_INSERT_HEAD(head, elm, field) -#define QUEUEDEBUG_HEIM_TAILQ_INSERT_TAIL(head, elm, field) -#define QUEUEDEBUG_HEIM_TAILQ_OP(elm, field) -#define QUEUEDEBUG_HEIM_TAILQ_PREREMOVE(head, elm, field) -#define QUEUEDEBUG_HEIM_TAILQ_POSTREMOVE(elm, field) -#endif - -#define HEIM_TAILQ_INIT(head) do { \ - (head)->tqh_first = NULL; \ - (head)->tqh_last = &(head)->tqh_first; \ -} while (/*CONSTCOND*/0) - -#define HEIM_TAILQ_INSERT_HEAD(head, elm, field) do { \ - QUEUEDEBUG_HEIM_TAILQ_INSERT_HEAD((head), (elm), field) \ - if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ - (head)->tqh_first->field.tqe_prev = \ - &(elm)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - (head)->tqh_first = (elm); \ - (elm)->field.tqe_prev = &(head)->tqh_first; \ -} while (/*CONSTCOND*/0) - -#define HEIM_TAILQ_INSERT_TAIL(head, elm, field) do { \ - QUEUEDEBUG_HEIM_TAILQ_INSERT_TAIL((head), (elm), field) \ - (elm)->field.tqe_next = NULL; \ - (elm)->field.tqe_prev = (head)->tqh_last; \ - *(head)->tqh_last = (elm); \ - (head)->tqh_last = &(elm)->field.tqe_next; \ -} while (/*CONSTCOND*/0) - -#define HEIM_TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - QUEUEDEBUG_HEIM_TAILQ_OP((listelm), field) \ - if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ - (elm)->field.tqe_next->field.tqe_prev = \ - &(elm)->field.tqe_next; \ - else \ - (head)->tqh_last = &(elm)->field.tqe_next; \ - (listelm)->field.tqe_next = (elm); \ - (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ -} while (/*CONSTCOND*/0) - -#define HEIM_TAILQ_INSERT_BEFORE(listelm, elm, field) do { \ - QUEUEDEBUG_HEIM_TAILQ_OP((listelm), field) \ - (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ - (elm)->field.tqe_next = (listelm); \ - *(listelm)->field.tqe_prev = (elm); \ - (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ -} while (/*CONSTCOND*/0) - -#define HEIM_TAILQ_REMOVE(head, elm, field) do { \ - QUEUEDEBUG_HEIM_TAILQ_PREREMOVE((head), (elm), field) \ - QUEUEDEBUG_HEIM_TAILQ_OP((elm), field) \ - if (((elm)->field.tqe_next) != NULL) \ - (elm)->field.tqe_next->field.tqe_prev = \ - (elm)->field.tqe_prev; \ - else \ - (head)->tqh_last = (elm)->field.tqe_prev; \ - *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ - QUEUEDEBUG_HEIM_TAILQ_POSTREMOVE((elm), field); \ -} while (/*CONSTCOND*/0) - -#define HEIM_TAILQ_FOREACH(var, head, field) \ - for ((var) = ((head)->tqh_first); \ - (var); \ - (var) = ((var)->field.tqe_next)) - -#define HEIM_TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -/* - * Tail queue access methods. - */ -#define HEIM_TAILQ_EMPTY(head) ((head)->tqh_first == NULL) -#define HEIM_TAILQ_FIRST(head) ((head)->tqh_first) -#define HEIM_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) - -#define HEIM_TAILQ_LAST(head, headname) \ - (*(((struct headname *)((head)->tqh_last))->tqh_last)) -#define HEIM_TAILQ_PREV(elm, headname, field) \ - (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) - - -#endif /* !_HEIM_QUEUE_H_ */ diff --git a/kerberosV/src/base/null.c b/kerberosV/src/base/null.c deleted file mode 100644 index 66731aad261..00000000000 --- a/kerberosV/src/base/null.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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 "baselocl.h" - -struct heim_type_data _heim_null_object = { - HEIM_TID_NULL, - "null-object", - NULL, - NULL, - NULL, - NULL, - NULL -}; - -heim_null_t -heim_null_create(void) -{ - return heim_base_make_tagged_object(0, HEIM_TID_NULL); -} diff --git a/kerberosV/src/base/number.c b/kerberosV/src/base/number.c deleted file mode 100644 index 72631a531ce..00000000000 --- a/kerberosV/src/base/number.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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 "baselocl.h" - -static void -number_dealloc(void *ptr) -{ -} - -static int -number_cmp(void *a, void *b) -{ - int na, nb; - - if (heim_base_is_tagged_object(a)) - na = heim_base_tagged_object_value(a); - else - na = *(int *)a; - - if (heim_base_is_tagged_object(b)) - nb = heim_base_tagged_object_value(b); - else - nb = *(int *)b; - - return na - nb; -} - -static unsigned long -number_hash(void *ptr) -{ - if (heim_base_is_tagged_object(ptr)) - return heim_base_tagged_object_value(ptr); - return (unsigned long)*(int *)ptr; -} - -struct heim_type_data _heim_number_object = { - HEIM_TID_NUMBER, - "number-object", - NULL, - number_dealloc, - NULL, - number_cmp, - number_hash -}; - -/** - * Create a number object - * - * @param the number to contain in the object - * - * @return a number object - */ - -heim_number_t -heim_number_create(int number) -{ - heim_number_t n; - - if (number < 0xffffff && number >= 0) - return heim_base_make_tagged_object(number, HEIM_TID_NUMBER); - - n = _heim_alloc_object(&_heim_number_object, sizeof(int)); - if (n) - *((int *)n) = number; - return n; -} - -/** - * Return the type ID of number objects - * - * @return type id of number objects - */ - -heim_tid_t -heim_number_get_type_id(void) -{ - return HEIM_TID_NUMBER; -} - -/** - * Get the int value of the content - * - * @param number the number object to get the value from - * - * @return an int - */ - -int -heim_number_get_int(heim_number_t number) -{ - if (heim_base_is_tagged_object(number)) - return heim_base_tagged_object_value(number); - return *(int *)number; -} diff --git a/kerberosV/src/base/string.c b/kerberosV/src/base/string.c deleted file mode 100644 index 11e8841153b..00000000000 --- a/kerberosV/src/base/string.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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 "baselocl.h" -#include - -static void -string_dealloc(void *ptr) -{ -} - -static int -string_cmp(void *a, void *b) -{ - return strcmp(a, b); -} - -static unsigned long -string_hash(void *ptr) -{ - const char *s = ptr; - unsigned long n; - - for (n = 0; *s; ++s) - n += *s; - return n; -} - -struct heim_type_data _heim_string_object = { - HEIM_TID_STRING, - "string-object", - NULL, - string_dealloc, - NULL, - string_cmp, - string_hash -}; - -/** - * Create a string object - * - * @param string the string to create, must be an utf8 string - * - * @return string object - */ - -heim_string_t -heim_string_create(const char *string) -{ - size_t len = strlen(string); - heim_string_t s; - - s = _heim_alloc_object(&_heim_string_object, len + 1); - if (s) - memcpy(s, string, len + 1); - return s; -} - -/** - * Return the type ID of string objects - * - * @return type id of string objects - */ - -heim_tid_t -heim_string_get_type_id(void) -{ - return HEIM_TID_STRING; -} - -/** - * Get the string value of the content. - * - * @param string the string object to get the value from - * - * @return a utf8 string - */ - -const char * -heim_string_get_utf8(heim_string_t string) -{ - return (const char *)string; -} diff --git a/kerberosV/src/base/test_base.c b/kerberosV/src/base/test_base.c deleted file mode 100644 index 320512bf894..00000000000 --- a/kerberosV/src/base/test_base.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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 -#include - -#include "heimbase.h" -#include "heimbasepriv.h" - -static void -memory_free(heim_object_t obj) -{ -} - -static int -test_memory(void) -{ - void *ptr; - - ptr = heim_alloc(10, "memory", memory_free); - - heim_retain(ptr); - heim_release(ptr); - - heim_retain(ptr); - heim_release(ptr); - - heim_release(ptr); - - ptr = heim_alloc(10, "memory", NULL); - heim_release(ptr); - - return 0; -} - -static int -test_dict(void) -{ - heim_dict_t dict; - heim_number_t a1 = heim_number_create(1); - heim_string_t a2 = heim_string_create("hejsan"); - heim_number_t a3 = heim_number_create(3); - heim_string_t a4 = heim_string_create("foosan"); - - dict = heim_dict_create(10); - - heim_dict_add_value(dict, a1, a2); - heim_dict_add_value(dict, a3, a4); - - heim_dict_delete_key(dict, a3); - heim_dict_delete_key(dict, a1); - - heim_release(a1); - heim_release(a2); - heim_release(a3); - heim_release(a4); - - heim_release(dict); - - return 0; -} - -static int -test_auto_release(void) -{ - heim_auto_release_t ar1, ar2; - heim_number_t n1; - heim_string_t s1; - - ar1 = heim_auto_release_create(); - - s1 = heim_string_create("hejsan"); - heim_auto_release(s1); - - n1 = heim_number_create(1); - heim_auto_release(n1); - - ar2 = heim_auto_release_create(); - - n1 = heim_number_create(1); - heim_auto_release(n1); - - heim_release(ar2); - heim_release(ar1); - - return 0; -} - -static int -test_string(void) -{ - heim_string_t s1, s2; - const char *string = "hejsan"; - - s1 = heim_string_create(string); - s2 = heim_string_create(string); - - if (heim_cmp(s1, s2) != 0) { - printf("the same string is not the same\n"); - exit(1); - } - - heim_release(s1); - heim_release(s2); - - return 0; -} - -int -main(int argc, char **argv) -{ - int res = 0; - - res |= test_memory(); - res |= test_dict(); - res |= test_auto_release(); - res |= test_string(); - - return res; -} diff --git a/kerberosV/src/base/version-script.map b/kerberosV/src/base/version-script.map deleted file mode 100644 index 007052baeb0..00000000000 --- a/kerberosV/src/base/version-script.map +++ /dev/null @@ -1,28 +0,0 @@ -HEIMDAL_BASE_1.0 { - global: - heim_abort; - heim_alloc; - heim_array_append_value; - heim_array_copy_value; - heim_array_create; - heim_array_delete_value; - heim_array_get_length; - heim_array_iterate_f; - heim_auto_release; - heim_auto_release_create; - heim_auto_release_drain; - heim_base_once_f; - heim_cmp; - heim_dict_add_value; - heim_dict_copy_value; - heim_dict_create; - heim_dict_delete_key; - heim_dict_iterate_f; - heim_release; - heim_retain; - heim_string_create; - heim_string_get_utf8; - heim_number_create; - local: - *; -}; diff --git a/kerberosV/src/cf/ChangeLog b/kerberosV/src/cf/ChangeLog deleted file mode 100644 index 8bd0b3e2f4d..00000000000 --- a/kerberosV/src/cf/ChangeLog +++ /dev/null @@ -1,1295 +0,0 @@ -2008-07-26 Love Hörnquist Åstrand - - * krb-ipv6.m4: Patch from Björn Schlögl to enable disable-ness of - ipv6. - -2008-05-20 Love Hörnquist Åstrand - - * sunos.m4: Detect solaris2.11 and later and assume its sunos=58. - Bug report from Klas Heggemann. - -2008-05-05 Love Hörnquist Åstrand - - * version-script.m4: Add -rpath to avoid building a convince - library, also sprinkle some other options to make the link line - more like automake's. - -2008-04-29 Love Hörnquist Åstrand - - * version-script.m4: use libtool to probe for version script to - make it work on amd64/ia64 where -fpic in needed to build shared - objects. - -2008-04-24 Björn Sandell - - * pthreads.m4: macros for OpenBSD - -2008-04-17 Love Hörnquist Åstrand - - * make-proto.pl: Define both export variables. - - * win32.m4: Export _FUNCTION and _VARIABLE for _win32 magic - - * krb-ipv6.m4: Rename cache variable to AC_CACHE_CHECK to make the - cached. - - * win32.m4: replace _export with __declspec(dllexport) - - * make-proto.pl: Add __declspec(dllimport) to the exported - functions. - -2008-04-07 Love Hörnquist Åstrand - - * wflags.m4: Add -Wstrict-overflow=5 as an example. - -2008-03-25 Love Hörnquist Åstrand - - * install-catman.sh: Match man_MANS = files with directories in - them. - -2008-02-23 Love Hörnquist Åstrand - - * make-proto.pl: Handle c-comments. - - * Makefile.am.common: Make DEFAULT_INCLUDES work better, avoid - picking up the wrong headerfiles. $(top_builddir)/include vs - ${builddir}. - -2008-01-21 Love Hörnquist Åstrand - - * Makefile.am.common: remove the check-symbols check - - * check-symbols.sh: removed, use version script instead - -2007-10-01 Love Hörnquist Åstrand - - * crypto.m4: openssl might require -ldl too, so lets check that. - -2007-07-31 Love Hörnquist Åstrand - - * Makefile.am.common (check-local::): exit on failure to perform - test. - -2007-07-28 Love Hörnquist Åstrand - - * Makefile.am.common (check-local): also check that --help works. - -2007-07-17 Love Hörnquist Åstrand - - * crypto.m4: depend on EVP_CIPHER_iv_length - -2007-06-27 Love Hörnquist Åstrand - - * Makefile.am.common: Need absolute reference to the top source - directory and top build directory. - -2007-06-20 Love Hörnquist Åstrand - - * wflags.m4: Add --enable-developer and make it cause -Werror to - be included. - -2007-06-18 Love Hörnquist Åstrand - - * Makefile.am.common: Merge from samba config. - - * Makefile.am.common (makedir-in-tree): depend on INFO_DEPS. - - * valgrind-suppressions: Unknown suppression in runtime link - editor - -2007-06-08 Love Hörnquist Åstrand - - * Makefile.am.common: Add heimdal-lorikeet target distdir-in-tree - -2007-06-04 Love Hörnquist Åstrand - - * framework-security.m4: test for -framework Security - -2007-05-10 Love Hörnquist Åstrand - - * roken-frag.m4: we have a fnmatch.h only if there is a working - implementation and a header file. If we do use roken, lets use our - own headerfile that does symbol renaming. - -2007-04-19 Love Hörnquist Åstrand - - * version-script.m4: check if ld supports --version-script - -2007-04-11 Love Hörnquist Åstrand - - * roken-frag.m4: drop broken-getnameinfo.m4 - - * roken-frag.m4: drop test for broken getnameinfo, that old aix is - no longer relevant. - -2007-02-16 Love Hörnquist Åstrand - - * install-catman.sh: Stop overwriting cmd. - -2007-01-15 Love Hörnquist Åstrand - - * install-catman.sh: Use test instead of [. - - * install-catman.sh: Use = instead of ==, make solaris more happy. - -2007-01-08 Love Hörnquist Åstrand - - * roken-frag.m4: More headerfiles for iruserok prototype check. - - * check-symbols.sh: Add fc_softc for AIX as ignore syms. - -2007-01-04 Love Hörnquist Åstrand - - * roken-frag.m4: Check if iruserok needs a prototype. - -2006-12-06 Love Hörnquist Åstrand - - * check-compile-et.m4: set automake symbol COM_ERR when we build - local com_err - -2006-11-16 Love Hörnquist Åstrand - - * valgrind-suppressions: We shouldn't be running /bin/ls under - valgrind, but for now, at least make it easier to see any other - warnings. From Andrew Bartlett. - -2006-10-22 Love Hörnquist Åstrand - - * Makefile.am.common: Add target for valgrind debugging - - * valgrind-suppressions: valgrind suppressions - -2006-10-21 Love Hörnquist Åstrand - - * check-lex.m4: Borrow test for autoconf cvs to help hpux hosts - -2006-10-20 Love Hörnquist Åstrand - - * Makefile.am.common: provide uninstall hook for cat/manpages. - - * install-catman.sh: provide uninstall command - -2006-10-19 Love Hörnquist Åstrand - - * roken-frag.m4: Add check for timegm. - - * roken-frag.m4: Include sys/types.h for sys/socket.h and netdb.h. - -2006-10-07 Love Hörnquist Åstrand - - * Makefile.am.common (install-build-headers): make this function - convoluted and deal with dist_, nodist, nobase and all its - friends. - - * have-struct-field.m4: memset the structure to make sure that we - don't get compiler warnings. - - * crypto.m4: OpenSSL_add_all_algorithms is not a openssl specific - requirement, hcrypto need to have to too. - - * crypto.m4: Require openssl have OpenSSL_add_all_algorithms - -2006-10-04 Love Hörnquist Åstrand - - * autobuild.m4: Add autobuild, GPLed, but free to use in projects - not avaible under GPL or LGPL (just like autoconf). - -2006-09-16 Love Hörnquist Åstrand - - * roken-frag.m4: Add samba_SOCKET_WRAPPER fragment - -2006-09-12 Love Hörnquist Åstrand - - * socket-wrapper.m4: Add socket-wrapper test - -2006-05-06 Love Hörnquist Åstrand - - * crypto.m4: Move up evp.h to please OpenSSL, from Douglas - E. Engert. - -2006-04-22 Love Hörnquist Åstrand - - * roken-frag.m4: Add check for fnmatch.h, its needed to be done - for the automake conditional below. - -2006-04-15 Love Hörnquist Åstrand - - * crypto.m4: Require SHA256 - -2006-01-18 Love Hörnquist Åstrand - - * crypto.m4 Check for if we are to consider - using OpenSSL, also check for headers since - make_crypto.c assumes that the name of the files. - -2006-01-13 Love Hörnquist Åstrand - - * crypto.m4: libdes is renamed to hcrypto - - * crypto.m4: Remove support for old hash names. - -2005-10-26 Love Hörnquist Åstrand - - * install-catman.sh: Add variable INSTALL_CATPAGES that controls - if cat pages are installed, defaults to true. From Johnny Lam - . - -2005-09-28 Love Hörnquist Åstrand - - * roken-frag.m4: Check for and uintptr_t - -2005-09-02 Love Hörnquist Åstrand - - * roken-frag.m4: Resolver check moved to rk_RESOLV, from Andrew - Bartlet - - * resolv.m4: Resolver checks, broken out so samba can use it From - Andrew Bartlet - -2005-08-22 Love Hörnquist Åstrand - - * roken-frag.m4: Check for res_ndestroy. - -2005-08-03 Love Hörnquist Åstrand - - * crypto.m4: Add , OpenSSL 0.9.8 needs it for size_t. - From: Quanah Gibson-Mount - -2005-07-12 Love Hörnquist Åstrand - - * check-compile-et.m4: check that initialize_conf_error_table_r - have the right argument - -2005-07-07 Love Hörnquist Åstrand - - * check-symbols.sh: allow symbols to start with ., aix uses this - -2005-06-16 Love Hörnquist Åstrand - - * krb-bigendian.m4: use ansi c prototypes - - * krb-func-getcwd-broken.m4: use ansi c prototypes - - * broken-snprintf.m4: use ansi c prototypes - - * have-pragma-weak.m4: use ansi c declarations - - * check-getpwnam_r-posix.m4: use ansi c declarations - - * broken-realloc.m4: use ansi c declarations - - * check-compile-et.m4: use ansi c declarations - - * dlopen.m4: add headers and argument to dlopen - - * c-function.m4: use ansi c declarations - - * check-var.m4: use ansi c declarations - - * pthreads.m4: disable threads on aix because of utmp/utmpx - problems - - * broken-getaddrinfo.m4: check for brokenness in getaddrinfo on - AIX that can't handle "0" as port number. - -2005-06-11 Love Hörnquist Åstrand - - * db.m4: Add an option to disable ndbm, from Stefan Metzmacher - - -2005-06-03 Love Hörnquist Åstrand - - * pthreads.m4: rework how pthreads support to turned on/off, - always run though the switch to figure out what the - linker/compiler flag are - -2005-06-01 Love Hörnquist Åstrand - - * pthreads.m4: s/else if/elif/ - - * check-symbols.sh: AIX have a diffrent nm, use -B to get bsd like - output - - * pthreads.m4: aix case: assume gcc handles -pthread, in the - non-gcc case, use the compiler as hint (xlc vs xlc_r) if this - environment handles threads or not - -2005-05-22 Love Hörnquist Åstrand - - * check-symbols.sh: ignore weak symbols too - -2005-05-19 David Love - - * check-getpwnam_r-posix.m4: define _POSIX_PTHREAD_SEMANTICS to - make solaris provide the right getpwname_r - -2005-05-17 Johan Danielsson - - * roken-frag.m4: am_conditional have_cgetent - -2005-05-10 David Love - - * roken-frag.m4: Get daemon declared on Solaris (it's in unistd.h - but masked by a feature test), just to avoid a warning, since it - has int args. - -2005-05-11 Love Hörnquist Åstrand - - * check-var.m4: AC_CHECK_DECL and AC_CHECK_DECLS have a subtile - diffrence, the later defines HAVE_ cpp symbols, the first doesn't. - -2005-05-05 Love Hörnquist Åstrand - - * check-symbols.sh: ignore N symbols too - -2005-04-30 Love Hörnquist Åstrand - - * broken-snprintf.m4: include checking if snprintf(NULL, 0, "") - works - - * check-compile-et.m4: require compile_et to generate a - initialize_FOO_error_table_r (they are used in libkrb5), and - always check for initialize_error_table_r - -2005-04-29 Love Hörnquist Åstrand - - * Makefile.am.common: add LIB_com_err - -2005-04-29 David Love - - * roken-frag.m4: Check for correct vis.h. - -2005-04-28 David Love - - * pthreads.m4: Set PTHREADS_LIBS on Irix. - -2005-04-27 Love Hörnquist Åstrand - - * broken-realloc.m4: use rk_realloc if realloc is broken, this - makes "host-tools" not beeing able to use realloc - - * pthreads.m4: Add support for Solaris, Irix, and modern - Linux. From David Love - -2005-04-25 Love Hörnquist Åstrand - - * check-symbols.sh: limit the units functions to - asn1_[A-Za-z0-9]*_units$ - -2005-04-20 Love Hörnquist Åstrand - - * check-symbols.sh: this lib include com_err, add -com_err to - CHECK_SYMBOLS - - * check-symbols.sh: print the type so I don't need to ask for it - -2005-04-18 Love Hörnquist Åstrand - - * check-symbols.sh: ignore filename symbols - -2005-04-04 Love Hörnquist Åstrand - - * check-symbols.sh: assume symbols prefixed with _ is a sideeffekt - of the local linker and also just fine - -2005-03-16 Love Hörnquist Åstrand - - * roken-frag.m4: include for - -2005-03-01 Love Hörnquist Åstrand - - * sunos.m4: Match solaris 10. From: Joakim Fallsjo - - -2004-12-29 Love - - * check-symbols.sh: add -asn1compile symbols - -2004-12-29 Love Hörnquist Åstrand - - * check-symbols.sh: add exported symbols test - - * Makefile.am.common: add CHECK_SYMBOLS tests, so that we don't - export to much stuff - -2004-09-03 Love Hörnquist Åstrand - - * make-proto.pl: add cpluscplus extern "C" support - -2004-07-09 Love Hörnquist Åstrand - - * pthreads.m4: add -pthread to LIBS since libtool doesn't preserve - it for us when adding is as a dependency on libs - -2004-04-24 Johan Danielsson - - * largefile.m4: like AC_SYS_LARGEFILE, but also add to CPPFLAGS - -2004-04-14 Love Hörnquist Åstrand - - * check-compile-et.m4: even more evil stuff for cross-compiling - - * check-x.m4: use AC_RUN_IFELSE so we can handle cross compiling - - * check-compile-et.m4: use AC_RUN_IFELSE so we can handle cross - compiling - -2004-04-13 Love Hörnquist Åstrand - - * make-proto.pl: if -E, add windows standard calling conv to - headerfile if needed - - * win32.m4: add rk_WIN32_EXPORT - -2004-02-12 Love Hörnquist Åstrand - - * configure.in: rename AC_WFLAGS to rk_WFLAGS - - * *.m4: overquote to pacify automake1.8 - -2004-02-11 Love Hörnquist Åstrand - - * roken-frag.m4: resolv.h is even more special - - * roken-frag.m4: AC_CHECK_HEADERS(net/if.h netinet6/in6_var.h - sys/sysctl.h sys/proc.h, resolv.h) are all special and need extra - help - - * test-package.m4: If there is a --with-PACKAGE=path but no - --with-PACKAGE-config, go seach for path/PACKEGE-config and use it - if it exists. Inspired by Harald Barth - -2003-09-03 Love Hörnquist Åstrand - - * crypto.m4: check for DES_, AES_, and if openssl UI_ - -2003-08-27 Johan Danielsson - - * vararray.m4: test for variable-length arrays - - * roken-frag.m4: test for poll and poll.h - -2003-08-16 Love Hörnquist Åstrand - - * Makefile.am.common: don't try doing local checks if CHECK_LOCAL - is set to no-check-local - -2003-08-01 Love Hörnquist Åstrand - - * check-compile-et.m4: check if compile_et support ``error_table N - M'' also, don't be overly aggressivly reset CFLAGS - -2003-07-22 Love Hörnquist Åstrand - - * pthreads.m4: pthread test - -2003-05-08 Johan Danielsson - - * Makefile.am.common: change install-data-local to - install-data-hook - -2003-05-05 Assar Westerlund - - * crypto.m4: define OPENSSL_DES_LIBDES_COMPATIBILITY - -2003-04-03 Love Hörnquist Åstrand - - * crypto.m4: check if libcrypto needs -lnsl or -lsocket - -2003-04-02 Love Hörnquist Åstrand - - * crypto.m4: in the case where se don't link with kerberos 4, use - ${with_openssl_include} if its are set (not - ${with_openssl}/include) same for with_openssl_lib - -2003-03-18 Love Hörnquist Åstrand - - * Makefile.am.common: always define LIB_kafs - -2003-03-12 Love Hörnquist Åstrand - - * check-compile-et.m4: check if the output of compile_et needs - initialize_error_table_r - -2003-02-17 Love Hörnquist Åstrand - - * check-var.m4: add a check if the variable is avaible when we - include the headerfiles - -2002-12-18 Johan Danielsson - - * roken-frag.m4: res_nsearch takes 6 parameters; spotted by Howard - Chu - -2002-10-25 Johan Danielsson - - * crypto.m4: do a better job at matching headers to libraries - -2002-10-16 Johan Danielsson - - * sunos.m4: more quoting - -2002-09-19 Johan Danielsson - - * make-proto.pl: check the processed string for closing ), not the - source - -2002-09-10 Johan Danielsson - - * crypto.m4: use m4 macros for test cases, also test for older - hash names - - * test-package.m4: include dep libraries in LIB_* - - * crypto.m4: move krb4 test before test for openssl, and bail out - if krb4 is requested, but the crypto library is not the same as - krb4 - - * db.m4: filter contents of LDFLAGS - -2002-09-09 Johan Danielsson - - * auth-modules.m4: rename to rk_AUTH_MODULES - - * auth-modules.m4: only include modules explicitly asked for - -2002-09-04 Johan Danielsson - - * roken-frag.m4: test for res_nsearch - -2002-09-03 Assar Westerlund - - * roken-frag.m4: check for sys/mman.h and mmap (used by - parse_reply-test) - -2002-08-28 Assar Westerlund - - * krb-readline.m4: also add LIB_tgetent in the case of editline - - * crypto.m4: define HAVE_OPENSSL even if we got to hear about it - by krb4 - -2002-08-28 Johan Danielsson - - * krb-readline.m4: add LIB_tgetent to LIB_readline if we have to - - * sunos.m4: various sunos tests - - * crypto.m4: try to extract the crypto compiler flags from - {INCLUDE,LIB}_krb4 - (XXX this is really horrible) - - * krb-readline.m4: don't add -rpath to LIB_readline (libtool - should to this for us), also don't append LIB_tgetent to - LIB_readline (TEST_PACKAGE should do this) - - * test-package.m4: add the possibility to use a *-config program - to get flags; rename to rk_TEST_PACKAGE while here - - * krb-bigendian.m4: move ENDIANESS_IN_SYS_PARAM_H tests here - - * aix.m4: rename to rk_AIX - - * telnet.m4: move telnet tests here - - * aix.m4: restructure this somewhat - - * dlopen.m4: test for dlopen suitable for AC_REQUIRE - - * irix.m4: move some stuff here and rename to irix.m4 - - * krb-sys-nextstep.m4: move SGTTY stuff to read_pwd.c - -2002-08-28 Jacques Vidrine - - * auth-modules.m4: do not build pam_krb4 on freebsd - -2002-08-26 Assar Westerlund - - * roken-frag.m4: test for the vis, strvis functions requiring - prototypes - -2002-08-23 Johan Danielsson - - * need-proto.m4: missing comma - -2002-08-22 Johan Danielsson - - * roken-frag.m4: some rototilling - - * need-proto.m4: use AS_TR_CPP - -2002-08-20 Johan Danielsson - - * roken-frag.m4: HAVE_TYPE instead of CHECK_TYPE ssize_t - - * krb-version.m4: use PACKAGE_TARNAME and PACKAGE_STRING - - * broken-getaddrinfo.m4: can't test for EAI_SERVICE here since AIX - is even more fsck:ed - - * roken-frag.m4: test for altzone - -2002-08-19 Johan Danielsson - - * Makefile.am.common: only define ROKEN_RENAME if do_roken_rename - -2002-08-13 Johan Danielsson - - * Makefile.am.common: add ROKEN_RENAME variable - -2002-08-12 Johan Danielsson - - * make-proto.pl: include to get va_list - - * destdirs.m4: also define localstatedir and sysconfdir - -2002-08-01 Johan Danielsson - - * crypto.m4: newer openssl seems to take the address of the - schedule parameter to des_cbc_encrypt, so we need to feed it a - variable, not just NULL (from Magnus Holmberg) - -2002-05-24 Johan Danielsson - - * misc.m4: change \100 back to @; some m4's (probably some regex) - doesn't like this as a replacement regexp; the reason it was once - changed to \100 was probably because of some autoconf bug at the - time - -2002-05-20 Johan Danielsson - - * broken2.m4 []-less is apparently the way to go - -2002-05-19 Johan Danielsson - - * otp.m4: check db_type instead of precence of dbm_firstkey - - * roken-frag.m4: don't AC_LIBOBJ more than one function at a time - - * find-if-not-broken.m4: s/AC_LIBOBJ/rk_LIBOBJ/ - - * broken2.m4: s/AC_LIBOBJ/rk_LIBOBJ/ - - * broken.m4: s/AC_LIBOBJ/rk_LIBOBJ/ - - * misc.m4: automake can't handle macros passed to AC_LIBOBJ, so - add an alias to it called rk_LIBOBJ; this requires that the - relevant source are manually included in roken/Makefile.am - - * aix.m4: ac_enable --diable-dynamic-afs - - * roken-frag.m4: use AC_LIBOBJ - - * krb-func-getcwd-broken.m4: use AC_LIBOBJ - - * find-if-not-broken.m4: use AC_LIBOBJ - - * broken2.m4: use AC_LIBOBJ - - * broken.m4: use AC_LIBOBJ - - * aix.m4: recognise aix5 - -2002-05-17 Johan Danielsson - - * crypto.m4: am-conditionalise HAVE_OPENSSL - - * db.m4: make it possible to run this twice - - * Makefile.am.common: also install nodist_include_HEADERS - -2002-05-16 Johan Danielsson - - * make-proto.pl: make it possible to redefine the "private" regexp - -2002-05-02 Johan Danielsson - - * db.m4: am_cond HAVE_* - -2002-04-30 Johan Danielsson - - * krb-ipv6.m4: use AC_HELP_STRING; fix logic bug in AC_MSG_RESULT - call - - * test-package.m4: use AC_HELP_STRING - - * roken.m4: use AC_HELP_STRING - - * osfc2.m4: use AC_HELP_STRING - - * mips-abi.m4: use AC_HELP_STRING - - * krb-bigendian.m4: use AC_HELP_STRING - - * db.m4: rework this somewhat; check for db3/4 in subdirs, change - --with to --enable; it should really be possible to point it to - some directory --with-berkeley-db=/foo - - * otp.m4: OTP test - -2002-04-25 Johan Danielsson - - * destdirs.m4: define BINDIR et al - -2002-04-18 Johan Danielsson - - * misc.m4: remove some stuff that is defined elsewhere - - * make-proto.pl: optionally remove __P and parameter names - -2001-11-30 Assar Westerlund - - * roken-frag.m4: move ipv6 tests after -lsocket (to handle Solaris - 8) - -2001-09-29 Assar Westerlund - - * install-catman.sh: handle man pages without SYNOPSIS but looking - for both SYNOPSIS and DESCRIPTION - -2001-09-18 Johan Danielsson - - * roken-frag.m4: include freeaddrinfo if using getaddrinfo - -2001-09-13 Assar Westerlund - - * db.m4: test for the ndbm database really being a .db one - and use it when moving/removing database files - -2001-09-03 Assar Westerlund - - * db.m4: prefer ndbm.h to dbm.h - * roken-frag.m4: check for atexit and on_exit - -2001-09-02 Assar Westerlund - - * check-compile-et.m4: only add /usr/include/et to CPPFLAGS if - it's actually used - -2001-09-01 Assar Westerlund - - * Makefile.am.common (AUTOMAKE_OPTIONS): set 1.4b here so that - users are warned if using earlier automake versions - - * find-func-no-libs2.m4: ignore "no" as a library - another - special case to make it easy to send the result from this macro - into another invocation - -2001-08-30 Assar Westerlund - - * db.m4: check for ndbm functions in db3 library too - -2001-08-29 Jacques Vidrine - - * check-compile-et.m4: Check for already-installed com_err. - * Makefile.am.common: Use the compile_et discovered at - configuration time. - -2001-08-29 Assar Westerlund - - * crypto.m4: use AC_WITH_ALL to allow separate specification of - include and lib - * with-all.m4: new macro for doing --with-foo, --with-foo-include, - and --with-foo-lib in a sensible way - - * find-func-no-libs2.m4: handle both -llib and lib in the second - argument also yes -> "" as a library, to ease callers that send in - results from this macro (this might be a little bit unclean) - -2001-08-28 Assar Westerlund - - * roken-frag.m4: test for issetugid - -2001-08-24 Assar Westerlund - - * Makefile.am.common: change one += to = to AM_CFLAGS to avoid an - error with recent automake - -2001-08-22 Assar Westerlund - - * crypto.m4: SHA1_CTX should be SHA_CTX - -2001-08-21 Assar Westerlund - - * roken-frag.m4: remove all winsock.h - for now, it does more harm than good under cygwin and if it should be - used, the correct conditional needs to be found - from - -2001-08-21 Johan Danielsson - - * check-var.m4: AC_TR_CPP -> AS_TR_CPP to make autoconf 2.52 happy - -2001-08-17 Johan Danielsson - - * krb-ipv6.m4: add test for non-existant in6addr_loopback in AIX - -2001-08-15 Johan Danielsson - - * roken-frag.m4: test for getaddrinfo's that doesn't like numeric - services - - * broken-getaddrinfo.m4: test for getaddrinfo's that doesn't like - numeric services - -2001-08-08 Assar Westerlund - - * db.m4: do a separate test for gdbm/ndbm.h and -lgdbm - -2001-08-05 Assar Westerlund - - * db.m4: ac_cv_funclib_\func can be yes - * db.m4: use AC_FIND_FUNC_NO_LIBS to test in libc - anset cache variables after first attempt at finding dbm_firstkey (how - should this be done?) - * db.m4: do not test for ndbm library when ndbm-db was found in libc - * db.m4: test for ndbm-compatability with db - * db.m4: add forgotten AC_SUBST - * db.m4: first steps towards a new db test - - * roken-frag.m4: remove header files checked by rk_db - -2001-08-05 Assar Westerlund - - * roken-frag.m4: remove header files checked by rk_db - -2001-06-24 Assar Westerlund - - * roken-frag.m4: make sure of building getaddrinfo et al if - missing - -2001-06-20 Johan Danielsson - - * install-catman.sh: try to install links to manpages - -2001-06-19 Assar Westerlund - - * broken-glob.m4: try to handle FreeBSD's GLOB_MAXPATH - -2001-06-18 Johan Danielsson - - * roken-frag.m4: test for getaddrinfo needs netdb.h on Tru64 - -2001-06-17 Assar Westerlund - - * roken-frag.m4 (AC_CHECK_HEADERS): test for random - * roken-frag.m4 (AC_CHECK_HEADERS): test for initstate and - setstate - - * roken-frag.m4 (AC_BROKEN): test for - emalloc,ecalloc,erealloc,estrdup - -2001-05-11 Johan Danielsson - - * roken-frag.m4: bswap{16,32} - -2001-03-26 Assar Westerlund - - * broken-glob.m4: also test for GLOB_LIMIT - * krb-ipv6.m4: restore CFLAGS if v6 is not detected - -2001-02-20 Assar Westerlund - - * roken-frag.m4: check for getprogname, setprogname - -2001-02-07 Assar Westerlund - - * Makefile.am.common (LIB_kdfs): set. use it. from Ake Sandgren - - -2000-12-26 Assar Westerlund - - * krb-ipv6.m4: remove some dnl that weren't the correct with - modern autoconf - -2000-12-15 Assar Westerlund - - * roken-frag.m4 (inet_ntoa, inet_ntop, inet_pton): add necessary - includes when testing - * broken2.m4: new variant of broken, with includes and arguments - - * test-package.m4: s/ifval/m4_ifval/ to keep in sync with - autoconf. from Ake Sandgren - * check-var.m4: s/ifval/m4_ifval/ to keep in sync with autoconf. - from Ake Sandgren - -2000-12-13 Assar Westerlund - - * krb-irix.m4: need to set irix to no first. From Ake Sandgren - - -2000-12-12 Johan Danielsson - - * roken-frag.m4: move sa_len test to before test for broken - getnameinfo - -2000-12-12 Assar Westerlund - - * roken-frag.m4: only test for broken getnameinfo if it exists - -2000-12-10 Johan Danielsson - - * roken-frag.m4: ifaddrs.h - -2000-12-06 Johan Danielsson - - * roken-frag.m4: test for unvis, and vis.h - - * roken-frag.m4: test for strvis* - -2000-12-05 Johan Danielsson - - * Makefile.am.common: just warn if we fail to setuid a program - - * broken-getnameinfo.m4: add more quotes - - * roken-frag.m4: test for getifaddrs - - * roken-frag.m4: test for broken AIX getnameinfo - - * broken-getnameinfo.m4: test for broken getnameinfo - -2000-12-01 Assar Westerlund - - * Makefile.am.common: add kludge for LIBS - -2000-11-30 Johan Danielsson - - * check-man.m4: update this after recent changes - - * Makefile.am.common: use install-catman.sh - - * install-catman.sh: script to install preformatted manual pages - - * Makefile.am.common: change cat handling - -2000-11-29 Johan Danielsson - - * roken-frag.m4: don't use AC_CONFIG_FILES here, since it doesn't - work with automake - -2000-11-15 Assar Westerlund - - * krb-readline.m4: link against the libtool-versions of - libeditline and libel_compat - - * Makefile.am.common (INCLUDES): add $(INCLUDES_roken) - * roken-frag.m4 (CPPFLAGS_roken): rename to INCLUDES_roken - -2000-11-05 Johan Danielsson - - * aix.m4: set aix - -2000-08-19 Assar Westerlund - - * krb-bigendian.m4: merge from arla: make it work better - -2000-08-07 Johan Danielsson - - * roken-frag.m4: check getsockname for proto compat - -2000-08-04 Johan Danielsson - - * Makefile.am.common: add library for pidfile - - * roken-frag.m4: tests for util.h and pidfile - -2000-07-19 Johan Danielsson - - * check-var.m4: rename to rk_CHECK_VAR, transposing the arguments, - and making the second optional, AU_DEFINE AC_CHECK_VAR to - rk_CHECK_VAR - - * roken-frag.m4: other roken tests - - * db.m4: db tests - -2000-07-18 Johan Danielsson - - * mips-abi.m4: AC_ERROR -> AC_MSG_ERROR - - * check-netinet-ip-and-tcp.m4: use cache_check, and make this work - with new autoconf - - * aix.m4: don't subst AFS_EXTRA_LD - -2000-07-15 Johan Danielsson - - * check-var.m4: workaround feature of newer autoconf - - * find-func-no-libs2.m4: use cleaner autoheader trick - - * have-type.m4: use cleaner autoheader trick - - * have-types.m4: use cleaner autoheader trick - - * test-package.m4: add 6th parameter for now - - * broken.m4: use cleaner autoheader trick - - * retsigtype.m4: test for signal handler return type - - * broken-realloc.m4: test for broken realloc - -2000-07-08 Assar Westerlund - - * roken.m4: set CPPFLAGS_roken and call AC_CONFIG_SUBDIRS - -2000-07-02 Assar Westerlund - - * Makefile.am.common (CP): set and use - -2000-04-05 Assar Westerlund - - * Makefile.am.common (INCLUDE_openldap, LIB_openldap): add - -2000-03-28 Assar Westerlund - - * krb-prog-yacc.m4: AC_MSG_WARNING should be AC_MSG_WARN - - * shared-libs.m4: try to update to freebsd5 (and elf) - -2000-03-16 Assar Westerlund - - * krb-prog-yacc.m4: warn we do not find any yacc - -2000-01-08 Assar Westerlund - - * krb-bigendian.m4: new file, replacement for ac_c_bigendian - -2000-01-01 Assar Westerlund - - * krb-ipv6.m4: re-organize: test for type of stack first so that - we can find the libraries that we might have to link the test - program against. not linking the test program means we don't know - if the right stuff is in the libraries. also cosmetic changes to - make sure we print the checking for... nicely - -1999-12-21 Assar Westerlund - - * krb-ipv6.m4: try linking, not only compiling - * krb-ipv6.m4: add --without-ipv6 make sure we have `in6addr_any' - which we use in the code. This test avoids false positives on - OpenBSD - -1999-11-29 Johan Danielsson - - * grok-type.m4: inttypes.h - -1999-11-05 Assar Westerlund - - * check-x.m4: include X_PRE_LIBS and X_EXTRA_LIBS when testing - -1999-11-01 Assar Westerlund - - * 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 - - * 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 - - * 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 - - * capabilities.m4: sgi capabilities - -1999-07-29 Assar Westerlund - - * have-struct-field.m4: quote macros when undefining - -1999-07-28 Assar Westerlund - - * Makefile.am.common (install-build-headers): add dependencies - -1999-07-24 Assar Westerlund - - * 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 - - * 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 - - * check-x.m4: extended test for X - -1999-05-14 Assar Westerlund - - * 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 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 - - * krb-find-db.m4: try with more header files than ndbm.h - -1999-04-19 Assar Westerlund - - * test-package.m4: try to handle the case of --without-package - correctly - -1999-04-17 Assar Westerlund - - * make-aclocal: removed. Not used anymore, being replaced by - aclocal from automake. - -Thu Apr 15 14:17:26 1999 Johan Danielsson - - * make-proto.pl: handle __attribute__ - -Fri Apr 9 20:37:18 1999 Assar Westerlund - - * shared-libs.m4: quote $@ - (freebsd3): add install_symlink_command2 - -Wed Apr 7 20:40:22 1999 Assar Westerlund - - * shared-libs.m4 (hpux): no library dependencies - -Mon Apr 5 16:13:08 1999 Johan Danielsson - - * 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 - - * Makefile.am.common: CFLAGS -> AM_CFLAGS - -Mon Mar 29 16:51:12 1999 Johan Danielsson - - * 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 - - * osfc2.m4: --enable-osfc2 - -Fri Mar 19 15:34:52 1999 Johan Danielsson - - * shared-libs.m4: move shared lib stuff here - -Wed Mar 24 23:24:51 1999 Assar Westerlund - - * Makefile.am.common (install-build-headers): simplify loop - -Tue Mar 23 17:31:23 1999 Johan Danielsson - - * 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 - - * 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 - - * grok-type.m4: - - * 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 - - * 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 - - * wflags.m4: AC_WFLAGS - -Mon Mar 1 11:23:41 1999 Johan Danielsson - - * 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 - - * broken-glob.m4: check for broken glob - -Sun Jan 31 06:50:33 1999 Assar Westerlund - - * krb-ipv6.m4: more magic for different v6 implementations. From - Jun-ichiro itojun Hagino - -Sun Nov 22 12:16:06 1998 Assar Westerlund - - * krb-struct-spwd.m4: new file - -Thu Jun 4 04:07:41 1998 Assar Westerlund - - * find-func-no-libs2.m4: new file - -Fri May 1 23:31:28 1998 Assar Westerlund - - * c-attribute.m4, c-function.m4: new files (from arla) - -Wed Mar 18 23:11:29 1998 Assar Westerlund - - * krb-ipv6.m4: rename HAVE_STRUCT_SOCKADDR_IN6 to HAVE_IPV6 - -Thu Feb 26 02:37:49 1998 Assar Westerlund - - * make-proto.pl: should work with perl4 - diff --git a/kerberosV/src/cf/Makefile.am.common b/kerberosV/src/cf/Makefile.am.common deleted file mode 100644 index c3a3619c9b8..00000000000 --- a/kerberosV/src/cf/Makefile.am.common +++ /dev/null @@ -1,257 +0,0 @@ -# $Id: Makefile.am.common,v 1.3 2013/06/17 18:57:40 robert Exp $ - -SUFFIXES = .et .h - -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include - -AM_CPPFLAGS = $(INCLUDES_roken) - -if do_roken_rename -ROKEN_RENAME = -DROKEN_RENAME -endif - -AM_CFLAGS = $(WFLAGS) - -CP = cp - -## 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_openpty = @LIB_openpty@ -LIB_pidfile = @LIB_pidfile@ -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@ -LIB_com_err = @LIB_com_err@ -LIB_door_create = @LIB_door_create@ - -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -LIB_hesiod = @LIB_hesiod@ - -INCLUDE_krb4 = @INCLUDE_krb4@ -LIB_krb4 = @LIB_krb4@ - -INCLUDE_openldap = @INCLUDE_openldap@ -LIB_openldap = @LIB_openldap@ - -INCLUDE_readline = @INCLUDE_readline@ -LIB_readline = @LIB_readline@ - -LEXLIB = @LEXLIB@ - -libexec_heimdaldir = $(libexecdir)/heimdal - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -SUFFIXES += .x .z .hx - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) - -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 - -LIB_heimbase = $(top_builddir)/base/libheimbase.la - -if DCE -LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -endif - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done diff --git a/kerberosV/src/cf/aix.m4 b/kerberosV/src/cf/aix.m4 deleted file mode 100644 index 62067f78dc6..00000000000 --- a/kerberosV/src/cf/aix.m4 +++ /dev/null @@ -1,62 +0,0 @@ -dnl -dnl $Id: aix.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl - -AC_DEFUN([rk_AIX],[ - -aix=no -case "$host" in -*-*-aix3*) - aix=3 - ;; -*-*-aix[[4-9]]*) - aix=4 - ;; -esac - -AM_CONDITIONAL(AIX, test "$aix" != no)dnl -AM_CONDITIONAL(AIX4, test "$aix" = 4)dnl - -AC_ARG_ENABLE(dynamic-afs, - AS_HELP_STRING([--disable-dynamic-afs], - [do not use loaded AFS library with AIX])) - -if test "$aix" != no; then - - AC_DEFINE(NEED_QSORT, 1, [if your qsort is not a stable sort]) - - if test "$enable_dynamic_afs" != no; then - AC_REQUIRE([rk_DLOPEN]) - if test "$ac_cv_func_dlopen" = no; then - AC_FIND_FUNC_NO_LIBS(loadquery, ld) - fi - if test "$ac_cv_func_dlopen" != no; then - AIX_EXTRA_KAFS='$(LIB_dlopen)' - elif test "$ac_cv_func_loadquery" != no; then - AIX_EXTRA_KAFS='$(LIB_loadquery)' - else - AC_MSG_NOTICE([not using dynloaded AFS library]) - AIX_EXTRA_KAFS= - enable_dynamic_afs=no - fi - else - AIX_EXTRA_KAFS= - fi -fi - -AM_CONDITIONAL(AIX_DYNAMIC_AFS, test "$enable_dynamic_afs" != no)dnl -AC_SUBST(AIX_EXTRA_KAFS)dnl - -if test "$aix" != no; then - AC_DEFINE([_ALL_SOURCE],1,[Required for functional/sane headers on AIX]) -fi - -AH_BOTTOM([#if _AIX -/* XXX this is gross, but kills about a gazillion warnings */ -struct ether_addr; -struct sockaddr; -struct sockaddr_dl; -struct sockaddr_in; -#endif]) - -]) diff --git a/kerberosV/src/cf/auth-modules.m4 b/kerberosV/src/cf/auth-modules.m4 deleted file mode 100644 index 066107461c3..00000000000 --- a/kerberosV/src/cf/auth-modules.m4 +++ /dev/null @@ -1,45 +0,0 @@ -dnl $Id: auth-modules.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl Figure what authentication modules should be built -dnl -dnl rk_AUTH_MODULES(module-list) - -AC_DEFUN([rk_AUTH_MODULES],[ -AC_MSG_CHECKING([which authentication modules should be built]) - -z='m4_ifval([$1], $1, [sia pam afskauthlib])' -LIB_AUTH_SUBDIRS= -for i in $z; do -case $i in -sia) -if test "$ac_cv_header_siad_h" = yes; then - LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS sia" -fi -;; -pam) -case "${host}" in -*-*-freebsd*) ac_cv_want_pam_krb4=no ;; -*) ac_cv_want_pam_krb4=yes ;; -esac - -if test "$ac_cv_want_pam_krb4" = yes -a \ - "$ac_cv_header_security_pam_modules_h" = yes -a \ - "$enable_shared" = yes; then - LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS pam" -fi -;; -afskauthlib) -case "${host}" in -*-*-irix[[56]]*) LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS afskauthlib" ;; -esac -;; -esac -done -if test "$LIB_AUTH_SUBDIRS"; then - AC_MSG_RESULT($LIB_AUTH_SUBDIRS) -else - AC_MSG_RESULT(none) -fi - -AC_SUBST(LIB_AUTH_SUBDIRS)dnl -]) diff --git a/kerberosV/src/cf/broken-getaddrinfo.m4 b/kerberosV/src/cf/broken-getaddrinfo.m4 deleted file mode 100644 index ef981d6bb07..00000000000 --- a/kerberosV/src/cf/broken-getaddrinfo.m4 +++ /dev/null @@ -1,26 +0,0 @@ -dnl $Id: broken-getaddrinfo.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl test if getaddrinfo can handle numeric services - -AC_DEFUN([rk_BROKEN_GETADDRINFO],[ -AC_CACHE_CHECK([if getaddrinfo handles numeric services], ac_cv_func_getaddrinfo_numserv, -AC_RUN_IFELSE([AC_LANG_SOURCE([[#include -#include -#include -#include - -int -main(int argc, char **argv) -{ - struct addrinfo hints, *ai; - memset(&hints, 0, sizeof(hints)); - hints.ai_flags = AI_PASSIVE; - hints.ai_socktype = SOCK_STREAM; - hints.ai_family = PF_UNSPEC; - if(getaddrinfo(NULL, "17", &hints, &ai) != 0) - return 1; - if(getaddrinfo(NULL, "0", &hints, &ai) != 0) - return 1; - return 0; -} -]])],[ac_cv_func_getaddrinfo_numserv=yes],[ac_cv_func_getaddrinfo_numserv=no],[ac_cv_func_getaddrinfo_numserv=yes]))]) diff --git a/kerberosV/src/cf/broken-glob.m4 b/kerberosV/src/cf/broken-glob.m4 deleted file mode 100644 index 15bcaf46c2c..00000000000 --- a/kerberosV/src/cf/broken-glob.m4 +++ /dev/null @@ -1,29 +0,0 @@ -dnl $Id: broken-glob.m4,v 1.3 2013/06/17 18:57:40 robert 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_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include -#include ]],[[ -glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE| -#ifdef GLOB_MAXPATH -GLOB_MAXPATH -#else -GLOB_LIMIT -#endif -, -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, GLOB_TILDE, and GLOB_LIMIT]) -fi -if test "$ac_cv_func_glob_working" = yes; then -AC_NEED_PROTO([#include -#include ],glob) -fi -]) diff --git a/kerberosV/src/cf/broken-realloc.m4 b/kerberosV/src/cf/broken-realloc.m4 deleted file mode 100644 index f93947db0e9..00000000000 --- a/kerberosV/src/cf/broken-realloc.m4 +++ /dev/null @@ -1,25 +0,0 @@ -dnl -dnl $Id: broken-realloc.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl Test for realloc that doesn't handle NULL as first parameter -dnl -AC_DEFUN([rk_BROKEN_REALLOC], [ -AC_CACHE_CHECK(if realloc if broken, ac_cv_func_realloc_broken, [ -ac_cv_func_realloc_broken=no -AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include - -int main(int argc, char **argv) -{ - return realloc(NULL, 17) == NULL; -} -]])],[:], [ac_cv_func_realloc_broken=yes],[:]) -]) -if test "$ac_cv_func_realloc_broken" = yes ; then - AC_DEFINE(BROKEN_REALLOC, 1, [Define if realloc(NULL) doesn't work.]) -fi -AH_BOTTOM([#ifdef BROKEN_REALLOC -#define realloc(X, Y) rk_realloc((X), (Y)) -#endif]) -]) diff --git a/kerberosV/src/cf/broken-snprintf.m4 b/kerberosV/src/cf/broken-snprintf.m4 deleted file mode 100644 index 3a495a52164..00000000000 --- a/kerberosV/src/cf/broken-snprintf.m4 +++ /dev/null @@ -1,63 +0,0 @@ -dnl $Id: broken-snprintf.m4,v 1.3 2013/06/17 18:57:40 robert 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_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -int main(int argc, char **argv) -{ - char foo[[3]]; - snprintf(foo, 2, "12"); - return strcmp(foo, "1") || snprintf(NULL, 0, "%d", 12) != 2; -}]])],[:],[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 ],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_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#include - -int foo(int num, ...) -{ - char bar[[3]]; - va_list arg; - va_start(arg, num); - vsnprintf(bar, 2, "%s", arg); - va_end(arg); - return strcmp(bar, "1"); -} - -int bar(int num, int len, ...) -{ - int r; - va_list arg; - va_start(arg, len); - r = vsnprintf(NULL, 0, "%s", arg); - va_end(arg); - return r != len; -} - -int main(int argc, char **argv) -{ - return foo(0, "12") || bar(0, 2, "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 ],vsnprintf) -fi -]) diff --git a/kerberosV/src/cf/broken.m4 b/kerberosV/src/cf/broken.m4 deleted file mode 100644 index 6e587518fc7..00000000000 --- a/kerberosV/src/cf/broken.m4 +++ /dev/null @@ -1,12 +0,0 @@ -dnl $Id: broken.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl -dnl Same as AC _REPLACE_FUNCS, just define HAVE_func if found in normal -dnl libraries - -AC_DEFUN([AC_BROKEN], -[AC_FOREACH([rk_func], [$1], - [AC_CHECK_FUNC(rk_func, - [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]rk_func), 1, - [Define if you have the function `]rk_func['.])], - [rk_LIBOBJ(rk_func)])])]) diff --git a/kerberosV/src/cf/broken2.m4 b/kerberosV/src/cf/broken2.m4 deleted file mode 100644 index f3054a569a2..00000000000 --- a/kerberosV/src/cf/broken2.m4 +++ /dev/null @@ -1,25 +0,0 @@ -dnl $Id: broken2.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl AC_BROKEN but with more arguments - -dnl AC_BROKEN2(func, includes, arguments) -AC_DEFUN([AC_BROKEN2], -[AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(ac_cv_func_[]$1, -[AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]],[[ -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$1) || defined (__stub___$1) -choke me -#else -$1($3); -#endif -]])], [eval "ac_cv_func_[]$1=yes"], [eval "ac_cv_func_[]$1=no"])]) -if eval "test \"\${ac_cv_func_[]$1}\" = yes"; then - AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, define) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) - rk_LIBOBJ($1) -fi]) diff --git a/kerberosV/src/cf/c-attribute.m4 b/kerberosV/src/cf/c-attribute.m4 deleted file mode 100644 index fcb94f44d27..00000000000 --- a/kerberosV/src/cf/c-attribute.m4 +++ /dev/null @@ -1,28 +0,0 @@ -dnl -dnl $Id: c-attribute.m4,v 1.3 2013/06/17 18:57:40 robert 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_COMPILE_IFELSE([AC_LANG_SOURCE([[#include -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/kerberosV/src/cf/c-function.m4 b/kerberosV/src/cf/c-function.m4 deleted file mode 100644 index 784370a402f..00000000000 --- a/kerberosV/src/cf/c-function.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl -dnl $Id: c-function.m4,v 1.3 2013/06/17 18:57:40 robert 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_RUN_IFELSE([AC_LANG_SOURCE([[ -#include - -static char *foo(void) -{ - return __FUNCTION__; -} - -int main(int argc, char **argc) -{ - 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/kerberosV/src/cf/capabilities.m4 b/kerberosV/src/cf/capabilities.m4 deleted file mode 100644 index 242fe56bfd5..00000000000 --- a/kerberosV/src/cf/capabilities.m4 +++ /dev/null @@ -1,14 +0,0 @@ -dnl -dnl $Id: capabilities.m4,v 1.3 2013/06/17 18:57:40 robert 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/kerberosV/src/cf/check-compile-et.m4 b/kerberosV/src/cf/check-compile-et.m4 deleted file mode 100644 index 65a58bf52d8..00000000000 --- a/kerberosV/src/cf/check-compile-et.m4 +++ /dev/null @@ -1,113 +0,0 @@ -dnl $Id: check-compile-et.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl CHECK_COMPILE_ET -AC_DEFUN([CHECK_COMPILE_ET], [ - -AC_CHECK_PROG(COMPILE_ET, compile_et, [compile_et]) - -krb_cv_compile_et="no" -krb_cv_com_err_need_r="" -krb_cv_compile_et_cross=no -if test "${COMPILE_ET}" = "compile_et"; then - -dnl We have compile_et. Now let's see if it supports `prefix' and `index'. -AC_MSG_CHECKING(whether compile_et has the features we need) -cat > conftest_et.et <<'EOF' -error_table test conf -prefix CONFTEST -index 1 -error_code CODE1, "CODE1" -index 128 -error_code CODE2, "CODE2" -end -EOF -if ${COMPILE_ET} conftest_et.et >/dev/null 2>&1; then - dnl XXX Some systems have . - save_CPPFLAGS="${CPPFLAGS}" - if test -d "/usr/include/et"; then - CPPFLAGS="-I/usr/include/et ${CPPFLAGS}" - fi - dnl Check that the `prefix' and `index' directives were honored. - AC_RUN_IFELSE([ -#include -#include -#include "conftest_et.h" -int main(int argc, char **argv){ -#ifndef ERROR_TABLE_BASE_conf -#error compile_et does not handle error_table N M -#endif -return (CONFTEST_CODE2 - CONFTEST_CODE1) != 127;} - ], [krb_cv_compile_et="yes"],[CPPFLAGS="${save_CPPFLAGS}"], - [krb_cv_compile_et="yes" krb_cv_compile_et_cross=yes] ) -fi -AC_MSG_RESULT(${krb_cv_compile_et}) -if test "${krb_cv_compile_et}" = "yes" -a "${krb_cv_compile_et_cross}" = no; then - AC_MSG_CHECKING([for if com_err generates a initialize_conf_error_table_r]) - AC_EGREP_CPP([initialize_conf_error_table_r.*struct et_list], - [#include "conftest_et.h"], - [krb_cv_com_err_need_r="ok"]) - if test X"$krb_cv_com_err_need_r" = X ; then - AC_MSG_RESULT(no) - krb_cv_compile_et=no - else - AC_MSG_RESULT(yes) - fi -fi -rm -fr conftest* -fi - -if test "${krb_cv_compile_et_cross}" = yes ; then - krb_cv_com_err="cross" -elif test "${krb_cv_compile_et}" = "yes"; then - dnl Since compile_et seems to work, let's check libcom_err - krb_cv_save_LIBS="${LIBS}" - LIBS="${LIBS} -lcom_err" - AC_MSG_CHECKING(for com_err) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ - const char *p; - p = error_message(0); - initialize_error_table_r(0,0,0,0); - com_right_r(0, 0, 0, 0); - ]])],[krb_cv_com_err="yes"],[krb_cv_com_err="no"; CPPFLAGS="${save_CPPFLAGS}"]) - AC_MSG_RESULT(${krb_cv_com_err}) - LIBS="${krb_cv_save_LIBS}" -else - dnl Since compile_et doesn't work, forget about libcom_err - krb_cv_com_err="no" -fi - -dnl Only use the system's com_err if we found compile_et, libcom_err, and -dnl com_err.h. -if test "${krb_cv_com_err}" = "yes"; then - DIR_com_err="" - LIB_com_err="-lcom_err" - LIB_com_err_a="" - LIB_com_err_so="" - AC_MSG_NOTICE(Using the already-installed com_err) - COMPILE_ET="${ac_cv_prog_COMPILE_ET}" - localcomerr=no -elif test "${krb_cv_com_err}" = "cross"; then - DIR_com_err="com_err" - LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la" - LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a" - LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so" - AC_MSG_NOTICE(Using our own com_err with toolchain compile_et) - COMPILE_ET="${ac_cv_prog_COMPILE_ET}" - localcomerr=yes -else - COMPILE_ET="\$(top_builddir)/lib/com_err/compile_et" - DIR_com_err="com_err" - LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la" - LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a" - LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so" - AC_MSG_NOTICE(Using our own com_err) - localcomerr=yes -fi -AM_CONDITIONAL(COM_ERR, test "$localcomerr" = yes)dnl -AC_SUBST(COMPILE_ET) -AC_SUBST(DIR_com_err) -AC_SUBST(LIB_com_err) -AC_SUBST(LIB_com_err_a) -AC_SUBST(LIB_com_err_so) - -]) diff --git a/kerberosV/src/cf/check-getpwnam_r-posix.m4 b/kerberosV/src/cf/check-getpwnam_r-posix.m4 deleted file mode 100644 index 5cc1e72b959..00000000000 --- a/kerberosV/src/cf/check-getpwnam_r-posix.m4 +++ /dev/null @@ -1,40 +0,0 @@ -dnl $Id: check-getpwnam_r-posix.m4,v 1.3 2013/06/17 18:57:40 robert 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_RUN_IFELSE([AC_LANG_SOURCE([[ -#define _POSIX_PTHREAD_SEMANTICS -#include -int main(int argc, char **argv) -{ - struct passwd pw, *pwd; - return getpwnam_r("", &pw, 0, 0, &pwd) < 0; -} -]])],[ac_cv_func_getpwnam_r_posix=yes],[ac_cv_func_getpwnam_r_posix=no],[:]) -LIBS="$ac_libs") - AC_CACHE_CHECK(if _POSIX_PTHREAD_SEMANTICS is needed,ac_cv_func_getpwnam_r_posix_def, - ac_libs="$LIBS" - LIBS="$LIBS $LIB_getpwnam_r" - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -int main(int argc, char **argv) -{ - struct passwd pw, *pwd; - return getpwnam_r("", &pw, 0, 0, &pwd) < 0; -} -]])],[ac_cv_func_getpwnam_r_posix_def=no],[ac_cv_func_getpwnam_r_posix_def=yes],[:]) -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 -if test "$ac_cv_func_getpwnam_r_posix" = yes -a "$ac_cv_func_getpwnam_r_posix_def" = yes; then - AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Define to get POSIX getpwnam_r in some systems.]) -fi -fi -]) diff --git a/kerberosV/src/cf/check-man.m4 b/kerberosV/src/cf/check-man.m4 deleted file mode 100644 index 3afe4e0a0a2..00000000000 --- a/kerberosV/src/cf/check-man.m4 +++ /dev/null @@ -1,57 +0,0 @@ -dnl $Id: check-man.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl check how to format manual pages -dnl - -AC_DEFUN([rk_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='$$section' -else - CATMANEXT=0 -fi -AC_SUBST(CATMANEXT) -]) diff --git a/kerberosV/src/cf/check-netinet-ip-and-tcp.m4 b/kerberosV/src/cf/check-netinet-ip-and-tcp.m4 deleted file mode 100644 index 7cc23f233e2..00000000000 --- a/kerberosV/src/cf/check-netinet-ip-and-tcp.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl -dnl $Id: check-netinet-ip-and-tcp.m4,v 1.3 2013/06/17 18:57:40 robert 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_CACHE_CHECK([for $i],ac_cv_header_$cv, -[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ -#ifdef HAVE_STANDARDS_H -#include -#endif -#include <$i> -]])], -[eval "ac_cv_header_$cv=yes"], -[eval "ac_cv_header_$cv=no"])]) -ac_res=`eval echo \\$ac_cv_header_$cv` -if test "$ac_res" = yes; then - ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - AC_DEFINE_UNQUOTED($ac_tr_hdr, 1) -fi -done -if false;then - AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h) -fi -]) diff --git a/kerberosV/src/cf/check-type-extra.m4 b/kerberosV/src/cf/check-type-extra.m4 deleted file mode 100644 index 14277c1eee0..00000000000 --- a/kerberosV/src/cf/check-type-extra.m4 +++ /dev/null @@ -1,23 +0,0 @@ -dnl $Id: check-type-extra.m4,v 1.3 2013/06/17 18:57:40 robert 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 -#if STDC_HEADERS -#include -#include -#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/kerberosV/src/cf/check-var.m4 b/kerberosV/src/cf/check-var.m4 deleted file mode 100644 index 4af684ebf47..00000000000 --- a/kerberosV/src/cf/check-var.m4 +++ /dev/null @@ -1,28 +0,0 @@ -dnl $Id: check-var.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl rk_CHECK_VAR(variable, includes) -AC_DEFUN([rk_CHECK_VAR], [ -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL(ac_cv_var_$1, [ -m4_ifval([$2],[ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2 - void * foo(void) { return &$1; }]],[[foo()]])], - [ac_cv_var_$1=yes],[ac_cv_var_$1=no])]) -if test "$ac_cv_var_$1" != yes ; then -AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2 -extern int $1; -int foo(void) { return $1; }]],[[foo()]])], - [ac_cv_var_$1=yes],[ac_cv_var_$1=no]) -fi -]) -ac_foo=`eval echo \\$ac_cv_var_$1` -AC_MSG_RESULT($ac_foo) -if test "$ac_foo" = yes; then - AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]$1), 1, - [Define if you have the `]$1[' variable.]) - m4_ifval([$2], AC_CHECK_DECLS([$1],[],[],[$2])) -fi -]) - -AC_WARNING_ENABLE([obsolete]) -AU_DEFUN([AC_CHECK_VAR], [rk_CHECK_VAR([$2], [$1])], [foo]) diff --git a/kerberosV/src/cf/check-x.m4 b/kerberosV/src/cf/check-x.m4 deleted file mode 100644 index e38693a677d..00000000000 --- a/kerberosV/src/cf/check-x.m4 +++ /dev/null @@ -1,53 +0,0 @@ -dnl -dnl See if there is any X11 present -dnl -dnl $Id: check-x.m4,v 1.3 2013/06/17 18:57:40 robert 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_RUN_IFELSE([ - #include - foo(void) - { - XOpenDisplay(NULL); - } - main(int argc, char **argv) - { - return 0; - } - ],krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break,:, - krb_cv_sys_x_libs_rpath="" ; krb_cv_sys_x_libs="" ; break) - done - LIBS="$ac_save_libs" - CFLAGS="$ac_save_cflags" - ]) - X_LIBS="$krb_cv_sys_x_libs" -fi -]) diff --git a/kerberosV/src/cf/check-xau.m4 b/kerberosV/src/cf/check-xau.m4 deleted file mode 100644 index 509c5e53ad9..00000000000 --- a/kerberosV/src/cf/check-xau.m4 +++ /dev/null @@ -1,64 +0,0 @@ -dnl $Id: check-xau.m4,v 1.3 2013/06/17 18:57:40 robert 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,[#include ],[0,0]) -ac_xxx="$LIBS" -LIBS="$LIB_XauWriteAuth $LIBS" -AC_FIND_FUNC_NO_LIBS(XauReadAuth, X11 Xau,[#include ],[0]) -LIBS="$LIB_XauReadAauth $LIBS" -AC_FIND_FUNC_NO_LIBS(XauFileName, X11 Xau,[#include ]) -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/kerberosV/src/cf/crypto.m4 b/kerberosV/src/cf/crypto.m4 deleted file mode 100644 index e731e00cec7..00000000000 --- a/kerberosV/src/cf/crypto.m4 +++ /dev/null @@ -1,179 +0,0 @@ -dnl $Id: crypto.m4,v 1.4 2013/06/17 18:57:40 robert Exp $ -dnl -dnl test for crypto libraries: -dnl - libcrypto (from openssl) -dnl - own-built libhcrypto - -m4_define([test_headers], [ - #undef KRB5 /* makes md4.h et al unhappy */ - #ifdef HAVE_OPENSSL - #ifdef HAVE_SYS_TYPES_H - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #else - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #endif - ]) -m4_define([test_body], [ - void *schedule = 0; - EVP_MD_CTX mdctx; - - EVP_md4(); - EVP_md5(); - EVP_sha1(); - EVP_sha256(); - - EVP_MD_CTX_init(&mdctx); - EVP_DigestInit_ex(&mdctx, EVP_sha1(), (ENGINE *)0); - EVP_CIPHER_iv_length(((EVP_CIPHER*)0)); - UI_UTIL_read_pw_string(0,0,0,0); - RAND_status(); - #ifdef HAVE_OPENSSL - EC_KEY_new(); - #endif - - OpenSSL_add_all_algorithms(); - AES_encrypt(0,0,0); - DES_cbc_encrypt(0, 0, 0, schedule, 0, 0); - RC4(0, 0, 0, 0);]) - - -AC_DEFUN([KRB_CRYPTO],[ -crypto_lib=unknown -AC_WITH_ALL([openssl]) - -DIR_hcrypto= - -AC_MSG_CHECKING([for crypto library]) - -openssl=no - -if test "$crypto_lib" = "unknown" -a "$with_krb4" != "no"; then - save_CPPFLAGS="$CPPFLAGS" - save_LIBS="$LIBS" - - cdirs= clibs= - for i in $LIB_krb4; do - case "$i" in - -L*) cdirs="$cdirs $i";; - -l*) clibs="$clibs $i";; - esac - done - - ires= - for i in $INCLUDE_krb4; do - CFLAGS="-DHAVE_OPENSSL $i $save_CFLAGS" - for j in $cdirs; do - for k in $clibs; do - LIBS="$j $k $save_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([test_headers], - [test_body])], - [openssl=yes ires="$i" lres="$j $k"; break 3]) - done - done - CFLAGS="$i $save_CFLAGS" - for j in $cdirs; do - for k in $clibs; do - LIBS="$j $k $save_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([test_headers],[test_body])], - [openssl=no ires="$i" lres="$j $k"; break 3]) - done - done - done - - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" - if test "$ires" -a "$lres"; then - INCLUDE_hcrypto="$ires" - LIB_hcrypto="$lres" - crypto_lib=krb4 - AC_MSG_RESULT([same as krb4]) - LIB_hcrypto_a='$(LIB_hcrypto)' - LIB_hcrypto_so='$(LIB_hcrypto)' - LIB_hcrypto_appl='$(LIB_hcrypto)' - fi -fi - -if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - INCLUDE_hcrypto= - LIB_hcrypto= - if test "$with_openssl_include" != ""; then - INCLUDE_hcrypto="-I${with_openssl_include}" - fi - if test "$with_openssl_lib" != ""; then - LIB_hcrypto="-L${with_openssl_lib}" - fi - CFLAGS="-DHAVE_OPENSSL ${INCLUDE_hcrypto} ${CFLAGS}" - saved_LIB_hcrypto="$LIB_hcrypto" - for lres in "" "-ldl" "-lnsl -lsocket" "-lnsl -lsocket -ldl"; do - LIB_hcrypto="${saved_LIB_hcrypto} -lcrypto $lres" - LIB_hcrypto_a="$LIB_hcrypto" - LIB_hcrypto_so="$LIB_hcrypto" - LIB_hcrypto_appl="$LIB_hcrypto" - LIBS="${LIBS} ${LIB_hcrypto}" - AC_LINK_IFELSE([AC_LANG_PROGRAM([test_headers],[test_body])], [ - crypto_lib=libcrypto openssl=yes - AC_MSG_RESULT([libcrypto]) - ]) - if test "$crypto_lib" = libcrypto ; then - break; - fi - done - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" -fi - -if test "$crypto_lib" = "unknown"; then - - DIR_hcrypto='hcrypto' - LIB_hcrypto='$(top_builddir)/lib/hcrypto/libhcrypto.la' - LIB_hcrypto_a='$(top_builddir)/lib/hcrypto/.libs/libhcrypto.a' - LIB_hcrypto_so='$(top_builddir)/lib/hcrypto/.libs/libhcrypto.so' - LIB_hcrypto_appl="-lhcrypto" - - AC_MSG_RESULT([included libhcrypto]) - -fi - -if test "$with_krb4" != no -a "$crypto_lib" != krb4; then - AC_MSG_ERROR([the crypto library used by krb4 lacks features -required by Kerberos 5; to continue, you need to install a newer -Kerberos 4 or configure --without-krb4]) -fi - -if test "$openssl" = "yes"; then - AC_DEFINE([HAVE_OPENSSL], 1, [define to use openssl's libcrypto]) -fi -AM_CONDITIONAL(HAVE_OPENSSL, test "$openssl" = yes)dnl - -AC_SUBST(DIR_hcrypto) -AC_SUBST(INCLUDE_hcrypto) -AC_SUBST(LIB_hcrypto) -AC_SUBST(LIB_hcrypto_a) -AC_SUBST(LIB_hcrypto_so) -AC_SUBST(LIB_hcrypto_appl) -]) diff --git a/kerberosV/src/cf/db.m4 b/kerberosV/src/cf/db.m4 deleted file mode 100644 index 22f4746cc28..00000000000 --- a/kerberosV/src/cf/db.m4 +++ /dev/null @@ -1,232 +0,0 @@ -dnl $Id: db.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl tests for various db libraries -dnl - -AC_DEFUN([rk_DB],[ -AC_ARG_WITH(berkeley-db, - AS_HELP_STRING([--with-berkeley-db], - [enable support for berkeley db @<:@default=check@:>@]), - [], - [with_berkeley_db=check]) - -dbheader="" -AC_ARG_WITH(berkeley-db-include, - AS_HELP_STRING([--with-berkeley-db-include=dir], - [use berkeley-db headers in dir]), - [dbheader=$withval], - [with_berkeley_db_include=check]) - -AC_ARG_ENABLE(ndbm-db, - AS_HELP_STRING([--disable-ndbm-db], - [if you don't want ndbm db]),[ -]) - -have_ndbm=no -db_type=unknown - -AS_IF([test "x$with_berkeley_db" != xno], - [AS_IF([test "x$with_berkeley_db_include" != xcheck], - [AC_CHECK_HEADERS(["$dbheader/db.h"], - [AC_SUBST([DBHEADER], [$dbheader]) - AC_DEFINE([HAVE_DBHEADER], [1], - [Define if you have user supplied header location]) - ], - [if test "x$with_berkeley_db_include" != xcheck; then - AC_MSG_FAILURE( - [--with-berkeley-db-include was given but include test failed]) - fi - ])], - [AC_CHECK_HEADERS([ \ - db5/db.h \ - db4/db.h \ - db3/db.h \ - db.h \ - ])]) - -dnl db_create is used by db3 and db4 and db5 - - AC_FIND_FUNC_NO_LIBS(db_create, [$dbheader] db5 db4 db3 db, [ - #include - #ifdef HAVE_DBHEADER - #include <$dbheader/db.h> - #elif HAVE_DB5_DB_H - #include - #elif HAVE_DB4_DB_H - #include - #elif defined(HAVE_DB3_DB_H) - #include - #else - #include - #endif - ],[NULL, NULL, 0]) - - if test "$ac_cv_func_db_create" = "yes"; then - db_type=db3 - if test "$ac_cv_funclib_db_create" != "yes"; then - DBLIB="$ac_cv_funclib_db_create" - else - DBLIB="" - fi - AC_DEFINE(HAVE_DB3, 1, [define if you have a berkeley db3/4/5 library]) - fi - -dnl dbopen is used by db1/db2 - - AC_FIND_FUNC_NO_LIBS(dbopen, db2 db, [ - #include - #if defined(HAVE_DB2_DB_H) - #include - #elif defined(HAVE_DB_H) - #include - #else - #error no db.h - #endif - ],[NULL, 0, 0, 0, NULL]) - - if test "$ac_cv_func_dbopen" = "yes"; then - db_type=db1 - if test "$ac_cv_funclib_dbopen" != "yes"; then - DBLIB="$ac_cv_funclib_dbopen" - else - DBLIB="" - fi - AC_DEFINE(HAVE_DB1, 1, [define if you have a berkeley db1/2 library]) - fi - -dnl test for ndbm compatability - - if test "$ac_cv_func_dbm_firstkey" != yes; then - AC_FIND_FUNC_NO_LIBS2(dbm_firstkey, $ac_cv_funclib_dbopen $ac_cv_funclib_db_create, [ - #include - #define DB_DBM_HSEARCH 1 - #include - DBM *dbm; - ],[NULL]) - - if test "$ac_cv_func_dbm_firstkey" = "yes"; then - if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then - LIB_NDBM="$ac_cv_funclib_dbm_firstkey" - else - LIB_NDBM="" - fi - AC_DEFINE(HAVE_DB_NDBM, 1, [define if you have ndbm compat in db]) - AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)]) - else - $as_unset ac_cv_func_dbm_firstkey - $as_unset ac_cv_funclib_dbm_firstkey - fi - fi - -]) # fi berkeley db - -if test "$enable_ndbm_db" != "no"; then - - if test "$db_type" = "unknown" -o "$ac_cv_func_dbm_firstkey" = ""; then - - AC_CHECK_HEADERS([ \ - dbm.h \ - ndbm.h \ - ]) - - AC_FIND_FUNC_NO_LIBS(dbm_firstkey, ndbm, [ - #include - #if defined(HAVE_NDBM_H) - #include - #elif defined(HAVE_DBM_H) - #include - #endif - DBM *dbm; - ],[NULL]) - - if test "$ac_cv_func_dbm_firstkey" = "yes"; then - if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then - LIB_NDBM="$ac_cv_funclib_dbm_firstkey" - else - LIB_NDBM="" - fi - AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl - have_ndbm=yes - if test "$db_type" = "unknown"; then - db_type=ndbm - DBLIB="$LIB_NDBM" - fi - else - - $as_unset ac_cv_func_dbm_firstkey - $as_unset ac_cv_funclib_dbm_firstkey - - AC_CHECK_HEADERS([ \ - gdbm/ndbm.h \ - ]) - - AC_FIND_FUNC_NO_LIBS(dbm_firstkey, gdbm, [ - #include - #include - DBM *dbm; - ],[NULL]) - - if test "$ac_cv_func_dbm_firstkey" = "yes"; then - if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then - LIB_NDBM="$ac_cv_funclib_dbm_firstkey" - else - LIB_NDBM="" - fi - AC_DEFINE(HAVE_NDBM, 1, [define if you have a ndbm library])dnl - have_ndbm=yes - if test "$db_type" = "unknown"; then - db_type=ndbm - DBLIB="$LIB_NDBM" - fi - fi - fi - fi #enable_ndbm_db -fi # unknown - -if test "$have_ndbm" = "yes"; then - AC_MSG_CHECKING([if ndbm is implemented with db]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#if defined(HAVE_GDBM_NDBM_H) -#include -#elif defined(HAVE_NDBM_H) -#include -#elif defined(HAVE_DBM_H) -#include -#endif -int main(int argc, char **argv) -{ - 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_MSG_RESULT([yes]) - AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files *.db)]) - else - AC_MSG_RESULT([no]) - fi],[AC_MSG_RESULT([no])],[AC_MSG_RESULT([no-cross])]) -fi - -AM_CONDITIONAL(HAVE_DB1, test "$db_type" = db1)dnl -AM_CONDITIONAL(HAVE_DB3, test "$db_type" = db3)dnl -AM_CONDITIONAL(HAVE_NDBM, test "$db_type" = ndbm)dnl -AM_CONDITIONAL(HAVE_DBHEADER, test "$dbheader" != "")dnl - -## it's probably not correct to include LDFLAGS here, but we might -## need it, for now just add any possible -L -z="" -for i in $LDFLAGS; do - case "$i" in - -L*) z="$z $i";; - esac -done -DBLIB="$z $DBLIB" -AC_SUBST(DBLIB)dnl -AC_SUBST(LIB_NDBM)dnl -]) diff --git a/kerberosV/src/cf/destdirs.m4 b/kerberosV/src/cf/destdirs.m4 deleted file mode 100644 index 50720817d95..00000000000 --- a/kerberosV/src/cf/destdirs.m4 +++ /dev/null @@ -1,18 +0,0 @@ -dnl -dnl $Id: destdirs.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl - -AC_DEFUN([rk_DESTDIRS], [ -# This is done by AC_OUTPUT but we need the result here. -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -AC_FOREACH([rk_dir], [bin lib libexec localstate sbin sysconf], [ - x="${rk_dir[]dir}" - eval y="$x" - while test "x$y" != "x$x"; do - x="$y" - eval y="$x" - done - AC_DEFINE_UNQUOTED(AS_TR_CPP(rk_dir[]dir), "$x", [path to ]rk_dir[])]) -]) diff --git a/kerberosV/src/cf/dispatch.m4 b/kerberosV/src/cf/dispatch.m4 deleted file mode 100644 index 68b39fd48ae..00000000000 --- a/kerberosV/src/cf/dispatch.m4 +++ /dev/null @@ -1,20 +0,0 @@ - -AC_DEFUN([rk_LIBDISPATCH],[ - -AC_CHECK_HEADERS([dispatch/dispatch.h]) - -AC_FIND_FUNC_NO_LIBS(dispatch_async_f, dispatch, -[#ifdef HAVE_DISPATCH_DISPATCH_H -#include -#endif],[0,0,0]) - -if test "$ac_cv_func_dispatch_async_f" = yes ; then - AC_DEFINE([HAVE_GCD], 1, [Define if os support gcd.]) - libdispatch=yes -else - libdispatch=no -fi - -AM_CONDITIONAL(have_gcd, test "$libdispatch" = yes) - -]) \ No newline at end of file diff --git a/kerberosV/src/cf/dlopen.m4 b/kerberosV/src/cf/dlopen.m4 deleted file mode 100644 index 3aa10a62f4b..00000000000 --- a/kerberosV/src/cf/dlopen.m4 +++ /dev/null @@ -1,11 +0,0 @@ -dnl -dnl $Id: dlopen.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl - -AC_DEFUN([rk_DLOPEN], [ - AC_FIND_FUNC_NO_LIBS(dlopen, dl,[ -#ifdef HAVE_DLFCN_H -#include -#endif],[0,0]) - AM_CONDITIONAL(HAVE_DLOPEN, test "$ac_cv_funclib_dlopen" != no) -]) diff --git a/kerberosV/src/cf/find-func-no-libs.m4 b/kerberosV/src/cf/find-func-no-libs.m4 deleted file mode 100644 index dbb7c7a70e3..00000000000 --- a/kerberosV/src/cf/find-func-no-libs.m4 +++ /dev/null @@ -1,9 +0,0 @@ -dnl $Id: find-func-no-libs.m4,v 1.3 2013/06/17 18:57:40 robert 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/kerberosV/src/cf/find-func-no-libs2.m4 b/kerberosV/src/cf/find-func-no-libs2.m4 deleted file mode 100644 index bee308fcdd5..00000000000 --- a/kerberosV/src/cf/find-func-no-libs2.m4 +++ /dev/null @@ -1,63 +0,0 @@ -dnl $Id: find-func-no-libs2.m4,v 1.3 2013/06/17 18:57:40 robert 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 - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS="$6 $ac_lib $5 $ac_save_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$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" - -if false; then - AC_CHECK_FUNCS($1) -dnl AC_CHECK_LIBS($2, foo) -fi -# $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/kerberosV/src/cf/find-func.m4 b/kerberosV/src/cf/find-func.m4 deleted file mode 100644 index fbfde065476..00000000000 --- a/kerberosV/src/cf/find-func.m4 +++ /dev/null @@ -1,9 +0,0 @@ -dnl $Id: find-func.m4,v 1.3 2013/06/17 18:57:40 robert 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/kerberosV/src/cf/find-if-not-broken.m4 b/kerberosV/src/cf/find-if-not-broken.m4 deleted file mode 100644 index 4850080f9cd..00000000000 --- a/kerberosV/src/cf/find-if-not-broken.m4 +++ /dev/null @@ -1,12 +0,0 @@ -dnl $Id: find-if-not-broken.m4,v 1.3 2013/06/17 18:57:40 robert 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 - rk_LIBOBJ([$1]) -fi -]) diff --git a/kerberosV/src/cf/framework-security.m4 b/kerberosV/src/cf/framework-security.m4 deleted file mode 100644 index 3358292f4e6..00000000000 --- a/kerberosV/src/cf/framework-security.m4 +++ /dev/null @@ -1,31 +0,0 @@ -AC_DEFUN([rk_FRAMEWORK_SECURITY], [ - -AC_MSG_CHECKING([for framework security]) -AC_CACHE_VAL(rk_cv_framework_security, -[ -if test "$rk_cv_framework_security" != yes; then - ac_save_LIBS="$LIBS" - LIBS="$ac_save_LIBS -framework Security -framework CoreFoundation" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include -]], -[[SecKeychainSearchRef searchRef; -SecKeychainSearchCreateFromAttributes(NULL,kSecCertificateItemClass,NULL, &searchRef); -CFRelease(&searchRef); -]])],[rk_cv_framework_security=yes]) - LIBS="$ac_save_LIBS" -fi -]) - -if test "$rk_cv_framework_security" = yes; then - AC_DEFINE(HAVE_FRAMEWORK_SECURITY, 1, [Have -framework Security]) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi -AM_CONDITIONAL(FRAMEWORK_SECURITY, test "$rk_cv_framework_security" = yes) - -if test "$rk_cv_framework_security" = yes; then - AC_NEED_PROTO([#include ],SecKeyGetCSPHandle) -fi - -]) diff --git a/kerberosV/src/cf/have-pragma-weak.m4 b/kerberosV/src/cf/have-pragma-weak.m4 deleted file mode 100644 index 0eeae000c80..00000000000 --- a/kerberosV/src/cf/have-pragma-weak.m4 +++ /dev/null @@ -1,37 +0,0 @@ -dnl $Id: have-pragma-weak.m4,v 1.3 2013/06/17 18:57:40 robert 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(void) { - return foo; -} - -int main(int argc, char **argv) { - 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/kerberosV/src/cf/have-struct-field.m4 b/kerberosV/src/cf/have-struct-field.m4 deleted file mode 100644 index 5f35979a4ca..00000000000 --- a/kerberosV/src/cf/have-struct-field.m4 +++ /dev/null @@ -1,21 +0,0 @@ -dnl $Id: have-struct-field.m4,v 1.3 2013/06/17 18:57:40 robert 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_COMPILE_IFELSE([AC_LANG_PROGRAM([[$3]], - [[$1 x; memset(&x, 0, sizeof(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/kerberosV/src/cf/have-type.m4 b/kerberosV/src/cf/have-type.m4 deleted file mode 100644 index 870d630b78c..00000000000 --- a/kerberosV/src/cf/have-type.m4 +++ /dev/null @@ -1,30 +0,0 @@ -dnl $Id: have-type.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl check for existance of a type - -dnl AC_HAVE_TYPE(TYPE,INCLUDES) -AC_DEFUN([AC_HAVE_TYPE], [ -AC_REQUIRE([AC_HEADER_STDC]) -cv=`echo "$1" | sed 'y%./+- %__p__%'` -AC_MSG_CHECKING(for $1) -AC_CACHE_VAL([ac_cv_type_$cv], -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#if STDC_HEADERS -#include -#include -#endif -$2]], -[[$1 foo;]])], -[eval "ac_cv_type_$cv=yes"], -[eval "ac_cv_type_$cv=no"]))dnl -ac_foo=`eval echo \\$ac_cv_type_$cv` -AC_MSG_RESULT($ac_foo) -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - AC_CHECK_TYPES($1) -fi - AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1']) -fi -]) diff --git a/kerberosV/src/cf/have-types.m4 b/kerberosV/src/cf/have-types.m4 deleted file mode 100644 index 5b4dcbf6d9e..00000000000 --- a/kerberosV/src/cf/have-types.m4 +++ /dev/null @@ -1,12 +0,0 @@ -dnl -dnl $Id: have-types.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl - -AC_DEFUN([AC_HAVE_TYPES], [ -for i in $1; do - AC_HAVE_TYPE($i) -done -if false;then - AC_CHECK_FUNCS($1) -fi -]) diff --git a/kerberosV/src/cf/install-catman.sh b/kerberosV/src/cf/install-catman.sh deleted file mode 100644 index 93a84c7d9fe..00000000000 --- a/kerberosV/src/cf/install-catman.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -# -# $Id: install-catman.sh,v 1.3 2013/06/17 18:57:40 robert Exp $ -# -# install preformatted manual pages - -cmd="$1"; shift -INSTALL_DATA="$1"; shift -mkinstalldirs="$1"; shift -srcdir="$1"; shift -manbase="$1"; shift -suffix="$1"; shift -catinstall="${INSTALL_CATPAGES-yes}" - -for f in "$@"; do - echo $f - base=`echo "$f" | sed 's/\.[^.]*$//'` - section=`echo "$f" | sed 's/^[^.]*\.//'` - mandir="$manbase/man$section" - catdir="$manbase/cat$section" - c="$base.cat$section" - - if test "$catinstall" = yes -a -f "$srcdir/$c"; then - if test "$cmd" = install ; then - if test \! -d "$catdir"; then - eval "$mkinstalldirs $catdir" - fi - eval "echo $INSTALL_DATA $srcdir/$c $catdir/$base.$suffix" - eval "$INSTALL_DATA $srcdir/$c $catdir/$base.$suffix" - elif test "$cmd" = uninstall ; then - eval "echo rm -f $catdir/$base.$suffix" - eval "rm -f $catdir/$base.$suffix" - fi - fi - for link in `sed -n -e '/SYNOPSIS/q;/DESCRIPTION/q;s/^\.Nm \([^ ]*\).*/\1/p' $srcdir/$f`; do - if test "$link" = "$base" ; then - continue - fi - if test "$cmd" = install ; then - target="$mandir/$link.$section" - for lncmd in "ln -f $mandir/$base.$section $target" \ - "ln -s $base.$section $target" \ - "cp -f $mandir/$base.$section $target" - do - if eval "$lncmd"; then - eval echo "$lncmd" - break - fi - done - if test "$catinstall" = yes -a -f "$srcdir/$c"; then - eval target="$catdir/$link.$suffix" - eval source="$catdir/$base.$suffix" - for lncmd in "ln -f $source $target" \ - "ln -fs $source $target" \ - "cp -f $catdir/$source $target" - do - if eval "$lncmd"; then - eval echo "$lncmd" - break - fi - done - fi - elif test "$cmd" = uninstall ; then - target="$mandir/$link.$section" - eval "echo rm -f $target" - eval "rm -f $target" - if test "$catinstall" = yes; then - target="$catdir/$link.$suffix" - eval "echo rm -f $target" - eval "rm -f $target" - fi - fi - done -done diff --git a/kerberosV/src/cf/irix.m4 b/kerberosV/src/cf/irix.m4 deleted file mode 100644 index f623a0c0ce4..00000000000 --- a/kerberosV/src/cf/irix.m4 +++ /dev/null @@ -1,15 +0,0 @@ -dnl -dnl $Id: irix.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl - -AC_DEFUN([rk_IRIX], -[ -irix=no -case "$host" in -*-*-irix*) - irix=yes - ;; -esac -AM_CONDITIONAL(IRIX, test "$irix" != no)dnl - -]) diff --git a/kerberosV/src/cf/krb-bigendian.m4 b/kerberosV/src/cf/krb-bigendian.m4 deleted file mode 100644 index 079d14ce7b3..00000000000 --- a/kerberosV/src/cf/krb-bigendian.m4 +++ /dev/null @@ -1,62 +0,0 @@ -dnl -dnl $Id: krb-bigendian.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl - -dnl check if this computer is little or big-endian -dnl if we can figure it out at compile-time then don't define the cpp symbol -dnl otherwise test for it and define it. also allow options for overriding -dnl it when cross-compiling - -AC_DEFUN([KRB_C_BIGENDIAN], [ -AC_ARG_ENABLE(bigendian, - AS_HELP_STRING([--enable-bigendian],[the target is big endian]), -krb_cv_c_bigendian=yes) -AC_ARG_ENABLE(littleendian, - AS_HELP_STRING([--enable-littleendian],[the target is little endian]), -krb_cv_c_bigendian=no) -AC_CACHE_CHECK([whether byte order is known at compile time], -krb_cv_c_bigendian_compile, -[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif]])],[krb_cv_c_bigendian_compile=yes],[krb_cv_c_bigendian_compile=no])]) -AC_CACHE_CHECK(whether byte ordering is bigendian, krb_cv_c_bigendian,[ - if test "$krb_cv_c_bigendian_compile" = "yes"; then - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif]])],[krb_cv_c_bigendian=yes],[krb_cv_c_bigendian=no]) - else - AC_RUN_IFELSE([AC_LANG_SOURCE([[main (int argc, char **argv) { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); - }]])],[krb_cv_c_bigendian=no],[krb_cv_c_bigendian=yes], - [AC_MSG_ERROR([specify either --enable-bigendian or --enable-littleendian])]) - fi -]) -if test "$krb_cv_c_bigendian" = "yes"; then - AC_DEFINE(WORDS_BIGENDIAN, 1, [define if target is big endian])dnl -fi -if test "$krb_cv_c_bigendian_compile" = "yes"; then - AC_DEFINE(ENDIANESS_IN_SYS_PARAM_H, 1, [define if sys/param.h defines the endiness])dnl -fi -AH_BOTTOM([ -#ifdef ENDIANESS_IN_SYS_PARAM_H -# include -# include -# if BYTE_ORDER == BIG_ENDIAN -# define WORDS_BIGENDIAN 1 -# endif -#endif -]) -]) diff --git a/kerberosV/src/cf/krb-func-getcwd-broken.m4 b/kerberosV/src/cf/krb-func-getcwd-broken.m4 deleted file mode 100644 index ce48692ef1c..00000000000 --- a/kerberosV/src/cf/krb-func-getcwd-broken.m4 +++ /dev/null @@ -1,41 +0,0 @@ -dnl $Id: krb-func-getcwd-broken.m4,v 1.3 2013/06/17 18:57:40 robert 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_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -char *getcwd(char*, int); - -void *popen(char *cmd, char *mode) -{ - errno = ENOTTY; - return 0; -} - -int main(int argc, char **argv) -{ - 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 - AC_LIBOBJ(getcwd) - AC_MSG_RESULT($ac_cv_func_getcwd_broken) -else - AC_MSG_RESULT([seems ok]) -fi -fi -]) diff --git a/kerberosV/src/cf/krb-func-getlogin.m4 b/kerberosV/src/cf/krb-func-getlogin.m4 deleted file mode 100644 index 7b596774f4e..00000000000 --- a/kerberosV/src/cf/krb-func-getlogin.m4 +++ /dev/null @@ -1,22 +0,0 @@ -dnl -dnl $Id: krb-func-getlogin.m4,v 1.3 2013/06/17 18:57:40 robert 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/kerberosV/src/cf/krb-ipv6.m4 b/kerberosV/src/cf/krb-ipv6.m4 deleted file mode 100644 index 5e9c15d4b32..00000000000 --- a/kerberosV/src/cf/krb-ipv6.m4 +++ /dev/null @@ -1,154 +0,0 @@ -dnl $Id: krb-ipv6.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl test for IPv6 -dnl -ac_cv_lib_ipv6=check - -AC_DEFUN([AC_KRB_IPV6], [ -AC_ARG_WITH(ipv6, - AS_HELP_STRING([--without-ipv6],[do not enable IPv6 support]),[ - ac_cv_lib_ipv6="$withval" -]) -save_CFLAGS="${CFLAGS}" - -if test "X$ac_cv_lib_ipv6" != "Xno"; then - - AC_CACHE_CHECK([for IPv6 stack type], rk_cv_v6type, - [dnl check for different v6 implementations (by itojun) - v6type=unknown - v6lib=none - - for i in v6d toshiba kame inria zeta linux; do - case $i in - v6d) - AC_EGREP_CPP(yes, [ -#include -#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, [ -#include -#ifdef _TOSHIBA_INET6 -yes -#endif], - [v6type=$i; v6lib=inet6; - v6libdir=/usr/local/v6/lib; - CFLAGS="-DINET6 $CFLAGS"]) - ;; - kame) - AC_EGREP_CPP(yes, [ -#include -#ifdef __KAME__ -yes -#endif], - [v6type=$i; v6lib=inet6; - v6libdir=/usr/local/v6/lib; - CFLAGS="-DINET6 $CFLAGS"]) - ;; - inria) - AC_EGREP_CPP(yes, [ -#include -#ifdef IPV6_INRIA_VERSION -yes -#endif], - [v6type=$i; CFLAGS="-DINET6 $CFLAGS"]) - ;; - zeta) - AC_EGREP_CPP(yes, [ -#include -#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 - - 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 - fi]) - - AC_CACHE_CHECK([for IPv6], rk_cv_lib_ipv6, [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#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 = in6addr_any; - bind(s, (struct sockaddr *)&sin6, sizeof(sin6)); -]])], - [ac_cv_lib_ipv6=yes], - [ac_cv_lib_ipv6=no])]) -fi - -if test "$ac_cv_lib_ipv6" = yes; then - AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6.]) -else - CFLAGS="${save_CFLAGS}" -fi - -## test for AIX missing in6addr_loopback -if test "$ac_cv_lib_ipv6" = yes; then - AC_CACHE_CHECK([for in6addr_loopback],[rk_cv_var_in6addr_loopback],[ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif]],[[ -struct sockaddr_in6 sin6; -sin6.sin6_addr = in6addr_loopback; -]])],[ac_cv_var_in6addr_loopback=yes],[ac_cv_var_in6addr_loopback=no])]) - if test "$ac_cv_var_in6addr_loopback" = yes; then - AC_DEFINE(HAVE_IN6ADDR_LOOPBACK, 1, - [Define if you have the in6addr_loopback variable]) - fi -fi -]) \ No newline at end of file diff --git a/kerberosV/src/cf/krb-prog-ln-s.m4 b/kerberosV/src/cf/krb-prog-ln-s.m4 deleted file mode 100644 index b38afbf4366..00000000000 --- a/kerberosV/src/cf/krb-prog-ln-s.m4 +++ /dev/null @@ -1,28 +0,0 @@ -dnl $Id: krb-prog-ln-s.m4,v 1.3 2013/06/17 18:57:40 robert 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/kerberosV/src/cf/krb-prog-ranlib.m4 b/kerberosV/src/cf/krb-prog-ranlib.m4 deleted file mode 100644 index 335a4c3f482..00000000000 --- a/kerberosV/src/cf/krb-prog-ranlib.m4 +++ /dev/null @@ -1,8 +0,0 @@ -dnl $Id: krb-prog-ranlib.m4,v 1.3 2013/06/17 18:57:40 robert 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/kerberosV/src/cf/krb-prog-yacc.m4 b/kerberosV/src/cf/krb-prog-yacc.m4 deleted file mode 100644 index e09ccb6c6ac..00000000000 --- a/kerberosV/src/cf/krb-prog-yacc.m4 +++ /dev/null @@ -1,12 +0,0 @@ -dnl $Id: krb-prog-yacc.m4,v 1.3 2013/06/17 18:57:40 robert 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') -if test "$YACC" = ""; then - AC_MSG_WARN([yacc not found - some stuff will not build]) -fi -]) diff --git a/kerberosV/src/cf/krb-readline.m4 b/kerberosV/src/cf/krb-readline.m4 deleted file mode 100644 index 19dad3f0470..00000000000 --- a/kerberosV/src/cf/krb-readline.m4 +++ /dev/null @@ -1,28 +0,0 @@ -dnl $Id: krb-readline.m4,v 1.3 2013/06/17 18:57:40 robert Exp $ -dnl -dnl Tests for readline functions -dnl - -dnl el_init - -AC_DEFUN([KRB_READLINE],[ - -dnl readline - -ac_foo=no -build_editline=no -if test "$with_readline" = yes; then - : -elif test "$with_libedit" = yes; then - LIB_readline="${LIB_libedit}" -elif test "$ac_cv_func_readline" = yes; then - : -else - build_libedit=yes - LIB_readline="\$(top_builddir)/lib/libedit/src/libheimedit.la \$(LIB_tgetent)" -fi -AM_CONDITIONAL(LIBEDIT, test "$build_libedit" = yes) -AC_DEFINE(HAVE_READLINE, 1, - [Define if you have a readline compatible library.])dnl - -]) diff --git a/kerberosV/src/cf/krb-struct-spwd.m4 b/kerberosV/src/cf/krb-struct-spwd.m4 deleted file mode 100644 index e32fcbdd099..00000000000 --- a/kerberosV/src/cf/krb-struct-spwd.m4 +++ /dev/null @@ -1,21 +0,0 @@ -dnl $Id: krb-struct-spwd.m4,v 1.3 2013/06/17 18:57:40 robert 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_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#ifdef HAVE_SHADOW_H -#include -#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/kerberosV/src/cf/krb-struct-winsize.m4 b/kerberosV/src/cf/krb-struct-winsize.m4 deleted file mode 100644 index 1e92051dfc8..00000000000 --- a/kerberosV/src/cf/krb-struct-winsize.m4 +++ /dev/null @@ -1,25 +0,0 @@ -dnl $Id: krb-struct-winsize.m4,v 1.3 2013/06/17 18:57:41 robert 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( -struct[[ ]]*winsize,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/kerberosV/src/cf/krb-sys-aix.m4 b/kerberosV/src/cf/krb-sys-aix.m4 deleted file mode 100644 index 7f1f14f980a..00000000000 --- a/kerberosV/src/cf/krb-sys-aix.m4 +++ /dev/null @@ -1,15 +0,0 @@ -dnl $Id: krb-sys-aix.m4,v 1.3 2013/06/17 18:57:41 robert 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/kerberosV/src/cf/krb-sys-nextstep.m4 b/kerberosV/src/cf/krb-sys-nextstep.m4 deleted file mode 100644 index 409ce4e7c1a..00000000000 --- a/kerberosV/src/cf/krb-sys-nextstep.m4 +++ /dev/null @@ -1,18 +0,0 @@ -dnl $Id: krb-sys-nextstep.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl -dnl NEXTSTEP is not posix compliant by default, -dnl you need a switch -posix to the compiler -dnl - -AC_DEFUN([rk_SYS_NEXTSTEP], [ -AC_CACHE_CHECK(for NeXTSTEP, rk_cv_sys_nextstep, [ -AC_EGREP_CPP(yes, -[#if defined(NeXT) && !defined(__APPLE__) - yes -#endif -], rk_cv_sys_nextstep=yes, rk_cv_sys_nextstep=no)]) -if test "$rk_cv_sys_nextstep" = "yes"; then - CFLAGS="$CFLAGS -posix" - LIBS="$LIBS -posix" -fi -]) diff --git a/kerberosV/src/cf/krb-version.m4 b/kerberosV/src/cf/krb-version.m4 deleted file mode 100644 index e1a90170a2a..00000000000 --- a/kerberosV/src/cf/krb-version.m4 +++ /dev/null @@ -1,24 +0,0 @@ -dnl $Id: krb-version.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl -dnl -dnl output a C header-file with some version strings -dnl - -AC_DEFUN([AC_KRB_VERSION],[ -cat > include/newversion.h.in </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 -]) diff --git a/kerberosV/src/cf/largefile.m4 b/kerberosV/src/cf/largefile.m4 deleted file mode 100644 index 83a7341d4ce..00000000000 --- a/kerberosV/src/cf/largefile.m4 +++ /dev/null @@ -1,16 +0,0 @@ -dnl $Id: largefile.m4,v 1.2 2013/06/17 18:57:41 robert Exp $ -dnl -dnl Figure out what flags we need for 64-bit file access, and also set -dnl them on the command line. -dnl -AC_DEFUN([rk_SYS_LARGEFILE],[ -AC_REQUIRE([AC_SYS_LARGEFILE])dnl -dnl need to set this on the command line, since it might otherwise break -dnl with generated code, such as lex -if test "$enable_largefile" != no -a "$ac_cv_sys_large_files" != no; then - CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files" -fi -if test "$enable_largefile" != no -a "$ac_cv_sys_file_offset_bits" != no; then - CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" -fi -]) diff --git a/kerberosV/src/cf/libtool.m4 b/kerberosV/src/cf/libtool.m4 deleted file mode 100644 index d8125842f0a..00000000000 --- a/kerberosV/src/cf/libtool.m4 +++ /dev/null @@ -1,7831 +0,0 @@ -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file 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. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_REPLACE_SHELLFNS - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([${with_sysroot}]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine which file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/kerberosV/src/cf/ltoptions.m4 b/kerberosV/src/cf/ltoptions.m4 deleted file mode 100644 index 17cfd51c0b3..00000000000 --- a/kerberosV/src/cf/ltoptions.m4 +++ /dev/null @@ -1,369 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file 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. - -# serial 7 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/kerberosV/src/cf/ltsugar.m4 b/kerberosV/src/cf/ltsugar.m4 deleted file mode 100644 index 9000a057d31..00000000000 --- a/kerberosV/src/cf/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file 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. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/kerberosV/src/cf/ltversion.m4 b/kerberosV/src/cf/ltversion.m4 deleted file mode 100644 index 9c7b5d41185..00000000000 --- a/kerberosV/src/cf/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file 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. - -# @configure_input@ - -# serial 3293 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) diff --git a/kerberosV/src/cf/lt~obsolete.m4 b/kerberosV/src/cf/lt~obsolete.m4 deleted file mode 100644 index c573da90c5c..00000000000 --- a/kerberosV/src/cf/lt~obsolete.m4 +++ /dev/null @@ -1,98 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file 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. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/kerberosV/src/cf/make-proto.pl b/kerberosV/src/cf/make-proto.pl deleted file mode 100644 index a9d0532fbda..00000000000 --- a/kerberosV/src/cf/make-proto.pl +++ /dev/null @@ -1,404 +0,0 @@ -# Make prototypes from .c files -# $Id: make-proto.pl,v 1.3 2013/06/17 18:57:41 robert Exp $ - -##use Getopt::Std; -require 'getopts.pl'; - -my $comment = 0; -my $if_0 = 0; -my $brace = 0; -my $line = ""; -my $debug = 0; -my $oproto = 1; -my $private_func_re = "^_"; -my %depfunction = (); - -Getopts('x:m:o:p:dqE:R:P:') || die "foo"; - -if($opt_d) { - $debug = 1; -} - -if($opt_q) { - $oproto = 0; -} - -if($opt_R) { - $private_func_re = $opt_R; -} -my %flags = ( - 'multiline-proto' => 1, - 'header' => 1, - 'function-blocking' => 0, - 'gnuc-attribute' => 1, - 'cxx' => 1 - ); -if($opt_m) { - foreach $i (split(/,/, $opt_m)) { - if($i eq "roken") { - $flags{"multiline-proto"} = 0; - $flags{"header"} = 0; - $flags{"function-blocking"} = 0; - $flags{"gnuc-attribute"} = 0; - $flags{"cxx"} = 0; - } else { - if(substr($i, 0, 3) eq "no-") { - $flags{substr($i, 3)} = 0; - } else { - $flags{$i} = 1; - } - } - } -} - -if($opt_x) { - open(EXP, $opt_x); - while() { - chomp; - s/\#.*//g; - s/\s+/ /g; - if(/^([a-zA-Z0-9_]+)\s?(.*)$/) { - $exported{$1} = $2; - } else { - print $_, "\n"; - } - } - close EXP; -} - -while(<>) { - print $brace, " ", $_ if($debug); - - # Handle C comments - s@/\*.*\*/@@; - s@//.*/@@; - if ( s@/\*.*@@) { $comment = 1; - } elsif ($comment && s@.*\*/@@) { $comment = 0; - } elsif ($comment) { next; } - - 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(/\{/){ - if (!/\}/) { - $brace++; - } - $_ = $line; - while(s/\*\//\ca/){ - s/\/\*(.|\n)*\ca//; - } - s/^\s*//; - s/\s*$//; - s/\s+/ /g; - if($_ =~ /\)$/){ - if(!/^static/ && !/^PRIVATE/){ - $attr = ""; - if(m/(.*)(__attribute__\s?\(.*\))/) { - $attr .= " $2"; - $_ = $1; - } - if(m/(.*)\s(\w+DEPRECATED_FUNCTION)\s?(\(.*\))(.*)/) { - $depfunction{$2} = 1; - $attr .= " $2$3"; - $_ = "$1 $4"; - } - if(m/(.*)\s(\w+DEPRECATED)(.*)/) { - $attr .= " $2"; - $_ = "$1 $3"; - } - # remove outer () - s/\s*\(//; - # remove , within () - while(s/\(([^()]*),(.*)\)/($1\$$2)/g){} - s/\<\s*void\s*\>/<>/; - # remove parameter names - if($opt_P eq "remove") { - s/(\s*)([a-zA-Z0-9_]+)([,>])/$3/g; - s/\s+\*/*/g; - s/\(\*(\s*)([a-zA-Z0-9_]+)\)/(*)/g; - } elsif($opt_P eq "comment") { - s/([a-zA-Z0-9_]+)([,>])/\/\*$1\*\/$2/g; - s/\(\*([a-zA-Z0-9_]+)\)/(*\/\*$1\*\/)/g; - } - s/\<\>//; - # add newlines before parameters - if($flags{"multiline-proto"}) { - s/,\s*/,\n\t/g; - } else { - s/,\s*/, /g; - } - # fix removed , - s/\$/,/g; - # match function name - /([a-zA-Z0-9_]+)\s*\/$RP/; - # insert newline before function name - if($flags{"multiline-proto"}) { - s/(.*)\s([a-zA-Z0-9_]+ \Q$LP\E)/$1\n$2/; - } - if($attr ne "") { - $_ .= "\n $attr"; - } - $_ = $_ . ";"; - $funcs{$f} = $_; - } - } - $line = ""; - } - if(/\}/){ - $brace--; - } - if(/^\}/){ - $brace = 0; - } - if($brace == 0) { - $line = $line . " " . $_; - } -} - -sub foo { - local ($arg) = @_; - $_ = $arg; - s/.*\/([^\/]*)/$1/; - 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 - -"; -if ($oproto) { - $public_h_header .= "#ifdef __STDC__ -#include -#ifndef __P -#define __P(x) x -#endif -#else -#ifndef __P -#define __P(x) () -#endif -#endif - -"; -} else { - $public_h_header .= "#include - -"; -} -$public_h_trailer = ""; - -$private_h_header = "/* This is a generated file */ -#ifndef $private -#define $private - -"; -if($oproto) { - $private_h_header .= "#ifdef __STDC__ -#include -#ifndef __P -#define __P(x) x -#endif -#else -#ifndef __P -#define __P(x) () -#endif -#endif - -"; -} else { - $private_h_header .= "#include - -"; -} -$private_h_trailer = ""; - -foreach(sort keys %funcs){ - if(/^(main)$/) { next } - if ($funcs{$_} =~ /\^/) { - $beginblock = "#ifdef __BLOCKS__\n"; - $endblock = "#endif /* __BLOCKS__ */\n"; - } else { - $beginblock = $endblock = ""; - } - if(!defined($exported{$_}) && /$private_func_re/) { - $private_h .= $beginblock . $funcs{$_} . "\n" . $endblock . "\n"; - if($funcs{$_} =~ /__attribute__/) { - $private_attribute_seen = 1; - } - } else { - if($flags{"function-blocking"}) { - $fupper = uc $_; - if($exported{$_} =~ /proto/) { - $public_h .= "#if !defined(HAVE_$fupper) || defined(NEED_${fupper}_PROTO)\n"; - } else { - $public_h .= "#ifndef HAVE_$fupper\n"; - } - } - $public_h .= $beginblock . $funcs{$_} . "\n" . $endblock; - if($funcs{$_} =~ /__attribute__/) { - $public_attribute_seen = 1; - } - if($flags{"function-blocking"}) { - $public_h .= "#endif\n"; - } - $public_h .= "\n"; - } -} - -if($flags{"gnuc-attribute"}) { - 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 - -"; - } -} - -my $depstr = ""; -my $undepstr = ""; -foreach (keys %depfunction) { - $depstr .= "#ifndef $_ -#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) -#define $_(X) __attribute__((__deprecated__)) -#else -#define $_(X) -#endif -#endif - - -"; - $public_h_trailer .= "#undef $_ - -"; - $private_h_trailer .= "#undef $_ -#define $_(X) - -"; -} - -$public_h_header .= $depstr; -$private_h_header .= $depstr; - - -if($flags{"cxx"}) { - $public_h_header .= "#ifdef __cplusplus -extern \"C\" { -#endif - -"; - $public_h_trailer = "#ifdef __cplusplus -} -#endif - -" . $public_h_trailer; - -} -if ($opt_E) { - $public_h_header .= "#ifndef $opt_E -#ifndef ${opt_E}_FUNCTION -#if defined(_WIN32) -#define ${opt_E}_FUNCTION __declspec(dllimport) -#define ${opt_E}_CALL __stdcall -#define ${opt_E}_VARIABLE __declspec(dllimport) -#else -#define ${opt_E}_FUNCTION -#define ${opt_E}_CALL -#define ${opt_E}_VARIABLE -#endif -#endif -#endif -"; - - $private_h_header .= "#ifndef $opt_E -#ifndef ${opt_E}_FUNCTION -#if defined(_WIN32) -#define ${opt_E}_FUNCTION __declspec(dllimport) -#define ${opt_E}_CALL __stdcall -#define ${opt_E}_VARIABLE __declspec(dllimport) -#else -#define ${opt_E}_FUNCTION -#define ${opt_E}_CALL -#define ${opt_E}_VARIABLE -#endif -#endif -#endif - -"; -} - -$public_h_trailer .= $undepstr; -$private_h_trailer .= $undepstr; - -if ($public_h ne "" && $flags{"header"}) { - $public_h = $public_h_header . $public_h . - $public_h_trailer . "#endif /* $block */\n"; -} -if ($private_h ne "" && $flags{"header"}) { - $private_h = $private_h_header . $private_h . - $private_h_trailer . "#endif /* $private */\n"; -} - -if($opt_o) { - print OUT $public_h; -} -if($opt_p) { - print PRIV $private_h; -} - -close OUT; -close PRIV; diff --git a/kerberosV/src/cf/mips-abi.m4 b/kerberosV/src/cf/mips-abi.m4 deleted file mode 100644 index 7606b98bf75..00000000000 --- a/kerberosV/src/cf/mips-abi.m4 +++ /dev/null @@ -1,87 +0,0 @@ -dnl $Id: mips-abi.m4,v 1.3 2013/06/17 18:57:41 robert 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, - AS_HELP_STRING([--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_MSG_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_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int x;]])],[eval $ac_foo=yes], [eval $ac_foo=no])dnl -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_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int x;]])],[ac_res=yes],[ac_res=no])dnl - CLAGS="$save_CFLAGS" - if test $ac_res = yes; then - # New GCC - AC_MSG_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_MSG_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_MSG_ERROR("Invalid ABI specified") ;; -esac -fi #if test -n "$GCC"; then -;; -esac -]) diff --git a/kerberosV/src/cf/misc.m4 b/kerberosV/src/cf/misc.m4 deleted file mode 100644 index 8fb7734a2b2..00000000000 --- a/kerberosV/src/cf/misc.m4 +++ /dev/null @@ -1,15 +0,0 @@ - -dnl $Id: misc.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl -AC_DEFUN([upcase],[`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`])dnl -AC_DEFUN([rk_LIBOBJ],[AC_LIBOBJ([$1])])dnl -AC_DEFUN([rk_CONFIG_HEADER],[AH_TOP([#ifndef RCSID -#define RCSID(msg) \ -static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } -#endif - -/* Maximum values on all known systems */ -#define MaxHostNameLen (64+4) -#define MaxPathLen (1024+4) - -])]) \ No newline at end of file diff --git a/kerberosV/src/cf/need-proto.m4 b/kerberosV/src/cf/need-proto.m4 deleted file mode 100644 index 323688bcba6..00000000000 --- a/kerberosV/src/cf/need-proto.m4 +++ /dev/null @@ -1,22 +0,0 @@ -dnl $Id: need-proto.m4,v 1.3 2013/06/17 18:57:41 robert 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_COMPILE_IFELSE([AC_LANG_PROGRAM([[$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"])) -if test "$ac_cv_func_$2_noproto" = yes; then - AC_DEFINE(AS_TR_CPP(NEED_[]$2[]_PROTO), 1, - [define if the system is missing a prototype for $2()]) -fi -fi -]) diff --git a/kerberosV/src/cf/osfc2.m4 b/kerberosV/src/cf/osfc2.m4 deleted file mode 100644 index 44647ff9b5a..00000000000 --- a/kerberosV/src/cf/osfc2.m4 +++ /dev/null @@ -1,14 +0,0 @@ -dnl $Id: osfc2.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl -dnl enable OSF C2 stuff - -AC_DEFUN([AC_CHECK_OSFC2],[ -AC_ARG_ENABLE(osfc2, - AS_HELP_STRING([--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/kerberosV/src/cf/otp.m4 b/kerberosV/src/cf/otp.m4 deleted file mode 100644 index e46791b9ea9..00000000000 --- a/kerberosV/src/cf/otp.m4 +++ /dev/null @@ -1,27 +0,0 @@ -dnl $Id: otp.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl -dnl check requirements for OTP library -dnl -AC_DEFUN([rk_OTP],[ -AC_REQUIRE([rk_DB])dnl -AC_ARG_ENABLE(otp, - AS_HELP_STRING([--disable-otp],[if you don't want OTP support])) -if test "$enable_otp" = yes -a "$db_type" = unknown; then - AC_MSG_ERROR([OTP requires a NDBM/DB compatible library]) -fi -if test "$enable_otp" != no; then - if test "$db_type" != unknown; then - enable_otp=yes - else - enable_otp=no - fi -fi -if test "$enable_otp" = yes; then - AC_DEFINE(OTP, 1, [Define if you want OTP support in applications.]) - LIB_otp='$(top_builddir)/lib/otp/libotp.la' - AC_SUBST(LIB_otp) -fi -AC_MSG_CHECKING([whether to enable OTP library]) -AC_MSG_RESULT($enable_otp) -AM_CONDITIONAL(OTP, test "$enable_otp" = yes)dnl -]) diff --git a/kerberosV/src/cf/pkg.m4 b/kerberosV/src/cf/pkg.m4 deleted file mode 100644 index 8cdc5e41661..00000000000 --- a/kerberosV/src/cf/pkg.m4 +++ /dev/null @@ -1,157 +0,0 @@ -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES diff --git a/kerberosV/src/cf/proto-compat.m4 b/kerberosV/src/cf/proto-compat.m4 deleted file mode 100644 index 54995160ade..00000000000 --- a/kerberosV/src/cf/proto-compat.m4 +++ /dev/null @@ -1,21 +0,0 @@ -dnl $Id: proto-compat.m4,v 1.3 2013/06/17 18:57:41 robert 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_COMPILE_IFELSE([AC_LANG_PROGRAM([[$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/kerberosV/src/cf/pthreads.m4 b/kerberosV/src/cf/pthreads.m4 deleted file mode 100644 index 96e7c728fb6..00000000000 --- a/kerberosV/src/cf/pthreads.m4 +++ /dev/null @@ -1,93 +0,0 @@ -Dnl $Id: pthreads.m4,v 1.2 2013/06/17 18:57:41 robert Exp $ - -AC_DEFUN([KRB_PTHREADS], [ -AC_MSG_CHECKING(if compiling threadsafe libraries) - -AC_ARG_ENABLE(pthread-support, - AS_HELP_STRING([--enable-pthread-support], - [if you want thread safe libraries]), - [],[enable_pthread_support=maybe]) - -case "$host" in -*-*-solaris2*) - native_pthread_support=yes - if test "$GCC" = yes; then - PTHREAD_CFLAGS=-pthreads - PTHREAD_LIBADD=-pthreads - else - PTHREAD_CFLAGS=-mt - PTHREAD_LDADD=-mt - PTHREAD_LIBADD=-mt - fi - ;; -*-*-netbsd[[12]]*) - native_pthread_support="if running netbsd 1.6T or newer" - dnl heim_threads.h knows this - PTHREAD_LIBADD="-lpthread" - ;; -*-*-netbsd[[3456789]]*) - native_pthread_support="netbsd 3 uses explict pthread" - dnl heim_threads.h knows this - PTHREAD_LIBADD="-lpthread" - ;; -*-*-freebsd[[56789]]*) - native_pthread_support=yes - PTHREAD_LIBADD="-pthread" - ;; -*-*-openbsd*) - native_pthread_support=yes - PTHREAD_CFLAGS=-pthread - PTHREAD_LIBADD=-pthread - ;; -*-*-linux* | *-*-linux-gnu) - case `uname -r` in - 2.*|3.*) - native_pthread_support=yes - PTHREAD_CFLAGS=-pthread - PTHREAD_LIBADD=-pthread - ;; - esac - ;; -*-*-kfreebsd*-gnu*) - native_pthread_support=yes - PTHREAD_CFLAGS=-pthread - PTHREAD_LIBADD=-pthread - ;; -*-*-aix*) - dnl AIX is disabled since we don't handle the utmp/utmpx - dnl problems that aix causes when compiling with pthread support - native_pthread_support=no - ;; -mips-sgi-irix6.[[5-9]]) # maybe works for earlier versions too - native_pthread_support=yes - PTHREAD_LIBADD="-lpthread" - ;; -*-*-darwin*) - native_pthread_support=yes - ;; -*) - native_pthread_support=no - ;; -esac - -if test "$enable_pthread_support" = maybe ; then - enable_pthread_support="$native_pthread_support" -fi - -if test "$enable_pthread_support" != no; then - AC_DEFINE(ENABLE_PTHREAD_SUPPORT, 1, - [Define if you want have a thread safe libraries]) - dnl This sucks, but libtool doesn't save the depenecy on -pthread - dnl for libraries. - LIBS="$PTHREAD_LIBADD $LIBS" -else - PTHREAD_CFLAGS="" - PTHREAD_LIBADD="" -fi - -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_LDADD) -AC_SUBST(PTHREAD_LIBADD) - -AC_MSG_RESULT($enable_pthread_support) -]) diff --git a/kerberosV/src/cf/resolv.m4 b/kerberosV/src/cf/resolv.m4 deleted file mode 100644 index 7ea8812f3dc..00000000000 --- a/kerberosV/src/cf/resolv.m4 +++ /dev/null @@ -1,118 +0,0 @@ -dnl stuff used by DNS resolv code in roken -dnl -dnl $Id: resolv.m4,v 1.1 2013/06/17 18:57:41 robert Exp $ -dnl - -AC_DEFUN([rk_RESOLV],[ - -AC_CHECK_HEADERS([arpa/nameser.h dns.h]) - -AC_CHECK_HEADERS(resolv.h, , , [AC_INCLUDES_DEFAULT -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -]) - -AC_FIND_FUNC(res_search, resolv, -[ -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -], -[0,0,0,0,0]) - -AC_FIND_FUNC(res_nsearch, resolv, -[ -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -], -[0,0,0,0,0,0]) - -AC_FIND_FUNC(res_ndestroy, resolv, -[ -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -], -[0]) - -AC_FIND_FUNC_NO_LIBS(dns_search,, -[ -#ifdef HAVE_DNS_H -#include -#endif -], -[0,0,0,0,0,0,0,0]) - - -AC_FIND_FUNC(dn_expand, resolv, -[ -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -], -[0,0,0,0,0]) - -rk_CHECK_VAR(_res, -[#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif]) - -]) diff --git a/kerberosV/src/cf/retsigtype.m4 b/kerberosV/src/cf/retsigtype.m4 deleted file mode 100644 index 73dc3af4e48..00000000000 --- a/kerberosV/src/cf/retsigtype.m4 +++ /dev/null @@ -1,18 +0,0 @@ -dnl -dnl $Id: retsigtype.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl -dnl Figure out return type of signal handlers, and define SIGRETURN macro -dnl that can be used to return from one -dnl -AC_DEFUN([rk_RETSIGTYPE],[ -AC_TYPE_SIGNAL -if test "$ac_cv_type_signal" = "void" ; then - AC_DEFINE(VOID_RETSIGTYPE, 1, [Define if signal handlers return void.]) -fi - -AH_BOTTOM([#ifdef VOID_RETSIGTYPE -#define SIGRETURN(x) return -#else -#define SIGRETURN(x) return (RETSIGTYPE)(x) -#endif]) -]) \ No newline at end of file diff --git a/kerberosV/src/cf/roken-frag.m4 b/kerberosV/src/cf/roken-frag.m4 deleted file mode 100644 index 5850bd74bb3..00000000000 --- a/kerberosV/src/cf/roken-frag.m4 +++ /dev/null @@ -1,763 +0,0 @@ -dnl $Id: roken-frag.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl -dnl some code to get roken working -dnl -dnl rk_ROKEN(subdir) -dnl -AC_DEFUN([rk_ROKEN], [ - -AC_REQUIRE([rk_CONFIG_HEADER]) - -DIR_roken=roken -LIB_roken='$(top_builddir)/$1/libroken.la' -INCLUDES_roken='-I$(top_builddir)/$1 -I$(top_srcdir)/$1' - -dnl Checks for programs -AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([AC_PROG_AWK]) -AC_REQUIRE([AC_OBJEXT]) -AC_REQUIRE([AC_EXEEXT]) -AC_REQUIRE([AC_PROG_LIBTOOL]) - -AC_REQUIRE([AC_MIPS_ABI]) - -AC_DEFINE(rk_PATH_DELIM, '/', [Path name delimiter]) - -dnl C characteristics - -AC_REQUIRE([AC_C___ATTRIBUTE__]) -AC_REQUIRE([AC_C_INLINE]) -AC_REQUIRE([AC_C_CONST]) -rk_WFLAGS(-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs) - -AC_REQUIRE([rk_DB]) - -dnl C types - -AC_REQUIRE([AC_TYPE_SIZE_T]) -AC_HAVE_TYPE([ssize_t],[#include ]) -AC_REQUIRE([AC_TYPE_PID_T]) -AC_REQUIRE([AC_TYPE_UID_T]) -AC_HAVE_TYPE([long long]) - -AC_REQUIRE([rk_RETSIGTYPE]) - -dnl Checks for header files. -AC_REQUIRE([AC_HEADER_STDC]) -AC_REQUIRE([AC_HEADER_TIME]) - -AC_CHECK_HEADERS([\ - arpa/inet.h \ - config.h \ - crypt.h \ - dirent.h \ - errno.h \ - err.h \ - fcntl.h \ - fnmatch.h \ - grp.h \ - ifaddrs.h \ - netinet/in.h \ - netinet/in6.h \ - netinet/in_systm.h \ - netinet6/in6.h \ - paths.h \ - poll.h \ - pwd.h \ - rpcsvc/ypclnt.h \ - search.h \ - shadow.h \ - stdint.h \ - sys/bswap.h \ - sys/ioctl.h \ - sys/mman.h \ - sys/param.h \ - sys/resource.h \ - sys/sockio.h \ - sys/stat.h \ - sys/time.h \ - sys/tty.h \ - sys/types.h \ - sys/uio.h \ - sys/utsname.h \ - sys/wait.h \ - syslog.h \ - termios.h \ - winsock2.h \ - ws2tcpip.h \ - unistd.h \ - userconf.h \ - usersec.h \ - util.h \ -]) - -AC_HAVE_TYPE([uintptr_t],[#ifdef HAVE_STDINT_H -#include -#endif]) - -dnl Sunpro 5.2 has a vis.h which is something different. -AC_CHECK_HEADERS(vis.h, , , [ -#include -#ifndef VIS_SP -#error invis -#endif]) - -AC_CHECK_HEADERS(netdb.h, , , [AC_INCLUDES_DEFAULT -#ifdef HAVE_SYS_TYPES_H -#include -#endif -]) - -AC_CHECK_HEADERS(sys/socket.h, , , [AC_INCLUDES_DEFAULT -#ifdef HAVE_SYS_TYPES_H -#include -#endif -]) - -AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_SOCKET_H -#include -#endif]) - -AC_CHECK_HEADERS(netinet6/in6_var.h, , , [AC_INCLUDES_DEFAULT -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif -]) - -AC_CHECK_HEADERS(sys/sysctl.h, , , [AC_INCLUDES_DEFAULT -#ifdef HAVE_SYS_PARAM_H -#include -#endif -]) - -AC_CHECK_HEADERS(sys/proc.h, , , [AC_INCLUDES_DEFAULT -#ifdef HAVE_SYS_PARAM_H -#include -#endif -]) - -AC_REQUIRE([CHECK_NETINET_IP_AND_TCP]) - -AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes) -AM_CONDITIONAL(have_ifaddrs_h, test "$ac_cv_header_ifaddrs_h" = yes) -AM_CONDITIONAL(have_search_h, test "$ac_cv_header_search_h" = yes) -AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes) - -dnl Check for functions and libraries - -AC_FIND_FUNC(socket, socket) -AC_FIND_FUNC(gethostbyname, nsl) -AC_FIND_FUNC(syslog, syslog) - -AC_KRB_IPV6 - -AC_FIND_FUNC(gethostbyname2, inet6 ip6) - -rk_RESOLV - -AC_BROKEN_SNPRINTF -AC_BROKEN_VSNPRINTF - -AC_BROKEN_GLOB -if test "$ac_cv_func_glob_working" != yes; then - AC_LIBOBJ(glob) -fi -AM_CONDITIONAL(have_glob_h, test "$ac_cv_func_glob_working" = yes) - - -AC_CHECK_FUNCS([ \ - asnprintf \ - asprintf \ - atexit \ - cgetent \ - getconfattr \ - getprogname \ - getrlimit \ - getspnam \ - issetugid \ - on_exit \ - poll \ - random \ - setprogname \ - strsvis \ - strsvisx \ - strunvis \ - strvis \ - strvisx \ - svis \ - sysconf \ - sysctl \ - tdelete \ - tfind \ - twalk \ - uname \ - unvis \ - vasnprintf \ - vasprintf \ - vis \ -]) - -if test "$ac_cv_func_cgetent" = no; then - AC_LIBOBJ(getcap) -fi -AM_CONDITIONAL(have_cgetent, test "$ac_cv_func_cgetent" = yes) - -AC_REQUIRE([AC_FUNC_GETLOGIN]) - -AC_REQUIRE([AC_FUNC_MMAP]) - -AC_FIND_FUNC_NO_LIBS(getsockopt,, -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif], -[0,0,0,0,0]) -AC_FIND_FUNC_NO_LIBS(setsockopt,, -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif], -[0,0,0,0,0]) - -AC_FIND_IF_NOT_BROKEN(hstrerror, resolv, -[#ifdef HAVE_NETDB_H -#include -#endif], -17) -AC_NEED_PROTO([ -#ifdef HAVE_NETDB_H -#include -#endif], -hstrerror) - -AC_FOREACH([rk_func], [asprintf vasprintf asnprintf vasnprintf], - [AC_NEED_PROTO([ - #include - #include ], - rk_func)]) - -AC_FIND_FUNC_NO_LIBS(bswap16,, -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BSWAP_H -#include -#endif],0) - -AC_FIND_FUNC_NO_LIBS(bswap32,, -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BSWAP_H -#include -#endif],0) - -AC_FIND_FUNC_NO_LIBS(pidfile,util, -[#ifdef HAVE_UTIL_H -#include -#endif],0) - -AC_FIND_IF_NOT_BROKEN(getaddrinfo,, -[#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif],[0,0,0,0]) - -AC_FIND_IF_NOT_BROKEN(getnameinfo,, -[#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif],[0,0,0,0,0,0,0]) - -AC_FIND_IF_NOT_BROKEN(freeaddrinfo,, -[#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif],[0]) - -AC_FIND_IF_NOT_BROKEN(gai_strerror,, -[#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif],[0]) - -dnl Darwin is weird, and in some senses not unix, launchd doesn't want -dnl servers to use daemon(), so its deprecated. -case "$host_os" in - darwin*) - ;; - *) - AC_DEFINE([SUPPORT_DETACH], 1, - [Define if os support want to detach is daemonens.]) - AC_BROKEN([daemon]) ;; -esac - -AC_BROKEN([ \ - chown \ - copyhostent \ - closefrom \ - ecalloc \ - emalloc \ - erealloc \ - estrdup \ - err \ - errx \ - fchown \ - flock \ - fnmatch \ - freehostent \ - getcwd \ - getdtablesize \ - getegid \ - geteuid \ - getgid \ - gethostname \ - getifaddrs \ - getipnodebyaddr \ - getipnodebyname \ - getopt \ - gettimeofday \ - getuid \ - getusershell \ - initgroups \ - innetgr \ - iruserok \ - localtime_r \ - lstat \ - memmove \ - mkstemp \ - putenv \ - rcmd \ - readv \ - recvmsg \ - sendmsg \ - setegid \ - setenv \ - seteuid \ - strcasecmp \ - strdup \ - strerror \ - strftime \ - strlcat \ - strlcpy \ - strlwr \ - strncasecmp \ - strndup \ - strnlen \ - strptime \ - strsep \ - strsep_copy \ - strtok_r \ - strupr \ - swab \ - tsearch \ - timegm \ - unsetenv \ - verr \ - verrx \ - vsyslog \ - vwarn \ - vwarnx \ - warn \ - warnx \ - writev \ -]) - -AM_CONDITIONAL(have_fnmatch_h, - test "$ac_cv_header_fnmatch_h" = yes -a "$ac_cv_func_fnmatch" = yes) - -AC_FOREACH([rk_func], [strndup strsep strtok_r], - [AC_NEED_PROTO([#include ], rk_func)]) - -AC_FOREACH([rk_func], [strsvis strsvisx strunvis strvis strvisx svis unvis vis], -[AC_NEED_PROTO([#ifdef HAVE_VIS_H -#include -#endif], rk_func)]) - -AC_MSG_CHECKING([checking for dirfd]) -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include -#ifdef HAVE_DIRENT_H -#include -#endif -]], - [[DIR *d = 0; dirfd(d);]])], - [ac_rk_have_dirfd=yes], [ac_rk_have_dirfd=no]) -if test "$ac_rk_have_dirfd" = "yes" ; then - AC_DEFINE_UNQUOTED(HAVE_DIRFD, 1, [have a dirfd function/macro]) -fi -AC_MSG_RESULT($ac_rk_have_dirfd) - -AC_HAVE_STRUCT_FIELD(DIR, dd_fd, [#include -#ifdef HAVE_DIRENT_H -#include -#endif]) - - -AC_BROKEN2(inet_aton, -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif], -[0,0]) - -AC_BROKEN2(inet_ntop, -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif], -[0, 0, 0, 0]) - -AC_BROKEN2(inet_pton, -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif], -[0,0,0]) - -dnl -dnl Check for sa_len in struct sockaddr, -dnl needs to come before the getnameinfo test -dnl -AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include -#include ]) - -if test "$ac_cv_func_getaddrinfo" = "yes"; then - rk_BROKEN_GETADDRINFO - if test "$ac_cv_func_getaddrinfo_numserv" = no; then - AC_LIBOBJ(getaddrinfo) - AC_LIBOBJ(freeaddrinfo) - fi -fi - -AC_NEED_PROTO([#include ], setenv) -AC_NEED_PROTO([#include ], unsetenv) -AC_NEED_PROTO([#include ], gethostname) -AC_NEED_PROTO([#include ], mkstemp) -AC_NEED_PROTO([#include ], getusershell) -AC_NEED_PROTO([#include ], daemon) -AC_NEED_PROTO([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif], -iruserok) - -AC_NEED_PROTO([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif], -inet_aton) - -AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl - -AC_REQUIRE([rk_BROKEN_REALLOC])dnl - -dnl AC_KRB_FUNC_GETCWD_BROKEN - -dnl strerror_r is great fun, on linux it exists before sus catched up, -dnl so the return type is diffrent, lets check for both - -AC_PROTO_COMPAT([ -#include -#include -], -strerror_r, int strerror_r(int, char *, size_t)) - -AC_CHECK_FUNC([strerror_r], - [AC_DEFINE_UNQUOTED(HAVE_STRERROR_R, 1, - [Define if you have the function strerror_r.])]) - -dnl -dnl Checks for prototypes and declarations -dnl - -AC_PROTO_COMPAT([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -], -gethostbyname, struct hostent *gethostbyname(const char *)) - -AC_PROTO_COMPAT([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -], -gethostbyaddr, struct hostent *gethostbyaddr(const void *, size_t, int)) - -AC_PROTO_COMPAT([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -], -getservbyname, struct servent *getservbyname(const char *, const char *)) - -AC_PROTO_COMPAT([ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -], -getsockname, int getsockname(int, struct sockaddr*, socklen_t*)) - -AC_PROTO_COMPAT([ -#ifdef HAVE_SYSLOG_H -#include -#endif -], -openlog, void openlog(const char *, int, int)) - -AC_NEED_PROTO([ -#ifdef HAVE_CRYPT_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -], -crypt) - -dnl variables - -rk_CHECK_VAR(h_errno, -[#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -]) - -rk_CHECK_VAR(h_errlist, -[#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif]) - -rk_CHECK_VAR(h_nerr, -[#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif]) - -rk_CHECK_VAR([__progname], -[#ifdef HAVE_ERR_H -#include -#endif]) - -AC_CHECK_DECLS([optarg, optind, opterr, optopt, environ],[],[],[ -#include -#ifdef HAVE_UNISTD_H -#include -#endif]) - -dnl -dnl Check for fields in struct tm -dnl - -AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include ]) -AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include ]) - -dnl -dnl or do we have a variable `timezone' ? -dnl - -rk_CHECK_VAR(timezone,[#include ]) -rk_CHECK_VAR(altzone,[#include ]) - -AC_HAVE_TYPE([sa_family_t],[ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif]) -AC_HAVE_TYPE([socklen_t],[ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif]) -AC_HAVE_TYPE([struct sockaddr], [ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif]) -AC_HAVE_TYPE([struct sockaddr_storage], [ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif]) -AC_HAVE_TYPE([struct addrinfo], [ -#include -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif]) -AC_HAVE_TYPE([struct ifaddrs], [#include ]) -AC_HAVE_TYPE([struct iovec],[ -#include -#include -]) -AC_HAVE_TYPE([struct msghdr],[ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif]) - -dnl -dnl Check for struct winsize -dnl - -AC_KRB_STRUCT_WINSIZE - -dnl -dnl Check for struct spwd -dnl - -AC_KRB_STRUCT_SPWD - -# -# Check if we want samba's socket wrapper -# - -samba_SOCKET_WRAPPER - -dnl won't work with automake -dnl moved to AC_OUTPUT in configure.in -dnl AC_CONFIG_FILES($1/Makefile) - -LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)" - -AC_SUBST(DIR_roken)dnl -AC_SUBST(LIB_roken)dnl -AC_SUBST(INCLUDES_roken)dnl -]) diff --git a/kerberosV/src/cf/roken.m4 b/kerberosV/src/cf/roken.m4 deleted file mode 100644 index a885e145b91..00000000000 --- a/kerberosV/src/cf/roken.m4 +++ /dev/null @@ -1,64 +0,0 @@ -dnl $Id: roken.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl -dnl try to look for an installed roken library with sufficient stuff -dnl -dnl set LIB_roken to the what we should link with -dnl set DIR_roken to if the directory should be built -dnl set CPPFLAGS_roken to stuff to add to CPPFLAGS - -dnl AC_ROKEN(version,directory-to-try,roken-dir,fallback-library,fallback-cppflags) -AC_DEFUN([AC_ROKEN], [ - -AC_ARG_WITH(roken, - AS_HELP_STRING([--with-roken=dir],[use the roken library in dir]), -[if test "$withval" = "no"; then - AC_MSG_ERROR(roken is required) -fi]) - -save_CPPFLAGS="${CPPFLAGS}" - -case $with_roken in -yes|"") - dirs="$2" ;; -*) - dirs="$with_roken" ;; -esac - -roken_installed=no - -for i in $dirs; do - -AC_MSG_CHECKING(for roken in $i) - -CPPFLAGS="-I$i/include ${CPPFLAGS}" - -AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ -#include -#if ROKEN_VERSION < $1 -#error old roken version, should be $1 -fail -#endif -]])],[roken_installed=yes; break]) - -AC_MSG_RESULT($roken_installed) - -done - -CPPFLAGS="$save_CPPFLAGS" - -if test "$roken_installed" != "yes"; then - DIR_roken="roken" - LIB_roken='$4' - CPPFLAGS_roken='$5' - AC_CONFIG_SUBDIRS(lib/roken) -else - LIB_roken="$i/lib/libroken.la" - CPPFLAGS_roken="-I$i/include" -fi - -LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)" - -AC_SUBST(LIB_roken)dnl -AC_SUBST(DIR_roken)dnl -AC_SUBST(CPPFLAGS_roken)dnl -]) diff --git a/kerberosV/src/cf/socket-wrapper.m4 b/kerberosV/src/cf/socket-wrapper.m4 deleted file mode 100644 index 0ba8b047367..00000000000 --- a/kerberosV/src/cf/socket-wrapper.m4 +++ /dev/null @@ -1,16 +0,0 @@ -dnl $Id: socket-wrapper.m4,v 1.1 2013/06/17 18:57:41 robert Exp $ -dnl -AC_DEFUN([samba_SOCKET_WRAPPER], [ - -AC_ARG_ENABLE(socket-wrapper, - AS_HELP_STRING([--enable-socket-wrapper], - [use sambas socket-wrapper for testing])) - -AM_CONDITIONAL(have_socket_wrapper, test "x$enable_socket_wrapper" = xyes)dnl - -if test "x$enable_socket_wrapper" = xyes ; then - AC_DEFINE(SOCKET_WRAPPER_REPLACE, 1, - [Define if you want to use samba socket wrappers.]) -fi - -]) diff --git a/kerberosV/src/cf/sunos.m4 b/kerberosV/src/cf/sunos.m4 deleted file mode 100644 index 85dfdfdc207..00000000000 --- a/kerberosV/src/cf/sunos.m4 +++ /dev/null @@ -1,22 +0,0 @@ -dnl -dnl $Id: sunos.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl - -AC_DEFUN([rk_SUNOS],[ -sunos=no -case "$host" in -*-*-solaris2.7) - sunos=57 - ;; -*-*-solaris2.[[89]] | *-*-solaris2.1[[0-9]]) - sunos=58 - ;; -*-*-solaris2*) - sunos=50 - ;; -esac -if test "$sunos" != no; then - AC_DEFINE_UNQUOTED(SunOS, $sunos, - [Define to what version of SunOS you are running.]) -fi -]) \ No newline at end of file diff --git a/kerberosV/src/cf/telnet.m4 b/kerberosV/src/cf/telnet.m4 deleted file mode 100644 index a18ff67294b..00000000000 --- a/kerberosV/src/cf/telnet.m4 +++ /dev/null @@ -1,75 +0,0 @@ -dnl -dnl $Id: telnet.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl -dnl stuff used by telnet - -AC_DEFUN([rk_TELNET],[ -AC_DEFINE(AUTHENTICATION, 1, - [Define if you want authentication support in telnet.])dnl -AC_DEFINE(ENCRYPTION, 1, - [Define if you want encryption support in telnet.])dnl -AC_DEFINE(DES_ENCRYPTION, 1, - [Define if you want to use DES encryption in telnet.])dnl -AC_DEFINE(DIAGNOSTICS, 1, - [Define this to enable diagnostics in telnet.])dnl -AC_DEFINE(OLD_ENVIRON, 1, - [Define this to enable old environment option in telnet.])dnl -if false; then - AC_DEFINE(ENV_HACK, 1, - [Define this if you want support for broken ENV_{VAR,VAL} telnets.]) -fi - -# Simple test for streamspty, based on the existance of getmsg(), alas -# this breaks on SunOS4 which have streams but BSD-like ptys -# -# And also something wierd has happend with dec-osf1, fallback to bsd-ptys - -case "$host" in -*-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*) - ;; -*) - AC_CHECK_FUNC(getmsg) - if test "$ac_cv_func_getmsg" = "yes"; then - AC_CACHE_CHECK([if getmsg works], ac_cv_func_getmsg_works, - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - - int main(int argc, char **argv) - { - int ret; - ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL); - if(ret < 0 && errno == ENOSYS) - return 1; - return 0; - } - ]])], [ac_cv_func_getmsg_works=yes], - [ac_cv_func_getmsg_works=no], - [ac_cv_func_getmsg_works=no])) - if test "$ac_cv_func_getmsg_works" = "yes"; then - AC_DEFINE(HAVE_GETMSG, 1, - [Define if you have a working getmsg.]) - AC_DEFINE(STREAMSPTY, 1, - [Define if you have streams ptys.]) - fi - fi - ;; -esac - -AH_BOTTOM([ - -/* 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 - -/* Used with login -p */ -#undef LOGIN_ARGS - -/* set this to a sensible login */ -#ifndef LOGIN_PATH -#define LOGIN_PATH BINDIR "/login" -#endif -]) -]) diff --git a/kerberosV/src/cf/test-package.m4 b/kerberosV/src/cf/test-package.m4 deleted file mode 100644 index a5b40bd2396..00000000000 --- a/kerberosV/src/cf/test-package.m4 +++ /dev/null @@ -1,135 +0,0 @@ -dnl $Id: test-package.m4,v 1.3 2013/06/17 18:57:41 robert Exp $ -dnl -dnl rk_TEST_PACKAGE(package,headers,libraries,extra libs, -dnl default locations, conditional, config-program, headers) - -AC_DEFUN([rk_TEST_PACKAGE],[ -AC_ARG_WITH($1, - AS_HELP_STRING([--with-$1=dir],[use $1 in dir])) -AC_ARG_WITH($1-lib, - AS_HELP_STRING([--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, - AS_HELP_STRING([--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_ARG_WITH($1-config, - AS_HELP_STRING([--with-$1-config=path],[config program for $1])) - -m4_ifval([$6], - m4_define([rk_pkgname], $6), - m4_define([rk_pkgname], AS_TR_CPP($1))) - -AC_MSG_CHECKING(for $1) - -case "$with_$1" in -yes|"") d='$5' ;; -no) d= ;; -*) d="$with_$1" ;; -esac - -header_dirs= -lib_dirs= -for i in $d; do - if test "$with_$1_include" = ""; then - if test -d "$i/include/$1"; then - header_dirs="$header_dirs $i/include/$1" - fi - if test -d "$i/include"; then - header_dirs="$header_dirs $i/include" - fi - fi - if test "$with_$1_lib" = ""; then - if test -d "$i/lib$abilibdirext"; then - lib_dirs="$lib_dirs $i/lib$abilibdirext" - fi - fi -done - -if test "$with_$1_include"; then - header_dirs="$with_$1_include $header_dirs" -fi -if test "$with_$1_lib"; then - lib_dirs="$with_$1_lib $lib_dirs" -fi - -if test "$with_$1_config" = ""; then - with_$1_config='$7' -fi - -$1_cflags= -$1_libs= - -case "$with_$1_config" in -yes|no|""|"$7") - if test -f $with_$1/bin/$7 ; then - with_$1_config=$with_$1/bin/$7 - fi - ;; -esac - -case "$with_$1_config" in -yes|no|"") - ;; -*) - $1_cflags="`$with_$1_config --cflags 2>&1`" - $1_libs="`$with_$1_config --libs 2>&1`" - ;; -esac - -found=no -if test "$with_$1" != no; then - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - if test "$[]$1_cflags" -a "$[]$1_libs"; then - CFLAGS="$[]$1_cflags $save_CFLAGS" - LIBS="$[]$1_libs $save_LIBS" - m4_ifval([$8],[AC_CHECK_HEADERS([[$8]])]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]],[[]])],[ - INCLUDE_$1="$[]$1_cflags" - LIB_$1="$[]$1_libs" - AC_MSG_RESULT([from $with_$1_config]) - found=yes]) - fi - if test "$found" = no; then - ires= lres= - for i in $header_dirs; do - CFLAGS="-I$i $save_CFLAGS" - m4_ifval([$8],[AC_CHECK_HEADERS([[$8]])]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$2]],[[]])],[ires=$i;break]) - done - for i in $lib_dirs; do - LIBS="-L$i $3 $4 $save_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]],[[]])],[lres=$i;break]) - done - if test "$ires" -a "$lres" -a "$with_$1" != "no"; then - INCLUDE_$1="-I$ires" - LIB_$1="-L$lres $3 $4" - found=yes - AC_MSG_RESULT([headers $ires, libraries $lres]) - fi - fi - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" -fi - -if test "$found" = yes; then - AC_DEFINE_UNQUOTED(rk_pkgname, 1, [Define if you have the $1 package.]) - with_$1=yes -else - with_$1=no - INCLUDE_$1= - LIB_$1= - AC_MSG_RESULT(no) -fi - -AC_SUBST(INCLUDE_$1) -AC_SUBST(LIB_$1) -]) diff --git a/kerberosV/src/cf/valgrind-suppressions b/kerberosV/src/cf/valgrind-suppressions deleted file mode 100644 index 816de287b0a..00000000000 --- a/kerberosV/src/cf/valgrind-suppressions +++ /dev/null @@ -1,84 +0,0 @@ -# $Id: valgrind-suppressions,v 1.1 2013/06/17 18:57:41 robert Exp $ -{ - linux db init brokenness - Memcheck:Param - pwrite64(buf) - fun:do_pwrite64 - fun:__os_io - fun:__memp_pgwrite - fun:__memp_fsync - fun:__bam_read_root - fun:__bam_open - fun:__db_dbopen - fun:__db_open - fun:DB_open -} -{ - linux strerror - Memcheck:Leak - fun:_vgrZU_libcZdsoZa_malloc - fun:rwlock_add_to_list - fun:rwlock_have_already - fun:pthread_rwlock_rdlock - fun:__dcigettext - fun:dcgettext - fun:strerror_r - fun:strerror -} -{ - linux db close brokenness - Memcheck:Param - pwrite64(buf) - fun:do_pwrite64 - fun:__os_io - fun:__memp_pgwrite - fun:__memp_fsync - fun:__db_sync - fun:__db_close - fun:DB_close -} -{ - GLIBC 2.1.2 getservbyname defect - Memcheck:Leak - fun:_vgrZU_libcZdsoZa_malloc - fun:strdup - obj:* - obj:* - fun:getservbyname_r@@GLIBC_2.1.2 - fun:getservbyname -} -{ - glibc getaddrinfo defect - Memcheck:Leak - fun:_vgrZU_libcZdsoZa_malloc - fun:__libc_res_nsend - fun:__libc_res_nquery - fun:__libc_res_nquerydomain - fun:__libc_res_nsearch - obj:* - fun:gaih_inet - fun:getaddrinfo -} -{ - glibc dlopen failure called from /bin/ls - Memcheck:Addr4 - obj:/lib/ld-2.3.6.so - obj:/lib/ld-2.3.6.so - obj:/lib/ld-2.3.6.so -} -{ - Unknown suppression in runtime link editor - Memcheck:Cond - obj:/lib/ld-2.5.so - obj:/lib/ld-2.5.so - obj:/lib/ld-2.5.so - obj:/lib/ld-2.5.so -} -{ - Unknown suppression in runtime link editor - Memcheck:Addr4 - obj:/lib/ld-2.5.so - obj:/lib/ld-2.5.so - obj:/lib/ld-2.5.so - obj:/lib/ld-2.5.so -} diff --git a/kerberosV/src/cf/vararray.m4 b/kerberosV/src/cf/vararray.m4 deleted file mode 100644 index bcb2666c4c7..00000000000 --- a/kerberosV/src/cf/vararray.m4 +++ /dev/null @@ -1,16 +0,0 @@ -dnl -dnl $Id: vararray.m4,v 1.2 2013/06/17 18:57:41 robert Exp $ -dnl -dnl Test for variable size arrays. -dnl - -AC_DEFUN([rk_C_VARARRAY], [ - AC_CACHE_CHECK([if the compiler supports variable-length arrays],[rk_cv_c_vararray],[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[int x = 0; { int y[x]; }]])], - [rk_cv_c_vararray=yes], - [rk_cv_c_vararray=no])]) - if test "$rk_cv_c_vararray" = yes; then - AC_DEFINE([HAVE_VARIABLE_LENGTH_ARRAY], [1], - [Define if your compiler supports variable-length arrays.]) - fi -]) diff --git a/kerberosV/src/cf/version-script.m4 b/kerberosV/src/cf/version-script.m4 deleted file mode 100644 index f08e01344f3..00000000000 --- a/kerberosV/src/cf/version-script.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl check if ld supports --version-script -dnl -AC_DEFUN([rk_VERSIONSCRIPT],[ -AC_CACHE_CHECK(for ld --version-script, rk_cv_version_script,[ - rk_cv_version_script=no - - cat > conftest.map < conftest.c <. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; -esac - -ofile= -cfile= -eat= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use `[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/kerberosV/src/config.guess b/kerberosV/src/config.guess deleted file mode 100644 index dc84c68ef79..00000000000 --- a/kerberosV/src/config.guess +++ /dev/null @@ -1,1501 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-11-20' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/kerberosV/src/config.sub b/kerberosV/src/config.sub deleted file mode 100644 index 2a55a50751c..00000000000 --- a/kerberosV/src/config.sub +++ /dev/null @@ -1,1705 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-11-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/kerberosV/src/configure b/kerberosV/src/configure deleted file mode 100644 index b3ce922eeeb..00000000000 --- a/kerberosV/src/configure +++ /dev/null @@ -1,31300 +0,0 @@ -#! /bin/sh -# From configure.ac Revision. -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for Heimdal 1.5.3. -# -# Report bugs to . -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: heimdal-bugs@h5l.org about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='Heimdal' -PACKAGE_TARNAME='heimdal' -PACKAGE_VERSION='1.5.3' -PACKAGE_STRING='Heimdal 1.5.3' -PACKAGE_BUGREPORT='heimdal-bugs@h5l.org' -PACKAGE_URL='' - -ac_unique_file="kuser/kinit.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_default_prefix=/usr/heimdal -ac_header_list= -enable_option_checking=no -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -HEIMDAL_DOCUMENTATION_FALSE -HEIMDAL_DOCUMENTATION_TRUE -LIB_AUTH_SUBDIRS -LIB_com_err_so -LIB_com_err_a -LIB_com_err -DIR_com_err -COM_ERR_FALSE -COM_ERR_TRUE -COMPILE_ET -LIBEDIT_FALSE -LIBEDIT_TRUE -FRAMEWORK_SECURITY_FALSE -FRAMEWORK_SECURITY_TRUE -KCM_FALSE -KCM_TRUE -LIB_door_create -LIB_getpwnam_r -LIB_tgetent -LIB_openpty -LIB_logout -LIB_logwtmp -NEED_WRITEAUTH_FALSE -NEED_WRITEAUTH_TRUE -LIB_XauFileName -LIB_XauReadAuth -LIB_XauWriteAuth -HAVE_X_FALSE -HAVE_X_TRUE -X_EXTRA_LIBS -X_LIBS -X_PRE_LIBS -X_CFLAGS -XMKMF -LIB_hesiod -INCLUDE_hesiod -subdirs -LIB_libedit -INCLUDE_libedit -LIB_readline -INCLUDE_readline -CATMANEXT -CATMAN_FALSE -CATMAN_TRUE -CATMAN -GROFF -NROFF -LIB_security -have_gcd_FALSE -have_gcd_TRUE -LIB_dispatch_async_f -OTP_FALSE -OTP_TRUE -LIB_otp -LIBADD_roken -INCLUDES_roken -LIB_roken -DIR_roken -have_socket_wrapper_FALSE -have_socket_wrapper_TRUE -LIB_crypt -have_fnmatch_h_FALSE -have_fnmatch_h_TRUE -LIB_gai_strerror -LIB_freeaddrinfo -LIB_getnameinfo -LIB_getaddrinfo -LIB_pidfile -LIB_bswap32 -LIB_bswap16 -LIB_hstrerror -LIB_setsockopt -LIB_getsockopt -have_cgetent_FALSE -have_cgetent_TRUE -have_glob_h_FALSE -have_glob_h_TRUE -LIBOBJS -LIB_dn_expand -LIB_dns_search -LIB_res_ndestroy -LIB_res_nsearch -LIB_res_search -LIB_gethostbyname2 -LIB_syslog -LIB_gethostbyname -LIB_socket -have_vis_h_FALSE -have_vis_h_TRUE -have_search_h_FALSE -have_search_h_TRUE -have_ifaddrs_h_FALSE -have_ifaddrs_h_TRUE -have_err_h_FALSE -have_err_h_TRUE -WFLAGS_NOIMPLICITINT -WFLAGS_NOUNUSED -WFLAGS -LIB_NDBM -DBLIB -HAVE_DBHEADER_FALSE -HAVE_DBHEADER_TRUE -HAVE_NDBM_FALSE -HAVE_NDBM_TRUE -HAVE_DB3_FALSE -HAVE_DB3_TRUE -HAVE_DB1_FALSE -HAVE_DB1_TRUE -LIB_dbm_firstkey -LIB_dbopen -LIB_db_create -DBHEADER -NO_AFS -dpagaix_ldflags -dpagaix_ldadd -dpagaix_cflags -DCE_FALSE -DCE_TRUE -PTHREAD_LIBADD -PTHREAD_LDADD -PTHREAD_CFLAGS -LIB_hcrypto_appl -LIB_hcrypto_so -LIB_hcrypto_a -LIB_hcrypto -INCLUDE_hcrypto -DIR_hcrypto -HAVE_OPENSSL_FALSE -HAVE_OPENSSL_TRUE -LIB_kdb -do_roken_rename_FALSE -do_roken_rename_TRUE -KRB5_FALSE -KRB5_TRUE -KRB4_FALSE -KRB4_TRUE -LIB_krb4 -INCLUDE_krb4 -DIR_hdbdir -LIB_libintl -INCLUDE_libintl -have_scc_FALSE -have_scc_TRUE -SQLITE3_FALSE -SQLITE3_TRUE -LIB_sqlite3 -INCLUDE_sqlite3 -HAVE_CAPNG_FALSE -HAVE_CAPNG_TRUE -CAPNG_LIBS -CAPNG_CFLAGS -PKG_CONFIG -PKINIT_FALSE -PKINIT_TRUE -OPENLDAP_MODULE_FALSE -OPENLDAP_MODULE_TRUE -LIB_openldap -INCLUDE_openldap -SLC_DEP -SLC -ASN1_COMPILE_DEP -ASN1_COMPILE -CROSS_COMPILE_FALSE -CROSS_COMPILE_TRUE -LDFLAGS_VERSION_SCRIPT -versionscript_FALSE -versionscript_TRUE -VERSIONING -ENABLE_SHARED_FALSE -ENABLE_SHARED_TRUE -LEXLIB -LEX_OUTPUT_ROOT -LEX -YFLAGS -YACC -IRIX_FALSE -IRIX_TRUE -AIX_EXTRA_KAFS -AIX_DYNAMIC_AFS_FALSE -AIX_DYNAMIC_AFS_TRUE -LIB_loadquery -HAVE_DLOPEN_FALSE -HAVE_DLOPEN_TRUE -LIB_dlopen -AIX4_FALSE -AIX4_TRUE -AIX_FALSE -AIX_TRUE -CANONICAL_HOST -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -EGREP -GREP -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBTOOL -CPP -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_maintainer_mode -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_largefile -enable_dynamic_afs -with_mips_abi -with_cross_tools -with_openldap -with_openldap_lib -with_openldap_include -with_openldap_config -enable_hdb_openldap_module -enable_pk_init -enable_digest -enable_kx509 -with_capng -with_sqlite3 -with_sqlite3_lib -with_sqlite3_include -with_sqlite3_config -enable_sqlite_cache -with_libintl -with_libintl_lib -with_libintl_include -with_libintl_config -with_hdbdir -with_openssl -with_openssl_lib -with_openssl_include -enable_pthread_support -enable_dce -enable_afs_support -with_berkeley_db -with_berkeley_db_include -enable_ndbm_db -enable_developer -with_ipv6 -enable_socket_wrapper -enable_otp -enable_osfc2 -enable_mmap -enable_afs_string_to_key -with_readline -with_readline_lib -with_readline_include -with_readline_config -with_libedit -with_libedit_lib -with_libedit_include -with_libedit_config -with_hesiod -with_hesiod_lib -with_hesiod_include -with_hesiod_config -enable_bigendian -enable_littleendian -with_x -enable_kcm -enable_heimdal_documentation -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -YACC -YFLAGS -PKG_CONFIG -CAPNG_CFLAGS -CAPNG_LIBS -XMKMF' -ac_subdirs_all='lib/libedit' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures Heimdal 1.5.3 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/heimdal] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -X features: - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of Heimdal 1.5.3:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --disable-largefile omit support for large files - --disable-dynamic-afs do not use loaded AFS library with AIX - --enable-hdb-openldap-module - if you want support to build openldap hdb as shared - object - --disable-pk-init if you want disable to PK-INIT support - --disable-digest if you want disable to DIGEST support - --disable-kx509 if you want disable to kx509 support - --disable-sqlite-cache if you want support for cache in sqlite - --enable-pthread-support - if you want thread safe libraries - --enable-dce if you want support for DCE/DFS PAG's - --disable-afs-support if you don't want support for AFS - --disable-ndbm-db if you don't want ndbm db - --enable-developer enable developer warnings - --enable-socket-wrapper use sambas socket-wrapper for testing - --disable-otp if you don't want OTP support - --enable-osfc2 enable some OSF C2 support - --disable-mmap disable use of mmap - --disable-afs-string-to-key - disable use of weak AFS string-to-key functions - --enable-bigendian the target is big endian - --enable-littleendian the target is little endian - --enable-kcm enable Kerberos Credentials Manager - --disable-heimdal-documentation - if you want disable to heimdal documentation - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). - --with-mips-abi=abi ABI to use for IRIX (32, n32, or 64) - --with-cross-tools=dir use cross tools in dir - --with-openldap=dir use openldap in dir - --with-openldap-lib=dir use openldap libraries in dir - --with-openldap-include=dir - use openldap headers in dir - --with-openldap-config=path - config program for openldap - --with-capng use libcap-ng to drop KDC privileges [default=check] - --with-sqlite3=dir use sqlite3 in dir - --with-sqlite3-lib=dir use sqlite3 libraries in dir - --with-sqlite3-include=dir - use sqlite3 headers in dir - --with-sqlite3-config=path - config program for sqlite3 - --with-libintl=dir use libintl in dir - --with-libintl-lib=dir use libintl libraries in dir - --with-libintl-include=dir - use libintl headers in dir - --with-libintl-config=path - config program for libintl - --with-hdbdir Default location for KDC database - [default=/var/heimdal] - --with-openssl=dir use openssl in dir - --with-openssl-lib=dir use openssl libraries in dir - --with-openssl-include=dir - use openssl headers in dir - --with-berkeley-db enable support for berkeley db [default=check] - --with-berkeley-db-include=dir - use berkeley-db headers in dir - --without-ipv6 do not enable IPv6 support - --with-readline=dir use readline in dir - --with-readline-lib=dir use readline libraries in dir - --with-readline-include=dir - use readline headers in dir - --with-readline-config=path - config program for readline - --with-libedit=dir use libedit in dir - --with-libedit-lib=dir use libedit libraries in dir - --with-libedit-include=dir - use libedit headers in dir - --with-libedit-config=path - config program for libedit - --with-hesiod=dir use hesiod in dir - --with-hesiod-lib=dir use hesiod libraries in dir - --with-hesiod-include=dir - use hesiod headers in dir - --with-hesiod-config=path - config program for hesiod - --with-x use the X Window System - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - YACC The `Yet Another C Compiler' implementation to use. Defaults to - the first program found out of: `bison -y', `byacc', `yacc'. - YFLAGS The list of arguments that will be passed by default to $YACC. - This script will default YFLAGS to the empty string to avoid a - default value of `-d' given by some make applications. - PKG_CONFIG path to pkg-config utility - CAPNG_CFLAGS - C compiler flags for CAPNG, overriding pkg-config - CAPNG_LIBS linker flags for CAPNG, overriding pkg-config - XMKMF Path to xmkmf, Makefile generator for X Window System - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -Heimdal configure 1.5.3 -generated by GNU Autoconf 2.65 - -Copyright (C) 2009 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ----------------------------------- ## -## Report this to heimdal-bugs@h5l.org ## -## ----------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type - -# ac_fn_c_check_header_preproc LINENO HEADER VAR -# ---------------------------------------------- -# Tests whether HEADER is present, setting the cache variable VAR accordingly. -ac_fn_c_check_header_preproc () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f conftest.err conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_preproc -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by Heimdal $as_me 1.5.3, which was -generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -as_fn_append ac_header_list " stdlib.h" -as_fn_append ac_header_list " unistd.h" -as_fn_append ac_header_list " sys/param.h" -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_config_headers="$ac_config_headers include/config.h" - - - -am__api_version='1.11' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='heimdal' - VERSION='1.5.3' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* - -fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi - -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4' -macro_revision='1.3293' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if test "${lt_cv_to_host_file_cmd+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if test "${lt_cv_to_tool_file_cmd+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if test "${lt_cv_ar_at_file+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } - as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test "${lt_cv_path_mainfest_tool+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if test "${lt_cv_ld_force_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='/usr/bin/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## CAVEAT EMPTOR: -## There is no encapsulation within the following macros, do not change -## the running order or otherwise move them around unless you know exactly -## what you are doing... -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if test "${lt_cv_prog_compiler_pic+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if test "${lt_cv_aix_libpath_+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if test "${lt_cv_aix_libpath_+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if test "${lt_cv_prog_compiler__b+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test "${lt_cv_irix_exported_symbol+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if test "${lt_cv_archive_cmds_need_lc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - - - -test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' -test "$localstatedir" = '${prefix}/var' && localstatedir='/var/heimdal' - - -CANONICAL_HOST=$host - - -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then : - enableval=$enable_largefile; -fi - -if test "$enable_largefile" != no; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF - if ac_fn_c_try_compile "$LINENO"; then : - break -fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_largefile_CC=' -n32'; break -fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_file_offset_bits=64; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=no; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_sys_large_files=1; break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; -esac -rm -rf conftest* - fi -fi - - -if test "$enable_largefile" != no -a "$ac_cv_sys_large_files" != no; then - CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files" -fi -if test "$enable_largefile" != no -a "$ac_cv_sys_file_offset_bits" != no; then - CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" -fi - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_funclib_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_dlopen\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" dl; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_DLFCN_H -#include -#endif -int -main () -{ -dlopen(0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_dlopen=$ac_lib; else ac_cv_funclib_dlopen=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_dlopen=\${ac_cv_funclib_dlopen-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_dlopen" - -if false; then - for ac_func in dlopen -do : - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLOPEN 1 -_ACEOF - -fi -done - -fi -# dlopen -eval "ac_tr_func=HAVE_`echo dlopen | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_dlopen=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_dlopen=yes" - eval "LIB_dlopen=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_dlopen=no" - eval "LIB_dlopen=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_dlopen=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - if test "$ac_cv_funclib_dlopen" != no; then - HAVE_DLOPEN_TRUE= - HAVE_DLOPEN_FALSE='#' -else - HAVE_DLOPEN_TRUE='#' - HAVE_DLOPEN_FALSE= -fi - - - - -aix=no -case "$host" in -*-*-aix3*) - aix=3 - ;; -*-*-aix[4-9]*) - aix=4 - ;; -esac - - if test "$aix" != no; then - AIX_TRUE= - AIX_FALSE='#' -else - AIX_TRUE='#' - AIX_FALSE= -fi - if test "$aix" = 4; then - AIX4_TRUE= - AIX4_FALSE='#' -else - AIX4_TRUE='#' - AIX4_FALSE= -fi - -# Check whether --enable-dynamic-afs was given. -if test "${enable_dynamic_afs+set}" = set; then : - enableval=$enable_dynamic_afs; -fi - - -if test "$aix" != no; then - - -$as_echo "#define NEED_QSORT 1" >>confdefs.h - - - if test "$enable_dynamic_afs" != no; then - - if test "$ac_cv_func_dlopen" = no; then - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for loadquery" >&5 -$as_echo_n "checking for loadquery... " >&6; } -if test "${ac_cv_funclib_loadquery+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_loadquery\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ld; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -loadquery() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_loadquery=$ac_lib; else ac_cv_funclib_loadquery=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_loadquery=\${ac_cv_funclib_loadquery-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_loadquery" - -if false; then - for ac_func in loadquery -do : - ac_fn_c_check_func "$LINENO" "loadquery" "ac_cv_func_loadquery" -if test "x$ac_cv_func_loadquery" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LOADQUERY 1 -_ACEOF - -fi -done - -fi -# loadquery -eval "ac_tr_func=HAVE_`echo loadquery | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_loadquery=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_loadquery=yes" - eval "LIB_loadquery=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_loadquery=no" - eval "LIB_loadquery=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_loadquery=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - fi - if test "$ac_cv_func_dlopen" != no; then - AIX_EXTRA_KAFS='$(LIB_dlopen)' - elif test "$ac_cv_func_loadquery" != no; then - AIX_EXTRA_KAFS='$(LIB_loadquery)' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not using dynloaded AFS library" >&5 -$as_echo "$as_me: not using dynloaded AFS library" >&6;} - AIX_EXTRA_KAFS= - enable_dynamic_afs=no - fi - else - AIX_EXTRA_KAFS= - fi -fi - - if test "$enable_dynamic_afs" != no; then - AIX_DYNAMIC_AFS_TRUE= - AIX_DYNAMIC_AFS_FALSE='#' -else - AIX_DYNAMIC_AFS_TRUE='#' - AIX_DYNAMIC_AFS_FALSE= -fi - -if test "$aix" != no; then - -$as_echo "#define _ALL_SOURCE 1" >>confdefs.h - -fi - - - - - -irix=no -case "$host" in -*-*-irix*) - irix=yes - ;; -esac - if test "$irix" != no; then - IRIX_TRUE= - IRIX_FALSE='#' -else - IRIX_TRUE='#' - IRIX_FALSE= -fi - - - -sunos=no -case "$host" in -*-*-solaris2.7) - sunos=57 - ;; -*-*-solaris2.[89] | *-*-solaris2.1[0-9]) - sunos=58 - ;; -*-*-solaris2*) - sunos=50 - ;; -esac -if test "$sunos" != no; then - -cat >>confdefs.h <<_ACEOF -#define SunOS $sunos -_ACEOF - -fi - - - -$as_echo "#define _GNU_SOURCE 1" >>confdefs.h - - - - - -for ac_prog in 'bison -y' byacc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_YACC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_YACC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -$as_echo "$YACC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - -for ac_prog in flex lex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LEX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LEX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LEX=$ac_cv_prog_LEX -if test -n "$LEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 -$as_echo "$LEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$LEX" && break -done -test -n "$LEX" || LEX=":" - -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF -%% -a { ECHO; } -b { REJECT; } -c { yymore (); } -d { yyless (1); } -e { yyless (input () != 0); } -f { unput (yytext[0]); } -. { BEGIN INITIAL; } -%% -#ifdef YYTEXT_POINTER -extern char *yytext; -#endif -int -main (void) -{ - return ! yylex () + ! yywrap (); -} -_ACEOF -{ { ac_try="$LEX conftest.l" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$LEX conftest.l") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 -$as_echo_n "checking lex output file root... " >&6; } -if test "${ac_cv_prog_lex_root+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5 -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 -$as_echo "$ac_cv_prog_lex_root" >&6; } -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - -if test -z "${LEXLIB+set}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 -$as_echo_n "checking lex library... " >&6; } -if test "${ac_cv_lib_lex+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - ac_save_LIBS=$LIBS - ac_cv_lib_lex='none needed' - for ac_lib in '' -lfl -ll; do - LIBS="$ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lex=$ac_lib -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - test "$ac_cv_lib_lex" != 'none needed' && break - done - LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 -$as_echo "$ac_cv_lib_lex" >&6; } - test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 -$as_echo_n "checking whether yytext is a pointer... " >&6; } -if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -ac_save_LIBS=$LIBS -LIBS="$LEXLIB $ac_save_LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define YYTEXT_POINTER 1 -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_lex_yytext_pointer=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 -$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } -if test $ac_cv_prog_lex_yytext_pointer = yes; then - -$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h - -fi -rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi -if test "$LEX" = :; then - LEX=${am_missing_run}flex -fi -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ln -s or something else" >&5 -$as_echo_n "checking for ln -s or something else... " >&6; } -if test "${ac_cv_prog_LN_S+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - 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 -fi -LN_S="$ac_cv_prog_LN_S" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_LN_S" >&5 -$as_echo "$ac_cv_prog_LN_S" >&6; } - - - - -# Check whether --with-mips_abi was given. -if test "${with_mips_abi+set}" = set; then : - withval=$with_mips_abi; -fi - - -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='';; - *) as_fn_error "\"Invalid ABI specified\"" "$LINENO" 5 ;; -esac -if test -n "$abi" ; then -ac_foo=krb_cv_gcc_`echo $abi | tr =- __` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports the $abi option" >&5 -$as_echo_n "checking if $CC supports the $abi option... " >&6; } -if { as_var=$ac_foo; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - -save_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS $abi" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -int x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval $ac_foo=yes -else - eval $ac_foo=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_extCFLAGS="$save_CFLAGS" - -fi - -ac_res=`eval echo \\\$$ac_foo` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -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" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -int x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_res=yes -else - ac_res=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CLAGS="$save_CFLAGS" - if test $ac_res = yes; then - # New GCC - as_fn_error "$CC does not support the $with_mips_abi ABI" "$LINENO" 5 - 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 - as_fn_error "$CC does not support the $with_mips_abi ABI" "$LINENO" 5 - 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='';; - *) as_fn_error "\"Invalid ABI specified\"" "$LINENO" 5 ;; -esac -fi #if test -n "$GCC"; then -;; -esac - -CC="$CC $abi" -libdir="$libdir$abilibdirext" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5 -$as_echo_n "checking for __attribute__... " >&6; } -if test "${ac_cv___attribute__+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -static void foo(void) __attribute__ ((noreturn)); - -static void -foo(void) -{ - exit(1); -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv___attribute__=yes -else - ac_cv___attribute__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -if test "$ac_cv___attribute__" = "yes"; then - -$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5 -$as_echo "$ac_cv___attribute__" >&6; } - - - - - - if test "$enable_shared" = "yes"; then - ENABLE_SHARED_TRUE= - ENABLE_SHARED_FALSE='#' -else - ENABLE_SHARED_TRUE='#' - ENABLE_SHARED_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld --version-script" >&5 -$as_echo_n "checking for ld --version-script... " >&6; } -if test "${rk_cv_version_script+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - rk_cv_version_script=no - - cat > conftest.map < conftest.c <&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } && - { ac_try='${CC-cc} -shared -Wl,--version-script,conftest.map $CFLAGS $LDFLAGS -o libconftestlib.so conftest.o' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; - then - rk_cv_version_script=yes - fi -rm -rf conftest* libconftest* .libs - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rk_cv_version_script" >&5 -$as_echo "$rk_cv_version_script" >&6; } - -if test $rk_cv_version_script = yes ; then - doversioning=yes - LDFLAGS_VERSION_SCRIPT="-Wl,--version-script," -else - doversioning=no - LDFLAGS_VERSION_SCRIPT= -fi - - - if test $doversioning = yes; then - versionscript_TRUE= - versionscript_FALSE='#' -else - versionscript_TRUE='#' - versionscript_FALSE= -fi - - - - - - - - - if test "${cross_compiling}" = yes; then - CROSS_COMPILE_TRUE= - CROSS_COMPILE_FALSE='#' -else - CROSS_COMPILE_TRUE='#' - CROSS_COMPILE_FALSE= -fi - - - -# Check whether --with-cross-tools was given. -if test "${with_cross_tools+set}" = set; then : - withval=$with_cross_tools; if test "$withval" = "yes"; then - as_fn_error "Need path to cross tools" "$LINENO" 5 - fi - with_cross_tools="${with_cross_tools}/" - -fi - - -if test "${cross_compiling}" != yes ; then - - ASN1_COMPILE="\$(top_builddir)/lib/asn1/asn1_compile\$(EXEEXT)" - SLC="\$(top_builddir)/lib/sl/slc" - - ASN1_COMPILE_DEP="\$(ASN1_COMPILE)" - SLC_DEP="\$(SLC)" -else - ASN1_COMPILE="${with_cross_tools}asn1_compile" - SLC="${with_cross_tools}slc" - - ASN1_COMPILE_DEP= - SLC_DEP= - - ac_cv_prog_COMPILE_ET=${with_cross_tools}compile_et - -fi - - - - - - - - - -$as_echo "#define HEIM_WEAK_CRYPTO 1" >>confdefs.h - - - - -# Check whether --with-openldap was given. -if test "${with_openldap+set}" = set; then : - withval=$with_openldap; -fi - - -# Check whether --with-openldap-lib was given. -if test "${with_openldap_lib+set}" = set; then : - withval=$with_openldap_lib; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-openldap-lib" "$LINENO" 5 -elif test "X$with_openldap" = "X"; then - with_openldap=yes -fi -fi - - -# Check whether --with-openldap-include was given. -if test "${with_openldap_include+set}" = set; then : - withval=$with_openldap_include; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-openldap-include" "$LINENO" 5 -elif test "X$with_openldap" = "X"; then - with_openldap=yes -fi -fi - - -# Check whether --with-openldap-config was given. -if test "${with_openldap_config+set}" = set; then : - withval=$with_openldap_config; -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openldap" >&5 -$as_echo_n "checking for openldap... " >&6; } - -case "$with_openldap" in -yes|"") d='' ;; -no) d= ;; -*) d="$with_openldap" ;; -esac - -header_dirs= -lib_dirs= -for i in $d; do - if test "$with_openldap_include" = ""; then - if test -d "$i/include/openldap"; then - header_dirs="$header_dirs $i/include/openldap" - fi - if test -d "$i/include"; then - header_dirs="$header_dirs $i/include" - fi - fi - if test "$with_openldap_lib" = ""; then - if test -d "$i/lib$abilibdirext"; then - lib_dirs="$lib_dirs $i/lib$abilibdirext" - fi - fi -done - -if test "$with_openldap_include"; then - header_dirs="$with_openldap_include $header_dirs" -fi -if test "$with_openldap_lib"; then - lib_dirs="$with_openldap_lib $lib_dirs" -fi - -if test "$with_openldap_config" = ""; then - with_openldap_config='' -fi - -openldap_cflags= -openldap_libs= - -case "$with_openldap_config" in -yes|no|""|"") - if test -f $with_openldap/bin/ ; then - with_openldap_config=$with_openldap/bin/ - fi - ;; -esac - -case "$with_openldap_config" in -yes|no|"") - ;; -*) - openldap_cflags="`$with_openldap_config --cflags 2>&1`" - openldap_libs="`$with_openldap_config --libs 2>&1`" - ;; -esac - -found=no -if test "$with_openldap" != no; then - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - if test "$openldap_cflags" -a "$openldap_libs"; then - CFLAGS="$openldap_cflags $save_CFLAGS" - LIBS="$openldap_libs $save_LIBS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - INCLUDE_openldap="$openldap_cflags" - LIB_openldap="$openldap_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: from $with_openldap_config" >&5 -$as_echo "from $with_openldap_config" >&6; } - found=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test "$found" = no; then - ires= lres= - for i in $header_dirs; do - CFLAGS="-I$i $save_CFLAGS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ires=$i;break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - for i in $lib_dirs; do - LIBS="-L$i -lldap -llber $save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lres=$i;break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - if test "$ires" -a "$lres" -a "$with_openldap" != "no"; then - INCLUDE_openldap="-I$ires" - LIB_openldap="-L$lres -lldap -llber " - found=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: headers $ires, libraries $lres" >&5 -$as_echo "headers $ires, libraries $lres" >&6; } - fi - fi - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" -fi - -if test "$found" = yes; then - -cat >>confdefs.h <<_ACEOF -#define OPENLDAP 1 -_ACEOF - - with_openldap=yes -else - with_openldap=no - INCLUDE_openldap= - LIB_openldap= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -# Check whether --enable-hdb-openldap-module was given. -if test "${enable_hdb_openldap_module+set}" = set; then : - enableval=$enable_hdb_openldap_module; -fi - -if test "$enable_hdb_openldap_module" = yes -a "$with_openldap" = yes; then - -$as_echo "#define OPENLDAP_MODULE 1" >>confdefs.h - -fi - if test "$enable_hdb_openldap_module" = yes -a "$with_openldap" = yes; then - OPENLDAP_MODULE_TRUE= - OPENLDAP_MODULE_FALSE='#' -else - OPENLDAP_MODULE_TRUE='#' - OPENLDAP_MODULE_FALSE= -fi - - - -# Check whether --enable-pk-init was given. -if test "${enable_pk_init+set}" = set; then : - enableval=$enable_pk_init; -fi - -if test "$enable_pk_init" != no ;then - -$as_echo "#define PKINIT 1" >>confdefs.h - -fi - if test "$enable_pk_init" != no; then - PKINIT_TRUE= - PKINIT_FALSE='#' -else - PKINIT_TRUE='#' - PKINIT_FALSE= -fi - - -# Check whether --enable-digest was given. -if test "${enable_digest+set}" = set; then : - enableval=$enable_digest; -fi - -if test "$enable_digest" != no ;then - -$as_echo "#define DIGEST 1" >>confdefs.h - -fi - -# Check whether --enable-kx509 was given. -if test "${enable_kx509+set}" = set; then : - enableval=$enable_kx509; -fi - -if test "$enable_kx509" != no ;then - -$as_echo "#define KX509 1" >>confdefs.h - -fi - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - -fi - - -# Check whether --with-capng was given. -if test "${with_capng+set}" = set; then : - withval=$with_capng; -else - with_capng=check -fi - -if test "$with_capng" != "no"; then - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAPNG" >&5 -$as_echo_n "checking for CAPNG... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$CAPNG_CFLAGS"; then - pkg_cv_CAPNG_CFLAGS="$CAPNG_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcap-ng >= 0.4.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcap-ng >= 0.4.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CAPNG_CFLAGS=`$PKG_CONFIG --cflags "libcap-ng >= 0.4.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$CAPNG_LIBS"; then - pkg_cv_CAPNG_LIBS="$CAPNG_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcap-ng >= 0.4.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcap-ng >= 0.4.0") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CAPNG_LIBS=`$PKG_CONFIG --libs "libcap-ng >= 0.4.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - CAPNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libcap-ng >= 0.4.0"` - else - CAPNG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libcap-ng >= 0.4.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$CAPNG_PKG_ERRORS" >&5 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - with_capng=no -elif test $pkg_failed = untried; then - with_capng=no -else - CAPNG_CFLAGS=$pkg_cv_CAPNG_CFLAGS - CAPNG_LIBS=$pkg_cv_CAPNG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - with_capng=yes -fi -fi -if test "$with_capng" = "yes"; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_CAPNG 1 -_ACEOF - -fi - if test "$with_capng" != "no"; then - HAVE_CAPNG_TRUE= - HAVE_CAPNG_FALSE='#' -else - HAVE_CAPNG_TRUE='#' - HAVE_CAPNG_FALSE= -fi - - - - - - -# Check whether --with-sqlite3 was given. -if test "${with_sqlite3+set}" = set; then : - withval=$with_sqlite3; -fi - - -# Check whether --with-sqlite3-lib was given. -if test "${with_sqlite3_lib+set}" = set; then : - withval=$with_sqlite3_lib; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-sqlite3-lib" "$LINENO" 5 -elif test "X$with_sqlite3" = "X"; then - with_sqlite3=yes -fi -fi - - -# Check whether --with-sqlite3-include was given. -if test "${with_sqlite3_include+set}" = set; then : - withval=$with_sqlite3_include; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-sqlite3-include" "$LINENO" 5 -elif test "X$with_sqlite3" = "X"; then - with_sqlite3=yes -fi -fi - - -# Check whether --with-sqlite3-config was given. -if test "${with_sqlite3_config+set}" = set; then : - withval=$with_sqlite3_config; -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3" >&5 -$as_echo_n "checking for sqlite3... " >&6; } - -case "$with_sqlite3" in -yes|"") d='' ;; -no) d= ;; -*) d="$with_sqlite3" ;; -esac - -header_dirs= -lib_dirs= -for i in $d; do - if test "$with_sqlite3_include" = ""; then - if test -d "$i/include/sqlite3"; then - header_dirs="$header_dirs $i/include/sqlite3" - fi - if test -d "$i/include"; then - header_dirs="$header_dirs $i/include" - fi - fi - if test "$with_sqlite3_lib" = ""; then - if test -d "$i/lib$abilibdirext"; then - lib_dirs="$lib_dirs $i/lib$abilibdirext" - fi - fi -done - -if test "$with_sqlite3_include"; then - header_dirs="$with_sqlite3_include $header_dirs" -fi -if test "$with_sqlite3_lib"; then - lib_dirs="$with_sqlite3_lib $lib_dirs" -fi - -if test "$with_sqlite3_config" = ""; then - with_sqlite3_config='' -fi - -sqlite3_cflags= -sqlite3_libs= - -case "$with_sqlite3_config" in -yes|no|""|"") - if test -f $with_sqlite3/bin/ ; then - with_sqlite3_config=$with_sqlite3/bin/ - fi - ;; -esac - -case "$with_sqlite3_config" in -yes|no|"") - ;; -*) - sqlite3_cflags="`$with_sqlite3_config --cflags 2>&1`" - sqlite3_libs="`$with_sqlite3_config --libs 2>&1`" - ;; -esac - -found=no -if test "$with_sqlite3" != no; then - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - if test "$sqlite3_cflags" -a "$sqlite3_libs"; then - CFLAGS="$sqlite3_cflags $save_CFLAGS" - LIBS="$sqlite3_libs $save_LIBS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifndef SQLITE_OPEN_CREATE -#error "old version" -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - INCLUDE_sqlite3="$sqlite3_cflags" - LIB_sqlite3="$sqlite3_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: from $with_sqlite3_config" >&5 -$as_echo "from $with_sqlite3_config" >&6; } - found=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test "$found" = no; then - ires= lres= - for i in $header_dirs; do - CFLAGS="-I$i $save_CFLAGS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifndef SQLITE_OPEN_CREATE -#error "old version" -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ires=$i;break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - for i in $lib_dirs; do - LIBS="-L$i -lsqlite3 $save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifndef SQLITE_OPEN_CREATE -#error "old version" -#endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lres=$i;break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - if test "$ires" -a "$lres" -a "$with_sqlite3" != "no"; then - INCLUDE_sqlite3="-I$ires" - LIB_sqlite3="-L$lres -lsqlite3 " - found=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: headers $ires, libraries $lres" >&5 -$as_echo "headers $ires, libraries $lres" >&6; } - fi - fi - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" -fi - -if test "$found" = yes; then - -cat >>confdefs.h <<_ACEOF -#define SQLITE3 1 -_ACEOF - - with_sqlite3=yes -else - with_sqlite3=no - INCLUDE_sqlite3= - LIB_sqlite3= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test "X$with_sqlite3" != Xyes ; then - INCLUDE_sqlite3="-I\$(top_srcdir)/lib/sqlite" - LIB_sqlite3="\$(top_builddir)/lib/sqlite/libheimsqlite.la" -fi - if test "X$with_sqlite3" = Xyes; then - SQLITE3_TRUE= - SQLITE3_FALSE='#' -else - SQLITE3_TRUE='#' - SQLITE3_FALSE= -fi - - - -$as_echo "#define HAVE_SQLITE3 1" >>confdefs.h - - -# Check whether --enable-sqlite-cache was given. -if test "${enable_sqlite_cache+set}" = set; then : - enableval=$enable_sqlite_cache; -fi - -if test "$enable_sqlite_cache" != no; then - -$as_echo "#define HAVE_SCC 1" >>confdefs.h - -fi - if test "$enable_sqlite_cache" != no; then - have_scc_TRUE= - have_scc_FALSE='#' -else - have_scc_TRUE='#' - have_scc_FALSE= -fi - - - - - -# Check whether --with-libintl was given. -if test "${with_libintl+set}" = set; then : - withval=$with_libintl; -fi - - -# Check whether --with-libintl-lib was given. -if test "${with_libintl_lib+set}" = set; then : - withval=$with_libintl_lib; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-libintl-lib" "$LINENO" 5 -elif test "X$with_libintl" = "X"; then - with_libintl=yes -fi -fi - - -# Check whether --with-libintl-include was given. -if test "${with_libintl_include+set}" = set; then : - withval=$with_libintl_include; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-libintl-include" "$LINENO" 5 -elif test "X$with_libintl" = "X"; then - with_libintl=yes -fi -fi - - -# Check whether --with-libintl-config was given. -if test "${with_libintl_config+set}" = set; then : - withval=$with_libintl_config; -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libintl" >&5 -$as_echo_n "checking for libintl... " >&6; } - -case "$with_libintl" in -yes|"") d='' ;; -no) d= ;; -*) d="$with_libintl" ;; -esac - -header_dirs= -lib_dirs= -for i in $d; do - if test "$with_libintl_include" = ""; then - if test -d "$i/include/libintl"; then - header_dirs="$header_dirs $i/include/libintl" - fi - if test -d "$i/include"; then - header_dirs="$header_dirs $i/include" - fi - fi - if test "$with_libintl_lib" = ""; then - if test -d "$i/lib$abilibdirext"; then - lib_dirs="$lib_dirs $i/lib$abilibdirext" - fi - fi -done - -if test "$with_libintl_include"; then - header_dirs="$with_libintl_include $header_dirs" -fi -if test "$with_libintl_lib"; then - lib_dirs="$with_libintl_lib $lib_dirs" -fi - -if test "$with_libintl_config" = ""; then - with_libintl_config='' -fi - -libintl_cflags= -libintl_libs= - -case "$with_libintl_config" in -yes|no|""|"") - if test -f $with_libintl/bin/ ; then - with_libintl_config=$with_libintl/bin/ - fi - ;; -esac - -case "$with_libintl_config" in -yes|no|"") - ;; -*) - libintl_cflags="`$with_libintl_config --cflags 2>&1`" - libintl_libs="`$with_libintl_config --libs 2>&1`" - ;; -esac - -found=no -if test "$with_libintl" != no; then - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - if test "$libintl_cflags" -a "$libintl_libs"; then - CFLAGS="$libintl_cflags $save_CFLAGS" - LIBS="$libintl_libs $save_LIBS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - INCLUDE_libintl="$libintl_cflags" - LIB_libintl="$libintl_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: from $with_libintl_config" >&5 -$as_echo "from $with_libintl_config" >&6; } - found=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test "$found" = no; then - ires= lres= - for i in $header_dirs; do - CFLAGS="-I$i $save_CFLAGS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ires=$i;break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - for i in $lib_dirs; do - LIBS="-L$i -lintl $save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lres=$i;break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - if test "$ires" -a "$lres" -a "$with_libintl" != "no"; then - INCLUDE_libintl="-I$ires" - LIB_libintl="-L$lres -lintl " - found=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: headers $ires, libraries $lres" >&5 -$as_echo "headers $ires, libraries $lres" >&6; } - fi - fi - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" -fi - -if test "$found" = yes; then - -cat >>confdefs.h <<_ACEOF -#define LIBINTL 1 -_ACEOF - - with_libintl=yes -else - with_libintl=no - INCLUDE_libintl= - LIB_libintl= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - - -# Check whether --with-hdbdir was given. -if test "${with_hdbdir+set}" = set; then : - withval=$with_hdbdir; -else - with_hdbdir=/var/heimdal -fi - -DIR_hdbdir="$with_hdbdir" - - - -with_krb4=no - - - if false; then - KRB4_TRUE= - KRB4_FALSE='#' -else - KRB4_TRUE='#' - KRB4_FALSE= -fi - - - if true; then - KRB5_TRUE= - KRB5_FALSE='#' -else - KRB5_TRUE='#' - KRB5_FALSE= -fi - - if true; then - do_roken_rename_TRUE= - do_roken_rename_FALSE='#' -else - do_roken_rename_TRUE='#' - do_roken_rename_FALSE= -fi - - - -$as_echo "#define SUPPORT_INETD 1" >>confdefs.h - - - -$as_echo "#define KRB5 1" >>confdefs.h - - -crypto_lib=unknown - - -# Check whether --with-openssl was given. -if test "${with_openssl+set}" = set; then : - withval=$with_openssl; -fi - - - -# Check whether --with-openssl-lib was given. -if test "${with_openssl_lib+set}" = set; then : - withval=$with_openssl_lib; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-openssl-lib" "$LINENO" 5 -elif test "X$with_openssl" = "X"; then - with_openssl=yes -fi -fi - - - -# Check whether --with-openssl-include was given. -if test "${with_openssl_include+set}" = set; then : - withval=$with_openssl_include; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-openssl-include" "$LINENO" 5 -elif test "X$with_openssl" = "X"; then - with_openssl=yes -fi -fi - - -case "$with_openssl" in -yes) ;; -no) ;; -"") ;; -*) if test "$with_openssl_include" = ""; then - with_openssl_include="$with_openssl/include" - fi - if test "$with_openssl_lib" = ""; then - with_openssl_lib="$with_openssl/lib$abilibdirext" - fi - ;; -esac - - -DIR_hcrypto= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypto library" >&5 -$as_echo_n "checking for crypto library... " >&6; } - -openssl=no - -if test "$crypto_lib" = "unknown" -a "$with_krb4" != "no"; then - save_CPPFLAGS="$CPPFLAGS" - save_LIBS="$LIBS" - - cdirs= clibs= - for i in $LIB_krb4; do - case "$i" in - -L*) cdirs="$cdirs $i";; - -l*) clibs="$clibs $i";; - esac - done - - ires= - for i in $INCLUDE_krb4; do - CFLAGS="-DHAVE_OPENSSL $i $save_CFLAGS" - for j in $cdirs; do - for k in $clibs; do - LIBS="$j $k $save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #undef KRB5 /* makes md4.h et al unhappy */ - #ifdef HAVE_OPENSSL - #ifdef HAVE_SYS_TYPES_H - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #else - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #endif - -int -main () -{ - - void *schedule = 0; - EVP_MD_CTX mdctx; - - EVP_md4(); - EVP_md5(); - EVP_sha1(); - EVP_sha256(); - - EVP_MD_CTX_init(&mdctx); - EVP_DigestInit_ex(&mdctx, EVP_sha1(), (ENGINE *)0); - EVP_CIPHER_iv_length(((EVP_CIPHER*)0)); - UI_UTIL_read_pw_string(0,0,0,0); - RAND_status(); - #ifdef HAVE_OPENSSL - EC_KEY_new(); - #endif - - OpenSSL_add_all_algorithms(); - AES_encrypt(0,0,0); - DES_cbc_encrypt(0, 0, 0, schedule, 0, 0); - RC4(0, 0, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - openssl=yes ires="$i" lres="$j $k"; break 3 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - done - CFLAGS="$i $save_CFLAGS" - for j in $cdirs; do - for k in $clibs; do - LIBS="$j $k $save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #undef KRB5 /* makes md4.h et al unhappy */ - #ifdef HAVE_OPENSSL - #ifdef HAVE_SYS_TYPES_H - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #else - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #endif - -int -main () -{ - - void *schedule = 0; - EVP_MD_CTX mdctx; - - EVP_md4(); - EVP_md5(); - EVP_sha1(); - EVP_sha256(); - - EVP_MD_CTX_init(&mdctx); - EVP_DigestInit_ex(&mdctx, EVP_sha1(), (ENGINE *)0); - EVP_CIPHER_iv_length(((EVP_CIPHER*)0)); - UI_UTIL_read_pw_string(0,0,0,0); - RAND_status(); - #ifdef HAVE_OPENSSL - EC_KEY_new(); - #endif - - OpenSSL_add_all_algorithms(); - AES_encrypt(0,0,0); - DES_cbc_encrypt(0, 0, 0, schedule, 0, 0); - RC4(0, 0, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - openssl=no ires="$i" lres="$j $k"; break 3 -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - done - done - - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" - if test "$ires" -a "$lres"; then - INCLUDE_hcrypto="$ires" - LIB_hcrypto="$lres" - crypto_lib=krb4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: same as krb4" >&5 -$as_echo "same as krb4" >&6; } - LIB_hcrypto_a='$(LIB_hcrypto)' - LIB_hcrypto_so='$(LIB_hcrypto)' - LIB_hcrypto_appl='$(LIB_hcrypto)' - fi -fi - -if test "$crypto_lib" = "unknown" -a "$with_openssl" != "no"; then - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - INCLUDE_hcrypto= - LIB_hcrypto= - if test "$with_openssl_include" != ""; then - INCLUDE_hcrypto="-I${with_openssl_include}" - fi - if test "$with_openssl_lib" != ""; then - LIB_hcrypto="-L${with_openssl_lib}" - fi - CFLAGS="-DHAVE_OPENSSL ${INCLUDE_hcrypto} ${CFLAGS}" - saved_LIB_hcrypto="$LIB_hcrypto" - for lres in "" "-ldl" "-lnsl -lsocket" "-lnsl -lsocket -ldl"; do - LIB_hcrypto="${saved_LIB_hcrypto} -lcrypto $lres" - LIB_hcrypto_a="$LIB_hcrypto" - LIB_hcrypto_so="$LIB_hcrypto" - LIB_hcrypto_appl="$LIB_hcrypto" - LIBS="${LIBS} ${LIB_hcrypto}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #undef KRB5 /* makes md4.h et al unhappy */ - #ifdef HAVE_OPENSSL - #ifdef HAVE_SYS_TYPES_H - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #else - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #endif - -int -main () -{ - - void *schedule = 0; - EVP_MD_CTX mdctx; - - EVP_md4(); - EVP_md5(); - EVP_sha1(); - EVP_sha256(); - - EVP_MD_CTX_init(&mdctx); - EVP_DigestInit_ex(&mdctx, EVP_sha1(), (ENGINE *)0); - EVP_CIPHER_iv_length(((EVP_CIPHER*)0)); - UI_UTIL_read_pw_string(0,0,0,0); - RAND_status(); - #ifdef HAVE_OPENSSL - EC_KEY_new(); - #endif - - OpenSSL_add_all_algorithms(); - AES_encrypt(0,0,0); - DES_cbc_encrypt(0, 0, 0, schedule, 0, 0); - RC4(0, 0, 0, 0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - crypto_lib=libcrypto openssl=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libcrypto" >&5 -$as_echo "libcrypto" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$crypto_lib" = libcrypto ; then - break; - fi - done - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" -fi - -if test "$crypto_lib" = "unknown"; then - - DIR_hcrypto='hcrypto' - LIB_hcrypto='$(top_builddir)/lib/hcrypto/libhcrypto.la' - LIB_hcrypto_a='$(top_builddir)/lib/hcrypto/.libs/libhcrypto.a' - LIB_hcrypto_so='$(top_builddir)/lib/hcrypto/.libs/libhcrypto.so' - LIB_hcrypto_appl="-lhcrypto" - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: included libhcrypto" >&5 -$as_echo "included libhcrypto" >&6; } - -fi - -if test "$with_krb4" != no -a "$crypto_lib" != krb4; then - as_fn_error "the crypto library used by krb4 lacks features -required by Kerberos 5; to continue, you need to install a newer -Kerberos 4 or configure --without-krb4" "$LINENO" 5 -fi - -if test "$openssl" = "yes"; then - -$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h - -fi - if test "$openssl" = yes; then - HAVE_OPENSSL_TRUE= - HAVE_OPENSSL_FALSE='#' -else - HAVE_OPENSSL_TRUE='#' - HAVE_OPENSSL_FALSE= -fi - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiling threadsafe libraries" >&5 -$as_echo_n "checking if compiling threadsafe libraries... " >&6; } - -# Check whether --enable-pthread-support was given. -if test "${enable_pthread_support+set}" = set; then : - enableval=$enable_pthread_support; -else - enable_pthread_support=maybe -fi - - -case "$host" in -*-*-solaris2*) - native_pthread_support=yes - if test "$GCC" = yes; then - PTHREAD_CFLAGS=-pthreads - PTHREAD_LIBADD=-pthreads - else - PTHREAD_CFLAGS=-mt - PTHREAD_LDADD=-mt - PTHREAD_LIBADD=-mt - fi - ;; -*-*-netbsd[12]*) - native_pthread_support="if running netbsd 1.6T or newer" - PTHREAD_LIBADD="-lpthread" - ;; -*-*-netbsd[3456789]*) - native_pthread_support="netbsd 3 uses explict pthread" - PTHREAD_LIBADD="-lpthread" - ;; -*-*-freebsd[56789]*) - native_pthread_support=yes - PTHREAD_LIBADD="-pthread" - ;; -*-*-openbsd*) - native_pthread_support=yes - PTHREAD_CFLAGS=-pthread - PTHREAD_LIBADD=-pthread - ;; -*-*-linux* | *-*-linux-gnu) - case `uname -r` in - 2.*|3.*) - native_pthread_support=yes - PTHREAD_CFLAGS=-pthread - PTHREAD_LIBADD=-pthread - ;; - esac - ;; -*-*-kfreebsd*-gnu*) - native_pthread_support=yes - PTHREAD_CFLAGS=-pthread - PTHREAD_LIBADD=-pthread - ;; -*-*-aix*) - native_pthread_support=no - ;; -mips-sgi-irix6.[5-9]) # maybe works for earlier versions too - native_pthread_support=yes - PTHREAD_LIBADD="-lpthread" - ;; -*-*-darwin*) - native_pthread_support=yes - ;; -*) - native_pthread_support=no - ;; -esac - -if test "$enable_pthread_support" = maybe ; then - enable_pthread_support="$native_pthread_support" -fi - -if test "$enable_pthread_support" != no; then - -$as_echo "#define ENABLE_PTHREAD_SUPPORT 1" >>confdefs.h - - LIBS="$PTHREAD_LIBADD $LIBS" -else - PTHREAD_CFLAGS="" - PTHREAD_LIBADD="" -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pthread_support" >&5 -$as_echo "$enable_pthread_support" >&6; } - - -# Check whether --enable-dce was given. -if test "${enable_dce+set}" = set; then : - enableval=$enable_dce; -fi - -if test "$enable_dce" = yes; then - -$as_echo "#define DCE 1" >>confdefs.h - -fi - if test "$enable_dce" = yes; then - DCE_TRUE= - DCE_FALSE='#' -else - DCE_TRUE='#' - DCE_FALSE= -fi - - -## XXX quite horrible: -if test -f /etc/ibmcxx.cfg; then - dpagaix_ldadd=`sed -n '/^xlc_r4/,/^$/p' /etc/ibmcxx.cfg | sed -n -e '/libraries/{;s/^[^=]*=\(.*\)/\1/;s/,/ /gp;}'` - dpagaix_cflags=`sed -n '/^xlc_r4/,/^$/p' /etc/ibmcxx.cfg | sed -n -e '/options/{;s/^[^=]*=\(.*\)/\1/;s/-q^,*//;s/,/ /gp;}'` - dpagaix_ldflags= -else - dpagaix_cflags="-D_THREAD_SAFE -D_AIX_PTHREADS_D7 -D_AIX32_THREADS=1 -D_AES_SOURCE -D_AIX41 -I/usr/include/dce" - dpagaix_ldadd="-L/usr/lib/threads -ldcelibc_r -ldcepthreads -lpthreads_compat lpthreads -lc_r" - dpagaix_ldflags="-Wl,-bI:dfspag.exp" -fi - - - - -# Check whether --enable-afs-support was given. -if test "${enable_afs_support+set}" = set; then : - enableval=$enable_afs_support; -fi - -if test "$enable_afs_support" = no; then - -$as_echo "#define NO_AFS 1" >>confdefs.h - - NO_AFS="1" -fi - - - -# Check whether --with-berkeley-db was given. -if test "${with_berkeley_db+set}" = set; then : - withval=$with_berkeley_db; -else - with_berkeley_db=check -fi - - -dbheader="" - -# Check whether --with-berkeley-db-include was given. -if test "${with_berkeley_db_include+set}" = set; then : - withval=$with_berkeley_db_include; dbheader=$withval -else - with_berkeley_db_include=check -fi - - -# Check whether --enable-ndbm-db was given. -if test "${enable_ndbm_db+set}" = set; then : - enableval=$enable_ndbm_db; - -fi - - -have_ndbm=no -db_type=unknown - -if test "x$with_berkeley_db" != xno; then : - if test "x$with_berkeley_db_include" != xcheck; then : - for ac_header in "$dbheader/db.h" -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - DBHEADER=$dbheader - - -$as_echo "#define HAVE_DBHEADER 1" >>confdefs.h - - -else - if test "x$with_berkeley_db_include" != xcheck; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "--with-berkeley-db-include was given but include test failed -See \`config.log' for more details." "$LINENO" 5; } - fi - -fi - -done - -else - for ac_header in \ - db5/db.h \ - db4/db.h \ - db3/db.h \ - db.h \ - -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for db_create" >&5 -$as_echo_n "checking for db_create... " >&6; } -if test "${ac_cv_funclib_db_create+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_db_create\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" $dbheader db5 db4 db3 db; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #ifdef HAVE_DBHEADER - #include <$dbheader/db.h> - #elif HAVE_DB5_DB_H - #include - #elif HAVE_DB4_DB_H - #include - #elif defined(HAVE_DB3_DB_H) - #include - #else - #include - #endif - -int -main () -{ -db_create(NULL, NULL, 0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_db_create=$ac_lib; else ac_cv_funclib_db_create=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_db_create=\${ac_cv_funclib_db_create-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_db_create" - -if false; then - for ac_func in db_create -do : - ac_fn_c_check_func "$LINENO" "db_create" "ac_cv_func_db_create" -if test "x$ac_cv_func_db_create" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DB_CREATE 1 -_ACEOF - -fi -done - -fi -# db_create -eval "ac_tr_func=HAVE_`echo db_create | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_db_create=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_db_create=yes" - eval "LIB_db_create=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_db_create=no" - eval "LIB_db_create=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_db_create=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - if test "$ac_cv_func_db_create" = "yes"; then - db_type=db3 - if test "$ac_cv_funclib_db_create" != "yes"; then - DBLIB="$ac_cv_funclib_db_create" - else - DBLIB="" - fi - -$as_echo "#define HAVE_DB3 1" >>confdefs.h - - fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbopen" >&5 -$as_echo_n "checking for dbopen... " >&6; } -if test "${ac_cv_funclib_dbopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_dbopen\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" db2 db; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #if defined(HAVE_DB2_DB_H) - #include - #elif defined(HAVE_DB_H) - #include - #else - #error no db.h - #endif - -int -main () -{ -dbopen(NULL, 0, 0, 0, NULL) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_dbopen=$ac_lib; else ac_cv_funclib_dbopen=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_dbopen=\${ac_cv_funclib_dbopen-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_dbopen" - -if false; then - for ac_func in dbopen -do : - ac_fn_c_check_func "$LINENO" "dbopen" "ac_cv_func_dbopen" -if test "x$ac_cv_func_dbopen" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DBOPEN 1 -_ACEOF - -fi -done - -fi -# dbopen -eval "ac_tr_func=HAVE_`echo dbopen | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_dbopen=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_dbopen=yes" - eval "LIB_dbopen=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_dbopen=no" - eval "LIB_dbopen=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_dbopen=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - if test "$ac_cv_func_dbopen" = "yes"; then - db_type=db1 - if test "$ac_cv_funclib_dbopen" != "yes"; then - DBLIB="$ac_cv_funclib_dbopen" - else - DBLIB="" - fi - -$as_echo "#define HAVE_DB1 1" >>confdefs.h - - fi - - - if test "$ac_cv_func_dbm_firstkey" != yes; then - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_firstkey" >&5 -$as_echo_n "checking for dbm_firstkey... " >&6; } -if test "${ac_cv_funclib_dbm_firstkey+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_dbm_firstkey\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in $ac_cv_funclib_dbopen $ac_cv_funclib_db_create; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #define DB_DBM_HSEARCH 1 - #include - DBM *dbm; - -int -main () -{ -dbm_firstkey(NULL) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_dbm_firstkey=$ac_lib; else ac_cv_funclib_dbm_firstkey=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_dbm_firstkey=\${ac_cv_funclib_dbm_firstkey-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_dbm_firstkey" - -if false; then - for ac_func in dbm_firstkey -do : - ac_fn_c_check_func "$LINENO" "dbm_firstkey" "ac_cv_func_dbm_firstkey" -if test "x$ac_cv_func_dbm_firstkey" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DBM_FIRSTKEY 1 -_ACEOF - -fi -done - -fi -# dbm_firstkey -eval "ac_tr_func=HAVE_`echo dbm_firstkey | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_dbm_firstkey=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_dbm_firstkey=yes" - eval "LIB_dbm_firstkey=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_dbm_firstkey=no" - eval "LIB_dbm_firstkey=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_dbm_firstkey=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - if test "$ac_cv_func_dbm_firstkey" = "yes"; then - if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then - LIB_NDBM="$ac_cv_funclib_dbm_firstkey" - else - LIB_NDBM="" - fi - -$as_echo "#define HAVE_DB_NDBM 1" >>confdefs.h - - -$as_echo "#define HAVE_NEW_DB 1" >>confdefs.h - - else - $as_unset ac_cv_func_dbm_firstkey - $as_unset ac_cv_funclib_dbm_firstkey - fi - fi - - -fi # fi berkeley db - -if test "$enable_ndbm_db" != "no"; then - - if test "$db_type" = "unknown" -o "$ac_cv_func_dbm_firstkey" = ""; then - - for ac_header in \ - dbm.h \ - ndbm.h \ - -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_firstkey" >&5 -$as_echo_n "checking for dbm_firstkey... " >&6; } -if test "${ac_cv_funclib_dbm_firstkey+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_dbm_firstkey\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ndbm; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #if defined(HAVE_NDBM_H) - #include - #elif defined(HAVE_DBM_H) - #include - #endif - DBM *dbm; - -int -main () -{ -dbm_firstkey(NULL) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_dbm_firstkey=$ac_lib; else ac_cv_funclib_dbm_firstkey=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_dbm_firstkey=\${ac_cv_funclib_dbm_firstkey-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_dbm_firstkey" - -if false; then - for ac_func in dbm_firstkey -do : - ac_fn_c_check_func "$LINENO" "dbm_firstkey" "ac_cv_func_dbm_firstkey" -if test "x$ac_cv_func_dbm_firstkey" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DBM_FIRSTKEY 1 -_ACEOF - -fi -done - -fi -# dbm_firstkey -eval "ac_tr_func=HAVE_`echo dbm_firstkey | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_dbm_firstkey=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_dbm_firstkey=yes" - eval "LIB_dbm_firstkey=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_dbm_firstkey=no" - eval "LIB_dbm_firstkey=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_dbm_firstkey=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - if test "$ac_cv_func_dbm_firstkey" = "yes"; then - if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then - LIB_NDBM="$ac_cv_funclib_dbm_firstkey" - else - LIB_NDBM="" - fi - -$as_echo "#define HAVE_NDBM 1" >>confdefs.h - have_ndbm=yes - if test "$db_type" = "unknown"; then - db_type=ndbm - DBLIB="$LIB_NDBM" - fi - else - - $as_unset ac_cv_func_dbm_firstkey - $as_unset ac_cv_funclib_dbm_firstkey - - for ac_header in \ - gdbm/ndbm.h \ - -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbm_firstkey" >&5 -$as_echo_n "checking for dbm_firstkey... " >&6; } -if test "${ac_cv_funclib_dbm_firstkey+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_dbm_firstkey\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" gdbm; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - DBM *dbm; - -int -main () -{ -dbm_firstkey(NULL) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_dbm_firstkey=$ac_lib; else ac_cv_funclib_dbm_firstkey=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_dbm_firstkey=\${ac_cv_funclib_dbm_firstkey-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_dbm_firstkey" - -if false; then - for ac_func in dbm_firstkey -do : - ac_fn_c_check_func "$LINENO" "dbm_firstkey" "ac_cv_func_dbm_firstkey" -if test "x$ac_cv_func_dbm_firstkey" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DBM_FIRSTKEY 1 -_ACEOF - -fi -done - -fi -# dbm_firstkey -eval "ac_tr_func=HAVE_`echo dbm_firstkey | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_dbm_firstkey=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_dbm_firstkey=yes" - eval "LIB_dbm_firstkey=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_dbm_firstkey=no" - eval "LIB_dbm_firstkey=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_dbm_firstkey=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - if test "$ac_cv_func_dbm_firstkey" = "yes"; then - if test "$ac_cv_funclib_dbm_firstkey" != "yes"; then - LIB_NDBM="$ac_cv_funclib_dbm_firstkey" - else - LIB_NDBM="" - fi - -$as_echo "#define HAVE_NDBM 1" >>confdefs.h - have_ndbm=yes - if test "$db_type" = "unknown"; then - db_type=ndbm - DBLIB="$LIB_NDBM" - fi - fi - fi - fi #enable_ndbm_db -fi # unknown - -if test "$have_ndbm" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ndbm is implemented with db" >&5 -$as_echo_n "checking if ndbm is implemented with db... " >&6; } - if test "$cross_compiling" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no-cross" >&5 -$as_echo "no-cross" >&6; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if defined(HAVE_GDBM_NDBM_H) -#include -#elif defined(HAVE_NDBM_H) -#include -#elif defined(HAVE_DBM_H) -#include -#endif -int main(int argc, char **argv) -{ - DBM *d; - - d = dbm_open("conftest", O_RDWR | O_CREAT, 0666); - if (d == NULL) - return 1; - dbm_close(d); - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - - if test -f conftest.db; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_NEW_DB 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi - - if test "$db_type" = db1; then - HAVE_DB1_TRUE= - HAVE_DB1_FALSE='#' -else - HAVE_DB1_TRUE='#' - HAVE_DB1_FALSE= -fi - if test "$db_type" = db3; then - HAVE_DB3_TRUE= - HAVE_DB3_FALSE='#' -else - HAVE_DB3_TRUE='#' - HAVE_DB3_FALSE= -fi - if test "$db_type" = ndbm; then - HAVE_NDBM_TRUE= - HAVE_NDBM_FALSE='#' -else - HAVE_NDBM_TRUE='#' - HAVE_NDBM_FALSE= -fi - if test "$dbheader" != ""; then - HAVE_DBHEADER_TRUE= - HAVE_DBHEADER_FALSE='#' -else - HAVE_DBHEADER_TRUE='#' - HAVE_DBHEADER_FALSE= -fi - -## it's probably not correct to include LDFLAGS here, but we might -## need it, for now just add any possible -L -z="" -for i in $LDFLAGS; do - case "$i" in - -L*) z="$z $i";; - esac -done -DBLIB="$z $DBLIB" - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if test "${ac_cv_type_uid_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then : - ac_cv_type_uid_t=yes -else - ac_cv_type_uid_t=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then - -$as_echo "#define uid_t int" >>confdefs.h - - -$as_echo "#define gid_t int" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - -if test "$ac_cv_type_signal" = "void" ; then - -$as_echo "#define VOID_RETSIGTYPE 1" >>confdefs.h - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - - -for ac_header in standards.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "standards.h" "ac_cv_header_standards_h" "$ac_includes_default" -if test "x$ac_cv_header_standards_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STANDARDS_H 1 -_ACEOF - -fi - -done - -for i in netinet/ip.h netinet/tcp.h; do - -cv=`echo "$i" | sed 'y%./+-%__p_%'` - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $i" >&5 -$as_echo_n "checking for $i... " >&6; } -if { as_var=ac_cv_header_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_STANDARDS_H -#include -#endif -#include <$i> - -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - eval "ac_cv_header_$cv=yes" -else - eval "ac_cv_header_$cv=no" -fi -rm -f conftest.err conftest.$ac_ext -fi -eval ac_res=\$ac_cv_header_$cv - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -ac_res=`eval echo \\$ac_cv_header_$cv` -if test "$ac_res" = yes; then - ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi -done -if false;then - for ac_header in netinet/ip.h netinet/tcp.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -fi - - -for ac_func in getlogin setlogin -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -if test "$ac_cv_func_getlogin" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getlogin is posix" >&5 -$as_echo_n "checking if getlogin is posix... " >&6; } -if test "${ac_cv_func_getlogin_posix+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -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 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getlogin_posix" >&5 -$as_echo "$ac_cv_func_getlogin_posix" >&6; } -if test "$ac_cv_func_getlogin_posix" = yes; then - -$as_echo "#define POSIX_GETLOGIN 1" >>confdefs.h - -fi -fi - - - - - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - - -for ac_func in getpagesize -do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPAGESIZE 1 -_ACEOF - -fi -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 -$as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_mmap_fixed_mapped=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc - -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ - -#include -#include - -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H -char *malloc (); -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -int -main () -{ - char *data, *data2, *data3; - int i, pagesize; - int fd, fd2; - - pagesize = getpagesize (); - - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - return 1; - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - return 2; - if (write (fd, data, pagesize) != pagesize) - return 3; - close (fd); - - /* Next, check that the tail of a page is zero-filled. File must have - non-zero length, otherwise we risk SIGBUS for entire page. */ - fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); - if (fd2 < 0) - return 4; - data2 = ""; - if (write (fd2, data2, 1) != 1) - return 5; - data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); - if (data2 == MAP_FAILED) - return 6; - for (i = 0; i < pagesize; ++i) - if (*(data2 + i)) - return 7; - close (fd2); - if (munmap (data2, pagesize)) - return 8; - - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - return 9; - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 10; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - return 11; - - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - return 12; - if (read (fd, data3, pagesize) != pagesize) - return 13; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 14; - close (fd); - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_mmap_fixed_mapped=yes -else - ac_cv_func_mmap_fixed_mapped=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 -$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } -if test $ac_cv_func_mmap_fixed_mapped = yes; then - -$as_echo "#define HAVE_MMAP 1" >>confdefs.h - -fi -rm -f conftest.mmap conftest.txt - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if realloc if broken" >&5 -$as_echo_n "checking if realloc if broken... " >&6; } -if test "${ac_cv_func_realloc_broken+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -ac_cv_func_realloc_broken=no -if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int main(int argc, char **argv) -{ - return realloc(NULL, 17) == NULL; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - : -else - ac_cv_func_realloc_broken=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_broken" >&5 -$as_echo "$ac_cv_func_realloc_broken" >&6; } -if test "$ac_cv_func_realloc_broken" = yes ; then - -$as_echo "#define BROKEN_REALLOC 1" >>confdefs.h - -fi - - - - - - -DIR_roken=roken -LIB_roken='$(top_builddir)/lib/roken/libroken.la' -INCLUDES_roken='-I$(top_builddir)/lib/roken -I$(top_srcdir)/lib/roken' - - - - - - - - - - -$as_echo "#define rk_PATH_DELIM '/'" >>confdefs.h - - - - - - - - -# Check whether --enable-developer was given. -if test "${enable_developer+set}" = set; then : - enableval=$enable_developer; -fi - -if test "X$enable_developer" = Xyes; then - dwflags="-Werror" -fi - -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 - # -Wstrict-overflow=5 - WFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs $dwflags" - WFLAGS_NOUNUSED="-Wno-unused" - WFLAGS_NOIMPLICITINT="-Wno-implicit-int" -fi - - - - - - - - -cv=`echo "ssize_t" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 -$as_echo_n "checking for ssize_t... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif -#include -int -main () -{ -ssize_t foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo ssize_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SSIZE_T 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - - - - -cv=`echo "long long" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5 -$as_echo_n "checking for long long... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif - -int -main () -{ -long long foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo long long | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" -if test "x$ac_cv_type_long_long" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_LONG_LONG 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - - - - - - -for ac_header in \ - arpa/inet.h \ - config.h \ - crypt.h \ - dirent.h \ - errno.h \ - err.h \ - fcntl.h \ - fnmatch.h \ - grp.h \ - ifaddrs.h \ - netinet/in.h \ - netinet/in6.h \ - netinet/in_systm.h \ - netinet6/in6.h \ - paths.h \ - poll.h \ - pwd.h \ - rpcsvc/ypclnt.h \ - search.h \ - shadow.h \ - stdint.h \ - sys/bswap.h \ - sys/ioctl.h \ - sys/mman.h \ - sys/param.h \ - sys/resource.h \ - sys/sockio.h \ - sys/stat.h \ - sys/time.h \ - sys/tty.h \ - sys/types.h \ - sys/uio.h \ - sys/utsname.h \ - sys/wait.h \ - syslog.h \ - termios.h \ - winsock2.h \ - ws2tcpip.h \ - unistd.h \ - userconf.h \ - usersec.h \ - util.h \ - -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - -cv=`echo "uintptr_t" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintptr_t" >&5 -$as_echo_n "checking for uintptr_t... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif -#ifdef HAVE_STDINT_H -#include -#endif -int -main () -{ -uintptr_t foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo uintptr_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" -if test "x$ac_cv_type_uintptr_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINTPTR_T 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - -for ac_header in vis.h -do : - ac_fn_c_check_header_compile "$LINENO" "vis.h" "ac_cv_header_vis_h" " -#include -#ifndef VIS_SP -#error invis -#endif -" -if test "x$ac_cv_header_vis_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VIS_H 1 -_ACEOF - -fi - -done - - -for ac_header in netdb.h -do : - ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -" -if test "x$ac_cv_header_netdb_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETDB_H 1 -_ACEOF - -fi - -done - - -for ac_header in sys/socket.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -" -if test "x$ac_cv_header_sys_socket_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SOCKET_H 1 -_ACEOF - -fi - -done - - -for ac_header in net/if.h -do : - ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_SOCKET_H -#include -#endif -" -if test "x$ac_cv_header_net_if_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NET_IF_H 1 -_ACEOF - -fi - -done - - -for ac_header in netinet6/in6_var.h -do : - ac_fn_c_check_header_compile "$LINENO" "netinet6/in6_var.h" "ac_cv_header_netinet6_in6_var_h" "$ac_includes_default -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif - -" -if test "x$ac_cv_header_netinet6_in6_var_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETINET6_IN6_VAR_H 1 -_ACEOF - -fi - -done - - -for ac_header in sys/sysctl.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -" -if test "x$ac_cv_header_sys_sysctl_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_SYSCTL_H 1 -_ACEOF - -fi - -done - - -for ac_header in sys/proc.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "$ac_includes_default -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -" -if test "x$ac_cv_header_sys_proc_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_PROC_H 1 -_ACEOF - -fi - -done - - - - - if test "$ac_cv_header_err_h" = yes; then - have_err_h_TRUE= - have_err_h_FALSE='#' -else - have_err_h_TRUE='#' - have_err_h_FALSE= -fi - - if test "$ac_cv_header_ifaddrs_h" = yes; then - have_ifaddrs_h_TRUE= - have_ifaddrs_h_FALSE='#' -else - have_ifaddrs_h_TRUE='#' - have_ifaddrs_h_FALSE= -fi - - if test "$ac_cv_header_search_h" = yes; then - have_search_h_TRUE= - have_search_h_FALSE='#' -else - have_search_h_TRUE='#' - have_search_h_FALSE= -fi - - if test "$ac_cv_header_vis_h" = yes; then - have_vis_h_TRUE= - have_vis_h_FALSE='#' -else - have_vis_h_TRUE='#' - have_vis_h_FALSE= -fi - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket" >&5 -$as_echo_n "checking for socket... " >&6; } -if test "${ac_cv_funclib_socket+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_socket\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" socket; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -socket() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_socket=$ac_lib; else ac_cv_funclib_socket=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_socket=\${ac_cv_funclib_socket-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_socket" - -if false; then - for ac_func in socket -do : - ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SOCKET 1 -_ACEOF - -fi -done - -fi -# socket -eval "ac_tr_func=HAVE_`echo socket | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_socket=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_socket=yes" - eval "LIB_socket=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_socket=no" - eval "LIB_socket=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_socket=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_socket"; then - LIBS="$LIB_socket $LIBS" -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname" >&5 -$as_echo_n "checking for gethostbyname... " >&6; } -if test "${ac_cv_funclib_gethostbyname+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_gethostbyname\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" nsl; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -gethostbyname() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_gethostbyname=$ac_lib; else ac_cv_funclib_gethostbyname=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_gethostbyname=\${ac_cv_funclib_gethostbyname-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_gethostbyname" - -if false; then - for ac_func in gethostbyname -do : - ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETHOSTBYNAME 1 -_ACEOF - -fi -done - -fi -# gethostbyname -eval "ac_tr_func=HAVE_`echo gethostbyname | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_gethostbyname=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_gethostbyname=yes" - eval "LIB_gethostbyname=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_gethostbyname=no" - eval "LIB_gethostbyname=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_gethostbyname=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_gethostbyname"; then - LIBS="$LIB_gethostbyname $LIBS" -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslog" >&5 -$as_echo_n "checking for syslog... " >&6; } -if test "${ac_cv_funclib_syslog+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_syslog\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" syslog; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -syslog() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_syslog=$ac_lib; else ac_cv_funclib_syslog=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_syslog=\${ac_cv_funclib_syslog-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_syslog" - -if false; then - for ac_func in syslog -do : - ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog" -if test "x$ac_cv_func_syslog" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYSLOG 1 -_ACEOF - -fi -done - -fi -# syslog -eval "ac_tr_func=HAVE_`echo syslog | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_syslog=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_syslog=yes" - eval "LIB_syslog=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_syslog=no" - eval "LIB_syslog=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_syslog=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_syslog"; then - LIBS="$LIB_syslog $LIBS" -fi - - - - -# Check whether --with-ipv6 was given. -if test "${with_ipv6+set}" = set; then : - withval=$with_ipv6; - ac_cv_lib_ipv6="$withval" - -fi - -save_CFLAGS="${CFLAGS}" - -if test "X$ac_cv_lib_ipv6" != "Xno"; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 stack type" >&5 -$as_echo_n "checking for IPv6 stack type... " >&6; } -if test "${rk_cv_v6type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - v6type=unknown - v6lib=none - - for i in v6d toshiba kame inria zeta linux; do - case $i in - v6d) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef __V6D__ -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; v6lib=v6; - v6libdir=/usr/local/v6/lib; - CFLAGS="-I/usr/local/v6/include $CFLAGS" -fi -rm -f conftest* - - ;; - toshiba) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef _TOSHIBA_INET6 -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; v6lib=inet6; - v6libdir=/usr/local/v6/lib; - CFLAGS="-DINET6 $CFLAGS" -fi -rm -f conftest* - - ;; - kame) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef __KAME__ -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; v6lib=inet6; - v6libdir=/usr/local/v6/lib; - CFLAGS="-DINET6 $CFLAGS" -fi -rm -f conftest* - - ;; - inria) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef IPV6_INRIA_VERSION -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; CFLAGS="-DINET6 $CFLAGS" -fi -rm -f conftest* - - ;; - zeta) - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef _ZETA_MINAMI_INET6 -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - v6type=$i; v6lib=inet6; - v6libdir=/usr/local/v6/lib; - CFLAGS="-DINET6 $CFLAGS" -fi -rm -f conftest* - - ;; - 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 - - 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 - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rk_cv_v6type" >&5 -$as_echo "$rk_cv_v6type" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6" >&5 -$as_echo_n "checking for IPv6... " >&6; } -if test "${rk_cv_lib_ipv6+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif - -int -main () -{ - - 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 = in6addr_any; - bind(s, (struct sockaddr *)&sin6, sizeof(sin6)); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ipv6=yes -else - ac_cv_lib_ipv6=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rk_cv_lib_ipv6" >&5 -$as_echo "$rk_cv_lib_ipv6" >&6; } -fi - -if test "$ac_cv_lib_ipv6" = yes; then - -$as_echo "#define HAVE_IPV6 1" >>confdefs.h - -else - CFLAGS="${save_CFLAGS}" -fi - -## test for AIX missing in6addr_loopback -if test "$ac_cv_lib_ipv6" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_loopback" >&5 -$as_echo_n "checking for in6addr_loopback... " >&6; } -if test "${rk_cv_var_in6addr_loopback+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -int -main () -{ - -struct sockaddr_in6 sin6; -sin6.sin6_addr = in6addr_loopback; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_in6addr_loopback=yes -else - ac_cv_var_in6addr_loopback=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rk_cv_var_in6addr_loopback" >&5 -$as_echo "$rk_cv_var_in6addr_loopback" >&6; } - if test "$ac_cv_var_in6addr_loopback" = yes; then - -$as_echo "#define HAVE_IN6ADDR_LOOPBACK 1" >>confdefs.h - - fi -fi - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname2" >&5 -$as_echo_n "checking for gethostbyname2... " >&6; } -if test "${ac_cv_funclib_gethostbyname2+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_gethostbyname2\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" inet6 ip6; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -gethostbyname2() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_gethostbyname2=$ac_lib; else ac_cv_funclib_gethostbyname2=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_gethostbyname2=\${ac_cv_funclib_gethostbyname2-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_gethostbyname2" - -if false; then - for ac_func in gethostbyname2 -do : - ac_fn_c_check_func "$LINENO" "gethostbyname2" "ac_cv_func_gethostbyname2" -if test "x$ac_cv_func_gethostbyname2" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETHOSTBYNAME2 1 -_ACEOF - -fi -done - -fi -# gethostbyname2 -eval "ac_tr_func=HAVE_`echo gethostbyname2 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_gethostbyname2=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_gethostbyname2=yes" - eval "LIB_gethostbyname2=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_gethostbyname2=no" - eval "LIB_gethostbyname2=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_gethostbyname2=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_gethostbyname2"; then - LIBS="$LIB_gethostbyname2 $LIBS" -fi - - - - -for ac_header in arpa/nameser.h dns.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in resolv.h -do : - ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif - -" -if test "x$ac_cv_header_resolv_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_RESOLV_H 1 -_ACEOF - -fi - -done - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search" >&5 -$as_echo_n "checking for res_search... " >&6; } -if test "${ac_cv_funclib_res_search+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_res_search\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" resolv; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif - -int -main () -{ -res_search(0,0,0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_search=$ac_lib; else ac_cv_funclib_res_search=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_res_search=\${ac_cv_funclib_res_search-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_res_search" - -if false; then - for ac_func in res_search -do : - ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search" -if test "x$ac_cv_func_res_search" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_RES_SEARCH 1 -_ACEOF - -fi -done - -fi -# res_search -eval "ac_tr_func=HAVE_`echo res_search | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_res_search=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_res_search=yes" - eval "LIB_res_search=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_res_search=no" - eval "LIB_res_search=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_res_search=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_res_search"; then - LIBS="$LIB_res_search $LIBS" -fi - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_nsearch" >&5 -$as_echo_n "checking for res_nsearch... " >&6; } -if test "${ac_cv_funclib_res_nsearch+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_res_nsearch\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" resolv; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif - -int -main () -{ -res_nsearch(0,0,0,0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_nsearch=$ac_lib; else ac_cv_funclib_res_nsearch=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_res_nsearch=\${ac_cv_funclib_res_nsearch-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_res_nsearch" - -if false; then - for ac_func in res_nsearch -do : - ac_fn_c_check_func "$LINENO" "res_nsearch" "ac_cv_func_res_nsearch" -if test "x$ac_cv_func_res_nsearch" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_RES_NSEARCH 1 -_ACEOF - -fi -done - -fi -# res_nsearch -eval "ac_tr_func=HAVE_`echo res_nsearch | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_res_nsearch=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_res_nsearch=yes" - eval "LIB_res_nsearch=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_res_nsearch=no" - eval "LIB_res_nsearch=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_res_nsearch=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_res_nsearch"; then - LIBS="$LIB_res_nsearch $LIBS" -fi - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_ndestroy" >&5 -$as_echo_n "checking for res_ndestroy... " >&6; } -if test "${ac_cv_funclib_res_ndestroy+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_res_ndestroy\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" resolv; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif - -int -main () -{ -res_ndestroy(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_ndestroy=$ac_lib; else ac_cv_funclib_res_ndestroy=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_res_ndestroy=\${ac_cv_funclib_res_ndestroy-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_res_ndestroy" - -if false; then - for ac_func in res_ndestroy -do : - ac_fn_c_check_func "$LINENO" "res_ndestroy" "ac_cv_func_res_ndestroy" -if test "x$ac_cv_func_res_ndestroy" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_RES_NDESTROY 1 -_ACEOF - -fi -done - -fi -# res_ndestroy -eval "ac_tr_func=HAVE_`echo res_ndestroy | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_res_ndestroy=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_res_ndestroy=yes" - eval "LIB_res_ndestroy=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_res_ndestroy=no" - eval "LIB_res_ndestroy=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_res_ndestroy=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_res_ndestroy"; then - LIBS="$LIB_res_ndestroy $LIBS" -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dns_search" >&5 -$as_echo_n "checking for dns_search... " >&6; } -if test "${ac_cv_funclib_dns_search+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_dns_search\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_DNS_H -#include -#endif - -int -main () -{ -dns_search(0,0,0,0,0,0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_dns_search=$ac_lib; else ac_cv_funclib_dns_search=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_dns_search=\${ac_cv_funclib_dns_search-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_dns_search" - -if false; then - for ac_func in dns_search -do : - ac_fn_c_check_func "$LINENO" "dns_search" "ac_cv_func_dns_search" -if test "x$ac_cv_func_dns_search" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DNS_SEARCH 1 -_ACEOF - -fi -done - -fi -# dns_search -eval "ac_tr_func=HAVE_`echo dns_search | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_dns_search=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_dns_search=yes" - eval "LIB_dns_search=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_dns_search=no" - eval "LIB_dns_search=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_dns_search=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dn_expand" >&5 -$as_echo_n "checking for dn_expand... " >&6; } -if test "${ac_cv_funclib_dn_expand+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_dn_expand\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" resolv; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif - -int -main () -{ -dn_expand(0,0,0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_dn_expand=$ac_lib; else ac_cv_funclib_dn_expand=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_dn_expand" - -if false; then - for ac_func in dn_expand -do : - ac_fn_c_check_func "$LINENO" "dn_expand" "ac_cv_func_dn_expand" -if test "x$ac_cv_func_dn_expand" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DN_EXPAND 1 -_ACEOF - -fi -done - -fi -# dn_expand -eval "ac_tr_func=HAVE_`echo dn_expand | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_dn_expand=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_dn_expand=yes" - eval "LIB_dn_expand=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_dn_expand=no" - eval "LIB_dn_expand=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_dn_expand=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_dn_expand"; then - LIBS="$LIB_dn_expand $LIBS" -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _res" >&5 -$as_echo_n "checking for _res... " >&6; } -if test "${ac_cv_var__res+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif - void * foo(void) { return &_res; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var__res=yes -else - ac_cv_var__res=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_var__res" != yes ; then -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -extern int _res; -int foo(void) { return _res; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var__res=yes -else - ac_cv_var__res=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -fi - -ac_foo=`eval echo \\$ac_cv_var__res` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE__RES 1 -_ACEOF - - -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $2 - (void) $2; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl -ac_fn_c_check_decl "$LINENO" "_res" "ac_cv_have_decl__res" "#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -" -if test "x$ac_cv_have_decl__res" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__RES $ac_have_decl -_ACEOF - -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working snprintf" >&5 -$as_echo_n "checking for working snprintf... " >&6; } -if test "${ac_cv_func_snprintf_working+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_func_snprintf_working=yes -if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int main(int argc, char **argv) -{ - char foo[3]; - snprintf(foo, 2, "12"); - return strcmp(foo, "1") || snprintf(NULL, 0, "%d", 12) != 2; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - : -else - ac_cv_func_snprintf_working=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_snprintf_working" >&5 -$as_echo "$ac_cv_func_snprintf_working" >&6; } - -if test "$ac_cv_func_snprintf_working" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_SNPRINTF 1 -_ACEOF - -fi -if test "$ac_cv_func_snprintf_working" = yes; then - -if test "$ac_cv_func_snprintf+set" != set -o "$ac_cv_func_snprintf" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if snprintf needs a prototype" >&5 -$as_echo_n "checking if snprintf needs a prototype... " >&6; } -if test "${ac_cv_func_snprintf_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int snprintf (struct foo*); -int -main () -{ -snprintf(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_snprintf_noproto=yes" -else - eval "ac_cv_func_snprintf_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_snprintf_noproto" >&5 -$as_echo "$ac_cv_func_snprintf_noproto" >&6; } -if test "$ac_cv_func_snprintf_noproto" = yes; then - -$as_echo "#define NEED_SNPRINTF_PROTO 1" >>confdefs.h - -fi -fi - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vsnprintf" >&5 -$as_echo_n "checking for working vsnprintf... " >&6; } -if test "${ac_cv_func_vsnprintf_working+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_func_vsnprintf_working=yes -if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include - -int foo(int num, ...) -{ - char bar[3]; - va_list arg; - va_start(arg, num); - vsnprintf(bar, 2, "%s", arg); - va_end(arg); - return strcmp(bar, "1"); -} - -int bar(int num, int len, ...) -{ - int r; - va_list arg; - va_start(arg, len); - r = vsnprintf(NULL, 0, "%s", arg); - va_end(arg); - return r != len; -} - -int main(int argc, char **argv) -{ - return foo(0, "12") || bar(0, 2, "12"); -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - : -else - ac_cv_func_vsnprintf_working=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vsnprintf_working" >&5 -$as_echo "$ac_cv_func_vsnprintf_working" >&6; } - -if test "$ac_cv_func_vsnprintf_working" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_VSNPRINTF 1 -_ACEOF - -fi -if test "$ac_cv_func_vsnprintf_working" = yes; then - -if test "$ac_cv_func_vsnprintf+set" != set -o "$ac_cv_func_vsnprintf" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf needs a prototype" >&5 -$as_echo_n "checking if vsnprintf needs a prototype... " >&6; } -if test "${ac_cv_func_vsnprintf_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int vsnprintf (struct foo*); -int -main () -{ -vsnprintf(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_vsnprintf_noproto=yes" -else - eval "ac_cv_func_vsnprintf_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vsnprintf_noproto" >&5 -$as_echo "$ac_cv_func_vsnprintf_noproto" >&6; } -if test "$ac_cv_func_vsnprintf_noproto" = yes; then - -$as_echo "#define NEED_VSNPRINTF_PROTO 1" >>confdefs.h - -fi -fi - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working glob" >&5 -$as_echo_n "checking for working glob... " >&6; } -if test "${ac_cv_func_glob_working+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_func_glob_working=yes -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int -main () -{ - -glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE| -#ifdef GLOB_MAXPATH -GLOB_MAXPATH -#else -GLOB_LIMIT -#endif -, -NULL, NULL); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - : -else - ac_cv_func_glob_working=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_glob_working" >&5 -$as_echo "$ac_cv_func_glob_working" >&6; } - -if test "$ac_cv_func_glob_working" = yes; then - -$as_echo "#define HAVE_GLOB 1" >>confdefs.h - -fi -if test "$ac_cv_func_glob_working" = yes; then - -if test "$ac_cv_func_glob+set" != set -o "$ac_cv_func_glob" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if glob needs a prototype" >&5 -$as_echo_n "checking if glob needs a prototype... " >&6; } -if test "${ac_cv_func_glob_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct foo { int foo; } xx; -extern int glob (struct foo*); -int -main () -{ -glob(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_glob_noproto=yes" -else - eval "ac_cv_func_glob_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_glob_noproto" >&5 -$as_echo "$ac_cv_func_glob_noproto" >&6; } -if test "$ac_cv_func_glob_noproto" = yes; then - -$as_echo "#define NEED_GLOB_PROTO 1" >>confdefs.h - -fi -fi - -fi - -if test "$ac_cv_func_glob_working" != yes; then - case " $LIBOBJS " in - *" glob.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS glob.$ac_objext" - ;; -esac - -fi - if test "$ac_cv_func_glob_working" = yes; then - have_glob_h_TRUE= - have_glob_h_FALSE='#' -else - have_glob_h_TRUE='#' - have_glob_h_FALSE= -fi - - - -for ac_func in \ - asnprintf \ - asprintf \ - atexit \ - cgetent \ - getconfattr \ - getprogname \ - getrlimit \ - getspnam \ - issetugid \ - on_exit \ - poll \ - random \ - setprogname \ - strsvis \ - strsvisx \ - strunvis \ - strvis \ - strvisx \ - svis \ - sysconf \ - sysctl \ - tdelete \ - tfind \ - twalk \ - uname \ - unvis \ - vasnprintf \ - vasprintf \ - vis \ - -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -if test "$ac_cv_func_cgetent" = no; then - case " $LIBOBJS " in - *" getcap.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getcap.$ac_objext" - ;; -esac - -fi - if test "$ac_cv_func_cgetent" = yes; then - have_cgetent_TRUE= - have_cgetent_FALSE='#' -else - have_cgetent_TRUE='#' - have_cgetent_FALSE= -fi - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getsockopt" >&5 -$as_echo_n "checking for getsockopt... " >&6; } -if test "${ac_cv_funclib_getsockopt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_getsockopt\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -int -main () -{ -getsockopt(0,0,0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_getsockopt=$ac_lib; else ac_cv_funclib_getsockopt=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_getsockopt=\${ac_cv_funclib_getsockopt-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_getsockopt" - -if false; then - for ac_func in getsockopt -do : - ac_fn_c_check_func "$LINENO" "getsockopt" "ac_cv_func_getsockopt" -if test "x$ac_cv_func_getsockopt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETSOCKOPT 1 -_ACEOF - -fi -done - -fi -# getsockopt -eval "ac_tr_func=HAVE_`echo getsockopt | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_getsockopt=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_getsockopt=yes" - eval "LIB_getsockopt=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_getsockopt=no" - eval "LIB_getsockopt=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_getsockopt=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt" >&5 -$as_echo_n "checking for setsockopt... " >&6; } -if test "${ac_cv_funclib_setsockopt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_setsockopt\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -int -main () -{ -setsockopt(0,0,0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_setsockopt=$ac_lib; else ac_cv_funclib_setsockopt=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_setsockopt=\${ac_cv_funclib_setsockopt-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_setsockopt" - -if false; then - for ac_func in setsockopt -do : - ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt" -if test "x$ac_cv_func_setsockopt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SETSOCKOPT 1 -_ACEOF - -fi -done - -fi -# setsockopt -eval "ac_tr_func=HAVE_`echo setsockopt | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_setsockopt=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_setsockopt=yes" - eval "LIB_setsockopt=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_setsockopt=no" - eval "LIB_setsockopt=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_setsockopt=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5 -$as_echo_n "checking for hstrerror... " >&6; } -if test "${ac_cv_funclib_hstrerror+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_hstrerror\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" resolv; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_NETDB_H -#include -#endif -int -main () -{ -hstrerror(17) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_hstrerror=$ac_lib; else ac_cv_funclib_hstrerror=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_hstrerror=\${ac_cv_funclib_hstrerror-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_hstrerror" - -if false; then - for ac_func in hstrerror -do : - ac_fn_c_check_func "$LINENO" "hstrerror" "ac_cv_func_hstrerror" -if test "x$ac_cv_func_hstrerror" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_HSTRERROR 1 -_ACEOF - -fi -done - -fi -# hstrerror -eval "ac_tr_func=HAVE_`echo hstrerror | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_hstrerror=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_hstrerror=yes" - eval "LIB_hstrerror=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_hstrerror=no" - eval "LIB_hstrerror=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_hstrerror=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_hstrerror"; then - LIBS="$LIB_hstrerror $LIBS" -fi - -if eval "test \"$ac_cv_func_hstrerror\" != yes"; then - case " $LIBOBJS " in - *" hstrerror.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS hstrerror.$ac_objext" - ;; -esac - -fi - - -if test "$ac_cv_func_hstrerror+set" != set -o "$ac_cv_func_hstrerror" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if hstrerror needs a prototype" >&5 -$as_echo_n "checking if hstrerror needs a prototype... " >&6; } -if test "${ac_cv_func_hstrerror_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_NETDB_H -#include -#endif -struct foo { int foo; } xx; -extern int hstrerror (struct foo*); -int -main () -{ -hstrerror(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_hstrerror_noproto=yes" -else - eval "ac_cv_func_hstrerror_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_hstrerror_noproto" >&5 -$as_echo "$ac_cv_func_hstrerror_noproto" >&6; } -if test "$ac_cv_func_hstrerror_noproto" = yes; then - -$as_echo "#define NEED_HSTRERROR_PROTO 1" >>confdefs.h - -fi -fi - - - -if test "$ac_cv_func_asprintf+set" != set -o "$ac_cv_func_asprintf" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if asprintf needs a prototype" >&5 -$as_echo_n "checking if asprintf needs a prototype... " >&6; } -if test "${ac_cv_func_asprintf_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include -struct foo { int foo; } xx; -extern int asprintf (struct foo*); -int -main () -{ -asprintf(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_asprintf_noproto=yes" -else - eval "ac_cv_func_asprintf_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_asprintf_noproto" >&5 -$as_echo "$ac_cv_func_asprintf_noproto" >&6; } -if test "$ac_cv_func_asprintf_noproto" = yes; then - -$as_echo "#define NEED_ASPRINTF_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_vasprintf+set" != set -o "$ac_cv_func_vasprintf" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if vasprintf needs a prototype" >&5 -$as_echo_n "checking if vasprintf needs a prototype... " >&6; } -if test "${ac_cv_func_vasprintf_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include -struct foo { int foo; } xx; -extern int vasprintf (struct foo*); -int -main () -{ -vasprintf(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_vasprintf_noproto=yes" -else - eval "ac_cv_func_vasprintf_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vasprintf_noproto" >&5 -$as_echo "$ac_cv_func_vasprintf_noproto" >&6; } -if test "$ac_cv_func_vasprintf_noproto" = yes; then - -$as_echo "#define NEED_VASPRINTF_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_asnprintf+set" != set -o "$ac_cv_func_asnprintf" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if asnprintf needs a prototype" >&5 -$as_echo_n "checking if asnprintf needs a prototype... " >&6; } -if test "${ac_cv_func_asnprintf_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include -struct foo { int foo; } xx; -extern int asnprintf (struct foo*); -int -main () -{ -asnprintf(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_asnprintf_noproto=yes" -else - eval "ac_cv_func_asnprintf_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_asnprintf_noproto" >&5 -$as_echo "$ac_cv_func_asnprintf_noproto" >&6; } -if test "$ac_cv_func_asnprintf_noproto" = yes; then - -$as_echo "#define NEED_ASNPRINTF_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_vasnprintf+set" != set -o "$ac_cv_func_vasnprintf" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if vasnprintf needs a prototype" >&5 -$as_echo_n "checking if vasnprintf needs a prototype... " >&6; } -if test "${ac_cv_func_vasnprintf_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include -struct foo { int foo; } xx; -extern int vasnprintf (struct foo*); -int -main () -{ -vasnprintf(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_vasnprintf_noproto=yes" -else - eval "ac_cv_func_vasnprintf_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vasnprintf_noproto" >&5 -$as_echo "$ac_cv_func_vasnprintf_noproto" >&6; } -if test "$ac_cv_func_vasnprintf_noproto" = yes; then - -$as_echo "#define NEED_VASNPRINTF_PROTO 1" >>confdefs.h - -fi -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap16" >&5 -$as_echo_n "checking for bswap16... " >&6; } -if test "${ac_cv_funclib_bswap16+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_bswap16\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BSWAP_H -#include -#endif -int -main () -{ -bswap16(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_bswap16=$ac_lib; else ac_cv_funclib_bswap16=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_bswap16=\${ac_cv_funclib_bswap16-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_bswap16" - -if false; then - for ac_func in bswap16 -do : - ac_fn_c_check_func "$LINENO" "bswap16" "ac_cv_func_bswap16" -if test "x$ac_cv_func_bswap16" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BSWAP16 1 -_ACEOF - -fi -done - -fi -# bswap16 -eval "ac_tr_func=HAVE_`echo bswap16 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_bswap16=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_bswap16=yes" - eval "LIB_bswap16=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_bswap16=no" - eval "LIB_bswap16=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_bswap16=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap32" >&5 -$as_echo_n "checking for bswap32... " >&6; } -if test "${ac_cv_funclib_bswap32+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_bswap32\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BSWAP_H -#include -#endif -int -main () -{ -bswap32(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_bswap32=$ac_lib; else ac_cv_funclib_bswap32=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_bswap32=\${ac_cv_funclib_bswap32-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_bswap32" - -if false; then - for ac_func in bswap32 -do : - ac_fn_c_check_func "$LINENO" "bswap32" "ac_cv_func_bswap32" -if test "x$ac_cv_func_bswap32" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_BSWAP32 1 -_ACEOF - -fi -done - -fi -# bswap32 -eval "ac_tr_func=HAVE_`echo bswap32 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_bswap32=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_bswap32=yes" - eval "LIB_bswap32=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_bswap32=no" - eval "LIB_bswap32=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_bswap32=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pidfile" >&5 -$as_echo_n "checking for pidfile... " >&6; } -if test "${ac_cv_funclib_pidfile+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_pidfile\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" util; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_UTIL_H -#include -#endif -int -main () -{ -pidfile(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_pidfile=$ac_lib; else ac_cv_funclib_pidfile=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_pidfile=\${ac_cv_funclib_pidfile-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_pidfile" - -if false; then - for ac_func in pidfile -do : - ac_fn_c_check_func "$LINENO" "pidfile" "ac_cv_func_pidfile" -if test "x$ac_cv_func_pidfile" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PIDFILE 1 -_ACEOF - -fi -done - -fi -# pidfile -eval "ac_tr_func=HAVE_`echo pidfile | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_pidfile=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_pidfile=yes" - eval "LIB_pidfile=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_pidfile=no" - eval "LIB_pidfile=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_pidfile=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 -$as_echo_n "checking for getaddrinfo... " >&6; } -if test "${ac_cv_funclib_getaddrinfo+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_getaddrinfo\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -int -main () -{ -getaddrinfo(0,0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_getaddrinfo=$ac_lib; else ac_cv_funclib_getaddrinfo=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_getaddrinfo=\${ac_cv_funclib_getaddrinfo-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_getaddrinfo" - -if false; then - for ac_func in getaddrinfo -do : - ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" -if test "x$ac_cv_func_getaddrinfo" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETADDRINFO 1 -_ACEOF - -fi -done - -fi -# getaddrinfo -eval "ac_tr_func=HAVE_`echo getaddrinfo | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_getaddrinfo=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_getaddrinfo=yes" - eval "LIB_getaddrinfo=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_getaddrinfo=no" - eval "LIB_getaddrinfo=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_getaddrinfo=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_getaddrinfo"; then - LIBS="$LIB_getaddrinfo $LIBS" -fi - -if eval "test \"$ac_cv_func_getaddrinfo\" != yes"; then - case " $LIBOBJS " in - *" getaddrinfo.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" - ;; -esac - -fi - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo" >&5 -$as_echo_n "checking for getnameinfo... " >&6; } -if test "${ac_cv_funclib_getnameinfo+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_getnameinfo\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -int -main () -{ -getnameinfo(0,0,0,0,0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_getnameinfo=$ac_lib; else ac_cv_funclib_getnameinfo=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_getnameinfo=\${ac_cv_funclib_getnameinfo-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_getnameinfo" - -if false; then - for ac_func in getnameinfo -do : - ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" -if test "x$ac_cv_func_getnameinfo" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETNAMEINFO 1 -_ACEOF - -fi -done - -fi -# getnameinfo -eval "ac_tr_func=HAVE_`echo getnameinfo | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_getnameinfo=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_getnameinfo=yes" - eval "LIB_getnameinfo=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_getnameinfo=no" - eval "LIB_getnameinfo=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_getnameinfo=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_getnameinfo"; then - LIBS="$LIB_getnameinfo $LIBS" -fi - -if eval "test \"$ac_cv_func_getnameinfo\" != yes"; then - case " $LIBOBJS " in - *" getnameinfo.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getnameinfo.$ac_objext" - ;; -esac - -fi - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for freeaddrinfo" >&5 -$as_echo_n "checking for freeaddrinfo... " >&6; } -if test "${ac_cv_funclib_freeaddrinfo+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_freeaddrinfo\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -int -main () -{ -freeaddrinfo(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_freeaddrinfo=$ac_lib; else ac_cv_funclib_freeaddrinfo=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_freeaddrinfo=\${ac_cv_funclib_freeaddrinfo-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_freeaddrinfo" - -if false; then - for ac_func in freeaddrinfo -do : - ac_fn_c_check_func "$LINENO" "freeaddrinfo" "ac_cv_func_freeaddrinfo" -if test "x$ac_cv_func_freeaddrinfo" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FREEADDRINFO 1 -_ACEOF - -fi -done - -fi -# freeaddrinfo -eval "ac_tr_func=HAVE_`echo freeaddrinfo | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_freeaddrinfo=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_freeaddrinfo=yes" - eval "LIB_freeaddrinfo=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_freeaddrinfo=no" - eval "LIB_freeaddrinfo=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_freeaddrinfo=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_freeaddrinfo"; then - LIBS="$LIB_freeaddrinfo $LIBS" -fi - -if eval "test \"$ac_cv_func_freeaddrinfo\" != yes"; then - case " $LIBOBJS " in - *" freeaddrinfo.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS freeaddrinfo.$ac_objext" - ;; -esac - -fi - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gai_strerror" >&5 -$as_echo_n "checking for gai_strerror... " >&6; } -if test "${ac_cv_funclib_gai_strerror+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_gai_strerror\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" ; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -int -main () -{ -gai_strerror(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_gai_strerror=$ac_lib; else ac_cv_funclib_gai_strerror=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_gai_strerror=\${ac_cv_funclib_gai_strerror-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_gai_strerror" - -if false; then - for ac_func in gai_strerror -do : - ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror" -if test "x$ac_cv_func_gai_strerror" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GAI_STRERROR 1 -_ACEOF - -fi -done - -fi -# gai_strerror -eval "ac_tr_func=HAVE_`echo gai_strerror | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_gai_strerror=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_gai_strerror=yes" - eval "LIB_gai_strerror=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_gai_strerror=no" - eval "LIB_gai_strerror=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_gai_strerror=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test -n "$LIB_gai_strerror"; then - LIBS="$LIB_gai_strerror $LIBS" -fi - -if eval "test \"$ac_cv_func_gai_strerror\" != yes"; then - case " $LIBOBJS " in - *" gai_strerror.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS gai_strerror.$ac_objext" - ;; -esac - -fi - - -case "$host_os" in - darwin*) - ;; - *) - -$as_echo "#define SUPPORT_DETACH 1" >>confdefs.h - - ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon" -if test "x$ac_cv_func_daemon" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_DAEMON 1 -_ACEOF - -else - case " $LIBOBJS " in - *" daemon.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS daemon.$ac_objext" - ;; -esac - -fi - ;; -esac - -ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown" -if test "x$ac_cv_func_chown" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_CHOWN 1 -_ACEOF - -else - case " $LIBOBJS " in - *" chown.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS chown.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "copyhostent" "ac_cv_func_copyhostent" -if test "x$ac_cv_func_copyhostent" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_COPYHOSTENT 1 -_ACEOF - -else - case " $LIBOBJS " in - *" copyhostent.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS copyhostent.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "closefrom" "ac_cv_func_closefrom" -if test "x$ac_cv_func_closefrom" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_CLOSEFROM 1 -_ACEOF - -else - case " $LIBOBJS " in - *" closefrom.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS closefrom.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "ecalloc" "ac_cv_func_ecalloc" -if test "x$ac_cv_func_ecalloc" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_ECALLOC 1 -_ACEOF - -else - case " $LIBOBJS " in - *" ecalloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS ecalloc.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "emalloc" "ac_cv_func_emalloc" -if test "x$ac_cv_func_emalloc" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_EMALLOC 1 -_ACEOF - -else - case " $LIBOBJS " in - *" emalloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS emalloc.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "erealloc" "ac_cv_func_erealloc" -if test "x$ac_cv_func_erealloc" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_EREALLOC 1 -_ACEOF - -else - case " $LIBOBJS " in - *" erealloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS erealloc.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "estrdup" "ac_cv_func_estrdup" -if test "x$ac_cv_func_estrdup" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_ESTRDUP 1 -_ACEOF - -else - case " $LIBOBJS " in - *" estrdup.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS estrdup.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "err" "ac_cv_func_err" -if test "x$ac_cv_func_err" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_ERR 1 -_ACEOF - -else - case " $LIBOBJS " in - *" err.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS err.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "errx" "ac_cv_func_errx" -if test "x$ac_cv_func_errx" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_ERRX 1 -_ACEOF - -else - case " $LIBOBJS " in - *" errx.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS errx.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown" -if test "x$ac_cv_func_fchown" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_FCHOWN 1 -_ACEOF - -else - case " $LIBOBJS " in - *" fchown.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fchown.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" -if test "x$ac_cv_func_flock" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_FLOCK 1 -_ACEOF - -else - case " $LIBOBJS " in - *" flock.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS flock.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "fnmatch" "ac_cv_func_fnmatch" -if test "x$ac_cv_func_fnmatch" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_FNMATCH 1 -_ACEOF - -else - case " $LIBOBJS " in - *" fnmatch.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS fnmatch.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "freehostent" "ac_cv_func_freehostent" -if test "x$ac_cv_func_freehostent" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_FREEHOSTENT 1 -_ACEOF - -else - case " $LIBOBJS " in - *" freehostent.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS freehostent.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" -if test "x$ac_cv_func_getcwd" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETCWD 1 -_ACEOF - -else - case " $LIBOBJS " in - *" getcwd.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize" -if test "x$ac_cv_func_getdtablesize" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETDTABLESIZE 1 -_ACEOF - -else - case " $LIBOBJS " in - *" getdtablesize.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getdtablesize.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "getegid" "ac_cv_func_getegid" -if test "x$ac_cv_func_getegid" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETEGID 1 -_ACEOF - -else - case " $LIBOBJS " in - *" getegid.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getegid.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid" -if test "x$ac_cv_func_geteuid" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETEUID 1 -_ACEOF - -else - case " $LIBOBJS " in - *" geteuid.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS geteuid.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "getgid" "ac_cv_func_getgid" -if test "x$ac_cv_func_getgid" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETGID 1 -_ACEOF - -else - case " $LIBOBJS " in - *" getgid.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getgid.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" -if test "x$ac_cv_func_gethostname" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETHOSTNAME 1 -_ACEOF - -else - case " $LIBOBJS " in - *" gethostname.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS gethostname.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" -if test "x$ac_cv_func_getifaddrs" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETIFADDRS 1 -_ACEOF - -else - case " $LIBOBJS " in - *" getifaddrs.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getifaddrs.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "getipnodebyaddr" "ac_cv_func_getipnodebyaddr" -if test "x$ac_cv_func_getipnodebyaddr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETIPNODEBYADDR 1 -_ACEOF - -else - case " $LIBOBJS " in - *" getipnodebyaddr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getipnodebyaddr.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "getipnodebyname" "ac_cv_func_getipnodebyname" -if test "x$ac_cv_func_getipnodebyname" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETIPNODEBYNAME 1 -_ACEOF - -else - case " $LIBOBJS " in - *" getipnodebyname.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getipnodebyname.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" -if test "x$ac_cv_func_getopt" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT 1 -_ACEOF - -else - case " $LIBOBJS " in - *" getopt.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getopt.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETTIMEOFDAY 1 -_ACEOF - -else - case " $LIBOBJS " in - *" gettimeofday.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid" -if test "x$ac_cv_func_getuid" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETUID 1 -_ACEOF - -else - case " $LIBOBJS " in - *" getuid.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getuid.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "getusershell" "ac_cv_func_getusershell" -if test "x$ac_cv_func_getusershell" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_GETUSERSHELL 1 -_ACEOF - -else - case " $LIBOBJS " in - *" getusershell.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getusershell.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups" -if test "x$ac_cv_func_initgroups" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INITGROUPS 1 -_ACEOF - -else - case " $LIBOBJS " in - *" initgroups.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS initgroups.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "innetgr" "ac_cv_func_innetgr" -if test "x$ac_cv_func_innetgr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INNETGR 1 -_ACEOF - -else - case " $LIBOBJS " in - *" innetgr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS innetgr.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "iruserok" "ac_cv_func_iruserok" -if test "x$ac_cv_func_iruserok" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_IRUSEROK 1 -_ACEOF - -else - case " $LIBOBJS " in - *" iruserok.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS iruserok.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r" -if test "x$ac_cv_func_localtime_r" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_LOCALTIME_R 1 -_ACEOF - -else - case " $LIBOBJS " in - *" localtime_r.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS localtime_r.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat" -if test "x$ac_cv_func_lstat" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_LSTAT 1 -_ACEOF - -else - case " $LIBOBJS " in - *" lstat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lstat.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" -if test "x$ac_cv_func_memmove" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_MEMMOVE 1 -_ACEOF - -else - case " $LIBOBJS " in - *" memmove.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memmove.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" -if test "x$ac_cv_func_mkstemp" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_MKSTEMP 1 -_ACEOF - -else - case " $LIBOBJS " in - *" mkstemp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" -if test "x$ac_cv_func_putenv" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_PUTENV 1 -_ACEOF - -else - case " $LIBOBJS " in - *" putenv.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS putenv.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "rcmd" "ac_cv_func_rcmd" -if test "x$ac_cv_func_rcmd" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_RCMD 1 -_ACEOF - -else - case " $LIBOBJS " in - *" rcmd.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS rcmd.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "readv" "ac_cv_func_readv" -if test "x$ac_cv_func_readv" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_READV 1 -_ACEOF - -else - case " $LIBOBJS " in - *" readv.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS readv.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg" -if test "x$ac_cv_func_recvmsg" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_RECVMSG 1 -_ACEOF - -else - case " $LIBOBJS " in - *" recvmsg.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS recvmsg.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "sendmsg" "ac_cv_func_sendmsg" -if test "x$ac_cv_func_sendmsg" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SENDMSG 1 -_ACEOF - -else - case " $LIBOBJS " in - *" sendmsg.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS sendmsg.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid" -if test "x$ac_cv_func_setegid" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SETEGID 1 -_ACEOF - -else - case " $LIBOBJS " in - *" setegid.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS setegid.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" -if test "x$ac_cv_func_setenv" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SETENV 1 -_ACEOF - -else - case " $LIBOBJS " in - *" setenv.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS setenv.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid" -if test "x$ac_cv_func_seteuid" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SETEUID 1 -_ACEOF - -else - case " $LIBOBJS " in - *" seteuid.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS seteuid.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" -if test "x$ac_cv_func_strcasecmp" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRCASECMP 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strcasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" -if test "x$ac_cv_func_strdup" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRDUP 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strdup.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strdup.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" -if test "x$ac_cv_func_strerror" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRERROR 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strerror.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strerror.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" -if test "x$ac_cv_func_strftime" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRFTIME 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strftime.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strftime.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" -if test "x$ac_cv_func_strlcat" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRLCAT 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strlcat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" -if test "x$ac_cv_func_strlcpy" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRLCPY 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strlcpy.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strlwr" "ac_cv_func_strlwr" -if test "x$ac_cv_func_strlwr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRLWR 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strlwr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strlwr.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" -if test "x$ac_cv_func_strncasecmp" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRNCASECMP 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strncasecmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strndup" "ac_cv_func_strndup" -if test "x$ac_cv_func_strndup" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRNDUP 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strndup.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strndup.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" -if test "x$ac_cv_func_strnlen" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRNLEN 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strnlen.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strnlen.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime" -if test "x$ac_cv_func_strptime" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRPTIME 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strptime.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strptime.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep" -if test "x$ac_cv_func_strsep" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRSEP 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strsep.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strsep.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strsep_copy" "ac_cv_func_strsep_copy" -if test "x$ac_cv_func_strsep_copy" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRSEP_COPY 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strsep_copy.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strsep_copy.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" -if test "x$ac_cv_func_strtok_r" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOK_R 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strtok_r.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "strupr" "ac_cv_func_strupr" -if test "x$ac_cv_func_strupr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUPR 1 -_ACEOF - -else - case " $LIBOBJS " in - *" strupr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strupr.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "swab" "ac_cv_func_swab" -if test "x$ac_cv_func_swab" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SWAB 1 -_ACEOF - -else - case " $LIBOBJS " in - *" swab.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS swab.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" -if test "x$ac_cv_func_tsearch" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_TSEARCH 1 -_ACEOF - -else - case " $LIBOBJS " in - *" tsearch.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS tsearch.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm" -if test "x$ac_cv_func_timegm" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_TIMEGM 1 -_ACEOF - -else - case " $LIBOBJS " in - *" timegm.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS timegm.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" -if test "x$ac_cv_func_unsetenv" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_UNSETENV 1 -_ACEOF - -else - case " $LIBOBJS " in - *" unsetenv.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "verr" "ac_cv_func_verr" -if test "x$ac_cv_func_verr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_VERR 1 -_ACEOF - -else - case " $LIBOBJS " in - *" verr.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS verr.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "verrx" "ac_cv_func_verrx" -if test "x$ac_cv_func_verrx" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_VERRX 1 -_ACEOF - -else - case " $LIBOBJS " in - *" verrx.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS verrx.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog" -if test "x$ac_cv_func_vsyslog" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_VSYSLOG 1 -_ACEOF - -else - case " $LIBOBJS " in - *" vsyslog.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS vsyslog.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "vwarn" "ac_cv_func_vwarn" -if test "x$ac_cv_func_vwarn" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_VWARN 1 -_ACEOF - -else - case " $LIBOBJS " in - *" vwarn.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS vwarn.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "vwarnx" "ac_cv_func_vwarnx" -if test "x$ac_cv_func_vwarnx" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_VWARNX 1 -_ACEOF - -else - case " $LIBOBJS " in - *" vwarnx.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS vwarnx.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "warn" "ac_cv_func_warn" -if test "x$ac_cv_func_warn" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_WARN 1 -_ACEOF - -else - case " $LIBOBJS " in - *" warn.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS warn.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "warnx" "ac_cv_func_warnx" -if test "x$ac_cv_func_warnx" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_WARNX 1 -_ACEOF - -else - case " $LIBOBJS " in - *" warnx.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS warnx.$ac_objext" - ;; -esac - -fi -ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev" -if test "x$ac_cv_func_writev" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_WRITEV 1 -_ACEOF - -else - case " $LIBOBJS " in - *" writev.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS writev.$ac_objext" - ;; -esac - -fi - - - if test "$ac_cv_header_fnmatch_h" = yes -a "$ac_cv_func_fnmatch" = yes; then - have_fnmatch_h_TRUE= - have_fnmatch_h_FALSE='#' -else - have_fnmatch_h_TRUE='#' - have_fnmatch_h_FALSE= -fi - - - -if test "$ac_cv_func_strndup+set" != set -o "$ac_cv_func_strndup" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strndup needs a prototype" >&5 -$as_echo_n "checking if strndup needs a prototype... " >&6; } -if test "${ac_cv_func_strndup_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int strndup (struct foo*); -int -main () -{ -strndup(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_strndup_noproto=yes" -else - eval "ac_cv_func_strndup_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strndup_noproto" >&5 -$as_echo "$ac_cv_func_strndup_noproto" >&6; } -if test "$ac_cv_func_strndup_noproto" = yes; then - -$as_echo "#define NEED_STRNDUP_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_strsep+set" != set -o "$ac_cv_func_strsep" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strsep needs a prototype" >&5 -$as_echo_n "checking if strsep needs a prototype... " >&6; } -if test "${ac_cv_func_strsep_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int strsep (struct foo*); -int -main () -{ -strsep(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_strsep_noproto=yes" -else - eval "ac_cv_func_strsep_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strsep_noproto" >&5 -$as_echo "$ac_cv_func_strsep_noproto" >&6; } -if test "$ac_cv_func_strsep_noproto" = yes; then - -$as_echo "#define NEED_STRSEP_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_strtok_r+set" != set -o "$ac_cv_func_strtok_r" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strtok_r needs a prototype" >&5 -$as_echo_n "checking if strtok_r needs a prototype... " >&6; } -if test "${ac_cv_func_strtok_r_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int strtok_r (struct foo*); -int -main () -{ -strtok_r(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_strtok_r_noproto=yes" -else - eval "ac_cv_func_strtok_r_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtok_r_noproto" >&5 -$as_echo "$ac_cv_func_strtok_r_noproto" >&6; } -if test "$ac_cv_func_strtok_r_noproto" = yes; then - -$as_echo "#define NEED_STRTOK_R_PROTO 1" >>confdefs.h - -fi -fi - - - -if test "$ac_cv_func_strsvis+set" != set -o "$ac_cv_func_strsvis" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strsvis needs a prototype" >&5 -$as_echo_n "checking if strsvis needs a prototype... " >&6; } -if test "${ac_cv_func_strsvis_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_VIS_H -#include -#endif -struct foo { int foo; } xx; -extern int strsvis (struct foo*); -int -main () -{ -strsvis(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_strsvis_noproto=yes" -else - eval "ac_cv_func_strsvis_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strsvis_noproto" >&5 -$as_echo "$ac_cv_func_strsvis_noproto" >&6; } -if test "$ac_cv_func_strsvis_noproto" = yes; then - -$as_echo "#define NEED_STRSVIS_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_strsvisx+set" != set -o "$ac_cv_func_strsvisx" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strsvisx needs a prototype" >&5 -$as_echo_n "checking if strsvisx needs a prototype... " >&6; } -if test "${ac_cv_func_strsvisx_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_VIS_H -#include -#endif -struct foo { int foo; } xx; -extern int strsvisx (struct foo*); -int -main () -{ -strsvisx(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_strsvisx_noproto=yes" -else - eval "ac_cv_func_strsvisx_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strsvisx_noproto" >&5 -$as_echo "$ac_cv_func_strsvisx_noproto" >&6; } -if test "$ac_cv_func_strsvisx_noproto" = yes; then - -$as_echo "#define NEED_STRSVISX_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_strunvis+set" != set -o "$ac_cv_func_strunvis" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strunvis needs a prototype" >&5 -$as_echo_n "checking if strunvis needs a prototype... " >&6; } -if test "${ac_cv_func_strunvis_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_VIS_H -#include -#endif -struct foo { int foo; } xx; -extern int strunvis (struct foo*); -int -main () -{ -strunvis(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_strunvis_noproto=yes" -else - eval "ac_cv_func_strunvis_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strunvis_noproto" >&5 -$as_echo "$ac_cv_func_strunvis_noproto" >&6; } -if test "$ac_cv_func_strunvis_noproto" = yes; then - -$as_echo "#define NEED_STRUNVIS_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_strvis+set" != set -o "$ac_cv_func_strvis" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strvis needs a prototype" >&5 -$as_echo_n "checking if strvis needs a prototype... " >&6; } -if test "${ac_cv_func_strvis_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_VIS_H -#include -#endif -struct foo { int foo; } xx; -extern int strvis (struct foo*); -int -main () -{ -strvis(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_strvis_noproto=yes" -else - eval "ac_cv_func_strvis_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strvis_noproto" >&5 -$as_echo "$ac_cv_func_strvis_noproto" >&6; } -if test "$ac_cv_func_strvis_noproto" = yes; then - -$as_echo "#define NEED_STRVIS_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_strvisx+set" != set -o "$ac_cv_func_strvisx" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strvisx needs a prototype" >&5 -$as_echo_n "checking if strvisx needs a prototype... " >&6; } -if test "${ac_cv_func_strvisx_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_VIS_H -#include -#endif -struct foo { int foo; } xx; -extern int strvisx (struct foo*); -int -main () -{ -strvisx(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_strvisx_noproto=yes" -else - eval "ac_cv_func_strvisx_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strvisx_noproto" >&5 -$as_echo "$ac_cv_func_strvisx_noproto" >&6; } -if test "$ac_cv_func_strvisx_noproto" = yes; then - -$as_echo "#define NEED_STRVISX_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_svis+set" != set -o "$ac_cv_func_svis" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if svis needs a prototype" >&5 -$as_echo_n "checking if svis needs a prototype... " >&6; } -if test "${ac_cv_func_svis_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_VIS_H -#include -#endif -struct foo { int foo; } xx; -extern int svis (struct foo*); -int -main () -{ -svis(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_svis_noproto=yes" -else - eval "ac_cv_func_svis_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_svis_noproto" >&5 -$as_echo "$ac_cv_func_svis_noproto" >&6; } -if test "$ac_cv_func_svis_noproto" = yes; then - -$as_echo "#define NEED_SVIS_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_unvis+set" != set -o "$ac_cv_func_unvis" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unvis needs a prototype" >&5 -$as_echo_n "checking if unvis needs a prototype... " >&6; } -if test "${ac_cv_func_unvis_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_VIS_H -#include -#endif -struct foo { int foo; } xx; -extern int unvis (struct foo*); -int -main () -{ -unvis(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_unvis_noproto=yes" -else - eval "ac_cv_func_unvis_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_unvis_noproto" >&5 -$as_echo "$ac_cv_func_unvis_noproto" >&6; } -if test "$ac_cv_func_unvis_noproto" = yes; then - -$as_echo "#define NEED_UNVIS_PROTO 1" >>confdefs.h - -fi -fi - -if test "$ac_cv_func_vis+set" != set -o "$ac_cv_func_vis" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if vis needs a prototype" >&5 -$as_echo_n "checking if vis needs a prototype... " >&6; } -if test "${ac_cv_func_vis_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_VIS_H -#include -#endif -struct foo { int foo; } xx; -extern int vis (struct foo*); -int -main () -{ -vis(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_vis_noproto=yes" -else - eval "ac_cv_func_vis_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vis_noproto" >&5 -$as_echo "$ac_cv_func_vis_noproto" >&6; } -if test "$ac_cv_func_vis_noproto" = yes; then - -$as_echo "#define NEED_VIS_PROTO 1" >>confdefs.h - -fi -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for dirfd" >&5 -$as_echo_n "checking checking for dirfd... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef HAVE_DIRENT_H -#include -#endif - -int -main () -{ -DIR *d = 0; dirfd(d); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_rk_have_dirfd=yes -else - ac_rk_have_dirfd=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_rk_have_dirfd" = "yes" ; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DIRFD 1 -_ACEOF - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_rk_have_dirfd" >&5 -$as_echo "$ac_rk_have_dirfd" >&6; } - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dd_fd in DIR" >&5 -$as_echo_n "checking for dd_fd in DIR... " >&6; } -if test "${ac_cv_type_dir_dd_fd+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef HAVE_DIRENT_H -#include -#endif -int -main () -{ -DIR x; memset(&x, 0, sizeof(x)); x.dd_fd - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_dir_dd_fd=yes -else - ac_cv_type_dir_dd_fd=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_dir_dd_fd" >&5 -$as_echo "$ac_cv_type_dir_dd_fd" >&6; } -if test "$ac_cv_type_dir_dd_fd" = yes; then - - -$as_echo "#define HAVE_DIR_DD_FD 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 -$as_echo_n "checking for inet_aton... " >&6; } -if test "${ac_cv_func_inet_aton+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -int -main () -{ - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_inet_aton) || defined (__stub___inet_aton) -choke me -#else -inet_aton(0,0); -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "ac_cv_func_inet_aton=yes" -else - eval "ac_cv_func_inet_aton=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -if eval "test \"\${ac_cv_func_inet_aton}\" = yes"; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_INET_ATON 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - case " $LIBOBJS " in - *" inet_aton.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext" - ;; -esac - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop" >&5 -$as_echo_n "checking for inet_ntop... " >&6; } -if test "${ac_cv_func_inet_ntop+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -int -main () -{ - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_inet_ntop) || defined (__stub___inet_ntop) -choke me -#else -inet_ntop(0, 0, 0, 0); -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "ac_cv_func_inet_ntop=yes" -else - eval "ac_cv_func_inet_ntop=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -if eval "test \"\${ac_cv_func_inet_ntop}\" = yes"; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_INET_NTOP 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - case " $LIBOBJS " in - *" inet_ntop.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext" - ;; -esac - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5 -$as_echo_n "checking for inet_pton... " >&6; } -if test "${ac_cv_func_inet_pton+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -int -main () -{ - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_inet_pton) || defined (__stub___inet_pton) -choke me -#else -inet_pton(0,0,0); -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "ac_cv_func_inet_pton=yes" -else - eval "ac_cv_func_inet_pton=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -if eval "test \"\${ac_cv_func_inet_pton}\" = yes"; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_INET_PTON 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - case " $LIBOBJS " in - *" inet_pton.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext" - ;; -esac - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_len in struct sockaddr" >&5 -$as_echo_n "checking for sa_len in struct sockaddr... " >&6; } -if test "${ac_cv_type_struct_sockaddr_sa_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -int -main () -{ -struct sockaddr x; memset(&x, 0, sizeof(x)); x.sa_len - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_sockaddr_sa_len=yes -else - ac_cv_type_struct_sockaddr_sa_len=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_sockaddr_sa_len" >&5 -$as_echo "$ac_cv_type_struct_sockaddr_sa_len" >&6; } -if test "$ac_cv_type_struct_sockaddr_sa_len" = yes; then - - -$as_echo "#define HAVE_STRUCT_SOCKADDR_SA_LEN 1" >>confdefs.h - - -fi - - - -if test "$ac_cv_func_getaddrinfo" = "yes"; then - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo handles numeric services" >&5 -$as_echo_n "checking if getaddrinfo handles numeric services... " >&6; } -if test "${ac_cv_func_getaddrinfo_numserv+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_getaddrinfo_numserv=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main(int argc, char **argv) -{ - struct addrinfo hints, *ai; - memset(&hints, 0, sizeof(hints)); - hints.ai_flags = AI_PASSIVE; - hints.ai_socktype = SOCK_STREAM; - hints.ai_family = PF_UNSPEC; - if(getaddrinfo(NULL, "17", &hints, &ai) != 0) - return 1; - if(getaddrinfo(NULL, "0", &hints, &ai) != 0) - return 1; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_getaddrinfo_numserv=yes -else - ac_cv_func_getaddrinfo_numserv=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo_numserv" >&5 -$as_echo "$ac_cv_func_getaddrinfo_numserv" >&6; } - if test "$ac_cv_func_getaddrinfo_numserv" = no; then - case " $LIBOBJS " in - *" getaddrinfo.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" - ;; -esac - - case " $LIBOBJS " in - *" freeaddrinfo.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS freeaddrinfo.$ac_objext" - ;; -esac - - fi -fi - - -if test "$ac_cv_func_setenv+set" != set -o "$ac_cv_func_setenv" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setenv needs a prototype" >&5 -$as_echo_n "checking if setenv needs a prototype... " >&6; } -if test "${ac_cv_func_setenv_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int setenv (struct foo*); -int -main () -{ -setenv(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_setenv_noproto=yes" -else - eval "ac_cv_func_setenv_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setenv_noproto" >&5 -$as_echo "$ac_cv_func_setenv_noproto" >&6; } -if test "$ac_cv_func_setenv_noproto" = yes; then - -$as_echo "#define NEED_SETENV_PROTO 1" >>confdefs.h - -fi -fi - - -if test "$ac_cv_func_unsetenv+set" != set -o "$ac_cv_func_unsetenv" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unsetenv needs a prototype" >&5 -$as_echo_n "checking if unsetenv needs a prototype... " >&6; } -if test "${ac_cv_func_unsetenv_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int unsetenv (struct foo*); -int -main () -{ -unsetenv(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_unsetenv_noproto=yes" -else - eval "ac_cv_func_unsetenv_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_unsetenv_noproto" >&5 -$as_echo "$ac_cv_func_unsetenv_noproto" >&6; } -if test "$ac_cv_func_unsetenv_noproto" = yes; then - -$as_echo "#define NEED_UNSETENV_PROTO 1" >>confdefs.h - -fi -fi - - -if test "$ac_cv_func_gethostname+set" != set -o "$ac_cv_func_gethostname" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostname needs a prototype" >&5 -$as_echo_n "checking if gethostname needs a prototype... " >&6; } -if test "${ac_cv_func_gethostname_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int gethostname (struct foo*); -int -main () -{ -gethostname(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_gethostname_noproto=yes" -else - eval "ac_cv_func_gethostname_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostname_noproto" >&5 -$as_echo "$ac_cv_func_gethostname_noproto" >&6; } -if test "$ac_cv_func_gethostname_noproto" = yes; then - -$as_echo "#define NEED_GETHOSTNAME_PROTO 1" >>confdefs.h - -fi -fi - - -if test "$ac_cv_func_mkstemp+set" != set -o "$ac_cv_func_mkstemp" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if mkstemp needs a prototype" >&5 -$as_echo_n "checking if mkstemp needs a prototype... " >&6; } -if test "${ac_cv_func_mkstemp_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int mkstemp (struct foo*); -int -main () -{ -mkstemp(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_mkstemp_noproto=yes" -else - eval "ac_cv_func_mkstemp_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mkstemp_noproto" >&5 -$as_echo "$ac_cv_func_mkstemp_noproto" >&6; } -if test "$ac_cv_func_mkstemp_noproto" = yes; then - -$as_echo "#define NEED_MKSTEMP_PROTO 1" >>confdefs.h - -fi -fi - - -if test "$ac_cv_func_getusershell+set" != set -o "$ac_cv_func_getusershell" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getusershell needs a prototype" >&5 -$as_echo_n "checking if getusershell needs a prototype... " >&6; } -if test "${ac_cv_func_getusershell_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int getusershell (struct foo*); -int -main () -{ -getusershell(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_getusershell_noproto=yes" -else - eval "ac_cv_func_getusershell_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getusershell_noproto" >&5 -$as_echo "$ac_cv_func_getusershell_noproto" >&6; } -if test "$ac_cv_func_getusershell_noproto" = yes; then - -$as_echo "#define NEED_GETUSERSHELL_PROTO 1" >>confdefs.h - -fi -fi - - -if test "$ac_cv_func_daemon+set" != set -o "$ac_cv_func_daemon" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if daemon needs a prototype" >&5 -$as_echo_n "checking if daemon needs a prototype... " >&6; } -if test "${ac_cv_func_daemon_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int daemon (struct foo*); -int -main () -{ -daemon(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_daemon_noproto=yes" -else - eval "ac_cv_func_daemon_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_daemon_noproto" >&5 -$as_echo "$ac_cv_func_daemon_noproto" >&6; } -if test "$ac_cv_func_daemon_noproto" = yes; then - -$as_echo "#define NEED_DAEMON_PROTO 1" >>confdefs.h - -fi -fi - - -if test "$ac_cv_func_iruserok+set" != set -o "$ac_cv_func_iruserok" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if iruserok needs a prototype" >&5 -$as_echo_n "checking if iruserok needs a prototype... " >&6; } -if test "${ac_cv_func_iruserok_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -struct foo { int foo; } xx; -extern int iruserok (struct foo*); -int -main () -{ -iruserok(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_iruserok_noproto=yes" -else - eval "ac_cv_func_iruserok_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_iruserok_noproto" >&5 -$as_echo "$ac_cv_func_iruserok_noproto" >&6; } -if test "$ac_cv_func_iruserok_noproto" = yes; then - -$as_echo "#define NEED_IRUSEROK_PROTO 1" >>confdefs.h - -fi -fi - - - -if test "$ac_cv_func_inet_aton+set" != set -o "$ac_cv_func_inet_aton" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if inet_aton needs a prototype" >&5 -$as_echo_n "checking if inet_aton needs a prototype... " >&6; } -if test "${ac_cv_func_inet_aton_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -struct foo { int foo; } xx; -extern int inet_aton (struct foo*); -int -main () -{ -inet_aton(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_inet_aton_noproto=yes" -else - eval "ac_cv_func_inet_aton_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_aton_noproto" >&5 -$as_echo "$ac_cv_func_inet_aton_noproto" >&6; } -if test "$ac_cv_func_inet_aton_noproto" = yes; then - -$as_echo "#define NEED_INET_ATON_PROTO 1" >>confdefs.h - -fi -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt" >&5 -$as_echo_n "checking for crypt... " >&6; } -if test "${ac_cv_funclib_crypt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_crypt\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" crypt; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -crypt() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_crypt=$ac_lib; else ac_cv_funclib_crypt=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_crypt=\${ac_cv_funclib_crypt-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_crypt" - -if false; then - for ac_func in crypt -do : - ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" -if test "x$ac_cv_func_crypt" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CRYPT 1 -_ACEOF - -fi -done - -fi -# crypt -eval "ac_tr_func=HAVE_`echo crypt | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_crypt=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_crypt=yes" - eval "LIB_crypt=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_crypt=no" - eval "LIB_crypt=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_crypt=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strerror_r is compatible with system prototype" >&5 -$as_echo_n "checking if strerror_r is compatible with system prototype... " >&6; } -if test "${ac_cv_func_strerror_r_proto_compat+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main () -{ -int strerror_r(int, char *, size_t) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_strerror_r_proto_compat=yes" -else - eval "ac_cv_func_strerror_r_proto_compat=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_proto_compat" >&5 -$as_echo "$ac_cv_func_strerror_r_proto_compat" >&6; } - -if test "$ac_cv_func_strerror_r_proto_compat" = yes; then - -$as_echo "#define STRERROR_R_PROTO_COMPATIBLE 1" >>confdefs.h - -fi - - - -ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" -if test "x$ac_cv_func_strerror_r" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRERROR_R 1 -_ACEOF - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyname is compatible with system prototype" >&5 -$as_echo_n "checking if gethostbyname is compatible with system prototype... " >&6; } -if test "${ac_cv_func_gethostbyname_proto_compat+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif - -int -main () -{ -struct hostent *gethostbyname(const char *) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_gethostbyname_proto_compat=yes" -else - eval "ac_cv_func_gethostbyname_proto_compat=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostbyname_proto_compat" >&5 -$as_echo "$ac_cv_func_gethostbyname_proto_compat" >&6; } - -if test "$ac_cv_func_gethostbyname_proto_compat" = yes; then - -$as_echo "#define GETHOSTBYNAME_PROTO_COMPATIBLE 1" >>confdefs.h - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethostbyaddr is compatible with system prototype" >&5 -$as_echo_n "checking if gethostbyaddr is compatible with system prototype... " >&6; } -if test "${ac_cv_func_gethostbyaddr_proto_compat+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif - -int -main () -{ -struct hostent *gethostbyaddr(const void *, size_t, int) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_gethostbyaddr_proto_compat=yes" -else - eval "ac_cv_func_gethostbyaddr_proto_compat=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostbyaddr_proto_compat" >&5 -$as_echo "$ac_cv_func_gethostbyaddr_proto_compat" >&6; } - -if test "$ac_cv_func_gethostbyaddr_proto_compat" = yes; then - -$as_echo "#define GETHOSTBYADDR_PROTO_COMPATIBLE 1" >>confdefs.h - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getservbyname is compatible with system prototype" >&5 -$as_echo_n "checking if getservbyname is compatible with system prototype... " >&6; } -if test "${ac_cv_func_getservbyname_proto_compat+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif - -int -main () -{ -struct servent *getservbyname(const char *, const char *) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_getservbyname_proto_compat=yes" -else - eval "ac_cv_func_getservbyname_proto_compat=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getservbyname_proto_compat" >&5 -$as_echo "$ac_cv_func_getservbyname_proto_compat" >&6; } - -if test "$ac_cv_func_getservbyname_proto_compat" = yes; then - -$as_echo "#define GETSERVBYNAME_PROTO_COMPATIBLE 1" >>confdefs.h - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if getsockname is compatible with system prototype" >&5 -$as_echo_n "checking if getsockname is compatible with system prototype... " >&6; } -if test "${ac_cv_func_getsockname_proto_compat+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -int -main () -{ -int getsockname(int, struct sockaddr*, socklen_t*) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_getsockname_proto_compat=yes" -else - eval "ac_cv_func_getsockname_proto_compat=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getsockname_proto_compat" >&5 -$as_echo "$ac_cv_func_getsockname_proto_compat" >&6; } - -if test "$ac_cv_func_getsockname_proto_compat" = yes; then - -$as_echo "#define GETSOCKNAME_PROTO_COMPATIBLE 1" >>confdefs.h - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if openlog is compatible with system prototype" >&5 -$as_echo_n "checking if openlog is compatible with system prototype... " >&6; } -if test "${ac_cv_func_openlog_proto_compat+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_SYSLOG_H -#include -#endif - -int -main () -{ -void openlog(const char *, int, int) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_openlog_proto_compat=yes" -else - eval "ac_cv_func_openlog_proto_compat=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_openlog_proto_compat" >&5 -$as_echo "$ac_cv_func_openlog_proto_compat" >&6; } - -if test "$ac_cv_func_openlog_proto_compat" = yes; then - -$as_echo "#define OPENLOG_PROTO_COMPATIBLE 1" >>confdefs.h - -fi - - - - -if test "$ac_cv_func_crypt+set" != set -o "$ac_cv_func_crypt" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if crypt needs a prototype" >&5 -$as_echo_n "checking if crypt needs a prototype... " >&6; } -if test "${ac_cv_func_crypt_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_CRYPT_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -struct foo { int foo; } xx; -extern int crypt (struct foo*); -int -main () -{ -crypt(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_crypt_noproto=yes" -else - eval "ac_cv_func_crypt_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_crypt_noproto" >&5 -$as_echo "$ac_cv_func_crypt_noproto" >&6; } -if test "$ac_cv_func_crypt_noproto" = yes; then - -$as_echo "#define NEED_CRYPT_PROTO 1" >>confdefs.h - -fi -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for h_errno" >&5 -$as_echo_n "checking for h_errno... " >&6; } -if test "${ac_cv_var_h_errno+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif - - void * foo(void) { return &h_errno; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_h_errno=yes -else - ac_cv_var_h_errno=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_var_h_errno" != yes ; then -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -extern int h_errno; -int foo(void) { return h_errno; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_h_errno=yes -else - ac_cv_var_h_errno=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -fi - -ac_foo=`eval echo \\$ac_cv_var_h_errno` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_H_ERRNO 1 -_ACEOF - - ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -" -if test "x$ac_cv_have_decl_h_errno" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_H_ERRNO $ac_have_decl -_ACEOF - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for h_errlist" >&5 -$as_echo_n "checking for h_errlist... " >&6; } -if test "${ac_cv_var_h_errlist+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif - void * foo(void) { return &h_errlist; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_h_errlist=yes -else - ac_cv_var_h_errlist=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_var_h_errlist" != yes ; then -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -extern int h_errlist; -int foo(void) { return h_errlist; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_h_errlist=yes -else - ac_cv_var_h_errlist=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -fi - -ac_foo=`eval echo \\$ac_cv_var_h_errlist` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_H_ERRLIST 1 -_ACEOF - - ac_fn_c_check_decl "$LINENO" "h_errlist" "ac_cv_have_decl_h_errlist" "#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -" -if test "x$ac_cv_have_decl_h_errlist" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_H_ERRLIST $ac_have_decl -_ACEOF - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for h_nerr" >&5 -$as_echo_n "checking for h_nerr... " >&6; } -if test "${ac_cv_var_h_nerr+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif - void * foo(void) { return &h_nerr; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_h_nerr=yes -else - ac_cv_var_h_nerr=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_var_h_nerr" != yes ; then -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -extern int h_nerr; -int foo(void) { return h_nerr; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_h_nerr=yes -else - ac_cv_var_h_nerr=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -fi - -ac_foo=`eval echo \\$ac_cv_var_h_nerr` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_H_NERR 1 -_ACEOF - - ac_fn_c_check_decl "$LINENO" "h_nerr" "ac_cv_have_decl_h_nerr" "#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -" -if test "x$ac_cv_have_decl_h_nerr" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_H_NERR $ac_have_decl -_ACEOF - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __progname" >&5 -$as_echo_n "checking for __progname... " >&6; } -if test "${ac_cv_var___progname+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_ERR_H -#include -#endif - void * foo(void) { return &__progname; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var___progname=yes -else - ac_cv_var___progname=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_var___progname" != yes ; then -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_ERR_H -#include -#endif -extern int __progname; -int foo(void) { return __progname; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var___progname=yes -else - ac_cv_var___progname=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -fi - -ac_foo=`eval echo \\$ac_cv_var___progname` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE___PROGNAME 1 -_ACEOF - - ac_fn_c_check_decl "$LINENO" "__progname" "ac_cv_have_decl___progname" "#ifdef HAVE_ERR_H -#include -#endif -" -if test "x$ac_cv_have_decl___progname" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL___PROGNAME $ac_have_decl -_ACEOF - -fi - - -ac_fn_c_check_decl "$LINENO" "optarg" "ac_cv_have_decl_optarg" " -#include -#ifdef HAVE_UNISTD_H -#include -#endif -" -if test "x$ac_cv_have_decl_optarg" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_OPTARG $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "optind" "ac_cv_have_decl_optind" " -#include -#ifdef HAVE_UNISTD_H -#include -#endif -" -if test "x$ac_cv_have_decl_optind" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_OPTIND $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "opterr" "ac_cv_have_decl_opterr" " -#include -#ifdef HAVE_UNISTD_H -#include -#endif -" -if test "x$ac_cv_have_decl_opterr" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_OPTERR $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "optopt" "ac_cv_have_decl_optopt" " -#include -#ifdef HAVE_UNISTD_H -#include -#endif -" -if test "x$ac_cv_have_decl_optopt" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_OPTOPT $ac_have_decl -_ACEOF -ac_fn_c_check_decl "$LINENO" "environ" "ac_cv_have_decl_environ" " -#include -#ifdef HAVE_UNISTD_H -#include -#endif -" -if test "x$ac_cv_have_decl_environ" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ENVIRON $ac_have_decl -_ACEOF - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_gmtoff in struct tm" >&5 -$as_echo_n "checking for tm_gmtoff in struct tm... " >&6; } -if test "${ac_cv_type_struct_tm_tm_gmtoff+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct tm x; memset(&x, 0, sizeof(x)); x.tm_gmtoff - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_tm_tm_gmtoff=yes -else - ac_cv_type_struct_tm_tm_gmtoff=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_tm_tm_gmtoff" >&5 -$as_echo "$ac_cv_type_struct_tm_tm_gmtoff" >&6; } -if test "$ac_cv_type_struct_tm_tm_gmtoff" = yes; then - - -$as_echo "#define HAVE_STRUCT_TM_TM_GMTOFF 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tm_zone in struct tm" >&5 -$as_echo_n "checking for tm_zone in struct tm... " >&6; } -if test "${ac_cv_type_struct_tm_tm_zone+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct tm x; memset(&x, 0, sizeof(x)); x.tm_zone - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_tm_tm_zone=yes -else - ac_cv_type_struct_tm_tm_zone=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_tm_tm_zone" >&5 -$as_echo "$ac_cv_type_struct_tm_tm_zone" >&6; } -if test "$ac_cv_type_struct_tm_tm_zone" = yes; then - - -$as_echo "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h - - -fi - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timezone" >&5 -$as_echo_n "checking for timezone... " >&6; } -if test "${ac_cv_var_timezone+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - void * foo(void) { return &timezone; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_timezone=yes -else - ac_cv_var_timezone=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_var_timezone" != yes ; then -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -extern int timezone; -int foo(void) { return timezone; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_timezone=yes -else - ac_cv_var_timezone=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -fi - -ac_foo=`eval echo \\$ac_cv_var_timezone` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_TIMEZONE 1 -_ACEOF - - ac_fn_c_check_decl "$LINENO" "timezone" "ac_cv_have_decl_timezone" "#include -" -if test "x$ac_cv_have_decl_timezone" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TIMEZONE $ac_have_decl -_ACEOF - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for altzone" >&5 -$as_echo_n "checking for altzone... " >&6; } -if test "${ac_cv_var_altzone+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - void * foo(void) { return &altzone; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_altzone=yes -else - ac_cv_var_altzone=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_var_altzone" != yes ; then -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -extern int altzone; -int foo(void) { return altzone; } -int -main () -{ -foo() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_var_altzone=yes -else - ac_cv_var_altzone=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi - -fi - -ac_foo=`eval echo \\$ac_cv_var_altzone` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_ALTZONE 1 -_ACEOF - - ac_fn_c_check_decl "$LINENO" "altzone" "ac_cv_have_decl_altzone" "#include -" -if test "x$ac_cv_have_decl_altzone" = x""yes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ALTZONE $ac_have_decl -_ACEOF - -fi - - - - -cv=`echo "sa_family_t" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5 -$as_echo_n "checking for sa_family_t... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif - -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -int -main () -{ -sa_family_t foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo sa_family_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "$ac_includes_default" -if test "x$ac_cv_type_sa_family_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SA_FAMILY_T 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - - -cv=`echo "socklen_t" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 -$as_echo_n "checking for socklen_t... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif - -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -int -main () -{ -socklen_t foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo socklen_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default" -if test "x$ac_cv_type_socklen_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SOCKLEN_T 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - - -cv=`echo "struct sockaddr" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr" >&5 -$as_echo_n "checking for struct sockaddr... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif - -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -int -main () -{ -struct sockaddr foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo struct sockaddr | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "struct sockaddr" "ac_cv_type_struct_sockaddr" "$ac_includes_default" -if test "x$ac_cv_type_struct_sockaddr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - - -cv=`echo "struct sockaddr_storage" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5 -$as_echo_n "checking for struct sockaddr_storage... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif - -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -int -main () -{ -struct sockaddr_storage foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo struct sockaddr_storage | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "$ac_includes_default" -if test "x$ac_cv_type_struct_sockaddr_storage" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - - -cv=`echo "struct addrinfo" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5 -$as_echo_n "checking for struct addrinfo... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif - -#include -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -int -main () -{ -struct addrinfo foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo struct addrinfo | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "$ac_includes_default" -if test "x$ac_cv_type_struct_addrinfo" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_ADDRINFO 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - - -cv=`echo "struct ifaddrs" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ifaddrs" >&5 -$as_echo_n "checking for struct ifaddrs... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif -#include -int -main () -{ -struct ifaddrs foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo struct ifaddrs | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "struct ifaddrs" "ac_cv_type_struct_ifaddrs" "$ac_includes_default" -if test "x$ac_cv_type_struct_ifaddrs" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IFADDRS 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - - -cv=`echo "struct iovec" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct iovec" >&5 -$as_echo_n "checking for struct iovec... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif - -#include -#include - -int -main () -{ -struct iovec foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo struct iovec | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "struct iovec" "ac_cv_type_struct_iovec" "$ac_includes_default" -if test "x$ac_cv_type_struct_iovec" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_IOVEC 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - - -cv=`echo "struct msghdr" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct msghdr" >&5 -$as_echo_n "checking for struct msghdr... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif - -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif -int -main () -{ -struct msghdr foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo struct msghdr | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "struct msghdr" "ac_cv_type_struct_msghdr" "$ac_includes_default" -if test "x$ac_cv_type_struct_msghdr" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_MSGHDR 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct winsize" >&5 -$as_echo_n "checking for struct winsize... " >&6; } -if test "${ac_cv_struct_winsize+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -ac_cv_struct_winsize=no -for i in sys/termios.h sys/ioctl.h; do -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$i> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "struct[ ]*winsize" >/dev/null 2>&1; then : - ac_cv_struct_winsize=yes; break -fi -rm -f conftest* -done - -fi - -if test "$ac_cv_struct_winsize" = "yes"; then - -$as_echo "#define HAVE_STRUCT_WINSIZE 1" >>confdefs.h - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_winsize" >&5 -$as_echo "$ac_cv_struct_winsize" >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "ws_xpixel" >/dev/null 2>&1; then : - -$as_echo "#define HAVE_WS_XPIXEL 1" >>confdefs.h - -fi -rm -f conftest* - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "ws_ypixel" >/dev/null 2>&1; then : - -$as_echo "#define HAVE_WS_YPIXEL 1" >>confdefs.h - -fi -rm -f conftest* - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct spwd" >&5 -$as_echo_n "checking for struct spwd... " >&6; } -if test "${ac_cv_struct_spwd+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef HAVE_SHADOW_H -#include -#endif -int -main () -{ -struct spwd foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_spwd=yes -else - ac_cv_struct_spwd=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_spwd" >&5 -$as_echo "$ac_cv_struct_spwd" >&6; } - -if test "$ac_cv_struct_spwd" = "yes"; then - -$as_echo "#define HAVE_STRUCT_SPWD 1" >>confdefs.h - -fi - - -# -# Check if we want samba's socket wrapper -# - - - -# Check whether --enable-socket-wrapper was given. -if test "${enable_socket_wrapper+set}" = set; then : - enableval=$enable_socket_wrapper; -fi - - - if test "x$enable_socket_wrapper" = xyes; then - have_socket_wrapper_TRUE= - have_socket_wrapper_FALSE='#' -else - have_socket_wrapper_TRUE='#' - have_socket_wrapper_FALSE= -fi - -if test "x$enable_socket_wrapper" = xyes ; then - -$as_echo "#define SOCKET_WRAPPER_REPLACE 1" >>confdefs.h - -fi - - - - -LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)" - - -LIBADD_roken="$LIB_roken" -LIB_roken="\$(top_builddir)/lib/vers/libvers.la $LIB_roken" - - -# Check whether --enable-otp was given. -if test "${enable_otp+set}" = set; then : - enableval=$enable_otp; -fi - -if test "$enable_otp" = yes -a "$db_type" = unknown; then - as_fn_error "OTP requires a NDBM/DB compatible library" "$LINENO" 5 -fi -if test "$enable_otp" != no; then - if test "$db_type" != unknown; then - enable_otp=yes - else - enable_otp=no - fi -fi -if test "$enable_otp" = yes; then - -$as_echo "#define OTP 1" >>confdefs.h - - LIB_otp='$(top_builddir)/lib/otp/libotp.la' - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable OTP library" >&5 -$as_echo_n "checking whether to enable OTP library... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_otp" >&5 -$as_echo "$enable_otp" >&6; } - if test "$enable_otp" = yes; then - OTP_TRUE= - OTP_FALSE='#' -else - OTP_TRUE='#' - OTP_FALSE= -fi - - - - -for ac_header in dispatch/dispatch.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default" -if test "x$ac_cv_header_dispatch_dispatch_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DISPATCH_DISPATCH_H 1 -_ACEOF - -fi - -done - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dispatch_async_f" >&5 -$as_echo_n "checking for dispatch_async_f... " >&6; } -if test "${ac_cv_funclib_dispatch_async_f+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_dispatch_async_f\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" dispatch; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef HAVE_DISPATCH_DISPATCH_H -#include -#endif -int -main () -{ -dispatch_async_f(0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_dispatch_async_f=$ac_lib; else ac_cv_funclib_dispatch_async_f=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_dispatch_async_f=\${ac_cv_funclib_dispatch_async_f-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_dispatch_async_f" - -if false; then - for ac_func in dispatch_async_f -do : - ac_fn_c_check_func "$LINENO" "dispatch_async_f" "ac_cv_func_dispatch_async_f" -if test "x$ac_cv_func_dispatch_async_f" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DISPATCH_ASYNC_F 1 -_ACEOF - -fi -done - -fi -# dispatch_async_f -eval "ac_tr_func=HAVE_`echo dispatch_async_f | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_dispatch_async_f=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_dispatch_async_f=yes" - eval "LIB_dispatch_async_f=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_dispatch_async_f=no" - eval "LIB_dispatch_async_f=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_dispatch_async_f=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - -if test "$ac_cv_func_dispatch_async_f" = yes ; then - -$as_echo "#define HAVE_GCD 1" >>confdefs.h - - libdispatch=yes -else - libdispatch=no -fi - - if test "$libdispatch" = yes; then - have_gcd_TRUE= - have_gcd_FALSE='#' -else - have_gcd_TRUE='#' - have_gcd_FALSE= -fi - - - - - -# Check whether --enable-osfc2 was given. -if test "${enable_osfc2+set}" = set; then : - enableval=$enable_osfc2; -fi - -LIB_security= -if test "$enable_osfc2" = yes; then - -$as_echo "#define HAVE_OSFC2 1" >>confdefs.h - - LIB_security=-lsecurity -fi - - - -# Check whether --enable-mmap was given. -if test "${enable_mmap+set}" = set; then : - enableval=$enable_mmap; -fi - -if test "$enable_mmap" = "no"; then - -$as_echo "#define NO_MMAP 1" >>confdefs.h - -fi - -# Check whether --enable-afs-string-to-key was given. -if test "${enable_afs_string_to_key+set}" = set; then : - enableval=$enable_afs_string_to_key; -else - enable_afs_string_to_key=yes -fi - - -if test "$enable_afs_string_to_key" = "yes"; then - -$as_echo "#define ENABLE_AFS_STRING_TO_KEY 1" >>confdefs.h - -fi - - -# Extract the first word of "nroff", so it can be a program name with args. -set dummy nroff; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_NROFF+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $NROFF in - [\\/]* | ?:[\\/]*) - ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -NROFF=$ac_cv_path_NROFF -if test -n "$NROFF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5 -$as_echo "$NROFF" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "groff", so it can be a program name with args. -set dummy groff; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GROFF+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $GROFF in - [\\/]* | ?:[\\/]*) - ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -GROFF=$ac_cv_path_GROFF -if test -n "$GROFF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5 -$as_echo "$GROFF" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to format man pages" >&5 -$as_echo_n "checking how to format man pages... " >&6; } -if test "${ac_cv_sys_man_format+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - 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 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_man_format" >&5 -$as_echo "$ac_cv_sys_man_format" >&6; } -if test "$ac_cv_sys_man_format"; then - CATMAN="$ac_cv_sys_man_format" - -fi - if test "$CATMAN"; then - CATMAN_TRUE= - CATMAN_FALSE='#' -else - CATMAN_TRUE='#' - CATMAN_FALSE= -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking extension of pre-formatted manual pages" >&5 -$as_echo_n "checking extension of pre-formatted manual pages... " >&6; } -if test "${ac_cv_sys_catman_ext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - 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 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_catman_ext" >&5 -$as_echo "$ac_cv_sys_catman_ext" >&6; } -if test "$ac_cv_sys_catman_ext" = number; then - CATMANEXT='$$section' -else - CATMANEXT=0 -fi - - - - - -# Check whether --with-readline was given. -if test "${with_readline+set}" = set; then : - withval=$with_readline; -fi - - -# Check whether --with-readline-lib was given. -if test "${with_readline_lib+set}" = set; then : - withval=$with_readline_lib; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-readline-lib" "$LINENO" 5 -elif test "X$with_readline" = "X"; then - with_readline=yes -fi -fi - - -# Check whether --with-readline-include was given. -if test "${with_readline_include+set}" = set; then : - withval=$with_readline_include; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-readline-include" "$LINENO" 5 -elif test "X$with_readline" = "X"; then - with_readline=yes -fi -fi - - -# Check whether --with-readline-config was given. -if test "${with_readline_config+set}" = set; then : - withval=$with_readline_config; -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline" >&5 -$as_echo_n "checking for readline... " >&6; } - -case "$with_readline" in -yes|"") d='' ;; -no) d= ;; -*) d="$with_readline" ;; -esac - -header_dirs= -lib_dirs= -for i in $d; do - if test "$with_readline_include" = ""; then - if test -d "$i/include/readline"; then - header_dirs="$header_dirs $i/include/readline" - fi - if test -d "$i/include"; then - header_dirs="$header_dirs $i/include" - fi - fi - if test "$with_readline_lib" = ""; then - if test -d "$i/lib$abilibdirext"; then - lib_dirs="$lib_dirs $i/lib$abilibdirext" - fi - fi -done - -if test "$with_readline_include"; then - header_dirs="$with_readline_include $header_dirs" -fi -if test "$with_readline_lib"; then - lib_dirs="$with_readline_lib $lib_dirs" -fi - -if test "$with_readline_config" = ""; then - with_readline_config='' -fi - -readline_cflags= -readline_libs= - -case "$with_readline_config" in -yes|no|""|"") - if test -f $with_readline/bin/ ; then - with_readline_config=$with_readline/bin/ - fi - ;; -esac - -case "$with_readline_config" in -yes|no|"") - ;; -*) - readline_cflags="`$with_readline_config --cflags 2>&1`" - readline_libs="`$with_readline_config --libs 2>&1`" - ;; -esac - -found=no -if test "$with_readline" != no; then - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - if test "$readline_cflags" -a "$readline_libs"; then - CFLAGS="$readline_cflags $save_CFLAGS" - LIBS="$readline_libs $save_LIBS" - for ac_header in readline.h readline/readline.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if defined(HAVE_READLINE_READLINE_H) -#include -#elif defined(HAVE_READLINE_H) -#include -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - INCLUDE_readline="$readline_cflags" - LIB_readline="$readline_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: from $with_readline_config" >&5 -$as_echo "from $with_readline_config" >&6; } - found=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test "$found" = no; then - ires= lres= - for i in $header_dirs; do - CFLAGS="-I$i $save_CFLAGS" - for ac_header in readline.h readline/readline.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if defined(HAVE_READLINE_READLINE_H) -#include -#elif defined(HAVE_READLINE_H) -#include -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ires=$i;break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - for i in $lib_dirs; do - LIBS="-L$i -lreadline $save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if defined(HAVE_READLINE_READLINE_H) -#include -#elif defined(HAVE_READLINE_H) -#include -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lres=$i;break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - if test "$ires" -a "$lres" -a "$with_readline" != "no"; then - INCLUDE_readline="-I$ires" - LIB_readline="-L$lres -lreadline " - found=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: headers $ires, libraries $lres" >&5 -$as_echo "headers $ires, libraries $lres" >&6; } - fi - fi - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" -fi - -if test "$found" = yes; then - -cat >>confdefs.h <<_ACEOF -#define READLINE 1 -_ACEOF - - with_readline=yes -else - with_readline=no - INCLUDE_readline= - LIB_readline= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - - - -# Check whether --with-libedit was given. -if test "${with_libedit+set}" = set; then : - withval=$with_libedit; -fi - - -# Check whether --with-libedit-lib was given. -if test "${with_libedit_lib+set}" = set; then : - withval=$with_libedit_lib; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-libedit-lib" "$LINENO" 5 -elif test "X$with_libedit" = "X"; then - with_libedit=yes -fi -fi - - -# Check whether --with-libedit-include was given. -if test "${with_libedit_include+set}" = set; then : - withval=$with_libedit_include; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-libedit-include" "$LINENO" 5 -elif test "X$with_libedit" = "X"; then - with_libedit=yes -fi -fi - - -# Check whether --with-libedit-config was given. -if test "${with_libedit_config+set}" = set; then : - withval=$with_libedit_config; -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libedit" >&5 -$as_echo_n "checking for libedit... " >&6; } - -case "$with_libedit" in -yes|"") d='' ;; -no) d= ;; -*) d="$with_libedit" ;; -esac - -header_dirs= -lib_dirs= -for i in $d; do - if test "$with_libedit_include" = ""; then - if test -d "$i/include/libedit"; then - header_dirs="$header_dirs $i/include/libedit" - fi - if test -d "$i/include"; then - header_dirs="$header_dirs $i/include" - fi - fi - if test "$with_libedit_lib" = ""; then - if test -d "$i/lib$abilibdirext"; then - lib_dirs="$lib_dirs $i/lib$abilibdirext" - fi - fi -done - -if test "$with_libedit_include"; then - header_dirs="$with_libedit_include $header_dirs" -fi -if test "$with_libedit_lib"; then - lib_dirs="$with_libedit_lib $lib_dirs" -fi - -if test "$with_libedit_config" = ""; then - with_libedit_config='' -fi - -libedit_cflags= -libedit_libs= - -case "$with_libedit_config" in -yes|no|""|"") - if test -f $with_libedit/bin/ ; then - with_libedit_config=$with_libedit/bin/ - fi - ;; -esac - -case "$with_libedit_config" in -yes|no|"") - ;; -*) - libedit_cflags="`$with_libedit_config --cflags 2>&1`" - libedit_libs="`$with_libedit_config --libs 2>&1`" - ;; -esac - -found=no -if test "$with_libedit" != no; then - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - if test "$libedit_cflags" -a "$libedit_libs"; then - CFLAGS="$libedit_cflags $save_CFLAGS" - LIBS="$libedit_libs $save_LIBS" - for ac_header in readline.h readline/readline.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if defined(HAVE_READLINE_READLINE_H) -#include -#elif defined(HAVE_READLINE_H) -#include -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - INCLUDE_libedit="$libedit_cflags" - LIB_libedit="$libedit_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: from $with_libedit_config" >&5 -$as_echo "from $with_libedit_config" >&6; } - found=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test "$found" = no; then - ires= lres= - for i in $header_dirs; do - CFLAGS="-I$i $save_CFLAGS" - for ac_header in readline.h readline/readline.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if defined(HAVE_READLINE_READLINE_H) -#include -#elif defined(HAVE_READLINE_H) -#include -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ires=$i;break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - for i in $lib_dirs; do - LIBS="-L$i -ledit $save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if defined(HAVE_READLINE_READLINE_H) -#include -#elif defined(HAVE_READLINE_H) -#include -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lres=$i;break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - if test "$ires" -a "$lres" -a "$with_libedit" != "no"; then - INCLUDE_libedit="-I$ires" - LIB_libedit="-L$lres -ledit " - found=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: headers $ires, libraries $lres" >&5 -$as_echo "headers $ires, libraries $lres" >&6; } - fi - fi - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" -fi - -if test "$found" = yes; then - -cat >>confdefs.h <<_ACEOF -#define LIBEDIT 1 -_ACEOF - - with_libedit=yes -else - with_libedit=no - INCLUDE_libedit= - LIB_libedit= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - - - -subdirs="$subdirs lib/libedit" - - - - -# Check whether --with-hesiod was given. -if test "${with_hesiod+set}" = set; then : - withval=$with_hesiod; -fi - - -# Check whether --with-hesiod-lib was given. -if test "${with_hesiod_lib+set}" = set; then : - withval=$with_hesiod_lib; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-hesiod-lib" "$LINENO" 5 -elif test "X$with_hesiod" = "X"; then - with_hesiod=yes -fi -fi - - -# Check whether --with-hesiod-include was given. -if test "${with_hesiod_include+set}" = set; then : - withval=$with_hesiod_include; if test "$withval" = "yes" -o "$withval" = "no"; then - as_fn_error "No argument for --with-hesiod-include" "$LINENO" 5 -elif test "X$with_hesiod" = "X"; then - with_hesiod=yes -fi -fi - - -# Check whether --with-hesiod-config was given. -if test "${with_hesiod_config+set}" = set; then : - withval=$with_hesiod_config; -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hesiod" >&5 -$as_echo_n "checking for hesiod... " >&6; } - -case "$with_hesiod" in -yes|"") d='' ;; -no) d= ;; -*) d="$with_hesiod" ;; -esac - -header_dirs= -lib_dirs= -for i in $d; do - if test "$with_hesiod_include" = ""; then - if test -d "$i/include/hesiod"; then - header_dirs="$header_dirs $i/include/hesiod" - fi - if test -d "$i/include"; then - header_dirs="$header_dirs $i/include" - fi - fi - if test "$with_hesiod_lib" = ""; then - if test -d "$i/lib$abilibdirext"; then - lib_dirs="$lib_dirs $i/lib$abilibdirext" - fi - fi -done - -if test "$with_hesiod_include"; then - header_dirs="$with_hesiod_include $header_dirs" -fi -if test "$with_hesiod_lib"; then - lib_dirs="$with_hesiod_lib $lib_dirs" -fi - -if test "$with_hesiod_config" = ""; then - with_hesiod_config='' -fi - -hesiod_cflags= -hesiod_libs= - -case "$with_hesiod_config" in -yes|no|""|"") - if test -f $with_hesiod/bin/ ; then - with_hesiod_config=$with_hesiod/bin/ - fi - ;; -esac - -case "$with_hesiod_config" in -yes|no|"") - ;; -*) - hesiod_cflags="`$with_hesiod_config --cflags 2>&1`" - hesiod_libs="`$with_hesiod_config --libs 2>&1`" - ;; -esac - -found=no -if test "$with_hesiod" != no; then - save_CFLAGS="$CFLAGS" - save_LIBS="$LIBS" - if test "$hesiod_cflags" -a "$hesiod_libs"; then - CFLAGS="$hesiod_cflags $save_CFLAGS" - LIBS="$hesiod_libs $save_LIBS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - INCLUDE_hesiod="$hesiod_cflags" - LIB_hesiod="$hesiod_libs" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: from $with_hesiod_config" >&5 -$as_echo "from $with_hesiod_config" >&6; } - found=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - if test "$found" = no; then - ires= lres= - for i in $header_dirs; do - CFLAGS="-I$i $save_CFLAGS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ires=$i;break -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - for i in $lib_dirs; do - LIBS="-L$i -lhesiod $save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lres=$i;break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - if test "$ires" -a "$lres" -a "$with_hesiod" != "no"; then - INCLUDE_hesiod="-I$ires" - LIB_hesiod="-L$lres -lhesiod " - found=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: headers $ires, libraries $lres" >&5 -$as_echo "headers $ires, libraries $lres" >&6; } - fi - fi - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" -fi - -if test "$found" = yes; then - -cat >>confdefs.h <<_ACEOF -#define HESIOD 1 -_ACEOF - - with_hesiod=yes -else - with_hesiod=no - INCLUDE_hesiod= - LIB_hesiod= - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - - -# Check whether --enable-bigendian was given. -if test "${enable_bigendian+set}" = set; then : - enableval=$enable_bigendian; krb_cv_c_bigendian=yes -fi - -# Check whether --enable-littleendian was given. -if test "${enable_littleendian+set}" = set; then : - enableval=$enable_littleendian; krb_cv_c_bigendian=no -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte order is known at compile time" >&5 -$as_echo_n "checking whether byte order is known at compile time... " >&6; } -if test "${krb_cv_c_bigendian_compile+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - krb_cv_c_bigendian_compile=yes -else - krb_cv_c_bigendian_compile=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $krb_cv_c_bigendian_compile" >&5 -$as_echo "$krb_cv_c_bigendian_compile" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${krb_cv_c_bigendian+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - if test "$krb_cv_c_bigendian_compile" = "yes"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - krb_cv_c_bigendian=yes -else - krb_cv_c_bigendian=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - else - if test "$cross_compiling" = yes; then : - as_fn_error "specify either --enable-bigendian or --enable-littleendian" "$LINENO" 5 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -main (int argc, char **argv) { - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); - } -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - krb_cv_c_bigendian=no -else - krb_cv_c_bigendian=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $krb_cv_c_bigendian" >&5 -$as_echo "$krb_cv_c_bigendian" >&6; } -if test "$krb_cv_c_bigendian" = "yes"; then - -$as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h -fi -if test "$krb_cv_c_bigendian_compile" = "yes"; then - -$as_echo "#define ENDIANESS_IN_SYS_PARAM_H 1" >>confdefs.h -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 -$as_echo_n "checking for X... " >&6; } - - -# Check whether --with-x was given. -if test "${with_x+set}" = set; then : - withval=$with_x; -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - case $x_includes,$x_libraries in #( - *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir -if mkdir conftest.dir; then - cd conftest.dir - cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl dylib la dll; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case $ac_im_incroot in - /usr/include) ac_x_includes= ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac - case $ac_im_usrlibdir in - /usr/lib | /usr/lib64 | /lib | /lib64) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. - rm -f -r conftest.dir -fi - -# Standard set of common directories for X headers. -# Check X11 before X11Rn because it is often a symlink to the current release. -ac_x_header_dirs=' -/usr/X11/include -/usr/X11R7/include -/usr/X11R6/include -/usr/X11R5/include -/usr/X11R4/include - -/usr/include/X11 -/usr/include/X11R7 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 - -/usr/local/X11/include -/usr/local/X11R7/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include - -/usr/local/include/X11 -/usr/local/include/X11R7 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 - -/usr/X386/include -/usr/x386/include -/usr/XFree86/include/X11 - -/usr/include -/usr/local/include -/usr/unsupported/include -/usr/athena/include -/usr/local/x11r5/include -/usr/lpp/Xamples/include - -/usr/openwin/include -/usr/openwin/share/include' - -if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # We can compile using X headers with no special include directory. -ac_x_includes= -else - for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then - ac_x_includes=$ac_dir - break - fi -done -fi -rm -f conftest.err conftest.$ac_ext -fi # $ac_x_includes = no - -if test "$ac_x_libraries" = no; then - # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -XrmInitialize () - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - LIBS=$ac_save_LIBS -# We can link X programs with no special library path. -ac_x_libraries= -else - LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -do - # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl dylib la dll; do - if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi # $ac_x_libraries = no - -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac -fi -;; #( - *) have_x=yes;; - esac - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 -$as_echo "$have_x" >&6; } - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } -fi - - -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 -$as_echo_n "checking whether -R must be followed by a space... " >&6; } - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - ac_xsave_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - X_LIBS="$X_LIBS -R$x_libraries" -else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - X_LIBS="$X_LIBS -R $x_libraries" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 -$as_echo "neither works" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_c_werror_flag=$ac_xsave_c_werror_flag - LIBS=$ac_xsave_LIBS - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn Johnson says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And Karl Berry says - # the Alpha needs dnet_stub (dnet does not exist). - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XOpenDisplay (); -int -main () -{ -return XOpenDisplay (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dnet_dnet_ntoa=yes -else - ac_cv_lib_dnet_dnet_ntoa=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet_stub $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dnet_stub_dnet_ntoa=yes -else - ac_cv_lib_dnet_stub_dnet_ntoa=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -fi - - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$ac_xsave_LIBS" - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to T.E. Dickey. - # The functions gethostbyname, getservbyname, and inet_addr are - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : - -fi - - if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_nsl_gethostbyname=yes -else - ac_cv_lib_nsl_gethostbyname=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -fi - - if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_bsd_gethostbyname=yes -else - ac_cv_lib_bsd_gethostbyname=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" -fi - - fi - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says Simon Leinen: it contains gethostby* - # variants that don't use the name server (or something). -lsocket - # must be given before -lnsl if both are needed. We assume that - # if connect needs -lnsl, so does gethostbyname. - ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = x""yes; then : - -fi - - if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 -$as_echo_n "checking for connect in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_socket_connect=yes -else - ac_cv_lib_socket_connect=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 -$as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then : - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -fi - - fi - - # Guillermo Gomez says -lposix is necessary on A/UX. - ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -if test "x$ac_cv_func_remove" = x""yes; then : - -fi - - if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 -$as_echo_n "checking for remove in -lposix... " >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lposix $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char remove (); -int -main () -{ -return remove (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_posix_remove=yes -else - ac_cv_lib_posix_remove=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 -$as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = x""yes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -fi - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = x""yes; then : - -fi - - if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 -$as_echo_n "checking for shmat in -lipc... " >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lipc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ipc_shmat=yes -else - ac_cv_lib_ipc_shmat=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 -$as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -fi - - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS=$LDFLAGS - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # John Interrante, Karl Berry - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char IceConnectionNumber (); -int -main () -{ -return IceConnectionNumber (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ICE_IceConnectionNumber=yes -else - ac_cv_lib_ICE_IceConnectionNumber=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -fi - - LDFLAGS=$ac_save_LDFLAGS - -fi - - -# 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special X linker flags" >&5 -$as_echo_n "checking for special X linker flags... " >&6; } -if test "${krb_cv_sys_x_libs_rpath+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - 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" - if test "$cross_compiling" = yes; then : - krb_cv_sys_x_libs_rpath="" ; krb_cv_sys_x_libs="" ; break -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - foo(void) - { - XOpenDisplay(NULL); - } - main(int argc, char **argv) - { - return 0; - } - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break -else - : -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - done - LIBS="$ac_save_libs" - CFLAGS="$ac_save_cflags" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $krb_cv_sys_x_libs_rpath" >&5 -$as_echo "$krb_cv_sys_x_libs_rpath" >&6; } - X_LIBS="$krb_cv_sys_x_libs" -fi - - - if test "$no_x" != yes; then - HAVE_X_TRUE= - HAVE_X_FALSE='#' -else - HAVE_X_TRUE='#' - HAVE_X_FALSE= -fi - - - -save_CFLAGS="$CFLAGS" -CFLAGS="$X_CFLAGS $CFLAGS" -save_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 - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XauWriteAuth" >&5 -$as_echo_n "checking for XauWriteAuth... " >&6; } -if test "${ac_cv_funclib_XauWriteAuth+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_XauWriteAuth\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" X11 Xau; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -XauWriteAuth(0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_XauWriteAuth=$ac_lib; else ac_cv_funclib_XauWriteAuth=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_XauWriteAuth=\${ac_cv_funclib_XauWriteAuth-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_XauWriteAuth" - -if false; then - for ac_func in XauWriteAuth -do : - ac_fn_c_check_func "$LINENO" "XauWriteAuth" "ac_cv_func_XauWriteAuth" -if test "x$ac_cv_func_XauWriteAuth" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_XAUWRITEAUTH 1 -_ACEOF - -fi -done - -fi -# XauWriteAuth -eval "ac_tr_func=HAVE_`echo XauWriteAuth | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_XauWriteAuth=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_XauWriteAuth=yes" - eval "LIB_XauWriteAuth=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_XauWriteAuth=no" - eval "LIB_XauWriteAuth=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_XauWriteAuth=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -ac_xxx="$LIBS" -LIBS="$LIB_XauWriteAuth $LIBS" - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XauReadAuth" >&5 -$as_echo_n "checking for XauReadAuth... " >&6; } -if test "${ac_cv_funclib_XauReadAuth+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_XauReadAuth\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" X11 Xau; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -XauReadAuth(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_XauReadAuth=$ac_lib; else ac_cv_funclib_XauReadAuth=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_XauReadAuth=\${ac_cv_funclib_XauReadAuth-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_XauReadAuth" - -if false; then - for ac_func in XauReadAuth -do : - ac_fn_c_check_func "$LINENO" "XauReadAuth" "ac_cv_func_XauReadAuth" -if test "x$ac_cv_func_XauReadAuth" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_XAUREADAUTH 1 -_ACEOF - -fi -done - -fi -# XauReadAuth -eval "ac_tr_func=HAVE_`echo XauReadAuth | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_XauReadAuth=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_XauReadAuth=yes" - eval "LIB_XauReadAuth=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_XauReadAuth=no" - eval "LIB_XauReadAuth=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_XauReadAuth=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -LIBS="$LIB_XauReadAauth $LIBS" - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XauFileName" >&5 -$as_echo_n "checking for XauFileName... " >&6; } -if test "${ac_cv_funclib_XauFileName+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_XauFileName\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" X11 Xau; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -XauFileName() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_XauFileName=$ac_lib; else ac_cv_funclib_XauFileName=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_XauFileName=\${ac_cv_funclib_XauFileName-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_XauFileName" - -if false; then - for ac_func in XauFileName -do : - ac_fn_c_check_func "$LINENO" "XauFileName" "ac_cv_func_XauFileName" -if test "x$ac_cv_func_XauFileName" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_XAUFILENAME 1 -_ACEOF - -fi -done - -fi -# XauFileName -eval "ac_tr_func=HAVE_`echo XauFileName | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_XauFileName=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_XauFileName=yes" - eval "LIB_XauFileName=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_XauFileName=no" - eval "LIB_XauFileName=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_XauFileName=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -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 - if test "$ac_cv_func_XauWriteAuth" != "yes"; then - NEED_WRITEAUTH_TRUE= - NEED_WRITEAUTH_FALSE='#' -else - NEED_WRITEAUTH_TRUE='#' - NEED_WRITEAUTH_FALSE= -fi - -else - - - 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 - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define off_t long int -_ACEOF - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mode_t" >&5 -$as_echo_n "checking for mode_t... " >&6; } -if test "${ac_cv_type_mode_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if STDC_HEADERS -#include -#include -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then : - ac_cv_type_mode_t=yes -else - ac_cv_type_mode_t=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mode_t" >&5 -$as_echo "$ac_cv_type_mode_t" >&6; } -if test $ac_cv_type_mode_t = no; then - -$as_echo "#define mode_t unsigned short" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5 -$as_echo_n "checking for sig_atomic_t... " >&6; } -if test "${ac_cv_type_sig_atomic_t+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if STDC_HEADERS -#include -#include -#endif -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sig_atomic_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then : - ac_cv_type_sig_atomic_t=yes -else - ac_cv_type_sig_atomic_t=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_sig_atomic_t" >&5 -$as_echo "$ac_cv_type_sig_atomic_t" >&6; } -if test $ac_cv_type_sig_atomic_t = no; then - -$as_echo "#define sig_atomic_t int" >>confdefs.h - -fi - - - -cv=`echo "long long" | sed 'y%./+- %__p__%'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5 -$as_echo_n "checking for long long... " >&6; } -if { as_var=ac_cv_type_$cv; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if STDC_HEADERS -#include -#include -#endif - -int -main () -{ -long long foo; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_type_$cv=yes" -else - eval "ac_cv_type_$cv=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_foo=`eval echo \\$ac_cv_type_$cv` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_foo" >&5 -$as_echo "$ac_foo" >&6; } -if test "$ac_foo" = yes; then - ac_tr_hdr=HAVE_`echo long long | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'` -if false; then - ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" -if test "x$ac_cv_type_long_long" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_LONG_LONG 1 -_ACEOF - - -fi - -fi - -cat >>confdefs.h <<_ACEOF -#define $ac_tr_hdr 1 -_ACEOF - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -struct tm tm; - int *p = &tm.tm_sec; - return !p; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_struct_tm=time.h -else - ac_cv_struct_tm=sys/time.h -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -$as_echo "$ac_cv_struct_tm" >&6; } -if test $ac_cv_struct_tm = sys/time.h; then - -$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - - -for ac_header in \ - CommonCrypto/CommonDigest.h \ - CommonCrypto/CommonCryptor.h \ - arpa/ftp.h \ - arpa/telnet.h \ - bind/bitypes.h \ - bsdsetjmp.h \ - curses.h \ - dlfcn.h \ - execinfo.h \ - fnmatch.h \ - inttypes.h \ - io.h \ - libutil.h \ - limits.h \ - maillock.h \ - netgroup.h \ - netinet/in6_machtypes.h \ - pthread.h \ - pty.h \ - sac.h \ - sgtty.h \ - siad.h \ - signal.h \ - strings.h \ - stropts.h \ - sys/bitypes.h \ - sys/category.h \ - sys/file.h \ - sys/filio.h \ - sys/ioccom.h \ - sys/mman.h \ - sys/param.h \ - sys/pty.h \ - sys/ptyio.h \ - sys/select.h \ - sys/socket.h \ - sys/str_tty.h \ - sys/stream.h \ - sys/stropts.h \ - sys/syscall.h \ - sys/termio.h \ - sys/timeb.h \ - sys/times.h \ - sys/types.h \ - sys/un.h \ - locale.h \ - termcap.h \ - termio.h \ - termios.h \ - time.h \ - tmpdir.h \ - udb.h \ - util.h \ - utmp.h \ - utmpx.h \ - -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in term.h -do : - ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" -if test "x$ac_cv_header_term_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TERM_H 1 -_ACEOF - -fi - -done - - -for ac_header in asl.h -do : - ac_fn_c_check_header_compile "$LINENO" "asl.h" "ac_cv_header_asl_h" " -#include -#ifndef ASL_STRING_EMERG -#error ASL_STRING_EMERG missing -#endif -" -if test "x$ac_cv_header_asl_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ASL_H 1 -_ACEOF - -fi - -done - - -for ac_header in net/if.h -do : - ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default -#if HAVE_SYS_SOCKET_H -#include -#endif -" -if test "x$ac_cv_header_net_if_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NET_IF_H 1 -_ACEOF - -fi - -done - - -for ac_header in sys/ptyvar.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/ptyvar.h" "ac_cv_header_sys_ptyvar_h" "$ac_includes_default -#if HAVE_SYS_TTY_H -#include -#endif -" -if test "x$ac_cv_header_sys_ptyvar_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_PTYVAR_H 1 -_ACEOF - -fi - -done - - -for ac_header in sys/strtty.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/strtty.h" "ac_cv_header_sys_strtty_h" "$ac_includes_default -#if HAVE_TERMIOS_H -#include -#endif -#if HAVE_SYS_STREAM_H -#include -#endif -" -if test "x$ac_cv_header_sys_strtty_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_STRTTY_H 1 -_ACEOF - -fi - -done - - -for ac_header in sys/ucred.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_PARAM_H -#include -#endif -" -if test "x$ac_cv_header_sys_ucred_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_UCRED_H 1 -_ACEOF - -fi - -done - - -for ac_header in security/pam_modules.h -do : - ac_fn_c_check_header_compile "$LINENO" "security/pam_modules.h" "ac_cv_header_security_pam_modules_h" "$ac_includes_default -#include - -" -if test "x$ac_cv_header_security_pam_modules_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SECURITY_PAM_MODULES_H 1 -_ACEOF - -fi - -done - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for logwtmp" >&5 -$as_echo_n "checking for logwtmp... " >&6; } -if test "${ac_cv_funclib_logwtmp+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_logwtmp\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" util; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_UTIL_H -#include -#endif - -int -main () -{ -logwtmp(0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_logwtmp=$ac_lib; else ac_cv_funclib_logwtmp=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_logwtmp=\${ac_cv_funclib_logwtmp-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_logwtmp" - -if false; then - for ac_func in logwtmp -do : - ac_fn_c_check_func "$LINENO" "logwtmp" "ac_cv_func_logwtmp" -if test "x$ac_cv_func_logwtmp" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LOGWTMP 1 -_ACEOF - -fi -done - -fi -# logwtmp -eval "ac_tr_func=HAVE_`echo logwtmp | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_logwtmp=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_logwtmp=yes" - eval "LIB_logwtmp=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_logwtmp=no" - eval "LIB_logwtmp=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_logwtmp=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for logout" >&5 -$as_echo_n "checking for logout... " >&6; } -if test "${ac_cv_funclib_logout+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_logout\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" util; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_UTIL_H -#include -#endif - -int -main () -{ -logout(0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_logout=$ac_lib; else ac_cv_funclib_logout=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_logout=\${ac_cv_funclib_logout-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_logout" - -if false; then - for ac_func in logout -do : - ac_fn_c_check_func "$LINENO" "logout" "ac_cv_func_logout" -if test "x$ac_cv_func_logout" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LOGOUT 1 -_ACEOF - -fi -done - -fi -# logout -eval "ac_tr_func=HAVE_`echo logout | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_logout=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_logout=yes" - eval "LIB_logout=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_logout=no" - eval "LIB_logout=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_logout=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty" >&5 -$as_echo_n "checking for openpty... " >&6; } -if test "${ac_cv_funclib_openpty+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_openpty\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" util; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_UTIL_H -#include -#endif - -int -main () -{ -openpty(0,0,0,0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_openpty=$ac_lib; else ac_cv_funclib_openpty=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_openpty=\${ac_cv_funclib_openpty-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_openpty" - -if false; then - for ac_func in openpty -do : - ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" -if test "x$ac_cv_func_openpty" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OPENPTY 1 -_ACEOF - -fi -done - -fi -# openpty -eval "ac_tr_func=HAVE_`echo openpty | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_openpty=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_openpty=yes" - eval "LIB_openpty=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_openpty=no" - eval "LIB_openpty=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_openpty=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent" >&5 -$as_echo_n "checking for tgetent... " >&6; } -if test "${ac_cv_funclib_tgetent+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_tgetent\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" termcap ncurses curses; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_TERMCAP_H -#include -#endif -#ifdef HAVE_CURSES_H -#include -#endif - -int -main () -{ -tgetent(0,0) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_tgetent=$ac_lib; else ac_cv_funclib_tgetent=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_tgetent=\${ac_cv_funclib_tgetent-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_tgetent" - -if false; then - for ac_func in tgetent -do : - ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" -if test "x$ac_cv_func_tgetent" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TGETENT 1 -_ACEOF - -fi -done - -fi -# tgetent -eval "ac_tr_func=HAVE_`echo tgetent | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_tgetent=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_tgetent=yes" - eval "LIB_tgetent=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_tgetent=no" - eval "LIB_tgetent=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_tgetent=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - - -for ac_func in \ - _getpty \ - _scrsize \ - arc4random \ - backtrace \ - fcntl \ - getpeereid \ - getpeerucred \ - grantpt \ - mktime \ - ptsname \ - rand \ - revoke \ - select \ - setitimer \ - setpcred \ - setpgid \ - setproctitle \ - setregid \ - setresgid \ - setresuid \ - setreuid \ - setsid \ - setutent \ - sigaction \ - strstr \ - ttyname \ - ttyslot \ - umask \ - unlockpt \ - vhangup \ - yp_get_default_domain \ - -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for __sync_add_and_fetch" >&5 -$as_echo_n "checking checking for __sync_add_and_fetch... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -unsigned int foo, bar; bar = __sync_add_and_fetch(&foo, 1); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_rk_have___sync_add_and_fetch=yes -else - ac_rk_have___sync_add_and_fetch=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_rk_have___sync_add_and_fetch" = "yes" ; then - -cat >>confdefs.h <<_ACEOF -#define HAVE___SYNC_ADD_AND_FETCH 1 -_ACEOF - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_rk_have___sync_add_and_fetch" >&5 -$as_echo "$ac_rk_have___sync_add_and_fetch" >&6; } - - -for ac_func in getpagesize -do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPAGESIZE 1 -_ACEOF - -fi -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 -$as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_mmap_fixed_mapped=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc - -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ - -#include -#include - -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H -char *malloc (); -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -int -main () -{ - char *data, *data2, *data3; - int i, pagesize; - int fd, fd2; - - pagesize = getpagesize (); - - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - return 1; - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - return 2; - if (write (fd, data, pagesize) != pagesize) - return 3; - close (fd); - - /* Next, check that the tail of a page is zero-filled. File must have - non-zero length, otherwise we risk SIGBUS for entire page. */ - fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); - if (fd2 < 0) - return 4; - data2 = ""; - if (write (fd2, data2, 1) != 1) - return 5; - data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); - if (data2 == MAP_FAILED) - return 6; - for (i = 0; i < pagesize; ++i) - if (*(data2 + i)) - return 7; - close (fd2); - if (munmap (data2, pagesize)) - return 8; - - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - return 9; - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 10; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - return 11; - - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - return 12; - if (read (fd, data3, pagesize) != pagesize) - return 13; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 14; - close (fd); - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_mmap_fixed_mapped=yes -else - ac_cv_func_mmap_fixed_mapped=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 -$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } -if test $ac_cv_func_mmap_fixed_mapped = yes; then - -$as_echo "#define HAVE_MMAP 1" >>confdefs.h - -fi -rm -f conftest.mmap conftest.txt - - - - -for ac_header in capability.h sys/capability.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_func in sgi_getcapabilitybyname cap_set_proc -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam_r" >&5 -$as_echo_n "checking for getpwnam_r... " >&6; } -if test "${ac_cv_funclib_getpwnam_r+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_getpwnam_r\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" c_r; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -getpwnam_r() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_getpwnam_r=$ac_lib; else ac_cv_funclib_getpwnam_r=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_getpwnam_r=\${ac_cv_funclib_getpwnam_r-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_getpwnam_r" - -if false; then - for ac_func in getpwnam_r -do : - ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r" -if test "x$ac_cv_func_getpwnam_r" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPWNAM_R 1 -_ACEOF - -fi -done - -fi -# getpwnam_r -eval "ac_tr_func=HAVE_`echo getpwnam_r | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_getpwnam_r=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_getpwnam_r=yes" - eval "LIB_getpwnam_r=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_getpwnam_r=no" - eval "LIB_getpwnam_r=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_getpwnam_r=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - -if test "$ac_cv_func_getpwnam_r" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getpwnam_r is posix" >&5 -$as_echo_n "checking if getpwnam_r is posix... " >&6; } -if test "${ac_cv_func_getpwnam_r_posix+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_libs="$LIBS" - LIBS="$LIBS $LIB_getpwnam_r" - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _POSIX_PTHREAD_SEMANTICS -#include -int main(int argc, char **argv) -{ - struct passwd pw, *pwd; - return getpwnam_r("", &pw, 0, 0, &pwd) < 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_getpwnam_r_posix=yes -else - ac_cv_func_getpwnam_r_posix=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -LIBS="$ac_libs" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpwnam_r_posix" >&5 -$as_echo "$ac_cv_func_getpwnam_r_posix" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if _POSIX_PTHREAD_SEMANTICS is needed" >&5 -$as_echo_n "checking if _POSIX_PTHREAD_SEMANTICS is needed... " >&6; } -if test "${ac_cv_func_getpwnam_r_posix_def+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_libs="$LIBS" - LIBS="$LIBS $LIB_getpwnam_r" - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -int main(int argc, char **argv) -{ - struct passwd pw, *pwd; - return getpwnam_r("", &pw, 0, 0, &pwd) < 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_getpwnam_r_posix_def=no -else - ac_cv_func_getpwnam_r_posix_def=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -LIBS="$ac_libs" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpwnam_r_posix_def" >&5 -$as_echo "$ac_cv_func_getpwnam_r_posix_def" >&6; } -if test "$ac_cv_func_getpwnam_r_posix" = yes; then - -$as_echo "#define POSIX_GETPWNAM_R 1" >>confdefs.h - -fi -if test "$ac_cv_func_getpwnam_r_posix" = yes -a "$ac_cv_func_getpwnam_r_posix_def" = yes; then - -$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - -fi -fi - - -if test "$enable_pthread_support" != no; then - saved_LIBS="$LIBS" - LIBS="$LIBS $PTHREADS_LIBS" - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for door_create" >&5 -$as_echo_n "checking for door_create... " >&6; } -if test "${ac_cv_funclib_door_create+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if eval "test \"\$ac_cv_func_door_create\" != yes" ; then - ac_save_LIBS="$LIBS" - for ac_lib in "" door; do - case "$ac_lib" in - "") ;; - yes) ac_lib="" ;; - no) continue ;; - -l*) ;; - *) ac_lib="-l$ac_lib" ;; - esac - LIBS=" $ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -door_create() - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "if test -n \"$ac_lib\";then ac_cv_funclib_door_create=$ac_lib; else ac_cv_funclib_door_create=yes; fi";break -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done - eval "ac_cv_funclib_door_create=\${ac_cv_funclib_door_create-no}" - LIBS="$ac_save_LIBS" -fi - -fi - - -eval "ac_res=\$ac_cv_funclib_door_create" - -if false; then - for ac_func in door_create -do : - ac_fn_c_check_func "$LINENO" "door_create" "ac_cv_func_door_create" -if test "x$ac_cv_func_door_create" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DOOR_CREATE 1 -_ACEOF - -fi -done - -fi -# door_create -eval "ac_tr_func=HAVE_`echo door_create | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`" -eval "LIB_door_create=$ac_res" - -case "$ac_res" in - yes) - eval "ac_cv_func_door_create=yes" - eval "LIB_door_create=" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ;; - no) - eval "ac_cv_func_door_create=no" - eval "LIB_door_create=" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - eval "ac_cv_func_door_create=yes" - eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes" - cat >>confdefs.h <<_ACEOF -#define $ac_tr_func 1 -_ACEOF - - cat >>confdefs.h <<_ACEOF -#define $ac_tr_lib 1 -_ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in $ac_res" >&5 -$as_echo "yes, in $ac_res" >&6; } - ;; -esac - - - LIBS="$saved_LIBS" -fi - -# Check whether --enable-kcm was given. -if test "${enable_kcm+set}" = set; then : - enableval=$enable_kcm; -else - enable_kcm=yes -fi - - -if test "$enable_kcm" = yes ; then - if test "$ac_cv_header_sys_un_h" != yes -a "$ac_cv_funclib_door_create" != yes ; then - enable_kcm=no - fi -fi -if test "$enable_kcm" = yes; then - -$as_echo "#define HAVE_KCM 1" >>confdefs.h - -fi - if test "$enable_kcm" = yes; then - KCM_TRUE= - KCM_FALSE='#' -else - KCM_TRUE='#' - KCM_FALSE= -fi - - - - -for ac_func in getudbnam setlim -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr in struct utmp" >&5 -$as_echo_n "checking for ut_addr in struct utmp... " >&6; } -if test "${ac_cv_type_struct_utmp_ut_addr+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmp x; memset(&x, 0, sizeof(x)); x.ut_addr - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmp_ut_addr=yes -else - ac_cv_type_struct_utmp_ut_addr=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmp_ut_addr" >&5 -$as_echo "$ac_cv_type_struct_utmp_ut_addr" >&6; } -if test "$ac_cv_type_struct_utmp_ut_addr" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMP_UT_ADDR 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host in struct utmp" >&5 -$as_echo_n "checking for ut_host in struct utmp... " >&6; } -if test "${ac_cv_type_struct_utmp_ut_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmp x; memset(&x, 0, sizeof(x)); x.ut_host - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmp_ut_host=yes -else - ac_cv_type_struct_utmp_ut_host=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmp_ut_host" >&5 -$as_echo "$ac_cv_type_struct_utmp_ut_host" >&6; } -if test "$ac_cv_type_struct_utmp_ut_host" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMP_UT_HOST 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id in struct utmp" >&5 -$as_echo_n "checking for ut_id in struct utmp... " >&6; } -if test "${ac_cv_type_struct_utmp_ut_id+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmp x; memset(&x, 0, sizeof(x)); x.ut_id - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmp_ut_id=yes -else - ac_cv_type_struct_utmp_ut_id=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmp_ut_id" >&5 -$as_echo "$ac_cv_type_struct_utmp_ut_id" >&6; } -if test "$ac_cv_type_struct_utmp_ut_id" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMP_UT_ID 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid in struct utmp" >&5 -$as_echo_n "checking for ut_pid in struct utmp... " >&6; } -if test "${ac_cv_type_struct_utmp_ut_pid+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmp x; memset(&x, 0, sizeof(x)); x.ut_pid - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmp_ut_pid=yes -else - ac_cv_type_struct_utmp_ut_pid=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmp_ut_pid" >&5 -$as_echo "$ac_cv_type_struct_utmp_ut_pid" >&6; } -if test "$ac_cv_type_struct_utmp_ut_pid" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMP_UT_PID 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type in struct utmp" >&5 -$as_echo_n "checking for ut_type in struct utmp... " >&6; } -if test "${ac_cv_type_struct_utmp_ut_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmp x; memset(&x, 0, sizeof(x)); x.ut_type - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmp_ut_type=yes -else - ac_cv_type_struct_utmp_ut_type=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmp_ut_type" >&5 -$as_echo "$ac_cv_type_struct_utmp_ut_type" >&6; } -if test "$ac_cv_type_struct_utmp_ut_type" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMP_UT_TYPE 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_user in struct utmp" >&5 -$as_echo_n "checking for ut_user in struct utmp... " >&6; } -if test "${ac_cv_type_struct_utmp_ut_user+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmp x; memset(&x, 0, sizeof(x)); x.ut_user - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmp_ut_user=yes -else - ac_cv_type_struct_utmp_ut_user=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmp_ut_user" >&5 -$as_echo "$ac_cv_type_struct_utmp_ut_user" >&6; } -if test "$ac_cv_type_struct_utmp_ut_user" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMP_UT_USER 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host in struct utmpx" >&5 -$as_echo_n "checking for ut_host in struct utmpx... " >&6; } -if test "${ac_cv_type_struct_utmpx_ut_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmpx x; memset(&x, 0, sizeof(x)); x.ut_host - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmpx_ut_host=yes -else - ac_cv_type_struct_utmpx_ut_host=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmpx_ut_host" >&5 -$as_echo "$ac_cv_type_struct_utmpx_ut_host" >&6; } -if test "$ac_cv_type_struct_utmpx_ut_host" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMPX_UT_HOST 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id in struct utmpx" >&5 -$as_echo_n "checking for ut_id in struct utmpx... " >&6; } -if test "${ac_cv_type_struct_utmpx_ut_id+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmpx x; memset(&x, 0, sizeof(x)); x.ut_id - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmpx_ut_id=yes -else - ac_cv_type_struct_utmpx_ut_id=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmpx_ut_id" >&5 -$as_echo "$ac_cv_type_struct_utmpx_ut_id" >&6; } -if test "$ac_cv_type_struct_utmpx_ut_id" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMPX_UT_ID 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_line in struct utmpx" >&5 -$as_echo_n "checking for ut_line in struct utmpx... " >&6; } -if test "${ac_cv_type_struct_utmpx_ut_line+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmpx x; memset(&x, 0, sizeof(x)); x.ut_line - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmpx_ut_line=yes -else - ac_cv_type_struct_utmpx_ut_line=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmpx_ut_line" >&5 -$as_echo "$ac_cv_type_struct_utmpx_ut_line" >&6; } -if test "$ac_cv_type_struct_utmpx_ut_line" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMPX_UT_LINE 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid in struct utmpx" >&5 -$as_echo_n "checking for ut_pid in struct utmpx... " >&6; } -if test "${ac_cv_type_struct_utmpx_ut_pid+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmpx x; memset(&x, 0, sizeof(x)); x.ut_pid - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmpx_ut_pid=yes -else - ac_cv_type_struct_utmpx_ut_pid=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmpx_ut_pid" >&5 -$as_echo "$ac_cv_type_struct_utmpx_ut_pid" >&6; } -if test "$ac_cv_type_struct_utmpx_ut_pid" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMPX_UT_PID 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv in struct utmpx" >&5 -$as_echo_n "checking for ut_tv in struct utmpx... " >&6; } -if test "${ac_cv_type_struct_utmpx_ut_tv+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmpx x; memset(&x, 0, sizeof(x)); x.ut_tv - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmpx_ut_tv=yes -else - ac_cv_type_struct_utmpx_ut_tv=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmpx_ut_tv" >&5 -$as_echo "$ac_cv_type_struct_utmpx_ut_tv" >&6; } -if test "$ac_cv_type_struct_utmpx_ut_tv" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMPX_UT_TV 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type in struct utmpx" >&5 -$as_echo_n "checking for ut_type in struct utmpx... " >&6; } -if test "${ac_cv_type_struct_utmpx_ut_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmpx x; memset(&x, 0, sizeof(x)); x.ut_type - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmpx_ut_type=yes -else - ac_cv_type_struct_utmpx_ut_type=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmpx_ut_type" >&5 -$as_echo "$ac_cv_type_struct_utmpx_ut_type" >&6; } -if test "$ac_cv_type_struct_utmpx_ut_type" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMPX_UT_TYPE 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_user in struct utmpx" >&5 -$as_echo_n "checking for ut_user in struct utmpx... " >&6; } -if test "${ac_cv_type_struct_utmpx_ut_user+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmpx x; memset(&x, 0, sizeof(x)); x.ut_user - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmpx_ut_user=yes -else - ac_cv_type_struct_utmpx_ut_user=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmpx_ut_user" >&5 -$as_echo "$ac_cv_type_struct_utmpx_ut_user" >&6; } -if test "$ac_cv_type_struct_utmpx_ut_user" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMPX_UT_USER 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_exit in struct utmpx" >&5 -$as_echo_n "checking for ut_exit in struct utmpx... " >&6; } -if test "${ac_cv_type_struct_utmpx_ut_exit+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmpx x; memset(&x, 0, sizeof(x)); x.ut_exit - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmpx_ut_exit=yes -else - ac_cv_type_struct_utmpx_ut_exit=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmpx_ut_exit" >&5 -$as_echo "$ac_cv_type_struct_utmpx_ut_exit" >&6; } -if test "$ac_cv_type_struct_utmpx_ut_exit" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMPX_UT_EXIT 1" >>confdefs.h - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_syslen in struct utmpx" >&5 -$as_echo_n "checking for ut_syslen in struct utmpx... " >&6; } -if test "${ac_cv_type_struct_utmpx_ut_syslen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -struct utmpx x; memset(&x, 0, sizeof(x)); x.ut_syslen - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_struct_utmpx_ut_syslen=yes -else - ac_cv_type_struct_utmpx_ut_syslen=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_struct_utmpx_ut_syslen" >&5 -$as_echo "$ac_cv_type_struct_utmpx_ut_syslen" >&6; } -if test "$ac_cv_type_struct_utmpx_ut_syslen" = yes; then - - -$as_echo "#define HAVE_STRUCT_UTMPX_UT_SYSLEN 1" >>confdefs.h - - -fi - - - -ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_int8_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INT8_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_int16_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INT16_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_int32_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INT32_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_int64_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_INT64_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_u_int8_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_U_INT8_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_u_int16_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_U_INT16_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_u_int32_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_U_INT32_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_u_int64_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_U_INT64_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_uint8_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINT8_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_uint16_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINT16_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_uint32_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINT32_T 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" " -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif - -" -if test "x$ac_cv_type_uint64_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_UINT64_T 1 -_ACEOF - - -fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for framework security" >&5 -$as_echo_n "checking for framework security... " >&6; } -if test "${rk_cv_framework_security+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -if test "$rk_cv_framework_security" != yes; then - ac_save_LIBS="$LIBS" - LIBS="$ac_save_LIBS -framework Security -framework CoreFoundation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -SecKeychainSearchRef searchRef; -SecKeychainSearchCreateFromAttributes(NULL,kSecCertificateItemClass,NULL, &searchRef); -CFRelease(&searchRef); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - rk_cv_framework_security=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$ac_save_LIBS" -fi - -fi - - -if test "$rk_cv_framework_security" = yes; then - -$as_echo "#define HAVE_FRAMEWORK_SECURITY 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "$rk_cv_framework_security" = yes; then - FRAMEWORK_SECURITY_TRUE= - FRAMEWORK_SECURITY_FALSE='#' -else - FRAMEWORK_SECURITY_TRUE='#' - FRAMEWORK_SECURITY_FALSE= -fi - - -if test "$rk_cv_framework_security" = yes; then - -if test "$ac_cv_func_SecKeyGetCSPHandle+set" != set -o "$ac_cv_func_SecKeyGetCSPHandle" = yes; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SecKeyGetCSPHandle needs a prototype" >&5 -$as_echo_n "checking if SecKeyGetCSPHandle needs a prototype... " >&6; } -if test "${ac_cv_func_SecKeyGetCSPHandle_noproto+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -struct foo { int foo; } xx; -extern int SecKeyGetCSPHandle (struct foo*); -int -main () -{ -SecKeyGetCSPHandle(&xx) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "ac_cv_func_SecKeyGetCSPHandle_noproto=yes" -else - eval "ac_cv_func_SecKeyGetCSPHandle_noproto=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_SecKeyGetCSPHandle_noproto" >&5 -$as_echo "$ac_cv_func_SecKeyGetCSPHandle_noproto" >&6; } -if test "$ac_cv_func_SecKeyGetCSPHandle_noproto" = yes; then - -$as_echo "#define NEED_SECKEYGETCSPHANDLE_PROTO 1" >>confdefs.h - -fi -fi - -fi - - - - - - -ac_foo=no -build_editline=no -if test "$with_readline" = yes; then - : -elif test "$with_libedit" = yes; then - LIB_readline="${LIB_libedit}" -elif test "$ac_cv_func_readline" = yes; then - : -else - build_libedit=yes - LIB_readline="\$(top_builddir)/lib/libedit/src/libheimedit.la \$(LIB_tgetent)" -fi - if test "$build_libedit" = yes; then - LIBEDIT_TRUE= - LIBEDIT_FALSE='#' -else - LIBEDIT_TRUE='#' - LIBEDIT_FALSE= -fi - - -$as_echo "#define HAVE_READLINE 1" >>confdefs.h - - - - - -$as_echo "#define AUTHENTICATION 1" >>confdefs.h - -$as_echo "#define ENCRYPTION 1" >>confdefs.h - -$as_echo "#define DES_ENCRYPTION 1" >>confdefs.h - -$as_echo "#define DIAGNOSTICS 1" >>confdefs.h - -$as_echo "#define OLD_ENVIRON 1" >>confdefs.h -if false; then - -$as_echo "#define ENV_HACK 1" >>confdefs.h - -fi - -# Simple test for streamspty, based on the existance of getmsg(), alas -# this breaks on SunOS4 which have streams but BSD-like ptys -# -# And also something wierd has happend with dec-osf1, fallback to bsd-ptys - -case "$host" in -*-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[01]*) - ;; -*) - ac_fn_c_check_func "$LINENO" "getmsg" "ac_cv_func_getmsg" -if test "x$ac_cv_func_getmsg" = x""yes; then : - -fi - - if test "$ac_cv_func_getmsg" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getmsg works" >&5 -$as_echo_n "checking if getmsg works... " >&6; } -if test "${ac_cv_func_getmsg_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_getmsg_works=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - - int main(int argc, char **argv) - { - int ret; - ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL); - if(ret < 0 && errno == ENOSYS) - return 1; - return 0; - } - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_getmsg_works=yes -else - ac_cv_func_getmsg_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getmsg_works" >&5 -$as_echo "$ac_cv_func_getmsg_works" >&6; } - if test "$ac_cv_func_getmsg_works" = "yes"; then - -$as_echo "#define HAVE_GETMSG 1" >>confdefs.h - - -$as_echo "#define STREAMSPTY 1" >>confdefs.h - - fi - fi - ;; -esac - - - - - - -# Extract the first word of "compile_et", so it can be a program name with args. -set dummy compile_et; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_COMPILE_ET+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$COMPILE_ET"; then - ac_cv_prog_COMPILE_ET="$COMPILE_ET" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_COMPILE_ET="compile_et" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -COMPILE_ET=$ac_cv_prog_COMPILE_ET -if test -n "$COMPILE_ET"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_ET" >&5 -$as_echo "$COMPILE_ET" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -krb_cv_compile_et="no" -krb_cv_com_err_need_r="" -krb_cv_compile_et_cross=no -if test "${COMPILE_ET}" = "compile_et"; then - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compile_et has the features we need" >&5 -$as_echo_n "checking whether compile_et has the features we need... " >&6; } -cat > conftest_et.et <<'EOF' -error_table test conf -prefix CONFTEST -index 1 -error_code CODE1, "CODE1" -index 128 -error_code CODE2, "CODE2" -end -EOF -if ${COMPILE_ET} conftest_et.et >/dev/null 2>&1; then - save_CPPFLAGS="${CPPFLAGS}" - if test -d "/usr/include/et"; then - CPPFLAGS="-I/usr/include/et ${CPPFLAGS}" - fi - if test "$cross_compiling" = yes; then : - krb_cv_compile_et="yes" krb_cv_compile_et_cross=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include "conftest_et.h" -int main(int argc, char **argv){ -#ifndef ERROR_TABLE_BASE_conf -#error compile_et does not handle error_table N M -#endif -return (CONFTEST_CODE2 - CONFTEST_CODE1) != 127;} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - krb_cv_compile_et="yes" -else - CPPFLAGS="${save_CPPFLAGS}" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${krb_cv_compile_et}" >&5 -$as_echo "${krb_cv_compile_et}" >&6; } -if test "${krb_cv_compile_et}" = "yes" -a "${krb_cv_compile_et_cross}" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if com_err generates a initialize_conf_error_table_r" >&5 -$as_echo_n "checking for if com_err generates a initialize_conf_error_table_r... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include "conftest_et.h" -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "initialize_conf_error_table_r.*struct et_list" >/dev/null 2>&1; then : - krb_cv_com_err_need_r="ok" -fi -rm -f conftest* - - if test X"$krb_cv_com_err_need_r" = X ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - krb_cv_compile_et=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi -fi -rm -fr conftest* -fi - -if test "${krb_cv_compile_et_cross}" = yes ; then - krb_cv_com_err="cross" -elif test "${krb_cv_compile_et}" = "yes"; then - krb_cv_save_LIBS="${LIBS}" - LIBS="${LIBS} -lcom_err" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err" >&5 -$as_echo_n "checking for com_err... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - const char *p; - p = error_message(0); - initialize_error_table_r(0,0,0,0); - com_right_r(0, 0, 0, 0); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - krb_cv_com_err="yes" -else - krb_cv_com_err="no"; CPPFLAGS="${save_CPPFLAGS}" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${krb_cv_com_err}" >&5 -$as_echo "${krb_cv_com_err}" >&6; } - LIBS="${krb_cv_save_LIBS}" -else - krb_cv_com_err="no" -fi - -if test "${krb_cv_com_err}" = "yes"; then - DIR_com_err="" - LIB_com_err="-lcom_err" - LIB_com_err_a="" - LIB_com_err_so="" - { $as_echo "$as_me:${as_lineno-$LINENO}: Using the already-installed com_err" >&5 -$as_echo "$as_me: Using the already-installed com_err" >&6;} - COMPILE_ET="${ac_cv_prog_COMPILE_ET}" - localcomerr=no -elif test "${krb_cv_com_err}" = "cross"; then - DIR_com_err="com_err" - LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la" - LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a" - LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so" - { $as_echo "$as_me:${as_lineno-$LINENO}: Using our own com_err with toolchain compile_et" >&5 -$as_echo "$as_me: Using our own com_err with toolchain compile_et" >&6;} - COMPILE_ET="${ac_cv_prog_COMPILE_ET}" - localcomerr=yes -else - COMPILE_ET="\$(top_builddir)/lib/com_err/compile_et" - DIR_com_err="com_err" - LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la" - LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a" - LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so" - { $as_echo "$as_me:${as_lineno-$LINENO}: Using our own com_err" >&5 -$as_echo "$as_me: Using our own com_err" >&6;} - localcomerr=yes -fi - if test "$localcomerr" = yes; then - COM_ERR_TRUE= - COM_ERR_FALSE='#' -else - COM_ERR_TRUE='#' - COM_ERR_FALSE= -fi - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which authentication modules should be built" >&5 -$as_echo_n "checking which authentication modules should be built... " >&6; } - -z='sia afskauthlib' -LIB_AUTH_SUBDIRS= -for i in $z; do -case $i in -sia) -if test "$ac_cv_header_siad_h" = yes; then - LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS sia" -fi -;; -pam) -case "${host}" in -*-*-freebsd*) ac_cv_want_pam_krb4=no ;; -*) ac_cv_want_pam_krb4=yes ;; -esac - -if test "$ac_cv_want_pam_krb4" = yes -a \ - "$ac_cv_header_security_pam_modules_h" = yes -a \ - "$enable_shared" = yes; then - LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS pam" -fi -;; -afskauthlib) -case "${host}" in -*-*-irix[56]*) LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS afskauthlib" ;; -esac -;; -esac -done -if test "$LIB_AUTH_SUBDIRS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIB_AUTH_SUBDIRS" >&5 -$as_echo "$LIB_AUTH_SUBDIRS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi - - - - -# This is done by AC_OUTPUT but we need the result here. -test "x$prefix" = xNONE && prefix=$ac_default_prefix -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - - - x="${bindir}" - eval y="$x" - while test "x$y" != "x$x"; do - x="$y" - eval y="$x" - done - -cat >>confdefs.h <<_ACEOF -#define BINDIR "$x" -_ACEOF - - x="${libdir}" - eval y="$x" - while test "x$y" != "x$x"; do - x="$y" - eval y="$x" - done - -cat >>confdefs.h <<_ACEOF -#define LIBDIR "$x" -_ACEOF - - x="${libexecdir}" - eval y="$x" - while test "x$y" != "x$x"; do - x="$y" - eval y="$x" - done - -cat >>confdefs.h <<_ACEOF -#define LIBEXECDIR "$x" -_ACEOF - - x="${localstatedir}" - eval y="$x" - while test "x$y" != "x$x"; do - x="$y" - eval y="$x" - done - -cat >>confdefs.h <<_ACEOF -#define LOCALSTATEDIR "$x" -_ACEOF - - x="${sbindir}" - eval y="$x" - while test "x$y" != "x$x"; do - x="$y" - eval y="$x" - done - -cat >>confdefs.h <<_ACEOF -#define SBINDIR "$x" -_ACEOF - - x="${sysconfdir}" - eval y="$x" - while test "x$y" != "x$x"; do - x="$y" - eval y="$x" - done - -cat >>confdefs.h <<_ACEOF -#define SYSCONFDIR "$x" -_ACEOF - - - - - -# Check whether --enable-developer was given. -if test "${enable_developer+set}" = set; then : - enableval=$enable_developer; -fi - -if test "X$enable_developer" = Xyes; then - dwflags="-Werror" -fi - -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 - # -Wstrict-overflow=5 - WFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs $dwflags" - WFLAGS_NOUNUSED="-Wno-unused" - WFLAGS_NOIMPLICITINT="-Wno-implicit-int" -fi - - - - - - - -# Check whether --enable-heimdal-documentation was given. -if test "${enable_heimdal_documentation+set}" = set; then : - enableval=$enable_heimdal_documentation; -fi - - if test "$enable_heimdal_documentation" != no; then - HEIMDAL_DOCUMENTATION_TRUE= - HEIMDAL_DOCUMENTATION_FALSE='#' -else - HEIMDAL_DOCUMENTATION_TRUE='#' - HEIMDAL_DOCUMENTATION_FALSE= -fi - - -ac_config_files="$ac_config_files Makefile etc/Makefile include/Makefile include/gssapi/Makefile include/hcrypto/Makefile include/kadm5/Makefile lib/Makefile base/Makefile lib/asn1/Makefile lib/com_err/Makefile lib/hcrypto/Makefile lib/hx509/Makefile lib/gssapi/Makefile lib/ntlm/Makefile lib/hdb/Makefile lib/ipc/Makefile lib/kadm5/Makefile lib/kafs/Makefile lib/kdfs/Makefile lib/krb5/Makefile lib/otp/Makefile lib/roken/Makefile lib/sl/Makefile lib/sqlite/Makefile lib/vers/Makefile lib/wind/Makefile po/Makefile kuser/Makefile kpasswd/Makefile kadmin/Makefile admin/Makefile kcm/Makefile kdc/Makefile appl/Makefile appl/afsutil/Makefile appl/ftp/Makefile appl/ftp/common/Makefile appl/ftp/ftp/Makefile appl/ftp/ftpd/Makefile appl/gssmask/Makefile appl/kx/Makefile appl/login/Makefile appl/otp/Makefile appl/popper/Makefile appl/push/Makefile appl/rsh/Makefile appl/rcp/Makefile appl/su/Makefile appl/xnlock/Makefile appl/telnet/Makefile appl/telnet/libtelnet/Makefile appl/telnet/telnet/Makefile appl/telnet/telnetd/Makefile appl/test/Makefile appl/kf/Makefile appl/dceutils/Makefile tests/Makefile tests/bin/Makefile tests/can/Makefile tests/db/Makefile tests/kdc/Makefile tests/ldap/Makefile tests/gss/Makefile tests/java/Makefile tests/plugin/Makefile packages/Makefile packages/mac/Makefile doc/Makefile tools/Makefile" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AIX_TRUE}" && test -z "${AIX_FALSE}"; then - as_fn_error "conditional \"AIX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AIX4_TRUE}" && test -z "${AIX4_FALSE}"; then - as_fn_error "conditional \"AIX4\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_DLOPEN_TRUE}" && test -z "${HAVE_DLOPEN_FALSE}"; then - as_fn_error "conditional \"HAVE_DLOPEN\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AIX_DYNAMIC_AFS_TRUE}" && test -z "${AIX_DYNAMIC_AFS_FALSE}"; then - as_fn_error "conditional \"AIX_DYNAMIC_AFS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${IRIX_TRUE}" && test -z "${IRIX_FALSE}"; then - as_fn_error "conditional \"IRIX\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ENABLE_SHARED_TRUE}" && test -z "${ENABLE_SHARED_FALSE}"; then - as_fn_error "conditional \"ENABLE_SHARED\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${versionscript_TRUE}" && test -z "${versionscript_FALSE}"; then - as_fn_error "conditional \"versionscript\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${CROSS_COMPILE_TRUE}" && test -z "${CROSS_COMPILE_FALSE}"; then - as_fn_error "conditional \"CROSS_COMPILE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${OPENLDAP_MODULE_TRUE}" && test -z "${OPENLDAP_MODULE_FALSE}"; then - as_fn_error "conditional \"OPENLDAP_MODULE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${PKINIT_TRUE}" && test -z "${PKINIT_FALSE}"; then - as_fn_error "conditional \"PKINIT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_CAPNG_TRUE}" && test -z "${HAVE_CAPNG_FALSE}"; then - as_fn_error "conditional \"HAVE_CAPNG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${SQLITE3_TRUE}" && test -z "${SQLITE3_FALSE}"; then - as_fn_error "conditional \"SQLITE3\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${have_scc_TRUE}" && test -z "${have_scc_FALSE}"; then - as_fn_error "conditional \"have_scc\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${KRB4_TRUE}" && test -z "${KRB4_FALSE}"; then - as_fn_error "conditional \"KRB4\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${KRB5_TRUE}" && test -z "${KRB5_FALSE}"; then - as_fn_error "conditional \"KRB5\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${do_roken_rename_TRUE}" && test -z "${do_roken_rename_FALSE}"; then - as_fn_error "conditional \"do_roken_rename\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_OPENSSL_TRUE}" && test -z "${HAVE_OPENSSL_FALSE}"; then - as_fn_error "conditional \"HAVE_OPENSSL\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DCE_TRUE}" && test -z "${DCE_FALSE}"; then - as_fn_error "conditional \"DCE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_DB1_TRUE}" && test -z "${HAVE_DB1_FALSE}"; then - as_fn_error "conditional \"HAVE_DB1\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_DB3_TRUE}" && test -z "${HAVE_DB3_FALSE}"; then - as_fn_error "conditional \"HAVE_DB3\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_NDBM_TRUE}" && test -z "${HAVE_NDBM_FALSE}"; then - as_fn_error "conditional \"HAVE_NDBM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_DBHEADER_TRUE}" && test -z "${HAVE_DBHEADER_FALSE}"; then - as_fn_error "conditional \"HAVE_DBHEADER\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${have_err_h_TRUE}" && test -z "${have_err_h_FALSE}"; then - as_fn_error "conditional \"have_err_h\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${have_ifaddrs_h_TRUE}" && test -z "${have_ifaddrs_h_FALSE}"; then - as_fn_error "conditional \"have_ifaddrs_h\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${have_search_h_TRUE}" && test -z "${have_search_h_FALSE}"; then - as_fn_error "conditional \"have_search_h\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${have_vis_h_TRUE}" && test -z "${have_vis_h_FALSE}"; then - as_fn_error "conditional \"have_vis_h\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${have_glob_h_TRUE}" && test -z "${have_glob_h_FALSE}"; then - as_fn_error "conditional \"have_glob_h\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${have_cgetent_TRUE}" && test -z "${have_cgetent_FALSE}"; then - as_fn_error "conditional \"have_cgetent\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${have_fnmatch_h_TRUE}" && test -z "${have_fnmatch_h_FALSE}"; then - as_fn_error "conditional \"have_fnmatch_h\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${have_socket_wrapper_TRUE}" && test -z "${have_socket_wrapper_FALSE}"; then - as_fn_error "conditional \"have_socket_wrapper\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${OTP_TRUE}" && test -z "${OTP_FALSE}"; then - as_fn_error "conditional \"OTP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${have_gcd_TRUE}" && test -z "${have_gcd_FALSE}"; then - as_fn_error "conditional \"have_gcd\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${CATMAN_TRUE}" && test -z "${CATMAN_FALSE}"; then - as_fn_error "conditional \"CATMAN\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_X_TRUE}" && test -z "${HAVE_X_FALSE}"; then - as_fn_error "conditional \"HAVE_X\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${NEED_WRITEAUTH_TRUE}" && test -z "${NEED_WRITEAUTH_FALSE}"; then - as_fn_error "conditional \"NEED_WRITEAUTH\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${KCM_TRUE}" && test -z "${KCM_FALSE}"; then - as_fn_error "conditional \"KCM\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${FRAMEWORK_SECURITY_TRUE}" && test -z "${FRAMEWORK_SECURITY_FALSE}"; then - as_fn_error "conditional \"FRAMEWORK_SECURITY\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${LIBEDIT_TRUE}" && test -z "${LIBEDIT_FALSE}"; then - as_fn_error "conditional \"LIBEDIT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${COM_ERR_TRUE}" && test -z "${COM_ERR_FALSE}"; then - as_fn_error "conditional \"COM_ERR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HEIMDAL_DOCUMENTATION_TRUE}" && test -z "${HEIMDAL_DOCUMENTATION_FALSE}"; then - as_fn_error "conditional \"HEIMDAL_DOCUMENTATION\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by Heimdal $as_me 1.5.3, which was -generated by GNU Autoconf 2.65. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -Heimdal config.status 1.5.3 -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2009 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -nm_file_list_spec \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; - "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - "include/gssapi/Makefile") CONFIG_FILES="$CONFIG_FILES include/gssapi/Makefile" ;; - "include/hcrypto/Makefile") CONFIG_FILES="$CONFIG_FILES include/hcrypto/Makefile" ;; - "include/kadm5/Makefile") CONFIG_FILES="$CONFIG_FILES include/kadm5/Makefile" ;; - "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; - "base/Makefile") CONFIG_FILES="$CONFIG_FILES base/Makefile" ;; - "lib/asn1/Makefile") CONFIG_FILES="$CONFIG_FILES lib/asn1/Makefile" ;; - "lib/com_err/Makefile") CONFIG_FILES="$CONFIG_FILES lib/com_err/Makefile" ;; - "lib/hcrypto/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hcrypto/Makefile" ;; - "lib/hx509/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hx509/Makefile" ;; - "lib/gssapi/Makefile") CONFIG_FILES="$CONFIG_FILES lib/gssapi/Makefile" ;; - "lib/ntlm/Makefile") CONFIG_FILES="$CONFIG_FILES lib/ntlm/Makefile" ;; - "lib/hdb/Makefile") CONFIG_FILES="$CONFIG_FILES lib/hdb/Makefile" ;; - "lib/ipc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/ipc/Makefile" ;; - "lib/kadm5/Makefile") CONFIG_FILES="$CONFIG_FILES lib/kadm5/Makefile" ;; - "lib/kafs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/kafs/Makefile" ;; - "lib/kdfs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/kdfs/Makefile" ;; - "lib/krb5/Makefile") CONFIG_FILES="$CONFIG_FILES lib/krb5/Makefile" ;; - "lib/otp/Makefile") CONFIG_FILES="$CONFIG_FILES lib/otp/Makefile" ;; - "lib/roken/Makefile") CONFIG_FILES="$CONFIG_FILES lib/roken/Makefile" ;; - "lib/sl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sl/Makefile" ;; - "lib/sqlite/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sqlite/Makefile" ;; - "lib/vers/Makefile") CONFIG_FILES="$CONFIG_FILES lib/vers/Makefile" ;; - "lib/wind/Makefile") CONFIG_FILES="$CONFIG_FILES lib/wind/Makefile" ;; - "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; - "kuser/Makefile") CONFIG_FILES="$CONFIG_FILES kuser/Makefile" ;; - "kpasswd/Makefile") CONFIG_FILES="$CONFIG_FILES kpasswd/Makefile" ;; - "kadmin/Makefile") CONFIG_FILES="$CONFIG_FILES kadmin/Makefile" ;; - "admin/Makefile") CONFIG_FILES="$CONFIG_FILES admin/Makefile" ;; - "kcm/Makefile") CONFIG_FILES="$CONFIG_FILES kcm/Makefile" ;; - "kdc/Makefile") CONFIG_FILES="$CONFIG_FILES kdc/Makefile" ;; - "appl/Makefile") CONFIG_FILES="$CONFIG_FILES appl/Makefile" ;; - "appl/afsutil/Makefile") CONFIG_FILES="$CONFIG_FILES appl/afsutil/Makefile" ;; - "appl/ftp/Makefile") CONFIG_FILES="$CONFIG_FILES appl/ftp/Makefile" ;; - "appl/ftp/common/Makefile") CONFIG_FILES="$CONFIG_FILES appl/ftp/common/Makefile" ;; - "appl/ftp/ftp/Makefile") CONFIG_FILES="$CONFIG_FILES appl/ftp/ftp/Makefile" ;; - "appl/ftp/ftpd/Makefile") CONFIG_FILES="$CONFIG_FILES appl/ftp/ftpd/Makefile" ;; - "appl/gssmask/Makefile") CONFIG_FILES="$CONFIG_FILES appl/gssmask/Makefile" ;; - "appl/kx/Makefile") CONFIG_FILES="$CONFIG_FILES appl/kx/Makefile" ;; - "appl/login/Makefile") CONFIG_FILES="$CONFIG_FILES appl/login/Makefile" ;; - "appl/otp/Makefile") CONFIG_FILES="$CONFIG_FILES appl/otp/Makefile" ;; - "appl/popper/Makefile") CONFIG_FILES="$CONFIG_FILES appl/popper/Makefile" ;; - "appl/push/Makefile") CONFIG_FILES="$CONFIG_FILES appl/push/Makefile" ;; - "appl/rsh/Makefile") CONFIG_FILES="$CONFIG_FILES appl/rsh/Makefile" ;; - "appl/rcp/Makefile") CONFIG_FILES="$CONFIG_FILES appl/rcp/Makefile" ;; - "appl/su/Makefile") CONFIG_FILES="$CONFIG_FILES appl/su/Makefile" ;; - "appl/xnlock/Makefile") CONFIG_FILES="$CONFIG_FILES appl/xnlock/Makefile" ;; - "appl/telnet/Makefile") CONFIG_FILES="$CONFIG_FILES appl/telnet/Makefile" ;; - "appl/telnet/libtelnet/Makefile") CONFIG_FILES="$CONFIG_FILES appl/telnet/libtelnet/Makefile" ;; - "appl/telnet/telnet/Makefile") CONFIG_FILES="$CONFIG_FILES appl/telnet/telnet/Makefile" ;; - "appl/telnet/telnetd/Makefile") CONFIG_FILES="$CONFIG_FILES appl/telnet/telnetd/Makefile" ;; - "appl/test/Makefile") CONFIG_FILES="$CONFIG_FILES appl/test/Makefile" ;; - "appl/kf/Makefile") CONFIG_FILES="$CONFIG_FILES appl/kf/Makefile" ;; - "appl/dceutils/Makefile") CONFIG_FILES="$CONFIG_FILES appl/dceutils/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "tests/bin/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bin/Makefile" ;; - "tests/can/Makefile") CONFIG_FILES="$CONFIG_FILES tests/can/Makefile" ;; - "tests/db/Makefile") CONFIG_FILES="$CONFIG_FILES tests/db/Makefile" ;; - "tests/kdc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/kdc/Makefile" ;; - "tests/ldap/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ldap/Makefile" ;; - "tests/gss/Makefile") CONFIG_FILES="$CONFIG_FILES tests/gss/Makefile" ;; - "tests/java/Makefile") CONFIG_FILES="$CONFIG_FILES tests/java/Makefile" ;; - "tests/plugin/Makefile") CONFIG_FILES="$CONFIG_FILES tests/plugin/Makefile" ;; - "packages/Makefile") CONFIG_FILES="$CONFIG_FILES packages/Makefile" ;; - "packages/mac/Makefile") CONFIG_FILES="$CONFIG_FILES packages/mac/Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and in which our libraries should be installed. -lt_sysroot=$lt_sysroot - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi - -# -# CONFIG_SUBDIRS section. -# -if test "$no_recursion" != yes; then - - # Remove --cache-file, --srcdir, and --disable-option-checking arguments - # so they do not pile up. - ac_sub_configure_args= - ac_prev= - eval "set x $ac_configure_args" - shift - for ac_arg - do - if test -n "$ac_prev"; then - ac_prev= - continue - fi - case $ac_arg in - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ - | --c=*) - ;; - --config-cache | -C) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - ;; - --disable-option-checking) - ;; - *) - case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_sub_configure_args " '$ac_arg'" ;; - esac - done - - # Always prepend --prefix to ensure using the same prefix - # in subdir configurations. - ac_arg="--prefix=$prefix" - case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" - - # Pass --silent - if test "$silent" = yes; then - ac_sub_configure_args="--silent $ac_sub_configure_args" - fi - - # Always prepend --disable-option-checking to silence warnings, since - # different subdirs can have different --enable and --with options. - ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" - - ac_popdir=`pwd` - for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - test -d "$srcdir/$ac_dir" || continue - - ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - cd "$ac_dir" - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f "$ac_srcdir/configure.gnu"; then - ac_sub_configure=$ac_srcdir/configure.gnu - elif test -f "$ac_srcdir/configure"; then - ac_sub_configure=$ac_srcdir/configure - elif test -f "$ac_srcdir/configure.in"; then - # This should be Cygnus configure. - ac_sub_configure=$ac_aux_dir/configure - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - # Make the cache file name correct relative to the subdirectory. - case $cache_file in - [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; - *) # Relative name. - ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} - # The eval makes quoting arguments work. - eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ - --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || - as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 - fi - - cd "$ac_popdir" - done -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - - -cat > include/newversion.h.in </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 diff --git a/kerberosV/src/configure.ac b/kerberosV/src/configure.ac deleted file mode 100644 index 3c5226273de..00000000000 --- a/kerberosV/src/configure.ac +++ /dev/null @@ -1,704 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_REVISION($Revision: 1.2 $) -AC_PREREQ(2.62) -test -z "$CFLAGS" && CFLAGS="-g" -AC_INIT([Heimdal],[1.5.3],[heimdal-bugs@h5l.org]) -AC_CONFIG_SRCDIR([kuser/kinit.c]) -AC_CONFIG_HEADERS(include/config.h) -AC_CONFIG_MACRO_DIR([cf]) - -AM_INIT_AUTOMAKE([foreign 1.10.3]) -AM_MAINTAINER_MODE - -dnl Checks for programs. -AC_PROG_CC -AM_PROG_CC_C_O -AC_PROG_CPP -AC_PROG_LIBTOOL - -AC_PREFIX_DEFAULT(/usr/heimdal) - -test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc' -test "$localstatedir" = '${prefix}/var' && localstatedir='/var/heimdal' - -AC_CANONICAL_HOST -CANONICAL_HOST=$host -AC_SUBST(CANONICAL_HOST) - -rk_SYS_LARGEFILE - -rk_AIX -rk_IRIX -rk_SUNOS - -dnl -dnl this is needed to run the configure tests against glibc -dnl -AC_DEFINE([_GNU_SOURCE], 1, - [Define to enable extensions on glibc-based systems such as Linux.]) - -AC_OBJEXT -AC_EXEEXT - -dnl AC_KRB_PROG_YACC -AC_PROG_YACC -AM_PROG_LEX -dnl AC_PROG_RANLIB -AC_PROG_AWK -AC_KRB_PROG_LN_S - -AC_MIPS_ABI -CC="$CC $abi" -libdir="$libdir$abilibdirext" - -AC_C___ATTRIBUTE__ - -LT_PREREQ([2.2]) -LT_INIT([shared static win32-dll]) - -AM_CONDITIONAL(ENABLE_SHARED, test "$enable_shared" = "yes") -rk_VERSIONSCRIPT - -dnl -dnl Helper bits for cross compiling -dnl - - - -AM_CONDITIONAL(CROSS_COMPILE, test "${cross_compiling}" = yes) - -AC_ARG_WITH(cross-tools, - AS_HELP_STRING([--with-cross-tools=dir], [use cross tools in dir]), - [if test "$withval" = "yes"; then - AC_MSG_ERROR([Need path to cross tools]) - fi - with_cross_tools="${with_cross_tools}/" - ]) - -if test "${cross_compiling}" != yes ; then - - ASN1_COMPILE="\$(top_builddir)/lib/asn1/asn1_compile\$(EXEEXT)" - SLC="\$(top_builddir)/lib/sl/slc" - - ASN1_COMPILE_DEP="\$(ASN1_COMPILE)" - SLC_DEP="\$(SLC)" -else - ASN1_COMPILE="${with_cross_tools}asn1_compile" - SLC="${with_cross_tools}slc" - - ASN1_COMPILE_DEP= - SLC_DEP= - - ac_cv_prog_COMPILE_ET=${with_cross_tools}compile_et - -fi - -AC_SUBST([ASN1_COMPILE]) -AC_SUBST([ASN1_COMPILE_DEP]) -AC_SUBST([SLC]) -AC_SUBST([SLC_DEP]) - - -dnl --- - -AC_DEFINE(HEIM_WEAK_CRYPTO, 1, [Define if you want support for weak crypto]) - -rk_TEST_PACKAGE(openldap, -[#include -#include ], -[-lldap -llber],,,OPENLDAP) - -AC_ARG_ENABLE(hdb-openldap-module, - AS_HELP_STRING([--enable-hdb-openldap-module], - [if you want support to build openldap hdb as shared object])) -if test "$enable_hdb_openldap_module" = yes -a "$with_openldap" = yes; then - AC_DEFINE(OPENLDAP_MODULE, 1, [Define if you want support for hdb ldap module]) -fi -AM_CONDITIONAL(OPENLDAP_MODULE, test "$enable_hdb_openldap_module" = yes -a "$with_openldap" = yes) - -dnl -dnl Optional modules, pk-init, digest, kx509 -dnl - -AC_ARG_ENABLE(pk-init, - AS_HELP_STRING([--disable-pk-init], - [if you want disable to PK-INIT support])) -if test "$enable_pk_init" != no ;then - AC_DEFINE([PKINIT], 1, [Define to enable PKINIT.]) -fi -AM_CONDITIONAL(PKINIT, test "$enable_pk_init" != no) - -AC_ARG_ENABLE(digest, - AS_HELP_STRING([--disable-digest], - [if you want disable to DIGEST support])) -if test "$enable_digest" != no ;then - AC_DEFINE([DIGEST], 1, [Define to enable DIGEST.]) -fi - -AC_ARG_ENABLE(kx509, - AS_HELP_STRING([--disable-kx509], - [if you want disable to kx509 support])) -if test "$enable_kx509" != no ;then - AC_DEFINE([KX509], 1, [Define to enable kx509.]) -fi - -dnl Need to test if pkg-config exists -PKG_PROG_PKG_CONFIG - -dnl libcap-ng -AC_ARG_WITH([capng], - AC_HELP_STRING([--with-capng], [use libcap-ng to drop KDC privileges @<:@default=check@:>@]), - [], - [with_capng=check]) -if test "$with_capng" != "no"; then - PKG_CHECK_MODULES([CAPNG], [libcap-ng >= 0.4.0], - [with_capng=yes],[with_capng=no]) -fi -if test "$with_capng" = "yes"; then - AC_DEFINE_UNQUOTED([HAVE_CAPNG], 1, [whether capng is available for privilege reduction]) -fi -AM_CONDITIONAL([HAVE_CAPNG], [test "$with_capng" != "no"]) -AC_SUBST([CAPNG_CFLAGS]) -AC_SUBST([CAPNG_LIBS]) - -dnl Check for sqlite -rk_TEST_PACKAGE(sqlite3, -[#include -#ifndef SQLITE_OPEN_CREATE -#error "old version" -#endif], -[-lsqlite3],,,SQLITE3) - -if test "X$with_sqlite3" != Xyes ; then - INCLUDE_sqlite3="-I\$(top_srcdir)/lib/sqlite" - LIB_sqlite3="\$(top_builddir)/lib/sqlite/libheimsqlite.la" -fi -AM_CONDITIONAL(SQLITE3, test "X$with_sqlite3" = Xyes) - -AC_DEFINE(HAVE_SQLITE3, 1, [Define if you want support for sqlite in Heimdal.]) - -AC_ARG_ENABLE(sqlite-cache, - AS_HELP_STRING([--disable-sqlite-cache],[if you want support for cache in sqlite])) -if test "$enable_sqlite_cache" != no; then - AC_DEFINE(HAVE_SCC, 1, [Define if you want support for cache in sqlite.]) -fi -AM_CONDITIONAL(have_scc, test "$enable_sqlite_cache" != no) - - -dnl check for libintl -rk_TEST_PACKAGE(libintl, -[#include ], -[-lintl],,,LIBINTL) - -dnl path where the hdb directory is stored -AC_ARG_WITH([hdbdir], - [AS_HELP_STRING([--with-hdbdir],[Default location for KDC database @<:@default=/var/heimdal@:>@])], - [], - [with_hdbdir=/var/heimdal]) -DIR_hdbdir="$with_hdbdir" -AC_SUBST([DIR_hdbdir]) - - -dnl no kerberos4 any more -with_krb4=no -AC_SUBST(INCLUDE_krb4) -AC_SUBST(LIB_krb4) -AM_CONDITIONAL(KRB4, false) - -AM_CONDITIONAL(KRB5, true) -AM_CONDITIONAL(do_roken_rename, true) - -AC_DEFINE(SUPPORT_INETD, 1, [Enable use of inetd style startup.])dnl - - -AC_DEFINE(KRB5, 1, [Enable Kerberos 5 support in applications.])dnl -AC_SUBST(LIB_kdb)dnl - -KRB_CRYPTO - -KRB_PTHREADS - -AC_ARG_ENABLE(dce, - AS_HELP_STRING([--enable-dce],[if you want support for DCE/DFS PAG's])) -if test "$enable_dce" = yes; then - AC_DEFINE(DCE, 1, [Define if you want support for DCE/DFS PAG's.]) -fi -AM_CONDITIONAL(DCE, test "$enable_dce" = yes) - -## XXX quite horrible: -if test -f /etc/ibmcxx.cfg; then - dpagaix_ldadd=`sed -n '/^xlc_r4/,/^$/p' /etc/ibmcxx.cfg | sed -n -e '/libraries/{;s/^[[^=]]*=\(.*\)/\1/;s/,/ /gp;}'` - dpagaix_cflags=`sed -n '/^xlc_r4/,/^$/p' /etc/ibmcxx.cfg | sed -n -e '/options/{;s/^[[^=]]*=\(.*\)/\1/;s/-q[^,]*//;s/,/ /gp;}'` - dpagaix_ldflags= -else - dpagaix_cflags="-D_THREAD_SAFE -D_AIX_PTHREADS_D7 -D_AIX32_THREADS=1 -D_AES_SOURCE -D_AIX41 -I/usr/include/dce" - dpagaix_ldadd="-L/usr/lib/threads -ldcelibc_r -ldcepthreads -lpthreads_compat lpthreads -lc_r" - dpagaix_ldflags="-Wl,-bI:dfspag.exp" -fi -AC_SUBST(dpagaix_cflags) -AC_SUBST(dpagaix_ldadd) -AC_SUBST(dpagaix_ldflags) - -AC_ARG_ENABLE([afs-support], - AS_HELP_STRING([--disable-afs-support],[if you don't want support for AFS])) -if test "$enable_afs_support" = no; then - AC_DEFINE(NO_AFS, 1, [Define if you don't wan't support for AFS.]) - NO_AFS="1" -fi -AC_SUBST(NO_AFS)dnl - -rk_DB - -dnl AC_ROKEN(10,[/usr/heimdal /usr/athena],[lib/roken],[$(top_builddir)/lib/roken/libroken.la],[-I$(top_builddir)/lib/roken -I$(top_srcdir)/lib/roken]) - -rk_ROKEN(lib/roken) -LIBADD_roken="$LIB_roken" -AC_SUBST(LIBADD_roken)dnl -LIB_roken="\$(top_builddir)/lib/vers/libvers.la $LIB_roken" - -rk_OTP - -rk_LIBDISPATCH - -AC_CHECK_OSFC2 - -AC_ARG_ENABLE(mmap, - AS_HELP_STRING([--disable-mmap],[disable use of mmap])) -if test "$enable_mmap" = "no"; then - AC_DEFINE(NO_MMAP, 1, [Define if you don't want to use mmap.]) -fi - -AC_ARG_ENABLE(afs-string-to-key, - AS_HELP_STRING([--disable-afs-string-to-key], - [disable use of weak AFS string-to-key functions]), - [], [enable_afs_string_to_key=yes]) - -if test "$enable_afs_string_to_key" = "yes"; then - AC_DEFINE(ENABLE_AFS_STRING_TO_KEY, 1, [Define if want to use the weak AFS string to key functions.]) -fi - - -rk_CHECK_MAN - -rk_TEST_PACKAGE(readline, -[#include -#if defined(HAVE_READLINE_READLINE_H) -#include -#elif defined(HAVE_READLINE_H) -#include -#endif -],-lreadline,,, READLINE,, [readline.h readline/readline.h]) - -rk_TEST_PACKAGE(libedit, -[#include -#if defined(HAVE_READLINE_READLINE_H) -#include -#elif defined(HAVE_READLINE_H) -#include -#endif -],-ledit,,, READLINE,, [readline.h readline/readline.h]) - -AC_CONFIG_SUBDIRS([lib/libedit]) - -rk_TEST_PACKAGE(hesiod,[#include ],-lhesiod,,, HESIOD) - -KRB_C_BIGENDIAN -AC_C_INLINE - -KRB_CHECK_X - -AM_CONDITIONAL(HAVE_X, test "$no_x" != yes) - -AC_CHECK_XAU - -dnl AM_C_PROTOTYPES - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_OFF_T -AC_CHECK_TYPE_EXTRA(mode_t, unsigned short, []) -AC_CHECK_TYPE_EXTRA(sig_atomic_t, int, [#include ]) -AC_HAVE_TYPE([long long]) -AC_HEADER_TIME -AC_STRUCT_TM - -dnl Checks for header files. -AC_HEADER_STDC - -AC_CHECK_HEADERS([\ - CommonCrypto/CommonDigest.h \ - CommonCrypto/CommonCryptor.h \ - arpa/ftp.h \ - arpa/telnet.h \ - bind/bitypes.h \ - bsdsetjmp.h \ - curses.h \ - dlfcn.h \ - execinfo.h \ - fnmatch.h \ - inttypes.h \ - io.h \ - libutil.h \ - limits.h \ - maillock.h \ - netgroup.h \ - netinet/in6_machtypes.h \ - pthread.h \ - pty.h \ - sac.h \ - sgtty.h \ - siad.h \ - signal.h \ - strings.h \ - stropts.h \ - sys/bitypes.h \ - sys/category.h \ - sys/file.h \ - sys/filio.h \ - sys/ioccom.h \ - sys/mman.h \ - sys/param.h \ - sys/pty.h \ - sys/ptyio.h \ - sys/select.h \ - sys/socket.h \ - sys/str_tty.h \ - sys/stream.h \ - sys/stropts.h \ - sys/syscall.h \ - sys/termio.h \ - sys/timeb.h \ - sys/times.h \ - sys/types.h \ - sys/un.h \ - locale.h \ - termcap.h \ - termio.h \ - termios.h \ - time.h \ - tmpdir.h \ - udb.h \ - util.h \ - utmp.h \ - utmpx.h \ -]) - -dnl On Solaris 8 there's a compilation warning for term.h because -dnl it doesn't define `bool'. -AC_CHECK_HEADERS(term.h, , , -) - -dnl aix have asl.h (A/IX screen library) that we don't want -AC_CHECK_HEADERS(asl.h, , , [ -#include -#ifndef ASL_STRING_EMERG -#error ASL_STRING_EMERG missing -#endif]) - -AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT -#if HAVE_SYS_SOCKET_H -#include -#endif]) - -AC_CHECK_HEADERS(sys/ptyvar.h, , , [AC_INCLUDES_DEFAULT -#if HAVE_SYS_TTY_H -#include -#endif]) - -AC_CHECK_HEADERS(sys/strtty.h, , , [AC_INCLUDES_DEFAULT -#if HAVE_TERMIOS_H -#include -#endif -#if HAVE_SYS_STREAM_H -#include -#endif]) - -AC_CHECK_HEADERS(sys/ucred.h, , , [AC_INCLUDES_DEFAULT -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_PARAM_H -#include -#endif]) - -AC_CHECK_HEADERS(security/pam_modules.h, , , [AC_INCLUDES_DEFAULT -#include -]) - -dnl export symbols -rk_WIN32_EXPORT(BUILD_KRB5_LIB, KRB5_LIB) -rk_WIN32_EXPORT(BUILD_ROKEN_LIB, ROKEN_LIB) -rk_WIN32_EXPORT(BUILD_GSSAPI_LIB, GSSAPI_LIB) - -dnl Checks for libraries. - -AC_FIND_FUNC_NO_LIBS(logwtmp, util,[ -#ifdef HAVE_UTIL_H -#include -#endif -],[0,0,0]) -AC_FIND_FUNC_NO_LIBS(logout, util,[ -#ifdef HAVE_UTIL_H -#include -#endif -],[0]) -AC_FIND_FUNC_NO_LIBS(openpty, util,[ -#ifdef HAVE_UTIL_H -#include -#endif -],[0,0,0,0,0]) - -AC_FIND_FUNC_NO_LIBS(tgetent, termcap ncurses curses,[ -#ifdef HAVE_TERMCAP_H -#include -#endif -#ifdef HAVE_CURSES_H -#include -#endif -],[0,0]) - -dnl Checks for library functions. - -AC_CHECK_FUNCS([ \ - _getpty \ - _scrsize \ - arc4random \ - backtrace \ - fcntl \ - getpeereid \ - getpeerucred \ - grantpt \ - mktime \ - ptsname \ - rand \ - revoke \ - select \ - setitimer \ - setpcred \ - setpgid \ - setproctitle \ - setregid \ - setresgid \ - setresuid \ - setreuid \ - setsid \ - setutent \ - sigaction \ - strstr \ - ttyname \ - ttyslot \ - umask \ - unlockpt \ - vhangup \ - yp_get_default_domain \ -]) - -AC_MSG_CHECKING([checking for __sync_add_and_fetch]) -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[unsigned int foo, bar; bar = __sync_add_and_fetch(&foo, 1);]])], - [ac_rk_have___sync_add_and_fetch=yes], [ac_rk_have___sync_add_and_fetch=no]) -if test "$ac_rk_have___sync_add_and_fetch" = "yes" ; then - AC_DEFINE_UNQUOTED(HAVE___SYNC_ADD_AND_FETCH, 1, [have __sync_add_and_fetch]) -fi -AC_MSG_RESULT($ac_rk_have___sync_add_and_fetch) - -AC_FUNC_MMAP - -KRB_CAPABILITIES - -AC_CHECK_GETPWNAM_R_POSIX - -dnl detect doors on solaris -if test "$enable_pthread_support" != no; then - saved_LIBS="$LIBS" - LIBS="$LIBS $PTHREADS_LIBS" - AC_FIND_FUNC_NO_LIBS(door_create, door) - LIBS="$saved_LIBS" -fi - -AC_ARG_ENABLE(kcm, - AS_HELP_STRING([--enable-kcm],[enable Kerberos Credentials Manager]), -,[enable_kcm=yes]) - -if test "$enable_kcm" = yes ; then - if test "$ac_cv_header_sys_un_h" != yes -a "$ac_cv_funclib_door_create" != yes ; then - enable_kcm=no - fi -fi -if test "$enable_kcm" = yes; then - AC_DEFINE(HAVE_KCM, 1, - [Define if you want to use the Kerberos Credentials Manager.]) -fi -AM_CONDITIONAL(KCM, test "$enable_kcm" = yes) - - - -dnl Cray stuff -AC_CHECK_FUNCS(getudbnam setlim) - -dnl AC_KRB_FUNC_GETCWD_BROKEN - -dnl -dnl Check for fields in struct utmp -dnl - -AC_HAVE_STRUCT_FIELD(struct utmp, ut_addr, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmp, ut_host, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmp, ut_id, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmp, ut_pid, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmp, ut_type, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmp, ut_user, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmpx, ut_host, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmpx, ut_id, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmpx, ut_line, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmpx, ut_pid, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmpx, ut_tv, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmpx, ut_type, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmpx, ut_user, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmpx, ut_exit, [#include ]) -AC_HAVE_STRUCT_FIELD(struct utmpx, ut_syslen, [#include ]) - -AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, - u_int8_t, u_int16_t, u_int32_t, u_int64_t, - uint8_t, uint16_t, uint32_t, uint64_t],,,[ -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif -]) - -rk_FRAMEWORK_SECURITY - -KRB_READLINE - -rk_TELNET - -dnl Some operating systems already have com_err and compile_et -CHECK_COMPILE_ET - -rk_AUTH_MODULES([sia afskauthlib]) - -rk_DESTDIRS - -rk_WFLAGS([-Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs]) - - -AH_BOTTOM([#ifdef __APPLE__ -#include -#endif]) - -AH_BOTTOM([#ifdef ROKEN_RENAME -#include "roken_rename.h" -#endif]) - -AC_ARG_ENABLE(heimdal-documentation, - AS_HELP_STRING([--disable-heimdal-documentation], - [if you want disable to heimdal documentation])) -AM_CONDITIONAL(HEIMDAL_DOCUMENTATION, test "$enable_heimdal_documentation" != no) - -AC_CONFIG_FILES(Makefile \ - etc/Makefile \ - include/Makefile \ - include/gssapi/Makefile \ - include/hcrypto/Makefile \ - include/kadm5/Makefile \ - lib/Makefile \ - base/Makefile \ - lib/asn1/Makefile \ - lib/com_err/Makefile \ - lib/hcrypto/Makefile \ - lib/hx509/Makefile \ - lib/gssapi/Makefile \ - lib/ntlm/Makefile \ - lib/hdb/Makefile \ - lib/ipc/Makefile \ - lib/kadm5/Makefile \ - lib/kafs/Makefile \ - lib/kdfs/Makefile \ - lib/krb5/Makefile \ - lib/otp/Makefile \ - lib/roken/Makefile \ - lib/sl/Makefile \ - lib/sqlite/Makefile \ - lib/vers/Makefile \ - lib/wind/Makefile \ - po/Makefile \ - kuser/Makefile \ - kpasswd/Makefile \ - kadmin/Makefile \ - admin/Makefile \ - kcm/Makefile \ - kdc/Makefile \ - appl/Makefile \ - appl/afsutil/Makefile \ - appl/ftp/Makefile \ - appl/ftp/common/Makefile \ - appl/ftp/ftp/Makefile \ - appl/ftp/ftpd/Makefile \ - appl/gssmask/Makefile \ - appl/kx/Makefile \ - appl/login/Makefile \ - appl/otp/Makefile \ - appl/popper/Makefile \ - appl/push/Makefile \ - appl/rsh/Makefile \ - appl/rcp/Makefile \ - appl/su/Makefile \ - appl/xnlock/Makefile \ - appl/telnet/Makefile \ - appl/telnet/libtelnet/Makefile \ - appl/telnet/telnet/Makefile \ - appl/telnet/telnetd/Makefile \ - appl/test/Makefile \ - appl/kf/Makefile \ - appl/dceutils/Makefile \ - tests/Makefile \ - tests/bin/Makefile \ - tests/can/Makefile \ - tests/db/Makefile \ - tests/kdc/Makefile \ - tests/ldap/Makefile \ - tests/gss/Makefile \ - tests/java/Makefile \ - tests/plugin/Makefile \ - packages/Makefile \ - packages/mac/Makefile \ - doc/Makefile \ - tools/Makefile \ -) - -AC_OUTPUT - -dnl -dnl This is the release version name-number[beta] -dnl - -cat > include/newversion.h.in </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 diff --git a/kerberosV/src/depcomp b/kerberosV/src/depcomp deleted file mode 100755 index df8eea7e4ce..00000000000 --- a/kerberosV/src/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/kerberosV/src/doc/Makefile.am b/kerberosV/src/doc/Makefile.am deleted file mode 100644 index 6729ae9c9be..00000000000 --- a/kerberosV/src/doc/Makefile.am +++ /dev/null @@ -1,144 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:41 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AUTOMAKE_OPTIONS = no-texinfo.tex - -MAKEINFOFLAGS = --css-include=$(srcdir)/heimdal.css - -TEXI2DVI = true # ARGH, make distcheck can't be disabled to not build dvifiles - -info_TEXINFOS = heimdal.texi hx509.texi - -dxy_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \ - -e 's,[@]objdir[@],.,g' \ - -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' - -hcrypto.dxy: hcrypto.din Makefile - $(dxy_subst) < $(srcdir)/hcrypto.din > hcrypto.dxy.tmp - chmod +x hcrypto.dxy.tmp - mv hcrypto.dxy.tmp hcrypto.dxy - -hdb.dxy: hdb.din Makefile - $(dxy_subst) < $(srcdir)/hdb.din > hdb.dxy.tmp - chmod +x hdb.dxy.tmp - mv hdb.dxy.tmp hdb.dxy - -hx509.dxy: hx509.din Makefile - $(dxy_subst) < $(srcdir)/hx509.din > hx509.dxy.tmp - chmod +x hx509.dxy.tmp - mv hx509.dxy.tmp hx509.dxy - -gssapi.dxy: gssapi.din Makefile - $(dxy_subst) < $(srcdir)/gssapi.din > gssapi.dxy.tmp - chmod +x gssapi.dxy.tmp - mv gssapi.dxy.tmp gssapi.dxy - -krb5.dxy: krb5.din Makefile - $(dxy_subst) < $(srcdir)/krb5.din > krb5.dxy.tmp - chmod +x krb5.dxy.tmp - mv krb5.dxy.tmp krb5.dxy - -ntlm.dxy: ntlm.din Makefile - $(dxy_subst) < $(srcdir)/ntlm.din > ntlm.dxy.tmp - chmod +x ntlm.dxy.tmp - mv ntlm.dxy.tmp ntlm.dxy - -wind.dxy: wind.din Makefile - $(dxy_subst) < $(srcdir)/wind.din > wind.dxy.tmp - chmod +x wind.dxy.tmp - mv wind.dxy.tmp wind.dxy - -texi_subst = sed -e 's,[@]dbdir[@],$(localstatedir),g' \ - -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' - -vars.texi: vars.tin Makefile - $(texi_subst) < $(srcdir)/vars.tin > vars.texi.tmp - chmod +x vars.texi.tmp - mv vars.texi.tmp vars.texi - -PROJECTS = hcrypto hdb hx509 gssapi krb5 ntlm wind - -doxyout doxygen: hdb.dxy hx509.dxy hcrypto.dxy gssapi.dxy krb5.dxy ntlm.dxy wind.dxy - @find $(srcdir)/doxyout -type d ! -perm -200 -exec chmod u+w {} ';' ; \ - rm -rf $(srcdir)/doxyout ; \ - mkdir $(srcdir)/doxyout ; \ - for a in $(PROJECTS) ; do \ - echo $$a ; \ - doxygen $$a.dxy; \ - (cd $(srcdir)/doxyout && find $$a/man -type f > $$a/manpages ) ; \ - done - -install-data-hook: install-doxygen-manpage -uninstall-hook: uninstall-doxygen-manpage -dist-hook: doxygen - -install-doxygen-manpage: - for a in $(PROJECTS) ; do \ - f="$(srcdir)/doxyout/$$a/manpages" ; \ - test -f $$f || continue ; \ - echo "install $$a manual pages $$(wc -l < $$f)" ; \ - while read x ; do \ - section=`echo "$$x" | sed 's/.*\.\([0-9]\)/\1/'` ; \ - $(mkinstalldirs) "$(DESTDIR)$(mandir)/man$$section" ; \ - $(INSTALL_DATA) $(srcdir)/doxyout/$$x "$(DESTDIR)$(mandir)/man$$section" ; \ - done < $$f ; \ - done ; exit 0 - -uninstall-doxygen-manpage: - @for a in $(PROJECTS) ; do \ - f="$(srcdir)/doxyout/$$a/manpages" ; \ - test -f $$f || continue ; \ - echo "removing $$a manual pages" ; \ - while read x ; do \ - section=`echo "$$x" | sed 's/.*\.\([0-9]\)/\1/'` ; \ - base=`basename $$x` ; \ - rm "$(DESTDIR)$(mandir)/man$$section/$$base" ; \ - done < $$f ; \ - done - - -heimdal_TEXINFOS = \ - ack.texi \ - apps.texi \ - copyright.texi \ - heimdal.texi \ - install.texi \ - intro.texi \ - kerberos4.texi \ - migration.texi \ - misc.texi \ - programming.texi \ - setup.texi \ - vars.texi \ - whatis.texi \ - win2k.texi - -EXTRA_DIST = \ - NTMakefile \ - doxyout \ - footer.html \ - gssapi.din \ - hdb.din \ - hcrypto.din \ - header.html \ - heimdal.css \ - hx509.din \ - krb5.din \ - ntlm.din \ - init-creds \ - latin1.tex \ - layman.asc \ - doxytmpl.dxy \ - wind.din \ - vars.tin - -CLEANFILES = \ - hcrypto.dxy* \ - hx509.dxy* \ - hdb.dxy* \ - gssapi.dxy* \ - krb5.dxy* \ - ntlm.dxy* \ - wind.dxy* \ - vars.texi* diff --git a/kerberosV/src/doc/Makefile.in b/kerberosV/src/doc/Makefile.in deleted file mode 100644 index 08526b31cc2..00000000000 --- a/kerberosV/src/doc/Makefile.in +++ /dev/null @@ -1,1123 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:41 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:41 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:41 robert Exp $ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(heimdal_TEXINFOS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common mdate-sh -subdir = doc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -INFO_DEPS = $(srcdir)/heimdal.info $(srcdir)/hx509.info -am__TEXINFO_TEX_DIR = $(srcdir) -DVIS = heimdal.dvi hx509.dvi -PDFS = heimdal.pdf hx509.pdf -PSS = heimdal.ps hx509.ps -HTMLS = heimdal.html hx509.html -TEXINFOS = heimdal.texi hx509.texi -TEXI2PDF = $(TEXI2DVI) --pdf --batch -MAKEINFOHTML = $(MAKEINFO) --html -AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) -DVIPS = dvips -am__installdirs = "$(DESTDIR)$(infodir)" -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -AUTOMAKE_OPTIONS = no-texinfo.tex -MAKEINFOFLAGS = --css-include=$(srcdir)/heimdal.css -TEXI2DVI = true # ARGH, make distcheck can't be disabled to not build dvifiles -info_TEXINFOS = heimdal.texi hx509.texi -dxy_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' \ - -e 's,[@]objdir[@],.,g' \ - -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' - -texi_subst = sed -e 's,[@]dbdir[@],$(localstatedir),g' \ - -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' - -PROJECTS = hcrypto hdb hx509 gssapi krb5 ntlm wind -heimdal_TEXINFOS = \ - ack.texi \ - apps.texi \ - copyright.texi \ - heimdal.texi \ - install.texi \ - intro.texi \ - kerberos4.texi \ - migration.texi \ - misc.texi \ - programming.texi \ - setup.texi \ - vars.texi \ - whatis.texi \ - win2k.texi - -EXTRA_DIST = \ - NTMakefile \ - doxyout \ - footer.html \ - gssapi.din \ - hdb.din \ - hcrypto.din \ - header.html \ - heimdal.css \ - hx509.din \ - krb5.din \ - ntlm.din \ - init-creds \ - latin1.tex \ - layman.asc \ - doxytmpl.dxy \ - wind.din \ - vars.tin - -CLEANFILES = \ - hcrypto.dxy* \ - hx509.dxy* \ - hdb.dxy* \ - gssapi.dxy* \ - krb5.dxy* \ - ntlm.dxy* \ - wind.dxy* \ - vars.texi* - -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .dvi .html .info .pdf .ps .texi -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign doc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -.texi.info: - restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - am__cwd=`pwd` && $(am__cd) $(srcdir) && \ - rm -rf $$backupdir && mkdir $$backupdir && \ - if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ - for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ - if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ - done; \ - else :; fi && \ - cd "$$am__cwd"; \ - if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $@ $<; \ - then \ - rc=0; \ - $(am__cd) $(srcdir); \ - else \ - rc=$$?; \ - $(am__cd) $(srcdir) && \ - $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ - fi; \ - rm -rf $$backupdir; exit $$rc - -.texi.dvi: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2DVI) $< - -.texi.pdf: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2PDF) $< - -.texi.html: - rm -rf $(@:.html=.htp) - if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $(@:.html=.htp) $<; \ - then \ - rm -rf $@; \ - if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ - mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ - else \ - if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ - rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ - exit 1; \ - fi -$(srcdir)/heimdal.info: heimdal.texi $(heimdal_TEXINFOS) -heimdal.dvi: heimdal.texi $(heimdal_TEXINFOS) -heimdal.pdf: heimdal.texi $(heimdal_TEXINFOS) -heimdal.html: heimdal.texi $(heimdal_TEXINFOS) -$(srcdir)/hx509.info: hx509.texi -hx509.dvi: hx509.texi -hx509.pdf: hx509.texi -hx509.html: hx509.texi -.dvi.ps: - TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ - $(DVIPS) -o $@ $< - -uninstall-dvi-am: - @$(NORMAL_UNINSTALL) - @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ - rm -f "$(DESTDIR)$(dvidir)/$$f"; \ - done - -uninstall-html-am: - @$(NORMAL_UNINSTALL) - @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ - rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ - done - -uninstall-info-am: - @$(PRE_UNINSTALL) - @if test -d '$(DESTDIR)$(infodir)' && \ - (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ - if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ - then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ - done; \ - else :; fi - @$(NORMAL_UNINSTALL) - @list='$(INFO_DEPS)'; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ - echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ - rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ - else :; fi); \ - done - -uninstall-pdf-am: - @$(NORMAL_UNINSTALL) - @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ - done - -uninstall-ps-am: - @$(NORMAL_UNINSTALL) - @list='$(PSS)'; test -n "$(psdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ - rm -f "$(DESTDIR)$(psdir)/$$f"; \ - done - -dist-info: $(INFO_DEPS) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - list='$(INFO_DEPS)'; \ - for base in $$list; do \ - case $$base in \ - $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ - esac; \ - if test -f $$base; then d=.; else d=$(srcdir); fi; \ - base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ - for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ - if test -f $$file; then \ - relfile=`expr "$$file" : "$$d/\(.*\)"`; \ - test -f "$(distdir)/$$relfile" || \ - cp -p $$file "$(distdir)/$$relfile"; \ - else :; fi; \ - done; \ - done - -mostlyclean-aminfo: - -rm -rf heimdal.aux heimdal.cp heimdal.cps heimdal.fn heimdal.fns \ - heimdal.ky heimdal.kys heimdal.log heimdal.pg heimdal.tmp \ - heimdal.toc heimdal.tp heimdal.tps heimdal.vr heimdal.vrs \ - hx509.aux hx509.cp hx509.cps hx509.fn hx509.fns hx509.ky \ - hx509.kys hx509.log hx509.pg hx509.tmp hx509.toc hx509.tp \ - hx509.tps hx509.vr hx509.vrs - -clean-aminfo: - -test -z "heimdal.dvi heimdal.pdf heimdal.ps heimdal.html hx509.dvi hx509.pdf \ - hx509.ps hx509.html" \ - || rm -rf heimdal.dvi heimdal.pdf heimdal.ps heimdal.html hx509.dvi hx509.pdf \ - hx509.ps hx509.html - -maintainer-clean-aminfo: - @list='$(INFO_DEPS)'; for i in $$list; do \ - i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ - echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ - rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ - done -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-info dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(INFO_DEPS) all-local -installdirs: - for dir in "$(DESTDIR)$(infodir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: $(DVIS) - -html: html-am - -html-am: $(HTMLS) - -info: info-am - -info-am: $(INFO_DEPS) - -install-data-am: install-info-am - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: $(DVIS) - @$(NORMAL_INSTALL) - test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" - @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ - done -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: $(HTMLS) - @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" - @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ - for p in $$list; do \ - if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ - $(am__strip_dir) \ - if test -d "$$d$$p"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ - $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ - echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ - else \ - list2="$$list2 $$d$$p"; \ - fi; \ - done; \ - test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ - done; } -install-info: install-info-am - -install-info-am: $(INFO_DEPS) - @$(NORMAL_INSTALL) - test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ - for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - esac; \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ - file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ - for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ - $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ - if test -f $$ifile; then \ - echo "$$ifile"; \ - else : ; fi; \ - done; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done - @$(POST_INSTALL) - @if (install-info --version && \ - install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ - for file in $$list; do \ - relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ - install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ - done; \ - else : ; fi -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: $(PDFS) - @$(NORMAL_INSTALL) - test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" - @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done -install-ps: install-ps-am - -install-ps-am: $(PSS) - @$(NORMAL_INSTALL) - test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" - @list='$(PSS)'; test -n "$(psdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-aminfo \ - maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: $(PDFS) - -ps: ps-am - -ps-am: $(PSS) - -uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ - uninstall-pdf-am uninstall-ps-am - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: all all-am all-local check check-am check-local clean \ - clean-aminfo clean-generic clean-libtool dist-hook dist-info \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-aminfo \ - maintainer-clean-generic mostlyclean mostlyclean-aminfo \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-dvi-am uninstall-hook \ - uninstall-html-am uninstall-info-am uninstall-pdf-am \ - uninstall-ps-am - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -hcrypto.dxy: hcrypto.din Makefile - $(dxy_subst) < $(srcdir)/hcrypto.din > hcrypto.dxy.tmp - chmod +x hcrypto.dxy.tmp - mv hcrypto.dxy.tmp hcrypto.dxy - -hdb.dxy: hdb.din Makefile - $(dxy_subst) < $(srcdir)/hdb.din > hdb.dxy.tmp - chmod +x hdb.dxy.tmp - mv hdb.dxy.tmp hdb.dxy - -hx509.dxy: hx509.din Makefile - $(dxy_subst) < $(srcdir)/hx509.din > hx509.dxy.tmp - chmod +x hx509.dxy.tmp - mv hx509.dxy.tmp hx509.dxy - -gssapi.dxy: gssapi.din Makefile - $(dxy_subst) < $(srcdir)/gssapi.din > gssapi.dxy.tmp - chmod +x gssapi.dxy.tmp - mv gssapi.dxy.tmp gssapi.dxy - -krb5.dxy: krb5.din Makefile - $(dxy_subst) < $(srcdir)/krb5.din > krb5.dxy.tmp - chmod +x krb5.dxy.tmp - mv krb5.dxy.tmp krb5.dxy - -ntlm.dxy: ntlm.din Makefile - $(dxy_subst) < $(srcdir)/ntlm.din > ntlm.dxy.tmp - chmod +x ntlm.dxy.tmp - mv ntlm.dxy.tmp ntlm.dxy - -wind.dxy: wind.din Makefile - $(dxy_subst) < $(srcdir)/wind.din > wind.dxy.tmp - chmod +x wind.dxy.tmp - mv wind.dxy.tmp wind.dxy - -vars.texi: vars.tin Makefile - $(texi_subst) < $(srcdir)/vars.tin > vars.texi.tmp - chmod +x vars.texi.tmp - mv vars.texi.tmp vars.texi - -doxyout doxygen: hdb.dxy hx509.dxy hcrypto.dxy gssapi.dxy krb5.dxy ntlm.dxy wind.dxy - @find $(srcdir)/doxyout -type d ! -perm -200 -exec chmod u+w {} ';' ; \ - rm -rf $(srcdir)/doxyout ; \ - mkdir $(srcdir)/doxyout ; \ - for a in $(PROJECTS) ; do \ - echo $$a ; \ - doxygen $$a.dxy; \ - (cd $(srcdir)/doxyout && find $$a/man -type f > $$a/manpages ) ; \ - done - -install-data-hook: install-doxygen-manpage -uninstall-hook: uninstall-doxygen-manpage -dist-hook: doxygen - -install-doxygen-manpage: - for a in $(PROJECTS) ; do \ - f="$(srcdir)/doxyout/$$a/manpages" ; \ - test -f $$f || continue ; \ - echo "install $$a manual pages $$(wc -l < $$f)" ; \ - while read x ; do \ - section=`echo "$$x" | sed 's/.*\.\([0-9]\)/\1/'` ; \ - $(mkinstalldirs) "$(DESTDIR)$(mandir)/man$$section" ; \ - $(INSTALL_DATA) $(srcdir)/doxyout/$$x "$(DESTDIR)$(mandir)/man$$section" ; \ - done < $$f ; \ - done ; exit 0 - -uninstall-doxygen-manpage: - @for a in $(PROJECTS) ; do \ - f="$(srcdir)/doxyout/$$a/manpages" ; \ - test -f $$f || continue ; \ - echo "removing $$a manual pages" ; \ - while read x ; do \ - section=`echo "$$x" | sed 's/.*\.\([0-9]\)/\1/'` ; \ - base=`basename $$x` ; \ - rm "$(DESTDIR)$(mandir)/man$$section/$$base" ; \ - done < $$f ; \ - done - -# 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/kerberosV/src/doc/NTMakefile b/kerberosV/src/doc/NTMakefile deleted file mode 100644 index 4894983cec5..00000000000 --- a/kerberosV/src/doc/NTMakefile +++ /dev/null @@ -1,119 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=doc - -!include ../windows/NTMakefile.w32 - -heimdal_TEXINFOS = \ - $(OBJ)\ack.texi \ - $(OBJ)\apps.texi \ - $(OBJ)\copyright.texi \ - $(OBJ)\heimdal.texi \ - $(OBJ)\install.texi \ - $(OBJ)\intro.texi \ - $(OBJ)\kerberos4.texi \ - $(OBJ)\migration.texi \ - $(OBJ)\misc.texi \ - $(OBJ)\programming.texi \ - $(OBJ)\setup.texi \ - $(OBJ)\vars.texi \ - $(OBJ)\whatis.texi \ - $(OBJ)\win2k.texi - -hx509_TEXINFOS = \ - $(OBJ)\hx509.texi - -{}.texi{$(OBJ)}.texi: - $(CP) $** $@ - -{}.tin{$(OBJ)}.texi: - $(SED) -e "s,[@]dbdir[@],x,g" \ - -e "s,[@]PACKAGE_VERSION[@],$(VER_PACKAGE_VERSION),g" < $** > $@ - -MAKEINFOFLAGS = --css-include=$(SRCDIR)/heimdal.css - -###################################################################### -# Build heimdal.chm - -# Copyrights-and-Licenses.html is where the table of contents ends up -# when generating HTML output using makeinfo. Same goes for -# How-to-use-the-PKCS11-module.html below. - -$(OBJ)\heimdal\index.html $(OBJ)\heimdal\Copyrights-and-Licenses.html: $(heimdal_TEXINFOS) - cd $(OBJ) - $(MAKEINFO) $(MAKEINFOFLAGS) --html heimdal.texi - cd $(SRCDIR) - -$(OBJ)\heimdal\toc.hhc: $(OBJ)\heimdal\Copyrights-and-Licenses.html - $(PERL) $(SRC)\cf\w32-hh-toc-from-info.pl -o$@ $** - -$(OBJ)\heimdal\heimdal.hhp: heimdal.hhp - $(CP) $** $@ - -$(DOCDIR)\heimdal.chm: $(OBJ)\heimdal\heimdal.hhp $(OBJ)\heimdal\toc.hhc - cd $(OBJ)\heimdal - -$(HHC) heimdal.hhp - $(CP) heimdal.chm $@ - cd $(SRCDIR) - -###################################################################### -# Build hx509.chm - -$(OBJ)\hx509\index.html $(OBJ)\hx509\How-to-use-the-PKCS11-module.html: $(hx509_TEXINFOS) - cd $(OBJ) - $(MAKEINFO) $(MAKEINFOFLAGS) --html hx509.texi - cd $(SRCDIR) - -$(OBJ)\hx509\toc.hhc: $(OBJ)\hx509\How-to-use-the-PKCS11-module.html - $(PERL) $(SRC)\cf\w32-hh-toc-from-info.pl -o$@ $** - -$(OBJ)\hx509\hx509.hhp: hx509.hhp - $(CP) $** $@ - -$(DOCDIR)\hx509.chm: $(OBJ)\hx509\hx509.hhp $(OBJ)\hx509\toc.hhc - cd $(OBJ)\hx509 - -$(HHC) hx509.hhp - $(CP) hx509.chm $@ - cd $(SRCDIR) - -!ifndef NO_DOC -all:: $(OBJ)\heimdal\index.html $(OBJ)\hx509\index.html \ - $(DOCDIR)\heimdal.chm $(DOCDIR)\hx509.chm -!endif - -clean:: - -$(RM) $(OBJ)\heimdal\*.* - -$(RM) $(OBJ)\hx509\*.* - -$(RM) $(DOCDIR)\heimdal.chm - -$(RM) $(DOCDIR)\hx509.chm - -.SUFFIXES: .texi .tin diff --git a/kerberosV/src/doc/ack.texi b/kerberosV/src/doc/ack.texi deleted file mode 100644 index f55e3b88caf..00000000000 --- a/kerberosV/src/doc/ack.texi +++ /dev/null @@ -1,124 +0,0 @@ -@c $Id: ack.texi,v 1.2 2013/06/17 18:57:41 robert Exp $ - -@node Acknowledgments, Copyrights and Licenses, Migration, Top -@comment node-name, next, previous, up -@appendix Acknowledgments - -Eric Young wrote ``libdes''. Heimdal used to use libdes, without it -kth-krb would never have existed. Since there are no longer any Eric -Young code left in the library, we renamed it to libhcrypto. - -All functions in libhcrypto have been re-implemented or used available -public domain code. The core AES function where written by Vincent -Rijmen, Antoon Bosselaers and Paulo Barreto. The core DES SBOX -transformation was written by Richard Outerbridge. @code{imath} that -is used for public key crypto support is written by Michael -J. Fromberger. - -The University of California at Berkeley initially wrote @code{telnet}, -and @code{telnetd}. The authentication and encryption code of -@code{telnet} and @code{telnetd} was added by David Borman (then of Cray -Research, Inc). The encryption code was removed when this was exported -and then added back by Juha Eskelinen. - -The @code{popper} was also a Berkeley program initially. - -Some of the functions in @file{libroken} also come from Berkeley by way -of NetBSD/FreeBSD. - -@code{editline} was written by Simmule Turner and Rich Salz. Heimdal -contains a modifed copy. - -The @code{getifaddrs} implementation for Linux was written by Hideaki -YOSHIFUJI for the Usagi project. - -The @code{pkcs11.h} headerfile was written by the Scute project. - -Bugfixes, documentation, encouragement, and code has been contributed by: -@table @asis -@item Alexander Boström -@item Allan McRae -@item Andrew Bartlett -@item Andrew Cobaugh -@item Andrew Tridge -@item Anton Lundin -@item Asanka Herath -@item Björn Grönvall -@item Björn Sandell -@item Björn Schlögl -@item Brandon S. Allbery KF8NH -@item Brian A May -@item Buck Huppmann -@item Cacdric Schieli -@item Chaskiel M Grundman -@item Christos Zoulas -@item Cizzi Storm -@item Daniel Kouril -@item David Love -@item David Markey -@item David R Boldt -@item Derrick J Brashear -@item Donald Norwood -@item Douglas E Engert -@item Frank van der Linden -@item Gabor Gombas -@item Guido Günther -@item Guillaume Rousse -@item Harald Barth -@item Ingo Schwarze -@item Jacques A. Vidrine -@item Jaideep Padhye -@item Jan Rekorajski -@item Jason McIntyre -@item Jeffrey Altman -@item Jelmer Vernooij -@item Joerg Pulz -@item Johan Danielsson -@item Johan Gadsjö -@item Johan Ihrén -@item John Center -@item Jun-ichiro itojun Hagino -@item KAMADA Ken'ichi -@item Kamen Mazdrashki -@item Karolin Seeger -@item Ken Hornstein -@item Love Hörnquist Åstrand -@item Luke Howard -@item Magnus Ahltorp -@item Magnus Holmberg -@item Marc Horowitz -@item Mario Strasser -@item Mark Eichin -@item Martin von Gagern -@item Matthias Dieter Wallnöfer -@item Matthieu Patou -@item Mattias Amnefelt -@item Michael B Allen -@item Michael Fromberger -@item Michal Vocu -@item Milosz Kmieciak -@item Miroslav Ruda -@item Mustafa A. Hashmi -@item Nicolas Williams -@item Patrik Lundin -@item Petr Holub -@item Phil Fisher -@item Rafal Malinowski -@item Ragnar Sundblad -@item Rainer Toebbicke -@item Richard Nyberg -@item Roland C. Dowdeswell -@item Roman Divacky -@item Russ Allbery -@item Sho Hosoda, 細田 将 -@item Simon Wilkinson -@item Stefan Metzmacher -@item Ted Percival -@item Tom Payerle -@item Victor Guerra -@item Zeqing Xia -@item Åke Sandgren -@item and we hope that those not mentioned here will forgive us. -@end table - -All bugs were introduced by ourselves. diff --git a/kerberosV/src/doc/apps.texi b/kerberosV/src/doc/apps.texi deleted file mode 100644 index d4d7c7f1aef..00000000000 --- a/kerberosV/src/doc/apps.texi +++ /dev/null @@ -1,270 +0,0 @@ -@c $Id: apps.texi,v 1.2 2013/06/17 18:57:41 robert Exp $ - -@node Applications, Things in search for a better place, Setting up a realm, Top - -@chapter Applications - -@menu -* Authentication modules:: -* AFS:: -@end menu - -@node Authentication modules, AFS, Applications, Applications -@section Authentication modules - -The problem of having different authentication mechanisms has been -recognised by several vendors, and several solutions have appeared. In -most cases these solutions involve some kind of shared modules that are -loaded at run-time. Modules for some of these systems can be found in -@file{lib/auth}. Presently there are modules for Digital's SIA, -and IRIX' @code{login} and @code{xdm} (in -@file{lib/auth/afskauthlib}). - -@menu -* Digital SIA:: -* IRIX:: -@end menu - -@node Digital SIA, IRIX, Authentication modules, Authentication modules -@subsection Digital SIA - -How to install the SIA module depends on which OS version you're -running. Tru64 5.0 has a new command, @file{siacfg}, which makes this -process quite simple. If you have this program, you should just be able -to run: -@example -siacfg -a KRB5 /usr/athena/lib/libsia_krb5.so -@end example - -On older versions, or if you want to do it by hand, you have to do the -following (not tested by us on Tru64 5.0): - -@itemize @bullet - -@item -Make sure @file{libsia_krb5.so} is available in -@file{/usr/athena/lib}. If @file{/usr/athena} is not on local disk, you -might want to put it in @file{/usr/shlib} or someplace else. If you do, -you'll have to edit @file{krb5_matrix.conf} to reflect the new location -(you will also have to do this if you installed in some other directory -than @file{/usr/athena}). If you built with shared libraries, you will -have to copy the shared @file{libkrb.so}, @file{libdes.so}, -@file{libkadm.so}, and @file{libkafs.so} to a place where the loader can -find them (such as @file{/usr/shlib}). -@item -Copy (your possibly edited) @file{krb5_matrix.conf} to @file{/etc/sia}. -@item -Apply @file{security.patch} to @file{/sbin/init.d/security}. -@item -Turn on KRB5 security by issuing @kbd{rcmgr set SECURITY KRB5} and -@kbd{rcmgr set KRB5_MATRIX_CONF krb5_matrix.conf}. -@item -Digital thinks you should reboot your machine, but that really shouldn't -be necessary. It's usually sufficient just to run -@kbd{/sbin/init.d/security start} (and restart any applications that use -SIA, like @code{xdm}.) -@end itemize - -Users with local passwords (like @samp{root}) should be able to login -safely. - -When using Digital's xdm the @samp{KRB5CCNAME} environment variable isn't -passed along as it should (since xdm zaps the environment). Instead you -have to set @samp{KRB5CCNAME} to the correct value in -@file{/usr/lib/X11/xdm/Xsession}. Add a line similar to -@example -KRB5CCNAME=FILE:/tmp/krb5cc`id -u`_`ps -o ppid= -p $$`; export KRB5CCNAME -@end example -If you use CDE, @code{dtlogin} allows you to specify which additional -environment variables it should export. To add @samp{KRB5CCNAME} to this -list, edit @file{/usr/dt/config/Xconfig}, and look for the definition of -@samp{exportList}. You want to add something like: -@example -Dtlogin.exportList: KRB5CCNAME -@end example - -@subsubheading Notes to users with Enhanced security - -Digital's @samp{ENHANCED} (C2) security, and Kerberos solve 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. - -@itemize @bullet -@item -Replace all occurrences of @file{krb5_matrix.conf} with -@file{krb5+c2_matrix.conf} in the directions above. -@item -You must enable ``vouching'' in the @samp{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 @samp{edauth} to edit the -default entry @kbd{/usr/tcb/bin/edauth -dd default}, and add a -@samp{d_accept_alternate_vouching} capability, if not already present. -@item -For each user who does @emph{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 @samp{default} table. To do this use @samp{edauth} to -set (or change) the @samp{u_exp} capability to @samp{u_exp#0}. -@item -You also need to be aware that the shipped @file{login}, @file{rcp}, and -@file{rshd}, don't do any particular C2 magic (such as checking for -various forms of disabled accounts), so if you rely on those features, -you shouldn't use those programs. If you configure with -@samp{--enable-osfc2}, these programs will, however, set the login -UID. Still: use at your own risk. -@end itemize - -At present @samp{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. - -@strong{Remember}, if you do these changes you will get a system that -most certainly does @emph{not} fulfil 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. - -@node IRIX, , Digital SIA, Authentication modules -@subsection IRIX - -The IRIX support is a module that is compatible with Transarc's -@file{afskauthlib.so}. It should work with all programs that use this -library. This should include @command{login} and @command{xdm}. - -The interface is not very documented but it seems that you have to copy -@file{libkafs.so}, @file{libkrb.so}, and @file{libdes.so} to -@file{/usr/lib}, or build your @file{afskauthlib.so} statically. - -The @file{afskauthlib.so} itself is able to reside in -@file{/usr/vice/etc}, @file{/usr/afsws/lib}, or the current directory -(wherever that is). - -IRIX 6.4 and newer seem to have all programs (including @command{xdm} and -@command{login}) in the N32 object format, whereas in older versions they -were O32. For it to work, the @file{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. - -Apart from this it should ``just work''; there are no configuration -files. - -Note that recent Irix 6.5 versions (at least 6.5.22) have PAM, -including a @file{pam_krb5.so} module. Not all relevant programs use -PAM, though, e.g.@: @command{ssh}. In particular, for console -graphical login you need to turn off @samp{visuallogin} and turn on -@samp{xdm} with @command{chkconfig}. - -@node AFS, , Authentication modules, Applications -@section AFS - -@cindex AFS -AFS is a distributed filesystem that uses Kerberos for authentication. - -@cindex OpenAFS -@cindex Arla -For more information about AFS see OpenAFS -@url{http://www.openafs.org/} and Arla -@url{http://www.stacken.kth.se/projekt/arla/}. - -@subsection kafs and afslog -@cindex afslog - -@manpage{afslog,1} will obtains AFS tokens for a number of cells. What cells to get -tokens for can either be specified as an explicit list, as file paths to -get tokens for, or be left unspecified, in which case will use whatever -magic @manpage{kafs,3} decides upon. - -If not told what cell to get credentials for, @manpage{kafs,3} will -search for the files ThisCell and TheseCells in the locations -specified in @manpage{kafs,3} and try to get tokens for these cells -and the cells specified in $HOME/.TheseCells. - -More usefully it will look at and ~/.TheseCells in your home directory -and for each line which is a cell get afs token for these cells. - -The TheseCells file defines the the cells to which applications on the -local client machine should try to aquire tokens for. It must reside in -the directories searched by @manpage{kafs,3} on every AFS client machine. - -The file is in ASCII format and contains one character string, the cell -name, per line. Cell names are case sensitive, but most cell names -are lower case. - -See manpage for @manpage{kafs,3} for search locations of ThisCell and TheseCells. - -@subsection How to get a KeyFile - -@file{ktutil -k AFSKEYFILE:KeyFile get afs@@MY.REALM} - -or you can extract it with kadmin - -@example -kadmin> ext -k AFSKEYFILE:/usr/afs/etc/KeyFile afs@@My.CELL.NAME -@end example - -You have to make sure you have a @code{des-cbc-md5} encryption type since that -is the enctype that will be converted. - -@subsection How to convert a srvtab to a KeyFile - -You need a @file{/usr/vice/etc/ThisCell} containing the cellname of your -AFS-cell. - -@file{ktutil copy krb4:/root/afs-srvtab AFSKEYFILE:/usr/afs/etc/KeyFile}. - -If keyfile already exists, this will add the new key in afs-srvtab to -KeyFile. - -@section Using 2b tokens with AFS - -@subsection What is 2b ? - -2b is the name of the proposal that was implemented to give basic -Kerberos 5 support to AFS in rxkad. It's not real Kerberos 5 support -since it still uses fcrypt for data encryption and not Kerberos -encryption types. - -Its only possible (in all cases) to do this for DES encryption types -because only then the token (the AFS equivalent of a ticket) will be -smaller than the maximum size that can fit in the token cache in the -OpenAFS/Transarc client. It is a so tight fit that some extra wrapping -on the ASN1/DER encoding is removed from the Kerberos ticket. - -2b uses a Kerberos 5 EncTicketPart instead of a Kerberos 4 ditto for -the part of the ticket that is encrypted with the service's key. The -client doesn't know what's inside the encrypted data so to the client -it doesn't matter. - -To differentiate between Kerberos 4 tickets and Kerberos 5 tickets, 2b -uses a special kvno, 213 for 2b tokens and 255 for Kerberos 5 tokens. - -Its a requirement that all AFS servers that support 2b also support -native Kerberos 5 in rxkad. - -@subsection Configuring a Heimdal kdc to use 2b tokens - -Support for 2b tokens in the kdc are turned on for specific principals -by adding them to the string list option @code{[kdc]use_2b} in the -kdc's @file{krb5.conf} file. - -@example -[kdc] - use_2b = @{ - afs@@SU.SE = yes - afs/it.su.se@@SU.SE = yes - @} -@end example - -@subsection Configuring AFS clients for 2b support - -There is no need to configure AFS clients for 2b support. The only -software that needs to be installed/upgrade is a Kerberos 5 enabled -@file{afslog}. diff --git a/kerberosV/src/doc/copyright.texi b/kerberosV/src/doc/copyright.texi deleted file mode 100644 index 490abbccee8..00000000000 --- a/kerberosV/src/doc/copyright.texi +++ /dev/null @@ -1,518 +0,0 @@ - -@macro copynext{} -@vskip 20pt plus 1fil -@end macro - -@macro copyrightstart{} -@end macro - -@macro copyrightend{} -@end macro - - -@node Copyrights and Licenses, , Acknowledgments, Top -@comment node-name, next, previous, up -@appendix Copyrights and Licenses - -@heading Kungliga Tekniska Högskolan - -@copyrightstart -@verbatim - -Copyright (c) 1997-2011 Kungliga Tekniska Högskolan -(Royal Institute of Technology, Stockholm, Sweden). -All rights reserved. - -Portions Copyright (c) 2009 Apple Inc. 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. - -@end verbatim -@copynext - -@heading Massachusetts Institute of Technology - -The parts of the libtelnet that handle Kerberos. - -@verbatim - -Copyright (C) 1990 by the Massachusetts Institute of Technology - -Export of this software from the United States of America may -require a specific license from the United States Government. -It is the responsibility of any person or organization contemplating -export to obtain such a license before exporting. - -WITHIN THAT CONSTRAINT, permission to use, copy, modify, and -distribute this software and its documentation for any purpose and -without fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright notice and -this permission notice appear in supporting documentation, and that -the name of M.I.T. not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. M.I.T. makes no representations about the suitability of -this software for any purpose. It is provided "as is" without express -or implied warranty. - -@end verbatim -@copynext - -@heading The Regents of the University of California - -The parts of the libroken, most of libtelnet, telnet, ftp, -and popper. - -@verbatim - -Copyright (c) 1988, 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. 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. - -@end verbatim -@copynext - -@heading The Regents of the University of California. - -libedit - -@verbatim - -Copyright (c) 1992, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Christos Zoulas of Cornell University. - -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 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. - -@end verbatim -@copynext - -@heading TomsFastMath / LibTomMath - -Tom's fast math (bignum support) and LibTomMath - -@verbatim - -LibTomMath is hereby released into the Public Domain. - -@end verbatim - -@copynext - -@heading Doug Rabson - -GSS-API mechglue layer. - -@verbatim - -Copyright (c) 2005 Doug Rabson -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. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - -@end verbatim -@copynext - -@heading PADL Software Pty Ltd - -@table @asis -@item GSS-API CFX, SPNEGO, naming extensions, API extensions. -@item KCM credential cache. -@item HDB LDAP backend. -@end table - -@verbatim - -Copyright (c) 2003-2011, PADL Software Pty Ltd. -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 PADL Software 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 PADL SOFTWARE 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 PADL SOFTWARE 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. - -@end verbatim -@copynext - -@heading Marko Kreen - -Fortuna in libhcrypto - -@verbatim - -Copyright (c) 2005 Marko Kreen -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. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - -@end verbatim -@copynext - -@heading NTT (Nippon Telegraph and Telephone Corporation) - -Camellia in libhcrypto - -@verbatim - -Copyright (c) 2006,2007 -NTT (Nippon Telegraph and Telephone Corporation) . 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 as - the first lines of this file unmodified. -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. - -THIS SOFTWARE IS PROVIDED BY NTT ``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 NTT 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. - -@end verbatim -@copynext - -@heading The NetBSD Foundation, Inc. - -vis.c in libroken - -@verbatim - -Copyright (c) 1999, 2005 The NetBSD Foundation, Inc. -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. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - -@end verbatim -@copynext - -@heading Vincent Rijmen, Antoon Bosselaers, Paulo Barreto - -AES in libhcrypto - -@verbatim - -rijndael-alg-fst.c - -@version 3.0 (December 2000) - -Optimised ANSI C code for the Rijndael cipher (now AES) - -@author Vincent Rijmen -@author Antoon Bosselaers -@author Paulo Barreto - -This code is hereby placed in the public domain. - -THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. - -@end verbatim -@copynext - -@heading Apple, Inc - -kdc/announce.c - -@verbatim - -Copyright (c) 2008 Apple Inc. All Rights Reserved. - -Export of this software from the United States of America may require -a specific license from the United States Government. It is the -responsibility of any person or organization contemplating export to -obtain such a license before exporting. - -WITHIN THAT CONSTRAINT, permission to use, copy, modify, and -distribute this software and its documentation for any purpose and -without fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright notice and -this permission notice appear in supporting documentation, and that -the name of Apple Inc. not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. Apple Inc. makes no representations about the suitability of -this software for any purpose. It is provided "as is" without express -or implied warranty. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - -@end verbatim - -@copynext - -@heading Richard Outerbridge - -DES core in libhcrypto - -@verbatim - -D3DES (V5.09) - - -A portable, public domain, version of the Data Encryption Standard. - -Written with Symantec's THINK (Lightspeed) C by Richard Outerbridge. -Thanks to: Dan Hoey for his excellent Initial and Inverse permutation -code; Jim Gillogly & Phil Karn for the DES key schedule code; Dennis -Ferguson, Eric Young and Dana How for comparing notes; and Ray Lau, -for humouring me on. - -Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge. -(GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992. - - -@end verbatim - -@copynext - -@heading Secure Endpoints Inc - -Windows support - -@verbatim - -Copyright (c) 2009, Secure Endpoints Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -- 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. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -COPYRIGHT HOLDER 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. - -@end verbatim - -@copynext - -@heading Novell, Inc - -lib/hcrypto/test_dh.c - -@verbatim - -Copyright (c) 2007, Novell, Inc. -Author: Matthias Koenig - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -* Neither the name of the Novell 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. - - -@end verbatim - -@copyrightend diff --git a/kerberosV/src/doc/doxyout/gssapi/html/doxygen.css b/kerberosV/src/doc/doxyout/gssapi/html/doxygen.css deleted file mode 100644 index 22c484301dd..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/doxygen.css +++ /dev/null @@ -1,473 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; -} -H1 { - text-align: center; - font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { - font-weight: bold -} -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navpath { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { - text-decoration: none; - background-color: #6666cc; - color: #ffffff -} -A.el { - text-decoration: none; - font-weight: bold -} -A.elRef { - font-weight: bold -} -A.code:link { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.code:visited { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.codeRef:link { - font-weight: normal; - color: #0000FF -} -A.codeRef:visited { - font-weight: normal; - color: #0000FF -} -A:hover { - text-decoration: none; - background-color: #f2f2ff -} -DL.el { - margin-left: -1cm -} -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: 90% -} -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { - text-align: center; -} -IMG.formulaDsp { -} -IMG.formulaInl { - vertical-align: middle; -} -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -SPAN.vhdldigit { color: #ff00ff } -SPAN.vhdlchar { color: #000000 } -SPAN.vhdlkeyword { color: #700070 } -SPAN.vhdllogic { color: #ff0000 } - -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { - color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { - font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { - background: #e8eef2; - font-weight: bold; -} -HR { - height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; - margin-left: 3px; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -/* these are for tree view when used as main index */ -.directory { - font-size: 9pt; - font-weight: bold; -} -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* The following two styles can be used to replace the root node title */ -/* with an image of your choice. Simply uncomment the next two styles, */ -/* specify the name of your image and be sure to set 'height' to the */ -/* proper pixel height of your image. */ - -/* .directory h3.swap { */ -/* height: 61px; */ -/* background-repeat: no-repeat; */ -/* background-image: url("yourimage.gif"); */ -/* } */ -/* .directory h3.swap span { */ -/* display: none; */ -/* } */ - -.directory > h3 { - margin-top: 0; -} -.directory p { - margin: 0px; - white-space: nowrap; -} -.directory div { - display: none; - margin: 0px; -} -.directory img { - vertical-align: -30%; -} -/* these are for tree view when not used as main index */ -.directory-alt { - font-size: 100%; - font-weight: bold; -} -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} -.directory-alt > h3 { - margin-top: 0; -} -.directory-alt p { - margin: 0px; - white-space: nowrap; -} -.directory-alt div { - display: none; - margin: 0px; -} -.directory-alt img { - vertical-align: -30%; -} - diff --git a/kerberosV/src/doc/doxyout/gssapi/html/doxygen.png b/kerberosV/src/doc/doxyout/gssapi/html/doxygen.png deleted file mode 100644 index f0a274bbaffdd67f6d784c894d9cf28729db0e14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1281 zcmaJ>ZA?>F7(Vx-ms?uoS`b@hdRtpo6o^%HU>M$hfGrBvQnk$LE?p^P!kn&ikhyq! zX~V@&tPF5Qt@V?oTL96Bi%aRiwbe1)9DWQI#?)=HxS7QSw`J`5fAJ*eJbB;uNuKA& zdERDo*{Y<(If(#(B$Lr#;nB(8Y#ia=ZCeW?JfPLuQY`=@cW$k}Rivq|vbxGrRq1Tl9;+(gNt?}UtVKM2`T5t1jLzuL@0UIs`S#vlhl4)^ zLgSYrPj@$+`|j?eSbXTmiHGkWxV8V}BzNR?pl9k_s4pDu9vd5a_UzZEPk)}Ad{AV_ zzddrjrh4=Imr`E06;LY{)YYt?o}L~H@7C}F^WB!Ra=v`Q0bj{>5&$66CWF>mf6vjP z2N>RRY6ZYa=K`76>+|_)Xdwko+7wv}7cN|btOhWb(*{sta~6b?S8Omrxw}!4`NhGr zZVpNqpu1@BE`QGWNTpEpcJVW5izu~2B^GlM?1(OPg)zwW;QcP@Ltcclm>XbJL9C|j z=9!2?ua=uIlf0%AndzHsRC}IyTL$EhAee(fdKB`?27KeS^2M8M_7b~PiCFO&r5LC7 z7gl1*a<8;SjNaw#h=843_AV9iZbWQOAp5YOC^&_F*9K0> zB|6%IDb?aM#3viTxkLU4aXg&@+CkNTOnQ1iMP*^?b|^lJy$4C)Zk4isV!|RZ*XhXh zw8q3$=*0LeGC!XI_Wc?dkT~3+*Gu%%yIqP+Wr3H$=&ROMQU6q}Ag^P~>c5vAEO;a- z_dK-3PPeKar%)6$j~vI2#*-YH!1h6HYVtwCX5_wM`iF#UKz&&@9Oo5w3%XGYrX zW>dY~)SG-((Yim%`InwgTvyRC?e=Wh^8KCao!R6Eg&TpVWUY1sN~4G}V?nFnEGo-; zHZ_$eW9-GnC%^WS9b z@p;-$oH#MtC0v>Q$HX%4^JdFdO$0cbv-W)Q TtK}Eh@>>I#ipmV1>S*>q-hkC} diff --git a/kerberosV/src/doc/doxyout/gssapi/html/graph_legend.dot b/kerberosV/src/doc/doxyout/gssapi/html/graph_legend.dot deleted file mode 100644 index 4df0f1aa486..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/graph_legend.dot +++ /dev/null @@ -1,22 +0,0 @@ -digraph G -{ - edge [fontname="FreeSans",fontsize=10,labelfontname="FreeSans",labelfontsize=10]; - node [fontname="FreeSans",fontsize=10,shape=record]; - Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",fillcolor="grey75",style="filled" fontcolor="black"]; - Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPublicBase.html"]; - Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="red",URL="$classTruncated.html"]; - Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="FreeSans"]; - Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classProtectedBase.html"]; - Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="FreeSans"]; - Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPrivateBase.html"]; - Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="grey75"]; - Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="FreeSans"]; - Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="FreeSans"]; - Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classUsed.html"]; -} diff --git a/kerberosV/src/doc/doxyout/gssapi/html/graph_legend.html b/kerberosV/src/doc/doxyout/gssapi/html/graph_legend.html deleted file mode 100644 index 37a4b794879..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/graph_legend.html +++ /dev/null @@ -1,88 +0,0 @@ - - -HeimdalGSS-APIlibrary: Graph Legend - - - -

-keyhole logo -

- - - -
-

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

-Consider the following example:

/*! Invisible class because of truncation */
-class Invisible { };
-
-/*! Truncated class, inheritance relation is hidden */
-class Truncated : public Invisible { };
-
-/* Class not documented with doxygen comments */
-class Undocumented { };
-
-/*! Class that is inherited using public inheritance */
-class PublicBase : public Truncated { };
-
-/*! A template class */
-template<class T> class Templ { };
-
-/*! Class that is inherited using protected inheritance */
-class ProtectedBase { };
-
-/*! Class that is inherited using private inheritance */
-class PrivateBase { };
-
-/*! Class that is used by the Inherited class */
-class Used { };
-
-/*! Super class that inherits a number of other classes */
-class Inherited : public PublicBase,
-                  protected ProtectedBase,
-                  private PrivateBase,
-                  public Undocumented,
-                  public Templ<int>
-{
-  private:
-    Used *m_usedClass;
-};
-
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

-

-graph_legend.png -
-

-The boxes in the above graph have the following meaning:

    -
  • -A filled gray box represents the struct or class for which the graph is generated.
  • -
  • -A box with a black border denotes a documented struct or class.
  • -
  • -A box with a grey border denotes an undocumented struct or class.
  • -
  • -A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • -
-The arrows have the following meaning:
    -
  • -A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • -
  • -A dark green arrow is used for protected inheritance.
  • -
  • -A dark red arrow is used for private inheritance.
  • -
  • -A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • -
  • -A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • -
-
-
-Generated on Sun Dec 9 14:10:34 2012 for HeimdalGSS-APIlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/gssapi/html/graph_legend.png b/kerberosV/src/doc/doxyout/gssapi/html/graph_legend.png deleted file mode 100644 index 9b96937bfd5f7a36ea8dbf2d64ed1bc0768f074d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4256 zcmbVQdpOkH_8+NND!Jtq6-jtSR7_-I$|WI0?zfSY$_$d3afzvf+>+dd5k>AJ%rwTO zToWRpOjQk;SpA-vZaxFm|)qS zZ0&nc$jcV$urMS*mT>5$AW~=+0-V=-hk3d;65QJTE=oj@xp?1=Mih?*SJGP9x;tMV zMGEN%60bmjDaijL58nc4RjF^hegOwU1I*ccRUmxdMkPM4ng0%#|DsH zA6uS>izR^x-*dYB+Y^@(q_fm3bgQzJ)xH_6x>lGwshWF+C5$5dh3sYD)tK+C6U)CD z^Xomarii5PA4v8qF_zz#buUwD?ro`8dC&7V-sShflU~*CBDZ04x4+3qE16W{eL_xd z3YaO}b1qpA9YL|0YKdw~2PzM=1=7+ItLm0+tST@%D(MNDzHR)+2t0d#|s}$9i(3xGzT8VL8o-ltIwH zpspqZeXR&2qA6r=nJVuhHO>d5w2$gp9i$H^6ROz!yNTjvm&9kupV73|GPJbXR%Sq0{>>GOn}^wshXC&C~6F@ zQEtikDzl-h2C}qRulGQ3fxzQMGiQH>nv}zkLLPr|qAC;3@PP$cr?(+-t?Wl3jb0<+ z#bCd_jVJ74%s*@eBjHtio7tZ>$BFt@%$M_C#AZgnzPm@&TXYQgE_Vo-ac(6wcJS^F zq)^14asP#Se^m*cnG^`{K>nXv_jhChvr_3s{zCkoqlsf=o8GQ>m@l2)em-YYT;u5A zvL(o`$7n~F&}`E{@&v375BP8e8N#D`H-e$%bEytQt-6o^PA%Dz4c-UeB{`~c4E<$L zY5E6~rKXj#P=fpct4bMP!auX;p7jtP@Li|`r|L0{yav|CLqtLNI5sNFr)16{NP2=B zyY+-Wnh;%3ctC&{8FU{!e29-)s6j~L{~V=%0`Mo=V6^am+1%z2<9r3tD~6uUPff|k zVx!)!?zoJ8FYTDC+V^!??@ z4c>lSL|BU?N^?Ew@NJxJzG9eMGFyR)(2&@Nt!t3%JLT|%6obYCChp}`hP)dkti;UH zm+B_wyb0#h=*|iH4Fx&x>#k_WnyfzU(!KMagDGGLWwz39qG2@`w4@&@8MH}K=hcV> zo@xJdqtMHqtZ+UobNt|FkIRV*_Z#K{{Bb)#j z9XM+oNQX|Dn7$9c4;PX=9NRr)QYm+3 z zx^AyiP)aaJ#E<#aI_Z4M0qo~}6_b{Fw7LjYEpq&2eP4e=;`V;2lQjooTv3dWIpwWu z2b1z&DZD^dJ%5Ah@TPsb?SUP1RZa2=43!k>cAI`kktGdN*#k}_EFYJBtdo09U?xBs z9K9CSx_e{=df>B<4TT_=s52}n^1IKq){xhJIZR<%sQ$rL)Ww)Yt%WkDo#ad}s&Gx5 z={);tH9sSrJ>yD-tu!$ob?tPKmFU3SdDt@i5ULq$P+JZ&rBZXITMM2R4_v1ibgOiq zMgY#(>xF-;&)HonG+sHE@%)-B1*r)@ga3!db-Vc_x}smbXU4=Ycmit0F{Z9Z=q9*k zSY@ypaOs8`MX!BUZQ8*PNmX5$J|!1|LUar)5#Wv*4#g@nfsebEcx9@8Xwfb0Q9P(} z=SQ6#aIE*x06hjIS#Bd%McoJc%>SXksuJY|iLLCE2cQVDS=q0ExRn*~`i=fOw%XSg zjPMNGM@azaROpa|{rz4!=+zKM?qLTssH`{-E+@6Hhis|f3;+_M-ZtTHa|~uvmR1gf ztc+og%<|DBdt%HY{wmosZ0Dwo_$k|E-l5uc@dsfQXM7S|Iz@BxYy&z}hOFW|~F{vQ0Osp+?FjWk}l^^`$3d&Um1 z?&sxr?AAGlD4Khy<_>4od`Bblh?&9%UY#-Jq!c|?kU+hLL^MH@`5+jaq0btJpn7*b#Oeh1GEn6atjaCyIWfr0OqB$o*_K7>Hw0 z?BwrA^UZy(f_CdPoNz0!X6_EX?r80CuKuJ>x7Nfyd8EE%k&D?|=iJJfS>IQjndp+} zQwBq!$`>mvPmG!I^V(%R)Gym_|72^0&$a-L)TN^qtKvF!jlxIo?PRq6kTb-X53|%h z?IKy}wPh>cXPpl!CgqlED%v-a$)H5&WV66^EQctD_=l_ z8tuq$z=3tBNHyzQ{oqHd0c`bijo3DfaK&P6ljOYB*yU$_@k`qhq8=mtA4jS1B1K(j zvo2FBwlJ2mJRPCUqlyR$(a}O)y*2{y;Q!N$t<@I0rtBY~s9-^ohW}mp>mSLEID_fCC?)BC#xQVv6?MP3l1#chr!wPGR>M7_ma= zq&T4QLL#pPdxWMc8$@t?@@dX?v6SXk)pHf5YJBDF1J==c$=Ycr+-OyqR^Hvbl3sPR z*>|+VVnI4^ix_q({i~Ss$FYFSvqug*Szu}$jsTR7w#ajG&vB+e-65%XO$A}#xf?z1 zg)!qcIUN0peM-ZkW0&88#R#(`yIXN3nMRX3+scl<5eJ{+iXh{t%uA$^_(QR&k?6b}K!<(1P zqwP4`%br=wo_WfO34*7x=@)Qk8fo1(!f2_Wx<|KCf>TXR>Fs0He*PA|d0Gy2j)&Wm z%VnPoVWk((0ZN^Z;9t1nfauExQsXD8>~~^(ibEcj>iyB>^{0^bacb(gZMDZOg!?o2 zVa@4%Q3kdQ_jg7p|GidA+;Dh4mlhvBOEsuq(9T4mj7oc$7JRBo7sK z*E^0e%k=;_*U4pQ>$TPd_p@|Nm&X+6SCcizU6^Uhlfh+H#~(#zENDe!uqZ){ma3WhTpgE+}F#p~*bqL)ZYn`y8- zBOJ+jO4A2S!yO<}KP2QQ_3v@|Y0!qSg0~x9LPU!Rsy0*lW)2#guxB_)5P-_Hzz)sa zrnuTszvZ!oPt?A{2s%#E?qLUMss-0P-a={w>U|QXvO8{_pDLhOoY0}ZSU>&a#hJ<$ zf4Q&uT+Go7?*M0-NYFE>V%3O24hlHr&CvTIS_##QeB#n}e(gAe6vWs=NZv-DofbkO zu7$-h7Q@{+$HyEaDZEwf6AwUFq;NBnTgsf5s%mT33zz?)Ep+-3VmZ8*J#3y~)Ura$ zpPFz&43@7o6>!a?EZ!3?!?z=`K9*}HvAgu@#TSq?Ptjq6-{ylGIr3f2q%wW0|I7*vVROWS&K z1ujjlesAY3i{h8`HADO2qu*4TzqaC^gbVQY}Bcx zdccd&Kl-bUFIRb=gLuNk3HsaqMMi`2e%ujt?uM0xCs*bj=EwvJFU`+a_d(+X)YjtG z8ViTUA+`cG73Cc^6!T_s=HK)o?m&=mp;4>0A$DnH#54&G^7{I|FO#0N%dZAibZ>6* z?nPYXp5X^8B9a_9oS$PjT-x+F#$I{v>ysq>cBG2e?JyMGV2r`NPxrsx8;iIjX^q~Dr;D*ylh diff --git a/kerberosV/src/doc/doxyout/gssapi/html/group__gssapi.html b/kerberosV/src/doc/doxyout/gssapi/html/group__gssapi.html deleted file mode 100644 index bfafa5ebe09..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/group__gssapi.html +++ /dev/null @@ -1,892 +0,0 @@ - - -HeimdalGSS-APIlibrary: Heimdal GSS-API functions - - - -

-keyhole logo -

- - - -
-

Heimdal GSS-API functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_add_oid_set_member (OM_uint32 *minor_status, const gss_OID member_oid, gss_OID_set *oid_set)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_wrap_iov (OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int *conf_state, gss_iov_buffer_desc *iov, int iov_count)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_unwrap_iov (OM_uint32 *minor_status, gss_ctx_id_t context_handle, int *conf_state, gss_qop_t *qop_state, gss_iov_buffer_desc *iov, int iov_count)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_wrap_iov_length (OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int *conf_state, gss_iov_buffer_desc *iov, int iov_count)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_release_iov_buffer (OM_uint32 *minor_status, gss_iov_buffer_desc *iov, int iov_count)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_canonicalize_name (OM_uint32 *minor_status, const gss_name_t input_name, const gss_OID mech_type, gss_name_t *output_name)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_import_name (OM_uint32 *minor_status, const gss_buffer_t input_name_buffer, const gss_OID input_name_type, gss_name_t *output_name)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_init_sec_context (OM_uint32 *minor_status, const gss_cred_id_t initiator_cred_handle, gss_ctx_id_t *context_handle, const gss_name_t target_name, const gss_OID input_mech_type, OM_uint32 req_flags, OM_uint32 time_req, const gss_channel_bindings_t input_chan_bindings, const gss_buffer_t input_token, gss_OID *actual_mech_type, gss_buffer_t output_token, OM_uint32 *ret_flags, OM_uint32 *time_rec)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_inquire_saslname_for_mech (OM_uint32 *minor_status, const gss_OID desired_mech, gss_buffer_t sasl_mech_name, gss_buffer_t mech_name, gss_buffer_t mech_description)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_inquire_attrs_for_mech (OM_uint32 *minor_status, gss_const_OID mech, gss_OID_set *mech_attr, gss_OID_set *known_mech_attrs)
GSSAPI_LIB_FUNCTION int
-GSSAPI_LIB_CALL 
gss_oid_equal (gss_const_OID a, gss_const_OID b)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_release_cred (OM_uint32 *minor_status, gss_cred_id_t *cred_handle)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_release_name (OM_uint32 *minor_status, gss_name_t *input_name)
GSSAPI_LIB_FUNCTION OM_uint32
-GSSAPI_LIB_CALL 
gss_wrap (OM_uint32 *minor_status, const gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, const gss_buffer_t input_message_buffer, int *conf_state, gss_buffer_t output_message_buffer)

Variables

gss_OID_desc GSSAPI_LIB_FUNCTION __gss_c_attr_stream_sizes_oid_desc
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_oid_set_member (OM_uint32 *  minor_status,
const gss_OID  member_oid,
gss_OID_set *  oid_set 
)
-
-
- -

-Add a oid to the oid set, function does not make a copy of the oid, so the pointer to member_oid needs to be stable for the whole time oid_set is used.

-If there is a duplicate member of the oid, the new member is not added to to the set.

-

Parameters:
- - - - -
minor_status minor status code.
member_oid member to add to the oid set
oid_set oid set to add the member too
-
-
Returns:
a gss_error code, see gss_display_status() about printing the error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_canonicalize_name (OM_uint32 *  minor_status,
const gss_name_t  input_name,
const gss_OID  mech_type,
gss_name_t *  output_name 
)
-
-
- -

-gss_canonicalize_name takes a Internal Name (IN) and converts in into a mechanism specific Mechanism Name (MN).

-The input name may multiple name, or generic name types.

-If the input_name if of the GSS_C_NT_USER_NAME, and the Kerberos mechanism is specified, the resulting MN type is a GSS_KRB5_NT_PRINCIPAL_NAME.

-For more information about internalVSmechname.

-

Parameters:
- - - - - -
minor_status minor status code.
input_name name to covert, unchanged by gss_canonicalize_name().
mech_type the type to convert Name too.
output_name the resulting type, release with gss_release_name(), independent of input_name.
-
-
Returns:
a gss_error code, see gss_display_status() about printing the error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_name (OM_uint32 *  minor_status,
const gss_buffer_t  input_name_buffer,
const gss_OID  input_name_type,
gss_name_t *  output_name 
)
-
-
- -

-Import a name internal or mechanism name

-Type of name and their format:

    -
  • GSS_C_NO_OID
  • GSS_C_NT_USER_NAME
  • GSS_C_NT_HOSTBASED_SERVICE
  • GSS_C_NT_EXPORT_NAME
  • GSS_C_NT_ANONYMOUS
  • GSS_KRB5_NT_PRINCIPAL_NAME
-

-For more information about internalVSmechname.

-

Parameters:
- - - - - -
minor_status minor status code
input_name_buffer import name buffer
input_name_type type of the import name buffer
output_name the resulting type, release with gss_release_name(), independent of input_name
-
-
Returns:
a gss_error code, see gss_display_status() about printing the error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_init_sec_context (OM_uint32 *  minor_status,
const gss_cred_id_t  initiator_cred_handle,
gss_ctx_id_t *  context_handle,
const gss_name_t  target_name,
const gss_OID  input_mech_type,
OM_uint32  req_flags,
OM_uint32  time_req,
const gss_channel_bindings_t  input_chan_bindings,
const gss_buffer_t  input_token,
gss_OID *  actual_mech_type,
gss_buffer_t  output_token,
OM_uint32 *  ret_flags,
OM_uint32 *  time_rec 
)
-
-
- -

-As the initiator build a context with an acceptor.

-Returns in the major

    -
  • GSS_S_COMPLETE - if the context if build
  • GSS_S_CONTINUE_NEEDED - if the caller needs to continue another round of gss_i nit_sec_context
  • error code - any other error code
-

-

Parameters:
- - - - - - - - - - - - - - -
minor_status minor status code.
initiator_cred_handle the credential to use when building the context, if GSS_C_NO_CREDENTIAL is passed, the default credential for the mechanism will be used.
context_handle a pointer to a context handle, will be returned as long as there is not an error.
target_name the target name of acceptor, created using gss_import_name(). The name is can be of any name types the mechanism supports, check supported name types with gss_inquire_names_for_mech().
input_mech_type mechanism type to use, if GSS_C_NO_OID is used, Kerberos (GSS_KRB5_MECHANISM) will be tried. Other available mechanism are listed in the GSS-API mechanisms section.
req_flags flags using when building the context, see Context creation flags
time_req time requested this context should be valid in seconds, common used value is GSS_C_INDEFINITE
input_chan_bindings Channel bindings used, if not exepected otherwise, used GSS_C_NO_CHANNEL_BINDINGS
input_token input token sent from the acceptor, for the initial packet the buffer of { NULL, 0 } should be used.
actual_mech_type the actual mech used, MUST NOT be freed since it pointing to static memory.
output_token if there is an output token, regardless of complete, continue_needed, or error it should be sent to the acceptor
ret_flags return what flags was negotitated, caller should check if they are accetable. For example, if GSS_C_MUTUAL_FLAG was negotiated with the acceptor or not.
time_rec amount of time this context is valid for
-
-
Returns:
a gss_error code, see gss_display_status() about printing the error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_attrs_for_mech (OM_uint32 *  minor_status,
gss_const_OID  mech,
gss_OID_set *  mech_attr,
gss_OID_set *  known_mech_attrs 
)
-
-
- -

-List support attributes for a mech and/or all mechanisms.

-

Parameters:
- - - - - -
minor_status minor status code
mech given together with mech_attr will return the list of attributes for mechanism, can optionally be GSS_C_NO_OID.
mech_attr see mech parameter, can optionally be NULL, release with gss_release_oid_set().
known_mech_attrs all attributes for mechanisms supported, release with gss_release_oid_set().
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_saslname_for_mech (OM_uint32 *  minor_status,
const gss_OID  desired_mech,
gss_buffer_t  sasl_mech_name,
gss_buffer_t  mech_name,
gss_buffer_t  mech_description 
)
-
-
- -

-Returns different protocol names and description of the mechanism.

-

Parameters:
- - - - - - -
minor_status minor status code
desired_mech mech list query
sasl_mech_name SASL GS2 protocol name
mech_name gssapi protocol name
mech_description description of gssapi mech
-
-
Returns:
returns GSS_S_COMPLETE or a error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL gss_oid_equal (gss_const_OID  a,
gss_const_OID  b 
)
-
-
- -

-Compare two GSS-API OIDs with each other.

-GSS_C_NO_OID matches nothing, not even it-self.

-

Parameters:
- - - -
a first oid to compare
b second oid to compare
-
-
Returns:
non-zero when both oid are the same OID, zero when they are not the same.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_cred (OM_uint32 *  minor_status,
gss_cred_id_t *  cred_handle 
)
-
-
- -

-Release a credentials

-Its ok to release the GSS_C_NO_CREDENTIAL/NULL credential, it will return a GSS_S_COMPLETE error code. On return cred_handle is set ot GSS_C_NO_CREDENTIAL.

-Example:

-

 gss_cred_id_t cred = GSS_C_NO_CREDENTIAL;
- major = gss_release_cred(&minor, &cred);
-

-

Parameters:
- - - -
minor_status minor status return code, mech specific
cred_handle a pointer to the credential too release
-
-
Returns:
an gssapi error code
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_iov_buffer (OM_uint32 *  minor_status,
gss_iov_buffer_desc *  iov,
int  iov_count 
)
-
-
- -

-Free all buffer allocated by gss_wrap_iov() or gss_unwrap_iov() by looking at the GSS_IOV_BUFFER_FLAG_ALLOCATED flag. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_name (OM_uint32 *  minor_status,
gss_name_t *  input_name 
)
-
-
- -

-Free a name

-import_name can point to NULL or be NULL, or a pointer to a gss_name_t structure. If it was a pointer to gss_name_t, the pointer will be set to NULL on success and failure.

-

Parameters:
- - - -
minor_status minor status code
input_name name to free
-
-
Returns:
a gss_error code, see gss_display_status() about printing the error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unwrap_iov (OM_uint32 *  minor_status,
gss_ctx_id_t  context_handle,
int *  conf_state,
gss_qop_t *  qop_state,
gss_iov_buffer_desc *  iov,
int  iov_count 
)
-
-
- -

-Decrypt or verifies the signature on the data. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap (OM_uint32 *  minor_status,
const gss_ctx_id_t  context_handle,
int  conf_req_flag,
gss_qop_t  qop_req,
const gss_buffer_t  input_message_buffer,
int *  conf_state,
gss_buffer_t  output_message_buffer 
)
-
-
- -

-Wrap a message using either confidentiality (encryption + signature) or sealing (signature).

-

Parameters:
- - - - - - - - -
minor_status minor status code.
context_handle context handle.
conf_req_flag if non zero, confidentiality is requestd.
qop_req type of protection needed, in most cases it GSS_C_QOP_DEFAULT should be passed in.
input_message_buffer messages to wrap
conf_state returns non zero if confidentiality was honoured.
output_message_buffer the resulting buffer, release with gss_release_buffer().
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_iov (OM_uint32 *  minor_status,
gss_ctx_id_t  context_handle,
int  conf_req_flag,
gss_qop_t  qop_req,
int *  conf_state,
gss_iov_buffer_desc *  iov,
int  iov_count 
)
-
-
- -

-Encrypts or sign the data.

-This is a more complicated version of gss_wrap(), it allows the caller to use AEAD data (signed header/trailer) and allow greater controll over where the encrypted data is placed.

-The maximum packet size is gss_context_stream_sizes.max_msg_size.

-The caller needs provide the folloing buffers when using in conf_req_flag=1 mode:

-

    -
  • HEADER (of size gss_context_stream_sizes.header) { DATA or SIGN_ONLY } (optional, zero or more) PADDING (of size gss_context_stream_sizes.blocksize, if zero padding is zero, can be omitted) TRAILER (of size gss_context_stream_sizes.trailer)
-

-

    -
  • on DCE-RPC mode, the caller can skip PADDING and TRAILER if the DATA elements is padded to a block bountry and header is of at least size gss_context_stream_sizes.header + gss_context_stream_sizes.trailer.
-

-HEADER, PADDING, TRAILER will be shrunken to the size required to transmit any of them too large.

-To generate gss_wrap() compatible packets, use: HEADER | DATA | PADDING | TRAILER

-When used in conf_req_flag=0,

-

    -
  • HEADER (of size gss_context_stream_sizes.header) { DATA or SIGN_ONLY } (optional, zero or more) PADDING (of size gss_context_stream_sizes.blocksize, if zero padding is zero, can be omitted) TRAILER (of size gss_context_stream_sizes.trailer)
-

-The input sizes of HEADER, PADDING and TRAILER can be fetched using gss_wrap_iov_length() or gss_context_query_attributes(). -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_iov_length (OM_uint32 *  minor_status,
gss_ctx_id_t  context_handle,
int  conf_req_flag,
gss_qop_t  qop_req,
int *  conf_state,
gss_iov_buffer_desc *  iov,
int  iov_count 
)
-
-
- -

-Update the length fields in iov buffer for the types:

    -
  • GSS_IOV_BUFFER_TYPE_HEADER
  • GSS_IOV_BUFFER_TYPE_PADDING
  • GSS_IOV_BUFFER_TYPE_TRAILER
-

-Consider using gss_context_query_attributes() to fetch the data instead. -

-

-


Variable Documentation

- -
-
- - - - -
gss_OID_desc GSSAPI_LIB_FUNCTION __gss_c_attr_stream_sizes_oid_desc
-
-
- -

-Initial value:

-    {10, rk_UNCONST("\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03")}
-
Query the context for parameters.

-SSPI equivalent if this function is QueryContextAttributes.

-

    -
  • GSS_C_ATTR_STREAM_SIZES data is a gss_context_stream_sizes.
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for HeimdalGSS-APIlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/gssapi/html/gssapi_mechs_intro.html b/kerberosV/src/doc/doxyout/gssapi/html/gssapi_mechs_intro.html deleted file mode 100644 index 3fc19eabeb5..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/gssapi_mechs_intro.html +++ /dev/null @@ -1,30 +0,0 @@ - - -HeimdalGSS-APIlibrary: GSS-API mechanisms - - - -

-keyhole logo -

- - - -
-

GSS-API mechanisms

-GSS-API mechanisms

-
    -
  • Kerberos 5 - GSS_KRB5_MECHANISM
  • SPNEGO - GSS_SPNEGO_MECHANISM
  • NTLM - GSS_NTLM_MECHANISM
-
-
-Generated on Sun Dec 9 14:10:34 2012 for HeimdalGSS-APIlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/gssapi/html/gssapi_services_intro.html b/kerberosV/src/doc/doxyout/gssapi/html/gssapi_services_intro.html deleted file mode 100644 index 8ae68c7c487..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/gssapi_services_intro.html +++ /dev/null @@ -1,43 +0,0 @@ - - -HeimdalGSS-APIlibrary: Introduction to GSS-API services - - - -

-keyhole logo -

- - - -
-

Introduction to GSS-API services

-GSS-API services

-

-Context creation

-
    -
  • delegation
  • mutual authentication
  • anonymous
  • use per message before context creation has completed
-

-return status:

    -
  • support conf
  • support int
-

-Context creation flags

-
    -
  • GSS_C_DELEG_FLAG
  • GSS_C_MUTUAL_FLAG
  • GSS_C_REPLAY_FLAG
  • GSS_C_SEQUENCE_FLAG
  • GSS_C_CONF_FLAG
  • GSS_C_INTEG_FLAG
  • GSS_C_ANON_FLAG
  • GSS_C_PROT_READY_FLAG
  • GSS_C_TRANS_FLAG
  • GSS_C_DCE_STYLE
  • GSS_C_IDENTIFY_FLAG
  • GSS_C_EXTENDED_ERROR_FLAG
  • GSS_C_DELEG_POLICY_FLAG
-

-Per-message services

-
    -
  • conf
  • int
  • message integrity
  • replay detection
  • out of sequence
-
-
-Generated on Sun Dec 9 14:10:34 2012 for HeimdalGSS-APIlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/gssapi/html/index.html b/kerberosV/src/doc/doxyout/gssapi/html/index.html deleted file mode 100644 index 91ff42e83c4..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - -HeimdalGSS-APIlibrary: Heimdal GSS-API Library - - - -

-keyhole logo -

- - - -
-

Heimdal GSS-API Library

-

-

1.5.3

Heimdal implements the following mechanisms:

-

    -
  • Kerberos 5
  • SPNEGO
  • NTLM
-

-See GSS-API mechanisms for more describtion about these mechanisms.

-The project web page: http://www.h5l.org/

-

-
-
-Generated on Sun Dec 9 14:10:34 2012 for HeimdalGSS-APIlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/gssapi/html/internalvsmechname.html b/kerberosV/src/doc/doxyout/gssapi/html/internalvsmechname.html deleted file mode 100644 index d71501d8010..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/internalvsmechname.html +++ /dev/null @@ -1,36 +0,0 @@ - - -HeimdalGSS-APIlibrary: Internal names and mechanism names - - - -

-keyhole logo -

- - - -
-

Internal names and mechanism names

-Name forms

-There are two forms of name in GSS-API, Internal form and Contiguous string ("flat") form. gss_export_name() and gss_import_name() can be used to convert between the two forms.

-

    -
  • The contiguous string form is described by an oid specificing the type and an octet string. A special form of the contiguous string form is the exported name object. The exported name defined for each mechanism, is something that can be stored and complared later. The exported name is what should be used for ACLs comparisons.
-

-

    -
  • The Internal form
-

-There is also special form of the Internal Name (IN), and that is the Mechanism Name (MN). In the mechanism name all the generic information is stripped of and only contain the information for one mechanism. In GSS-API some function return MN and some require MN as input. Each of these function is marked up as such.

-Describe relationship between import_name, canonicalize_name, export_name and friends.

-
-Generated on Sun Dec 9 14:10:34 2012 for HeimdalGSS-APIlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/gssapi/html/modules.html b/kerberosV/src/doc/doxyout/gssapi/html/modules.html deleted file mode 100644 index 82ae9c8d7b8..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/modules.html +++ /dev/null @@ -1,29 +0,0 @@ - - -HeimdalGSS-APIlibrary: Module Index - - - -

-keyhole logo -

- - - -
-

Modules

Here is a list of all modules: -
-
-Generated on Sun Dec 9 14:10:34 2012 for HeimdalGSS-APIlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/gssapi/html/pages.html b/kerberosV/src/doc/doxyout/gssapi/html/pages.html deleted file mode 100644 index 0ec6ef93c21..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/pages.html +++ /dev/null @@ -1,34 +0,0 @@ - - -HeimdalGSS-APIlibrary: Page Index - - - -

-keyhole logo -

- - - -
-

Related Pages

Here is a list of all related documentation pages: -
-
-Generated on Sun Dec 9 14:10:34 2012 for HeimdalGSS-APIlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/gssapi/html/tab_b.gif b/kerberosV/src/doc/doxyout/gssapi/html/tab_b.gif deleted file mode 100644 index 0d623483ffdf5f9f96900108042a7ab0643fe2a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 ncmZ?wbhEHbWMp7uXkcJy*>IeJfk6j|fqX^=1|}vKMh0sDa2W*H diff --git a/kerberosV/src/doc/doxyout/gssapi/html/tab_l.gif b/kerberosV/src/doc/doxyout/gssapi/html/tab_l.gif deleted file mode 100644 index 9b1e6337c9299a700401a2a78a2c6ffced475216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 706 zcmZ?wbhEHbZT`}F1e&(Gg}Y(8=I;HA5#Z$3JI=gGB)FQ#odI(O&E^@q;x zK6mr*m3xOS-#u~t!I@i+u0DKm^U160k6t`|^WpV}&n+8{U%dD9&a>B#U%!9-@yol< zU%&tQ{rk_K|NsC0`}dE5ET99@1@a36+kb~?0UJ*yc&I3X_m z!ND^5$O7$#8OFRuDhG}!?8z?cdZK&!`PWjdR;Aj^wZ` zeK{IEYHBJ)6K8VIp1`BVt++swf6j+=L{p1*nO(VhE`pFexG@5$|>uaCcd z`0m=9m+yak{QmXN#Sc$^{$X9h9&q2jiKAI|&T)a;PPx2K9p`YIdw8HtR5k2Q$2-O2 z*;3y{MQ-RnJTgJfI&R5|O)AHxDf_00XbPvDZPy4t=hHd)nfLPvms&O`Ok(sD()5v$ z5U@&h;a=#xbxVbo2~X&Xj0Ie(f{v>vERH+qC+nTG=B8Nca=wU-O$?1&vUgV~9=!H; zx>3p9Yn%*<>t~sk+&0xfyS8RsPfYBd<~wWK%j-LmpU>O7yX^h#UCp1x-p#i7@bE;py8XI6 zmY<)m>~)W~yIWcMVoiPg{duuf<*)9qZ9l$m*Ph&W&$jlv*Vpa+{pH@n=IQ$L?0$ax ec60Ul|8o2P|NVbd{6P)#weSbE3}s?04AuZvx_~SI diff --git a/kerberosV/src/doc/doxyout/gssapi/html/tab_r.gif b/kerberosV/src/doc/doxyout/gssapi/html/tab_r.gif deleted file mode 100644 index ce9dd9f533cb5486d6941844f442b59d4a9e9175..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2585 zcmbV}`9Bkk1ILFF--w5zJc=ZZT(zjE=;2|_S)Qm~rCWz1Pc)KPl;jv%A#&v2*x}yc zmf2~Jm~&=xjJY?PqwIN}f8qQ2{r$uH{c*nJbmr{cR5??*egHrs-B=MzCF`3%e{FAW z{oL5xTHn~5TM{jaB;@|_Ue5F&Zb@p(kMyG{*;gWDg zyeL|eZf7Qd8=#bXzSiR{yzRgLSj-fJS8>lBjVHN z^o-0eS=nE6a`W;LChBs=`+QAJP~{b93>H^eRb5kCSC1zUNezun%`L5M?RDzv#%jk7 zYVRX=vATPD`+oEfum^{RM@GjuP?-r=yh0!p;Vx^T9G7~`7%5ydH%70=jyJ;;`d;hv92x3R=z{xp+Lg2!*@OK*K15-t&okoPtSED)h&$RLxdbA zseWm^C3d%-yRNi-ryk^!ek+C`n&~cd$#ZWct_cUL{l~i+Nzx^5d!n94(>bW-iL~Rl z&8r)?q|1DIo=0=judQ{FaGcfLERz8gfn3-Qt<2lksh{mzpT}DXxUuR^z=^key&q4! z+wWI45vL0k$R^(F#{qfqhUsN@WA+w-V?LPH33!Q?WFSB3)WBojE@hK41Nb?KfS+Qo zXgrzfsP$wr4Qzy*{OD>uJBjdgGM@VMml5)2f~_}lD*YyOb}Hjeobhz#4c`w(l^>KK zr?Ud;W~Z}*w;%hZ|2^p^+f06gJDJQD zeIhGADbDmm&6arh(q>EZ<7mjzg7l|z$hRL8=1>)Nv=S7CY$B}iYJ&*T_-T_OG*L1q ztZ3Lana33?y3AKnyq^YCF|4x%Rb5WU&2qcl{TFKey%QJeMxn^SdT!hZ5+0i1zeusiYVp-phBl7b5+Px-X&LhByq z0F&<;K0l2+v>qiHlXb#$jXMv$uK-dEGE9L~qtdU(XeRXmvu*K2Q&6!fD**JxYP4b4BR7FdJ$Qx9G9`J%-_X!a#LGpp3g9)VWytGCa;7`S1_e8F~!R+aSJ zOF17p2`H?2kPs8Q`_;U}+D%3p zs2-0BTqFwpUoBk`?P;iPQ(IbEA|JmMx!P&YYG|R@S=5Mnw;-?A6rEEVyV%d7{iU4a zNk`i!%F(Ykpm`}#oH;BjY->@b8vQedv;pza2FL&*6ufjd+*3Ute&>kes~TU?^KkojsTh(o~(3tk1Y6>4(yn( z#U*ID9@eg-beKo1B;HXe+}{Z%n@7m0+yxivuqk9~;!1LGQlah)xYK4>wgL}l6dsaN zIxlRlq`*`j9PG4*0hD6YV_b_2w5b#)o7J?`q#{GjvvKlD`T*dWcZx<-s(ZvLB44E# z=!|sw!?)@%y$oRNL#25WS3lzdii}TuQ3?CLnvQ1_n};2sT_;Y;#d3=+-(O% zMN$>O!3;ke(UuLR%h_&)N zs^!-@A>QR}4yB1bPp`9S19ikTbZ~O{&FF-yHK{En;mmShDUIEw03`j(DBIsM}Rjki2J#SQa3gFZTKBPDeIiLt9Z z%bL3(B@Qw%(B`wSMS~dPh$=R`(}lBoFXKy(s|*{#ru$wjsBc_O#zxNk9w+UUHmx(U zmJ8+M+ndtnZ<7|VU9Mbt61zpo9T&3%Wx&XII=#QJxjR`CZf22ac3d51Z?GD%LEe_&*t46Qf;4`bZ7p2K(Ab5>GfT^}4! zBT&HZD`^PEgWoI&{~o-ID0F?O`75sm(87x%A{(}Ch1)QlzdJ)1B-eqe5a(weg0`4lQIf1evjvbBY50DVbzO7CLf|vP z2#0(U-|jZ`H{y5N^o7%iK6H>_HEGN->U6^!)1{XpJV!!4(Ig7wzZQ*9WYF4X1rG0x z=1uA@i`rIAciubDC{;~b(|&|A@xkjRP5aRcvRU9tvIm}jDB6J eQ0-6-y)mpwdT=ayS0tBxKDA*~;EWmo diff --git a/kerberosV/src/doc/doxyout/gssapi/html/tabs.css b/kerberosV/src/doc/doxyout/gssapi/html/tabs.css deleted file mode 100644 index 95f00a91da3..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/html/tabs.css +++ /dev/null @@ -1,102 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/__gss_c_attr_stream_sizes_oid_desc.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/__gss_c_attr_stream_sizes_oid_desc.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/__gss_c_attr_stream_sizes_oid_desc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_add_oid_set_member.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_add_oid_set_member.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_add_oid_set_member.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_canonicalize_name.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_canonicalize_name.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_canonicalize_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_import_name.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_import_name.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_import_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_init_sec_context.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_init_sec_context.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_init_sec_context.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_inquire_attrs_for_mech.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_inquire_attrs_for_mech.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_inquire_attrs_for_mech.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_inquire_saslname_for_mech.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_inquire_saslname_for_mech.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_inquire_saslname_for_mech.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_oid_equal.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_oid_equal.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_oid_equal.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_cred.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_cred.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_cred.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_iov_buffer.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_iov_buffer.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_iov_buffer.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_name.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_name.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_release_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_unwrap_iov.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_unwrap_iov.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_unwrap_iov.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap_iov.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap_iov.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap_iov.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap_iov_length.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap_iov_length.3 deleted file mode 100644 index 3dff74cffef..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gss_wrap_iov_length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/gssapi.3 diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi.3 deleted file mode 100644 index b61dd9bc6ac..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi.3 +++ /dev/null @@ -1,389 +0,0 @@ -.TH "Heimdal GSS-API functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalGSS-APIlibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal GSS-API functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_add_oid_set_member\fP (OM_uint32 *minor_status, const gss_OID member_oid, gss_OID_set *oid_set)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_wrap_iov\fP (OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int *conf_state, gss_iov_buffer_desc *iov, int iov_count)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_unwrap_iov\fP (OM_uint32 *minor_status, gss_ctx_id_t context_handle, int *conf_state, gss_qop_t *qop_state, gss_iov_buffer_desc *iov, int iov_count)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_wrap_iov_length\fP (OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int *conf_state, gss_iov_buffer_desc *iov, int iov_count)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_release_iov_buffer\fP (OM_uint32 *minor_status, gss_iov_buffer_desc *iov, int iov_count)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_canonicalize_name\fP (OM_uint32 *minor_status, const gss_name_t input_name, const gss_OID mech_type, gss_name_t *output_name)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_import_name\fP (OM_uint32 *minor_status, const gss_buffer_t input_name_buffer, const gss_OID input_name_type, gss_name_t *output_name)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_init_sec_context\fP (OM_uint32 *minor_status, const gss_cred_id_t initiator_cred_handle, gss_ctx_id_t *context_handle, const gss_name_t target_name, const gss_OID input_mech_type, OM_uint32 req_flags, OM_uint32 time_req, const gss_channel_bindings_t input_chan_bindings, const gss_buffer_t input_token, gss_OID *actual_mech_type, gss_buffer_t output_token, OM_uint32 *ret_flags, OM_uint32 *time_rec)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_inquire_saslname_for_mech\fP (OM_uint32 *minor_status, const gss_OID desired_mech, gss_buffer_t sasl_mech_name, gss_buffer_t mech_name, gss_buffer_t mech_description)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_inquire_attrs_for_mech\fP (OM_uint32 *minor_status, gss_const_OID mech, gss_OID_set *mech_attr, gss_OID_set *known_mech_attrs)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL \fBgss_oid_equal\fP (gss_const_OID a, gss_const_OID b)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_release_cred\fP (OM_uint32 *minor_status, gss_cred_id_t *cred_handle)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_release_name\fP (OM_uint32 *minor_status, gss_name_t *input_name)" -.br -.ti -1c -.RI "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL \fBgss_wrap\fP (OM_uint32 *minor_status, const gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, const gss_buffer_t input_message_buffer, int *conf_state, gss_buffer_t output_message_buffer)" -.br -.in -1c -.SS "Variables" - -.in +1c -.ti -1c -.RI "gss_OID_desc GSSAPI_LIB_FUNCTION \fB__gss_c_attr_stream_sizes_oid_desc\fP" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_add_oid_set_member (OM_uint32 * minor_status, const gss_OID member_oid, gss_OID_set * oid_set)" -.PP -Add a oid to the oid set, function does not make a copy of the oid, so the pointer to member_oid needs to be stable for the whole time oid_set is used. -.PP -If there is a duplicate member of the oid, the new member is not added to to the set. -.PP -\fBParameters:\fP -.RS 4 -\fIminor_status\fP minor status code. -.br -\fImember_oid\fP member to add to the oid set -.br -\fIoid_set\fP oid set to add the member too -.RE -.PP -\fBReturns:\fP -.RS 4 -a gss_error code, see gss_display_status() about printing the error code. -.RE -.PP - -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_canonicalize_name (OM_uint32 * minor_status, const gss_name_t input_name, const gss_OID mech_type, gss_name_t * output_name)" -.PP -gss_canonicalize_name takes a Internal Name (IN) and converts in into a mechanism specific Mechanism Name (MN). -.PP -The input name may multiple name, or generic name types. -.PP -If the input_name if of the GSS_C_NT_USER_NAME, and the Kerberos mechanism is specified, the resulting MN type is a GSS_KRB5_NT_PRINCIPAL_NAME. -.PP -For more information about \fBinternalVSmechname\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIminor_status\fP minor status code. -.br -\fIinput_name\fP name to covert, unchanged by \fBgss_canonicalize_name()\fP. -.br -\fImech_type\fP the type to convert Name too. -.br -\fIoutput_name\fP the resulting type, release with \fBgss_release_name()\fP, independent of input_name. -.RE -.PP -\fBReturns:\fP -.RS 4 -a gss_error code, see gss_display_status() about printing the error code. -.RE -.PP - -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_import_name (OM_uint32 * minor_status, const gss_buffer_t input_name_buffer, const gss_OID input_name_type, gss_name_t * output_name)" -.PP -Import a name internal or mechanism name -.PP -Type of name and their format: -.IP "\(bu" 2 -GSS_C_NO_OID -.IP "\(bu" 2 -GSS_C_NT_USER_NAME -.IP "\(bu" 2 -GSS_C_NT_HOSTBASED_SERVICE -.IP "\(bu" 2 -GSS_C_NT_EXPORT_NAME -.IP "\(bu" 2 -GSS_C_NT_ANONYMOUS -.IP "\(bu" 2 -GSS_KRB5_NT_PRINCIPAL_NAME -.PP -.PP -For more information about \fBinternalVSmechname\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIminor_status\fP minor status code -.br -\fIinput_name_buffer\fP import name buffer -.br -\fIinput_name_type\fP type of the import name buffer -.br -\fIoutput_name\fP the resulting type, release with \fBgss_release_name()\fP, independent of input_name -.RE -.PP -\fBReturns:\fP -.RS 4 -a gss_error code, see gss_display_status() about printing the error code. -.RE -.PP - -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_init_sec_context (OM_uint32 * minor_status, const gss_cred_id_t initiator_cred_handle, gss_ctx_id_t * context_handle, const gss_name_t target_name, const gss_OID input_mech_type, OM_uint32 req_flags, OM_uint32 time_req, const gss_channel_bindings_t input_chan_bindings, const gss_buffer_t input_token, gss_OID * actual_mech_type, gss_buffer_t output_token, OM_uint32 * ret_flags, OM_uint32 * time_rec)" -.PP -As the initiator build a context with an acceptor. -.PP -Returns in the major -.IP "\(bu" 2 -GSS_S_COMPLETE - if the context if build -.IP "\(bu" 2 -GSS_S_CONTINUE_NEEDED - if the caller needs to continue another round of gss_i nit_sec_context -.IP "\(bu" 2 -error code - any other error code -.PP -.PP -\fBParameters:\fP -.RS 4 -\fIminor_status\fP minor status code. -.br -\fIinitiator_cred_handle\fP the credential to use when building the context, if GSS_C_NO_CREDENTIAL is passed, the default credential for the mechanism will be used. -.br -\fIcontext_handle\fP a pointer to a context handle, will be returned as long as there is not an error. -.br -\fItarget_name\fP the target name of acceptor, created using \fBgss_import_name()\fP. The name is can be of any name types the mechanism supports, check supported name types with gss_inquire_names_for_mech(). -.br -\fIinput_mech_type\fP mechanism type to use, if GSS_C_NO_OID is used, Kerberos (GSS_KRB5_MECHANISM) will be tried. Other available mechanism are listed in the \fBGSS-API mechanisms\fP section. -.br -\fIreq_flags\fP flags using when building the context, see \fBContext creation flags\fP -.br -\fItime_req\fP time requested this context should be valid in seconds, common used value is GSS_C_INDEFINITE -.br -\fIinput_chan_bindings\fP Channel bindings used, if not exepected otherwise, used GSS_C_NO_CHANNEL_BINDINGS -.br -\fIinput_token\fP input token sent from the acceptor, for the initial packet the buffer of { NULL, 0 } should be used. -.br -\fIactual_mech_type\fP the actual mech used, MUST NOT be freed since it pointing to static memory. -.br -\fIoutput_token\fP if there is an output token, regardless of complete, continue_needed, or error it should be sent to the acceptor -.br -\fIret_flags\fP return what flags was negotitated, caller should check if they are accetable. For example, if GSS_C_MUTUAL_FLAG was negotiated with the acceptor or not. -.br -\fItime_rec\fP amount of time this context is valid for -.RE -.PP -\fBReturns:\fP -.RS 4 -a gss_error code, see gss_display_status() about printing the error code. -.RE -.PP - -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_attrs_for_mech (OM_uint32 * minor_status, gss_const_OID mech, gss_OID_set * mech_attr, gss_OID_set * known_mech_attrs)" -.PP -List support attributes for a mech and/or all mechanisms. -.PP -\fBParameters:\fP -.RS 4 -\fIminor_status\fP minor status code -.br -\fImech\fP given together with mech_attr will return the list of attributes for mechanism, can optionally be GSS_C_NO_OID. -.br -\fImech_attr\fP see mech parameter, can optionally be NULL, release with gss_release_oid_set(). -.br -\fIknown_mech_attrs\fP all attributes for mechanisms supported, release with gss_release_oid_set(). -.RE -.PP - -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_inquire_saslname_for_mech (OM_uint32 * minor_status, const gss_OID desired_mech, gss_buffer_t sasl_mech_name, gss_buffer_t mech_name, gss_buffer_t mech_description)" -.PP -Returns different protocol names and description of the mechanism. -.PP -\fBParameters:\fP -.RS 4 -\fIminor_status\fP minor status code -.br -\fIdesired_mech\fP mech list query -.br -\fIsasl_mech_name\fP SASL GS2 protocol name -.br -\fImech_name\fP gssapi protocol name -.br -\fImech_description\fP description of gssapi mech -.RE -.PP -\fBReturns:\fP -.RS 4 -returns GSS_S_COMPLETE or a error code. -.RE -.PP - -.SS "GSSAPI_LIB_FUNCTION int GSSAPI_LIB_CALL gss_oid_equal (gss_const_OID a, gss_const_OID b)" -.PP -Compare two GSS-API OIDs with each other. -.PP -GSS_C_NO_OID matches nothing, not even it-self. -.PP -\fBParameters:\fP -.RS 4 -\fIa\fP first oid to compare -.br -\fIb\fP second oid to compare -.RE -.PP -\fBReturns:\fP -.RS 4 -non-zero when both oid are the same OID, zero when they are not the same. -.RE -.PP - -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_cred (OM_uint32 * minor_status, gss_cred_id_t * cred_handle)" -.PP -Release a credentials -.PP -Its ok to release the GSS_C_NO_CREDENTIAL/NULL credential, it will return a GSS_S_COMPLETE error code. On return cred_handle is set ot GSS_C_NO_CREDENTIAL. -.PP -Example: -.PP -.PP -.nf - gss_cred_id_t cred = GSS_C_NO_CREDENTIAL; - major = gss_release_cred(&minor, &cred); -.fi -.PP -.PP -\fBParameters:\fP -.RS 4 -\fIminor_status\fP minor status return code, mech specific -.br -\fIcred_handle\fP a pointer to the credential too release -.RE -.PP -\fBReturns:\fP -.RS 4 -an gssapi error code -.RE -.PP - -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_iov_buffer (OM_uint32 * minor_status, gss_iov_buffer_desc * iov, int iov_count)" -.PP -Free all buffer allocated by \fBgss_wrap_iov()\fP or \fBgss_unwrap_iov()\fP by looking at the GSS_IOV_BUFFER_FLAG_ALLOCATED flag. -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_release_name (OM_uint32 * minor_status, gss_name_t * input_name)" -.PP -Free a name -.PP -import_name can point to NULL or be NULL, or a pointer to a gss_name_t structure. If it was a pointer to gss_name_t, the pointer will be set to NULL on success and failure. -.PP -\fBParameters:\fP -.RS 4 -\fIminor_status\fP minor status code -.br -\fIinput_name\fP name to free -.RE -.PP -\fBReturns:\fP -.RS 4 -a gss_error code, see gss_display_status() about printing the error code. -.RE -.PP - -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_unwrap_iov (OM_uint32 * minor_status, gss_ctx_id_t context_handle, int * conf_state, gss_qop_t * qop_state, gss_iov_buffer_desc * iov, int iov_count)" -.PP -Decrypt or verifies the signature on the data. -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap (OM_uint32 * minor_status, const gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, const gss_buffer_t input_message_buffer, int * conf_state, gss_buffer_t output_message_buffer)" -.PP -Wrap a message using either confidentiality (encryption + signature) or sealing (signature). -.PP -\fBParameters:\fP -.RS 4 -\fIminor_status\fP minor status code. -.br -\fIcontext_handle\fP context handle. -.br -\fIconf_req_flag\fP if non zero, confidentiality is requestd. -.br -\fIqop_req\fP type of protection needed, in most cases it GSS_C_QOP_DEFAULT should be passed in. -.br -\fIinput_message_buffer\fP messages to wrap -.br -\fIconf_state\fP returns non zero if confidentiality was honoured. -.br -\fIoutput_message_buffer\fP the resulting buffer, release with gss_release_buffer(). -.RE -.PP - -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_iov (OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int * conf_state, gss_iov_buffer_desc * iov, int iov_count)" -.PP -Encrypts or sign the data. -.PP -This is a more complicated version of \fBgss_wrap()\fP, it allows the caller to use AEAD data (signed header/trailer) and allow greater controll over where the encrypted data is placed. -.PP -The maximum packet size is gss_context_stream_sizes.max_msg_size. -.PP -The caller needs provide the folloing buffers when using in conf_req_flag=1 mode: -.PP -.IP "\(bu" 2 -HEADER (of size gss_context_stream_sizes.header) { DATA or SIGN_ONLY } (optional, zero or more) PADDING (of size gss_context_stream_sizes.blocksize, if zero padding is zero, can be omitted) TRAILER (of size gss_context_stream_sizes.trailer) -.PP -.PP -.IP "\(bu" 2 -on DCE-RPC mode, the caller can skip PADDING and TRAILER if the DATA elements is padded to a block bountry and header is of at least size gss_context_stream_sizes.header + gss_context_stream_sizes.trailer. -.PP -.PP -HEADER, PADDING, TRAILER will be shrunken to the size required to transmit any of them too large. -.PP -To generate \fBgss_wrap()\fP compatible packets, use: HEADER | DATA | PADDING | TRAILER -.PP -When used in conf_req_flag=0, -.PP -.IP "\(bu" 2 -HEADER (of size gss_context_stream_sizes.header) { DATA or SIGN_ONLY } (optional, zero or more) PADDING (of size gss_context_stream_sizes.blocksize, if zero padding is zero, can be omitted) TRAILER (of size gss_context_stream_sizes.trailer) -.PP -.PP -The input sizes of HEADER, PADDING and TRAILER can be fetched using \fBgss_wrap_iov_length()\fP or gss_context_query_attributes(). -.SS "GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL gss_wrap_iov_length (OM_uint32 * minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int * conf_state, gss_iov_buffer_desc * iov, int iov_count)" -.PP -Update the length fields in iov buffer for the types: -.IP "\(bu" 2 -GSS_IOV_BUFFER_TYPE_HEADER -.IP "\(bu" 2 -GSS_IOV_BUFFER_TYPE_PADDING -.IP "\(bu" 2 -GSS_IOV_BUFFER_TYPE_TRAILER -.PP -.PP -Consider using gss_context_query_attributes() to fetch the data instead. -.SH "Variable Documentation" -.PP -.SS "gss_OID_desc GSSAPI_LIB_FUNCTION \fB__gss_c_attr_stream_sizes_oid_desc\fP" -.PP -\fBInitial value:\fP -.PP -.nf - - {10, rk_UNCONST('\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03')} -.fi -Query the context for parameters. -.PP -SSPI equivalent if this function is QueryContextAttributes. -.PP -.IP "\(bu" 2 -GSS_C_ATTR_STREAM_SIZES data is a gss_context_stream_sizes. -.PP - diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi_mechs_intro.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi_mechs_intro.3 deleted file mode 100644 index e87cd5a6283..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi_mechs_intro.3 +++ /dev/null @@ -1,15 +0,0 @@ -.TH "gssapi_mechs_intro" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalGSS-APIlibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -gssapi_mechs_intro \- GSS-API mechanisms -.SH "GSS-API mechanisms" -.PP -.IP "\(bu" 2 -Kerberos 5 - GSS_KRB5_MECHANISM -.IP "\(bu" 2 -SPNEGO - GSS_SPNEGO_MECHANISM -.IP "\(bu" 2 -NTLM - GSS_NTLM_MECHANISM -.PP - diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi_services_intro.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi_services_intro.3 deleted file mode 100644 index a683bac2864..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/gssapi_services_intro.3 +++ /dev/null @@ -1,65 +0,0 @@ -.TH "gssapi_services_intro" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalGSS-APIlibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -gssapi_services_intro \- Introduction to GSS-API services -.SH "GSS-API services" -.PP -.SS "Context creation" -.IP "\(bu" 2 -delegation -.IP "\(bu" 2 -mutual authentication -.IP "\(bu" 2 -anonymous -.IP "\(bu" 2 -use per message before context creation has completed -.PP -.PP -return status: -.IP "\(bu" 2 -support conf -.IP "\(bu" 2 -support int -.PP -.SS "Context creation flags" -.IP "\(bu" 2 -GSS_C_DELEG_FLAG -.IP "\(bu" 2 -GSS_C_MUTUAL_FLAG -.IP "\(bu" 2 -GSS_C_REPLAY_FLAG -.IP "\(bu" 2 -GSS_C_SEQUENCE_FLAG -.IP "\(bu" 2 -GSS_C_CONF_FLAG -.IP "\(bu" 2 -GSS_C_INTEG_FLAG -.IP "\(bu" 2 -GSS_C_ANON_FLAG -.IP "\(bu" 2 -GSS_C_PROT_READY_FLAG -.IP "\(bu" 2 -GSS_C_TRANS_FLAG -.IP "\(bu" 2 -GSS_C_DCE_STYLE -.IP "\(bu" 2 -GSS_C_IDENTIFY_FLAG -.IP "\(bu" 2 -GSS_C_EXTENDED_ERROR_FLAG -.IP "\(bu" 2 -GSS_C_DELEG_POLICY_FLAG -.PP -.SS "Per-message services" -.IP "\(bu" 2 -conf -.IP "\(bu" 2 -int -.IP "\(bu" 2 -message integrity -.IP "\(bu" 2 -replay detection -.IP "\(bu" 2 -out of sequence -.PP - diff --git a/kerberosV/src/doc/doxyout/gssapi/man/man3/internalvsmechname.3 b/kerberosV/src/doc/doxyout/gssapi/man/man3/internalvsmechname.3 deleted file mode 100644 index 627e61c1033..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/man/man3/internalvsmechname.3 +++ /dev/null @@ -1,20 +0,0 @@ -.TH "internalvsmechname" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalGSS-APIlibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -internalvsmechname \- Internal names and mechanism names -.SH "Name forms" -.PP -There are two forms of name in GSS-API, Internal form and Contiguous string ('flat') form. gss_export_name() and \fBgss_import_name()\fP can be used to convert between the two forms. -.PP -.IP "\(bu" 2 -The contiguous string form is described by an oid specificing the type and an octet string. A special form of the contiguous string form is the exported name object. The exported name defined for each mechanism, is something that can be stored and complared later. The exported name is what should be used for ACLs comparisons. -.PP -.PP -.IP "\(bu" 2 -The Internal form -.PP -.PP -There is also special form of the Internal Name (IN), and that is the Mechanism Name (MN). In the mechanism name all the generic information is stripped of and only contain the information for one mechanism. In GSS-API some function return MN and some require MN as input. Each of these function is marked up as such. -.PP -Describe relationship between import_name, canonicalize_name, export_name and friends. diff --git a/kerberosV/src/doc/doxyout/gssapi/manpages b/kerberosV/src/doc/doxyout/gssapi/manpages deleted file mode 100644 index d55654dfaa9..00000000000 --- a/kerberosV/src/doc/doxyout/gssapi/manpages +++ /dev/null @@ -1,19 +0,0 @@ -gssapi/man/man3/__gss_c_attr_stream_sizes_oid_desc.3 -gssapi/man/man3/gss_add_oid_set_member.3 -gssapi/man/man3/gss_canonicalize_name.3 -gssapi/man/man3/gss_import_name.3 -gssapi/man/man3/gss_init_sec_context.3 -gssapi/man/man3/gss_inquire_attrs_for_mech.3 -gssapi/man/man3/gss_inquire_saslname_for_mech.3 -gssapi/man/man3/gss_oid_equal.3 -gssapi/man/man3/gss_release_cred.3 -gssapi/man/man3/gss_release_iov_buffer.3 -gssapi/man/man3/gss_release_name.3 -gssapi/man/man3/gss_unwrap_iov.3 -gssapi/man/man3/gss_wrap.3 -gssapi/man/man3/gss_wrap_iov.3 -gssapi/man/man3/gss_wrap_iov_length.3 -gssapi/man/man3/gssapi.3 -gssapi/man/man3/gssapi_mechs_intro.3 -gssapi/man/man3/gssapi_services_intro.3 -gssapi/man/man3/internalvsmechname.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/doxygen.css b/kerberosV/src/doc/doxyout/hcrypto/html/doxygen.css deleted file mode 100644 index 22c484301dd..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/doxygen.css +++ /dev/null @@ -1,473 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; -} -H1 { - text-align: center; - font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { - font-weight: bold -} -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navpath { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { - text-decoration: none; - background-color: #6666cc; - color: #ffffff -} -A.el { - text-decoration: none; - font-weight: bold -} -A.elRef { - font-weight: bold -} -A.code:link { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.code:visited { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.codeRef:link { - font-weight: normal; - color: #0000FF -} -A.codeRef:visited { - font-weight: normal; - color: #0000FF -} -A:hover { - text-decoration: none; - background-color: #f2f2ff -} -DL.el { - margin-left: -1cm -} -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: 90% -} -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { - text-align: center; -} -IMG.formulaDsp { -} -IMG.formulaInl { - vertical-align: middle; -} -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -SPAN.vhdldigit { color: #ff00ff } -SPAN.vhdlchar { color: #000000 } -SPAN.vhdlkeyword { color: #700070 } -SPAN.vhdllogic { color: #ff0000 } - -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { - color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { - font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { - background: #e8eef2; - font-weight: bold; -} -HR { - height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; - margin-left: 3px; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -/* these are for tree view when used as main index */ -.directory { - font-size: 9pt; - font-weight: bold; -} -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* The following two styles can be used to replace the root node title */ -/* with an image of your choice. Simply uncomment the next two styles, */ -/* specify the name of your image and be sure to set 'height' to the */ -/* proper pixel height of your image. */ - -/* .directory h3.swap { */ -/* height: 61px; */ -/* background-repeat: no-repeat; */ -/* background-image: url("yourimage.gif"); */ -/* } */ -/* .directory h3.swap span { */ -/* display: none; */ -/* } */ - -.directory > h3 { - margin-top: 0; -} -.directory p { - margin: 0px; - white-space: nowrap; -} -.directory div { - display: none; - margin: 0px; -} -.directory img { - vertical-align: -30%; -} -/* these are for tree view when not used as main index */ -.directory-alt { - font-size: 100%; - font-weight: bold; -} -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} -.directory-alt > h3 { - margin-top: 0; -} -.directory-alt p { - margin: 0px; - white-space: nowrap; -} -.directory-alt div { - display: none; - margin: 0px; -} -.directory-alt img { - vertical-align: -30%; -} - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/doxygen.png b/kerberosV/src/doc/doxyout/hcrypto/html/doxygen.png deleted file mode 100644 index f0a274bbaffdd67f6d784c894d9cf28729db0e14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1281 zcmaJ>ZA?>F7(Vx-ms?uoS`b@hdRtpo6o^%HU>M$hfGrBvQnk$LE?p^P!kn&ikhyq! zX~V@&tPF5Qt@V?oTL96Bi%aRiwbe1)9DWQI#?)=HxS7QSw`J`5fAJ*eJbB;uNuKA& zdERDo*{Y<(If(#(B$Lr#;nB(8Y#ia=ZCeW?JfPLuQY`=@cW$k}Rivq|vbxGrRq1Tl9;+(gNt?}UtVKM2`T5t1jLzuL@0UIs`S#vlhl4)^ zLgSYrPj@$+`|j?eSbXTmiHGkWxV8V}BzNR?pl9k_s4pDu9vd5a_UzZEPk)}Ad{AV_ zzddrjrh4=Imr`E06;LY{)YYt?o}L~H@7C}F^WB!Ra=v`Q0bj{>5&$66CWF>mf6vjP z2N>RRY6ZYa=K`76>+|_)Xdwko+7wv}7cN|btOhWb(*{sta~6b?S8Omrxw}!4`NhGr zZVpNqpu1@BE`QGWNTpEpcJVW5izu~2B^GlM?1(OPg)zwW;QcP@Ltcclm>XbJL9C|j z=9!2?ua=uIlf0%AndzHsRC}IyTL$EhAee(fdKB`?27KeS^2M8M_7b~PiCFO&r5LC7 z7gl1*a<8;SjNaw#h=843_AV9iZbWQOAp5YOC^&_F*9K0> zB|6%IDb?aM#3viTxkLU4aXg&@+CkNTOnQ1iMP*^?b|^lJy$4C)Zk4isV!|RZ*XhXh zw8q3$=*0LeGC!XI_Wc?dkT~3+*Gu%%yIqP+Wr3H$=&ROMQU6q}Ag^P~>c5vAEO;a- z_dK-3PPeKar%)6$j~vI2#*-YH!1h6HYVtwCX5_wM`iF#UKz&&@9Oo5w3%XGYrX zW>dY~)SG-((Yim%`InwgTvyRC?e=Wh^8KCao!R6Eg&TpVWUY1sN~4G}V?nFnEGo-; zHZ_$eW9-GnC%^WS9b z@p;-$oH#MtC0v>Q$HX%4^JdFdO$0cbv-W)Q TtK}Eh@>>I#ipmV1>S*>q-hkC} diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/example__evp__cipher_8c-example.html b/kerberosV/src/doc/doxyout/hcrypto/html/example__evp__cipher_8c-example.html deleted file mode 100644 index 80333637abb..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/example__evp__cipher_8c-example.html +++ /dev/null @@ -1,173 +0,0 @@ - - -Heimdal crypto library: example_evp_cipher.c - - - -

-keyhole logo -

- - - -
-

example_evp_cipher.c

This is an example how to use EVP_CipherInit_ex(), EVP_CipherUpdate() and EVP_CipherFinal_ex().

-

/*
- * Copyright (c) 2008 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 <krb5-types.h> /* should really be stdint.h */
-#include <hcrypto/evp.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <err.h>
-#include <assert.h>
-
-#include "roken.h"
-
-/* key and initial vector */
-static char key[16] =
-    "\xaa\xbb\x45\xd4\xaa\xbb\x45\xd4"
-    "\xaa\xbb\x45\xd4\xaa\xbb\x45\xd4";
-static char ivec[16] =
-    "\xaa\xbb\x45\xd4\xaa\xbb\x45\xd4"
-    "\xaa\xbb\x45\xd4\xaa\xbb\x45\xd4";
-
-static void
-usage(int exit_code) __attribute__((noreturn));
-
-static void
-usage(int exit_code)
-{
-    printf("usage: %s in out\n", getprogname());
-    exit(exit_code);
-}
-
-
-int
-main(int argc, char **argv)
-{
-    int encryptp = 1;
-    const char *ifn = NULL, *ofn = NULL;
-    FILE *in, *out;
-    void *ibuf, *obuf;
-    int ilen, olen;
-    size_t block_size = 0;
-    const EVP_CIPHER *c = EVP_aes_128_cbc();
-    EVP_CIPHER_CTX ctx;
-    int ret;
-
-    setprogname(argv[0]);
-
-    if (argc == 2) {
-        if (strcmp(argv[1], "--version") == 0) {
-            printf("version");
-            exit(0);
-        }
-        if (strcmp(argv[1], "--help") == 0)
-            usage(0);
-        usage(1);
-    } else if (argc == 4) {
-        block_size = atoi(argv[1]);
-        if (block_size == 0)
-            errx(1, "invalid blocksize %s", argv[1]);
-        ifn = argv[2];
-        ofn = argv[3];
-    } else
-        usage(1);
-
-    in = fopen(ifn, "r");
-    if (in == NULL)
-        errx(1, "failed to open input file");
-    out = fopen(ofn, "w+");
-    if (out == NULL)
-        errx(1, "failed to open output file");
-
-    /* Check that key and ivec are long enough */
-    assert(EVP_CIPHER_key_length(c) <= sizeof(key));
-    assert(EVP_CIPHER_iv_length(c) <= sizeof(ivec));
-
-    /*
-     * Allocate buffer, the output buffer is at least
-     * EVP_CIPHER_block_size() longer
-     */
-    ibuf = malloc(block_size);
-    obuf = malloc(block_size + EVP_CIPHER_block_size(c));
-
-    /*
-     * Init the memory used for EVP_CIPHER_CTX and set the key and
-     * ivec.
-     */
-    EVP_CIPHER_CTX_init(&ctx);
-    EVP_CipherInit_ex(&ctx, c, NULL, key, ivec, encryptp);
-
-    /* read in buffer */
-    while ((ilen = fread(ibuf, 1, block_size, in)) > 0) {
-        /* encrypto/decrypt */
-        ret = EVP_CipherUpdate(&ctx, obuf, &olen, ibuf, ilen);
-        if (ret != 1) {
-            EVP_CIPHER_CTX_cleanup(&ctx);
-            errx(1, "EVP_CipherUpdate failed");
-        }
-        /* write out to output file */
-        fwrite(obuf, 1, olen, out);
-    }
-    /* done reading */
-    fclose(in);
-
-    /* clear up any last bytes left in the output buffer */
-    ret = EVP_CipherFinal_ex(&ctx, obuf, &olen);
-    EVP_CIPHER_CTX_cleanup(&ctx);
-    if (ret != 1)
-        errx(1, "EVP_CipherFinal_ex failed");
-
-    /* write the last bytes out and close */
-    fwrite(obuf, 1, olen, out);
-    fclose(out);
-
-    return 0;
-}
-
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/examples.html b/kerberosV/src/doc/doxyout/hcrypto/html/examples.html deleted file mode 100644 index b81a0c78a7c..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/examples.html +++ /dev/null @@ -1,29 +0,0 @@ - - -Heimdal crypto library: Examples - - - -

-keyhole logo -

- - - -
-

Examples

Here is a list of all examples: -
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.dot b/kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.dot deleted file mode 100644 index 4df0f1aa486..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.dot +++ /dev/null @@ -1,22 +0,0 @@ -digraph G -{ - edge [fontname="FreeSans",fontsize=10,labelfontname="FreeSans",labelfontsize=10]; - node [fontname="FreeSans",fontsize=10,shape=record]; - Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",fillcolor="grey75",style="filled" fontcolor="black"]; - Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPublicBase.html"]; - Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="red",URL="$classTruncated.html"]; - Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="FreeSans"]; - Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classProtectedBase.html"]; - Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="FreeSans"]; - Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPrivateBase.html"]; - Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="grey75"]; - Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="FreeSans"]; - Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="FreeSans"]; - Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classUsed.html"]; -} diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.html b/kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.html deleted file mode 100644 index 46215d4d8ce..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.html +++ /dev/null @@ -1,88 +0,0 @@ - - -Heimdal crypto library: Graph Legend - - - -

-keyhole logo -

- - - -
-

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

-Consider the following example:

/*! Invisible class because of truncation */
-class Invisible { };
-
-/*! Truncated class, inheritance relation is hidden */
-class Truncated : public Invisible { };
-
-/* Class not documented with doxygen comments */
-class Undocumented { };
-
-/*! Class that is inherited using public inheritance */
-class PublicBase : public Truncated { };
-
-/*! A template class */
-template<class T> class Templ { };
-
-/*! Class that is inherited using protected inheritance */
-class ProtectedBase { };
-
-/*! Class that is inherited using private inheritance */
-class PrivateBase { };
-
-/*! Class that is used by the Inherited class */
-class Used { };
-
-/*! Super class that inherits a number of other classes */
-class Inherited : public PublicBase,
-                  protected ProtectedBase,
-                  private PrivateBase,
-                  public Undocumented,
-                  public Templ<int>
-{
-  private:
-    Used *m_usedClass;
-};
-
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

-

-graph_legend.png -
-

-The boxes in the above graph have the following meaning:

    -
  • -A filled gray box represents the struct or class for which the graph is generated.
  • -
  • -A box with a black border denotes a documented struct or class.
  • -
  • -A box with a grey border denotes an undocumented struct or class.
  • -
  • -A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • -
-The arrows have the following meaning:
    -
  • -A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • -
  • -A dark green arrow is used for protected inheritance.
  • -
  • -A dark red arrow is used for private inheritance.
  • -
  • -A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • -
  • -A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • -
-
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.png b/kerberosV/src/doc/doxyout/hcrypto/html/graph_legend.png deleted file mode 100644 index 9b96937bfd5f7a36ea8dbf2d64ed1bc0768f074d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4256 zcmbVQdpOkH_8+NND!Jtq6-jtSR7_-I$|WI0?zfSY$_$d3afzvf+>+dd5k>AJ%rwTO zToWRpOjQk;SpA-vZaxFm|)qS zZ0&nc$jcV$urMS*mT>5$AW~=+0-V=-hk3d;65QJTE=oj@xp?1=Mih?*SJGP9x;tMV zMGEN%60bmjDaijL58nc4RjF^hegOwU1I*ccRUmxdMkPM4ng0%#|DsH zA6uS>izR^x-*dYB+Y^@(q_fm3bgQzJ)xH_6x>lGwshWF+C5$5dh3sYD)tK+C6U)CD z^Xomarii5PA4v8qF_zz#buUwD?ro`8dC&7V-sShflU~*CBDZ04x4+3qE16W{eL_xd z3YaO}b1qpA9YL|0YKdw~2PzM=1=7+ItLm0+tST@%D(MNDzHR)+2t0d#|s}$9i(3xGzT8VL8o-ltIwH zpspqZeXR&2qA6r=nJVuhHO>d5w2$gp9i$H^6ROz!yNTjvm&9kupV73|GPJbXR%Sq0{>>GOn}^wshXC&C~6F@ zQEtikDzl-h2C}qRulGQ3fxzQMGiQH>nv}zkLLPr|qAC;3@PP$cr?(+-t?Wl3jb0<+ z#bCd_jVJ74%s*@eBjHtio7tZ>$BFt@%$M_C#AZgnzPm@&TXYQgE_Vo-ac(6wcJS^F zq)^14asP#Se^m*cnG^`{K>nXv_jhChvr_3s{zCkoqlsf=o8GQ>m@l2)em-YYT;u5A zvL(o`$7n~F&}`E{@&v375BP8e8N#D`H-e$%bEytQt-6o^PA%Dz4c-UeB{`~c4E<$L zY5E6~rKXj#P=fpct4bMP!auX;p7jtP@Li|`r|L0{yav|CLqtLNI5sNFr)16{NP2=B zyY+-Wnh;%3ctC&{8FU{!e29-)s6j~L{~V=%0`Mo=V6^am+1%z2<9r3tD~6uUPff|k zVx!)!?zoJ8FYTDC+V^!??@ z4c>lSL|BU?N^?Ew@NJxJzG9eMGFyR)(2&@Nt!t3%JLT|%6obYCChp}`hP)dkti;UH zm+B_wyb0#h=*|iH4Fx&x>#k_WnyfzU(!KMagDGGLWwz39qG2@`w4@&@8MH}K=hcV> zo@xJdqtMHqtZ+UobNt|FkIRV*_Z#K{{Bb)#j z9XM+oNQX|Dn7$9c4;PX=9NRr)QYm+3 z zx^AyiP)aaJ#E<#aI_Z4M0qo~}6_b{Fw7LjYEpq&2eP4e=;`V;2lQjooTv3dWIpwWu z2b1z&DZD^dJ%5Ah@TPsb?SUP1RZa2=43!k>cAI`kktGdN*#k}_EFYJBtdo09U?xBs z9K9CSx_e{=df>B<4TT_=s52}n^1IKq){xhJIZR<%sQ$rL)Ww)Yt%WkDo#ad}s&Gx5 z={);tH9sSrJ>yD-tu!$ob?tPKmFU3SdDt@i5ULq$P+JZ&rBZXITMM2R4_v1ibgOiq zMgY#(>xF-;&)HonG+sHE@%)-B1*r)@ga3!db-Vc_x}smbXU4=Ycmit0F{Z9Z=q9*k zSY@ypaOs8`MX!BUZQ8*PNmX5$J|!1|LUar)5#Wv*4#g@nfsebEcx9@8Xwfb0Q9P(} z=SQ6#aIE*x06hjIS#Bd%McoJc%>SXksuJY|iLLCE2cQVDS=q0ExRn*~`i=fOw%XSg zjPMNGM@azaROpa|{rz4!=+zKM?qLTssH`{-E+@6Hhis|f3;+_M-ZtTHa|~uvmR1gf ztc+og%<|DBdt%HY{wmosZ0Dwo_$k|E-l5uc@dsfQXM7S|Iz@BxYy&z}hOFW|~F{vQ0Osp+?FjWk}l^^`$3d&Um1 z?&sxr?AAGlD4Khy<_>4od`Bblh?&9%UY#-Jq!c|?kU+hLL^MH@`5+jaq0btJpn7*b#Oeh1GEn6atjaCyIWfr0OqB$o*_K7>Hw0 z?BwrA^UZy(f_CdPoNz0!X6_EX?r80CuKuJ>x7Nfyd8EE%k&D?|=iJJfS>IQjndp+} zQwBq!$`>mvPmG!I^V(%R)Gym_|72^0&$a-L)TN^qtKvF!jlxIo?PRq6kTb-X53|%h z?IKy}wPh>cXPpl!CgqlED%v-a$)H5&WV66^EQctD_=l_ z8tuq$z=3tBNHyzQ{oqHd0c`bijo3DfaK&P6ljOYB*yU$_@k`qhq8=mtA4jS1B1K(j zvo2FBwlJ2mJRPCUqlyR$(a}O)y*2{y;Q!N$t<@I0rtBY~s9-^ohW}mp>mSLEID_fCC?)BC#xQVv6?MP3l1#chr!wPGR>M7_ma= zq&T4QLL#pPdxWMc8$@t?@@dX?v6SXk)pHf5YJBDF1J==c$=Ycr+-OyqR^Hvbl3sPR z*>|+VVnI4^ix_q({i~Ss$FYFSvqug*Szu}$jsTR7w#ajG&vB+e-65%XO$A}#xf?z1 zg)!qcIUN0peM-ZkW0&88#R#(`yIXN3nMRX3+scl<5eJ{+iXh{t%uA$^_(QR&k?6b}K!<(1P zqwP4`%br=wo_WfO34*7x=@)Qk8fo1(!f2_Wx<|KCf>TXR>Fs0He*PA|d0Gy2j)&Wm z%VnPoVWk((0ZN^Z;9t1nfauExQsXD8>~~^(ibEcj>iyB>^{0^bacb(gZMDZOg!?o2 zVa@4%Q3kdQ_jg7p|GidA+;Dh4mlhvBOEsuq(9T4mj7oc$7JRBo7sK z*E^0e%k=;_*U4pQ>$TPd_p@|Nm&X+6SCcizU6^Uhlfh+H#~(#zENDe!uqZ){ma3WhTpgE+}F#p~*bqL)ZYn`y8- zBOJ+jO4A2S!yO<}KP2QQ_3v@|Y0!qSg0~x9LPU!Rsy0*lW)2#guxB_)5P-_Hzz)sa zrnuTszvZ!oPt?A{2s%#E?qLUMss-0P-a={w>U|QXvO8{_pDLhOoY0}ZSU>&a#hJ<$ zf4Q&uT+Go7?*M0-NYFE>V%3O24hlHr&CvTIS_##QeB#n}e(gAe6vWs=NZv-DofbkO zu7$-h7Q@{+$HyEaDZEwf6AwUFq;NBnTgsf5s%mT33zz?)Ep+-3VmZ8*J#3y~)Ura$ zpPFz&43@7o6>!a?EZ!3?!?z=`K9*}HvAgu@#TSq?Ptjq6-{ylGIr3f2q%wW0|I7*vVROWS&K z1ujjlesAY3i{h8`HADO2qu*4TzqaC^gbVQY}Bcx zdccd&Kl-bUFIRb=gLuNk3HsaqMMi`2e%ujt?uM0xCs*bj=EwvJFU`+a_d(+X)YjtG z8ViTUA+`cG73Cc^6!T_s=HK)o?m&=mp;4>0A$DnH#54&G^7{I|FO#0N%dZAibZ>6* z?nPYXp5X^8B9a_9oS$PjT-x+F#$I{v>ysq>cBG2e?JyMGV2r`NPxrsx8;iIjX^q~Dr;D*ylh diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__core.html b/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__core.html deleted file mode 100644 index 000ba2761de..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__core.html +++ /dev/null @@ -1,190 +0,0 @@ - - -Heimdal crypto library: hcrypto function controlling behavior - - - -

-keyhole logo -

- - - -
-

hcrypto function controlling behavior

- - - - - - - - - - - - -

Functions

int EVP_CIPHER_CTX_rand_key (EVP_CIPHER_CTX *ctx, void *key)
int EVP_CIPHER_CTX_ctrl (EVP_CIPHER_CTX *ctx, int type, int arg, void *data)
void OpenSSL_add_all_algorithms (void)
void OpenSSL_add_all_algorithms_conf (void)
void OpenSSL_add_all_algorithms_noconf (void)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int EVP_CIPHER_CTX_ctrl (EVP_CIPHER_CTX *  ctx,
int  type,
int  arg,
void *  data 
)
-
-
- -

-Perform a operation on a ctx

-

Parameters:
- - - - - -
ctx context to perform operation on.
type type of operation.
arg argument to operation.
data addition data to operation.
-
-
Returns:
1 for success, 0 for failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int EVP_CIPHER_CTX_rand_key (EVP_CIPHER_CTX *  ctx,
void *  key 
)
-
-
- -

-Generate a random key for the specificed EVP_CIPHER.

-

Parameters:
- - - -
ctx EVP_CIPHER_CTX type to build the key for.
key return key, must be at least EVP_CIPHER_key_length() byte long.
-
-
Returns:
1 for success, 0 for failure.
- -
-

- -

-
- - - - - - - - - -
void OpenSSL_add_all_algorithms (void   ) 
-
-
- -

-Add all algorithms to the crypto core. -

-

- -

-
- - - - - - - - - -
void OpenSSL_add_all_algorithms_conf (void   ) 
-
-
- -

-Add all algorithms to the crypto core using configuration file. -

-

- -

-
- - - - - - - - - -
void OpenSSL_add_all_algorithms_noconf (void   ) 
-
-
- -

-Add all algorithms to the crypto core, but don't use the configuration file. -

-

-

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__des.html b/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__des.html deleted file mode 100644 index 9831a9d12a7..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__des.html +++ /dev/null @@ -1,910 +0,0 @@ - - -Heimdal crypto library: DES crypto functions - - - -

-keyhole logo -

- - - -
-

DES crypto functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

void DES_set_odd_parity (DES_cblock *key)
int HC_DEPRECATED DES_check_key_parity (DES_cblock *key)
int DES_is_weak_key (DES_cblock *key)
int HC_DEPRECATED DES_set_key (DES_cblock *key, DES_key_schedule *ks)
int DES_set_key_unchecked (DES_cblock *key, DES_key_schedule *ks)
int DES_set_key_checked (DES_cblock *key, DES_key_schedule *ks)
int DES_key_sched (DES_cblock *key, DES_key_schedule *ks)
void DES_encrypt (uint32_t u[2], DES_key_schedule *ks, int encp)
void DES_ecb_encrypt (DES_cblock *input, DES_cblock *output, DES_key_schedule *ks, int encp)
void DES_cbc_encrypt (const void *in, void *out, long length, DES_key_schedule *ks, DES_cblock *iv, int encp)
void DES_pcbc_encrypt (const void *in, void *out, long length, DES_key_schedule *ks, DES_cblock *iv, int encp)
void DES_ecb3_encrypt (DES_cblock *input, DES_cblock *output, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, int encp)
void DES_ede3_cbc_encrypt (const void *in, void *out, long length, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, DES_cblock *iv, int encp)
void DES_cfb64_encrypt (const void *in, void *out, long length, DES_key_schedule *ks, DES_cblock *iv, int *num, int encp)
uint32_t DES_cbc_cksum (const void *in, DES_cblock *output, long length, DES_key_schedule *ks, DES_cblock *iv)
void DES_string_to_key (const char *str, DES_cblock *key)
int HC_DEPRECATED DES_new_random_key (DES_cblock *key)
void HC_DEPRECATED DES_init_random_number_generator (DES_cblock *seed)
void HC_DEPRECATED DES_random_key (DES_cblock *key)
-

Detailed Description

-See the DES - Data Encryption Standard crypto interface for description and examples.

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uint32_t DES_cbc_cksum (const void *  in,
DES_cblock *  output,
long  length,
DES_key_schedule *  ks,
DES_cblock *  iv 
)
-
-
- -

-Crete a checksum using DES in CBC encryption mode. This mode is only used for Kerberos 4, and it should stay that way.

-The IV must always be diffrent for diffrent input data blocks.

-

Parameters:
- - - - - - -
in data to checksum
output the checksum
length length of data
ks key schedule to use
iv initial vector to use
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DES_cbc_encrypt (const void *  in,
void *  out,
long  length,
DES_key_schedule *  ks,
DES_cblock *  iv,
int  encp 
)
-
-
- -

-Encrypt/decrypt a block using DES in Chain Block Cipher mode (cbc).

-The IV must always be diffrent for diffrent input data blocks.

-

Parameters:
- - - - - - - -
in data to encrypt
out data to encrypt
length length of data
ks key schedule to use
iv initial vector to use
encp if non zero, encrypt. if zero, decrypt.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DES_cfb64_encrypt (const void *  in,
void *  out,
long  length,
DES_key_schedule *  ks,
DES_cblock *  iv,
int *  num,
int  encp 
)
-
-
- -

-Encrypt/decrypt using DES in cipher feedback mode with 64 bit feedback.

-The IV must always be diffrent for diffrent input data blocks.

-

Parameters:
- - - - - - - - -
in data to encrypt
out data to encrypt
length length of data
ks key schedule to use
iv initial vector to use
num offset into in cipher block encryption/decryption stop last time.
encp if non zero, encrypt. if zero, decrypt.
-
- -
-

- -

-
- - - - - - - - - -
int HC_DEPRECATED DES_check_key_parity (DES_cblock *  key  ) 
-
-
- -

-Check if the key have correct parity.

-

Parameters:
- - -
key key to check the parity.
-
-
Returns:
1 on success, 0 on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DES_ecb3_encrypt (DES_cblock *  input,
DES_cblock *  output,
DES_key_schedule *  ks1,
DES_key_schedule *  ks2,
DES_key_schedule *  ks3,
int  encp 
)
-
-
- -

-Encrypt/decrypt a block using triple DES using EDE mode, encrypt/decrypt/encrypt.

-

Parameters:
- - - - - - - -
input data to encrypt
output data to encrypt
ks1 key schedule to use
ks2 key schedule to use
ks3 key schedule to use
encp if non zero, encrypt. if zero, decrypt.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DES_ecb_encrypt (DES_cblock *  input,
DES_cblock *  output,
DES_key_schedule *  ks,
int  encp 
)
-
-
- -

-Encrypt/decrypt a block using DES.

-

Parameters:
- - - - - -
input data to encrypt
output data to encrypt
ks key schedule to use
encp if non zero, encrypt. if zero, decrypt.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DES_ede3_cbc_encrypt (const void *  in,
void *  out,
long  length,
DES_key_schedule *  ks1,
DES_key_schedule *  ks2,
DES_key_schedule *  ks3,
DES_cblock *  iv,
int  encp 
)
-
-
- -

-Encrypt/decrypt using Triple DES in Chain Block Cipher mode (cbc).

-The IV must always be diffrent for diffrent input data blocks.

-

Parameters:
- - - - - - - - - -
in data to encrypt
out data to encrypt
length length of data
ks1 key schedule to use
ks2 key schedule to use
ks3 key schedule to use
iv initial vector to use
encp if non zero, encrypt. if zero, decrypt.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
void DES_encrypt (uint32_t  u[2],
DES_key_schedule *  ks,
int  encp 
)
-
-
- -

-Encrypt/decrypt a block using DES. Also called ECB mode

-

Parameters:
- - - - -
u data to encrypt
ks key schedule to use
encp if non zero, encrypt. if zero, decrypt.
-
- -
-

- -

-
- - - - - - - - - -
void HC_DEPRECATED DES_init_random_number_generator (DES_cblock *  seed  ) 
-
-
- -

-Seed the random number generator. Deprecated, use RAND - random number

-

Parameters:
- - -
seed a seed to seed that random number generate with.
-
- -
-

- -

-
- - - - - - - - - -
int DES_is_weak_key (DES_cblock *  key  ) 
-
-
- -

-Checks if the key is any of the weaks keys that makes DES attacks trival.

-

Parameters:
- - -
key key to check.
-
-
Returns:
1 if the key is weak, 0 otherwise.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int DES_key_sched (DES_cblock *  key,
DES_key_schedule *  ks 
)
-
-
- -

-Compatibility function for eay libdes, works just like DES_set_key_checked().

-

Parameters:
- - - -
key a key to initialize the key schedule with.
ks a key schedule to initialize.
-
-
Returns:
0 on success, -1 on invalid parity, -2 on weak key.
- -
-

- -

-
- - - - - - - - - -
int HC_DEPRECATED DES_new_random_key (DES_cblock *  key  ) 
-
-
- -

-Generate a random des key using a random block, fixup parity and skip weak keys.

-

Parameters:
- - -
key is set to a random key.
-
-
Returns:
0 on success, non zero on random number generator failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DES_pcbc_encrypt (const void *  in,
void *  out,
long  length,
DES_key_schedule *  ks,
DES_cblock *  iv,
int  encp 
)
-
-
- -

-Encrypt/decrypt a block using DES in Propagating Cipher Block Chaining mode. This mode is only used for Kerberos 4, and it should stay that way.

-The IV must always be diffrent for diffrent input data blocks.

-

Parameters:
- - - - - - - -
in data to encrypt
out data to encrypt
length length of data
ks key schedule to use
iv initial vector to use
encp if non zero, encrypt. if zero, decrypt.
-
- -
-

- -

-
- - - - - - - - - -
void HC_DEPRECATED DES_random_key (DES_cblock *  key  ) 
-
-
- -

-Generate a random key, deprecated since it doesn't return an error code, use DES_new_random_key().

-

Parameters:
- - -
key is set to a random key.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int HC_DEPRECATED DES_set_key (DES_cblock *  key,
DES_key_schedule *  ks 
)
-
-
- -

-Setup a des key schedule from a key. Deprecated function, use DES_set_key_unchecked() or DES_set_key_checked() instead.

-

Parameters:
- - - -
key a key to initialize the key schedule with.
ks a key schedule to initialize.
-
-
Returns:
0 on success
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int DES_set_key_checked (DES_cblock *  key,
DES_key_schedule *  ks 
)
-
-
- -

-Just like DES_set_key_unchecked() except checking that the key is not weak for or have correct parity.

-

Parameters:
- - - -
key a key to initialize the key schedule with.
ks a key schedule to initialize.
-
-
Returns:
0 on success, -1 on invalid parity, -2 on weak key.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int DES_set_key_unchecked (DES_cblock *  key,
DES_key_schedule *  ks 
)
-
-
- -

-Setup a des key schedule from a key. The key is no longer needed after this transaction and can cleared.

-Does NOT check that the key is weak for or have wrong parity.

-

Parameters:
- - - -
key a key to initialize the key schedule with.
ks a key schedule to initialize.
-
-
Returns:
0 on success
- -
-

- -

-
- - - - - - - - - -
void DES_set_odd_parity (DES_cblock *  key  ) 
-
-
- -

-Set the parity of the key block, used to generate a des key from a random key. See DES key generation.

-

Parameters:
- - -
key key to fixup the parity for.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void DES_string_to_key (const char *  str,
DES_cblock *  key 
)
-
-
- -

-Convert a string to a DES key. Use something like PKCS5_PBKDF2_HMAC_SHA1() to create key from passwords.

-

Parameters:
- - - -
str The string to convert to a key
key the resulting key
-
- -
-

-

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__dh.html b/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__dh.html deleted file mode 100644 index 09891025c7c..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__dh.html +++ /dev/null @@ -1,581 +0,0 @@ - - -Heimdal crypto library: Diffie-Hellman functions - - - -

-keyhole logo -

- - - -
-

Diffie-Hellman functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

const DH_METHOD * DH_ltm_method (void)
DH * DH_new (void)
DH * DH_new_method (ENGINE *engine)
void DH_free (DH *dh)
int DH_up_ref (DH *dh)
int DH_size (const DH *dh)
int DH_set_ex_data (DH *dh, int idx, void *data)
void * DH_get_ex_data (DH *dh, int idx)
int DH_generate_parameters_ex (DH *dh, int prime_len, int generator, BN_GENCB *cb)
int DH_check_pubkey (const DH *dh, const BIGNUM *pub_key, int *codes)
int DH_generate_key (DH *dh)
int DH_compute_key (unsigned char *shared_key, const BIGNUM *peer_pub_key, DH *dh)
int DH_set_method (DH *dh, const DH_METHOD *method)
const DH_METHOD * DH_null_method (void)
void DH_set_default_method (const DH_METHOD *meth)
const DH_METHOD * DH_get_default_method (void)
-

Detailed Description

-See the DH - Diffie-Hellman key exchange for description and examples.

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int DH_check_pubkey (const DH *  dh,
const BIGNUM *  pub_key,
int *  codes 
)
-
-
- -

-Check that the public key is sane.

-

Parameters:
- - - - -
dh the local peer DH parameters.
pub_key the remote peer public key parameters.
codes return that the failures of the pub_key are.
-
-
Returns:
1 on success, 0 on failure and *codes is set the the combined fail check for the public key
- -

-Checks that the function performs are:

    -
  • pub_key is not negative
-

-

    -
  • pub_key > 1 and pub_key < p - 1, to avoid small subgroups attack.
-

-

    -
  • if g == 2, pub_key have more then one bit set, if bits set is 1, log_2(pub_key) is trival
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int DH_compute_key (unsigned char *  shared_key,
const BIGNUM *  peer_pub_key,
DH *  dh 
)
-
-
- -

-Complute the shared secret key.

-

Parameters:
- - - - -
shared_key the resulting shared key, need to be at least DH_size() large.
peer_pub_key the peer's public key.
dh the dh key pair.
-
-
Returns:
1 on success.
- -

-Checks that the pubkey passed in is valid using DH_check_pubkey(). -

-

- -

-
- - - - - - - - - -
void DH_free (DH *  dh  ) 
-
-
- -

-Free a DH object and release related resources, like ENGINE, that the object was using.

-

Parameters:
- - -
dh object to be freed.
-
- -
-

- -

-
- - - - - - - - - -
int DH_generate_key (DH *  dh  ) 
-
-
- -

-Generate a new DH private-public key pair. The dh parameter must be allocted first with DH_new(). dh->p and dp->g must be set.

-

Parameters:
- - -
dh dh parameter.
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int DH_generate_parameters_ex (DH *  dh,
int  prime_len,
int  generator,
BN_GENCB *  cb 
)
-
-
- -

-Generate DH parameters for the DH object give parameters.

-

Parameters:
- - - - - -
dh The DH object to generate parameters for.
prime_len length of the prime
generator generator, g
cb Callback parameters to show progress, can be NULL.
-
-
Returns:
the maximum size in bytes of the out data.
- -
-

- -

-
- - - - - - - - - -
const DH_METHOD* DH_get_default_method (void   ) 
-
-
- -

-Return the default DH implementation.

-

Returns:
pointer to a DH_METHOD.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void* DH_get_ex_data (DH *  dh,
int  idx 
)
-
-
- -

-Get the data for index idx in the DH object.

-

Parameters:
- - - -
dh DH object.
idx index to get the data for.
-
-
Returns:
the object store in index idx
- -
-

- -

-
- - - - - - - - - -
const DH_METHOD* DH_ltm_method (void   ) 
-
-
- -

-DH implementation using libtommath.

-

Returns:
the DH_METHOD for the DH implementation using libtommath.
- -
-

- -

-
- - - - - - - - - -
DH* DH_new (void   ) 
-
-
- -

-Create a new DH object using DH_new_method(NULL), see DH_new_method().

-

Returns:
a newly allocated DH object.
- -
-

- -

-
- - - - - - - - - -
DH* DH_new_method (ENGINE *  engine  ) 
-
-
- -

-Create a new DH object from the given engine, if the NULL is used, the default engine is used. Free the DH object with DH_free().

-

Parameters:
- - -
engine The engine to use to allocate the DH object.
-
-
Returns:
a newly allocated DH object.
- -
-

- -

-
- - - - - - - - - -
const DH_METHOD* DH_null_method (void   ) 
-
-
- -

-Return the dummy DH implementation.

-

Returns:
pointer to a DH_METHOD.
- -
-

- -

-
- - - - - - - - - -
void DH_set_default_method (const DH_METHOD *  meth  ) 
-
-
- -

-Set the default DH implementation.

-

Parameters:
- - -
meth pointer to a DH_METHOD.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int DH_set_ex_data (DH *  dh,
int  idx,
void *  data 
)
-
-
- -

-Set the data index idx in the DH object to data.

-

Parameters:
- - - - -
dh DH object.
idx index to set the data for.
data data to store for the index idx.
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int DH_set_method (DH *  dh,
const DH_METHOD *  method 
)
-
-
- -

-Set a new method for the DH keypair.

-

Parameters:
- - - -
dh dh parameter.
method the new method for the DH parameter.
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - -
int DH_size (const DH *  dh  ) 
-
-
- -

-The maximum output size of the DH_compute_key() function.

-

Parameters:
- - -
dh The DH object to get the size from.
-
-
Returns:
the maximum size in bytes of the out data.
- -
-

- -

-
- - - - - - - - - -
int DH_up_ref (DH *  dh  ) 
-
-
- -

-Add a reference to the DH object. The object should be free with DH_free() to drop the reference.

-

Parameters:
- - -
dh the object to increase the reference count too.
-
-
Returns:
the updated reference count, can't safely be used except for debug printing.
- -
-

-

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__evp.html b/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__evp.html deleted file mode 100644 index aa7e4ac2a02..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__evp.html +++ /dev/null @@ -1,2366 +0,0 @@ - - -Heimdal crypto library: EVP generic crypto functions - - - -

-keyhole logo -

- - - -
-

EVP generic crypto functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

const EVP_CIPHER * EVP_wincrypt_des_ede3_cbc (void)
const EVP_CIPHER * EVP_hcrypto_aes_128_cbc (void)
const EVP_CIPHER * EVP_hcrypto_aes_192_cbc (void)
const EVP_CIPHER * EVP_hcrypto_aes_256_cbc (void)
const EVP_CIPHER * EVP_hcrypto_aes_128_cfb8 (void)
const EVP_CIPHER * EVP_hcrypto_aes_192_cfb8 (void)
const EVP_CIPHER * EVP_hcrypto_aes_256_cfb8 (void)
const EVP_MD * EVP_hcrypto_sha256 (void)
const EVP_MD * EVP_hcrypto_sha384 (void)
const EVP_MD * EVP_hcrypto_sha512 (void)
const EVP_MD * EVP_hcrypto_sha1 (void)
const EVP_MD * EVP_hcrypto_md5 (void)
const EVP_MD * EVP_hcrypto_md4 (void)
const EVP_MD * EVP_hcrypto_md2 (void)
const EVP_CIPHER * EVP_hcrypto_des_cbc (void)
const EVP_CIPHER * EVP_hcrypto_des_ede3_cbc (void)
const EVP_CIPHER * EVP_hcrypto_rc2_cbc (void)
const EVP_CIPHER * EVP_hcrypto_rc2_40_cbc (void)
const EVP_CIPHER * EVP_hcrypto_rc2_64_cbc (void)
const EVP_CIPHER * EVP_hcrypto_camellia_128_cbc (void)
const EVP_CIPHER * EVP_hcrypto_camellia_192_cbc (void)
const EVP_CIPHER * EVP_hcrypto_camellia_256_cbc (void)
size_t EVP_MD_size (const EVP_MD *md)
size_t EVP_MD_block_size (const EVP_MD *md)
EVP_MD_CTX * EVP_MD_CTX_create (void)
void EVP_MD_CTX_init (EVP_MD_CTX *ctx) HC_DEPRECATED
void EVP_MD_CTX_destroy (EVP_MD_CTX *ctx)
int EVP_MD_CTX_cleanup (EVP_MD_CTX *ctx) HC_DEPRECATED
const EVP_MD * EVP_MD_CTX_md (EVP_MD_CTX *ctx)
size_t EVP_MD_CTX_size (EVP_MD_CTX *ctx)
size_t EVP_MD_CTX_block_size (EVP_MD_CTX *ctx)
int EVP_DigestInit_ex (EVP_MD_CTX *ctx, const EVP_MD *md, ENGINE *engine)
int EVP_DigestUpdate (EVP_MD_CTX *ctx, const void *data, size_t size)
int EVP_DigestFinal_ex (EVP_MD_CTX *ctx, void *hash, unsigned int *size)
int EVP_Digest (const void *data, size_t dsize, void *hash, unsigned int *hsize, const EVP_MD *md, ENGINE *engine)
const EVP_MD * EVP_sha256 (void)
const EVP_MD * EVP_sha384 (void)
const EVP_MD * EVP_sha512 (void)
const EVP_MD * EVP_sha1 (void)
const EVP_MD * EVP_sha (void)
const EVP_MD * EVP_md5 (void)
const EVP_MD * EVP_md4 (void)
const EVP_MD * EVP_md2 (void)
const EVP_MD * EVP_md_null (void)
size_t EVP_CIPHER_block_size (const EVP_CIPHER *c)
size_t EVP_CIPHER_key_length (const EVP_CIPHER *c)
size_t EVP_CIPHER_iv_length (const EVP_CIPHER *c)
void EVP_CIPHER_CTX_init (EVP_CIPHER_CTX *c)
int EVP_CIPHER_CTX_cleanup (EVP_CIPHER_CTX *c)
int EVP_CIPHER_CTX_set_key_length (EVP_CIPHER_CTX *c, int length)
const EVP_CIPHER * EVP_CIPHER_CTX_cipher (EVP_CIPHER_CTX *ctx)
size_t EVP_CIPHER_CTX_block_size (const EVP_CIPHER_CTX *ctx)
size_t EVP_CIPHER_CTX_key_length (const EVP_CIPHER_CTX *ctx)
size_t EVP_CIPHER_CTX_iv_length (const EVP_CIPHER_CTX *ctx)
unsigned long EVP_CIPHER_CTX_flags (const EVP_CIPHER_CTX *ctx)
int EVP_CIPHER_CTX_mode (const EVP_CIPHER_CTX *ctx)
void * EVP_CIPHER_CTX_get_app_data (EVP_CIPHER_CTX *ctx)
void EVP_CIPHER_CTX_set_app_data (EVP_CIPHER_CTX *ctx, void *data)
int EVP_CipherInit_ex (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *c, ENGINE *engine, const void *key, const void *iv, int encp)
int EVP_CipherUpdate (EVP_CIPHER_CTX *ctx, void *out, int *outlen, void *in, size_t inlen)
int EVP_CipherFinal_ex (EVP_CIPHER_CTX *ctx, void *out, int *outlen)
const EVP_CIPHER * EVP_enc_null (void)
const EVP_CIPHER * EVP_rc2_cbc (void)
const EVP_CIPHER * EVP_rc2_40_cbc (void)
const EVP_CIPHER * EVP_rc2_64_cbc (void)
const EVP_CIPHER * EVP_rc4 (void)
const EVP_CIPHER * EVP_rc4_40 (void)
const EVP_CIPHER * EVP_des_cbc (void)
const EVP_CIPHER * EVP_des_ede3_cbc (void)
const EVP_CIPHER * EVP_aes_128_cbc (void)
const EVP_CIPHER * EVP_aes_192_cbc (void)
const EVP_CIPHER * EVP_aes_256_cbc (void)
const EVP_CIPHER * EVP_aes_128_cfb8 (void)
const EVP_CIPHER * EVP_aes_192_cfb8 (void)
const EVP_CIPHER * EVP_aes_256_cfb8 (void)
const EVP_CIPHER * EVP_camellia_128_cbc (void)
const EVP_CIPHER * EVP_camellia_192_cbc (void)
const EVP_CIPHER * EVP_camellia_256_cbc (void)
const EVP_CIPHER * EVP_get_cipherbyname (const char *name)
int EVP_BytesToKey (const EVP_CIPHER *type, const EVP_MD *md, const void *salt, const void *data, size_t datalen, unsigned int count, void *keydata, void *ivdata)
-

Detailed Description

-See the EVP - generic crypto interface for description and examples.

Function Documentation

- -
-
- - - - - - - - - -
const EVP_CIPHER* EVP_aes_128_cbc (void   ) 
-
-
- -

-The AES-128 cipher type

-

Returns:
the AES-128 EVP_CIPHER pointer.
-
Examples:
-example_evp_cipher.c.
-
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_aes_128_cfb8 (void   ) 
-
-
- -

-The AES-128 cipher type

-

Returns:
the AES-128 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_aes_192_cbc (void   ) 
-
-
- -

-The AES-192 cipher type

-

Returns:
the AES-192 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_aes_192_cfb8 (void   ) 
-
-
- -

-The AES-192 cipher type

-

Returns:
the AES-192 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_aes_256_cbc (void   ) 
-
-
- -

-The AES-256 cipher type

-

Returns:
the AES-256 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_aes_256_cfb8 (void   ) 
-
-
- -

-The AES-256 cipher type

-

Returns:
the AES-256 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int EVP_BytesToKey (const EVP_CIPHER *  type,
const EVP_MD *  md,
const void *  salt,
const void *  data,
size_t  datalen,
unsigned int  count,
void *  keydata,
void *  ivdata 
)
-
-
- -

-Provides a legancy string to key function, used in PEM files.

-New protocols should use new string to key functions like NIST SP56-800A or PKCS#5 v2.0 (see PKCS5_PBKDF2_HMAC_SHA1()).

-

Parameters:
- - - - - - - - - -
type type of cipher to use
md message digest to use
salt salt salt string, should be an binary 8 byte buffer.
data the password/input key string.
datalen length of data parameter.
count iteration counter.
keydata output keydata, needs to of the size EVP_CIPHER_key_length().
ivdata output ivdata, needs to of the size EVP_CIPHER_block_size().
-
-
Returns:
the size of derived key.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_camellia_128_cbc (void   ) 
-
-
- -

-The Camellia-128 cipher type

-

Returns:
the Camellia-128 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_camellia_192_cbc (void   ) 
-
-
- -

-The Camellia-198 cipher type

-

Returns:
the Camellia-198 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_camellia_256_cbc (void   ) 
-
-
- -

-The Camellia-256 cipher type

-

Returns:
the Camellia-256 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
size_t EVP_CIPHER_block_size (const EVP_CIPHER *  c  ) 
-
-
- -

-Return the block size of the cipher.

-

Parameters:
- - -
c cipher to get the block size from.
-
-
Returns:
the block size of the cipher.
-
Examples:
-example_evp_cipher.c.
-
-

- -

-
- - - - - - - - - -
size_t EVP_CIPHER_CTX_block_size (const EVP_CIPHER_CTX *  ctx  ) 
-
-
- -

-Return the block size of the cipher context.

-

Parameters:
- - -
ctx cipher context to get the block size from.
-
-
Returns:
the block size of the cipher context.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_CIPHER_CTX_cipher (EVP_CIPHER_CTX *  ctx  ) 
-
-
- -

-Return the EVP_CIPHER for a EVP_CIPHER_CTX context.

-

Parameters:
- - -
ctx the context to get the cipher type from.
-
-
Returns:
the EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
int EVP_CIPHER_CTX_cleanup (EVP_CIPHER_CTX *  c  ) 
-
-
- -

-Clean up the EVP_CIPHER_CTX context.

-

Parameters:
- - -
c the cipher to clean up.
-
-
Returns:
1 on success.
-
Examples:
-example_evp_cipher.c.
-
-

- -

-
- - - - - - - - - -
unsigned long EVP_CIPHER_CTX_flags (const EVP_CIPHER_CTX *  ctx  ) 
-
-
- -

-Get the flags for an EVP_CIPHER_CTX context.

-

Parameters:
- - -
ctx the EVP_CIPHER_CTX to get the flags from
-
-
Returns:
the flags for an EVP_CIPHER_CTX.
- -
-

- -

-
- - - - - - - - - -
void* EVP_CIPHER_CTX_get_app_data (EVP_CIPHER_CTX *  ctx  ) 
-
-
- -

-Get the app data for an EVP_CIPHER_CTX context.

-

Parameters:
- - -
ctx the EVP_CIPHER_CTX to get the app data from
-
-
Returns:
the app data for an EVP_CIPHER_CTX.
- -
-

- -

-
- - - - - - - - - -
void EVP_CIPHER_CTX_init (EVP_CIPHER_CTX *  c  ) 
-
-
- -

-Initiate a EVP_CIPHER_CTX context. Clean up with EVP_CIPHER_CTX_cleanup().

-

Parameters:
- - -
c the cipher initiate.
-
-
Examples:
-example_evp_cipher.c.
-
-

- -

-
- - - - - - - - - -
size_t EVP_CIPHER_CTX_iv_length (const EVP_CIPHER_CTX *  ctx  ) 
-
-
- -

-Return the IV size of the cipher context.

-

Parameters:
- - -
ctx cipher context to get the IV size from.
-
-
Returns:
the IV size of the cipher context.
- -
-

- -

-
- - - - - - - - - -
size_t EVP_CIPHER_CTX_key_length (const EVP_CIPHER_CTX *  ctx  ) 
-
-
- -

-Return the key size of the cipher context.

-

Parameters:
- - -
ctx cipher context to get the key size from.
-
-
Returns:
the key size of the cipher context.
- -
-

- -

-
- - - - - - - - - -
int EVP_CIPHER_CTX_mode (const EVP_CIPHER_CTX *  ctx  ) 
-
-
- -

-Get the mode for an EVP_CIPHER_CTX context.

-

Parameters:
- - -
ctx the EVP_CIPHER_CTX to get the mode from
-
-
Returns:
the mode for an EVP_CIPHER_CTX.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void EVP_CIPHER_CTX_set_app_data (EVP_CIPHER_CTX *  ctx,
void *  data 
)
-
-
- -

-Set the app data for an EVP_CIPHER_CTX context.

-

Parameters:
- - - -
ctx the EVP_CIPHER_CTX to set the app data for
data the app data to set for an EVP_CIPHER_CTX.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int EVP_CIPHER_CTX_set_key_length (EVP_CIPHER_CTX *  c,
int  length 
)
-
-
- -

-If the cipher type supports it, change the key length

-

Parameters:
- - - -
c the cipher context to change the key length for
length new key length
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - -
size_t EVP_CIPHER_iv_length (const EVP_CIPHER *  c  ) 
-
-
- -

-Return the IV size of the cipher.

-

Parameters:
- - -
c cipher to get the IV size from.
-
-
Returns:
the IV size of the cipher.
-
Examples:
-example_evp_cipher.c.
-
-

- -

-
- - - - - - - - - -
size_t EVP_CIPHER_key_length (const EVP_CIPHER *  c  ) 
-
-
- -

-Return the key size of the cipher.

-

Parameters:
- - -
c cipher to get the key size from.
-
-
Returns:
the key size of the cipher.
-
Examples:
-example_evp_cipher.c.
-
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int EVP_CipherFinal_ex (EVP_CIPHER_CTX *  ctx,
void *  out,
int *  outlen 
)
-
-
- -

-Encipher/decipher final data

-

Parameters:
- - - - -
ctx the cipher context.
out output data from the operation.
outlen output length
-
-The input length needs to be at least EVP_CIPHER_block_size() bytes long.

-See EVP Cipher for an example how to use this function.

-

Returns:
1 on success.
-
Examples:
-example_evp_cipher.c.
-
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int EVP_CipherInit_ex (EVP_CIPHER_CTX *  ctx,
const EVP_CIPHER *  c,
ENGINE *  engine,
const void *  key,
const void *  iv,
int  encp 
)
-
-
- -

-Initiate the EVP_CIPHER_CTX context to encrypt or decrypt data. Clean up with EVP_CIPHER_CTX_cleanup().

-

Parameters:
- - - - - - - -
ctx context to initiate
c cipher to use.
engine crypto engine to use, NULL to select default.
key the crypto key to use, NULL will use the previous value.
iv the IV to use, NULL will use the previous value.
encp non zero will encrypt, -1 use the previous value.
-
-
Returns:
1 on success.
-
Examples:
-example_evp_cipher.c.
-
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int EVP_CipherUpdate (EVP_CIPHER_CTX *  ctx,
void *  out,
int *  outlen,
void *  in,
size_t  inlen 
)
-
-
- -

-Encipher/decipher partial data

-

Parameters:
- - - - - - -
ctx the cipher context.
out output data from the operation.
outlen output length
in input data to the operation.
inlen length of data.
-
-The output buffer length should at least be EVP_CIPHER_block_size() byte longer then the input length.

-See EVP Cipher for an example how to use this function.

-

Returns:
1 on success.
- -

-If there in no spare bytes in the left from last Update and the input length is on the block boundery, the EVP_CipherUpdate() function can take a shortcut (and preformance gain) and directly encrypt the data, otherwise we hav to fix it up and store extra it the EVP_CIPHER_CTX.

Examples:
-example_evp_cipher.c.
-
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_des_cbc (void   ) 
-
-
- -

-The DES cipher type

-

Returns:
the DES-CBC EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_des_ede3_cbc (void   ) 
-
-
- -

-The tripple DES cipher type

-

Returns:
the DES-EDE3-CBC EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int EVP_Digest (const void *  data,
size_t  dsize,
void *  hash,
unsigned int *  hsize,
const EVP_MD *  md,
ENGINE *  engine 
)
-
-
- -

-Do the whole EVP_MD_CTX_create(), EVP_DigestInit_ex(), EVP_DigestUpdate(), EVP_DigestFinal_ex(), EVP_MD_CTX_destroy() dance in one call.

-

Parameters:
- - - - - - - -
data the data to update the context with
dsize length of data
hash output data of at least EVP_MD_size() length.
hsize output length of hash.
md message digest to use
engine engine to use, NULL for default engine.
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int EVP_DigestFinal_ex (EVP_MD_CTX *  ctx,
void *  hash,
unsigned int *  size 
)
-
-
- -

-Complete the message digest.

-

Parameters:
- - - - -
ctx the context to complete.
hash the output of the message digest function. At least EVP_MD_size().
size the output size of hash.
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int EVP_DigestInit_ex (EVP_MD_CTX *  ctx,
const EVP_MD *  md,
ENGINE *  engine 
)
-
-
- -

-Init a EVP_MD_CTX for use a specific message digest and engine.

-

Parameters:
- - - - -
ctx the message digest context to init.
md the message digest to use.
engine the engine to use, NULL to use the default engine.
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int EVP_DigestUpdate (EVP_MD_CTX *  ctx,
const void *  data,
size_t  size 
)
-
-
- -

-Update the digest with some data.

-

Parameters:
- - - - -
ctx the context to update
data the data to update the context with
size length of data
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_enc_null (void   ) 
-
-
- -

-The NULL cipher type, does no encryption/decryption.

-

Returns:
the null EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_get_cipherbyname (const char *  name  ) 
-
-
- -

-Get the cipher type using their name.

-

Parameters:
- - -
name the name of the cipher.
-
-
Returns:
the selected EVP_CIPHER pointer or NULL if not found.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_aes_128_cbc (void   ) 
-
-
- -

-The AES-128 cipher type (hcrypto)

-

Returns:
the AES-128 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_aes_128_cfb8 (void   ) 
-
-
- -

-The AES-128 CFB8 cipher type (hcrypto)

-

Returns:
the AES-128 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_aes_192_cbc (void   ) 
-
-
- -

-The AES-192 cipher type (hcrypto)

-

Returns:
the AES-192 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_aes_192_cfb8 (void   ) 
-
-
- -

-The AES-192 CFB8 cipher type (hcrypto)

-

Returns:
the AES-192 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_aes_256_cbc (void   ) 
-
-
- -

-The AES-256 cipher type (hcrypto)

-

Returns:
the AES-256 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_aes_256_cfb8 (void   ) 
-
-
- -

-The AES-256 CFB8 cipher type (hcrypto)

-

Returns:
the AES-256 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_camellia_128_cbc (void   ) 
-
-
- -

-The Camellia-128 cipher type - hcrypto

-

Returns:
the Camellia-128 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_camellia_192_cbc (void   ) 
-
-
- -

-The Camellia-198 cipher type - hcrypto

-

Returns:
the Camellia-198 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_camellia_256_cbc (void   ) 
-
-
- -

-The Camellia-256 cipher type - hcrypto

-

Returns:
the Camellia-256 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_des_cbc (void   ) 
-
-
- -

-The DES cipher type

-

Returns:
the DES-CBC EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_des_ede3_cbc (void   ) 
-
-
- -

-The tripple DES cipher type - hcrypto

-

Returns:
the DES-EDE3-CBC EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_hcrypto_md2 (void   ) 
-
-
- -

-The message digest MD2 - hcrypto

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_hcrypto_md4 (void   ) 
-
-
- -

-The message digest MD4 - hcrypto

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_hcrypto_md5 (void   ) 
-
-
- -

-The message digest MD5 - hcrypto

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_rc2_40_cbc (void   ) 
-
-
- -

-The RC2-40 cipher type

-

Returns:
the RC2-40 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_rc2_64_cbc (void   ) 
-
-
- -

-The RC2-64 cipher type

-

Returns:
the RC2-64 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_hcrypto_rc2_cbc (void   ) 
-
-
- -

-The RC2 cipher type - hcrypto

-

Returns:
the RC2 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_hcrypto_sha1 (void   ) 
-
-
- -

-The message digest SHA1 - hcrypto

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_hcrypto_sha256 (void   ) 
-
-
- -

-The message digest SHA256 - hcrypto

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_hcrypto_sha384 (void   ) 
-
-
- -

-The message digest SHA384 - hcrypto

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_hcrypto_sha512 (void   ) 
-
-
- -

-The message digest SHA512 - hcrypto

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_md2 (void   ) 
-
-
- -

-The message digest MD2

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_md4 (void   ) 
-
-
- -

-The message digest MD4

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_md5 (void   ) 
-
-
- -

-The message digest MD5

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
size_t EVP_MD_block_size (const EVP_MD *  md  ) 
-
-
- -

-Return the blocksize of the message digest function.

-

Parameters:
- - -
md the evp message
-
-
Returns:
size size of the message digest block size
- -
-

- -

-
- - - - - - - - - -
size_t EVP_MD_CTX_block_size (EVP_MD_CTX *  ctx  ) 
-
-
- -

-Return the blocksize of the message digest function.

-

Parameters:
- - -
ctx the evp message digest context
-
-
Returns:
size size of the message digest block size
- -
-

- -

-
- - - - - - - - - -
int EVP_MD_CTX_cleanup (EVP_MD_CTX *  ctx  ) 
-
-
- -

-Free the resources used by the EVP_MD context.

-

Parameters:
- - -
ctx the context to free the resources from.
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - -
EVP_MD_CTX* EVP_MD_CTX_create (void   ) 
-
-
- -

-Allocate a messsage digest context object. Free with EVP_MD_CTX_destroy().

-

Returns:
a newly allocated message digest context object.
- -
-

- -

-
- - - - - - - - - -
void EVP_MD_CTX_destroy (EVP_MD_CTX *  ctx  ) 
-
-
- -

-Free a messsage digest context object.

-

Parameters:
- - -
ctx context to free.
-
- -
-

- -

-
- - - - - - - - - -
void EVP_MD_CTX_init (EVP_MD_CTX *  ctx  ) 
-
-
- -

-Initiate a messsage digest context object. Deallocate with EVP_MD_CTX_cleanup(). Please use EVP_MD_CTX_create() instead.

-

Parameters:
- - -
ctx variable to initiate.
-
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_MD_CTX_md (EVP_MD_CTX *  ctx  ) 
-
-
- -

-Get the EVP_MD use for a specified context.

-

Parameters:
- - -
ctx the EVP_MD context to get the EVP_MD for.
-
-
Returns:
the EVP_MD used for the context.
- -
-

- -

-
- - - - - - - - - -
size_t EVP_MD_CTX_size (EVP_MD_CTX *  ctx  ) 
-
-
- -

-Return the output size of the message digest function.

-

Parameters:
- - -
ctx the evp message digest context
-
-
Returns:
size output size of the message digest function.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_md_null (void   ) 
-
-
- -

-The null message digest

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
size_t EVP_MD_size (const EVP_MD *  md  ) 
-
-
- -

-Return the output size of the message digest function.

-

Parameters:
- - -
md the evp message
-
-
Returns:
size output size of the message digest function.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_rc2_40_cbc (void   ) 
-
-
- -

-The RC2 cipher type

-

Returns:
the RC2 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_rc2_64_cbc (void   ) 
-
-
- -

-The RC2 cipher type

-

Returns:
the RC2 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_rc2_cbc (void   ) 
-
-
- -

-The RC2 cipher type

-

Returns:
the RC2 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_rc4 (void   ) 
-
-
- -

-The RC4 cipher type

-

Returns:
the RC4 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_rc4_40 (void   ) 
-
-
- -

-The RC4-40 cipher type

-

Returns:
the RC4-40 EVP_CIPHER pointer.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_sha (void   ) 
-
-
- -

-The message digest SHA1

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_sha1 (void   ) 
-
-
- -

-The message digest SHA1

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_sha256 (void   ) 
-
-
- -

-The message digest SHA256

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_sha384 (void   ) 
-
-
- -

-The message digest SHA384

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_MD* EVP_sha512 (void   ) 
-
-
- -

-The message digest SHA512

-

Returns:
the message digest type.
- -
-

- -

-
- - - - - - - - - -
const EVP_CIPHER* EVP_wincrypt_des_ede3_cbc (void   ) 
-
-
- -

-The tripple DES cipher type (Micrsoft crypt provider)

-

Returns:
the DES-EDE3-CBC EVP_CIPHER pointer.
- -
-

-

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__misc.html b/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__misc.html deleted file mode 100644 index caf52bb6686..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__misc.html +++ /dev/null @@ -1,106 +0,0 @@ - - -Heimdal crypto library: hcrypto miscellaneous functions - - - -

-keyhole logo -

- - - -
-

hcrypto miscellaneous functions

- - - - -

Functions

int PKCS5_PBKDF2_HMAC_SHA1 (const void *password, size_t password_len, const void *salt, size_t salt_len, unsigned long iter, size_t keylen, void *key)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int PKCS5_PBKDF2_HMAC_SHA1 (const void *  password,
size_t  password_len,
const void *  salt,
size_t  salt_len,
unsigned long  iter,
size_t  keylen,
void *  key 
)
-
-
- -

-As descriped in PKCS5, convert a password, salt, and iteration counter into a crypto key.

-

Parameters:
- - - - - - - - -
password Password.
password_len Length of password.
salt Salt
salt_len Length of salt.
iter iteration counter.
keylen the output key length.
key the output key.
-
-
Returns:
1 on success, non 1 on failure.
- -
-

-

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__rand.html b/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__rand.html deleted file mode 100644 index f7104483bdc..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__rand.html +++ /dev/null @@ -1,425 +0,0 @@ - - -Heimdal crypto library: RAND crypto functions - - - -

-keyhole logo -

- - - -
-

RAND crypto functions

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

void RAND_seed (const void *indata, size_t size)
int RAND_bytes (void *outdata, size_t size)
void RAND_cleanup (void)
void RAND_add (const void *indata, size_t size, double entropi)
int RAND_pseudo_bytes (void *outdata, size_t size)
int RAND_status (void)
int RAND_set_rand_method (const RAND_METHOD *meth)
const RAND_METHOD * RAND_get_rand_method (void)
int RAND_set_rand_engine (ENGINE *engine)
int RAND_load_file (const char *filename, size_t size)
int RAND_write_file (const char *filename)
const char * RAND_file_name (char *filename, size_t size)
-

Detailed Description

-See the RAND - random number for description and examples.

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void RAND_add (const void *  indata,
size_t  size,
double  entropi 
)
-
-
- -

-Seed that random number generator. Secret material can securely be feed into the function, they will never be returned.

-

Parameters:
- - - - -
indata the input data.
size size of in data.
entropi entropi in data.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int RAND_bytes (void *  outdata,
size_t  size 
)
-
-
- -

-Get a random block from the random generator, can be used for key material.

-

Parameters:
- - - -
outdata random data
size length random data
-
-
Returns:
1 on success, 0 on failure.
- -
-

- -

-
- - - - - - - - - -
void RAND_cleanup (void   ) 
-
-
- -

-Reset and free memory used by the random generator. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
const char* RAND_file_name (char *  filename,
size_t  size 
)
-
-
- -

-Return the default random state filename for a user to use for RAND_load_file(), and RAND_write_file().

-

Parameters:
- - - -
filename buffer to hold file name.
size size of buffer filename.
-
-
Returns:
the buffer filename or NULL on failure.
- -
-

- -

-
- - - - - - - - - -
const RAND_METHOD* RAND_get_rand_method (void   ) 
-
-
- -

-Get the default random method. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
int RAND_load_file (const char *  filename,
size_t  size 
)
-
-
- -

-Load a a file and feed it into RAND_seed().

-

Parameters:
- - - -
filename name of file to read.
size minimum size to read.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int RAND_pseudo_bytes (void *  outdata,
size_t  size 
)
-
-
- -

-Get a random block from the random generator, should NOT be used for key material.

-

Parameters:
- - - -
outdata random data
size length random data
-
-
Returns:
1 on success, 0 on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void RAND_seed (const void *  indata,
size_t  size 
)
-
-
- -

-Seed that random number generator. Secret material can securely be feed into the function, they will never be returned.

-

Parameters:
- - - -
indata seed data
size length seed data
-
- -
-

- -

-
- - - - - - - - - -
int RAND_set_rand_engine (ENGINE *  engine  ) 
-
-
- -

-Set the default random method from engine.

-

Parameters:
- - -
engine use engine, if NULL is passed it, old method and engine is cleared.
-
-
Returns:
1 on success, 0 on failure.
- -
-

- -

-
- - - - - - - - - -
int RAND_set_rand_method (const RAND_METHOD *  meth  ) 
-
-
- -

-Set the default random method.

-

Parameters:
- - -
meth set the new default method.
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - -
int RAND_status (void   ) 
-
-
- -

-Return status of the random generator

-

Returns:
1 if the random generator can deliver random data.
- -
-

- -

-
- - - - - - - - - -
int RAND_write_file (const char *  filename  ) 
-
-
- -

-Write of random numbers to a file to store for later initiation with RAND_load_file().

-

Parameters:
- - -
filename name of file to write.
-
-
Returns:
1 on success and non-one on failure.
- -
-

-

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__rsa.html b/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__rsa.html deleted file mode 100644 index 3216c35feb6..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/group__hcrypto__rsa.html +++ /dev/null @@ -1,278 +0,0 @@ - - -Heimdal crypto library: RSA functions - - - -

-keyhole logo -

- - - -
-

RSA functions

- - - - - - - - - - - - - - - - - - -

Functions

RSA * RSA_new (void)
RSA * RSA_new_method (ENGINE *engine)
void RSA_free (RSA *rsa)
int RSA_up_ref (RSA *rsa)
const RSA_METHOD * RSA_get_method (const RSA *rsa)
int RSA_set_method (RSA *rsa, const RSA_METHOD *method)
int RSA_set_app_data (RSA *rsa, void *arg)
void * RSA_get_app_data (const RSA *rsa)
-

Detailed Description

-See the RSA - public-key cryptography for description and examples.

Function Documentation

- -
-
- - - - - - - - - -
void RSA_free (RSA *  rsa  ) 
-
-
- -

-Free an allocation RSA object.

-

Parameters:
- - -
rsa the RSA object to free.
-
- -
-

- -

-
- - - - - - - - - -
void* RSA_get_app_data (const RSA *  rsa  ) 
-
-
- -

-Get the application data for the RSA object.

-

Parameters:
- - -
rsa the rsa object to get the parameter for
-
-
Returns:
the data object
- -
-

- -

-
- - - - - - - - - -
const RSA_METHOD* RSA_get_method (const RSA *  rsa  ) 
-
-
- -

-Return the RSA_METHOD used for this RSA object.

-

Parameters:
- - -
rsa the object to get the method from.
-
-
Returns:
the method used for this RSA object.
- -
-

- -

-
- - - - - - - - - -
RSA* RSA_new (void   ) 
-
-
- -

-Same as RSA_new_method() using NULL as engine.

-

Returns:
a newly allocated RSA object. Free with RSA_free().
- -
-

- -

-
- - - - - - - - - -
RSA* RSA_new_method (ENGINE *  engine  ) 
-
-
- -

-Allocate a new RSA object using the engine, if NULL is specified as the engine, use the default RSA engine as returned by ENGINE_get_default_RSA().

-

Parameters:
- - -
engine Specific what ENGINE RSA provider should be used.
-
-
Returns:
a newly allocated RSA object. Free with RSA_free().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int RSA_set_app_data (RSA *  rsa,
void *  arg 
)
-
-
- -

-Set the application data for the RSA object.

-

Parameters:
- - - -
rsa the rsa object to set the parameter for
arg the data object to store
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int RSA_set_method (RSA *  rsa,
const RSA_METHOD *  method 
)
-
-
- -

-Set a new method for the RSA keypair.

-

Parameters:
- - - -
rsa rsa parameter.
method the new method for the RSA parameter.
-
-
Returns:
1 on success.
- -
-

- -

-
- - - - - - - - - -
int RSA_up_ref (RSA *  rsa  ) 
-
-
- -

-Add an extra reference to the RSA object. The object should be free with RSA_free() to drop the reference.

-

Parameters:
- - -
rsa the object to add reference counting too.
-
-
Returns:
the current reference count, can't safely be used except for debug printing.
- -
-

-

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/index.html b/kerberosV/src/doc/doxyout/hcrypto/html/index.html deleted file mode 100644 index 192bb89eb0e..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/index.html +++ /dev/null @@ -1,47 +0,0 @@ - - -Heimdal crypto library: Heimdal crypto library - - - -

-keyhole logo -

- - - -
-

Heimdal crypto library

-

-

1.5.3

-Introduction

-Heimdal libhcrypto library is a implementation many crypto algorithms, among others: AES, SHA, DES, RSA, Camellia and many help function.

-hcrypto provies a OpenSSL compatible interface libcrypto interface and is licensed under a 3 clause BSD license (GPL compatible).

-The project web page: http://www.h5l.org/

-Sections of this manual:

-

-

-Older interfaces that you should not use:

-

-

-Control functions

-Functions controlling general behavior, like adding algorithms, are documented in this module: hcrypto function controlling behavior .

-Return values

-Return values are diffrent in this module to be compatible with OpenSSL interface. The diffrence is that on success 1 is returned instead of the customary 0.

-History

-Eric Young implemented DES in the library libdes, that grew into libcrypto in the ssleay package. ssleay went into recession and then got picked up by the OpenSSL (htp://www.openssl.org/) project.

-libhcrypto is an independent implementation with no code decended from ssleay/openssl. Both includes some common imported code, for example the AES implementation.

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/modules.html b/kerberosV/src/doc/doxyout/hcrypto/html/modules.html deleted file mode 100644 index 41ffa44031c..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/modules.html +++ /dev/null @@ -1,35 +0,0 @@ - - -Heimdal crypto library: Module Index - - - -

-keyhole logo -

- - - - -
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/page_des.html b/kerberosV/src/doc/doxyout/hcrypto/html/page_des.html deleted file mode 100644 index ef00e2be259..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/page_des.html +++ /dev/null @@ -1,45 +0,0 @@ - - -Heimdal crypto library: DES - Data Encryption Standard crypto interface - - - -

-keyhole logo -

- - - -
-

DES - Data Encryption Standard crypto interface

See the library functions here: DES crypto functions

-DES was created by IBM, modififed by NSA and then adopted by NBS (now NIST) and published ad FIPS PUB 46 (updated by FIPS 46-1).

-Since the 19th May 2005 DES was withdrawn by NIST and should no longer be used. See EVP - generic crypto interface for replacement encryption algorithms and interfaces.

-Read more the iteresting history of DES on Wikipedia http://www.wikipedia.org/wiki/Data_Encryption_Standard .

-DES key generation

-To generate a DES key safely you have to use the code-snippet below. This is because the DES_random_key() can fail with an abort() in case of and failure to start the random generator.

-There is a replacement function DES_new_random_key(), however that function does not exists in OpenSSL.

-

 DES_cblock key;
- do {
-     if (RAND_rand(&key, sizeof(key)) != 1)
-          goto failure;
-     DES_set_odd_parity(key);
- } while (DES_is_weak_key(&key));
-

-DES implementation history

-There was no complete BSD licensed, fast, GPL compatible implementation of DES, so Love wrote the part that was missing, fast key schedule setup and adapted the interface to the orignal libdes.

-The document that got me started for real was "Efficient Implementation of the Data Encryption Standard" by Dag Arne Osvik. I never got to the PC1 transformation was working, instead I used table-lookup was used for all key schedule setup. The document was very useful since it de-mystified other implementations for me.

-The core DES function (SBOX + P transformation) is from Richard Outerbridge public domain DES implementation. My sanity is saved thanks to his work. Thank you Richard.

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/page_dh.html b/kerberosV/src/doc/doxyout/hcrypto/html/page_dh.html deleted file mode 100644 index bb3d52da5d5..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/page_dh.html +++ /dev/null @@ -1,30 +0,0 @@ - - -Heimdal crypto library: DH - Diffie-Hellman key exchange - - - -

-keyhole logo -

- - - -
-

DH - Diffie-Hellman key exchange

Diffie-Hellman key exchange is a protocol that allows two parties to establish a shared secret key.

-Include and example how to use DH_new() and friends here.

-See the library functions here: Diffie-Hellman functions

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/page_evp.html b/kerberosV/src/doc/doxyout/hcrypto/html/page_evp.html deleted file mode 100644 index febe450a148..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/page_evp.html +++ /dev/null @@ -1,30 +0,0 @@ - - -Heimdal crypto library: EVP - generic crypto interface - - - -

-keyhole logo -

- - - -
-

EVP - generic crypto interface

See the library functions here: EVP generic crypto functions

-EVP Cipher

-The use of EVP_CipherInit_ex() and EVP_Cipher() is pretty easy to understand forward, then EVP_CipherUpdate() and EVP_CipherFinal_ex() really needs an example to explain example_evp_cipher::c .
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/page_rand.html b/kerberosV/src/doc/doxyout/hcrypto/html/page_rand.html deleted file mode 100644 index d163747541b..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/page_rand.html +++ /dev/null @@ -1,28 +0,0 @@ - - -Heimdal crypto library: RAND - random number - - - -

-keyhole logo -

- - - -
-

RAND - random number

See the library functions here: RAND crypto functions
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/page_rsa.html b/kerberosV/src/doc/doxyout/hcrypto/html/page_rsa.html deleted file mode 100644 index 1e84e44c02b..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/page_rsa.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Heimdal crypto library: RSA - public-key cryptography - - - -

-keyhole logo -

- - - -
-

RSA - public-key cryptography

RSA is named by its inventors (Ron Rivest, Adi Shamir, and Leonard Adleman) (published in 1977), patented expired in 21 September 2000.

-Speed for RSA in seconds no key blinding 1000 iteration, same rsa keys (1024 and 2048) operation performed each eteration sign, verify, encrypt, decrypt on a random bit pattern

-name 1024 2048 4098 ================================= gmp: 0.73 6.60 44.80 tfm: 2.45 -- -- ltm: 3.79 20.74 105.41 (default in hcrypto) openssl: 4.04 11.90 82.59 cdsa: 15.89 102.89 721.40 imath: 40.62 -- --

-See the library functions here: RSA functions

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdal crypto library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/tab_b.gif b/kerberosV/src/doc/doxyout/hcrypto/html/tab_b.gif deleted file mode 100644 index 0d623483ffdf5f9f96900108042a7ab0643fe2a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 ncmZ?wbhEHbWMp7uXkcJy*>IeJfk6j|fqX^=1|}vKMh0sDa2W*H diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/tab_l.gif b/kerberosV/src/doc/doxyout/hcrypto/html/tab_l.gif deleted file mode 100644 index 9b1e6337c9299a700401a2a78a2c6ffced475216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 706 zcmZ?wbhEHbZT`}F1e&(Gg}Y(8=I;HA5#Z$3JI=gGB)FQ#odI(O&E^@q;x zK6mr*m3xOS-#u~t!I@i+u0DKm^U160k6t`|^WpV}&n+8{U%dD9&a>B#U%!9-@yol< zU%&tQ{rk_K|NsC0`}dE5ET99@1@a36+kb~?0UJ*yc&I3X_m z!ND^5$O7$#8OFRuDhG}!?8z?cdZK&!`PWjdR;Aj^wZ` zeK{IEYHBJ)6K8VIp1`BVt++swf6j+=L{p1*nO(VhE`pFexG@5$|>uaCcd z`0m=9m+yak{QmXN#Sc$^{$X9h9&q2jiKAI|&T)a;PPx2K9p`YIdw8HtR5k2Q$2-O2 z*;3y{MQ-RnJTgJfI&R5|O)AHxDf_00XbPvDZPy4t=hHd)nfLPvms&O`Ok(sD()5v$ z5U@&h;a=#xbxVbo2~X&Xj0Ie(f{v>vERH+qC+nTG=B8Nca=wU-O$?1&vUgV~9=!H; zx>3p9Yn%*<>t~sk+&0xfyS8RsPfYBd<~wWK%j-LmpU>O7yX^h#UCp1x-p#i7@bE;py8XI6 zmY<)m>~)W~yIWcMVoiPg{duuf<*)9qZ9l$m*Ph&W&$jlv*Vpa+{pH@n=IQ$L?0$ax ec60Ul|8o2P|NVbd{6P)#weSbE3}s?04AuZvx_~SI diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/tab_r.gif b/kerberosV/src/doc/doxyout/hcrypto/html/tab_r.gif deleted file mode 100644 index ce9dd9f533cb5486d6941844f442b59d4a9e9175..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2585 zcmbV}`9Bkk1ILFF--w5zJc=ZZT(zjE=;2|_S)Qm~rCWz1Pc)KPl;jv%A#&v2*x}yc zmf2~Jm~&=xjJY?PqwIN}f8qQ2{r$uH{c*nJbmr{cR5??*egHrs-B=MzCF`3%e{FAW z{oL5xTHn~5TM{jaB;@|_Ue5F&Zb@p(kMyG{*;gWDg zyeL|eZf7Qd8=#bXzSiR{yzRgLSj-fJS8>lBjVHN z^o-0eS=nE6a`W;LChBs=`+QAJP~{b93>H^eRb5kCSC1zUNezun%`L5M?RDzv#%jk7 zYVRX=vATPD`+oEfum^{RM@GjuP?-r=yh0!p;Vx^T9G7~`7%5ydH%70=jyJ;;`d;hv92x3R=z{xp+Lg2!*@OK*K15-t&okoPtSED)h&$RLxdbA zseWm^C3d%-yRNi-ryk^!ek+C`n&~cd$#ZWct_cUL{l~i+Nzx^5d!n94(>bW-iL~Rl z&8r)?q|1DIo=0=judQ{FaGcfLERz8gfn3-Qt<2lksh{mzpT}DXxUuR^z=^key&q4! z+wWI45vL0k$R^(F#{qfqhUsN@WA+w-V?LPH33!Q?WFSB3)WBojE@hK41Nb?KfS+Qo zXgrzfsP$wr4Qzy*{OD>uJBjdgGM@VMml5)2f~_}lD*YyOb}Hjeobhz#4c`w(l^>KK zr?Ud;W~Z}*w;%hZ|2^p^+f06gJDJQD zeIhGADbDmm&6arh(q>EZ<7mjzg7l|z$hRL8=1>)Nv=S7CY$B}iYJ&*T_-T_OG*L1q ztZ3Lana33?y3AKnyq^YCF|4x%Rb5WU&2qcl{TFKey%QJeMxn^SdT!hZ5+0i1zeusiYVp-phBl7b5+Px-X&LhByq z0F&<;K0l2+v>qiHlXb#$jXMv$uK-dEGE9L~qtdU(XeRXmvu*K2Q&6!fD**JxYP4b4BR7FdJ$Qx9G9`J%-_X!a#LGpp3g9)VWytGCa;7`S1_e8F~!R+aSJ zOF17p2`H?2kPs8Q`_;U}+D%3p zs2-0BTqFwpUoBk`?P;iPQ(IbEA|JmMx!P&YYG|R@S=5Mnw;-?A6rEEVyV%d7{iU4a zNk`i!%F(Ykpm`}#oH;BjY->@b8vQedv;pza2FL&*6ufjd+*3Ute&>kes~TU?^KkojsTh(o~(3tk1Y6>4(yn( z#U*ID9@eg-beKo1B;HXe+}{Z%n@7m0+yxivuqk9~;!1LGQlah)xYK4>wgL}l6dsaN zIxlRlq`*`j9PG4*0hD6YV_b_2w5b#)o7J?`q#{GjvvKlD`T*dWcZx<-s(ZvLB44E# z=!|sw!?)@%y$oRNL#25WS3lzdii}TuQ3?CLnvQ1_n};2sT_;Y;#d3=+-(O% zMN$>O!3;ke(UuLR%h_&)N zs^!-@A>QR}4yB1bPp`9S19ikTbZ~O{&FF-yHK{En;mmShDUIEw03`j(DBIsM}Rjki2J#SQa3gFZTKBPDeIiLt9Z z%bL3(B@Qw%(B`wSMS~dPh$=R`(}lBoFXKy(s|*{#ru$wjsBc_O#zxNk9w+UUHmx(U zmJ8+M+ndtnZ<7|VU9Mbt61zpo9T&3%Wx&XII=#QJxjR`CZf22ac3d51Z?GD%LEe_&*t46Qf;4`bZ7p2K(Ab5>GfT^}4! zBT&HZD`^PEgWoI&{~o-ID0F?O`75sm(87x%A{(}Ch1)QlzdJ)1B-eqe5a(weg0`4lQIf1evjvbBY50DVbzO7CLf|vP z2#0(U-|jZ`H{y5N^o7%iK6H>_HEGN->U6^!)1{XpJV!!4(Ig7wzZQ*9WYF4X1rG0x z=1uA@i`rIAciubDC{;~b(|&|A@xkjRP5aRcvRU9tvIm}jDB6J eQ0-6-y)mpwdT=ayS0tBxKDA*~;EWmo diff --git a/kerberosV/src/doc/doxyout/hcrypto/html/tabs.css b/kerberosV/src/doc/doxyout/hcrypto/html/tabs.css deleted file mode 100644 index 95f00a91da3..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/html/tabs.css +++ /dev/null @@ -1,102 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cbc_cksum.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cbc_cksum.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cbc_cksum.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cbc_encrypt.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cbc_encrypt.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cbc_encrypt.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cfb64_encrypt.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cfb64_encrypt.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_cfb64_encrypt.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_check_key_parity.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_check_key_parity.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_check_key_parity.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ecb3_encrypt.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ecb3_encrypt.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ecb3_encrypt.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ecb_encrypt.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ecb_encrypt.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ecb_encrypt.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ede3_cbc_encrypt.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ede3_cbc_encrypt.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_ede3_cbc_encrypt.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_encrypt.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_encrypt.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_encrypt.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_init_random_number_generator.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_init_random_number_generator.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_init_random_number_generator.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_is_weak_key.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_is_weak_key.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_is_weak_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_key_sched.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_key_sched.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_key_sched.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_new_random_key.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_new_random_key.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_new_random_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_pcbc_encrypt.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_pcbc_encrypt.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_pcbc_encrypt.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_random_key.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_random_key.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_random_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key_checked.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key_checked.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key_checked.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key_unchecked.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key_unchecked.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_key_unchecked.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_odd_parity.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_odd_parity.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_set_odd_parity.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_string_to_key.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_string_to_key.3 deleted file mode 100644 index 427856f72d1..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DES_string_to_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_des.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_check_pubkey.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_check_pubkey.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_check_pubkey.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_compute_key.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_compute_key.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_compute_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_free.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_free.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_generate_key.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_generate_key.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_generate_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_generate_parameters_ex.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_generate_parameters_ex.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_generate_parameters_ex.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_get_default_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_get_default_method.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_get_default_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_get_ex_data.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_get_ex_data.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_get_ex_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_ltm_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_ltm_method.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_ltm_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_new.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_new.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_new.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_new_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_new_method.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_new_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_null_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_null_method.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_null_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_default_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_default_method.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_default_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_ex_data.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_ex_data.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_ex_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_method.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_set_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_size.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_size.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_size.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_up_ref.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_up_ref.3 deleted file mode 100644 index ade37d85c12..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/DH_up_ref.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_dh.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_BytesToKey.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_BytesToKey.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_BytesToKey.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_block_size.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_block_size.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_block_size.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_cipher.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_cipher.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_cipher.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_cleanup.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_cleanup.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_cleanup.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_ctrl.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_ctrl.3 deleted file mode 100644 index 2245f894556..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_ctrl.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_core.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_flags.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_flags.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_get_app_data.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_get_app_data.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_get_app_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_init.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_init.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_iv_length.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_iv_length.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_iv_length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_key_length.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_key_length.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_key_length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_mode.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_mode.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_mode.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_rand_key.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_rand_key.3 deleted file mode 100644 index 2245f894556..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_rand_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_core.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_set_app_data.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_set_app_data.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_set_app_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_set_key_length.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_set_key_length.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_CTX_set_key_length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_block_size.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_block_size.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_block_size.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_iv_length.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_iv_length.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_iv_length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_key_length.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_key_length.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CIPHER_key_length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherFinal_ex.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherFinal_ex.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherFinal_ex.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherInit_ex.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherInit_ex.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherInit_ex.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherUpdate.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherUpdate.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_CipherUpdate.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_Digest.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_Digest.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_Digest.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestFinal_ex.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestFinal_ex.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestFinal_ex.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestInit_ex.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestInit_ex.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestInit_ex.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestUpdate.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestUpdate.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_DigestUpdate.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_block_size.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_block_size.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_block_size.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_cleanup.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_cleanup.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_cleanup.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_create.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_create.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_create.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_destroy.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_destroy.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_destroy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_init.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_init.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_md.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_md.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_md.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_size.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_size.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_CTX_size.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_block_size.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_block_size.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_block_size.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_size.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_size.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_MD_size.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_128_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_128_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_128_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_128_cfb8.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_128_cfb8.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_128_cfb8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_192_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_192_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_192_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_192_cfb8.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_192_cfb8.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_192_cfb8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_256_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_256_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_256_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_256_cfb8.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_256_cfb8.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_aes_256_cfb8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_128_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_128_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_128_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_192_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_192_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_192_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_256_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_256_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_camellia_256_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_des_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_des_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_des_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_des_ede3_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_des_ede3_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_des_ede3_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_enc_null.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_enc_null.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_enc_null.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_get_cipherbyname.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_get_cipherbyname.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_get_cipherbyname.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_128_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_128_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_128_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_128_cfb8.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_128_cfb8.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_128_cfb8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_192_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_192_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_192_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_192_cfb8.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_192_cfb8.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_192_cfb8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_256_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_256_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_256_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_256_cfb8.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_256_cfb8.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_aes_256_cfb8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_128_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_128_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_128_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_192_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_192_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_192_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_256_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_256_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_camellia_256_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_des_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_des_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_des_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_des_ede3_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_des_ede3_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_des_ede3_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md2.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md2.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md2.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md4.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md4.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md4.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md5.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md5.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_md5.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_40_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_40_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_40_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_64_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_64_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_64_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_rc2_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha1.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha1.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha1.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha256.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha256.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha256.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha384.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha384.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha384.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha512.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha512.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_hcrypto_sha512.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md2.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md2.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md2.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md4.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md4.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md4.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md5.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md5.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md5.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md_null.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md_null.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_md_null.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_40_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_40_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_40_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_64_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_64_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_64_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc2_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc4.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc4.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc4.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc4_40.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc4_40.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_rc4_40.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha1.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha1.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha1.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha256.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha256.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha256.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha384.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha384.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha384.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha512.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha512.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_sha512.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_wincrypt_des_ede3_cbc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_wincrypt_des_ede3_cbc.3 deleted file mode 100644 index d526f956e4f..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/EVP_wincrypt_des_ede3_cbc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_evp.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms.3 deleted file mode 100644 index 2245f894556..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_core.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms_conf.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms_conf.3 deleted file mode 100644 index 2245f894556..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms_conf.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_core.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms_noconf.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms_noconf.3 deleted file mode 100644 index 2245f894556..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/OpenSSL_add_all_algorithms_noconf.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_core.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/PKCS5_PBKDF2_HMAC_SHA1.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/PKCS5_PBKDF2_HMAC_SHA1.3 deleted file mode 100644 index a6545bd8d82..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/PKCS5_PBKDF2_HMAC_SHA1.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_misc.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_add.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_add.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_add.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_bytes.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_bytes.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_bytes.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_cleanup.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_cleanup.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_cleanup.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_file_name.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_file_name.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_file_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_get_rand_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_get_rand_method.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_get_rand_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_load_file.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_load_file.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_load_file.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_pseudo_bytes.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_pseudo_bytes.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_pseudo_bytes.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_seed.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_seed.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_seed.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_set_rand_engine.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_set_rand_engine.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_set_rand_engine.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_set_rand_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_set_rand_method.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_set_rand_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_status.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_status.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_status.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_write_file.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_write_file.3 deleted file mode 100644 index 321ba4cdcba..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RAND_write_file.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rand.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_free.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_free.3 deleted file mode 100644 index 9f1f31caccf..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rsa.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_get_app_data.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_get_app_data.3 deleted file mode 100644 index 9f1f31caccf..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_get_app_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rsa.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_get_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_get_method.3 deleted file mode 100644 index 9f1f31caccf..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_get_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rsa.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_new.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_new.3 deleted file mode 100644 index 9f1f31caccf..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_new.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rsa.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_new_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_new_method.3 deleted file mode 100644 index 9f1f31caccf..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_new_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rsa.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_set_app_data.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_set_app_data.3 deleted file mode 100644 index 9f1f31caccf..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_set_app_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rsa.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_set_method.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_set_method.3 deleted file mode 100644 index 9f1f31caccf..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_set_method.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rsa.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_up_ref.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_up_ref.3 deleted file mode 100644 index 9f1f31caccf..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/RSA_up_ref.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hcrypto_rsa.3 diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_core.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_core.3 deleted file mode 100644 index e41a1f44a9b..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_core.3 +++ /dev/null @@ -1,76 +0,0 @@ -.TH "hcrypto function controlling behavior" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hcrypto function controlling behavior \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBEVP_CIPHER_CTX_rand_key\fP (EVP_CIPHER_CTX *ctx, void *key)" -.br -.ti -1c -.RI "int \fBEVP_CIPHER_CTX_ctrl\fP (EVP_CIPHER_CTX *ctx, int type, int arg, void *data)" -.br -.ti -1c -.RI "void \fBOpenSSL_add_all_algorithms\fP (void)" -.br -.ti -1c -.RI "void \fBOpenSSL_add_all_algorithms_conf\fP (void)" -.br -.ti -1c -.RI "void \fBOpenSSL_add_all_algorithms_noconf\fP (void)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "int EVP_CIPHER_CTX_ctrl (EVP_CIPHER_CTX * ctx, int type, int arg, void * data)" -.PP -Perform a operation on a ctx -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP context to perform operation on. -.br -\fItype\fP type of operation. -.br -\fIarg\fP argument to operation. -.br -\fIdata\fP addition data to operation. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 for success, 0 for failure. -.RE -.PP - -.SS "int EVP_CIPHER_CTX_rand_key (EVP_CIPHER_CTX * ctx, void * key)" -.PP -Generate a random key for the specificed EVP_CIPHER. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP EVP_CIPHER_CTX type to build the key for. -.br -\fIkey\fP return key, must be at least \fBEVP_CIPHER_key_length()\fP byte long. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 for success, 0 for failure. -.RE -.PP - -.SS "void OpenSSL_add_all_algorithms (void)" -.PP -Add all algorithms to the crypto core. -.SS "void OpenSSL_add_all_algorithms_conf (void)" -.PP -Add all algorithms to the crypto core using configuration file. -.SS "void OpenSSL_add_all_algorithms_noconf (void)" -.PP -Add all algorithms to the crypto core, but don't use the configuration file. diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_des.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_des.3 deleted file mode 100644 index 76ac9a2c526..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_des.3 +++ /dev/null @@ -1,392 +0,0 @@ -.TH "DES crypto functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -DES crypto functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "void \fBDES_set_odd_parity\fP (DES_cblock *key)" -.br -.ti -1c -.RI "int HC_DEPRECATED \fBDES_check_key_parity\fP (DES_cblock *key)" -.br -.ti -1c -.RI "int \fBDES_is_weak_key\fP (DES_cblock *key)" -.br -.ti -1c -.RI "int HC_DEPRECATED \fBDES_set_key\fP (DES_cblock *key, DES_key_schedule *ks)" -.br -.ti -1c -.RI "int \fBDES_set_key_unchecked\fP (DES_cblock *key, DES_key_schedule *ks)" -.br -.ti -1c -.RI "int \fBDES_set_key_checked\fP (DES_cblock *key, DES_key_schedule *ks)" -.br -.ti -1c -.RI "int \fBDES_key_sched\fP (DES_cblock *key, DES_key_schedule *ks)" -.br -.ti -1c -.RI "void \fBDES_encrypt\fP (uint32_t u[2], DES_key_schedule *ks, int encp)" -.br -.ti -1c -.RI "void \fBDES_ecb_encrypt\fP (DES_cblock *input, DES_cblock *output, DES_key_schedule *ks, int encp)" -.br -.ti -1c -.RI "void \fBDES_cbc_encrypt\fP (const void *in, void *out, long length, DES_key_schedule *ks, DES_cblock *iv, int encp)" -.br -.ti -1c -.RI "void \fBDES_pcbc_encrypt\fP (const void *in, void *out, long length, DES_key_schedule *ks, DES_cblock *iv, int encp)" -.br -.ti -1c -.RI "void \fBDES_ecb3_encrypt\fP (DES_cblock *input, DES_cblock *output, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, int encp)" -.br -.ti -1c -.RI "void \fBDES_ede3_cbc_encrypt\fP (const void *in, void *out, long length, DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, DES_cblock *iv, int encp)" -.br -.ti -1c -.RI "void \fBDES_cfb64_encrypt\fP (const void *in, void *out, long length, DES_key_schedule *ks, DES_cblock *iv, int *num, int encp)" -.br -.ti -1c -.RI "uint32_t \fBDES_cbc_cksum\fP (const void *in, DES_cblock *output, long length, DES_key_schedule *ks, DES_cblock *iv)" -.br -.ti -1c -.RI "void \fBDES_string_to_key\fP (const char *str, DES_cblock *key)" -.br -.ti -1c -.RI "int HC_DEPRECATED \fBDES_new_random_key\fP (DES_cblock *key)" -.br -.ti -1c -.RI "void HC_DEPRECATED \fBDES_init_random_number_generator\fP (DES_cblock *seed)" -.br -.ti -1c -.RI "void HC_DEPRECATED \fBDES_random_key\fP (DES_cblock *key)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBDES - Data Encryption Standard crypto interface\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "uint32_t DES_cbc_cksum (const void * in, DES_cblock * output, long length, DES_key_schedule * ks, DES_cblock * iv)" -.PP -Crete a checksum using DES in CBC encryption mode. This mode is only used for Kerberos 4, and it should stay that way. -.PP -The IV must always be diffrent for diffrent input data blocks. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP data to checksum -.br -\fIoutput\fP the checksum -.br -\fIlength\fP length of data -.br -\fIks\fP key schedule to use -.br -\fIiv\fP initial vector to use -.RE -.PP - -.SS "void DES_cbc_encrypt (const void * in, void * out, long length, DES_key_schedule * ks, DES_cblock * iv, int encp)" -.PP -Encrypt/decrypt a block using DES in Chain Block Cipher mode (cbc). -.PP -The IV must always be diffrent for diffrent input data blocks. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP data to encrypt -.br -\fIout\fP data to encrypt -.br -\fIlength\fP length of data -.br -\fIks\fP key schedule to use -.br -\fIiv\fP initial vector to use -.br -\fIencp\fP if non zero, encrypt. if zero, decrypt. -.RE -.PP - -.SS "void DES_cfb64_encrypt (const void * in, void * out, long length, DES_key_schedule * ks, DES_cblock * iv, int * num, int encp)" -.PP -Encrypt/decrypt using DES in cipher feedback mode with 64 bit feedback. -.PP -The IV must always be diffrent for diffrent input data blocks. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP data to encrypt -.br -\fIout\fP data to encrypt -.br -\fIlength\fP length of data -.br -\fIks\fP key schedule to use -.br -\fIiv\fP initial vector to use -.br -\fInum\fP offset into in cipher block encryption/decryption stop last time. -.br -\fIencp\fP if non zero, encrypt. if zero, decrypt. -.RE -.PP - -.SS "int HC_DEPRECATED DES_check_key_parity (DES_cblock * key)" -.PP -Check if the key have correct parity. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP key to check the parity. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success, 0 on failure. -.RE -.PP - -.SS "void DES_ecb3_encrypt (DES_cblock * input, DES_cblock * output, DES_key_schedule * ks1, DES_key_schedule * ks2, DES_key_schedule * ks3, int encp)" -.PP -Encrypt/decrypt a block using triple DES using EDE mode, encrypt/decrypt/encrypt. -.PP -\fBParameters:\fP -.RS 4 -\fIinput\fP data to encrypt -.br -\fIoutput\fP data to encrypt -.br -\fIks1\fP key schedule to use -.br -\fIks2\fP key schedule to use -.br -\fIks3\fP key schedule to use -.br -\fIencp\fP if non zero, encrypt. if zero, decrypt. -.RE -.PP - -.SS "void DES_ecb_encrypt (DES_cblock * input, DES_cblock * output, DES_key_schedule * ks, int encp)" -.PP -Encrypt/decrypt a block using DES. -.PP -\fBParameters:\fP -.RS 4 -\fIinput\fP data to encrypt -.br -\fIoutput\fP data to encrypt -.br -\fIks\fP key schedule to use -.br -\fIencp\fP if non zero, encrypt. if zero, decrypt. -.RE -.PP - -.SS "void DES_ede3_cbc_encrypt (const void * in, void * out, long length, DES_key_schedule * ks1, DES_key_schedule * ks2, DES_key_schedule * ks3, DES_cblock * iv, int encp)" -.PP -Encrypt/decrypt using Triple DES in Chain Block Cipher mode (cbc). -.PP -The IV must always be diffrent for diffrent input data blocks. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP data to encrypt -.br -\fIout\fP data to encrypt -.br -\fIlength\fP length of data -.br -\fIks1\fP key schedule to use -.br -\fIks2\fP key schedule to use -.br -\fIks3\fP key schedule to use -.br -\fIiv\fP initial vector to use -.br -\fIencp\fP if non zero, encrypt. if zero, decrypt. -.RE -.PP - -.SS "void DES_encrypt (uint32_t u[2], DES_key_schedule * ks, int encp)" -.PP -Encrypt/decrypt a block using DES. Also called ECB mode -.PP -\fBParameters:\fP -.RS 4 -\fIu\fP data to encrypt -.br -\fIks\fP key schedule to use -.br -\fIencp\fP if non zero, encrypt. if zero, decrypt. -.RE -.PP - -.SS "void HC_DEPRECATED DES_init_random_number_generator (DES_cblock * seed)" -.PP -Seed the random number generator. Deprecated, use \fBRAND - random number\fP -.PP -\fBParameters:\fP -.RS 4 -\fIseed\fP a seed to seed that random number generate with. -.RE -.PP - -.SS "int DES_is_weak_key (DES_cblock * key)" -.PP -Checks if the key is any of the weaks keys that makes DES attacks trival. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP key to check. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 if the key is weak, 0 otherwise. -.RE -.PP - -.SS "int DES_key_sched (DES_cblock * key, DES_key_schedule * ks)" -.PP -Compatibility function for eay libdes, works just like \fBDES_set_key_checked()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP a key to initialize the key schedule with. -.br -\fIks\fP a key schedule to initialize. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, -1 on invalid parity, -2 on weak key. -.RE -.PP - -.SS "int HC_DEPRECATED DES_new_random_key (DES_cblock * key)" -.PP -Generate a random des key using a random block, fixup parity and skip weak keys. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP is set to a random key. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, non zero on random number generator failure. -.RE -.PP - -.SS "void DES_pcbc_encrypt (const void * in, void * out, long length, DES_key_schedule * ks, DES_cblock * iv, int encp)" -.PP -Encrypt/decrypt a block using DES in Propagating Cipher Block Chaining mode. This mode is only used for Kerberos 4, and it should stay that way. -.PP -The IV must always be diffrent for diffrent input data blocks. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP data to encrypt -.br -\fIout\fP data to encrypt -.br -\fIlength\fP length of data -.br -\fIks\fP key schedule to use -.br -\fIiv\fP initial vector to use -.br -\fIencp\fP if non zero, encrypt. if zero, decrypt. -.RE -.PP - -.SS "void HC_DEPRECATED DES_random_key (DES_cblock * key)" -.PP -Generate a random key, deprecated since it doesn't return an error code, use \fBDES_new_random_key()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP is set to a random key. -.RE -.PP - -.SS "int HC_DEPRECATED DES_set_key (DES_cblock * key, DES_key_schedule * ks)" -.PP -Setup a des key schedule from a key. Deprecated function, use \fBDES_set_key_unchecked()\fP or \fBDES_set_key_checked()\fP instead. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP a key to initialize the key schedule with. -.br -\fIks\fP a key schedule to initialize. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success -.RE -.PP - -.SS "int DES_set_key_checked (DES_cblock * key, DES_key_schedule * ks)" -.PP -Just like \fBDES_set_key_unchecked()\fP except checking that the key is not weak for or have correct parity. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP a key to initialize the key schedule with. -.br -\fIks\fP a key schedule to initialize. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, -1 on invalid parity, -2 on weak key. -.RE -.PP - -.SS "int DES_set_key_unchecked (DES_cblock * key, DES_key_schedule * ks)" -.PP -Setup a des key schedule from a key. The key is no longer needed after this transaction and can cleared. -.PP -Does NOT check that the key is weak for or have wrong parity. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP a key to initialize the key schedule with. -.br -\fIks\fP a key schedule to initialize. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success -.RE -.PP - -.SS "void DES_set_odd_parity (DES_cblock * key)" -.PP -Set the parity of the key block, used to generate a des key from a random key. See \fBDES key generation\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP key to fixup the parity for. -.RE -.PP - -.SS "void DES_string_to_key (const char * str, DES_cblock * key)" -.PP -Convert a string to a DES key. Use something like \fBPKCS5_PBKDF2_HMAC_SHA1()\fP to create key from passwords. -.PP -\fBParameters:\fP -.RS 4 -\fIstr\fP The string to convert to a key -.br -\fIkey\fP the resulting key -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_dh.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_dh.3 deleted file mode 100644 index 2d9b3b57fb7..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_dh.3 +++ /dev/null @@ -1,310 +0,0 @@ -.TH "Diffie-Hellman functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Diffie-Hellman functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "const DH_METHOD * \fBDH_ltm_method\fP (void)" -.br -.ti -1c -.RI "DH * \fBDH_new\fP (void)" -.br -.ti -1c -.RI "DH * \fBDH_new_method\fP (ENGINE *engine)" -.br -.ti -1c -.RI "void \fBDH_free\fP (DH *dh)" -.br -.ti -1c -.RI "int \fBDH_up_ref\fP (DH *dh)" -.br -.ti -1c -.RI "int \fBDH_size\fP (const DH *dh)" -.br -.ti -1c -.RI "int \fBDH_set_ex_data\fP (DH *dh, int idx, void *data)" -.br -.ti -1c -.RI "void * \fBDH_get_ex_data\fP (DH *dh, int idx)" -.br -.ti -1c -.RI "int \fBDH_generate_parameters_ex\fP (DH *dh, int prime_len, int generator, BN_GENCB *cb)" -.br -.ti -1c -.RI "int \fBDH_check_pubkey\fP (const DH *dh, const BIGNUM *pub_key, int *codes)" -.br -.ti -1c -.RI "int \fBDH_generate_key\fP (DH *dh)" -.br -.ti -1c -.RI "int \fBDH_compute_key\fP (unsigned char *shared_key, const BIGNUM *peer_pub_key, DH *dh)" -.br -.ti -1c -.RI "int \fBDH_set_method\fP (DH *dh, const DH_METHOD *method)" -.br -.ti -1c -.RI "const DH_METHOD * \fBDH_null_method\fP (void)" -.br -.ti -1c -.RI "void \fBDH_set_default_method\fP (const DH_METHOD *meth)" -.br -.ti -1c -.RI "const DH_METHOD * \fBDH_get_default_method\fP (void)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBDH - Diffie-Hellman key exchange\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "int DH_check_pubkey (const DH * dh, const BIGNUM * pub_key, int * codes)" -.PP -Check that the public key is sane. -.PP -\fBParameters:\fP -.RS 4 -\fIdh\fP the local peer DH parameters. -.br -\fIpub_key\fP the remote peer public key parameters. -.br -\fIcodes\fP return that the failures of the pub_key are. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success, 0 on failure and *codes is set the the combined fail check for the public key -.RE -.PP - -.PP -Checks that the function performs are: -.IP "\(bu" 2 -pub_key is not negative -.PP -.PP -.IP "\(bu" 2 -pub_key > 1 and pub_key < p - 1, to avoid small subgroups attack. -.PP -.PP -.IP "\(bu" 2 -if g == 2, pub_key have more then one bit set, if bits set is 1, log_2(pub_key) is trival -.PP - -.SS "int DH_compute_key (unsigned char * shared_key, const BIGNUM * peer_pub_key, DH * dh)" -.PP -Complute the shared secret key. -.PP -\fBParameters:\fP -.RS 4 -\fIshared_key\fP the resulting shared key, need to be at least \fBDH_size()\fP large. -.br -\fIpeer_pub_key\fP the peer's public key. -.br -\fIdh\fP the dh key pair. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.PP -Checks that the pubkey passed in is valid using \fBDH_check_pubkey()\fP. -.SS "void DH_free (DH * dh)" -.PP -Free a DH object and release related resources, like ENGINE, that the object was using. -.PP -\fBParameters:\fP -.RS 4 -\fIdh\fP object to be freed. -.RE -.PP - -.SS "int DH_generate_key (DH * dh)" -.PP -Generate a new DH private-public key pair. The dh parameter must be allocted first with \fBDH_new()\fP. dh->p and dp->g must be set. -.PP -\fBParameters:\fP -.RS 4 -\fIdh\fP dh parameter. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "int DH_generate_parameters_ex (DH * dh, int prime_len, int generator, BN_GENCB * cb)" -.PP -Generate DH parameters for the DH object give parameters. -.PP -\fBParameters:\fP -.RS 4 -\fIdh\fP The DH object to generate parameters for. -.br -\fIprime_len\fP length of the prime -.br -\fIgenerator\fP generator, g -.br -\fIcb\fP Callback parameters to show progress, can be NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -the maximum size in bytes of the out data. -.RE -.PP - -.SS "const DH_METHOD* DH_get_default_method (void)" -.PP -Return the default DH implementation. -.PP -\fBReturns:\fP -.RS 4 -pointer to a DH_METHOD. -.RE -.PP - -.SS "void* DH_get_ex_data (DH * dh, int idx)" -.PP -Get the data for index idx in the DH object. -.PP -\fBParameters:\fP -.RS 4 -\fIdh\fP DH object. -.br -\fIidx\fP index to get the data for. -.RE -.PP -\fBReturns:\fP -.RS 4 -the object store in index idx -.RE -.PP - -.SS "const DH_METHOD* DH_ltm_method (void)" -.PP -DH implementation using libtommath. -.PP -\fBReturns:\fP -.RS 4 -the DH_METHOD for the DH implementation using libtommath. -.RE -.PP - -.SS "DH* DH_new (void)" -.PP -Create a new DH object using DH_new_method(NULL), see \fBDH_new_method()\fP. -.PP -\fBReturns:\fP -.RS 4 -a newly allocated DH object. -.RE -.PP - -.SS "DH* DH_new_method (ENGINE * engine)" -.PP -Create a new DH object from the given engine, if the NULL is used, the default engine is used. Free the DH object with \fBDH_free()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIengine\fP The engine to use to allocate the DH object. -.RE -.PP -\fBReturns:\fP -.RS 4 -a newly allocated DH object. -.RE -.PP - -.SS "const DH_METHOD* DH_null_method (void)" -.PP -Return the dummy DH implementation. -.PP -\fBReturns:\fP -.RS 4 -pointer to a DH_METHOD. -.RE -.PP - -.SS "void DH_set_default_method (const DH_METHOD * meth)" -.PP -Set the default DH implementation. -.PP -\fBParameters:\fP -.RS 4 -\fImeth\fP pointer to a DH_METHOD. -.RE -.PP - -.SS "int DH_set_ex_data (DH * dh, int idx, void * data)" -.PP -Set the data index idx in the DH object to data. -.PP -\fBParameters:\fP -.RS 4 -\fIdh\fP DH object. -.br -\fIidx\fP index to set the data for. -.br -\fIdata\fP data to store for the index idx. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "int DH_set_method (DH * dh, const DH_METHOD * method)" -.PP -Set a new method for the DH keypair. -.PP -\fBParameters:\fP -.RS 4 -\fIdh\fP dh parameter. -.br -\fImethod\fP the new method for the DH parameter. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "int DH_size (const DH * dh)" -.PP -The maximum output size of the \fBDH_compute_key()\fP function. -.PP -\fBParameters:\fP -.RS 4 -\fIdh\fP The DH object to get the size from. -.RE -.PP -\fBReturns:\fP -.RS 4 -the maximum size in bytes of the out data. -.RE -.PP - -.SS "int DH_up_ref (DH * dh)" -.PP -Add a reference to the DH object. The object should be free with \fBDH_free()\fP to drop the reference. -.PP -\fBParameters:\fP -.RS 4 -\fIdh\fP the object to increase the reference count too. -.RE -.PP -\fBReturns:\fP -.RS 4 -the updated reference count, can't safely be used except for debug printing. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_evp.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_evp.3 deleted file mode 100644 index fa90b5cd82e..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_evp.3 +++ /dev/null @@ -1,1299 +0,0 @@ -.TH "EVP generic crypto functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -EVP generic crypto functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_wincrypt_des_ede3_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_128_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_192_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_256_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_128_cfb8\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_192_cfb8\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_aes_256_cfb8\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_hcrypto_sha256\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_hcrypto_sha384\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_hcrypto_sha512\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_hcrypto_sha1\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_hcrypto_md5\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_hcrypto_md4\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_hcrypto_md2\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_des_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_des_ede3_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_rc2_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_rc2_40_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_rc2_64_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_camellia_128_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_camellia_192_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_hcrypto_camellia_256_cbc\fP (void)" -.br -.ti -1c -.RI "size_t \fBEVP_MD_size\fP (const EVP_MD *md)" -.br -.ti -1c -.RI "size_t \fBEVP_MD_block_size\fP (const EVP_MD *md)" -.br -.ti -1c -.RI "EVP_MD_CTX * \fBEVP_MD_CTX_create\fP (void)" -.br -.ti -1c -.RI "void \fBEVP_MD_CTX_init\fP (EVP_MD_CTX *ctx) HC_DEPRECATED" -.br -.ti -1c -.RI "void \fBEVP_MD_CTX_destroy\fP (EVP_MD_CTX *ctx)" -.br -.ti -1c -.RI "int \fBEVP_MD_CTX_cleanup\fP (EVP_MD_CTX *ctx) HC_DEPRECATED" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_MD_CTX_md\fP (EVP_MD_CTX *ctx)" -.br -.ti -1c -.RI "size_t \fBEVP_MD_CTX_size\fP (EVP_MD_CTX *ctx)" -.br -.ti -1c -.RI "size_t \fBEVP_MD_CTX_block_size\fP (EVP_MD_CTX *ctx)" -.br -.ti -1c -.RI "int \fBEVP_DigestInit_ex\fP (EVP_MD_CTX *ctx, const EVP_MD *md, ENGINE *engine)" -.br -.ti -1c -.RI "int \fBEVP_DigestUpdate\fP (EVP_MD_CTX *ctx, const void *data, size_t size)" -.br -.ti -1c -.RI "int \fBEVP_DigestFinal_ex\fP (EVP_MD_CTX *ctx, void *hash, unsigned int *size)" -.br -.ti -1c -.RI "int \fBEVP_Digest\fP (const void *data, size_t dsize, void *hash, unsigned int *hsize, const EVP_MD *md, ENGINE *engine)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_sha256\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_sha384\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_sha512\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_sha1\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_sha\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_md5\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_md4\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_md2\fP (void)" -.br -.ti -1c -.RI "const EVP_MD * \fBEVP_md_null\fP (void)" -.br -.ti -1c -.RI "size_t \fBEVP_CIPHER_block_size\fP (const EVP_CIPHER *c)" -.br -.ti -1c -.RI "size_t \fBEVP_CIPHER_key_length\fP (const EVP_CIPHER *c)" -.br -.ti -1c -.RI "size_t \fBEVP_CIPHER_iv_length\fP (const EVP_CIPHER *c)" -.br -.ti -1c -.RI "void \fBEVP_CIPHER_CTX_init\fP (EVP_CIPHER_CTX *c)" -.br -.ti -1c -.RI "int \fBEVP_CIPHER_CTX_cleanup\fP (EVP_CIPHER_CTX *c)" -.br -.ti -1c -.RI "int \fBEVP_CIPHER_CTX_set_key_length\fP (EVP_CIPHER_CTX *c, int length)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_CIPHER_CTX_cipher\fP (EVP_CIPHER_CTX *ctx)" -.br -.ti -1c -.RI "size_t \fBEVP_CIPHER_CTX_block_size\fP (const EVP_CIPHER_CTX *ctx)" -.br -.ti -1c -.RI "size_t \fBEVP_CIPHER_CTX_key_length\fP (const EVP_CIPHER_CTX *ctx)" -.br -.ti -1c -.RI "size_t \fBEVP_CIPHER_CTX_iv_length\fP (const EVP_CIPHER_CTX *ctx)" -.br -.ti -1c -.RI "unsigned long \fBEVP_CIPHER_CTX_flags\fP (const EVP_CIPHER_CTX *ctx)" -.br -.ti -1c -.RI "int \fBEVP_CIPHER_CTX_mode\fP (const EVP_CIPHER_CTX *ctx)" -.br -.ti -1c -.RI "void * \fBEVP_CIPHER_CTX_get_app_data\fP (EVP_CIPHER_CTX *ctx)" -.br -.ti -1c -.RI "void \fBEVP_CIPHER_CTX_set_app_data\fP (EVP_CIPHER_CTX *ctx, void *data)" -.br -.ti -1c -.RI "int \fBEVP_CipherInit_ex\fP (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *c, ENGINE *engine, const void *key, const void *iv, int encp)" -.br -.ti -1c -.RI "int \fBEVP_CipherUpdate\fP (EVP_CIPHER_CTX *ctx, void *out, int *outlen, void *in, size_t inlen)" -.br -.ti -1c -.RI "int \fBEVP_CipherFinal_ex\fP (EVP_CIPHER_CTX *ctx, void *out, int *outlen)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_enc_null\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_rc2_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_rc2_40_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_rc2_64_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_rc4\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_rc4_40\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_des_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_des_ede3_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_aes_128_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_aes_192_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_aes_256_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_aes_128_cfb8\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_aes_192_cfb8\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_aes_256_cfb8\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_camellia_128_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_camellia_192_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_camellia_256_cbc\fP (void)" -.br -.ti -1c -.RI "const EVP_CIPHER * \fBEVP_get_cipherbyname\fP (const char *name)" -.br -.ti -1c -.RI "int \fBEVP_BytesToKey\fP (const EVP_CIPHER *type, const EVP_MD *md, const void *salt, const void *data, size_t datalen, unsigned int count, void *keydata, void *ivdata)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBEVP - generic crypto interface\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "const EVP_CIPHER* EVP_aes_128_cbc (void)" -.PP -The AES-128 cipher type -.PP -\fBReturns:\fP -.RS 4 -the AES-128 EVP_CIPHER pointer. -.RE -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBexample_evp_cipher.c\fP. -.SS "const EVP_CIPHER* EVP_aes_128_cfb8 (void)" -.PP -The AES-128 cipher type -.PP -\fBReturns:\fP -.RS 4 -the AES-128 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_aes_192_cbc (void)" -.PP -The AES-192 cipher type -.PP -\fBReturns:\fP -.RS 4 -the AES-192 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_aes_192_cfb8 (void)" -.PP -The AES-192 cipher type -.PP -\fBReturns:\fP -.RS 4 -the AES-192 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_aes_256_cbc (void)" -.PP -The AES-256 cipher type -.PP -\fBReturns:\fP -.RS 4 -the AES-256 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_aes_256_cfb8 (void)" -.PP -The AES-256 cipher type -.PP -\fBReturns:\fP -.RS 4 -the AES-256 EVP_CIPHER pointer. -.RE -.PP - -.SS "int EVP_BytesToKey (const EVP_CIPHER * type, const EVP_MD * md, const void * salt, const void * data, size_t datalen, unsigned int count, void * keydata, void * ivdata)" -.PP -Provides a legancy string to key function, used in PEM files. -.PP -New protocols should use new string to key functions like NIST SP56-800A or PKCS#5 v2.0 (see \fBPKCS5_PBKDF2_HMAC_SHA1()\fP). -.PP -\fBParameters:\fP -.RS 4 -\fItype\fP type of cipher to use -.br -\fImd\fP message digest to use -.br -\fIsalt\fP salt salt string, should be an binary 8 byte buffer. -.br -\fIdata\fP the password/input key string. -.br -\fIdatalen\fP length of data parameter. -.br -\fIcount\fP iteration counter. -.br -\fIkeydata\fP output keydata, needs to of the size \fBEVP_CIPHER_key_length()\fP. -.br -\fIivdata\fP output ivdata, needs to of the size \fBEVP_CIPHER_block_size()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -the size of derived key. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_camellia_128_cbc (void)" -.PP -The Camellia-128 cipher type -.PP -\fBReturns:\fP -.RS 4 -the Camellia-128 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_camellia_192_cbc (void)" -.PP -The Camellia-198 cipher type -.PP -\fBReturns:\fP -.RS 4 -the Camellia-198 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_camellia_256_cbc (void)" -.PP -The Camellia-256 cipher type -.PP -\fBReturns:\fP -.RS 4 -the Camellia-256 EVP_CIPHER pointer. -.RE -.PP - -.SS "size_t EVP_CIPHER_block_size (const EVP_CIPHER * c)" -.PP -Return the block size of the cipher. -.PP -\fBParameters:\fP -.RS 4 -\fIc\fP cipher to get the block size from. -.RE -.PP -\fBReturns:\fP -.RS 4 -the block size of the cipher. -.RE -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBexample_evp_cipher.c\fP. -.SS "size_t EVP_CIPHER_CTX_block_size (const EVP_CIPHER_CTX * ctx)" -.PP -Return the block size of the cipher context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP cipher context to get the block size from. -.RE -.PP -\fBReturns:\fP -.RS 4 -the block size of the cipher context. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_CIPHER_CTX_cipher (EVP_CIPHER_CTX * ctx)" -.PP -Return the EVP_CIPHER for a EVP_CIPHER_CTX context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the context to get the cipher type from. -.RE -.PP -\fBReturns:\fP -.RS 4 -the EVP_CIPHER pointer. -.RE -.PP - -.SS "int EVP_CIPHER_CTX_cleanup (EVP_CIPHER_CTX * c)" -.PP -Clean up the EVP_CIPHER_CTX context. -.PP -\fBParameters:\fP -.RS 4 -\fIc\fP the cipher to clean up. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBexample_evp_cipher.c\fP. -.SS "unsigned long EVP_CIPHER_CTX_flags (const EVP_CIPHER_CTX * ctx)" -.PP -Get the flags for an EVP_CIPHER_CTX context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the EVP_CIPHER_CTX to get the flags from -.RE -.PP -\fBReturns:\fP -.RS 4 -the flags for an EVP_CIPHER_CTX. -.RE -.PP - -.SS "void* EVP_CIPHER_CTX_get_app_data (EVP_CIPHER_CTX * ctx)" -.PP -Get the app data for an EVP_CIPHER_CTX context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the EVP_CIPHER_CTX to get the app data from -.RE -.PP -\fBReturns:\fP -.RS 4 -the app data for an EVP_CIPHER_CTX. -.RE -.PP - -.SS "void EVP_CIPHER_CTX_init (EVP_CIPHER_CTX * c)" -.PP -Initiate a EVP_CIPHER_CTX context. Clean up with \fBEVP_CIPHER_CTX_cleanup()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIc\fP the cipher initiate. -.RE -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBexample_evp_cipher.c\fP. -.SS "size_t EVP_CIPHER_CTX_iv_length (const EVP_CIPHER_CTX * ctx)" -.PP -Return the IV size of the cipher context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP cipher context to get the IV size from. -.RE -.PP -\fBReturns:\fP -.RS 4 -the IV size of the cipher context. -.RE -.PP - -.SS "size_t EVP_CIPHER_CTX_key_length (const EVP_CIPHER_CTX * ctx)" -.PP -Return the key size of the cipher context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP cipher context to get the key size from. -.RE -.PP -\fBReturns:\fP -.RS 4 -the key size of the cipher context. -.RE -.PP - -.SS "int EVP_CIPHER_CTX_mode (const EVP_CIPHER_CTX * ctx)" -.PP -Get the mode for an EVP_CIPHER_CTX context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the EVP_CIPHER_CTX to get the mode from -.RE -.PP -\fBReturns:\fP -.RS 4 -the mode for an EVP_CIPHER_CTX. -.RE -.PP - -.SS "void EVP_CIPHER_CTX_set_app_data (EVP_CIPHER_CTX * ctx, void * data)" -.PP -Set the app data for an EVP_CIPHER_CTX context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the EVP_CIPHER_CTX to set the app data for -.br -\fIdata\fP the app data to set for an EVP_CIPHER_CTX. -.RE -.PP - -.SS "int EVP_CIPHER_CTX_set_key_length (EVP_CIPHER_CTX * c, int length)" -.PP -If the cipher type supports it, change the key length -.PP -\fBParameters:\fP -.RS 4 -\fIc\fP the cipher context to change the key length for -.br -\fIlength\fP new key length -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "size_t EVP_CIPHER_iv_length (const EVP_CIPHER * c)" -.PP -Return the IV size of the cipher. -.PP -\fBParameters:\fP -.RS 4 -\fIc\fP cipher to get the IV size from. -.RE -.PP -\fBReturns:\fP -.RS 4 -the IV size of the cipher. -.RE -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBexample_evp_cipher.c\fP. -.SS "size_t EVP_CIPHER_key_length (const EVP_CIPHER * c)" -.PP -Return the key size of the cipher. -.PP -\fBParameters:\fP -.RS 4 -\fIc\fP cipher to get the key size from. -.RE -.PP -\fBReturns:\fP -.RS 4 -the key size of the cipher. -.RE -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBexample_evp_cipher.c\fP. -.SS "int EVP_CipherFinal_ex (EVP_CIPHER_CTX * ctx, void * out, int * outlen)" -.PP -Encipher/decipher final data -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the cipher context. -.br -\fIout\fP output data from the operation. -.br -\fIoutlen\fP output length -.RE -.PP -The input length needs to be at least \fBEVP_CIPHER_block_size()\fP bytes long. -.PP -See \fBEVP Cipher\fP for an example how to use this function. -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBexample_evp_cipher.c\fP. -.SS "int EVP_CipherInit_ex (EVP_CIPHER_CTX * ctx, const EVP_CIPHER * c, ENGINE * engine, const void * key, const void * iv, int encp)" -.PP -Initiate the EVP_CIPHER_CTX context to encrypt or decrypt data. Clean up with \fBEVP_CIPHER_CTX_cleanup()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP context to initiate -.br -\fIc\fP cipher to use. -.br -\fIengine\fP crypto engine to use, NULL to select default. -.br -\fIkey\fP the crypto key to use, NULL will use the previous value. -.br -\fIiv\fP the IV to use, NULL will use the previous value. -.br -\fIencp\fP non zero will encrypt, -1 use the previous value. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBexample_evp_cipher.c\fP. -.SS "int EVP_CipherUpdate (EVP_CIPHER_CTX * ctx, void * out, int * outlen, void * in, size_t inlen)" -.PP -Encipher/decipher partial data -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the cipher context. -.br -\fIout\fP output data from the operation. -.br -\fIoutlen\fP output length -.br -\fIin\fP input data to the operation. -.br -\fIinlen\fP length of data. -.RE -.PP -The output buffer length should at least be \fBEVP_CIPHER_block_size()\fP byte longer then the input length. -.PP -See \fBEVP Cipher\fP for an example how to use this function. -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.PP -If there in no spare bytes in the left from last Update and the input length is on the block boundery, the \fBEVP_CipherUpdate()\fP function can take a shortcut (and preformance gain) and directly encrypt the data, otherwise we hav to fix it up and store extra it the EVP_CIPHER_CTX. -.PP -\fBExamples: \fP -.in +1c -\fBexample_evp_cipher.c\fP. -.SS "const EVP_CIPHER* EVP_des_cbc (void)" -.PP -The DES cipher type -.PP -\fBReturns:\fP -.RS 4 -the DES-CBC EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_des_ede3_cbc (void)" -.PP -The tripple DES cipher type -.PP -\fBReturns:\fP -.RS 4 -the DES-EDE3-CBC EVP_CIPHER pointer. -.RE -.PP - -.SS "int EVP_Digest (const void * data, size_t dsize, void * hash, unsigned int * hsize, const EVP_MD * md, ENGINE * engine)" -.PP -Do the whole \fBEVP_MD_CTX_create()\fP, \fBEVP_DigestInit_ex()\fP, \fBEVP_DigestUpdate()\fP, \fBEVP_DigestFinal_ex()\fP, \fBEVP_MD_CTX_destroy()\fP dance in one call. -.PP -\fBParameters:\fP -.RS 4 -\fIdata\fP the data to update the context with -.br -\fIdsize\fP length of data -.br -\fIhash\fP output data of at least \fBEVP_MD_size()\fP length. -.br -\fIhsize\fP output length of hash. -.br -\fImd\fP message digest to use -.br -\fIengine\fP engine to use, NULL for default engine. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "int EVP_DigestFinal_ex (EVP_MD_CTX * ctx, void * hash, unsigned int * size)" -.PP -Complete the message digest. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the context to complete. -.br -\fIhash\fP the output of the message digest function. At least \fBEVP_MD_size()\fP. -.br -\fIsize\fP the output size of hash. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "int EVP_DigestInit_ex (EVP_MD_CTX * ctx, const EVP_MD * md, ENGINE * engine)" -.PP -Init a EVP_MD_CTX for use a specific message digest and engine. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the message digest context to init. -.br -\fImd\fP the message digest to use. -.br -\fIengine\fP the engine to use, NULL to use the default engine. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "int EVP_DigestUpdate (EVP_MD_CTX * ctx, const void * data, size_t size)" -.PP -Update the digest with some data. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the context to update -.br -\fIdata\fP the data to update the context with -.br -\fIsize\fP length of data -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_enc_null (void)" -.PP -The NULL cipher type, does no encryption/decryption. -.PP -\fBReturns:\fP -.RS 4 -the null EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_get_cipherbyname (const char * name)" -.PP -Get the cipher type using their name. -.PP -\fBParameters:\fP -.RS 4 -\fIname\fP the name of the cipher. -.RE -.PP -\fBReturns:\fP -.RS 4 -the selected EVP_CIPHER pointer or NULL if not found. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_aes_128_cbc (void)" -.PP -The AES-128 cipher type (hcrypto) -.PP -\fBReturns:\fP -.RS 4 -the AES-128 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_aes_128_cfb8 (void)" -.PP -The AES-128 CFB8 cipher type (hcrypto) -.PP -\fBReturns:\fP -.RS 4 -the AES-128 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_aes_192_cbc (void)" -.PP -The AES-192 cipher type (hcrypto) -.PP -\fBReturns:\fP -.RS 4 -the AES-192 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_aes_192_cfb8 (void)" -.PP -The AES-192 CFB8 cipher type (hcrypto) -.PP -\fBReturns:\fP -.RS 4 -the AES-192 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_aes_256_cbc (void)" -.PP -The AES-256 cipher type (hcrypto) -.PP -\fBReturns:\fP -.RS 4 -the AES-256 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_aes_256_cfb8 (void)" -.PP -The AES-256 CFB8 cipher type (hcrypto) -.PP -\fBReturns:\fP -.RS 4 -the AES-256 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_camellia_128_cbc (void)" -.PP -The Camellia-128 cipher type - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the Camellia-128 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_camellia_192_cbc (void)" -.PP -The Camellia-198 cipher type - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the Camellia-198 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_camellia_256_cbc (void)" -.PP -The Camellia-256 cipher type - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the Camellia-256 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_des_cbc (void)" -.PP -The DES cipher type -.PP -\fBReturns:\fP -.RS 4 -the DES-CBC EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_des_ede3_cbc (void)" -.PP -The tripple DES cipher type - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the DES-EDE3-CBC EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_MD* EVP_hcrypto_md2 (void)" -.PP -The message digest MD2 - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_hcrypto_md4 (void)" -.PP -The message digest MD4 - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_hcrypto_md5 (void)" -.PP -The message digest MD5 - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_rc2_40_cbc (void)" -.PP -The RC2-40 cipher type -.PP -\fBReturns:\fP -.RS 4 -the RC2-40 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_rc2_64_cbc (void)" -.PP -The RC2-64 cipher type -.PP -\fBReturns:\fP -.RS 4 -the RC2-64 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_hcrypto_rc2_cbc (void)" -.PP -The RC2 cipher type - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the RC2 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_MD* EVP_hcrypto_sha1 (void)" -.PP -The message digest SHA1 - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_hcrypto_sha256 (void)" -.PP -The message digest SHA256 - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_hcrypto_sha384 (void)" -.PP -The message digest SHA384 - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_hcrypto_sha512 (void)" -.PP -The message digest SHA512 - hcrypto -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_md2 (void)" -.PP -The message digest MD2 -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_md4 (void)" -.PP -The message digest MD4 -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_md5 (void)" -.PP -The message digest MD5 -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "size_t EVP_MD_block_size (const EVP_MD * md)" -.PP -Return the blocksize of the message digest function. -.PP -\fBParameters:\fP -.RS 4 -\fImd\fP the evp message -.RE -.PP -\fBReturns:\fP -.RS 4 -size size of the message digest block size -.RE -.PP - -.SS "size_t EVP_MD_CTX_block_size (EVP_MD_CTX * ctx)" -.PP -Return the blocksize of the message digest function. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the evp message digest context -.RE -.PP -\fBReturns:\fP -.RS 4 -size size of the message digest block size -.RE -.PP - -.SS "int EVP_MD_CTX_cleanup (EVP_MD_CTX * ctx)" -.PP -Free the resources used by the EVP_MD context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the context to free the resources from. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "EVP_MD_CTX* EVP_MD_CTX_create (void)" -.PP -Allocate a messsage digest context object. Free with \fBEVP_MD_CTX_destroy()\fP. -.PP -\fBReturns:\fP -.RS 4 -a newly allocated message digest context object. -.RE -.PP - -.SS "void EVP_MD_CTX_destroy (EVP_MD_CTX * ctx)" -.PP -Free a messsage digest context object. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP context to free. -.RE -.PP - -.SS "void EVP_MD_CTX_init (EVP_MD_CTX * ctx)" -.PP -Initiate a messsage digest context object. Deallocate with \fBEVP_MD_CTX_cleanup()\fP. Please use \fBEVP_MD_CTX_create()\fP instead. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP variable to initiate. -.RE -.PP - -.SS "const EVP_MD* EVP_MD_CTX_md (EVP_MD_CTX * ctx)" -.PP -Get the EVP_MD use for a specified context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the EVP_MD context to get the EVP_MD for. -.RE -.PP -\fBReturns:\fP -.RS 4 -the EVP_MD used for the context. -.RE -.PP - -.SS "size_t EVP_MD_CTX_size (EVP_MD_CTX * ctx)" -.PP -Return the output size of the message digest function. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the evp message digest context -.RE -.PP -\fBReturns:\fP -.RS 4 -size output size of the message digest function. -.RE -.PP - -.SS "const EVP_MD* EVP_md_null (void)" -.PP -The null message digest -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "size_t EVP_MD_size (const EVP_MD * md)" -.PP -Return the output size of the message digest function. -.PP -\fBParameters:\fP -.RS 4 -\fImd\fP the evp message -.RE -.PP -\fBReturns:\fP -.RS 4 -size output size of the message digest function. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_rc2_40_cbc (void)" -.PP -The RC2 cipher type -.PP -\fBReturns:\fP -.RS 4 -the RC2 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_rc2_64_cbc (void)" -.PP -The RC2 cipher type -.PP -\fBReturns:\fP -.RS 4 -the RC2 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_rc2_cbc (void)" -.PP -The RC2 cipher type -.PP -\fBReturns:\fP -.RS 4 -the RC2 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_rc4 (void)" -.PP -The RC4 cipher type -.PP -\fBReturns:\fP -.RS 4 -the RC4 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_rc4_40 (void)" -.PP -The RC4-40 cipher type -.PP -\fBReturns:\fP -.RS 4 -the RC4-40 EVP_CIPHER pointer. -.RE -.PP - -.SS "const EVP_MD* EVP_sha (void)" -.PP -The message digest SHA1 -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_sha1 (void)" -.PP -The message digest SHA1 -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_sha256 (void)" -.PP -The message digest SHA256 -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_sha384 (void)" -.PP -The message digest SHA384 -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_MD* EVP_sha512 (void)" -.PP -The message digest SHA512 -.PP -\fBReturns:\fP -.RS 4 -the message digest type. -.RE -.PP - -.SS "const EVP_CIPHER* EVP_wincrypt_des_ede3_cbc (void)" -.PP -The tripple DES cipher type (Micrsoft crypt provider) -.PP -\fBReturns:\fP -.RS 4 -the DES-EDE3-CBC EVP_CIPHER pointer. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_misc.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_misc.3 deleted file mode 100644 index ca61a287449..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_misc.3 +++ /dev/null @@ -1,44 +0,0 @@ -.TH "hcrypto miscellaneous functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hcrypto miscellaneous functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBPKCS5_PBKDF2_HMAC_SHA1\fP (const void *password, size_t password_len, const void *salt, size_t salt_len, unsigned long iter, size_t keylen, void *key)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "int PKCS5_PBKDF2_HMAC_SHA1 (const void * password, size_t password_len, const void * salt, size_t salt_len, unsigned long iter, size_t keylen, void * key)" -.PP -As descriped in PKCS5, convert a password, salt, and iteration counter into a crypto key. -.PP -\fBParameters:\fP -.RS 4 -\fIpassword\fP Password. -.br -\fIpassword_len\fP Length of password. -.br -\fIsalt\fP Salt -.br -\fIsalt_len\fP Length of salt. -.br -\fIiter\fP iteration counter. -.br -\fIkeylen\fP the output key length. -.br -\fIkey\fP the output key. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success, non 1 on failure. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_rand.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_rand.3 deleted file mode 100644 index b740aaab0bb..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_rand.3 +++ /dev/null @@ -1,200 +0,0 @@ -.TH "RAND crypto functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -RAND crypto functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "void \fBRAND_seed\fP (const void *indata, size_t size)" -.br -.ti -1c -.RI "int \fBRAND_bytes\fP (void *outdata, size_t size)" -.br -.ti -1c -.RI "void \fBRAND_cleanup\fP (void)" -.br -.ti -1c -.RI "void \fBRAND_add\fP (const void *indata, size_t size, double entropi)" -.br -.ti -1c -.RI "int \fBRAND_pseudo_bytes\fP (void *outdata, size_t size)" -.br -.ti -1c -.RI "int \fBRAND_status\fP (void)" -.br -.ti -1c -.RI "int \fBRAND_set_rand_method\fP (const RAND_METHOD *meth)" -.br -.ti -1c -.RI "const RAND_METHOD * \fBRAND_get_rand_method\fP (void)" -.br -.ti -1c -.RI "int \fBRAND_set_rand_engine\fP (ENGINE *engine)" -.br -.ti -1c -.RI "int \fBRAND_load_file\fP (const char *filename, size_t size)" -.br -.ti -1c -.RI "int \fBRAND_write_file\fP (const char *filename)" -.br -.ti -1c -.RI "const char * \fBRAND_file_name\fP (char *filename, size_t size)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBRAND - random number\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "void RAND_add (const void * indata, size_t size, double entropi)" -.PP -Seed that random number generator. Secret material can securely be feed into the function, they will never be returned. -.PP -\fBParameters:\fP -.RS 4 -\fIindata\fP the input data. -.br -\fIsize\fP size of in data. -.br -\fIentropi\fP entropi in data. -.RE -.PP - -.SS "int RAND_bytes (void * outdata, size_t size)" -.PP -Get a random block from the random generator, can be used for key material. -.PP -\fBParameters:\fP -.RS 4 -\fIoutdata\fP random data -.br -\fIsize\fP length random data -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success, 0 on failure. -.RE -.PP - -.SS "void RAND_cleanup (void)" -.PP -Reset and free memory used by the random generator. -.SS "const char* RAND_file_name (char * filename, size_t size)" -.PP -Return the default random state filename for a user to use for \fBRAND_load_file()\fP, and \fBRAND_write_file()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIfilename\fP buffer to hold file name. -.br -\fIsize\fP size of buffer filename. -.RE -.PP -\fBReturns:\fP -.RS 4 -the buffer filename or NULL on failure. -.RE -.PP - -.SS "const RAND_METHOD* RAND_get_rand_method (void)" -.PP -Get the default random method. -.SS "int RAND_load_file (const char * filename, size_t size)" -.PP -Load a a file and feed it into \fBRAND_seed()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIfilename\fP name of file to read. -.br -\fIsize\fP minimum size to read. -.RE -.PP - -.SS "int RAND_pseudo_bytes (void * outdata, size_t size)" -.PP -Get a random block from the random generator, should NOT be used for key material. -.PP -\fBParameters:\fP -.RS 4 -\fIoutdata\fP random data -.br -\fIsize\fP length random data -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success, 0 on failure. -.RE -.PP - -.SS "void RAND_seed (const void * indata, size_t size)" -.PP -Seed that random number generator. Secret material can securely be feed into the function, they will never be returned. -.PP -\fBParameters:\fP -.RS 4 -\fIindata\fP seed data -.br -\fIsize\fP length seed data -.RE -.PP - -.SS "int RAND_set_rand_engine (ENGINE * engine)" -.PP -Set the default random method from engine. -.PP -\fBParameters:\fP -.RS 4 -\fIengine\fP use engine, if NULL is passed it, old method and engine is cleared. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success, 0 on failure. -.RE -.PP - -.SS "int RAND_set_rand_method (const RAND_METHOD * meth)" -.PP -Set the default random method. -.PP -\fBParameters:\fP -.RS 4 -\fImeth\fP set the new default method. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "int RAND_status (void)" -.PP -Return status of the random generator -.PP -\fBReturns:\fP -.RS 4 -1 if the random generator can deliver random data. -.RE -.PP - -.SS "int RAND_write_file (const char * filename)" -.PP -Write of random numbers to a file to store for later initiation with \fBRAND_load_file()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIfilename\fP name of file to write. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success and non-one on failure. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_rsa.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_rsa.3 deleted file mode 100644 index f0e2f1a0e01..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/hcrypto_rsa.3 +++ /dev/null @@ -1,152 +0,0 @@ -.TH "RSA functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -RSA functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "RSA * \fBRSA_new\fP (void)" -.br -.ti -1c -.RI "RSA * \fBRSA_new_method\fP (ENGINE *engine)" -.br -.ti -1c -.RI "void \fBRSA_free\fP (RSA *rsa)" -.br -.ti -1c -.RI "int \fBRSA_up_ref\fP (RSA *rsa)" -.br -.ti -1c -.RI "const RSA_METHOD * \fBRSA_get_method\fP (const RSA *rsa)" -.br -.ti -1c -.RI "int \fBRSA_set_method\fP (RSA *rsa, const RSA_METHOD *method)" -.br -.ti -1c -.RI "int \fBRSA_set_app_data\fP (RSA *rsa, void *arg)" -.br -.ti -1c -.RI "void * \fBRSA_get_app_data\fP (const RSA *rsa)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBRSA - public-key cryptography\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "void RSA_free (RSA * rsa)" -.PP -Free an allocation RSA object. -.PP -\fBParameters:\fP -.RS 4 -\fIrsa\fP the RSA object to free. -.RE -.PP - -.SS "void* RSA_get_app_data (const RSA * rsa)" -.PP -Get the application data for the RSA object. -.PP -\fBParameters:\fP -.RS 4 -\fIrsa\fP the rsa object to get the parameter for -.RE -.PP -\fBReturns:\fP -.RS 4 -the data object -.RE -.PP - -.SS "const RSA_METHOD* RSA_get_method (const RSA * rsa)" -.PP -Return the RSA_METHOD used for this RSA object. -.PP -\fBParameters:\fP -.RS 4 -\fIrsa\fP the object to get the method from. -.RE -.PP -\fBReturns:\fP -.RS 4 -the method used for this RSA object. -.RE -.PP - -.SS "RSA* RSA_new (void)" -.PP -Same as \fBRSA_new_method()\fP using NULL as engine. -.PP -\fBReturns:\fP -.RS 4 -a newly allocated RSA object. Free with \fBRSA_free()\fP. -.RE -.PP - -.SS "RSA* RSA_new_method (ENGINE * engine)" -.PP -Allocate a new RSA object using the engine, if NULL is specified as the engine, use the default RSA engine as returned by ENGINE_get_default_RSA(). -.PP -\fBParameters:\fP -.RS 4 -\fIengine\fP Specific what ENGINE RSA provider should be used. -.RE -.PP -\fBReturns:\fP -.RS 4 -a newly allocated RSA object. Free with \fBRSA_free()\fP. -.RE -.PP - -.SS "int RSA_set_app_data (RSA * rsa, void * arg)" -.PP -Set the application data for the RSA object. -.PP -\fBParameters:\fP -.RS 4 -\fIrsa\fP the rsa object to set the parameter for -.br -\fIarg\fP the data object to store -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "int RSA_set_method (RSA * rsa, const RSA_METHOD * method)" -.PP -Set a new method for the RSA keypair. -.PP -\fBParameters:\fP -.RS 4 -\fIrsa\fP rsa parameter. -.br -\fImethod\fP the new method for the RSA parameter. -.RE -.PP -\fBReturns:\fP -.RS 4 -1 on success. -.RE -.PP - -.SS "int RSA_up_ref (RSA * rsa)" -.PP -Add an extra reference to the RSA object. The object should be free with \fBRSA_free()\fP to drop the reference. -.PP -\fBParameters:\fP -.RS 4 -\fIrsa\fP the object to add reference counting too. -.RE -.PP -\fBReturns:\fP -.RS 4 -the current reference count, can't safely be used except for debug printing. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_des.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_des.3 deleted file mode 100644 index 49fc2150647..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_des.3 +++ /dev/null @@ -1,35 +0,0 @@ -.TH "page_des" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_des \- DES - Data Encryption Standard crypto interface -See the library functions here: \fBDES crypto functions\fP -.PP -DES was created by IBM, modififed by NSA and then adopted by NBS (now NIST) and published ad FIPS PUB 46 (updated by FIPS 46-1). -.PP -Since the 19th May 2005 DES was withdrawn by NIST and should no longer be used. See \fBEVP - generic crypto interface\fP for replacement encryption algorithms and interfaces. -.PP -Read more the iteresting history of DES on Wikipedia http://www.wikipedia.org/wiki/Data_Encryption_Standard . -.SH "DES key generation" -.PP -To generate a DES key safely you have to use the code-snippet below. This is because the \fBDES_random_key()\fP can fail with an abort() in case of and failure to start the random generator. -.PP -There is a replacement function \fBDES_new_random_key()\fP, however that function does not exists in OpenSSL. -.PP -.PP -.nf - DES_cblock key; - do { - if (RAND_rand(&key, sizeof(key)) != 1) - goto failure; - DES_set_odd_parity(key); - } while (DES_is_weak_key(&key)); -.fi -.PP -.SH "DES implementation history" -.PP -There was no complete BSD licensed, fast, GPL compatible implementation of DES, so Love wrote the part that was missing, fast key schedule setup and adapted the interface to the orignal libdes. -.PP -The document that got me started for real was 'Efficient Implementation of the Data Encryption Standard' by Dag Arne Osvik. I never got to the PC1 transformation was working, instead I used table-lookup was used for all key schedule setup. The document was very useful since it de-mystified other implementations for me. -.PP -The core DES function (SBOX + P transformation) is from Richard Outerbridge public domain DES implementation. My sanity is saved thanks to his work. Thank you Richard. diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_dh.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_dh.3 deleted file mode 100644 index 6cc2dde79d6..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_dh.3 +++ /dev/null @@ -1,10 +0,0 @@ -.TH "page_dh" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_dh \- DH - Diffie-Hellman key exchange -Diffie-Hellman key exchange is a protocol that allows two parties to establish a shared secret key. -.PP -Include and example how to use \fBDH_new()\fP and friends here. -.PP -See the library functions here: \fBDiffie-Hellman functions\fP diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_evp.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_evp.3 deleted file mode 100644 index c8a6e0986c2..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_evp.3 +++ /dev/null @@ -1,9 +0,0 @@ -.TH "page_evp" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_evp \- EVP - generic crypto interface -See the library functions here: \fBEVP generic crypto functions\fP -.SH "EVP Cipher" -.PP -The use of \fBEVP_CipherInit_ex()\fP and EVP_Cipher() is pretty easy to understand forward, then \fBEVP_CipherUpdate()\fP and \fBEVP_CipherFinal_ex()\fP really needs an example to explain \fBexample_evp_cipher::c\fP . diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_rand.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_rand.3 deleted file mode 100644 index 93784d2b992..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_rand.3 +++ /dev/null @@ -1,6 +0,0 @@ -.TH "page_rand" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_rand \- RAND - random number -See the library functions here: \fBRAND crypto functions\fP diff --git a/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_rsa.3 b/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_rsa.3 deleted file mode 100644 index dc747c88d73..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/man/man3/page_rsa.3 +++ /dev/null @@ -1,12 +0,0 @@ -.TH "page_rsa" 3 "9 Dec 2012" "Version 1.5.3" "Heimdal crypto library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_rsa \- RSA - public-key cryptography -RSA is named by its inventors (Ron Rivest, Adi Shamir, and Leonard Adleman) (published in 1977), patented expired in 21 September 2000. -.PP -Speed for RSA in seconds no key blinding 1000 iteration, same rsa keys (1024 and 2048) operation performed each eteration sign, verify, encrypt, decrypt on a random bit pattern -.PP -name 1024 2048 4098 ================================= gmp: 0.73 6.60 44.80 tfm: 2.45 -- -- ltm: 3.79 20.74 105.41 (default in hcrypto) openssl: 4.04 11.90 82.59 cdsa: 15.89 102.89 721.40 imath: 40.62 -- -- -.PP -See the library functions here: \fBRSA functions\fP diff --git a/kerberosV/src/doc/doxyout/hcrypto/manpages b/kerberosV/src/doc/doxyout/hcrypto/manpages deleted file mode 100644 index fbd13d0ec2a..00000000000 --- a/kerberosV/src/doc/doxyout/hcrypto/manpages +++ /dev/null @@ -1,153 +0,0 @@ -hcrypto/man/man3/DES_cbc_cksum.3 -hcrypto/man/man3/DES_cbc_encrypt.3 -hcrypto/man/man3/DES_cfb64_encrypt.3 -hcrypto/man/man3/DES_check_key_parity.3 -hcrypto/man/man3/DES_ecb3_encrypt.3 -hcrypto/man/man3/DES_ecb_encrypt.3 -hcrypto/man/man3/DES_ede3_cbc_encrypt.3 -hcrypto/man/man3/DES_encrypt.3 -hcrypto/man/man3/DES_init_random_number_generator.3 -hcrypto/man/man3/DES_is_weak_key.3 -hcrypto/man/man3/DES_key_sched.3 -hcrypto/man/man3/DES_new_random_key.3 -hcrypto/man/man3/DES_pcbc_encrypt.3 -hcrypto/man/man3/DES_random_key.3 -hcrypto/man/man3/DES_set_key.3 -hcrypto/man/man3/DES_set_key_checked.3 -hcrypto/man/man3/DES_set_key_unchecked.3 -hcrypto/man/man3/DES_set_odd_parity.3 -hcrypto/man/man3/DES_string_to_key.3 -hcrypto/man/man3/DH_check_pubkey.3 -hcrypto/man/man3/DH_compute_key.3 -hcrypto/man/man3/DH_free.3 -hcrypto/man/man3/DH_generate_key.3 -hcrypto/man/man3/DH_generate_parameters_ex.3 -hcrypto/man/man3/DH_get_default_method.3 -hcrypto/man/man3/DH_get_ex_data.3 -hcrypto/man/man3/DH_ltm_method.3 -hcrypto/man/man3/DH_new.3 -hcrypto/man/man3/DH_new_method.3 -hcrypto/man/man3/DH_null_method.3 -hcrypto/man/man3/DH_set_default_method.3 -hcrypto/man/man3/DH_set_ex_data.3 -hcrypto/man/man3/DH_set_method.3 -hcrypto/man/man3/DH_size.3 -hcrypto/man/man3/DH_up_ref.3 -hcrypto/man/man3/EVP_aes_128_cbc.3 -hcrypto/man/man3/EVP_aes_128_cfb8.3 -hcrypto/man/man3/EVP_aes_192_cbc.3 -hcrypto/man/man3/EVP_aes_192_cfb8.3 -hcrypto/man/man3/EVP_aes_256_cbc.3 -hcrypto/man/man3/EVP_aes_256_cfb8.3 -hcrypto/man/man3/EVP_BytesToKey.3 -hcrypto/man/man3/EVP_camellia_128_cbc.3 -hcrypto/man/man3/EVP_camellia_192_cbc.3 -hcrypto/man/man3/EVP_camellia_256_cbc.3 -hcrypto/man/man3/EVP_CIPHER_block_size.3 -hcrypto/man/man3/EVP_CIPHER_CTX_block_size.3 -hcrypto/man/man3/EVP_CIPHER_CTX_cipher.3 -hcrypto/man/man3/EVP_CIPHER_CTX_cleanup.3 -hcrypto/man/man3/EVP_CIPHER_CTX_ctrl.3 -hcrypto/man/man3/EVP_CIPHER_CTX_flags.3 -hcrypto/man/man3/EVP_CIPHER_CTX_get_app_data.3 -hcrypto/man/man3/EVP_CIPHER_CTX_init.3 -hcrypto/man/man3/EVP_CIPHER_CTX_iv_length.3 -hcrypto/man/man3/EVP_CIPHER_CTX_key_length.3 -hcrypto/man/man3/EVP_CIPHER_CTX_mode.3 -hcrypto/man/man3/EVP_CIPHER_CTX_rand_key.3 -hcrypto/man/man3/EVP_CIPHER_CTX_set_app_data.3 -hcrypto/man/man3/EVP_CIPHER_CTX_set_key_length.3 -hcrypto/man/man3/EVP_CIPHER_iv_length.3 -hcrypto/man/man3/EVP_CIPHER_key_length.3 -hcrypto/man/man3/EVP_CipherFinal_ex.3 -hcrypto/man/man3/EVP_CipherInit_ex.3 -hcrypto/man/man3/EVP_CipherUpdate.3 -hcrypto/man/man3/EVP_des_cbc.3 -hcrypto/man/man3/EVP_des_ede3_cbc.3 -hcrypto/man/man3/EVP_Digest.3 -hcrypto/man/man3/EVP_DigestFinal_ex.3 -hcrypto/man/man3/EVP_DigestInit_ex.3 -hcrypto/man/man3/EVP_DigestUpdate.3 -hcrypto/man/man3/EVP_enc_null.3 -hcrypto/man/man3/EVP_get_cipherbyname.3 -hcrypto/man/man3/EVP_hcrypto_aes_128_cbc.3 -hcrypto/man/man3/EVP_hcrypto_aes_128_cfb8.3 -hcrypto/man/man3/EVP_hcrypto_aes_192_cbc.3 -hcrypto/man/man3/EVP_hcrypto_aes_192_cfb8.3 -hcrypto/man/man3/EVP_hcrypto_aes_256_cbc.3 -hcrypto/man/man3/EVP_hcrypto_aes_256_cfb8.3 -hcrypto/man/man3/EVP_hcrypto_camellia_128_cbc.3 -hcrypto/man/man3/EVP_hcrypto_camellia_192_cbc.3 -hcrypto/man/man3/EVP_hcrypto_camellia_256_cbc.3 -hcrypto/man/man3/EVP_hcrypto_des_cbc.3 -hcrypto/man/man3/EVP_hcrypto_des_ede3_cbc.3 -hcrypto/man/man3/EVP_hcrypto_md2.3 -hcrypto/man/man3/EVP_hcrypto_md4.3 -hcrypto/man/man3/EVP_hcrypto_md5.3 -hcrypto/man/man3/EVP_hcrypto_rc2_40_cbc.3 -hcrypto/man/man3/EVP_hcrypto_rc2_64_cbc.3 -hcrypto/man/man3/EVP_hcrypto_rc2_cbc.3 -hcrypto/man/man3/EVP_hcrypto_sha1.3 -hcrypto/man/man3/EVP_hcrypto_sha256.3 -hcrypto/man/man3/EVP_hcrypto_sha384.3 -hcrypto/man/man3/EVP_hcrypto_sha512.3 -hcrypto/man/man3/EVP_md2.3 -hcrypto/man/man3/EVP_md4.3 -hcrypto/man/man3/EVP_md5.3 -hcrypto/man/man3/EVP_MD_block_size.3 -hcrypto/man/man3/EVP_MD_CTX_block_size.3 -hcrypto/man/man3/EVP_MD_CTX_cleanup.3 -hcrypto/man/man3/EVP_MD_CTX_create.3 -hcrypto/man/man3/EVP_MD_CTX_destroy.3 -hcrypto/man/man3/EVP_MD_CTX_init.3 -hcrypto/man/man3/EVP_MD_CTX_md.3 -hcrypto/man/man3/EVP_MD_CTX_size.3 -hcrypto/man/man3/EVP_md_null.3 -hcrypto/man/man3/EVP_MD_size.3 -hcrypto/man/man3/EVP_rc2_40_cbc.3 -hcrypto/man/man3/EVP_rc2_64_cbc.3 -hcrypto/man/man3/EVP_rc2_cbc.3 -hcrypto/man/man3/EVP_rc4.3 -hcrypto/man/man3/EVP_rc4_40.3 -hcrypto/man/man3/EVP_sha.3 -hcrypto/man/man3/EVP_sha1.3 -hcrypto/man/man3/EVP_sha256.3 -hcrypto/man/man3/EVP_sha384.3 -hcrypto/man/man3/EVP_sha512.3 -hcrypto/man/man3/EVP_wincrypt_des_ede3_cbc.3 -hcrypto/man/man3/hcrypto_core.3 -hcrypto/man/man3/hcrypto_des.3 -hcrypto/man/man3/hcrypto_dh.3 -hcrypto/man/man3/hcrypto_evp.3 -hcrypto/man/man3/hcrypto_misc.3 -hcrypto/man/man3/hcrypto_rand.3 -hcrypto/man/man3/hcrypto_rsa.3 -hcrypto/man/man3/OpenSSL_add_all_algorithms.3 -hcrypto/man/man3/OpenSSL_add_all_algorithms_conf.3 -hcrypto/man/man3/OpenSSL_add_all_algorithms_noconf.3 -hcrypto/man/man3/page_des.3 -hcrypto/man/man3/page_dh.3 -hcrypto/man/man3/page_evp.3 -hcrypto/man/man3/page_rand.3 -hcrypto/man/man3/page_rsa.3 -hcrypto/man/man3/PKCS5_PBKDF2_HMAC_SHA1.3 -hcrypto/man/man3/RAND_add.3 -hcrypto/man/man3/RAND_bytes.3 -hcrypto/man/man3/RAND_cleanup.3 -hcrypto/man/man3/RAND_file_name.3 -hcrypto/man/man3/RAND_get_rand_method.3 -hcrypto/man/man3/RAND_load_file.3 -hcrypto/man/man3/RAND_pseudo_bytes.3 -hcrypto/man/man3/RAND_seed.3 -hcrypto/man/man3/RAND_set_rand_engine.3 -hcrypto/man/man3/RAND_set_rand_method.3 -hcrypto/man/man3/RAND_status.3 -hcrypto/man/man3/RAND_write_file.3 -hcrypto/man/man3/RSA_free.3 -hcrypto/man/man3/RSA_get_app_data.3 -hcrypto/man/man3/RSA_get_method.3 -hcrypto/man/man3/RSA_new.3 -hcrypto/man/man3/RSA_new_method.3 -hcrypto/man/man3/RSA_set_app_data.3 -hcrypto/man/man3/RSA_set_method.3 -hcrypto/man/man3/RSA_up_ref.3 diff --git a/kerberosV/src/doc/doxyout/hdb/html/annotated.html b/kerberosV/src/doc/doxyout/hdb/html/annotated.html deleted file mode 100644 index 99486878275..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/html/annotated.html +++ /dev/null @@ -1,35 +0,0 @@ - - -Heimdalhdblibrary: Data Structures - - - -

-keyhole logo -

- - - -
-

Data Structures

Here are the data structures with brief descriptions: - - -
HDB
hdb_entry_ex
-
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalhdblibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hdb/html/doxygen.css b/kerberosV/src/doc/doxyout/hdb/html/doxygen.css deleted file mode 100644 index 22c484301dd..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/html/doxygen.css +++ /dev/null @@ -1,473 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; -} -H1 { - text-align: center; - font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { - font-weight: bold -} -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navpath { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { - text-decoration: none; - background-color: #6666cc; - color: #ffffff -} -A.el { - text-decoration: none; - font-weight: bold -} -A.elRef { - font-weight: bold -} -A.code:link { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.code:visited { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.codeRef:link { - font-weight: normal; - color: #0000FF -} -A.codeRef:visited { - font-weight: normal; - color: #0000FF -} -A:hover { - text-decoration: none; - background-color: #f2f2ff -} -DL.el { - margin-left: -1cm -} -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: 90% -} -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { - text-align: center; -} -IMG.formulaDsp { -} -IMG.formulaInl { - vertical-align: middle; -} -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -SPAN.vhdldigit { color: #ff00ff } -SPAN.vhdlchar { color: #000000 } -SPAN.vhdlkeyword { color: #700070 } -SPAN.vhdllogic { color: #ff0000 } - -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { - color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { - font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { - background: #e8eef2; - font-weight: bold; -} -HR { - height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; - margin-left: 3px; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -/* these are for tree view when used as main index */ -.directory { - font-size: 9pt; - font-weight: bold; -} -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* The following two styles can be used to replace the root node title */ -/* with an image of your choice. Simply uncomment the next two styles, */ -/* specify the name of your image and be sure to set 'height' to the */ -/* proper pixel height of your image. */ - -/* .directory h3.swap { */ -/* height: 61px; */ -/* background-repeat: no-repeat; */ -/* background-image: url("yourimage.gif"); */ -/* } */ -/* .directory h3.swap span { */ -/* display: none; */ -/* } */ - -.directory > h3 { - margin-top: 0; -} -.directory p { - margin: 0px; - white-space: nowrap; -} -.directory div { - display: none; - margin: 0px; -} -.directory img { - vertical-align: -30%; -} -/* these are for tree view when not used as main index */ -.directory-alt { - font-size: 100%; - font-weight: bold; -} -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} -.directory-alt > h3 { - margin-top: 0; -} -.directory-alt p { - margin: 0px; - white-space: nowrap; -} -.directory-alt div { - display: none; - margin: 0px; -} -.directory-alt img { - vertical-align: -30%; -} - diff --git a/kerberosV/src/doc/doxyout/hdb/html/doxygen.png b/kerberosV/src/doc/doxyout/hdb/html/doxygen.png deleted file mode 100644 index f0a274bbaffdd67f6d784c894d9cf28729db0e14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1281 zcmaJ>ZA?>F7(Vx-ms?uoS`b@hdRtpo6o^%HU>M$hfGrBvQnk$LE?p^P!kn&ikhyq! zX~V@&tPF5Qt@V?oTL96Bi%aRiwbe1)9DWQI#?)=HxS7QSw`J`5fAJ*eJbB;uNuKA& zdERDo*{Y<(If(#(B$Lr#;nB(8Y#ia=ZCeW?JfPLuQY`=@cW$k}Rivq|vbxGrRq1Tl9;+(gNt?}UtVKM2`T5t1jLzuL@0UIs`S#vlhl4)^ zLgSYrPj@$+`|j?eSbXTmiHGkWxV8V}BzNR?pl9k_s4pDu9vd5a_UzZEPk)}Ad{AV_ zzddrjrh4=Imr`E06;LY{)YYt?o}L~H@7C}F^WB!Ra=v`Q0bj{>5&$66CWF>mf6vjP z2N>RRY6ZYa=K`76>+|_)Xdwko+7wv}7cN|btOhWb(*{sta~6b?S8Omrxw}!4`NhGr zZVpNqpu1@BE`QGWNTpEpcJVW5izu~2B^GlM?1(OPg)zwW;QcP@Ltcclm>XbJL9C|j z=9!2?ua=uIlf0%AndzHsRC}IyTL$EhAee(fdKB`?27KeS^2M8M_7b~PiCFO&r5LC7 z7gl1*a<8;SjNaw#h=843_AV9iZbWQOAp5YOC^&_F*9K0> zB|6%IDb?aM#3viTxkLU4aXg&@+CkNTOnQ1iMP*^?b|^lJy$4C)Zk4isV!|RZ*XhXh zw8q3$=*0LeGC!XI_Wc?dkT~3+*Gu%%yIqP+Wr3H$=&ROMQU6q}Ag^P~>c5vAEO;a- z_dK-3PPeKar%)6$j~vI2#*-YH!1h6HYVtwCX5_wM`iF#UKz&&@9Oo5w3%XGYrX zW>dY~)SG-((Yim%`InwgTvyRC?e=Wh^8KCao!R6Eg&TpVWUY1sN~4G}V?nFnEGo-; zHZ_$eW9-GnC%^WS9b z@p;-$oH#MtC0v>Q$HX%4^JdFdO$0cbv-W)Q TtK}Eh@>>I#ipmV1>S*>q-hkC} diff --git a/kerberosV/src/doc/doxyout/hdb/html/functions.html b/kerberosV/src/doc/doxyout/hdb/html/functions.html deleted file mode 100644 index 26d6717d306..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/html/functions.html +++ /dev/null @@ -1,85 +0,0 @@ - - -Heimdalhdblibrary: Data Fields - - - -

-keyhole logo -

- - - -
-Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: -

-

    -
  • hdb__del -: HDB -
  • hdb__get -: HDB -
  • hdb__put -: HDB -
  • hdb_auth_status -: HDB -
  • hdb_check_constrained_delegation -: HDB -
  • hdb_check_pkinit_ms_upn_match -: HDB -
  • hdb_check_s4u2self -: HDB -
  • hdb_close -: HDB -
  • hdb_destroy -: HDB -
  • hdb_fetch_kvno -: HDB -
  • hdb_firstkey -: HDB -
  • hdb_free -: HDB -
  • hdb_get_realms -: HDB -
  • hdb_lock -: HDB -
  • hdb_name -: HDB -
  • hdb_nextkey -: HDB -
  • hdb_open -: HDB -
  • hdb_password -: HDB -
  • hdb_remove -: HDB -
  • hdb_rename -: HDB -
  • hdb_store -: HDB -
  • hdb_unlock -: HDB -
-
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalhdblibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hdb/html/functions_vars.html b/kerberosV/src/doc/doxyout/hdb/html/functions_vars.html deleted file mode 100644 index 2b40688f643..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/html/functions_vars.html +++ /dev/null @@ -1,85 +0,0 @@ - - -Heimdalhdblibrary: Data Fields - Variables - - - -

-keyhole logo -

- - - -
-  -

-

    -
  • hdb__del -: HDB -
  • hdb__get -: HDB -
  • hdb__put -: HDB -
  • hdb_auth_status -: HDB -
  • hdb_check_constrained_delegation -: HDB -
  • hdb_check_pkinit_ms_upn_match -: HDB -
  • hdb_check_s4u2self -: HDB -
  • hdb_close -: HDB -
  • hdb_destroy -: HDB -
  • hdb_fetch_kvno -: HDB -
  • hdb_firstkey -: HDB -
  • hdb_free -: HDB -
  • hdb_get_realms -: HDB -
  • hdb_lock -: HDB -
  • hdb_name -: HDB -
  • hdb_nextkey -: HDB -
  • hdb_open -: HDB -
  • hdb_password -: HDB -
  • hdb_remove -: HDB -
  • hdb_rename -: HDB -
  • hdb_store -: HDB -
  • hdb_unlock -: HDB -
-
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalhdblibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hdb/html/graph_legend.dot b/kerberosV/src/doc/doxyout/hdb/html/graph_legend.dot deleted file mode 100644 index 4df0f1aa486..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/html/graph_legend.dot +++ /dev/null @@ -1,22 +0,0 @@ -digraph G -{ - edge [fontname="FreeSans",fontsize=10,labelfontname="FreeSans",labelfontsize=10]; - node [fontname="FreeSans",fontsize=10,shape=record]; - Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",fillcolor="grey75",style="filled" fontcolor="black"]; - Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPublicBase.html"]; - Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="red",URL="$classTruncated.html"]; - Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="FreeSans"]; - Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classProtectedBase.html"]; - Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="FreeSans"]; - Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPrivateBase.html"]; - Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="grey75"]; - Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="FreeSans"]; - Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="FreeSans"]; - Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classUsed.html"]; -} diff --git a/kerberosV/src/doc/doxyout/hdb/html/graph_legend.html b/kerberosV/src/doc/doxyout/hdb/html/graph_legend.html deleted file mode 100644 index 98bd9479fa3..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/html/graph_legend.html +++ /dev/null @@ -1,87 +0,0 @@ - - -Heimdalhdblibrary: Graph Legend - - - -

-keyhole logo -

- - - -
-

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

-Consider the following example:

/*! Invisible class because of truncation */
-class Invisible { };
-
-/*! Truncated class, inheritance relation is hidden */
-class Truncated : public Invisible { };
-
-/* Class not documented with doxygen comments */
-class Undocumented { };
-
-/*! Class that is inherited using public inheritance */
-class PublicBase : public Truncated { };
-
-/*! A template class */
-template<class T> class Templ { };
-
-/*! Class that is inherited using protected inheritance */
-class ProtectedBase { };
-
-/*! Class that is inherited using private inheritance */
-class PrivateBase { };
-
-/*! Class that is used by the Inherited class */
-class Used { };
-
-/*! Super class that inherits a number of other classes */
-class Inherited : public PublicBase,
-                  protected ProtectedBase,
-                  private PrivateBase,
-                  public Undocumented,
-                  public Templ<int>
-{
-  private:
-    Used *m_usedClass;
-};
-
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

-

-graph_legend.png -
-

-The boxes in the above graph have the following meaning:

    -
  • -A filled gray box represents the struct or class for which the graph is generated.
  • -
  • -A box with a black border denotes a documented struct or class.
  • -
  • -A box with a grey border denotes an undocumented struct or class.
  • -
  • -A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • -
-The arrows have the following meaning:
    -
  • -A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • -
  • -A dark green arrow is used for protected inheritance.
  • -
  • -A dark red arrow is used for private inheritance.
  • -
  • -A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • -
  • -A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • -
-
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalhdblibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hdb/html/graph_legend.png b/kerberosV/src/doc/doxyout/hdb/html/graph_legend.png deleted file mode 100644 index 9b96937bfd5f7a36ea8dbf2d64ed1bc0768f074d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4256 zcmbVQdpOkH_8+NND!Jtq6-jtSR7_-I$|WI0?zfSY$_$d3afzvf+>+dd5k>AJ%rwTO zToWRpOjQk;SpA-vZaxFm|)qS zZ0&nc$jcV$urMS*mT>5$AW~=+0-V=-hk3d;65QJTE=oj@xp?1=Mih?*SJGP9x;tMV zMGEN%60bmjDaijL58nc4RjF^hegOwU1I*ccRUmxdMkPM4ng0%#|DsH zA6uS>izR^x-*dYB+Y^@(q_fm3bgQzJ)xH_6x>lGwshWF+C5$5dh3sYD)tK+C6U)CD z^Xomarii5PA4v8qF_zz#buUwD?ro`8dC&7V-sShflU~*CBDZ04x4+3qE16W{eL_xd z3YaO}b1qpA9YL|0YKdw~2PzM=1=7+ItLm0+tST@%D(MNDzHR)+2t0d#|s}$9i(3xGzT8VL8o-ltIwH zpspqZeXR&2qA6r=nJVuhHO>d5w2$gp9i$H^6ROz!yNTjvm&9kupV73|GPJbXR%Sq0{>>GOn}^wshXC&C~6F@ zQEtikDzl-h2C}qRulGQ3fxzQMGiQH>nv}zkLLPr|qAC;3@PP$cr?(+-t?Wl3jb0<+ z#bCd_jVJ74%s*@eBjHtio7tZ>$BFt@%$M_C#AZgnzPm@&TXYQgE_Vo-ac(6wcJS^F zq)^14asP#Se^m*cnG^`{K>nXv_jhChvr_3s{zCkoqlsf=o8GQ>m@l2)em-YYT;u5A zvL(o`$7n~F&}`E{@&v375BP8e8N#D`H-e$%bEytQt-6o^PA%Dz4c-UeB{`~c4E<$L zY5E6~rKXj#P=fpct4bMP!auX;p7jtP@Li|`r|L0{yav|CLqtLNI5sNFr)16{NP2=B zyY+-Wnh;%3ctC&{8FU{!e29-)s6j~L{~V=%0`Mo=V6^am+1%z2<9r3tD~6uUPff|k zVx!)!?zoJ8FYTDC+V^!??@ z4c>lSL|BU?N^?Ew@NJxJzG9eMGFyR)(2&@Nt!t3%JLT|%6obYCChp}`hP)dkti;UH zm+B_wyb0#h=*|iH4Fx&x>#k_WnyfzU(!KMagDGGLWwz39qG2@`w4@&@8MH}K=hcV> zo@xJdqtMHqtZ+UobNt|FkIRV*_Z#K{{Bb)#j z9XM+oNQX|Dn7$9c4;PX=9NRr)QYm+3 z zx^AyiP)aaJ#E<#aI_Z4M0qo~}6_b{Fw7LjYEpq&2eP4e=;`V;2lQjooTv3dWIpwWu z2b1z&DZD^dJ%5Ah@TPsb?SUP1RZa2=43!k>cAI`kktGdN*#k}_EFYJBtdo09U?xBs z9K9CSx_e{=df>B<4TT_=s52}n^1IKq){xhJIZR<%sQ$rL)Ww)Yt%WkDo#ad}s&Gx5 z={);tH9sSrJ>yD-tu!$ob?tPKmFU3SdDt@i5ULq$P+JZ&rBZXITMM2R4_v1ibgOiq zMgY#(>xF-;&)HonG+sHE@%)-B1*r)@ga3!db-Vc_x}smbXU4=Ycmit0F{Z9Z=q9*k zSY@ypaOs8`MX!BUZQ8*PNmX5$J|!1|LUar)5#Wv*4#g@nfsebEcx9@8Xwfb0Q9P(} z=SQ6#aIE*x06hjIS#Bd%McoJc%>SXksuJY|iLLCE2cQVDS=q0ExRn*~`i=fOw%XSg zjPMNGM@azaROpa|{rz4!=+zKM?qLTssH`{-E+@6Hhis|f3;+_M-ZtTHa|~uvmR1gf ztc+og%<|DBdt%HY{wmosZ0Dwo_$k|E-l5uc@dsfQXM7S|Iz@BxYy&z}hOFW|~F{vQ0Osp+?FjWk}l^^`$3d&Um1 z?&sxr?AAGlD4Khy<_>4od`Bblh?&9%UY#-Jq!c|?kU+hLL^MH@`5+jaq0btJpn7*b#Oeh1GEn6atjaCyIWfr0OqB$o*_K7>Hw0 z?BwrA^UZy(f_CdPoNz0!X6_EX?r80CuKuJ>x7Nfyd8EE%k&D?|=iJJfS>IQjndp+} zQwBq!$`>mvPmG!I^V(%R)Gym_|72^0&$a-L)TN^qtKvF!jlxIo?PRq6kTb-X53|%h z?IKy}wPh>cXPpl!CgqlED%v-a$)H5&WV66^EQctD_=l_ z8tuq$z=3tBNHyzQ{oqHd0c`bijo3DfaK&P6ljOYB*yU$_@k`qhq8=mtA4jS1B1K(j zvo2FBwlJ2mJRPCUqlyR$(a}O)y*2{y;Q!N$t<@I0rtBY~s9-^ohW}mp>mSLEID_fCC?)BC#xQVv6?MP3l1#chr!wPGR>M7_ma= zq&T4QLL#pPdxWMc8$@t?@@dX?v6SXk)pHf5YJBDF1J==c$=Ycr+-OyqR^Hvbl3sPR z*>|+VVnI4^ix_q({i~Ss$FYFSvqug*Szu}$jsTR7w#ajG&vB+e-65%XO$A}#xf?z1 zg)!qcIUN0peM-ZkW0&88#R#(`yIXN3nMRX3+scl<5eJ{+iXh{t%uA$^_(QR&k?6b}K!<(1P zqwP4`%br=wo_WfO34*7x=@)Qk8fo1(!f2_Wx<|KCf>TXR>Fs0He*PA|d0Gy2j)&Wm z%VnPoVWk((0ZN^Z;9t1nfauExQsXD8>~~^(ibEcj>iyB>^{0^bacb(gZMDZOg!?o2 zVa@4%Q3kdQ_jg7p|GidA+;Dh4mlhvBOEsuq(9T4mj7oc$7JRBo7sK z*E^0e%k=;_*U4pQ>$TPd_p@|Nm&X+6SCcizU6^Uhlfh+H#~(#zENDe!uqZ){ma3WhTpgE+}F#p~*bqL)ZYn`y8- zBOJ+jO4A2S!yO<}KP2QQ_3v@|Y0!qSg0~x9LPU!Rsy0*lW)2#guxB_)5P-_Hzz)sa zrnuTszvZ!oPt?A{2s%#E?qLUMss-0P-a={w>U|QXvO8{_pDLhOoY0}ZSU>&a#hJ<$ zf4Q&uT+Go7?*M0-NYFE>V%3O24hlHr&CvTIS_##QeB#n}e(gAe6vWs=NZv-DofbkO zu7$-h7Q@{+$HyEaDZEwf6AwUFq;NBnTgsf5s%mT33zz?)Ep+-3VmZ8*J#3y~)Ura$ zpPFz&43@7o6>!a?EZ!3?!?z=`K9*}HvAgu@#TSq?Ptjq6-{ylGIr3f2q%wW0|I7*vVROWS&K z1ujjlesAY3i{h8`HADO2qu*4TzqaC^gbVQY}Bcx zdccd&Kl-bUFIRb=gLuNk3HsaqMMi`2e%ujt?uM0xCs*bj=EwvJFU`+a_d(+X)YjtG z8ViTUA+`cG73Cc^6!T_s=HK)o?m&=mp;4>0A$DnH#54&G^7{I|FO#0N%dZAibZ>6* z?nPYXp5X^8B9a_9oS$PjT-x+F#$I{v>ysq>cBG2e?JyMGV2r`NPxrsx8;iIjX^q~Dr;D*ylh diff --git a/kerberosV/src/doc/doxyout/hdb/html/index.html b/kerberosV/src/doc/doxyout/hdb/html/index.html deleted file mode 100644 index b2ccf0ec1de..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/html/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - -Heimdalhdblibrary: Heimdal database backend library - - - -

-keyhole logo -

- - - -
-

Heimdal database backend library

-

-

1.5.3

-Introduction

-Heimdal libhdb library provides the backend support for Heimdal kdc and kadmind. Its here where plugins for diffrent database engines can be pluged in and extend support for here Heimdal get the principal and policy data from.

-Example of Heimdal backend are:

    -
  • Berkeley DB 1.85
  • Berkeley DB 3.0
  • Berkeley DB 4.0
  • New Berkeley DB
  • LDAP
-

-The project web page: http://www.h5l.org/

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalhdblibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hdb/html/struct_h_d_b.html b/kerberosV/src/doc/doxyout/hdb/html/struct_h_d_b.html deleted file mode 100644 index fcc8c4a88c8..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/html/struct_h_d_b.html +++ /dev/null @@ -1,430 +0,0 @@ - - -Heimdalhdblibrary: HDB Struct Reference - - - -

-keyhole logo -

- - - -
-

HDB Struct Reference

#include <hdb.h> -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Fields

char * hdb_name
krb5_error_code(* hdb_open )(krb5_context, struct HDB *, int, mode_t)
krb5_error_code(* hdb_close )(krb5_context, struct HDB *)
void(* hdb_free )(krb5_context, struct HDB *, hdb_entry_ex *)
krb5_error_code(* hdb_fetch_kvno )(krb5_context, struct HDB *, krb5_const_principal, unsigned, krb5_kvno, hdb_entry_ex *)
krb5_error_code(* hdb_store )(krb5_context, struct HDB *, unsigned, hdb_entry_ex *)
krb5_error_code(* hdb_remove )(krb5_context, struct HDB *, krb5_const_principal)
krb5_error_code(* hdb_firstkey )(krb5_context, struct HDB *, unsigned, hdb_entry_ex *)
krb5_error_code(* hdb_nextkey )(krb5_context, struct HDB *, unsigned, hdb_entry_ex *)
krb5_error_code(* hdb_lock )(krb5_context, struct HDB *, int)
krb5_error_code(* hdb_unlock )(krb5_context, struct HDB *)
krb5_error_code(* hdb_rename )(krb5_context, struct HDB *, const char *)
krb5_error_code(* hdb__get )(krb5_context, struct HDB *, krb5_data, krb5_data *)
krb5_error_code(* hdb__put )(krb5_context, struct HDB *, int, krb5_data, krb5_data)
krb5_error_code(* hdb__del )(krb5_context, struct HDB *, krb5_data)
krb5_error_code(* hdb_destroy )(krb5_context, struct HDB *)
krb5_error_code(* hdb_get_realms )(krb5_context, struct HDB *, krb5_realm **)
krb5_error_code(* hdb_password )(krb5_context, struct HDB *, hdb_entry_ex *, const char *, int)
krb5_error_code(* hdb_auth_status )(krb5_context, struct HDB *, hdb_entry_ex *, int)
krb5_error_code(* hdb_check_constrained_delegation )(krb5_context, struct HDB *, hdb_entry_ex *, krb5_const_principal)
krb5_error_code(* hdb_check_pkinit_ms_upn_match )(krb5_context, struct HDB *, hdb_entry_ex *, krb5_const_principal)
krb5_error_code(* hdb_check_s4u2self )(krb5_context, struct HDB *, hdb_entry_ex *, krb5_const_principal)
-


Detailed Description

-HDB backend function pointer structure

-The HDB structure is what the KDC and kadmind framework uses to query the backend database when talking about principals.


Field Documentation

- -
-
- - - - -
char* HDB::hdb_name
-
-
- -

-don't use, only for DB3 -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_open)(krb5_context, struct HDB *, int, mode_t)
-
-
- -

-Open (or create) the a Kerberos database.

-Open (or create) the a Kerberos database that was resolved with hdb_create(). The third and fourth flag to the function are the same as open(), thus passing O_CREAT will create the data base if it doesn't exists.

-Then done the caller should call hdb_close(), and to release all resources hdb_destroy(). -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_close)(krb5_context, struct HDB *)
-
-
- -

-Close the database for transaction

-Closes the database for further transactions, wont release any permanant resources. the database can be ->hdb_open-ed again. -

-

- -

-
- - - - -
void(* HDB::hdb_free)(krb5_context, struct HDB *, hdb_entry_ex *)
-
-
- -

-Free an entry after use. -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_fetch_kvno)(krb5_context, struct HDB *, krb5_const_principal, unsigned, krb5_kvno, hdb_entry_ex *)
-
-
- -

-Fetch an entry from the backend

-Fetch an entry from the backend, flags are what type of entry should be fetch: client, server, krbtgt. knvo (if specified and flags HDB_F_KVNO_SPECIFIED set) is the kvno to get -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_store)(krb5_context, struct HDB *, unsigned, hdb_entry_ex *)
-
-
- -

-Store an entry to database -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_remove)(krb5_context, struct HDB *, krb5_const_principal)
-
-
- -

-Remove an entry from the database. -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_firstkey)(krb5_context, struct HDB *, unsigned, hdb_entry_ex *)
-
-
- -

-As part of iteration, fetch one entry -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_nextkey)(krb5_context, struct HDB *, unsigned, hdb_entry_ex *)
-
-
- -

-As part of iteration, fetch next entry -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_lock)(krb5_context, struct HDB *, int)
-
-
- -

-Lock database

-A lock can only be held by one consumers. Transaction can still happen on the database while the lock is held, so the entry is only useful for syncroning creation of the database and renaming of the database. -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_unlock)(krb5_context, struct HDB *)
-
-
- -

-Unlock database -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_rename)(krb5_context, struct HDB *, const char *)
-
-
- -

-Rename the data base.

-Assume that the database is not hdb_open'ed and not locked. -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb__get)(krb5_context, struct HDB *, krb5_data, krb5_data *)
-
-
- -

-Get an hdb_entry from a classical DB backend

-If the database is a classical DB (ie BDB, NDBM, GDBM, etc) backend, this function will take a principal key (krb5_data) and return all data related to principal in the return krb5_data. The returned encoded entry is of type hdb_entry or hdb_entry_alias. -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb__put)(krb5_context, struct HDB *, int, krb5_data, krb5_data)
-
-
- -

-Store an hdb_entry from a classical DB backend

-Same discussion as in HDB::hdb__get -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb__del)(krb5_context, struct HDB *, krb5_data)
-
-
- -

-Delete and hdb_entry from a classical DB backend

-Same discussion as in HDB::hdb__get -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_destroy)(krb5_context, struct HDB *)
-
-
- -

-Destroy the handle to the database.

-Destroy the handle to the database, deallocate all memory and related resources. Does not remove any permanent data. Its the logical reverse of hdb_create() function that is the entry point for the module. -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_get_realms)(krb5_context, struct HDB *, krb5_realm **)
-
-
- -

-Get the list of realms this backend handles. This call is optional to support. The returned realms are used for announcing the realms over bonjour. Free returned array with krb5_free_host_realm(). -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_password)(krb5_context, struct HDB *, hdb_entry_ex *, const char *, int)
-
-
- -

-Change password.

-Will update keys for the entry when given password. The new keys must be written into the entry and will then later be ->hdb_store() into the database. The backend will still perform all other operations, increasing the kvno, and update modification timestamp.

-The backend needs to call _kadm5_set_keys() and perform password quality checks. -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_auth_status)(krb5_context, struct HDB *, hdb_entry_ex *, int)
-
-
- -

-Auth feedback

-This is a feedback call that allows backends that provides lockout functionality to register failure and/or successes.

-In case the entry is locked out, the backend should set the hdb_entry.flags.locked-out flag. -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_check_constrained_delegation)(krb5_context, struct HDB *, hdb_entry_ex *, krb5_const_principal)
-
-
- -

-Check if delegation is allowed. -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_check_pkinit_ms_upn_match)(krb5_context, struct HDB *, hdb_entry_ex *, krb5_const_principal)
-
-
- -

-Check if this name is an alias for the supplied client for PKINIT userPrinicpalName logins -

-

- -

-
- - - - -
krb5_error_code(* HDB::hdb_check_s4u2self)(krb5_context, struct HDB *, hdb_entry_ex *, krb5_const_principal)
-
-
- -

-Check if s4u2self is allowed from this client to this server -

-

-


The documentation for this struct was generated from the following file:
    -
  • /Users/lha/src/heimdal/heimdal-release/heimdal-1.5.3/lib/hdb/hdb.h
-
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalhdblibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hdb/html/structhdb__entry__ex.html b/kerberosV/src/doc/doxyout/hdb/html/structhdb__entry__ex.html deleted file mode 100644 index 2d07a264698..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/html/structhdb__entry__ex.html +++ /dev/null @@ -1,39 +0,0 @@ - - -Heimdalhdblibrary: hdb_entry_ex Struct Reference - - - -

-keyhole logo -

- - - -
-

hdb_entry_ex Struct Reference

#include <hdb.h> -

- - -
-


Detailed Description

-hdb_entry_ex is a wrapper structure around the hdb_entry structure that allows backends to keep a pointer to the backing store, ie in ->hdb_fetch_kvno(), so that we the kadmin/kpasswd backend gets around to ->hdb_store(), the backend doesn't need to lookup the entry again.
The documentation for this struct was generated from the following file:
    -
  • /Users/lha/src/heimdal/heimdal-release/heimdal-1.5.3/lib/hdb/hdb.h
-
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalhdblibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hdb/html/tab_b.gif b/kerberosV/src/doc/doxyout/hdb/html/tab_b.gif deleted file mode 100644 index 0d623483ffdf5f9f96900108042a7ab0643fe2a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 ncmZ?wbhEHbWMp7uXkcJy*>IeJfk6j|fqX^=1|}vKMh0sDa2W*H diff --git a/kerberosV/src/doc/doxyout/hdb/html/tab_l.gif b/kerberosV/src/doc/doxyout/hdb/html/tab_l.gif deleted file mode 100644 index 9b1e6337c9299a700401a2a78a2c6ffced475216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 706 zcmZ?wbhEHbZT`}F1e&(Gg}Y(8=I;HA5#Z$3JI=gGB)FQ#odI(O&E^@q;x zK6mr*m3xOS-#u~t!I@i+u0DKm^U160k6t`|^WpV}&n+8{U%dD9&a>B#U%!9-@yol< zU%&tQ{rk_K|NsC0`}dE5ET99@1@a36+kb~?0UJ*yc&I3X_m z!ND^5$O7$#8OFRuDhG}!?8z?cdZK&!`PWjdR;Aj^wZ` zeK{IEYHBJ)6K8VIp1`BVt++swf6j+=L{p1*nO(VhE`pFexG@5$|>uaCcd z`0m=9m+yak{QmXN#Sc$^{$X9h9&q2jiKAI|&T)a;PPx2K9p`YIdw8HtR5k2Q$2-O2 z*;3y{MQ-RnJTgJfI&R5|O)AHxDf_00XbPvDZPy4t=hHd)nfLPvms&O`Ok(sD()5v$ z5U@&h;a=#xbxVbo2~X&Xj0Ie(f{v>vERH+qC+nTG=B8Nca=wU-O$?1&vUgV~9=!H; zx>3p9Yn%*<>t~sk+&0xfyS8RsPfYBd<~wWK%j-LmpU>O7yX^h#UCp1x-p#i7@bE;py8XI6 zmY<)m>~)W~yIWcMVoiPg{duuf<*)9qZ9l$m*Ph&W&$jlv*Vpa+{pH@n=IQ$L?0$ax ec60Ul|8o2P|NVbd{6P)#weSbE3}s?04AuZvx_~SI diff --git a/kerberosV/src/doc/doxyout/hdb/html/tab_r.gif b/kerberosV/src/doc/doxyout/hdb/html/tab_r.gif deleted file mode 100644 index ce9dd9f533cb5486d6941844f442b59d4a9e9175..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2585 zcmbV}`9Bkk1ILFF--w5zJc=ZZT(zjE=;2|_S)Qm~rCWz1Pc)KPl;jv%A#&v2*x}yc zmf2~Jm~&=xjJY?PqwIN}f8qQ2{r$uH{c*nJbmr{cR5??*egHrs-B=MzCF`3%e{FAW z{oL5xTHn~5TM{jaB;@|_Ue5F&Zb@p(kMyG{*;gWDg zyeL|eZf7Qd8=#bXzSiR{yzRgLSj-fJS8>lBjVHN z^o-0eS=nE6a`W;LChBs=`+QAJP~{b93>H^eRb5kCSC1zUNezun%`L5M?RDzv#%jk7 zYVRX=vATPD`+oEfum^{RM@GjuP?-r=yh0!p;Vx^T9G7~`7%5ydH%70=jyJ;;`d;hv92x3R=z{xp+Lg2!*@OK*K15-t&okoPtSED)h&$RLxdbA zseWm^C3d%-yRNi-ryk^!ek+C`n&~cd$#ZWct_cUL{l~i+Nzx^5d!n94(>bW-iL~Rl z&8r)?q|1DIo=0=judQ{FaGcfLERz8gfn3-Qt<2lksh{mzpT}DXxUuR^z=^key&q4! z+wWI45vL0k$R^(F#{qfqhUsN@WA+w-V?LPH33!Q?WFSB3)WBojE@hK41Nb?KfS+Qo zXgrzfsP$wr4Qzy*{OD>uJBjdgGM@VMml5)2f~_}lD*YyOb}Hjeobhz#4c`w(l^>KK zr?Ud;W~Z}*w;%hZ|2^p^+f06gJDJQD zeIhGADbDmm&6arh(q>EZ<7mjzg7l|z$hRL8=1>)Nv=S7CY$B}iYJ&*T_-T_OG*L1q ztZ3Lana33?y3AKnyq^YCF|4x%Rb5WU&2qcl{TFKey%QJeMxn^SdT!hZ5+0i1zeusiYVp-phBl7b5+Px-X&LhByq z0F&<;K0l2+v>qiHlXb#$jXMv$uK-dEGE9L~qtdU(XeRXmvu*K2Q&6!fD**JxYP4b4BR7FdJ$Qx9G9`J%-_X!a#LGpp3g9)VWytGCa;7`S1_e8F~!R+aSJ zOF17p2`H?2kPs8Q`_;U}+D%3p zs2-0BTqFwpUoBk`?P;iPQ(IbEA|JmMx!P&YYG|R@S=5Mnw;-?A6rEEVyV%d7{iU4a zNk`i!%F(Ykpm`}#oH;BjY->@b8vQedv;pza2FL&*6ufjd+*3Ute&>kes~TU?^KkojsTh(o~(3tk1Y6>4(yn( z#U*ID9@eg-beKo1B;HXe+}{Z%n@7m0+yxivuqk9~;!1LGQlah)xYK4>wgL}l6dsaN zIxlRlq`*`j9PG4*0hD6YV_b_2w5b#)o7J?`q#{GjvvKlD`T*dWcZx<-s(ZvLB44E# z=!|sw!?)@%y$oRNL#25WS3lzdii}TuQ3?CLnvQ1_n};2sT_;Y;#d3=+-(O% zMN$>O!3;ke(UuLR%h_&)N zs^!-@A>QR}4yB1bPp`9S19ikTbZ~O{&FF-yHK{En;mmShDUIEw03`j(DBIsM}Rjki2J#SQa3gFZTKBPDeIiLt9Z z%bL3(B@Qw%(B`wSMS~dPh$=R`(}lBoFXKy(s|*{#ru$wjsBc_O#zxNk9w+UUHmx(U zmJ8+M+ndtnZ<7|VU9Mbt61zpo9T&3%Wx&XII=#QJxjR`CZf22ac3d51Z?GD%LEe_&*t46Qf;4`bZ7p2K(Ab5>GfT^}4! zBT&HZD`^PEgWoI&{~o-ID0F?O`75sm(87x%A{(}Ch1)QlzdJ)1B-eqe5a(weg0`4lQIf1evjvbBY50DVbzO7CLf|vP z2#0(U-|jZ`H{y5N^o7%iK6H>_HEGN->U6^!)1{XpJV!!4(Ig7wzZQ*9WYF4X1rG0x z=1uA@i`rIAciubDC{;~b(|&|A@xkjRP5aRcvRU9tvIm}jDB6J eQ0-6-y)mpwdT=ayS0tBxKDA*~;EWmo diff --git a/kerberosV/src/doc/doxyout/hdb/html/tabs.css b/kerberosV/src/doc/doxyout/hdb/html/tabs.css deleted file mode 100644 index 95f00a91da3..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/html/tabs.css +++ /dev/null @@ -1,102 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/HDB.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/HDB.3 deleted file mode 100644 index 62e111e9846..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/HDB.3 +++ /dev/null @@ -1,185 +0,0 @@ -.TH "HDB" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalhdblibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -HDB \- -.SH SYNOPSIS -.br -.PP -\fC#include \fP -.PP -.SS "Data Fields" - -.in +1c -.ti -1c -.RI "char * \fBhdb_name\fP" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_open\fP )(krb5_context, struct \fBHDB\fP *, int, mode_t)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_close\fP )(krb5_context, struct \fBHDB\fP *)" -.br -.ti -1c -.RI "void(* \fBhdb_free\fP )(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_fetch_kvno\fP )(krb5_context, struct \fBHDB\fP *, krb5_const_principal, unsigned, krb5_kvno, \fBhdb_entry_ex\fP *)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_store\fP )(krb5_context, struct \fBHDB\fP *, unsigned, \fBhdb_entry_ex\fP *)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_remove\fP )(krb5_context, struct \fBHDB\fP *, krb5_const_principal)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_firstkey\fP )(krb5_context, struct \fBHDB\fP *, unsigned, \fBhdb_entry_ex\fP *)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_nextkey\fP )(krb5_context, struct \fBHDB\fP *, unsigned, \fBhdb_entry_ex\fP *)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_lock\fP )(krb5_context, struct \fBHDB\fP *, int)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_unlock\fP )(krb5_context, struct \fBHDB\fP *)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_rename\fP )(krb5_context, struct \fBHDB\fP *, const char *)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb__get\fP )(krb5_context, struct \fBHDB\fP *, krb5_data, krb5_data *)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb__put\fP )(krb5_context, struct \fBHDB\fP *, int, krb5_data, krb5_data)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb__del\fP )(krb5_context, struct \fBHDB\fP *, krb5_data)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_destroy\fP )(krb5_context, struct \fBHDB\fP *)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_get_realms\fP )(krb5_context, struct \fBHDB\fP *, krb5_realm **)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_password\fP )(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *, const char *, int)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_auth_status\fP )(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *, int)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_check_constrained_delegation\fP )(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *, krb5_const_principal)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_check_pkinit_ms_upn_match\fP )(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *, krb5_const_principal)" -.br -.ti -1c -.RI "krb5_error_code(* \fBhdb_check_s4u2self\fP )(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *, krb5_const_principal)" -.br -.in -1c -.SH "Detailed Description" -.PP -\fBHDB\fP backend function pointer structure -.PP -The \fBHDB\fP structure is what the KDC and kadmind framework uses to query the backend database when talking about principals. -.SH "Field Documentation" -.PP -.SS "char* \fBHDB::hdb_name\fP" -.PP -don't use, only for DB3 -.SS "krb5_error_code(* \fBHDB::hdb_open\fP)(krb5_context, struct \fBHDB\fP *, int, mode_t)" -.PP -Open (or create) the a Kerberos database. -.PP -Open (or create) the a Kerberos database that was resolved with hdb_create(). The third and fourth flag to the function are the same as open(), thus passing O_CREAT will create the data base if it doesn't exists. -.PP -Then done the caller should call \fBhdb_close()\fP, and to release all resources \fBhdb_destroy()\fP. -.SS "krb5_error_code(* \fBHDB::hdb_close\fP)(krb5_context, struct \fBHDB\fP *)" -.PP -Close the database for transaction -.PP -Closes the database for further transactions, wont release any permanant resources. the database can be ->hdb_open-ed again. -.SS "void(* \fBHDB::hdb_free\fP)(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *)" -.PP -Free an entry after use. -.SS "krb5_error_code(* \fBHDB::hdb_fetch_kvno\fP)(krb5_context, struct \fBHDB\fP *, krb5_const_principal, unsigned, krb5_kvno, \fBhdb_entry_ex\fP *)" -.PP -Fetch an entry from the backend -.PP -Fetch an entry from the backend, flags are what type of entry should be fetch: client, server, krbtgt. knvo (if specified and flags HDB_F_KVNO_SPECIFIED set) is the kvno to get -.SS "krb5_error_code(* \fBHDB::hdb_store\fP)(krb5_context, struct \fBHDB\fP *, unsigned, \fBhdb_entry_ex\fP *)" -.PP -Store an entry to database -.SS "krb5_error_code(* \fBHDB::hdb_remove\fP)(krb5_context, struct \fBHDB\fP *, krb5_const_principal)" -.PP -Remove an entry from the database. -.SS "krb5_error_code(* \fBHDB::hdb_firstkey\fP)(krb5_context, struct \fBHDB\fP *, unsigned, \fBhdb_entry_ex\fP *)" -.PP -As part of iteration, fetch one entry -.SS "krb5_error_code(* \fBHDB::hdb_nextkey\fP)(krb5_context, struct \fBHDB\fP *, unsigned, \fBhdb_entry_ex\fP *)" -.PP -As part of iteration, fetch next entry -.SS "krb5_error_code(* \fBHDB::hdb_lock\fP)(krb5_context, struct \fBHDB\fP *, int)" -.PP -Lock database -.PP -A lock can only be held by one consumers. Transaction can still happen on the database while the lock is held, so the entry is only useful for syncroning creation of the database and renaming of the database. -.SS "krb5_error_code(* \fBHDB::hdb_unlock\fP)(krb5_context, struct \fBHDB\fP *)" -.PP -Unlock database -.SS "krb5_error_code(* \fBHDB::hdb_rename\fP)(krb5_context, struct \fBHDB\fP *, const char *)" -.PP -Rename the data base. -.PP -Assume that the database is not hdb_open'ed and not locked. -.SS "krb5_error_code(* \fBHDB::hdb__get\fP)(krb5_context, struct \fBHDB\fP *, krb5_data, krb5_data *)" -.PP -Get an hdb_entry from a classical DB backend -.PP -If the database is a classical DB (ie BDB, NDBM, GDBM, etc) backend, this function will take a principal key (krb5_data) and return all data related to principal in the return krb5_data. The returned encoded entry is of type hdb_entry or hdb_entry_alias. -.SS "krb5_error_code(* \fBHDB::hdb__put\fP)(krb5_context, struct \fBHDB\fP *, int, krb5_data, krb5_data)" -.PP -Store an hdb_entry from a classical DB backend -.PP -Same discussion as in \fBHDB::hdb__get\fP -.SS "krb5_error_code(* \fBHDB::hdb__del\fP)(krb5_context, struct \fBHDB\fP *, krb5_data)" -.PP -Delete and hdb_entry from a classical DB backend -.PP -Same discussion as in \fBHDB::hdb__get\fP -.SS "krb5_error_code(* \fBHDB::hdb_destroy\fP)(krb5_context, struct \fBHDB\fP *)" -.PP -Destroy the handle to the database. -.PP -Destroy the handle to the database, deallocate all memory and related resources. Does not remove any permanent data. Its the logical reverse of hdb_create() function that is the entry point for the module. -.SS "krb5_error_code(* \fBHDB::hdb_get_realms\fP)(krb5_context, struct \fBHDB\fP *, krb5_realm **)" -.PP -Get the list of realms this backend handles. This call is optional to support. The returned realms are used for announcing the realms over bonjour. Free returned array with krb5_free_host_realm(). -.SS "krb5_error_code(* \fBHDB::hdb_password\fP)(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *, const char *, int)" -.PP -Change password. -.PP -Will update keys for the entry when given password. The new keys must be written into the entry and will then later be ->\fBhdb_store()\fP into the database. The backend will still perform all other operations, increasing the kvno, and update modification timestamp. -.PP -The backend needs to call _kadm5_set_keys() and perform password quality checks. -.SS "krb5_error_code(* \fBHDB::hdb_auth_status\fP)(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *, int)" -.PP -Auth feedback -.PP -This is a feedback call that allows backends that provides lockout functionality to register failure and/or successes. -.PP -In case the entry is locked out, the backend should set the hdb_entry.flags.locked-out flag. -.SS "krb5_error_code(* \fBHDB::hdb_check_constrained_delegation\fP)(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *, krb5_const_principal)" -.PP -Check if delegation is allowed. -.SS "krb5_error_code(* \fBHDB::hdb_check_pkinit_ms_upn_match\fP)(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *, krb5_const_principal)" -.PP -Check if this name is an alias for the supplied client for PKINIT userPrinicpalName logins -.SS "krb5_error_code(* \fBHDB::hdb_check_s4u2self\fP)(krb5_context, struct \fBHDB\fP *, \fBhdb_entry_ex\fP *, krb5_const_principal)" -.PP -Check if s4u2self is allowed from this client to this server - -.SH "Author" -.PP -Generated automatically by Doxygen for Heimdalhdblibrary from the source code. diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb__del.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb__del.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb__del.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb__get.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb__get.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb__get.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb__put.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb__put.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb__put.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_auth_status.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_auth_status.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_auth_status.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_constrained_delegation.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_constrained_delegation.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_constrained_delegation.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_pkinit_ms_upn_match.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_pkinit_ms_upn_match.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_pkinit_ms_upn_match.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_s4u2self.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_s4u2self.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_check_s4u2self.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_close.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_close.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_close.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_destroy.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_destroy.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_destroy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_entry_ex.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_entry_ex.3 deleted file mode 100644 index c6451b039ff..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_entry_ex.3 +++ /dev/null @@ -1,17 +0,0 @@ -.TH "hdb_entry_ex" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalhdblibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hdb_entry_ex \- -.SH SYNOPSIS -.br -.PP -\fC#include \fP -.PP -.SH "Detailed Description" -.PP -\fBhdb_entry_ex\fP is a wrapper structure around the hdb_entry structure that allows backends to keep a pointer to the backing store, ie in ->hdb_fetch_kvno(), so that we the kadmin/kpasswd backend gets around to ->hdb_store(), the backend doesn't need to lookup the entry again. - -.SH "Author" -.PP -Generated automatically by Doxygen for Heimdalhdblibrary from the source code. diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_fetch_kvno.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_fetch_kvno.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_fetch_kvno.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_firstkey.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_firstkey.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_firstkey.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_free.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_free.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_get_realms.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_get_realms.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_get_realms.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_lock.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_lock.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_lock.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_name.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_name.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_nextkey.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_nextkey.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_nextkey.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_open.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_open.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_open.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_password.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_password.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_password.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_remove.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_remove.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_remove.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_rename.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_rename.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_rename.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_store.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_store.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_store.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_unlock.3 b/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_unlock.3 deleted file mode 100644 index 46f8e91739a..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/man/man3/hdb_unlock.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/HDB.3 diff --git a/kerberosV/src/doc/doxyout/hdb/manpages b/kerberosV/src/doc/doxyout/hdb/manpages deleted file mode 100644 index c6d2fe2361f..00000000000 --- a/kerberosV/src/doc/doxyout/hdb/manpages +++ /dev/null @@ -1,24 +0,0 @@ -hdb/man/man3/HDB.3 -hdb/man/man3/hdb__del.3 -hdb/man/man3/hdb__get.3 -hdb/man/man3/hdb__put.3 -hdb/man/man3/hdb_auth_status.3 -hdb/man/man3/hdb_check_constrained_delegation.3 -hdb/man/man3/hdb_check_pkinit_ms_upn_match.3 -hdb/man/man3/hdb_check_s4u2self.3 -hdb/man/man3/hdb_close.3 -hdb/man/man3/hdb_destroy.3 -hdb/man/man3/hdb_entry_ex.3 -hdb/man/man3/hdb_fetch_kvno.3 -hdb/man/man3/hdb_firstkey.3 -hdb/man/man3/hdb_free.3 -hdb/man/man3/hdb_get_realms.3 -hdb/man/man3/hdb_lock.3 -hdb/man/man3/hdb_name.3 -hdb/man/man3/hdb_nextkey.3 -hdb/man/man3/hdb_open.3 -hdb/man/man3/hdb_password.3 -hdb/man/man3/hdb_remove.3 -hdb/man/man3/hdb_rename.3 -hdb/man/man3/hdb_store.3 -hdb/man/man3/hdb_unlock.3 diff --git a/kerberosV/src/doc/doxyout/hx509/html/doxygen.css b/kerberosV/src/doc/doxyout/hx509/html/doxygen.css deleted file mode 100644 index 22c484301dd..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/doxygen.css +++ /dev/null @@ -1,473 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; -} -H1 { - text-align: center; - font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { - font-weight: bold -} -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navpath { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { - text-decoration: none; - background-color: #6666cc; - color: #ffffff -} -A.el { - text-decoration: none; - font-weight: bold -} -A.elRef { - font-weight: bold -} -A.code:link { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.code:visited { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.codeRef:link { - font-weight: normal; - color: #0000FF -} -A.codeRef:visited { - font-weight: normal; - color: #0000FF -} -A:hover { - text-decoration: none; - background-color: #f2f2ff -} -DL.el { - margin-left: -1cm -} -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: 90% -} -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { - text-align: center; -} -IMG.formulaDsp { -} -IMG.formulaInl { - vertical-align: middle; -} -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -SPAN.vhdldigit { color: #ff00ff } -SPAN.vhdlchar { color: #000000 } -SPAN.vhdlkeyword { color: #700070 } -SPAN.vhdllogic { color: #ff0000 } - -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { - color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { - font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { - background: #e8eef2; - font-weight: bold; -} -HR { - height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; - margin-left: 3px; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -/* these are for tree view when used as main index */ -.directory { - font-size: 9pt; - font-weight: bold; -} -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* The following two styles can be used to replace the root node title */ -/* with an image of your choice. Simply uncomment the next two styles, */ -/* specify the name of your image and be sure to set 'height' to the */ -/* proper pixel height of your image. */ - -/* .directory h3.swap { */ -/* height: 61px; */ -/* background-repeat: no-repeat; */ -/* background-image: url("yourimage.gif"); */ -/* } */ -/* .directory h3.swap span { */ -/* display: none; */ -/* } */ - -.directory > h3 { - margin-top: 0; -} -.directory p { - margin: 0px; - white-space: nowrap; -} -.directory div { - display: none; - margin: 0px; -} -.directory img { - vertical-align: -30%; -} -/* these are for tree view when not used as main index */ -.directory-alt { - font-size: 100%; - font-weight: bold; -} -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} -.directory-alt > h3 { - margin-top: 0; -} -.directory-alt p { - margin: 0px; - white-space: nowrap; -} -.directory-alt div { - display: none; - margin: 0px; -} -.directory-alt img { - vertical-align: -30%; -} - diff --git a/kerberosV/src/doc/doxyout/hx509/html/doxygen.png b/kerberosV/src/doc/doxyout/hx509/html/doxygen.png deleted file mode 100644 index f0a274bbaffdd67f6d784c894d9cf28729db0e14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1281 zcmaJ>ZA?>F7(Vx-ms?uoS`b@hdRtpo6o^%HU>M$hfGrBvQnk$LE?p^P!kn&ikhyq! zX~V@&tPF5Qt@V?oTL96Bi%aRiwbe1)9DWQI#?)=HxS7QSw`J`5fAJ*eJbB;uNuKA& zdERDo*{Y<(If(#(B$Lr#;nB(8Y#ia=ZCeW?JfPLuQY`=@cW$k}Rivq|vbxGrRq1Tl9;+(gNt?}UtVKM2`T5t1jLzuL@0UIs`S#vlhl4)^ zLgSYrPj@$+`|j?eSbXTmiHGkWxV8V}BzNR?pl9k_s4pDu9vd5a_UzZEPk)}Ad{AV_ zzddrjrh4=Imr`E06;LY{)YYt?o}L~H@7C}F^WB!Ra=v`Q0bj{>5&$66CWF>mf6vjP z2N>RRY6ZYa=K`76>+|_)Xdwko+7wv}7cN|btOhWb(*{sta~6b?S8Omrxw}!4`NhGr zZVpNqpu1@BE`QGWNTpEpcJVW5izu~2B^GlM?1(OPg)zwW;QcP@Ltcclm>XbJL9C|j z=9!2?ua=uIlf0%AndzHsRC}IyTL$EhAee(fdKB`?27KeS^2M8M_7b~PiCFO&r5LC7 z7gl1*a<8;SjNaw#h=843_AV9iZbWQOAp5YOC^&_F*9K0> zB|6%IDb?aM#3viTxkLU4aXg&@+CkNTOnQ1iMP*^?b|^lJy$4C)Zk4isV!|RZ*XhXh zw8q3$=*0LeGC!XI_Wc?dkT~3+*Gu%%yIqP+Wr3H$=&ROMQU6q}Ag^P~>c5vAEO;a- z_dK-3PPeKar%)6$j~vI2#*-YH!1h6HYVtwCX5_wM`iF#UKz&&@9Oo5w3%XGYrX zW>dY~)SG-((Yim%`InwgTvyRC?e=Wh^8KCao!R6Eg&TpVWUY1sN~4G}V?nFnEGo-; zHZ_$eW9-GnC%^WS9b z@p;-$oH#MtC0v>Q$HX%4^JdFdO$0cbv-W)Q TtK}Eh@>>I#ipmV1>S*>q-hkC} diff --git a/kerberosV/src/doc/doxyout/hx509/html/graph_legend.dot b/kerberosV/src/doc/doxyout/hx509/html/graph_legend.dot deleted file mode 100644 index 4df0f1aa486..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/graph_legend.dot +++ /dev/null @@ -1,22 +0,0 @@ -digraph G -{ - edge [fontname="FreeSans",fontsize=10,labelfontname="FreeSans",labelfontsize=10]; - node [fontname="FreeSans",fontsize=10,shape=record]; - Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",fillcolor="grey75",style="filled" fontcolor="black"]; - Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPublicBase.html"]; - Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="red",URL="$classTruncated.html"]; - Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="FreeSans"]; - Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classProtectedBase.html"]; - Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="FreeSans"]; - Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPrivateBase.html"]; - Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="grey75"]; - Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="FreeSans"]; - Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="FreeSans"]; - Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classUsed.html"]; -} diff --git a/kerberosV/src/doc/doxyout/hx509/html/graph_legend.html b/kerberosV/src/doc/doxyout/hx509/html/graph_legend.html deleted file mode 100644 index 2b10ec15f43..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/graph_legend.html +++ /dev/null @@ -1,88 +0,0 @@ - - -Heimdalx509library: Graph Legend - - - -

-keyhole logo -

- - - -
-

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

-Consider the following example:

/*! Invisible class because of truncation */
-class Invisible { };
-
-/*! Truncated class, inheritance relation is hidden */
-class Truncated : public Invisible { };
-
-/* Class not documented with doxygen comments */
-class Undocumented { };
-
-/*! Class that is inherited using public inheritance */
-class PublicBase : public Truncated { };
-
-/*! A template class */
-template<class T> class Templ { };
-
-/*! Class that is inherited using protected inheritance */
-class ProtectedBase { };
-
-/*! Class that is inherited using private inheritance */
-class PrivateBase { };
-
-/*! Class that is used by the Inherited class */
-class Used { };
-
-/*! Super class that inherits a number of other classes */
-class Inherited : public PublicBase,
-                  protected ProtectedBase,
-                  private PrivateBase,
-                  public Undocumented,
-                  public Templ<int>
-{
-  private:
-    Used *m_usedClass;
-};
-
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

-

-graph_legend.png -
-

-The boxes in the above graph have the following meaning:

    -
  • -A filled gray box represents the struct or class for which the graph is generated.
  • -
  • -A box with a black border denotes a documented struct or class.
  • -
  • -A box with a grey border denotes an undocumented struct or class.
  • -
  • -A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • -
-The arrows have the following meaning:
    -
  • -A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • -
  • -A dark green arrow is used for protected inheritance.
  • -
  • -A dark red arrow is used for private inheritance.
  • -
  • -A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • -
  • -A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • -
-
-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/graph_legend.png b/kerberosV/src/doc/doxyout/hx509/html/graph_legend.png deleted file mode 100644 index 9b96937bfd5f7a36ea8dbf2d64ed1bc0768f074d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4256 zcmbVQdpOkH_8+NND!Jtq6-jtSR7_-I$|WI0?zfSY$_$d3afzvf+>+dd5k>AJ%rwTO zToWRpOjQk;SpA-vZaxFm|)qS zZ0&nc$jcV$urMS*mT>5$AW~=+0-V=-hk3d;65QJTE=oj@xp?1=Mih?*SJGP9x;tMV zMGEN%60bmjDaijL58nc4RjF^hegOwU1I*ccRUmxdMkPM4ng0%#|DsH zA6uS>izR^x-*dYB+Y^@(q_fm3bgQzJ)xH_6x>lGwshWF+C5$5dh3sYD)tK+C6U)CD z^Xomarii5PA4v8qF_zz#buUwD?ro`8dC&7V-sShflU~*CBDZ04x4+3qE16W{eL_xd z3YaO}b1qpA9YL|0YKdw~2PzM=1=7+ItLm0+tST@%D(MNDzHR)+2t0d#|s}$9i(3xGzT8VL8o-ltIwH zpspqZeXR&2qA6r=nJVuhHO>d5w2$gp9i$H^6ROz!yNTjvm&9kupV73|GPJbXR%Sq0{>>GOn}^wshXC&C~6F@ zQEtikDzl-h2C}qRulGQ3fxzQMGiQH>nv}zkLLPr|qAC;3@PP$cr?(+-t?Wl3jb0<+ z#bCd_jVJ74%s*@eBjHtio7tZ>$BFt@%$M_C#AZgnzPm@&TXYQgE_Vo-ac(6wcJS^F zq)^14asP#Se^m*cnG^`{K>nXv_jhChvr_3s{zCkoqlsf=o8GQ>m@l2)em-YYT;u5A zvL(o`$7n~F&}`E{@&v375BP8e8N#D`H-e$%bEytQt-6o^PA%Dz4c-UeB{`~c4E<$L zY5E6~rKXj#P=fpct4bMP!auX;p7jtP@Li|`r|L0{yav|CLqtLNI5sNFr)16{NP2=B zyY+-Wnh;%3ctC&{8FU{!e29-)s6j~L{~V=%0`Mo=V6^am+1%z2<9r3tD~6uUPff|k zVx!)!?zoJ8FYTDC+V^!??@ z4c>lSL|BU?N^?Ew@NJxJzG9eMGFyR)(2&@Nt!t3%JLT|%6obYCChp}`hP)dkti;UH zm+B_wyb0#h=*|iH4Fx&x>#k_WnyfzU(!KMagDGGLWwz39qG2@`w4@&@8MH}K=hcV> zo@xJdqtMHqtZ+UobNt|FkIRV*_Z#K{{Bb)#j z9XM+oNQX|Dn7$9c4;PX=9NRr)QYm+3 z zx^AyiP)aaJ#E<#aI_Z4M0qo~}6_b{Fw7LjYEpq&2eP4e=;`V;2lQjooTv3dWIpwWu z2b1z&DZD^dJ%5Ah@TPsb?SUP1RZa2=43!k>cAI`kktGdN*#k}_EFYJBtdo09U?xBs z9K9CSx_e{=df>B<4TT_=s52}n^1IKq){xhJIZR<%sQ$rL)Ww)Yt%WkDo#ad}s&Gx5 z={);tH9sSrJ>yD-tu!$ob?tPKmFU3SdDt@i5ULq$P+JZ&rBZXITMM2R4_v1ibgOiq zMgY#(>xF-;&)HonG+sHE@%)-B1*r)@ga3!db-Vc_x}smbXU4=Ycmit0F{Z9Z=q9*k zSY@ypaOs8`MX!BUZQ8*PNmX5$J|!1|LUar)5#Wv*4#g@nfsebEcx9@8Xwfb0Q9P(} z=SQ6#aIE*x06hjIS#Bd%McoJc%>SXksuJY|iLLCE2cQVDS=q0ExRn*~`i=fOw%XSg zjPMNGM@azaROpa|{rz4!=+zKM?qLTssH`{-E+@6Hhis|f3;+_M-ZtTHa|~uvmR1gf ztc+og%<|DBdt%HY{wmosZ0Dwo_$k|E-l5uc@dsfQXM7S|Iz@BxYy&z}hOFW|~F{vQ0Osp+?FjWk}l^^`$3d&Um1 z?&sxr?AAGlD4Khy<_>4od`Bblh?&9%UY#-Jq!c|?kU+hLL^MH@`5+jaq0btJpn7*b#Oeh1GEn6atjaCyIWfr0OqB$o*_K7>Hw0 z?BwrA^UZy(f_CdPoNz0!X6_EX?r80CuKuJ>x7Nfyd8EE%k&D?|=iJJfS>IQjndp+} zQwBq!$`>mvPmG!I^V(%R)Gym_|72^0&$a-L)TN^qtKvF!jlxIo?PRq6kTb-X53|%h z?IKy}wPh>cXPpl!CgqlED%v-a$)H5&WV66^EQctD_=l_ z8tuq$z=3tBNHyzQ{oqHd0c`bijo3DfaK&P6ljOYB*yU$_@k`qhq8=mtA4jS1B1K(j zvo2FBwlJ2mJRPCUqlyR$(a}O)y*2{y;Q!N$t<@I0rtBY~s9-^ohW}mp>mSLEID_fCC?)BC#xQVv6?MP3l1#chr!wPGR>M7_ma= zq&T4QLL#pPdxWMc8$@t?@@dX?v6SXk)pHf5YJBDF1J==c$=Ycr+-OyqR^Hvbl3sPR z*>|+VVnI4^ix_q({i~Ss$FYFSvqug*Szu}$jsTR7w#ajG&vB+e-65%XO$A}#xf?z1 zg)!qcIUN0peM-ZkW0&88#R#(`yIXN3nMRX3+scl<5eJ{+iXh{t%uA$^_(QR&k?6b}K!<(1P zqwP4`%br=wo_WfO34*7x=@)Qk8fo1(!f2_Wx<|KCf>TXR>Fs0He*PA|d0Gy2j)&Wm z%VnPoVWk((0ZN^Z;9t1nfauExQsXD8>~~^(ibEcj>iyB>^{0^bacb(gZMDZOg!?o2 zVa@4%Q3kdQ_jg7p|GidA+;Dh4mlhvBOEsuq(9T4mj7oc$7JRBo7sK z*E^0e%k=;_*U4pQ>$TPd_p@|Nm&X+6SCcizU6^Uhlfh+H#~(#zENDe!uqZ){ma3WhTpgE+}F#p~*bqL)ZYn`y8- zBOJ+jO4A2S!yO<}KP2QQ_3v@|Y0!qSg0~x9LPU!Rsy0*lW)2#guxB_)5P-_Hzz)sa zrnuTszvZ!oPt?A{2s%#E?qLUMss-0P-a={w>U|QXvO8{_pDLhOoY0}ZSU>&a#hJ<$ zf4Q&uT+Go7?*M0-NYFE>V%3O24hlHr&CvTIS_##QeB#n}e(gAe6vWs=NZv-DofbkO zu7$-h7Q@{+$HyEaDZEwf6AwUFq;NBnTgsf5s%mT33zz?)Ep+-3VmZ8*J#3y~)Ura$ zpPFz&43@7o6>!a?EZ!3?!?z=`K9*}HvAgu@#TSq?Ptjq6-{ylGIr3f2q%wW0|I7*vVROWS&K z1ujjlesAY3i{h8`HADO2qu*4TzqaC^gbVQY}Bcx zdccd&Kl-bUFIRb=gLuNk3HsaqMMi`2e%ujt?uM0xCs*bj=EwvJFU`+a_d(+X)YjtG z8ViTUA+`cG73Cc^6!T_s=HK)o?m&=mp;4>0A$DnH#54&G^7{I|FO#0N%dZAibZ>6* z?nPYXp5X^8B9a_9oS$PjT-x+F#$I{v>ysq>cBG2e?JyMGV2r`NPxrsx8;iIjX^q~Dr;D*ylh diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509.html deleted file mode 100644 index e55f60c8922..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509.html +++ /dev/null @@ -1,89 +0,0 @@ - - -Heimdalx509library: hx509 library - - - -

-keyhole logo -

- - - -
-

hx509 library

- - - - - - -

Functions

int hx509_context_init (hx509_context *context)
void hx509_context_free (hx509_context *context)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - -
void hx509_context_free (hx509_context *  context  ) 
-
-
- -

-Free the context allocated by hx509_context_init().

-

Parameters:
- - -
context context to be freed.
-
- -
-

- -

-
- - - - - - - - - -
int hx509_context_init (hx509_context *  context  ) 
-
-
- -

-Creates a hx509 context that most functions in the library uses. The context is only allowed to be used by one thread at each moment. Free the context with hx509_context_free().

-

Parameters:
- - -
context Returns a pointer to new hx509 context.
-
-
Returns:
Returns an hx509 error code.
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__ca.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__ca.html deleted file mode 100644 index db33fd76376..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__ca.html +++ /dev/null @@ -1,1179 +0,0 @@ - - -Heimdalx509library: hx509 CA functions - - - -

-keyhole logo -

- - - -
-

hx509 CA functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

int hx509_ca_tbs_init (hx509_context context, hx509_ca_tbs *tbs)
void hx509_ca_tbs_free (hx509_ca_tbs *tbs)
int hx509_ca_tbs_set_notBefore (hx509_context context, hx509_ca_tbs tbs, time_t t)
int hx509_ca_tbs_set_notAfter (hx509_context context, hx509_ca_tbs tbs, time_t t)
int hx509_ca_tbs_set_notAfter_lifetime (hx509_context context, hx509_ca_tbs tbs, time_t delta)
struct units * hx509_ca_tbs_template_units (void)
int hx509_ca_tbs_set_template (hx509_context context, hx509_ca_tbs tbs, int flags, hx509_cert cert)
int hx509_ca_tbs_set_ca (hx509_context context, hx509_ca_tbs tbs, int pathLenConstraint)
int hx509_ca_tbs_set_proxy (hx509_context context, hx509_ca_tbs tbs, int pathLenConstraint)
int hx509_ca_tbs_set_domaincontroller (hx509_context context, hx509_ca_tbs tbs)
int hx509_ca_tbs_set_spki (hx509_context context, hx509_ca_tbs tbs, const SubjectPublicKeyInfo *spki)
int hx509_ca_tbs_set_serialnumber (hx509_context context, hx509_ca_tbs tbs, const heim_integer *serialNumber)
int hx509_ca_tbs_add_eku (hx509_context context, hx509_ca_tbs tbs, const heim_oid *oid)
int hx509_ca_tbs_add_crl_dp_uri (hx509_context context, hx509_ca_tbs tbs, const char *uri, hx509_name issuername)
int hx509_ca_tbs_add_san_otherName (hx509_context context, hx509_ca_tbs tbs, const heim_oid *oid, const heim_octet_string *os)
int hx509_ca_tbs_add_san_pkinit (hx509_context context, hx509_ca_tbs tbs, const char *principal)
int hx509_ca_tbs_add_san_ms_upn (hx509_context context, hx509_ca_tbs tbs, const char *principal)
int hx509_ca_tbs_add_san_jid (hx509_context context, hx509_ca_tbs tbs, const char *jid)
int hx509_ca_tbs_add_san_hostname (hx509_context context, hx509_ca_tbs tbs, const char *dnsname)
int hx509_ca_tbs_add_san_rfc822name (hx509_context context, hx509_ca_tbs tbs, const char *rfc822Name)
int hx509_ca_tbs_set_subject (hx509_context context, hx509_ca_tbs tbs, hx509_name subject)
int hx509_ca_tbs_set_unique (hx509_context context, hx509_ca_tbs tbs, const heim_bit_string *subjectUniqueID, const heim_bit_string *issuerUniqueID)
int hx509_ca_tbs_subject_expand (hx509_context context, hx509_ca_tbs tbs, hx509_env env)
int hx509_ca_sign (hx509_context context, hx509_ca_tbs tbs, hx509_cert signer, hx509_cert *certificate)
int hx509_ca_sign_self (hx509_context context, hx509_ca_tbs tbs, hx509_private_key signer, hx509_cert *certificate)
-

Detailed Description

-See the Hx509 CA functions for description and examples.

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_sign (hx509_context  context,
hx509_ca_tbs  tbs,
hx509_cert  signer,
hx509_cert *  certificate 
)
-
-
- -

-Sign a to-be-signed certificate object with a issuer certificate.

-The caller needs to at least have called the following functions on the to-be-signed certificate object:

-

-When done the to-be-signed certificate object should be freed with hx509_ca_tbs_free().

-When creating self-signed certificate use hx509_ca_sign_self() instead.

-

Parameters:
- - - - - -
context A hx509 context.
tbs object to be signed.
signer the CA certificate object to sign with (need private key).
certificate return cerificate, free with hx509_cert_free().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_sign_self (hx509_context  context,
hx509_ca_tbs  tbs,
hx509_private_key  signer,
hx509_cert *  certificate 
)
-
-
- -

-Work just like hx509_ca_sign() but signs it-self.

-

Parameters:
- - - - - -
context A hx509 context.
tbs object to be signed.
signer private key to sign with.
certificate return cerificate, free with hx509_cert_free().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_add_crl_dp_uri (hx509_context  context,
hx509_ca_tbs  tbs,
const char *  uri,
hx509_name  issuername 
)
-
-
- -

-Add CRL distribution point URI to the to-be-signed certificate object.

-

Parameters:
- - - - - -
context A hx509 context.
tbs object to be signed.
uri uri to the CRL.
issuername name of the issuer.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -

-issuername not supported -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_add_eku (hx509_context  context,
hx509_ca_tbs  tbs,
const heim_oid *  oid 
)
-
-
- -

-An an extended key usage to the to-be-signed certificate object. Duplicates will detected and not added.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
oid extended key usage to add.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_add_san_hostname (hx509_context  context,
hx509_ca_tbs  tbs,
const char *  dnsname 
)
-
-
- -

-Add a Subject Alternative Name hostname to to-be-signed certificate object. A domain match starts with ., an exact match does not.

-Example of a an domain match: .domain.se matches the hostname host.domain.se.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
dnsname a hostame.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_add_san_jid (hx509_context  context,
hx509_ca_tbs  tbs,
const char *  jid 
)
-
-
- -

-Add a Jabber/XMPP jid Subject Alternative Name to the to-be-signed certificate object. The jid is an UTF8 string.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
jid string of an a jabber id in UTF8.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_add_san_ms_upn (hx509_context  context,
hx509_ca_tbs  tbs,
const char *  principal 
)
-
-
- -

-Add Microsoft UPN Subject Alternative Name to the to-be-signed certificate object. The principal string is a UTF8 string.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
principal Microsoft UPN string.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_add_san_otherName (hx509_context  context,
hx509_ca_tbs  tbs,
const heim_oid *  oid,
const heim_octet_string *  os 
)
-
-
- -

-Add Subject Alternative Name otherName to the to-be-signed certificate object.

-

Parameters:
- - - - - -
context A hx509 context.
tbs object to be signed.
oid the oid of the OtherName.
os data in the other name.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_add_san_pkinit (hx509_context  context,
hx509_ca_tbs  tbs,
const char *  principal 
)
-
-
- -

-Add Kerberos Subject Alternative Name to the to-be-signed certificate object. The principal string is a UTF8 string.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
principal Kerberos principal to add to the certificate.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_add_san_rfc822name (hx509_context  context,
hx509_ca_tbs  tbs,
const char *  rfc822Name 
)
-
-
- -

-Add a Subject Alternative Name rfc822 (email address) to to-be-signed certificate object.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
rfc822Name a string to a email address.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - -
void hx509_ca_tbs_free (hx509_ca_tbs *  tbs  ) 
-
-
- -

-Free an To Be Signed object.

-

Parameters:
- - -
tbs object to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_init (hx509_context  context,
hx509_ca_tbs *  tbs 
)
-
-
- -

-Allocate an to-be-signed certificate object that will be converted into an certificate.

-

Parameters:
- - - -
context A hx509 context.
tbs returned to-be-signed certicate object, free with hx509_ca_tbs_free().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_ca (hx509_context  context,
hx509_ca_tbs  tbs,
int  pathLenConstraint 
)
-
-
- -

-Make the to-be-signed certificate object a CA certificate. If the pathLenConstraint is negative path length constraint is used.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
pathLenConstraint path length constraint, negative, no constraint.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_domaincontroller (hx509_context  context,
hx509_ca_tbs  tbs 
)
-
-
- -

-Make the to-be-signed certificate object a windows domain controller certificate.

-

Parameters:
- - - -
context A hx509 context.
tbs object to be signed.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_notAfter (hx509_context  context,
hx509_ca_tbs  tbs,
time_t  t 
)
-
-
- -

-Set the absolute time when the certificate is valid to.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
t time when the certificate will expire
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_notAfter_lifetime (hx509_context  context,
hx509_ca_tbs  tbs,
time_t  delta 
)
-
-
- -

-Set the relative time when the certificiate is going to expire.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
delta seconds to the certificate is going to expire.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_notBefore (hx509_context  context,
hx509_ca_tbs  tbs,
time_t  t 
)
-
-
- -

-Set the absolute time when the certificate is valid from. If not set the current time will be used.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
t time the certificated will start to be valid
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_proxy (hx509_context  context,
hx509_ca_tbs  tbs,
int  pathLenConstraint 
)
-
-
- -

-Make the to-be-signed certificate object a proxy certificate. If the pathLenConstraint is negative path length constraint is used.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
pathLenConstraint path length constraint, negative, no constraint.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_serialnumber (hx509_context  context,
hx509_ca_tbs  tbs,
const heim_integer *  serialNumber 
)
-
-
- -

-Set the serial number to use for to-be-signed certificate object.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
serialNumber serial number to use for the to-be-signed certificate object.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_spki (hx509_context  context,
hx509_ca_tbs  tbs,
const SubjectPublicKeyInfo *  spki 
)
-
-
- -

-Set the subject public key info (SPKI) in the to-be-signed certificate object. SPKI is the public key and key related parameters in the certificate.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
spki subject public key info to use for the to-be-signed certificate object.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_subject (hx509_context  context,
hx509_ca_tbs  tbs,
hx509_name  subject 
)
-
-
- -

-Set the subject name of a to-be-signed certificate object.

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
subject the name to set a subject.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_template (hx509_context  context,
hx509_ca_tbs  tbs,
int  flags,
hx509_cert  cert 
)
-
-
- -

-Initialize the to-be-signed certificate object from a template certifiate.

-

Parameters:
- - - - - -
context A hx509 context.
tbs object to be signed.
flags bit field selecting what to copy from the template certifiate.
cert template certificate.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_set_unique (hx509_context  context,
hx509_ca_tbs  tbs,
const heim_bit_string *  subjectUniqueID,
const heim_bit_string *  issuerUniqueID 
)
-
-
- -

-Set the issuerUniqueID and subjectUniqueID

-These are only supposed to be used considered with version 2 certificates, replaced by the two extensions SubjectKeyIdentifier and IssuerKeyIdentifier. This function is to allow application using legacy protocol to issue them.

-

Parameters:
- - - - - -
context A hx509 context.
tbs object to be signed.
issuerUniqueID to be set
subjectUniqueID to be set
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ca_tbs_subject_expand (hx509_context  context,
hx509_ca_tbs  tbs,
hx509_env  env 
)
-
-
- -

-Expand the the subject name in the to-be-signed certificate object using hx509_name_expand().

-

Parameters:
- - - - -
context A hx509 context.
tbs object to be signed.
env enviroment variable to expand variables in the subject name, see hx509_env_init().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - -
struct units* hx509_ca_tbs_template_units (void   )  [read]
-
-
- -

-Make of template units, use to build flags argument to hx509_ca_tbs_set_template() with parse_units().

-

Returns:
an units structure.
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__cert.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__cert.html deleted file mode 100644 index 3ab1b584651..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__cert.html +++ /dev/null @@ -1,1425 +0,0 @@ - - -Heimdalx509library: hx509 certificate functions - - - -

-keyhole logo -

- - - -
-

hx509 certificate functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

int hx509_cert_init (hx509_context context, const Certificate *c, hx509_cert *cert)
int hx509_cert_init_data (hx509_context context, const void *ptr, size_t len, hx509_cert *cert)
void hx509_cert_free (hx509_cert cert)
hx509_cert hx509_cert_ref (hx509_cert cert)
void hx509_verify_ctx_f_allow_default_trustanchors (hx509_verify_ctx ctx, int boolean)
int hx509_cert_find_subjectAltName_otherName (hx509_context context, hx509_cert cert, const heim_oid *oid, hx509_octet_string_list *list)
int hx509_cert_cmp (hx509_cert p, hx509_cert q)
int hx509_cert_get_issuer (hx509_cert p, hx509_name *name)
int hx509_cert_get_subject (hx509_cert p, hx509_name *name)
int hx509_cert_get_base_subject (hx509_context context, hx509_cert c, hx509_name *name)
int hx509_cert_get_serialnumber (hx509_cert p, heim_integer *i)
time_t hx509_cert_get_notBefore (hx509_cert p)
time_t hx509_cert_get_notAfter (hx509_cert p)
int hx509_cert_get_SPKI (hx509_context context, hx509_cert p, SubjectPublicKeyInfo *spki)
int hx509_cert_get_SPKI_AlgorithmIdentifier (hx509_context context, hx509_cert p, AlgorithmIdentifier *alg)
int hx509_cert_get_issuer_unique_id (hx509_context context, hx509_cert p, heim_bit_string *issuer)
int hx509_cert_get_subject_unique_id (hx509_context context, hx509_cert p, heim_bit_string *subject)
int hx509_verify_hostname (hx509_context context, const hx509_cert cert, int flags, hx509_hostname_type type, const char *hostname, const struct sockaddr *sa, int sa_size)
hx509_cert_attribute hx509_cert_get_attribute (hx509_cert cert, const heim_oid *oid)
int hx509_cert_set_friendly_name (hx509_cert cert, const char *name)
const char * hx509_cert_get_friendly_name (hx509_cert cert)
int hx509_query_alloc (hx509_context context, hx509_query **q)
void hx509_query_match_option (hx509_query *q, hx509_query_option option)
int hx509_query_match_issuer_serial (hx509_query *q, const Name *issuer, const heim_integer *serialNumber)
int hx509_query_match_friendly_name (hx509_query *q, const char *name)
int hx509_query_match_eku (hx509_query *q, const heim_oid *eku)
int hx509_query_match_cmp_func (hx509_query *q, int(*func)(hx509_context, hx509_cert, void *), void *ctx)
void hx509_query_free (hx509_context context, hx509_query *q)
void hx509_query_statistic_file (hx509_context context, const char *fn)
void hx509_query_unparse_stats (hx509_context context, int printtype, FILE *out)
int hx509_cert_check_eku (hx509_context context, hx509_cert cert, const heim_oid *eku, int allow_any_eku)
int hx509_cert_binary (hx509_context context, hx509_cert c, heim_octet_string *os)
int hx509_print_cert (hx509_context context, hx509_cert cert, FILE *out)
-

Detailed Description

-See the The basic certificate for description and examples.

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_binary (hx509_context  context,
hx509_cert  c,
heim_octet_string *  os 
)
-
-
- -

-Encodes the hx509 certificate as a DER encode binary.

-

Parameters:
- - - - -
context A hx509 context.
c the certificate to encode.
os the encode certificate, set to NULL, 0 on case of error. Free the os->data with hx509_xfree().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_check_eku (hx509_context  context,
hx509_cert  cert,
const heim_oid *  eku,
int  allow_any_eku 
)
-
-
- -

-Check the extended key usage on the hx509 certificate.

-

Parameters:
- - - - - -
context A hx509 context.
cert A hx509 context.
eku the EKU to check for
allow_any_eku if the any EKU is set, allow that to be a substitute.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_cert_cmp (hx509_cert  p,
hx509_cert  q 
)
-
-
- -

-Compare to hx509 certificate object, useful for sorting.

-

Parameters:
- - - -
p a hx509 certificate object.
q a hx509 certificate object.
-
-
Returns:
0 the objects are the same, returns > 0 is p is "larger" then q, < 0 if p is "smaller" then q.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_find_subjectAltName_otherName (hx509_context  context,
hx509_cert  cert,
const heim_oid *  oid,
hx509_octet_string_list *  list 
)
-
-
- -

-Return a list of subjectAltNames specified by oid in the certificate. On error the

-The returned list of octet string should be freed with hx509_free_octet_string_list().

-

Parameters:
- - - - - -
context A hx509 context.
cert a hx509 certificate object.
oid an oid to for SubjectAltName.
list list of matching SubjectAltName.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - -
void hx509_cert_free (hx509_cert  cert  ) 
-
-
- -

-Free reference to the hx509 certificate object, if the refcounter reaches 0, the object if freed. Its allowed to pass in NULL.

-

Parameters:
- - -
cert the cert to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
hx509_cert_attribute hx509_cert_get_attribute (hx509_cert  cert,
const heim_oid *  oid 
)
-
-
- -

-Get an external attribute for the certificate, examples are friendly name and id.

-

Parameters:
- - - -
cert hx509 certificate object to search
oid an oid to search for.
-
-
Returns:
an hx509_cert_attribute, only valid as long as the certificate is referenced.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_get_base_subject (hx509_context  context,
hx509_cert  c,
hx509_name *  name 
)
-
-
- -

-Return the name of the base subject of the hx509 certificate. If the certiicate is a verified proxy certificate, the this function return the base certificate (root of the proxy chain). If the proxy certificate is not verified with the base certificate HX509_PROXY_CERTIFICATE_NOT_CANONICALIZED is returned.

-

Parameters:
- - - - -
context a hx509 context.
c a hx509 certificate object.
name a pointer to a hx509 name, should be freed by hx509_name_free(). See also hx509_cert_get_subject().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - -
const char* hx509_cert_get_friendly_name (hx509_cert  cert  ) 
-
-
- -

-Get friendly name of the certificate.

-

Parameters:
- - -
cert cert to get the friendly name from.
-
-
Returns:
an friendly name or NULL if there is. The friendly name is only valid as long as the certificate is referenced.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_cert_get_issuer (hx509_cert  p,
hx509_name *  name 
)
-
-
- -

-Return the name of the issuer of the hx509 certificate.

-

Parameters:
- - - -
p a hx509 certificate object.
name a pointer to a hx509 name, should be freed by hx509_name_free().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_get_issuer_unique_id (hx509_context  context,
hx509_cert  p,
heim_bit_string *  issuer 
)
-
-
- -

-Get a copy of the Issuer Unique ID

-

Parameters:
- - - - -
context a hx509_context
p a hx509 certificate
issuer the issuer id returned, free with der_free_bit_string()
-
-
Returns:
An hx509 error code, see hx509_get_error_string(). The error code HX509_EXTENSION_NOT_FOUND is returned if the certificate doesn't have a issuerUniqueID
- -
-

- -

-
- - - - - - - - - -
time_t hx509_cert_get_notAfter (hx509_cert  p  ) 
-
-
- -

-Get notAfter time of the certificate.

-

Parameters:
- - -
p a hx509 certificate object.
-
-
Returns:
return not after time.
- -
-

- -

-
- - - - - - - - - -
time_t hx509_cert_get_notBefore (hx509_cert  p  ) 
-
-
- -

-Get notBefore time of the certificate.

-

Parameters:
- - -
p a hx509 certificate object.
-
-
Returns:
return not before time
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_cert_get_serialnumber (hx509_cert  p,
heim_integer *  i 
)
-
-
- -

-Get serial number of the certificate.

-

Parameters:
- - - -
p a hx509 certificate object.
i serial number, should be freed ith der_free_heim_integer().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_get_SPKI (hx509_context  context,
hx509_cert  p,
SubjectPublicKeyInfo *  spki 
)
-
-
- -

-Get the SubjectPublicKeyInfo structure from the hx509 certificate.

-

Parameters:
- - - - -
context a hx509 context.
p a hx509 certificate object.
spki SubjectPublicKeyInfo, should be freed with free_SubjectPublicKeyInfo().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_get_SPKI_AlgorithmIdentifier (hx509_context  context,
hx509_cert  p,
AlgorithmIdentifier *  alg 
)
-
-
- -

-Get the AlgorithmIdentifier from the hx509 certificate.

-

Parameters:
- - - - -
context a hx509 context.
p a hx509 certificate object.
alg AlgorithmIdentifier, should be freed with free_AlgorithmIdentifier(). The algorithmidentifier is typicly rsaEncryption, or id-ecPublicKey, or some other public key mechanism.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_cert_get_subject (hx509_cert  p,
hx509_name *  name 
)
-
-
- -

-Return the name of the subject of the hx509 certificate.

-

Parameters:
- - - -
p a hx509 certificate object.
name a pointer to a hx509 name, should be freed by hx509_name_free(). See also hx509_cert_get_base_subject().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_get_subject_unique_id (hx509_context  context,
hx509_cert  p,
heim_bit_string *  subject 
)
-
-
- -

-Get a copy of the Subect Unique ID

-

Parameters:
- - - - -
context a hx509_context
p a hx509 certificate
subject the subject id returned, free with der_free_bit_string()
-
-
Returns:
An hx509 error code, see hx509_get_error_string(). The error code HX509_EXTENSION_NOT_FOUND is returned if the certificate doesn't have a subjectUniqueID
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_init (hx509_context  context,
const Certificate *  c,
hx509_cert *  cert 
)
-
-
- -

-Allocate and init an hx509 certificate object from the decoded certificate `c´.

-

Parameters:
- - - - -
context A hx509 context.
c 
cert 
-
-
Returns:
Returns an hx509 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_init_data (hx509_context  context,
const void *  ptr,
size_t  len,
hx509_cert *  cert 
)
-
-
- -

-Just like hx509_cert_init(), but instead of a decode certificate takes an pointer and length to a memory region that contains a DER/BER encoded certificate.

-If the memory region doesn't contain just the certificate and nothing more the function will fail with HX509_EXTRA_DATA_AFTER_STRUCTURE.

-

Parameters:
- - - - - -
context A hx509 context.
ptr pointer to memory region containing encoded certificate.
len length of memory region.
cert a return pointer to a hx509 certificate object, will contain NULL on error.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - -
hx509_cert hx509_cert_ref (hx509_cert  cert  ) 
-
-
- -

-Add a reference to a hx509 certificate object.

-

Parameters:
- - -
cert a pointer to an hx509 certificate object.
-
-
Returns:
the same object as is passed in.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_cert_set_friendly_name (hx509_cert  cert,
const char *  name 
)
-
-
- -

-Set the friendly name on the certificate.

-

Parameters:
- - - -
cert The certificate to set the friendly name on
name Friendly name.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_print_cert (hx509_context  context,
hx509_cert  cert,
FILE *  out 
)
-
-
- -

-Print a simple representation of a certificate

-

Parameters:
- - - - -
context A hx509 context, can be NULL
cert certificate to print
out the stdio output stream, if NULL, stdout is used
-
-
Returns:
An hx509 error code
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_query_alloc (hx509_context  context,
hx509_query **  q 
)
-
-
- -

-Allocate an query controller. Free using hx509_query_free().

-

Parameters:
- - - -
context A hx509 context.
q return pointer to a hx509_query.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_query_free (hx509_context  context,
hx509_query *  q 
)
-
-
- -

-Free the query controller.

-

Parameters:
- - - -
context A hx509 context.
q a pointer to the query controller.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_query_match_cmp_func (hx509_query *  q,
int(*)(hx509_context, hx509_cert, void *)  func,
void *  ctx 
)
-
-
- -

-Set the query controller to match using a specific match function.

-

Parameters:
- - - - -
q a hx509 query controller.
func function to use for matching, if the argument is NULL, the match function is removed.
ctx context passed to the function.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_query_match_eku (hx509_query *  q,
const heim_oid *  eku 
)
-
-
- -

-Set the query controller to require an one specific EKU (extended key usage). Any previous EKU matching is overwitten. If NULL is passed in as the eku, the EKU requirement is reset.

-

Parameters:
- - - -
q a hx509 query controller.
eku an EKU to match on.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_query_match_friendly_name (hx509_query *  q,
const char *  name 
)
-
-
- -

-Set the query controller to match on a friendly name

-

Parameters:
- - - -
q a hx509 query controller.
name a friendly name to match on
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_query_match_issuer_serial (hx509_query *  q,
const Name *  issuer,
const heim_integer *  serialNumber 
)
-
-
- -

-Set the issuer and serial number of match in the query controller. The function make copies of the isser and serial number.

-

Parameters:
- - - - -
q a hx509 query controller
issuer issuer to search for
serialNumber the serialNumber of the issuer.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_query_match_option (hx509_query *  q,
hx509_query_option  option 
)
-
-
- -

-Set match options for the hx509 query controller.

-

Parameters:
- - - -
q query controller.
option options to control the query controller.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_query_statistic_file (hx509_context  context,
const char *  fn 
)
-
-
- -

-Set a statistic file for the query statistics.

-

Parameters:
- - - -
context A hx509 context.
fn statistics file name
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
void hx509_query_unparse_stats (hx509_context  context,
int  printtype,
FILE *  out 
)
-
-
- -

-Unparse the statistics file and print the result on a FILE descriptor.

-

Parameters:
- - - - -
context A hx509 context.
printtype tyep to print
out the FILE to write the data on.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_verify_ctx_f_allow_default_trustanchors (hx509_verify_ctx  ctx,
int  boolean 
)
-
-
- -

-Allow using the operating system builtin trust anchors if no other trust anchors are configured.

-

Parameters:
- - - -
ctx a verification context
boolean if non zero, useing the operating systems builtin trust anchors.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_verify_hostname (hx509_context  context,
const hx509_cert  cert,
int  flags,
hx509_hostname_type  type,
const char *  hostname,
const struct sockaddr *  sa,
int  sa_size 
)
-
-
- -

-Verify that the certificate is allowed to be used for the hostname and address.

-

Parameters:
- - - - - - - - -
context A hx509 context.
cert the certificate to match with
flags Flags to modify the behavior:
    -
  • HX509_VHN_F_ALLOW_NO_MATCH no match is ok
-
type type of hostname:
    -
  • HX509_HN_HOSTNAME for plain hostname.
  • HX509_HN_DNSSRV for DNS SRV names.
-
hostname the hostname to check
sa address of the host
sa_size length of address
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__cms.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__cms.html deleted file mode 100644 index 8d06ead2705..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__cms.html +++ /dev/null @@ -1,504 +0,0 @@ - - -Heimdalx509library: hx509 CMS/pkcs7 functions - - - -

-keyhole logo -

- - - -
-

hx509 CMS/pkcs7 functions

- - - - - - - - - - - - - - -

Functions

int hx509_cms_wrap_ContentInfo (const heim_oid *oid, const heim_octet_string *buf, heim_octet_string *res)
int hx509_cms_unwrap_ContentInfo (const heim_octet_string *in, heim_oid *oid, heim_octet_string *out, int *have_data)
int hx509_cms_unenvelope (hx509_context context, hx509_certs certs, int flags, const void *data, size_t length, const heim_octet_string *encryptedContent, time_t time_now, heim_oid *contentType, heim_octet_string *content)
int hx509_cms_envelope_1 (hx509_context context, int flags, hx509_cert cert, const void *data, size_t length, const heim_oid *encryption_type, const heim_oid *contentType, heim_octet_string *content)
int hx509_cms_verify_signed (hx509_context context, hx509_verify_ctx ctx, unsigned int flags, const void *data, size_t length, const heim_octet_string *signedContent, hx509_certs pool, heim_oid *contentType, heim_octet_string *content, hx509_certs *signer_certs)
int hx509_cms_create_signed_1 (hx509_context context, int flags, const heim_oid *eContentType, const void *data, size_t length, const AlgorithmIdentifier *digest_alg, hx509_cert cert, hx509_peer_info peer, hx509_certs anchors, hx509_certs pool, heim_octet_string *signed_data)
-

Detailed Description

-See the CMS/PKCS7 message functions. for description and examples.

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cms_create_signed_1 (hx509_context  context,
int  flags,
const heim_oid *  eContentType,
const void *  data,
size_t  length,
const AlgorithmIdentifier *  digest_alg,
hx509_cert  cert,
hx509_peer_info  peer,
hx509_certs  anchors,
hx509_certs  pool,
heim_octet_string *  signed_data 
)
-
-
- -

-Decode SignedData and verify that the signature is correct.

-

Parameters:
- - - - - - - - - - - - -
context A hx509 context.
flags 
eContentType the type of the data.
data data to sign
length length of the data that data point to.
digest_alg digest algorithm to use, use NULL to get the default or the peer determined algorithm.
cert certificate to use for sign the data.
peer info about the peer the message to send the message to, like what digest algorithm to use.
anchors trust anchors that the client will use, used to polulate the certificates included in the message
pool certificates to use in try to build the path to the trust anchors.
signed_data the output of the function, free with der_free_octet_string().
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cms_envelope_1 (hx509_context  context,
int  flags,
hx509_cert  cert,
const void *  data,
size_t  length,
const heim_oid *  encryption_type,
const heim_oid *  contentType,
heim_octet_string *  content 
)
-
-
- -

-Encrypt end encode EnvelopedData.

-Encrypt and encode EnvelopedData. The data is encrypted with a random key and the the random key is encrypted with the certificates private key. This limits what private key type can be used to RSA.

-

Parameters:
- - - - - - - - - -
context A hx509 context.
flags flags to control the behavior.
    -
  • HX509_CMS_EV_NO_KU_CHECK - Dont check KU on certificate
  • HX509_CMS_EV_ALLOW_WEAK - Allow weak crytpo
  • HX509_CMS_EV_ID_NAME - prefer issuer name and serial number
-
cert Certificate to encrypt the EnvelopedData encryption key with.
data pointer the data to encrypt.
length length of the data that data point to.
encryption_type Encryption cipher to use for the bulk data, use NULL to get default.
contentType type of the data that is encrypted
content the output of the function, free with der_free_octet_string().
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cms_unenvelope (hx509_context  context,
hx509_certs  certs,
int  flags,
const void *  data,
size_t  length,
const heim_octet_string *  encryptedContent,
time_t  time_now,
heim_oid *  contentType,
heim_octet_string *  content 
)
-
-
- -

-Decode and unencrypt EnvelopedData.

-Extract data and parameteres from from the EnvelopedData. Also supports using detached EnvelopedData.

-

Parameters:
- - - - - - - - - - -
context A hx509 context.
certs Certificate that can decrypt the EnvelopedData encryption key.
flags HX509_CMS_UE flags to control the behavior.
data pointer the structure the contains the DER/BER encoded EnvelopedData stucture.
length length of the data that data point to.
encryptedContent in case of detached signature, this contains the actual encrypted data, othersize its should be NULL.
time_now set the current time, if zero the library uses now as the date.
contentType output type oid, should be freed with der_free_oid().
content the data, free with der_free_octet_string().
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cms_unwrap_ContentInfo (const heim_octet_string *  in,
heim_oid *  oid,
heim_octet_string *  out,
int *  have_data 
)
-
-
- -

-Decode an ContentInfo and unwrap data and oid it.

-

Parameters:
- - - - - -
in the encoded buffer.
oid type of the content.
out data to be wrapped.
have_data since the data is optional, this flags show dthe diffrence between no data and the zero length data.
-
-
Returns:
Returns an hx509 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cms_verify_signed (hx509_context  context,
hx509_verify_ctx  ctx,
unsigned int  flags,
const void *  data,
size_t  length,
const heim_octet_string *  signedContent,
hx509_certs  pool,
heim_oid *  contentType,
heim_octet_string *  content,
hx509_certs *  signer_certs 
)
-
-
- -

-Decode SignedData and verify that the signature is correct.

-

Parameters:
- - - - - - - - - - - -
context A hx509 context.
ctx a hx509 verify context.
flags to control the behaivor of the function.
    -
  • HX509_CMS_VS_NO_KU_CHECK - Don't check KeyUsage
  • HX509_CMS_VS_ALLOW_DATA_OID_MISMATCH - allow oid mismatch
  • HX509_CMS_VS_ALLOW_ZERO_SIGNER - no signer, see below.
-
data pointer to CMS SignedData encoded data.
length length of the data that data point to.
signedContent external data used for signature.
pool certificate pool to build certificates paths.
contentType free with der_free_oid().
content the output of the function, free with der_free_octet_string().
signer_certs list of the cerficates used to sign this request, free with hx509_certs_free().
-
- -

-If HX509_CMS_VS_NO_KU_CHECK is set, allow more liberal search for matching certificates by not considering KeyUsage bits on the certificates.

-If HX509_CMS_VS_ALLOW_DATA_OID_MISMATCH, allow encapContentInfo mismatch with the oid in signedAttributes (or if no signedAttributes where use, pkcs7-data oid). This is only needed to work with broken CMS implementations that doesn't follow CMS signedAttributes rules.

-If HX509_CMS_VS_NO_VALIDATE flags is set, do not verify the signing certificates and leave that up to the caller.

-If HX509_CMS_VS_ALLOW_ZERO_SIGNER is set, allow empty SignerInfo (no signatures). If SignedData have no signatures, the function will return 0 with signer_certs set to NULL. Zero signers is allowed by the standard, but since its only useful in corner cases, it make into a flag that the caller have to turn on. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cms_wrap_ContentInfo (const heim_oid *  oid,
const heim_octet_string *  buf,
heim_octet_string *  res 
)
-
-
- -

-Wrap data and oid in a ContentInfo and encode it.

-

Parameters:
- - - - -
oid type of the content.
buf data to be wrapped. If a NULL pointer is passed in, the optional content field in the ContentInfo is not going be filled in.
res the encoded buffer, the result should be freed with der_free_octet_string().
-
-
Returns:
Returns an hx509 error code.
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__crypto.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__crypto.html deleted file mode 100644 index b3e51828328..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__crypto.html +++ /dev/null @@ -1,92 +0,0 @@ - - -Heimdalx509library: hx509 crypto functions - - - -

-keyhole logo -

- - - -
-

hx509 crypto functions

- - - - -

Functions

int hx509_verify_signature (hx509_context context, const hx509_cert signer, const AlgorithmIdentifier *alg, const heim_octet_string *data, const heim_octet_string *sig)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_verify_signature (hx509_context  context,
const hx509_cert  signer,
const AlgorithmIdentifier *  alg,
const heim_octet_string *  data,
const heim_octet_string *  sig 
)
-
-
- -

-Verify a signature made using the private key of an certificate.

-

Parameters:
- - - - - - -
context A hx509 context.
signer the certificate that made the signature.
alg algorthm that was used to sign the data.
data the data that was signed.
sig the sigature to verify.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__env.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__env.html deleted file mode 100644 index 11f360eea01..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__env.html +++ /dev/null @@ -1,311 +0,0 @@ - - -Heimdalx509library: hx509 enviroment functions - - - -

-keyhole logo -

- - - -
-

hx509 enviroment functions

- - - - - - - - - - - - - - -

Functions

int hx509_env_add (hx509_context context, hx509_env *env, const char *key, const char *value)
int hx509_env_add_binding (hx509_context context, hx509_env *env, const char *key, hx509_env list)
const char * hx509_env_lfind (hx509_context context, hx509_env env, const char *key, size_t len)
const char * hx509_env_find (hx509_context context, hx509_env env, const char *key)
hx509_env hx509_env_find_binding (hx509_context context, hx509_env env, const char *key)
void hx509_env_free (hx509_env *env)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_env_add (hx509_context  context,
hx509_env *  env,
const char *  key,
const char *  value 
)
-
-
- -

-Add a new key/value pair to the hx509_env.

-

Parameters:
- - - - - -
context A hx509 context.
env enviroment to add the enviroment variable too.
key key to add
value value to add
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_env_add_binding (hx509_context  context,
hx509_env *  env,
const char *  key,
hx509_env  list 
)
-
-
- -

-Add a new key/binding pair to the hx509_env.

-

Parameters:
- - - - - -
context A hx509 context.
env enviroment to add the enviroment variable too.
key key to add
list binding list to add
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
const char* hx509_env_find (hx509_context  context,
hx509_env  env,
const char *  key 
)
-
-
- -

-Search the hx509_env for a key.

-

Parameters:
- - - - -
context A hx509 context.
env enviroment to add the enviroment variable too.
key key to search for.
-
-
Returns:
the value if the key is found, NULL otherwise.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
hx509_env hx509_env_find_binding (hx509_context  context,
hx509_env  env,
const char *  key 
)
-
-
- -

-Search the hx509_env for a binding.

-

Parameters:
- - - - -
context A hx509 context.
env enviroment to add the enviroment variable too.
key key to search for.
-
-
Returns:
the binding if the key is found, NULL if not found.
- -
-

- -

-
- - - - - - - - - -
void hx509_env_free (hx509_env *  env  ) 
-
-
- -

-Free an hx509_env enviroment context.

-

Parameters:
- - -
env the enviroment to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const char* hx509_env_lfind (hx509_context  context,
hx509_env  env,
const char *  key,
size_t  len 
)
-
-
- -

-Search the hx509_env for a length based key.

-

Parameters:
- - - - - -
context A hx509 context.
env enviroment to add the enviroment variable too.
key key to search for.
len length of key.
-
-
Returns:
the value if the key is found, NULL otherwise.
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__error.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__error.html deleted file mode 100644 index a6ab7d0aec9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__error.html +++ /dev/null @@ -1,308 +0,0 @@ - - -Heimdalx509library: hx509 error functions - - - -

-keyhole logo -

- - - -
-

hx509 error functions

- - - - - - - - - - - - - - -

Functions

void hx509_clear_error_string (hx509_context context)
void hx509_set_error_stringv (hx509_context context, int flags, int code, const char *fmt, va_list ap)
void hx509_set_error_string (hx509_context context, int flags, int code, const char *fmt,...)
char * hx509_get_error_string (hx509_context context, int error_code)
void hx509_free_error_string (char *str)
void hx509_err (hx509_context context, int exit_code, int error_code, const char *fmt,...)
-

Detailed Description

-See the Hx509 error reporting functions for description and examples.

Function Documentation

- -
-
- - - - - - - - - -
void hx509_clear_error_string (hx509_context  context  ) 
-
-
- -

-Resets the error strings the hx509 context.

-

Parameters:
- - -
context A hx509 context.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void hx509_err (hx509_context  context,
int  exit_code,
int  error_code,
const char *  fmt,
  ... 
)
-
-
- -

-Print error message and fatally exit from error code

-

Parameters:
- - - - - - -
context A hx509 context.
exit_code exit() code from process.
error_code Error code for the reason to exit.
fmt format string with the exit message.
... argument to format string.
-
- -
-

- -

-
- - - - - - - - - -
void hx509_free_error_string (char *  str  ) 
-
-
- -

-Free error string returned by hx509_get_error_string().

-

Parameters:
- - -
str error string to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
char* hx509_get_error_string (hx509_context  context,
int  error_code 
)
-
-
- -

-Get an error string from context associated with error_code.

-

Parameters:
- - - -
context A hx509 context.
error_code Get error message for this error code.
-
-
Returns:
error string, free with hx509_free_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void hx509_set_error_string (hx509_context  context,
int  flags,
int  code,
const char *  fmt,
  ... 
)
-
-
- -

-See hx509_set_error_stringv().

-

Parameters:
- - - - - - -
context A hx509 context.
flags 
    -
  • HX509_ERROR_APPEND appends the error string to the old messages (code is updated).
-
code error code related to error message
fmt error message format
... arguments to error message format
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void hx509_set_error_stringv (hx509_context  context,
int  flags,
int  code,
const char *  fmt,
va_list  ap 
)
-
-
- -

-Add an error message to the hx509 context.

-

Parameters:
- - - - - - -
context A hx509 context.
flags 
    -
  • HX509_ERROR_APPEND appends the error string to the old messages (code is updated).
-
code error code related to error message
fmt error message format
ap arguments to error message format
-
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__keyset.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__keyset.html deleted file mode 100644 index 35e9bac9537..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__keyset.html +++ /dev/null @@ -1,781 +0,0 @@ - - -Heimdalx509library: hx509 certificate store functions - - - -

-keyhole logo -

- - - -
-

hx509 certificate store functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

int hx509_certs_init (hx509_context context, const char *name, int flags, hx509_lock lock, hx509_certs *certs)
int hx509_certs_store (hx509_context context, hx509_certs certs, int flags, hx509_lock lock)
void hx509_certs_free (hx509_certs *certs)
int hx509_certs_start_seq (hx509_context context, hx509_certs certs, hx509_cursor *cursor)
int hx509_certs_next_cert (hx509_context context, hx509_certs certs, hx509_cursor cursor, hx509_cert *cert)
int hx509_certs_end_seq (hx509_context context, hx509_certs certs, hx509_cursor cursor)
int hx509_certs_iter_f (hx509_context context, hx509_certs certs, int(*func)(hx509_context, void *, hx509_cert), void *ctx)
int hx509_ci_print_names (hx509_context context, void *ctx, hx509_cert c)
int hx509_certs_add (hx509_context context, hx509_certs certs, hx509_cert cert)
int hx509_certs_find (hx509_context context, hx509_certs certs, const hx509_query *q, hx509_cert *r)
int hx509_certs_filter (hx509_context context, hx509_certs certs, const hx509_query *q, hx509_certs *result)
int hx509_certs_merge (hx509_context context, hx509_certs to, hx509_certs from)
int hx509_certs_append (hx509_context context, hx509_certs to, hx509_lock lock, const char *name)
int hx509_get_one_cert (hx509_context context, hx509_certs certs, hx509_cert *c)
int hx509_certs_info (hx509_context context, hx509_certs certs, int(*func)(void *, const char *), void *ctx)
-

Detailed Description

-See the Certificate store operations for description and examples.

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_add (hx509_context  context,
hx509_certs  certs,
hx509_cert  cert 
)
-
-
- -

-Add a certificate to the certificiate store.

-The receiving keyset certs will either increase reference counter of the cert or make a deep copy, either way, the caller needs to free the cert itself.

-

Parameters:
- - - - -
context a hx509 context.
certs certificate store to add the certificate to.
cert certificate to add.
-
-
Returns:
Returns an hx509 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_append (hx509_context  context,
hx509_certs  to,
hx509_lock  lock,
const char *  name 
)
-
-
- -

-Same a hx509_certs_merge() but use a lock and name to describe the from source.

-

Parameters:
- - - - - -
context a hx509 context.
to the store to merge into.
lock a lock that unlocks the certificates store, use NULL to select no password/certifictes/prompt lock (see Locking and unlocking certificates and encrypted data.).
name name of the source store
-
-
Returns:
Returns an hx509 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_end_seq (hx509_context  context,
hx509_certs  certs,
hx509_cursor  cursor 
)
-
-
- -

-End the iteration over certificates.

-

Parameters:
- - - - -
context a hx509 context.
certs certificate store to iterate over.
cursor cursor that will keep track of progress, freed.
-
-
Returns:
Returns an hx509 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_filter (hx509_context  context,
hx509_certs  certs,
const hx509_query *  q,
hx509_certs *  result 
)
-
-
- -

-Filter certificate matching the query.

-

Parameters:
- - - - - -
context a hx509 context.
certs certificate store to search.
q query allocated with hx509 query functions functions.
result the filtered certificate store, caller must free with hx509_certs_free().
-
-
Returns:
Returns an hx509 error code.
- -

-Return HX509_CERT_NOT_FOUND if no certificate in certs matched the query. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_find (hx509_context  context,
hx509_certs  certs,
const hx509_query *  q,
hx509_cert *  r 
)
-
-
- -

-Find a certificate matching the query.

-

Parameters:
- - - - - -
context a hx509 context.
certs certificate store to search.
q query allocated with hx509 query functions functions.
r return certificate (or NULL on error), should be freed with hx509_cert_free().
-
-
Returns:
Returns an hx509 error code.
- -

-Return HX509_CERT_NOT_FOUND if no certificate in certs matched the query. -

-

- -

-
- - - - - - - - - -
void hx509_certs_free (hx509_certs *  certs  ) 
-
-
- -

-Free a certificate store.

-

Parameters:
- - -
certs certificate store to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_info (hx509_context  context,
hx509_certs  certs,
int(*)(void *, const char *)  func,
void *  ctx 
)
-
-
- -

-Print some info about the certificate store.

-

Parameters:
- - - - - -
context a hx509 context.
certs certificate store to print information about.
func function that will get each line of the information, if NULL is used the data is printed on a FILE descriptor that should be passed in ctx, if ctx also is NULL, stdout is used.
ctx parameter to func.
-
-
Returns:
Returns an hx509 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_init (hx509_context  context,
const char *  name,
int  flags,
hx509_lock  lock,
hx509_certs *  certs 
)
-
-
- -

-Open or creates a new hx509 certificate store.

-

Parameters:
- - - - - - -
context A hx509 context
name name of the store, format is TYPE:type-specific-string, if NULL is used the MEMORY store is used.
flags list of flags:
    -
  • HX509_CERTS_CREATE create a new keystore of the specific TYPE.
  • HX509_CERTS_UNPROTECT_ALL fails if any private key failed to be extracted.
-
lock a lock that unlocks the certificates store, use NULL to select no password/certifictes/prompt lock (see Locking and unlocking certificates and encrypted data.).
certs return pointer, free with hx509_certs_free().
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_iter_f (hx509_context  context,
hx509_certs  certs,
int(*)(hx509_context, void *, hx509_cert)  func,
void *  ctx 
)
-
-
- -

-Iterate over all certificates in a keystore and call an function for each fo them.

-

Parameters:
- - - - - -
context a hx509 context.
certs certificate store to iterate over.
func function to call for each certificate. The function should return non-zero to abort the iteration, that value is passed back to the caller of hx509_certs_iter_f().
ctx context variable that will passed to the function.
-
-
Returns:
Returns an hx509 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_merge (hx509_context  context,
hx509_certs  to,
hx509_certs  from 
)
-
-
- -

-Merge a certificate store into another. The from store is keep intact.

-

Parameters:
- - - - -
context a hx509 context.
to the store to merge into.
from the store to copy the object from.
-
-
Returns:
Returns an hx509 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_next_cert (hx509_context  context,
hx509_certs  certs,
hx509_cursor  cursor,
hx509_cert *  cert 
)
-
-
- -

-Get next ceritificate from the certificate keystore pointed out by cursor.

-

Parameters:
- - - - - -
context a hx509 context.
certs certificate store to iterate over.
cursor cursor that keeps track of progress.
cert return certificate next in store, NULL if the store contains no more certificates. Free with hx509_cert_free().
-
-
Returns:
Returns an hx509 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_start_seq (hx509_context  context,
hx509_certs  certs,
hx509_cursor *  cursor 
)
-
-
- -

-Start the integration

-

Parameters:
- - - - -
context a hx509 context.
certs certificate store to iterate over
cursor cursor that will keep track of progress, free with hx509_certs_end_seq().
-
-
Returns:
Returns an hx509 error code. HX509_UNSUPPORTED_OPERATION is returned if the certificate store doesn't support the iteration operation.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_certs_store (hx509_context  context,
hx509_certs  certs,
int  flags,
hx509_lock  lock 
)
-
-
- -

-Write the certificate store to stable storage.

-

Parameters:
- - - - - -
context A hx509 context.
certs a certificate store to store.
flags currently unused, use 0.
lock a lock that unlocks the certificates store, use NULL to select no password/certifictes/prompt lock (see Locking and unlocking certificates and encrypted data.).
-
-
Returns:
Returns an hx509 error code. HX509_UNSUPPORTED_OPERATION if the certificate store doesn't support the store operation.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ci_print_names (hx509_context  context,
void *  ctx,
hx509_cert  c 
)
-
-
- -

-Iterate over all certificates in a keystore and call an function for each fo them.

-

Parameters:
- - - - -
context a hx509 context.
certs certificate store to iterate over.
func function to call for each certificate. The function should return non-zero to abort the iteration, that value is passed back to the caller of hx509_certs_iter().
-
-
Returns:
Returns an hx509 error code. Function to use to hx509_certs_iter_f() as a function argument, the ctx variable to hx509_certs_iter_f() should be a FILE file descriptor.
-
Parameters:
- - - - -
context a hx509 context.
ctx used by hx509_certs_iter_f().
c a certificate
-
-
Returns:
Returns an hx509 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_get_one_cert (hx509_context  context,
hx509_certs  certs,
hx509_cert *  c 
)
-
-
- -

-Get one random certificate from the certificate store.

-

Parameters:
- - - - -
context a hx509 context.
certs a certificate store to get the certificate from.
c return certificate, should be freed with hx509_cert_free().
-
-
Returns:
Returns an hx509 error code.
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__lock.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__lock.html deleted file mode 100644 index b16fb77c52d..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__lock.html +++ /dev/null @@ -1,29 +0,0 @@ - - -Heimdalx509library: hx509 lock functions - - - -

-keyhole logo -

- - - -
-

hx509 lock functions

- -
-See the Locking and unlocking certificates and encrypted data. for description and examples.
-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__misc.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__misc.html deleted file mode 100644 index bde526516d0..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__misc.html +++ /dev/null @@ -1,88 +0,0 @@ - - -Heimdalx509library: hx509 misc functions - - - -

-keyhole logo -

- - - -
-

hx509 misc functions

- - - - - - -

Functions

void hx509_free_octet_string_list (hx509_octet_string_list *list)
void hx509_xfree (void *ptr)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - -
void hx509_free_octet_string_list (hx509_octet_string_list *  list  ) 
-
-
- -

-Free a list of octet strings returned by another hx509 library function.

-

Parameters:
- - -
list list to be freed.
-
- -
-

- -

-
- - - - - - - - - -
void hx509_xfree (void *  ptr  ) 
-
-
- -

-Free a data element allocated in the library.

-

Parameters:
- - -
ptr data to be freed.
-
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__name.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__name.html deleted file mode 100644 index e8e3146d23d..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__name.html +++ /dev/null @@ -1,470 +0,0 @@ - - -Heimdalx509library: hx509 name functions - - - -

-keyhole logo -

- - - -
-

hx509 name functions

- - - - - - - - - - - - - - - - - - - - - - - - -

Functions

int hx509_name_to_string (const hx509_name name, char **str)
int hx509_name_cmp (hx509_name n1, hx509_name n2)
int hx509_parse_name (hx509_context context, const char *str, hx509_name *name)
int hx509_name_copy (hx509_context context, const hx509_name from, hx509_name *to)
int hx509_name_to_Name (const hx509_name from, Name *to)
int hx509_name_expand (hx509_context context, hx509_name name, hx509_env env)
void hx509_name_free (hx509_name *name)
int hx509_unparse_der_name (const void *data, size_t length, char **str)
int hx509_name_binary (const hx509_name name, heim_octet_string *os)
int hx509_name_is_null_p (const hx509_name name)
int hx509_general_name_unparse (GeneralName *name, char **str)
-

Detailed Description

-See the PKIX/X.509 Names for description and examples.

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
int hx509_general_name_unparse (GeneralName *  name,
char **  str 
)
-
-
- -

-Unparse the hx509 name in name into a string.

-

Parameters:
- - - -
name the name to print
str an allocated string returns the name in string form
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_name_binary (const hx509_name  name,
heim_octet_string *  os 
)
-
-
- -

-Convert a hx509_name object to DER encoded name.

-

Parameters:
- - - -
name name to concert
os data to a DER encoded name, free the resulting octet string with hx509_xfree(os->data).
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_name_cmp (hx509_name  n1,
hx509_name  n2 
)
-
-
- -

-Compare to hx509 name object, useful for sorting.

-

Parameters:
- - - -
n1 a hx509 name object.
n2 a hx509 name object.
-
-
Returns:
0 the objects are the same, returns > 0 is n2 is "larger" then n2, < 0 if n1 is "smaller" then n2.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_name_copy (hx509_context  context,
const hx509_name  from,
hx509_name *  to 
)
-
-
- -

-Copy a hx509 name object.

-

Parameters:
- - - - -
context A hx509 cotext.
from the name to copy from
to the name to copy to
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_name_expand (hx509_context  context,
hx509_name  name,
hx509_env  env 
)
-
-
- -

-Expands variables in the name using env. Variables are on the form ${name}. Useful when dealing with certificate templates.

-

Parameters:
- - - - -
context A hx509 cotext.
name the name to expand.
env environment variable to expand.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -

-Only UTF8String rdnSequence names are allowed -

-

- -

-
- - - - - - - - - -
void hx509_name_free (hx509_name *  name  ) 
-
-
- -

-Free a hx509 name object, upond return *name will be NULL.

-

Parameters:
- - -
name a hx509 name object to be freed.
-
- -
-

- -

-
- - - - - - - - - -
int hx509_name_is_null_p (const hx509_name  name  ) 
-
-
- -

-Unparse the hx509 name in name into a string.

-

Parameters:
- - -
name the name to check if its empty/null.
-
-
Returns:
non zero if the name is empty/null.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_name_to_Name (const hx509_name  from,
Name *  to 
)
-
-
- -

-Convert a hx509_name into a Name.

-

Parameters:
- - - -
from the name to copy from
to the name to copy to
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_name_to_string (const hx509_name  name,
char **  str 
)
-
-
- -

-Convert the hx509 name object into a printable string. The resulting string should be freed with free().

-

Parameters:
- - - -
name name to print
str the string to return
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_parse_name (hx509_context  context,
const char *  str,
hx509_name *  name 
)
-
-
- -

-Parse a string into a hx509 name object.

-

Parameters:
- - - - -
context A hx509 context.
str a string to parse.
name the resulting object, NULL in case of error.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_unparse_der_name (const void *  data,
size_t  length,
char **  str 
)
-
-
- -

-Convert a DER encoded name info a string.

-

Parameters:
- - - - -
data data to a DER/BER encoded name
length length of data
str the resulting string, is NULL on failure.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__peer.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__peer.html deleted file mode 100644 index 9df8e142cd8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__peer.html +++ /dev/null @@ -1,237 +0,0 @@ - - -Heimdalx509library: hx509 certificate selecting functions - - - -

-keyhole logo -

- - - -
-

hx509 certificate selecting functions

- - - - - - - - - - - - -

Functions

int hx509_peer_info_alloc (hx509_context context, hx509_peer_info *peer)
void hx509_peer_info_free (hx509_peer_info peer)
int hx509_peer_info_set_cert (hx509_peer_info peer, hx509_cert cert)
int hx509_peer_info_add_cms_alg (hx509_context context, hx509_peer_info peer, const AlgorithmIdentifier *val)
int hx509_peer_info_set_cms_algs (hx509_context context, hx509_peer_info peer, const AlgorithmIdentifier *val, size_t len)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_peer_info_add_cms_alg (hx509_context  context,
hx509_peer_info  peer,
const AlgorithmIdentifier *  val 
)
-
-
- -

-Add an additional algorithm that the peer supports.

-

Parameters:
- - - - -
context A hx509 context.
peer the peer to set the new algorithms for
val an AlgorithmsIdentier to add
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_peer_info_alloc (hx509_context  context,
hx509_peer_info *  peer 
)
-
-
- -

-Allocate a new peer info structure an init it to default values.

-

Parameters:
- - - -
context A hx509 context.
peer return an allocated peer, free with hx509_peer_info_free().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - -
void hx509_peer_info_free (hx509_peer_info  peer  ) 
-
-
- -

-Free a peer info structure.

-

Parameters:
- - -
peer peer info to be freed.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_peer_info_set_cert (hx509_peer_info  peer,
hx509_cert  cert 
)
-
-
- -

-Set the certificate that remote peer is using.

-

Parameters:
- - - -
peer peer info to update
cert cerificate of the remote peer.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_peer_info_set_cms_algs (hx509_context  context,
hx509_peer_info  peer,
const AlgorithmIdentifier *  val,
size_t  len 
)
-
-
- -

-Set the algorithms that the peer supports.

-

Parameters:
- - - - - -
context A hx509 context.
peer the peer to set the new algorithms for
val array of supported AlgorithmsIdentiers
len length of array val.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__print.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__print.html deleted file mode 100644 index 4f9fe1e4b6f..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__print.html +++ /dev/null @@ -1,452 +0,0 @@ - - -Heimdalx509library: hx509 printing functions - - - -

-keyhole logo -

- - - -
-

hx509 printing functions

- - - - - - - - - - - - - - - - - - - - - - -

Functions

void hx509_print_stdout (void *ctx, const char *fmt, va_list va)
int hx509_oid_sprint (const heim_oid *oid, char **str)
void hx509_oid_print (const heim_oid *oid, hx509_vprint_func func, void *ctx)
void hx509_bitstring_print (const heim_bit_string *b, hx509_vprint_func func, void *ctx)
int hx509_cert_keyusage_print (hx509_context context, hx509_cert c, char **s)
int hx509_validate_ctx_init (hx509_context context, hx509_validate_ctx *ctx)
void hx509_validate_ctx_set_print (hx509_validate_ctx ctx, hx509_vprint_func func, void *c)
void hx509_validate_ctx_add_flags (hx509_validate_ctx ctx, int flags)
void hx509_validate_ctx_free (hx509_validate_ctx ctx)
int hx509_validate_cert (hx509_context context, hx509_validate_ctx ctx, hx509_cert cert)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void hx509_bitstring_print (const heim_bit_string *  b,
hx509_vprint_func  func,
void *  ctx 
)
-
-
- -

-Print a bitstring using a hx509_vprint_func function. To print to stdout use hx509_print_stdout().

-

Parameters:
- - - - -
b bit string to print.
func hx509_vprint_func to print with.
ctx context variable to hx509_vprint_func function.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_cert_keyusage_print (hx509_context  context,
hx509_cert  c,
char **  s 
)
-
-
- -

-Print certificate usage for a certificate to a string.

-

Parameters:
- - - - -
context A hx509 context.
c a certificate print the keyusage for.
s the return string with the keysage printed in to, free with hx509_xfree().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
void hx509_oid_print (const heim_oid *  oid,
hx509_vprint_func  func,
void *  ctx 
)
-
-
- -

-Print a oid using a hx509_vprint_func function. To print to stdout use hx509_print_stdout().

-

Parameters:
- - - - -
oid oid to print
func hx509_vprint_func to print with.
ctx context variable to hx509_vprint_func function.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_oid_sprint (const heim_oid *  oid,
char **  str 
)
-
-
- -

-Print a oid to a string.

-

Parameters:
- - - -
oid oid to print
str allocated string, free with hx509_xfree().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
void hx509_print_stdout (void *  ctx,
const char *  fmt,
va_list  va 
)
-
-
- -

-Helper function to print on stdout for:

-

-

Parameters:
- - - - -
ctx the context to the print function. If the ctx is NULL, stdout is used.
fmt the printing format.
va the argumet list.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_validate_cert (hx509_context  context,
hx509_validate_ctx  ctx,
hx509_cert  cert 
)
-
-
- -

-Validate/Print the status of the certificate.

-

Parameters:
- - - - -
context A hx509 context.
ctx A hx509 validation context.
cert the cerificate to validate/print.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_validate_ctx_add_flags (hx509_validate_ctx  ctx,
int  flags 
)
-
-
- -

-Add flags to control the behaivor of the hx509_validate_cert() function.

-

Parameters:
- - - -
ctx A hx509 validation context.
flags flags to add to the validation context.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - -
void hx509_validate_ctx_free (hx509_validate_ctx  ctx  ) 
-
-
- -

-Free an hx509 validate context.

-

Parameters:
- - -
ctx the hx509 validate context to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_validate_ctx_init (hx509_context  context,
hx509_validate_ctx *  ctx 
)
-
-
- -

-Allocate a hx509 validation/printing context.

-

Parameters:
- - - -
context A hx509 context.
ctx a new allocated hx509 validation context, free with hx509_validate_ctx_free().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
void hx509_validate_ctx_set_print (hx509_validate_ctx  ctx,
hx509_vprint_func  func,
void *  c 
)
-
-
- -

-Set the printing functions for the validation context.

-

Parameters:
- - - - -
ctx a hx509 valication context.
func the printing function to usea.
c the context variable to the printing function.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__query.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__query.html deleted file mode 100644 index 08e85e50e79..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__query.html +++ /dev/null @@ -1,29 +0,0 @@ - - -Heimdalx509library: hx509 query functions - - - -

-keyhole logo -

- - - -
-

hx509 query functions

- -
-
-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__revoke.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__revoke.html deleted file mode 100644 index 4fe85fcf218..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__revoke.html +++ /dev/null @@ -1,378 +0,0 @@ - - -Heimdalx509library: hx509 revokation checking functions - - - -

-keyhole logo -

- - - -
-

hx509 revokation checking functions

- - - - - - - - - - - - - - - - -

Functions

int hx509_revoke_init (hx509_context context, hx509_revoke_ctx *ctx)
void hx509_revoke_free (hx509_revoke_ctx *ctx)
int hx509_revoke_add_ocsp (hx509_context context, hx509_revoke_ctx ctx, const char *path)
int hx509_revoke_add_crl (hx509_context context, hx509_revoke_ctx ctx, const char *path)
int hx509_revoke_verify (hx509_context context, hx509_revoke_ctx ctx, hx509_certs certs, time_t now, hx509_cert cert, hx509_cert parent_cert)
int hx509_ocsp_request (hx509_context context, hx509_certs reqcerts, hx509_certs pool, hx509_cert signer, const AlgorithmIdentifier *digest, heim_octet_string *request, heim_octet_string *nonce)
int hx509_revoke_ocsp_print (hx509_context context, const char *path, FILE *out)
-

Detailed Description

-See the Revocation methods for description and examples.

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ocsp_request (hx509_context  context,
hx509_certs  reqcerts,
hx509_certs  pool,
hx509_cert  signer,
const AlgorithmIdentifier *  digest,
heim_octet_string *  request,
heim_octet_string *  nonce 
)
-
-
- -

-Create an OCSP request for a set of certificates.

-

Parameters:
- - - - - - - - -
context a hx509 context
reqcerts list of certificates to request ocsp data for
pool certificate pool to use when signing
signer certificate to use to sign the request
digest the signing algorithm in the request, if NULL use the default signature algorithm,
request the encoded request, free with free_heim_octet_string().
nonce nonce in the request, free with free_heim_octet_string().
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_revoke_add_crl (hx509_context  context,
hx509_revoke_ctx  ctx,
const char *  path 
)
-
-
- -

-Add a CRL file to the revokation context.

-

Parameters:
- - - - -
context hx509 context
ctx hx509 revokation context
path path to file that is going to be added to the context.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_revoke_add_ocsp (hx509_context  context,
hx509_revoke_ctx  ctx,
const char *  path 
)
-
-
- -

-Add a OCSP file to the revokation context.

-

Parameters:
- - - - -
context hx509 context
ctx hx509 revokation context
path path to file that is going to be added to the context.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - -
void hx509_revoke_free (hx509_revoke_ctx *  ctx  ) 
-
-
- -

-Free a hx509 revokation context.

-

Parameters:
- - -
ctx context to be freed
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_revoke_init (hx509_context  context,
hx509_revoke_ctx *  ctx 
)
-
-
- -

-Allocate a revokation context. Free with hx509_revoke_free().

-

Parameters:
- - - -
context A hx509 context.
ctx returns a newly allocated revokation context.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_revoke_ocsp_print (hx509_context  context,
const char *  path,
FILE *  out 
)
-
-
- -

-Print the OCSP reply stored in a file.

-

Parameters:
- - - - -
context a hx509 context
path path to a file with a OCSP reply
out the out FILE descriptor to print the reply on
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_revoke_verify (hx509_context  context,
hx509_revoke_ctx  ctx,
hx509_certs  certs,
time_t  now,
hx509_cert  cert,
hx509_cert  parent_cert 
)
-
-
- -

-Check that a certificate is not expired according to a revokation context. Also need the parent certificte to the check OCSP parent identifier.

-

Parameters:
- - - - - - - -
context hx509 context
ctx hx509 revokation context
certs 
now 
cert 
parent_cert 
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__verify.html b/kerberosV/src/doc/doxyout/hx509/html/group__hx509__verify.html deleted file mode 100644 index 6f93cb53061..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/group__hx509__verify.html +++ /dev/null @@ -1,714 +0,0 @@ - - -Heimdalx509library: hx509 verification functions - - - -

-keyhole logo -

- - - -
-

hx509 verification functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

void hx509_context_set_missing_revoke (hx509_context context, int flag)
int hx509_verify_init_ctx (hx509_context context, hx509_verify_ctx *ctx)
void hx509_verify_destroy_ctx (hx509_verify_ctx ctx)
void hx509_verify_attach_anchors (hx509_verify_ctx ctx, hx509_certs set)
void hx509_verify_attach_revoke (hx509_verify_ctx ctx, hx509_revoke_ctx revoke_ctx)
void hx509_verify_set_time (hx509_verify_ctx ctx, time_t t)
void hx509_verify_set_max_depth (hx509_verify_ctx ctx, unsigned int max_depth)
void hx509_verify_set_proxy_certificate (hx509_verify_ctx ctx, int boolean)
void hx509_verify_set_strict_rfc3280_verification (hx509_verify_ctx ctx, int boolean)
int hx509_verify_path (hx509_context context, hx509_verify_ctx ctx, hx509_cert cert, hx509_certs pool)
int hx509_ocsp_verify (hx509_context context, time_t now, hx509_cert cert, int flags, const void *data, size_t length, time_t *expiration)
int hx509_crl_alloc (hx509_context context, hx509_crl *crl)
int hx509_crl_add_revoked_certs (hx509_context context, hx509_crl crl, hx509_certs certs)
int hx509_crl_lifetime (hx509_context context, hx509_crl crl, int delta)
void hx509_crl_free (hx509_context context, hx509_crl *crl)
int hx509_crl_sign (hx509_context context, hx509_cert signer, hx509_crl crl, heim_octet_string *os)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
void hx509_context_set_missing_revoke (hx509_context  context,
int  flag 
)
-
-
- -

-Selects if the hx509_revoke_verify() function is going to require the existans of a revokation method (OCSP, CRL) or not. Note that hx509_verify_path(), hx509_cms_verify_signed(), and other function call hx509_revoke_verify().

-

Parameters:
- - - -
context hx509 context to change the flag for.
flag zero, revokation method required, non zero missing revokation method ok
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_crl_add_revoked_certs (hx509_context  context,
hx509_crl  crl,
hx509_certs  certs 
)
-
-
- -

-Add revoked certificate to an CRL context.

-

Parameters:
- - - - -
context a hx509 context.
crl the CRL to add the revoked certificate to.
certs keyset of certificate to revoke.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_crl_alloc (hx509_context  context,
hx509_crl *  crl 
)
-
-
- -

-Create a CRL context. Use hx509_crl_free() to free the CRL context.

-

Parameters:
- - - -
context a hx509 context.
crl return pointer to a newly allocated CRL context.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_crl_free (hx509_context  context,
hx509_crl *  crl 
)
-
-
- -

-Free a CRL context.

-

Parameters:
- - - -
context a hx509 context.
crl a CRL context to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_crl_lifetime (hx509_context  context,
hx509_crl  crl,
int  delta 
)
-
-
- -

-Set the lifetime of a CRL context.

-

Parameters:
- - - - -
context a hx509 context.
crl a CRL context
delta delta time the certificate is valid, library adds the current time to this.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_crl_sign (hx509_context  context,
hx509_cert  signer,
hx509_crl  crl,
heim_octet_string *  os 
)
-
-
- -

-Sign a CRL and return an encode certificate.

-

Parameters:
- - - - - -
context a hx509 context.
signer certificate to sign the CRL with
crl the CRL to sign
os return the signed and encoded CRL, free with free_heim_octet_string()
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_ocsp_verify (hx509_context  context,
time_t  now,
hx509_cert  cert,
int  flags,
const void *  data,
size_t  length,
time_t *  expiration 
)
-
-
- -

-Verify that the certificate is part of the OCSP reply and it's not expired. Doesn't verify signature the OCSP reply or it's done by a authorized sender, that is assumed to be already done.

-

Parameters:
- - - - - - - - -
context a hx509 context
now the time right now, if 0, use the current time.
cert the certificate to verify
flags flags control the behavior
data pointer to the encode ocsp reply
length the length of the encode ocsp reply
expiration return the time the OCSP will expire and need to be rechecked.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_verify_attach_anchors (hx509_verify_ctx  ctx,
hx509_certs  set 
)
-
-
- -

-Set the trust anchors in the verification context, makes an reference to the keyset, so the consumer can free the keyset independent of the destruction of the verification context (ctx). If there already is a keyset attached, it's released.

-

Parameters:
- - - -
ctx a verification context
set a keyset containing the trust anchors.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_verify_attach_revoke (hx509_verify_ctx  ctx,
hx509_revoke_ctx  revoke_ctx 
)
-
-
- -

-Attach an revocation context to the verfication context, , makes an reference to the revoke context, so the consumer can free the revoke context independent of the destruction of the verification context. If there is no revoke context, the verification process is NOT going to check any verification status.

-

Parameters:
- - - -
ctx a verification context.
revoke_ctx a revoke context.
-
- -
-

- -

-
- - - - - - - - - -
void hx509_verify_destroy_ctx (hx509_verify_ctx  ctx  ) 
-
-
- -

-Free an hx509 verification context.

-

Parameters:
- - -
ctx the context to be freed.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int hx509_verify_init_ctx (hx509_context  context,
hx509_verify_ctx *  ctx 
)
-
-
- -

-Allocate an verification context that is used fo control the verification process.

-

Parameters:
- - - -
context A hx509 context.
ctx returns a pointer to a hx509_verify_ctx object.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int hx509_verify_path (hx509_context  context,
hx509_verify_ctx  ctx,
hx509_cert  cert,
hx509_certs  pool 
)
-
-
- -

-Build and verify the path for the certificate to the trust anchor specified in the verify context. The path is constructed from the certificate, the pool and the trust anchors.

-

Parameters:
- - - - - -
context A hx509 context.
ctx A hx509 verification context.
cert the certificate to build the path from.
pool A keyset of certificates to build the chain from.
-
-
Returns:
An hx509 error code, see hx509_get_error_string().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_verify_set_max_depth (hx509_verify_ctx  ctx,
unsigned int  max_depth 
)
-
-
- -

-Set the maximum depth of the certificate chain that the path builder is going to try.

-

Parameters:
- - - -
ctx a verification context
max_depth maxium depth of the certificate chain, include trust anchor.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_verify_set_proxy_certificate (hx509_verify_ctx  ctx,
int  boolean 
)
-
-
- -

-Allow or deny the use of proxy certificates

-

Parameters:
- - - -
ctx a verification context
boolean if non zero, allow proxy certificates.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_verify_set_strict_rfc3280_verification (hx509_verify_ctx  ctx,
int  boolean 
)
-
-
- -

-Select strict RFC3280 verification of certificiates. This means checking key usage on CA certificates, this will make version 1 certificiates unuseable.

-

Parameters:
- - - -
ctx a verification context
boolean if non zero, use strict verification.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
void hx509_verify_set_time (hx509_verify_ctx  ctx,
time_t  t 
)
-
-
- -

-Set the clock time the the verification process is going to use. Used to check certificate in the past and future time. If not set the current time will be used.

-

Parameters:
- - - -
ctx a verification context.
t the time the verifiation is using.
-
- -
-

-

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/index.html b/kerberosV/src/doc/doxyout/hx509/html/index.html deleted file mode 100644 index f71abcfe2b3..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/index.html +++ /dev/null @@ -1,35 +0,0 @@ - - -Heimdalx509library: Heimdal PKIX/X.509 library - - - -

-keyhole logo -

- - - -
-

Heimdal PKIX/X.509 library

-

-

1.5.3

-Introduction

-Heimdal libhx509 library is a implementation of the PKIX/X.509 and related protocols.

-PKIX/X.509 is ...

-Sections in this manual are:

-

-The project web page: http://www.h5l.org/

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/modules.html b/kerberosV/src/doc/doxyout/hx509/html/modules.html deleted file mode 100644 index f97006ee132..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/modules.html +++ /dev/null @@ -1,44 +0,0 @@ - - -Heimdalx509library: Module Index - - - -

-keyhole logo -

- - - - -
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_ca.html b/kerberosV/src/doc/doxyout/hx509/html/page_ca.html deleted file mode 100644 index bfff5d8c19e..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_ca.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Heimdalx509library: Hx509 CA functions - - - -

-keyhole logo -

- - - -
-

Hx509 CA functions

See the library functions here: hx509 CA functions
-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_cert.html b/kerberosV/src/doc/doxyout/hx509/html/page_cert.html deleted file mode 100644 index 595406bf96e..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_cert.html +++ /dev/null @@ -1,28 +0,0 @@ - - -Heimdalx509library: The basic certificate - - - -

-keyhole logo -

- - - -
-

The basic certificate

The basic hx509 cerificate object in hx509 is hx509_cert. The hx509_cert object is representing one X509/PKIX certificate and associated attributes; like private key, friendly name, etc.

-A hx509_cert object is usully found via the keyset interfaces (Certificate store operations), but its also possible to create a certificate directly from a parsed object with hx509_cert_init() and hx509_cert_init_data().

-See the library functions here: hx509 certificate functions

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_cms.html b/kerberosV/src/doc/doxyout/hx509/html/page_cms.html deleted file mode 100644 index 761a38022bb..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_cms.html +++ /dev/null @@ -1,30 +0,0 @@ - - -Heimdalx509library: CMS/PKCS7 message functions. - - - -

-keyhole logo -

- - - -
-

CMS/PKCS7 message functions.

CMS is defined in RFC 3369 and is an continuation of the RSA Labs standard PKCS7. The basic messages in CMS is

-

    -
  • SignedData Data signed with private key (RSA, DSA, ECDSA) or secret (symmetric) key
  • EnvelopedData Data encrypted with private key (RSA)
  • EncryptedData Data encrypted with secret (symmetric) key.
  • ContentInfo Wrapper structure including type and data.
-

-See the library functions here: hx509 CMS/pkcs7 functions

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_env.html b/kerberosV/src/doc/doxyout/hx509/html/page_env.html deleted file mode 100644 index a03352b2ac2..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_env.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Heimdalx509library: Hx509 enviroment functions - - - -

-keyhole logo -

- - - - -
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_error.html b/kerberosV/src/doc/doxyout/hx509/html/page_error.html deleted file mode 100644 index 2220689da03..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_error.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Heimdalx509library: Hx509 error reporting functions - - - -

-keyhole logo -

- - - - -
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_keyset.html b/kerberosV/src/doc/doxyout/hx509/html/page_keyset.html deleted file mode 100644 index addc5c3f1b6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_keyset.html +++ /dev/null @@ -1,29 +0,0 @@ - - -Heimdalx509library: Certificate store operations - - - -

-keyhole logo -

- - - -
-

Certificate store operations

Type of certificates store:
    -
  • MEMORY In memory based format. Doesnt support storing.
  • FILE FILE supports raw DER certicates and PEM certicates. When PEM is used the file can contain may certificates and match private keys. Support storing the certificates. DER format only supports on certificate and no private key.
  • PEM-FILE Same as FILE, defaulting to PEM encoded certificates.
  • PEM-FILE Same as FILE, defaulting to DER encoded certificates.
  • PKCS11
  • PKCS12
  • DIR
  • KEYCHAIN Apple Mac OS X KeyChain backed keychain object.
-

-See the library functions here: hx509 certificate store functions

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_lock.html b/kerberosV/src/doc/doxyout/hx509/html/page_lock.html deleted file mode 100644 index 8220c121272..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_lock.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Heimdalx509library: Locking and unlocking certificates and encrypted data. - - - -

-keyhole logo -

- - - - -
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_name.html b/kerberosV/src/doc/doxyout/hx509/html/page_name.html deleted file mode 100644 index ac834375d5f..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_name.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Heimdalx509library: PKIX/X.509 Names - - - -

-keyhole logo -

- - - -
-

PKIX/X.509 Names

There are several names in PKIX/X.509, GeneralName and Name.

-A Name consists of an ordered list of Relative Distinguished Names (RDN). Each RDN consists of an unordered list of typed strings. The types are defined by OID and have long and short description. For example id-at-commonName (2.5.4.3) have the long name CommonName and short name CN. The string itself can be of several encoding, UTF8, UTF16, Teltex string, etc. The type limit what encoding should be used.

-GeneralName is a broader nametype that can contains al kind of stuff like Name, IP addresses, partial Name, etc.

-Name is mapped into a hx509_name object.

-Parse and string name into a hx509_name object with hx509_parse_name(), make it back into string representation with hx509_name_to_string().

-Name string are defined rfc2253, rfc1779 and X.501.

-See the library functions here: hx509 name functions

-
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_peer.html b/kerberosV/src/doc/doxyout/hx509/html/page_peer.html deleted file mode 100644 index fb7b1ab05c3..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_peer.html +++ /dev/null @@ -1,27 +0,0 @@ - - -Heimdalx509library: Hx509 crypto selecting functions - - - -

-keyhole logo -

- - - -
-

Hx509 crypto selecting functions

Peer info structures are used togeter with hx509_crypto_select() to select the best avaible crypto algorithm to use.

-See the library functions here: hx509 certificate selecting functions

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_print.html b/kerberosV/src/doc/doxyout/hx509/html/page_print.html deleted file mode 100644 index 86acead3e7b..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_print.html +++ /dev/null @@ -1,26 +0,0 @@ - - -Heimdalx509library: Hx509 printing functions - - - -

-keyhole logo -

- - - -
-

Hx509 printing functions

See the library functions here: hx509 printing functions
-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/page_revoke.html b/kerberosV/src/doc/doxyout/hx509/html/page_revoke.html deleted file mode 100644 index 63470f9afd5..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/page_revoke.html +++ /dev/null @@ -1,28 +0,0 @@ - - -Heimdalx509library: Revocation methods - - - -

-keyhole logo -

- - - -
-

Revocation methods

There are two revocation method for PKIX/X.509: CRL and OCSP. Revocation is needed if the private key is lost and stolen. Depending on how picky you are, you might want to make revocation for destroyed private keys too (smartcard broken), but that should not be a problem.

-CRL is a list of certifiates that have expired.

-OCSP is an online checking method where the requestor sends a list of certificates to the OCSP server to return a signed reply if they are valid or not. Some services sends a OCSP reply as part of the hand-shake to make the revoktion decision simpler/faster for the client.

-
-Generated on Sun Dec 9 14:10:34 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/pages.html b/kerberosV/src/doc/doxyout/hx509/html/pages.html deleted file mode 100644 index f595a392001..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/pages.html +++ /dev/null @@ -1,50 +0,0 @@ - - -Heimdalx509library: Page Index - - - -

-keyhole logo -

- - - - -
-Generated on Sun Dec 9 14:10:33 2012 for Heimdalx509library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/hx509/html/tab_b.gif b/kerberosV/src/doc/doxyout/hx509/html/tab_b.gif deleted file mode 100644 index 0d623483ffdf5f9f96900108042a7ab0643fe2a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 ncmZ?wbhEHbWMp7uXkcJy*>IeJfk6j|fqX^=1|}vKMh0sDa2W*H diff --git a/kerberosV/src/doc/doxyout/hx509/html/tab_l.gif b/kerberosV/src/doc/doxyout/hx509/html/tab_l.gif deleted file mode 100644 index 9b1e6337c9299a700401a2a78a2c6ffced475216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 706 zcmZ?wbhEHbZT`}F1e&(Gg}Y(8=I;HA5#Z$3JI=gGB)FQ#odI(O&E^@q;x zK6mr*m3xOS-#u~t!I@i+u0DKm^U160k6t`|^WpV}&n+8{U%dD9&a>B#U%!9-@yol< zU%&tQ{rk_K|NsC0`}dE5ET99@1@a36+kb~?0UJ*yc&I3X_m z!ND^5$O7$#8OFRuDhG}!?8z?cdZK&!`PWjdR;Aj^wZ` zeK{IEYHBJ)6K8VIp1`BVt++swf6j+=L{p1*nO(VhE`pFexG@5$|>uaCcd z`0m=9m+yak{QmXN#Sc$^{$X9h9&q2jiKAI|&T)a;PPx2K9p`YIdw8HtR5k2Q$2-O2 z*;3y{MQ-RnJTgJfI&R5|O)AHxDf_00XbPvDZPy4t=hHd)nfLPvms&O`Ok(sD()5v$ z5U@&h;a=#xbxVbo2~X&Xj0Ie(f{v>vERH+qC+nTG=B8Nca=wU-O$?1&vUgV~9=!H; zx>3p9Yn%*<>t~sk+&0xfyS8RsPfYBd<~wWK%j-LmpU>O7yX^h#UCp1x-p#i7@bE;py8XI6 zmY<)m>~)W~yIWcMVoiPg{duuf<*)9qZ9l$m*Ph&W&$jlv*Vpa+{pH@n=IQ$L?0$ax ec60Ul|8o2P|NVbd{6P)#weSbE3}s?04AuZvx_~SI diff --git a/kerberosV/src/doc/doxyout/hx509/html/tab_r.gif b/kerberosV/src/doc/doxyout/hx509/html/tab_r.gif deleted file mode 100644 index ce9dd9f533cb5486d6941844f442b59d4a9e9175..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2585 zcmbV}`9Bkk1ILFF--w5zJc=ZZT(zjE=;2|_S)Qm~rCWz1Pc)KPl;jv%A#&v2*x}yc zmf2~Jm~&=xjJY?PqwIN}f8qQ2{r$uH{c*nJbmr{cR5??*egHrs-B=MzCF`3%e{FAW z{oL5xTHn~5TM{jaB;@|_Ue5F&Zb@p(kMyG{*;gWDg zyeL|eZf7Qd8=#bXzSiR{yzRgLSj-fJS8>lBjVHN z^o-0eS=nE6a`W;LChBs=`+QAJP~{b93>H^eRb5kCSC1zUNezun%`L5M?RDzv#%jk7 zYVRX=vATPD`+oEfum^{RM@GjuP?-r=yh0!p;Vx^T9G7~`7%5ydH%70=jyJ;;`d;hv92x3R=z{xp+Lg2!*@OK*K15-t&okoPtSED)h&$RLxdbA zseWm^C3d%-yRNi-ryk^!ek+C`n&~cd$#ZWct_cUL{l~i+Nzx^5d!n94(>bW-iL~Rl z&8r)?q|1DIo=0=judQ{FaGcfLERz8gfn3-Qt<2lksh{mzpT}DXxUuR^z=^key&q4! z+wWI45vL0k$R^(F#{qfqhUsN@WA+w-V?LPH33!Q?WFSB3)WBojE@hK41Nb?KfS+Qo zXgrzfsP$wr4Qzy*{OD>uJBjdgGM@VMml5)2f~_}lD*YyOb}Hjeobhz#4c`w(l^>KK zr?Ud;W~Z}*w;%hZ|2^p^+f06gJDJQD zeIhGADbDmm&6arh(q>EZ<7mjzg7l|z$hRL8=1>)Nv=S7CY$B}iYJ&*T_-T_OG*L1q ztZ3Lana33?y3AKnyq^YCF|4x%Rb5WU&2qcl{TFKey%QJeMxn^SdT!hZ5+0i1zeusiYVp-phBl7b5+Px-X&LhByq z0F&<;K0l2+v>qiHlXb#$jXMv$uK-dEGE9L~qtdU(XeRXmvu*K2Q&6!fD**JxYP4b4BR7FdJ$Qx9G9`J%-_X!a#LGpp3g9)VWytGCa;7`S1_e8F~!R+aSJ zOF17p2`H?2kPs8Q`_;U}+D%3p zs2-0BTqFwpUoBk`?P;iPQ(IbEA|JmMx!P&YYG|R@S=5Mnw;-?A6rEEVyV%d7{iU4a zNk`i!%F(Ykpm`}#oH;BjY->@b8vQedv;pza2FL&*6ufjd+*3Ute&>kes~TU?^KkojsTh(o~(3tk1Y6>4(yn( z#U*ID9@eg-beKo1B;HXe+}{Z%n@7m0+yxivuqk9~;!1LGQlah)xYK4>wgL}l6dsaN zIxlRlq`*`j9PG4*0hD6YV_b_2w5b#)o7J?`q#{GjvvKlD`T*dWcZx<-s(ZvLB44E# z=!|sw!?)@%y$oRNL#25WS3lzdii}TuQ3?CLnvQ1_n};2sT_;Y;#d3=+-(O% zMN$>O!3;ke(UuLR%h_&)N zs^!-@A>QR}4yB1bPp`9S19ikTbZ~O{&FF-yHK{En;mmShDUIEw03`j(DBIsM}Rjki2J#SQa3gFZTKBPDeIiLt9Z z%bL3(B@Qw%(B`wSMS~dPh$=R`(}lBoFXKy(s|*{#ru$wjsBc_O#zxNk9w+UUHmx(U zmJ8+M+ndtnZ<7|VU9Mbt61zpo9T&3%Wx&XII=#QJxjR`CZf22ac3d51Z?GD%LEe_&*t46Qf;4`bZ7p2K(Ab5>GfT^}4! zBT&HZD`^PEgWoI&{~o-ID0F?O`75sm(87x%A{(}Ch1)QlzdJ)1B-eqe5a(weg0`4lQIf1evjvbBY50DVbzO7CLf|vP z2#0(U-|jZ`H{y5N^o7%iK6H>_HEGN->U6^!)1{XpJV!!4(Ig7wzZQ*9WYF4X1rG0x z=1uA@i`rIAciubDC{;~b(|&|A@xkjRP5aRcvRU9tvIm}jDB6J eQ0-6-y)mpwdT=ayS0tBxKDA*~;EWmo diff --git a/kerberosV/src/doc/doxyout/hx509/html/tabs.css b/kerberosV/src/doc/doxyout/hx509/html/tabs.css deleted file mode 100644 index 95f00a91da3..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/html/tabs.css +++ /dev/null @@ -1,102 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509.3 deleted file mode 100644 index 37c89e475da..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509.3 +++ /dev/null @@ -1,45 +0,0 @@ -.TH "hx509 library" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 library \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBhx509_context_init\fP (hx509_context *context)" -.br -.ti -1c -.RI "void \fBhx509_context_free\fP (hx509_context *context)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "void hx509_context_free (hx509_context * context)" -.PP -Free the context allocated by \fBhx509_context_init()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP context to be freed. -.RE -.PP - -.SS "int hx509_context_init (hx509_context * context)" -.PP -Creates a hx509 context that most functions in the library uses. The context is only allowed to be used by one thread at each moment. Free the context with \fBhx509_context_free()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Returns a pointer to new hx509 context. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_bitstring_print.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_bitstring_print.3 deleted file mode 100644 index 2577d70ee90..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_bitstring_print.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_print.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca.3 deleted file mode 100644 index 9ae593bf233..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca.3 +++ /dev/null @@ -1,573 +0,0 @@ -.TH "hx509 CA functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 CA functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBhx509_ca_tbs_init\fP (hx509_context context, hx509_ca_tbs *tbs)" -.br -.ti -1c -.RI "void \fBhx509_ca_tbs_free\fP (hx509_ca_tbs *tbs)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_notBefore\fP (hx509_context context, hx509_ca_tbs tbs, time_t t)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_notAfter\fP (hx509_context context, hx509_ca_tbs tbs, time_t t)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_notAfter_lifetime\fP (hx509_context context, hx509_ca_tbs tbs, time_t delta)" -.br -.ti -1c -.RI "struct units * \fBhx509_ca_tbs_template_units\fP (void)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_template\fP (hx509_context context, hx509_ca_tbs tbs, int flags, hx509_cert cert)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_ca\fP (hx509_context context, hx509_ca_tbs tbs, int pathLenConstraint)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_proxy\fP (hx509_context context, hx509_ca_tbs tbs, int pathLenConstraint)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_domaincontroller\fP (hx509_context context, hx509_ca_tbs tbs)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_spki\fP (hx509_context context, hx509_ca_tbs tbs, const SubjectPublicKeyInfo *spki)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_serialnumber\fP (hx509_context context, hx509_ca_tbs tbs, const heim_integer *serialNumber)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_add_eku\fP (hx509_context context, hx509_ca_tbs tbs, const heim_oid *oid)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_add_crl_dp_uri\fP (hx509_context context, hx509_ca_tbs tbs, const char *uri, hx509_name issuername)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_add_san_otherName\fP (hx509_context context, hx509_ca_tbs tbs, const heim_oid *oid, const heim_octet_string *os)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_add_san_pkinit\fP (hx509_context context, hx509_ca_tbs tbs, const char *principal)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_add_san_ms_upn\fP (hx509_context context, hx509_ca_tbs tbs, const char *principal)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_add_san_jid\fP (hx509_context context, hx509_ca_tbs tbs, const char *jid)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_add_san_hostname\fP (hx509_context context, hx509_ca_tbs tbs, const char *dnsname)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_add_san_rfc822name\fP (hx509_context context, hx509_ca_tbs tbs, const char *rfc822Name)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_subject\fP (hx509_context context, hx509_ca_tbs tbs, hx509_name subject)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_set_unique\fP (hx509_context context, hx509_ca_tbs tbs, const heim_bit_string *subjectUniqueID, const heim_bit_string *issuerUniqueID)" -.br -.ti -1c -.RI "int \fBhx509_ca_tbs_subject_expand\fP (hx509_context context, hx509_ca_tbs tbs, hx509_env env)" -.br -.ti -1c -.RI "int \fBhx509_ca_sign\fP (hx509_context context, hx509_ca_tbs tbs, hx509_cert signer, hx509_cert *certificate)" -.br -.ti -1c -.RI "int \fBhx509_ca_sign_self\fP (hx509_context context, hx509_ca_tbs tbs, hx509_private_key signer, hx509_cert *certificate)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBHx509 CA functions\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "int hx509_ca_sign (hx509_context context, hx509_ca_tbs tbs, hx509_cert signer, hx509_cert * certificate)" -.PP -Sign a to-be-signed certificate object with a issuer certificate. -.PP -The caller needs to at least have called the following functions on the to-be-signed certificate object: -.IP "\(bu" 2 -\fBhx509_ca_tbs_init()\fP -.IP "\(bu" 2 -\fBhx509_ca_tbs_set_subject()\fP -.IP "\(bu" 2 -\fBhx509_ca_tbs_set_spki()\fP -.PP -.PP -When done the to-be-signed certificate object should be freed with \fBhx509_ca_tbs_free()\fP. -.PP -When creating self-signed certificate use \fBhx509_ca_sign_self()\fP instead. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIsigner\fP the CA certificate object to sign with (need private key). -.br -\fIcertificate\fP return cerificate, free with \fBhx509_cert_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_sign_self (hx509_context context, hx509_ca_tbs tbs, hx509_private_key signer, hx509_cert * certificate)" -.PP -Work just like \fBhx509_ca_sign()\fP but signs it-self. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIsigner\fP private key to sign with. -.br -\fIcertificate\fP return cerificate, free with \fBhx509_cert_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_add_crl_dp_uri (hx509_context context, hx509_ca_tbs tbs, const char * uri, hx509_name issuername)" -.PP -Add CRL distribution point URI to the to-be-signed certificate object. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIuri\fP uri to the CRL. -.br -\fIissuername\fP name of the issuer. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.PP -issuername not supported -.SS "int hx509_ca_tbs_add_eku (hx509_context context, hx509_ca_tbs tbs, const heim_oid * oid)" -.PP -An an extended key usage to the to-be-signed certificate object. Duplicates will detected and not added. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIoid\fP extended key usage to add. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_add_san_hostname (hx509_context context, hx509_ca_tbs tbs, const char * dnsname)" -.PP -Add a Subject Alternative Name hostname to to-be-signed certificate object. A domain match starts with ., an exact match does not. -.PP -Example of a an domain match: .domain.se matches the hostname host.domain.se. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIdnsname\fP a hostame. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_add_san_jid (hx509_context context, hx509_ca_tbs tbs, const char * jid)" -.PP -Add a Jabber/XMPP jid Subject Alternative Name to the to-be-signed certificate object. The jid is an UTF8 string. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIjid\fP string of an a jabber id in UTF8. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_add_san_ms_upn (hx509_context context, hx509_ca_tbs tbs, const char * principal)" -.PP -Add Microsoft UPN Subject Alternative Name to the to-be-signed certificate object. The principal string is a UTF8 string. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIprincipal\fP Microsoft UPN string. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_add_san_otherName (hx509_context context, hx509_ca_tbs tbs, const heim_oid * oid, const heim_octet_string * os)" -.PP -Add Subject Alternative Name otherName to the to-be-signed certificate object. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIoid\fP the oid of the OtherName. -.br -\fIos\fP data in the other name. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_add_san_pkinit (hx509_context context, hx509_ca_tbs tbs, const char * principal)" -.PP -Add Kerberos Subject Alternative Name to the to-be-signed certificate object. The principal string is a UTF8 string. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIprincipal\fP Kerberos principal to add to the certificate. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_add_san_rfc822name (hx509_context context, hx509_ca_tbs tbs, const char * rfc822Name)" -.PP -Add a Subject Alternative Name rfc822 (email address) to to-be-signed certificate object. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIrfc822Name\fP a string to a email address. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_ca_tbs_free (hx509_ca_tbs * tbs)" -.PP -Free an To Be Signed object. -.PP -\fBParameters:\fP -.RS 4 -\fItbs\fP object to free. -.RE -.PP - -.SS "int hx509_ca_tbs_init (hx509_context context, hx509_ca_tbs * tbs)" -.PP -Allocate an to-be-signed certificate object that will be converted into an certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP returned to-be-signed certicate object, free with \fBhx509_ca_tbs_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_ca (hx509_context context, hx509_ca_tbs tbs, int pathLenConstraint)" -.PP -Make the to-be-signed certificate object a CA certificate. If the pathLenConstraint is negative path length constraint is used. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIpathLenConstraint\fP path length constraint, negative, no constraint. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_domaincontroller (hx509_context context, hx509_ca_tbs tbs)" -.PP -Make the to-be-signed certificate object a windows domain controller certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_notAfter (hx509_context context, hx509_ca_tbs tbs, time_t t)" -.PP -Set the absolute time when the certificate is valid to. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIt\fP time when the certificate will expire -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_notAfter_lifetime (hx509_context context, hx509_ca_tbs tbs, time_t delta)" -.PP -Set the relative time when the certificiate is going to expire. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIdelta\fP seconds to the certificate is going to expire. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_notBefore (hx509_context context, hx509_ca_tbs tbs, time_t t)" -.PP -Set the absolute time when the certificate is valid from. If not set the current time will be used. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIt\fP time the certificated will start to be valid -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_proxy (hx509_context context, hx509_ca_tbs tbs, int pathLenConstraint)" -.PP -Make the to-be-signed certificate object a proxy certificate. If the pathLenConstraint is negative path length constraint is used. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIpathLenConstraint\fP path length constraint, negative, no constraint. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_serialnumber (hx509_context context, hx509_ca_tbs tbs, const heim_integer * serialNumber)" -.PP -Set the serial number to use for to-be-signed certificate object. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIserialNumber\fP serial number to use for the to-be-signed certificate object. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_spki (hx509_context context, hx509_ca_tbs tbs, const SubjectPublicKeyInfo * spki)" -.PP -Set the subject public key info (SPKI) in the to-be-signed certificate object. SPKI is the public key and key related parameters in the certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIspki\fP subject public key info to use for the to-be-signed certificate object. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_subject (hx509_context context, hx509_ca_tbs tbs, hx509_name subject)" -.PP -Set the subject name of a to-be-signed certificate object. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIsubject\fP the name to set a subject. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_template (hx509_context context, hx509_ca_tbs tbs, int flags, hx509_cert cert)" -.PP -Initialize the to-be-signed certificate object from a template certifiate. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIflags\fP bit field selecting what to copy from the template certifiate. -.br -\fIcert\fP template certificate. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_set_unique (hx509_context context, hx509_ca_tbs tbs, const heim_bit_string * subjectUniqueID, const heim_bit_string * issuerUniqueID)" -.PP -Set the issuerUniqueID and subjectUniqueID -.PP -These are only supposed to be used considered with version 2 certificates, replaced by the two extensions SubjectKeyIdentifier and IssuerKeyIdentifier. This function is to allow application using legacy protocol to issue them. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIissuerUniqueID\fP to be set -.br -\fIsubjectUniqueID\fP to be set -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ca_tbs_subject_expand (hx509_context context, hx509_ca_tbs tbs, hx509_env env)" -.PP -Expand the the subject name in the to-be-signed certificate object using \fBhx509_name_expand()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fItbs\fP object to be signed. -.br -\fIenv\fP enviroment variable to expand variables in the subject name, see hx509_env_init(). -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "struct units* hx509_ca_tbs_template_units (void)\fC [read]\fP" -.PP -Make of template units, use to build flags argument to \fBhx509_ca_tbs_set_template()\fP with parse_units(). -.PP -\fBReturns:\fP -.RS 4 -an units structure. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_sign.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_sign.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_sign.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_sign_self.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_sign_self.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_sign_self.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_crl_dp_uri.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_crl_dp_uri.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_crl_dp_uri.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_eku.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_eku.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_eku.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_hostname.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_hostname.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_hostname.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_jid.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_jid.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_jid.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_ms_upn.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_ms_upn.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_ms_upn.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_otherName.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_otherName.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_otherName.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_pkinit.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_pkinit.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_pkinit.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_rfc822name.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_rfc822name.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_add_san_rfc822name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_free.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_init.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_init.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_ca.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_ca.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_ca.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_domaincontroller.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_domaincontroller.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_domaincontroller.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notAfter.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notAfter.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notAfter.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notAfter_lifetime.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notAfter_lifetime.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notAfter_lifetime.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notBefore.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notBefore.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_notBefore.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_proxy.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_proxy.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_proxy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_serialnumber.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_serialnumber.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_serialnumber.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_spki.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_spki.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_spki.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_subject.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_subject.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_subject.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_template.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_template.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_template.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_unique.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_unique.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_set_unique.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_subject_expand.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_subject_expand.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_subject_expand.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_template_units.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_template_units.3 deleted file mode 100644 index 8b46f5ce9b8..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ca_tbs_template_units.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_ca.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert.3 deleted file mode 100644 index b5ba5f97caf..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert.3 +++ /dev/null @@ -1,700 +0,0 @@ -.TH "hx509 certificate functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 certificate functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBhx509_cert_init\fP (hx509_context context, const Certificate *c, hx509_cert *cert)" -.br -.ti -1c -.RI "int \fBhx509_cert_init_data\fP (hx509_context context, const void *ptr, size_t len, hx509_cert *cert)" -.br -.ti -1c -.RI "void \fBhx509_cert_free\fP (hx509_cert cert)" -.br -.ti -1c -.RI "hx509_cert \fBhx509_cert_ref\fP (hx509_cert cert)" -.br -.ti -1c -.RI "void \fBhx509_verify_ctx_f_allow_default_trustanchors\fP (hx509_verify_ctx ctx, int boolean)" -.br -.ti -1c -.RI "int \fBhx509_cert_find_subjectAltName_otherName\fP (hx509_context context, hx509_cert cert, const heim_oid *oid, hx509_octet_string_list *list)" -.br -.ti -1c -.RI "int \fBhx509_cert_cmp\fP (hx509_cert p, hx509_cert q)" -.br -.ti -1c -.RI "int \fBhx509_cert_get_issuer\fP (hx509_cert p, hx509_name *name)" -.br -.ti -1c -.RI "int \fBhx509_cert_get_subject\fP (hx509_cert p, hx509_name *name)" -.br -.ti -1c -.RI "int \fBhx509_cert_get_base_subject\fP (hx509_context context, hx509_cert c, hx509_name *name)" -.br -.ti -1c -.RI "int \fBhx509_cert_get_serialnumber\fP (hx509_cert p, heim_integer *i)" -.br -.ti -1c -.RI "time_t \fBhx509_cert_get_notBefore\fP (hx509_cert p)" -.br -.ti -1c -.RI "time_t \fBhx509_cert_get_notAfter\fP (hx509_cert p)" -.br -.ti -1c -.RI "int \fBhx509_cert_get_SPKI\fP (hx509_context context, hx509_cert p, SubjectPublicKeyInfo *spki)" -.br -.ti -1c -.RI "int \fBhx509_cert_get_SPKI_AlgorithmIdentifier\fP (hx509_context context, hx509_cert p, AlgorithmIdentifier *alg)" -.br -.ti -1c -.RI "int \fBhx509_cert_get_issuer_unique_id\fP (hx509_context context, hx509_cert p, heim_bit_string *issuer)" -.br -.ti -1c -.RI "int \fBhx509_cert_get_subject_unique_id\fP (hx509_context context, hx509_cert p, heim_bit_string *subject)" -.br -.ti -1c -.RI "int \fBhx509_verify_hostname\fP (hx509_context context, const hx509_cert cert, int flags, hx509_hostname_type type, const char *hostname, const struct sockaddr *sa, int sa_size)" -.br -.ti -1c -.RI "hx509_cert_attribute \fBhx509_cert_get_attribute\fP (hx509_cert cert, const heim_oid *oid)" -.br -.ti -1c -.RI "int \fBhx509_cert_set_friendly_name\fP (hx509_cert cert, const char *name)" -.br -.ti -1c -.RI "const char * \fBhx509_cert_get_friendly_name\fP (hx509_cert cert)" -.br -.ti -1c -.RI "int \fBhx509_query_alloc\fP (hx509_context context, hx509_query **q)" -.br -.ti -1c -.RI "void \fBhx509_query_match_option\fP (hx509_query *q, hx509_query_option option)" -.br -.ti -1c -.RI "int \fBhx509_query_match_issuer_serial\fP (hx509_query *q, const Name *issuer, const heim_integer *serialNumber)" -.br -.ti -1c -.RI "int \fBhx509_query_match_friendly_name\fP (hx509_query *q, const char *name)" -.br -.ti -1c -.RI "int \fBhx509_query_match_eku\fP (hx509_query *q, const heim_oid *eku)" -.br -.ti -1c -.RI "int \fBhx509_query_match_cmp_func\fP (hx509_query *q, int(*func)(hx509_context, hx509_cert, void *), void *ctx)" -.br -.ti -1c -.RI "void \fBhx509_query_free\fP (hx509_context context, hx509_query *q)" -.br -.ti -1c -.RI "void \fBhx509_query_statistic_file\fP (hx509_context context, const char *fn)" -.br -.ti -1c -.RI "void \fBhx509_query_unparse_stats\fP (hx509_context context, int printtype, FILE *out)" -.br -.ti -1c -.RI "int \fBhx509_cert_check_eku\fP (hx509_context context, hx509_cert cert, const heim_oid *eku, int allow_any_eku)" -.br -.ti -1c -.RI "int \fBhx509_cert_binary\fP (hx509_context context, hx509_cert c, heim_octet_string *os)" -.br -.ti -1c -.RI "int \fBhx509_print_cert\fP (hx509_context context, hx509_cert cert, FILE *out)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBThe basic certificate\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "int hx509_cert_binary (hx509_context context, hx509_cert c, heim_octet_string * os)" -.PP -Encodes the hx509 certificate as a DER encode binary. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIc\fP the certificate to encode. -.br -\fIos\fP the encode certificate, set to NULL, 0 on case of error. Free the os->data with \fBhx509_xfree()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_cert_check_eku (hx509_context context, hx509_cert cert, const heim_oid * eku, int allow_any_eku)" -.PP -Check the extended key usage on the hx509 certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIcert\fP A hx509 context. -.br -\fIeku\fP the EKU to check for -.br -\fIallow_any_eku\fP if the any EKU is set, allow that to be a substitute. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_cert_cmp (hx509_cert p, hx509_cert q)" -.PP -Compare to hx509 certificate object, useful for sorting. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP a hx509 certificate object. -.br -\fIq\fP a hx509 certificate object. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 the objects are the same, returns > 0 is p is 'larger' then q, < 0 if p is 'smaller' then q. -.RE -.PP - -.SS "int hx509_cert_find_subjectAltName_otherName (hx509_context context, hx509_cert cert, const heim_oid * oid, hx509_octet_string_list * list)" -.PP -Return a list of subjectAltNames specified by oid in the certificate. On error the -.PP -The returned list of octet string should be freed with \fBhx509_free_octet_string_list()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIcert\fP a hx509 certificate object. -.br -\fIoid\fP an oid to for SubjectAltName. -.br -\fIlist\fP list of matching SubjectAltName. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_cert_free (hx509_cert cert)" -.PP -Free reference to the hx509 certificate object, if the refcounter reaches 0, the object if freed. Its allowed to pass in NULL. -.PP -\fBParameters:\fP -.RS 4 -\fIcert\fP the cert to free. -.RE -.PP - -.SS "hx509_cert_attribute hx509_cert_get_attribute (hx509_cert cert, const heim_oid * oid)" -.PP -Get an external attribute for the certificate, examples are friendly name and id. -.PP -\fBParameters:\fP -.RS 4 -\fIcert\fP hx509 certificate object to search -.br -\fIoid\fP an oid to search for. -.RE -.PP -\fBReturns:\fP -.RS 4 -an hx509_cert_attribute, only valid as long as the certificate is referenced. -.RE -.PP - -.SS "int hx509_cert_get_base_subject (hx509_context context, hx509_cert c, hx509_name * name)" -.PP -Return the name of the base subject of the hx509 certificate. If the certiicate is a verified proxy certificate, the this function return the base certificate (root of the proxy chain). If the proxy certificate is not verified with the base certificate HX509_PROXY_CERTIFICATE_NOT_CANONICALIZED is returned. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIc\fP a hx509 certificate object. -.br -\fIname\fP a pointer to a hx509 name, should be freed by \fBhx509_name_free()\fP. See also \fBhx509_cert_get_subject()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "const char* hx509_cert_get_friendly_name (hx509_cert cert)" -.PP -Get friendly name of the certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcert\fP cert to get the friendly name from. -.RE -.PP -\fBReturns:\fP -.RS 4 -an friendly name or NULL if there is. The friendly name is only valid as long as the certificate is referenced. -.RE -.PP - -.SS "int hx509_cert_get_issuer (hx509_cert p, hx509_name * name)" -.PP -Return the name of the issuer of the hx509 certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP a hx509 certificate object. -.br -\fIname\fP a pointer to a hx509 name, should be freed by \fBhx509_name_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_cert_get_issuer_unique_id (hx509_context context, hx509_cert p, heim_bit_string * issuer)" -.PP -Get a copy of the Issuer Unique ID -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509_context -.br -\fIp\fP a hx509 certificate -.br -\fIissuer\fP the issuer id returned, free with der_free_bit_string() -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. The error code HX509_EXTENSION_NOT_FOUND is returned if the certificate doesn't have a issuerUniqueID -.RE -.PP - -.SS "time_t hx509_cert_get_notAfter (hx509_cert p)" -.PP -Get notAfter time of the certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP a hx509 certificate object. -.RE -.PP -\fBReturns:\fP -.RS 4 -return not after time. -.RE -.PP - -.SS "time_t hx509_cert_get_notBefore (hx509_cert p)" -.PP -Get notBefore time of the certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP a hx509 certificate object. -.RE -.PP -\fBReturns:\fP -.RS 4 -return not before time -.RE -.PP - -.SS "int hx509_cert_get_serialnumber (hx509_cert p, heim_integer * i)" -.PP -Get serial number of the certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP a hx509 certificate object. -.br -\fIi\fP serial number, should be freed ith der_free_heim_integer(). -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_cert_get_SPKI (hx509_context context, hx509_cert p, SubjectPublicKeyInfo * spki)" -.PP -Get the SubjectPublicKeyInfo structure from the hx509 certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIp\fP a hx509 certificate object. -.br -\fIspki\fP SubjectPublicKeyInfo, should be freed with free_SubjectPublicKeyInfo(). -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_cert_get_SPKI_AlgorithmIdentifier (hx509_context context, hx509_cert p, AlgorithmIdentifier * alg)" -.PP -Get the AlgorithmIdentifier from the hx509 certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIp\fP a hx509 certificate object. -.br -\fIalg\fP AlgorithmIdentifier, should be freed with free_AlgorithmIdentifier(). The algorithmidentifier is typicly rsaEncryption, or id-ecPublicKey, or some other public key mechanism. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_cert_get_subject (hx509_cert p, hx509_name * name)" -.PP -Return the name of the subject of the hx509 certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP a hx509 certificate object. -.br -\fIname\fP a pointer to a hx509 name, should be freed by \fBhx509_name_free()\fP. See also \fBhx509_cert_get_base_subject()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_cert_get_subject_unique_id (hx509_context context, hx509_cert p, heim_bit_string * subject)" -.PP -Get a copy of the Subect Unique ID -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509_context -.br -\fIp\fP a hx509 certificate -.br -\fIsubject\fP the subject id returned, free with der_free_bit_string() -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. The error code HX509_EXTENSION_NOT_FOUND is returned if the certificate doesn't have a subjectUniqueID -.RE -.PP - -.SS "int hx509_cert_init (hx509_context context, const Certificate * c, hx509_cert * cert)" -.PP -Allocate and init an hx509 certificate object from the decoded certificate `c´. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIc\fP -.br -\fIcert\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.SS "int hx509_cert_init_data (hx509_context context, const void * ptr, size_t len, hx509_cert * cert)" -.PP -Just like \fBhx509_cert_init()\fP, but instead of a decode certificate takes an pointer and length to a memory region that contains a DER/BER encoded certificate. -.PP -If the memory region doesn't contain just the certificate and nothing more the function will fail with HX509_EXTRA_DATA_AFTER_STRUCTURE. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIptr\fP pointer to memory region containing encoded certificate. -.br -\fIlen\fP length of memory region. -.br -\fIcert\fP a return pointer to a hx509 certificate object, will contain NULL on error. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "hx509_cert hx509_cert_ref (hx509_cert cert)" -.PP -Add a reference to a hx509 certificate object. -.PP -\fBParameters:\fP -.RS 4 -\fIcert\fP a pointer to an hx509 certificate object. -.RE -.PP -\fBReturns:\fP -.RS 4 -the same object as is passed in. -.RE -.PP - -.SS "int hx509_cert_set_friendly_name (hx509_cert cert, const char * name)" -.PP -Set the friendly name on the certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcert\fP The certificate to set the friendly name on -.br -\fIname\fP Friendly name. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_print_cert (hx509_context context, hx509_cert cert, FILE * out)" -.PP -Print a simple representation of a certificate -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context, can be NULL -.br -\fIcert\fP certificate to print -.br -\fIout\fP the stdio output stream, if NULL, stdout is used -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code -.RE -.PP - -.SS "int hx509_query_alloc (hx509_context context, hx509_query ** q)" -.PP -Allocate an query controller. Free using \fBhx509_query_free()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIq\fP return pointer to a hx509_query. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_query_free (hx509_context context, hx509_query * q)" -.PP -Free the query controller. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIq\fP a pointer to the query controller. -.RE -.PP - -.SS "int hx509_query_match_cmp_func (hx509_query * q, int(*)(hx509_context, hx509_cert, void *) func, void * ctx)" -.PP -Set the query controller to match using a specific match function. -.PP -\fBParameters:\fP -.RS 4 -\fIq\fP a hx509 query controller. -.br -\fIfunc\fP function to use for matching, if the argument is NULL, the match function is removed. -.br -\fIctx\fP context passed to the function. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_query_match_eku (hx509_query * q, const heim_oid * eku)" -.PP -Set the query controller to require an one specific EKU (extended key usage). Any previous EKU matching is overwitten. If NULL is passed in as the eku, the EKU requirement is reset. -.PP -\fBParameters:\fP -.RS 4 -\fIq\fP a hx509 query controller. -.br -\fIeku\fP an EKU to match on. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_query_match_friendly_name (hx509_query * q, const char * name)" -.PP -Set the query controller to match on a friendly name -.PP -\fBParameters:\fP -.RS 4 -\fIq\fP a hx509 query controller. -.br -\fIname\fP a friendly name to match on -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_query_match_issuer_serial (hx509_query * q, const Name * issuer, const heim_integer * serialNumber)" -.PP -Set the issuer and serial number of match in the query controller. The function make copies of the isser and serial number. -.PP -\fBParameters:\fP -.RS 4 -\fIq\fP a hx509 query controller -.br -\fIissuer\fP issuer to search for -.br -\fIserialNumber\fP the serialNumber of the issuer. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_query_match_option (hx509_query * q, hx509_query_option option)" -.PP -Set match options for the hx509 query controller. -.PP -\fBParameters:\fP -.RS 4 -\fIq\fP query controller. -.br -\fIoption\fP options to control the query controller. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_query_statistic_file (hx509_context context, const char * fn)" -.PP -Set a statistic file for the query statistics. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIfn\fP statistics file name -.RE -.PP - -.SS "void hx509_query_unparse_stats (hx509_context context, int printtype, FILE * out)" -.PP -Unparse the statistics file and print the result on a FILE descriptor. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIprinttype\fP tyep to print -.br -\fIout\fP the FILE to write the data on. -.RE -.PP - -.SS "void hx509_verify_ctx_f_allow_default_trustanchors (hx509_verify_ctx ctx, int boolean)" -.PP -Allow using the operating system builtin trust anchors if no other trust anchors are configured. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP a verification context -.br -\fIboolean\fP if non zero, useing the operating systems builtin trust anchors. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_verify_hostname (hx509_context context, const hx509_cert cert, int flags, hx509_hostname_type type, const char * hostname, const struct sockaddr * sa, int sa_size)" -.PP -Verify that the certificate is allowed to be used for the hostname and address. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIcert\fP the certificate to match with -.br -\fIflags\fP Flags to modify the behavior: -.IP "\(bu" 2 -HX509_VHN_F_ALLOW_NO_MATCH no match is ok -.PP -.br -\fItype\fP type of hostname: -.IP "\(bu" 2 -HX509_HN_HOSTNAME for plain hostname. -.IP "\(bu" 2 -HX509_HN_DNSSRV for DNS SRV names. -.PP -.br -\fIhostname\fP the hostname to check -.br -\fIsa\fP address of the host -.br -\fIsa_size\fP length of address -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_binary.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_binary.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_binary.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_check_eku.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_check_eku.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_check_eku.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_cmp.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_cmp.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_cmp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_find_subjectAltName_otherName.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_find_subjectAltName_otherName.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_find_subjectAltName_otherName.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_free.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_SPKI.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_SPKI.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_SPKI.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_SPKI_AlgorithmIdentifier.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_SPKI_AlgorithmIdentifier.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_SPKI_AlgorithmIdentifier.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_attribute.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_attribute.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_attribute.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_base_subject.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_base_subject.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_base_subject.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_friendly_name.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_friendly_name.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_friendly_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_issuer.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_issuer.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_issuer.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_issuer_unique_id.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_issuer_unique_id.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_issuer_unique_id.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_notAfter.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_notAfter.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_notAfter.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_notBefore.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_notBefore.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_notBefore.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_serialnumber.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_serialnumber.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_serialnumber.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_subject.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_subject.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_subject.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_subject_unique_id.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_subject_unique_id.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_get_subject_unique_id.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_init.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_init.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_init_data.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_init_data.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_init_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_keyusage_print.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_keyusage_print.3 deleted file mode 100644 index 2577d70ee90..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_keyusage_print.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_print.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_ref.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_ref.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_ref.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_set_friendly_name.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_set_friendly_name.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cert_set_friendly_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_add.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_add.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_add.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_append.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_append.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_append.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_end_seq.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_end_seq.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_end_seq.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_filter.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_filter.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_filter.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_find.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_find.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_find.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_free.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_info.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_info.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_info.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_init.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_init.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_iter_f.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_iter_f.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_iter_f.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_merge.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_merge.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_merge.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_next_cert.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_next_cert.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_next_cert.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_start_seq.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_start_seq.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_start_seq.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_store.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_store.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_certs_store.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ci_print_names.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ci_print_names.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ci_print_names.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_clear_error_string.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_clear_error_string.3 deleted file mode 100644 index 191f0f0843f..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_clear_error_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_error.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms.3 deleted file mode 100644 index 11d497b1fad..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms.3 +++ /dev/null @@ -1,206 +0,0 @@ -.TH "hx509 CMS/pkcs7 functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 CMS/pkcs7 functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBhx509_cms_wrap_ContentInfo\fP (const heim_oid *oid, const heim_octet_string *buf, heim_octet_string *res)" -.br -.ti -1c -.RI "int \fBhx509_cms_unwrap_ContentInfo\fP (const heim_octet_string *in, heim_oid *oid, heim_octet_string *out, int *have_data)" -.br -.ti -1c -.RI "int \fBhx509_cms_unenvelope\fP (hx509_context context, hx509_certs certs, int flags, const void *data, size_t length, const heim_octet_string *encryptedContent, time_t time_now, heim_oid *contentType, heim_octet_string *content)" -.br -.ti -1c -.RI "int \fBhx509_cms_envelope_1\fP (hx509_context context, int flags, hx509_cert cert, const void *data, size_t length, const heim_oid *encryption_type, const heim_oid *contentType, heim_octet_string *content)" -.br -.ti -1c -.RI "int \fBhx509_cms_verify_signed\fP (hx509_context context, hx509_verify_ctx ctx, unsigned int flags, const void *data, size_t length, const heim_octet_string *signedContent, hx509_certs pool, heim_oid *contentType, heim_octet_string *content, hx509_certs *signer_certs)" -.br -.ti -1c -.RI "int \fBhx509_cms_create_signed_1\fP (hx509_context context, int flags, const heim_oid *eContentType, const void *data, size_t length, const AlgorithmIdentifier *digest_alg, hx509_cert cert, hx509_peer_info peer, hx509_certs anchors, hx509_certs pool, heim_octet_string *signed_data)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBCMS/PKCS7 message functions.\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "int hx509_cms_create_signed_1 (hx509_context context, int flags, const heim_oid * eContentType, const void * data, size_t length, const AlgorithmIdentifier * digest_alg, hx509_cert cert, hx509_peer_info peer, hx509_certs anchors, hx509_certs pool, heim_octet_string * signed_data)" -.PP -Decode SignedData and verify that the signature is correct. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIflags\fP -.br -\fIeContentType\fP the type of the data. -.br -\fIdata\fP data to sign -.br -\fIlength\fP length of the data that data point to. -.br -\fIdigest_alg\fP digest algorithm to use, use NULL to get the default or the peer determined algorithm. -.br -\fIcert\fP certificate to use for sign the data. -.br -\fIpeer\fP info about the peer the message to send the message to, like what digest algorithm to use. -.br -\fIanchors\fP trust anchors that the client will use, used to polulate the certificates included in the message -.br -\fIpool\fP certificates to use in try to build the path to the trust anchors. -.br -\fIsigned_data\fP the output of the function, free with der_free_octet_string(). -.RE -.PP - -.SS "int hx509_cms_envelope_1 (hx509_context context, int flags, hx509_cert cert, const void * data, size_t length, const heim_oid * encryption_type, const heim_oid * contentType, heim_octet_string * content)" -.PP -Encrypt end encode EnvelopedData. -.PP -Encrypt and encode EnvelopedData. The data is encrypted with a random key and the the random key is encrypted with the certificates private key. This limits what private key type can be used to RSA. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIflags\fP flags to control the behavior. -.IP "\(bu" 2 -HX509_CMS_EV_NO_KU_CHECK - Dont check KU on certificate -.IP "\(bu" 2 -HX509_CMS_EV_ALLOW_WEAK - Allow weak crytpo -.IP "\(bu" 2 -HX509_CMS_EV_ID_NAME - prefer issuer name and serial number -.PP -.br -\fIcert\fP Certificate to encrypt the EnvelopedData encryption key with. -.br -\fIdata\fP pointer the data to encrypt. -.br -\fIlength\fP length of the data that data point to. -.br -\fIencryption_type\fP Encryption cipher to use for the bulk data, use NULL to get default. -.br -\fIcontentType\fP type of the data that is encrypted -.br -\fIcontent\fP the output of the function, free with der_free_octet_string(). -.RE -.PP - -.SS "int hx509_cms_unenvelope (hx509_context context, hx509_certs certs, int flags, const void * data, size_t length, const heim_octet_string * encryptedContent, time_t time_now, heim_oid * contentType, heim_octet_string * content)" -.PP -Decode and unencrypt EnvelopedData. -.PP -Extract data and parameteres from from the EnvelopedData. Also supports using detached EnvelopedData. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIcerts\fP Certificate that can decrypt the EnvelopedData encryption key. -.br -\fIflags\fP HX509_CMS_UE flags to control the behavior. -.br -\fIdata\fP pointer the structure the contains the DER/BER encoded EnvelopedData stucture. -.br -\fIlength\fP length of the data that data point to. -.br -\fIencryptedContent\fP in case of detached signature, this contains the actual encrypted data, othersize its should be NULL. -.br -\fItime_now\fP set the current time, if zero the library uses now as the date. -.br -\fIcontentType\fP output type oid, should be freed with der_free_oid(). -.br -\fIcontent\fP the data, free with der_free_octet_string(). -.RE -.PP - -.SS "int hx509_cms_unwrap_ContentInfo (const heim_octet_string * in, heim_oid * oid, heim_octet_string * out, int * have_data)" -.PP -Decode an ContentInfo and unwrap data and oid it. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP the encoded buffer. -.br -\fIoid\fP type of the content. -.br -\fIout\fP data to be wrapped. -.br -\fIhave_data\fP since the data is optional, this flags show dthe diffrence between no data and the zero length data. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.SS "int hx509_cms_verify_signed (hx509_context context, hx509_verify_ctx ctx, unsigned int flags, const void * data, size_t length, const heim_octet_string * signedContent, hx509_certs pool, heim_oid * contentType, heim_octet_string * content, hx509_certs * signer_certs)" -.PP -Decode SignedData and verify that the signature is correct. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIctx\fP a hx509 verify context. -.br -\fIflags\fP to control the behaivor of the function. -.IP "\(bu" 2 -HX509_CMS_VS_NO_KU_CHECK - Don't check KeyUsage -.IP "\(bu" 2 -HX509_CMS_VS_ALLOW_DATA_OID_MISMATCH - allow oid mismatch -.IP "\(bu" 2 -HX509_CMS_VS_ALLOW_ZERO_SIGNER - no signer, see below. -.PP -.br -\fIdata\fP pointer to CMS SignedData encoded data. -.br -\fIlength\fP length of the data that data point to. -.br -\fIsignedContent\fP external data used for signature. -.br -\fIpool\fP certificate pool to build certificates paths. -.br -\fIcontentType\fP free with der_free_oid(). -.br -\fIcontent\fP the output of the function, free with der_free_octet_string(). -.br -\fIsigner_certs\fP list of the cerficates used to sign this request, free with \fBhx509_certs_free()\fP. -.RE -.PP - -.PP -If HX509_CMS_VS_NO_KU_CHECK is set, allow more liberal search for matching certificates by not considering KeyUsage bits on the certificates. -.PP -If HX509_CMS_VS_ALLOW_DATA_OID_MISMATCH, allow encapContentInfo mismatch with the oid in signedAttributes (or if no signedAttributes where use, pkcs7-data oid). This is only needed to work with broken CMS implementations that doesn't follow CMS signedAttributes rules. -.PP -If HX509_CMS_VS_NO_VALIDATE flags is set, do not verify the signing certificates and leave that up to the caller. -.PP -If HX509_CMS_VS_ALLOW_ZERO_SIGNER is set, allow empty SignerInfo (no signatures). If SignedData have no signatures, the function will return 0 with signer_certs set to NULL. Zero signers is allowed by the standard, but since its only useful in corner cases, it make into a flag that the caller have to turn on. -.SS "int hx509_cms_wrap_ContentInfo (const heim_oid * oid, const heim_octet_string * buf, heim_octet_string * res)" -.PP -Wrap data and oid in a ContentInfo and encode it. -.PP -\fBParameters:\fP -.RS 4 -\fIoid\fP type of the content. -.br -\fIbuf\fP data to be wrapped. If a NULL pointer is passed in, the optional content field in the ContentInfo is not going be filled in. -.br -\fIres\fP the encoded buffer, the result should be freed with der_free_octet_string(). -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_create_signed_1.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_create_signed_1.3 deleted file mode 100644 index ce2803ea99d..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_create_signed_1.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cms.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_envelope_1.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_envelope_1.3 deleted file mode 100644 index ce2803ea99d..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_envelope_1.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cms.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_unenvelope.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_unenvelope.3 deleted file mode 100644 index ce2803ea99d..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_unenvelope.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cms.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_unwrap_ContentInfo.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_unwrap_ContentInfo.3 deleted file mode 100644 index ce2803ea99d..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_unwrap_ContentInfo.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cms.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_verify_signed.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_verify_signed.3 deleted file mode 100644 index ce2803ea99d..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_verify_signed.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cms.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_wrap_ContentInfo.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_wrap_ContentInfo.3 deleted file mode 100644 index ce2803ea99d..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_cms_wrap_ContentInfo.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cms.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_free.3 deleted file mode 100644 index 19c5e816ac6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_init.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_init.3 deleted file mode 100644 index 19c5e816ac6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_set_missing_revoke.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_set_missing_revoke.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_context_set_missing_revoke.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_add_revoked_certs.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_add_revoked_certs.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_add_revoked_certs.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_alloc.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_alloc.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_alloc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_free.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_lifetime.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_lifetime.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_lifetime.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_sign.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_sign.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crl_sign.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crypto.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crypto.3 deleted file mode 100644 index 9a879e98fdb..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_crypto.3 +++ /dev/null @@ -1,40 +0,0 @@ -.TH "hx509 crypto functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 crypto functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBhx509_verify_signature\fP (hx509_context context, const hx509_cert signer, const AlgorithmIdentifier *alg, const heim_octet_string *data, const heim_octet_string *sig)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "int hx509_verify_signature (hx509_context context, const hx509_cert signer, const AlgorithmIdentifier * alg, const heim_octet_string * data, const heim_octet_string * sig)" -.PP -Verify a signature made using the private key of an certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIsigner\fP the certificate that made the signature. -.br -\fIalg\fP algorthm that was used to sign the data. -.br -\fIdata\fP the data that was signed. -.br -\fIsig\fP the sigature to verify. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env.3 deleted file mode 100644 index b21c54d5f93..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env.3 +++ /dev/null @@ -1,143 +0,0 @@ -.TH "hx509 enviroment functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 enviroment functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBhx509_env_add\fP (hx509_context context, hx509_env *env, const char *key, const char *value)" -.br -.ti -1c -.RI "int \fBhx509_env_add_binding\fP (hx509_context context, hx509_env *env, const char *key, hx509_env list)" -.br -.ti -1c -.RI "const char * \fBhx509_env_lfind\fP (hx509_context context, hx509_env env, const char *key, size_t len)" -.br -.ti -1c -.RI "const char * \fBhx509_env_find\fP (hx509_context context, hx509_env env, const char *key)" -.br -.ti -1c -.RI "hx509_env \fBhx509_env_find_binding\fP (hx509_context context, hx509_env env, const char *key)" -.br -.ti -1c -.RI "void \fBhx509_env_free\fP (hx509_env *env)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "int hx509_env_add (hx509_context context, hx509_env * env, const char * key, const char * value)" -.PP -Add a new key/value pair to the hx509_env. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIenv\fP enviroment to add the enviroment variable too. -.br -\fIkey\fP key to add -.br -\fIvalue\fP value to add -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_env_add_binding (hx509_context context, hx509_env * env, const char * key, hx509_env list)" -.PP -Add a new key/binding pair to the hx509_env. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIenv\fP enviroment to add the enviroment variable too. -.br -\fIkey\fP key to add -.br -\fIlist\fP binding list to add -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "const char* hx509_env_find (hx509_context context, hx509_env env, const char * key)" -.PP -Search the hx509_env for a key. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIenv\fP enviroment to add the enviroment variable too. -.br -\fIkey\fP key to search for. -.RE -.PP -\fBReturns:\fP -.RS 4 -the value if the key is found, NULL otherwise. -.RE -.PP - -.SS "hx509_env hx509_env_find_binding (hx509_context context, hx509_env env, const char * key)" -.PP -Search the hx509_env for a binding. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIenv\fP enviroment to add the enviroment variable too. -.br -\fIkey\fP key to search for. -.RE -.PP -\fBReturns:\fP -.RS 4 -the binding if the key is found, NULL if not found. -.RE -.PP - -.SS "void hx509_env_free (hx509_env * env)" -.PP -Free an hx509_env enviroment context. -.PP -\fBParameters:\fP -.RS 4 -\fIenv\fP the enviroment to free. -.RE -.PP - -.SS "const char* hx509_env_lfind (hx509_context context, hx509_env env, const char * key, size_t len)" -.PP -Search the hx509_env for a length based key. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIenv\fP enviroment to add the enviroment variable too. -.br -\fIkey\fP key to search for. -.br -\fIlen\fP length of key. -.RE -.PP -\fBReturns:\fP -.RS 4 -the value if the key is found, NULL otherwise. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_add.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_add.3 deleted file mode 100644 index cdf891871ad..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_add.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_env.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_add_binding.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_add_binding.3 deleted file mode 100644 index cdf891871ad..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_add_binding.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_env.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_find.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_find.3 deleted file mode 100644 index cdf891871ad..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_find.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_env.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_find_binding.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_find_binding.3 deleted file mode 100644 index cdf891871ad..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_find_binding.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_env.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_free.3 deleted file mode 100644 index cdf891871ad..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_env.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_lfind.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_lfind.3 deleted file mode 100644 index cdf891871ad..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_env_lfind.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_env.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_err.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_err.3 deleted file mode 100644 index 191f0f0843f..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_err.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_error.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_error.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_error.3 deleted file mode 100644 index 15b936fe219..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_error.3 +++ /dev/null @@ -1,129 +0,0 @@ -.TH "hx509 error functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 error functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "void \fBhx509_clear_error_string\fP (hx509_context context)" -.br -.ti -1c -.RI "void \fBhx509_set_error_stringv\fP (hx509_context context, int flags, int code, const char *fmt, va_list ap)" -.br -.ti -1c -.RI "void \fBhx509_set_error_string\fP (hx509_context context, int flags, int code, const char *fmt,...)" -.br -.ti -1c -.RI "char * \fBhx509_get_error_string\fP (hx509_context context, int error_code)" -.br -.ti -1c -.RI "void \fBhx509_free_error_string\fP (char *str)" -.br -.ti -1c -.RI "void \fBhx509_err\fP (hx509_context context, int exit_code, int error_code, const char *fmt,...)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBHx509 error reporting functions\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "void hx509_clear_error_string (hx509_context context)" -.PP -Resets the error strings the hx509 context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.RE -.PP - -.SS "void hx509_err (hx509_context context, int exit_code, int error_code, const char * fmt, ...)" -.PP -Print error message and fatally exit from error code -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIexit_code\fP exit() code from process. -.br -\fIerror_code\fP Error code for the reason to exit. -.br -\fIfmt\fP format string with the exit message. -.br -\fI...\fP argument to format string. -.RE -.PP - -.SS "void hx509_free_error_string (char * str)" -.PP -Free error string returned by \fBhx509_get_error_string()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIstr\fP error string to free. -.RE -.PP - -.SS "char* hx509_get_error_string (hx509_context context, int error_code)" -.PP -Get an error string from context associated with error_code. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIerror_code\fP Get error message for this error code. -.RE -.PP -\fBReturns:\fP -.RS 4 -error string, free with \fBhx509_free_error_string()\fP. -.RE -.PP - -.SS "void hx509_set_error_string (hx509_context context, int flags, int code, const char * fmt, ...)" -.PP -See \fBhx509_set_error_stringv()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIflags\fP -.IP "\(bu" 2 -HX509_ERROR_APPEND appends the error string to the old messages (code is updated). -.PP -.br -\fIcode\fP error code related to error message -.br -\fIfmt\fP error message format -.br -\fI...\fP arguments to error message format -.RE -.PP - -.SS "void hx509_set_error_stringv (hx509_context context, int flags, int code, const char * fmt, va_list ap)" -.PP -Add an error message to the hx509 context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIflags\fP -.IP "\(bu" 2 -HX509_ERROR_APPEND appends the error string to the old messages (code is updated). -.PP -.br -\fIcode\fP error code related to error message -.br -\fIfmt\fP error message format -.br -\fIap\fP arguments to error message format -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_free_error_string.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_free_error_string.3 deleted file mode 100644 index 191f0f0843f..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_free_error_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_error.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_free_octet_string_list.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_free_octet_string_list.3 deleted file mode 100644 index f58308e8cd1..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_free_octet_string_list.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_misc.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_general_name_unparse.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_general_name_unparse.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_general_name_unparse.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_get_error_string.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_get_error_string.3 deleted file mode 100644 index 191f0f0843f..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_get_error_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_error.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_get_one_cert.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_get_one_cert.3 deleted file mode 100644 index 4543cfc8ff9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_get_one_cert.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_keyset.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_keyset.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_keyset.3 deleted file mode 100644 index 9805ae8896f..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_keyset.3 +++ /dev/null @@ -1,373 +0,0 @@ -.TH "hx509 certificate store functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 certificate store functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBhx509_certs_init\fP (hx509_context context, const char *name, int flags, hx509_lock lock, hx509_certs *certs)" -.br -.ti -1c -.RI "int \fBhx509_certs_store\fP (hx509_context context, hx509_certs certs, int flags, hx509_lock lock)" -.br -.ti -1c -.RI "void \fBhx509_certs_free\fP (hx509_certs *certs)" -.br -.ti -1c -.RI "int \fBhx509_certs_start_seq\fP (hx509_context context, hx509_certs certs, hx509_cursor *cursor)" -.br -.ti -1c -.RI "int \fBhx509_certs_next_cert\fP (hx509_context context, hx509_certs certs, hx509_cursor cursor, hx509_cert *cert)" -.br -.ti -1c -.RI "int \fBhx509_certs_end_seq\fP (hx509_context context, hx509_certs certs, hx509_cursor cursor)" -.br -.ti -1c -.RI "int \fBhx509_certs_iter_f\fP (hx509_context context, hx509_certs certs, int(*func)(hx509_context, void *, hx509_cert), void *ctx)" -.br -.ti -1c -.RI "int \fBhx509_ci_print_names\fP (hx509_context context, void *ctx, hx509_cert c)" -.br -.ti -1c -.RI "int \fBhx509_certs_add\fP (hx509_context context, hx509_certs certs, hx509_cert cert)" -.br -.ti -1c -.RI "int \fBhx509_certs_find\fP (hx509_context context, hx509_certs certs, const hx509_query *q, hx509_cert *r)" -.br -.ti -1c -.RI "int \fBhx509_certs_filter\fP (hx509_context context, hx509_certs certs, const hx509_query *q, hx509_certs *result)" -.br -.ti -1c -.RI "int \fBhx509_certs_merge\fP (hx509_context context, hx509_certs to, hx509_certs from)" -.br -.ti -1c -.RI "int \fBhx509_certs_append\fP (hx509_context context, hx509_certs to, hx509_lock lock, const char *name)" -.br -.ti -1c -.RI "int \fBhx509_get_one_cert\fP (hx509_context context, hx509_certs certs, hx509_cert *c)" -.br -.ti -1c -.RI "int \fBhx509_certs_info\fP (hx509_context context, hx509_certs certs, int(*func)(void *, const char *), void *ctx)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBCertificate store operations\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "int hx509_certs_add (hx509_context context, hx509_certs certs, hx509_cert cert)" -.PP -Add a certificate to the certificiate store. -.PP -The receiving keyset certs will either increase reference counter of the cert or make a deep copy, either way, the caller needs to free the cert itself. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcerts\fP certificate store to add the certificate to. -.br -\fIcert\fP certificate to add. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.SS "int hx509_certs_append (hx509_context context, hx509_certs to, hx509_lock lock, const char * name)" -.PP -Same a \fBhx509_certs_merge()\fP but use a lock and name to describe the from source. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIto\fP the store to merge into. -.br -\fIlock\fP a lock that unlocks the certificates store, use NULL to select no password/certifictes/prompt lock (see \fBLocking and unlocking certificates and encrypted data.\fP). -.br -\fIname\fP name of the source store -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.SS "int hx509_certs_end_seq (hx509_context context, hx509_certs certs, hx509_cursor cursor)" -.PP -End the iteration over certificates. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcerts\fP certificate store to iterate over. -.br -\fIcursor\fP cursor that will keep track of progress, freed. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.SS "int hx509_certs_filter (hx509_context context, hx509_certs certs, const hx509_query * q, hx509_certs * result)" -.PP -Filter certificate matching the query. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcerts\fP certificate store to search. -.br -\fIq\fP query allocated with \fBhx509 query functions\fP functions. -.br -\fIresult\fP the filtered certificate store, caller must free with \fBhx509_certs_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.PP -Return HX509_CERT_NOT_FOUND if no certificate in certs matched the query. -.SS "int hx509_certs_find (hx509_context context, hx509_certs certs, const hx509_query * q, hx509_cert * r)" -.PP -Find a certificate matching the query. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcerts\fP certificate store to search. -.br -\fIq\fP query allocated with \fBhx509 query functions\fP functions. -.br -\fIr\fP return certificate (or NULL on error), should be freed with \fBhx509_cert_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.PP -Return HX509_CERT_NOT_FOUND if no certificate in certs matched the query. -.SS "void hx509_certs_free (hx509_certs * certs)" -.PP -Free a certificate store. -.PP -\fBParameters:\fP -.RS 4 -\fIcerts\fP certificate store to free. -.RE -.PP - -.SS "int hx509_certs_info (hx509_context context, hx509_certs certs, int(*)(void *, const char *) func, void * ctx)" -.PP -Print some info about the certificate store. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcerts\fP certificate store to print information about. -.br -\fIfunc\fP function that will get each line of the information, if NULL is used the data is printed on a FILE descriptor that should be passed in ctx, if ctx also is NULL, stdout is used. -.br -\fIctx\fP parameter to func. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.SS "int hx509_certs_init (hx509_context context, const char * name, int flags, hx509_lock lock, hx509_certs * certs)" -.PP -Open or creates a new hx509 certificate store. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context -.br -\fIname\fP name of the store, format is TYPE:type-specific-string, if NULL is used the MEMORY store is used. -.br -\fIflags\fP list of flags: -.IP "\(bu" 2 -HX509_CERTS_CREATE create a new keystore of the specific TYPE. -.IP "\(bu" 2 -HX509_CERTS_UNPROTECT_ALL fails if any private key failed to be extracted. -.PP -.br -\fIlock\fP a lock that unlocks the certificates store, use NULL to select no password/certifictes/prompt lock (see \fBLocking and unlocking certificates and encrypted data.\fP). -.br -\fIcerts\fP return pointer, free with \fBhx509_certs_free()\fP. -.RE -.PP - -.SS "int hx509_certs_iter_f (hx509_context context, hx509_certs certs, int(*)(hx509_context, void *, hx509_cert) func, void * ctx)" -.PP -Iterate over all certificates in a keystore and call an function for each fo them. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcerts\fP certificate store to iterate over. -.br -\fIfunc\fP function to call for each certificate. The function should return non-zero to abort the iteration, that value is passed back to the caller of \fBhx509_certs_iter_f()\fP. -.br -\fIctx\fP context variable that will passed to the function. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.SS "int hx509_certs_merge (hx509_context context, hx509_certs to, hx509_certs from)" -.PP -Merge a certificate store into another. The from store is keep intact. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIto\fP the store to merge into. -.br -\fIfrom\fP the store to copy the object from. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.SS "int hx509_certs_next_cert (hx509_context context, hx509_certs certs, hx509_cursor cursor, hx509_cert * cert)" -.PP -Get next ceritificate from the certificate keystore pointed out by cursor. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcerts\fP certificate store to iterate over. -.br -\fIcursor\fP cursor that keeps track of progress. -.br -\fIcert\fP return certificate next in store, NULL if the store contains no more certificates. Free with \fBhx509_cert_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.SS "int hx509_certs_start_seq (hx509_context context, hx509_certs certs, hx509_cursor * cursor)" -.PP -Start the integration -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcerts\fP certificate store to iterate over -.br -\fIcursor\fP cursor that will keep track of progress, free with \fBhx509_certs_end_seq()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. HX509_UNSUPPORTED_OPERATION is returned if the certificate store doesn't support the iteration operation. -.RE -.PP - -.SS "int hx509_certs_store (hx509_context context, hx509_certs certs, int flags, hx509_lock lock)" -.PP -Write the certificate store to stable storage. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIcerts\fP a certificate store to store. -.br -\fIflags\fP currently unused, use 0. -.br -\fIlock\fP a lock that unlocks the certificates store, use NULL to select no password/certifictes/prompt lock (see \fBLocking and unlocking certificates and encrypted data.\fP). -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. HX509_UNSUPPORTED_OPERATION if the certificate store doesn't support the store operation. -.RE -.PP - -.SS "int hx509_ci_print_names (hx509_context context, void * ctx, hx509_cert c)" -.PP -Iterate over all certificates in a keystore and call an function for each fo them. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcerts\fP certificate store to iterate over. -.br -\fIfunc\fP function to call for each certificate. The function should return non-zero to abort the iteration, that value is passed back to the caller of hx509_certs_iter(). -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. Function to use to \fBhx509_certs_iter_f()\fP as a function argument, the ctx variable to \fBhx509_certs_iter_f()\fP should be a FILE file descriptor. -.RE -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIctx\fP used by \fBhx509_certs_iter_f()\fP. -.br -\fIc\fP a certificate -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - -.SS "int hx509_get_one_cert (hx509_context context, hx509_certs certs, hx509_cert * c)" -.PP -Get one random certificate from the certificate store. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcerts\fP a certificate store to get the certificate from. -.br -\fIc\fP return certificate, should be freed with \fBhx509_cert_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns an hx509 error code. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_lock.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_lock.3 deleted file mode 100644 index 18d6fab67a0..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_lock.3 +++ /dev/null @@ -1,5 +0,0 @@ -.TH "hx509 lock functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 lock functions \- See the \fBLocking and unlocking certificates and encrypted data.\fP for description and examples. diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_misc.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_misc.3 deleted file mode 100644 index e86ee7f1ae0..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_misc.3 +++ /dev/null @@ -1,40 +0,0 @@ -.TH "hx509 misc functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 misc functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "void \fBhx509_free_octet_string_list\fP (hx509_octet_string_list *list)" -.br -.ti -1c -.RI "void \fBhx509_xfree\fP (void *ptr)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "void hx509_free_octet_string_list (hx509_octet_string_list * list)" -.PP -Free a list of octet strings returned by another hx509 library function. -.PP -\fBParameters:\fP -.RS 4 -\fIlist\fP list to be freed. -.RE -.PP - -.SS "void hx509_xfree (void * ptr)" -.PP -Free a data element allocated in the library. -.PP -\fBParameters:\fP -.RS 4 -\fIptr\fP data to be freed. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name.3 deleted file mode 100644 index 5bf90d5faca..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name.3 +++ /dev/null @@ -1,235 +0,0 @@ -.TH "hx509 name functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 name functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBhx509_name_to_string\fP (const hx509_name name, char **str)" -.br -.ti -1c -.RI "int \fBhx509_name_cmp\fP (hx509_name n1, hx509_name n2)" -.br -.ti -1c -.RI "int \fBhx509_parse_name\fP (hx509_context context, const char *str, hx509_name *name)" -.br -.ti -1c -.RI "int \fBhx509_name_copy\fP (hx509_context context, const hx509_name from, hx509_name *to)" -.br -.ti -1c -.RI "int \fBhx509_name_to_Name\fP (const hx509_name from, Name *to)" -.br -.ti -1c -.RI "int \fBhx509_name_expand\fP (hx509_context context, hx509_name name, hx509_env env)" -.br -.ti -1c -.RI "void \fBhx509_name_free\fP (hx509_name *name)" -.br -.ti -1c -.RI "int \fBhx509_unparse_der_name\fP (const void *data, size_t length, char **str)" -.br -.ti -1c -.RI "int \fBhx509_name_binary\fP (const hx509_name name, heim_octet_string *os)" -.br -.ti -1c -.RI "int \fBhx509_name_is_null_p\fP (const hx509_name name)" -.br -.ti -1c -.RI "int \fBhx509_general_name_unparse\fP (GeneralName *name, char **str)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBPKIX/X.509 Names\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "int hx509_general_name_unparse (GeneralName * name, char ** str)" -.PP -Unparse the hx509 name in name into a string. -.PP -\fBParameters:\fP -.RS 4 -\fIname\fP the name to print -.br -\fIstr\fP an allocated string returns the name in string form -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_name_binary (const hx509_name name, heim_octet_string * os)" -.PP -Convert a hx509_name object to DER encoded name. -.PP -\fBParameters:\fP -.RS 4 -\fIname\fP name to concert -.br -\fIos\fP data to a DER encoded name, free the resulting octet string with hx509_xfree(os->data). -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_name_cmp (hx509_name n1, hx509_name n2)" -.PP -Compare to hx509 name object, useful for sorting. -.PP -\fBParameters:\fP -.RS 4 -\fIn1\fP a hx509 name object. -.br -\fIn2\fP a hx509 name object. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 the objects are the same, returns > 0 is n2 is 'larger' then n2, < 0 if n1 is 'smaller' then n2. -.RE -.PP - -.SS "int hx509_name_copy (hx509_context context, const hx509_name from, hx509_name * to)" -.PP -Copy a hx509 name object. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 cotext. -.br -\fIfrom\fP the name to copy from -.br -\fIto\fP the name to copy to -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_name_expand (hx509_context context, hx509_name name, hx509_env env)" -.PP -Expands variables in the name using env. Variables are on the form ${name}. Useful when dealing with certificate templates. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 cotext. -.br -\fIname\fP the name to expand. -.br -\fIenv\fP environment variable to expand. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.PP -Only UTF8String rdnSequence names are allowed -.SS "void hx509_name_free (hx509_name * name)" -.PP -Free a hx509 name object, upond return *name will be NULL. -.PP -\fBParameters:\fP -.RS 4 -\fIname\fP a hx509 name object to be freed. -.RE -.PP - -.SS "int hx509_name_is_null_p (const hx509_name name)" -.PP -Unparse the hx509 name in name into a string. -.PP -\fBParameters:\fP -.RS 4 -\fIname\fP the name to check if its empty/null. -.RE -.PP -\fBReturns:\fP -.RS 4 -non zero if the name is empty/null. -.RE -.PP - -.SS "int hx509_name_to_Name (const hx509_name from, Name * to)" -.PP -Convert a hx509_name into a Name. -.PP -\fBParameters:\fP -.RS 4 -\fIfrom\fP the name to copy from -.br -\fIto\fP the name to copy to -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_name_to_string (const hx509_name name, char ** str)" -.PP -Convert the hx509 name object into a printable string. The resulting string should be freed with free(). -.PP -\fBParameters:\fP -.RS 4 -\fIname\fP name to print -.br -\fIstr\fP the string to return -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_parse_name (hx509_context context, const char * str, hx509_name * name)" -.PP -Parse a string into a hx509 name object. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIstr\fP a string to parse. -.br -\fIname\fP the resulting object, NULL in case of error. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_unparse_der_name (const void * data, size_t length, char ** str)" -.PP -Convert a DER encoded name info a string. -.PP -\fBParameters:\fP -.RS 4 -\fIdata\fP data to a DER/BER encoded name -.br -\fIlength\fP length of data -.br -\fIstr\fP the resulting string, is NULL on failure. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_binary.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_binary.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_binary.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_cmp.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_cmp.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_cmp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_copy.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_copy.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_copy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_expand.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_expand.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_expand.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_free.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_is_null_p.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_is_null_p.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_is_null_p.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_to_Name.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_to_Name.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_to_Name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_to_string.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_to_string.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_name_to_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ocsp_request.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ocsp_request.3 deleted file mode 100644 index d7d6ccf0d93..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ocsp_request.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_revoke.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ocsp_verify.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ocsp_verify.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_ocsp_verify.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_oid_print.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_oid_print.3 deleted file mode 100644 index 2577d70ee90..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_oid_print.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_print.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_oid_sprint.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_oid_sprint.3 deleted file mode 100644 index 2577d70ee90..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_oid_sprint.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_print.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_parse_name.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_parse_name.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_parse_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer.3 deleted file mode 100644 index cbec4506e5c..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer.3 +++ /dev/null @@ -1,113 +0,0 @@ -.TH "hx509 certificate selecting functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 certificate selecting functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBhx509_peer_info_alloc\fP (hx509_context context, hx509_peer_info *peer)" -.br -.ti -1c -.RI "void \fBhx509_peer_info_free\fP (hx509_peer_info peer)" -.br -.ti -1c -.RI "int \fBhx509_peer_info_set_cert\fP (hx509_peer_info peer, hx509_cert cert)" -.br -.ti -1c -.RI "int \fBhx509_peer_info_add_cms_alg\fP (hx509_context context, hx509_peer_info peer, const AlgorithmIdentifier *val)" -.br -.ti -1c -.RI "int \fBhx509_peer_info_set_cms_algs\fP (hx509_context context, hx509_peer_info peer, const AlgorithmIdentifier *val, size_t len)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "int hx509_peer_info_add_cms_alg (hx509_context context, hx509_peer_info peer, const AlgorithmIdentifier * val)" -.PP -Add an additional algorithm that the peer supports. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIpeer\fP the peer to set the new algorithms for -.br -\fIval\fP an AlgorithmsIdentier to add -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_peer_info_alloc (hx509_context context, hx509_peer_info * peer)" -.PP -Allocate a new peer info structure an init it to default values. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIpeer\fP return an allocated peer, free with \fBhx509_peer_info_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_peer_info_free (hx509_peer_info peer)" -.PP -Free a peer info structure. -.PP -\fBParameters:\fP -.RS 4 -\fIpeer\fP peer info to be freed. -.RE -.PP - -.SS "int hx509_peer_info_set_cert (hx509_peer_info peer, hx509_cert cert)" -.PP -Set the certificate that remote peer is using. -.PP -\fBParameters:\fP -.RS 4 -\fIpeer\fP peer info to update -.br -\fIcert\fP cerificate of the remote peer. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_peer_info_set_cms_algs (hx509_context context, hx509_peer_info peer, const AlgorithmIdentifier * val, size_t len)" -.PP -Set the algorithms that the peer supports. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIpeer\fP the peer to set the new algorithms for -.br -\fIval\fP array of supported AlgorithmsIdentiers -.br -\fIlen\fP length of array val. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_add_cms_alg.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_add_cms_alg.3 deleted file mode 100644 index b6a9f0fae0b..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_add_cms_alg.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_peer.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_alloc.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_alloc.3 deleted file mode 100644 index b6a9f0fae0b..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_alloc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_peer.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_free.3 deleted file mode 100644 index b6a9f0fae0b..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_peer.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_set_cert.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_set_cert.3 deleted file mode 100644 index b6a9f0fae0b..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_set_cert.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_peer.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_set_cms_algs.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_set_cms_algs.3 deleted file mode 100644 index b6a9f0fae0b..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_peer_info_set_cms_algs.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_peer.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print.3 deleted file mode 100644 index d64060ef3a7..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print.3 +++ /dev/null @@ -1,211 +0,0 @@ -.TH "hx509 printing functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 printing functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "void \fBhx509_print_stdout\fP (void *ctx, const char *fmt, va_list va)" -.br -.ti -1c -.RI "int \fBhx509_oid_sprint\fP (const heim_oid *oid, char **str)" -.br -.ti -1c -.RI "void \fBhx509_oid_print\fP (const heim_oid *oid, hx509_vprint_func func, void *ctx)" -.br -.ti -1c -.RI "void \fBhx509_bitstring_print\fP (const heim_bit_string *b, hx509_vprint_func func, void *ctx)" -.br -.ti -1c -.RI "int \fBhx509_cert_keyusage_print\fP (hx509_context context, hx509_cert c, char **s)" -.br -.ti -1c -.RI "int \fBhx509_validate_ctx_init\fP (hx509_context context, hx509_validate_ctx *ctx)" -.br -.ti -1c -.RI "void \fBhx509_validate_ctx_set_print\fP (hx509_validate_ctx ctx, hx509_vprint_func func, void *c)" -.br -.ti -1c -.RI "void \fBhx509_validate_ctx_add_flags\fP (hx509_validate_ctx ctx, int flags)" -.br -.ti -1c -.RI "void \fBhx509_validate_ctx_free\fP (hx509_validate_ctx ctx)" -.br -.ti -1c -.RI "int \fBhx509_validate_cert\fP (hx509_context context, hx509_validate_ctx ctx, hx509_cert cert)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "void hx509_bitstring_print (const heim_bit_string * b, hx509_vprint_func func, void * ctx)" -.PP -Print a bitstring using a hx509_vprint_func function. To print to stdout use \fBhx509_print_stdout()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIb\fP bit string to print. -.br -\fIfunc\fP hx509_vprint_func to print with. -.br -\fIctx\fP context variable to hx509_vprint_func function. -.RE -.PP - -.SS "int hx509_cert_keyusage_print (hx509_context context, hx509_cert c, char ** s)" -.PP -Print certificate usage for a certificate to a string. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIc\fP a certificate print the keyusage for. -.br -\fIs\fP the return string with the keysage printed in to, free with \fBhx509_xfree()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_oid_print (const heim_oid * oid, hx509_vprint_func func, void * ctx)" -.PP -Print a oid using a hx509_vprint_func function. To print to stdout use \fBhx509_print_stdout()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIoid\fP oid to print -.br -\fIfunc\fP hx509_vprint_func to print with. -.br -\fIctx\fP context variable to hx509_vprint_func function. -.RE -.PP - -.SS "int hx509_oid_sprint (const heim_oid * oid, char ** str)" -.PP -Print a oid to a string. -.PP -\fBParameters:\fP -.RS 4 -\fIoid\fP oid to print -.br -\fIstr\fP allocated string, free with \fBhx509_xfree()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_print_stdout (void * ctx, const char * fmt, va_list va)" -.PP -Helper function to print on stdout for: -.IP "\(bu" 2 -\fBhx509_oid_print()\fP, -.IP "\(bu" 2 -\fBhx509_bitstring_print()\fP, -.IP "\(bu" 2 -\fBhx509_validate_ctx_set_print()\fP. -.PP -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the context to the print function. If the ctx is NULL, stdout is used. -.br -\fIfmt\fP the printing format. -.br -\fIva\fP the argumet list. -.RE -.PP - -.SS "int hx509_validate_cert (hx509_context context, hx509_validate_ctx ctx, hx509_cert cert)" -.PP -Validate/Print the status of the certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIctx\fP A hx509 validation context. -.br -\fIcert\fP the cerificate to validate/print. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_validate_ctx_add_flags (hx509_validate_ctx ctx, int flags)" -.PP -Add flags to control the behaivor of the \fBhx509_validate_cert()\fP function. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP A hx509 validation context. -.br -\fIflags\fP flags to add to the validation context. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_validate_ctx_free (hx509_validate_ctx ctx)" -.PP -Free an hx509 validate context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the hx509 validate context to free. -.RE -.PP - -.SS "int hx509_validate_ctx_init (hx509_context context, hx509_validate_ctx * ctx)" -.PP -Allocate a hx509 validation/printing context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIctx\fP a new allocated hx509 validation context, free with \fBhx509_validate_ctx_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_validate_ctx_set_print (hx509_validate_ctx ctx, hx509_vprint_func func, void * c)" -.PP -Set the printing functions for the validation context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP a hx509 valication context. -.br -\fIfunc\fP the printing function to usea. -.br -\fIc\fP the context variable to the printing function. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print_cert.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print_cert.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print_cert.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print_stdout.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print_stdout.3 deleted file mode 100644 index 2577d70ee90..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_print_stdout.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_print.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query.3 deleted file mode 100644 index 052ba0fd394..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query.3 +++ /dev/null @@ -1,5 +0,0 @@ -.TH "hx509 query functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 query functions \- diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_alloc.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_alloc.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_alloc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_free.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_cmp_func.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_cmp_func.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_cmp_func.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_eku.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_eku.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_eku.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_friendly_name.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_friendly_name.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_friendly_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_issuer_serial.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_issuer_serial.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_issuer_serial.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_option.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_option.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_match_option.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_statistic_file.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_statistic_file.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_statistic_file.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_unparse_stats.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_unparse_stats.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_query_unparse_stats.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke.3 deleted file mode 100644 index 5c67a3824b4..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke.3 +++ /dev/null @@ -1,171 +0,0 @@ -.TH "hx509 revokation checking functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 revokation checking functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBhx509_revoke_init\fP (hx509_context context, hx509_revoke_ctx *ctx)" -.br -.ti -1c -.RI "void \fBhx509_revoke_free\fP (hx509_revoke_ctx *ctx)" -.br -.ti -1c -.RI "int \fBhx509_revoke_add_ocsp\fP (hx509_context context, hx509_revoke_ctx ctx, const char *path)" -.br -.ti -1c -.RI "int \fBhx509_revoke_add_crl\fP (hx509_context context, hx509_revoke_ctx ctx, const char *path)" -.br -.ti -1c -.RI "int \fBhx509_revoke_verify\fP (hx509_context context, hx509_revoke_ctx ctx, hx509_certs certs, time_t now, hx509_cert cert, hx509_cert parent_cert)" -.br -.ti -1c -.RI "int \fBhx509_ocsp_request\fP (hx509_context context, hx509_certs reqcerts, hx509_certs pool, hx509_cert signer, const AlgorithmIdentifier *digest, heim_octet_string *request, heim_octet_string *nonce)" -.br -.ti -1c -.RI "int \fBhx509_revoke_ocsp_print\fP (hx509_context context, const char *path, FILE *out)" -.br -.in -1c -.SH "Detailed Description" -.PP -See the \fBRevocation methods\fP for description and examples. -.SH "Function Documentation" -.PP -.SS "int hx509_ocsp_request (hx509_context context, hx509_certs reqcerts, hx509_certs pool, hx509_cert signer, const AlgorithmIdentifier * digest, heim_octet_string * request, heim_octet_string * nonce)" -.PP -Create an OCSP request for a set of certificates. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context -.br -\fIreqcerts\fP list of certificates to request ocsp data for -.br -\fIpool\fP certificate pool to use when signing -.br -\fIsigner\fP certificate to use to sign the request -.br -\fIdigest\fP the signing algorithm in the request, if NULL use the default signature algorithm, -.br -\fIrequest\fP the encoded request, free with free_heim_octet_string(). -.br -\fInonce\fP nonce in the request, free with free_heim_octet_string(). -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_revoke_add_crl (hx509_context context, hx509_revoke_ctx ctx, const char * path)" -.PP -Add a CRL file to the revokation context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP hx509 context -.br -\fIctx\fP hx509 revokation context -.br -\fIpath\fP path to file that is going to be added to the context. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_revoke_add_ocsp (hx509_context context, hx509_revoke_ctx ctx, const char * path)" -.PP -Add a OCSP file to the revokation context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP hx509 context -.br -\fIctx\fP hx509 revokation context -.br -\fIpath\fP path to file that is going to be added to the context. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_revoke_free (hx509_revoke_ctx * ctx)" -.PP -Free a hx509 revokation context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP context to be freed -.RE -.PP - -.SS "int hx509_revoke_init (hx509_context context, hx509_revoke_ctx * ctx)" -.PP -Allocate a revokation context. Free with \fBhx509_revoke_free()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIctx\fP returns a newly allocated revokation context. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_revoke_ocsp_print (hx509_context context, const char * path, FILE * out)" -.PP -Print the OCSP reply stored in a file. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context -.br -\fIpath\fP path to a file with a OCSP reply -.br -\fIout\fP the out FILE descriptor to print the reply on -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_revoke_verify (hx509_context context, hx509_revoke_ctx ctx, hx509_certs certs, time_t now, hx509_cert cert, hx509_cert parent_cert)" -.PP -Check that a certificate is not expired according to a revokation context. Also need the parent certificte to the check OCSP parent identifier. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP hx509 context -.br -\fIctx\fP hx509 revokation context -.br -\fIcerts\fP -.br -\fInow\fP -.br -\fIcert\fP -.br -\fIparent_cert\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_add_crl.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_add_crl.3 deleted file mode 100644 index d7d6ccf0d93..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_add_crl.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_revoke.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_add_ocsp.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_add_ocsp.3 deleted file mode 100644 index d7d6ccf0d93..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_add_ocsp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_revoke.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_free.3 deleted file mode 100644 index d7d6ccf0d93..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_revoke.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_init.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_init.3 deleted file mode 100644 index d7d6ccf0d93..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_revoke.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_ocsp_print.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_ocsp_print.3 deleted file mode 100644 index d7d6ccf0d93..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_ocsp_print.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_revoke.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_verify.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_verify.3 deleted file mode 100644 index d7d6ccf0d93..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_revoke_verify.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_revoke.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_set_error_string.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_set_error_string.3 deleted file mode 100644 index 191f0f0843f..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_set_error_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_error.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_set_error_stringv.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_set_error_stringv.3 deleted file mode 100644 index 191f0f0843f..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_set_error_stringv.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_error.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_unparse_der_name.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_unparse_der_name.3 deleted file mode 100644 index 926e21e01aa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_unparse_der_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_name.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_cert.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_cert.3 deleted file mode 100644 index 2577d70ee90..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_cert.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_print.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_add_flags.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_add_flags.3 deleted file mode 100644 index 2577d70ee90..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_add_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_print.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_free.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_free.3 deleted file mode 100644 index 2577d70ee90..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_print.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_init.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_init.3 deleted file mode 100644 index 2577d70ee90..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_print.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_set_print.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_set_print.3 deleted file mode 100644 index 2577d70ee90..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_validate_ctx_set_print.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_print.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify.3 deleted file mode 100644 index ba6f0a4f29a..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify.3 +++ /dev/null @@ -1,309 +0,0 @@ -.TH "hx509 verification functions" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -hx509 verification functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "void \fBhx509_context_set_missing_revoke\fP (hx509_context context, int flag)" -.br -.ti -1c -.RI "int \fBhx509_verify_init_ctx\fP (hx509_context context, hx509_verify_ctx *ctx)" -.br -.ti -1c -.RI "void \fBhx509_verify_destroy_ctx\fP (hx509_verify_ctx ctx)" -.br -.ti -1c -.RI "void \fBhx509_verify_attach_anchors\fP (hx509_verify_ctx ctx, hx509_certs set)" -.br -.ti -1c -.RI "void \fBhx509_verify_attach_revoke\fP (hx509_verify_ctx ctx, hx509_revoke_ctx revoke_ctx)" -.br -.ti -1c -.RI "void \fBhx509_verify_set_time\fP (hx509_verify_ctx ctx, time_t t)" -.br -.ti -1c -.RI "void \fBhx509_verify_set_max_depth\fP (hx509_verify_ctx ctx, unsigned int max_depth)" -.br -.ti -1c -.RI "void \fBhx509_verify_set_proxy_certificate\fP (hx509_verify_ctx ctx, int boolean)" -.br -.ti -1c -.RI "void \fBhx509_verify_set_strict_rfc3280_verification\fP (hx509_verify_ctx ctx, int boolean)" -.br -.ti -1c -.RI "int \fBhx509_verify_path\fP (hx509_context context, hx509_verify_ctx ctx, hx509_cert cert, hx509_certs pool)" -.br -.ti -1c -.RI "int \fBhx509_ocsp_verify\fP (hx509_context context, time_t now, hx509_cert cert, int flags, const void *data, size_t length, time_t *expiration)" -.br -.ti -1c -.RI "int \fBhx509_crl_alloc\fP (hx509_context context, hx509_crl *crl)" -.br -.ti -1c -.RI "int \fBhx509_crl_add_revoked_certs\fP (hx509_context context, hx509_crl crl, hx509_certs certs)" -.br -.ti -1c -.RI "int \fBhx509_crl_lifetime\fP (hx509_context context, hx509_crl crl, int delta)" -.br -.ti -1c -.RI "void \fBhx509_crl_free\fP (hx509_context context, hx509_crl *crl)" -.br -.ti -1c -.RI "int \fBhx509_crl_sign\fP (hx509_context context, hx509_cert signer, hx509_crl crl, heim_octet_string *os)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "void hx509_context_set_missing_revoke (hx509_context context, int flag)" -.PP -Selects if the \fBhx509_revoke_verify()\fP function is going to require the existans of a revokation method (OCSP, CRL) or not. Note that \fBhx509_verify_path()\fP, \fBhx509_cms_verify_signed()\fP, and other function call \fBhx509_revoke_verify()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP hx509 context to change the flag for. -.br -\fIflag\fP zero, revokation method required, non zero missing revokation method ok -.RE -.PP - -.SS "int hx509_crl_add_revoked_certs (hx509_context context, hx509_crl crl, hx509_certs certs)" -.PP -Add revoked certificate to an CRL context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcrl\fP the CRL to add the revoked certificate to. -.br -\fIcerts\fP keyset of certificate to revoke. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_crl_alloc (hx509_context context, hx509_crl * crl)" -.PP -Create a CRL context. Use \fBhx509_crl_free()\fP to free the CRL context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcrl\fP return pointer to a newly allocated CRL context. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_crl_free (hx509_context context, hx509_crl * crl)" -.PP -Free a CRL context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcrl\fP a CRL context to free. -.RE -.PP - -.SS "int hx509_crl_lifetime (hx509_context context, hx509_crl crl, int delta)" -.PP -Set the lifetime of a CRL context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIcrl\fP a CRL context -.br -\fIdelta\fP delta time the certificate is valid, library adds the current time to this. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_crl_sign (hx509_context context, hx509_cert signer, hx509_crl crl, heim_octet_string * os)" -.PP -Sign a CRL and return an encode certificate. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context. -.br -\fIsigner\fP certificate to sign the CRL with -.br -\fIcrl\fP the CRL to sign -.br -\fIos\fP return the signed and encoded CRL, free with free_heim_octet_string() -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_ocsp_verify (hx509_context context, time_t now, hx509_cert cert, int flags, const void * data, size_t length, time_t * expiration)" -.PP -Verify that the certificate is part of the OCSP reply and it's not expired. Doesn't verify signature the OCSP reply or it's done by a authorized sender, that is assumed to be already done. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a hx509 context -.br -\fInow\fP the time right now, if 0, use the current time. -.br -\fIcert\fP the certificate to verify -.br -\fIflags\fP flags control the behavior -.br -\fIdata\fP pointer to the encode ocsp reply -.br -\fIlength\fP the length of the encode ocsp reply -.br -\fIexpiration\fP return the time the OCSP will expire and need to be rechecked. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_verify_attach_anchors (hx509_verify_ctx ctx, hx509_certs set)" -.PP -Set the trust anchors in the verification context, makes an reference to the keyset, so the consumer can free the keyset independent of the destruction of the verification context (ctx). If there already is a keyset attached, it's released. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP a verification context -.br -\fIset\fP a keyset containing the trust anchors. -.RE -.PP - -.SS "void hx509_verify_attach_revoke (hx509_verify_ctx ctx, hx509_revoke_ctx revoke_ctx)" -.PP -Attach an revocation context to the verfication context, , makes an reference to the revoke context, so the consumer can free the revoke context independent of the destruction of the verification context. If there is no revoke context, the verification process is NOT going to check any verification status. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP a verification context. -.br -\fIrevoke_ctx\fP a revoke context. -.RE -.PP - -.SS "void hx509_verify_destroy_ctx (hx509_verify_ctx ctx)" -.PP -Free an hx509 verification context. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP the context to be freed. -.RE -.PP - -.SS "int hx509_verify_init_ctx (hx509_context context, hx509_verify_ctx * ctx)" -.PP -Allocate an verification context that is used fo control the verification process. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIctx\fP returns a pointer to a hx509_verify_ctx object. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "int hx509_verify_path (hx509_context context, hx509_verify_ctx ctx, hx509_cert cert, hx509_certs pool)" -.PP -Build and verify the path for the certificate to the trust anchor specified in the verify context. The path is constructed from the certificate, the pool and the trust anchors. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A hx509 context. -.br -\fIctx\fP A hx509 verification context. -.br -\fIcert\fP the certificate to build the path from. -.br -\fIpool\fP A keyset of certificates to build the chain from. -.RE -.PP -\fBReturns:\fP -.RS 4 -An hx509 error code, see \fBhx509_get_error_string()\fP. -.RE -.PP - -.SS "void hx509_verify_set_max_depth (hx509_verify_ctx ctx, unsigned int max_depth)" -.PP -Set the maximum depth of the certificate chain that the path builder is going to try. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP a verification context -.br -\fImax_depth\fP maxium depth of the certificate chain, include trust anchor. -.RE -.PP - -.SS "void hx509_verify_set_proxy_certificate (hx509_verify_ctx ctx, int boolean)" -.PP -Allow or deny the use of proxy certificates -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP a verification context -.br -\fIboolean\fP if non zero, allow proxy certificates. -.RE -.PP - -.SS "void hx509_verify_set_strict_rfc3280_verification (hx509_verify_ctx ctx, int boolean)" -.PP -Select strict RFC3280 verification of certificiates. This means checking key usage on CA certificates, this will make version 1 certificiates unuseable. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP a verification context -.br -\fIboolean\fP if non zero, use strict verification. -.RE -.PP - -.SS "void hx509_verify_set_time (hx509_verify_ctx ctx, time_t t)" -.PP -Set the clock time the the verification process is going to use. Used to check certificate in the past and future time. If not set the current time will be used. -.PP -\fBParameters:\fP -.RS 4 -\fIctx\fP a verification context. -.br -\fIt\fP the time the verifiation is using. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_attach_anchors.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_attach_anchors.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_attach_anchors.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_attach_revoke.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_attach_revoke.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_attach_revoke.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_ctx_f_allow_default_trustanchors.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_ctx_f_allow_default_trustanchors.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_ctx_f_allow_default_trustanchors.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_destroy_ctx.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_destroy_ctx.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_destroy_ctx.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_hostname.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_hostname.3 deleted file mode 100644 index d65a4b6b4f6..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_hostname.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_cert.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_init_ctx.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_init_ctx.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_init_ctx.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_path.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_path.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_path.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_max_depth.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_max_depth.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_max_depth.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_proxy_certificate.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_proxy_certificate.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_proxy_certificate.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_strict_rfc3280_verification.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_strict_rfc3280_verification.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_strict_rfc3280_verification.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_time.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_time.3 deleted file mode 100644 index e52f771b529..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_set_time.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_verify.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_signature.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_signature.3 deleted file mode 100644 index 67b1f7fa6ea..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_verify_signature.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_crypto.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_xfree.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_xfree.3 deleted file mode 100644 index f58308e8cd1..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/hx509_xfree.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/hx509_misc.3 diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_ca.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_ca.3 deleted file mode 100644 index 2b3195915de..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_ca.3 +++ /dev/null @@ -1,6 +0,0 @@ -.TH "page_ca" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_ca \- Hx509 CA functions -See the library functions here: \fBhx509 CA functions\fP diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_cert.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_cert.3 deleted file mode 100644 index f83d8f80014..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_cert.3 +++ /dev/null @@ -1,10 +0,0 @@ -.TH "page_cert" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_cert \- The basic certificate -The basic hx509 cerificate object in hx509 is hx509_cert. The hx509_cert object is representing one X509/PKIX certificate and associated attributes; like private key, friendly name, etc. -.PP -A hx509_cert object is usully found via the keyset interfaces (\fBCertificate store operations\fP), but its also possible to create a certificate directly from a parsed object with \fBhx509_cert_init()\fP and \fBhx509_cert_init_data()\fP. -.PP -See the library functions here: \fBhx509 certificate functions\fP diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_cms.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_cms.3 deleted file mode 100644 index b5f25aebb30..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_cms.3 +++ /dev/null @@ -1,18 +0,0 @@ -.TH "page_cms" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_cms \- CMS/PKCS7 message functions. -CMS is defined in RFC 3369 and is an continuation of the RSA Labs standard PKCS7. The basic messages in CMS is -.PP -.IP "\(bu" 2 -SignedData Data signed with private key (RSA, DSA, ECDSA) or secret (symmetric) key -.IP "\(bu" 2 -EnvelopedData Data encrypted with private key (RSA) -.IP "\(bu" 2 -EncryptedData Data encrypted with secret (symmetric) key. -.IP "\(bu" 2 -ContentInfo Wrapper structure including type and data. -.PP -.PP -See the library functions here: \fBhx509 CMS/pkcs7 functions\fP diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_env.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_env.3 deleted file mode 100644 index 52545e43caa..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_env.3 +++ /dev/null @@ -1,6 +0,0 @@ -.TH "page_env" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_env \- Hx509 enviroment functions -See the library functions here: \fBhx509 enviroment functions\fP diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_error.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_error.3 deleted file mode 100644 index 5ec81dc1229..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_error.3 +++ /dev/null @@ -1,6 +0,0 @@ -.TH "page_error" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_error \- Hx509 error reporting functions -See the library functions here: \fBhx509 error functions\fP diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_keyset.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_keyset.3 deleted file mode 100644 index b49d6184bc9..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_keyset.3 +++ /dev/null @@ -1,25 +0,0 @@ -.TH "page_keyset" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_keyset \- Certificate store operations -Type of certificates store: -.IP "\(bu" 2 -MEMORY In memory based format. Doesnt support storing. -.IP "\(bu" 2 -FILE FILE supports raw DER certicates and PEM certicates. When PEM is used the file can contain may certificates and match private keys. Support storing the certificates. DER format only supports on certificate and no private key. -.IP "\(bu" 2 -PEM-FILE Same as FILE, defaulting to PEM encoded certificates. -.IP "\(bu" 2 -PEM-FILE Same as FILE, defaulting to DER encoded certificates. -.IP "\(bu" 2 -PKCS11 -.IP "\(bu" 2 -PKCS12 -.IP "\(bu" 2 -DIR -.IP "\(bu" 2 -KEYCHAIN Apple Mac OS X KeyChain backed keychain object. -.PP -.PP -See the library functions here: \fBhx509 certificate store functions\fP diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_lock.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_lock.3 deleted file mode 100644 index 4c94afd70ae..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_lock.3 +++ /dev/null @@ -1,6 +0,0 @@ -.TH "page_lock" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_lock \- Locking and unlocking certificates and encrypted data. -See the library functions here: \fBhx509 lock functions\fP diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_name.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_name.3 deleted file mode 100644 index 502121b6832..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_name.3 +++ /dev/null @@ -1,18 +0,0 @@ -.TH "page_name" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_name \- PKIX/X.509 Names -There are several names in PKIX/X.509, GeneralName and Name. -.PP -A Name consists of an ordered list of Relative Distinguished Names (RDN). Each RDN consists of an unordered list of typed strings. The types are defined by OID and have long and short description. For example id-at-commonName (2.5.4.3) have the long name CommonName and short name CN. The string itself can be of several encoding, UTF8, UTF16, Teltex string, etc. The type limit what encoding should be used. -.PP -GeneralName is a broader nametype that can contains al kind of stuff like Name, IP addresses, partial Name, etc. -.PP -Name is mapped into a hx509_name object. -.PP -Parse and string name into a hx509_name object with \fBhx509_parse_name()\fP, make it back into string representation with \fBhx509_name_to_string()\fP. -.PP -Name string are defined rfc2253, rfc1779 and X.501. -.PP -See the library functions here: \fBhx509 name functions\fP diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_peer.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_peer.3 deleted file mode 100644 index 874bea6f857..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_peer.3 +++ /dev/null @@ -1,8 +0,0 @@ -.TH "page_peer" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_peer \- Hx509 crypto selecting functions -Peer info structures are used togeter with hx509_crypto_select() to select the best avaible crypto algorithm to use. -.PP -See the library functions here: \fBhx509 certificate selecting functions\fP diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_print.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_print.3 deleted file mode 100644 index c3318cc720a..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_print.3 +++ /dev/null @@ -1,6 +0,0 @@ -.TH "page_print" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_print \- Hx509 printing functions -See the library functions here: \fBhx509 printing functions\fP diff --git a/kerberosV/src/doc/doxyout/hx509/man/man3/page_revoke.3 b/kerberosV/src/doc/doxyout/hx509/man/man3/page_revoke.3 deleted file mode 100644 index 48cf0b96a46..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/man/man3/page_revoke.3 +++ /dev/null @@ -1,10 +0,0 @@ -.TH "page_revoke" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalx509library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -page_revoke \- Revocation methods -There are two revocation method for PKIX/X.509: CRL and OCSP. Revocation is needed if the private key is lost and stolen. Depending on how picky you are, you might want to make revocation for destroyed private keys too (smartcard broken), but that should not be a problem. -.PP -CRL is a list of certifiates that have expired. -.PP -OCSP is an online checking method where the requestor sends a list of certificates to the OCSP server to return a signed reply if they are valid or not. Some services sends a OCSP reply as part of the hand-shake to make the revoktion decision simpler/faster for the client. diff --git a/kerberosV/src/doc/doxyout/hx509/manpages b/kerberosV/src/doc/doxyout/hx509/manpages deleted file mode 100644 index 6c621d2482a..00000000000 --- a/kerberosV/src/doc/doxyout/hx509/manpages +++ /dev/null @@ -1,172 +0,0 @@ -hx509/man/man3/hx509.3 -hx509/man/man3/hx509_bitstring_print.3 -hx509/man/man3/hx509_ca.3 -hx509/man/man3/hx509_ca_sign.3 -hx509/man/man3/hx509_ca_sign_self.3 -hx509/man/man3/hx509_ca_tbs_add_crl_dp_uri.3 -hx509/man/man3/hx509_ca_tbs_add_eku.3 -hx509/man/man3/hx509_ca_tbs_add_san_hostname.3 -hx509/man/man3/hx509_ca_tbs_add_san_jid.3 -hx509/man/man3/hx509_ca_tbs_add_san_ms_upn.3 -hx509/man/man3/hx509_ca_tbs_add_san_otherName.3 -hx509/man/man3/hx509_ca_tbs_add_san_pkinit.3 -hx509/man/man3/hx509_ca_tbs_add_san_rfc822name.3 -hx509/man/man3/hx509_ca_tbs_free.3 -hx509/man/man3/hx509_ca_tbs_init.3 -hx509/man/man3/hx509_ca_tbs_set_ca.3 -hx509/man/man3/hx509_ca_tbs_set_domaincontroller.3 -hx509/man/man3/hx509_ca_tbs_set_notAfter.3 -hx509/man/man3/hx509_ca_tbs_set_notAfter_lifetime.3 -hx509/man/man3/hx509_ca_tbs_set_notBefore.3 -hx509/man/man3/hx509_ca_tbs_set_proxy.3 -hx509/man/man3/hx509_ca_tbs_set_serialnumber.3 -hx509/man/man3/hx509_ca_tbs_set_spki.3 -hx509/man/man3/hx509_ca_tbs_set_subject.3 -hx509/man/man3/hx509_ca_tbs_set_template.3 -hx509/man/man3/hx509_ca_tbs_set_unique.3 -hx509/man/man3/hx509_ca_tbs_subject_expand.3 -hx509/man/man3/hx509_ca_tbs_template_units.3 -hx509/man/man3/hx509_cert.3 -hx509/man/man3/hx509_cert_binary.3 -hx509/man/man3/hx509_cert_check_eku.3 -hx509/man/man3/hx509_cert_cmp.3 -hx509/man/man3/hx509_cert_find_subjectAltName_otherName.3 -hx509/man/man3/hx509_cert_free.3 -hx509/man/man3/hx509_cert_get_attribute.3 -hx509/man/man3/hx509_cert_get_base_subject.3 -hx509/man/man3/hx509_cert_get_friendly_name.3 -hx509/man/man3/hx509_cert_get_issuer.3 -hx509/man/man3/hx509_cert_get_issuer_unique_id.3 -hx509/man/man3/hx509_cert_get_notAfter.3 -hx509/man/man3/hx509_cert_get_notBefore.3 -hx509/man/man3/hx509_cert_get_serialnumber.3 -hx509/man/man3/hx509_cert_get_SPKI.3 -hx509/man/man3/hx509_cert_get_SPKI_AlgorithmIdentifier.3 -hx509/man/man3/hx509_cert_get_subject.3 -hx509/man/man3/hx509_cert_get_subject_unique_id.3 -hx509/man/man3/hx509_cert_init.3 -hx509/man/man3/hx509_cert_init_data.3 -hx509/man/man3/hx509_cert_keyusage_print.3 -hx509/man/man3/hx509_cert_ref.3 -hx509/man/man3/hx509_cert_set_friendly_name.3 -hx509/man/man3/hx509_certs_add.3 -hx509/man/man3/hx509_certs_append.3 -hx509/man/man3/hx509_certs_end_seq.3 -hx509/man/man3/hx509_certs_filter.3 -hx509/man/man3/hx509_certs_find.3 -hx509/man/man3/hx509_certs_free.3 -hx509/man/man3/hx509_certs_info.3 -hx509/man/man3/hx509_certs_init.3 -hx509/man/man3/hx509_certs_iter_f.3 -hx509/man/man3/hx509_certs_merge.3 -hx509/man/man3/hx509_certs_next_cert.3 -hx509/man/man3/hx509_certs_start_seq.3 -hx509/man/man3/hx509_certs_store.3 -hx509/man/man3/hx509_ci_print_names.3 -hx509/man/man3/hx509_clear_error_string.3 -hx509/man/man3/hx509_cms.3 -hx509/man/man3/hx509_cms_create_signed_1.3 -hx509/man/man3/hx509_cms_envelope_1.3 -hx509/man/man3/hx509_cms_unenvelope.3 -hx509/man/man3/hx509_cms_unwrap_ContentInfo.3 -hx509/man/man3/hx509_cms_verify_signed.3 -hx509/man/man3/hx509_cms_wrap_ContentInfo.3 -hx509/man/man3/hx509_context_free.3 -hx509/man/man3/hx509_context_init.3 -hx509/man/man3/hx509_context_set_missing_revoke.3 -hx509/man/man3/hx509_crl_add_revoked_certs.3 -hx509/man/man3/hx509_crl_alloc.3 -hx509/man/man3/hx509_crl_free.3 -hx509/man/man3/hx509_crl_lifetime.3 -hx509/man/man3/hx509_crl_sign.3 -hx509/man/man3/hx509_crypto.3 -hx509/man/man3/hx509_env.3 -hx509/man/man3/hx509_env_add.3 -hx509/man/man3/hx509_env_add_binding.3 -hx509/man/man3/hx509_env_find.3 -hx509/man/man3/hx509_env_find_binding.3 -hx509/man/man3/hx509_env_free.3 -hx509/man/man3/hx509_env_lfind.3 -hx509/man/man3/hx509_err.3 -hx509/man/man3/hx509_error.3 -hx509/man/man3/hx509_free_error_string.3 -hx509/man/man3/hx509_free_octet_string_list.3 -hx509/man/man3/hx509_general_name_unparse.3 -hx509/man/man3/hx509_get_error_string.3 -hx509/man/man3/hx509_get_one_cert.3 -hx509/man/man3/hx509_keyset.3 -hx509/man/man3/hx509_lock.3 -hx509/man/man3/hx509_misc.3 -hx509/man/man3/hx509_name.3 -hx509/man/man3/hx509_name_binary.3 -hx509/man/man3/hx509_name_cmp.3 -hx509/man/man3/hx509_name_copy.3 -hx509/man/man3/hx509_name_expand.3 -hx509/man/man3/hx509_name_free.3 -hx509/man/man3/hx509_name_is_null_p.3 -hx509/man/man3/hx509_name_to_Name.3 -hx509/man/man3/hx509_name_to_string.3 -hx509/man/man3/hx509_ocsp_request.3 -hx509/man/man3/hx509_ocsp_verify.3 -hx509/man/man3/hx509_oid_print.3 -hx509/man/man3/hx509_oid_sprint.3 -hx509/man/man3/hx509_parse_name.3 -hx509/man/man3/hx509_peer.3 -hx509/man/man3/hx509_peer_info_add_cms_alg.3 -hx509/man/man3/hx509_peer_info_alloc.3 -hx509/man/man3/hx509_peer_info_free.3 -hx509/man/man3/hx509_peer_info_set_cert.3 -hx509/man/man3/hx509_peer_info_set_cms_algs.3 -hx509/man/man3/hx509_print.3 -hx509/man/man3/hx509_print_cert.3 -hx509/man/man3/hx509_print_stdout.3 -hx509/man/man3/hx509_query.3 -hx509/man/man3/hx509_query_alloc.3 -hx509/man/man3/hx509_query_free.3 -hx509/man/man3/hx509_query_match_cmp_func.3 -hx509/man/man3/hx509_query_match_eku.3 -hx509/man/man3/hx509_query_match_friendly_name.3 -hx509/man/man3/hx509_query_match_issuer_serial.3 -hx509/man/man3/hx509_query_match_option.3 -hx509/man/man3/hx509_query_statistic_file.3 -hx509/man/man3/hx509_query_unparse_stats.3 -hx509/man/man3/hx509_revoke.3 -hx509/man/man3/hx509_revoke_add_crl.3 -hx509/man/man3/hx509_revoke_add_ocsp.3 -hx509/man/man3/hx509_revoke_free.3 -hx509/man/man3/hx509_revoke_init.3 -hx509/man/man3/hx509_revoke_ocsp_print.3 -hx509/man/man3/hx509_revoke_verify.3 -hx509/man/man3/hx509_set_error_string.3 -hx509/man/man3/hx509_set_error_stringv.3 -hx509/man/man3/hx509_unparse_der_name.3 -hx509/man/man3/hx509_validate_cert.3 -hx509/man/man3/hx509_validate_ctx_add_flags.3 -hx509/man/man3/hx509_validate_ctx_free.3 -hx509/man/man3/hx509_validate_ctx_init.3 -hx509/man/man3/hx509_validate_ctx_set_print.3 -hx509/man/man3/hx509_verify.3 -hx509/man/man3/hx509_verify_attach_anchors.3 -hx509/man/man3/hx509_verify_attach_revoke.3 -hx509/man/man3/hx509_verify_ctx_f_allow_default_trustanchors.3 -hx509/man/man3/hx509_verify_destroy_ctx.3 -hx509/man/man3/hx509_verify_hostname.3 -hx509/man/man3/hx509_verify_init_ctx.3 -hx509/man/man3/hx509_verify_path.3 -hx509/man/man3/hx509_verify_set_max_depth.3 -hx509/man/man3/hx509_verify_set_proxy_certificate.3 -hx509/man/man3/hx509_verify_set_strict_rfc3280_verification.3 -hx509/man/man3/hx509_verify_set_time.3 -hx509/man/man3/hx509_verify_signature.3 -hx509/man/man3/hx509_xfree.3 -hx509/man/man3/page_ca.3 -hx509/man/man3/page_cert.3 -hx509/man/man3/page_cms.3 -hx509/man/man3/page_env.3 -hx509/man/man3/page_error.3 -hx509/man/man3/page_keyset.3 -hx509/man/man3/page_lock.3 -hx509/man/man3/page_name.3 -hx509/man/man3/page_peer.3 -hx509/man/man3/page_print.3 -hx509/man/man3/page_revoke.3 diff --git a/kerberosV/src/doc/doxyout/krb5/html/annotated.html b/kerberosV/src/doc/doxyout/krb5/html/annotated.html deleted file mode 100644 index 988afd75dae..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/annotated.html +++ /dev/null @@ -1,35 +0,0 @@ - - -HeimdalKerberos5library: Data Structures - - - -

-keyhole logo -

- - - -
-

Data Structures

Here are the data structures with brief descriptions: - -
krb5_crypto_iov
-
-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/doxygen.css b/kerberosV/src/doc/doxyout/krb5/html/doxygen.css deleted file mode 100644 index 22c484301dd..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/doxygen.css +++ /dev/null @@ -1,473 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; -} -H1 { - text-align: center; - font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { - font-weight: bold -} -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navpath { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { - text-decoration: none; - background-color: #6666cc; - color: #ffffff -} -A.el { - text-decoration: none; - font-weight: bold -} -A.elRef { - font-weight: bold -} -A.code:link { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.code:visited { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.codeRef:link { - font-weight: normal; - color: #0000FF -} -A.codeRef:visited { - font-weight: normal; - color: #0000FF -} -A:hover { - text-decoration: none; - background-color: #f2f2ff -} -DL.el { - margin-left: -1cm -} -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: 90% -} -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { - text-align: center; -} -IMG.formulaDsp { -} -IMG.formulaInl { - vertical-align: middle; -} -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -SPAN.vhdldigit { color: #ff00ff } -SPAN.vhdlchar { color: #000000 } -SPAN.vhdlkeyword { color: #700070 } -SPAN.vhdllogic { color: #ff0000 } - -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { - color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { - font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { - background: #e8eef2; - font-weight: bold; -} -HR { - height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; - margin-left: 3px; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -/* these are for tree view when used as main index */ -.directory { - font-size: 9pt; - font-weight: bold; -} -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* The following two styles can be used to replace the root node title */ -/* with an image of your choice. Simply uncomment the next two styles, */ -/* specify the name of your image and be sure to set 'height' to the */ -/* proper pixel height of your image. */ - -/* .directory h3.swap { */ -/* height: 61px; */ -/* background-repeat: no-repeat; */ -/* background-image: url("yourimage.gif"); */ -/* } */ -/* .directory h3.swap span { */ -/* display: none; */ -/* } */ - -.directory > h3 { - margin-top: 0; -} -.directory p { - margin: 0px; - white-space: nowrap; -} -.directory div { - display: none; - margin: 0px; -} -.directory img { - vertical-align: -30%; -} -/* these are for tree view when not used as main index */ -.directory-alt { - font-size: 100%; - font-weight: bold; -} -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} -.directory-alt > h3 { - margin-top: 0; -} -.directory-alt p { - margin: 0px; - white-space: nowrap; -} -.directory-alt div { - display: none; - margin: 0px; -} -.directory-alt img { - vertical-align: -30%; -} - diff --git a/kerberosV/src/doc/doxyout/krb5/html/doxygen.png b/kerberosV/src/doc/doxyout/krb5/html/doxygen.png deleted file mode 100644 index f0a274bbaffdd67f6d784c894d9cf28729db0e14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1281 zcmaJ>ZA?>F7(Vx-ms?uoS`b@hdRtpo6o^%HU>M$hfGrBvQnk$LE?p^P!kn&ikhyq! zX~V@&tPF5Qt@V?oTL96Bi%aRiwbe1)9DWQI#?)=HxS7QSw`J`5fAJ*eJbB;uNuKA& zdERDo*{Y<(If(#(B$Lr#;nB(8Y#ia=ZCeW?JfPLuQY`=@cW$k}Rivq|vbxGrRq1Tl9;+(gNt?}UtVKM2`T5t1jLzuL@0UIs`S#vlhl4)^ zLgSYrPj@$+`|j?eSbXTmiHGkWxV8V}BzNR?pl9k_s4pDu9vd5a_UzZEPk)}Ad{AV_ zzddrjrh4=Imr`E06;LY{)YYt?o}L~H@7C}F^WB!Ra=v`Q0bj{>5&$66CWF>mf6vjP z2N>RRY6ZYa=K`76>+|_)Xdwko+7wv}7cN|btOhWb(*{sta~6b?S8Omrxw}!4`NhGr zZVpNqpu1@BE`QGWNTpEpcJVW5izu~2B^GlM?1(OPg)zwW;QcP@Ltcclm>XbJL9C|j z=9!2?ua=uIlf0%AndzHsRC}IyTL$EhAee(fdKB`?27KeS^2M8M_7b~PiCFO&r5LC7 z7gl1*a<8;SjNaw#h=843_AV9iZbWQOAp5YOC^&_F*9K0> zB|6%IDb?aM#3viTxkLU4aXg&@+CkNTOnQ1iMP*^?b|^lJy$4C)Zk4isV!|RZ*XhXh zw8q3$=*0LeGC!XI_Wc?dkT~3+*Gu%%yIqP+Wr3H$=&ROMQU6q}Ag^P~>c5vAEO;a- z_dK-3PPeKar%)6$j~vI2#*-YH!1h6HYVtwCX5_wM`iF#UKz&&@9Oo5w3%XGYrX zW>dY~)SG-((Yim%`InwgTvyRC?e=Wh^8KCao!R6Eg&TpVWUY1sN~4G}V?nFnEGo-; zHZ_$eW9-GnC%^WS9b z@p;-$oH#MtC0v>Q$HX%4^JdFdO$0cbv-W)Q TtK}Eh@>>I#ipmV1>S*>q-hkC} diff --git a/kerberosV/src/doc/doxyout/krb5/html/graph_legend.dot b/kerberosV/src/doc/doxyout/krb5/html/graph_legend.dot deleted file mode 100644 index 4df0f1aa486..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/graph_legend.dot +++ /dev/null @@ -1,22 +0,0 @@ -digraph G -{ - edge [fontname="FreeSans",fontsize=10,labelfontname="FreeSans",labelfontsize=10]; - node [fontname="FreeSans",fontsize=10,shape=record]; - Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",fillcolor="grey75",style="filled" fontcolor="black"]; - Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPublicBase.html"]; - Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="red",URL="$classTruncated.html"]; - Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="FreeSans"]; - Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classProtectedBase.html"]; - Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="FreeSans"]; - Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPrivateBase.html"]; - Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="grey75"]; - Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="FreeSans"]; - Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="FreeSans"]; - Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classUsed.html"]; -} diff --git a/kerberosV/src/doc/doxyout/krb5/html/graph_legend.html b/kerberosV/src/doc/doxyout/krb5/html/graph_legend.html deleted file mode 100644 index 046949da683..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/graph_legend.html +++ /dev/null @@ -1,89 +0,0 @@ - - -HeimdalKerberos5library: Graph Legend - - - -

-keyhole logo -

- - - -
-

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

-Consider the following example:

/*! Invisible class because of truncation */
-class Invisible { };
-
-/*! Truncated class, inheritance relation is hidden */
-class Truncated : public Invisible { };
-
-/* Class not documented with doxygen comments */
-class Undocumented { };
-
-/*! Class that is inherited using public inheritance */
-class PublicBase : public Truncated { };
-
-/*! A template class */
-template<class T> class Templ { };
-
-/*! Class that is inherited using protected inheritance */
-class ProtectedBase { };
-
-/*! Class that is inherited using private inheritance */
-class PrivateBase { };
-
-/*! Class that is used by the Inherited class */
-class Used { };
-
-/*! Super class that inherits a number of other classes */
-class Inherited : public PublicBase,
-                  protected ProtectedBase,
-                  private PrivateBase,
-                  public Undocumented,
-                  public Templ<int>
-{
-  private:
-    Used *m_usedClass;
-};
-
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

-

-graph_legend.png -
-

-The boxes in the above graph have the following meaning:

    -
  • -A filled gray box represents the struct or class for which the graph is generated.
  • -
  • -A box with a black border denotes a documented struct or class.
  • -
  • -A box with a grey border denotes an undocumented struct or class.
  • -
  • -A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • -
-The arrows have the following meaning:
    -
  • -A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • -
  • -A dark green arrow is used for protected inheritance.
  • -
  • -A dark red arrow is used for private inheritance.
  • -
  • -A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • -
  • -A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • -
-
-
-Generated on Sun Dec 9 14:10:36 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/graph_legend.png b/kerberosV/src/doc/doxyout/krb5/html/graph_legend.png deleted file mode 100644 index 9b96937bfd5f7a36ea8dbf2d64ed1bc0768f074d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4256 zcmbVQdpOkH_8+NND!Jtq6-jtSR7_-I$|WI0?zfSY$_$d3afzvf+>+dd5k>AJ%rwTO zToWRpOjQk;SpA-vZaxFm|)qS zZ0&nc$jcV$urMS*mT>5$AW~=+0-V=-hk3d;65QJTE=oj@xp?1=Mih?*SJGP9x;tMV zMGEN%60bmjDaijL58nc4RjF^hegOwU1I*ccRUmxdMkPM4ng0%#|DsH zA6uS>izR^x-*dYB+Y^@(q_fm3bgQzJ)xH_6x>lGwshWF+C5$5dh3sYD)tK+C6U)CD z^Xomarii5PA4v8qF_zz#buUwD?ro`8dC&7V-sShflU~*CBDZ04x4+3qE16W{eL_xd z3YaO}b1qpA9YL|0YKdw~2PzM=1=7+ItLm0+tST@%D(MNDzHR)+2t0d#|s}$9i(3xGzT8VL8o-ltIwH zpspqZeXR&2qA6r=nJVuhHO>d5w2$gp9i$H^6ROz!yNTjvm&9kupV73|GPJbXR%Sq0{>>GOn}^wshXC&C~6F@ zQEtikDzl-h2C}qRulGQ3fxzQMGiQH>nv}zkLLPr|qAC;3@PP$cr?(+-t?Wl3jb0<+ z#bCd_jVJ74%s*@eBjHtio7tZ>$BFt@%$M_C#AZgnzPm@&TXYQgE_Vo-ac(6wcJS^F zq)^14asP#Se^m*cnG^`{K>nXv_jhChvr_3s{zCkoqlsf=o8GQ>m@l2)em-YYT;u5A zvL(o`$7n~F&}`E{@&v375BP8e8N#D`H-e$%bEytQt-6o^PA%Dz4c-UeB{`~c4E<$L zY5E6~rKXj#P=fpct4bMP!auX;p7jtP@Li|`r|L0{yav|CLqtLNI5sNFr)16{NP2=B zyY+-Wnh;%3ctC&{8FU{!e29-)s6j~L{~V=%0`Mo=V6^am+1%z2<9r3tD~6uUPff|k zVx!)!?zoJ8FYTDC+V^!??@ z4c>lSL|BU?N^?Ew@NJxJzG9eMGFyR)(2&@Nt!t3%JLT|%6obYCChp}`hP)dkti;UH zm+B_wyb0#h=*|iH4Fx&x>#k_WnyfzU(!KMagDGGLWwz39qG2@`w4@&@8MH}K=hcV> zo@xJdqtMHqtZ+UobNt|FkIRV*_Z#K{{Bb)#j z9XM+oNQX|Dn7$9c4;PX=9NRr)QYm+3 z zx^AyiP)aaJ#E<#aI_Z4M0qo~}6_b{Fw7LjYEpq&2eP4e=;`V;2lQjooTv3dWIpwWu z2b1z&DZD^dJ%5Ah@TPsb?SUP1RZa2=43!k>cAI`kktGdN*#k}_EFYJBtdo09U?xBs z9K9CSx_e{=df>B<4TT_=s52}n^1IKq){xhJIZR<%sQ$rL)Ww)Yt%WkDo#ad}s&Gx5 z={);tH9sSrJ>yD-tu!$ob?tPKmFU3SdDt@i5ULq$P+JZ&rBZXITMM2R4_v1ibgOiq zMgY#(>xF-;&)HonG+sHE@%)-B1*r)@ga3!db-Vc_x}smbXU4=Ycmit0F{Z9Z=q9*k zSY@ypaOs8`MX!BUZQ8*PNmX5$J|!1|LUar)5#Wv*4#g@nfsebEcx9@8Xwfb0Q9P(} z=SQ6#aIE*x06hjIS#Bd%McoJc%>SXksuJY|iLLCE2cQVDS=q0ExRn*~`i=fOw%XSg zjPMNGM@azaROpa|{rz4!=+zKM?qLTssH`{-E+@6Hhis|f3;+_M-ZtTHa|~uvmR1gf ztc+og%<|DBdt%HY{wmosZ0Dwo_$k|E-l5uc@dsfQXM7S|Iz@BxYy&z}hOFW|~F{vQ0Osp+?FjWk}l^^`$3d&Um1 z?&sxr?AAGlD4Khy<_>4od`Bblh?&9%UY#-Jq!c|?kU+hLL^MH@`5+jaq0btJpn7*b#Oeh1GEn6atjaCyIWfr0OqB$o*_K7>Hw0 z?BwrA^UZy(f_CdPoNz0!X6_EX?r80CuKuJ>x7Nfyd8EE%k&D?|=iJJfS>IQjndp+} zQwBq!$`>mvPmG!I^V(%R)Gym_|72^0&$a-L)TN^qtKvF!jlxIo?PRq6kTb-X53|%h z?IKy}wPh>cXPpl!CgqlED%v-a$)H5&WV66^EQctD_=l_ z8tuq$z=3tBNHyzQ{oqHd0c`bijo3DfaK&P6ljOYB*yU$_@k`qhq8=mtA4jS1B1K(j zvo2FBwlJ2mJRPCUqlyR$(a}O)y*2{y;Q!N$t<@I0rtBY~s9-^ohW}mp>mSLEID_fCC?)BC#xQVv6?MP3l1#chr!wPGR>M7_ma= zq&T4QLL#pPdxWMc8$@t?@@dX?v6SXk)pHf5YJBDF1J==c$=Ycr+-OyqR^Hvbl3sPR z*>|+VVnI4^ix_q({i~Ss$FYFSvqug*Szu}$jsTR7w#ajG&vB+e-65%XO$A}#xf?z1 zg)!qcIUN0peM-ZkW0&88#R#(`yIXN3nMRX3+scl<5eJ{+iXh{t%uA$^_(QR&k?6b}K!<(1P zqwP4`%br=wo_WfO34*7x=@)Qk8fo1(!f2_Wx<|KCf>TXR>Fs0He*PA|d0Gy2j)&Wm z%VnPoVWk((0ZN^Z;9t1nfauExQsXD8>~~^(ibEcj>iyB>^{0^bacb(gZMDZOg!?o2 zVa@4%Q3kdQ_jg7p|GidA+;Dh4mlhvBOEsuq(9T4mj7oc$7JRBo7sK z*E^0e%k=;_*U4pQ>$TPd_p@|Nm&X+6SCcizU6^Uhlfh+H#~(#zENDe!uqZ){ma3WhTpgE+}F#p~*bqL)ZYn`y8- zBOJ+jO4A2S!yO<}KP2QQ_3v@|Y0!qSg0~x9LPU!Rsy0*lW)2#guxB_)5P-_Hzz)sa zrnuTszvZ!oPt?A{2s%#E?qLUMss-0P-a={w>U|QXvO8{_pDLhOoY0}ZSU>&a#hJ<$ zf4Q&uT+Go7?*M0-NYFE>V%3O24hlHr&CvTIS_##QeB#n}e(gAe6vWs=NZv-DofbkO zu7$-h7Q@{+$HyEaDZEwf6AwUFq;NBnTgsf5s%mT33zz?)Ep+-3VmZ8*J#3y~)Ura$ zpPFz&43@7o6>!a?EZ!3?!?z=`K9*}HvAgu@#TSq?Ptjq6-{ylGIr3f2q%wW0|I7*vVROWS&K z1ujjlesAY3i{h8`HADO2qu*4TzqaC^gbVQY}Bcx zdccd&Kl-bUFIRb=gLuNk3HsaqMMi`2e%ujt?uM0xCs*bj=EwvJFU`+a_d(+X)YjtG z8ViTUA+`cG73Cc^6!T_s=HK)o?m&=mp;4>0A$DnH#54&G^7{I|FO#0N%dZAibZ>6* z?nPYXp5X^8B9a_9oS$PjT-x+F#$I{v>ysq>cBG2e?JyMGV2r`NPxrsx8;iIjX^q~Dr;D*ylh diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5.html deleted file mode 100644 index b41010eadb3..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5.html +++ /dev/null @@ -1,2237 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 library - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 library

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_add_et_list (krb5_context context, void(*func)(struct et_list **))
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_set_password (krb5_context context, krb5_creds *creds, const char *newpw, krb5_principal targprinc, int *result_code, krb5_data *result_code_string, krb5_data *result_string)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_init_context (krb5_context *context)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_context (krb5_context context, krb5_context *out)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_free_context (krb5_context context)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_set_config_files (krb5_context context, char **filenames)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_prepend_config_files_default (const char *filelist, char ***pfilenames)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_default_config_files (char ***pfilenames)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_free_config_files (char **filenames)
KRB5_LIB_FUNCTION const
-krb5_enctype *KRB5_LIB_CALL 
krb5_kerberos_enctypes (krb5_context context)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_set_default_in_tkt_etypes (krb5_context context, const krb5_enctype *etypes)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_default_in_tkt_etypes (krb5_context context, krb5_pdu pdu_type, krb5_enctype **etypes)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_init_ets (krb5_context context)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_set_use_admin_kdc (krb5_context context, krb5_boolean flag)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_get_use_admin_kdc (krb5_context context)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_add_extra_addresses (krb5_context context, krb5_addresses *addresses)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_set_extra_addresses (krb5_context context, const krb5_addresses *addresses)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_extra_addresses (krb5_context context, krb5_addresses *addresses)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_add_ignore_addresses (krb5_context context, krb5_addresses *addresses)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_set_ignore_addresses (krb5_context context, const krb5_addresses *addresses)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_ignore_addresses (krb5_context context, krb5_addresses *addresses)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_set_fcache_version (krb5_context context, int version)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_fcache_version (krb5_context context, int *version)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_is_thread_safe (void)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_set_dns_canonicalize_hostname (krb5_context context, krb5_boolean flag)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_get_dns_canonicalize_hostname (krb5_context context)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_kdc_sec_offset (krb5_context context, int32_t *sec, int32_t *usec)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_set_kdc_sec_offset (krb5_context context, int32_t sec, int32_t usec)
KRB5_LIB_FUNCTION time_t
-KRB5_LIB_CALL 
krb5_get_max_time_skew (krb5_context context)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_set_max_time_skew (krb5_context context, time_t t)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_set_home_dir_access (krb5_context context, krb5_boolean allow)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_host_realm (krb5_context context, const krb5_realm *from, krb5_realm **to)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_free_cred_contents (krb5_context context, krb5_creds *c)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_creds_contents (krb5_context context, const krb5_creds *incred, krb5_creds *c)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_creds (krb5_context context, const krb5_creds *incred, krb5_creds **outcred)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_free_creds (krb5_context context, krb5_creds *c)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_compare_creds (krb5_context context, krb5_flags whichfields, const krb5_creds *mcreds, const krb5_creds *creds)
KRB5_LIB_FUNCTION unsigned
-long KRB5_LIB_CALL 
krb5_creds_get_ticket_flags (krb5_creds *creds)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_data_zero (krb5_data *p)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_data_free (krb5_data *p)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_free_data (krb5_context context, krb5_data *p)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_data_alloc (krb5_data *p, int len)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_data_realloc (krb5_data *p, int len)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_data_copy (krb5_data *p, const void *data, size_t len)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_data (krb5_context context, const krb5_data *indata, krb5_data **outdata)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_data_cmp (const krb5_data *data1, const krb5_data *data2)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_data_ct_cmp (const krb5_data *data1, const krb5_data *data2)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_krbhst_get_addrinfo (krb5_context context, krb5_krbhst_info *host, struct addrinfo **ai)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_free_ticket (krb5_context context, krb5_ticket *ticket)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_ticket (krb5_context context, const krb5_ticket *from, krb5_ticket **to)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ticket_get_client (krb5_context context, const krb5_ticket *ticket, krb5_principal *client)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ticket_get_server (krb5_context context, const krb5_ticket *ticket, krb5_principal *server)
KRB5_LIB_FUNCTION time_t
-KRB5_LIB_CALL 
krb5_ticket_get_endtime (krb5_context context, const krb5_ticket *ticket)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ticket_get_authorization_data_type (krb5_context context, krb5_ticket *ticket, int type, krb5_data *data)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_set_real_time (krb5_context context, krb5_timestamp sec, int32_t usec)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_add_et_list (krb5_context  context,
void(*)(struct et_list **)  func 
)
-
-
- -

-Add a specified list of error messages to the et list in context. Call func (probably a comerr-generated function) with a pointer to the current et_list.

-

Parameters:
- - - -
context A kerberos context.
func The generated com_err et function.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_add_extra_addresses (krb5_context  context,
krb5_addresses *  addresses 
)
-
-
- -

-Add extra address to the address list that the library will add to the client's address list when communicating with the KDC.

-

Parameters:
- - - -
context Kerberos 5 context.
addresses addreses to add
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_add_ignore_addresses (krb5_context  context,
krb5_addresses *  addresses 
)
-
-
- -

-Add extra addresses to ignore when fetching addresses from the underlaying operating system.

-

Parameters:
- - - -
context Kerberos 5 context.
addresses addreses to ignore
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_compare_creds (krb5_context  context,
krb5_flags  whichfields,
const krb5_creds *  mcreds,
const krb5_creds *  creds 
)
-
-
- -

-Return TRUE if `mcreds' and `creds' are equal (`whichfields' determines what equal means).

-The following flags, set in whichfields affects the comparison:

    -
  • KRB5_TC_MATCH_SRV_NAMEONLY Consider all realms equal when comparing the service principal.
  • KRB5_TC_MATCH_KEYTYPE Compare enctypes.
  • KRB5_TC_MATCH_FLAGS_EXACT Make sure that the ticket flags are identical.
  • KRB5_TC_MATCH_FLAGS Make sure that all ticket flags set in mcreds are also present in creds .
  • KRB5_TC_MATCH_TIMES_EXACT Compares the ticket times exactly.
  • KRB5_TC_MATCH_TIMES Compares only the expiration times of the creds.
  • KRB5_TC_MATCH_AUTHDATA Compares the authdata fields.
  • KRB5_TC_MATCH_2ND_TKT Compares the second tickets (used by user-to-user authentication).
  • KRB5_TC_MATCH_IS_SKEY Compares the existance of the second ticket.
-

-

Parameters:
- - - - - -
context Kerberos 5 context.
whichfields which fields to compare.
mcreds cred to compare with.
creds cred to compare with.
-
-
Returns:
return TRUE if mcred and creds are equal, FALSE if not.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_context (krb5_context  context,
krb5_context *  out 
)
-
-
- -

-Make a copy for the Kerberos 5 context, the new krb5_context shoud be freed with krb5_free_context().

-

Parameters:
- - - -
context the Kerberos context to copy
out the copy of the Kerberos, set to NULL error.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_creds (krb5_context  context,
const krb5_creds *  incred,
krb5_creds **  outcred 
)
-
-
- -

-Copy krb5_creds.

-

Parameters:
- - - - -
context Kerberos 5 context.
incred source credential
outcred destination credential, free with krb5_free_creds().
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_creds_contents (krb5_context  context,
const krb5_creds *  incred,
krb5_creds *  c 
)
-
-
- -

-Copy content of krb5_creds.

-

Parameters:
- - - - -
context Kerberos 5 context.
incred source credential
c destination credential, free with krb5_free_cred_contents().
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_data (krb5_context  context,
const krb5_data *  indata,
krb5_data **  outdata 
)
-
-
- -

-Copy the data into a newly allocated krb5_data.

-

Parameters:
- - - - -
context Kerberos 5 context.
indata the krb5_data data to copy
outdata new krb5_date to copy too. Free with krb5_free_data().
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_host_realm (krb5_context  context,
const krb5_realm *  from,
krb5_realm **  to 
)
-
-
- -

-Copy the list of realms from `from' to `to'.

-

Parameters:
- - - - -
context Kerberos 5 context.
from list of realms to copy from.
to list of realms to copy to, free list of krb5_free_host_realm().
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_ticket (krb5_context  context,
const krb5_ticket *  from,
krb5_ticket **  to 
)
-
-
- -

-Copy ticket and content

-

Parameters:
- - - - -
context a Kerberos 5 context
from ticket to copy
to new copy of ticket, free with krb5_free_ticket()
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL krb5_creds_get_ticket_flags (krb5_creds *  creds  ) 
-
-
- -

-Returns the ticket flags for the credentials in creds. See also krb5_ticket_get_flags().

-

Parameters:
- - -
creds credential to get ticket flags from
-
-
Returns:
ticket flags
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_data_alloc (krb5_data *  p,
int  len 
)
-
-
- -

-Allocate data of and krb5_data.

-

Parameters:
- - - -
p krb5_data to allocate.
len size to allocate.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_data_cmp (const krb5_data *  data1,
const krb5_data *  data2 
)
-
-
- -

-Compare to data.

-

Parameters:
- - - -
data1 krb5_data to compare
data2 krb5_data to compare
-
-
Returns:
return the same way as memcmp(), useful when sorting.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_data_copy (krb5_data *  p,
const void *  data,
size_t  len 
)
-
-
- -

-Copy the data of len into the krb5_data.

-

Parameters:
- - - - -
p krb5_data to copy into.
data data to copy..
len new size.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_data_ct_cmp (const krb5_data *  data1,
const krb5_data *  data2 
)
-
-
- -

-Compare to data not exposing timing information from the checksum data

-

Parameters:
- - - -
data1 krb5_data to compare
data2 krb5_data to compare
-
-
Returns:
returns zero for same data, otherwise non zero.
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_data_free (krb5_data *  p  ) 
-
-
- -

-Free the content of krb5_data structure, its ok to free a zeroed structure (with memset() or krb5_data_zero()). When done, the structure will be zeroed. The same function is called krb5_free_data_contents() in MIT Kerberos.

-

Parameters:
- - -
p krb5_data to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_data_realloc (krb5_data *  p,
int  len 
)
-
-
- -

-Grow (or shrink) the content of krb5_data to a new size.

-

Parameters:
- - - -
p krb5_data to free.
len new size.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned.
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_data_zero (krb5_data *  p  ) 
-
-
- -

-Reset the (potentially uninitalized) krb5_data structure.

-

Parameters:
- - -
p krb5_data to reset.
-
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_config_files (char **  filenames  ) 
-
-
- -

-Free a list of configuration files.

-

Parameters:
- - -
filenames list, terminated with a NULL pointer, to be freed. NULL is an valid argument.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_context (krb5_context  context  ) 
-
-
- -

-Frees the krb5_context allocated by krb5_init_context().

-

Parameters:
- - -
context context to be freed.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_cred_contents (krb5_context  context,
krb5_creds *  c 
)
-
-
- -

-Free content of krb5_creds.

-

Parameters:
- - - -
context Kerberos 5 context.
c krb5_creds to free.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_creds (krb5_context  context,
krb5_creds *  c 
)
-
-
- -

-Free krb5_creds.

-

Parameters:
- - - -
context Kerberos 5 context.
c krb5_creds to free.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_data (krb5_context  context,
krb5_data *  p 
)
-
-
- -

-Free krb5_data (and its content).

-

Parameters:
- - - -
context Kerberos 5 context.
p krb5_data to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_ticket (krb5_context  context,
krb5_ticket *  ticket 
)
-
-
- -

-Free ticket and content

-

Parameters:
- - - -
context a Kerberos 5 context
ticket ticket to free
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_default_config_files (char ***  pfilenames  ) 
-
-
- -

-Get the global configuration list.

-

Parameters:
- - -
pfilenames return array of filenames, should be freed with krb5_free_config_files().
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_default_in_tkt_etypes (krb5_context  context,
krb5_pdu  pdu_type,
krb5_enctype **  etypes 
)
-
-
- -

-Get the default encryption types that will be use in communcation with the KDC, clients and servers.

-

Parameters:
- - - -
context Kerberos 5 context.
etypes Encryption types, array terminated with ETYPE_NULL(0), caller should free array with krb5_xfree():
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_get_dns_canonicalize_hostname (krb5_context  context  ) 
-
-
- -

-Get if the library uses DNS to canonicalize hostnames.

-

Parameters:
- - -
context Kerberos 5 context.
-
-
Returns:
return non zero if the library uses DNS to canonicalize hostnames.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_extra_addresses (krb5_context  context,
krb5_addresses *  addresses 
)
-
-
- -

-Get extra address to the address list that the library will add to the client's address list when communicating with the KDC.

-

Parameters:
- - - -
context Kerberos 5 context.
addresses addreses to set
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_fcache_version (krb5_context  context,
int *  version 
)
-
-
- -

-Get version of fcache that the library should use.

-

Parameters:
- - - -
context Kerberos 5 context.
version version number.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_ignore_addresses (krb5_context  context,
krb5_addresses *  addresses 
)
-
-
- -

-Get extra addresses to ignore when fetching addresses from the underlaying operating system.

-

Parameters:
- - - -
context Kerberos 5 context.
addresses list addreses ignored
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_kdc_sec_offset (krb5_context  context,
int32_t *  sec,
int32_t *  usec 
)
-
-
- -

-Get current offset in time to the KDC.

-

Parameters:
- - - - -
context Kerberos 5 context.
sec seconds part of offset.
usec micro seconds part of offset.
-
-
Returns:
returns zero
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL krb5_get_max_time_skew (krb5_context  context  ) 
-
-
- -

-Get max time skew allowed.

-

Parameters:
- - -
context Kerberos 5 context.
-
-
Returns:
timeskew in seconds.
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_get_use_admin_kdc (krb5_context  context  ) 
-
-
- -

-Make the kerberos library default to the admin KDC.

-

Parameters:
- - -
context Kerberos 5 context.
-
-
Returns:
boolean flag to telling the context will use admin KDC as the default KDC.
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_context (krb5_context *  context  ) 
-
-
- -

-Initializes the context structure and reads the configuration file /etc/krb5.conf. The structure should be freed by calling krb5_free_context() when it is no longer being used.

-

Parameters:
- - -
context pointer to returned context
-
-
Returns:
Returns 0 to indicate success. Otherwise an errno code is returned. Failure means either that something bad happened during initialization (typically ENOMEM) or that Kerberos should not be used ENXIO.
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_init_ets (krb5_context  context  ) 
-
-
- -

-Init the built-in ets in the Kerberos library.

-

Parameters:
- - -
context kerberos context to add the ets too
-
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_is_thread_safe (void   ) 
-
-
- -

-Runtime check if the Kerberos library was complied with thread support.

-

Returns:
TRUE if the library was compiled with thread support, FALSE if not.
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION const krb5_enctype* KRB5_LIB_CALL krb5_kerberos_enctypes (krb5_context  context  ) 
-
-
- -

-Returns the list of Kerberos encryption types sorted in order of most preferred to least preferred encryption type. Note that some encryption types might be disabled, so you need to check with krb5_enctype_valid() before using the encryption type.

-

Returns:
list of enctypes, terminated with ETYPE_NULL. Its a static array completed into the Kerberos library so the content doesn't need to be freed.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_krbhst_get_addrinfo (krb5_context  context,
krb5_krbhst_info *  host,
struct addrinfo **  ai 
)
-
-
- -

-Return an `struct addrinfo *' for a KDC host.

-Returns an the struct addrinfo in in that corresponds to the information in `host'. free:ing is handled by krb5_krbhst_free, so the returned ai must not be released. -

-First try this as an IP address, this allows us to add a dot at the end to stop using the search domains.

-If the hostname contains a dot, assumes it's a FQDN and don't use search domains since that might be painfully slow when machine is disconnected from that network. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_prepend_config_files_default (const char *  filelist,
char ***  pfilenames 
)
-
-
- -

-Prepend the filename to the global configuration list.

-

Parameters:
- - - -
filelist a filename to add to the default list of filename
pfilenames return array of filenames, should be freed with krb5_free_config_files().
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_config_files (krb5_context  context,
char **  filenames 
)
-
-
- -

-Reinit the context from a new set of filenames.

-

Parameters:
- - - -
context context to add configuration too.
filenames array of filenames, end of list is indicated with a NULL filename.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_default_in_tkt_etypes (krb5_context  context,
const krb5_enctype *  etypes 
)
-
-
- -

-Set the default encryption types that will be use in communcation with the KDC, clients and servers.

-

Parameters:
- - - -
context Kerberos 5 context.
etypes Encryption types, array terminated with ETYPE_NULL (0).
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_dns_canonicalize_hostname (krb5_context  context,
krb5_boolean  flag 
)
-
-
- -

-Set if the library should use DNS to canonicalize hostnames.

-

Parameters:
- - - -
context Kerberos 5 context.
flag if its dns canonicalizion is used or not.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_extra_addresses (krb5_context  context,
const krb5_addresses *  addresses 
)
-
-
- -

-Set extra address to the address list that the library will add to the client's address list when communicating with the KDC.

-

Parameters:
- - - -
context Kerberos 5 context.
addresses addreses to set
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_fcache_version (krb5_context  context,
int  version 
)
-
-
- -

-Set version of fcache that the library should use.

-

Parameters:
- - - -
context Kerberos 5 context.
version version number.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_set_home_dir_access (krb5_context  context,
krb5_boolean  allow 
)
-
-
- -

-Enable and disable home directory access on either the global state or the krb5_context state. By calling krb5_set_home_dir_access() with context set to NULL, the global state is configured otherwise the state for the krb5_context is modified.

-For home directory access to be allowed, both the global state and the krb5_context state have to be allowed.

-Administrator (root user), never uses the home directory.

-

Parameters:
- - - -
context a Kerberos 5 context or NULL
allow allow if TRUE home directory
-
-
Returns:
the old value
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_ignore_addresses (krb5_context  context,
const krb5_addresses *  addresses 
)
-
-
- -

-Set extra addresses to ignore when fetching addresses from the underlaying operating system.

-

Parameters:
- - - -
context Kerberos 5 context.
addresses addreses to ignore
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_kdc_sec_offset (krb5_context  context,
int32_t  sec,
int32_t  usec 
)
-
-
- -

-Set current offset in time to the KDC.

-

Parameters:
- - - - -
context Kerberos 5 context.
sec seconds part of offset.
usec micro seconds part of offset.
-
-
Returns:
returns zero
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_max_time_skew (krb5_context  context,
time_t  t 
)
-
-
- -

-Set max time skew allowed.

-

Parameters:
- - - -
context Kerberos 5 context.
t timeskew in seconds.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_password (krb5_context  context,
krb5_creds *  creds,
const char *  newpw,
krb5_principal  targprinc,
int *  result_code,
krb5_data *  result_code_string,
krb5_data *  result_string 
)
-
-
- -

-Change password using creds.

-

Parameters:
- - - - - - - - -
context a Keberos context
creds The initial kadmin/passwd for the principal or an admin principal
newpw The new password to set
targprinc if unset, the default principal is used.
result_code Result code, KRB5_KPASSWD_SUCCESS is when password is changed.
result_code_string binary message from the server, contains at least the result_code.
result_string A message from the kpasswd service or the library in human printable form. The string is NUL terminated.
-
-
Returns:
On sucess and *result_code is KRB5_KPASSWD_SUCCESS, the password is changed.
-@ -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_real_time (krb5_context  context,
krb5_timestamp  sec,
int32_t  usec 
)
-
-
- -

-Set the absolute time that the caller knows the kdc has so the kerberos library can calculate the relative diffrence beteen the KDC time and local system time.

-

Parameters:
- - - - -
context Keberos 5 context.
sec The applications new of "now" in seconds
usec The applications new of "now" in micro seconds
-
-
Returns:
Kerberos 5 error code, see krb5_get_error_message().
- -

-If the caller passes in a negative usec, its assumed to be unknown and the function will use the current time usec. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_use_admin_kdc (krb5_context  context,
krb5_boolean  flag 
)
-
-
- -

-Make the kerberos library default to the admin KDC.

-

Parameters:
- - - -
context Kerberos 5 context.
flag boolean flag to select if the use the admin KDC or not.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ticket_get_authorization_data_type (krb5_context  context,
krb5_ticket *  ticket,
int  type,
krb5_data *  data 
)
-
-
- -

-Extract the authorization data type of type from the ticket. Store the field in data. This function is to use for kerberos applications.

-

Parameters:
- - - - - -
context a Kerberos 5 context
ticket Kerberos ticket
type type to fetch
data returned data, free with krb5_data_free()
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ticket_get_client (krb5_context  context,
const krb5_ticket *  ticket,
krb5_principal *  client 
)
-
-
- -

-Return client principal in ticket

-

Parameters:
- - - - -
context a Kerberos 5 context
ticket ticket to copy
client client principal, free with krb5_free_principal()
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL krb5_ticket_get_endtime (krb5_context  context,
const krb5_ticket *  ticket 
)
-
-
- -

-Return end time of ticket

-

Parameters:
- - - -
context a Kerberos 5 context
ticket ticket to copy
-
-
Returns:
end time of ticket
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ticket_get_server (krb5_context  context,
const krb5_ticket *  ticket,
krb5_principal *  server 
)
-
-
- -

-Return server principal in ticket

-

Parameters:
- - - - -
context a Kerberos 5 context
ticket ticket to copy
server server principal, free with krb5_free_principal()
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__address.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__address.html deleted file mode 100644 index f6022fb27cf..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__address.html +++ /dev/null @@ -1,1003 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 address functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 address functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_sockaddr2address (krb5_context context, const struct sockaddr *sa, krb5_address *addr)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_sockaddr2port (krb5_context context, const struct sockaddr *sa, int16_t *port)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_addr2sockaddr (krb5_context context, const krb5_address *addr, struct sockaddr *sa, krb5_socklen_t *sa_size, int port)
KRB5_LIB_FUNCTION size_t
-KRB5_LIB_CALL 
krb5_max_sockaddr_size (void)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_sockaddr_uninteresting (const struct sockaddr *sa)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_h_addr2sockaddr (krb5_context context, int af, const char *addr, struct sockaddr *sa, krb5_socklen_t *sa_size, int port)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_h_addr2addr (krb5_context context, int af, const char *haddr, krb5_address *addr)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_anyaddr (krb5_context context, int af, struct sockaddr *sa, krb5_socklen_t *sa_size, int port)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_print_address (const krb5_address *addr, char *str, size_t len, size_t *ret_len)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_parse_address (krb5_context context, const char *string, krb5_addresses *addresses)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_address_order (krb5_context context, const krb5_address *addr1, const krb5_address *addr2)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_address_compare (krb5_context context, const krb5_address *addr1, const krb5_address *addr2)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_address_search (krb5_context context, const krb5_address *addr, const krb5_addresses *addrlist)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_free_address (krb5_context context, krb5_address *address)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_free_addresses (krb5_context context, krb5_addresses *addresses)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_address (krb5_context context, const krb5_address *inaddr, krb5_address *outaddr)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_addresses (krb5_context context, const krb5_addresses *inaddr, krb5_addresses *outaddr)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_append_addresses (krb5_context context, krb5_addresses *dest, const krb5_addresses *source)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_make_addrport (krb5_context context, krb5_address **res, const krb5_address *addr, int16_t port)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_address_prefixlen_boundary (krb5_context context, const krb5_address *inaddr, unsigned long prefixlen, krb5_address *low, krb5_address *high)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_addr2sockaddr (krb5_context  context,
const krb5_address *  addr,
struct sockaddr *  sa,
krb5_socklen_t *  sa_size,
int  port 
)
-
-
- -

-krb5_addr2sockaddr sets the "struct sockaddr sockaddr" from addr and port. The argument sa_size should initially contain the size of the sa and after the call, it will contain the actual length of the address. In case of the sa is too small to fit the whole address, the up to *sa_size will be stored, and then *sa_size will be set to the required length.

-

Parameters:
- - - - - - -
context a Keberos context
addr the address to copy the from
sa the struct sockaddr that will be filled in
sa_size pointer to length of sa, and after the call, it will contain the actual length of the address.
port set port in sa.
-
-
Returns:
Return an error code or 0. Will return KRB5_PROG_ATYPE_NOSUPP in case address type is not supported.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_address_compare (krb5_context  context,
const krb5_address *  addr1,
const krb5_address *  addr2 
)
-
-
- -

-krb5_address_compare compares the addresses addr1 and addr2. Returns TRUE if the two addresses are the same.

-

Parameters:
- - - - -
context a Keberos context
addr1 address to compare
addr2 address to compare
-
-
Returns:
Return an TRUE is the address are the same FALSE if not
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_address_order (krb5_context  context,
const krb5_address *  addr1,
const krb5_address *  addr2 
)
-
-
- -

-krb5_address_order compares the addresses addr1 and addr2 so that it can be used for sorting addresses. If the addresses are the same address krb5_address_order will return 0. Behavies like memcmp(2).

-

Parameters:
- - - - -
context a Keberos context
addr1 krb5_address to compare
addr2 krb5_address to compare
-
-
Returns:
< 0 if address addr1 in "less" then addr2. 0 if addr1 and addr2 is the same address, > 0 if addr2 is "less" then addr1.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_address_prefixlen_boundary (krb5_context  context,
const krb5_address *  inaddr,
unsigned long  prefixlen,
krb5_address *  low,
krb5_address *  high 
)
-
-
- -

-Calculate the boundary addresses of `inaddr'/`prefixlen' and store them in `low' and `high'.

-

Parameters:
- - - - - - -
context a Keberos context
inaddr address in prefixlen that the bondery searched
prefixlen width of boundery
low lowest address
high highest address
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_address_search (krb5_context  context,
const krb5_address *  addr,
const krb5_addresses *  addrlist 
)
-
-
- -

-krb5_address_search checks if the address addr is a member of the address set list addrlist .

-

Parameters:
- - - - -
context a Keberos context.
addr address to search for.
addrlist list of addresses to look in for addr.
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_anyaddr (krb5_context  context,
int  af,
struct sockaddr *  sa,
krb5_socklen_t *  sa_size,
int  port 
)
-
-
- -

-krb5_anyaddr fills in a "struct sockaddr sa" that can be used to bind(2) to. The argument sa_size should initially contain the size of the sa, and after the call, it will contain the actual length of the address.

-

Parameters:
- - - - - - -
context a Keberos context
af address family
sa sockaddr
sa_size lenght of sa.
port for to fill into sa.
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_append_addresses (krb5_context  context,
krb5_addresses *  dest,
const krb5_addresses *  source 
)
-
-
- -

-krb5_append_addresses adds the set of addresses in source to dest. While copying the addresses, duplicates are also sorted out.

-

Parameters:
- - - - -
context a Keberos context
dest destination of copy operation
source adresses that are going to be added to dest
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_address (krb5_context  context,
const krb5_address *  inaddr,
krb5_address *  outaddr 
)
-
-
- -

-krb5_copy_address copies the content of address inaddr to outaddr.

-

Parameters:
- - - - -
context a Keberos context
inaddr pointer to source address
outaddr pointer to destination address
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_addresses (krb5_context  context,
const krb5_addresses *  inaddr,
krb5_addresses *  outaddr 
)
-
-
- -

-krb5_copy_addresses copies the content of addresses inaddr to outaddr.

-

Parameters:
- - - - -
context a Keberos context
inaddr pointer to source addresses
outaddr pointer to destination addresses
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_address (krb5_context  context,
krb5_address *  address 
)
-
-
- -

-krb5_free_address frees the data stored in the address that is alloced with any of the krb5_address functions.

-

Parameters:
- - - -
context a Keberos context
address addresss to be freed.
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_addresses (krb5_context  context,
krb5_addresses *  addresses 
)
-
-
- -

-krb5_free_addresses frees the data stored in the address that is alloced with any of the krb5_address functions.

-

Parameters:
- - - -
context a Keberos context
addresses addressses to be freed.
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_h_addr2addr (krb5_context  context,
int  af,
const char *  haddr,
krb5_address *  addr 
)
-
-
- -

-krb5_h_addr2addr works like krb5_h_addr2sockaddr with the exception that it operates on a krb5_address instead of a struct sockaddr.

-

Parameters:
- - - - - -
context a Keberos context
af address family
haddr host address from struct hostent.
addr returned krb5_address.
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_h_addr2sockaddr (krb5_context  context,
int  af,
const char *  addr,
struct sockaddr *  sa,
krb5_socklen_t *  sa_size,
int  port 
)
-
-
- -

-krb5_h_addr2sockaddr initializes a "struct sockaddr sa" from af and the "struct hostent" (see gethostbyname(3) ) h_addr_list component. The argument sa_size should initially contain the size of the sa, and after the call, it will contain the actual length of the address.

-

Parameters:
- - - - - - - -
context a Keberos context
af addresses
addr address
sa returned struct sockaddr
sa_size size of sa
port port to set in sa.
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_make_addrport (krb5_context  context,
krb5_address **  res,
const krb5_address *  addr,
int16_t  port 
)
-
-
- -

-Create an address of type KRB5_ADDRESS_ADDRPORT from (addr, port)

-

Parameters:
- - - - - -
context a Keberos context
res built address from addr/port
addr address to use
port port to use
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION size_t KRB5_LIB_CALL krb5_max_sockaddr_size (void   ) 
-
-
- -

-krb5_max_sockaddr_size returns the max size of the .Li struct sockaddr that the Kerberos library will return.

-

Returns:
Return an size_t of the maximum struct sockaddr.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_address (krb5_context  context,
const char *  string,
krb5_addresses *  addresses 
)
-
-
- -

-krb5_parse_address returns the resolved hostname in string to the krb5_addresses addresses .

-

Parameters:
- - - - -
context a Keberos context
string 
addresses 
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_print_address (const krb5_address *  addr,
char *  str,
size_t  len,
size_t *  ret_len 
)
-
-
- -

-krb5_print_address prints the address in addr to the string string that have the length len. If ret_len is not NULL, it will be filled with the length of the string if size were unlimited (not including the final NUL) .

-

Parameters:
- - - - - -
addr address to be printed
str pointer string to print the address into
len length that will fit into area pointed to by "str".
ret_len return length the str.
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_sockaddr2address (krb5_context  context,
const struct sockaddr *  sa,
krb5_address *  addr 
)
-
-
- -

-krb5_sockaddr2address stores a address a "struct sockaddr" sa in the krb5_address addr.

-

Parameters:
- - - - -
context a Keberos context
sa a struct sockaddr to extract the address from
addr an Kerberos 5 address to store the address in.
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_sockaddr2port (krb5_context  context,
const struct sockaddr *  sa,
int16_t *  port 
)
-
-
- -

-krb5_sockaddr2port extracts a port (if possible) from a "struct sockaddr.

-

Parameters:
- - - - -
context a Keberos context
sa a struct sockaddr to extract the port from
port a pointer to an int16_t store the port in.
-
-
Returns:
Return an error code or 0. Will return KRB5_PROG_ATYPE_NOSUPP in case address type is not supported.
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_sockaddr_uninteresting (const struct sockaddr *  sa  ) 
-
-
- -

-krb5_sockaddr_uninteresting returns TRUE for all .Fa sa that the kerberos library thinks are uninteresting. One example are link local addresses.

-

Parameters:
- - -
sa pointer to struct sockaddr that might be interesting.
-
-
Returns:
Return a non zero for uninteresting addresses.
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__auth.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__auth.html deleted file mode 100644 index a18ed9cc680..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__auth.html +++ /dev/null @@ -1,320 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 authentication functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 authentication functions

- - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_rd_req_in_ctx_alloc (krb5_context context, krb5_rd_req_in_ctx *ctx)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_rd_req_in_set_keytab (krb5_context context, krb5_rd_req_in_ctx in, krb5_keytab keytab)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_rd_req_in_set_pac_check (krb5_context context, krb5_rd_req_in_ctx in, krb5_boolean flag)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_rd_req_out_get_server (krb5_context context, krb5_rd_req_out_ctx out, krb5_principal *principal)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_rd_req_out_ctx_free (krb5_context context, krb5_rd_req_out_ctx ctx)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_rd_req_ctx (krb5_context context, krb5_auth_context *auth_context, const krb5_data *inbuf, krb5_const_principal server, krb5_rd_req_in_ctx inctx, krb5_rd_req_out_ctx *outctx)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_ctx (krb5_context  context,
krb5_auth_context *  auth_context,
const krb5_data *  inbuf,
krb5_const_principal  server,
krb5_rd_req_in_ctx  inctx,
krb5_rd_req_out_ctx *  outctx 
)
-
-
- -

-The core server function that verify application authentication requests from clients.

-

Parameters:
- - - - - - - -
context Keberos 5 context.
auth_context the authentication context, can be NULL, then default values for the authentication context will used.
inbuf the (AP-REQ) authentication buffer
server the server with authenticate as, if NULL the function will try to find any available credential in the keytab that will verify the reply. The function will prefer the server the server client specified in the AP-REQ, but if there is no mach, it will try all keytab entries for a match. This have serious performance issues for larger keytabs.
inctx control the behavior of the function, if NULL, the default behavior is used.
outctx the return outctx, free with krb5_rd_req_out_ctx_free().
-
-
Returns:
Kerberos 5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_ctx_alloc (krb5_context  context,
krb5_rd_req_in_ctx *  ctx 
)
-
-
- -

-Allocate a krb5_rd_req_in_ctx as an input parameter to krb5_rd_req_ctx(). The caller should free the context with krb5_rd_req_in_ctx_free() when done with the context.

-

Parameters:
- - - -
context Keberos 5 context.
ctx in ctx to krb5_rd_req_ctx().
-
-
Returns:
Kerberos 5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_set_keytab (krb5_context  context,
krb5_rd_req_in_ctx  in,
krb5_keytab  keytab 
)
-
-
- -

-Set the keytab that krb5_rd_req_ctx() will use.

-

Parameters:
- - - - -
context Keberos 5 context.
in in ctx to krb5_rd_req_ctx().
keytab keytab that krb5_rd_req_ctx() will use, only copy the pointer, so the caller must free they keytab after krb5_rd_req_in_ctx_free() is called.
-
-
Returns:
Kerberos 5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_set_pac_check (krb5_context  context,
krb5_rd_req_in_ctx  in,
krb5_boolean  flag 
)
-
-
- -

-Set if krb5_rq_red() is going to check the Windows PAC or not

-

Parameters:
- - - - -
context Keberos 5 context.
in krb5_rd_req_in_ctx to check the option on.
flag flag to select if to check the pac (TRUE) or not (FALSE).
-
-
Returns:
Kerberos 5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_rd_req_out_ctx_free (krb5_context  context,
krb5_rd_req_out_ctx  ctx 
)
-
-
- -

-Free the krb5_rd_req_out_ctx.

-

Parameters:
- - - -
context Keberos 5 context.
ctx krb5_rd_req_out_ctx context to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_out_get_server (krb5_context  context,
krb5_rd_req_out_ctx  out,
krb5_principal *  principal 
)
-
-
- -

-Get the principal that was used in the request from the client. Might not match whats in the ticket if krb5_rd_req_ctx() searched in the keytab for a matching key.

-

Parameters:
- - - - -
context a Kerberos 5 context.
out a krb5_rd_req_out_ctx from krb5_rd_req_ctx().
principal return principal, free with krb5_free_principal().
-
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__ccache.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__ccache.html deleted file mode 100644 index 20d889a7cbe..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__ccache.html +++ /dev/null @@ -1,2264 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 credential cache functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 credential cache functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_register (krb5_context context, const krb5_cc_ops *ops, krb5_boolean override)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_resolve (krb5_context context, const char *name, krb5_ccache *id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_new_unique (krb5_context context, const char *type, const char *hint, krb5_ccache *id)
KRB5_LIB_FUNCTION const char
-*KRB5_LIB_CALL 
krb5_cc_get_name (krb5_context context, krb5_ccache id)
KRB5_LIB_FUNCTION const char
-*KRB5_LIB_CALL 
krb5_cc_get_type (krb5_context context, krb5_ccache id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_get_full_name (krb5_context context, krb5_ccache id, char **str)
KRB5_LIB_FUNCTION const
-krb5_cc_ops *KRB5_LIB_CALL 
krb5_cc_get_ops (krb5_context context, krb5_ccache id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_switch (krb5_context context, krb5_ccache id)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_cc_support_switch (krb5_context context, const char *type)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_set_default_name (krb5_context context, const char *name)
KRB5_LIB_FUNCTION const char
-*KRB5_LIB_CALL 
krb5_cc_default_name (krb5_context context)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_default (krb5_context context, krb5_ccache *id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_initialize (krb5_context context, krb5_ccache id, krb5_principal primary_principal)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_destroy (krb5_context context, krb5_ccache id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_close (krb5_context context, krb5_ccache id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_store_cred (krb5_context context, krb5_ccache id, krb5_creds *creds)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_retrieve_cred (krb5_context context, krb5_ccache id, krb5_flags whichfields, const krb5_creds *mcreds, krb5_creds *creds)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_get_principal (krb5_context context, krb5_ccache id, krb5_principal *principal)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_start_seq_get (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_next_cred (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor, krb5_creds *creds)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_end_seq_get (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_remove_cred (krb5_context context, krb5_ccache id, krb5_flags which, krb5_creds *cred)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_set_flags (krb5_context context, krb5_ccache id, krb5_flags flags)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_get_flags (krb5_context context, krb5_ccache id, krb5_flags *flags)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_copy_match_f (krb5_context context, const krb5_ccache from, krb5_ccache to, krb5_boolean(*match)(krb5_context, void *, const krb5_creds *), void *matchctx, unsigned int *matched)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_copy_cache (krb5_context context, const krb5_ccache from, krb5_ccache to)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_get_version (krb5_context context, const krb5_ccache id)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_cc_clear_mcred (krb5_creds *mcred)
KRB5_LIB_FUNCTION const
-krb5_cc_ops *KRB5_LIB_CALL 
krb5_cc_get_prefix_ops (krb5_context context, const char *prefix)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_cache_get_first (krb5_context context, const char *type, krb5_cc_cache_cursor *cursor)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_cache_next (krb5_context context, krb5_cc_cache_cursor cursor, krb5_ccache *id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_cache_end_seq_get (krb5_context context, krb5_cc_cache_cursor cursor)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_cache_match (krb5_context context, krb5_principal client, krb5_ccache *id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_move (krb5_context context, krb5_ccache from, krb5_ccache to)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_is_config_principal (krb5_context context, krb5_const_principal principal)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_set_config (krb5_context context, krb5_ccache id, krb5_const_principal principal, const char *name, krb5_data *data)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_get_config (krb5_context context, krb5_ccache id, krb5_const_principal principal, const char *name, krb5_data *data)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cccol_cursor_new (krb5_context context, krb5_cccol_cursor *cursor)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cccol_cursor_next (krb5_context context, krb5_cccol_cursor cursor, krb5_ccache *cache)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cccol_cursor_free (krb5_context context, krb5_cccol_cursor *cursor)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_last_change_time (krb5_context context, krb5_ccache id, krb5_timestamp *mtime)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cccol_last_change_time (krb5_context context, const char *type, krb5_timestamp *mtime)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_get_friendly_name (krb5_context context, krb5_ccache id, char **name)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_set_friendly_name (krb5_context context, krb5_ccache id, const char *name)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_get_lifetime (krb5_context context, krb5_ccache id, time_t *t)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_set_kdc_offset (krb5_context context, krb5_ccache id, krb5_deltat offset)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_get_kdc_offset (krb5_context context, krb5_ccache id, krb5_deltat *offset)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_gen_new (krb5_context context, const krb5_cc_ops *ops, krb5_ccache *id) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cc_copy_creds (krb5_context context, const krb5_ccache from, krb5_ccache to)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_validated_creds (krb5_context context, krb5_creds *creds, krb5_principal client, krb5_ccache ccache, char *service)

Variables

KRB5_LIB_VARIABLE const krb5_cc_ops krb5_acc_ops
KRB5_LIB_VARIABLE const krb5_cc_ops krb5_fcc_ops
KRB5_LIB_VARIABLE const krb5_cc_ops krb5_mcc_ops
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_end_seq_get (krb5_context  context,
krb5_cc_cache_cursor  cursor 
)
-
-
- -

-Destroy the cursor `cursor'.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_get_first (krb5_context  context,
const char *  type,
krb5_cc_cache_cursor *  cursor 
)
-
-
- -

-Start iterating over all caches of specified type. See also krb5_cccol_cursor_new().

-

Parameters:
- - - - -
context A Kerberos 5 context
type optional type to iterate over, if NULL, the default cache is used.
cursor cursor should be freed with krb5_cc_cache_end_seq_get().
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_match (krb5_context  context,
krb5_principal  client,
krb5_ccache *  id 
)
-
-
- -

-Search for a matching credential cache that have the `principal' as the default principal. On success, `id' needs to be freed with krb5_cc_close() or krb5_cc_destroy().

-

Parameters:
- - - - -
context A Kerberos 5 context
client The principal to search for
id the returned credential cache
-
-
Returns:
On failure, error code is returned and `id' is set to NULL.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_next (krb5_context  context,
krb5_cc_cache_cursor  cursor,
krb5_ccache *  id 
)
-
-
- -

-Retrieve the next cache pointed to by (`cursor') in `id' and advance `cursor'.

-

Parameters:
- - - - -
context A Kerberos 5 context
cursor the iterator cursor, returned by krb5_cc_cache_get_first()
id next ccache
-
-
Returns:
Return 0 or an error code. Returns KRB5_CC_END when the end of caches is reached, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_cc_clear_mcred (krb5_creds *  mcred  ) 
-
-
- -

-Clear `mcreds' so it can be used with krb5_cc_retrieve_cred -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_close (krb5_context  context,
krb5_ccache  id 
)
-
-
- -

-Stop using the ccache `id' and free the related resources.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_copy_cache (krb5_context  context,
const krb5_ccache  from,
krb5_ccache  to 
)
-
-
- -

-Just like krb5_cc_copy_match_f(), but copy everything.

-@ -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_copy_creds (krb5_context  context,
const krb5_ccache  from,
krb5_ccache  to 
)
-
-
- -

-MIT compat glue -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_copy_match_f (krb5_context  context,
const krb5_ccache  from,
krb5_ccache  to,
krb5_boolean(*)(krb5_context, void *, const krb5_creds *)  match,
void *  matchctx,
unsigned int *  matched 
)
-
-
- -

-Copy the contents of `from' to `to' if the given match function return true.

-

Parameters:
- - - - - - - -
context A Kerberos 5 context.
from the cache to copy data from.
to the cache to copy data to.
match a match function that should return TRUE if cred argument should be copied, if NULL, all credentials are copied.
matchctx context passed to match function.
matched set to true if there was a credential that matched, may be NULL.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_default (krb5_context  context,
krb5_ccache *  id 
)
-
-
- -

-Open the default ccache in `id'.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_cc_default_name (krb5_context  context  ) 
-
-
- -

-Return a pointer to a context static string containing the default ccache name.

-

Returns:
String to the default credential cache name.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_destroy (krb5_context  context,
krb5_ccache  id 
)
-
-
- -

-Remove the ccache `id'.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_end_seq_get (krb5_context  context,
const krb5_ccache  id,
krb5_cc_cursor *  cursor 
)
-
-
- -

-Destroy the cursor `cursor'. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_gen_new (krb5_context  context,
const krb5_cc_ops *  ops,
krb5_ccache *  id 
)
-
-
- -

-Generate a new ccache of type `ops' in `id'.

-Deprecated: use krb5_cc_new_unique() instead.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_config (krb5_context  context,
krb5_ccache  id,
krb5_const_principal  principal,
const char *  name,
krb5_data *  data 
)
-
-
- -

-Get some configuration for the credential cache in the cache.

-

Parameters:
- - - - - - -
context a Keberos context
id the credential cache to store the data for
principal configuration for a specific principal, if NULL, global for the whole cache.
name name under which the configuraion is stored.
data data to fetched, free with krb5_data_free()
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_flags (krb5_context  context,
krb5_ccache  id,
krb5_flags *  flags 
)
-
-
- -

-Get the flags of `id', store them in `flags'. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_friendly_name (krb5_context  context,
krb5_ccache  id,
char **  name 
)
-
-
- -

-Return a friendly name on credential cache. Free the result with krb5_xfree().

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_full_name (krb5_context  context,
krb5_ccache  id,
char **  str 
)
-
-
- -

-Return the complete resolvable name the cache

-

Parameters:
- - - - -
context a Keberos context
id return pointer to a found credential cache
str the returned name of a credential cache, free with krb5_xfree()
-
-
Returns:
Returns 0 or an error (and then *str is set to NULL).
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_kdc_offset (krb5_context  context,
krb5_ccache  id,
krb5_deltat *  offset 
)
-
-
- -

-Get the time offset betwen the client and the KDC

-If the backend doesn't support KDC offset, use the context global setting.

-

Parameters:
- - - - -
context A Kerberos 5 context.
id a credential cache
offset the offset in seconds
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_lifetime (krb5_context  context,
krb5_ccache  id,
time_t *  t 
)
-
-
- -

-Get the lifetime of the initial ticket in the cache

-Get the lifetime of the initial ticket in the cache, if the initial ticket was not found, the error code KRB5_CC_END is returned.

-

Parameters:
- - - - -
context A Kerberos 5 context.
id a credential cache
t the relative lifetime of the initial ticket
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_cc_get_name (krb5_context  context,
krb5_ccache  id 
)
-
-
- -

-Return the name of the ccache `id' -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const krb5_cc_ops* KRB5_LIB_CALL krb5_cc_get_ops (krb5_context  context,
krb5_ccache  id 
)
-
-
- -

-Return krb5_cc_ops of a the ccache `id'. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const krb5_cc_ops* KRB5_LIB_CALL krb5_cc_get_prefix_ops (krb5_context  context,
const char *  prefix 
)
-
-
- -

-Get the cc ops that is registered in `context' to handle the prefix. prefix can be a complete credential cache name or a prefix, the function will only use part up to the first colon (:) if there is one. If prefix the argument is NULL, the default ccache implemtation is returned.

-

Returns:
Returns NULL if ops not found.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_principal (krb5_context  context,
krb5_ccache  id,
krb5_principal *  principal 
)
-
-
- -

-Return the principal of `id' in `principal'.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_cc_get_type (krb5_context  context,
krb5_ccache  id 
)
-
-
- -

-Return the type of the ccache `id'. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_version (krb5_context  context,
const krb5_ccache  id 
)
-
-
- -

-Return the version of `id'. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_initialize (krb5_context  context,
krb5_ccache  id,
krb5_principal  primary_principal 
)
-
-
- -

-Create a new ccache in `id' for `primary_principal'.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_last_change_time (krb5_context  context,
krb5_ccache  id,
krb5_timestamp *  mtime 
)
-
-
- -

-Return the last time the credential cache was modified.

-

Parameters:
- - - - -
context A Kerberos 5 context
id The credential cache to probe
mtime the last modification time, set to 0 on error.
-
-
Returns:
Return 0 or and error. See krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_move (krb5_context  context,
krb5_ccache  from,
krb5_ccache  to 
)
-
-
- -

-Move the content from one credential cache to another. The operation is an atomic switch.

-

Parameters:
- - - - -
context a Keberos context
from the credential cache to move the content from
to the credential cache to move the content to
-
-
Returns:
On sucess, from is freed. On failure, error code is returned and from and to are both still allocated, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_new_unique (krb5_context  context,
const char *  type,
const char *  hint,
krb5_ccache *  id 
)
-
-
- -

-Generates a new unique ccache of `type` in `id'. If `type' is NULL, the library chooses the default credential cache type. The supplied `hint' (that can be NULL) is a string that the credential cache type can use to base the name of the credential on, this is to make it easier for the user to differentiate the credentials.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_next_cred (krb5_context  context,
const krb5_ccache  id,
krb5_cc_cursor *  cursor,
krb5_creds *  creds 
)
-
-
- -

-Retrieve the next cred pointed to by (`id', `cursor') in `creds' and advance `cursor'.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_register (krb5_context  context,
const krb5_cc_ops *  ops,
krb5_boolean  override 
)
-
-
- -

-Add a new ccache type with operations `ops', overwriting any existing one if `override'.

-

Parameters:
- - - - -
context a Keberos context
ops type of plugin symbol
override flag to select if the registration is to overide an existing ops with the same name.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_remove_cred (krb5_context  context,
krb5_ccache  id,
krb5_flags  which,
krb5_creds *  cred 
)
-
-
- -

-Remove the credential identified by `cred', `which' from `id'. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_resolve (krb5_context  context,
const char *  name,
krb5_ccache *  id 
)
-
-
- -

-Find and allocate a ccache in `id' from the specification in `residual'. If the ccache name doesn't contain any colon, interpret it as a file name.

-

Parameters:
- - - - -
context a Keberos context.
name string name of a credential cache.
id return pointer to a found credential cache.
-
-
Returns:
Return 0 or an error code. In case of an error, id is set to NULL, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_retrieve_cred (krb5_context  context,
krb5_ccache  id,
krb5_flags  whichfields,
const krb5_creds *  mcreds,
krb5_creds *  creds 
)
-
-
- -

-Retrieve the credential identified by `mcreds' (and `whichfields') from `id' in `creds'. 'creds' must be free by the caller using krb5_free_cred_contents.

-

Parameters:
- - - - - - -
context A Kerberos 5 context
id a Kerberos 5 credential cache
whichfields what fields to use for matching credentials, same flags as whichfields in krb5_compare_creds()
mcreds template credential to use for comparing
creds returned credential, free with krb5_free_cred_contents()
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_config (krb5_context  context,
krb5_ccache  id,
krb5_const_principal  principal,
const char *  name,
krb5_data *  data 
)
-
-
- -

-Store some configuration for the credential cache in the cache. Existing configuration under the same name is over-written.

-

Parameters:
- - - - - - -
context a Keberos context
id the credential cache to store the data for
principal configuration for a specific principal, if NULL, global for the whole cache.
name name under which the configuraion is stored.
data data to store, if NULL, configure is removed.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_default_name (krb5_context  context,
const char *  name 
)
-
-
- -

-Set the default cc name for `context' to `name'. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_flags (krb5_context  context,
krb5_ccache  id,
krb5_flags  flags 
)
-
-
- -

-Set the flags of `id' to `flags'. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_friendly_name (krb5_context  context,
krb5_ccache  id,
const char *  name 
)
-
-
- -

-Set the friendly name on credential cache.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_kdc_offset (krb5_context  context,
krb5_ccache  id,
krb5_deltat  offset 
)
-
-
- -

-Set the time offset betwen the client and the KDC

-If the backend doesn't support KDC offset, use the context global setting.

-

Parameters:
- - - - -
context A Kerberos 5 context.
id a credential cache
offset the offset in seconds
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_start_seq_get (krb5_context  context,
const krb5_ccache  id,
krb5_cc_cursor *  cursor 
)
-
-
- -

-Start iterating over `id', `cursor' is initialized to the beginning. Caller must free the cursor with krb5_cc_end_seq_get().

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_store_cred (krb5_context  context,
krb5_ccache  id,
krb5_creds *  creds 
)
-
-
- -

-Store `creds' in the ccache `id'.

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_cc_support_switch (krb5_context  context,
const char *  type 
)
-
-
- -

-Return true if the default credential cache support switch -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_switch (krb5_context  context,
krb5_ccache  id 
)
-
-
- -

-Switch the default default credential cache for a specific credcache type (and name for some implementations).

-

Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_cursor_free (krb5_context  context,
krb5_cccol_cursor *  cursor 
)
-
-
- -

-End an iteration and free all resources, can be done before end is reached.

-

Parameters:
- - - -
context A Kerberos 5 context
cursor the iteration cursor to be freed.
-
-
Returns:
Return 0 or and error, KRB5_CC_END is returned at the end of iteration. See krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_cursor_new (krb5_context  context,
krb5_cccol_cursor *  cursor 
)
-
-
- -

-Get a new cache interation cursor that will interate over all credentials caches independent of type.

-

Parameters:
- - - -
context a Keberos context
cursor passed into krb5_cccol_cursor_next() and free with krb5_cccol_cursor_free().
-
-
Returns:
Returns 0 or and error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_cursor_next (krb5_context  context,
krb5_cccol_cursor  cursor,
krb5_ccache *  cache 
)
-
-
- -

-Get next credential cache from the iteration.

-

Parameters:
- - - - -
context A Kerberos 5 context
cursor the iteration cursor
cache the returned cursor, pointer is set to NULL on failure and a cache on success. The returned cache needs to be freed with krb5_cc_close() or destroyed with krb5_cc_destroy(). MIT Kerberos behavies slightly diffrent and sets cache to NULL when all caches are iterated over and return 0.
-
-
Returns:
Return 0 or and error, KRB5_CC_END is returned at the end of iteration. See krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_last_change_time (krb5_context  context,
const char *  type,
krb5_timestamp *  mtime 
)
-
-
- -

-Return the last modfication time for a cache collection. The query can be limited to a specific cache type. If the function return 0 and mtime is 0, there was no credentials in the caches.

-

Parameters:
- - - - -
context A Kerberos 5 context
type The credential cache to probe, if NULL, all type are traversed.
mtime the last modification time, set to 0 on error.
-
-
Returns:
Return 0 or and error. See krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_validated_creds (krb5_context  context,
krb5_creds *  creds,
krb5_principal  client,
krb5_ccache  ccache,
char *  service 
)
-
-
- -

-Validate the newly fetch credential, see also krb5_verify_init_creds().

-

Parameters:
- - - - - - -
context a Kerberos 5 context
creds the credentials to verify
client the client name to match up
ccache the credential cache to use
service a service name to use, used with krb5_sname_to_principal() to build a hostname to use to verify.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_is_config_principal (krb5_context  context,
krb5_const_principal  principal 
)
-
-
- -

-Return TRUE (non zero) if the principal is a configuration principal (generated part of krb5_cc_set_config()). Returns FALSE (zero) if not a configuration principal.

-

Parameters:
- - - -
context a Keberos context
principal principal to check if it a configuration principal
-
- -
-

-


Variable Documentation

- -
-
- - - - -
KRB5_LIB_VARIABLE const krb5_cc_ops krb5_acc_ops
-
-
- -

-Initial value:

 {
-    KRB5_CC_OPS_VERSION,
-    "API",
-    acc_get_name,
-    acc_resolve,
-    acc_gen_new,
-    acc_initialize,
-    acc_destroy,
-    acc_close,
-    acc_store_cred,
-    NULL, 
-    acc_get_principal,
-    acc_get_first,
-    acc_get_next,
-    acc_end_get,
-    acc_remove_cred,
-    acc_set_flags,
-    acc_get_version,
-    acc_get_cache_first,
-    acc_get_cache_next,
-    acc_end_cache_get,
-    acc_move,
-    acc_get_default_name,
-    acc_set_default,
-    acc_lastchange,
-    NULL,
-    NULL,
-}
-
Variable containing the API based credential cache implemention. -
-

- -

-
- - - - -
KRB5_LIB_VARIABLE const krb5_cc_ops krb5_fcc_ops
-
-
- -

-Initial value:

 {
-    KRB5_CC_OPS_VERSION,
-    "FILE",
-    fcc_get_name,
-    fcc_resolve,
-    fcc_gen_new,
-    fcc_initialize,
-    fcc_destroy,
-    fcc_close,
-    fcc_store_cred,
-    NULL, 
-    fcc_get_principal,
-    fcc_get_first,
-    fcc_get_next,
-    fcc_end_get,
-    fcc_remove_cred,
-    fcc_set_flags,
-    fcc_get_version,
-    fcc_get_cache_first,
-    fcc_get_cache_next,
-    fcc_end_cache_get,
-    fcc_move,
-    fcc_get_default_name,
-    NULL,
-    fcc_lastchange,
-    fcc_set_kdc_offset,
-    fcc_get_kdc_offset
-}
-
Variable containing the FILE based credential cache implemention. -
-

- -

-
- - - - -
KRB5_LIB_VARIABLE const krb5_cc_ops krb5_mcc_ops
-
-
- -

-Initial value:

 {
-    KRB5_CC_OPS_VERSION,
-    "MEMORY",
-    mcc_get_name,
-    mcc_resolve,
-    mcc_gen_new,
-    mcc_initialize,
-    mcc_destroy,
-    mcc_close,
-    mcc_store_cred,
-    NULL, 
-    mcc_get_principal,
-    mcc_get_first,
-    mcc_get_next,
-    mcc_end_get,
-    mcc_remove_cred,
-    mcc_set_flags,
-    NULL,
-    mcc_get_cache_first,
-    mcc_get_cache_next,
-    mcc_end_cache_get,
-    mcc_move,
-    mcc_default_name,
-    NULL,
-    mcc_lastchange,
-    mcc_set_kdc_offset,
-    mcc_get_kdc_offset
-}
-
Variable containing the MEMORY based credential cache implemention. -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__credential.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__credential.html deleted file mode 100644 index 32ec0fef9bc..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__credential.html +++ /dev/null @@ -1,858 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 credential handing functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 credential handing functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_fwd_tgt_creds (krb5_context context, krb5_auth_context auth_context, const char *hostname, krb5_principal client, krb5_principal server, krb5_ccache ccache, int forwardable, krb5_data *out_data)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_forwarded_creds (krb5_context context, krb5_auth_context auth_context, krb5_ccache ccache, krb5_flags flags, const char *hostname, krb5_creds *in_creds, krb5_data *out_data)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_init_creds_opt_alloc (krb5_context context, krb5_get_init_creds_opt **opt)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_get_init_creds_opt_free (krb5_context context, krb5_get_init_creds_opt *opt)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_init_creds_init (krb5_context context, krb5_principal client, krb5_prompter_fct prompter, void *prompter_data, krb5_deltat start_time, krb5_get_init_creds_opt *options, krb5_init_creds_context *rctx)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_init_creds_set_service (krb5_context context, krb5_init_creds_context ctx, const char *service)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_init_creds_set_password (krb5_context context, krb5_init_creds_context ctx, const char *password)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_init_creds_set_keytab (krb5_context context, krb5_init_creds_context ctx, krb5_keytab keytab)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_init_creds_step (krb5_context context, krb5_init_creds_context ctx, krb5_data *in, krb5_data *out, krb5_krbhst_info *hostinfo, unsigned int *flags)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_init_creds_get_error (krb5_context context, krb5_init_creds_context ctx, KRB_ERROR *error)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_init_creds_free (krb5_context context, krb5_init_creds_context ctx)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_init_creds_get (krb5_context context, krb5_init_creds_context ctx)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_init_creds_password (krb5_context context, krb5_creds *creds, krb5_principal client, const char *password, krb5_prompter_fct prompter, void *data, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *options)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_init_creds_keyblock (krb5_context context, krb5_creds *creds, krb5_principal client, krb5_keyblock *keyblock, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *options)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_init_creds_keytab (krb5_context context, krb5_creds *creds, krb5_principal client, krb5_keytab keytab, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *options)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_fwd_tgt_creds (krb5_context  context,
krb5_auth_context  auth_context,
const char *  hostname,
krb5_principal  client,
krb5_principal  server,
krb5_ccache  ccache,
int  forwardable,
krb5_data *  out_data 
)
-
-
- -

-Forward credentials for client to host hostname , making them forwardable if forwardable, and returning the blob of data to sent in out_data. If hostname == NULL, pick it from server.

-

Parameters:
- - - - - - - - - -
context A kerberos 5 context.
auth_context the auth context with the key to encrypt the out_data.
hostname the host to forward the tickets too.
client the client to delegate from.
server the server to delegate the credential too.
ccache credential cache to use.
forwardable make the forwarded ticket forwabledable.
out_data the resulting credential.
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_forwarded_creds (krb5_context  context,
krb5_auth_context  auth_context,
krb5_ccache  ccache,
krb5_flags  flags,
const char *  hostname,
krb5_creds *  in_creds,
krb5_data *  out_data 
)
-
-
- -

-Gets tickets forwarded to hostname. If the tickets that are forwarded are address-less, the forwarded tickets will also be address-less.

-If the ticket have any address, hostname will be used for figure out the address to forward the ticket too. This since this might use DNS, its insecure and also doesn't represent configured all addresses of the host. For example, the host might have two adresses, one IPv4 and one IPv6 address where the later is not published in DNS. This IPv6 address might be used communications and thus the resulting ticket useless.

-

Parameters:
- - - - - - - - -
context A kerberos 5 context.
auth_context the auth context with the key to encrypt the out_data.
ccache credential cache to use
flags the flags to control the resulting ticket flags
hostname the host to forward the tickets too.
in_creds the in client and server ticket names. The client and server components forwarded to the remote host.
out_data the resulting credential.
-
-
Returns:
Return an error code or 0.
- -

-Some older of the MIT gssapi library used clear-text tickets (warped inside AP-REQ encryption), use the krb5_auth_context flag KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED to support those tickets. The session key is used otherwise to encrypt the forwarded ticket. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_keyblock (krb5_context  context,
krb5_creds *  creds,
krb5_principal  client,
krb5_keyblock *  keyblock,
krb5_deltat  start_time,
const char *  in_tkt_service,
krb5_get_init_creds_opt *  options 
)
-
-
- -

-Get new credentials using keyblock. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_keytab (krb5_context  context,
krb5_creds *  creds,
krb5_principal  client,
krb5_keytab  keytab,
krb5_deltat  start_time,
const char *  in_tkt_service,
krb5_get_init_creds_opt *  options 
)
-
-
- -

-Get new credentials using keytab. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_opt_alloc (krb5_context  context,
krb5_get_init_creds_opt **  opt 
)
-
-
- -

-Allocate a new krb5_get_init_creds_opt structure, free with krb5_get_init_creds_opt_free(). -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_get_init_creds_opt_free (krb5_context  context,
krb5_get_init_creds_opt *  opt 
)
-
-
- -

-Free krb5_get_init_creds_opt structure. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_password (krb5_context  context,
krb5_creds *  creds,
krb5_principal  client,
const char *  password,
krb5_prompter_fct  prompter,
void *  data,
krb5_deltat  start_time,
const char *  in_tkt_service,
krb5_get_init_creds_opt *  options 
)
-
-
- -

-Get new credentials using password. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_init_creds_free (krb5_context  context,
krb5_init_creds_context  ctx 
)
-
-
- -

-Free the krb5_init_creds_context allocated by krb5_init_creds_init().

-

Parameters:
- - - -
context A Kerberos 5 context.
ctx The krb5_init_creds_context to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_get (krb5_context  context,
krb5_init_creds_context  ctx 
)
-
-
- -

-Get new credentials as setup by the krb5_init_creds_context.

-

Parameters:
- - - -
context A Kerberos 5 context.
ctx The krb5_init_creds_context to process.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_get_error (krb5_context  context,
krb5_init_creds_context  ctx,
KRB_ERROR *  error 
)
-
-
- -

-Get the last error from the transaction.

-

Returns:
Returns 0 or an error code
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_init (krb5_context  context,
krb5_principal  client,
krb5_prompter_fct  prompter,
void *  prompter_data,
krb5_deltat  start_time,
krb5_get_init_creds_opt *  options,
krb5_init_creds_context *  rctx 
)
-
-
- -

-Start a new context to get a new initial credential.

-

Parameters:
- - - - - - - - -
context A Kerberos 5 context.
client The Kerberos principal to get the credential for, if NULL is given, the default principal is used as determined by krb5_get_default_principal().
prompter 
prompter_data 
start_time the time the ticket should start to be valid or 0 for now.
options a options structure, can be NULL for default options.
rctx A new allocated free with krb5_init_creds_free().
-
-
Returns:
0 for success or an Kerberos 5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_set_keytab (krb5_context  context,
krb5_init_creds_context  ctx,
krb5_keytab  keytab 
)
-
-
- -

-Set the keytab to use for authentication.

-

Parameters:
- - - - -
context a Kerberos 5 context.
ctx ctx krb5_init_creds_context context.
keytab the keytab to read the key from.
-
-
Returns:
0 for success, or an Kerberos 5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_set_password (krb5_context  context,
krb5_init_creds_context  ctx,
const char *  password 
)
-
-
- -

-Sets the password that will use for the request.

-

Parameters:
- - - - -
context a Kerberos 5 context.
ctx ctx krb5_init_creds_context context.
password the password to use.
-
-
Returns:
0 for success, or an Kerberos 5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_set_service (krb5_context  context,
krb5_init_creds_context  ctx,
const char *  service 
)
-
-
- -

-Sets the service that the is requested. This call is only neede for special initial tickets, by default the a krbtgt is fetched in the default realm.

-

Parameters:
- - - - -
context a Kerberos 5 context.
ctx a krb5_init_creds_context context.
service the service given as a string, for example "kadmind/admin". If NULL, the default krbtgt in the clients realm is set.
-
-
Returns:
0 for success, or an Kerberos 5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_step (krb5_context  context,
krb5_init_creds_context  ctx,
krb5_data *  in,
krb5_data *  out,
krb5_krbhst_info *  hostinfo,
unsigned int *  flags 
)
-
-
- -

-The core loop if krb5_get_init_creds() function family. Create the packets and have the caller send them off to the KDC.

-If the caller want all work been done for them, use krb5_init_creds_get() instead.

-

Parameters:
- - - - - - - -
context a Kerberos 5 context.
ctx ctx krb5_init_creds_context context.
in input data from KDC, first round it should be reset by krb5_data_zer().
out reply to KDC.
hostinfo KDC address info, first round it can be NULL.
flags status of the round, if KRB5_INIT_CREDS_STEP_FLAG_CONTINUE is set, continue one more round.
-
-
Returns:
0 for success, or an Kerberos 5 error code, see krb5_get_error_message().
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__crypto.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__crypto.html deleted file mode 100644 index 7ca2bda897d..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__crypto.html +++ /dev/null @@ -1,1262 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 cryptography functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 cryptography functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_enctype_valid (krb5_context context, krb5_enctype etype)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_cksumtype_to_enctype (krb5_context context, krb5_cksumtype ctype, krb5_enctype *etype)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_encrypt_iov_ivec (krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, int num_data, void *ivec)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_decrypt_iov_ivec (krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, unsigned int num_data, void *ivec)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_create_checksum_iov (krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, unsigned int num_data, krb5_cksumtype *type)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_verify_checksum_iov (krb5_context context, krb5_crypto crypto, unsigned usage, krb5_crypto_iov *data, unsigned int num_data, krb5_cksumtype *type)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_crypto_init (krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_crypto *crypto)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_crypto_destroy (krb5_context context, krb5_crypto crypto)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_crypto_getblocksize (krb5_context context, krb5_crypto crypto, size_t *blocksize)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_crypto_getenctype (krb5_context context, krb5_crypto crypto, krb5_enctype *enctype)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_crypto_getpadsize (krb5_context context, krb5_crypto crypto, size_t *padsize)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_crypto_getconfoundersize (krb5_context context, krb5_crypto crypto, size_t *confoundersize)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_enctype_disable (krb5_context context, krb5_enctype enctype)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_enctype_enable (krb5_context context, krb5_enctype enctype)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_allow_weak_crypto (krb5_context context, krb5_boolean enable)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_random_to_key (krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_crypto_fx_cf2 (krb5_context context, const krb5_crypto crypto1, const krb5_crypto crypto2, krb5_data *pepper1, krb5_data *pepper2, krb5_enctype enctype, krb5_keyblock *res)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_generate_subkey_extended (krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_keyblock **subkey)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_keyblock_zero (krb5_keyblock *keyblock)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_free_keyblock_contents (krb5_context context, krb5_keyblock *keyblock)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_free_keyblock (krb5_context context, krb5_keyblock *keyblock)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_keyblock_contents (krb5_context context, const krb5_keyblock *inblock, krb5_keyblock *to)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_keyblock (krb5_context context, const krb5_keyblock *inblock, krb5_keyblock **to)
KRB5_LIB_FUNCTION krb5_enctype
-KRB5_LIB_CALL 
krb5_keyblock_get_enctype (const krb5_keyblock *block)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_keyblock_init (krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_allow_weak_crypto (krb5_context  context,
krb5_boolean  enable 
)
-
-
- -

-Enable or disable all weak encryption types

-

Parameters:
- - - -
context Kerberos 5 context
enable true to enable, false to disable
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cksumtype_to_enctype (krb5_context  context,
krb5_cksumtype  ctype,
krb5_enctype *  etype 
)
-
-
- -

-Return the coresponding encryption type for a checksum type.

-

Parameters:
- - - - -
context Kerberos context
ctype The checksum type to get the result enctype for
etype The returned encryption, when the matching etype is not found, etype is set to ETYPE_NULL.
-
-
Returns:
Return an error code for an failure or 0 on success.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_keyblock (krb5_context  context,
const krb5_keyblock *  inblock,
krb5_keyblock **  to 
)
-
-
- -

-Copy a keyblock, free the output keyblock with krb5_free_keyblock().

-

Parameters:
- - - - -
context a Kerberos 5 context
inblock the key to copy
to the output key.
-
-
Returns:
0 on success or a Kerberos 5 error code
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_keyblock_contents (krb5_context  context,
const krb5_keyblock *  inblock,
krb5_keyblock *  to 
)
-
-
- -

-Copy a keyblock, free the output keyblock with krb5_free_keyblock_contents().

-

Parameters:
- - - - -
context a Kerberos 5 context
inblock the key to copy
to the output key.
-
-
Returns:
0 on success or a Kerberos 5 error code
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_create_checksum_iov (krb5_context  context,
krb5_crypto  crypto,
unsigned  usage,
krb5_crypto_iov data,
unsigned int  num_data,
krb5_cksumtype *  type 
)
-
-
- -

-Create a Kerberos message checksum.

-

Parameters:
- - - - - - - -
context Kerberos context
crypto Kerberos crypto context
usage Key usage for this buffer
data array of buffers to process
num_data length of array
type output data
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_destroy (krb5_context  context,
krb5_crypto  crypto 
)
-
-
- -

-Free a crypto context created by krb5_crypto_init().

-

Parameters:
- - - -
context Kerberos context
crypto crypto context to free
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_fx_cf2 (krb5_context  context,
const krb5_crypto  crypto1,
const krb5_crypto  crypto2,
krb5_data *  pepper1,
krb5_data *  pepper2,
krb5_enctype  enctype,
krb5_keyblock *  res 
)
-
-
- -

-The FX-CF2 key derivation function, used in FAST and preauth framework.

-

Parameters:
- - - - - - - - -
context Kerberos 5 context
crypto1 first key to combine
crypto2 second key to combine
pepper1 factor to combine with first key to garante uniqueness
pepper2 factor to combine with second key to garante uniqueness
enctype the encryption type of the resulting key
res allocated key, free with krb5_free_keyblock_contents()
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getblocksize (krb5_context  context,
krb5_crypto  crypto,
size_t *  blocksize 
)
-
-
- -

-Return the blocksize used algorithm referenced by the crypto context

-

Parameters:
- - - - -
context Kerberos context
crypto crypto context to query
blocksize the resulting blocksize
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getconfoundersize (krb5_context  context,
krb5_crypto  crypto,
size_t *  confoundersize 
)
-
-
- -

-Return the confounder size used by the crypto context

-

Parameters:
- - - - -
context Kerberos context
crypto crypto context to query
confoundersize the returned confounder size
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getenctype (krb5_context  context,
krb5_crypto  crypto,
krb5_enctype *  enctype 
)
-
-
- -

-Return the encryption type used by the crypto context

-

Parameters:
- - - - -
context Kerberos context
crypto crypto context to query
enctype the resulting encryption type
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getpadsize (krb5_context  context,
krb5_crypto  crypto,
size_t *  padsize 
)
-
-
- -

-Return the padding size used by the crypto context

-

Parameters:
- - - - -
context Kerberos context
crypto crypto context to query
padsize the return padding size
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_init (krb5_context  context,
const krb5_keyblock *  key,
krb5_enctype  etype,
krb5_crypto *  crypto 
)
-
-
- -

-Create a crypto context used for all encryption and signature operation. The encryption type to use is taken from the key, but can be overridden with the enctype parameter. This can be useful for encryptions types which is compatiable (DES for example).

-To free the crypto context, use krb5_crypto_destroy().

-

Parameters:
- - - - - -
context Kerberos context
key the key block information with all key data
etype the encryption type
crypto the resulting crypto context
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_decrypt_iov_ivec (krb5_context  context,
krb5_crypto  crypto,
unsigned  usage,
krb5_crypto_iov data,
unsigned int  num_data,
void *  ivec 
)
-
-
- -

-Inline decrypt a Kerberos message.

-

Parameters:
- - - - - - - -
context Kerberos context
crypto Kerberos crypto context
usage Key usage for this buffer
data array of buffers to process
num_data length of array
ivec initial cbc/cts vector
-
-
Returns:
Return an error code or 0.
-1. KRB5_CRYPTO_TYPE_HEADER 2. one KRB5_CRYPTO_TYPE_DATA and array [0,...] of KRB5_CRYPTO_TYPE_SIGN_ONLY in any order, however the receiver have to aware of the order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used unencrypoted protocol headers and trailers. The output data will be of same size as the input data or shorter. -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_encrypt_iov_ivec (krb5_context  context,
krb5_crypto  crypto,
unsigned  usage,
krb5_crypto_iov data,
int  num_data,
void *  ivec 
)
-
-
- -

-Inline encrypt a kerberos message

-

Parameters:
- - - - - - - -
context Kerberos context
crypto Kerberos crypto context
usage Key usage for this buffer
data array of buffers to process
num_data length of array
ivec initial cbc/cts vector
-
-
Returns:
Return an error code or 0.
-Kerberos encrypted data look like this:

-1. KRB5_CRYPTO_TYPE_HEADER 2. array [1,...] KRB5_CRYPTO_TYPE_DATA and array [0,...] KRB5_CRYPTO_TYPE_SIGN_ONLY in any order, however the receiver have to aware of the order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used headers and trailers. 3. KRB5_CRYPTO_TYPE_PADDING, at least on padsize long if padsize > 1 4. KRB5_CRYPTO_TYPE_TRAILER -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_disable (krb5_context  context,
krb5_enctype  enctype 
)
-
-
- -

-Disable encryption type

-

Parameters:
- - - -
context Kerberos 5 context
enctype encryption type to disable
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_enable (krb5_context  context,
krb5_enctype  enctype 
)
-
-
- -

-Enable encryption type

-

Parameters:
- - - -
context Kerberos 5 context
enctype encryption type to enable
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_valid (krb5_context  context,
krb5_enctype  etype 
)
-
-
- -

-Check if a enctype is valid, return 0 if it is.

-

Parameters:
- - - -
context Kerberos context
etype enctype to check if its valid or not
-
-
Returns:
Return an error code for an failure or 0 on success (enctype valid).
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_keyblock (krb5_context  context,
krb5_keyblock *  keyblock 
)
-
-
- -

-Free a keyblock, also zero out the content of the keyblock, uses krb5_free_keyblock_contents() to free the content.

-

Parameters:
- - - -
context a Kerberos 5 context
keyblock keyblock to free, NULL is valid argument
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_keyblock_contents (krb5_context  context,
krb5_keyblock *  keyblock 
)
-
-
- -

-Free a keyblock's content, also zero out the content of the keyblock.

-

Parameters:
- - - -
context a Kerberos 5 context
keyblock keyblock content to free, NULL is valid argument
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_generate_subkey_extended (krb5_context  context,
const krb5_keyblock *  key,
krb5_enctype  etype,
krb5_keyblock **  subkey 
)
-
-
- -

-Generate subkey, from keyblock

-

Parameters:
- - - - - -
context kerberos context
key session key
etype encryption type of subkey, if ETYPE_NULL, use key's enctype
subkey returned new, free with krb5_free_keyblock().
-
-
Returns:
0 on success or a Kerberos 5 error code
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_enctype KRB5_LIB_CALL krb5_keyblock_get_enctype (const krb5_keyblock *  block  ) 
-
-
- -

-Get encryption type of a keyblock. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keyblock_init (krb5_context  context,
krb5_enctype  type,
const void *  data,
size_t  size,
krb5_keyblock *  key 
)
-
-
- -

-Fill in `key' with key data of type `enctype' from `data' of length `size'. Key should be freed using krb5_free_keyblock_contents().

-

Returns:
0 on success or a Kerberos 5 error code
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_keyblock_zero (krb5_keyblock *  keyblock  ) 
-
-
- -

-Zero out a keyblock

-

Parameters:
- - -
keyblock keyblock to zero out
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_random_to_key (krb5_context  context,
krb5_enctype  type,
const void *  data,
size_t  size,
krb5_keyblock *  key 
)
-
-
- -

-Converts the random bytestring to a protocol key according to Kerberos crypto frame work. It may be assumed that all the bits of the input string are equally random, even though the entropy present in the random source may be limited.

-

Parameters:
- - - - - - -
context Kerberos 5 context
type the enctype resulting key will be of
data input random data to convert to a key
size size of input random data, at least krb5_enctype_keysize() long
key key, output key, free with krb5_free_keyblock_contents()
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verify_checksum_iov (krb5_context  context,
krb5_crypto  crypto,
unsigned  usage,
krb5_crypto_iov data,
unsigned int  num_data,
krb5_cksumtype *  type 
)
-
-
- -

-Verify a Kerberos message checksum.

-

Parameters:
- - - - - - - -
context Kerberos context
crypto Kerberos crypto context
usage Key usage for this buffer
data array of buffers to process
num_data length of array
type return checksum type if not NULL
-
-
Returns:
Return an error code or 0.
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__deprecated.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__deprecated.html deleted file mode 100644 index 3acb539fd2f..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__deprecated.html +++ /dev/null @@ -1,1289 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 deprecated functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 deprecated functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_change_password (krb5_context context, krb5_creds *creds, const char *newpw, int *result_code, krb5_data *result_code_string, krb5_data *result_string) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_config_parse_string_multi (krb5_context context, const char *string, krb5_config_section **res) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_keytype_to_enctypes (krb5_context context, krb5_keytype keytype, unsigned *len, krb5_enctype **val) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_enctypes_compatible_keys (krb5_context context, krb5_enctype etype1, krb5_enctype etype2) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_free_data_contents (krb5_context context, krb5_data *data) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_keytype_to_enctypes_default (krb5_context context, krb5_keytype keytype, unsigned *len, krb5_enctype **val) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_keytype_to_string (krb5_context context, krb5_keytype keytype, char **string) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_string_to_keytype (krb5_context context, const char *string, krb5_keytype *keytype) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_CALLCONV 
krb5_password_key_proc (krb5_context context, krb5_enctype type, krb5_salt salt, krb5_const_pointer keyseed, krb5_keyblock **key) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_in_tkt_with_password (krb5_context context, krb5_flags options, krb5_addresses *addrs, const krb5_enctype *etypes, const krb5_preauthtype *pre_auth_types, const char *password, krb5_ccache ccache, krb5_creds *creds, krb5_kdc_rep *ret_as_reply) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_in_tkt_with_skey (krb5_context context, krb5_flags options, krb5_addresses *addrs, const krb5_enctype *etypes, const krb5_preauthtype *pre_auth_types, const krb5_keyblock *key, krb5_ccache ccache, krb5_creds *creds, krb5_kdc_rep *ret_as_reply) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_CALLCONV 
krb5_keytab_key_proc (krb5_context context, krb5_enctype enctype, krb5_salt salt, krb5_const_pointer keyseed, krb5_keyblock **key) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_in_tkt_with_keytab (krb5_context context, krb5_flags options, krb5_addresses *addrs, const krb5_enctype *etypes, const krb5_preauthtype *pre_auth_types, krb5_keytab keytab, krb5_ccache ccache, krb5_creds *creds, krb5_kdc_rep *ret_as_reply) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION krb5_realm
-*KRB5_LIB_CALL 
krb5_princ_realm (krb5_context context, krb5_principal principal) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_princ_set_realm (krb5_context context, krb5_principal principal, krb5_realm *realm) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_free_creds_contents (krb5_context context, krb5_creds *c) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_free_error_string (krb5_context context, char *str) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_set_error_string (krb5_context context, const char *fmt,...) __attribute__((format(printf
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_vset_error_string (krb5_context context, const char *fmt, va_list args) __attribute__((format(printf
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_clear_error_string (krb5_context context) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_cred_from_kdc_opt (krb5_context context, krb5_ccache ccache, krb5_creds *in_creds, krb5_creds **out_creds, krb5_creds ***ret_tgts, krb5_flags flags) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_cred_from_kdc (krb5_context context, krb5_ccache ccache, krb5_creds *in_creds, krb5_creds **out_creds, krb5_creds ***ret_tgts) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_free_unparsed_name (krb5_context context, char *str) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_generate_subkey (krb5_context context, const krb5_keyblock *key, krb5_keyblock **subkey) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_auth_getremoteseqnumber (krb5_context context, krb5_auth_context auth_context, int32_t *seqnumber) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_get_init_creds_opt_init (krb5_get_init_creds_opt *opt) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_get_init_creds_opt_get_error (krb5_context context, krb5_get_init_creds_opt *opt, KRB_ERROR **error) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_c_enctype_compare (krb5_context context, krb5_enctype e1, krb5_enctype e2, krb5_boolean *similar) KRB5_DEPRECATED_FUNCTION("Use X instead")
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_auth_getremoteseqnumber (krb5_context  context,
krb5_auth_context  auth_context,
int32_t *  seqnumber 
)
-
-
- -

-Deprecated: use krb5_auth_con_getremoteseqnumber() -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_c_enctype_compare (krb5_context  context,
krb5_enctype  e1,
krb5_enctype  e2,
krb5_boolean *  similar 
)
-
-
- -

-Deprecated: keytypes doesn't exists, they are really enctypes. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_change_password (krb5_context  context,
krb5_creds *  creds,
const char *  newpw,
int *  result_code,
krb5_data *  result_code_string,
krb5_data *  result_string 
)
-
-
- -

-Deprecated: krb5_change_password() is deprecated, use krb5_set_password().

-

Parameters:
- - - - - - - -
context a Keberos context
creds 
newpw 
result_code 
result_code_string 
result_string 
-
-
Returns:
On sucess password is changed.
-@ -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_clear_error_string (krb5_context  context  ) 
-
-
- -

-Clear the error message returned by krb5_get_error_string().

-Deprecated: use krb5_clear_error_message()

-

Parameters:
- - -
context Kerberos context
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_config_parse_string_multi (krb5_context  context,
const char *  string,
krb5_config_section **  res 
)
-
-
- -

-Deprecated: configuration files are not strings -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_enctypes_compatible_keys (krb5_context  context,
krb5_enctype  etype1,
krb5_enctype  etype2 
)
-
-
- -

-Deprecated: keytypes doesn't exists, they are really enctypes. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_creds_contents (krb5_context  context,
krb5_creds *  c 
)
-
-
- -

-Deprecated: use krb5_free_cred_contents() -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_data_contents (krb5_context  context,
krb5_data *  data 
)
-
-
- -

-Same as krb5_data_free(). MIT compat.

-Deprecated: use krb5_data_free().

-

Parameters:
- - - -
context Kerberos 5 context.
data krb5_data to free.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_error_string (krb5_context  context,
char *  str 
)
-
-
- -

-Free the error message returned by krb5_get_error_string().

-Deprecated: use krb5_free_error_message()

-

Parameters:
- - - -
context Kerberos context
str error message to free
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_unparsed_name (krb5_context  context,
char *  str 
)
-
-
- -

-Deprecated: use krb5_xfree(). -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_generate_subkey (krb5_context  context,
const krb5_keyblock *  key,
krb5_keyblock **  subkey 
)
-
-
- -

-Deprecated: use krb5_generate_subkey_extended() -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_cred_from_kdc (krb5_context  context,
krb5_ccache  ccache,
krb5_creds *  in_creds,
krb5_creds **  out_creds,
krb5_creds ***  ret_tgts 
)
-
-
- -

-Deprecated: use krb5_get_credentials_with_flags(). -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_cred_from_kdc_opt (krb5_context  context,
krb5_ccache  ccache,
krb5_creds *  in_creds,
krb5_creds **  out_creds,
krb5_creds ***  ret_tgts,
krb5_flags  flags 
)
-
-
- -

-Deprecated: use krb5_get_credentials_with_flags(). -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_in_tkt_with_keytab (krb5_context  context,
krb5_flags  options,
krb5_addresses *  addrs,
const krb5_enctype *  etypes,
const krb5_preauthtype *  pre_auth_types,
krb5_keytab  keytab,
krb5_ccache  ccache,
krb5_creds *  creds,
krb5_kdc_rep *  ret_as_reply 
)
-
-
- -

-Deprecated: use krb5_get_init_creds() and friends. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_in_tkt_with_password (krb5_context  context,
krb5_flags  options,
krb5_addresses *  addrs,
const krb5_enctype *  etypes,
const krb5_preauthtype *  pre_auth_types,
const char *  password,
krb5_ccache  ccache,
krb5_creds *  creds,
krb5_kdc_rep *  ret_as_reply 
)
-
-
- -

-Deprecated: use krb5_get_init_creds() and friends. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_in_tkt_with_skey (krb5_context  context,
krb5_flags  options,
krb5_addresses *  addrs,
const krb5_enctype *  etypes,
const krb5_preauthtype *  pre_auth_types,
const krb5_keyblock *  key,
krb5_ccache  ccache,
krb5_creds *  creds,
krb5_kdc_rep *  ret_as_reply 
)
-
-
- -

-Deprecated: use krb5_get_init_creds() and friends. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_opt_get_error (krb5_context  context,
krb5_get_init_creds_opt *  opt,
KRB_ERROR **  error 
)
-
-
- -

-Deprecated: use the new krb5_init_creds_init() and krb5_init_creds_get_error(). -

-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_get_init_creds_opt_init (krb5_get_init_creds_opt *  opt  ) 
-
-
- -

-Deprecated: use krb5_get_init_creds_opt_alloc().

-The reason krb5_get_init_creds_opt_init() is deprecated is that krb5_get_init_creds_opt is a static structure and for ABI reason it can't grow, ie can't add new functionality. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV krb5_keytab_key_proc (krb5_context  context,
krb5_enctype  enctype,
krb5_salt  salt,
krb5_const_pointer  keyseed,
krb5_keyblock **  key 
)
-
-
- -

-Deprecated: use krb5_get_init_creds() and friends. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keytype_to_enctypes (krb5_context  context,
krb5_keytype  keytype,
unsigned *  len,
krb5_enctype **  val 
)
-
-
- -

-Deprecated: keytypes doesn't exists, they are really enctypes. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keytype_to_enctypes_default (krb5_context  context,
krb5_keytype  keytype,
unsigned *  len,
krb5_enctype **  val 
)
-
-
- -

-Deprecated: keytypes doesn't exists, they are really enctypes. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keytype_to_string (krb5_context  context,
krb5_keytype  keytype,
char **  string 
)
-
-
- -

-Deprecated: keytypes doesn't exists, they are really enctypes in most cases, use krb5_enctype_to_string(). -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV krb5_password_key_proc (krb5_context  context,
krb5_enctype  type,
krb5_salt  salt,
krb5_const_pointer  keyseed,
krb5_keyblock **  key 
)
-
-
- -

-Deprecated: use krb5_get_init_creds() and friends. -

-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_realm* KRB5_LIB_CALL krb5_princ_realm (krb5_context  context,
krb5_principal  principal 
)
-
-
- -

-Deprecated: use krb5_principal_get_realm() -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_princ_set_realm (krb5_context  context,
krb5_principal  principal,
krb5_realm *  realm 
)
-
-
- -

-Deprecated: use krb5_principal_set_realm() -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_error_string (krb5_context  context,
const char *  fmt,
  ... 
)
-
-
- -

-Set the error message returned by krb5_get_error_string().

-Deprecated: use krb5_get_error_message()

-

Parameters:
- - - -
context Kerberos context
fmt error message to free
-
-
Returns:
Return an error code or 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_string_to_keytype (krb5_context  context,
const char *  string,
krb5_keytype *  keytype 
)
-
-
- -

-Deprecated: keytypes doesn't exists, they are really enctypes in most cases, use krb5_string_to_enctype(). -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vset_error_string (krb5_context  context,
const char *  fmt,
va_list  args 
)
-
-
- -

-Set the error message returned by krb5_get_error_string(), deprecated, use krb5_set_error_message().

-Deprecated: use krb5_vset_error_message()

-

Parameters:
- - - -
context Kerberos context
msg error message to free
-
-
Returns:
Return an error code or 0.
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__digest.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__digest.html deleted file mode 100644 index ba31f7d0c6a..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__digest.html +++ /dev/null @@ -1,87 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 digest service - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 digest service

- - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_digest_probe (krb5_context context, krb5_realm realm, krb5_ccache ccache, unsigned *flags)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_digest_probe (krb5_context  context,
krb5_realm  realm,
krb5_ccache  ccache,
unsigned *  flags 
)
-
-
- -

-Get the supported/allowed mechanism for this principal.

-

Parameters:
- - - - - -
context A Keberos context.
realm The realm of the KDC.
ccache The credential cache to use when talking to the KDC.
flags The supported mechanism.
-
-
Returns:
Return an error code or 0.
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__error.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__error.html deleted file mode 100644 index ed03bb736a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__error.html +++ /dev/null @@ -1,239 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 error reporting functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 error reporting functions

- - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_eai_to_heim_errno (int eai_errno, int system_error)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_h_errno_to_heim_errno (int eai_errno)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_clear_error_message (krb5_context context)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_set_error_message (krb5_context context, krb5_error_code ret, const char *fmt,...) __attribute__((format(printf
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_vwarn (krb5_context context, krb5_error_code code, const char *fmt, va_list ap) __attribute__((format(printf
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_clear_error_message (krb5_context  context  ) 
-
-
- -

-Clears the error message from the Kerberos 5 context.

-

Parameters:
- - -
context The Kerberos 5 context to clear
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_eai_to_heim_errno (int  eai_errno,
int  system_error 
)
-
-
- -

-Convert the getaddrinfo() error code to a Kerberos et error code.

-

Parameters:
- - - -
eai_errno contains the error code from getaddrinfo().
system_error should have the value of errno after the failed getaddrinfo().
-
-
Returns:
Kerberos error code representing the EAI errors.
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_h_errno_to_heim_errno (int  eai_errno  ) 
-
-
- -

-Convert the gethostname() error code (h_error) to a Kerberos et error code.

-

Parameters:
- - -
eai_errno contains the error code from gethostname().
-
-
Returns:
Kerberos error code representing the gethostname errors.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_error_message (krb5_context  context,
krb5_error_code  ret,
const char *  fmt,
  ... 
)
-
-
- -

-Set the context full error string for a specific error code. The error that is stored should be internationalized.

-The if context is NULL, no error string is stored.

-

Parameters:
- - - - - -
context Kerberos 5 context
ret The error code
fmt Error string for the error code
... printf(3) style parameters.
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vwarn (krb5_context  context,
krb5_error_code  code,
const char *  fmt,
va_list  ap 
)
-
-
- -

-Log a warning to the log, default stderr, include the error from the last failure.

-

Parameters:
- - - - - -
context A Kerberos 5 context.
code error code of the last error
fmt message to print
ap arguments
-
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__keytab.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__keytab.html deleted file mode 100644 index ec8a4cd0bd8..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__keytab.html +++ /dev/null @@ -1,1055 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 keytab handling functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 keytab handling functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_register (krb5_context context, const krb5_kt_ops *ops)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_resolve (krb5_context context, const char *name, krb5_keytab *id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_default_name (krb5_context context, char *name, size_t namesize)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_default_modify_name (krb5_context context, char *name, size_t namesize)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_default (krb5_context context, krb5_keytab *id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_read_service_key (krb5_context context, krb5_pointer keyprocarg, krb5_principal principal, krb5_kvno vno, krb5_enctype enctype, krb5_keyblock **key)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_get_type (krb5_context context, krb5_keytab keytab, char *prefix, size_t prefixsize)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_get_name (krb5_context context, krb5_keytab keytab, char *name, size_t namesize)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_get_full_name (krb5_context context, krb5_keytab keytab, char **str)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_close (krb5_context context, krb5_keytab id)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_destroy (krb5_context context, krb5_keytab id)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_kt_compare (krb5_context context, krb5_keytab_entry *entry, krb5_const_principal principal, krb5_kvno vno, krb5_enctype enctype)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_get_entry (krb5_context context, krb5_keytab id, krb5_const_principal principal, krb5_kvno kvno, krb5_enctype enctype, krb5_keytab_entry *entry)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_copy_entry_contents (krb5_context context, const krb5_keytab_entry *in, krb5_keytab_entry *out)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_free_entry (krb5_context context, krb5_keytab_entry *entry)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_start_seq_get (krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_next_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry *entry, krb5_kt_cursor *cursor)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_end_seq_get (krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_add_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry *entry)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_kt_remove_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry *entry)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_kt_have_content (krb5_context context, krb5_keytab id)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_add_entry (krb5_context  context,
krb5_keytab  id,
krb5_keytab_entry *  entry 
)
-
-
- -

-Add the entry in `entry' to the keytab `id'.

-

Parameters:
- - - - -
context a Keberos context.
id a keytab.
entry the entry to add
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_close (krb5_context  context,
krb5_keytab  id 
)
-
-
- -

-Finish using the keytab in `id'. All resources will be released, even on errors.

-

Parameters:
- - - -
context a Keberos context.
id keytab to close.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_kt_compare (krb5_context  context,
krb5_keytab_entry *  entry,
krb5_const_principal  principal,
krb5_kvno  vno,
krb5_enctype  enctype 
)
-
-
- -

-Compare `entry' against `principal, vno, enctype'. Any of `principal, vno, enctype' might be 0 which acts as a wildcard. Return TRUE if they compare the same, FALSE otherwise.

-

Parameters:
- - - - - - -
context a Keberos context.
entry an entry to match with.
principal principal to match, NULL matches all principals.
vno key version to match, 0 matches all key version numbers.
enctype encryption type to match, 0 matches all encryption types.
-
-
Returns:
Return TRUE or match, FALSE if not matched.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_copy_entry_contents (krb5_context  context,
const krb5_keytab_entry *  in,
krb5_keytab_entry *  out 
)
-
-
- -

-Copy the contents of `in' into `out'.

-

Parameters:
- - - - -
context a Keberos context.
in the keytab entry to copy.
out the copy of the keytab entry, free with krb5_kt_free_entry().
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default (krb5_context  context,
krb5_keytab *  id 
)
-
-
- -

-Set `id' to the default keytab.

-

Parameters:
- - - -
context a Keberos context.
id the new default keytab.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default_modify_name (krb5_context  context,
char *  name,
size_t  namesize 
)
-
-
- -

-Copy the name of the default modify keytab into `name'.

-

Parameters:
- - - - -
context a Keberos context.
name buffer where the name will be written
namesize length of name
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default_name (krb5_context  context,
char *  name,
size_t  namesize 
)
-
-
- -

-copy the name of the default keytab into `name'.

-

Parameters:
- - - - -
context a Keberos context.
name buffer where the name will be written
namesize length of name
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_destroy (krb5_context  context,
krb5_keytab  id 
)
-
-
- -

-Destroy (remove) the keytab in `id'. All resources will be released, even on errors, does the equvalment of krb5_kt_close() on the resources.

-

Parameters:
- - - -
context a Keberos context.
id keytab to destroy.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_end_seq_get (krb5_context  context,
krb5_keytab  id,
krb5_kt_cursor *  cursor 
)
-
-
- -

-Release all resources associated with `cursor'.

-

Parameters:
- - - - -
context a Keberos context.
id a keytab.
cursor the cursor to free.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_free_entry (krb5_context  context,
krb5_keytab_entry *  entry 
)
-
-
- -

-Free the contents of `entry'.

-

Parameters:
- - - -
context a Keberos context.
entry the entry to free
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_entry (krb5_context  context,
krb5_keytab  id,
krb5_const_principal  principal,
krb5_kvno  kvno,
krb5_enctype  enctype,
krb5_keytab_entry *  entry 
)
-
-
- -

-Retrieve the keytab entry for `principal, kvno, enctype' into `entry' from the keytab `id'. Matching is done like krb5_kt_compare().

-

Parameters:
- - - - - - - -
context a Keberos context.
id a keytab.
principal principal to match, NULL matches all principals.
kvno key version to match, 0 matches all key version numbers.
enctype encryption type to match, 0 matches all encryption types.
entry the returned entry, free with krb5_kt_free_entry().
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_full_name (krb5_context  context,
krb5_keytab  keytab,
char **  str 
)
-
-
- -

-Retrieve the full name of the keytab `keytab' and store the name in `str'.

-

Parameters:
- - - - -
context a Keberos context.
keytab keytab to get name for.
str the name of the keytab name, usee krb5_xfree() to free the string. On error, *str is set to NULL.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_name (krb5_context  context,
krb5_keytab  keytab,
char *  name,
size_t  namesize 
)
-
-
- -

-Retrieve the name of the keytab `keytab' into `name', `namesize'

-

Parameters:
- - - - - -
context a Keberos context.
keytab the keytab to get the name for.
name name buffer.
namesize size of name buffer.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_type (krb5_context  context,
krb5_keytab  keytab,
char *  prefix,
size_t  prefixsize 
)
-
-
- -

-Return the type of the `keytab' in the string `prefix of length `prefixsize'.

-

Parameters:
- - - - - -
context a Keberos context.
keytab the keytab to get the prefix for
prefix prefix buffer
prefixsize length of prefix buffer
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_kt_have_content (krb5_context  context,
krb5_keytab  id 
)
-
-
- -

-Return true if the keytab exists and have entries

-

Parameters:
- - - -
context a Keberos context.
id a keytab.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_next_entry (krb5_context  context,
krb5_keytab  id,
krb5_keytab_entry *  entry,
krb5_kt_cursor *  cursor 
)
-
-
- -

-Get the next entry from keytab, advance the cursor. On last entry the function will return KRB5_KT_END.

-

Parameters:
- - - - - -
context a Keberos context.
id a keytab.
entry the returned entry, free with krb5_kt_free_entry().
cursor the cursor of the iteration.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_read_service_key (krb5_context  context,
krb5_pointer  keyprocarg,
krb5_principal  principal,
krb5_kvno  vno,
krb5_enctype  enctype,
krb5_keyblock **  key 
)
-
-
- -

-Read the key identified by `(principal, vno, enctype)' from the keytab in `keyprocarg' (the default if == NULL) into `*key'.

-

Parameters:
- - - - - - - -
context a Keberos context.
keyprocarg 
principal 
vno 
enctype 
key 
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_register (krb5_context  context,
const krb5_kt_ops *  ops 
)
-
-
- -

-Register a new keytab backend.

-

Parameters:
- - - -
context a Keberos context.
ops a backend to register.
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_remove_entry (krb5_context  context,
krb5_keytab  id,
krb5_keytab_entry *  entry 
)
-
-
- -

-Remove an entry from the keytab, matching is done using krb5_kt_compare().

-

Parameters:
- - - - -
context a Keberos context.
id a keytab.
entry the entry to remove
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_resolve (krb5_context  context,
const char *  name,
krb5_keytab *  id 
)
-
-
- -

-Resolve the keytab name (of the form `type:residual') in `name' into a keytab in `id'.

-

Parameters:
- - - - -
context a Keberos context.
name name to resolve
id resulting keytab, free with krb5_kt_close().
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_start_seq_get (krb5_context  context,
krb5_keytab  id,
krb5_kt_cursor *  cursor 
)
-
-
- -

-Set `cursor' to point at the beginning of `id'.

-

Parameters:
- - - - -
context a Keberos context.
id a keytab.
cursor a newly allocated cursor, free with krb5_kt_end_seq_get().
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__pac.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__pac.html deleted file mode 100644 index 486a4b77c19..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__pac.html +++ /dev/null @@ -1,155 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 PAC handling functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 PAC handling functions

- - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_pac_get_buffer (krb5_context context, krb5_pac p, uint32_t type, krb5_data *data)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_pac_verify (krb5_context context, const krb5_pac pac, time_t authtime, krb5_const_principal principal, const krb5_keyblock *server, const krb5_keyblock *privsvr)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_pac_get_buffer (krb5_context  context,
krb5_pac  p,
uint32_t  type,
krb5_data *  data 
)
-
-
- -

-Get the PAC buffer of specific type from the pac.

-

Parameters:
- - - - - -
context Kerberos 5 context.
p the pac structure returned by krb5_pac_parse().
type type of buffer to get
data return data, free with krb5_data_free().
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_pac_verify (krb5_context  context,
const krb5_pac  pac,
time_t  authtime,
krb5_const_principal  principal,
const krb5_keyblock *  server,
const krb5_keyblock *  privsvr 
)
-
-
- -

-Verify the PAC.

-

Parameters:
- - - - - - - -
context Kerberos 5 context.
pac the pac structure returned by krb5_pac_parse().
authtime The time of the ticket the PAC belongs to.
principal the principal to verify.
server The service key, most always be given.
privsvr The KDC key, may be given.
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__principal.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__principal.html deleted file mode 100644 index 1cbfec95757..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__principal.html +++ /dev/null @@ -1,1180 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 principal functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 principal functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_free_principal (krb5_context context, krb5_principal p)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_principal_set_type (krb5_context context, krb5_principal principal, int type)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_principal_get_type (krb5_context context, krb5_const_principal principal)
KRB5_LIB_FUNCTION const char
-*KRB5_LIB_CALL 
krb5_principal_get_realm (krb5_context context, krb5_const_principal principal)
KRB5_LIB_FUNCTION unsigned int
-KRB5_LIB_CALL 
krb5_principal_get_num_comp (krb5_context context, krb5_const_principal principal)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_parse_name_flags (krb5_context context, const char *name, int flags, krb5_principal *principal)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_parse_name (krb5_context context, const char *name, krb5_principal *principal)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_unparse_name_fixed (krb5_context context, krb5_const_principal principal, char *name, size_t len)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_unparse_name_fixed_short (krb5_context context, krb5_const_principal principal, char *name, size_t len)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_unparse_name_fixed_flags (krb5_context context, krb5_const_principal principal, int flags, char *name, size_t len)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_unparse_name (krb5_context context, krb5_const_principal principal, char **name)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_unparse_name_flags (krb5_context context, krb5_const_principal principal, int flags, char **name)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_unparse_name_short (krb5_context context, krb5_const_principal principal, char **name)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_principal_set_realm (krb5_context context, krb5_principal principal, krb5_const_realm realm)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_build_principal (krb5_context context, krb5_principal *principal, int rlen, krb5_const_realm realm,...)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_make_principal (krb5_context context, krb5_principal *principal, krb5_const_realm realm,...)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_copy_principal (krb5_context context, krb5_const_principal inprinc, krb5_principal *outprinc)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_principal_compare_any_realm (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_principal_compare (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_realm_compare (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_principal_match (krb5_context context, krb5_const_principal princ, krb5_const_principal pattern)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_sname_to_principal (krb5_context context, const char *hostname, const char *sname, int32_t type, krb5_principal *ret_princ)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_parse_nametype (krb5_context context, const char *str, int32_t *nametype)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_principal_is_krbtgt (krb5_context context, krb5_const_principal p)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_build_principal (krb5_context  context,
krb5_principal *  principal,
int  rlen,
krb5_const_realm  realm,
  ... 
)
-
-
- -

-Build a principal using vararg style building

-

Parameters:
- - - - - - -
context A Kerberos context.
principal returned principal
rlen length of realm
realm realm name
... a list of components ended with NULL.
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_principal (krb5_context  context,
krb5_const_principal  inprinc,
krb5_principal *  outprinc 
)
-
-
- -

-Copy a principal

-

Parameters:
- - - - -
context A Kerberos context.
inprinc principal to copy
outprinc copied principal, free with krb5_free_principal()
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_principal (krb5_context  context,
krb5_principal  p 
)
-
-
- -

-Frees a Kerberos principal allocated by the library with krb5_parse_name(), krb5_make_principal() or any other related principal functions.

-

Parameters:
- - - -
context A Kerberos context.
p a principal to free.
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_make_principal (krb5_context  context,
krb5_principal *  principal,
krb5_const_realm  realm,
  ... 
)
-
-
- -

-Build a principal using vararg style building

-

Parameters:
- - - - - -
context A Kerberos context.
principal returned principal
realm realm name
... a list of components ended with NULL.
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_name (krb5_context  context,
const char *  name,
krb5_principal *  principal 
)
-
-
- -

-Parse a name into a krb5_principal structure

-

Parameters:
- - - - -
context Kerberos 5 context
name name to parse into a Kerberos principal
principal returned principal, free with krb5_free_principal().
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_name_flags (krb5_context  context,
const char *  name,
int  flags,
krb5_principal *  principal 
)
-
-
- -

-Parse a name into a krb5_principal structure, flags controls the behavior.

-

Parameters:
- - - - - -
context Kerberos 5 context
name name to parse into a Kerberos principal
flags flags to control the behavior
principal returned principal, free with krb5_free_principal().
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_nametype (krb5_context  context,
const char *  str,
int32_t *  nametype 
)
-
-
- -

-Parse nametype string and return a nametype integer -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_compare (krb5_context  context,
krb5_const_principal  princ1,
krb5_const_principal  princ2 
)
-
-
- -

-Compares the two principals, including realm of the principals and returns TRUE if they are the same and FALSE if not.

-

Parameters:
- - - - -
context Kerberos 5 context
princ1 first principal to compare
princ2 second principal to compare
-
-
See also:
krb5_principal_compare_any_realm()

-krb5_realm_compare()

- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_compare_any_realm (krb5_context  context,
krb5_const_principal  princ1,
krb5_const_principal  princ2 
)
-
-
- -

-Return TRUE iff princ1 == princ2 (without considering the realm)

-

Parameters:
- - - - -
context Kerberos 5 context
princ1 first principal to compare
princ2 second principal to compare
-
-
Returns:
non zero if equal, 0 if not
-
See also:
krb5_principal_compare()

-krb5_realm_compare()

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION unsigned int KRB5_LIB_CALL krb5_principal_get_num_comp (krb5_context  context,
krb5_const_principal  principal 
)
-
-
- -

-Get number of component is principal.

-

Parameters:
- - - -
context Kerberos 5 context
principal principal to query
-
-
Returns:
number of components in string
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_principal_get_realm (krb5_context  context,
krb5_const_principal  principal 
)
-
-
- -

-Get the realm of the principal

-

Parameters:
- - - -
context A Kerberos context.
principal principal to get the realm for
-
-
Returns:
realm of the principal, don't free or use after krb5_principal is freed
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_principal_get_type (krb5_context  context,
krb5_const_principal  principal 
)
-
-
- -

-Get the type of the principal

-

Parameters:
- - - -
context A Kerberos context.
principal principal to get the type for
-
-
Returns:
the type of principal
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_is_krbtgt (krb5_context  context,
krb5_const_principal  p 
)
-
-
- -

-Check if the cname part of the principal is a krbtgt principal -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_match (krb5_context  context,
krb5_const_principal  princ,
krb5_const_principal  pattern 
)
-
-
- -

-return TRUE iff princ matches pattern -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_principal_set_realm (krb5_context  context,
krb5_principal  principal,
krb5_const_realm  realm 
)
-
-
- -

-Set a new realm for a principal, and as a side-effect free the previous realm.

-

Parameters:
- - - - -
context A Kerberos context.
principal principal set the realm for
realm the new realm to set
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_principal_set_type (krb5_context  context,
krb5_principal  principal,
int  type 
)
-
-
- -

-Set the type of the principal

-

Parameters:
- - - - -
context A Kerberos context.
principal principal to set the type for
type the new type
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_realm_compare (krb5_context  context,
krb5_const_principal  princ1,
krb5_const_principal  princ2 
)
-
-
- -

-return TRUE iff realm(princ1) == realm(princ2)

-

Parameters:
- - - - -
context Kerberos 5 context
princ1 first principal to compare
princ2 second principal to compare
-
-
See also:
krb5_principal_compare_any_realm()

-krb5_principal_compare()

- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_sname_to_principal (krb5_context  context,
const char *  hostname,
const char *  sname,
int32_t  type,
krb5_principal *  ret_princ 
)
-
-
- -

-Create a principal for the service running on hostname. If KRB5_NT_SRV_HST is used, the hostname is canonization using DNS (or some other service), this is potentially insecure.

-

Parameters:
- - - - - - -
context A Kerberos context.
hostname hostname to use
sname Service name to use
type name type of pricipal, use KRB5_NT_SRV_HST or KRB5_NT_UNKNOWN.
ret_princ return principal, free with krb5_free_principal().
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name (krb5_context  context,
krb5_const_principal  principal,
char **  name 
)
-
-
- -

-Unparse the Kerberos name into a string

-

Parameters:
- - - - -
context Kerberos 5 context
principal principal to query
name resulting string, free with krb5_xfree()
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed (krb5_context  context,
krb5_const_principal  principal,
char *  name,
size_t  len 
)
-
-
- -

-Unparse the principal name to a fixed buffer

-

Parameters:
- - - - - -
context A Kerberos context.
principal principal to unparse
name buffer to write name to
len length of buffer
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed_flags (krb5_context  context,
krb5_const_principal  principal,
int  flags,
char *  name,
size_t  len 
)
-
-
- -

-Unparse the principal name with unparse flags to a fixed buffer.

-

Parameters:
- - - - - - -
context A Kerberos context.
principal principal to unparse
flags unparse flags
name buffer to write name to
len length of buffer
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed_short (krb5_context  context,
krb5_const_principal  principal,
char *  name,
size_t  len 
)
-
-
- -

-Unparse the principal name to a fixed buffer. The realm is skipped if its a default realm.

-

Parameters:
- - - - - -
context A Kerberos context.
principal principal to unparse
name buffer to write name to
len length of buffer
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_flags (krb5_context  context,
krb5_const_principal  principal,
int  flags,
char **  name 
)
-
-
- -

-Unparse the Kerberos name into a string

-

Parameters:
- - - - - -
context Kerberos 5 context
principal principal to query
flags flag to determine the behavior
name resulting string, free with krb5_xfree()
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_short (krb5_context  context,
krb5_const_principal  principal,
char **  name 
)
-
-
- -

-Unparse the principal name to a allocated buffer. The realm is skipped if its a default realm.

-

Parameters:
- - - - -
context A Kerberos context.
principal principal to unparse
name returned buffer, free with krb5_xfree()
-
-
Returns:
An krb5 error code, see krb5_get_error_message().
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__storage.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__storage.html deleted file mode 100644 index 3cc926b3816..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__storage.html +++ /dev/null @@ -1,2092 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 storage functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 storage functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_storage_set_flags (krb5_storage *sp, krb5_flags flags)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_storage_clear_flags (krb5_storage *sp, krb5_flags flags)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_storage_is_flags (krb5_storage *sp, krb5_flags flags)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_storage_set_byteorder (krb5_storage *sp, krb5_flags byteorder)
KRB5_LIB_FUNCTION krb5_flags
-KRB5_LIB_CALL 
krb5_storage_get_byteorder (krb5_storage *sp)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_storage_set_max_alloc (krb5_storage *sp, size_t size)
KRB5_LIB_FUNCTION off_t
-KRB5_LIB_CALL 
krb5_storage_seek (krb5_storage *sp, off_t offset, int whence)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_truncate (krb5_storage *sp, off_t offset)
KRB5_LIB_FUNCTION krb5_ssize_t
-KRB5_LIB_CALL 
krb5_storage_read (krb5_storage *sp, void *buf, size_t len)
KRB5_LIB_FUNCTION krb5_ssize_t
-KRB5_LIB_CALL 
krb5_storage_write (krb5_storage *sp, const void *buf, size_t len)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_storage_set_eof_code (krb5_storage *sp, int code)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_get_eof_code (krb5_storage *sp)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_storage_free (krb5_storage *sp)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_storage_to_data (krb5_storage *sp, krb5_data *data)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_int32 (krb5_storage *sp, int32_t value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_uint32 (krb5_storage *sp, uint32_t value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_int32 (krb5_storage *sp, int32_t *value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_uint32 (krb5_storage *sp, uint32_t *value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_int16 (krb5_storage *sp, int16_t value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_uint16 (krb5_storage *sp, uint16_t value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_int16 (krb5_storage *sp, int16_t *value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_uint16 (krb5_storage *sp, uint16_t *value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_int8 (krb5_storage *sp, int8_t value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_uint8 (krb5_storage *sp, uint8_t value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_int8 (krb5_storage *sp, int8_t *value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_uint8 (krb5_storage *sp, uint8_t *value)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_data (krb5_storage *sp, krb5_data data)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_data (krb5_storage *sp, krb5_data *data)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_string (krb5_storage *sp, const char *s)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_string (krb5_storage *sp, char **string)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_stringz (krb5_storage *sp, const char *s)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_stringz (krb5_storage *sp, char **string)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_principal (krb5_storage *sp, krb5_const_principal p)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_principal (krb5_storage *sp, krb5_principal *princ)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_keyblock (krb5_storage *sp, krb5_keyblock p)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_keyblock (krb5_storage *sp, krb5_keyblock *p)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_times (krb5_storage *sp, krb5_times times)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_times (krb5_storage *sp, krb5_times *times)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_address (krb5_storage *sp, krb5_address p)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_address (krb5_storage *sp, krb5_address *adr)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_addrs (krb5_storage *sp, krb5_addresses p)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_addrs (krb5_storage *sp, krb5_addresses *adr)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_authdata (krb5_storage *sp, krb5_authdata auth)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_authdata (krb5_storage *sp, krb5_authdata *auth)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_creds (krb5_storage *sp, krb5_creds *creds)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_creds (krb5_storage *sp, krb5_creds *creds)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_store_creds_tag (krb5_storage *sp, krb5_creds *creds)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_ret_creds_tag (krb5_storage *sp, krb5_creds *creds)
KRB5_LIB_FUNCTION krb5_storage
-*KRB5_LIB_CALL 
krb5_storage_emem (void)
KRB5_LIB_FUNCTION krb5_storage
-*KRB5_LIB_CALL 
krb5_storage_from_fd (krb5_socket_t fd_in)
KRB5_LIB_FUNCTION krb5_storage
-*KRB5_LIB_CALL 
krb5_storage_from_mem (void *buf, size_t len)
KRB5_LIB_FUNCTION krb5_storage
-*KRB5_LIB_CALL 
krb5_storage_from_data (krb5_data *data)
KRB5_LIB_FUNCTION krb5_storage
-*KRB5_LIB_CALL 
krb5_storage_from_readonly_mem (const void *buf, size_t len)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_address (krb5_storage *  sp,
krb5_address *  adr 
)
-
-
- -

-Read a address block from the storage.

-

Parameters:
- - - -
sp the storage buffer to write to
adr the address block read from storage
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_addrs (krb5_storage *  sp,
krb5_addresses *  adr 
)
-
-
- -

-Read a addresses block from the storage.

-

Parameters:
- - - -
sp the storage buffer to write to
adr the addresses block read from storage
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_authdata (krb5_storage *  sp,
krb5_authdata *  auth 
)
-
-
- -

-Read a auth data from the storage.

-

Parameters:
- - - -
sp the storage buffer to write to
auth the auth data block read from storage
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_creds (krb5_storage *  sp,
krb5_creds *  creds 
)
-
-
- -

-Read a credentials block from the storage.

-

Parameters:
- - - -
sp the storage buffer to write to
creds the credentials block read from storage
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_creds_tag (krb5_storage *  sp,
krb5_creds *  creds 
)
-
-
- -

-Read a tagged credentials block from the storage.

-

Parameters:
- - - -
sp the storage buffer to write to
creds the credentials block read from storage
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_data (krb5_storage *  sp,
krb5_data *  data 
)
-
-
- -

-Parse a data from the storage.

-

Parameters:
- - - -
sp the storage buffer to read from
data the parsed data
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int16 (krb5_storage *  sp,
int16_t *  value 
)
-
-
- -

-Read a int16 from storage, byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder().

-

Parameters:
- - - -
sp the storage to write too
value the value read from the buffer
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int32 (krb5_storage *  sp,
int32_t *  value 
)
-
-
- -

-Read a int32 from storage, byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder().

-

Parameters:
- - - -
sp the storage to write too
value the value read from the buffer
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int8 (krb5_storage *  sp,
int8_t *  value 
)
-
-
- -

-Read a int8 from storage

-

Parameters:
- - - -
sp the storage to write too
value the value read from the buffer
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_keyblock (krb5_storage *  sp,
krb5_keyblock *  p 
)
-
-
- -

-Read a keyblock from the storage.

-

Parameters:
- - - -
sp the storage buffer to write to
p the keyblock read from storage, free using krb5_free_keyblock()
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_principal (krb5_storage *  sp,
krb5_principal *  princ 
)
-
-
- -

-Parse principal from the storage.

-

Parameters:
- - - -
sp the storage buffer to read from
princ the parsed principal
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_string (krb5_storage *  sp,
char **  string 
)
-
-
- -

-Parse a string from the storage.

-

Parameters:
- - - -
sp the storage buffer to read from
string the parsed string
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_stringz (krb5_storage *  sp,
char **  string 
)
-
-
- -

-Parse zero terminated string from the storage.

-

Parameters:
- - - -
sp the storage buffer to read from
string the parsed string
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_times (krb5_storage *  sp,
krb5_times *  times 
)
-
-
- -

-Read a times block from the storage.

-

Parameters:
- - - -
sp the storage buffer to write to
times the times block read from storage
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint16 (krb5_storage *  sp,
uint16_t *  value 
)
-
-
- -

-Read a int16 from storage, byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder().

-

Parameters:
- - - -
sp the storage to write too
value the value read from the buffer
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint32 (krb5_storage *  sp,
uint32_t *  value 
)
-
-
- -

-Read a uint32 from storage, byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder().

-

Parameters:
- - - -
sp the storage to write too
value the value read from the buffer
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint8 (krb5_storage *  sp,
uint8_t *  value 
)
-
-
- -

-Read a uint8 from storage

-

Parameters:
- - - -
sp the storage to write too
value the value read from the buffer
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_clear_flags (krb5_storage *  sp,
krb5_flags  flags 
)
-
-
- -

-Clear the flags on a storage buffer

-

Parameters:
- - - -
sp the storage buffer to clear the flags on
flags the flags to clear
-
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_emem (void   ) 
-
-
- -

-Create a elastic (allocating) memory storage backend. Memory is allocated on demand. Free returned krb5_storage with krb5_storage_free().

-

Returns:
A krb5_storage on success, or NULL on out of memory error.
-
See also:
krb5_storage_from_mem()

-krb5_storage_from_readonly_mem()

-krb5_storage_from_fd()

-krb5_storage_from_data()

- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_free (krb5_storage *  sp  ) 
-
-
- -

-Free a krb5 storage.

-

Parameters:
- - -
sp the storage to free.
-
-
Returns:
An Kerberos 5 error code.
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_data (krb5_data *  data  ) 
-
-
- -

-Create a fixed size memory storage block

-

Returns:
A krb5_storage on success, or NULL on out of memory error.
-
See also:
krb5_storage_mem()

-krb5_storage_from_mem()

-krb5_storage_from_readonly_mem()

-krb5_storage_from_fd()

- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_fd (krb5_socket_t  fd_in  ) 
-
-
- -

-

Returns:
A krb5_storage on success, or NULL on out of memory error.
-
See also:
krb5_storage_emem()

-krb5_storage_from_mem()

-krb5_storage_from_readonly_mem()

-krb5_storage_from_data()

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_mem (void *  buf,
size_t  len 
)
-
-
- -

-Create a fixed size memory storage block

-

Returns:
A krb5_storage on success, or NULL on out of memory error.
-
See also:
krb5_storage_mem()

-krb5_storage_from_readonly_mem()

-krb5_storage_from_data()

-krb5_storage_from_fd()

- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_readonly_mem (const void *  buf,
size_t  len 
)
-
-
- -

-Create a fixed size memory storage block that is read only

-

Returns:
A krb5_storage on success, or NULL on out of memory error.
-
See also:
krb5_storage_mem()

-krb5_storage_from_mem()

-krb5_storage_from_data()

-krb5_storage_from_fd()

- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION krb5_flags KRB5_LIB_CALL krb5_storage_get_byteorder (krb5_storage *  sp  ) 
-
-
- -

-Return the current byteorder for the buffer. See krb5_storage_set_byteorder() for the list or byte order contants. -

-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_get_eof_code (krb5_storage *  sp  ) 
-
-
- -

-Get the return code that will be used when end of storage is reached.

-

Parameters:
- - -
sp the storage
-
-
Returns:
storage error code
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_storage_is_flags (krb5_storage *  sp,
krb5_flags  flags 
)
-
-
- -

-Return true or false depending on if the storage flags is set or not. NB testing for the flag 0 always return true.

-

Parameters:
- - - -
sp the storage buffer to check flags on
flags The flags to test for
-
-
Returns:
true if all the flags are set, false if not.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL krb5_storage_read (krb5_storage *  sp,
void *  buf,
size_t  len 
)
-
-
- -

-Read to the storage buffer.

-

Parameters:
- - - - -
sp the storage buffer to read from
buf the buffer to store the data in
len the length to read
-
-
Returns:
The length of data read (can be shorter then len), or negative on error.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION off_t KRB5_LIB_CALL krb5_storage_seek (krb5_storage *  sp,
off_t  offset,
int  whence 
)
-
-
- -

-Seek to a new offset.

-

Parameters:
- - - - -
sp the storage buffer to seek in.
offset the offset to seek
whence relateive searching, SEEK_CUR from the current position, SEEK_END from the end, SEEK_SET absolute from the start.
-
-
Returns:
The new current offset
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_byteorder (krb5_storage *  sp,
krb5_flags  byteorder 
)
-
-
- -

-Set the new byte order of the storage buffer.

-

Parameters:
- - - -
sp the storage buffer to set the byte order for.
byteorder the new byte order.
-
-The byte order are: KRB5_STORAGE_BYTEORDER_BE, KRB5_STORAGE_BYTEORDER_LE and KRB5_STORAGE_BYTEORDER_HOST. -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_eof_code (krb5_storage *  sp,
int  code 
)
-
-
- -

-Set the return code that will be used when end of storage is reached.

-

Parameters:
- - - -
sp the storage
code the error code to return on end of storage
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_flags (krb5_storage *  sp,
krb5_flags  flags 
)
-
-
- -

-Add the flags on a storage buffer by or-ing in the flags to the buffer.

-

Parameters:
- - - -
sp the storage buffer to set the flags on
flags the flags to set
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_max_alloc (krb5_storage *  sp,
size_t  size 
)
-
-
- -

-Set the max alloc value

-

Parameters:
- - - -
sp the storage buffer set the max allow for
size maximum size to allocate, use 0 to remove limit
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_to_data (krb5_storage *  sp,
krb5_data *  data 
)
-
-
- -

-Copy the contnent of storage

-

Parameters:
- - - -
sp the storage to copy to a data
data the copied data, free with krb5_data_free()
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_truncate (krb5_storage *  sp,
off_t  offset 
)
-
-
- -

-Truncate the storage buffer in sp to offset.

-

Parameters:
- - - -
sp the storage buffer to truncate.
offset the offset to truncate too.
-
-
Returns:
An Kerberos 5 error code.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL krb5_storage_write (krb5_storage *  sp,
const void *  buf,
size_t  len 
)
-
-
- -

-Write to the storage buffer.

-

Parameters:
- - - - -
sp the storage buffer to write to
buf the buffer to write to the storage buffer
len the length to write
-
-
Returns:
The length of data written (can be shorter then len), or negative on error.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_address (krb5_storage *  sp,
krb5_address  p 
)
-
-
- -

-Write a address block to storage.

-

Parameters:
- - - -
sp the storage buffer to write to
p the address block to write.
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_addrs (krb5_storage *  sp,
krb5_addresses  p 
)
-
-
- -

-Write a addresses block to storage.

-

Parameters:
- - - -
sp the storage buffer to write to
p the addresses block to write.
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_authdata (krb5_storage *  sp,
krb5_authdata  auth 
)
-
-
- -

-Write a auth data block to storage.

-

Parameters:
- - - -
sp the storage buffer to write to
auth the auth data block to write.
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_creds (krb5_storage *  sp,
krb5_creds *  creds 
)
-
-
- -

-Write a credentials block to storage.

-

Parameters:
- - - -
sp the storage buffer to write to
creds the creds block to write.
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_creds_tag (krb5_storage *  sp,
krb5_creds *  creds 
)
-
-
- -

-Write a tagged credentials block to storage.

-

Parameters:
- - - -
sp the storage buffer to write to
creds the creds block to write.
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_data (krb5_storage *  sp,
krb5_data  data 
)
-
-
- -

-Store a data to the storage. The data is stored with an int32 as lenght plus the data (not padded).

-

Parameters:
- - - -
sp the storage buffer to write to
data the buffer to store.
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int16 (krb5_storage *  sp,
int16_t  value 
)
-
-
- -

-Store a int16 to storage, byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder().

-

Parameters:
- - - -
sp the storage to write too
value the value to store
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int32 (krb5_storage *  sp,
int32_t  value 
)
-
-
- -

-Store a int32 to storage, byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder().

-

Parameters:
- - - -
sp the storage to write too
value the value to store
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int8 (krb5_storage *  sp,
int8_t  value 
)
-
-
- -

-Store a int8 to storage.

-

Parameters:
- - - -
sp the storage to write too
value the value to store
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_keyblock (krb5_storage *  sp,
krb5_keyblock  p 
)
-
-
- -

-Store a keyblock to the storage.

-

Parameters:
- - - -
sp the storage buffer to write to
p the keyblock to write
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_principal (krb5_storage *  sp,
krb5_const_principal  p 
)
-
-
- -

-Write a principal block to storage.

-

Parameters:
- - - -
sp the storage buffer to write to
p the principal block to write.
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_string (krb5_storage *  sp,
const char *  s 
)
-
-
- -

-Store a string to the buffer. The data is formated as an len:uint32 plus the string itself (not padded).

-

Parameters:
- - - -
sp the storage buffer to write to
s the string to store.
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_stringz (krb5_storage *  sp,
const char *  s 
)
-
-
- -

-Store a zero terminated string to the buffer. The data is stored one character at a time until a NUL is stored.

-

Parameters:
- - - -
sp the storage buffer to write to
s the string to store.
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_times (krb5_storage *  sp,
krb5_times  times 
)
-
-
- -

-Write a times block to storage.

-

Parameters:
- - - -
sp the storage buffer to write to
times the times block to write.
-
-
Returns:
0 on success, a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint16 (krb5_storage *  sp,
uint16_t  value 
)
-
-
- -

-Store a uint16 to storage, byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder().

-

Parameters:
- - - -
sp the storage to write too
value the value to store
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint32 (krb5_storage *  sp,
uint32_t  value 
)
-
-
- -

-Store a uint32 to storage, byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder().

-

Parameters:
- - - -
sp the storage to write too
value the value to store
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint8 (krb5_storage *  sp,
uint8_t  value 
)
-
-
- -

-Store a uint8 to storage.

-

Parameters:
- - - -
sp the storage to write too
value the value to store
-
-
Returns:
0 for success, or a Kerberos 5 error code on failure.
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__support.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__support.html deleted file mode 100644 index dcd3ab8e5eb..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__support.html +++ /dev/null @@ -1,1320 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 support functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 support functions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_acl_match_string (krb5_context context, const char *string, const char *format,...)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_acl_match_file (krb5_context context, const char *file, const char *format,...)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_config_parse_file_multi (krb5_context context, const char *fname, krb5_config_section **res)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_config_file_free (krb5_context context, krb5_config_section *s)
KRB5_LIB_FUNCTION const
-krb5_config_binding
-*KRB5_LIB_CALL 
krb5_config_get_list (krb5_context context, const krb5_config_section *c,...)
KRB5_LIB_FUNCTION const
-krb5_config_binding
-*KRB5_LIB_CALL 
krb5_config_vget_list (krb5_context context, const krb5_config_section *c, va_list args)
KRB5_LIB_FUNCTION const char
-*KRB5_LIB_CALL 
krb5_config_get_string (krb5_context context, const krb5_config_section *c,...)
KRB5_LIB_FUNCTION const char
-*KRB5_LIB_CALL 
krb5_config_vget_string (krb5_context context, const krb5_config_section *c, va_list args)
KRB5_LIB_FUNCTION const char
-*KRB5_LIB_CALL 
krb5_config_vget_string_default (krb5_context context, const krb5_config_section *c, const char *def_value, va_list args)
KRB5_LIB_FUNCTION const char
-*KRB5_LIB_CALL 
krb5_config_get_string_default (krb5_context context, const krb5_config_section *c, const char *def_value,...)
KRB5_LIB_FUNCTION char
-**KRB5_LIB_CALL 
krb5_config_vget_strings (krb5_context context, const krb5_config_section *c, va_list args)
KRB5_LIB_FUNCTION char
-**KRB5_LIB_CALL 
krb5_config_get_strings (krb5_context context, const krb5_config_section *c,...)
KRB5_LIB_FUNCTION void
-KRB5_LIB_CALL 
krb5_config_free_strings (char **strings)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_config_vget_bool_default (krb5_context context, const krb5_config_section *c, krb5_boolean def_value, va_list args)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_config_vget_bool (krb5_context context, const krb5_config_section *c, va_list args)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_config_get_bool_default (krb5_context context, const krb5_config_section *c, krb5_boolean def_value,...)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_config_get_bool (krb5_context context, const krb5_config_section *c,...)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_vget_time_default (krb5_context context, const krb5_config_section *c, int def_value, va_list args)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_vget_time (krb5_context context, const krb5_config_section *c, va_list args)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_get_time_default (krb5_context context, const krb5_config_section *c, int def_value,...)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_get_time (krb5_context context, const krb5_config_section *c,...)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_expand_hostname (krb5_context context, const char *orig_hostname, char **new_hostname)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_expand_hostname_realms (krb5_context context, const char *orig_hostname, char **new_hostname, char ***realms)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_free_host_realm (krb5_context context, krb5_realm *realmlist)
KRB5_LIB_FUNCTION krb5_boolean
-KRB5_LIB_CALL 
krb5_kuserok (krb5_context context, krb5_principal principal, const char *luser)
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb5_plugin_register (krb5_context context, enum krb5_plugin_type type, const char *name, void *symbol)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_acl_match_file (krb5_context  context,
const char *  file,
const char *  format,
  ... 
)
-
-
- -

-krb5_acl_match_file matches ACL format against each line in a file using krb5_acl_match_string(). Lines starting with # are treated like comments and ignored.

-

Parameters:
- - - - - -
context Kerberos 5 context.
file file with acl listed in the file.
format format to match.
... parameter to format string.
-
-
Returns:
Return an error code or 0.
-
See also:
krb5_acl_match_string
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_acl_match_string (krb5_context  context,
const char *  string,
const char *  format,
  ... 
)
-
-
- -

-krb5_acl_match_string matches ACL format against a string.

-The ACL format has three format specifiers: s, f, and r. Each specifier will retrieve one argument from the variable arguments for either matching or storing data. The input string is split up using " " (space) and "\t" (tab) as a delimiter; multiple and "\t" in a row are considered to be the same.

-List of format specifiers:

    -
  • s Matches a string using strcmp(3) (case sensitive).
  • f Matches the string with fnmatch(3). Theflags argument (the last argument) passed to the fnmatch function is 0.
  • r Returns a copy of the string in the char ** passed in; the copy must be freed with free(3). There is no need to free(3) the string on error: the function will clean up and set the pointer to NULL.
-

-

Parameters:
- - - - - -
context Kerberos 5 context
string string to match with
format format to match
... parameter to format string
-
-
Returns:
Return an error code or 0.
-
 char *s;
-
- ret = krb5_acl_match_string(context, "foo", "s", "foo");
- if (ret)
-     krb5_errx(context, 1, "acl didn't match");
- ret = krb5_acl_match_string(context, "foo foo baz/kaka",
-     "ss", "foo", &s, "foo/\\*");
- if (ret) {
-     // no need to free(s) on error
-     assert(s == NULL);
-     krb5_errx(context, 1, "acl didn't match");
- }
- free(s);
-

-

See also:
krb5_acl_match_file
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_config_file_free (krb5_context  context,
krb5_config_section *  s 
)
-
-
- -

-Free configuration file section, the result of krb5_config_parse_file() and krb5_config_parse_file_multi().

-

Parameters:
- - - -
context A Kerberos 5 context
s the configuration section to free
-
-
Returns:
returns 0 on successes, otherwise an error code, see krb5_get_error_message()
- -
-

- -

-
- - - - - - - - - -
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_config_free_strings (char **  strings  ) 
-
-
- -

-Free the resulting strings from krb5_config-get_strings() and krb5_config_vget_strings().

-

Parameters:
- - -
strings strings to free
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_config_get_bool (krb5_context  context,
const krb5_config_section *  c,
  ... 
)
-
-
- -

-Like krb5_config_get_bool() but with a va_list list of configuration selection.

-Configuration value to a boolean value, where yes/true and any non-zero number means TRUE and other value is FALSE.

-

Parameters:
- - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
... a list of names, terminated with NULL.
-
-
Returns:
TRUE or FALSE
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_config_get_bool_default (krb5_context  context,
const krb5_config_section *  c,
krb5_boolean  def_value,
  ... 
)
-
-
- -

-krb5_config_get_bool_default() will convert the configuration option value to a boolean value, where yes/true and any non-zero number means TRUE and other value is FALSE.

-

Parameters:
- - - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
def_value the default value to return if no configuration found in the database.
... a list of names, terminated with NULL.
-
-
Returns:
TRUE or FALSE
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const krb5_config_binding* KRB5_LIB_CALL krb5_config_get_list (krb5_context  context,
const krb5_config_section *  c,
  ... 
)
-
-
- -

-Get a list of configuration binding list for more processing

-

Parameters:
- - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
... a list of names, terminated with NULL.
-
-
Returns:
NULL if configuration list is not found, a list otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_config_get_string (krb5_context  context,
const krb5_config_section *  c,
  ... 
)
-
-
- -

-Returns a "const char *" to a string in the configuration database. The string may not be valid after a reload of the configuration database so a caller should make a local copy if it needs to keep the string.

-

Parameters:
- - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
... a list of names, terminated with NULL.
-
-
Returns:
NULL if configuration string not found, a string otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_config_get_string_default (krb5_context  context,
const krb5_config_section *  c,
const char *  def_value,
  ... 
)
-
-
- -

-Like krb5_config_get_string(), but instead of returning NULL, instead return a default value.

-

Parameters:
- - - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
def_value the default value to return if no configuration found in the database.
... a list of names, terminated with NULL.
-
-
Returns:
a configuration string
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION char** KRB5_LIB_CALL krb5_config_get_strings (krb5_context  context,
const krb5_config_section *  c,
  ... 
)
-
-
- -

-Get a list of configuration strings, free the result with krb5_config_free_strings().

-

Parameters:
- - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
... a list of names, terminated with NULL.
-
-
Returns:
TRUE or FALSE
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_get_time (krb5_context  context,
const krb5_config_section *  c,
  ... 
)
-
-
- -

-Get the time from the configuration file using a relative time, for example: 1h30s

-

Parameters:
- - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
... a list of names, terminated with NULL.
-
-
Returns:
parsed the time or -1 on error
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_get_time_default (krb5_context  context,
const krb5_config_section *  c,
int  def_value,
  ... 
)
-
-
- -

-Get the time from the configuration file using a relative time, for example: 1h30s

-

Parameters:
- - - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
def_value the default value to return if no configuration found in the database.
... a list of names, terminated with NULL.
-
-
Returns:
parsed the time (or def_value on parse error)
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_config_parse_file_multi (krb5_context  context,
const char *  fname,
krb5_config_section **  res 
)
-
-
- -

-Parse a configuration file and add the result into res. This interface can be used to parse several configuration files into one resulting krb5_config_section by calling it repeatably.

-

Parameters:
- - - - -
context a Kerberos 5 context.
fname a file name to a Kerberos configuration file
res the returned result, must be free with krb5_free_config_files().
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -

-If the fname starts with "~/" parse configuration file in the current users home directory. The behavior can be disabled and enabled by calling krb5_set_home_dir_access(). -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_config_vget_bool (krb5_context  context,
const krb5_config_section *  c,
va_list  args 
)
-
-
- -

-krb5_config_get_bool() will convert the configuration option value to a boolean value, where yes/true and any non-zero number means TRUE and other value is FALSE.

-

Parameters:
- - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
args a va_list of arguments
-
-
Returns:
TRUE or FALSE
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_config_vget_bool_default (krb5_context  context,
const krb5_config_section *  c,
krb5_boolean  def_value,
va_list  args 
)
-
-
- -

-Like krb5_config_get_bool_default() but with a va_list list of configuration selection.

-Configuration value to a boolean value, where yes/true and any non-zero number means TRUE and other value is FALSE.

-

Parameters:
- - - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
def_value the default value to return if no configuration found in the database.
args a va_list of arguments
-
-
Returns:
TRUE or FALSE
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const krb5_config_binding* KRB5_LIB_CALL krb5_config_vget_list (krb5_context  context,
const krb5_config_section *  c,
va_list  args 
)
-
-
- -

-Get a list of configuration binding list for more processing

-

Parameters:
- - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
args a va_list of arguments
-
-
Returns:
NULL if configuration list is not found, a list otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_config_vget_string (krb5_context  context,
const krb5_config_section *  c,
va_list  args 
)
-
-
- -

-Like krb5_config_get_string(), but uses a va_list instead of ...

-

Parameters:
- - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
args a va_list of arguments
-
-
Returns:
NULL if configuration string not found, a string otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_config_vget_string_default (krb5_context  context,
const krb5_config_section *  c,
const char *  def_value,
va_list  args 
)
-
-
- -

-Like krb5_config_vget_string(), but instead of returning NULL, instead return a default value.

-

Parameters:
- - - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
def_value the default value to return if no configuration found in the database.
args a va_list of arguments
-
-
Returns:
a configuration string
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION char** KRB5_LIB_CALL krb5_config_vget_strings (krb5_context  context,
const krb5_config_section *  c,
va_list  args 
)
-
-
- -

-Get a list of configuration strings, free the result with krb5_config_free_strings().

-

Parameters:
- - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
args a va_list of arguments
-
-
Returns:
TRUE or FALSE
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_vget_time (krb5_context  context,
const krb5_config_section *  c,
va_list  args 
)
-
-
- -

-Get the time from the configuration file using a relative time, for example: 1h30s

-

Parameters:
- - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
args a va_list of arguments
-
-
Returns:
parsed the time or -1 on error
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_vget_time_default (krb5_context  context,
const krb5_config_section *  c,
int  def_value,
va_list  args 
)
-
-
- -

-Get the time from the configuration file using a relative time.

-Like krb5_config_get_time_default() but with a va_list list of configuration selection.

-

Parameters:
- - - - - -
context A Kerberos 5 context.
c a configuration section, or NULL to use the section from context
def_value the default value to return if no configuration found in the database.
args a va_list of arguments
-
-
Returns:
parsed the time (or def_value on parse error)
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_expand_hostname (krb5_context  context,
const char *  orig_hostname,
char **  new_hostname 
)
-
-
- -

-krb5_expand_hostname() tries to make orig_hostname into a more canonical one in the newly allocated space returned in new_hostname.

-

Parameters:
- - - - -
context a Keberos context
orig_hostname hostname to canonicalise.
new_hostname output hostname, caller must free hostname with krb5_xfree().
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_expand_hostname_realms (krb5_context  context,
const char *  orig_hostname,
char **  new_hostname,
char ***  realms 
)
-
-
- -

-krb5_expand_hostname_realms() expands orig_hostname to a name we believe to be a hostname in newly allocated space in new_hostname and return the realms new_hostname is believed to belong to in realms.

-

Parameters:
- - - - - -
context a Keberos context
orig_hostname hostname to canonicalise.
new_hostname output hostname, caller must free hostname with krb5_xfree().
realms output possible realms, is an array that is terminated with NULL. Caller must free with krb5_free_host_realm().
-
-
Returns:
Return an error code or 0, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_host_realm (krb5_context  context,
krb5_realm *  realmlist 
)
-
-
- -

-Free all memory allocated by `realmlist'

-

Parameters:
- - - -
context A Kerberos 5 context.
realmlist realmlist to free, NULL is ok
-
-
Returns:
a Kerberos error code, always 0.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_kuserok (krb5_context  context,
krb5_principal  principal,
const char *  luser 
)
-
-
- -

-This function takes the name of a local user and checks if principal is allowed to log in as that user.

-The user may have a ~/.k5login file listing principals that are allowed to login as that user. If that file does not exist, all principals with a first component identical to the username, and a realm considered local, are allowed access.

-The .k5login file must contain one principal per line, be owned by user and not be writable by group or other (but must be readable by anyone).

-Note that if the file exists, no implicit access rights are given to user@LOCALREALM.

-Optionally, a set of files may be put in ~/.k5login.d (a directory), in which case they will all be checked in the same manner as .k5login. The files may be called anything, but files starting with a hash (#) , or ending with a tilde (~) are ignored. Subdirectories are not traversed. Note that this directory may not be checked by other Kerberos implementations.

-If no configuration file exists, match user against local domains, ie luser@LOCAL-REALMS-IN-CONFIGURATION-FILES.

-

Parameters:
- - - - -
context Kerberos 5 context.
principal principal to check if allowed to login
luser local user id
-
-
Returns:
returns TRUE if access should be granted, FALSE otherwise.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_plugin_register (krb5_context  context,
enum krb5_plugin_type  type,
const char *  name,
void *  symbol 
)
-
-
- -

-Register a plugin symbol name of specific type.

Parameters:
- - - - - -
context a Keberos context
type type of plugin symbol
name name of plugin symbol
symbol a pointer to the named symbol
-
-
Returns:
In case of error a non zero error com_err error is returned and the Kerberos error string is set.
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__ticket.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__ticket.html deleted file mode 100644 index 7ce2ad0fca1..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__ticket.html +++ /dev/null @@ -1,73 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 ticket functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 ticket functions

- - - - -

Functions

KRB5_LIB_FUNCTION unsigned
-long KRB5_LIB_CALL 
krb5_ticket_get_flags (krb5_context context, const krb5_ticket *ticket)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL krb5_ticket_get_flags (krb5_context  context,
const krb5_ticket *  ticket 
)
-
-
- -

-Get the flags from the Kerberos ticket

-

Parameters:
- - - -
context Kerberos context
ticket Kerberos ticket
-
-
Returns:
ticket flags
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__v4compat.html b/kerberosV/src/doc/doxyout/krb5/html/group__krb5__v4compat.html deleted file mode 100644 index b862c6adb0d..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/group__krb5__v4compat.html +++ /dev/null @@ -1,134 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 4 compatiblity functions - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 4 compatiblity functions

- - - - - - -

Functions

KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb524_convert_creds_kdc (krb5_context context, krb5_creds *in_cred, struct credentials *v4creds) KRB5_DEPRECATED_FUNCTION("Use X instead")
KRB5_LIB_FUNCTION
-krb5_error_code KRB5_LIB_CALL 
krb524_convert_creds_kdc_ccache (krb5_context context, krb5_ccache ccache, krb5_creds *in_cred, struct credentials *v4creds) KRB5_DEPRECATED_FUNCTION("Use X instead")
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb524_convert_creds_kdc (krb5_context  context,
krb5_creds *  in_cred,
struct credentials *  v4creds 
)
-
-
- -

-Convert the v5 credentials in in_cred to v4-dito in v4creds. This is done by sending them to the 524 function in the KDC. If `in_cred' doesn't contain a DES session key, then a new one is gotten from the KDC and stored in the cred cache `ccache'.

-

Parameters:
- - - - -
context Kerberos 5 context.
in_cred the credential to convert
v4creds the converted credential
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb524_convert_creds_kdc_ccache (krb5_context  context,
krb5_ccache  ccache,
krb5_creds *  in_cred,
struct credentials *  v4creds 
)
-
-
- -

-Convert the v5 credentials in in_cred to v4-dito in v4creds, check the credential cache ccache before checking with the KDC.

-

Parameters:
- - - - - -
context Kerberos 5 context.
ccache credential cache used to check for des-ticket.
in_cred the credential to convert
v4creds the converted credential
-
-
Returns:
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message().
- -
-

-

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/index.html b/kerberosV/src/doc/doxyout/krb5/html/index.html deleted file mode 100644 index 103f674469f..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - -HeimdalKerberos5library: Heimdal Kerberos 5 library - - - -

-keyhole logo -

- - - -
-

Heimdal Kerberos 5 library

-

-

1.5.3

-Introduction

-Heimdal libkrb5 library is a implementation of the Kerberos protocol.

-Kerberos is a system for authenticating users and services on a network. It is built upon the assumption that the network is ``unsafe''. For example, data sent over the network can be eavesdropped and altered, and addresses can also be faked. Therefore they cannot be used for authentication purposes.

-

-

-If you want to know more about the file formats that is used by Heimdal, please see: File formats

-The project web page: http://www.h5l.org/

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/krb5_ccache_intro.html b/kerberosV/src/doc/doxyout/krb5/html/krb5_ccache_intro.html deleted file mode 100644 index e2123b5a6cc..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/krb5_ccache_intro.html +++ /dev/null @@ -1,74 +0,0 @@ - - -HeimdalKerberos5library: The credential cache functions - - - -

-keyhole logo -

- - - -
-

The credential cache functions

-Kerberos credential caches

-krb5_ccache structure holds a Kerberos credential cache.

-Heimdal support the follow types of credential caches:

-

    -
  • SCC Store the credential in a database
  • FILE Store the credential in memory
  • MEMORY Store the credential in memory
  • API A credential cache server based solution for Mac OS X
  • KCM A credential cache server based solution for all platforms
-

-Example

-This is a minimalistic version of klist:
#include <krb5.h>
-
-int
-main (int argc, char **argv)
-{
-    krb5_context context;
-    krb5_cc_cursor cursor;
-    krb5_error_code ret;
-    krb5_ccache id;
-    krb5_creds creds;
-
-    if (krb5_init_context (&context) != 0)
-        errx(1, "krb5_context");
-
-    ret = krb5_cc_default (context, &id);
-    if (ret)
-        krb5_err(context, 1, ret, "krb5_cc_default");
-
-    ret = krb5_cc_start_seq_get(context, id, &cursor);
-    if (ret)
-        krb5_err(context, 1, ret, "krb5_cc_start_seq_get");
-
-    while((ret = krb5_cc_next_cred(context, id, &cursor, &creds)) == 0){
-        char *principal;
-
-        krb5_unparse_name(context, creds.server, &principal);
-        printf("principal: %s\\n", principal);
-        free(principal);
-        krb5_free_cred_contents (context, &creds);
-    }
-    ret = krb5_cc_end_seq_get(context, id, &cursor);
-    if (ret)
-        krb5_err(context, 1, ret, "krb5_cc_end_seq_get");
-
-    krb5_cc_close(context, id);
-
-    krb5_free_context(context);
-    return 0;
-}
-
-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/krb5_fileformats.html b/kerberosV/src/doc/doxyout/krb5/html/krb5_fileformats.html deleted file mode 100644 index 91c5312ea4c..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/krb5_fileformats.html +++ /dev/null @@ -1,154 +0,0 @@ - - -HeimdalKerberos5library: File formats - - - -

-keyhole logo -

- - - -
-

File formats

-File formats

-This section documents the diffrent file formats that are used in Heimdal and other Kerberos implementations.

-keytab

-The keytab binary format is not a standard format. The format has evolved and may continue to. It is however understood by several Kerberos implementations including Heimdal, MIT, Sun's Java ktab and are created by the ktpass.exe utility from Windows. So it has established itself as the defacto format for storing Kerberos keys.

-The following C-like structure definitions illustrate the MIT keytab file format. All values are in network byte order. All text is ASCII.

-

   keytab {
-       uint16_t file_format_version;                    # 0x502
-       keytab_entry entries[*];
-   };
-
-   keytab_entry {
-       int32_t size;
-       uint16_t num_components;   # subtract 1 if version 0x501
-       counted_octet_string realm;
-       counted_octet_string components[num_components];
-       uint32_t name_type;       # not present if version 0x501
-       uint32_t timestamp;
-       uint8_t vno8;
-       keyblock key;
-       uint32_t vno; #only present if >= 4 bytes left in entry
-       uint32_t flags; #only present if >= 4 bytes left in entry
-   };
-
-   counted_octet_string {
-       uint16_t length;
-       uint8_t data[length];
-   };
-
-   keyblock {
-       uint16_t type;
-       counted_octet_string;
-   };
-

-All numbers are stored in network byteorder (big endian) format.

-The keytab file format begins with the 16 bit file_format_version which at the time this document was authored is 0x502. The format of older keytabs is described at the end of this document.

-The file_format_version is immediately followed by an array of keytab_entry structures which are prefixed with a 32 bit size indicating the number of bytes that follow in the entry. Note that the size should be evaluated as signed. This is because a negative value indicates that the entry is in fact empty (e.g. it has been deleted) and that the negative value of that negative value (which is of course a positive value) is the offset to the next keytab_entry. Based on these size values alone the entire keytab file can be traversed.

-The size is followed by a 16 bit num_components field indicating the number of counted_octet_string components in the components array.

-The num_components field is followed by a counted_octet_string representing the realm of the principal.

-A counted_octet_string is simply an array of bytes prefixed with a 16 bit length. For the realm and name components, the counted_octet_string bytes are ASCII encoded text with no zero terminator.

-Following the realm is the components array that represents the name of the principal. The text of these components may be joined with slashs to construct the typical SPN representation. For example, the service principal HTTP/www.foo.net@FOO.NET would consist of name components "HTTP" followed by "www.foo.net".

-Following the components array is the 32 bit name_type (e.g. 1 is KRB5_NT_PRINCIPAL, 2 is KRB5_NT_SRV_INST, 5 is KRB5_NT_UID, etc). In practice the name_type is almost certainly 1 meaning KRB5_NT_PRINCIPAL.

-The 32 bit timestamp indicates the time the key was established for that principal. The value represents the number of seconds since Jan 1, 1970.

-The 8 bit vno8 field is the version number of the key. This value is overridden by the 32 bit vno field if it is present. The vno8 field is filled with the lower 8 bits of the 32 bit protocol kvno field.

-The keyblock structure consists of a 16 bit value indicating the encryption type and is a counted_octet_string containing the key. The encryption type is the same as the Kerberos standard (e.g. 3 is des-cbc-md5, 23 is arcfour-hmac-md5, etc).

-The last field of the keytab_entry structure is optional. If the size of the keytab_entry indicates that there are at least 4 bytes remaining, a 32 bit value representing the key version number is present. This value supersedes the 8 bit vno8 value preceeding the keyblock.

-Older keytabs with a file_format_version of 0x501 are different in three ways:

-

    -
  • All integers are in host byte order [1].
  • The num_components field is 1 too large (i.e. after decoding, decrement by 1).
  • The 32 bit name_type field is not present.
-

-[1] The file_format_version field should really be treated as two separate 8 bit quantities representing the major and minor version number respectively.

-Heimdal database dump file

-Format of the Heimdal text dump file as of Heimdal 0.6.3:

-Each line in the dump file is one entry in the database.

-Each field of a line is separated by one or more spaces, with the exception of fields consisting of principals containing spaces, where space can be quoted with \ and \ is quoted by \.

-Fields and their types are:

-

        Quoted princial (quote character is \) [string]
-        Keys [keys]
-        Created by [event]
-        Modified by [event optional]
-        Valid start time [time optional]
-        Valid end time [time optional]
-        Password end valid time [time optional]
-        Max lifetime of ticket [time optional]
-        Max renew time of ticket [integer optional]
-        Flags [hdb flags]
-        Generation number [generation optional]
-        Extensions [extentions optional]
-

-Fields following these silently are ignored.

-All optional fields will be skipped if they fail to parse (or comprise the optional field marker of "-", w/o quotes).

-Example:

-

 fred\@CODE.COM 27:1:16:e8b4c8fc7e60b9e641dcf4cff3f08a701d982a2f89ba373733d26ca59ba6c789666f6b8bfcf169412bb1e5dceb9b33cda29f3412:-:1:3:4498a933881178c744f4232172dcd774c64e81fa6d05ecdf643a7e390624a0ebf3c7407a:-:1:2:b01934b13eb795d76f3a80717d469639b4da0cfb644161340ef44fdeb375e54d684dbb85:-:1:1:ea8e16d8078bf60c781da90f508d4deccba70595258b9d31888d33987cd31af0c9cced2e:- 20020415130120:admin\@CODE.COM 20041221112428:fred\@CODE.COM - - - 86400 604800 126 20020415130120:793707:28 -
-

-Encoding of types are as follows:

-

    -
  • keys
-

-

 kvno:[masterkvno:keytype:keydata:salt]{zero or more separated by :}
-

-kvno is the key version number.

-keydata is hex-encoded

-masterkvno is the kvno of the database master key. If this field is empty, the kadmin load and merge operations will encrypt the key data with the master key if there is one. Otherwise the key data will be imported asis.

-salt is encoded as "-" (no/default salt) or

-

 salt-type /
- salt-type / "string"
- salt-type / hex-encoded-data
-

-keytype is the protocol enctype number; see enum ENCTYPE in include/krb5_asn1.h for values.

-Example:

 27:1:16:e8b4c8fc7e60b9e641dcf4cff3f08a701d982a2f89ba373733d26ca59ba6c789666f6b8bfcf169412bb1e5dceb9b33cda29f3412:-:1:3:4498a933881178c744f4232172dcd774c64e81fa6d05ecdf643a7e390624a0ebf3c7407a:-:1:2:b01934b13eb795d76f3a80717d469639b4da0cfb644161340ef44fdeb375e54d684dbb85:-:1:1:ea8e16d8078bf60c781da90f508d4deccba70595258b9d31888d33987cd31af0c9cced2e:-
-

-

 kvno=27,{key: masterkvno=1,keytype=des3-cbc-sha1,keydata=..., default salt}...
-

-

    -
  • time
-

-Format of the time is: YYYYmmddHHMMSS, corresponding to strftime format "%Y%m%d%k%M%S".

-Time is expressed in UTC.

-Time can be optional (using -), when the time 0 is used.

-Example:

-

 20041221112428
-

-

    -
  • event
-

-

        time:principal
-

-time is as given in format time

-principal is a string. Not quoting it may not work in earlier versions of Heimdal.

-Example:

 20041221112428:bloggs\@CODE.COM
-

-

    -
  • hdb flags
-

-Integer encoding of HDB flags, see HDBFlags in lib/hdb/hdb.asn1. Each bit in the integer is the same as the bit in the specification.

-

    -
  • generation:
-

-

 time:usec:gen
-

-usec is a the microsecond, integer. gen is generation number, integer.

-The generation can be defaulted (using '-') or the empty string

-

    -
  • extensions:
-

-

 first-hex-encoded-HDB-Extension[:second-...]
-

-HDB-extension is encoded the DER encoded HDB-Extension from lib/hdb/hdb.asn1. Consumers HDB extensions should be aware that unknown entires needs to be preserved even thought the ASN.1 data content might be unknown. There is a critical flag in the data to show to the KDC that the entry MUST be understod if the entry is to be used.

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/krb5_init_creds_intro.html b/kerberosV/src/doc/doxyout/krb5/html/krb5_init_creds_intro.html deleted file mode 100644 index 33da5d61b0d..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/krb5_init_creds_intro.html +++ /dev/null @@ -1,29 +0,0 @@ - - -HeimdalKerberos5library: The initial credential handing functions - - - -

-keyhole logo -

- - - - -
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/krb5_introduction.html b/kerberosV/src/doc/doxyout/krb5/html/krb5_introduction.html deleted file mode 100644 index 09071297890..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/krb5_introduction.html +++ /dev/null @@ -1,204 +0,0 @@ - - -HeimdalKerberos5library: Introduction to the Kerberos 5 API - - - -

-keyhole logo -

- - - -
-

Introduction to the Kerberos 5 API

-Kerberos 5 API Overview

-All functions are documented in manual pages. This section tries to give an overview of the major components used in Kerberos library, and point to where to look for a specific function.

-Kerberos context

-A kerberos context (krb5_context) holds all per thread state. All global variables that are context specific are stored in this structure, including default encryption types, credential cache (for example, a ticket file), and default realms.

-The internals of the structure should never be accessed directly, functions exist for extracting information.

-See the manual page for krb5_init_context() how to create a context and module Heimdal Kerberos 5 library for more information about the functions.

-Kerberos authentication context

-Kerberos authentication context (krb5_auth_context) holds all context related to an authenticated connection, in a similar way to the kerberos context that holds the context for the thread or process.

-The krb5_auth_context is used by various functions that are directly related to authentication between the server/client. Example of data that this structure contains are various flags, addresses of client and server, port numbers, keyblocks (and subkeys), sequence numbers, replay cache, and checksum types.

-Kerberos principal

-The Kerberos principal is the structure that identifies a user or service in Kerberos. The structure that holds the principal is the krb5_principal. There are function to extract the realm and elements of the principal, but most applications have no reason to inspect the content of the structure.

-The are several ways to create a principal (with different degree of portability), and one way to free it.

-See also the page The principal handing functions. for more information and also module Heimdal Kerberos 5 principal functions.

-Credential cache

-A credential cache holds the tickets for a user. A given user can have several credential caches, one for each realm where the user have the initial tickets (the first krbtgt).

-The credential cache data can be stored internally in different way, each of them for different proposes. File credential (FILE) caches and processes based (KCM) caches are for permanent storage. While memory caches (MEMORY) are local caches to the local process.

-Caches are opened with krb5_cc_resolve() or created with krb5_cc_new_unique().

-If the cache needs to be opened again (using krb5_cc_resolve()) krb5_cc_close() will close the handle, but not the remove the cache. krb5_cc_destroy() will zero out the cache, remove the cache so it can no longer be referenced.

-See also The credential cache functions and Heimdal Kerberos 5 credential cache functions .

-Kerberos errors

-Kerberos errors are based on the com_err library. All error codes are 32-bit signed numbers, the first 24 bits define what subsystem the error originates from, and last 8 bits are 255 error codes within the library. Each error code have fixed string associated with it. For example, the error-code -1765328383 have the symbolic name KRB5KDC_ERR_NAME_EXP, and associated error string ``Client's entry in database has expired''.

-This is a great improvement compared to just getting one of the unix error-codes back. However, Heimdal have an extention to pass back customised errors messages. Instead of getting ``Key table entry not found'', the user might back ``failed to find host/host.example.com@EXAMLE.COM(kvno 3) in keytab /etc/krb5.keytab (des-cbc-crc)''. This improves the chance that the user find the cause of the error so you should use the customised error message whenever it's available.

-See also module Heimdal Kerberos 5 error reporting functions .

-Keytab management

-A keytab is a storage for locally stored keys. Heimdal includes keytab support for Kerberos 5 keytabs, Kerberos 4 srvtab, AFS-KeyFile's, and for storing keys in memory.

-Keytabs are used for servers and long-running services.

-See also The keytab handing functions and Heimdal Kerberos 5 keytab handling functions .

-Kerberos crypto

-Heimdal includes a implementation of the Kerberos crypto framework, all crypto operations. To create a crypto context call krb5_crypto_init().

-See also module Heimdal Kerberos 5 cryptography functions .

-Walkthrough of a sample Kerberos 5 client

-This example contains parts of a sample TCP Kerberos 5 clients, if you want a real working client, please look in appl/test directory in the Heimdal distribution.

-All Kerberos error-codes that are returned from kerberos functions in this program are passed to krb5_err, that will print a descriptive text of the error code and exit. Graphical programs can convert error-code to a human readable error-string with the krb5_get_error_message() function.

-Note that you should not use any Kerberos function before krb5_init_context() have completed successfully. That is the reason err() is used when krb5_init_context() fails.

-First the client needs to call krb5_init_context to initialise the Kerberos 5 library. This is only needed once per thread in the program. If the function returns a non-zero value it indicates that either the Kerberos implementation is failing or it's disabled on this host.

-

 #include <krb5.h>
-
- int
- main(int argc, char **argv)
- {
-         krb5_context context;
-
-         if (krb5_init_context(&context))
-                 errx (1, "krb5_context");
-

-Now the client wants to connect to the host at the other end. The preferred way of doing this is using getaddrinfo (for operating system that have this function implemented), since getaddrinfo is neutral to the address type and can use any protocol that is available.

-

         struct addrinfo *ai, *a;
-         struct addrinfo hints;
-         int error;
-
-         memset (&hints, 0, sizeof(hints));
-         hints.ai_socktype = SOCK_STREAM;
-         hints.ai_protocol = IPPROTO_TCP;
-
-         error = getaddrinfo (hostname, "pop3", &hints, &ai);
-         if (error)
-                 errx (1, "%s: %s", hostname, gai_strerror(error));
-
-         for (a = ai; a != NULL; a = a->ai_next) {
-                 int s;
-
-                 s = socket (a->ai_family, a->ai_socktype, a->ai_protocol);
-                 if (s < 0)
-                         continue;
-                 if (connect (s, a->ai_addr, a->ai_addrlen) < 0) {
-                         warn ("connect(%s)", hostname);
-                             close (s);
-                             continue;
-                 }
-                 freeaddrinfo (ai);
-                 ai = NULL;
-         }
-         if (ai) {
-                     freeaddrinfo (ai);
-                     errx ("failed to contact %s", hostname);
-         }
-

-Before authenticating, an authentication context needs to be created. This context keeps all information for one (to be) authenticated connection (see krb5_auth_context).

-

         status = krb5_auth_con_init (context, &auth_context);
-         if (status)
-                 krb5_err (context, 1, status, "krb5_auth_con_init");
-

-For setting the address in the authentication there is a help function krb5_auth_con_setaddrs_from_fd() that does everything that is needed when given a connected file descriptor to the socket.

-

         status = krb5_auth_con_setaddrs_from_fd (context,
-                                                  auth_context,
-                                                  &sock);
-         if (status)
-                 krb5_err (context, 1, status,
-                           "krb5_auth_con_setaddrs_from_fd");
-

-The next step is to build a server principal for the service we want to connect to. (See also krb5_sname_to_principal().)

-

         status = krb5_sname_to_principal (context,
-                                           hostname,
-                                           service,
-                                           KRB5_NT_SRV_HST,
-                                           &server);
-         if (status)
-                 krb5_err (context, 1, status, "krb5_sname_to_principal");
-

-The client principal is not passed to krb5_sendauth() function, this causes the krb5_sendauth() function to try to figure it out itself.

-The server program is using the function krb5_recvauth() to receive the Kerberos 5 authenticator.

-In this case, mutual authentication will be tried. That means that the server will authenticate to the client. Using mutual authentication is good since it enables the user to verify that they are talking to the right server (a server that knows the key).

-If you are using a non-blocking socket you will need to do all work of krb5_sendauth() yourself. Basically you need to send over the authenticator from krb5_mk_req() and, in case of mutual authentication, verifying the result from the server with krb5_rd_rep().

-

         status = krb5_sendauth (context,
-                                 &auth_context,
-                                 &sock,
-                                 VERSION,
-                                 NULL,
-                                 server,
-                                 AP_OPTS_MUTUAL_REQUIRED,
-                                 NULL,
-                                 NULL,
-                                 NULL,
-                                 NULL,
-                                 NULL,
-                                 NULL);
-         if (status)
-                 krb5_err (context, 1, status, "krb5_sendauth");
-

-Once authentication has been performed, it is time to send some data. First we create a krb5_data structure, then we sign it with krb5_mk_safe() using the auth_context that contains the session-key that was exchanged in the krb5_sendauth()/krb5_recvauth() authentication sequence.

-

         data.data   = "hej";
-         data.length = 3;
-
-         krb5_data_zero (&packet);
-
-         status = krb5_mk_safe (context,
-                                auth_context,
-                                &data,
-                                &packet,
-                                NULL);
-         if (status)
-                 krb5_err (context, 1, status, "krb5_mk_safe");
-

-And send it over the network.

-

         len = packet.length;
-         net_len = htonl(len);
-
-         if (krb5_net_write (context, &sock, &net_len, 4) != 4)
-                 err (1, "krb5_net_write");
-         if (krb5_net_write (context, &sock, packet.data, len) != len)
-                 err (1, "krb5_net_write");
-

-To send encrypted (and signed) data krb5_mk_priv() should be used instead. krb5_mk_priv() works the same way as krb5_mk_safe(), with the exception that it encrypts the data in addition to signing it.

-

         data.data   = "hemligt";
-         data.length = 7;
-
-         krb5_data_free (&packet);
-
-         status = krb5_mk_priv (context,
-                                auth_context,
-                                &data,
-                                &packet,
-                                NULL);
-         if (status)
-                 krb5_err (context, 1, status, "krb5_mk_priv");
-

-And send it over the network.

-

         len = packet.length;
-         net_len = htonl(len);
-
-         if (krb5_net_write (context, &sock, &net_len, 4) != 4)
-                 err (1, "krb5_net_write");
-         if (krb5_net_write (context, &sock, packet.data, len) != len)
-                 err (1, "krb5_net_write");
-

-The server is using krb5_rd_safe() and krb5_rd_priv() to verify the signature and decrypt the packet.

-Validating a password in an application

-See the manual page for krb5_verify_user().

-API differences to MIT Kerberos

-This section is somewhat disorganised, but so far there is no overall structure to the differences, though some of the have their root in that Heimdal uses an ASN.1 compiler and MIT doesn't.

-Principal and realms

-Heimdal stores the realm as a krb5_realm, that is a char *. MIT Kerberos uses a krb5_data to store a realm.

-In Heimdal krb5_principal doesn't contain the component name_type; it's instead stored in component name.name_type. To get and set the nametype in Heimdal, use krb5_principal_get_type() and krb5_principal_set_type().

-For more information about principal and realms, see krb5_principal.

-Error messages

-To get the error string, Heimdal uses krb5_get_error_message(). This is to return custom error messages (like ``Can't find host/datan.example.com@CODE.COM in /etc/krb5.conf.'' instead of a ``Key table entry not found'' that error_message returns.

-Heimdal uses a threadsafe(r) version of the com_err interface; the global com_err table isn't initialised. Then error_message returns quite a boring error string (just the error code itself).

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/krb5_keytab_intro.html b/kerberosV/src/doc/doxyout/krb5/html/krb5_keytab_intro.html deleted file mode 100644 index 441f3ba6b83..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/krb5_keytab_intro.html +++ /dev/null @@ -1,82 +0,0 @@ - - -HeimdalKerberos5library: The keytab handing functions - - - -

-keyhole logo -

- - - -
-

The keytab handing functions

-Kerberos Keytabs

-See the library functions here: Heimdal Kerberos 5 keytab handling functions

-Keytabs are long term key storage for servers, their equvalment of password files.

-Normally the only function that useful for server are to specify what keytab to use to other core functions like krb5_rd_req() krb5_kt_resolve(), and krb5_kt_close().

-Keytab names

-A keytab name is on the form type:residual. The residual part is specific to each keytab-type.

-When a keytab-name is resolved, the type is matched with an internal list of keytab types. If there is no matching keytab type, the default keytab is used. The current default type is FILE.

-The default value can be changed in the configuration file /etc/krb5.conf by setting the variable [defaults]default_keytab_name.

-The keytab types that are implemented in Heimdal are:

    -
  • file store the keytab in a file, the type's name is FILE . The residual part is a filename. For compatibility with other Kerberos implemtation WRFILE and JAVA14 is also accepted. WRFILE has the same format as FILE. JAVA14 have a format that is compatible with older versions of MIT kerberos and SUN's Java based installation. They store a truncted kvno, so when the knvo excess 255, they are truncted in this format.
-

-

    -
  • keytab store the keytab in a AFS keyfile (usually /usr/afs/etc/KeyFile ), the type's name is AFSKEYFILE. The residual part is a filename.
-

-

    -
  • memory The keytab is stored in a memory segment. This allows sensitive and/or temporary data not to be stored on disk. The type's name is MEMORY. Each MEMORY keytab is referenced counted by and opened by the residual name, so two handles can point to the same memory area. When the last user closes using krb5_kt_close() the keytab, the keys in they keytab is memset() to zero and freed and can no longer be looked up by name.
-

-Keytab example

-This is a minimalistic version of ktutil.

-

int
-main (int argc, char **argv)
-{
-    krb5_context context;
-    krb5_keytab keytab;
-    krb5_kt_cursor cursor;
-    krb5_keytab_entry entry;
-    krb5_error_code ret;
-    char *principal;
-
-    if (krb5_init_context (&context) != 0)
-        errx(1, "krb5_context");
-
-    ret = krb5_kt_default (context, &keytab);
-    if (ret)
-        krb5_err(context, 1, ret, "krb5_kt_default");
-
-    ret = krb5_kt_start_seq_get(context, keytab, &cursor);
-    if (ret)
-        krb5_err(context, 1, ret, "krb5_kt_start_seq_get");
-    while((ret = krb5_kt_next_entry(context, keytab, &entry, &cursor)) == 0){
-        krb5_unparse_name(context, entry.principal, &principal);
-        printf("principal: %s\n", principal);
-        free(principal);
-        krb5_kt_free_entry(context, &entry);
-    }
-    ret = krb5_kt_end_seq_get(context, keytab, &cursor);
-    if (ret)
-        krb5_err(context, 1, ret, "krb5_kt_end_seq_get");
-    ret = krb5_kt_close(context, keytab);
-    if (ret)
-        krb5_err(context, 1, ret, "krb5_kt_close");
-    krb5_free_context(context);
-    return 0;
-}
-
-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/krb5_principal_intro.html b/kerberosV/src/doc/doxyout/krb5/html/krb5_principal_intro.html deleted file mode 100644 index 2f10eb18a33..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/krb5_principal_intro.html +++ /dev/null @@ -1,32 +0,0 @@ - - -HeimdalKerberos5library: The principal handing functions. - - - -

-keyhole logo -

- - - -
-

The principal handing functions.

A Kerberos principal is a email address looking string that contains to parts separeted by a @. The later part is the kerbero realm the principal belongs to and the former is a list of 0 or more components. For example
-lha@SU.SE
-host/hummel.it.su.se@SU.SE
-host/admin@H5L.ORG
-

-See the library functions here: Heimdal Kerberos 5 principal functions

-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/modules.html b/kerberosV/src/doc/doxyout/krb5/html/modules.html deleted file mode 100644 index 4f68c4b6f6f..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/modules.html +++ /dev/null @@ -1,45 +0,0 @@ - - -HeimdalKerberos5library: Module Index - - - -

-keyhole logo -

- - - - -
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/pages.html b/kerberosV/src/doc/doxyout/krb5/html/pages.html deleted file mode 100644 index c5f10f7a362..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/pages.html +++ /dev/null @@ -1,41 +0,0 @@ - - -HeimdalKerberos5library: Page Index - - - -

-keyhole logo -

- - - - -
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/structkrb5__crypto__iov.html b/kerberosV/src/doc/doxyout/krb5/html/structkrb5__crypto__iov.html deleted file mode 100644 index a713c066f08..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/structkrb5__crypto__iov.html +++ /dev/null @@ -1,40 +0,0 @@ - - -HeimdalKerberos5library: krb5_crypto_iov Struct Reference - - - -

-keyhole logo -

- - - -
-

krb5_crypto_iov Struct Reference

#include <krb5.h> -

- - -
-


Detailed Description

-Semi private, not stable yet
The documentation for this struct was generated from the following file:
    -
  • /Users/lha/src/heimdal/heimdal-release/heimdal-1.5.3/lib/krb5/krb5.h
-
-
-Generated on Sun Dec 9 14:10:35 2012 for HeimdalKerberos5library by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/krb5/html/tab_b.gif b/kerberosV/src/doc/doxyout/krb5/html/tab_b.gif deleted file mode 100644 index 0d623483ffdf5f9f96900108042a7ab0643fe2a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 ncmZ?wbhEHbWMp7uXkcJy*>IeJfk6j|fqX^=1|}vKMh0sDa2W*H diff --git a/kerberosV/src/doc/doxyout/krb5/html/tab_l.gif b/kerberosV/src/doc/doxyout/krb5/html/tab_l.gif deleted file mode 100644 index 9b1e6337c9299a700401a2a78a2c6ffced475216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 706 zcmZ?wbhEHbZT`}F1e&(Gg}Y(8=I;HA5#Z$3JI=gGB)FQ#odI(O&E^@q;x zK6mr*m3xOS-#u~t!I@i+u0DKm^U160k6t`|^WpV}&n+8{U%dD9&a>B#U%!9-@yol< zU%&tQ{rk_K|NsC0`}dE5ET99@1@a36+kb~?0UJ*yc&I3X_m z!ND^5$O7$#8OFRuDhG}!?8z?cdZK&!`PWjdR;Aj^wZ` zeK{IEYHBJ)6K8VIp1`BVt++swf6j+=L{p1*nO(VhE`pFexG@5$|>uaCcd z`0m=9m+yak{QmXN#Sc$^{$X9h9&q2jiKAI|&T)a;PPx2K9p`YIdw8HtR5k2Q$2-O2 z*;3y{MQ-RnJTgJfI&R5|O)AHxDf_00XbPvDZPy4t=hHd)nfLPvms&O`Ok(sD()5v$ z5U@&h;a=#xbxVbo2~X&Xj0Ie(f{v>vERH+qC+nTG=B8Nca=wU-O$?1&vUgV~9=!H; zx>3p9Yn%*<>t~sk+&0xfyS8RsPfYBd<~wWK%j-LmpU>O7yX^h#UCp1x-p#i7@bE;py8XI6 zmY<)m>~)W~yIWcMVoiPg{duuf<*)9qZ9l$m*Ph&W&$jlv*Vpa+{pH@n=IQ$L?0$ax ec60Ul|8o2P|NVbd{6P)#weSbE3}s?04AuZvx_~SI diff --git a/kerberosV/src/doc/doxyout/krb5/html/tab_r.gif b/kerberosV/src/doc/doxyout/krb5/html/tab_r.gif deleted file mode 100644 index ce9dd9f533cb5486d6941844f442b59d4a9e9175..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2585 zcmbV}`9Bkk1ILFF--w5zJc=ZZT(zjE=;2|_S)Qm~rCWz1Pc)KPl;jv%A#&v2*x}yc zmf2~Jm~&=xjJY?PqwIN}f8qQ2{r$uH{c*nJbmr{cR5??*egHrs-B=MzCF`3%e{FAW z{oL5xTHn~5TM{jaB;@|_Ue5F&Zb@p(kMyG{*;gWDg zyeL|eZf7Qd8=#bXzSiR{yzRgLSj-fJS8>lBjVHN z^o-0eS=nE6a`W;LChBs=`+QAJP~{b93>H^eRb5kCSC1zUNezun%`L5M?RDzv#%jk7 zYVRX=vATPD`+oEfum^{RM@GjuP?-r=yh0!p;Vx^T9G7~`7%5ydH%70=jyJ;;`d;hv92x3R=z{xp+Lg2!*@OK*K15-t&okoPtSED)h&$RLxdbA zseWm^C3d%-yRNi-ryk^!ek+C`n&~cd$#ZWct_cUL{l~i+Nzx^5d!n94(>bW-iL~Rl z&8r)?q|1DIo=0=judQ{FaGcfLERz8gfn3-Qt<2lksh{mzpT}DXxUuR^z=^key&q4! z+wWI45vL0k$R^(F#{qfqhUsN@WA+w-V?LPH33!Q?WFSB3)WBojE@hK41Nb?KfS+Qo zXgrzfsP$wr4Qzy*{OD>uJBjdgGM@VMml5)2f~_}lD*YyOb}Hjeobhz#4c`w(l^>KK zr?Ud;W~Z}*w;%hZ|2^p^+f06gJDJQD zeIhGADbDmm&6arh(q>EZ<7mjzg7l|z$hRL8=1>)Nv=S7CY$B}iYJ&*T_-T_OG*L1q ztZ3Lana33?y3AKnyq^YCF|4x%Rb5WU&2qcl{TFKey%QJeMxn^SdT!hZ5+0i1zeusiYVp-phBl7b5+Px-X&LhByq z0F&<;K0l2+v>qiHlXb#$jXMv$uK-dEGE9L~qtdU(XeRXmvu*K2Q&6!fD**JxYP4b4BR7FdJ$Qx9G9`J%-_X!a#LGpp3g9)VWytGCa;7`S1_e8F~!R+aSJ zOF17p2`H?2kPs8Q`_;U}+D%3p zs2-0BTqFwpUoBk`?P;iPQ(IbEA|JmMx!P&YYG|R@S=5Mnw;-?A6rEEVyV%d7{iU4a zNk`i!%F(Ykpm`}#oH;BjY->@b8vQedv;pza2FL&*6ufjd+*3Ute&>kes~TU?^KkojsTh(o~(3tk1Y6>4(yn( z#U*ID9@eg-beKo1B;HXe+}{Z%n@7m0+yxivuqk9~;!1LGQlah)xYK4>wgL}l6dsaN zIxlRlq`*`j9PG4*0hD6YV_b_2w5b#)o7J?`q#{GjvvKlD`T*dWcZx<-s(ZvLB44E# z=!|sw!?)@%y$oRNL#25WS3lzdii}TuQ3?CLnvQ1_n};2sT_;Y;#d3=+-(O% zMN$>O!3;ke(UuLR%h_&)N zs^!-@A>QR}4yB1bPp`9S19ikTbZ~O{&FF-yHK{En;mmShDUIEw03`j(DBIsM}Rjki2J#SQa3gFZTKBPDeIiLt9Z z%bL3(B@Qw%(B`wSMS~dPh$=R`(}lBoFXKy(s|*{#ru$wjsBc_O#zxNk9w+UUHmx(U zmJ8+M+ndtnZ<7|VU9Mbt61zpo9T&3%Wx&XII=#QJxjR`CZf22ac3d51Z?GD%LEe_&*t46Qf;4`bZ7p2K(Ab5>GfT^}4! zBT&HZD`^PEgWoI&{~o-ID0F?O`75sm(87x%A{(}Ch1)QlzdJ)1B-eqe5a(weg0`4lQIf1evjvbBY50DVbzO7CLf|vP z2#0(U-|jZ`H{y5N^o7%iK6H>_HEGN->U6^!)1{XpJV!!4(Ig7wzZQ*9WYF4X1rG0x z=1uA@i`rIAciubDC{;~b(|&|A@xkjRP5aRcvRU9tvIm}jDB6J eQ0-6-y)mpwdT=ayS0tBxKDA*~;EWmo diff --git a/kerberosV/src/doc/doxyout/krb5/html/tabs.css b/kerberosV/src/doc/doxyout/krb5/html/tabs.css deleted file mode 100644 index 95f00a91da3..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/html/tabs.css +++ /dev/null @@ -1,102 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5.3 deleted file mode 100644 index 8f18b35652b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5.3 +++ /dev/null @@ -1,1092 +0,0 @@ -.TH "Heimdal Kerberos 5 library" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 library \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_add_et_list\fP (krb5_context context, void(*func)(struct et_list **))" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_password\fP (krb5_context context, krb5_creds *creds, const char *newpw, krb5_principal targprinc, int *result_code, krb5_data *result_code_string, krb5_data *result_string)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_context\fP (krb5_context *context)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_context\fP (krb5_context context, krb5_context *out)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_context\fP (krb5_context context)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_config_files\fP (krb5_context context, char **filenames)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_prepend_config_files_default\fP (const char *filelist, char ***pfilenames)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_default_config_files\fP (char ***pfilenames)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_config_files\fP (char **filenames)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const krb5_enctype *KRB5_LIB_CALL \fBkrb5_kerberos_enctypes\fP (krb5_context context)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_default_in_tkt_etypes\fP (krb5_context context, const krb5_enctype *etypes)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_default_in_tkt_etypes\fP (krb5_context context, krb5_pdu pdu_type, krb5_enctype **etypes)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_init_ets\fP (krb5_context context)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_set_use_admin_kdc\fP (krb5_context context, krb5_boolean flag)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_get_use_admin_kdc\fP (krb5_context context)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_add_extra_addresses\fP (krb5_context context, krb5_addresses *addresses)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_extra_addresses\fP (krb5_context context, const krb5_addresses *addresses)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_extra_addresses\fP (krb5_context context, krb5_addresses *addresses)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_add_ignore_addresses\fP (krb5_context context, krb5_addresses *addresses)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_ignore_addresses\fP (krb5_context context, const krb5_addresses *addresses)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_ignore_addresses\fP (krb5_context context, krb5_addresses *addresses)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_fcache_version\fP (krb5_context context, int version)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_fcache_version\fP (krb5_context context, int *version)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_is_thread_safe\fP (void)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_set_dns_canonicalize_hostname\fP (krb5_context context, krb5_boolean flag)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_get_dns_canonicalize_hostname\fP (krb5_context context)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_kdc_sec_offset\fP (krb5_context context, int32_t *sec, int32_t *usec)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_kdc_sec_offset\fP (krb5_context context, int32_t sec, int32_t usec)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL \fBkrb5_get_max_time_skew\fP (krb5_context context)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_set_max_time_skew\fP (krb5_context context, time_t t)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_set_home_dir_access\fP (krb5_context context, krb5_boolean allow)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_host_realm\fP (krb5_context context, const krb5_realm *from, krb5_realm **to)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_free_cred_contents\fP (krb5_context context, krb5_creds *c)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_creds_contents\fP (krb5_context context, const krb5_creds *incred, krb5_creds *c)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_creds\fP (krb5_context context, const krb5_creds *incred, krb5_creds **outcred)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_free_creds\fP (krb5_context context, krb5_creds *c)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_compare_creds\fP (krb5_context context, krb5_flags whichfields, const krb5_creds *mcreds, const krb5_creds *creds)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL \fBkrb5_creds_get_ticket_flags\fP (krb5_creds *creds)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_data_zero\fP (krb5_data *p)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_data_free\fP (krb5_data *p)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_data\fP (krb5_context context, krb5_data *p)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_data_alloc\fP (krb5_data *p, int len)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_data_realloc\fP (krb5_data *p, int len)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_data_copy\fP (krb5_data *p, const void *data, size_t len)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_data\fP (krb5_context context, const krb5_data *indata, krb5_data **outdata)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_data_cmp\fP (const krb5_data *data1, const krb5_data *data2)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_data_ct_cmp\fP (const krb5_data *data1, const krb5_data *data2)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_krbhst_get_addrinfo\fP (krb5_context context, krb5_krbhst_info *host, struct addrinfo **ai)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_free_ticket\fP (krb5_context context, krb5_ticket *ticket)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_ticket\fP (krb5_context context, const krb5_ticket *from, krb5_ticket **to)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ticket_get_client\fP (krb5_context context, const krb5_ticket *ticket, krb5_principal *client)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ticket_get_server\fP (krb5_context context, const krb5_ticket *ticket, krb5_principal *server)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL \fBkrb5_ticket_get_endtime\fP (krb5_context context, const krb5_ticket *ticket)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ticket_get_authorization_data_type\fP (krb5_context context, krb5_ticket *ticket, int type, krb5_data *data)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_real_time\fP (krb5_context context, krb5_timestamp sec, int32_t usec)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_add_et_list (krb5_context context, void(*)(struct et_list **) func)" -.PP -Add a specified list of error messages to the et list in context. Call func (probably a comerr-generated function) with a pointer to the current et_list. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A kerberos context. -.br -\fIfunc\fP The generated com_err et function. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_add_extra_addresses (krb5_context context, krb5_addresses * addresses)" -.PP -Add extra address to the address list that the library will add to the client's address list when communicating with the KDC. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIaddresses\fP addreses to add -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_add_ignore_addresses (krb5_context context, krb5_addresses * addresses)" -.PP -Add extra addresses to ignore when fetching addresses from the underlaying operating system. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIaddresses\fP addreses to ignore -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_compare_creds (krb5_context context, krb5_flags whichfields, const krb5_creds * mcreds, const krb5_creds * creds)" -.PP -Return TRUE if `mcreds' and `creds' are equal (`whichfields' determines what equal means). -.PP -The following flags, set in whichfields affects the comparison: -.IP "\(bu" 2 -KRB5_TC_MATCH_SRV_NAMEONLY Consider all realms equal when comparing the service principal. -.IP "\(bu" 2 -KRB5_TC_MATCH_KEYTYPE Compare enctypes. -.IP "\(bu" 2 -KRB5_TC_MATCH_FLAGS_EXACT Make sure that the ticket flags are identical. -.IP "\(bu" 2 -KRB5_TC_MATCH_FLAGS Make sure that all ticket flags set in mcreds are also present in creds . -.IP "\(bu" 2 -KRB5_TC_MATCH_TIMES_EXACT Compares the ticket times exactly. -.IP "\(bu" 2 -KRB5_TC_MATCH_TIMES Compares only the expiration times of the creds. -.IP "\(bu" 2 -KRB5_TC_MATCH_AUTHDATA Compares the authdata fields. -.IP "\(bu" 2 -KRB5_TC_MATCH_2ND_TKT Compares the second tickets (used by user-to-user authentication). -.IP "\(bu" 2 -KRB5_TC_MATCH_IS_SKEY Compares the existance of the second ticket. -.PP -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIwhichfields\fP which fields to compare. -.br -\fImcreds\fP cred to compare with. -.br -\fIcreds\fP cred to compare with. -.RE -.PP -\fBReturns:\fP -.RS 4 -return TRUE if mcred and creds are equal, FALSE if not. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_context (krb5_context context, krb5_context * out)" -.PP -Make a copy for the Kerberos 5 context, the new krb5_context shoud be freed with \fBkrb5_free_context()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP the Kerberos context to copy -.br -\fIout\fP the copy of the Kerberos, set to NULL error. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_creds (krb5_context context, const krb5_creds * incred, krb5_creds ** outcred)" -.PP -Copy krb5_creds. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIincred\fP source credential -.br -\fIoutcred\fP destination credential, free with \fBkrb5_free_creds()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_creds_contents (krb5_context context, const krb5_creds * incred, krb5_creds * c)" -.PP -Copy content of krb5_creds. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIincred\fP source credential -.br -\fIc\fP destination credential, free with \fBkrb5_free_cred_contents()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_data (krb5_context context, const krb5_data * indata, krb5_data ** outdata)" -.PP -Copy the data into a newly allocated krb5_data. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIindata\fP the krb5_data data to copy -.br -\fIoutdata\fP new krb5_date to copy too. Free with \fBkrb5_free_data()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_host_realm (krb5_context context, const krb5_realm * from, krb5_realm ** to)" -.PP -Copy the list of realms from `from' to `to'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIfrom\fP list of realms to copy from. -.br -\fIto\fP list of realms to copy to, free list of \fBkrb5_free_host_realm()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_ticket (krb5_context context, const krb5_ticket * from, krb5_ticket ** to)" -.PP -Copy ticket and content -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIfrom\fP ticket to copy -.br -\fIto\fP new copy of ticket, free with \fBkrb5_free_ticket()\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL krb5_creds_get_ticket_flags (krb5_creds * creds)" -.PP -Returns the ticket flags for the credentials in creds. See also \fBkrb5_ticket_get_flags()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcreds\fP credential to get ticket flags from -.RE -.PP -\fBReturns:\fP -.RS 4 -ticket flags -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_data_alloc (krb5_data * p, int len)" -.PP -Allocate data of and krb5_data. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP krb5_data to allocate. -.br -\fIlen\fP size to allocate. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_data_cmp (const krb5_data * data1, const krb5_data * data2)" -.PP -Compare to data. -.PP -\fBParameters:\fP -.RS 4 -\fIdata1\fP krb5_data to compare -.br -\fIdata2\fP krb5_data to compare -.RE -.PP -\fBReturns:\fP -.RS 4 -return the same way as memcmp(), useful when sorting. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_data_copy (krb5_data * p, const void * data, size_t len)" -.PP -Copy the data of len into the krb5_data. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP krb5_data to copy into. -.br -\fIdata\fP data to copy.. -.br -\fIlen\fP new size. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_data_ct_cmp (const krb5_data * data1, const krb5_data * data2)" -.PP -Compare to data not exposing timing information from the checksum data -.PP -\fBParameters:\fP -.RS 4 -\fIdata1\fP krb5_data to compare -.br -\fIdata2\fP krb5_data to compare -.RE -.PP -\fBReturns:\fP -.RS 4 -returns zero for same data, otherwise non zero. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_data_free (krb5_data * p)" -.PP -Free the content of krb5_data structure, its ok to free a zeroed structure (with memset() or \fBkrb5_data_zero()\fP). When done, the structure will be zeroed. The same function is called \fBkrb5_free_data_contents()\fP in MIT Kerberos. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP krb5_data to free. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_data_realloc (krb5_data * p, int len)" -.PP -Grow (or shrink) the content of krb5_data to a new size. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP krb5_data to free. -.br -\fIlen\fP new size. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_data_zero (krb5_data * p)" -.PP -Reset the (potentially uninitalized) krb5_data structure. -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP krb5_data to reset. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_config_files (char ** filenames)" -.PP -Free a list of configuration files. -.PP -\fBParameters:\fP -.RS 4 -\fIfilenames\fP list, terminated with a NULL pointer, to be freed. NULL is an valid argument. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_context (krb5_context context)" -.PP -Frees the krb5_context allocated by \fBkrb5_init_context()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP context to be freed. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_cred_contents (krb5_context context, krb5_creds * c)" -.PP -Free content of krb5_creds. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIc\fP krb5_creds to free. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_creds (krb5_context context, krb5_creds * c)" -.PP -Free krb5_creds. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIc\fP krb5_creds to free. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_data (krb5_context context, krb5_data * p)" -.PP -Free krb5_data (and its content). -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIp\fP krb5_data to free. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_ticket (krb5_context context, krb5_ticket * ticket)" -.PP -Free ticket and content -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIticket\fP ticket to free -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_default_config_files (char *** pfilenames)" -.PP -Get the global configuration list. -.PP -\fBParameters:\fP -.RS 4 -\fIpfilenames\fP return array of filenames, should be freed with \fBkrb5_free_config_files()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_default_in_tkt_etypes (krb5_context context, krb5_pdu pdu_type, krb5_enctype ** etypes)" -.PP -Get the default encryption types that will be use in communcation with the KDC, clients and servers. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIetypes\fP Encryption types, array terminated with ETYPE_NULL(0), caller should free array with krb5_xfree(): -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_get_dns_canonicalize_hostname (krb5_context context)" -.PP -Get if the library uses DNS to canonicalize hostnames. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.RE -.PP -\fBReturns:\fP -.RS 4 -return non zero if the library uses DNS to canonicalize hostnames. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_extra_addresses (krb5_context context, krb5_addresses * addresses)" -.PP -Get extra address to the address list that the library will add to the client's address list when communicating with the KDC. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIaddresses\fP addreses to set -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_fcache_version (krb5_context context, int * version)" -.PP -Get version of fcache that the library should use. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIversion\fP version number. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_ignore_addresses (krb5_context context, krb5_addresses * addresses)" -.PP -Get extra addresses to ignore when fetching addresses from the underlaying operating system. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIaddresses\fP list addreses ignored -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_kdc_sec_offset (krb5_context context, int32_t * sec, int32_t * usec)" -.PP -Get current offset in time to the KDC. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIsec\fP seconds part of offset. -.br -\fIusec\fP micro seconds part of offset. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns zero -.RE -.PP - -.SS "KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL krb5_get_max_time_skew (krb5_context context)" -.PP -Get max time skew allowed. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.RE -.PP -\fBReturns:\fP -.RS 4 -timeskew in seconds. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_get_use_admin_kdc (krb5_context context)" -.PP -Make the kerberos library default to the admin KDC. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.RE -.PP -\fBReturns:\fP -.RS 4 -boolean flag to telling the context will use admin KDC as the default KDC. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_context (krb5_context * context)" -.PP -Initializes the context structure and reads the configuration file /etc/krb5.conf. The structure should be freed by calling \fBkrb5_free_context()\fP when it is no longer being used. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP pointer to returned context -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an errno code is returned. Failure means either that something bad happened during initialization (typically ENOMEM) or that Kerberos should not be used ENXIO. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_init_ets (krb5_context context)" -.PP -Init the built-in ets in the Kerberos library. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP kerberos context to add the ets too -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_is_thread_safe (void)" -.PP -Runtime check if the Kerberos library was complied with thread support. -.PP -\fBReturns:\fP -.RS 4 -TRUE if the library was compiled with thread support, FALSE if not. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const krb5_enctype* KRB5_LIB_CALL krb5_kerberos_enctypes (krb5_context context)" -.PP -Returns the list of Kerberos encryption types sorted in order of most preferred to least preferred encryption type. Note that some encryption types might be disabled, so you need to check with \fBkrb5_enctype_valid()\fP before using the encryption type. -.PP -\fBReturns:\fP -.RS 4 -list of enctypes, terminated with ETYPE_NULL. Its a static array completed into the Kerberos library so the content doesn't need to be freed. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_krbhst_get_addrinfo (krb5_context context, krb5_krbhst_info * host, struct addrinfo ** ai)" -.PP -Return an `struct addrinfo *' for a KDC host. -.PP -Returns an the struct addrinfo in in that corresponds to the information in `host'. free:ing is handled by krb5_krbhst_free, so the returned ai must not be released. -.PP -First try this as an IP address, this allows us to add a dot at the end to stop using the search domains. -.PP -If the hostname contains a dot, assumes it's a FQDN and don't use search domains since that might be painfully slow when machine is disconnected from that network. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_prepend_config_files_default (const char * filelist, char *** pfilenames)" -.PP -Prepend the filename to the global configuration list. -.PP -\fBParameters:\fP -.RS 4 -\fIfilelist\fP a filename to add to the default list of filename -.br -\fIpfilenames\fP return array of filenames, should be freed with \fBkrb5_free_config_files()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_config_files (krb5_context context, char ** filenames)" -.PP -Reinit the context from a new set of filenames. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP context to add configuration too. -.br -\fIfilenames\fP array of filenames, end of list is indicated with a NULL filename. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_default_in_tkt_etypes (krb5_context context, const krb5_enctype * etypes)" -.PP -Set the default encryption types that will be use in communcation with the KDC, clients and servers. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIetypes\fP Encryption types, array terminated with ETYPE_NULL (0). -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_dns_canonicalize_hostname (krb5_context context, krb5_boolean flag)" -.PP -Set if the library should use DNS to canonicalize hostnames. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIflag\fP if its dns canonicalizion is used or not. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_extra_addresses (krb5_context context, const krb5_addresses * addresses)" -.PP -Set extra address to the address list that the library will add to the client's address list when communicating with the KDC. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIaddresses\fP addreses to set -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_fcache_version (krb5_context context, int version)" -.PP -Set version of fcache that the library should use. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIversion\fP version number. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_set_home_dir_access (krb5_context context, krb5_boolean allow)" -.PP -Enable and disable home directory access on either the global state or the krb5_context state. By calling \fBkrb5_set_home_dir_access()\fP with context set to NULL, the global state is configured otherwise the state for the krb5_context is modified. -.PP -For home directory access to be allowed, both the global state and the krb5_context state have to be allowed. -.PP -Administrator (root user), never uses the home directory. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context or NULL -.br -\fIallow\fP allow if TRUE home directory -.RE -.PP -\fBReturns:\fP -.RS 4 -the old value -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_ignore_addresses (krb5_context context, const krb5_addresses * addresses)" -.PP -Set extra addresses to ignore when fetching addresses from the underlaying operating system. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIaddresses\fP addreses to ignore -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_kdc_sec_offset (krb5_context context, int32_t sec, int32_t usec)" -.PP -Set current offset in time to the KDC. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIsec\fP seconds part of offset. -.br -\fIusec\fP micro seconds part of offset. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns zero -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_max_time_skew (krb5_context context, time_t t)" -.PP -Set max time skew allowed. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIt\fP timeskew in seconds. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_password (krb5_context context, krb5_creds * creds, const char * newpw, krb5_principal targprinc, int * result_code, krb5_data * result_code_string, krb5_data * result_string)" -.PP -Change password using creds. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIcreds\fP The initial kadmin/passwd for the principal or an admin principal -.br -\fInewpw\fP The new password to set -.br -\fItargprinc\fP if unset, the default principal is used. -.br -\fIresult_code\fP Result code, KRB5_KPASSWD_SUCCESS is when password is changed. -.br -\fIresult_code_string\fP binary message from the server, contains at least the result_code. -.br -\fIresult_string\fP A message from the kpasswd service or the library in human printable form. The string is NUL terminated. -.RE -.PP -\fBReturns:\fP -.RS 4 -On sucess and *result_code is KRB5_KPASSWD_SUCCESS, the password is changed. -.RE -.PP -@ -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_real_time (krb5_context context, krb5_timestamp sec, int32_t usec)" -.PP -Set the absolute time that the caller knows the kdc has so the kerberos library can calculate the relative diffrence beteen the KDC time and local system time. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Keberos 5 context. -.br -\fIsec\fP The applications new of 'now' in seconds -.br -\fIusec\fP The applications new of 'now' in micro seconds -.RE -.PP -\fBReturns:\fP -.RS 4 -Kerberos 5 error code, see krb5_get_error_message(). -.RE -.PP - -.PP -If the caller passes in a negative usec, its assumed to be unknown and the function will use the current time usec. -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_use_admin_kdc (krb5_context context, krb5_boolean flag)" -.PP -Make the kerberos library default to the admin KDC. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIflag\fP boolean flag to select if the use the admin KDC or not. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ticket_get_authorization_data_type (krb5_context context, krb5_ticket * ticket, int type, krb5_data * data)" -.PP -Extract the authorization data type of type from the ticket. Store the field in data. This function is to use for kerberos applications. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIticket\fP Kerberos ticket -.br -\fItype\fP type to fetch -.br -\fIdata\fP returned data, free with \fBkrb5_data_free()\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ticket_get_client (krb5_context context, const krb5_ticket * ticket, krb5_principal * client)" -.PP -Return client principal in ticket -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIticket\fP ticket to copy -.br -\fIclient\fP client principal, free with \fBkrb5_free_principal()\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL krb5_ticket_get_endtime (krb5_context context, const krb5_ticket * ticket)" -.PP -Return end time of ticket -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIticket\fP ticket to copy -.RE -.PP -\fBReturns:\fP -.RS 4 -end time of ticket -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ticket_get_server (krb5_context context, const krb5_ticket * ticket, krb5_principal * server)" -.PP -Return server principal in ticket -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIticket\fP ticket to copy -.br -\fIserver\fP server principal, free with \fBkrb5_free_principal()\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb524_convert_creds_kdc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb524_convert_creds_kdc.3 deleted file mode 100644 index 2f0545d0dd2..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb524_convert_creds_kdc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_v4compat.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb524_convert_creds_kdc_ccache.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb524_convert_creds_kdc_ccache.3 deleted file mode 100644 index 2f0545d0dd2..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb524_convert_creds_kdc_ccache.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_v4compat.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acc_ops.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acc_ops.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acc_ops.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acl_match_file.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acl_match_file.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acl_match_file.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acl_match_string.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acl_match_string.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_acl_match_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_et_list.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_et_list.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_et_list.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_extra_addresses.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_extra_addresses.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_extra_addresses.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_ignore_addresses.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_ignore_addresses.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_add_ignore_addresses.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_addr2sockaddr.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_addr2sockaddr.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_addr2sockaddr.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address.3 deleted file mode 100644 index a273b298681..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address.3 +++ /dev/null @@ -1,461 +0,0 @@ -.TH "Heimdal Kerberos 5 address functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 address functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_sockaddr2address\fP (krb5_context context, const struct sockaddr *sa, krb5_address *addr)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_sockaddr2port\fP (krb5_context context, const struct sockaddr *sa, int16_t *port)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_addr2sockaddr\fP (krb5_context context, const krb5_address *addr, struct sockaddr *sa, krb5_socklen_t *sa_size, int port)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION size_t KRB5_LIB_CALL \fBkrb5_max_sockaddr_size\fP (void)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_sockaddr_uninteresting\fP (const struct sockaddr *sa)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_h_addr2sockaddr\fP (krb5_context context, int af, const char *addr, struct sockaddr *sa, krb5_socklen_t *sa_size, int port)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_h_addr2addr\fP (krb5_context context, int af, const char *haddr, krb5_address *addr)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_anyaddr\fP (krb5_context context, int af, struct sockaddr *sa, krb5_socklen_t *sa_size, int port)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_print_address\fP (const krb5_address *addr, char *str, size_t len, size_t *ret_len)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_parse_address\fP (krb5_context context, const char *string, krb5_addresses *addresses)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_address_order\fP (krb5_context context, const krb5_address *addr1, const krb5_address *addr2)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_address_compare\fP (krb5_context context, const krb5_address *addr1, const krb5_address *addr2)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_address_search\fP (krb5_context context, const krb5_address *addr, const krb5_addresses *addrlist)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_free_address\fP (krb5_context context, krb5_address *address)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_free_addresses\fP (krb5_context context, krb5_addresses *addresses)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_address\fP (krb5_context context, const krb5_address *inaddr, krb5_address *outaddr)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_addresses\fP (krb5_context context, const krb5_addresses *inaddr, krb5_addresses *outaddr)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_append_addresses\fP (krb5_context context, krb5_addresses *dest, const krb5_addresses *source)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_make_addrport\fP (krb5_context context, krb5_address **res, const krb5_address *addr, int16_t port)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_address_prefixlen_boundary\fP (krb5_context context, const krb5_address *inaddr, unsigned long prefixlen, krb5_address *low, krb5_address *high)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_addr2sockaddr (krb5_context context, const krb5_address * addr, struct sockaddr * sa, krb5_socklen_t * sa_size, int port)" -.PP -krb5_addr2sockaddr sets the 'struct sockaddr sockaddr' from addr and port. The argument sa_size should initially contain the size of the sa and after the call, it will contain the actual length of the address. In case of the sa is too small to fit the whole address, the up to *sa_size will be stored, and then *sa_size will be set to the required length. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIaddr\fP the address to copy the from -.br -\fIsa\fP the struct sockaddr that will be filled in -.br -\fIsa_size\fP pointer to length of sa, and after the call, it will contain the actual length of the address. -.br -\fIport\fP set port in sa. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. Will return KRB5_PROG_ATYPE_NOSUPP in case address type is not supported. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_address_compare (krb5_context context, const krb5_address * addr1, const krb5_address * addr2)" -.PP -krb5_address_compare compares the addresses addr1 and addr2. Returns TRUE if the two addresses are the same. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIaddr1\fP address to compare -.br -\fIaddr2\fP address to compare -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an TRUE is the address are the same FALSE if not -.RE -.PP - -.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_address_order (krb5_context context, const krb5_address * addr1, const krb5_address * addr2)" -.PP -krb5_address_order compares the addresses addr1 and addr2 so that it can be used for sorting addresses. If the addresses are the same address krb5_address_order will return 0. Behavies like memcmp(2). -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIaddr1\fP krb5_address to compare -.br -\fIaddr2\fP krb5_address to compare -.RE -.PP -\fBReturns:\fP -.RS 4 -< 0 if address addr1 in 'less' then addr2. 0 if addr1 and addr2 is the same address, > 0 if addr2 is 'less' then addr1. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_address_prefixlen_boundary (krb5_context context, const krb5_address * inaddr, unsigned long prefixlen, krb5_address * low, krb5_address * high)" -.PP -Calculate the boundary addresses of `inaddr'/`prefixlen' and store them in `low' and `high'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIinaddr\fP address in prefixlen that the bondery searched -.br -\fIprefixlen\fP width of boundery -.br -\fIlow\fP lowest address -.br -\fIhigh\fP highest address -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_address_search (krb5_context context, const krb5_address * addr, const krb5_addresses * addrlist)" -.PP -krb5_address_search checks if the address addr is a member of the address set list addrlist . -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIaddr\fP address to search for. -.br -\fIaddrlist\fP list of addresses to look in for addr. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_anyaddr (krb5_context context, int af, struct sockaddr * sa, krb5_socklen_t * sa_size, int port)" -.PP -krb5_anyaddr fills in a 'struct sockaddr sa' that can be used to bind(2) to. The argument sa_size should initially contain the size of the sa, and after the call, it will contain the actual length of the address. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIaf\fP address family -.br -\fIsa\fP sockaddr -.br -\fIsa_size\fP lenght of sa. -.br -\fIport\fP for to fill into sa. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_append_addresses (krb5_context context, krb5_addresses * dest, const krb5_addresses * source)" -.PP -krb5_append_addresses adds the set of addresses in source to dest. While copying the addresses, duplicates are also sorted out. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIdest\fP destination of copy operation -.br -\fIsource\fP adresses that are going to be added to dest -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_address (krb5_context context, const krb5_address * inaddr, krb5_address * outaddr)" -.PP -krb5_copy_address copies the content of address inaddr to outaddr. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIinaddr\fP pointer to source address -.br -\fIoutaddr\fP pointer to destination address -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_addresses (krb5_context context, const krb5_addresses * inaddr, krb5_addresses * outaddr)" -.PP -krb5_copy_addresses copies the content of addresses inaddr to outaddr. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIinaddr\fP pointer to source addresses -.br -\fIoutaddr\fP pointer to destination addresses -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_address (krb5_context context, krb5_address * address)" -.PP -krb5_free_address frees the data stored in the address that is alloced with any of the krb5_address functions. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIaddress\fP addresss to be freed. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_addresses (krb5_context context, krb5_addresses * addresses)" -.PP -krb5_free_addresses frees the data stored in the address that is alloced with any of the krb5_address functions. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIaddresses\fP addressses to be freed. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_h_addr2addr (krb5_context context, int af, const char * haddr, krb5_address * addr)" -.PP -krb5_h_addr2addr works like krb5_h_addr2sockaddr with the exception that it operates on a krb5_address instead of a struct sockaddr. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIaf\fP address family -.br -\fIhaddr\fP host address from struct hostent. -.br -\fIaddr\fP returned krb5_address. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_h_addr2sockaddr (krb5_context context, int af, const char * addr, struct sockaddr * sa, krb5_socklen_t * sa_size, int port)" -.PP -krb5_h_addr2sockaddr initializes a 'struct sockaddr sa' from af and the 'struct hostent' (see gethostbyname(3) ) h_addr_list component. The argument sa_size should initially contain the size of the sa, and after the call, it will contain the actual length of the address. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIaf\fP addresses -.br -\fIaddr\fP address -.br -\fIsa\fP returned struct sockaddr -.br -\fIsa_size\fP size of sa -.br -\fIport\fP port to set in sa. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_make_addrport (krb5_context context, krb5_address ** res, const krb5_address * addr, int16_t port)" -.PP -Create an address of type KRB5_ADDRESS_ADDRPORT from (addr, port) -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIres\fP built address from addr/port -.br -\fIaddr\fP address to use -.br -\fIport\fP port to use -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION size_t KRB5_LIB_CALL krb5_max_sockaddr_size (void)" -.PP -krb5_max_sockaddr_size returns the max size of the .Li struct sockaddr that the Kerberos library will return. -.PP -\fBReturns:\fP -.RS 4 -Return an size_t of the maximum struct sockaddr. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_address (krb5_context context, const char * string, krb5_addresses * addresses)" -.PP -krb5_parse_address returns the resolved hostname in string to the krb5_addresses addresses . -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIstring\fP -.br -\fIaddresses\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_print_address (const krb5_address * addr, char * str, size_t len, size_t * ret_len)" -.PP -krb5_print_address prints the address in addr to the string string that have the length len. If ret_len is not NULL, it will be filled with the length of the string if size were unlimited (not including the final NUL) . -.PP -\fBParameters:\fP -.RS 4 -\fIaddr\fP address to be printed -.br -\fIstr\fP pointer string to print the address into -.br -\fIlen\fP length that will fit into area pointed to by 'str'. -.br -\fIret_len\fP return length the str. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_sockaddr2address (krb5_context context, const struct sockaddr * sa, krb5_address * addr)" -.PP -krb5_sockaddr2address stores a address a 'struct sockaddr' sa in the krb5_address addr. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIsa\fP a struct sockaddr to extract the address from -.br -\fIaddr\fP an Kerberos 5 address to store the address in. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_sockaddr2port (krb5_context context, const struct sockaddr * sa, int16_t * port)" -.PP -krb5_sockaddr2port extracts a port (if possible) from a 'struct sockaddr. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIsa\fP a struct sockaddr to extract the port from -.br -\fIport\fP a pointer to an int16_t store the port in. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. Will return KRB5_PROG_ATYPE_NOSUPP in case address type is not supported. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_sockaddr_uninteresting (const struct sockaddr * sa)" -.PP -krb5_sockaddr_uninteresting returns TRUE for all .Fa sa that the kerberos library thinks are uninteresting. One example are link local addresses. -.PP -\fBParameters:\fP -.RS 4 -\fIsa\fP pointer to struct sockaddr that might be interesting. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return a non zero for uninteresting addresses. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_compare.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_compare.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_compare.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_order.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_order.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_order.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_prefixlen_boundary.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_prefixlen_boundary.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_prefixlen_boundary.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_search.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_search.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_address_search.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_allow_weak_crypto.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_allow_weak_crypto.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_allow_weak_crypto.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_anyaddr.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_anyaddr.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_anyaddr.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_append_addresses.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_append_addresses.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_append_addresses.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_auth.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_auth.3 deleted file mode 100644 index eee7d12d701..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_auth.3 +++ /dev/null @@ -1,138 +0,0 @@ -.TH "Heimdal Kerberos 5 authentication functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 authentication functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_rd_req_in_ctx_alloc\fP (krb5_context context, krb5_rd_req_in_ctx *ctx)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_rd_req_in_set_keytab\fP (krb5_context context, krb5_rd_req_in_ctx in, krb5_keytab keytab)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_rd_req_in_set_pac_check\fP (krb5_context context, krb5_rd_req_in_ctx in, krb5_boolean flag)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_rd_req_out_get_server\fP (krb5_context context, krb5_rd_req_out_ctx out, krb5_principal *principal)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_rd_req_out_ctx_free\fP (krb5_context context, krb5_rd_req_out_ctx ctx)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_rd_req_ctx\fP (krb5_context context, krb5_auth_context *auth_context, const krb5_data *inbuf, krb5_const_principal server, krb5_rd_req_in_ctx inctx, krb5_rd_req_out_ctx *outctx)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_ctx (krb5_context context, krb5_auth_context * auth_context, const krb5_data * inbuf, krb5_const_principal server, krb5_rd_req_in_ctx inctx, krb5_rd_req_out_ctx * outctx)" -.PP -The core server function that verify application authentication requests from clients. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Keberos 5 context. -.br -\fIauth_context\fP the authentication context, can be NULL, then default values for the authentication context will used. -.br -\fIinbuf\fP the (AP-REQ) authentication buffer -.br -\fIserver\fP the server with authenticate as, if NULL the function will try to find any available credential in the keytab that will verify the reply. The function will prefer the server the server client specified in the AP-REQ, but if there is no mach, it will try all keytab entries for a match. This have serious performance issues for larger keytabs. -.br -\fIinctx\fP control the behavior of the function, if NULL, the default behavior is used. -.br -\fIoutctx\fP the return outctx, free with \fBkrb5_rd_req_out_ctx_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Kerberos 5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_ctx_alloc (krb5_context context, krb5_rd_req_in_ctx * ctx)" -.PP -Allocate a krb5_rd_req_in_ctx as an input parameter to \fBkrb5_rd_req_ctx()\fP. The caller should free the context with krb5_rd_req_in_ctx_free() when done with the context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Keberos 5 context. -.br -\fIctx\fP in ctx to \fBkrb5_rd_req_ctx()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Kerberos 5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_set_keytab (krb5_context context, krb5_rd_req_in_ctx in, krb5_keytab keytab)" -.PP -Set the keytab that \fBkrb5_rd_req_ctx()\fP will use. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Keberos 5 context. -.br -\fIin\fP in ctx to \fBkrb5_rd_req_ctx()\fP. -.br -\fIkeytab\fP keytab that \fBkrb5_rd_req_ctx()\fP will use, only copy the pointer, so the caller must free they keytab after krb5_rd_req_in_ctx_free() is called. -.RE -.PP -\fBReturns:\fP -.RS 4 -Kerberos 5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_in_set_pac_check (krb5_context context, krb5_rd_req_in_ctx in, krb5_boolean flag)" -.PP -Set if krb5_rq_red() is going to check the Windows PAC or not -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Keberos 5 context. -.br -\fIin\fP krb5_rd_req_in_ctx to check the option on. -.br -\fIflag\fP flag to select if to check the pac (TRUE) or not (FALSE). -.RE -.PP -\fBReturns:\fP -.RS 4 -Kerberos 5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_rd_req_out_ctx_free (krb5_context context, krb5_rd_req_out_ctx ctx)" -.PP -Free the krb5_rd_req_out_ctx. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Keberos 5 context. -.br -\fIctx\fP krb5_rd_req_out_ctx context to free. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_rd_req_out_get_server (krb5_context context, krb5_rd_req_out_ctx out, krb5_principal * principal)" -.PP -Get the principal that was used in the request from the client. Might not match whats in the ticket if \fBkrb5_rd_req_ctx()\fP searched in the keytab for a matching key. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context. -.br -\fIout\fP a krb5_rd_req_out_ctx from \fBkrb5_rd_req_ctx()\fP. -.br -\fIprincipal\fP return principal, free with \fBkrb5_free_principal()\fP. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_auth_getremoteseqnumber.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_auth_getremoteseqnumber.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_auth_getremoteseqnumber.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_build_principal.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_build_principal.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_build_principal.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_c_enctype_compare.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_c_enctype_compare.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_c_enctype_compare.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_end_seq_get.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_end_seq_get.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_end_seq_get.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_get_first.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_get_first.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_get_first.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_match.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_match.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_match.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_next.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_next.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_cache_next.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_clear_mcred.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_clear_mcred.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_clear_mcred.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_close.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_close.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_close.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_cache.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_cache.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_cache.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_creds.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_creds.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_creds.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_match_f.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_match_f.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_copy_match_f.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_default.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_default.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_default.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_default_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_default_name.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_default_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_destroy.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_destroy.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_destroy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_end_seq_get.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_end_seq_get.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_end_seq_get.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_gen_new.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_gen_new.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_gen_new.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_config.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_config.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_config.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_flags.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_flags.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_friendly_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_friendly_name.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_friendly_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_full_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_full_name.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_full_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_kdc_offset.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_kdc_offset.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_kdc_offset.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_lifetime.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_lifetime.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_lifetime.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_name.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_ops.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_ops.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_ops.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_prefix_ops.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_prefix_ops.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_prefix_ops.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_principal.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_principal.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_principal.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_type.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_type.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_type.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_version.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_version.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_get_version.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_initialize.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_initialize.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_initialize.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_last_change_time.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_last_change_time.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_last_change_time.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_move.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_move.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_move.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_new_unique.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_new_unique.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_new_unique.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_next_cred.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_next_cred.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_next_cred.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_register.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_register.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_register.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_remove_cred.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_remove_cred.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_remove_cred.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_resolve.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_resolve.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_resolve.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_retrieve_cred.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_retrieve_cred.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_retrieve_cred.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_config.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_config.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_config.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_default_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_default_name.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_default_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_flags.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_flags.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_friendly_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_friendly_name.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_friendly_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_kdc_offset.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_kdc_offset.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_set_kdc_offset.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_start_seq_get.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_start_seq_get.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_start_seq_get.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_store_cred.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_store_cred.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_store_cred.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_support_switch.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_support_switch.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_support_switch.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_switch.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_switch.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cc_switch.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ccache.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ccache.3 deleted file mode 100644 index 97e364d7e3d..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ccache.3 +++ /dev/null @@ -1,888 +0,0 @@ -.TH "Heimdal Kerberos 5 credential cache functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 credential cache functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_register\fP (krb5_context context, const krb5_cc_ops *ops, krb5_boolean override)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_resolve\fP (krb5_context context, const char *name, krb5_ccache *id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_new_unique\fP (krb5_context context, const char *type, const char *hint, krb5_ccache *id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_cc_get_name\fP (krb5_context context, krb5_ccache id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_cc_get_type\fP (krb5_context context, krb5_ccache id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_full_name\fP (krb5_context context, krb5_ccache id, char **str)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const krb5_cc_ops *KRB5_LIB_CALL \fBkrb5_cc_get_ops\fP (krb5_context context, krb5_ccache id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_switch\fP (krb5_context context, krb5_ccache id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_cc_support_switch\fP (krb5_context context, const char *type)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_set_default_name\fP (krb5_context context, const char *name)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_cc_default_name\fP (krb5_context context)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_default\fP (krb5_context context, krb5_ccache *id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_initialize\fP (krb5_context context, krb5_ccache id, krb5_principal primary_principal)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_destroy\fP (krb5_context context, krb5_ccache id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_close\fP (krb5_context context, krb5_ccache id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_store_cred\fP (krb5_context context, krb5_ccache id, krb5_creds *creds)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_retrieve_cred\fP (krb5_context context, krb5_ccache id, krb5_flags whichfields, const krb5_creds *mcreds, krb5_creds *creds)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_principal\fP (krb5_context context, krb5_ccache id, krb5_principal *principal)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_start_seq_get\fP (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_next_cred\fP (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor, krb5_creds *creds)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_end_seq_get\fP (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_remove_cred\fP (krb5_context context, krb5_ccache id, krb5_flags which, krb5_creds *cred)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_set_flags\fP (krb5_context context, krb5_ccache id, krb5_flags flags)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_flags\fP (krb5_context context, krb5_ccache id, krb5_flags *flags)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_copy_match_f\fP (krb5_context context, const krb5_ccache from, krb5_ccache to, krb5_boolean(*match)(krb5_context, void *, const krb5_creds *), void *matchctx, unsigned int *matched)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_copy_cache\fP (krb5_context context, const krb5_ccache from, krb5_ccache to)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_version\fP (krb5_context context, const krb5_ccache id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_cc_clear_mcred\fP (krb5_creds *mcred)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const krb5_cc_ops *KRB5_LIB_CALL \fBkrb5_cc_get_prefix_ops\fP (krb5_context context, const char *prefix)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_cache_get_first\fP (krb5_context context, const char *type, krb5_cc_cache_cursor *cursor)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_cache_next\fP (krb5_context context, krb5_cc_cache_cursor cursor, krb5_ccache *id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_cache_end_seq_get\fP (krb5_context context, krb5_cc_cache_cursor cursor)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_cache_match\fP (krb5_context context, krb5_principal client, krb5_ccache *id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_move\fP (krb5_context context, krb5_ccache from, krb5_ccache to)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_is_config_principal\fP (krb5_context context, krb5_const_principal principal)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_set_config\fP (krb5_context context, krb5_ccache id, krb5_const_principal principal, const char *name, krb5_data *data)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_config\fP (krb5_context context, krb5_ccache id, krb5_const_principal principal, const char *name, krb5_data *data)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cccol_cursor_new\fP (krb5_context context, krb5_cccol_cursor *cursor)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cccol_cursor_next\fP (krb5_context context, krb5_cccol_cursor cursor, krb5_ccache *cache)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cccol_cursor_free\fP (krb5_context context, krb5_cccol_cursor *cursor)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_last_change_time\fP (krb5_context context, krb5_ccache id, krb5_timestamp *mtime)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cccol_last_change_time\fP (krb5_context context, const char *type, krb5_timestamp *mtime)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_friendly_name\fP (krb5_context context, krb5_ccache id, char **name)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_set_friendly_name\fP (krb5_context context, krb5_ccache id, const char *name)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_lifetime\fP (krb5_context context, krb5_ccache id, time_t *t)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_set_kdc_offset\fP (krb5_context context, krb5_ccache id, krb5_deltat offset)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_kdc_offset\fP (krb5_context context, krb5_ccache id, krb5_deltat *offset)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_gen_new\fP (krb5_context context, const krb5_cc_ops *ops, krb5_ccache *id) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_copy_creds\fP (krb5_context context, const krb5_ccache from, krb5_ccache to)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_validated_creds\fP (krb5_context context, krb5_creds *creds, krb5_principal client, krb5_ccache ccache, char *service)" -.br -.in -1c -.SS "Variables" - -.in +1c -.ti -1c -.RI "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_acc_ops\fP" -.br -.ti -1c -.RI "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_fcc_ops\fP" -.br -.ti -1c -.RI "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_mcc_ops\fP" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_end_seq_get (krb5_context context, krb5_cc_cache_cursor cursor)" -.PP -Destroy the cursor `cursor'. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_get_first (krb5_context context, const char * type, krb5_cc_cache_cursor * cursor)" -.PP -Start iterating over all caches of specified type. See also \fBkrb5_cccol_cursor_new()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context -.br -\fItype\fP optional type to iterate over, if NULL, the default cache is used. -.br -\fIcursor\fP cursor should be freed with \fBkrb5_cc_cache_end_seq_get()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_match (krb5_context context, krb5_principal client, krb5_ccache * id)" -.PP -Search for a matching credential cache that have the `principal' as the default principal. On success, `id' needs to be freed with \fBkrb5_cc_close()\fP or \fBkrb5_cc_destroy()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context -.br -\fIclient\fP The principal to search for -.br -\fIid\fP the returned credential cache -.RE -.PP -\fBReturns:\fP -.RS 4 -On failure, error code is returned and `id' is set to NULL. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_next (krb5_context context, krb5_cc_cache_cursor cursor, krb5_ccache * id)" -.PP -Retrieve the next cache pointed to by (`cursor') in `id' and advance `cursor'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context -.br -\fIcursor\fP the iterator cursor, returned by \fBkrb5_cc_cache_get_first()\fP -.br -\fIid\fP next ccache -.RE -.PP -\fBReturns:\fP -.RS 4 -Return 0 or an error code. Returns KRB5_CC_END when the end of caches is reached, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_cc_clear_mcred (krb5_creds * mcred)" -.PP -Clear `mcreds' so it can be used with krb5_cc_retrieve_cred -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_close (krb5_context context, krb5_ccache id)" -.PP -Stop using the ccache `id' and free the related resources. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_copy_cache (krb5_context context, const krb5_ccache from, krb5_ccache to)" -.PP -Just like \fBkrb5_cc_copy_match_f()\fP, but copy everything. -.PP -@ -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_copy_creds (krb5_context context, const krb5_ccache from, krb5_ccache to)" -.PP -MIT compat glue -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_copy_match_f (krb5_context context, const krb5_ccache from, krb5_ccache to, krb5_boolean(*)(krb5_context, void *, const krb5_creds *) match, void * matchctx, unsigned int * matched)" -.PP -Copy the contents of `from' to `to' if the given match function return true. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIfrom\fP the cache to copy data from. -.br -\fIto\fP the cache to copy data to. -.br -\fImatch\fP a match function that should return TRUE if cred argument should be copied, if NULL, all credentials are copied. -.br -\fImatchctx\fP context passed to match function. -.br -\fImatched\fP set to true if there was a credential that matched, may be NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_default (krb5_context context, krb5_ccache * id)" -.PP -Open the default ccache in `id'. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_cc_default_name (krb5_context context)" -.PP -Return a pointer to a context static string containing the default ccache name. -.PP -\fBReturns:\fP -.RS 4 -String to the default credential cache name. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_destroy (krb5_context context, krb5_ccache id)" -.PP -Remove the ccache `id'. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_end_seq_get (krb5_context context, const krb5_ccache id, krb5_cc_cursor * cursor)" -.PP -Destroy the cursor `cursor'. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_gen_new (krb5_context context, const krb5_cc_ops * ops, krb5_ccache * id)" -.PP -Generate a new ccache of type `ops' in `id'. -.PP -Deprecated: use \fBkrb5_cc_new_unique()\fP instead. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_config (krb5_context context, krb5_ccache id, krb5_const_principal principal, const char * name, krb5_data * data)" -.PP -Get some configuration for the credential cache in the cache. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIid\fP the credential cache to store the data for -.br -\fIprincipal\fP configuration for a specific principal, if NULL, global for the whole cache. -.br -\fIname\fP name under which the configuraion is stored. -.br -\fIdata\fP data to fetched, free with \fBkrb5_data_free()\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_flags (krb5_context context, krb5_ccache id, krb5_flags * flags)" -.PP -Get the flags of `id', store them in `flags'. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_friendly_name (krb5_context context, krb5_ccache id, char ** name)" -.PP -Return a friendly name on credential cache. Free the result with krb5_xfree(). -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_full_name (krb5_context context, krb5_ccache id, char ** str)" -.PP -Return the complete resolvable name the cache -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIid\fP return pointer to a found credential cache -.br -\fIstr\fP the returned name of a credential cache, free with krb5_xfree() -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 or an error (and then *str is set to NULL). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_kdc_offset (krb5_context context, krb5_ccache id, krb5_deltat * offset)" -.PP -Get the time offset betwen the client and the KDC -.PP -If the backend doesn't support KDC offset, use the context global setting. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIid\fP a credential cache -.br -\fIoffset\fP the offset in seconds -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_lifetime (krb5_context context, krb5_ccache id, time_t * t)" -.PP -Get the lifetime of the initial ticket in the cache -.PP -Get the lifetime of the initial ticket in the cache, if the initial ticket was not found, the error code KRB5_CC_END is returned. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIid\fP a credential cache -.br -\fIt\fP the relative lifetime of the initial ticket -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_cc_get_name (krb5_context context, krb5_ccache id)" -.PP -Return the name of the ccache `id' -.SS "KRB5_LIB_FUNCTION const krb5_cc_ops* KRB5_LIB_CALL krb5_cc_get_ops (krb5_context context, krb5_ccache id)" -.PP -Return krb5_cc_ops of a the ccache `id'. -.SS "KRB5_LIB_FUNCTION const krb5_cc_ops* KRB5_LIB_CALL krb5_cc_get_prefix_ops (krb5_context context, const char * prefix)" -.PP -Get the cc ops that is registered in `context' to handle the prefix. prefix can be a complete credential cache name or a prefix, the function will only use part up to the first colon (:) if there is one. If prefix the argument is NULL, the default ccache implemtation is returned. -.PP -\fBReturns:\fP -.RS 4 -Returns NULL if ops not found. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_principal (krb5_context context, krb5_ccache id, krb5_principal * principal)" -.PP -Return the principal of `id' in `principal'. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_cc_get_type (krb5_context context, krb5_ccache id)" -.PP -Return the type of the ccache `id'. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_version (krb5_context context, const krb5_ccache id)" -.PP -Return the version of `id'. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_initialize (krb5_context context, krb5_ccache id, krb5_principal primary_principal)" -.PP -Create a new ccache in `id' for `primary_principal'. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_last_change_time (krb5_context context, krb5_ccache id, krb5_timestamp * mtime)" -.PP -Return the last time the credential cache was modified. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context -.br -\fIid\fP The credential cache to probe -.br -\fImtime\fP the last modification time, set to 0 on error. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return 0 or and error. See krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_move (krb5_context context, krb5_ccache from, krb5_ccache to)" -.PP -Move the content from one credential cache to another. The operation is an atomic switch. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIfrom\fP the credential cache to move the content from -.br -\fIto\fP the credential cache to move the content to -.RE -.PP -\fBReturns:\fP -.RS 4 -On sucess, from is freed. On failure, error code is returned and from and to are both still allocated, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_new_unique (krb5_context context, const char * type, const char * hint, krb5_ccache * id)" -.PP -Generates a new unique ccache of `type` in `id'. If `type' is NULL, the library chooses the default credential cache type. The supplied `hint' (that can be NULL) is a string that the credential cache type can use to base the name of the credential on, this is to make it easier for the user to differentiate the credentials. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_next_cred (krb5_context context, const krb5_ccache id, krb5_cc_cursor * cursor, krb5_creds * creds)" -.PP -Retrieve the next cred pointed to by (`id', `cursor') in `creds' and advance `cursor'. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_register (krb5_context context, const krb5_cc_ops * ops, krb5_boolean override)" -.PP -Add a new ccache type with operations `ops', overwriting any existing one if `override'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIops\fP type of plugin symbol -.br -\fIoverride\fP flag to select if the registration is to overide an existing ops with the same name. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_remove_cred (krb5_context context, krb5_ccache id, krb5_flags which, krb5_creds * cred)" -.PP -Remove the credential identified by `cred', `which' from `id'. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_resolve (krb5_context context, const char * name, krb5_ccache * id)" -.PP -Find and allocate a ccache in `id' from the specification in `residual'. If the ccache name doesn't contain any colon, interpret it as a file name. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIname\fP string name of a credential cache. -.br -\fIid\fP return pointer to a found credential cache. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return 0 or an error code. In case of an error, id is set to NULL, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_retrieve_cred (krb5_context context, krb5_ccache id, krb5_flags whichfields, const krb5_creds * mcreds, krb5_creds * creds)" -.PP -Retrieve the credential identified by `mcreds' (and `whichfields') from `id' in `creds'. 'creds' must be free by the caller using krb5_free_cred_contents. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context -.br -\fIid\fP a Kerberos 5 credential cache -.br -\fIwhichfields\fP what fields to use for matching credentials, same flags as whichfields in \fBkrb5_compare_creds()\fP -.br -\fImcreds\fP template credential to use for comparing -.br -\fIcreds\fP returned credential, free with \fBkrb5_free_cred_contents()\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_config (krb5_context context, krb5_ccache id, krb5_const_principal principal, const char * name, krb5_data * data)" -.PP -Store some configuration for the credential cache in the cache. Existing configuration under the same name is over-written. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIid\fP the credential cache to store the data for -.br -\fIprincipal\fP configuration for a specific principal, if NULL, global for the whole cache. -.br -\fIname\fP name under which the configuraion is stored. -.br -\fIdata\fP data to store, if NULL, configure is removed. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_default_name (krb5_context context, const char * name)" -.PP -Set the default cc name for `context' to `name'. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_flags (krb5_context context, krb5_ccache id, krb5_flags flags)" -.PP -Set the flags of `id' to `flags'. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_friendly_name (krb5_context context, krb5_ccache id, const char * name)" -.PP -Set the friendly name on credential cache. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_kdc_offset (krb5_context context, krb5_ccache id, krb5_deltat offset)" -.PP -Set the time offset betwen the client and the KDC -.PP -If the backend doesn't support KDC offset, use the context global setting. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIid\fP a credential cache -.br -\fIoffset\fP the offset in seconds -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_start_seq_get (krb5_context context, const krb5_ccache id, krb5_cc_cursor * cursor)" -.PP -Start iterating over `id', `cursor' is initialized to the beginning. Caller must free the cursor with \fBkrb5_cc_end_seq_get()\fP. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_store_cred (krb5_context context, krb5_ccache id, krb5_creds * creds)" -.PP -Store `creds' in the ccache `id'. -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_cc_support_switch (krb5_context context, const char * type)" -.PP -Return true if the default credential cache support switch -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_switch (krb5_context context, krb5_ccache id)" -.PP -Switch the default default credential cache for a specific credcache type (and name for some implementations). -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_cursor_free (krb5_context context, krb5_cccol_cursor * cursor)" -.PP -End an iteration and free all resources, can be done before end is reached. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context -.br -\fIcursor\fP the iteration cursor to be freed. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return 0 or and error, KRB5_CC_END is returned at the end of iteration. See krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_cursor_new (krb5_context context, krb5_cccol_cursor * cursor)" -.PP -Get a new cache interation cursor that will interate over all credentials caches independent of type. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIcursor\fP passed into \fBkrb5_cccol_cursor_next()\fP and free with \fBkrb5_cccol_cursor_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 or and error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_cursor_next (krb5_context context, krb5_cccol_cursor cursor, krb5_ccache * cache)" -.PP -Get next credential cache from the iteration. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context -.br -\fIcursor\fP the iteration cursor -.br -\fIcache\fP the returned cursor, pointer is set to NULL on failure and a cache on success. The returned cache needs to be freed with \fBkrb5_cc_close()\fP or destroyed with \fBkrb5_cc_destroy()\fP. MIT Kerberos behavies slightly diffrent and sets cache to NULL when all caches are iterated over and return 0. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return 0 or and error, KRB5_CC_END is returned at the end of iteration. See krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_last_change_time (krb5_context context, const char * type, krb5_timestamp * mtime)" -.PP -Return the last modfication time for a cache collection. The query can be limited to a specific cache type. If the function return 0 and mtime is 0, there was no credentials in the caches. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context -.br -\fItype\fP The credential cache to probe, if NULL, all type are traversed. -.br -\fImtime\fP the last modification time, set to 0 on error. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return 0 or and error. See krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_validated_creds (krb5_context context, krb5_creds * creds, krb5_principal client, krb5_ccache ccache, char * service)" -.PP -Validate the newly fetch credential, see also krb5_verify_init_creds(). -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIcreds\fP the credentials to verify -.br -\fIclient\fP the client name to match up -.br -\fIccache\fP the credential cache to use -.br -\fIservice\fP a service name to use, used with \fBkrb5_sname_to_principal()\fP to build a hostname to use to verify. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_is_config_principal (krb5_context context, krb5_const_principal principal)" -.PP -Return TRUE (non zero) if the principal is a configuration principal (generated part of \fBkrb5_cc_set_config()\fP). Returns FALSE (zero) if not a configuration principal. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIprincipal\fP principal to check if it a configuration principal -.RE -.PP - -.SH "Variable Documentation" -.PP -.SS "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_acc_ops\fP" -.PP -\fBInitial value:\fP -.PP -.nf - { - KRB5_CC_OPS_VERSION, - 'API', - acc_get_name, - acc_resolve, - acc_gen_new, - acc_initialize, - acc_destroy, - acc_close, - acc_store_cred, - NULL, - acc_get_principal, - acc_get_first, - acc_get_next, - acc_end_get, - acc_remove_cred, - acc_set_flags, - acc_get_version, - acc_get_cache_first, - acc_get_cache_next, - acc_end_cache_get, - acc_move, - acc_get_default_name, - acc_set_default, - acc_lastchange, - NULL, - NULL, -} -.fi -Variable containing the API based credential cache implemention. -.SS "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_fcc_ops\fP" -.PP -\fBInitial value:\fP -.PP -.nf - { - KRB5_CC_OPS_VERSION, - 'FILE', - fcc_get_name, - fcc_resolve, - fcc_gen_new, - fcc_initialize, - fcc_destroy, - fcc_close, - fcc_store_cred, - NULL, - fcc_get_principal, - fcc_get_first, - fcc_get_next, - fcc_end_get, - fcc_remove_cred, - fcc_set_flags, - fcc_get_version, - fcc_get_cache_first, - fcc_get_cache_next, - fcc_end_cache_get, - fcc_move, - fcc_get_default_name, - NULL, - fcc_lastchange, - fcc_set_kdc_offset, - fcc_get_kdc_offset -} -.fi -Variable containing the FILE based credential cache implemention. -.SS "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_mcc_ops\fP" -.PP -\fBInitial value:\fP -.PP -.nf - { - KRB5_CC_OPS_VERSION, - 'MEMORY', - mcc_get_name, - mcc_resolve, - mcc_gen_new, - mcc_initialize, - mcc_destroy, - mcc_close, - mcc_store_cred, - NULL, - mcc_get_principal, - mcc_get_first, - mcc_get_next, - mcc_end_get, - mcc_remove_cred, - mcc_set_flags, - NULL, - mcc_get_cache_first, - mcc_get_cache_next, - mcc_end_cache_get, - mcc_move, - mcc_default_name, - NULL, - mcc_lastchange, - mcc_set_kdc_offset, - mcc_get_kdc_offset -} -.fi -Variable containing the MEMORY based credential cache implemention. diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ccache_intro.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ccache_intro.3 deleted file mode 100644 index 15712683345..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ccache_intro.3 +++ /dev/null @@ -1,69 +0,0 @@ -.TH "krb5_ccache_intro" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -krb5_ccache_intro \- The credential cache functions -.SH "Kerberos credential caches" -.PP -krb5_ccache structure holds a Kerberos credential cache. -.PP -Heimdal support the follow types of credential caches: -.PP -.IP "\(bu" 2 -SCC Store the credential in a database -.IP "\(bu" 2 -FILE Store the credential in memory -.IP "\(bu" 2 -MEMORY Store the credential in memory -.IP "\(bu" 2 -API A credential cache server based solution for Mac OS X -.IP "\(bu" 2 -KCM A credential cache server based solution for all platforms -.PP -.SS "Example" -This is a minimalistic version of klist: -.PP -.nf -#include - -int -main (int argc, char **argv) -{ - krb5_context context; - krb5_cc_cursor cursor; - krb5_error_code ret; - krb5_ccache id; - krb5_creds creds; - - if (krb5_init_context (&context) != 0) - errx(1, 'krb5_context'); - - ret = krb5_cc_default (context, &id); - if (ret) - krb5_err(context, 1, ret, 'krb5_cc_default'); - - ret = krb5_cc_start_seq_get(context, id, &cursor); - if (ret) - krb5_err(context, 1, ret, 'krb5_cc_start_seq_get'); - - while((ret = krb5_cc_next_cred(context, id, &cursor, &creds)) == 0){ - char *principal; - - krb5_unparse_name(context, creds.server, &principal); - printf('principal: %s\\n', principal); - free(principal); - krb5_free_cred_contents (context, &creds); - } - ret = krb5_cc_end_seq_get(context, id, &cursor); - if (ret) - krb5_err(context, 1, ret, 'krb5_cc_end_seq_get'); - - krb5_cc_close(context, id); - - krb5_free_context(context); - return 0; -} - -.fi -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_free.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_free.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_new.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_new.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_new.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_next.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_next.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_cursor_next.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_last_change_time.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_last_change_time.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cccol_last_change_time.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_change_password.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_change_password.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_change_password.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cksumtype_to_enctype.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cksumtype_to_enctype.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_cksumtype_to_enctype.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_clear_error_message.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_clear_error_message.3 deleted file mode 100644 index f721fda2cd4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_clear_error_message.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_error.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_clear_error_string.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_clear_error_string.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_clear_error_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_compare_creds.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_compare_creds.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_compare_creds.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_file_free.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_file_free.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_file_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_free_strings.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_free_strings.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_free_strings.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_bool.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_bool.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_bool.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_bool_default.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_bool_default.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_bool_default.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_list.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_list.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_list.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_string.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_string.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_string_default.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_string_default.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_string_default.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_strings.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_strings.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_strings.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_time.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_time.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_time.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_time_default.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_time_default.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_get_time_default.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_parse_file_multi.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_parse_file_multi.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_parse_file_multi.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_parse_string_multi.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_parse_string_multi.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_parse_string_multi.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_bool.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_bool.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_bool.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_bool_default.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_bool_default.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_bool_default.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_list.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_list.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_list.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_string.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_string.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_string_default.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_string_default.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_string_default.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_strings.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_strings.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_strings.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_time.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_time.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_time.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_time_default.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_time_default.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_config_vget_time_default.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_address.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_address.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_address.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_addresses.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_addresses.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_addresses.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_context.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_context.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_context.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_creds.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_creds.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_creds.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_creds_contents.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_creds_contents.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_creds_contents.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_data.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_data.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_host_realm.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_host_realm.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_host_realm.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_keyblock.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_keyblock.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_keyblock.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_keyblock_contents.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_keyblock_contents.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_keyblock_contents.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_principal.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_principal.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_principal.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_ticket.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_ticket.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_copy_ticket.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_create_checksum_iov.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_create_checksum_iov.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_create_checksum_iov.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_credential.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_credential.3 deleted file mode 100644 index 736d9637ebd..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_credential.3 +++ /dev/null @@ -1,279 +0,0 @@ -.TH "Heimdal Kerberos 5 credential handing functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 credential handing functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_fwd_tgt_creds\fP (krb5_context context, krb5_auth_context auth_context, const char *hostname, krb5_principal client, krb5_principal server, krb5_ccache ccache, int forwardable, krb5_data *out_data)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_forwarded_creds\fP (krb5_context context, krb5_auth_context auth_context, krb5_ccache ccache, krb5_flags flags, const char *hostname, krb5_creds *in_creds, krb5_data *out_data)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_init_creds_opt_alloc\fP (krb5_context context, krb5_get_init_creds_opt **opt)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_get_init_creds_opt_free\fP (krb5_context context, krb5_get_init_creds_opt *opt)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_init\fP (krb5_context context, krb5_principal client, krb5_prompter_fct prompter, void *prompter_data, krb5_deltat start_time, krb5_get_init_creds_opt *options, krb5_init_creds_context *rctx)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_set_service\fP (krb5_context context, krb5_init_creds_context ctx, const char *service)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_set_password\fP (krb5_context context, krb5_init_creds_context ctx, const char *password)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_set_keytab\fP (krb5_context context, krb5_init_creds_context ctx, krb5_keytab keytab)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_step\fP (krb5_context context, krb5_init_creds_context ctx, krb5_data *in, krb5_data *out, krb5_krbhst_info *hostinfo, unsigned int *flags)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_get_error\fP (krb5_context context, krb5_init_creds_context ctx, KRB_ERROR *error)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_init_creds_free\fP (krb5_context context, krb5_init_creds_context ctx)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_get\fP (krb5_context context, krb5_init_creds_context ctx)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_init_creds_password\fP (krb5_context context, krb5_creds *creds, krb5_principal client, const char *password, krb5_prompter_fct prompter, void *data, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *options)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_init_creds_keyblock\fP (krb5_context context, krb5_creds *creds, krb5_principal client, krb5_keyblock *keyblock, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *options)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_init_creds_keytab\fP (krb5_context context, krb5_creds *creds, krb5_principal client, krb5_keytab keytab, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *options)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_fwd_tgt_creds (krb5_context context, krb5_auth_context auth_context, const char * hostname, krb5_principal client, krb5_principal server, krb5_ccache ccache, int forwardable, krb5_data * out_data)" -.PP -Forward credentials for client to host hostname , making them forwardable if forwardable, and returning the blob of data to sent in out_data. If hostname == NULL, pick it from server. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A kerberos 5 context. -.br -\fIauth_context\fP the auth context with the key to encrypt the out_data. -.br -\fIhostname\fP the host to forward the tickets too. -.br -\fIclient\fP the client to delegate from. -.br -\fIserver\fP the server to delegate the credential too. -.br -\fIccache\fP credential cache to use. -.br -\fIforwardable\fP make the forwarded ticket forwabledable. -.br -\fIout_data\fP the resulting credential. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_forwarded_creds (krb5_context context, krb5_auth_context auth_context, krb5_ccache ccache, krb5_flags flags, const char * hostname, krb5_creds * in_creds, krb5_data * out_data)" -.PP -Gets tickets forwarded to hostname. If the tickets that are forwarded are address-less, the forwarded tickets will also be address-less. -.PP -If the ticket have any address, hostname will be used for figure out the address to forward the ticket too. This since this might use DNS, its insecure and also doesn't represent configured all addresses of the host. For example, the host might have two adresses, one IPv4 and one IPv6 address where the later is not published in DNS. This IPv6 address might be used communications and thus the resulting ticket useless. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A kerberos 5 context. -.br -\fIauth_context\fP the auth context with the key to encrypt the out_data. -.br -\fIccache\fP credential cache to use -.br -\fIflags\fP the flags to control the resulting ticket flags -.br -\fIhostname\fP the host to forward the tickets too. -.br -\fIin_creds\fP the in client and server ticket names. The client and server components forwarded to the remote host. -.br -\fIout_data\fP the resulting credential. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.PP -Some older of the MIT gssapi library used clear-text tickets (warped inside AP-REQ encryption), use the krb5_auth_context flag KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED to support those tickets. The session key is used otherwise to encrypt the forwarded ticket. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_keyblock (krb5_context context, krb5_creds * creds, krb5_principal client, krb5_keyblock * keyblock, krb5_deltat start_time, const char * in_tkt_service, krb5_get_init_creds_opt * options)" -.PP -Get new credentials using keyblock. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_keytab (krb5_context context, krb5_creds * creds, krb5_principal client, krb5_keytab keytab, krb5_deltat start_time, const char * in_tkt_service, krb5_get_init_creds_opt * options)" -.PP -Get new credentials using keytab. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_opt_alloc (krb5_context context, krb5_get_init_creds_opt ** opt)" -.PP -Allocate a new krb5_get_init_creds_opt structure, free with \fBkrb5_get_init_creds_opt_free()\fP. -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_get_init_creds_opt_free (krb5_context context, krb5_get_init_creds_opt * opt)" -.PP -Free krb5_get_init_creds_opt structure. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_password (krb5_context context, krb5_creds * creds, krb5_principal client, const char * password, krb5_prompter_fct prompter, void * data, krb5_deltat start_time, const char * in_tkt_service, krb5_get_init_creds_opt * options)" -.PP -Get new credentials using password. -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_init_creds_free (krb5_context context, krb5_init_creds_context ctx)" -.PP -Free the krb5_init_creds_context allocated by \fBkrb5_init_creds_init()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIctx\fP The krb5_init_creds_context to free. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_get (krb5_context context, krb5_init_creds_context ctx)" -.PP -Get new credentials as setup by the krb5_init_creds_context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIctx\fP The krb5_init_creds_context to process. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_get_error (krb5_context context, krb5_init_creds_context ctx, KRB_ERROR * error)" -.PP -Get the last error from the transaction. -.PP -\fBReturns:\fP -.RS 4 -Returns 0 or an error code -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_init (krb5_context context, krb5_principal client, krb5_prompter_fct prompter, void * prompter_data, krb5_deltat start_time, krb5_get_init_creds_opt * options, krb5_init_creds_context * rctx)" -.PP -Start a new context to get a new initial credential. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIclient\fP The Kerberos principal to get the credential for, if NULL is given, the default principal is used as determined by krb5_get_default_principal(). -.br -\fIprompter\fP -.br -\fIprompter_data\fP -.br -\fIstart_time\fP the time the ticket should start to be valid or 0 for now. -.br -\fIoptions\fP a options structure, can be NULL for default options. -.br -\fIrctx\fP A new allocated free with \fBkrb5_init_creds_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success or an Kerberos 5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_set_keytab (krb5_context context, krb5_init_creds_context ctx, krb5_keytab keytab)" -.PP -Set the keytab to use for authentication. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context. -.br -\fIctx\fP ctx krb5_init_creds_context context. -.br -\fIkeytab\fP the keytab to read the key from. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_set_password (krb5_context context, krb5_init_creds_context ctx, const char * password)" -.PP -Sets the password that will use for the request. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context. -.br -\fIctx\fP ctx krb5_init_creds_context context. -.br -\fIpassword\fP the password to use. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_set_service (krb5_context context, krb5_init_creds_context ctx, const char * service)" -.PP -Sets the service that the is requested. This call is only neede for special initial tickets, by default the a krbtgt is fetched in the default realm. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context. -.br -\fIctx\fP a krb5_init_creds_context context. -.br -\fIservice\fP the service given as a string, for example 'kadmind/admin'. If NULL, the default krbtgt in the clients realm is set. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_step (krb5_context context, krb5_init_creds_context ctx, krb5_data * in, krb5_data * out, krb5_krbhst_info * hostinfo, unsigned int * flags)" -.PP -The core loop if krb5_get_init_creds() function family. Create the packets and have the caller send them off to the KDC. -.PP -If the caller want all work been done for them, use \fBkrb5_init_creds_get()\fP instead. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context. -.br -\fIctx\fP ctx krb5_init_creds_context context. -.br -\fIin\fP input data from KDC, first round it should be reset by krb5_data_zer(). -.br -\fIout\fP reply to KDC. -.br -\fIhostinfo\fP KDC address info, first round it can be NULL. -.br -\fIflags\fP status of the round, if KRB5_INIT_CREDS_STEP_FLAG_CONTINUE is set, continue one more round. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_creds_get_ticket_flags.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_creds_get_ticket_flags.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_creds_get_ticket_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto.3 deleted file mode 100644 index de99ff3e65a..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto.3 +++ /dev/null @@ -1,550 +0,0 @@ -.TH "Heimdal Kerberos 5 cryptography functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 cryptography functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_enctype_valid\fP (krb5_context context, krb5_enctype etype)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cksumtype_to_enctype\fP (krb5_context context, krb5_cksumtype ctype, krb5_enctype *etype)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_encrypt_iov_ivec\fP (krb5_context context, krb5_crypto crypto, unsigned usage, \fBkrb5_crypto_iov\fP *data, int num_data, void *ivec)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_decrypt_iov_ivec\fP (krb5_context context, krb5_crypto crypto, unsigned usage, \fBkrb5_crypto_iov\fP *data, unsigned int num_data, void *ivec)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_create_checksum_iov\fP (krb5_context context, krb5_crypto crypto, unsigned usage, \fBkrb5_crypto_iov\fP *data, unsigned int num_data, krb5_cksumtype *type)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_verify_checksum_iov\fP (krb5_context context, krb5_crypto crypto, unsigned usage, \fBkrb5_crypto_iov\fP *data, unsigned int num_data, krb5_cksumtype *type)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_crypto_init\fP (krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_crypto *crypto)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_crypto_destroy\fP (krb5_context context, krb5_crypto crypto)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_crypto_getblocksize\fP (krb5_context context, krb5_crypto crypto, size_t *blocksize)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_crypto_getenctype\fP (krb5_context context, krb5_crypto crypto, krb5_enctype *enctype)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_crypto_getpadsize\fP (krb5_context context, krb5_crypto crypto, size_t *padsize)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_crypto_getconfoundersize\fP (krb5_context context, krb5_crypto crypto, size_t *confoundersize)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_enctype_disable\fP (krb5_context context, krb5_enctype enctype)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_enctype_enable\fP (krb5_context context, krb5_enctype enctype)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_allow_weak_crypto\fP (krb5_context context, krb5_boolean enable)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_random_to_key\fP (krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_crypto_fx_cf2\fP (krb5_context context, const krb5_crypto crypto1, const krb5_crypto crypto2, krb5_data *pepper1, krb5_data *pepper2, krb5_enctype enctype, krb5_keyblock *res)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_generate_subkey_extended\fP (krb5_context context, const krb5_keyblock *key, krb5_enctype etype, krb5_keyblock **subkey)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_keyblock_zero\fP (krb5_keyblock *keyblock)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_keyblock_contents\fP (krb5_context context, krb5_keyblock *keyblock)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_keyblock\fP (krb5_context context, krb5_keyblock *keyblock)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_keyblock_contents\fP (krb5_context context, const krb5_keyblock *inblock, krb5_keyblock *to)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_keyblock\fP (krb5_context context, const krb5_keyblock *inblock, krb5_keyblock **to)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_enctype KRB5_LIB_CALL \fBkrb5_keyblock_get_enctype\fP (const krb5_keyblock *block)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_keyblock_init\fP (krb5_context context, krb5_enctype type, const void *data, size_t size, krb5_keyblock *key)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_allow_weak_crypto (krb5_context context, krb5_boolean enable)" -.PP -Enable or disable all weak encryption types -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIenable\fP true to enable, false to disable -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cksumtype_to_enctype (krb5_context context, krb5_cksumtype ctype, krb5_enctype * etype)" -.PP -Return the coresponding encryption type for a checksum type. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIctype\fP The checksum type to get the result enctype for -.br -\fIetype\fP The returned encryption, when the matching etype is not found, etype is set to ETYPE_NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code for an failure or 0 on success. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_keyblock (krb5_context context, const krb5_keyblock * inblock, krb5_keyblock ** to)" -.PP -Copy a keyblock, free the output keyblock with \fBkrb5_free_keyblock()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIinblock\fP the key to copy -.br -\fIto\fP the output key. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success or a Kerberos 5 error code -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_keyblock_contents (krb5_context context, const krb5_keyblock * inblock, krb5_keyblock * to)" -.PP -Copy a keyblock, free the output keyblock with \fBkrb5_free_keyblock_contents()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIinblock\fP the key to copy -.br -\fIto\fP the output key. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success or a Kerberos 5 error code -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_create_checksum_iov (krb5_context context, krb5_crypto crypto, unsigned usage, \fBkrb5_crypto_iov\fP * data, unsigned int num_data, krb5_cksumtype * type)" -.PP -Create a Kerberos message checksum. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIcrypto\fP Kerberos crypto context -.br -\fIusage\fP Key usage for this buffer -.br -\fIdata\fP array of buffers to process -.br -\fInum_data\fP length of array -.br -\fItype\fP output data -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_destroy (krb5_context context, krb5_crypto crypto)" -.PP -Free a crypto context created by \fBkrb5_crypto_init()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIcrypto\fP crypto context to free -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_fx_cf2 (krb5_context context, const krb5_crypto crypto1, const krb5_crypto crypto2, krb5_data * pepper1, krb5_data * pepper2, krb5_enctype enctype, krb5_keyblock * res)" -.PP -The FX-CF2 key derivation function, used in FAST and preauth framework. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIcrypto1\fP first key to combine -.br -\fIcrypto2\fP second key to combine -.br -\fIpepper1\fP factor to combine with first key to garante uniqueness -.br -\fIpepper2\fP factor to combine with second key to garante uniqueness -.br -\fIenctype\fP the encryption type of the resulting key -.br -\fIres\fP allocated key, free with \fBkrb5_free_keyblock_contents()\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getblocksize (krb5_context context, krb5_crypto crypto, size_t * blocksize)" -.PP -Return the blocksize used algorithm referenced by the crypto context -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIcrypto\fP crypto context to query -.br -\fIblocksize\fP the resulting blocksize -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getconfoundersize (krb5_context context, krb5_crypto crypto, size_t * confoundersize)" -.PP -Return the confounder size used by the crypto context -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIcrypto\fP crypto context to query -.br -\fIconfoundersize\fP the returned confounder size -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getenctype (krb5_context context, krb5_crypto crypto, krb5_enctype * enctype)" -.PP -Return the encryption type used by the crypto context -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIcrypto\fP crypto context to query -.br -\fIenctype\fP the resulting encryption type -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_getpadsize (krb5_context context, krb5_crypto crypto, size_t * padsize)" -.PP -Return the padding size used by the crypto context -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIcrypto\fP crypto context to query -.br -\fIpadsize\fP the return padding size -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_crypto_init (krb5_context context, const krb5_keyblock * key, krb5_enctype etype, krb5_crypto * crypto)" -.PP -Create a crypto context used for all encryption and signature operation. The encryption type to use is taken from the key, but can be overridden with the enctype parameter. This can be useful for encryptions types which is compatiable (DES for example). -.PP -To free the crypto context, use \fBkrb5_crypto_destroy()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIkey\fP the key block information with all key data -.br -\fIetype\fP the encryption type -.br -\fIcrypto\fP the resulting crypto context -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_decrypt_iov_ivec (krb5_context context, krb5_crypto crypto, unsigned usage, \fBkrb5_crypto_iov\fP * data, unsigned int num_data, void * ivec)" -.PP -Inline decrypt a Kerberos message. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIcrypto\fP Kerberos crypto context -.br -\fIusage\fP Key usage for this buffer -.br -\fIdata\fP array of buffers to process -.br -\fInum_data\fP length of array -.br -\fIivec\fP initial cbc/cts vector -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP -1. KRB5_CRYPTO_TYPE_HEADER 2. one KRB5_CRYPTO_TYPE_DATA and array [0,...] of KRB5_CRYPTO_TYPE_SIGN_ONLY in any order, however the receiver have to aware of the order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used unencrypoted protocol headers and trailers. The output data will be of same size as the input data or shorter. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_encrypt_iov_ivec (krb5_context context, krb5_crypto crypto, unsigned usage, \fBkrb5_crypto_iov\fP * data, int num_data, void * ivec)" -.PP -Inline encrypt a kerberos message -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIcrypto\fP Kerberos crypto context -.br -\fIusage\fP Key usage for this buffer -.br -\fIdata\fP array of buffers to process -.br -\fInum_data\fP length of array -.br -\fIivec\fP initial cbc/cts vector -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP -Kerberos encrypted data look like this: -.PP -1. KRB5_CRYPTO_TYPE_HEADER 2. array [1,...] KRB5_CRYPTO_TYPE_DATA and array [0,...] KRB5_CRYPTO_TYPE_SIGN_ONLY in any order, however the receiver have to aware of the order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used headers and trailers. 3. KRB5_CRYPTO_TYPE_PADDING, at least on padsize long if padsize > 1 4. KRB5_CRYPTO_TYPE_TRAILER -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_disable (krb5_context context, krb5_enctype enctype)" -.PP -Disable encryption type -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIenctype\fP encryption type to disable -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_enable (krb5_context context, krb5_enctype enctype)" -.PP -Enable encryption type -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIenctype\fP encryption type to enable -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_enctype_valid (krb5_context context, krb5_enctype etype)" -.PP -Check if a enctype is valid, return 0 if it is. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIetype\fP enctype to check if its valid or not -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code for an failure or 0 on success (enctype valid). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_keyblock (krb5_context context, krb5_keyblock * keyblock)" -.PP -Free a keyblock, also zero out the content of the keyblock, uses \fBkrb5_free_keyblock_contents()\fP to free the content. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIkeyblock\fP keyblock to free, NULL is valid argument -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_keyblock_contents (krb5_context context, krb5_keyblock * keyblock)" -.PP -Free a keyblock's content, also zero out the content of the keyblock. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context -.br -\fIkeyblock\fP keyblock content to free, NULL is valid argument -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_generate_subkey_extended (krb5_context context, const krb5_keyblock * key, krb5_enctype etype, krb5_keyblock ** subkey)" -.PP -Generate subkey, from keyblock -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP kerberos context -.br -\fIkey\fP session key -.br -\fIetype\fP encryption type of subkey, if ETYPE_NULL, use key's enctype -.br -\fIsubkey\fP returned new, free with \fBkrb5_free_keyblock()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success or a Kerberos 5 error code -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_enctype KRB5_LIB_CALL krb5_keyblock_get_enctype (const krb5_keyblock * block)" -.PP -Get encryption type of a keyblock. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keyblock_init (krb5_context context, krb5_enctype type, const void * data, size_t size, krb5_keyblock * key)" -.PP -Fill in `key' with key data of type `enctype' from `data' of length `size'. Key should be freed using \fBkrb5_free_keyblock_contents()\fP. -.PP -\fBReturns:\fP -.RS 4 -0 on success or a Kerberos 5 error code -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_keyblock_zero (krb5_keyblock * keyblock)" -.PP -Zero out a keyblock -.PP -\fBParameters:\fP -.RS 4 -\fIkeyblock\fP keyblock to zero out -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_random_to_key (krb5_context context, krb5_enctype type, const void * data, size_t size, krb5_keyblock * key)" -.PP -Converts the random bytestring to a protocol key according to Kerberos crypto frame work. It may be assumed that all the bits of the input string are equally random, even though the entropy present in the random source may be limited. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fItype\fP the enctype resulting key will be of -.br -\fIdata\fP input random data to convert to a key -.br -\fIsize\fP size of input random data, at least krb5_enctype_keysize() long -.br -\fIkey\fP key, output key, free with \fBkrb5_free_keyblock_contents()\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_verify_checksum_iov (krb5_context context, krb5_crypto crypto, unsigned usage, \fBkrb5_crypto_iov\fP * data, unsigned int num_data, krb5_cksumtype * type)" -.PP -Verify a Kerberos message checksum. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIcrypto\fP Kerberos crypto context -.br -\fIusage\fP Key usage for this buffer -.br -\fIdata\fP array of buffers to process -.br -\fInum_data\fP length of array -.br -\fItype\fP return checksum type if not NULL -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_destroy.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_destroy.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_destroy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_fx_cf2.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_fx_cf2.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_fx_cf2.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getblocksize.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getblocksize.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getblocksize.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getconfoundersize.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getconfoundersize.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getconfoundersize.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getenctype.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getenctype.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getenctype.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getpadsize.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getpadsize.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_getpadsize.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_init.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_init.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_iov.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_iov.3 deleted file mode 100644 index 84989c56ae1..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_crypto_iov.3 +++ /dev/null @@ -1,17 +0,0 @@ -.TH "krb5_crypto_iov" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -krb5_crypto_iov \- -.SH SYNOPSIS -.br -.PP -\fC#include \fP -.PP -.SH "Detailed Description" -.PP -Semi private, not stable yet - -.SH "Author" -.PP -Generated automatically by Doxygen for HeimdalKerberos5library from the source code. diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_alloc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_alloc.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_alloc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_cmp.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_cmp.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_cmp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_copy.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_copy.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_copy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_ct_cmp.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_ct_cmp.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_ct_cmp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_free.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_free.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_realloc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_realloc.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_realloc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_zero.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_zero.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_data_zero.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_decrypt_iov_ivec.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_decrypt_iov_ivec.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_decrypt_iov_ivec.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_deprecated.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_deprecated.3 deleted file mode 100644 index 633e1d7c55a..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_deprecated.3 +++ /dev/null @@ -1,269 +0,0 @@ -.TH "Heimdal Kerberos 5 deprecated functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 deprecated functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_change_password\fP (krb5_context context, krb5_creds *creds, const char *newpw, int *result_code, krb5_data *result_code_string, krb5_data *result_string) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_config_parse_string_multi\fP (krb5_context context, const char *string, krb5_config_section **res) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_keytype_to_enctypes\fP (krb5_context context, krb5_keytype keytype, unsigned *len, krb5_enctype **val) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_enctypes_compatible_keys\fP (krb5_context context, krb5_enctype etype1, krb5_enctype etype2) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_data_contents\fP (krb5_context context, krb5_data *data) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_keytype_to_enctypes_default\fP (krb5_context context, krb5_keytype keytype, unsigned *len, krb5_enctype **val) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_keytype_to_string\fP (krb5_context context, krb5_keytype keytype, char **string) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_string_to_keytype\fP (krb5_context context, const char *string, krb5_keytype *keytype) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV \fBkrb5_password_key_proc\fP (krb5_context context, krb5_enctype type, krb5_salt salt, krb5_const_pointer keyseed, krb5_keyblock **key) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_in_tkt_with_password\fP (krb5_context context, krb5_flags options, krb5_addresses *addrs, const krb5_enctype *etypes, const krb5_preauthtype *pre_auth_types, const char *password, krb5_ccache ccache, krb5_creds *creds, krb5_kdc_rep *ret_as_reply) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_in_tkt_with_skey\fP (krb5_context context, krb5_flags options, krb5_addresses *addrs, const krb5_enctype *etypes, const krb5_preauthtype *pre_auth_types, const krb5_keyblock *key, krb5_ccache ccache, krb5_creds *creds, krb5_kdc_rep *ret_as_reply) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV \fBkrb5_keytab_key_proc\fP (krb5_context context, krb5_enctype enctype, krb5_salt salt, krb5_const_pointer keyseed, krb5_keyblock **key) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_in_tkt_with_keytab\fP (krb5_context context, krb5_flags options, krb5_addresses *addrs, const krb5_enctype *etypes, const krb5_preauthtype *pre_auth_types, krb5_keytab keytab, krb5_ccache ccache, krb5_creds *creds, krb5_kdc_rep *ret_as_reply) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_realm *KRB5_LIB_CALL \fBkrb5_princ_realm\fP (krb5_context context, krb5_principal principal) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_princ_set_realm\fP (krb5_context context, krb5_principal principal, krb5_realm *realm) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_free_creds_contents\fP (krb5_context context, krb5_creds *c) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_error_string\fP (krb5_context context, char *str) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_error_string\fP (krb5_context context, const char *fmt,...) __attribute__((format(printf" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_vset_error_string\fP (krb5_context context, const char *fmt, va_list args) __attribute__((format(printf" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_clear_error_string\fP (krb5_context context) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_cred_from_kdc_opt\fP (krb5_context context, krb5_ccache ccache, krb5_creds *in_creds, krb5_creds **out_creds, krb5_creds ***ret_tgts, krb5_flags flags) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_cred_from_kdc\fP (krb5_context context, krb5_ccache ccache, krb5_creds *in_creds, krb5_creds **out_creds, krb5_creds ***ret_tgts) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_unparsed_name\fP (krb5_context context, char *str) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_generate_subkey\fP (krb5_context context, const krb5_keyblock *key, krb5_keyblock **subkey) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_auth_getremoteseqnumber\fP (krb5_context context, krb5_auth_context auth_context, int32_t *seqnumber) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_get_init_creds_opt_init\fP (krb5_get_init_creds_opt *opt) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_init_creds_opt_get_error\fP (krb5_context context, krb5_get_init_creds_opt *opt, KRB_ERROR **error) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_c_enctype_compare\fP (krb5_context context, krb5_enctype e1, krb5_enctype e2, krb5_boolean *similar) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_auth_getremoteseqnumber (krb5_context context, krb5_auth_context auth_context, int32_t * seqnumber)" -.PP -Deprecated: use krb5_auth_con_getremoteseqnumber() -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_c_enctype_compare (krb5_context context, krb5_enctype e1, krb5_enctype e2, krb5_boolean * similar)" -.PP -Deprecated: keytypes doesn't exists, they are really enctypes. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_change_password (krb5_context context, krb5_creds * creds, const char * newpw, int * result_code, krb5_data * result_code_string, krb5_data * result_string)" -.PP -Deprecated: \fBkrb5_change_password()\fP is deprecated, use \fBkrb5_set_password()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIcreds\fP -.br -\fInewpw\fP -.br -\fIresult_code\fP -.br -\fIresult_code_string\fP -.br -\fIresult_string\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -On sucess password is changed. -.RE -.PP -@ -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_clear_error_string (krb5_context context)" -.PP -Clear the error message returned by krb5_get_error_string(). -.PP -Deprecated: use \fBkrb5_clear_error_message()\fP -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_config_parse_string_multi (krb5_context context, const char * string, krb5_config_section ** res)" -.PP -Deprecated: configuration files are not strings -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_enctypes_compatible_keys (krb5_context context, krb5_enctype etype1, krb5_enctype etype2)" -.PP -Deprecated: keytypes doesn't exists, they are really enctypes. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_creds_contents (krb5_context context, krb5_creds * c)" -.PP -Deprecated: use \fBkrb5_free_cred_contents()\fP -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_data_contents (krb5_context context, krb5_data * data)" -.PP -Same as \fBkrb5_data_free()\fP. MIT compat. -.PP -Deprecated: use \fBkrb5_data_free()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIdata\fP krb5_data to free. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_error_string (krb5_context context, char * str)" -.PP -Free the error message returned by krb5_get_error_string(). -.PP -Deprecated: use krb5_free_error_message() -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIstr\fP error message to free -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_unparsed_name (krb5_context context, char * str)" -.PP -Deprecated: use krb5_xfree(). -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_generate_subkey (krb5_context context, const krb5_keyblock * key, krb5_keyblock ** subkey)" -.PP -Deprecated: use \fBkrb5_generate_subkey_extended()\fP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_cred_from_kdc (krb5_context context, krb5_ccache ccache, krb5_creds * in_creds, krb5_creds ** out_creds, krb5_creds *** ret_tgts)" -.PP -Deprecated: use krb5_get_credentials_with_flags(). -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_cred_from_kdc_opt (krb5_context context, krb5_ccache ccache, krb5_creds * in_creds, krb5_creds ** out_creds, krb5_creds *** ret_tgts, krb5_flags flags)" -.PP -Deprecated: use krb5_get_credentials_with_flags(). -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_in_tkt_with_keytab (krb5_context context, krb5_flags options, krb5_addresses * addrs, const krb5_enctype * etypes, const krb5_preauthtype * pre_auth_types, krb5_keytab keytab, krb5_ccache ccache, krb5_creds * creds, krb5_kdc_rep * ret_as_reply)" -.PP -Deprecated: use krb5_get_init_creds() and friends. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_in_tkt_with_password (krb5_context context, krb5_flags options, krb5_addresses * addrs, const krb5_enctype * etypes, const krb5_preauthtype * pre_auth_types, const char * password, krb5_ccache ccache, krb5_creds * creds, krb5_kdc_rep * ret_as_reply)" -.PP -Deprecated: use krb5_get_init_creds() and friends. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_in_tkt_with_skey (krb5_context context, krb5_flags options, krb5_addresses * addrs, const krb5_enctype * etypes, const krb5_preauthtype * pre_auth_types, const krb5_keyblock * key, krb5_ccache ccache, krb5_creds * creds, krb5_kdc_rep * ret_as_reply)" -.PP -Deprecated: use krb5_get_init_creds() and friends. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_opt_get_error (krb5_context context, krb5_get_init_creds_opt * opt, KRB_ERROR ** error)" -.PP -Deprecated: use the new \fBkrb5_init_creds_init()\fP and \fBkrb5_init_creds_get_error()\fP. -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_get_init_creds_opt_init (krb5_get_init_creds_opt * opt)" -.PP -Deprecated: use \fBkrb5_get_init_creds_opt_alloc()\fP. -.PP -The reason \fBkrb5_get_init_creds_opt_init()\fP is deprecated is that krb5_get_init_creds_opt is a static structure and for ABI reason it can't grow, ie can't add new functionality. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV krb5_keytab_key_proc (krb5_context context, krb5_enctype enctype, krb5_salt salt, krb5_const_pointer keyseed, krb5_keyblock ** key)" -.PP -Deprecated: use krb5_get_init_creds() and friends. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keytype_to_enctypes (krb5_context context, krb5_keytype keytype, unsigned * len, krb5_enctype ** val)" -.PP -Deprecated: keytypes doesn't exists, they are really enctypes. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keytype_to_enctypes_default (krb5_context context, krb5_keytype keytype, unsigned * len, krb5_enctype ** val)" -.PP -Deprecated: keytypes doesn't exists, they are really enctypes. -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_keytype_to_string (krb5_context context, krb5_keytype keytype, char ** string)" -.PP -Deprecated: keytypes doesn't exists, they are really enctypes in most cases, use krb5_enctype_to_string(). -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV krb5_password_key_proc (krb5_context context, krb5_enctype type, krb5_salt salt, krb5_const_pointer keyseed, krb5_keyblock ** key)" -.PP -Deprecated: use krb5_get_init_creds() and friends. -.SS "KRB5_LIB_FUNCTION krb5_realm* KRB5_LIB_CALL krb5_princ_realm (krb5_context context, krb5_principal principal)" -.PP -Deprecated: use \fBkrb5_principal_get_realm()\fP -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_princ_set_realm (krb5_context context, krb5_principal principal, krb5_realm * realm)" -.PP -Deprecated: use \fBkrb5_principal_set_realm()\fP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_error_string (krb5_context context, const char * fmt, ...)" -.PP -Set the error message returned by krb5_get_error_string(). -.PP -Deprecated: use krb5_get_error_message() -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIfmt\fP error message to free -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_string_to_keytype (krb5_context context, const char * string, krb5_keytype * keytype)" -.PP -Deprecated: keytypes doesn't exists, they are really enctypes in most cases, use krb5_string_to_enctype(). -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vset_error_string (krb5_context context, const char * fmt, va_list args)" -.PP -Set the error message returned by krb5_get_error_string(), deprecated, use \fBkrb5_set_error_message()\fP. -.PP -Deprecated: use krb5_vset_error_message() -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fImsg\fP error message to free -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_digest.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_digest.3 deleted file mode 100644 index 05b6ace8d23..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_digest.3 +++ /dev/null @@ -1,38 +0,0 @@ -.TH "Heimdal Kerberos 5 digest service" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 digest service \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_digest_probe\fP (krb5_context context, krb5_realm realm, krb5_ccache ccache, unsigned *flags)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_digest_probe (krb5_context context, krb5_realm realm, krb5_ccache ccache, unsigned * flags)" -.PP -Get the supported/allowed mechanism for this principal. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Keberos context. -.br -\fIrealm\fP The realm of the KDC. -.br -\fIccache\fP The credential cache to use when talking to the KDC. -.br -\fIflags\fP The supported mechanism. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_digest_probe.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_digest_probe.3 deleted file mode 100644 index d7f12b174eb..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_digest_probe.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_digest.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_eai_to_heim_errno.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_eai_to_heim_errno.3 deleted file mode 100644 index f721fda2cd4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_eai_to_heim_errno.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_error.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_encrypt_iov_ivec.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_encrypt_iov_ivec.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_encrypt_iov_ivec.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_disable.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_disable.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_disable.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_enable.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_enable.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_enable.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_valid.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_valid.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctype_valid.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctypes_compatible_keys.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctypes_compatible_keys.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_enctypes_compatible_keys.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_error.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_error.3 deleted file mode 100644 index 88b5439fc91..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_error.3 +++ /dev/null @@ -1,105 +0,0 @@ -.TH "Heimdal Kerberos 5 error reporting functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 error reporting functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_eai_to_heim_errno\fP (int eai_errno, int system_error)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_h_errno_to_heim_errno\fP (int eai_errno)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_clear_error_message\fP (krb5_context context)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_set_error_message\fP (krb5_context context, krb5_error_code ret, const char *fmt,...) __attribute__((format(printf" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_vwarn\fP (krb5_context context, krb5_error_code code, const char *fmt, va_list ap) __attribute__((format(printf" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_clear_error_message (krb5_context context)" -.PP -Clears the error message from the Kerberos 5 context. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP The Kerberos 5 context to clear -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_eai_to_heim_errno (int eai_errno, int system_error)" -.PP -Convert the getaddrinfo() error code to a Kerberos et error code. -.PP -\fBParameters:\fP -.RS 4 -\fIeai_errno\fP contains the error code from getaddrinfo(). -.br -\fIsystem_error\fP should have the value of errno after the failed getaddrinfo(). -.RE -.PP -\fBReturns:\fP -.RS 4 -Kerberos error code representing the EAI errors. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_h_errno_to_heim_errno (int eai_errno)" -.PP -Convert the gethostname() error code (h_error) to a Kerberos et error code. -.PP -\fBParameters:\fP -.RS 4 -\fIeai_errno\fP contains the error code from gethostname(). -.RE -.PP -\fBReturns:\fP -.RS 4 -Kerberos error code representing the gethostname errors. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_error_message (krb5_context context, krb5_error_code ret, const char * fmt, ...)" -.PP -Set the context full error string for a specific error code. The error that is stored should be internationalized. -.PP -The if context is NULL, no error string is stored. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIret\fP The error code -.br -\fIfmt\fP Error string for the error code -.br -\fI...\fP printf(3) style parameters. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vwarn (krb5_context context, krb5_error_code code, const char * fmt, va_list ap)" -.PP -Log a warning to the log, default stderr, include the error from the last failure. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIcode\fP error code of the last error -.br -\fIfmt\fP message to print -.br -\fIap\fP arguments -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_expand_hostname.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_expand_hostname.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_expand_hostname.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_expand_hostname_realms.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_expand_hostname_realms.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_expand_hostname_realms.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fcc_ops.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fcc_ops.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fcc_ops.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fileformats.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fileformats.3 deleted file mode 100644 index 1b4f95fe7d1..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fileformats.3 +++ /dev/null @@ -1,233 +0,0 @@ -.TH "krb5_fileformats" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -krb5_fileformats \- File formats -.SH "File formats" -.PP -This section documents the diffrent file formats that are used in Heimdal and other Kerberos implementations. -.SS "keytab" -The keytab binary format is not a standard format. The format has evolved and may continue to. It is however understood by several Kerberos implementations including Heimdal, MIT, Sun's Java ktab and are created by the ktpass.exe utility from Windows. So it has established itself as the defacto format for storing Kerberos keys. -.PP -The following C-like structure definitions illustrate the MIT keytab file format. All values are in network byte order. All text is ASCII. -.PP -.PP -.nf - keytab { - uint16_t file_format_version; # 0x502 - keytab_entry entries[*]; - }; - - keytab_entry { - int32_t size; - uint16_t num_components; # subtract 1 if version 0x501 - counted_octet_string realm; - counted_octet_string components[num_components]; - uint32_t name_type; # not present if version 0x501 - uint32_t timestamp; - uint8_t vno8; - keyblock key; - uint32_t vno; #only present if >= 4 bytes left in entry - uint32_t flags; #only present if >= 4 bytes left in entry - }; - - counted_octet_string { - uint16_t length; - uint8_t data[length]; - }; - - keyblock { - uint16_t type; - counted_octet_string; - }; -.fi -.PP -.PP -All numbers are stored in network byteorder (big endian) format. -.PP -The keytab file format begins with the 16 bit file_format_version which at the time this document was authored is 0x502. The format of older keytabs is described at the end of this document. -.PP -The file_format_version is immediately followed by an array of keytab_entry structures which are prefixed with a 32 bit size indicating the number of bytes that follow in the entry. Note that the size should be evaluated as signed. This is because a negative value indicates that the entry is in fact empty (e.g. it has been deleted) and that the negative value of that negative value (which is of course a positive value) is the offset to the next keytab_entry. Based on these size values alone the entire keytab file can be traversed. -.PP -The size is followed by a 16 bit num_components field indicating the number of counted_octet_string components in the components array. -.PP -The num_components field is followed by a counted_octet_string representing the realm of the principal. -.PP -A counted_octet_string is simply an array of bytes prefixed with a 16 bit length. For the realm and name components, the counted_octet_string bytes are ASCII encoded text with no zero terminator. -.PP -Following the realm is the components array that represents the name of the principal. The text of these components may be joined with slashs to construct the typical SPN representation. For example, the service principal HTTP/www.foo.net@FOO.NET would consist of name components 'HTTP' followed by 'www.foo.net'. -.PP -Following the components array is the 32 bit name_type (e.g. 1 is KRB5_NT_PRINCIPAL, 2 is KRB5_NT_SRV_INST, 5 is KRB5_NT_UID, etc). In practice the name_type is almost certainly 1 meaning KRB5_NT_PRINCIPAL. -.PP -The 32 bit timestamp indicates the time the key was established for that principal. The value represents the number of seconds since Jan 1, 1970. -.PP -The 8 bit vno8 field is the version number of the key. This value is overridden by the 32 bit vno field if it is present. The vno8 field is filled with the lower 8 bits of the 32 bit protocol kvno field. -.PP -The keyblock structure consists of a 16 bit value indicating the encryption type and is a counted_octet_string containing the key. The encryption type is the same as the Kerberos standard (e.g. 3 is des-cbc-md5, 23 is arcfour-hmac-md5, etc). -.PP -The last field of the keytab_entry structure is optional. If the size of the keytab_entry indicates that there are at least 4 bytes remaining, a 32 bit value representing the key version number is present. This value supersedes the 8 bit vno8 value preceeding the keyblock. -.PP -Older keytabs with a file_format_version of 0x501 are different in three ways: -.PP -.IP "\(bu" 2 -All integers are in host byte order [1]. -.IP "\(bu" 2 -The num_components field is 1 too large (i.e. after decoding, decrement by 1). -.IP "\(bu" 2 -The 32 bit name_type field is not present. -.PP -.PP -[1] The file_format_version field should really be treated as two separate 8 bit quantities representing the major and minor version number respectively. -.SS "Heimdal database dump file" -Format of the Heimdal text dump file as of Heimdal 0.6.3: -.PP -Each line in the dump file is one entry in the database. -.PP -Each field of a line is separated by one or more spaces, with the exception of fields consisting of principals containing spaces, where space can be quoted with \\ and \\ is quoted by \\. -.PP -Fields and their types are: -.PP -.PP -.nf - Quoted princial (quote character is \) [string] - Keys [keys] - Created by [event] - Modified by [event optional] - Valid start time [time optional] - Valid end time [time optional] - Password end valid time [time optional] - Max lifetime of ticket [time optional] - Max renew time of ticket [integer optional] - Flags [hdb flags] - Generation number [generation optional] - Extensions [extentions optional] -.fi -.PP -.PP -Fields following these silently are ignored. -.PP -All optional fields will be skipped if they fail to parse (or comprise the optional field marker of '-', w/o quotes). -.PP -Example: -.PP -.PP -.nf - fred\@CODE.COM 27:1:16:e8b4c8fc7e60b9e641dcf4cff3f08a701d982a2f89ba373733d26ca59ba6c789666f6b8bfcf169412bb1e5dceb9b33cda29f3412:-:1:3:4498a933881178c744f4232172dcd774c64e81fa6d05ecdf643a7e390624a0ebf3c7407a:-:1:2:b01934b13eb795d76f3a80717d469639b4da0cfb644161340ef44fdeb375e54d684dbb85:-:1:1:ea8e16d8078bf60c781da90f508d4deccba70595258b9d31888d33987cd31af0c9cced2e:- 20020415130120:admin\@CODE.COM 20041221112428:fred\@CODE.COM - - - 86400 604800 126 20020415130120:793707:28 - -.fi -.PP -.PP -Encoding of types are as follows: -.PP -.IP "\(bu" 2 -keys -.PP -.PP -.PP -.nf - kvno:[masterkvno:keytype:keydata:salt]{zero or more separated by :} -.fi -.PP -.PP -kvno is the key version number. -.PP -keydata is hex-encoded -.PP -masterkvno is the kvno of the database master key. If this field is empty, the kadmin load and merge operations will encrypt the key data with the master key if there is one. Otherwise the key data will be imported asis. -.PP -salt is encoded as '-' (no/default salt) or -.PP -.PP -.nf - salt-type / - salt-type / 'string' - salt-type / hex-encoded-data -.fi -.PP -.PP -keytype is the protocol enctype number; see enum ENCTYPE in include/krb5_asn1.h for values. -.PP -Example: -.PP -.nf - 27:1:16:e8b4c8fc7e60b9e641dcf4cff3f08a701d982a2f89ba373733d26ca59ba6c789666f6b8bfcf169412bb1e5dceb9b33cda29f3412:-:1:3:4498a933881178c744f4232172dcd774c64e81fa6d05ecdf643a7e390624a0ebf3c7407a:-:1:2:b01934b13eb795d76f3a80717d469639b4da0cfb644161340ef44fdeb375e54d684dbb85:-:1:1:ea8e16d8078bf60c781da90f508d4deccba70595258b9d31888d33987cd31af0c9cced2e:- - -.fi -.PP -.PP -.PP -.nf - kvno=27,{key: masterkvno=1,keytype=des3-cbc-sha1,keydata=..., default salt}... -.fi -.PP -.PP -.IP "\(bu" 2 -time -.PP -.PP -Format of the time is: YYYYmmddHHMMSS, corresponding to strftime format '%Y%m%d%k%M%S'. -.PP -Time is expressed in UTC. -.PP -Time can be optional (using -), when the time 0 is used. -.PP -Example: -.PP -.PP -.nf - 20041221112428 -.fi -.PP -.PP -.IP "\(bu" 2 -event -.PP -.PP -.PP -.nf - time:principal -.fi -.PP -.PP -time is as given in format time -.PP -principal is a string. Not quoting it may not work in earlier versions of Heimdal. -.PP -Example: -.PP -.nf - 20041221112428:bloggs\@CODE.COM - -.fi -.PP -.PP -.IP "\(bu" 2 -hdb flags -.PP -.PP -Integer encoding of HDB flags, see HDBFlags in lib/hdb/hdb.asn1. Each bit in the integer is the same as the bit in the specification. -.PP -.IP "\(bu" 2 -generation: -.PP -.PP -.PP -.nf - time:usec:gen -.fi -.PP -.PP -usec is a the microsecond, integer. gen is generation number, integer. -.PP -The generation can be defaulted (using '-') or the empty string -.PP -.IP "\(bu" 2 -extensions: -.PP -.PP -.PP -.nf - first-hex-encoded-HDB-Extension[:second-...] -.fi -.PP -.PP -HDB-extension is encoded the DER encoded HDB-Extension from lib/hdb/hdb.asn1. Consumers HDB extensions should be aware that unknown entires needs to be preserved even thought the ASN.1 data content might be unknown. There is a critical flag in the data to show to the KDC that the entry MUST be understod if the entry is to be used. diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_address.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_address.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_address.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_addresses.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_addresses.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_addresses.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_config_files.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_config_files.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_config_files.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_context.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_context.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_context.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_cred_contents.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_cred_contents.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_cred_contents.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_creds.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_creds.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_creds.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_creds_contents.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_creds_contents.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_creds_contents.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_data.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_data.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_data_contents.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_data_contents.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_data_contents.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_error_string.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_error_string.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_error_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_host_realm.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_host_realm.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_host_realm.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_keyblock.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_keyblock.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_keyblock.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_keyblock_contents.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_keyblock_contents.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_keyblock_contents.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_principal.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_principal.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_principal.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_ticket.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_ticket.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_ticket.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_unparsed_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_unparsed_name.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_free_unparsed_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fwd_tgt_creds.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fwd_tgt_creds.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_fwd_tgt_creds.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_generate_subkey.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_generate_subkey.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_generate_subkey.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_generate_subkey_extended.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_generate_subkey_extended.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_generate_subkey_extended.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_cred_from_kdc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_cred_from_kdc.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_cred_from_kdc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_cred_from_kdc_opt.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_cred_from_kdc_opt.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_cred_from_kdc_opt.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_default_config_files.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_default_config_files.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_default_config_files.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_default_in_tkt_etypes.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_default_in_tkt_etypes.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_default_in_tkt_etypes.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_dns_canonicalize_hostname.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_dns_canonicalize_hostname.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_dns_canonicalize_hostname.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_extra_addresses.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_extra_addresses.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_extra_addresses.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_fcache_version.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_fcache_version.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_fcache_version.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_forwarded_creds.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_forwarded_creds.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_forwarded_creds.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_ignore_addresses.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_ignore_addresses.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_ignore_addresses.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_keytab.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_keytab.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_keytab.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_password.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_password.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_password.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_skey.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_skey.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_in_tkt_with_skey.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_keyblock.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_keyblock.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_keyblock.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_keytab.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_keytab.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_keytab.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_alloc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_alloc.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_alloc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_free.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_free.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_get_error.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_get_error.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_get_error.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_init.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_init.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_opt_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_password.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_password.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_init_creds_password.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_kdc_sec_offset.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_kdc_sec_offset.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_kdc_sec_offset.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_max_time_skew.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_max_time_skew.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_max_time_skew.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_use_admin_kdc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_use_admin_kdc.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_use_admin_kdc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_validated_creds.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_validated_creds.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_get_validated_creds.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_addr2addr.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_addr2addr.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_addr2addr.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_addr2sockaddr.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_addr2sockaddr.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_addr2sockaddr.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_errno_to_heim_errno.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_errno_to_heim_errno.3 deleted file mode 100644 index f721fda2cd4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_h_errno_to_heim_errno.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_error.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_context.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_context.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_context.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_free.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_free.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_get.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_get.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_get.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_get_error.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_get_error.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_get_error.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_init.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_init.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_intro.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_intro.3 deleted file mode 100644 index 28f1ea98c48..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_intro.3 +++ /dev/null @@ -1,8 +0,0 @@ -.TH "krb5_init_creds_intro" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -krb5_init_creds_intro \- The initial credential handing functions -.SH "Initial credential" -.PP -Functions to get initial credentials: \fBHeimdal Kerberos 5 credential handing functions\fP . diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_keytab.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_keytab.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_keytab.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_password.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_password.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_password.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_service.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_service.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_set_service.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_step.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_step.3 deleted file mode 100644 index 9030ec94298..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_creds_step.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_credential.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_ets.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_ets.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_init_ets.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_introduction.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_introduction.3 deleted file mode 100644 index 7332a0e2b0b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_introduction.3 +++ /dev/null @@ -1,259 +0,0 @@ -.TH "krb5_introduction" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -krb5_introduction \- Introduction to the Kerberos 5 API -.SH "Kerberos 5 API Overview" -.PP -All functions are documented in manual pages. This section tries to give an overview of the major components used in Kerberos library, and point to where to look for a specific function. -.SS "Kerberos context" -A kerberos context (krb5_context) holds all per thread state. All global variables that are context specific are stored in this structure, including default encryption types, credential cache (for example, a ticket file), and default realms. -.PP -The internals of the structure should never be accessed directly, functions exist for extracting information. -.PP -See the manual page for \fBkrb5_init_context()\fP how to create a context and module \fBHeimdal Kerberos 5 library\fP for more information about the functions. -.SS "Kerberos authentication context" -Kerberos authentication context (krb5_auth_context) holds all context related to an authenticated connection, in a similar way to the kerberos context that holds the context for the thread or process. -.PP -The krb5_auth_context is used by various functions that are directly related to authentication between the server/client. Example of data that this structure contains are various flags, addresses of client and server, port numbers, keyblocks (and subkeys), sequence numbers, replay cache, and checksum types. -.SS "Kerberos principal" -The Kerberos principal is the structure that identifies a user or service in Kerberos. The structure that holds the principal is the krb5_principal. There are function to extract the realm and elements of the principal, but most applications have no reason to inspect the content of the structure. -.PP -The are several ways to create a principal (with different degree of portability), and one way to free it. -.PP -See also the page \fBThe principal handing functions.\fP for more information and also module \fBHeimdal Kerberos 5 principal functions\fP. -.SS "Credential cache" -A credential cache holds the tickets for a user. A given user can have several credential caches, one for each realm where the user have the initial tickets (the first krbtgt). -.PP -The credential cache data can be stored internally in different way, each of them for different proposes. File credential (FILE) caches and processes based (KCM) caches are for permanent storage. While memory caches (MEMORY) are local caches to the local process. -.PP -Caches are opened with \fBkrb5_cc_resolve()\fP or created with \fBkrb5_cc_new_unique()\fP. -.PP -If the cache needs to be opened again (using \fBkrb5_cc_resolve()\fP) \fBkrb5_cc_close()\fP will close the handle, but not the remove the cache. \fBkrb5_cc_destroy()\fP will zero out the cache, remove the cache so it can no longer be referenced. -.PP -See also \fBThe credential cache functions\fP and \fBHeimdal Kerberos 5 credential cache functions\fP . -.SS "Kerberos errors" -Kerberos errors are based on the com_err library. All error codes are 32-bit signed numbers, the first 24 bits define what subsystem the error originates from, and last 8 bits are 255 error codes within the library. Each error code have fixed string associated with it. For example, the error-code -1765328383 have the symbolic name KRB5KDC_ERR_NAME_EXP, and associated error string ``Client's entry in database has expired''. -.PP -This is a great improvement compared to just getting one of the unix error-codes back. However, Heimdal have an extention to pass back customised errors messages. Instead of getting ``Key table entry not found'', the user might back ``failed to find host/host.example.com@EXAMLE.COM(kvno 3) in keytab /etc/krb5.keytab (des-cbc-crc)''. This improves the chance that the user find the cause of the error so you should use the customised error message whenever it's available. -.PP -See also module \fBHeimdal Kerberos 5 error reporting functions\fP . -.SS "Keytab management" -A keytab is a storage for locally stored keys. Heimdal includes keytab support for Kerberos 5 keytabs, Kerberos 4 srvtab, AFS-KeyFile's, and for storing keys in memory. -.PP -Keytabs are used for servers and long-running services. -.PP -See also \fBThe keytab handing functions\fP and \fBHeimdal Kerberos 5 keytab handling functions\fP . -.SS "Kerberos crypto" -Heimdal includes a implementation of the Kerberos crypto framework, all crypto operations. To create a crypto context call \fBkrb5_crypto_init()\fP. -.PP -See also module \fBHeimdal Kerberos 5 cryptography functions\fP . -.SH "Walkthrough of a sample Kerberos 5 client" -.PP -This example contains parts of a sample TCP Kerberos 5 clients, if you want a real working client, please look in appl/test directory in the Heimdal distribution. -.PP -All Kerberos error-codes that are returned from kerberos functions in this program are passed to krb5_err, that will print a descriptive text of the error code and exit. Graphical programs can convert error-code to a human readable error-string with the krb5_get_error_message() function. -.PP -Note that you should not use any Kerberos function before \fBkrb5_init_context()\fP have completed successfully. That is the reason err() is used when \fBkrb5_init_context()\fP fails. -.PP -First the client needs to call krb5_init_context to initialise the Kerberos 5 library. This is only needed once per thread in the program. If the function returns a non-zero value it indicates that either the Kerberos implementation is failing or it's disabled on this host. -.PP -.PP -.nf - #include - - int - main(int argc, char **argv) - { - krb5_context context; - - if (krb5_init_context(&context)) - errx (1, 'krb5_context'); -.fi -.PP -.PP -Now the client wants to connect to the host at the other end. The preferred way of doing this is using getaddrinfo (for operating system that have this function implemented), since getaddrinfo is neutral to the address type and can use any protocol that is available. -.PP -.PP -.nf - struct addrinfo *ai, *a; - struct addrinfo hints; - int error; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - error = getaddrinfo (hostname, 'pop3', &hints, &ai); - if (error) - errx (1, '%s: %s', hostname, gai_strerror(error)); - - for (a = ai; a != NULL; a = a->ai_next) { - int s; - - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - warn ('connect(%s)', hostname); - close (s); - continue; - } - freeaddrinfo (ai); - ai = NULL; - } - if (ai) { - freeaddrinfo (ai); - errx ('failed to contact %s', hostname); - } -.fi -.PP -.PP -Before authenticating, an authentication context needs to be created. This context keeps all information for one (to be) authenticated connection (see krb5_auth_context). -.PP -.PP -.nf - status = krb5_auth_con_init (context, &auth_context); - if (status) - krb5_err (context, 1, status, 'krb5_auth_con_init'); -.fi -.PP -.PP -For setting the address in the authentication there is a help function krb5_auth_con_setaddrs_from_fd() that does everything that is needed when given a connected file descriptor to the socket. -.PP -.PP -.nf - status = krb5_auth_con_setaddrs_from_fd (context, - auth_context, - &sock); - if (status) - krb5_err (context, 1, status, - 'krb5_auth_con_setaddrs_from_fd'); -.fi -.PP -.PP -The next step is to build a server principal for the service we want to connect to. (See also \fBkrb5_sname_to_principal()\fP.) -.PP -.PP -.nf - status = krb5_sname_to_principal (context, - hostname, - service, - KRB5_NT_SRV_HST, - &server); - if (status) - krb5_err (context, 1, status, 'krb5_sname_to_principal'); -.fi -.PP -.PP -The client principal is not passed to krb5_sendauth() function, this causes the krb5_sendauth() function to try to figure it out itself. -.PP -The server program is using the function krb5_recvauth() to receive the Kerberos 5 authenticator. -.PP -In this case, mutual authentication will be tried. That means that the server will authenticate to the client. Using mutual authentication is good since it enables the user to verify that they are talking to the right server (a server that knows the key). -.PP -If you are using a non-blocking socket you will need to do all work of krb5_sendauth() yourself. Basically you need to send over the authenticator from krb5_mk_req() and, in case of mutual authentication, verifying the result from the server with krb5_rd_rep(). -.PP -.PP -.nf - status = krb5_sendauth (context, - &auth_context, - &sock, - VERSION, - NULL, - server, - AP_OPTS_MUTUAL_REQUIRED, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL); - if (status) - krb5_err (context, 1, status, 'krb5_sendauth'); -.fi -.PP -.PP -Once authentication has been performed, it is time to send some data. First we create a krb5_data structure, then we sign it with krb5_mk_safe() using the auth_context that contains the session-key that was exchanged in the krb5_sendauth()/krb5_recvauth() authentication sequence. -.PP -.PP -.nf - data.data = 'hej'; - data.length = 3; - - krb5_data_zero (&packet); - - status = krb5_mk_safe (context, - auth_context, - &data, - &packet, - NULL); - if (status) - krb5_err (context, 1, status, 'krb5_mk_safe'); -.fi -.PP -.PP -And send it over the network. -.PP -.PP -.nf - len = packet.length; - net_len = htonl(len); - - if (krb5_net_write (context, &sock, &net_len, 4) != 4) - err (1, 'krb5_net_write'); - if (krb5_net_write (context, &sock, packet.data, len) != len) - err (1, 'krb5_net_write'); -.fi -.PP -.PP -To send encrypted (and signed) data krb5_mk_priv() should be used instead. krb5_mk_priv() works the same way as krb5_mk_safe(), with the exception that it encrypts the data in addition to signing it. -.PP -.PP -.nf - data.data = 'hemligt'; - data.length = 7; - - krb5_data_free (&packet); - - status = krb5_mk_priv (context, - auth_context, - &data, - &packet, - NULL); - if (status) - krb5_err (context, 1, status, 'krb5_mk_priv'); -.fi -.PP -.PP -And send it over the network. -.PP -.PP -.nf - len = packet.length; - net_len = htonl(len); - - if (krb5_net_write (context, &sock, &net_len, 4) != 4) - err (1, 'krb5_net_write'); - if (krb5_net_write (context, &sock, packet.data, len) != len) - err (1, 'krb5_net_write'); -.fi -.PP -.PP -The server is using krb5_rd_safe() and krb5_rd_priv() to verify the signature and decrypt the packet. -.SH "Validating a password in an application" -.PP -See the manual page for krb5_verify_user(). -.SH "API differences to MIT Kerberos" -.PP -This section is somewhat disorganised, but so far there is no overall structure to the differences, though some of the have their root in that Heimdal uses an ASN.1 compiler and MIT doesn't. -.SS "Principal and realms" -Heimdal stores the realm as a krb5_realm, that is a char *. MIT Kerberos uses a krb5_data to store a realm. -.PP -In Heimdal krb5_principal doesn't contain the component name_type; it's instead stored in component name.name_type. To get and set the nametype in Heimdal, use \fBkrb5_principal_get_type()\fP and \fBkrb5_principal_set_type()\fP. -.PP -For more information about principal and realms, see krb5_principal. -.SS "Error messages" -To get the error string, Heimdal uses krb5_get_error_message(). This is to return custom error messages (like ``Can't find host/datan.example.com@CODE.COM in /etc/krb5.conf.'' instead of a ``Key table entry not found'' that error_message returns. -.PP -Heimdal uses a threadsafe(r) version of the com_err interface; the global com_err table isn't initialised. Then error_message returns quite a boring error string (just the error code itself). diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_is_config_principal.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_is_config_principal.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_is_config_principal.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_is_thread_safe.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_is_thread_safe.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_is_thread_safe.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kerberos_enctypes.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kerberos_enctypes.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kerberos_enctypes.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_get_enctype.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_get_enctype.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_get_enctype.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_init.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_init.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_init.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_zero.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_zero.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keyblock_zero.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab.3 deleted file mode 100644 index 70da22defd0..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab.3 +++ /dev/null @@ -1,486 +0,0 @@ -.TH "Heimdal Kerberos 5 keytab handling functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 keytab handling functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_register\fP (krb5_context context, const krb5_kt_ops *ops)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_resolve\fP (krb5_context context, const char *name, krb5_keytab *id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_default_name\fP (krb5_context context, char *name, size_t namesize)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_default_modify_name\fP (krb5_context context, char *name, size_t namesize)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_default\fP (krb5_context context, krb5_keytab *id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_read_service_key\fP (krb5_context context, krb5_pointer keyprocarg, krb5_principal principal, krb5_kvno vno, krb5_enctype enctype, krb5_keyblock **key)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_get_type\fP (krb5_context context, krb5_keytab keytab, char *prefix, size_t prefixsize)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_get_name\fP (krb5_context context, krb5_keytab keytab, char *name, size_t namesize)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_get_full_name\fP (krb5_context context, krb5_keytab keytab, char **str)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_close\fP (krb5_context context, krb5_keytab id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_destroy\fP (krb5_context context, krb5_keytab id)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_kt_compare\fP (krb5_context context, krb5_keytab_entry *entry, krb5_const_principal principal, krb5_kvno vno, krb5_enctype enctype)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_get_entry\fP (krb5_context context, krb5_keytab id, krb5_const_principal principal, krb5_kvno kvno, krb5_enctype enctype, krb5_keytab_entry *entry)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_copy_entry_contents\fP (krb5_context context, const krb5_keytab_entry *in, krb5_keytab_entry *out)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_free_entry\fP (krb5_context context, krb5_keytab_entry *entry)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_start_seq_get\fP (krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_next_entry\fP (krb5_context context, krb5_keytab id, krb5_keytab_entry *entry, krb5_kt_cursor *cursor)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_end_seq_get\fP (krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_add_entry\fP (krb5_context context, krb5_keytab id, krb5_keytab_entry *entry)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_remove_entry\fP (krb5_context context, krb5_keytab id, krb5_keytab_entry *entry)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_kt_have_content\fP (krb5_context context, krb5_keytab id)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_add_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry * entry)" -.PP -Add the entry in `entry' to the keytab `id'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIid\fP a keytab. -.br -\fIentry\fP the entry to add -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_close (krb5_context context, krb5_keytab id)" -.PP -Finish using the keytab in `id'. All resources will be released, even on errors. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIid\fP keytab to close. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_kt_compare (krb5_context context, krb5_keytab_entry * entry, krb5_const_principal principal, krb5_kvno vno, krb5_enctype enctype)" -.PP -Compare `entry' against `principal, vno, enctype'. Any of `principal, vno, enctype' might be 0 which acts as a wildcard. Return TRUE if they compare the same, FALSE otherwise. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIentry\fP an entry to match with. -.br -\fIprincipal\fP principal to match, NULL matches all principals. -.br -\fIvno\fP key version to match, 0 matches all key version numbers. -.br -\fIenctype\fP encryption type to match, 0 matches all encryption types. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return TRUE or match, FALSE if not matched. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_copy_entry_contents (krb5_context context, const krb5_keytab_entry * in, krb5_keytab_entry * out)" -.PP -Copy the contents of `in' into `out'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIin\fP the keytab entry to copy. -.br -\fIout\fP the copy of the keytab entry, free with \fBkrb5_kt_free_entry()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default (krb5_context context, krb5_keytab * id)" -.PP -Set `id' to the default keytab. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIid\fP the new default keytab. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default_modify_name (krb5_context context, char * name, size_t namesize)" -.PP -Copy the name of the default modify keytab into `name'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIname\fP buffer where the name will be written -.br -\fInamesize\fP length of name -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default_name (krb5_context context, char * name, size_t namesize)" -.PP -copy the name of the default keytab into `name'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIname\fP buffer where the name will be written -.br -\fInamesize\fP length of name -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_destroy (krb5_context context, krb5_keytab id)" -.PP -Destroy (remove) the keytab in `id'. All resources will be released, even on errors, does the equvalment of \fBkrb5_kt_close()\fP on the resources. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIid\fP keytab to destroy. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_end_seq_get (krb5_context context, krb5_keytab id, krb5_kt_cursor * cursor)" -.PP -Release all resources associated with `cursor'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIid\fP a keytab. -.br -\fIcursor\fP the cursor to free. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_free_entry (krb5_context context, krb5_keytab_entry * entry)" -.PP -Free the contents of `entry'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIentry\fP the entry to free -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_entry (krb5_context context, krb5_keytab id, krb5_const_principal principal, krb5_kvno kvno, krb5_enctype enctype, krb5_keytab_entry * entry)" -.PP -Retrieve the keytab entry for `principal, kvno, enctype' into `entry' from the keytab `id'. Matching is done like \fBkrb5_kt_compare()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIid\fP a keytab. -.br -\fIprincipal\fP principal to match, NULL matches all principals. -.br -\fIkvno\fP key version to match, 0 matches all key version numbers. -.br -\fIenctype\fP encryption type to match, 0 matches all encryption types. -.br -\fIentry\fP the returned entry, free with \fBkrb5_kt_free_entry()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_full_name (krb5_context context, krb5_keytab keytab, char ** str)" -.PP -Retrieve the full name of the keytab `keytab' and store the name in `str'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIkeytab\fP keytab to get name for. -.br -\fIstr\fP the name of the keytab name, usee krb5_xfree() to free the string. On error, *str is set to NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_name (krb5_context context, krb5_keytab keytab, char * name, size_t namesize)" -.PP -Retrieve the name of the keytab `keytab' into `name', `namesize' -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIkeytab\fP the keytab to get the name for. -.br -\fIname\fP name buffer. -.br -\fInamesize\fP size of name buffer. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_type (krb5_context context, krb5_keytab keytab, char * prefix, size_t prefixsize)" -.PP -Return the type of the `keytab' in the string `prefix of length `prefixsize'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIkeytab\fP the keytab to get the prefix for -.br -\fIprefix\fP prefix buffer -.br -\fIprefixsize\fP length of prefix buffer -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_kt_have_content (krb5_context context, krb5_keytab id)" -.PP -Return true if the keytab exists and have entries -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIid\fP a keytab. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_next_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry * entry, krb5_kt_cursor * cursor)" -.PP -Get the next entry from keytab, advance the cursor. On last entry the function will return KRB5_KT_END. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIid\fP a keytab. -.br -\fIentry\fP the returned entry, free with \fBkrb5_kt_free_entry()\fP. -.br -\fIcursor\fP the cursor of the iteration. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_read_service_key (krb5_context context, krb5_pointer keyprocarg, krb5_principal principal, krb5_kvno vno, krb5_enctype enctype, krb5_keyblock ** key)" -.PP -Read the key identified by `(principal, vno, enctype)' from the keytab in `keyprocarg' (the default if == NULL) into `*key'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIkeyprocarg\fP -.br -\fIprincipal\fP -.br -\fIvno\fP -.br -\fIenctype\fP -.br -\fIkey\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_register (krb5_context context, const krb5_kt_ops * ops)" -.PP -Register a new keytab backend. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIops\fP a backend to register. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_remove_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry * entry)" -.PP -Remove an entry from the keytab, matching is done using \fBkrb5_kt_compare()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIid\fP a keytab. -.br -\fIentry\fP the entry to remove -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_resolve (krb5_context context, const char * name, krb5_keytab * id)" -.PP -Resolve the keytab name (of the form `type:residual') in `name' into a keytab in `id'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIname\fP name to resolve -.br -\fIid\fP resulting keytab, free with \fBkrb5_kt_close()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_start_seq_get (krb5_context context, krb5_keytab id, krb5_kt_cursor * cursor)" -.PP -Set `cursor' to point at the beginning of `id'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context. -.br -\fIid\fP a keytab. -.br -\fIcursor\fP a newly allocated cursor, free with \fBkrb5_kt_end_seq_get()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab_intro.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab_intro.3 deleted file mode 100644 index 7f8144a650a..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab_intro.3 +++ /dev/null @@ -1,74 +0,0 @@ -.TH "krb5_keytab_intro" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -krb5_keytab_intro \- The keytab handing functions -.SH "Kerberos Keytabs" -.PP -See the library functions here: \fBHeimdal Kerberos 5 keytab handling functions\fP -.PP -Keytabs are long term key storage for servers, their equvalment of password files. -.PP -Normally the only function that useful for server are to specify what keytab to use to other core functions like krb5_rd_req() \fBkrb5_kt_resolve()\fP, and \fBkrb5_kt_close()\fP. -.SS "Keytab names" -A keytab name is on the form type:residual. The residual part is specific to each keytab-type. -.PP -When a keytab-name is resolved, the type is matched with an internal list of keytab types. If there is no matching keytab type, the default keytab is used. The current default type is FILE. -.PP -The default value can be changed in the configuration file /etc/krb5.conf by setting the variable [defaults]default_keytab_name. -.PP -The keytab types that are implemented in Heimdal are: -.IP "\(bu" 2 -file store the keytab in a file, the type's name is FILE . The residual part is a filename. For compatibility with other Kerberos implemtation WRFILE and JAVA14 is also accepted. WRFILE has the same format as FILE. JAVA14 have a format that is compatible with older versions of MIT kerberos and SUN's Java based installation. They store a truncted kvno, so when the knvo excess 255, they are truncted in this format. -.PP -.PP -.IP "\(bu" 2 -keytab store the keytab in a AFS keyfile (usually /usr/afs/etc/KeyFile ), the type's name is AFSKEYFILE. The residual part is a filename. -.PP -.PP -.IP "\(bu" 2 -memory The keytab is stored in a memory segment. This allows sensitive and/or temporary data not to be stored on disk. The type's name is MEMORY. Each MEMORY keytab is referenced counted by and opened by the residual name, so two handles can point to the same memory area. When the last user closes using \fBkrb5_kt_close()\fP the keytab, the keys in they keytab is memset() to zero and freed and can no longer be looked up by name. -.PP -.SS "Keytab example" -This is a minimalistic version of ktutil. -.PP -.PP -.nf -int -main (int argc, char **argv) -{ - krb5_context context; - krb5_keytab keytab; - krb5_kt_cursor cursor; - krb5_keytab_entry entry; - krb5_error_code ret; - char *principal; - - if (krb5_init_context (&context) != 0) - errx(1, 'krb5_context'); - - ret = krb5_kt_default (context, &keytab); - if (ret) - krb5_err(context, 1, ret, 'krb5_kt_default'); - - ret = krb5_kt_start_seq_get(context, keytab, &cursor); - if (ret) - krb5_err(context, 1, ret, 'krb5_kt_start_seq_get'); - while((ret = krb5_kt_next_entry(context, keytab, &entry, &cursor)) == 0){ - krb5_unparse_name(context, entry.principal, &principal); - printf('principal: %s\n', principal); - free(principal); - krb5_kt_free_entry(context, &entry); - } - ret = krb5_kt_end_seq_get(context, keytab, &cursor); - if (ret) - krb5_err(context, 1, ret, 'krb5_kt_end_seq_get'); - ret = krb5_kt_close(context, keytab); - if (ret) - krb5_err(context, 1, ret, 'krb5_kt_close'); - krb5_free_context(context); - return 0; -} -.fi -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab_key_proc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab_key_proc.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytab_key_proc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_enctypes.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_enctypes.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_enctypes.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_enctypes_default.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_enctypes_default.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_enctypes_default.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_string.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_string.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_keytype_to_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_krbhst_get_addrinfo.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_krbhst_get_addrinfo.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_krbhst_get_addrinfo.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_add_entry.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_add_entry.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_add_entry.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_close.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_close.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_close.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_compare.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_compare.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_compare.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_copy_entry_contents.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_copy_entry_contents.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_copy_entry_contents.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default_modify_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default_modify_name.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default_modify_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default_name.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_default_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_destroy.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_destroy.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_destroy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_end_seq_get.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_end_seq_get.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_end_seq_get.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_free_entry.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_free_entry.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_free_entry.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_entry.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_entry.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_entry.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_full_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_full_name.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_full_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_name.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_type.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_type.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_get_type.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_have_content.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_have_content.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_have_content.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_next_entry.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_next_entry.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_next_entry.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_read_service_key.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_read_service_key.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_read_service_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_register.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_register.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_register.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_remove_entry.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_remove_entry.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_remove_entry.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_resolve.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_resolve.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_resolve.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_start_seq_get.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_start_seq_get.3 deleted file mode 100644 index abf40bbf82b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kt_start_seq_get.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_keytab.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kuserok.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kuserok.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_kuserok.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_make_addrport.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_make_addrport.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_make_addrport.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_make_principal.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_make_principal.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_make_principal.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_max_sockaddr_size.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_max_sockaddr_size.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_max_sockaddr_size.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_mcc_ops.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_mcc_ops.3 deleted file mode 100644 index e64747b9d07..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_mcc_ops.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ccache.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac.3 deleted file mode 100644 index 239d020f76f..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac.3 +++ /dev/null @@ -1,66 +0,0 @@ -.TH "Heimdal Kerberos 5 PAC handling functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 PAC handling functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_pac_get_buffer\fP (krb5_context context, krb5_pac p, uint32_t type, krb5_data *data)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_pac_verify\fP (krb5_context context, const krb5_pac pac, time_t authtime, krb5_const_principal principal, const krb5_keyblock *server, const krb5_keyblock *privsvr)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_pac_get_buffer (krb5_context context, krb5_pac p, uint32_t type, krb5_data * data)" -.PP -Get the PAC buffer of specific type from the pac. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIp\fP the pac structure returned by krb5_pac_parse(). -.br -\fItype\fP type of buffer to get -.br -\fIdata\fP return data, free with \fBkrb5_data_free()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_pac_verify (krb5_context context, const krb5_pac pac, time_t authtime, krb5_const_principal principal, const krb5_keyblock * server, const krb5_keyblock * privsvr)" -.PP -Verify the PAC. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIpac\fP the pac structure returned by krb5_pac_parse(). -.br -\fIauthtime\fP The time of the ticket the PAC belongs to. -.br -\fIprincipal\fP the principal to verify. -.br -\fIserver\fP The service key, most always be given. -.br -\fIprivsvr\fP The KDC key, may be given. -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac_get_buffer.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac_get_buffer.3 deleted file mode 100644 index bd150f6be5b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac_get_buffer.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_pac.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac_verify.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac_verify.3 deleted file mode 100644 index bd150f6be5b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_pac_verify.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_pac.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_address.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_address.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_address.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_name.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_name_flags.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_name_flags.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_name_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_nametype.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_nametype.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_parse_nametype.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_password_key_proc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_password_key_proc.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_password_key_proc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_plugin_register.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_plugin_register.3 deleted file mode 100644 index 21a2567dc68..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_plugin_register.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_support.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_prepend_config_files_default.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_prepend_config_files_default.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_prepend_config_files_default.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_princ_realm.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_princ_realm.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_princ_realm.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_princ_set_realm.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_princ_set_realm.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_princ_set_realm.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal.3 deleted file mode 100644 index 513995f5725..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal.3 +++ /dev/null @@ -1,519 +0,0 @@ -.TH "Heimdal Kerberos 5 principal functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 principal functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_principal\fP (krb5_context context, krb5_principal p)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_principal_set_type\fP (krb5_context context, krb5_principal principal, int type)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_principal_get_type\fP (krb5_context context, krb5_const_principal principal)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_principal_get_realm\fP (krb5_context context, krb5_const_principal principal)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION unsigned int KRB5_LIB_CALL \fBkrb5_principal_get_num_comp\fP (krb5_context context, krb5_const_principal principal)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_parse_name_flags\fP (krb5_context context, const char *name, int flags, krb5_principal *principal)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_parse_name\fP (krb5_context context, const char *name, krb5_principal *principal)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_unparse_name_fixed\fP (krb5_context context, krb5_const_principal principal, char *name, size_t len)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_unparse_name_fixed_short\fP (krb5_context context, krb5_const_principal principal, char *name, size_t len)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_unparse_name_fixed_flags\fP (krb5_context context, krb5_const_principal principal, int flags, char *name, size_t len)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_unparse_name\fP (krb5_context context, krb5_const_principal principal, char **name)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_unparse_name_flags\fP (krb5_context context, krb5_const_principal principal, int flags, char **name)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_unparse_name_short\fP (krb5_context context, krb5_const_principal principal, char **name)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_principal_set_realm\fP (krb5_context context, krb5_principal principal, krb5_const_realm realm)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_build_principal\fP (krb5_context context, krb5_principal *principal, int rlen, krb5_const_realm realm,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_make_principal\fP (krb5_context context, krb5_principal *principal, krb5_const_realm realm,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_principal\fP (krb5_context context, krb5_const_principal inprinc, krb5_principal *outprinc)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_principal_compare_any_realm\fP (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_principal_compare\fP (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_realm_compare\fP (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_principal_match\fP (krb5_context context, krb5_const_principal princ, krb5_const_principal pattern)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_sname_to_principal\fP (krb5_context context, const char *hostname, const char *sname, int32_t type, krb5_principal *ret_princ)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_parse_nametype\fP (krb5_context context, const char *str, int32_t *nametype)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_principal_is_krbtgt\fP (krb5_context context, krb5_const_principal p)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_build_principal (krb5_context context, krb5_principal * principal, int rlen, krb5_const_realm realm, ...)" -.PP -Build a principal using vararg style building -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIprincipal\fP returned principal -.br -\fIrlen\fP length of realm -.br -\fIrealm\fP realm name -.br -\fI...\fP a list of components ended with NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_principal (krb5_context context, krb5_const_principal inprinc, krb5_principal * outprinc)" -.PP -Copy a principal -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIinprinc\fP principal to copy -.br -\fIoutprinc\fP copied principal, free with \fBkrb5_free_principal()\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_principal (krb5_context context, krb5_principal p)" -.PP -Frees a Kerberos principal allocated by the library with \fBkrb5_parse_name()\fP, \fBkrb5_make_principal()\fP or any other related principal functions. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIp\fP a principal to free. -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_make_principal (krb5_context context, krb5_principal * principal, krb5_const_realm realm, ...)" -.PP -Build a principal using vararg style building -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIprincipal\fP returned principal -.br -\fIrealm\fP realm name -.br -\fI...\fP a list of components ended with NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_name (krb5_context context, const char * name, krb5_principal * principal)" -.PP -Parse a name into a krb5_principal structure -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIname\fP name to parse into a Kerberos principal -.br -\fIprincipal\fP returned principal, free with \fBkrb5_free_principal()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_name_flags (krb5_context context, const char * name, int flags, krb5_principal * principal)" -.PP -Parse a name into a krb5_principal structure, flags controls the behavior. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIname\fP name to parse into a Kerberos principal -.br -\fIflags\fP flags to control the behavior -.br -\fIprincipal\fP returned principal, free with \fBkrb5_free_principal()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_parse_nametype (krb5_context context, const char * str, int32_t * nametype)" -.PP -Parse nametype string and return a nametype integer -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_compare (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)" -.PP -Compares the two principals, including realm of the principals and returns TRUE if they are the same and FALSE if not. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIprinc1\fP first principal to compare -.br -\fIprinc2\fP second principal to compare -.RE -.PP -\fBSee also:\fP -.RS 4 -\fBkrb5_principal_compare_any_realm()\fP -.PP -\fBkrb5_realm_compare()\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_compare_any_realm (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)" -.PP -Return TRUE iff princ1 == princ2 (without considering the realm) -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIprinc1\fP first principal to compare -.br -\fIprinc2\fP second principal to compare -.RE -.PP -\fBReturns:\fP -.RS 4 -non zero if equal, 0 if not -.RE -.PP -\fBSee also:\fP -.RS 4 -\fBkrb5_principal_compare()\fP -.PP -\fBkrb5_realm_compare()\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION unsigned int KRB5_LIB_CALL krb5_principal_get_num_comp (krb5_context context, krb5_const_principal principal)" -.PP -Get number of component is principal. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIprincipal\fP principal to query -.RE -.PP -\fBReturns:\fP -.RS 4 -number of components in string -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_principal_get_realm (krb5_context context, krb5_const_principal principal)" -.PP -Get the realm of the principal -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIprincipal\fP principal to get the realm for -.RE -.PP -\fBReturns:\fP -.RS 4 -realm of the principal, don't free or use after krb5_principal is freed -.RE -.PP - -.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_principal_get_type (krb5_context context, krb5_const_principal principal)" -.PP -Get the type of the principal -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIprincipal\fP principal to get the type for -.RE -.PP -\fBReturns:\fP -.RS 4 -the type of principal -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_is_krbtgt (krb5_context context, krb5_const_principal p)" -.PP -Check if the cname part of the principal is a krbtgt principal -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_principal_match (krb5_context context, krb5_const_principal princ, krb5_const_principal pattern)" -.PP -return TRUE iff princ matches pattern -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_principal_set_realm (krb5_context context, krb5_principal principal, krb5_const_realm realm)" -.PP -Set a new realm for a principal, and as a side-effect free the previous realm. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIprincipal\fP principal set the realm for -.br -\fIrealm\fP the new realm to set -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_principal_set_type (krb5_context context, krb5_principal principal, int type)" -.PP -Set the type of the principal -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIprincipal\fP principal to set the type for -.br -\fItype\fP the new type -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_realm_compare (krb5_context context, krb5_const_principal princ1, krb5_const_principal princ2)" -.PP -return TRUE iff realm(princ1) == realm(princ2) -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIprinc1\fP first principal to compare -.br -\fIprinc2\fP second principal to compare -.RE -.PP -\fBSee also:\fP -.RS 4 -\fBkrb5_principal_compare_any_realm()\fP -.PP -\fBkrb5_principal_compare()\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_sname_to_principal (krb5_context context, const char * hostname, const char * sname, int32_t type, krb5_principal * ret_princ)" -.PP -Create a principal for the service running on hostname. If KRB5_NT_SRV_HST is used, the hostname is canonization using DNS (or some other service), this is potentially insecure. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIhostname\fP hostname to use -.br -\fIsname\fP Service name to use -.br -\fItype\fP name type of pricipal, use KRB5_NT_SRV_HST or KRB5_NT_UNKNOWN. -.br -\fIret_princ\fP return principal, free with \fBkrb5_free_principal()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name (krb5_context context, krb5_const_principal principal, char ** name)" -.PP -Unparse the Kerberos name into a string -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIprincipal\fP principal to query -.br -\fIname\fP resulting string, free with krb5_xfree() -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed (krb5_context context, krb5_const_principal principal, char * name, size_t len)" -.PP -Unparse the principal name to a fixed buffer -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIprincipal\fP principal to unparse -.br -\fIname\fP buffer to write name to -.br -\fIlen\fP length of buffer -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed_flags (krb5_context context, krb5_const_principal principal, int flags, char * name, size_t len)" -.PP -Unparse the principal name with unparse flags to a fixed buffer. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIprincipal\fP principal to unparse -.br -\fIflags\fP unparse flags -.br -\fIname\fP buffer to write name to -.br -\fIlen\fP length of buffer -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_fixed_short (krb5_context context, krb5_const_principal principal, char * name, size_t len)" -.PP -Unparse the principal name to a fixed buffer. The realm is skipped if its a default realm. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIprincipal\fP principal to unparse -.br -\fIname\fP buffer to write name to -.br -\fIlen\fP length of buffer -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_flags (krb5_context context, krb5_const_principal principal, int flags, char ** name)" -.PP -Unparse the Kerberos name into a string -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIprincipal\fP principal to query -.br -\fIflags\fP flag to determine the behavior -.br -\fIname\fP resulting string, free with krb5_xfree() -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_unparse_name_short (krb5_context context, krb5_const_principal principal, char ** name)" -.PP -Unparse the principal name to a allocated buffer. The realm is skipped if its a default realm. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos context. -.br -\fIprincipal\fP principal to unparse -.br -\fIname\fP returned buffer, free with krb5_xfree() -.RE -.PP -\fBReturns:\fP -.RS 4 -An krb5 error code, see krb5_get_error_message(). -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_compare.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_compare.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_compare.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_compare_any_realm.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_compare_any_realm.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_compare_any_realm.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_num_comp.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_num_comp.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_num_comp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_realm.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_realm.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_realm.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_type.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_type.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_get_type.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_intro.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_intro.3 deleted file mode 100644 index 345139c8c08..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_intro.3 +++ /dev/null @@ -1,17 +0,0 @@ -.TH "krb5_principal_intro" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -krb5_principal_intro \- The principal handing functions. -A Kerberos principal is a email address looking string that contains to parts separeted by a @. The later part is the kerbero realm the principal belongs to and the former is a list of 0 or more components. For example -.PP -.nf - -lha@SU.SE -host/hummel.it.su.se@SU.SE -host/admin@H5L.ORG - -.fi -.PP -.PP -See the library functions here: \fBHeimdal Kerberos 5 principal functions\fP diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_is_krbtgt.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_is_krbtgt.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_is_krbtgt.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_match.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_match.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_match.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_set_realm.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_set_realm.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_set_realm.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_set_type.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_set_type.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_principal_set_type.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_print_address.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_print_address.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_print_address.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_random_to_key.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_random_to_key.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_random_to_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_ctx.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_ctx.3 deleted file mode 100644 index a329e38ee1a..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_ctx.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_auth.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_ctx_alloc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_ctx_alloc.3 deleted file mode 100644 index a329e38ee1a..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_ctx_alloc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_auth.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_set_keytab.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_set_keytab.3 deleted file mode 100644 index a329e38ee1a..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_set_keytab.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_auth.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_set_pac_check.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_set_pac_check.3 deleted file mode 100644 index a329e38ee1a..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_in_set_pac_check.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_auth.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_out_ctx_free.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_out_ctx_free.3 deleted file mode 100644 index a329e38ee1a..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_out_ctx_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_auth.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_out_get_server.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_out_get_server.3 deleted file mode 100644 index a329e38ee1a..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_rd_req_out_get_server.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_auth.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_realm_compare.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_realm_compare.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_realm_compare.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_address.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_address.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_address.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_addrs.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_addrs.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_addrs.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_authdata.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_authdata.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_authdata.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_creds.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_creds.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_creds.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_creds_tag.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_creds_tag.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_creds_tag.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_data.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_data.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int16.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int16.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int16.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int32.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int32.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int32.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int8.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int8.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_int8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_keyblock.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_keyblock.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_keyblock.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_principal.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_principal.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_principal.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_string.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_string.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_stringz.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_stringz.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_stringz.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_times.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_times.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_times.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint16.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint16.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint16.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint32.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint32.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint32.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint8.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint8.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ret_uint8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_config_files.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_config_files.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_config_files.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_default_in_tkt_etypes.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_default_in_tkt_etypes.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_default_in_tkt_etypes.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_dns_canonicalize_hostname.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_dns_canonicalize_hostname.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_dns_canonicalize_hostname.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_error_message.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_error_message.3 deleted file mode 100644 index f721fda2cd4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_error_message.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_error.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_error_string.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_error_string.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_error_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_extra_addresses.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_extra_addresses.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_extra_addresses.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_fcache_version.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_fcache_version.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_fcache_version.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_home_dir_access.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_home_dir_access.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_home_dir_access.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_ignore_addresses.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_ignore_addresses.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_ignore_addresses.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_kdc_sec_offset.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_kdc_sec_offset.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_kdc_sec_offset.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_max_time_skew.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_max_time_skew.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_max_time_skew.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_password.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_password.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_password.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_real_time.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_real_time.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_real_time.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_use_admin_kdc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_use_admin_kdc.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_set_use_admin_kdc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sname_to_principal.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sname_to_principal.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sname_to_principal.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr2address.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr2address.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr2address.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr2port.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr2port.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr2port.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr_uninteresting.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr_uninteresting.3 deleted file mode 100644 index de56fa15d11..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_sockaddr_uninteresting.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_address.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage.3 deleted file mode 100644 index 031881e481b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage.3 +++ /dev/null @@ -1,1055 +0,0 @@ -.TH "Heimdal Kerberos 5 storage functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 storage functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_storage_set_flags\fP (krb5_storage *sp, krb5_flags flags)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_storage_clear_flags\fP (krb5_storage *sp, krb5_flags flags)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_storage_is_flags\fP (krb5_storage *sp, krb5_flags flags)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_storage_set_byteorder\fP (krb5_storage *sp, krb5_flags byteorder)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_flags KRB5_LIB_CALL \fBkrb5_storage_get_byteorder\fP (krb5_storage *sp)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_storage_set_max_alloc\fP (krb5_storage *sp, size_t size)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION off_t KRB5_LIB_CALL \fBkrb5_storage_seek\fP (krb5_storage *sp, off_t offset, int whence)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_storage_truncate\fP (krb5_storage *sp, off_t offset)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL \fBkrb5_storage_read\fP (krb5_storage *sp, void *buf, size_t len)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL \fBkrb5_storage_write\fP (krb5_storage *sp, const void *buf, size_t len)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_storage_set_eof_code\fP (krb5_storage *sp, int code)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_storage_get_eof_code\fP (krb5_storage *sp)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_storage_free\fP (krb5_storage *sp)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_storage_to_data\fP (krb5_storage *sp, krb5_data *data)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_int32\fP (krb5_storage *sp, int32_t value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_uint32\fP (krb5_storage *sp, uint32_t value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_int32\fP (krb5_storage *sp, int32_t *value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_uint32\fP (krb5_storage *sp, uint32_t *value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_int16\fP (krb5_storage *sp, int16_t value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_uint16\fP (krb5_storage *sp, uint16_t value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_int16\fP (krb5_storage *sp, int16_t *value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_uint16\fP (krb5_storage *sp, uint16_t *value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_int8\fP (krb5_storage *sp, int8_t value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_uint8\fP (krb5_storage *sp, uint8_t value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_int8\fP (krb5_storage *sp, int8_t *value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_uint8\fP (krb5_storage *sp, uint8_t *value)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_data\fP (krb5_storage *sp, krb5_data data)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_data\fP (krb5_storage *sp, krb5_data *data)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_string\fP (krb5_storage *sp, const char *s)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_string\fP (krb5_storage *sp, char **string)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_stringz\fP (krb5_storage *sp, const char *s)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_stringz\fP (krb5_storage *sp, char **string)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_principal\fP (krb5_storage *sp, krb5_const_principal p)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_principal\fP (krb5_storage *sp, krb5_principal *princ)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_keyblock\fP (krb5_storage *sp, krb5_keyblock p)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_keyblock\fP (krb5_storage *sp, krb5_keyblock *p)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_times\fP (krb5_storage *sp, krb5_times times)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_times\fP (krb5_storage *sp, krb5_times *times)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_address\fP (krb5_storage *sp, krb5_address p)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_address\fP (krb5_storage *sp, krb5_address *adr)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_addrs\fP (krb5_storage *sp, krb5_addresses p)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_addrs\fP (krb5_storage *sp, krb5_addresses *adr)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_authdata\fP (krb5_storage *sp, krb5_authdata auth)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_authdata\fP (krb5_storage *sp, krb5_authdata *auth)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_creds\fP (krb5_storage *sp, krb5_creds *creds)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_creds\fP (krb5_storage *sp, krb5_creds *creds)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_creds_tag\fP (krb5_storage *sp, krb5_creds *creds)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_creds_tag\fP (krb5_storage *sp, krb5_creds *creds)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_emem\fP (void)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_from_fd\fP (krb5_socket_t fd_in)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_from_mem\fP (void *buf, size_t len)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_from_data\fP (krb5_data *data)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_from_readonly_mem\fP (const void *buf, size_t len)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_address (krb5_storage * sp, krb5_address * adr)" -.PP -Read a address block from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIadr\fP the address block read from storage -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_addrs (krb5_storage * sp, krb5_addresses * adr)" -.PP -Read a addresses block from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIadr\fP the addresses block read from storage -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_authdata (krb5_storage * sp, krb5_authdata * auth)" -.PP -Read a auth data from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIauth\fP the auth data block read from storage -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_creds (krb5_storage * sp, krb5_creds * creds)" -.PP -Read a credentials block from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIcreds\fP the credentials block read from storage -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_creds_tag (krb5_storage * sp, krb5_creds * creds)" -.PP -Read a tagged credentials block from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIcreds\fP the credentials block read from storage -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_data (krb5_storage * sp, krb5_data * data)" -.PP -Parse a data from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to read from -.br -\fIdata\fP the parsed data -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int16 (krb5_storage * sp, int16_t * value)" -.PP -Read a int16 from storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value read from the buffer -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int32 (krb5_storage * sp, int32_t * value)" -.PP -Read a int32 from storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value read from the buffer -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int8 (krb5_storage * sp, int8_t * value)" -.PP -Read a int8 from storage -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value read from the buffer -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_keyblock (krb5_storage * sp, krb5_keyblock * p)" -.PP -Read a keyblock from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIp\fP the keyblock read from storage, free using \fBkrb5_free_keyblock()\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_principal (krb5_storage * sp, krb5_principal * princ)" -.PP -Parse principal from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to read from -.br -\fIprinc\fP the parsed principal -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_string (krb5_storage * sp, char ** string)" -.PP -Parse a string from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to read from -.br -\fIstring\fP the parsed string -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_stringz (krb5_storage * sp, char ** string)" -.PP -Parse zero terminated string from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to read from -.br -\fIstring\fP the parsed string -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_times (krb5_storage * sp, krb5_times * times)" -.PP -Read a times block from the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fItimes\fP the times block read from storage -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint16 (krb5_storage * sp, uint16_t * value)" -.PP -Read a int16 from storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value read from the buffer -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint32 (krb5_storage * sp, uint32_t * value)" -.PP -Read a uint32 from storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value read from the buffer -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint8 (krb5_storage * sp, uint8_t * value)" -.PP -Read a uint8 from storage -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value read from the buffer -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_clear_flags (krb5_storage * sp, krb5_flags flags)" -.PP -Clear the flags on a storage buffer -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to clear the flags on -.br -\fIflags\fP the flags to clear -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_emem (void)" -.PP -Create a elastic (allocating) memory storage backend. Memory is allocated on demand. Free returned krb5_storage with \fBkrb5_storage_free()\fP. -.PP -\fBReturns:\fP -.RS 4 -A krb5_storage on success, or NULL on out of memory error. -.RE -.PP -\fBSee also:\fP -.RS 4 -\fBkrb5_storage_from_mem()\fP -.PP -\fBkrb5_storage_from_readonly_mem()\fP -.PP -\fBkrb5_storage_from_fd()\fP -.PP -\fBkrb5_storage_from_data()\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_free (krb5_storage * sp)" -.PP -Free a krb5 storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to free. -.RE -.PP -\fBReturns:\fP -.RS 4 -An Kerberos 5 error code. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_data (krb5_data * data)" -.PP -Create a fixed size memory storage block -.PP -\fBReturns:\fP -.RS 4 -A krb5_storage on success, or NULL on out of memory error. -.RE -.PP -\fBSee also:\fP -.RS 4 -krb5_storage_mem() -.PP -\fBkrb5_storage_from_mem()\fP -.PP -\fBkrb5_storage_from_readonly_mem()\fP -.PP -\fBkrb5_storage_from_fd()\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_fd (krb5_socket_t fd_in)" -.PP -\fBReturns:\fP -.RS 4 -A krb5_storage on success, or NULL on out of memory error. -.RE -.PP -\fBSee also:\fP -.RS 4 -\fBkrb5_storage_emem()\fP -.PP -\fBkrb5_storage_from_mem()\fP -.PP -\fBkrb5_storage_from_readonly_mem()\fP -.PP -\fBkrb5_storage_from_data()\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_mem (void * buf, size_t len)" -.PP -Create a fixed size memory storage block -.PP -\fBReturns:\fP -.RS 4 -A krb5_storage on success, or NULL on out of memory error. -.RE -.PP -\fBSee also:\fP -.RS 4 -krb5_storage_mem() -.PP -\fBkrb5_storage_from_readonly_mem()\fP -.PP -\fBkrb5_storage_from_data()\fP -.PP -\fBkrb5_storage_from_fd()\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_readonly_mem (const void * buf, size_t len)" -.PP -Create a fixed size memory storage block that is read only -.PP -\fBReturns:\fP -.RS 4 -A krb5_storage on success, or NULL on out of memory error. -.RE -.PP -\fBSee also:\fP -.RS 4 -krb5_storage_mem() -.PP -\fBkrb5_storage_from_mem()\fP -.PP -\fBkrb5_storage_from_data()\fP -.PP -\fBkrb5_storage_from_fd()\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_flags KRB5_LIB_CALL krb5_storage_get_byteorder (krb5_storage * sp)" -.PP -Return the current byteorder for the buffer. See \fBkrb5_storage_set_byteorder()\fP for the list or byte order contants. -.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_get_eof_code (krb5_storage * sp)" -.PP -Get the return code that will be used when end of storage is reached. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage -.RE -.PP -\fBReturns:\fP -.RS 4 -storage error code -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_storage_is_flags (krb5_storage * sp, krb5_flags flags)" -.PP -Return true or false depending on if the storage flags is set or not. NB testing for the flag 0 always return true. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to check flags on -.br -\fIflags\fP The flags to test for -.RE -.PP -\fBReturns:\fP -.RS 4 -true if all the flags are set, false if not. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL krb5_storage_read (krb5_storage * sp, void * buf, size_t len)" -.PP -Read to the storage buffer. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to read from -.br -\fIbuf\fP the buffer to store the data in -.br -\fIlen\fP the length to read -.RE -.PP -\fBReturns:\fP -.RS 4 -The length of data read (can be shorter then len), or negative on error. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION off_t KRB5_LIB_CALL krb5_storage_seek (krb5_storage * sp, off_t offset, int whence)" -.PP -Seek to a new offset. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to seek in. -.br -\fIoffset\fP the offset to seek -.br -\fIwhence\fP relateive searching, SEEK_CUR from the current position, SEEK_END from the end, SEEK_SET absolute from the start. -.RE -.PP -\fBReturns:\fP -.RS 4 -The new current offset -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_byteorder (krb5_storage * sp, krb5_flags byteorder)" -.PP -Set the new byte order of the storage buffer. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to set the byte order for. -.br -\fIbyteorder\fP the new byte order. -.RE -.PP -The byte order are: KRB5_STORAGE_BYTEORDER_BE, KRB5_STORAGE_BYTEORDER_LE and KRB5_STORAGE_BYTEORDER_HOST. -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_eof_code (krb5_storage * sp, int code)" -.PP -Set the return code that will be used when end of storage is reached. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage -.br -\fIcode\fP the error code to return on end of storage -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_flags (krb5_storage * sp, krb5_flags flags)" -.PP -Add the flags on a storage buffer by or-ing in the flags to the buffer. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to set the flags on -.br -\fIflags\fP the flags to set -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_max_alloc (krb5_storage * sp, size_t size)" -.PP -Set the max alloc value -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer set the max allow for -.br -\fIsize\fP maximum size to allocate, use 0 to remove limit -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_to_data (krb5_storage * sp, krb5_data * data)" -.PP -Copy the contnent of storage -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to copy to a data -.br -\fIdata\fP the copied data, free with \fBkrb5_data_free()\fP -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_truncate (krb5_storage * sp, off_t offset)" -.PP -Truncate the storage buffer in sp to offset. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to truncate. -.br -\fIoffset\fP the offset to truncate too. -.RE -.PP -\fBReturns:\fP -.RS 4 -An Kerberos 5 error code. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL krb5_storage_write (krb5_storage * sp, const void * buf, size_t len)" -.PP -Write to the storage buffer. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIbuf\fP the buffer to write to the storage buffer -.br -\fIlen\fP the length to write -.RE -.PP -\fBReturns:\fP -.RS 4 -The length of data written (can be shorter then len), or negative on error. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_address (krb5_storage * sp, krb5_address p)" -.PP -Write a address block to storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIp\fP the address block to write. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_addrs (krb5_storage * sp, krb5_addresses p)" -.PP -Write a addresses block to storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIp\fP the addresses block to write. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_authdata (krb5_storage * sp, krb5_authdata auth)" -.PP -Write a auth data block to storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIauth\fP the auth data block to write. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_creds (krb5_storage * sp, krb5_creds * creds)" -.PP -Write a credentials block to storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIcreds\fP the creds block to write. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_creds_tag (krb5_storage * sp, krb5_creds * creds)" -.PP -Write a tagged credentials block to storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIcreds\fP the creds block to write. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_data (krb5_storage * sp, krb5_data data)" -.PP -Store a data to the storage. The data is stored with an int32 as lenght plus the data (not padded). -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIdata\fP the buffer to store. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int16 (krb5_storage * sp, int16_t value)" -.PP -Store a int16 to storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value to store -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int32 (krb5_storage * sp, int32_t value)" -.PP -Store a int32 to storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value to store -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int8 (krb5_storage * sp, int8_t value)" -.PP -Store a int8 to storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value to store -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_keyblock (krb5_storage * sp, krb5_keyblock p)" -.PP -Store a keyblock to the storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIp\fP the keyblock to write -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_principal (krb5_storage * sp, krb5_const_principal p)" -.PP -Write a principal block to storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIp\fP the principal block to write. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_string (krb5_storage * sp, const char * s)" -.PP -Store a string to the buffer. The data is formated as an len:uint32 plus the string itself (not padded). -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIs\fP the string to store. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_stringz (krb5_storage * sp, const char * s)" -.PP -Store a zero terminated string to the buffer. The data is stored one character at a time until a NUL is stored. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fIs\fP the string to store. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_times (krb5_storage * sp, krb5_times times)" -.PP -Write a times block to storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage buffer to write to -.br -\fItimes\fP the times block to write. -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint16 (krb5_storage * sp, uint16_t value)" -.PP -Store a uint16 to storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value to store -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint32 (krb5_storage * sp, uint32_t value)" -.PP -Store a uint32 to storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value to store -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint8 (krb5_storage * sp, uint8_t value)" -.PP -Store a uint8 to storage. -.PP -\fBParameters:\fP -.RS 4 -\fIsp\fP the storage to write too -.br -\fIvalue\fP the value to store -.RE -.PP -\fBReturns:\fP -.RS 4 -0 for success, or a Kerberos 5 error code on failure. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_clear_flags.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_clear_flags.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_clear_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_emem.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_emem.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_emem.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_free.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_free.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_data.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_data.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_fd.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_fd.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_fd.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_mem.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_mem.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_mem.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_readonly_mem.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_readonly_mem.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_from_readonly_mem.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_get_byteorder.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_get_byteorder.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_get_byteorder.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_get_eof_code.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_get_eof_code.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_get_eof_code.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_is_flags.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_is_flags.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_is_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_read.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_read.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_read.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_seek.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_seek.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_seek.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_byteorder.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_byteorder.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_byteorder.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_eof_code.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_eof_code.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_eof_code.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_flags.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_flags.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_max_alloc.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_max_alloc.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_set_max_alloc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_to_data.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_to_data.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_to_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_truncate.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_truncate.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_truncate.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_write.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_write.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_storage_write.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_address.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_address.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_address.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_addrs.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_addrs.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_addrs.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_authdata.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_authdata.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_authdata.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_creds.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_creds.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_creds.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_creds_tag.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_creds_tag.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_creds_tag.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_data.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_data.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int16.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int16.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int16.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int32.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int32.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int32.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int8.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int8.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_int8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_keyblock.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_keyblock.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_keyblock.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_principal.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_principal.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_principal.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_string.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_string.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_stringz.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_stringz.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_stringz.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_times.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_times.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_times.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint16.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint16.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint16.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint32.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint32.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint32.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint8.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint8.3 deleted file mode 100644 index de414358a46..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_store_uint8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_storage.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_string_to_keytype.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_string_to_keytype.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_string_to_keytype.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_support.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_support.3 deleted file mode 100644 index f86d4d3a9d4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_support.3 +++ /dev/null @@ -1,650 +0,0 @@ -.TH "Heimdal Kerberos 5 support functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 support functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_acl_match_string\fP (krb5_context context, const char *string, const char *format,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_acl_match_file\fP (krb5_context context, const char *file, const char *format,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_config_parse_file_multi\fP (krb5_context context, const char *fname, krb5_config_section **res)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_config_file_free\fP (krb5_context context, krb5_config_section *s)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const krb5_config_binding *KRB5_LIB_CALL \fBkrb5_config_get_list\fP (krb5_context context, const krb5_config_section *c,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const krb5_config_binding *KRB5_LIB_CALL \fBkrb5_config_vget_list\fP (krb5_context context, const krb5_config_section *c, va_list args)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_config_get_string\fP (krb5_context context, const krb5_config_section *c,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_config_vget_string\fP (krb5_context context, const krb5_config_section *c, va_list args)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_config_vget_string_default\fP (krb5_context context, const krb5_config_section *c, const char *def_value, va_list args)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_config_get_string_default\fP (krb5_context context, const krb5_config_section *c, const char *def_value,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION char **KRB5_LIB_CALL \fBkrb5_config_vget_strings\fP (krb5_context context, const krb5_config_section *c, va_list args)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION char **KRB5_LIB_CALL \fBkrb5_config_get_strings\fP (krb5_context context, const krb5_config_section *c,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_config_free_strings\fP (char **strings)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_config_vget_bool_default\fP (krb5_context context, const krb5_config_section *c, krb5_boolean def_value, va_list args)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_config_vget_bool\fP (krb5_context context, const krb5_config_section *c, va_list args)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_config_get_bool_default\fP (krb5_context context, const krb5_config_section *c, krb5_boolean def_value,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_config_get_bool\fP (krb5_context context, const krb5_config_section *c,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_config_vget_time_default\fP (krb5_context context, const krb5_config_section *c, int def_value, va_list args)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_config_vget_time\fP (krb5_context context, const krb5_config_section *c, va_list args)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_config_get_time_default\fP (krb5_context context, const krb5_config_section *c, int def_value,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_config_get_time\fP (krb5_context context, const krb5_config_section *c,...)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_expand_hostname\fP (krb5_context context, const char *orig_hostname, char **new_hostname)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_expand_hostname_realms\fP (krb5_context context, const char *orig_hostname, char **new_hostname, char ***realms)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_free_host_realm\fP (krb5_context context, krb5_realm *realmlist)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_kuserok\fP (krb5_context context, krb5_principal principal, const char *luser)" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_plugin_register\fP (krb5_context context, enum krb5_plugin_type type, const char *name, void *symbol)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_acl_match_file (krb5_context context, const char * file, const char * format, ...)" -.PP -krb5_acl_match_file matches ACL format against each line in a file using \fBkrb5_acl_match_string()\fP. Lines starting with # are treated like comments and ignored. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIfile\fP file with acl listed in the file. -.br -\fIformat\fP format to match. -.br -\fI...\fP parameter to format string. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP -\fBSee also:\fP -.RS 4 -\fBkrb5_acl_match_string\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_acl_match_string (krb5_context context, const char * string, const char * format, ...)" -.PP -krb5_acl_match_string matches ACL format against a string. -.PP -The ACL format has three format specifiers: s, f, and r. Each specifier will retrieve one argument from the variable arguments for either matching or storing data. The input string is split up using ' ' (space) and '\\t' (tab) as a delimiter; multiple and '\\t' in a row are considered to be the same. -.PP -List of format specifiers: -.IP "\(bu" 2 -s Matches a string using strcmp(3) (case sensitive). -.IP "\(bu" 2 -f Matches the string with fnmatch(3). Theflags argument (the last argument) passed to the fnmatch function is 0. -.IP "\(bu" 2 -r Returns a copy of the string in the char ** passed in; the copy must be freed with free(3). There is no need to free(3) the string on error: the function will clean up and set the pointer to NULL. -.PP -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context -.br -\fIstring\fP string to match with -.br -\fIformat\fP format to match -.br -\fI...\fP parameter to format string -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0. -.RE -.PP -.PP -.nf - char *s; - - ret = krb5_acl_match_string(context, 'foo', 's', 'foo'); - if (ret) - krb5_errx(context, 1, 'acl didn't match'); - ret = krb5_acl_match_string(context, 'foo foo baz/kaka', - 'ss', 'foo', &s, 'foo/\\*'); - if (ret) { - // no need to free(s) on error - assert(s == NULL); - krb5_errx(context, 1, 'acl didn't match'); - } - free(s); -.fi -.PP -.PP -\fBSee also:\fP -.RS 4 -\fBkrb5_acl_match_file\fP -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_config_file_free (krb5_context context, krb5_config_section * s)" -.PP -Free configuration file section, the result of krb5_config_parse_file() and \fBkrb5_config_parse_file_multi()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context -.br -\fIs\fP the configuration section to free -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on successes, otherwise an error code, see krb5_get_error_message() -.RE -.PP - -.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_config_free_strings (char ** strings)" -.PP -Free the resulting strings from krb5_config-get_strings() and \fBkrb5_config_vget_strings()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIstrings\fP strings to free -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_config_get_bool (krb5_context context, const krb5_config_section * c, ...)" -.PP -Like \fBkrb5_config_get_bool()\fP but with a va_list list of configuration selection. -.PP -Configuration value to a boolean value, where yes/true and any non-zero number means TRUE and other value is FALSE. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fI...\fP a list of names, terminated with NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -TRUE or FALSE -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_config_get_bool_default (krb5_context context, const krb5_config_section * c, krb5_boolean def_value, ...)" -.PP -\fBkrb5_config_get_bool_default()\fP will convert the configuration option value to a boolean value, where yes/true and any non-zero number means TRUE and other value is FALSE. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIdef_value\fP the default value to return if no configuration found in the database. -.br -\fI...\fP a list of names, terminated with NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -TRUE or FALSE -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const krb5_config_binding* KRB5_LIB_CALL krb5_config_get_list (krb5_context context, const krb5_config_section * c, ...)" -.PP -Get a list of configuration binding list for more processing -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fI...\fP a list of names, terminated with NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -NULL if configuration list is not found, a list otherwise -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_config_get_string (krb5_context context, const krb5_config_section * c, ...)" -.PP -Returns a 'const char *' to a string in the configuration database. The string may not be valid after a reload of the configuration database so a caller should make a local copy if it needs to keep the string. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fI...\fP a list of names, terminated with NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -NULL if configuration string not found, a string otherwise -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_config_get_string_default (krb5_context context, const krb5_config_section * c, const char * def_value, ...)" -.PP -Like \fBkrb5_config_get_string()\fP, but instead of returning NULL, instead return a default value. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIdef_value\fP the default value to return if no configuration found in the database. -.br -\fI...\fP a list of names, terminated with NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -a configuration string -.RE -.PP - -.SS "KRB5_LIB_FUNCTION char** KRB5_LIB_CALL krb5_config_get_strings (krb5_context context, const krb5_config_section * c, ...)" -.PP -Get a list of configuration strings, free the result with \fBkrb5_config_free_strings()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fI...\fP a list of names, terminated with NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -TRUE or FALSE -.RE -.PP - -.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_get_time (krb5_context context, const krb5_config_section * c, ...)" -.PP -Get the time from the configuration file using a relative time, for example: 1h30s -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fI...\fP a list of names, terminated with NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -parsed the time or -1 on error -.RE -.PP - -.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_get_time_default (krb5_context context, const krb5_config_section * c, int def_value, ...)" -.PP -Get the time from the configuration file using a relative time, for example: 1h30s -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIdef_value\fP the default value to return if no configuration found in the database. -.br -\fI...\fP a list of names, terminated with NULL. -.RE -.PP -\fBReturns:\fP -.RS 4 -parsed the time (or def_value on parse error) -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_config_parse_file_multi (krb5_context context, const char * fname, krb5_config_section ** res)" -.PP -Parse a configuration file and add the result into res. This interface can be used to parse several configuration files into one resulting krb5_config_section by calling it repeatably. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Kerberos 5 context. -.br -\fIfname\fP a file name to a Kerberos configuration file -.br -\fIres\fP the returned result, must be free with \fBkrb5_free_config_files()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.PP -If the fname starts with '~/' parse configuration file in the current users home directory. The behavior can be disabled and enabled by calling \fBkrb5_set_home_dir_access()\fP. -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_config_vget_bool (krb5_context context, const krb5_config_section * c, va_list args)" -.PP -\fBkrb5_config_get_bool()\fP will convert the configuration option value to a boolean value, where yes/true and any non-zero number means TRUE and other value is FALSE. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIargs\fP a va_list of arguments -.RE -.PP -\fBReturns:\fP -.RS 4 -TRUE or FALSE -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_config_vget_bool_default (krb5_context context, const krb5_config_section * c, krb5_boolean def_value, va_list args)" -.PP -Like \fBkrb5_config_get_bool_default()\fP but with a va_list list of configuration selection. -.PP -Configuration value to a boolean value, where yes/true and any non-zero number means TRUE and other value is FALSE. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIdef_value\fP the default value to return if no configuration found in the database. -.br -\fIargs\fP a va_list of arguments -.RE -.PP -\fBReturns:\fP -.RS 4 -TRUE or FALSE -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const krb5_config_binding* KRB5_LIB_CALL krb5_config_vget_list (krb5_context context, const krb5_config_section * c, va_list args)" -.PP -Get a list of configuration binding list for more processing -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIargs\fP a va_list of arguments -.RE -.PP -\fBReturns:\fP -.RS 4 -NULL if configuration list is not found, a list otherwise -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_config_vget_string (krb5_context context, const krb5_config_section * c, va_list args)" -.PP -Like \fBkrb5_config_get_string()\fP, but uses a va_list instead of ... -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIargs\fP a va_list of arguments -.RE -.PP -\fBReturns:\fP -.RS 4 -NULL if configuration string not found, a string otherwise -.RE -.PP - -.SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_config_vget_string_default (krb5_context context, const krb5_config_section * c, const char * def_value, va_list args)" -.PP -Like \fBkrb5_config_vget_string()\fP, but instead of returning NULL, instead return a default value. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIdef_value\fP the default value to return if no configuration found in the database. -.br -\fIargs\fP a va_list of arguments -.RE -.PP -\fBReturns:\fP -.RS 4 -a configuration string -.RE -.PP - -.SS "KRB5_LIB_FUNCTION char** KRB5_LIB_CALL krb5_config_vget_strings (krb5_context context, const krb5_config_section * c, va_list args)" -.PP -Get a list of configuration strings, free the result with \fBkrb5_config_free_strings()\fP. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIargs\fP a va_list of arguments -.RE -.PP -\fBReturns:\fP -.RS 4 -TRUE or FALSE -.RE -.PP - -.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_vget_time (krb5_context context, const krb5_config_section * c, va_list args)" -.PP -Get the time from the configuration file using a relative time, for example: 1h30s -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIargs\fP a va_list of arguments -.RE -.PP -\fBReturns:\fP -.RS 4 -parsed the time or -1 on error -.RE -.PP - -.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_config_vget_time_default (krb5_context context, const krb5_config_section * c, int def_value, va_list args)" -.PP -Get the time from the configuration file using a relative time. -.PP -Like \fBkrb5_config_get_time_default()\fP but with a va_list list of configuration selection. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIc\fP a configuration section, or NULL to use the section from context -.br -\fIdef_value\fP the default value to return if no configuration found in the database. -.br -\fIargs\fP a va_list of arguments -.RE -.PP -\fBReturns:\fP -.RS 4 -parsed the time (or def_value on parse error) -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_expand_hostname (krb5_context context, const char * orig_hostname, char ** new_hostname)" -.PP -\fBkrb5_expand_hostname()\fP tries to make orig_hostname into a more canonical one in the newly allocated space returned in new_hostname. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIorig_hostname\fP hostname to canonicalise. -.br -\fInew_hostname\fP output hostname, caller must free hostname with krb5_xfree(). -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_expand_hostname_realms (krb5_context context, const char * orig_hostname, char ** new_hostname, char *** realms)" -.PP -\fBkrb5_expand_hostname_realms()\fP expands orig_hostname to a name we believe to be a hostname in newly allocated space in new_hostname and return the realms new_hostname is believed to belong to in realms. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fIorig_hostname\fP hostname to canonicalise. -.br -\fInew_hostname\fP output hostname, caller must free hostname with krb5_xfree(). -.br -\fIrealms\fP output possible realms, is an array that is terminated with NULL. Caller must free with \fBkrb5_free_host_realm()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -Return an error code or 0, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_host_realm (krb5_context context, krb5_realm * realmlist)" -.PP -Free all memory allocated by `realmlist' -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP A Kerberos 5 context. -.br -\fIrealmlist\fP realmlist to free, NULL is ok -.RE -.PP -\fBReturns:\fP -.RS 4 -a Kerberos error code, always 0. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_kuserok (krb5_context context, krb5_principal principal, const char * luser)" -.PP -This function takes the name of a local user and checks if principal is allowed to log in as that user. -.PP -The user may have a ~/.k5login file listing principals that are allowed to login as that user. If that file does not exist, all principals with a first component identical to the username, and a realm considered local, are allowed access. -.PP -The .k5login file must contain one principal per line, be owned by user and not be writable by group or other (but must be readable by anyone). -.PP -Note that if the file exists, no implicit access rights are given to user@LOCALREALM. -.PP -Optionally, a set of files may be put in ~/.k5login.d (a directory), in which case they will all be checked in the same manner as .k5login. The files may be called anything, but files starting with a hash (#) , or ending with a tilde (~) are ignored. Subdirectories are not traversed. Note that this directory may not be checked by other Kerberos implementations. -.PP -If no configuration file exists, match user against local domains, ie luser@LOCAL-REALMS-IN-CONFIGURATION-FILES. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIprincipal\fP principal to check if allowed to login -.br -\fIluser\fP local user id -.RE -.PP -\fBReturns:\fP -.RS 4 -returns TRUE if access should be granted, FALSE otherwise. -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_plugin_register (krb5_context context, enum krb5_plugin_type type, const char * name, void * symbol)" -.PP -Register a plugin symbol name of specific type. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP a Keberos context -.br -\fItype\fP type of plugin symbol -.br -\fIname\fP name of plugin symbol -.br -\fIsymbol\fP a pointer to the named symbol -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of error a non zero error com_err error is returned and the Kerberos error string is set. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket.3 deleted file mode 100644 index f7efb3f0f84..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket.3 +++ /dev/null @@ -1,34 +0,0 @@ -.TH "Heimdal Kerberos 5 ticket functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 5 ticket functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL \fBkrb5_ticket_get_flags\fP (krb5_context context, const krb5_ticket *ticket)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL krb5_ticket_get_flags (krb5_context context, const krb5_ticket * ticket)" -.PP -Get the flags from the Kerberos ticket -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos context -.br -\fIticket\fP Kerberos ticket -.RE -.PP -\fBReturns:\fP -.RS 4 -ticket flags -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_authorization_data_type.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_authorization_data_type.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_authorization_data_type.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_client.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_client.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_client.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_endtime.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_endtime.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_endtime.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_flags.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_flags.3 deleted file mode 100644 index 7b8aa1908a1..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_ticket.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_server.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_server.3 deleted file mode 100644 index 16c542ae4a7..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_ticket_get_server.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed_flags.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed_flags.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed_short.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed_short.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_fixed_short.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_flags.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_flags.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_short.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_short.3 deleted file mode 100644 index 86ad45a98b4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_unparse_name_short.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_principal.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_v4compat.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_v4compat.3 deleted file mode 100644 index bf87f23f576..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_v4compat.3 +++ /dev/null @@ -1,60 +0,0 @@ -.TH "Heimdal Kerberos 4 compatiblity functions" 3 "9 Dec 2012" "Version 1.5.3" "HeimdalKerberos5library" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal Kerberos 4 compatiblity functions \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb524_convert_creds_kdc\fP (krb5_context context, krb5_creds *in_cred, struct credentials *v4creds) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.ti -1c -.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb524_convert_creds_kdc_ccache\fP (krb5_context context, krb5_ccache ccache, krb5_creds *in_cred, struct credentials *v4creds) KRB5_DEPRECATED_FUNCTION('Use X instead')" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb524_convert_creds_kdc (krb5_context context, krb5_creds * in_cred, struct credentials * v4creds)" -.PP -Convert the v5 credentials in in_cred to v4-dito in v4creds. This is done by sending them to the 524 function in the KDC. If `in_cred' doesn't contain a DES session key, then a new one is gotten from the KDC and stored in the cred cache `ccache'. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIin_cred\fP the credential to convert -.br -\fIv4creds\fP the converted credential -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - -.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb524_convert_creds_kdc_ccache (krb5_context context, krb5_ccache ccache, krb5_creds * in_cred, struct credentials * v4creds)" -.PP -Convert the v5 credentials in in_cred to v4-dito in v4creds, check the credential cache ccache before checking with the KDC. -.PP -\fBParameters:\fP -.RS 4 -\fIcontext\fP Kerberos 5 context. -.br -\fIccache\fP credential cache used to check for des-ticket. -.br -\fIin_cred\fP the credential to convert -.br -\fIv4creds\fP the converted credential -.RE -.PP -\fBReturns:\fP -.RS 4 -Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_verify_checksum_iov.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_verify_checksum_iov.3 deleted file mode 100644 index ebfd1cbfb9b..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_verify_checksum_iov.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_crypto.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_vset_error_string.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_vset_error_string.3 deleted file mode 100644 index daa28323968..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_vset_error_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_deprecated.3 diff --git a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_vwarn.3 b/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_vwarn.3 deleted file mode 100644 index f721fda2cd4..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/man/man3/krb5_vwarn.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/krb5_error.3 diff --git a/kerberosV/src/doc/doxyout/krb5/manpages b/kerberosV/src/doc/doxyout/krb5/manpages deleted file mode 100644 index b5172637fde..00000000000 --- a/kerberosV/src/doc/doxyout/krb5/manpages +++ /dev/null @@ -1,360 +0,0 @@ -krb5/man/man3/krb5.3 -krb5/man/man3/krb524_convert_creds_kdc.3 -krb5/man/man3/krb524_convert_creds_kdc_ccache.3 -krb5/man/man3/krb5_acc_ops.3 -krb5/man/man3/krb5_acl_match_file.3 -krb5/man/man3/krb5_acl_match_string.3 -krb5/man/man3/krb5_add_et_list.3 -krb5/man/man3/krb5_add_extra_addresses.3 -krb5/man/man3/krb5_add_ignore_addresses.3 -krb5/man/man3/krb5_addr2sockaddr.3 -krb5/man/man3/krb5_address.3 -krb5/man/man3/krb5_address_compare.3 -krb5/man/man3/krb5_address_order.3 -krb5/man/man3/krb5_address_prefixlen_boundary.3 -krb5/man/man3/krb5_address_search.3 -krb5/man/man3/krb5_allow_weak_crypto.3 -krb5/man/man3/krb5_anyaddr.3 -krb5/man/man3/krb5_append_addresses.3 -krb5/man/man3/krb5_auth.3 -krb5/man/man3/krb5_auth_getremoteseqnumber.3 -krb5/man/man3/krb5_build_principal.3 -krb5/man/man3/krb5_c_enctype_compare.3 -krb5/man/man3/krb5_cc_cache_end_seq_get.3 -krb5/man/man3/krb5_cc_cache_get_first.3 -krb5/man/man3/krb5_cc_cache_match.3 -krb5/man/man3/krb5_cc_cache_next.3 -krb5/man/man3/krb5_cc_clear_mcred.3 -krb5/man/man3/krb5_cc_close.3 -krb5/man/man3/krb5_cc_copy_cache.3 -krb5/man/man3/krb5_cc_copy_creds.3 -krb5/man/man3/krb5_cc_copy_match_f.3 -krb5/man/man3/krb5_cc_default.3 -krb5/man/man3/krb5_cc_default_name.3 -krb5/man/man3/krb5_cc_destroy.3 -krb5/man/man3/krb5_cc_end_seq_get.3 -krb5/man/man3/krb5_cc_gen_new.3 -krb5/man/man3/krb5_cc_get_config.3 -krb5/man/man3/krb5_cc_get_flags.3 -krb5/man/man3/krb5_cc_get_friendly_name.3 -krb5/man/man3/krb5_cc_get_full_name.3 -krb5/man/man3/krb5_cc_get_kdc_offset.3 -krb5/man/man3/krb5_cc_get_lifetime.3 -krb5/man/man3/krb5_cc_get_name.3 -krb5/man/man3/krb5_cc_get_ops.3 -krb5/man/man3/krb5_cc_get_prefix_ops.3 -krb5/man/man3/krb5_cc_get_principal.3 -krb5/man/man3/krb5_cc_get_type.3 -krb5/man/man3/krb5_cc_get_version.3 -krb5/man/man3/krb5_cc_initialize.3 -krb5/man/man3/krb5_cc_last_change_time.3 -krb5/man/man3/krb5_cc_move.3 -krb5/man/man3/krb5_cc_new_unique.3 -krb5/man/man3/krb5_cc_next_cred.3 -krb5/man/man3/krb5_cc_register.3 -krb5/man/man3/krb5_cc_remove_cred.3 -krb5/man/man3/krb5_cc_resolve.3 -krb5/man/man3/krb5_cc_retrieve_cred.3 -krb5/man/man3/krb5_cc_set_config.3 -krb5/man/man3/krb5_cc_set_default_name.3 -krb5/man/man3/krb5_cc_set_flags.3 -krb5/man/man3/krb5_cc_set_friendly_name.3 -krb5/man/man3/krb5_cc_set_kdc_offset.3 -krb5/man/man3/krb5_cc_start_seq_get.3 -krb5/man/man3/krb5_cc_store_cred.3 -krb5/man/man3/krb5_cc_support_switch.3 -krb5/man/man3/krb5_cc_switch.3 -krb5/man/man3/krb5_ccache.3 -krb5/man/man3/krb5_ccache_intro.3 -krb5/man/man3/krb5_cccol_cursor_free.3 -krb5/man/man3/krb5_cccol_cursor_new.3 -krb5/man/man3/krb5_cccol_cursor_next.3 -krb5/man/man3/krb5_cccol_last_change_time.3 -krb5/man/man3/krb5_change_password.3 -krb5/man/man3/krb5_cksumtype_to_enctype.3 -krb5/man/man3/krb5_clear_error_message.3 -krb5/man/man3/krb5_clear_error_string.3 -krb5/man/man3/krb5_compare_creds.3 -krb5/man/man3/krb5_config_file_free.3 -krb5/man/man3/krb5_config_free_strings.3 -krb5/man/man3/krb5_config_get_bool.3 -krb5/man/man3/krb5_config_get_bool_default.3 -krb5/man/man3/krb5_config_get_list.3 -krb5/man/man3/krb5_config_get_string.3 -krb5/man/man3/krb5_config_get_string_default.3 -krb5/man/man3/krb5_config_get_strings.3 -krb5/man/man3/krb5_config_get_time.3 -krb5/man/man3/krb5_config_get_time_default.3 -krb5/man/man3/krb5_config_parse_file_multi.3 -krb5/man/man3/krb5_config_parse_string_multi.3 -krb5/man/man3/krb5_config_vget_bool.3 -krb5/man/man3/krb5_config_vget_bool_default.3 -krb5/man/man3/krb5_config_vget_list.3 -krb5/man/man3/krb5_config_vget_string.3 -krb5/man/man3/krb5_config_vget_string_default.3 -krb5/man/man3/krb5_config_vget_strings.3 -krb5/man/man3/krb5_config_vget_time.3 -krb5/man/man3/krb5_config_vget_time_default.3 -krb5/man/man3/krb5_copy_address.3 -krb5/man/man3/krb5_copy_addresses.3 -krb5/man/man3/krb5_copy_context.3 -krb5/man/man3/krb5_copy_creds.3 -krb5/man/man3/krb5_copy_creds_contents.3 -krb5/man/man3/krb5_copy_data.3 -krb5/man/man3/krb5_copy_host_realm.3 -krb5/man/man3/krb5_copy_keyblock.3 -krb5/man/man3/krb5_copy_keyblock_contents.3 -krb5/man/man3/krb5_copy_principal.3 -krb5/man/man3/krb5_copy_ticket.3 -krb5/man/man3/krb5_create_checksum_iov.3 -krb5/man/man3/krb5_credential.3 -krb5/man/man3/krb5_creds_get_ticket_flags.3 -krb5/man/man3/krb5_crypto.3 -krb5/man/man3/krb5_crypto_destroy.3 -krb5/man/man3/krb5_crypto_fx_cf2.3 -krb5/man/man3/krb5_crypto_getblocksize.3 -krb5/man/man3/krb5_crypto_getconfoundersize.3 -krb5/man/man3/krb5_crypto_getenctype.3 -krb5/man/man3/krb5_crypto_getpadsize.3 -krb5/man/man3/krb5_crypto_init.3 -krb5/man/man3/krb5_crypto_iov.3 -krb5/man/man3/krb5_data_alloc.3 -krb5/man/man3/krb5_data_cmp.3 -krb5/man/man3/krb5_data_copy.3 -krb5/man/man3/krb5_data_ct_cmp.3 -krb5/man/man3/krb5_data_free.3 -krb5/man/man3/krb5_data_realloc.3 -krb5/man/man3/krb5_data_zero.3 -krb5/man/man3/krb5_decrypt_iov_ivec.3 -krb5/man/man3/krb5_deprecated.3 -krb5/man/man3/krb5_digest.3 -krb5/man/man3/krb5_digest_probe.3 -krb5/man/man3/krb5_eai_to_heim_errno.3 -krb5/man/man3/krb5_encrypt_iov_ivec.3 -krb5/man/man3/krb5_enctype_disable.3 -krb5/man/man3/krb5_enctype_enable.3 -krb5/man/man3/krb5_enctype_valid.3 -krb5/man/man3/krb5_enctypes_compatible_keys.3 -krb5/man/man3/krb5_error.3 -krb5/man/man3/krb5_expand_hostname.3 -krb5/man/man3/krb5_expand_hostname_realms.3 -krb5/man/man3/krb5_fcc_ops.3 -krb5/man/man3/krb5_fileformats.3 -krb5/man/man3/krb5_free_address.3 -krb5/man/man3/krb5_free_addresses.3 -krb5/man/man3/krb5_free_config_files.3 -krb5/man/man3/krb5_free_context.3 -krb5/man/man3/krb5_free_cred_contents.3 -krb5/man/man3/krb5_free_creds.3 -krb5/man/man3/krb5_free_creds_contents.3 -krb5/man/man3/krb5_free_data.3 -krb5/man/man3/krb5_free_data_contents.3 -krb5/man/man3/krb5_free_error_string.3 -krb5/man/man3/krb5_free_host_realm.3 -krb5/man/man3/krb5_free_keyblock.3 -krb5/man/man3/krb5_free_keyblock_contents.3 -krb5/man/man3/krb5_free_principal.3 -krb5/man/man3/krb5_free_ticket.3 -krb5/man/man3/krb5_free_unparsed_name.3 -krb5/man/man3/krb5_fwd_tgt_creds.3 -krb5/man/man3/krb5_generate_subkey.3 -krb5/man/man3/krb5_generate_subkey_extended.3 -krb5/man/man3/krb5_get_cred_from_kdc.3 -krb5/man/man3/krb5_get_cred_from_kdc_opt.3 -krb5/man/man3/krb5_get_default_config_files.3 -krb5/man/man3/krb5_get_default_in_tkt_etypes.3 -krb5/man/man3/krb5_get_dns_canonicalize_hostname.3 -krb5/man/man3/krb5_get_extra_addresses.3 -krb5/man/man3/krb5_get_fcache_version.3 -krb5/man/man3/krb5_get_forwarded_creds.3 -krb5/man/man3/krb5_get_ignore_addresses.3 -krb5/man/man3/krb5_get_in_tkt_with_keytab.3 -krb5/man/man3/krb5_get_in_tkt_with_password.3 -krb5/man/man3/krb5_get_in_tkt_with_skey.3 -krb5/man/man3/krb5_get_init_creds_keyblock.3 -krb5/man/man3/krb5_get_init_creds_keytab.3 -krb5/man/man3/krb5_get_init_creds_opt_alloc.3 -krb5/man/man3/krb5_get_init_creds_opt_free.3 -krb5/man/man3/krb5_get_init_creds_opt_get_error.3 -krb5/man/man3/krb5_get_init_creds_opt_init.3 -krb5/man/man3/krb5_get_init_creds_password.3 -krb5/man/man3/krb5_get_kdc_sec_offset.3 -krb5/man/man3/krb5_get_max_time_skew.3 -krb5/man/man3/krb5_get_use_admin_kdc.3 -krb5/man/man3/krb5_get_validated_creds.3 -krb5/man/man3/krb5_h_addr2addr.3 -krb5/man/man3/krb5_h_addr2sockaddr.3 -krb5/man/man3/krb5_h_errno_to_heim_errno.3 -krb5/man/man3/krb5_init_context.3 -krb5/man/man3/krb5_init_creds_free.3 -krb5/man/man3/krb5_init_creds_get.3 -krb5/man/man3/krb5_init_creds_get_error.3 -krb5/man/man3/krb5_init_creds_init.3 -krb5/man/man3/krb5_init_creds_intro.3 -krb5/man/man3/krb5_init_creds_set_keytab.3 -krb5/man/man3/krb5_init_creds_set_password.3 -krb5/man/man3/krb5_init_creds_set_service.3 -krb5/man/man3/krb5_init_creds_step.3 -krb5/man/man3/krb5_init_ets.3 -krb5/man/man3/krb5_introduction.3 -krb5/man/man3/krb5_is_config_principal.3 -krb5/man/man3/krb5_is_thread_safe.3 -krb5/man/man3/krb5_kerberos_enctypes.3 -krb5/man/man3/krb5_keyblock_get_enctype.3 -krb5/man/man3/krb5_keyblock_init.3 -krb5/man/man3/krb5_keyblock_zero.3 -krb5/man/man3/krb5_keytab.3 -krb5/man/man3/krb5_keytab_intro.3 -krb5/man/man3/krb5_keytab_key_proc.3 -krb5/man/man3/krb5_keytype_to_enctypes.3 -krb5/man/man3/krb5_keytype_to_enctypes_default.3 -krb5/man/man3/krb5_keytype_to_string.3 -krb5/man/man3/krb5_krbhst_get_addrinfo.3 -krb5/man/man3/krb5_kt_add_entry.3 -krb5/man/man3/krb5_kt_close.3 -krb5/man/man3/krb5_kt_compare.3 -krb5/man/man3/krb5_kt_copy_entry_contents.3 -krb5/man/man3/krb5_kt_default.3 -krb5/man/man3/krb5_kt_default_modify_name.3 -krb5/man/man3/krb5_kt_default_name.3 -krb5/man/man3/krb5_kt_destroy.3 -krb5/man/man3/krb5_kt_end_seq_get.3 -krb5/man/man3/krb5_kt_free_entry.3 -krb5/man/man3/krb5_kt_get_entry.3 -krb5/man/man3/krb5_kt_get_full_name.3 -krb5/man/man3/krb5_kt_get_name.3 -krb5/man/man3/krb5_kt_get_type.3 -krb5/man/man3/krb5_kt_have_content.3 -krb5/man/man3/krb5_kt_next_entry.3 -krb5/man/man3/krb5_kt_read_service_key.3 -krb5/man/man3/krb5_kt_register.3 -krb5/man/man3/krb5_kt_remove_entry.3 -krb5/man/man3/krb5_kt_resolve.3 -krb5/man/man3/krb5_kt_start_seq_get.3 -krb5/man/man3/krb5_kuserok.3 -krb5/man/man3/krb5_make_addrport.3 -krb5/man/man3/krb5_make_principal.3 -krb5/man/man3/krb5_max_sockaddr_size.3 -krb5/man/man3/krb5_mcc_ops.3 -krb5/man/man3/krb5_pac.3 -krb5/man/man3/krb5_pac_get_buffer.3 -krb5/man/man3/krb5_pac_verify.3 -krb5/man/man3/krb5_parse_address.3 -krb5/man/man3/krb5_parse_name.3 -krb5/man/man3/krb5_parse_name_flags.3 -krb5/man/man3/krb5_parse_nametype.3 -krb5/man/man3/krb5_password_key_proc.3 -krb5/man/man3/krb5_plugin_register.3 -krb5/man/man3/krb5_prepend_config_files_default.3 -krb5/man/man3/krb5_princ_realm.3 -krb5/man/man3/krb5_princ_set_realm.3 -krb5/man/man3/krb5_principal.3 -krb5/man/man3/krb5_principal_compare.3 -krb5/man/man3/krb5_principal_compare_any_realm.3 -krb5/man/man3/krb5_principal_get_num_comp.3 -krb5/man/man3/krb5_principal_get_realm.3 -krb5/man/man3/krb5_principal_get_type.3 -krb5/man/man3/krb5_principal_intro.3 -krb5/man/man3/krb5_principal_is_krbtgt.3 -krb5/man/man3/krb5_principal_match.3 -krb5/man/man3/krb5_principal_set_realm.3 -krb5/man/man3/krb5_principal_set_type.3 -krb5/man/man3/krb5_print_address.3 -krb5/man/man3/krb5_random_to_key.3 -krb5/man/man3/krb5_rd_req_ctx.3 -krb5/man/man3/krb5_rd_req_in_ctx_alloc.3 -krb5/man/man3/krb5_rd_req_in_set_keytab.3 -krb5/man/man3/krb5_rd_req_in_set_pac_check.3 -krb5/man/man3/krb5_rd_req_out_ctx_free.3 -krb5/man/man3/krb5_rd_req_out_get_server.3 -krb5/man/man3/krb5_realm_compare.3 -krb5/man/man3/krb5_ret_address.3 -krb5/man/man3/krb5_ret_addrs.3 -krb5/man/man3/krb5_ret_authdata.3 -krb5/man/man3/krb5_ret_creds.3 -krb5/man/man3/krb5_ret_creds_tag.3 -krb5/man/man3/krb5_ret_data.3 -krb5/man/man3/krb5_ret_int16.3 -krb5/man/man3/krb5_ret_int32.3 -krb5/man/man3/krb5_ret_int8.3 -krb5/man/man3/krb5_ret_keyblock.3 -krb5/man/man3/krb5_ret_principal.3 -krb5/man/man3/krb5_ret_string.3 -krb5/man/man3/krb5_ret_stringz.3 -krb5/man/man3/krb5_ret_times.3 -krb5/man/man3/krb5_ret_uint16.3 -krb5/man/man3/krb5_ret_uint32.3 -krb5/man/man3/krb5_ret_uint8.3 -krb5/man/man3/krb5_set_config_files.3 -krb5/man/man3/krb5_set_default_in_tkt_etypes.3 -krb5/man/man3/krb5_set_dns_canonicalize_hostname.3 -krb5/man/man3/krb5_set_error_message.3 -krb5/man/man3/krb5_set_error_string.3 -krb5/man/man3/krb5_set_extra_addresses.3 -krb5/man/man3/krb5_set_fcache_version.3 -krb5/man/man3/krb5_set_home_dir_access.3 -krb5/man/man3/krb5_set_ignore_addresses.3 -krb5/man/man3/krb5_set_kdc_sec_offset.3 -krb5/man/man3/krb5_set_max_time_skew.3 -krb5/man/man3/krb5_set_password.3 -krb5/man/man3/krb5_set_real_time.3 -krb5/man/man3/krb5_set_use_admin_kdc.3 -krb5/man/man3/krb5_sname_to_principal.3 -krb5/man/man3/krb5_sockaddr2address.3 -krb5/man/man3/krb5_sockaddr2port.3 -krb5/man/man3/krb5_sockaddr_uninteresting.3 -krb5/man/man3/krb5_storage.3 -krb5/man/man3/krb5_storage_clear_flags.3 -krb5/man/man3/krb5_storage_emem.3 -krb5/man/man3/krb5_storage_free.3 -krb5/man/man3/krb5_storage_from_data.3 -krb5/man/man3/krb5_storage_from_fd.3 -krb5/man/man3/krb5_storage_from_mem.3 -krb5/man/man3/krb5_storage_from_readonly_mem.3 -krb5/man/man3/krb5_storage_get_byteorder.3 -krb5/man/man3/krb5_storage_get_eof_code.3 -krb5/man/man3/krb5_storage_is_flags.3 -krb5/man/man3/krb5_storage_read.3 -krb5/man/man3/krb5_storage_seek.3 -krb5/man/man3/krb5_storage_set_byteorder.3 -krb5/man/man3/krb5_storage_set_eof_code.3 -krb5/man/man3/krb5_storage_set_flags.3 -krb5/man/man3/krb5_storage_set_max_alloc.3 -krb5/man/man3/krb5_storage_to_data.3 -krb5/man/man3/krb5_storage_truncate.3 -krb5/man/man3/krb5_storage_write.3 -krb5/man/man3/krb5_store_address.3 -krb5/man/man3/krb5_store_addrs.3 -krb5/man/man3/krb5_store_authdata.3 -krb5/man/man3/krb5_store_creds.3 -krb5/man/man3/krb5_store_creds_tag.3 -krb5/man/man3/krb5_store_data.3 -krb5/man/man3/krb5_store_int16.3 -krb5/man/man3/krb5_store_int32.3 -krb5/man/man3/krb5_store_int8.3 -krb5/man/man3/krb5_store_keyblock.3 -krb5/man/man3/krb5_store_principal.3 -krb5/man/man3/krb5_store_string.3 -krb5/man/man3/krb5_store_stringz.3 -krb5/man/man3/krb5_store_times.3 -krb5/man/man3/krb5_store_uint16.3 -krb5/man/man3/krb5_store_uint32.3 -krb5/man/man3/krb5_store_uint8.3 -krb5/man/man3/krb5_string_to_keytype.3 -krb5/man/man3/krb5_support.3 -krb5/man/man3/krb5_ticket.3 -krb5/man/man3/krb5_ticket_get_authorization_data_type.3 -krb5/man/man3/krb5_ticket_get_client.3 -krb5/man/man3/krb5_ticket_get_endtime.3 -krb5/man/man3/krb5_ticket_get_flags.3 -krb5/man/man3/krb5_ticket_get_server.3 -krb5/man/man3/krb5_unparse_name.3 -krb5/man/man3/krb5_unparse_name_fixed.3 -krb5/man/man3/krb5_unparse_name_fixed_flags.3 -krb5/man/man3/krb5_unparse_name_fixed_short.3 -krb5/man/man3/krb5_unparse_name_flags.3 -krb5/man/man3/krb5_unparse_name_short.3 -krb5/man/man3/krb5_v4compat.3 -krb5/man/man3/krb5_verify_checksum_iov.3 -krb5/man/man3/krb5_vset_error_string.3 -krb5/man/man3/krb5_vwarn.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/html/annotated.html b/kerberosV/src/doc/doxyout/ntlm/html/annotated.html deleted file mode 100644 index 4c14d213dc4..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/annotated.html +++ /dev/null @@ -1,39 +0,0 @@ - - -Heimdalntlmlibrary: Data Structures - - - -

-keyhole logo -

- - - -
-

Data Structures

Here are the data structures with brief descriptions: - - - - -
ntlm_buf
ntlm_type1
ntlm_type2
ntlm_type3
-
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/doxygen.css b/kerberosV/src/doc/doxyout/ntlm/html/doxygen.css deleted file mode 100644 index 22c484301dd..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/doxygen.css +++ /dev/null @@ -1,473 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; -} -H1 { - text-align: center; - font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { - font-weight: bold -} -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navpath { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { - text-decoration: none; - background-color: #6666cc; - color: #ffffff -} -A.el { - text-decoration: none; - font-weight: bold -} -A.elRef { - font-weight: bold -} -A.code:link { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.code:visited { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.codeRef:link { - font-weight: normal; - color: #0000FF -} -A.codeRef:visited { - font-weight: normal; - color: #0000FF -} -A:hover { - text-decoration: none; - background-color: #f2f2ff -} -DL.el { - margin-left: -1cm -} -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: 90% -} -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { - text-align: center; -} -IMG.formulaDsp { -} -IMG.formulaInl { - vertical-align: middle; -} -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -SPAN.vhdldigit { color: #ff00ff } -SPAN.vhdlchar { color: #000000 } -SPAN.vhdlkeyword { color: #700070 } -SPAN.vhdllogic { color: #ff0000 } - -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { - color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { - font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { - background: #e8eef2; - font-weight: bold; -} -HR { - height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; - margin-left: 3px; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -/* these are for tree view when used as main index */ -.directory { - font-size: 9pt; - font-weight: bold; -} -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* The following two styles can be used to replace the root node title */ -/* with an image of your choice. Simply uncomment the next two styles, */ -/* specify the name of your image and be sure to set 'height' to the */ -/* proper pixel height of your image. */ - -/* .directory h3.swap { */ -/* height: 61px; */ -/* background-repeat: no-repeat; */ -/* background-image: url("yourimage.gif"); */ -/* } */ -/* .directory h3.swap span { */ -/* display: none; */ -/* } */ - -.directory > h3 { - margin-top: 0; -} -.directory p { - margin: 0px; - white-space: nowrap; -} -.directory div { - display: none; - margin: 0px; -} -.directory img { - vertical-align: -30%; -} -/* these are for tree view when not used as main index */ -.directory-alt { - font-size: 100%; - font-weight: bold; -} -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} -.directory-alt > h3 { - margin-top: 0; -} -.directory-alt p { - margin: 0px; - white-space: nowrap; -} -.directory-alt div { - display: none; - margin: 0px; -} -.directory-alt img { - vertical-align: -30%; -} - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/doxygen.png b/kerberosV/src/doc/doxyout/ntlm/html/doxygen.png deleted file mode 100644 index f0a274bbaffdd67f6d784c894d9cf28729db0e14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1281 zcmaJ>ZA?>F7(Vx-ms?uoS`b@hdRtpo6o^%HU>M$hfGrBvQnk$LE?p^P!kn&ikhyq! zX~V@&tPF5Qt@V?oTL96Bi%aRiwbe1)9DWQI#?)=HxS7QSw`J`5fAJ*eJbB;uNuKA& zdERDo*{Y<(If(#(B$Lr#;nB(8Y#ia=ZCeW?JfPLuQY`=@cW$k}Rivq|vbxGrRq1Tl9;+(gNt?}UtVKM2`T5t1jLzuL@0UIs`S#vlhl4)^ zLgSYrPj@$+`|j?eSbXTmiHGkWxV8V}BzNR?pl9k_s4pDu9vd5a_UzZEPk)}Ad{AV_ zzddrjrh4=Imr`E06;LY{)YYt?o}L~H@7C}F^WB!Ra=v`Q0bj{>5&$66CWF>mf6vjP z2N>RRY6ZYa=K`76>+|_)Xdwko+7wv}7cN|btOhWb(*{sta~6b?S8Omrxw}!4`NhGr zZVpNqpu1@BE`QGWNTpEpcJVW5izu~2B^GlM?1(OPg)zwW;QcP@Ltcclm>XbJL9C|j z=9!2?ua=uIlf0%AndzHsRC}IyTL$EhAee(fdKB`?27KeS^2M8M_7b~PiCFO&r5LC7 z7gl1*a<8;SjNaw#h=843_AV9iZbWQOAp5YOC^&_F*9K0> zB|6%IDb?aM#3viTxkLU4aXg&@+CkNTOnQ1iMP*^?b|^lJy$4C)Zk4isV!|RZ*XhXh zw8q3$=*0LeGC!XI_Wc?dkT~3+*Gu%%yIqP+Wr3H$=&ROMQU6q}Ag^P~>c5vAEO;a- z_dK-3PPeKar%)6$j~vI2#*-YH!1h6HYVtwCX5_wM`iF#UKz&&@9Oo5w3%XGYrX zW>dY~)SG-((Yim%`InwgTvyRC?e=Wh^8KCao!R6Eg&TpVWUY1sN~4G}V?nFnEGo-; zHZ_$eW9-GnC%^WS9b z@p;-$oH#MtC0v>Q$HX%4^JdFdO$0cbv-W)Q TtK}Eh@>>I#ipmV1>S*>q-hkC} diff --git a/kerberosV/src/doc/doxyout/ntlm/html/examples.html b/kerberosV/src/doc/doxyout/ntlm/html/examples.html deleted file mode 100644 index ee3d4a36118..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/examples.html +++ /dev/null @@ -1,30 +0,0 @@ - - -Heimdalntlmlibrary: Examples - - - -

-keyhole logo -

- - - -
-

Examples

Here is a list of all examples: -
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/functions.html b/kerberosV/src/doc/doxyout/ntlm/html/functions.html deleted file mode 100644 index e68e4b88116..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/functions.html +++ /dev/null @@ -1,78 +0,0 @@ - - -Heimdalntlmlibrary: Data Fields - - - -

-keyhole logo -

- - - -
-Here is a list of all documented struct and union fields with links to the struct/union documentation for each field: -

-

-
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/functions_vars.html b/kerberosV/src/doc/doxyout/ntlm/html/functions_vars.html deleted file mode 100644 index 3e5f47bc8ed..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/functions_vars.html +++ /dev/null @@ -1,78 +0,0 @@ - - -Heimdalntlmlibrary: Data Fields - Variables - - - -

-keyhole logo -

- - - -
-  -

-

-
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/graph_legend.dot b/kerberosV/src/doc/doxyout/ntlm/html/graph_legend.dot deleted file mode 100644 index 4df0f1aa486..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/graph_legend.dot +++ /dev/null @@ -1,22 +0,0 @@ -digraph G -{ - edge [fontname="FreeSans",fontsize=10,labelfontname="FreeSans",labelfontsize=10]; - node [fontname="FreeSans",fontsize=10,shape=record]; - Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",fillcolor="grey75",style="filled" fontcolor="black"]; - Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPublicBase.html"]; - Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="red",URL="$classTruncated.html"]; - Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="FreeSans"]; - Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classProtectedBase.html"]; - Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="FreeSans"]; - Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPrivateBase.html"]; - Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="grey75"]; - Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="FreeSans"]; - Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="FreeSans"]; - Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classUsed.html"]; -} diff --git a/kerberosV/src/doc/doxyout/ntlm/html/graph_legend.html b/kerberosV/src/doc/doxyout/ntlm/html/graph_legend.html deleted file mode 100644 index 90f611b37b7..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/graph_legend.html +++ /dev/null @@ -1,89 +0,0 @@ - - -Heimdalntlmlibrary: Graph Legend - - - -

-keyhole logo -

- - - -
-

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

-Consider the following example:

/*! Invisible class because of truncation */
-class Invisible { };
-
-/*! Truncated class, inheritance relation is hidden */
-class Truncated : public Invisible { };
-
-/* Class not documented with doxygen comments */
-class Undocumented { };
-
-/*! Class that is inherited using public inheritance */
-class PublicBase : public Truncated { };
-
-/*! A template class */
-template<class T> class Templ { };
-
-/*! Class that is inherited using protected inheritance */
-class ProtectedBase { };
-
-/*! Class that is inherited using private inheritance */
-class PrivateBase { };
-
-/*! Class that is used by the Inherited class */
-class Used { };
-
-/*! Super class that inherits a number of other classes */
-class Inherited : public PublicBase,
-                  protected ProtectedBase,
-                  private PrivateBase,
-                  public Undocumented,
-                  public Templ<int>
-{
-  private:
-    Used *m_usedClass;
-};
-
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

-

-graph_legend.png -
-

-The boxes in the above graph have the following meaning:

    -
  • -A filled gray box represents the struct or class for which the graph is generated.
  • -
  • -A box with a black border denotes a documented struct or class.
  • -
  • -A box with a grey border denotes an undocumented struct or class.
  • -
  • -A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • -
-The arrows have the following meaning:
    -
  • -A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • -
  • -A dark green arrow is used for protected inheritance.
  • -
  • -A dark red arrow is used for private inheritance.
  • -
  • -A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • -
  • -A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • -
-
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/graph_legend.png b/kerberosV/src/doc/doxyout/ntlm/html/graph_legend.png deleted file mode 100644 index 9b96937bfd5f7a36ea8dbf2d64ed1bc0768f074d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4256 zcmbVQdpOkH_8+NND!Jtq6-jtSR7_-I$|WI0?zfSY$_$d3afzvf+>+dd5k>AJ%rwTO zToWRpOjQk;SpA-vZaxFm|)qS zZ0&nc$jcV$urMS*mT>5$AW~=+0-V=-hk3d;65QJTE=oj@xp?1=Mih?*SJGP9x;tMV zMGEN%60bmjDaijL58nc4RjF^hegOwU1I*ccRUmxdMkPM4ng0%#|DsH zA6uS>izR^x-*dYB+Y^@(q_fm3bgQzJ)xH_6x>lGwshWF+C5$5dh3sYD)tK+C6U)CD z^Xomarii5PA4v8qF_zz#buUwD?ro`8dC&7V-sShflU~*CBDZ04x4+3qE16W{eL_xd z3YaO}b1qpA9YL|0YKdw~2PzM=1=7+ItLm0+tST@%D(MNDzHR)+2t0d#|s}$9i(3xGzT8VL8o-ltIwH zpspqZeXR&2qA6r=nJVuhHO>d5w2$gp9i$H^6ROz!yNTjvm&9kupV73|GPJbXR%Sq0{>>GOn}^wshXC&C~6F@ zQEtikDzl-h2C}qRulGQ3fxzQMGiQH>nv}zkLLPr|qAC;3@PP$cr?(+-t?Wl3jb0<+ z#bCd_jVJ74%s*@eBjHtio7tZ>$BFt@%$M_C#AZgnzPm@&TXYQgE_Vo-ac(6wcJS^F zq)^14asP#Se^m*cnG^`{K>nXv_jhChvr_3s{zCkoqlsf=o8GQ>m@l2)em-YYT;u5A zvL(o`$7n~F&}`E{@&v375BP8e8N#D`H-e$%bEytQt-6o^PA%Dz4c-UeB{`~c4E<$L zY5E6~rKXj#P=fpct4bMP!auX;p7jtP@Li|`r|L0{yav|CLqtLNI5sNFr)16{NP2=B zyY+-Wnh;%3ctC&{8FU{!e29-)s6j~L{~V=%0`Mo=V6^am+1%z2<9r3tD~6uUPff|k zVx!)!?zoJ8FYTDC+V^!??@ z4c>lSL|BU?N^?Ew@NJxJzG9eMGFyR)(2&@Nt!t3%JLT|%6obYCChp}`hP)dkti;UH zm+B_wyb0#h=*|iH4Fx&x>#k_WnyfzU(!KMagDGGLWwz39qG2@`w4@&@8MH}K=hcV> zo@xJdqtMHqtZ+UobNt|FkIRV*_Z#K{{Bb)#j z9XM+oNQX|Dn7$9c4;PX=9NRr)QYm+3 z zx^AyiP)aaJ#E<#aI_Z4M0qo~}6_b{Fw7LjYEpq&2eP4e=;`V;2lQjooTv3dWIpwWu z2b1z&DZD^dJ%5Ah@TPsb?SUP1RZa2=43!k>cAI`kktGdN*#k}_EFYJBtdo09U?xBs z9K9CSx_e{=df>B<4TT_=s52}n^1IKq){xhJIZR<%sQ$rL)Ww)Yt%WkDo#ad}s&Gx5 z={);tH9sSrJ>yD-tu!$ob?tPKmFU3SdDt@i5ULq$P+JZ&rBZXITMM2R4_v1ibgOiq zMgY#(>xF-;&)HonG+sHE@%)-B1*r)@ga3!db-Vc_x}smbXU4=Ycmit0F{Z9Z=q9*k zSY@ypaOs8`MX!BUZQ8*PNmX5$J|!1|LUar)5#Wv*4#g@nfsebEcx9@8Xwfb0Q9P(} z=SQ6#aIE*x06hjIS#Bd%McoJc%>SXksuJY|iLLCE2cQVDS=q0ExRn*~`i=fOw%XSg zjPMNGM@azaROpa|{rz4!=+zKM?qLTssH`{-E+@6Hhis|f3;+_M-ZtTHa|~uvmR1gf ztc+og%<|DBdt%HY{wmosZ0Dwo_$k|E-l5uc@dsfQXM7S|Iz@BxYy&z}hOFW|~F{vQ0Osp+?FjWk}l^^`$3d&Um1 z?&sxr?AAGlD4Khy<_>4od`Bblh?&9%UY#-Jq!c|?kU+hLL^MH@`5+jaq0btJpn7*b#Oeh1GEn6atjaCyIWfr0OqB$o*_K7>Hw0 z?BwrA^UZy(f_CdPoNz0!X6_EX?r80CuKuJ>x7Nfyd8EE%k&D?|=iJJfS>IQjndp+} zQwBq!$`>mvPmG!I^V(%R)Gym_|72^0&$a-L)TN^qtKvF!jlxIo?PRq6kTb-X53|%h z?IKy}wPh>cXPpl!CgqlED%v-a$)H5&WV66^EQctD_=l_ z8tuq$z=3tBNHyzQ{oqHd0c`bijo3DfaK&P6ljOYB*yU$_@k`qhq8=mtA4jS1B1K(j zvo2FBwlJ2mJRPCUqlyR$(a}O)y*2{y;Q!N$t<@I0rtBY~s9-^ohW}mp>mSLEID_fCC?)BC#xQVv6?MP3l1#chr!wPGR>M7_ma= zq&T4QLL#pPdxWMc8$@t?@@dX?v6SXk)pHf5YJBDF1J==c$=Ycr+-OyqR^Hvbl3sPR z*>|+VVnI4^ix_q({i~Ss$FYFSvqug*Szu}$jsTR7w#ajG&vB+e-65%XO$A}#xf?z1 zg)!qcIUN0peM-ZkW0&88#R#(`yIXN3nMRX3+scl<5eJ{+iXh{t%uA$^_(QR&k?6b}K!<(1P zqwP4`%br=wo_WfO34*7x=@)Qk8fo1(!f2_Wx<|KCf>TXR>Fs0He*PA|d0Gy2j)&Wm z%VnPoVWk((0ZN^Z;9t1nfauExQsXD8>~~^(ibEcj>iyB>^{0^bacb(gZMDZOg!?o2 zVa@4%Q3kdQ_jg7p|GidA+;Dh4mlhvBOEsuq(9T4mj7oc$7JRBo7sK z*E^0e%k=;_*U4pQ>$TPd_p@|Nm&X+6SCcizU6^Uhlfh+H#~(#zENDe!uqZ){ma3WhTpgE+}F#p~*bqL)ZYn`y8- zBOJ+jO4A2S!yO<}KP2QQ_3v@|Y0!qSg0~x9LPU!Rsy0*lW)2#guxB_)5P-_Hzz)sa zrnuTszvZ!oPt?A{2s%#E?qLUMss-0P-a={w>U|QXvO8{_pDLhOoY0}ZSU>&a#hJ<$ zf4Q&uT+Go7?*M0-NYFE>V%3O24hlHr&CvTIS_##QeB#n}e(gAe6vWs=NZv-DofbkO zu7$-h7Q@{+$HyEaDZEwf6AwUFq;NBnTgsf5s%mT33zz?)Ep+-3VmZ8*J#3y~)Ura$ zpPFz&43@7o6>!a?EZ!3?!?z=`K9*}HvAgu@#TSq?Ptjq6-{ylGIr3f2q%wW0|I7*vVROWS&K z1ujjlesAY3i{h8`HADO2qu*4TzqaC^gbVQY}Bcx zdccd&Kl-bUFIRb=gLuNk3HsaqMMi`2e%ujt?uM0xCs*bj=EwvJFU`+a_d(+X)YjtG z8ViTUA+`cG73Cc^6!T_s=HK)o?m&=mp;4>0A$DnH#54&G^7{I|FO#0N%dZAibZ>6* z?nPYXp5X^8B9a_9oS$PjT-x+F#$I{v>ysq>cBG2e?JyMGV2r`NPxrsx8;iIjX^q~Dr;D*ylh diff --git a/kerberosV/src/doc/doxyout/ntlm/html/group__ntlm__core.html b/kerberosV/src/doc/doxyout/ntlm/html/group__ntlm__core.html deleted file mode 100644 index ad873037941..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/group__ntlm__core.html +++ /dev/null @@ -1,936 +0,0 @@ - - -Heimdalntlmlibrary: Heimdal NTLM library - - - -

-keyhole logo -

- - - -
-

Heimdal NTLM library

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

void heim_ntlm_free_buf (struct ntlm_buf *p)
void heim_ntlm_free_targetinfo (struct ntlm_targetinfo *ti)
int heim_ntlm_encode_targetinfo (const struct ntlm_targetinfo *ti, int ucs2, struct ntlm_buf *data)
int heim_ntlm_decode_targetinfo (const struct ntlm_buf *data, int ucs2, struct ntlm_targetinfo *ti)
void heim_ntlm_free_type1 (struct ntlm_type1 *data)
int heim_ntlm_encode_type1 (const struct ntlm_type1 *type1, struct ntlm_buf *data)
void heim_ntlm_free_type2 (struct ntlm_type2 *data)
int heim_ntlm_encode_type2 (const struct ntlm_type2 *type2, struct ntlm_buf *data)
void heim_ntlm_free_type3 (struct ntlm_type3 *data)
int heim_ntlm_encode_type3 (const struct ntlm_type3 *type3, struct ntlm_buf *data)
int heim_ntlm_nt_key (const char *password, struct ntlm_buf *key)
int heim_ntlm_calculate_ntlm1 (void *key, size_t len, unsigned char challenge[8], struct ntlm_buf *answer)
int heim_ntlm_build_ntlm1_master (void *key, size_t len, struct ntlm_buf *session, struct ntlm_buf *master)
int heim_ntlm_build_ntlm2_master (void *key, size_t len, struct ntlm_buf *blob, struct ntlm_buf *session, struct ntlm_buf *master)
int heim_ntlm_keyex_unwrap (struct ntlm_buf *baseKey, struct ntlm_buf *encryptedSession, struct ntlm_buf *session)
int heim_ntlm_ntlmv2_key (const void *key, size_t len, const char *username, const char *target, unsigned char ntlmv2[16])
int heim_ntlm_calculate_lm2 (const void *key, size_t len, const char *username, const char *target, const unsigned char serverchallenge[8], unsigned char ntlmv2[16], struct ntlm_buf *answer)
int heim_ntlm_calculate_ntlm2 (const void *key, size_t len, const char *username, const char *target, const unsigned char serverchallenge[8], const struct ntlm_buf *infotarget, unsigned char ntlmv2[16], struct ntlm_buf *answer)
int heim_ntlm_verify_ntlm2 (const void *key, size_t len, const char *username, const char *target, time_t now, const unsigned char serverchallenge[8], const struct ntlm_buf *answer, struct ntlm_buf *infotarget, unsigned char ntlmv2[16])
-

Detailed Description

-The NTLM core functions implement the string2key generation function, message encode and decode function, and the hash function functions.

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int heim_ntlm_build_ntlm1_master (void *  key,
size_t  len,
struct ntlm_buf session,
struct ntlm_buf master 
)
-
-
- -

-Generates an NTLMv1 session random with assosited session master key.

-

Parameters:
- - - - - -
key the ntlm v1 key
len length of key
session generated session nonce, should be freed with heim_ntlm_free_buf().
master calculated session master key, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int heim_ntlm_build_ntlm2_master (void *  key,
size_t  len,
struct ntlm_buf blob,
struct ntlm_buf session,
struct ntlm_buf master 
)
-
-
- -

-Generates an NTLMv2 session random with associated session master key.

-

Parameters:
- - - - - - -
key the NTLMv2 key
len length of key
blob the NTLMv2 "blob"
session generated session nonce, should be freed with heim_ntlm_free_buf().
master calculated session master key, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int heim_ntlm_calculate_lm2 (const void *  key,
size_t  len,
const char *  username,
const char *  target,
const unsigned char  serverchallenge[8],
unsigned char  ntlmv2[16],
struct ntlm_buf answer 
)
-
-
- -

-Calculate LMv2 response

-

Parameters:
- - - - - - - - -
key the ntlm key
len length of key
username name of the user, as sent in the message, assumed to be in UTF8.
target the name of the target, assumed to be in UTF8.
serverchallenge challenge as sent by the server in the type2 message.
ntlmv2 calculated session key
answer ntlm response answer, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int heim_ntlm_calculate_ntlm1 (void *  key,
size_t  len,
unsigned char  challenge[8],
struct ntlm_buf answer 
)
-
-
- -

-Calculate NTLMv1 response hash

-

Parameters:
- - - - - -
key the ntlm v1 key
len length of key
challenge sent by the server
answer calculated answer, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int heim_ntlm_calculate_ntlm2 (const void *  key,
size_t  len,
const char *  username,
const char *  target,
const unsigned char  serverchallenge[8],
const struct ntlm_buf infotarget,
unsigned char  ntlmv2[16],
struct ntlm_buf answer 
)
-
-
- -

-Calculate NTLMv2 response

-

Parameters:
- - - - - - - - - -
key the ntlm key
len length of key
username name of the user, as sent in the message, assumed to be in UTF8.
target the name of the target, assumed to be in UTF8.
serverchallenge challenge as sent by the server in the type2 message.
infotarget infotarget as sent by the server in the type2 message.
ntlmv2 calculated session key
answer ntlm response answer, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int heim_ntlm_decode_targetinfo (const struct ntlm_buf data,
int  ucs2,
struct ntlm_targetinfo *  ti 
)
-
-
- -

-Decodes an NTLM targetinfo message

-

Parameters:
- - - - -
data input data buffer with the encode NTLM targetinfo message
ucs2 if the strings should be encoded with ucs2 (selected by flag in message).
ti the decoded target info, should be freed with heim_ntlm_free_targetinfo().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int heim_ntlm_encode_targetinfo (const struct ntlm_targetinfo *  ti,
int  ucs2,
struct ntlm_buf data 
)
-
-
- -

-Encodes a ntlm_targetinfo message.

-

Parameters:
- - - - -
ti the ntlm_targetinfo message to encode.
ucs2 ignored
data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int heim_ntlm_encode_type1 (const struct ntlm_type1 type1,
struct ntlm_buf data 
)
-
-
- -

-Encodes an ntlm_type1 message.

-

Parameters:
- - - -
type1 the ntlm_type1 message to encode.
data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int heim_ntlm_encode_type2 (const struct ntlm_type2 type2,
struct ntlm_buf data 
)
-
-
- -

-Encodes an ntlm_type2 message.

-

Parameters:
- - - -
type2 the ntlm_type2 message to encode.
data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int heim_ntlm_encode_type3 (const struct ntlm_type3 type3,
struct ntlm_buf data 
)
-
-
- -

-Encodes an ntlm_type3 message.

-

Parameters:
- - - -
type3 the ntlm_type3 message to encode.
data is the return buffer with the encoded message, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - -
void heim_ntlm_free_buf (struct ntlm_buf p  ) 
-
-
- -

-heim_ntlm_free_buf frees the ntlm buffer

-

Parameters:
- - -
p buffer to be freed
-
- -
-

- -

-
- - - - - - - - - -
void heim_ntlm_free_targetinfo (struct ntlm_targetinfo *  ti  ) 
-
-
- -

-Frees the ntlm_targetinfo message

-

Parameters:
- - -
ti targetinfo to be freed
-
- -
-

- -

-
- - - - - - - - - -
void heim_ntlm_free_type1 (struct ntlm_type1 data  ) 
-
-
- -

-Frees the ntlm_type1 message

-

Parameters:
- - -
data message to be freed
-
- -
-

- -

-
- - - - - - - - - -
void heim_ntlm_free_type2 (struct ntlm_type2 data  ) 
-
-
- -

-Frees the ntlm_type2 message

-

Parameters:
- - -
data message to be freed
-
- -
-

- -

-
- - - - - - - - - -
void heim_ntlm_free_type3 (struct ntlm_type3 data  ) 
-
-
- -

-Frees the ntlm_type3 message

-

Parameters:
- - -
data message to be freed
-
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int heim_ntlm_keyex_unwrap (struct ntlm_buf baseKey,
struct ntlm_buf encryptedSession,
struct ntlm_buf session 
)
-
-
- -

-Given a key and encrypted session, unwrap the session key

-

Parameters:
- - - - -
baseKey the sessionBaseKey
encryptedSession encrypted session, type3.session field.
session generated session nonce, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int heim_ntlm_nt_key (const char *  password,
struct ntlm_buf key 
)
-
-
- -

-Calculate the NTLM key, the password is assumed to be in UTF8.

-

Parameters:
- - - -
password password to calcute the key for.
key calcuted key, should be freed with heim_ntlm_free_buf().
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int heim_ntlm_ntlmv2_key (const void *  key,
size_t  len,
const char *  username,
const char *  target,
unsigned char  ntlmv2[16] 
)
-
-
- -

-Generates an NTLMv2 session key.

-

Parameters:
- - - - - - -
key the ntlm key
len length of key
username name of the user, as sent in the message, assumed to be in UTF8.
target the name of the target, assumed to be in UTF8.
ntlmv2 the ntlmv2 session key
-
-
Returns:
0 on success, or an error code on failure.
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int heim_ntlm_verify_ntlm2 (const void *  key,
size_t  len,
const char *  username,
const char *  target,
time_t  now,
const unsigned char  serverchallenge[8],
const struct ntlm_buf answer,
struct ntlm_buf infotarget,
unsigned char  ntlmv2[16] 
)
-
-
- -

-Verify NTLMv2 response.

-

Parameters:
- - - - - - - - - - -
key the ntlm key
len length of key
username name of the user, as sent in the message, assumed to be in UTF8.
target the name of the target, assumed to be in UTF8.
now the time now (0 if the library should pick it up itself)
serverchallenge challenge as sent by the server in the type2 message.
answer ntlm response answer, should be freed with heim_ntlm_free_buf().
infotarget infotarget as sent by the server in the type2 message.
ntlmv2 calculated session key
-
-
Returns:
In case of success 0 is return, an errors, a errno in what went wrong.
- -
-

-

-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/index.html b/kerberosV/src/doc/doxyout/ntlm/html/index.html deleted file mode 100644 index 3a80f254395..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - -Heimdalntlmlibrary: Heimdal NTLM library - - - -

-keyhole logo -

- - - -
-

Heimdal NTLM library

-

-

1.5.3

-Introduction

-Heimdal libheimntlm library is a implementation of the NTLM protocol, both version 1 and 2. The GSS-API mech that uses this library adds support for transport encryption and integrity checking.

-NTLM is a protocol for mutual authentication, its still used in many protocol where Kerberos is not support, one example is EAP/X802.1x mechanism LEAP from Microsoft and Cisco.

-This is a support library for the core protocol, its used in Heimdal to implement and GSS-API mechanism. There is also support in the KDC to do remote digest authenticiation, this to allow services to authenticate users w/o direct access to the users ntlm hashes (same as Kerberos arcfour enctype keys).

-More information about the NTLM protocol can found here http://davenport.sourceforge.net/ntlm.html .

-The Heimdal projects web page: http://www.h5l.org/

-NTLM Example

-Example to to use test_ntlm::c .
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/modules.html b/kerberosV/src/doc/doxyout/ntlm/html/modules.html deleted file mode 100644 index f49f60e5f93..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/modules.html +++ /dev/null @@ -1,30 +0,0 @@ - - -Heimdalntlmlibrary: Module Index - - - -

-keyhole logo -

- - - -
-

Modules

Here is a list of all modules: -
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__buf.html b/kerberosV/src/doc/doxyout/ntlm/html/structntlm__buf.html deleted file mode 100644 index 043f069050a..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__buf.html +++ /dev/null @@ -1,82 +0,0 @@ - - -Heimdalntlmlibrary: ntlm_buf Struct Reference - - - -

-keyhole logo -

- - - -
-

ntlm_buf Struct Reference

#include <heimntlm.h> -

- - - - - - - -

Data Fields

size_t length
void * data
-


Detailed Description

-Buffer for storing data in the NTLM library. When filled in by the library it should be freed with heim_ntlm_free_buf().
Examples:
- -

-test_ntlm.c.


Field Documentation

- -
-
- - - - -
size_t ntlm_buf::length
-
-
- -

-length buffer data

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
void* ntlm_buf::data
-
-
- -

-pointer to the data itself

Examples:
-test_ntlm.c.
-
-

-


The documentation for this struct was generated from the following file:
    -
  • /Users/lha/src/heimdal/heimdal-release/heimdal-1.5.3/lib/ntlm/heimntlm.h
-
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type1.html b/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type1.html deleted file mode 100644 index e808b7849d2..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type1.html +++ /dev/null @@ -1,118 +0,0 @@ - - -Heimdalntlmlibrary: ntlm_type1 Struct Reference - - - -

-keyhole logo -

- - - -
-

ntlm_type1 Struct Reference

#include <heimntlm.h> -

- - - - - - - - - - - -

Data Fields

uint32_t flags
char * domain
char * hostname
uint32_t os [2]
-


Detailed Description

-Struct for the NTLM type1 message info, the strings is assumed to be in UTF8. When filled in by the library it should be freed with heim_ntlm_free_type1().
Examples:
- -

-test_ntlm.c.


Field Documentation

- -
-
- - - - -
uint32_t ntlm_type1::flags
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
char* ntlm_type1::domain
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
char* ntlm_type1::hostname
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
uint32_t ntlm_type1::os[2]
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

-


The documentation for this struct was generated from the following file:
    -
  • /Users/lha/src/heimdal/heimdal-release/heimdal-1.5.3/lib/ntlm/heimntlm.h
-
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2.html b/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2.html deleted file mode 100644 index 3d28e02fd0e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2.html +++ /dev/null @@ -1,159 +0,0 @@ - - -Heimdalntlmlibrary: ntlm_type2 Struct Reference - - - -

-keyhole logo -

- - - -
-

ntlm_type2 Struct Reference

#include <heimntlm.h> -

-

-Collaboration diagram for ntlm_type2:
-
-

Collaboration graph
- - -
[legend]
- - - - - - - - - - - - - - - -

Data Fields

uint32_t flags
char * targetname
struct ntlm_buf targetinfo
unsigned char challenge [8]
uint32_t context [2]
uint32_t os [2]
-

Detailed Description

-Struct for the NTLM type2 message info, the strings is assumed to be in UTF8. When filled in by the library it should be freed with heim_ntlm_free_type2().
Examples:
- -

-test_ntlm.c.


Field Documentation

- -
-
- - - - -
uint32_t ntlm_type2::flags
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
char* ntlm_type2::targetname
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
struct ntlm_buf ntlm_type2::targetinfo [read]
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
unsigned char ntlm_type2::challenge[8]
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
uint32_t ntlm_type2::context[2]
-
-
- -

- -

-

- -

-
- - - - -
uint32_t ntlm_type2::os[2]
-
-
- -

- -

-

-


The documentation for this struct was generated from the following file:
    -
  • /Users/lha/src/heimdal/heimdal-release/heimdal-1.5.3/lib/ntlm/heimntlm.h
-
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.map b/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.map deleted file mode 100644 index 9e6cd72b444..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.map +++ /dev/null @@ -1 +0,0 @@ - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.md5 b/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.md5 deleted file mode 100644 index 4340819135c..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -b5989391473842dda9191d0175c17177 \ No newline at end of file diff --git a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.png b/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type2__coll__graph.png deleted file mode 100644 index 14c79b434fb7ef5466409f4a94183e39173c77ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 821 zcmV-51Iqk~P)CdCzrO$g z0RR90I`NFp00001bW%=J06^y0W&i*Jr%6OXRA_aBN51CKK}jj9Am)fsda4^d49BGo zofSF7?kCZ+M~X2P`PW6K?zUKDk;U9% zYSx*>tBPOZX|oigEJXQjJFr81z8@MVJ!Z0q+eO;N+=NRCQZ`U_vcv-%Sy5(?ntdK7 zW)eH8K&S-q(|l|_vxryN1+d8C zS;Q;cb68~YTH=;}FI@TkY%w)JlOV#PxO76A#+Z6c zt`ZHjpj(Ug3mV&i0%#kmiKAf4o#NF0pw&LAhN1&weZyu^S*1ga?#S1SV#Lw!+5kqS zRUe(YV|`oi5sjzp;9+U}mw#`HS;d - -Heimdalntlmlibrary: ntlm_type3 Struct Reference - - - -

-keyhole logo -

- - - -
-

ntlm_type3 Struct Reference

#include <heimntlm.h> -

-

-Collaboration diagram for ntlm_type3:
-
-

Collaboration graph
- - -
[legend]
- - - - - - - - - - - - - - - - - - - -

Data Fields

uint32_t flags
char * username
char * targetname
struct ntlm_buf lm
struct ntlm_buf ntlm
struct ntlm_buf sessionkey
char * ws
uint32_t os [2]
-

Detailed Description

-Struct for the NTLM type3 message info, the strings is assumed to be in UTF8. When filled in by the library it should be freed with heim_ntlm_free_type3().
Examples:
- -

-test_ntlm.c.


Field Documentation

- -
-
- - - - -
uint32_t ntlm_type3::flags
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
char* ntlm_type3::username
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
char* ntlm_type3::targetname
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
struct ntlm_buf ntlm_type3::lm [read]
-
-
- -

- -

-

- -

-
- - - - -
struct ntlm_buf ntlm_type3::ntlm [read]
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
struct ntlm_buf ntlm_type3::sessionkey [read]
-
-
- -

- -

-

- -

-
- - - - -
char* ntlm_type3::ws
-
-
- -

-

Examples:
-test_ntlm.c.
-
-

- -

-
- - - - -
uint32_t ntlm_type3::os[2]
-
-
- -

- -

-

-


The documentation for this struct was generated from the following file:
    -
  • /Users/lha/src/heimdal/heimdal-release/heimdal-1.5.3/lib/ntlm/heimntlm.h
-
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.map b/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.map deleted file mode 100644 index 9e6cd72b444..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.map +++ /dev/null @@ -1 +0,0 @@ - diff --git a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.md5 b/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.md5 deleted file mode 100644 index 1c9e7239dc0..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -e51b24543271b5e19333877ec8086fcd \ No newline at end of file diff --git a/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.png b/kerberosV/src/doc/doxyout/ntlm/html/structntlm__type3__coll__graph.png deleted file mode 100644 index 6553470777e867e963e06dddf4943589b6138228..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 951 zcmV;o14#UdP)^jKRM@L^@Ul$h_cXxNEr>DQa zzW@LL|Ns9$to#Q60004WQchCOUXKLDy$FO0h z{h4WtEg=Vy(4Cic;PgFiEv1_c@Agvoo8C=Fl$YQ{EYrlp<^FxaF1}wVk)F zKpCtN``C8M_9t+T-Im)NZ-@3a?(*8fwnB{BnZVwMT@X8bTzhNS#h!Uj^yA9SHruzi zXN6>!zlr9BWcf#8*+~)$znvWkUu-8&w&UP;vXk@eDEN)+B#DUM$aa1NmTk7#zNQ^* zsex^_SAS&qo7YF!1K;`{X@7p}8`B;i*M`3ZWSi~y_QJsSE$nN~V~@4Rmu?TRXO1dS z?a8IvUG0gb+g~|c1L?vV4Lj=+t-}G2d?MuF7ds~9ohaP zKp1NkJxXP5?qYuH#xk6?RXd@(B&C|%h9*_|@JgGWrpW~!P|7q5v5@AWknX2%Oj2o^ zYH_MH?WDe<+>qm3?H0J{Fd^o)?qM?bs8KVa)8jvsv&pS8`dM%PPKC&2v&wBK7Pes; z=}#xApjrsI^VABt#kQ`NL(EVtYw1>kzFDiTW7qFxyrIp~{|Eray zwlb<}%I#u4rB`my=xZpot`ySvUMRP-EH~NOqo(uLt!Vdasqlxgx+`MZ8vu!E~1P2NV|Vb8oo}lXP+b6Y_sj{y}}Ipl)(1! Z;U7ou&kQ#A=NSM1002ovPDHLkV1fWC@pk|K diff --git a/kerberosV/src/doc/doxyout/ntlm/html/tab_b.gif b/kerberosV/src/doc/doxyout/ntlm/html/tab_b.gif deleted file mode 100644 index 0d623483ffdf5f9f96900108042a7ab0643fe2a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 ncmZ?wbhEHbWMp7uXkcJy*>IeJfk6j|fqX^=1|}vKMh0sDa2W*H diff --git a/kerberosV/src/doc/doxyout/ntlm/html/tab_l.gif b/kerberosV/src/doc/doxyout/ntlm/html/tab_l.gif deleted file mode 100644 index 9b1e6337c9299a700401a2a78a2c6ffced475216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 706 zcmZ?wbhEHbZT`}F1e&(Gg}Y(8=I;HA5#Z$3JI=gGB)FQ#odI(O&E^@q;x zK6mr*m3xOS-#u~t!I@i+u0DKm^U160k6t`|^WpV}&n+8{U%dD9&a>B#U%!9-@yol< zU%&tQ{rk_K|NsC0`}dE5ET99@1@a36+kb~?0UJ*yc&I3X_m z!ND^5$O7$#8OFRuDhG}!?8z?cdZK&!`PWjdR;Aj^wZ` zeK{IEYHBJ)6K8VIp1`BVt++swf6j+=L{p1*nO(VhE`pFexG@5$|>uaCcd z`0m=9m+yak{QmXN#Sc$^{$X9h9&q2jiKAI|&T)a;PPx2K9p`YIdw8HtR5k2Q$2-O2 z*;3y{MQ-RnJTgJfI&R5|O)AHxDf_00XbPvDZPy4t=hHd)nfLPvms&O`Ok(sD()5v$ z5U@&h;a=#xbxVbo2~X&Xj0Ie(f{v>vERH+qC+nTG=B8Nca=wU-O$?1&vUgV~9=!H; zx>3p9Yn%*<>t~sk+&0xfyS8RsPfYBd<~wWK%j-LmpU>O7yX^h#UCp1x-p#i7@bE;py8XI6 zmY<)m>~)W~yIWcMVoiPg{duuf<*)9qZ9l$m*Ph&W&$jlv*Vpa+{pH@n=IQ$L?0$ax ec60Ul|8o2P|NVbd{6P)#weSbE3}s?04AuZvx_~SI diff --git a/kerberosV/src/doc/doxyout/ntlm/html/tab_r.gif b/kerberosV/src/doc/doxyout/ntlm/html/tab_r.gif deleted file mode 100644 index ce9dd9f533cb5486d6941844f442b59d4a9e9175..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2585 zcmbV}`9Bkk1ILFF--w5zJc=ZZT(zjE=;2|_S)Qm~rCWz1Pc)KPl;jv%A#&v2*x}yc zmf2~Jm~&=xjJY?PqwIN}f8qQ2{r$uH{c*nJbmr{cR5??*egHrs-B=MzCF`3%e{FAW z{oL5xTHn~5TM{jaB;@|_Ue5F&Zb@p(kMyG{*;gWDg zyeL|eZf7Qd8=#bXzSiR{yzRgLSj-fJS8>lBjVHN z^o-0eS=nE6a`W;LChBs=`+QAJP~{b93>H^eRb5kCSC1zUNezun%`L5M?RDzv#%jk7 zYVRX=vATPD`+oEfum^{RM@GjuP?-r=yh0!p;Vx^T9G7~`7%5ydH%70=jyJ;;`d;hv92x3R=z{xp+Lg2!*@OK*K15-t&okoPtSED)h&$RLxdbA zseWm^C3d%-yRNi-ryk^!ek+C`n&~cd$#ZWct_cUL{l~i+Nzx^5d!n94(>bW-iL~Rl z&8r)?q|1DIo=0=judQ{FaGcfLERz8gfn3-Qt<2lksh{mzpT}DXxUuR^z=^key&q4! z+wWI45vL0k$R^(F#{qfqhUsN@WA+w-V?LPH33!Q?WFSB3)WBojE@hK41Nb?KfS+Qo zXgrzfsP$wr4Qzy*{OD>uJBjdgGM@VMml5)2f~_}lD*YyOb}Hjeobhz#4c`w(l^>KK zr?Ud;W~Z}*w;%hZ|2^p^+f06gJDJQD zeIhGADbDmm&6arh(q>EZ<7mjzg7l|z$hRL8=1>)Nv=S7CY$B}iYJ&*T_-T_OG*L1q ztZ3Lana33?y3AKnyq^YCF|4x%Rb5WU&2qcl{TFKey%QJeMxn^SdT!hZ5+0i1zeusiYVp-phBl7b5+Px-X&LhByq z0F&<;K0l2+v>qiHlXb#$jXMv$uK-dEGE9L~qtdU(XeRXmvu*K2Q&6!fD**JxYP4b4BR7FdJ$Qx9G9`J%-_X!a#LGpp3g9)VWytGCa;7`S1_e8F~!R+aSJ zOF17p2`H?2kPs8Q`_;U}+D%3p zs2-0BTqFwpUoBk`?P;iPQ(IbEA|JmMx!P&YYG|R@S=5Mnw;-?A6rEEVyV%d7{iU4a zNk`i!%F(Ykpm`}#oH;BjY->@b8vQedv;pza2FL&*6ufjd+*3Ute&>kes~TU?^KkojsTh(o~(3tk1Y6>4(yn( z#U*ID9@eg-beKo1B;HXe+}{Z%n@7m0+yxivuqk9~;!1LGQlah)xYK4>wgL}l6dsaN zIxlRlq`*`j9PG4*0hD6YV_b_2w5b#)o7J?`q#{GjvvKlD`T*dWcZx<-s(ZvLB44E# z=!|sw!?)@%y$oRNL#25WS3lzdii}TuQ3?CLnvQ1_n};2sT_;Y;#d3=+-(O% zMN$>O!3;ke(UuLR%h_&)N zs^!-@A>QR}4yB1bPp`9S19ikTbZ~O{&FF-yHK{En;mmShDUIEw03`j(DBIsM}Rjki2J#SQa3gFZTKBPDeIiLt9Z z%bL3(B@Qw%(B`wSMS~dPh$=R`(}lBoFXKy(s|*{#ru$wjsBc_O#zxNk9w+UUHmx(U zmJ8+M+ndtnZ<7|VU9Mbt61zpo9T&3%Wx&XII=#QJxjR`CZf22ac3d51Z?GD%LEe_&*t46Qf;4`bZ7p2K(Ab5>GfT^}4! zBT&HZD`^PEgWoI&{~o-ID0F?O`75sm(87x%A{(}Ch1)QlzdJ)1B-eqe5a(weg0`4lQIf1evjvbBY50DVbzO7CLf|vP z2#0(U-|jZ`H{y5N^o7%iK6H>_HEGN->U6^!)1{XpJV!!4(Ig7wzZQ*9WYF4X1rG0x z=1uA@i`rIAciubDC{;~b(|&|A@xkjRP5aRcvRU9tvIm}jDB6J eQ0-6-y)mpwdT=ayS0tBxKDA*~;EWmo diff --git a/kerberosV/src/doc/doxyout/ntlm/html/tabs.css b/kerberosV/src/doc/doxyout/ntlm/html/tabs.css deleted file mode 100644 index 95f00a91da3..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/tabs.css +++ /dev/null @@ -1,102 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} diff --git a/kerberosV/src/doc/doxyout/ntlm/html/test__ntlm_8c-example.html b/kerberosV/src/doc/doxyout/ntlm/html/test__ntlm_8c-example.html deleted file mode 100644 index 5f1484331a5..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/html/test__ntlm_8c-example.html +++ /dev/null @@ -1,408 +0,0 @@ - - -Heimdalntlmlibrary: test_ntlm.c - - - -

-keyhole logo -

- - - -
-

test_ntlm.c

Example how to use the NTLM primitives.

-

/*
- * Copyright (c) 2006 - 2007 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 "config.h"
-
-#include <stdio.h>
-#include <err.h>
-#include <roken.h>
-#include <getarg.h>
-
-#include <krb5-types.h> /* or <inttypes.h> */
-#include <heimntlm.h>
-
-static int
-test_parse(void)
-{
-    const char *user = "foo",
-        *domain = "mydomain",
-        *password = "digestpassword",
-        *target = "DOMAIN";
-    struct ntlm_type1 type1;
-    struct ntlm_type2 type2;
-    struct ntlm_type3 type3;
-    struct ntlm_buf data;
-    int ret, flags;
-
-    memset(&type1, 0, sizeof(type1));
-
-    type1.flags = NTLM_NEG_UNICODE|NTLM_NEG_TARGET|NTLM_NEG_NTLM;
-    type1.domain = rk_UNCONST(domain);
-    type1.hostname = NULL;
-    type1.os[0] = 0;
-    type1.os[1] = 0;
-
-    ret = heim_ntlm_encode_type1(&type1, &data);
-    if (ret)
-        errx(1, "heim_ntlm_encode_type1");
-
-    memset(&type1, 0, sizeof(type1));
-
-    ret = heim_ntlm_decode_type1(&data, &type1);
-    free(data.data);
-    if (ret)
-        errx(1, "heim_ntlm_encode_type1");
-
-    heim_ntlm_free_type1(&type1);
-
-    /*
-     *
-     */
-
-    memset(&type2, 0, sizeof(type2));
-
-    flags = NTLM_NEG_UNICODE | NTLM_NEG_NTLM | NTLM_TARGET_DOMAIN;
-    type2.flags = flags;
-
-    memset(type2.challenge, 0x7f, sizeof(type2.challenge));
-    type2.targetname = rk_UNCONST(target);
-    type2.targetinfo.data = NULL;
-    type2.targetinfo.length = 0;
-
-    ret = heim_ntlm_encode_type2(&type2, &data);
-    if (ret)
-        errx(1, "heim_ntlm_encode_type2");
-
-    memset(&type2, 0, sizeof(type2));
-
-    ret = heim_ntlm_decode_type2(&data, &type2);
-    free(data.data);
-    if (ret)
-        errx(1, "heim_ntlm_decode_type2");
-
-    heim_ntlm_free_type2(&type2);
-
-    /*
-     *
-     */
-
-    memset(&type3, 0, sizeof(type3));
-
-    type3.flags = flags;
-    type3.username = rk_UNCONST(user);
-    type3.targetname = rk_UNCONST(target);
-    type3.ws = rk_UNCONST("workstation");
-
-    {
-        struct ntlm_buf key;
-        heim_ntlm_nt_key(password, &key);
-
-        heim_ntlm_calculate_ntlm1(key.data, key.length,
-                                  type2.challenge,
-                                  &type3.ntlm);
-        free(key.data);
-    }
-
-    ret = heim_ntlm_encode_type3(&type3, &data);
-    if (ret)
-        errx(1, "heim_ntlm_encode_type3");
-
-    free(type3.ntlm.data);
-
-    memset(&type3, 0, sizeof(type3));
-
-    ret = heim_ntlm_decode_type3(&data, 1, &type3);
-    free(data.data);
-    if (ret)
-        errx(1, "heim_ntlm_decode_type3");
-
-    if (strcmp("workstation", type3.ws) != 0)
-        errx(1, "type3 ws wrong");
-
-    if (strcmp(target, type3.targetname) != 0)
-        errx(1, "type3 targetname wrong");
-
-    if (strcmp(user, type3.username) != 0)
-        errx(1, "type3 username wrong");
-
-
-    heim_ntlm_free_type3(&type3);
-
-    /*
-     * NTLMv2
-     */
-
-    memset(&type2, 0, sizeof(type2));
-
-    flags = NTLM_NEG_UNICODE | NTLM_NEG_NTLM | NTLM_TARGET_DOMAIN;
-    type2.flags = flags;
-
-    memset(type2.challenge, 0x7f, sizeof(type2.challenge));
-    type2.targetname = rk_UNCONST(target);
-    type2.targetinfo.data = "\x00\x00";
-    type2.targetinfo.length = 2;
-
-    ret = heim_ntlm_encode_type2(&type2, &data);
-    if (ret)
-        errx(1, "heim_ntlm_encode_type2");
-
-    memset(&type2, 0, sizeof(type2));
-
-    ret = heim_ntlm_decode_type2(&data, &type2);
-    free(data.data);
-    if (ret)
-        errx(1, "heim_ntlm_decode_type2");
-
-    heim_ntlm_free_type2(&type2);
-
-    return 0;
-}
-
-static int
-test_keys(void)
-{
-    const char
-        *username = "test",
-        *password = "test1234",
-        *target = "TESTNT";
-    const unsigned char
-        serverchallenge[8] = "\x67\x7f\x1c\x55\x7a\x5e\xe9\x6c";
-    struct ntlm_buf infotarget, infotarget2, answer, key;
-    unsigned char ntlmv2[16], ntlmv2_1[16];
-    int ret;
-
-    infotarget.length = 70;
-    infotarget.data =
-        "\x02\x00\x0c\x00\x54\x00\x45\x00\x53\x00\x54\x00\x4e\x00\x54\x00"
-        "\x01\x00\x0c\x00\x4d\x00\x45\x00\x4d\x00\x42\x00\x45\x00\x52\x00"
-        "\x03\x00\x1e\x00\x6d\x00\x65\x00\x6d\x00\x62\x00\x65\x00\x72\x00"
-            "\x2e\x00\x74\x00\x65\x00\x73\x00\x74\x00\x2e\x00\x63\x00\x6f"
-            "\x00\x6d\x00"
-        "\x00\x00\x00\x00";
-
-    answer.length = 0;
-    answer.data = NULL;
-
-    heim_ntlm_nt_key(password, &key);
-
-    ret = heim_ntlm_calculate_ntlm2(key.data,
-                                    key.length,
-                                    username,
-                                    target,
-                                    serverchallenge,
-                                    &infotarget,
-                                    ntlmv2,
-                                    &answer);
-    if (ret)
-        errx(1, "heim_ntlm_calculate_ntlm2");
-
-    ret = heim_ntlm_verify_ntlm2(key.data,
-                                 key.length,
-                                 username,
-                                 target,
-                                 0,
-                                 serverchallenge,
-                                 &answer,
-                                 &infotarget2,
-                                 ntlmv2_1);
-    if (ret)
-        errx(1, "heim_ntlm_verify_ntlm2");
-
-    if (memcmp(ntlmv2, ntlmv2_1, sizeof(ntlmv2)) != 0)
-        errx(1, "ntlm master key not same");
-
-    if (infotarget.length > infotarget2.length)
-        errx(1, "infotarget length");
-
-    if (memcmp(infotarget.data, infotarget2.data, infotarget.length) != 0)
-        errx(1, "infotarget not the same");
-
-    free(key.data);
-    free(answer.data);
-    free(infotarget2.data);
-
-    return 0;
-}
-
-static int
-test_ntlm2_session_resp(void)
-{
-    int ret;
-    struct ntlm_buf lm, ntlm;
-
-    const unsigned char lm_resp[24] =
-        "\xff\xff\xff\x00\x11\x22\x33\x44"
-        "\x00\x00\x00\x00\x00\x00\x00\x00"
-        "\x00\x00\x00\x00\x00\x00\x00\x00";
-    const unsigned char ntlm2_sess_resp[24] =
-        "\x10\xd5\x50\x83\x2d\x12\xb2\xcc"
-        "\xb7\x9d\x5a\xd1\xf4\xee\xd3\xdf"
-        "\x82\xac\xa4\xc3\x68\x1d\xd4\x55";
-
-    const unsigned char client_nonce[8] =
-        "\xff\xff\xff\x00\x11\x22\x33\x44";
-    const unsigned char server_challenge[8] =
-        "\x01\x23\x45\x67\x89\xab\xcd\xef";
-
-    const unsigned char ntlm_hash[16] =
-        "\xcd\x06\xca\x7c\x7e\x10\xc9\x9b"
-        "\x1d\x33\xb7\x48\x5a\x2e\xd8\x08";
-
-    ret = heim_ntlm_calculate_ntlm2_sess(client_nonce,
-                                         server_challenge,
-                                         ntlm_hash,
-                                         &lm,
-                                         &ntlm);
-    if (ret)
-        errx(1, "heim_ntlm_calculate_ntlm2_sess_resp");
-
-    if (lm.length != 24 || memcmp(lm.data, lm_resp, 24) != 0)
-        errx(1, "lm_resp wrong");
-    if (ntlm.length != 24 || memcmp(ntlm.data, ntlm2_sess_resp, 24) != 0)
-        errx(1, "ntlm2_sess_resp wrong");
-
-    free(lm.data);
-    free(ntlm.data);
-
-
-    return 0;
-}
-
-static int
-test_targetinfo(void)
-{
-    struct ntlm_targetinfo ti;
-    struct ntlm_buf buf;
-    const char *dnsservername = "dnsservername";
-    int ret;
-
-    memset(&ti, 0, sizeof(ti));
-
-    ti.dnsservername = rk_UNCONST(dnsservername);
-    ti.avflags = 1;
-    ret = heim_ntlm_encode_targetinfo(&ti, 1, &buf);
-    if (ret)
-        return ret;
-
-    memset(&ti, 0, sizeof(ti));
-
-    ret = heim_ntlm_decode_targetinfo(&buf, 1, &ti);
-    if (ret)
-        return ret;
-
-    if (ti.dnsservername == NULL ||
-        strcmp(ti.dnsservername, dnsservername) != 0)
-        errx(1, "ti.dnshostname != %s", dnsservername);
-    if (ti.avflags != 1)
-        errx(1, "ti.avflags != 1");
-
-    heim_ntlm_free_targetinfo(&ti);
-
-    return 0;
-}
-
-static int verbose_flag = 0;
-static int version_flag = 0;
-static int help_flag    = 0;
-
-static struct getargs args[] = {
-    {"verbose", 0,      arg_flag,       &verbose_flag, "verbose printing", NULL },
-    {"version", 0,      arg_flag,       &version_flag, "print version", NULL },
-    {"help",    0,      arg_flag,       &help_flag,  NULL, NULL }
-};
-
-static void
-usage (int ret)
-{
-    arg_printusage (args, sizeof(args)/sizeof(*args),
-                    NULL, "");
-    exit (ret);
-}
-
-int
-main(int argc, char **argv)
-{
-    int ret = 0, optind = 0;
-
-    setprogname(argv[0]);
-
-    if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind))
-        usage(1);
-
-    if (help_flag)
-        usage (0);
-
-    if(version_flag){
-        print_version(NULL);
-        exit(0);
-    }
-
-    argc -= optind;
-    argv += optind;
-
-    if (verbose_flag)
-        printf("test_parse\n");
-
-    ret += test_parse();
-    if (verbose_flag)
-        printf("test_keys\n");
-
-    ret += test_keys();
-    if (verbose_flag)
-        printf("test_ntlm2_session_resp\n");
-    ret += test_ntlm2_session_resp();
-
-    if (verbose_flag)
-        printf("test_targetinfo\n");
-    ret += test_targetinfo();
-
-    return ret;
-}
-
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalntlmlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/challenge.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/challenge.3 deleted file mode 100644 index a7659b3d1fe..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/challenge.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type2.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/context.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/context.3 deleted file mode 100644 index a7659b3d1fe..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/context.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type2.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/data.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/data.3 deleted file mode 100644 index 340108f66d7..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/data.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_buf.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/domain.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/domain.3 deleted file mode 100644 index d1020b43b40..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/domain.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type1.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/flags.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/flags.3 deleted file mode 100644 index d1020b43b40..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/flags.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type1.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_build_ntlm1_master.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_build_ntlm1_master.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_build_ntlm1_master.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_build_ntlm2_master.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_build_ntlm2_master.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_build_ntlm2_master.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_lm2.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_lm2.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_lm2.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_ntlm1.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_ntlm1.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_ntlm1.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_ntlm2.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_ntlm2.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_calculate_ntlm2.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_decode_targetinfo.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_decode_targetinfo.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_decode_targetinfo.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_targetinfo.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_targetinfo.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_targetinfo.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type1.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type1.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type1.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type2.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type2.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type2.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type3.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type3.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_encode_type3.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_buf.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_buf.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_buf.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_targetinfo.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_targetinfo.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_targetinfo.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type1.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type1.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type1.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type2.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type2.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type2.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type3.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type3.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_free_type3.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_keyex_unwrap.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_keyex_unwrap.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_keyex_unwrap.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_nt_key.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_nt_key.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_nt_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_ntlmv2_key.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_ntlmv2_key.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_ntlmv2_key.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_verify_ntlm2.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_verify_ntlm2.3 deleted file mode 100644 index c44afffe65e..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/heim_ntlm_verify_ntlm2.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_core.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/hostname.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/hostname.3 deleted file mode 100644 index d1020b43b40..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/hostname.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type1.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/length.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/length.3 deleted file mode 100644 index 340108f66d7..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_buf.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/lm.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/lm.3 deleted file mode 100644 index de392aede5f..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/lm.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type3.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm.3 deleted file mode 100644 index de392aede5f..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type3.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_buf.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_buf.3 deleted file mode 100644 index 3566cfdefc8..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_buf.3 +++ /dev/null @@ -1,48 +0,0 @@ -.TH "ntlm_buf" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalntlmlibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -ntlm_buf \- -.SH SYNOPSIS -.br -.PP -\fC#include \fP -.PP -.SS "Data Fields" - -.in +1c -.ti -1c -.RI "size_t \fBlength\fP" -.br -.ti -1c -.RI "void * \fBdata\fP" -.br -.in -1c -.SH "Detailed Description" -.PP -Buffer for storing data in the NTLM library. When filled in by the library it should be freed with \fBheim_ntlm_free_buf()\fP. -.PP -\fBExamples: \fP -.in +1c -.PP -\fBtest_ntlm.c\fP. -.SH "Field Documentation" -.PP -.SS "size_t \fBntlm_buf::length\fP" -.PP -length buffer data -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "void* \fBntlm_buf::data\fP" -.PP -pointer to the data itself -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. - -.SH "Author" -.PP -Generated automatically by Doxygen for Heimdalntlmlibrary from the source code. diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_core.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_core.3 deleted file mode 100644 index df164bfd7c5..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_core.3 +++ /dev/null @@ -1,421 +0,0 @@ -.TH "Heimdal NTLM library" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalntlmlibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal NTLM library \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "void \fBheim_ntlm_free_buf\fP (struct \fBntlm_buf\fP *p)" -.br -.ti -1c -.RI "void \fBheim_ntlm_free_targetinfo\fP (struct ntlm_targetinfo *ti)" -.br -.ti -1c -.RI "int \fBheim_ntlm_encode_targetinfo\fP (const struct ntlm_targetinfo *ti, int ucs2, struct \fBntlm_buf\fP *data)" -.br -.ti -1c -.RI "int \fBheim_ntlm_decode_targetinfo\fP (const struct \fBntlm_buf\fP *data, int ucs2, struct ntlm_targetinfo *ti)" -.br -.ti -1c -.RI "void \fBheim_ntlm_free_type1\fP (struct \fBntlm_type1\fP *data)" -.br -.ti -1c -.RI "int \fBheim_ntlm_encode_type1\fP (const struct \fBntlm_type1\fP *type1, struct \fBntlm_buf\fP *data)" -.br -.ti -1c -.RI "void \fBheim_ntlm_free_type2\fP (struct \fBntlm_type2\fP *data)" -.br -.ti -1c -.RI "int \fBheim_ntlm_encode_type2\fP (const struct \fBntlm_type2\fP *type2, struct \fBntlm_buf\fP *data)" -.br -.ti -1c -.RI "void \fBheim_ntlm_free_type3\fP (struct \fBntlm_type3\fP *data)" -.br -.ti -1c -.RI "int \fBheim_ntlm_encode_type3\fP (const struct \fBntlm_type3\fP *type3, struct \fBntlm_buf\fP *data)" -.br -.ti -1c -.RI "int \fBheim_ntlm_nt_key\fP (const char *password, struct \fBntlm_buf\fP *key)" -.br -.ti -1c -.RI "int \fBheim_ntlm_calculate_ntlm1\fP (void *key, size_t len, unsigned char challenge[8], struct \fBntlm_buf\fP *answer)" -.br -.ti -1c -.RI "int \fBheim_ntlm_build_ntlm1_master\fP (void *key, size_t len, struct \fBntlm_buf\fP *session, struct \fBntlm_buf\fP *master)" -.br -.ti -1c -.RI "int \fBheim_ntlm_build_ntlm2_master\fP (void *key, size_t len, struct \fBntlm_buf\fP *blob, struct \fBntlm_buf\fP *session, struct \fBntlm_buf\fP *master)" -.br -.ti -1c -.RI "int \fBheim_ntlm_keyex_unwrap\fP (struct \fBntlm_buf\fP *baseKey, struct \fBntlm_buf\fP *encryptedSession, struct \fBntlm_buf\fP *session)" -.br -.ti -1c -.RI "int \fBheim_ntlm_ntlmv2_key\fP (const void *key, size_t len, const char *username, const char *target, unsigned char ntlmv2[16])" -.br -.ti -1c -.RI "int \fBheim_ntlm_calculate_lm2\fP (const void *key, size_t len, const char *username, const char *target, const unsigned char serverchallenge[8], unsigned char ntlmv2[16], struct \fBntlm_buf\fP *answer)" -.br -.ti -1c -.RI "int \fBheim_ntlm_calculate_ntlm2\fP (const void *key, size_t len, const char *username, const char *target, const unsigned char serverchallenge[8], const struct \fBntlm_buf\fP *infotarget, unsigned char ntlmv2[16], struct \fBntlm_buf\fP *answer)" -.br -.ti -1c -.RI "int \fBheim_ntlm_verify_ntlm2\fP (const void *key, size_t len, const char *username, const char *target, time_t now, const unsigned char serverchallenge[8], const struct \fBntlm_buf\fP *answer, struct \fBntlm_buf\fP *infotarget, unsigned char ntlmv2[16])" -.br -.in -1c -.SH "Detailed Description" -.PP -The NTLM core functions implement the string2key generation function, message encode and decode function, and the hash function functions. -.SH "Function Documentation" -.PP -.SS "int heim_ntlm_build_ntlm1_master (void * key, size_t len, struct \fBntlm_buf\fP * session, struct \fBntlm_buf\fP * master)" -.PP -Generates an NTLMv1 session random with assosited session master key. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP the ntlm v1 key -.br -\fIlen\fP length of key -.br -\fIsession\fP generated session nonce, should be freed with \fBheim_ntlm_free_buf()\fP. -.br -\fImaster\fP calculated session master key, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_build_ntlm2_master (void * key, size_t len, struct \fBntlm_buf\fP * blob, struct \fBntlm_buf\fP * session, struct \fBntlm_buf\fP * master)" -.PP -Generates an NTLMv2 session random with associated session master key. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP the NTLMv2 key -.br -\fIlen\fP length of key -.br -\fIblob\fP the NTLMv2 'blob' -.br -\fIsession\fP generated session nonce, should be freed with \fBheim_ntlm_free_buf()\fP. -.br -\fImaster\fP calculated session master key, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_calculate_lm2 (const void * key, size_t len, const char * username, const char * target, const unsigned char serverchallenge[8], unsigned char ntlmv2[16], struct \fBntlm_buf\fP * answer)" -.PP -Calculate LMv2 response -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP the ntlm key -.br -\fIlen\fP length of key -.br -\fIusername\fP name of the user, as sent in the message, assumed to be in UTF8. -.br -\fItarget\fP the name of the target, assumed to be in UTF8. -.br -\fIserverchallenge\fP challenge as sent by the server in the type2 message. -.br -\fIntlmv2\fP calculated session key -.br -\fIanswer\fP ntlm response answer, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_calculate_ntlm1 (void * key, size_t len, unsigned char challenge[8], struct \fBntlm_buf\fP * answer)" -.PP -Calculate NTLMv1 response hash -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP the ntlm v1 key -.br -\fIlen\fP length of key -.br -\fIchallenge\fP sent by the server -.br -\fIanswer\fP calculated answer, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_calculate_ntlm2 (const void * key, size_t len, const char * username, const char * target, const unsigned char serverchallenge[8], const struct \fBntlm_buf\fP * infotarget, unsigned char ntlmv2[16], struct \fBntlm_buf\fP * answer)" -.PP -Calculate NTLMv2 response -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP the ntlm key -.br -\fIlen\fP length of key -.br -\fIusername\fP name of the user, as sent in the message, assumed to be in UTF8. -.br -\fItarget\fP the name of the target, assumed to be in UTF8. -.br -\fIserverchallenge\fP challenge as sent by the server in the type2 message. -.br -\fIinfotarget\fP infotarget as sent by the server in the type2 message. -.br -\fIntlmv2\fP calculated session key -.br -\fIanswer\fP ntlm response answer, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_decode_targetinfo (const struct \fBntlm_buf\fP * data, int ucs2, struct ntlm_targetinfo * ti)" -.PP -Decodes an NTLM targetinfo message -.PP -\fBParameters:\fP -.RS 4 -\fIdata\fP input data buffer with the encode NTLM targetinfo message -.br -\fIucs2\fP if the strings should be encoded with ucs2 (selected by flag in message). -.br -\fIti\fP the decoded target info, should be freed with \fBheim_ntlm_free_targetinfo()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_encode_targetinfo (const struct ntlm_targetinfo * ti, int ucs2, struct \fBntlm_buf\fP * data)" -.PP -Encodes a ntlm_targetinfo message. -.PP -\fBParameters:\fP -.RS 4 -\fIti\fP the ntlm_targetinfo message to encode. -.br -\fIucs2\fP ignored -.br -\fIdata\fP is the return buffer with the encoded message, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_encode_type1 (const struct \fBntlm_type1\fP * type1, struct \fBntlm_buf\fP * data)" -.PP -Encodes an \fBntlm_type1\fP message. -.PP -\fBParameters:\fP -.RS 4 -\fItype1\fP the \fBntlm_type1\fP message to encode. -.br -\fIdata\fP is the return buffer with the encoded message, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_encode_type2 (const struct \fBntlm_type2\fP * type2, struct \fBntlm_buf\fP * data)" -.PP -Encodes an \fBntlm_type2\fP message. -.PP -\fBParameters:\fP -.RS 4 -\fItype2\fP the \fBntlm_type2\fP message to encode. -.br -\fIdata\fP is the return buffer with the encoded message, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_encode_type3 (const struct \fBntlm_type3\fP * type3, struct \fBntlm_buf\fP * data)" -.PP -Encodes an \fBntlm_type3\fP message. -.PP -\fBParameters:\fP -.RS 4 -\fItype3\fP the \fBntlm_type3\fP message to encode. -.br -\fIdata\fP is the return buffer with the encoded message, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "void heim_ntlm_free_buf (struct \fBntlm_buf\fP * p)" -.PP -heim_ntlm_free_buf frees the ntlm buffer -.PP -\fBParameters:\fP -.RS 4 -\fIp\fP buffer to be freed -.RE -.PP - -.SS "void heim_ntlm_free_targetinfo (struct ntlm_targetinfo * ti)" -.PP -Frees the ntlm_targetinfo message -.PP -\fBParameters:\fP -.RS 4 -\fIti\fP targetinfo to be freed -.RE -.PP - -.SS "void heim_ntlm_free_type1 (struct \fBntlm_type1\fP * data)" -.PP -Frees the \fBntlm_type1\fP message -.PP -\fBParameters:\fP -.RS 4 -\fIdata\fP message to be freed -.RE -.PP - -.SS "void heim_ntlm_free_type2 (struct \fBntlm_type2\fP * data)" -.PP -Frees the \fBntlm_type2\fP message -.PP -\fBParameters:\fP -.RS 4 -\fIdata\fP message to be freed -.RE -.PP - -.SS "void heim_ntlm_free_type3 (struct \fBntlm_type3\fP * data)" -.PP -Frees the \fBntlm_type3\fP message -.PP -\fBParameters:\fP -.RS 4 -\fIdata\fP message to be freed -.RE -.PP - -.SS "int heim_ntlm_keyex_unwrap (struct \fBntlm_buf\fP * baseKey, struct \fBntlm_buf\fP * encryptedSession, struct \fBntlm_buf\fP * session)" -.PP -Given a key and encrypted session, unwrap the session key -.PP -\fBParameters:\fP -.RS 4 -\fIbaseKey\fP the sessionBaseKey -.br -\fIencryptedSession\fP encrypted session, type3.session field. -.br -\fIsession\fP generated session nonce, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_nt_key (const char * password, struct \fBntlm_buf\fP * key)" -.PP -Calculate the NTLM key, the password is assumed to be in UTF8. -.PP -\fBParameters:\fP -.RS 4 -\fIpassword\fP password to calcute the key for. -.br -\fIkey\fP calcuted key, should be freed with \fBheim_ntlm_free_buf()\fP. -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - -.SS "int heim_ntlm_ntlmv2_key (const void * key, size_t len, const char * username, const char * target, unsigned char ntlmv2[16])" -.PP -Generates an NTLMv2 session key. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP the ntlm key -.br -\fIlen\fP length of key -.br -\fIusername\fP name of the user, as sent in the message, assumed to be in UTF8. -.br -\fItarget\fP the name of the target, assumed to be in UTF8. -.br -\fIntlmv2\fP the ntlmv2 session key -.RE -.PP -\fBReturns:\fP -.RS 4 -0 on success, or an error code on failure. -.RE -.PP - -.SS "int heim_ntlm_verify_ntlm2 (const void * key, size_t len, const char * username, const char * target, time_t now, const unsigned char serverchallenge[8], const struct \fBntlm_buf\fP * answer, struct \fBntlm_buf\fP * infotarget, unsigned char ntlmv2[16])" -.PP -Verify NTLMv2 response. -.PP -\fBParameters:\fP -.RS 4 -\fIkey\fP the ntlm key -.br -\fIlen\fP length of key -.br -\fIusername\fP name of the user, as sent in the message, assumed to be in UTF8. -.br -\fItarget\fP the name of the target, assumed to be in UTF8. -.br -\fInow\fP the time now (0 if the library should pick it up itself) -.br -\fIserverchallenge\fP challenge as sent by the server in the type2 message. -.br -\fIanswer\fP ntlm response answer, should be freed with \fBheim_ntlm_free_buf()\fP. -.br -\fIinfotarget\fP infotarget as sent by the server in the type2 message. -.br -\fIntlmv2\fP calculated session key -.RE -.PP -\fBReturns:\fP -.RS 4 -In case of success 0 is return, an errors, a errno in what went wrong. -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type1.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type1.3 deleted file mode 100644 index 4db07238609..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type1.3 +++ /dev/null @@ -1,68 +0,0 @@ -.TH "ntlm_type1" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalntlmlibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -ntlm_type1 \- -.SH SYNOPSIS -.br -.PP -\fC#include \fP -.PP -.SS "Data Fields" - -.in +1c -.ti -1c -.RI "uint32_t \fBflags\fP" -.br -.ti -1c -.RI "char * \fBdomain\fP" -.br -.ti -1c -.RI "char * \fBhostname\fP" -.br -.ti -1c -.RI "uint32_t \fBos\fP [2]" -.br -.in -1c -.SH "Detailed Description" -.PP -Struct for the NTLM type1 message info, the strings is assumed to be in UTF8. When filled in by the library it should be freed with \fBheim_ntlm_free_type1()\fP. -.PP -\fBExamples: \fP -.in +1c -.PP -\fBtest_ntlm.c\fP. -.SH "Field Documentation" -.PP -.SS "uint32_t \fBntlm_type1::flags\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "char* \fBntlm_type1::domain\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "char* \fBntlm_type1::hostname\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "uint32_t \fBntlm_type1::os\fP[2]" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. - -.SH "Author" -.PP -Generated automatically by Doxygen for Heimdalntlmlibrary from the source code. diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type2.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type2.3 deleted file mode 100644 index 213894e1541..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type2.3 +++ /dev/null @@ -1,80 +0,0 @@ -.TH "ntlm_type2" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalntlmlibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -ntlm_type2 \- -.SH SYNOPSIS -.br -.PP -\fC#include \fP -.PP -.SS "Data Fields" - -.in +1c -.ti -1c -.RI "uint32_t \fBflags\fP" -.br -.ti -1c -.RI "char * \fBtargetname\fP" -.br -.ti -1c -.RI "struct \fBntlm_buf\fP \fBtargetinfo\fP" -.br -.ti -1c -.RI "unsigned char \fBchallenge\fP [8]" -.br -.ti -1c -.RI "uint32_t \fBcontext\fP [2]" -.br -.ti -1c -.RI "uint32_t \fBos\fP [2]" -.br -.in -1c -.SH "Detailed Description" -.PP -Struct for the NTLM type2 message info, the strings is assumed to be in UTF8. When filled in by the library it should be freed with \fBheim_ntlm_free_type2()\fP. -.PP -\fBExamples: \fP -.in +1c -.PP -\fBtest_ntlm.c\fP. -.SH "Field Documentation" -.PP -.SS "uint32_t \fBntlm_type2::flags\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "char* \fBntlm_type2::targetname\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "struct \fBntlm_buf\fP \fBntlm_type2::targetinfo\fP\fC [read]\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "unsigned char \fBntlm_type2::challenge\fP[8]" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "uint32_t \fBntlm_type2::context\fP[2]" -.PP - -.SS "uint32_t \fBntlm_type2::os\fP[2]" -.PP - - -.SH "Author" -.PP -Generated automatically by Doxygen for Heimdalntlmlibrary from the source code. diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type3.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type3.3 deleted file mode 100644 index e87a0dab3e4..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/ntlm_type3.3 +++ /dev/null @@ -1,96 +0,0 @@ -.TH "ntlm_type3" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalntlmlibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -ntlm_type3 \- -.SH SYNOPSIS -.br -.PP -\fC#include \fP -.PP -.SS "Data Fields" - -.in +1c -.ti -1c -.RI "uint32_t \fBflags\fP" -.br -.ti -1c -.RI "char * \fBusername\fP" -.br -.ti -1c -.RI "char * \fBtargetname\fP" -.br -.ti -1c -.RI "struct \fBntlm_buf\fP \fBlm\fP" -.br -.ti -1c -.RI "struct \fBntlm_buf\fP \fBntlm\fP" -.br -.ti -1c -.RI "struct \fBntlm_buf\fP \fBsessionkey\fP" -.br -.ti -1c -.RI "char * \fBws\fP" -.br -.ti -1c -.RI "uint32_t \fBos\fP [2]" -.br -.in -1c -.SH "Detailed Description" -.PP -Struct for the NTLM type3 message info, the strings is assumed to be in UTF8. When filled in by the library it should be freed with \fBheim_ntlm_free_type3()\fP. -.PP -\fBExamples: \fP -.in +1c -.PP -\fBtest_ntlm.c\fP. -.SH "Field Documentation" -.PP -.SS "uint32_t \fBntlm_type3::flags\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "char* \fBntlm_type3::username\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "char* \fBntlm_type3::targetname\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "struct \fBntlm_buf\fP \fBntlm_type3::lm\fP\fC [read]\fP" -.PP - -.SS "struct \fBntlm_buf\fP \fBntlm_type3::ntlm\fP\fC [read]\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "struct \fBntlm_buf\fP \fBntlm_type3::sessionkey\fP\fC [read]\fP" -.PP - -.SS "char* \fBntlm_type3::ws\fP" -.PP - -.PP -\fBExamples: \fP -.in +1c -\fBtest_ntlm.c\fP. -.SS "uint32_t \fBntlm_type3::os\fP[2]" -.PP - - -.SH "Author" -.PP -Generated automatically by Doxygen for Heimdalntlmlibrary from the source code. diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/os.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/os.3 deleted file mode 100644 index d1020b43b40..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/os.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type1.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/sessionkey.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/sessionkey.3 deleted file mode 100644 index de392aede5f..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/sessionkey.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type3.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/targetinfo.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/targetinfo.3 deleted file mode 100644 index a7659b3d1fe..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/targetinfo.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type2.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/targetname.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/targetname.3 deleted file mode 100644 index a7659b3d1fe..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/targetname.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type2.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/username.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/username.3 deleted file mode 100644 index de392aede5f..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/username.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type3.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/man/man3/ws.3 b/kerberosV/src/doc/doxyout/ntlm/man/man3/ws.3 deleted file mode 100644 index de392aede5f..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/man/man3/ws.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ntlm_type3.3 diff --git a/kerberosV/src/doc/doxyout/ntlm/manpages b/kerberosV/src/doc/doxyout/ntlm/manpages deleted file mode 100644 index d79b6dd9a43..00000000000 --- a/kerberosV/src/doc/doxyout/ntlm/manpages +++ /dev/null @@ -1,39 +0,0 @@ -ntlm/man/man3/challenge.3 -ntlm/man/man3/context.3 -ntlm/man/man3/data.3 -ntlm/man/man3/domain.3 -ntlm/man/man3/flags.3 -ntlm/man/man3/heim_ntlm_build_ntlm1_master.3 -ntlm/man/man3/heim_ntlm_build_ntlm2_master.3 -ntlm/man/man3/heim_ntlm_calculate_lm2.3 -ntlm/man/man3/heim_ntlm_calculate_ntlm1.3 -ntlm/man/man3/heim_ntlm_calculate_ntlm2.3 -ntlm/man/man3/heim_ntlm_decode_targetinfo.3 -ntlm/man/man3/heim_ntlm_encode_targetinfo.3 -ntlm/man/man3/heim_ntlm_encode_type1.3 -ntlm/man/man3/heim_ntlm_encode_type2.3 -ntlm/man/man3/heim_ntlm_encode_type3.3 -ntlm/man/man3/heim_ntlm_free_buf.3 -ntlm/man/man3/heim_ntlm_free_targetinfo.3 -ntlm/man/man3/heim_ntlm_free_type1.3 -ntlm/man/man3/heim_ntlm_free_type2.3 -ntlm/man/man3/heim_ntlm_free_type3.3 -ntlm/man/man3/heim_ntlm_keyex_unwrap.3 -ntlm/man/man3/heim_ntlm_nt_key.3 -ntlm/man/man3/heim_ntlm_ntlmv2_key.3 -ntlm/man/man3/heim_ntlm_verify_ntlm2.3 -ntlm/man/man3/hostname.3 -ntlm/man/man3/length.3 -ntlm/man/man3/lm.3 -ntlm/man/man3/ntlm.3 -ntlm/man/man3/ntlm_buf.3 -ntlm/man/man3/ntlm_core.3 -ntlm/man/man3/ntlm_type1.3 -ntlm/man/man3/ntlm_type2.3 -ntlm/man/man3/ntlm_type3.3 -ntlm/man/man3/os.3 -ntlm/man/man3/sessionkey.3 -ntlm/man/man3/targetinfo.3 -ntlm/man/man3/targetname.3 -ntlm/man/man3/username.3 -ntlm/man/man3/ws.3 diff --git a/kerberosV/src/doc/doxyout/wind/html/doxygen.css b/kerberosV/src/doc/doxyout/wind/html/doxygen.css deleted file mode 100644 index 22c484301dd..00000000000 --- a/kerberosV/src/doc/doxyout/wind/html/doxygen.css +++ /dev/null @@ -1,473 +0,0 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; -} -H1 { - text-align: center; - font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { - font-weight: bold -} -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navpath { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { - text-decoration: none; - background-color: #6666cc; - color: #ffffff -} -A.el { - text-decoration: none; - font-weight: bold -} -A.elRef { - font-weight: bold -} -A.code:link { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.code:visited { - text-decoration: none; - font-weight: normal; - color: #0000FF -} -A.codeRef:link { - font-weight: normal; - color: #0000FF -} -A.codeRef:visited { - font-weight: normal; - color: #0000FF -} -A:hover { - text-decoration: none; - background-color: #f2f2ff -} -DL.el { - margin-left: -1cm -} -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px -} - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { - margin-left: 16px; - font-style: italic; - font-size: 90% -} -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { - text-align: center; -} -IMG.formulaDsp { -} -IMG.formulaInl { - vertical-align: middle; -} -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -SPAN.vhdldigit { color: #ff00ff } -SPAN.vhdlchar { color: #000000 } -SPAN.vhdlkeyword { color: #700070 } -SPAN.vhdllogic { color: #ff0000 } - -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { - color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { - font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { - background: #e8eef2; - font-weight: bold; -} -HR { - height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; - margin-left: 3px; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; - white-space: nowrap; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -/* these are for tree view when used as main index */ -.directory { - font-size: 9pt; - font-weight: bold; -} -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* The following two styles can be used to replace the root node title */ -/* with an image of your choice. Simply uncomment the next two styles, */ -/* specify the name of your image and be sure to set 'height' to the */ -/* proper pixel height of your image. */ - -/* .directory h3.swap { */ -/* height: 61px; */ -/* background-repeat: no-repeat; */ -/* background-image: url("yourimage.gif"); */ -/* } */ -/* .directory h3.swap span { */ -/* display: none; */ -/* } */ - -.directory > h3 { - margin-top: 0; -} -.directory p { - margin: 0px; - white-space: nowrap; -} -.directory div { - display: none; - margin: 0px; -} -.directory img { - vertical-align: -30%; -} -/* these are for tree view when not used as main index */ -.directory-alt { - font-size: 100%; - font-weight: bold; -} -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} -.directory-alt > h3 { - margin-top: 0; -} -.directory-alt p { - margin: 0px; - white-space: nowrap; -} -.directory-alt div { - display: none; - margin: 0px; -} -.directory-alt img { - vertical-align: -30%; -} - diff --git a/kerberosV/src/doc/doxyout/wind/html/doxygen.png b/kerberosV/src/doc/doxyout/wind/html/doxygen.png deleted file mode 100644 index f0a274bbaffdd67f6d784c894d9cf28729db0e14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1281 zcmaJ>ZA?>F7(Vx-ms?uoS`b@hdRtpo6o^%HU>M$hfGrBvQnk$LE?p^P!kn&ikhyq! zX~V@&tPF5Qt@V?oTL96Bi%aRiwbe1)9DWQI#?)=HxS7QSw`J`5fAJ*eJbB;uNuKA& zdERDo*{Y<(If(#(B$Lr#;nB(8Y#ia=ZCeW?JfPLuQY`=@cW$k}Rivq|vbxGrRq1Tl9;+(gNt?}UtVKM2`T5t1jLzuL@0UIs`S#vlhl4)^ zLgSYrPj@$+`|j?eSbXTmiHGkWxV8V}BzNR?pl9k_s4pDu9vd5a_UzZEPk)}Ad{AV_ zzddrjrh4=Imr`E06;LY{)YYt?o}L~H@7C}F^WB!Ra=v`Q0bj{>5&$66CWF>mf6vjP z2N>RRY6ZYa=K`76>+|_)Xdwko+7wv}7cN|btOhWb(*{sta~6b?S8Omrxw}!4`NhGr zZVpNqpu1@BE`QGWNTpEpcJVW5izu~2B^GlM?1(OPg)zwW;QcP@Ltcclm>XbJL9C|j z=9!2?ua=uIlf0%AndzHsRC}IyTL$EhAee(fdKB`?27KeS^2M8M_7b~PiCFO&r5LC7 z7gl1*a<8;SjNaw#h=843_AV9iZbWQOAp5YOC^&_F*9K0> zB|6%IDb?aM#3viTxkLU4aXg&@+CkNTOnQ1iMP*^?b|^lJy$4C)Zk4isV!|RZ*XhXh zw8q3$=*0LeGC!XI_Wc?dkT~3+*Gu%%yIqP+Wr3H$=&ROMQU6q}Ag^P~>c5vAEO;a- z_dK-3PPeKar%)6$j~vI2#*-YH!1h6HYVtwCX5_wM`iF#UKz&&@9Oo5w3%XGYrX zW>dY~)SG-((Yim%`InwgTvyRC?e=Wh^8KCao!R6Eg&TpVWUY1sN~4G}V?nFnEGo-; zHZ_$eW9-GnC%^WS9b z@p;-$oH#MtC0v>Q$HX%4^JdFdO$0cbv-W)Q TtK}Eh@>>I#ipmV1>S*>q-hkC} diff --git a/kerberosV/src/doc/doxyout/wind/html/graph_legend.dot b/kerberosV/src/doc/doxyout/wind/html/graph_legend.dot deleted file mode 100644 index 4df0f1aa486..00000000000 --- a/kerberosV/src/doc/doxyout/wind/html/graph_legend.dot +++ /dev/null @@ -1,22 +0,0 @@ -digraph G -{ - edge [fontname="FreeSans",fontsize=10,labelfontname="FreeSans",labelfontsize=10]; - node [fontname="FreeSans",fontsize=10,shape=record]; - Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",fillcolor="grey75",style="filled" fontcolor="black"]; - Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPublicBase.html"]; - Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="red",URL="$classTruncated.html"]; - Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="FreeSans"]; - Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classProtectedBase.html"]; - Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="FreeSans"]; - Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPrivateBase.html"]; - Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="grey75"]; - Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans"]; - Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="FreeSans"]; - Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; - Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="FreeSans"]; - Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classUsed.html"]; -} diff --git a/kerberosV/src/doc/doxyout/wind/html/graph_legend.html b/kerberosV/src/doc/doxyout/wind/html/graph_legend.html deleted file mode 100644 index 1cc19aff8c9..00000000000 --- a/kerberosV/src/doc/doxyout/wind/html/graph_legend.html +++ /dev/null @@ -1,87 +0,0 @@ - - -Heimdalwindlibrary: Graph Legend - - - -

-keyhole logo -

- - - -
-

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

-Consider the following example:

/*! Invisible class because of truncation */
-class Invisible { };
-
-/*! Truncated class, inheritance relation is hidden */
-class Truncated : public Invisible { };
-
-/* Class not documented with doxygen comments */
-class Undocumented { };
-
-/*! Class that is inherited using public inheritance */
-class PublicBase : public Truncated { };
-
-/*! A template class */
-template<class T> class Templ { };
-
-/*! Class that is inherited using protected inheritance */
-class ProtectedBase { };
-
-/*! Class that is inherited using private inheritance */
-class PrivateBase { };
-
-/*! Class that is used by the Inherited class */
-class Used { };
-
-/*! Super class that inherits a number of other classes */
-class Inherited : public PublicBase,
-                  protected ProtectedBase,
-                  private PrivateBase,
-                  public Undocumented,
-                  public Templ<int>
-{
-  private:
-    Used *m_usedClass;
-};
-
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

-

-graph_legend.png -
-

-The boxes in the above graph have the following meaning:

    -
  • -A filled gray box represents the struct or class for which the graph is generated.
  • -
  • -A box with a black border denotes a documented struct or class.
  • -
  • -A box with a grey border denotes an undocumented struct or class.
  • -
  • -A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • -
-The arrows have the following meaning:
    -
  • -A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • -
  • -A dark green arrow is used for protected inheritance.
  • -
  • -A dark red arrow is used for private inheritance.
  • -
  • -A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • -
  • -A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • -
-
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalwindlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/wind/html/graph_legend.png b/kerberosV/src/doc/doxyout/wind/html/graph_legend.png deleted file mode 100644 index 9b96937bfd5f7a36ea8dbf2d64ed1bc0768f074d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4256 zcmbVQdpOkH_8+NND!Jtq6-jtSR7_-I$|WI0?zfSY$_$d3afzvf+>+dd5k>AJ%rwTO zToWRpOjQk;SpA-vZaxFm|)qS zZ0&nc$jcV$urMS*mT>5$AW~=+0-V=-hk3d;65QJTE=oj@xp?1=Mih?*SJGP9x;tMV zMGEN%60bmjDaijL58nc4RjF^hegOwU1I*ccRUmxdMkPM4ng0%#|DsH zA6uS>izR^x-*dYB+Y^@(q_fm3bgQzJ)xH_6x>lGwshWF+C5$5dh3sYD)tK+C6U)CD z^Xomarii5PA4v8qF_zz#buUwD?ro`8dC&7V-sShflU~*CBDZ04x4+3qE16W{eL_xd z3YaO}b1qpA9YL|0YKdw~2PzM=1=7+ItLm0+tST@%D(MNDzHR)+2t0d#|s}$9i(3xGzT8VL8o-ltIwH zpspqZeXR&2qA6r=nJVuhHO>d5w2$gp9i$H^6ROz!yNTjvm&9kupV73|GPJbXR%Sq0{>>GOn}^wshXC&C~6F@ zQEtikDzl-h2C}qRulGQ3fxzQMGiQH>nv}zkLLPr|qAC;3@PP$cr?(+-t?Wl3jb0<+ z#bCd_jVJ74%s*@eBjHtio7tZ>$BFt@%$M_C#AZgnzPm@&TXYQgE_Vo-ac(6wcJS^F zq)^14asP#Se^m*cnG^`{K>nXv_jhChvr_3s{zCkoqlsf=o8GQ>m@l2)em-YYT;u5A zvL(o`$7n~F&}`E{@&v375BP8e8N#D`H-e$%bEytQt-6o^PA%Dz4c-UeB{`~c4E<$L zY5E6~rKXj#P=fpct4bMP!auX;p7jtP@Li|`r|L0{yav|CLqtLNI5sNFr)16{NP2=B zyY+-Wnh;%3ctC&{8FU{!e29-)s6j~L{~V=%0`Mo=V6^am+1%z2<9r3tD~6uUPff|k zVx!)!?zoJ8FYTDC+V^!??@ z4c>lSL|BU?N^?Ew@NJxJzG9eMGFyR)(2&@Nt!t3%JLT|%6obYCChp}`hP)dkti;UH zm+B_wyb0#h=*|iH4Fx&x>#k_WnyfzU(!KMagDGGLWwz39qG2@`w4@&@8MH}K=hcV> zo@xJdqtMHqtZ+UobNt|FkIRV*_Z#K{{Bb)#j z9XM+oNQX|Dn7$9c4;PX=9NRr)QYm+3 z zx^AyiP)aaJ#E<#aI_Z4M0qo~}6_b{Fw7LjYEpq&2eP4e=;`V;2lQjooTv3dWIpwWu z2b1z&DZD^dJ%5Ah@TPsb?SUP1RZa2=43!k>cAI`kktGdN*#k}_EFYJBtdo09U?xBs z9K9CSx_e{=df>B<4TT_=s52}n^1IKq){xhJIZR<%sQ$rL)Ww)Yt%WkDo#ad}s&Gx5 z={);tH9sSrJ>yD-tu!$ob?tPKmFU3SdDt@i5ULq$P+JZ&rBZXITMM2R4_v1ibgOiq zMgY#(>xF-;&)HonG+sHE@%)-B1*r)@ga3!db-Vc_x}smbXU4=Ycmit0F{Z9Z=q9*k zSY@ypaOs8`MX!BUZQ8*PNmX5$J|!1|LUar)5#Wv*4#g@nfsebEcx9@8Xwfb0Q9P(} z=SQ6#aIE*x06hjIS#Bd%McoJc%>SXksuJY|iLLCE2cQVDS=q0ExRn*~`i=fOw%XSg zjPMNGM@azaROpa|{rz4!=+zKM?qLTssH`{-E+@6Hhis|f3;+_M-ZtTHa|~uvmR1gf ztc+og%<|DBdt%HY{wmosZ0Dwo_$k|E-l5uc@dsfQXM7S|Iz@BxYy&z}hOFW|~F{vQ0Osp+?FjWk}l^^`$3d&Um1 z?&sxr?AAGlD4Khy<_>4od`Bblh?&9%UY#-Jq!c|?kU+hLL^MH@`5+jaq0btJpn7*b#Oeh1GEn6atjaCyIWfr0OqB$o*_K7>Hw0 z?BwrA^UZy(f_CdPoNz0!X6_EX?r80CuKuJ>x7Nfyd8EE%k&D?|=iJJfS>IQjndp+} zQwBq!$`>mvPmG!I^V(%R)Gym_|72^0&$a-L)TN^qtKvF!jlxIo?PRq6kTb-X53|%h z?IKy}wPh>cXPpl!CgqlED%v-a$)H5&WV66^EQctD_=l_ z8tuq$z=3tBNHyzQ{oqHd0c`bijo3DfaK&P6ljOYB*yU$_@k`qhq8=mtA4jS1B1K(j zvo2FBwlJ2mJRPCUqlyR$(a}O)y*2{y;Q!N$t<@I0rtBY~s9-^ohW}mp>mSLEID_fCC?)BC#xQVv6?MP3l1#chr!wPGR>M7_ma= zq&T4QLL#pPdxWMc8$@t?@@dX?v6SXk)pHf5YJBDF1J==c$=Ycr+-OyqR^Hvbl3sPR z*>|+VVnI4^ix_q({i~Ss$FYFSvqug*Szu}$jsTR7w#ajG&vB+e-65%XO$A}#xf?z1 zg)!qcIUN0peM-ZkW0&88#R#(`yIXN3nMRX3+scl<5eJ{+iXh{t%uA$^_(QR&k?6b}K!<(1P zqwP4`%br=wo_WfO34*7x=@)Qk8fo1(!f2_Wx<|KCf>TXR>Fs0He*PA|d0Gy2j)&Wm z%VnPoVWk((0ZN^Z;9t1nfauExQsXD8>~~^(ibEcj>iyB>^{0^bacb(gZMDZOg!?o2 zVa@4%Q3kdQ_jg7p|GidA+;Dh4mlhvBOEsuq(9T4mj7oc$7JRBo7sK z*E^0e%k=;_*U4pQ>$TPd_p@|Nm&X+6SCcizU6^Uhlfh+H#~(#zENDe!uqZ){ma3WhTpgE+}F#p~*bqL)ZYn`y8- zBOJ+jO4A2S!yO<}KP2QQ_3v@|Y0!qSg0~x9LPU!Rsy0*lW)2#guxB_)5P-_Hzz)sa zrnuTszvZ!oPt?A{2s%#E?qLUMss-0P-a={w>U|QXvO8{_pDLhOoY0}ZSU>&a#hJ<$ zf4Q&uT+Go7?*M0-NYFE>V%3O24hlHr&CvTIS_##QeB#n}e(gAe6vWs=NZv-DofbkO zu7$-h7Q@{+$HyEaDZEwf6AwUFq;NBnTgsf5s%mT33zz?)Ep+-3VmZ8*J#3y~)Ura$ zpPFz&43@7o6>!a?EZ!3?!?z=`K9*}HvAgu@#TSq?Ptjq6-{ylGIr3f2q%wW0|I7*vVROWS&K z1ujjlesAY3i{h8`HADO2qu*4TzqaC^gbVQY}Bcx zdccd&Kl-bUFIRb=gLuNk3HsaqMMi`2e%ujt?uM0xCs*bj=EwvJFU`+a_d(+X)YjtG z8ViTUA+`cG73Cc^6!T_s=HK)o?m&=mp;4>0A$DnH#54&G^7{I|FO#0N%dZAibZ>6* z?nPYXp5X^8B9a_9oS$PjT-x+F#$I{v>ysq>cBG2e?JyMGV2r`NPxrsx8;iIjX^q~Dr;D*ylh diff --git a/kerberosV/src/doc/doxyout/wind/html/group__wind.html b/kerberosV/src/doc/doxyout/wind/html/group__wind.html deleted file mode 100644 index 077341819a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/html/group__wind.html +++ /dev/null @@ -1,680 +0,0 @@ - - -Heimdalwindlibrary: Heimdal wind library - - - -

-keyhole logo -

- - - -
-

Heimdal wind library

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Functions

int wind_punycode_label_toascii (const uint32_t *in, size_t in_len, char *out, size_t *out_len)
int wind_stringprep (const uint32_t *in, size_t in_len, uint32_t *out, size_t *out_len, wind_profile_flags flags)
int wind_profile (const char *name, wind_profile_flags *flags)
int wind_utf8ucs4 (const char *in, uint32_t *out, size_t *out_len)
int wind_utf8ucs4_length (const char *in, size_t *out_len)
int wind_ucs4utf8 (const uint32_t *in, size_t in_len, char *out, size_t *out_len)
int wind_ucs4utf8_length (const uint32_t *in, size_t in_len, size_t *out_len)
int wind_ucs2read (const void *ptr, size_t len, unsigned int *flags, uint16_t *out, size_t *out_len)
int wind_ucs2write (const uint16_t *in, size_t in_len, unsigned int *flags, void *ptr, size_t *out_len)
int wind_utf8ucs2 (const char *in, uint16_t *out, size_t *out_len)
int wind_utf8ucs2_length (const char *in, size_t *out_len)
int wind_ucs2utf8 (const uint16_t *in, size_t in_len, char *out, size_t *out_len)
int wind_ucs2utf8_length (const uint16_t *in, size_t in_len, size_t *out_len)
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - - - - - - - - - - - -
int wind_profile (const char *  name,
wind_profile_flags *  flags 
)
-
-
- -

-Try to find the profile given a name.

-

Parameters:
- - - -
name name of the profile.
flags the resulting profile.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int wind_punycode_label_toascii (const uint32_t *  in,
size_t  in_len,
char *  out,
size_t *  out_len 
)
-
-
- -

-Convert an UCS4 string to a puny-coded DNS label string suitable when combined with delimiters and other labels for DNS lookup.

-

Parameters:
- - - - - -
in an UCS4 string to convert
in_len the length of in.
out the resulting puny-coded string. The string is not NUL terminatied.
out_len before processing out_len should be the length of the out variable, after processing it will be the length of the out string.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int wind_stringprep (const uint32_t *  in,
size_t  in_len,
uint32_t *  out,
size_t *  out_len,
wind_profile_flags  flags 
)
-
-
- -

-Process a input UCS4 string according a string-prep profile.

-

Parameters:
- - - - - - -
in input UCS4 string to process
in_len length of the input string
out output UCS4 string
out_len length of the output string.
flags stringprep profile.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int wind_ucs2read (const void *  ptr,
size_t  len,
unsigned int *  flags,
uint16_t *  out,
size_t *  out_len 
)
-
-
- -

-Read in an UCS2 from a buffer.

-

Parameters:
- - - - - - -
ptr The input buffer to read from.
len the length of the input buffer.
flags Flags to control the behavior of the function.
out the output UCS2, the array must be at least out/2 long.
out_len the output length
-
-
Returns:
returns 0 on success, an wind error code otherwise.
- -

-if len is zero, flags are unchanged

-if len is odd, WIND_ERR_LENGTH_NOT_MOD2 is returned

-If the flags WIND_RW_BOM is set, check for BOM. If not BOM is found, check is LE/BE flag is already and use that otherwise fail with WIND_ERR_NO_BOM. When done, clear WIND_RW_BOM and the LE/BE flag and set the resulting LE/BE flag. -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int wind_ucs2utf8 (const uint16_t *  in,
size_t  in_len,
char *  out,
size_t *  out_len 
)
-
-
- -

-Convert an UCS2 string to a UTF-8 string.

-

Parameters:
- - - - - -
in an UCS2 string to convert.
in_len the length of the in UCS2 string.
out the resulting UTF-8 strint, must be at least wind_ucs2utf8_length() long. If out is NULL, the function will calculate the needed space for the out variable (just like wind_ucs2utf8_length()).
out_len before processing out_len should be the length of the out variable, after processing it will be the length of the out string.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int wind_ucs2utf8_length (const uint16_t *  in,
size_t  in_len,
size_t *  out_len 
)
-
-
- -

-Calculate the length of from converting a UCS2 string to an UTF-8 string.

-

Parameters:
- - - - -
in an UCS2 string to convert.
in_len an UCS2 string length to convert.
out_len the length of the resulting UTF-8 string.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int wind_ucs2write (const uint16_t *  in,
size_t  in_len,
unsigned int *  flags,
void *  ptr,
size_t *  out_len 
)
-
-
- -

-Write an UCS2 string to a buffer.

-

Parameters:
- - - - - - -
in The input UCS2 string.
in_len the length of the input buffer.
flags Flags to control the behavior of the function.
ptr The input buffer to write to, the array must be at least (in + 1) * 2 bytes long.
out_len the output length
-
-
Returns:
returns 0 on success, an wind error code otherwise.
- -

-If in buffer is not of length be mod 2, WIND_ERR_LENGTH_NOT_MOD2 is returned

-On zero input length, flags are preserved

-If flags have WIND_RW_BOM set, the byte order mark is written first to the output data

-If the output wont fit into out_len, WIND_ERR_OVERRUN is returned -

-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int wind_ucs4utf8 (const uint32_t *  in,
size_t  in_len,
char *  out,
size_t *  out_len 
)
-
-
- -

-Convert an UCS4 string to a UTF-8 string.

-

Parameters:
- - - - - -
in an UCS4 string to convert.
in_len the length input array.
out the resulting UTF-8 strint, must be at least wind_ucs4utf8_length() + 1 long (the extra char for the NUL). If out is NULL, the function will calculate the needed space for the out variable (just like wind_ucs4utf8_length()).
out_len before processing out_len should be the length of the out variable, after processing it will be the length of the out string.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int wind_ucs4utf8_length (const uint32_t *  in,
size_t  in_len,
size_t *  out_len 
)
-
-
- -

-Calculate the length of from converting a UCS4 string to an UTF-8 string.

-

Parameters:
- - - - -
in an UCS4 string to convert.
in_len the length of UCS4 string to convert.
out_len the length of the resulting UTF-8 string.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int wind_utf8ucs2 (const char *  in,
uint16_t *  out,
size_t *  out_len 
)
-
-
- -

-Convert an UTF-8 string to an UCS2 string.

-

Parameters:
- - - - -
in an UTF-8 string to convert.
out the resulting UCS2 strint, must be at least wind_utf8ucs2_length() long. If out is NULL, the function will calculate the needed space for the out variable (just like wind_utf8ucs2_length()).
out_len before processing out_len should be the length of the out variable, after processing it will be the length of the out string.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int wind_utf8ucs2_length (const char *  in,
size_t *  out_len 
)
-
-
- -

-Calculate the length of from converting a UTF-8 string to a UCS2 string.

-

Parameters:
- - - -
in an UTF-8 string to convert.
out_len the length of the resulting UCS4 string.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - - - - - - - -
int wind_utf8ucs4 (const char *  in,
uint32_t *  out,
size_t *  out_len 
)
-
-
- -

-Convert an UTF-8 string to an UCS4 string.

-

Parameters:
- - - - -
in an UTF-8 string to convert.
out the resulting UCS4 strint, must be at least wind_utf8ucs4_length() long. If out is NULL, the function will calculate the needed space for the out variable (just like wind_utf8ucs4_length()).
out_len before processing out_len should be the length of the out variable, after processing it will be the length of the out string.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

- -

-
- - - - - - - - - - - - - - - - - - -
int wind_utf8ucs4_length (const char *  in,
size_t *  out_len 
)
-
-
- -

-Calculate the length of from converting a UTF-8 string to a UCS4 string.

-

Parameters:
- - - -
in an UTF-8 string to convert.
out_len the length of the resulting UCS4 string.
-
-
Returns:
returns 0 on success, an wind error code otherwise
- -
-

-

-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalwindlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/wind/html/index.html b/kerberosV/src/doc/doxyout/wind/html/index.html deleted file mode 100644 index 0d5cf5fda12..00000000000 --- a/kerberosV/src/doc/doxyout/wind/html/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - -Heimdalwindlibrary: Heimdal wind library - - - -

-keyhole logo -

- - - -
-

Heimdal wind library

-

-

1.5.3

-Introduction

-Heimdal wind library is a implementation of stringprep and some of its profiles.

-The project web page: http://www.h5l.org/

-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalwindlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/wind/html/modules.html b/kerberosV/src/doc/doxyout/wind/html/modules.html deleted file mode 100644 index 4738591130e..00000000000 --- a/kerberosV/src/doc/doxyout/wind/html/modules.html +++ /dev/null @@ -1,28 +0,0 @@ - - -Heimdalwindlibrary: Module Index - - - -

-keyhole logo -

- - - -
-

Modules

Here is a list of all modules: -
-
-Generated on Sun Dec 9 14:10:36 2012 for Heimdalwindlibrary by doxygen 1.5.6
- - diff --git a/kerberosV/src/doc/doxyout/wind/html/tab_b.gif b/kerberosV/src/doc/doxyout/wind/html/tab_b.gif deleted file mode 100644 index 0d623483ffdf5f9f96900108042a7ab0643fe2a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 35 ncmZ?wbhEHbWMp7uXkcJy*>IeJfk6j|fqX^=1|}vKMh0sDa2W*H diff --git a/kerberosV/src/doc/doxyout/wind/html/tab_l.gif b/kerberosV/src/doc/doxyout/wind/html/tab_l.gif deleted file mode 100644 index 9b1e6337c9299a700401a2a78a2c6ffced475216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 706 zcmZ?wbhEHbZT`}F1e&(Gg}Y(8=I;HA5#Z$3JI=gGB)FQ#odI(O&E^@q;x zK6mr*m3xOS-#u~t!I@i+u0DKm^U160k6t`|^WpV}&n+8{U%dD9&a>B#U%!9-@yol< zU%&tQ{rk_K|NsC0`}dE5ET99@1@a36+kb~?0UJ*yc&I3X_m z!ND^5$O7$#8OFRuDhG}!?8z?cdZK&!`PWjdR;Aj^wZ` zeK{IEYHBJ)6K8VIp1`BVt++swf6j+=L{p1*nO(VhE`pFexG@5$|>uaCcd z`0m=9m+yak{QmXN#Sc$^{$X9h9&q2jiKAI|&T)a;PPx2K9p`YIdw8HtR5k2Q$2-O2 z*;3y{MQ-RnJTgJfI&R5|O)AHxDf_00XbPvDZPy4t=hHd)nfLPvms&O`Ok(sD()5v$ z5U@&h;a=#xbxVbo2~X&Xj0Ie(f{v>vERH+qC+nTG=B8Nca=wU-O$?1&vUgV~9=!H; zx>3p9Yn%*<>t~sk+&0xfyS8RsPfYBd<~wWK%j-LmpU>O7yX^h#UCp1x-p#i7@bE;py8XI6 zmY<)m>~)W~yIWcMVoiPg{duuf<*)9qZ9l$m*Ph&W&$jlv*Vpa+{pH@n=IQ$L?0$ax ec60Ul|8o2P|NVbd{6P)#weSbE3}s?04AuZvx_~SI diff --git a/kerberosV/src/doc/doxyout/wind/html/tab_r.gif b/kerberosV/src/doc/doxyout/wind/html/tab_r.gif deleted file mode 100644 index ce9dd9f533cb5486d6941844f442b59d4a9e9175..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2585 zcmbV}`9Bkk1ILFF--w5zJc=ZZT(zjE=;2|_S)Qm~rCWz1Pc)KPl;jv%A#&v2*x}yc zmf2~Jm~&=xjJY?PqwIN}f8qQ2{r$uH{c*nJbmr{cR5??*egHrs-B=MzCF`3%e{FAW z{oL5xTHn~5TM{jaB;@|_Ue5F&Zb@p(kMyG{*;gWDg zyeL|eZf7Qd8=#bXzSiR{yzRgLSj-fJS8>lBjVHN z^o-0eS=nE6a`W;LChBs=`+QAJP~{b93>H^eRb5kCSC1zUNezun%`L5M?RDzv#%jk7 zYVRX=vATPD`+oEfum^{RM@GjuP?-r=yh0!p;Vx^T9G7~`7%5ydH%70=jyJ;;`d;hv92x3R=z{xp+Lg2!*@OK*K15-t&okoPtSED)h&$RLxdbA zseWm^C3d%-yRNi-ryk^!ek+C`n&~cd$#ZWct_cUL{l~i+Nzx^5d!n94(>bW-iL~Rl z&8r)?q|1DIo=0=judQ{FaGcfLERz8gfn3-Qt<2lksh{mzpT}DXxUuR^z=^key&q4! z+wWI45vL0k$R^(F#{qfqhUsN@WA+w-V?LPH33!Q?WFSB3)WBojE@hK41Nb?KfS+Qo zXgrzfsP$wr4Qzy*{OD>uJBjdgGM@VMml5)2f~_}lD*YyOb}Hjeobhz#4c`w(l^>KK zr?Ud;W~Z}*w;%hZ|2^p^+f06gJDJQD zeIhGADbDmm&6arh(q>EZ<7mjzg7l|z$hRL8=1>)Nv=S7CY$B}iYJ&*T_-T_OG*L1q ztZ3Lana33?y3AKnyq^YCF|4x%Rb5WU&2qcl{TFKey%QJeMxn^SdT!hZ5+0i1zeusiYVp-phBl7b5+Px-X&LhByq z0F&<;K0l2+v>qiHlXb#$jXMv$uK-dEGE9L~qtdU(XeRXmvu*K2Q&6!fD**JxYP4b4BR7FdJ$Qx9G9`J%-_X!a#LGpp3g9)VWytGCa;7`S1_e8F~!R+aSJ zOF17p2`H?2kPs8Q`_;U}+D%3p zs2-0BTqFwpUoBk`?P;iPQ(IbEA|JmMx!P&YYG|R@S=5Mnw;-?A6rEEVyV%d7{iU4a zNk`i!%F(Ykpm`}#oH;BjY->@b8vQedv;pza2FL&*6ufjd+*3Ute&>kes~TU?^KkojsTh(o~(3tk1Y6>4(yn( z#U*ID9@eg-beKo1B;HXe+}{Z%n@7m0+yxivuqk9~;!1LGQlah)xYK4>wgL}l6dsaN zIxlRlq`*`j9PG4*0hD6YV_b_2w5b#)o7J?`q#{GjvvKlD`T*dWcZx<-s(ZvLB44E# z=!|sw!?)@%y$oRNL#25WS3lzdii}TuQ3?CLnvQ1_n};2sT_;Y;#d3=+-(O% zMN$>O!3;ke(UuLR%h_&)N zs^!-@A>QR}4yB1bPp`9S19ikTbZ~O{&FF-yHK{En;mmShDUIEw03`j(DBIsM}Rjki2J#SQa3gFZTKBPDeIiLt9Z z%bL3(B@Qw%(B`wSMS~dPh$=R`(}lBoFXKy(s|*{#ru$wjsBc_O#zxNk9w+UUHmx(U zmJ8+M+ndtnZ<7|VU9Mbt61zpo9T&3%Wx&XII=#QJxjR`CZf22ac3d51Z?GD%LEe_&*t46Qf;4`bZ7p2K(Ab5>GfT^}4! zBT&HZD`^PEgWoI&{~o-ID0F?O`75sm(87x%A{(}Ch1)QlzdJ)1B-eqe5a(weg0`4lQIf1evjvbBY50DVbzO7CLf|vP z2#0(U-|jZ`H{y5N^o7%iK6H>_HEGN->U6^!)1{XpJV!!4(Ig7wzZQ*9WYF4X1rG0x z=1uA@i`rIAciubDC{;~b(|&|A@xkjRP5aRcvRU9tvIm}jDB6J eQ0-6-y)mpwdT=ayS0tBxKDA*~;EWmo diff --git a/kerberosV/src/doc/doxyout/wind/html/tabs.css b/kerberosV/src/doc/doxyout/wind/html/tabs.css deleted file mode 100644 index 95f00a91da3..00000000000 --- a/kerberosV/src/doc/doxyout/wind/html/tabs.css +++ /dev/null @@ -1,102 +0,0 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI.current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI.current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.navpath -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind.3 deleted file mode 100644 index 993891cb2eb..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind.3 +++ /dev/null @@ -1,326 +0,0 @@ -.TH "Heimdal wind library" 3 "9 Dec 2012" "Version 1.5.3" "Heimdalwindlibrary" \" -*- nroff -*- -.ad l -.nh -.SH NAME -Heimdal wind library \- -.SS "Functions" - -.in +1c -.ti -1c -.RI "int \fBwind_punycode_label_toascii\fP (const uint32_t *in, size_t in_len, char *out, size_t *out_len)" -.br -.ti -1c -.RI "int \fBwind_stringprep\fP (const uint32_t *in, size_t in_len, uint32_t *out, size_t *out_len, wind_profile_flags flags)" -.br -.ti -1c -.RI "int \fBwind_profile\fP (const char *name, wind_profile_flags *flags)" -.br -.ti -1c -.RI "int \fBwind_utf8ucs4\fP (const char *in, uint32_t *out, size_t *out_len)" -.br -.ti -1c -.RI "int \fBwind_utf8ucs4_length\fP (const char *in, size_t *out_len)" -.br -.ti -1c -.RI "int \fBwind_ucs4utf8\fP (const uint32_t *in, size_t in_len, char *out, size_t *out_len)" -.br -.ti -1c -.RI "int \fBwind_ucs4utf8_length\fP (const uint32_t *in, size_t in_len, size_t *out_len)" -.br -.ti -1c -.RI "int \fBwind_ucs2read\fP (const void *ptr, size_t len, unsigned int *flags, uint16_t *out, size_t *out_len)" -.br -.ti -1c -.RI "int \fBwind_ucs2write\fP (const uint16_t *in, size_t in_len, unsigned int *flags, void *ptr, size_t *out_len)" -.br -.ti -1c -.RI "int \fBwind_utf8ucs2\fP (const char *in, uint16_t *out, size_t *out_len)" -.br -.ti -1c -.RI "int \fBwind_utf8ucs2_length\fP (const char *in, size_t *out_len)" -.br -.ti -1c -.RI "int \fBwind_ucs2utf8\fP (const uint16_t *in, size_t in_len, char *out, size_t *out_len)" -.br -.ti -1c -.RI "int \fBwind_ucs2utf8_length\fP (const uint16_t *in, size_t in_len, size_t *out_len)" -.br -.in -1c -.SH "Detailed Description" -.PP - -.SH "Function Documentation" -.PP -.SS "int wind_profile (const char * name, wind_profile_flags * flags)" -.PP -Try to find the profile given a name. -.PP -\fBParameters:\fP -.RS 4 -\fIname\fP name of the profile. -.br -\fIflags\fP the resulting profile. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - -.SS "int wind_punycode_label_toascii (const uint32_t * in, size_t in_len, char * out, size_t * out_len)" -.PP -Convert an UCS4 string to a puny-coded DNS label string suitable when combined with delimiters and other labels for DNS lookup. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP an UCS4 string to convert -.br -\fIin_len\fP the length of in. -.br -\fIout\fP the resulting puny-coded string. The string is not NUL terminatied. -.br -\fIout_len\fP before processing out_len should be the length of the out variable, after processing it will be the length of the out string. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - -.SS "int wind_stringprep (const uint32_t * in, size_t in_len, uint32_t * out, size_t * out_len, wind_profile_flags flags)" -.PP -Process a input UCS4 string according a string-prep profile. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP input UCS4 string to process -.br -\fIin_len\fP length of the input string -.br -\fIout\fP output UCS4 string -.br -\fIout_len\fP length of the output string. -.br -\fIflags\fP stringprep profile. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - -.SS "int wind_ucs2read (const void * ptr, size_t len, unsigned int * flags, uint16_t * out, size_t * out_len)" -.PP -Read in an UCS2 from a buffer. -.PP -\fBParameters:\fP -.RS 4 -\fIptr\fP The input buffer to read from. -.br -\fIlen\fP the length of the input buffer. -.br -\fIflags\fP Flags to control the behavior of the function. -.br -\fIout\fP the output UCS2, the array must be at least out/2 long. -.br -\fIout_len\fP the output length -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise. -.RE -.PP - -.PP -if len is zero, flags are unchanged -.PP -if len is odd, WIND_ERR_LENGTH_NOT_MOD2 is returned -.PP -If the flags WIND_RW_BOM is set, check for BOM. If not BOM is found, check is LE/BE flag is already and use that otherwise fail with WIND_ERR_NO_BOM. When done, clear WIND_RW_BOM and the LE/BE flag and set the resulting LE/BE flag. -.SS "int wind_ucs2utf8 (const uint16_t * in, size_t in_len, char * out, size_t * out_len)" -.PP -Convert an UCS2 string to a UTF-8 string. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP an UCS2 string to convert. -.br -\fIin_len\fP the length of the in UCS2 string. -.br -\fIout\fP the resulting UTF-8 strint, must be at least \fBwind_ucs2utf8_length()\fP long. If out is NULL, the function will calculate the needed space for the out variable (just like \fBwind_ucs2utf8_length()\fP). -.br -\fIout_len\fP before processing out_len should be the length of the out variable, after processing it will be the length of the out string. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - -.SS "int wind_ucs2utf8_length (const uint16_t * in, size_t in_len, size_t * out_len)" -.PP -Calculate the length of from converting a UCS2 string to an UTF-8 string. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP an UCS2 string to convert. -.br -\fIin_len\fP an UCS2 string length to convert. -.br -\fIout_len\fP the length of the resulting UTF-8 string. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - -.SS "int wind_ucs2write (const uint16_t * in, size_t in_len, unsigned int * flags, void * ptr, size_t * out_len)" -.PP -Write an UCS2 string to a buffer. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP The input UCS2 string. -.br -\fIin_len\fP the length of the input buffer. -.br -\fIflags\fP Flags to control the behavior of the function. -.br -\fIptr\fP The input buffer to write to, the array must be at least (in + 1) * 2 bytes long. -.br -\fIout_len\fP the output length -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise. -.RE -.PP - -.PP -If in buffer is not of length be mod 2, WIND_ERR_LENGTH_NOT_MOD2 is returned -.PP -On zero input length, flags are preserved -.PP -If flags have WIND_RW_BOM set, the byte order mark is written first to the output data -.PP -If the output wont fit into out_len, WIND_ERR_OVERRUN is returned -.SS "int wind_ucs4utf8 (const uint32_t * in, size_t in_len, char * out, size_t * out_len)" -.PP -Convert an UCS4 string to a UTF-8 string. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP an UCS4 string to convert. -.br -\fIin_len\fP the length input array. -.br -\fIout\fP the resulting UTF-8 strint, must be at least \fBwind_ucs4utf8_length()\fP + 1 long (the extra char for the NUL). If out is NULL, the function will calculate the needed space for the out variable (just like \fBwind_ucs4utf8_length()\fP). -.br -\fIout_len\fP before processing out_len should be the length of the out variable, after processing it will be the length of the out string. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - -.SS "int wind_ucs4utf8_length (const uint32_t * in, size_t in_len, size_t * out_len)" -.PP -Calculate the length of from converting a UCS4 string to an UTF-8 string. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP an UCS4 string to convert. -.br -\fIin_len\fP the length of UCS4 string to convert. -.br -\fIout_len\fP the length of the resulting UTF-8 string. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - -.SS "int wind_utf8ucs2 (const char * in, uint16_t * out, size_t * out_len)" -.PP -Convert an UTF-8 string to an UCS2 string. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP an UTF-8 string to convert. -.br -\fIout\fP the resulting UCS2 strint, must be at least \fBwind_utf8ucs2_length()\fP long. If out is NULL, the function will calculate the needed space for the out variable (just like \fBwind_utf8ucs2_length()\fP). -.br -\fIout_len\fP before processing out_len should be the length of the out variable, after processing it will be the length of the out string. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - -.SS "int wind_utf8ucs2_length (const char * in, size_t * out_len)" -.PP -Calculate the length of from converting a UTF-8 string to a UCS2 string. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP an UTF-8 string to convert. -.br -\fIout_len\fP the length of the resulting UCS4 string. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - -.SS "int wind_utf8ucs4 (const char * in, uint32_t * out, size_t * out_len)" -.PP -Convert an UTF-8 string to an UCS4 string. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP an UTF-8 string to convert. -.br -\fIout\fP the resulting UCS4 strint, must be at least \fBwind_utf8ucs4_length()\fP long. If out is NULL, the function will calculate the needed space for the out variable (just like \fBwind_utf8ucs4_length()\fP). -.br -\fIout_len\fP before processing out_len should be the length of the out variable, after processing it will be the length of the out string. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - -.SS "int wind_utf8ucs4_length (const char * in, size_t * out_len)" -.PP -Calculate the length of from converting a UTF-8 string to a UCS4 string. -.PP -\fBParameters:\fP -.RS 4 -\fIin\fP an UTF-8 string to convert. -.br -\fIout_len\fP the length of the resulting UCS4 string. -.RE -.PP -\fBReturns:\fP -.RS 4 -returns 0 on success, an wind error code otherwise -.RE -.PP - diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_profile.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_profile.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_profile.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_punycode_label_toascii.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_punycode_label_toascii.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_punycode_label_toascii.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_stringprep.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_stringprep.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_stringprep.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2read.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2read.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2read.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2utf8.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2utf8.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2utf8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2utf8_length.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2utf8_length.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2utf8_length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2write.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2write.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs2write.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs4utf8.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs4utf8.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs4utf8.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs4utf8_length.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs4utf8_length.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_ucs4utf8_length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs2.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs2.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs2.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs2_length.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs2_length.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs2_length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs4.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs4.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs4.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs4_length.3 b/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs4_length.3 deleted file mode 100644 index ea2c29233a6..00000000000 --- a/kerberosV/src/doc/doxyout/wind/man/man3/wind_utf8ucs4_length.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/wind.3 diff --git a/kerberosV/src/doc/doxyout/wind/manpages b/kerberosV/src/doc/doxyout/wind/manpages deleted file mode 100644 index a6269d12ade..00000000000 --- a/kerberosV/src/doc/doxyout/wind/manpages +++ /dev/null @@ -1,14 +0,0 @@ -wind/man/man3/wind.3 -wind/man/man3/wind_profile.3 -wind/man/man3/wind_punycode_label_toascii.3 -wind/man/man3/wind_stringprep.3 -wind/man/man3/wind_ucs2read.3 -wind/man/man3/wind_ucs2utf8.3 -wind/man/man3/wind_ucs2utf8_length.3 -wind/man/man3/wind_ucs2write.3 -wind/man/man3/wind_ucs4utf8.3 -wind/man/man3/wind_ucs4utf8_length.3 -wind/man/man3/wind_utf8ucs2.3 -wind/man/man3/wind_utf8ucs2_length.3 -wind/man/man3/wind_utf8ucs4.3 -wind/man/man3/wind_utf8ucs4_length.3 diff --git a/kerberosV/src/doc/doxytmpl.dxy b/kerberosV/src/doc/doxytmpl.dxy deleted file mode 100644 index a16b0d8ce66..00000000000 --- a/kerberosV/src/doc/doxytmpl.dxy +++ /dev/null @@ -1,256 +0,0 @@ -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class " \ - "The $name widget " \ - "The $name file " \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = /Applications/ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = NO -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = YES -WARN_FORMAT = "$file:$line: $text " -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = */.svn -EXCLUDE_SYMBOLS = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = NO -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = YES -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = YES -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -MSCGEN_PATH = /Applications/Doxygen.app/Contents/Resources/ -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = /Applications/Doxygen.app/Contents/Resources/ -DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/kerberosV/src/doc/footer.html b/kerberosV/src/doc/footer.html deleted file mode 100644 index 48990aeb8f8..00000000000 --- a/kerberosV/src/doc/footer.html +++ /dev/null @@ -1,4 +0,0 @@ -
-Generated on $datetime for $projectname by doxygen $doxygenversion
- - diff --git a/kerberosV/src/doc/gssapi.din b/kerberosV/src/doc/gssapi.din deleted file mode 100644 index 3dd8bb61256..00000000000 --- a/kerberosV/src/doc/gssapi.din +++ /dev/null @@ -1,16 +0,0 @@ -# Doxyfile 1.5.3 - -PROJECT_NAME = Heimdal GSS-API library -PROJECT_NUMBER = @PACKAGE_VERSION@ -OUTPUT_DIRECTORY = @srcdir@/doxyout/gssapi -INPUT = @srcdir@/../lib/gssapi - -WARN_IF_UNDOCUMENTED = NO - -PERL_PATH = /usr/bin/perl - -HTML_HEADER = "@srcdir@/header.html" -HTML_FOOTER = "@srcdir@/footer.html" - -@INCLUDE = "@srcdir@/doxytmpl.dxy" - diff --git a/kerberosV/src/doc/hcrypto.din b/kerberosV/src/doc/hcrypto.din deleted file mode 100644 index aeea17921af..00000000000 --- a/kerberosV/src/doc/hcrypto.din +++ /dev/null @@ -1,16 +0,0 @@ -# Doxyfile 1.5.3 - -PROJECT_NAME = "Heimdal crypto library" -PROJECT_NUMBER = @PACKAGE_VERSION@ -OUTPUT_DIRECTORY = @srcdir@/doxyout/hcrypto -INPUT = @srcdir@/../lib/hcrypto -EXAMPLE_PATH = @srcdir@/../lib/hcrypto - -WARN_IF_UNDOCUMENTED = YES - -PERL_PATH = /usr/bin/perl - -HTML_HEADER = "@srcdir@/header.html" -HTML_FOOTER = "@srcdir@/footer.html" - -@INCLUDE = "@srcdir@/doxytmpl.dxy" diff --git a/kerberosV/src/doc/hdb.din b/kerberosV/src/doc/hdb.din deleted file mode 100644 index 1b100f46f4c..00000000000 --- a/kerberosV/src/doc/hdb.din +++ /dev/null @@ -1,15 +0,0 @@ -# Doxyfile 1.5.3 - -PROJECT_NAME = Heimdal hdb library -PROJECT_NUMBER = @PACKAGE_VERSION@ -OUTPUT_DIRECTORY = @srcdir@/doxyout/hdb -INPUT = @srcdir@/../lib/hdb - -WARN_IF_UNDOCUMENTED = YES - -PERL_PATH = /usr/bin/perl - -HTML_HEADER = "@srcdir@/header.html" -HTML_FOOTER = "@srcdir@/footer.html" - -@INCLUDE = "@srcdir@/doxytmpl.dxy" diff --git a/kerberosV/src/doc/header.html b/kerberosV/src/doc/header.html deleted file mode 100644 index b3401c8b8c8..00000000000 --- a/kerberosV/src/doc/header.html +++ /dev/null @@ -1,10 +0,0 @@ - - -$title - - - -

-keyhole logo -

- diff --git a/kerberosV/src/doc/heimdal.css b/kerberosV/src/doc/heimdal.css deleted file mode 100644 index 2e5b374f1f8..00000000000 --- a/kerberosV/src/doc/heimdal.css +++ /dev/null @@ -1,53 +0,0 @@ -body { - color: black; - background-color: #fdfdfd; - font-family: serif; - max-width: 40em; -} -h1, h2, h3 { - font-family: sans-serif; - font-weight: bold; -} -h1 { - padding: 0.5em 0 0.5em 5%; - color: white; - background: #3366cc; - border-bottom: solid 1px black; -} -h1 { - font-size: 200%; -} -h2 { - font-size: 150%; -} -h3 { - font-size: 120%; -} -h4 { - font-weight: bold; -} -pre.example { - margin-left: 2em; - padding: 1em 0em; - border: 2px dashed #c0c0c0; - background: #f0f0f0; -} -a:link { - color: blue; - text-decoration: none; -} -a:visited { - color: red; - text-decoration: none -} -a:hover { - text-decoration: underline -} -span.literal { - font-family: monospace; -} -hr { - border-style: none; - background-color: black; - height: 1px; -} diff --git a/kerberosV/src/doc/heimdal.info b/kerberosV/src/doc/heimdal.info deleted file mode 100644 index 1a8e19a8354..00000000000 --- a/kerberosV/src/doc/heimdal.info +++ /dev/null @@ -1,3426 +0,0 @@ -This is heimdal.info, produced by makeinfo version 4.8 from -heimdal.texi. - -INFO-DIR-SECTION Security -START-INFO-DIR-ENTRY -* Heimdal: (heimdal). The Kerberos 5 distribution from KTH -END-INFO-DIR-ENTRY - - -File: heimdal.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) - -Heimdal -******* - -This manual for version 1.5.3 of Heimdal. - -* Menu: - -* Introduction:: -* What is Kerberos?:: -* Building and Installing:: -* Setting up a realm:: -* Applications:: -* Things in search for a better place:: -* Kerberos 4 issues:: -* Windows compatibility:: -* Programming with Kerberos:: -* Migration:: -* Acknowledgments:: -* Copyrights and Licenses:: - - --- The Detailed Node Listing --- - -Setting up a realm - -* Configuration file:: -* Creating the database:: -* Modifying the database:: -* keytabs:: -* Remote administration:: -* Password changing:: -* Testing clients and servers:: -* Slave Servers:: -* Incremental propagation:: -* Encryption types and salting:: -* Credential cache server - KCM:: -* Cross realm:: -* Transit policy:: -* Setting up DNS:: -* Using LDAP to store the database:: -* Providing Kerberos credentials to servers and programs:: -* Setting up PK-INIT:: -* Debugging Kerberos problems:: - -Applications - -* Authentication modules:: -* AFS:: - -Authentication modules - -* Digital SIA:: -* IRIX:: - -Kerberos 4 issues - -* Principal conversion issues:: -* Converting a version 4 database:: - -Windows compatibility - -* Configuring Windows to use a Heimdal KDC:: -* Inter-Realm keys (trust) between Windows and a Heimdal KDC:: -* Create account mappings:: -* Encryption types:: -* Authorisation data:: -* Quirks of Windows 2000 KDC:: -* Useful links when reading about the Windows:: - -Programming with Kerberos - - -File: heimdal.info, Node: Introduction, Next: What is Kerberos?, Prev: Top, Up: Top - -1 Introduction -************** - -What is Heimdal? -================ - -Heimdal is a free implementation of Kerberos 5. The goals are to: - - * have an implementation that can be freely used by anyone - - * be protocol compatible with existing implementations and, if not in - conflict, with RFC 4120 (and any future updated RFC). RFC 4120 - replaced RFC 1510. - - * be reasonably compatible with the M.I.T Kerberos V5 API - - * have support for Kerberos V5 over GSS-API (RFC1964) - - * include the most important and useful application programs (rsh, - telnet, popper, etc.) - - * include enough backwards compatibility with Kerberos V4 - -Status -====== - -Heimdal has the following features (this does not mean any of this -works): - - * a stub generator and a library to encode/decode/whatever ASN.1/DER - stuff - - * a `libkrb5' library that should be possible to get to work with - simple applications - - * a GSS-API library - - * `kinit', `klist', `kdestroy' - - * `telnet', `telnetd' - - * `rsh', `rshd' - - * `popper', `push' (a movemail equivalent) - - * `ftp', and `ftpd' - - * a library `libkafs' for authenticating to AFS and a program - `afslog' that uses it - - * some simple test programs - - * a KDC that supports most things, - - * simple programs for distributing databases between a KDC master and - slaves - - * a password changing daemon `kpasswdd', library functions for - changing passwords and a simple client - - * some kind of administration system - - * Kerberos V4 support in many of the applications. - -Bug reports -=========== - -If you find bugs in this software, make sure it is a genuine bug and not -just a part of the code that isn't implemented. - -Bug reports should be sent to . Please include -information on what machine and operating system (including version) -you are running, what you are trying to do, what happens, what you -think should have happened, an example for us to repeat, the output you -get when trying the example, and a patch for the problem if you have -one. Please make any patches with `diff -u' or `diff -c'. - -Suggestions, comments and other non bug reports are also welcome. - -Mailing list -============ - -There are two mailing lists with talk about Heimdal. - is a low-volume announcement list, while - is for general discussion. Send a message to - to subscribe. - -Heimdal source code, binaries and the manual -============================================ - -The source code for heimdal, links to binaries and the manual (this -document) can be found on our web-page at -`http://www.pdc.kth.se/heimdal/'. - - -File: heimdal.info, Node: What is Kerberos?, Next: Building and Installing, Prev: Introduction, Up: Top - -2 What is Kerberos? -******************* - - Now this Cerberus had three heads of dogs, - the tail of a dragon, and on his back the - heads of all sorts of snakes. - -- Pseudo-Apollodorus Library 2.5.12 - -Kerberos is a system for authenticating users and services on a network. -It is built upon the assumption that the network is "unsafe". For -example, data sent over the network can be eavesdropped and altered, and -addresses can also be faked. Therefore they cannot be used for -authentication purposes. - -Kerberos is a trusted third-party service. That means that there is a -third party (the kerberos server) that is trusted by all the entities on -the network (users and services, usually called "principals"). All -principals share a secret password (or key) with the kerberos server and -this enables principals to verify that the messages from the kerberos -server are authentic. Thus trusting the kerberos server, users and -services can authenticate each other. - -2.1 Basic mechanism -=================== - - *Note* This discussion is about Kerberos version 4, but version 5 - works similarly. - -In Kerberos, principals use "tickets" to prove that they are who they -claim to be. In the following example, A is the initiator of the -authentication exchange, usually a user, and B is the service that A -wishes to use. - -To obtain a ticket for a specific service, A sends a ticket request to -the kerberos server. The request contains A's and B's names (along with -some other fields). The kerberos server checks that both A and B are -valid principals. - -Having verified the validity of the principals, it creates a packet -containing A's and B's names, A's network address (A), the -current time (T), the lifetime of the ticket (LIFE), and a -secret "session key" (K). This packet is encrypted with B's secret -key (K). The actual ticket (T) looks like this: ({A, B, -A, T, LIFE, K}K). - -The reply to A consists of the ticket (T), B's name, the current -time, the lifetime of the ticket, and the session key, all encrypted in -A's secret key ({B, T, LIFE, K, T}K). A decrypts the -reply and retains it for later use. - - -Before sending a message to B, A creates an authenticator consisting of -A's name, A's address, the current time, and a "checksum" chosen by A, -all encrypted with the secret session key ({A, A, T, -CHECKSUM}K). This is sent together with the ticket received from -the kerberos server to B. Upon reception, B decrypts the ticket using -B's secret key. Since the ticket contains the session key that the -authenticator was encrypted with, B can now also decrypt the -authenticator. To verify that A really is A, B now has to compare the -contents of the ticket with that of the authenticator. If everything -matches, B now considers A as properly authenticated. - -2.2 Different attacks -===================== - -Impersonating A ---------------- - -An impostor, C could steal the authenticator and the ticket as it is -transmitted across the network, and use them to impersonate A. The -address in the ticket and the authenticator was added to make it more -difficult to perform this attack. To succeed C will have to either use -the same machine as A or fake the source addresses of the packets. By -including the time stamp in the authenticator, C does not have much -time in which to mount the attack. - -Impersonating B ---------------- - -C can hijack B's network address, and when A sends her credentials, C -just pretend to verify them. C can't be sure that she is talking to A. - -2.3 Defence strategies -====================== - -It would be possible to add a "replay cache" to the server side. The -idea is to save the authenticators sent during the last few minutes, so -that B can detect when someone is trying to retransmit an already used -message. This is somewhat impractical (mostly regarding efficiency), -and is not part of Kerberos 4; MIT Kerberos 5 contains it. - -To authenticate B, A might request that B sends something back that -proves that B has access to the session key. An example of this is the -checksum that A sent as part of the authenticator. One typical -procedure is to add one to the checksum, encrypt it with the session -key and send it back to A. This is called "mutual authentication". - -The session key can also be used to add cryptographic checksums to the -messages sent between A and B (known as "message integrity"). -Encryption can also be added ("message confidentiality"). This is -probably the best approach in all cases. - -2.4 Further reading -=================== - -The original paper on Kerberos from 1988 is `Kerberos: An -Authentication Service for Open Network Systems', by Jennifer Steiner, -Clifford Neuman and Jeffrey I. Schiller. - -A less technical description can be found in `Designing an -Authentication System: a Dialogue in Four Scenes' by Bill Bryant, also -from 1988. - -These documents can be found on our web-page at -`http://www.pdc.kth.se/kth-krb/'. - - -File: heimdal.info, Node: Building and Installing, Next: Setting up a realm, Prev: What is Kerberos?, Up: Top - -3 Building and Installing -************************* - -Build and install instructions are located here: - -`http://www.h5l.org/compile.html' - -Prebuilt packages is located here: - -`http://www.h5l.org/binaries.html' - - -File: heimdal.info, Node: Setting up a realm, Next: Applications, Prev: Building and Installing, Up: Top - -4 Setting up a realm -******************** - -A realm is an administrative domain. The name of a Kerberos realm is -usually the Internet domain name in uppercase. Call your realm the same -as your Internet domain name if you do not have strong reasons for not -doing so. It will make life easier for you and everyone else. - -* Menu: - -* Configuration file:: -* Creating the database:: -* Modifying the database:: -* Checking the setup:: -* keytabs:: -* Remote administration:: -* Password changing:: -* Testing clients and servers:: -* Slave Servers:: -* Incremental propagation:: -* Encryption types and salting:: -* Credential cache server - KCM:: -* Cross realm:: -* Transit policy:: -* Setting up DNS:: -* Using LDAP to store the database:: -* Providing Kerberos credentials to servers and programs:: -* Setting up PK-INIT:: -* Debugging Kerberos problems:: - - -File: heimdal.info, Node: Configuration file, Next: Creating the database, Prev: Setting up a realm, Up: Setting up a realm - -4.1 Configuration file -====================== - -To setup a realm you will first have to create a configuration file: -`/etc/krb5.conf'. The `krb5.conf' file can contain many configuration -options, some of which are described here. - -There is a sample `krb5.conf' supplied with the distribution. - -The configuration file is a hierarchical structure consisting of -sections, each containing a list of bindings (either variable -assignments or subsections). A section starts with `[`section-name']'. -A binding consists of a left hand side, an equal sign (`=') and a right -hand side (the left hand side tag must be separated from the equal sign -with some whitespace). Subsections have a `{' as the first -non-whitespace character after the equal sign. All other bindings are -treated as variable assignments. The value of a variable extends to the -end of the line. - - [section1] - a-subsection = { - var = value1 - other-var = value with {} - sub-sub-section = { - var = 123 - } - } - var = some other value - [section2] - var = yet another value - -In this manual, names of sections and bindings will be given as strings -separated by slashes (`/'). The `other-var' variable will thus be -`section1/a-subsection/other-var'. - -For in-depth information about the contents of the configuration file, -refer to the `krb5.conf' manual page. Some of the more important -sections are briefly described here. - -The `libdefaults' section contains a list of library configuration -parameters, such as the default realm and the timeout for KDC -responses. The `realms' section contains information about specific -realms, such as where they hide their KDC. This section serves the same -purpose as the Kerberos 4 `krb.conf' file, but can contain more -information. Finally the `domain_realm' section contains a list of -mappings from domains to realms, equivalent to the Kerberos 4 -`krb.realms' file. - -To continue with the realm setup, you will have to create a -configuration file, with contents similar to the following. - - [libdefaults] - default_realm = MY.REALM - [realms] - MY.REALM = { - kdc = my.kdc my.slave.kdc - kdc = my.third.kdc - kdc = 130.237.237.17 - kdc = [2001:6b0:1:ea::100]:88 - } - [domain_realm] - .my.domain = MY.REALM - -If you use a realm name equal to your domain name, you can omit the -`libdefaults', and `domain_realm', sections. If you have a DNS -SRV-record for your realm, or your Kerberos server has DNS CNAME -`kerberos.my.realm', you can omit the `realms' section too. - -If you want to use a different configuration file then the default you -can point a file with the enviroment variable `KRB5_CONFIG'. - - env KRB5_CONFIG=$HOME/etc/krb5.conf kinit user@REALM - - -File: heimdal.info, Node: Creating the database, Next: Modifying the database, Prev: Configuration file, Up: Setting up a realm - -4.2 Creating the database -========================= - -The database library will look for the database in the directory -`/var/heimdal', so you should probably create that directory. Make -sure the directory has restrictive permissions. - - # mkdir /var/heimdal - -The keys of all the principals are stored in the database. If you -choose to, these can be encrypted with a master key. You do not have to -remember this key (or password), but just to enter it once and it will -be stored in a file (`/var/heimdal/m-key'). If you want to have a -master key, run `kstash' to create this master key: - - # kstash - Master key: - Verifying password - Master key: - -If you want to generate a random master key you can use the -`--random-key' flag to kstash. This will make sure you have a good key -on which attackers can't do a dictionary attack. - -If you have a master key, make sure you make a backup of your master -key file; without it backups of the database are of no use. - -To initialise the database use the `kadmin' program, with the `-l' -option (to enable local database mode). First issue a `init MY.REALM' -command. This will create the database and insert default principals -for that realm. You can have more than one realm in one database, so -`init' does not destroy any old database. - -Before creating the database, `init' will ask you some questions about -maximum ticket lifetimes. - -After creating the database you should probably add yourself to it. You -do this with the `add' command. It takes as argument the name of a -principal. The principal should contain a realm, so if you haven't set -up a default realm, you will need to explicitly include the realm. - - # kadmin -l - kadmin> init MY.REALM - Realm max ticket life [unlimited]: - Realm max renewable ticket life [unlimited]: - kadmin> add me - Max ticket life [unlimited]: - Max renewable life [unlimited]: - Attributes []: - Password: - Verifying password - Password: - -Now start the KDC and try getting a ticket. - - # kdc & - # kinit me - me@MY.REALMS's Password: - # klist - Credentials cache: /tmp/krb5cc_0 - Principal: me@MY.REALM - - Issued Expires Principal - Aug 25 07:25:55 Aug 25 17:25:55 krbtgt/MY.REALM@MY.REALM - -If you are curious you can use the `dump' command to list all the -entries in the database. It should look something similar to the -following example (note that the entries here are truncated for -typographical reasons): - - kadmin> dump - me@MY.REALM 1:0:1:0b01d3cb7c293b57:-:0:7:8aec316b9d1629e3baf8 ... - kadmin/admin@MY.REALM 1:0:1:e5c8a2675b37a443:-:0:7:cb913ebf85 ... - krbtgt/MY.REALM@MY.REALM 1:0:1:52b53b61c875ce16:-:0:7:c8943be ... - kadmin/changepw@MY.REALM 1:0:1:f48c8af2b340e9fb:-:0:7:e3e6088 ... - - -File: heimdal.info, Node: Modifying the database, Next: Checking the setup, Prev: Creating the database, Up: Setting up a realm - -4.3 Modifying the database -========================== - -All modifications of principals are done with with kadmin. - -A principal has several attributes and lifetimes associated with it. - -Principals are added, renamed, modified, and deleted with the kadmin -commands `add', `rename', `modify', `delete'. Both interactive editing -and command line flags can be used (use -help to list the available -options). - -There are different kinds of types for the fields in the database; -attributes, absolute time times and relative times. - -4.3.1 Attributes ----------------- - -When doing interactive editing, attributes are listed with `?'. - -The attributes are given in a comma (`,') separated list. Attributes -are removed from the list by prefixing them with `-'. - - kadmin> modify me - Max ticket life [1 day]: - Max renewable life [1 week]: - Principal expiration time [never]: - Password expiration time [never]: - Attributes [disallow-renewable]: requires-pre-auth,-disallow-renewable - kadmin> get me - Principal: me@MY.REALM - [...] - Attributes: requires-pre-auth - -4.3.2 Absolute times --------------------- - -The format for absolute times are any of the following: - - never - now - YYYY-mm-dd - YYYY-mm-dd HH:MM:SS - -4.3.3 Relative times --------------------- - -The format for relative times are any of the following combined: - - N year - M month - O day - P hour - Q minute - R second - - -File: heimdal.info, Node: Checking the setup, Next: keytabs, Prev: Modifying the database, Up: Setting up a realm - -4.4 Checking the setup -====================== - -There are two tools that can check the consistency of the Kerberos -configuration file and the Kerberos database. - -The Kerberos configuration file is checked using `verify_krb5_conf'. -The tool checks for common errors, but commonly there are several -uncommon configuration entries that are never added to the tool and -thus generates "unknown entry" warnings. This is usually nothing to -worry about. - -The database check is built into the kadmin tool. It will check for -common configuration error that will cause problems later. Common check -are for existence and flags on important principals. The database check -by run by the following command : - - kadmin -l check REALM.EXAMPLE.ORG - - -File: heimdal.info, Node: keytabs, Next: Remote administration, Prev: Checking the setup, Up: Setting up a realm - -4.5 keytabs -=========== - -To extract a service ticket from the database and put it in a keytab, -you need to first create the principal in the database with `add' -(using the `--random-key' flag to get a random key) and then extract it -with `ext_keytab'. - - kadmin> add --random-key host/my.host.name - Max ticket life [unlimited]: - Max renewable life [unlimited]: - Attributes []: - kadmin> ext host/my.host.name - kadmin> exit - # ktutil list - Version Type Principal - 1 des-cbc-md5 host/my.host.name@MY.REALM - 1 des-cbc-md4 host/my.host.name@MY.REALM - 1 des-cbc-crc host/my.host.name@MY.REALM - 1 des3-cbc-sha1 host/my.host.name@MY.REALM - - -File: heimdal.info, Node: Remote administration, Next: Password changing, Prev: keytabs, Up: Setting up a realm - -4.6 Remote administration -========================= - -The administration server, `kadmind', can be started by `inetd' (which -isn't recommended) or run as a normal daemon. If you want to start it -from `inetd' you should add a line similar to the one below to your -`/etc/inetd.conf'. - - kerberos-adm stream tcp nowait root /usr/heimdal/libexec/kadmind kadmind - -You might need to add `kerberos-adm' to your `/etc/services' as -`749/tcp'. - -Access to the administration server is controlled by an ACL file, -(default `/var/heimdal/kadmind.acl'.) The file has the following syntax: - principal [priv1,priv2,...] [glob-pattern] - -The matching is from top to bottom for matching principals (and if -given, glob-pattern). When there is a match, the access rights of that -line are applied. - -The privileges you can assign to a principal are: `add', -`change-password' (or `cpw' for short), `delete', `get', `list', and -`modify', or the special privilege `all'. All of these roughly -correspond to the different commands in `kadmin'. - -If a GLOB-PATTERN is given on a line, it restricts the access rights -for the principal to only apply for subjects that match the pattern. -The patterns are of the same type as those used in shell globbing, see -fnmatch(3). - -In the example below `lha/admin' can change every principal in the -database. `jimmy/admin' can only modify principals that belong to the -realm `E.KTH.SE'. `mille/admin' is working at the help desk, so he -should only be able to change the passwords for single component -principals (ordinary users). He will not be able to change any `/admin' -principal. - - lha/admin@E.KTH.SE all - jimmy/admin@E.KTH.SE all *@E.KTH.SE - jimmy/admin@E.KTH.SE all */*@E.KTH.SE - mille/admin@E.KTH.SE change-password *@E.KTH.SE - - -File: heimdal.info, Node: Password changing, Next: Testing clients and servers, Prev: Remote administration, Up: Setting up a realm - -4.7 Password changing -===================== - -To allow users to change their passwords, you should run `kpasswdd'. -It is not run from `inetd'. - -You might need to add `kpasswd' to your `/etc/services' as `464/udp'. -If your realm is not setup to use DNS, you might also need to add a -`kpasswd_server' entry to the realm configuration in `/etc/krb5.conf' -on client machines: - - [realms] - MY.REALM = { - kdc = my.kdc my.slave.kdc - kpasswd_server = my.kdc - } - -4.7.1 Password quality assurance --------------------------------- - -It is important that users have good passwords, both to make it harder -to guess them and to avoid off-line attacks (although -pre-authentication provides some defence against off-line attacks). To -ensure that the users choose good passwords, you can enable password -quality controls in `kpasswdd' and `kadmind'. The controls themselves -are done in a shared library or an external program that is used by -`kpasswdd'. To configure in these controls, add lines similar to the -following to your `/etc/krb5.conf': - - [password_quality] - policies = external-check builtin:minimum-length modulename:policyname - external_program = /bin/false - policy_libraries = LIBRARY1.SO LIBRARY2.SO - -In `[password_quality]policies' the module name is optional if the -policy name is unique in all modules (members of `policy_libraries'). -All built-in policies can be qualified with a module name of `builtin' -to unambiguously specify the built-in policy and not a policy by the -same name from a loaded module. - -The built-in policies are - - * external-check - - Executes the program specified by - `[password_quality]external_program'. - - A number of key/value pairs are passed as input to the program, - one per line, ending with the string `end'. The key/value lines - are of the form - principal: PRINCIPAL - new-password: PASSWORD - where PASSWORD is the password to check for the previous PRINCIPAL. - - If the external application approves the password, it should return - `APPROVED' on standard out and exit with exit code 0. If it - doesn't approve the password, an one line error message explaining - the problem should be returned on standard error and the - application should exit with exit code 0. In case of a fatal - error, the application should, if possible, print an error message - on standard error and exit with a non-zero error code. - - * minimum-length - - The minimum length password quality check reads the configuration - file stanza `[password_quality]min_length' and requires the - password to be at least this length. - - * character-class - - The character-class password quality check reads the configuration - file stanza `[password_quality]min_classes'. The policy requires - the password to have characters from at least that many character - classes. Default value if not given is 3. - - The four different characters classes are, uppercase, lowercase, - number, special characters. - - -If you want to write your own shared object to check password policies, -see the manual page `kadm5_pwcheck(3)'. - -Code for a password quality checking function that uses the cracklib -library can be found in `lib/kadm5/sample_password_check.c' in the -source code distribution. It requires that the cracklib library be -built with the patch available at -`ftp://ftp.pdc.kth.se/pub/krb/src/cracklib.patch'. - -A sample policy external program is included in -`lib/kadm5/check-cracklib.pl'. - -If no password quality checking function is configured, the only check -performed is that the password is at least six characters long. - -To check the password policy settings, use the command -`verify-password-quality' in `kadmin' program. The password -verification is only performed locally, on the client. It may be -convenient to set the environment variable `KRB5_CONFIG' to point to a -test version of `krb5.conf' while you're testing the -`[password_quality]' stanza that way. - - -File: heimdal.info, Node: Testing clients and servers, Next: Slave Servers, Prev: Password changing, Up: Setting up a realm - -4.8 Testing clients and servers -=============================== - -Now you should be able to run all the clients and servers. Refer to the -appropriate man pages for information on how to use them. - - -File: heimdal.info, Node: Slave Servers, Next: Incremental propagation, Prev: Testing clients and servers, Up: Setting up a realm - -4.9 Slave servers, Incremental propagation, Testing clients and servers, Setting up a realm -=========================================================================================== - -It is desirable to have at least one backup (slave) server in case the -master server fails. It is possible to have any number of such slave -servers but more than three usually doesn't buy much more redundancy. - -All Kerberos servers for a realm must have the same database so that -they present the same service to the users. The `hprop' program, -running on the master, will propagate the database to the slaves, -running `hpropd' processes. - -Every slave needs a database directory, the master key (if it was used -for the database) and a keytab with the principal `hprop/HOSTNAME'. -Add the principal with the `ktutil' command and start `hpropd', as -follows: - - slave# ktutil get -p foo/admin hprop/`hostname` - slave# mkdir /var/heimdal - slave# hpropd - -The master will use the principal `kadmin/hprop' to authenticate to the -slaves. This principal should be added when running `kadmin -l init' -but if you do not have it in your database for whatever reason, please -add it with `kadmin -l add'. - -Then run `hprop' on the master: - - master# hprop slave - -This was just an hands-on example to make sure that everything was -working properly. Doing it manually is of course the wrong way, and to -automate this you will want to start `hpropd' from `inetd' on the -slave(s) and regularly run `hprop' on the master to regularly propagate -the database. Starting the propagation once an hour from `cron' is -probably a good idea. - - -File: heimdal.info, Node: Incremental propagation, Next: Encryption types and salting, Prev: Slave Servers, Up: Setting up a realm - -4.10 Incremental propagation -============================ - -There is also a newer mechanism for doing incremental propagation in -Heimdal. Instead of sending the whole database regularly, it sends the -changes as they happen on the master to the slaves. The master keeps -track of all the changes by assigning a version number to every change -to the database. The slaves know which was the latest version they saw -and in this way it can be determined if they are in sync or not. A log -of all the changes is kept on the master, and when a slave is at an -older version than the oldest one in the log, the whole database has to -be sent. - -Protocol-wise, all the slaves connect to the master and as a greeting -tell it the latest version that they have (`IHAVE' message). The -master then responds by sending all the changes between that version and -the current version at the master (a series of `FORYOU' messages) or -the whole database in a `TELLYOUEVERYTHING' message. There is also a -keep-alive protocol that makes sure all slaves are up and running. - -In addition on listening on the network to get connection from new -slaves, the ipropd-master also listens on a status unix socket. kadmind -and kpasswdd both open that socket when a transation is done and -written a notification to the socket. That cause ipropd-master to check -for new version in the log file. As a fallback in case a notification -is lost by the unix socket, the log file is checked after 30 seconds of -no event. - -4.10.1 Configuring incremental propagation ------------------------------------------- - -The program that runs on the master is `ipropd-master' and all clients -run `ipropd-slave'. - -Create the file `/var/heimdal/slaves' on the master containing all the -slaves that the database should be propagated to. Each line contains -the full name of the principal (for example -`iprop/hemligare.foo.se@FOO.SE'). - -You should already have `iprop/tcp' defined as 2121, in your -`/etc/services'. Otherwise, or if you need to use a different port for -some peculiar reason, you can use the `--port' option. This is useful -when you have multiple realms to distribute from one server. - -Then you need to create those principals that you added in the -configuration file. Create one `iprop/hostname' for the master and for -every slave. - - master# /usr/heimdal/sbin/ktutil get iprop/`hostname` - - slave# /usr/heimdal/sbin/ktutil get iprop/`hostname` - -The next step is to start the `ipropd-master' process on the master -server. The `ipropd-master' listens on the UNIX domain socket -`/var/heimdal/signal' to know when changes have been made to the -database so they can be propagated to the slaves. There is also a -safety feature of testing the version number regularly (every 30 -seconds) to see if it has been modified by some means that do not raise -this signal. Then, start `ipropd-slave' on all the slaves: - - master# /usr/heimdal/libexec/ipropd-master & - slave# /usr/heimdal/libexec/ipropd-slave master & - -To manage the iprop log file you should use the `iprop-log' command. -With it you can dump, truncate and replay the logfile. - - -File: heimdal.info, Node: Encryption types and salting, Next: Credential cache server - KCM, Prev: Incremental propagation, Up: Setting up a realm - -4.11 Encryption types and salting -================================= - -The encryption types that the KDC is going to assign by default is -possible to change. Since the keys used for user authentication is -salted the encryption types are described together with the salt -strings. - -Salting is used to make it harder to pre-calculate all possible keys. -Using a salt increases the search space to make it almost impossible to -pre-calculate all keys. Salting is the process of mixing a public -string (the salt) with the password, then sending it through an -encryption type specific string-to-key function that will output the -fixed size encryption key. - -In Kerberos 5 the salt is determined by the encryption type, except in -some special cases. - -In `des' there is the Kerberos 4 salt (none at all) or the afs-salt -(using the cell (realm in AFS lingo)). - -In `arcfour' (the encryption type that Microsoft Windows 2000 uses) -there is no salt. This is to be compatible with NTLM keys in Windows NT -4. - -`[kadmin]default_keys' in `krb5.conf' controls what salting to use. - -The syntax of `[kadmin]default_keys' is -`[etype:]salt-type[:salt-string]'. `etype' is the encryption type -(des-cbc-crc, arcfour-hmac-md5, aes256-cts-hmac-sha1-96), `salt-type' -is the type of salt (pw-salt or afs3-salt), and the salt-string is the -string that will be used as salt (remember that if the salt is -appended/prepended, the empty salt "" is the same thing as no salt at -all). - -Common types of salting include - - * `v4' (or `des:pw-salt:') - - The Kerberos 4 salting is using no salt at all. Reason there is - colon at the end of the salt string is that it makes the salt the - empty string (same as no salt). - - * `v5' (or `pw-salt') - - `pw-salt' uses the default salt for each encryption type is - specified for. If the encryption type `etype' isn't given, all - default encryption will be used. - - * `afs3-salt' - - `afs3-salt' is the salt that is used with Transarc kaserver. It's - the cell name appended to the password. - - - -File: heimdal.info, Node: Credential cache server - KCM, Next: Cross realm, Prev: Encryption types and salting, Up: Setting up a realm - -4.12 Credential cache server - KCM -================================== - -When KCM running is easy for users to switch between different kerberos -principals using `kswitch' or built in support in application, like -OpenSSH's GSSAPIClientIdentity. - -Other advantages are that there is the long term credentials are not -written to disk and on reboot the credential is removed when kcm -process stopps running. - -Configure the system startup script to start the kcm process, -`/usr/heimdal/libexec/kcm' and then configure the system to use kcm in -`krb5.conf'. - - [libdefaults] - default_cc_type = KCM - -Now when you run `kinit' it doesn't overwrite your existing credentials -but rather just add them to the set of credentials. `klist -l' lists -the credentials and the star marks the default credential. - - $ kinit lha@KTH.SE - lha@KTH.SE's Password: - $ klist -l - Name Cache name Expires - lha@KTH.SE 0 Nov 22 23:09:40 * - lha@SU.SE Initial default ccache Nov 22 14:14:24 - -When switching between credentials you can use `kswitch'. - - $ kswitch -i - Principal - 1 lha@KTH.SE - 2 lha@SU.SE - Select number: 2 - -After switching, a new set of credentials are used as default. - - $ klist -l - Name Cache name Expires - lha@SU.SE Initial default ccache Nov 22 14:14:24 * - lha@KTH.SE 0 Nov 22 23:09:40 - -Som applications, like openssh with Simon Wilkinsons patch applied, -support specifiying that credential to use. The example below will -login to the host computer.kth.se using lha@KTH.SE (not the current -default credential). - - $ ssh \ - -o GSSAPIAuthentication=yes \ - -o GSSAPIKeyExchange=yes \ - -o GSSAPIClientIdentity=lha@KTH.SE \ - computer.kth.se - - -File: heimdal.info, Node: Cross realm, Next: Transit policy, Prev: Credential cache server - KCM, Up: Setting up a realm - -4.13 Cross realm -================ - -Suppose you reside in the realm `MY.REALM', how do you authenticate to -a server in `OTHER.REALM'? Having valid tickets in `MY.REALM' allows -you to communicate with Kerberised services in that realm. However, the -computer in the other realm does not have a secret key shared with the -Kerberos server in your realm. - -It is possible to share keys between two realms that trust each other. -When a client program, such as `telnet' or `ssh', finds that the other -computer is in a different realm, it will try to get a ticket granting -ticket for that other realm, but from the local Kerberos server. With -that ticket granting ticket, it will then obtain service tickets from -the Kerberos server in the other realm. - -For a two way trust between `MY.REALM' and `OTHER.REALM' add the -following principals to each realm. The principals should be -`krbtgt/OTHER.REALM@MY.REALM' and `krbtgt/MY.REALM@OTHER.REALM' in -`MY.REALM', and `krbtgt/MY.REALM@OTHER.REALM' and -`krbtgt/OTHER.REALM@MY.REALM'in `OTHER.REALM'. - -In Kerberos 5 the trust can be configured to be one way. So that users -from `MY.REALM' can authenticate to services in `OTHER.REALM', but not -the opposite. In the example above, the `krbtgt/MY.REALM@OTHER.REALM' -then should be removed. - -The two principals must have the same key, key version number, and the -same set of encryption types. Remember to transfer the two keys in a -safe manner. - - vr$ klist - Credentials cache: FILE:/tmp/krb5cc_913.console - Principal: lha@E.KTH.SE - - Issued Expires Principal - May 3 13:55:52 May 3 23:55:54 krbtgt/E.KTH.SE@E.KTH.SE - - vr$ telnet -l lha hummel.it.su.se - Trying 2001:6b0:5:1095:250:fcff:fe24:dbf... - Connected to hummel.it.su.se. - Escape character is '^]'. - Waiting for encryption to be negotiated... - [ Trying mutual KERBEROS5 (host/hummel.it.su.se@SU.SE)... ] - [ Kerberos V5 accepts you as ``lha@E.KTH.SE'' ] - Encryption negotiated. - Last login: Sat May 3 14:11:47 from vr.l.nxs.se - hummel$ exit - - vr$ klist - Credentials cache: FILE:/tmp/krb5cc_913.console - Principal: lha@E.KTH.SE - - Issued Expires Principal - May 3 13:55:52 May 3 23:55:54 krbtgt/E.KTH.SE@E.KTH.SE - May 3 13:55:56 May 3 23:55:54 krbtgt/SU.SE@E.KTH.SE - May 3 14:10:54 May 3 23:55:54 host/hummel.it.su.se@SU.SE - - -File: heimdal.info, Node: Transit policy, Next: Setting up DNS, Prev: Cross realm, Up: Setting up a realm - -4.14 Transit policy -=================== - -Under some circumstances, you may not wish to set up direct cross-realm -trust with every realm to which you wish to authenticate or from which -you wish to accept authentications. Kerberos supports multi-hop -cross-realm trust where a client principal in realm A authenticates to -a service in realm C through a realm B with which both A and C have -cross-realm trust relationships. In this situation, A and C need not -set up cross-realm principals between each other. - -If you want to use cross-realm authentication through an intermediate -realm, it must be explicitly allowed by either the KDCs for the realm -to which the client is authenticating (in this case, realm C), or the -server receiving the request. This is done in `krb5.conf' in the -`[capaths]' section. - -In addition, the client in realm A need to be configured to know how to -reach realm C via realm B. This can be done either on the client or via -KDC configuration in the KDC for realm A. - -4.14.1 Allowing cross-realm transits ------------------------------------- - -When the ticket transits through a realm to another realm, the -destination realm adds its peer to the "transited-realms" field in the -ticket. The field is unordered, since there is no way to know if know -if one of the transited-realms changed the order of the list. For the -authentication to be accepted by the final destination realm, all of -the transited realms must be listed as trusted in the `[capaths]' -configuration, either in the KDC for the destination realm or on the -server receiving the authentication. - -The syntax for `[capaths]' section is: - - [capaths] - CLIENT-REALM = { - SERVER-REALM = PERMITTED-CROSS-REALMS ... - } - -In the following example, the realm `STACKEN.KTH.SE' only has direct -cross-realm set up with `KTH.SE'. `KTH.SE' has direct cross-realm set -up with `STACKEN.KTH.SE' and `SU.SE'. `DSV.SU.SE' only has direct -cross-realm set up with `SU.SE'. The goal is to allow principals in -the `DSV.SU.SE' or `SU.SE' realms to authenticate to services in -`STACKEN.KTH.SE'. This is done with the following `[capaths]' entry on -either the server accepting authentication or on the KDC for -`STACKEN.KTH.SE'. - - [capaths] - SU.SE = { - STACKEN.KTH.SE = KTH.SE - } - DSV.SU.SE = { - STACKEN.KTH.SE = SU.SE KTH.SE - } - -The first entry allows cross-realm authentication from clients in -`SU.SE' transiting through `KTH.SE' to `STACKEN.KTH.SE'. The second -entry allows cross-realm authentication from clients in `DSV.SU.SE' -transiting through both `SU.SE' and `KTH.SE' to `STACKEN.KTH.SE'. - -Be careful of which realm goes where; it's easy to put realms in the -wrong place. The block is tagged with the client realm (the realm of -the principal authenticating), and the realm before the equal sign is -the final destination realm: the realm to which the client is -authenticating. After the equal sign go all the realms that the client -transits through. - -The order of the `PERMITTED-CROSS-REALMS' is not important when doing -transit cross realm verification. - -4.14.2 Configuring client cross-realm transits ----------------------------------------------- - -The `[capaths]' section is also used for another purpose: to tell -clients which realm to transit through to reach a realm with which -their local realm does not have cross-realm trust. This can be done by -either putting a `[capaths]' entry in the configuration of the client -or by putting the entry in the configuration of the KDC for the -client's local realm. In the latter case, the KDC will then hand back -a referral to the client when the client requests a cross-realm ticket -to the destination realm, telling the client to try to go through an -intermediate realm. - -For client configuration, the order of `PERMITTED-CROSS-REALMS' is -significant, since only the first realm in this section (after the -equal sign) is used by the client. - -For example, again consider the `[capaths]' entry above for the case of -a client in the `SU.SE' realm, and assume that the client or the -`SU.SE' KDC has that `[capaths]' entry. If the client attempts to -authenticate to a service in the `STACKEN.KTH.SE' realm, that entry -says to first authenticate cross-realm to the `KTH.SE' realm (the first -realm listed in the `PERMITTED-CROSS-REALMS' section), and then from -there to `STACKEN.KTH.SE'. - -Each entry in `[capaths]' can only give the next hop, since only the -first realm in `PERMITTED-CROSS-REALMS' is used. If, for instance, a -client in `DSV.SU.SE' had a `[capaths]' configuration as above but -without the first block for `SU.SE', they would not be able to reach -`STACKEN.KTH.SE'. They would get as far as `SU.SE' based on the -`DSV.SU.SE' entry in `[capaths]' and then attempt to go directly from -there to `STACKEN.KTH.SE' and get stuck (unless, of course, the `SU.SE' -KDC had the additional entry required to tell the client to go through -`KTH.SE'). - -4.14.3 Active Directory forest example --------------------------------------- - -One common place where a `[capaths]' configuration is desirable is with -Windows Active Directory forests. One common Active Directory -configuration is to have one top-level Active Directory realm but then -divide systems, services, and users into child realms (perhaps based on -organizational unit). One generally establishes cross-realm trust only -with the top-level realm, and then uses transit policy to permit -authentications to and from the child realms. - -For example, suppose an organization has a Heimdal realm `EXAMPLE.COM', -a Windows Active Directory realm `WIN.EXAMPLE.COM', and then child -Active Directory realms `ENGR.WIN.EXAMPLE.COM' and -`SALES.WIN.EXAMPLE.COM'. The goal is to allow users in any of these -realms to authenticate to services in any of these realms. The -`EXAMPLE.COM' KDC (and possibly client) configuration should therefore -contain a `[capaths]' section as follows: - - [capaths] - ENGR.WIN.EXAMPLE.COM = { - EXAMPLE.COM = WIN.EXAMPLE.COM - } - SALES.WIN.EXAMPLE.COM = { - EXAMPLE.COM = WIN.EXAMPLE.COM - } - EXAMPLE.COM = { - ENGR.WIN.EXAMPLE.COM = WIN.EXAMPLE.COM - SALES.WIN.EXAMPLE.COM = WIN.EXAMPLE.COM - } - -The first two blocks allow clients in the `ENGR.WIN.EXAMPLE.COM' and -`SALES.WIN.EXAMPLE.COM' realms to authenticate to services in the -`EXAMPLE.COM' realm. The third block tells the client (or tells the -KDC to tell the client via referrals) to transit through -`WIN.EXAMPLE.COM' to reach these realms. Both sides of the -configuration are needed for bi-directional transited cross-realm -authentication. - - -File: heimdal.info, Node: Setting up DNS, Next: Using LDAP to store the database, Prev: Transit policy, Up: Setting up a realm - -4.15 Setting up DNS -=================== - -4.15.1 Using DNS to find KDC ----------------------------- - -If there is information about where to find the KDC or kadmind for a -realm in the `krb5.conf' for a realm, that information will be -preferred, and DNS will not be queried. - -Heimdal will try to use DNS to find the KDCs for a realm. First it will -try to find a `SRV' resource record (RR) for the realm. If no SRV RRs -are found, it will fall back to looking for an `A' RR for a machine -named kerberos.REALM, and then kerberos-1.REALM, etc - -Adding this information to DNS minimises the client configuration (in -the common case, resulting in no configuration needed) and allows the -system administrator to change the number of KDCs and on what machines -they are running without caring about clients. - -The downside of using DNS is that the client might be fooled to use the -wrong server if someone fakes DNS replies/data, but storing the IP -addresses of the KDC on all the clients makes it very hard to change -the infrastructure. - -An example of the configuration for the realm `EXAMPLE.COM': - - - $ORIGIN example.com. - _kerberos._tcp SRV 10 1 88 kerberos.example.com. - _kerberos._udp SRV 10 1 88 kerberos.example.com. - _kerberos._tcp SRV 10 1 88 kerberos-1.example.com. - _kerberos._udp SRV 10 1 88 kerberos-1.example.com. - _kpasswd._udp SRV 10 1 464 kerberos.example.com. - _kerberos-adm._tcp SRV 10 1 749 kerberos.example.com. - -More information about DNS SRV resource records can be found in -RFC-2782 (A DNS RR for specifying the location of services (DNS SRV)). - -4.15.2 Using DNS to map hostname to Kerberos realm --------------------------------------------------- - -Heimdal also supports a way to lookup a realm from a hostname. This to -minimise configuration needed on clients. Using this has the drawback -that clients can be redirected by an attacker to realms within the same -cross realm trust and made to believe they are talking to the right -server (since Kerberos authentication will succeed). - -An example configuration that informs clients that for the realms -it.example.com and srv.example.com, they should use the realm -EXAMPLE.COM: - - - $ORIGIN example.com. - _kerberos.it TXT "EXAMPLE.COM" - _kerberos.srv TXT "EXAMPLE.COM" - - -File: heimdal.info, Node: Using LDAP to store the database, Next: Providing Kerberos credentials to servers and programs, Prev: Setting up DNS, Up: Setting up a realm - -4.16 Using LDAP to store the database -===================================== - -This document describes how to install the LDAP backend for Heimdal. -Note that before attempting to configure such an installation, you -should be aware of the implications of storing private information -(such as users' keys) in a directory service primarily designed for -public information. Nonetheless, with a suitable authorisation policy, -it is possible to set this up in a secure fashion. A knowledge of LDAP, -Kerberos, and C is necessary to install this backend. The HDB schema -was devised by Leif Johansson. - -This assumes, OpenLDAP 2.3 or later. - -Requirements: - - * A current release of Heimdal, configured with - `--with-openldap=/usr/local' (adjust according to where you have - installed OpenLDAP). - - You can verify that you manage to configure LDAP support by running - `kdc --builtin-hdb', and checking that `ldap:' is one entry in the - list. - - Its also possible to configure the ldap backend as a shared module, - see option -hdb-openldap-module to configure. - - * Configure OpenLDAP with `--enable-local' to enable the local - transport. - - * Add the hdb schema to the LDAP server, it's included in the - source-tree in `lib/hdb/hdb.schema'. Example from slapd.conf: - - include /usr/local/etc/openldap/schema/hdb.schema - - * Configure the LDAP server ACLs to accept writes from clients over - the local transport. For example: - - access to * - by dn.exact="uid=heimdal,dc=services,dc=example,dc=com" write - ... - - authz-regexp "gidNumber=.*\\\+uidNumber=0,cn=peercred,cn=external,cn=auth'' - "uid=heimdal,dc=services,dc=example,dc=com" - - The sasl-regexp is for mapping between the SASL/EXTERNAL and a - user in a tree. The user that the key is mapped to should be have - a krb5Principal aux object with krb5PrincipalName set so that the - "creator" and "modifier" is right in `kadmin'. - - Another option is to create an admins group and add the dn to that - group. - - Since Heimdal talks to the LDAP server over a UNIX domain socket, - and uses external sasl authentication, it's not possible to require - security layer quality (ssf in cyrus-sasl lingo). So that - requirement has to be turned off in OpenLDAP `slapd' configuration - file `slapd.conf'. - - sasl-secprops minssf=0 - - * Start `slapd' with the local listener (as well as the default - TCP/IP listener on port 389) as follows: - - slapd -h "ldapi:/// ldap:///" - - Note: These is a bug in `slapd' where it appears to corrupt the - krb5Key binary attribute on shutdown. This may be related to our - use of the V3 schema definition syntax instead of the old - UMich-style, V2 syntax. - - * You should specify the distinguished name under which your - principals will be stored in `krb5.conf'. Also you need to enter - the path to the kadmin acl file: - - [kdc] - database = { - dbname = ldap:ou=KerberosPrincipals,dc=example,dc=com - hdb-ldap-structural-object = inetOrgPerson - acl_file = /path/to/kadmind.acl - mkey_file = /path/to/mkey - } - - `mkey_file' can be excluded if you feel that you trust your ldap - directory to have the raw keys inside it. The - hdb-ldap-structural-object is not necessary if you do not need - Samba comatibility. - - * Once you have built Heimdal and started the LDAP server, run kadmin - (as usual) to initialise the database. Note that the instructions - for stashing a master key are as per any Heimdal installation. - - kdc# kadmin -l - kadmin> init EXAMPLE.COM - Realm max ticket life [unlimited]: - Realm max renewable ticket life [unlimited]: - kadmin> add lukeh - Max ticket life [1 day]: - Max renewable life [1 week]: - Principal expiration time [never]: - Password expiration time [never]: - Attributes []: - lukeh@EXAMPLE.COM's Password: - Verifying password - lukeh@EXAMPLE.COM's Password: - kadmin> exit - - Verify that the principal database has indeed been stored in the - directory with the following command: - - kdc# ldapsearch -L -h localhost -D cn=manager \ - -w secret -b ou=KerberosPrincipals,dc=example,dc=com \ - 'objectclass=krb5KDCEntry' - - * Now consider adding indexes to the database to speed up the - access, at least theses should be added to slapd.conf. - - index objectClass eq - index cn eq,sub,pres - index uid eq,sub,pres - index displayName eq,sub,pres - index krb5PrincipalName eq - - -4.16.1 smbk5pwd overlay ------------------------ - -The smbk5pwd overlay, updates the krb5Key and krb5KeyVersionNumber -appropriately when it receives an LDAP Password change Extended -Operation: - -`http://www.openldap.org/devel/cvsweb.cgi/contrib/slapd-modules/smbk5pwd/README?hideattic=1&sortbydate=0' - -4.16.2 Troubleshooting guide ----------------------------- - -`https://sec.miljovern.no/bin/view/Info/TroubleshootingGuide' - -4.16.3 Using Samba LDAP password database ------------------------------------------ - -The Samba domain and the Kerberos realm can have different names since -arcfour's string to key functions principal/realm independent. So now -will be your first and only chance name your Kerberos realm without -needing to deal with old configuration files. - -First, you should set up Samba and get that working with LDAP backend. - -Now you can proceed as in *Note Using LDAP to store the database::. -Heimdal will pick up the Samba LDAP entries if they are in the same -search space as the Kerberos entries. - - -File: heimdal.info, Node: Providing Kerberos credentials to servers and programs, Next: Setting up PK-INIT, Prev: Using LDAP to store the database, Up: Setting up a realm - -4.17 Providing Kerberos credentials to servers and programs -=========================================================== - -Some services require Kerberos credentials when they start to make -connections to other services or need to use them when they have -started. - -The easiest way to get tickets for a service is to store the key in a -keytab. Both ktutil get and kadmin ext can be used to get a keytab. -ktutil get is better in that way it changes the key/password for the -user. This is also the problem with ktutil. If ktutil is used for the -same service principal on several hosts, they keytab will only be -useful on the last host. In that case, run the extract command on one -host and then securely copy the keytab around to all other hosts that -need it. - - host# ktutil -k /etc/krb5-service.keytab \ - get -p lha/admin@EXAMPLE.ORG service-principal@EXAMPLE.ORG - lha/admin@EXAMPLE.ORG's Password: - -To get a Kerberos credential file for the service, use kinit in the -`--keytab' mode. This will not ask for a password but instead fetch the -key from the keytab. - - service@host$ kinit --cache=/var/run/service_krb5_cache \ - --keytab=/etc/krb5-service.keytab \ - service-principal@EXAMPLE.ORG - -Long running services might need credentials longer then the expiration -time of the tickets. kinit can run in a mode that refreshes the tickets -before they expire. This is useful for services that write into AFS and -other distributed file systems using Kerberos. To run the long running -script, just append the program and arguments (if any) after the -principal. kinit will stop refreshing credentials and remove the -credentials when the script-to-start-service exits. - - service@host$ kinit --cache=/var/run/service_krb5_cache \ - --keytab=/etc/krb5-service.keytab \ - service-principal@EXAMPLE.ORG \ - script-to-start-service argument1 argument2 - - -File: heimdal.info, Node: Setting up PK-INIT, Next: Debugging Kerberos problems, Prev: Providing Kerberos credentials to servers and programs, Up: Setting up a realm - -4.18 Setting up PK-INIT -======================= - -PK-INIT leverages an existing PKI (public key infrastructure), using -certificates to get the initial ticket (usually the krbtgt -ticket-granting ticket). - -To use PK-INIT you must first have a PKI. If you don't have one, it is -time to create it. You should first read the whole chapter of the -document to see the requirements imposed on the CA software. - -A mapping between the PKI certificate and what principals that -certificate is allowed to use must exist. There are several ways to do -this. The administrator can use a configuration file, store the -principal in the SubjectAltName extension of the certificate, or store -the mapping in the principals entry in the kerberos database. - -4.19 Certificates -================= - -This section documents the requirements on the KDC and client -certificates and the format used in the id-pkinit-san OtherName -extention. - -4.19.1 KDC certificate ----------------------- - -The certificate for the KDC has serveral requirements. - -First, the certificate should have an Extended Key Usage (EKU) -id-pkkdcekuoid (1.3.6.1.5.2.3.5) set. Second, there must be a -subjectAltName otherName using OID id-pkinit-san (1.3.6.1.5.2.2) in the -type field and a DER encoded KRB5PrincipalName that matches the name of -the TGS of the target realm. Also, if the certificate has a -nameConstraints extention with a Generalname with dNSName or iPAdress, -it must match the hostname or adress of the KDC. - -The client is not required by the standard to check the server -certificate for this information if the client has external information -confirming which certificate the KDC is supposed to be using. However, -adding this information to the KDC certificate removes the need to -specially configure the client to recognize the KDC certificate. - -Remember that if the client would accept any certificate as the KDC's -certificate, the client could be fooled into trusting something that -isn't a KDC and thus expose the user to giving away information (like a -password or other private information) that it is supposed to keep -secret. - -4.19.2 Client certificate -------------------------- - -The client certificate may need to have a EKU id-pkekuoid -(1.3.6.1.5.2.3.4) set depending on the certifiate on the KDC. - -It possible to store the principal (if allowed by the KDC) in the -certificate and thus delegate responsibility to do the mapping between -certificates and principals to the CA. - -This behavior is controlled by KDC configuration option: - - [kdc] - pkinit_principal_in_certificate = yes - -4.19.2.1 Using KRB5PrincipalName in id-pkinit-san -................................................. - -The OtherName extention in the GeneralName is used to do the mapping -between certificate and principal. For the KDC certificate, this -stores the krbtgt principal name for that KDC. For the client -certificate, this stores the principal for which that certificate is -allowed to get tickets. - -The principal is stored in a SubjectAltName in the certificate using -OtherName. The OID in the type is id-pkinit-san. - - id-pkinit-san OBJECT IDENTIFIER ::= { iso (1) org (3) dod (6) - internet (1) security (5) kerberosv5 (2) 2 } - -The data part of the OtherName is filled with the following DER encoded -ASN.1 structure: - - KRB5PrincipalName ::= SEQUENCE { - realm [0] Realm, - principalName [1] PrincipalName - } - -where Realm and PrincipalName is defined by the Kerberos ASN.1 -specification. - -4.20 Naming certificate using hx509 -=================================== - -hx509 is the X.509 software used in Heimdal to handle certificates. -hx509 supports several different syntaxes for specifying certificate -files or formats. Several formats may be used: PEM, certificates -embedded in PKCS#12 files, certificates embedded in PKCS#11 devices, -and raw DER encoded certificates. - -Those formats may be specified as follows: - -DIR: - DIR specifies a directory which contains certificates in the DER or - PEM format. - - The main feature of DIR is that the directory is read on demand - when iterating over certificates. This allows applications, in some - situations, to avoid having to store all certificates in memory. - It's very useful for tests that iterate over large numbers of - certificates. - - The syntax is: - - DIR:/path/to/der/files - -FILE: - FILE: specifies a file that contains a certificate or private key. - The file can be either a PEM (openssl) file or a raw DER encoded - certificate. If it's a PEM file, it can contain several keys and - certificates and the code will try to match the private key and - certificate together. Multiple files may be specified, separated by - commas. - - It's useful to have one PEM file that contains all the trust - anchors. - - The syntax is: - - FILE:certificate.pem,private-key.key,other-cert.pem,.... - -PKCS11: - PKCS11: is used to handle smartcards via PKCS#11 drivers, such as - soft-token, opensc, or muscle. The argument specifies a shared - object that implements the PKCS#11 API. The default is to use all - slots on the device/token. - - The syntax is: - - PKCS11:shared-object.so - -PKCS12: - PKCS12: is used to handle PKCS#12 files. PKCS#12 files commonly - have the extension pfx or p12. - - The syntax is: - - PKCS12:/path/to/file.pfx - - -4.21 Configure the Kerberos software -==================================== - -First configure the client's trust anchors and what parameters to -verify. See the subsections below for how to do that. Then, you can use -kinit to get yourself tickets. For example: - - $ kinit -C FILE:$HOME/.certs/lha.crt,$HOME/.certs/lha.key lha@EXAMPLE.ORG - Enter your private key passphrase: - : lha@nutcracker ; klist - Credentials cache: FILE:/tmp/krb5cc_19100a - Principal: lha@EXAMPLE.ORG - - Issued Expires Principal - Apr 20 02:08:08 Apr 20 12:08:08 krbtgt/EXAMPLE.ORG@EXAMPLE.ORG - -Using PKCS#11 it can look like this instead: - - $ kinit -C PKCS11:/usr/heimdal/lib/hx509.so lha@EXAMPLE.ORG - PIN code for SoftToken (slot): - $ klist - Credentials cache: API:4 - Principal: lha@EXAMPLE.ORG - - Issued Expires Principal - Mar 26 23:40:10 Mar 27 09:40:10 krbtgt/EXAMPLE.ORG@EXAMPLE.ORG - -TODO: Write about the KDC. - -4.22 Configure the client -========================= - - [appdefaults] - pkinit_anchors = FILE:/path/to/trust-anchors.pem - - [realms] - EXAMPLE.COM = { - pkinit_require_eku = true - pkinit_require_krbtgt_otherName = true - pkinit_win2k = no - pkinit_win2k_require_binding = yes - } - -4.23 Configure the KDC -====================== - - [kdc] - enable-pkinit = yes - pkinit_identity = FILE:/secure/kdc.crt,/secure/kdc.key - pkinit_anchors = FILE:/path/to/trust-anchors.pem - pkinit_pool = PKCS12:/path/to/useful-intermediate-certs.pfx - pkinit_pool = FILE:/path/to/other-useful-intermediate-certs.pem - pkinit_allow_proxy_certificate = no - pkinit_win2k_require_binding = yes - pkinit_principal_in_certificate = no - -4.23.1 Using pki-mapping file ------------------------------ - -Note that the file name is space sensitive. - - # cat /var/heimdal/pki-mapping - # comments starts with # - lha@EXAMPLE.ORG:C=SE,O=Stockholm universitet,CN=Love,UID=lha - lha@EXAMPLE.ORG:CN=Love,UID=lha - -4.23.2 Using the Kerberos database ----------------------------------- - -4.24 Use hxtool to create certificates -====================================== - -4.24.1 Generate certificates ----------------------------- - -First, you need to generate a CA certificate. This example creates a CA -certificate that will be valid for 10 years. - -You need to change -subject in the command below to something -appropriate for your site. - - hxtool issue-certificate \ - --self-signed \ - --issue-ca \ - --generate-key=rsa \ - --subject="CN=CA,DC=test,DC=h5l,DC=se" \ - --lifetime=10years \ - --certificate="FILE:ca.pem" - -The KDC needs to have a certificate, so generate a certificate of the -type "pkinit-kdc" and set the PK-INIT specifial SubjectAltName to the -name of the krbtgt of the realm. - -You need to change -subject and -pk-init-principal in the command below -to something appropriate for your site. - - hxtool issue-certificate \ - --ca-certificate=FILE:ca.pem \ - --generate-key=rsa \ - --type="pkinit-kdc" \ - --pk-init-principal="krbtgt/TEST.H5L.SE@TEST.H5L.SE" \ - --subject="uid=kdc,DC=test,DC=h5l,DC=se" \ - --certificate="FILE:kdc.pem" - -The users also needs to have certificates. For your first client, -generate a certificate of type "pkinit-client". The client doesn't need -to have the PK-INIT SubjectAltName set; you can have the Subject DN in -the ACL file (pki-mapping) instead. - -You need to change -subject and -pk-init-principal in the command below -to something appropriate for your site. You can omit -pk-init-principal -if you're going to use the ACL file instead. - - hxtool issue-certificate \ - --ca-certificate=FILE:ca.pem \ - --generate-key=rsa \ - --type="pkinit-client" \ - --pk-init-principal="lha@TEST.H5L.SE" \ - --subject="uid=lha,DC=test,DC=h5l,DC=se" \ - --certificate="FILE:user.pem" - -4.24.2 Validate the certificate -------------------------------- - -hxtool also contains a tool that will validate certificates according -to rules from the PKIX document. These checks are not complete, but -they provide a good test of whether you got all of the basic bits right -in your certificates. - - hxtool validate FILE:user.pem - -4.25 Use OpenSSL to create certificates -======================================= - -This section tries to give the CA owners hints how to create -certificates using OpenSSL (or CA software based on OpenSSL). - -4.25.1 Using OpenSSL to create certificates with krb5PrincipalName ------------------------------------------------------------------- - -To make OpenSSL create certificates with krb5PrincipalName, use an -`openssl.cnf' as described below. To see a complete example of creating -client and KDC certificates, see the test-data generation script -`lib/hx509/data/gen-req.sh' in the source-tree. The certicates it -creates are used to test the PK-INIT functionality in -`tests/kdc/check-kdc.in'. - -To use this example you have to use OpenSSL 0.9.8a or later. - - - [user_certificate] - subjectAltName=otherName:1.3.6.1.5.2.2;SEQUENCE:princ_name - - [princ_name] - realm = EXP:0, GeneralString:MY.REALM - principal_name = EXP:1, SEQUENCE:principal_seq - - [principal_seq] - name_type = EXP:0, INTEGER:1 - name_string = EXP:1, SEQUENCE:principals - - [principals] - princ1 = GeneralString:userid - -Command usage: - - openssl x509 -extensions user_certificate - openssl ca -extensions user_certificate - -4.26 Using PK-INIT with Windows -=============================== - -4.26.1 Client configration --------------------------- - -Clients using a Windows KDC with PK-INIT need configuration since -windows uses pre-standard format and this can't be autodetected. - -The pkinit_win2k_require_binding option requires the reply for the KDC -to be of the new, secure, type that binds the request to reply. Before, -clients could fake the reply from the KDC. To use this option you have -to apply a fix from Microsoft. - - [realms] - MY.MS.REALM = { - pkinit_win2k = yes - pkinit_win2k_require_binding = no - } - -4.26.2 Certificates -------------------- - -The client certificates need to have the extended keyusage "Microsoft -Smartcardlogin" (openssl has the OID shortname msSmartcardLogin). - -See Microsoft Knowledge Base Article - 281245 "Guidelines for Enabling -Smart Card Logon with Third-Party Certification Authorities" for a more -extensive description of how set setup an external CA so that it -includes all the information required to make a Windows KDC happy. - -4.26.3 Configure Windows 2000 CA --------------------------------- - -To enable Microsoft Smartcardlogin for certificates in your Windows -2000 CA, you want to look at Microsoft Knowledge Base Article - 313274 -"HOW TO: Configure a Certification Authority to Issue Smart Card -Certificates in Windows". - - -File: heimdal.info, Node: Debugging Kerberos problems, Prev: Setting up PK-INIT, Up: Setting up a realm - -4.27 Debugging Kerberos problems -================================ - -To debug Kerberos client and server problems you can enable debug -traceing by adding the following to `/etc/krb5,conf'. Note that the -trace logging is sparse at the moment, but will continue to improve. - - [logging] - libkrb5 = 0-/SYSLOG: - - -File: heimdal.info, Node: Applications, Next: Things in search for a better place, Prev: Setting up a realm, Up: Top - -5 Applications -************** - -* Menu: - -* Authentication modules:: -* AFS:: - - -File: heimdal.info, Node: Authentication modules, Next: AFS, Prev: Applications, Up: Applications - -5.1 Authentication modules -========================== - -The problem of having different authentication mechanisms has been -recognised by several vendors, and several solutions have appeared. In -most cases these solutions involve some kind of shared modules that are -loaded at run-time. Modules for some of these systems can be found in -`lib/auth'. Presently there are modules for Digital's SIA, and IRIX' -`login' and `xdm' (in `lib/auth/afskauthlib'). - -* Menu: - -* Digital SIA:: -* IRIX:: - - -File: heimdal.info, Node: Digital SIA, Next: IRIX, Prev: Authentication modules, Up: Authentication modules - -5.1.1 Digital SIA ------------------ - -How to install the SIA module depends on which OS version you're -running. Tru64 5.0 has a new command, `siacfg', which makes this -process quite simple. If you have this program, you should just be able -to run: - siacfg -a KRB5 /usr/athena/lib/libsia_krb5.so - -On older versions, or if you want to do it by hand, you have to do the -following (not tested by us on Tru64 5.0): - - * Make sure `libsia_krb5.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 - `krb5_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) `krb5_matrix.conf' to `/etc/sia'. - - * Apply `security.patch' to `/sbin/init.d/security'. - - * Turn on KRB5 security by issuing `rcmgr set SECURITY KRB5' and - `rcmgr set KRB5_MATRIX_CONF krb5_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 `KRB5CCNAME' environment variable isn't -passed along as it should (since xdm zaps the environment). Instead you -have to set `KRB5CCNAME' to the correct value in -`/usr/lib/X11/xdm/Xsession'. Add a line similar to - KRB5CCNAME=FILE:/tmp/krb5cc`id -u`_`ps -o ppid= -p $$`; export KRB5CCNAME -If you use CDE, `dtlogin' allows you to specify which additional -environment variables it should export. To add `KRB5CCNAME' to this -list, edit `/usr/dt/config/Xconfig', and look for the definition of -`exportList'. You want to add something like: - Dtlogin.exportList: KRB5CCNAME - -Notes to users with Enhanced security -..................................... - -Digital's `ENHANCED' (C2) security, and Kerberos solve 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 occurrences of `krb5_matrix.conf' with - `krb5+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 who 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', don't do any particular C2 magic (such as checking for - 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_ fulfil 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. - - -File: heimdal.info, Node: IRIX, Prev: Digital SIA, Up: Authentication modules - -5.1.2 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 seem 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. - -Apart from this it should "just work"; there are no configuration files. - -Note that recent Irix 6.5 versions (at least 6.5.22) have PAM, -including a `pam_krb5.so' module. Not all relevant programs use PAM, -though, e.g. `ssh'. In particular, for console graphical login you need -to turn off `visuallogin' and turn on `xdm' with `chkconfig'. - - -File: heimdal.info, Node: AFS, Prev: Authentication modules, Up: Applications - -5.2 AFS -======= - -AFS is a distributed filesystem that uses Kerberos for authentication. - -For more information about AFS see OpenAFS `http://www.openafs.org/' -and Arla `http://www.stacken.kth.se/projekt/arla/'. - -5.2.1 kafs and afslog ---------------------- - -`afslog(1)' will obtains AFS tokens for a number of cells. What cells -to get tokens for can either be specified as an explicit list, as file -paths to get tokens for, or be left unspecified, in which case will use -whatever magic `kafs(3)' decides upon. - -If not told what cell to get credentials for, `kafs(3)' will search for -the files ThisCell and TheseCells in the locations specified in -`kafs(3)' and try to get tokens for these cells and the cells specified -in $HOME/.TheseCells. - -More usefully it will look at and ~/.TheseCells in your home directory -and for each line which is a cell get afs token for these cells. - -The TheseCells file defines the the cells to which applications on the -local client machine should try to aquire tokens for. It must reside in -the directories searched by `kafs(3)' on every AFS client machine. - -The file is in ASCII format and contains one character string, the cell -name, per line. Cell names are case sensitive, but most cell names are -lower case. - -See manpage for `kafs(3)' for search locations of ThisCell and -TheseCells. - -5.2.2 How to get a KeyFile --------------------------- - -`ktutil -k AFSKEYFILE:KeyFile get afs@MY.REALM' - -or you can extract it with kadmin - - kadmin> ext -k AFSKEYFILE:/usr/afs/etc/KeyFile afs@My.CELL.NAME - -You have to make sure you have a `des-cbc-md5' encryption type since -that is the enctype that will be converted. - -5.2.3 How to convert a srvtab to a KeyFile ------------------------------------------- - -You need a `/usr/vice/etc/ThisCell' containing the cellname of your -AFS-cell. - -`ktutil copy krb4:/root/afs-srvtab AFSKEYFILE:/usr/afs/etc/KeyFile'. - -If keyfile already exists, this will add the new key in afs-srvtab to -KeyFile. - -5.3 Using 2b tokens with AFS -============================ - -5.3.1 What is 2b ? ------------------- - -2b is the name of the proposal that was implemented to give basic -Kerberos 5 support to AFS in rxkad. It's not real Kerberos 5 support -since it still uses fcrypt for data encryption and not Kerberos -encryption types. - -Its only possible (in all cases) to do this for DES encryption types -because only then the token (the AFS equivalent of a ticket) will be -smaller than the maximum size that can fit in the token cache in the -OpenAFS/Transarc client. It is a so tight fit that some extra wrapping -on the ASN1/DER encoding is removed from the Kerberos ticket. - -2b uses a Kerberos 5 EncTicketPart instead of a Kerberos 4 ditto for -the part of the ticket that is encrypted with the service's key. The -client doesn't know what's inside the encrypted data so to the client -it doesn't matter. - -To differentiate between Kerberos 4 tickets and Kerberos 5 tickets, 2b -uses a special kvno, 213 for 2b tokens and 255 for Kerberos 5 tokens. - -Its a requirement that all AFS servers that support 2b also support -native Kerberos 5 in rxkad. - -5.3.2 Configuring a Heimdal kdc to use 2b tokens ------------------------------------------------- - -Support for 2b tokens in the kdc are turned on for specific principals -by adding them to the string list option `[kdc]use_2b' in the kdc's -`krb5.conf' file. - - [kdc] - use_2b = { - afs@SU.SE = yes - afs/it.su.se@SU.SE = yes - } - -5.3.3 Configuring AFS clients for 2b support --------------------------------------------- - -There is no need to configure AFS clients for 2b support. The only -software that needs to be installed/upgrade is a Kerberos 5 enabled -`afslog'. - - -File: heimdal.info, Node: Things in search for a better place, Next: Kerberos 4 issues, Prev: Applications, Up: Top - -6 Things in search for a better place -************************************* - -6.1 Making things work on Ciscos -================================ - -Modern versions of Cisco IOS has some support for authenticating via -Kerberos 5. This can be used both by having the router get a ticket when -you login (boring), and by using Kerberos authenticated telnet to access -your router (less boring). The following has been tested on IOS -11.2(12), things might be different with other versions. Old versions -are known to have bugs. - -To make this work, you will first have to configure your router to use -Kerberos (this is explained in the documentation). A sample -configuration looks like the following: - - aaa new-model - aaa authentication login default krb5-telnet krb5 enable - aaa authorization exec krb5-instance - kerberos local-realm FOO.SE - kerberos srvtab entry host/router.foo.se 0 891725446 4 1 8 012345678901234567 - kerberos server FOO.SE 10.0.0.1 - kerberos instance map admin 15 - -This tells you (among other things) that when logging in, the router -should try to authenticate with kerberised telnet, and if that fails try -to verify a plain text password via a Kerberos ticket exchange (as -opposed to a local database, RADIUS or something similar), and if that -fails try the local enable password. If you're not careful when you -specify the `login default' authentication mechanism, you might not be -able to login at all. The `instance map' and `authorization exec' lines -says that people with `admin' instances should be given `enabled' shells -when logging in. - -The numbers after the principal on the `srvtab' line are principal type, -time stamp (in seconds since 1970), key version number (4), keytype (1 -== des), key length (always 8 with des), and then the key. - -To make the Heimdal KDC produce tickets that the Cisco can decode you -might have to turn on the `encode_as_rep_as_tgs_rep' flag in the KDC. -You will also have to specify that the router can't handle anything but -`des-cbc-crc'. This can be done with the `del_enctype' command of -`kadmin'. - -This all fine and so, but unless you have an IOS version with encryption -(available only in the U.S) it doesn't really solve any problems. Sure -you don't have to send your password over the wire, but since the telnet -connection isn't protected it's still possible for someone to steal your -session. This won't be fixed until someone adds integrity to the telnet -protocol. - -A working solution would be to hook up a machine with a real operating -system to the console of the Cisco and then use it as a backwards -terminal server. - - -File: heimdal.info, Node: Kerberos 4 issues, Next: Windows compatibility, Prev: Things in search for a better place, Up: Top - -7 Kerberos 4 issues -******************* - -Kerberos 4 KDC and KA server have been moved. - -For more about AFS, see the section *Note AFS::. - -* Menu: - -* Principal conversion issues:: -* Converting a version 4 database:: - - -File: heimdal.info, Node: Principal conversion issues, Next: Converting a version 4 database, Prev: Kerberos 4 issues, Up: Kerberos 4 issues - -7.1 Principal conversion issues -=============================== - -First, Kerberos 4 and Kerberos 5 principals are different. A version 4 -principal consists of a name, an instance, and a realm. A version 5 -principal has one or more components, and a realm (the terms "name" and -"instance" are still used, for the first and second component, -respectively). Also, in some cases the name of a version 4 principal -differs from the first component of the corresponding version 5 -principal. One notable example is the "host" type principals, where the -version 4 name is `rcmd' (for "remote command"), and the version 5 name -is `host'. For the class of principals that has a hostname as instance, -there is an other major difference, Kerberos 4 uses only the first -component of the hostname, whereas Kerberos 5 uses the fully qualified -hostname. - -Because of this it can be hard or impossible to correctly convert a -version 4 principal to a version 5 principal (1). The biggest problem is -to know if the conversion resulted in a valid principal. To give an -example, suppose you want to convert the principal `rcmd.foo'. - -The `rcmd' name suggests that the instance is a hostname (even if there -are exceptions to this rule). To correctly convert the instance `foo' -to a hostname, you have to know which host it is referring to. You can -to this by either guessing (from the realm) which domain name to -append, or you have to have a list of possible hostnames. In the -simplest cases you can cover most principals with the first rule. If you -have several domains sharing a single realm this will not usually work. -If the exceptions are few you can probably come by with a lookup table -for the exceptions. - -In a complex scenario you will need some kind of host lookup mechanism. -Using DNS for this is tempting, but DNS is error prone, slow and unsafe -(2). - -Fortunately, the KDC has a trump on hand: it can easily tell if a -principal exists in the database. The KDC will use -`krb5_425_conv_principal_ext' to convert principals when handling to -version 4 requests. - ----------- Footnotes ---------- - -(1) the other way is not always trivial either, but usually easier - -(2) at least until secure DNS is commonly available - - -File: heimdal.info, Node: Converting a version 4 database, Prev: Principal conversion issues, Up: Kerberos 4 issues - -7.2 Converting a version 4 database -=================================== - -If you want to convert an existing version 4 database, the principal -conversion issue arises too. - -If you decide to convert your database once and for all, you will only -have to do this conversion once. It is also possible to run a version 5 -KDC as a slave to a version 4 KDC. In this case this conversion will -happen every time the database is propagated. When doing this -conversion, there are a few things to look out for. If you have stale -entries in the database, these entries will not be converted. This might -be because these principals are not used anymore, or it might be just -because the principal couldn't be converted. - -You might also see problems with a many-to-one mapping of principals. -For instance, if you are using DNS lookups and you have two principals -`rcmd.foo' and `rcmd.bar', where `foo' is a CNAME for `bar', the -resulting principals will be the same. Since the conversion function -can't tell which is correct, these conflicts will have to be resolved -manually. - -7.2.1 Conversion example ------------------------- - -Given the following set of hosts and services: - - foo.se rcmd - mail.foo.se rcmd, pop - ftp.bar.se rcmd, ftp - -you have a database that consists of the following principals: - -`rcmd.foo', `rcmd.mail', `pop.mail', `rcmd.ftp', and `ftp.ftp'. - -lets say you also got these extra principals: `rcmd.gone', -`rcmd.old-mail', where `gone.foo.se' was a machine that has now passed -away, and `old-mail.foo.se' was an old mail machine that is now a CNAME -for `mail.foo.se'. - -When you convert this database you want the following conversions to be -done: - rcmd.foo host/foo.se - rcmd.mail host/mail.foo.se - pop.mail pop/mail.foo.se - rcmd.ftp host/ftp.bar.se - ftp.ftp ftp/ftp.bar.se - rcmd.gone removed - rcmd.old-mail removed - -A `krb5.conf' that does this looks like: - - [realms] - FOO.SE = { - v4_name_convert = { - host = { - ftp = ftp - pop = pop - rcmd = host - } - } - v4_instance_convert = { - foo = foo.se - ftp = ftp.bar.se - } - default_domain = foo.se - } - -The `v4_name_convert' section says which names should be considered -having an instance consisting of a hostname, and it also says how the -names should be converted (for instance `rcmd' should be converted to -`host'). The `v4_instance_convert' section says how a hostname should -be qualified (this is just a hosts-file in disguise). Host-instances -that aren't covered by `v4_instance_convert' are qualified by appending -the contents of the `default_domain'. - -Actually, this example doesn't work. Or rather, it works to well. Since -it has no way of knowing which hostnames are valid and which are not, it -will happily convert `rcmd.gone' to `host/gone.foo.se'. This isn't a -big problem, but if you have run your kerberos realm for a few years, -chances are big that you have quite a few `junk' principals. - -If you don't want this you can remove the `default_domain' statement, -but then you will have to add entries for _all_ your hosts in the -`v4_instance_convert' section. - -Instead of doing this you can use DNS to convert instances. This is not -a solution without problems, but it is probably easier than adding lots -of static host entries. - -To enable DNS lookup you should turn on `v4_instance_resolve' in the -`[libdefaults]' section. - -7.2.2 Converting a database ---------------------------- - -The database conversion is done with `hprop'. You can run this command -to propagate the database to the machine called `slave-server' (which -should be running a `hpropd'). - - hprop --source=krb4-db --master-key=/.m slave-server - -This command can also be to use for converting the v4 database on the -server: - - hprop -n --source=krb4-db -d /var/kerberos/principal --master-key=/.m | hpropd -n - - -File: heimdal.info, Node: Windows compatibility, Next: Programming with Kerberos, Prev: Kerberos 4 issues, Up: Top - -8 Windows compatibility -*********************** - -Microsoft Windows, starting from version 2000 (formerly known as -Windows NT 5), implements Kerberos 5. Their implementation, however, -has some quirks, peculiarities, and bugs. This chapter is a short -summary of the compatibility issues between Heimdal and various Windows -versions. - -The big problem with the Kerberos implementation in Windows is that the -available documentation is more focused on getting things to work -rather than how they work, and not that useful in figuring out how -things really work. It's of course subject to change all the time and -mostly consists of our not so inspired guesses. Hopefully it's still -somewhat useful. - -* Menu: - -* Configuring Windows to use a Heimdal KDC:: -* Inter-Realm keys (trust) between Windows and a Heimdal KDC:: -* Create account mappings:: -* Encryption types:: -* Authorisation data:: -* Quirks of Windows 2000 KDC:: -* Useful links when reading about the Windows:: - - -File: heimdal.info, Node: Configuring Windows to use a Heimdal KDC, Next: Inter-Realm keys (trust) between Windows and a Heimdal KDC, Prev: Windows compatibility, Up: Windows compatibility - -8.1 Configuring Windows to use a Heimdal KDC -============================================ - -You need the command line program called `ksetup.exe'. This program -comes with the Windows Support Tools, available from either the -installation CD-ROM (`SUPPORT/TOOLS/SUPPORT.CAB'), or from Microsoft -web site. Starting from Windows 2008, it is already installed. This -program is used to configure the Kerberos settings on a Workstation. - -`Ksetup' store the domain information under the registry key: -`HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\LSA\Kerberos\Domains'. - -Use the `kadmin' program in Heimdal to create a host principal in the -Kerberos realm. - - unix% kadmin - kadmin> ank --password=password host/datan.example.com - -The name `datan.example.com' should be replaced with DNS name of the -workstation. - -You must configure the workstation as a member of a workgroup, as -opposed to a member in an NT domain, and specify the KDC server of the -realm as follows: - C:> ksetup /setdomain EXAMPLE.COM - C:> ksetup /addkdc EXAMPLE.COM kdc.example.com - -Set the machine password, i.e. create the local keytab: - C:> ksetup /SetComputerPassword password - -The password used in `ksetup /setmachpassword' must be the same as the -password used in the `kadmin ank' command. - -The workstation must now be rebooted. - -A mapping between local NT users and Kerberos principals must be -specified. You have two choices. First: - - C:> ksetup /mapuser user@MY.REALM nt_user - -This will map a user to a specific principal; this allows you to have -other usernames in the realm than in your NT user database. (Don't ask -me why on earth you would want that....) - -You can also say: - C:> ksetup /mapuser * * -The Windows machine will now map any user to the corresponding -principal, for example `nisse' to the principal `nisse@MY.REALM'. -(This is most likely what you want.) - - -File: heimdal.info, Node: Inter-Realm keys (trust) between Windows and a Heimdal KDC, Next: Create account mappings, Prev: Configuring Windows to use a Heimdal KDC, Up: Windows compatibility - -8.2 Inter-Realm keys (trust) between Windows and a Heimdal KDC -============================================================== - -See also the Step-by-Step guide from Microsoft, referenced below. - -Install Windows, and create a new controller (Active Directory Server) -for the domain. - -By default the trust will be non-transitive. This means that only users -directly from the trusted domain may authenticate. This can be changed -to transitive by using the `netdom.exe' tool. `netdom.exe' can also be -used to add the trust between two realms. - -You need to tell Windows on what hosts to find the KDCs for the -non-Windows realm with `ksetup', see *Note Configuring Windows to use a -Heimdal KDC::. - -This needs to be done on all computers that want enable cross-realm -login with `Mapped Names'. Then you need to add the inter-realm keys -on the Windows KDC. Start the Domain Tree Management tool (found in -Programs, Administrative tools, Active Directory Domains and Trusts). - -Right click on Properties of your domain, select the Trust tab. Press -Add on the appropriate trust windows and enter domain name and -password. When prompted if this is a non-Windows Kerberos realm, press -OK. - -Do not forget to add trusts in both directions (if that's what you -want). - -If you want to use `netdom.exe' instead of the Domain Tree Management -tool, you do it like this: - - netdom trust NT.REALM.EXAMPLE.COM /Domain:EXAMPLE.COM /add /realm /passwordt:TrustPassword - -You also need to add the inter-realm keys to the Heimdal KDC. But take -care to the encryption types and salting used for those keys. There -should be no encryption type stronger than the one configured on -Windows side for this relationship, itself limited to the ones -supported by this specific version of Windows, nor any Kerberos 4 -salted hashes, as Windows does not seem to understand them. Otherwise, -the trust will not works. - -Here are the version-specific needed information: - 1. Windows 2000: maximum encryption type is DES - - 2. Windows 2003: maximum encryption type is DES - - 3. Windows 2003RC2: maximum encryption type is RC4, relationship - defaults to DES - - 4. Windows 2008: maximum encryption type is AES, relationship - defaults to RC4 - -For Windows 2003RC2, to change the trust encryption type, you have to -use the `ktpass', from the Windows 2003 Resource kit *service pack2*, -available from Microsoft web site. - - C:> ktpass /MITRealmName UNIX.EXAMPLE.COM /TrustEncryp RC4 - -For Windows 2008, the same operation can be done with the `ksetup', -installed by default. - - C:> ksetup /SetEncTypeAttre EXAMPLE.COM AES256-SHA1 - -Once the relationship is correctly configured, you can add the required -inter-realm keys, using heimdal default encryption types: - - kadmin add krbtgt/NT.REALM.EXAMPLE.COM@EXAMPLE.COM - kadmin add krbtgt/REALM.EXAMPLE.COM@NT.EXAMPLE.COM - -Use the same passwords for both keys. - -And if needed, to remove unsupported encryptions, such as the following -ones for a Windows 2003RC2 server. - - kadmin del_enctype krbtgt/REALM.EXAMPLE.COM@NT.EXAMPLE.COM aes256-cts-hmac-sha1-96 - kadmin del_enctype krbtgt/REALM.EXAMPLE.COM@NT.EXAMPLE.COM des3-cbc-sha1 - kadmin del_enctype krbtgt/NT.EXAMPLE.COM@EXAMPLE.COM aes256-cts-hmac-sha1-96 - kadmin del_enctype krbtgt/NT.EXAMPLE.COM@EXAMPLE.COM des3-cbc-sha1 - -Do not forget to reboot before trying the new realm-trust (after -running `ksetup'). It looks like it might work, but packets are never -sent to the non-Windows KDC. - - -File: heimdal.info, Node: Create account mappings, Next: Encryption types, Prev: Inter-Realm keys (trust) between Windows and a Heimdal KDC, Up: Windows compatibility - -8.3 Create account mappings -=========================== - -Start the `Active Directory Users and Computers' tool. Select the View -menu, that is in the left corner just below the real menu (or press -Alt-V), and select Advanced Features. Right click on the user that you -are going to do a name mapping for and choose Name mapping. - -Click on the Kerberos Names tab and add a new principal from the -non-Windows domain. - -This adds `authorizationNames' entry to the users LDAP entry to the -Active Directory LDAP catalog. When you create users by script you can -add this entry instead. - - -File: heimdal.info, Node: Encryption types, Next: Authorisation data, Prev: Create account mappings, Up: Windows compatibility - -8.4 Encryption types -==================== - -Windows 2000 supports both the standard DES encryptions (`des-cbc-crc' -and `des-cbc-md5') and its own proprietary encryption that is based on -MD4 and RC4 that is documented in and is supposed to be described in -`draft-brezak-win2k-krb-rc4-hmac-03.txt'. New users will get both MD4 -and DES keys. Users that are converted from a NT4 database, will only -have MD4 passwords and will need a password change to get a DES key. - - -File: heimdal.info, Node: Authorisation data, Next: Quirks of Windows 2000 KDC, Prev: Encryption types, Up: Windows compatibility - -8.5 Authorisation data -====================== - -The Windows 2000 KDC also adds extra authorisation data in tickets. It -is at this point unclear what triggers it to do this. The format of -this data is only available under a "secret" license from Microsoft, -which prohibits you implementing it. - -A simple way of getting hold of the data to be able to understand it -better is described here. - - 1. Find the client example on using the SSPI in the SDK documentation. - - 2. Change "AuthSamp" in the source code to lowercase. - - 3. Build the program. - - 4. Add the "authsamp" principal with a known password to the - database. Make sure it has a DES key. - - 5. Run `ktutil add' to add the key for that principal to a keytab. - - 6. Run `appl/test/nt_gss_server -p 2000 -s authsamp --dump-auth=FILE' - where FILE is an appropriate file. - - 7. It should authenticate and dump for you the authorisation data in - the file. - - 8. The tool `lib/asn1/asn1_print' is somewhat useful for analysing - the data. - - -File: heimdal.info, Node: Quirks of Windows 2000 KDC, Next: Useful links when reading about the Windows, Prev: Authorisation data, Up: Windows compatibility - -8.6 Quirks of Windows 2000 KDC -============================== - -There are some issues with salts and Windows 2000. Using an empty -salt--which is the only one that Kerberos 4 supported, and is therefore -known as a Kerberos 4 compatible salt--does not work, as far as we can -tell from out experiments and users' reports. Therefore, you have to -make sure you keep around keys with all the different types of salts -that are required. Microsoft have fixed this issue post Windows 2003. - -Microsoft seems also to have forgotten to implement the checksum -algorithms `rsa-md4-des' and `rsa-md5-des'. This can make Name mapping -(*note Create account mappings::) fail if a `des-cbc-md5' key is used. -To make the KDC return only `des-cbc-crc' you must delete the -`des-cbc-md5' key from the kdc using the `kadmin del_enctype' command. - - kadmin del_enctype lha des-cbc-md5 - -You should also add the following entries to the `krb5.conf' file: - - [libdefaults] - default_etypes = des-cbc-crc - default_etypes_des = des-cbc-crc - -These configuration options will make sure that no checksums of the -unsupported types are generated. - - -File: heimdal.info, Node: Useful links when reading about the Windows, Prev: Quirks of Windows 2000 KDC, Up: Windows compatibility - -8.7 Useful links when reading about the Windows -=============================================== - -See also our paper presented at the 2001 Usenix Annual Technical -Conference, available in the proceedings or at -`http://www.usenix.org/publications/library/proceedings/usenix01/freenix01/westerlund.html'. - -There are lots of texts about Kerberos on Microsoft's web site, here is -a short list of the interesting documents that we have managed to find. - - * Step-by-Step Guide to Kerberos 5 (krb5 1.0) Interoperability: - `http://www.microsoft.com/technet/prodtechnol/windows2000serv/howto/kerbstep.mspx'. - Kerberos GSS-API (in Windows-eze SSPI), Windows as a client in a - non-Windows KDC realm, adding unix clients to a Windows 2000 KDC, - and adding cross-realm trust (*note Inter-Realm keys (trust) - between Windows and a Heimdal KDC::). - - * Windows 2000 Kerberos Authentication: - `www.microsoft.com/technet/prodtechnol/windows2000serv/deploy/confeat/kerberos.mspx'. - White paper that describes how Kerberos is used in Windows 2000. - - * Overview of Kerberos: - `http://support.microsoft.com/support/kb/articles/Q248/7/58.ASP'. - Links to useful other links. - - * Event logging for Kerberos: - `http://support.microsoft.com/support/kb/articles/Q262/1/77.ASP'. - Basically it say that you can add a registry key - `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters\LogLevel' - with value DWORD equal to 1, and then you'll get logging in the - Event Logger. - - -Other useful programs include these: - - * pwdump2 - `http://www.bindview.com/Support/RAZOR/Utilities/Windows/pwdump2_readme.cfm' - - -File: heimdal.info, Node: Programming with Kerberos, Next: Migration, Prev: Windows compatibility, Up: Top - -9 Programming with Kerberos -*************************** - -See the Kerberos 5 API introduction and documentation on the Heimdal -webpage. - - -File: heimdal.info, Node: Migration, Next: Acknowledgments, Prev: Programming with Kerberos, Up: Top - -10 Migration -************ - -10.1 Migration from MIT Kerberos to Heimdal -=========================================== - -hpropd can read MIT Kerberos dump, the format is the same as used in -mit-kerberos 1.0b7, and to dump that format use the following command: -`kdb5_util dump -b7'. - -To load the MIT Kerberos dump file, use the following command: - -`/usr/heimdal/libexec/hprop --database=dump-file ---master-key=/var/db/krb5kdc/mit_stash --source=mit-dump --decrypt ---stdout | /usr/heimdal/libexec/hpropd --stdin' - -10.2 General issues -=================== - -When migrating from a Kerberos 4 KDC. - -10.3 Order in what to do things: -================================ - - * Convert the database, check all principals that hprop complains - about. - - `hprop -n --source=| hpropd -n' - - Replace with whatever source you have, like krb4-db or - krb4-dump. - - * Run a Kerberos 5 slave for a while. - - * Figure out if it does everything you want it to. - - Make sure that all things that you use works for you. - - * Let a small number of controlled users use Kerberos 5 tools. - - Find a sample population of your users and check what programs - they use, you can also check the kdc-log to check what ticket are - checked out. - - * Burn the bridge and change the master. - - * Let all users use the Kerberos 5 tools by default. - - * Turn off services that do not need Kerberos 4 authentication. - - Things that might be hard to get away is old programs with support - for Kerberos 4. Example applications are old Eudora installations - using KPOP, and Zephyr. Eudora can use the Kerberos 4 kerberos in - the Heimdal kdc. - - - -File: heimdal.info, Node: Acknowledgments, Next: Copyrights and Licenses, Prev: Migration, Up: Top - -Appendix A Acknowledgments -************************** - -Eric Young wrote "libdes". Heimdal used to use libdes, without it -kth-krb would never have existed. Since there are no longer any Eric -Young code left in the library, we renamed it to libhcrypto. - -All functions in libhcrypto have been re-implemented or used available -public domain code. The core AES function where written by Vincent -Rijmen, Antoon Bosselaers and Paulo Barreto. The core DES SBOX -transformation was written by Richard Outerbridge. `imath' that is used -for public key crypto support is written by Michael J. Fromberger. - -The University of California at Berkeley initially wrote `telnet', and -`telnetd'. The authentication and encryption code of `telnet' and -`telnetd' was added by David Borman (then of Cray Research, Inc). The -encryption code was removed when this was exported and then added back -by Juha Eskelinen. - -The `popper' was also a Berkeley program initially. - -Some of the functions in `libroken' also come from Berkeley by way of -NetBSD/FreeBSD. - -`editline' was written by Simmule Turner and Rich Salz. Heimdal -contains a modifed copy. - -The `getifaddrs' implementation for Linux was written by Hideaki -YOSHIFUJI for the Usagi project. - -The `pkcs11.h' headerfile was written by the Scute project. - -Bugfixes, documentation, encouragement, and code has been contributed -by: -Alexander Boström - -Allan McRae - -Andrew Bartlett - -Andrew Cobaugh - -Andrew Tridge - -Anton Lundin - -Asanka Herath - -Björn Grönvall - -Björn Sandell - -Björn Schlögl - -Brandon S. Allbery KF8NH - -Brian A May - -Buck Huppmann - -Cacdric Schieli - -Chaskiel M Grundman - -Christos Zoulas - -Cizzi Storm - -Daniel Kouril - -David Love - -David Markey - -David R Boldt - -Derrick J Brashear - -Donald Norwood - -Douglas E Engert - -Frank van der Linden - -Gabor Gombas - -Guido Günther - -Guillaume Rousse - -Harald Barth - -Ingo Schwarze - -Jacques A. Vidrine - -Jaideep Padhye - -Jan Rekorajski - -Jason McIntyre - -Jeffrey Altman - -Jelmer Vernooij - -Joerg Pulz - -Johan Danielsson - -Johan Gadsjö - -Johan Ihrén - -John Center - -Jun-ichiro itojun Hagino - -KAMADA Ken'ichi - -Kamen Mazdrashki - -Karolin Seeger - -Ken Hornstein - -Love Hörnquist Åstrand - -Luke Howard - -Magnus Ahltorp - -Magnus Holmberg - -Marc Horowitz - -Mario Strasser - -Mark Eichin - -Martin von Gagern - -Matthias Dieter Wallnöfer - -Matthieu Patou - -Mattias Amnefelt - -Michael B Allen - -Michael Fromberger - -Michal Vocu - -Milosz Kmieciak - -Miroslav Ruda - -Mustafa A. Hashmi - -Nicolas Williams - -Patrik Lundin - -Petr Holub - -Phil Fisher - -Rafal Malinowski - -Ragnar Sundblad - -Rainer Toebbicke - -Richard Nyberg - -Roland C. Dowdeswell - -Roman Divacky - -Russ Allbery - -Sho Hosoda, 細田 将 - -Simon Wilkinson - -Stefan Metzmacher - -Ted Percival - -Tom Payerle - -Victor Guerra - -Zeqing Xia - -Åke Sandgren - -and we hope that those not mentioned here will forgive us. - -All bugs were introduced by ourselves. - - -File: heimdal.info, Node: Copyrights and Licenses, Prev: Acknowledgments, Up: Top - -Appendix B Copyrights and Licenses -********************************** - -Kungliga Tekniska Högskolan -============================ - - - -Copyright (c) 1997-2011 Kungliga Tekniska Högskolan -(Royal Institute of Technology, Stockholm, Sweden). -All rights reserved. - -Portions Copyright (c) 2009 Apple Inc. 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. - -Massachusetts Institute of Technology -===================================== - -The parts of the libtelnet that handle Kerberos. - - - -Copyright (C) 1990 by the Massachusetts Institute of Technology - -Export of this software from the United States of America may -require a specific license from the United States Government. -It is the responsibility of any person or organization contemplating -export to obtain such a license before exporting. - -WITHIN THAT CONSTRAINT, permission to use, copy, modify, and -distribute this software and its documentation for any purpose and -without fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright notice and -this permission notice appear in supporting documentation, and that -the name of M.I.T. not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. M.I.T. makes no representations about the suitability of -this software for any purpose. It is provided "as is" without express -or implied warranty. - -The Regents of the University of California -=========================================== - -The parts of the libroken, most of libtelnet, telnet, ftp, and popper. - - - -Copyright (c) 1988, 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. 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. - -The Regents of the University of California. -============================================ - -libedit - - - -Copyright (c) 1992, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Christos Zoulas of Cornell University. - -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 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. - -TomsFastMath / LibTomMath -========================= - -Tom's fast math (bignum support) and LibTomMath - - - -LibTomMath is hereby released into the Public Domain. - -Doug Rabson -=========== - -GSS-API mechglue layer. - - - -Copyright (c) 2005 Doug Rabson -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. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - -PADL Software Pty Ltd -===================== - -GSS-API CFX, SPNEGO, naming extensions, API extensions. - -KCM credential cache. - -HDB LDAP backend. - - - -Copyright (c) 2003-2011, PADL Software Pty Ltd. -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 PADL Software 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 PADL SOFTWARE 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 PADL SOFTWARE 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. - -Marko Kreen -=========== - -Fortuna in libhcrypto - - - -Copyright (c) 2005 Marko Kreen -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. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - -NTT (Nippon Telegraph and Telephone Corporation) -================================================ - -Camellia in libhcrypto - - - -Copyright (c) 2006,2007 -NTT (Nippon Telegraph and Telephone Corporation) . 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 as - the first lines of this file unmodified. -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. - -THIS SOFTWARE IS PROVIDED BY NTT ``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 NTT 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. - -The NetBSD Foundation, Inc. -=========================== - -vis.c in libroken - - - -Copyright (c) 1999, 2005 The NetBSD Foundation, Inc. -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. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - -Vincent Rijmen, Antoon Bosselaers, Paulo Barreto -================================================ - -AES in libhcrypto - - - -rijndael-alg-fst.c - -@version 3.0 (December 2000) - -Optimised ANSI C code for the Rijndael cipher (now AES) - -@author Vincent Rijmen -@author Antoon Bosselaers -@author Paulo Barreto - -This code is hereby placed in the public domain. - -THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''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 AUTHORS 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. - -Apple, Inc -========== - -kdc/announce.c - - - -Copyright (c) 2008 Apple Inc. All Rights Reserved. - -Export of this software from the United States of America may require -a specific license from the United States Government. It is the -responsibility of any person or organization contemplating export to -obtain such a license before exporting. - -WITHIN THAT CONSTRAINT, permission to use, copy, modify, and -distribute this software and its documentation for any purpose and -without fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright notice and -this permission notice appear in supporting documentation, and that -the name of Apple Inc. not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. Apple Inc. makes no representations about the suitability of -this software for any purpose. It is provided "as is" without express -or implied warranty. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - -Richard Outerbridge -=================== - -DES core in libhcrypto - - - -D3DES (V5.09) - - -A portable, public domain, version of the Data Encryption Standard. - -Written with Symantec's THINK (Lightspeed) C by Richard Outerbridge. -Thanks to: Dan Hoey for his excellent Initial and Inverse permutation -code; Jim Gillogly & Phil Karn for the DES key schedule code; Dennis -Ferguson, Eric Young and Dana How for comparing notes; and Ray Lau, -for humouring me on. - -Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge. -(GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992. - -Secure Endpoints Inc -==================== - -Windows support - - - -Copyright (c) 2009, Secure Endpoints Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -- 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. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -COPYRIGHT HOLDER 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. - -Novell, Inc -=========== - -lib/hcrypto/test_dh.c - - - -Copyright (c) 2007, Novell, Inc. -Author: Matthias Koenig - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* 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. - -* Neither the name of the Novell 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. - - - -Tag Table: -Node: Top211 -Node: Introduction1690 -Node: What is Kerberos?4436 -Node: Building and Installing9549 -Node: Setting up a realm9876 -Node: Configuration file10828 -Node: Creating the database13896 -Node: Modifying the database16828 -Node: Checking the setup18421 -Node: keytabs19276 -Node: Remote administration20134 -Node: Password changing22040 -Node: Testing clients and servers26228 -Node: Slave Servers26556 -Node: Incremental propagation28309 -Node: Encryption types and salting31553 -Node: Credential cache server - KCM33730 -Node: Cross realm35714 -Node: Transit policy38260 -Node: Setting up DNS45037 -Node: Using LDAP to store the database47512 -Node: Providing Kerberos credentials to servers and programs53517 -Node: Setting up PK-INIT55615 -Node: Debugging Kerberos problems68094 -Node: Applications68525 -Node: Authentication modules68725 -Node: Digital SIA69319 -Node: IRIX73703 -Node: AFS74993 -Node: Things in search for a better place78747 -Node: Kerberos 4 issues81476 -Node: Principal conversion issues81824 -Ref: Principal conversion issues-Footnote-184055 -Ref: Principal conversion issues-Footnote-284123 -Node: Converting a version 4 database84176 -Node: Windows compatibility88489 -Node: Configuring Windows to use a Heimdal KDC89575 -Node: Inter-Realm keys (trust) between Windows and a Heimdal KDC91645 -Node: Create account mappings95316 -Node: Encryption types96068 -Node: Authorisation data96668 -Node: Quirks of Windows 2000 KDC97815 -Node: Useful links when reading about the Windows99109 -Node: Programming with Kerberos100913 -Node: Migration101163 -Node: Acknowledgments102924 -Node: Copyrights and Licenses105850 - -End Tag Table diff --git a/kerberosV/src/doc/heimdal.texi b/kerberosV/src/doc/heimdal.texi deleted file mode 100644 index f98b373c802..00000000000 --- a/kerberosV/src/doc/heimdal.texi +++ /dev/null @@ -1,148 +0,0 @@ -\input texinfo @c -*- texinfo -*- -@c %**start of header -@c $Id: heimdal.texi,v 1.6 2014/04/18 09:47:34 ajacoutot Exp $ -@setfilename heimdal.info -@settitle HEIMDAL -@iftex -@afourpaper -@end iftex -@c some sensible characters, please? -@tex -\input latin1.tex -@end tex -@setchapternewpage on -@syncodeindex pg cp -@c %**end of header - -@include vars.texi - -@set VERSION @value{PACKAGE_VERSION} -@set EDITION 1.0 - -@ifinfo -@dircategory Security -@direntry -* Heimdal: (heimdal). The Kerberos 5 distribution from KTH -@end direntry -@end ifinfo - -@c title page -@titlepage -@title Heimdal -@subtitle Kerberos 5 from KTH -@subtitle Edition @value{EDITION}, for version @value{VERSION} -@subtitle 2008 -@author Johan Danielsson -@author Love Hörnquist Åstrand -@author Assar Westerlund - -@end titlepage - -@macro manpage{man, section} -@cite{\man\(\section\)} -@end macro - -@c Less filling! Tastes great! -@iftex -@parindent=0pt -@global@parskip 6pt plus 1pt -@global@chapheadingskip = 15pt plus 4pt minus 2pt -@global@secheadingskip = 12pt plus 3pt minus 2pt -@global@subsecheadingskip = 9pt plus 2pt minus 2pt -@end iftex -@ifinfo -@paragraphindent 0 -@end ifinfo - -@ifnottex -@node Top, Introduction, (dir), (dir) -@top Heimdal -@end ifnottex - -This manual for version @value{VERSION} of Heimdal. - -@menu -* Introduction:: -* What is Kerberos?:: -* Building and Installing:: -* Setting up a realm:: -* Applications:: -* Things in search for a better place:: -* Kerberos 4 issues:: -* Windows compatibility:: -* Programming with Kerberos:: -* Migration:: -* Acknowledgments:: -* Copyrights and Licenses:: - -@detailmenu - --- The Detailed Node Listing --- - -Setting up a realm - -* Configuration file:: -* Creating the database:: -* Modifying the database:: -* keytabs:: -* Remote administration:: -* Password changing:: -* Testing clients and servers:: -* Slave Servers:: -* Incremental propagation:: -* Encryption types and salting:: -* Credential cache server - KCM:: -* Cross realm:: -* Transit policy:: -* Setting up DNS:: -* Using LDAP to store the database:: -* Providing Kerberos credentials to servers and programs:: -* Setting up PK-INIT:: -* Debugging Kerberos problems:: - -Applications - -* Authentication modules:: -* AFS:: - -Authentication modules - -* Digital SIA:: -* IRIX:: - -Kerberos 4 issues - -* Principal conversion issues:: -* Converting a version 4 database:: - -Windows compatibility - -* Configuring Windows to use a Heimdal KDC:: -* Inter-Realm keys (trust) between Windows and a Heimdal KDC:: -* Create account mappings:: -* Encryption types:: -* Authorisation data:: -* Quirks of Windows 2000 KDC:: -* Useful links when reading about the Windows:: - -Programming with Kerberos - -@end detailmenu -@end menu - -@include intro.texi -@include whatis.texi -@include install.texi -@include setup.texi -@include apps.texi -@include misc.texi -@include kerberos4.texi -@include win2k.texi -@include programming.texi -@include migration.texi -@include ack.texi -@include copyright.texi - -@c @shortcontents -@contents - -@bye diff --git a/kerberosV/src/doc/hx509.din b/kerberosV/src/doc/hx509.din deleted file mode 100644 index c6d02b287c1..00000000000 --- a/kerberosV/src/doc/hx509.din +++ /dev/null @@ -1,15 +0,0 @@ -# Doxyfile 1.5.3 - -PROJECT_NAME = Heimdal x509 library -PROJECT_NUMBER = @PACKAGE_VERSION@ -OUTPUT_DIRECTORY = @srcdir@/doxyout/hx509 -INPUT = @srcdir@/../lib/hx509 - -WARN_IF_UNDOCUMENTED = YES - -PERL_PATH = /usr/bin/perl - -HTML_HEADER = "@srcdir@/header.html" -HTML_FOOTER = "@srcdir@/footer.html" - -@INCLUDE = "@srcdir@/doxytmpl.dxy" diff --git a/kerberosV/src/doc/hx509.info b/kerberosV/src/doc/hx509.info deleted file mode 100644 index d4bd937e3a5..00000000000 --- a/kerberosV/src/doc/hx509.info +++ /dev/null @@ -1,617 +0,0 @@ -This is hx509.info, produced by makeinfo version 4.8 from hx509.texi. - -INFO-DIR-SECTION Security -START-INFO-DIR-ENTRY -* hx509: (hx509). The X.509 distribution from KTH -END-INFO-DIR-ENTRY - - -File: hx509.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) - -Heimdal -******* - -This manual is for version 1.5.3 of hx509. - -* Menu: - -* Introduction:: -* What is X.509 ?:: -* Setting up a CA:: -* CMS signing and encryption:: -* Certificate matching:: -* Software PKCS 11 module:: - - --- The Detailed Node Listing --- - -Setting up a CA - -* Creating a CA certificate:: -* Issuing certificates:: -* Issuing CRLs:: -* Application requirements:: - -CMS signing and encryption - -* CMS background:: - -Certificate matching - -* Matching syntax:: - -Software PKCS 11 module - -* How to use the PKCS11 module:: - - -File: hx509.info, Node: Introduction, Next: What is X.509 ?, Prev: Top, Up: Top - -1 Introduction -************** - -The goals of a PKI infrastructure (as defined in RFC 3280) is to meet -_the needs of deterministic, automated identification, authentication, -access control, and authorization_. - -The administrator should be aware of certain terminologies as explained -by the aforementioned RFC before attemping to put in place a PKI -infrastructure. Briefly, these are: - - * CA Certificate Authority - - * RA Registration Authority, i.e., an optional system to which a CA - delegates certain management functions. - - * CRL Issuer An optional system to which a CA delegates the - publication of certificate revocation lists. - - * Repository A system or collection of distributed systems that - stores certificates and CRLs and serves as a means of distributing - these certificates and CRLs to end entities - -hx509 (Heimdal x509 support) is a near complete X.509 stack that can -handle CMS messages (crypto system used in S/MIME and Kerberos PK-INIT) -and basic certificate processing tasks, path construction, path -validation, OCSP and CRL validation, PKCS10 message construction, CMS -Encrypted (shared secret encrypted), CMS SignedData (certificate -signed), and CMS EnvelopedData (certificate encrypted). - -hx509 can use PKCS11 tokens, PKCS12 files, PEM files, and/or DER encoded -files. - - -File: hx509.info, Node: What is X.509 ?, Next: Setting up a CA, Prev: Introduction, Up: Top - -2 What is X.509, PKIX, PKCS7 and CMS ? -************************************** - -X.509 was created by CCITT (later ITU) for the X.500 directory service. -Today, X.509 discussions and implementations commonly reference the -IETF's PKIX Certificate and CRL Profile of the X.509 v3 certificate -standard, as specified in RFC 3280. - -ITU continues to develop the X.509 standard together with the IETF in a -rather complicated dance. - -X.509 is a public key based security system that has associated data -stored within a so called certificate. Initially, X.509 was a strict -hierarchical system with one root. However, ever evolving requiments and -technology advancements saw the inclusion of multiple policy roots, -bridges and mesh solutions. - -x.509 can also be used as a peer to peer system, though often seen as a -common scenario. - -2.1 Type of certificates -======================== - -There are several flavors of certificate in X.509. - - * Trust anchors - - Trust anchors are strictly not certificates, but commonly stored - in a certificate format as they become easier to manage. Trust - anchors are the keys that an end entity would trust to validate - other certificates. This is done by building a path from the - certificate you want to validate to to any of the trust anchors - you have. - - * End Entity (EE) certificates - - End entity certificates are the most common types of certificates. - End entity certificates cannot issue (sign) certificate themselves - and are generally used to authenticate and authorize users and - services. - - * Certification Authority (CA) certificates - - Certificate authority certificates have the right to issue - additional certificates (be it sub-ordinate CA certificates to - build an trust anchors or end entity certificates). There is no - limit to how many certificates a CA may issue, but there might - other restrictions, like the maximum path depth. - - * Proxy certificates - - Remember the statement "End Entity certificates cannot issue - certificates"? Well that statement is not entirely true. There is - an extension called proxy certificates defined in RFC3820, that - allows certificates to be issued by end entity certificates. The - service that receives the proxy certificates must have explicitly - turned on support for proxy certificates, so their use is somewhat - limited. - - Proxy certificates can be limited by policies stored in the - certificate to what they can be used for. This allows users to - delegate the proxy certificate to services (by sending over the - certificate and private key) so the service can access services on - behalf of the user. - - One example of this would be a print service. The user wants to - print a large job in the middle of the night when the printer - isn't used that much, so the user creates a proxy certificate with - the policy that it can only be used to access files related to - this print job, creates the print job description and send both - the description and proxy certificate with key over to print - service. Later at night when the print service initializes - (without any user intervention), access to the files for the print - job is granted via the proxy certificate. As a result of (in-place) - policy limitations, the certificate cannot be used for any other - purposes. - - -2.2 Building a path -=================== - -Before validating a certificate path (or chain), the path needs to be -constructed. Given a certificate (EE, CA, Proxy, or any other type), -the path construction algorithm will try to find a path to one of the -trust anchors. - -The process starts by looking at the issuing CA of the certificate, by -Name or Key Identifier, and tries to find that certificate while at the -same time evaluting any policies in-place. - - -File: hx509.info, Node: Setting up a CA, Next: Creating a CA certificate, Prev: What is X.509 ?, Up: Top - -3 Setting up a CA -***************** - -Do not let information overload scare you off! If you are simply testing -or getting started with a PKI infrastructure, skip all this and go to -the next chapter (see: *note Creating a CA certificate::). - -Creating a CA certificate should be more the just creating a -certificate, CA's should define a policy. Again, if you are simply -testing a PKI, policies do not matter so much. However, when it comes to -trust in an organisation, it will probably matter more whom your users -and sysadmins will find it acceptable to trust. - -At the same time, try to keep things simple, it's not very hard to run a -Certificate authority and the process to get new certificates should be -simple. - -You may find it helpful to answer the following policy questions for -your organization at a later stage: - - * How do you trust your CA. - - * What is the CA responsibility. - - * Review of CA activity. - - * How much process should it be to issue certificate. - - * Who is allowed to issue certificates. - - * Who is allowed to requests certificates. - - * How to handle certificate revocation, issuing CRLs and maintain - OCSP services. - - -File: hx509.info, Node: Creating a CA certificate, Next: Issuing certificates, Prev: Setting up a CA, Up: Top - -3.1 Creating a CA certificate -============================= - -This section describes how to create a CA certificate and what to think -about. - -3.1.1 Lifetime CA certificate ------------------------------ - -You probably want to create a CA certificate with a long lifetime, 10 -years at the very minimum. This is because you don't want to push out -the certificate (as a trust anchor) to all you users again when the old -CA certificate expires. Although a trust anchor can't really expire, -not all software works in accordance with published standards. - -Keep in mind the security requirements might be different 10-20 years -into the future. For example, SHA1 is going to be withdrawn in 2010, so -make sure you have enough buffering in your choice of digest/hash -algorithms, signature algorithms and key lengths. - -3.1.2 Create a CA certificate ------------------------------ - -This command below can be used to generate a self-signed CA certificate. - - hxtool issue-certificate \ - --self-signed \ - --issue-ca \ - --generate-key=rsa \ - --subject="CN=CertificateAuthority,DC=test,DC=h5l,DC=se" \ - --lifetime=10years \ - --certificate="FILE:ca.pem" - -3.1.3 Extending the lifetime of a CA certificate ------------------------------------------------- - -You just realised that your CA certificate is going to expire soon and -that you need replace it with a new CA. The easiest way to do that is -to extend the lifetime of your existing CA certificate. - -The example below will extend the CA certificate's lifetime by 10 years. -You should compare this new certificate if it contains all the special -tweaks as the old certificate had. - - hxtool issue-certificate \ - --self-signed \ - --issue-ca \ - --lifetime="10years" \ - --template-certificate="FILE:ca.pem" \ - --template-fields="serialNumber,notBefore,subject,SPKI" \ - --ca-private-key=FILE:ca.pem \ - --certificate="FILE:new-ca.pem" - -3.1.4 Subordinate CA --------------------- - -This example below creates a new subordinate certificate authority. - - hxtool issue-certificate \ - --ca-certificate=FILE:ca.pem \ - --issue-ca \ - --generate-key=rsa \ - --subject="CN=CertificateAuthority,DC=dev,DC=test,DC=h5l,DC=se" \ - --certificate="FILE:dev-ca.pem" - - -File: hx509.info, Node: Issuing certificates, Next: Issuing CRLs, Prev: Creating a CA certificate, Up: Top - -3.2 Issuing certificates -======================== - -First you'll create a CA certificate, after that you have to deal with -your users and servers and issue certificates to them. - - * Do all the work themself - - Generate the key for the user. This has the problme that the the CA - knows the private key of the user. For a paranoid user this might - leave feeling of disconfort. - - * Have the user do part of the work - - Receive PKCS10 certificate requests fromusers. PKCS10 is a request - for a certificate. The user may specify what DN they want as well - as provide a certificate signing request (CSR). To prove the user - have the key, the whole request is signed by the private key of - the user. - - -3.2.1 Name space management ---------------------------- - -What people might want to see. - -Re-issue certificates just because people moved within the organization. - -Expose privacy information. - -Using Sub-component name (+ notation). - -3.2.2 Certificate Revocation, CRL and OCSP ------------------------------------------- - -Certificates that a CA issues may need to be revoked at some stage. As -an example, an employee leaves the organization and does not bother -handing in his smart card (or even if the smart card is handed back - -the certificate on it must no longer be acceptable to services; the -employee has left). - -You may also want to revoke a certificate for a service which is no -longer being offered on your network. Overlooking these scenarios can -lead to security holes which will quickly become a nightmare to deal -with. - -There are two primary protocols for dealing with certificate -revokation. Namely: - - * Certificate Revocation List (CRL) - - * Online Certificate Status Protocol (OCSP) - -If however the certificate in qeustion has been destroyed, there is no -need to revoke the certificate because it can not be used by someone -else. This matter since for each certificate you add to CRL, the -download time and processing time for clients are longer. - -CRLs and OCSP responders however greatly help manage compatible services -which may authenticate and authorize users (or services) on an on-going -basis. As an example, VPN connectivity established via certificates for -connecting clients would require your VPN software to make use of a CRL -or an OCSP service to ensure revoked certificates belonging to former -clients are not allowed access to (formerly subscribed) network -services. - - -File: hx509.info, Node: Issuing CRLs, Next: Application requirements, Prev: Issuing certificates, Up: Top - -3.3 Issuing CRLs -================ - -Create an empty CRL with no certificates revoked. Default expiration -value is one year from now. - - hxtool crl-sign \ - --crl-file=crl.der \ - --signer=FILE:ca.pem - -Create a CRL with all certificates in the directory -`/path/to/revoked/dir' included in the CRL as revoked. Also make it -expire one month from now. - - hxtool crl-sign \ - --crl-file=crl.der \ - --signer=FILE:ca.pem \ - --lifetime='1 month' \ - DIR:/path/to/revoked/dir - - -File: hx509.info, Node: Application requirements, Next: CMS signing and encryption, Prev: Issuing CRLs, Up: Top - -3.4 Application requirements -============================ - -Application place different requirements on certificates. This section -tries to expand what they are and how to use hxtool to generate -certificates for those services. - -3.4.1 HTTPS - server --------------------- - - hxtool issue-certificate \ - --subject="CN=www.test.h5l.se,DC=test,DC=h5l,DC=se" \ - --type="https-server" \ - --hostname="www.test.h5l.se" \ - --hostname="www2.test.h5l.se" \ - ... - -3.4.2 HTTPS - client --------------------- - - hxtool issue-certificate \ - --subject="UID=testus,DC=test,DC=h5l,DC=se" \ - --type="https-client" \ - ... - -3.4.3 S/MIME - email --------------------- - -There are two things that should be set in S/MIME certificates, one or -more email addresses and an extended eku usage (EKU), emailProtection. - -The email address format used in S/MIME certificates is defined in -RFC2822, section 3.4.1 and it should be an "addr-spec". - -There are two ways to specifify email address in certificates. The old -way is in the subject distinguished name, _this should not be used_. The -new way is using a Subject Alternative Name (SAN). - -Even though the email address is stored in certificates, they don't need -to be, email reader programs are required to accept certificates that -doesn't have either of the two methods of storing email in certificates -- in which case, the email client will try to protect the user by -printing the name of the certificate instead. - -S/MIME certificate can be used in another special way. They can be -issued with a NULL subject distinguished name plus the email in SAN, -this is a valid certificate. This is used when you wont want to share -more information then you need to. - -hx509 issue-certificate supports adding the email SAN to certificate by -using the -email option, -email also gives an implicit emailProtection -eku. If you want to create an certificate without an email address, the -option -type=email will add the emailProtection EKU. - - hxtool issue-certificate \ - --subject="UID=testus-email,DC=test,DC=h5l,DC=se" \ - --type=email \ - --email="testus@test.h5l.se" \ - ... - -An example of an certificate without and subject distinguished name with -an email address in a SAN. - - hxtool issue-certificate \ - --subject="" \ - --type=email \ - --email="testus@test.h5l.se" \ - ... - -3.4.4 PK-INIT -------------- - -A PK-INIT infrastructure allows users and services to pick up kerberos -credentials (tickets) based on their certificate. This, for example, -allows users to authenticate to their desktops using smartcards while -acquiring kerberos tickets in the process. - -As an example, an office network which offers centrally controlled -desktop logins, mail, messaging (xmpp) and openafs would give users -single sign-on facilities via smartcard based logins. Once the kerberos -ticket has been acquired, all kerberized services would immediately -become accessible based on deployed security policies. - -Let's go over the process of initializing a demo PK-INIT framework: - - hxtool issue-certificate \ - --type="pkinit-kdc" \ - --pk-init-principal="krbtgt/TEST.H5L.SE@TEST.H5L.SE" \ - --hostname=kerberos.test.h5l.se \ - --ca-certificate="FILE:ca.pem,ca.key" \ - --generate-key=rsa \ - --certificate="FILE:kdc.pem" \ - --subject="cn=kdc" - -How to create a certificate for a user. - - hxtool issue-certificate \ - --type="pkinit-client" \ - --pk-init-principal="user@TEST.H5L.SE" \ - --ca-certificate="FILE:ca.pem,ca.key" \ - --generate-key=rsa \ - --subject="cn=Test User" \ - --certificate="FILE:user.pem" - -The -type field can be specified multiple times. The same certificate -can hence house extensions for both pkinit-client as well as S/MIME. - -To use the PKCS11 module, please see the section: *note How to use the -PKCS11 module::. - -More about how to configure the KDC, see the documentation in the -Heimdal manual to set up the KDC. - -3.4.5 XMPP/Jabber ------------------ - -The jabber server certificate should have a dNSname that is the same as -the user entered into the application, not the same as the host name of -the machine. - - hxtool issue-certificate \ - --subject="CN=xmpp1.test.h5l.se,DC=test,DC=h5l,DC=se" \ - --hostname="xmpp1.test.h5l.se" \ - --hostname="test.h5l.se" \ - ... - -The certificate may also contain a jabber identifier (JID) that, if the -receiver allows it, authorises the server or client to use that JID. - -When storing a JID inside the certificate, both for server and client, -it's stored inside a UTF8String within an otherName entity inside the -subjectAltName, using the OID id-on-xmppAddr (1.3.6.1.5.5.7.8.5). - -To read more about the requirements, see RFC3920, Extensible Messaging -and Presence Protocol (XMPP): Core. - -hxtool issue-certificate have support to add jid to the certificate -using the option `--jid'. - - hxtool issue-certificate \ - --subject="CN=Love,DC=test,DC=h5l,DC=se" \ - --jid="lha@test.h5l.se" \ - ... - - -File: hx509.info, Node: CMS signing and encryption, Next: CMS background, Prev: Application requirements, Up: Top - -4 CMS signing and encryption -**************************** - -CMS is the Cryptographic Message System that among other, is used by -S/MIME (secure email) and Kerberos PK-INIT. It's an extended version of -the RSA, Inc standard PKCS7. - - -File: hx509.info, Node: CMS background, Next: Certificate matching, Prev: CMS signing and encryption, Up: Top - -4.1 CMS background -================== - - -File: hx509.info, Node: Certificate matching, Next: Matching syntax, Prev: CMS background, Up: Top - -5 Certificate matching -********************** - -To match certificates hx509 have a special query language to match -certifictes in queries and ACLs. - - -File: hx509.info, Node: Matching syntax, Next: Software PKCS 11 module, Prev: Certificate matching, Up: Top - -5.1 Matching syntax -=================== - -This is the language definitions somewhat slopply descriped: - - - expr = TRUE, - FALSE, - ! expr, - expr AND expr, - expr OR expr, - ( expr ) - compare - - compare = - word == word, - word != word, - word IN ( word [, word ...]) - word IN %{variable.subvariable} - - word = - STRING, - %{variable} - - -File: hx509.info, Node: Software PKCS 11 module, Next: How to use the PKCS11 module, Prev: Matching syntax, Up: Top - -6 Software PKCS 11 module -************************* - -PKCS11 is a standard created by RSA, Inc to support hardware and -software encryption modules. It can be used by smartcard to expose the -crypto primitives inside without exposing the crypto keys. - -Hx509 includes a software implementation of PKCS11 that runs within the -memory space of the process and thus exposes the keys to the -application. - - -File: hx509.info, Node: How to use the PKCS11 module, Prev: Software PKCS 11 module, Up: Top - -6.1 How to use the PKCS11 module -================================ - - $ cat > ~/.soft-pkcs11.rc <RFC 3280) is to meet -@emph{the needs of deterministic, automated identification, authentication, access control, and authorization}. - - -The administrator should be aware of certain terminologies as explained by the aforementioned -RFC before attemping to put in place a PKI infrastructure. Briefly, these are: - -@itemize @bullet -@item CA -Certificate Authority -@item RA -Registration Authority, i.e., an optional system to which a CA delegates certain management functions. -@item CRL Issuer -An optional system to which a CA delegates the publication of certificate revocation lists. -@item Repository -A system or collection of distributed systems that stores certificates and CRLs -and serves as a means of distributing these certificates and CRLs to end entities -@end itemize - -hx509 (Heimdal x509 support) is a near complete X.509 stack that can -handle CMS messages (crypto system used in S/MIME and Kerberos PK-INIT) -and basic certificate processing tasks, path construction, path -validation, OCSP and CRL validation, PKCS10 message construction, CMS -Encrypted (shared secret encrypted), CMS SignedData (certificate -signed), and CMS EnvelopedData (certificate encrypted). - -hx509 can use PKCS11 tokens, PKCS12 files, PEM files, and/or DER encoded -files. - -@node What is X.509 ?, Setting up a CA, Introduction, Top -@chapter What is X.509, PKIX, PKCS7 and CMS ? - -X.509 was created by CCITT (later ITU) for the X.500 directory -service. Today, X.509 discussions and implementations commonly reference -the IETF's PKIX Certificate and CRL Profile of the X.509 v3 certificate -standard, as specified in RFC 3280. - -ITU continues to develop the X.509 standard together with the IETF in a -rather complicated dance. - -X.509 is a public key based security system that has associated data -stored within a so called certificate. Initially, X.509 was a strict -hierarchical system with one root. However, ever evolving requiments and -technology advancements saw the inclusion of multiple policy roots, -bridges and mesh solutions. - -x.509 can also be used as a peer to peer system, though often seen as a -common scenario. - -@section Type of certificates - -There are several flavors of certificate in X.509. - -@itemize @bullet - -@item Trust anchors - -Trust anchors are strictly not certificates, but commonly stored in a -certificate format as they become easier to manage. Trust anchors are -the keys that an end entity would trust to validate other certificates. -This is done by building a path from the certificate you want to -validate to to any of the trust anchors you have. - -@item End Entity (EE) certificates - -End entity certificates are the most common types of certificates. End -entity certificates cannot issue (sign) certificate themselves and are generally -used to authenticate and authorize users and services. - -@item Certification Authority (CA) certificates - -Certificate authority certificates have the right to issue additional -certificates (be it sub-ordinate CA certificates to build an trust anchors -or end entity certificates). There is no limit to how many certificates a CA -may issue, but there might other restrictions, like the maximum path -depth. - -@item Proxy certificates - -Remember the statement "End Entity certificates cannot issue -certificates"? Well that statement is not entirely true. There is an -extension called proxy certificates defined in RFC3820, that allows -certificates to be issued by end entity certificates. The service that -receives the proxy certificates must have explicitly turned on support -for proxy certificates, so their use is somewhat limited. - -Proxy certificates can be limited by policies stored in the certificate to -what they can be used for. This allows users to delegate the proxy -certificate to services (by sending over the certificate and private -key) so the service can access services on behalf of the user. - -One example of this would be a print service. The user wants to print a -large job in the middle of the night when the printer isn't used that -much, so the user creates a proxy certificate with the policy that it -can only be used to access files related to this print job, creates the -print job description and send both the description and proxy -certificate with key over to print service. Later at night when the -print service initializes (without any user intervention), access to the files -for the print job is granted via the proxy certificate. As a result of (in-place) -policy limitations, the certificate cannot be used for any other purposes. - -@end itemize - -@section Building a path - -Before validating a certificate path (or chain), the path needs to be -constructed. Given a certificate (EE, CA, Proxy, or any other type), -the path construction algorithm will try to find a path to one of the -trust anchors. - -The process starts by looking at the issuing CA of the certificate, by -Name or Key Identifier, and tries to find that certificate while at the -same time evaluting any policies in-place. - -@node Setting up a CA, Creating a CA certificate, What is X.509 ?, Top -@chapter Setting up a CA - -Do not let information overload scare you off! If you are simply testing -or getting started with a PKI infrastructure, skip all this and go to -the next chapter (see: @pxref{Creating a CA certificate}). - -Creating a CA certificate should be more the just creating a -certificate, CA's should define a policy. Again, if you are simply -testing a PKI, policies do not matter so much. However, when it comes to -trust in an organisation, it will probably matter more whom your users -and sysadmins will find it acceptable to trust. - -At the same time, try to keep things simple, it's not very hard to run a -Certificate authority and the process to get new certificates should be simple. - -You may find it helpful to answer the following policy questions for -your organization at a later stage: - -@itemize @bullet -@item How do you trust your CA. -@item What is the CA responsibility. -@item Review of CA activity. -@item How much process should it be to issue certificate. -@item Who is allowed to issue certificates. -@item Who is allowed to requests certificates. -@item How to handle certificate revocation, issuing CRLs and maintain OCSP services. -@end itemize - -@node Creating a CA certificate, Issuing certificates, Setting up a CA, Top -@section Creating a CA certificate - -This section describes how to create a CA certificate and what to think -about. - -@subsection Lifetime CA certificate - -You probably want to create a CA certificate with a long lifetime, 10 -years at the very minimum. This is because you don't want to push out the -certificate (as a trust anchor) to all you users again when the old -CA certificate expires. Although a trust anchor can't really expire, not all -software works in accordance with published standards. - -Keep in mind the security requirements might be different 10-20 years -into the future. For example, SHA1 is going to be withdrawn in 2010, so -make sure you have enough buffering in your choice of digest/hash -algorithms, signature algorithms and key lengths. - -@subsection Create a CA certificate - -This command below can be used to generate a self-signed CA certificate. - -@example -hxtool issue-certificate \ - --self-signed \ - --issue-ca \ - --generate-key=rsa \ - --subject="CN=CertificateAuthority,DC=test,DC=h5l,DC=se" \ - --lifetime=10years \ - --certificate="FILE:ca.pem" -@end example - -@subsection Extending the lifetime of a CA certificate - -You just realised that your CA certificate is going to expire soon and -that you need replace it with a new CA. The easiest way to do that -is to extend the lifetime of your existing CA certificate. - -The example below will extend the CA certificate's lifetime by 10 years. -You should compare this new certificate if it contains all the -special tweaks as the old certificate had. - -@example -hxtool issue-certificate \ - --self-signed \ - --issue-ca \ - --lifetime="10years" \ - --template-certificate="FILE:ca.pem" \ - --template-fields="serialNumber,notBefore,subject,SPKI" \ - --ca-private-key=FILE:ca.pem \ - --certificate="FILE:new-ca.pem" -@end example - -@subsection Subordinate CA - -This example below creates a new subordinate certificate authority. - -@example -hxtool issue-certificate \ - --ca-certificate=FILE:ca.pem \ - --issue-ca \ - --generate-key=rsa \ - --subject="CN=CertificateAuthority,DC=dev,DC=test,DC=h5l,DC=se" \ - --certificate="FILE:dev-ca.pem" -@end example - - -@node Issuing certificates, Issuing CRLs, Creating a CA certificate, Top -@section Issuing certificates - -First you'll create a CA certificate, after that you have to deal with -your users and servers and issue certificates to them. - -@c I think this section needs a bit of clarity. Can I add a separate -@c section which explains CSRs as well? - - -@itemize @bullet - -@item Do all the work themself - -Generate the key for the user. This has the problme that the the CA -knows the private key of the user. For a paranoid user this might leave -feeling of disconfort. - -@item Have the user do part of the work - -Receive PKCS10 certificate requests fromusers. PKCS10 is a request for a -certificate. The user may specify what DN they want as well as provide -a certificate signing request (CSR). To prove the user have the key, -the whole request is signed by the private key of the user. - -@end itemize - -@subsection Name space management - -@c The explanation given below is slightly unclear. I will re-read the -@c RFC and document accordingly - -What people might want to see. - -Re-issue certificates just because people moved within the organization. - -Expose privacy information. - -Using Sub-component name (+ notation). - -@subsection Certificate Revocation, CRL and OCSP - -Certificates that a CA issues may need to be revoked at some stage. As -an example, an employee leaves the organization and does not bother -handing in his smart card (or even if the smart card is handed back -- -the certificate on it must no longer be acceptable to services; the -employee has left). - -You may also want to revoke a certificate for a service which is no -longer being offered on your network. Overlooking these scenarios can -lead to security holes which will quickly become a nightmare to deal -with. - -There are two primary protocols for dealing with certificate -revokation. Namely: - -@itemize @bullet -@item Certificate Revocation List (CRL) -@item Online Certificate Status Protocol (OCSP) -@end itemize - -If however the certificate in qeustion has been destroyed, there is no -need to revoke the certificate because it can not be used by someone -else. This matter since for each certificate you add to CRL, the -download time and processing time for clients are longer. - -CRLs and OCSP responders however greatly help manage compatible services -which may authenticate and authorize users (or services) on an on-going -basis. As an example, VPN connectivity established via certificates for -connecting clients would require your VPN software to make use of a CRL -or an OCSP service to ensure revoked certificates belonging to former -clients are not allowed access to (formerly subscribed) network -services. - - -@node Issuing CRLs, Application requirements, Issuing certificates, Top -@section Issuing CRLs - -Create an empty CRL with no certificates revoked. Default expiration -value is one year from now. - -@example -hxtool crl-sign \ - --crl-file=crl.der \ - --signer=FILE:ca.pem -@end example - -Create a CRL with all certificates in the directory -@file{/path/to/revoked/dir} included in the CRL as revoked. Also make -it expire one month from now. - -@example -hxtool crl-sign \ - --crl-file=crl.der \ - --signer=FILE:ca.pem \ - --lifetime='1 month' \ - DIR:/path/to/revoked/dir -@end example - -@node Application requirements, CMS signing and encryption, Issuing CRLs, Top -@section Application requirements - -Application place different requirements on certificates. This section -tries to expand what they are and how to use hxtool to generate -certificates for those services. - -@subsection HTTPS - server - -@example -hxtool issue-certificate \ - --subject="CN=www.test.h5l.se,DC=test,DC=h5l,DC=se" \ - --type="https-server" \ - --hostname="www.test.h5l.se" \ - --hostname="www2.test.h5l.se" \ - ... -@end example - -@subsection HTTPS - client - -@example -hxtool issue-certificate \ - --subject="UID=testus,DC=test,DC=h5l,DC=se" \ - --type="https-client" \ - ... -@end example - -@subsection S/MIME - email - -There are two things that should be set in S/MIME certificates, one or -more email addresses and an extended eku usage (EKU), emailProtection. - -The email address format used in S/MIME certificates is defined in -RFC2822, section 3.4.1 and it should be an ``addr-spec''. - -There are two ways to specifify email address in certificates. The old -way is in the subject distinguished name, @emph{this should not be used}. The -new way is using a Subject Alternative Name (SAN). - -Even though the email address is stored in certificates, they don't need -to be, email reader programs are required to accept certificates that -doesn't have either of the two methods of storing email in certificates --- in which case, the email client will try to protect the user by -printing the name of the certificate instead. - -S/MIME certificate can be used in another special way. They can be -issued with a NULL subject distinguished name plus the email in SAN, -this is a valid certificate. This is used when you wont want to share -more information then you need to. - -hx509 issue-certificate supports adding the email SAN to certificate by -using the --email option, --email also gives an implicit emailProtection -eku. If you want to create an certificate without an email address, the -option --type=email will add the emailProtection EKU. - -@example -hxtool issue-certificate \ - --subject="UID=testus-email,DC=test,DC=h5l,DC=se" \ - --type=email \ - --email="testus@@test.h5l.se" \ - ... -@end example - -An example of an certificate without and subject distinguished name with -an email address in a SAN. - -@example -hxtool issue-certificate \ - --subject="" \ - --type=email \ - --email="testus@@test.h5l.se" \ - ... -@end example - -@subsection PK-INIT - -A PK-INIT infrastructure allows users and services to pick up kerberos -credentials (tickets) based on their certificate. This, for example, -allows users to authenticate to their desktops using smartcards while -acquiring kerberos tickets in the process. - -As an example, an office network which offers centrally controlled -desktop logins, mail, messaging (xmpp) and openafs would give users -single sign-on facilities via smartcard based logins. Once the kerberos -ticket has been acquired, all kerberized services would immediately -become accessible based on deployed security policies. - -Let's go over the process of initializing a demo PK-INIT framework: - -@example -hxtool issue-certificate \ - --type="pkinit-kdc" \ - --pk-init-principal="krbtgt/TEST.H5L.SE@@TEST.H5L.SE" \ - --hostname=kerberos.test.h5l.se \ - --ca-certificate="FILE:ca.pem,ca.key" \ - --generate-key=rsa \ - --certificate="FILE:kdc.pem" \ - --subject="cn=kdc" -@end example - -How to create a certificate for a user. - -@example -hxtool issue-certificate \ - --type="pkinit-client" \ - --pk-init-principal="user@@TEST.H5L.SE" \ - --ca-certificate="FILE:ca.pem,ca.key" \ - --generate-key=rsa \ - --subject="cn=Test User" \ - --certificate="FILE:user.pem" -@end example - -The --type field can be specified multiple times. The same certificate -can hence house extensions for both pkinit-client as well as S/MIME. - -To use the PKCS11 module, please see the section: -@pxref{How to use the PKCS11 module}. - -More about how to configure the KDC, see the documentation in the -Heimdal manual to set up the KDC. - -@subsection XMPP/Jabber - -The jabber server certificate should have a dNSname that is the same as -the user entered into the application, not the same as the host name of -the machine. - -@example -hxtool issue-certificate \ - --subject="CN=xmpp1.test.h5l.se,DC=test,DC=h5l,DC=se" \ - --hostname="xmpp1.test.h5l.se" \ - --hostname="test.h5l.se" \ - ... -@end example - -The certificate may also contain a jabber identifier (JID) that, if the -receiver allows it, authorises the server or client to use that JID. - -When storing a JID inside the certificate, both for server and client, -it's stored inside a UTF8String within an otherName entity inside the -subjectAltName, using the OID id-on-xmppAddr (1.3.6.1.5.5.7.8.5). - -To read more about the requirements, see RFC3920, Extensible Messaging -and Presence Protocol (XMPP): Core. - -hxtool issue-certificate have support to add jid to the certificate -using the option @kbd{--jid}. - -@example -hxtool issue-certificate \ - --subject="CN=Love,DC=test,DC=h5l,DC=se" \ - --jid="lha@@test.h5l.se" \ - ... -@end example - - -@node CMS signing and encryption, CMS background, Application requirements, Top -@chapter CMS signing and encryption - -CMS is the Cryptographic Message System that among other, is used by -S/MIME (secure email) and Kerberos PK-INIT. It's an extended version of -the RSA, Inc standard PKCS7. - -@node CMS background, Certificate matching, CMS signing and encryption, Top -@section CMS background - - -@node Certificate matching, Matching syntax, CMS background, Top -@chapter Certificate matching - -To match certificates hx509 have a special query language to match -certifictes in queries and ACLs. - -@node Matching syntax, Software PKCS 11 module, Certificate matching, Top -@section Matching syntax - -This is the language definitions somewhat slopply descriped: - -@example - -expr = TRUE, - FALSE, - ! expr, - expr AND expr, - expr OR expr, - ( expr ) - compare - -compare = - word == word, - word != word, - word IN ( word [, word ...]) - word IN %@{variable.subvariable@} - -word = - STRING, - %@{variable@} - -@end example - -@node Software PKCS 11 module, How to use the PKCS11 module, Matching syntax, Top -@chapter Software PKCS 11 module - -PKCS11 is a standard created by RSA, Inc to support hardware and -software encryption modules. It can be used by smartcard to expose the -crypto primitives inside without exposing the crypto keys. - -Hx509 includes a software implementation of PKCS11 that runs within the -memory space of the process and thus exposes the keys to the -application. - -@node How to use the PKCS11 module, , Software PKCS 11 module, Top -@section How to use the PKCS11 module - -@example -$ cat > ~/.soft-pkcs11.rc <
= any-policy) -1 InvalidSelfIssuedrequireExplicitPolicyTest8EE.crt -# 4.11.2 Valid inhibitPolicyMapping Test2 - Reject - unrecognized critical extension -1 ValidinhibitPolicyMappingTest2EE.crt -# 4.12.2 Valid inhibitAnyPolicy Test2 - Reject - unrecognized critical extension -1 ValidinhibitAnyPolicyTest2EE.crt -# 4.13.1 Valid DN nameConstraints Test1 - Validate Successfully -0 ValidDNnameConstraintsTest1EE.crt -# 4.13.2 Invalid DN nameConstraints Test2 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest2EE.crt -# 4.13.3 Invalid DN nameConstraints Test3 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest3EE.crt -# 4.13.4 Valid DN nameConstraints Test4 - Validate Successfully -0 ValidDNnameConstraintsTest4EE.crt -# 4.13.5 Valid DN nameConstraints Test5 - Validate Successfully -0 ValidDNnameConstraintsTest5EE.crt -# 4.13.6 Valid DN nameConstraints Test6 - Validate Successfully -0 ValidDNnameConstraintsTest6EE.crt -# 4.13.7 Invalid DN nameConstraints Test7 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest7EE.crt -# 4.13.8 Invalid DN nameConstraints Test8 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest8EE.crt -# 4.13.9 Invalid DN nameConstraints Test9 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest9EE.crt -# 4.13.10 Invalid DN nameConstraints Test10 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest10EE.crt -# 4.13.11 Valid DN nameConstraints Test11 - Validate Successfully -0 ValidDNnameConstraintsTest11EE.crt -# 4.13.12 Invalid DN nameConstraints Test12 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest12EE.crt -# 4.13.13 Invalid DN nameConstraints Test13 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest13EE.crt -# 4.13.14 Valid DN nameConstraints Test14 - Validate Successfully -0 ValidDNnameConstraintsTest14EE.crt -# 4.13.15 Invalid DN nameConstraints Test15 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest15EE.crt -# 4.13.16 Invalid DN nameConstraints Test16 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest16EE.crt -# 4.13.17 Invalid DN nameConstraints Test17 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest17EE.crt -# 4.13.18 Valid DN nameConstraints Test18 - Validate Successfully -0 ValidDNnameConstraintsTest18EE.crt -# 4.13.19 Valid Self-Issued DN nameConstraints Test19 - Validate Successfully -0 ValidDNnameConstraintsTest19EE.crt -# 4.13.20 Invalid Self-Issued DN nameConstraints Test20 - Reject - name constraints violation -1 InvalidDNnameConstraintsTest20EE.crt -# 4.13.21 Valid RFC822 nameConstraints Test21 - Validate Successfully -0 ValidRFC822nameConstraintsTest21EE.crt -# 4.13.22 Invalid RFC822 nameConstraints Test22 - Reject - name constraints violation -1 InvalidRFC822nameConstraintsTest22EE.crt -# 4.13.23 Valid RFC822 nameConstraints Test23 - Validate Successfully -0 ValidRFC822nameConstraintsTest23EE.crt -# 4.13.24 Invalid RFC822 nameConstraints Test24 - Reject - name constraints violation -1 InvalidRFC822nameConstraintsTest24EE.crt -# 4.13.25 Valid RFC822 nameConstraints Test25 - Validate Successfully -0 ValidRFC822nameConstraintsTest25EE.crt -# 4.13.26 Invalid RFC822 nameConstraints Test26 - Reject - name constraints violation -1 InvalidRFC822nameConstraintsTest26EE.crt -# 4.13.27 Valid DN and RFC822 nameConstraints Test27 - Validate Successfully -0 ValidDNandRFC822nameConstraintsTest27EE.crt -# 4.13.28 Invalid DN and RFC822 nameConstraints Test28 - Reject - name constraints violation -1 InvalidDNandRFC822nameConstraintsTest28EE.crt -# 4.13.29 Invalid DN and RFC822 nameConstraints Test29 - Reject - name constraints violation -1 InvalidDNandRFC822nameConstraintsTest29EE.crt -# 4.13.30 Valid DNS nameConstraints Test30 - Validate Successfully -0 ValidDNSnameConstraintsTest30EE.crt -# 4.13.31 Invalid DNS nameConstraints Test31 - Reject - name constraints violation -1 InvalidDNSnameConstraintsTest31EE.crt -# 4.13.32 Valid DNS nameConstraints Test32 - Validate Successfully -0 ValidDNSnameConstraintsTest32EE.crt -# 4.13.33 Invalid DNS nameConstraints Test33 - Reject - name constraints violation -1 InvalidDNSnameConstraintsTest33EE.crt -# 4.13.34 Valid URI nameConstraints Test34 - Validate Successfully -0 ValidURInameConstraintsTest34EE.crt -# 4.13.35 Invalid URI nameConstraints Test35 - Reject - name constraints violation -1 InvalidURInameConstraintsTest35EE.crt -# 4.13.36 Valid URI nameConstraints Test36 - Validate Successfully -0 ValidURInameConstraintsTest36EE.crt -# 4.13.37 Invalid URI nameConstraints Test37 - Reject - name constraints violation -1 InvalidURInameConstraintsTest37EE.crt -# 4.13.38 Invalid DNS nameConstraints Test38 - Reject - name constraints violation -1 InvalidDNSnameConstraintsTest38EE.crt -# 4.14.1 Valid distributionPoint Test1 - Validate Successfully -0 ValiddistributionPointTest1EE.crt -# 4.14.2 Invalid distributionPoint Test2 - Reject - end entity certificate has been revoked -2 InvaliddistributionPointTest2EE.crt -# 4.14.3 Invalid distributionPoint Test3 - Reject or Warn - status of end entity certificate can not be determined -3 InvaliddistributionPointTest3EE.crt -# 4.14.4 Valid distributionPoint Test4 - Validate Successfully -0 ValiddistributionPointTest4EE.crt -# 4.14.5 Valid distributionPoint Test5 - Validate Successfully -0 ValiddistributionPointTest5EE.crt -# 4.14.6 Invalid distributionPoint Test6 - Reject - end entity certificate has been revoked -2 InvaliddistributionPointTest6EE.crt -# 4.14.7 Valid distributionPoint Test7 - Validate Successfully -0 ValiddistributionPointTest7EE.crt -# 4.14.8 Invalid distributionPoint Test8 - Reject or Warn - status of end entity certificate can not be determined -3 InvaliddistributionPointTest8EE.crt -# 4.14.9 Invalid distributionPoint Test9 - Reject or Warn - status of end entity certificate can not be determined -3 InvaliddistributionPointTest9EE.crt -# 4.14.10 Valid No issuingDistributionPoint Test10 - Validate Successfully -0 ValidNoissuingDistributionPointTest10EE.crt -# 4.14.11 Invalid onlyContainsUserCerts CRL Test11 - Reject or Warn - status of end entity certificate can not be determined -3 InvalidonlyContainsUserCertsTest11EE.crt -# 4.14.12 Invalid onlyContainsCACerts CRL Test12 - Reject or Warn - status of end entity certificate can not be determined -3 InvalidonlyContainsCACertsTest12EE.crt -# 4.14.13 Valid onlyContainsCACerts CRL Test13 - Validate Successfully -0 ValidonlyContainsCACertsTest13EE.crt -# 4.14.14 Invalid onlyContainsAttributeCerts Test14 - Reject or Warn - status of end entity certificate can not be determined -3 InvalidonlyContainsAttributeCertsTest14EE.crt -# 4.14.15 Invalid onlySomeReasons Test15 - Reject - end entity certificate has been revoked -2 InvalidonlySomeReasonsTest15EE.crt -# 4.14.16 Invalid onlySomeReasons Test16 - Reject - end entity certificate is on hold -2 InvalidonlySomeReasonsTest16EE.crt -# 4.14.17 Invalid onlySomeReasons Test17 - Reject or Warn - status of end entity certificate can not be determined -3 InvalidonlySomeReasonsTest17EE.crt -# 4.14.18 Valid onlySomeReasons Test18 - Validate Successfully -0 ValidonlySomeReasonsTest18EE.crt -# 4.14.19 Valid onlySomeReasons Test19 - Validate Successfully -0 ValidonlySomeReasonsTest19EE.crt -# 4.14.20 Invalid onlySomeReasons Test20 - Reject - end entity certificate has been revoked -2 InvalidonlySomeReasonsTest20EE.crt -# 4.14.21 Invalid onlySomeReasons Test21 - Reject - end entity certificate has been revoked -2 InvalidonlySomeReasonsTest21EE.crt -# 4.14.24 Valid IDP with indirectCRL Test24 - Reject or Warn - status of end entity certificate can not be determined -3 ValidIDPwithindirectCRLTest24EE.crt -# 4.15.1 Invalid deltaCRLIndicator No Base Test1 - Reject or Warn - status of end entity certificate can not be determined -3 InvaliddeltaCRLIndicatorNoBaseTest1EE.crt -# 4.15.2 Valid delta-CRL Test2 - Validate Successfully -0 ValiddeltaCRLTest2EE.crt -# 4.15.3 Invalid delta-CRL Test3 - Reject - end entity certificate has been revoked -2 InvaliddeltaCRLTest3EE.crt -# 4.15.4 Invalid delta-CRL Test4 - Reject - end entity certificate has been revoked -2 InvaliddeltaCRLTest4EE.crt -# 4.15.5 Valid delta-CRL Test5 - Validate Successfully -0 ValiddeltaCRLTest5EE.crt -# 4.15.6 Invalid delta-CRL Test6 - Reject - end entity certificate has been revoked -2 InvaliddeltaCRLTest6EE.crt -# 4.15.7 Valid delta-CRL Test7 - Validate Successfully -0 ValiddeltaCRLTest7EE.crt -# 4.15.8 Valid delta-CRL Test8 - Validate Successfully -0 ValiddeltaCRLTest8EE.crt -# 4.15.9 Invalid delta-CRL Test9 - Reject - end entity certificate has been revoked -2 InvaliddeltaCRLTest9EE.crt -# 4.15.10 Invalid delta-CRL Test10 - Reject or Warn - status of end entity certificate can not be determined -3 InvaliddeltaCRLTest10EE.crt -# 4.16.1 Valid Unknown Not Critical Certificate Extension Test1 - Validate Successfully -0 ValidUnknownNotCriticalCertificateExtensionTest1EE.crt -# 4.16.2 Invalid Unknown Critical Certificate Extension Test2 - Reject - unrecognized critical extension -1 InvalidUnknownCriticalCertificateExtensionTest2EE.crt diff --git a/kerberosV/src/lib/hx509/data/no-proxy-test.crt b/kerberosV/src/lib/hx509/data/no-proxy-test.crt deleted file mode 100644 index 3c316fd9966..00000000000 --- a/kerberosV/src/lib/hx509/data/no-proxy-test.crt +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICDDCCAXWgAwIBAgIJAMJEvwnR1+3VMA0GCSqGSIb3DQEBBQUAMCExCzAJBgNV -BAYTAlNFMRIwEAYDVQQDDAlUZXN0IGNlcnQwHhcNMDkwNDI2MjAyOTQxWhcNMTkw -NDI0MjAyOTQxWjA0MQswCQYDVQQGEwJTRTESMBAGA1UEAwwJVGVzdCBjZXJ0MREw -DwYDVQQDDAhuby1wcm94eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAoj9n -WflMrV4pTKogjZSsR0ayv0SnNJDalEKSvEge7NeWJm/qOl63ZFp/Fu76CX5sw0um -3y08szXc7PQ3bfeaOASI3DRjeq/Bdo91189IudKjRQGmpwvaLaB+geiJ0zxL8MbO -zYCKZR2HtwmnyAtuVxBzg/JkbRivZNY6eFujez0CAwEAAaM5MDcwCQYDVR0TBAIw -ADALBgNVHQ8EBAMCBeAwHQYDVR0OBBYEFAsSc5J6beDqU81cycJGR+e284BXMA0G -CSqGSIb3DQEBBQUAA4GBANmfFhAMyYld728X7ne9GFLKKOSmWNUBlI7imwZcXo3P -QgCBmjhDiadCLdntQNCGAtBMUUM/jf3SCzWyEUtvCfqNCeFbYuS4CNStrACtDNjb -iw34aVAORleFr4hzAe9c61UH8nIkQbMYH264yUA/RJC1U01b/26YlKAVq75l3d36 ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/no-proxy-test.key b/kerberosV/src/lib/hx509/data/no-proxy-test.key deleted file mode 100644 index 2a6006cdc80..00000000000 --- a/kerberosV/src/lib/hx509/data/no-proxy-test.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAKI/Z1n5TK1eKUyq -II2UrEdGsr9EpzSQ2pRCkrxIHuzXliZv6jpet2Rafxbu+gl+bMNLpt8tPLM13Oz0 -N233mjgEiNw0Y3qvwXaPddfPSLnSo0UBpqcL2i2gfoHoidM8S/DGzs2AimUdh7cJ -p8gLblcQc4PyZG0Yr2TWOnhbo3s9AgMBAAECgYBWdSjy1hkZDWM+mi3MpFwFg1P+ -/muHZGVFuhANSvVHyj4V729GeXCKhnrQ0rnk0zzL+QVMSgPdj6dRkXX0IIxJ0iyI -k7ZVoaCuC8dmc/rF9pJ58saqKYCqQFtjdFO68E3aQbnk89ai69AzgdjegRSVmOQ8 -yJ9ArHcggxbEqGq94QJBANOk9UWdI72KbIRElrTtWAvIrNaF4iixR+AdYuFL2+cJ -WaGApfFtcNppllmbWxh0IayIDzRpWzSpTILNLQdqF9UCQQDEQDzfZ04+x2RhX28o -O1Vzqkado6OvyhwVlzp19ZGstMWq6IVNZEJDBYCilk7dkIkjBHojaVEu/k9vMUZS -KzHJAkBk6xmRUjbCoIjSISqDp1D+fXf86uZGZRJSyXBm4Zc/+XNl0URPdNIFM6ff -nna3mFiePlqRsVMuLzQugstf57TpAkAYCvqqMADRBiKRH10B48sDQaAnHe4m0i8A -oidiXjR7oSX6W0RBh//qMBljUeDVmiiC5sCD6BovFK7so2/HD02pAkA9zFWyVTdq -Y3t01+ZG6TfcxwKGCgpwS3x9OQbMVb34JPQ65U0JzW7ubmYFMD5Fl1RPjDbLc+wm -uSnStI7RGOt+ ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/ocsp-req1.der b/kerberosV/src/lib/hx509/data/ocsp-req1.der deleted file mode 100644 index c975bfeede9f8c117ba3b5fb9b671fc31a4fcd01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 105 zcmV-v0G9tSXE0?jJ}^8mIxqH2QUEw1QG-g!hH2QUEw1QG-g6hlCOLu2ww Lfdc{AK5|KJGlN*hSBF^94+ z^9W^Bm>O6rgrpXiCBw<%nVEn3=IqnjEqd93<3@O z4Xl7FShe|>nWR`5SVV61YNyrcs&1BDv*YMRv30tY!n<~}h{VqEkT+75F#3GQnV-JT?>OBSTW(n)yWuKQA@Un4gwRyCC z=Vb)?iGjJXkzuZxSaGpk>*k`U%)AZ$rVjXho`JaRyP1wp1 zU~2cQ=F;=ubNGbrZ?NrIpSn1KfVT{O2~+JtCzJ%hYSK^JBwJo^=Jx8~!_Zyv8&S7%4J{W`g6 z?WZojLeu-&{vwBDF0(&Y`M{)Qk{EtUXl6x2YQR6nGm71M=0BdqntAitS~}V{%gB|d zMwj|l8*eLATzP8xy<`Q)1uwot7n^aDWqq3pHVnC)&AX_(CE%?CT2zk#>I^@ z4H~Bz$O2QHEFX&)_OxRV1(H@~2{s69z?!%g>MbEDX*VIo6c5O3VHQ>cW=6*U2HYSX zKMM;mKA#~69WW9>=}ygt)pKzI!=rU)a}LF79#)xoK(TwG`=m#Eg?G3Aez45p{P`1U z{VM{W?%|Y5O8CWd-NDROx0_s%NsHL04Vx;vhGU6RNAlgp=F1^}R7M_&K{ diff --git a/kerberosV/src/lib/hx509/data/ocsp-resp1-3.der b/kerberosV/src/lib/hx509/data/ocsp-resp1-3.der deleted file mode 100644 index 4c650162f79677333b2a18aab7840740fb8ab49c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 363 zcmXqLVoc{^WLVI|m|)Pv7{kV?&Bn;e%5K2O$kN2<3l#D+XxzL|!$8fD+klgeIh2J> zm?_xRP~1Qi#9`*)^LGvoP$)_*F38VINiCA#H!?6VGcYkQG%zqQHL{2@2sH3FumWmj z)#hVnl450G5xLc?omQi(x>MgRPGO3)$d+8Qjy3$2 z3z-<18W=E)T&QfIXdsVpDHDqji$La%Jse7@_Y}OFC9H#&eO_X~%f_kI=F#?@ml5b6 z2Ij^_2G#tQH-_b=-H*@Y?8-hbcdXb& z?pN%+zy7=EQ)BsxoNll3{oFz3C4VR0`Z0aUYI*KJGlN*hSBF^94+ z^9W^Bm>O6rgrpXiCBwnWR`5SVV61YNyrcs&1BDv*YMRv30tY!n<~}h~#+)-`U?i)kpZV{B(o6 z>eC`;^JOqGGBq$@7`af{K+!-R;aVmZAr^r{%?6w1u)m*w_GO4oTb=xF170>xtu~Lg z@4SpaKQS;jHZlZA9+TPmtUAysyquBq?rZ<;>ngcBikkm?T@#TM$?K*@?7e(zHe%?C3UMpUmaX77ceC$GOcj+ zR)=tl^she;Pdrw7Xpy?A-s<}wFN(dbmCLTn_>t>y`ybzvJ4MHWXDw)ADluqcDgfdf zgC@qS3z&iaW8!3(X>>1<&q1;a&B>$$yMdfIFH*1@M2Yhnf?~l0918|fB$?GXAK4|0 zpup>8Flg*#0*2wv%hKsG-{aI8t(*QcFLByod|tbee=fk}4a$2DdfeskA(9$ z>!9M-Q3sfpc^`ME+w+hw)y3YSo2e;;<>nckbjEFBO*f2##joG%jb&nHWMEv}IMbkU znt?1Z)yeX)h+$7V22mhsWtL!rzy_>|YoXo}l9F~4QcUrH%ob*0HDG3B{BOVw;_dVb)JHxq6$Kio5C zvV~&IdcU0NoYa+*&Q5v1V%-EGkqX_#qN|)f-gHUPu{p5U%Hu|ZYxl*U}<1tWM*VwWNBg;We{lKZ(wD>$;PV9$IK+f%D^IWt5-X% zMpt#S?3x`%FN&?xtrXt1n?)qgL-@}A?x{Y)pXH|;+*O|zIh!woiIJ&+0mI0J$_9!C z@(6b^u?VpU9BMY$G>85D{If4ZY})GNcN_4sacZ@Bw0-Ag1iGGqxv`N!YMSom`Oi+9 z)yeCfH~w(;uH$8)=J~SA*}Yz`i07WKd69zKAWEFq5ES|* z;LtaSGEhTNZYXXb3Ne_^-#Iuyp(wSuAU`i9waB1xKC&wqK>^mwV9?mf1Pr&27IPNF z?c^(#-1aqGdk)Y0Wyiz$du>>m`-3$;Z2NJM_v9U6bKQ?+X4_-3W0xv1)wH$D+xocs z*}SHk)2A`bx2Z09CcW+Cug%-LgY(pWZ?a#fRsS>nzSP5e?bF@M8WtbfAEU#&+HAV8 z?v6vLj_xl^LVmdZu_)Uy)BauaH&2IYVuei1j0}v6BMrjA9+wqnVKQJa;0F3bmY;=% znThp*fgFgV$^!BoJhig2aX=C-GpB(pNS==cN18?UIW(!LOch-4Ng%@4PvPlhU-7Np z=Bxgl(5QTJN_68qjmdvpXI}N{TEO*WUTMnDCCSt7YRx;&&)nSRa#UuC$+qn!kN-cO z&M&x?VXwg7iMQYAip&-}{?uawN7BWJeUmbmMcLLxSbo^Or;uZ3S zm?_xRP~1Qi#9`*)^LGvoP$)_*F38VINiCA#H!?7=G%ztTGcqu;G%<`a2sH3FumWmj z)#hVnl450G5xLc?omQi(x>~TYm2Z0M9md5dZ)H diff --git a/kerberosV/src/lib/hx509/data/ocsp-resp1-ocsp.der b/kerberosV/src/lib/hx509/data/ocsp-resp1-ocsp.der deleted file mode 100644 index f8e219b5bf429551c4e41d81a61c4f009b1ff754..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 918 zcmXqLVxGjs$grS^x!a(Lxt)zun~jl`mEC}mk)?^b0w`2s(71V_hJl(Pw*e;`b0`a& zFjKIrp}2u4h{Mdo=kFXGpiq=rT#%oal3FCeZ)9L#X<%YxW@KPwX<`^<5NP0UUg0DD@Un4gwRyCC=Vb)? zhk?1VkzreWtlkgquvt#FDo14&5e3T0H78dxfXq!yPb1m)+KC^$Q!#DjsHI4@Fg8$^lo8iGRK z1RVMXQN%`@LF0U6S1^JCte3%{v6BfHZXYe?EQs65S1h^hYq<6tp7+a+hx7N^url`t zYkb)D<09|LJHqC=AIr?P$7IJYRbr}XYniw8ard)%O*f}cW14SMUGhwN+sR*>w|58U zsr}w$zfPJf%_i!Qm9GX;ArV1|jBoN{2r||T$ulQDP z^Hu*&XjDEqCAx8*#^gV)Gp~AeE#P`GuQcW7lH_T3wdNh?XKrqDIV!WnWZU+V$NwKs z=NH_{uvg&k#M^IlMP`c~f9kP;Bk5wqzDb$OqHOCTEI;htQ^>KiENAw!a2ZwUYgID} T=1&da6u&8TQ{nctu6^?W3L`PC diff --git a/kerberosV/src/lib/hx509/data/ocsp-resp1.der b/kerberosV/src/lib/hx509/data/ocsp-resp1.der deleted file mode 100644 index 8546eba86f69b0e90f8c1c9238ea94eee4531d07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 918 zcmXqLVxGjs$grS^x!a(Lxt)zun~jl`mEC}mk)?^b0w`2s(71V_hJl(Pw*e;`b0`a& zFjKIrp}2u4h{Mdo=kFXGpiq=rT#%oal3FCeZ)9L#W?*7qXkcJqWMmp;5NP0UU^o^p3jW&bE`N*zd1O-?xgF#~_6ENI%o%JqEU0XyTaqsRU&zGF$iTQb(jXk10A+<)m<$*UxPbvA%g@5X%*6V@Kn}!FWdS8hc=}~!h{%43FZjb1SkAtv%L$%f!;s{lLPP$UcWA6-RH=S?cCulD-!mH%MD( zB)ji?Wijz;rq#pdewTd(&)dFza{Z{TAI*RE2V+RX$;fSMl;1BFuU3jrNGoMLxifXv zyYl#5+1&M#vYqSi%=3$HxEOm%zjRwvRn(fk5Di29?iJT8oF=Yo+b;T5YsUN!r?P~3 T|CN=$b(nhTh-*cI($*~iiykhM diff --git a/kerberosV/src/lib/hx509/data/ocsp-resp2.der b/kerberosV/src/lib/hx509/data/ocsp-resp2.der deleted file mode 100644 index 2a738920c96df653b12a90d533175d5ed5e6971d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 935 zcmXqLVqVO}$grS^d5%F7^9(jlZ8k<$R(1nMMwTY#PM}b$LF18y8U|{H+yTt=7oY7Mq&soR5nmFkViP3iA9J-K*ZUh!8!SpcOx_7O}nCKB?DeIPOUbNw(q=* zKo2r7H#Ra{deIi`KdSLmU9#gL9FzkffH9gnQKuPJ!p(8tgtnaNe# zrKe>5519H|k3-$e!p&_9_kI2Cz5blOGd7p?{yD}S*L84be)obVCUt`*CS@R&H)vw) zSisE0$i&3Rh~`uSEkkJoNl0)DWmK3NSSp017MCal<>!|uI6I<5jDeguFH-m$M2Yhn zf}+C&932Kx#KxmR<9uXSFoFWCm%*U1lL;7ZA1&rAh}+3mEV=D#xb_^L_sfol^Y_}Y zGWQ2-eAxEmBJasN!sfak%gnaNWXCR5VybCtnYZXcynr~BG@=SW$$zPkd zcL(RG{oZ81POJWB`hBT~_u8ksmo+RtvOh+LceUAcVci{vQXSo2n1uXr{bNzKW2XJP z=5L-3)5Hpym>C%u7e^X|gHxoeFbk6bg8?@%fMoeuSeThu9~j7iII1k5R0>bftZW>R zw9U+EAPbV`V-aH!`Kxblx~C{6Fvvgtn!@Rer^EF3a3T8~np9M#3NH905aH{m@bt2; z_*QT8RsT+CR6aQ+x^bSyal?%>0-pbNtw%{Z0jN{KkVL9$g#65XZEvj8CB_P WRWl0aPYvJ{zbSQ7;r6wzee(dH{4^~9 diff --git a/kerberosV/src/lib/hx509/data/ocsp-responder.crt b/kerberosV/src/lib/hx509/data/ocsp-responder.crt deleted file mode 100644 index ceba439062b..00000000000 --- a/kerberosV/src/lib/hx509/data/ocsp-responder.crt +++ /dev/null @@ -1,56 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 1 (0x1) - Signature Algorithm: sha1WithRSAEncryption - Issuer: CN=hx509 Test Root CA, C=SE - Validity - Not Before: Apr 26 20:29:40 2009 GMT - Not After : Apr 24 20:29:40 2019 GMT - Subject: C=SE, CN=OCSP responder - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:f1:38:9c:a0:5e:b9:0e:73:19:b6:f5:57:2b:9c: - 0c:ef:a6:c7:57:0f:8d:3c:05:03:8f:53:28:f0:b6: - f8:d1:0d:c9:dc:13:37:2d:f1:76:36:b7:5c:6b:5d: - a5:22:02:7c:86:84:9e:b5:e3:8b:e6:9e:82:d9:97: - 96:02:9f:3c:7b:74:e6:1b:b6:c9:fa:b3:b7:8b:53: - 6e:26:fb:b2:3f:ae:2a:7f:f9:67:df:1a:e1:de:87: - 97:47:76:80:a3:c4:bf:5c:2c:0d:ab:36:97:13:2d: - b8:c2:65:41:47:e8:34:54:f8:45:fc:38:76:b8:99: - 3f:ee:83:f6:49:40:96:16:71 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment - X509v3 Extended Key Usage: - OCSP No Check, OCSP Signing - X509v3 Subject Key Identifier: - FD:2F:3F:35:BC:72:5C:51:52:4F:5F:D6:20:CB:D1:CB:56:2F:BC:0A - Signature Algorithm: sha1WithRSAEncryption - 24:95:11:a0:f2:10:58:4d:4e:20:e5:d3:4d:17:b5:4b:37:aa: - fe:c8:28:79:e4:ca:15:b1:9e:28:93:fc:45:99:d5:4a:8a:a0: - 0a:e4:9e:75:64:f9:a4:63:96:dd:2a:9e:c7:0f:03:83:86:44: - c5:1c:a4:34:b6:b7:74:e3:ff:e3:97:0f:11:b5:00:bd:10:fd: - 91:db:ec:2d:14:9b:16:c7:e5:48:b0:08:62:d1:58:be:92:69: - a6:5a:3d:7e:58:39:f0:bb:bc:71:08:b9:76:6c:9b:e6:57:1c: - 25:1b:d6:7a:98:70:9f:95:50:09:17:d9:1a:d9:20:db:d6:8a: - be:9e ------BEGIN CERTIFICATE----- -MIICHzCCAYigAwIBAgIBATANBgkqhkiG9w0BAQUFADAqMRswGQYDVQQDDBJoeDUw -OSBUZXN0IFJvb3QgQ0ExCzAJBgNVBAYTAlNFMB4XDTA5MDQyNjIwMjk0MFoXDTE5 -MDQyNDIwMjk0MFowJjELMAkGA1UEBhMCU0UxFzAVBgNVBAMMDk9DU1AgcmVzcG9u -ZGVyMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDxOJygXrkOcxm29VcrnAzv -psdXD408BQOPUyjwtvjRDcncEzct8XY2t1xrXaUiAnyGhJ6144vmnoLZl5YCnzx7 -dOYbtsn6s7eLU24m+7I/rip/+WffGuHeh5dHdoCjxL9cLA2rNpcTLbjCZUFH6DRU -+EX8OHa4mT/ug/ZJQJYWcQIDAQABo1kwVzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF -4DAeBgNVHSUEFzAVBgkrBgEFBQcwAQUGCCsGAQUFBwMJMB0GA1UdDgQWBBT9Lz81 -vHJcUVJPX9Ygy9HLVi+8CjANBgkqhkiG9w0BAQUFAAOBgQAklRGg8hBYTU4g5dNN -F7VLN6r+yCh55MoVsZ4ok/xFmdVKiqAK5J51ZPmkY5bdKp7HDwODhkTFHKQ0trd0 -4//jlw8RtQC9EP2R2+wtFJsWx+VIsAhi0Vi+kmmmWj1+WDnwu7xxCLl2bJvmVxwl -G9Z6mHCflVAJF9ka2SDb1oq+ng== ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/ocsp-responder.key b/kerberosV/src/lib/hx509/data/ocsp-responder.key deleted file mode 100644 index c9dcb302e91..00000000000 --- a/kerberosV/src/lib/hx509/data/ocsp-responder.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAPE4nKBeuQ5zGbb1 -VyucDO+mx1cPjTwFA49TKPC2+NENydwTNy3xdja3XGtdpSICfIaEnrXji+aegtmX -lgKfPHt05hu2yfqzt4tTbib7sj+uKn/5Z98a4d6Hl0d2gKPEv1wsDas2lxMtuMJl -QUfoNFT4Rfw4driZP+6D9klAlhZxAgMBAAECgYEA0hUg69azSu9ZhOtVeOiWp51T -3PHxakVfnVKqxEJGnyNoG6AsnXm/H9Y/yk4rhFwwAaO86eJ8NGT2xvTrM+tk6tua -iNokJ1uWzpt7XPTr5XvkYEYAx7Pf3VmAja2SQkD0m20AXM9QfXsRvyQVwB2RxIhl -pa45Gm+PjSNXRaTzs0ECQQD/L+doN/fBbooCRcRYM/vNnHq5Hh1IdHSp3hI9MMLb -yOU1x6iWfg43xPImODCSippAh74Ummo2SPxVDbuu0Mq5AkEA8f1Rsfh8hcd7RsUu -LKHl4wyVD9fzpjbsFjyuTOq/bDsXLtdktDr1pn37jker/DKm82wHfAELtij74piN -FYHteQJAET7eh6eIodTjlMW8QC27LakOjiYf2n6sR7KPTv1Vnd7Uxq6okQsR0OkJ -aFXRyoV9aTEDQocw+Fw0WVclQOoxWQJBAIUaoWUTGOs83kH/E3bZVmmc8iDU1+AF -NbbFidolBUWy+v143JuGEriRc1y/b4o5EjuyoCtFJ/v6bxIkdvXtkYECQQCxcBgn -ohgcWmple2sTMOEoWu2IvqmLwexvmVf1Z6R8Nhc2ayQTNwe0nCVaTtOY1NanQP/T -U/uo7ISsA/8luXu2 ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/openssl.cnf b/kerberosV/src/lib/hx509/data/openssl.cnf deleted file mode 100644 index a6054009d95..00000000000 --- a/kerberosV/src/lib/hx509/data/openssl.cnf +++ /dev/null @@ -1,190 +0,0 @@ -oid_section = new_oids - -[new_oids] -pkkdcekuoid = 1.3.6.1.5.2.3.5 - -[ca] - -default_ca = user - -[usr] -database = index.txt -serial = serial -x509_extensions = usr_cert -default_md=sha1 -policy = policy_match -email_in_dn = no -certs = . - -[ocsp] -database = index.txt -serial = serial -x509_extensions = ocsp_cert -default_md=sha1 -policy = policy_match -email_in_dn = no -certs = . - -[usr_ke] -database = index.txt -serial = serial -x509_extensions = usr_cert_ke -default_md=sha1 -policy = policy_match -email_in_dn = no -certs = . - -[usr_ds] -database = index.txt -serial = serial -x509_extensions = usr_cert_ds -default_md=sha1 -policy = policy_match -email_in_dn = no -certs = . - -[pkinit_client] -database = index.txt -serial = serial -x509_extensions = pkinit_client_cert -default_md=sha1 -policy = policy_match -email_in_dn = no -certs = . - -[pkinit_kdc] -database = index.txt -serial = serial -x509_extensions = pkinit_kdc_cert -default_md=sha1 -policy = policy_match -email_in_dn = no -certs = . - -[https] -database = index.txt -serial = serial -x509_extensions = https_cert -default_md=sha1 -policy = policy_match -email_in_dn = no -certs = . - -[subca] -database = index.txt -serial = serial -x509_extensions = v3_ca -default_md=sha1 -policy = policy_match -email_in_dn = no -certs = . - - -[req] -distinguished_name = req_distinguished_name -x509_extensions = v3_ca # The extentions to add to the self signed cert - -string_mask = utf8only - -[v3_ca] - -subjectKeyIdentifier=hash -authorityKeyIdentifier=keyid:always,issuer:always -basicConstraints = CA:true -keyUsage = cRLSign, keyCertSign, keyEncipherment, nonRepudiation, digitalSignature - -[usr_cert] -basicConstraints=CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment -subjectKeyIdentifier = hash - -[usr_cert_ke] -basicConstraints=CA:FALSE -keyUsage = nonRepudiation, keyEncipherment -subjectKeyIdentifier = hash - -[proxy_cert] -basicConstraints=CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment -subjectKeyIdentifier = hash -proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:0,policy:text:foo - -[pkinitc_principals] -princ1 = GeneralString:bar - -[pkinitc_principal_seq] -name_type = EXP:0,INTEGER:1 -name_string = EXP:1,SEQUENCE:pkinitc_principals - -[pkinitc_princ_name] -realm = EXP:0,GeneralString:TEST.H5L.SE -principal_name = EXP:1,SEQUENCE:pkinitc_principal_seq - -[pkinit_client_cert] -basicConstraints=CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment -subjectKeyIdentifier = hash -subjectAltName=otherName:1.3.6.1.5.2.2;SEQUENCE:pkinitc_princ_name - -[https_cert] -basicConstraints=CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment -#extendedKeyUsage = https-server XXX -subjectKeyIdentifier = hash - -[pkinit_kdc_cert] -basicConstraints=CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment -extendedKeyUsage = pkkdcekuoid -subjectKeyIdentifier = hash -subjectAltName=otherName:1.3.6.1.5.2.2;SEQUENCE:pkinitkdc_princ_name - -[pkinitkdc_princ_name] -realm = EXP:0,GeneralString:TEST.H5L.SE -principal_name = EXP:1,SEQUENCE:pkinitkdc_principal_seq - -[pkinitkdc_principal_seq] -name_type = EXP:0,INTEGER:1 -name_string = EXP:1,SEQUENCE:pkinitkdc_principals - -[pkinitkdc_principals] -princ1 = GeneralString:krbtgt -princ2 = GeneralString:TEST.H5L.SE - -[proxy10_cert] -basicConstraints=CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment -subjectKeyIdentifier = hash -proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:10,policy:text:foo - -[usr_cert_ds] -basicConstraints=CA:FALSE -keyUsage = nonRepudiation, digitalSignature -subjectKeyIdentifier = hash - -[ocsp_cert] -basicConstraints=CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment -# ocsp-nocheck and kp-OCSPSigning -extendedKeyUsage = 1.3.6.1.5.5.7.48.1.5, 1.3.6.1.5.5.7.3.9 -subjectKeyIdentifier = hash - -[req_distinguished_name] -countryName = Country Name (2 letter code) -countryName_default = SE -countryName_min = 2 -countryName_max = 2 - -organizationalName = Organizational Unit Name (eg, section) - -commonName = Common Name (eg, YOUR name) -commonName_max = 64 - -#[req_attributes] -#challengePassword = A challenge password -#challengePassword_min = 4 -#challengePassword_max = 20 - -[policy_match] -countryName = match -commonName = supplied diff --git a/kerberosV/src/lib/hx509/data/pkinit-ec.crt b/kerberosV/src/lib/hx509/data/pkinit-ec.crt deleted file mode 100644 index 4e8300d0c05..00000000000 --- a/kerberosV/src/lib/hx509/data/pkinit-ec.crt +++ /dev/null @@ -1,51 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 7 (0x7) - Signature Algorithm: sha1WithRSAEncryption - Issuer: CN=hx509 Test Root CA, C=SE - Validity - Not Before: Apr 26 20:29:40 2009 GMT - Not After : Apr 24 20:29:40 2019 GMT - Subject: C=SE, CN=pkinit-ec - Subject Public Key Info: - Public Key Algorithm: id-ecPublicKey - Public-Key: (256 bit) - pub: - 04:df:d7:32:eb:d6:71:78:19:5d:4f:59:6a:85:12: - 20:2f:97:61:aa:e8:6e:71:ac:b7:de:42:82:2a:8b: - 8b:33:86:d3:fc:4e:a5:49:9a:ca:19:6b:1b:ab:3d: - fd:4d:c5:7a:f4:a0:10:b2:a0:8c:05:3a:d7:55:e5: - c9:f5:89:67:07 - ASN1 OID: prime256v1 - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment - X509v3 Subject Key Identifier: - BB:8C:16:71:C8:21:FB:21:0F:81:11:A1:BB:43:12:C8:EF:C8:DA:64 - X509v3 Subject Alternative Name: - othername: - Signature Algorithm: sha1WithRSAEncryption - 08:6e:66:b5:58:e0:e3:fb:15:04:11:89:f0:73:a0:d1:17:c4: - b8:7e:dd:ce:34:fb:7b:ab:ae:bb:af:6f:4d:47:1f:02:f8:e7: - 7c:c9:33:37:7e:7c:2c:2a:4a:26:38:e1:e5:a9:dd:7c:e1:f8: - 5a:2c:c7:6f:26:aa:f2:b0:7f:d4:85:0a:33:b7:ec:df:93:fe: - e4:04:a0:3e:e2:65:ac:1a:f4:b0:50:d6:cf:9e:bb:ce:90:ca: - 34:7a:13:f5:6f:30:bd:ec:af:c5:b9:dd:fa:bc:37:b8:34:6e: - bb:12:5e:aa:d2:bf:91:64:d8:fe:c0:fb:9a:b0:10:ba:95:02: - be:9b ------BEGIN CERTIFICATE----- -MIIB7TCCAVagAwIBAgIBBzANBgkqhkiG9w0BAQUFADAqMRswGQYDVQQDDBJoeDUw -OSBUZXN0IFJvb3QgQ0ExCzAJBgNVBAYTAlNFMB4XDTA5MDQyNjIwMjk0MFoXDTE5 -MDQyNDIwMjk0MFowITELMAkGA1UEBhMCU0UxEjAQBgNVBAMMCXBraW5pdC1lYzBZ -MBMGByqGSM49AgEGCCqGSM49AwEHA0IABN/XMuvWcXgZXU9ZaoUSIC+XYarobnGs -t95CgiqLizOG0/xOpUmayhlrG6s9/U3FevSgELKgjAU611XlyfWJZwejczBxMAkG -A1UdEwQCMAAwCwYDVR0PBAQDAgXgMB0GA1UdDgQWBBS7jBZxyCH7IQ+BEaG7QxLI -78jaZDA4BgNVHREEMTAvoC0GBisGAQUCAqAjMCGgDRsLVEVTVC5INUwuU0WhEDAO -oAMCAQGhBzAFGwNiYXIwDQYJKoZIhvcNAQEFBQADgYEACG5mtVjg4/sVBBGJ8HOg -0RfEuH7dzjT7e6uuu69vTUcfAvjnfMkzN358LCpKJjjh5andfOH4WizHbyaq8rB/ -1IUKM7fs35P+5ASgPuJlrBr0sFDWz567zpDKNHoT9W8wveyvxbnd+rw3uDRuuxJe -qtK/kWTY/sD7mrAQupUCvps= ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/pkinit-ec.key b/kerberosV/src/lib/hx509/data/pkinit-ec.key deleted file mode 100644 index 874b8a53e77..00000000000 --- a/kerberosV/src/lib/hx509/data/pkinit-ec.key +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgL/JpadcZH3wtaXm9 -hbeKhG4YsKoN/WffC88YldqhFYChRANCAATf1zLr1nF4GV1PWWqFEiAvl2Gq6G5x -rLfeQoIqi4szhtP8TqVJmsoZaxurPf1NxXr0oBCyoIwFOtdV5cn1iWcH ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/pkinit-proxy-chain.crt b/kerberosV/src/lib/hx509/data/pkinit-proxy-chain.crt deleted file mode 100644 index 2d2553fdae7..00000000000 --- a/kerberosV/src/lib/hx509/data/pkinit-proxy-chain.crt +++ /dev/null @@ -1,70 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICMTCCAZqgAwIBAgIJAOFd/6I9Oly5MA0GCSqGSIb3DQEBBQUAMB4xCzAJBgNV -BAYTAlNFMQ8wDQYDVQQDDAZwa2luaXQwHhcNMDkwNDI2MjAyOTQwWhcNMTkwNDI0 -MjAyOTQwWjA1MQswCQYDVQQGEwJTRTEPMA0GA1UEAwwGcGtpbml0MRUwEwYDVQQD -DAxwa2luaXQtcHJveHkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANKxpMj4 -is1Zy+3RQfaZyhIbPkK+1237l10YqJmh5vB4WF+VriouCw8bXK/Q84rnGlr48fYa -3qquiuT7TzUyBJ/vGMhuBosnO4zI3usM7wcp9zfmykesP/5ef1HRe8Lv2F1HZkLc -6N4jo5lIGtnlnXe4qJjbjTPsY4x0PVl5QV0DAgMBAAGjYDBeMAkGA1UdEwQCMAAw -CwYDVR0PBAQDAgXgMB0GA1UdDgQWBBStm+lnDlopIzCh6tdbGhDyHDDdlzAlBggr -BgEFBQcBDgEB/wQWMBQCAQAwDwYIKwYBBQUHFQAEA2ZvbzANBgkqhkiG9w0BAQUF -AAOBgQB/udiUzrV5n+klF473NEMaajNvxC/u4/60vHXt6U42U4zHWWRuWTMDkPA/ -6LorSPIk+ZvWLAFHVR2EdeVFZzxbsb9IAsM+giZxv7bYfloBZHhbzc3r8IDSZa1H -totfxDb/wZrFAbNiuuAdmKuRGxwGYE4ykw3ebLSuoRYPI2Szxw== ------END CERTIFICATE----- -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 6 (0x6) - Signature Algorithm: sha1WithRSAEncryption - Issuer: CN=hx509 Test Root CA, C=SE - Validity - Not Before: Apr 26 20:29:40 2009 GMT - Not After : Apr 24 20:29:40 2019 GMT - Subject: C=SE, CN=pkinit - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:b2:47:42:dc:46:f8:94:e3:66:2b:f9:26:14:56: - 41:68:e1:7a:04:cd:55:45:ae:e0:a8:48:80:33:58: - fc:86:4f:e8:67:62:89:f7:d4:ba:d1:bb:9a:6a:83: - 1b:4e:01:b5:7c:9e:b2:d2:bf:84:21:98:58:1d:b6: - 4d:fa:af:f2:e5:e8:d4:d6:78:a3:06:da:69:15:09: - d8:fa:07:09:97:cf:1a:3b:2c:69:b2:58:a2:0b:48: - 4e:37:11:2c:f5:7a:8f:50:e4:40:14:29:28:30:ac: - 0b:b5:0a:1e:60:b4:9a:d4:8d:bc:38:c9:2f:a9:d1: - 35:e7:c9:d4:18:66:1c:15:2d - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment - X509v3 Subject Key Identifier: - E8:3F:1A:8B:C2:8A:9C:F9:B4:4F:95:D9:55:29:0C:A5:0B:0E:13:C6 - X509v3 Subject Alternative Name: - othername: - Signature Algorithm: sha1WithRSAEncryption - b5:ab:c2:d5:f8:30:fc:bb:b3:53:c2:42:a0:f1:4d:a0:5c:92: - 1a:c7:dc:01:df:42:6a:d2:c8:79:18:ae:a7:09:8e:ea:1c:97: - 80:93:b1:e3:23:4d:ca:15:f5:f8:c2:d0:38:5d:0d:76:7b:41: - 47:f1:a4:77:26:86:2c:69:2a:5c:86:32:00:09:da:04:3c:d6: - 30:9d:a3:0a:e2:b1:a6:36:2f:ff:3c:80:d6:e7:2a:8b:49:dd: - d8:24:98:7a:15:0a:29:f0:4b:30:ae:73:b5:af:70:7a:3a:b0: - 40:27:a7:4e:74:8c:46:1e:2f:bb:cc:57:63:30:bf:b1:38:81: - 10:bd ------BEGIN CERTIFICATE----- -MIICMTCCAZqgAwIBAgIBBjANBgkqhkiG9w0BAQUFADAqMRswGQYDVQQDDBJoeDUw -OSBUZXN0IFJvb3QgQ0ExCzAJBgNVBAYTAlNFMB4XDTA5MDQyNjIwMjk0MFoXDTE5 -MDQyNDIwMjk0MFowHjELMAkGA1UEBhMCU0UxDzANBgNVBAMMBnBraW5pdDCBnzAN -BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAskdC3Eb4lONmK/kmFFZBaOF6BM1VRa7g -qEiAM1j8hk/oZ2KJ99S60buaaoMbTgG1fJ6y0r+EIZhYHbZN+q/y5ejU1nijBtpp -FQnY+gcJl88aOyxpsliiC0hONxEs9XqPUORAFCkoMKwLtQoeYLSa1I28OMkvqdE1 -58nUGGYcFS0CAwEAAaNzMHEwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwHQYDVR0O -BBYEFOg/GovCipz5tE+V2VUpDKULDhPGMDgGA1UdEQQxMC+gLQYGKwYBBQICoCMw -IaANGwtURVNULkg1TC5TRaEQMA6gAwIBAaEHMAUbA2JhcjANBgkqhkiG9w0BAQUF -AAOBgQC1q8LV+DD8u7NTwkKg8U2gXJIax9wB30Jq0sh5GK6nCY7qHJeAk7HjI03K -FfX4wtA4XQ12e0FH8aR3JoYsaSpchjIACdoEPNYwnaMK4rGmNi//PIDW5yqLSd3Y -JJh6FQop8EswrnO1r3B6OrBAJ6dOdIxGHi+7zFdjML+xOIEQvQ== ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/pkinit-proxy.crt b/kerberosV/src/lib/hx509/data/pkinit-proxy.crt deleted file mode 100644 index 28da269f4ba..00000000000 --- a/kerberosV/src/lib/hx509/data/pkinit-proxy.crt +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICMTCCAZqgAwIBAgIJAOFd/6I9Oly5MA0GCSqGSIb3DQEBBQUAMB4xCzAJBgNV -BAYTAlNFMQ8wDQYDVQQDDAZwa2luaXQwHhcNMDkwNDI2MjAyOTQwWhcNMTkwNDI0 -MjAyOTQwWjA1MQswCQYDVQQGEwJTRTEPMA0GA1UEAwwGcGtpbml0MRUwEwYDVQQD -DAxwa2luaXQtcHJveHkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANKxpMj4 -is1Zy+3RQfaZyhIbPkK+1237l10YqJmh5vB4WF+VriouCw8bXK/Q84rnGlr48fYa -3qquiuT7TzUyBJ/vGMhuBosnO4zI3usM7wcp9zfmykesP/5ef1HRe8Lv2F1HZkLc -6N4jo5lIGtnlnXe4qJjbjTPsY4x0PVl5QV0DAgMBAAGjYDBeMAkGA1UdEwQCMAAw -CwYDVR0PBAQDAgXgMB0GA1UdDgQWBBStm+lnDlopIzCh6tdbGhDyHDDdlzAlBggr -BgEFBQcBDgEB/wQWMBQCAQAwDwYIKwYBBQUHFQAEA2ZvbzANBgkqhkiG9w0BAQUF -AAOBgQB/udiUzrV5n+klF473NEMaajNvxC/u4/60vHXt6U42U4zHWWRuWTMDkPA/ -6LorSPIk+ZvWLAFHVR2EdeVFZzxbsb9IAsM+giZxv7bYfloBZHhbzc3r8IDSZa1H -totfxDb/wZrFAbNiuuAdmKuRGxwGYE4ykw3ebLSuoRYPI2Szxw== ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/pkinit-proxy.key b/kerberosV/src/lib/hx509/data/pkinit-proxy.key deleted file mode 100644 index 9bb546fcdd8..00000000000 --- a/kerberosV/src/lib/hx509/data/pkinit-proxy.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANKxpMj4is1Zy+3R -QfaZyhIbPkK+1237l10YqJmh5vB4WF+VriouCw8bXK/Q84rnGlr48fYa3qquiuT7 -TzUyBJ/vGMhuBosnO4zI3usM7wcp9zfmykesP/5ef1HRe8Lv2F1HZkLc6N4jo5lI -GtnlnXe4qJjbjTPsY4x0PVl5QV0DAgMBAAECgYEAo99RWJKferqV92GjmYbh+RVB -Zq6CZmOhxeHw+JVJRs2Dhsynit0G8vgILiMp2WaIRCuOHiml+EELfK/OWoSNvOGy -q0ss+mu0Jm3d9bQUYE7O6fBbFtY9zYIYOVWP4YCIyA0su48W3Fk+wQeNewKj396Q -7tx4aBn5f8DARkZrVRECQQDxX81pSf8VTnNQNhvp76YhANGtBhiJ8OtADCNUoJT+ -sKAPa8HiBTHL2alkBbi/b4whOzePCJSjHTinkEBE+iuJAkEA33XtpR3ACDCtrvAo -WNdE7zt4yV4tByzmQCK3u3ZxSJOPKinR55tUjZynqghZmpS+XSE5rRwmsx75ZwkP -oNdlKwJBALcPmZJI9JUMMpia8QCzKKPPIza+cM3tUf35NrJwN5ASFNKdPyZUGjgo -lDevvzYxO23Yo4JvV4t+FgG/fX7S3UECQFh1/tXWqSaU3qzaNZ612Xw7Nt3AgmLM -y3moRMPZZ48rmwk99PKS8y38TgNpus8PAy0q8gItmsReBq1bUOyDWHECQDQOIlRO -k1OWBLD4PLYaxB1c5F59tfCV+cRlm/sYTnDjdDWWu8D2Qhjhz367iLLMJvV2Klyu -7FwUNyfKI6Tk3oY= ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/pkinit-pw.key b/kerberosV/src/lib/hx509/data/pkinit-pw.key deleted file mode 100644 index a0c4adaa04e..00000000000 --- a/kerberosV/src/lib/hx509/data/pkinit-pw.key +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,28C20887B231CD5238D14EE2237F6440 - -CSjnAI3/grUaoUWonmFVrAJpJr8MAUsJ5i5X/56t/SJNnt64GdRR809rsidRUen1 -Poaru3wgOdMO39Xdx1tj95TL3iXMVOckMK/0CDc6I8e4e65ic5ySvLIP7yj06aq2 -iABYy2VnD8yh8neXCl18/tMmIk/mIHkOeey4rrglk5Qs/vohS8KmknuLfOFUdWz3 -2F/Coax+/Itmco4lPNK7FUvVgzyp1fVnZ1upWOnx/HEcXY0t3yE9Y6fWgu6LtqNr -LWvLogalpFVy7l9yb/EStZJnUoc4R90cdX3hsEkYDqxFM5INAZNgBKNa/qfDKifX -b2+uOg2LZ+yYHdyFCezNL6fr38TSNleTU6kq2xrhRbjVzArnEKo2f+XNsQXfy3ix -s1ibkqJXeWA4gPTFVqxKzeO+Pe05hWjUJmPcqwGQe4hGP5SNdiqWuxtL2Z/natva -u9AyUqap9A963qrp1xZMDqZC7asZEUXAWJSkqkU9iS7a6Vn7G82236/T2OoumNWi -XVsm2iOpdIqcTCMoBtB6TkTFPPKZ6f0APD3nAia6Uy5RrorvyadbqTG3AVlQicD5 -6myM7zEta7qWL5kPVk1JIbcNHN929kEgAKKKx9c1H+DgHDQrPM5bsHS9vAVYq0S4 -gUhA44LuizSKEXw+hHJJueU5IK/rv3auNo9Dtt487syz5PnEzeTsiyBqTx6pu2hF -fZ/HkxqQsY34/4pJBdFdnxHfnDMmEuKHY4vt20d1NVU+EP8+R0F4aCTGUWDfUyM9 -oTXJekFmOBfZn3WUkLXXgz+i7a49g9pzl8gFekQ8Cx9s1rkvToklQS8lzspBZwsU ------END RSA PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/pkinit.crt b/kerberosV/src/lib/hx509/data/pkinit.crt deleted file mode 100644 index 4dae0868e9c..00000000000 --- a/kerberosV/src/lib/hx509/data/pkinit.crt +++ /dev/null @@ -1,56 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 6 (0x6) - Signature Algorithm: sha1WithRSAEncryption - Issuer: CN=hx509 Test Root CA, C=SE - Validity - Not Before: Apr 26 20:29:40 2009 GMT - Not After : Apr 24 20:29:40 2019 GMT - Subject: C=SE, CN=pkinit - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:b2:47:42:dc:46:f8:94:e3:66:2b:f9:26:14:56: - 41:68:e1:7a:04:cd:55:45:ae:e0:a8:48:80:33:58: - fc:86:4f:e8:67:62:89:f7:d4:ba:d1:bb:9a:6a:83: - 1b:4e:01:b5:7c:9e:b2:d2:bf:84:21:98:58:1d:b6: - 4d:fa:af:f2:e5:e8:d4:d6:78:a3:06:da:69:15:09: - d8:fa:07:09:97:cf:1a:3b:2c:69:b2:58:a2:0b:48: - 4e:37:11:2c:f5:7a:8f:50:e4:40:14:29:28:30:ac: - 0b:b5:0a:1e:60:b4:9a:d4:8d:bc:38:c9:2f:a9:d1: - 35:e7:c9:d4:18:66:1c:15:2d - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment - X509v3 Subject Key Identifier: - E8:3F:1A:8B:C2:8A:9C:F9:B4:4F:95:D9:55:29:0C:A5:0B:0E:13:C6 - X509v3 Subject Alternative Name: - othername: - Signature Algorithm: sha1WithRSAEncryption - b5:ab:c2:d5:f8:30:fc:bb:b3:53:c2:42:a0:f1:4d:a0:5c:92: - 1a:c7:dc:01:df:42:6a:d2:c8:79:18:ae:a7:09:8e:ea:1c:97: - 80:93:b1:e3:23:4d:ca:15:f5:f8:c2:d0:38:5d:0d:76:7b:41: - 47:f1:a4:77:26:86:2c:69:2a:5c:86:32:00:09:da:04:3c:d6: - 30:9d:a3:0a:e2:b1:a6:36:2f:ff:3c:80:d6:e7:2a:8b:49:dd: - d8:24:98:7a:15:0a:29:f0:4b:30:ae:73:b5:af:70:7a:3a:b0: - 40:27:a7:4e:74:8c:46:1e:2f:bb:cc:57:63:30:bf:b1:38:81: - 10:bd ------BEGIN CERTIFICATE----- -MIICMTCCAZqgAwIBAgIBBjANBgkqhkiG9w0BAQUFADAqMRswGQYDVQQDDBJoeDUw -OSBUZXN0IFJvb3QgQ0ExCzAJBgNVBAYTAlNFMB4XDTA5MDQyNjIwMjk0MFoXDTE5 -MDQyNDIwMjk0MFowHjELMAkGA1UEBhMCU0UxDzANBgNVBAMMBnBraW5pdDCBnzAN -BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAskdC3Eb4lONmK/kmFFZBaOF6BM1VRa7g -qEiAM1j8hk/oZ2KJ99S60buaaoMbTgG1fJ6y0r+EIZhYHbZN+q/y5ejU1nijBtpp -FQnY+gcJl88aOyxpsliiC0hONxEs9XqPUORAFCkoMKwLtQoeYLSa1I28OMkvqdE1 -58nUGGYcFS0CAwEAAaNzMHEwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwHQYDVR0O -BBYEFOg/GovCipz5tE+V2VUpDKULDhPGMDgGA1UdEQQxMC+gLQYGKwYBBQICoCMw -IaANGwtURVNULkg1TC5TRaEQMA6gAwIBAaEHMAUbA2JhcjANBgkqhkiG9w0BAQUF -AAOBgQC1q8LV+DD8u7NTwkKg8U2gXJIax9wB30Jq0sh5GK6nCY7qHJeAk7HjI03K -FfX4wtA4XQ12e0FH8aR3JoYsaSpchjIACdoEPNYwnaMK4rGmNi//PIDW5yqLSd3Y -JJh6FQop8EswrnO1r3B6OrBAJ6dOdIxGHi+7zFdjML+xOIEQvQ== ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/pkinit.key b/kerberosV/src/lib/hx509/data/pkinit.key deleted file mode 100644 index 63b4476ca39..00000000000 --- a/kerberosV/src/lib/hx509/data/pkinit.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALJHQtxG+JTjZiv5 -JhRWQWjhegTNVUWu4KhIgDNY/IZP6GdiiffUutG7mmqDG04BtXyestK/hCGYWB22 -Tfqv8uXo1NZ4owbaaRUJ2PoHCZfPGjssabJYogtITjcRLPV6j1DkQBQpKDCsC7UK -HmC0mtSNvDjJL6nRNefJ1BhmHBUtAgMBAAECgYBKqzAkxJDvA0NS3ZqGYA4rWGzb -wAicE//CXANd/kJeGu/TBWGV7IKGv5WQUPNJu8uAs5NgU5iK3ZzibO3CNpl74KZq -JALQXVbLmOVNpiL8V4dfWxwPBFFzjcrUi0OEVrM0srXghDBRfuNtaf93IXoW32W3 -4S8KgFfV/bDAWv5VfQJBAOS6bQBtcEGSUPILJzwPvvFNF5OvX/R98PrHjX01aSPW -j0B1WMi7sceRDdyE/dV4gGwW7mEftLAogg8HSftaa5MCQQDHiO5/R3aktb3pl7ms -PVZ1xwgF9sPVdiq0p1RhbT3YijktSRVuf7YCb6nqhmC6Il88D9LJg7XTzHkpNUx5 -j3Q/AkEA4cTGbQKZKJA1SAUMUDO2pNYUrJkSHPHnWJJ6rZl304Eo21Y5McJbBALA -7Od06i5MjOTBnaq/HpaNcioes3UX8wJADQpC4+iMtWj3N1vmE36StvHB8XnWBI5L -bjD9T7yu7Qbjg7UiBG2uPGyFw0Dy81cpuCgkk2zbJjNXu7yy+cLJSwJAQ6ZxX3ri -E8Kvc07rFKfrLw1/37MqIbMhEvuneSrsS7GdTcaTGP4vqM9a6GQmVrg/gzGo8Wpe -geynyqwNsSPReQ== ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/proxy-level-test.crt b/kerberosV/src/lib/hx509/data/proxy-level-test.crt deleted file mode 100644 index f39e59dc26a..00000000000 --- a/kerberosV/src/lib/hx509/data/proxy-level-test.crt +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICUDCCAbmgAwIBAgIJAP6hx2RbgHvrMA0GCSqGSIb3DQEBBQUAMDExCzAJBgNV -BAYTAlNFMRIwEAYDVQQDDAlUZXN0IGNlcnQxDjAMBgNVBAMMBXByb3h5MB4XDTA5 -MDQyNjIwMjk0MVoXDTE5MDQyNDIwMjk0MVowQTELMAkGA1UEBhMCU0UxEjAQBgNV -BAMMCVRlc3QgY2VydDEOMAwGA1UEAwwFcHJveHkxDjAMBgNVBAMMBWNoaWxkMIGf -MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDtyAgFmdic7J7lrcvnVmANvaRVt7Fo -qYXKocxQjhb/bgzBjrFVqiUxnfsetHCMZlPZaklvicSAKZQvu30LBn9IOdNb+jPt -IFmG5V/AZUW/OAxKQxHtbtJgktgqoGbHGrb0ajPDfM44KaJv1KU0GJJ5+bqY4XOE -WOypDs+Z1iedbwIDAQABo2AwXjAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF4DAdBgNV -HQ4EFgQUMKTcmVatO/m0g9A9Gbsm3aC33a0wJQYIKwYBBQUHAQ4BAf8EFjAUAgEA -MA8GCCsGAQUFBxUABANmb28wDQYJKoZIhvcNAQEFBQADgYEAhN0C8YaE+sdFfTT4 -3UM8iU6Jx9B/2hi6fXAddf2jaXdW4RpatyMYFryX1098s9dLaFbRpy9GcF8MnsxT -XnhQELdmXmJr8wIbxXukM6dzVi5JwY3RY83TR2ZJcRk7Mblb81rHePhstfsd2vcr -AX37v1VJq9L6fJE4K6zayMjbrLM= ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/proxy-level-test.key b/kerberosV/src/lib/hx509/data/proxy-level-test.key deleted file mode 100644 index 52ca3805e5c..00000000000 --- a/kerberosV/src/lib/hx509/data/proxy-level-test.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAO3ICAWZ2JzsnuWt -y+dWYA29pFW3sWiphcqhzFCOFv9uDMGOsVWqJTGd+x60cIxmU9lqSW+JxIAplC+7 -fQsGf0g501v6M+0gWYblX8BlRb84DEpDEe1u0mCS2CqgZscatvRqM8N8zjgpom/U -pTQYknn5upjhc4RY7KkOz5nWJ51vAgMBAAECgYBRzwSTiL7yHqb8trL0wM8Daz/j -DfRH4itZ8BjvjjNzZlWVMpbotkVdsND5W3Ntmrc2kk75xRiKT8PgOE1pQa8AbL7F -uR1U5itWKbyKCOPA/mzYoh9Pw9IouB4noNFzwDWnilsviV4yshKzKQtjryHPe1ft -RuF7YdGjsweUJriNoQJBAPeP6+fiT2WO/pXiextMhACU2fkgskgi+CFD+z6r8JtP -Kysk5+2PM6iSMm1XkBYxmPbCYMJtzShXnm3X41LgUgMCQQD14sSt9s9rIcT4w01P -oUm5d3MGgLf1khBzUT9VdKqb0ZqmtTBANKmU8GP2jmSguItNRiSbSiyvL3pitoHl -o0ElAkA5XEaLzvsYi/5fGj/t/lejjtnGiJXmcvvNMWQ4jDxOsBRPhdibSY/toho/ -DYfcLJfFrRogUrKzg0G5L8mDPWijAkA1vOjFKGKuhEPbJjvYQmStbwipjCooNlL4 -EPKph4Td5xJIiuLPtXK2hU8jjH07jvmK2uCXO7/GTbcOqdp7yJEtAkEAhFuJnqk8 -7N+TMUouU6DRCioGI6kg3kGPXD2p0dZn2XoTVvluklv9s4cpH5ht7BxKw6flDPqC -ity2FjTxEJ88BQ== ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/proxy-test.crt b/kerberosV/src/lib/hx509/data/proxy-test.crt deleted file mode 100644 index 9774ed2ad52..00000000000 --- a/kerberosV/src/lib/hx509/data/proxy-test.crt +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICMDCCAZmgAwIBAgIJAMJEvwnR1+3UMA0GCSqGSIb3DQEBBQUAMCExCzAJBgNV -BAYTAlNFMRIwEAYDVQQDDAlUZXN0IGNlcnQwHhcNMDkwNDI2MjAyOTQxWhcNMTkw -NDI0MjAyOTQxWjAxMQswCQYDVQQGEwJTRTESMBAGA1UEAwwJVGVzdCBjZXJ0MQ4w -DAYDVQQDDAVwcm94eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxxP4tpnb -qS5NjzDgrujdZovK/FHnlgO2Kjha1LQpTLDPwQh4zoymu9Hi/HzYTzdBCwA+auMY -vog4EE5hIgpbXFlnSP8gFmQvE2evPBf7Y1O2oK0xEih4/7D2oFikQ+QWHfy92EUm -mDe7fjkx5ipF+qwOSLU+YuG07+ltXW7XH8UCAwEAAaNgMF4wCQYDVR0TBAIwADAL -BgNVHQ8EBAMCBeAwHQYDVR0OBBYEFM1/xN3+Jz4m3NYEctNo8Y9CnopqMCUGCCsG -AQUFBwEOAQH/BBYwFAIBADAPBggrBgEFBQcVAAQDZm9vMA0GCSqGSIb3DQEBBQUA -A4GBAB06t/tkcci9IFnSnmogi3LEare/aVkAxbfWHoFBRCZOyat/K7moDsPng6a1 -v1DZY0LqgVDL4DCyTKXxAbN9352cca5spmnNKWegCSA9UJXGCTNtIJCPA/x4PO8C -nhAAaxERYu123XhRZ8HhRM6t7uGiyLkAX3JFcWvPhAbWjNbo ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/proxy-test.key b/kerberosV/src/lib/hx509/data/proxy-test.key deleted file mode 100644 index e03895d43ee..00000000000 --- a/kerberosV/src/lib/hx509/data/proxy-test.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMcT+LaZ26kuTY8w -4K7o3WaLyvxR55YDtio4WtS0KUywz8EIeM6MprvR4vx82E83QQsAPmrjGL6IOBBO -YSIKW1xZZ0j/IBZkLxNnrzwX+2NTtqCtMRIoeP+w9qBYpEPkFh38vdhFJpg3u345 -MeYqRfqsDki1PmLhtO/pbV1u1x/FAgMBAAECgYBQoyRRQo0ZQComYBQChUx45xL3 -lW2K9EHrZBxWoAtChzP/6qCUeaBn36Jjx2YO4EC2ZgjiXs59Dsw2vqjVkwBh9ujA -F14krPR0OpCnj3mFyz0CqbZUjB8tvKtGe5Bm5JkwITDIXO+mXacdQ/Mpa2cVDqk6 -D4XxuCU7V8Ft14stQQJBAONXnrKlLa3UmdOdDArj0ZQLQdzWKN5bW+tzRcV3kVyh -xc7yPHlcPtp+lK9CX+nZkjCj/5e2C6fs+dKfEZPOiO0CQQDgLEI0RbbdCGVp0soK -HIOQsngSwGrvKN3FFDqMyC/eEqW6t/p64VOzUnKBvAOh/jI6vgE0heEXHNl5/ivU -T885AkBhATYaDBkdnyW0AcLtsp/uh48m58qwdlMWeC1BQO+pku2QjBP5xL6dBH30 -+mFqqweR8ahR17/Je3htwqoBY5NRAkEAimjJN50TmsVkWEJdnICeeui2Wl2TqLaC -tvwWanXvmB3LVc3iSZx2IXH2YUPEunBIcxx9ggBnSe32GOxmA2CDgQJBAJqJ+Ucx -Oc6FYER8gb+yg8eV0IsSrshS2Zq1+vJV6Xnbm6mmkANYIydknqm52hef4hW0al8A -46U7qh5s6EESzkc= ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/proxy10-child-child-test.crt b/kerberosV/src/lib/hx509/data/proxy10-child-child-test.crt deleted file mode 100644 index 18e37d788d7..00000000000 --- a/kerberosV/src/lib/hx509/data/proxy10-child-child-test.crt +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICdDCCAd2gAwIBAgIJANtSso4F/YPoMA0GCSqGSIb3DQEBBQUAMEMxCzAJBgNV -BAYTAlNFMRIwEAYDVQQDDAlUZXN0IGNlcnQxEDAOBgNVBAMMB3Byb3h5MTAxDjAM -BgNVBAMMBWNoaWxkMB4XDTA5MDQyNjIwMjk0MVoXDTE5MDQyNDIwMjk0MVowUzEL -MAkGA1UEBhMCU0UxEjAQBgNVBAMMCVRlc3QgY2VydDEQMA4GA1UEAwwHcHJveHkx -MDEOMAwGA1UEAwwFY2hpbGQxDjAMBgNVBAMMBWNoaWxkMIGfMA0GCSqGSIb3DQEB -AQUAA4GNADCBiQKBgQDcgI+5RZZeSRqK8ydQYyVqk2DGI8dLUkWE68TthxWg5Xjp -jD9tVt8y3kcQWXIWqeNjmKS6zQHDro/d8oS6oHVMyFakxq4uQD5DvaTeLFjmK/4i -IrVlJS+T8kUMNoqGgNYY7BppcUU0Nav/whldGlhtEEWEEu4EZ+4UbCj5QCHZwwID -AQABo2AwXjAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF4DAdBgNVHQ4EFgQUrbpGGsqI -EM708LMvCSGULkOS0CowJQYIKwYBBQUHAQ4BAf8EFjAUAgEKMA8GCCsGAQUFBxUA -BANmb28wDQYJKoZIhvcNAQEFBQADgYEAFk/qvmcnH5QqMLxEtUY9O+2A1ag6iJEs -18sIp87PRLP06OmtWPkijS+7c7Dbs5ttwAWW8tZ9+f+yyXE2ctwrc2ap3TicrTB8 -yI2Fgf+ytxgpZharMjeUi9E10K/xKxU3hsrD7ug3iHp15HKyuP8uFmBP6gcsVsgj -tsIaPKR43xU= ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/proxy10-child-child-test.key b/kerberosV/src/lib/hx509/data/proxy10-child-child-test.key deleted file mode 100644 index 18e54b0395b..00000000000 --- a/kerberosV/src/lib/hx509/data/proxy10-child-child-test.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANyAj7lFll5JGorz -J1BjJWqTYMYjx0tSRYTrxO2HFaDleOmMP21W3zLeRxBZchap42OYpLrNAcOuj93y -hLqgdUzIVqTGri5APkO9pN4sWOYr/iIitWUlL5PyRQw2ioaA1hjsGmlxRTQ1q//C -GV0aWG0QRYQS7gRn7hRsKPlAIdnDAgMBAAECgYAgEiLVU6W3OPK/WvZQ3trGUYE1 -0GZgMisiVhhiY89lg3q+nUNsZ8I259V2L0xEt5j3F3B+KusixvTt1yQu8L+eki1i -moA5YLtiqcDVHkSX44/f8+yN0QBqmtJDg3WU8mki+Nf4fKEAPvdmmgRhnfFE8hqM -x6IRyL7B+7bmeUKeIQJBAPXw5KquGiwLjoZ+tHQhWN/3SZEBfB2uPFDAXsMgWnUS -pShjnECQDaj9ogUYoWeJacFj8/Dyc01P+LyiAtmfLdcCQQDlhVAsQNxMXLpy5HKU -ZcuZz4il/jQUViq/JRyXlqLccHsfs1P+7b3O+TN7LVNS59vKprkBCIcJoSZ4LaGi -v331AkEAh+KrVSqQx1kzTFhhd/Cc3FITUY0SeIu2Q5+mPAV6NUkx+5jd0kZFZeON -S2eKdlxUFEgXlj8/Oa4/7mlNTdRHTQJBANZ41IoFsdXJcJCb2FXDKZX40AAMoi2+ -twMWcrlUEatbkDH3KK43Cf617t1TZWE7N68OTCIjDcx5wbDbMwcZWWECQAQhJrzq -pdWb5EVvYRP88zJ1vJCISIGWjxQRsde9w0VX8Uu3kyT1EHEuW+JScoNI0avaV1DK -yIG37HCRGTBiNqI= ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/proxy10-child-test.crt b/kerberosV/src/lib/hx509/data/proxy10-child-test.crt deleted file mode 100644 index 600bc357c48..00000000000 --- a/kerberosV/src/lib/hx509/data/proxy10-child-test.crt +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICVDCCAb2gAwIBAgIJAONwGxXRj9jiMA0GCSqGSIb3DQEBBQUAMDMxCzAJBgNV -BAYTAlNFMRIwEAYDVQQDDAlUZXN0IGNlcnQxEDAOBgNVBAMMB3Byb3h5MTAwHhcN -MDkwNDI2MjAyOTQxWhcNMTkwNDI0MjAyOTQxWjBDMQswCQYDVQQGEwJTRTESMBAG -A1UEAwwJVGVzdCBjZXJ0MRAwDgYDVQQDDAdwcm94eTEwMQ4wDAYDVQQDDAVjaGls -ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAr982Voxa1DhcIIa22u5oO497 -L2FF0r91yZh2IjY02XSGbLiyFV6OwKULRli587BMryq8G0BBKAmXVvZszOLOe9xV -eipWkyFxiF2s6ERYJ7muHHXxIQyGgRMxhsDuiqiGc51TZ+2H7A2CIHbzUOdom9qf -UwXqyd8iD9N/a/Zy3JcCAwEAAaNgMF4wCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAw -HQYDVR0OBBYEFBBhzv8RTjHAfZxnKZ7bRv1K9MxSMCUGCCsGAQUFBwEOAQH/BBYw -FAIBCjAPBggrBgEFBQcVAAQDZm9vMA0GCSqGSIb3DQEBBQUAA4GBALT+aUqBtZDM -W7/F5I9QgZL9+zebGqzjxSTYpIT6iYRop/oA4ZFc6k0UjR5A8A+/u9mISwB9P6R+ -GtQ8CBgcqLgsLsTEUiz/N2XtC+I++ZSkR33b6ZbNefq9vSib+OzQjdqw9vshK9zX -bajUTjXEGuJrGMeqvv8iwl4SIpCT5f3C ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/proxy10-child-test.key b/kerberosV/src/lib/hx509/data/proxy10-child-test.key deleted file mode 100644 index 12f49009eb1..00000000000 --- a/kerberosV/src/lib/hx509/data/proxy10-child-test.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAK/fNlaMWtQ4XCCG -ttruaDuPey9hRdK/dcmYdiI2NNl0hmy4shVejsClC0ZYufOwTK8qvBtAQSgJl1b2 -bMziznvcVXoqVpMhcYhdrOhEWCe5rhx18SEMhoETMYbA7oqohnOdU2fth+wNgiB2 -81DnaJvan1MF6snfIg/Tf2v2ctyXAgMBAAECgYBbnR/2J7js0csT2nkIRKahWBWo -UbiIltmpwTTQj4IqQKwBmJiTzyT3r0HXTELZcV4Q5WcFnwwR6iUe1NFKTV+XgrcK -OMBY43+6InTvsXAKxLH6MZ7tfKWA13forzs90CmvYxTHtEFYS2MnzZ7FFqBk59lA -gMrcDVKYiOLenjKm6QJBANuEuoq/ZiNC9bJ3JjVyH/yHYqAwi6g8B8kQufecAqIu -eQBpx2vsry8V6LpTfIsle8dWFKauiE4s5VyBMn7l2kMCQQDNGZHFI9j8SaGVGmbF -5nDtBnWoyAWCQ3VzTj+uaO/ybkTFFvVkVLU1+3j2cWRVYdnoXK9uL2eH9E35radx -d6EdAkEAyEI2l1ryh5qPYEb4MWuyqIKtw6tlzI0vIQtETBIkCOZSdsEJL3jVfCQF -ku2Uwa/pUrlBz6mLKZ4lg5VNhpyT1wJAEfXaQQQ5nSYpgzATreLXIrp9FTGm4dhc -caN5iiFgWb90QDoZdRbB459I4XPekGeIOIPdTO3TyCEJrwKY9iO+tQJAGdLTwcsz -o1Ic+rVL8IfXPRCwtvi3e/xVgGxDHhV498/ofY3xgVmOkSRdDjAz2FgZeaotnKj6 -d9og/gBzfNdK2g== ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/proxy10-test.crt b/kerberosV/src/lib/hx509/data/proxy10-test.crt deleted file mode 100644 index 0d9fde88c5b..00000000000 --- a/kerberosV/src/lib/hx509/data/proxy10-test.crt +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICMjCCAZugAwIBAgIJAMJEvwnR1+3WMA0GCSqGSIb3DQEBBQUAMCExCzAJBgNV -BAYTAlNFMRIwEAYDVQQDDAlUZXN0IGNlcnQwHhcNMDkwNDI2MjAyOTQxWhcNMTkw -NDI0MjAyOTQxWjAzMQswCQYDVQQGEwJTRTESMBAGA1UEAwwJVGVzdCBjZXJ0MRAw -DgYDVQQDDAdwcm94eTEwMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAwvFE -RvMpm6Oje46mf4ta4or7w/cUcJ5wrn9f1plR6/ETOiCGKf4i9/9Yj8vr0MFLSNcb -LpipSq/JDoiQJQuCvfwGe/g/Im0byhcWmqcvmUQJ+tp/qBsrZQqKMAZxBE1rzvBs -pWqQCFHDOebLzcl1zmTDcrDgwsO0j0EOFRiIkwIDAQABo2AwXjAJBgNVHRMEAjAA -MAsGA1UdDwQEAwIF4DAdBgNVHQ4EFgQU5aYR98LOKtpDlBTC9W4axWXpg9EwJQYI -KwYBBQUHAQ4BAf8EFjAUAgEKMA8GCCsGAQUFBxUABANmb28wDQYJKoZIhvcNAQEF -BQADgYEALsp0p4UR2YqO3HYNEkPFluconjaKOcj4X1y1K0dnQneBfrKJJ812h/Dh -bs/Kc/SbKWRD8wkNF13WURZiH3emkYgvdB3QIFaWb52gK4n8T2L5PkcEJIv3hFkl -5TyqSgsy4SlaQ0KnBx+E+l9fDXUBYhpxLEVpaav5u3RLNJhG0jY= ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/proxy10-test.key b/kerberosV/src/lib/hx509/data/proxy10-test.key deleted file mode 100644 index 47b4ce2309d..00000000000 --- a/kerberosV/src/lib/hx509/data/proxy10-test.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAMDC8URG8ymbo6N7 -jqZ/i1riivvD9xRwnnCuf1/WmVHr8RM6IIYp/iL3/1iPy+vQwUtI1xsumKlKr8kO -iJAlC4K9/AZ7+D8ibRvKFxaapy+ZRAn62n+oGytlCoowBnEETWvO8GylapAIUcM5 -5svNyXXOZMNysODCw7SPQQ4VGIiTAgMBAAECgYBTMM7nZKd1AZKx75U1Dj6aTsMk -vQJZc/EtOGIIfplU3bsBTUjUHjNr7BPrqMOdVk7Vqu4K8SU5it4qq3cMnrBETxTA -k3oLwIM5U/MLF8PCxFFfjARA3iqp5ldCBRbFwBi3iBa3+dxRQgx0TYdhg32LPE4a -7sAz+GGSHspa8mPR4QJBAP9qA1LSsSi/hargSNaNnCEy/4YW7MIkbJwX3A0INGT5 -cEUhSG+w0UhnkAf0Hi8/Gh19EsvDEOY/Nu6ucSmmnK8CQQDBNCNO2Qae7GJSOPLQ -T6RpcFThH/7D09gCnF25V5An3jawT2BNue8iHxKztOwneSw16D1xSDm3nIs8m8sJ -gXNdAkBs9pY6ZEZOIv7seki4t6svAqm+U9Nns9Bd+1PWf3SSy1OZOmzDsYRnRj9N -FVk3QM1sXSqCoVJ5V+ighO0kHr9jAkARbnvVDF29jwRb+MlnpBfob3spCLL6xi1S -JvuJ0m2uOy1iAPdma+U4hecxEZzQ/uzPPFH225Zhi51AbaoHBIf9AkBHxYNY9TPW -nWpEcH7Mq+5KdAgXhXb0uWQbWoK7m/wm7OY8KQMc2Uo1chatb0qxlmUxZvQXva+w -QxahbNp1Uyun ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/revoke.crt b/kerberosV/src/lib/hx509/data/revoke.crt deleted file mode 100644 index 2c2afc2975e..00000000000 --- a/kerberosV/src/lib/hx509/data/revoke.crt +++ /dev/null @@ -1,53 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 3 (0x3) - Signature Algorithm: sha1WithRSAEncryption - Issuer: CN=hx509 Test Root CA, C=SE - Validity - Not Before: Apr 26 20:29:40 2009 GMT - Not After : Apr 24 20:29:40 2019 GMT - Subject: C=SE, CN=Revoke cert - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:a6:5f:11:30:35:3a:5f:ed:c2:06:ac:f4:14:27: - c1:db:ae:79:f0:b6:9e:0a:83:e7:82:6a:69:92:a6: - 85:9c:5d:e4:8a:0e:6b:32:99:4d:22:b9:ea:a6:8c: - 84:9e:62:f0:a3:f1:d2:b0:ef:41:ce:93:ce:d9:49: - 43:be:0d:a7:ea:cd:37:bb:ba:4d:ee:75:ed:86:74: - 8a:e2:08:77:2b:60:91:30:b2:96:57:4e:42:d1:5e: - 6f:0d:f5:b2:d6:98:ed:3f:ab:a0:64:33:8b:52:ad: - b5:7a:4a:fd:70:dc:d8:8b:e1:47:0c:8d:8f:93:5c: - 9c:35:3f:cb:21:d7:5c:6c:b3 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment - X509v3 Subject Key Identifier: - AC:ED:61:9B:1A:7D:7D:27:D4:E3:B9:3D:79:9C:F1:96:10:B3:46:45 - Signature Algorithm: sha1WithRSAEncryption - 71:4d:fc:63:69:bb:b5:cf:0c:50:dc:de:55:ef:9b:90:07:42: - 98:3e:80:36:e4:94:aa:d5:f3:0b:56:38:12:1d:3d:e6:dc:a3: - 8b:bf:8a:f6:82:d6:25:8b:9c:88:ce:38:2a:ee:e1:2f:2e:8f: - c7:74:c6:42:5f:68:99:a5:48:e7:08:5a:bd:3c:fa:db:14:5a: - 39:cc:dc:50:c5:ba:05:97:c9:66:9e:39:d8:ce:17:a6:ec:6b: - bd:c9:c9:a8:d1:6d:dc:68:c0:79:20:6e:df:04:0a:14:37:06: - 7b:e8:54:62:60:0c:9f:d5:73:55:b7:d0:4f:cb:e0:14:75:65: - b7:d1 ------BEGIN CERTIFICATE----- -MIIB/DCCAWWgAwIBAgIBAzANBgkqhkiG9w0BAQUFADAqMRswGQYDVQQDDBJoeDUw -OSBUZXN0IFJvb3QgQ0ExCzAJBgNVBAYTAlNFMB4XDTA5MDQyNjIwMjk0MFoXDTE5 -MDQyNDIwMjk0MFowIzELMAkGA1UEBhMCU0UxFDASBgNVBAMMC1Jldm9rZSBjZXJ0 -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCmXxEwNTpf7cIGrPQUJ8Hbrnnw -tp4Kg+eCammSpoWcXeSKDmsymU0iueqmjISeYvCj8dKw70HOk87ZSUO+DafqzTe7 -uk3ude2GdIriCHcrYJEwspZXTkLRXm8N9bLWmO0/q6BkM4tSrbV6Sv1w3NiL4UcM -jY+TXJw1P8sh11xsswIDAQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF4DAd -BgNVHQ4EFgQUrO1hmxp9fSfU47k9eZzxlhCzRkUwDQYJKoZIhvcNAQEFBQADgYEA -cU38Y2m7tc8MUNzeVe+bkAdCmD6ANuSUqtXzC1Y4Eh095tyji7+K9oLWJYuciM44 -Ku7hLy6Px3TGQl9omaVI5whavTz62xRaOczcUMW6BZfJZp452M4XpuxrvcnJqNFt -3GjAeSBu3wQKFDcGe+hUYmAMn9VzVbfQT8vgFHVlt9E= ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/revoke.key b/kerberosV/src/lib/hx509/data/revoke.key deleted file mode 100644 index 0fe2e18b2fb..00000000000 --- a/kerberosV/src/lib/hx509/data/revoke.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKZfETA1Ol/twgas -9BQnwduuefC2ngqD54JqaZKmhZxd5IoOazKZTSK56qaMhJ5i8KPx0rDvQc6TztlJ -Q74Np+rNN7u6Te517YZ0iuIIdytgkTCylldOQtFebw31staY7T+roGQzi1KttXpK -/XDc2IvhRwyNj5NcnDU/yyHXXGyzAgMBAAECgYBeDVZRM3YZrvZGAdZF4qfkAgGr -hAFaHnFtN60RG5Ri7m15YmdVhnal0AaIOt3qEDLL67RZFBjWqJaCHbnvIhcva5Gw -OLEQPsvvTBvRq5O7hTwij2f0hTGu7gOHiiW3YCPxvma1qHNOXKRDh5Gi2eG0gKgo -fUC2pqvPomNaqZERqQJBANFQXr+KQ9Hcv1cp2+FNOXg8x0sC20+Svwaxs+T4gSr2 -AaiWIJgcdYpxkNPke+IGPZ8Bip6jgRpRK1gRLhx7qw0CQQDLercoA7FiwpRMzo1j -Yvh4188uhodvuSg6Yj/meQ2zQvsjAipZ0XJgEuZZnoifxkl2A6K+tFLwSq1hy18K -C4a/AkEAnwfCRSMG7i8bDV2XWvGyhWEgRiSwfh/PlYV0WbZZZUut7OnLb+bHg11P -nT5OxWbacLHaITe3AkjDdtDuyONJDQJAN4RW3rMLPe/q+H3Os9Q4CPiQzZfk8gWp -xSwzVRWoOEXJMYcQuQrdUvs1IDSSAE3gkzNwvumCS4+EeM89MgdtDwJAN7ucdA1c -m6MiJgTVxTeva7cgw6PCF4Ph9AGRAB+m/qkg8I8W7G0tXxHVUAXfKdfeirigsrnT -LKLsQFEQrhuA5A== ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/secp160r1TestCA.cert.pem b/kerberosV/src/lib/hx509/data/secp160r1TestCA.cert.pem deleted file mode 100644 index 2d30fab2c60..00000000000 --- a/kerberosV/src/lib/hx509/data/secp160r1TestCA.cert.pem +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBxjCCAYagAwIBAgIJAKjMYS/6EOLdMAkGByqGSM49BAEwNjELMAkGA1UEBhMC -U0UxEDAOBgNVBAoTB0hlaW1kYWwxFTATBgNVBAMTDENBIHNlY3AxNjByMTAeFw0w -OTAyMTQxNzUwMDRaFw0yMDAxMjgxNzUwMDRaMDYxCzAJBgNVBAYTAlNFMRAwDgYD -VQQKEwdIZWltZGFsMRUwEwYDVQQDEwxDQSBzZWNwMTYwcjEwPjAQBgcqhkjOPQIB -BgUrgQQACAMqAASMHokF13aCVrlhMSr9Vgofj7loM2a7ZrU3h8/j1n/cO24ceyN/ -DpsOo4GYMIGVMB0GA1UdDgQWBBS58EWwgNdBwkYVhUSNzwIehHhEDzBmBgNVHSME -XzBdgBS58EWwgNdBwkYVhUSNzwIehHhED6E6pDgwNjELMAkGA1UEBhMCU0UxEDAO -BgNVBAoTB0hlaW1kYWwxFTATBgNVBAMTDENBIHNlY3AxNjByMYIJAKjMYS/6EOLd -MAwGA1UdEwQFMAMBAf8wCQYHKoZIzj0EAQMvADAsAhRZPKbqMYDATJasRcXQfEh5 -8oHCywIUGZ0h6FqSvPgpkZ7hoU+ZEFJ/D88= ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/secp160r1TestCA.key.pem b/kerberosV/src/lib/hx509/data/secp160r1TestCA.key.pem deleted file mode 100644 index f0ce773cf8a..00000000000 --- a/kerberosV/src/lib/hx509/data/secp160r1TestCA.key.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MFACAQEEFHegiSlX0311KSBjNrbzq6HrKjkYoAcGBSuBBAAIoSwDKgAEjB6JBdd2 -gla5YTEq/VYKH4+5aDNmu2a1N4fP49Z/3DtuHHsjfw6bDg== ------END EC PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/secp160r1TestCA.pem b/kerberosV/src/lib/hx509/data/secp160r1TestCA.pem deleted file mode 100644 index a6f068d5476..00000000000 --- a/kerberosV/src/lib/hx509/data/secp160r1TestCA.pem +++ /dev/null @@ -1,18 +0,0 @@ -issuer= /C=SE/O=Heimdal/CN=CA secp160r1 -subject= /C=SE/O=Heimdal/CN=CA secp160r1 ------BEGIN CERTIFICATE----- -MIIBxjCCAYagAwIBAgIJAKjMYS/6EOLdMAkGByqGSM49BAEwNjELMAkGA1UEBhMC -U0UxEDAOBgNVBAoTB0hlaW1kYWwxFTATBgNVBAMTDENBIHNlY3AxNjByMTAeFw0w -OTAyMTQxNzUwMDRaFw0yMDAxMjgxNzUwMDRaMDYxCzAJBgNVBAYTAlNFMRAwDgYD -VQQKEwdIZWltZGFsMRUwEwYDVQQDEwxDQSBzZWNwMTYwcjEwPjAQBgcqhkjOPQIB -BgUrgQQACAMqAASMHokF13aCVrlhMSr9Vgofj7loM2a7ZrU3h8/j1n/cO24ceyN/ -DpsOo4GYMIGVMB0GA1UdDgQWBBS58EWwgNdBwkYVhUSNzwIehHhEDzBmBgNVHSME -XzBdgBS58EWwgNdBwkYVhUSNzwIehHhED6E6pDgwNjELMAkGA1UEBhMCU0UxEDAO -BgNVBAoTB0hlaW1kYWwxFTATBgNVBAMTDENBIHNlY3AxNjByMYIJAKjMYS/6EOLd -MAwGA1UdEwQFMAMBAf8wCQYHKoZIzj0EAQMvADAsAhRZPKbqMYDATJasRcXQfEh5 -8oHCywIUGZ0h6FqSvPgpkZ7hoU+ZEFJ/D88= ------END CERTIFICATE----- ------BEGIN EC PRIVATE KEY----- -MFACAQEEFHegiSlX0311KSBjNrbzq6HrKjkYoAcGBSuBBAAIoSwDKgAEjB6JBdd2 -gla5YTEq/VYKH4+5aDNmu2a1N4fP49Z/3DtuHHsjfw6bDg== ------END EC PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/secp160r2TestClient.cert.pem b/kerberosV/src/lib/hx509/data/secp160r2TestClient.cert.pem deleted file mode 100644 index 716395bf8e1..00000000000 --- a/kerberosV/src/lib/hx509/data/secp160r2TestClient.cert.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBIDCB4AIJAN1XzNknE3lDMAkGByqGSM49BAEwNjELMAkGA1UEBhMCU0UxEDAO -BgNVBAoTB0hlaW1kYWwxFTATBgNVBAMTDENBIHNlY3AxNjByMTAeFw0wOTAyMTQx -NzUwMDRaFw0yMDAxMjgxNzUwMDRaMDAxCzAJBgNVBAYTAlNFMRAwDgYDVQQKEwdI -ZWltZGFsMQ8wDQYDVQQDEwZDbGllbnQwPjAQBgcqhkjOPQIBBgUrgQQAHgMqAASA -oVzj3A0W1FaSmc0NwTRdX4A8eCbDb6pf07vMpUcOqvdXVGwWN3HhMAkGByqGSM49 -BAEDMAAwLQIURJ9Jdesm0rqwpOAn8K23GdWlCkYCFQDmJtqiOLs4jjUUP6T7O17M -Iwyrvg== ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/secp160r2TestClient.key.pem b/kerberosV/src/lib/hx509/data/secp160r2TestClient.key.pem deleted file mode 100644 index e5a2fef7941..00000000000 --- a/kerberosV/src/lib/hx509/data/secp160r2TestClient.key.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MFACAQEEFNz0QJPbDlTBMSOfUoxNSzOOpRKyoAcGBSuBBAAeoSwDKgAEgKFc49wN -FtRWkpnNDcE0XV+APHgmw2+qX9O7zKVHDqr3V1RsFjdx4Q== ------END EC PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/secp160r2TestClient.pem b/kerberosV/src/lib/hx509/data/secp160r2TestClient.pem deleted file mode 100644 index ca4bb331d76..00000000000 --- a/kerberosV/src/lib/hx509/data/secp160r2TestClient.pem +++ /dev/null @@ -1,15 +0,0 @@ -issuer= /C=SE/O=Heimdal/CN=CA secp160r1 -subject= /C=SE/O=Heimdal/CN=Client ------BEGIN CERTIFICATE----- -MIIBIDCB4AIJAN1XzNknE3lDMAkGByqGSM49BAEwNjELMAkGA1UEBhMCU0UxEDAO -BgNVBAoTB0hlaW1kYWwxFTATBgNVBAMTDENBIHNlY3AxNjByMTAeFw0wOTAyMTQx -NzUwMDRaFw0yMDAxMjgxNzUwMDRaMDAxCzAJBgNVBAYTAlNFMRAwDgYDVQQKEwdI -ZWltZGFsMQ8wDQYDVQQDEwZDbGllbnQwPjAQBgcqhkjOPQIBBgUrgQQAHgMqAASA -oVzj3A0W1FaSmc0NwTRdX4A8eCbDb6pf07vMpUcOqvdXVGwWN3HhMAkGByqGSM49 -BAEDMAAwLQIURJ9Jdesm0rqwpOAn8K23GdWlCkYCFQDmJtqiOLs4jjUUP6T7O17M -Iwyrvg== ------END CERTIFICATE----- ------BEGIN EC PRIVATE KEY----- -MFACAQEEFNz0QJPbDlTBMSOfUoxNSzOOpRKyoAcGBSuBBAAeoSwDKgAEgKFc49wN -FtRWkpnNDcE0XV+APHgmw2+qX9O7zKVHDqr3V1RsFjdx4Q== ------END EC PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/secp160r2TestServer.cert.pem b/kerberosV/src/lib/hx509/data/secp160r2TestServer.cert.pem deleted file mode 100644 index 6b56036583c..00000000000 --- a/kerberosV/src/lib/hx509/data/secp160r2TestServer.cert.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBIDCB4AIJAN1XzNknE3lCMAkGByqGSM49BAEwNjELMAkGA1UEBhMCU0UxEDAO -BgNVBAoTB0hlaW1kYWwxFTATBgNVBAMTDENBIHNlY3AxNjByMTAeFw0wOTAyMTQx -NzUwMDRaFw0yMDAxMjgxNzUwMDRaMDAxCzAJBgNVBAYTAlNFMRAwDgYDVQQKEwdI -ZWltZGFsMQ8wDQYDVQQDEwZTZXJ2ZXIwPjAQBgcqhkjOPQIBBgUrgQQAHgMqAARA -IUAwnwABnZAs378hcEgnk8efxE35RF6B+MmxSq1Twhp2C1ophD6yMAkGByqGSM49 -BAEDMAAwLQIVAO0hl59KWXRMBaJ2iKsiu/j73/bPAhRfsTT6SIBL5+3gjLhl7SqK -1kTMQw== ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/secp160r2TestServer.key.pem b/kerberosV/src/lib/hx509/data/secp160r2TestServer.key.pem deleted file mode 100644 index a903d0f7665..00000000000 --- a/kerberosV/src/lib/hx509/data/secp160r2TestServer.key.pem +++ /dev/null @@ -1,4 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MFACAQEEFBR1r2nPL1Ln1U5Nk1kW9XtNEkk1oAcGBSuBBAAeoSwDKgAEQCFAMJ8A -AZ2QLN+/IXBIJ5PHn8RN+URegfjJsUqtU8IadgtaKYQ+sg== ------END EC PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/secp160r2TestServer.pem b/kerberosV/src/lib/hx509/data/secp160r2TestServer.pem deleted file mode 100644 index 329d871534c..00000000000 --- a/kerberosV/src/lib/hx509/data/secp160r2TestServer.pem +++ /dev/null @@ -1,15 +0,0 @@ -issuer= /C=SE/O=Heimdal/CN=CA secp160r1 -subject= /C=SE/O=Heimdal/CN=Server ------BEGIN CERTIFICATE----- -MIIBIDCB4AIJAN1XzNknE3lCMAkGByqGSM49BAEwNjELMAkGA1UEBhMCU0UxEDAO -BgNVBAoTB0hlaW1kYWwxFTATBgNVBAMTDENBIHNlY3AxNjByMTAeFw0wOTAyMTQx -NzUwMDRaFw0yMDAxMjgxNzUwMDRaMDAxCzAJBgNVBAYTAlNFMRAwDgYDVQQKEwdI -ZWltZGFsMQ8wDQYDVQQDEwZTZXJ2ZXIwPjAQBgcqhkjOPQIBBgUrgQQAHgMqAARA -IUAwnwABnZAs378hcEgnk8efxE35RF6B+MmxSq1Twhp2C1ophD6yMAkGByqGSM49 -BAEDMAAwLQIVAO0hl59KWXRMBaJ2iKsiu/j73/bPAhRfsTT6SIBL5+3gjLhl7SqK -1kTMQw== ------END CERTIFICATE----- ------BEGIN EC PRIVATE KEY----- -MFACAQEEFBR1r2nPL1Ln1U5Nk1kW9XtNEkk1oAcGBSuBBAAeoSwDKgAEQCFAMJ8A -AZ2QLN+/IXBIJ5PHn8RN+URegfjJsUqtU8IadgtaKYQ+sg== ------END EC PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/sf-class2-root.pem b/kerberosV/src/lib/hx509/data/sf-class2-root.pem deleted file mode 100644 index d552e65dddb..00000000000 --- a/kerberosV/src/lib/hx509/data/sf-class2-root.pem +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl -MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp -U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw -NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE -ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp -ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3 -DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf -8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN -+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0 -X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa -K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA -1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G -A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR -zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0 -YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD -bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w -DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3 -L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D -eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl -xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp -VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY -WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q= ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/static-file b/kerberosV/src/lib/hx509/data/static-file deleted file mode 100644 index 2216857ccca..00000000000 --- a/kerberosV/src/lib/hx509/data/static-file +++ /dev/null @@ -1,84 +0,0 @@ -This is a static file don't change the content, it is used in the test - -#!/bin/sh -# -# Copyright (c) 2005 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. -# -# - -srcdir="@srcdir@" - -echo "try printing" -./hxtool print \ - --pass=PASS:foobar \ - PKCS12:$srcdir/data/test.p12 || exit 1 - -echo "make sure entry is found (friendlyname)" -./hxtool query \ - --pass=PASS:foobar \ - --friendlyname=friendlyname-test \ - PKCS12:$srcdir/data/test.p12 || exit 1 - -echo "make sure entry is not found (friendlyname)" -./hxtool query \ - --pass=PASS:foobar \ - --friendlyname=friendlyname-test-not \ - PKCS12:$srcdir/data/test.p12 && exit 1 - -echo "check for ca cert (friendlyname)" -./hxtool query \ - --pass=PASS:foobar \ - --friendlyname=ca \ - PKCS12:$srcdir/data/test.p12 || exit 1 - -echo "make sure entry is not found (friendlyname)" -./hxtool query \ - --pass=PASS:foobar \ - --friendlyname=friendlyname-test \ - PKCS12:$srcdir/data/sub-cert.p12 && exit 1 - -echo "make sure entry is found (friendlyname|private key)" -./hxtool query \ - --pass=PASS:foobar \ - --friendlyname=friendlyname-test \ - --private-key \ - PKCS12:$srcdir/data/test.p12 || exit 1 - -echo "make sure entry is not found (friendlyname|private key)" -./hxtool query \ - --pass=PASS:foobar \ - --friendlyname=ca \ - --private-key \ - PKCS12:$srcdir/data/test.p12 && exit 1 - -exit 0 - diff --git a/kerberosV/src/lib/hx509/data/sub-ca.crt b/kerberosV/src/lib/hx509/data/sub-ca.crt deleted file mode 100644 index c63f59d3df4..00000000000 --- a/kerberosV/src/lib/hx509/data/sub-ca.crt +++ /dev/null @@ -1,60 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 10 (0xa) - Signature Algorithm: sha1WithRSAEncryption - Issuer: CN=hx509 Test Root CA, C=SE - Validity - Not Before: Apr 26 20:29:41 2009 GMT - Not After : Apr 24 20:29:41 2019 GMT - Subject: C=SE, CN=Sub CA - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:bd:3d:63:78:3e:31:85:d9:1d:b7:f8:04:02:58: - 53:12:de:1a:c6:95:9b:51:29:7b:c7:62:76:b9:a6: - 63:56:3d:47:c8:2f:bb:6b:9b:7d:d8:f1:a9:3c:0b: - 61:66:fd:d1:e7:d7:6d:74:a0:30:9c:a0:7d:80:41: - 04:1a:86:61:b4:12:79:9d:9d:b0:3b:fb:0a:4c:69: - 8f:06:33:07:85:0e:73:cd:01:fa:96:f9:6b:20:18: - d8:b1:06:03:21:b3:71:7a:ed:43:fd:29:d5:23:fa: - cc:cf:43:fc:83:4a:cb:8b:e6:98:db:b3:49:f1:ba: - 2a:97:72:b7:44:83:d6:e7:5f - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: - 9B:B5:FE:90:D3:72:49:B1:98:9A:67:76:A3:C9:22:15:F1:5A:AE:11 - X509v3 Authority Key Identifier: - keyid:6E:48:13:DC:BF:8B:95:4C:13:F3:1F:97:30:DD:27:96:59:9B:0E:68 - DirName:/CN=hx509 Test Root CA/C=SE - serial:99:32:DE:61:0E:40:19:8A - - X509v3 Basic Constraints: - CA:TRUE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment, Certificate Sign, CRL Sign - Signature Algorithm: sha1WithRSAEncryption - 25:cb:bf:77:d2:16:0f:a5:ac:4e:42:17:e1:81:03:36:1e:dc: - 33:1a:49:ba:1f:40:5b:5b:80:9c:20:b7:13:3b:f4:4f:79:c1: - b4:6e:14:d5:fd:84:59:58:d5:db:a6:6d:5b:6f:e6:d0:58:d6: - 8e:41:2c:ef:e9:c8:b7:ca:6f:cb:11:6e:13:45:f7:73:6e:91: - 71:22:14:18:b9:b4:ad:3b:c4:e9:6f:99:6d:59:59:52:6f:c8: - 65:67:f1:e4:d9:6f:0b:a3:3c:9f:ac:01:b7:1a:9b:97:74:92: - 7b:ea:05:a0:5d:09:77:fb:79:17:c2:35:2f:f9:09:fc:10:b3: - e0:3e ------BEGIN CERTIFICATE----- -MIICWDCCAcGgAwIBAgIBCjANBgkqhkiG9w0BAQUFADAqMRswGQYDVQQDDBJoeDUw -OSBUZXN0IFJvb3QgQ0ExCzAJBgNVBAYTAlNFMB4XDTA5MDQyNjIwMjk0MVoXDTE5 -MDQyNDIwMjk0MVowHjELMAkGA1UEBhMCU0UxDzANBgNVBAMMBlN1YiBDQTCBnzAN -BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvT1jeD4xhdkdt/gEAlhTEt4axpWbUSl7 -x2J2uaZjVj1HyC+7a5t92PGpPAthZv3R59dtdKAwnKB9gEEEGoZhtBJ5nZ2wO/sK -TGmPBjMHhQ5zzQH6lvlrIBjYsQYDIbNxeu1D/SnVI/rMz0P8g0rLi+aY27NJ8boq -l3K3RIPW518CAwEAAaOBmTCBljAdBgNVHQ4EFgQUm7X+kNNySbGYmmd2o8kiFfFa -rhEwWgYDVR0jBFMwUYAUbkgT3L+LlUwT8x+XMN0nllmbDmihLqQsMCoxGzAZBgNV -BAMMEmh4NTA5IFRlc3QgUm9vdCBDQTELMAkGA1UEBhMCU0WCCQCZMt5hDkAZijAM -BgNVHRMEBTADAQH/MAsGA1UdDwQEAwIB5jANBgkqhkiG9w0BAQUFAAOBgQAly793 -0hYPpaxOQhfhgQM2HtwzGkm6H0BbW4CcILcTO/RPecG0bhTV/YRZWNXbpm1bb+bQ -WNaOQSzv6ci3ym/LEW4TRfdzbpFxIhQYubStO8Tpb5ltWVlSb8hlZ/Hk2W8Lozyf -rAG3GpuXdJJ76gWgXQl3+3kXwjUv+Qn8ELPgPg== ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/sub-ca.key b/kerberosV/src/lib/hx509/data/sub-ca.key deleted file mode 100644 index 19415e8669e..00000000000 --- a/kerberosV/src/lib/hx509/data/sub-ca.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAL09Y3g+MYXZHbf4 -BAJYUxLeGsaVm1Epe8didrmmY1Y9R8gvu2ubfdjxqTwLYWb90efXbXSgMJygfYBB -BBqGYbQSeZ2dsDv7CkxpjwYzB4UOc80B+pb5ayAY2LEGAyGzcXrtQ/0p1SP6zM9D -/INKy4vmmNuzSfG6Kpdyt0SD1udfAgMBAAECgYEAi8GahGLqD/+YgxUXYOP59iUx -gRdb7UTFtSpypAjNtBLtwFoAACiFeIKAiWeeN4GcU6w1mbv0Krgb92wMq8oyvJIG -mD+jyzdYSj1C00nQ3WF9b77nasAGP6IzhP82H+c6HjIJOo04MrM0s7lW3ETJbqyq -CDpgqufEkXSKO4f1eAECQQD8RB3zRZw0+AMy+v8RBSvHGOyH8WPwheDKST9ycr/c -fizcSjjUVaJOH107/SH/GKn+wrDx4vSJXnQqnFLTRYufAkEAwAp0CeXerZhpxAHf -SnB/GFRE8xnR7U0sIuAkCupYtr0dQZj4bkeRWuM7dNujKM1EomU/S/ngHlns/KPJ -kH0MQQJABtkGgxsJoXp2A8VCdUDRrmbjzNDlqJrJvlP8r+ujf6XBK/2ryz/D1yEM -09sMODOAMdUxHm/NuYjh2GJD8U46+wJAN4OOEcJqgaI6iNfFtZ4Zj23k1KWVItUZ -OiezI5ik9oZqq6jNwAteQHjJmjlXzBayjYNZLdxY5k02jb3HKcaMQQJAdelGxbOu -NRR3NdcwRUdRBlqTCVAx1qXlDmYvvUNRsEAr17t9ij7bwfxTrFmIEdCoqTlY5K+Z -mg1qwSeTGe3x4Q== ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/sub-cert.crt b/kerberosV/src/lib/hx509/data/sub-cert.crt deleted file mode 100644 index 236e4d09426..00000000000 --- a/kerberosV/src/lib/hx509/data/sub-cert.crt +++ /dev/null @@ -1,53 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 11 (0xb) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=SE, CN=Sub CA - Validity - Not Before: Apr 26 20:29:41 2009 GMT - Not After : Apr 24 20:29:41 2019 GMT - Subject: C=SE, CN=Test sub cert - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:c2:e7:0c:98:23:cd:54:66:28:8c:e4:75:fc:4e: - cd:1c:1d:eb:1f:0c:c4:56:78:07:7d:73:3d:9e:0d: - 02:29:a3:c9:f6:46:fa:24:ce:1f:49:f8:1f:0d:ea: - d7:aa:91:ed:0a:8d:69:05:a9:36:94:70:52:e8:05: - 42:04:19:6d:55:44:85:c2:d4:3a:2c:a7:ad:aa:42: - 54:cb:78:a1:fa:bb:b9:40:41:80:28:c4:27:42:a6: - 6b:f2:33:84:a2:c0:3e:f6:fe:b1:70:54:8a:0c:44: - 8f:81:1b:27:d8:7c:59:3f:f0:de:ea:dc:08:3f:88: - f8:f2:bf:58:3f:a4:fa:f5:9b - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment - X509v3 Subject Key Identifier: - C1:80:37:61:B7:F7:BD:09:84:1C:5C:CF:65:6D:FE:15:0B:78:85:C0 - Signature Algorithm: sha1WithRSAEncryption - 97:06:c7:34:4f:17:20:6f:fd:f1:0e:eb:33:f1:eb:fe:49:ee: - 5d:6c:59:f2:4d:97:c0:ad:5a:2c:85:c2:b5:21:04:b0:ee:d1: - 2c:2b:54:0e:9c:82:c9:45:81:9c:2a:3a:e2:fa:78:94:52:56: - 19:99:11:44:78:f4:7d:b0:fc:d2:d3:49:d8:2f:9d:ff:23:5c: - 83:96:a0:14:a8:49:a1:bd:4a:ef:d2:67:96:5e:b7:36:36:86: - cc:ea:17:c3:3e:b7:18:ae:0a:03:43:4a:af:ab:ef:b9:c8:ec: - d6:27:39:c7:33:b7:34:54:d6:b5:1b:8c:85:a1:c1:13:b5:cd: - 0f:b7 ------BEGIN CERTIFICATE----- -MIIB8jCCAVugAwIBAgIBCzANBgkqhkiG9w0BAQUFADAeMQswCQYDVQQGEwJTRTEP -MA0GA1UEAwwGU3ViIENBMB4XDTA5MDQyNjIwMjk0MVoXDTE5MDQyNDIwMjk0MVow -JTELMAkGA1UEBhMCU0UxFjAUBgNVBAMMDVRlc3Qgc3ViIGNlcnQwgZ8wDQYJKoZI -hvcNAQEBBQADgY0AMIGJAoGBAMLnDJgjzVRmKIzkdfxOzRwd6x8MxFZ4B31zPZ4N -AimjyfZG+iTOH0n4Hw3q16qR7QqNaQWpNpRwUugFQgQZbVVEhcLUOiynrapCVMt4 -ofq7uUBBgCjEJ0Kma/IzhKLAPvb+sXBUigxEj4EbJ9h8WT/w3urcCD+I+PK/WD+k -+vWbAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgXgMB0GA1UdDgQWBBTB -gDdht/e9CYQcXM9lbf4VC3iFwDANBgkqhkiG9w0BAQUFAAOBgQCXBsc0Txcgb/3x -Dusz8ev+Se5dbFnyTZfArVoshcK1IQSw7tEsK1QOnILJRYGcKjri+niUUlYZmRFE -ePR9sPzS00nYL53/I1yDlqAUqEmhvUrv0meWXrc2NobM6hfDPrcYrgoDQ0qvq++5 -yOzWJznHM7c0VNa1G4yFocETtc0Ptw== ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/sub-cert.key b/kerberosV/src/lib/hx509/data/sub-cert.key deleted file mode 100644 index eb42cfcec4b..00000000000 --- a/kerberosV/src/lib/hx509/data/sub-cert.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMLnDJgjzVRmKIzk -dfxOzRwd6x8MxFZ4B31zPZ4NAimjyfZG+iTOH0n4Hw3q16qR7QqNaQWpNpRwUugF -QgQZbVVEhcLUOiynrapCVMt4ofq7uUBBgCjEJ0Kma/IzhKLAPvb+sXBUigxEj4Eb -J9h8WT/w3urcCD+I+PK/WD+k+vWbAgMBAAECgYBIFo1h+FwJy39UHWxGVh8nNymv -4lj8Yojira0suEMEg8A/hyEeW97WzR8vVp1OSYsTTBp8LYoyfRktGETCn2UAbxnZ -WGF3nx7TPYhX83N8QFT+NuIih051w9KkGcACD8PZqqeCIyt9YEOnNX276WToCzNy -121aeDYeimlUJopzAQJBAPBL53LfzOyB5EnQIbT9GTciFQEMJvMQPQqd8xo4S62m -3ydHIFDtGFP/1ZytGevGQWnkF0hxTc/PbUmoFxp+e8kCQQDPo7ddWjR3gxwEuy9M -5sj52OqTwUyS5V+mMUVua06gTaTIs66yh3yv1QpczQV1sr8o6EJ6v3qJKqIC3qRn -BBBDAkEA1JAAdDCfANPCEr1nI8gEJy4h8GREjBzgMmUYaChGYZ1Mp10WrB+ftqaH -2mmRlWwx7y7SncWEtIBjx5VGoqwiaQJBAIeeQeSaR0yL+N/qNrG+xyPRFx3ckhwb -7sZIxjWhpuAy9l8UZRU8QydBOZx1WIyQbCTW1pz/tZQjoV/IdY7Ha6sCQQCojspS -iBO6CALYSsdIL6ZX/bXqGmPyXbxszGkYlaJx2FmD2MjSVM2RxPmx5RLNL02EfFLX -DWUplanFI5eZTZ0N ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/sub-cert.p12 b/kerberosV/src/lib/hx509/data/sub-cert.p12 deleted file mode 100644 index f9d48ed1de064a24ceeb356893b8c12235e0282a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3008 zcmY+Gc{J1w7sr3bSO+DH23ewbtTROkp~yOzV#q$mI$!C@2OrAdn6M zF#_R4h83+2;s!4(c-k7qO!C~|+y(22v9cMeR+qlCJz7)OG_P$I^&3u%pDU{(4c5PU z^eKFJbEB)1SSP((tvWP)K#FOsyL8UnMCbR}6+<6?or{@o@ImE+*M6qB=LK6%SKSwY z1|0588+~NZh-_wAQtCD)6PU+7&)(md!9*l}`$Dv7RxxAyt+p zf}l{_ia$==b{!k&9pBnI-+Lr(^4O$blesVU&s4IWb2F-k*k6t>@!fX4%;b!p+pb%|{?$;L&u$+Q_3A5wU>{=B z=z7Ggl7(dbX6K4H`#X<8^L^Zy?!z}-z{m|$9+To@w7eJ|D~t)r{81-oU1hC&_ubAw zxiOA!mlnopkvVc1W{FRa{gGWUK=a9QG34&EZ!}Vo5;f_(U~Gm6eAQ@8BMo>k)w^{d z;wpbgp9a3dGrK-9@p)VNagThGX0nWp24Pg3F2>uKBWKBuzW(@C{fVWAfoR}})6=Ap zRSv-Fuaj%s1s492aqtX*B^Li@5DYDH zAn5Kr`F#T{%6mL78VOhlyNO)?=u=U60bYZCkRc_!5>{A~%`hFWc1u&pIsTe=GZC(u zayj5a*%<)?^3wOxLF;_ZZCAY(n)I(eDl=WQZ%slC2zsscUqw{DVhec636e#V=Tq<0 z{WK(2$R)NI<=wtbsO^;Oa+uI&&&VAg_7HE>cVhLt(DeAqi61whqeb<>!m1Q{1We>E z8Bk(|LC4`7Vh1b32e|{6mANU7Cym~_e?teQJEFQHqRvs+}3`h zjQkGi?cxTs%ekIiCxFL;K$;tMr@QT$#t&;WU~#TA9jUocbetx4}Hu(qkUdEn{|Q>KX-D z?$S$&9?uCRdm6=G`5ejmN6)D67)5F|YEdf%xY<-j8KS#9J14pCU|=56e9I}}V(0F` zUOE78&~p9_4|{Ln6#J!KFf-3@O^K~gW{>xj#*QaO6qb6~!Y|n3;#~B_ofp;@N`y2& zMI?lmG&Uz(^gG(|E?E!f^J)`0{>IgYLJG*#`1yGpX1>B`$_67?@t2UThs&xRDokHp z1sBXlA^vyP-Mp#2CzH&GIq~7rU>>ZNH^uhHCau+;dx@Ll&ibhJiwMf*P8L( zUP@mIDzClK;(RrvmNhfVI5o^q)YaW^*~e}tR%>wVvt*C28Ft+81FFU|-2{4KF`@8g zph$G4YduJ?Z)$4NaWB`AB_obhn`(t3!+KZ_c!HE&%A-W932ZO4$h+<4-34EcHU@zW zlbaOg-TaCx??cMAFSgtnQe9&#!0LY{!EY%%YZyq^xks%eT$4`kYwEopiO_lN^@gb7 zVYPu2!;m+OE=DU&6-t?rZxa3eIqI@5hGVPNQoO(mVLr>a%eEQdCAL&|GoFE8)jOLs z?$GxUA+snO>HT@22ojS6E6D+_TDU$#wh0I0NG3EKACM0?>v@0sL&M@3u_Es8jCN$+ z3qOAF?H%bbg#X_WiY^_1de*};8ad0MqzN^f;+&2sU4wF4Ln5LSCz)1z2LR8Ez^(nbtJ9hVmrcEEW(Owd#dYwWK2J2!qq@XxrT{VP$E2qj|Ngin4 zffH$E{|5~6h_si$L|UO!`@(6#=pp~X1ZEmg9uZUmCxQz8j~;0MriUFuZl|?j1nzHo z024vs;yD%}O~lLXdkvO(5*Uq^W5N49wlT7v+}g2vtCg`SN10~4)Y0WNkG`Y@C1m=^ z&4NBIL$o66xqU>(z2Ij`ZUc8c1^SQU4Rfa*_zg^Qt+CVhOFyhe9FH<%-6smjf$7cZom7i`F5JP|(m zhwmijO-v=Y9|PS4BZ>O#gshn6kJ`Mn$YFC51`+6~EQb${O#Do&pAdf59|ixCB@0zF zZNrWfjqE_2W@bKq0cLBHehhh{kBbwfkU_QayV=@S%`%<|yF&Wc2^xpcegox2L40xq zUsitn>g3OuxkQy>0>_%jZo5cF&Y91UJHw{e7s;D6z4d3O#m5l4GOeO3_AV>onYd{z zNLdrDj4nr*n>jaCd@E>&)fE>n!b}%T)Y?>Kg-zB9>>|H69@xIgJ=fmAWMHdZYYO@0 z1{YoEns0wKAY==iU9+UW?7$D5ObhWF$bYcrqhK3;`;O^1MeL=+-4*WPgxEh@F|UmT zPPQ~^3e`luuQ}XSWSfAc_{lgb$Xw{flGl3rqQk4}$qk`Kt-m#6~Zf5_nkkp6! zUvH?g)ct8qQT`b?m9@MAqTJAFIv-bpllgG4Y8GjSbuZz?W-C-#O6N)GwdRc`!Ti@# z!%_`+K2<{3i)2c+_UTa9TgzUqa}oQCZ+#lJO6y9o?MaeMi2TH=?U1JfJ-o_;lYA+s zVCsH9Fir?{^H0;puS@1ZmUB}G3|#oXSIxwQfPy*ooa32&TGAKy+8O%n*|k?Ni`iG; zH~tyoL`d?B0}g-}fCKCSH^2^X0Rm3d25>#?r2uaL4`5H#_O$Z?eBcPU5S)pgPJ)dV q#6t&wIXT9~g3P*tmcrY%`MteDNcCY?abQM-hf6>Q%j=rIALC#C=Z$j! diff --git a/kerberosV/src/lib/hx509/data/test-ds-only.crt b/kerberosV/src/lib/hx509/data/test-ds-only.crt deleted file mode 100644 index 7c5b452a639..00000000000 --- a/kerberosV/src/lib/hx509/data/test-ds-only.crt +++ /dev/null @@ -1,53 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 5 (0x5) - Signature Algorithm: sha1WithRSAEncryption - Issuer: CN=hx509 Test Root CA, C=SE - Validity - Not Before: Apr 26 20:29:40 2009 GMT - Not After : Apr 24 20:29:40 2019 GMT - Subject: C=SE, CN=Test cert DigitalSignature - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:eb:6c:c9:0d:97:91:ab:88:5c:44:a7:40:ed:25: - b1:d9:0d:cd:22:1e:07:80:15:49:05:b0:7d:f2:bc: - 6c:12:7a:4a:74:a8:26:4c:98:0f:29:d0:b2:68:21: - c3:bb:6a:cd:4a:27:71:5b:8b:51:12:ed:47:cc:21: - 94:ee:05:11:55:61:2c:88:22:33:c2:4e:12:ca:ed: - 63:00:10:4c:4f:7c:62:97:a0:9f:95:2a:99:d7:8e: - a7:8a:d7:53:b2:b2:7d:a8:b7:5f:dd:4c:79:30:e7: - 48:0e:0d:9d:6d:85:04:56:63:d4:27:53:09:a9:bc: - b3:c1:67:1e:65:bb:4e:10:a5 - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation - X509v3 Subject Key Identifier: - 30:2F:86:11:EA:5A:CD:C6:B4:61:FC:11:59:74:34:7C:16:93:25:52 - Signature Algorithm: sha1WithRSAEncryption - 15:f4:85:10:1a:98:d7:ec:74:4c:2b:55:1f:db:c9:2f:e0:ad: - 2d:76:83:17:e1:13:d7:17:8d:27:a7:e3:21:1f:63:f2:30:94: - ae:9f:1f:b9:4f:6a:6b:ce:50:7d:1a:a7:4e:be:f1:98:33:16: - a0:53:a3:06:61:4f:6e:11:8b:55:3f:cd:91:4f:0a:0b:2d:f1: - 5a:68:13:e2:f9:25:88:00:74:79:e8:f4:a9:c4:5c:9e:df:c0: - 17:e2:e5:75:54:3d:64:65:52:b4:a5:9c:51:ff:c3:ec:8f:88: - 06:18:f6:a5:42:b9:d9:75:7b:d1:4c:d1:fa:ab:89:b3:24:5a: - 14:aa ------BEGIN CERTIFICATE----- -MIICCzCCAXSgAwIBAgIBBTANBgkqhkiG9w0BAQUFADAqMRswGQYDVQQDDBJoeDUw -OSBUZXN0IFJvb3QgQ0ExCzAJBgNVBAYTAlNFMB4XDTA5MDQyNjIwMjk0MFoXDTE5 -MDQyNDIwMjk0MFowMjELMAkGA1UEBhMCU0UxIzAhBgNVBAMMGlRlc3QgY2VydCBE -aWdpdGFsU2lnbmF0dXJlMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDrbMkN -l5GriFxEp0DtJbHZDc0iHgeAFUkFsH3yvGwSekp0qCZMmA8p0LJoIcO7as1KJ3Fb -i1ES7UfMIZTuBRFVYSyIIjPCThLK7WMAEExPfGKXoJ+VKpnXjqeK11Oysn2ot1/d -THkw50gODZ1thQRWY9QnUwmpvLPBZx5lu04QpQIDAQABozkwNzAJBgNVHRMEAjAA -MAsGA1UdDwQEAwIGwDAdBgNVHQ4EFgQUMC+GEepazca0YfwRWXQ0fBaTJVIwDQYJ -KoZIhvcNAQEFBQADgYEAFfSFEBqY1+x0TCtVH9vJL+CtLXaDF+ET1xeNJ6fjIR9j -8jCUrp8fuU9qa85QfRqnTr7xmDMWoFOjBmFPbhGLVT/NkU8KCy3xWmgT4vkliAB0 -eej0qcRcnt/AF+LldVQ9ZGVStKWcUf/D7I+IBhj2pUK52XV70UzR+quJsyRaFKo= ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/test-ds-only.key b/kerberosV/src/lib/hx509/data/test-ds-only.key deleted file mode 100644 index 24493f8d4da..00000000000 --- a/kerberosV/src/lib/hx509/data/test-ds-only.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAOtsyQ2XkauIXESn -QO0lsdkNzSIeB4AVSQWwffK8bBJ6SnSoJkyYDynQsmghw7tqzUoncVuLURLtR8wh -lO4FEVVhLIgiM8JOEsrtYwAQTE98Ypegn5UqmdeOp4rXU7Kyfai3X91MeTDnSA4N -nW2FBFZj1CdTCam8s8FnHmW7ThClAgMBAAECgYEApDDTq8oYy0Qn7a2kR4Cxn8rT -VUcSPg8aRYCI5qDo0p49jUy0oVivwp8NvjhGNVDQajZGBe2NFqEsIL8PCk24frfF -LNUAi0FllQjq4iUKTKJyahqQvUenhVaAUdYJdDfS6wZM4xYc3TxHpKdbp+DVii+F -HA9dcpGCwumbRv7ZmoECQQD+iQOM/iJAXOJa0QEwqsuAlQbC82S3yoedpX7AAup3 -lme8BreDMPyv5cCVs8UW9z+z9N+4wEB9cmA98vhCxq9FAkEA7MeeLY04wyFH4VBO -1/GqiTVdOF5mOd3dCfv6xWgO2xUe0h1twIuAmbsST9Bvj7AQM2nAv1EoU88OrhVX -BY/B4QJAZnqflVqUS7mZ4NqZUhDR0jkt+buo516Bb3U8LO5/nBpQNaG2rPlCI0er -XBp+1ZpCaZ/Dm0y8KkWsfgSe87OuyQJBANefXRN8VGGWECBGAtax86vplc+8X3l4 -6k6qUg6tGUI3NI8BT64VG/JjImTemomOOuKm/mj7Hi9cErFDK7Eb3eECQQCxNUEt -Lxdipay7Iz1yAr953GoQAXdgJ4l6dmOyle1wE21Mvsc4okGr6cNAp2K3d/LnOAId -a09Ph64VsUwGaIEh ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/test-enveloped-aes-128 b/kerberosV/src/lib/hx509/data/test-enveloped-aes-128 deleted file mode 100644 index 070174513a79b4d487e4e18fbfc36c32f2abb187..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3160 zcmV-e45#xjf(%p!2`Yw2hW8Bt2Lqsj3`H=43_$_`05O5dFoDJb0RS*BFe)({Fc}5| zRRjYJ5@>ieFgYMpWpi{OQg3f`AVWbh3or==162eD69Q930s#Ur4F(A+hDe6@4FLfG z1powrfLqy+k^xjfaI#~$dk?Zp2_J&`0CT1%!EGXG`9%B(Ea*EbS8Q>{2w8fwsT1?K zaPDxp%L?PtSk7f%%^@k79YElPQoDpYz(LbXz1}0SC%YGLMWJknRE2X&lpE%MIm=m3 zu8!wa!5l!GmVp+Ubnz=VS4KBe70%(;uTXM&X)uBdZUzY|hDe6@4FLxMFdYU7V1`Hm zWdj5O0t67ED32g9#tG_PAiy-p(xRwx72pFR>K%MaILvV=bvm5u9-&dk3m@@U+u zZEOZ$k}ZN`d?{V$ffF1E)?o9*+iO)D*b3|Ivc)}~cFuK7U??qs&H0C0TGmgE?*O{Jz+D<>gNqIE|1iVB`06PH@U-!sPa2ZqkEZ zev_Hby$~z*!!i%9>m~Y&wnPqRMcL0a8N)qWlF$2~#HjO2Ub0)(}SMop=HQ=)Pul@-ZBCZXG=XSlX42YnPDe*3$pvp1bUW{Z7WF~>pQ z+}LhtzH!uVnVg0O1-aeTMu51gD;CoMJ|E{&lri$`V{v9{V?0fNhU;Qhi_{rw6e(k! zlF(iNV?mmZblYs=B!&@vLns;Wg~R7spqj-y!qRb@ZzwMaITr4AV%^O2q1RwlZH%yH3=xd#PK`^IeysyEoDydhMFH?%t#@aGRq>7JOF7To0Hnq-iqeS*|%Q7Rn z&+eg%i~)}e>1pIXU7tTw*TlP6Di-V+z_X*|8gruh{oXU}14If{EShdrtGIwTyd={{ z+t^3=E!T%&_uc)Brp2l!Lq-R=ZTBm!|Iw_-5uEUm+U()NXsQlfW3i%45O7Y=EV|i? zWEASf-LG-sAlU(yY22-Ng&jnOg3{5GGEjjWeCg`EvhGaD*n3-AP-`)t2t{{)7ls7y z-0#pN-07EP)0Y0R7XoI1Mzj*0$E>HRe}_2&&>RRf$tG>FijTb@EjOBR$@QDibjhS- zWiSacN+4s`bju*Yb=x+O1k@LqLV|Fbr*@416ZnW$VmVx#f_s$diCj#x2>1}rAjJXe z>n&T4?Lx3`CTaBw1^66JC=>EdG8#q{^e0cG=Uu_u$Q}e1R~5x z$$KP{$rBv}4<1Pd&rw< ze>@)!z(+eU0>0Uf+&CDsH3irCDL%}b0lxrEvdC9CWUSgtD8ziG=hk;XOHM6QsZ?@* zzEvuTM;FPc=_l9i3UNpC60pt;hHRVLKs>0!LX0!FAOaLyj%6Zcw&gZGO^S_D?k&!B zQ|8OXhY)W~0N6#;ju?uMac{iZV`G`3O^c80G1Y+D2b1CB)AqNCEj~Ki7lN?AFRw;) zx5o%~AdQGSeRV;)tm{}$ZSf@U3ZB~{&zFb@P56PK%umND09;7q2xAX3$Zn8Jz6ix` zohi8zh@-h=7UkU5_uzO!pY;W;)eY<T>u>A9wS`LlJA`h4VrYR+9BtDm4L5r$m#w zZ1LtI#1SY}^;bzSx!aTYTs3LkrY{v=MeNJOuC(5;QQR0WL;_497RxFx%tk&W|E}$F z5nVOqp*XsWgmtw%x}sRiE_d#bDX&gef>nPn)sH&M(pZ1Bx|G^aP(sn&*Zp}A{?)C# zgUZa1Q|VZ&Xp69QEgEkP$@V+))CfaqeVpr_00DrQI7-ob+OY< z46WW2t&!4Zi*$$8K@Ml$k}V_x`91dG!>AF9*f^^TFG!uPrAVi3{V>-o2i(}J^CK1( z$8MRFY#UEp?_}w<(+WNFy}t4ia{#06A9?G&Qi(x_oYvpBs4ZnOR&054arjX-EwaR% z0DH4y+!dE-!6_G&9#ZZj^gP%qgN8m|oED)Z`3c3mh5rRxLdHDt^+v^Xz$T|o#$&{s z)7iNF5FWjJZbrl5UQ4%cM>?k}II}`i&x~8%(R^L?h6`EfKzP&Ui|R091fG$P8u6V( zB~d42Jc1g--DXCqfZZY{8-qiFKIM%weXa3O{JJgXuNch9M3KC|>@lAC*9;syp=vSz z*u<+$#$1#;+p;x@c=HkBk}}u*+B7_fS3XiUh6QHX{$Fwb0F7w`JJp|QJkdkeDmUb$ z$QY+&?4zZU6RpFdt6d3;vSfV+A+9M*MwEh9@EPVV1&(ZY_-$(LO1A6(NzO$ri2#Vv zE*3p!2u@bch+cuRlKdFS^1EFCpepmsoo*q)+~?t;JUDt%@xpQc`{p-;L+~&-R@mt* zu*L*d4g3LzXUrgI+*uL|11LTp%rTz-X`lqAc%2J)hxYg{{hBUpR&S5QEF@5r!QD4T z8QhI;ocP$mD~F3Y9O?3>u2K5MTQVK|0&=5R;ZmOy( z(2|K=Ks-(GOC}^p3vCFC?&hGi*j3Vdw%jhnEV@1Po7FtHE33l|pz!AuasG|6>D!KZ z@Ny44lEw4wfz_tzv*s?R5Az2-aW4IaJjzRU&o34h#i=mxSVdV245%66$zxT!VYKm&J3s)}!c$??c@v2cMYNumo$ znQDjkD-|agTxnflhvD#MGsJR&U= z`Vgru3P4KzX?%Q%5tz!@jG)M-mg>afeUcFrh$qMk#ssBY-r?^L*Hr3F9fXQjr;K_q zAYHT{^uq)#RO_W8qSLbixlxd6=U5B&Ln{9$>r-FA3~9ieFgYMpWpi{OQg3f`AVWbh3or==162eD69Q930s#Ur4F(A+hDe6@4FLfG z1powrfZ_Z+1Y2TvBjleipA=@2b7nMwQQ@6}I5fZ~ZCcfmB0* zxp=B|ou>Jo`GBT$5YjGy7M_{DBHkM5=rS(@fA@@6r6&25t~)KunhtfVR&{6K>EZ6i zr-N(hKGOrN*sb0ZLHQJ7>-uUnQZB0SYq?(l0x*ILZUzY|hDe6@4FLxMFdYU7V1`Hm zWdj5ODg+Rlb;Qh_V%!#^e%+1HbTiU`f(t-gcp>;9jtD>62LsLuD3VueCo-{XL19Po z_74?*1@zzn$46e%>Fn%uy*J!~#sUvZ6;5839L&H$;RP>Mt25GCq0qhUV*TYdR)#f{ zpjp+0JKpYeusm4~b@MZ8#27o=RKU^PP)fbm@6g1! z3^cB5FB>TFi-BAR&h4bF)VL9iq9hvx3pKAp7o~x(XGu+NnuAapJ!^=uZ&HgRL0R3Q zK6b)2JafTyY>}6KsL52)=j0yH8#)E8aJcg&3N>fkqhm|Rj_wJbmAikK9{Ah%$Il@Q zKQ%dz|D_I>JW$R+VvN(d61>8jmmrzW8@5(_SYUEQID*YQ0cw(VnYOmw2Ip1Q%~g+k zs)$n2#;g(w&pAxO&?xk&JV&wHOzPYj0k|9?cR5ur2tSl{SPfm9Z0*qBAJ8_t#XsXy zh-Pi3nGm^k#SJZaHW+*>^vuJ6COgBOv$9^)AfXV=T214-wQe>jHVPv_Z=fY+y$ob2MxyCq*M@>Y&xUDQiiVHqWDr* zCNPy-_3D&wq%G59*G8}Uz7*bb1mbxm2SAMqF!w4~a}s$9I0F)pO7%GLHh`!xWM#wP zyZfZ_A$1ttN6yAY?#G@c3jPIuXbKgn7)Sni9LspJqbnE2?zBH7-MV;=I25n*E-iyf z&8>MoEivDD=>1QL{W6Fa4Bv)G3u)D!=IV>Chqg=Ik}=rSybg4~Jz*N)q!xWv7jdFR z3riTYtn=CSWXf7l&^QvMf-vke_%wd`LPKd!RhrCqQ5LD?WI_z)$quWs2*R#BL*#X8 z96BQh{t-)Dyea0IODGH)s)vJuYFK9)46@bXBaQ`_hrfLGM@fe4>iRqdH4||th%|NT z7u&JBhQ+S4HwgAh_jg{Sl3pCRn01i+r#*T51NPEW`Ap?9sM=-~Peo>m< z9LP5ar2xXNaGzUaxTmxHe!3kU`&~EnSA%;2i&}%VH`BoqKZVEeIHuuek=JW8aNYYl zw$L)Xy9oBJ5nV-$(U|ZF9?kln^1}L%N_lSA6{2<$KRr|U7FY-oy@2RxGXJ!2nFtqc z%$ACs4e7DbFUO^jaKK6aD5A@l7$;OM5ZOT-srtzNP%%q2`ZJwded0C3ZF z*!x7?kP<~4J^kq-#bAYPUqiB0N=;ss(5dcmIJv_p5Lx`Ad|-W=kc(hgM2R7hJXJM>hYVD1X zJylW5LkXj8#X<|#dq~y>lbzXuZ(vAHtWug?4qts8iT|>{VZ#h+RHFT28>M*&H2K~# zKGnFg)!RdbJDBO8kFA zz?OAK#HzSa5#_1q1>Hj&^Z49o9%g!xEedG!?_|i4U8o#kFAFlN#X7Lo*y-C2zs?FsAb)+7e>d`W5*Fvlt&<4DPL$93STR zx?Xj(LU=;m&c34z+Gkh0sWd5W!457i@`rkqy~7#!pR%6`_TMPW^@e;S>ur3 z%KfW3ZMov-i!kN@eT$*M$AOgLY!Pw46zCJ#{+sXYFn_$G1KoW@g}4ohPr)*aCnzP# z^?}sUtwwiDX%RBJi_j`IO!6O|(sHXiv?SC4>8J1M1I;w>=>b8X}%+*(*C$>=2# zn2#YaG|_m>V^1Mm>yl{&)=sRK?3?N%H%mt4)p&eZnFEv zHu$c2R4}8PhSDpF$T`{$?!ok02brnZ<3VJ>$sLw4;k*Wo0DVyfz+m2guFs871uIit zB$l#XFZA8IM!doGYO7o{OF4+xC^KCuL$%owX2{a37K%=bo683E+WMOJ=-6Y6?JGYx zs=Dx3;HOq@=`w1%3^0AmG(A|z*o&3oCU9C{S%npZox04Ivci!-cSzyM?cg-%3T~SO zBzdmZDRtB%j^HxQG5FBxm5(@z3Nkm0-LdI{VVYU1WQpVntS2ggqcw!~BpAWzTFa(S zuq?>Rf2c4O-W~LH6WUQ|8NCo{H&tgTcGc22tgVyV(16uCFn-{N*yrs_HR2ynvGnv3)Al*h8t~VYpF=N4tLV>UR@h|3e-mkBE%c-BmPRy3GL3bNFKN|m~wf< zCDh4o#y)jGiSEYcR3sco-1<#q@>qwTb-;`oRi56@#UAUdDXHVxH&d)tXJ9k0!_OZU zOZkwhJA2~7e{!^)-}^hE?Gr!R3P%42kOdyK_nk48;#!}?3OGaW@%Z5eCUsPBRZxU7 z1mpfWbI@atAIS`KCUN@iKvN=J8e~4ry%#gDOXRF*B4s;R`nG7UdKB6L)d4{JI$Ktd zd2do6cXI7Zqv}LARhD7n6oD`y`o`eTScz&}4X=UvkcJ%qG#x8&*a%va{X@Z5jEK19 z2r<H?jfET|cl`PSz=G!A$RRX}pt{DcfOTw#4d|1X0UnN<`t`N_nKwH*gz3alTx; zfF7sb*9%f($?g2`Yw2hW8Bt2Lqsj3^6c*3@riy05O5dFoDJb0RS*BFe)({Fc}5| zRRjYJ5@>ieFgYMpWpi{OQg3f`AVWbh3or==162eD69Q930s#Ur4F(A+hDe6@4FLfG z1powrfE!DwghO~65=G24rKbR9gmOax>-cDvJ9b2V%_i!#Tr8};{hZ6z^ZAekBx90X zfhpLx8DBf3z5jxAfd$vB{xx%xn7@P3aeDqdaoe3fmpWaG6p+c~3X|t->iNcBW0Qv2 z5aKCe_$D=*Cr&`=!ZANNW~V14`Frn?BA*O`X)uBdS_TO!hDe6@4FLxMFcAg?D-Ht! z2LuRMpfpQ4|La+Rf(tk+UxVSUslG-o6dn(u9>p>$h-9t)$mCm^qPCQC4BZAJn2V63 zcg91lfoEBIhlBtaa*qgNB2Zt3eNjNNXS=yKcwgBHWG)uo2q?skXEH)s7!LD^Y@ovJ zGqa*q5W)ew#Tt;xzP{XKfa6;cn9;~B<#iG=^4w3KGcQve@_@TKtYK;?kO4R&xXG=8 zCVCC6D-`kK!*`Wd!VO%JzlyP*T3d&?1RN(TwZfZlMqhUu&!(U<(3^j!W z5x3pIW;n~836)AV7)Li-P3!JPPPyH~c|$R!xx-un#`tsWp!si;j_GJg>Hr`WbZohpCwD{=^oZ6c&=l zk6Pu-&Mo2()GW&_fiK>W9ikVjfdFLwb5RY>=>lYkBE~tKA_pw6NrHtjx0WMBUDan< zdc4>lO0%a3v2U$=MDs4YgY&a_FpK~WaRc-KdQB*jZ13ZqBM*|9rs{GAqPfVAb<8DB zV2#)Ou^OMbA_xKevLNBnS*Q}B?B=r}jfBjhr`}dPmrOS1TYc24hvniga3ht(F=Lfs z7u%;Ih@__sCiP{u^Ue3alT##k1Rb^o-i zI9~+kMLre@l5Izf*c;AMq+C`JKCd&_Ykrf`#-E<#2t-e%l=MgxkIVSd0R`t0Lc(U} z$~x+w#Iev7y3V}^Qi#)d3*MZ_tPUd>Wu?z=c*EblxMQ_Hd@s&_e zB%vOTb@s=>sB1tFe(lRmhrdizOrQVEH$GtGA6%eFsKp`ee2}}RY5!6ObL1D%6D8nx zP!n3#8_*@p1eznikTL%foE3ypRbE&4)kW0(h*PC*XQO!gG6vVUnsVXmNhwPkMWmT` z6J76+kb^>>M%UN>5VI*h(P(Jy4w=f&F%-;(%wSelRfh%$(t*p(3te!kmtpmxv6?w$ z)9>sru5dlmFx;cIdd<~JYj6WNNJRhe&J5>y@gPvU17G!Qeo&q0CQ0o1ib~5_wlb1jlTYK6L1j`pBOPD_lZ$9Kd2V;7D!^yVKTZh)q^S&!=$r_ zAX2$K9I*r+!zGjKbYPshLPIlx&LtUG3_M^vuiStbl#qxmz{M|_doI53t<*xbF$=)v#+q)Xy9W3Xl#(y^l@^VsvqIe25qa_lz`T2uMKz^2 z`*7GL8h)KrK3m>t{U}i0e5>9y_y@lWRH@fH)%uB;bN~Ook>2A5(idRuS=LJl0ndbs zWgA#ECUpX6+T!9?+DEJM4Ml-%cESBxsqyD)W)8*U2Pd@K6o^r;X_}+?J(q-43`LrV zTI>i~J;jcISMRa0+PHZUS$UFHQK1~>(kbF?CxJ0?Gl|94Ql`_O2T#Bjm04r@aI3ul2JSHobgKtNI2MVUJLvu>w6@z zGYy3K&;HP)FPspWf4<5C-e&((FM!D3n=^H^^Bad(J;D&5CS4mi{+Iw5uyKVahEy0F zegT!0s7f+p@X`ZHtJ117A6!LK%?L%(Y_w=b4G9E*h^uei^#uiBXJCI7A9@FzQS8OJ z7+h4H0%fN|nL?&pOq(ygb2M-=duTz;N=l%6>-PQ?K_GZm%;MQXL>^h=P8AYk|G0QR zmv-{2uBZ6D7ab<_PX0`%dkX#YOL=tBVDE~e(Hd!Gp4~Xh#ZQ|UQ1}{SRVdZ;v1ukl zfESeeU{0UW@N$Cp0x)$@Lgg6j<`>x%B=i>XPPfn63E`5-QBBN*zk{Lh*Pdobv?;RT zwE8xb)KQrcPbCaZgf9%l#&`R#_v<=lsGQ|TzFD7-l%2R(kdm#Sul-F0=huV%F2iZ* z>P&7mIRKZ*_v60|pe+-zsN}M@B(9MjhWJY>-%NZt)~fif+}jG__plDxUr}nD@SUIP66GR1)38Y7i?+7Pd5zO}-mEZml zHA~pUfOJ*jId$O@+f*NJh)yQFr=anvy_g#bOOn=`>#C3vl&uBTu6YSUpR18Ve>3|O zgDH**J!~8>g5qJ<#Q>t-6<65kA}78JpJ-0~(;1GcoUq;Ejic1{cxPEiITP<6Hd8M# e7d~RqOF*^)T25{p4>3a!p>9!Vt1^>?zGh$Mqw?(l diff --git a/kerberosV/src/lib/hx509/data/test-enveloped-des-ede3 b/kerberosV/src/lib/hx509/data/test-enveloped-des-ede3 deleted file mode 100644 index c5e7d3db4890b0d84e616c88ca591678b3c54213..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3143 zcmV-N47l?!f(%0j2`Yw2hW8Bt2Lqsj3^Xu;3@`!#05O5dFoDJb0RS*BFe)({Fc}5| zRRjYJ5@>ieFgYMpWpi{OQg3f`AVWbh3or==162eD69Q930s#Ur4F(A+hDe6@4FLfG z1powrfPz`!avre5ZF%m24}FSw;ic>}q*Uk`JZdwnw&{TU%3k|zGzB#$ zPBSaWbcdyEEWtTG*dZ=sWulo1KlJ%dY6zCK z_(JFj3QPP2c6Z$xkQ+zbjv5(TinuQ(<}6CoPcVWDT?Pp%hDe6@4FLxMFcby|Duzgg z_YDIF1PE&T@(A>cO&AOX?ZtBdGOkh_fo30BVN1v@e%T;2nzoU=?_lj{SRtT z_DSd3R_>**-8gzO?L$%8(h}|VVV3NHQ>K?Gx?(pX-Q-&q)jvuNo2`orp*IIx z(En#({~-T+VWI;}sM0o)9)6&{uJYL5M{gu2vZwNRA5(wF4^qR$5h9i2kG8o0`Daa# zjo;DonTI43Pu+mMd>gS^8Ag)EP{4$h`v5w?O5<8t6IMXZ3lRs)Fj8e1@$t-Sjo z>uh}t9->mCk+-Is$ds9ULjP9A!uug#4j8;E`7n&hj?!DJai4|4kl2-iiqKh&mJYSH zn7hq=g<|)hOs=AY0jlX?IDn78f7C0dLNXlnvyh4k^#6 zW9|0~-X~#>w!Kb|n=xpJ!u(SZ_gri$b5iRmctMyB?UB;ev>{rM3B;NUE21M0BBBfR zZ_T{|ki^0mQ|;liL+nwVgkyM=G1S^%h0!75h!E~)3IF z@T_S*l${cRO8?C}EZvBdnA3EfsXJ^g#vD_E>i_g~VH)0W0633#6DKMMVe|qctuf4T z<=pp1;C};|kKIe6STv0+O*kbR=jx_$lueBBU z1%S&MhcRXS+Q{gj?Eb^=&~>xe3<9Ivu}>@h05Zoense=wSDSaUx4Iq`L?~>n@%QUt8}-Q^2kA_<%ljvtz9G=05cE64YeGQ#EKwqAAyi znha zgRS$r+y!%sf*wn5G$JH@8G8TR0^LiZNslK^!OH0Luko!?Y9Md~2r68n8EGOB8iJ!O z_<@2Ne(tF7b5M~Rg$JZ1apyd%RLY>+zLRlKG8ehYqY0XG>Ya;%wwQ6@?s}YTyZM#l z%-Z3*6<-doS;XM~3iiQ!_8DT%B*Mr)&&KO^Kz=wgS*m)G$6`x#po`Q5GSWsZ;18?h zpCS6ay7yVDi~OGtd7?D9G5ksM^#1rN^-(FsR0#-abf;ew6)^(oagywkz00eIRrcPh9LtOHY z6WFn=kn>}nPSp&t!eKl5Dr~hu!?UPjcQ-KdQ(VNI(Ve!a#betgu>8aZJbq;4;Pz96 zj9{uX^$i(E+6X_%q_o*R$!^aFDfQ9j7|&$@Aaf{G@f8zfsqNL1kj3eUQk7K(f+k!z z5MGvI?CcD<010DZKPcsB)&7vqJa%e0jGh^`Kc4S+@UjPr&OhtvCPuLnM&&H1pJrs* zYrxCewVt(enyj>F1|4_s$nMz1P1Jx^q)<%SK4nJ8g(AsebW_@$=00GR3(w?;pJwG?i%Q}>Juc+Ben9`7ohEBSMYP~ zbpoA(C`^<*2zD6^c*NU7RbK(~_CO>}p_aH#MM5h%_ zNUUW*0t-S3Ea8#v%~?7-MWGQx&{zEl_S$u`goC;u1a%oslWmylxPv*j;vl&IkP*Ty zE9KsaCB==0sNf-^_U6~?!q27w;sZ`ONJ(upNkAAzfJd)2qQ;j#UUW7eFBs2kQ{iF} z?%aLtvC*jpVVcdPVA>&>)mgCEBfiAz-85!uFkafL%z|cHgkK-_FI686y^Z(zhDsO4 zHynw5tfdo)B~i75GBVUcHLvTd*j)2pSR8?Yx_ysQrZDQkf``89!3(XI)Jr$loK++l z+e;^l5gGb`73r;y9&%il!qE`j%lM?Y2LnncN}OqjarnqK)btz{ECJ9@hDh+0Y5pQb z%|gxsmlcm4Fcfw!pE_Lpakd(r3LAgGsu+KlBeE>{}xnQJ(ql8Ls z;J&j!gawVFmNdF}jL#Meg#D0^!x7R-^6p1-r=9_z@f(WcW7)I=88_!{b5=nw84jH^ zlAtKfQ<&6D@AzLRNR)cNx6WWVG>CLfvyia*#4TvhmJ5?=A$%53(a6G~aj2gGx6jJG z5mlJ|U(+z7SU23}`pik)v!M?2r#Zd+xX3Q0Ps-2&>Gr<|xAq#>^QG8zeZD1-R>hfS zmrjrm`XO$!1%gskPryIEQC3Uk!*55+gXM#EmK*(nwUN^gsL0z4-3^c>(3)ZDSQVjw za2{+ck!+#pim0S@DWxCWvj`!ieapRw<74>RFz^z6u)JSem&~-vrXB^gV5$-5u^0Jc zRr*J8G3p^U#A4{z{ep0NsS!w082ExljD2&B_!SvW)Io?uwlF;0K_!ju?)0Dn}8e9k!lkXqL6 zde+Ge>eqF(Hq>8sa-bh4J|y_l{RILT^xr0D3(Qek6H6!ba=hBVdK5WTKDDSBzAkiz zhC;EakSfQ%b1m%IRvnbni{hxsb%a*7l2;Rn@ZfLAJMdvI%gmkR}pn(++G4ruE#NA|YNa52{cXjy2R- zAY&KDl&A~_Z%5B2ZR^AAHe8sIob34PI-r!;$Z@sb>SCTQLWF!LtXIgxD$`ZI2=0Yz zW+yCfqfpnX7J15cC4?US5LhvR36?sR*|CFxErL4G&Sz;neQQ@C@@R}Q1pMWW28!Kn*qh%V0L^R;xW?H=-s&eg(*l2y13CZz diff --git a/kerberosV/src/lib/hx509/data/test-enveloped-rc2-128 b/kerberosV/src/lib/hx509/data/test-enveloped-rc2-128 deleted file mode 100644 index 75d8a0caa23ad41a5cddd70f6c8f3871061b8906..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3148 zcmV-S472kvf(%Fo2`Yw2hW8Bt2Lqsj3^_1@3^f7)05O5dFoDJb0RS*BFe)({Fc}5| zRRjYJ5@>ieFgYMpWpi{OQg3f`AVWbh3or==162eD69Q930s#Ur4F(A+hDe6@4FLfG z1powrfM7QMn+{zqs0@*j-L@{HgsPiUQgp1kuilkbxAZztDnzeUi?GeXQucT~0{}ij z>oi+yd>Qc+XM|*fX!`hBool644Bu$JMD&ms&uFT)R;N>|>g6kNHklkBqmc!|Z$6^6 ze+9YjQW;9?VBhnWzZtWNY`4ARh1n@=W~QwNbTEPoVg?B+hDe6@4FLxMFc}62Duzgg z_YDIAFbx6$Is^#G)wLDFIoi~Kf(tl7+%kG&BC!j9S=(&?ci_ObO}#A`QK4JGxhAnM z8?y-R2^SIhr4BC~$BE?(rNUY}Ri~cMTGGACICd|@ zehdJjU-wRwLg{mp`kpqRK2e)KAA2}~D*V6j+YTX~iS7J6BpI|6Y~- zt!BlwYsT3?#YX~;lgUbf^Pq^Qp#n@yG{9u*nF_kX*P7V;hGI-{C^{CN{}_T7F>Vxf zib-c{uylidds8efpsJ+@F2=^4bEI&B2a0csvt;T zypir=<6mD|pyWvzY=5+1Dg{XtYZ^Ui>}5D^Vs?v^YvSa#l|2EX;QGrv*q*{vX^7Y8t3?)%CDsBgoK4q=G4u?s1YOfxMTmNKc zE)oL3V(;bbZRz@SA%vTdLXkK_St6g|;)hn!B}AtKxH!}kmTlHaiuU(mp8&uXRKfSM zbls;rd-^88%9s1_(;sKSRx%FP9-m~dI(jlyYU(?8`8VIrNreoos}h(V>?^EFfioc0 z1YL2x*8vH~m5u7YkTeOZRUg(6!DMtD+{n`MlAR938VM5{q;69t01e75K34nlrNoY>%a9pn7JVzmN*;LdS!W>H5%W z9}7)sEW8w>%c_wR#c}!JPHx#Bzo?|!=uX}K8KIF~b8IQ~b4OBE?hOR?|GU%?R*f5= z#qbr}L7k_~4*~;VyfdW0wRqd!33o3N{_5;|+CmY4ISX0Er8>4s(L3v;ZO+09Wn-pROps&;j}1@z#8WroMh3+%>av1Ag1oW5tk1; z*oRjAcFFNsjmAx?u9n1B@Xg^Jj-xWfI69lQO4Bqr`ejVbUr z%C!30886En@jg3IXgSxA{!PSNZx6cVQ2W)e4RX=1k^`>RKO4$k$kaOq(bMu~PD}vP z2xtFq4S#(ky`_t+NRJ-Z8$d88>hZ&j>$Y^NwHv2Q_FY>MrYTW(7*-1gSo0oo|V5aYm{y)zc3lRw2w@hkVG45iak$qW@SL&r5sN z-qm7~TkVELdrlMp)ZF4W_v7E!%pL(~=+1=QF9%>X@%hg~vLJ)emb0u-NCHy!~%%jsl=qyFsG}i zt<5;T@zD?vS=VSgDh@O%G)Qbt2_S3)JD0|p8IXDafwLVKH_jX>V8M*~!-3$WOu^?s z`ad3S>FmX z#ne6H^S3w}3G`q~6Rk~8f+A9(j9*>T$J+>%T9Cike zkz16%c3lxFMGvM$LQ-8?j|W-C;K4-(XP-5s*f)dVp&Tw8Chb|i!XbI>_8l#^24!`k zZHvwxVexsYS{BF}riiOhX*v>N@tWSpPs6;DhAtNT!R6pt4^z4x=<|&t9s*<5AKuaW z&I>NL>M4}#eaXai<%+wS+lK79z(B+ONYbiAU z_JaLzH}fWVwjYU>&^G>Jeon@w>*!C&qE}mf25)QPBdEmUR>=p)9B=<6+*4sWr-gEo*ndAeRi3 zx3|u26Ja}dcKHjh!4bFg)z#9T;xA*BOHSYZ4sRAp@wY$$*)h+2$L)V_9Ja@Az7hxP zA-VMJRl|NE){Bm)=VeJ6eR8`29L|*2>6-D-=jJzHFOD8c4aYI@=4;+oQIeGVy!Zmt zjitpH=o6C8A3kRjLVd}6%OLlFYICUQU+MCUjel+wu6g-09%u5yg!hOR&5f@Q(J|$S zH>R7)MSBR6Kd5TiHWb(V>&o1H_=t!j_Rmv7E|*FzeThjEjE!n9bk?&YBq>6e+B=ry zYJFft`=x~<-)U~h27!X^pER?CfW~W>fr^v@fZ{*tG)vLy{Nu8Fn5!An<7>k`Y~|h3 z1Are{CES3`A7ARyWG`mlC;GC_92T1j2e>@J85f!l&h5&>L@ZTmh7|Ibn_)ohg6vTz zbu}us?%g@g^o4Cp4Fk-dxFW;dNw$c503SPxfqt<2To+>l^-aC+y$h6wh*pVYDZF%0 z8IzI8BH+h^SoT=d7uI@e?gl~4gOw<60R;y=0{SoII$rZ^w8;N&j2tX0@7Tx8`XK&e zY^YRmdXspbT}qY-3weRSZpIkWvM(^Z?22q}R2vB~G>`LtjLb||rgm&QOoQIxibqa; zU>;A!%}1XDFVNDkK5!qbNXvjt+Ink{jKK}~2RpL-uC@+D6a8q zl`LA|^H7?{HLi;@S*c_jKw7fi=kYH)W!D4GGZ;H-jzFIieFgYMpWpi{OQg3f`AVWbh3or==162eD69Q930s#Ur4F(A+hDe6@4FLfG z1powrfDq4_FpAya3iy{6v4Vf?R*zIj4kN%kMG!Y4sy}4RueSRyvJnNN!o#J$<#$Y) zyF`e4GB`iK0-AP6uHMbyG?-rXp@zfa(VNZ`J{I)gjC&mU&;iMmaW!qh9|DJSFh}*z zc&sJMbeivlF38h3f^-`y`^6oIi(_YSP^<|}S}=kOV+IK-hDe6@4FLxMFd7C3Duzgg z_YDIAFb)C&0H6d2vJ)EA`}4RSfPxD+JvzFO_08kHq5S348N*B(46PcXFE6J*!hD5+xLh{?p?IFCug z625EUXI#o_i~rK+-*O|#X{0dCmCUh*z|_v-Rn`6o zpB+uun-nfj;oq@~G}o*v6>_DxnYDgXXvL5yb=S?UeBIu=D&Jbt{7QTt zDb3k(n$!pJeJCEBw!=znwlTwgOPAsog<`o2UQ4qb_)~)%;%uS5x}!HO*TKZtxUZuR z;9?@RTtu;pRqEiTlF4@ch*cP(M@1#?zqe}U8iP9t4BW5m=mM4rq8#F&meUxqf5iO7 z5A|7PwInUCFS*#}3Ck=vNV$)l6!F{l;*yCOW`oeQq8xbiB-`gMBG=yhN-hjD{*ZVP zC^KJx43}Unlj~UYws<8A^BH1yCx`bPSOQ~5^ed7_&$V2?gV?6f`x_wUTs8T6V#EUg>&5Ve zY<(^svbZb}mXD6)0)g#-oI>ILc_JMrypN zz66bN-8cN*wc#gGW1R@2hH|j728ymk%Kzruw{?HZ0(wH|NMPBxwY+?!e(59VP7^52 zX6sa`_8#S1w|_Z9;oT5EAgE`k^7obciu62(TQc0ToN7$I7lJqK!ponmvwe=G9>v?i zrv^!EIyrryMs_!;Q3IeX1iGaeVh1q{UM66S2D2zhk zguiAqTv&P3;}HW#!bs5yxBHk7{OR!Vrvq~*pdGAURh?)prYYOdpw{FovSB*$KyDL1 zy%NH!%`L264cCgU_Z*)AbmNxywiP9Z7NI@0+u^Iqg5b7KS2tc%fC z3&Tvx195(dgLLoB1hqAmL`RVyFe3%@3Z6&On>yk76K&#CEA=c5`)tfv42B~6XF!OA zVwl424le`~bQmkX+B6i3+K({2##A5*0Wd~+2nIa`G%TgluS?<2<$0k39I{6QiS_@> zpHRBkdV7p{S##$V;!`2=dU@KQfoTgF z>igZT168_fKkt5M^h0f0(wUY@x#X6cUWt)foX9ID%q}1sT z<@08$IRFbwon4djrLKJlBp8}!Qw3VsO<_v8Jmc=LHfmnrYn~FZIaYv$A1r@dKEKWiftky#abxHY|U6J z&GA@E!2IkgiO{KS+*sq0VoJ#f5pi|;!AhBk>{sx=<@8_?rM*yL2JNnBJg@OE(_n>A ze;Eyn-C|cjl9#(6L%>yc(E0f>_fJJ$aa$G%%uDOXK2zUNC}}BBPjnPN6^?F{_=g9b)D!@Ajt- z!VX3H@xogZkH&S3lCtWW=HNF~`_&^i1J7GEUa>hqpkQcStCVN|#+!;JYcU)P^L_s- zK`IkDYXtPg*JxAe56u)41AN#;rVb!E%Jq_ijw~J2oOGBS62t6J*cH|JyZ{dmF<|wU zRBM7X#V+2-qC|^e&hXH!7zOatLQm~CsIu*}b$zuBe(-8z!Er56)TPDUMOtNAuGMZ` zcI7MySU=W|h}|x1pN^@O$!$-<@4t5u`H981i{8rDG>2ibrGcB`dnc#=jCm-)s3|Vo zf;jwAr^9wCI*(aNusM#gMV0vxV%|bsx=&ry=AuM7*eJqX^dkhOsQ}y^^a@iZEP`Tj zx5psGVe_2>kUoWKn78O7iSZ_~)k5vv5(enDQw%gi&B$#<4zQCFgp!zMrVunyh`?q8Hz`?5~?ijEjr$W`bs01@`$M;iJ4H<1NIfd1xwHbuit|h z16Y7I4&R+!@Ui~AU0?UM5=Z#JzyPR+!iT%*ImSH_ejf4K1B#NEm{%`cymd@|-G{Na zTnpi8au)R%xo3IGPjtE4u#trpe_7(^`W@t*{#DIqtxv8^$t6?0841A(X8imIxtkn`Qy4;N5u&bsn$kWnK2NkswfA=?6hx10b*N5hM_ zpc{vZ4GMP;u^65lFNYC#v;wu;)5VzVt$46z1^&`V{2wPZy*K*nAuMs;691~Q+cW3y zD|=>~X1r;f@Gc7PNq(2L1*K!hywY*EXL?Q2YejopC&^-Om2obqrsqq(!B+o@Q|F<@ zUar#HL1QI*Lq{i|Bdr`&LgVZmbq{osA&=PFfjZ28#0vhpG=P*T#prTey@b7&w!qn4 z^l&7&Gn|0Eivz_#$PekJatL-zDX0&r>>m|s5i?5;4owj1R99MHC(V28@^fY&`L_-A n_dd_nE-0C^W!zVs9K!*mdVC{+ieFgYMpWpi{OQg3f`AVWbh3or==162eD69Q930s#Ur4F(A+hDe6@4FLfG z1powrfIdraUejyQdL$w4KI{Rizj(MUNnbKZy9lK;Zs~+=%^?mZDRz&*ho4egvq-=) z1iGp;an)+9=4n#kEu(2tUq!xT?&}c4wiO)vpu(b;%aJn^4u)~#NgR4sG}XhzAh$5Y z{k4BQi1G6VsIk{u+d^`%RAIYJ&i=_zE%Dh(bufYpVg?B+hDe6@4FLxMFc}62Duzgg z_YDIAFbx6$cmxRVz>O#D?u9^rf(tku!ZaE#Vt7G`!a&01d5h2=rAqmUCtI(Eemgv@MYq>~ZqGQj1>qwFV3f+XN^l4Q`20tih+qywqckCFB zaR}~HYtiLKd?elXPINH%^FT7Ihc8F>LKd&TcX6<05OchZ}@_l1H^v`^SeT}m5NW|uk$A6}W=V?@W z&L`$bIXS6-4?@@2__zc>Qo)nsG*iqD=Hy)aS zlK#BhdM_hSH~NC5DeKBb$)q!iZCM}xHH0G$5gB=6-)Bj58V||TqgtC>nH15@a9Y$KeBsDxzv70YKr6%~u z;MPDaNi@|ndri0ix9UUk|K)rnBDJ33lMN}Vi~y$v&%ozP`=l)OgTQg~4zmATdCdKI zipGK35mL4qCQ8~A8FJV*%<9CUg0i4fpyK~bQi^XrXrE`Qf!qV7)swIVAz$%7)|uLw zFyU}IBZCZ;DIu?O zbx%>;3MtlM<3f!EmG*h(-Dnx{mI@~ilLKBLf96R13%Y{|Xz{EDCZ{X+yc-6>Kkn9h z@!$QSPgPu?{KWxvnI!Ksl!hx^M=-xnCf8MwAU(2s_+%hB@^G>}U3s#cUz}!;YRc&T zA#|gksdv&mhe~&HqH9uUza8G^4Wo7i#qQc$)@(P>HvGh_>qZgB&0ALz9(?*R!}urh zJ2Rs=yHo6Sf*Yn*aJC{Url`^$49Y;oXcG0GchU-JZ(A10A!3j-GJ-VrL@q59JYEI1 z*2m*+TW>DZjmiS?a9dJmAIqt(4Ki6C@C+}`-3@XWZZjQXxZt_53(rQyP&b02?sG$z zTYE?Di>=f3WUA9(b;z3ozKM4*(^loHFEI3TBxU;?1?e`sw^n>v9FOz1hmu3BD9qn0 z^Ce?P!;-^F>>{|kFJs+ao;@O|00Y}6ubW8GLi=Oo95HyKUr;L z1y%=v@}}#;{>a%)Q9;%O|H8A6Ym%lf8cEo2kHA)QB9p*f{ICjVg3|u@Hvz_(@MFRl zSh#3ngZoyzj{C)xp@GJ*?D2pJS3eyL?6hH8tpFNYdU+Cp(xm@7Wi}_P1)g!#@Zwlc z-Lk%$^F2nz&IXbDb4XatA{v|RxYV!q!$Qho9Yy8Hm2hN3atp~=dirV?-jcDWnprfe zV7^p!OV2jBQY^6YHOvJ++AUH2h7^t;r`BCW1xNMhslghjVGoswE>}T1YiCkkrNmWR zA>-nzd#cT?bayCpy#BTz5BYerAJ_TCsw@;7HdNpL5dGbe?eY&vMo5|&?vUmmvQ>-` z6F@s*>8JO9Ok-{*7;vaM%ge#Vcwu9-wLAXGv_1v{|8?|f4 zkGVR#=AJLW8@v)kZsZbH6W3;kF(*25p&%;B>-!KL5~HazC?lTxH-J%vP(IstU|8G_ z_$}#d#mI+FCF+V6V+%~D##7ALF%t28BU&PKo%IU&n>cdEhQgtNlBz|EyL`83Dz$TW zNjK3YFkRQcjUQ6>9BKRor&>tr;u(+PoPD61{RVeCPpc~`{H zlMj~S|8rb}?FY`x`3q~j`KJM3-`DBmDuGCcA=oko9Gyq;{2Y@a8E4e$_tWZSk%?%U zDv!JWj#M_)o8raj@0nojX4S&Q5U?Xmg0sBlo{Mf_bGta8Jy{~eDwwzkce!ySd<7d<=@vD|6yUgfY+7BCvCgwB?=lTU0H1w7rVpZ+N*F%Xw z+jw-5I`1w_Ea3D~#5=ATDj$tN-55An=14a-U}}o^@oZF)s@iR5w%aH1PoqK~RV`zW zr@b04A>U1}Bu{}0+gK5p{*AUTUm;Cen|C=yX9wR;u&!kqJWMuzgqnV6i_j;L$I-cn z51h#oRs-;GRd-ifX8+*#`xN83aW_rUzbvu9&s~GMz4_LZfrBJu!dQR0G0bhy zteIgu2=i%fWY2e!0x?9~MzlI1+^lpg({dYJ8&lihzFQ$p!7)M{sMJCx5y_kpjlaCx zZ(puGI4B#`<(z+6@)=V>$3t*K#B4Pl$*PHpKk3XQyIaGSse&VpiW|wYyKuzIY!RqK zgh%bTv0mxs3aHb{q@Z6GADgHgTGZhbd8r-;1_@bC%4>Oj&G}PdA3lOH=yb*`HQxPRnj?@65Px0wAxByCHc3fQ$l;5}E(_qaPaGm7giPP1*+9s;a{kZLxjaV?-Cah@;Y`3!OY&;j zCw^$<0T)ZP3{6s-Co3UTaCsi=hfkuBbSPQ#3OIKi(=47NX|R*^IDiMZKqBUsW0diU zW6-qv$f-NplTVXVblYYLYoEdN!Zf?LI{(OK#hzaJ{0Kpd;+7hWX4F>PS|-UgNk0*5 zefH;6JOG$2QyRlh@bYDr8ICNH(TmRxy#(hzZ*;T`Vk+`ye}3>U7)yL&o8U?a@8PiD z<8)r>m%LUnvacI};}FEm=k#QfSMg;v~w7N{GFx)5_Vi=XB2QIeX6i-+O-F-~WEk|M&lY?(YJel8(SA zz$t-bs!oJ$#5);y8k~evJTRQ%M#wGzC$0P{MY6zf5|@xU07t}R+UK{VrC>A(N0bPW zL6-U~Qk4iV1i^544B+rEF}#vc1V)Gp$b4~yNhAp9ux0`kGU|+>(hT3=g@B{s5ds=d!D^X4rwy3-)F| z7Tnr>SAQhlqn>A3ydb;ZbT@td?Po_u?R3=obbEf!ahs$CNO|+Fb#yv_Z|G;BwX7l{b8PS8(l^lPe>( z79~ouW`e=mg5M-b26joplG4@pg)i-5<5Nznn63&{ylCLRXi>J#6-xu@g0R(ZTuroN zgB|nqf2~LuxXkyv*%py-+t-=XK9uNMlG?#u$v(2RL8M<0*H_RmXK`&Qp0+&Cux4f~ zZPOmF!dWhW`Q^N+(^eGcRUZG$#J-cSG}g#4ip;^_%(A!2>Vi@0xtLTZE$oniSuw5;a+_3MROhs(@esA6{h7wOBb1Wr(;fK% zucS7WZP9(DfqRl)&!~=)7lvIOx2azu*xut>j$T}Tix*bhLHAy2&WlEHC#a|HaoihnmD z*&tQ#TlN^AbW+k2-U=8ApfEf>>8pUdrX1n~_JT9d=&vf=^ZN^Jo{r^k`Enng%P6{# zj4$;xlRD=I@(X(7TF{Q-pN^Yoy5%_dhx&V`AFDahmzEvJPz=^jnVw?p#e>MW z5t;u@*Fwa51&*r8j8uP)O5{TM`jV`N+~hljl#VPrBU_gkfl=Fz!9SGpmfx2oo=@m} zV!DS({m?9^m0O*6N@&Y`F`Bc}{QD!qH(J-%<8w_J({Si^VYtIQS0N<0z;TGA^VOye zH`$C_s`k9Q0prpyyyIA4v-&ri^!n5ve2>3wDxPB{Ml7JA^yTcEFr?4^p&t>w+-Pj| z9NM7gAc-p%&)?)ArBPuoVvPpn@ewl>;vCG&#wmbd4(+EhpF3@n-!<9O7p z%79wskvnVru7ufiZow}_*5*xX(=Dp@%gjZ1p~4v5-X}p(14a zHu1HmI1jrHuV|1M-;3<8YT+=oUuUbA&~!@=#w+h5C!ZG8@YDIrDE#x~Sesa<*@X+s zn*E1;n*}t9{~Jk{jv}fA%!7Rz0amC^Hpe(d4UN=LD~G6jJUKq1ff8G E0@i9W2mk;8 diff --git a/kerberosV/src/lib/hx509/data/test-pw.key b/kerberosV/src/lib/hx509/data/test-pw.key deleted file mode 100644 index fae8e5cee69..00000000000 --- a/kerberosV/src/lib/hx509/data/test-pw.key +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,8E591DF1F7BA7038BC8A176AA9C47330 - -7sslSZnKwAzVwntpdDZkgOP/LOHtI8tck4XJFKWDLRm3YQ88TEOJe4aH6oAYJeil -imCrnaeTFv/KYYxcn0kNmMDMw2+AC5kKhzxFkBpB66g1IY4PJOWbX52DGPLj82IJ -ahB5J0eruslPSUv5NhJc5BbWwoGcOKo26vv0QSLgUIOm5k1g2JcsnhR4UptQ2Oa6 -EjbulkE9RvQWYlTfF3KKlpgNkTO+46EcYJ5a3rKYC3z3R7wklKrYw9WWdIIu5BE9 -Yw4BX07+bUDn7qtTIOcmtw3EUYFVRpSCeDequfRV2DHxdaQs12Brba+nzWD/rMZZ -zCtbkSSk/0O8qmiAtHVfWilE7t7jTxVd1g10ZHrvcOgKfr9Z1UgM7G1EMdjViCkR -CIAYbmDSVLXkmeONg/MZU14XJHizJR4po0iZDBBeyF6NvsvgU1w2Jfiocp1RT8QB -AnRIWKgzZ0chKjjSY/2+q0Fkzae7OdXdggRDVf4HMKWiayi0xz8vBxObRuXRPbmp -QhcyuQUcoiJ69HqFpODBelnwBfNbnMfq2w/u38ytv75Q5jqNoALCsVy22QoFz5RX -d+RFt+5VFZYUsqApA6yzLAJbvVcyIVIFWv8lQwsMzMBFk5gO2KAle0mHhJW1ufAV -6p1tMCWRjRxBMXKQ4O2lHWi2jRQjPWJyJMKKCv+yXEHwXSoDRKJYNsO57m/cDE0S -388gWkry4HT46Gnn2uH+eXavT4Wu/7NWCRuvgV5VLVik/L3OVx086w+3sZEliuk8 -WnfVqctp+BVQEwTk3CT9Bx5TFvAWl2vDs7bxkbAUsYa6yz8JQWIJ7DOsy3UmDKN0 ------END RSA PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/test-signed-data b/kerberosV/src/lib/hx509/data/test-signed-data deleted file mode 100644 index 583c2aa7fc1b542e3d42680e8a64afe8e243881f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3899 zcmcIneQ*@z9nO6u@$Mk8F+_~Tc}W~e(z|3Y1Td+w+1zb%3zyq-cP}B-w%P3M|#9#~QK*v^Es4!Umai|WorLER>iqw7x{k?ma zrAG!hRBrOX|-6qF2Ye%_@xq? zwX(2)$hiEA%Pcb)*BX1q<>lkDj^I~7x*-^{h+=X=LQz#&WgsywC<78Q;t~>7#gG)k zjbsC_PU%t<$%;8;NV?&4RV^XJPtFg6qR*DllxPKtSU%QqL?)1tg9(al*|!eENJ5> zrfNyujYef7j#SP3uci!)pH!oAOcp^HRdFLhlhClFC1t~a^oKQdM2cwbU7TC&W%^;eP8ak4p9q8f#@Dcyj43?Zkm(65f*63lA~knp3Z zP%g<0k)a?7NEXB71;#1k(k-$AMZ|<4CnYT>QscE$AY`5@^Hd<$XbMEbcsHKSypytd zMO87C1h1K*<1#fsO;m`ip`>6)nk*#rMe)s|VOsg+&ZW1y9)%<*D(u876d`H)3bz-H zrU3fgyvp*s^MsIR){_P%ol3hFOZ^5W^z6 zD;%T&37}ar#M2b#1~^|Z;-^EMZUiVO#PBFcchNj7;~BRZ5rD4UiI@)5MX|mB0Fmu< zkmh^Ms2wyP!r?j~9*M#v%hSF{kYrIf!iE`+!m{AZ{50nal5`j4uSY-v0wb!M3h{^w zkiptR;Gjd}tUj6=CYS=C6a3I{gv@fa;{B}4_|@OjCi5Y-u^JE@S5!kick)I)Pr zEfkFgew`Q<+p34`HFE^dKy++O;FfLX85rb-q9VEjk^XLg@y{;?D{yqqHn1OPaS>l2 zr+)S*IGwsCMrEzFsx8}St8zNwIiaE|18#CSM~VR#aFw&ZAwFiPY9c#??sqyoo?$`P zTf-#BwZv4lU(oPqc!Q7gHn!ZEMQex(hR}eYX!XP1Ml>;jq%nBndFNv!g&_&)DLBY* zK|wq?+A%c+7i~>Uli^B8jN?nDHZT072<} zE)f~af8bA?u~{uv_$8Juyjfcc;Z?iNdpmJkku74kEh&qSts$D>T^7zVtHK%ak>+bT zOcvc@2$&Q!AHuh?@gYq+&{kjH@lCV`Ymzct-9&WM+%mshxFg=itOKfZuLj6 z>^z%1b-DIr_k(TXxw*1ODz;qy>YoRXhxeV`_Jti)#}4oNL&r}_@3n7x;0ImzeslJh z6K{C_`()pVw)UUZ?D@w%6D8j`dhW6Rt*=}0{>_D54*r$0it(S$9h-SPw*85BE?aGu z0?W>3VjX;n*di-#v0I4(!iAfqcDv15_%^WucS`IP_VVMS${E*%l^>4%ymI2mf!Mpj z*7eo-nSr!6NQtT@E*zhIeg91T`kCm#Lp^Us-&;TR!Cmh(g_|B5K52Mnr{AAF zS=Dmv=*?JOgX$lK zFD#J`GRj8Hm_@;Q*0r=xX^JFdP}eHh<6iFy*O+4f^z!~xB_oX zRsOq_{rZc_j!V{4uP*yOk$!Y>RjD_$^BI_3U8N%hP?! ztETtdQSw~m;e*dVf110WJhpq+LuY=pEcEh;y``03dD`=LVORIBT_2sGgDWe`ru^m1 e_Q4mv;~08#ZF#co*}t9>&mTy+>`x#0?*9QqHq-6^ diff --git a/kerberosV/src/lib/hx509/data/test-signed-data-noattr b/kerberosV/src/lib/hx509/data/test-signed-data-noattr deleted file mode 100644 index 6c6d02fffcbb10a28c19b14ee7091b92964e7076..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3656 zcmcIn4R91^8NQz+PA-t9q0#{2d?Zdu;@xHM62L@g*}L1zE!-cwd-vP!cz8b2!s`BHt zPRGhh8#P^1HqAaeU9+xYy2dADR0F|BM20Dvs)W*NRzWh>)|yDlh}w{X%#4C0teJ{t zx{+#<*?B{ek*Zlkrec^bSJRrdK~-xrGOi|96AI#yNnIVvn5bE5L4Jx_hqmUmp{zP2 zB0(9}RAX2~kvE2nVVo5;SkTPjNimC9%`jCnZz>3Ax$_NIIl~J)dP%0eG;Xy zo-^ENTs1QY>()2Un*=|HWi_ozAPm;rNYoWHqUbr*G$H*F9gnFpG|Y@>T1upGHjBqq zZHUMvt7MTuP{_KRVs;go`MlSWGf1)}RuYzBZr(5ShGlolJ6N|W2y*AdNi?Vwoo`~KXflieo=&*rFj%%I60DYiBsdYJVF0k9JO)mi zvdBi8eLNCoR2--<5(ZhzA5DN4o zAp%`-USNfkz#uvvLcv5_;MhP)NN_wF7@&DrvUaUC1o7#3KVtfl9K-V{!67!5jIw|P z&>S5XScZ24TripnvGHy<0u&Ta2q?2ol6wg}Hv2lUnxKvVL6Y&-T6iM`gHb9n!)gepfMBFMa7$U*-6I`N) zRRuTdjWEy;<&GCsqlqd!*d!!2oBX|a)6Jr9mVzbP^AU6~hv0+4qdH^Q0Fd3}CvnAWWdZ5Lpf{~K?#jW6S z8M-8^`liOs#m44FmkaI*j2cZi$zdO9CLF+xE^k|A!o)aR>_VS%ReL-mqG4=G(mdal z#&}TFNpEs%koWn!K2}6)lSNZ(BR86N#OFs-Q%ISB8_%~8BPR|k$jHM+h64)X!PZXW zJRG#mXQfr+ne2@&^y0fo=&$xGG9KKQN*m662<1@4D+c zL8Xi$4U-EPNg|RI9bOp9HF*C@0^Cj6yqoeaN_UHhm8VxM@jJNC$PapmB9;?x5boVM zaSArX7+jiYSebnPTHZ*xWauKe2f#l_t#3^dB}2d|@E%x~%T5jg%H^7!w*Qx!w*L$M zrCF!L?tl-q^#3p5_DXowZuPCAR#Z7t70xB~nTd5&C%ntTUgj|DksxiomcwAxG6&C4 zAH8!a)k$^u*ZV1dX9u|m{K7A(t1q=aFnZk9fbKV5cr0~f^m6-uo<4Xfci~#g z`JVeWOPA;C_b%Uc?cP7_IGcRx((cy+qIx1hGR+ER?iscn|oE_JGS95jEn-f1>Id%L;>AyrbZD}gc z45W2JN=y@V_3YfqBeUKuv+~hnz0b?9Z`pU?;8#~{?Adw8x4qd78=h$WVZgg&ZddO= zwtu2!-vocybK<#2{(flNj-S0e^T?@8s`HgMzq0-4V;4J;9s5Vlo1VD`uFRcp>^ggF z`thxY{byF~t5H9<S9Q?kb+TKg0 ziBHOYj+I#kDppbW{EJgm-N?$fC^f%A$`BHOy_jjIGAKGJU z-@CTAuAyqRC%UVz=gK`R>gzsz^3>O=P7LfnvG=bpo_c&)c-zlsZXaF$a#z(0^Zx^i CP@WzD diff --git a/kerberosV/src/lib/hx509/data/test-signed-data-noattr-nocerts b/kerberosV/src/lib/hx509/data/test-signed-data-noattr-nocerts deleted file mode 100644 index 7de2f44928855c2f897ce32581b3ab9bb0509cfe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3142 zcmcImU1%It6i(7M(oHJ0Md**hF_k8%yV>1@3XPU_cJ^*|a5J-=JDVRA$z|OBw>X znS0N7zVn^${$$pBbKQGSY!o;C+}HU;*X8xzk<5B;x~sD@+mqSbz2}7|cXb`v(~(*4 z$!{&|yu99Xa`$>q)~b0C;I9plu!ZM9)$H+?lU&zmCIY=CWXL2rx|XeTef! z5VDAcOU#wuamHk>7m3iDZ3vGCUco{Ixfvqh{#mHR$l_JTPnm+Q%(NTSHNIuoN! zX4#>8$VIZ)7AuFlxV8}qtVh@_h3#3sBwMhlDMI2;z_DE{iJ7q>J{Bus+7io>W$U(B zp(2iNdvzAJL>k^s1yi=EvPlJNbsH#}#M^l`n@(!h<#MM{N3X@A%QmI4Cmb_}P`3pO zJ=>4A#E+XMX|=bzRo=)D=nR{Rk#a>~*JEGF@s`m7MBki^JK>2awtMUy9>yI+x$E`{ z%(ABQ1qT+mIEQ$l4E3b( zLg}oa>9Ht6`?LzNiW&uK6s$?bB!J_xX-sH&l84+hSVjD#Q%kcd76C=igKFrOspTq` zVN#fxQ7DG=_s3J1U(u(5OqESSDHtYbcuNC<5zx}_1CL^!on$!q#p5)cJ+!-A4F zu35OuGLmsd1lk@6Mghi&sTL7P$!R6cnvSy;G)tH13YbrUvSM1AS}7?elq+W0phU_d zE6ZzCEh*YK$qxaNz{Ef%h;9KbDy7mrl_J)E3e6EDspLvATAT?B&1)u6Em_glNJZt4 zUkQ(rGEp@-AX5ZoP|WG1lmuZZIak3&I4Qa1m2qW^P#AcCFxVEgVv=!58Kt0=+-6(G z3?ok^6v9(tPG~BjFG0zWJt#nhk|ZXvlsG-2pkO$SYjYK<#nNfIMNG3&wlqT@lt4ve z6173H3P$H+nGHQ|E*ioxrzNh`Bkn>HCW{2WW4raHYKl~aqD@pwqP4BWtY{potys{> zSVpp%QhH~v}i>ww$yKKg+w9>9oGv__nmDH&h{k|cu#QX6L^y2J_-aLzJ#SO89mnO`!l}FcdJLQ(4o8Tz~f1FzHOc5C#oVj}G)cD5N@3{2lkH1x>4&{cgk1W!Tr7ynv z^qHT(e0l2E57*wma;s3DdHS|#9#~QK*v^Es4!Umai|WorLER>iqw7x{k?ma zrAG!hRBrOX|-6qF2Ye%_@xq? zwX(2)$hiEA%Pcb)*BX1q<>lkDj^I~7x*-^{h+=X=LQz#&WgsywC<78Q;t~>7#gG)k zjbsC_PU%t<$%;8;NV?&4RV^XJPtFg6qR*DllxPKtSU%QqL?)1tg9(al*|!eENJ5> zrfNyujYef7j#SP3uci!)pH!oAOcp^HRdFLhlhClFC1t~a^oKQdM2cwbU7TC&W%^;eP8ak4p9q8f#@Dcyj43?Zkm(65f*63lA~knp3Z zP%g<0k)a?7NEXB71;#1k(k-$AMZ|<4CnYT>QscE$AY`5@^Hd<$XbMEbcsHKSypytd zMO87C1h1K*<1#fsO;m`ip`>6)nk*#rMe)s|VOsg+&ZW1y9)%<*D(u876d`H)3bz-H zrU3fgyvp*s^MsIR){_P%ol3hFOZ^5W^z6 zD;%T&37}ar#M2b#1~^|Z;-^EMZUiVO#PBFcchNj7;~BRZ5rD4UiI@)5MX|mB0Fmu< zkmh^Ms2wyP!r?j~9*M#v%hSF{kYrIf!iE`+!m{AZ{50nal5`j4uSY-v0wb!M3h{^w zkiptR;Gjd}tUj6=CYS=C6a3I{gv@fa;{B}4_|@OjCi5Y-u^JE@S5!kick)I)Pr zEfkFgew`Q<+p34`HFE^dKy++O;FfLX85rb-q9VEjk^XLg@y{;?D{yqqHn1OPaS>l2 zr+)S*IGwsCMrEzFsx8}St8zNwIiaE|18#CSM~VR#aFw&ZAwFiPY9c#??sqyoo?$`P zTf-#BwZv4lU(oPqc!Q7gHn!ZEMQex(hR}eYX!XP1Ml>;jq%nBndFNv!g&_&)DLBY* zK|wq?+A%c+7i~>Uli^B8jN?nDHZT072<} zE)f~af8bA?u~{uv_$8Juyjfcc;Z?iNdpmJkku74kEh&qSts$D>T^7zVtHK%ak>+bT zOcvc@2$&Q!AHuh?@gYq+&{kjH@lCV`Ymzct-9&WM+%mshxFg=itOKfZuLj6 z>^z%1b-DIr_k(TXxw*1ODz;qy>YoRXhxeV`_Jti)#}4oNL&r}_@3n7x;0ImzeslJh z6K{C_`()pVw)UUZ?D@w%6D8j`dhW6Rt*=}0{>_D54*r$0it(S$9h-SPw*85BE?aGu z0?W>3VjX;n*di-#v0I4(!iAfqcDv15_%^WucS`IP_VVMS${E*%l^>4%ymI2mf!Mpj z*7eo-nSr!6NQtT@E*zhIeg91T`kCm#Lp^Us-&;TR!Cmh(g_|B5K52Mnr{AAF zS=Dmv=*?JOgX$lK zFD#J`GRj8Hm_@;Q*0r=xX^JFdP}eHh<6iFy*O+4f^z!~xB_oX zRsOq_{rZc_j!V{4uP*yOk$!Y>RjD_$^BI_3U8N%hP?! ztETtdQSw~m;e*dVf110WJhpq+LuY=pEcEh;y``03dD`=LVORIBT_2sGgDWe`ru^m1 e_Q4mv;~08#ZF#co*}t9>&mTy+>`x#0?*9QqHq-6^ diff --git a/kerberosV/src/lib/hx509/data/test-signed-sha-256 b/kerberosV/src/lib/hx509/data/test-signed-sha-256 deleted file mode 100644 index 20228788ebcebecfe201e4cbd1dd6a47dd8fc097..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3919 zcmcIn4Nx5A8RmX~a3sN^g&2$d0&N2H4)zEMg2Z9DTev01-DP(V1UqAvy*+Nj-7eYv zjvvJst__ZyErY^Dya(>4xLZIU+WpH71|nzYlgF%GGdPUASOsdcPr`hI%{ zT#|93PGpX`@ArA1_j#Z1+dV2(v@x%sdcrsHpJkSO>tw2^nMxJiX0=${Mbxsqg3S{? zi)^!7Ex9>Vs?fW*)H0bWTxU-ex`mixAoz&Lz#>*86jkCfifHN@jHH;T_R9#zWF%=S zmR0OT3MQ+Qh8#hPYEEIns@gt9tu4nQ;uH%Z98E$q_ORGn^bz46G}CNvvop64eMHO*k7`QkP_N1Q?6@ zD2i%&!f>Kt1;>!4o8MXz6a0i0QKE_j!f2`!iMosiWj&!_4CxQ*+K>`~29Al?R3fUy z#43cbym83;rZPLJy4;C{Di+$Piie2}(kT+s#9_vuED?XfR)rW(C(csS9y1KEPbLw;$MT2|wh7%d#~^5jxL_CS zWxS}h2MInH3h)9egaroC0Wb0d0|LjkhJ_%f<(P6$9M#i(PGO3$^kz=TqPmK!;%JbCj&CjT#u7T z0wH<-gF!D(pa7m{xGvVi@V6s> zkkp_Jg?YvaK?K?i4=5lQOvBpNFwdIOu>pbMxNt~dgMlgny-${9na!Ce6Ud1`%qlE@eWZh=q1I$L&f5l{}t zWXkeCDrNZ){-sHq)nbJYdDYImgj;gqRlC}K3w3jzEo`?fEsl+>qZ;8|7S1xK!5Q(; z?n0`7Oy=Ea{r+Q15xkOSsPXS- z6M%Pp+xV^=YWzX#_;}8_Ejx>??@Y|CoE}~AhpA()zd~Jjqk7NQV>v6(H;q$Iho`rm zU3>BQ{d0-eFIAoBy1zv_d!%@0$+k;({e8=9=()KaUwEqg_|fP7*7mcaJM25|{Xyp) z_sslm>{Zu)_ip}UOY1KxpZ#a^*z&tyKD+y)j_R^^Z^-Q|5S}kC8GZ4{@ySP`-+T0} zOIDjD$FjeXYA|yyyU}i?a;QQ`p{&Smw^?(~P-UdE++Je8X?9pWU3g*D2P3~+Id<&l z(ewTd9TnM`fwVSAiK(D2%+95_i`-Uc;Ji z?C?GqeyHNy@xE`Yf1&wb#jm{Ag74E;{Po-YX%?l7rQMnY)OSMb%A?W3NrUHhlMY8_H|%nYKT+yVN3FT5op_F-x3J9-UoX v`rG$AZvEAv{6~NE%*BJV`&zzSdUEcgubv8Z9N77rZ^ z!DKd?va^U}o@;)oVI-Ni+MLXDa1l{O@ZpiF@tPP!VKFM8kSwj#P%y$vT>{b~0t(8K zCPO>wC! zDt7UR6S^f)?dFmD{Vugzj`9+0C}-pZA4RmJYN8g`1SE%HVK5@eQMoH&L#!qTyCZTm z2F*SpBuEui2)2>YDAMDoND)*)=@mkF9A+3HB&wPscE&YPmJlz6Flo$LmE%fK&_{qV zuOv`dR${6R^@&;p$%_6h$2E)}lS5)y41zGSWJA0npdLYqiJAuK_b76&7=nft;Wb@} zupEubeWKKbGW1rA+G>Mg`IeX#K&}B z;r6`IBtV~?)hi)ts&04PJF=oz5af>W3Dha1oUh49kU}sAcnanclfkknkzjWSNP-hl z7$yK4%A?9*tqq1VSmt*M00Ow;^)X_n*uw~^+eG1}}-gZQ7@iP?5 zA|He37QcrEB!Ff}FGo|X4d9%ffQ$Av+Yq22ua83>x`pOo8RxU<5drANoygaOS}4Zp z1|YJL_Rw6r9<_<)yf|DF#3PZPWH{Ox@Q@7h2N=JPrLZhGGZ)P|JtW;ixvCJ5fWU}q zrMw(s-K58JU8aC_O`?qykR%&DI+`8{5_QoG<>YWi^DQSR2mCy6mG~(qjT_V!3S=Oe zb{m!iU|DK&02aX{=H?<>$YzQ~*|IeId@dG40X$1Ft+bP3 zzluCQT!SVQU@02};Yd9^pnza74Qm?%EUimNdpU|>0)CG6c`GoG+t&u#09g`tyL6d- zUcIO-@O~E*n+nZ92#Hz4h6DNn!GFC!VFby#9=e(GIw{P_ zhk@E?ma2fF(ZH`6qhedNk?nep;2DUHjS1XR%?tyB+)z|RHzCs13NWtO#b5=NPTL0d z11&b-bf?u%9R;gZRe~W=sV{9vH5y8-R(MXxs8oZS9L|xX!3A7ut*VanYqA_o4WX}F zEp~ekud4Nal4aM2Wx11A@Th;2lXcXr|8fegI>c*yHGZO1^*CzKzyK2Z;fd#%jS=I! z1*FE|Aj1U(@!)8OC1T zLN(rL$BO7qyg|56=EMOw5WVowMBPH-vuk-H<+Pzw;C2B2Jhi?xNu&({x4@@hohduM z2nefnBx(2`ku-b+|G^QH(O`rRe$`IDgd4KqRlCx07jb8fDPT6`7e)G46Ls(|3ul>; z;fy#*M;>9plR3pkmLk5mWC2k})Yh!2A!_PsiLFZ(IB>T%-6cw{S?(wz7N&qLIwUp- zG5B~U0Yi3{X>d4;82pZLa4_p{+Yb~O-yWJ;b|SI#_eV~jKTFJ9sC;n8>8zz_ullDa z0w;D%ulnzEho@rauU4FE-Q5tJK2>yJ@vf_1du#io|JkX1iw>1eyzuN_n~oLUW8QcF zk6Z5f=IEJ$SM2|Jq~i|_jlU^>`rQo!1^2x?{lJxtmCN5*nB8LGo-10M`1PrYk%z)R z`rf6hMw21SaJY_GtLMDD*lZ-Sh&)JPd7;^CGG@O)EXSP!^J4SulYP>~yqS^@`=4Jn zaQau_e|YLQmStuJ(wZP8s*ISK9DV7;NY%!X(8=+(KZf4kIQ+=rAKtm4_5RzRtctE( z`*h_qjaB)hyV@>qT~{&O&mOn`_Jv2^JF&Ad}WCn{ba(y{&^%eHuK_Rm!u76E^OX^>CE&U zSB@R{x3B*4iaoi<)t!qbt6n1p56&YNItKR;yP#6Dzab5k#BDh_mHSLaqh+pjN9KaX znH?ix&ABagCQP|R!Cc#DG-mCAqR!62@o6A(bF%L)Fd1{N9WT$UJ-FIDxaZAbdD}O} zo++Mk9^AIpQ#{4IG;y)@!0R=~#+TQeFB<&2xAoO~_dfN}!S7F>wHnAN%W>_hd@yPqn#e9U_EXZQY7 gocT(=VLbf!w;t;+*&@`fD{JWa(!1H=O|PB#KcPwO=l}o! diff --git a/kerberosV/src/lib/hx509/data/test.combined.crt b/kerberosV/src/lib/hx509/data/test.combined.crt deleted file mode 100644 index ae16b63c49c..00000000000 --- a/kerberosV/src/lib/hx509/data/test.combined.crt +++ /dev/null @@ -1,69 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha1WithRSAEncryption - Issuer: CN=hx509 Test Root CA, C=SE - Validity - Not Before: Apr 26 20:29:40 2009 GMT - Not After : Apr 24 20:29:40 2019 GMT - Subject: C=SE, CN=Test cert - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:e8:6a:8a:12:02:ed:86:e3:1a:b6:79:18:cc:ab: - c3:d4:cf:30:f4:dc:2a:90:71:c3:00:18:20:84:73: - d6:a4:55:b6:71:e4:33:fd:b7:a3:e3:6d:d4:ff:29: - d2:56:7f:40:63:e4:bf:12:8a:16:7e:ff:5b:e9:6a: - ce:50:b4:e3:85:11:a1:22:cd:c2:b4:e5:46:b2:0f: - 3e:04:85:7b:a5:4d:3e:7a:b8:c7:7c:d0:2d:fb:95: - 60:d1:40:42:bc:28:ae:f1:3c:7c:0e:5f:ca:e4:8f: - fc:4a:2a:1d:ef:10:05:4d:09:54:b7:12:16:79:bb: - bf:cd:a0:92:66:9e:94:e1:ff - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment - X509v3 Subject Key Identifier: - CE:77:6E:DE:0B:F4:21:F8:78:C0:1A:7C:C3:B9:66:EC:4C:3D:4A:23 - Signature Algorithm: sha1WithRSAEncryption - 45:23:30:f4:ce:b8:c9:b6:a0:2e:4a:a0:64:bd:be:57:d5:64: - ed:4a:8d:95:a3:9a:19:3c:56:7b:14:a6:2e:6c:37:37:ae:2a: - b1:42:2e:0c:b8:7e:57:f5:5a:38:29:8d:78:53:b3:2d:c8:c2: - 97:f3:ab:51:6a:c4:df:86:97:ca:68:55:39:e0:f8:99:5a:bd: - a4:e1:34:50:34:8f:70:d2:74:2d:b8:90:ef:b8:d2:22:3a:ce: - be:82:a8:4b:b3:32:cd:1b:8d:0b:69:7d:0c:d7:b6:33:dc:68: - 41:76:a1:36:20:8e:ba:34:45:be:71:bd:ab:bf:74:77:87:e6: - bf:7f ------BEGIN CERTIFICATE----- -MIIB+jCCAWOgAwIBAgIBAjANBgkqhkiG9w0BAQUFADAqMRswGQYDVQQDDBJoeDUw -OSBUZXN0IFJvb3QgQ0ExCzAJBgNVBAYTAlNFMB4XDTA5MDQyNjIwMjk0MFoXDTE5 -MDQyNDIwMjk0MFowITELMAkGA1UEBhMCU0UxEjAQBgNVBAMMCVRlc3QgY2VydDCB -nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA6GqKEgLthuMatnkYzKvD1M8w9Nwq -kHHDABgghHPWpFW2ceQz/bej423U/ynSVn9AY+S/EooWfv9b6WrOULTjhRGhIs3C -tOVGsg8+BIV7pU0+erjHfNAt+5Vg0UBCvCiu8Tx8Dl/K5I/8Siod7xAFTQlUtxIW -ebu/zaCSZp6U4f8CAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwHQYD -VR0OBBYEFM53bt4L9CH4eMAafMO5ZuxMPUojMA0GCSqGSIb3DQEBBQUAA4GBAEUj -MPTOuMm2oC5KoGS9vlfVZO1KjZWjmhk8VnsUpi5sNzeuKrFCLgy4flf1WjgpjXhT -sy3Iwpfzq1FqxN+Gl8poVTng+JlavaThNFA0j3DSdC24kO+40iI6zr6CqEuzMs0b -jQtpfQzXtjPcaEF2oTYgjro0Rb5xvau/dHeH5r9/ ------END CERTIFICATE----- ------BEGIN PRIVATE KEY----- -MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAOhqihIC7YbjGrZ5 -GMyrw9TPMPTcKpBxwwAYIIRz1qRVtnHkM/23o+Nt1P8p0lZ/QGPkvxKKFn7/W+lq -zlC044URoSLNwrTlRrIPPgSFe6VNPnq4x3zQLfuVYNFAQrworvE8fA5fyuSP/Eoq -He8QBU0JVLcSFnm7v82gkmaelOH/AgMBAAECgYBSUxqhEqRsORmHNRHRva3aPaHL -ugjhrUozSFiMUjPfdfTwFrNL1baZopfl4jx9Iwn92FLOEFezmGRII+r8r3Y/SY9k -9SS1X4IlPBIHggDKun9OJlpkAFKlOU6HDlEdB/rXR/unzGHQYgQ9DqX3OUEEHPFr -OOxm0Yj5gvLXvCJDgQJBAPipSzTEAQAtNE/xAnTtZzZD6ABiLE62kMCBJ3dd4NBF -3+u6nssdExpdXBFrRtSqMxpbKZ5C+j2LFUI+1I6Zdd8CQQDvRoJNb5mUg3Xe+xkX -JZ/ezXv2bq8pJgPPYnMC4F1Z9KqBRIl+6hDZanKkJP6+JKzHzyNALQv8++/4u/PT -CtfhAkEAhpSp3X8Pw5azr2iTmdE7gUUzdbGspVVt9qJwR8yJdm+7B4xTkT7FLgnF -YLAc/9C2I9efKMa7RT/XW6lBxYQNJQJAe2SMK+zicbE9pwkszkAL6vVi+RnpYLoG -+vrVPuV/nrVK/LDgiz+gAs8fYcDmUh5NsBkFH8JbTVKLVWVv/yS3YQJAA7u25lSb -JMuylkeVzpg52uaOTNK2NtOH8cXZOSMp8q4evQsrvoiVF4MGoZp0zVGpUUYIUaLA -BN+BKthYPQEPPg== ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/test.crt b/kerberosV/src/lib/hx509/data/test.crt deleted file mode 100644 index dc4d2a273b3..00000000000 --- a/kerberosV/src/lib/hx509/data/test.crt +++ /dev/null @@ -1,53 +0,0 @@ -Certificate: - Data: - Version: 3 (0x2) - Serial Number: 2 (0x2) - Signature Algorithm: sha1WithRSAEncryption - Issuer: CN=hx509 Test Root CA, C=SE - Validity - Not Before: Apr 26 20:29:40 2009 GMT - Not After : Apr 24 20:29:40 2019 GMT - Subject: C=SE, CN=Test cert - Subject Public Key Info: - Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) - Modulus: - 00:e8:6a:8a:12:02:ed:86:e3:1a:b6:79:18:cc:ab: - c3:d4:cf:30:f4:dc:2a:90:71:c3:00:18:20:84:73: - d6:a4:55:b6:71:e4:33:fd:b7:a3:e3:6d:d4:ff:29: - d2:56:7f:40:63:e4:bf:12:8a:16:7e:ff:5b:e9:6a: - ce:50:b4:e3:85:11:a1:22:cd:c2:b4:e5:46:b2:0f: - 3e:04:85:7b:a5:4d:3e:7a:b8:c7:7c:d0:2d:fb:95: - 60:d1:40:42:bc:28:ae:f1:3c:7c:0e:5f:ca:e4:8f: - fc:4a:2a:1d:ef:10:05:4d:09:54:b7:12:16:79:bb: - bf:cd:a0:92:66:9e:94:e1:ff - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Basic Constraints: - CA:FALSE - X509v3 Key Usage: - Digital Signature, Non Repudiation, Key Encipherment - X509v3 Subject Key Identifier: - CE:77:6E:DE:0B:F4:21:F8:78:C0:1A:7C:C3:B9:66:EC:4C:3D:4A:23 - Signature Algorithm: sha1WithRSAEncryption - 45:23:30:f4:ce:b8:c9:b6:a0:2e:4a:a0:64:bd:be:57:d5:64: - ed:4a:8d:95:a3:9a:19:3c:56:7b:14:a6:2e:6c:37:37:ae:2a: - b1:42:2e:0c:b8:7e:57:f5:5a:38:29:8d:78:53:b3:2d:c8:c2: - 97:f3:ab:51:6a:c4:df:86:97:ca:68:55:39:e0:f8:99:5a:bd: - a4:e1:34:50:34:8f:70:d2:74:2d:b8:90:ef:b8:d2:22:3a:ce: - be:82:a8:4b:b3:32:cd:1b:8d:0b:69:7d:0c:d7:b6:33:dc:68: - 41:76:a1:36:20:8e:ba:34:45:be:71:bd:ab:bf:74:77:87:e6: - bf:7f ------BEGIN CERTIFICATE----- -MIIB+jCCAWOgAwIBAgIBAjANBgkqhkiG9w0BAQUFADAqMRswGQYDVQQDDBJoeDUw -OSBUZXN0IFJvb3QgQ0ExCzAJBgNVBAYTAlNFMB4XDTA5MDQyNjIwMjk0MFoXDTE5 -MDQyNDIwMjk0MFowITELMAkGA1UEBhMCU0UxEjAQBgNVBAMMCVRlc3QgY2VydDCB -nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA6GqKEgLthuMatnkYzKvD1M8w9Nwq -kHHDABgghHPWpFW2ceQz/bej423U/ynSVn9AY+S/EooWfv9b6WrOULTjhRGhIs3C -tOVGsg8+BIV7pU0+erjHfNAt+5Vg0UBCvCiu8Tx8Dl/K5I/8Siod7xAFTQlUtxIW -ebu/zaCSZp6U4f8CAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBeAwHQYD -VR0OBBYEFM53bt4L9CH4eMAafMO5ZuxMPUojMA0GCSqGSIb3DQEBBQUAA4GBAEUj -MPTOuMm2oC5KoGS9vlfVZO1KjZWjmhk8VnsUpi5sNzeuKrFCLgy4flf1WjgpjXhT -sy3Iwpfzq1FqxN+Gl8poVTng+JlavaThNFA0j3DSdC24kO+40iI6zr6CqEuzMs0b -jQtpfQzXtjPcaEF2oTYgjro0Rb5xvau/dHeH5r9/ ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/test.key b/kerberosV/src/lib/hx509/data/test.key deleted file mode 100644 index 37203bf0db2..00000000000 --- a/kerberosV/src/lib/hx509/data/test.key +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAOhqihIC7YbjGrZ5 -GMyrw9TPMPTcKpBxwwAYIIRz1qRVtnHkM/23o+Nt1P8p0lZ/QGPkvxKKFn7/W+lq -zlC044URoSLNwrTlRrIPPgSFe6VNPnq4x3zQLfuVYNFAQrworvE8fA5fyuSP/Eoq -He8QBU0JVLcSFnm7v82gkmaelOH/AgMBAAECgYBSUxqhEqRsORmHNRHRva3aPaHL -ugjhrUozSFiMUjPfdfTwFrNL1baZopfl4jx9Iwn92FLOEFezmGRII+r8r3Y/SY9k -9SS1X4IlPBIHggDKun9OJlpkAFKlOU6HDlEdB/rXR/unzGHQYgQ9DqX3OUEEHPFr -OOxm0Yj5gvLXvCJDgQJBAPipSzTEAQAtNE/xAnTtZzZD6ABiLE62kMCBJ3dd4NBF -3+u6nssdExpdXBFrRtSqMxpbKZ5C+j2LFUI+1I6Zdd8CQQDvRoJNb5mUg3Xe+xkX -JZ/ezXv2bq8pJgPPYnMC4F1Z9KqBRIl+6hDZanKkJP6+JKzHzyNALQv8++/4u/PT -CtfhAkEAhpSp3X8Pw5azr2iTmdE7gUUzdbGspVVt9qJwR8yJdm+7B4xTkT7FLgnF -YLAc/9C2I9efKMa7RT/XW6lBxYQNJQJAe2SMK+zicbE9pwkszkAL6vVi+RnpYLoG -+vrVPuV/nrVK/LDgiz+gAs8fYcDmUh5NsBkFH8JbTVKLVWVv/yS3YQJAA7u25lSb -JMuylkeVzpg52uaOTNK2NtOH8cXZOSMp8q4evQsrvoiVF4MGoZp0zVGpUUYIUaLA -BN+BKthYPQEPPg== ------END PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/data/test.p12 b/kerberosV/src/lib/hx509/data/test.p12 deleted file mode 100644 index c644bb46d983d089f78815d16cf4e8ab6fea1c42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2320 zcmY+EX*d*&7RP5ZhM3nfmO&)mX~;5mjV()dB9mpZ6cfc{iy^!jV<&48y<`c)YYkbV zgh3c&D?+wpN@XS?gsbPd_jd1xbIx=A|MQ$r=ln1f4lWQ7jG@5Bpd7Msrg7WcKz3ju z1=bCrz&eiPHVlO={h1$sRi6w~n-YyuqlndE1mye*|85k_wX z$Mne0T+U2}sV;APp~+$BpTj5pCrUXKw*JQZo2i#sZBLb2dg}mFtt7u?{nd5$de*hZ z)>kXmBO~sawpA%@-=4Z(thU9f+DN71SsciS`CbI_wh=@rAJH){za2bbvg8vmC9)?y zpzOaJ4_b=Md{`4!ph;h~gF7i`0-p5=Mc{gDcv75v4S% z4fs;jrMB6KdkoyY93%IMX9JF92D`rUA?^}oOZ*E{4Ddb0we6DQIF9tKR~$ww_?la z$1prAA%xCNo=h%)uSKcXITa(N(CS@W_Ejd{soL@k~8i)qvL{cQ$w`mr>i zh6L*%sG!ztWP2lCWN+5m)s^Q{cXWu@IT^?7EcN5g^#|=*ZKRo7Of}IPc=IQv>tf>m zPhtHkX4bAFZ`*)l1&ovIxF1Wkk<<#$uq;2+`^bgojBfVN} zuoUe7)Wkk<__0aSXu*-*{GmVBO(bLCq26WbH+m`K_B&a$rqWG;ovLw50Ec8A$wvFp z++<}i5Q4}G{@$w6{#A(NVj4Nwg-h)~oqlkBP0%LtGE3Qawcz&32>;=yU9Fm3Y4@Ep z)vwL1!Q(VW?UXeiC;L5oBHO_I0-EY!NN+UJbvENtikz7%D!powAB0lP58Z2zhmW@G zG7B9wM_dQn^n?O}7YqaEg|lHo=yFv8G9s%jtQy7phDEU&jJipWy^-l3?Fl_Sy+_S2r#OWilQl$bD&4 zt0-i&m1kct^Do7g6ZOVY$tY`fioMfu>pxuo+_}23B2i+uefxyUQ=y!mS(Izn15jv4 z?HW1V&{Tz^*1gM_;3#inS|EP4TRfme#7I>_)k2865&C3DC6s*RbJoz8 z?f>Cl91b?4aYAkrbeEO%!W(lv$%_`ajfwDFsr4TKOYBYVG$Ex6XmXWv>bqz1O$o$= zSZ*3`OSDGM+W=s~Lz*!;MI~JF*?nm!O{@L01C&l+EQ!x!ssh|RC7A+|eu<#?;# zSM;B`LcKNR;caO1Ht{{4@BaLFP|VUbR>LjZ-efM6pKVYaL&$U$a5|stf(^6U34rfU z=?^_QZqC?3XP_lROCIyN*=8w_R%(QOwsI8wRAitjWw(8H^e@egM~$vZNNTcsMg&R> ztx_L4US$yTTn13j^Bz{01lD85Z^E>?BNfN8ed25Esmg(|3Th4r-SZmj)Ca^*d{F+1 zxqK^GA5SlE+1PVZrOav!dt-EWPs`qO-_JaKPk9ylhVMY?4I+hE@x?bqrEff$#!$d= z{{!4Y3ivpL0!ALm0!P6MJ@y~`asokx6i^w40xJGLDuaJf8IjCoU1#Lr|BK2H3Wy9} zFxgny4aAr+9mqOA&4+ox#4Yu<%2!ydvcX5wnLYv2ZHOgJM1Sd`kf`a7^Gv<(sl_CtJ{T(T4A#op|H08!sb+-zU-w4C@&aFr!VZ%1t&v0@j=q0WtROt{@PcV6eGe?&cDhmeItrs1* zS1`H~KvZ#@zr`CFOHi!IkS!ID@N(&w_yT;aseV@TRGs29y6{W9%Z&o1{#0A938Y76 zq!37h?LyIhRjIjI!w|lA!a(#wXhxw`r#JUC^fxoxyvoAH&$pO&zC?Vee{nU_Nwp#^ zAR&-y?7AUUGbl|>n{^=Jxr%<^*0J;-npYsq(42;b!yOe|acA!d{dmErc0^`^wPwdX zFo{rjU`N;Ox2x}tfK~nV>4M`mpTe2*`mj@@K!0>p!eg?@cR^OHqxL@pTHg+C*iz)W z6D#koW_UI?Qma`reXV$Lovo*xEvlMtMb?s8+|=~>n&OUEZv9y0%Ye{ngn<U0%KIm-=-=Em-kUy~-k}b{X-KBmnh~^B^dhk7T6F(hQ1{1`TK6QQxn` zZq#uE#fZ}NTnAhQ_yPz3BH-3hy#ly#)XM{cj`B@F5Jm|jiQ#~ zF^94+3oDf~7%^lsSTGa;X+4HqhD3%EhH{2tAUlsC706~_Fpv}HH8e0VF|sf;G%++a zi2`yBk+`H9*Tkq~z{|#|)#lOmotKf3k(GhDiIE@Vb}ptSMn;BJ*NxP!|H%yZ3gytA zelU8%-xpuM&#N^#_j0$zg86S++U(r*3a=mD-}$*=Yk9-v4Pn`HzFcv?ysxXz~O zI-)0wbNl^2f81GMe>%RQwfp`h)~Pa2%->x~^5nSxjp@y^S>}Hft7ZtvR_;H}&!zC= z{nBH6Q{u#@2s!<`uC&)s{rGJ!zp0N7-hIJeEBoZ{M)m50h5yvuJHPyCSsEUz$i&RZ zz}P6ru($ipLi-Xs_g)4rcc=Shdz&zYkRlZrhKvl$H>8z{)YWb^e6#8GgodfAk^E0Y z+jQq%H+`v8^1Rhd(qBDBJh@uyU*yZO@(U*&DryXq!otGEZke|`st<1C(7mrZ*Qm^sd)Ml_hZ)Mcrd(2W{;+aJ>XhSmYpy(cVf<*; z%hC`0iEZ!rzFTG+BtLb#BGbH3qq3~g!=h-9y=t)GDyECGnHR-OQQX{jUu&sP>Y|@( tEUJFGZoYc!>CUiu?pN8Kow}aKb~|r*wYRW?jZoRl)GZ+kZz#s70|4D5G{OJ? diff --git a/kerberosV/src/lib/hx509/data/yutaka-pad-broken-ca.pem b/kerberosV/src/lib/hx509/data/yutaka-pad-broken-ca.pem deleted file mode 100644 index 32685d1fe8a..00000000000 --- a/kerberosV/src/lib/hx509/data/yutaka-pad-broken-ca.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICijCCAfOgAwIBAgIJAOSnzE4Qx2H+MA0GCSqGSIb3DQEBBQUAMDkxCzAJBgNV -BAYTAkpQMRQwEgYDVQQKEwtDQSBURVNUIDEtNDEUMBIGA1UEAxMLQ0EgVEVTVCAx -LTQwHhcNMDYwOTA3MTYzMzE4WhcNMDYxMDA3MTYzMzE4WjA5MQswCQYDVQQGEwJK -UDEUMBIGA1UEChMLQ0EgVEVTVCAxLTQxFDASBgNVBAMTC0NBIFRFU1QgMS00MIGd -MA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDZfFjkPDZeorxWqk7/DKM2d/9Nao28 -dM6T5sb5L41hD5C1kXV6MJev5ALASSxtI6OVOmZO4gfubnsvcj0NTZO4SeF1yL1r -VDPdx7juQI1cbDiG/EwIMW29UIdj9h052JTmEbpT0RuP/4JWmAWrdO5UE40xua7S -z2/6+DB2ZklFoQIBA6OBmzCBmDAdBgNVHQ4EFgQU340JbeYcg6V9zi8aozy48aIh -tfgwaQYDVR0jBGIwYIAU340JbeYcg6V9zi8aozy48aIhtfihPaQ7MDkxCzAJBgNV -BAYTAkpQMRQwEgYDVQQKEwtDQSBURVNUIDEtNDEUMBIGA1UEAxMLQ0EgVEVTVCAx -LTSCCQDkp8xOEMdh/jAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBABsH -aJ/c/3cGHssi8IvVRci/aavqj607y7l22nKDtG1p4KAjnfNhBMOhRhFv00nJnokK -y0uc4DIegAW1bxQjqcMNNEmGbzAeixH/cRCot8C1LobEQmxNWCY2DJLWoI3wwqr8 -uUSnI1CDZ5402etkCiNXsDy/eYDrF+2KonkIWRrr ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/yutaka-pad-broken-cert.pem b/kerberosV/src/lib/hx509/data/yutaka-pad-broken-cert.pem deleted file mode 100644 index b0726eac1d6..00000000000 --- a/kerberosV/src/lib/hx509/data/yutaka-pad-broken-cert.pem +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICzTCCAjagAwIBAgIJAOSnzE4Qx2H/MA0GCSqGSIb3DQEBBQUAMDkxCzAJBgNV -BAYTAkpQMRQwEgYDVQQKEwtDQSBURVNUIDEtNDEUMBIGA1UEAxMLQ0EgVEVTVCAx -LTQwHhcNMDYwOTA3MTY0MDM3WhcNMDcwOTA3MTY0MDM3WjBPMQswCQYDVQQGEwJK -UDEOMAwGA1UECBMFVG9reW8xFjAUBgNVBAoTDVRFU1QgMiBDTElFTlQxGDAWBgNV -BAMTD3d3dzIuZXhhbXBsZS5qcDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA -vSpZ6ig9DpeKB60h7ii1RitNuvkn4INOfEXjCjPSFwmIbGJqnyWvKTiMKzguEYkG -6CZAbsx44t3kvsVDeUd5WZBRgMoeQd1tNJBU4BXxOA8bVzdwstzaPeeufQtZDvKf -M4ej+fo/j9lYH9udCug1huaNybcCtijzGonkddX4JEUCAwEAAaOBxjCBwzAJBgNV -HRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZp -Y2F0ZTAdBgNVHQ4EFgQUK0DZtd8K1P2ij9gVKUNcHlx7uCIwaQYDVR0jBGIwYIAU -340JbeYcg6V9zi8aozy48aIhtfihPaQ7MDkxCzAJBgNVBAYTAkpQMRQwEgYDVQQK -EwtDQSBURVNUIDEtNDEUMBIGA1UEAxMLQ0EgVEVTVCAxLTSCCQDkp8xOEMdh/jAN -BgkqhkiG9w0BAQUFAAOBgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAUKJ+eFJYSvXwGF2wxzDXj+x5YCItrHFmrEy4AXXAW+H0NgJVNvqRY/O -Kw== ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/yutaka-pad-ok-ca.pem b/kerberosV/src/lib/hx509/data/yutaka-pad-ok-ca.pem deleted file mode 100644 index 32685d1fe8a..00000000000 --- a/kerberosV/src/lib/hx509/data/yutaka-pad-ok-ca.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICijCCAfOgAwIBAgIJAOSnzE4Qx2H+MA0GCSqGSIb3DQEBBQUAMDkxCzAJBgNV -BAYTAkpQMRQwEgYDVQQKEwtDQSBURVNUIDEtNDEUMBIGA1UEAxMLQ0EgVEVTVCAx -LTQwHhcNMDYwOTA3MTYzMzE4WhcNMDYxMDA3MTYzMzE4WjA5MQswCQYDVQQGEwJK -UDEUMBIGA1UEChMLQ0EgVEVTVCAxLTQxFDASBgNVBAMTC0NBIFRFU1QgMS00MIGd -MA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDZfFjkPDZeorxWqk7/DKM2d/9Nao28 -dM6T5sb5L41hD5C1kXV6MJev5ALASSxtI6OVOmZO4gfubnsvcj0NTZO4SeF1yL1r -VDPdx7juQI1cbDiG/EwIMW29UIdj9h052JTmEbpT0RuP/4JWmAWrdO5UE40xua7S -z2/6+DB2ZklFoQIBA6OBmzCBmDAdBgNVHQ4EFgQU340JbeYcg6V9zi8aozy48aIh -tfgwaQYDVR0jBGIwYIAU340JbeYcg6V9zi8aozy48aIhtfihPaQ7MDkxCzAJBgNV -BAYTAkpQMRQwEgYDVQQKEwtDQSBURVNUIDEtNDEUMBIGA1UEAxMLQ0EgVEVTVCAx -LTSCCQDkp8xOEMdh/jAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBABsH -aJ/c/3cGHssi8IvVRci/aavqj607y7l22nKDtG1p4KAjnfNhBMOhRhFv00nJnokK -y0uc4DIegAW1bxQjqcMNNEmGbzAeixH/cRCot8C1LobEQmxNWCY2DJLWoI3wwqr8 -uUSnI1CDZ5402etkCiNXsDy/eYDrF+2KonkIWRrr ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/yutaka-pad-ok-cert.pem b/kerberosV/src/lib/hx509/data/yutaka-pad-ok-cert.pem deleted file mode 100644 index 9a89e59e2ad..00000000000 --- a/kerberosV/src/lib/hx509/data/yutaka-pad-ok-cert.pem +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICzTCCAjagAwIBAgIJAOSnzE4Qx2H/MA0GCSqGSIb3DQEBBQUAMDkxCzAJBgNV -BAYTAkpQMRQwEgYDVQQKEwtDQSBURVNUIDEtNDEUMBIGA1UEAxMLQ0EgVEVTVCAx -LTQwHhcNMDYwOTA3MTY0MDM3WhcNMDcwOTA3MTY0MDM3WjBPMQswCQYDVQQGEwJK -UDEOMAwGA1UECBMFVG9reW8xFjAUBgNVBAoTDVRFU1QgMiBDTElFTlQxGDAWBgNV -BAMTD3d3dzIuZXhhbXBsZS5qcDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA -vSpZ6ig9DpeKB60h7ii1RitNuvkn4INOfEXjCjPSFwmIbGJqnyWvKTiMKzguEYkG -6CZAbsx44t3kvsVDeUd5WZBRgMoeQd1tNJBU4BXxOA8bVzdwstzaPeeufQtZDvKf -M4ej+fo/j9lYH9udCug1huaNybcCtijzGonkddX4JEUCAwEAAaOBxjCBwzAJBgNV -HRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZp -Y2F0ZTAdBgNVHQ4EFgQUK0DZtd8K1P2ij9gVKUNcHlx7uCIwaQYDVR0jBGIwYIAU -340JbeYcg6V9zi8aozy48aIhtfihPaQ7MDkxCzAJBgNVBAYTAkpQMRQwEgYDVQQK -EwtDQSBURVNUIDEtNDEUMBIGA1UEAxMLQ0EgVEVTVCAxLTSCCQDkp8xOEMdh/jAN -BgkqhkiG9w0BAQUFAAOBgQCkGhwCDLRwWbDnDFReXkIZ1/9OhfiR8yL1idP9iYVU -cSoWxSHPBWkv6LORFS03APcXCSzDPJ9pxTjFjGGFSI91fNrzkKdHU/+0WCF2uTh7 -Dz2blqtcmnJqMSn1xHxxfM/9e6M3XwFUMf7SGiKRAbDfsauPafEPTn83vSeKj1lg -Dw== ------END CERTIFICATE----- diff --git a/kerberosV/src/lib/hx509/data/yutaka-pad.key b/kerberosV/src/lib/hx509/data/yutaka-pad.key deleted file mode 100644 index 1763623880c..00000000000 --- a/kerberosV/src/lib/hx509/data/yutaka-pad.key +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQC9KlnqKD0Ol4oHrSHuKLVGK026+Sfgg058ReMKM9IXCYhsYmqf -Ja8pOIwrOC4RiQboJkBuzHji3eS+xUN5R3lZkFGAyh5B3W00kFTgFfE4DxtXN3Cy -3No95659C1kO8p8zh6P5+j+P2Vgf250K6DWG5o3JtwK2KPMaieR11fgkRQIDAQAB -AoGBAJCYvwJun713uNsFTNpv46EvmMtDiWfk9ymnglVaJ03Uy6ON11Kvy6UGxJ6E -4zIkPFNYaghH5GAGncP1pg4exHKRGJTNcQbMf9iOsCTOuvKSWbBZpnJcFllKyESK -PTt72D6x/cuzDXVTeWvQMoOILa09szW7aqFNIdxae4Vq7a4BAkEA6MoehuRtZ4N9 -Jtc9cIpSKOOatZ1UajWEFV2yVHaDED2kkWxKjppPzRn06LzX8LWm1RT0qe3Zyasi -iXCXlno/+QJBANAGvY+k/+OvzWnv1yTKO8OmrMqkSzh3KAhFbiVWdQaqMSCWtKYk -GoOKnq0PB73ExhdbTFmxC4KBPHTC2guOca0CQCD78pNebnoKUYNdYCFAGCAfD97H -6hwadRqp6gi5uhxk/5pzY6UNDF2dXexURayfsIHktD4Xq5I9o2kiAPibXdECQQDC -KihwlL9K02JVSMl0y1XxDfclxSd4cq9o2PUv4HymVeA43LGMiRI+SPpF6Ut+ctW6 -IzsmVDu7+chl6yD9vFyZAkA3Auv9UxKL3kPtvu5G/lrCVmwzVfAzuwtnmSfp1+M5 -yTYBz+VFSsYrdlDZ3jdLnFzVOMiIm9pZca/L93QjmXJ+ ------END RSA PRIVATE KEY----- diff --git a/kerberosV/src/lib/hx509/doxygen.c b/kerberosV/src/lib/hx509/doxygen.c deleted file mode 100644 index 0c7dd780aed..00000000000 --- a/kerberosV/src/lib/hx509/doxygen.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2007 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. - */ - -/** @mainpage Heimdal PKIX/X.509 library - * - * @section intro Introduction - * - * Heimdal libhx509 library is a implementation of the PKIX/X.509 and - * related protocols. - * - * PKIX/X.509 is ... - * - * - * Sections in this manual are: - * - @ref page_name - * - @ref page_cert - * - @ref page_keyset - * - @ref page_error - * - @ref page_lock - * - @ref page_cms - * - @ref page_ca - * - @ref page_revoke - * - @ref page_print - * - @ref page_env - * - * The project web page: - * http://www.h5l.org/ - * - */ - -/** @defgroup hx509 hx509 library */ - -/** @defgroup hx509_error hx509 error functions - * See the @ref page_error for description and examples. */ -/** @defgroup hx509_cert hx509 certificate functions - * See the @ref page_cert for description and examples. */ -/** @defgroup hx509_keyset hx509 certificate store functions - * See the @ref page_keyset for description and examples. */ -/** @defgroup hx509_cms hx509 CMS/pkcs7 functions - * See the @ref page_cms for description and examples. */ -/** @defgroup hx509_crypto hx509 crypto functions */ -/** @defgroup hx509_misc hx509 misc functions */ -/** @defgroup hx509_name hx509 name functions - * See the @ref page_name for description and examples. */ -/** @defgroup hx509_revoke hx509 revokation checking functions - * See the @ref page_revoke for description and examples. */ -/** @defgroup hx509_verify hx509 verification functions */ -/** @defgroup hx509_lock hx509 lock functions - * See the @ref page_lock for description and examples. */ -/** @defgroup hx509_query hx509 query functions */ -/** @defgroup hx509_ca hx509 CA functions - * See the @ref page_ca for description and examples. */ -/** @defgroup hx509_peer hx509 certificate selecting functions */ -/** @defgroup hx509_print hx509 printing functions */ -/** @defgroup hx509_env hx509 enviroment functions */ diff --git a/kerberosV/src/lib/hx509/env.c b/kerberosV/src/lib/hx509/env.c deleted file mode 100644 index 7598aebaae7..00000000000 --- a/kerberosV/src/lib/hx509/env.c +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Copyright (c) 2007 - 2008 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 "hx_locl.h" - -/** - * @page page_env Hx509 enviroment functions - * - * See the library functions here: @ref hx509_env - */ - -/** - * Add a new key/value pair to the hx509_env. - * - * @param context A hx509 context. - * @param env enviroment to add the enviroment variable too. - * @param key key to add - * @param value value to add - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_env - */ - -int -hx509_env_add(hx509_context context, hx509_env *env, - const char *key, const char *value) -{ - hx509_env n; - - n = malloc(sizeof(*n)); - if (n == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - - n->type = env_string; - n->next = NULL; - n->name = strdup(key); - if (n->name == NULL) { - free(n); - return ENOMEM; - } - n->u.string = strdup(value); - if (n->u.string == NULL) { - free(n->name); - free(n); - return ENOMEM; - } - - /* add to tail */ - if (*env) { - hx509_env e = *env; - while (e->next) - e = e->next; - e->next = n; - } else - *env = n; - - return 0; -} - -/** - * Add a new key/binding pair to the hx509_env. - * - * @param context A hx509 context. - * @param env enviroment to add the enviroment variable too. - * @param key key to add - * @param list binding list to add - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_env - */ - -int -hx509_env_add_binding(hx509_context context, hx509_env *env, - const char *key, hx509_env list) -{ - hx509_env n; - - n = malloc(sizeof(*n)); - if (n == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - - n->type = env_list; - n->next = NULL; - n->name = strdup(key); - if (n->name == NULL) { - free(n); - return ENOMEM; - } - n->u.list = list; - - /* add to tail */ - if (*env) { - hx509_env e = *env; - while (e->next) - e = e->next; - e->next = n; - } else - *env = n; - - return 0; -} - - -/** - * Search the hx509_env for a length based key. - * - * @param context A hx509 context. - * @param env enviroment to add the enviroment variable too. - * @param key key to search for. - * @param len length of key. - * - * @return the value if the key is found, NULL otherwise. - * - * @ingroup hx509_env - */ - -const char * -hx509_env_lfind(hx509_context context, hx509_env env, - const char *key, size_t len) -{ - while(env) { - if (strncmp(key, env->name ,len) == 0 - && env->name[len] == '\0' && env->type == env_string) - return env->u.string; - env = env->next; - } - return NULL; -} - -/** - * Search the hx509_env for a key. - * - * @param context A hx509 context. - * @param env enviroment to add the enviroment variable too. - * @param key key to search for. - * - * @return the value if the key is found, NULL otherwise. - * - * @ingroup hx509_env - */ - -const char * -hx509_env_find(hx509_context context, hx509_env env, const char *key) -{ - while(env) { - if (strcmp(key, env->name) == 0 && env->type == env_string) - return env->u.string; - env = env->next; - } - return NULL; -} - -/** - * Search the hx509_env for a binding. - * - * @param context A hx509 context. - * @param env enviroment to add the enviroment variable too. - * @param key key to search for. - * - * @return the binding if the key is found, NULL if not found. - * - * @ingroup hx509_env - */ - -hx509_env -hx509_env_find_binding(hx509_context context, - hx509_env env, - const char *key) -{ - while(env) { - if (strcmp(key, env->name) == 0 && env->type == env_list) - return env->u.list; - env = env->next; - } - return NULL; -} - -static void -env_free(hx509_env b) -{ - while(b) { - hx509_env next = b->next; - - if (b->type == env_string) - free(b->u.string); - else if (b->type == env_list) - env_free(b->u.list); - - free(b->name); - free(b); - b = next; - } -} - -/** - * Free an hx509_env enviroment context. - * - * @param env the enviroment to free. - * - * @ingroup hx509_env - */ - -void -hx509_env_free(hx509_env *env) -{ - if (*env) - env_free(*env); - *env = NULL; -} diff --git a/kerberosV/src/lib/hx509/error.c b/kerberosV/src/lib/hx509/error.c deleted file mode 100644 index fc3cf90b325..00000000000 --- a/kerberosV/src/lib/hx509/error.c +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (c) 2006 - 2007 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 "hx_locl.h" - -/** - * @page page_error Hx509 error reporting functions - * - * See the library functions here: @ref hx509_error - */ - -struct hx509_error_data { - hx509_error next; - int code; - char *msg; -}; - -static void -free_error_string(hx509_error msg) -{ - while(msg) { - hx509_error m2 = msg->next; - free(msg->msg); - free(msg); - msg = m2; - } -} - -/** - * Resets the error strings the hx509 context. - * - * @param context A hx509 context. - * - * @ingroup hx509_error - */ - -void -hx509_clear_error_string(hx509_context context) -{ - if (context) { - free_error_string(context->error); - context->error = NULL; - } -} - -/** - * Add an error message to the hx509 context. - * - * @param context A hx509 context. - * @param flags - * - HX509_ERROR_APPEND appends the error string to the old messages - (code is updated). - * @param code error code related to error message - * @param fmt error message format - * @param ap arguments to error message format - * - * @ingroup hx509_error - */ - -void -hx509_set_error_stringv(hx509_context context, int flags, int code, - const char *fmt, va_list ap) -{ - hx509_error msg; - - if (context == NULL) - return; - - msg = calloc(1, sizeof(*msg)); - if (msg == NULL) { - hx509_clear_error_string(context); - return; - } - - if (vasprintf(&msg->msg, fmt, ap) == -1) { - hx509_clear_error_string(context); - free(msg); - return; - } - msg->code = code; - - if (flags & HX509_ERROR_APPEND) { - msg->next = context->error; - context->error = msg; - } else { - free_error_string(context->error); - context->error = msg; - } -} - -/** - * See hx509_set_error_stringv(). - * - * @param context A hx509 context. - * @param flags - * - HX509_ERROR_APPEND appends the error string to the old messages - (code is updated). - * @param code error code related to error message - * @param fmt error message format - * @param ... arguments to error message format - * - * @ingroup hx509_error - */ - -void -hx509_set_error_string(hx509_context context, int flags, int code, - const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - hx509_set_error_stringv(context, flags, code, fmt, ap); - va_end(ap); -} - -/** - * Get an error string from context associated with error_code. - * - * @param context A hx509 context. - * @param error_code Get error message for this error code. - * - * @return error string, free with hx509_free_error_string(). - * - * @ingroup hx509_error - */ - -char * -hx509_get_error_string(hx509_context context, int error_code) -{ - struct rk_strpool *p = NULL; - hx509_error msg = context->error; - - if (msg == NULL || msg->code != error_code) { - const char *cstr; - char *str; - - cstr = com_right(context->et_list, error_code); - if (cstr) - return strdup(cstr); - cstr = strerror(error_code); - if (cstr) - return strdup(cstr); - if (asprintf(&str, "", error_code) == -1) - return NULL; - return str; - } - - for (msg = context->error; msg; msg = msg->next) - p = rk_strpoolprintf(p, "%s%s", msg->msg, - msg->next != NULL ? "; " : ""); - - return rk_strpoolcollect(p); -} - -/** - * Free error string returned by hx509_get_error_string(). - * - * @param str error string to free. - * - * @ingroup hx509_error - */ - -void -hx509_free_error_string(char *str) -{ - free(str); -} - -/** - * Print error message and fatally exit from error code - * - * @param context A hx509 context. - * @param exit_code exit() code from process. - * @param error_code Error code for the reason to exit. - * @param fmt format string with the exit message. - * @param ... argument to format string. - * - * @ingroup hx509_error - */ - -void -hx509_err(hx509_context context, int exit_code, - int error_code, const char *fmt, ...) -{ - va_list ap; - const char *msg; - char *str; - - va_start(ap, fmt); - vasprintf(&str, fmt, ap); - va_end(ap); - msg = hx509_get_error_string(context, error_code); - if (msg == NULL) - msg = "no error"; - - errx(exit_code, "%s: %s", str, msg); -} diff --git a/kerberosV/src/lib/hx509/file.c b/kerberosV/src/lib/hx509/file.c deleted file mode 100644 index 4f7e87f070a..00000000000 --- a/kerberosV/src/lib/hx509/file.c +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Copyright (c) 2005 - 2006 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 "hx_locl.h" - -int -_hx509_map_file_os(const char *fn, heim_octet_string *os) -{ - size_t length; - void *data; - int ret; - - ret = rk_undumpdata(fn, &data, &length); - - os->data = data; - os->length = length; - - return ret; -} - -void -_hx509_unmap_file_os(heim_octet_string *os) -{ - rk_xfree(os->data); -} - -int -_hx509_write_file(const char *fn, const void *data, size_t length) -{ - rk_dumpdata(fn, data, length); - return 0; -} - -/* - * - */ - -static void -print_pem_stamp(FILE *f, const char *type, const char *str) -{ - fprintf(f, "-----%s %s-----\n", type, str); -} - -int -hx509_pem_write(hx509_context context, const char *type, - hx509_pem_header *headers, FILE *f, - const void *data, size_t size) -{ - const char *p = data; - size_t length; - char *line; - -#define ENCODE_LINE_LENGTH 54 - - print_pem_stamp(f, "BEGIN", type); - - while (headers) { - fprintf(f, "%s: %s\n%s", - headers->header, headers->value, - headers->next ? "" : "\n"); - headers = headers->next; - } - - while (size > 0) { - ssize_t l; - - length = size; - if (length > ENCODE_LINE_LENGTH) - length = ENCODE_LINE_LENGTH; - - l = base64_encode(p, length, &line); - if (l < 0) { - hx509_set_error_string(context, 0, ENOMEM, - "malloc - out of memory"); - return ENOMEM; - } - size -= length; - fprintf(f, "%s\n", line); - p += length; - free(line); - } - - print_pem_stamp(f, "END", type); - - return 0; -} - -/* - * - */ - -int -hx509_pem_add_header(hx509_pem_header **headers, - const char *header, const char *value) -{ - hx509_pem_header *h; - - h = calloc(1, sizeof(*h)); - if (h == NULL) - return ENOMEM; - h->header = strdup(header); - if (h->header == NULL) { - free(h); - return ENOMEM; - } - h->value = strdup(value); - if (h->value == NULL) { - free(h->header); - free(h); - return ENOMEM; - } - - h->next = *headers; - *headers = h; - - return 0; -} - -void -hx509_pem_free_header(hx509_pem_header *headers) -{ - hx509_pem_header *h; - while (headers) { - h = headers; - headers = headers->next; - free(h->header); - free(h->value); - free(h); - } -} - -/* - * - */ - -const char * -hx509_pem_find_header(const hx509_pem_header *h, const char *header) -{ - while(h) { - if (strcmp(header, h->header) == 0) - return h->value; - h = h->next; - } - return NULL; -} - - -/* - * - */ - -int -hx509_pem_read(hx509_context context, - FILE *f, - hx509_pem_read_func func, - void *ctx) -{ - hx509_pem_header *headers = NULL; - char *type = NULL; - void *data = NULL; - size_t len = 0; - char buf[1024]; - int ret = HX509_PARSING_KEY_FAILED; - - enum { BEFORE, SEARCHHEADER, INHEADER, INDATA, DONE } where; - - where = BEFORE; - - while (fgets(buf, sizeof(buf), f) != NULL) { - char *p; - int i; - - i = strcspn(buf, "\n"); - if (buf[i] == '\n') { - buf[i] = '\0'; - if (i > 0) - i--; - } - if (buf[i] == '\r') { - buf[i] = '\0'; - if (i > 0) - i--; - } - - switch (where) { - case BEFORE: - if (strncmp("-----BEGIN ", buf, 11) == 0) { - type = strdup(buf + 11); - if (type == NULL) - break; - p = strchr(type, '-'); - if (p) - *p = '\0'; - where = SEARCHHEADER; - } - break; - case SEARCHHEADER: - p = strchr(buf, ':'); - if (p == NULL) { - where = INDATA; - goto indata; - } - /* FALLTHOUGH */ - case INHEADER: - if (buf[0] == '\0') { - where = INDATA; - break; - } - p = strchr(buf, ':'); - if (p) { - *p++ = '\0'; - while (isspace((int)*p)) - p++; - ret = hx509_pem_add_header(&headers, buf, p); - if (ret) - abort(); - } - break; - case INDATA: - indata: - - if (strncmp("-----END ", buf, 9) == 0) { - where = DONE; - break; - } - - p = emalloc(i); - i = base64_decode(buf, p); - if (i < 0) { - free(p); - goto out; - } - - data = erealloc(data, len + i); - memcpy(((char *)data) + len, p, i); - free(p); - len += i; - break; - case DONE: - abort(); - } - - if (where == DONE) { - ret = (*func)(context, type, headers, data, len, ctx); - out: - free(data); - data = NULL; - len = 0; - free(type); - type = NULL; - where = BEFORE; - hx509_pem_free_header(headers); - headers = NULL; - if (ret) - break; - } - } - - if (where != BEFORE) { - hx509_set_error_string(context, 0, HX509_PARSING_KEY_FAILED, - "File ends before end of PEM end tag"); - ret = HX509_PARSING_KEY_FAILED; - } - if (data) - free(data); - if (type) - free(type); - if (headers) - hx509_pem_free_header(headers); - - return ret; -} diff --git a/kerberosV/src/lib/hx509/hx509-private.h b/kerberosV/src/lib/hx509/hx509-private.h deleted file mode 100644 index 60891f27fca..00000000000 --- a/kerberosV/src/lib/hx509/hx509-private.h +++ /dev/null @@ -1,481 +0,0 @@ -/* This is a generated file */ -#ifndef __hx509_private_h__ -#define __hx509_private_h__ - -#include - -#if !defined(__GNUC__) && !defined(__attribute__) -#define __attribute__(x) -#endif - -int -_hx509_AlgorithmIdentifier_cmp ( - const AlgorithmIdentifier */*p*/, - const AlgorithmIdentifier */*q*/); - -int -_hx509_Certificate_cmp ( - const Certificate */*p*/, - const Certificate */*q*/); - -int -_hx509_Name_to_string ( - const Name */*n*/, - char **/*str*/); - -time_t -_hx509_Time2time_t (const Time */*t*/); - -void -_hx509_abort ( - const char */*fmt*/, - ...) - __attribute__ ((noreturn, format (printf, 1, 2))); - -int -_hx509_calculate_path ( - hx509_context /*context*/, - int /*flags*/, - time_t /*time_now*/, - hx509_certs /*anchors*/, - unsigned int /*max_depth*/, - hx509_cert /*cert*/, - hx509_certs /*pool*/, - hx509_path */*path*/); - -int -_hx509_cert_assign_key ( - hx509_cert /*cert*/, - hx509_private_key /*private_key*/); - -int -_hx509_cert_get_eku ( - hx509_context /*context*/, - hx509_cert /*cert*/, - ExtKeyUsage */*e*/); - -int -_hx509_cert_get_keyusage ( - hx509_context /*context*/, - hx509_cert /*c*/, - KeyUsage */*ku*/); - -int -_hx509_cert_get_version (const Certificate */*t*/); - -int -_hx509_cert_is_parent_cmp ( - const Certificate */*subject*/, - const Certificate */*issuer*/, - int /*allow_self_signed*/); - -int -_hx509_cert_private_decrypt ( - hx509_context /*context*/, - const heim_octet_string */*ciphertext*/, - const heim_oid */*encryption_oid*/, - hx509_cert /*p*/, - heim_octet_string */*cleartext*/); - -hx509_private_key -_hx509_cert_private_key (hx509_cert /*p*/); - -int -_hx509_cert_private_key_exportable (hx509_cert /*p*/); - -void -_hx509_cert_set_release ( - hx509_cert /*cert*/, - _hx509_cert_release_func /*release*/, - void */*ctx*/); - -int -_hx509_cert_to_env ( - hx509_context /*context*/, - hx509_cert /*cert*/, - hx509_env */*env*/); - -int -_hx509_certs_keys_add ( - hx509_context /*context*/, - hx509_certs /*certs*/, - hx509_private_key /*key*/); - -void -_hx509_certs_keys_free ( - hx509_context /*context*/, - hx509_private_key */*keys*/); - -int -_hx509_certs_keys_get ( - hx509_context /*context*/, - hx509_certs /*certs*/, - hx509_private_key **/*keys*/); - -int -_hx509_check_key_usage ( - hx509_context /*context*/, - hx509_cert /*cert*/, - unsigned /*flags*/, - int /*req_present*/); - -int -_hx509_collector_alloc ( - hx509_context /*context*/, - hx509_lock /*lock*/, - struct hx509_collector **/*collector*/); - -int -_hx509_collector_certs_add ( - hx509_context /*context*/, - struct hx509_collector */*c*/, - hx509_cert /*cert*/); - -int -_hx509_collector_collect_certs ( - hx509_context /*context*/, - struct hx509_collector */*c*/, - hx509_certs */*ret_certs*/); - -int -_hx509_collector_collect_private_keys ( - hx509_context /*context*/, - struct hx509_collector */*c*/, - hx509_private_key **/*keys*/); - -void -_hx509_collector_free (struct hx509_collector */*c*/); - -hx509_lock -_hx509_collector_get_lock (struct hx509_collector */*c*/); - -int -_hx509_collector_private_key_add ( - hx509_context /*context*/, - struct hx509_collector */*c*/, - const AlgorithmIdentifier */*alg*/, - hx509_private_key /*private_key*/, - const heim_octet_string */*key_data*/, - const heim_octet_string */*localKeyId*/); - -int -_hx509_create_signature ( - hx509_context /*context*/, - const hx509_private_key /*signer*/, - const AlgorithmIdentifier */*alg*/, - const heim_octet_string */*data*/, - AlgorithmIdentifier */*signatureAlgorithm*/, - heim_octet_string */*sig*/); - -int -_hx509_create_signature_bitstring ( - hx509_context /*context*/, - const hx509_private_key /*signer*/, - const AlgorithmIdentifier */*alg*/, - const heim_octet_string */*data*/, - AlgorithmIdentifier */*signatureAlgorithm*/, - heim_bit_string */*sig*/); - -int -_hx509_expr_eval ( - hx509_context /*context*/, - hx509_env /*env*/, - struct hx_expr */*expr*/); - -void -_hx509_expr_free (struct hx_expr */*expr*/); - -struct hx_expr * -_hx509_expr_parse (const char */*buf*/); - -int -_hx509_find_extension_subject_key_id ( - const Certificate */*issuer*/, - SubjectKeyIdentifier */*si*/); - -int -_hx509_generate_private_key ( - hx509_context /*context*/, - struct hx509_generate_private_context */*ctx*/, - hx509_private_key */*private_key*/); - -int -_hx509_generate_private_key_bits ( - hx509_context /*context*/, - struct hx509_generate_private_context */*ctx*/, - unsigned long /*bits*/); - -void -_hx509_generate_private_key_free (struct hx509_generate_private_context **/*ctx*/); - -int -_hx509_generate_private_key_init ( - hx509_context /*context*/, - const heim_oid */*oid*/, - struct hx509_generate_private_context **/*ctx*/); - -int -_hx509_generate_private_key_is_ca ( - hx509_context /*context*/, - struct hx509_generate_private_context */*ctx*/); - -Certificate * -_hx509_get_cert (hx509_cert /*cert*/); - -void -_hx509_ks_dir_register (hx509_context /*context*/); - -void -_hx509_ks_file_register (hx509_context /*context*/); - -void -_hx509_ks_keychain_register (hx509_context /*context*/); - -void -_hx509_ks_mem_register (hx509_context /*context*/); - -void -_hx509_ks_null_register (hx509_context /*context*/); - -void -_hx509_ks_pkcs11_register (hx509_context /*context*/); - -void -_hx509_ks_pkcs12_register (hx509_context /*context*/); - -void -_hx509_ks_register ( - hx509_context /*context*/, - struct hx509_keyset_ops */*ops*/); - -int -_hx509_lock_find_cert ( - hx509_lock /*lock*/, - const hx509_query */*q*/, - hx509_cert */*c*/); - -const struct _hx509_password * -_hx509_lock_get_passwords (hx509_lock /*lock*/); - -hx509_certs -_hx509_lock_unlock_certs (hx509_lock /*lock*/); - -struct hx_expr * -_hx509_make_expr ( - enum hx_expr_op /*op*/, - void */*arg1*/, - void */*arg2*/); - -int -_hx509_map_file_os ( - const char */*fn*/, - heim_octet_string */*os*/); - -int -_hx509_match_keys ( - hx509_cert /*c*/, - hx509_private_key /*key*/); - -int -_hx509_name_cmp ( - const Name */*n1*/, - const Name */*n2*/, - int */*c*/); - -int -_hx509_name_ds_cmp ( - const DirectoryString */*ds1*/, - const DirectoryString */*ds2*/, - int */*diff*/); - -int -_hx509_name_from_Name ( - const Name */*n*/, - hx509_name */*name*/); - -int -_hx509_name_modify ( - hx509_context /*context*/, - Name */*name*/, - int /*append*/, - const heim_oid */*oid*/, - const char */*str*/); - -int -_hx509_path_append ( - hx509_context /*context*/, - hx509_path */*path*/, - hx509_cert /*cert*/); - -void -_hx509_path_free (hx509_path */*path*/); - -int -_hx509_pbe_decrypt ( - hx509_context /*context*/, - hx509_lock /*lock*/, - const AlgorithmIdentifier */*ai*/, - const heim_octet_string */*econtent*/, - heim_octet_string */*content*/); - -int -_hx509_pbe_encrypt ( - hx509_context /*context*/, - hx509_lock /*lock*/, - const AlgorithmIdentifier */*ai*/, - const heim_octet_string */*content*/, - heim_octet_string */*econtent*/); - -void -_hx509_pi_printf ( - int (*/*func*/)(void *, const char *), - void */*ctx*/, - const char */*fmt*/, - ...); - -int -_hx509_private_key_export ( - hx509_context /*context*/, - const hx509_private_key /*key*/, - hx509_key_format_t /*format*/, - heim_octet_string */*data*/); - -int -_hx509_private_key_exportable (hx509_private_key /*key*/); - -BIGNUM * -_hx509_private_key_get_internal ( - hx509_context /*context*/, - hx509_private_key /*key*/, - const char */*type*/); - -int -_hx509_private_key_oid ( - hx509_context /*context*/, - const hx509_private_key /*key*/, - heim_oid */*data*/); - -hx509_private_key -_hx509_private_key_ref (hx509_private_key /*key*/); - -const char * -_hx509_private_pem_name (hx509_private_key /*key*/); - -int -_hx509_public_encrypt ( - hx509_context /*context*/, - const heim_octet_string */*cleartext*/, - const Certificate */*cert*/, - heim_oid */*encryption_oid*/, - heim_octet_string */*ciphertext*/); - -void -_hx509_query_clear (hx509_query */*q*/); - -int -_hx509_query_match_cert ( - hx509_context /*context*/, - const hx509_query */*q*/, - hx509_cert /*cert*/); - -void -_hx509_query_statistic ( - hx509_context /*context*/, - int /*type*/, - const hx509_query */*q*/); - -int -_hx509_request_add_dns_name ( - hx509_context /*context*/, - hx509_request /*req*/, - const char */*hostname*/); - -int -_hx509_request_add_eku ( - hx509_context /*context*/, - hx509_request /*req*/, - const heim_oid */*oid*/); - -int -_hx509_request_add_email ( - hx509_context /*context*/, - hx509_request /*req*/, - const char */*email*/); - -int -_hx509_request_parse ( - hx509_context /*context*/, - const char */*path*/, - hx509_request */*req*/); - -int -_hx509_request_print ( - hx509_context /*context*/, - hx509_request /*req*/, - FILE */*f*/); - -int -_hx509_request_to_pkcs10 ( - hx509_context /*context*/, - const hx509_request /*req*/, - const hx509_private_key /*signer*/, - heim_octet_string */*request*/); - -hx509_revoke_ctx -_hx509_revoke_ref (hx509_revoke_ctx /*ctx*/); - -void -_hx509_sel_yyerror (const char */*s*/); - -int -_hx509_self_signed_valid ( - hx509_context /*context*/, - const AlgorithmIdentifier */*alg*/); - -int -_hx509_set_cert_attribute ( - hx509_context /*context*/, - hx509_cert /*cert*/, - const heim_oid */*oid*/, - const heim_octet_string */*attr*/); - -int -_hx509_signature_best_before ( - hx509_context /*context*/, - const AlgorithmIdentifier */*alg*/, - time_t /*t*/); - -void -_hx509_unmap_file_os (heim_octet_string */*os*/); - -int -_hx509_unparse_Name ( - const Name */*aname*/, - char **/*str*/); - -time_t -_hx509_verify_get_time (hx509_verify_ctx /*ctx*/); - -int -_hx509_verify_signature ( - hx509_context /*context*/, - const hx509_cert /*cert*/, - const AlgorithmIdentifier */*alg*/, - const heim_octet_string */*data*/, - const heim_octet_string */*sig*/); - -int -_hx509_verify_signature_bitstring ( - hx509_context /*context*/, - const hx509_cert /*signer*/, - const AlgorithmIdentifier */*alg*/, - const heim_octet_string */*data*/, - const heim_bit_string */*sig*/); - -int -_hx509_write_file ( - const char */*fn*/, - const void */*data*/, - size_t /*length*/); - -#endif /* __hx509_private_h__ */ diff --git a/kerberosV/src/lib/hx509/hx509-protos.h b/kerberosV/src/lib/hx509/hx509-protos.h deleted file mode 100644 index d03c7767e54..00000000000 --- a/kerberosV/src/lib/hx509/hx509-protos.h +++ /dev/null @@ -1,1243 +0,0 @@ -/* This is a generated file */ -#ifndef __hx509_protos_h__ -#define __hx509_protos_h__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef HX509_LIB -#ifndef HX509_LIB_FUNCTION -#if defined(_WIN32) -#define HX509_LIB_FUNCTION __declspec(dllimport) -#define HX509_LIB_CALL __stdcall -#define HX509_LIB_VARIABLE __declspec(dllimport) -#else -#define HX509_LIB_FUNCTION -#define HX509_LIB_CALL -#define HX509_LIB_VARIABLE -#endif -#endif -#endif -void -hx509_bitstring_print ( - const heim_bit_string */*b*/, - hx509_vprint_func /*func*/, - void */*ctx*/); - -int -hx509_ca_sign ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - hx509_cert /*signer*/, - hx509_cert */*certificate*/); - -int -hx509_ca_sign_self ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - hx509_private_key /*signer*/, - hx509_cert */*certificate*/); - -int -hx509_ca_tbs_add_crl_dp_uri ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const char */*uri*/, - hx509_name /*issuername*/); - -int -hx509_ca_tbs_add_eku ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const heim_oid */*oid*/); - -int -hx509_ca_tbs_add_san_hostname ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const char */*dnsname*/); - -int -hx509_ca_tbs_add_san_jid ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const char */*jid*/); - -int -hx509_ca_tbs_add_san_ms_upn ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const char */*principal*/); - -int -hx509_ca_tbs_add_san_otherName ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const heim_oid */*oid*/, - const heim_octet_string */*os*/); - -int -hx509_ca_tbs_add_san_pkinit ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const char */*principal*/); - -int -hx509_ca_tbs_add_san_rfc822name ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const char */*rfc822Name*/); - -void -hx509_ca_tbs_free (hx509_ca_tbs */*tbs*/); - -int -hx509_ca_tbs_init ( - hx509_context /*context*/, - hx509_ca_tbs */*tbs*/); - -int -hx509_ca_tbs_set_ca ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - int /*pathLenConstraint*/); - -int -hx509_ca_tbs_set_domaincontroller ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/); - -int -hx509_ca_tbs_set_notAfter ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - time_t /*t*/); - -int -hx509_ca_tbs_set_notAfter_lifetime ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - time_t /*delta*/); - -int -hx509_ca_tbs_set_notBefore ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - time_t /*t*/); - -int -hx509_ca_tbs_set_proxy ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - int /*pathLenConstraint*/); - -int -hx509_ca_tbs_set_serialnumber ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const heim_integer */*serialNumber*/); - -int -hx509_ca_tbs_set_spki ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const SubjectPublicKeyInfo */*spki*/); - -int -hx509_ca_tbs_set_subject ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - hx509_name /*subject*/); - -int -hx509_ca_tbs_set_template ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - int /*flags*/, - hx509_cert /*cert*/); - -int -hx509_ca_tbs_set_unique ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - const heim_bit_string */*subjectUniqueID*/, - const heim_bit_string */*issuerUniqueID*/); - -int -hx509_ca_tbs_subject_expand ( - hx509_context /*context*/, - hx509_ca_tbs /*tbs*/, - hx509_env /*env*/); - -const struct units * -hx509_ca_tbs_template_units (void); - -int -hx509_cert_binary ( - hx509_context /*context*/, - hx509_cert /*c*/, - heim_octet_string */*os*/); - -int -hx509_cert_check_eku ( - hx509_context /*context*/, - hx509_cert /*cert*/, - const heim_oid */*eku*/, - int /*allow_any_eku*/); - -int -hx509_cert_cmp ( - hx509_cert /*p*/, - hx509_cert /*q*/); - -int -hx509_cert_find_subjectAltName_otherName ( - hx509_context /*context*/, - hx509_cert /*cert*/, - const heim_oid */*oid*/, - hx509_octet_string_list */*list*/); - -void -hx509_cert_free (hx509_cert /*cert*/); - -int -hx509_cert_get_SPKI ( - hx509_context /*context*/, - hx509_cert /*p*/, - SubjectPublicKeyInfo */*spki*/); - -int -hx509_cert_get_SPKI_AlgorithmIdentifier ( - hx509_context /*context*/, - hx509_cert /*p*/, - AlgorithmIdentifier */*alg*/); - -hx509_cert_attribute -hx509_cert_get_attribute ( - hx509_cert /*cert*/, - const heim_oid */*oid*/); - -int -hx509_cert_get_base_subject ( - hx509_context /*context*/, - hx509_cert /*c*/, - hx509_name */*name*/); - -const char * -hx509_cert_get_friendly_name (hx509_cert /*cert*/); - -int -hx509_cert_get_issuer ( - hx509_cert /*p*/, - hx509_name */*name*/); - -int -hx509_cert_get_issuer_unique_id ( - hx509_context /*context*/, - hx509_cert /*p*/, - heim_bit_string */*issuer*/); - -time_t -hx509_cert_get_notAfter (hx509_cert /*p*/); - -time_t -hx509_cert_get_notBefore (hx509_cert /*p*/); - -int -hx509_cert_get_serialnumber ( - hx509_cert /*p*/, - heim_integer */*i*/); - -int -hx509_cert_get_subject ( - hx509_cert /*p*/, - hx509_name */*name*/); - -int -hx509_cert_get_subject_unique_id ( - hx509_context /*context*/, - hx509_cert /*p*/, - heim_bit_string */*subject*/); - -int -hx509_cert_have_private_key (hx509_cert /*p*/); - -int -hx509_cert_init ( - hx509_context /*context*/, - const Certificate */*c*/, - hx509_cert */*cert*/); - -int -hx509_cert_init_data ( - hx509_context /*context*/, - const void */*ptr*/, - size_t /*len*/, - hx509_cert */*cert*/); - -int -hx509_cert_keyusage_print ( - hx509_context /*context*/, - hx509_cert /*c*/, - char **/*s*/); - -int -hx509_cert_public_encrypt ( - hx509_context /*context*/, - const heim_octet_string */*cleartext*/, - const hx509_cert /*p*/, - heim_oid */*encryption_oid*/, - heim_octet_string */*ciphertext*/); - -hx509_cert -hx509_cert_ref (hx509_cert /*cert*/); - -int -hx509_cert_set_friendly_name ( - hx509_cert /*cert*/, - const char */*name*/); - -int -hx509_certs_add ( - hx509_context /*context*/, - hx509_certs /*certs*/, - hx509_cert /*cert*/); - -int -hx509_certs_append ( - hx509_context /*context*/, - hx509_certs /*to*/, - hx509_lock /*lock*/, - const char */*name*/); - -int -hx509_certs_end_seq ( - hx509_context /*context*/, - hx509_certs /*certs*/, - hx509_cursor /*cursor*/); - -int -hx509_certs_filter ( - hx509_context /*context*/, - hx509_certs /*certs*/, - const hx509_query */*q*/, - hx509_certs */*result*/); - -int -hx509_certs_find ( - hx509_context /*context*/, - hx509_certs /*certs*/, - const hx509_query */*q*/, - hx509_cert */*r*/); - -void -hx509_certs_free (hx509_certs */*certs*/); - -int -hx509_certs_info ( - hx509_context /*context*/, - hx509_certs /*certs*/, - int (*/*func*/)(void *, const char *), - void */*ctx*/); - -int -hx509_certs_init ( - hx509_context /*context*/, - const char */*name*/, - int /*flags*/, - hx509_lock /*lock*/, - hx509_certs */*certs*/); - -#ifdef __BLOCKS__ -int -hx509_certs_iter ( - hx509_context /*context*/, - hx509_certs /*certs*/, - int (^func)(hx509_cert)); -#endif /* __BLOCKS__ */ - -int -hx509_certs_iter_f ( - hx509_context /*context*/, - hx509_certs /*certs*/, - int (*/*func*/)(hx509_context, void *, hx509_cert), - void */*ctx*/); - -int -hx509_certs_merge ( - hx509_context /*context*/, - hx509_certs /*to*/, - hx509_certs /*from*/); - -int -hx509_certs_next_cert ( - hx509_context /*context*/, - hx509_certs /*certs*/, - hx509_cursor /*cursor*/, - hx509_cert */*cert*/); - -hx509_certs -hx509_certs_ref (hx509_certs /*certs*/); - -int -hx509_certs_start_seq ( - hx509_context /*context*/, - hx509_certs /*certs*/, - hx509_cursor */*cursor*/); - -int -hx509_certs_store ( - hx509_context /*context*/, - hx509_certs /*certs*/, - int /*flags*/, - hx509_lock /*lock*/); - -int -hx509_ci_print_names ( - hx509_context /*context*/, - void */*ctx*/, - hx509_cert /*c*/); - -void -hx509_clear_error_string (hx509_context /*context*/); - -int -hx509_cms_create_signed ( - hx509_context /*context*/, - int /*flags*/, - const heim_oid */*eContentType*/, - const void */*data*/, - size_t /*length*/, - const AlgorithmIdentifier */*digest_alg*/, - hx509_certs /*certs*/, - hx509_peer_info /*peer*/, - hx509_certs /*anchors*/, - hx509_certs /*pool*/, - heim_octet_string */*signed_data*/); - -int -hx509_cms_create_signed_1 ( - hx509_context /*context*/, - int /*flags*/, - const heim_oid */*eContentType*/, - const void */*data*/, - size_t /*length*/, - const AlgorithmIdentifier */*digest_alg*/, - hx509_cert /*cert*/, - hx509_peer_info /*peer*/, - hx509_certs /*anchors*/, - hx509_certs /*pool*/, - heim_octet_string */*signed_data*/); - -int -hx509_cms_decrypt_encrypted ( - hx509_context /*context*/, - hx509_lock /*lock*/, - const void */*data*/, - size_t /*length*/, - heim_oid */*contentType*/, - heim_octet_string */*content*/); - -int -hx509_cms_envelope_1 ( - hx509_context /*context*/, - int /*flags*/, - hx509_cert /*cert*/, - const void */*data*/, - size_t /*length*/, - const heim_oid */*encryption_type*/, - const heim_oid */*contentType*/, - heim_octet_string */*content*/); - -int -hx509_cms_unenvelope ( - hx509_context /*context*/, - hx509_certs /*certs*/, - int /*flags*/, - const void */*data*/, - size_t /*length*/, - const heim_octet_string */*encryptedContent*/, - time_t /*time_now*/, - heim_oid */*contentType*/, - heim_octet_string */*content*/); - -int -hx509_cms_unwrap_ContentInfo ( - const heim_octet_string */*in*/, - heim_oid */*oid*/, - heim_octet_string */*out*/, - int */*have_data*/); - -int -hx509_cms_verify_signed ( - hx509_context /*context*/, - hx509_verify_ctx /*ctx*/, - unsigned int /*flags*/, - const void */*data*/, - size_t /*length*/, - const heim_octet_string */*signedContent*/, - hx509_certs /*pool*/, - heim_oid */*contentType*/, - heim_octet_string */*content*/, - hx509_certs */*signer_certs*/); - -int -hx509_cms_wrap_ContentInfo ( - const heim_oid */*oid*/, - const heim_octet_string */*buf*/, - heim_octet_string */*res*/); - -void -hx509_context_free (hx509_context */*context*/); - -int -hx509_context_init (hx509_context */*context*/); - -void -hx509_context_set_missing_revoke ( - hx509_context /*context*/, - int /*flag*/); - -int -hx509_crl_add_revoked_certs ( - hx509_context /*context*/, - hx509_crl /*crl*/, - hx509_certs /*certs*/); - -int -hx509_crl_alloc ( - hx509_context /*context*/, - hx509_crl */*crl*/); - -void -hx509_crl_free ( - hx509_context /*context*/, - hx509_crl */*crl*/); - -int -hx509_crl_lifetime ( - hx509_context /*context*/, - hx509_crl /*crl*/, - int /*delta*/); - -int -hx509_crl_sign ( - hx509_context /*context*/, - hx509_cert /*signer*/, - hx509_crl /*crl*/, - heim_octet_string */*os*/); - -const AlgorithmIdentifier * -hx509_crypto_aes128_cbc (void); - -const AlgorithmIdentifier * -hx509_crypto_aes256_cbc (void); - -void -hx509_crypto_allow_weak (hx509_crypto /*crypto*/); - -int -hx509_crypto_available ( - hx509_context /*context*/, - int /*type*/, - hx509_cert /*source*/, - AlgorithmIdentifier **/*val*/, - unsigned int */*plen*/); - -int -hx509_crypto_decrypt ( - hx509_crypto /*crypto*/, - const void */*data*/, - const size_t /*length*/, - heim_octet_string */*ivec*/, - heim_octet_string */*clear*/); - -const AlgorithmIdentifier * -hx509_crypto_des_rsdi_ede3_cbc (void); - -void -hx509_crypto_destroy (hx509_crypto /*crypto*/); - -int -hx509_crypto_encrypt ( - hx509_crypto /*crypto*/, - const void */*data*/, - const size_t /*length*/, - const heim_octet_string */*ivec*/, - heim_octet_string **/*ciphertext*/); - -const heim_oid * -hx509_crypto_enctype_by_name (const char */*name*/); - -void -hx509_crypto_free_algs ( - AlgorithmIdentifier */*val*/, - unsigned int /*len*/); - -int -hx509_crypto_get_params ( - hx509_context /*context*/, - hx509_crypto /*crypto*/, - const heim_octet_string */*ivec*/, - heim_octet_string */*param*/); - -int -hx509_crypto_init ( - hx509_context /*context*/, - const char */*provider*/, - const heim_oid */*enctype*/, - hx509_crypto */*crypto*/); - -const char * -hx509_crypto_provider (hx509_crypto /*crypto*/); - -int -hx509_crypto_random_iv ( - hx509_crypto /*crypto*/, - heim_octet_string */*ivec*/); - -int -hx509_crypto_select ( - const hx509_context /*context*/, - int /*type*/, - const hx509_private_key /*source*/, - hx509_peer_info /*peer*/, - AlgorithmIdentifier */*selected*/); - -int -hx509_crypto_set_key_data ( - hx509_crypto /*crypto*/, - const void */*data*/, - size_t /*length*/); - -int -hx509_crypto_set_key_name ( - hx509_crypto /*crypto*/, - const char */*name*/); - -void -hx509_crypto_set_padding ( - hx509_crypto /*crypto*/, - int /*padding_type*/); - -int -hx509_crypto_set_params ( - hx509_context /*context*/, - hx509_crypto /*crypto*/, - const heim_octet_string */*param*/, - heim_octet_string */*ivec*/); - -int -hx509_crypto_set_random_key ( - hx509_crypto /*crypto*/, - heim_octet_string */*key*/); - -int -hx509_env_add ( - hx509_context /*context*/, - hx509_env */*env*/, - const char */*key*/, - const char */*value*/); - -int -hx509_env_add_binding ( - hx509_context /*context*/, - hx509_env */*env*/, - const char */*key*/, - hx509_env /*list*/); - -const char * -hx509_env_find ( - hx509_context /*context*/, - hx509_env /*env*/, - const char */*key*/); - -hx509_env -hx509_env_find_binding ( - hx509_context /*context*/, - hx509_env /*env*/, - const char */*key*/); - -void -hx509_env_free (hx509_env */*env*/); - -const char * -hx509_env_lfind ( - hx509_context /*context*/, - hx509_env /*env*/, - const char */*key*/, - size_t /*len*/); - -void -hx509_err ( - hx509_context /*context*/, - int /*exit_code*/, - int /*error_code*/, - const char */*fmt*/, - ...); - -hx509_private_key_ops * -hx509_find_private_alg (const heim_oid */*oid*/); - -void -hx509_free_error_string (char */*str*/); - -void -hx509_free_octet_string_list (hx509_octet_string_list */*list*/); - -int -hx509_general_name_unparse ( - GeneralName */*name*/, - char **/*str*/); - -char * -hx509_get_error_string ( - hx509_context /*context*/, - int /*error_code*/); - -int -hx509_get_one_cert ( - hx509_context /*context*/, - hx509_certs /*certs*/, - hx509_cert */*c*/); - -int -hx509_lock_add_cert ( - hx509_context /*context*/, - hx509_lock /*lock*/, - hx509_cert /*cert*/); - -int -hx509_lock_add_certs ( - hx509_context /*context*/, - hx509_lock /*lock*/, - hx509_certs /*certs*/); - -int -hx509_lock_add_password ( - hx509_lock /*lock*/, - const char */*password*/); - -int -hx509_lock_command_string ( - hx509_lock /*lock*/, - const char */*string*/); - -void -hx509_lock_free (hx509_lock /*lock*/); - -int -hx509_lock_init ( - hx509_context /*context*/, - hx509_lock */*lock*/); - -int -hx509_lock_prompt ( - hx509_lock /*lock*/, - hx509_prompt */*prompt*/); - -void -hx509_lock_reset_certs ( - hx509_context /*context*/, - hx509_lock /*lock*/); - -void -hx509_lock_reset_passwords (hx509_lock /*lock*/); - -void -hx509_lock_reset_promper (hx509_lock /*lock*/); - -int -hx509_lock_set_prompter ( - hx509_lock /*lock*/, - hx509_prompter_fct /*prompt*/, - void */*data*/); - -int -hx509_name_binary ( - const hx509_name /*name*/, - heim_octet_string */*os*/); - -int -hx509_name_cmp ( - hx509_name /*n1*/, - hx509_name /*n2*/); - -int -hx509_name_copy ( - hx509_context /*context*/, - const hx509_name /*from*/, - hx509_name */*to*/); - -int -hx509_name_expand ( - hx509_context /*context*/, - hx509_name /*name*/, - hx509_env /*env*/); - -void -hx509_name_free (hx509_name */*name*/); - -int -hx509_name_is_null_p (const hx509_name /*name*/); - -int -hx509_name_normalize ( - hx509_context /*context*/, - hx509_name /*name*/); - -int -hx509_name_to_Name ( - const hx509_name /*from*/, - Name */*to*/); - -int -hx509_name_to_string ( - const hx509_name /*name*/, - char **/*str*/); - -int -hx509_ocsp_request ( - hx509_context /*context*/, - hx509_certs /*reqcerts*/, - hx509_certs /*pool*/, - hx509_cert /*signer*/, - const AlgorithmIdentifier */*digest*/, - heim_octet_string */*request*/, - heim_octet_string */*nonce*/); - -int -hx509_ocsp_verify ( - hx509_context /*context*/, - time_t /*now*/, - hx509_cert /*cert*/, - int /*flags*/, - const void */*data*/, - size_t /*length*/, - time_t */*expiration*/); - -void -hx509_oid_print ( - const heim_oid */*oid*/, - hx509_vprint_func /*func*/, - void */*ctx*/); - -int -hx509_oid_sprint ( - const heim_oid */*oid*/, - char **/*str*/); - -int -hx509_parse_name ( - hx509_context /*context*/, - const char */*str*/, - hx509_name */*name*/); - -int -hx509_parse_private_key ( - hx509_context /*context*/, - const AlgorithmIdentifier */*keyai*/, - const void */*data*/, - size_t /*len*/, - hx509_key_format_t /*format*/, - hx509_private_key */*private_key*/); - -int -hx509_peer_info_add_cms_alg ( - hx509_context /*context*/, - hx509_peer_info /*peer*/, - const AlgorithmIdentifier */*val*/); - -int -hx509_peer_info_alloc ( - hx509_context /*context*/, - hx509_peer_info */*peer*/); - -void -hx509_peer_info_free (hx509_peer_info /*peer*/); - -int -hx509_peer_info_set_cert ( - hx509_peer_info /*peer*/, - hx509_cert /*cert*/); - -int -hx509_peer_info_set_cms_algs ( - hx509_context /*context*/, - hx509_peer_info /*peer*/, - const AlgorithmIdentifier */*val*/, - size_t /*len*/); - -int -hx509_pem_add_header ( - hx509_pem_header **/*headers*/, - const char */*header*/, - const char */*value*/); - -const char * -hx509_pem_find_header ( - const hx509_pem_header */*h*/, - const char */*header*/); - -void -hx509_pem_free_header (hx509_pem_header */*headers*/); - -int -hx509_pem_read ( - hx509_context /*context*/, - FILE */*f*/, - hx509_pem_read_func /*func*/, - void */*ctx*/); - -int -hx509_pem_write ( - hx509_context /*context*/, - const char */*type*/, - hx509_pem_header */*headers*/, - FILE */*f*/, - const void */*data*/, - size_t /*size*/); - -int -hx509_print_cert ( - hx509_context /*context*/, - hx509_cert /*cert*/, - FILE */*out*/); - -void -hx509_print_stdout ( - void */*ctx*/, - const char */*fmt*/, - va_list /*va*/); - -int -hx509_private_key2SPKI ( - hx509_context /*context*/, - hx509_private_key /*private_key*/, - SubjectPublicKeyInfo */*spki*/); - -void -hx509_private_key_assign_rsa ( - hx509_private_key /*key*/, - void */*ptr*/); - -int -hx509_private_key_free (hx509_private_key */*key*/); - -int -hx509_private_key_init ( - hx509_private_key */*key*/, - hx509_private_key_ops */*ops*/, - void */*keydata*/); - -int -hx509_private_key_private_decrypt ( - hx509_context /*context*/, - const heim_octet_string */*ciphertext*/, - const heim_oid */*encryption_oid*/, - hx509_private_key /*p*/, - heim_octet_string */*cleartext*/); - -int -hx509_prompt_hidden (hx509_prompt_type /*type*/); - -int -hx509_query_alloc ( - hx509_context /*context*/, - hx509_query **/*q*/); - -void -hx509_query_free ( - hx509_context /*context*/, - hx509_query */*q*/); - -int -hx509_query_match_cmp_func ( - hx509_query */*q*/, - int (*/*func*/)(hx509_context, hx509_cert, void *), - void */*ctx*/); - -int -hx509_query_match_eku ( - hx509_query */*q*/, - const heim_oid */*eku*/); - -int -hx509_query_match_expr ( - hx509_context /*context*/, - hx509_query */*q*/, - const char */*expr*/); - -int -hx509_query_match_friendly_name ( - hx509_query */*q*/, - const char */*name*/); - -int -hx509_query_match_issuer_serial ( - hx509_query */*q*/, - const Name */*issuer*/, - const heim_integer */*serialNumber*/); - -void -hx509_query_match_option ( - hx509_query */*q*/, - hx509_query_option /*option*/); - -void -hx509_query_statistic_file ( - hx509_context /*context*/, - const char */*fn*/); - -void -hx509_query_unparse_stats ( - hx509_context /*context*/, - int /*printtype*/, - FILE */*out*/); - -void -hx509_request_free (hx509_request */*req*/); - -int -hx509_request_get_SubjectPublicKeyInfo ( - hx509_context /*context*/, - hx509_request /*req*/, - SubjectPublicKeyInfo */*key*/); - -int -hx509_request_get_name ( - hx509_context /*context*/, - hx509_request /*req*/, - hx509_name */*name*/); - -int -hx509_request_init ( - hx509_context /*context*/, - hx509_request */*req*/); - -int -hx509_request_set_SubjectPublicKeyInfo ( - hx509_context /*context*/, - hx509_request /*req*/, - const SubjectPublicKeyInfo */*key*/); - -int -hx509_request_set_name ( - hx509_context /*context*/, - hx509_request /*req*/, - hx509_name /*name*/); - -int -hx509_revoke_add_crl ( - hx509_context /*context*/, - hx509_revoke_ctx /*ctx*/, - const char */*path*/); - -int -hx509_revoke_add_ocsp ( - hx509_context /*context*/, - hx509_revoke_ctx /*ctx*/, - const char */*path*/); - -void -hx509_revoke_free (hx509_revoke_ctx */*ctx*/); - -int -hx509_revoke_init ( - hx509_context /*context*/, - hx509_revoke_ctx */*ctx*/); - -int -hx509_revoke_ocsp_print ( - hx509_context /*context*/, - const char */*path*/, - FILE */*out*/); - -int -hx509_revoke_verify ( - hx509_context /*context*/, - hx509_revoke_ctx /*ctx*/, - hx509_certs /*certs*/, - time_t /*now*/, - hx509_cert /*cert*/, - hx509_cert /*parent_cert*/); - -void -hx509_set_error_string ( - hx509_context /*context*/, - int /*flags*/, - int /*code*/, - const char */*fmt*/, - ...); - -void -hx509_set_error_stringv ( - hx509_context /*context*/, - int /*flags*/, - int /*code*/, - const char */*fmt*/, - va_list /*ap*/); - -const AlgorithmIdentifier * -hx509_signature_ecPublicKey (void); - -const AlgorithmIdentifier * -hx509_signature_ecdsa_with_sha1 (void); - -const AlgorithmIdentifier * -hx509_signature_ecdsa_with_sha256 (void); - -const AlgorithmIdentifier * -hx509_signature_md5 (void); - -const AlgorithmIdentifier * -hx509_signature_rsa (void); - -const AlgorithmIdentifier * -hx509_signature_rsa_pkcs1_x509 (void); - -const AlgorithmIdentifier * -hx509_signature_rsa_with_md5 (void); - -const AlgorithmIdentifier * -hx509_signature_rsa_with_sha1 (void); - -const AlgorithmIdentifier * -hx509_signature_rsa_with_sha256 (void); - -const AlgorithmIdentifier * -hx509_signature_rsa_with_sha384 (void); - -const AlgorithmIdentifier * -hx509_signature_rsa_with_sha512 (void); - -const AlgorithmIdentifier * -hx509_signature_sha1 (void); - -const AlgorithmIdentifier * -hx509_signature_sha256 (void); - -const AlgorithmIdentifier * -hx509_signature_sha384 (void); - -const AlgorithmIdentifier * -hx509_signature_sha512 (void); - -int -hx509_unparse_der_name ( - const void */*data*/, - size_t /*length*/, - char **/*str*/); - -int -hx509_validate_cert ( - hx509_context /*context*/, - hx509_validate_ctx /*ctx*/, - hx509_cert /*cert*/); - -void -hx509_validate_ctx_add_flags ( - hx509_validate_ctx /*ctx*/, - int /*flags*/); - -void -hx509_validate_ctx_free (hx509_validate_ctx /*ctx*/); - -int -hx509_validate_ctx_init ( - hx509_context /*context*/, - hx509_validate_ctx */*ctx*/); - -void -hx509_validate_ctx_set_print ( - hx509_validate_ctx /*ctx*/, - hx509_vprint_func /*func*/, - void */*c*/); - -void -hx509_verify_attach_anchors ( - hx509_verify_ctx /*ctx*/, - hx509_certs /*set*/); - -void -hx509_verify_attach_revoke ( - hx509_verify_ctx /*ctx*/, - hx509_revoke_ctx /*revoke_ctx*/); - -void -hx509_verify_ctx_f_allow_best_before_signature_algs ( - hx509_context /*ctx*/, - int /*boolean*/); - -void -hx509_verify_ctx_f_allow_default_trustanchors ( - hx509_verify_ctx /*ctx*/, - int /*boolean*/); - -void -hx509_verify_destroy_ctx (hx509_verify_ctx /*ctx*/); - -int -hx509_verify_hostname ( - hx509_context /*context*/, - const hx509_cert /*cert*/, - int /*flags*/, - hx509_hostname_type /*type*/, - const char */*hostname*/, - const struct sockaddr */*sa*/, - int /*sa_size*/); - -int -hx509_verify_init_ctx ( - hx509_context /*context*/, - hx509_verify_ctx */*ctx*/); - -int -hx509_verify_path ( - hx509_context /*context*/, - hx509_verify_ctx /*ctx*/, - hx509_cert /*cert*/, - hx509_certs /*pool*/); - -void -hx509_verify_set_max_depth ( - hx509_verify_ctx /*ctx*/, - unsigned int /*max_depth*/); - -void -hx509_verify_set_proxy_certificate ( - hx509_verify_ctx /*ctx*/, - int /*boolean*/); - -void -hx509_verify_set_strict_rfc3280_verification ( - hx509_verify_ctx /*ctx*/, - int /*boolean*/); - -void -hx509_verify_set_time ( - hx509_verify_ctx /*ctx*/, - time_t /*t*/); - -int -hx509_verify_signature ( - hx509_context /*context*/, - const hx509_cert /*signer*/, - const AlgorithmIdentifier */*alg*/, - const heim_octet_string */*data*/, - const heim_octet_string */*sig*/); - -void -hx509_xfree (void */*ptr*/); - -int -yywrap (void); - -#ifdef __cplusplus -} -#endif - -#endif /* __hx509_protos_h__ */ diff --git a/kerberosV/src/lib/hx509/hx509.h b/kerberosV/src/lib/hx509/hx509.h deleted file mode 100644 index 743504bf349..00000000000 --- a/kerberosV/src/lib/hx509/hx509.h +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (c) 2004 - 2007 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: hx509.h,v 1.1 2013/06/17 19:11:43 robert Exp $ */ - -#ifndef HEIMDAL_HX509_H -#define HEIMDAL_HX509_H 1 - -#include -#include -#include - -typedef struct hx509_cert_attribute_data *hx509_cert_attribute; -typedef struct hx509_cert_data *hx509_cert; -typedef struct hx509_certs_data *hx509_certs; -typedef struct hx509_context_data *hx509_context; -typedef struct hx509_crypto_data *hx509_crypto; -typedef struct hx509_lock_data *hx509_lock; -typedef struct hx509_name_data *hx509_name; -typedef struct hx509_private_key *hx509_private_key; -typedef struct hx509_private_key_ops hx509_private_key_ops; -typedef struct hx509_validate_ctx_data *hx509_validate_ctx; -typedef struct hx509_verify_ctx_data *hx509_verify_ctx; -typedef struct hx509_revoke_ctx_data *hx509_revoke_ctx; -typedef struct hx509_query_data hx509_query; -typedef void * hx509_cursor; -typedef struct hx509_request_data *hx509_request; -typedef struct hx509_error_data *hx509_error; -typedef struct hx509_peer_info *hx509_peer_info; -typedef struct hx509_ca_tbs *hx509_ca_tbs; -typedef struct hx509_env_data *hx509_env; -typedef struct hx509_crl *hx509_crl; - -typedef void (*hx509_vprint_func)(void *, const char *, va_list); - -enum { - HX509_VHN_F_ALLOW_NO_MATCH = 1 -}; - -enum { - HX509_VALIDATE_F_VALIDATE = 1, - HX509_VALIDATE_F_VERBOSE = 2 -}; - -enum { - HX509_CRYPTO_PADDING_PKCS7 = 0, - HX509_CRYPTO_PADDING_NONE = 1 -}; - -enum { - HX509_KEY_FORMAT_GUESS = 0, - HX509_KEY_FORMAT_DER = 1, - HX509_KEY_FORMAT_WIN_BACKUPKEY = 2 -}; -typedef uint32_t hx509_key_format_t; - -struct hx509_cert_attribute_data { - heim_oid oid; - heim_octet_string data; -}; - -typedef enum { - HX509_PROMPT_TYPE_PASSWORD = 0x1, /* password, hidden */ - HX509_PROMPT_TYPE_QUESTION = 0x2, /* question, not hidden */ - HX509_PROMPT_TYPE_INFO = 0x4 /* infomation, reply doesn't matter */ -} hx509_prompt_type; - -typedef struct hx509_prompt { - const char *prompt; - hx509_prompt_type type; - heim_octet_string reply; -} hx509_prompt; - -typedef int (*hx509_prompter_fct)(void *, const hx509_prompt *); - -typedef struct hx509_octet_string_list { - size_t len; - heim_octet_string *val; -} hx509_octet_string_list; - -typedef struct hx509_pem_header { - struct hx509_pem_header *next; - char *header; - char *value; -} hx509_pem_header; - -typedef int -(*hx509_pem_read_func)(hx509_context, const char *, const hx509_pem_header *, - const void *, size_t, void *ctx); - -/* - * Options passed to hx509_query_match_option. - */ -typedef enum { - HX509_QUERY_OPTION_PRIVATE_KEY = 1, - HX509_QUERY_OPTION_KU_ENCIPHERMENT = 2, - HX509_QUERY_OPTION_KU_DIGITALSIGNATURE = 3, - HX509_QUERY_OPTION_KU_KEYCERTSIGN = 4, - HX509_QUERY_OPTION_END = 0xffff -} hx509_query_option; - -/* flags to hx509_certs_init */ -#define HX509_CERTS_CREATE 0x01 -#define HX509_CERTS_UNPROTECT_ALL 0x02 - -/* flags to hx509_set_error_string */ -#define HX509_ERROR_APPEND 0x01 - -/* flags to hx509_cms_unenvelope */ -#define HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT 0x01 -#define HX509_CMS_UE_ALLOW_WEAK 0x02 - -/* flags to hx509_cms_envelope_1 */ -#define HX509_CMS_EV_NO_KU_CHECK 0x01 -#define HX509_CMS_EV_ALLOW_WEAK 0x02 -#define HX509_CMS_EV_ID_NAME 0x04 - -/* flags to hx509_cms_verify_signed */ -#define HX509_CMS_VS_ALLOW_DATA_OID_MISMATCH 0x01 -#define HX509_CMS_VS_NO_KU_CHECK 0x02 -#define HX509_CMS_VS_ALLOW_ZERO_SIGNER 0x04 -#define HX509_CMS_VS_NO_VALIDATE 0x08 - -/* selectors passed to hx509_crypto_select and hx509_crypto_available */ -#define HX509_SELECT_ALL 0 -#define HX509_SELECT_DIGEST 1 -#define HX509_SELECT_PUBLIC_SIG 2 -#define HX509_SELECT_PUBLIC_ENC 3 -#define HX509_SELECT_SECRET_ENC 4 - -/* flags to hx509_ca_tbs_set_template */ -#define HX509_CA_TEMPLATE_SUBJECT 1 -#define HX509_CA_TEMPLATE_SERIAL 2 -#define HX509_CA_TEMPLATE_NOTBEFORE 4 -#define HX509_CA_TEMPLATE_NOTAFTER 8 -#define HX509_CA_TEMPLATE_SPKI 16 -#define HX509_CA_TEMPLATE_KU 32 -#define HX509_CA_TEMPLATE_EKU 64 - -/* flags hx509_cms_create_signed* */ -#define HX509_CMS_SIGNATURE_DETACHED 0x01 -#define HX509_CMS_SIGNATURE_ID_NAME 0x02 -#define HX509_CMS_SIGNATURE_NO_SIGNER 0x04 -#define HX509_CMS_SIGNATURE_LEAF_ONLY 0x08 -#define HX509_CMS_SIGNATURE_NO_CERTS 0x10 - -/* hx509_verify_hostname nametype */ -typedef enum { - HX509_HN_HOSTNAME = 0, - HX509_HN_DNSSRV -} hx509_hostname_type; - -#include -#include - -#endif /* HEIMDAL_HX509_H */ diff --git a/kerberosV/src/lib/hx509/hx509_err.et b/kerberosV/src/lib/hx509/hx509_err.et deleted file mode 100644 index 94ae8f0150f..00000000000 --- a/kerberosV/src/lib/hx509/hx509_err.et +++ /dev/null @@ -1,103 +0,0 @@ -# -# Error messages for the hx509 library -# -# This might look like a com_err file, but is not -# -id "$Id: hx509_err.et,v 1.1 2013/06/17 19:11:43 robert Exp $" - -error_table hx -prefix HX509 - -# path validateion and construction related errors -error_code BAD_TIMEFORMAT, "ASN.1 failed call to system time library" -error_code EXTENSION_NOT_FOUND, "Extension not found" -error_code NO_PATH, "Certification path not found" -error_code PARENT_NOT_CA, "Parent certificate is not a CA" -error_code CA_PATH_TOO_DEEP, "CA path too deep" -error_code SIG_ALG_NO_SUPPORTED, "Signature algorithm not supported" -error_code SIG_ALG_DONT_MATCH_KEY_ALG, "Signature algorithm doesn't match certificate key" -error_code CERT_USED_BEFORE_TIME, "Certificate used before it became valid" -error_code CERT_USED_AFTER_TIME, "Certificate used after it became invalid" -error_code PRIVATE_KEY_MISSING, "Private key required for the operation is missing" -error_code ALG_NOT_SUPP, "Algorithm not supported" -error_code ISSUER_NOT_FOUND, "Issuer couldn't be found" -error_code VERIFY_CONSTRAINTS, "Error verifing constraints" -error_code RANGE, "Number too large" -error_code NAME_CONSTRAINT_ERROR, "Error while verifing name constraints" -error_code PATH_TOO_LONG, "Path is too long, failed to find valid anchor" -error_code KU_CERT_MISSING, "Required keyusage for this certificate is missing" -error_code CERT_NOT_FOUND, "Certificate not found" -error_code UNKNOWN_LOCK_COMMAND, "Unknown lock command" -error_code PARENT_IS_CA, "Parent certificate is a CA" -error_code EXTRA_DATA_AFTER_STRUCTURE, "Extra data was found after the structure" -error_code PROXY_CERT_INVALID, "Proxy certificate is invalid" -error_code PROXY_CERT_NAME_WRONG, "Proxy certificate name is wrong" -error_code NAME_MALFORMED, "Name is malformated" -error_code CERTIFICATE_MALFORMED, "Certificate is malformated" -error_code CERTIFICATE_MISSING_EKU, "Certificate is missing a required EKU" -error_code PROXY_CERTIFICATE_NOT_CANONICALIZED, "Proxy certificate not canonicalize" - -# cms related errors -index 32 -prefix HX509_CMS -error_code FAILED_CREATE_SIGATURE, "Failed to create signature" -error_code MISSING_SIGNER_DATA, "Missing signer data" -error_code SIGNER_NOT_FOUND, "Couldn't find signers certificate" -error_code NO_DATA_AVAILABLE, "No data to perform the operation on" -error_code INVALID_DATA, "Data in the message is invalid" -error_code PADDING_ERROR, "Padding in the message invalid" -error_code NO_RECIPIENT_CERTIFICATE, "Couldn't find recipient certificate" -error_code DATA_OID_MISMATCH, "Mismatch bewteen signed type and unsigned type" - -# crypto related errors -index 64 -prefix HX509_CRYPTO -error_code INTERNAL_ERROR, "Internal error in the crypto engine" -error_code EXTERNAL_ERROR, "External error in the crypto engine" -error_code SIGNATURE_MISSING, "Signature missing for data" -error_code BAD_SIGNATURE, "Signature is not valid" -error_code SIG_NO_CONF, "Sigature doesn't provide confidentiality" -error_code SIG_INVALID_FORMAT, "Invalid format on signature" -error_code OID_MISMATCH, "Mismatch bewteen oids" -error_code NO_PROMPTER, "No prompter function defined" -error_code SIGNATURE_WITHOUT_SIGNER, "Signature require signer, but non available" -error_code RSA_PUBLIC_ENCRYPT, "RSA public encyption failed" -error_code RSA_PRIVATE_ENCRYPT, "RSA private encyption failed" -error_code RSA_PUBLIC_DECRYPT, "RSA public decryption failed" -error_code RSA_PRIVATE_DECRYPT, "RSA private decryption failed" -error_code ALGORITHM_BEST_BEFORE, "Algorithm has passed its best before date" -error_code KEY_FORMAT_UNSUPPORTED, "Key format is unsupported" - -# revoke related errors -index 96 -prefix HX509 -error_code CRL_USED_BEFORE_TIME, "CRL used before it became valid" -error_code CRL_USED_AFTER_TIME, "CRL used after it became invalid" -error_code CRL_INVALID_FORMAT, "CRL have invalid format" -error_code CERT_REVOKED, "Certificate is revoked" -error_code REVOKE_STATUS_MISSING, "No revoke status found for certificates" -error_code CRL_UNKNOWN_EXTENSION, "Unknown extension" -error_code REVOKE_WRONG_DATA, "Got wrong CRL/OCSP data from server" -error_code REVOKE_NOT_SAME_PARENT, "Doesn't have same parent as other certificates" -error_code CERT_NOT_IN_OCSP, "Certificates not in OCSP reply" - -# misc error -index 108 -error_code LOCAL_ATTRIBUTE_MISSING, "No local key attribute" -error_code PARSING_KEY_FAILED, "Failed to parse key" -error_code UNSUPPORTED_OPERATION, "Unsupported operation" -error_code UNIMPLEMENTED_OPERATION, "Unimplemented operation" -error_code PARSING_NAME_FAILED, "Failed to parse name" - -# keystore related error -index 128 -prefix HX509_PKCS11 -error_code NO_SLOT, "No smartcard reader/device found" -error_code NO_TOKEN, "No smartcard in reader" -error_code NO_MECH, "No supported mech(s)" -error_code TOKEN_CONFUSED, "Token or slot failed in inconsistent way" -error_code OPEN_SESSION, "Failed to open session to slot" -error_code LOGIN, "Failed to login to slot" -error_code LOAD, "Failed to load PKCS module" - -end diff --git a/kerberosV/src/lib/hx509/hx_locl.h b/kerberosV/src/lib/hx509/hx_locl.h deleted file mode 100644 index db2a8093de6..00000000000 --- a/kerberosV/src/lib/hx509/hx_locl.h +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (c) 2004 - 2006 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: hx_locl.h,v 1.1 2013/06/17 19:11:43 robert Exp $ */ - -#include - -#include -#include -#include -#include -#ifdef HAVE_STRINGS_H -#include -#endif -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define HC_DEPRECATED_CRYPTO -#include "crypto-headers.h" - -struct hx509_keyset_ops; -struct hx509_collector; -struct hx509_generate_private_context; -typedef struct hx509_path hx509_path; - -#include - -typedef void (*_hx509_cert_release_func)(struct hx509_cert_data *, void *); - - -#include "sel.h" - -#include -#include - -struct hx509_peer_info { - hx509_cert cert; - AlgorithmIdentifier *val; - size_t len; -}; - -#define HX509_CERTS_FIND_SERIALNUMBER 1 -#define HX509_CERTS_FIND_ISSUER 2 -#define HX509_CERTS_FIND_SUBJECT 4 -#define HX509_CERTS_FIND_ISSUER_KEY_ID 8 -#define HX509_CERTS_FIND_SUBJECT_KEY_ID 16 - -struct hx509_name_data { - Name der_name; -}; - -struct hx509_path { - size_t len; - hx509_cert *val; -}; - -struct hx509_query_data { - int match; -#define HX509_QUERY_FIND_ISSUER_CERT 0x000001 -#define HX509_QUERY_MATCH_SERIALNUMBER 0x000002 -#define HX509_QUERY_MATCH_ISSUER_NAME 0x000004 -#define HX509_QUERY_MATCH_SUBJECT_NAME 0x000008 -#define HX509_QUERY_MATCH_SUBJECT_KEY_ID 0x000010 -#define HX509_QUERY_MATCH_ISSUER_ID 0x000020 -#define HX509_QUERY_PRIVATE_KEY 0x000040 -#define HX509_QUERY_KU_ENCIPHERMENT 0x000080 -#define HX509_QUERY_KU_DIGITALSIGNATURE 0x000100 -#define HX509_QUERY_KU_KEYCERTSIGN 0x000200 -#define HX509_QUERY_KU_CRLSIGN 0x000400 -#define HX509_QUERY_KU_NONREPUDIATION 0x000800 -#define HX509_QUERY_KU_KEYAGREEMENT 0x001000 -#define HX509_QUERY_KU_DATAENCIPHERMENT 0x002000 -#define HX509_QUERY_ANCHOR 0x004000 -#define HX509_QUERY_MATCH_CERTIFICATE 0x008000 -#define HX509_QUERY_MATCH_LOCAL_KEY_ID 0x010000 -#define HX509_QUERY_NO_MATCH_PATH 0x020000 -#define HX509_QUERY_MATCH_FRIENDLY_NAME 0x040000 -#define HX509_QUERY_MATCH_FUNCTION 0x080000 -#define HX509_QUERY_MATCH_KEY_HASH_SHA1 0x100000 -#define HX509_QUERY_MATCH_TIME 0x200000 -#define HX509_QUERY_MATCH_EKU 0x400000 -#define HX509_QUERY_MATCH_EXPR 0x800000 -#define HX509_QUERY_MASK 0xffffff - Certificate *subject; - Certificate *certificate; - heim_integer *serial; - heim_octet_string *subject_id; - heim_octet_string *local_key_id; - Name *issuer_name; - Name *subject_name; - hx509_path *path; - char *friendlyname; - int (*cmp_func)(hx509_context, hx509_cert, void *); - void *cmp_func_ctx; - heim_octet_string *keyhash_sha1; - time_t timenow; - heim_oid *eku; - struct hx_expr *expr; -}; - -struct hx509_keyset_ops { - const char *name; - int flags; - int (*init)(hx509_context, hx509_certs, void **, - int, const char *, hx509_lock); - int (*store)(hx509_context, hx509_certs, void *, int, hx509_lock); - int (*free)(hx509_certs, void *); - int (*add)(hx509_context, hx509_certs, void *, hx509_cert); - int (*query)(hx509_context, hx509_certs, void *, - const hx509_query *, hx509_cert *); - int (*iter_start)(hx509_context, hx509_certs, void *, void **); - int (*iter)(hx509_context, hx509_certs, void *, void *, hx509_cert *); - int (*iter_end)(hx509_context, hx509_certs, void *, void *); - int (*printinfo)(hx509_context, hx509_certs, - void *, int (*)(void *, const char *), void *); - int (*getkeys)(hx509_context, hx509_certs, void *, hx509_private_key **); - int (*addkey)(hx509_context, hx509_certs, void *, hx509_private_key); -}; - -struct _hx509_password { - size_t len; - char **val; -}; - -extern hx509_lock _hx509_empty_lock; - -struct hx509_context_data { - struct hx509_keyset_ops **ks_ops; - int ks_num_ops; - int flags; -#define HX509_CTX_VERIFY_MISSING_OK 1 - int ocsp_time_diff; -#define HX509_DEFAULT_OCSP_TIME_DIFF (5*60) - hx509_error error; - struct et_list *et_list; - char *querystat; - hx509_certs default_trust_anchors; -}; - -/* _hx509_calculate_path flag field */ -#define HX509_CALCULATE_PATH_NO_ANCHOR 1 - -/* environment */ -struct hx509_env_data { - enum { env_string, env_list } type; - char *name; - struct hx509_env_data *next; - union { - char *string; - struct hx509_env_data *list; - } u; -}; - - -extern const AlgorithmIdentifier * _hx509_crypto_default_sig_alg; -extern const AlgorithmIdentifier * _hx509_crypto_default_digest_alg; -extern const AlgorithmIdentifier * _hx509_crypto_default_secret_alg; - -/* - * Configurable options - */ - -#ifdef __APPLE__ -#define HX509_DEFAULT_ANCHORS "KEYCHAIN:system-anchors" -#endif diff --git a/kerberosV/src/lib/hx509/hxtool-commands.in b/kerberosV/src/lib/hx509/hxtool-commands.in deleted file mode 100644 index c4e3dea1c0a..00000000000 --- a/kerberosV/src/lib/hx509/hxtool-commands.in +++ /dev/null @@ -1,766 +0,0 @@ -/* - * Copyright (c) 2005 - 2007 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: hxtool-commands.in,v 1.1 2013/06/17 19:11:43 robert Exp $ */ - -command = { - name = "cms-create-sd" - name = "cms-sign" - option = { - long = "certificate" - short = "c" - type = "strings" - argument = "certificate-store" - help = "certificate stores to pull certificates from" - } - option = { - long = "signer" - short = "s" - type = "string" - argument = "signer-friendly-name" - help = "certificate to sign with" - } - option = { - long = "anchors" - type = "strings" - argument = "certificate-store" - help = "trust anchors" - } - option = { - long = "pool" - type = "strings" - argument = "certificate-pool" - help = "certificate store to pull certificates from" - } - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - option = { - long = "peer-alg" - type = "strings" - argument = "oid" - help = "oid that the peer support" - } - option = { - long = "content-type" - type = "string" - argument = "oid" - help = "content type oid" - } - option = { - long = "content-info" - type = "flag" - help = "wrapped out-data in a ContentInfo" - } - option = { - long = "pem" - type = "flag" - help = "wrap out-data in PEM armor" - } - option = { - long = "detached-signature" - type = "flag" - help = "create a detached signature" - } - option = { - long = "signer" - type = "-flag" - help = "do not sign" - } - option = { - long = "id-by-name" - type = "flag" - help = "use subject name for CMS Identifier" - } - option = { - long = "embedded-certs" - type = "-flag" - help = "dont embedded certficiates" - } - option = { - long = "embed-leaf-only" - type = "flag" - help = "only embed leaf certificate" - } - min_args="1" - max_args="2" - argument="in-file out-file" - help = "Wrap a file within a SignedData object" -} -command = { - name = "cms-verify-sd" - option = { - long = "anchors" - short = "D" - type = "strings" - argument = "certificate-store" - help = "trust anchors" - } - option = { - long = "certificate" - short = "c" - type = "strings" - argument = "certificate-store" - help = "certificate store to pull certificates from" - } - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - option = { - long = "missing-revoke" - type = "flag" - help = "missing CRL/OCSP is ok" - } - option = { - long = "content-info" - type = "flag" - help = "unwrap in-data that's in a ContentInfo" - } - option = { - long = "pem" - type = "flag" - help = "unwrap in-data from PEM armor" - } - option = { - long = "signer-allowed" - type = "-flag" - help = "allow no signer" - } - option = { - long = "allow-wrong-oid" - type = "flag" - help = "allow wrong oid flag" - } - option = { - long = "signed-content" - type = "string" - help = "file containing content" - } - min_args="1" - max_args="2" - argument="in-file [out-file]" - help = "Verify a file within a SignedData object" -} -command = { - name = "cms-unenvelope" - option = { - long = "certificate" - short = "c" - type = "strings" - argument = "certificate-store" - help = "certificate used to decrypt the data" - } - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - option = { - long = "content-info" - type = "flag" - help = "wrapped out-data in a ContentInfo" - } - option = { - long = "allow-weak-crypto" - type = "flag" - help = "allow weak crypto" - } - min_args="2" - argument="in-file out-file" - help = "Unenvelope a file containing a EnvelopedData object" -} -command = { - name = "cms-envelope" - function = "cms_create_enveloped" - option = { - long = "certificate" - short = "c" - type = "strings" - argument = "certificate-store" - help = "certificates used to receive the data" - } - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - option = { - long = "encryption-type" - type = "string" - argument = "enctype" - help = "enctype" - } - option = { - long = "content-type" - type = "string" - argument = "oid" - help = "content type oid" - } - option = { - long = "content-info" - type = "flag" - help = "wrapped out-data in a ContentInfo" - } - option = { - long = "allow-weak-crypto" - type = "flag" - help = "allow weak crypto" - } - min_args="2" - argument="in-file out-file" - help = "Envelope a file containing a EnvelopedData object" -} -command = { - name = "verify" - function = "pcert_verify" - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - option = { - long = "allow-proxy-certificate" - type = "flag" - help = "allow proxy certificates" - } - option = { - long = "missing-revoke" - type = "flag" - help = "missing CRL/OCSP is ok" - } - option = { - long = "time" - type = "string" - help = "time when to validate the chain" - } - option = { - long = "verbose" - short = "v" - type = "flag" - help = "verbose logging" - } - option = { - long = "max-depth" - type = "integer" - help = "maximum search length of certificate trust anchor" - } - option = { - long = "hostname" - type = "string" - help = "match hostname to certificate" - } - argument = "cert:foo chain:cert1 chain:cert2 anchor:anchor1 anchor:anchor2" - help = "Verify certificate chain" -} -command = { - name = "print" - function = "pcert_print" - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - option = { - long = "content" - type = "flag" - help = "print the content of the certificates" - } - option = { - long = "never-fail" - type = "flag" - help = "never fail with an error code" - } - option = { - long = "info" - type = "flag" - help = "print the information about the certificate store" - } - min_args="1" - argument="certificate ..." - help = "Print certificates" -} -command = { - name = "validate" - function = "pcert_validate" - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - min_args="1" - argument="certificate ..." - help = "Validate content of certificates" -} -command = { - name = "certificate-copy" - name = "cc" - option = { - long = "in-pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - option = { - long = "out-pass" - type = "string" - argument = "password" - help = "password, prompter, or environment" - } - min_args="2" - argument="in-certificates-1 ... out-certificate" - help = "Copy in certificates stores into out certificate store" -} -command = { - name = "ocsp-fetch" - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - option = { - long = "sign" - type = "string" - argument = "certificate" - help = "certificate use to sign the request" - } - option = { - long = "url-path" - type = "string" - argument = "url" - help = "part after host in url to put in the request" - } - option = { - long = "nonce" - type = "-flag" - default = "1" - help = "don't include nonce in request" - } - option = { - long = "pool" - type = "strings" - argument = "certificate-store" - help = "pool to find parent certificate in" - } - min_args="2" - argument="outfile certs ..." - help = "Fetch OCSP responses for the following certs" -} -command = { - option = { - long = "ocsp-file" - type = "string" - help = "OCSP file" - } - name = "ocsp-verify" - min_args="1" - argument="certificates ..." - help = "Check that certificates are in OCSP file and valid" -} -command = { - name = "ocsp-print" - option = { - long = "verbose" - type = "flag" - help = "verbose" - } - min_args="1" - argument="ocsp-response-file ..." - help = "Print the OCSP responses" -} -command = { - name = "request-create" - option = { - long = "subject" - type = "string" - help = "Subject DN" - } - option = { - long = "email" - type = "strings" - help = "Email address in SubjectAltName" - } - option = { - long = "dnsname" - type = "strings" - help = "Hostname or domainname in SubjectAltName" - } - option = { - long = "type" - type = "string" - help = "Type of request CRMF or PKCS10, defaults to PKCS10" - } - option = { - long = "key" - type = "string" - help = "Key-pair" - } - option = { - long = "generate-key" - type = "string" - help = "keytype" - } - option = { - long = "key-bits" - type = "integer" - help = "number of bits in the generated key"; - } - option = { - long = "verbose" - type = "flag" - help = "verbose status" - } - min_args="1" - max_args="1" - argument="output-file" - help = "Create a CRMF or PKCS10 request" -} -command = { - name = "request-print" - option = { - long = "verbose" - type = "flag" - help = "verbose printing" - } - min_args="1" - argument="requests ..." - help = "Print requests" -} -command = { - name = "query" - option = { - long = "exact" - type = "flag" - help = "exact match" - } - option = { - long = "private-key" - type = "flag" - help = "search for private key" - } - option = { - long = "friendlyname" - type = "string" - argument = "name" - help = "match on friendly name" - } - option = { - long = "eku" - type = "string" - argument = "oid-string" - help = "match on EKU" - } - option = { - long = "expr" - type = "string" - argument = "expression" - help = "match on expression" - } - option = { - long = "keyEncipherment" - type = "flag" - help = "match keyEncipherment certificates" - } - option = { - long = "digitalSignature" - type = "flag" - help = "match digitalSignature certificates" - } - option = { - long = "print" - type = "flag" - help = "print matches" - } - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - min_args="1" - argument="certificates ..." - help = "Query the certificates for a match" -} -command = { - name = "info" -} -command = { - name = "random-data" - min_args="1" - argument="bytes" - help = "Generates random bytes and prints them to standard output" -} -command = { - option = { - long = "type" - type = "string" - help = "type of CMS algorithm" - } - name = "crypto-available" - min_args="0" - help = "Print available CMS crypto types" -} -command = { - option = { - long = "type" - type = "string" - help = "type of CMS algorithm" - } - option = { - long = "certificate" - type = "string" - help = "source certificate limiting the choices" - } - option = { - long = "peer-cmstype" - type = "strings" - help = "peer limiting cmstypes" - } - name = "crypto-select" - min_args="0" - help = "Print selected CMS type" -} -command = { - option = { - long = "decode" - short = "d" - type = "flag" - help = "decode instead of encode" - } - name = "hex" - function = "hxtool_hex" - min_args="0" - help = "Encode input to hex" -} -command = { - option = { - long = "issue-ca" - type = "flag" - help = "Issue a CA certificate" - } - option = { - long = "issue-proxy" - type = "flag" - help = "Issue a proxy certificate" - } - option = { - long = "domain-controller" - type = "flag" - help = "Issue a MS domaincontroller certificate" - } - option = { - long = "subject" - type = "string" - help = "Subject of issued certificate" - } - option = { - long = "ca-certificate" - type = "string" - help = "Issuing CA certificate" - } - option = { - long = "self-signed" - type = "flag" - help = "Issuing a self-signed certificate" - } - option = { - long = "ca-private-key" - type = "string" - help = "Private key for self-signed certificate" - } - option = { - long = "certificate" - type = "string" - help = "Issued certificate" - } - option = { - long = "type" - type = "strings" - help = "Types of certificate to issue (can be used more then once)" - } - option = { - long = "lifetime" - type = "string" - help = "Lifetime of certificate" - } - option = { - long = "serial-number" - type = "string" - help = "serial-number of certificate" - } - option = { - long = "path-length" - default = "-1" - type = "integer" - help = "Maximum path length (CA and proxy certificates), -1 no limit" - } - option = { - long = "hostname" - type = "strings" - help = "DNS names this certificate is allowed to serve" - } - option = { - long = "email" - type = "strings" - help = "email addresses assigned to this certificate" - } - option = { - long = "pk-init-principal" - type = "string" - help = "PK-INIT principal (for SAN)" - } - option = { - long = "ms-upn" - type = "string" - help = "Microsoft UPN (for SAN)" - } - option = { - long = "jid" - type = "string" - help = "XMPP jabber id (for SAN)" - } - option = { - long = "req" - type = "string" - help = "certificate request" - } - option = { - long = "certificate-private-key" - type = "string" - help = "private-key" - } - option = { - long = "generate-key" - type = "string" - help = "keytype" - } - option = { - long = "key-bits" - type = "integer" - help = "number of bits in the generated key" - } - option = { - long = "crl-uri" - type = "string" - help = "URI to CRL" - } - option = { - long = "template-certificate" - type = "string" - help = "certificate" - } - option = { - long = "template-fields" - type = "string" - help = "flag" - } - name = "certificate-sign" - name = "cert-sign" - name = "issue-certificate" - name = "ca" - function = "hxtool_ca" - min_args="0" - help = "Issue a certificate" -} -command = { - name = "test-crypto" - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - option = { - long = "verbose" - type = "flag" - help = "verbose printing" - } - min_args="1" - argument="certificates..." - help = "Test crypto system related to the certificates" -} -command = { - option = { - long = "type" - type = "integer" - help = "type of statistics" - } - name = "statistic-print" - min_args="0" - help = "Print statistics" -} -command = { - option = { - long = "signer" - type = "string" - help = "signer certificate" - } - option = { - long = "pass" - type = "strings" - argument = "password" - help = "password, prompter, or environment" - } - option = { - long = "crl-file" - type = "string" - help = "CRL output file" - } - option = { - long = "lifetime" - type = "string" - help = "time the crl will be valid" - } - name = "crl-sign" - min_args="0" - argument="certificates..." - help = "Create a CRL" -} -command = { - name = "help" - name = "?" - argument = "[command]" - min_args = "0" - max_args = "1" - help = "Help! I need somebody" -} diff --git a/kerberosV/src/lib/hx509/hxtool-version.rc b/kerberosV/src/lib/hx509/hxtool-version.rc deleted file mode 100644 index 7e5197cc47a..00000000000 --- a/kerberosV/src/lib/hx509/hxtool-version.rc +++ /dev/null @@ -1,36 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2010, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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. - * - **********************************************************************/ - -#define RC_FILE_TYPE VFT_APP -#define RC_FILE_DESC_0409 "Heimdal X.509 Certificate Tool" -#define RC_FILE_ORIG_0409 "hxtool.exe" - -#include "../../windows/version.rc" diff --git a/kerberosV/src/lib/hx509/hxtool.c b/kerberosV/src/lib/hx509/hxtool.c deleted file mode 100644 index 4bd467f4284..00000000000 --- a/kerberosV/src/lib/hx509/hxtool.c +++ /dev/null @@ -1,2241 +0,0 @@ -/* - * Copyright (c) 2004 - 2007 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 "hx_locl.h" - -#include -#include -#include -#include - -static hx509_context context; - -static char *stat_file_string; -static int version_flag; -static int help_flag; - -struct getargs args[] = { - { "statistic-file", 0, arg_string, &stat_file_string, NULL, NULL }, - { "version", 0, arg_flag, &version_flag, NULL, NULL }, - { "help", 0, arg_flag, &help_flag, NULL, NULL } -}; -int num_args = sizeof(args) / sizeof(args[0]); - -static void -usage(int code) -{ - arg_printusage(args, num_args, NULL, "command"); - printf("Use \"%s help\" to get more help\n", getprogname()); - exit(code); -} - -/* - * - */ - -static void -lock_strings(hx509_lock lock, getarg_strings *pass) -{ - int i; - for (i = 0; i < pass->num_strings; i++) { - int ret = hx509_lock_command_string(lock, pass->strings[i]); - if (ret) - errx(1, "hx509_lock_command_string: %s: %d", - pass->strings[i], ret); - } -} - -/* - * - */ - -static void -certs_strings(hx509_context contextp, const char *type, hx509_certs certs, - hx509_lock lock, const getarg_strings *s) -{ - int i, ret; - - for (i = 0; i < s->num_strings; i++) { - ret = hx509_certs_append(contextp, certs, lock, s->strings[i]); - if (ret) - hx509_err(contextp, 1, ret, - "hx509_certs_append: %s %s", type, s->strings[i]); - } -} - -/* - * - */ - -static void -parse_oid(const char *str, const heim_oid *def, heim_oid *oid) -{ - int ret; - if (str) - ret = der_parse_heim_oid (str, " .", oid); - else - ret = der_copy_oid(def, oid); - if (ret) - errx(1, "parse_oid failed for: %s", str ? str : "default oid"); -} - -/* - * - */ - -static void -peer_strings(hx509_context contextp, - hx509_peer_info *peer, - const getarg_strings *s) -{ - AlgorithmIdentifier *val; - int ret, i; - - ret = hx509_peer_info_alloc(contextp, peer); - if (ret) - hx509_err(contextp, 1, ret, "hx509_peer_info_alloc"); - - val = calloc(s->num_strings, sizeof(*val)); - if (val == NULL) - err(1, "malloc"); - - for (i = 0; i < s->num_strings; i++) - parse_oid(s->strings[i], NULL, &val[i].algorithm); - - ret = hx509_peer_info_set_cms_algs(contextp, *peer, val, s->num_strings); - if (ret) - hx509_err(contextp, 1, ret, "hx509_peer_info_set_cms_algs"); - - for (i = 0; i < s->num_strings; i++) - free_AlgorithmIdentifier(&val[i]); - free(val); -} - -/* - * - */ - -struct pem_data { - heim_octet_string *os; - int detached_data; -}; - -static int -pem_reader(hx509_context contextp, const char *type, - const hx509_pem_header *headers, - const void *data , size_t length, void *ctx) -{ - struct pem_data *p = (struct pem_data *)ctx; - const char *h; - - p->os->data = malloc(length); - if (p->os->data == NULL) - return ENOMEM; - memcpy(p->os->data, data, length); - p->os->length = length; - - h = hx509_pem_find_header(headers, "Content-disposition"); - if (h && strcasecmp(h, "detached") == 0) - p->detached_data = 1; - - return 0; -} - -/* - * - */ - -int -cms_verify_sd(struct cms_verify_sd_options *opt, int argc, char **argv) -{ - hx509_verify_ctx ctx = NULL; - heim_oid type; - heim_octet_string c, co, signeddata, *sd = NULL; - hx509_certs store = NULL; - hx509_certs signers = NULL; - hx509_certs anchors = NULL; - hx509_lock lock; - int ret, flags = 0; - - size_t sz; - void *p = NULL; - - if (opt->missing_revoke_flag) - hx509_context_set_missing_revoke(context, 1); - - hx509_lock_init(context, &lock); - lock_strings(lock, &opt->pass_strings); - - ret = hx509_verify_init_ctx(context, &ctx); - if (ret) - hx509_err(context, 1, ret, "hx509_verify_init_ctx"); - - ret = hx509_certs_init(context, "MEMORY:cms-anchors", 0, NULL, &anchors); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - ret = hx509_certs_init(context, "MEMORY:cert-store", 0, NULL, &store); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - - certs_strings(context, "anchors", anchors, lock, &opt->anchors_strings); - certs_strings(context, "store", store, lock, &opt->certificate_strings); - - if (opt->pem_flag) { - struct pem_data pd; - FILE *f; - - pd.os = &co; - pd.detached_data = 0; - - f = fopen(argv[0], "r"); - if (f == NULL) - err(1, "Failed to open file %s", argv[0]); - - ret = hx509_pem_read(context, f, pem_reader, &pd); - fclose(f); - if (ret) - errx(1, "PEM reader failed: %d", ret); - - if (pd.detached_data && opt->signed_content_string == NULL) { - char *r = strrchr(argv[0], '.'); - if (r && strcasecmp(r, ".pem") == 0) { - char *s = strdup(argv[0]); - if (s == NULL) - errx(1, "malloc: out of memory"); - s[r - argv[0]] = '\0'; - ret = _hx509_map_file_os(s, &signeddata); - if (ret) - errx(1, "map_file: %s: %d", s, ret); - free(s); - sd = &signeddata; - } - } - - } else { - ret = rk_undumpdata(argv[0], &p, &sz); - if (ret) - err(1, "map_file: %s: %d", argv[0], ret); - - co.data = p; - co.length = sz; - } - - if (opt->signed_content_string) { - ret = _hx509_map_file_os(opt->signed_content_string, &signeddata); - if (ret) - errx(1, "map_file: %s: %d", opt->signed_content_string, ret); - sd = &signeddata; - } - - if (opt->content_info_flag) { - heim_octet_string uwco; - heim_oid oid; - - ret = hx509_cms_unwrap_ContentInfo(&co, &oid, &uwco, NULL); - if (ret) - errx(1, "hx509_cms_unwrap_ContentInfo: %d", ret); - - if (der_heim_oid_cmp(&oid, &asn1_oid_id_pkcs7_signedData) != 0) - errx(1, "Content is not SignedData"); - der_free_oid(&oid); - - if (p == NULL) - der_free_octet_string(&co); - else { - rk_xfree(p); - p = NULL; - } - co = uwco; - } - - hx509_verify_attach_anchors(ctx, anchors); - - if (!opt->signer_allowed_flag) - flags |= HX509_CMS_VS_ALLOW_ZERO_SIGNER; - if (opt->allow_wrong_oid_flag) - flags |= HX509_CMS_VS_ALLOW_DATA_OID_MISMATCH; - - ret = hx509_cms_verify_signed(context, ctx, flags, co.data, co.length, sd, - store, &type, &c, &signers); - if (p != co.data) - der_free_octet_string(&co); - else - rk_xfree(p); - if (ret) - hx509_err(context, 1, ret, "hx509_cms_verify_signed"); - - { - char *str; - der_print_heim_oid(&type, '.', &str); - printf("type: %s\n", str); - free(str); - der_free_oid(&type); - } - if (signers == NULL) { - printf("unsigned\n"); - } else { - printf("signers:\n"); - hx509_certs_iter_f(context, signers, hx509_ci_print_names, stdout); - } - - hx509_verify_destroy_ctx(ctx); - - hx509_certs_free(&store); - hx509_certs_free(&signers); - hx509_certs_free(&anchors); - - hx509_lock_free(lock); - - if (argc > 1) { - ret = _hx509_write_file(argv[1], c.data, c.length); - if (ret) - errx(1, "hx509_write_file: %d", ret); - } - - der_free_octet_string(&c); - - if (sd) - _hx509_unmap_file_os(sd); - - return 0; -} - -static int -print_signer(hx509_context contextp, void *ctx, hx509_cert cert) -{ - hx509_pem_header **header = ctx; - char *signer_name = NULL; - hx509_name name; - int ret; - - ret = hx509_cert_get_subject(cert, &name); - if (ret) - errx(1, "hx509_cert_get_subject"); - - ret = hx509_name_to_string(name, &signer_name); - hx509_name_free(&name); - if (ret) - errx(1, "hx509_name_to_string"); - - hx509_pem_add_header(header, "Signer", signer_name); - - free(signer_name); - return 0; -} - -int -cms_create_sd(struct cms_create_sd_options *opt, int argc, char **argv) -{ - heim_oid contentType; - hx509_peer_info peer = NULL; - heim_octet_string o; - hx509_query *q; - hx509_lock lock; - hx509_certs store, pool, anchors, signer = NULL; - size_t sz; - void *p; - int ret, flags = 0; - char *infile, *outfile = NULL; - - memset(&contentType, 0, sizeof(contentType)); - - infile = argv[0]; - - if (argc < 2) { - asprintf(&outfile, "%s.%s", infile, - opt->pem_flag ? "pem" : "cms-signeddata"); - if (outfile == NULL) - errx(1, "out of memory"); - } else - outfile = argv[1]; - - hx509_lock_init(context, &lock); - lock_strings(lock, &opt->pass_strings); - - ret = hx509_certs_init(context, "MEMORY:cert-store", 0, NULL, &store); - if (ret) hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - ret = hx509_certs_init(context, "MEMORY:cert-pool", 0, NULL, &pool); - if (ret) hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - - certs_strings(context, "store", store, lock, &opt->certificate_strings); - certs_strings(context, "pool", pool, lock, &opt->pool_strings); - - if (opt->anchors_strings.num_strings) { - ret = hx509_certs_init(context, "MEMORY:cert-anchors", - 0, NULL, &anchors); - if (ret) hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - certs_strings(context, "anchors", anchors, lock, &opt->anchors_strings); - } else - anchors = NULL; - - if (opt->detached_signature_flag) - flags |= HX509_CMS_SIGNATURE_DETACHED; - if (opt->id_by_name_flag) - flags |= HX509_CMS_SIGNATURE_ID_NAME; - if (!opt->signer_flag) { - flags |= HX509_CMS_SIGNATURE_NO_SIGNER; - - } - - if (opt->signer_flag) { - ret = hx509_query_alloc(context, &q); - if (ret) - errx(1, "hx509_query_alloc: %d", ret); - - hx509_query_match_option(q, HX509_QUERY_OPTION_PRIVATE_KEY); - hx509_query_match_option(q, HX509_QUERY_OPTION_KU_DIGITALSIGNATURE); - - if (opt->signer_string) - hx509_query_match_friendly_name(q, opt->signer_string); - - ret = hx509_certs_filter(context, store, q, &signer); - hx509_query_free(context, q); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_find"); - } - if (!opt->embedded_certs_flag) - flags |= HX509_CMS_SIGNATURE_NO_CERTS; - if (opt->embed_leaf_only_flag) - flags |= HX509_CMS_SIGNATURE_LEAF_ONLY; - - ret = rk_undumpdata(infile, &p, &sz); - if (ret) - err(1, "map_file: %s: %d", infile, ret); - - if (opt->peer_alg_strings.num_strings) - peer_strings(context, &peer, &opt->peer_alg_strings); - - parse_oid(opt->content_type_string, &asn1_oid_id_pkcs7_data, &contentType); - - ret = hx509_cms_create_signed(context, - flags, - &contentType, - p, - sz, - NULL, - signer, - peer, - anchors, - pool, - &o); - if (ret) - hx509_err(context, 1, ret, "hx509_cms_create_signed: %d", ret); - - hx509_certs_free(&anchors); - hx509_certs_free(&pool); - hx509_certs_free(&store); - rk_xfree(p); - hx509_lock_free(lock); - hx509_peer_info_free(peer); - der_free_oid(&contentType); - - if (opt->content_info_flag) { - heim_octet_string wo; - - ret = hx509_cms_wrap_ContentInfo(&asn1_oid_id_pkcs7_signedData, &o, &wo); - if (ret) - errx(1, "hx509_cms_wrap_ContentInfo: %d", ret); - - der_free_octet_string(&o); - o = wo; - } - - if (opt->pem_flag) { - hx509_pem_header *header = NULL; - FILE *f; - - hx509_pem_add_header(&header, "Content-disposition", - opt->detached_signature_flag ? - "detached" : "inline"); - if (signer) { - ret = hx509_certs_iter_f(context, signer, print_signer, header); - if (ret) - hx509_err(context, 1, ret, "print signer"); - } - - f = fopen(outfile, "w"); - if (f == NULL) - err(1, "open %s", outfile); - - ret = hx509_pem_write(context, "CMS SIGNEDDATA", header, f, - o.data, o.length); - fclose(f); - hx509_pem_free_header(header); - if (ret) - errx(1, "hx509_pem_write: %d", ret); - - } else { - ret = _hx509_write_file(outfile, o.data, o.length); - if (ret) - errx(1, "hx509_write_file: %d", ret); - } - - hx509_certs_free(&signer); - free(o.data); - - return 0; -} - -int -cms_unenvelope(struct cms_unenvelope_options *opt, int argc, char **argv) -{ - heim_oid contentType = { 0, NULL }; - heim_octet_string o, co; - hx509_certs certs; - size_t sz; - void *p; - int ret; - hx509_lock lock; - int flags = 0; - - hx509_lock_init(context, &lock); - lock_strings(lock, &opt->pass_strings); - - ret = rk_undumpdata(argv[0], &p, &sz); - if (ret) - err(1, "map_file: %s: %d", argv[0], ret); - - co.data = p; - co.length = sz; - - if (opt->content_info_flag) { - heim_octet_string uwco; - heim_oid oid; - - ret = hx509_cms_unwrap_ContentInfo(&co, &oid, &uwco, NULL); - if (ret) - errx(1, "hx509_cms_unwrap_ContentInfo: %d", ret); - - if (der_heim_oid_cmp(&oid, &asn1_oid_id_pkcs7_envelopedData) != 0) - errx(1, "Content is not SignedData"); - der_free_oid(&oid); - - co = uwco; - } - - ret = hx509_certs_init(context, "MEMORY:cert-store", 0, NULL, &certs); - if (ret) - errx(1, "hx509_certs_init: MEMORY: %d", ret); - - certs_strings(context, "store", certs, lock, &opt->certificate_strings); - - if (opt->allow_weak_crypto_flag) - flags |= HX509_CMS_UE_ALLOW_WEAK; - - ret = hx509_cms_unenvelope(context, certs, flags, co.data, co.length, - NULL, 0, &contentType, &o); - if (co.data != p) - der_free_octet_string(&co); - if (ret) - hx509_err(context, 1, ret, "hx509_cms_unenvelope"); - - rk_xfree(p); - hx509_lock_free(lock); - hx509_certs_free(&certs); - der_free_oid(&contentType); - - ret = _hx509_write_file(argv[1], o.data, o.length); - if (ret) - errx(1, "hx509_write_file: %d", ret); - - der_free_octet_string(&o); - - return 0; -} - -int -cms_create_enveloped(struct cms_envelope_options *opt, int argc, char **argv) -{ - heim_oid contentType; - heim_octet_string o; - const heim_oid *enctype = NULL; - hx509_query *q; - hx509_certs certs; - hx509_cert cert; - int ret; - size_t sz; - void *p; - hx509_lock lock; - int flags = 0; - - memset(&contentType, 0, sizeof(contentType)); - - hx509_lock_init(context, &lock); - lock_strings(lock, &opt->pass_strings); - - ret = rk_undumpdata(argv[0], &p, &sz); - if (ret) - err(1, "map_file: %s: %d", argv[0], ret); - - ret = hx509_certs_init(context, "MEMORY:cert-store", 0, NULL, &certs); - if (ret) hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - - certs_strings(context, "store", certs, lock, &opt->certificate_strings); - - if (opt->allow_weak_crypto_flag) - flags |= HX509_CMS_EV_ALLOW_WEAK; - - if (opt->encryption_type_string) { - enctype = hx509_crypto_enctype_by_name(opt->encryption_type_string); - if (enctype == NULL) - errx(1, "encryption type: %s no found", - opt->encryption_type_string); - } - - ret = hx509_query_alloc(context, &q); - if (ret) - errx(1, "hx509_query_alloc: %d", ret); - - hx509_query_match_option(q, HX509_QUERY_OPTION_KU_ENCIPHERMENT); - - ret = hx509_certs_find(context, certs, q, &cert); - hx509_query_free(context, q); - if (ret) - errx(1, "hx509_certs_find: %d", ret); - - parse_oid(opt->content_type_string, &asn1_oid_id_pkcs7_data, &contentType); - - ret = hx509_cms_envelope_1(context, flags, cert, p, sz, enctype, - &contentType, &o); - if (ret) - errx(1, "hx509_cms_envelope_1: %d", ret); - - hx509_cert_free(cert); - hx509_certs_free(&certs); - rk_xfree(p); - der_free_oid(&contentType); - - if (opt->content_info_flag) { - heim_octet_string wo; - - ret = hx509_cms_wrap_ContentInfo(&asn1_oid_id_pkcs7_envelopedData, &o, &wo); - if (ret) - errx(1, "hx509_cms_wrap_ContentInfo: %d", ret); - - der_free_octet_string(&o); - o = wo; - } - - hx509_lock_free(lock); - - ret = _hx509_write_file(argv[1], o.data, o.length); - if (ret) - errx(1, "hx509_write_file: %d", ret); - - der_free_octet_string(&o); - - return 0; -} - -static void -print_certificate(hx509_context hxcontext, hx509_cert cert, int verbose) -{ - const char *fn; - int ret; - - fn = hx509_cert_get_friendly_name(cert); - if (fn) - printf(" friendly name: %s\n", fn); - printf(" private key: %s\n", - _hx509_cert_private_key(cert) ? "yes" : "no"); - - ret = hx509_print_cert(hxcontext, cert, NULL); - if (ret) - errx(1, "failed to print cert"); - - if (verbose) { - hx509_validate_ctx vctx; - - hx509_validate_ctx_init(hxcontext, &vctx); - hx509_validate_ctx_set_print(vctx, hx509_print_stdout, stdout); - hx509_validate_ctx_add_flags(vctx, HX509_VALIDATE_F_VALIDATE); - hx509_validate_ctx_add_flags(vctx, HX509_VALIDATE_F_VERBOSE); - - hx509_validate_cert(hxcontext, vctx, cert); - - hx509_validate_ctx_free(vctx); - } -} - - -struct print_s { - int counter; - int verbose; -}; - -static int -print_f(hx509_context hxcontext, void *ctx, hx509_cert cert) -{ - struct print_s *s = ctx; - - printf("cert: %d\n", s->counter++); - print_certificate(context, cert, s->verbose); - - return 0; -} - -int -pcert_print(struct print_options *opt, int argc, char **argv) -{ - hx509_certs certs; - hx509_lock lock; - struct print_s s; - - s.counter = 0; - s.verbose = opt->content_flag; - - hx509_lock_init(context, &lock); - lock_strings(lock, &opt->pass_strings); - - while(argc--) { - int ret; - ret = hx509_certs_init(context, argv[0], 0, lock, &certs); - if (ret) { - if (opt->never_fail_flag) { - printf("ignoreing failure: %d\n", ret); - continue; - } - hx509_err(context, 1, ret, "hx509_certs_init"); - } - if (opt->info_flag) - hx509_certs_info(context, certs, NULL, NULL); - hx509_certs_iter_f(context, certs, print_f, &s); - hx509_certs_free(&certs); - argv++; - } - - hx509_lock_free(lock); - - return 0; -} - - -static int -validate_f(hx509_context hxcontext, void *ctx, hx509_cert c) -{ - hx509_validate_cert(hxcontext, ctx, c); - return 0; -} - -int -pcert_validate(struct validate_options *opt, int argc, char **argv) -{ - hx509_validate_ctx ctx; - hx509_certs certs; - hx509_lock lock; - - hx509_lock_init(context, &lock); - lock_strings(lock, &opt->pass_strings); - - hx509_validate_ctx_init(context, &ctx); - hx509_validate_ctx_set_print(ctx, hx509_print_stdout, stdout); - hx509_validate_ctx_add_flags(ctx, HX509_VALIDATE_F_VALIDATE); - - while(argc--) { - int ret; - ret = hx509_certs_init(context, argv[0], 0, lock, &certs); - if (ret) - errx(1, "hx509_certs_init: %d", ret); - hx509_certs_iter_f(context, certs, validate_f, ctx); - hx509_certs_free(&certs); - argv++; - } - hx509_validate_ctx_free(ctx); - - hx509_lock_free(lock); - - return 0; -} - -int -certificate_copy(struct certificate_copy_options *opt, int argc, char **argv) -{ - hx509_certs certs; - hx509_lock inlock, outlock = NULL; - int ret; - - hx509_lock_init(context, &inlock); - lock_strings(inlock, &opt->in_pass_strings); - - if (opt->out_pass_string) { - hx509_lock_init(context, &outlock); - ret = hx509_lock_command_string(outlock, opt->out_pass_string); - if (ret) - errx(1, "hx509_lock_command_string: %s: %d", - opt->out_pass_string, ret); - } - - ret = hx509_certs_init(context, argv[argc - 1], - HX509_CERTS_CREATE, inlock, &certs); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_init"); - - while(argc-- > 1) { - int retx; - retx = hx509_certs_append(context, certs, inlock, argv[0]); - if (retx) - hx509_err(context, 1, retx, "hx509_certs_append"); - argv++; - } - - ret = hx509_certs_store(context, certs, 0, outlock); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_store"); - - hx509_certs_free(&certs); - hx509_lock_free(inlock); - hx509_lock_free(outlock); - - return 0; -} - -struct verify { - hx509_verify_ctx ctx; - hx509_certs chain; - const char *hostname; - int errors; - int count; -}; - -static int -verify_f(hx509_context hxcontext, void *ctx, hx509_cert c) -{ - struct verify *v = ctx; - int ret; - - ret = hx509_verify_path(hxcontext, v->ctx, c, v->chain); - if (ret) { - char *s = hx509_get_error_string(hxcontext, ret); - printf("verify_path: %s: %d\n", s, ret); - hx509_free_error_string(s); - v->errors++; - } else { - v->count++; - printf("path ok\n"); - } - - if (v->hostname) { - ret = hx509_verify_hostname(hxcontext, c, 0, HX509_HN_HOSTNAME, - v->hostname, NULL, 0); - if (ret) { - printf("verify_hostname: %d\n", ret); - v->errors++; - } - } - - return 0; -} - -int -pcert_verify(struct verify_options *opt, int argc, char **argv) -{ - hx509_certs anchors, chain, certs; - hx509_revoke_ctx revoke_ctx; - hx509_verify_ctx ctx; - struct verify v; - int ret; - - memset(&v, 0, sizeof(v)); - - if (opt->missing_revoke_flag) - hx509_context_set_missing_revoke(context, 1); - - ret = hx509_verify_init_ctx(context, &ctx); - if (ret) - hx509_err(context, 1, ret, "hx509_verify_init_ctx"); - ret = hx509_certs_init(context, "MEMORY:anchors", 0, NULL, &anchors); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - ret = hx509_certs_init(context, "MEMORY:chain", 0, NULL, &chain); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - ret = hx509_certs_init(context, "MEMORY:certs", 0, NULL, &certs); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - - if (opt->allow_proxy_certificate_flag) - hx509_verify_set_proxy_certificate(ctx, 1); - - if (opt->time_string) { - const char *p; - struct tm tm; - time_t t; - - memset(&tm, 0, sizeof(tm)); - - p = strptime (opt->time_string, "%Y-%m-%d", &tm); - if (p == NULL) - errx(1, "Failed to parse time %s, need to be on format %%Y-%%m-%%d", - opt->time_string); - - t = tm2time (tm, 0); - - hx509_verify_set_time(ctx, t); - } - - if (opt->hostname_string) - v.hostname = opt->hostname_string; - if (opt->max_depth_integer) - hx509_verify_set_max_depth(ctx, opt->max_depth_integer); - - ret = hx509_revoke_init(context, &revoke_ctx); - if (ret) - errx(1, "hx509_revoke_init: %d", ret); - - while(argc--) { - char *s = *argv++; - - if (strncmp(s, "chain:", 6) == 0) { - s += 6; - - ret = hx509_certs_append(context, chain, NULL, s); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_append: chain: %s: %d", s, ret); - - } else if (strncmp(s, "anchor:", 7) == 0) { - s += 7; - - ret = hx509_certs_append(context, anchors, NULL, s); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_append: anchor: %s: %d", s, ret); - - } else if (strncmp(s, "cert:", 5) == 0) { - s += 5; - - ret = hx509_certs_append(context, certs, NULL, s); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_append: certs: %s: %d", - s, ret); - - } else if (strncmp(s, "crl:", 4) == 0) { - s += 4; - - ret = hx509_revoke_add_crl(context, revoke_ctx, s); - if (ret) - errx(1, "hx509_revoke_add_crl: %s: %d", s, ret); - - } else if (strncmp(s, "ocsp:", 4) == 0) { - s += 5; - - ret = hx509_revoke_add_ocsp(context, revoke_ctx, s); - if (ret) - errx(1, "hx509_revoke_add_ocsp: %s: %d", s, ret); - - } else { - errx(1, "unknown option to verify: `%s'\n", s); - } - } - - hx509_verify_attach_anchors(ctx, anchors); - hx509_verify_attach_revoke(ctx, revoke_ctx); - - v.ctx = ctx; - v.chain = chain; - - hx509_certs_iter_f(context, certs, verify_f, &v); - - hx509_verify_destroy_ctx(ctx); - - hx509_certs_free(&certs); - hx509_certs_free(&chain); - hx509_certs_free(&anchors); - - hx509_revoke_free(&revoke_ctx); - - - if (v.count == 0) { - printf("no certs verify at all\n"); - return 1; - } - - if (v.errors) { - printf("failed verifing %d checks\n", v.errors); - return 1; - } - - return 0; -} - -int -query(struct query_options *opt, int argc, char **argv) -{ - hx509_lock lock; - hx509_query *q; - hx509_certs certs; - hx509_cert c; - int ret; - - ret = hx509_query_alloc(context, &q); - if (ret) - errx(1, "hx509_query_alloc: %d", ret); - - hx509_lock_init(context, &lock); - lock_strings(lock, &opt->pass_strings); - - ret = hx509_certs_init(context, "MEMORY:cert-store", 0, NULL, &certs); - if (ret) hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - - while (argc > 0) { - - ret = hx509_certs_append(context, certs, lock, argv[0]); - if (ret) - errx(1, "hx509_certs_append: %s: %d", argv[0], ret); - - argc--; - argv++; - } - - if (opt->friendlyname_string) - hx509_query_match_friendly_name(q, opt->friendlyname_string); - - if (opt->eku_string) { - heim_oid oid; - - parse_oid(opt->eku_string, NULL, &oid); - - ret = hx509_query_match_eku(q, &oid); - if (ret) - errx(1, "hx509_query_match_eku: %d", ret); - der_free_oid(&oid); - } - - if (opt->private_key_flag) - hx509_query_match_option(q, HX509_QUERY_OPTION_PRIVATE_KEY); - - if (opt->keyEncipherment_flag) - hx509_query_match_option(q, HX509_QUERY_OPTION_KU_ENCIPHERMENT); - - if (opt->digitalSignature_flag) - hx509_query_match_option(q, HX509_QUERY_OPTION_KU_DIGITALSIGNATURE); - - if (opt->expr_string) - hx509_query_match_expr(context, q, opt->expr_string); - - ret = hx509_certs_find(context, certs, q, &c); - hx509_query_free(context, q); - if (ret) - printf("no match found (%d)\n", ret); - else { - printf("match found\n"); - if (opt->print_flag) - print_certificate(context, c, 0); - } - - hx509_cert_free(c); - hx509_certs_free(&certs); - - hx509_lock_free(lock); - - return ret; -} - -int -ocsp_fetch(struct ocsp_fetch_options *opt, int argc, char **argv) -{ - hx509_certs reqcerts, pool; - heim_octet_string req, nonce_data, *nonce = &nonce_data; - hx509_lock lock; - int i, ret; - char *file; - const char *url = "/"; - - memset(&nonce, 0, sizeof(nonce)); - - hx509_lock_init(context, &lock); - lock_strings(lock, &opt->pass_strings); - - /* no nonce */ - if (!opt->nonce_flag) - nonce = NULL; - - if (opt->url_path_string) - url = opt->url_path_string; - - ret = hx509_certs_init(context, "MEMORY:ocsp-pool", 0, NULL, &pool); - if (ret) hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - - certs_strings(context, "ocsp-pool", pool, lock, &opt->pool_strings); - - file = argv[0]; - - ret = hx509_certs_init(context, "MEMORY:ocsp-req", 0, NULL, &reqcerts); - if (ret) hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - - for (i = 1; i < argc; i++) { - ret = hx509_certs_append(context, reqcerts, lock, argv[i]); - if (ret) - errx(1, "hx509_certs_append: req: %s: %d", argv[i], ret); - } - - ret = hx509_ocsp_request(context, reqcerts, pool, NULL, NULL, &req, nonce); - if (ret) - errx(1, "hx509_ocsp_request: req: %d", ret); - - { - FILE *f; - - f = fopen(file, "w"); - if (f == NULL) - abort(); - - fprintf(f, - "POST %s HTTP/1.0\r\n" - "Content-Type: application/ocsp-request\r\n" - "Content-Length: %ld\r\n" - "\r\n", - url, - (unsigned long)req.length); - fwrite(req.data, req.length, 1, f); - fclose(f); - } - - if (nonce) - der_free_octet_string(nonce); - - hx509_certs_free(&reqcerts); - hx509_certs_free(&pool); - - return 0; -} - -int -ocsp_print(struct ocsp_print_options *opt, int argc, char **argv) -{ - hx509_revoke_ocsp_print(context, argv[0], stdout); - return 0; -} - -/* - * - */ - -static int -verify_o(hx509_context hxcontext, void *ctx, hx509_cert c) -{ - heim_octet_string *os = ctx; - time_t expiration; - int ret; - - ret = hx509_ocsp_verify(context, 0, c, 0, - os->data, os->length, &expiration); - if (ret) { - char *s = hx509_get_error_string(hxcontext, ret); - printf("ocsp_verify: %s: %d\n", s, ret); - hx509_free_error_string(s); - } else - printf("expire: %d\n", (int)expiration); - - return ret; -} - - -int -ocsp_verify(struct ocsp_verify_options *opt, int argc, char **argv) -{ - hx509_lock lock; - hx509_certs certs; - int ret, i; - heim_octet_string os; - - hx509_lock_init(context, &lock); - - if (opt->ocsp_file_string == NULL) - errx(1, "no ocsp file given"); - - ret = _hx509_map_file_os(opt->ocsp_file_string, &os); - if (ret) - err(1, "map_file: %s: %d", argv[0], ret); - - ret = hx509_certs_init(context, "MEMORY:test-certs", 0, NULL, &certs); - if (ret) hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - - for (i = 0; i < argc; i++) { - ret = hx509_certs_append(context, certs, lock, argv[i]); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_append: %s", argv[i]); - } - - ret = hx509_certs_iter_f(context, certs, verify_o, &os); - - hx509_certs_free(&certs); - _hx509_unmap_file_os(&os); - hx509_lock_free(lock); - - return ret; -} - -static int -read_private_key(const char *fn, hx509_private_key *key) -{ - hx509_private_key *keys; - hx509_certs certs; - int ret; - - *key = NULL; - - ret = hx509_certs_init(context, fn, 0, NULL, &certs); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_init: %s", fn); - - ret = _hx509_certs_keys_get(context, certs, &keys); - hx509_certs_free(&certs); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_keys_get"); - if (keys[0] == NULL) - errx(1, "no keys in key store: %s", fn); - - *key = _hx509_private_key_ref(keys[0]); - _hx509_certs_keys_free(context, keys); - - return 0; -} - -static void -get_key(const char *fn, const char *type, int optbits, - hx509_private_key *signer) -{ - int ret; - - if (type) { - BIGNUM *e; - RSA *rsa; - unsigned char *p0, *p; - size_t len; - int bits = 1024; - - if (fn == NULL) - errx(1, "no key argument, don't know here to store key"); - - if (strcasecmp(type, "rsa") != 0) - errx(1, "can only handle rsa keys for now"); - - e = BN_new(); - BN_set_word(e, 0x10001); - - if (optbits) - bits = optbits; - - rsa = RSA_new(); - if(rsa == NULL) - errx(1, "RSA_new failed"); - - ret = RSA_generate_key_ex(rsa, bits, e, NULL); - if(ret != 1) - errx(1, "RSA_new failed"); - - BN_free(e); - - len = i2d_RSAPrivateKey(rsa, NULL); - - p0 = p = malloc(len); - if (p == NULL) - errx(1, "out of memory"); - - i2d_RSAPrivateKey(rsa, &p); - - rk_dumpdata(fn, p0, len); - memset(p0, 0, len); - free(p0); - - RSA_free(rsa); - - } else if (fn == NULL) - err(1, "no private key"); - - ret = read_private_key(fn, signer); - if (ret) - err(1, "read_private_key"); -} - -int -request_create(struct request_create_options *opt, int argc, char **argv) -{ - heim_octet_string request; - hx509_request req; - int ret, i; - hx509_private_key signer; - SubjectPublicKeyInfo key; - const char *outfile = argv[0]; - - memset(&key, 0, sizeof(key)); - - get_key(opt->key_string, - opt->generate_key_string, - opt->key_bits_integer, - &signer); - - hx509_request_init(context, &req); - - if (opt->subject_string) { - hx509_name name = NULL; - - ret = hx509_parse_name(context, opt->subject_string, &name); - if (ret) - errx(1, "hx509_parse_name: %d\n", ret); - hx509_request_set_name(context, req, name); - - if (opt->verbose_flag) { - char *s; - hx509_name_to_string(name, &s); - printf("%s\n", s); - } - hx509_name_free(&name); - } - - for (i = 0; i < opt->email_strings.num_strings; i++) { - ret = _hx509_request_add_email(context, req, - opt->email_strings.strings[i]); - if (ret) - hx509_err(context, 1, ret, "hx509_request_add_email"); - } - - for (i = 0; i < opt->dnsname_strings.num_strings; i++) { - ret = _hx509_request_add_dns_name(context, req, - opt->dnsname_strings.strings[i]); - if (ret) - hx509_err(context, 1, ret, "hx509_request_add_dns_name"); - } - - - ret = hx509_private_key2SPKI(context, signer, &key); - if (ret) - errx(1, "hx509_private_key2SPKI: %d\n", ret); - - ret = hx509_request_set_SubjectPublicKeyInfo(context, - req, - &key); - free_SubjectPublicKeyInfo(&key); - if (ret) - hx509_err(context, 1, ret, "hx509_request_set_SubjectPublicKeyInfo"); - - ret = _hx509_request_to_pkcs10(context, - req, - signer, - &request); - if (ret) - hx509_err(context, 1, ret, "_hx509_request_to_pkcs10"); - - hx509_private_key_free(&signer); - hx509_request_free(&req); - - if (ret == 0) - rk_dumpdata(outfile, request.data, request.length); - der_free_octet_string(&request); - - return 0; -} - -int -request_print(struct request_print_options *opt, int argc, char **argv) -{ - int ret, i; - - printf("request print\n"); - - for (i = 0; i < argc; i++) { - hx509_request req; - - ret = _hx509_request_parse(context, argv[i], &req); - if (ret) - hx509_err(context, 1, ret, "parse_request: %s", argv[i]); - - ret = _hx509_request_print(context, req, stdout); - hx509_request_free(&req); - if (ret) - hx509_err(context, 1, ret, "Failed to print file %s", argv[i]); - } - - return 0; -} - -int -info(void *opt, int argc, char **argv) -{ - - ENGINE_add_conf_module(); - - { - const RSA_METHOD *m = RSA_get_default_method(); - if (m != NULL) - printf("rsa: %s\n", m->name); - } - { - const DH_METHOD *m = DH_get_default_method(); - if (m != NULL) - printf("dh: %s\n", m->name); - } -#ifdef HAVE_OPENSSL - { - printf("ecdsa: ECDSA_METHOD-not-export\n"); - } -#else - { - printf("ecdsa: hcrypto null\n"); - } -#endif - { - int ret = RAND_status(); - printf("rand: %s\n", ret == 1 ? "ok" : "not available"); - } - - return 0; -} - -int -random_data(void *opt, int argc, char **argv) -{ - void *ptr; - int len, ret; - - len = parse_bytes(argv[0], "byte"); - if (len <= 0) { - fprintf(stderr, "bad argument to random-data\n"); - return 1; - } - - ptr = malloc(len); - if (ptr == NULL) { - fprintf(stderr, "out of memory\n"); - return 1; - } - - ret = RAND_bytes(ptr, len); - if (ret != 1) { - free(ptr); - fprintf(stderr, "did not get cryptographic strong random\n"); - return 1; - } - - fwrite(ptr, len, 1, stdout); - fflush(stdout); - - free(ptr); - - return 0; -} - -int -crypto_available(struct crypto_available_options *opt, int argc, char **argv) -{ - AlgorithmIdentifier *val; - unsigned int len, i; - int ret, type = HX509_SELECT_ALL; - - if (opt->type_string) { - if (strcmp(opt->type_string, "all") == 0) - type = HX509_SELECT_ALL; - else if (strcmp(opt->type_string, "digest") == 0) - type = HX509_SELECT_DIGEST; - else if (strcmp(opt->type_string, "public-sig") == 0) - type = HX509_SELECT_PUBLIC_SIG; - else if (strcmp(opt->type_string, "secret") == 0) - type = HX509_SELECT_SECRET_ENC; - else - errx(1, "unknown type: %s", opt->type_string); - } - - ret = hx509_crypto_available(context, type, NULL, &val, &len); - if (ret) - errx(1, "hx509_crypto_available"); - - for (i = 0; i < len; i++) { - char *s; - der_print_heim_oid (&val[i].algorithm, '.', &s); - printf("%s\n", s); - free(s); - } - - hx509_crypto_free_algs(val, len); - - return 0; -} - -int -crypto_select(struct crypto_select_options *opt, int argc, char **argv) -{ - hx509_peer_info peer = NULL; - AlgorithmIdentifier selected; - int ret, type = HX509_SELECT_DIGEST; - char *s; - - if (opt->type_string) { - if (strcmp(opt->type_string, "digest") == 0) - type = HX509_SELECT_DIGEST; - else if (strcmp(opt->type_string, "public-sig") == 0) - type = HX509_SELECT_PUBLIC_SIG; - else if (strcmp(opt->type_string, "secret") == 0) - type = HX509_SELECT_SECRET_ENC; - else - errx(1, "unknown type: %s", opt->type_string); - } - - if (opt->peer_cmstype_strings.num_strings) - peer_strings(context, &peer, &opt->peer_cmstype_strings); - - ret = hx509_crypto_select(context, type, NULL, peer, &selected); - if (ret) - errx(1, "hx509_crypto_available"); - - der_print_heim_oid (&selected.algorithm, '.', &s); - printf("%s\n", s); - free(s); - free_AlgorithmIdentifier(&selected); - - hx509_peer_info_free(peer); - - return 0; -} - -int -hxtool_hex(struct hex_options *opt, int argc, char **argv) -{ - - if (opt->decode_flag) { - char buf[1024], buf2[1024], *p; - ssize_t len; - - while(fgets(buf, sizeof(buf), stdin) != NULL) { - buf[strcspn(buf, "\r\n")] = '\0'; - p = buf; - while(isspace(*(unsigned char *)p)) - p++; - len = hex_decode(p, buf2, strlen(p)); - if (len < 0) - errx(1, "hex_decode failed"); - if (fwrite(buf2, 1, len, stdout) != (size_t)len) - errx(1, "fwrite failed"); - } - } else { - char buf[28], *p; - ssize_t len; - - while((len = fread(buf, 1, sizeof(buf), stdin)) != 0) { - len = hex_encode(buf, len, &p); - if (len < 0) - continue; - fprintf(stdout, "%s\n", p); - free(p); - } - } - return 0; -} - -struct cert_type_opt { - int pkinit; -}; - - -static int -https_server(hx509_context contextp, hx509_ca_tbs tbs, struct cert_type_opt *opt) -{ - return hx509_ca_tbs_add_eku(contextp, tbs, &asn1_oid_id_pkix_kp_serverAuth); -} - -static int -https_client(hx509_context contextp, hx509_ca_tbs tbs, struct cert_type_opt *opt) -{ - return hx509_ca_tbs_add_eku(contextp, tbs, &asn1_oid_id_pkix_kp_clientAuth); -} - -static int -peap_server(hx509_context contextp, hx509_ca_tbs tbs, struct cert_type_opt *opt) -{ - return hx509_ca_tbs_add_eku(contextp, tbs, &asn1_oid_id_pkix_kp_serverAuth); -} - -static int -pkinit_kdc(hx509_context contextp, hx509_ca_tbs tbs, struct cert_type_opt *opt) -{ - opt->pkinit++; - return hx509_ca_tbs_add_eku(contextp, tbs, &asn1_oid_id_pkkdcekuoid); -} - -static int -pkinit_client(hx509_context contextp, hx509_ca_tbs tbs, struct cert_type_opt *opt) -{ - int ret; - - opt->pkinit++; - - ret = hx509_ca_tbs_add_eku(contextp, tbs, &asn1_oid_id_pkekuoid); - if (ret) - return ret; - - ret = hx509_ca_tbs_add_eku(context, tbs, &asn1_oid_id_ms_client_authentication); - if (ret) - return ret; - - return hx509_ca_tbs_add_eku(context, tbs, &asn1_oid_id_pkinit_ms_eku); -} - -static int -email_client(hx509_context contextp, hx509_ca_tbs tbs, struct cert_type_opt *opt) -{ - return hx509_ca_tbs_add_eku(contextp, tbs, &asn1_oid_id_pkix_kp_emailProtection); -} - -struct { - const char *type; - const char *desc; - int (*eval)(hx509_context, hx509_ca_tbs, struct cert_type_opt *); -} certtypes[] = { - { - "https-server", - "Used for HTTPS server and many other TLS server certificate types", - https_server - }, - { - "https-client", - "Used for HTTPS client certificates", - https_client - }, - { - "email-client", - "Certificate will be use for email", - email_client - }, - { - "pkinit-client", - "Certificate used for Kerberos PK-INIT client certificates", - pkinit_client - }, - { - "pkinit-kdc", - "Certificates used for Kerberos PK-INIT KDC certificates", - pkinit_kdc - }, - { - "peap-server", - "Certificate used for Radius PEAP (Protected EAP)", - peap_server - } -}; - -static void -print_eval_types(FILE *out) -{ - rtbl_t table; - unsigned i; - - table = rtbl_create(); - rtbl_add_column_by_id (table, 0, "Name", 0); - rtbl_add_column_by_id (table, 1, "Description", 0); - - for (i = 0; i < sizeof(certtypes)/sizeof(certtypes[0]); i++) { - rtbl_add_column_entry_by_id(table, 0, certtypes[i].type); - rtbl_add_column_entry_by_id(table, 1, certtypes[i].desc); - } - - rtbl_format (table, out); - rtbl_destroy (table); -} - -static int -eval_types(hx509_context contextp, - hx509_ca_tbs tbs, - const struct certificate_sign_options *opt) -{ - struct cert_type_opt ctopt; - int i; - size_t j; - int ret; - - memset(&ctopt, 0, sizeof(ctopt)); - - for (i = 0; i < opt->type_strings.num_strings; i++) { - const char *type = opt->type_strings.strings[i]; - - for (j = 0; j < sizeof(certtypes)/sizeof(certtypes[0]); j++) { - if (strcasecmp(type, certtypes[j].type) == 0) { - ret = (*certtypes[j].eval)(contextp, tbs, &ctopt); - if (ret) - hx509_err(contextp, 1, ret, - "Failed to evaluate cert type %s", type); - break; - } - } - if (j >= sizeof(certtypes)/sizeof(certtypes[0])) { - fprintf(stderr, "Unknown certificate type %s\n\n", type); - fprintf(stderr, "Available types:\n"); - print_eval_types(stderr); - exit(1); - } - } - - if (opt->pk_init_principal_string) { - if (!ctopt.pkinit) - errx(1, "pk-init principal given but no pk-init oid"); - - ret = hx509_ca_tbs_add_san_pkinit(contextp, tbs, - opt->pk_init_principal_string); - if (ret) - hx509_err(contextp, 1, ret, "hx509_ca_tbs_add_san_pkinit"); - } - - if (opt->ms_upn_string) { - if (!ctopt.pkinit) - errx(1, "MS upn given but no pk-init oid"); - - ret = hx509_ca_tbs_add_san_ms_upn(contextp, tbs, opt->ms_upn_string); - if (ret) - hx509_err(contextp, 1, ret, "hx509_ca_tbs_add_san_ms_upn"); - } - - - for (i = 0; i < opt->hostname_strings.num_strings; i++) { - const char *hostname = opt->hostname_strings.strings[i]; - - ret = hx509_ca_tbs_add_san_hostname(contextp, tbs, hostname); - if (ret) - hx509_err(contextp, 1, ret, "hx509_ca_tbs_add_san_hostname"); - } - - for (i = 0; i < opt->email_strings.num_strings; i++) { - const char *email = opt->email_strings.strings[i]; - - ret = hx509_ca_tbs_add_san_rfc822name(contextp, tbs, email); - if (ret) - hx509_err(contextp, 1, ret, "hx509_ca_tbs_add_san_hostname"); - - ret = hx509_ca_tbs_add_eku(contextp, tbs, - &asn1_oid_id_pkix_kp_emailProtection); - if (ret) - hx509_err(contextp, 1, ret, "hx509_ca_tbs_add_eku"); - } - - if (opt->jid_string) { - ret = hx509_ca_tbs_add_san_jid(contextp, tbs, opt->jid_string); - if (ret) - hx509_err(contextp, 1, ret, "hx509_ca_tbs_add_san_jid"); - } - - return 0; -} - -int -hxtool_ca(struct certificate_sign_options *opt, int argc, char **argv) -{ - int ret; - hx509_ca_tbs tbs; - hx509_cert signer = NULL, cert = NULL; - hx509_private_key private_key = NULL; - hx509_private_key cert_key = NULL; - hx509_name subject = NULL; - SubjectPublicKeyInfo spki; - int delta = 0; - - memset(&spki, 0, sizeof(spki)); - - if (opt->ca_certificate_string == NULL && !opt->self_signed_flag) - errx(1, "--ca-certificate argument missing (not using --self-signed)"); - if (opt->ca_private_key_string == NULL && opt->generate_key_string == NULL && opt->self_signed_flag) - errx(1, "--ca-private-key argument missing (using --self-signed)"); - if (opt->certificate_string == NULL) - errx(1, "--certificate argument missing"); - - if (opt->template_certificate_string) { - if (opt->template_fields_string == NULL) - errx(1, "--template-certificate not no --template-fields"); - } - - if (opt->lifetime_string) { - delta = parse_time(opt->lifetime_string, "day"); - if (delta < 0) - errx(1, "Invalid lifetime: %s", opt->lifetime_string); - } - - if (opt->ca_certificate_string) { - hx509_certs cacerts = NULL; - hx509_query *q; - - ret = hx509_certs_init(context, opt->ca_certificate_string, 0, - NULL, &cacerts); - if (ret) - hx509_err(context, 1, ret, - "hx509_certs_init: %s", opt->ca_certificate_string); - - ret = hx509_query_alloc(context, &q); - if (ret) - errx(1, "hx509_query_alloc: %d", ret); - - hx509_query_match_option(q, HX509_QUERY_OPTION_PRIVATE_KEY); - if (!opt->issue_proxy_flag) - hx509_query_match_option(q, HX509_QUERY_OPTION_KU_KEYCERTSIGN); - - ret = hx509_certs_find(context, cacerts, q, &signer); - hx509_query_free(context, q); - hx509_certs_free(&cacerts); - if (ret) - hx509_err(context, 1, ret, "no CA certificate found"); - } else if (opt->self_signed_flag) { - if (opt->generate_key_string == NULL - && opt->ca_private_key_string == NULL) - errx(1, "no signing private key"); - - if (opt->req_string) - errx(1, "can't be self-signing and have a request at the same time"); - } else - errx(1, "missing ca key"); - - if (opt->ca_private_key_string) { - - ret = read_private_key(opt->ca_private_key_string, &private_key); - if (ret) - err(1, "read_private_key"); - - ret = hx509_private_key2SPKI(context, private_key, &spki); - if (ret) - errx(1, "hx509_private_key2SPKI: %d\n", ret); - - if (opt->self_signed_flag) - cert_key = private_key; - } - - if (opt->req_string) { - hx509_request req; - - ret = _hx509_request_parse(context, opt->req_string, &req); - if (ret) - hx509_err(context, 1, ret, "parse_request: %s", opt->req_string); - ret = hx509_request_get_name(context, req, &subject); - if (ret) - hx509_err(context, 1, ret, "get name"); - ret = hx509_request_get_SubjectPublicKeyInfo(context, req, &spki); - if (ret) - hx509_err(context, 1, ret, "get spki"); - hx509_request_free(&req); - } - - if (opt->generate_key_string) { - struct hx509_generate_private_context *keyctx; - - ret = _hx509_generate_private_key_init(context, - &asn1_oid_id_pkcs1_rsaEncryption, - &keyctx); - if (ret) - hx509_err(context, 1, ret, "generate private key"); - - if (opt->issue_ca_flag) - _hx509_generate_private_key_is_ca(context, keyctx); - - if (opt->key_bits_integer) - _hx509_generate_private_key_bits(context, keyctx, - opt->key_bits_integer); - - ret = _hx509_generate_private_key(context, keyctx, - &cert_key); - _hx509_generate_private_key_free(&keyctx); - if (ret) - hx509_err(context, 1, ret, "generate private key"); - - ret = hx509_private_key2SPKI(context, cert_key, &spki); - if (ret) - errx(1, "hx509_private_key2SPKI: %d\n", ret); - - if (opt->self_signed_flag) - private_key = cert_key; - } - - if (opt->certificate_private_key_string) { - ret = read_private_key(opt->certificate_private_key_string, &cert_key); - if (ret) - err(1, "read_private_key for certificate"); - } - - if (opt->subject_string) { - if (subject) - hx509_name_free(&subject); - ret = hx509_parse_name(context, opt->subject_string, &subject); - if (ret) - hx509_err(context, 1, ret, "hx509_parse_name"); - } - - /* - * - */ - - ret = hx509_ca_tbs_init(context, &tbs); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_tbs_init"); - - if (opt->template_certificate_string) { - hx509_cert template; - hx509_certs tcerts; - int flags; - - ret = hx509_certs_init(context, opt->template_certificate_string, 0, - NULL, &tcerts); - if (ret) - hx509_err(context, 1, ret, - "hx509_certs_init: %s", opt->template_certificate_string); - - ret = hx509_get_one_cert(context, tcerts, &template); - - hx509_certs_free(&tcerts); - if (ret) - hx509_err(context, 1, ret, "no template certificate found"); - - flags = parse_units(opt->template_fields_string, - hx509_ca_tbs_template_units(), ""); - - ret = hx509_ca_tbs_set_template(context, tbs, flags, template); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_tbs_set_template"); - - hx509_cert_free(template); - } - - if (opt->serial_number_string) { - heim_integer serialNumber; - - ret = der_parse_hex_heim_integer(opt->serial_number_string, - &serialNumber); - if (ret) - err(1, "der_parse_hex_heim_integer"); - ret = hx509_ca_tbs_set_serialnumber(context, tbs, &serialNumber); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_tbs_init"); - der_free_heim_integer(&serialNumber); - } - - if (spki.subjectPublicKey.length) { - ret = hx509_ca_tbs_set_spki(context, tbs, &spki); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_tbs_set_spki"); - } - - if (subject) { - ret = hx509_ca_tbs_set_subject(context, tbs, subject); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_tbs_set_subject"); - } - - if (opt->crl_uri_string) { - ret = hx509_ca_tbs_add_crl_dp_uri(context, tbs, - opt->crl_uri_string, NULL); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_tbs_add_crl_dp_uri"); - } - - eval_types(context, tbs, opt); - - if (opt->issue_ca_flag) { - ret = hx509_ca_tbs_set_ca(context, tbs, opt->path_length_integer); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_tbs_set_ca"); - } - if (opt->issue_proxy_flag) { - ret = hx509_ca_tbs_set_proxy(context, tbs, opt->path_length_integer); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_tbs_set_proxy"); - } - if (opt->domain_controller_flag) { - hx509_ca_tbs_set_domaincontroller(context, tbs); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_tbs_set_domaincontroller"); - } - - if (delta) { - ret = hx509_ca_tbs_set_notAfter_lifetime(context, tbs, delta); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_tbs_set_notAfter_lifetime"); - } - - if (opt->self_signed_flag) { - ret = hx509_ca_sign_self(context, tbs, private_key, &cert); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_sign_self"); - } else { - ret = hx509_ca_sign(context, tbs, signer, &cert); - if (ret) - hx509_err(context, 1, ret, "hx509_ca_sign"); - } - - if (cert_key) { - ret = _hx509_cert_assign_key(cert, cert_key); - if (ret) - hx509_err(context, 1, ret, "_hx509_cert_assign_key"); - } - - { - hx509_certs certs; - - ret = hx509_certs_init(context, opt->certificate_string, - HX509_CERTS_CREATE, NULL, &certs); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_init"); - - ret = hx509_certs_add(context, certs, cert); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_add"); - - ret = hx509_certs_store(context, certs, 0, NULL); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_store"); - - hx509_certs_free(&certs); - } - - if (subject) - hx509_name_free(&subject); - if (signer) - hx509_cert_free(signer); - hx509_cert_free(cert); - free_SubjectPublicKeyInfo(&spki); - - if (private_key != cert_key) - hx509_private_key_free(&private_key); - hx509_private_key_free(&cert_key); - - hx509_ca_tbs_free(&tbs); - - return 0; -} - -static int -test_one_cert(hx509_context hxcontext, void *ctx, hx509_cert cert) -{ - heim_octet_string sd, c; - hx509_verify_ctx vctx = ctx; - hx509_certs signer = NULL; - heim_oid type; - int ret; - - if (_hx509_cert_private_key(cert) == NULL) - return 0; - - ret = hx509_cms_create_signed_1(context, 0, NULL, NULL, 0, - NULL, cert, NULL, NULL, NULL, &sd); - if (ret) - errx(1, "hx509_cms_create_signed_1"); - - ret = hx509_cms_verify_signed(context, vctx, 0, sd.data, sd.length, - NULL, NULL, &type, &c, &signer); - free(sd.data); - if (ret) - hx509_err(context, 1, ret, "hx509_cms_verify_signed"); - - printf("create-signature verify-sigature done\n"); - - free(c.data); - - return 0; -} - -int -test_crypto(struct test_crypto_options *opt, int argc, char ** argv) -{ - hx509_verify_ctx vctx; - hx509_certs certs; - hx509_lock lock; - int i, ret; - - hx509_lock_init(context, &lock); - lock_strings(lock, &opt->pass_strings); - - ret = hx509_certs_init(context, "MEMORY:test-crypto", 0, NULL, &certs); - if (ret) hx509_err(context, 1, ret, "hx509_certs_init: MEMORY"); - - for (i = 0; i < argc; i++) { - ret = hx509_certs_append(context, certs, lock, argv[i]); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_append"); - } - - ret = hx509_verify_init_ctx(context, &vctx); - if (ret) - hx509_err(context, 1, ret, "hx509_verify_init_ctx"); - - hx509_verify_attach_anchors(vctx, certs); - - ret = hx509_certs_iter_f(context, certs, test_one_cert, vctx); - if (ret) - hx509_err(context, 1, ret, "hx509_cert_iter"); - - hx509_certs_free(&certs); - - return 0; -} - -int -statistic_print(struct statistic_print_options*opt, int argc, char **argv) -{ - int type = 0; - - if (stat_file_string == NULL) - errx(1, "no stat file"); - - if (opt->type_integer) - type = opt->type_integer; - - hx509_query_unparse_stats(context, type, stdout); - return 0; -} - -/* - * - */ - -int -crl_sign(struct crl_sign_options *opt, int argc, char **argv) -{ - hx509_crl crl; - heim_octet_string os; - hx509_cert signer = NULL; - hx509_lock lock; - int ret; - - hx509_lock_init(context, &lock); - lock_strings(lock, &opt->pass_strings); - - ret = hx509_crl_alloc(context, &crl); - if (ret) - errx(1, "crl alloc"); - - if (opt->signer_string == NULL) - errx(1, "signer missing"); - - { - hx509_certs certs = NULL; - hx509_query *q; - - ret = hx509_certs_init(context, opt->signer_string, 0, - NULL, &certs); - if (ret) - hx509_err(context, 1, ret, - "hx509_certs_init: %s", opt->signer_string); - - ret = hx509_query_alloc(context, &q); - if (ret) - hx509_err(context, 1, ret, "hx509_query_alloc: %d", ret); - - hx509_query_match_option(q, HX509_QUERY_OPTION_PRIVATE_KEY); - - ret = hx509_certs_find(context, certs, q, &signer); - hx509_query_free(context, q); - hx509_certs_free(&certs); - if (ret) - hx509_err(context, 1, ret, "no signer certificate found"); - } - - if (opt->lifetime_string) { - int delta; - - delta = parse_time(opt->lifetime_string, "day"); - if (delta < 0) - errx(1, "Invalid lifetime: %s", opt->lifetime_string); - - hx509_crl_lifetime(context, crl, delta); - } - - { - hx509_certs revoked = NULL; - int i; - - ret = hx509_certs_init(context, "MEMORY:revoked-certs", 0, - NULL, &revoked); - if (ret) - hx509_err(context, 1, ret, - "hx509_certs_init: MEMORY cert"); - - for (i = 0; i < argc; i++) { - ret = hx509_certs_append(context, revoked, lock, argv[i]); - if (ret) - hx509_err(context, 1, ret, "hx509_certs_append: %s", argv[i]); - } - - hx509_crl_add_revoked_certs(context, crl, revoked); - hx509_certs_free(&revoked); - } - - hx509_crl_sign(context, signer, crl, &os); - - if (opt->crl_file_string) - rk_dumpdata(opt->crl_file_string, os.data, os.length); - - free(os.data); - - hx509_crl_free(context, &crl); - hx509_cert_free(signer); - hx509_lock_free(lock); - - return 0; -} - -/* - * - */ - -int -help(void *opt, int argc, char **argv) -{ - sl_slc_help(commands, argc, argv); - return 0; -} - -int -main(int argc, char **argv) -{ - int ret, optidx = 0; - - setprogname (argv[0]); - - if(getarg(args, num_args, argc, argv, &optidx)) - usage(1); - if(help_flag) - usage(0); - if(version_flag) { - print_version(NULL); - exit(0); - } - argv += optidx; - argc -= optidx; - - if (argc == 0) - usage(1); - - ret = hx509_context_init(&context); - if (ret) - errx(1, "hx509_context_init failed with %d", ret); - - if (stat_file_string) - hx509_query_statistic_file(context, stat_file_string); - - ret = sl_command(commands, argc, argv); - if(ret == -1) - warnx ("unrecognized command: %s", argv[0]); - - hx509_context_free(&context); - - return ret; -} diff --git a/kerberosV/src/lib/hx509/keyset.c b/kerberosV/src/lib/hx509/keyset.c deleted file mode 100644 index c0275d949d0..00000000000 --- a/kerberosV/src/lib/hx509/keyset.c +++ /dev/null @@ -1,801 +0,0 @@ -/* - * Copyright (c) 2004 - 2007 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "hx_locl.h" - -/** - * @page page_keyset Certificate store operations - * - * Type of certificates store: - * - MEMORY - * In memory based format. Doesnt support storing. - * - FILE - * FILE supports raw DER certicates and PEM certicates. When PEM is - * used the file can contain may certificates and match private - * keys. Support storing the certificates. DER format only supports - * on certificate and no private key. - * - PEM-FILE - * Same as FILE, defaulting to PEM encoded certificates. - * - PEM-FILE - * Same as FILE, defaulting to DER encoded certificates. - * - PKCS11 - * - PKCS12 - * - DIR - * - KEYCHAIN - * Apple Mac OS X KeyChain backed keychain object. - * - * See the library functions here: @ref hx509_keyset - */ - -struct hx509_certs_data { - unsigned int ref; - struct hx509_keyset_ops *ops; - void *ops_data; -}; - -static struct hx509_keyset_ops * -_hx509_ks_type(hx509_context context, const char *type) -{ - int i; - - for (i = 0; i < context->ks_num_ops; i++) - if (strcasecmp(type, context->ks_ops[i]->name) == 0) - return context->ks_ops[i]; - - return NULL; -} - -void -_hx509_ks_register(hx509_context context, struct hx509_keyset_ops *ops) -{ - struct hx509_keyset_ops **val; - - if (_hx509_ks_type(context, ops->name)) - return; - - val = realloc(context->ks_ops, - (context->ks_num_ops + 1) * sizeof(context->ks_ops[0])); - if (val == NULL) - return; - val[context->ks_num_ops] = ops; - context->ks_ops = val; - context->ks_num_ops++; -} - -/** - * Open or creates a new hx509 certificate store. - * - * @param context A hx509 context - * @param name name of the store, format is TYPE:type-specific-string, - * if NULL is used the MEMORY store is used. - * @param flags list of flags: - * - HX509_CERTS_CREATE create a new keystore of the specific TYPE. - * - HX509_CERTS_UNPROTECT_ALL fails if any private key failed to be extracted. - * @param lock a lock that unlocks the certificates store, use NULL to - * select no password/certifictes/prompt lock (see @ref page_lock). - * @param certs return pointer, free with hx509_certs_free(). - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_init(hx509_context context, - const char *name, int flags, - hx509_lock lock, hx509_certs *certs) -{ - struct hx509_keyset_ops *ops; - const char *residue; - hx509_certs c; - char *type; - int ret; - - *certs = NULL; - - residue = strchr(name, ':'); - if (residue) { - type = malloc(residue - name + 1); - if (type) - strlcpy(type, name, residue - name + 1); - residue++; - if (residue[0] == '\0') - residue = NULL; - } else { - type = strdup("MEMORY"); - residue = name; - } - if (type == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - - ops = _hx509_ks_type(context, type); - if (ops == NULL) { - hx509_set_error_string(context, 0, ENOENT, - "Keyset type %s is not supported", type); - free(type); - return ENOENT; - } - free(type); - c = calloc(1, sizeof(*c)); - if (c == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - c->ops = ops; - c->ref = 1; - - ret = (*ops->init)(context, c, &c->ops_data, flags, residue, lock); - if (ret) { - free(c); - return ret; - } - - *certs = c; - return 0; -} - -/** - * Write the certificate store to stable storage. - * - * @param context A hx509 context. - * @param certs a certificate store to store. - * @param flags currently unused, use 0. - * @param lock a lock that unlocks the certificates store, use NULL to - * select no password/certifictes/prompt lock (see @ref page_lock). - * - * @return Returns an hx509 error code. HX509_UNSUPPORTED_OPERATION if - * the certificate store doesn't support the store operation. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_store(hx509_context context, - hx509_certs certs, - int flags, - hx509_lock lock) -{ - if (certs->ops->store == NULL) { - hx509_set_error_string(context, 0, HX509_UNSUPPORTED_OPERATION, - "keystore if type %s doesn't support " - "store operation", - certs->ops->name); - return HX509_UNSUPPORTED_OPERATION; - } - - return (*certs->ops->store)(context, certs, certs->ops_data, flags, lock); -} - - -hx509_certs -hx509_certs_ref(hx509_certs certs) -{ - if (certs == NULL) - return NULL; - if (certs->ref == 0) - _hx509_abort("certs refcount == 0 on ref"); - if (certs->ref == UINT_MAX) - _hx509_abort("certs refcount == UINT_MAX on ref"); - certs->ref++; - return certs; -} - -/** - * Free a certificate store. - * - * @param certs certificate store to free. - * - * @ingroup hx509_keyset - */ - -void -hx509_certs_free(hx509_certs *certs) -{ - if (*certs) { - if ((*certs)->ref == 0) - _hx509_abort("cert refcount == 0 on free"); - if (--(*certs)->ref > 0) - return; - - (*(*certs)->ops->free)(*certs, (*certs)->ops_data); - free(*certs); - *certs = NULL; - } -} - -/** - * Start the integration - * - * @param context a hx509 context. - * @param certs certificate store to iterate over - * @param cursor cursor that will keep track of progress, free with - * hx509_certs_end_seq(). - * - * @return Returns an hx509 error code. HX509_UNSUPPORTED_OPERATION is - * returned if the certificate store doesn't support the iteration - * operation. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_start_seq(hx509_context context, - hx509_certs certs, - hx509_cursor *cursor) -{ - int ret; - - if (certs->ops->iter_start == NULL) { - hx509_set_error_string(context, 0, HX509_UNSUPPORTED_OPERATION, - "Keyset type %s doesn't support iteration", - certs->ops->name); - return HX509_UNSUPPORTED_OPERATION; - } - - ret = (*certs->ops->iter_start)(context, certs, certs->ops_data, cursor); - if (ret) - return ret; - - return 0; -} - -/** - * Get next ceritificate from the certificate keystore pointed out by - * cursor. - * - * @param context a hx509 context. - * @param certs certificate store to iterate over. - * @param cursor cursor that keeps track of progress. - * @param cert return certificate next in store, NULL if the store - * contains no more certificates. Free with hx509_cert_free(). - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_next_cert(hx509_context context, - hx509_certs certs, - hx509_cursor cursor, - hx509_cert *cert) -{ - *cert = NULL; - return (*certs->ops->iter)(context, certs, certs->ops_data, cursor, cert); -} - -/** - * End the iteration over certificates. - * - * @param context a hx509 context. - * @param certs certificate store to iterate over. - * @param cursor cursor that will keep track of progress, freed. - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_end_seq(hx509_context context, - hx509_certs certs, - hx509_cursor cursor) -{ - (*certs->ops->iter_end)(context, certs, certs->ops_data, cursor); - return 0; -} - -/** - * Iterate over all certificates in a keystore and call an function - * for each fo them. - * - * @param context a hx509 context. - * @param certs certificate store to iterate over. - * @param func function to call for each certificate. The function - * should return non-zero to abort the iteration, that value is passed - * back to the caller of hx509_certs_iter_f(). - * @param ctx context variable that will passed to the function. - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_iter_f(hx509_context context, - hx509_certs certs, - int (*func)(hx509_context, void *, hx509_cert), - void *ctx) -{ - hx509_cursor cursor; - hx509_cert c; - int ret; - - ret = hx509_certs_start_seq(context, certs, &cursor); - if (ret) - return ret; - - while (1) { - ret = hx509_certs_next_cert(context, certs, cursor, &c); - if (ret) - break; - if (c == NULL) { - ret = 0; - break; - } - ret = (*func)(context, ctx, c); - hx509_cert_free(c); - if (ret) - break; - } - - hx509_certs_end_seq(context, certs, cursor); - - return ret; -} - -/** - * Iterate over all certificates in a keystore and call an function - * for each fo them. - * - * @param context a hx509 context. - * @param certs certificate store to iterate over. - * @param func function to call for each certificate. The function - * should return non-zero to abort the iteration, that value is passed - * back to the caller of hx509_certs_iter(). - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -#ifdef __BLOCKS__ - -static int -certs_iter(hx509_context context, void *ctx, hx509_cert cert) -{ - int (^func)(hx509_cert) = ctx; - return func(cert); -} - -/** - * Iterate over all certificates in a keystore and call an block - * for each fo them. - * - * @param context a hx509 context. - * @param certs certificate store to iterate over. - * @param func block to call for each certificate. The function - * should return non-zero to abort the iteration, that value is passed - * back to the caller of hx509_certs_iter(). - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_iter(hx509_context context, - hx509_certs certs, - int (^func)(hx509_cert)) -{ - return hx509_certs_iter_f(context, certs, certs_iter, func); -} -#endif - - -/** - * Function to use to hx509_certs_iter_f() as a function argument, the - * ctx variable to hx509_certs_iter_f() should be a FILE file descriptor. - * - * @param context a hx509 context. - * @param ctx used by hx509_certs_iter_f(). - * @param c a certificate - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_ci_print_names(hx509_context context, void *ctx, hx509_cert c) -{ - Certificate *cert; - hx509_name n; - char *s, *i; - - cert = _hx509_get_cert(c); - - _hx509_name_from_Name(&cert->tbsCertificate.subject, &n); - hx509_name_to_string(n, &s); - hx509_name_free(&n); - _hx509_name_from_Name(&cert->tbsCertificate.issuer, &n); - hx509_name_to_string(n, &i); - hx509_name_free(&n); - fprintf(ctx, "subject: %s\nissuer: %s\n", s, i); - free(s); - free(i); - return 0; -} - -/** - * Add a certificate to the certificiate store. - * - * The receiving keyset certs will either increase reference counter - * of the cert or make a deep copy, either way, the caller needs to - * free the cert itself. - * - * @param context a hx509 context. - * @param certs certificate store to add the certificate to. - * @param cert certificate to add. - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_add(hx509_context context, hx509_certs certs, hx509_cert cert) -{ - if (certs->ops->add == NULL) { - hx509_set_error_string(context, 0, ENOENT, - "Keyset type %s doesn't support add operation", - certs->ops->name); - return ENOENT; - } - - return (*certs->ops->add)(context, certs, certs->ops_data, cert); -} - -/** - * Find a certificate matching the query. - * - * @param context a hx509 context. - * @param certs certificate store to search. - * @param q query allocated with @ref hx509_query functions. - * @param r return certificate (or NULL on error), should be freed - * with hx509_cert_free(). - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_find(hx509_context context, - hx509_certs certs, - const hx509_query *q, - hx509_cert *r) -{ - hx509_cursor cursor; - hx509_cert c; - int ret; - - *r = NULL; - - _hx509_query_statistic(context, 0, q); - - if (certs->ops->query) - return (*certs->ops->query)(context, certs, certs->ops_data, q, r); - - ret = hx509_certs_start_seq(context, certs, &cursor); - if (ret) - return ret; - - c = NULL; - while (1) { - ret = hx509_certs_next_cert(context, certs, cursor, &c); - if (ret) - break; - if (c == NULL) - break; - if (_hx509_query_match_cert(context, q, c)) { - *r = c; - break; - } - hx509_cert_free(c); - } - - hx509_certs_end_seq(context, certs, cursor); - if (ret) - return ret; - /** - * Return HX509_CERT_NOT_FOUND if no certificate in certs matched - * the query. - */ - if (c == NULL) { - hx509_clear_error_string(context); - return HX509_CERT_NOT_FOUND; - } - - return 0; -} - -/** - * Filter certificate matching the query. - * - * @param context a hx509 context. - * @param certs certificate store to search. - * @param q query allocated with @ref hx509_query functions. - * @param result the filtered certificate store, caller must free with - * hx509_certs_free(). - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_filter(hx509_context context, - hx509_certs certs, - const hx509_query *q, - hx509_certs *result) -{ - hx509_cursor cursor; - hx509_cert c; - int ret, found = 0; - - _hx509_query_statistic(context, 0, q); - - ret = hx509_certs_init(context, "MEMORY:filter-certs", 0, - NULL, result); - if (ret) - return ret; - - ret = hx509_certs_start_seq(context, certs, &cursor); - if (ret) { - hx509_certs_free(result); - return ret; - } - - c = NULL; - while (1) { - ret = hx509_certs_next_cert(context, certs, cursor, &c); - if (ret) - break; - if (c == NULL) - break; - if (_hx509_query_match_cert(context, q, c)) { - hx509_certs_add(context, *result, c); - found = 1; - } - hx509_cert_free(c); - } - - hx509_certs_end_seq(context, certs, cursor); - if (ret) { - hx509_certs_free(result); - return ret; - } - - /** - * Return HX509_CERT_NOT_FOUND if no certificate in certs matched - * the query. - */ - if (!found) { - hx509_certs_free(result); - hx509_clear_error_string(context); - return HX509_CERT_NOT_FOUND; - } - - return 0; -} - - -static int -certs_merge_func(hx509_context context, void *ctx, hx509_cert c) -{ - return hx509_certs_add(context, (hx509_certs)ctx, c); -} - -/** - * Merge a certificate store into another. The from store is keep - * intact. - * - * @param context a hx509 context. - * @param to the store to merge into. - * @param from the store to copy the object from. - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_merge(hx509_context context, hx509_certs to, hx509_certs from) -{ - if (from == NULL) - return 0; - return hx509_certs_iter_f(context, from, certs_merge_func, to); -} - -/** - * Same a hx509_certs_merge() but use a lock and name to describe the - * from source. - * - * @param context a hx509 context. - * @param to the store to merge into. - * @param lock a lock that unlocks the certificates store, use NULL to - * select no password/certifictes/prompt lock (see @ref page_lock). - * @param name name of the source store - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_append(hx509_context context, - hx509_certs to, - hx509_lock lock, - const char *name) -{ - hx509_certs s; - int ret; - - ret = hx509_certs_init(context, name, 0, lock, &s); - if (ret) - return ret; - ret = hx509_certs_merge(context, to, s); - hx509_certs_free(&s); - return ret; -} - -/** - * Get one random certificate from the certificate store. - * - * @param context a hx509 context. - * @param certs a certificate store to get the certificate from. - * @param c return certificate, should be freed with hx509_cert_free(). - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_get_one_cert(hx509_context context, hx509_certs certs, hx509_cert *c) -{ - hx509_cursor cursor; - int ret; - - *c = NULL; - - ret = hx509_certs_start_seq(context, certs, &cursor); - if (ret) - return ret; - - ret = hx509_certs_next_cert(context, certs, cursor, c); - if (ret) - return ret; - - hx509_certs_end_seq(context, certs, cursor); - return 0; -} - -static int -certs_info_stdio(void *ctx, const char *str) -{ - FILE *f = ctx; - fprintf(f, "%s\n", str); - return 0; -} - -/** - * Print some info about the certificate store. - * - * @param context a hx509 context. - * @param certs certificate store to print information about. - * @param func function that will get each line of the information, if - * NULL is used the data is printed on a FILE descriptor that should - * be passed in ctx, if ctx also is NULL, stdout is used. - * @param ctx parameter to func. - * - * @return Returns an hx509 error code. - * - * @ingroup hx509_keyset - */ - -int -hx509_certs_info(hx509_context context, - hx509_certs certs, - int (*func)(void *, const char *), - void *ctx) -{ - if (func == NULL) { - func = certs_info_stdio; - if (ctx == NULL) - ctx = stdout; - } - if (certs->ops->printinfo == NULL) { - (*func)(ctx, "No info function for certs"); - return 0; - } - return (*certs->ops->printinfo)(context, certs, certs->ops_data, - func, ctx); -} - -void -_hx509_pi_printf(int (*func)(void *, const char *), void *ctx, - const char *fmt, ...) -{ - va_list ap; - char *str; - - va_start(ap, fmt); - vasprintf(&str, fmt, ap); - va_end(ap); - if (str == NULL) - return; - (*func)(ctx, str); - free(str); -} - -int -_hx509_certs_keys_get(hx509_context context, - hx509_certs certs, - hx509_private_key **keys) -{ - if (certs->ops->getkeys == NULL) { - *keys = NULL; - return 0; - } - return (*certs->ops->getkeys)(context, certs, certs->ops_data, keys); -} - -int -_hx509_certs_keys_add(hx509_context context, - hx509_certs certs, - hx509_private_key key) -{ - if (certs->ops->addkey == NULL) { - hx509_set_error_string(context, 0, EINVAL, - "keystore if type %s doesn't support " - "key add operation", - certs->ops->name); - return EINVAL; - } - return (*certs->ops->addkey)(context, certs, certs->ops_data, key); -} - - -void -_hx509_certs_keys_free(hx509_context context, - hx509_private_key *keys) -{ - int i; - for (i = 0; keys[i]; i++) - hx509_private_key_free(&keys[i]); - free(keys); -} diff --git a/kerberosV/src/lib/hx509/ks_dir.c b/kerberosV/src/lib/hx509/ks_dir.c deleted file mode 100644 index 264b1bf552d..00000000000 --- a/kerberosV/src/lib/hx509/ks_dir.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2006 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 "hx_locl.h" -#include - -/* - * The DIR keyset module is strange compared to the other modules - * since it does lazy evaluation and really doesn't keep any local - * state except for the directory iteration and cert iteration of - * files. DIR ignores most errors so that the consumer doesn't get - * failes for stray files in directories. - */ - -struct dircursor { - DIR *dir; - hx509_certs certs; - void *iter; -}; - -/* - * - */ - -static int -dir_init(hx509_context context, - hx509_certs certs, void **data, int flags, - const char *residue, hx509_lock lock) -{ - *data = NULL; - - { - struct stat sb; - int ret; - - ret = stat(residue, &sb); - if (ret == -1) { - hx509_set_error_string(context, 0, ENOENT, - "No such file %s", residue); - return ENOENT; - } - - if (!S_ISDIR(sb.st_mode)) { - hx509_set_error_string(context, 0, ENOTDIR, - "%s is not a directory", residue); - return ENOTDIR; - } - } - - *data = strdup(residue); - if (*data == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - - return 0; -} - -static int -dir_free(hx509_certs certs, void *data) -{ - free(data); - return 0; -} - -static int -dir_iter_start(hx509_context context, - hx509_certs certs, void *data, void **cursor) -{ - struct dircursor *d; - - *cursor = NULL; - - d = calloc(1, sizeof(*d)); - if (d == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - - d->dir = opendir(data); - if (d->dir == NULL) { - hx509_clear_error_string(context); - free(d); - return errno; - } - rk_cloexec_dir(d->dir); - d->certs = NULL; - d->iter = NULL; - - *cursor = d; - return 0; -} - -static int -dir_iter(hx509_context context, - hx509_certs certs, void *data, void *iter, hx509_cert *cert) -{ - struct dircursor *d = iter; - int ret = 0; - - *cert = NULL; - - do { - struct dirent *dir; - char *fn; - - if (d->certs) { - ret = hx509_certs_next_cert(context, d->certs, d->iter, cert); - if (ret) { - hx509_certs_end_seq(context, d->certs, d->iter); - d->iter = NULL; - hx509_certs_free(&d->certs); - return ret; - } - if (*cert) { - ret = 0; - break; - } - hx509_certs_end_seq(context, d->certs, d->iter); - d->iter = NULL; - hx509_certs_free(&d->certs); - } - - dir = readdir(d->dir); - if (dir == NULL) { - ret = 0; - break; - } - if (strcmp(dir->d_name, ".") == 0 || strcmp(dir->d_name, "..") == 0) - continue; - - if (asprintf(&fn, "FILE:%s/%s", (char *)data, dir->d_name) == -1) - return ENOMEM; - - ret = hx509_certs_init(context, fn, 0, NULL, &d->certs); - if (ret == 0) { - - ret = hx509_certs_start_seq(context, d->certs, &d->iter); - if (ret) - hx509_certs_free(&d->certs); - } - /* ignore errors */ - if (ret) { - d->certs = NULL; - ret = 0; - } - - free(fn); - } while(ret == 0); - - return ret; -} - - -static int -dir_iter_end(hx509_context context, - hx509_certs certs, - void *data, - void *cursor) -{ - struct dircursor *d = cursor; - - if (d->certs) { - hx509_certs_end_seq(context, d->certs, d->iter); - d->iter = NULL; - hx509_certs_free(&d->certs); - } - closedir(d->dir); - free(d); - return 0; -} - - -static struct hx509_keyset_ops keyset_dir = { - "DIR", - 0, - dir_init, - NULL, - dir_free, - NULL, - NULL, - dir_iter_start, - dir_iter, - dir_iter_end -}; - -void -_hx509_ks_dir_register(hx509_context context) -{ - _hx509_ks_register(context, &keyset_dir); -} diff --git a/kerberosV/src/lib/hx509/ks_file.c b/kerberosV/src/lib/hx509/ks_file.c deleted file mode 100644 index d21d8892870..00000000000 --- a/kerberosV/src/lib/hx509/ks_file.c +++ /dev/null @@ -1,690 +0,0 @@ -/* - * Copyright (c) 2005 - 2007 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 "hx_locl.h" - -typedef enum { USE_PEM, USE_DER } outformat; - -struct ks_file { - hx509_certs certs; - char *fn; - outformat format; -}; - -/* - * - */ - -static int -parse_certificate(hx509_context context, const char *fn, - struct hx509_collector *c, - const hx509_pem_header *headers, - const void *data, size_t len, - const AlgorithmIdentifier *ai) -{ - hx509_cert cert; - int ret; - - ret = hx509_cert_init_data(context, data, len, &cert); - if (ret) - return ret; - - ret = _hx509_collector_certs_add(context, c, cert); - hx509_cert_free(cert); - return ret; -} - -static int -try_decrypt(hx509_context context, - struct hx509_collector *collector, - const AlgorithmIdentifier *alg, - const EVP_CIPHER *c, - const void *ivdata, - const void *password, - size_t passwordlen, - const void *cipher, - size_t len) -{ - heim_octet_string clear; - size_t keylen; - void *key; - int ret; - - keylen = EVP_CIPHER_key_length(c); - - key = malloc(keylen); - if (key == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - - ret = EVP_BytesToKey(c, EVP_md5(), ivdata, - password, passwordlen, - 1, key, NULL); - if (ret <= 0) { - hx509_set_error_string(context, 0, HX509_CRYPTO_INTERNAL_ERROR, - "Failed to do string2key for private key"); - return HX509_CRYPTO_INTERNAL_ERROR; - } - - clear.data = malloc(len); - if (clear.data == NULL) { - hx509_set_error_string(context, 0, ENOMEM, - "Out of memory to decrypt for private key"); - ret = ENOMEM; - goto out; - } - clear.length = len; - - { - EVP_CIPHER_CTX ctx; - EVP_CIPHER_CTX_init(&ctx); - EVP_CipherInit_ex(&ctx, c, NULL, key, ivdata, 0); - EVP_Cipher(&ctx, clear.data, cipher, len); - EVP_CIPHER_CTX_cleanup(&ctx); - } - - ret = _hx509_collector_private_key_add(context, - collector, - alg, - NULL, - &clear, - NULL); - - memset(clear.data, 0, clear.length); - free(clear.data); -out: - memset(key, 0, keylen); - free(key); - return ret; -} - -static int -parse_pkcs8_private_key(hx509_context context, const char *fn, - struct hx509_collector *c, - const hx509_pem_header *headers, - const void *data, size_t length, - const AlgorithmIdentifier *ai) -{ - PKCS8PrivateKeyInfo ki; - heim_octet_string keydata; - - int ret; - - ret = decode_PKCS8PrivateKeyInfo(data, length, &ki, NULL); - if (ret) - return ret; - - keydata.data = rk_UNCONST(data); - keydata.length = length; - - ret = _hx509_collector_private_key_add(context, - c, - &ki.privateKeyAlgorithm, - NULL, - &ki.privateKey, - &keydata); - free_PKCS8PrivateKeyInfo(&ki); - return ret; -} - -static int -parse_pem_private_key(hx509_context context, const char *fn, - struct hx509_collector *c, - const hx509_pem_header *headers, - const void *data, size_t len, - const AlgorithmIdentifier *ai) -{ - int ret = 0; - const char *enc; - - enc = hx509_pem_find_header(headers, "Proc-Type"); - if (enc) { - const char *dek; - char *type, *iv; - ssize_t ssize, size; - void *ivdata; - const EVP_CIPHER *cipher; - const struct _hx509_password *pw; - hx509_lock lock; - int decrypted = 0; - size_t i; - - lock = _hx509_collector_get_lock(c); - if (lock == NULL) { - hx509_set_error_string(context, 0, HX509_ALG_NOT_SUPP, - "Failed to get password for " - "password protected file %s", fn); - return HX509_ALG_NOT_SUPP; - } - - if (strcmp(enc, "4,ENCRYPTED") != 0) { - hx509_set_error_string(context, 0, HX509_PARSING_KEY_FAILED, - "Private key encrypted in unknown method %s " - "in file", - enc, fn); - hx509_clear_error_string(context); - return HX509_PARSING_KEY_FAILED; - } - - dek = hx509_pem_find_header(headers, "DEK-Info"); - if (dek == NULL) { - hx509_set_error_string(context, 0, HX509_PARSING_KEY_FAILED, - "Encrypted private key missing DEK-Info"); - return HX509_PARSING_KEY_FAILED; - } - - type = strdup(dek); - if (type == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - - iv = strchr(type, ','); - if (iv == NULL) { - free(type); - hx509_set_error_string(context, 0, HX509_PARSING_KEY_FAILED, - "IV missing"); - return HX509_PARSING_KEY_FAILED; - } - - *iv++ = '\0'; - - size = strlen(iv); - ivdata = malloc(size); - if (ivdata == NULL) { - hx509_clear_error_string(context); - free(type); - return ENOMEM; - } - - cipher = EVP_get_cipherbyname(type); - if (cipher == NULL) { - free(ivdata); - hx509_set_error_string(context, 0, HX509_ALG_NOT_SUPP, - "Private key encrypted with " - "unsupported cipher: %s", - type); - free(type); - return HX509_ALG_NOT_SUPP; - } - -#define PKCS5_SALT_LEN 8 - - ssize = hex_decode(iv, ivdata, size); - free(type); - type = NULL; - iv = NULL; - - if (ssize < 0 || ssize < PKCS5_SALT_LEN || ssize < EVP_CIPHER_iv_length(cipher)) { - free(ivdata); - hx509_set_error_string(context, 0, HX509_PARSING_KEY_FAILED, - "Salt have wrong length in " - "private key file"); - return HX509_PARSING_KEY_FAILED; - } - - pw = _hx509_lock_get_passwords(lock); - if (pw != NULL) { - const void *password; - size_t passwordlen; - - for (i = 0; i < pw->len; i++) { - password = pw->val[i]; - passwordlen = strlen(password); - - ret = try_decrypt(context, c, ai, cipher, ivdata, - password, passwordlen, data, len); - if (ret == 0) { - decrypted = 1; - break; - } - } - } - if (!decrypted) { - hx509_prompt prompt; - char password[128]; - - memset(&prompt, 0, sizeof(prompt)); - - prompt.prompt = "Password for keyfile: "; - prompt.type = HX509_PROMPT_TYPE_PASSWORD; - prompt.reply.data = password; - prompt.reply.length = sizeof(password); - - ret = hx509_lock_prompt(lock, &prompt); - if (ret == 0) - ret = try_decrypt(context, c, ai, cipher, ivdata, password, - strlen(password), data, len); - /* XXX add password to lock password collection ? */ - memset(password, 0, sizeof(password)); - } - free(ivdata); - - } else { - heim_octet_string keydata; - - keydata.data = rk_UNCONST(data); - keydata.length = len; - - ret = _hx509_collector_private_key_add(context, c, ai, NULL, - &keydata, NULL); - } - - return ret; -} - - -struct pem_formats { - const char *name; - int (*func)(hx509_context, const char *, struct hx509_collector *, - const hx509_pem_header *, const void *, size_t, - const AlgorithmIdentifier *); - const AlgorithmIdentifier *(*ai)(void); -} formats[] = { - { "CERTIFICATE", parse_certificate, NULL }, - { "PRIVATE KEY", parse_pkcs8_private_key, NULL }, - { "RSA PRIVATE KEY", parse_pem_private_key, hx509_signature_rsa }, - { "EC PRIVATE KEY", parse_pem_private_key, hx509_signature_ecPublicKey } -}; - - -struct pem_ctx { - int flags; - struct hx509_collector *c; -}; - -static int -pem_func(hx509_context context, const char *type, - const hx509_pem_header *header, - const void *data, size_t len, void *ctx) -{ - struct pem_ctx *pem_ctx = (struct pem_ctx*)ctx; - int ret = 0; - size_t j; - - for (j = 0; j < sizeof(formats)/sizeof(formats[0]); j++) { - const char *q = formats[j].name; - if (strcasecmp(type, q) == 0) { - const AlgorithmIdentifier *ai = NULL; - if (formats[j].ai != NULL) - ai = (*formats[j].ai)(); - - ret = (*formats[j].func)(context, NULL, pem_ctx->c, - header, data, len, ai); - if (ret && (pem_ctx->flags & HX509_CERTS_UNPROTECT_ALL)) { - hx509_set_error_string(context, HX509_ERROR_APPEND, ret, - "Failed parseing PEM format %s", type); - return ret; - } - break; - } - } - if (j == sizeof(formats)/sizeof(formats[0])) { - ret = HX509_UNSUPPORTED_OPERATION; - hx509_set_error_string(context, 0, ret, - "Found no matching PEM format for %s", type); - return ret; - } - return 0; -} - -/* - * - */ - -static int -file_init_common(hx509_context context, - hx509_certs certs, void **data, int flags, - const char *residue, hx509_lock lock, outformat format) -{ - char *p, *pnext; - struct ks_file *ksf = NULL; - hx509_private_key *keys = NULL; - int ret; - struct pem_ctx pem_ctx; - - pem_ctx.flags = flags; - pem_ctx.c = NULL; - - *data = NULL; - - if (lock == NULL) - lock = _hx509_empty_lock; - - ksf = calloc(1, sizeof(*ksf)); - if (ksf == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - ksf->format = format; - - ksf->fn = strdup(residue); - if (ksf->fn == NULL) { - hx509_clear_error_string(context); - ret = ENOMEM; - goto out; - } - - /* - * XXX this is broken, the function should parse the file before - * overwriting it - */ - - if (flags & HX509_CERTS_CREATE) { - ret = hx509_certs_init(context, "MEMORY:ks-file-create", - 0, lock, &ksf->certs); - if (ret) - goto out; - *data = ksf; - return 0; - } - - ret = _hx509_collector_alloc(context, lock, &pem_ctx.c); - if (ret) - goto out; - - for (p = ksf->fn; p != NULL; p = pnext) { - FILE *f; - - pnext = strchr(p, ','); - if (pnext) - *pnext++ = '\0'; - - - if ((f = fopen(p, "r")) == NULL) { - ret = ENOENT; - hx509_set_error_string(context, 0, ret, - "Failed to open PEM file \"%s\": %s", - p, strerror(errno)); - goto out; - } - rk_cloexec_file(f); - - ret = hx509_pem_read(context, f, pem_func, &pem_ctx); - fclose(f); - if (ret != 0 && ret != HX509_PARSING_KEY_FAILED) - goto out; - else if (ret == HX509_PARSING_KEY_FAILED) { - size_t length; - void *ptr; - size_t i; - - ret = rk_undumpdata(p, &ptr, &length); - if (ret) { - hx509_clear_error_string(context); - goto out; - } - - for (i = 0; i < sizeof(formats)/sizeof(formats[0]); i++) { - const AlgorithmIdentifier *ai = NULL; - if (formats[i].ai != NULL) - ai = (*formats[i].ai)(); - - ret = (*formats[i].func)(context, p, pem_ctx.c, NULL, ptr, length, ai); - if (ret == 0) - break; - } - rk_xfree(ptr); - if (ret) { - hx509_clear_error_string(context); - goto out; - } - } - } - - ret = _hx509_collector_collect_certs(context, pem_ctx.c, &ksf->certs); - if (ret) - goto out; - - ret = _hx509_collector_collect_private_keys(context, pem_ctx.c, &keys); - if (ret == 0) { - int i; - - for (i = 0; keys[i]; i++) - _hx509_certs_keys_add(context, ksf->certs, keys[i]); - _hx509_certs_keys_free(context, keys); - } - -out: - if (ret == 0) - *data = ksf; - else { - if (ksf->fn) - free(ksf->fn); - free(ksf); - } - if (pem_ctx.c) - _hx509_collector_free(pem_ctx.c); - - return ret; -} - -static int -file_init_pem(hx509_context context, - hx509_certs certs, void **data, int flags, - const char *residue, hx509_lock lock) -{ - return file_init_common(context, certs, data, flags, residue, lock, USE_PEM); -} - -static int -file_init_der(hx509_context context, - hx509_certs certs, void **data, int flags, - const char *residue, hx509_lock lock) -{ - return file_init_common(context, certs, data, flags, residue, lock, USE_DER); -} - -static int -file_free(hx509_certs certs, void *data) -{ - struct ks_file *ksf = data; - hx509_certs_free(&ksf->certs); - free(ksf->fn); - free(ksf); - return 0; -} - -struct store_ctx { - FILE *f; - outformat format; -}; - -static int -store_func(hx509_context context, void *ctx, hx509_cert c) -{ - struct store_ctx *sc = ctx; - heim_octet_string data; - int ret; - - ret = hx509_cert_binary(context, c, &data); - if (ret) - return ret; - - switch (sc->format) { - case USE_DER: - fwrite(data.data, data.length, 1, sc->f); - free(data.data); - break; - case USE_PEM: - hx509_pem_write(context, "CERTIFICATE", NULL, sc->f, - data.data, data.length); - free(data.data); - if (_hx509_cert_private_key_exportable(c)) { - hx509_private_key key = _hx509_cert_private_key(c); - ret = _hx509_private_key_export(context, key, - HX509_KEY_FORMAT_DER, &data); - if (ret) - break; - hx509_pem_write(context, _hx509_private_pem_name(key), NULL, sc->f, - data.data, data.length); - free(data.data); - } - break; - } - - return 0; -} - -static int -file_store(hx509_context context, - hx509_certs certs, void *data, int flags, hx509_lock lock) -{ - struct ks_file *ksf = data; - struct store_ctx sc; - int ret; - - sc.f = fopen(ksf->fn, "w"); - if (sc.f == NULL) { - hx509_set_error_string(context, 0, ENOENT, - "Failed to open file %s for writing"); - return ENOENT; - } - rk_cloexec_file(sc.f); - sc.format = ksf->format; - - ret = hx509_certs_iter_f(context, ksf->certs, store_func, &sc); - fclose(sc.f); - return ret; -} - -static int -file_add(hx509_context context, hx509_certs certs, void *data, hx509_cert c) -{ - struct ks_file *ksf = data; - return hx509_certs_add(context, ksf->certs, c); -} - -static int -file_iter_start(hx509_context context, - hx509_certs certs, void *data, void **cursor) -{ - struct ks_file *ksf = data; - return hx509_certs_start_seq(context, ksf->certs, cursor); -} - -static int -file_iter(hx509_context context, - hx509_certs certs, void *data, void *iter, hx509_cert *cert) -{ - struct ks_file *ksf = data; - return hx509_certs_next_cert(context, ksf->certs, iter, cert); -} - -static int -file_iter_end(hx509_context context, - hx509_certs certs, - void *data, - void *cursor) -{ - struct ks_file *ksf = data; - return hx509_certs_end_seq(context, ksf->certs, cursor); -} - -static int -file_getkeys(hx509_context context, - hx509_certs certs, - void *data, - hx509_private_key **keys) -{ - struct ks_file *ksf = data; - return _hx509_certs_keys_get(context, ksf->certs, keys); -} - -static int -file_addkey(hx509_context context, - hx509_certs certs, - void *data, - hx509_private_key key) -{ - struct ks_file *ksf = data; - return _hx509_certs_keys_add(context, ksf->certs, key); -} - -static struct hx509_keyset_ops keyset_file = { - "FILE", - 0, - file_init_pem, - file_store, - file_free, - file_add, - NULL, - file_iter_start, - file_iter, - file_iter_end, - NULL, - file_getkeys, - file_addkey -}; - -static struct hx509_keyset_ops keyset_pemfile = { - "PEM-FILE", - 0, - file_init_pem, - file_store, - file_free, - file_add, - NULL, - file_iter_start, - file_iter, - file_iter_end, - NULL, - file_getkeys, - file_addkey -}; - -static struct hx509_keyset_ops keyset_derfile = { - "DER-FILE", - 0, - file_init_der, - file_store, - file_free, - file_add, - NULL, - file_iter_start, - file_iter, - file_iter_end, - NULL, - file_getkeys, - file_addkey -}; - - -void -_hx509_ks_file_register(hx509_context context) -{ - _hx509_ks_register(context, &keyset_file); - _hx509_ks_register(context, &keyset_pemfile); - _hx509_ks_register(context, &keyset_derfile); -} diff --git a/kerberosV/src/lib/hx509/ks_keychain.c b/kerberosV/src/lib/hx509/ks_keychain.c deleted file mode 100644 index 0552d8f7e97..00000000000 --- a/kerberosV/src/lib/hx509/ks_keychain.c +++ /dev/null @@ -1,604 +0,0 @@ -/* - * Copyright (c) 2007 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 "hx_locl.h" - -#ifdef HAVE_FRAMEWORK_SECURITY - -#include - -/* Missing function decls in pre Leopard */ -#ifdef NEED_SECKEYGETCSPHANDLE_PROTO -OSStatus SecKeyGetCSPHandle(SecKeyRef, CSSM_CSP_HANDLE *); -OSStatus SecKeyGetCredentials(SecKeyRef, CSSM_ACL_AUTHORIZATION_TAG, - int, const CSSM_ACCESS_CREDENTIALS **); -#define kSecCredentialTypeDefault 0 -#define CSSM_SIZE uint32_t -#endif - - -static int -getAttribute(SecKeychainItemRef itemRef, SecItemAttr item, - SecKeychainAttributeList **attrs) -{ - SecKeychainAttributeInfo attrInfo; - UInt32 attrFormat = 0; - OSStatus ret; - - *attrs = NULL; - - attrInfo.count = 1; - attrInfo.tag = &item; - attrInfo.format = &attrFormat; - - ret = SecKeychainItemCopyAttributesAndData(itemRef, &attrInfo, NULL, - attrs, NULL, NULL); - if (ret) - return EINVAL; - return 0; -} - - -/* - * - */ - -struct kc_rsa { - SecKeychainItemRef item; - size_t keysize; -}; - - -static int -kc_rsa_public_encrypt(int flen, - const unsigned char *from, - unsigned char *to, - RSA *rsa, - int padding) -{ - return -1; -} - -static int -kc_rsa_public_decrypt(int flen, - const unsigned char *from, - unsigned char *to, - RSA *rsa, - int padding) -{ - return -1; -} - - -static int -kc_rsa_private_encrypt(int flen, - const unsigned char *from, - unsigned char *to, - RSA *rsa, - int padding) -{ - struct kc_rsa *kc = RSA_get_app_data(rsa); - - CSSM_RETURN cret; - OSStatus ret; - const CSSM_ACCESS_CREDENTIALS *creds; - SecKeyRef privKeyRef = (SecKeyRef)kc->item; - CSSM_CSP_HANDLE cspHandle; - const CSSM_KEY *cssmKey; - CSSM_CC_HANDLE sigHandle = 0; - CSSM_DATA sig, in; - int fret = 0; - - if (padding != RSA_PKCS1_PADDING) - return -1; - - cret = SecKeyGetCSSMKey(privKeyRef, &cssmKey); - if(cret) abort(); - - cret = SecKeyGetCSPHandle(privKeyRef, &cspHandle); - if(cret) abort(); - - ret = SecKeyGetCredentials(privKeyRef, CSSM_ACL_AUTHORIZATION_SIGN, - kSecCredentialTypeDefault, &creds); - if(ret) abort(); - - ret = CSSM_CSP_CreateSignatureContext(cspHandle, CSSM_ALGID_RSA, - creds, cssmKey, &sigHandle); - if(ret) abort(); - - in.Data = (uint8 *)from; - in.Length = flen; - - sig.Data = (uint8 *)to; - sig.Length = kc->keysize; - - cret = CSSM_SignData(sigHandle, &in, 1, CSSM_ALGID_NONE, &sig); - if(cret) { - /* cssmErrorString(cret); */ - fret = -1; - } else - fret = sig.Length; - - if(sigHandle) - CSSM_DeleteContext(sigHandle); - - return fret; -} - -static int -kc_rsa_private_decrypt(int flen, const unsigned char *from, unsigned char *to, - RSA * rsa, int padding) -{ - struct kc_rsa *kc = RSA_get_app_data(rsa); - - CSSM_RETURN cret; - OSStatus ret; - const CSSM_ACCESS_CREDENTIALS *creds; - SecKeyRef privKeyRef = (SecKeyRef)kc->item; - CSSM_CSP_HANDLE cspHandle; - const CSSM_KEY *cssmKey; - CSSM_CC_HANDLE handle = 0; - CSSM_DATA out, in, rem; - int fret = 0; - CSSM_SIZE outlen = 0; - char remdata[1024]; - - if (padding != RSA_PKCS1_PADDING) - return -1; - - cret = SecKeyGetCSSMKey(privKeyRef, &cssmKey); - if(cret) abort(); - - cret = SecKeyGetCSPHandle(privKeyRef, &cspHandle); - if(cret) abort(); - - ret = SecKeyGetCredentials(privKeyRef, CSSM_ACL_AUTHORIZATION_DECRYPT, - kSecCredentialTypeDefault, &creds); - if(ret) abort(); - - - ret = CSSM_CSP_CreateAsymmetricContext (cspHandle, - CSSM_ALGID_RSA, - creds, - cssmKey, - CSSM_PADDING_PKCS1, - &handle); - if(ret) abort(); - - in.Data = (uint8 *)from; - in.Length = flen; - - out.Data = (uint8 *)to; - out.Length = kc->keysize; - - rem.Data = (uint8 *)remdata; - rem.Length = sizeof(remdata); - - cret = CSSM_DecryptData(handle, &in, 1, &out, 1, &outlen, &rem); - if(cret) { - /* cssmErrorString(cret); */ - fret = -1; - } else - fret = out.Length; - - if(handle) - CSSM_DeleteContext(handle); - - return fret; -} - -static int -kc_rsa_init(RSA *rsa) -{ - return 1; -} - -static int -kc_rsa_finish(RSA *rsa) -{ - struct kc_rsa *kc_rsa = RSA_get_app_data(rsa); - CFRelease(kc_rsa->item); - memset(kc_rsa, 0, sizeof(*kc_rsa)); - free(kc_rsa); - return 1; -} - -static const RSA_METHOD kc_rsa_pkcs1_method = { - "hx509 Keychain PKCS#1 RSA", - kc_rsa_public_encrypt, - kc_rsa_public_decrypt, - kc_rsa_private_encrypt, - kc_rsa_private_decrypt, - NULL, - NULL, - kc_rsa_init, - kc_rsa_finish, - 0, - NULL, - NULL, - NULL -}; - -static int -set_private_key(hx509_context context, - SecKeychainItemRef itemRef, - hx509_cert cert) -{ - struct kc_rsa *kc; - hx509_private_key key; - RSA *rsa; - int ret; - - ret = hx509_private_key_init(&key, NULL, NULL); - if (ret) - return ret; - - kc = calloc(1, sizeof(*kc)); - if (kc == NULL) - _hx509_abort("out of memory"); - - kc->item = itemRef; - - rsa = RSA_new(); - if (rsa == NULL) - _hx509_abort("out of memory"); - - /* Argh, fake modulus since OpenSSL API is on crack */ - { - SecKeychainAttributeList *attrs = NULL; - uint32_t size; - void *data; - - rsa->n = BN_new(); - if (rsa->n == NULL) abort(); - - ret = getAttribute(itemRef, kSecKeyKeySizeInBits, &attrs); - if (ret) abort(); - - size = *(uint32_t *)attrs->attr[0].data; - SecKeychainItemFreeAttributesAndData(attrs, NULL); - - kc->keysize = (size + 7) / 8; - - data = malloc(kc->keysize); - memset(data, 0xe0, kc->keysize); - BN_bin2bn(data, kc->keysize, rsa->n); - free(data); - } - rsa->e = NULL; - - RSA_set_method(rsa, &kc_rsa_pkcs1_method); - ret = RSA_set_app_data(rsa, kc); - if (ret != 1) - _hx509_abort("RSA_set_app_data"); - - hx509_private_key_assign_rsa(key, rsa); - _hx509_cert_assign_key(cert, key); - - return 0; -} - -/* - * - */ - -struct ks_keychain { - int anchors; - SecKeychainRef keychain; -}; - -static int -keychain_init(hx509_context context, - hx509_certs certs, void **data, int flags, - const char *residue, hx509_lock lock) -{ - struct ks_keychain *ctx; - - ctx = calloc(1, sizeof(*ctx)); - if (ctx == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - - if (residue) { - if (strcasecmp(residue, "system-anchors") == 0) { - ctx->anchors = 1; - } else if (strncasecmp(residue, "FILE:", 5) == 0) { - OSStatus ret; - - ret = SecKeychainOpen(residue + 5, &ctx->keychain); - if (ret != noErr) { - hx509_set_error_string(context, 0, ENOENT, - "Failed to open %s", residue); - return ENOENT; - } - } else { - hx509_set_error_string(context, 0, ENOENT, - "Unknown subtype %s", residue); - return ENOENT; - } - } - - *data = ctx; - return 0; -} - -/* - * - */ - -static int -keychain_free(hx509_certs certs, void *data) -{ - struct ks_keychain *ctx = data; - if (ctx->keychain) - CFRelease(ctx->keychain); - memset(ctx, 0, sizeof(*ctx)); - free(ctx); - return 0; -} - -/* - * - */ - -struct iter { - hx509_certs certs; - void *cursor; - SecKeychainSearchRef searchRef; -}; - -static int -keychain_iter_start(hx509_context context, - hx509_certs certs, void *data, void **cursor) -{ - struct ks_keychain *ctx = data; - struct iter *iter; - - iter = calloc(1, sizeof(*iter)); - if (iter == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - - if (ctx->anchors) { - CFArrayRef anchors; - int ret; - int i; - - ret = hx509_certs_init(context, "MEMORY:ks-file-create", - 0, NULL, &iter->certs); - if (ret) { - free(iter); - return ret; - } - - ret = SecTrustCopyAnchorCertificates(&anchors); - if (ret != 0) { - hx509_certs_free(&iter->certs); - free(iter); - hx509_set_error_string(context, 0, ENOMEM, - "Can't get trust anchors from Keychain"); - return ENOMEM; - } - for (i = 0; i < CFArrayGetCount(anchors); i++) { - SecCertificateRef cr; - hx509_cert cert; - CSSM_DATA cssm; - - cr = (SecCertificateRef)CFArrayGetValueAtIndex(anchors, i); - - SecCertificateGetData(cr, &cssm); - - ret = hx509_cert_init_data(context, cssm.Data, cssm.Length, &cert); - if (ret) - continue; - - ret = hx509_certs_add(context, iter->certs, cert); - hx509_cert_free(cert); - } - CFRelease(anchors); - } - - if (iter->certs) { - int ret; - ret = hx509_certs_start_seq(context, iter->certs, &iter->cursor); - if (ret) { - hx509_certs_free(&iter->certs); - free(iter); - return ret; - } - } else { - OSStatus ret; - - ret = SecKeychainSearchCreateFromAttributes(ctx->keychain, - kSecCertificateItemClass, - NULL, - &iter->searchRef); - if (ret) { - free(iter); - hx509_set_error_string(context, 0, ret, - "Failed to start search for attributes"); - return ENOMEM; - } - } - - *cursor = iter; - return 0; -} - -/* - * - */ - -static int -keychain_iter(hx509_context context, - hx509_certs certs, void *data, void *cursor, hx509_cert *cert) -{ - SecKeychainAttributeList *attrs = NULL; - SecKeychainAttributeInfo attrInfo; - UInt32 attrFormat[1] = { 0 }; - SecKeychainItemRef itemRef; - SecItemAttr item[1]; - struct iter *iter = cursor; - OSStatus ret; - UInt32 len; - void *ptr = NULL; - - if (iter->certs) - return hx509_certs_next_cert(context, iter->certs, iter->cursor, cert); - - *cert = NULL; - - ret = SecKeychainSearchCopyNext(iter->searchRef, &itemRef); - if (ret == errSecItemNotFound) - return 0; - else if (ret != 0) - return EINVAL; - - /* - * Pick out certificate and matching "keyid" - */ - - item[0] = kSecPublicKeyHashItemAttr; - - attrInfo.count = 1; - attrInfo.tag = item; - attrInfo.format = attrFormat; - - ret = SecKeychainItemCopyAttributesAndData(itemRef, &attrInfo, NULL, - &attrs, &len, &ptr); - if (ret) - return EINVAL; - - ret = hx509_cert_init_data(context, ptr, len, cert); - if (ret) - goto out; - - /* - * Find related private key if there is one by looking at - * kSecPublicKeyHashItemAttr == kSecKeyLabel - */ - { - SecKeychainSearchRef search; - SecKeychainAttribute attrKeyid; - SecKeychainAttributeList attrList; - - attrKeyid.tag = kSecKeyLabel; - attrKeyid.length = attrs->attr[0].length; - attrKeyid.data = attrs->attr[0].data; - - attrList.count = 1; - attrList.attr = &attrKeyid; - - ret = SecKeychainSearchCreateFromAttributes(NULL, - CSSM_DL_DB_RECORD_PRIVATE_KEY, - &attrList, - &search); - if (ret) { - ret = 0; - goto out; - } - - ret = SecKeychainSearchCopyNext(search, &itemRef); - CFRelease(search); - if (ret == errSecItemNotFound) { - ret = 0; - goto out; - } else if (ret) { - ret = EINVAL; - goto out; - } - set_private_key(context, itemRef, *cert); - } - -out: - SecKeychainItemFreeAttributesAndData(attrs, ptr); - - return ret; -} - -/* - * - */ - -static int -keychain_iter_end(hx509_context context, - hx509_certs certs, - void *data, - void *cursor) -{ - struct iter *iter = cursor; - - if (iter->certs) { - hx509_certs_end_seq(context, iter->certs, iter->cursor); - hx509_certs_free(&iter->certs); - } else { - CFRelease(iter->searchRef); - } - - memset(iter, 0, sizeof(*iter)); - free(iter); - return 0; -} - -/* - * - */ - -struct hx509_keyset_ops keyset_keychain = { - "KEYCHAIN", - 0, - keychain_init, - NULL, - keychain_free, - NULL, - NULL, - keychain_iter_start, - keychain_iter, - keychain_iter_end -}; - -#endif /* HAVE_FRAMEWORK_SECURITY */ - -/* - * - */ - -void -_hx509_ks_keychain_register(hx509_context context) -{ -#ifdef HAVE_FRAMEWORK_SECURITY - _hx509_ks_register(context, &keyset_keychain); -#endif -} diff --git a/kerberosV/src/lib/hx509/ks_mem.c b/kerberosV/src/lib/hx509/ks_mem.c deleted file mode 100644 index 684acb0adf3..00000000000 --- a/kerberosV/src/lib/hx509/ks_mem.c +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) 2005 - 2006 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 "hx_locl.h" - -/* - * Should use two hash/tree certificates intead of a array. Criteria - * should be subject and subjectKeyIdentifier since those two are - * commonly seached on in CMS and path building. - */ - -struct mem_data { - char *name; - struct { - unsigned long len; - hx509_cert *val; - } certs; - hx509_private_key *keys; -}; - -static int -mem_init(hx509_context context, - hx509_certs certs, void **data, int flags, - const char *residue, hx509_lock lock) -{ - struct mem_data *mem; - mem = calloc(1, sizeof(*mem)); - if (mem == NULL) - return ENOMEM; - if (residue == NULL || residue[0] == '\0') - residue = "anonymous"; - mem->name = strdup(residue); - if (mem->name == NULL) { - free(mem); - return ENOMEM; - } - *data = mem; - return 0; -} - -static int -mem_free(hx509_certs certs, void *data) -{ - struct mem_data *mem = data; - unsigned long i; - - for (i = 0; i < mem->certs.len; i++) - hx509_cert_free(mem->certs.val[i]); - free(mem->certs.val); - for (i = 0; mem->keys && mem->keys[i]; i++) - hx509_private_key_free(&mem->keys[i]); - free(mem->keys); - free(mem->name); - free(mem); - - return 0; -} - -static int -mem_add(hx509_context context, hx509_certs certs, void *data, hx509_cert c) -{ - struct mem_data *mem = data; - hx509_cert *val; - - val = realloc(mem->certs.val, - (mem->certs.len + 1) * sizeof(mem->certs.val[0])); - if (val == NULL) - return ENOMEM; - - mem->certs.val = val; - mem->certs.val[mem->certs.len] = hx509_cert_ref(c); - mem->certs.len++; - - return 0; -} - -static int -mem_iter_start(hx509_context context, - hx509_certs certs, - void *data, - void **cursor) -{ - unsigned long *iter = malloc(sizeof(*iter)); - - if (iter == NULL) - return ENOMEM; - - *iter = 0; - *cursor = iter; - - return 0; -} - -static int -mem_iter(hx509_context contexst, - hx509_certs certs, - void *data, - void *cursor, - hx509_cert *cert) -{ - unsigned long *iter = cursor; - struct mem_data *mem = data; - - if (*iter >= mem->certs.len) { - *cert = NULL; - return 0; - } - - *cert = hx509_cert_ref(mem->certs.val[*iter]); - (*iter)++; - return 0; -} - -static int -mem_iter_end(hx509_context context, - hx509_certs certs, - void *data, - void *cursor) -{ - free(cursor); - return 0; -} - -static int -mem_getkeys(hx509_context context, - hx509_certs certs, - void *data, - hx509_private_key **keys) -{ - struct mem_data *mem = data; - int i; - - for (i = 0; mem->keys && mem->keys[i]; i++) - ; - *keys = calloc(i + 1, sizeof(**keys)); - for (i = 0; mem->keys && mem->keys[i]; i++) { - (*keys)[i] = _hx509_private_key_ref(mem->keys[i]); - if ((*keys)[i] == NULL) { - while (--i >= 0) - hx509_private_key_free(&(*keys)[i]); - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - } - (*keys)[i] = NULL; - return 0; -} - -static int -mem_addkey(hx509_context context, - hx509_certs certs, - void *data, - hx509_private_key key) -{ - struct mem_data *mem = data; - void *ptr; - int i; - - for (i = 0; mem->keys && mem->keys[i]; i++) - ; - ptr = realloc(mem->keys, (i + 2) * sizeof(*mem->keys)); - if (ptr == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - mem->keys = ptr; - mem->keys[i] = _hx509_private_key_ref(key); - mem->keys[i + 1] = NULL; - return 0; -} - - -static struct hx509_keyset_ops keyset_mem = { - "MEMORY", - 0, - mem_init, - NULL, - mem_free, - mem_add, - NULL, - mem_iter_start, - mem_iter, - mem_iter_end, - NULL, - mem_getkeys, - mem_addkey -}; - -void -_hx509_ks_mem_register(hx509_context context) -{ - _hx509_ks_register(context, &keyset_mem); -} diff --git a/kerberosV/src/lib/hx509/ks_null.c b/kerberosV/src/lib/hx509/ks_null.c deleted file mode 100644 index 136d2d43459..00000000000 --- a/kerberosV/src/lib/hx509/ks_null.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2005 - 2006 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 "hx_locl.h" - - -static int -null_init(hx509_context context, - hx509_certs certs, void **data, int flags, - const char *residue, hx509_lock lock) -{ - *data = NULL; - return 0; -} - -static int -null_free(hx509_certs certs, void *data) -{ - assert(data == NULL); - return 0; -} - -static int -null_iter_start(hx509_context context, - hx509_certs certs, void *data, void **cursor) -{ - *cursor = NULL; - return 0; -} - -static int -null_iter(hx509_context context, - hx509_certs certs, void *data, void *iter, hx509_cert *cert) -{ - *cert = NULL; - return ENOENT; -} - -static int -null_iter_end(hx509_context context, - hx509_certs certs, - void *data, - void *cursor) -{ - assert(cursor == NULL); - return 0; -} - - -struct hx509_keyset_ops keyset_null = { - "NULL", - 0, - null_init, - NULL, - null_free, - NULL, - NULL, - null_iter_start, - null_iter, - null_iter_end -}; - -void -_hx509_ks_null_register(hx509_context context) -{ - _hx509_ks_register(context, &keyset_null); -} diff --git a/kerberosV/src/lib/hx509/ks_p11.c b/kerberosV/src/lib/hx509/ks_p11.c deleted file mode 100644 index 120bf43ef43..00000000000 --- a/kerberosV/src/lib/hx509/ks_p11.c +++ /dev/null @@ -1,1190 +0,0 @@ -/* - * Copyright (c) 2004 - 2008 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 "hx_locl.h" -#ifdef HAVE_DLFCN_H -#include -#endif - -#ifdef HAVE_DLOPEN - -#include "pkcs11.h" - -struct p11_slot { - int flags; -#define P11_SESSION 1 -#define P11_SESSION_IN_USE 2 -#define P11_LOGIN_REQ 4 -#define P11_LOGIN_DONE 8 -#define P11_TOKEN_PRESENT 16 - CK_SESSION_HANDLE session; - CK_SLOT_ID id; - CK_BBOOL token; - char *name; - hx509_certs certs; - char *pin; - struct { - CK_MECHANISM_TYPE_PTR list; - CK_ULONG num; - CK_MECHANISM_INFO_PTR *infos; - } mechs; -}; - -struct p11_module { - void *dl_handle; - CK_FUNCTION_LIST_PTR funcs; - CK_ULONG num_slots; - unsigned int ref; - struct p11_slot *slot; -}; - -#define P11FUNC(module,f,args) (*(module)->funcs->C_##f)args - -static int p11_get_session(hx509_context, - struct p11_module *, - struct p11_slot *, - hx509_lock, - CK_SESSION_HANDLE *); -static int p11_put_session(struct p11_module *, - struct p11_slot *, - CK_SESSION_HANDLE); -static void p11_release_module(struct p11_module *); - -static int p11_list_keys(hx509_context, - struct p11_module *, - struct p11_slot *, - CK_SESSION_HANDLE, - hx509_lock, - hx509_certs *); - -/* - * - */ - -struct p11_rsa { - struct p11_module *p; - struct p11_slot *slot; - CK_OBJECT_HANDLE private_key; - CK_OBJECT_HANDLE public_key; -}; - -static int -p11_rsa_public_encrypt(int flen, - const unsigned char *from, - unsigned char *to, - RSA *rsa, - int padding) -{ - return -1; -} - -static int -p11_rsa_public_decrypt(int flen, - const unsigned char *from, - unsigned char *to, - RSA *rsa, - int padding) -{ - return -1; -} - - -static int -p11_rsa_private_encrypt(int flen, - const unsigned char *from, - unsigned char *to, - RSA *rsa, - int padding) -{ - struct p11_rsa *p11rsa = RSA_get_app_data(rsa); - CK_OBJECT_HANDLE key = p11rsa->private_key; - CK_SESSION_HANDLE session; - CK_MECHANISM mechanism; - CK_ULONG ck_sigsize; - int ret; - - if (padding != RSA_PKCS1_PADDING) - return -1; - - memset(&mechanism, 0, sizeof(mechanism)); - mechanism.mechanism = CKM_RSA_PKCS; - - ck_sigsize = RSA_size(rsa); - - ret = p11_get_session(NULL, p11rsa->p, p11rsa->slot, NULL, &session); - if (ret) - return -1; - - ret = P11FUNC(p11rsa->p, SignInit, (session, &mechanism, key)); - if (ret != CKR_OK) { - p11_put_session(p11rsa->p, p11rsa->slot, session); - return -1; - } - - ret = P11FUNC(p11rsa->p, Sign, - (session, (CK_BYTE *)(intptr_t)from, flen, to, &ck_sigsize)); - p11_put_session(p11rsa->p, p11rsa->slot, session); - if (ret != CKR_OK) - return -1; - - return ck_sigsize; -} - -static int -p11_rsa_private_decrypt(int flen, const unsigned char *from, unsigned char *to, - RSA * rsa, int padding) -{ - struct p11_rsa *p11rsa = RSA_get_app_data(rsa); - CK_OBJECT_HANDLE key = p11rsa->private_key; - CK_SESSION_HANDLE session; - CK_MECHANISM mechanism; - CK_ULONG ck_sigsize; - int ret; - - if (padding != RSA_PKCS1_PADDING) - return -1; - - memset(&mechanism, 0, sizeof(mechanism)); - mechanism.mechanism = CKM_RSA_PKCS; - - ck_sigsize = RSA_size(rsa); - - ret = p11_get_session(NULL, p11rsa->p, p11rsa->slot, NULL, &session); - if (ret) - return -1; - - ret = P11FUNC(p11rsa->p, DecryptInit, (session, &mechanism, key)); - if (ret != CKR_OK) { - p11_put_session(p11rsa->p, p11rsa->slot, session); - return -1; - } - - ret = P11FUNC(p11rsa->p, Decrypt, - (session, (CK_BYTE *)(intptr_t)from, flen, to, &ck_sigsize)); - p11_put_session(p11rsa->p, p11rsa->slot, session); - if (ret != CKR_OK) - return -1; - - return ck_sigsize; -} - -static int -p11_rsa_init(RSA *rsa) -{ - return 1; -} - -static int -p11_rsa_finish(RSA *rsa) -{ - struct p11_rsa *p11rsa = RSA_get_app_data(rsa); - p11_release_module(p11rsa->p); - free(p11rsa); - return 1; -} - -static const RSA_METHOD p11_rsa_pkcs1_method = { - "hx509 PKCS11 PKCS#1 RSA", - p11_rsa_public_encrypt, - p11_rsa_public_decrypt, - p11_rsa_private_encrypt, - p11_rsa_private_decrypt, - NULL, - NULL, - p11_rsa_init, - p11_rsa_finish, - 0, - NULL, - NULL, - NULL -}; - -/* - * - */ - -static int -p11_mech_info(hx509_context context, - struct p11_module *p, - struct p11_slot *slot, - int num) -{ - CK_ULONG i; - int ret; - - ret = P11FUNC(p, GetMechanismList, (slot->id, NULL_PTR, &i)); - if (ret) { - hx509_set_error_string(context, 0, HX509_PKCS11_NO_MECH, - "Failed to get mech list count for slot %d", - num); - return HX509_PKCS11_NO_MECH; - } - if (i == 0) { - hx509_set_error_string(context, 0, HX509_PKCS11_NO_MECH, - "no mech supported for slot %d", num); - return HX509_PKCS11_NO_MECH; - } - slot->mechs.list = calloc(i, sizeof(slot->mechs.list[0])); - if (slot->mechs.list == NULL) { - hx509_set_error_string(context, 0, ENOMEM, - "out of memory"); - return ENOMEM; - } - slot->mechs.num = i; - ret = P11FUNC(p, GetMechanismList, (slot->id, slot->mechs.list, &i)); - if (ret) { - hx509_set_error_string(context, 0, HX509_PKCS11_NO_MECH, - "Failed to get mech list for slot %d", - num); - return HX509_PKCS11_NO_MECH; - } - assert(i == slot->mechs.num); - - slot->mechs.infos = calloc(i, sizeof(*slot->mechs.infos)); - if (slot->mechs.list == NULL) { - hx509_set_error_string(context, 0, ENOMEM, - "out of memory"); - return ENOMEM; - } - - for (i = 0; i < slot->mechs.num; i++) { - slot->mechs.infos[i] = calloc(1, sizeof(*(slot->mechs.infos[0]))); - if (slot->mechs.infos[i] == NULL) { - hx509_set_error_string(context, 0, ENOMEM, - "out of memory"); - return ENOMEM; - } - ret = P11FUNC(p, GetMechanismInfo, (slot->id, slot->mechs.list[i], - slot->mechs.infos[i])); - if (ret) { - hx509_set_error_string(context, 0, HX509_PKCS11_NO_MECH, - "Failed to get mech info for slot %d", - num); - return HX509_PKCS11_NO_MECH; - } - } - - return 0; -} - -static int -p11_init_slot(hx509_context context, - struct p11_module *p, - hx509_lock lock, - CK_SLOT_ID id, - int num, - struct p11_slot *slot) -{ - CK_SESSION_HANDLE session; - CK_SLOT_INFO slot_info; - CK_TOKEN_INFO token_info; - size_t i; - int ret; - - slot->certs = NULL; - slot->id = id; - - ret = P11FUNC(p, GetSlotInfo, (slot->id, &slot_info)); - if (ret) { - hx509_set_error_string(context, 0, HX509_PKCS11_TOKEN_CONFUSED, - "Failed to init PKCS11 slot %d", - num); - return HX509_PKCS11_TOKEN_CONFUSED; - } - - for (i = sizeof(slot_info.slotDescription) - 1; i > 0; i--) { - char c = slot_info.slotDescription[i]; - if (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\0') - continue; - i++; - break; - } - - asprintf(&slot->name, "%.*s", - (int)i, slot_info.slotDescription); - - if ((slot_info.flags & CKF_TOKEN_PRESENT) == 0) - return 0; - - ret = P11FUNC(p, GetTokenInfo, (slot->id, &token_info)); - if (ret) { - hx509_set_error_string(context, 0, HX509_PKCS11_NO_TOKEN, - "Failed to init PKCS11 slot %d " - "with error 0x08x", - num, ret); - return HX509_PKCS11_NO_TOKEN; - } - slot->flags |= P11_TOKEN_PRESENT; - - if (token_info.flags & CKF_LOGIN_REQUIRED) - slot->flags |= P11_LOGIN_REQ; - - ret = p11_get_session(context, p, slot, lock, &session); - if (ret) - return ret; - - ret = p11_mech_info(context, p, slot, num); - if (ret) - goto out; - - ret = p11_list_keys(context, p, slot, session, lock, &slot->certs); - out: - p11_put_session(p, slot, session); - - return ret; -} - -static int -p11_get_session(hx509_context context, - struct p11_module *p, - struct p11_slot *slot, - hx509_lock lock, - CK_SESSION_HANDLE *psession) -{ - CK_RV ret; - - if (slot->flags & P11_SESSION_IN_USE) - _hx509_abort("slot already in session"); - - if (slot->flags & P11_SESSION) { - slot->flags |= P11_SESSION_IN_USE; - *psession = slot->session; - return 0; - } - - ret = P11FUNC(p, OpenSession, (slot->id, - CKF_SERIAL_SESSION, - NULL, - NULL, - &slot->session)); - if (ret != CKR_OK) { - if (context) - hx509_set_error_string(context, 0, HX509_PKCS11_OPEN_SESSION, - "Failed to OpenSession for slot id %d " - "with error: 0x%08x", - (int)slot->id, ret); - return HX509_PKCS11_OPEN_SESSION; - } - - slot->flags |= P11_SESSION; - - /* - * If we have have to login, and haven't tried before and have a - * prompter or known to work pin code. - * - * This code is very conversative and only uses the prompter in - * the hx509_lock, the reason is that it's bad to try many - * passwords on a pkcs11 token, it might lock up and have to be - * unlocked by a administrator. - * - * XXX try harder to not use pin several times on the same card. - */ - - if ( (slot->flags & P11_LOGIN_REQ) - && (slot->flags & P11_LOGIN_DONE) == 0 - && (lock || slot->pin)) - { - hx509_prompt prompt; - char pin[20]; - char *str; - - if (slot->pin == NULL) { - - memset(&prompt, 0, sizeof(prompt)); - - asprintf(&str, "PIN code for %s: ", slot->name); - prompt.prompt = str; - prompt.type = HX509_PROMPT_TYPE_PASSWORD; - prompt.reply.data = pin; - prompt.reply.length = sizeof(pin); - - ret = hx509_lock_prompt(lock, &prompt); - if (ret) { - free(str); - if (context) - hx509_set_error_string(context, 0, ret, - "Failed to get pin code for slot " - "id %d with error: %d", - (int)slot->id, ret); - return ret; - } - free(str); - } else { - strlcpy(pin, slot->pin, sizeof(pin)); - } - - ret = P11FUNC(p, Login, (slot->session, CKU_USER, - (unsigned char*)pin, strlen(pin))); - if (ret != CKR_OK) { - if (context) - hx509_set_error_string(context, 0, HX509_PKCS11_LOGIN, - "Failed to login on slot id %d " - "with error: 0x%08x", - (int)slot->id, ret); - return HX509_PKCS11_LOGIN; - } else - slot->flags |= P11_LOGIN_DONE; - - if (slot->pin == NULL) { - slot->pin = strdup(pin); - if (slot->pin == NULL) { - if (context) - hx509_set_error_string(context, 0, ENOMEM, - "out of memory"); - return ENOMEM; - } - } - } else - slot->flags |= P11_LOGIN_DONE; - - slot->flags |= P11_SESSION_IN_USE; - - *psession = slot->session; - - return 0; -} - -static int -p11_put_session(struct p11_module *p, - struct p11_slot *slot, - CK_SESSION_HANDLE session) -{ - if ((slot->flags & P11_SESSION_IN_USE) == 0) - _hx509_abort("slot not in session"); - slot->flags &= ~P11_SESSION_IN_USE; - - return 0; -} - -static int -iterate_entries(hx509_context context, - struct p11_module *p, struct p11_slot *slot, - CK_SESSION_HANDLE session, - CK_ATTRIBUTE *search_data, int num_search_data, - CK_ATTRIBUTE *query, int num_query, - int (*func)(hx509_context, - struct p11_module *, struct p11_slot *, - CK_SESSION_HANDLE session, - CK_OBJECT_HANDLE object, - void *, CK_ATTRIBUTE *, int), void *ptr) -{ - CK_OBJECT_HANDLE object; - CK_ULONG object_count; - int ret, ret2, i; - - ret = P11FUNC(p, FindObjectsInit, (session, search_data, num_search_data)); - if (ret != CKR_OK) { - return -1; - } - while (1) { - ret = P11FUNC(p, FindObjects, (session, &object, 1, &object_count)); - if (ret != CKR_OK) { - return -1; - } - if (object_count == 0) - break; - - for (i = 0; i < num_query; i++) - query[i].pValue = NULL; - - ret = P11FUNC(p, GetAttributeValue, - (session, object, query, num_query)); - if (ret != CKR_OK) { - return -1; - } - for (i = 0; i < num_query; i++) { - query[i].pValue = malloc(query[i].ulValueLen); - if (query[i].pValue == NULL) { - ret = ENOMEM; - goto out; - } - } - ret = P11FUNC(p, GetAttributeValue, - (session, object, query, num_query)); - if (ret != CKR_OK) { - ret = -1; - goto out; - } - - ret = (*func)(context, p, slot, session, object, ptr, query, num_query); - if (ret) - goto out; - - for (i = 0; i < num_query; i++) { - if (query[i].pValue) - free(query[i].pValue); - query[i].pValue = NULL; - } - } - out: - - for (i = 0; i < num_query; i++) { - if (query[i].pValue) - free(query[i].pValue); - query[i].pValue = NULL; - } - - ret2 = P11FUNC(p, FindObjectsFinal, (session)); - if (ret2 != CKR_OK) { - return ret2; - } - - return ret; -} - -static BIGNUM * -getattr_bn(struct p11_module *p, - struct p11_slot *slot, - CK_SESSION_HANDLE session, - CK_OBJECT_HANDLE object, - unsigned int type) -{ - CK_ATTRIBUTE query; - BIGNUM *bn; - int ret; - - query.type = type; - query.pValue = NULL; - query.ulValueLen = 0; - - ret = P11FUNC(p, GetAttributeValue, - (session, object, &query, 1)); - if (ret != CKR_OK) - return NULL; - - query.pValue = malloc(query.ulValueLen); - - ret = P11FUNC(p, GetAttributeValue, - (session, object, &query, 1)); - if (ret != CKR_OK) { - free(query.pValue); - return NULL; - } - bn = BN_bin2bn(query.pValue, query.ulValueLen, NULL); - free(query.pValue); - - return bn; -} - -static int -collect_private_key(hx509_context context, - struct p11_module *p, struct p11_slot *slot, - CK_SESSION_HANDLE session, - CK_OBJECT_HANDLE object, - void *ptr, CK_ATTRIBUTE *query, int num_query) -{ - struct hx509_collector *collector = ptr; - hx509_private_key key; - heim_octet_string localKeyId; - int ret; - RSA *rsa; - struct p11_rsa *p11rsa; - - localKeyId.data = query[0].pValue; - localKeyId.length = query[0].ulValueLen; - - ret = hx509_private_key_init(&key, NULL, NULL); - if (ret) - return ret; - - rsa = RSA_new(); - if (rsa == NULL) - _hx509_abort("out of memory"); - - /* - * The exponent and modulus should always be present according to - * the pkcs11 specification, but some smartcards leaves it out, - * let ignore any failure to fetch it. - */ - rsa->n = getattr_bn(p, slot, session, object, CKA_MODULUS); - rsa->e = getattr_bn(p, slot, session, object, CKA_PUBLIC_EXPONENT); - - p11rsa = calloc(1, sizeof(*p11rsa)); - if (p11rsa == NULL) - _hx509_abort("out of memory"); - - p11rsa->p = p; - p11rsa->slot = slot; - p11rsa->private_key = object; - - if (p->ref == 0) - _hx509_abort("pkcs11 ref == 0 on alloc"); - p->ref++; - if (p->ref == UINT_MAX) - _hx509_abort("pkcs11 ref == UINT_MAX on alloc"); - - RSA_set_method(rsa, &p11_rsa_pkcs1_method); - ret = RSA_set_app_data(rsa, p11rsa); - if (ret != 1) - _hx509_abort("RSA_set_app_data"); - - hx509_private_key_assign_rsa(key, rsa); - - ret = _hx509_collector_private_key_add(context, - collector, - hx509_signature_rsa(), - key, - NULL, - &localKeyId); - - if (ret) { - hx509_private_key_free(&key); - return ret; - } - return 0; -} - -static void -p11_cert_release(hx509_cert cert, void *ctx) -{ - struct p11_module *p = ctx; - p11_release_module(p); -} - - -static int -collect_cert(hx509_context context, - struct p11_module *p, struct p11_slot *slot, - CK_SESSION_HANDLE session, - CK_OBJECT_HANDLE object, - void *ptr, CK_ATTRIBUTE *query, int num_query) -{ - struct hx509_collector *collector = ptr; - hx509_cert cert; - int ret; - - if ((CK_LONG)query[0].ulValueLen == -1 || - (CK_LONG)query[1].ulValueLen == -1) - { - return 0; - } - - ret = hx509_cert_init_data(context, query[1].pValue, - query[1].ulValueLen, &cert); - if (ret) - return ret; - - if (p->ref == 0) - _hx509_abort("pkcs11 ref == 0 on alloc"); - p->ref++; - if (p->ref == UINT_MAX) - _hx509_abort("pkcs11 ref to high"); - - _hx509_cert_set_release(cert, p11_cert_release, p); - - { - heim_octet_string data; - - data.data = query[0].pValue; - data.length = query[0].ulValueLen; - - _hx509_set_cert_attribute(context, - cert, - &asn1_oid_id_pkcs_9_at_localKeyId, - &data); - } - - if ((CK_LONG)query[2].ulValueLen != -1) { - char *str; - - asprintf(&str, "%.*s", - (int)query[2].ulValueLen, (char *)query[2].pValue); - if (str) { - hx509_cert_set_friendly_name(cert, str); - free(str); - } - } - - ret = _hx509_collector_certs_add(context, collector, cert); - hx509_cert_free(cert); - - return ret; -} - - -static int -p11_list_keys(hx509_context context, - struct p11_module *p, - struct p11_slot *slot, - CK_SESSION_HANDLE session, - hx509_lock lock, - hx509_certs *certs) -{ - struct hx509_collector *collector; - CK_OBJECT_CLASS key_class; - CK_ATTRIBUTE search_data[] = { - {CKA_CLASS, NULL, 0}, - }; - CK_ATTRIBUTE query_data[3] = { - {CKA_ID, NULL, 0}, - {CKA_VALUE, NULL, 0}, - {CKA_LABEL, NULL, 0} - }; - int ret; - - search_data[0].pValue = &key_class; - search_data[0].ulValueLen = sizeof(key_class); - - if (lock == NULL) - lock = _hx509_empty_lock; - - ret = _hx509_collector_alloc(context, lock, &collector); - if (ret) - return ret; - - key_class = CKO_PRIVATE_KEY; - ret = iterate_entries(context, p, slot, session, - search_data, 1, - query_data, 1, - collect_private_key, collector); - if (ret) - goto out; - - key_class = CKO_CERTIFICATE; - ret = iterate_entries(context, p, slot, session, - search_data, 1, - query_data, 3, - collect_cert, collector); - if (ret) - goto out; - - ret = _hx509_collector_collect_certs(context, collector, &slot->certs); - -out: - _hx509_collector_free(collector); - - return ret; -} - - -static int -p11_init(hx509_context context, - hx509_certs certs, void **data, int flags, - const char *residue, hx509_lock lock) -{ - CK_C_GetFunctionList getFuncs; - struct p11_module *p; - char *list, *str; - int ret; - - *data = NULL; - - list = strdup(residue); - if (list == NULL) - return ENOMEM; - - p = calloc(1, sizeof(*p)); - if (p == NULL) { - free(list); - return ENOMEM; - } - - p->ref = 1; - - str = strchr(list, ','); - if (str) - *str++ = '\0'; - while (str) { - char *strnext; - strnext = strchr(str, ','); - if (strnext) - *strnext++ = '\0'; -#if 0 - if (strncasecmp(str, "slot=", 5) == 0) - p->selected_slot = atoi(str + 5); -#endif - str = strnext; - } - - p->dl_handle = dlopen(list, RTLD_NOW); - free(list); - if (p->dl_handle == NULL) { - ret = HX509_PKCS11_LOAD; - hx509_set_error_string(context, 0, ret, - "Failed to open %s: %s", list, dlerror()); - goto out; - } - - getFuncs = (CK_C_GetFunctionList) dlsym(p->dl_handle, "C_GetFunctionList"); - if (getFuncs == NULL) { - ret = HX509_PKCS11_LOAD; - hx509_set_error_string(context, 0, ret, - "C_GetFunctionList missing in %s: %s", - list, dlerror()); - goto out; - } - - ret = (*getFuncs)(&p->funcs); - if (ret) { - ret = HX509_PKCS11_LOAD; - hx509_set_error_string(context, 0, ret, - "C_GetFunctionList failed in %s", list); - goto out; - } - - ret = P11FUNC(p, Initialize, (NULL_PTR)); - if (ret != CKR_OK) { - ret = HX509_PKCS11_TOKEN_CONFUSED; - hx509_set_error_string(context, 0, ret, - "Failed initialize the PKCS11 module"); - goto out; - } - - ret = P11FUNC(p, GetSlotList, (FALSE, NULL, &p->num_slots)); - if (ret) { - ret = HX509_PKCS11_TOKEN_CONFUSED; - hx509_set_error_string(context, 0, ret, - "Failed to get number of PKCS11 slots"); - goto out; - } - - if (p->num_slots == 0) { - ret = HX509_PKCS11_NO_SLOT; - hx509_set_error_string(context, 0, ret, - "Selected PKCS11 module have no slots"); - goto out; - } - - - { - CK_SLOT_ID_PTR slot_ids; - int num_tokens = 0; - size_t i; - - slot_ids = malloc(p->num_slots * sizeof(*slot_ids)); - if (slot_ids == NULL) { - hx509_clear_error_string(context); - ret = ENOMEM; - goto out; - } - - ret = P11FUNC(p, GetSlotList, (FALSE, slot_ids, &p->num_slots)); - if (ret) { - free(slot_ids); - hx509_set_error_string(context, 0, HX509_PKCS11_TOKEN_CONFUSED, - "Failed getting slot-list from " - "PKCS11 module"); - ret = HX509_PKCS11_TOKEN_CONFUSED; - goto out; - } - - p->slot = calloc(p->num_slots, sizeof(p->slot[0])); - if (p->slot == NULL) { - free(slot_ids); - hx509_set_error_string(context, 0, ENOMEM, - "Failed to get memory for slot-list"); - ret = ENOMEM; - goto out; - } - - for (i = 0; i < p->num_slots; i++) { - ret = p11_init_slot(context, p, lock, slot_ids[i], i, &p->slot[i]); - if (ret) - break; - if (p->slot[i].flags & P11_TOKEN_PRESENT) - num_tokens++; - } - free(slot_ids); - if (ret) - goto out; - if (num_tokens == 0) { - ret = HX509_PKCS11_NO_TOKEN; - goto out; - } - } - - *data = p; - - return 0; - out: - p11_release_module(p); - return ret; -} - -static void -p11_release_module(struct p11_module *p) -{ - size_t i; - - if (p->ref == 0) - _hx509_abort("pkcs11 ref to low"); - if (--p->ref > 0) - return; - - for (i = 0; i < p->num_slots; i++) { - if (p->slot[i].flags & P11_SESSION_IN_USE) - _hx509_abort("pkcs11 module release while session in use"); - if (p->slot[i].flags & P11_SESSION) { - P11FUNC(p, CloseSession, (p->slot[i].session)); - } - - if (p->slot[i].name) - free(p->slot[i].name); - if (p->slot[i].pin) { - memset(p->slot[i].pin, 0, strlen(p->slot[i].pin)); - free(p->slot[i].pin); - } - if (p->slot[i].mechs.num) { - free(p->slot[i].mechs.list); - - if (p->slot[i].mechs.infos) { - size_t j; - - for (j = 0 ; j < p->slot[i].mechs.num ; j++) - free(p->slot[i].mechs.infos[j]); - free(p->slot[i].mechs.infos); - } - } - } - free(p->slot); - - if (p->funcs) - P11FUNC(p, Finalize, (NULL)); - - if (p->dl_handle) - dlclose(p->dl_handle); - - memset(p, 0, sizeof(*p)); - free(p); -} - -static int -p11_free(hx509_certs certs, void *data) -{ - struct p11_module *p = data; - size_t i; - - for (i = 0; i < p->num_slots; i++) { - if (p->slot[i].certs) - hx509_certs_free(&p->slot[i].certs); - } - p11_release_module(p); - return 0; -} - -struct p11_cursor { - hx509_certs certs; - void *cursor; -}; - -static int -p11_iter_start(hx509_context context, - hx509_certs certs, void *data, void **cursor) -{ - struct p11_module *p = data; - struct p11_cursor *c; - int ret; - size_t i; - - c = malloc(sizeof(*c)); - if (c == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - ret = hx509_certs_init(context, "MEMORY:pkcs11-iter", 0, NULL, &c->certs); - if (ret) { - free(c); - return ret; - } - - for (i = 0 ; i < p->num_slots; i++) { - if (p->slot[i].certs == NULL) - continue; - ret = hx509_certs_merge(context, c->certs, p->slot[i].certs); - if (ret) { - hx509_certs_free(&c->certs); - free(c); - return ret; - } - } - - ret = hx509_certs_start_seq(context, c->certs, &c->cursor); - if (ret) { - hx509_certs_free(&c->certs); - free(c); - return 0; - } - *cursor = c; - - return 0; -} - -static int -p11_iter(hx509_context context, - hx509_certs certs, void *data, void *cursor, hx509_cert *cert) -{ - struct p11_cursor *c = cursor; - return hx509_certs_next_cert(context, c->certs, c->cursor, cert); -} - -static int -p11_iter_end(hx509_context context, - hx509_certs certs, void *data, void *cursor) -{ - struct p11_cursor *c = cursor; - int ret; - ret = hx509_certs_end_seq(context, c->certs, c->cursor); - hx509_certs_free(&c->certs); - free(c); - return ret; -} - -#define MECHFLAG(x) { "unknown-flag-" #x, x } -static struct units mechflags[] = { - MECHFLAG(0x80000000), - MECHFLAG(0x40000000), - MECHFLAG(0x20000000), - MECHFLAG(0x10000000), - MECHFLAG(0x08000000), - MECHFLAG(0x04000000), - {"ec-compress", 0x2000000 }, - {"ec-uncompress", 0x1000000 }, - {"ec-namedcurve", 0x0800000 }, - {"ec-ecparameters", 0x0400000 }, - {"ec-f-2m", 0x0200000 }, - {"ec-f-p", 0x0100000 }, - {"derive", 0x0080000 }, - {"unwrap", 0x0040000 }, - {"wrap", 0x0020000 }, - {"genereate-key-pair", 0x0010000 }, - {"generate", 0x0008000 }, - {"verify-recover", 0x0004000 }, - {"verify", 0x0002000 }, - {"sign-recover", 0x0001000 }, - {"sign", 0x0000800 }, - {"digest", 0x0000400 }, - {"decrypt", 0x0000200 }, - {"encrypt", 0x0000100 }, - MECHFLAG(0x00080), - MECHFLAG(0x00040), - MECHFLAG(0x00020), - MECHFLAG(0x00010), - MECHFLAG(0x00008), - MECHFLAG(0x00004), - MECHFLAG(0x00002), - {"hw", 0x0000001 }, - { NULL, 0x0000000 } -}; -#undef MECHFLAG - -static int -p11_printinfo(hx509_context context, - hx509_certs certs, - void *data, - int (*func)(void *, const char *), - void *ctx) -{ - struct p11_module *p = data; - size_t i, j; - - _hx509_pi_printf(func, ctx, "pkcs11 driver with %d slot%s", - p->num_slots, p->num_slots > 1 ? "s" : ""); - - for (i = 0; i < p->num_slots; i++) { - struct p11_slot *s = &p->slot[i]; - - _hx509_pi_printf(func, ctx, "slot %d: id: %d name: %s flags: %08x", - i, (int)s->id, s->name, s->flags); - - _hx509_pi_printf(func, ctx, "number of supported mechanisms: %lu", - (unsigned long)s->mechs.num); - for (j = 0; j < s->mechs.num; j++) { - const char *mechname = "unknown"; - char flags[256], unknownname[40]; -#define MECHNAME(s,n) case s: mechname = n; break - switch(s->mechs.list[j]) { - MECHNAME(CKM_RSA_PKCS_KEY_PAIR_GEN, "rsa-pkcs-key-pair-gen"); - MECHNAME(CKM_RSA_PKCS, "rsa-pkcs"); - MECHNAME(CKM_RSA_X_509, "rsa-x-509"); - MECHNAME(CKM_MD5_RSA_PKCS, "md5-rsa-pkcs"); - MECHNAME(CKM_SHA1_RSA_PKCS, "sha1-rsa-pkcs"); - MECHNAME(CKM_SHA256_RSA_PKCS, "sha256-rsa-pkcs"); - MECHNAME(CKM_SHA384_RSA_PKCS, "sha384-rsa-pkcs"); - MECHNAME(CKM_SHA512_RSA_PKCS, "sha512-rsa-pkcs"); - MECHNAME(CKM_RIPEMD160_RSA_PKCS, "ripemd160-rsa-pkcs"); - MECHNAME(CKM_RSA_PKCS_OAEP, "rsa-pkcs-oaep"); - MECHNAME(CKM_SHA512_HMAC, "sha512-hmac"); - MECHNAME(CKM_SHA512, "sha512"); - MECHNAME(CKM_SHA384_HMAC, "sha384-hmac"); - MECHNAME(CKM_SHA384, "sha384"); - MECHNAME(CKM_SHA256_HMAC, "sha256-hmac"); - MECHNAME(CKM_SHA256, "sha256"); - MECHNAME(CKM_SHA_1, "sha1"); - MECHNAME(CKM_MD5, "md5"); - MECHNAME(CKM_RIPEMD160, "ripemd-160"); - MECHNAME(CKM_DES_ECB, "des-ecb"); - MECHNAME(CKM_DES_CBC, "des-cbc"); - MECHNAME(CKM_AES_ECB, "aes-ecb"); - MECHNAME(CKM_AES_CBC, "aes-cbc"); - MECHNAME(CKM_DH_PKCS_PARAMETER_GEN, "dh-pkcs-parameter-gen"); - default: - snprintf(unknownname, sizeof(unknownname), - "unknown-mech-%lu", - (unsigned long)s->mechs.list[j]); - mechname = unknownname; - break; - } -#undef MECHNAME - unparse_flags(s->mechs.infos[j]->flags, mechflags, - flags, sizeof(flags)); - - _hx509_pi_printf(func, ctx, " %s: %s", mechname, flags); - } - } - - return 0; -} - -static struct hx509_keyset_ops keyset_pkcs11 = { - "PKCS11", - 0, - p11_init, - NULL, - p11_free, - NULL, - NULL, - p11_iter_start, - p11_iter, - p11_iter_end, - p11_printinfo -}; - -#endif /* HAVE_DLOPEN */ - -void -_hx509_ks_pkcs11_register(hx509_context context) -{ -#ifdef HAVE_DLOPEN - _hx509_ks_register(context, &keyset_pkcs11); -#endif -} diff --git a/kerberosV/src/lib/hx509/ks_p12.c b/kerberosV/src/lib/hx509/ks_p12.c deleted file mode 100644 index 0ca13de1eb3..00000000000 --- a/kerberosV/src/lib/hx509/ks_p12.c +++ /dev/null @@ -1,707 +0,0 @@ -/* - * Copyright (c) 2004 - 2007 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 "hx_locl.h" - -struct ks_pkcs12 { - hx509_certs certs; - char *fn; -}; - -typedef int (*collector_func)(hx509_context, - struct hx509_collector *, - const void *, size_t, - const PKCS12_Attributes *); - -struct type { - const heim_oid *oid; - collector_func func; -}; - -static void -parse_pkcs12_type(hx509_context, struct hx509_collector *, const heim_oid *, - const void *, size_t, const PKCS12_Attributes *); - - -static const PKCS12_Attribute * -find_attribute(const PKCS12_Attributes *attrs, const heim_oid *oid) -{ - size_t i; - if (attrs == NULL) - return NULL; - for (i = 0; i < attrs->len; i++) - if (der_heim_oid_cmp(oid, &attrs->val[i].attrId) == 0) - return &attrs->val[i]; - return NULL; -} - -static int -keyBag_parser(hx509_context context, - struct hx509_collector *c, - const void *data, size_t length, - const PKCS12_Attributes *attrs) -{ - const PKCS12_Attribute *attr; - PKCS8PrivateKeyInfo ki; - const heim_octet_string *os = NULL; - int ret; - - attr = find_attribute(attrs, &asn1_oid_id_pkcs_9_at_localKeyId); - if (attr) - os = &attr->attrValues; - - ret = decode_PKCS8PrivateKeyInfo(data, length, &ki, NULL); - if (ret) - return ret; - - _hx509_collector_private_key_add(context, - c, - &ki.privateKeyAlgorithm, - NULL, - &ki.privateKey, - os); - free_PKCS8PrivateKeyInfo(&ki); - return 0; -} - -static int -ShroudedKeyBag_parser(hx509_context context, - struct hx509_collector *c, - const void *data, size_t length, - const PKCS12_Attributes *attrs) -{ - PKCS8EncryptedPrivateKeyInfo pk; - heim_octet_string content; - int ret; - - memset(&pk, 0, sizeof(pk)); - - ret = decode_PKCS8EncryptedPrivateKeyInfo(data, length, &pk, NULL); - if (ret) - return ret; - - ret = _hx509_pbe_decrypt(context, - _hx509_collector_get_lock(c), - &pk.encryptionAlgorithm, - &pk.encryptedData, - &content); - free_PKCS8EncryptedPrivateKeyInfo(&pk); - if (ret) - return ret; - - ret = keyBag_parser(context, c, content.data, content.length, attrs); - der_free_octet_string(&content); - return ret; -} - -static int -certBag_parser(hx509_context context, - struct hx509_collector *c, - const void *data, size_t length, - const PKCS12_Attributes *attrs) -{ - heim_octet_string os; - hx509_cert cert; - PKCS12_CertBag cb; - int ret; - - ret = decode_PKCS12_CertBag(data, length, &cb, NULL); - if (ret) - return ret; - - if (der_heim_oid_cmp(&asn1_oid_id_pkcs_9_at_certTypes_x509, &cb.certType)) { - free_PKCS12_CertBag(&cb); - return 0; - } - - ret = decode_PKCS12_OctetString(cb.certValue.data, - cb.certValue.length, - &os, - NULL); - free_PKCS12_CertBag(&cb); - if (ret) - return ret; - - ret = hx509_cert_init_data(context, os.data, os.length, &cert); - der_free_octet_string(&os); - if (ret) - return ret; - - ret = _hx509_collector_certs_add(context, c, cert); - if (ret) { - hx509_cert_free(cert); - return ret; - } - - { - const PKCS12_Attribute *attr; - const heim_oid *oids[] = { - &asn1_oid_id_pkcs_9_at_localKeyId, &asn1_oid_id_pkcs_9_at_friendlyName - }; - size_t i; - - for (i = 0; i < sizeof(oids)/sizeof(oids[0]); i++) { - const heim_oid *oid = oids[i]; - attr = find_attribute(attrs, oid); - if (attr) - _hx509_set_cert_attribute(context, cert, oid, - &attr->attrValues); - } - } - - hx509_cert_free(cert); - - return 0; -} - -static int -parse_safe_content(hx509_context context, - struct hx509_collector *c, - const unsigned char *p, size_t len) -{ - PKCS12_SafeContents sc; - int ret; - size_t i; - - memset(&sc, 0, sizeof(sc)); - - ret = decode_PKCS12_SafeContents(p, len, &sc, NULL); - if (ret) - return ret; - - for (i = 0; i < sc.len ; i++) - parse_pkcs12_type(context, - c, - &sc.val[i].bagId, - sc.val[i].bagValue.data, - sc.val[i].bagValue.length, - sc.val[i].bagAttributes); - - free_PKCS12_SafeContents(&sc); - return 0; -} - -static int -safeContent_parser(hx509_context context, - struct hx509_collector *c, - const void *data, size_t length, - const PKCS12_Attributes *attrs) -{ - heim_octet_string os; - int ret; - - ret = decode_PKCS12_OctetString(data, length, &os, NULL); - if (ret) - return ret; - ret = parse_safe_content(context, c, os.data, os.length); - der_free_octet_string(&os); - return ret; -} - -static int -encryptedData_parser(hx509_context context, - struct hx509_collector *c, - const void *data, size_t length, - const PKCS12_Attributes *attrs) -{ - heim_octet_string content; - heim_oid contentType; - int ret; - - memset(&contentType, 0, sizeof(contentType)); - - ret = hx509_cms_decrypt_encrypted(context, - _hx509_collector_get_lock(c), - data, length, - &contentType, - &content); - if (ret) - return ret; - - if (der_heim_oid_cmp(&contentType, &asn1_oid_id_pkcs7_data) == 0) - ret = parse_safe_content(context, c, content.data, content.length); - - der_free_octet_string(&content); - der_free_oid(&contentType); - return ret; -} - -static int -envelopedData_parser(hx509_context context, - struct hx509_collector *c, - const void *data, size_t length, - const PKCS12_Attributes *attrs) -{ - heim_octet_string content; - heim_oid contentType; - hx509_lock lock; - int ret; - - memset(&contentType, 0, sizeof(contentType)); - - lock = _hx509_collector_get_lock(c); - - ret = hx509_cms_unenvelope(context, - _hx509_lock_unlock_certs(lock), - 0, - data, length, - NULL, - 0, - &contentType, - &content); - if (ret) { - hx509_set_error_string(context, HX509_ERROR_APPEND, ret, - "PKCS12 failed to unenvelope"); - return ret; - } - - if (der_heim_oid_cmp(&contentType, &asn1_oid_id_pkcs7_data) == 0) - ret = parse_safe_content(context, c, content.data, content.length); - - der_free_octet_string(&content); - der_free_oid(&contentType); - - return ret; -} - - -struct type bagtypes[] = { - { &asn1_oid_id_pkcs12_keyBag, keyBag_parser }, - { &asn1_oid_id_pkcs12_pkcs8ShroudedKeyBag, ShroudedKeyBag_parser }, - { &asn1_oid_id_pkcs12_certBag, certBag_parser }, - { &asn1_oid_id_pkcs7_data, safeContent_parser }, - { &asn1_oid_id_pkcs7_encryptedData, encryptedData_parser }, - { &asn1_oid_id_pkcs7_envelopedData, envelopedData_parser } -}; - -static void -parse_pkcs12_type(hx509_context context, - struct hx509_collector *c, - const heim_oid *oid, - const void *data, size_t length, - const PKCS12_Attributes *attrs) -{ - size_t i; - - for (i = 0; i < sizeof(bagtypes)/sizeof(bagtypes[0]); i++) - if (der_heim_oid_cmp(bagtypes[i].oid, oid) == 0) - (*bagtypes[i].func)(context, c, data, length, attrs); -} - -static int -p12_init(hx509_context context, - hx509_certs certs, void **data, int flags, - const char *residue, hx509_lock lock) -{ - struct ks_pkcs12 *p12; - size_t len; - void *buf; - PKCS12_PFX pfx; - PKCS12_AuthenticatedSafe as; - int ret; - size_t i; - struct hx509_collector *c; - - *data = NULL; - - if (lock == NULL) - lock = _hx509_empty_lock; - - ret = _hx509_collector_alloc(context, lock, &c); - if (ret) - return ret; - - p12 = calloc(1, sizeof(*p12)); - if (p12 == NULL) { - ret = ENOMEM; - hx509_set_error_string(context, 0, ret, "out of memory"); - goto out; - } - - p12->fn = strdup(residue); - if (p12->fn == NULL) { - ret = ENOMEM; - hx509_set_error_string(context, 0, ret, "out of memory"); - goto out; - } - - if (flags & HX509_CERTS_CREATE) { - ret = hx509_certs_init(context, "MEMORY:ks-file-create", - 0, lock, &p12->certs); - if (ret == 0) - *data = p12; - goto out; - } - - ret = rk_undumpdata(residue, &buf, &len); - if (ret) { - hx509_clear_error_string(context); - goto out; - } - - ret = decode_PKCS12_PFX(buf, len, &pfx, NULL); - rk_xfree(buf); - if (ret) { - hx509_set_error_string(context, 0, ret, - "Failed to decode the PFX in %s", residue); - goto out; - } - - if (der_heim_oid_cmp(&pfx.authSafe.contentType, &asn1_oid_id_pkcs7_data) != 0) { - free_PKCS12_PFX(&pfx); - ret = EINVAL; - hx509_set_error_string(context, 0, ret, - "PKCS PFX isn't a pkcs7-data container"); - goto out; - } - - if (pfx.authSafe.content == NULL) { - free_PKCS12_PFX(&pfx); - ret = EINVAL; - hx509_set_error_string(context, 0, ret, - "PKCS PFX missing data"); - goto out; - } - - { - heim_octet_string asdata; - - ret = decode_PKCS12_OctetString(pfx.authSafe.content->data, - pfx.authSafe.content->length, - &asdata, - NULL); - free_PKCS12_PFX(&pfx); - if (ret) { - hx509_clear_error_string(context); - goto out; - } - ret = decode_PKCS12_AuthenticatedSafe(asdata.data, - asdata.length, - &as, - NULL); - der_free_octet_string(&asdata); - if (ret) { - hx509_clear_error_string(context); - goto out; - } - } - - for (i = 0; i < as.len; i++) - parse_pkcs12_type(context, - c, - &as.val[i].contentType, - as.val[i].content->data, - as.val[i].content->length, - NULL); - - free_PKCS12_AuthenticatedSafe(&as); - - ret = _hx509_collector_collect_certs(context, c, &p12->certs); - if (ret == 0) - *data = p12; - -out: - _hx509_collector_free(c); - - if (ret && p12) { - if (p12->fn) - free(p12->fn); - if (p12->certs) - hx509_certs_free(&p12->certs); - free(p12); - } - - return ret; -} - -static int -addBag(hx509_context context, - PKCS12_AuthenticatedSafe *as, - const heim_oid *oid, - void *data, - size_t length) -{ - void *ptr; - int ret; - - ptr = realloc(as->val, sizeof(as->val[0]) * (as->len + 1)); - if (ptr == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - as->val = ptr; - - ret = der_copy_oid(oid, &as->val[as->len].contentType); - if (ret) { - hx509_set_error_string(context, 0, ret, "out of memory"); - return ret; - } - - as->val[as->len].content = calloc(1, sizeof(*as->val[0].content)); - if (as->val[as->len].content == NULL) { - der_free_oid(&as->val[as->len].contentType); - hx509_set_error_string(context, 0, ENOMEM, "malloc out of memory"); - return ENOMEM; - } - - as->val[as->len].content->data = data; - as->val[as->len].content->length = length; - - as->len++; - - return 0; -} - -static int -store_func(hx509_context context, void *ctx, hx509_cert c) -{ - PKCS12_AuthenticatedSafe *as = ctx; - PKCS12_OctetString os; - PKCS12_CertBag cb; - size_t size; - int ret; - - memset(&os, 0, sizeof(os)); - memset(&cb, 0, sizeof(cb)); - - os.data = NULL; - os.length = 0; - - ret = hx509_cert_binary(context, c, &os); - if (ret) - return ret; - - ASN1_MALLOC_ENCODE(PKCS12_OctetString, - cb.certValue.data,cb.certValue.length, - &os, &size, ret); - free(os.data); - if (ret) - goto out; - ret = der_copy_oid(&asn1_oid_id_pkcs_9_at_certTypes_x509, &cb.certType); - if (ret) { - free_PKCS12_CertBag(&cb); - goto out; - } - ASN1_MALLOC_ENCODE(PKCS12_CertBag, os.data, os.length, - &cb, &size, ret); - free_PKCS12_CertBag(&cb); - if (ret) - goto out; - - ret = addBag(context, as, &asn1_oid_id_pkcs12_certBag, os.data, os.length); - - if (_hx509_cert_private_key_exportable(c)) { - hx509_private_key key = _hx509_cert_private_key(c); - PKCS8PrivateKeyInfo pki; - - memset(&pki, 0, sizeof(pki)); - - ret = der_parse_hex_heim_integer("00", &pki.version); - if (ret) - return ret; - ret = _hx509_private_key_oid(context, key, - &pki.privateKeyAlgorithm.algorithm); - if (ret) { - free_PKCS8PrivateKeyInfo(&pki); - return ret; - } - ret = _hx509_private_key_export(context, - _hx509_cert_private_key(c), - HX509_KEY_FORMAT_DER, - &pki.privateKey); - if (ret) { - free_PKCS8PrivateKeyInfo(&pki); - return ret; - } - /* set attribute, asn1_oid_id_pkcs_9_at_localKeyId */ - - ASN1_MALLOC_ENCODE(PKCS8PrivateKeyInfo, os.data, os.length, - &pki, &size, ret); - free_PKCS8PrivateKeyInfo(&pki); - if (ret) - return ret; - - ret = addBag(context, as, &asn1_oid_id_pkcs12_keyBag, os.data, os.length); - if (ret) - return ret; - } - -out: - return ret; -} - -static int -p12_store(hx509_context context, - hx509_certs certs, void *data, int flags, hx509_lock lock) -{ - struct ks_pkcs12 *p12 = data; - PKCS12_PFX pfx; - PKCS12_AuthenticatedSafe as; - PKCS12_OctetString asdata; - size_t size; - int ret; - - memset(&as, 0, sizeof(as)); - memset(&pfx, 0, sizeof(pfx)); - - ret = hx509_certs_iter_f(context, p12->certs, store_func, &as); - if (ret) - goto out; - - ASN1_MALLOC_ENCODE(PKCS12_AuthenticatedSafe, asdata.data, asdata.length, - &as, &size, ret); - free_PKCS12_AuthenticatedSafe(&as); - if (ret) - return ret; - - ret = der_parse_hex_heim_integer("03", &pfx.version); - if (ret) { - free(asdata.data); - goto out; - } - - pfx.authSafe.content = calloc(1, sizeof(*pfx.authSafe.content)); - - ASN1_MALLOC_ENCODE(PKCS12_OctetString, - pfx.authSafe.content->data, - pfx.authSafe.content->length, - &asdata, &size, ret); - free(asdata.data); - if (ret) - goto out; - - ret = der_copy_oid(&asn1_oid_id_pkcs7_data, &pfx.authSafe.contentType); - if (ret) - goto out; - - ASN1_MALLOC_ENCODE(PKCS12_PFX, asdata.data, asdata.length, - &pfx, &size, ret); - if (ret) - goto out; - -#if 0 - const struct _hx509_password *pw; - - pw = _hx509_lock_get_passwords(lock); - if (pw != NULL) { - pfx.macData = calloc(1, sizeof(*pfx.macData)); - if (pfx.macData == NULL) { - ret = ENOMEM; - hx509_set_error_string(context, 0, ret, "malloc out of memory"); - return ret; - } - if (pfx.macData == NULL) { - free(asdata.data); - goto out; - } - } - ret = calculate_hash(&aspath, pw, pfx.macData); -#endif - - rk_dumpdata(p12->fn, asdata.data, asdata.length); - free(asdata.data); - -out: - free_PKCS12_AuthenticatedSafe(&as); - free_PKCS12_PFX(&pfx); - - return ret; -} - - -static int -p12_free(hx509_certs certs, void *data) -{ - struct ks_pkcs12 *p12 = data; - hx509_certs_free(&p12->certs); - free(p12->fn); - free(p12); - return 0; -} - -static int -p12_add(hx509_context context, hx509_certs certs, void *data, hx509_cert c) -{ - struct ks_pkcs12 *p12 = data; - return hx509_certs_add(context, p12->certs, c); -} - -static int -p12_iter_start(hx509_context context, - hx509_certs certs, - void *data, - void **cursor) -{ - struct ks_pkcs12 *p12 = data; - return hx509_certs_start_seq(context, p12->certs, cursor); -} - -static int -p12_iter(hx509_context context, - hx509_certs certs, - void *data, - void *cursor, - hx509_cert *cert) -{ - struct ks_pkcs12 *p12 = data; - return hx509_certs_next_cert(context, p12->certs, cursor, cert); -} - -static int -p12_iter_end(hx509_context context, - hx509_certs certs, - void *data, - void *cursor) -{ - struct ks_pkcs12 *p12 = data; - return hx509_certs_end_seq(context, p12->certs, cursor); -} - -static struct hx509_keyset_ops keyset_pkcs12 = { - "PKCS12", - 0, - p12_init, - p12_store, - p12_free, - p12_add, - NULL, - p12_iter_start, - p12_iter, - p12_iter_end -}; - -void -_hx509_ks_pkcs12_register(hx509_context context) -{ - _hx509_ks_register(context, &keyset_pkcs12); -} diff --git a/kerberosV/src/lib/hx509/libhx509-exports.def b/kerberosV/src/lib/hx509/libhx509-exports.def deleted file mode 100644 index f8973a09139..00000000000 --- a/kerberosV/src/lib/hx509/libhx509-exports.def +++ /dev/null @@ -1,235 +0,0 @@ -EXPORTS - _hx509_cert_assign_key - _hx509_cert_private_key - _hx509_certs_keys_free - _hx509_certs_keys_get - _hx509_expr_eval - _hx509_expr_free - _hx509_expr_parse - _hx509_generate_private_key - _hx509_generate_private_key_bits - _hx509_generate_private_key_free - _hx509_generate_private_key_init - _hx509_generate_private_key_is_ca - _hx509_map_file_os - _hx509_name_from_Name - hx509_private_key2SPKI - hx509_private_key_free - _hx509_private_key_ref - _hx509_request_add_dns_name - _hx509_request_add_email - hx509_request_free - hx509_request_get_SubjectPublicKeyInfo - hx509_request_get_name - hx509_request_init - _hx509_request_parse - _hx509_request_print - hx509_request_set_SubjectPublicKeyInfo -; _hx509_request_set_email - hx509_request_set_name - _hx509_request_to_pkcs10 - _hx509_request_to_pkcs10 - _hx509_unmap_file_os - _hx509_write_file - hx509_bitstring_print - hx509_ca_sign - hx509_ca_sign_self - hx509_ca_tbs_add_crl_dp_uri - hx509_ca_tbs_add_eku - hx509_ca_tbs_add_san_hostname - hx509_ca_tbs_add_san_jid - hx509_ca_tbs_add_san_ms_upn - hx509_ca_tbs_add_san_otherName - hx509_ca_tbs_add_san_pkinit - hx509_ca_tbs_add_san_rfc822name - hx509_ca_tbs_free - hx509_ca_tbs_init - hx509_ca_tbs_set_ca - hx509_ca_tbs_set_domaincontroller - hx509_ca_tbs_set_notAfter - hx509_ca_tbs_set_notAfter_lifetime - hx509_ca_tbs_set_notBefore - hx509_ca_tbs_set_proxy - hx509_ca_tbs_set_serialnumber - hx509_ca_tbs_set_spki - hx509_ca_tbs_set_subject - hx509_ca_tbs_set_template - hx509_ca_tbs_subject_expand - hx509_ca_tbs_template_units -; hx509_cert -; hx509_cert_attribute - hx509_cert_binary - hx509_cert_check_eku - hx509_cert_cmp - hx509_cert_find_subjectAltName_otherName - hx509_cert_free - hx509_cert_get_SPKI - hx509_cert_get_SPKI_AlgorithmIdentifier - hx509_cert_get_attribute - hx509_cert_get_base_subject - hx509_cert_get_friendly_name - hx509_cert_get_issuer - hx509_cert_get_notAfter - hx509_cert_get_notBefore - hx509_cert_get_serialnumber - hx509_cert_get_subject - hx509_cert_init - hx509_cert_init_data - hx509_cert_keyusage_print - hx509_cert_ref - hx509_cert_set_friendly_name - hx509_certs_add - hx509_certs_append - hx509_certs_end_seq - hx509_certs_ref - hx509_certs_filter - hx509_certs_find - hx509_certs_free - hx509_certs_info - hx509_certs_init -; hx509_certs_iter - hx509_certs_iter_f - hx509_certs_merge - hx509_certs_next_cert - hx509_certs_start_seq - hx509_certs_store - hx509_ci_print_names - hx509_clear_error_string - hx509_cms_create_signed - hx509_cms_create_signed_1 - hx509_cms_decrypt_encrypted - hx509_cms_envelope_1 - hx509_cms_unenvelope - hx509_cms_unwrap_ContentInfo - hx509_cms_verify_signed - hx509_cms_wrap_ContentInfo - hx509_context_free - hx509_context_init - hx509_context_set_missing_revoke - hx509_crl_add_revoked_certs - hx509_crl_alloc - hx509_crl_free - hx509_crl_lifetime - hx509_crl_sign - hx509_crypto_aes128_cbc - hx509_crypto_aes256_cbc - hx509_crypto_allow_weak - hx509_crypto_available - hx509_crypto_decrypt - hx509_crypto_des_rsdi_ede3_cbc - hx509_crypto_destroy - hx509_crypto_encrypt - hx509_crypto_enctype_by_name - hx509_crypto_free_algs - hx509_crypto_get_params - hx509_crypto_init - hx509_crypto_provider - hx509_crypto_select - hx509_crypto_set_key_data - hx509_crypto_set_key_name - hx509_crypto_set_padding - hx509_crypto_set_params - hx509_crypto_set_random_key - hx509_env_add - hx509_env_add_binding - hx509_env_find - hx509_env_find_binding - hx509_env_free -; hx509_env_init - hx509_env_lfind - hx509_err - hx509_free_error_string - hx509_free_octet_string_list - hx509_general_name_unparse - hx509_get_error_string - hx509_get_one_cert - hx509_lock_add_cert - hx509_lock_add_certs - hx509_lock_add_password - hx509_lock_command_string - hx509_lock_free - hx509_lock_init - hx509_lock_prompt - hx509_lock_reset_certs - hx509_lock_reset_passwords - hx509_lock_reset_promper - hx509_lock_set_prompter - hx509_name_binary - hx509_name_cmp - hx509_name_copy - hx509_name_expand - hx509_name_free - hx509_name_is_null_p - hx509_name_normalize - hx509_name_to_Name - hx509_name_to_string - hx509_ocsp_request - hx509_ocsp_verify - hx509_oid_print - hx509_oid_sprint - hx509_parse_name - hx509_peer_info_add_cms_alg - hx509_peer_info_alloc - hx509_peer_info_free - hx509_peer_info_set_cert - hx509_peer_info_set_cms_algs - hx509_pem_add_header - hx509_pem_find_header - hx509_pem_free_header - hx509_pem_read - hx509_pem_write - hx509_print_stdout - hx509_print_cert - hx509_prompt_hidden - hx509_query_alloc - hx509_query_free - hx509_query_match_cmp_func - hx509_query_match_eku - hx509_query_match_expr - hx509_query_match_friendly_name - hx509_query_match_issuer_serial - hx509_query_match_option - hx509_query_statistic_file - hx509_query_unparse_stats - hx509_revoke_add_crl - hx509_revoke_add_ocsp - hx509_revoke_free - hx509_revoke_init - hx509_revoke_ocsp_print - hx509_revoke_verify - hx509_set_error_string - hx509_set_error_stringv - hx509_signature_md5 - hx509_signature_rsa - hx509_signature_rsa_with_md5 - hx509_signature_rsa_with_sha1 - hx509_signature_rsa_with_sha256 - hx509_signature_rsa_with_sha384 - hx509_signature_rsa_with_sha512 - hx509_signature_sha1 - hx509_signature_sha256 - hx509_signature_sha384 - hx509_signature_sha512 - hx509_unparse_der_name - hx509_validate_cert - hx509_validate_ctx_add_flags - hx509_validate_ctx_free - hx509_validate_ctx_init - hx509_validate_ctx_set_print - hx509_verify_attach_anchors - hx509_verify_attach_revoke - hx509_verify_ctx_f_allow_default_trustanchors - hx509_verify_destroy_ctx - hx509_verify_hostname - hx509_verify_init_ctx - hx509_verify_path - hx509_verify_set_max_depth - hx509_verify_set_proxy_certificate - hx509_verify_set_strict_rfc3280_verification - hx509_verify_set_time - hx509_verify_signature - hx509_xfree - initialize_hx_error_table_r - -; pkcs11 symbols - C_GetFunctionList diff --git a/kerberosV/src/lib/hx509/lock.c b/kerberosV/src/lib/hx509/lock.c deleted file mode 100644 index b72d45962b6..00000000000 --- a/kerberosV/src/lib/hx509/lock.c +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright (c) 2005 - 2006 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 "hx_locl.h" - -/** - * @page page_lock Locking and unlocking certificates and encrypted data. - * - * See the library functions here: @ref hx509_lock - */ - -struct hx509_lock_data { - struct _hx509_password password; - hx509_certs certs; - hx509_prompter_fct prompt; - void *prompt_data; -}; - -static struct hx509_lock_data empty_lock_data = { - { 0, NULL } -}; - -hx509_lock _hx509_empty_lock = &empty_lock_data; - -/* - * - */ - -int -hx509_lock_init(hx509_context context, hx509_lock *lock) -{ - hx509_lock l; - int ret; - - *lock = NULL; - - l = calloc(1, sizeof(*l)); - if (l == NULL) - return ENOMEM; - - ret = hx509_certs_init(context, - "MEMORY:locks-internal", - 0, - NULL, - &l->certs); - if (ret) { - free(l); - return ret; - } - - *lock = l; - - return 0; -} - -int -hx509_lock_add_password(hx509_lock lock, const char *password) -{ - void *d; - char *s; - - s = strdup(password); - if (s == NULL) - return ENOMEM; - - d = realloc(lock->password.val, - (lock->password.len + 1) * sizeof(lock->password.val[0])); - if (d == NULL) { - free(s); - return ENOMEM; - } - lock->password.val = d; - lock->password.val[lock->password.len] = s; - lock->password.len++; - - return 0; -} - -const struct _hx509_password * -_hx509_lock_get_passwords(hx509_lock lock) -{ - return &lock->password; -} - -hx509_certs -_hx509_lock_unlock_certs(hx509_lock lock) -{ - return lock->certs; -} - -void -hx509_lock_reset_passwords(hx509_lock lock) -{ - size_t i; - for (i = 0; i < lock->password.len; i++) - free(lock->password.val[i]); - free(lock->password.val); - lock->password.val = NULL; - lock->password.len = 0; -} - -int -hx509_lock_add_cert(hx509_context context, hx509_lock lock, hx509_cert cert) -{ - return hx509_certs_add(context, lock->certs, cert); -} - -int -hx509_lock_add_certs(hx509_context context, hx509_lock lock, hx509_certs certs) -{ - return hx509_certs_merge(context, lock->certs, certs); -} - -void -hx509_lock_reset_certs(hx509_context context, hx509_lock lock) -{ - hx509_certs certs = lock->certs; - int ret; - - ret = hx509_certs_init(context, - "MEMORY:locks-internal", - 0, - NULL, - &lock->certs); - if (ret == 0) - hx509_certs_free(&certs); - else - lock->certs = certs; -} - -int -_hx509_lock_find_cert(hx509_lock lock, const hx509_query *q, hx509_cert *c) -{ - *c = NULL; - return 0; -} - -int -hx509_lock_set_prompter(hx509_lock lock, hx509_prompter_fct prompt, void *data) -{ - lock->prompt = prompt; - lock->prompt_data = data; - return 0; -} - -void -hx509_lock_reset_promper(hx509_lock lock) -{ - lock->prompt = NULL; - lock->prompt_data = NULL; -} - -static int -default_prompter(void *data, const hx509_prompt *prompter) -{ - if (hx509_prompt_hidden(prompter->type)) { - if(UI_UTIL_read_pw_string(prompter->reply.data, - prompter->reply.length, - prompter->prompt, - 0)) - return 1; - } else { - char *s = prompter->reply.data; - - fputs (prompter->prompt, stdout); - fflush (stdout); - if(fgets(prompter->reply.data, - prompter->reply.length, - stdin) == NULL) - return 1; - s[strcspn(s, "\n")] = '\0'; - } - return 0; -} - -int -hx509_lock_prompt(hx509_lock lock, hx509_prompt *prompt) -{ - if (lock->prompt == NULL) - return HX509_CRYPTO_NO_PROMPTER; - return (*lock->prompt)(lock->prompt_data, prompt); -} - -void -hx509_lock_free(hx509_lock lock) -{ - if (lock) { - hx509_certs_free(&lock->certs); - hx509_lock_reset_passwords(lock); - memset(lock, 0, sizeof(*lock)); - free(lock); - } -} - -int -hx509_prompt_hidden(hx509_prompt_type type) -{ - /* default to hidden if unknown */ - - switch (type) { - case HX509_PROMPT_TYPE_QUESTION: - case HX509_PROMPT_TYPE_INFO: - return 0; - default: - return 1; - } -} - -int -hx509_lock_command_string(hx509_lock lock, const char *string) -{ - if (strncasecmp(string, "PASS:", 5) == 0) { - hx509_lock_add_password(lock, string + 5); - } else if (strcasecmp(string, "PROMPT") == 0) { - hx509_lock_set_prompter(lock, default_prompter, NULL); - } else - return HX509_UNKNOWN_LOCK_COMMAND; - return 0; -} diff --git a/kerberosV/src/lib/hx509/name.c b/kerberosV/src/lib/hx509/name.c deleted file mode 100644 index efd7b703422..00000000000 --- a/kerberosV/src/lib/hx509/name.c +++ /dev/null @@ -1,1026 +0,0 @@ -/* - * Copyright (c) 2004 - 2009 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 "hx_locl.h" -#include -#include "char_map.h" - -/** - * @page page_name PKIX/X.509 Names - * - * There are several names in PKIX/X.509, GeneralName and Name. - * - * A Name consists of an ordered list of Relative Distinguished Names - * (RDN). Each RDN consists of an unordered list of typed strings. The - * types are defined by OID and have long and short description. For - * example id-at-commonName (2.5.4.3) have the long name CommonName - * and short name CN. The string itself can be of several encoding, - * UTF8, UTF16, Teltex string, etc. The type limit what encoding - * should be used. - * - * GeneralName is a broader nametype that can contains al kind of - * stuff like Name, IP addresses, partial Name, etc. - * - * Name is mapped into a hx509_name object. - * - * Parse and string name into a hx509_name object with hx509_parse_name(), - * make it back into string representation with hx509_name_to_string(). - * - * Name string are defined rfc2253, rfc1779 and X.501. - * - * See the library functions here: @ref hx509_name - */ - -static const struct { - const char *n; - const heim_oid *o; - wind_profile_flags flags; -} no[] = { - { "C", &asn1_oid_id_at_countryName, 0 }, - { "CN", &asn1_oid_id_at_commonName, 0 }, - { "DC", &asn1_oid_id_domainComponent, 0 }, - { "L", &asn1_oid_id_at_localityName, 0 }, - { "O", &asn1_oid_id_at_organizationName, 0 }, - { "OU", &asn1_oid_id_at_organizationalUnitName, 0 }, - { "S", &asn1_oid_id_at_stateOrProvinceName, 0 }, - { "STREET", &asn1_oid_id_at_streetAddress, 0 }, - { "UID", &asn1_oid_id_Userid, 0 }, - { "emailAddress", &asn1_oid_id_pkcs9_emailAddress, 0 }, - { "serialNumber", &asn1_oid_id_at_serialNumber, 0 } -}; - -static char * -quote_string(const char *f, size_t len, int flags, size_t *rlen) -{ - size_t i, j, tolen; - const unsigned char *from = (const unsigned char *)f; - unsigned char *to; - - tolen = len * 3 + 1; - to = malloc(tolen); - if (to == NULL) - return NULL; - - for (i = 0, j = 0; i < len; i++) { - unsigned char map = char_map[from[i]] & flags; - if (i == 0 && (map & Q_RFC2253_QUOTE_FIRST)) { - to[j++] = '\\'; - to[j++] = from[i]; - } else if ((i + 1) == len && (map & Q_RFC2253_QUOTE_LAST)) { - - to[j++] = '\\'; - to[j++] = from[i]; - } else if (map & Q_RFC2253_QUOTE) { - to[j++] = '\\'; - to[j++] = from[i]; - } else if (map & Q_RFC2253_HEX) { - int l = snprintf((char *)&to[j], tolen - j - 1, - "#%02x", (unsigned char)from[i]); - j += l; - } else { - to[j++] = from[i]; - } - } - to[j] = '\0'; - assert(j < tolen); - *rlen = j; - return (char *)to; -} - - -static int -append_string(char **str, size_t *total_len, const char *ss, - size_t len, int quote) -{ - char *s, *qs; - - if (quote) - qs = quote_string(ss, len, Q_RFC2253, &len); - else - qs = rk_UNCONST(ss); - - s = realloc(*str, len + *total_len + 1); - if (s == NULL) - _hx509_abort("allocation failure"); /* XXX */ - memcpy(s + *total_len, qs, len); - if (qs != ss) - free(qs); - s[*total_len + len] = '\0'; - *str = s; - *total_len += len; - return 0; -} - -static char * -oidtostring(const heim_oid *type) -{ - char *s; - size_t i; - - for (i = 0; i < sizeof(no)/sizeof(no[0]); i++) { - if (der_heim_oid_cmp(no[i].o, type) == 0) - return strdup(no[i].n); - } - if (der_print_heim_oid(type, '.', &s) != 0) - return NULL; - return s; -} - -static int -stringtooid(const char *name, size_t len, heim_oid *oid) -{ - int ret; - size_t i; - char *s; - - memset(oid, 0, sizeof(*oid)); - - for (i = 0; i < sizeof(no)/sizeof(no[0]); i++) { - if (strncasecmp(no[i].n, name, len) == 0) - return der_copy_oid(no[i].o, oid); - } - s = malloc(len + 1); - if (s == NULL) - return ENOMEM; - memcpy(s, name, len); - s[len] = '\0'; - ret = der_parse_heim_oid(s, ".", oid); - free(s); - return ret; -} - -/** - * Convert the hx509 name object into a printable string. - * The resulting string should be freed with free(). - * - * @param name name to print - * @param str the string to return - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_name - */ - -int -hx509_name_to_string(const hx509_name name, char **str) -{ - return _hx509_Name_to_string(&name->der_name, str); -} - -int -_hx509_Name_to_string(const Name *n, char **str) -{ - size_t total_len = 0; - size_t i, j, m; - int ret; - - *str = strdup(""); - if (*str == NULL) - return ENOMEM; - - for (m = n->u.rdnSequence.len; m > 0; m--) { - size_t len; - i = m - 1; - - for (j = 0; j < n->u.rdnSequence.val[i].len; j++) { - DirectoryString *ds = &n->u.rdnSequence.val[i].val[j].value; - char *oidname; - char *ss; - - oidname = oidtostring(&n->u.rdnSequence.val[i].val[j].type); - - switch(ds->element) { - case choice_DirectoryString_ia5String: - ss = ds->u.ia5String.data; - len = ds->u.ia5String.length; - break; - case choice_DirectoryString_printableString: - ss = ds->u.printableString.data; - len = ds->u.printableString.length; - break; - case choice_DirectoryString_utf8String: - ss = ds->u.utf8String; - len = strlen(ss); - break; - case choice_DirectoryString_bmpString: { - const uint16_t *bmp = ds->u.bmpString.data; - size_t bmplen = ds->u.bmpString.length; - size_t k; - - ret = wind_ucs2utf8_length(bmp, bmplen, &k); - if (ret) - return ret; - - ss = malloc(k + 1); - if (ss == NULL) - _hx509_abort("allocation failure"); /* XXX */ - ret = wind_ucs2utf8(bmp, bmplen, ss, NULL); - if (ret) { - free(ss); - return ret; - } - ss[k] = '\0'; - len = k; - break; - } - case choice_DirectoryString_teletexString: - ss = ds->u.teletexString; - len = strlen(ss); - break; - case choice_DirectoryString_universalString: { - const uint32_t *uni = ds->u.universalString.data; - size_t unilen = ds->u.universalString.length; - size_t k; - - ret = wind_ucs4utf8_length(uni, unilen, &k); - if (ret) - return ret; - - ss = malloc(k + 1); - if (ss == NULL) - _hx509_abort("allocation failure"); /* XXX */ - ret = wind_ucs4utf8(uni, unilen, ss, NULL); - if (ret) { - free(ss); - return ret; - } - ss[k] = '\0'; - len = k; - break; - } - default: - _hx509_abort("unknown directory type: %d", ds->element); - exit(1); - } - append_string(str, &total_len, oidname, strlen(oidname), 0); - free(oidname); - append_string(str, &total_len, "=", 1, 0); - append_string(str, &total_len, ss, len, 1); - if (ds->element == choice_DirectoryString_bmpString || - ds->element == choice_DirectoryString_universalString) - { - free(ss); - } - if (j + 1 < n->u.rdnSequence.val[i].len) - append_string(str, &total_len, "+", 1, 0); - } - - if (i > 0) - append_string(str, &total_len, ",", 1, 0); - } - return 0; -} - -#define COPYCHARARRAY(_ds,_el,_l,_n) \ - (_l) = strlen(_ds->u._el); \ - (_n) = malloc((_l) * sizeof((_n)[0])); \ - if ((_n) == NULL) \ - return ENOMEM; \ - for (i = 0; i < (_l); i++) \ - (_n)[i] = _ds->u._el[i] - - -#define COPYVALARRAY(_ds,_el,_l,_n) \ - (_l) = _ds->u._el.length; \ - (_n) = malloc((_l) * sizeof((_n)[0])); \ - if ((_n) == NULL) \ - return ENOMEM; \ - for (i = 0; i < (_l); i++) \ - (_n)[i] = _ds->u._el.data[i] - -#define COPYVOIDARRAY(_ds,_el,_l,_n) \ - (_l) = _ds->u._el.length; \ - (_n) = malloc((_l) * sizeof((_n)[0])); \ - if ((_n) == NULL) \ - return ENOMEM; \ - for (i = 0; i < (_l); i++) \ - (_n)[i] = ((unsigned char *)_ds->u._el.data)[i] - - - -static int -dsstringprep(const DirectoryString *ds, uint32_t **rname, size_t *rlen) -{ - wind_profile_flags flags; - size_t i, len; - int ret; - uint32_t *name; - - *rname = NULL; - *rlen = 0; - - switch(ds->element) { - case choice_DirectoryString_ia5String: - flags = WIND_PROFILE_LDAP; - COPYVOIDARRAY(ds, ia5String, len, name); - break; - case choice_DirectoryString_printableString: - flags = WIND_PROFILE_LDAP; - flags |= WIND_PROFILE_LDAP_CASE_EXACT_ATTRIBUTE; - COPYVOIDARRAY(ds, printableString, len, name); - break; - case choice_DirectoryString_teletexString: - flags = WIND_PROFILE_LDAP_CASE; - COPYCHARARRAY(ds, teletexString, len, name); - break; - case choice_DirectoryString_bmpString: - flags = WIND_PROFILE_LDAP; - COPYVALARRAY(ds, bmpString, len, name); - break; - case choice_DirectoryString_universalString: - flags = WIND_PROFILE_LDAP; - COPYVALARRAY(ds, universalString, len, name); - break; - case choice_DirectoryString_utf8String: - flags = WIND_PROFILE_LDAP; - ret = wind_utf8ucs4_length(ds->u.utf8String, &len); - if (ret) - return ret; - name = malloc(len * sizeof(name[0])); - if (name == NULL) - return ENOMEM; - ret = wind_utf8ucs4(ds->u.utf8String, name, &len); - if (ret) { - free(name); - return ret; - } - break; - default: - _hx509_abort("unknown directory type: %d", ds->element); - } - - *rlen = len; - /* try a couple of times to get the length right, XXX gross */ - for (i = 0; i < 4; i++) { - *rlen = *rlen * 2; - *rname = malloc(*rlen * sizeof((*rname)[0])); - - ret = wind_stringprep(name, len, *rname, rlen, flags); - if (ret == WIND_ERR_OVERRUN) { - free(*rname); - *rname = NULL; - continue; - } else - break; - } - free(name); - if (ret) { - if (*rname) - free(*rname); - *rname = NULL; - *rlen = 0; - return ret; - } - - return 0; -} - -int -_hx509_name_ds_cmp(const DirectoryString *ds1, - const DirectoryString *ds2, - int *diff) -{ - uint32_t *ds1lp, *ds2lp; - size_t ds1len, ds2len, i; - int ret; - - ret = dsstringprep(ds1, &ds1lp, &ds1len); - if (ret) - return ret; - ret = dsstringprep(ds2, &ds2lp, &ds2len); - if (ret) { - free(ds1lp); - return ret; - } - - if (ds1len != ds2len) - *diff = ds1len - ds2len; - else { - for (i = 0; i < ds1len; i++) { - *diff = ds1lp[i] - ds2lp[i]; - if (*diff) - break; - } - } - free(ds1lp); - free(ds2lp); - - return 0; -} - -int -_hx509_name_cmp(const Name *n1, const Name *n2, int *c) -{ - int ret; - size_t i, j; - - *c = n1->u.rdnSequence.len - n2->u.rdnSequence.len; - if (*c) - return 0; - - for (i = 0 ; i < n1->u.rdnSequence.len; i++) { - *c = n1->u.rdnSequence.val[i].len - n2->u.rdnSequence.val[i].len; - if (*c) - return 0; - - for (j = 0; j < n1->u.rdnSequence.val[i].len; j++) { - *c = der_heim_oid_cmp(&n1->u.rdnSequence.val[i].val[j].type, - &n1->u.rdnSequence.val[i].val[j].type); - if (*c) - return 0; - - ret = _hx509_name_ds_cmp(&n1->u.rdnSequence.val[i].val[j].value, - &n2->u.rdnSequence.val[i].val[j].value, - c); - if (ret) - return ret; - if (*c) - return 0; - } - } - *c = 0; - return 0; -} - -/** - * Compare to hx509 name object, useful for sorting. - * - * @param n1 a hx509 name object. - * @param n2 a hx509 name object. - * - * @return 0 the objects are the same, returns > 0 is n2 is "larger" - * then n2, < 0 if n1 is "smaller" then n2. - * - * @ingroup hx509_name - */ - -int -hx509_name_cmp(hx509_name n1, hx509_name n2) -{ - int ret, diff; - ret = _hx509_name_cmp(&n1->der_name, &n2->der_name, &diff); - if (ret) - return ret; - return diff; -} - - -int -_hx509_name_from_Name(const Name *n, hx509_name *name) -{ - int ret; - *name = calloc(1, sizeof(**name)); - if (*name == NULL) - return ENOMEM; - ret = copy_Name(n, &(*name)->der_name); - if (ret) { - free(*name); - *name = NULL; - } - return ret; -} - -int -_hx509_name_modify(hx509_context context, - Name *name, - int append, - const heim_oid *oid, - const char *str) -{ - RelativeDistinguishedName *rdn; - int ret; - void *ptr; - - ptr = realloc(name->u.rdnSequence.val, - sizeof(name->u.rdnSequence.val[0]) * - (name->u.rdnSequence.len + 1)); - if (ptr == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "Out of memory"); - return ENOMEM; - } - name->u.rdnSequence.val = ptr; - - if (append) { - rdn = &name->u.rdnSequence.val[name->u.rdnSequence.len]; - } else { - memmove(&name->u.rdnSequence.val[1], - &name->u.rdnSequence.val[0], - name->u.rdnSequence.len * - sizeof(name->u.rdnSequence.val[0])); - - rdn = &name->u.rdnSequence.val[0]; - } - rdn->val = malloc(sizeof(rdn->val[0])); - if (rdn->val == NULL) - return ENOMEM; - rdn->len = 1; - ret = der_copy_oid(oid, &rdn->val[0].type); - if (ret) - return ret; - rdn->val[0].value.element = choice_DirectoryString_utf8String; - rdn->val[0].value.u.utf8String = strdup(str); - if (rdn->val[0].value.u.utf8String == NULL) - return ENOMEM; - name->u.rdnSequence.len += 1; - - return 0; -} - -/** - * Parse a string into a hx509 name object. - * - * @param context A hx509 context. - * @param str a string to parse. - * @param name the resulting object, NULL in case of error. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_name - */ - -int -hx509_parse_name(hx509_context context, const char *str, hx509_name *name) -{ - const char *p, *q; - size_t len; - hx509_name n; - int ret; - - *name = NULL; - - n = calloc(1, sizeof(*n)); - if (n == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - - n->der_name.element = choice_Name_rdnSequence; - - p = str; - - while (p != NULL && *p != '\0') { - heim_oid oid; - int last; - - q = strchr(p, ','); - if (q) { - len = (q - p); - last = 1; - } else { - len = strlen(p); - last = 0; - } - - q = strchr(p, '='); - if (q == NULL) { - ret = HX509_PARSING_NAME_FAILED; - hx509_set_error_string(context, 0, ret, "missing = in %s", p); - goto out; - } - if (q == p) { - ret = HX509_PARSING_NAME_FAILED; - hx509_set_error_string(context, 0, ret, - "missing name before = in %s", p); - goto out; - } - - if ((size_t)(q - p) > len) { - ret = HX509_PARSING_NAME_FAILED; - hx509_set_error_string(context, 0, ret, " = after , in %s", p); - goto out; - } - - ret = stringtooid(p, q - p, &oid); - if (ret) { - ret = HX509_PARSING_NAME_FAILED; - hx509_set_error_string(context, 0, ret, - "unknown type: %.*s", (int)(q - p), p); - goto out; - } - - { - size_t pstr_len = len - (q - p) - 1; - const char *pstr = p + (q - p) + 1; - char *r; - - r = malloc(pstr_len + 1); - if (r == NULL) { - der_free_oid(&oid); - ret = ENOMEM; - hx509_set_error_string(context, 0, ret, "out of memory"); - goto out; - } - memcpy(r, pstr, pstr_len); - r[pstr_len] = '\0'; - - ret = _hx509_name_modify(context, &n->der_name, 0, &oid, r); - free(r); - der_free_oid(&oid); - if(ret) - goto out; - } - p += len + last; - } - - *name = n; - - return 0; -out: - hx509_name_free(&n); - return HX509_NAME_MALFORMED; -} - -/** - * Copy a hx509 name object. - * - * @param context A hx509 cotext. - * @param from the name to copy from - * @param to the name to copy to - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_name - */ - -int -hx509_name_copy(hx509_context context, const hx509_name from, hx509_name *to) -{ - int ret; - - *to = calloc(1, sizeof(**to)); - if (*to == NULL) - return ENOMEM; - ret = copy_Name(&from->der_name, &(*to)->der_name); - if (ret) { - free(*to); - *to = NULL; - return ENOMEM; - } - return 0; -} - -/** - * Convert a hx509_name into a Name. - * - * @param from the name to copy from - * @param to the name to copy to - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_name - */ - -int -hx509_name_to_Name(const hx509_name from, Name *to) -{ - return copy_Name(&from->der_name, to); -} - -int -hx509_name_normalize(hx509_context context, hx509_name name) -{ - return 0; -} - -/** - * Expands variables in the name using env. Variables are on the form - * ${name}. Useful when dealing with certificate templates. - * - * @param context A hx509 cotext. - * @param name the name to expand. - * @param env environment variable to expand. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_name - */ - -int -hx509_name_expand(hx509_context context, - hx509_name name, - hx509_env env) -{ - Name *n = &name->der_name; - size_t i, j; - - if (env == NULL) - return 0; - - if (n->element != choice_Name_rdnSequence) { - hx509_set_error_string(context, 0, EINVAL, "RDN not of supported type"); - return EINVAL; - } - - for (i = 0 ; i < n->u.rdnSequence.len; i++) { - for (j = 0; j < n->u.rdnSequence.val[i].len; j++) { - /** Only UTF8String rdnSequence names are allowed */ - /* - THIS SHOULD REALLY BE: - COMP = n->u.rdnSequence.val[i].val[j]; - normalize COMP to utf8 - check if there are variables - expand variables - convert back to orignal format, store in COMP - free normalized utf8 string - */ - DirectoryString *ds = &n->u.rdnSequence.val[i].val[j].value; - char *p, *p2; - struct rk_strpool *strpool = NULL; - - if (ds->element != choice_DirectoryString_utf8String) { - hx509_set_error_string(context, 0, EINVAL, "unsupported type"); - return EINVAL; - } - p = strstr(ds->u.utf8String, "${"); - if (p) { - strpool = rk_strpoolprintf(strpool, "%.*s", - (int)(p - ds->u.utf8String), - ds->u.utf8String); - if (strpool == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - } - while (p != NULL) { - /* expand variables */ - const char *value; - p2 = strchr(p, '}'); - if (p2 == NULL) { - hx509_set_error_string(context, 0, EINVAL, "missing }"); - rk_strpoolfree(strpool); - return EINVAL; - } - p += 2; - value = hx509_env_lfind(context, env, p, p2 - p); - if (value == NULL) { - hx509_set_error_string(context, 0, EINVAL, - "variable %.*s missing", - (int)(p2 - p), p); - rk_strpoolfree(strpool); - return EINVAL; - } - strpool = rk_strpoolprintf(strpool, "%s", value); - if (strpool == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - p2++; - - p = strstr(p2, "${"); - if (p) - strpool = rk_strpoolprintf(strpool, "%.*s", - (int)(p - p2), p2); - else - strpool = rk_strpoolprintf(strpool, "%s", p2); - if (strpool == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - } - if (strpool) { - free(ds->u.utf8String); - ds->u.utf8String = rk_strpoolcollect(strpool); - if (ds->u.utf8String == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - } - } - } - return 0; -} - -/** - * Free a hx509 name object, upond return *name will be NULL. - * - * @param name a hx509 name object to be freed. - * - * @ingroup hx509_name - */ - -void -hx509_name_free(hx509_name *name) -{ - free_Name(&(*name)->der_name); - memset(*name, 0, sizeof(**name)); - free(*name); - *name = NULL; -} - -/** - * Convert a DER encoded name info a string. - * - * @param data data to a DER/BER encoded name - * @param length length of data - * @param str the resulting string, is NULL on failure. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_name - */ - -int -hx509_unparse_der_name(const void *data, size_t length, char **str) -{ - Name name; - int ret; - - *str = NULL; - - ret = decode_Name(data, length, &name, NULL); - if (ret) - return ret; - ret = _hx509_Name_to_string(&name, str); - free_Name(&name); - return ret; -} - -/** - * Convert a hx509_name object to DER encoded name. - * - * @param name name to concert - * @param os data to a DER encoded name, free the resulting octet - * string with hx509_xfree(os->data). - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_name - */ - -int -hx509_name_binary(const hx509_name name, heim_octet_string *os) -{ - size_t size; - int ret; - - ASN1_MALLOC_ENCODE(Name, os->data, os->length, &name->der_name, &size, ret); - if (ret) - return ret; - if (os->length != size) - _hx509_abort("internal ASN.1 encoder error"); - - return 0; -} - -int -_hx509_unparse_Name(const Name *aname, char **str) -{ - hx509_name name; - int ret; - - ret = _hx509_name_from_Name(aname, &name); - if (ret) - return ret; - - ret = hx509_name_to_string(name, str); - hx509_name_free(&name); - return ret; -} - -/** - * Unparse the hx509 name in name into a string. - * - * @param name the name to check if its empty/null. - * - * @return non zero if the name is empty/null. - * - * @ingroup hx509_name - */ - -int -hx509_name_is_null_p(const hx509_name name) -{ - return name->der_name.u.rdnSequence.len == 0; -} - -/** - * Unparse the hx509 name in name into a string. - * - * @param name the name to print - * @param str an allocated string returns the name in string form - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_name - */ - -int -hx509_general_name_unparse(GeneralName *name, char **str) -{ - struct rk_strpool *strpool = NULL; - - *str = NULL; - - switch (name->element) { - case choice_GeneralName_otherName: { - char *oid; - hx509_oid_sprint(&name->u.otherName.type_id, &oid); - if (oid == NULL) - return ENOMEM; - strpool = rk_strpoolprintf(strpool, "otherName: %s", oid); - free(oid); - break; - } - case choice_GeneralName_rfc822Name: - strpool = rk_strpoolprintf(strpool, "rfc822Name: %.*s\n", - (int)name->u.rfc822Name.length, - (char *)name->u.rfc822Name.data); - break; - case choice_GeneralName_dNSName: - strpool = rk_strpoolprintf(strpool, "dNSName: %.*s\n", - (int)name->u.dNSName.length, - (char *)name->u.dNSName.data); - break; - case choice_GeneralName_directoryName: { - Name dir; - char *s; - int ret; - memset(&dir, 0, sizeof(dir)); - dir.element = name->u.directoryName.element; - dir.u.rdnSequence = name->u.directoryName.u.rdnSequence; - ret = _hx509_unparse_Name(&dir, &s); - if (ret) - return ret; - strpool = rk_strpoolprintf(strpool, "directoryName: %s", s); - free(s); - break; - } - case choice_GeneralName_uniformResourceIdentifier: - strpool = rk_strpoolprintf(strpool, "URI: %.*s", - (int)name->u.uniformResourceIdentifier.length, - (char *)name->u.uniformResourceIdentifier.data); - break; - case choice_GeneralName_iPAddress: { - unsigned char *a = name->u.iPAddress.data; - - strpool = rk_strpoolprintf(strpool, "IPAddress: "); - if (strpool == NULL) - break; - if (name->u.iPAddress.length == 4) - strpool = rk_strpoolprintf(strpool, "%d.%d.%d.%d", - a[0], a[1], a[2], a[3]); - else if (name->u.iPAddress.length == 16) - strpool = rk_strpoolprintf(strpool, - "%02X:%02X:%02X:%02X:" - "%02X:%02X:%02X:%02X:" - "%02X:%02X:%02X:%02X:" - "%02X:%02X:%02X:%02X", - a[0], a[1], a[2], a[3], - a[4], a[5], a[6], a[7], - a[8], a[9], a[10], a[11], - a[12], a[13], a[14], a[15]); - else - strpool = rk_strpoolprintf(strpool, - "unknown IP address of length %lu", - (unsigned long)name->u.iPAddress.length); - break; - } - case choice_GeneralName_registeredID: { - char *oid; - hx509_oid_sprint(&name->u.registeredID, &oid); - if (oid == NULL) - return ENOMEM; - strpool = rk_strpoolprintf(strpool, "registeredID: %s", oid); - free(oid); - break; - } - default: - return EINVAL; - } - if (strpool == NULL) - return ENOMEM; - - *str = rk_strpoolcollect(strpool); - - return 0; -} diff --git a/kerberosV/src/lib/hx509/ocsp.asn1 b/kerberosV/src/lib/hx509/ocsp.asn1 deleted file mode 100644 index 980cbeed0c4..00000000000 --- a/kerberosV/src/lib/hx509/ocsp.asn1 +++ /dev/null @@ -1,113 +0,0 @@ --- From rfc2560 --- $Id: ocsp.asn1,v 1.1 2013/06/17 19:11:43 robert Exp $ -OCSP DEFINITIONS EXPLICIT TAGS::= - -BEGIN - -IMPORTS - Certificate, AlgorithmIdentifier, CRLReason, - Name, GeneralName, CertificateSerialNumber, Extensions - FROM rfc2459; - -OCSPVersion ::= INTEGER { ocsp-v1(0) } - -OCSPCertStatus ::= CHOICE { - good [0] IMPLICIT NULL, - revoked [1] IMPLICIT -- OCSPRevokedInfo -- SEQUENCE { - revocationTime GeneralizedTime, - revocationReason[0] EXPLICIT CRLReason OPTIONAL - }, - unknown [2] IMPLICIT NULL } - -OCSPCertID ::= SEQUENCE { - hashAlgorithm AlgorithmIdentifier, - issuerNameHash OCTET STRING, -- Hash of Issuer's DN - issuerKeyHash OCTET STRING, -- Hash of Issuers public key - serialNumber CertificateSerialNumber } - -OCSPSingleResponse ::= SEQUENCE { - certID OCSPCertID, - certStatus OCSPCertStatus, - thisUpdate GeneralizedTime, - nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL, - singleExtensions [1] EXPLICIT Extensions OPTIONAL } - -OCSPInnerRequest ::= SEQUENCE { - reqCert OCSPCertID, - singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL } - -OCSPTBSRequest ::= SEQUENCE { - version [0] EXPLICIT OCSPVersion -- DEFAULT v1 -- OPTIONAL, - requestorName [1] EXPLICIT GeneralName OPTIONAL, - requestList SEQUENCE OF OCSPInnerRequest, - requestExtensions [2] EXPLICIT Extensions OPTIONAL } - -OCSPSignature ::= SEQUENCE { - signatureAlgorithm AlgorithmIdentifier, - signature BIT STRING, - certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL } - -OCSPRequest ::= SEQUENCE { - tbsRequest OCSPTBSRequest, - optionalSignature [0] EXPLICIT OCSPSignature OPTIONAL } - -OCSPResponseBytes ::= SEQUENCE { - responseType OBJECT IDENTIFIER, - response OCTET STRING } - -OCSPResponseStatus ::= ENUMERATED { - successful (0), --Response has valid confirmations - malformedRequest (1), --Illegal confirmation request - internalError (2), --Internal error in issuer - tryLater (3), --Try again later - --(4) is not used - sigRequired (5), --Must sign the request - unauthorized (6) --Request unauthorized -} - -OCSPResponse ::= SEQUENCE { - responseStatus OCSPResponseStatus, - responseBytes [0] EXPLICIT OCSPResponseBytes OPTIONAL } - -OCSPKeyHash ::= OCTET STRING --SHA-1 hash of responder's public key - --(excluding the tag and length fields) - -OCSPResponderID ::= CHOICE { - byName [1] Name, - byKey [2] OCSPKeyHash } - -OCSPResponseData ::= SEQUENCE { - version [0] EXPLICIT OCSPVersion -- DEFAULT v1 -- OPTIONAL, - responderID OCSPResponderID, - producedAt GeneralizedTime, - responses SEQUENCE OF OCSPSingleResponse, - responseExtensions [1] EXPLICIT Extensions OPTIONAL } - -OCSPBasicOCSPResponse ::= SEQUENCE { - tbsResponseData OCSPResponseData, - signatureAlgorithm AlgorithmIdentifier, - signature BIT STRING, - certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL } - --- ArchiveCutoff ::= GeneralizedTime - --- AcceptableResponses ::= SEQUENCE OF OBJECT IDENTIFIER - --- Object Identifiers - -id-pkix-ocsp OBJECT IDENTIFIER ::= { - iso(1) identified-organization(3) dod(6) internet(1) - security(5) mechanisms(5) pkix(7) pkix-ad(48) 1 -} - -id-pkix-ocsp-basic OBJECT IDENTIFIER ::= { id-pkix-ocsp 1 } -id-pkix-ocsp-nonce OBJECT IDENTIFIER ::= { id-pkix-ocsp 2 } --- id-pkix-ocsp-crl OBJECT IDENTIFIER ::= { id-pkix-ocsp 3 } --- id-pkix-ocsp-response OBJECT IDENTIFIER ::= { id-pkix-ocsp 4 } --- id-pkix-ocsp-nocheck OBJECT IDENTIFIER ::= { id-pkix-ocsp 5 } --- id-pkix-ocsp-archive-cutoff OBJECT IDENTIFIER ::= { id-pkix-ocsp 6 } --- id-pkix-ocsp-service-locator OBJECT IDENTIFIER ::= { id-pkix-ocsp 7 } - - -END - diff --git a/kerberosV/src/lib/hx509/ocsp.opt b/kerberosV/src/lib/hx509/ocsp.opt deleted file mode 100644 index 697aa03e19e..00000000000 --- a/kerberosV/src/lib/hx509/ocsp.opt +++ /dev/null @@ -1,2 +0,0 @@ ---preserve-binary=OCSPTBSRequest ---preserve-binary=OCSPResponseData diff --git a/kerberosV/src/lib/hx509/peer.c b/kerberosV/src/lib/hx509/peer.c deleted file mode 100644 index 457f6c4d04b..00000000000 --- a/kerberosV/src/lib/hx509/peer.c +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (c) 2006 - 2007 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "hx_locl.h" - -/** - * @page page_peer Hx509 crypto selecting functions - * - * Peer info structures are used togeter with hx509_crypto_select() to - * select the best avaible crypto algorithm to use. - * - * See the library functions here: @ref hx509_peer - */ - -/** - * Allocate a new peer info structure an init it to default values. - * - * @param context A hx509 context. - * @param peer return an allocated peer, free with hx509_peer_info_free(). - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_peer - */ - -int -hx509_peer_info_alloc(hx509_context context, hx509_peer_info *peer) -{ - *peer = calloc(1, sizeof(**peer)); - if (*peer == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - return 0; -} - - -static void -free_cms_alg(hx509_peer_info peer) -{ - if (peer->val) { - size_t i; - for (i = 0; i < peer->len; i++) - free_AlgorithmIdentifier(&peer->val[i]); - free(peer->val); - peer->val = NULL; - peer->len = 0; - } -} - -/** - * Free a peer info structure. - * - * @param peer peer info to be freed. - * - * @ingroup hx509_peer - */ - -void -hx509_peer_info_free(hx509_peer_info peer) -{ - if (peer == NULL) - return; - if (peer->cert) - hx509_cert_free(peer->cert); - free_cms_alg(peer); - memset(peer, 0, sizeof(*peer)); - free(peer); -} - -/** - * Set the certificate that remote peer is using. - * - * @param peer peer info to update - * @param cert cerificate of the remote peer. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_peer - */ - -int -hx509_peer_info_set_cert(hx509_peer_info peer, - hx509_cert cert) -{ - if (peer->cert) - hx509_cert_free(peer->cert); - peer->cert = hx509_cert_ref(cert); - return 0; -} - -/** - * Add an additional algorithm that the peer supports. - * - * @param context A hx509 context. - * @param peer the peer to set the new algorithms for - * @param val an AlgorithmsIdentier to add - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_peer - */ - -int -hx509_peer_info_add_cms_alg(hx509_context context, - hx509_peer_info peer, - const AlgorithmIdentifier *val) -{ - void *ptr; - int ret; - - ptr = realloc(peer->val, sizeof(peer->val[0]) * (peer->len + 1)); - if (ptr == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - peer->val = ptr; - ret = copy_AlgorithmIdentifier(val, &peer->val[peer->len]); - if (ret == 0) - peer->len += 1; - else - hx509_set_error_string(context, 0, ret, "out of memory"); - return ret; -} - -/** - * Set the algorithms that the peer supports. - * - * @param context A hx509 context. - * @param peer the peer to set the new algorithms for - * @param val array of supported AlgorithmsIdentiers - * @param len length of array val. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_peer - */ - -int -hx509_peer_info_set_cms_algs(hx509_context context, - hx509_peer_info peer, - const AlgorithmIdentifier *val, - size_t len) -{ - size_t i; - - free_cms_alg(peer); - - peer->val = calloc(len, sizeof(*peer->val)); - if (peer->val == NULL) { - peer->len = 0; - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - peer->len = len; - for (i = 0; i < len; i++) { - int ret; - ret = copy_AlgorithmIdentifier(&val[i], &peer->val[i]); - if (ret) { - hx509_clear_error_string(context); - free_cms_alg(peer); - return ret; - } - } - return 0; -} - -#if 0 - -/* - * S/MIME - */ - -int -hx509_peer_info_parse_smime(hx509_peer_info peer, - const heim_octet_string *data) -{ - return 0; -} - -int -hx509_peer_info_unparse_smime(hx509_peer_info peer, - heim_octet_string *data) -{ - return 0; -} - -/* - * For storing hx509_peer_info to be able to cache them. - */ - -int -hx509_peer_info_parse(hx509_peer_info peer, - const heim_octet_string *data) -{ - return 0; -} - -int -hx509_peer_info_unparse(hx509_peer_info peer, - heim_octet_string *data) -{ - return 0; -} -#endif diff --git a/kerberosV/src/lib/hx509/pkcs10.asn1 b/kerberosV/src/lib/hx509/pkcs10.asn1 deleted file mode 100644 index 4f8366906a3..00000000000 --- a/kerberosV/src/lib/hx509/pkcs10.asn1 +++ /dev/null @@ -1,25 +0,0 @@ --- $Id: pkcs10.asn1,v 1.1 2013/06/17 19:11:43 robert Exp $ -PKCS10 DEFINITIONS ::= - -BEGIN - -IMPORTS - Name, SubjectPublicKeyInfo, Attribute, AlgorithmIdentifier - FROM rfc2459; - - -CertificationRequestInfo ::= SEQUENCE { - version INTEGER { pkcs10-v1(0) }, - subject Name, - subjectPKInfo SubjectPublicKeyInfo, - attributes [0] IMPLICIT SET OF Attribute OPTIONAL -} - -CertificationRequest ::= SEQUENCE { - certificationRequestInfo CertificationRequestInfo, - signatureAlgorithm AlgorithmIdentifier, - signature BIT STRING -} - -END - diff --git a/kerberosV/src/lib/hx509/pkcs10.opt b/kerberosV/src/lib/hx509/pkcs10.opt deleted file mode 100644 index 499fab2f6ba..00000000000 --- a/kerberosV/src/lib/hx509/pkcs10.opt +++ /dev/null @@ -1 +0,0 @@ ---preserve-binary=CertificationRequestInfo diff --git a/kerberosV/src/lib/hx509/print.c b/kerberosV/src/lib/hx509/print.c deleted file mode 100644 index 1e8bcabfa7e..00000000000 --- a/kerberosV/src/lib/hx509/print.c +++ /dev/null @@ -1,1039 +0,0 @@ -/* - * Copyright (c) 2004 - 2007 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 "hx_locl.h" - -/** - * @page page_print Hx509 printing functions - * - * See the library functions here: @ref hx509_print - */ - -struct hx509_validate_ctx_data { - int flags; - hx509_vprint_func vprint_func; - void *ctx; -}; - -struct cert_status { - unsigned int selfsigned:1; - unsigned int isca:1; - unsigned int isproxy:1; - unsigned int haveSAN:1; - unsigned int haveIAN:1; - unsigned int haveSKI:1; - unsigned int haveAKI:1; - unsigned int haveCRLDP:1; -}; - - -/* - * - */ - -static int -Time2string(const Time *T, char **str) -{ - time_t t; - char *s; - struct tm *tm; - - *str = NULL; - t = _hx509_Time2time_t(T); - tm = gmtime (&t); - s = malloc(30); - if (s == NULL) - return ENOMEM; - strftime(s, 30, "%Y-%m-%d %H:%M:%S", tm); - *str = s; - return 0; -} - -/** - * Helper function to print on stdout for: - * - hx509_oid_print(), - * - hx509_bitstring_print(), - * - hx509_validate_ctx_set_print(). - * - * @param ctx the context to the print function. If the ctx is NULL, - * stdout is used. - * @param fmt the printing format. - * @param va the argumet list. - * - * @ingroup hx509_print - */ - -void -hx509_print_stdout(void *ctx, const char *fmt, va_list va) -{ - FILE *f = ctx; - if (f == NULL) - f = stdout; - vfprintf(f, fmt, va); -} - -static void -print_func(hx509_vprint_func func, void *ctx, const char *fmt, ...) -{ - va_list va; - va_start(va, fmt); - (*func)(ctx, fmt, va); - va_end(va); -} - -/** - * Print a oid to a string. - * - * @param oid oid to print - * @param str allocated string, free with hx509_xfree(). - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_print - */ - -int -hx509_oid_sprint(const heim_oid *oid, char **str) -{ - return der_print_heim_oid(oid, '.', str); -} - -/** - * Print a oid using a hx509_vprint_func function. To print to stdout - * use hx509_print_stdout(). - * - * @param oid oid to print - * @param func hx509_vprint_func to print with. - * @param ctx context variable to hx509_vprint_func function. - * - * @ingroup hx509_print - */ - -void -hx509_oid_print(const heim_oid *oid, hx509_vprint_func func, void *ctx) -{ - char *str; - hx509_oid_sprint(oid, &str); - print_func(func, ctx, "%s", str); - free(str); -} - -/** - * Print a bitstring using a hx509_vprint_func function. To print to - * stdout use hx509_print_stdout(). - * - * @param b bit string to print. - * @param func hx509_vprint_func to print with. - * @param ctx context variable to hx509_vprint_func function. - * - * @ingroup hx509_print - */ - -void -hx509_bitstring_print(const heim_bit_string *b, - hx509_vprint_func func, void *ctx) -{ - size_t i; - print_func(func, ctx, "\tlength: %d\n\t", b->length); - for (i = 0; i < (b->length + 7) / 8; i++) - print_func(func, ctx, "%02x%s%s", - ((unsigned char *)b->data)[i], - i < (b->length - 7) / 8 - && (i == 0 || (i % 16) != 15) ? ":" : "", - i != 0 && (i % 16) == 15 ? - (i <= ((b->length + 7) / 8 - 2) ? "\n\t" : "\n"):""); -} - -/** - * Print certificate usage for a certificate to a string. - * - * @param context A hx509 context. - * @param c a certificate print the keyusage for. - * @param s the return string with the keysage printed in to, free - * with hx509_xfree(). - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_print - */ - -int -hx509_cert_keyusage_print(hx509_context context, hx509_cert c, char **s) -{ - KeyUsage ku; - char buf[256]; - int ret; - - *s = NULL; - - ret = _hx509_cert_get_keyusage(context, c, &ku); - if (ret) - return ret; - unparse_flags(KeyUsage2int(ku), asn1_KeyUsage_units(), buf, sizeof(buf)); - *s = strdup(buf); - if (*s == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - - return 0; -} - -/* - * - */ - -static void -validate_vprint(void *c, const char *fmt, va_list va) -{ - hx509_validate_ctx ctx = c; - if (ctx->vprint_func == NULL) - return; - (ctx->vprint_func)(ctx->ctx, fmt, va); -} - -static void -validate_print(hx509_validate_ctx ctx, int flags, const char *fmt, ...) -{ - va_list va; - if ((ctx->flags & flags) == 0) - return; - va_start(va, fmt); - validate_vprint(ctx, fmt, va); - va_end(va); -} - -/* - * Dont Care, SHOULD critical, SHOULD NOT critical, MUST critical, - * MUST NOT critical - */ -enum critical_flag { D_C = 0, S_C, S_N_C, M_C, M_N_C }; - -static int -check_Null(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, const Extension *e) -{ - switch(cf) { - case D_C: - break; - case S_C: - if (!e->critical) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "\tCritical not set on SHOULD\n"); - break; - case S_N_C: - if (e->critical) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "\tCritical set on SHOULD NOT\n"); - break; - case M_C: - if (!e->critical) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "\tCritical not set on MUST\n"); - break; - case M_N_C: - if (e->critical) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "\tCritical set on MUST NOT\n"); - break; - default: - _hx509_abort("internal check_Null state error"); - } - return 0; -} - -static int -check_subjectKeyIdentifier(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, - const Extension *e) -{ - SubjectKeyIdentifier si; - size_t size; - int ret; - - status->haveSKI = 1; - check_Null(ctx, status, cf, e); - - ret = decode_SubjectKeyIdentifier(e->extnValue.data, - e->extnValue.length, - &si, &size); - if (ret) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Decoding SubjectKeyIdentifier failed: %d", ret); - return 1; - } - if (size != e->extnValue.length) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Decoding SKI ahve extra bits on the end"); - return 1; - } - if (si.length == 0) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "SKI is too short (0 bytes)"); - if (si.length > 20) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "SKI is too long"); - - { - char *id; - hex_encode(si.data, si.length, &id); - if (id) { - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "\tsubject key id: %s\n", id); - free(id); - } - } - - free_SubjectKeyIdentifier(&si); - - return 0; -} - -static int -check_authorityKeyIdentifier(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, - const Extension *e) -{ - AuthorityKeyIdentifier ai; - size_t size; - int ret; - - status->haveAKI = 1; - check_Null(ctx, status, cf, e); - - ret = decode_AuthorityKeyIdentifier(e->extnValue.data, - e->extnValue.length, - &ai, &size); - if (ret) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Decoding AuthorityKeyIdentifier failed: %d", ret); - return 1; - } - if (size != e->extnValue.length) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Decoding SKI ahve extra bits on the end"); - return 1; - } - - if (ai.keyIdentifier) { - char *id; - hex_encode(ai.keyIdentifier->data, ai.keyIdentifier->length, &id); - if (id) { - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "\tauthority key id: %s\n", id); - free(id); - } - } - - return 0; -} - -static int -check_extKeyUsage(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, - const Extension *e) -{ - ExtKeyUsage eku; - size_t size, i; - int ret; - - check_Null(ctx, status, cf, e); - - ret = decode_ExtKeyUsage(e->extnValue.data, - e->extnValue.length, - &eku, &size); - if (ret) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Decoding ExtKeyUsage failed: %d", ret); - return 1; - } - if (size != e->extnValue.length) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Padding data in EKU"); - free_ExtKeyUsage(&eku); - return 1; - } - if (eku.len == 0) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "ExtKeyUsage length is 0"); - return 1; - } - - for (i = 0; i < eku.len; i++) { - char *str; - ret = der_print_heim_oid (&eku.val[i], '.', &str); - if (ret) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "\tEKU: failed to print oid %d", i); - free_ExtKeyUsage(&eku); - return 1; - } - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "\teku-%d: %s\n", i, str);; - free(str); - } - - free_ExtKeyUsage(&eku); - - return 0; -} - -static int -check_pkinit_san(hx509_validate_ctx ctx, heim_any *a) -{ - KRB5PrincipalName kn; - unsigned i; - size_t size; - int ret; - - ret = decode_KRB5PrincipalName(a->data, a->length, &kn, &size); - if (ret) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Decoding kerberos name in SAN failed: %d", ret); - return 1; - } - - if (size != a->length) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Decoding kerberos name have extra bits on the end"); - return 1; - } - - /* print kerberos principal, add code to quote / within components */ - for (i = 0; i < kn.principalName.name_string.len; i++) { - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "%s", - kn.principalName.name_string.val[i]); - if (i + 1 < kn.principalName.name_string.len) - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "/"); - } - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "@"); - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "%s", kn.realm); - - free_KRB5PrincipalName(&kn); - return 0; -} - -static int -check_utf8_string_san(hx509_validate_ctx ctx, heim_any *a) -{ - PKIXXmppAddr jid; - size_t size; - int ret; - - ret = decode_PKIXXmppAddr(a->data, a->length, &jid, &size); - if (ret) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Decoding JID in SAN failed: %d", ret); - return 1; - } - - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "%s", jid); - free_PKIXXmppAddr(&jid); - - return 0; -} - -static int -check_altnull(hx509_validate_ctx ctx, heim_any *a) -{ - return 0; -} - -static int -check_CRLDistributionPoints(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, - const Extension *e) -{ - CRLDistributionPoints dp; - size_t size; - int ret; - size_t i; - - check_Null(ctx, status, cf, e); - - ret = decode_CRLDistributionPoints(e->extnValue.data, - e->extnValue.length, - &dp, &size); - if (ret) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Decoding CRL Distribution Points failed: %d\n", ret); - return 1; - } - - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "CRL Distribution Points:\n"); - for (i = 0 ; i < dp.len; i++) { - if (dp.val[i].distributionPoint) { - DistributionPointName dpname; - heim_any *data = dp.val[i].distributionPoint; - size_t j; - - ret = decode_DistributionPointName(data->data, data->length, - &dpname, NULL); - if (ret) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Failed to parse CRL Distribution Point Name: %d\n", ret); - continue; - } - - switch (dpname.element) { - case choice_DistributionPointName_fullName: - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "Fullname:\n"); - - for (j = 0 ; j < dpname.u.fullName.len; j++) { - char *s; - GeneralName *name = &dpname.u.fullName.val[j]; - - ret = hx509_general_name_unparse(name, &s); - if (ret == 0 && s != NULL) { - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, " %s\n", s); - free(s); - } - } - break; - case choice_DistributionPointName_nameRelativeToCRLIssuer: - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "Unknown nameRelativeToCRLIssuer"); - break; - default: - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Unknown DistributionPointName"); - break; - } - free_DistributionPointName(&dpname); - } - } - free_CRLDistributionPoints(&dp); - - status->haveCRLDP = 1; - - return 0; -} - - -struct { - const char *name; - const heim_oid *oid; - int (*func)(hx509_validate_ctx, heim_any *); -} altname_types[] = { - { "pk-init", &asn1_oid_id_pkinit_san, check_pkinit_san }, - { "jabber", &asn1_oid_id_pkix_on_xmppAddr, check_utf8_string_san }, - { "dns-srv", &asn1_oid_id_pkix_on_dnsSRV, check_altnull }, - { "card-id", &asn1_oid_id_uspkicommon_card_id, check_altnull }, - { "Microsoft NT-PRINCIPAL-NAME", &asn1_oid_id_pkinit_ms_san, check_utf8_string_san } -}; - -static int -check_altName(hx509_validate_ctx ctx, - struct cert_status *status, - const char *name, - enum critical_flag cf, - const Extension *e) -{ - GeneralNames gn; - size_t size; - int ret; - size_t i; - - check_Null(ctx, status, cf, e); - - if (e->extnValue.length == 0) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "%sAltName empty, not allowed", name); - return 1; - } - ret = decode_GeneralNames(e->extnValue.data, e->extnValue.length, - &gn, &size); - if (ret) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "\tret = %d while decoding %s GeneralNames\n", - ret, name); - return 1; - } - if (gn.len == 0) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "%sAltName generalName empty, not allowed\n", name); - return 1; - } - - for (i = 0; i < gn.len; i++) { - switch (gn.val[i].element) { - case choice_GeneralName_otherName: { - unsigned j; - - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "%sAltName otherName ", name); - - for (j = 0; j < sizeof(altname_types)/sizeof(altname_types[0]); j++) { - if (der_heim_oid_cmp(altname_types[j].oid, - &gn.val[i].u.otherName.type_id) != 0) - continue; - - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "%s: ", - altname_types[j].name); - (*altname_types[j].func)(ctx, &gn.val[i].u.otherName.value); - break; - } - if (j == sizeof(altname_types)/sizeof(altname_types[0])) { - hx509_oid_print(&gn.val[i].u.otherName.type_id, - validate_vprint, ctx); - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, " unknown"); - } - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "\n"); - break; - } - default: { - char *s; - ret = hx509_general_name_unparse(&gn.val[i], &s); - if (ret) { - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "ret = %d unparsing GeneralName\n", ret); - return 1; - } - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "%s\n", s); - free(s); - break; - } - } - } - - free_GeneralNames(&gn); - - return 0; -} - -static int -check_subjectAltName(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, - const Extension *e) -{ - status->haveSAN = 1; - return check_altName(ctx, status, "subject", cf, e); -} - -static int -check_issuerAltName(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, - const Extension *e) -{ - status->haveIAN = 1; - return check_altName(ctx, status, "issuer", cf, e); -} - - -static int -check_basicConstraints(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, - const Extension *e) -{ - BasicConstraints b; - size_t size; - int ret; - - check_Null(ctx, status, cf, e); - - ret = decode_BasicConstraints(e->extnValue.data, e->extnValue.length, - &b, &size); - if (ret) { - printf("\tret = %d while decoding BasicConstraints\n", ret); - return 0; - } - if (size != e->extnValue.length) - printf("\tlength of der data isn't same as extension\n"); - - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "\tis %sa CA\n", b.cA && *b.cA ? "" : "NOT "); - if (b.pathLenConstraint) - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "\tpathLenConstraint: %d\n", *b.pathLenConstraint); - - if (b.cA) { - if (*b.cA) { - if (!e->critical) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Is a CA and not BasicConstraints CRITICAL\n"); - status->isca = 1; - } - else - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "cA is FALSE, not allowed to be\n"); - } - free_BasicConstraints(&b); - - return 0; -} - -static int -check_proxyCertInfo(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, - const Extension *e) -{ - check_Null(ctx, status, cf, e); - status->isproxy = 1; - return 0; -} - -static int -check_authorityInfoAccess(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, - const Extension *e) -{ - AuthorityInfoAccessSyntax aia; - size_t size; - int ret; - size_t i; - - check_Null(ctx, status, cf, e); - - ret = decode_AuthorityInfoAccessSyntax(e->extnValue.data, - e->extnValue.length, - &aia, &size); - if (ret) { - printf("\tret = %d while decoding AuthorityInfoAccessSyntax\n", ret); - return 0; - } - - for (i = 0; i < aia.len; i++) { - char *str; - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "\ttype: "); - hx509_oid_print(&aia.val[i].accessMethod, validate_vprint, ctx); - hx509_general_name_unparse(&aia.val[i].accessLocation, &str); - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "\n\tdirname: %s\n", str); - free(str); - } - free_AuthorityInfoAccessSyntax(&aia); - - return 0; -} - -/* - * - */ - -struct { - const char *name; - const heim_oid *oid; - int (*func)(hx509_validate_ctx ctx, - struct cert_status *status, - enum critical_flag cf, - const Extension *); - enum critical_flag cf; -} check_extension[] = { -#define ext(name, checkname) #name, &asn1_oid_id_x509_ce_##name, check_##checkname - { ext(subjectDirectoryAttributes, Null), M_N_C }, - { ext(subjectKeyIdentifier, subjectKeyIdentifier), M_N_C }, - { ext(keyUsage, Null), S_C }, - { ext(subjectAltName, subjectAltName), M_N_C }, - { ext(issuerAltName, issuerAltName), S_N_C }, - { ext(basicConstraints, basicConstraints), D_C }, - { ext(cRLNumber, Null), M_N_C }, - { ext(cRLReason, Null), M_N_C }, - { ext(holdInstructionCode, Null), M_N_C }, - { ext(invalidityDate, Null), M_N_C }, - { ext(deltaCRLIndicator, Null), M_C }, - { ext(issuingDistributionPoint, Null), M_C }, - { ext(certificateIssuer, Null), M_C }, - { ext(nameConstraints, Null), M_C }, - { ext(cRLDistributionPoints, CRLDistributionPoints), S_N_C }, - { ext(certificatePolicies, Null), 0 }, - { ext(policyMappings, Null), M_N_C }, - { ext(authorityKeyIdentifier, authorityKeyIdentifier), M_N_C }, - { ext(policyConstraints, Null), D_C }, - { ext(extKeyUsage, extKeyUsage), D_C }, - { ext(freshestCRL, Null), M_N_C }, - { ext(inhibitAnyPolicy, Null), M_C }, -#undef ext -#define ext(name, checkname) #name, &asn1_oid_id_pkix_pe_##name, check_##checkname - { ext(proxyCertInfo, proxyCertInfo), M_C }, - { ext(authorityInfoAccess, authorityInfoAccess), M_C }, -#undef ext - { "US Fed PKI - PIV Interim", &asn1_oid_id_uspkicommon_piv_interim, - check_Null, D_C }, - { "Netscape cert comment", &asn1_oid_id_netscape_cert_comment, - check_Null, D_C }, - { NULL, NULL, NULL, 0 } -}; - -/** - * Allocate a hx509 validation/printing context. - * - * @param context A hx509 context. - * @param ctx a new allocated hx509 validation context, free with - * hx509_validate_ctx_free(). - - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_print - */ - -int -hx509_validate_ctx_init(hx509_context context, hx509_validate_ctx *ctx) -{ - *ctx = malloc(sizeof(**ctx)); - if (*ctx == NULL) - return ENOMEM; - memset(*ctx, 0, sizeof(**ctx)); - return 0; -} - -/** - * Set the printing functions for the validation context. - * - * @param ctx a hx509 valication context. - * @param func the printing function to usea. - * @param c the context variable to the printing function. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_print - */ - -void -hx509_validate_ctx_set_print(hx509_validate_ctx ctx, - hx509_vprint_func func, - void *c) -{ - ctx->vprint_func = func; - ctx->ctx = c; -} - -/** - * Add flags to control the behaivor of the hx509_validate_cert() - * function. - * - * @param ctx A hx509 validation context. - * @param flags flags to add to the validation context. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_print - */ - -void -hx509_validate_ctx_add_flags(hx509_validate_ctx ctx, int flags) -{ - ctx->flags |= flags; -} - -/** - * Free an hx509 validate context. - * - * @param ctx the hx509 validate context to free. - * - * @ingroup hx509_print - */ - -void -hx509_validate_ctx_free(hx509_validate_ctx ctx) -{ - free(ctx); -} - -/** - * Validate/Print the status of the certificate. - * - * @param context A hx509 context. - * @param ctx A hx509 validation context. - * @param cert the cerificate to validate/print. - - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_print - */ - -int -hx509_validate_cert(hx509_context context, - hx509_validate_ctx ctx, - hx509_cert cert) -{ - Certificate *c = _hx509_get_cert(cert); - TBSCertificate *t = &c->tbsCertificate; - hx509_name issuer, subject; - char *str; - struct cert_status status; - int ret; - - memset(&status, 0, sizeof(status)); - - if (_hx509_cert_get_version(c) != 3) - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "Not version 3 certificate\n"); - - if ((t->version == NULL || *t->version < 2) && t->extensions) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Not version 3 certificate with extensions\n"); - - if (_hx509_cert_get_version(c) >= 3 && t->extensions == NULL) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Version 3 certificate without extensions\n"); - - ret = hx509_cert_get_subject(cert, &subject); - if (ret) abort(); - hx509_name_to_string(subject, &str); - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "subject name: %s\n", str); - free(str); - - ret = hx509_cert_get_issuer(cert, &issuer); - if (ret) abort(); - hx509_name_to_string(issuer, &str); - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "issuer name: %s\n", str); - free(str); - - if (hx509_name_cmp(subject, issuer) == 0) { - status.selfsigned = 1; - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "\tis a self-signed certificate\n"); - } - - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "Validity:\n"); - - Time2string(&t->validity.notBefore, &str); - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "\tnotBefore %s\n", str); - free(str); - Time2string(&t->validity.notAfter, &str); - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "\tnotAfter %s\n", str); - free(str); - - if (t->extensions) { - size_t i, j; - - if (t->extensions->len == 0) { - validate_print(ctx, - HX509_VALIDATE_F_VALIDATE|HX509_VALIDATE_F_VERBOSE, - "The empty extensions list is not " - "allowed by PKIX\n"); - } - - for (i = 0; i < t->extensions->len; i++) { - - for (j = 0; check_extension[j].name; j++) - if (der_heim_oid_cmp(check_extension[j].oid, - &t->extensions->val[i].extnID) == 0) - break; - if (check_extension[j].name == NULL) { - int flags = HX509_VALIDATE_F_VERBOSE; - if (t->extensions->val[i].critical) - flags |= HX509_VALIDATE_F_VALIDATE; - validate_print(ctx, flags, "don't know what "); - if (t->extensions->val[i].critical) - validate_print(ctx, flags, "and is CRITICAL "); - if (ctx->flags & flags) - hx509_oid_print(&t->extensions->val[i].extnID, - validate_vprint, ctx); - validate_print(ctx, flags, " is\n"); - continue; - } - validate_print(ctx, - HX509_VALIDATE_F_VALIDATE|HX509_VALIDATE_F_VERBOSE, - "checking extention: %s\n", - check_extension[j].name); - (*check_extension[j].func)(ctx, - &status, - check_extension[j].cf, - &t->extensions->val[i]); - } - } else - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, "no extentions\n"); - - if (status.isca) { - if (!status.haveSKI) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "CA certificate have no SubjectKeyIdentifier\n"); - - } else { - if (!status.haveAKI) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Is not CA and doesn't have " - "AuthorityKeyIdentifier\n"); - } - - - if (!status.haveSKI) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Doesn't have SubjectKeyIdentifier\n"); - - if (status.isproxy && status.isca) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Proxy and CA at the same time!\n"); - - if (status.isproxy) { - if (status.haveSAN) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Proxy and have SAN\n"); - if (status.haveIAN) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Proxy and have IAN\n"); - } - - if (hx509_name_is_null_p(subject) && !status.haveSAN) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "NULL subject DN and doesn't have a SAN\n"); - - if (!status.selfsigned && !status.haveCRLDP) - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Not a CA nor PROXY and doesn't have" - "CRL Dist Point\n"); - - if (status.selfsigned) { - ret = _hx509_verify_signature_bitstring(context, - cert, - &c->signatureAlgorithm, - &c->tbsCertificate._save, - &c->signatureValue); - if (ret == 0) - validate_print(ctx, HX509_VALIDATE_F_VERBOSE, - "Self-signed certificate was self-signed\n"); - else - validate_print(ctx, HX509_VALIDATE_F_VALIDATE, - "Self-signed certificate NOT really self-signed!\n"); - } - - hx509_name_free(&subject); - hx509_name_free(&issuer); - - return 0; -} diff --git a/kerberosV/src/lib/hx509/quote.py b/kerberosV/src/lib/hx509/quote.py deleted file mode 100644 index 41887e5d448..00000000000 --- a/kerberosV/src/lib/hx509/quote.py +++ /dev/null @@ -1,101 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- -# -# Copyright (c) 2010 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. -# - -CONTROL_CHAR = 1 -PRINTABLE = 2 -RFC2253_QUOTE_FIRST = 4 -RFC2253_QUOTE_LAST = 8 -RFC2253_QUOTE = 16 -RFC2253_HEX = 32 - -chars = [] - -for i in range(0, 256): - chars.append(0); - -for i in range(0, 256): - if (i < 32 or i > 126): - chars[i] |= CONTROL_CHAR | RFC2253_HEX; - -for i in range(ord("A"), ord("Z") + 1): - chars[i] |= PRINTABLE -for i in range(ord("a"), ord("z") + 1): - chars[i] |= PRINTABLE -for i in range(ord("0"), ord("9") + 1): - chars[i] |= PRINTABLE - -chars[ord(' ')] |= PRINTABLE -chars[ord('+')] |= PRINTABLE -chars[ord(',')] |= PRINTABLE -chars[ord('-')] |= PRINTABLE -chars[ord('.')] |= PRINTABLE -chars[ord('/')] |= PRINTABLE -chars[ord(':')] |= PRINTABLE -chars[ord('=')] |= PRINTABLE -chars[ord('?')] |= PRINTABLE - -chars[ord(' ')] |= RFC2253_QUOTE_FIRST | RFC2253_QUOTE_FIRST - -chars[ord(',')] |= RFC2253_QUOTE -chars[ord('=')] |= RFC2253_QUOTE -chars[ord('+')] |= RFC2253_QUOTE -chars[ord('<')] |= RFC2253_QUOTE -chars[ord('>')] |= RFC2253_QUOTE -chars[ord('#')] |= RFC2253_QUOTE -chars[ord(';')] |= RFC2253_QUOTE - -print "#define Q_CONTROL_CHAR 1" -print "#define Q_PRINTABLE 2" -print "#define Q_RFC2253_QUOTE_FIRST 4" -print "#define Q_RFC2253_QUOTE_LAST 8" -print "#define Q_RFC2253_QUOTE 16" -print "#define Q_RFC2253_HEX 32" -print "" -print "#define Q_RFC2253 (Q_RFC2253_QUOTE_FIRST|Q_RFC2253_QUOTE_LAST|Q_RFC2253_QUOTE|Q_RFC2253_HEX)" -print "\n" * 2 - - - - -print "unsigned char char_map[] = {\n\t", -for x in range(0, 256): - if (x % 8) == 0 and x != 0: - print "\n\t", - print "0x%(char)02x" % { 'char' : chars[x] }, - if x < 255: - print ", ", - else: - print "" -print "};" diff --git a/kerberosV/src/lib/hx509/ref/pkcs11.h b/kerberosV/src/lib/hx509/ref/pkcs11.h deleted file mode 100644 index 950087ae917..00000000000 --- a/kerberosV/src/lib/hx509/ref/pkcs11.h +++ /dev/null @@ -1,1357 +0,0 @@ -/* pkcs11.h - Copyright 2006, 2007 g10 Code GmbH - Copyright 2006 Andreas Jellinghaus - - This file is free software; as a special exception the author gives - unlimited permission to copy and/or distribute it, with or without - modifications, as long as this notice is preserved. - - This file 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. */ - -/* Please submit changes back to the Scute project at - http://www.scute.org/ (or send them to marcus@g10code.com), so that - they can be picked up by other projects from there as well. */ - -/* This file is a modified implementation of the PKCS #11 standard by - RSA Security Inc. It is mostly a drop-in replacement, with the - following change: - - This header file does not require any macro definitions by the user - (like CK_DEFINE_FUNCTION etc). In fact, it defines those macros - for you (if useful, some are missing, let me know if you need - more). - - There is an additional API available that does comply better to the - GNU coding standard. It can be switched on by defining - CRYPTOKI_GNU before including this header file. For this, the - following changes are made to the specification: - - All structure types are changed to a "struct ck_foo" where CK_FOO - is the type name in PKCS #11. - - All non-structure types are changed to ck_foo_t where CK_FOO is the - lowercase version of the type name in PKCS #11. The basic types - (CK_ULONG et al.) are removed without substitute. - - All members of structures are modified in the following way: Type - indication prefixes are removed, and underscore characters are - inserted before words. Then the result is lowercased. - - Note that function names are still in the original case, as they - need for ABI compatibility. - - CK_FALSE, CK_TRUE and NULL_PTR are removed without substitute. Use - . - - If CRYPTOKI_COMPAT is defined before including this header file, - then none of the API changes above take place, and the API is the - one defined by the PKCS #11 standard. */ - -#ifndef PKCS11_H -#define PKCS11_H 1 - -#if defined(__cplusplus) -extern "C" { -#endif - - -/* The version of cryptoki we implement. The revision is changed with - each modification of this file. If you do not use the "official" - version of this file, please consider deleting the revision macro - (you may use a macro with a different name to keep track of your - versions). */ -#define CRYPTOKI_VERSION_MAJOR 2 -#define CRYPTOKI_VERSION_MINOR 20 -#define CRYPTOKI_VERSION_REVISION 6 - - -/* Compatibility interface is default, unless CRYPTOKI_GNU is - given. */ -#ifndef CRYPTOKI_GNU -#ifndef CRYPTOKI_COMPAT -#define CRYPTOKI_COMPAT 1 -#endif -#endif - -/* System dependencies. */ - -#if defined(_WIN32) || defined(CRYPTOKI_FORCE_WIN32) - -/* There is a matching pop below. */ -#pragma pack(push, cryptoki, 1) - -#ifdef CRYPTOKI_EXPORTS -#define CK_SPEC __declspec(dllexport) -#else -#define CK_SPEC __declspec(dllimport) -#endif - -#else - -#define CK_SPEC - -#endif - - -#ifdef CRYPTOKI_COMPAT - /* If we are in compatibility mode, switch all exposed names to the - PKCS #11 variant. There are corresponding #undefs below. */ - -#define ck_flags_t CK_FLAGS -#define ck_version _CK_VERSION - -#define ck_info _CK_INFO -#define cryptoki_version cryptokiVersion -#define manufacturer_id manufacturerID -#define library_description libraryDescription -#define library_version libraryVersion - -#define ck_notification_t CK_NOTIFICATION -#define ck_slot_id_t CK_SLOT_ID - -#define ck_slot_info _CK_SLOT_INFO -#define slot_description slotDescription -#define hardware_version hardwareVersion -#define firmware_version firmwareVersion - -#define ck_token_info _CK_TOKEN_INFO -#define serial_number serialNumber -#define max_session_count ulMaxSessionCount -#define session_count ulSessionCount -#define max_rw_session_count ulMaxRwSessionCount -#define rw_session_count ulRwSessionCount -#define max_pin_len ulMaxPinLen -#define min_pin_len ulMinPinLen -#define total_public_memory ulTotalPublicMemory -#define free_public_memory ulFreePublicMemory -#define total_private_memory ulTotalPrivateMemory -#define free_private_memory ulFreePrivateMemory -#define utc_time utcTime - -#define ck_session_handle_t CK_SESSION_HANDLE -#define ck_user_type_t CK_USER_TYPE -#define ck_state_t CK_STATE - -#define ck_session_info _CK_SESSION_INFO -#define slot_id slotID -#define device_error ulDeviceError - -#define ck_object_handle_t CK_OBJECT_HANDLE -#define ck_object_class_t CK_OBJECT_CLASS -#define ck_hw_feature_type_t CK_HW_FEATURE_TYPE -#define ck_key_type_t CK_KEY_TYPE -#define ck_certificate_type_t CK_CERTIFICATE_TYPE -#define ck_attribute_type_t CK_ATTRIBUTE_TYPE - -#define ck_attribute _CK_ATTRIBUTE -#define value pValue -#define value_len ulValueLen - -#define ck_date _CK_DATE - -#define ck_mechanism_type_t CK_MECHANISM_TYPE - -#define ck_mechanism _CK_MECHANISM -#define parameter pParameter -#define parameter_len ulParameterLen - -#define ck_mechanism_info _CK_MECHANISM_INFO -#define min_key_size ulMinKeySize -#define max_key_size ulMaxKeySize - -#define ck_rv_t CK_RV -#define ck_notify_t CK_NOTIFY - -#define ck_function_list _CK_FUNCTION_LIST - -#define ck_createmutex_t CK_CREATEMUTEX -#define ck_destroymutex_t CK_DESTROYMUTEX -#define ck_lockmutex_t CK_LOCKMUTEX -#define ck_unlockmutex_t CK_UNLOCKMUTEX - -#define ck_c_initialize_args _CK_C_INITIALIZE_ARGS -#define create_mutex CreateMutex -#define destroy_mutex DestroyMutex -#define lock_mutex LockMutex -#define unlock_mutex UnlockMutex -#define reserved pReserved - -#endif /* CRYPTOKI_COMPAT */ - - - -typedef unsigned long ck_flags_t; - -struct ck_version -{ - unsigned char major; - unsigned char minor; -}; - - -struct ck_info -{ - struct ck_version cryptoki_version; - unsigned char manufacturer_id[32]; - ck_flags_t flags; - unsigned char library_description[32]; - struct ck_version library_version; -}; - - -typedef unsigned long ck_notification_t; - -#define CKN_SURRENDER (0) - - -typedef unsigned long ck_slot_id_t; - - -struct ck_slot_info -{ - unsigned char slot_description[64]; - unsigned char manufacturer_id[32]; - ck_flags_t flags; - struct ck_version hardware_version; - struct ck_version firmware_version; -}; - - -#define CKF_TOKEN_PRESENT (1 << 0) -#define CKF_REMOVABLE_DEVICE (1 << 1) -#define CKF_HW_SLOT (1 << 2) -#define CKF_ARRAY_ATTRIBUTE (1 << 30) - - -struct ck_token_info -{ - unsigned char label[32]; - unsigned char manufacturer_id[32]; - unsigned char model[16]; - unsigned char serial_number[16]; - ck_flags_t flags; - unsigned long max_session_count; - unsigned long session_count; - unsigned long max_rw_session_count; - unsigned long rw_session_count; - unsigned long max_pin_len; - unsigned long min_pin_len; - unsigned long total_public_memory; - unsigned long free_public_memory; - unsigned long total_private_memory; - unsigned long free_private_memory; - struct ck_version hardware_version; - struct ck_version firmware_version; - unsigned char utc_time[16]; -}; - - -#define CKF_RNG (1 << 0) -#define CKF_WRITE_PROTECTED (1 << 1) -#define CKF_LOGIN_REQUIRED (1 << 2) -#define CKF_USER_PIN_INITIALIZED (1 << 3) -#define CKF_RESTORE_KEY_NOT_NEEDED (1 << 5) -#define CKF_CLOCK_ON_TOKEN (1 << 6) -#define CKF_PROTECTED_AUTHENTICATION_PATH (1 << 8) -#define CKF_DUAL_CRYPTO_OPERATIONS (1 << 9) -#define CKF_TOKEN_INITIALIZED (1 << 10) -#define CKF_SECONDARY_AUTHENTICATION (1 << 11) -#define CKF_USER_PIN_COUNT_LOW (1 << 16) -#define CKF_USER_PIN_FINAL_TRY (1 << 17) -#define CKF_USER_PIN_LOCKED (1 << 18) -#define CKF_USER_PIN_TO_BE_CHANGED (1 << 19) -#define CKF_SO_PIN_COUNT_LOW (1 << 20) -#define CKF_SO_PIN_FINAL_TRY (1 << 21) -#define CKF_SO_PIN_LOCKED (1 << 22) -#define CKF_SO_PIN_TO_BE_CHANGED (1 << 23) - -#define CK_UNAVAILABLE_INFORMATION ((unsigned long) -1) -#define CK_EFFECTIVELY_INFINITE (0) - - -typedef unsigned long ck_session_handle_t; - -#define CK_INVALID_HANDLE (0) - - -typedef unsigned long ck_user_type_t; - -#define CKU_SO (0) -#define CKU_USER (1) -#define CKU_CONTEXT_SPECIFIC (2) - - -typedef unsigned long ck_state_t; - -#define CKS_RO_PUBLIC_SESSION (0) -#define CKS_RO_USER_FUNCTIONS (1) -#define CKS_RW_PUBLIC_SESSION (2) -#define CKS_RW_USER_FUNCTIONS (3) -#define CKS_RW_SO_FUNCTIONS (4) - - -struct ck_session_info -{ - ck_slot_id_t slot_id; - ck_state_t state; - ck_flags_t flags; - unsigned long device_error; -}; - -#define CKF_RW_SESSION (1 << 1) -#define CKF_SERIAL_SESSION (1 << 2) - - -typedef unsigned long ck_object_handle_t; - - -typedef unsigned long ck_object_class_t; - -#define CKO_DATA (0) -#define CKO_CERTIFICATE (1) -#define CKO_PUBLIC_KEY (2) -#define CKO_PRIVATE_KEY (3) -#define CKO_SECRET_KEY (4) -#define CKO_HW_FEATURE (5) -#define CKO_DOMAIN_PARAMETERS (6) -#define CKO_MECHANISM (7) -#define CKO_VENDOR_DEFINED ((unsigned long) (1U << 31)) - - -typedef unsigned long ck_hw_feature_type_t; - -#define CKH_MONOTONIC_COUNTER (1) -#define CKH_CLOCK (2) -#define CKH_USER_INTERFACE (3) -#define CKH_VENDOR_DEFINED ((unsigned long) (1U << 31)) - - -typedef unsigned long ck_key_type_t; - -#define CKK_RSA (0) -#define CKK_DSA (1) -#define CKK_DH (2) -#define CKK_ECDSA (3) -#define CKK_EC (3) -#define CKK_X9_42_DH (4) -#define CKK_KEA (5) -#define CKK_GENERIC_SECRET (0x10) -#define CKK_RC2 (0x11) -#define CKK_RC4 (0x12) -#define CKK_DES (0x13) -#define CKK_DES2 (0x14) -#define CKK_DES3 (0x15) -#define CKK_CAST (0x16) -#define CKK_CAST3 (0x17) -#define CKK_CAST128 (0x18) -#define CKK_RC5 (0x19) -#define CKK_IDEA (0x1a) -#define CKK_SKIPJACK (0x1b) -#define CKK_BATON (0x1c) -#define CKK_JUNIPER (0x1d) -#define CKK_CDMF (0x1e) -#define CKK_AES (0x1f) -#define CKK_BLOWFISH (0x20) -#define CKK_TWOFISH (0x21) -#define CKK_VENDOR_DEFINED ((unsigned long) (1U << 31)) - - -typedef unsigned long ck_certificate_type_t; - -#define CKC_X_509 (0) -#define CKC_X_509_ATTR_CERT (1) -#define CKC_WTLS (2) -#define CKC_VENDOR_DEFINED ((unsigned long) (1U << 31)) - - -typedef unsigned long ck_attribute_type_t; - -#define CKA_CLASS (0) -#define CKA_TOKEN (1) -#define CKA_PRIVATE (2) -#define CKA_LABEL (3) -#define CKA_APPLICATION (0x10) -#define CKA_VALUE (0x11) -#define CKA_OBJECT_ID (0x12) -#define CKA_CERTIFICATE_TYPE (0x80) -#define CKA_ISSUER (0x81) -#define CKA_SERIAL_NUMBER (0x82) -#define CKA_AC_ISSUER (0x83) -#define CKA_OWNER (0x84) -#define CKA_ATTR_TYPES (0x85) -#define CKA_TRUSTED (0x86) -#define CKA_CERTIFICATE_CATEGORY (0x87) -#define CKA_JAVA_MIDP_SECURITY_DOMAIN (0x88) -#define CKA_URL (0x89) -#define CKA_HASH_OF_SUBJECT_PUBLIC_KEY (0x8a) -#define CKA_HASH_OF_ISSUER_PUBLIC_KEY (0x8b) -#define CKA_CHECK_VALUE (0x90) -#define CKA_KEY_TYPE (0x100) -#define CKA_SUBJECT (0x101) -#define CKA_ID (0x102) -#define CKA_SENSITIVE (0x103) -#define CKA_ENCRYPT (0x104) -#define CKA_DECRYPT (0x105) -#define CKA_WRAP (0x106) -#define CKA_UNWRAP (0x107) -#define CKA_SIGN (0x108) -#define CKA_SIGN_RECOVER (0x109) -#define CKA_VERIFY (0x10a) -#define CKA_VERIFY_RECOVER (0x10b) -#define CKA_DERIVE (0x10c) -#define CKA_START_DATE (0x110) -#define CKA_END_DATE (0x111) -#define CKA_MODULUS (0x120) -#define CKA_MODULUS_BITS (0x121) -#define CKA_PUBLIC_EXPONENT (0x122) -#define CKA_PRIVATE_EXPONENT (0x123) -#define CKA_PRIME_1 (0x124) -#define CKA_PRIME_2 (0x125) -#define CKA_EXPONENT_1 (0x126) -#define CKA_EXPONENT_2 (0x127) -#define CKA_COEFFICIENT (0x128) -#define CKA_PRIME (0x130) -#define CKA_SUBPRIME (0x131) -#define CKA_BASE (0x132) -#define CKA_PRIME_BITS (0x133) -#define CKA_SUB_PRIME_BITS (0x134) -#define CKA_VALUE_BITS (0x160) -#define CKA_VALUE_LEN (0x161) -#define CKA_EXTRACTABLE (0x162) -#define CKA_LOCAL (0x163) -#define CKA_NEVER_EXTRACTABLE (0x164) -#define CKA_ALWAYS_SENSITIVE (0x165) -#define CKA_KEY_GEN_MECHANISM (0x166) -#define CKA_MODIFIABLE (0x170) -#define CKA_ECDSA_PARAMS (0x180) -#define CKA_EC_PARAMS (0x180) -#define CKA_EC_POINT (0x181) -#define CKA_SECONDARY_AUTH (0x200) -#define CKA_AUTH_PIN_FLAGS (0x201) -#define CKA_ALWAYS_AUTHENTICATE (0x202) -#define CKA_WRAP_WITH_TRUSTED (0x210) -#define CKA_HW_FEATURE_TYPE (0x300) -#define CKA_RESET_ON_INIT (0x301) -#define CKA_HAS_RESET (0x302) -#define CKA_PIXEL_X (0x400) -#define CKA_PIXEL_Y (0x401) -#define CKA_RESOLUTION (0x402) -#define CKA_CHAR_ROWS (0x403) -#define CKA_CHAR_COLUMNS (0x404) -#define CKA_COLOR (0x405) -#define CKA_BITS_PER_PIXEL (0x406) -#define CKA_CHAR_SETS (0x480) -#define CKA_ENCODING_METHODS (0x481) -#define CKA_MIME_TYPES (0x482) -#define CKA_MECHANISM_TYPE (0x500) -#define CKA_REQUIRED_CMS_ATTRIBUTES (0x501) -#define CKA_DEFAULT_CMS_ATTRIBUTES (0x502) -#define CKA_SUPPORTED_CMS_ATTRIBUTES (0x503) -#define CKA_WRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x211) -#define CKA_UNWRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x212) -#define CKA_ALLOWED_MECHANISMS (CKF_ARRAY_ATTRIBUTE | 0x600) -#define CKA_VENDOR_DEFINED ((unsigned long) (1U << 31)) - - -struct ck_attribute -{ - ck_attribute_type_t type; - void *value; - unsigned long value_len; -}; - - -struct ck_date -{ - unsigned char year[4]; - unsigned char month[2]; - unsigned char day[2]; -}; - - -typedef unsigned long ck_mechanism_type_t; - -#define CKM_RSA_PKCS_KEY_PAIR_GEN (0) -#define CKM_RSA_PKCS (1) -#define CKM_RSA_9796 (2) -#define CKM_RSA_X_509 (3) -#define CKM_MD2_RSA_PKCS (4) -#define CKM_MD5_RSA_PKCS (5) -#define CKM_SHA1_RSA_PKCS (6) -#define CKM_RIPEMD128_RSA_PKCS (7) -#define CKM_RIPEMD160_RSA_PKCS (8) -#define CKM_RSA_PKCS_OAEP (9) -#define CKM_RSA_X9_31_KEY_PAIR_GEN (0xa) -#define CKM_RSA_X9_31 (0xb) -#define CKM_SHA1_RSA_X9_31 (0xc) -#define CKM_RSA_PKCS_PSS (0xd) -#define CKM_SHA1_RSA_PKCS_PSS (0xe) -#define CKM_DSA_KEY_PAIR_GEN (0x10) -#define CKM_DSA (0x11) -#define CKM_DSA_SHA1 (0x12) -#define CKM_DH_PKCS_KEY_PAIR_GEN (0x20) -#define CKM_DH_PKCS_DERIVE (0x21) -#define CKM_X9_42_DH_KEY_PAIR_GEN (0x30) -#define CKM_X9_42_DH_DERIVE (0x31) -#define CKM_X9_42_DH_HYBRID_DERIVE (0x32) -#define CKM_X9_42_MQV_DERIVE (0x33) -#define CKM_SHA256_RSA_PKCS (0x40) -#define CKM_SHA384_RSA_PKCS (0x41) -#define CKM_SHA512_RSA_PKCS (0x42) -#define CKM_SHA256_RSA_PKCS_PSS (0x43) -#define CKM_SHA384_RSA_PKCS_PSS (0x44) -#define CKM_SHA512_RSA_PKCS_PSS (0x45) -#define CKM_RC2_KEY_GEN (0x100) -#define CKM_RC2_ECB (0x101) -#define CKM_RC2_CBC (0x102) -#define CKM_RC2_MAC (0x103) -#define CKM_RC2_MAC_GENERAL (0x104) -#define CKM_RC2_CBC_PAD (0x105) -#define CKM_RC4_KEY_GEN (0x110) -#define CKM_RC4 (0x111) -#define CKM_DES_KEY_GEN (0x120) -#define CKM_DES_ECB (0x121) -#define CKM_DES_CBC (0x122) -#define CKM_DES_MAC (0x123) -#define CKM_DES_MAC_GENERAL (0x124) -#define CKM_DES_CBC_PAD (0x125) -#define CKM_DES2_KEY_GEN (0x130) -#define CKM_DES3_KEY_GEN (0x131) -#define CKM_DES3_ECB (0x132) -#define CKM_DES3_CBC (0x133) -#define CKM_DES3_MAC (0x134) -#define CKM_DES3_MAC_GENERAL (0x135) -#define CKM_DES3_CBC_PAD (0x136) -#define CKM_CDMF_KEY_GEN (0x140) -#define CKM_CDMF_ECB (0x141) -#define CKM_CDMF_CBC (0x142) -#define CKM_CDMF_MAC (0x143) -#define CKM_CDMF_MAC_GENERAL (0x144) -#define CKM_CDMF_CBC_PAD (0x145) -#define CKM_MD2 (0x200) -#define CKM_MD2_HMAC (0x201) -#define CKM_MD2_HMAC_GENERAL (0x202) -#define CKM_MD5 (0x210) -#define CKM_MD5_HMAC (0x211) -#define CKM_MD5_HMAC_GENERAL (0x212) -#define CKM_SHA_1 (0x220) -#define CKM_SHA_1_HMAC (0x221) -#define CKM_SHA_1_HMAC_GENERAL (0x222) -#define CKM_RIPEMD128 (0x230) -#define CKM_RIPEMD128_HMAC (0x231) -#define CKM_RIPEMD128_HMAC_GENERAL (0x232) -#define CKM_RIPEMD160 (0x240) -#define CKM_RIPEMD160_HMAC (0x241) -#define CKM_RIPEMD160_HMAC_GENERAL (0x242) -#define CKM_SHA256 (0x250) -#define CKM_SHA256_HMAC (0x251) -#define CKM_SHA256_HMAC_GENERAL (0x252) -#define CKM_SHA384 (0x260) -#define CKM_SHA384_HMAC (0x261) -#define CKM_SHA384_HMAC_GENERAL (0x262) -#define CKM_SHA512 (0x270) -#define CKM_SHA512_HMAC (0x271) -#define CKM_SHA512_HMAC_GENERAL (0x272) -#define CKM_CAST_KEY_GEN (0x300) -#define CKM_CAST_ECB (0x301) -#define CKM_CAST_CBC (0x302) -#define CKM_CAST_MAC (0x303) -#define CKM_CAST_MAC_GENERAL (0x304) -#define CKM_CAST_CBC_PAD (0x305) -#define CKM_CAST3_KEY_GEN (0x310) -#define CKM_CAST3_ECB (0x311) -#define CKM_CAST3_CBC (0x312) -#define CKM_CAST3_MAC (0x313) -#define CKM_CAST3_MAC_GENERAL (0x314) -#define CKM_CAST3_CBC_PAD (0x315) -#define CKM_CAST5_KEY_GEN (0x320) -#define CKM_CAST128_KEY_GEN (0x320) -#define CKM_CAST5_ECB (0x321) -#define CKM_CAST128_ECB (0x321) -#define CKM_CAST5_CBC (0x322) -#define CKM_CAST128_CBC (0x322) -#define CKM_CAST5_MAC (0x323) -#define CKM_CAST128_MAC (0x323) -#define CKM_CAST5_MAC_GENERAL (0x324) -#define CKM_CAST128_MAC_GENERAL (0x324) -#define CKM_CAST5_CBC_PAD (0x325) -#define CKM_CAST128_CBC_PAD (0x325) -#define CKM_RC5_KEY_GEN (0x330) -#define CKM_RC5_ECB (0x331) -#define CKM_RC5_CBC (0x332) -#define CKM_RC5_MAC (0x333) -#define CKM_RC5_MAC_GENERAL (0x334) -#define CKM_RC5_CBC_PAD (0x335) -#define CKM_IDEA_KEY_GEN (0x340) -#define CKM_IDEA_ECB (0x341) -#define CKM_IDEA_CBC (0x342) -#define CKM_IDEA_MAC (0x343) -#define CKM_IDEA_MAC_GENERAL (0x344) -#define CKM_IDEA_CBC_PAD (0x345) -#define CKM_GENERIC_SECRET_KEY_GEN (0x350) -#define CKM_CONCATENATE_BASE_AND_KEY (0x360) -#define CKM_CONCATENATE_BASE_AND_DATA (0x362) -#define CKM_CONCATENATE_DATA_AND_BASE (0x363) -#define CKM_XOR_BASE_AND_DATA (0x364) -#define CKM_EXTRACT_KEY_FROM_KEY (0x365) -#define CKM_SSL3_PRE_MASTER_KEY_GEN (0x370) -#define CKM_SSL3_MASTER_KEY_DERIVE (0x371) -#define CKM_SSL3_KEY_AND_MAC_DERIVE (0x372) -#define CKM_SSL3_MASTER_KEY_DERIVE_DH (0x373) -#define CKM_TLS_PRE_MASTER_KEY_GEN (0x374) -#define CKM_TLS_MASTER_KEY_DERIVE (0x375) -#define CKM_TLS_KEY_AND_MAC_DERIVE (0x376) -#define CKM_TLS_MASTER_KEY_DERIVE_DH (0x377) -#define CKM_SSL3_MD5_MAC (0x380) -#define CKM_SSL3_SHA1_MAC (0x381) -#define CKM_MD5_KEY_DERIVATION (0x390) -#define CKM_MD2_KEY_DERIVATION (0x391) -#define CKM_SHA1_KEY_DERIVATION (0x392) -#define CKM_PBE_MD2_DES_CBC (0x3a0) -#define CKM_PBE_MD5_DES_CBC (0x3a1) -#define CKM_PBE_MD5_CAST_CBC (0x3a2) -#define CKM_PBE_MD5_CAST3_CBC (0x3a3) -#define CKM_PBE_MD5_CAST5_CBC (0x3a4) -#define CKM_PBE_MD5_CAST128_CBC (0x3a4) -#define CKM_PBE_SHA1_CAST5_CBC (0x3a5) -#define CKM_PBE_SHA1_CAST128_CBC (0x3a5) -#define CKM_PBE_SHA1_RC4_128 (0x3a6) -#define CKM_PBE_SHA1_RC4_40 (0x3a7) -#define CKM_PBE_SHA1_DES3_EDE_CBC (0x3a8) -#define CKM_PBE_SHA1_DES2_EDE_CBC (0x3a9) -#define CKM_PBE_SHA1_RC2_128_CBC (0x3aa) -#define CKM_PBE_SHA1_RC2_40_CBC (0x3ab) -#define CKM_PKCS5_PBKD2 (0x3b0) -#define CKM_PBA_SHA1_WITH_SHA1_HMAC (0x3c0) -#define CKM_KEY_WRAP_LYNKS (0x400) -#define CKM_KEY_WRAP_SET_OAEP (0x401) -#define CKM_SKIPJACK_KEY_GEN (0x1000) -#define CKM_SKIPJACK_ECB64 (0x1001) -#define CKM_SKIPJACK_CBC64 (0x1002) -#define CKM_SKIPJACK_OFB64 (0x1003) -#define CKM_SKIPJACK_CFB64 (0x1004) -#define CKM_SKIPJACK_CFB32 (0x1005) -#define CKM_SKIPJACK_CFB16 (0x1006) -#define CKM_SKIPJACK_CFB8 (0x1007) -#define CKM_SKIPJACK_WRAP (0x1008) -#define CKM_SKIPJACK_PRIVATE_WRAP (0x1009) -#define CKM_SKIPJACK_RELAYX (0x100a) -#define CKM_KEA_KEY_PAIR_GEN (0x1010) -#define CKM_KEA_KEY_DERIVE (0x1011) -#define CKM_FORTEZZA_TIMESTAMP (0x1020) -#define CKM_BATON_KEY_GEN (0x1030) -#define CKM_BATON_ECB128 (0x1031) -#define CKM_BATON_ECB96 (0x1032) -#define CKM_BATON_CBC128 (0x1033) -#define CKM_BATON_COUNTER (0x1034) -#define CKM_BATON_SHUFFLE (0x1035) -#define CKM_BATON_WRAP (0x1036) -#define CKM_ECDSA_KEY_PAIR_GEN (0x1040) -#define CKM_EC_KEY_PAIR_GEN (0x1040) -#define CKM_ECDSA (0x1041) -#define CKM_ECDSA_SHA1 (0x1042) -#define CKM_ECDH1_DERIVE (0x1050) -#define CKM_ECDH1_COFACTOR_DERIVE (0x1051) -#define CKM_ECMQV_DERIVE (0x1052) -#define CKM_JUNIPER_KEY_GEN (0x1060) -#define CKM_JUNIPER_ECB128 (0x1061) -#define CKM_JUNIPER_CBC128 (0x1062) -#define CKM_JUNIPER_COUNTER (0x1063) -#define CKM_JUNIPER_SHUFFLE (0x1064) -#define CKM_JUNIPER_WRAP (0x1065) -#define CKM_FASTHASH (0x1070) -#define CKM_AES_KEY_GEN (0x1080) -#define CKM_AES_ECB (0x1081) -#define CKM_AES_CBC (0x1082) -#define CKM_AES_MAC (0x1083) -#define CKM_AES_MAC_GENERAL (0x1084) -#define CKM_AES_CBC_PAD (0x1085) -#define CKM_DSA_PARAMETER_GEN (0x2000) -#define CKM_DH_PKCS_PARAMETER_GEN (0x2001) -#define CKM_X9_42_DH_PARAMETER_GEN (0x2002) -#define CKM_VENDOR_DEFINED ((unsigned long) (1U << 31)) - - -struct ck_mechanism -{ - ck_mechanism_type_t mechanism; - void *parameter; - unsigned long parameter_len; -}; - - -struct ck_mechanism_info -{ - unsigned long min_key_size; - unsigned long max_key_size; - ck_flags_t flags; -}; - -#define CKF_HW (1 << 0) -#define CKF_ENCRYPT (1 << 8) -#define CKF_DECRYPT (1 << 9) -#define CKF_DIGEST (1 << 10) -#define CKF_SIGN (1 << 11) -#define CKF_SIGN_RECOVER (1 << 12) -#define CKF_VERIFY (1 << 13) -#define CKF_VERIFY_RECOVER (1 << 14) -#define CKF_GENERATE (1 << 15) -#define CKF_GENERATE_KEY_PAIR (1 << 16) -#define CKF_WRAP (1 << 17) -#define CKF_UNWRAP (1 << 18) -#define CKF_DERIVE (1 << 19) -#define CKF_EXTENSION ((unsigned long) (1U << 31)) - - -/* Flags for C_WaitForSlotEvent. */ -#define CKF_DONT_BLOCK (1) - - -typedef unsigned long ck_rv_t; - - -typedef ck_rv_t (*ck_notify_t) (ck_session_handle_t session, - ck_notification_t event, void *application); - -/* Forward reference. */ -struct ck_function_list; - -#define _CK_DECLARE_FUNCTION(name, args) \ -typedef ck_rv_t (*CK_ ## name) args; \ -ck_rv_t CK_SPEC name args - -_CK_DECLARE_FUNCTION (C_Initialize, (void *init_args)); -_CK_DECLARE_FUNCTION (C_Finalize, (void *reserved)); -_CK_DECLARE_FUNCTION (C_GetInfo, (struct ck_info *info)); -_CK_DECLARE_FUNCTION (C_GetFunctionList, - (struct ck_function_list **function_list)); - -_CK_DECLARE_FUNCTION (C_GetSlotList, - (unsigned char token_present, ck_slot_id_t *slot_list, - unsigned long *count)); -_CK_DECLARE_FUNCTION (C_GetSlotInfo, - (ck_slot_id_t slot_id, struct ck_slot_info *info)); -_CK_DECLARE_FUNCTION (C_GetTokenInfo, - (ck_slot_id_t slot_id, struct ck_token_info *info)); -_CK_DECLARE_FUNCTION (C_WaitForSlotEvent, - (ck_flags_t flags, ck_slot_id_t *slot, void *reserved)); -_CK_DECLARE_FUNCTION (C_GetMechanismList, - (ck_slot_id_t slot_id, - ck_mechanism_type_t *mechanism_list, - unsigned long *count)); -_CK_DECLARE_FUNCTION (C_GetMechanismInfo, - (ck_slot_id_t slot_id, ck_mechanism_type_t type, - struct ck_mechanism_info *info)); -_CK_DECLARE_FUNCTION (C_InitToken, - (ck_slot_id_t slot_id, unsigned char *pin, - unsigned long pin_len, unsigned char *label)); -_CK_DECLARE_FUNCTION (C_InitPIN, - (ck_session_handle_t session, unsigned char *pin, - unsigned long pin_len)); -_CK_DECLARE_FUNCTION (C_SetPIN, - (ck_session_handle_t session, unsigned char *old_pin, - unsigned long old_len, unsigned char *new_pin, - unsigned long new_len)); - -_CK_DECLARE_FUNCTION (C_OpenSession, - (ck_slot_id_t slot_id, ck_flags_t flags, - void *application, ck_notify_t notify, - ck_session_handle_t *session)); -_CK_DECLARE_FUNCTION (C_CloseSession, (ck_session_handle_t session)); -_CK_DECLARE_FUNCTION (C_CloseAllSessions, (ck_slot_id_t slot_id)); -_CK_DECLARE_FUNCTION (C_GetSessionInfo, - (ck_session_handle_t session, - struct ck_session_info *info)); -_CK_DECLARE_FUNCTION (C_GetOperationState, - (ck_session_handle_t session, - unsigned char *operation_state, - unsigned long *operation_state_len)); -_CK_DECLARE_FUNCTION (C_SetOperationState, - (ck_session_handle_t session, - unsigned char *operation_state, - unsigned long operation_state_len, - ck_object_handle_t encryption_key, - ck_object_handle_t authentiation_key)); -_CK_DECLARE_FUNCTION (C_Login, - (ck_session_handle_t session, ck_user_type_t user_type, - unsigned char *pin, unsigned long pin_len)); -_CK_DECLARE_FUNCTION (C_Logout, (ck_session_handle_t session)); - -_CK_DECLARE_FUNCTION (C_CreateObject, - (ck_session_handle_t session, - struct ck_attribute *templ, - unsigned long count, ck_object_handle_t *object)); -_CK_DECLARE_FUNCTION (C_CopyObject, - (ck_session_handle_t session, ck_object_handle_t object, - struct ck_attribute *templ, unsigned long count, - ck_object_handle_t *new_object)); -_CK_DECLARE_FUNCTION (C_DestroyObject, - (ck_session_handle_t session, - ck_object_handle_t object)); -_CK_DECLARE_FUNCTION (C_GetObjectSize, - (ck_session_handle_t session, - ck_object_handle_t object, - unsigned long *size)); -_CK_DECLARE_FUNCTION (C_GetAttributeValue, - (ck_session_handle_t session, - ck_object_handle_t object, - struct ck_attribute *templ, - unsigned long count)); -_CK_DECLARE_FUNCTION (C_SetAttributeValue, - (ck_session_handle_t session, - ck_object_handle_t object, - struct ck_attribute *templ, - unsigned long count)); -_CK_DECLARE_FUNCTION (C_FindObjectsInit, - (ck_session_handle_t session, - struct ck_attribute *templ, - unsigned long count)); -_CK_DECLARE_FUNCTION (C_FindObjects, - (ck_session_handle_t session, - ck_object_handle_t *object, - unsigned long max_object_count, - unsigned long *object_count)); -_CK_DECLARE_FUNCTION (C_FindObjectsFinal, - (ck_session_handle_t session)); - -_CK_DECLARE_FUNCTION (C_EncryptInit, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - ck_object_handle_t key)); -_CK_DECLARE_FUNCTION (C_Encrypt, - (ck_session_handle_t session, - unsigned char *data, unsigned long data_len, - unsigned char *encrypted_data, - unsigned long *encrypted_data_len)); -_CK_DECLARE_FUNCTION (C_EncryptUpdate, - (ck_session_handle_t session, - unsigned char *part, unsigned long part_len, - unsigned char *encrypted_part, - unsigned long *encrypted_part_len)); -_CK_DECLARE_FUNCTION (C_EncryptFinal, - (ck_session_handle_t session, - unsigned char *last_encrypted_part, - unsigned long *last_encrypted_part_len)); - -_CK_DECLARE_FUNCTION (C_DecryptInit, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - ck_object_handle_t key)); -_CK_DECLARE_FUNCTION (C_Decrypt, - (ck_session_handle_t session, - unsigned char *encrypted_data, - unsigned long encrypted_data_len, - unsigned char *data, unsigned long *data_len)); -_CK_DECLARE_FUNCTION (C_DecryptUpdate, - (ck_session_handle_t session, - unsigned char *encrypted_part, - unsigned long encrypted_part_len, - unsigned char *part, unsigned long *part_len)); -_CK_DECLARE_FUNCTION (C_DecryptFinal, - (ck_session_handle_t session, - unsigned char *last_part, - unsigned long *last_part_len)); - -_CK_DECLARE_FUNCTION (C_DigestInit, - (ck_session_handle_t session, - struct ck_mechanism *mechanism)); -_CK_DECLARE_FUNCTION (C_Digest, - (ck_session_handle_t session, - unsigned char *data, unsigned long data_len, - unsigned char *digest, - unsigned long *digest_len)); -_CK_DECLARE_FUNCTION (C_DigestUpdate, - (ck_session_handle_t session, - unsigned char *part, unsigned long part_len)); -_CK_DECLARE_FUNCTION (C_DigestKey, - (ck_session_handle_t session, ck_object_handle_t key)); -_CK_DECLARE_FUNCTION (C_DigestFinal, - (ck_session_handle_t session, - unsigned char *digest, - unsigned long *digest_len)); - -_CK_DECLARE_FUNCTION (C_SignInit, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - ck_object_handle_t key)); -_CK_DECLARE_FUNCTION (C_Sign, - (ck_session_handle_t session, - unsigned char *data, unsigned long data_len, - unsigned char *signature, - unsigned long *signature_len)); -_CK_DECLARE_FUNCTION (C_SignUpdate, - (ck_session_handle_t session, - unsigned char *part, unsigned long part_len)); -_CK_DECLARE_FUNCTION (C_SignFinal, - (ck_session_handle_t session, - unsigned char *signature, - unsigned long *signature_len)); -_CK_DECLARE_FUNCTION (C_SignRecoverInit, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - ck_object_handle_t key)); -_CK_DECLARE_FUNCTION (C_SignRecover, - (ck_session_handle_t session, - unsigned char *data, unsigned long data_len, - unsigned char *signature, - unsigned long *signature_len)); - -_CK_DECLARE_FUNCTION (C_VerifyInit, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - ck_object_handle_t key)); -_CK_DECLARE_FUNCTION (C_Verify, - (ck_session_handle_t session, - unsigned char *data, unsigned long data_len, - unsigned char *signature, - unsigned long signature_len)); -_CK_DECLARE_FUNCTION (C_VerifyUpdate, - (ck_session_handle_t session, - unsigned char *part, unsigned long part_len)); -_CK_DECLARE_FUNCTION (C_VerifyFinal, - (ck_session_handle_t session, - unsigned char *signature, - unsigned long signature_len)); -_CK_DECLARE_FUNCTION (C_VerifyRecoverInit, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - ck_object_handle_t key)); -_CK_DECLARE_FUNCTION (C_VerifyRecover, - (ck_session_handle_t session, - unsigned char *signature, - unsigned long signature_len, - unsigned char *data, - unsigned long *data_len)); - -_CK_DECLARE_FUNCTION (C_DigestEncryptUpdate, - (ck_session_handle_t session, - unsigned char *part, unsigned long part_len, - unsigned char *encrypted_part, - unsigned long *encrypted_part_len)); -_CK_DECLARE_FUNCTION (C_DecryptDigestUpdate, - (ck_session_handle_t session, - unsigned char *encrypted_part, - unsigned long encrypted_part_len, - unsigned char *part, - unsigned long *part_len)); -_CK_DECLARE_FUNCTION (C_SignEncryptUpdate, - (ck_session_handle_t session, - unsigned char *part, unsigned long part_len, - unsigned char *encrypted_part, - unsigned long *encrypted_part_len)); -_CK_DECLARE_FUNCTION (C_DecryptVerifyUpdate, - (ck_session_handle_t session, - unsigned char *encrypted_part, - unsigned long encrypted_part_len, - unsigned char *part, - unsigned long *part_len)); - -_CK_DECLARE_FUNCTION (C_GenerateKey, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - struct ck_attribute *templ, - unsigned long count, - ck_object_handle_t *key)); -_CK_DECLARE_FUNCTION (C_GenerateKeyPair, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - struct ck_attribute *public_key_template, - unsigned long public_key_attribute_count, - struct ck_attribute *private_key_template, - unsigned long private_key_attribute_count, - ck_object_handle_t *public_key, - ck_object_handle_t *private_key)); -_CK_DECLARE_FUNCTION (C_WrapKey, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - ck_object_handle_t wrapping_key, - ck_object_handle_t key, - unsigned char *wrapped_key, - unsigned long *wrapped_key_len)); -_CK_DECLARE_FUNCTION (C_UnwrapKey, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - ck_object_handle_t unwrapping_key, - unsigned char *wrapped_key, - unsigned long wrapped_key_len, - struct ck_attribute *templ, - unsigned long attribute_count, - ck_object_handle_t *key)); -_CK_DECLARE_FUNCTION (C_DeriveKey, - (ck_session_handle_t session, - struct ck_mechanism *mechanism, - ck_object_handle_t base_key, - struct ck_attribute *templ, - unsigned long attribute_count, - ck_object_handle_t *key)); - -_CK_DECLARE_FUNCTION (C_SeedRandom, - (ck_session_handle_t session, unsigned char *seed, - unsigned long seed_len)); -_CK_DECLARE_FUNCTION (C_GenerateRandom, - (ck_session_handle_t session, - unsigned char *random_data, - unsigned long random_len)); - -_CK_DECLARE_FUNCTION (C_GetFunctionStatus, (ck_session_handle_t session)); -_CK_DECLARE_FUNCTION (C_CancelFunction, (ck_session_handle_t session)); - - -struct ck_function_list -{ - struct ck_version version; - CK_C_Initialize C_Initialize; - CK_C_Finalize C_Finalize; - CK_C_GetInfo C_GetInfo; - CK_C_GetFunctionList C_GetFunctionList; - CK_C_GetSlotList C_GetSlotList; - CK_C_GetSlotInfo C_GetSlotInfo; - CK_C_GetTokenInfo C_GetTokenInfo; - CK_C_GetMechanismList C_GetMechanismList; - CK_C_GetMechanismInfo C_GetMechanismInfo; - CK_C_InitToken C_InitToken; - CK_C_InitPIN C_InitPIN; - CK_C_SetPIN C_SetPIN; - CK_C_OpenSession C_OpenSession; - CK_C_CloseSession C_CloseSession; - CK_C_CloseAllSessions C_CloseAllSessions; - CK_C_GetSessionInfo C_GetSessionInfo; - CK_C_GetOperationState C_GetOperationState; - CK_C_SetOperationState C_SetOperationState; - CK_C_Login C_Login; - CK_C_Logout C_Logout; - CK_C_CreateObject C_CreateObject; - CK_C_CopyObject C_CopyObject; - CK_C_DestroyObject C_DestroyObject; - CK_C_GetObjectSize C_GetObjectSize; - CK_C_GetAttributeValue C_GetAttributeValue; - CK_C_SetAttributeValue C_SetAttributeValue; - CK_C_FindObjectsInit C_FindObjectsInit; - CK_C_FindObjects C_FindObjects; - CK_C_FindObjectsFinal C_FindObjectsFinal; - CK_C_EncryptInit C_EncryptInit; - CK_C_Encrypt C_Encrypt; - CK_C_EncryptUpdate C_EncryptUpdate; - CK_C_EncryptFinal C_EncryptFinal; - CK_C_DecryptInit C_DecryptInit; - CK_C_Decrypt C_Decrypt; - CK_C_DecryptUpdate C_DecryptUpdate; - CK_C_DecryptFinal C_DecryptFinal; - CK_C_DigestInit C_DigestInit; - CK_C_Digest C_Digest; - CK_C_DigestUpdate C_DigestUpdate; - CK_C_DigestKey C_DigestKey; - CK_C_DigestFinal C_DigestFinal; - CK_C_SignInit C_SignInit; - CK_C_Sign C_Sign; - CK_C_SignUpdate C_SignUpdate; - CK_C_SignFinal C_SignFinal; - CK_C_SignRecoverInit C_SignRecoverInit; - CK_C_SignRecover C_SignRecover; - CK_C_VerifyInit C_VerifyInit; - CK_C_Verify C_Verify; - CK_C_VerifyUpdate C_VerifyUpdate; - CK_C_VerifyFinal C_VerifyFinal; - CK_C_VerifyRecoverInit C_VerifyRecoverInit; - CK_C_VerifyRecover C_VerifyRecover; - CK_C_DigestEncryptUpdate C_DigestEncryptUpdate; - CK_C_DecryptDigestUpdate C_DecryptDigestUpdate; - CK_C_SignEncryptUpdate C_SignEncryptUpdate; - CK_C_DecryptVerifyUpdate C_DecryptVerifyUpdate; - CK_C_GenerateKey C_GenerateKey; - CK_C_GenerateKeyPair C_GenerateKeyPair; - CK_C_WrapKey C_WrapKey; - CK_C_UnwrapKey C_UnwrapKey; - CK_C_DeriveKey C_DeriveKey; - CK_C_SeedRandom C_SeedRandom; - CK_C_GenerateRandom C_GenerateRandom; - CK_C_GetFunctionStatus C_GetFunctionStatus; - CK_C_CancelFunction C_CancelFunction; - CK_C_WaitForSlotEvent C_WaitForSlotEvent; -}; - - -typedef ck_rv_t (*ck_createmutex_t) (void **mutex); -typedef ck_rv_t (*ck_destroymutex_t) (void *mutex); -typedef ck_rv_t (*ck_lockmutex_t) (void *mutex); -typedef ck_rv_t (*ck_unlockmutex_t) (void *mutex); - - -struct ck_c_initialize_args -{ - ck_createmutex_t create_mutex; - ck_destroymutex_t destroy_mutex; - ck_lockmutex_t lock_mutex; - ck_unlockmutex_t unlock_mutex; - ck_flags_t flags; - void *reserved; -}; - - -#define CKF_LIBRARY_CANT_CREATE_OS_THREADS (1 << 0) -#define CKF_OS_LOCKING_OK (1 << 1) - -#define CKR_OK (0) -#define CKR_CANCEL (1) -#define CKR_HOST_MEMORY (2) -#define CKR_SLOT_ID_INVALID (3) -#define CKR_GENERAL_ERROR (5) -#define CKR_FUNCTION_FAILED (6) -#define CKR_ARGUMENTS_BAD (7) -#define CKR_NO_EVENT (8) -#define CKR_NEED_TO_CREATE_THREADS (9) -#define CKR_CANT_LOCK (0xa) -#define CKR_ATTRIBUTE_READ_ONLY (0x10) -#define CKR_ATTRIBUTE_SENSITIVE (0x11) -#define CKR_ATTRIBUTE_TYPE_INVALID (0x12) -#define CKR_ATTRIBUTE_VALUE_INVALID (0x13) -#define CKR_DATA_INVALID (0x20) -#define CKR_DATA_LEN_RANGE (0x21) -#define CKR_DEVICE_ERROR (0x30) -#define CKR_DEVICE_MEMORY (0x31) -#define CKR_DEVICE_REMOVED (0x32) -#define CKR_ENCRYPTED_DATA_INVALID (0x40) -#define CKR_ENCRYPTED_DATA_LEN_RANGE (0x41) -#define CKR_FUNCTION_CANCELED (0x50) -#define CKR_FUNCTION_NOT_PARALLEL (0x51) -#define CKR_FUNCTION_NOT_SUPPORTED (0x54) -#define CKR_KEY_HANDLE_INVALID (0x60) -#define CKR_KEY_SIZE_RANGE (0x62) -#define CKR_KEY_TYPE_INCONSISTENT (0x63) -#define CKR_KEY_NOT_NEEDED (0x64) -#define CKR_KEY_CHANGED (0x65) -#define CKR_KEY_NEEDED (0x66) -#define CKR_KEY_INDIGESTIBLE (0x67) -#define CKR_KEY_FUNCTION_NOT_PERMITTED (0x68) -#define CKR_KEY_NOT_WRAPPABLE (0x69) -#define CKR_KEY_UNEXTRACTABLE (0x6a) -#define CKR_MECHANISM_INVALID (0x70) -#define CKR_MECHANISM_PARAM_INVALID (0x71) -#define CKR_OBJECT_HANDLE_INVALID (0x82) -#define CKR_OPERATION_ACTIVE (0x90) -#define CKR_OPERATION_NOT_INITIALIZED (0x91) -#define CKR_PIN_INCORRECT (0xa0) -#define CKR_PIN_INVALID (0xa1) -#define CKR_PIN_LEN_RANGE (0xa2) -#define CKR_PIN_EXPIRED (0xa3) -#define CKR_PIN_LOCKED (0xa4) -#define CKR_SESSION_CLOSED (0xb0) -#define CKR_SESSION_COUNT (0xb1) -#define CKR_SESSION_HANDLE_INVALID (0xb3) -#define CKR_SESSION_PARALLEL_NOT_SUPPORTED (0xb4) -#define CKR_SESSION_READ_ONLY (0xb5) -#define CKR_SESSION_EXISTS (0xb6) -#define CKR_SESSION_READ_ONLY_EXISTS (0xb7) -#define CKR_SESSION_READ_WRITE_SO_EXISTS (0xb8) -#define CKR_SIGNATURE_INVALID (0xc0) -#define CKR_SIGNATURE_LEN_RANGE (0xc1) -#define CKR_TEMPLATE_INCOMPLETE (0xd0) -#define CKR_TEMPLATE_INCONSISTENT (0xd1) -#define CKR_TOKEN_NOT_PRESENT (0xe0) -#define CKR_TOKEN_NOT_RECOGNIZED (0xe1) -#define CKR_TOKEN_WRITE_PROTECTED (0xe2) -#define CKR_UNWRAPPING_KEY_HANDLE_INVALID (0xf0) -#define CKR_UNWRAPPING_KEY_SIZE_RANGE (0xf1) -#define CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT (0xf2) -#define CKR_USER_ALREADY_LOGGED_IN (0x100) -#define CKR_USER_NOT_LOGGED_IN (0x101) -#define CKR_USER_PIN_NOT_INITIALIZED (0x102) -#define CKR_USER_TYPE_INVALID (0x103) -#define CKR_USER_ANOTHER_ALREADY_LOGGED_IN (0x104) -#define CKR_USER_TOO_MANY_TYPES (0x105) -#define CKR_WRAPPED_KEY_INVALID (0x110) -#define CKR_WRAPPED_KEY_LEN_RANGE (0x112) -#define CKR_WRAPPING_KEY_HANDLE_INVALID (0x113) -#define CKR_WRAPPING_KEY_SIZE_RANGE (0x114) -#define CKR_WRAPPING_KEY_TYPE_INCONSISTENT (0x115) -#define CKR_RANDOM_SEED_NOT_SUPPORTED (0x120) -#define CKR_RANDOM_NO_RNG (0x121) -#define CKR_DOMAIN_PARAMS_INVALID (0x130) -#define CKR_BUFFER_TOO_SMALL (0x150) -#define CKR_SAVED_STATE_INVALID (0x160) -#define CKR_INFORMATION_SENSITIVE (0x170) -#define CKR_STATE_UNSAVEABLE (0x180) -#define CKR_CRYPTOKI_NOT_INITIALIZED (0x190) -#define CKR_CRYPTOKI_ALREADY_INITIALIZED (0x191) -#define CKR_MUTEX_BAD (0x1a0) -#define CKR_MUTEX_NOT_LOCKED (0x1a1) -#define CKR_FUNCTION_REJECTED (0x200) -#define CKR_VENDOR_DEFINED ((unsigned long) (1U << 31)) - - - -/* Compatibility layer. */ - -#ifdef CRYPTOKI_COMPAT - -#undef CK_DEFINE_FUNCTION -#define CK_DEFINE_FUNCTION(retval, name) retval CK_SPEC name - -/* For NULL. */ -#include - -typedef unsigned char CK_BYTE; -typedef unsigned char CK_CHAR; -typedef unsigned char CK_UTF8CHAR; -typedef unsigned char CK_BBOOL; -typedef unsigned long int CK_ULONG; -typedef long int CK_LONG; -typedef CK_BYTE *CK_BYTE_PTR; -typedef CK_CHAR *CK_CHAR_PTR; -typedef CK_UTF8CHAR *CK_UTF8CHAR_PTR; -typedef CK_ULONG *CK_ULONG_PTR; -typedef void *CK_VOID_PTR; -typedef void **CK_VOID_PTR_PTR; -#define CK_FALSE 0 -#define CK_TRUE 1 -#ifndef CK_DISABLE_TRUE_FALSE -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef TRUE -#define TRUE 1 -#endif -#endif - -typedef struct ck_version CK_VERSION; -typedef struct ck_version *CK_VERSION_PTR; - -typedef struct ck_info CK_INFO; -typedef struct ck_info *CK_INFO_PTR; - -typedef ck_slot_id_t *CK_SLOT_ID_PTR; - -typedef struct ck_slot_info CK_SLOT_INFO; -typedef struct ck_slot_info *CK_SLOT_INFO_PTR; - -typedef struct ck_token_info CK_TOKEN_INFO; -typedef struct ck_token_info *CK_TOKEN_INFO_PTR; - -typedef ck_session_handle_t *CK_SESSION_HANDLE_PTR; - -typedef struct ck_session_info CK_SESSION_INFO; -typedef struct ck_session_info *CK_SESSION_INFO_PTR; - -typedef ck_object_handle_t *CK_OBJECT_HANDLE_PTR; - -typedef ck_object_class_t *CK_OBJECT_CLASS_PTR; - -typedef struct ck_attribute CK_ATTRIBUTE; -typedef struct ck_attribute *CK_ATTRIBUTE_PTR; - -typedef struct ck_date CK_DATE; -typedef struct ck_date *CK_DATE_PTR; - -typedef ck_mechanism_type_t *CK_MECHANISM_TYPE_PTR; - -typedef struct ck_mechanism CK_MECHANISM; -typedef struct ck_mechanism *CK_MECHANISM_PTR; - -typedef struct ck_mechanism_info CK_MECHANISM_INFO; -typedef struct ck_mechanism_info *CK_MECHANISM_INFO_PTR; - -typedef struct ck_function_list CK_FUNCTION_LIST; -typedef struct ck_function_list *CK_FUNCTION_LIST_PTR; -typedef struct ck_function_list **CK_FUNCTION_LIST_PTR_PTR; - -typedef struct ck_c_initialize_args CK_C_INITIALIZE_ARGS; -typedef struct ck_c_initialize_args *CK_C_INITIALIZE_ARGS_PTR; - -#define NULL_PTR NULL - -/* Delete the helper macros defined at the top of the file. */ -#undef ck_flags_t -#undef ck_version - -#undef ck_info -#undef cryptoki_version -#undef manufacturer_id -#undef library_description -#undef library_version - -#undef ck_notification_t -#undef ck_slot_id_t - -#undef ck_slot_info -#undef slot_description -#undef hardware_version -#undef firmware_version - -#undef ck_token_info -#undef serial_number -#undef max_session_count -#undef session_count -#undef max_rw_session_count -#undef rw_session_count -#undef max_pin_len -#undef min_pin_len -#undef total_public_memory -#undef free_public_memory -#undef total_private_memory -#undef free_private_memory -#undef utc_time - -#undef ck_session_handle_t -#undef ck_user_type_t -#undef ck_state_t - -#undef ck_session_info -#undef slot_id -#undef device_error - -#undef ck_object_handle_t -#undef ck_object_class_t -#undef ck_hw_feature_type_t -#undef ck_key_type_t -#undef ck_certificate_type_t -#undef ck_attribute_type_t - -#undef ck_attribute -#undef value -#undef value_len - -#undef ck_date - -#undef ck_mechanism_type_t - -#undef ck_mechanism -#undef parameter -#undef parameter_len - -#undef ck_mechanism_info -#undef min_key_size -#undef max_key_size - -#undef ck_rv_t -#undef ck_notify_t - -#undef ck_function_list - -#undef ck_createmutex_t -#undef ck_destroymutex_t -#undef ck_lockmutex_t -#undef ck_unlockmutex_t - -#undef ck_c_initialize_args -#undef create_mutex -#undef destroy_mutex -#undef lock_mutex -#undef unlock_mutex -#undef reserved - -#endif /* CRYPTOKI_COMPAT */ - - -/* System dependencies. */ -#if defined(_WIN32) || defined(CRYPTOKI_FORCE_WIN32) -#pragma pack(pop, cryptoki) -#endif - -#if defined(__cplusplus) -} -#endif - -#endif /* PKCS11_H */ diff --git a/kerberosV/src/lib/hx509/req.c b/kerberosV/src/lib/hx509/req.c deleted file mode 100644 index e70ab4b6cce..00000000000 --- a/kerberosV/src/lib/hx509/req.c +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright (c) 2006 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 "hx_locl.h" -#include - -struct hx509_request_data { - hx509_name name; - SubjectPublicKeyInfo key; - ExtKeyUsage eku; - GeneralNames san; -}; - -/* - * - */ - -int -hx509_request_init(hx509_context context, hx509_request *req) -{ - *req = calloc(1, sizeof(**req)); - if (*req == NULL) - return ENOMEM; - - return 0; -} - -void -hx509_request_free(hx509_request *req) -{ - if ((*req)->name) - hx509_name_free(&(*req)->name); - free_SubjectPublicKeyInfo(&(*req)->key); - free_ExtKeyUsage(&(*req)->eku); - free_GeneralNames(&(*req)->san); - memset(*req, 0, sizeof(**req)); - free(*req); - *req = NULL; -} - -int -hx509_request_set_name(hx509_context context, - hx509_request req, - hx509_name name) -{ - if (req->name) - hx509_name_free(&req->name); - if (name) { - int ret = hx509_name_copy(context, name, &req->name); - if (ret) - return ret; - } - return 0; -} - -int -hx509_request_get_name(hx509_context context, - hx509_request req, - hx509_name *name) -{ - if (req->name == NULL) { - hx509_set_error_string(context, 0, EINVAL, "Request have no name"); - return EINVAL; - } - return hx509_name_copy(context, req->name, name); -} - -int -hx509_request_set_SubjectPublicKeyInfo(hx509_context context, - hx509_request req, - const SubjectPublicKeyInfo *key) -{ - free_SubjectPublicKeyInfo(&req->key); - return copy_SubjectPublicKeyInfo(key, &req->key); -} - -int -hx509_request_get_SubjectPublicKeyInfo(hx509_context context, - hx509_request req, - SubjectPublicKeyInfo *key) -{ - return copy_SubjectPublicKeyInfo(&req->key, key); -} - -int -_hx509_request_add_eku(hx509_context context, - hx509_request req, - const heim_oid *oid) -{ - void *val; - int ret; - - val = realloc(req->eku.val, sizeof(req->eku.val[0]) * (req->eku.len + 1)); - if (val == NULL) - return ENOMEM; - req->eku.val = val; - - ret = der_copy_oid(oid, &req->eku.val[req->eku.len]); - if (ret) - return ret; - - req->eku.len += 1; - - return 0; -} - -int -_hx509_request_add_dns_name(hx509_context context, - hx509_request req, - const char *hostname) -{ - GeneralName name; - - memset(&name, 0, sizeof(name)); - name.element = choice_GeneralName_dNSName; - name.u.dNSName.data = rk_UNCONST(hostname); - name.u.dNSName.length = strlen(hostname); - - return add_GeneralNames(&req->san, &name); -} - -int -_hx509_request_add_email(hx509_context context, - hx509_request req, - const char *email) -{ - GeneralName name; - - memset(&name, 0, sizeof(name)); - name.element = choice_GeneralName_rfc822Name; - name.u.dNSName.data = rk_UNCONST(email); - name.u.dNSName.length = strlen(email); - - return add_GeneralNames(&req->san, &name); -} - - - -int -_hx509_request_to_pkcs10(hx509_context context, - const hx509_request req, - const hx509_private_key signer, - heim_octet_string *request) -{ - CertificationRequest r; - heim_octet_string data, os; - int ret; - size_t size; - - if (req->name == NULL) { - hx509_set_error_string(context, 0, EINVAL, - "PKCS10 needs to have a subject"); - return EINVAL; - } - - memset(&r, 0, sizeof(r)); - memset(request, 0, sizeof(*request)); - - r.certificationRequestInfo.version = pkcs10_v1; - - ret = copy_Name(&req->name->der_name, - &r.certificationRequestInfo.subject); - if (ret) - goto out; - ret = copy_SubjectPublicKeyInfo(&req->key, - &r.certificationRequestInfo.subjectPKInfo); - if (ret) - goto out; - r.certificationRequestInfo.attributes = - calloc(1, sizeof(*r.certificationRequestInfo.attributes)); - if (r.certificationRequestInfo.attributes == NULL) { - ret = ENOMEM; - goto out; - } - - ASN1_MALLOC_ENCODE(CertificationRequestInfo, data.data, data.length, - &r.certificationRequestInfo, &size, ret); - if (ret) - goto out; - if (data.length != size) - abort(); - - ret = _hx509_create_signature(context, - signer, - _hx509_crypto_default_sig_alg, - &data, - &r.signatureAlgorithm, - &os); - free(data.data); - if (ret) - goto out; - r.signature.data = os.data; - r.signature.length = os.length * 8; - - ASN1_MALLOC_ENCODE(CertificationRequest, data.data, data.length, - &r, &size, ret); - if (ret) - goto out; - if (data.length != size) - abort(); - - *request = data; - -out: - free_CertificationRequest(&r); - - return ret; -} - -int -_hx509_request_parse(hx509_context context, - const char *path, - hx509_request *req) -{ - CertificationRequest r; - CertificationRequestInfo *rinfo; - hx509_name subject; - size_t len, size; - void *p; - int ret; - - if (strncmp(path, "PKCS10:", 7) != 0) { - hx509_set_error_string(context, 0, HX509_UNSUPPORTED_OPERATION, - "unsupport type in %s", path); - return HX509_UNSUPPORTED_OPERATION; - } - path += 7; - - /* XXX PEM request */ - - ret = rk_undumpdata(path, &p, &len); - if (ret) { - hx509_set_error_string(context, 0, ret, "Failed to map file %s", path); - return ret; - } - - ret = decode_CertificationRequest(p, len, &r, &size); - rk_xfree(p); - if (ret) { - hx509_set_error_string(context, 0, ret, "Failed to decode %s", path); - return ret; - } - - ret = hx509_request_init(context, req); - if (ret) { - free_CertificationRequest(&r); - return ret; - } - - rinfo = &r.certificationRequestInfo; - - ret = hx509_request_set_SubjectPublicKeyInfo(context, *req, - &rinfo->subjectPKInfo); - if (ret) { - free_CertificationRequest(&r); - hx509_request_free(req); - return ret; - } - - ret = _hx509_name_from_Name(&rinfo->subject, &subject); - if (ret) { - free_CertificationRequest(&r); - hx509_request_free(req); - return ret; - } - ret = hx509_request_set_name(context, *req, subject); - hx509_name_free(&subject); - free_CertificationRequest(&r); - if (ret) { - hx509_request_free(req); - return ret; - } - - return 0; -} - - -int -_hx509_request_print(hx509_context context, hx509_request req, FILE *f) -{ - int ret; - - if (req->name) { - char *subject; - ret = hx509_name_to_string(req->name, &subject); - if (ret) { - hx509_set_error_string(context, 0, ret, "Failed to print name"); - return ret; - } - fprintf(f, "name: %s\n", subject); - free(subject); - } - - return 0; -} - diff --git a/kerberosV/src/lib/hx509/revoke.c b/kerberosV/src/lib/hx509/revoke.c deleted file mode 100644 index 29322807487..00000000000 --- a/kerberosV/src/lib/hx509/revoke.c +++ /dev/null @@ -1,1543 +0,0 @@ -/* - * Copyright (c) 2006 - 2007 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. - */ - -/** - * @page page_revoke Revocation methods - * - * There are two revocation method for PKIX/X.509: CRL and OCSP. - * Revocation is needed if the private key is lost and - * stolen. Depending on how picky you are, you might want to make - * revocation for destroyed private keys too (smartcard broken), but - * that should not be a problem. - * - * CRL is a list of certifiates that have expired. - * - * OCSP is an online checking method where the requestor sends a list - * of certificates to the OCSP server to return a signed reply if they - * are valid or not. Some services sends a OCSP reply as part of the - * hand-shake to make the revoktion decision simpler/faster for the - * client. - */ - -#include "hx_locl.h" - -struct revoke_crl { - char *path; - time_t last_modfied; - CRLCertificateList crl; - int verified; - int failed_verify; -}; - -struct revoke_ocsp { - char *path; - time_t last_modfied; - OCSPBasicOCSPResponse ocsp; - hx509_certs certs; - hx509_cert signer; -}; - - -struct hx509_revoke_ctx_data { - unsigned int ref; - struct { - struct revoke_crl *val; - size_t len; - } crls; - struct { - struct revoke_ocsp *val; - size_t len; - } ocsps; -}; - -/** - * Allocate a revokation context. Free with hx509_revoke_free(). - * - * @param context A hx509 context. - * @param ctx returns a newly allocated revokation context. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_revoke - */ - -int -hx509_revoke_init(hx509_context context, hx509_revoke_ctx *ctx) -{ - *ctx = calloc(1, sizeof(**ctx)); - if (*ctx == NULL) - return ENOMEM; - - (*ctx)->ref = 1; - (*ctx)->crls.len = 0; - (*ctx)->crls.val = NULL; - (*ctx)->ocsps.len = 0; - (*ctx)->ocsps.val = NULL; - - return 0; -} - -hx509_revoke_ctx -_hx509_revoke_ref(hx509_revoke_ctx ctx) -{ - if (ctx == NULL) - return NULL; - if (ctx->ref == 0) - _hx509_abort("revoke ctx refcount == 0 on ref"); - ctx->ref++; - if (ctx->ref == UINT_MAX) - _hx509_abort("revoke ctx refcount == UINT_MAX on ref"); - return ctx; -} - -static void -free_ocsp(struct revoke_ocsp *ocsp) -{ - free(ocsp->path); - free_OCSPBasicOCSPResponse(&ocsp->ocsp); - hx509_certs_free(&ocsp->certs); - hx509_cert_free(ocsp->signer); -} - -/** - * Free a hx509 revokation context. - * - * @param ctx context to be freed - * - * @ingroup hx509_revoke - */ - -void -hx509_revoke_free(hx509_revoke_ctx *ctx) -{ - size_t i ; - - if (ctx == NULL || *ctx == NULL) - return; - - if ((*ctx)->ref == 0) - _hx509_abort("revoke ctx refcount == 0 on free"); - if (--(*ctx)->ref > 0) - return; - - for (i = 0; i < (*ctx)->crls.len; i++) { - free((*ctx)->crls.val[i].path); - free_CRLCertificateList(&(*ctx)->crls.val[i].crl); - } - - for (i = 0; i < (*ctx)->ocsps.len; i++) - free_ocsp(&(*ctx)->ocsps.val[i]); - free((*ctx)->ocsps.val); - - free((*ctx)->crls.val); - - memset(*ctx, 0, sizeof(**ctx)); - free(*ctx); - *ctx = NULL; -} - -static int -verify_ocsp(hx509_context context, - struct revoke_ocsp *ocsp, - time_t time_now, - hx509_certs certs, - hx509_cert parent) -{ - hx509_cert signer = NULL; - hx509_query q; - int ret; - - _hx509_query_clear(&q); - - /* - * Need to match on issuer too in case there are two CA that have - * issued the same name to a certificate. One example of this is - * the www.openvalidation.org test's ocsp validator. - */ - - q.match = HX509_QUERY_MATCH_ISSUER_NAME; - q.issuer_name = &_hx509_get_cert(parent)->tbsCertificate.issuer; - - switch(ocsp->ocsp.tbsResponseData.responderID.element) { - case choice_OCSPResponderID_byName: - q.match |= HX509_QUERY_MATCH_SUBJECT_NAME; - q.subject_name = &ocsp->ocsp.tbsResponseData.responderID.u.byName; - break; - case choice_OCSPResponderID_byKey: - q.match |= HX509_QUERY_MATCH_KEY_HASH_SHA1; - q.keyhash_sha1 = &ocsp->ocsp.tbsResponseData.responderID.u.byKey; - break; - } - - ret = hx509_certs_find(context, certs, &q, &signer); - if (ret && ocsp->certs) - ret = hx509_certs_find(context, ocsp->certs, &q, &signer); - if (ret) - goto out; - - /* - * If signer certificate isn't the CA certificate, lets check the - * it is the CA that signed the signer certificate and the OCSP EKU - * is set. - */ - if (hx509_cert_cmp(signer, parent) != 0) { - Certificate *p = _hx509_get_cert(parent); - Certificate *s = _hx509_get_cert(signer); - - ret = _hx509_cert_is_parent_cmp(s, p, 0); - if (ret != 0) { - ret = HX509_PARENT_NOT_CA; - hx509_set_error_string(context, 0, ret, "Revoke OCSP signer is " - "doesn't have CA as signer certificate"); - goto out; - } - - ret = _hx509_verify_signature_bitstring(context, - parent, - &s->signatureAlgorithm, - &s->tbsCertificate._save, - &s->signatureValue); - if (ret) { - hx509_set_error_string(context, HX509_ERROR_APPEND, ret, - "OCSP signer signature invalid"); - goto out; - } - - ret = hx509_cert_check_eku(context, signer, - &asn1_oid_id_pkix_kp_OCSPSigning, 0); - if (ret) - goto out; - } - - ret = _hx509_verify_signature_bitstring(context, - signer, - &ocsp->ocsp.signatureAlgorithm, - &ocsp->ocsp.tbsResponseData._save, - &ocsp->ocsp.signature); - if (ret) { - hx509_set_error_string(context, HX509_ERROR_APPEND, ret, - "OCSP signature invalid"); - goto out; - } - - ocsp->signer = signer; - signer = NULL; -out: - if (signer) - hx509_cert_free(signer); - - return ret; -} - -/* - * - */ - -static int -parse_ocsp_basic(const void *data, size_t length, OCSPBasicOCSPResponse *basic) -{ - OCSPResponse resp; - size_t size; - int ret; - - memset(basic, 0, sizeof(*basic)); - - ret = decode_OCSPResponse(data, length, &resp, &size); - if (ret) - return ret; - if (length != size) { - free_OCSPResponse(&resp); - return ASN1_EXTRA_DATA; - } - - switch (resp.responseStatus) { - case successful: - break; - default: - free_OCSPResponse(&resp); - return HX509_REVOKE_WRONG_DATA; - } - - if (resp.responseBytes == NULL) { - free_OCSPResponse(&resp); - return EINVAL; - } - - ret = der_heim_oid_cmp(&resp.responseBytes->responseType, - &asn1_oid_id_pkix_ocsp_basic); - if (ret != 0) { - free_OCSPResponse(&resp); - return HX509_REVOKE_WRONG_DATA; - } - - ret = decode_OCSPBasicOCSPResponse(resp.responseBytes->response.data, - resp.responseBytes->response.length, - basic, - &size); - if (ret) { - free_OCSPResponse(&resp); - return ret; - } - if (size != resp.responseBytes->response.length) { - free_OCSPResponse(&resp); - free_OCSPBasicOCSPResponse(basic); - return ASN1_EXTRA_DATA; - } - free_OCSPResponse(&resp); - - return 0; -} - -/* - * - */ - -static int -load_ocsp(hx509_context context, struct revoke_ocsp *ocsp) -{ - OCSPBasicOCSPResponse basic; - hx509_certs certs = NULL; - size_t length; - struct stat sb; - void *data; - int ret; - - ret = rk_undumpdata(ocsp->path, &data, &length); - if (ret) - return ret; - - ret = stat(ocsp->path, &sb); - if (ret) - return errno; - - ret = parse_ocsp_basic(data, length, &basic); - rk_xfree(data); - if (ret) { - hx509_set_error_string(context, 0, ret, - "Failed to parse OCSP response"); - return ret; - } - - if (basic.certs) { - size_t i; - - ret = hx509_certs_init(context, "MEMORY:ocsp-certs", 0, - NULL, &certs); - if (ret) { - free_OCSPBasicOCSPResponse(&basic); - return ret; - } - - for (i = 0; i < basic.certs->len; i++) { - hx509_cert c; - - ret = hx509_cert_init(context, &basic.certs->val[i], &c); - if (ret) - continue; - - ret = hx509_certs_add(context, certs, c); - hx509_cert_free(c); - if (ret) - continue; - } - } - - ocsp->last_modfied = sb.st_mtime; - - free_OCSPBasicOCSPResponse(&ocsp->ocsp); - hx509_certs_free(&ocsp->certs); - hx509_cert_free(ocsp->signer); - - ocsp->ocsp = basic; - ocsp->certs = certs; - ocsp->signer = NULL; - - return 0; -} - -/** - * Add a OCSP file to the revokation context. - * - * @param context hx509 context - * @param ctx hx509 revokation context - * @param path path to file that is going to be added to the context. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_revoke - */ - -int -hx509_revoke_add_ocsp(hx509_context context, - hx509_revoke_ctx ctx, - const char *path) -{ - void *data; - int ret; - size_t i; - - if (strncmp(path, "FILE:", 5) != 0) { - hx509_set_error_string(context, 0, HX509_UNSUPPORTED_OPERATION, - "unsupport type in %s", path); - return HX509_UNSUPPORTED_OPERATION; - } - - path += 5; - - for (i = 0; i < ctx->ocsps.len; i++) { - if (strcmp(ctx->ocsps.val[0].path, path) == 0) - return 0; - } - - data = realloc(ctx->ocsps.val, - (ctx->ocsps.len + 1) * sizeof(ctx->ocsps.val[0])); - if (data == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - - ctx->ocsps.val = data; - - memset(&ctx->ocsps.val[ctx->ocsps.len], 0, - sizeof(ctx->ocsps.val[0])); - - ctx->ocsps.val[ctx->ocsps.len].path = strdup(path); - if (ctx->ocsps.val[ctx->ocsps.len].path == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - - ret = load_ocsp(context, &ctx->ocsps.val[ctx->ocsps.len]); - if (ret) { - free(ctx->ocsps.val[ctx->ocsps.len].path); - return ret; - } - ctx->ocsps.len++; - - return ret; -} - -/* - * - */ - -static int -verify_crl(hx509_context context, - hx509_revoke_ctx ctx, - CRLCertificateList *crl, - time_t time_now, - hx509_certs certs, - hx509_cert parent) -{ - hx509_cert signer; - hx509_query q; - time_t t; - int ret; - - t = _hx509_Time2time_t(&crl->tbsCertList.thisUpdate); - if (t > time_now) { - hx509_set_error_string(context, 0, HX509_CRL_USED_BEFORE_TIME, - "CRL used before time"); - return HX509_CRL_USED_BEFORE_TIME; - } - - if (crl->tbsCertList.nextUpdate == NULL) { - hx509_set_error_string(context, 0, HX509_CRL_INVALID_FORMAT, - "CRL missing nextUpdate"); - return HX509_CRL_INVALID_FORMAT; - } - - t = _hx509_Time2time_t(crl->tbsCertList.nextUpdate); - if (t < time_now) { - hx509_set_error_string(context, 0, HX509_CRL_USED_AFTER_TIME, - "CRL used after time"); - return HX509_CRL_USED_AFTER_TIME; - } - - _hx509_query_clear(&q); - - /* - * If it's the signer have CRLSIGN bit set, use that as the signer - * cert for the certificate, otherwise, search for a certificate. - */ - if (_hx509_check_key_usage(context, parent, 1 << 6, FALSE) == 0) { - signer = hx509_cert_ref(parent); - } else { - q.match = HX509_QUERY_MATCH_SUBJECT_NAME; - q.match |= HX509_QUERY_KU_CRLSIGN; - q.subject_name = &crl->tbsCertList.issuer; - - ret = hx509_certs_find(context, certs, &q, &signer); - if (ret) { - hx509_set_error_string(context, HX509_ERROR_APPEND, ret, - "Failed to find certificate for CRL"); - return ret; - } - } - - ret = _hx509_verify_signature_bitstring(context, - signer, - &crl->signatureAlgorithm, - &crl->tbsCertList._save, - &crl->signatureValue); - if (ret) { - hx509_set_error_string(context, HX509_ERROR_APPEND, ret, - "CRL signature invalid"); - goto out; - } - - /* - * If signer is not CA cert, need to check revoke status of this - * CRL signing cert too, this include all parent CRL signer cert - * up to the root *sigh*, assume root at least hve CERTSIGN flag - * set. - */ - while (_hx509_check_key_usage(context, signer, 1 << 5, TRUE)) { - hx509_cert crl_parent; - - _hx509_query_clear(&q); - - q.match = HX509_QUERY_MATCH_SUBJECT_NAME; - q.match |= HX509_QUERY_KU_CRLSIGN; - q.subject_name = &_hx509_get_cert(signer)->tbsCertificate.issuer; - - ret = hx509_certs_find(context, certs, &q, &crl_parent); - if (ret) { - hx509_set_error_string(context, HX509_ERROR_APPEND, ret, - "Failed to find parent of CRL signer"); - goto out; - } - - ret = hx509_revoke_verify(context, - ctx, - certs, - time_now, - signer, - crl_parent); - hx509_cert_free(signer); - signer = crl_parent; - if (ret) { - hx509_set_error_string(context, HX509_ERROR_APPEND, ret, - "Failed to verify revoke " - "status of CRL signer"); - goto out; - } - } - -out: - hx509_cert_free(signer); - - return ret; -} - -static int -load_crl(const char *path, time_t *t, CRLCertificateList *crl) -{ - size_t length, size; - struct stat sb; - void *data; - int ret; - - memset(crl, 0, sizeof(*crl)); - - ret = rk_undumpdata(path, &data, &length); - if (ret) - return ret; - - ret = stat(path, &sb); - if (ret) - return errno; - - *t = sb.st_mtime; - - ret = decode_CRLCertificateList(data, length, crl, &size); - rk_xfree(data); - if (ret) - return ret; - - /* check signature is aligned */ - if (crl->signatureValue.length & 7) { - free_CRLCertificateList(crl); - return HX509_CRYPTO_SIG_INVALID_FORMAT; - } - return 0; -} - -/** - * Add a CRL file to the revokation context. - * - * @param context hx509 context - * @param ctx hx509 revokation context - * @param path path to file that is going to be added to the context. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_revoke - */ - -int -hx509_revoke_add_crl(hx509_context context, - hx509_revoke_ctx ctx, - const char *path) -{ - void *data; - size_t i; - int ret; - - if (strncmp(path, "FILE:", 5) != 0) { - hx509_set_error_string(context, 0, HX509_UNSUPPORTED_OPERATION, - "unsupport type in %s", path); - return HX509_UNSUPPORTED_OPERATION; - } - - - path += 5; - - for (i = 0; i < ctx->crls.len; i++) { - if (strcmp(ctx->crls.val[0].path, path) == 0) - return 0; - } - - data = realloc(ctx->crls.val, - (ctx->crls.len + 1) * sizeof(ctx->crls.val[0])); - if (data == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - ctx->crls.val = data; - - memset(&ctx->crls.val[ctx->crls.len], 0, sizeof(ctx->crls.val[0])); - - ctx->crls.val[ctx->crls.len].path = strdup(path); - if (ctx->crls.val[ctx->crls.len].path == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - - ret = load_crl(path, - &ctx->crls.val[ctx->crls.len].last_modfied, - &ctx->crls.val[ctx->crls.len].crl); - if (ret) { - free(ctx->crls.val[ctx->crls.len].path); - return ret; - } - - ctx->crls.len++; - - return ret; -} - -/** - * Check that a certificate is not expired according to a revokation - * context. Also need the parent certificte to the check OCSP - * parent identifier. - * - * @param context hx509 context - * @param ctx hx509 revokation context - * @param certs - * @param now - * @param cert - * @param parent_cert - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_revoke - */ - - -int -hx509_revoke_verify(hx509_context context, - hx509_revoke_ctx ctx, - hx509_certs certs, - time_t now, - hx509_cert cert, - hx509_cert parent_cert) -{ - const Certificate *c = _hx509_get_cert(cert); - const Certificate *p = _hx509_get_cert(parent_cert); - unsigned long i, j, k; - int ret; - - hx509_clear_error_string(context); - - for (i = 0; i < ctx->ocsps.len; i++) { - struct revoke_ocsp *ocsp = &ctx->ocsps.val[i]; - struct stat sb; - - /* check this ocsp apply to this cert */ - - /* check if there is a newer version of the file */ - ret = stat(ocsp->path, &sb); - if (ret == 0 && ocsp->last_modfied != sb.st_mtime) { - ret = load_ocsp(context, ocsp); - if (ret) - continue; - } - - /* verify signature in ocsp if not already done */ - if (ocsp->signer == NULL) { - ret = verify_ocsp(context, ocsp, now, certs, parent_cert); - if (ret) - continue; - } - - for (j = 0; j < ocsp->ocsp.tbsResponseData.responses.len; j++) { - heim_octet_string os; - - ret = der_heim_integer_cmp(&ocsp->ocsp.tbsResponseData.responses.val[j].certID.serialNumber, - &c->tbsCertificate.serialNumber); - if (ret != 0) - continue; - - /* verify issuer hashes hash */ - ret = _hx509_verify_signature(context, - NULL, - &ocsp->ocsp.tbsResponseData.responses.val[i].certID.hashAlgorithm, - &c->tbsCertificate.issuer._save, - &ocsp->ocsp.tbsResponseData.responses.val[i].certID.issuerNameHash); - if (ret != 0) - continue; - - os.data = p->tbsCertificate.subjectPublicKeyInfo.subjectPublicKey.data; - os.length = p->tbsCertificate.subjectPublicKeyInfo.subjectPublicKey.length / 8; - - ret = _hx509_verify_signature(context, - NULL, - &ocsp->ocsp.tbsResponseData.responses.val[j].certID.hashAlgorithm, - &os, - &ocsp->ocsp.tbsResponseData.responses.val[j].certID.issuerKeyHash); - if (ret != 0) - continue; - - switch (ocsp->ocsp.tbsResponseData.responses.val[j].certStatus.element) { - case choice_OCSPCertStatus_good: - break; - case choice_OCSPCertStatus_revoked: - hx509_set_error_string(context, 0, - HX509_CERT_REVOKED, - "Certificate revoked by issuer in OCSP"); - return HX509_CERT_REVOKED; - case choice_OCSPCertStatus_unknown: - continue; - } - - /* don't allow the update to be in the future */ - if (ocsp->ocsp.tbsResponseData.responses.val[j].thisUpdate > - now + context->ocsp_time_diff) - continue; - - /* don't allow the next update to be in the past */ - if (ocsp->ocsp.tbsResponseData.responses.val[j].nextUpdate) { - if (*ocsp->ocsp.tbsResponseData.responses.val[j].nextUpdate < now) - continue; - } /* else should force a refetch, but can we ? */ - - return 0; - } - } - - for (i = 0; i < ctx->crls.len; i++) { - struct revoke_crl *crl = &ctx->crls.val[i]; - struct stat sb; - int diff; - - /* check if cert.issuer == crls.val[i].crl.issuer */ - ret = _hx509_name_cmp(&c->tbsCertificate.issuer, - &crl->crl.tbsCertList.issuer, &diff); - if (ret || diff) - continue; - - ret = stat(crl->path, &sb); - if (ret == 0 && crl->last_modfied != sb.st_mtime) { - CRLCertificateList cl; - - ret = load_crl(crl->path, &crl->last_modfied, &cl); - if (ret == 0) { - free_CRLCertificateList(&crl->crl); - crl->crl = cl; - crl->verified = 0; - crl->failed_verify = 0; - } - } - if (crl->failed_verify) - continue; - - /* verify signature in crl if not already done */ - if (crl->verified == 0) { - ret = verify_crl(context, ctx, &crl->crl, now, certs, parent_cert); - if (ret) { - crl->failed_verify = 1; - continue; - } - crl->verified = 1; - } - - if (crl->crl.tbsCertList.crlExtensions) { - for (j = 0; j < crl->crl.tbsCertList.crlExtensions->len; j++) { - if (crl->crl.tbsCertList.crlExtensions->val[j].critical) { - hx509_set_error_string(context, 0, - HX509_CRL_UNKNOWN_EXTENSION, - "Unknown CRL extension"); - return HX509_CRL_UNKNOWN_EXTENSION; - } - } - } - - if (crl->crl.tbsCertList.revokedCertificates == NULL) - return 0; - - /* check if cert is in crl */ - for (j = 0; j < crl->crl.tbsCertList.revokedCertificates->len; j++) { - time_t t; - - ret = der_heim_integer_cmp(&crl->crl.tbsCertList.revokedCertificates->val[j].userCertificate, - &c->tbsCertificate.serialNumber); - if (ret != 0) - continue; - - t = _hx509_Time2time_t(&crl->crl.tbsCertList.revokedCertificates->val[j].revocationDate); - if (t > now) - continue; - - if (crl->crl.tbsCertList.revokedCertificates->val[j].crlEntryExtensions) - for (k = 0; k < crl->crl.tbsCertList.revokedCertificates->val[j].crlEntryExtensions->len; k++) - if (crl->crl.tbsCertList.revokedCertificates->val[j].crlEntryExtensions->val[k].critical) - return HX509_CRL_UNKNOWN_EXTENSION; - - hx509_set_error_string(context, 0, - HX509_CERT_REVOKED, - "Certificate revoked by issuer in CRL"); - return HX509_CERT_REVOKED; - } - - return 0; - } - - - if (context->flags & HX509_CTX_VERIFY_MISSING_OK) - return 0; - hx509_set_error_string(context, HX509_ERROR_APPEND, - HX509_REVOKE_STATUS_MISSING, - "No revoke status found for " - "certificates"); - return HX509_REVOKE_STATUS_MISSING; -} - -struct ocsp_add_ctx { - OCSPTBSRequest *req; - hx509_certs certs; - const AlgorithmIdentifier *digest; - hx509_cert parent; -}; - -static int -add_to_req(hx509_context context, void *ptr, hx509_cert cert) -{ - struct ocsp_add_ctx *ctx = ptr; - OCSPInnerRequest *one; - hx509_cert parent = NULL; - Certificate *p, *c = _hx509_get_cert(cert); - heim_octet_string os; - int ret; - hx509_query q; - void *d; - - d = realloc(ctx->req->requestList.val, - sizeof(ctx->req->requestList.val[0]) * - (ctx->req->requestList.len + 1)); - if (d == NULL) - return ENOMEM; - ctx->req->requestList.val = d; - - one = &ctx->req->requestList.val[ctx->req->requestList.len]; - memset(one, 0, sizeof(*one)); - - _hx509_query_clear(&q); - - q.match |= HX509_QUERY_FIND_ISSUER_CERT; - q.subject = c; - - ret = hx509_certs_find(context, ctx->certs, &q, &parent); - if (ret) - goto out; - - if (ctx->parent) { - if (hx509_cert_cmp(ctx->parent, parent) != 0) { - ret = HX509_REVOKE_NOT_SAME_PARENT; - hx509_set_error_string(context, 0, ret, - "Not same parent certifate as " - "last certificate in request"); - goto out; - } - } else - ctx->parent = hx509_cert_ref(parent); - - p = _hx509_get_cert(parent); - - ret = copy_AlgorithmIdentifier(ctx->digest, &one->reqCert.hashAlgorithm); - if (ret) - goto out; - - ret = _hx509_create_signature(context, - NULL, - &one->reqCert.hashAlgorithm, - &c->tbsCertificate.issuer._save, - NULL, - &one->reqCert.issuerNameHash); - if (ret) - goto out; - - os.data = p->tbsCertificate.subjectPublicKeyInfo.subjectPublicKey.data; - os.length = - p->tbsCertificate.subjectPublicKeyInfo.subjectPublicKey.length / 8; - - ret = _hx509_create_signature(context, - NULL, - &one->reqCert.hashAlgorithm, - &os, - NULL, - &one->reqCert.issuerKeyHash); - if (ret) - goto out; - - ret = copy_CertificateSerialNumber(&c->tbsCertificate.serialNumber, - &one->reqCert.serialNumber); - if (ret) - goto out; - - ctx->req->requestList.len++; -out: - hx509_cert_free(parent); - if (ret) { - free_OCSPInnerRequest(one); - memset(one, 0, sizeof(*one)); - } - - return ret; -} - -/** - * Create an OCSP request for a set of certificates. - * - * @param context a hx509 context - * @param reqcerts list of certificates to request ocsp data for - * @param pool certificate pool to use when signing - * @param signer certificate to use to sign the request - * @param digest the signing algorithm in the request, if NULL use the - * default signature algorithm, - * @param request the encoded request, free with free_heim_octet_string(). - * @param nonce nonce in the request, free with free_heim_octet_string(). - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_revoke - */ - -int -hx509_ocsp_request(hx509_context context, - hx509_certs reqcerts, - hx509_certs pool, - hx509_cert signer, - const AlgorithmIdentifier *digest, - heim_octet_string *request, - heim_octet_string *nonce) -{ - OCSPRequest req; - size_t size; - int ret; - struct ocsp_add_ctx ctx; - Extensions *es; - - memset(&req, 0, sizeof(req)); - - if (digest == NULL) - digest = _hx509_crypto_default_digest_alg; - - ctx.req = &req.tbsRequest; - ctx.certs = pool; - ctx.digest = digest; - ctx.parent = NULL; - - ret = hx509_certs_iter_f(context, reqcerts, add_to_req, &ctx); - hx509_cert_free(ctx.parent); - if (ret) - goto out; - - if (nonce) { - req.tbsRequest.requestExtensions = - calloc(1, sizeof(*req.tbsRequest.requestExtensions)); - if (req.tbsRequest.requestExtensions == NULL) { - ret = ENOMEM; - goto out; - } - - es = req.tbsRequest.requestExtensions; - - es->val = calloc(es->len, sizeof(es->val[0])); - if (es->val == NULL) { - ret = ENOMEM; - goto out; - } - es->len = 1; - ret = der_copy_oid(&asn1_oid_id_pkix_ocsp_nonce, &es->val[0].extnID); - if (ret) { - free_OCSPRequest(&req); - return ret; - } - - es->val[0].extnValue.data = malloc(10); - if (es->val[0].extnValue.data == NULL) { - ret = ENOMEM; - goto out; - } - es->val[0].extnValue.length = 10; - - ret = RAND_bytes(es->val[0].extnValue.data, - es->val[0].extnValue.length); - if (ret != 1) { - ret = HX509_CRYPTO_INTERNAL_ERROR; - goto out; - } - ret = der_copy_octet_string(nonce, &es->val[0].extnValue); - if (ret) { - ret = ENOMEM; - goto out; - } - } - - ASN1_MALLOC_ENCODE(OCSPRequest, request->data, request->length, - &req, &size, ret); - free_OCSPRequest(&req); - if (ret) - goto out; - if (size != request->length) - _hx509_abort("internal ASN.1 encoder error"); - - return 0; - -out: - free_OCSPRequest(&req); - return ret; -} - -static char * -printable_time(time_t t) -{ - static char s[128]; - char *p; - if ((p = ctime(&t)) == NULL) - strlcpy(s, "?", sizeof(s)); - else { - strlcpy(s, p + 4, sizeof(s)); - s[20] = 0; - } - return s; -} - -/** - * Print the OCSP reply stored in a file. - * - * @param context a hx509 context - * @param path path to a file with a OCSP reply - * @param out the out FILE descriptor to print the reply on - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_revoke - */ - -int -hx509_revoke_ocsp_print(hx509_context context, const char *path, FILE *out) -{ - struct revoke_ocsp ocsp; - int ret; - size_t i; - - if (out == NULL) - out = stdout; - - memset(&ocsp, 0, sizeof(ocsp)); - - ocsp.path = strdup(path); - if (ocsp.path == NULL) - return ENOMEM; - - ret = load_ocsp(context, &ocsp); - if (ret) { - free_ocsp(&ocsp); - return ret; - } - - fprintf(out, "signer: "); - - switch(ocsp.ocsp.tbsResponseData.responderID.element) { - case choice_OCSPResponderID_byName: { - hx509_name n; - char *s; - _hx509_name_from_Name(&ocsp.ocsp.tbsResponseData.responderID.u.byName, &n); - hx509_name_to_string(n, &s); - hx509_name_free(&n); - fprintf(out, " byName: %s\n", s); - free(s); - break; - } - case choice_OCSPResponderID_byKey: { - char *s; - hex_encode(ocsp.ocsp.tbsResponseData.responderID.u.byKey.data, - ocsp.ocsp.tbsResponseData.responderID.u.byKey.length, - &s); - fprintf(out, " byKey: %s\n", s); - free(s); - break; - } - default: - _hx509_abort("choice_OCSPResponderID unknown"); - break; - } - - fprintf(out, "producedAt: %s\n", - printable_time(ocsp.ocsp.tbsResponseData.producedAt)); - - fprintf(out, "replies: %d\n", ocsp.ocsp.tbsResponseData.responses.len); - - for (i = 0; i < ocsp.ocsp.tbsResponseData.responses.len; i++) { - const char *status; - switch (ocsp.ocsp.tbsResponseData.responses.val[i].certStatus.element) { - case choice_OCSPCertStatus_good: - status = "good"; - break; - case choice_OCSPCertStatus_revoked: - status = "revoked"; - break; - case choice_OCSPCertStatus_unknown: - status = "unknown"; - break; - default: - status = "element unknown"; - } - - fprintf(out, "\t%zu. status: %s\n", i, status); - - fprintf(out, "\tthisUpdate: %s\n", - printable_time(ocsp.ocsp.tbsResponseData.responses.val[i].thisUpdate)); - if (ocsp.ocsp.tbsResponseData.responses.val[i].nextUpdate) - fprintf(out, "\tproducedAt: %s\n", - printable_time(ocsp.ocsp.tbsResponseData.responses.val[i].thisUpdate)); - - } - - fprintf(out, "appended certs:\n"); - if (ocsp.certs) - ret = hx509_certs_iter_f(context, ocsp.certs, hx509_ci_print_names, out); - - free_ocsp(&ocsp); - return ret; -} - -/** - * Verify that the certificate is part of the OCSP reply and it's not - * expired. Doesn't verify signature the OCSP reply or it's done by a - * authorized sender, that is assumed to be already done. - * - * @param context a hx509 context - * @param now the time right now, if 0, use the current time. - * @param cert the certificate to verify - * @param flags flags control the behavior - * @param data pointer to the encode ocsp reply - * @param length the length of the encode ocsp reply - * @param expiration return the time the OCSP will expire and need to - * be rechecked. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_verify - */ - -int -hx509_ocsp_verify(hx509_context context, - time_t now, - hx509_cert cert, - int flags, - const void *data, size_t length, - time_t *expiration) -{ - const Certificate *c = _hx509_get_cert(cert); - OCSPBasicOCSPResponse basic; - int ret; - size_t i; - - if (now == 0) - now = time(NULL); - - *expiration = 0; - - ret = parse_ocsp_basic(data, length, &basic); - if (ret) { - hx509_set_error_string(context, 0, ret, - "Failed to parse OCSP response"); - return ret; - } - - for (i = 0; i < basic.tbsResponseData.responses.len; i++) { - - ret = der_heim_integer_cmp(&basic.tbsResponseData.responses.val[i].certID.serialNumber, - &c->tbsCertificate.serialNumber); - if (ret != 0) - continue; - - /* verify issuer hashes hash */ - ret = _hx509_verify_signature(context, - NULL, - &basic.tbsResponseData.responses.val[i].certID.hashAlgorithm, - &c->tbsCertificate.issuer._save, - &basic.tbsResponseData.responses.val[i].certID.issuerNameHash); - if (ret != 0) - continue; - - switch (basic.tbsResponseData.responses.val[i].certStatus.element) { - case choice_OCSPCertStatus_good: - break; - case choice_OCSPCertStatus_revoked: - case choice_OCSPCertStatus_unknown: - continue; - } - - /* don't allow the update to be in the future */ - if (basic.tbsResponseData.responses.val[i].thisUpdate > - now + context->ocsp_time_diff) - continue; - - /* don't allow the next update to be in the past */ - if (basic.tbsResponseData.responses.val[i].nextUpdate) { - if (*basic.tbsResponseData.responses.val[i].nextUpdate < now) - continue; - *expiration = *basic.tbsResponseData.responses.val[i].nextUpdate; - } else - *expiration = now; - - free_OCSPBasicOCSPResponse(&basic); - return 0; - } - - free_OCSPBasicOCSPResponse(&basic); - - { - hx509_name name; - char *subject; - - ret = hx509_cert_get_subject(cert, &name); - if (ret) { - hx509_clear_error_string(context); - goto out; - } - ret = hx509_name_to_string(name, &subject); - hx509_name_free(&name); - if (ret) { - hx509_clear_error_string(context); - goto out; - } - hx509_set_error_string(context, 0, HX509_CERT_NOT_IN_OCSP, - "Certificate %s not in OCSP response " - "or not good", - subject); - free(subject); - } -out: - return HX509_CERT_NOT_IN_OCSP; -} - -struct hx509_crl { - hx509_certs revoked; - time_t expire; -}; - -/** - * Create a CRL context. Use hx509_crl_free() to free the CRL context. - * - * @param context a hx509 context. - * @param crl return pointer to a newly allocated CRL context. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_verify - */ - -int -hx509_crl_alloc(hx509_context context, hx509_crl *crl) -{ - int ret; - - *crl = calloc(1, sizeof(**crl)); - if (*crl == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - - ret = hx509_certs_init(context, "MEMORY:crl", 0, NULL, &(*crl)->revoked); - if (ret) { - free(*crl); - *crl = NULL; - return ret; - } - (*crl)->expire = 0; - return ret; -} - -/** - * Add revoked certificate to an CRL context. - * - * @param context a hx509 context. - * @param crl the CRL to add the revoked certificate to. - * @param certs keyset of certificate to revoke. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_verify - */ - -int -hx509_crl_add_revoked_certs(hx509_context context, - hx509_crl crl, - hx509_certs certs) -{ - return hx509_certs_merge(context, crl->revoked, certs); -} - -/** - * Set the lifetime of a CRL context. - * - * @param context a hx509 context. - * @param crl a CRL context - * @param delta delta time the certificate is valid, library adds the - * current time to this. - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_verify - */ - -int -hx509_crl_lifetime(hx509_context context, hx509_crl crl, int delta) -{ - crl->expire = time(NULL) + delta; - return 0; -} - -/** - * Free a CRL context. - * - * @param context a hx509 context. - * @param crl a CRL context to free. - * - * @ingroup hx509_verify - */ - -void -hx509_crl_free(hx509_context context, hx509_crl *crl) -{ - if (*crl == NULL) - return; - hx509_certs_free(&(*crl)->revoked); - memset(*crl, 0, sizeof(**crl)); - free(*crl); - *crl = NULL; -} - -static int -add_revoked(hx509_context context, void *ctx, hx509_cert cert) -{ - TBSCRLCertList *c = ctx; - unsigned int num; - void *ptr; - int ret; - - num = c->revokedCertificates->len; - ptr = realloc(c->revokedCertificates->val, - (num + 1) * sizeof(c->revokedCertificates->val[0])); - if (ptr == NULL) { - hx509_clear_error_string(context); - return ENOMEM; - } - c->revokedCertificates->val = ptr; - - ret = hx509_cert_get_serialnumber(cert, - &c->revokedCertificates->val[num].userCertificate); - if (ret) { - hx509_clear_error_string(context); - return ret; - } - c->revokedCertificates->val[num].revocationDate.element = - choice_Time_generalTime; - c->revokedCertificates->val[num].revocationDate.u.generalTime = - time(NULL) - 3600 * 24; - c->revokedCertificates->val[num].crlEntryExtensions = NULL; - - c->revokedCertificates->len++; - - return 0; -} - -/** - * Sign a CRL and return an encode certificate. - * - * @param context a hx509 context. - * @param signer certificate to sign the CRL with - * @param crl the CRL to sign - * @param os return the signed and encoded CRL, free with - * free_heim_octet_string() - * - * @return An hx509 error code, see hx509_get_error_string(). - * - * @ingroup hx509_verify - */ - -int -hx509_crl_sign(hx509_context context, - hx509_cert signer, - hx509_crl crl, - heim_octet_string *os) -{ - const AlgorithmIdentifier *sigalg = _hx509_crypto_default_sig_alg; - CRLCertificateList c; - size_t size; - int ret; - hx509_private_key signerkey; - - memset(&c, 0, sizeof(c)); - - signerkey = _hx509_cert_private_key(signer); - if (signerkey == NULL) { - ret = HX509_PRIVATE_KEY_MISSING; - hx509_set_error_string(context, 0, ret, - "Private key missing for CRL signing"); - return ret; - } - - c.tbsCertList.version = malloc(sizeof(*c.tbsCertList.version)); - if (c.tbsCertList.version == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - return ENOMEM; - } - - *c.tbsCertList.version = 1; - - ret = copy_AlgorithmIdentifier(sigalg, &c.tbsCertList.signature); - if (ret) { - hx509_clear_error_string(context); - goto out; - } - - ret = copy_Name(&_hx509_get_cert(signer)->tbsCertificate.issuer, - &c.tbsCertList.issuer); - if (ret) { - hx509_clear_error_string(context); - goto out; - } - - c.tbsCertList.thisUpdate.element = choice_Time_generalTime; - c.tbsCertList.thisUpdate.u.generalTime = time(NULL) - 24 * 3600; - - c.tbsCertList.nextUpdate = malloc(sizeof(*c.tbsCertList.nextUpdate)); - if (c.tbsCertList.nextUpdate == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - ret = ENOMEM; - goto out; - } - - { - time_t next = crl->expire; - if (next == 0) - next = time(NULL) + 24 * 3600 * 365; - - c.tbsCertList.nextUpdate->element = choice_Time_generalTime; - c.tbsCertList.nextUpdate->u.generalTime = next; - } - - c.tbsCertList.revokedCertificates = - calloc(1, sizeof(*c.tbsCertList.revokedCertificates)); - if (c.tbsCertList.revokedCertificates == NULL) { - hx509_set_error_string(context, 0, ENOMEM, "out of memory"); - ret = ENOMEM; - goto out; - } - c.tbsCertList.crlExtensions = NULL; - - ret = hx509_certs_iter_f(context, crl->revoked, add_revoked, &c.tbsCertList); - if (ret) - goto out; - - /* if not revoked certs, remove OPTIONAL entry */ - if (c.tbsCertList.revokedCertificates->len == 0) { - free(c.tbsCertList.revokedCertificates); - c.tbsCertList.revokedCertificates = NULL; - } - - ASN1_MALLOC_ENCODE(TBSCRLCertList, os->data, os->length, - &c.tbsCertList, &size, ret); - if (ret) { - hx509_set_error_string(context, 0, ret, "failed to encode tbsCRL"); - goto out; - } - if (size != os->length) - _hx509_abort("internal ASN.1 encoder error"); - - - ret = _hx509_create_signature_bitstring(context, - signerkey, - sigalg, - os, - &c.signatureAlgorithm, - &c.signatureValue); - free(os->data); - if (ret) { - hx509_set_error_string(context, 0, ret, "Failed to sign CRL"); - goto out; - } - - ASN1_MALLOC_ENCODE(CRLCertificateList, os->data, os->length, - &c, &size, ret); - if (ret) { - hx509_set_error_string(context, 0, ret, "failed to encode CRL"); - goto out; - } - if (size != os->length) - _hx509_abort("internal ASN.1 encoder error"); - - free_CRLCertificateList(&c); - - return 0; - -out: - free_CRLCertificateList(&c); - return ret; -} diff --git a/kerberosV/src/lib/hx509/sel-gram.c b/kerberosV/src/lib/hx509/sel-gram.c deleted file mode 100644 index 70d83d645db..00000000000 --- a/kerberosV/src/lib/hx509/sel-gram.c +++ /dev/null @@ -1,1713 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.3. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.3" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - kw_TRUE = 258, - kw_FALSE = 259, - kw_AND = 260, - kw_OR = 261, - kw_IN = 262, - kw_TAILMATCH = 263, - NUMBER = 264, - STRING = 265, - IDENTIFIER = 266 - }; -#endif -/* Tokens. */ -#define kw_TRUE 258 -#define kw_FALSE 259 -#define kw_AND 260 -#define kw_OR 261 -#define kw_IN 262 -#define kw_TAILMATCH 263 -#define NUMBER 264 -#define STRING 265 -#define IDENTIFIER 266 - - - - -/* Copy the first part of user declarations. */ -#line 34 "sel-gram.y" - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - - - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 45 "sel-gram.y" -{ - char *string; - struct hx_expr *expr; -} -/* Line 193 of yacc.c. */ -#line 134 "sel-gram.c" - YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - -/* Copy the second part of user declarations. */ - - -/* Line 216 of yacc.c. */ -#line 147 "sel-gram.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int i) -#else -static int -YYID (i) - int i; -#endif -{ - return i; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss; - YYSTYPE yyvs; - }; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 21 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 50 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 21 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 11 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 26 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 50 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 266 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 12, 2, 2, 2, 17, 2, 2, - 13, 14, 2, 2, 15, 2, 20, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 16, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 18, 2, 19, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 5, 7, 9, 12, 16, 20, 24, - 26, 28, 32, 37, 42, 46, 52, 56, 58, 60, - 62, 64, 66, 68, 73, 78, 82 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 22, 0, -1, 23, -1, 3, -1, 4, -1, 12, - 23, -1, 23, 5, 23, -1, 23, 6, 23, -1, - 13, 23, 14, -1, 25, -1, 26, -1, 26, 15, - 24, -1, 26, 16, 16, 26, -1, 26, 12, 16, - 26, -1, 26, 8, 26, -1, 26, 7, 13, 24, - 14, -1, 26, 7, 30, -1, 27, -1, 28, -1, - 29, -1, 30, -1, 9, -1, 10, -1, 11, 13, - 24, 14, -1, 17, 18, 31, 19, -1, 11, 20, - 31, -1, 11, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint8 yyrline[] = -{ - 0, 73, 73, 75, 76, 77, 78, 79, 80, 81, - 84, 85, 88, 89, 90, 91, 92, 95, 96, 97, - 98, 101, 102, 104, 107, 110, 112 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "kw_TRUE", "kw_FALSE", "kw_AND", "kw_OR", - "kw_IN", "kw_TAILMATCH", "NUMBER", "STRING", "IDENTIFIER", "'!'", "'('", - "')'", "','", "'='", "'%'", "'{'", "'}'", "'.'", "$accept", "start", - "expr", "words", "comp", "word", "number", "string", "function", - "variable", "variables", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 33, 40, 41, 44, 61, 37, 123, 125, - 46 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 21, 22, 23, 23, 23, 23, 23, 23, 23, - 24, 24, 25, 25, 25, 25, 25, 26, 26, 26, - 26, 27, 28, 29, 30, 31, 31 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 1, 2, 3, 3, 3, 1, - 1, 3, 4, 4, 3, 5, 3, 1, 1, 1, - 1, 1, 1, 4, 4, 3, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 3, 4, 21, 22, 0, 0, 0, 0, 0, - 2, 9, 0, 17, 18, 19, 20, 0, 5, 0, - 0, 1, 0, 0, 0, 0, 0, 0, 0, 10, - 8, 26, 0, 6, 7, 0, 16, 14, 0, 0, - 23, 0, 0, 24, 0, 13, 12, 11, 25, 15 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 9, 10, 28, 11, 12, 13, 14, 15, 16, - 32 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -31 -static const yytype_int8 yypact[] = -{ - 22, -31, -31, -31, -31, -1, 22, 22, -11, 27, - 11, -31, -6, -31, -31, -31, -31, 19, 11, 9, - 26, -31, 22, 22, -4, 19, 24, 25, 28, 23, - -31, 29, 31, 11, 11, 19, -31, -31, 19, 19, - -31, 19, 26, -31, 30, -31, -31, -31, -31, -31 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -31, -31, -3, -30, -31, -17, -31, -31, -31, 21, - 1 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const yytype_uint8 yytable[] = -{ - 29, 24, 25, 18, 19, 44, 26, 20, 37, 35, - 27, 47, 17, 8, 22, 23, 22, 23, 29, 33, - 34, 45, 46, 30, 29, 1, 2, 21, 3, 4, - 5, 3, 4, 5, 6, 7, 8, 31, 41, 8, - 38, 39, 40, 48, 49, 36, 0, 0, 0, 42, - 43 -}; - -static const yytype_int8 yycheck[] = -{ - 17, 7, 8, 6, 7, 35, 12, 18, 25, 13, - 16, 41, 13, 17, 5, 6, 5, 6, 35, 22, - 23, 38, 39, 14, 41, 3, 4, 0, 9, 10, - 11, 9, 10, 11, 12, 13, 17, 11, 15, 17, - 16, 16, 14, 42, 14, 24, -1, -1, -1, 20, - 19 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 3, 4, 9, 10, 11, 12, 13, 17, 22, - 23, 25, 26, 27, 28, 29, 30, 13, 23, 23, - 18, 0, 5, 6, 7, 8, 12, 16, 24, 26, - 14, 11, 31, 23, 23, 13, 30, 26, 16, 16, - 14, 15, 20, 19, 24, 26, 26, 24, 31, 14 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) -#else -static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - fprintf (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - fprintf (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - -/* The look-ahead symbol. */ -int yychar; - -/* The semantic value of the look-ahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to look-ahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a look-ahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - if (yyn == YYFINAL) - YYACCEPT; - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 73 "sel-gram.y" - { _hx509_expr_input.expr = (yyvsp[(1) - (1)].expr); } - break; - - case 3: -#line 75 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(op_TRUE, NULL, NULL); } - break; - - case 4: -#line 76 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(op_FALSE, NULL, NULL); } - break; - - case 5: -#line 77 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(op_NOT, (yyvsp[(2) - (2)].expr), NULL); } - break; - - case 6: -#line 78 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(op_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } - break; - - case 7: -#line 79 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(op_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } - break; - - case 8: -#line 80 "sel-gram.y" - { (yyval.expr) = (yyvsp[(2) - (3)].expr); } - break; - - case 9: -#line 81 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(op_COMP, (yyvsp[(1) - (1)].expr), NULL); } - break; - - case 10: -#line 84 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(expr_WORDS, (yyvsp[(1) - (1)].expr), NULL); } - break; - - case 11: -#line 85 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(expr_WORDS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } - break; - - case 12: -#line 88 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(comp_EQ, (yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].expr)); } - break; - - case 13: -#line 89 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(comp_NE, (yyvsp[(1) - (4)].expr), (yyvsp[(4) - (4)].expr)); } - break; - - case 14: -#line 90 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(comp_TAILEQ, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } - break; - - case 15: -#line 91 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(comp_IN, (yyvsp[(1) - (5)].expr), (yyvsp[(4) - (5)].expr)); } - break; - - case 16: -#line 92 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(comp_IN, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } - break; - - case 17: -#line 95 "sel-gram.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } - break; - - case 18: -#line 96 "sel-gram.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } - break; - - case 19: -#line 97 "sel-gram.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } - break; - - case 20: -#line 98 "sel-gram.y" - { (yyval.expr) = (yyvsp[(1) - (1)].expr); } - break; - - case 21: -#line 101 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(expr_NUMBER, (yyvsp[(1) - (1)].string), NULL); } - break; - - case 22: -#line 102 "sel-gram.y" - { (yyval.expr) = _hx509_make_expr(expr_STRING, (yyvsp[(1) - (1)].string), NULL); } - break; - - case 23: -#line 104 "sel-gram.y" - { - (yyval.expr) = _hx509_make_expr(expr_FUNCTION, (yyvsp[(1) - (4)].string), (yyvsp[(3) - (4)].expr)); } - break; - - case 24: -#line 107 "sel-gram.y" - { (yyval.expr) = (yyvsp[(3) - (4)].expr); } - break; - - case 25: -#line 110 "sel-gram.y" - { - (yyval.expr) = _hx509_make_expr(expr_VAR, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].expr)); } - break; - - case 26: -#line 112 "sel-gram.y" - { - (yyval.expr) = _hx509_make_expr(expr_VAR, (yyvsp[(1) - (1)].string), NULL); } - break; - - -/* Line 1267 of yacc.c. */ -#line 1500 "sel-gram.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse look-ahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - if (yyn == YYFINAL) - YYACCEPT; - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - diff --git a/kerberosV/src/lib/hx509/sel-gram.h b/kerberosV/src/lib/hx509/sel-gram.h deleted file mode 100644 index 13be3f9ab19..00000000000 --- a/kerberosV/src/lib/hx509/sel-gram.h +++ /dev/null @@ -1,83 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.3. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - kw_TRUE = 258, - kw_FALSE = 259, - kw_AND = 260, - kw_OR = 261, - kw_IN = 262, - kw_TAILMATCH = 263, - NUMBER = 264, - STRING = 265, - IDENTIFIER = 266 - }; -#endif -/* Tokens. */ -#define kw_TRUE 258 -#define kw_FALSE 259 -#define kw_AND 260 -#define kw_OR 261 -#define kw_IN 262 -#define kw_TAILMATCH 263 -#define NUMBER 264 -#define STRING 265 -#define IDENTIFIER 266 - - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 45 "sel-gram.y" -{ - char *string; - struct hx_expr *expr; -} -/* Line 1529 of yacc.c. */ -#line 76 "sel-gram.h" - YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - -extern YYSTYPE yylval; - diff --git a/kerberosV/src/lib/hx509/sel-gram.y b/kerberosV/src/lib/hx509/sel-gram.y deleted file mode 100644 index 7f7c9980e03..00000000000 --- a/kerberosV/src/lib/hx509/sel-gram.y +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2008 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 -#endif -#include -#include -#include - - -%} - -%union { - char *string; - struct hx_expr *expr; -} - -%token kw_TRUE -%token kw_FALSE -%token kw_AND -%token kw_OR -%token kw_IN -%token kw_TAILMATCH - -%type expr -%type comp -%type word words -%type number -%type string -%type function -%type variable variables - -%token NUMBER -%token STRING -%token IDENTIFIER - -%start start - -%% - -start: expr { _hx509_expr_input.expr = $1; } - -expr : kw_TRUE { $$ = _hx509_make_expr(op_TRUE, NULL, NULL); } - | kw_FALSE { $$ = _hx509_make_expr(op_FALSE, NULL, NULL); } - | '!' expr { $$ = _hx509_make_expr(op_NOT, $2, NULL); } - | expr kw_AND expr { $$ = _hx509_make_expr(op_AND, $1, $3); } - | expr kw_OR expr { $$ = _hx509_make_expr(op_OR, $1, $3); } - | '(' expr ')' { $$ = $2; } - | comp { $$ = _hx509_make_expr(op_COMP, $1, NULL); } - ; - -words : word { $$ = _hx509_make_expr(expr_WORDS, $1, NULL); } - | word ',' words { $$ = _hx509_make_expr(expr_WORDS, $1, $3); } - ; - -comp : word '=' '=' word { $$ = _hx509_make_expr(comp_EQ, $1, $4); } - | word '!' '=' word { $$ = _hx509_make_expr(comp_NE, $1, $4); } - | word kw_TAILMATCH word { $$ = _hx509_make_expr(comp_TAILEQ, $1, $3); } - | word kw_IN '(' words ')' { $$ = _hx509_make_expr(comp_IN, $1, $4); } - | word kw_IN variable { $$ = _hx509_make_expr(comp_IN, $1, $3); } - ; - -word : number { $$ = $1; } - | string { $$ = $1; } - | function { $$ = $1; } - | variable { $$ = $1; } - ; - -number : NUMBER { $$ = _hx509_make_expr(expr_NUMBER, $1, NULL); }; -string : STRING { $$ = _hx509_make_expr(expr_STRING, $1, NULL); }; - -function: IDENTIFIER '(' words ')' { - $$ = _hx509_make_expr(expr_FUNCTION, $1, $3); } - ; -variable: '%' '{' variables '}' { $$ = $3; } - ; - -variables: IDENTIFIER '.' variables { - $$ = _hx509_make_expr(expr_VAR, $1, $3); } - | IDENTIFIER { - $$ = _hx509_make_expr(expr_VAR, $1, NULL); } - ; diff --git a/kerberosV/src/lib/hx509/sel-lex.c b/kerberosV/src/lib/hx509/sel-lex.c deleted file mode 100644 index c77e0abf90f..00000000000 --- a/kerberosV/src/lib/hx509/sel-lex.c +++ /dev/null @@ -1,1925 +0,0 @@ - -#line 3 "sel-lex.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -typedef uint64_t flex_uint64_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t yyleng; - -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart (FILE *input_file ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); -void yy_delete_buffer (YY_BUFFER_STATE b ); -void yy_flush_buffer (YY_BUFFER_STATE b ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); -void yypop_buffer_state (void ); - -static void yyensure_buffer_stack (void ); -static void yy_load_buffer_state (void ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); - -void *yyalloc (yy_size_t ); -void *yyrealloc (void *,yy_size_t ); -void yyfree (void * ); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -typedef unsigned char YY_CHAR; - -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; - -typedef int yy_state_type; - -extern int yylineno; - -int yylineno = 1; - -extern char *yytext; -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (yy_size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 12 -#define YY_END_OF_BUFFER 13 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[36] = - { 0, - 0, 0, 13, 12, 11, 9, 10, 8, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 5, 4, 7, - 7, 3, 7, 7, 7, 7, 7, 1, 2, 7, - 7, 7, 7, 6, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 1, 1, 4, 1, 1, 4, - 4, 1, 1, 4, 6, 4, 1, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, - 4, 1, 1, 1, 7, 8, 9, 10, 11, 12, - 8, 13, 14, 8, 8, 15, 16, 17, 18, 8, - 8, 19, 20, 21, 22, 8, 8, 8, 8, 8, - 1, 1, 1, 1, 6, 1, 8, 8, 8, 8, - - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 4, 1, 4, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[23] = - { 0, - 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2 - } ; - -static yyconst flex_int16_t yy_base[37] = - { 0, - 0, 0, 43, 44, 44, 44, 44, 44, 25, 0, - 34, 23, 20, 16, 0, 28, 22, 0, 0, 22, - 12, 0, 13, 17, 20, 19, 13, 0, 0, 21, - 6, 17, 12, 0, 44, 22 - } ; - -static yyconst flex_int16_t yy_def[37] = - { 0, - 35, 1, 35, 35, 35, 35, 35, 35, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 0, 35 - } ; - -static yyconst flex_int16_t yy_nxt[67] = - { 0, - 4, 5, 6, 7, 8, 4, 9, 10, 10, 10, - 10, 11, 10, 12, 10, 10, 10, 13, 10, 10, - 14, 10, 20, 15, 34, 33, 32, 31, 30, 29, - 28, 27, 26, 25, 21, 24, 23, 22, 19, 18, - 17, 16, 35, 3, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35 - } ; - -static yyconst flex_int16_t yy_chk[67] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 14, 36, 33, 32, 31, 30, 27, 26, - 25, 24, 23, 21, 14, 20, 17, 16, 13, 12, - 11, 9, 3, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, - 35, 35, 35, 35, 35, 35 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int yy_flex_debug; -int yy_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -#line 1 "sel-lex.l" -#line 2 "sel-lex.l" -/* - * Copyright (c) 2004, 2008 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: sel-lex.c,v 1.2 2014/04/18 09:47:36 ajacoutot Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#undef ECHO - -#include -#include -#include -#include -#include "sel.h" -#include "sel-gram.h" -unsigned lineno = 1; - -static char * handle_string(void); -static int lex_input(char *, int); -static int lex_classic_input(void); - -struct hx_expr_input _hx509_expr_input; - -#ifndef YY_NULL -#define YY_NULL 0 -#endif - -#define YY_NO_UNPUT 1 - -#undef YY_INPUT -#define YY_INPUT(buf,res,maxsize) (res = lex_input(buf, maxsize)) - -#undef ECHO - -#line 540 "sel-lex.c" - -#define INITIAL 0 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int yylex_destroy (void ); - -int yyget_debug (void ); - -void yyset_debug (int debug_flag ); - -YY_EXTRA_TYPE yyget_extra (void ); - -void yyset_extra (YY_EXTRA_TYPE user_defined ); - -FILE *yyget_in (void ); - -void yyset_in (FILE * in_str ); - -FILE *yyget_out (void ); - -void yyset_out (FILE * out_str ); - -yy_size_t yyget_leng (void ); - -char *yyget_text (void ); - -int yyget_lineno (void ); - -void yyset_lineno (int line_number ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap (void ); -#else -extern int yywrap (void ); -#endif -#endif - - static void yyunput (int c,char *buf_ptr ); - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yylex (void); - -#define YY_DECL int yylex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 69 "sel-lex.l" - - -#line 725 "sel-lex.c" - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } - - yy_load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 36 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 44 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 71 "sel-lex.l" -{ return kw_TRUE; } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 72 "sel-lex.l" -{ return kw_FALSE; } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 73 "sel-lex.l" -{ return kw_AND; } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 74 "sel-lex.l" -{ return kw_OR; } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 75 "sel-lex.l" -{ return kw_IN; } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 76 "sel-lex.l" -{ return kw_TAILMATCH; } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 78 "sel-lex.l" -{ - yylval.string = strdup ((const char *)yytext); - return IDENTIFIER; - } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 82 "sel-lex.l" -{ yylval.string = handle_string(); return STRING; } - YY_BREAK -case 9: -/* rule 9 can match eol */ -YY_RULE_SETUP -#line 83 "sel-lex.l" -{ ++lineno; } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 84 "sel-lex.l" -{ return *yytext; } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 85 "sel-lex.l" -; - YY_BREAK -case 12: -YY_RULE_SETUP -#line 86 "sel-lex.l" -ECHO; - YY_BREAK -#line 872 "sel-lex.c" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 36 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 36 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 35); - - return yy_is_jam ? 0 : yy_current_state; -} - - static void yyunput (int c, register char * yy_bp ) -{ - register char *yy_cp; - - yy_cp = (yy_c_buf_p); - - /* undo effects of setting up yytext */ - *yy_cp = (yy_hold_char); - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register yy_size_t number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - (yytext_ptr) = yy_bp; - (yy_hold_char) = *yy_cp; - (yy_c_buf_p) = yy_cp; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( ) ) - return 0; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void yyrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } - - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void yy_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * - */ - void yy_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ); - - yyfree((void *) b ); -} - -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - yy_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void yy_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void yypop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yyensure_buffer_stack (void) -{ - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) -{ - - return yy_scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n, i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int yyget_lineno (void) -{ - - return yylineno; -} - -/** Get the input stream. - * - */ -FILE *yyget_in (void) -{ - return yyin; -} - -/** Get the output stream. - * - */ -FILE *yyget_out (void) -{ - return yyout; -} - -/** Get the length of the current token. - * - */ -yy_size_t yyget_leng (void) -{ - return yyleng; -} - -/** Get the current token. - * - */ - -char *yyget_text (void) -{ - return yytext; -} - -/** Set the current line number. - * @param line_number - * - */ -void yyset_lineno (int line_number ) -{ - - yylineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see yy_switch_to_buffer - */ -void yyset_in (FILE * in_str ) -{ - yyin = in_str ; -} - -void yyset_out (FILE * out_str ) -{ - yyout = out_str ; -} - -int yyget_debug (void) -{ - return yy_flex_debug; -} - -void yyset_debug (int bdebug ) -{ - yy_flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} - -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yyalloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *yyrealloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void yyfree (void * ptr ) -{ - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 86 "sel-lex.l" - - - -static char * -handle_string(void) -{ - char x[1024]; - int i = 0; - int c; - int quote = 0; - while((c = input()) != EOF){ - if(quote) { - x[i++] = '\\'; - x[i++] = c; - quote = 0; - continue; - } - if(c == '\n'){ - _hx509_sel_yyerror("unterminated string"); - lineno++; - break; - } - if(c == '\\'){ - quote++; - continue; - } - if(c == '\"') - break; - x[i++] = c; - } - x[i] = '\0'; - return strdup(x); -} - -int -yywrap () -{ - return 1; -} - -static int -lex_input(char *buf, int max_size) -{ - int n; - - n = _hx509_expr_input.length - _hx509_expr_input.offset; - if (max_size < n) - n = max_size; - if (n <= 0) - return YY_NULL; - - memcpy(buf, _hx509_expr_input.buf + _hx509_expr_input.offset, n); - _hx509_expr_input.offset += n; - - return n; -} - diff --git a/kerberosV/src/lib/hx509/sel-lex.l b/kerberosV/src/lib/hx509/sel-lex.l deleted file mode 100644 index 94851fd6914..00000000000 --- a/kerberosV/src/lib/hx509/sel-lex.l +++ /dev/null @@ -1,140 +0,0 @@ -%{ -/* - * Copyright (c) 2004, 2008 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: sel-lex.l,v 1.1 2013/06/17 19:11:43 robert Exp $ */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#undef ECHO - -#include -#include -#include -#include -#include "sel.h" -#include "sel-gram.h" -unsigned lineno = 1; - -static char * handle_string(void); -static int lex_input(char *, int); -static int lex_classic_input(void); - -struct hx_expr_input _hx509_expr_input; - -#ifndef YY_NULL -#define YY_NULL 0 -#endif - -#define YY_NO_UNPUT 1 - -#undef YY_INPUT -#define YY_INPUT(buf,res,maxsize) (res = lex_input(buf, maxsize)) - -#undef ECHO - -%} -%% - -TRUE { return kw_TRUE; } -FALSE { return kw_FALSE; } -AND { return kw_AND; } -OR { return kw_OR; } -IN { return kw_IN; } -TAILMATCH { return kw_TAILMATCH; } - -[A-Za-z][-A-Za-z0-9_]* { - yylval.string = strdup ((const char *)yytext); - return IDENTIFIER; - } -"\"" { yylval.string = handle_string(); return STRING; } -\n { ++lineno; } -[,.!={}()%] { return *yytext; } -[ \t] ; -%% - -static char * -handle_string(void) -{ - char x[1024]; - int i = 0; - int c; - int quote = 0; - while((c = input()) != EOF){ - if(quote) { - x[i++] = '\\'; - x[i++] = c; - quote = 0; - continue; - } - if(c == '\n'){ - _hx509_sel_yyerror("unterminated string"); - lineno++; - break; - } - if(c == '\\'){ - quote++; - continue; - } - if(c == '\"') - break; - x[i++] = c; - } - x[i] = '\0'; - return strdup(x); -} - -int -yywrap () -{ - return 1; -} - -static int -lex_input(char *buf, int max_size) -{ - int n; - - n = _hx509_expr_input.length - _hx509_expr_input.offset; - if (max_size < n) - n = max_size; - if (n <= 0) - return YY_NULL; - - memcpy(buf, _hx509_expr_input.buf + _hx509_expr_input.offset, n); - _hx509_expr_input.offset += n; - - return n; -} diff --git a/kerberosV/src/lib/hx509/sel.c b/kerberosV/src/lib/hx509/sel.c deleted file mode 100644 index 6930b50f7cd..00000000000 --- a/kerberosV/src/lib/hx509/sel.c +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (c) 2008 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 "hx_locl.h" - -struct hx_expr * -_hx509_make_expr(enum hx_expr_op op, void *arg1, void *arg2) -{ - struct hx_expr *expr; - - expr = malloc(sizeof(*expr)); - if (expr == NULL) - return NULL; - expr->op = op; - expr->arg1 = arg1; - expr->arg2 = arg2; - - return expr; -} - -static const char * -eval_word(hx509_context context, hx509_env env, struct hx_expr *word) -{ - switch (word->op) { - case expr_STRING: - return word->arg1; - case expr_VAR: - if (word->arg2 == NULL) - return hx509_env_find(context, env, word->arg1); - - env = hx509_env_find_binding(context, env, word->arg1); - if (env == NULL) - return NULL; - - return eval_word(context, env, word->arg2); - default: - return NULL; - } -} - -static hx509_env -find_variable(hx509_context context, hx509_env env, struct hx_expr *word) -{ - assert(word->op == expr_VAR); - - if (word->arg2 == NULL) - return hx509_env_find_binding(context, env, word->arg1); - - env = hx509_env_find_binding(context, env, word->arg1); - if (env == NULL) - return NULL; - return find_variable(context, env, word->arg2); -} - -static int -eval_comp(hx509_context context, hx509_env env, struct hx_expr *expr) -{ - switch (expr->op) { - case comp_NE: - case comp_EQ: - case comp_TAILEQ: { - const char *s1, *s2; - int ret; - - s1 = eval_word(context, env, expr->arg1); - s2 = eval_word(context, env, expr->arg2); - - if (s1 == NULL || s2 == NULL) - return FALSE; - - if (expr->op == comp_TAILEQ) { - size_t len1 = strlen(s1); - size_t len2 = strlen(s2); - - if (len1 < len2) - return 0; - ret = strcmp(s1 + (len1 - len2), s2) == 0; - } else { - ret = strcmp(s1, s2) == 0; - if (expr->op == comp_NE) - ret = !ret; - } - return ret; - } - case comp_IN: { - struct hx_expr *subexpr; - const char *w, *s1; - - w = eval_word(context, env, expr->arg1); - - subexpr = expr->arg2; - - if (subexpr->op == expr_WORDS) { - while (subexpr) { - s1 = eval_word(context, env, subexpr->arg1); - if (strcmp(w, s1) == 0) - return TRUE; - subexpr = subexpr->arg2; - } - } else if (subexpr->op == expr_VAR) { - hx509_env subenv; - - subenv = find_variable(context, env, subexpr); - if (subenv == NULL) - return FALSE; - - while (subenv) { - if (subenv->type != env_string) - continue; - if (strcmp(w, subenv->name) == 0) - return TRUE; - if (strcmp(w, subenv->u.string) == 0) - return TRUE; - subenv = subenv->next; - } - - } else - _hx509_abort("hx509 eval IN unknown op: %d", (int)subexpr->op); - - return FALSE; - } - default: - _hx509_abort("hx509 eval expr with unknown op: %d", (int)expr->op); - } - return FALSE; -} - -int -_hx509_expr_eval(hx509_context context, hx509_env env, struct hx_expr *expr) -{ - switch (expr->op) { - case op_TRUE: - return 1; - case op_FALSE: - return 0; - case op_NOT: - return ! _hx509_expr_eval(context, env, expr->arg1); - case op_AND: - return _hx509_expr_eval(context, env, expr->arg1) && - _hx509_expr_eval(context, env, expr->arg2); - case op_OR: - return _hx509_expr_eval(context, env, expr->arg1) || - _hx509_expr_eval(context, env, expr->arg2); - case op_COMP: - return eval_comp(context, env, expr->arg1); - default: - _hx509_abort("hx509 eval expr with unknown op: %d", (int)expr->op); - UNREACHABLE(return 0); - } -} - -void -_hx509_expr_free(struct hx_expr *expr) -{ - switch (expr->op) { - case expr_STRING: - case expr_NUMBER: - free(expr->arg1); - break; - case expr_WORDS: - case expr_FUNCTION: - case expr_VAR: - free(expr->arg1); - if (expr->arg2) - _hx509_expr_free(expr->arg2); - break; - default: - if (expr->arg1) - _hx509_expr_free(expr->arg1); - if (expr->arg2) - _hx509_expr_free(expr->arg2); - break; - } - free(expr); -} - -struct hx_expr * -_hx509_expr_parse(const char *buf) -{ - _hx509_expr_input.buf = buf; - _hx509_expr_input.length = strlen(buf); - _hx509_expr_input.offset = 0; - _hx509_expr_input.expr = NULL; - - if (_hx509_expr_input.error) { - free(_hx509_expr_input.error); - _hx509_expr_input.error = NULL; - } - - yyparse(); - - return _hx509_expr_input.expr; -} - -void -_hx509_sel_yyerror (const char *s) -{ - if (_hx509_expr_input.error) - free(_hx509_expr_input.error); - - _hx509_expr_input.error = strdup(s); -} - diff --git a/kerberosV/src/lib/hx509/sel.h b/kerberosV/src/lib/hx509/sel.h deleted file mode 100644 index 177ec0a65b2..00000000000 --- a/kerberosV/src/lib/hx509/sel.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2008 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. - */ - -enum hx_expr_op { - op_TRUE, - op_FALSE, - op_NOT, - op_AND, - op_OR, - op_COMP, - - comp_EQ, - comp_NE, - comp_IN, - comp_TAILEQ, - - expr_NUMBER, - expr_STRING, - expr_FUNCTION, - expr_VAR, - expr_WORDS -}; - -struct hx_expr { - enum hx_expr_op op; - void *arg1; - void *arg2; -}; - -struct hx_expr_input { - const char *buf; - size_t length; - size_t offset; - struct hx_expr *expr; - char *error; -}; - -extern struct hx_expr_input _hx509_expr_input; - -#define yyparse _hx509_sel_yyparse -#define yylex _hx509_sel_yylex -#define yyerror _hx509_sel_yyerror -#define yylval _hx509_sel_yylval -#define yychar _hx509_sel_yychar -#define yydebug _hx509_sel_yydebug -#define yynerrs _hx509_sel_yynerrs -#define yywrap _hx509_sel_yywrap - -int _hx509_sel_yyparse(void); -int _hx509_sel_yylex(void); -void _hx509_sel_yyerror(const char *); - diff --git a/kerberosV/src/lib/hx509/softp11.c b/kerberosV/src/lib/hx509/softp11.c deleted file mode 100644 index e721973765e..00000000000 --- a/kerberosV/src/lib/hx509/softp11.c +++ /dev/null @@ -1,1796 +0,0 @@ -/* - * Copyright (c) 2004 - 2008 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. - */ - -#define CRYPTOKI_EXPORTS 1 - -#include -#include "hx_locl.h" -#include "pkcs11.h" - -#define OBJECT_ID_MASK 0xfff -#define HANDLE_OBJECT_ID(h) ((h) & OBJECT_ID_MASK) -#define OBJECT_ID(obj) HANDLE_OBJECT_ID((obj)->object_handle) - -#ifndef HAVE_RANDOM -#define random() rand() -#define srandom(s) srand(s) -#endif - -#ifdef _WIN32 -#include -#endif - -struct st_attr { - CK_ATTRIBUTE attribute; - int secret; -}; - -struct st_object { - CK_OBJECT_HANDLE object_handle; - struct st_attr *attrs; - int num_attributes; - hx509_cert cert; -}; - -static struct soft_token { - CK_VOID_PTR application; - CK_NOTIFY notify; - char *config_file; - hx509_certs certs; - struct { - struct st_object **objs; - int num_objs; - } object; - struct { - int hardware_slot; - int app_error_fatal; - int login_done; - } flags; - int open_sessions; - struct session_state { - CK_SESSION_HANDLE session_handle; - - struct { - CK_ATTRIBUTE *attributes; - CK_ULONG num_attributes; - int next_object; - } find; - - int sign_object; - CK_MECHANISM_PTR sign_mechanism; - int verify_object; - CK_MECHANISM_PTR verify_mechanism; - } state[10]; -#define MAX_NUM_SESSION (sizeof(soft_token.state)/sizeof(soft_token.state[0])) - FILE *logfile; -} soft_token; - -static hx509_context context; - -static void -application_error(const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); - if (soft_token.flags.app_error_fatal) - abort(); -} - -static void -st_logf(const char *fmt, ...) -{ - va_list ap; - if (soft_token.logfile == NULL) - return; - va_start(ap, fmt); - vfprintf(soft_token.logfile, fmt, ap); - va_end(ap); - fflush(soft_token.logfile); -} - -static CK_RV -init_context(void) -{ - if (context == NULL) { - int ret = hx509_context_init(&context); - if (ret) - return CKR_GENERAL_ERROR; - } - return CKR_OK; -} - -#define INIT_CONTEXT() { CK_RV icret = init_context(); if (icret) return icret; } - -static void -snprintf_fill(char *str, size_t size, char fillchar, const char *fmt, ...) -{ - int len; - va_list ap; - va_start(ap, fmt); - len = vsnprintf(str, size, fmt, ap); - va_end(ap); - if (len < 0 || (size_t)len > size) - return; - while ((size_t)len < size) - str[len++] = fillchar; -} - -#ifndef TEST_APP -#define printf error_use_st_logf -#endif - -#define VERIFY_SESSION_HANDLE(s, state) \ -{ \ - CK_RV xret; \ - xret = verify_session_handle(s, state); \ - if (xret != CKR_OK) { \ - /* return CKR_OK */; \ - } \ -} - -static CK_RV -verify_session_handle(CK_SESSION_HANDLE hSession, - struct session_state **state) -{ - size_t i; - - for (i = 0; i < MAX_NUM_SESSION; i++){ - if (soft_token.state[i].session_handle == hSession) - break; - } - if (i == MAX_NUM_SESSION) { - application_error("use of invalid handle: 0x%08lx\n", - (unsigned long)hSession); - return CKR_SESSION_HANDLE_INVALID; - } - if (state) - *state = &soft_token.state[i]; - return CKR_OK; -} - -static CK_RV -object_handle_to_object(CK_OBJECT_HANDLE handle, - struct st_object **object) -{ - int i = HANDLE_OBJECT_ID(handle); - - *object = NULL; - if (i >= soft_token.object.num_objs) - return CKR_ARGUMENTS_BAD; - if (soft_token.object.objs[i] == NULL) - return CKR_ARGUMENTS_BAD; - if (soft_token.object.objs[i]->object_handle != handle) - return CKR_ARGUMENTS_BAD; - *object = soft_token.object.objs[i]; - return CKR_OK; -} - -static int -attributes_match(const struct st_object *obj, - const CK_ATTRIBUTE *attributes, - CK_ULONG num_attributes) -{ - CK_ULONG i; - int j; - - st_logf("attributes_match: %ld\n", (unsigned long)OBJECT_ID(obj)); - - for (i = 0; i < num_attributes; i++) { - int match = 0; - for (j = 0; j < obj->num_attributes; j++) { - if (attributes[i].type == obj->attrs[j].attribute.type && - attributes[i].ulValueLen == obj->attrs[j].attribute.ulValueLen && - memcmp(attributes[i].pValue, obj->attrs[j].attribute.pValue, - attributes[i].ulValueLen) == 0) { - match = 1; - break; - } - } - if (match == 0) { - st_logf("type %d attribute have no match\n", attributes[i].type); - return 0; - } - } - st_logf("attribute matches\n"); - return 1; -} - -static void -print_attributes(const CK_ATTRIBUTE *attributes, - CK_ULONG num_attributes) -{ - CK_ULONG i; - - st_logf("find objects: attrs: %lu\n", (unsigned long)num_attributes); - - for (i = 0; i < num_attributes; i++) { - st_logf(" type: "); - switch (attributes[i].type) { - case CKA_TOKEN: { - CK_BBOOL *ck_true; - if (attributes[i].ulValueLen != sizeof(CK_BBOOL)) { - application_error("token attribute wrong length\n"); - break; - } - ck_true = attributes[i].pValue; - st_logf("token: %s", *ck_true ? "TRUE" : "FALSE"); - break; - } - case CKA_CLASS: { - CK_OBJECT_CLASS *class; - if (attributes[i].ulValueLen != sizeof(CK_ULONG)) { - application_error("class attribute wrong length\n"); - break; - } - class = attributes[i].pValue; - st_logf("class "); - switch (*class) { - case CKO_CERTIFICATE: - st_logf("certificate"); - break; - case CKO_PUBLIC_KEY: - st_logf("public key"); - break; - case CKO_PRIVATE_KEY: - st_logf("private key"); - break; - case CKO_SECRET_KEY: - st_logf("secret key"); - break; - case CKO_DOMAIN_PARAMETERS: - st_logf("domain parameters"); - break; - default: - st_logf("[class %lx]", (long unsigned)*class); - break; - } - break; - } - case CKA_PRIVATE: - st_logf("private"); - break; - case CKA_LABEL: - st_logf("label"); - break; - case CKA_APPLICATION: - st_logf("application"); - break; - case CKA_VALUE: - st_logf("value"); - break; - case CKA_ID: - st_logf("id"); - break; - default: - st_logf("[unknown 0x%08lx]", (unsigned long)attributes[i].type); - break; - } - st_logf("\n"); - } -} - -static struct st_object * -add_st_object(void) -{ - struct st_object *o, **objs; - u_int32_t rnd; - int i; - - o = calloc(1, sizeof(*o)); - if (o == NULL) - return NULL; - - for (i = 0; i < soft_token.object.num_objs; i++) { - if (soft_token.object.objs == NULL) { - soft_token.object.objs[i] = o; - break; - } - } - if (i == soft_token.object.num_objs) { - objs = realloc(soft_token.object.objs, - (soft_token.object.num_objs + 1) * sizeof(soft_token.object.objs[0])); - if (objs == NULL) { - free(o); - return NULL; - } - soft_token.object.objs = objs; - soft_token.object.objs[soft_token.object.num_objs++] = o; - } -#ifdef HAVE_ARC4RANDOM - rnd = arc4random(); -#else - rnd = random(); -#endif - - soft_token.object.objs[i]->object_handle = - (rnd & (~OBJECT_ID_MASK)) | i; - - return o; -} - -static CK_RV -add_object_attribute(struct st_object *o, - int secret, - CK_ATTRIBUTE_TYPE type, - CK_VOID_PTR pValue, - CK_ULONG ulValueLen) -{ - struct st_attr *a; - int i; - - i = o->num_attributes; - a = realloc(o->attrs, (i + 1) * sizeof(o->attrs[0])); - if (a == NULL) - return CKR_DEVICE_MEMORY; - o->attrs = a; - o->attrs[i].secret = secret; - o->attrs[i].attribute.type = type; - o->attrs[i].attribute.pValue = malloc(ulValueLen); - if (o->attrs[i].attribute.pValue == NULL && ulValueLen != 0) - return CKR_DEVICE_MEMORY; - memcpy(o->attrs[i].attribute.pValue, pValue, ulValueLen); - o->attrs[i].attribute.ulValueLen = ulValueLen; - o->num_attributes++; - - return CKR_OK; -} - -static CK_RV -add_pubkey_info(hx509_context hxctx, struct st_object *o, - CK_KEY_TYPE key_type, hx509_cert cert) -{ - BIGNUM *num; - CK_BYTE *modulus = NULL; - size_t modulus_len = 0; - CK_ULONG modulus_bits = 0; - CK_BYTE *exponent = NULL; - size_t exponent_len = 0; - - if (key_type != CKK_RSA) - return CKR_OK; - if (_hx509_cert_private_key(cert) == NULL) - return CKR_OK; - - num = _hx509_private_key_get_internal(context, - _hx509_cert_private_key(cert), - "rsa-modulus"); - if (num == NULL) - return CKR_GENERAL_ERROR; - modulus_bits = BN_num_bits(num); - - modulus_len = BN_num_bytes(num); - modulus = malloc(modulus_len); - BN_bn2bin(num, modulus); - BN_free(num); - - add_object_attribute(o, 0, CKA_MODULUS, modulus, modulus_len); - add_object_attribute(o, 0, CKA_MODULUS_BITS, - &modulus_bits, sizeof(modulus_bits)); - - free(modulus); - - num = _hx509_private_key_get_internal(context, - _hx509_cert_private_key(cert), - "rsa-exponent"); - if (num == NULL) - return CKR_GENERAL_ERROR; - - exponent_len = BN_num_bytes(num); - exponent = malloc(exponent_len); - BN_bn2bin(num, exponent); - BN_free(num); - - add_object_attribute(o, 0, CKA_PUBLIC_EXPONENT, - exponent, exponent_len); - - free(exponent); - - return CKR_OK; -} - - -struct foo { - char *label; - char *id; -}; - -static int -add_cert(hx509_context hxctx, void *ctx, hx509_cert cert) -{ - static char empty[] = ""; - struct foo *foo = (struct foo *)ctx; - struct st_object *o = NULL; - CK_OBJECT_CLASS type; - CK_BBOOL bool_true = CK_TRUE; - CK_BBOOL bool_false = CK_FALSE; - CK_CERTIFICATE_TYPE cert_type = CKC_X_509; - CK_KEY_TYPE key_type; - CK_MECHANISM_TYPE mech_type; - CK_RV ret = CKR_GENERAL_ERROR; - int hret; - heim_octet_string cert_data, subject_data, issuer_data, serial_data; - - st_logf("adding certificate\n"); - - serial_data.data = NULL; - serial_data.length = 0; - cert_data = subject_data = issuer_data = serial_data; - - hret = hx509_cert_binary(hxctx, cert, &cert_data); - if (hret) - goto out; - - { - hx509_name name; - - hret = hx509_cert_get_issuer(cert, &name); - if (hret) - goto out; - hret = hx509_name_binary(name, &issuer_data); - hx509_name_free(&name); - if (hret) - goto out; - - hret = hx509_cert_get_subject(cert, &name); - if (hret) - goto out; - hret = hx509_name_binary(name, &subject_data); - hx509_name_free(&name); - if (hret) - goto out; - } - - { - AlgorithmIdentifier alg; - - hret = hx509_cert_get_SPKI_AlgorithmIdentifier(context, cert, &alg); - if (hret) { - ret = CKR_DEVICE_MEMORY; - goto out; - } - - key_type = CKK_RSA; /* XXX */ - - free_AlgorithmIdentifier(&alg); - } - - - type = CKO_CERTIFICATE; - o = add_st_object(); - if (o == NULL) { - ret = CKR_DEVICE_MEMORY; - goto out; - } - - o->cert = hx509_cert_ref(cert); - - add_object_attribute(o, 0, CKA_CLASS, &type, sizeof(type)); - add_object_attribute(o, 0, CKA_TOKEN, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_PRIVATE, &bool_false, sizeof(bool_false)); - add_object_attribute(o, 0, CKA_MODIFIABLE, &bool_false, sizeof(bool_false)); - add_object_attribute(o, 0, CKA_LABEL, foo->label, strlen(foo->label)); - - add_object_attribute(o, 0, CKA_CERTIFICATE_TYPE, &cert_type, sizeof(cert_type)); - add_object_attribute(o, 0, CKA_ID, foo->id, strlen(foo->id)); - - add_object_attribute(o, 0, CKA_SUBJECT, subject_data.data, subject_data.length); - add_object_attribute(o, 0, CKA_ISSUER, issuer_data.data, issuer_data.length); - add_object_attribute(o, 0, CKA_SERIAL_NUMBER, serial_data.data, serial_data.length); - add_object_attribute(o, 0, CKA_VALUE, cert_data.data, cert_data.length); - add_object_attribute(o, 0, CKA_TRUSTED, &bool_false, sizeof(bool_false)); - - st_logf("add cert ok: %lx\n", (unsigned long)OBJECT_ID(o)); - - type = CKO_PUBLIC_KEY; - o = add_st_object(); - if (o == NULL) { - ret = CKR_DEVICE_MEMORY; - goto out; - } - o->cert = hx509_cert_ref(cert); - - add_object_attribute(o, 0, CKA_CLASS, &type, sizeof(type)); - add_object_attribute(o, 0, CKA_TOKEN, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_PRIVATE, &bool_false, sizeof(bool_false)); - add_object_attribute(o, 0, CKA_MODIFIABLE, &bool_false, sizeof(bool_false)); - add_object_attribute(o, 0, CKA_LABEL, foo->label, strlen(foo->label)); - - add_object_attribute(o, 0, CKA_KEY_TYPE, &key_type, sizeof(key_type)); - add_object_attribute(o, 0, CKA_ID, foo->id, strlen(foo->id)); - add_object_attribute(o, 0, CKA_START_DATE, empty, 1); /* XXX */ - add_object_attribute(o, 0, CKA_END_DATE, empty, 1); /* XXX */ - add_object_attribute(o, 0, CKA_DERIVE, &bool_false, sizeof(bool_false)); - add_object_attribute(o, 0, CKA_LOCAL, &bool_false, sizeof(bool_false)); - mech_type = CKM_RSA_X_509; - add_object_attribute(o, 0, CKA_KEY_GEN_MECHANISM, &mech_type, sizeof(mech_type)); - - add_object_attribute(o, 0, CKA_SUBJECT, subject_data.data, subject_data.length); - add_object_attribute(o, 0, CKA_ENCRYPT, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_VERIFY, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_VERIFY_RECOVER, &bool_false, sizeof(bool_false)); - add_object_attribute(o, 0, CKA_WRAP, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_TRUSTED, &bool_true, sizeof(bool_true)); - - add_pubkey_info(hxctx, o, key_type, cert); - - st_logf("add key ok: %lx\n", (unsigned long)OBJECT_ID(o)); - - if (hx509_cert_have_private_key(cert)) { - CK_FLAGS flags; - - type = CKO_PRIVATE_KEY; - o = add_st_object(); - if (o == NULL) { - ret = CKR_DEVICE_MEMORY; - goto out; - } - o->cert = hx509_cert_ref(cert); - - add_object_attribute(o, 0, CKA_CLASS, &type, sizeof(type)); - add_object_attribute(o, 0, CKA_TOKEN, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_PRIVATE, &bool_true, sizeof(bool_false)); - add_object_attribute(o, 0, CKA_MODIFIABLE, &bool_false, sizeof(bool_false)); - add_object_attribute(o, 0, CKA_LABEL, foo->label, strlen(foo->label)); - - add_object_attribute(o, 0, CKA_KEY_TYPE, &key_type, sizeof(key_type)); - add_object_attribute(o, 0, CKA_ID, foo->id, strlen(foo->id)); - add_object_attribute(o, 0, CKA_START_DATE, empty, 1); /* XXX */ - add_object_attribute(o, 0, CKA_END_DATE, empty, 1); /* XXX */ - add_object_attribute(o, 0, CKA_DERIVE, &bool_false, sizeof(bool_false)); - add_object_attribute(o, 0, CKA_LOCAL, &bool_false, sizeof(bool_false)); - mech_type = CKM_RSA_X_509; - add_object_attribute(o, 0, CKA_KEY_GEN_MECHANISM, &mech_type, sizeof(mech_type)); - - add_object_attribute(o, 0, CKA_SUBJECT, subject_data.data, subject_data.length); - add_object_attribute(o, 0, CKA_SENSITIVE, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_SECONDARY_AUTH, &bool_false, sizeof(bool_true)); - flags = 0; - add_object_attribute(o, 0, CKA_AUTH_PIN_FLAGS, &flags, sizeof(flags)); - - add_object_attribute(o, 0, CKA_DECRYPT, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_SIGN, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_SIGN_RECOVER, &bool_false, sizeof(bool_false)); - add_object_attribute(o, 0, CKA_UNWRAP, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_EXTRACTABLE, &bool_true, sizeof(bool_true)); - add_object_attribute(o, 0, CKA_NEVER_EXTRACTABLE, &bool_false, sizeof(bool_false)); - - add_pubkey_info(hxctx, o, key_type, cert); - } - - ret = CKR_OK; - out: - if (ret != CKR_OK) { - st_logf("something went wrong when adding cert!\n"); - - /* XXX wack o */; - } - hx509_xfree(cert_data.data); - hx509_xfree(serial_data.data); - hx509_xfree(issuer_data.data); - hx509_xfree(subject_data.data); - - return 0; -} - -static CK_RV -add_certificate(const char *cert_file, - const char *pin, - char *id, - char *label) -{ - hx509_certs certs; - hx509_lock lock = NULL; - int ret, flags = 0; - - struct foo foo; - foo.id = id; - foo.label = label; - - if (pin == NULL) - flags |= HX509_CERTS_UNPROTECT_ALL; - - if (pin) { - char *str; - asprintf(&str, "PASS:%s", pin); - - hx509_lock_init(context, &lock); - hx509_lock_command_string(lock, str); - - memset(str, 0, strlen(str)); - free(str); - } - - ret = hx509_certs_init(context, cert_file, flags, lock, &certs); - if (ret) { - st_logf("failed to open file %s\n", cert_file); - return CKR_GENERAL_ERROR; - } - - ret = hx509_certs_iter_f(context, certs, add_cert, &foo); - hx509_certs_free(&certs); - if (ret) { - st_logf("failed adding certs from file %s\n", cert_file); - return CKR_GENERAL_ERROR; - } - - return CKR_OK; -} - -static void -find_object_final(struct session_state *state) -{ - if (state->find.attributes) { - CK_ULONG i; - - for (i = 0; i < state->find.num_attributes; i++) { - if (state->find.attributes[i].pValue) - free(state->find.attributes[i].pValue); - } - free(state->find.attributes); - state->find.attributes = NULL; - state->find.num_attributes = 0; - state->find.next_object = -1; - } -} - -static void -reset_crypto_state(struct session_state *state) -{ - state->sign_object = -1; - if (state->sign_mechanism) - free(state->sign_mechanism); - state->sign_mechanism = NULL_PTR; - state->verify_object = -1; - if (state->verify_mechanism) - free(state->verify_mechanism); - state->verify_mechanism = NULL_PTR; -} - -static void -close_session(struct session_state *state) -{ - if (state->find.attributes) { - application_error("application didn't do C_FindObjectsFinal\n"); - find_object_final(state); - } - - state->session_handle = CK_INVALID_HANDLE; - soft_token.application = NULL_PTR; - soft_token.notify = NULL_PTR; - reset_crypto_state(state); -} - -static const char * -has_session(void) -{ - return soft_token.open_sessions > 0 ? "yes" : "no"; -} - -static CK_RV -read_conf_file(const char *fn, CK_USER_TYPE userType, const char *pin) -{ - char buf[1024], *type, *s, *p; - FILE *f; - CK_RV ret = CKR_OK; - CK_RV failed = CKR_OK; - - if (fn == NULL) { - st_logf("Can't open configuration file. No file specified\n"); - return CKR_GENERAL_ERROR; - } - - f = fopen(fn, "r"); - if (f == NULL) { - st_logf("can't open configuration file %s\n", fn); - return CKR_GENERAL_ERROR; - } - rk_cloexec_file(f); - - while(fgets(buf, sizeof(buf), f) != NULL) { - buf[strcspn(buf, "\n")] = '\0'; - - st_logf("line: %s\n", buf); - - p = buf; - while (isspace((unsigned char)*p)) - p++; - if (*p == '#') - continue; - while (isspace((unsigned char)*p)) - p++; - - s = NULL; - type = strtok_r(p, "\t", &s); - if (type == NULL) - continue; - - if (strcasecmp("certificate", type) == 0) { - char *cert, *id, *label; - - id = strtok_r(NULL, "\t", &s); - if (id == NULL) { - st_logf("no id\n"); - continue; - } - st_logf("id: %s\n", id); - label = strtok_r(NULL, "\t", &s); - if (label == NULL) { - st_logf("no label\n"); - continue; - } - cert = strtok_r(NULL, "\t", &s); - if (cert == NULL) { - st_logf("no certfiicate store\n"); - continue; - } - - st_logf("adding: %s: %s in file %s\n", id, label, cert); - - ret = add_certificate(cert, pin, id, label); - if (ret) - failed = ret; - } else if (strcasecmp("debug", type) == 0) { - char *name; - - name = strtok_r(NULL, "\t", &s); - if (name == NULL) { - st_logf("no filename\n"); - continue; - } - - if (soft_token.logfile) - fclose(soft_token.logfile); - - if (strcasecmp(name, "stdout") == 0) - soft_token.logfile = stdout; - else { - soft_token.logfile = fopen(name, "a"); - if (soft_token.logfile) - rk_cloexec_file(soft_token.logfile); - } - if (soft_token.logfile == NULL) - st_logf("failed to open file: %s\n", name); - - } else if (strcasecmp("app-fatal", type) == 0) { - char *name; - - name = strtok_r(NULL, "\t", &s); - if (name == NULL) { - st_logf("argument to app-fatal\n"); - continue; - } - - if (strcmp(name, "true") == 0 || strcmp(name, "on") == 0) - soft_token.flags.app_error_fatal = 1; - else if (strcmp(name, "false") == 0 || strcmp(name, "off") == 0) - soft_token.flags.app_error_fatal = 0; - else - st_logf("unknown app-fatal: %s\n", name); - - } else { - st_logf("unknown type: %s\n", type); - } - } - - fclose(f); - - return failed; -} - -static CK_RV -func_not_supported(void) -{ - st_logf("function not supported\n"); - return CKR_FUNCTION_NOT_SUPPORTED; -} - -static char * -get_config_file_for_user(void) -{ - char *fn = NULL; - -#ifndef _WIN32 - char *home = NULL; - - if (!issuid()) { - fn = getenv("SOFTPKCS11RC"); - if (fn) - fn = strdup(fn); - home = getenv("HOME"); - } - if (fn == NULL && home == NULL) { - struct passwd *pw = getpwuid(getuid()); - if(pw != NULL) - home = pw->pw_dir; - } - if (fn == NULL) { - if (home) - asprintf(&fn, "%s/.soft-token.rc", home); - else - fn = strdup("/etc/soft-token.rc"); - } -#else /* Windows */ - - char appdatafolder[MAX_PATH]; - - fn = getenv("SOFTPKCS11RC"); - - /* Retrieve the roaming AppData folder for the current user. The - current user is the user account represented by the current - thread token. */ - - if (fn == NULL && - SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, appdatafolder))) { - - asprintf(&fn, "%s\\.soft-token.rc", appdatafolder); - } - -#endif /* _WIN32 */ - - return fn; -} - - -CK_RV CK_SPEC -C_Initialize(CK_VOID_PTR a) -{ - CK_C_INITIALIZE_ARGS_PTR args = a; - CK_RV ret; - size_t i; - - st_logf("Initialize\n"); - - INIT_CONTEXT(); - - OpenSSL_add_all_algorithms(); - -#ifndef HAVE_ARC4RANDOM - srandom(getpid() ^ (int) time(NULL)); -#endif - - for (i = 0; i < MAX_NUM_SESSION; i++) { - soft_token.state[i].session_handle = CK_INVALID_HANDLE; - soft_token.state[i].find.attributes = NULL; - soft_token.state[i].find.num_attributes = 0; - soft_token.state[i].find.next_object = -1; - reset_crypto_state(&soft_token.state[i]); - } - - soft_token.flags.hardware_slot = 1; - soft_token.flags.app_error_fatal = 0; - soft_token.flags.login_done = 0; - - soft_token.object.objs = NULL; - soft_token.object.num_objs = 0; - - soft_token.logfile = NULL; -#if 0 - soft_token.logfile = stdout; -#endif -#if 0 - soft_token.logfile = fopen("/tmp/log-pkcs11.txt", "a"); -#endif - - if (a != NULL_PTR) { - st_logf("\tCreateMutex:\t%p\n", args->CreateMutex); - st_logf("\tDestroyMutext\t%p\n", args->DestroyMutex); - st_logf("\tLockMutext\t%p\n", args->LockMutex); - st_logf("\tUnlockMutext\t%p\n", args->UnlockMutex); - st_logf("\tFlags\t%04x\n", (unsigned int)args->flags); - } - - soft_token.config_file = get_config_file_for_user(); - - /* - * This operations doesn't return CKR_OK if any of the - * certificates failes to be unparsed (ie password protected). - */ - ret = read_conf_file(soft_token.config_file, CKU_USER, NULL); - if (ret == CKR_OK) - soft_token.flags.login_done = 1; - - return CKR_OK; -} - -CK_RV -C_Finalize(CK_VOID_PTR args) -{ - size_t i; - - INIT_CONTEXT(); - - st_logf("Finalize\n"); - - for (i = 0; i < MAX_NUM_SESSION; i++) { - if (soft_token.state[i].session_handle != CK_INVALID_HANDLE) { - application_error("application finalized without " - "closing session\n"); - close_session(&soft_token.state[i]); - } - } - - return CKR_OK; -} - -CK_RV -C_GetInfo(CK_INFO_PTR args) -{ - INIT_CONTEXT(); - - st_logf("GetInfo\n"); - - memset(args, 17, sizeof(*args)); - args->cryptokiVersion.major = 2; - args->cryptokiVersion.minor = 10; - snprintf_fill((char *)args->manufacturerID, - sizeof(args->manufacturerID), - ' ', - "Heimdal hx509 SoftToken"); - snprintf_fill((char *)args->libraryDescription, - sizeof(args->libraryDescription), ' ', - "Heimdal hx509 SoftToken"); - args->libraryVersion.major = 2; - args->libraryVersion.minor = 0; - - return CKR_OK; -} - -extern CK_FUNCTION_LIST funcs; - -CK_RV -C_GetFunctionList(CK_FUNCTION_LIST_PTR_PTR ppFunctionList) -{ - INIT_CONTEXT(); - - *ppFunctionList = &funcs; - return CKR_OK; -} - -CK_RV -C_GetSlotList(CK_BBOOL tokenPresent, - CK_SLOT_ID_PTR pSlotList, - CK_ULONG_PTR pulCount) -{ - INIT_CONTEXT(); - st_logf("GetSlotList: %s\n", - tokenPresent ? "tokenPresent" : "token not Present"); - if (pSlotList) - pSlotList[0] = 1; - *pulCount = 1; - return CKR_OK; -} - -CK_RV -C_GetSlotInfo(CK_SLOT_ID slotID, - CK_SLOT_INFO_PTR pInfo) -{ - INIT_CONTEXT(); - st_logf("GetSlotInfo: slot: %d : %s\n", (int)slotID, has_session()); - - memset(pInfo, 18, sizeof(*pInfo)); - - if (slotID != 1) - return CKR_ARGUMENTS_BAD; - - snprintf_fill((char *)pInfo->slotDescription, - sizeof(pInfo->slotDescription), - ' ', - "Heimdal hx509 SoftToken (slot)"); - snprintf_fill((char *)pInfo->manufacturerID, - sizeof(pInfo->manufacturerID), - ' ', - "Heimdal hx509 SoftToken (slot)"); - pInfo->flags = CKF_TOKEN_PRESENT; - if (soft_token.flags.hardware_slot) - pInfo->flags |= CKF_HW_SLOT; - pInfo->hardwareVersion.major = 1; - pInfo->hardwareVersion.minor = 0; - pInfo->firmwareVersion.major = 1; - pInfo->firmwareVersion.minor = 0; - - return CKR_OK; -} - -CK_RV -C_GetTokenInfo(CK_SLOT_ID slotID, - CK_TOKEN_INFO_PTR pInfo) -{ - INIT_CONTEXT(); - st_logf("GetTokenInfo: %s\n", has_session()); - - memset(pInfo, 19, sizeof(*pInfo)); - - snprintf_fill((char *)pInfo->label, - sizeof(pInfo->label), - ' ', - "Heimdal hx509 SoftToken (token)"); - snprintf_fill((char *)pInfo->manufacturerID, - sizeof(pInfo->manufacturerID), - ' ', - "Heimdal hx509 SoftToken (token)"); - snprintf_fill((char *)pInfo->model, - sizeof(pInfo->model), - ' ', - "Heimdal hx509 SoftToken (token)"); - snprintf_fill((char *)pInfo->serialNumber, - sizeof(pInfo->serialNumber), - ' ', - "4711"); - pInfo->flags = - CKF_TOKEN_INITIALIZED | - CKF_USER_PIN_INITIALIZED; - - if (soft_token.flags.login_done == 0) - pInfo->flags |= CKF_LOGIN_REQUIRED; - - /* CFK_RNG | - CKF_RESTORE_KEY_NOT_NEEDED | - */ - pInfo->ulMaxSessionCount = MAX_NUM_SESSION; - pInfo->ulSessionCount = soft_token.open_sessions; - pInfo->ulMaxRwSessionCount = MAX_NUM_SESSION; - pInfo->ulRwSessionCount = soft_token.open_sessions; - pInfo->ulMaxPinLen = 1024; - pInfo->ulMinPinLen = 0; - pInfo->ulTotalPublicMemory = 4711; - pInfo->ulFreePublicMemory = 4712; - pInfo->ulTotalPrivateMemory = 4713; - pInfo->ulFreePrivateMemory = 4714; - pInfo->hardwareVersion.major = 2; - pInfo->hardwareVersion.minor = 0; - pInfo->firmwareVersion.major = 2; - pInfo->firmwareVersion.minor = 0; - - return CKR_OK; -} - -CK_RV -C_GetMechanismList(CK_SLOT_ID slotID, - CK_MECHANISM_TYPE_PTR pMechanismList, - CK_ULONG_PTR pulCount) -{ - INIT_CONTEXT(); - st_logf("GetMechanismList\n"); - - *pulCount = 1; - if (pMechanismList == NULL_PTR) - return CKR_OK; - pMechanismList[1] = CKM_RSA_PKCS; - - return CKR_OK; -} - -CK_RV -C_GetMechanismInfo(CK_SLOT_ID slotID, - CK_MECHANISM_TYPE type, - CK_MECHANISM_INFO_PTR pInfo) -{ - INIT_CONTEXT(); - st_logf("GetMechanismInfo: slot %d type: %d\n", - (int)slotID, (int)type); - memset(pInfo, 0, sizeof(*pInfo)); - - return CKR_OK; -} - -CK_RV -C_InitToken(CK_SLOT_ID slotID, - CK_UTF8CHAR_PTR pPin, - CK_ULONG ulPinLen, - CK_UTF8CHAR_PTR pLabel) -{ - INIT_CONTEXT(); - st_logf("InitToken: slot %d\n", (int)slotID); - return CKR_FUNCTION_NOT_SUPPORTED; -} - -CK_RV -C_OpenSession(CK_SLOT_ID slotID, - CK_FLAGS flags, - CK_VOID_PTR pApplication, - CK_NOTIFY Notify, - CK_SESSION_HANDLE_PTR phSession) -{ - size_t i; - u_int32_t rnd; - INIT_CONTEXT(); - st_logf("OpenSession: slot: %d\n", (int)slotID); - - if (soft_token.open_sessions == MAX_NUM_SESSION) - return CKR_SESSION_COUNT; - - soft_token.application = pApplication; - soft_token.notify = Notify; - - for (i = 0; i < MAX_NUM_SESSION; i++) - if (soft_token.state[i].session_handle == CK_INVALID_HANDLE) - break; - if (i == MAX_NUM_SESSION) - abort(); - -#ifdef HAVE_ARC4RANDOM - rnd = arc4random(); -#else - rnd = random(); -#endif - - soft_token.open_sessions++; - soft_token.state[i].session_handle = - (CK_SESSION_HANDLE)(rnd & 0xfffff); - *phSession = soft_token.state[i].session_handle; - - return CKR_OK; -} - -CK_RV -C_CloseSession(CK_SESSION_HANDLE hSession) -{ - struct session_state *state; - INIT_CONTEXT(); - st_logf("CloseSession\n"); - - if (verify_session_handle(hSession, &state) != CKR_OK) - application_error("closed session not open"); - else - close_session(state); - - return CKR_OK; -} - -CK_RV -C_CloseAllSessions(CK_SLOT_ID slotID) -{ - size_t i; - INIT_CONTEXT(); - - st_logf("CloseAllSessions\n"); - - for (i = 0; i < MAX_NUM_SESSION; i++) - if (soft_token.state[i].session_handle != CK_INVALID_HANDLE) - close_session(&soft_token.state[i]); - - return CKR_OK; -} - -CK_RV -C_GetSessionInfo(CK_SESSION_HANDLE hSession, - CK_SESSION_INFO_PTR pInfo) -{ - st_logf("GetSessionInfo\n"); - INIT_CONTEXT(); - - VERIFY_SESSION_HANDLE(hSession, NULL); - - memset(pInfo, 20, sizeof(*pInfo)); - - pInfo->slotID = 1; - if (soft_token.flags.login_done) - pInfo->state = CKS_RO_USER_FUNCTIONS; - else - pInfo->state = CKS_RO_PUBLIC_SESSION; - pInfo->flags = CKF_SERIAL_SESSION; - pInfo->ulDeviceError = 0; - - return CKR_OK; -} - -CK_RV -C_Login(CK_SESSION_HANDLE hSession, - CK_USER_TYPE userType, - CK_UTF8CHAR_PTR pPin, - CK_ULONG ulPinLen) -{ - char *pin = NULL; - CK_RV ret; - INIT_CONTEXT(); - - st_logf("Login\n"); - - VERIFY_SESSION_HANDLE(hSession, NULL); - - if (pPin != NULL_PTR) { - asprintf(&pin, "%.*s", (int)ulPinLen, pPin); - st_logf("type: %d password: %s\n", (int)userType, pin); - } - - /* - * Login - */ - - ret = read_conf_file(soft_token.config_file, userType, pin); - if (ret == CKR_OK) - soft_token.flags.login_done = 1; - - free(pin); - - return soft_token.flags.login_done ? CKR_OK : CKR_PIN_INCORRECT; -} - -CK_RV -C_Logout(CK_SESSION_HANDLE hSession) -{ - st_logf("Logout\n"); - INIT_CONTEXT(); - - VERIFY_SESSION_HANDLE(hSession, NULL); - return CKR_FUNCTION_NOT_SUPPORTED; -} - -CK_RV -C_GetObjectSize(CK_SESSION_HANDLE hSession, - CK_OBJECT_HANDLE hObject, - CK_ULONG_PTR pulSize) -{ - st_logf("GetObjectSize\n"); - INIT_CONTEXT(); - - VERIFY_SESSION_HANDLE(hSession, NULL); - return CKR_FUNCTION_NOT_SUPPORTED; -} - -CK_RV -C_GetAttributeValue(CK_SESSION_HANDLE hSession, - CK_OBJECT_HANDLE hObject, - CK_ATTRIBUTE_PTR pTemplate, - CK_ULONG ulCount) -{ - struct session_state *state; - struct st_object *obj; - CK_ULONG i; - CK_RV ret; - int j; - - INIT_CONTEXT(); - - st_logf("GetAttributeValue: %lx\n", - (unsigned long)HANDLE_OBJECT_ID(hObject)); - VERIFY_SESSION_HANDLE(hSession, &state); - - if ((ret = object_handle_to_object(hObject, &obj)) != CKR_OK) { - st_logf("object not found: %lx\n", - (unsigned long)HANDLE_OBJECT_ID(hObject)); - return ret; - } - - for (i = 0; i < ulCount; i++) { - st_logf(" getting 0x%08lx\n", (unsigned long)pTemplate[i].type); - for (j = 0; j < obj->num_attributes; j++) { - if (obj->attrs[j].secret) { - pTemplate[i].ulValueLen = (CK_ULONG)-1; - break; - } - if (pTemplate[i].type == obj->attrs[j].attribute.type) { - if (pTemplate[i].pValue != NULL_PTR && obj->attrs[j].secret == 0) { - if (pTemplate[i].ulValueLen >= obj->attrs[j].attribute.ulValueLen) - memcpy(pTemplate[i].pValue, obj->attrs[j].attribute.pValue, - obj->attrs[j].attribute.ulValueLen); - } - pTemplate[i].ulValueLen = obj->attrs[j].attribute.ulValueLen; - break; - } - } - if (j == obj->num_attributes) { - st_logf("key type: 0x%08lx not found\n", (unsigned long)pTemplate[i].type); - pTemplate[i].ulValueLen = (CK_ULONG)-1; - } - - } - return CKR_OK; -} - -CK_RV -C_FindObjectsInit(CK_SESSION_HANDLE hSession, - CK_ATTRIBUTE_PTR pTemplate, - CK_ULONG ulCount) -{ - struct session_state *state; - - st_logf("FindObjectsInit\n"); - - INIT_CONTEXT(); - - VERIFY_SESSION_HANDLE(hSession, &state); - - if (state->find.next_object != -1) { - application_error("application didn't do C_FindObjectsFinal\n"); - find_object_final(state); - } - if (ulCount) { - CK_ULONG i; - - print_attributes(pTemplate, ulCount); - - state->find.attributes = - calloc(1, ulCount * sizeof(state->find.attributes[0])); - if (state->find.attributes == NULL) - return CKR_DEVICE_MEMORY; - for (i = 0; i < ulCount; i++) { - state->find.attributes[i].pValue = - malloc(pTemplate[i].ulValueLen); - if (state->find.attributes[i].pValue == NULL) { - find_object_final(state); - return CKR_DEVICE_MEMORY; - } - memcpy(state->find.attributes[i].pValue, - pTemplate[i].pValue, pTemplate[i].ulValueLen); - state->find.attributes[i].type = pTemplate[i].type; - state->find.attributes[i].ulValueLen = pTemplate[i].ulValueLen; - } - state->find.num_attributes = ulCount; - state->find.next_object = 0; - } else { - st_logf("find all objects\n"); - state->find.attributes = NULL; - state->find.num_attributes = 0; - state->find.next_object = 0; - } - - return CKR_OK; -} - -CK_RV -C_FindObjects(CK_SESSION_HANDLE hSession, - CK_OBJECT_HANDLE_PTR phObject, - CK_ULONG ulMaxObjectCount, - CK_ULONG_PTR pulObjectCount) -{ - struct session_state *state; - int i; - - INIT_CONTEXT(); - - st_logf("FindObjects\n"); - - VERIFY_SESSION_HANDLE(hSession, &state); - - if (state->find.next_object == -1) { - application_error("application didn't do C_FindObjectsInit\n"); - return CKR_ARGUMENTS_BAD; - } - if (ulMaxObjectCount == 0) { - application_error("application asked for 0 objects\n"); - return CKR_ARGUMENTS_BAD; - } - *pulObjectCount = 0; - for (i = state->find.next_object; i < soft_token.object.num_objs; i++) { - st_logf("FindObjects: %d\n", i); - state->find.next_object = i + 1; - if (attributes_match(soft_token.object.objs[i], - state->find.attributes, - state->find.num_attributes)) { - *phObject++ = soft_token.object.objs[i]->object_handle; - ulMaxObjectCount--; - (*pulObjectCount)++; - if (ulMaxObjectCount == 0) - break; - } - } - return CKR_OK; -} - -CK_RV -C_FindObjectsFinal(CK_SESSION_HANDLE hSession) -{ - struct session_state *state; - - INIT_CONTEXT(); - - st_logf("FindObjectsFinal\n"); - VERIFY_SESSION_HANDLE(hSession, &state); - find_object_final(state); - return CKR_OK; -} - -static CK_RV -commonInit(CK_ATTRIBUTE *attr_match, int attr_match_len, - const CK_MECHANISM_TYPE *mechs, int mechs_len, - const CK_MECHANISM_PTR pMechanism, CK_OBJECT_HANDLE hKey, - struct st_object **o) -{ - CK_RV ret; - int i; - - *o = NULL; - if ((ret = object_handle_to_object(hKey, o)) != CKR_OK) - return ret; - - ret = attributes_match(*o, attr_match, attr_match_len); - if (!ret) { - application_error("called commonInit on key that doesn't " - "support required attr"); - return CKR_ARGUMENTS_BAD; - } - - for (i = 0; i < mechs_len; i++) - if (mechs[i] == pMechanism->mechanism) - break; - if (i == mechs_len) { - application_error("called mech (%08lx) not supported\n", - pMechanism->mechanism); - return CKR_ARGUMENTS_BAD; - } - return CKR_OK; -} - - -static CK_RV -dup_mechanism(CK_MECHANISM_PTR *dp, const CK_MECHANISM_PTR pMechanism) -{ - CK_MECHANISM_PTR p; - - p = malloc(sizeof(*p)); - if (p == NULL) - return CKR_DEVICE_MEMORY; - - if (*dp) - free(*dp); - *dp = p; - memcpy(p, pMechanism, sizeof(*p)); - - return CKR_OK; -} - -CK_RV -C_DigestInit(CK_SESSION_HANDLE hSession, - CK_MECHANISM_PTR pMechanism) -{ - st_logf("DigestInit\n"); - INIT_CONTEXT(); - VERIFY_SESSION_HANDLE(hSession, NULL); - return CKR_FUNCTION_NOT_SUPPORTED; -} - -CK_RV -C_SignInit(CK_SESSION_HANDLE hSession, - CK_MECHANISM_PTR pMechanism, - CK_OBJECT_HANDLE hKey) -{ - struct session_state *state; - CK_MECHANISM_TYPE mechs[] = { CKM_RSA_PKCS }; - CK_BBOOL bool_true = CK_TRUE; - CK_ATTRIBUTE attr[] = { - { CKA_SIGN, &bool_true, sizeof(bool_true) } - }; - struct st_object *o; - CK_RV ret; - - INIT_CONTEXT(); - st_logf("SignInit\n"); - VERIFY_SESSION_HANDLE(hSession, &state); - - ret = commonInit(attr, sizeof(attr)/sizeof(attr[0]), - mechs, sizeof(mechs)/sizeof(mechs[0]), - pMechanism, hKey, &o); - if (ret) - return ret; - - ret = dup_mechanism(&state->sign_mechanism, pMechanism); - if (ret == CKR_OK) - state->sign_object = OBJECT_ID(o); - - return CKR_OK; -} - -CK_RV -C_Sign(CK_SESSION_HANDLE hSession, - CK_BYTE_PTR pData, - CK_ULONG ulDataLen, - CK_BYTE_PTR pSignature, - CK_ULONG_PTR pulSignatureLen) -{ - struct session_state *state; - struct st_object *o; - CK_RV ret; - int hret; - const AlgorithmIdentifier *alg; - heim_octet_string sig, data; - - INIT_CONTEXT(); - st_logf("Sign\n"); - VERIFY_SESSION_HANDLE(hSession, &state); - - sig.data = NULL; - sig.length = 0; - - if (state->sign_object == -1) - return CKR_ARGUMENTS_BAD; - - if (pulSignatureLen == NULL) { - st_logf("signature len NULL\n"); - ret = CKR_ARGUMENTS_BAD; - goto out; - } - - if (pData == NULL_PTR) { - st_logf("data NULL\n"); - ret = CKR_ARGUMENTS_BAD; - goto out; - } - - o = soft_token.object.objs[state->sign_object]; - - if (hx509_cert_have_private_key(o->cert) == 0) { - st_logf("private key NULL\n"); - return CKR_ARGUMENTS_BAD; - } - - switch(state->sign_mechanism->mechanism) { - case CKM_RSA_PKCS: - alg = hx509_signature_rsa_pkcs1_x509(); - break; - default: - ret = CKR_FUNCTION_NOT_SUPPORTED; - goto out; - } - - data.data = pData; - data.length = ulDataLen; - - hret = _hx509_create_signature(context, - _hx509_cert_private_key(o->cert), - alg, - &data, - NULL, - &sig); - if (hret) { - ret = CKR_DEVICE_ERROR; - goto out; - } - *pulSignatureLen = sig.length; - - if (pSignature != NULL_PTR) - memcpy(pSignature, sig.data, sig.length); - - ret = CKR_OK; - out: - if (sig.data) { - memset(sig.data, 0, sig.length); - der_free_octet_string(&sig); - } - return ret; -} - -CK_RV -C_SignUpdate(CK_SESSION_HANDLE hSession, - CK_BYTE_PTR pPart, - CK_ULONG ulPartLen) -{ - INIT_CONTEXT(); - st_logf("SignUpdate\n"); - VERIFY_SESSION_HANDLE(hSession, NULL); - return CKR_FUNCTION_NOT_SUPPORTED; -} - - -CK_RV -C_SignFinal(CK_SESSION_HANDLE hSession, - CK_BYTE_PTR pSignature, - CK_ULONG_PTR pulSignatureLen) -{ - INIT_CONTEXT(); - st_logf("SignUpdate\n"); - VERIFY_SESSION_HANDLE(hSession, NULL); - return CKR_FUNCTION_NOT_SUPPORTED; -} - -CK_RV -C_VerifyInit(CK_SESSION_HANDLE hSession, - CK_MECHANISM_PTR pMechanism, - CK_OBJECT_HANDLE hKey) -{ - struct session_state *state; - CK_MECHANISM_TYPE mechs[] = { CKM_RSA_PKCS }; - CK_BBOOL bool_true = CK_TRUE; - CK_ATTRIBUTE attr[] = { - { CKA_VERIFY, &bool_true, sizeof(bool_true) } - }; - struct st_object *o; - CK_RV ret; - - INIT_CONTEXT(); - st_logf("VerifyInit\n"); - VERIFY_SESSION_HANDLE(hSession, &state); - - ret = commonInit(attr, sizeof(attr)/sizeof(attr[0]), - mechs, sizeof(mechs)/sizeof(mechs[0]), - pMechanism, hKey, &o); - if (ret) - return ret; - - ret = dup_mechanism(&state->verify_mechanism, pMechanism); - if (ret == CKR_OK) - state->verify_object = OBJECT_ID(o); - - return ret; -} - -CK_RV -C_Verify(CK_SESSION_HANDLE hSession, - CK_BYTE_PTR pData, - CK_ULONG ulDataLen, - CK_BYTE_PTR pSignature, - CK_ULONG ulSignatureLen) -{ - struct session_state *state; - struct st_object *o; - const AlgorithmIdentifier *alg; - CK_RV ret; - int hret; - heim_octet_string data, sig; - - INIT_CONTEXT(); - st_logf("Verify\n"); - VERIFY_SESSION_HANDLE(hSession, &state); - - if (state->verify_object == -1) - return CKR_ARGUMENTS_BAD; - - o = soft_token.object.objs[state->verify_object]; - - switch(state->verify_mechanism->mechanism) { - case CKM_RSA_PKCS: - alg = hx509_signature_rsa_pkcs1_x509(); - break; - default: - ret = CKR_FUNCTION_NOT_SUPPORTED; - goto out; - } - - sig.data = pData; - sig.length = ulDataLen; - data.data = pSignature; - data.length = ulSignatureLen; - - hret = _hx509_verify_signature(context, - o->cert, - alg, - &data, - &sig); - if (hret) { - ret = CKR_GENERAL_ERROR; - goto out; - } - ret = CKR_OK; - - out: - return ret; -} - - -CK_RV -C_VerifyUpdate(CK_SESSION_HANDLE hSession, - CK_BYTE_PTR pPart, - CK_ULONG ulPartLen) -{ - INIT_CONTEXT(); - st_logf("VerifyUpdate\n"); - VERIFY_SESSION_HANDLE(hSession, NULL); - return CKR_FUNCTION_NOT_SUPPORTED; -} - -CK_RV -C_VerifyFinal(CK_SESSION_HANDLE hSession, - CK_BYTE_PTR pSignature, - CK_ULONG ulSignatureLen) -{ - INIT_CONTEXT(); - st_logf("VerifyFinal\n"); - VERIFY_SESSION_HANDLE(hSession, NULL); - return CKR_FUNCTION_NOT_SUPPORTED; -} - -CK_RV -C_GenerateRandom(CK_SESSION_HANDLE hSession, - CK_BYTE_PTR RandomData, - CK_ULONG ulRandomLen) -{ - INIT_CONTEXT(); - st_logf("GenerateRandom\n"); - VERIFY_SESSION_HANDLE(hSession, NULL); - return CKR_FUNCTION_NOT_SUPPORTED; -} - - -CK_FUNCTION_LIST funcs = { - { 2, 11 }, - C_Initialize, - C_Finalize, - C_GetInfo, - C_GetFunctionList, - C_GetSlotList, - C_GetSlotInfo, - C_GetTokenInfo, - C_GetMechanismList, - C_GetMechanismInfo, - C_InitToken, - (void *)func_not_supported, /* C_InitPIN */ - (void *)func_not_supported, /* C_SetPIN */ - C_OpenSession, - C_CloseSession, - C_CloseAllSessions, - C_GetSessionInfo, - (void *)func_not_supported, /* C_GetOperationState */ - (void *)func_not_supported, /* C_SetOperationState */ - C_Login, - C_Logout, - (void *)func_not_supported, /* C_CreateObject */ - (void *)func_not_supported, /* C_CopyObject */ - (void *)func_not_supported, /* C_DestroyObject */ - (void *)func_not_supported, /* C_GetObjectSize */ - C_GetAttributeValue, - (void *)func_not_supported, /* C_SetAttributeValue */ - C_FindObjectsInit, - C_FindObjects, - C_FindObjectsFinal, - (void *)func_not_supported, /* C_EncryptInit, */ - (void *)func_not_supported, /* C_Encrypt, */ - (void *)func_not_supported, /* C_EncryptUpdate, */ - (void *)func_not_supported, /* C_EncryptFinal, */ - (void *)func_not_supported, /* C_DecryptInit, */ - (void *)func_not_supported, /* C_Decrypt, */ - (void *)func_not_supported, /* C_DecryptUpdate, */ - (void *)func_not_supported, /* C_DecryptFinal, */ - C_DigestInit, - (void *)func_not_supported, /* C_Digest */ - (void *)func_not_supported, /* C_DigestUpdate */ - (void *)func_not_supported, /* C_DigestKey */ - (void *)func_not_supported, /* C_DigestFinal */ - C_SignInit, - C_Sign, - C_SignUpdate, - C_SignFinal, - (void *)func_not_supported, /* C_SignRecoverInit */ - (void *)func_not_supported, /* C_SignRecover */ - C_VerifyInit, - C_Verify, - C_VerifyUpdate, - C_VerifyFinal, - (void *)func_not_supported, /* C_VerifyRecoverInit */ - (void *)func_not_supported, /* C_VerifyRecover */ - (void *)func_not_supported, /* C_DigestEncryptUpdate */ - (void *)func_not_supported, /* C_DecryptDigestUpdate */ - (void *)func_not_supported, /* C_SignEncryptUpdate */ - (void *)func_not_supported, /* C_DecryptVerifyUpdate */ - (void *)func_not_supported, /* C_GenerateKey */ - (void *)func_not_supported, /* C_GenerateKeyPair */ - (void *)func_not_supported, /* C_WrapKey */ - (void *)func_not_supported, /* C_UnwrapKey */ - (void *)func_not_supported, /* C_DeriveKey */ - (void *)func_not_supported, /* C_SeedRandom */ - C_GenerateRandom, - (void *)func_not_supported, /* C_GetFunctionStatus */ - (void *)func_not_supported, /* C_CancelFunction */ - (void *)func_not_supported /* C_WaitForSlotEvent */ -}; diff --git a/kerberosV/src/lib/hx509/test_ca.in b/kerberosV/src/lib/hx509/test_ca.in deleted file mode 100644 index 713670718a4..00000000000 --- a/kerberosV/src/lib/hx509/test_ca.in +++ /dev/null @@ -1,424 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2006 - 2007 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: test_ca.in,v 1.1 2013/06/17 19:11:43 robert Exp $ -# - -srcdir="@srcdir@" -objdir="@objdir@" - -stat="--statistic-file=${objdir}/statfile" - -hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" - -if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - -echo "create certificate request" -${hxtool} request-create \ - --subject="CN=Love,DC=it,DC=su,DC=se" \ - --key=FILE:$srcdir/data/key.der \ - pkcs10-request.der || exit 1 - -echo "issue certificate" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --subject="cn=foo" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "verify certificate" -${hxtool} verify --missing-revoke \ - cert:FILE:cert-ee.pem \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "issue crl (no cert)" -${hxtool} crl-sign \ - --crl-file=crl.crl \ - --signer=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key || exit 1 - -echo "verify certificate (with CRL)" -${hxtool} verify \ - cert:FILE:cert-ee.pem \ - crl:FILE:crl.crl \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "issue crl (with cert)" -${hxtool} crl-sign \ - --crl-file=crl.crl \ - --signer=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - FILE:cert-ee.pem || exit 1 - -echo "verify certificate (included in CRL)" -${hxtool} verify \ - cert:FILE:cert-ee.pem \ - crl:FILE:crl.crl \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "issue crl (with cert)" -${hxtool} crl-sign \ - --crl-file=crl.crl \ - --lifetime='1 month' \ - --signer=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - FILE:cert-ee.pem || exit 1 - -echo "verify certificate (included in CRL, and lifetime 1 month)" -${hxtool} verify \ - cert:FILE:cert-ee.pem \ - crl:FILE:crl.crl \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "issue certificate (10years 1 month)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --subject="cn=foo" \ - --lifetime="10years 1 month" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "issue certificate (with https ekus)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --subject="cn=foo" \ - --type="https-server" \ - --type="https-client" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "issue certificate (pkinit KDC)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --subject="cn=foo" \ - --type="pkinit-kdc" \ - --pk-init-principal="krbtgt/TEST.H5L.SE@TEST.H5L.SE" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "issue certificate (pkinit client)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --subject="cn=foo" \ - --type="pkinit-client" \ - --pk-init-principal="lha@TEST.H5L.SE" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "issue certificate (hostnames)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --subject="cn=foo" \ - --type="https-server" \ - --hostname="www.test.h5l.se" \ - --hostname="ftp.test.h5l.se" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "verify certificate hostname (ok)" -${hxtool} verify --missing-revoke \ - --hostname=www.test.h5l.se \ - cert:FILE:cert-ee.pem \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "verify certificate hostname (fail)" -${hxtool} verify --missing-revoke \ - --hostname=www2.test.h5l.se \ - cert:FILE:cert-ee.pem \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "verify certificate hostname (fail)" -${hxtool} verify --missing-revoke \ - --hostname=2www.test.h5l.se \ - cert:FILE:cert-ee.pem \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "issue certificate (hostname in CN)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --subject="cn=www.test.h5l.se" \ - --type="https-server" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "verify certificate hostname (ok)" -${hxtool} verify --missing-revoke \ - --hostname=www.test.h5l.se \ - cert:FILE:cert-ee.pem \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "verify certificate hostname (fail)" -${hxtool} verify --missing-revoke \ - --hostname=www2.test.h5l.se \ - cert:FILE:cert-ee.pem \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "issue certificate (email)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --subject="cn=foo" \ - --email="lha@test.h5l.se" \ - --email="test@test.h5l.se" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "issue certificate (email, null subject DN)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --subject="" \ - --email="lha@test.h5l.se" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-null.pem" || exit 1 - -echo "issue certificate (jabber)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --subject="cn=foo" \ - --jid="lha@test.h5l.se" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "issue self-signed cert" -${hxtool} issue-certificate \ - --self-signed \ - --ca-private-key=FILE:$srcdir/data/key.der \ - --subject="cn=test" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "issue ca cert" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/ca.crt,$srcdir/data/ca.key \ - --issue-ca \ - --subject="cn=ca-cert" \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-ca.der" || exit 1 - -echo "issue self-signed ca cert" -${hxtool} issue-certificate \ - --self-signed \ - --issue-ca \ - --ca-private-key=FILE:$srcdir/data/key.der \ - --subject="cn=ca-root" \ - --certificate="FILE:cert-ca.der" || exit 1 - -echo "issue proxy certificate" -${hxtool} issue-certificate \ - --ca-certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --issue-proxy \ - --req="PKCS10:pkcs10-request.der" \ - --certificate="FILE:cert-proxy.der" || exit 1 - -echo "verify proxy cert" -${hxtool} verify --missing-revoke \ - --allow-proxy-certificate \ - cert:FILE:cert-proxy.der \ - chain:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "issue ca cert (generate rsa key)" -${hxtool} issue-certificate \ - --self-signed \ - --issue-ca \ - --serial-number="deadbeaf" \ - --generate-key=rsa \ - --path-length=-1 \ - --subject="cn=ca2-cert" \ - --certificate="FILE:cert-ca.pem" || exit 1 - -echo "issue sub-ca cert (generate rsa key)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:cert-ca.pem \ - --issue-ca \ - --serial-number="deadbeaf22" \ - --generate-key=rsa \ - --subject="cn=sub-ca2-cert" \ - --certificate="FILE:cert-sub-ca.pem" || exit 1 - -echo "issue ee cert (generate rsa key)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:cert-ca.pem \ - --generate-key=rsa \ - --subject="cn=cert-ee2" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "issue sub-ca ee cert (generate rsa key)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:cert-sub-ca.pem \ - --generate-key=rsa \ - --subject="cn=cert-sub-ee2" \ - --certificate="FILE:cert-sub-ee.pem" || exit 1 - -echo "verify certificate (ee)" -${hxtool} verify --missing-revoke \ - cert:FILE:cert-ee.pem \ - anchor:FILE:cert-ca.pem > /dev/null || exit 1 - -echo "verify certificate (sub-ee)" -${hxtool} verify --missing-revoke \ - cert:FILE:cert-sub-ee.pem \ - chain:FILE:cert-sub-ca.pem \ - anchor:FILE:cert-ca.pem || exit 1 - -echo "sign CMS signature (generate key)" -${hxtool} cms-create-sd \ - --certificate=FILE:cert-ee.pem \ - "$srcdir/test_name.c" \ - sd.data > /dev/null || exit 1 - -echo "verify CMS signature (generate key)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:cert-ca.pem \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_name.c" sd.data.out || exit 1 - -echo "extend ca cert" -${hxtool} issue-certificate \ - --self-signed \ - --issue-ca \ - --lifetime="2years" \ - --serial-number="deadbeaf" \ - --ca-private-key=FILE:cert-ca.pem \ - --subject="cn=ca2-cert" \ - --certificate="FILE:cert-ca.pem" || exit 1 - -echo "verify certificate generated by previous ca" -${hxtool} verify --missing-revoke \ - cert:FILE:cert-ee.pem \ - anchor:FILE:cert-ca.pem > /dev/null || exit 1 - -echo "extend ca cert (template)" -${hxtool} issue-certificate \ - --self-signed \ - --issue-ca \ - --lifetime="3years" \ - --template-certificate="FILE:cert-ca.pem" \ - --template-fields="serialNumber,notBefore,subject" \ - --path-length=-1 \ - --ca-private-key=FILE:cert-ca.pem \ - --certificate="FILE:cert-ca.pem" || exit 1 - -echo "verify certificate generated by previous ca" -${hxtool} verify --missing-revoke \ - cert:FILE:cert-ee.pem \ - anchor:FILE:cert-ca.pem > /dev/null || exit 1 - -echo "extend sub-ca cert (template)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:cert-ca.pem \ - --issue-ca \ - --lifetime="2years" \ - --template-certificate="FILE:cert-sub-ca.pem" \ - --template-fields="serialNumber,notBefore,subject,SPKI" \ - --certificate="FILE:cert-sub-ca2.pem" || exit 1 - -echo "verify certificate (sub-ee) with extended chain" -${hxtool} verify --missing-revoke \ - cert:FILE:cert-sub-ee.pem \ - chain:FILE:cert-sub-ca.pem \ - anchor:FILE:cert-ca.pem > /dev/null || exit 1 - -echo "+++++++++++ test basic constraints" - -echo "extend ca cert (too low path-length constraint)" -${hxtool} issue-certificate \ - --self-signed \ - --issue-ca \ - --lifetime="3years" \ - --template-certificate="FILE:cert-ca.pem" \ - --template-fields="serialNumber,notBefore,subject" \ - --path-length=0 \ - --ca-private-key=FILE:cert-ca.pem \ - --certificate="FILE:cert-ca.pem" || exit 1 - -echo "verify failure of certificate (sub-ee) with path-length constraint" -${hxtool} verify --missing-revoke \ - cert:FILE:cert-sub-ee.pem \ - chain:FILE:cert-sub-ca.pem \ - anchor:FILE:cert-ca.pem > /dev/null && exit 1 - -echo "extend ca cert (exact path-length constraint)" -${hxtool} issue-certificate \ - --self-signed \ - --issue-ca \ - --lifetime="3years" \ - --template-certificate="FILE:cert-ca.pem" \ - --template-fields="serialNumber,notBefore,subject" \ - --path-length=1 \ - --ca-private-key=FILE:cert-ca.pem \ - --certificate="FILE:cert-ca.pem" || exit 1 - -echo "verify certificate (sub-ee) with exact path-length constraint" -${hxtool} verify --missing-revoke \ - cert:FILE:cert-sub-ee.pem \ - chain:FILE:cert-sub-ca.pem \ - anchor:FILE:cert-ca.pem > /dev/null || exit 1 - -echo "Check missing basicConstrants.isCa" -${hxtool} issue-certificate \ - --ca-certificate=FILE:cert-ca.pem \ - --lifetime="2years" \ - --template-certificate="FILE:cert-sub-ca.pem" \ - --template-fields="serialNumber,notBefore,subject,SPKI" \ - --certificate="FILE:cert-sub-ca2.pem" || exit 1 - -echo "verify failure certificate (sub-ee) with missing isCA" -${hxtool} verify --missing-revoke \ - cert:FILE:cert-sub-ee.pem \ - chain:FILE:cert-sub-ca2.pem \ - anchor:FILE:cert-ca.pem > /dev/null && exit 1 - -echo "issue ee cert (crl uri)" -${hxtool} issue-certificate \ - --ca-certificate=FILE:cert-ca.pem \ - --req="PKCS10:pkcs10-request.der" \ - --crl-uri="http://www.test.h5l.se/crl1.crl" \ - --subject="cn=cert-ee-crl-uri" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "issue null subject cert" -${hxtool} issue-certificate \ - --ca-certificate=FILE:cert-ca.pem \ - --req="PKCS10:pkcs10-request.der" \ - --subject="" \ - --email="lha@test.h5l.se" \ - --certificate="FILE:cert-ee.pem" || exit 1 - -echo "verify certificate null subject" -${hxtool} verify --missing-revoke \ - cert:FILE:cert-ee.pem \ - anchor:FILE:cert-ca.pem > /dev/null || exit 1 - -exit 0 diff --git a/kerberosV/src/lib/hx509/test_cert.in b/kerberosV/src/lib/hx509/test_cert.in deleted file mode 100644 index 3739e67f317..00000000000 --- a/kerberosV/src/lib/hx509/test_cert.in +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2007 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: test_cert.in,v 1.1 2013/06/17 19:11:43 robert Exp $ -# - -srcdir="@srcdir@" -objdir="@objdir@" - -hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" -if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - -echo "print DIR" -${hxtool} print --content DIR:$srcdir/data > /dev/null || exit 1 - -echo "print FILE" -for a in $srcdir/data/*.crt; do - ${hxtool} print --content FILE:"$a" > /dev/null 2>/dev/null -done - -echo "print NULL" -${hxtool} print --content NULL: > /dev/null || exit 1 - -echo "copy dance" -${hxtool} certificate-copy \ - FILE:${srcdir}/data/test.crt PEM-FILE:cert-pem.tmp || exit 1 - -${hxtool} certificate-copy PEM-FILE:cert-pem.tmp DER-FILE:cert-der.tmp || exit 1 -${hxtool} certificate-copy DER-FILE:cert-der.tmp PEM-FILE:cert-pem2.tmp || exit 1 - -cmp cert-pem.tmp cert-pem2.tmp || exit 1 - -echo "verify n0ll cert (fail)" -${hxtool} verify --missing-revoke \ - --hostname=foo.com \ - cert:FILE:$srcdir/data/n0ll.pem \ - anchor:FILE:$srcdir/data/n0ll.pem && exit 1 - -echo "verify n0ll cert (fail)" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/n0ll.pem \ - anchor:FILE:$srcdir/data/n0ll.pem && exit 1 - -echo "check that windows cert with utf16 in printable string works" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/win-u16-in-printablestring.der \ - anchor:FILE:$srcdir/data/win-u16-in-printablestring.der || exit 1 - -exit 0 diff --git a/kerberosV/src/lib/hx509/test_chain.in b/kerberosV/src/lib/hx509/test_chain.in deleted file mode 100644 index ca842649dda..00000000000 --- a/kerberosV/src/lib/hx509/test_chain.in +++ /dev/null @@ -1,256 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2004 - 2006 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: test_chain.in,v 1.1 2013/06/17 19:11:43 robert Exp $ -# - -srcdir="@srcdir@" -objdir="@objdir@" - -stat="--statistic-file=${objdir}/statfile" - -hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" -if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - -echo "cert -> root" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/test.crt \ - chain:FILE:$srcdir/data/test.crt \ - chain:FILE:$srcdir/data/ca.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "cert -> root" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/test.crt \ - chain:FILE:$srcdir/data/ca.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "cert -> root" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "sub-cert -> root" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/sub-cert.crt \ - chain:FILE:$srcdir/data/ca.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "sub-cert -> sub-ca -> root" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/sub-cert.crt \ - chain:FILE:$srcdir/data/sub-ca.crt \ - chain:FILE:$srcdir/data/ca.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "sub-cert -> sub-ca" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/sub-cert.crt \ - anchor:FILE:$srcdir/data/sub-ca.crt > /dev/null || exit 1 - -echo "sub-cert -> sub-ca -> root" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/sub-cert.crt \ - chain:FILE:$srcdir/data/sub-ca.crt \ - chain:FILE:$srcdir/data/ca.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "sub-cert -> sub-ca -> root" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/sub-cert.crt \ - chain:FILE:$srcdir/data/ca.crt \ - chain:FILE:$srcdir/data/sub-ca.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "sub-cert -> sub-ca -> root" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/sub-cert.crt \ - chain:FILE:$srcdir/data/sub-ca.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "max depth 2 (ok)" -${hxtool} verify --missing-revoke \ - --max-depth=2 \ - cert:FILE:$srcdir/data/sub-cert.crt \ - chain:FILE:$srcdir/data/sub-ca.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "max depth 1 (fail)" -${hxtool} verify --missing-revoke \ - --max-depth=1 \ - cert:FILE:$srcdir/data/sub-cert.crt \ - chain:FILE:$srcdir/data/sub-ca.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "ocsp non-ca responder" -${hxtool} verify \ - cert:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt \ - ocsp:FILE:$srcdir/data/ocsp-resp1-ocsp.der > /dev/null || exit 1 - -echo "ocsp ca responder" -${hxtool} verify \ - cert:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt \ - ocsp:FILE:$srcdir/data/ocsp-resp1-ca.der > /dev/null || exit 1 - -echo "ocsp no-ca responder, missing cert" -${hxtool} verify \ - cert:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt \ - ocsp:FILE:$srcdir/data/ocsp-resp1-ocsp-no-cert.der > /dev/null && exit 1 - -echo "ocsp no-ca responder, missing cert, in pool" -${hxtool} verify \ - cert:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt \ - ocsp:FILE:$srcdir/data/ocsp-resp1-ocsp-no-cert.der \ - chain:FILE:$srcdir/data/ocsp-responder.crt > /dev/null || exit 1 - -echo "ocsp no-ca responder, keyHash" -${hxtool} verify \ - cert:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt \ - ocsp:FILE:$srcdir/data/ocsp-resp1-keyhash.der > /dev/null || exit 1 - -echo "ocsp revoked cert" -${hxtool} verify \ - cert:FILE:$srcdir/data/revoke.crt \ - anchor:FILE:$srcdir/data/ca.crt \ - ocsp:FILE:$srcdir/data/ocsp-resp2.der > /dev/null && exit 1 - -for a in resp1-ocsp-no-cert resp1-ca resp1-keyhash resp2 ; do - echo "ocsp print reply $a" - ${hxtool} ocsp-print \ - $srcdir/data/ocsp-${a}.der > /dev/null || exit 1 -done - -echo "ocsp verify exists" -${hxtool} ocsp-verify \ - --ocsp-file=$srcdir/data/ocsp-resp1-ca.der \ - FILE:$srcdir/data/test.crt > /dev/null || exit 1 - -echo "ocsp verify not exists" -${hxtool} ocsp-verify \ - --ocsp-file=$srcdir/data/ocsp-resp1.der \ - FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "ocsp verify revoked" -${hxtool} ocsp-verify \ - --ocsp-file=$srcdir/data/ocsp-resp2.der \ - FILE:$srcdir/data/revoke.crt > /dev/null && exit 1 - -echo "crl non-revoked cert" -${hxtool} verify \ - cert:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt \ - crl:FILE:$srcdir/data/crl1.der > /dev/null || exit 1 - -echo "crl revoked cert" -${hxtool} verify \ - cert:FILE:$srcdir/data/revoke.crt \ - anchor:FILE:$srcdir/data/ca.crt \ - crl:FILE:$srcdir/data/crl1.der > /dev/null && exit 1 - -if ${hxtool} info | grep 'ecdsa: hcrypto null' > /dev/null ; then - echo "not testing ECDSA since hcrypto doesnt support ECDSA" -else - echo "eccert -> root" - ${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/secp160r2TestServer.cert.pem \ - anchor:FILE:$srcdir/data/secp160r1TestCA.cert.pem > /dev/null || exit 1 - - echo "eccert -> root" - ${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/secp160r2TestClient.cert.pem \ - anchor:FILE:$srcdir/data/secp160r1TestCA.cert.pem > /dev/null || exit 1 -fi - -echo "proxy cert" -${hxtool} verify --missing-revoke \ - --allow-proxy-certificate \ - cert:FILE:$srcdir/data/proxy-test.crt \ - chain:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "proxy cert (negative)" -${hxtool} verify --missing-revoke \ - cert:FILE:$srcdir/data/proxy-test.crt \ - chain:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "proxy cert (level fail)" -${hxtool} verify --missing-revoke \ - --allow-proxy-certificate \ - cert:FILE:$srcdir/data/proxy-level-test.crt \ - chain:FILE:$srcdir/data/proxy-test.crt \ - chain:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "not a proxy cert" -${hxtool} verify --missing-revoke \ - --allow-proxy-certificate \ - cert:FILE:$srcdir/data/no-proxy-test.crt \ - chain:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null && exit 1 - -echo "proxy cert (max level 10)" -${hxtool} verify --missing-revoke \ - --allow-proxy-certificate \ - cert:FILE:$srcdir/data/proxy10-test.crt \ - chain:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "proxy cert (second level)" -${hxtool} verify --missing-revoke \ - --allow-proxy-certificate \ - cert:FILE:$srcdir/data/proxy10-child-test.crt \ - chain:FILE:$srcdir/data/proxy10-test.crt \ - chain:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -echo "proxy cert (third level)" -${hxtool} verify --missing-revoke \ - --allow-proxy-certificate \ - cert:FILE:$srcdir/data/proxy10-child-child-test.crt \ - chain:FILE:$srcdir/data/proxy10-child-test.crt \ - chain:FILE:$srcdir/data/proxy10-test.crt \ - chain:FILE:$srcdir/data/test.crt \ - anchor:FILE:$srcdir/data/ca.crt > /dev/null || exit 1 - -exit 0 diff --git a/kerberosV/src/lib/hx509/test_cms.in b/kerberosV/src/lib/hx509/test_cms.in deleted file mode 100644 index ab5222c9beb..00000000000 --- a/kerberosV/src/lib/hx509/test_cms.in +++ /dev/null @@ -1,514 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2005 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: test_cms.in,v 1.1 2013/06/17 19:11:43 robert Exp $ -# - -srcdir="@srcdir@" -objdir="@objdir@" - -stat="--statistic-file=${objdir}/statfile" - -hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" - -if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - -if ${hxtool} info | grep 'ecdsa: hcrypto null' > /dev/null ; then - echo "not testing ECDSA since hcrypto doesnt support ECDSA" -else - echo "create signed data (ec)" - ${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/secp160r2TestClient.pem \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - - echo "verify signed data (ec)" - ${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/secp160r1TestCA.cert.pem \ - sd.data sd.data.out > /dev/null || exit 1 - cmp "$srcdir/test_chain.in" sd.data.out || exit 1 -fi - -echo "create signed data" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (no signer)" -${hxtool} cms-create-sd \ - --no-signer \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data (no signer)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --no-signer-allowed \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > signer.tmp || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 -grep "unsigned" signer.tmp > /dev/null || exit 1 - -echo "verify signed data (no signer) (test failure)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out 2> signer.tmp && exit 1 -grep "No signers where found" signer.tmp > /dev/null || exit 1 - -echo "create signed data (id-by-name)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --id-by-name \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "verify signed data (EE cert as anchor)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/test.crt \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (password)" -${hxtool} cms-create-sd \ - --pass=PASS:foobar \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test-pw.key \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (combined)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test.combined.crt \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (content info)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --content-info \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data (content info)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - --content-info \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (content type)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --content-type=1.1.1.1 \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data (content type)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (pem)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --pem \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data (pem)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - --pem \ - sd.data sd.data.out > /dev/null -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (pem, detached)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --detached-signature \ - --pem \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data (pem, detached)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - --pem \ - --signed-content="$srcdir/test_chain.in" \ - sd.data sd.data.out > /dev/null -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (p12)" -${hxtool} cms-create-sd \ - --pass=PASS:foobar \ - --certificate=PKCS12:$srcdir/data/test.p12 \ - --signer=friendlyname-test \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - --content-info \ - "$srcdir/data/test-signed-data" sd.data.out > /dev/null || exit 1 -cmp "$srcdir/data/static-file" sd.data.out || exit 1 - -echo "verify signed data (no attr)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - --content-info \ - "$srcdir/data/test-signed-data-noattr" sd.data.out > /dev/null || exit 1 -cmp "$srcdir/data/static-file" sd.data.out || exit 1 - -echo "verify failure signed data (no attr, no certs)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - --content-info \ - "$srcdir/data/test-signed-data-noattr-nocerts" \ - sd.data.out > /dev/null 2>/dev/null && exit 1 - -echo "verify signed data (no attr, no certs)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - --certificate=FILE:$srcdir/data/test.crt \ - --content-info \ - "$srcdir/data/test-signed-data-noattr-nocerts" \ - sd.data.out > /dev/null || exit 1 -cmp "$srcdir/data/static-file" sd.data.out || exit 1 - -echo "verify signed data - sha1" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - --content-info \ - "$srcdir/data/test-signed-sha-1" sd.data.out > /dev/null || exit 1 -cmp "$srcdir/data/static-file" sd.data.out || exit 1 - -echo "verify signed data - sha256" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - --content-info \ - "$srcdir/data/test-signed-sha-256" sd.data.out > /dev/null || exit 1 -cmp "$srcdir/data/static-file" sd.data.out || exit 1 - -#echo "verify signed data - sha512" -#${hxtool} cms-verify-sd \ -# --missing-revoke \ -# --anchors=FILE:$srcdir/data/ca.crt \ -# --content-info \ -# "$srcdir/data/test-signed-sha-512" sd.data.out > /dev/null || exit 1 -#cmp "$srcdir/data/static-file" sd.data.out || exit 1 - - -echo "create signed data (subcert, no certs)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/sub-cert.crt,$srcdir/data/sub-cert.key \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify failure signed data" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null 2> /dev/null && exit 1 - -echo "verify success signed data" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --certificate=FILE:$srcdir/data/sub-ca.crt \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (subcert, certs)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/sub-cert.crt,$srcdir/data/sub-cert.key \ - --pool=FILE:$srcdir/data/sub-ca.crt \ - --anchors=FILE:$srcdir/data/ca.crt \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify success signed data" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (subcert, certs, no-root)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/sub-cert.crt,$srcdir/data/sub-cert.key \ - --pool=FILE:$srcdir/data/sub-ca.crt \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify success signed data" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (subcert, no-subca, no-root)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/sub-cert.crt,$srcdir/data/sub-cert.key \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify failure signed data" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null 2>/dev/null && exit 1 - -echo "create signed data (sd cert)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test-ds-only.crt,$srcdir/data/test-ds-only.key \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "create signed data (ke cert)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test-ke-only.crt,$srcdir/data/test-ke-only.key \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null 2>/dev/null && exit 1 - -echo "create signed data (sd + ke certs)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test-ke-only.crt,$srcdir/data/test-ke-only.key \ - --certificate=FILE:$srcdir/data/test-ds-only.crt,$srcdir/data/test-ds-only.key \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "create signed data (ke + sd certs)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test-ds-only.crt,$srcdir/data/test-ds-only.key \ - --certificate=FILE:$srcdir/data/test-ke-only.crt,$srcdir/data/test-ke-only.key \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "create signed data (detached)" -${hxtool} cms-create-sd \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --detached-signature \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data (detached)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --signed-content="$srcdir/test_chain.in" \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "verify failure signed data (detached)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null 2>/dev/null && exit 1 - -echo "create signed data (rsa)" -${hxtool} cms-create-sd \ - --peer-alg=1.2.840.113549.1.1.1 \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - "$srcdir/test_chain.in" \ - sd.data > /dev/null || exit 1 - -echo "verify signed data (rsa)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - sd.data sd.data.out > /dev/null 2>/dev/null || exit 1 -cmp "$srcdir/test_chain.in" sd.data.out || exit 1 - -echo "create signed data (pem, detached)" -cp "$srcdir/test_chain.in" sd -${hxtool} cms-sign \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --detached-signature \ - --pem \ - sd > /dev/null || exit 1 - -echo "verify signed data (pem, detached)" -${hxtool} cms-verify-sd \ - --missing-revoke \ - --anchors=FILE:$srcdir/data/ca.crt \ - --pem \ - sd.pem > /dev/null - -echo "create signed data (no certs, detached sig)" -cp "$srcdir/test_chain.in" sd -${hxtool} cms-sign \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --detached-signature \ - --no-embedded-certs \ - "$srcdir/data/static-file" \ - sd > /dev/null || exit 1 - -echo "create signed data (leif only, detached sig)" -cp "$srcdir/test_chain.in" sd -${hxtool} cms-sign \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --detached-signature \ - --embed-leaf-only \ - "$srcdir/data/static-file" \ - sd > /dev/null || exit 1 - -echo "create signed data (no certs, detached sig, 2 signers)" -cp "$srcdir/test_chain.in" sd -${hxtool} cms-sign \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --certificate=FILE:$srcdir/data/sub-cert.crt,$srcdir/data/sub-cert.key \ - --detached-signature \ - --no-embedded-certs \ - "$srcdir/data/static-file" \ - sd > /dev/null || exit 1 - -echo "create signed data (no certs, detached sig, 3 signers)" -cp "$srcdir/test_chain.in" sd -${hxtool} cms-sign \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --certificate=FILE:$srcdir/data/sub-cert.crt,$srcdir/data/sub-cert.key \ - --certificate=FILE:$srcdir/data/test-ds-only.crt,$srcdir/data/test-ds-only.key \ - --detached-signature \ - --no-embedded-certs \ - "$srcdir/data/static-file" \ - sd > /dev/null || exit 1 - -echo "envelope data (content-type)" -${hxtool} cms-envelope \ - --certificate=FILE:$srcdir/data/test.crt \ - --content-type=1.1.1.1 \ - "$srcdir/data/static-file" \ - ev.data > /dev/null || exit 1 - -echo "unenvelope data (content-type)" -${hxtool} cms-unenvelope \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - ev.data ev.data.out \ - FILE:$srcdir/data/test.crt,$srcdir/data/test.key > /dev/null || exit 1 -cmp "$srcdir/data/static-file" ev.data.out || exit 1 - -echo "envelope data (content-info)" -${hxtool} cms-envelope \ - --certificate=FILE:$srcdir/data/test.crt \ - --content-info \ - "$srcdir/data/static-file" \ - ev.data > /dev/null || exit 1 - -echo "unenvelope data (content-info)" -${hxtool} cms-unenvelope \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --content-info \ - ev.data ev.data.out \ - FILE:$srcdir/data/test.crt,$srcdir/data/test.key > /dev/null || exit 1 -cmp "$srcdir/data/static-file" ev.data.out || exit 1 - -for a in des-ede3 aes-128 aes-256; do - - rm -f ev.data ev.data.out - echo "envelope data ($a)" - ${hxtool} cms-envelope \ - --encryption-type="$a-cbc" \ - --certificate=FILE:$srcdir/data/test.crt \ - "$srcdir/data/static-file" \ - ev.data || exit 1 - - echo "unenvelope data ($a)" - ${hxtool} cms-unenvelope \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - ev.data ev.data.out > /dev/null || exit 1 - cmp "$srcdir/data/static-file" ev.data.out || exit 1 -done - -for a in rc2-40 rc2-64 rc2-128 des-ede3 aes-128 aes-256; do - echo "static unenvelope data ($a)" - - rm -f ev.data.out - ${hxtool} cms-unenvelope \ - --certificate=FILE:$srcdir/data/test.crt,$srcdir/data/test.key \ - --content-info \ - --allow-weak \ - "$srcdir/data/test-enveloped-$a" ev.data.out > /dev/null || exit 1 - cmp "$srcdir/data/static-file" ev.data.out || exit 1 -done - -exit 0 diff --git a/kerberosV/src/lib/hx509/test_crypto.in b/kerberosV/src/lib/hx509/test_crypto.in deleted file mode 100644 index 6975a0d8d88..00000000000 --- a/kerberosV/src/lib/hx509/test_crypto.in +++ /dev/null @@ -1,192 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2006 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: test_crypto.in,v 1.1 2013/06/17 19:11:43 robert Exp $ -# - -srcdir="@srcdir@" -objdir="@objdir@" - -stat="--statistic-file=${objdir}/statfile" - -hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" - -if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - - -echo "Bleichenbacher good cert (from eay)" -${hxtool} verify --missing-revoke \ - --time=2006-09-25 \ - cert:FILE:$srcdir/data/bleichenbacher-good.pem \ - anchor:FILE:$srcdir/data/bleichenbacher-good.pem > /dev/null || exit 1 - -echo "Bleichenbacher bad cert (from eay)" -${hxtool} verify --missing-revoke \ - --time=2006-09-25 \ - cert:FILE:$srcdir/data/bleichenbacher-bad.pem \ - anchor:FILE:$srcdir/data/bleichenbacher-bad.pem > /dev/null && exit 1 - -echo "Bleichenbacher good cert (from yutaka)" -${hxtool} verify --missing-revoke \ - --time=2006-09-25 \ - cert:FILE:$srcdir/data/yutaka-pad-ok-cert.pem \ - anchor:FILE:$srcdir/data/yutaka-pad-ok-ca.pem > /dev/null || exit 1 - -echo "Bleichenbacher bad cert (from yutaka)" -${hxtool} verify --missing-revoke \ - --time=2006-09-25 \ - cert:FILE:$srcdir/data/yutaka-pad-broken-cert.pem \ - anchor:FILE:$srcdir/data/yutaka-pad-broken-ca.pem > /dev/null && exit 1 - -# Ralf-Philipp Weinmann -# Andrew Pyshkin -echo "Bleichenbacher bad cert (sf pad correct)" -${hxtool} verify --missing-revoke \ - --time=2006-09-25 \ - cert:FILE:$srcdir/data/bleichenbacher-sf-pad-correct.pem \ - anchor:FILE:$srcdir/data/sf-class2-root.pem > /dev/null && exit 1 - -echo Read 50 kilobyte random data -${hxtool} random-data 50kilobyte > random-data || exit 1 - -echo "crypto select1" -${hxtool} crypto-select > test || { echo "select1"; exit 1; } -cmp test ${srcdir}/tst-crypto-select1 > /dev/null || \ - { echo "select1 failure"; exit 1; } - -echo "crypto select1" -${hxtool} crypto-select --type=digest > test || { echo "select1"; exit 1; } -cmp test ${srcdir}/tst-crypto-select1 > /dev/null || \ - { echo "select1 failure"; exit 1; } - -echo "crypto select2" -${hxtool} crypto-select --type=public-sig > test || { echo "select2"; exit 1; } -cmp test ${srcdir}/tst-crypto-select2 > /dev/null || \ - { echo "select2 failure"; exit 1; } - -echo "crypto select3" -${hxtool} crypto-select \ - --type=public-sig \ - --peer-cmstype=1.2.840.113549.1.1.4 \ - > test || { echo "select3"; exit 1; } -cmp test ${srcdir}/tst-crypto-select3 > /dev/null || \ - { echo "select3 failure"; exit 1; } - -echo "crypto select4" -${hxtool} crypto-select \ - --type=public-sig \ - --peer-cmstype=1.2.840.113549.1.1.5 \ - --peer-cmstype=1.2.840.113549.1.1.4 \ - > test || { echo "select4"; exit 1; } -cmp test ${srcdir}/tst-crypto-select4 > /dev/null || \ - { echo "select4 failure"; exit 1; } - -echo "crypto select5" -${hxtool} crypto-select \ - --type=public-sig \ - --peer-cmstype=1.2.840.113549.1.1.11 \ - --peer-cmstype=1.2.840.113549.1.1.5 \ - > test || { echo "select5"; exit 1; } -cmp test ${srcdir}/tst-crypto-select5 > /dev/null || \ - { echo "select5 failure"; exit 1; } - -echo "crypto select6" -${hxtool} crypto-select \ - --type=public-sig \ - --peer-cmstype=1.2.840.113549.2.5 \ - --peer-cmstype=1.2.840.113549.1.1.5 \ - > test || { echo "select6"; exit 1; } -cmp test ${srcdir}/tst-crypto-select6 > /dev/null || \ - { echo "select6 failure"; exit 1; } - -echo "crypto select7" -${hxtool} crypto-select \ - --type=secret \ - --peer-cmstype=2.16.840.1.101.3.4.1.42 \ - --peer-cmstype=1.2.840.113549.3.7 \ - --peer-cmstype=1.2.840.113549.1.1.5 \ - > test || { echo "select7"; exit 1; } -cmp test ${srcdir}/tst-crypto-select7 > /dev/null || \ - { echo "select7 failure"; exit 1; } - -#echo "crypto available1" -#${hxtool} crypto-available \ -# --type=all \ -# > test || { echo "available1"; exit 1; } -#cmp test ${srcdir}/tst-crypto-available1 > /dev/null || \ -# { echo "available1 failure"; exit 1; } - -echo "crypto available2" -${hxtool} crypto-available \ - --type=digest \ - > test || { echo "available2"; exit 1; } -cmp test ${srcdir}/tst-crypto-available2 > /dev/null || \ - { echo "available2 failure"; exit 1; } - -#echo "crypto available3" -#${hxtool} crypto-available \ -# --type=public-sig \ -# > test || { echo "available3"; exit 1; } -#cmp test ${srcdir}/tst-crypto-available3 > /dev/null || \ -# { echo "available3 failure"; exit 1; } - -echo "copy keystore FILE existing -> FILE" -${hxtool} certificate-copy \ - FILE:${srcdir}/data/test.crt,${srcdir}/data/test.key \ - FILE:out.pem || exit 1 - -echo "copy keystore FILE -> FILE" -${hxtool} certificate-copy \ - FILE:out.pem \ - FILE:out2.pem || exit 1 - -echo "copy keystore FILE -> PKCS12" -${hxtool} certificate-copy \ - FILE:out.pem \ - PKCS12:out2.pem || exit 1 - -echo "print certificate with utf8" -${hxtool} print \ - FILE:$srcdir/data/j.pem >/dev/null 2>/dev/null || exit 1 - -echo "Make sure that we can parse EC private keys" -${hxtool} print --content \ - FILE:$srcdir/data/pkinit-ec.crt,$srcdir/data/pkinit-ec.key \ - > /dev/null || exit 1 - -exit 0 diff --git a/kerberosV/src/lib/hx509/test_expr.c b/kerberosV/src/lib/hx509/test_expr.c deleted file mode 100644 index 8c2c0a55517..00000000000 --- a/kerberosV/src/lib/hx509/test_expr.c +++ /dev/null @@ -1,87 +0,0 @@ - -#include "hx_locl.h" -#include - -struct foo { - int val; - char *str; -} foo[] = { - { 0, "FALSE" }, - { 1, "TRUE" }, - { 0, "!TRUE" }, - { 0, "! TRUE" }, - { 0, "!\tTRUE" }, - { 0, "( FALSE AND FALSE )" }, - { 0, "( TRUE AND FALSE )" }, - { 1, "( TRUE AND TRUE )" }, - { 1, "( TRUE OR TRUE )" }, - { 1, "( TRUE OR FALSE )" }, - { 0, "( FALSE OR FALSE )" }, - { 1, "! ( FALSE OR FALSE )" }, - - { 1, "\"foo\" TAILMATCH \"foo\"" }, - { 1, "\"foobar\" TAILMATCH \"bar\"" }, - { 0, "\"foobar\" TAILMATCH \"foo\"" }, - - { 1, "\"foo\" == \"foo\"" }, - { 0, "\"foo\" == \"bar\"" }, - { 0, "\"foo\" != \"foo\"" }, - { 1, "\"foo\" != \"bar\"" }, - { 1, "%{variable} == \"foo\"" }, - { 0, "%{variable} == \"bar\"" }, - { 1, "%{context.variable} == \"foo\"" }, - { 0, "%{context.variable} == \"bar\"" }, - { 1, "\"foo\" IN ( \"bar\", \"foo\")" }, - { 0, "\"foo\" IN ( \"bar\", \"baz\")" }, - { 0, "\"bar\" IN %{context}" }, - { 1, "\"foo\" IN %{context}" }, - { 1, "\"variable\" IN %{context}" }, - - { 1, "\"foo\" IN %{context} AND %{context.variable} == \"foo\"" } -}; - -int -main(int argc, char **argv) -{ - struct hx_expr *expr; - hx509_context context; - hx509_env env = NULL, env2 = NULL; - int val, i, ret; - -#if 0 - extern int yydebug; - yydebug = 1; -#endif - - ret = hx509_context_init(&context); - if (ret) - errx(1, "hx509_context_init failed with %d", ret); - - hx509_env_add(context, &env, "variable", "foo"); - hx509_env_add(context, &env2, "variable", "foo"); - hx509_env_add_binding(context, &env, "context", env2); - - for (i = 0; i < sizeof(foo)/sizeof(foo[0]); i++) { - - expr = _hx509_expr_parse(foo[i].str); - if (expr == NULL) - errx(1, "_hx509_expr_parse failed for %d: %s", i, foo[i].str); - - val = _hx509_expr_eval(context, env, expr); - if (foo[i].val) { - if (val == 0) - errx(1, "_hx509_expr_eval not true when it should: %d: %s", - i, foo[i].str); - } else { - if (val) - errx(1, "_hx509_expr_eval true when it should not: %d: %s", - i, foo[i].str); - } - - _hx509_expr_free(expr); - } - - hx509_env_free(&env); - - return 0; -} diff --git a/kerberosV/src/lib/hx509/test_java_pkcs11.in b/kerberosV/src/lib/hx509/test_java_pkcs11.in deleted file mode 100644 index 9a843a4888d..00000000000 --- a/kerberosV/src/lib/hx509/test_java_pkcs11.in +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2008 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. -# - -exit 0 - -srcdir="@srcdir@" -objdir="@objdir@" - -dir=$objdir -file= - -for a in libhx509.so .libs/libhx509.so libhx509.dylib .libs/libhx509.dylib ; do - if [ -f $dir/$a ] ; then - file=$dir/$a - break - fi -done - -if [ "X$file" = X ] ; then - exit 0 -fi - -cat > pkcs11.cfg < test-rc-file.rc < /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - -echo "nist tests" - -if [ ! -d "$nistdir" ] ; then - ( mkdir "$nistdir" && unzip -d "${nistdir}" "${nistzip}" ) >/dev/null || \ - { rm -rf "$nistdir" ; exit 1; } -fi - -while read id verify cert arg1 arg2 arg3 arg4 arg5 ; do - expr "$id" : "#" > /dev/null && continue - - test "$id" = "end" && break - - args="" - case "$arg1" in - *.crt) args="$args chain:FILE:$nistdir/certs/$arg1" ;; - *.crl) args="$args crl:FILE:$nistdir/crls/$arg1" ;; - *) args="$args $arg1" ;; - esac - case "$arg2" in - *.crt) args="$args chain:FILE:$nistdir/certs/$arg2" ;; - *.crl) args="$args crl:FILE:$nistdir/crls/$arg2" ;; - *) args="$args $arg2" ;; - esac - case "$arg3" in - *.crt) args="$args chain:FILE:$nistdir/certs/$arg3" ;; - *.crl) args="$args crl:FILE:$nistdir/crls/$arg3" ;; - *) args="$args $arg3" ;; - esac - case "$arg4" in - *.crt) args="$args chain:FILE:$nistdir/certs/$arg4" ;; - *.crl) args="$args crl:FILE:$nistdir/crls/$arg4" ;; - *) args="$args $arg4" ;; - esac - case "$arg5" in - *.crt) args="$args chain:FILE:$nistdir/certs/$arg5" ;; - *.crl) args="$args crl:FILE:$nistdir/crls/$arg5" ;; - *) args="$args $arg5" ;; - esac - - args="$args anchor:FILE:$nistdir/certs/TrustAnchorRootCertificate.crt" - args="$args crl:FILE:$nistdir/crls/TrustAnchorRootCRL.crl" - args="$args cert:FILE:$nistdir/certs/$cert" - - if ${hxtool} verify --time=2008-05-20 $args > /dev/null; then - if test "$verify" = "f"; then - echo "verify passed on fail: $id $cert" - exit 1 - fi - else - if test "$verify" = "p"; then - echo "verify failed on pass: $id $cert" - exit 1 - fi - fi - -done < $srcdir/data/nist-data - - -echo "done!" - -exit 0 diff --git a/kerberosV/src/lib/hx509/test_nist2.in b/kerberosV/src/lib/hx509/test_nist2.in deleted file mode 100644 index b219bceeaf6..00000000000 --- a/kerberosV/src/lib/hx509/test_nist2.in +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2004 - 2008 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: test_nist2.in,v 1.1 2013/06/17 19:11:43 robert Exp $ -# - -srcdir="@srcdir@" -objdir="@objdir@" -nistdir=${objdir}/PKITS_data -nistzip=${srcdir}/data/PKITS_data.zip -egrep="@egrep@" - -limit="${1:-nolimit}" - -stat="--statistic-file=${objdir}/statfile" - -hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" - -# nistzip is not distributed part of the distribution -test -f "$nistzip" || exit 77 - -if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - -#--------- Try to find unzip - -oldifs=$IFS -IFS=: -set -- $PATH -IFS=$oldifs -found= - -for p in "$@" ; do - test -x "$p/unzip" && { found=1 ; break; } -done -test "X$found" = "X" && exit 77 - -#--------- - - -echo "nist tests, version 2" - -if [ ! -d "$nistdir" ] ; then - ( mkdir "$nistdir" && unzip -d "${nistdir}" "${nistzip}" ) >/dev/null || \ - { rm -rf "$nistdir" ; exit 1; } -fi - -ec= -name= -description= -while read result cert other ; do - if expr "$result" : "#" > /dev/null; then - name=${cert} - description="${other}" - continue - fi - - test nolimit != "${limit}" && ! expr "$name" : "$limit" > /dev/null && continue - - test "$result" = "end" && break - - args= - args="$args cert:FILE:$nistdir/certs/$cert" - args="$args chain:DIR:$nistdir/certs" - args="$args anchor:FILE:$nistdir/certs/TrustAnchorRootCertificate.crt" - - for a in $nistdir/crls/*.crl; do - args="$args crl:FILE:$a" - done - - cmd="${hxtool} verify --time=2008-05-20 $args" - eval ${cmd} > /dev/null - res=$? - - case "${result},${res}" in - 0,0) r="PASSs";; - 0,*) r="FAILs";; - [123],0) r="FAILf";; - [123],*) r="PASSf";; - *) echo="unknown result ${result},${res}" ; exit 1 ;; - esac - if ${egrep} "^${name} FAIL" $srcdir/data/nist-result2 > /dev/null; then - if expr "$r" : "PASS" >/dev/null; then - echo "${name} passed when expected not to" - echo "# ${description}" > nist2-passed-${name}.tmp - ec=1 - fi - elif ${egrep} "^${name} EITHER" $srcdir/data/nist-result2 > /dev/null; then - : - elif expr "$r" : "FAIL.*" >/dev/null ; then - echo "$r ${name} ${description}" - echo "# ${description}" > nist2-failed-${name}.tmp - echo "$cmd" >> nist2-failed-${name}.tmp - ec=1 - fi - -done < $srcdir/data/nist-data2 - - -echo "done!" - -exit $ec diff --git a/kerberosV/src/lib/hx509/test_nist_cert.in b/kerberosV/src/lib/hx509/test_nist_cert.in deleted file mode 100644 index 64687e652ed..00000000000 --- a/kerberosV/src/lib/hx509/test_nist_cert.in +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2006 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: test_nist_cert.in,v 1.1 2013/06/17 19:11:43 robert Exp $ -# - -srcdir="@srcdir@" -objdir="@objdir@" -nistdir=${objdir}/PKITS_data -nistzip=${srcdir}/data/PKITS_data.zip - -# nistzip is not distributed part of the distribution -test -f "$nistzip" || exit 77 - -stat="--statistic-file=${objdir}/statfile" - -hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" - -if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - -if [ ! -d "$nistdir" ] ; then - ( mkdir "$nistdir" && cd "$nistdir" && unzip "$nistzip" ) >/dev/null || \ - { rm -rf "$nistdir" ; exit 1; } -fi - -if ${hxtool} validate DIR:$nistdir/certs > /dev/null; then - : -else - echo "validate failed" - exit 1 -fi - -exit 0 diff --git a/kerberosV/src/lib/hx509/test_nist_pkcs12.in b/kerberosV/src/lib/hx509/test_nist_pkcs12.in deleted file mode 100644 index 786ecb9563b..00000000000 --- a/kerberosV/src/lib/hx509/test_nist_pkcs12.in +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2004 - 2005 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: test_nist_pkcs12.in,v 1.1 2013/06/17 19:11:43 robert Exp $ -# - -srcdir="@srcdir@" -objdir="@objdir@" -pass="--pass=PASS:password" -nistdir=${objdir}/PKITS_data -nistzip=${srcdir}/data/PKITS_data.zip - -# nistzip is not distributed part of the distribution -test -f "$nistzip" || exit 77 - -stat="--statistic-file=${objdir}/statfile" - -hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" - -if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - -if [ ! -d "$nistdir" ] ; then - ( mkdir "$nistdir" && cd "$nistdir" && unzip "$nistzip" ) >/dev/null || \ - { rm -rf "$nistdir" ; exit 1; } -fi - -echo "nist pkcs12 tests" - -for a in $nistdir/pkcs12/*.p12 ; do - - if ${hxtool} validate $pass PKCS12:$a > /dev/null; then - : - else - echo "$a failed" - exit 1 - fi - -done - -echo "done!" - -exit 0 \ No newline at end of file diff --git a/kerberosV/src/lib/hx509/test_pkcs11.in b/kerberosV/src/lib/hx509/test_pkcs11.in deleted file mode 100644 index 278296ae66d..00000000000 --- a/kerberosV/src/lib/hx509/test_pkcs11.in +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2008 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. -# - -srcdir="@srcdir@" -objdir="@objdir@" - -SOFTPKCS11RC="test-rc-file.rc" \ -export SOFTPKCS11RC - -echo "password less" - -cat > test-rc-file.rc < test-rc-file.rc </dev/null 2>/dev/null || exit 1 - -echo "try printing" -${hxtool} print \ - --pass=PASS:foobar \ - --info --content \ - FILE:$srcdir/data/kdc.crt >/dev/null 2>/dev/null || exit 1 - -${hxtool} print \ - --pass=PASS:foobar \ - --info \ - PKCS12:$srcdir/data/test.p12 >/dev/null 2>/dev/null || exit 1 - -echo "make sure entry is found (friendlyname)" -${hxtool} query \ - --pass=PASS:foobar \ - --friendlyname=friendlyname-test \ - PKCS12:$srcdir/data/test.p12 >/dev/null 2>/dev/null || exit 1 - -echo "make sure entry is not found (friendlyname)" -${hxtool} query \ - --pass=PASS:foobar \ - --friendlyname=friendlyname-test-not \ - PKCS12:$srcdir/data/test.p12 >/dev/null 2>/dev/null && exit 1 - -echo "make sure entry is found (eku)" -${hxtool} query \ - --eku=1.3.6.1.5.2.3.5 \ - FILE:$srcdir/data/kdc.crt >/dev/null 2>/dev/null || exit 1 - -echo "make sure entry is not found (eku)" -${hxtool} query \ - --eku=1.3.6.1.5.2.3.6 \ - FILE:$srcdir/data/kdc.crt >/dev/null 2>/dev/null && exit 1 - -echo "make sure entry is found (friendlyname, no-pw)" -${hxtool} query \ - --friendlyname=friendlyname-cert \ - PKCS12:$srcdir/data/test-nopw.p12 >/dev/null 2>/dev/null || exit 1 - -echo "check for ca cert (friendlyname)" -${hxtool} query \ - --pass=PASS:foobar \ - --friendlyname=ca \ - PKCS12:$srcdir/data/test.p12 >/dev/null 2>/dev/null || exit 1 - -echo "make sure entry is not found (friendlyname)" -${hxtool} query \ - --pass=PASS:foobar \ - --friendlyname=friendlyname-test \ - PKCS12:$srcdir/data/sub-cert.p12 >/dev/null 2>/dev/null && exit 1 - -echo "make sure entry is found (friendlyname|private key)" -${hxtool} query \ - --pass=PASS:foobar \ - --friendlyname=friendlyname-test \ - --private-key \ - PKCS12:$srcdir/data/test.p12 > /dev/null || exit 1 - -echo "make sure entry is not found (friendlyname|private key)" -${hxtool} query \ - --pass=PASS:foobar \ - --friendlyname=ca \ - --private-key \ - PKCS12:$srcdir/data/test.p12 >/dev/null 2>/dev/null && exit 1 - -echo "make sure entry is found (cert ds)" -${hxtool} query \ - --digitalSignature \ - FILE:$srcdir/data/test.crt >/dev/null 2>/dev/null || exit 1 - -echo "make sure entry is found (cert ke)" -${hxtool} query \ - --keyEncipherment \ - FILE:$srcdir/data/test.crt >/dev/null 2>/dev/null || exit 1 - -echo "make sure entry is found (cert ke + ds)" -${hxtool} query \ - --digitalSignature \ - --keyEncipherment \ - FILE:$srcdir/data/test.crt >/dev/null 2>/dev/null || exit 1 - -echo "make sure entry is found (cert-ds ds)" -${hxtool} query \ - --digitalSignature \ - FILE:$srcdir/data/test-ds-only.crt >/dev/null 2>/dev/null || exit 1 - -echo "make sure entry is not found (cert-ds ke)" -${hxtool} query \ - --keyEncipherment \ - FILE:$srcdir/data/test-ds-only.crt >/dev/null 2>/dev/null && exit 1 - -echo "make sure entry is not found (cert-ds ke + ds)" -${hxtool} query \ - --digitalSignature \ - --keyEncipherment \ - FILE:$srcdir/data/test-ds-only.crt >/dev/null 2>/dev/null && exit 1 - -echo "make sure entry is not found (cert-ke ds)" -${hxtool} query \ - --digitalSignature \ - FILE:$srcdir/data/test-ke-only.crt >/dev/null 2>/dev/null && exit 1 - -echo "make sure entry is found (cert-ke ke)" -${hxtool} query \ - --keyEncipherment \ - FILE:$srcdir/data/test-ke-only.crt >/dev/null 2>/dev/null || exit 1 - -echo "make sure entry is not found (cert-ke ke + ds)" -${hxtool} query \ - --digitalSignature \ - --keyEncipherment \ - FILE:$srcdir/data/test-ke-only.crt >/dev/null 2>/dev/null && exit 1 - -echo "make sure entry is found (eku) in query language" -${hxtool} query \ - --expr='"1.3.6.1.5.2.3.5" IN %{certificate.eku}' \ - FILE:$srcdir/data/kdc.crt > /dev/null || exit 1 - -echo "make sure entry is not found (eku) in query language" -${hxtool} query \ - --expr='"1.3.6.1.5.2.3.6" IN %{certificate.eku}' \ - FILE:$srcdir/data/kdc.crt > /dev/null && exit 1 - -echo "make sure entry is found (subject) in query language" -${hxtool} query \ - --expr='%{certificate.subject} == "CN=kdc,C=SE"' \ - FILE:$srcdir/data/kdc.crt > /dev/null || exit 1 - -echo "make sure entry is found using TAILMATCH (subject) in query language" -${hxtool} query \ - --expr='%{certificate.subject} TAILMATCH "C=SE"' \ - FILE:$srcdir/data/kdc.crt > /dev/null || exit 1 - -echo "make sure entry is not found using TAILMATCH (subject) in query language" -${hxtool} query \ - --expr='%{certificate.subject} TAILMATCH "C=FI"' \ - FILE:$srcdir/data/kdc.crt > /dev/null && exit 1 - -echo "make sure entry is found (issuer) in query language" -${hxtool} query \ - --expr='%{certificate.issuer} == "C=SE,CN=hx509 Test Root CA"' \ - FILE:$srcdir/data/kdc.crt > /dev/null || exit 1 - -echo "make sure entry match with EKU and TAILMATCH in query language" -${hxtool} query \ - --expr='"1.3.6.1.5.2.3.5" IN %{certificate.eku} AND %{certificate.subject} TAILMATCH "C=SE"' \ - FILE:$srcdir/data/kdc.crt > /dev/null || exit 1 - -echo "make sure entry match with hash.sha1" -${hxtool} query \ - --expr='"%{certificate.hash.sha1}EQ "412120212A2CBFD777DE5499ECB4724345F33F16"' \ - FILE:$srcdir/data/kdc.crt > /dev/null || exit 1 - - -exit 0 diff --git a/kerberosV/src/lib/hx509/test_req.in b/kerberosV/src/lib/hx509/test_req.in deleted file mode 100644 index b4871f640d7..00000000000 --- a/kerberosV/src/lib/hx509/test_req.in +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2005 - 2007 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: test_req.in,v 1.1 2013/06/17 19:11:43 robert Exp $ -# - -srcdir="@srcdir@" -objdir="@objdir@" - -stat="--statistic-file=${objdir}/statfile" - -hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" - -if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - -${hxtool} request-create \ - --subject="CN=Love,DC=it,DC=su,DC=se" \ - --key=FILE:$srcdir/data/key.der \ - request.out || exit 1 - -${hxtool} request-print \ - PKCS10:request.out > /dev/null || exit 1 - -${hxtool} request-create \ - --subject="CN=Love,DC=it,DC=su,DC=se" \ - --dnsname=nutcracker.it.su.se \ - --key=FILE:$srcdir/data/key.der \ - request.out || exit 1 diff --git a/kerberosV/src/lib/hx509/test_soft_pkcs11.c b/kerberosV/src/lib/hx509/test_soft_pkcs11.c deleted file mode 100644 index c8fc2448ee7..00000000000 --- a/kerberosV/src/lib/hx509/test_soft_pkcs11.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (c) 2006 - 2008 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 "hx_locl.h" -#include "pkcs11.h" -#include - -static CK_FUNCTION_LIST_PTR func; - - -static CK_RV -find_object(CK_SESSION_HANDLE session, - char *id, - CK_OBJECT_CLASS key_class, - CK_OBJECT_HANDLE_PTR object) -{ - CK_ULONG object_count; - CK_RV ret; - CK_ATTRIBUTE search_data[] = { - {CKA_ID, id, 0 }, - {CKA_CLASS, &key_class, sizeof(key_class)} - }; - CK_ULONG num_search_data = sizeof(search_data)/sizeof(search_data[0]); - - search_data[0].ulValueLen = strlen(id); - - ret = (*func->C_FindObjectsInit)(session, search_data, num_search_data); - if (ret != CKR_OK) - return ret; - - ret = (*func->C_FindObjects)(session, object, 1, &object_count); - if (ret != CKR_OK) - return ret; - if (object_count == 0) { - printf("found no object\n"); - return 1; - } - - ret = (*func->C_FindObjectsFinal)(session); - if (ret != CKR_OK) - return ret; - - return CKR_OK; -} - -static char *sighash = "hej"; -static char signature[1024]; - - -int -main(int argc, char **argv) -{ - CK_SLOT_ID_PTR slot_ids; - CK_SLOT_ID slot; - CK_ULONG num_slots; - CK_RV ret; - CK_SLOT_INFO slot_info; - CK_TOKEN_INFO token_info; - CK_SESSION_HANDLE session; - CK_OBJECT_HANDLE public, private; - - ret = C_GetFunctionList(&func); - if (ret != CKR_OK) - errx(1, "C_GetFunctionList failed: %d", (int)ret); - - (*func->C_Initialize)(NULL_PTR); - - ret = (*func->C_GetSlotList)(FALSE, NULL, &num_slots); - if (ret != CKR_OK) - errx(1, "C_GetSlotList1 failed: %d", (int)ret); - - if (num_slots == 0) - errx(1, "no slots"); - - if ((slot_ids = calloc(1, num_slots * sizeof(*slot_ids))) == NULL) - err(1, "alloc slots failed"); - - ret = (*func->C_GetSlotList)(FALSE, slot_ids, &num_slots); - if (ret != CKR_OK) - errx(1, "C_GetSlotList2 failed: %d", (int)ret); - - slot = slot_ids[0]; - free(slot_ids); - - ret = (*func->C_GetSlotInfo)(slot, &slot_info); - if (ret) - errx(1, "C_GetSlotInfo failed: %d", (int)ret); - - if ((slot_info.flags & CKF_TOKEN_PRESENT) == 0) - errx(1, "no token present"); - - ret = (*func->C_OpenSession)(slot, CKF_SERIAL_SESSION, - NULL, NULL, &session); - if (ret != CKR_OK) - errx(1, "C_OpenSession failed: %d", (int)ret); - - ret = (*func->C_GetTokenInfo)(slot, &token_info); - if (ret) - errx(1, "C_GetTokenInfo1 failed: %d", (int)ret); - - if (token_info.flags & CKF_LOGIN_REQUIRED) { - ret = (*func->C_Login)(session, CKU_USER, - (unsigned char*)"foobar", 6); - if (ret != CKR_OK) - errx(1, "C_Login failed: %d", (int)ret); - } - - ret = (*func->C_GetTokenInfo)(slot, &token_info); - if (ret) - errx(1, "C_GetTokenInfo2 failed: %d", (int)ret); - - if (token_info.flags & CKF_LOGIN_REQUIRED) - errx(1, "login required, even after C_Login"); - - ret = find_object(session, "cert", CKO_PUBLIC_KEY, &public); - if (ret != CKR_OK) - errx(1, "find cert failed: %d", (int)ret); - ret = find_object(session, "cert", CKO_PRIVATE_KEY, &private); - if (ret != CKR_OK) - errx(1, "find private key failed: %d", (int)ret); - - { - CK_ULONG ck_sigsize; - CK_MECHANISM mechanism; - - memset(&mechanism, 0, sizeof(mechanism)); - mechanism.mechanism = CKM_RSA_PKCS; - - ret = (*func->C_SignInit)(session, &mechanism, private); - if (ret != CKR_OK) - return 1; - - ck_sigsize = sizeof(signature); - ret = (*func->C_Sign)(session, (CK_BYTE *)sighash, strlen(sighash), - (CK_BYTE *)signature, &ck_sigsize); - if (ret != CKR_OK) { - printf("C_Sign failed with: %d\n", (int)ret); - return 1; - } - - ret = (*func->C_VerifyInit)(session, &mechanism, public); - if (ret != CKR_OK) - return 1; - - ret = (*func->C_Verify)(session, (CK_BYTE *)signature, ck_sigsize, - (CK_BYTE *)sighash, strlen(sighash)); - if (ret != CKR_OK) { - printf("message: %d\n", (int)ret); - return 1; - } - } - -#if 0 - { - CK_ULONG ck_sigsize, outsize; - CK_MECHANISM mechanism; - char outdata[1024]; - - memset(&mechanism, 0, sizeof(mechanism)); - mechanism.mechanism = CKM_RSA_PKCS; - - ret = (*func->C_EncryptInit)(session, &mechanism, public); - if (ret != CKR_OK) - return 1; - - ck_sigsize = sizeof(signature); - ret = (*func->C_Encrypt)(session, (CK_BYTE *)sighash, strlen(sighash), - (CK_BYTE *)signature, &ck_sigsize); - if (ret != CKR_OK) { - printf("message: %d\n", (int)ret); - return 1; - } - - ret = (*func->C_DecryptInit)(session, &mechanism, private); - if (ret != CKR_OK) - return 1; - - outsize = sizeof(outdata); - ret = (*func->C_Decrypt)(session, (CK_BYTE *)signature, ck_sigsize, - (CK_BYTE *)outdata, &outsize); - if (ret != CKR_OK) { - printf("message: %d\n", (int)ret); - return 1; - } - - if (ct_memcmp(sighash, outdata, strlen(sighash)) != 0) - return 1; - } -#endif - - ret = (*func->C_CloseSession)(session); - if (ret != CKR_OK) - return 1; - - (*func->C_Finalize)(NULL_PTR); - - return 0; -} diff --git a/kerberosV/src/lib/hx509/test_windows.in b/kerberosV/src/lib/hx509/test_windows.in deleted file mode 100644 index 1e498fac448..00000000000 --- a/kerberosV/src/lib/hx509/test_windows.in +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2007 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: test_windows.in,v 1.1 2013/06/17 19:11:43 robert Exp $ -# - -srcdir="@srcdir@" -objdir="@objdir@" - -stat="--statistic-file=${objdir}/statfile" - -hxtool="${TESTS_ENVIRONMENT} ./hxtool ${stat}" - -if ${hxtool} info | grep 'rsa: hcrypto null RSA' > /dev/null ; then - exit 77 -fi -if ${hxtool} info | grep 'rand: not available' > /dev/null ; then - exit 77 -fi - -echo "Create trust anchor" -${hxtool} issue-certificate \ - --self-signed \ - --issue-ca \ - --generate-key=rsa \ - --subject="CN=Windows-CA,DC=heimdal,DC=pki" \ - --lifetime=10years \ - --certificate="FILE:wca.pem" || exit 1 - -echo "Create domain controller cert" -${hxtool} issue-certificate \ - --type="pkinit-kdc" \ - --pk-init-principal="krbtgt/HEIMDAL.PKI@HEIMDAL.PKI" \ - --hostname=kdc.heimdal.pki \ - --generate-key=rsa \ - --subject="CN=kdc.heimdal.pki,dc=heimdal,dc=pki" \ - --certificate="FILE:wdc.pem" \ - --domain-controller \ - --crl-uri="http://www.test.h5l.se/test-hemdal-pki-crl1.crl" \ - --ca-certificate=FILE:wca.pem || exit 1 - - -echo "Create user cert" -${hxtool} issue-certificate \ - --type="pkinit-client" \ - --pk-init-principal="user@HEIMDAL.PKI" \ - --generate-key=rsa \ - --subject="CN=User,DC=heimdal,DC=pki" \ - --ms-upn="user@heimdal.pki" \ - --crl-uri="http://www.test.h5l.se/test-hemdal-pki-crl1.crl" \ - --certificate="FILE:wuser.pem" \ - --ca-certificate=FILE:wca.pem || exit 1 - -echo "Create crl" -${hxtool} crl-sign \ - --crl-file=wcrl.crl \ - --signer=FILE:wca.pem || exit 1 - -exit 0 diff --git a/kerberosV/src/lib/hx509/tst-crypto-available1 b/kerberosV/src/lib/hx509/tst-crypto-available1 deleted file mode 100644 index 71fa741d64f..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-available1 +++ /dev/null @@ -1,13 +0,0 @@ -1.2.840.113549.1.1.11 -1.2.840.113549.1.1.5 -1.2.840.113549.1.1.5 -1.2.840.113549.1.1.4 -1.2.840.113549.1.1.2 -1.2.752.43.16.1 -2.16.840.1.101.3.4.2.1 -1.3.14.3.2.26 -1.2.840.113549.2.5 -1.2.840.113549.2.2 -1.2.840.113549.3.7 -2.16.840.1.101.3.4.1.2 -2.16.840.1.101.3.4.1.42 diff --git a/kerberosV/src/lib/hx509/tst-crypto-available2 b/kerberosV/src/lib/hx509/tst-crypto-available2 deleted file mode 100644 index 22c09206f03..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-available2 +++ /dev/null @@ -1,5 +0,0 @@ -2.16.840.1.101.3.4.2.3 -2.16.840.1.101.3.4.2.2 -2.16.840.1.101.3.4.2.1 -1.3.14.3.2.26 -1.2.840.113549.2.5 diff --git a/kerberosV/src/lib/hx509/tst-crypto-available3 b/kerberosV/src/lib/hx509/tst-crypto-available3 deleted file mode 100644 index 0b1a855ee54..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-available3 +++ /dev/null @@ -1,6 +0,0 @@ -1.2.840.113549.1.1.11 -1.2.840.113549.1.1.5 -1.2.840.113549.1.1.5 -1.2.840.113549.1.1.4 -1.2.840.113549.1.1.2 -1.2.752.43.16.1 diff --git a/kerberosV/src/lib/hx509/tst-crypto-select b/kerberosV/src/lib/hx509/tst-crypto-select deleted file mode 100644 index 399c883a923..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-select +++ /dev/null @@ -1 +0,0 @@ -1.2.840.113549.1.1.11 diff --git a/kerberosV/src/lib/hx509/tst-crypto-select1 b/kerberosV/src/lib/hx509/tst-crypto-select1 deleted file mode 100644 index c343b570823..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-select1 +++ /dev/null @@ -1 +0,0 @@ -2.16.840.1.101.3.4.2.1 diff --git a/kerberosV/src/lib/hx509/tst-crypto-select2 b/kerberosV/src/lib/hx509/tst-crypto-select2 deleted file mode 100644 index 399c883a923..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-select2 +++ /dev/null @@ -1 +0,0 @@ -1.2.840.113549.1.1.11 diff --git a/kerberosV/src/lib/hx509/tst-crypto-select3 b/kerberosV/src/lib/hx509/tst-crypto-select3 deleted file mode 100644 index ba9f29fd7df..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-select3 +++ /dev/null @@ -1 +0,0 @@ -1.2.840.113549.1.1.4 diff --git a/kerberosV/src/lib/hx509/tst-crypto-select4 b/kerberosV/src/lib/hx509/tst-crypto-select4 deleted file mode 100644 index 749a54905dc..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-select4 +++ /dev/null @@ -1 +0,0 @@ -1.2.840.113549.1.1.5 diff --git a/kerberosV/src/lib/hx509/tst-crypto-select5 b/kerberosV/src/lib/hx509/tst-crypto-select5 deleted file mode 100644 index 399c883a923..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-select5 +++ /dev/null @@ -1 +0,0 @@ -1.2.840.113549.1.1.11 diff --git a/kerberosV/src/lib/hx509/tst-crypto-select6 b/kerberosV/src/lib/hx509/tst-crypto-select6 deleted file mode 100644 index 749a54905dc..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-select6 +++ /dev/null @@ -1 +0,0 @@ -1.2.840.113549.1.1.5 diff --git a/kerberosV/src/lib/hx509/tst-crypto-select7 b/kerberosV/src/lib/hx509/tst-crypto-select7 deleted file mode 100644 index 9b0ac647bc5..00000000000 --- a/kerberosV/src/lib/hx509/tst-crypto-select7 +++ /dev/null @@ -1 +0,0 @@ -2.16.840.1.101.3.4.1.42 diff --git a/kerberosV/src/lib/hx509/version-script.map b/kerberosV/src/lib/hx509/version-script.map deleted file mode 100644 index 44090b2b869..00000000000 --- a/kerberosV/src/lib/hx509/version-script.map +++ /dev/null @@ -1,250 +0,0 @@ -# $Id: version-script.map,v 1.1 2013/06/17 19:11:43 robert Exp $ - -HEIMDAL_X509_1.2 { - global: - _hx509_cert_assign_key; - _hx509_cert_private_key; - _hx509_certs_keys_free; - _hx509_certs_keys_get; - _hx509_expr_eval; - _hx509_expr_free; - _hx509_expr_parse; - _hx509_generate_private_key; - _hx509_generate_private_key_bits; - _hx509_generate_private_key_free; - _hx509_generate_private_key_init; - _hx509_generate_private_key_is_ca; - _hx509_map_file_os; - _hx509_name_from_Name; - _hx509_private_key_ref; - _hx509_request_add_dns_name; - _hx509_request_add_email; - _hx509_request_parse; - _hx509_request_print; - _hx509_request_set_email; - _hx509_request_to_pkcs10; - _hx509_request_to_pkcs10; - _hx509_unmap_file_os; - _hx509_write_file; - hx509_bitstring_print; - hx509_ca_sign; - hx509_ca_sign_self; - hx509_ca_tbs_add_crl_dp_uri; - hx509_ca_tbs_add_eku; - hx509_ca_tbs_add_san_hostname; - hx509_ca_tbs_add_san_jid; - hx509_ca_tbs_add_san_ms_upn; - hx509_ca_tbs_add_san_otherName; - hx509_ca_tbs_add_san_pkinit; - hx509_ca_tbs_add_san_rfc822name; - hx509_ca_tbs_free; - hx509_ca_tbs_init; - hx509_ca_tbs_set_ca; - hx509_ca_tbs_set_domaincontroller; - hx509_ca_tbs_set_notAfter; - hx509_ca_tbs_set_notAfter_lifetime; - hx509_ca_tbs_set_notBefore; - hx509_ca_tbs_set_proxy; - hx509_ca_tbs_set_serialnumber; - hx509_ca_tbs_set_spki; - hx509_ca_tbs_set_subject; - hx509_ca_tbs_set_template; - hx509_ca_tbs_set_unique; - hx509_ca_tbs_subject_expand; - hx509_ca_tbs_template_units; - hx509_cert; - hx509_cert_attribute; - hx509_cert_binary; - hx509_cert_check_eku; - hx509_cert_cmp; - hx509_cert_find_subjectAltName_otherName; - hx509_cert_free; - hx509_cert_get_SPKI; - hx509_cert_get_SPKI_AlgorithmIdentifier; - hx509_cert_get_attribute; - hx509_cert_get_base_subject; - hx509_cert_get_friendly_name; - hx509_cert_get_issuer; - hx509_cert_get_notAfter; - hx509_cert_get_notBefore; - hx509_cert_get_serialnumber; - hx509_cert_get_subject; - hx509_cert_get_issuer_unique_id; - hx509_cert_get_subject_unique_id; - hx509_cert_init; - hx509_cert_init_data; - hx509_cert_keyusage_print; - hx509_cert_public_encrypt; - hx509_cert_ref; - hx509_cert_set_friendly_name; - hx509_certs_add; - hx509_certs_append; - hx509_certs_end_seq; - hx509_certs_ref; - hx509_certs_filter; - hx509_certs_find; - hx509_certs_free; - hx509_certs_info; - hx509_certs_init; - hx509_certs_iter; - hx509_certs_iter_f; - hx509_certs_merge; - hx509_certs_next_cert; - hx509_certs_start_seq; - hx509_certs_store; - hx509_ci_print_names; - hx509_clear_error_string; - hx509_cms_create_signed; - hx509_cms_create_signed_1; - hx509_cms_decrypt_encrypted; - hx509_cms_envelope_1; - hx509_cms_unenvelope; - hx509_cms_unwrap_ContentInfo; - hx509_cms_verify_signed; - hx509_cms_wrap_ContentInfo; - hx509_context_free; - hx509_context_init; - hx509_context_set_missing_revoke; - hx509_crl_add_revoked_certs; - hx509_crl_alloc; - hx509_crl_free; - hx509_crl_lifetime; - hx509_crl_sign; - hx509_crypto_aes128_cbc; - hx509_crypto_aes256_cbc; - hx509_crypto_allow_weak; - hx509_crypto_available; - hx509_crypto_decrypt; - hx509_crypto_des_rsdi_ede3_cbc; - hx509_crypto_destroy; - hx509_crypto_encrypt; - hx509_crypto_enctype_by_name; - hx509_crypto_free_algs; - hx509_crypto_get_params; - hx509_crypto_init; - hx509_crypto_provider; - hx509_crypto_select; - hx509_crypto_set_key_data; - hx509_crypto_set_key_name; - hx509_crypto_set_padding; - hx509_crypto_set_params; - hx509_crypto_set_random_key; - hx509_env_add; - hx509_env_add_binding; - hx509_env_find; - hx509_env_find_binding; - hx509_env_free; - hx509_env_init; - hx509_env_lfind; - hx509_err; - hx509_free_error_string; - hx509_free_octet_string_list; - hx509_find_private_alg; - hx509_general_name_unparse; - hx509_get_error_string; - hx509_get_one_cert; - hx509_lock_add_cert; - hx509_lock_add_certs; - hx509_lock_add_password; - hx509_lock_command_string; - hx509_lock_free; - hx509_lock_init; - hx509_lock_prompt; - hx509_lock_reset_certs; - hx509_lock_reset_passwords; - hx509_lock_reset_promper; - hx509_lock_set_prompter; - hx509_name_binary; - hx509_name_cmp; - hx509_name_copy; - hx509_name_expand; - hx509_name_free; - hx509_name_is_null_p; - hx509_name_normalize; - hx509_name_to_Name; - hx509_name_to_string; - hx509_ocsp_request; - hx509_ocsp_verify; - hx509_oid_print; - hx509_oid_sprint; - hx509_parse_name; - hx509_parse_private_key; - hx509_peer_info_add_cms_alg; - hx509_peer_info_alloc; - hx509_peer_info_free; - hx509_peer_info_set_cert; - hx509_peer_info_set_cms_algs; - hx509_pem_add_header; - hx509_pem_find_header; - hx509_pem_free_header; - hx509_pem_read; - hx509_pem_write; - hx509_print_stdout; - hx509_print_cert; - hx509_private_key_assign_rsa; - hx509_private_key_free; - hx509_private_key_private_decrypt; - hx509_private_key_init; - hx509_private_key2SPKI; - hx509_prompt_hidden; - hx509_query_alloc; - hx509_query_free; - hx509_query_match_cmp_func; - hx509_query_match_eku; - hx509_query_match_expr; - hx509_query_match_friendly_name; - hx509_query_match_issuer_serial; - hx509_query_match_option; - hx509_query_statistic_file; - hx509_query_unparse_stats; - hx509_request_get_name; - hx509_request_get_SubjectPublicKeyInfo; - hx509_request_free; - hx509_request_init; - hx509_request_set_name; - hx509_request_set_SubjectPublicKeyInfo; - hx509_revoke_add_crl; - hx509_revoke_add_ocsp; - hx509_revoke_free; - hx509_revoke_init; - hx509_revoke_ocsp_print; - hx509_revoke_verify; - hx509_set_error_string; - hx509_set_error_stringv; - hx509_signature_md5; - hx509_signature_rsa; - hx509_signature_rsa_with_md5; - hx509_signature_rsa_with_sha1; - hx509_signature_rsa_with_sha256; - hx509_signature_rsa_with_sha384; - hx509_signature_rsa_with_sha512; - hx509_signature_sha1; - hx509_signature_sha256; - hx509_signature_sha384; - hx509_signature_sha512; - hx509_unparse_der_name; - hx509_validate_cert; - hx509_validate_ctx_add_flags; - hx509_validate_ctx_free; - hx509_validate_ctx_init; - hx509_validate_ctx_set_print; - hx509_verify_attach_anchors; - hx509_verify_attach_revoke; - hx509_verify_ctx_f_allow_default_trustanchors; - hx509_verify_destroy_ctx; - hx509_verify_hostname; - hx509_verify_init_ctx; - hx509_verify_path; - hx509_verify_set_max_depth; - hx509_verify_set_proxy_certificate; - hx509_verify_set_strict_rfc3280_verification; - hx509_verify_set_time; - hx509_verify_signature; - hx509_xfree; - initialize_hx_error_table_r; - # pkcs11 symbols - C_GetFunctionList; - local: - *; -}; - diff --git a/kerberosV/src/lib/ipc/Makefile.am b/kerberosV/src/lib/ipc/Makefile.am deleted file mode 100644 index fc3ba469d48..00000000000 --- a/kerberosV/src/lib/ipc/Makefile.am +++ /dev/null @@ -1,67 +0,0 @@ -include $(top_srcdir)/Makefile.am.common - -noinst_LTLIBRARIES = libheim-ipcc.la libheim-ipcs.la - -dist_libheim_ipcc_la_SOURCES = hi_locl.h heim_ipc_types.h client.c common.c -dist_libheim_ipcs_la_SOURCES = hi_locl.h heim_ipc_types.h server.c common.c - -include_HEADERS = heim-ipc.h - -## -## Enable when this is not a noinst_ library -## -#libheim_ipcc_la_LDFLAGS = -version-info 0:0:0 -#libheim_ipcs_la_LDFLAGS = -version-info 0:0:0 -# -#if versionscript -#libheim_ipcc_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-scriptc.map -#libheim_ipcs_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-scripts.map -#endif - -libheim_ipcc_la_LIBADD = \ - $(LIB_heimbase) \ - $(LIB_roken) \ - $(PTHREAD_LIBADD) - -libheim_ipcs_la_LIBADD = $(libheim_ipcc_la_LIBADD) - -TESTS = $(check_PROGRAMS) - -noinst_PROGRAMS = tc ts ts-http - -ts_LDADD = libheim-ipcs.la $(LIB_roken) -ts_http_LDADD = $(ts_LDADD) -tc_LDADD = libheim-ipcc.la $(LIB_roken) - -if have_gcd - -EXTRA_DIST = heim_ipc.defs heim_ipc_async.defs heim_ipc_reply.defs - -heim_ipc.h heim_ipcUser.c heim_ipcServer.c heim_ipcServer.h: heim_ipc.defs - mig -header heim_ipc.h -user heim_ipcUser.c -sheader heim_ipcServer.h -server heim_ipcServer.c -I$(srcdir) $(srcdir)/heim_ipc.defs - -heim_ipc_async.h heim_ipc_asyncUser.c heim_ipc_asyncServer.c heim_ipc_asyncServer.h: heim_ipc_async.defs - mig -header heim_ipc_async.h -user heim_ipc_asyncUser.c -sheader heim_ipc_asyncServer.h -server heim_ipc_asyncServer.c -I$(srcdir) $(srcdir)/heim_ipc_async.defs - -heim_ipc_reply.h heim_ipc_replyUser.c: heim_ipc_reply.defs - mig -header heim_ipc_reply.h -user heim_ipc_replyUser.c -sheader /dev/null -server /dev/null -I$(srcdir) $(srcdir)/heim_ipc_reply.defs - -built_ipcc = heim_ipc.h heim_ipcUser.c -built_ipcc += heim_ipc_asyncServer.c heim_ipc_asyncServer.h - -nodist_libheim_ipcc_la_SOURCES = $(built_ipcc) - -built_ipcs = heim_ipcServer.c heim_ipcServer.h -built_ipcs += heim_ipc_asyncUser.c heim_ipc_async.h -built_ipcs += heim_ipc_reply.h heim_ipc_replyUser.c - -nodist_libheim_ipcs_la_SOURCES = $(built_ipcs) - -libheim_ipcs_la_LIBADD += -lbsm - -CLEANFILES = $(built_ipcc) $(built_ipcs) - -$(srcdir)/client.c: $(built_ipcc) -$(srcdir)/server.c: $(built_ipcs) - -endif \ No newline at end of file diff --git a/kerberosV/src/lib/ipc/Makefile.in b/kerberosV/src/lib/ipc/Makefile.in deleted file mode 100644 index eb7054268e8..00000000000 --- a/kerberosV/src/lib/ipc/Makefile.in +++ /dev/null @@ -1,1073 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:44 robert Exp $ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:44 robert Exp $ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -TESTS = -noinst_PROGRAMS = tc$(EXEEXT) ts$(EXEEXT) ts-http$(EXEEXT) -@have_gcd_TRUE@am__append_1 = -lbsm -subdir = lib/ipc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LTLIBRARIES = $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -libheim_ipcc_la_DEPENDENCIES = $(LIB_heimbase) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -dist_libheim_ipcc_la_OBJECTS = client.lo common.lo -@have_gcd_TRUE@am__objects_1 = heim_ipcUser.lo heim_ipc_asyncServer.lo -@have_gcd_TRUE@nodist_libheim_ipcc_la_OBJECTS = $(am__objects_1) -libheim_ipcc_la_OBJECTS = $(dist_libheim_ipcc_la_OBJECTS) \ - $(nodist_libheim_ipcc_la_OBJECTS) -am__DEPENDENCIES_2 = $(LIB_heimbase) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -libheim_ipcs_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_1) -dist_libheim_ipcs_la_OBJECTS = server.lo common.lo -@have_gcd_TRUE@am__objects_2 = heim_ipcServer.lo heim_ipc_asyncUser.lo \ -@have_gcd_TRUE@ heim_ipc_replyUser.lo -@have_gcd_TRUE@nodist_libheim_ipcs_la_OBJECTS = $(am__objects_2) -libheim_ipcs_la_OBJECTS = $(dist_libheim_ipcs_la_OBJECTS) \ - $(nodist_libheim_ipcs_la_OBJECTS) -PROGRAMS = $(noinst_PROGRAMS) -tc_SOURCES = tc.c -tc_OBJECTS = tc.$(OBJEXT) -tc_DEPENDENCIES = libheim-ipcc.la $(am__DEPENDENCIES_1) -ts_SOURCES = ts.c -ts_OBJECTS = ts.$(OBJEXT) -ts_DEPENDENCIES = libheim-ipcs.la $(am__DEPENDENCIES_1) -ts_http_SOURCES = ts-http.c -ts_http_OBJECTS = ts-http.$(OBJEXT) -am__DEPENDENCIES_3 = libheim-ipcs.la $(am__DEPENDENCIES_1) -ts_http_DEPENDENCIES = $(am__DEPENDENCIES_3) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(dist_libheim_ipcc_la_SOURCES) \ - $(nodist_libheim_ipcc_la_SOURCES) \ - $(dist_libheim_ipcs_la_SOURCES) \ - $(nodist_libheim_ipcs_la_SOURCES) tc.c ts.c ts-http.c -DIST_SOURCES = $(dist_libheim_ipcc_la_SOURCES) \ - $(dist_libheim_ipcs_la_SOURCES) tc.c ts.c ts-http.c -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(includedir)" -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -noinst_LTLIBRARIES = libheim-ipcc.la libheim-ipcs.la -dist_libheim_ipcc_la_SOURCES = hi_locl.h heim_ipc_types.h client.c common.c -dist_libheim_ipcs_la_SOURCES = hi_locl.h heim_ipc_types.h server.c common.c -include_HEADERS = heim-ipc.h - -#libheim_ipcc_la_LDFLAGS = -version-info 0:0:0 -#libheim_ipcs_la_LDFLAGS = -version-info 0:0:0 -# -#if versionscript -#libheim_ipcc_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-scriptc.map -#libheim_ipcs_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-scripts.map -#endif -libheim_ipcc_la_LIBADD = \ - $(LIB_heimbase) \ - $(LIB_roken) \ - $(PTHREAD_LIBADD) - -libheim_ipcs_la_LIBADD = $(libheim_ipcc_la_LIBADD) $(am__append_1) -ts_LDADD = libheim-ipcs.la $(LIB_roken) -ts_http_LDADD = $(ts_LDADD) -tc_LDADD = libheim-ipcc.la $(LIB_roken) -@have_gcd_TRUE@EXTRA_DIST = heim_ipc.defs heim_ipc_async.defs heim_ipc_reply.defs -@have_gcd_TRUE@built_ipcc = heim_ipc.h heim_ipcUser.c \ -@have_gcd_TRUE@ heim_ipc_asyncServer.c heim_ipc_asyncServer.h -@have_gcd_TRUE@nodist_libheim_ipcc_la_SOURCES = $(built_ipcc) -@have_gcd_TRUE@built_ipcs = heim_ipcServer.c heim_ipcServer.h \ -@have_gcd_TRUE@ heim_ipc_asyncUser.c heim_ipc_async.h \ -@have_gcd_TRUE@ heim_ipc_reply.h heim_ipc_replyUser.c -@have_gcd_TRUE@nodist_libheim_ipcs_la_SOURCES = $(built_ipcs) -@have_gcd_TRUE@CLEANFILES = $(built_ipcc) $(built_ipcs) -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/ipc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/ipc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libheim-ipcc.la: $(libheim_ipcc_la_OBJECTS) $(libheim_ipcc_la_DEPENDENCIES) - $(LINK) $(libheim_ipcc_la_OBJECTS) $(libheim_ipcc_la_LIBADD) $(LIBS) -libheim-ipcs.la: $(libheim_ipcs_la_OBJECTS) $(libheim_ipcs_la_DEPENDENCIES) - $(LINK) $(libheim_ipcs_la_OBJECTS) $(libheim_ipcs_la_LIBADD) $(LIBS) - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -tc$(EXEEXT): $(tc_OBJECTS) $(tc_DEPENDENCIES) - @rm -f tc$(EXEEXT) - $(LINK) $(tc_OBJECTS) $(tc_LDADD) $(LIBS) -ts$(EXEEXT): $(ts_OBJECTS) $(ts_DEPENDENCIES) - @rm -f ts$(EXEEXT) - $(LINK) $(ts_OBJECTS) $(ts_LDADD) $(LIBS) -ts-http$(EXEEXT): $(ts_http_OBJECTS) $(ts_http_DEPENDENCIES) - @rm -f ts-http$(EXEEXT) - $(LINK) $(ts_http_OBJECTS) $(ts_http_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heim_ipcServer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heim_ipcUser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heim_ipc_asyncServer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heim_ipc_asyncUser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/heim_ipc_replyUser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ts-http.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ts.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) all-local -installdirs: - for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \ - check-local clean clean-generic clean-libtool \ - clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags dist-hook \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-includeHEADERS install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-includeHEADERS - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -@have_gcd_TRUE@heim_ipc.h heim_ipcUser.c heim_ipcServer.c heim_ipcServer.h: heim_ipc.defs -@have_gcd_TRUE@ mig -header heim_ipc.h -user heim_ipcUser.c -sheader heim_ipcServer.h -server heim_ipcServer.c -I$(srcdir) $(srcdir)/heim_ipc.defs - -@have_gcd_TRUE@heim_ipc_async.h heim_ipc_asyncUser.c heim_ipc_asyncServer.c heim_ipc_asyncServer.h: heim_ipc_async.defs -@have_gcd_TRUE@ mig -header heim_ipc_async.h -user heim_ipc_asyncUser.c -sheader heim_ipc_asyncServer.h -server heim_ipc_asyncServer.c -I$(srcdir) $(srcdir)/heim_ipc_async.defs - -@have_gcd_TRUE@heim_ipc_reply.h heim_ipc_replyUser.c: heim_ipc_reply.defs -@have_gcd_TRUE@ mig -header heim_ipc_reply.h -user heim_ipc_replyUser.c -sheader /dev/null -server /dev/null -I$(srcdir) $(srcdir)/heim_ipc_reply.defs - -@have_gcd_TRUE@$(srcdir)/client.c: $(built_ipcc) -@have_gcd_TRUE@$(srcdir)/server.c: $(built_ipcs) - -# 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/kerberosV/src/lib/ipc/client.c b/kerberosV/src/lib/ipc/client.c deleted file mode 100644 index bb7d9750bff..00000000000 --- a/kerberosV/src/lib/ipc/client.c +++ /dev/null @@ -1,574 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "hi_locl.h" - -#if defined(__APPLE__) && defined(HAVE_GCD) - -#include "heim_ipc.h" -#include "heim_ipc_asyncServer.h" - -#include -#include - -static dispatch_once_t jobqinited = 0; -static dispatch_queue_t jobq = NULL; -static dispatch_queue_t syncq; - -struct mach_ctx { - mach_port_t server; - char *name; -}; - -static int -mach_release(void *ctx); - -static int -mach_init(const char *service, void **ctx) -{ - struct mach_ctx *ipc; - mach_port_t sport; - int ret; - - dispatch_once(&jobqinited, ^{ - jobq = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - syncq = dispatch_queue_create("heim-ipc-syncq", NULL); - }); - - ret = bootstrap_look_up(bootstrap_port, service, &sport); - if (ret) - return ret; - - ipc = malloc(sizeof(*ipc)); - if (ipc == NULL) { - mach_port_destroy(mach_task_self(), sport); - return ENOMEM; - } - - ipc->server = sport; - ipc->name = strdup(service); - if (ipc->name == NULL) { - mach_release(ipc); - return ENOMEM; - } - - *ctx = ipc; - - return 0; -} - -static int -mach_ipc(void *ctx, - const heim_idata *request, heim_idata *response, - heim_icred *cred) -{ - struct mach_ctx *ipc = ctx; - heim_ipc_message_inband_t requestin; - mach_msg_type_number_t requestin_length = 0; - heim_ipc_message_outband_t requestout = NULL; - mach_msg_type_number_t requestout_length = 0; - heim_ipc_message_inband_t replyin; - mach_msg_type_number_t replyin_length; - heim_ipc_message_outband_t replyout; - mach_msg_type_number_t replyout_length; - int ret, errorcode, retries = 0; - - memcpy(requestin, request->data, request->length); - requestin_length = request->length; - - while (retries < 2) { - __block mach_port_t sport; - - dispatch_sync(syncq, ^{ sport = ipc->server; }); - - ret = mheim_ipc_call(sport, - requestin, requestin_length, - requestout, requestout_length, - &errorcode, - replyin, &replyin_length, - &replyout, &replyout_length); - if (ret == MACH_SEND_INVALID_DEST) { - mach_port_t nport; - /* race other threads to get a new port */ - ret = bootstrap_look_up(bootstrap_port, ipc->name, &nport); - if (ret) - return ret; - dispatch_sync(syncq, ^{ - /* check if we lost the race to lookup the port */ - if (sport != ipc->server) { - mach_port_deallocate(mach_task_self(), nport); - } else { - mach_port_deallocate(mach_task_self(), ipc->server); - ipc->server = nport; - } - }); - retries++; - } else if (ret) { - return ret; - } else - break; - } - if (retries >= 2) - return EINVAL; - - if (errorcode) { - if (replyout_length) - vm_deallocate (mach_task_self (), (vm_address_t) replyout, - replyout_length); - return errorcode; - } - - if (replyout_length) { - response->data = malloc(replyout_length); - if (response->data == NULL) { - vm_deallocate (mach_task_self (), (vm_address_t) replyout, - replyout_length); - return ENOMEM; - } - memcpy(response->data, replyout, replyout_length); - response->length = replyout_length; - vm_deallocate (mach_task_self (), (vm_address_t) replyout, - replyout_length); - } else { - response->data = malloc(replyin_length); - if (response->data == NULL) - return ENOMEM; - memcpy(response->data, replyin, replyin_length); - response->length = replyin_length; - } - - return 0; -} - -struct async_client { - mach_port_t mp; - dispatch_source_t source; - dispatch_queue_t queue; - void (*func)(void *, int, heim_idata *, heim_icred); - void *userctx; -}; - -kern_return_t -mheim_ado_acall_reply(mach_port_t server_port, - audit_token_t client_creds, - int returnvalue, - heim_ipc_message_inband_t replyin, - mach_msg_type_number_t replyinCnt, - heim_ipc_message_outband_t replyout, - mach_msg_type_number_t replyoutCnt) -{ - struct async_client *c = dispatch_get_context(dispatch_get_current_queue()); - heim_idata response; - - if (returnvalue) { - response.data = NULL; - response.length = 0; - } else if (replyoutCnt) { - response.data = replyout; - response.length = replyoutCnt; - } else { - response.data = replyin; - response.length = replyinCnt; - } - - (*c->func)(c->userctx, returnvalue, &response, NULL); - - if (replyoutCnt) - vm_deallocate (mach_task_self (), (vm_address_t) replyout, replyoutCnt); - - dispatch_source_cancel(c->source); - - return 0; - - -} - - -static int -mach_async(void *ctx, const heim_idata *request, void *userctx, - void (*func)(void *, int, heim_idata *, heim_icred)) -{ - struct mach_ctx *ipc = ctx; - heim_ipc_message_inband_t requestin; - mach_msg_type_number_t requestin_length = 0; - heim_ipc_message_outband_t requestout = NULL; - mach_msg_type_number_t requestout_length = 0; - int ret, retries = 0; - kern_return_t kr; - struct async_client *c; - - /* first create the service that will catch the reply from the server */ - /* XXX these object should be cached and reused */ - - c = malloc(sizeof(*c)); - if (c == NULL) - return ENOMEM; - - kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &c->mp); - if (kr != KERN_SUCCESS) - return EINVAL; - - c->queue = dispatch_queue_create("heim-ipc-async-client", NULL); - c->source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV, c->mp, 0, c->queue); - dispatch_set_context(c->queue, c); - - dispatch_source_set_event_handler(c->source, ^{ - dispatch_mig_server(c->source, - sizeof(union __RequestUnion__mheim_ado_mheim_aipc_subsystem), - mheim_aipc_server); - }); - - dispatch_source_set_cancel_handler(c->source, ^{ - mach_port_mod_refs(mach_task_self(), c->mp, - MACH_PORT_RIGHT_RECEIVE, -1); - dispatch_release(c->queue); - dispatch_release(c->source); - free(c); - }); - - c->func = func; - c->userctx = userctx; - - dispatch_resume(c->source); - - /* ok, send the message */ - - memcpy(requestin, request->data, request->length); - requestin_length = request->length; - - while (retries < 2) { - __block mach_port_t sport; - - dispatch_sync(syncq, ^{ sport = ipc->server; }); - - ret = mheim_ipc_call_request(sport, c->mp, - requestin, requestin_length, - requestout, requestout_length); - if (ret == MACH_SEND_INVALID_DEST) { - ret = bootstrap_look_up(bootstrap_port, ipc->name, &sport); - if (ret) { - dispatch_source_cancel(c->source); - return ret; - } - mach_port_deallocate(mach_task_self(), ipc->server); - ipc->server = sport; - retries++; - } else if (ret) { - dispatch_source_cancel(c->source); - return ret; - } else - break; - } - if (retries >= 2) { - dispatch_source_cancel(c->source); - return EINVAL; - } - - return 0; -} - -static int -mach_release(void *ctx) -{ - struct mach_ctx *ipc = ctx; - if (ipc->server != MACH_PORT_NULL) - mach_port_deallocate(mach_task_self(), ipc->server); - free(ipc->name); - free(ipc); - return 0; -} - -#endif - -struct path_ctx { - char *path; - int fd; -}; - -static int common_release(void *); - -static int -connect_unix(struct path_ctx *s) -{ - struct sockaddr_un addr; - - addr.sun_family = AF_UNIX; - strlcpy(addr.sun_path, s->path, sizeof(addr.sun_path)); - - s->fd = socket(AF_UNIX, SOCK_STREAM, 0); - if (s->fd < 0) - return errno; - rk_cloexec(s->fd); - - if (connect(s->fd, (struct sockaddr *)&addr, sizeof(addr)) != 0) { - close(s->fd); - return errno; - } - - return 0; -} - -static int -common_path_init(const char *service, - const char *file, - void **ctx) -{ - struct path_ctx *s; - - s = malloc(sizeof(*s)); - if (s == NULL) - return ENOMEM; - s->fd = -1; - - asprintf(&s->path, "/var/run/.heim_%s-%s", service, file); - - *ctx = s; - - return 0; -} - -static int -unix_socket_init(const char *service, - void **ctx) -{ - int ret; - - ret = common_path_init(service, "socket", ctx); - if (ret) - return ret; - ret = connect_unix(*ctx); - if (ret) - common_release(*ctx); - - return ret; -} - -static int -unix_socket_ipc(void *ctx, - const heim_idata *req, heim_idata *rep, - heim_icred *cred) -{ - struct path_ctx *s = ctx; - uint32_t len = htonl(req->length); - uint32_t rv; - int retval; - - if (cred) - *cred = NULL; - - rep->data = NULL; - rep->length = 0; - - if (net_write(s->fd, &len, sizeof(len)) != sizeof(len)) - return -1; - if (net_write(s->fd, req->data, req->length) != (ssize_t)req->length) - return -1; - - if (net_read(s->fd, &len, sizeof(len)) != sizeof(len)) - return -1; - if (net_read(s->fd, &rv, sizeof(rv)) != sizeof(rv)) - return -1; - retval = ntohl(rv); - - rep->length = ntohl(len); - if (rep->length > 0) { - rep->data = malloc(rep->length); - if (rep->data == NULL) - return -1; - if (net_read(s->fd, rep->data, rep->length) != (ssize_t)rep->length) - return -1; - } else - rep->data = NULL; - - return retval; -} - -int -common_release(void *ctx) -{ - struct path_ctx *s = ctx; - if (s->fd >= 0) - close(s->fd); - free(s->path); - free(s); - return 0; -} - -#ifdef HAVE_DOOR - -static int -door_init(const char *service, - void **ctx) -{ - ret = common_path_init(context, service, "door", ctx); - if (ret) - return ret; - ret = connect_door(*ctx); - if (ret) - common_release(*ctx); - return ret; -} - -static int -door_ipc(void *ctx, - const heim_idata *request, heim_idata *response, - heim_icred *cred) -{ - door_arg_t arg; - int ret; - - arg.data_ptr = request->data; - arg.data_size = request->length; - arg.desc_ptr = NULL; - arg.desc_num = 0; - arg.rbuf = NULL; - arg.rsize = 0; - - ret = door_call(fd, &arg); - close(fd); - if (ret != 0) - return errno; - - response->data = malloc(arg.rsize); - if (response->data == NULL) { - munmap(arg.rbuf, arg.rsize); - return ENOMEM; - } - memcpy(response->data, arg.rbuf, arg.rsize); - response->length = arg.rsize; - munmap(arg.rbuf, arg.rsize); - - return ret; -} - -#endif - -struct hipc_ops { - const char *prefix; - int (*init)(const char *, void **); - int (*release)(void *); - int (*ipc)(void *,const heim_idata *, heim_idata *, heim_icred *); - int (*async)(void *, const heim_idata *, void *, - void (*)(void *, int, heim_idata *, heim_icred)); -}; - -struct hipc_ops ipcs[] = { -#if defined(__APPLE__) && defined(HAVE_GCD) - { "MACH", mach_init, mach_release, mach_ipc, mach_async }, -#endif -#ifdef HAVE_DOOR - { "DOOR", door_init, common_release, door_ipc, NULL } -#endif - { "UNIX", unix_socket_init, common_release, unix_socket_ipc, NULL } -}; - -struct heim_ipc { - struct hipc_ops *ops; - void *ctx; -}; - - -int -heim_ipc_init_context(const char *name, heim_ipc *ctx) -{ - unsigned int i; - int ret, any = 0; - - for(i = 0; i < sizeof(ipcs)/sizeof(ipcs[0]); i++) { - size_t prefix_len = strlen(ipcs[i].prefix); - heim_ipc c; - if(strncmp(ipcs[i].prefix, name, prefix_len) == 0 - && name[prefix_len] == ':') { - } else if (strncmp("ANY:", name, 4) == 0) { - prefix_len = 3; - any = 1; - } else - continue; - - c = calloc(1, sizeof(*c)); - if (c == NULL) - return ENOMEM; - - c->ops = &ipcs[i]; - - ret = (c->ops->init)(name + prefix_len + 1, &c->ctx); - if (ret) { - free(c); - if (any) - continue; - return ret; - } - - *ctx = c; - return 0; - } - - return ENOENT; -} - -void -heim_ipc_free_context(heim_ipc ctx) -{ - (ctx->ops->release)(ctx->ctx); - free(ctx); -} - -int -heim_ipc_call(heim_ipc ctx, const heim_idata *snd, heim_idata *rcv, - heim_icred *cred) -{ - if (cred) - *cred = NULL; - return (ctx->ops->ipc)(ctx->ctx, snd, rcv, cred); -} - -int -heim_ipc_async(heim_ipc ctx, const heim_idata *snd, void *userctx, - void (*func)(void *, int, heim_idata *, heim_icred)) -{ - if (ctx->ops->async == NULL) { - heim_idata rcv; - heim_icred cred = NULL; - int ret; - - ret = (ctx->ops->ipc)(ctx->ctx, snd, &rcv, &cred); - (*func)(userctx, ret, &rcv, cred); - heim_ipc_free_cred(cred); - free(rcv.data); - return ret; - } else { - return (ctx->ops->async)(ctx->ctx, snd, userctx, func); - } -} diff --git a/kerberosV/src/lib/ipc/common.c b/kerberosV/src/lib/ipc/common.c deleted file mode 100644 index c1fae220438..00000000000 --- a/kerberosV/src/lib/ipc/common.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "hi_locl.h" -#ifdef HAVE_GCD -#include -#else -#include "heim_threads.h" -#endif - -struct heim_icred { - uid_t uid; - gid_t gid; - pid_t pid; - pid_t session; -}; - -void -heim_ipc_free_cred(heim_icred cred) -{ - free(cred); -} - -uid_t -heim_ipc_cred_get_uid(heim_icred cred) -{ - return cred->uid; -} - -gid_t -heim_ipc_cred_get_gid(heim_icred cred) -{ - return cred->gid; -} - -pid_t -heim_ipc_cred_get_pid(heim_icred cred) -{ - return cred->pid; -} - -pid_t -heim_ipc_cred_get_session(heim_icred cred) -{ - return cred->session; -} - - -int -_heim_ipc_create_cred(uid_t uid, gid_t gid, pid_t pid, pid_t session, heim_icred *cred) -{ - *cred = calloc(1, sizeof(**cred)); - if (*cred == NULL) - return ENOMEM; - (*cred)->uid = uid; - (*cred)->gid = gid; - (*cred)->pid = pid; - (*cred)->session = session; - return 0; -} - -#if !defined(HAVE_GCD) && defined(ENABLE_PTHREAD_SUPPORT) -struct heim_isemaphore { - HEIMDAL_MUTEX mutex; - pthread_cond_t cond; - long counter; -}; -#endif - -heim_isemaphore -heim_ipc_semaphore_create(long value) -{ -#ifdef HAVE_GCD - return (heim_isemaphore)dispatch_semaphore_create(value); -#elif !defined(ENABLE_PTHREAD_SUPPORT) - heim_assert(0, "no semaphore support w/o pthreads"); - return NULL; -#else - heim_isemaphore s = malloc(sizeof(*s)); - if (s == NULL) - return NULL; - HEIMDAL_MUTEX_init(&s->mutex); - pthread_cond_init(&s->cond, NULL); - s->counter = value; - return s; -#endif -} - -long -heim_ipc_semaphore_wait(heim_isemaphore s, time_t t) -{ -#ifdef HAVE_GCD - uint64_t timeout; - if (t == HEIM_IPC_WAIT_FOREVER) - timeout = DISPATCH_TIME_FOREVER; - else - timeout = (uint64_t)t * NSEC_PER_SEC; - - return dispatch_semaphore_wait((dispatch_semaphore_t)s, timeout); -#elif !defined(ENABLE_PTHREAD_SUPPORT) - heim_assert(0, "no semaphore support w/o pthreads"); - return 0; -#else - HEIMDAL_MUTEX_lock(&s->mutex); - /* if counter hits below zero, we get to wait */ - if (--s->counter < 0) { - int ret; - - if (t == HEIM_IPC_WAIT_FOREVER) - ret = pthread_cond_wait(&s->cond, &s->mutex); - else { - struct timespec ts; - ts.tv_sec = t; - ts.tv_nsec = 0; - ret = pthread_cond_timedwait(&s->cond, &s->mutex, &ts); - } - if (ret) { - HEIMDAL_MUTEX_unlock(&s->mutex); - return errno; - } - } - HEIMDAL_MUTEX_unlock(&s->mutex); - - return 0; -#endif -} - -long -heim_ipc_semaphore_signal(heim_isemaphore s) -{ -#ifdef HAVE_GCD - return dispatch_semaphore_signal((dispatch_semaphore_t)s); -#elif !defined(ENABLE_PTHREAD_SUPPORT) - heim_assert(0, "no semaphore support w/o pthreads"); - return EINVAL; -#else - int wakeup; - HEIMDAL_MUTEX_lock(&s->mutex); - wakeup = (++s->counter == 0) ; - HEIMDAL_MUTEX_unlock(&s->mutex); - if (wakeup) - pthread_cond_signal(&s->cond); - return 0; -#endif -} - -void -heim_ipc_semaphore_release(heim_isemaphore s) -{ -#ifdef HAVE_GCD - dispatch_release((dispatch_semaphore_t)s); -#elif !defined(ENABLE_PTHREAD_SUPPORT) - heim_assert(0, "no semaphore support w/o pthreads"); -#else - HEIMDAL_MUTEX_lock(&s->mutex); - if (s->counter != 0) - abort(); - HEIMDAL_MUTEX_unlock(&s->mutex); - HEIMDAL_MUTEX_destroy(&s->mutex); - pthread_cond_destroy(&s->cond); - free(s); -#endif -} - -void -heim_ipc_free_data(heim_idata *data) -{ - if (data->data) - free(data->data); - data->data = NULL; - data->length = 0; -} diff --git a/kerberosV/src/lib/ipc/heim-ipc.h b/kerberosV/src/lib/ipc/heim-ipc.h deleted file mode 100644 index 6fbf309f7cd..00000000000 --- a/kerberosV/src/lib/ipc/heim-ipc.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 - -typedef struct heim_ipc *heim_ipc; -typedef struct heim_sipc *heim_sipc; -typedef struct heim_icred *heim_icred; -typedef struct heim_isemaphore *heim_isemaphore; -typedef struct heim_octet_string heim_idata; -typedef struct heim_sipc_call *heim_sipc_call; - -/* common */ - -void -heim_ipc_free_cred(heim_icred); - -uid_t -heim_ipc_cred_get_uid(heim_icred); - -gid_t -heim_ipc_cred_get_gid(heim_icred); - -pid_t -heim_ipc_cred_get_pid(heim_icred); - -pid_t -heim_ipc_cred_get_session(heim_icred); - -void -heim_ipc_main(void); - -heim_isemaphore -heim_ipc_semaphore_create(long); - -long -heim_ipc_semaphore_wait(heim_isemaphore, time_t); - -long -heim_ipc_semaphore_signal(heim_isemaphore); - -void -heim_ipc_semaphore_release(heim_isemaphore); - -#define HEIM_IPC_WAIT_FOREVER ((time_t)-1) - -void -heim_ipc_free_data(heim_idata *); - -/* client */ - -int -heim_ipc_init_context(const char *, heim_ipc *); - -void -heim_ipc_free_context(heim_ipc); - -int -heim_ipc_call(heim_ipc, const heim_idata *, heim_idata *, heim_icred *); - -int -heim_ipc_async(heim_ipc, const heim_idata *, void *, void (*func)(void *, int, heim_idata *, heim_icred)); - -/* server */ - -#define HEIM_SIPC_TYPE_IPC 1 -#define HEIM_SIPC_TYPE_UINT32 2 -#define HEIM_SIPC_TYPE_HTTP 4 - -typedef void -(*heim_ipc_complete)(heim_sipc_call, int, heim_idata *); - -typedef void -(*heim_ipc_callback)(void *, const heim_idata *, - const heim_icred, heim_ipc_complete, heim_sipc_call); - - -int -heim_sipc_launchd_mach_init(const char *, heim_ipc_callback, - void *, heim_sipc *); - -int -heim_sipc_stream_listener(int, int, heim_ipc_callback, - void *, heim_sipc *); - -int -heim_sipc_service_unix(const char *, heim_ipc_callback, - void *, heim_sipc *); - - -void -heim_sipc_timeout(time_t); - -void -heim_sipc_set_timeout_handler(void (*)(void)); - -void -heim_sipc_free_context(heim_sipc); diff --git a/kerberosV/src/lib/ipc/heim_ipc.defs b/kerberosV/src/lib/ipc/heim_ipc.defs deleted file mode 100644 index ae84791375d..00000000000 --- a/kerberosV/src/lib/ipc/heim_ipc.defs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 -#include - -type heim_ipc_message_inband_t = array [ * : 2048 ] of char; -type heim_ipc_message_outband_t = array [] of char; - -import "heim_ipc_types.h"; - -subsystem mheim_ipc 1; -userprefix mheim_ipc_; -serverprefix mheim_do_; - -routine call( - server_port : mach_port_t; - ServerAuditToken client_creds : audit_token_t; - sreplyport reply_port : mach_port_make_send_once_t; - in requestin : heim_ipc_message_inband_t; - in requestout : heim_ipc_message_outband_t; - out returnvalue : int; - out replyin : heim_ipc_message_inband_t; - out replyout : heim_ipc_message_outband_t, dealloc); - -simpleroutine call_request( - server_port : mach_port_t; - ServerAuditToken client_creds : audit_token_t; - in reply_to : mach_port_make_send_once_t; - in requestin : heim_ipc_message_inband_t; - in requestout : heim_ipc_message_outband_t); - - - diff --git a/kerberosV/src/lib/ipc/heim_ipc_async.defs b/kerberosV/src/lib/ipc/heim_ipc_async.defs deleted file mode 100644 index 73157c0d1ae..00000000000 --- a/kerberosV/src/lib/ipc/heim_ipc_async.defs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 -#include - -type heim_ipc_message_inband_t = array [ * : 2048 ] of char; -type heim_ipc_message_outband_t = array [] of char; - -import "heim_ipc_types.h"; - -subsystem mheim_aipc 201; -userprefix mheim_aipc_; -serverprefix mheim_ado_; - -simpleroutine acall_reply( - server_port : mach_port_move_send_once_t; - ServerAuditToken client_creds : audit_token_t; - in returnvalue : int; - in requestin : heim_ipc_message_inband_t; - in requestout : heim_ipc_message_outband_t); - - - diff --git a/kerberosV/src/lib/ipc/heim_ipc_reply.defs b/kerberosV/src/lib/ipc/heim_ipc_reply.defs deleted file mode 100644 index 8209485562f..00000000000 --- a/kerberosV/src/lib/ipc/heim_ipc_reply.defs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 -#include - -type heim_ipc_message_inband_t = array [ * : 2048 ] of char; -type heim_ipc_message_outband_t = array [] of char; - -import "heim_ipc_types.h"; - -subsystem heim_ipc 101; -userprefix mheim_ripc_; - -simpleroutine call_reply( - reply_port : mach_port_move_send_once_t; - returnvalue : int; - replyin : heim_ipc_message_inband_t; - replyout : heim_ipc_message_outband_t, dealloc); diff --git a/kerberosV/src/lib/ipc/heim_ipc_types.h b/kerberosV/src/lib/ipc/heim_ipc_types.h deleted file mode 100644 index c853610f1a4..00000000000 --- a/kerberosV/src/lib/ipc/heim_ipc_types.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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. - */ - -#ifndef _HEIM_IPC_TYPES_H_ -#define _HEIM_IPC_TYPES_H_ - -#define HEIM_KCM_BOOTSTRAP_NAME "org.h5l.Kerberos.kcm" - -typedef char heim_ipc_message_inband_t[2048]; -typedef char *heim_ipc_message_outband_t; - -#endif diff --git a/kerberosV/src/lib/ipc/hi_locl.h b/kerberosV/src/lib/ipc/hi_locl.h deleted file mode 100644 index 7efe6ca841e..00000000000 --- a/kerberosV/src/lib/ipc/hi_locl.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "config.h" - -#include -#include -#ifdef HAVE_SYS_UN_H -#include -#endif - -#include - -#include -#include -#include -#include -#include - -#ifdef HAVE_GETPEERUCRED -#include -#endif - -#include -#include - -#include -#include - -#include - -#if defined(__APPLE__) && defined(HAVE_GCD) -#include -#include -#include -#include - -#ifndef __APPLE_PRIVATE__ /* awe, using private interface */ -typedef boolean_t (*dispatch_mig_callback_t)(mach_msg_header_t *message, mach_msg_header_t *reply); - -mach_msg_return_t -dispatch_mig_server(dispatch_source_t ds, size_t maxmsgsz, dispatch_mig_callback_t callback); -#endif - -#endif - - -#include - -int -_heim_ipc_create_cred(uid_t, gid_t, pid_t, pid_t, heim_icred *); diff --git a/kerberosV/src/lib/ipc/server.c b/kerberosV/src/lib/ipc/server.c deleted file mode 100644 index 7c698de8a73..00000000000 --- a/kerberosV/src/lib/ipc/server.c +++ /dev/null @@ -1,1191 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "hi_locl.h" -#include - -#if defined(__OpenBSD__) -#undef SO_PEERCRED -#endif - -#define MAX_PACKET_SIZE (128 * 1024) - -struct heim_sipc { - int (*release)(heim_sipc ctx); - heim_ipc_callback callback; - void *userctx; - void *mech; -}; - -#if defined(__APPLE__) && defined(HAVE_GCD) - -#include "heim_ipcServer.h" -#include "heim_ipc_reply.h" -#include "heim_ipc_async.h" - -static dispatch_source_t timer; -static dispatch_queue_t timerq; -static uint64_t timeoutvalue; - -static dispatch_queue_t eventq; - -static dispatch_queue_t workq; - -static void -default_timer_ev(void) -{ - exit(0); -} - -static void (*timer_ev)(void) = default_timer_ev; - -static void -set_timer(void) -{ - dispatch_source_set_timer(timer, - dispatch_time(DISPATCH_TIME_NOW, - timeoutvalue * NSEC_PER_SEC), - timeoutvalue * NSEC_PER_SEC, 1000000); -} - -static void -init_globals(void) -{ - static dispatch_once_t once; - dispatch_once(&once, ^{ - timerq = dispatch_queue_create("hiem-sipc-timer-q", NULL); - timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, timerq); - dispatch_source_set_event_handler(timer, ^{ timer_ev(); } ); - - workq = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - eventq = dispatch_queue_create("heim-ipc.event-queue", NULL); - }); -} - -static void -suspend_timer(void) -{ - dispatch_suspend(timer); -} - -static void -restart_timer(void) -{ - dispatch_sync(timerq, ^{ set_timer(); }); - dispatch_resume(timer); -} - -struct mach_service { - mach_port_t sport; - dispatch_source_t source; - dispatch_queue_t queue; -}; - -struct mach_call_ctx { - mach_port_t reply_port; - heim_icred cred; - heim_idata req; -}; - - -static void -mach_complete_sync(heim_sipc_call ctx, int returnvalue, heim_idata *reply) -{ - struct mach_call_ctx *s = (struct mach_call_ctx *)ctx; - heim_ipc_message_inband_t replyin; - mach_msg_type_number_t replyinCnt; - heim_ipc_message_outband_t replyout; - mach_msg_type_number_t replyoutCnt; - kern_return_t kr; - - if (returnvalue) { - /* on error, no reply */ - replyinCnt = 0; - replyout = 0; replyoutCnt = 0; - kr = KERN_SUCCESS; - } else if (reply->length < 2048) { - replyinCnt = reply->length; - memcpy(replyin, reply->data, replyinCnt); - replyout = 0; replyoutCnt = 0; - kr = KERN_SUCCESS; - } else { - replyinCnt = 0; - kr = vm_read(mach_task_self(), - (vm_address_t)reply->data, reply->length, - (vm_address_t *)&replyout, &replyoutCnt); - } - - mheim_ripc_call_reply(s->reply_port, returnvalue, - replyin, replyinCnt, - replyout, replyoutCnt); - - heim_ipc_free_cred(s->cred); - free(s->req.data); - free(s); - restart_timer(); -} - -static void -mach_complete_async(heim_sipc_call ctx, int returnvalue, heim_idata *reply) -{ - struct mach_call_ctx *s = (struct mach_call_ctx *)ctx; - heim_ipc_message_inband_t replyin; - mach_msg_type_number_t replyinCnt; - heim_ipc_message_outband_t replyout; - mach_msg_type_number_t replyoutCnt; - kern_return_t kr; - - if (returnvalue) { - /* on error, no reply */ - replyinCnt = 0; - replyout = 0; replyoutCnt = 0; - kr = KERN_SUCCESS; - } else if (reply->length < 2048) { - replyinCnt = reply->length; - memcpy(replyin, reply->data, replyinCnt); - replyout = 0; replyoutCnt = 0; - kr = KERN_SUCCESS; - } else { - replyinCnt = 0; - kr = vm_read(mach_task_self(), - (vm_address_t)reply->data, reply->length, - (vm_address_t *)&replyout, &replyoutCnt); - } - - kr = mheim_aipc_acall_reply(s->reply_port, returnvalue, - replyin, replyinCnt, - replyout, replyoutCnt); - heim_ipc_free_cred(s->cred); - free(s->req.data); - free(s); - restart_timer(); -} - - -kern_return_t -mheim_do_call(mach_port_t server_port, - audit_token_t client_creds, - mach_port_t reply_port, - heim_ipc_message_inband_t requestin, - mach_msg_type_number_t requestinCnt, - heim_ipc_message_outband_t requestout, - mach_msg_type_number_t requestoutCnt, - int *returnvalue, - heim_ipc_message_inband_t replyin, - mach_msg_type_number_t *replyinCnt, - heim_ipc_message_outband_t *replyout, - mach_msg_type_number_t *replyoutCnt) -{ - heim_sipc ctx = dispatch_get_context(dispatch_get_current_queue()); - struct mach_call_ctx *s; - kern_return_t kr; - uid_t uid; - gid_t gid; - pid_t pid; - au_asid_t session; - - *replyout = NULL; - *replyoutCnt = 0; - *replyinCnt = 0; - - s = malloc(sizeof(*s)); - if (s == NULL) - return KERN_MEMORY_FAILURE; /* XXX */ - - s->reply_port = reply_port; - - audit_token_to_au32(client_creds, NULL, &uid, &gid, NULL, NULL, &pid, &session, NULL); - - kr = _heim_ipc_create_cred(uid, gid, pid, session, &s->cred); - if (kr) { - free(s); - return kr; - } - - suspend_timer(); - - if (requestinCnt) { - s->req.data = malloc(requestinCnt); - memcpy(s->req.data, requestin, requestinCnt); - s->req.length = requestinCnt; - } else { - s->req.data = malloc(requestoutCnt); - memcpy(s->req.data, requestout, requestoutCnt); - s->req.length = requestoutCnt; - } - - dispatch_async(workq, ^{ - (ctx->callback)(ctx->userctx, &s->req, s->cred, - mach_complete_sync, (heim_sipc_call)s); - }); - - return MIG_NO_REPLY; -} - -kern_return_t -mheim_do_call_request(mach_port_t server_port, - audit_token_t client_creds, - mach_port_t reply_port, - heim_ipc_message_inband_t requestin, - mach_msg_type_number_t requestinCnt, - heim_ipc_message_outband_t requestout, - mach_msg_type_number_t requestoutCnt) -{ - heim_sipc ctx = dispatch_get_context(dispatch_get_current_queue()); - struct mach_call_ctx *s; - kern_return_t kr; - uid_t uid; - gid_t gid; - pid_t pid; - au_asid_t session; - - s = malloc(sizeof(*s)); - if (s == NULL) - return KERN_MEMORY_FAILURE; /* XXX */ - - s->reply_port = reply_port; - - audit_token_to_au32(client_creds, NULL, &uid, &gid, NULL, NULL, &pid, &session, NULL); - - kr = _heim_ipc_create_cred(uid, gid, pid, session, &s->cred); - if (kr) { - free(s); - return kr; - } - - suspend_timer(); - - if (requestinCnt) { - s->req.data = malloc(requestinCnt); - memcpy(s->req.data, requestin, requestinCnt); - s->req.length = requestinCnt; - } else { - s->req.data = malloc(requestoutCnt); - memcpy(s->req.data, requestout, requestoutCnt); - s->req.length = requestoutCnt; - } - - dispatch_async(workq, ^{ - (ctx->callback)(ctx->userctx, &s->req, s->cred, - mach_complete_async, (heim_sipc_call)s); - }); - - return KERN_SUCCESS; -} - -static int -mach_init(const char *service, mach_port_t sport, heim_sipc ctx) -{ - struct mach_service *s; - char *name; - - init_globals(); - - s = calloc(1, sizeof(*s)); - if (s == NULL) - return ENOMEM; - - asprintf(&name, "heim-ipc-mach-%s", service); - - s->queue = dispatch_queue_create(name, NULL); - free(name); - s->sport = sport; - - s->source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV, - s->sport, 0, s->queue); - if (s->source == NULL) { - dispatch_release(s->queue); - free(s); - return ENOMEM; - } - ctx->mech = s; - - dispatch_set_context(s->queue, ctx); - dispatch_set_context(s->source, s); - - dispatch_source_set_event_handler(s->source, ^{ - dispatch_mig_server(s->source, sizeof(union __RequestUnion__mheim_do_mheim_ipc_subsystem), mheim_ipc_server); - }); - - dispatch_source_set_cancel_handler(s->source, ^{ - heim_sipc ctx = dispatch_get_context(dispatch_get_current_queue()); - struct mach_service *st = ctx->mech; - mach_port_mod_refs(mach_task_self(), st->sport, - MACH_PORT_RIGHT_RECEIVE, -1); - dispatch_release(st->queue); - dispatch_release(st->source); - free(st); - free(ctx); - }); - - dispatch_resume(s->source); - - return 0; -} - -static int -mach_release(heim_sipc ctx) -{ - struct mach_service *s = ctx->mech; - dispatch_source_cancel(s->source); - dispatch_release(s->source); - return 0; -} - -static mach_port_t -mach_checkin_or_register(const char *service) -{ - mach_port_t mp; - kern_return_t kr; - - kr = bootstrap_check_in(bootstrap_port, service, &mp); - if (kr == KERN_SUCCESS) - return mp; - -#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1050 - /* Pre SnowLeopard version */ - kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &mp); - if (kr != KERN_SUCCESS) - return MACH_PORT_NULL; - - kr = mach_port_insert_right(mach_task_self(), mp, mp, - MACH_MSG_TYPE_MAKE_SEND); - if (kr != KERN_SUCCESS) { - mach_port_destroy(mach_task_self(), mp); - return MACH_PORT_NULL; - } - - kr = bootstrap_register(bootstrap_port, rk_UNCONST(service), mp); - if (kr != KERN_SUCCESS) { - mach_port_destroy(mach_task_self(), mp); - return MACH_PORT_NULL; - } - - return mp; -#else - return MACH_PORT_NULL; -#endif -} - - -#endif /* __APPLE__ && HAVE_GCD */ - - -int -heim_sipc_launchd_mach_init(const char *service, - heim_ipc_callback callback, - void *user, heim_sipc *ctx) -{ -#if defined(__APPLE__) && defined(HAVE_GCD) - mach_port_t sport = MACH_PORT_NULL; - heim_sipc c = NULL; - int ret; - - *ctx = NULL; - - sport = mach_checkin_or_register(service); - if (sport == MACH_PORT_NULL) { - ret = ENOENT; - goto error; - } - - c = calloc(1, sizeof(*c)); - if (c == NULL) { - ret = ENOMEM; - goto error; - } - c->release = mach_release; - c->userctx = user; - c->callback = callback; - - ret = mach_init(service, sport, c); - if (ret) - goto error; - - *ctx = c; - return 0; - error: - if (c) - free(c); - if (sport != MACH_PORT_NULL) - mach_port_mod_refs(mach_task_self(), sport, - MACH_PORT_RIGHT_RECEIVE, -1); - return ret; -#else /* !(__APPLE__ && HAVE_GCD) */ - *ctx = NULL; - return EINVAL; -#endif /* __APPLE__ && HAVE_GCD */ -} - -struct client { - int fd; - heim_ipc_callback callback; - void *userctx; - int flags; -#define LISTEN_SOCKET 1 -#define WAITING_READ 2 -#define WAITING_WRITE 4 -#define WAITING_CLOSE 8 - -#define HTTP_REPLY 16 - -#define INHERIT_MASK 0xffff0000 -#define INCLUDE_ERROR_CODE (1 << 16) -#define ALLOW_HTTP (1<<17) -#define UNIX_SOCKET (1<<18) - unsigned calls; - size_t ptr, len; - uint8_t *inmsg; - size_t olen; - uint8_t *outmsg; -#ifdef HAVE_GCD - dispatch_source_t in; - dispatch_source_t out; -#endif - struct { - uid_t uid; - gid_t gid; - pid_t pid; - } unixrights; -}; - -#ifndef HAVE_GCD -static unsigned num_clients = 0; -static struct client **clients = NULL; -#endif - -static void handle_read(struct client *); -static void handle_write(struct client *); -static int maybe_close(struct client *); - -/* - * Update peer credentials from socket. - * - * SCM_CREDS can only be updated the first time there is read data to - * read from the filedescriptor, so if we read do it before this - * point, the cred data might not be is not there yet. - */ - -static int -update_client_creds(struct client *c) -{ -#ifdef HAVE_GETPEERUCRED - /* Solaris 10 */ - { - ucred_t *peercred; - - if (getpeerucred(c->fd, &peercred) != 0) { - c->unixrights.uid = ucred_geteuid(peercred); - c->unixrights.gid = ucred_getegid(peercred); - c->unixrights.pid = 0; - ucred_free(peercred); - return 1; - } - } -#endif -#ifdef HAVE_GETPEEREID - /* FreeBSD, OpenBSD */ - { - uid_t uid; - gid_t gid; - - if (getpeereid(c->fd, &uid, &gid) == 0) { - c->unixrights.uid = uid; - c->unixrights.gid = gid; - c->unixrights.pid = 0; - return 1; - } - } -#endif -#ifdef SO_PEERCRED - /* Linux */ - { - struct ucred pc; - socklen_t pclen = sizeof(pc); - - if (getsockopt(c->fd, SOL_SOCKET, SO_PEERCRED, (void *)&pc, &pclen) == 0) { - c->unixrights.uid = pc.uid; - c->unixrights.gid = pc.gid; - c->unixrights.pid = pc.pid; - return 1; - } - } -#endif -#if defined(LOCAL_PEERCRED) && defined(XUCRED_VERSION) - { - struct xucred peercred; - socklen_t peercredlen = sizeof(peercred); - - if (getsockopt(c->fd, LOCAL_PEERCRED, 1, - (void *)&peercred, &peercredlen) == 0 - && peercred.cr_version == XUCRED_VERSION) - { - c->unixrights.uid = peercred.cr_uid; - c->unixrights.gid = peercred.cr_gid; - c->unixrights.pid = 0; - return 1; - } - } -#endif -#if defined(SOCKCREDSIZE) && defined(SCM_CREDS) - /* NetBSD */ - if (c->unixrights.uid == (uid_t)-1) { - struct msghdr msg; - socklen_t crmsgsize; - void *crmsg; - struct cmsghdr *cmp; - struct sockcred *sc; - - memset(&msg, 0, sizeof(msg)); - crmsgsize = CMSG_SPACE(SOCKCREDSIZE(NGROUPS)); - if (crmsgsize == 0) - return 1 ; - - crmsg = malloc(crmsgsize); - if (crmsg == NULL) - goto failed_scm_creds; - - memset(crmsg, 0, crmsgsize); - - msg.msg_control = crmsg; - msg.msg_controllen = crmsgsize; - - if (recvmsg(c->fd, &msg, 0) < 0) { - free(crmsg); - goto failed_scm_creds; - } - - if (msg.msg_controllen == 0 || (msg.msg_flags & MSG_CTRUNC) != 0) { - free(crmsg); - goto failed_scm_creds; - } - - cmp = CMSG_FIRSTHDR(&msg); - if (cmp->cmsg_level != SOL_SOCKET || cmp->cmsg_type != SCM_CREDS) { - free(crmsg); - goto failed_scm_creds; - } - - sc = (struct sockcred *)(void *)CMSG_DATA(cmp); - - c->unixrights.uid = sc->sc_euid; - c->unixrights.gid = sc->sc_egid; - c->unixrights.pid = 0; - - free(crmsg); - return 1; - } else { - /* we already got the cred, just return it */ - return 1; - } - failed_scm_creds: -#endif - return 0; -} - - -static struct client * -add_new_socket(int fd, - int flags, - heim_ipc_callback callback, - void *userctx) -{ - struct client *c; - int fileflags; - - c = calloc(1, sizeof(*c)); - if (c == NULL) - return NULL; - - if (flags & LISTEN_SOCKET) { - c->fd = fd; - } else { - c->fd = accept(fd, NULL, NULL); - if(c->fd < 0) { - free(c); - return NULL; - } - } - - c->flags = flags; - c->callback = callback; - c->userctx = userctx; - - fileflags = fcntl(c->fd, F_GETFL, 0); - fcntl(c->fd, F_SETFL, fileflags | O_NONBLOCK); - -#ifdef HAVE_GCD - init_globals(); - - c->in = dispatch_source_create(DISPATCH_SOURCE_TYPE_READ, - c->fd, 0, eventq); - c->out = dispatch_source_create(DISPATCH_SOURCE_TYPE_WRITE, - c->fd, 0, eventq); - - dispatch_source_set_event_handler(c->in, ^{ - int rw = (c->flags & WAITING_WRITE); - handle_read(c); - if (rw == 0 && (c->flags & WAITING_WRITE)) - dispatch_resume(c->out); - if ((c->flags & WAITING_READ) == 0) - dispatch_suspend(c->in); - maybe_close(c); - }); - dispatch_source_set_event_handler(c->out, ^{ - handle_write(c); - if ((c->flags & WAITING_WRITE) == 0) { - dispatch_suspend(c->out); - } - maybe_close(c); - }); - - dispatch_resume(c->in); -#else - clients = erealloc(clients, sizeof(clients[0]) * (num_clients + 1)); - clients[num_clients] = c; - num_clients++; -#endif - - return c; -} - -static int -maybe_close(struct client *c) -{ - if (c->calls != 0) - return 0; - if (c->flags & (WAITING_READ|WAITING_WRITE)) - return 0; - -#ifdef HAVE_GCD - dispatch_source_cancel(c->in); - if ((c->flags & WAITING_READ) == 0) - dispatch_resume(c->in); - dispatch_release(c->in); - - dispatch_source_cancel(c->out); - if ((c->flags & WAITING_WRITE) == 0) - dispatch_resume(c->out); - dispatch_release(c->out); -#endif - close(c->fd); /* ref count fd close */ - free(c); - return 1; -} - - -struct socket_call { - heim_idata in; - struct client *c; - heim_icred cred; -}; - -static void -output_data(struct client *c, const void *data, size_t len) -{ - if (c->olen + len < c->olen) - abort(); - c->outmsg = erealloc(c->outmsg, c->olen + len); - memcpy(&c->outmsg[c->olen], data, len); - c->olen += len; - c->flags |= WAITING_WRITE; -} - -static void -socket_complete(heim_sipc_call ctx, int returnvalue, heim_idata *reply) -{ - struct socket_call *sc = (struct socket_call *)ctx; - struct client *c = sc->c; - - /* double complete ? */ - if (c == NULL) - abort(); - - if ((c->flags & WAITING_CLOSE) == 0) { - uint32_t u32; - - /* length */ - u32 = htonl(reply->length); - output_data(c, &u32, sizeof(u32)); - - /* return value */ - if (c->flags & INCLUDE_ERROR_CODE) { - u32 = htonl(returnvalue); - output_data(c, &u32, sizeof(u32)); - } - - /* data */ - output_data(c, reply->data, reply->length); - - /* if HTTP, close connection */ - if (c->flags & HTTP_REPLY) { - c->flags |= WAITING_CLOSE; - c->flags &= ~WAITING_READ; - } - } - - c->calls--; - if (sc->cred) - heim_ipc_free_cred(sc->cred); - free(sc->in.data); - sc->c = NULL; /* so we can catch double complete */ - free(sc); - - maybe_close(c); -} - -/* remove HTTP %-quoting from buf */ -static int -de_http(char *buf) -{ - unsigned char *p, *q; - for(p = q = (unsigned char *)buf; *p; p++, q++) { - if(*p == '%' && isxdigit(p[1]) && isxdigit(p[2])) { - unsigned int x; - if(sscanf((char *)p + 1, "%2x", &x) != 1) - return -1; - *q = x; - p += 2; - } else - *q = *p; - } - *q = '\0'; - return 0; -} - -static struct socket_call * -handle_http_tcp(struct client *c) -{ - struct socket_call *cs; - char *s, *p, *t; - void *data; - char *proto; - int len; - - s = (char *)c->inmsg; - - p = strstr(s, "\r\n"); - if (p == NULL) - return NULL; - - *p = 0; - - p = NULL; - t = strtok_r(s, " \t", &p); - if (t == NULL) - return NULL; - - t = strtok_r(NULL, " \t", &p); - if (t == NULL) - return NULL; - - data = malloc(strlen(t)); - if (data == NULL) - return NULL; - - if(*t == '/') - t++; - if(de_http(t) != 0) { - free(data); - return NULL; - } - proto = strtok_r(NULL, " \t", &p); - if (proto == NULL) { - free(data); - return NULL; - } - len = base64_decode(t, data); - if(len <= 0){ - const char *msg = - " 404 Not found\r\n" - "Server: Heimdal/" VERSION "\r\n" - "Cache-Control: no-cache\r\n" - "Pragma: no-cache\r\n" - "Content-type: text/html\r\n" - "Content-transfer-encoding: 8bit\r\n\r\n" - "404 Not found\r\n" - "

404 Not found

\r\n" - "That page doesn't exist, maybe you are looking for " - "Heimdal?\r\n"; - free(data); - output_data(c, proto, strlen(proto)); - output_data(c, msg, strlen(msg)); - return NULL; - } - - cs = emalloc(sizeof(*cs)); - cs->c = c; - cs->in.data = data; - cs->in.length = len; - c->ptr = 0; - - { - const char *msg = - " 200 OK\r\n" - "Server: Heimdal/" VERSION "\r\n" - "Cache-Control: no-cache\r\n" - "Pragma: no-cache\r\n" - "Content-type: application/octet-stream\r\n" - "Content-transfer-encoding: binary\r\n\r\n"; - output_data(c, proto, strlen(proto)); - output_data(c, msg, strlen(msg)); - } - - return cs; -} - - -static void -handle_read(struct client *c) -{ - ssize_t len; - uint32_t dlen; - - if (c->flags & LISTEN_SOCKET) { - add_new_socket(c->fd, - WAITING_READ | (c->flags & INHERIT_MASK), - c->callback, - c->userctx); - return; - } - - if (c->ptr - c->len < 1024) { - c->inmsg = erealloc(c->inmsg, - c->len + 1024); - c->len += 1024; - } - - len = read(c->fd, c->inmsg + c->ptr, c->len - c->ptr); - if (len <= 0) { - c->flags |= WAITING_CLOSE; - c->flags &= ~WAITING_READ; - return; - } - c->ptr += len; - if (c->ptr > c->len) - abort(); - - while (c->ptr >= sizeof(dlen)) { - struct socket_call *cs; - - if((c->flags & ALLOW_HTTP) && c->ptr >= 4 && - strncmp((char *)c->inmsg, "GET ", 4) == 0 && - strncmp((char *)c->inmsg + c->ptr - 4, "\r\n\r\n", 4) == 0) { - - /* remove the trailing \r\n\r\n so the string is NUL terminated */ - c->inmsg[c->ptr - 4] = '\0'; - - c->flags |= HTTP_REPLY; - - cs = handle_http_tcp(c); - if (cs == NULL) { - c->flags |= WAITING_CLOSE; - c->flags &= ~WAITING_READ; - break; - } - } else { - memcpy(&dlen, c->inmsg, sizeof(dlen)); - dlen = ntohl(dlen); - - if (dlen > MAX_PACKET_SIZE) { - c->flags |= WAITING_CLOSE; - c->flags &= ~WAITING_READ; - return; - } - if (dlen > c->ptr - sizeof(dlen)) { - break; - } - - cs = emalloc(sizeof(*cs)); - cs->c = c; - cs->in.data = emalloc(dlen); - memcpy(cs->in.data, c->inmsg + sizeof(dlen), dlen); - cs->in.length = dlen; - - c->ptr -= sizeof(dlen) + dlen; - memmove(c->inmsg, - c->inmsg + sizeof(dlen) + dlen, - c->ptr); - } - - c->calls++; - - if ((c->flags & UNIX_SOCKET) != 0) { - if (update_client_creds(c)) - _heim_ipc_create_cred(c->unixrights.uid, c->unixrights.gid, - c->unixrights.pid, -1, &cs->cred); - } - - c->callback(c->userctx, &cs->in, - cs->cred, socket_complete, - (heim_sipc_call)cs); - } -} - -static void -handle_write(struct client *c) -{ - ssize_t len; - - len = write(c->fd, c->outmsg, c->olen); - if (len <= 0) { - c->flags |= WAITING_CLOSE; - c->flags &= ~(WAITING_WRITE); - } else if (c->olen != (size_t)len) { - memmove(&c->outmsg[0], &c->outmsg[len], c->olen - len); - c->olen -= len; - } else { - c->olen = 0; - free(c->outmsg); - c->outmsg = NULL; - c->flags &= ~(WAITING_WRITE); - } -} - - -#ifndef HAVE_GCD - -static void -process_loop(void) -{ - struct pollfd *fds; - unsigned n; - unsigned num_fds; - - while(num_clients > 0) { - - fds = malloc(num_clients * sizeof(fds[0])); - if(fds == NULL) - abort(); - - num_fds = num_clients; - - for (n = 0 ; n < num_fds; n++) { - fds[n].fd = clients[n]->fd; - fds[n].events = 0; - if (clients[n]->flags & WAITING_READ) - fds[n].events |= POLLIN; - if (clients[n]->flags & WAITING_WRITE) - fds[n].events |= POLLOUT; - - fds[n].revents = 0; - } - - poll(fds, num_fds, -1); - - for (n = 0 ; n < num_fds; n++) { - if (clients[n] == NULL) - continue; - if (fds[n].revents & POLLERR) { - clients[n]->flags |= WAITING_CLOSE; - continue; - } - - if (fds[n].revents & POLLIN) - handle_read(clients[n]); - if (fds[n].revents & POLLOUT) - handle_write(clients[n]); - } - - n = 0; - while (n < num_clients) { - struct client *c = clients[n]; - if (maybe_close(c)) { - if (n < num_clients - 1) - clients[n] = clients[num_clients - 1]; - num_clients--; - } else - n++; - } - - free(fds); - } -} - -#endif - -static int -socket_release(heim_sipc ctx) -{ - struct client *c = ctx->mech; - c->flags |= WAITING_CLOSE; - return 0; -} - -int -heim_sipc_stream_listener(int fd, int type, - heim_ipc_callback callback, - void *user, heim_sipc *ctx) -{ - heim_sipc ct = calloc(1, sizeof(*ct)); - struct client *c; - - if ((type & HEIM_SIPC_TYPE_IPC) && (type & (HEIM_SIPC_TYPE_UINT32|HEIM_SIPC_TYPE_HTTP))) - return EINVAL; - - switch (type) { - case HEIM_SIPC_TYPE_IPC: - c = add_new_socket(fd, LISTEN_SOCKET|WAITING_READ|INCLUDE_ERROR_CODE, callback, user); - break; - case HEIM_SIPC_TYPE_UINT32: - c = add_new_socket(fd, LISTEN_SOCKET|WAITING_READ, callback, user); - break; - case HEIM_SIPC_TYPE_HTTP: - case HEIM_SIPC_TYPE_UINT32|HEIM_SIPC_TYPE_HTTP: - c = add_new_socket(fd, LISTEN_SOCKET|WAITING_READ|ALLOW_HTTP, callback, user); - break; - default: - free(ct); - return EINVAL; - } - - ct->mech = c; - ct->release = socket_release; - - c->unixrights.uid = (uid_t) -1; - c->unixrights.gid = (gid_t) -1; - c->unixrights.pid = (pid_t) 0; - - *ctx = ct; - return 0; -} - -int -heim_sipc_service_unix(const char *service, - heim_ipc_callback callback, - void *user, heim_sipc *ctx) -{ - struct sockaddr_un un; - int fd, ret; - - un.sun_family = AF_UNIX; - - snprintf(un.sun_path, sizeof(un.sun_path), - "/var/run/.heim_%s-socket", service); - fd = socket(AF_UNIX, SOCK_STREAM, 0); - if (fd < 0) - return errno; - - socket_set_reuseaddr(fd, 1); -#ifdef LOCAL_CREDS - { - int one = 1; - setsockopt(fd, 0, LOCAL_CREDS, (void *)&one, sizeof(one)); - } -#endif - - unlink(un.sun_path); - - if (bind(fd, (struct sockaddr *)&un, sizeof(un)) < 0) { - close(fd); - return errno; - } - - if (listen(fd, SOMAXCONN) < 0) { - close(fd); - return errno; - } - - chmod(un.sun_path, 0666); - - ret = heim_sipc_stream_listener(fd, HEIM_SIPC_TYPE_IPC, - callback, user, ctx); - if (ret == 0) { - struct client *c = (*ctx)->mech; - c->flags |= UNIX_SOCKET; - } - - return ret; -} - -/** - * Set the idle timeout value - - * The timeout event handler is triggered recurrently every idle - * period `t'. The default action is rather draconian and just calls - * exit(0), so you might want to change this to something more - * graceful using heim_sipc_set_timeout_handler(). - */ - -void -heim_sipc_timeout(time_t t) -{ -#ifdef HAVE_GCD - static dispatch_once_t timeoutonce; - init_globals(); - dispatch_sync(timerq, ^{ - timeoutvalue = t; - set_timer(); - }); - dispatch_once(&timeoutonce, ^{ dispatch_resume(timer); }); -#else - abort(); -#endif -} - -/** - * Set the timeout event handler - * - * Replaces the default idle timeout action. - */ - -void -heim_sipc_set_timeout_handler(void (*func)(void)) -{ -#ifdef HAVE_GCD - init_globals(); - dispatch_sync(timerq, ^{ timer_ev = func; }); -#else - abort(); -#endif -} - - -void -heim_sipc_free_context(heim_sipc ctx) -{ - (ctx->release)(ctx); -} - -void -heim_ipc_main(void) -{ -#ifdef HAVE_GCD - dispatch_main(); -#else - process_loop(); -#endif -} - diff --git a/kerberosV/src/lib/ipc/tc.c b/kerberosV/src/lib/ipc/tc.c deleted file mode 100644 index 8b56d21aa47..00000000000 --- a/kerberosV/src/lib/ipc/tc.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 -#include -#include -#include -#include -#include -#include -#include - -static int help_flag; -static int version_flag; - -static struct getargs args[] = { - { "help", 'h', arg_flag, &help_flag }, - { "version", 'v', arg_flag, &version_flag } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -static void -usage(int ret) -{ - arg_printusage (args, num_args, NULL, ""); - exit (ret); -} - -static void -reply(void *ctx, int errorcode, heim_idata *reply, heim_icred cred) -{ - printf("got reply\n"); - heim_ipc_semaphore_signal((heim_isemaphore)ctx); /* tell caller we are done */ -} - -static void -test_ipc(const char *service) -{ - heim_isemaphore s; - heim_idata req, rep; - heim_ipc ipc; - int ret; - - ret = heim_ipc_init_context(service, &ipc); - if (ret) - errx(1, "heim_ipc_init_context: %d", ret); - - req.length = 0; - req.data = NULL; - - ret = heim_ipc_call(ipc, &req, &rep, NULL); - if (ret) - errx(1, "heim_ipc_call: %d", ret); - - s = heim_ipc_semaphore_create(0); - if (s == NULL) - errx(1, "heim_ipc_semaphore_create"); - - ret = heim_ipc_async(ipc, &req, s, reply); - if (ret) - errx(1, "heim_ipc_async: %d", ret); - - heim_ipc_semaphore_wait(s, HEIM_IPC_WAIT_FOREVER); /* wait for reply to complete the work */ - - heim_ipc_free_context(ipc); -} - - -int -main(int argc, char **argv) -{ - int optidx = 0; - - setprogname(argv[0]); - - if (getarg(args, num_args, argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage(0); - - if (version_flag) { - print_version(NULL); - exit(0); - } - -#ifdef __APPLE__ - test_ipc("MACH:org.h5l.test-ipc"); -#endif - test_ipc("ANY:org.h5l.test-ipc"); - test_ipc("UNIX:org.h5l.test-ipc"); - - return 0; -} diff --git a/kerberosV/src/lib/ipc/ts-http.c b/kerberosV/src/lib/ipc/ts-http.c deleted file mode 100644 index b493079d94a..00000000000 --- a/kerberosV/src/lib/ipc/ts-http.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 -#include -#include -#include -#include -#include - -static int help_flag; -static int version_flag; - -static struct getargs args[] = { - { "help", 'h', arg_flag, &help_flag }, - { "version", 'v', arg_flag, &version_flag } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -static void -usage(int ret) -{ - arg_printusage (args, num_args, NULL, ""); - exit (ret); -} - -static void -test_service(void *ctx, const heim_idata *req, - const heim_icred cred, - heim_ipc_complete complete, - heim_sipc_call cctx) -{ - heim_idata rep; - printf("got request\n"); - rep.length = 3; - rep.data = strdup("hej"); - (*complete)(cctx, 0, &rep); -} - - -static void -setup_sockets(void) -{ - struct addrinfo hints, *res, *res0; - int ret, s; - heim_sipc u; - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE; - ret = getaddrinfo(NULL, "8080", &hints, &res0); - if (ret) - errx(1, "%s", gai_strerror(ret)); - - for (res = res0; res ; res = res->ai_next) { - s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); - if (s < 0) { - warn("socket"); - continue; - } - socket_set_reuseaddr(s, 1); - socket_set_ipv6only(s, 1); - - if (bind(s, res->ai_addr, res->ai_addrlen) < 0) { - warn("bind"); - close(s); - continue; - } - listen(s, 5); - ret = heim_sipc_stream_listener(s, HEIM_SIPC_TYPE_HTTP, - test_service, NULL, &u); - if (ret) - errx(1, "heim_sipc_stream_listener: %d", ret); - } - freeaddrinfo(res0); -} - - -int -main(int argc, char **argv) -{ - int optidx = 0; - - setprogname(argv[0]); - - if (getarg(args, num_args, argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage(0); - - if (version_flag) { - print_version(NULL); - exit(0); - } - - setup_sockets(); - - heim_ipc_main(); - - return 0; -} diff --git a/kerberosV/src/lib/ipc/ts.c b/kerberosV/src/lib/ipc/ts.c deleted file mode 100644 index 680d77bc913..00000000000 --- a/kerberosV/src/lib/ipc/ts.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 -#include -#include -#include -#include -#include - -static int help_flag; -static int version_flag; - -static struct getargs args[] = { - { "help", 'h', arg_flag, &help_flag }, - { "version", 'v', arg_flag, &version_flag } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -static void -usage(int ret) -{ - arg_printusage (args, num_args, NULL, ""); - exit (ret); -} - -static void -test_service(void *ctx, const heim_idata *req, - const heim_icred cred, - heim_ipc_complete complete, - heim_sipc_call cctx) -{ - heim_idata rep; - printf("got request\n"); - rep.length = 0; - rep.data = NULL; - (*complete)(cctx, 0, &rep); -} - - -int -main(int argc, char **argv) -{ - heim_sipc u; - int optidx = 0; - - setprogname(argv[0]); - - if (getarg(args, num_args, argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage(0); - - if (version_flag) { - print_version(NULL); - exit(0); - } - -#if __APPLE__ - { - heim_sipc mach; - heim_sipc_launchd_mach_init("org.h5l.test-ipc", - test_service, NULL, &mach); - } -#endif - heim_sipc_service_unix("org.h5l.test-ipc", - test_service, NULL, &u); - heim_ipc_main(); - - return 0; -} diff --git a/kerberosV/src/lib/kadm5/ChangeLog b/kerberosV/src/lib/kadm5/ChangeLog deleted file mode 100644 index 50168279cf9..00000000000 --- a/kerberosV/src/lib/kadm5/ChangeLog +++ /dev/null @@ -1,1389 +0,0 @@ -2008-04-23 Love Hörnquist Åstrand - - * ipropd_master.c: Only log "sending AYT" once, pointed out by Dr - A V Le Blanc. - - -2008-01-21 Love Hörnquist Åstrand - - * default_keys.c: Use hdb_free_keys(). - -2008-01-11 Love Hörnquist Åstrand - - * Makefile.am: add check-cracklib.pl, flush.c, - sample_passwd_check.c - -2007-12-07 Love Hörnquist Åstrand - - * use hdb_db_dir() and hdb_default_db() - -2007-10-18 Love - - * init_c.c: We are getting default_client, not client. this way - the user can override the result. - -2007-09-29 Love Hörnquist Åstrand - - * iprop.8: fix spelling, From Antoine Jacoutt. - -2007-08-16 Love Hörnquist Åstrand - - * version-script.map: export _kadm5_unmarshal_params, - _kadm5_acl_check_permission - - * version-script.map: export kadm5_log_ symbols. - - * log.c: Unexport the specific log replay operations. - -2007-08-10 Love Hörnquist Åstrand - - * Makefile.am: build sample_passwd_check.la as part of noinst. - - * sample_passwd_check.c: Add missing prototype for check_length(). - -2007-08-07 Love Hörnquist Åstrand - - * log.c: Sprinkle krb5_set_error_string(). - - * ipropd_slave.c: Provide better error why kadm5_log_replay - failed. - -2007-08-06 Love Hörnquist Åstrand - - * ipropd_master.c: - don't push whole database to the new client - every time. - make slaves get the whole new database if they have - a newer log the the master (and thus have them go back in time). - -2007-08-03 Love Hörnquist Åstrand - - * ipropd_slave.c: make more sane. - - * ipropd_slave.c: more paranoid check that the log entires are - self consistant - - * log.c (kadm5_log_foreach): check that the postamble contains the - right data. - - * ipropd_master.c: Sprinkle more info about what versions the - master thinks about the client versions. - - * ipropd_master.c: Start the server at the current version, not 0. - -2007-08-02 Love Hörnquist Åstrand - - * ipropd_master.c: Add more logging, to figure out what is - happening in the master. - -2007-08-01 Love Hörnquist Åstrand - - * Makefile.am: add version-script for libkadm5srv.la - - * version-script.map: version script fro kadm5 server libary. - - * log.c: only free the orignal entries extentions if there was - any. Bug reported by Peter Meinecke. - - * add configuration for signal file and acl file, let user select - hostname, catch signals and print why we are quiting, make nop - cause one new version, not two - -2007-07-30 Love Hörnquist Åstrand - - * ipropd_master.c (send_diffs): make current slave's version - uptodate when diff have been sent. - -2007-07-27 Love Hörnquist Åstrand - - * ipropd_slave.c: More comments and some more error checking. - -2007-07-26 Love Hörnquist Åstrand - - * init_c.c (get_cache_principal): make sure id is reset if we - fail. From Benjamin Bennet. - -2007-07-10 Love Hörnquist Åstrand - - * context_s.c (find_db_spec): match realm-less as the default - realm. - - * Makefile.am: New library version. - -2007-07-05 Love Hörnquist Åstrand - - * context_s.c: Use hdb_get_dbinfo to pick up configuration. - ctx->config.realm can be NULL, check for that, from Bjorn S. - -2007-07-04 Love Hörnquist Åstrand - - * init_c.c: Try harder to use the right principal. - -2007-06-20 Love Hörnquist Åstrand - - * ipropd_slave.c: Catch return value from krb5_program_setup. From - Steven Luo. - -2007-05-08 Love Hörnquist Åstrand - - * delete_s.c: Write log entry after store is successful, rename - out goto statments. - - * randkey_s.c: Write log entry after store is successful. - - * modify_s.c: Write log entry after store is successful. - - * rename_s.c: indent. - - * chpass_s.c: Write log entry after store is successful. - - * create_s.c: Write log entry after store is successful. - -2007-05-07 Love Hörnquist Åstrand - - * iprop-commands.in: Add default values to make this working - again. - - * iprop-log.c (iprop_replay): create the database with more - liberal mode. - - * log.c: make it slightly more working. - - * iprop-log.8: Document last-version. - - * iprop-log.c: (last_version): print last version of the log. - - * iprop-commands.in: new command last-version: print last version - of the log. - - * log.c (kadm5_log_previous): document assumptions and make less - broken. Bug report from Ronny Blomme. - -2007-02-17 Love Hörnquist Åstrand - - * admin.h: add support to get aliases - - * get_s.c: add support to get aliases - -2007-02-11 David Love - - * iprop-log.8: Small fixes, from David Love. - -2006-12-15 Love Hörnquist Åstrand - - * init_c.c: if the user have a kadmin/admin initial ticket, don't - ask for password, just use the credential instead. - -2006-12-06 Love Hörnquist Åstrand - - * ipropd_master.c: Use strcspn to remove \n from string returned - by fgets. From Björn Sandell - -2006-11-30 Love Hörnquist Åstrand - - * init_c.c (kadm_connect): clear error string before trying to - print a errno, this way we don't pick up a random failure code - -2006-11-20 Love Hörnquist Åstrand - - * ipropd_slave.c: Make krb5_get_init_creds_opt_free take a context - argument. - - * init_c.c: Make krb5_get_init_creds_opt_free take a context - argument. - -2006-10-22 Love Hörnquist Åstrand - - * ent_setup.c: Try to not leak memory. - -2006-10-07 Love Hörnquist Åstrand - - * Makefile.am: split build files into dist_ and noinst_ SOURCES - -2006-08-24 Love Hörnquist Åstrand - - * get_s.c: Add KRB5_KDB_ALLOW_DIGEST - - * ent_setup.c: Add KRB5_KDB_ALLOW_DIGEST - - * admin.h: Add KRB5_KDB_ALLOW_DIGEST - -2006-06-16 Love Hörnquist Åstrand - - * check-cracklib.pl: Add password reuse checking. From Harald - Barth. - -2006-06-14 Love Hörnquist Åstrand - - * ent_setup.c (attr_to_flags): Add KRB5_KDB_ALLOW_KERBEROS4 - - * get_s.c (kadm5_s_get_principal): Add KRB5_KDB_ALLOW_KERBEROS4 - - * admin.h: Add KRB5_KDB_ALLOW_KERBEROS4 - -2006-06-06 Love Hörnquist Åstrand - - * ent_setup.c (attr_to_flags): Add KRB5_KDB_TRUSTED_FOR_DELEGATION - -2006-05-30 Love Hörnquist Åstrand - - * password_quality.c (kadm5_check_password_quality): set error - message in context. - -2006-05-13 Love Hörnquist Åstrand - - * iprop-log.c: Avoid shadowing. - - * rename_s.c: Avoid shadowing. - -2006-05-08 Love Hörnquist Åstrand - - * privs_c.c (kadm5_c_get_privs): privs is a uint32_t, let copy it - that way. - -2006-05-05 Love Hörnquist Åstrand - - * Rename u_intXX_t to uintXX_t - -2006-04-27 Love Hörnquist Åstrand - - * chpass_s.c,delete_s.c,get_s.c,log.c,modify_s.c,randkey_s.c,rename_s.c: - Pass in HDB_F_GET_ANY to all ->hdb fetch to hint what entries we are looking for - - * send_recv.c: set and clear error string - - * rename_s.c: Break out the that we request from principal from - the entry and pass it in as a separate argument. - - * randkey_s.c: Break out the that we request from principal from - the entry and pass it in as a separate argument. - - * modify_s.c: Break out the that we request from principal from - the entry and pass it in as a separate argument. - - * log.c: Break out the that we request from principal from the - entry and pass it in as a separate argument. - - * get_s.c: Break out the that we request from principal from the - entry and pass it in as a separate argument. - - * delete_s.c: Break out the that we request from principal from - the entry and pass it in as a separate argument. - - * chpass_s.c: Break out the that we request from principal from - the entry and pass it in as a separate argument. - -2006-04-25 Love Hörnquist Åstrand - - * create_s.c (create_principal*): If client doesn't send kvno, - make sure to set it to 1. - -2006-04-10 Love Hörnquist Åstrand - - * log.c: (kadm5_log_rename): handle errors better - Fixes Coverity, NetBSD CID#628 - - * log.c (kadm5_log_delete): add error handling Coverity, NetBSD - CID#626 - (kadm5_log_modify): add error handling Coverity, NetBSD CID#627 - - * init_c.c (_kadm5_c_get_cred_cache): handle ccache case better in - case no client name was passed in. Coverity, NetBSD CID#919 - - * init_c.c (_kadm5_c_get_cred_cache): Free client principal in - case of error. Coverity NetBSD CID#1908 - -2006-02-02 Love Hörnquist Åstrand - - * kadm5_err.et: (PASS_REUSE): Spelling, - from Václav H?la - -2006-01-25 Love Hörnquist Åstrand - - * send_recv.c: Clear error-string when introducing new errors. - - * *_c.c: Clear error-string when introducing new errors. - -2006-01-15 Love Hörnquist Åstrand - - * Makefile.am (libkadm5clnt.la) doesn't depend on libhdb, remove - dependency - -2005-12-13 Love Hörnquist Åstrand - - * memset hdb_entry_ex before use - -2005-12-12 Love Hörnquist Åstrand - - * Wrap hdb_entry with hdb_entry_ex, patch originally - from Andrew Bartlet - -2005-11-30 Love Hörnquist Åstrand - - * context_s.c (set_field): try another way to calculate the path - to the database/logfile/signal-socket - - * log.c (kadm5_log_init): set error string on failures - -2005-09-08 Love Hörnquist Åstrand - - * Constify password. - - * admin.h: Add KRB5_TL_PKINIT_ACL. - - * marshall.c (_kadm5_unmarshal_params): avoid signed-ness warnings - - * get_s.c (kadm5_s_get_principal): clear error string - -2005-08-25 Love Hörnquist Åstrand - - * iprop-log.8: More text about iprop-log. - -2005-08-24 Love Hörnquist Åstrand - - * iprop.8: SEE ALSO iprop-log. - - * Makefile.am: man_MANS += iprop-log.8 - - * iprop-log.8: Basic for documentation of iprop-log. - - * remove replay_log.c, dump_log.c, and truncate_log.c, folded into - iprop-log. - - * log.c (kadm5_log_foreach): add a context variable and pass it - down to `func´. - - * iprop-commands.in: Move truncate_log and replay_log into - iprop-log. - - * iprop-log.c: Move truncate_log and replay_log into iprop-log. - - * Makefile.am: Move truncate_log and replay_log into iprop-log. - - * Makefile.am: Make this work with a clean directory. - - * ipropd_master.c: Make compile. - - * ipropd_master.c: Update to new signature of kadm5_log_previous. - - * log.c (kadm5_log_previous): catch errors instead of asserting - and set error string. - - * iprop-commands.in: New program iprop-log that incorperates - dump_log as a subcommand, truncate_log and replay_log soon to come - after. - - * iprop-log.c: New program iprop-log that incorperates dump_log as - a subcommand, truncate_log and replay_log soon to come after. - - * Makefile.am: New program iprop-log that incorperates dump_log as - a subcommand, truncate_log and replay_log soon to come after. - -2005-08-11 Love Hörnquist Åstrand - - * get_s.c: Implement KADM5_LAST_PWD_CHANGE. - - * set_keys.c: Set and clear password where appropriate. - - * randkey_s.c: Operation modifies tl_data. - - * log.c (kadm5_log_replay_modify): Check return values of - malloc(), replace all extensions. - - * kadm5_err.et: Make BAD_TL_TYPE error more helpful. - - * get_s.c: Expose KADM5_TL_DATA options to the client. - - * ent_setup.c: Merge in KADM5_TL_DATA in the database. - - * chpass_s.c: Operations modify extensions, mark that with - TL_DATA. - - * admin.h: Add more TL types (password and extension). - -2005-06-17 Love Hörnquist Åstrand - - * constify - - * ipropd_slave.c: avoid shadowing - - * ipropd_master.c: rename local variable slave to s, optind -> - optidx - - * get_princs_c.c: rename variable exp to expression - - * ad.c: rename variable exp to expression - - * log.c: rename shadowing len to num - - * get_princs_s.c: rename variable exp to expression - - * context_s.c: const poison - - * common_glue.c: rename variable exp to expression - -2005-05-30 Love Hörnquist Åstrand - - * ent_setup.c (attr_to_flags): check for KRB5_KDB_OK_AS_DELEGATE - - * get_s.c (kadm5_s_get_principal): set KRB5_KDB_OK_AS_DELEGATE - - * admin.h: add KRB5_KDB_OK_AS_DELEGATE, sync KRB5_TL_ flags - -2005-05-25 Love Hörnquist Åstrand - - * kadm5_pwcheck.3: please mdoclint - -2005-05-25 Dave Love - - * kadm5_pwcheck.3: document kadm5_add_passwd_quality_verifier, - improve text - -2005-05-24 Dave Love - - * iprop.8: Added some info about defaults, fixed some markup. - -2005-05-23 Dave Love - - * ipropd_slave.c: Don't test HAVE_DAEMON since roken supplies it. - - * ipropd_master.c: Don't test HAVE_DAEMON since roken supplies it. - -2005-05-13 Love Hörnquist Åstrand - - * init_c.c (_kadm5_c_init_context): fix memory leak in case of - failure - -2005-05-09 Dave Love - - * password_quality.c (find_func): Fix off-by-one and logic error. - (external_passwd_quality): Improve messages. - - * test_pw_quality.c (main): Call kadm5_setup_passwd_quality_check - and kadm5_add_passwd_quality_verifier. - -2005-04-30 Love Hörnquist Åstrand - - * default_keys.c: #include , only print salt it its longer - then 0, use krb5_err instead of errx where appropriate - -2005-04-25 Love Hörnquist Åstrand - - * ipropd_slave.c: add the documented option --port - - * ipropd_master.c: add the documented option --port - - * dump_log.c: use the newly generated units function - -2005-04-24 Love Hörnquist Åstrand - - * dump_log.c: use strlcpy - - * password_quality.c: don't use sizeof(pointer) - -2005-04-15 Love Hörnquist Åstrand - - * check-cracklib.pl: external password verifier sample - - * password_quality.c (kadm5_add_passwd_quality_verifier): if NULL - is passed in, load defaults - -2005-04-14 Love Hörnquist Åstrand - - * password_quality.c: add an end tag to the external password - quality check protocol - -2005-04-13 Love Hörnquist Åstrand - - * password_quality.c: add external passsword quality check builtin - module - - [password_quality] - policies = external-check - external-program = /bin/false - - To approve password a, make the test program return APPROVED on - stderr and fail with exit code 0. - -2004-10-12 Love Hörnquist Åstrand - - * Makefile.am: bump version to 7:7:0 and 6:5:2 - - * default_keys.c (parse_file): use hdb_generate_key_set - - * keys.c,set_keys.c: Move keyset parsing and password based keyset - generation into hdb. Requested by Andrew Bartlett - for hdb-ldb backend. - -2004-09-23 Johan Danielsson - - * ipropd_master.c: add help strings to some options - -2004-09-12 Love Hörnquist Åstrand - - * chpass_s.c: deal with changed prototype for _kadm5_free_keys - - * keys.c (_kadm5_free_keys): change prototype, make it use - krb5_context instead of a kadm5_server_context - - * set_keys.c (parse_key_set): do way with static returning - (function) static variable and returned allocated memory - (_kadm5_generate_key_set): free enctypes returned by parse_key_set - -2004-09-06 Love Hörnquist Åstrand - - * set_keys.c: Fix memory leak, don't return stack variables From - Andrew Bartlett - - * set_keys.c: make all_etypes const and move outside function to - avoid returning data on stack - -2004-08-26 Love Hörnquist Åstrand - - * acl.c (fetch_acl): use " \t\n" instead of just "\n" for the - delim of the third element, this is so we can match - "foo@REALMall*@REALM", before it just matched - "foo@REALMall*@REALM", but that is kind of lucky since - what really happen was that the last was stamped out, and - the it never strtok_r never needed to parse over it. - -2004-08-25 Love Hörnquist Åstrand - - * set_keys.c (_kadm5_generate_key_set): since arcfour-hmac-md5 is - without salting, some people tries to add the string - "arcfour-hmac-md5" when they really should have used - "arcfour-hmac-md5:pw-salt", help them and add glue for that - -2004-08-18 Johan Danielsson - - * ipropd_slave.c: add --detach - -2004-07-06 Love Hörnquist Åstrand - - * ad.c: use new tsasl interface remove debug printf add upn to - computer-accounts - -2004-06-28 Love Hörnquist Åstrand - - * ad.c: implement kadm5_ad_init_with_password_ctx set more error - strings - -2004-06-21 Love Hörnquist Åstrand - - * Makefile.am: man_MANS = kadm5_pwcheck.3 - - * kadm5_pwcheck.3: document new password quality api - - * password_quality.c: new password check interface (old still - supported) - - * kadm5-pwcheck.h: new password check interface - -2004-06-08 Love Hörnquist Åstrand - - * ipropd_master.c (main): process all slaves, not just up to the - last slave sending data - (bug report from Björn Sandell ) - (*): only send one ARE_YOU_THERE - -2004-06-02 Love Hörnquist Åstrand - - * ad.c: use krb5_set_password_using_ccache - -2004-06-01 Love Hörnquist Åstrand - - * ad.c: try handle spn's better - -2004-05-31 Love Hörnquist Åstrand - - * ad.c: add expiration time - - * ad.c: add modify operations - - * ad.c: handle create and delete - -2004-05-27 Love Hörnquist Åstrand - - * ad.c: more code for get, handle attributes - - * ad.c: more code for get, handle time stamps and bad password - counter - - * ad.c: more code for get, only fetches kvno for now - -2004-05-26 Love Hörnquist Åstrand - - * ad.c: add support for tsasl - - * private.h: add kadm5_ad_context - - * ipropd_master.c (prop_one): store the opcode in the begining of - the blob, not the end - - * ad.c: try all ldap servers in dns, generate a random password, - base64(random_block(64)), XXX must make it support other then - ARCFOUR - - * ad.c: framework for windows AD backend - -2004-03-07 Love Hörnquist Åstrand - - * create_s.c (kadm5_s_create_principal): remove old XXX command - and related code, _kadm5_set_keys will do all this now - -2004-02-29 Love Hörnquist Åstrand - - * set_keys.c (_kadm5_set_keys_randomly): make sure enctype to copy - enctype for des keys From: Andrew Bartlett - - * create_s.c (kadm5_s_create_principal_with_key): don't call - _kadm5_set_keys2, create_principal will do that for us. Set kvno - to 1. - - * chpass_s.c (change): bump kvno - (kadm5_s_chpass_principal_with_key): bump kvno - - * randkey_s.c (kadm5_s_randkey_principal): bump kvno - - * set_keys.c (_kadm5_set_*): don't change the kvno, let the callee - to that - -2003-12-30 Love Hörnquist Åstrand - - * chpass_s.c (change): fix same-password-again by decrypting keys - and setting an error code From: Buck Huppmann - -2003-12-21 Love Hörnquist Åstrand - - * init_c.c (_kadm5_c_init_context): catch errors from strdup and - other krb5_ functions - -2003-12-08 Love Hörnquist Åstrand - - * rename_s.c (kadm5_s_rename_principal): allow principal to change - realm From Panasas Inc - -2003-12-07 Love Hörnquist Åstrand - - * destroy_c.c (kadm5_c_destroy): fix memory leaks, From Panasas, - Inc - -2003-11-23 Love Hörnquist Åstrand - - * iprop.h: don't include - - * ipropd_slave.c: stop using krb5 lib private byte-frobbing - functions and replace them with with krb5_storage - - * ipropd_master.c: stop using krb5 lib private byte-frobbing - functions and replace them with with krb5_storage - -2003-11-19 Love Hörnquist Åstrand - - * ipropd_slave.c (receive_loop): when seeking over the entries we - already have, skip over the trailer. From: Jeffrey Hutzelman - - - * dump_log.c,ipropd_master.c,ipropd_slave.c, - replay_log.c,truncate_log.c: parse kdc.conf - From: Jeffrey Hutzelman - -2003-10-10 Love Hörnquist Åstrand - - * Makefile.am: += test_pw_quality - - * test_pw_quality.c: test program for verifying password quality - function - -2003-09-03 Love Hörnquist Åstrand - - * Makefile.am: add and enable check program default_keys - - * default_keys.c: test program for _kadm5_generate_key_set - - * init_c.c: use - krb5_get_init_creds_opt_alloc/krb5_get_init_creds_opt_free - -2003-08-17 Love Hörnquist Åstrand - - * set_keys.c (_kadm5_set_keys_randomly): remove dup return - - * ipropd_master.c (main): make sure current_version is initialized - -2003-08-15 Love Hörnquist Åstrand - - * set_keys.c: use default_keys for the both random keys and - password derived keys if its defined - -2003-07-24 Love Hörnquist Åstrand - - * ipropd_slave.c (receive_everything): switch close and rename - From: Alf Wachsmann - -2003-07-03 Love Hörnquist Åstrand - - * iprop.h, ipropd_master.c, ipropd_slave.c: - Add probing from the server that the client is still there, also - make the client check that the server is probing. - -2003-07-02 Love Hörnquist Åstrand - - * truncate_log.c (main): add missing ``if (ret)'' - -2003-06-26 Love Hörnquist Åstrand - - * set_keys.c (make_keys): add AES support - - * set_keys.c: fix off by one in the aes case, pointed out by Ken - Raeburn - -2003-04-30 Love Hörnquist Åstrand - - * set_keys.c (_kadm5_set_keys_randomly): add - ETYPE_AES256_CTS_HMAC_SHA1_96 key when configuried with aes - support - -2003-04-16 Love Hörnquist Åstrand - - * send_recv.c: check return values from krb5_data_alloc - * log.c: check return values from krb5_data_alloc - -2003-04-16 Love Hörnquist Åstrand - - * dump_log.c (print_entry): check return values from - krb5_data_alloc - -2003-04-01 Love Hörnquist Åstrand - - * init_c.c (kadm_connect): if a context realm was passed in, use - that to form the kadmin/admin principal - -2003-03-19 Love Hörnquist Åstrand - - * ipropd_master.c (main): make sure we don't consider dead slave - for select processing - (write_stats): use slave_stats_file variable, - check return value of strftime - (args): allow specifying slave stats file - (slave_dead): close the fd when the slave dies - -2002-10-21 Johan Danielsson - - * ipropd_slave.c (from Derrick Brashear): Propagating a large - database without this means the slave kdcs can get erroneous - HDB_NOENTRY and return the resulting errors. This creates a new db - handle, populates it, and moves it into place. - -2002-08-26 Assar Westerlund - - * ipropd_slave.c (receive_everything): type-correctness calling - _krb5_get_int - - * context_s.c (find_db_spec): const-correctness in parameters to - krb5_config_get_next - -2002-08-16 Johan Danielsson - - * private.h: rename header file flag macro - - * Makefile.am: generate kadm5-{protos,private}.h - -2002-08-15 Johan Danielsson - - * ipropd_master.c: check return value of krb5_sockaddr2address - -2002-07-04 Johan Danielsson - - * ipropd_master.c: handle slaves that come and go; add status - reporting (both from Love) - - * iprop.h: KADM5_SLAVE_STATS - -2002-03-25 Jacques Vidrine - - * init_c.c (get_cred_cache): bug fix: the default credentials - cache was not being used if a client name was specified. - -2002-03-25 Johan Danielsson - - * init_c.c (get_cred_cache): when getting the default_client from - the cred cache, make sure the instance part is "admin"; this - should require fewer uses of -p - -2002-03-11 Assar Westerlund - - * Makefile.am (libkadm5srv_la_LDFLAGS): set version to 7:5:0 - (libkadm5clnt_la_LDFLAGS): set version to 6:3:2 - -2002-02-08 Johan Danielsson - - * init_c.c: we have to create our own param struct before - marshaling - -2001-09-05 Johan Danielsson - - * Makefile.am: link with LIB_pidfile - - * iprop.h: include util.h for pidfile - -2001-08-31 Assar Westerlund - - * ipropd_slave.c (main): syslog with the correct name - -2001-08-30 Jacques Vidrine - - * ipropd_slave.c, ipropd_master.c (main): call pidfile - -2001-08-28 Assar Westerlund - - * Makefile.am (libkadm5srv_la_LDFLAGS): set version to 7:4:0 - -2001-08-24 Assar Westerlund - - * acl.c (fetch_acl): do not return bogus flags and re-organize - function - - * Makefile.am: rename variable name to avoid error from current - automake - -2001-08-13 Johan Danielsson - - * set_keys.c: add easier afs configuration, defaulting to the - local realm in lower case; also try to remove duplicate salts - -2001-07-12 Assar Westerlund - - * Makefile.am: add required library dependencies - -2001-07-03 Assar Westerlund - - * Makefile.am (libkadm5clnt_la_LDFLAGS): set version to 6:2:2 - -2001-06-29 Johan Danielsson - - * init_c.c: call krb5_get_init_creds_opt_set_default_flags - -2001-02-19 Johan Danielsson - - * replay_log.c: add --{start-end}-version flags to replay just - part of the log - -2001-02-15 Assar Westerlund - - * ipropd_master.c (main): fix select-loop to decrement ret - correctly. from "Brandon S. Allbery KF8NH" - -2001-01-30 Assar Westerlund - - * Makefile.am: bump versions - -2000-12-31 Assar Westerlund - - * init_s.c (*): handle krb5_init_context failure consistently - * init_c.c (init_context): handle krb5_init_context failure - consistently - -2000-12-11 Assar Westerlund - - * Makefile.am (libkadm5srv_la_LDFLAGS): bump version to 7:2:0 - -2000-11-16 Assar Westerlund - - * set_keys.c (make_keys): clean-up salting loop and try not to - leak memory - - * ipropd_master.c (main): check for fd's being too large to select - on - -2000-08-16 Assar Westerlund - - * Makefile.am (libkadm5srv_la_LDFLAGS): bump version to 7:1:0 - -2000-08-10 Assar Westerlund - - * acl.c (fetch_acl): fix wrong cases, use krb5_principal_match - -2000-08-07 Assar Westerlund - - * ipropd_master.c (main): ignore SIGPIPE - -2000-08-06 Assar Westerlund - - * ipropd_slave.c (receive_everything): make `fd' an int instead of - a pointer. From Derrick J Brashear - -2000-08-04 Johan Danielsson - - * admin.h: change void** to void* - -2000-07-25 Johan Danielsson - - * Makefile.am: bump versions to 7:0:0 and 6:0:2 - -2000-07-24 Assar Westerlund - - * log.c (kadm5_log_get_version): rename kadm5_log_get_version_fd - and make a new that takes a context - (kadm5_log_nop): add logging of missing lengths - (kadm5_log_truncate): new function - - * dump_log.c (print_entry): update and correct - * randkey_s.c: call _kadm5_bump_pw_expire - * truncate_log.c: new program for truncating the log - * Makefile.am (sbin_PROGRAMS): add truncate_log - (C_SOURCES): add bump_pw_expire.c - * bump_pw_expire.c: new function for extending password expiration - -2000-07-22 Assar Westerlund - - * keys.c: new file with _kadm5_free_keys, _kadm5_init_keys - - * set_keys.c (free_keys, init_keys): elevate to internal kadm5 - functions - - * chpass_s.c (kadm5_s_chpass_principal_cond): new function - * Makefile.am (C_SOURCES): add keys.c - * init_c.c: remove unused variable and handle some parameters - being NULL - -2000-07-22 Johan Danielsson - - * ipropd_slave.c: use krb5_read_priv_message - - * ipropd_master.c: use krb5_{read,write}_priv_message - - * init_c.c: use krb5_write_priv_message - -2000-07-11 Johan Danielsson - - * ipropd_slave.c: no need to call gethostname, since - sname_to_principal will - - * send_recv.c: assert that we have a connected socket - - * get_princs_c.c: call _kadm5_connect - - * rename_c.c: call _kadm5_connect - - * randkey_c.c: call _kadm5_connect - - * privs_c.c: call _kadm5_connect - - * modify_c.c: call _kadm5_connect - - * get_c.c: call _kadm5_connect - - * delete_c.c: call _kadm5_connect - - * create_c.c: call _kadm5_connect - - * chpass_c.c: call _kadm5_connect - - * private.h: add more fields to client context; remove prototypes - - * admin.h: remove prototypes - - * kadm5-protos.h: move public prototypes here - - * kadm5-private.h: move private prototypes here - - * init_c.c: break out connection code to separate function, and - defer calling it until we actually do something - -2000-07-07 Assar Westerlund - - * set_keys.c (make_keys): also support `[kadmin]use_v4_salt' for - backwards compatability - -2000-06-26 Johan Danielsson - - * set_keys.c (_kadm5_set_keys): rewrite this to be more easily - adaptable to different salts - -2000-06-19 Johan Danielsson - - * get_s.c: pa_* -> KRB5_PADATA_* - -2000-06-16 Assar Westerlund - - * ipropd_slave.c: change default keytab to default keytab (as in - typically FILE:/etc/krb5.keytab) - -2000-06-08 Assar Westerlund - - * ipropd_slave.c: bug fixes, for actually writing the full dump to - the database. based on a patch from Love - -2000-06-07 Assar Westerlund - - * acl.c: add support for patterns of principals - * log.c (kadm5_log_replay_create): handle more NULL pointers - (should they really happen?) - * log.c (kadm5_log_replay_modify): handle max_life == NULL and - max_renew == NULL - - * ipropd_master.c: use syslog. be less verbose - * ipropd_slave.c: use syslog - -2000-06-05 Assar Westerlund - - * private.h (kadm_ops): add kadm_nop more prototypes - * log.c (kadm5_log_set_version, kadm5_log_reinit, kadm5_log_nop, - kadm5_log_replay_nop): add - * ipropd_slave.c: and some more improvements - * ipropd_master.c: lots of improvements - * iprop.h (IPROP_PORT, IPROP_SERVICE): add - (iprop_cmd): add new commands - - * dump_log.c: add nop - -2000-05-15 Assar Westerlund - - * Makefile.am (libkadm5clnt_la_LDFLAGS): set version to 5:1:1 - -2000-05-12 Assar Westerlund - - * get_s.c (kadm5_s_get_principal): set life, rlife to INT_MAX as a - fallback. handle not having any creator. - * destroy_s.c (kadm5_s_destroy): free all allocated memory - * context_s.c (set_field): free variable if it's already set - (find_db_spec): malloc space for all strings - -2000-04-05 Assar Westerlund - - * Makefile.am (LDADD): add LIB_openldap - -2000-04-03 Assar Westerlund - - * Makefile.am (libkadm5srv_la_LDFLAGS): set version to 6:0:1 - (libkadm5clnt_la_LDFLAGS): set version to 5:0:1 - -2000-03-24 Assar Westerlund - - * set_keys.c (_kadm5_set_keys2): rewrite - (_kadm5_set_keys3): add - - * private.h (struct kadm_func): add chpass_principal_with_key - * init_c.c (set_funcs): add chpass_principal_with_key - -2000-03-23 Assar Westerlund - - * context_s.c (set_funcs): add chpass_principal_with_key - * common_glue.c (kadm5_chpass_principal_with_key): add - * chpass_s.c: comment-ize and change calling convention for - _kadm5_set_keys* - * chpass_c.c (kadm5_c_chpass_principal_with_key): add - -2000-02-07 Assar Westerlund - - * Makefile.am (libkadm5clnt_la_LDFLAGS): set version to 4:2:0 - -2000-01-28 Assar Westerlund - - * init_c.c (get_new_cache): make sure to request non-forwardable, - non-proxiable - -2000-01-06 Assar Westerlund - - * Makefile.am (libkadm5srv.la): bump version to 5:1:0 - - * context_s.c (_kadm5_s_init_context): handle params == NULL - -1999-12-26 Assar Westerlund - - * get_s.c (kadm5_s_get_principal): handle modified_by->principal - == NULL - -1999-12-20 Assar Westerlund - - * Makefile.am (libkadm5clnt_la_LDFLAGS): bump version to 4:1:0 - - * init_c.c (_kadm5_c_init_context): handle getting back port - number from admin host - (kadm5_c_init_with_context): remove `proto/' part before doing - getaddrinfo() - -1999-12-06 Assar Westerlund - - * Makefile.am: bump version to 5:0:0 and 4:0:0 - - * init_c.c (kadm5_c_init_with_context): don't use unitialized - stuff - -1999-12-04 Assar Westerlund - - * replay_log.c: adapt to changed kadm5_log_foreach - - * log.c (kadm5_log_foreach): change to take a - `kadm5_server_context' - - * init_c.c: use krb5_warn{,x} - - * dump_log.c: adapt to changed kadm5_log_foreach - - * init_c.c: re-write to use getaddrinfo - * Makefile.am (install-build-headers): add dependency - -1999-12-03 Johan Danielsson - - * log.c (kadm5_log_foreach): pass context - - * dump_log.c: print more interesting things - -1999-12-02 Johan Danielsson - - * ipropd_master.c (process_msg): check for short reads - -1999-11-25 Assar Westerlund - - * modify_s.c (kadm5_s_modify_principal): support key_data - (kadm5_s_modify_principal_with_key): remove - - * admin.h (kadm5_s_modify_principal_with_key): remove - -1999-11-20 Assar Westerlund - - * context_s.c (find_db_spec): ugly cast work-around. - -1999-11-14 Assar Westerlund - - * context_s.c (_kadm5_s_init_context): call krb5_add_et_list so - that we aren't dependent on the layout of krb5_context_data - * init_c.c (_kadm5_c_init_context): call krb5_add_et_list so that - we aren't dependent on the layout of krb5_context_data - -1999-11-13 Assar Westerlund - - * password_quality.c (kadm5_setup_passwd_quality_check): use - correct types for function pointers - -1999-11-09 Johan Danielsson - - * randkey_s.c: always bail out if the fetch fails - - * admin.h (kadm5_config_params): remove fields we're not using - - * ipropd_slave.c: allow passing a realm - - * ipropd_master.c: allow passing a realm - - * dump_log.c: allow passing a realm - - * acl.c: correctly get acl file - - * private.h (kadm5_server_context): add config_params struct and - remove acl_file; bump protocol version number - - * marshall.c: marshalling of config parameters - - * init_c.c (kadm5_c_init_with_context): try to cope with old - servers - - * init_s.c (kadm5_s_init_with_context): actually use some passed - values - - * context_s.c (_kadm5_s_init_context): get dbname, acl_file, and - stash_file from the config parameters, try to figure out these if - they're not provided - -1999-11-05 Assar Westerlund - - * Makefile.am (install-build-headers): use `cp' instead of - INSTALL_DATA - -1999-11-04 Assar Westerlund - - * Makefile.am: bump version to 4:0:0 and 3:0:0 (they access fields - directly in libkrb5's context - bad functions) - - * set_keys.c (_kadm5_set_keys_randomly): set enctypes correctly in - the copied keys - -1999-10-20 Assar Westerlund - - * Makefile.am: set version of kadm5srv to 3:0:2 (new password - quality functions). - set version of kdam5clnt to 2:1:1 (no interface changes) - - * Makefile.am (LDADD): add $(LIB_dlopen) - -1999-10-17 Assar Westerlund - - * randkey_s.c (kadm5_s_randkey_principal): use - _kadm5_set_keys_randomly - - * set_keys.c (free_keys): free more memory - (_kadm5_set_keys): a little bit more generic - (_kadm5_set_keys_randomly): new function for setting random keys. - -1999-10-14 Assar Westerlund - - * set_keys.c (_kadm5_set_keys): ignore old keys when setting new - ones and always add 3 DES keys and one 3DES key - -1999-10-03 Assar Westerlund - - * init_c.c (_kadm5_c_init_context): use `krb5_get_krb_admin_hst'. - check return value from strdup - -1999-09-26 Assar Westerlund - - * acl.c (_kadm5_privs_to_string): forgot one strcpy_truncate -> - strlcpy - -1999-09-24 Johan Danielsson - - * dump_log.c: remove unused `optind' - - * replay_log.c: remove unused `optind' - -1999-09-13 Assar Westerlund - - * chpass_c.c (kadm5_c_chpass_principal): new _kadm5_client_recv - - * send_recv.c (_kadm5_client_recv): return result in a `krb5_data' - so that we avoid copying it and don't need to dimension in - advance. change all callers. - -1999-09-10 Assar Westerlund - - * password_quality.c: new file - - * admin.h - (kadm5_setup_passwd_quality_check,kadm5_check_password_quality): - add prototypes - - * Makefile.am (S_SOURCES): add password_quality.c - -1999-07-26 Assar Westerlund - - * Makefile.am: update versions to 2:0:1 - -1999-07-24 Assar Westerlund - - * ent_setup.c (_kadm5_setup_entry): make princ_expire_time == 0 - and pw_expiration == 0 mean never - -1999-07-22 Assar Westerlund - - * log.c (kadm5_log_flush): extra cast - -1999-07-07 Assar Westerlund - - * marshall.c (store_principal_ent): encoding princ_expire_time and - pw_expiration in correct order - -1999-06-28 Assar Westerlund - - * randkey_s.c (kadm5_s_randkey_principal): nuke old mkvno, - otherwise hdb will think that the new random keys are already - encrypted which will cause lots of confusion later. - -1999-06-23 Assar Westerlund - - * ent_setup.c (_kadm5_setup_entry): handle 0 == unlimited - correctly. From Michal Vocu - -1999-06-15 Assar Westerlund - - * init_c.c (get_cred_cache): use get_default_username - -1999-05-23 Assar Westerlund - - * create_s.c (create_principal): if there's no default entry the - mask should be zero. - -1999-05-21 Assar Westerlund - - * init_c.c (get_cred_cache): use $USERNAME - -1999-05-17 Johan Danielsson - - * init_c.c (get_cred_cache): figure out principal - -1999-05-05 Johan Danielsson - - * send_recv.c: cleanup _kadm5_client_{send,recv} - -1999-05-04 Assar Westerlund - - * set_keys.c (_kadm5_set_keys2): don't check the recently created - memory for NULL pointers - - * private.h (_kadm5_setup_entry): change prototype - - * modify_s.c: call new _kadm5_setup_entry - - * ent_setup.c (_kadm5_setup_entry): change so that it takes three - masks, one for what bits to set and one for each of principal and - def containing the bits that are set there. - - * create_s.c: call new _kadm5_setup_entry - - * create_s.c (get_default): check return value - (create_principal): send wider mask to _kadm5_setup_entry - -1999-05-04 Johan Danielsson - - * send_recv.c (_kadm5_client_recv): handle arbitrarily sized - packets, check for errors - - * get_c.c: check for failure from _kadm5_client_{send,recv} - -1999-05-04 Assar Westerlund - - * init_c.c (get_new_cache): don't abort when interrupted from - password prompt - - * destroy_c.c (kadm5_c_destroy): check if we should destroy the - auth context - -1999-05-03 Johan Danielsson - - * chpass_s.c: fix arguments to _kadm5_set_keys2 - - * private.h: proto - - * set_keys.c: clear mkvno - - * rename_s.c: add flags to fetch and store; seal keys before - logging - - * randkey_s.c: add flags to fetch and store; seal keys before - logging - - * modify_s.c: add flags to fetch and store; seal keys before - logging - - * log.c: add flags to fetch and store; seal keys before logging - - * get_s.c: add flags to fetch and store; seal keys before logging - - * get_princs_s.c: add flags to fetch and store; seal keys before - logging - - * delete_s.c: add flags to fetch and store; seal keys before - logging - - * create_s.c: add flags to fetch and store; seal keys before - logging - - * chpass_s.c: add flags to fetch and store; seal keys before - logging - - * Makefile.am: remove server.c - - * admin.h: add prototypes - - * ent_setup.c (_kadm5_setup_entry): set key_data - - * set_keys.c: add _kadm5_set_keys2 to sey keys from key_data - - * modify_s.c: add kadm5_s_modify_principal_with_key - - * create_s.c: add kadm5_s_create_principal_with_key - - * chpass_s.c: add kadm5_s_chpass_principal_with_key - - * kadm5_locl.h: move stuff to private.h - - * private.h: move stuff from kadm5_locl.h - diff --git a/kerberosV/src/lib/kadm5/Makefile.am b/kerberosV/src/lib/kadm5/Makefile.am deleted file mode 100644 index 8c7653fcf98..00000000000 --- a/kerberosV/src/lib/kadm5/Makefile.am +++ /dev/null @@ -1,197 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:43 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -lib_LTLIBRARIES = libkadm5srv.la libkadm5clnt.la -libkadm5srv_la_LDFLAGS = -version-info 8:1:0 -libkadm5clnt_la_LDFLAGS = -version-info 7:1:0 - -if versionscript -libkadm5srv_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -endif - -sbin_PROGRAMS = iprop-log -check_PROGRAMS = default_keys -noinst_PROGRAMS = test_pw_quality - -noinst_LTLIBRARIES = sample_passwd_check.la - -sample_passwd_check_la_SOURCES = sample_passwd_check.c -sample_passwd_check_la_LDFLAGS = -module - -libkadm5srv_la_LIBADD = \ - $(LIB_com_err) ../krb5/libkrb5.la \ - ../hdb/libhdb.la $(LIBADD_roken) -libkadm5clnt_la_LIBADD = \ - $(LIB_com_err) ../krb5/libkrb5.la $(LIBADD_roken) - -libexec_PROGRAMS = ipropd-master ipropd-slave - -default_keys_SOURCES = default_keys.c - -kadm5includedir = $(includedir)/kadm5 -buildkadm5include = $(buildinclude)/kadm5 - -dist_kadm5include_HEADERS = admin.h private.h kadm5-pwcheck.h -dist_kadm5include_HEADERS += kadm5-protos.h kadm5-private.h - -nodist_kadm5include_HEADERS = kadm5_err.h - -install-build-headers:: $(dist_kadm5include_HEADERS) $(nodist_kadm5include_HEADERS) - @foo='$(dist_kadm5include_HEADERS) $(nodist_kadm5include_HEADERS)'; \ - 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 $(buildkadm5include)/$$f 2> /dev/null ; then \ - : ; else \ - echo "cp $$file $(buildkadm5include)/$$f";\ - cp $$file $(buildkadm5include)/$$f; \ - fi ; \ - done - -dist_libkadm5clnt_la_SOURCES = \ - ad.c \ - chpass_c.c \ - client_glue.c \ - common_glue.c \ - create_c.c \ - delete_c.c \ - destroy_c.c \ - flush_c.c \ - free.c \ - get_c.c \ - get_princs_c.c \ - init_c.c \ - kadm5_locl.h \ - marshall.c \ - modify_c.c \ - private.h \ - privs_c.c \ - randkey_c.c \ - rename_c.c \ - send_recv.c \ - admin.h - -nodist_libkadm5clnt_la_SOURCES = \ - kadm5_err.c \ - kadm5_err.h - -dist_libkadm5srv_la_SOURCES = \ - acl.c \ - admin.h \ - bump_pw_expire.c \ - chpass_s.c \ - common_glue.c \ - context_s.c \ - create_s.c \ - delete_s.c \ - destroy_s.c \ - ent_setup.c \ - error.c \ - flush_s.c \ - free.c \ - get_princs_s.c \ - get_s.c \ - init_s.c \ - kadm5_locl.h \ - keys.c \ - log.c \ - marshall.c \ - modify_s.c \ - password_quality.c \ - private.h \ - privs_s.c \ - randkey_s.c \ - rename_s.c \ - server_glue.c \ - set_keys.c \ - set_modifier.c \ - admin.h - -nodist_libkadm5srv_la_SOURCES = \ - kadm5_err.c \ - kadm5_err.h - -libkadm5srv_la_DEPENDENCIES = \ - version-script.map - -dist_iprop_log_SOURCES = iprop-log.c -nodist_iprop_log_SOURCES = iprop-commands.c - -ipropd_master_SOURCES = ipropd_master.c ipropd_common.c iprop.h kadm5_locl.h - -ipropd_slave_SOURCES = ipropd_slave.c ipropd_common.c iprop.h kadm5_locl.h - -man_MANS = kadm5_pwcheck.3 iprop.8 iprop-log.8 - -LDADD = \ - libkadm5srv.la \ - $(top_builddir)/lib/hdb/libhdb.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(DBLIB) \ - $(LIB_dlopen) \ - $(LIB_pidfile) - -iprop_log_LDADD = \ - libkadm5srv.la \ - $(top_builddir)/lib/hdb/libhdb.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/sl/libsl.la \ - $(LIB_readline) \ - $(LIB_roken) \ - $(DBLIB) \ - $(LIB_dlopen) \ - $(LIB_pidfile) - - -iprop-commands.c iprop-commands.h: iprop-commands.in - $(SLC) $(srcdir)/iprop-commands.in - -$(libkadm5srv_la_OBJECTS): kadm5_err.h -$(iprop_log_OBJECTS): iprop-commands.h - -client_glue.lo server_glue.lo: $(srcdir)/common_glue.c - -CLEANFILES = kadm5_err.c kadm5_err.h iprop-commands.h iprop-commands.c - -# to help stupid solaris make - -kadm5_err.h: kadm5_err.et - -$(libkadm5clnt_la_OBJECTS) $(libkadm5srv_la_OBJECTS): $(srcdir)/kadm5-protos.h $(srcdir)/kadm5-private.h - -proto_opts = -q -R '^(_|kadm5_c_|kadm5_s_|kadm5_log)' -P comment -$(srcdir)/kadm5-protos.h: - cd $(srcdir); perl ../../cf/make-proto.pl $(proto_opts) \ - -o kadm5-protos.h \ - $(dist_libkadm5clnt_la_SOURCES) \ - $(dist_libkadm5srv_la_SOURCES) \ - || rm -f kadm5-protos.h - -$(srcdir)/kadm5-private.h: - cd $(srcdir); perl ../../cf/make-proto.pl $(proto_opts) \ - -p kadm5-private.h \ - $(dist_libkadm5clnt_la_SOURCES) \ - $(dist_libkadm5srv_la_SOURCES) \ - || rm -f kadm5-private.h - -EXTRA_DIST = \ - NTMakefile \ - iprop-log-version.rc \ - ipropd-master-version.rc \ - ipropd-slave-version.rc \ - libkadm5srv-version.rc \ - libkadm5srv-exports.def \ - kadm5_err.et \ - iprop-commands.in \ - $(man_MANS) \ - check-cracklib.pl \ - flush.c \ - sample_passwd_check.c \ - version-script.map diff --git a/kerberosV/src/lib/kadm5/Makefile.in b/kerberosV/src/lib/kadm5/Makefile.in deleted file mode 100644 index 8e2509e73f3..00000000000 --- a/kerberosV/src/lib/kadm5/Makefile.in +++ /dev/null @@ -1,1476 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:43 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:43 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:43 robert Exp $ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(dist_kadm5include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -@versionscript_TRUE@am__append_1 = $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -sbin_PROGRAMS = iprop-log$(EXEEXT) -check_PROGRAMS = default_keys$(EXEEXT) -noinst_PROGRAMS = test_pw_quality$(EXEEXT) -libexec_PROGRAMS = ipropd-master$(EXEEXT) ipropd-slave$(EXEEXT) -subdir = lib/kadm5 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" \ - "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man3dir)" \ - "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(kadm5includedir)" \ - "$(DESTDIR)$(kadm5includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -libkadm5clnt_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - ../krb5/libkrb5.la $(am__DEPENDENCIES_1) -dist_libkadm5clnt_la_OBJECTS = ad.lo chpass_c.lo client_glue.lo \ - common_glue.lo create_c.lo delete_c.lo destroy_c.lo flush_c.lo \ - free.lo get_c.lo get_princs_c.lo init_c.lo marshall.lo \ - modify_c.lo privs_c.lo randkey_c.lo rename_c.lo send_recv.lo -nodist_libkadm5clnt_la_OBJECTS = kadm5_err.lo -libkadm5clnt_la_OBJECTS = $(dist_libkadm5clnt_la_OBJECTS) \ - $(nodist_libkadm5clnt_la_OBJECTS) -libkadm5clnt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libkadm5clnt_la_LDFLAGS) $(LDFLAGS) -o $@ -dist_libkadm5srv_la_OBJECTS = acl.lo bump_pw_expire.lo chpass_s.lo \ - common_glue.lo context_s.lo create_s.lo delete_s.lo \ - destroy_s.lo ent_setup.lo error.lo flush_s.lo free.lo \ - get_princs_s.lo get_s.lo init_s.lo keys.lo log.lo marshall.lo \ - modify_s.lo password_quality.lo privs_s.lo randkey_s.lo \ - rename_s.lo server_glue.lo set_keys.lo set_modifier.lo -nodist_libkadm5srv_la_OBJECTS = kadm5_err.lo -libkadm5srv_la_OBJECTS = $(dist_libkadm5srv_la_OBJECTS) \ - $(nodist_libkadm5srv_la_OBJECTS) -libkadm5srv_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libkadm5srv_la_LDFLAGS) $(LDFLAGS) -o $@ -sample_passwd_check_la_LIBADD = -am_sample_passwd_check_la_OBJECTS = sample_passwd_check.lo -sample_passwd_check_la_OBJECTS = $(am_sample_passwd_check_la_OBJECTS) -sample_passwd_check_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(sample_passwd_check_la_LDFLAGS) $(LDFLAGS) -o $@ -PROGRAMS = $(libexec_PROGRAMS) $(noinst_PROGRAMS) $(sbin_PROGRAMS) -am_default_keys_OBJECTS = default_keys.$(OBJEXT) -default_keys_OBJECTS = $(am_default_keys_OBJECTS) -default_keys_LDADD = $(LDADD) -default_keys_DEPENDENCIES = libkadm5srv.la \ - $(top_builddir)/lib/hdb/libhdb.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -dist_iprop_log_OBJECTS = iprop-log.$(OBJEXT) -nodist_iprop_log_OBJECTS = iprop-commands.$(OBJEXT) -iprop_log_OBJECTS = $(dist_iprop_log_OBJECTS) \ - $(nodist_iprop_log_OBJECTS) -iprop_log_DEPENDENCIES = libkadm5srv.la \ - $(top_builddir)/lib/hdb/libhdb.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/sl/libsl.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_ipropd_master_OBJECTS = ipropd_master.$(OBJEXT) \ - ipropd_common.$(OBJEXT) -ipropd_master_OBJECTS = $(am_ipropd_master_OBJECTS) -ipropd_master_LDADD = $(LDADD) -ipropd_master_DEPENDENCIES = libkadm5srv.la \ - $(top_builddir)/lib/hdb/libhdb.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_ipropd_slave_OBJECTS = ipropd_slave.$(OBJEXT) \ - ipropd_common.$(OBJEXT) -ipropd_slave_OBJECTS = $(am_ipropd_slave_OBJECTS) -ipropd_slave_LDADD = $(LDADD) -ipropd_slave_DEPENDENCIES = libkadm5srv.la \ - $(top_builddir)/lib/hdb/libhdb.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -test_pw_quality_SOURCES = test_pw_quality.c -test_pw_quality_OBJECTS = test_pw_quality.$(OBJEXT) -test_pw_quality_LDADD = $(LDADD) -test_pw_quality_DEPENDENCIES = libkadm5srv.la \ - $(top_builddir)/lib/hdb/libhdb.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(dist_libkadm5clnt_la_SOURCES) \ - $(nodist_libkadm5clnt_la_SOURCES) \ - $(dist_libkadm5srv_la_SOURCES) \ - $(nodist_libkadm5srv_la_SOURCES) \ - $(sample_passwd_check_la_SOURCES) $(default_keys_SOURCES) \ - $(dist_iprop_log_SOURCES) $(nodist_iprop_log_SOURCES) \ - $(ipropd_master_SOURCES) $(ipropd_slave_SOURCES) \ - test_pw_quality.c -DIST_SOURCES = $(dist_libkadm5clnt_la_SOURCES) \ - $(dist_libkadm5srv_la_SOURCES) \ - $(sample_passwd_check_la_SOURCES) $(default_keys_SOURCES) \ - $(dist_iprop_log_SOURCES) $(ipropd_master_SOURCES) \ - $(ipropd_slave_SOURCES) test_pw_quality.c -man3dir = $(mandir)/man3 -man8dir = $(mandir)/man8 -MANS = $(man_MANS) -HEADERS = $(dist_kadm5include_HEADERS) $(nodist_kadm5include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -lib_LTLIBRARIES = libkadm5srv.la libkadm5clnt.la -libkadm5srv_la_LDFLAGS = -version-info 8:1:0 $(am__append_1) -libkadm5clnt_la_LDFLAGS = -version-info 7:1:0 -noinst_LTLIBRARIES = sample_passwd_check.la -sample_passwd_check_la_SOURCES = sample_passwd_check.c -sample_passwd_check_la_LDFLAGS = -module -libkadm5srv_la_LIBADD = \ - $(LIB_com_err) ../krb5/libkrb5.la \ - ../hdb/libhdb.la $(LIBADD_roken) - -libkadm5clnt_la_LIBADD = \ - $(LIB_com_err) ../krb5/libkrb5.la $(LIBADD_roken) - -default_keys_SOURCES = default_keys.c -kadm5includedir = $(includedir)/kadm5 -buildkadm5include = $(buildinclude)/kadm5 -dist_kadm5include_HEADERS = admin.h private.h kadm5-pwcheck.h \ - kadm5-protos.h kadm5-private.h -nodist_kadm5include_HEADERS = kadm5_err.h -dist_libkadm5clnt_la_SOURCES = \ - ad.c \ - chpass_c.c \ - client_glue.c \ - common_glue.c \ - create_c.c \ - delete_c.c \ - destroy_c.c \ - flush_c.c \ - free.c \ - get_c.c \ - get_princs_c.c \ - init_c.c \ - kadm5_locl.h \ - marshall.c \ - modify_c.c \ - private.h \ - privs_c.c \ - randkey_c.c \ - rename_c.c \ - send_recv.c \ - admin.h - -nodist_libkadm5clnt_la_SOURCES = \ - kadm5_err.c \ - kadm5_err.h - -dist_libkadm5srv_la_SOURCES = \ - acl.c \ - admin.h \ - bump_pw_expire.c \ - chpass_s.c \ - common_glue.c \ - context_s.c \ - create_s.c \ - delete_s.c \ - destroy_s.c \ - ent_setup.c \ - error.c \ - flush_s.c \ - free.c \ - get_princs_s.c \ - get_s.c \ - init_s.c \ - kadm5_locl.h \ - keys.c \ - log.c \ - marshall.c \ - modify_s.c \ - password_quality.c \ - private.h \ - privs_s.c \ - randkey_s.c \ - rename_s.c \ - server_glue.c \ - set_keys.c \ - set_modifier.c \ - admin.h - -nodist_libkadm5srv_la_SOURCES = \ - kadm5_err.c \ - kadm5_err.h - -libkadm5srv_la_DEPENDENCIES = \ - version-script.map - -dist_iprop_log_SOURCES = iprop-log.c -nodist_iprop_log_SOURCES = iprop-commands.c -ipropd_master_SOURCES = ipropd_master.c ipropd_common.c iprop.h kadm5_locl.h -ipropd_slave_SOURCES = ipropd_slave.c ipropd_common.c iprop.h kadm5_locl.h -man_MANS = kadm5_pwcheck.3 iprop.8 iprop-log.8 -LDADD = \ - libkadm5srv.la \ - $(top_builddir)/lib/hdb/libhdb.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_hcrypto) \ - $(LIB_roken) \ - $(DBLIB) \ - $(LIB_dlopen) \ - $(LIB_pidfile) - -iprop_log_LDADD = \ - libkadm5srv.la \ - $(top_builddir)/lib/hdb/libhdb.la \ - $(top_builddir)/lib/krb5/libkrb5.la \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/sl/libsl.la \ - $(LIB_readline) \ - $(LIB_roken) \ - $(DBLIB) \ - $(LIB_dlopen) \ - $(LIB_pidfile) - -CLEANFILES = kadm5_err.c kadm5_err.h iprop-commands.h iprop-commands.c -proto_opts = -q -R '^(_|kadm5_c_|kadm5_s_|kadm5_log)' -P comment -EXTRA_DIST = \ - NTMakefile \ - iprop-log-version.rc \ - ipropd-master-version.rc \ - ipropd-slave-version.rc \ - libkadm5srv-version.rc \ - libkadm5srv-exports.def \ - kadm5_err.et \ - iprop-commands.in \ - $(man_MANS) \ - check-cracklib.pl \ - flush.c \ - sample_passwd_check.c \ - version-script.map - -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/kadm5/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/kadm5/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libkadm5clnt.la: $(libkadm5clnt_la_OBJECTS) $(libkadm5clnt_la_DEPENDENCIES) - $(libkadm5clnt_la_LINK) -rpath $(libdir) $(libkadm5clnt_la_OBJECTS) $(libkadm5clnt_la_LIBADD) $(LIBS) -libkadm5srv.la: $(libkadm5srv_la_OBJECTS) $(libkadm5srv_la_DEPENDENCIES) - $(libkadm5srv_la_LINK) -rpath $(libdir) $(libkadm5srv_la_OBJECTS) $(libkadm5srv_la_LIBADD) $(LIBS) -sample_passwd_check.la: $(sample_passwd_check_la_OBJECTS) $(sample_passwd_check_la_DEPENDENCIES) - $(sample_passwd_check_la_LINK) $(sample_passwd_check_la_OBJECTS) $(sample_passwd_check_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -install-libexecPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexecPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexecdir)" && rm -f $$files - -clean-libexecPROGRAMS: - @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -install-sbinPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" - @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-sbinPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(sbindir)" && rm -f $$files - -clean-sbinPROGRAMS: - @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -default_keys$(EXEEXT): $(default_keys_OBJECTS) $(default_keys_DEPENDENCIES) - @rm -f default_keys$(EXEEXT) - $(LINK) $(default_keys_OBJECTS) $(default_keys_LDADD) $(LIBS) -iprop-log$(EXEEXT): $(iprop_log_OBJECTS) $(iprop_log_DEPENDENCIES) - @rm -f iprop-log$(EXEEXT) - $(LINK) $(iprop_log_OBJECTS) $(iprop_log_LDADD) $(LIBS) -ipropd-master$(EXEEXT): $(ipropd_master_OBJECTS) $(ipropd_master_DEPENDENCIES) - @rm -f ipropd-master$(EXEEXT) - $(LINK) $(ipropd_master_OBJECTS) $(ipropd_master_LDADD) $(LIBS) -ipropd-slave$(EXEEXT): $(ipropd_slave_OBJECTS) $(ipropd_slave_DEPENDENCIES) - @rm -f ipropd-slave$(EXEEXT) - $(LINK) $(ipropd_slave_OBJECTS) $(ipropd_slave_LDADD) $(LIBS) -test_pw_quality$(EXEEXT): $(test_pw_quality_OBJECTS) $(test_pw_quality_DEPENDENCIES) - @rm -f test_pw_quality$(EXEEXT) - $(LINK) $(test_pw_quality_OBJECTS) $(test_pw_quality_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ad.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bump_pw_expire.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chpass_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chpass_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client_glue.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common_glue.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/context_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/default_keys.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delete_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/destroy_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/destroy_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ent_setup.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flush_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flush_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/free.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_princs_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_princs_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iprop-commands.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iprop-log.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipropd_common.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipropd_master.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipropd_slave.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kadm5_err.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keys.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marshall.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modify_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modify_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/password_quality.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privs_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privs_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randkey_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randkey_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename_c.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename_s.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample_passwd_check.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send_recv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server_glue.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_keys.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set_modifier.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pw_quality.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man3: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list=''; test -n "$(man3dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ - done; } - -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man3dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } -install-dist_kadm5includeHEADERS: $(dist_kadm5include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(kadm5includedir)" || $(MKDIR_P) "$(DESTDIR)$(kadm5includedir)" - @list='$(dist_kadm5include_HEADERS)'; test -n "$(kadm5includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(kadm5includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(kadm5includedir)" || exit $$?; \ - done - -uninstall-dist_kadm5includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(dist_kadm5include_HEADERS)'; test -n "$(kadm5includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(kadm5includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(kadm5includedir)" && rm -f $$files -install-nodist_kadm5includeHEADERS: $(nodist_kadm5include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(kadm5includedir)" || $(MKDIR_P) "$(DESTDIR)$(kadm5includedir)" - @list='$(nodist_kadm5include_HEADERS)'; test -n "$(kadm5includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(kadm5includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(kadm5includedir)" || exit $$?; \ - done - -uninstall-nodist_kadm5includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_kadm5include_HEADERS)'; test -n "$(kadm5includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(kadm5includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(kadm5includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS) \ - all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(kadm5includedir)" "$(DESTDIR)$(kadm5includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libexecPROGRAMS clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS clean-sbinPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-dist_kadm5includeHEADERS install-man \ - install-nodist_kadm5includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES install-libexecPROGRAMS \ - install-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man3 install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-dist_kadm5includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-libexecPROGRAMS \ - uninstall-man uninstall-nodist_kadm5includeHEADERS \ - uninstall-sbinPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man3 uninstall-man8 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libexecPROGRAMS clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS clean-sbinPROGRAMS ctags dist-hook \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook \ - install-dist_kadm5includeHEADERS install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-libexecPROGRAMS install-man \ - install-man3 install-man8 install-nodist_kadm5includeHEADERS \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-sbinPROGRAMS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-dist_kadm5includeHEADERS \ - uninstall-hook uninstall-libLTLIBRARIES \ - uninstall-libexecPROGRAMS uninstall-man uninstall-man3 \ - uninstall-man8 uninstall-nodist_kadm5includeHEADERS \ - uninstall-sbinPROGRAMS - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -install-build-headers:: $(dist_kadm5include_HEADERS) $(nodist_kadm5include_HEADERS) - @foo='$(dist_kadm5include_HEADERS) $(nodist_kadm5include_HEADERS)'; \ - 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 $(buildkadm5include)/$$f 2> /dev/null ; then \ - : ; else \ - echo "cp $$file $(buildkadm5include)/$$f";\ - cp $$file $(buildkadm5include)/$$f; \ - fi ; \ - done - -iprop-commands.c iprop-commands.h: iprop-commands.in - $(SLC) $(srcdir)/iprop-commands.in - -$(libkadm5srv_la_OBJECTS): kadm5_err.h -$(iprop_log_OBJECTS): iprop-commands.h - -client_glue.lo server_glue.lo: $(srcdir)/common_glue.c - -# to help stupid solaris make - -kadm5_err.h: kadm5_err.et - -$(libkadm5clnt_la_OBJECTS) $(libkadm5srv_la_OBJECTS): $(srcdir)/kadm5-protos.h $(srcdir)/kadm5-private.h -$(srcdir)/kadm5-protos.h: - cd $(srcdir); perl ../../cf/make-proto.pl $(proto_opts) \ - -o kadm5-protos.h \ - $(dist_libkadm5clnt_la_SOURCES) \ - $(dist_libkadm5srv_la_SOURCES) \ - || rm -f kadm5-protos.h - -$(srcdir)/kadm5-private.h: - cd $(srcdir); perl ../../cf/make-proto.pl $(proto_opts) \ - -p kadm5-private.h \ - $(dist_libkadm5clnt_la_SOURCES) \ - $(dist_libkadm5srv_la_SOURCES) \ - || rm -f kadm5-private.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/kerberosV/src/lib/kadm5/NTMakefile b/kerberosV/src/lib/kadm5/NTMakefile deleted file mode 100644 index 3afe8e89954..00000000000 --- a/kerberosV/src/lib/kadm5/NTMakefile +++ /dev/null @@ -1,273 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=lib\kadm5 - -!include ../../windows/NTMakefile.w32 - -dist_libkadm5clnt_la_SOURCES = \ - ad.c \ - chpass_c.c \ - client_glue.c \ - common_glue.c \ - create_c.c \ - delete_c.c \ - destroy_c.c \ - flush_c.c \ - free.c \ - get_c.c \ - get_princs_c.c \ - init_c.c \ - kadm5_locl.h \ - marshall.c \ - modify_c.c \ - private.h \ - privs_c.c \ - randkey_c.c \ - rename_c.c \ - send_recv.c \ - kadm5-pwcheck.h \ - admin.h - -dist_libkadm5srv_la_SOURCES = \ - acl.c \ - admin.h \ - bump_pw_expire.c \ - chpass_s.c \ - common_glue.c \ - context_s.c \ - create_s.c \ - delete_s.c \ - destroy_s.c \ - ent_setup.c \ - error.c \ - flush_s.c \ - free.c \ - get_princs_s.c \ - get_s.c \ - init_s.c \ - kadm5_locl.h \ - keys.c \ - log.c \ - marshall.c \ - modify_s.c \ - password_quality.c \ - private.h \ - privs_s.c \ - randkey_s.c \ - rename_s.c \ - server_glue.c \ - set_keys.c \ - set_modifier.c \ - kadm5-pwcheck.h \ - admin.h - -LIBKADM5CLNT_OBJS= \ - $(OBJ)\ad.obj \ - $(OBJ)\chpass_c.obj \ - $(OBJ)\client_glue.obj \ - $(OBJ)\common_glue.obj \ - $(OBJ)\create_c.obj \ - $(OBJ)\delete_c.obj \ - $(OBJ)\destroy_c.obj \ - $(OBJ)\flush_c.obj \ - $(OBJ)\free.obj \ - $(OBJ)\get_c.obj \ - $(OBJ)\get_princs_c.obj \ - $(OBJ)\init_c.obj \ - $(OBJ)\marshall.obj \ - $(OBJ)\modify_c.obj \ - $(OBJ)\privs_c.obj \ - $(OBJ)\randkey_c.obj \ - $(OBJ)\rename_c.obj \ - $(OBJ)\send_recv.obj \ - $(OBJ)\kadm5_err.obj - -LIBKADM5SRV_OBJS= \ - $(OBJ)\acl.obj \ - $(OBJ)\bump_pw_expire.obj \ - $(OBJ)\chpass_s.obj \ - $(OBJ)\common_glue.obj \ - $(OBJ)\context_s.obj \ - $(OBJ)\create_s.obj \ - $(OBJ)\delete_s.obj \ - $(OBJ)\destroy_s.obj \ - $(OBJ)\ent_setup.obj \ - $(OBJ)\error.obj \ - $(OBJ)\flush_s.obj \ - $(OBJ)\free.obj \ - $(OBJ)\get_princs_s.obj \ - $(OBJ)\get_s.obj \ - $(OBJ)\init_s.obj \ - $(OBJ)\keys.obj \ - $(OBJ)\log.obj \ - $(OBJ)\marshall.obj \ - $(OBJ)\modify_s.obj \ - $(OBJ)\password_quality.obj \ - $(OBJ)\privs_s.obj \ - $(OBJ)\randkey_s.obj \ - $(OBJ)\rename_s.obj \ - $(OBJ)\server_glue.obj \ - $(OBJ)\set_keys.obj \ - $(OBJ)\set_modifier.obj \ - $(OBJ)\kadm5_err.obj - - -proto_opts = -q -R "^(_|kadm5_c_|kadm5_s_|kadm5_log)" -P remove - -$(OBJ)\kadm5-protos.h: $(dist_libkadm5srv_la_SOURCES) $(dist_libkadm5clnt_la_SOURCES) - $(PERL) ..\..\cf\make-proto.pl $(proto_opts) \ - -o $@ \ - $(dist_libkadm5srv_la_SOURCES) \ - $(dist_libkadm5clnt_la_SOURCES) \ - || $(RM) $@ - -$(OBJ)\kadm5-private.h: $(dist_libkadm5srv_la_SOURCES) $(dist_libkadm5clnt_la_SOURCES) - $(PERL) ..\..\cf\make-proto.pl $(proto_opts) \ - -p $@ \ - $(dist_libkadm5srv_la_SOURCES) \ - $(dist_libkadm5clnt_la_SOURCES) \ - || $(RM) $@ - -$(OBJ)\iprop-commands.c $(OBJ)\iprop-commands.h: iprop-commands.in - cd $(OBJ) - $(CP) $(SRCDIR)\iprop-commands.in $(OBJ) - $(BINDIR)\slc.exe iprop-commands.in - cd $(SRCDIR) - -$(OBJ)\kadm5_err.h $(OBJ)kadm5_err.c: kadm5_err.et - cd $(OBJ) - $(BINDIR)\compile_et.exe $(SRCDIR)\kadm5_err.et - cd $(SRCDIR) - -$(KADM5INCDIR)\kadm5_err.h: $(OBJ)\kadm5_err.h - -KADM5INCDIR=$(INCDIR)\kadm5 - -INCFILES=\ - $(KADM5INCDIR)\kadm5_err.h \ - $(KADM5INCDIR)\admin.h \ - $(KADM5INCDIR)\private.h \ - $(KADM5INCDIR)\kadm5-protos.h \ - $(KADM5INCDIR)\kadm5-private.h \ - $(OBJ)\iprop-commands.h - -SBINPROGRAMS=$(SBINDIR)\iprop-log.exe - -LIBEXECPROGRAMS=$(LIBEXECDIR)\ipropd-master.exe $(LIBEXECDIR)\ipropd-slave.exe - -EXELIBDEPS= \ - $(LIBKADM5SRV) \ - $(LIBROKEN) \ - $(LIBHEIMDAL) \ - $(LIBHDB) \ - $(LIBSQLITE) \ - $(LIBSL) \ - $(LIBCOMERR) \ - $(LIBVERS) - -$(SBINDIR)\iprop-log.exe: $(OBJ)\iprop-log.obj $(OBJ)\iprop-commands.obj $(EXELIBDEPS) \ - $(OBJ)\iprop-log-version.res - $(EXECONLINK) - $(EXEPREP) - -$(LIBEXECDIR)\ipropd-master.exe: $(OBJ)\ipropd_master.obj $(OBJ)\ipropd_common.obj \ - $(EXELIBDEPS) $(OBJ)\ipropd-master-version.res - $(EXECONLINK) - $(EXEPREP) - -$(LIBEXECDIR)\ipropd-slave.exe: $(OBJ)\ipropd_slave.obj $(OBJ)\ipropd_common.obj \ - $(EXELIBDEPS) $(OBJ)\ipropd-slave-version.res - $(EXECONLINK) - $(EXEPREP) - -$(LIBKADM5CLNT): $(LIBKADM5CLNT_OBJS) - $(LIBCON) - -LIBKADM5SRVRES=$(OBJ)\libkadm5srv-version.res - -$(LIBKADM5SRV): $(BINDIR)\libkadm5srv.dll - -$(BINDIR)\libkadm5srv.dll: $(LIBKADM5SRV_OBJS) $(LIBHEIMDAL) $(LIBROKEN) $(LIBHDB) $(LIBCOMERR) $(LIBSQLITE) $(LIBKADM5SRVRES) - $(DLLGUILINK) -implib:$(LIBKADM5SRV) -def:libkadm5srv-exports.def - $(DLLPREP) - -all:: $(INCFILES) $(LIBKADM5SRV) $(LIBKADM5CLNT) - -all-tools:: $(SBINPROGRAMS) $(LIBEXECPROGRAMS) - -clean:: - -$(RM) $(INCFILES) - -$(RM) $(LIBKADM5CLNT) - -$(RM) $(LIBKADM5SRV) - -$(RM) $(BINDIR)\libkadm5srv.* - -$(RM) $(SBINPROGRAMS:.exe=.*) - -$(RM) $(LIBEXECPROGRAMS:.exe=.*) - -test:: test-binaries test-run - -test-binaries: \ - $(OBJ)\default_keys.exe \ - $(OBJ)\test_pw_quality.exe \ - $(OBJ)\sample_passwd_check.dll - -$(OBJ)\default_keys.exe: $(OBJ)\default_keys.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBHDB) - $(EXECONLINK) - $(EXEPREP_NODIST) - -$(OBJ)\test_pw_quality.exe: $(OBJ)\test_pw_quality.obj \ - $(LIBROKEN) $(LIBKADM5SRV) $(LIBVERS) $(LIBHEIMDAL) - $(EXECONLINK) - $(EXEPREP_NODIST) - -$(OBJ)\sample_passwd_check.dll: $(OBJ)\sample_passwd_check.obj $(LIBHEIMDAL) - $(DLLGUILINK) /DEF:<< -EXPORTS - version DATA - check_length -<< - $(DLLPREP_NODIST) - -test-run: - -{$(OBJ)}.h{$(KADM5INCDIR)}.h: - $(CP) $< $@ - -{}.h{$(KADM5INCDIR)}.h: - $(CP) $< $@ - -{}.c{$(OBJ)}.obj:: - $(C2OBJ_P) -I$(OBJ) -I$(KADM5INCDIR) - -test-exports: - $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libkadm5srv-exports.def - -test:: test-exports diff --git a/kerberosV/src/lib/kadm5/acl.c b/kerberosV/src/lib/kadm5/acl.c deleted file mode 100644 index 68a68af4275..00000000000 --- a/kerberosV/src/lib/kadm5/acl.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "kadm5_locl.h" - -RCSID("$Id: acl.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -static struct units acl_units[] = { - { "all", KADM5_PRIV_ALL }, - { "change-password",KADM5_PRIV_CPW }, - { "cpw", KADM5_PRIV_CPW }, - { "list", KADM5_PRIV_LIST }, - { "delete", KADM5_PRIV_DELETE }, - { "modify", KADM5_PRIV_MODIFY }, - { "add", KADM5_PRIV_ADD }, - { "get", KADM5_PRIV_GET }, - { NULL, 0 } -}; - -kadm5_ret_t -_kadm5_string_to_privs(const char *s, uint32_t* privs) -{ - int flags; - flags = parse_flags(s, acl_units, 0); - if(flags < 0) - return KADM5_FAILURE; - *privs = flags; - return 0; -} - -kadm5_ret_t -_kadm5_privs_to_string(uint32_t privs, char *string, size_t len) -{ - if(privs == 0) - strlcpy(string, "none", len); - else - unparse_flags(privs, acl_units + 1, string, len); - return 0; -} - -/* - * retrieve the right for the current caller on `princ' (NULL means all) - * and store them in `ret_flags' - * return 0 or an error. - */ - -static kadm5_ret_t -fetch_acl (kadm5_server_context *context, - krb5_const_principal princ, - unsigned *ret_flags) -{ - FILE *f; - krb5_error_code ret = 0; - char buf[256]; - - *ret_flags = 0; - - /* no acl file -> no rights */ - f = fopen(context->config.acl_file, "r"); - if (f == NULL) - return 0; - - while(fgets(buf, sizeof(buf), f) != NULL) { - char *foo = NULL, *p; - krb5_principal this_princ; - unsigned flags = 0; - - p = strtok_r(buf, " \t\n", &foo); - if(p == NULL) - continue; - if (*p == '#') /* comment */ - continue; - ret = krb5_parse_name(context->context, p, &this_princ); - if(ret) - break; - if(!krb5_principal_compare(context->context, - context->caller, this_princ)) { - krb5_free_principal(context->context, this_princ); - continue; - } - krb5_free_principal(context->context, this_princ); - p = strtok_r(NULL, " \t\n", &foo); - if(p == NULL) - continue; - ret = _kadm5_string_to_privs(p, &flags); - if (ret) - break; - p = strtok_r(NULL, " \t\n", &foo); - if (p == NULL) { - *ret_flags = flags; - break; - } - if (princ != NULL) { - krb5_principal pattern_princ; - krb5_boolean match; - - ret = krb5_parse_name (context->context, p, &pattern_princ); - if (ret) - break; - match = krb5_principal_match (context->context, - princ, pattern_princ); - krb5_free_principal (context->context, pattern_princ); - if (match) { - *ret_flags = flags; - break; - } - } - } - fclose(f); - return ret; -} - -/* - * set global acl flags in `context' for the current caller. - * return 0 on success or an error - */ - -kadm5_ret_t -_kadm5_acl_init(kadm5_server_context *context) -{ - krb5_principal princ; - krb5_error_code ret; - - ret = krb5_parse_name(context->context, KADM5_ADMIN_SERVICE, &princ); - if (ret) - return ret; - ret = krb5_principal_compare(context->context, context->caller, princ); - krb5_free_principal(context->context, princ); - if(ret != 0) { - context->acl_flags = KADM5_PRIV_ALL; - return 0; - } - - return fetch_acl (context, NULL, &context->acl_flags); -} - -/* - * check if `flags' allows `op' - * return 0 if OK or an error - */ - -static kadm5_ret_t -check_flags (unsigned op, - unsigned flags) -{ - unsigned res = ~flags & op; - - if(res & KADM5_PRIV_GET) - return KADM5_AUTH_GET; - if(res & KADM5_PRIV_ADD) - return KADM5_AUTH_ADD; - if(res & KADM5_PRIV_MODIFY) - return KADM5_AUTH_MODIFY; - if(res & KADM5_PRIV_DELETE) - return KADM5_AUTH_DELETE; - if(res & KADM5_PRIV_CPW) - return KADM5_AUTH_CHANGEPW; - if(res & KADM5_PRIV_LIST) - return KADM5_AUTH_LIST; - if(res) - return KADM5_AUTH_INSUFFICIENT; - return 0; -} - -/* - * return 0 if the current caller in `context' is allowed to perform - * `op' on `princ' and otherwise an error - * princ == NULL if it's not relevant. - */ - -kadm5_ret_t -_kadm5_acl_check_permission(kadm5_server_context *context, - unsigned op, - krb5_const_principal princ) -{ - kadm5_ret_t ret; - unsigned princ_flags; - - ret = check_flags (op, context->acl_flags); - if (ret == 0) - return ret; - ret = fetch_acl (context, princ, &princ_flags); - if (ret) - return ret; - return check_flags (op, princ_flags); -} diff --git a/kerberosV/src/lib/kadm5/ad.c b/kerberosV/src/lib/kadm5/ad.c deleted file mode 100644 index 732fc721ab3..00000000000 --- a/kerberosV/src/lib/kadm5/ad.c +++ /dev/null @@ -1,1444 +0,0 @@ -/* - * Copyright (c) 2004 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. - */ - -#define HAVE_TSASL 1 - -#include "kadm5_locl.h" -#if 1 -#undef OPENLDAP -#undef HAVE_TSASL -#endif -#ifdef OPENLDAP -#include -#ifdef HAVE_TSASL -#include -#endif -#include -#include -#endif - -RCSID("$Id: ad.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -#ifdef OPENLDAP - -#define CTX2LP(context) ((LDAP *)((context)->ldap_conn)) -#define CTX2BASE(context) ((context)->base_dn) - -/* - * userAccountControl - */ - -#define UF_SCRIPT 0x00000001 -#define UF_ACCOUNTDISABLE 0x00000002 -#define UF_UNUSED_0 0x00000004 -#define UF_HOMEDIR_REQUIRED 0x00000008 -#define UF_LOCKOUT 0x00000010 -#define UF_PASSWD_NOTREQD 0x00000020 -#define UF_PASSWD_CANT_CHANGE 0x00000040 -#define UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED 0x00000080 -#define UF_TEMP_DUPLICATE_ACCOUNT 0x00000100 -#define UF_NORMAL_ACCOUNT 0x00000200 -#define UF_UNUSED_1 0x00000400 -#define UF_INTERDOMAIN_TRUST_ACCOUNT 0x00000800 -#define UF_WORKSTATION_TRUST_ACCOUNT 0x00001000 -#define UF_SERVER_TRUST_ACCOUNT 0x00002000 -#define UF_UNUSED_2 0x00004000 -#define UF_UNUSED_3 0x00008000 -#define UF_PASSWD_NOT_EXPIRE 0x00010000 -#define UF_MNS_LOGON_ACCOUNT 0x00020000 -#define UF_SMARTCARD_REQUIRED 0x00040000 -#define UF_TRUSTED_FOR_DELEGATION 0x00080000 -#define UF_NOT_DELEGATED 0x00100000 -#define UF_USE_DES_KEY_ONLY 0x00200000 -#define UF_DONT_REQUIRE_PREAUTH 0x00400000 -#define UF_UNUSED_4 0x00800000 -#define UF_UNUSED_5 0x01000000 -#define UF_UNUSED_6 0x02000000 -#define UF_UNUSED_7 0x04000000 -#define UF_UNUSED_8 0x08000000 -#define UF_UNUSED_9 0x10000000 -#define UF_UNUSED_10 0x20000000 -#define UF_UNUSED_11 0x40000000 -#define UF_UNUSED_12 0x80000000 - -/* - * - */ - -#ifndef HAVE_TSASL -static int -sasl_interact(LDAP *ld, unsigned flags, void *defaults, void *interact) -{ - return LDAP_SUCCESS; -} -#endif - -#if 0 -static Sockbuf_IO ldap_tsasl_io = { - NULL, /* sbi_setup */ - NULL, /* sbi_remove */ - NULL, /* sbi_ctrl */ - NULL, /* sbi_read */ - NULL, /* sbi_write */ - NULL /* sbi_close */ -}; -#endif - -#ifdef HAVE_TSASL -static int -ldap_tsasl_bind_s(LDAP *ld, - LDAP_CONST char *dn, - LDAPControl **serverControls, - LDAPControl **clientControls, - const char *host) -{ - char *attrs[] = { "supportedSASLMechanisms", NULL }; - struct tsasl_peer *peer = NULL; - struct tsasl_buffer in, out; - struct berval ccred, *scred; - LDAPMessage *m, *m0; - const char *mech; - char **vals; - int ret, rc; - - ret = tsasl_peer_init(TSASL_FLAGS_INITIATOR | TSASL_FLAGS_CLEAR, - "ldap", host, &peer); - if (ret != TSASL_DONE) { - rc = LDAP_LOCAL_ERROR; - goto out; - } - - rc = ldap_search_s(ld, "", LDAP_SCOPE_BASE, NULL, attrs, 0, &m0); - if (rc != LDAP_SUCCESS) - goto out; - - m = ldap_first_entry(ld, m0); - if (m == NULL) { - ldap_msgfree(m0); - goto out; - } - - vals = ldap_get_values(ld, m, "supportedSASLMechanisms"); - if (vals == NULL) { - ldap_msgfree(m0); - goto out; - } - - ret = tsasl_find_best_mech(peer, vals, &mech); - if (ret) { - ldap_msgfree(m0); - goto out; - } - - ldap_msgfree(m0); - - ret = tsasl_select_mech(peer, mech); - if (ret != TSASL_DONE) { - rc = LDAP_LOCAL_ERROR; - goto out; - } - - in.tb_data = NULL; - in.tb_size = 0; - - do { - ret = tsasl_request(peer, &in, &out); - if (in.tb_size != 0) { - free(in.tb_data); - in.tb_data = NULL; - in.tb_size = 0; - } - if (ret != TSASL_DONE && ret != TSASL_CONTINUE) { - rc = LDAP_AUTH_UNKNOWN; - goto out; - } - - ccred.bv_val = out.tb_data; - ccred.bv_len = out.tb_size; - - rc = ldap_sasl_bind_s(ld, dn, mech, &ccred, - serverControls, clientControls, &scred); - tsasl_buffer_free(&out); - - if (rc != LDAP_SUCCESS && rc != LDAP_SASL_BIND_IN_PROGRESS) { - if(scred && scred->bv_len) - ber_bvfree(scred); - goto out; - } - - in.tb_data = malloc(scred->bv_len); - if (in.tb_data == NULL) { - rc = LDAP_LOCAL_ERROR; - goto out; - } - memcpy(in.tb_data, scred->bv_val, scred->bv_len); - in.tb_size = scred->bv_len; - ber_bvfree(scred); - - } while (rc == LDAP_SASL_BIND_IN_PROGRESS); - - out: - if (rc == LDAP_SUCCESS) { -#if 0 - ber_sockbuf_add_io(ld->ld_conns->lconn_sb, &ldap_tsasl_io, - LBER_SBIOD_LEVEL_APPLICATION, peer); - -#endif - } else if (peer != NULL) - tsasl_peer_free(peer); - - return rc; -} -#endif /* HAVE_TSASL */ - - -static int -check_ldap(kadm5_ad_context *context, int ret) -{ - switch (ret) { - case LDAP_SUCCESS: - return 0; - case LDAP_SERVER_DOWN: { - LDAP *lp = CTX2LP(context); - ldap_unbind(lp); - context->ldap_conn = NULL; - free(context->base_dn); - context->base_dn = NULL; - return 1; - } - default: - return 1; - } -} - -/* - * - */ - -static void -laddattr(char ***al, int *attrlen, char *attr) -{ - char **a; - a = realloc(*al, (*attrlen + 2) * sizeof(**al)); - if (a == NULL) - return; - a[*attrlen] = attr; - a[*attrlen + 1] = NULL; - (*attrlen)++; - *al = a; -} - -static kadm5_ret_t -_kadm5_ad_connect(void *server_handle) -{ - kadm5_ad_context *context = server_handle; - struct { - char *server; - int port; - } *s, *servers = NULL; - int i, num_servers = 0; - - if (context->ldap_conn) - return 0; - - { - struct dns_reply *r; - struct resource_record *rr; - char *domain; - - asprintf(&domain, "_ldap._tcp.%s", context->realm); - if (domain == NULL) { - krb5_set_error_message(context->context, KADM5_NO_SRV, "malloc"); - return KADM5_NO_SRV; - } - - r = dns_lookup(domain, "SRV"); - free(domain); - if (r == NULL) { - krb5_set_error_message(context->context, KADM5_NO_SRV, "Didn't find ldap dns"); - return KADM5_NO_SRV; - } - - for (rr = r->head ; rr != NULL; rr = rr->next) { - if (rr->type != rk_ns_t_srv) - continue; - s = realloc(servers, sizeof(*servers) * (num_servers + 1)); - if (s == NULL) { - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "malloc"); - dns_free_data(r); - goto fail; - } - servers = s; - num_servers++; - servers[num_servers - 1].port = rr->u.srv->port; - servers[num_servers - 1].server = strdup(rr->u.srv->target); - } - dns_free_data(r); - } - - if (num_servers == 0) { - krb5_set_error_message(context->context, KADM5_NO_SRV, "No AD server found in DNS"); - return KADM5_NO_SRV; - } - - for (i = 0; i < num_servers; i++) { - int lret, version = LDAP_VERSION3; - LDAP *lp; - - lp = ldap_init(servers[i].server, servers[i].port); - if (lp == NULL) - continue; - - if (ldap_set_option(lp, LDAP_OPT_PROTOCOL_VERSION, &version)) { - ldap_unbind(lp); - continue; - } - - if (ldap_set_option(lp, LDAP_OPT_REFERRALS, LDAP_OPT_OFF)) { - ldap_unbind(lp); - continue; - } - -#ifdef HAVE_TSASL - lret = ldap_tsasl_bind_s(lp, NULL, NULL, NULL, servers[i].server); - -#else - lret = ldap_sasl_interactive_bind_s(lp, NULL, NULL, NULL, NULL, - LDAP_SASL_QUIET, - sasl_interact, NULL); -#endif - if (lret != LDAP_SUCCESS) { - krb5_set_error_message(context->context, 0, - "Couldn't contact any AD servers: %s", - ldap_err2string(lret)); - ldap_unbind(lp); - continue; - } - - context->ldap_conn = lp; - break; - } - if (i >= num_servers) { - goto fail; - } - - { - LDAPMessage *m, *m0; - char **attr = NULL; - int attrlen = 0; - char **vals; - int ret; - - laddattr(&attr, &attrlen, "defaultNamingContext"); - - ret = ldap_search_s(CTX2LP(context), "", LDAP_SCOPE_BASE, - "objectclass=*", attr, 0, &m); - free(attr); - if (check_ldap(context, ret)) - goto fail; - - if (ldap_count_entries(CTX2LP(context), m) > 0) { - m0 = ldap_first_entry(CTX2LP(context), m); - if (m0 == NULL) { - krb5_set_error_message(context->context, KADM5_RPC_ERROR, - "Error in AD ldap responce"); - ldap_msgfree(m); - goto fail; - } - vals = ldap_get_values(CTX2LP(context), - m0, "defaultNamingContext"); - if (vals == NULL) { - krb5_set_error_message(context->context, KADM5_RPC_ERROR, - "No naming context found"); - goto fail; - } - context->base_dn = strdup(vals[0]); - } else - goto fail; - ldap_msgfree(m); - } - - for (i = 0; i < num_servers; i++) - free(servers[i].server); - free(servers); - - return 0; - - fail: - for (i = 0; i < num_servers; i++) - free(servers[i].server); - free(servers); - - if (context->ldap_conn) { - ldap_unbind(CTX2LP(context)); - context->ldap_conn = NULL; - } - return KADM5_RPC_ERROR; -} - -#define NTTIME_EPOCH 0x019DB1DED53E8000LL - -static time_t -nt2unixtime(const char *str) -{ - unsigned long long t; - t = strtoll(str, NULL, 10); - t = ((t - NTTIME_EPOCH) / (long long)10000000); - if (t > (((time_t)(~(long long)0)) >> 1)) - return 0; - return (time_t)t; -} - -static long long -unix2nttime(time_t unix_time) -{ - long long wt; - wt = unix_time * (long long)10000000 + (long long)NTTIME_EPOCH; - return wt; -} - -/* XXX create filter in a better way */ - -static int -ad_find_entry(kadm5_ad_context *context, - const char *fqdn, - const char *pn, - char **name) -{ - LDAPMessage *m, *m0; - char *attr[] = { "distinguishedName", NULL }; - char *filter; - int ret; - - if (name) - *name = NULL; - - if (fqdn) - asprintf(&filter, - "(&(objectClass=computer)(|(dNSHostName=%s)(servicePrincipalName=%s)))", - fqdn, pn); - else if(pn) - asprintf(&filter, "(&(objectClass=account)(userPrincipalName=%s))", pn); - else - return KADM5_RPC_ERROR; - - ret = ldap_search_s(CTX2LP(context), CTX2BASE(context), - LDAP_SCOPE_SUBTREE, - filter, attr, 0, &m); - free(filter); - if (check_ldap(context, ret)) - return KADM5_RPC_ERROR; - - if (ldap_count_entries(CTX2LP(context), m) > 0) { - char **vals; - m0 = ldap_first_entry(CTX2LP(context), m); - vals = ldap_get_values(CTX2LP(context), m0, "distinguishedName"); - if (vals == NULL || vals[0] == NULL) { - ldap_msgfree(m); - return KADM5_RPC_ERROR; - } - if (name) - *name = strdup(vals[0]); - ldap_msgfree(m); - } else - return KADM5_UNK_PRINC; - - return 0; -} - -#endif /* OPENLDAP */ - -static kadm5_ret_t -ad_get_cred(kadm5_ad_context *context, const char *password) -{ - kadm5_ret_t ret; - krb5_ccache cc; - char *service; - - if (context->ccache) - return 0; - - asprintf(&service, "%s/%s@%s", KRB5_TGS_NAME, - context->realm, context->realm); - if (service == NULL) - return ENOMEM; - - ret = _kadm5_c_get_cred_cache(context->context, - context->client_name, - service, - password, krb5_prompter_posix, - NULL, NULL, &cc); - free(service); - if(ret) - return ret; /* XXX */ - context->ccache = cc; - return 0; -} - -static kadm5_ret_t -kadm5_ad_chpass_principal(void *server_handle, - krb5_principal principal, - const char *password) -{ - kadm5_ad_context *context = server_handle; - krb5_data result_code_string, result_string; - int result_code; - kadm5_ret_t ret; - - ret = ad_get_cred(context, NULL); - if (ret) - return ret; - - krb5_data_zero (&result_code_string); - krb5_data_zero (&result_string); - - ret = krb5_set_password_using_ccache (context->context, - context->ccache, - password, - principal, - &result_code, - &result_code_string, - &result_string); - - krb5_data_free (&result_code_string); - krb5_data_free (&result_string); - - /* XXX do mapping here on error codes */ - - return ret; -} - -#ifdef OPENLDAP -static const char * -get_fqdn(krb5_context context, const krb5_principal p) -{ - const char *s, *hosttypes[] = { "host", "ldap", "gc", "cifs", "dns" }; - int i; - - s = krb5_principal_get_comp_string(context, p, 0); - if (p == NULL) - return NULL; - - for (i = 0; i < sizeof(hosttypes)/sizeof(hosttypes[0]); i++) { - if (strcasecmp(s, hosttypes[i]) == 0) - return krb5_principal_get_comp_string(context, p, 1); - } - return 0; -} -#endif - - -static kadm5_ret_t -kadm5_ad_create_principal(void *server_handle, - kadm5_principal_ent_t entry, - uint32_t mask, - const char *password) -{ - kadm5_ad_context *context = server_handle; - - /* - * KADM5_PRINC_EXPIRE_TIME - * - * return 0 || KADM5_DUP; - */ - -#ifdef OPENLDAP - LDAPMod *attrs[8], rattrs[7], *a; - char *useraccvals[2] = { NULL, NULL }, - *samvals[2], *dnsvals[2], *spnvals[5], *upnvals[2], *tv[2]; - char *ocvals_spn[] = { "top", "person", "organizationalPerson", - "user", "computer", NULL}; - char *p, *realmless_p, *p_msrealm = NULL, *dn = NULL; - const char *fqdn; - char *s, *samname = NULL, *short_spn = NULL; - int ret, i; - int32_t uf_flags = 0; - - if ((mask & KADM5_PRINCIPAL) == 0) - return KADM5_BAD_MASK; - - for (i = 0; i < sizeof(rattrs)/sizeof(rattrs[0]); i++) - attrs[i] = &rattrs[i]; - attrs[i] = NULL; - - ret = ad_get_cred(context, NULL); - if (ret) - return ret; - - ret = _kadm5_ad_connect(server_handle); - if (ret) - return ret; - - fqdn = get_fqdn(context->context, entry->principal); - - ret = krb5_unparse_name(context->context, entry->principal, &p); - if (ret) - return ret; - - if (ad_find_entry(context, fqdn, p, NULL) == 0) { - free(p); - return KADM5_DUP; - } - - if (mask & KADM5_ATTRIBUTES) { - if (entry->attributes & KRB5_KDB_DISALLOW_ALL_TIX) - uf_flags |= UF_ACCOUNTDISABLE|UF_LOCKOUT; - if ((entry->attributes & KRB5_KDB_REQUIRES_PRE_AUTH) == 0) - uf_flags |= UF_DONT_REQUIRE_PREAUTH; - if (entry->attributes & KRB5_KDB_REQUIRES_HW_AUTH) - uf_flags |= UF_SMARTCARD_REQUIRED; - } - - realmless_p = strdup(p); - if (realmless_p == NULL) { - ret = ENOMEM; - goto out; - } - s = strrchr(realmless_p, '@'); - if (s) - *s = '\0'; - - if (fqdn) { - /* create computer account */ - asprintf(&samname, "%s$", fqdn); - if (samname == NULL) { - ret = ENOMEM; - goto out; - } - s = strchr(samname, '.'); - if (s) { - s[0] = '$'; - s[1] = '\0'; - } - - short_spn = strdup(p); - if (short_spn == NULL) { - errno = ENOMEM; - goto out; - } - s = strchr(short_spn, '.'); - if (s) { - *s = '\0'; - } else { - free(short_spn); - short_spn = NULL; - } - - p_msrealm = strdup(p); - if (p_msrealm == NULL) { - errno = ENOMEM; - goto out; - } - s = strrchr(p_msrealm, '@'); - if (s) { - *s = '/'; - } else { - free(p_msrealm); - p_msrealm = NULL; - } - - asprintf(&dn, "cn=%s, cn=Computers, %s", fqdn, CTX2BASE(context)); - if (dn == NULL) { - ret = ENOMEM; - goto out; - } - - a = &rattrs[0]; - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "objectClass"; - a->mod_values = ocvals_spn; - a++; - - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "userAccountControl"; - a->mod_values = useraccvals; - asprintf(&useraccvals[0], "%d", - uf_flags | - UF_PASSWD_NOT_EXPIRE | - UF_WORKSTATION_TRUST_ACCOUNT); - useraccvals[1] = NULL; - a++; - - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "sAMAccountName"; - a->mod_values = samvals; - samvals[0] = samname; - samvals[1] = NULL; - a++; - - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "dNSHostName"; - a->mod_values = dnsvals; - dnsvals[0] = (char *)fqdn; - dnsvals[1] = NULL; - a++; - - /* XXX add even more spn's */ - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "servicePrincipalName"; - a->mod_values = spnvals; - i = 0; - spnvals[i++] = p; - spnvals[i++] = realmless_p; - if (short_spn) - spnvals[i++] = short_spn; - if (p_msrealm) - spnvals[i++] = p_msrealm; - spnvals[i++] = NULL; - a++; - - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "userPrincipalName"; - a->mod_values = upnvals; - upnvals[0] = p; - upnvals[1] = NULL; - a++; - - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "accountExpires"; - a->mod_values = tv; - tv[0] = "9223372036854775807"; /* "never" */ - tv[1] = NULL; - a++; - - } else { - /* create user account */ - - a = &rattrs[0]; - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "userAccountControl"; - a->mod_values = useraccvals; - asprintf(&useraccvals[0], "%d", - uf_flags | - UF_PASSWD_NOT_EXPIRE); - useraccvals[1] = NULL; - a++; - - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "sAMAccountName"; - a->mod_values = samvals; - samvals[0] = realmless_p; - samvals[1] = NULL; - a++; - - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "userPrincipalName"; - a->mod_values = upnvals; - upnvals[0] = p; - upnvals[1] = NULL; - a++; - - a->mod_op = LDAP_MOD_ADD; - a->mod_type = "accountExpires"; - a->mod_values = tv; - tv[0] = "9223372036854775807"; /* "never" */ - tv[1] = NULL; - a++; - } - - attrs[a - &rattrs[0]] = NULL; - - ret = ldap_add_s(CTX2LP(context), dn, attrs); - - out: - if (useraccvals[0]) - free(useraccvals[0]); - if (realmless_p) - free(realmless_p); - if (samname) - free(samname); - if (short_spn) - free(short_spn); - if (p_msrealm) - free(p_msrealm); - free(p); - - if (check_ldap(context, ret)) - return KADM5_RPC_ERROR; - - return 0; -#else - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -#endif -} - -static kadm5_ret_t -kadm5_ad_delete_principal(void *server_handle, krb5_principal principal) -{ - kadm5_ad_context *context = server_handle; -#ifdef OPENLDAP - char *p, *dn = NULL; - const char *fqdn; - int ret; - - ret = ad_get_cred(context, NULL); - if (ret) - return ret; - - ret = _kadm5_ad_connect(server_handle); - if (ret) - return ret; - - fqdn = get_fqdn(context->context, principal); - - ret = krb5_unparse_name(context->context, principal, &p); - if (ret) - return ret; - - if (ad_find_entry(context, fqdn, p, &dn) != 0) { - free(p); - return KADM5_UNK_PRINC; - } - - ret = ldap_delete_s(CTX2LP(context), dn); - - free(dn); - free(p); - - if (check_ldap(context, ret)) - return KADM5_RPC_ERROR; - return 0; -#else - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -#endif -} - -static kadm5_ret_t -kadm5_ad_destroy(void *server_handle) -{ - kadm5_ad_context *context = server_handle; - - if (context->ccache) - krb5_cc_destroy(context->context, context->ccache); - -#ifdef OPENLDAP - { - LDAP *lp = CTX2LP(context); - if (lp) - ldap_unbind(lp); - if (context->base_dn) - free(context->base_dn); - } -#endif - free(context->realm); - free(context->client_name); - krb5_free_principal(context->context, context->caller); - if(context->my_context) - krb5_free_context(context->context); - return 0; -} - -static kadm5_ret_t -kadm5_ad_flush(void *server_handle) -{ - kadm5_ad_context *context = server_handle; - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -} - -static kadm5_ret_t -kadm5_ad_get_principal(void *server_handle, - krb5_principal principal, - kadm5_principal_ent_t entry, - uint32_t mask) -{ - kadm5_ad_context *context = server_handle; -#ifdef OPENLDAP - LDAPMessage *m, *m0; - char **attr = NULL; - int attrlen = 0; - char *filter, *p, *q, *u; - int ret; - - /* - * principal - * KADM5_PRINCIPAL | KADM5_KVNO | KADM5_ATTRIBUTES - */ - - /* - * return 0 || KADM5_DUP; - */ - - memset(entry, 0, sizeof(*entry)); - - if (mask & KADM5_KVNO) - laddattr(&attr, &attrlen, "msDS-KeyVersionNumber"); - - if (mask & KADM5_PRINCIPAL) { - laddattr(&attr, &attrlen, "userPrincipalName"); - laddattr(&attr, &attrlen, "servicePrincipalName"); - } - laddattr(&attr, &attrlen, "objectClass"); - laddattr(&attr, &attrlen, "lastLogon"); - laddattr(&attr, &attrlen, "badPwdCount"); - laddattr(&attr, &attrlen, "badPasswordTime"); - laddattr(&attr, &attrlen, "pwdLastSet"); - laddattr(&attr, &attrlen, "accountExpires"); - laddattr(&attr, &attrlen, "userAccountControl"); - - krb5_unparse_name_short(context->context, principal, &p); - krb5_unparse_name(context->context, principal, &u); - - /* replace @ in domain part with a / */ - q = strrchr(p, '@'); - if (q && (p != q && *(q - 1) != '\\')) - *q = '/'; - - asprintf(&filter, - "(|(userPrincipalName=%s)(servicePrincipalName=%s)(servicePrincipalName=%s))", - u, p, u); - free(p); - free(u); - - ret = ldap_search_s(CTX2LP(context), CTX2BASE(context), - LDAP_SCOPE_SUBTREE, - filter, attr, 0, &m); - free(attr); - if (check_ldap(context, ret)) - return KADM5_RPC_ERROR; - - if (ldap_count_entries(CTX2LP(context), m) > 0) { - char **vals; - m0 = ldap_first_entry(CTX2LP(context), m); - if (m0 == NULL) { - ldap_msgfree(m); - goto fail; - } -#if 0 - vals = ldap_get_values(CTX2LP(context), m0, "servicePrincipalName"); - if (vals) - printf("servicePrincipalName %s\n", vals[0]); - vals = ldap_get_values(CTX2LP(context), m0, "userPrincipalName"); - if (vals) - printf("userPrincipalName %s\n", vals[0]); - vals = ldap_get_values(CTX2LP(context), m0, "userAccountControl"); - if (vals) - printf("userAccountControl %s\n", vals[0]); -#endif - entry->princ_expire_time = 0; - if (mask & KADM5_PRINC_EXPIRE_TIME) { - vals = ldap_get_values(CTX2LP(context), m0, "accountExpires"); - if (vals) - entry->princ_expire_time = nt2unixtime(vals[0]); - } - entry->last_success = 0; - if (mask & KADM5_LAST_SUCCESS) { - vals = ldap_get_values(CTX2LP(context), m0, "lastLogon"); - if (vals) - entry->last_success = nt2unixtime(vals[0]); - } - if (mask & KADM5_LAST_FAILED) { - vals = ldap_get_values(CTX2LP(context), m0, "badPasswordTime"); - if (vals) - entry->last_failed = nt2unixtime(vals[0]); - } - if (mask & KADM5_LAST_PWD_CHANGE) { - vals = ldap_get_values(CTX2LP(context), m0, "pwdLastSet"); - if (vals) - entry->last_pwd_change = nt2unixtime(vals[0]); - } - if (mask & KADM5_FAIL_AUTH_COUNT) { - vals = ldap_get_values(CTX2LP(context), m0, "badPwdCount"); - if (vals) - entry->fail_auth_count = atoi(vals[0]); - } - if (mask & KADM5_ATTRIBUTES) { - vals = ldap_get_values(CTX2LP(context), m0, "userAccountControl"); - if (vals) { - uint32_t i; - i = atoi(vals[0]); - if (i & (UF_ACCOUNTDISABLE|UF_LOCKOUT)) - entry->attributes |= KRB5_KDB_DISALLOW_ALL_TIX; - if ((i & UF_DONT_REQUIRE_PREAUTH) == 0) - entry->attributes |= KRB5_KDB_REQUIRES_PRE_AUTH; - if (i & UF_SMARTCARD_REQUIRED) - entry->attributes |= KRB5_KDB_REQUIRES_HW_AUTH; - if ((i & UF_WORKSTATION_TRUST_ACCOUNT) == 0) - entry->attributes |= KRB5_KDB_DISALLOW_SVR; - } - } - if (mask & KADM5_KVNO) { - vals = ldap_get_values(CTX2LP(context), m0, - "msDS-KeyVersionNumber"); - if (vals) - entry->kvno = atoi(vals[0]); - else - entry->kvno = 0; - } - ldap_msgfree(m); - } else { - return KADM5_UNK_PRINC; - } - - if (mask & KADM5_PRINCIPAL) - krb5_copy_principal(context->context, principal, &entry->principal); - - return 0; - fail: - return KADM5_RPC_ERROR; -#else - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -#endif -} - -static kadm5_ret_t -kadm5_ad_get_principals(void *server_handle, - const char *expression, - char ***principals, - int *count) -{ - kadm5_ad_context *context = server_handle; - - /* - * KADM5_PRINCIPAL | KADM5_KVNO | KADM5_ATTRIBUTES - */ - -#ifdef OPENLDAP - kadm5_ret_t ret; - - ret = ad_get_cred(context, NULL); - if (ret) - return ret; - - ret = _kadm5_ad_connect(server_handle); - if (ret) - return ret; - - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -#else - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -#endif -} - -static kadm5_ret_t -kadm5_ad_get_privs(void *server_handle, uint32_t*privs) -{ - kadm5_ad_context *context = server_handle; - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -} - -static kadm5_ret_t -kadm5_ad_modify_principal(void *server_handle, - kadm5_principal_ent_t entry, - uint32_t mask) -{ - kadm5_ad_context *context = server_handle; - - /* - * KADM5_ATTRIBUTES - * KRB5_KDB_DISALLOW_ALL_TIX (| KADM5_KVNO) - */ - -#ifdef OPENLDAP - LDAPMessage *m = NULL, *m0; - kadm5_ret_t ret; - char **attr = NULL; - int attrlen = 0; - char *p = NULL, *s = NULL, *q; - char **vals; - LDAPMod *attrs[4], rattrs[3], *a; - char *uaf[2] = { NULL, NULL }; - char *kvno[2] = { NULL, NULL }; - char *tv[2] = { NULL, NULL }; - char *filter, *dn; - int i; - - for (i = 0; i < sizeof(rattrs)/sizeof(rattrs[0]); i++) - attrs[i] = &rattrs[i]; - attrs[i] = NULL; - a = &rattrs[0]; - - ret = _kadm5_ad_connect(server_handle); - if (ret) - return ret; - - if (mask & KADM5_KVNO) - laddattr(&attr, &attrlen, "msDS-KeyVersionNumber"); - if (mask & KADM5_PRINC_EXPIRE_TIME) - laddattr(&attr, &attrlen, "accountExpires"); - if (mask & KADM5_ATTRIBUTES) - laddattr(&attr, &attrlen, "userAccountControl"); - laddattr(&attr, &attrlen, "distinguishedName"); - - krb5_unparse_name(context->context, entry->principal, &p); - - s = strdup(p); - - q = strrchr(s, '@'); - if (q && (p != q && *(q - 1) != '\\')) - *q = '\0'; - - asprintf(&filter, - "(|(userPrincipalName=%s)(servicePrincipalName=%s))", - s, s); - free(p); - free(s); - - ret = ldap_search_s(CTX2LP(context), CTX2BASE(context), - LDAP_SCOPE_SUBTREE, - filter, attr, 0, &m); - free(attr); - free(filter); - if (check_ldap(context, ret)) - return KADM5_RPC_ERROR; - - if (ldap_count_entries(CTX2LP(context), m) <= 0) { - ret = KADM5_RPC_ERROR; - goto out; - } - - m0 = ldap_first_entry(CTX2LP(context), m); - - if (mask & KADM5_ATTRIBUTES) { - int32_t i; - - vals = ldap_get_values(CTX2LP(context), m0, "userAccountControl"); - if (vals == NULL) { - ret = KADM5_RPC_ERROR; - goto out; - } - - i = atoi(vals[0]); - if (i == 0) - return KADM5_RPC_ERROR; - - if (entry->attributes & KRB5_KDB_DISALLOW_ALL_TIX) - i |= (UF_ACCOUNTDISABLE|UF_LOCKOUT); - else - i &= ~(UF_ACCOUNTDISABLE|UF_LOCKOUT); - if (entry->attributes & KRB5_KDB_REQUIRES_PRE_AUTH) - i &= ~UF_DONT_REQUIRE_PREAUTH; - else - i |= UF_DONT_REQUIRE_PREAUTH; - if (entry->attributes & KRB5_KDB_REQUIRES_HW_AUTH) - i |= UF_SMARTCARD_REQUIRED; - else - i &= UF_SMARTCARD_REQUIRED; - if (entry->attributes & KRB5_KDB_DISALLOW_SVR) - i &= ~UF_WORKSTATION_TRUST_ACCOUNT; - else - i |= UF_WORKSTATION_TRUST_ACCOUNT; - - asprintf(&uaf[0], "%d", i); - - a->mod_op = LDAP_MOD_REPLACE; - a->mod_type = "userAccountControl"; - a->mod_values = uaf; - a++; - } - - if (mask & KADM5_KVNO) { - vals = ldap_get_values(CTX2LP(context), m0, "msDS-KeyVersionNumber"); - if (vals == NULL) { - entry->kvno = 0; - } else { - asprintf(&kvno[0], "%d", entry->kvno); - - a->mod_op = LDAP_MOD_REPLACE; - a->mod_type = "msDS-KeyVersionNumber"; - a->mod_values = kvno; - a++; - } - } - - if (mask & KADM5_PRINC_EXPIRE_TIME) { - long long wt; - vals = ldap_get_values(CTX2LP(context), m0, "accountExpires"); - if (vals == NULL) { - ret = KADM5_RPC_ERROR; - goto out; - } - - wt = unix2nttime(entry->princ_expire_time); - - asprintf(&tv[0], "%llu", wt); - - a->mod_op = LDAP_MOD_REPLACE; - a->mod_type = "accountExpires"; - a->mod_values = tv; - a++; - } - - vals = ldap_get_values(CTX2LP(context), m0, "distinguishedName"); - if (vals == NULL) { - ret = KADM5_RPC_ERROR; - goto out; - } - dn = vals[0]; - - attrs[a - &rattrs[0]] = NULL; - - ret = ldap_modify_s(CTX2LP(context), dn, attrs); - if (check_ldap(context, ret)) - return KADM5_RPC_ERROR; - - out: - if (m) - ldap_msgfree(m); - if (uaf[0]) - free(uaf[0]); - if (kvno[0]) - free(kvno[0]); - if (tv[0]) - free(tv[0]); - return ret; -#else - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -#endif -} - -static kadm5_ret_t -kadm5_ad_randkey_principal(void *server_handle, - krb5_principal principal, - krb5_keyblock **keys, - int *n_keys) -{ - kadm5_ad_context *context = server_handle; - - /* - * random key - */ - -#ifdef OPENLDAP - krb5_data result_code_string, result_string; - int result_code, plen; - kadm5_ret_t ret; - char *password; - - *keys = NULL; - *n_keys = 0; - - { - char p[64]; - krb5_generate_random_block(p, sizeof(p)); - plen = base64_encode(p, sizeof(p), &password); - if (plen < 0) - return ENOMEM; - } - - ret = ad_get_cred(context, NULL); - if (ret) { - free(password); - return ret; - } - - krb5_data_zero (&result_code_string); - krb5_data_zero (&result_string); - - ret = krb5_set_password_using_ccache (context->context, - context->ccache, - password, - principal, - &result_code, - &result_code_string, - &result_string); - - krb5_data_free (&result_code_string); - krb5_data_free (&result_string); - - if (ret == 0) { - - *keys = malloc(sizeof(**keys) * 1); - if (*keys == NULL) { - ret = ENOMEM; - goto out; - } - *n_keys = 1; - - ret = krb5_string_to_key(context->context, - ENCTYPE_ARCFOUR_HMAC_MD5, - password, - principal, - &(*keys)[0]); - memset(password, 0, sizeof(password)); - if (ret) { - free(*keys); - *keys = NULL; - *n_keys = 0; - goto out; - } - } - memset(password, 0, plen); - free(password); - out: - return ret; -#else - *keys = NULL; - *n_keys = 0; - - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -#endif -} - -static kadm5_ret_t -kadm5_ad_rename_principal(void *server_handle, - krb5_principal from, - krb5_principal to) -{ - kadm5_ad_context *context = server_handle; - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -} - -static kadm5_ret_t -kadm5_ad_chpass_principal_with_key(void *server_handle, - krb5_principal princ, - int n_key_data, - krb5_key_data *key_data) -{ - kadm5_ad_context *context = server_handle; - krb5_set_error_message(context->context, KADM5_RPC_ERROR, "Function not implemented"); - return KADM5_RPC_ERROR; -} - -static void -set_funcs(kadm5_ad_context *c) -{ -#define SET(C, F) (C)->funcs.F = kadm5_ad_ ## F - SET(c, chpass_principal); - SET(c, chpass_principal_with_key); - SET(c, create_principal); - SET(c, delete_principal); - SET(c, destroy); - SET(c, flush); - SET(c, get_principal); - SET(c, get_principals); - SET(c, get_privs); - SET(c, modify_principal); - SET(c, randkey_principal); - SET(c, rename_principal); -} - -kadm5_ret_t -kadm5_ad_init_with_password_ctx(krb5_context context, - const char *client_name, - const char *password, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - kadm5_ret_t ret; - kadm5_ad_context *ctx; - - ctx = malloc(sizeof(*ctx)); - if(ctx == NULL) - return ENOMEM; - memset(ctx, 0, sizeof(*ctx)); - set_funcs(ctx); - - ctx->context = context; - krb5_add_et_list (context, initialize_kadm5_error_table_r); - - ret = krb5_parse_name(ctx->context, client_name, &ctx->caller); - if(ret) { - free(ctx); - return ret; - } - - if(realm_params->mask & KADM5_CONFIG_REALM) { - ret = 0; - ctx->realm = strdup(realm_params->realm); - if (ctx->realm == NULL) - ret = ENOMEM; - } else - ret = krb5_get_default_realm(ctx->context, &ctx->realm); - if (ret) { - free(ctx); - return ret; - } - - ctx->client_name = strdup(client_name); - - if(password != NULL && *password != '\0') - ret = ad_get_cred(ctx, password); - else - ret = ad_get_cred(ctx, NULL); - if(ret) { - kadm5_ad_destroy(ctx); - return ret; - } - -#ifdef OPENLDAP - ret = _kadm5_ad_connect(ctx); - if (ret) { - kadm5_ad_destroy(ctx); - return ret; - } -#endif - - *server_handle = ctx; - return 0; -} - -kadm5_ret_t -kadm5_ad_init_with_password(const char *client_name, - const char *password, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - krb5_context context; - kadm5_ret_t ret; - kadm5_ad_context *ctx; - - ret = krb5_init_context(&context); - if (ret) - return ret; - ret = kadm5_ad_init_with_password_ctx(context, - client_name, - password, - service_name, - realm_params, - struct_version, - api_version, - server_handle); - if(ret) { - krb5_free_context(context); - return ret; - } - ctx = *server_handle; - ctx->my_context = 1; - return 0; -} diff --git a/kerberosV/src/lib/kadm5/admin.h b/kerberosV/src/lib/kadm5/admin.h deleted file mode 100644 index 63e20ad9cf1..00000000000 --- a/kerberosV/src/lib/kadm5/admin.h +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (c) 1997-2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -/* $Id: admin.h,v 1.2 2013/06/17 18:57:43 robert Exp $ */ - -#ifndef __KADM5_ADMIN_H__ -#define __KADM5_ADMIN_H__ - -#define KADM5_API_VERSION_1 1 -#define KADM5_API_VERSION_2 2 - -#ifndef USE_KADM5_API_VERSION -#define USE_KADM5_API_VERSION KADM5_API_VERSION_2 -#endif - -#if USE_KADM5_API_VERSION != KADM5_API_VERSION_2 -#error No support for API versions other than 2 -#endif - -#define KADM5_STRUCT_VERSION 0 - -#include - -#define KRB5_KDB_DISALLOW_POSTDATED 0x00000001 -#define KRB5_KDB_DISALLOW_FORWARDABLE 0x00000002 -#define KRB5_KDB_DISALLOW_TGT_BASED 0x00000004 -#define KRB5_KDB_DISALLOW_RENEWABLE 0x00000008 -#define KRB5_KDB_DISALLOW_PROXIABLE 0x00000010 -#define KRB5_KDB_DISALLOW_DUP_SKEY 0x00000020 -#define KRB5_KDB_DISALLOW_ALL_TIX 0x00000040 -#define KRB5_KDB_REQUIRES_PRE_AUTH 0x00000080 -#define KRB5_KDB_REQUIRES_HW_AUTH 0x00000100 -#define KRB5_KDB_REQUIRES_PWCHANGE 0x00000200 -#define KRB5_KDB_DISALLOW_SVR 0x00001000 -#define KRB5_KDB_PWCHANGE_SERVICE 0x00002000 -#define KRB5_KDB_SUPPORT_DESMD5 0x00004000 -#define KRB5_KDB_NEW_PRINC 0x00008000 -#define KRB5_KDB_OK_AS_DELEGATE 0x00010000 -#define KRB5_KDB_TRUSTED_FOR_DELEGATION 0x00020000 -#define KRB5_KDB_ALLOW_KERBEROS4 0x00040000 -#define KRB5_KDB_ALLOW_DIGEST 0x00080000 - -#define KADM5_PRINCIPAL 0x000001 -#define KADM5_PRINC_EXPIRE_TIME 0x000002 -#define KADM5_PW_EXPIRATION 0x000004 -#define KADM5_LAST_PWD_CHANGE 0x000008 -#define KADM5_ATTRIBUTES 0x000010 -#define KADM5_MAX_LIFE 0x000020 -#define KADM5_MOD_TIME 0x000040 -#define KADM5_MOD_NAME 0x000080 -#define KADM5_KVNO 0x000100 -#define KADM5_MKVNO 0x000200 -#define KADM5_AUX_ATTRIBUTES 0x000400 -#define KADM5_POLICY 0x000800 -#define KADM5_POLICY_CLR 0x001000 -#define KADM5_MAX_RLIFE 0x002000 -#define KADM5_LAST_SUCCESS 0x004000 -#define KADM5_LAST_FAILED 0x008000 -#define KADM5_FAIL_AUTH_COUNT 0x010000 -#define KADM5_KEY_DATA 0x020000 -#define KADM5_TL_DATA 0x040000 - -#define KADM5_PRINCIPAL_NORMAL_MASK (~(KADM5_KEY_DATA | KADM5_TL_DATA)) - -#define KADM5_PW_MAX_LIFE 0x004000 -#define KADM5_PW_MIN_LIFE 0x008000 -#define KADM5_PW_MIN_LENGTH 0x010000 -#define KADM5_PW_MIN_CLASSES 0x020000 -#define KADM5_PW_HISTORY_NUM 0x040000 -#define KADM5_REF_COUNT 0x080000 - -#define KADM5_POLICY_NORMAL_MASK (~0) - -#define KADM5_ADMIN_SERVICE "kadmin/admin" -#define KADM5_HIST_PRINCIPAL "kadmin/history" -#define KADM5_CHANGEPW_SERVICE "kadmin/changepw" - -typedef struct { - int16_t key_data_ver; /* Version */ - int16_t key_data_kvno; /* Key Version */ - int16_t key_data_type[2]; /* Array of types */ - int16_t key_data_length[2]; /* Array of lengths */ - void* key_data_contents[2];/* Array of pointers */ -} krb5_key_data; - -typedef struct _krb5_tl_data { - struct _krb5_tl_data* tl_data_next; - int16_t tl_data_type; - int16_t tl_data_length; - void* tl_data_contents; -} krb5_tl_data; - -#define KRB5_TL_LAST_PWD_CHANGE 0x0001 -#define KRB5_TL_MOD_PRINC 0x0002 -#define KRB5_TL_KADM_DATA 0x0003 -#define KRB5_TL_KADM5_E_DATA 0x0004 -#define KRB5_TL_RB1_CHALLENGE 0x0005 -#define KRB5_TL_SECURID_STATE 0x0006 -#define KRB5_TL_PASSWORD 0x0007 -#define KRB5_TL_EXTENSION 0x0008 -#define KRB5_TL_PKINIT_ACL 0x0009 -#define KRB5_TL_ALIASES 0x000a - -typedef struct _kadm5_principal_ent_t { - krb5_principal principal; - - krb5_timestamp princ_expire_time; - krb5_timestamp last_pwd_change; - krb5_timestamp pw_expiration; - krb5_deltat max_life; - krb5_principal mod_name; - krb5_timestamp mod_date; - krb5_flags attributes; - krb5_kvno kvno; - krb5_kvno mkvno; - - char * policy; - uint32_t aux_attributes; - - krb5_deltat max_renewable_life; - krb5_timestamp last_success; - krb5_timestamp last_failed; - krb5_kvno fail_auth_count; - int16_t n_key_data; - int16_t n_tl_data; - krb5_tl_data *tl_data; - krb5_key_data *key_data; -} kadm5_principal_ent_rec, *kadm5_principal_ent_t; - -typedef struct _kadm5_policy_ent_t { - char *policy; - - uint32_t pw_min_life; - uint32_t pw_max_life; - uint32_t pw_min_length; - uint32_t pw_min_classes; - uint32_t pw_history_num; - uint32_t policy_refcnt; -} kadm5_policy_ent_rec, *kadm5_policy_ent_t; - -#define KADM5_CONFIG_REALM (1 << 0) -#define KADM5_CONFIG_PROFILE (1 << 1) -#define KADM5_CONFIG_KADMIND_PORT (1 << 2) -#define KADM5_CONFIG_ADMIN_SERVER (1 << 3) -#define KADM5_CONFIG_DBNAME (1 << 4) -#define KADM5_CONFIG_ADBNAME (1 << 5) -#define KADM5_CONFIG_ADB_LOCKFILE (1 << 6) -#define KADM5_CONFIG_ACL_FILE (1 << 7) -#define KADM5_CONFIG_DICT_FILE (1 << 8) -#define KADM5_CONFIG_ADMIN_KEYTAB (1 << 9) -#define KADM5_CONFIG_MKEY_FROM_KEYBOARD (1 << 10) -#define KADM5_CONFIG_STASH_FILE (1 << 11) -#define KADM5_CONFIG_MKEY_NAME (1 << 12) -#define KADM5_CONFIG_ENCTYPE (1 << 13) -#define KADM5_CONFIG_MAX_LIFE (1 << 14) -#define KADM5_CONFIG_MAX_RLIFE (1 << 15) -#define KADM5_CONFIG_EXPIRATION (1 << 16) -#define KADM5_CONFIG_FLAGS (1 << 17) -#define KADM5_CONFIG_ENCTYPES (1 << 18) - -#define KADM5_PRIV_GET (1 << 0) -#define KADM5_PRIV_ADD (1 << 1) -#define KADM5_PRIV_MODIFY (1 << 2) -#define KADM5_PRIV_DELETE (1 << 3) -#define KADM5_PRIV_LIST (1 << 4) -#define KADM5_PRIV_CPW (1 << 5) -#define KADM5_PRIV_ALL (KADM5_PRIV_GET | KADM5_PRIV_ADD | KADM5_PRIV_MODIFY | KADM5_PRIV_DELETE | KADM5_PRIV_LIST | KADM5_PRIV_CPW) - -typedef struct { - int XXX; -}krb5_key_salt_tuple; - -typedef struct _kadm5_config_params { - uint32_t mask; - - /* Client and server fields */ - char *realm; - int kadmind_port; - - /* client fields */ - char *admin_server; - - /* server fields */ - char *dbname; - char *acl_file; - - /* server library (database) fields */ - char *stash_file; -} kadm5_config_params; - -typedef krb5_error_code kadm5_ret_t; - -#include "kadm5-protos.h" - -#if 0 -/* unimplemented functions */ -kadm5_ret_t -kadm5_decrypt_key(void *server_handle, - kadm5_principal_ent_t entry, int32_t - ktype, int32_t stype, int32_t - kvno, krb5_keyblock *keyblock, - krb5_keysalt *keysalt, int *kvnop); - -kadm5_ret_t -kadm5_create_policy(void *server_handle, - kadm5_policy_ent_t policy, uint32_t mask); - -kadm5_ret_t -kadm5_delete_policy(void *server_handle, char *policy); - - -kadm5_ret_t -kadm5_modify_policy(void *server_handle, - kadm5_policy_ent_t policy, - uint32_t mask); - -kadm5_ret_t -kadm5_get_policy(void *server_handle, char *policy, kadm5_policy_ent_t ent); - -kadm5_ret_t -kadm5_get_policies(void *server_handle, char *exp, - char ***pols, int *count); - -void -kadm5_free_policy_ent(kadm5_policy_ent_t policy); - -#endif - -#endif /* __KADM5_ADMIN_H__ */ diff --git a/kerberosV/src/lib/kadm5/bump_pw_expire.c b/kerberosV/src/lib/kadm5/bump_pw_expire.c deleted file mode 100644 index b31cc6157de..00000000000 --- a/kerberosV/src/lib/kadm5/bump_pw_expire.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: bump_pw_expire.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -/* - * extend password_expiration if it's defined - */ - -kadm5_ret_t -_kadm5_bump_pw_expire(kadm5_server_context *context, - hdb_entry *ent) -{ - if (ent->pw_end != NULL) { - time_t life; - - life = krb5_config_get_time_default(context->context, - NULL, - 365 * 24 * 60 * 60, - "kadmin", - "password_lifetime", - NULL); - - *(ent->pw_end) = time(NULL) + life; - } - return 0; -} diff --git a/kerberosV/src/lib/kadm5/check-cracklib.pl b/kerberosV/src/lib/kadm5/check-cracklib.pl deleted file mode 100755 index b1175059bdf..00000000000 --- a/kerberosV/src/lib/kadm5/check-cracklib.pl +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/pkg/bin/perl -# -# Sample password verifier for Heimdals external password -# verifier, see the chapter "Password changing" in the the info -# documentation for more information about the protocol used. -# -# Three checks -# 1. Check that password is not the principal name -# 2. Check that the password passes cracklib -# 3. Check that password isn't repeated for this principal -# -# The repeat check must be last because some clients ask -# twice when getting "no" back and thus the error message -# would be wrong. -# -# Prereqs (example versions): -# -# * perl (5.8.5) http://www.perl.org/ -# * cracklib (2.8.5) http://sourceforge.net/projects/cracklib -# * Crypt-Cracklib perlmodule (0.01) http://search.cpan.org/~daniel/ -# -# Sample dictionaries: -# cracklib-words (1.1) http://sourceforge.net/projects/cracklib -# miscfiles (1.4.2) http://directory.fsf.org/miscfiles.html -# -# Configuration for krb5.conf or kdc.conf -# -# [password_quality] -# policies = builtin:external-check -# external_program = /check-cracklib.pl -# -# $Id: check-cracklib.pl,v 1.2 2013/06/17 18:57:43 robert Exp $ - -use strict; -use Crypt::Cracklib; -use Digest::MD5; - -# NEED TO CHANGE THESE TO MATCH YOUR SYSTEM -my $database = '/usr/lib/cracklib_dict'; -my $historydb = '/var/heimdal/historydb'; -# NEED TO CHANGE THESE TO MATCH YOUR SYSTEM - -# seconds password reuse allowed (to catch retries from clients) -my $reusetime = 60; - -my %params; - -sub check_basic -{ - my $principal = shift; - my $passwd = shift; - - if ($principal eq $passwd) { - return "Principal name as password is not allowed"; - } - return "ok"; -} - -sub check_repeat -{ - my $principal = shift; - my $passwd = shift; - my $result = 'Do not reuse passwords'; - my %DB; - my $md5context = new Digest::MD5; - my $timenow = scalar(time()); - - $md5context->reset(); - $md5context->add($principal, ":", $passwd); - - my $key=$md5context->hexdigest(); - - dbmopen(%DB,$historydb,0600) or die "Internal: Could not open $historydb"; - if (!$DB{$key} || ($timenow - $DB{$key} < $reusetime)) { - $result = "ok"; - $DB{$key}=$timenow; - } - dbmclose(%DB) or die "Internal: Could not close $historydb"; - return $result; -} - -sub badpassword -{ - my $reason = shift; - print "$reason\n"; - exit 0 -} - -while () { - last if /^end$/; - if (!/^([^:]+): (.+)$/) { - die "key value pair not correct: $_"; - } - $params{$1} = $2; -} - -die "missing principal" if (!defined $params{'principal'}); -die "missing password" if (!defined $params{'new-password'}); - -my $reason; - -$reason = check_basic($params{'principal'}, $params{'new-password'}); -badpassword($reason) if ($reason ne "ok"); - -$reason = fascist_check($params{'new-password'}, $database); -badpassword($reason) if ($reason ne "ok"); - -$reason = check_repeat($params{'principal'}, $params{'new-password'}); -badpassword($reason) if ($reason ne "ok"); - -print "APPROVED\n"; -exit 0 diff --git a/kerberosV/src/lib/kadm5/chpass_c.c b/kerberosV/src/lib/kadm5/chpass_c.c deleted file mode 100644 index 2a9b0f5310b..00000000000 --- a/kerberosV/src/lib/kadm5/chpass_c.c +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (c) 1997-2000, 2005-2006 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 "kadm5_locl.h" - -RCSID("$Id: chpass_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_chpass_principal(void *server_handle, - krb5_principal princ, - const char *password) -{ - kadm5_client_context *context = server_handle; - kadm5_ret_t ret; - krb5_storage *sp; - unsigned char buf[1024]; - int32_t tmp; - krb5_data reply; - - ret = _kadm5_connect(server_handle); - if(ret) - return ret; - - sp = krb5_storage_from_mem(buf, sizeof(buf)); - if (sp == NULL) { - krb5_clear_error_message(context->context); - return ENOMEM; - } - krb5_store_int32(sp, kadm_chpass); - krb5_store_principal(sp, princ); - krb5_store_string(sp, password); - ret = _kadm5_client_send(context, sp); - krb5_storage_free(sp); - if (ret) - return ret; - ret = _kadm5_client_recv(context, &reply); - if(ret) - return ret; - sp = krb5_storage_from_data (&reply); - if (sp == NULL) { - krb5_clear_error_message(context->context); - krb5_data_free (&reply); - return ENOMEM; - } - krb5_ret_int32(sp, &tmp); - krb5_clear_error_message(context->context); - krb5_storage_free(sp); - krb5_data_free (&reply); - return tmp; -} - -kadm5_ret_t -kadm5_c_chpass_principal_with_key(void *server_handle, - krb5_principal princ, - int n_key_data, - krb5_key_data *key_data) -{ - kadm5_client_context *context = server_handle; - kadm5_ret_t ret; - krb5_storage *sp; - unsigned char buf[1024]; - int32_t tmp; - krb5_data reply; - int i; - - ret = _kadm5_connect(server_handle); - if(ret) - return ret; - - sp = krb5_storage_from_mem(buf, sizeof(buf)); - if (sp == NULL) { - krb5_clear_error_message(context->context); - return ENOMEM; - } - krb5_store_int32(sp, kadm_chpass_with_key); - krb5_store_principal(sp, princ); - krb5_store_int32(sp, n_key_data); - for (i = 0; i < n_key_data; ++i) - kadm5_store_key_data (sp, &key_data[i]); - ret = _kadm5_client_send(context, sp); - krb5_storage_free(sp); - if (ret) - return ret; - ret = _kadm5_client_recv(context, &reply); - if(ret) - return ret; - sp = krb5_storage_from_data (&reply); - if (sp == NULL) { - krb5_clear_error_message(context->context); - krb5_data_free (&reply); - return ENOMEM; - } - krb5_ret_int32(sp, &tmp); - krb5_clear_error_message(context->context); - krb5_storage_free(sp); - krb5_data_free (&reply); - return tmp; -} diff --git a/kerberosV/src/lib/kadm5/chpass_s.c b/kerberosV/src/lib/kadm5/chpass_s.c deleted file mode 100644 index 3bf20ff2ae6..00000000000 --- a/kerberosV/src/lib/kadm5/chpass_s.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 1997-2006 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 "kadm5_locl.h" - -RCSID("$Id: chpass_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -static kadm5_ret_t -change(void *server_handle, - krb5_principal princ, - const char *password, - int cond) -{ - kadm5_server_context *context = server_handle; - hdb_entry_ex ent; - kadm5_ret_t ret; - Key *keys; - size_t num_keys; - int existsp = 0; - - memset(&ent, 0, sizeof(ent)); - ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0); - if(ret) - return ret; - - ret = context->db->hdb_fetch_kvno(context->context, context->db, princ, - HDB_F_DECRYPT|HDB_F_GET_ANY|HDB_F_ADMIN_DATA, 0, &ent); - if(ret) - goto out; - - if (context->db->hdb_capability_flags & HDB_CAP_F_HANDLE_PASSWORDS) { - ret = context->db->hdb_password(context->context, context->db, - &ent, password, cond); - if (ret) - goto out2; - } else { - - num_keys = ent.entry.keys.len; - keys = ent.entry.keys.val; - - ent.entry.keys.len = 0; - ent.entry.keys.val = NULL; - - ret = _kadm5_set_keys(context, &ent.entry, password); - if(ret) { - _kadm5_free_keys (context->context, num_keys, keys); - goto out2; - } - - if (cond) - existsp = _kadm5_exists_keys (ent.entry.keys.val, - ent.entry.keys.len, - keys, num_keys); - _kadm5_free_keys (context->context, num_keys, keys); - - if (existsp) { - ret = KADM5_PASS_REUSE; - krb5_set_error_message(context->context, ret, - "Password reuse forbidden"); - goto out2; - } - - ret = hdb_seal_keys(context->context, context->db, &ent.entry); - if (ret) - goto out2; - } - ent.entry.kvno++; - - ret = _kadm5_set_modifier(context, &ent.entry); - if(ret) - goto out2; - - ret = _kadm5_bump_pw_expire(context, &ent.entry); - if (ret) - goto out2; - - ret = context->db->hdb_store(context->context, context->db, - HDB_F_REPLACE, &ent); - if (ret) - goto out2; - - kadm5_log_modify (context, - &ent.entry, - KADM5_PRINCIPAL | KADM5_MOD_NAME | KADM5_MOD_TIME | - KADM5_KEY_DATA | KADM5_KVNO | KADM5_PW_EXPIRATION | - KADM5_TL_DATA); - -out2: - hdb_free_entry(context->context, &ent); -out: - context->db->hdb_close(context->context, context->db); - return _kadm5_error_code(ret); -} - - - -/* - * change the password of `princ' to `password' if it's not already that. - */ - -kadm5_ret_t -kadm5_s_chpass_principal_cond(void *server_handle, - krb5_principal princ, - const char *password) -{ - return change (server_handle, princ, password, 1); -} - -/* - * change the password of `princ' to `password' - */ - -kadm5_ret_t -kadm5_s_chpass_principal(void *server_handle, - krb5_principal princ, - const char *password) -{ - return change (server_handle, princ, password, 0); -} - -/* - * change keys for `princ' to `keys' - */ - -kadm5_ret_t -kadm5_s_chpass_principal_with_key(void *server_handle, - krb5_principal princ, - int n_key_data, - krb5_key_data *key_data) -{ - kadm5_server_context *context = server_handle; - hdb_entry_ex ent; - kadm5_ret_t ret; - - memset(&ent, 0, sizeof(ent)); - ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0); - if(ret) - return ret; - ret = context->db->hdb_fetch_kvno(context->context, context->db, princ, 0, - HDB_F_GET_ANY|HDB_F_ADMIN_DATA, &ent); - if(ret == HDB_ERR_NOENTRY) - goto out; - ret = _kadm5_set_keys2(context, &ent.entry, n_key_data, key_data); - if(ret) - goto out2; - ent.entry.kvno++; - ret = _kadm5_set_modifier(context, &ent.entry); - if(ret) - goto out2; - ret = _kadm5_bump_pw_expire(context, &ent.entry); - if (ret) - goto out2; - - ret = hdb_seal_keys(context->context, context->db, &ent.entry); - if (ret) - goto out2; - - ret = context->db->hdb_store(context->context, context->db, - HDB_F_REPLACE, &ent); - if (ret) - goto out2; - - kadm5_log_modify (context, - &ent.entry, - KADM5_PRINCIPAL | KADM5_MOD_NAME | KADM5_MOD_TIME | - KADM5_KEY_DATA | KADM5_KVNO | KADM5_PW_EXPIRATION | - KADM5_TL_DATA); - -out2: - hdb_free_entry(context->context, &ent); -out: - context->db->hdb_close(context->context, context->db); - return _kadm5_error_code(ret); -} diff --git a/kerberosV/src/lib/kadm5/client_glue.c b/kerberosV/src/lib/kadm5/client_glue.c deleted file mode 100644 index 8612f4b2311..00000000000 --- a/kerberosV/src/lib/kadm5/client_glue.c +++ /dev/null @@ -1,150 +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. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: client_glue.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_init_with_password(const char *client_name, - const char *password, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_c_init_with_password(client_name, - password, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_init_with_password_ctx(krb5_context context, - const char *client_name, - const char *password, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_c_init_with_password_ctx(context, - client_name, - password, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_init_with_skey(const char *client_name, - const char *keytab, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_c_init_with_skey(client_name, - keytab, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_init_with_skey_ctx(krb5_context context, - const char *client_name, - const char *keytab, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_c_init_with_skey_ctx(context, - client_name, - keytab, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_init_with_creds(const char *client_name, - krb5_ccache ccache, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_c_init_with_creds(client_name, - ccache, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_init_with_creds_ctx(krb5_context context, - const char *client_name, - krb5_ccache ccache, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_c_init_with_creds_ctx(context, - client_name, - ccache, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} diff --git a/kerberosV/src/lib/kadm5/common_glue.c b/kerberosV/src/lib/kadm5/common_glue.c deleted file mode 100644 index 29abd095d3f..00000000000 --- a/kerberosV/src/lib/kadm5/common_glue.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: common_glue.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -#define __CALL(F, P) (*((kadm5_common_context*)server_handle)->funcs.F)P; - -kadm5_ret_t -kadm5_chpass_principal(void *server_handle, - krb5_principal princ, - const char *password) -{ - return __CALL(chpass_principal, (server_handle, princ, password)); -} - -kadm5_ret_t -kadm5_chpass_principal_with_key(void *server_handle, - krb5_principal princ, - int n_key_data, - krb5_key_data *key_data) -{ - return __CALL(chpass_principal_with_key, - (server_handle, princ, n_key_data, key_data)); -} - -kadm5_ret_t -kadm5_create_principal(void *server_handle, - kadm5_principal_ent_t princ, - uint32_t mask, - const char *password) -{ - return __CALL(create_principal, (server_handle, princ, mask, password)); -} - -kadm5_ret_t -kadm5_delete_principal(void *server_handle, - krb5_principal princ) -{ - return __CALL(delete_principal, (server_handle, princ)); -} - -kadm5_ret_t -kadm5_destroy (void *server_handle) -{ - return __CALL(destroy, (server_handle)); -} - -kadm5_ret_t -kadm5_flush (void *server_handle) -{ - return __CALL(flush, (server_handle)); -} - -kadm5_ret_t -kadm5_get_principal(void *server_handle, - krb5_principal princ, - kadm5_principal_ent_t out, - uint32_t mask) -{ - return __CALL(get_principal, (server_handle, princ, out, mask)); -} - -kadm5_ret_t -kadm5_modify_principal(void *server_handle, - kadm5_principal_ent_t princ, - uint32_t mask) -{ - return __CALL(modify_principal, (server_handle, princ, mask)); -} - -kadm5_ret_t -kadm5_randkey_principal(void *server_handle, - krb5_principal princ, - krb5_keyblock **new_keys, - int *n_keys) -{ - return __CALL(randkey_principal, (server_handle, princ, new_keys, n_keys)); -} - -kadm5_ret_t -kadm5_rename_principal(void *server_handle, - krb5_principal source, - krb5_principal target) -{ - return __CALL(rename_principal, (server_handle, source, target)); -} - -kadm5_ret_t -kadm5_get_principals(void *server_handle, - const char *expression, - char ***princs, - int *count) -{ - return __CALL(get_principals, (server_handle, expression, princs, count)); -} - -kadm5_ret_t -kadm5_get_privs(void *server_handle, - uint32_t *privs) -{ - return __CALL(get_privs, (server_handle, privs)); -} diff --git a/kerberosV/src/lib/kadm5/context_s.c b/kerberosV/src/lib/kadm5/context_s.c deleted file mode 100644 index bcbdb03e075..00000000000 --- a/kerberosV/src/lib/kadm5/context_s.c +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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 "kadm5_locl.h" - -RCSID("$Id: context_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -static void -set_funcs(kadm5_server_context *c) -{ -#define SET(C, F) (C)->funcs.F = kadm5_s_ ## F - SET(c, chpass_principal); - SET(c, chpass_principal_with_key); - SET(c, create_principal); - SET(c, delete_principal); - SET(c, destroy); - SET(c, flush); - SET(c, get_principal); - SET(c, get_principals); - SET(c, get_privs); - SET(c, modify_principal); - SET(c, randkey_principal); - SET(c, rename_principal); -} - -#ifndef NO_UNIX_SOCKETS - -static void -set_socket_name(krb5_context context, struct sockaddr_un *un) -{ - const char *fn = kadm5_log_signal_socket(context); - - memset(un, 0, sizeof(*un)); - un->sun_family = AF_UNIX; - strlcpy (un->sun_path, fn, sizeof(un->sun_path)); - -} -#else - -static void -set_socket_info(krb5_context context, struct addrinfo **info) -{ - kadm5_log_signal_socket_info(context, 0, info); -} - -#endif - -static kadm5_ret_t -find_db_spec(kadm5_server_context *ctx) -{ - krb5_context context = ctx->context; - struct hdb_dbinfo *info, *d; - krb5_error_code ret; - - if (ctx->config.realm) { - /* fetch the databases */ - ret = hdb_get_dbinfo(context, &info); - if (ret) - return ret; - - d = NULL; - while ((d = hdb_dbinfo_get_next(info, d)) != NULL) { - const char *p = hdb_dbinfo_get_realm(context, d); - - /* match default (realm-less) */ - if(p != NULL && strcmp(ctx->config.realm, p) != 0) - continue; - - p = hdb_dbinfo_get_dbname(context, d); - if (p) - ctx->config.dbname = strdup(p); - - p = hdb_dbinfo_get_acl_file(context, d); - if (p) - ctx->config.acl_file = strdup(p); - - p = hdb_dbinfo_get_mkey_file(context, d); - if (p) - ctx->config.stash_file = strdup(p); - - p = hdb_dbinfo_get_log_file(context, d); - if (p) - ctx->log_context.log_file = strdup(p); - break; - } - hdb_free_dbinfo(context, &info); - } - - /* If any of the values was unset, pick up the default value */ - - if (ctx->config.dbname == NULL) - ctx->config.dbname = strdup(hdb_default_db(context)); - if (ctx->config.acl_file == NULL) - asprintf(&ctx->config.acl_file, "%s/kadmind.acl", hdb_db_dir(context)); - if (ctx->config.stash_file == NULL) - asprintf(&ctx->config.stash_file, "%s/m-key", hdb_db_dir(context)); - if (ctx->log_context.log_file == NULL) - asprintf(&ctx->log_context.log_file, "%s/log", hdb_db_dir(context)); - -#ifndef NO_UNIX_SOCKETS - set_socket_name(context, &ctx->log_context.socket_name); -#else - set_socket_info(context, &ctx->log_context.socket_info); -#endif - - return 0; -} - -kadm5_ret_t -_kadm5_s_init_context(kadm5_server_context **ctx, - kadm5_config_params *params, - krb5_context context) -{ - *ctx = malloc(sizeof(**ctx)); - if(*ctx == NULL) - return ENOMEM; - memset(*ctx, 0, sizeof(**ctx)); - set_funcs(*ctx); - (*ctx)->context = context; - krb5_add_et_list (context, initialize_kadm5_error_table_r); -#define is_set(M) (params && params->mask & KADM5_CONFIG_ ## M) - if(is_set(REALM)) - (*ctx)->config.realm = strdup(params->realm); - else - krb5_get_default_realm(context, &(*ctx)->config.realm); - if(is_set(DBNAME)) - (*ctx)->config.dbname = strdup(params->dbname); - if(is_set(ACL_FILE)) - (*ctx)->config.acl_file = strdup(params->acl_file); - if(is_set(STASH_FILE)) - (*ctx)->config.stash_file = strdup(params->stash_file); - - find_db_spec(*ctx); - - /* PROFILE can't be specified for now */ - /* KADMIND_PORT is supposed to be used on the server also, - but this doesn't make sense */ - /* ADMIN_SERVER is client only */ - /* ADNAME is not used at all (as far as I can tell) */ - /* ADB_LOCKFILE ditto */ - /* DICT_FILE */ - /* ADMIN_KEYTAB */ - /* MKEY_FROM_KEYBOARD is not supported */ - /* MKEY_NAME neither */ - /* ENCTYPE */ - /* MAX_LIFE */ - /* MAX_RLIFE */ - /* EXPIRATION */ - /* FLAGS */ - /* ENCTYPES */ - - return 0; -} - -HDB * -_kadm5_s_get_db(void *server_handle) -{ - kadm5_server_context *context = server_handle; - return context->db; -} diff --git a/kerberosV/src/lib/kadm5/create_c.c b/kerberosV/src/lib/kadm5/create_c.c deleted file mode 100644 index fe7ceffb40c..00000000000 --- a/kerberosV/src/lib/kadm5/create_c.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 1997-2000, 2005-2006 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 "kadm5_locl.h" - -RCSID("$Id: create_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_create_principal(void *server_handle, - kadm5_principal_ent_t princ, - uint32_t mask, - const char *password) -{ - kadm5_client_context *context = server_handle; - kadm5_ret_t ret; - krb5_storage *sp; - unsigned char buf[1024]; - int32_t tmp; - krb5_data reply; - - ret = _kadm5_connect(server_handle); - if(ret) - return ret; - - sp = krb5_storage_from_mem(buf, sizeof(buf)); - if (sp == NULL) { - krb5_clear_error_message(context->context); - return ENOMEM; - } - krb5_store_int32(sp, kadm_create); - kadm5_store_principal_ent(sp, princ); - krb5_store_int32(sp, mask); - krb5_store_string(sp, password); - ret = _kadm5_client_send(context, sp); - krb5_storage_free(sp); - if (ret) - return ret; - ret = _kadm5_client_recv(context, &reply); - if(ret) - return ret; - sp = krb5_storage_from_data (&reply); - if (sp == NULL) { - krb5_clear_error_message(context->context); - krb5_data_free (&reply); - return ENOMEM; - } - krb5_ret_int32(sp, &tmp); - krb5_clear_error_message(context->context); - krb5_storage_free(sp); - krb5_data_free (&reply); - return tmp; -} - diff --git a/kerberosV/src/lib/kadm5/create_s.c b/kerberosV/src/lib/kadm5/create_s.c deleted file mode 100644 index 73eaed8c52c..00000000000 --- a/kerberosV/src/lib/kadm5/create_s.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 1997-2001 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 "kadm5_locl.h" - -RCSID("$Id: create_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -static kadm5_ret_t -get_default(kadm5_server_context *context, krb5_principal princ, - kadm5_principal_ent_t def) -{ - kadm5_ret_t ret; - krb5_principal def_principal; - krb5_const_realm realm = krb5_principal_get_realm(context->context, princ); - - ret = krb5_make_principal(context->context, &def_principal, - realm, "default", NULL); - if (ret) - return ret; - ret = kadm5_s_get_principal(context, def_principal, def, - KADM5_PRINCIPAL_NORMAL_MASK); - krb5_free_principal (context->context, def_principal); - return ret; -} - -static kadm5_ret_t -create_principal(kadm5_server_context *context, - kadm5_principal_ent_t princ, - uint32_t mask, - hdb_entry_ex *ent, - uint32_t required_mask, - uint32_t forbidden_mask) -{ - kadm5_ret_t ret; - kadm5_principal_ent_rec defrec, *defent; - uint32_t def_mask; - - if((mask & required_mask) != required_mask) - return KADM5_BAD_MASK; - if((mask & forbidden_mask)) - return KADM5_BAD_MASK; - if((mask & KADM5_POLICY) && strcmp(princ->policy, "default")) - /* XXX no real policies for now */ - return KADM5_UNK_POLICY; - memset(ent, 0, sizeof(*ent)); - ret = krb5_copy_principal(context->context, princ->principal, - &ent->entry.principal); - if(ret) - return ret; - - defent = &defrec; - ret = get_default(context, princ->principal, defent); - if(ret) { - defent = NULL; - def_mask = 0; - } else { - def_mask = KADM5_ATTRIBUTES | KADM5_MAX_LIFE | KADM5_MAX_RLIFE; - } - - ret = _kadm5_setup_entry(context, - ent, mask | def_mask, - princ, mask, - defent, def_mask); - if(defent) - kadm5_free_principal_ent(context, defent); - if (ret) - return ret; - - ent->entry.created_by.time = time(NULL); - - return krb5_copy_principal(context->context, context->caller, - &ent->entry.created_by.principal); -} - -kadm5_ret_t -kadm5_s_create_principal_with_key(void *server_handle, - kadm5_principal_ent_t princ, - uint32_t mask) -{ - kadm5_ret_t ret; - hdb_entry_ex ent; - kadm5_server_context *context = server_handle; - - ret = create_principal(context, princ, mask, &ent, - KADM5_PRINCIPAL | KADM5_KEY_DATA, - KADM5_LAST_PWD_CHANGE | KADM5_MOD_TIME - | KADM5_MOD_NAME | KADM5_MKVNO - | KADM5_AUX_ATTRIBUTES - | KADM5_POLICY_CLR | KADM5_LAST_SUCCESS - | KADM5_LAST_FAILED | KADM5_FAIL_AUTH_COUNT); - if(ret) - goto out; - - if ((mask & KADM5_KVNO) == 0) - ent.entry.kvno = 1; - - ret = hdb_seal_keys(context->context, context->db, &ent.entry); - if (ret) - goto out; - - ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0); - if(ret) - goto out; - ret = context->db->hdb_store(context->context, context->db, 0, &ent); - context->db->hdb_close(context->context, context->db); - if (ret) - goto out; - kadm5_log_create (context, &ent.entry); - -out: - hdb_free_entry(context->context, &ent); - return _kadm5_error_code(ret); -} - - -kadm5_ret_t -kadm5_s_create_principal(void *server_handle, - kadm5_principal_ent_t princ, - uint32_t mask, - const char *password) -{ - kadm5_ret_t ret; - hdb_entry_ex ent; - kadm5_server_context *context = server_handle; - - ret = create_principal(context, princ, mask, &ent, - KADM5_PRINCIPAL, - KADM5_LAST_PWD_CHANGE | KADM5_MOD_TIME - | KADM5_MOD_NAME | KADM5_MKVNO - | KADM5_AUX_ATTRIBUTES | KADM5_KEY_DATA - | KADM5_POLICY_CLR | KADM5_LAST_SUCCESS - | KADM5_LAST_FAILED | KADM5_FAIL_AUTH_COUNT); - if(ret) - goto out; - - if ((mask & KADM5_KVNO) == 0) - ent.entry.kvno = 1; - - ent.entry.keys.len = 0; - ent.entry.keys.val = NULL; - - ret = _kadm5_set_keys(context, &ent.entry, password); - if (ret) - goto out; - - ret = hdb_seal_keys(context->context, context->db, &ent.entry); - if (ret) - goto out; - - ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0); - if(ret) - goto out; - ret = context->db->hdb_store(context->context, context->db, 0, &ent); - context->db->hdb_close(context->context, context->db); - if (ret) - goto out; - - kadm5_log_create (context, &ent.entry); - - out: - hdb_free_entry(context->context, &ent); - return _kadm5_error_code(ret); -} - diff --git a/kerberosV/src/lib/kadm5/default_keys.c b/kerberosV/src/lib/kadm5/default_keys.c deleted file mode 100644 index ed9fbabd73d..00000000000 --- a/kerberosV/src/lib/kadm5/default_keys.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2003 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 "kadm5_locl.h" -#include - -RCSID("$Id: default_keys.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -static void -print_keys(krb5_context context, Key *keys, size_t nkeys) -{ - krb5_error_code ret; - char *str; - int i; - - printf("keys:\n"); - - for (i = 0; i < nkeys; i++) { - - ret = krb5_enctype_to_string(context, keys[i].key.keytype, &str); - if (ret) - krb5_err(context, ret, 1, "krb5_enctype_to_string: %d\n", - (int)keys[i].key.keytype); - - printf("\tenctype %s", str); - free(str); - - if (keys[i].salt) { - printf(" salt: "); - - switch (keys[i].salt->type) { - case KRB5_PW_SALT: - printf("pw-salt:"); - break; - case KRB5_AFS3_SALT: - printf("afs3-salt:"); - break; - default: - printf("unknown salt: %d", keys[i].salt->type); - break; - } - if (keys[i].salt->salt.length) - printf("%.*s", (int)keys[i].salt->salt.length, - (char *)keys[i].salt->salt.data); - } - printf("\n"); - } - printf("end keys:\n"); -} - -static void -parse_file(krb5_context context, krb5_principal principal, int no_salt) -{ - krb5_error_code ret; - size_t nkeys; - Key *keys; - - ret = hdb_generate_key_set(context, principal, &keys, &nkeys, no_salt); - if (ret) - krb5_err(context, 1, ret, "hdb_generate_key_set"); - - print_keys(context, keys, nkeys); - - hdb_free_keys(context, nkeys, keys); -} - -int -main(int argc, char **argv) -{ - krb5_error_code ret; - krb5_context context; - krb5_principal principal; - - ret = krb5_init_context(&context); - if (ret) - errx(1, "krb5_init_context"); - - ret = krb5_parse_name(context, "lha@SU.SE", &principal); - if (ret) - krb5_err(context, ret, 1, "krb5_parse_name"); - - parse_file(context, principal, 0); - parse_file(context, principal, 1); - - krb5_free_principal(context, principal); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/kadm5/delete_c.c b/kerberosV/src/lib/kadm5/delete_c.c deleted file mode 100644 index 52a9606ada5..00000000000 --- a/kerberosV/src/lib/kadm5/delete_c.c +++ /dev/null @@ -1,77 +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 "kadm5_locl.h" - -RCSID("$Id: delete_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_delete_principal(void *server_handle, krb5_principal princ) -{ - kadm5_client_context *context = server_handle; - kadm5_ret_t ret; - krb5_storage *sp; - unsigned char buf[1024]; - int32_t tmp; - krb5_data reply; - - ret = _kadm5_connect(server_handle); - if(ret) - return ret; - - sp = krb5_storage_from_mem(buf, sizeof(buf)); - if (sp == NULL) { - krb5_clear_error_message(context->context); - return ENOMEM; - } - krb5_store_int32(sp, kadm_delete); - krb5_store_principal(sp, princ); - ret = _kadm5_client_send(context, sp); - krb5_storage_free(sp); - if (ret) - return ret; - ret = _kadm5_client_recv(context, &reply); - if (ret) - return ret; - sp = krb5_storage_from_data (&reply); - if(sp == NULL) { - krb5_clear_error_message(context->context); - krb5_data_free (&reply); - return ENOMEM; - } - krb5_ret_int32(sp, &tmp); - krb5_clear_error_message(context->context); - krb5_storage_free(sp); - krb5_data_free (&reply); - return tmp; -} diff --git a/kerberosV/src/lib/kadm5/delete_s.c b/kerberosV/src/lib/kadm5/delete_s.c deleted file mode 100644 index 324126b42eb..00000000000 --- a/kerberosV/src/lib/kadm5/delete_s.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1997 - 2001, 2003, 2005 - 2006 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 "kadm5_locl.h" - -RCSID("$Id: delete_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_s_delete_principal(void *server_handle, krb5_principal princ) -{ - kadm5_server_context *context = server_handle; - kadm5_ret_t ret; - hdb_entry_ex ent; - - memset(&ent, 0, sizeof(ent)); - ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0); - if(ret) { - krb5_warn(context->context, ret, "opening database"); - return ret; - } - ret = context->db->hdb_fetch_kvno(context->context, context->db, princ, - HDB_F_DECRYPT|HDB_F_GET_ANY|HDB_F_ADMIN_DATA, 0, &ent); - if(ret == HDB_ERR_NOENTRY) - goto out; - if(ent.entry.flags.immutable) { - ret = KADM5_PROTECT_PRINCIPAL; - goto out2; - } - - ret = hdb_seal_keys(context->context, context->db, &ent.entry); - if (ret) - goto out2; - - ret = context->db->hdb_remove(context->context, context->db, princ); - if (ret) - goto out2; - - kadm5_log_delete (context, princ); - -out2: - hdb_free_entry(context->context, &ent); -out: - context->db->hdb_close(context->context, context->db); - return _kadm5_error_code(ret); -} diff --git a/kerberosV/src/lib/kadm5/destroy_c.c b/kerberosV/src/lib/kadm5/destroy_c.c deleted file mode 100644 index e8083182e68..00000000000 --- a/kerberosV/src/lib/kadm5/destroy_c.c +++ /dev/null @@ -1,55 +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 "kadm5_locl.h" - -RCSID("$Id: destroy_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_destroy(void *server_handle) -{ - kadm5_client_context *context = server_handle; - - free(context->realm); - free(context->admin_server); - close(context->sock); - if (context->client_name) - free(context->client_name); - if (context->service_name) - free(context->service_name); - if (context->ac != NULL) - krb5_auth_con_free(context->context, context->ac); - if(context->my_context) - krb5_free_context(context->context); - return 0; -} diff --git a/kerberosV/src/lib/kadm5/destroy_s.c b/kerberosV/src/lib/kadm5/destroy_s.c deleted file mode 100644 index a225b2afc4a..00000000000 --- a/kerberosV/src/lib/kadm5/destroy_s.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: destroy_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -/* - * dealloc a `kadm5_config_params' - */ - -static void -destroy_config (kadm5_config_params *c) -{ - free (c->realm); - free (c->dbname); - free (c->acl_file); - free (c->stash_file); -} - -/* - * dealloc a kadm5_log_context - */ - -static void -destroy_kadm5_log_context (kadm5_log_context *c) -{ - free (c->log_file); - rk_closesocket (c->socket_fd); -#ifdef NO_UNIX_SOCKETS - if (c->socket_info) { - freeaddrinfo(c->socket_info); - c->socket_info = NULL; - } -#endif -} - -/* - * destroy a kadm5 handle - */ - -kadm5_ret_t -kadm5_s_destroy(void *server_handle) -{ - kadm5_ret_t ret; - kadm5_server_context *context = server_handle; - krb5_context kcontext = context->context; - - ret = context->db->hdb_destroy(kcontext, context->db); - destroy_kadm5_log_context (&context->log_context); - destroy_config (&context->config); - krb5_free_principal (kcontext, context->caller); - if(context->my_context) - krb5_free_context(kcontext); - free (context); - return ret; -} diff --git a/kerberosV/src/lib/kadm5/ent_setup.c b/kerberosV/src/lib/kadm5/ent_setup.c deleted file mode 100644 index b98ad0b71a3..00000000000 --- a/kerberosV/src/lib/kadm5/ent_setup.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "kadm5_locl.h" - -RCSID("$Id: ent_setup.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -#define set_value(X, V) do { if((X) == NULL) (X) = malloc(sizeof(*(X))); *(X) = V; } while(0) -#define set_null(X) do { if((X) != NULL) free((X)); (X) = NULL; } while (0) - -static void -attr_to_flags(unsigned attr, HDBFlags *flags) -{ - flags->postdate = !(attr & KRB5_KDB_DISALLOW_POSTDATED); - flags->forwardable = !(attr & KRB5_KDB_DISALLOW_FORWARDABLE); - flags->initial = !!(attr & KRB5_KDB_DISALLOW_TGT_BASED); - flags->renewable = !(attr & KRB5_KDB_DISALLOW_RENEWABLE); - flags->proxiable = !(attr & KRB5_KDB_DISALLOW_PROXIABLE); - /* DUP_SKEY */ - flags->invalid = !!(attr & KRB5_KDB_DISALLOW_ALL_TIX); - flags->require_preauth = !!(attr & KRB5_KDB_REQUIRES_PRE_AUTH); - /* HW_AUTH */ - flags->server = !(attr & KRB5_KDB_DISALLOW_SVR); - flags->change_pw = !!(attr & KRB5_KDB_PWCHANGE_SERVICE); - flags->client = 1; /* XXX */ - flags->ok_as_delegate = !!(attr & KRB5_KDB_OK_AS_DELEGATE); - flags->trusted_for_delegation = !!(attr & KRB5_KDB_TRUSTED_FOR_DELEGATION); - flags->allow_kerberos4 = !!(attr & KRB5_KDB_ALLOW_KERBEROS4); - flags->allow_digest = !!(attr & KRB5_KDB_ALLOW_DIGEST); -} - -/* - * Modify the `ent' according to `tl_data'. - */ - -static kadm5_ret_t -perform_tl_data(krb5_context context, - HDB *db, - hdb_entry_ex *ent, - const krb5_tl_data *tl_data) -{ - kadm5_ret_t ret = 0; - - if (tl_data->tl_data_type == KRB5_TL_PASSWORD) { - heim_utf8_string pw = tl_data->tl_data_contents; - - if (pw[tl_data->tl_data_length] != '\0') - return KADM5_BAD_TL_TYPE; - - ret = hdb_entry_set_password(context, db, &ent->entry, pw); - - } else if (tl_data->tl_data_type == KRB5_TL_LAST_PWD_CHANGE) { - unsigned char *s; - time_t t; - - if (tl_data->tl_data_length != 4) - return KADM5_BAD_TL_TYPE; - - s = tl_data->tl_data_contents; - - t = s[0] | (s[1] << 8) | (s[2] << 16) | (s[3] << 24); - - ret = hdb_entry_set_pw_change_time(context, &ent->entry, t); - - } else if (tl_data->tl_data_type == KRB5_TL_EXTENSION) { - HDB_extension ext; - - ret = decode_HDB_extension(tl_data->tl_data_contents, - tl_data->tl_data_length, - &ext, - NULL); - if (ret) - return KADM5_BAD_TL_TYPE; - - ret = hdb_replace_extension(context, &ent->entry, &ext); - free_HDB_extension(&ext); - } else { - return KADM5_BAD_TL_TYPE; - } - return ret; -} - -static void -default_flags(hdb_entry_ex *ent, int server) -{ - ent->entry.flags.client = 1; - ent->entry.flags.server = !!server; - ent->entry.flags.forwardable = 1; - ent->entry.flags.proxiable = 1; - ent->entry.flags.renewable = 1; - ent->entry.flags.postdate = 1; -} - - -/* - * Create the hdb entry `ent' based on data from `princ' with - * `princ_mask' specifying what fields to be gotten from there and - * `mask' specifying what fields we want filled in. - */ - -kadm5_ret_t -_kadm5_setup_entry(kadm5_server_context *context, - hdb_entry_ex *ent, - uint32_t mask, - kadm5_principal_ent_t princ, - uint32_t princ_mask, - kadm5_principal_ent_t def, - uint32_t def_mask) -{ - if(mask & KADM5_PRINC_EXPIRE_TIME - && princ_mask & KADM5_PRINC_EXPIRE_TIME) { - if (princ->princ_expire_time) - set_value(ent->entry.valid_end, princ->princ_expire_time); - else - set_null(ent->entry.valid_end); - } - if(mask & KADM5_PW_EXPIRATION - && princ_mask & KADM5_PW_EXPIRATION) { - if (princ->pw_expiration) - set_value(ent->entry.pw_end, princ->pw_expiration); - else - set_null(ent->entry.pw_end); - } - if(mask & KADM5_ATTRIBUTES) { - if (princ_mask & KADM5_ATTRIBUTES) { - attr_to_flags(princ->attributes, &ent->entry.flags); - } else if(def_mask & KADM5_ATTRIBUTES) { - attr_to_flags(def->attributes, &ent->entry.flags); - ent->entry.flags.invalid = 0; - } else { - default_flags(ent, 1); - } - } - - if(mask & KADM5_MAX_LIFE) { - if(princ_mask & KADM5_MAX_LIFE) { - if(princ->max_life) - set_value(ent->entry.max_life, princ->max_life); - else - set_null(ent->entry.max_life); - } else if(def_mask & KADM5_MAX_LIFE) { - if(def->max_life) - set_value(ent->entry.max_life, def->max_life); - else - set_null(ent->entry.max_life); - } - } - if(mask & KADM5_KVNO - && princ_mask & KADM5_KVNO) - ent->entry.kvno = princ->kvno; - if(mask & KADM5_MAX_RLIFE) { - if(princ_mask & KADM5_MAX_RLIFE) { - if(princ->max_renewable_life) - set_value(ent->entry.max_renew, princ->max_renewable_life); - else - set_null(ent->entry.max_renew); - } else if(def_mask & KADM5_MAX_RLIFE) { - if(def->max_renewable_life) - set_value(ent->entry.max_renew, def->max_renewable_life); - else - set_null(ent->entry.max_renew); - } - } - if(mask & KADM5_KEY_DATA - && princ_mask & KADM5_KEY_DATA) { - _kadm5_set_keys2(context, &ent->entry, - princ->n_key_data, princ->key_data); - } - if(mask & KADM5_TL_DATA) { - krb5_tl_data *tl; - - for (tl = princ->tl_data; tl != NULL; tl = tl->tl_data_next) { - kadm5_ret_t ret; - ret = perform_tl_data(context->context, context->db, ent, tl); - if (ret) - return ret; - } - } - if(mask & KADM5_FAIL_AUTH_COUNT) { - /* XXX */ - } - return 0; -} diff --git a/kerberosV/src/lib/kadm5/error.c b/kerberosV/src/lib/kadm5/error.c deleted file mode 100644 index 9e548a759c2..00000000000 --- a/kerberosV/src/lib/kadm5/error.c +++ /dev/null @@ -1,48 +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. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: error.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -_kadm5_error_code(kadm5_ret_t code) -{ - switch(code){ - case HDB_ERR_EXISTS: - return KADM5_DUP; - case HDB_ERR_NOENTRY: - return KADM5_UNK_PRINC; - } - return code; -} diff --git a/kerberosV/src/lib/kadm5/flush.c b/kerberosV/src/lib/kadm5/flush.c deleted file mode 100644 index 40aab61532c..00000000000 --- a/kerberosV/src/lib/kadm5/flush.c +++ /dev/null @@ -1,48 +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. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: flush.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_s_flush(void *server_handle) -{ - return 0; -} - -kadm5_ret_t -kadm5_c_flush(void *server_handle) -{ - return 0; -} diff --git a/kerberosV/src/lib/kadm5/flush_c.c b/kerberosV/src/lib/kadm5/flush_c.c deleted file mode 100644 index 9c89ac39047..00000000000 --- a/kerberosV/src/lib/kadm5/flush_c.c +++ /dev/null @@ -1,41 +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 "kadm5_locl.h" - -RCSID("$Id: flush_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_flush(void *server_handle) -{ - return 0; -} diff --git a/kerberosV/src/lib/kadm5/flush_s.c b/kerberosV/src/lib/kadm5/flush_s.c deleted file mode 100644 index 68c9da74674..00000000000 --- a/kerberosV/src/lib/kadm5/flush_s.c +++ /dev/null @@ -1,41 +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 "kadm5_locl.h" - -RCSID("$Id: flush_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_s_flush(void *server_handle) -{ - return 0; -} diff --git a/kerberosV/src/lib/kadm5/free.c b/kerberosV/src/lib/kadm5/free.c deleted file mode 100644 index d6154a30d2d..00000000000 --- a/kerberosV/src/lib/kadm5/free.c +++ /dev/null @@ -1,91 +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 "kadm5_locl.h" - -RCSID("$Id: free.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -void -kadm5_free_key_data(void *server_handle, - int16_t *n_key_data, - krb5_key_data *key_data) -{ - int i; - for(i = 0; i < *n_key_data; i++){ - if(key_data[i].key_data_contents[0]){ - memset(key_data[i].key_data_contents[0], - 0, - key_data[i].key_data_length[0]); - free(key_data[i].key_data_contents[0]); - } - if(key_data[i].key_data_contents[1]) - free(key_data[i].key_data_contents[1]); - } - *n_key_data = 0; -} - - -void -kadm5_free_principal_ent(void *server_handle, - kadm5_principal_ent_t princ) -{ - kadm5_server_context *context = server_handle; - if(princ->principal) - krb5_free_principal(context->context, princ->principal); - if(princ->mod_name) - krb5_free_principal(context->context, princ->mod_name); - kadm5_free_key_data(server_handle, &princ->n_key_data, princ->key_data); - while(princ->n_tl_data && princ->tl_data) { - krb5_tl_data *tp; - tp = princ->tl_data; - princ->tl_data = tp->tl_data_next; - princ->n_tl_data--; - memset(tp->tl_data_contents, 0, tp->tl_data_length); - free(tp->tl_data_contents); - free(tp); - } - if (princ->key_data != NULL) - free (princ->key_data); -} - -void -kadm5_free_name_list(void *server_handle, - char **names, - int *count) -{ - int i; - for(i = 0; i < *count; i++) - free(names[i]); - free(names); - *count = 0; -} diff --git a/kerberosV/src/lib/kadm5/get_c.c b/kerberosV/src/lib/kadm5/get_c.c deleted file mode 100644 index a5a539befa7..00000000000 --- a/kerberosV/src/lib/kadm5/get_c.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 1997 - 2000, 2006 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 "kadm5_locl.h" - -RCSID("$Id: get_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_get_principal(void *server_handle, - krb5_principal princ, - kadm5_principal_ent_t out, - uint32_t mask) -{ - kadm5_client_context *context = server_handle; - kadm5_ret_t ret; - krb5_storage *sp; - unsigned char buf[1024]; - int32_t tmp; - krb5_data reply; - - ret = _kadm5_connect(server_handle); - if(ret) - return ret; - - sp = krb5_storage_from_mem(buf, sizeof(buf)); - if (sp == NULL) { - krb5_clear_error_message(context->context); - return ENOMEM; - } - krb5_store_int32(sp, kadm_get); - krb5_store_principal(sp, princ); - krb5_store_int32(sp, mask); - ret = _kadm5_client_send(context, sp); - krb5_storage_free(sp); - if(ret) - return ret; - ret = _kadm5_client_recv(context, &reply); - if (ret) - return ret; - sp = krb5_storage_from_data (&reply); - if (sp == NULL) { - krb5_clear_error_message(context->context); - krb5_data_free (&reply); - return ENOMEM; - } - krb5_ret_int32(sp, &tmp); - ret = tmp; - krb5_clear_error_message(context->context); - if(ret == 0) - kadm5_ret_principal_ent(sp, out); - krb5_storage_free(sp); - krb5_data_free (&reply); - return ret; -} diff --git a/kerberosV/src/lib/kadm5/get_princs_c.c b/kerberosV/src/lib/kadm5/get_princs_c.c deleted file mode 100644 index ddea4bfee7b..00000000000 --- a/kerberosV/src/lib/kadm5/get_princs_c.c +++ /dev/null @@ -1,92 +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 "kadm5_locl.h" - -RCSID("$Id: get_princs_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_get_principals(void *server_handle, - const char *expression, - char ***princs, - int *count) -{ - kadm5_client_context *context = server_handle; - kadm5_ret_t ret; - krb5_storage *sp; - unsigned char buf[1024]; - int32_t tmp; - krb5_data reply; - - ret = _kadm5_connect(server_handle); - if(ret) - return ret; - - sp = krb5_storage_from_mem(buf, sizeof(buf)); - if (sp == NULL) - return ENOMEM; - krb5_store_int32(sp, kadm_get_princs); - krb5_store_int32(sp, expression != NULL); - if(expression) - krb5_store_string(sp, expression); - ret = _kadm5_client_send(context, sp); - krb5_storage_free(sp); - if (ret) - return ret; - ret = _kadm5_client_recv(context, &reply); - if(ret) - return ret; - sp = krb5_storage_from_data (&reply); - if (sp == NULL) { - krb5_data_free (&reply); - return ENOMEM; - } - krb5_ret_int32(sp, &tmp); - ret = tmp; - if(ret == 0) { - int i; - krb5_ret_int32(sp, &tmp); - *princs = calloc(tmp + 1, sizeof(**princs)); - if (*princs == NULL) { - ret = ENOMEM; - goto out; - } - for(i = 0; i < tmp; i++) - krb5_ret_string(sp, &(*princs)[i]); - *count = tmp; - } -out: - krb5_storage_free(sp); - krb5_data_free (&reply); - return ret; -} diff --git a/kerberosV/src/lib/kadm5/get_princs_s.c b/kerberosV/src/lib/kadm5/get_princs_s.c deleted file mode 100644 index 6bfa71f36d4..00000000000 --- a/kerberosV/src/lib/kadm5/get_princs_s.c +++ /dev/null @@ -1,113 +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 "kadm5_locl.h" - -RCSID("$Id: get_princs_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -struct foreach_data { - const char *exp; - char *exp2; - char **princs; - int count; -}; - -static krb5_error_code -add_princ(struct foreach_data *d, char *princ) -{ - char **tmp; - tmp = realloc(d->princs, (d->count + 1) * sizeof(*tmp)); - if(tmp == NULL) - return ENOMEM; - d->princs = tmp; - d->princs[d->count++] = princ; - return 0; -} - -static krb5_error_code -foreach(krb5_context context, HDB *db, hdb_entry_ex *ent, void *data) -{ - struct foreach_data *d = data; - char *princ; - krb5_error_code ret; - ret = krb5_unparse_name(context, ent->entry.principal, &princ); - if(ret) - return ret; - if(d->exp){ - if(fnmatch(d->exp, princ, 0) == 0 || fnmatch(d->exp2, princ, 0) == 0) - ret = add_princ(d, princ); - else - free(princ); - }else{ - ret = add_princ(d, princ); - } - if(ret) - free(princ); - return ret; -} - -kadm5_ret_t -kadm5_s_get_principals(void *server_handle, - const char *expression, - char ***princs, - int *count) -{ - struct foreach_data d; - kadm5_server_context *context = server_handle; - kadm5_ret_t ret; - ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0); - if(ret) { - krb5_warn(context->context, ret, "opening database"); - return ret; - } - d.exp = expression; - { - krb5_realm r; - krb5_get_default_realm(context->context, &r); - asprintf(&d.exp2, "%s@%s", expression, r); - free(r); - } - d.princs = NULL; - d.count = 0; - ret = hdb_foreach(context->context, context->db, HDB_F_ADMIN_DATA, foreach, &d); - context->db->hdb_close(context->context, context->db); - if(ret == 0) - ret = add_princ(&d, NULL); - if(ret == 0){ - *princs = d.princs; - *count = d.count - 1; - }else - kadm5_free_name_list(context, d.princs, &d.count); - free(d.exp2); - return _kadm5_error_code(ret); -} diff --git a/kerberosV/src/lib/kadm5/get_s.c b/kerberosV/src/lib/kadm5/get_s.c deleted file mode 100644 index c81d62de4b4..00000000000 --- a/kerberosV/src/lib/kadm5/get_s.c +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright (c) 1997 - 2006 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 "kadm5_locl.h" - -RCSID("$Id: get_s.c,v 1.3 2013/06/19 19:36:53 robert Exp $"); - -static kadm5_ret_t -add_tl_data(kadm5_principal_ent_t ent, int16_t type, - const void *data, size_t size) -{ - krb5_tl_data *tl; - - tl = calloc(1, sizeof(*tl)); - if (tl == NULL) - return _kadm5_error_code(ENOMEM); - - tl->tl_data_type = type; - tl->tl_data_length = size; - tl->tl_data_contents = malloc(size); - if (tl->tl_data_contents == NULL && size != 0) { - free(tl); - return _kadm5_error_code(ENOMEM); - } - memcpy(tl->tl_data_contents, data, size); - - tl->tl_data_next = ent->tl_data; - ent->tl_data = tl; - ent->n_tl_data++; - - return 0; -} - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -_krb5_put_int(void *buffer, unsigned long value, size_t size); /* XXX */ - -kadm5_ret_t -kadm5_s_get_principal(void *server_handle, - krb5_principal princ, - kadm5_principal_ent_t out, - uint32_t mask) -{ - kadm5_server_context *context = server_handle; - kadm5_ret_t ret; - hdb_entry_ex ent; - - memset(&ent, 0, sizeof(ent)); - ret = context->db->hdb_open(context->context, context->db, O_RDONLY, 0); - if(ret) - return ret; - ret = context->db->hdb_fetch_kvno(context->context, context->db, princ, - HDB_F_DECRYPT|HDB_F_GET_ANY|HDB_F_ADMIN_DATA, 0, &ent); - context->db->hdb_close(context->context, context->db); - if(ret) - return _kadm5_error_code(ret); - - memset(out, 0, sizeof(*out)); - if(mask & KADM5_PRINCIPAL) - ret = krb5_copy_principal(context->context, ent.entry.principal, - &out->principal); - if(ret) - goto out; - if(mask & KADM5_PRINC_EXPIRE_TIME && ent.entry.valid_end) - out->princ_expire_time = *ent.entry.valid_end; - if(mask & KADM5_PW_EXPIRATION && ent.entry.pw_end) - out->pw_expiration = *ent.entry.pw_end; - if(mask & KADM5_LAST_PWD_CHANGE) - hdb_entry_get_pw_change_time(&ent.entry, &out->last_pwd_change); - if(mask & KADM5_ATTRIBUTES){ - out->attributes |= ent.entry.flags.postdate ? 0 : KRB5_KDB_DISALLOW_POSTDATED; - out->attributes |= ent.entry.flags.forwardable ? 0 : KRB5_KDB_DISALLOW_FORWARDABLE; - out->attributes |= ent.entry.flags.initial ? KRB5_KDB_DISALLOW_TGT_BASED : 0; - out->attributes |= ent.entry.flags.renewable ? 0 : KRB5_KDB_DISALLOW_RENEWABLE; - out->attributes |= ent.entry.flags.proxiable ? 0 : KRB5_KDB_DISALLOW_PROXIABLE; - out->attributes |= ent.entry.flags.invalid ? KRB5_KDB_DISALLOW_ALL_TIX : 0; - out->attributes |= ent.entry.flags.require_preauth ? KRB5_KDB_REQUIRES_PRE_AUTH : 0; - out->attributes |= ent.entry.flags.server ? 0 : KRB5_KDB_DISALLOW_SVR; - out->attributes |= ent.entry.flags.change_pw ? KRB5_KDB_PWCHANGE_SERVICE : 0; - out->attributes |= ent.entry.flags.ok_as_delegate ? KRB5_KDB_OK_AS_DELEGATE : 0; - out->attributes |= ent.entry.flags.trusted_for_delegation ? KRB5_KDB_TRUSTED_FOR_DELEGATION : 0; - out->attributes |= ent.entry.flags.allow_kerberos4 ? KRB5_KDB_ALLOW_KERBEROS4 : 0; - out->attributes |= ent.entry.flags.allow_digest ? KRB5_KDB_ALLOW_DIGEST : 0; - } - if(mask & KADM5_MAX_LIFE) { - if(ent.entry.max_life) - out->max_life = *ent.entry.max_life; - else - out->max_life = INT_MAX; - } - if(mask & KADM5_MOD_TIME) { - if(ent.entry.modified_by) - out->mod_date = ent.entry.modified_by->time; - else - out->mod_date = ent.entry.created_by.time; - } - if(mask & KADM5_MOD_NAME) { - if(ent.entry.modified_by) { - if (ent.entry.modified_by->principal != NULL) - ret = krb5_copy_principal(context->context, - ent.entry.modified_by->principal, - &out->mod_name); - } else if(ent.entry.created_by.principal != NULL) - ret = krb5_copy_principal(context->context, - ent.entry.created_by.principal, - &out->mod_name); - else - out->mod_name = NULL; - } - if(ret) - goto out; - - if(mask & KADM5_KVNO) - out->kvno = ent.entry.kvno; - if(mask & KADM5_MKVNO) { - size_t n; - out->mkvno = 0; /* XXX */ - for(n = 0; n < ent.entry.keys.len; n++) - if(ent.entry.keys.val[n].mkvno) { - out->mkvno = *ent.entry.keys.val[n].mkvno; /* XXX this isn't right */ - break; - } - } -#if 0 /* XXX implement */ - if(mask & KADM5_AUX_ATTRIBUTES) - ; - if(mask & KADM5_LAST_SUCCESS) - ; - if(mask & KADM5_LAST_FAILED) - ; - if(mask & KADM5_FAIL_AUTH_COUNT) - ; -#endif - if(mask & KADM5_POLICY) - out->policy = NULL; - if(mask & KADM5_MAX_RLIFE) { - if(ent.entry.max_renew) - out->max_renewable_life = *ent.entry.max_renew; - else - out->max_renewable_life = INT_MAX; - } - if(mask & KADM5_KEY_DATA){ - size_t i; - Key *key; - krb5_key_data *kd; - krb5_salt salt; - krb5_data *sp; - krb5_get_pw_salt(context->context, ent.entry.principal, &salt); - out->key_data = malloc(ent.entry.keys.len * sizeof(*out->key_data)); - if (out->key_data == NULL && ent.entry.keys.len != 0) { - ret = ENOMEM; - goto out; - } - for(i = 0; i < ent.entry.keys.len; i++){ - key = &ent.entry.keys.val[i]; - kd = &out->key_data[i]; - kd->key_data_ver = 2; - kd->key_data_kvno = ent.entry.kvno; - kd->key_data_type[0] = key->key.keytype; - if(key->salt) - kd->key_data_type[1] = key->salt->type; - else - kd->key_data_type[1] = KRB5_PADATA_PW_SALT; - /* setup key */ - kd->key_data_length[0] = key->key.keyvalue.length; - kd->key_data_contents[0] = malloc(kd->key_data_length[0]); - if(kd->key_data_contents[0] == NULL && kd->key_data_length[0] != 0){ - ret = ENOMEM; - break; - } - memcpy(kd->key_data_contents[0], key->key.keyvalue.data, - kd->key_data_length[0]); - /* setup salt */ - if(key->salt) - sp = &key->salt->salt; - else - sp = &salt.saltvalue; - kd->key_data_length[1] = sp->length; - kd->key_data_contents[1] = malloc(kd->key_data_length[1]); - if(kd->key_data_length[1] != 0 - && kd->key_data_contents[1] == NULL) { - memset(kd->key_data_contents[0], 0, kd->key_data_length[0]); - ret = ENOMEM; - break; - } - memcpy(kd->key_data_contents[1], sp->data, kd->key_data_length[1]); - out->n_key_data = i + 1; - } - krb5_free_salt(context->context, salt); - } - if(ret){ - kadm5_free_principal_ent(context, out); - goto out; - } - if(mask & KADM5_TL_DATA) { - time_t last_pw_expire; -#ifdef PKINIT - const HDB_Ext_PKINIT_acl *acl; -#endif - const HDB_Ext_Aliases *aliases; - - ret = hdb_entry_get_pw_change_time(&ent.entry, &last_pw_expire); - if (ret == 0 && last_pw_expire) { - unsigned char buf[4]; - _krb5_put_int(buf, last_pw_expire, sizeof(buf)); - ret = add_tl_data(out, KRB5_TL_LAST_PWD_CHANGE, buf, sizeof(buf)); - } - if(ret){ - kadm5_free_principal_ent(context, out); - goto out; - } - /* - * If the client was allowed to get key data, let it have the - * password too. - */ - if(mask & KADM5_KEY_DATA) { - heim_utf8_string pw; - - ret = hdb_entry_get_password(context->context, - context->db, &ent.entry, &pw); - if (ret == 0) { - ret = add_tl_data(out, KRB5_TL_PASSWORD, pw, strlen(pw) + 1); - free(pw); - } - krb5_clear_error_message(context->context); - } - -#ifdef PKINIT - ret = hdb_entry_get_pkinit_acl(&ent.entry, &acl); - if (ret == 0 && acl) { - krb5_data buf; - size_t len; - - ASN1_MALLOC_ENCODE(HDB_Ext_PKINIT_acl, buf.data, buf.length, - acl, &len, ret); - if (ret) { - kadm5_free_principal_ent(context, out); - goto out; - } - if (len != buf.length) - krb5_abortx(context->context, - "internal ASN.1 encoder error"); - ret = add_tl_data(out, KRB5_TL_PKINIT_ACL, buf.data, buf.length); - free(buf.data); - if (ret) { - kadm5_free_principal_ent(context, out); - goto out; - } - } - if(ret){ - kadm5_free_principal_ent(context, out); - goto out; - } -#endif - - ret = hdb_entry_get_aliases(&ent.entry, &aliases); - if (ret == 0 && aliases) { - krb5_data buf; - size_t len; - - ASN1_MALLOC_ENCODE(HDB_Ext_Aliases, buf.data, buf.length, - aliases, &len, ret); - if (ret) { - kadm5_free_principal_ent(context, out); - goto out; - } - if (len != buf.length) - krb5_abortx(context->context, - "internal ASN.1 encoder error"); - ret = add_tl_data(out, KRB5_TL_ALIASES, buf.data, buf.length); - free(buf.data); - if (ret) { - kadm5_free_principal_ent(context, out); - goto out; - } - } - if(ret){ - kadm5_free_principal_ent(context, out); - goto out; - } - - } -out: - hdb_free_entry(context->context, &ent); - - return _kadm5_error_code(ret); -} diff --git a/kerberosV/src/lib/kadm5/init_c.c b/kerberosV/src/lib/kadm5/init_c.c deleted file mode 100644 index 61f23bbf8ab..00000000000 --- a/kerberosV/src/lib/kadm5/init_c.c +++ /dev/null @@ -1,789 +0,0 @@ -/* - * Copyright (c) 1997 - 2006 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 "kadm5_locl.h" -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif - -RCSID("$Id: init_c.c,v 1.3 2013/06/17 18:57:43 robert Exp $"); - -static void -set_funcs(kadm5_client_context *c) -{ -#define SET(C, F) (C)->funcs.F = kadm5 ## _c_ ## F - SET(c, chpass_principal); - SET(c, chpass_principal_with_key); - SET(c, create_principal); - SET(c, delete_principal); - SET(c, destroy); - SET(c, flush); - SET(c, get_principal); - SET(c, get_principals); - SET(c, get_privs); - SET(c, modify_principal); - SET(c, randkey_principal); - SET(c, rename_principal); -} - -kadm5_ret_t -_kadm5_c_init_context(kadm5_client_context **ctx, - kadm5_config_params *params, - krb5_context context) -{ - krb5_error_code ret; - char *colon; - - *ctx = malloc(sizeof(**ctx)); - if(*ctx == NULL) - return ENOMEM; - memset(*ctx, 0, sizeof(**ctx)); - krb5_add_et_list (context, initialize_kadm5_error_table_r); - set_funcs(*ctx); - (*ctx)->context = context; - if(params->mask & KADM5_CONFIG_REALM) { - ret = 0; - (*ctx)->realm = strdup(params->realm); - if ((*ctx)->realm == NULL) - ret = ENOMEM; - } else - ret = krb5_get_default_realm((*ctx)->context, &(*ctx)->realm); - if (ret) { - free(*ctx); - return ret; - } - if(params->mask & KADM5_CONFIG_ADMIN_SERVER) - (*ctx)->admin_server = strdup(params->admin_server); - else { - char **hostlist; - - ret = krb5_get_krb_admin_hst (context, &(*ctx)->realm, &hostlist); - if (ret) { - free((*ctx)->realm); - free(*ctx); - return ret; - } - (*ctx)->admin_server = strdup(*hostlist); - krb5_free_krbhst (context, hostlist); - } - - if ((*ctx)->admin_server == NULL) { - free((*ctx)->realm); - free(*ctx); - return ENOMEM; - } - colon = strchr ((*ctx)->admin_server, ':'); - if (colon != NULL) - *colon++ = '\0'; - - (*ctx)->kadmind_port = 0; - - if(params->mask & KADM5_CONFIG_KADMIND_PORT) - (*ctx)->kadmind_port = params->kadmind_port; - else if (colon != NULL) { - char *end; - - (*ctx)->kadmind_port = htons(strtol (colon, &end, 0)); - } - if ((*ctx)->kadmind_port == 0) - (*ctx)->kadmind_port = krb5_getportbyname (context, "kerberos-adm", - "tcp", 749); - return 0; -} - -static krb5_error_code -get_kadm_ticket(krb5_context context, - krb5_ccache id, - krb5_principal client, - const char *server_name) -{ - krb5_error_code ret; - krb5_creds in, *out; - - memset(&in, 0, sizeof(in)); - in.client = client; - ret = krb5_parse_name(context, server_name, &in.server); - if(ret) - return ret; - ret = krb5_get_credentials(context, 0, id, &in, &out); - if(ret == 0) - krb5_free_creds(context, out); - krb5_free_principal(context, in.server); - return ret; -} - -static krb5_error_code -get_new_cache(krb5_context context, - krb5_principal client, - const char *password, - krb5_prompter_fct prompter, - const char *keytab, - const char *server_name, - krb5_ccache *ret_cache) -{ - krb5_error_code ret; - krb5_creds cred; - krb5_get_init_creds_opt *opt; - krb5_ccache id; - - ret = krb5_get_init_creds_opt_alloc (context, &opt); - if (ret) - return ret; - - krb5_get_init_creds_opt_set_default_flags(context, "kadmin", - krb5_principal_get_realm(context, - client), - opt); - - - krb5_get_init_creds_opt_set_forwardable (opt, FALSE); - krb5_get_init_creds_opt_set_proxiable (opt, FALSE); - - if(password == NULL && prompter == NULL) { - krb5_keytab kt; - if(keytab == NULL) - ret = krb5_kt_default(context, &kt); - else - ret = krb5_kt_resolve(context, keytab, &kt); - if(ret) { - krb5_get_init_creds_opt_free(context, opt); - return ret; - } - ret = krb5_get_init_creds_keytab (context, - &cred, - client, - kt, - 0, - server_name, - opt); - krb5_kt_close(context, kt); - } else { - ret = krb5_get_init_creds_password (context, - &cred, - client, - password, - prompter, - NULL, - 0, - server_name, - opt); - } - krb5_get_init_creds_opt_free(context, opt); - switch(ret){ - case 0: - break; - case KRB5_LIBOS_PWDINTR: /* don't print anything if it was just C-c:ed */ - case KRB5KRB_AP_ERR_BAD_INTEGRITY: - case KRB5KRB_AP_ERR_MODIFIED: - return KADM5_BAD_PASSWORD; - default: - return ret; - } - ret = krb5_cc_new_unique(context, krb5_cc_type_memory, NULL, &id); - if(ret) - return ret; - ret = krb5_cc_initialize (context, id, cred.client); - if (ret) - return ret; - ret = krb5_cc_store_cred (context, id, &cred); - if (ret) - return ret; - krb5_free_cred_contents (context, &cred); - *ret_cache = id; - return 0; -} - -/* - * Check the credential cache `id´ to figure out what principal to use - * when talking to the kadmind. If there is a initial kadmin/admin@ - * credential in the cache, use that client principal. Otherwise, use - * the client principals first component and add /admin to the - * principal. - */ - -static krb5_error_code -get_cache_principal(krb5_context context, - krb5_ccache *id, - krb5_principal *client) -{ - krb5_error_code ret; - const char *name, *inst; - krb5_principal p1, p2; - - ret = krb5_cc_default(context, id); - if(ret) { - *id = NULL; - return ret; - } - - ret = krb5_cc_get_principal(context, *id, &p1); - if(ret) { - krb5_cc_close(context, *id); - *id = NULL; - return ret; - } - - ret = krb5_make_principal(context, &p2, NULL, - "kadmin", "admin", NULL); - if (ret) { - krb5_cc_close(context, *id); - *id = NULL; - krb5_free_principal(context, p1); - return ret; - } - - { - krb5_creds in, *out; - krb5_kdc_flags flags; - - flags.i = 0; - memset(&in, 0, sizeof(in)); - - in.client = p1; - in.server = p2; - - /* check for initial ticket kadmin/admin */ - ret = krb5_get_credentials_with_flags(context, KRB5_GC_CACHED, flags, - *id, &in, &out); - krb5_free_principal(context, p2); - if (ret == 0) { - if (out->flags.b.initial) { - *client = p1; - krb5_free_creds(context, out); - return 0; - } - krb5_free_creds(context, out); - } - } - krb5_cc_close(context, *id); - *id = NULL; - - name = krb5_principal_get_comp_string(context, p1, 0); - inst = krb5_principal_get_comp_string(context, p1, 1); - if(inst == NULL || strcmp(inst, "admin") != 0) { - ret = krb5_make_principal(context, &p2, NULL, name, "admin", NULL); - krb5_free_principal(context, p1); - if(ret != 0) - return ret; - - *client = p2; - return 0; - } - - *client = p1; - - return 0; -} - -krb5_error_code -_kadm5_c_get_cred_cache(krb5_context context, - const char *client_name, - const char *server_name, - const char *password, - krb5_prompter_fct prompter, - const char *keytab, - krb5_ccache ccache, - krb5_ccache *ret_cache) -{ - krb5_error_code ret; - krb5_ccache id = NULL; - krb5_principal default_client = NULL, client = NULL; - - /* treat empty password as NULL */ - if(password && *password == '\0') - password = NULL; - if(server_name == NULL) - server_name = KADM5_ADMIN_SERVICE; - - if(client_name != NULL) { - ret = krb5_parse_name(context, client_name, &client); - if(ret) - return ret; - } - - if(ccache != NULL) { - id = ccache; - ret = krb5_cc_get_principal(context, id, &client); - if(ret) - return ret; - } else { - /* get principal from default cache, ok if this doesn't work */ - - ret = get_cache_principal(context, &id, &default_client); - if (ret) { - /* - * No client was specified by the caller and we cannot - * determine the client from a credentials cache. - */ - const char *user; - - user = get_default_username (); - - if(user == NULL) { - krb5_set_error_message(context, KADM5_FAILURE, "Unable to find local user name"); - return KADM5_FAILURE; - } - ret = krb5_make_principal(context, &default_client, - NULL, user, "admin", NULL); - if(ret) - return ret; - } - } - - - /* - * No client was specified by the caller, but we have a client - * from the default credentials cache. - */ - if (client == NULL && default_client != NULL) - client = default_client; - - - if(id && client && (default_client == NULL || - krb5_principal_compare(context, client, default_client) != 0)) { - ret = get_kadm_ticket(context, id, client, server_name); - if(ret == 0) { - *ret_cache = id; - krb5_free_principal(context, default_client); - if (default_client != client) - krb5_free_principal(context, client); - return 0; - } - if(ccache != NULL) - /* couldn't get ticket from cache */ - return -1; - } - /* get creds via AS request */ - if(id && (id != ccache)) - krb5_cc_close(context, id); - if (client != default_client) - krb5_free_principal(context, default_client); - - ret = get_new_cache(context, client, password, prompter, keytab, - server_name, ret_cache); - krb5_free_principal(context, client); - return ret; -} - -static kadm5_ret_t -kadm_connect(kadm5_client_context *ctx) -{ - kadm5_ret_t ret; - krb5_principal server; - krb5_ccache cc; - rk_socket_t s = rk_INVALID_SOCKET; - struct addrinfo *ai, *a; - struct addrinfo hints; - int error; - char portstr[NI_MAXSERV]; - char *hostname, *slash; - char *service_name; - krb5_context context = ctx->context; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - snprintf (portstr, sizeof(portstr), "%u", ntohs(ctx->kadmind_port)); - - hostname = ctx->admin_server; - slash = strchr (hostname, '/'); - if (slash != NULL) - hostname = slash + 1; - - error = getaddrinfo (hostname, portstr, &hints, &ai); - if (error) { - krb5_clear_error_message(context); - return KADM5_BAD_SERVER_NAME; - } - - for (a = ai; a != NULL; a = a->ai_next) { - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - krb5_clear_error_message(context); - krb5_warn (context, errno, "connect(%s)", hostname); - rk_closesocket (s); - continue; - } - break; - } - if (a == NULL) { - freeaddrinfo (ai); - krb5_clear_error_message(context); - krb5_warnx (context, "failed to contact %s", hostname); - return KADM5_FAILURE; - } - ret = _kadm5_c_get_cred_cache(context, - ctx->client_name, - ctx->service_name, - NULL, ctx->prompter, ctx->keytab, - ctx->ccache, &cc); - - if(ret) { - freeaddrinfo (ai); - rk_closesocket(s); - return ret; - } - - if (ctx->realm) - asprintf(&service_name, "%s@%s", KADM5_ADMIN_SERVICE, ctx->realm); - else - asprintf(&service_name, "%s", KADM5_ADMIN_SERVICE); - - if (service_name == NULL) { - freeaddrinfo (ai); - rk_closesocket(s); - krb5_clear_error_message(context); - return ENOMEM; - } - - ret = krb5_parse_name(context, service_name, &server); - free(service_name); - if(ret) { - freeaddrinfo (ai); - if(ctx->ccache == NULL) - krb5_cc_close(context, cc); - rk_closesocket(s); - return ret; - } - ctx->ac = NULL; - - ret = krb5_sendauth(context, &ctx->ac, &s, - KADMIN_APPL_VERSION, NULL, - server, AP_OPTS_MUTUAL_REQUIRED, - NULL, NULL, cc, NULL, NULL, NULL); - if(ret == 0) { - krb5_data params; - kadm5_config_params p; - memset(&p, 0, sizeof(p)); - if(ctx->realm) { - p.mask |= KADM5_CONFIG_REALM; - p.realm = ctx->realm; - } - ret = _kadm5_marshal_params(context, &p, ¶ms); - - ret = krb5_write_priv_message(context, ctx->ac, &s, ¶ms); - krb5_data_free(¶ms); - if(ret) { - freeaddrinfo (ai); - rk_closesocket(s); - if(ctx->ccache == NULL) - krb5_cc_close(context, cc); - return ret; - } - } else if(ret == KRB5_SENDAUTH_BADAPPLVERS) { - rk_closesocket(s); - - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) { - freeaddrinfo (ai); - krb5_clear_error_message(context); - return errno; - } - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - rk_closesocket (s); - freeaddrinfo (ai); - krb5_clear_error_message(context); - return errno; - } - ret = krb5_sendauth(context, &ctx->ac, &s, - KADMIN_OLD_APPL_VERSION, NULL, - server, AP_OPTS_MUTUAL_REQUIRED, - NULL, NULL, cc, NULL, NULL, NULL); - } - freeaddrinfo (ai); - if(ret) { - rk_closesocket(s); - return ret; - } - - krb5_free_principal(context, server); - if(ctx->ccache == NULL) - krb5_cc_close(context, cc); - ctx->sock = s; - - return 0; -} - -kadm5_ret_t -_kadm5_connect(void *handle) -{ - kadm5_client_context *ctx = handle; - if(ctx->sock == -1) - return kadm_connect(ctx); - return 0; -} - -static kadm5_ret_t -kadm5_c_init_with_context(krb5_context context, - const char *client_name, - const char *password, - krb5_prompter_fct prompter, - const char *keytab, - krb5_ccache ccache, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - kadm5_ret_t ret; - kadm5_client_context *ctx; - krb5_ccache cc; - - ret = _kadm5_c_init_context(&ctx, realm_params, context); - if(ret) - return ret; - - if(password != NULL && *password != '\0') { - ret = _kadm5_c_get_cred_cache(context, - client_name, - service_name, - password, prompter, keytab, ccache, &cc); - if(ret) - return ret; /* XXX */ - ccache = cc; - } - - - if (client_name != NULL) - ctx->client_name = strdup(client_name); - else - ctx->client_name = NULL; - if (service_name != NULL) - ctx->service_name = strdup(service_name); - else - ctx->service_name = NULL; - ctx->prompter = prompter; - ctx->keytab = keytab; - ctx->ccache = ccache; - /* maybe we should copy the params here */ - ctx->sock = -1; - - *server_handle = ctx; - return 0; -} - -static kadm5_ret_t -init_context(const char *client_name, - const char *password, - krb5_prompter_fct prompter, - const char *keytab, - krb5_ccache ccache, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - krb5_context context; - kadm5_ret_t ret; - kadm5_server_context *ctx; - - ret = krb5_init_context(&context); - if (ret) - return ret; - ret = kadm5_c_init_with_context(context, - client_name, - password, - prompter, - keytab, - ccache, - service_name, - realm_params, - struct_version, - api_version, - server_handle); - if(ret){ - krb5_free_context(context); - return ret; - } - ctx = *server_handle; - ctx->my_context = 1; - return 0; -} - -kadm5_ret_t -kadm5_c_init_with_password_ctx(krb5_context context, - const char *client_name, - const char *password, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_c_init_with_context(context, - client_name, - password, - krb5_prompter_posix, - NULL, - NULL, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_c_init_with_password(const char *client_name, - const char *password, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return init_context(client_name, - password, - krb5_prompter_posix, - NULL, - NULL, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_c_init_with_skey_ctx(krb5_context context, - const char *client_name, - const char *keytab, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_c_init_with_context(context, - client_name, - NULL, - NULL, - keytab, - NULL, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - - -kadm5_ret_t -kadm5_c_init_with_skey(const char *client_name, - const char *keytab, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return init_context(client_name, - NULL, - NULL, - keytab, - NULL, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_c_init_with_creds_ctx(krb5_context context, - const char *client_name, - krb5_ccache ccache, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_c_init_with_context(context, - client_name, - NULL, - NULL, - NULL, - ccache, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_c_init_with_creds(const char *client_name, - krb5_ccache ccache, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return init_context(client_name, - NULL, - NULL, - NULL, - ccache, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -#if 0 -kadm5_ret_t -kadm5_init(char *client_name, char *pass, - char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ -} -#endif - diff --git a/kerberosV/src/lib/kadm5/init_s.c b/kerberosV/src/lib/kadm5/init_s.c deleted file mode 100644 index 9d9e5793804..00000000000 --- a/kerberosV/src/lib/kadm5/init_s.c +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: init_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - - -static kadm5_ret_t -kadm5_s_init_with_context(krb5_context context, - const char *client_name, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - kadm5_ret_t ret; - kadm5_server_context *ctx; - ret = _kadm5_s_init_context(&ctx, realm_params, context); - if(ret) - return ret; - - assert(ctx->config.dbname != NULL); - assert(ctx->config.stash_file != NULL); - assert(ctx->config.acl_file != NULL); - assert(ctx->log_context.log_file != NULL); -#ifndef NO_UNIX_SOCKETS - assert(ctx->log_context.socket_name.sun_path[0] != '\0'); -#else - assert(ctx->log_context.socket_info != NULL); -#endif - - ret = hdb_create(ctx->context, &ctx->db, ctx->config.dbname); - if(ret) - return ret; - ret = hdb_set_master_keyfile (ctx->context, - ctx->db, ctx->config.stash_file); - if(ret) - return ret; - - ctx->log_context.log_fd = -1; - -#ifndef NO_UNIX_SOCKETS - ctx->log_context.socket_fd = socket (AF_UNIX, SOCK_DGRAM, 0); -#else - ctx->log_context.socket_fd = socket (ctx->log_context.socket_info->ai_family, - ctx->log_context.socket_info->ai_socktype, - ctx->log_context.socket_info->ai_protocol); -#endif - - ret = krb5_parse_name(ctx->context, client_name, &ctx->caller); - if(ret) - return ret; - - ret = _kadm5_acl_init(ctx); - if(ret) - return ret; - - *server_handle = ctx; - return 0; -} - -kadm5_ret_t -kadm5_s_init_with_password_ctx(krb5_context context, - const char *client_name, - const char *password, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_s_init_with_context(context, - client_name, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_s_init_with_password(const char *client_name, - const char *password, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - krb5_context context; - kadm5_ret_t ret; - kadm5_server_context *ctx; - - ret = krb5_init_context(&context); - if (ret) - return ret; - ret = kadm5_s_init_with_password_ctx(context, - client_name, - password, - service_name, - realm_params, - struct_version, - api_version, - server_handle); - if(ret){ - krb5_free_context(context); - return ret; - } - ctx = *server_handle; - ctx->my_context = 1; - return 0; -} - -kadm5_ret_t -kadm5_s_init_with_skey_ctx(krb5_context context, - const char *client_name, - const char *keytab, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_s_init_with_context(context, - client_name, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_s_init_with_skey(const char *client_name, - const char *keytab, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - krb5_context context; - kadm5_ret_t ret; - kadm5_server_context *ctx; - - ret = krb5_init_context(&context); - if (ret) - return ret; - ret = kadm5_s_init_with_skey_ctx(context, - client_name, - keytab, - service_name, - realm_params, - struct_version, - api_version, - server_handle); - if(ret){ - krb5_free_context(context); - return ret; - } - ctx = *server_handle; - ctx->my_context = 1; - return 0; -} - -kadm5_ret_t -kadm5_s_init_with_creds_ctx(krb5_context context, - const char *client_name, - krb5_ccache ccache, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_s_init_with_context(context, - client_name, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_s_init_with_creds(const char *client_name, - krb5_ccache ccache, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - krb5_context context; - kadm5_ret_t ret; - kadm5_server_context *ctx; - - ret = krb5_init_context(&context); - if (ret) - return ret; - ret = kadm5_s_init_with_creds_ctx(context, - client_name, - ccache, - service_name, - realm_params, - struct_version, - api_version, - server_handle); - if(ret){ - krb5_free_context(context); - return ret; - } - ctx = *server_handle; - ctx->my_context = 1; - return 0; -} diff --git a/kerberosV/src/lib/kadm5/iprop-commands.in b/kerberosV/src/lib/kadm5/iprop-commands.in deleted file mode 100644 index c8c88f5e168..00000000000 --- a/kerberosV/src/lib/kadm5/iprop-commands.in +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2005 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: iprop-commands.in,v 1.1 2013/06/17 18:57:43 robert Exp $ */ - -command = { - name = "dump" - option = { - long = "config-file" - short = "c" - type = "string" - help = "configuration file" - argument = "file" - } - option = { - long = "realm" - short = "r" - type = "string" - help = "realm" - } - function = "iprop_dump" - help = "Prints the iprop transaction log in text." - max_args = "0" -} -command = { - name = "truncate" - option = { - long = "config-file" - short = "c" - type = "string" - help = "configuration file" - argument = "file" - } - option = { - long = "realm" - short = "r" - type = "string" - help = "realm" - } - function = "iprop_truncate" - help = "Truncate the log, preserve the version number." - max_args = "0" -} -command = { - name = "replay" - option = { - long = "start-version" - type = "integer" - help = "start replay with this version" - argument = "version-number" - default = "-1" - } - option = { - long = "end-version" - type = "integer" - help = "end replay with this version" - argument = "version-number" - default = "-1" - } - option = { - long = "config-file" - short = "c" - type = "string" - help = "configuration file" - argument = "file" - } - option = { - long = "realm" - short = "r" - type = "string" - help = "realm" - } - function = "iprop_replay" - help = "Replay the log on the database." - max_args = "0" -} -command = { - name = "last-version" - option = { - long = "config-file" - short = "c" - type = "string" - help = "configuration file" - argument = "file" - } - option = { - long = "realm" - short = "r" - type = "string" - help = "realm" - } - function = "last_version" - help = "Print the last version of the log-file." - max_args = "0" -} -command = { - name = "help" - argument = "command" - max_args = "1" - function = "help" -} diff --git a/kerberosV/src/lib/kadm5/iprop-log-version.rc b/kerberosV/src/lib/kadm5/iprop-log-version.rc deleted file mode 100644 index b8a2295771d..00000000000 --- a/kerberosV/src/lib/kadm5/iprop-log-version.rc +++ /dev/null @@ -1,36 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2010, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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. - * - **********************************************************************/ - -#define RC_FILE_TYPE VFT_APP -#define RC_FILE_DESC_0409 "IProp Log Tool" -#define RC_FILE_ORIG_0409 "iprop-log.exe" - -#include "../../windows/version.rc" diff --git a/kerberosV/src/lib/kadm5/iprop-log.8 b/kerberosV/src/lib/kadm5/iprop-log.8 deleted file mode 100644 index a93f7613492..00000000000 --- a/kerberosV/src/lib/kadm5/iprop-log.8 +++ /dev/null @@ -1,141 +0,0 @@ -.\" $Id: iprop-log.8,v 1.1 2013/06/17 18:57:43 robert Exp $ -.\" -.\" Copyright (c) 2005 - 2007 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: iprop-log.8,v 1.1 2013/06/17 18:57:43 robert Exp $ -.\" -.Dd February 18, 2007 -.Dt IPROP-LOG 8 -.Os Heimdal -.Sh NAME -.Nm iprop-log -.Nd maintain the iprop log file -.Sh SYNOPSIS -.Nm -.Op Fl Fl version -.Op Fl h | Fl Fl help -.Ar command -.Pp -.Nm iprop-log truncate -.Oo Fl c Ar file \*(Ba Xo -.Fl Fl config-file= Ns Ar file -.Xc -.Oc -.Oo Fl r Ar string \*(Ba Xo -.Fl Fl realm= Ns Ar string -.Xc -.Oc -.Op Fl h | Fl Fl help -.Pp -.Nm iprop-log dump -.Oo Fl c Ar file \*(Ba Xo -.Fl Fl config-file= Ns Ar file -.Xc -.Oc -.Oo Fl r Ar string \*(Ba Xo -.Fl Fl realm= Ns Ar string -.Xc -.Oc -.Op Fl h | Fl Fl help -.Pp -.Nm iprop-log replay -.Op Fl Fl start-version= Ns Ar version-number -.Op Fl Fl end-version= Ns Ar version-number -.Oo Fl c Ar file \*(Ba Xo -.Fl Fl config-file= Ns Ar file -.Xc -.Oc -.Oo Fl r Ar string \*(Ba Xo -.Fl Fl realm= Ns Ar string -.Xc -.Oc -.Op Fl h | Fl Fl help -.Sh DESCRIPTION -Supported options: -.Bl -tag -width Ds -.It Fl Fl version -.It Fl h , Fl Fl help -.El -.Pp -command can be one of the following: -.Bl -tag -width truncate -.It truncate -.Bl -tag -width Ds -.It Fl c Ar file , Fl Fl config-file= Ns Ar file -configuration file -.It Fl r Ar string , Fl Fl realm= Ns Ar string -realm -.El -.Pp -Truncates the log. Sets the new logs version number for the to the -last entry of the old log. If the log is truncted by emptying the -file, the log will start over at the first version (0). -.It dump -.Bl -tag -width Ds -.It Fl c Ar file , Fl Fl config-file= Ns Ar file -configuration file -.It Xo -.Fl r Ar string , -.Fl Fl realm= Ns Ar string -.Xc -realm -.El -.Pp -Print out all entries in the log to standard output. -.It replay -.Bl -tag -width Ds -.It Fl Fl start-version= Ns Ar version-number -start replay with this version -.It Xo -.Fl Fl end-version= Ns Ar version-number -.Xc -end replay with this version -.It Fl c Ar file , Fl Fl config-file= Ns Ar file -configuration file -.It Fl r Ar string , Fl Fl realm= Ns Ar string -realm -.El -.Pp -Replay the changes from specified entries (or all if none is -specified) in the transaction log to the database. -.It last-version -.Bl -tag -width Ds -.It Fl c Ar file , Fl Fl config-file= Ns Ar file -configuration file -.It Fl r Ar string , Fl Fl realm= Ns Ar string -realm -.El -.Pp -prints the version of the last log entry. -.El -.Sh SEE ALSO -.Xr iprop 8 diff --git a/kerberosV/src/lib/kadm5/iprop-log.c b/kerberosV/src/lib/kadm5/iprop-log.c deleted file mode 100644 index a569497b160..00000000000 --- a/kerberosV/src/lib/kadm5/iprop-log.c +++ /dev/null @@ -1,489 +0,0 @@ -/* - * Copyright (c) 1997 - 2005 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 "iprop.h" -#include -#include -#include "iprop-commands.h" - -RCSID("$Id: iprop-log.c,v 1.1 2013/06/17 18:57:43 robert Exp $"); - -static krb5_context context; - -static kadm5_server_context * -get_kadmin_context(const char *config_file, char *realm) -{ - kadm5_config_params conf; - krb5_error_code ret; - void *kadm_handle; - char **files; - - if (config_file == NULL) { - char *file; - asprintf(&file, "%s/kdc.conf", hdb_db_dir(context)); - if (file == NULL) - errx(1, "out of memory"); - config_file = file; - } - - ret = krb5_prepend_config_files_default(config_file, &files); - if (ret) - krb5_err(context, 1, ret, "getting configuration files"); - - ret = krb5_set_config_files(context, files); - krb5_free_config_files(files); - if (ret) - krb5_err(context, 1, ret, "reading configuration files"); - - memset(&conf, 0, sizeof(conf)); - if(realm) { - conf.mask |= KADM5_CONFIG_REALM; - conf.realm = realm; - } - - ret = kadm5_init_with_password_ctx (context, - KADM5_ADMIN_SERVICE, - NULL, - KADM5_ADMIN_SERVICE, - &conf, 0, 0, - &kadm_handle); - if (ret) - krb5_err (context, 1, ret, "kadm5_init_with_password_ctx"); - - return (kadm5_server_context *)kadm_handle; -} - -/* - * dump log - */ - -static const char *op_names[] = { - "get", - "delete", - "create", - "rename", - "chpass", - "modify", - "randkey", - "get_privs", - "get_princs", - "chpass_with_key", - "nop" -}; - -static void -print_entry(kadm5_server_context *server_context, - uint32_t ver, - time_t timestamp, - enum kadm_ops op, - uint32_t len, - krb5_storage *sp, - void *ctx) -{ - char t[256]; - int32_t mask; - hdb_entry ent; - krb5_principal source; - char *name1, *name2; - krb5_data data; - krb5_context scontext = server_context->context; - - off_t end = krb5_storage_seek(sp, 0, SEEK_CUR) + len; - - krb5_error_code ret; - - strftime(t, sizeof(t), "%Y-%m-%d %H:%M:%S", localtime(×tamp)); - - if((int)op < (int)kadm_get || (int)op > (int)kadm_nop) { - printf("unknown op: %d\n", op); - krb5_storage_seek(sp, end, SEEK_SET); - return; - } - - printf ("%s: ver = %u, timestamp = %s, len = %u\n", - op_names[op], ver, t, len); - switch(op) { - case kadm_delete: - krb5_ret_principal(sp, &source); - krb5_unparse_name(scontext, source, &name1); - printf(" %s\n", name1); - free(name1); - krb5_free_principal(scontext, source); - break; - case kadm_rename: - ret = krb5_data_alloc(&data, len); - if (ret) - krb5_err (scontext, 1, ret, "kadm_rename: data alloc: %d", len); - krb5_ret_principal(sp, &source); - krb5_storage_read(sp, data.data, data.length); - hdb_value2entry(scontext, &data, &ent); - krb5_unparse_name(scontext, source, &name1); - krb5_unparse_name(scontext, ent.principal, &name2); - printf(" %s -> %s\n", name1, name2); - free(name1); - free(name2); - krb5_free_principal(scontext, source); - free_hdb_entry(&ent); - break; - case kadm_create: - ret = krb5_data_alloc(&data, len); - if (ret) - krb5_err (scontext, 1, ret, "kadm_create: data alloc: %d", len); - krb5_storage_read(sp, data.data, data.length); - ret = hdb_value2entry(scontext, &data, &ent); - if(ret) - abort(); - mask = ~0; - goto foo; - case kadm_modify: - ret = krb5_data_alloc(&data, len); - if (ret) - krb5_err (scontext, 1, ret, "kadm_modify: data alloc: %d", len); - krb5_ret_int32(sp, &mask); - krb5_storage_read(sp, data.data, data.length); - ret = hdb_value2entry(scontext, &data, &ent); - if(ret) - abort(); - foo: - if(ent.principal /* mask & KADM5_PRINCIPAL */) { - krb5_unparse_name(scontext, ent.principal, &name1); - printf(" principal = %s\n", name1); - free(name1); - } - if(mask & KADM5_PRINC_EXPIRE_TIME) { - if(ent.valid_end == NULL) { - strlcpy(t, "never", sizeof(t)); - } else { - strftime(t, sizeof(t), "%Y-%m-%d %H:%M:%S", - localtime(ent.valid_end)); - } - printf(" expires = %s\n", t); - } - if(mask & KADM5_PW_EXPIRATION) { - if(ent.pw_end == NULL) { - strlcpy(t, "never", sizeof(t)); - } else { - strftime(t, sizeof(t), "%Y-%m-%d %H:%M:%S", - localtime(ent.pw_end)); - } - printf(" password exp = %s\n", t); - } - if(mask & KADM5_LAST_PWD_CHANGE) { - } - if(mask & KADM5_ATTRIBUTES) { - unparse_flags(HDBFlags2int(ent.flags), - asn1_HDBFlags_units(), t, sizeof(t)); - printf(" attributes = %s\n", t); - } - if(mask & KADM5_MAX_LIFE) { - if(ent.max_life == NULL) - strlcpy(t, "for ever", sizeof(t)); - else - unparse_time(*ent.max_life, t, sizeof(t)); - printf(" max life = %s\n", t); - } - if(mask & KADM5_MAX_RLIFE) { - if(ent.max_renew == NULL) - strlcpy(t, "for ever", sizeof(t)); - else - unparse_time(*ent.max_renew, t, sizeof(t)); - printf(" max rlife = %s\n", t); - } - if(mask & KADM5_MOD_TIME) { - printf(" mod time\n"); - } - if(mask & KADM5_MOD_NAME) { - printf(" mod name\n"); - } - if(mask & KADM5_KVNO) { - printf(" kvno = %d\n", ent.kvno); - } - if(mask & KADM5_MKVNO) { - printf(" mkvno\n"); - } - if(mask & KADM5_AUX_ATTRIBUTES) { - printf(" aux attributes\n"); - } - if(mask & KADM5_POLICY) { - printf(" policy\n"); - } - if(mask & KADM5_POLICY_CLR) { - printf(" mod time\n"); - } - if(mask & KADM5_LAST_SUCCESS) { - printf(" last success\n"); - } - if(mask & KADM5_LAST_FAILED) { - printf(" last failed\n"); - } - if(mask & KADM5_FAIL_AUTH_COUNT) { - printf(" fail auth count\n"); - } - if(mask & KADM5_KEY_DATA) { - printf(" key data\n"); - } - if(mask & KADM5_TL_DATA) { - printf(" tl data\n"); - } - free_hdb_entry(&ent); - break; - case kadm_nop : - break; - default: - abort(); - } - krb5_storage_seek(sp, end, SEEK_SET); -} - -int -iprop_dump(struct dump_options *opt, int argc, char **argv) -{ - kadm5_server_context *server_context; - krb5_error_code ret; - - server_context = get_kadmin_context(opt->config_file_string, - opt->realm_string); - - ret = kadm5_log_init (server_context); - if (ret) - krb5_err (context, 1, ret, "kadm5_log_init"); - - ret = kadm5_log_foreach (server_context, print_entry, NULL); - if(ret) - krb5_warn(context, ret, "kadm5_log_foreach"); - - ret = kadm5_log_end (server_context); - if (ret) - krb5_warn(context, ret, "kadm5_log_end"); - return 0; -} - -int -iprop_truncate(struct truncate_options *opt, int argc, char **argv) -{ - kadm5_server_context *server_context; - krb5_error_code ret; - - server_context = get_kadmin_context(opt->config_file_string, - opt->realm_string); - - ret = kadm5_log_truncate (server_context); - if (ret) - krb5_err (context, 1, ret, "kadm5_log_truncate"); - - return 0; -} - -int -last_version(struct last_version_options *opt, int argc, char **argv) -{ - kadm5_server_context *server_context; - krb5_error_code ret; - uint32_t version; - - server_context = get_kadmin_context(opt->config_file_string, - opt->realm_string); - - ret = kadm5_log_init (server_context); - if (ret) - krb5_err (context, 1, ret, "kadm5_log_init"); - - ret = kadm5_log_get_version (server_context, &version); - if (ret) - krb5_err (context, 1, ret, "kadm5_log_get_version"); - - ret = kadm5_log_end (server_context); - if (ret) - krb5_warn(context, ret, "kadm5_log_end"); - - printf("version: %lu\n", (unsigned long)version); - - return 0; -} - -/* - * Replay log - */ - -int start_version = -1; -int end_version = -1; - -static void -apply_entry(kadm5_server_context *server_context, - uint32_t ver, - time_t timestamp, - enum kadm_ops op, - uint32_t len, - krb5_storage *sp, - void *ctx) -{ - struct replay_options *opt = ctx; - krb5_error_code ret; - - if((opt->start_version_integer != -1 && ver < (uint32_t)opt->start_version_integer) || - (opt->end_version_integer != -1 && ver > (uint32_t)opt->end_version_integer)) { - /* XXX skip this entry */ - krb5_storage_seek(sp, len, SEEK_CUR); - return; - } - printf ("ver %u... ", ver); - fflush (stdout); - - ret = kadm5_log_replay (server_context, - op, ver, len, sp); - if (ret) - krb5_warn (server_context->context, ret, "kadm5_log_replay"); - - printf ("done\n"); -} - -int -iprop_replay(struct replay_options *opt, int argc, char **argv) -{ - kadm5_server_context *server_context; - krb5_error_code ret; - - server_context = get_kadmin_context(opt->config_file_string, - opt->realm_string); - - ret = server_context->db->hdb_open(context, - server_context->db, - O_RDWR | O_CREAT, 0600); - if (ret) - krb5_err (context, 1, ret, "db->open"); - - ret = kadm5_log_init (server_context); - if (ret) - krb5_err (context, 1, ret, "kadm5_log_init"); - - ret = kadm5_log_foreach (server_context, apply_entry, opt); - if(ret) - krb5_warn(context, ret, "kadm5_log_foreach"); - ret = kadm5_log_end (server_context); - if (ret) - krb5_warn(context, ret, "kadm5_log_end"); - ret = server_context->db->hdb_close (context, server_context->db); - if (ret) - krb5_err (context, 1, ret, "db->close"); - - return 0; -} - -static int help_flag; -static int version_flag; - -static struct getargs args[] = { - { "version", 0, arg_flag, &version_flag, - NULL, NULL - }, - { "help", 'h', arg_flag, &help_flag, - NULL, NULL - } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -int -help(void *opt, int argc, char **argv) -{ - if(argc == 0) { - sl_help(commands, 1, argv - 1 /* XXX */); - } else { - SL_cmd *c = sl_match (commands, argv[0], 0); - if(c == NULL) { - fprintf (stderr, "No such command: %s. " - "Try \"help\" for a list of commands\n", - argv[0]); - } else { - if(c->func) { - static char shelp[] = "--help"; - char *fake[3]; - fake[0] = argv[0]; - fake[1] = shelp; - fake[2] = NULL; - (*c->func)(2, fake); - fprintf(stderr, "\n"); - } - if(c->help && *c->help) - fprintf (stderr, "%s\n", c->help); - if((++c)->name && c->func == NULL) { - int f = 0; - fprintf (stderr, "Synonyms:"); - while (c->name && c->func == NULL) { - fprintf (stderr, "%s%s", f ? ", " : " ", (c++)->name); - f = 1; - } - fprintf (stderr, "\n"); - } - } - } - return 0; -} - -static void -usage(int status) -{ - arg_printusage(args, num_args, NULL, "command"); - exit(status); -} - -int -main(int argc, char **argv) -{ - int optidx = 0; - krb5_error_code ret; - - setprogname(argv[0]); - - if(getarg(args, num_args, argc, argv, &optidx)) - usage(1); - if(help_flag) - usage(0); - if(version_flag) { - print_version(NULL); - exit(0); - } - argc -= optidx; - argv += optidx; - if(argc == 0) - usage(1); - - ret = krb5_init_context(&context); - if (ret) - errx(1, "krb5_init_context failed with: %d\n", ret); - - ret = sl_command(commands, argc, argv); - if(ret == -1) - warnx ("unrecognized command: %s", argv[0]); - return ret; -} diff --git a/kerberosV/src/lib/kadm5/iprop-log.cat8 b/kerberosV/src/lib/kadm5/iprop-log.cat8 deleted file mode 100644 index be5630ff1e5..00000000000 --- a/kerberosV/src/lib/kadm5/iprop-log.cat8 +++ /dev/null @@ -1,82 +0,0 @@ - -IPROP-LOG(8) BSD System Manager's Manual IPROP-LOG(8) - -NNAAMMEE - iipprroopp--lloogg -- maintain the iprop log file - -SSYYNNOOPPSSIISS - iipprroopp--lloogg [----vveerrssiioonn] [--hh | ----hheellpp] _c_o_m_m_a_n_d - - iipprroopp--lloogg ttrruunnccaattee [--cc _f_i_l_e | ----ccoonnffiigg--ffiillee==_f_i_l_e] [--rr _s_t_r_i_n_g | - ----rreeaallmm==_s_t_r_i_n_g] [--hh | ----hheellpp] - - iipprroopp--lloogg dduummpp [--cc _f_i_l_e | ----ccoonnffiigg--ffiillee==_f_i_l_e] [--rr _s_t_r_i_n_g | - ----rreeaallmm==_s_t_r_i_n_g] [--hh | ----hheellpp] - - iipprroopp--lloogg rreeppllaayy [----ssttaarrtt--vveerrssiioonn==_v_e_r_s_i_o_n_-_n_u_m_b_e_r] - [----eenndd--vveerrssiioonn==_v_e_r_s_i_o_n_-_n_u_m_b_e_r] [--cc _f_i_l_e | ----ccoonnffiigg--ffiillee==_f_i_l_e] - [--rr _s_t_r_i_n_g | ----rreeaallmm==_s_t_r_i_n_g] [--hh | ----hheellpp] - -DDEESSCCRRIIPPTTIIOONN - Supported options: - - ----vveerrssiioonn - - --hh, ----hheellpp - - command can be one of the following: - - truncate - - --cc _f_i_l_e, ----ccoonnffiigg--ffiillee==_f_i_l_e - configuration file - - --rr _s_t_r_i_n_g, ----rreeaallmm==_s_t_r_i_n_g - realm - - Truncates the log. Sets the new logs version number for the to - the last entry of the old log. If the log is truncted by emp- - tying the file, the log will start over at the first version - (0). - - dump - - --cc _f_i_l_e, ----ccoonnffiigg--ffiillee==_f_i_l_e - configuration file - - --rr _s_t_r_i_n_g, ----rreeaallmm==_s_t_r_i_n_g - realm - - Print out all entries in the log to standard output. - - replay - - ----ssttaarrtt--vveerrssiioonn==_v_e_r_s_i_o_n_-_n_u_m_b_e_r - start replay with this version - - ----eenndd--vveerrssiioonn==_v_e_r_s_i_o_n_-_n_u_m_b_e_r - end replay with this version - - --cc _f_i_l_e, ----ccoonnffiigg--ffiillee==_f_i_l_e - configuration file - - --rr _s_t_r_i_n_g, ----rreeaallmm==_s_t_r_i_n_g - realm - - Replay the changes from specified entries (or all if none is - specified) in the transaction log to the database. - - last-version - - --cc _f_i_l_e, ----ccoonnffiigg--ffiillee==_f_i_l_e - configuration file - - --rr _s_t_r_i_n_g, ----rreeaallmm==_s_t_r_i_n_g - realm - - prints the version of the last log entry. - -SSEEEE AALLSSOO - iprop(8) - -Heimdal February 18, 2007 Heimdal diff --git a/kerberosV/src/lib/kadm5/iprop.8 b/kerberosV/src/lib/kadm5/iprop.8 deleted file mode 100644 index 40a28291b44..00000000000 --- a/kerberosV/src/lib/kadm5/iprop.8 +++ /dev/null @@ -1,183 +0,0 @@ -.\" $Id: iprop.8,v 1.3 2013/06/17 18:57:43 robert Exp $ -.\" -.\" Copyright (c) 2005 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. -.\" -.Dd May 24, 2005 -.Dt IPROP 8 -.Os Heimdal -.Sh NAME -.Nm iprop , -.Nm ipropd-master , -.Nm ipropd-slave -.Nd propagate changes to a Heimdal Kerberos master KDC to slave KDCs -.Sh SYNOPSIS -.Nm ipropd-master -.Oo Fl c Ar string \*(Ba Xo -.Fl Fl config-file= Ns Ar string -.Xc -.Oc -.Oo Fl r Ar string \*(Ba Xo -.Fl Fl realm= Ns Ar string -.Xc -.Oc -.Oo Fl k Ar kspec \*(Ba Xo -.Fl Fl keytab= Ns Ar kspec -.Xc -.Oc -.Oo Fl d Ar file \*(Ba Xo -.Fl Fl database= Ns Ar file -.Xc -.Oc -.Op Fl Fl slave-stats-file= Ns Ar file -.Op Fl Fl time-missing= Ns Ar time -.Op Fl Fl time-gone= Ns Ar time -.Op Fl Fl detach -.Op Fl Fl version -.Op Fl Fl help -.Nm ipropd-slave -.Oo Fl c Ar string \*(Ba Xo -.Fl Fl config-file= Ns Ar string -.Xc -.Oc -.Oo Fl r Ar string \*(Ba Xo -.Fl Fl realm= Ns Ar string -.Xc -.Oc -.Oo Fl k Ar kspec \*(Ba Xo -.Fl Fl keytab= Ns Ar kspec -.Xc -.Oc -.Op Fl Fl time-lost= Ns Ar time -.Op Fl Fl detach -.Op Fl Fl version -.Op Fl Fl help -.Ar master -.Sh DESCRIPTION -.Nm ipropd-master -is used to propagate changes to a Heimdal Kerberos database from the -master Kerberos server on which it runs to slave Kerberos servers -running -.Nm ipropd-slave . -.Pp -The slaves are specified by the contents of the -.Pa slaves -file in the KDC's database directory, e.g.\& -.Pa /var/heimdal/slaves . -This has principals one per-line of the form -.Dl iprop/ Ns Ar slave Ns @ Ns Ar REALM -where -.Ar slave -is the hostname of the slave server in the given -.Ar REALM , -e.g.\& -.Dl iprop/kerberos-1.example.com@EXAMPLE.COM -On a slave, the argument -.Fa master -specifies the hostname of the master server from which to receive updates. -.Pp -In contrast to -.Xr hprop 8 , -which sends the whole database to the slaves regularly, -.Nm -normally sends only the changes as they happen on the master. -The master keeps track of all the changes by assigning a version -number to every change to the database. -The slaves know which was the latest version they saw, and in this -way it can be determined if they are in sync or not. -A log of all the changes is kept on the master. -When a slave is at an older version than the oldest one in the log, -the whole database has to be sent. -.Pp -The changes are propagated over a secure channel (on port 2121 by -default). -This should normally be defined as -.Dq iprop/tcp -in -.Pa /etc/services -or another source of the services database. -The master and slaves -must each have access to a keytab with keys for the -.Nm iprop -service principal on the local host. -.Pp -There is a keep-alive feature logged in the master's -.Pa slave-stats -file (e.g.\& -.Pa /var/heimdal/slave-stats ) . -.Pp -Supported options for -.Nm ipropd-master : -.Bl -tag -width Ds -.It Fl c Ar string , Fl Fl config-file= Ns Ar string -.It Fl r Ar string , Fl Fl realm= Ns Ar string -.It Fl k Ar kspec , Fl Fl keytab= Ns Ar kspec -keytab to get authentication from -.It Fl d Ar file , Fl Fl database= Ns Ar file -Database (default per KDC) -.It Fl Fl slave-stats-file= Ns Ar file -file for slave status information -.It Fl Fl time-missing= Ns Ar time -time before slave is polled for presence (default 2 min) -.It Fl Fl time-gone= Ns Ar time -time of inactivity after which a slave is considered gone (default 5 min) -.It Fl Fl detach -detach from console -.It Fl Fl version -.It Fl Fl help -.El -.Pp -Supported options for -.Nm ipropd-slave : -.Bl -tag -width Ds -.It Fl c Ar string , Fl Fl config-file= Ns Ar string -.It Fl r Ar string , Fl Fl realm= Ns Ar string -.It Fl k Ar kspec , Fl Fl keytab= Ns Ar kspec -keytab to get authentication from -.It Fl Fl time-lost= Ns Ar time -time before server is considered lost (default 5 min) -.It Fl Fl detach -detach from console -.It Fl Fl version -.It Fl Fl help -.El -Time arguments for the relevant options above may be specified in forms -like 5 min, 300 s, or simply a number of seconds. -.Sh FILES -.Pa slaves , -.Pa slave-stats -in the database directory. -.Sh SEE ALSO -.Xr krb5.conf 5 , -.Xr hprop 8 , -.Xr hpropd 8 , -.Xr iprop-log 8 , -.Xr kdc 8 . diff --git a/kerberosV/src/lib/kadm5/iprop.cat8 b/kerberosV/src/lib/kadm5/iprop.cat8 deleted file mode 100644 index b2aebb83965..00000000000 --- a/kerberosV/src/lib/kadm5/iprop.cat8 +++ /dev/null @@ -1,106 +0,0 @@ - -IPROP(8) BSD System Manager's Manual IPROP(8) - -NNAAMMEE - iipprroopp, iipprrooppdd--mmaasstteerr, iipprrooppdd--ssllaavvee -- propagate changes to a Heimdal Ker- - beros master KDC to slave KDCs - -SSYYNNOOPPSSIISS - iipprrooppdd--mmaasstteerr [--cc _s_t_r_i_n_g | ----ccoonnffiigg--ffiillee==_s_t_r_i_n_g] [--rr _s_t_r_i_n_g | - ----rreeaallmm==_s_t_r_i_n_g] [--kk _k_s_p_e_c | ----kkeeyyttaabb==_k_s_p_e_c] [--dd _f_i_l_e | - ----ddaattaabbaassee==_f_i_l_e] [----ssllaavvee--ssttaattss--ffiillee==_f_i_l_e] - [----ttiimmee--mmiissssiinngg==_t_i_m_e] [----ttiimmee--ggoonnee==_t_i_m_e] [----ddeettaacchh] - [----vveerrssiioonn] [----hheellpp] - iipprrooppdd--ssllaavvee [--cc _s_t_r_i_n_g | ----ccoonnffiigg--ffiillee==_s_t_r_i_n_g] [--rr _s_t_r_i_n_g | - ----rreeaallmm==_s_t_r_i_n_g] [--kk _k_s_p_e_c | ----kkeeyyttaabb==_k_s_p_e_c] - [----ttiimmee--lloosstt==_t_i_m_e] [----ddeettaacchh] [----vveerrssiioonn] [----hheellpp] _m_a_s_t_e_r - -DDEESSCCRRIIPPTTIIOONN - iipprrooppdd--mmaasstteerr is used to propagate changes to a Heimdal Kerberos database - from the master Kerberos server on which it runs to slave Kerberos - servers running iipprrooppdd--ssllaavvee. - - The slaves are specified by the contents of the _s_l_a_v_e_s file in the KDC's - database directory, e.g. _/_v_a_r_/_h_e_i_m_d_a_l_/_s_l_a_v_e_s. This has principals one - per-line of the form - iprop/_s_l_a_v_e@_R_E_A_L_M - where _s_l_a_v_e is the hostname of the slave server in the given _R_E_A_L_M, e.g. - iprop/kerberos-1.example.com@EXAMPLE.COM - On a slave, the argument _m_a_s_t_e_r specifies the hostname of the master - server from which to receive updates. - - In contrast to hprop(8), which sends the whole database to the slaves - regularly, iipprroopp normally sends only the changes as they happen on the - master. The master keeps track of all the changes by assigning a version - number to every change to the database. The slaves know which was the - latest version they saw, and in this way it can be determined if they are - in sync or not. A log of all the changes is kept on the master. When a - slave is at an older version than the oldest one in the log, the whole - database has to be sent. - - The changes are propagated over a secure channel (on port 2121 by - default). This should normally be defined as ``iprop/tcp'' in - _/_e_t_c_/_s_e_r_v_i_c_e_s or another source of the services database. The master and - slaves must each have access to a keytab with keys for the iipprroopp service - principal on the local host. - - There is a keep-alive feature logged in the master's _s_l_a_v_e_-_s_t_a_t_s file - (e.g. _/_v_a_r_/_h_e_i_m_d_a_l_/_s_l_a_v_e_-_s_t_a_t_s). - - Supported options for iipprrooppdd--mmaasstteerr: - - --cc _s_t_r_i_n_g, ----ccoonnffiigg--ffiillee==_s_t_r_i_n_g - - --rr _s_t_r_i_n_g, ----rreeaallmm==_s_t_r_i_n_g - - --kk _k_s_p_e_c, ----kkeeyyttaabb==_k_s_p_e_c - keytab to get authentication from - - --dd _f_i_l_e, ----ddaattaabbaassee==_f_i_l_e - Database (default per KDC) - - ----ssllaavvee--ssttaattss--ffiillee==_f_i_l_e - file for slave status information - - ----ttiimmee--mmiissssiinngg==_t_i_m_e - time before slave is polled for presence (default 2 min) - - ----ttiimmee--ggoonnee==_t_i_m_e - time of inactivity after which a slave is considered gone - (default 5 min) - - ----ddeettaacchh - detach from console - - ----vveerrssiioonn - - ----hheellpp - - Supported options for iipprrooppdd--ssllaavvee: - - --cc _s_t_r_i_n_g, ----ccoonnffiigg--ffiillee==_s_t_r_i_n_g - - --rr _s_t_r_i_n_g, ----rreeaallmm==_s_t_r_i_n_g - - --kk _k_s_p_e_c, ----kkeeyyttaabb==_k_s_p_e_c - keytab to get authentication from - - ----ttiimmee--lloosstt==_t_i_m_e - time before server is considered lost (default 5 min) - - ----ddeettaacchh - detach from console - - ----vveerrssiioonn - - ----hheellpp - Time arguments for the relevant options above may be specified in forms - like 5 min, 300 s, or simply a number of seconds. - -FFIILLEESS - _s_l_a_v_e_s, _s_l_a_v_e_-_s_t_a_t_s in the database directory. - -SSEEEE AALLSSOO - krb5.conf(5), hprop(8), hpropd(8), iprop-log(8), kdc(8). - -Heimdal May 24, 2005 Heimdal diff --git a/kerberosV/src/lib/kadm5/iprop.h b/kerberosV/src/lib/kadm5/iprop.h deleted file mode 100644 index 3a2ea5233ec..00000000000 --- a/kerberosV/src/lib/kadm5/iprop.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 1998-2003 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: iprop.h,v 1.5 2013/06/17 18:57:43 robert Exp $ */ - -#ifndef __IPROP_H__ -#define __IPROP_H__ - -#include "kadm5_locl.h" -#include -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_UTIL_H -#include -#endif - -#include - -#define IPROP_VERSION "iprop-0.0" - -#define IPROP_NAME "iprop" - -#define IPROP_SERVICE "iprop" - -#define IPROP_PORT 2121 - -enum iprop_cmd { I_HAVE = 1, - FOR_YOU = 2, - TELL_YOU_EVERYTHING = 3, - ONE_PRINC = 4, - NOW_YOU_HAVE = 5, - ARE_YOU_THERE = 6, - I_AM_HERE = 7 -}; - -extern sig_atomic_t exit_flag; -void setup_signal(void); - -#endif /* __IPROP_H__ */ diff --git a/kerberosV/src/lib/kadm5/ipropd-master-version.rc b/kerberosV/src/lib/kadm5/ipropd-master-version.rc deleted file mode 100644 index f51a8916869..00000000000 --- a/kerberosV/src/lib/kadm5/ipropd-master-version.rc +++ /dev/null @@ -1,36 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2010, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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. - * - **********************************************************************/ - -#define RC_FILE_TYPE VFT_APP -#define RC_FILE_DESC_0409 "IProp Master" -#define RC_FILE_ORIG_0409 "ipropd-master.exe" - -#include "../../windows/version.rc" diff --git a/kerberosV/src/lib/kadm5/ipropd-slave-version.rc b/kerberosV/src/lib/kadm5/ipropd-slave-version.rc deleted file mode 100644 index a1cee87e186..00000000000 --- a/kerberosV/src/lib/kadm5/ipropd-slave-version.rc +++ /dev/null @@ -1,36 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2010, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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. - * - **********************************************************************/ - -#define RC_FILE_TYPE VFT_APP -#define RC_FILE_DESC_0409 "IProp Slave" -#define RC_FILE_ORIG_0409 "ipropd-slave.exe" - -#include "../../windows/version.rc" diff --git a/kerberosV/src/lib/kadm5/ipropd_common.c b/kerberosV/src/lib/kadm5/ipropd_common.c deleted file mode 100644 index de562c12bbf..00000000000 --- a/kerberosV/src/lib/kadm5/ipropd_common.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 1997 - 2007 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 "iprop.h" -RCSID("$Id: ipropd_common.c,v 1.1 2013/06/17 18:57:43 robert Exp $"); - -sig_atomic_t exit_flag; - -static RETSIGTYPE -sigterm(int sig) -{ - exit_flag = sig; -} - -void -setup_signal(void) -{ -#ifdef HAVE_SIGACTION - { - struct sigaction sa; - - sa.sa_flags = 0; - sa.sa_handler = sigterm; - sigemptyset(&sa.sa_mask); - - sigaction(SIGINT, &sa, NULL); - sigaction(SIGTERM, &sa, NULL); - sigaction(SIGXCPU, &sa, NULL); - - sa.sa_handler = SIG_IGN; - sigaction(SIGPIPE, &sa, NULL); - } -#else - signal(SIGINT, sigterm); - signal(SIGTERM, sigterm); -#ifndef NO_SIGXCPU - signal(SIGXCPU, sigterm); -#endif -#ifndef NO_SIGPIPE - signal(SIGPIPE, SIG_IGN); -#endif -#endif -} diff --git a/kerberosV/src/lib/kadm5/ipropd_master.c b/kerberosV/src/lib/kadm5/ipropd_master.c deleted file mode 100644 index 492bbadbd2c..00000000000 --- a/kerberosV/src/lib/kadm5/ipropd_master.c +++ /dev/null @@ -1,974 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "iprop.h" -#include - -static krb5_log_facility *log_facility; - -const char *slave_stats_file; -const char *slave_time_missing = "2 min"; -const char *slave_time_gone = "5 min"; - -static int time_before_missing; -static int time_before_gone; - -const char *master_hostname; - -static krb5_socket_t -make_signal_socket (krb5_context context) -{ -#ifndef NO_UNIX_SOCKETS - struct sockaddr_un addr; - const char *fn; - krb5_socket_t fd; - - fn = kadm5_log_signal_socket(context); - - fd = socket (AF_UNIX, SOCK_DGRAM, 0); - if (fd < 0) - krb5_err (context, 1, errno, "socket AF_UNIX"); - memset (&addr, 0, sizeof(addr)); - addr.sun_family = AF_UNIX; - strlcpy (addr.sun_path, fn, sizeof(addr.sun_path)); - unlink (addr.sun_path); - if (bind (fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) - krb5_err (context, 1, errno, "bind %s", addr.sun_path); - return fd; -#else - struct addrinfo *ai = NULL; - krb5_socket_t fd; - - kadm5_log_signal_socket_info(context, 1, &ai); - - fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); - if (rk_IS_BAD_SOCKET(fd)) - krb5_err (context, 1, rk_SOCK_ERRNO, "socket AF=%d", ai->ai_family); - - if (rk_IS_SOCKET_ERROR( bind (fd, ai->ai_addr, ai->ai_addrlen) )) - krb5_err (context, 1, rk_SOCK_ERRNO, "bind"); - return fd; -#endif -} - -static krb5_socket_t -make_listen_socket (krb5_context context, const char *port_str) -{ - krb5_socket_t fd; - int one = 1; - struct sockaddr_in addr; - - fd = socket (AF_INET, SOCK_STREAM, 0); - if (rk_IS_BAD_SOCKET(fd)) - krb5_err (context, 1, rk_SOCK_ERRNO, "socket AF_INET"); - setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, (void *)&one, sizeof(one)); - memset (&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - - if (port_str) { - addr.sin_port = krb5_getportbyname (context, - port_str, "tcp", - 0); - if (addr.sin_port == 0) { - char *ptr; - long port; - - port = strtol (port_str, &ptr, 10); - if (port == 0 && ptr == port_str) - krb5_errx (context, 1, "bad port `%s'", port_str); - addr.sin_port = htons(port); - } - } else { - addr.sin_port = krb5_getportbyname (context, IPROP_SERVICE, - "tcp", IPROP_PORT); - } - if(bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) - krb5_err (context, 1, errno, "bind"); - if (listen(fd, SOMAXCONN) < 0) - krb5_err (context, 1, errno, "listen"); - return fd; -} - -struct slave { - krb5_socket_t fd; - struct sockaddr_in addr; - char *name; - krb5_auth_context ac; - uint32_t version; - time_t seen; - unsigned long flags; -#define SLAVE_F_DEAD 0x1 -#define SLAVE_F_AYT 0x2 - struct slave *next; -}; - -typedef struct slave slave; - -static int -check_acl (krb5_context context, const char *name) -{ - const char *fn; - FILE *fp; - char buf[256]; - int ret = 1; - char *slavefile = NULL; - - if (asprintf(&slavefile, "%s/slaves", hdb_db_dir(context)) == -1 - || slavefile == NULL) - errx(1, "out of memory"); - - fn = krb5_config_get_string_default(context, - NULL, - slavefile, - "kdc", - "iprop-acl", - NULL); - - fp = fopen (fn, "r"); - free(slavefile); - if (fp == NULL) - return 1; - while (fgets(buf, sizeof(buf), fp) != NULL) { - buf[strcspn(buf, "\r\n")] = '\0'; - if (strcmp (buf, name) == 0) { - ret = 0; - break; - } - } - fclose (fp); - return ret; -} - -static void -slave_seen(slave *s) -{ - s->flags &= ~SLAVE_F_AYT; - s->seen = time(NULL); -} - -static int -slave_missing_p (slave *s) -{ - if (time(NULL) > s->seen + time_before_missing) - return 1; - return 0; -} - -static int -slave_gone_p (slave *s) -{ - if (time(NULL) > s->seen + time_before_gone) - return 1; - return 0; -} - -static void -slave_dead(krb5_context context, slave *s) -{ - krb5_warnx(context, "slave %s dead", s->name); - - if (!rk_IS_BAD_SOCKET(s->fd)) { - rk_closesocket (s->fd); - s->fd = rk_INVALID_SOCKET; - } - s->flags |= SLAVE_F_DEAD; - slave_seen(s); -} - -static void -remove_slave (krb5_context context, slave *s, slave **root) -{ - slave **p; - - if (!rk_IS_BAD_SOCKET(s->fd)) - rk_closesocket (s->fd); - if (s->name) - free (s->name); - if (s->ac) - krb5_auth_con_free (context, s->ac); - - for (p = root; *p; p = &(*p)->next) - if (*p == s) { - *p = s->next; - break; - } - free (s); -} - -static void -add_slave (krb5_context context, krb5_keytab keytab, slave **root, - krb5_socket_t fd) -{ - krb5_principal server; - krb5_error_code ret; - slave *s; - socklen_t addr_len; - krb5_ticket *ticket = NULL; - char hostname[128]; - - s = malloc(sizeof(*s)); - if (s == NULL) { - krb5_warnx (context, "add_slave: no memory"); - return; - } - s->name = NULL; - s->ac = NULL; - - addr_len = sizeof(s->addr); - s->fd = accept (fd, (struct sockaddr *)&s->addr, &addr_len); - if (rk_IS_BAD_SOCKET(s->fd)) { - krb5_warn (context, rk_SOCK_ERRNO, "accept"); - goto error; - } - if (master_hostname) - strlcpy(hostname, master_hostname, sizeof(hostname)); - else - gethostname(hostname, sizeof(hostname)); - - ret = krb5_sname_to_principal (context, hostname, IPROP_NAME, - KRB5_NT_SRV_HST, &server); - if (ret) { - krb5_warn (context, ret, "krb5_sname_to_principal"); - goto error; - } - - ret = krb5_recvauth (context, &s->ac, &s->fd, - IPROP_VERSION, server, 0, keytab, &ticket); - krb5_free_principal (context, server); - if (ret) { - krb5_warn (context, ret, "krb5_recvauth"); - goto error; - } - ret = krb5_unparse_name (context, ticket->client, &s->name); - krb5_free_ticket (context, ticket); - if (ret) { - krb5_warn (context, ret, "krb5_unparse_name"); - goto error; - } - if (check_acl (context, s->name)) { - krb5_warnx (context, "%s not in acl", s->name); - goto error; - } - - { - slave *l = *root; - - while (l) { - if (strcmp(l->name, s->name) == 0) - break; - l = l->next; - } - if (l) { - if (l->flags & SLAVE_F_DEAD) { - remove_slave(context, l, root); - } else { - krb5_warnx (context, "second connection from %s", s->name); - goto error; - } - } - } - - krb5_warnx (context, "connection from %s", s->name); - - s->version = 0; - s->flags = 0; - slave_seen(s); - s->next = *root; - *root = s; - return; -error: - remove_slave(context, s, root); -} - -struct prop_context { - krb5_auth_context auth_context; - krb5_socket_t fd; -}; - -static int -prop_one (krb5_context context, HDB *db, hdb_entry_ex *entry, void *v) -{ - krb5_error_code ret; - krb5_storage *sp; - krb5_data data; - struct slave *s = (struct slave *)v; - - ret = hdb_entry2value (context, &entry->entry, &data); - if (ret) - return ret; - ret = krb5_data_realloc (&data, data.length + 4); - if (ret) { - krb5_data_free (&data); - return ret; - } - memmove ((char *)data.data + 4, data.data, data.length - 4); - sp = krb5_storage_from_data(&data); - if (sp == NULL) { - krb5_data_free (&data); - return ENOMEM; - } - krb5_store_int32(sp, ONE_PRINC); - krb5_storage_free(sp); - - ret = krb5_write_priv_message (context, s->ac, &s->fd, &data); - krb5_data_free (&data); - return ret; -} - -static int -send_complete (krb5_context context, slave *s, - const char *database, uint32_t current_version) -{ - krb5_error_code ret; - krb5_storage *sp; - HDB *db; - krb5_data data; - char buf[8]; - - ret = hdb_create (context, &db, database); - if (ret) - krb5_err (context, 1, ret, "hdb_create: %s", database); - ret = db->hdb_open (context, db, O_RDONLY, 0); - if (ret) - krb5_err (context, 1, ret, "db->open"); - - sp = krb5_storage_from_mem (buf, 4); - if (sp == NULL) - krb5_errx (context, 1, "krb5_storage_from_mem"); - krb5_store_int32 (sp, TELL_YOU_EVERYTHING); - krb5_storage_free (sp); - - data.data = buf; - data.length = 4; - - ret = krb5_write_priv_message(context, s->ac, &s->fd, &data); - - if (ret) { - krb5_warn (context, ret, "krb5_write_priv_message"); - slave_dead(context, s); - return ret; - } - - ret = hdb_foreach (context, db, HDB_F_ADMIN_DATA, prop_one, s); - if (ret) { - krb5_warn (context, ret, "hdb_foreach"); - slave_dead(context, s); - return ret; - } - - (*db->hdb_close)(context, db); - (*db->hdb_destroy)(context, db); - - sp = krb5_storage_from_mem (buf, 8); - if (sp == NULL) - krb5_errx (context, 1, "krb5_storage_from_mem"); - krb5_store_int32 (sp, NOW_YOU_HAVE); - krb5_store_int32 (sp, current_version); - krb5_storage_free (sp); - - data.length = 8; - - s->version = current_version; - - ret = krb5_write_priv_message(context, s->ac, &s->fd, &data); - if (ret) { - slave_dead(context, s); - krb5_warn (context, ret, "krb5_write_priv_message"); - return ret; - } - - slave_seen(s); - - return 0; -} - -static int -send_are_you_there (krb5_context context, slave *s) -{ - krb5_storage *sp; - krb5_data data; - char buf[4]; - int ret; - - if (s->flags & (SLAVE_F_DEAD|SLAVE_F_AYT)) - return 0; - - krb5_warnx(context, "slave %s missing, sending AYT", s->name); - - s->flags |= SLAVE_F_AYT; - - data.data = buf; - data.length = 4; - - sp = krb5_storage_from_mem (buf, 4); - if (sp == NULL) { - krb5_warnx (context, "are_you_there: krb5_data_alloc"); - slave_dead(context, s); - return 1; - } - krb5_store_int32 (sp, ARE_YOU_THERE); - krb5_storage_free (sp); - - ret = krb5_write_priv_message(context, s->ac, &s->fd, &data); - - if (ret) { - krb5_warn (context, ret, "are_you_there: krb5_write_priv_message"); - slave_dead(context, s); - return 1; - } - - return 0; -} - -static int -send_diffs (krb5_context context, slave *s, int log_fd, - const char *database, uint32_t current_version) -{ - krb5_storage *sp; - uint32_t ver; - time_t timestamp; - enum kadm_ops op; - uint32_t len; - off_t right, left; - krb5_data data; - int ret = 0; - - if (s->version == current_version) { - krb5_warnx(context, "slave %s in sync already at version %ld", - s->name, (long)s->version); - return 0; - } - - if (s->flags & SLAVE_F_DEAD) - return 0; - - /* if slave is a fresh client, starting over */ - if (s->version == 0) { - krb5_warnx(context, "sending complete log to fresh slave %s", - s->name); - return send_complete (context, s, database, current_version); - } - - sp = kadm5_log_goto_end (log_fd); - right = krb5_storage_seek(sp, 0, SEEK_CUR); - for (;;) { - ret = kadm5_log_previous (context, sp, &ver, ×tamp, &op, &len); - if (ret) - krb5_err(context, 1, ret, - "send_diffs: failed to find previous entry"); - left = krb5_storage_seek(sp, -16, SEEK_CUR); - if (ver == s->version) - return 0; - if (ver == s->version + 1) - break; - if (left == 0) { - krb5_storage_free(sp); - krb5_warnx(context, - "slave %s (version %lu) out of sync with master " - "(first version in log %lu), sending complete database", - s->name, (unsigned long)s->version, (unsigned long)ver); - return send_complete (context, s, database, current_version); - } - } - - krb5_warnx(context, - "syncing slave %s from version %lu to version %lu", - s->name, (unsigned long)s->version, - (unsigned long)current_version); - - ret = krb5_data_alloc (&data, right - left + 4); - if (ret) { - krb5_storage_free(sp); - krb5_warn (context, ret, "send_diffs: krb5_data_alloc"); - slave_dead(context, s); - return 1; - } - krb5_storage_read (sp, (char *)data.data + 4, data.length - 4); - krb5_storage_free(sp); - - sp = krb5_storage_from_data (&data); - if (sp == NULL) { - krb5_warnx (context, "send_diffs: krb5_storage_from_data"); - slave_dead(context, s); - return 1; - } - krb5_store_int32 (sp, FOR_YOU); - krb5_storage_free(sp); - - ret = krb5_write_priv_message(context, s->ac, &s->fd, &data); - krb5_data_free(&data); - - if (ret) { - krb5_warn (context, ret, "send_diffs: krb5_write_priv_message"); - slave_dead(context, s); - return 1; - } - slave_seen(s); - - s->version = current_version; - - return 0; -} - -static int -process_msg (krb5_context context, slave *s, int log_fd, - const char *database, uint32_t current_version) -{ - int ret = 0; - krb5_data out; - krb5_storage *sp; - int32_t tmp; - - ret = krb5_read_priv_message(context, s->ac, &s->fd, &out); - if(ret) { - krb5_warn (context, ret, "error reading message from %s", s->name); - return 1; - } - - sp = krb5_storage_from_mem (out.data, out.length); - if (sp == NULL) { - krb5_warnx (context, "process_msg: no memory"); - krb5_data_free (&out); - return 1; - } - if (krb5_ret_int32 (sp, &tmp) != 0) { - krb5_warnx (context, "process_msg: client send too short command"); - krb5_data_free (&out); - return 1; - } - switch (tmp) { - case I_HAVE : - ret = krb5_ret_int32 (sp, &tmp); - if (ret != 0) { - krb5_warnx (context, "process_msg: client send too I_HAVE data"); - break; - } - /* new started slave that have old log */ - if (s->version == 0 && tmp != 0) { - if (current_version < (uint32_t)tmp) { - krb5_warnx (context, "Slave %s (version %lu) have later version " - "the master (version %lu) OUT OF SYNC", - s->name, (unsigned long)tmp, - (unsigned long)current_version); - } - s->version = tmp; - } - if ((uint32_t)tmp < s->version) { - krb5_warnx (context, "Slave claims to not have " - "version we already sent to it"); - } else { - ret = send_diffs (context, s, log_fd, database, current_version); - } - break; - case I_AM_HERE : - break; - case ARE_YOU_THERE: - case FOR_YOU : - default : - krb5_warnx (context, "Ignoring command %d", tmp); - break; - } - - krb5_data_free (&out); - krb5_storage_free (sp); - - slave_seen(s); - - return ret; -} - -#define SLAVE_NAME "Name" -#define SLAVE_ADDRESS "Address" -#define SLAVE_VERSION "Version" -#define SLAVE_STATUS "Status" -#define SLAVE_SEEN "Last Seen" - -static FILE * -open_stats(krb5_context context) -{ - char *statfile = NULL; - const char *fn; - FILE *f; - - if (slave_stats_file) - fn = slave_stats_file; - else { - asprintf(&statfile, "%s/slaves-stats", hdb_db_dir(context)); - fn = krb5_config_get_string_default(context, - NULL, - statfile, - "kdc", - "iprop-stats", - NULL); - } - f = fopen(fn, "w"); - if (statfile) - free(statfile); - - return f; -} - -static void -write_master_down(krb5_context context) -{ - char str[100]; - time_t t = time(NULL); - FILE *fp; - - fp = open_stats(context); - if (fp == NULL) - return; - krb5_format_time(context, t, str, sizeof(str), TRUE); - fprintf(fp, "master down at %s\n", str); - - fclose(fp); -} - -static void -write_stats(krb5_context context, slave *slaves, uint32_t current_version) -{ - char str[100]; - rtbl_t tbl; - time_t t = time(NULL); - FILE *fp; - - fp = open_stats(context); - if (fp == NULL) - return; - - krb5_format_time(context, t, str, sizeof(str), TRUE); - fprintf(fp, "Status for slaves, last updated: %s\n\n", str); - - fprintf(fp, "Master version: %lu\n\n", (unsigned long)current_version); - - tbl = rtbl_create(); - if (tbl == NULL) { - fclose(fp); - return; - } - - rtbl_add_column(tbl, SLAVE_NAME, 0); - rtbl_add_column(tbl, SLAVE_ADDRESS, 0); - rtbl_add_column(tbl, SLAVE_VERSION, RTBL_ALIGN_RIGHT); - rtbl_add_column(tbl, SLAVE_STATUS, 0); - rtbl_add_column(tbl, SLAVE_SEEN, 0); - - rtbl_set_prefix(tbl, " "); - rtbl_set_column_prefix(tbl, SLAVE_NAME, ""); - - while (slaves) { - krb5_address addr; - krb5_error_code ret; - rtbl_add_column_entry(tbl, SLAVE_NAME, slaves->name); - ret = krb5_sockaddr2address (context, - (struct sockaddr*)&slaves->addr, &addr); - if(ret == 0) { - krb5_print_address(&addr, str, sizeof(str), NULL); - krb5_free_address(context, &addr); - rtbl_add_column_entry(tbl, SLAVE_ADDRESS, str); - } else - rtbl_add_column_entry(tbl, SLAVE_ADDRESS, ""); - - snprintf(str, sizeof(str), "%u", (unsigned)slaves->version); - rtbl_add_column_entry(tbl, SLAVE_VERSION, str); - - if (slaves->flags & SLAVE_F_DEAD) - rtbl_add_column_entry(tbl, SLAVE_STATUS, "Down"); - else - rtbl_add_column_entry(tbl, SLAVE_STATUS, "Up"); - - ret = krb5_format_time(context, slaves->seen, str, sizeof(str), TRUE); - rtbl_add_column_entry(tbl, SLAVE_SEEN, str); - - slaves = slaves->next; - } - - rtbl_format(tbl, fp); - rtbl_destroy(tbl); - - fclose(fp); -} - - -static char sHDB[] = "HDB:"; -static char *realm; -static int version_flag; -static int help_flag; -static char *keytab_str = sHDB; -static char *database; -static char *config_file; -static char *port_str; -#ifdef SUPPORT_DETACH -static int detach_from_console = 0; -#endif - -static struct getargs args[] = { - { "config-file", 'c', arg_string, &config_file, NULL, NULL }, - { "realm", 'r', arg_string, &realm, NULL, NULL }, - { "keytab", 'k', arg_string, &keytab_str, - "keytab to get authentication from", "kspec" }, - { "database", 'd', arg_string, &database, "database", "file"}, - { "slave-stats-file", 0, arg_string, rk_UNCONST(&slave_stats_file), - "file for slave status information", "file"}, - { "time-missing", 0, arg_string, rk_UNCONST(&slave_time_missing), - "time before slave is polled for presence", "time"}, - { "time-gone", 0, arg_string, rk_UNCONST(&slave_time_gone), - "time of inactivity after which a slave is considered gone", "time"}, - { "port", 0, arg_string, &port_str, - "port ipropd will listen to", "port"}, -#ifdef SUPPORT_DETACH - { "detach", 0, arg_flag, &detach_from_console, - "detach from console", NULL }, -#endif - { "hostname", 0, arg_string, rk_UNCONST(&master_hostname), - "hostname of master (if not same as hostname)", "hostname" }, - { "version", 0, arg_flag, &version_flag, NULL, NULL }, - { "help", 0, arg_flag, &help_flag, NULL, NULL } -}; -static int num_args = sizeof(args) / sizeof(args[0]); - -int -main(int argc, char **argv) -{ - krb5_error_code ret; - krb5_context context; - void *kadm_handle; - kadm5_server_context *server_context; - kadm5_config_params conf; - krb5_socket_t signal_fd, listen_fd; - int log_fd; - slave *slaves = NULL; - uint32_t current_version = 0, old_version = 0; - krb5_keytab keytab; - int optidx; - char **files; - - optidx = krb5_program_setup(&context, argc, argv, args, num_args, NULL); - - if(help_flag) - krb5_std_usage(0, args, num_args); - if(version_flag) { - print_version(NULL); - exit(0); - } - - setup_signal(); - - if (config_file == NULL) { - asprintf(&config_file, "%s/kdc.conf", hdb_db_dir(context)); - if (config_file == NULL) - errx(1, "out of memory"); - } - - ret = krb5_prepend_config_files_default(config_file, &files); - if (ret) - krb5_err(context, 1, ret, "getting configuration files"); - - ret = krb5_set_config_files(context, files); - krb5_free_config_files(files); - if (ret) - krb5_err(context, 1, ret, "reading configuration files"); - - time_before_gone = parse_time (slave_time_gone, "s"); - if (time_before_gone < 0) - krb5_errx (context, 1, "couldn't parse time: %s", slave_time_gone); - time_before_missing = parse_time (slave_time_missing, "s"); - if (time_before_missing < 0) - krb5_errx (context, 1, "couldn't parse time: %s", slave_time_missing); - -#ifdef SUPPORT_DETACH - if (detach_from_console) - daemon(0, 0); -#endif - pidfile (NULL); - krb5_openlog (context, "ipropd-master", &log_facility); - krb5_set_warn_dest(context, log_facility); - - ret = krb5_kt_register(context, &hdb_kt_ops); - if(ret) - krb5_err(context, 1, ret, "krb5_kt_register"); - - ret = krb5_kt_resolve(context, keytab_str, &keytab); - if(ret) - krb5_err(context, 1, ret, "krb5_kt_resolve: %s", keytab_str); - - memset(&conf, 0, sizeof(conf)); - if(realm) { - conf.mask |= KADM5_CONFIG_REALM; - conf.realm = realm; - } - ret = kadm5_init_with_skey_ctx (context, - KADM5_ADMIN_SERVICE, - NULL, - KADM5_ADMIN_SERVICE, - &conf, 0, 0, - &kadm_handle); - if (ret) - krb5_err (context, 1, ret, "kadm5_init_with_password_ctx"); - - server_context = (kadm5_server_context *)kadm_handle; - - log_fd = open (server_context->log_context.log_file, O_RDONLY, 0); - if (log_fd < 0) - krb5_err (context, 1, errno, "open %s", - server_context->log_context.log_file); - - signal_fd = make_signal_socket (context); - listen_fd = make_listen_socket (context, port_str); - - kadm5_log_get_version_fd (log_fd, ¤t_version); - - krb5_warnx(context, "ipropd-master started at version: %lu", - (unsigned long)current_version); - - while(exit_flag == 0){ - slave *p; - fd_set readset; - int max_fd = 0; - struct timeval to = {30, 0}; - uint32_t vers; - -#ifndef NO_LIMIT_FD_SETSIZE - if (signal_fd >= FD_SETSIZE || listen_fd >= FD_SETSIZE) - krb5_errx (context, 1, "fd too large"); -#endif - - FD_ZERO(&readset); - FD_SET(signal_fd, &readset); - max_fd = max(max_fd, signal_fd); - FD_SET(listen_fd, &readset); - max_fd = max(max_fd, listen_fd); - - for (p = slaves; p != NULL; p = p->next) { - if (p->flags & SLAVE_F_DEAD) - continue; - FD_SET(p->fd, &readset); - max_fd = max(max_fd, p->fd); - } - - ret = select (max_fd + 1, - &readset, NULL, NULL, &to); - if (ret < 0) { - if (errno == EINTR) - continue; - else - krb5_err (context, 1, errno, "select"); - } - - if (ret == 0) { - old_version = current_version; - kadm5_log_get_version_fd (log_fd, ¤t_version); - - if (current_version > old_version) { - krb5_warnx(context, - "Missed a signal, updating slaves %lu to %lu", - (unsigned long)old_version, - (unsigned long)current_version); - for (p = slaves; p != NULL; p = p->next) { - if (p->flags & SLAVE_F_DEAD) - continue; - send_diffs (context, p, log_fd, database, current_version); - } - } - } - - if (ret && FD_ISSET(signal_fd, &readset)) { -#ifndef NO_UNIX_SOCKETS - struct sockaddr_un peer_addr; -#else - struct sockaddr_storage peer_addr; -#endif - socklen_t peer_len = sizeof(peer_addr); - - if(recvfrom(signal_fd, (void *)&vers, sizeof(vers), 0, - (struct sockaddr *)&peer_addr, &peer_len) < 0) { - krb5_warn (context, errno, "recvfrom"); - continue; - } - --ret; - assert(ret >= 0); - old_version = current_version; - kadm5_log_get_version_fd (log_fd, ¤t_version); - if (current_version > old_version) { - krb5_warnx(context, - "Got a signal, updating slaves %lu to %lu", - (unsigned long)old_version, - (unsigned long)current_version); - for (p = slaves; p != NULL; p = p->next) { - if (p->flags & SLAVE_F_DEAD) - continue; - send_diffs (context, p, log_fd, database, current_version); - } - } else { - krb5_warnx(context, - "Got a signal, but no update in log version %lu", - (unsigned long)current_version); - } - } - - for(p = slaves; p != NULL; p = p->next) { - if (p->flags & SLAVE_F_DEAD) - continue; - if (ret && FD_ISSET(p->fd, &readset)) { - --ret; - assert(ret >= 0); - if(process_msg (context, p, log_fd, database, current_version)) - slave_dead(context, p); - } else if (slave_gone_p (p)) - slave_dead(context, p); - else if (slave_missing_p (p)) - send_are_you_there (context, p); - } - - if (ret && FD_ISSET(listen_fd, &readset)) { - add_slave (context, keytab, &slaves, listen_fd); - --ret; - assert(ret >= 0); - } - write_stats(context, slaves, current_version); - } - - if(exit_flag == SIGINT || exit_flag == SIGTERM) - krb5_warnx(context, "%s terminated", getprogname()); -#ifdef SIGXCPU - else if(exit_flag == SIGXCPU) - krb5_warnx(context, "%s CPU time limit exceeded", getprogname()); -#endif - else - krb5_warnx(context, "%s unexpected exit reason: %ld", - getprogname(), (long)exit_flag); - - write_master_down(context); - - return 0; -} diff --git a/kerberosV/src/lib/kadm5/ipropd_slave.c b/kerberosV/src/lib/kadm5/ipropd_slave.c deleted file mode 100644 index c66650be031..00000000000 --- a/kerberosV/src/lib/kadm5/ipropd_slave.c +++ /dev/null @@ -1,748 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "iprop.h" - -RCSID("$Id: ipropd_slave.c,v 1.8 2013/06/17 18:57:43 robert Exp $"); - -static const char *config_name = "ipropd-slave"; - -static krb5_log_facility *log_facility; -static char five_min[] = "5 min"; -static char *server_time_lost = five_min; -static int time_before_lost; -const char *slave_str = NULL; - -static int -connect_to_master (krb5_context context, const char *master, - const char *port_str) -{ - char port[NI_MAXSERV]; - struct addrinfo *ai, *a; - struct addrinfo hints; - int error; - int s = -1; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - - if (port_str == NULL) { - snprintf(port, sizeof(port), "%u", IPROP_PORT); - port_str = port; - } - - error = getaddrinfo (master, port_str, &hints, &ai); - if (error) { - krb5_warnx(context, "Failed to get address of to %s: %s", - master, gai_strerror(error)); - return -1; - } - - for (a = ai; a != NULL; a = a->ai_next) { - char node[NI_MAXHOST]; - error = getnameinfo(a->ai_addr, a->ai_addrlen, - node, sizeof(node), NULL, 0, NI_NUMERICHOST); - if (error) - strlcpy(node, "[unknown-addr]", sizeof(node)); - - s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (s < 0) - continue; - if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - krb5_warn(context, errno, "connection failed to %s[%s]", - master, node); - close (s); - continue; - } - krb5_warnx(context, "connection successful " - "to master: %s[%s]", master, node); - break; - } - freeaddrinfo (ai); - - if (a == NULL) - return -1; - - return s; -} - -static void -get_creds(krb5_context context, const char *keytab_str, - krb5_ccache *cache, const char *serverhost) -{ - krb5_keytab keytab; - krb5_principal client; - krb5_error_code ret; - krb5_get_init_creds_opt *init_opts; - krb5_creds creds; - char *server; - char keytab_buf[256]; - - if (keytab_str == NULL) { - ret = krb5_kt_default_name (context, keytab_buf, sizeof(keytab_buf)); - if (ret) - krb5_err (context, 1, ret, "krb5_kt_default_name"); - keytab_str = keytab_buf; - } - - ret = krb5_kt_resolve(context, keytab_str, &keytab); - if(ret) - krb5_err(context, 1, ret, "%s", keytab_str); - - - ret = krb5_sname_to_principal (context, slave_str, IPROP_NAME, - KRB5_NT_SRV_HST, &client); - if (ret) krb5_err(context, 1, ret, "krb5_sname_to_principal"); - - ret = krb5_get_init_creds_opt_alloc(context, &init_opts); - if (ret) krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc"); - - asprintf (&server, "%s/%s", IPROP_NAME, serverhost); - if (server == NULL) - krb5_errx (context, 1, "malloc: no memory"); - - ret = krb5_get_init_creds_keytab(context, &creds, client, keytab, - 0, server, init_opts); - free (server); - krb5_get_init_creds_opt_free(context, init_opts); - if(ret) krb5_err(context, 1, ret, "krb5_get_init_creds"); - - ret = krb5_kt_close(context, keytab); - if(ret) krb5_err(context, 1, ret, "krb5_kt_close"); - - ret = krb5_cc_new_unique(context, krb5_cc_type_memory, NULL, cache); - if(ret) krb5_err(context, 1, ret, "krb5_cc_new_unique"); - - ret = krb5_cc_initialize(context, *cache, client); - if(ret) krb5_err(context, 1, ret, "krb5_cc_initialize"); - - ret = krb5_cc_store_cred(context, *cache, &creds); - if(ret) krb5_err(context, 1, ret, "krb5_cc_store_cred"); - - krb5_free_cred_contents(context, &creds); - krb5_free_principal(context, client); -} - -static krb5_error_code -ihave (krb5_context context, krb5_auth_context auth_context, - int fd, uint32_t version) -{ - int ret; - u_char buf[8]; - krb5_storage *sp; - krb5_data data; - - sp = krb5_storage_from_mem (buf, 8); - krb5_store_int32 (sp, I_HAVE); - krb5_store_int32 (sp, version); - krb5_storage_free (sp); - data.length = 8; - data.data = buf; - - ret = krb5_write_priv_message(context, auth_context, &fd, &data); - if (ret) - krb5_warn (context, ret, "krb5_write_message"); - return ret; -} - -static void -receive_loop (krb5_context context, - krb5_storage *sp, - kadm5_server_context *server_context) -{ - int ret; - off_t left, right; - void *buf; - int32_t vers, vers2; - ssize_t sret; - - /* - * Seek to the current version of the local database. - */ - do { - int32_t len, timestamp, tmp; - enum kadm_ops op; - - if(krb5_ret_int32 (sp, &vers) != 0) - return; - krb5_ret_int32 (sp, ×tamp); - krb5_ret_int32 (sp, &tmp); - op = tmp; - krb5_ret_int32 (sp, &len); - if ((uint32_t)vers <= server_context->log_context.version) - krb5_storage_seek(sp, len + 8, SEEK_CUR); - } while((uint32_t)vers <= server_context->log_context.version); - - /* - * Read up rest of the entires into the memory... - */ - left = krb5_storage_seek (sp, -16, SEEK_CUR); - right = krb5_storage_seek (sp, 0, SEEK_END); - buf = malloc (right - left); - if (buf == NULL && (right - left) != 0) - krb5_errx (context, 1, "malloc: no memory"); - - /* - * ...and then write them out to the on-disk log. - */ - krb5_storage_seek (sp, left, SEEK_SET); - krb5_storage_read (sp, buf, right - left); - sret = write (server_context->log_context.log_fd, buf, right-left); - if (sret != right - left) - krb5_err(context, 1, errno, "Failed to write log to disk"); - ret = fsync (server_context->log_context.log_fd); - if (ret) - krb5_err(context, 1, errno, "Failed to sync log to disk"); - free (buf); - - /* - * Go back to the startpoint and start to commit the entires to - * the database. - */ - krb5_storage_seek (sp, left, SEEK_SET); - - for(;;) { - int32_t len, len2, timestamp, tmp; - off_t cur, cur2; - enum kadm_ops op; - - if(krb5_ret_int32 (sp, &vers) != 0) - break; - ret = krb5_ret_int32 (sp, ×tamp); - if (ret) krb5_errx(context, 1, "entry %ld: too short", (long)vers); - ret = krb5_ret_int32 (sp, &tmp); - if (ret) krb5_errx(context, 1, "entry %ld: too short", (long)vers); - op = tmp; - ret = krb5_ret_int32 (sp, &len); - if (ret) krb5_errx(context, 1, "entry %ld: too short", (long)vers); - if (len < 0) - krb5_errx(context, 1, "log is corrupted, " - "negative length of entry version %ld: %ld", - (long)vers, (long)len); - cur = krb5_storage_seek(sp, 0, SEEK_CUR); - - krb5_warnx (context, "replaying entry %d", (int)vers); - - ret = kadm5_log_replay (server_context, - op, vers, len, sp); - if (ret) { - const char *s = krb5_get_error_message(server_context->context, ret); - krb5_warnx (context, - "kadm5_log_replay: %ld. Lost entry entry, " - "Database out of sync ?: %s (%d)", - (long)vers, s ? s : "unknown error", ret); - krb5_free_error_message(context, s); - } - - { - /* - * Make sure the krb5_log_replay does the right thing wrt - * reading out data from the sp. - */ - cur2 = krb5_storage_seek(sp, 0, SEEK_CUR); - if (cur + len != cur2) - krb5_errx(context, 1, - "kadm5_log_reply version: %ld didn't read the whole entry", - (long)vers); - } - - if (krb5_ret_int32 (sp, &len2) != 0) - krb5_errx(context, 1, "entry %ld: postamble too short", (long)vers); - if(krb5_ret_int32 (sp, &vers2) != 0) - krb5_errx(context, 1, "entry %ld: postamble too short", (long)vers); - - if (len != len2) - krb5_errx(context, 1, "entry %ld: len != len2", (long)vers); - if (vers != vers2) - krb5_errx(context, 1, "entry %ld: vers != vers2", (long)vers); - } - - /* - * Update version - */ - - server_context->log_context.version = vers; -} - -static void -receive (krb5_context context, - krb5_storage *sp, - kadm5_server_context *server_context) -{ - int ret; - - ret = server_context->db->hdb_open(context, - server_context->db, - O_RDWR | O_CREAT, 0600); - if (ret) - krb5_err (context, 1, ret, "db->open"); - - receive_loop (context, sp, server_context); - - ret = server_context->db->hdb_close (context, server_context->db); - if (ret) - krb5_err (context, 1, ret, "db->close"); -} - -static void -send_im_here (krb5_context context, int fd, - krb5_auth_context auth_context) -{ - krb5_storage *sp; - krb5_data data; - int ret; - - ret = krb5_data_alloc (&data, 4); - if (ret) - krb5_err (context, 1, ret, "send_im_here"); - - sp = krb5_storage_from_data (&data); - if (sp == NULL) - krb5_errx (context, 1, "krb5_storage_from_data"); - krb5_store_int32(sp, I_AM_HERE); - krb5_storage_free(sp); - - ret = krb5_write_priv_message(context, auth_context, &fd, &data); - krb5_data_free(&data); - - if (ret) - krb5_err (context, 1, ret, "krb5_write_priv_message"); -} - -static krb5_error_code -receive_everything (krb5_context context, int fd, - kadm5_server_context *server_context, - krb5_auth_context auth_context) -{ - int ret; - krb5_data data; - int32_t vno = 0; - int32_t opcode; - krb5_storage *sp; - - char *dbname; - HDB *mydb; - - krb5_warnx(context, "receive complete database"); - - asprintf(&dbname, "%s-NEW", server_context->db->hdb_name); - ret = hdb_create(context, &mydb, dbname); - if(ret) - krb5_err(context,1, ret, "hdb_create"); - free(dbname); - - ret = hdb_set_master_keyfile (context, - mydb, server_context->config.stash_file); - if(ret) - krb5_err(context,1, ret, "hdb_set_master_keyfile"); - - /* I really want to use O_EXCL here, but given that I can't easily clean - up on error, I won't */ - ret = mydb->hdb_open(context, mydb, O_RDWR | O_CREAT | O_TRUNC, 0600); - if (ret) - krb5_err (context, 1, ret, "db->open"); - - sp = NULL; - do { - ret = krb5_read_priv_message(context, auth_context, &fd, &data); - - if (ret) { - krb5_warn (context, ret, "krb5_read_priv_message"); - goto cleanup; - } - - sp = krb5_storage_from_data (&data); - if (sp == NULL) - krb5_errx (context, 1, "krb5_storage_from_data"); - krb5_ret_int32 (sp, &opcode); - if (opcode == ONE_PRINC) { - krb5_data fake_data; - hdb_entry_ex entry; - - krb5_storage_free(sp); - - fake_data.data = (char *)data.data + 4; - fake_data.length = data.length - 4; - - memset(&entry, 0, sizeof(entry)); - - ret = hdb_value2entry (context, &fake_data, &entry.entry); - if (ret) - krb5_err (context, 1, ret, "hdb_value2entry"); - ret = mydb->hdb_store(server_context->context, - mydb, - 0, &entry); - if (ret) - krb5_err (context, 1, ret, "hdb_store"); - - hdb_free_entry (context, &entry); - krb5_data_free (&data); - } else if (opcode == NOW_YOU_HAVE) - ; - else - krb5_errx (context, 1, "strange opcode %d", opcode); - } while (opcode == ONE_PRINC); - - if (opcode != NOW_YOU_HAVE) - krb5_errx (context, 1, "receive_everything: strange %d", opcode); - - krb5_ret_int32 (sp, &vno); - krb5_storage_free(sp); - - ret = kadm5_log_reinit (server_context); - if (ret) - krb5_err(context, 1, ret, "kadm5_log_reinit"); - - ret = kadm5_log_set_version (server_context, vno - 1); - if (ret) - krb5_err (context, 1, ret, "kadm5_log_set_version"); - - ret = kadm5_log_nop (server_context); - if (ret) - krb5_err (context, 1, ret, "kadm5_log_nop"); - - ret = mydb->hdb_rename (context, mydb, server_context->db->hdb_name); - if (ret) - krb5_err (context, 1, ret, "db->rename"); - - cleanup: - krb5_data_free (&data); - - ret = mydb->hdb_close (context, mydb); - if (ret) - krb5_err (context, 1, ret, "db->close"); - - ret = mydb->hdb_destroy (context, mydb); - if (ret) - krb5_err (context, 1, ret, "db->destroy"); - - krb5_warnx(context, "receive complete database, version %ld", (long)vno); - return ret; -} - -static char *config_file; -static char *realm; -static int version_flag; -static int help_flag; -static char *keytab_str; -static char *port_str; -#ifdef SUPPORT_DETACH -static int detach_from_console = 0; -#endif - -static struct getargs args[] = { - { "config-file", 'c', arg_string, &config_file, NULL, NULL }, - { "realm", 'r', arg_string, &realm, NULL, NULL }, - { "keytab", 'k', arg_string, &keytab_str, - "keytab to get authentication from", "kspec" }, - { "time-lost", 0, arg_string, &server_time_lost, - "time before server is considered lost", "time" }, - { "port", 0, arg_string, &port_str, - "port ipropd-slave will connect to", "port"}, -#ifdef SUPPORT_DETACH - { "detach", 0, arg_flag, &detach_from_console, - "detach from console", NULL }, -#endif - { "hostname", 0, arg_string, rk_UNCONST(&slave_str), - "hostname of slave (if not same as hostname)", "hostname" }, - { "version", 0, arg_flag, &version_flag, NULL, NULL }, - { "help", 0, arg_flag, &help_flag, NULL, NULL } -}; - -static int num_args = sizeof(args) / sizeof(args[0]); - -static void -usage(int status) -{ - arg_printusage(args, num_args, NULL, "master"); - exit(status); -} - -int -main(int argc, char **argv) -{ - krb5_error_code ret; - krb5_context context; - krb5_auth_context auth_context; - void *kadm_handle; - kadm5_server_context *server_context; - kadm5_config_params conf; - int master_fd; - krb5_ccache ccache; - krb5_principal server; - char **files; - int optidx = 0; - time_t reconnect_min; - time_t backoff; - time_t reconnect_max; - time_t reconnect; - time_t before = 0; - - const char *master; - - setprogname(argv[0]); - - if(getarg(args, num_args, argc, argv, &optidx)) - usage(1); - - if(help_flag) - usage(0); - if(version_flag) { - print_version(NULL); - exit(0); - } - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - setup_signal(); - - if (config_file == NULL) { - if (asprintf(&config_file, "%s/kdc.conf", hdb_db_dir(context)) == -1 - || config_file == NULL) - errx(1, "out of memory"); - } - - ret = krb5_prepend_config_files_default(config_file, &files); - if (ret) - krb5_err(context, 1, ret, "getting configuration files"); - - ret = krb5_set_config_files(context, files); - krb5_free_config_files(files); - if (ret) - krb5_err(context, 1, ret, "reading configuration files"); - - argc -= optidx; - argv += optidx; - - if (argc != 1) - usage(1); - - master = argv[0]; - -#ifdef SUPPORT_DETACH - if (detach_from_console) - daemon(0, 0); -#endif - pidfile (NULL); - krb5_openlog (context, "ipropd-slave", &log_facility); - krb5_set_warn_dest(context, log_facility); - - ret = krb5_kt_register(context, &hdb_kt_ops); - if(ret) - krb5_err(context, 1, ret, "krb5_kt_register"); - - time_before_lost = parse_time (server_time_lost, "s"); - if (time_before_lost < 0) - krb5_errx (context, 1, "couldn't parse time: %s", server_time_lost); - - memset(&conf, 0, sizeof(conf)); - if(realm) { - conf.mask |= KADM5_CONFIG_REALM; - conf.realm = realm; - } - ret = kadm5_init_with_password_ctx (context, - KADM5_ADMIN_SERVICE, - NULL, - KADM5_ADMIN_SERVICE, - &conf, 0, 0, - &kadm_handle); - if (ret) - krb5_err (context, 1, ret, "kadm5_init_with_password_ctx"); - - server_context = (kadm5_server_context *)kadm_handle; - - ret = kadm5_log_init (server_context); - if (ret) - krb5_err (context, 1, ret, "kadm5_log_init"); - - get_creds(context, keytab_str, &ccache, master); - - ret = krb5_sname_to_principal (context, master, IPROP_NAME, - KRB5_NT_SRV_HST, &server); - if (ret) - krb5_err (context, 1, ret, "krb5_sname_to_principal"); - - auth_context = NULL; - master_fd = -1; - - krb5_appdefault_time(context, config_name, NULL, "reconnect-min", - 10, &reconnect_min); - krb5_appdefault_time(context, config_name, NULL, "reconnect-max", - 300, &reconnect_max); - krb5_appdefault_time(context, config_name, NULL, "reconnect-backoff", - 10, &backoff); - reconnect = reconnect_min; - - while (!exit_flag) { - time_t now, elapsed; - int connected = FALSE; - - now = time(NULL); - elapsed = now - before; - - if (elapsed < reconnect) { - time_t left = reconnect - elapsed; - krb5_warnx(context, "sleeping %d seconds before " - "retrying to connect", (int)left); - sleep(left); - } - before = now; - - master_fd = connect_to_master (context, master, port_str); - if (master_fd < 0) - goto retry; - - reconnect = reconnect_min; - - if (auth_context) { - krb5_auth_con_free(context, auth_context); - auth_context = NULL; - krb5_cc_destroy(context, ccache); - get_creds(context, keytab_str, &ccache, master); - } - ret = krb5_sendauth (context, &auth_context, &master_fd, - IPROP_VERSION, NULL, server, - AP_OPTS_MUTUAL_REQUIRED, NULL, NULL, - ccache, NULL, NULL, NULL); - if (ret) { - krb5_warn (context, ret, "krb5_sendauth"); - goto retry; - } - - krb5_warnx(context, "ipropd-slave started at version: %ld", - (long)server_context->log_context.version); - - ret = ihave (context, auth_context, master_fd, - server_context->log_context.version); - if (ret) - goto retry; - - connected = TRUE; - - while (connected && !exit_flag) { - krb5_data out; - krb5_storage *sp; - int32_t tmp; - fd_set readset; - struct timeval to; - -#ifndef NO_LIMIT_FD_SETSIZE - if (master_fd >= FD_SETSIZE) - krb5_errx (context, 1, "fd too large"); -#endif - - FD_ZERO(&readset); - FD_SET(master_fd, &readset); - - to.tv_sec = time_before_lost; - to.tv_usec = 0; - - ret = select (master_fd + 1, - &readset, NULL, NULL, &to); - if (ret < 0) { - if (errno == EINTR) - continue; - else - krb5_err (context, 1, errno, "select"); - } - if (ret == 0) - krb5_errx (context, 1, "server didn't send a message " - "in %d seconds", time_before_lost); - - ret = krb5_read_priv_message(context, auth_context, &master_fd, &out); - if (ret) { - krb5_warn (context, ret, "krb5_read_priv_message"); - connected = FALSE; - continue; - } - - sp = krb5_storage_from_mem (out.data, out.length); - krb5_ret_int32 (sp, &tmp); - switch (tmp) { - case FOR_YOU : - receive (context, sp, server_context); - ret = ihave (context, auth_context, master_fd, - server_context->log_context.version); - if (ret) - connected = FALSE; - break; - case TELL_YOU_EVERYTHING : - ret = receive_everything (context, master_fd, server_context, - auth_context); - if (ret) - connected = FALSE; - break; - case ARE_YOU_THERE : - send_im_here (context, master_fd, auth_context); - break; - case NOW_YOU_HAVE : - case I_HAVE : - case ONE_PRINC : - case I_AM_HERE : - default : - krb5_warnx (context, "Ignoring command %d", tmp); - break; - } - krb5_storage_free (sp); - krb5_data_free (&out); - - } - retry: - if (connected == FALSE) - krb5_warnx (context, "disconnected for server"); - if (exit_flag) - krb5_warnx (context, "got an exit signal"); - - if (master_fd >= 0) - close(master_fd); - - reconnect += backoff; - if (reconnect > reconnect_max) - reconnect = reconnect_max; - } - - if (0); -#ifndef NO_SIGXCPU - else if(exit_flag == SIGXCPU) - krb5_warnx(context, "%s CPU time limit exceeded", getprogname()); -#endif - else if(exit_flag == SIGINT || exit_flag == SIGTERM) - krb5_warnx(context, "%s terminated", getprogname()); - else - krb5_warnx(context, "%s unexpected exit reason: %ld", - getprogname(), (long)exit_flag); - - return 0; -} diff --git a/kerberosV/src/lib/kadm5/kadm5-private.h b/kerberosV/src/lib/kadm5/kadm5-private.h deleted file mode 100644 index ab8d694dda7..00000000000 --- a/kerberosV/src/lib/kadm5/kadm5-private.h +++ /dev/null @@ -1,509 +0,0 @@ -/* This is a generated file */ -#ifndef __kadm5_private_h__ -#define __kadm5_private_h__ - -#include - -kadm5_ret_t -_kadm5_acl_check_permission ( - kadm5_server_context */*context*/, - unsigned /*op*/, - krb5_const_principal /*princ*/); - -kadm5_ret_t -_kadm5_acl_init (kadm5_server_context */*context*/); - -kadm5_ret_t -_kadm5_bump_pw_expire ( - kadm5_server_context */*context*/, - hdb_entry */*ent*/); - -krb5_error_code -_kadm5_c_get_cred_cache ( - krb5_context /*context*/, - const char */*client_name*/, - const char */*server_name*/, - const char */*password*/, - krb5_prompter_fct /*prompter*/, - const char */*keytab*/, - krb5_ccache /*ccache*/, - krb5_ccache */*ret_cache*/); - -kadm5_ret_t -_kadm5_c_init_context ( - kadm5_client_context **/*ctx*/, - kadm5_config_params */*params*/, - krb5_context /*context*/); - -kadm5_ret_t -_kadm5_client_recv ( - kadm5_client_context */*context*/, - krb5_data */*reply*/); - -kadm5_ret_t -_kadm5_client_send ( - kadm5_client_context */*context*/, - krb5_storage */*sp*/); - -kadm5_ret_t -_kadm5_connect (void */*handle*/); - -kadm5_ret_t -_kadm5_error_code (kadm5_ret_t /*code*/); - -int -_kadm5_exists_keys ( - Key */*keys1*/, - int /*len1*/, - Key */*keys2*/, - int /*len2*/); - -void -_kadm5_free_keys ( - krb5_context /*context*/, - int /*len*/, - Key */*keys*/); - -void -_kadm5_init_keys ( - Key */*keys*/, - int /*len*/); - -kadm5_ret_t -_kadm5_marshal_params ( - krb5_context /*context*/, - kadm5_config_params */*params*/, - krb5_data */*out*/); - -kadm5_ret_t -_kadm5_privs_to_string ( - uint32_t /*privs*/, - char */*string*/, - size_t /*len*/); - -HDB * -_kadm5_s_get_db (void */*server_handle*/); - -kadm5_ret_t -_kadm5_s_init_context ( - kadm5_server_context **/*ctx*/, - kadm5_config_params */*params*/, - krb5_context /*context*/); - -kadm5_ret_t -_kadm5_set_keys ( - kadm5_server_context */*context*/, - hdb_entry */*ent*/, - const char */*password*/); - -kadm5_ret_t -_kadm5_set_keys2 ( - kadm5_server_context */*context*/, - hdb_entry */*ent*/, - int16_t /*n_key_data*/, - krb5_key_data */*key_data*/); - -kadm5_ret_t -_kadm5_set_keys3 ( - kadm5_server_context */*context*/, - hdb_entry */*ent*/, - int /*n_keys*/, - krb5_keyblock */*keyblocks*/); - -kadm5_ret_t -_kadm5_set_keys_randomly ( - kadm5_server_context */*context*/, - hdb_entry */*ent*/, - krb5_keyblock **/*new_keys*/, - int */*n_keys*/); - -kadm5_ret_t -_kadm5_set_modifier ( - kadm5_server_context */*context*/, - hdb_entry */*ent*/); - -kadm5_ret_t -_kadm5_setup_entry ( - kadm5_server_context */*context*/, - hdb_entry_ex */*ent*/, - uint32_t /*mask*/, - kadm5_principal_ent_t /*princ*/, - uint32_t /*princ_mask*/, - kadm5_principal_ent_t /*def*/, - uint32_t /*def_mask*/); - -kadm5_ret_t -_kadm5_string_to_privs ( - const char */*s*/, - uint32_t* /*privs*/); - -kadm5_ret_t -_kadm5_unmarshal_params ( - krb5_context /*context*/, - krb5_data */*in*/, - kadm5_config_params */*params*/); - -kadm5_ret_t -kadm5_c_chpass_principal ( - void */*server_handle*/, - krb5_principal /*princ*/, - const char */*password*/); - -kadm5_ret_t -kadm5_c_chpass_principal_with_key ( - void */*server_handle*/, - krb5_principal /*princ*/, - int /*n_key_data*/, - krb5_key_data */*key_data*/); - -kadm5_ret_t -kadm5_c_create_principal ( - void */*server_handle*/, - kadm5_principal_ent_t /*princ*/, - uint32_t /*mask*/, - const char */*password*/); - -kadm5_ret_t -kadm5_c_delete_principal ( - void */*server_handle*/, - krb5_principal /*princ*/); - -kadm5_ret_t -kadm5_c_destroy (void */*server_handle*/); - -kadm5_ret_t -kadm5_c_flush (void */*server_handle*/); - -kadm5_ret_t -kadm5_c_get_principal ( - void */*server_handle*/, - krb5_principal /*princ*/, - kadm5_principal_ent_t /*out*/, - uint32_t /*mask*/); - -kadm5_ret_t -kadm5_c_get_principals ( - void */*server_handle*/, - const char */*expression*/, - char ***/*princs*/, - int */*count*/); - -kadm5_ret_t -kadm5_c_get_privs ( - void */*server_handle*/, - uint32_t */*privs*/); - -kadm5_ret_t -kadm5_c_init_with_creds ( - const char */*client_name*/, - krb5_ccache /*ccache*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_c_init_with_creds_ctx ( - krb5_context /*context*/, - const char */*client_name*/, - krb5_ccache /*ccache*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_c_init_with_password ( - const char */*client_name*/, - const char */*password*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_c_init_with_password_ctx ( - krb5_context /*context*/, - const char */*client_name*/, - const char */*password*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_c_init_with_skey ( - const char */*client_name*/, - const char */*keytab*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_c_init_with_skey_ctx ( - krb5_context /*context*/, - const char */*client_name*/, - const char */*keytab*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_c_modify_principal ( - void */*server_handle*/, - kadm5_principal_ent_t /*princ*/, - uint32_t /*mask*/); - -kadm5_ret_t -kadm5_c_randkey_principal ( - void */*server_handle*/, - krb5_principal /*princ*/, - krb5_keyblock **/*new_keys*/, - int */*n_keys*/); - -kadm5_ret_t -kadm5_c_rename_principal ( - void */*server_handle*/, - krb5_principal /*source*/, - krb5_principal /*target*/); - -kadm5_ret_t -kadm5_log_create ( - kadm5_server_context */*context*/, - hdb_entry */*ent*/); - -kadm5_ret_t -kadm5_log_delete ( - kadm5_server_context */*context*/, - krb5_principal /*princ*/); - -kadm5_ret_t -kadm5_log_end (kadm5_server_context */*context*/); - -kadm5_ret_t -kadm5_log_foreach ( - kadm5_server_context */*context*/, - void (*/*func*/)(kadm5_server_context *server_context, uint32_t ver, time_t timestamp, enum kadm_ops op, uint32_t len, krb5_storage *, void *), - void */*ctx*/); - -kadm5_ret_t -kadm5_log_get_version ( - kadm5_server_context */*context*/, - uint32_t */*ver*/); - -kadm5_ret_t -kadm5_log_get_version_fd ( - int /*fd*/, - uint32_t */*ver*/); - -krb5_storage * -kadm5_log_goto_end (int /*fd*/); - -kadm5_ret_t -kadm5_log_init (kadm5_server_context */*context*/); - -kadm5_ret_t -kadm5_log_modify ( - kadm5_server_context */*context*/, - hdb_entry */*ent*/, - uint32_t /*mask*/); - -kadm5_ret_t -kadm5_log_nop (kadm5_server_context */*context*/); - -kadm5_ret_t -kadm5_log_previous ( - krb5_context /*context*/, - krb5_storage */*sp*/, - uint32_t */*ver*/, - time_t */*timestamp*/, - enum kadm_ops */*op*/, - uint32_t */*len*/); - -kadm5_ret_t -kadm5_log_reinit (kadm5_server_context */*context*/); - -kadm5_ret_t -kadm5_log_rename ( - kadm5_server_context */*context*/, - krb5_principal /*source*/, - hdb_entry */*ent*/); - -kadm5_ret_t -kadm5_log_replay ( - kadm5_server_context */*context*/, - enum kadm_ops /*op*/, - uint32_t /*ver*/, - uint32_t /*len*/, - krb5_storage */*sp*/); - -kadm5_ret_t -kadm5_log_set_version ( - kadm5_server_context */*context*/, - uint32_t /*vno*/); - -const char * -kadm5_log_signal_socket (krb5_context /*context*/); - -kadm5_ret_t -kadm5_log_signal_socket_info ( - krb5_context /*context*/, - int /*server_end*/, - struct addrinfo **/*ret_addrs*/); - -kadm5_ret_t -kadm5_log_truncate (kadm5_server_context */*server_context*/); - -kadm5_ret_t -kadm5_s_chpass_principal ( - void */*server_handle*/, - krb5_principal /*princ*/, - const char */*password*/); - -kadm5_ret_t -kadm5_s_chpass_principal_cond ( - void */*server_handle*/, - krb5_principal /*princ*/, - const char */*password*/); - -kadm5_ret_t -kadm5_s_chpass_principal_with_key ( - void */*server_handle*/, - krb5_principal /*princ*/, - int /*n_key_data*/, - krb5_key_data */*key_data*/); - -kadm5_ret_t -kadm5_s_create_principal ( - void */*server_handle*/, - kadm5_principal_ent_t /*princ*/, - uint32_t /*mask*/, - const char */*password*/); - -kadm5_ret_t -kadm5_s_create_principal_with_key ( - void */*server_handle*/, - kadm5_principal_ent_t /*princ*/, - uint32_t /*mask*/); - -kadm5_ret_t -kadm5_s_delete_principal ( - void */*server_handle*/, - krb5_principal /*princ*/); - -kadm5_ret_t -kadm5_s_destroy (void */*server_handle*/); - -kadm5_ret_t -kadm5_s_flush (void */*server_handle*/); - -kadm5_ret_t -kadm5_s_get_principal ( - void */*server_handle*/, - krb5_principal /*princ*/, - kadm5_principal_ent_t /*out*/, - uint32_t /*mask*/); - -kadm5_ret_t -kadm5_s_get_principals ( - void */*server_handle*/, - const char */*expression*/, - char ***/*princs*/, - int */*count*/); - -kadm5_ret_t -kadm5_s_get_privs ( - void */*server_handle*/, - uint32_t */*privs*/); - -kadm5_ret_t -kadm5_s_init_with_creds ( - const char */*client_name*/, - krb5_ccache /*ccache*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_s_init_with_creds_ctx ( - krb5_context /*context*/, - const char */*client_name*/, - krb5_ccache /*ccache*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_s_init_with_password ( - const char */*client_name*/, - const char */*password*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_s_init_with_password_ctx ( - krb5_context /*context*/, - const char */*client_name*/, - const char */*password*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_s_init_with_skey ( - const char */*client_name*/, - const char */*keytab*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_s_init_with_skey_ctx ( - krb5_context /*context*/, - const char */*client_name*/, - const char */*keytab*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_s_modify_principal ( - void */*server_handle*/, - kadm5_principal_ent_t /*princ*/, - uint32_t /*mask*/); - -kadm5_ret_t -kadm5_s_randkey_principal ( - void */*server_handle*/, - krb5_principal /*princ*/, - krb5_keyblock **/*new_keys*/, - int */*n_keys*/); - -kadm5_ret_t -kadm5_s_rename_principal ( - void */*server_handle*/, - krb5_principal /*source*/, - krb5_principal /*target*/); - -#endif /* __kadm5_private_h__ */ diff --git a/kerberosV/src/lib/kadm5/kadm5-protos.h b/kerberosV/src/lib/kadm5/kadm5-protos.h deleted file mode 100644 index eebae95d8f2..00000000000 --- a/kerberosV/src/lib/kadm5/kadm5-protos.h +++ /dev/null @@ -1,244 +0,0 @@ -/* This is a generated file */ -#ifndef __kadm5_protos_h__ -#define __kadm5_protos_h__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -kadm5_ret_t -kadm5_ad_init_with_password ( - const char */*client_name*/, - const char */*password*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_ad_init_with_password_ctx ( - krb5_context /*context*/, - const char */*client_name*/, - const char */*password*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -krb5_error_code -kadm5_add_passwd_quality_verifier ( - krb5_context /*context*/, - const char */*check_library*/); - -const char * -kadm5_check_password_quality ( - krb5_context /*context*/, - krb5_principal /*principal*/, - krb5_data */*pwd_data*/); - -kadm5_ret_t -kadm5_chpass_principal ( - void */*server_handle*/, - krb5_principal /*princ*/, - const char */*password*/); - -kadm5_ret_t -kadm5_chpass_principal_with_key ( - void */*server_handle*/, - krb5_principal /*princ*/, - int /*n_key_data*/, - krb5_key_data */*key_data*/); - -kadm5_ret_t -kadm5_create_principal ( - void */*server_handle*/, - kadm5_principal_ent_t /*princ*/, - uint32_t /*mask*/, - const char */*password*/); - -kadm5_ret_t -kadm5_delete_principal ( - void */*server_handle*/, - krb5_principal /*princ*/); - -kadm5_ret_t -kadm5_destroy (void */*server_handle*/); - -kadm5_ret_t -kadm5_flush (void */*server_handle*/); - -void -kadm5_free_key_data ( - void */*server_handle*/, - int16_t */*n_key_data*/, - krb5_key_data */*key_data*/); - -void -kadm5_free_name_list ( - void */*server_handle*/, - char **/*names*/, - int */*count*/); - -void -kadm5_free_principal_ent ( - void */*server_handle*/, - kadm5_principal_ent_t /*princ*/); - -kadm5_ret_t -kadm5_get_principal ( - void */*server_handle*/, - krb5_principal /*princ*/, - kadm5_principal_ent_t /*out*/, - uint32_t /*mask*/); - -kadm5_ret_t -kadm5_get_principals ( - void */*server_handle*/, - const char */*expression*/, - char ***/*princs*/, - int */*count*/); - -kadm5_ret_t -kadm5_get_privs ( - void */*server_handle*/, - uint32_t */*privs*/); - -kadm5_ret_t -kadm5_init_with_creds ( - const char */*client_name*/, - krb5_ccache /*ccache*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_init_with_creds_ctx ( - krb5_context /*context*/, - const char */*client_name*/, - krb5_ccache /*ccache*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_init_with_password ( - const char */*client_name*/, - const char */*password*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_init_with_password_ctx ( - krb5_context /*context*/, - const char */*client_name*/, - const char */*password*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_init_with_skey ( - const char */*client_name*/, - const char */*keytab*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_init_with_skey_ctx ( - krb5_context /*context*/, - const char */*client_name*/, - const char */*keytab*/, - const char */*service_name*/, - kadm5_config_params */*realm_params*/, - unsigned long /*struct_version*/, - unsigned long /*api_version*/, - void **/*server_handle*/); - -kadm5_ret_t -kadm5_modify_principal ( - void */*server_handle*/, - kadm5_principal_ent_t /*princ*/, - uint32_t /*mask*/); - -kadm5_ret_t -kadm5_randkey_principal ( - void */*server_handle*/, - krb5_principal /*princ*/, - krb5_keyblock **/*new_keys*/, - int */*n_keys*/); - -kadm5_ret_t -kadm5_rename_principal ( - void */*server_handle*/, - krb5_principal /*source*/, - krb5_principal /*target*/); - -kadm5_ret_t -kadm5_ret_key_data ( - krb5_storage */*sp*/, - krb5_key_data */*key*/); - -kadm5_ret_t -kadm5_ret_principal_ent ( - krb5_storage */*sp*/, - kadm5_principal_ent_t /*princ*/); - -kadm5_ret_t -kadm5_ret_principal_ent_mask ( - krb5_storage */*sp*/, - kadm5_principal_ent_t /*princ*/, - uint32_t */*mask*/); - -kadm5_ret_t -kadm5_ret_tl_data ( - krb5_storage */*sp*/, - krb5_tl_data */*tl*/); - -void -kadm5_setup_passwd_quality_check ( - krb5_context /*context*/, - const char */*check_library*/, - const char */*check_function*/); - -kadm5_ret_t -kadm5_store_key_data ( - krb5_storage */*sp*/, - krb5_key_data */*key*/); - -kadm5_ret_t -kadm5_store_principal_ent ( - krb5_storage */*sp*/, - kadm5_principal_ent_t /*princ*/); - -kadm5_ret_t -kadm5_store_principal_ent_mask ( - krb5_storage */*sp*/, - kadm5_principal_ent_t /*princ*/, - uint32_t /*mask*/); - -kadm5_ret_t -kadm5_store_tl_data ( - krb5_storage */*sp*/, - krb5_tl_data */*tl*/); - -#ifdef __cplusplus -} -#endif - -#endif /* __kadm5_protos_h__ */ diff --git a/kerberosV/src/lib/kadm5/kadm5-pwcheck.h b/kerberosV/src/lib/kadm5/kadm5-pwcheck.h deleted file mode 100644 index 18a3c4016d1..00000000000 --- a/kerberosV/src/lib/kadm5/kadm5-pwcheck.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2004 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: kadm5-pwcheck.h,v 1.2 2013/06/17 18:57:43 robert Exp $ */ - -#ifndef KADM5_PWCHECK_H -#define KADM5_PWCHECK_H 1 - - -#define KADM5_PASSWD_VERSION_V0 0 -#define KADM5_PASSWD_VERSION_V1 1 - -typedef const char* (*kadm5_passwd_quality_check_func_v0)(krb5_context, - krb5_principal, - krb5_data*); - -/* - * The 4th argument, is a tuning parameter for the quality check - * function, the lib/caller will providing it for the password quality - * module. - */ - -typedef int -(*kadm5_passwd_quality_check_func)(krb5_context context, - krb5_principal principal, - krb5_data *password, - const char *tuning, - char *message, - size_t length); - -struct kadm5_pw_policy_check_func { - const char *name; - kadm5_passwd_quality_check_func func; -}; - -struct kadm5_pw_policy_verifier { - const char *name; - int version; - const char *vendor; - const struct kadm5_pw_policy_check_func *funcs; -}; - -#endif /* KADM5_PWCHECK_H */ diff --git a/kerberosV/src/lib/kadm5/kadm5_err.et b/kerberosV/src/lib/kadm5/kadm5_err.et deleted file mode 100644 index 1fe1719fcd0..00000000000 --- a/kerberosV/src/lib/kadm5/kadm5_err.et +++ /dev/null @@ -1,59 +0,0 @@ -# -# Error messages for the kadm5 library -# -# This might look like a com_err file, but is not -# -id "$Id: kadm5_err.et,v 1.2 2013/06/17 18:57:43 robert Exp $" - -error_table ovk kadm5 - -prefix KADM5 -error_code FAILURE, "Operation failed for unspecified reason" -error_code AUTH_GET, "Operation requires `get' privilege" -error_code AUTH_ADD, "Operation requires `add' privilege" -error_code AUTH_MODIFY, "Operation requires `modify' privilege" -error_code AUTH_DELETE, "Operation requires `delete' privilege" -error_code AUTH_INSUFFICIENT, "Insufficient authorization for operation" -error_code BAD_DB, "Database inconsistency detected" -error_code DUP, "Principal or policy already exists" -error_code RPC_ERROR, "Communication failure with server" -error_code NO_SRV, "No administration server found for realm" -error_code BAD_HIST_KEY, "Password history principal key version mismatch" -error_code NOT_INIT, "Connection to server not initialized" -error_code UNK_PRINC, "Principal does not exist" -error_code UNK_POLICY, "Policy does not exist" -error_code BAD_MASK, "Invalid field mask for operation" -error_code BAD_CLASS, "Invalid number of character classes" -error_code BAD_LENGTH, "Invalid password length" -error_code BAD_POLICY, "Invalid policy name" -error_code BAD_PRINCIPAL, "Invalid principal name." -error_code BAD_AUX_ATTR, "Invalid auxillary attributes" -error_code BAD_HISTORY, "Invalid password history count" -error_code BAD_MIN_PASS_LIFE, "Password minimum life is greater than password maximum life" -error_code PASS_Q_TOOSHORT, "Password is too short" -error_code PASS_Q_CLASS, "Password does not contain enough character classes" -error_code PASS_Q_DICT, "Password is in the password dictionary" -error_code PASS_REUSE, "Can't reuse password" -error_code PASS_TOOSOON, "Current password's minimum life has not expired" -error_code POLICY_REF, "Policy is in use" -error_code INIT, "Connection to server already initialized" -error_code BAD_PASSWORD, "Incorrect password" -error_code PROTECT_PRINCIPAL, "Can't change protected principal" -error_code BAD_SERVER_HANDLE, "Programmer error! Bad Admin server handle" -error_code BAD_STRUCT_VERSION, "Programmer error! Bad API structure version" -error_code OLD_STRUCT_VERSION, "API structure version specified by application is no longer supported" -error_code NEW_STRUCT_VERSION, "API structure version specified by application is unknown to libraries" -error_code BAD_API_VERSION, "Programmer error! Bad API version" -error_code OLD_LIB_API_VERSION, "API version specified by application is no longer supported by libraries" -error_code OLD_SERVER_API_VERSION,"API version specified by application is no longer supported by server" -error_code NEW_LIB_API_VERSION, "API version specified by application is unknown to libraries" -error_code NEW_SERVER_API_VERSION,"API version specified by application is unknown to server" -error_code SECURE_PRINC_MISSING,"Database error! Required principal missing" -error_code NO_RENAME_SALT, "The salt type of the specified principal does not support renaming" -error_code BAD_CLIENT_PARAMS, "Invalid configuration parameter for remote KADM5 client" -error_code BAD_SERVER_PARAMS, "Invalid configuration parameter for local KADM5 client." -error_code AUTH_LIST, "Operation requires `list' privilege" -error_code AUTH_CHANGEPW, "Operation requires `change-password' privilege" -error_code BAD_TL_TYPE, "Invalid tagged data list element type" -error_code MISSING_CONF_PARAMS, "Required parameters in kdc.conf missing" -error_code BAD_SERVER_NAME, "Bad krb5 admin server hostname" diff --git a/kerberosV/src/lib/kadm5/kadm5_locl.h b/kerberosV/src/lib/kadm5/kadm5_locl.h deleted file mode 100644 index ef79e71bfbc..00000000000 --- a/kerberosV/src/lib/kadm5/kadm5_locl.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 1997-2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: kadm5_locl.h,v 1.3 2013/06/17 18:57:43 robert Exp $ */ - -#ifndef __KADM5_LOCL_H__ -#define __KADM5_LOCL_H__ - -#include -#include - -#include -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_FILE_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_SYS_UN_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#include -#include "admin.h" -#include "kadm5_err.h" -#include -#include -#include -#include "private.h" - -#endif /* __KADM5_LOCL_H__ */ diff --git a/kerberosV/src/lib/kadm5/kadm5_pwcheck.3 b/kerberosV/src/lib/kadm5/kadm5_pwcheck.3 deleted file mode 100644 index 3014abad021..00000000000 --- a/kerberosV/src/lib/kadm5/kadm5_pwcheck.3 +++ /dev/null @@ -1,159 +0,0 @@ -.\" Copyright (c) 2003 - 2004 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: kadm5_pwcheck.3,v 1.2 2013/06/17 18:57:43 robert Exp $ -.\" -.Dd February 29, 2004 -.Dt KADM5_PWCHECK 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_pwcheck , -.Nm kadm5_setup_passwd_quality_check , -.Nm kadm5_add_passwd_quality_verifier , -.Nm kadm5_check_password_quality -.Nd Heimdal warning and error functions -.Sh LIBRARY -Kerberos 5 Library (libkadm5srv, -lkadm5srv) -.Sh SYNOPSIS -.In kadm5-protos.h -.In kadm5-pwcheck.h -.Ft void -.Fo kadm5_setup_passwd_quality_check -.Fa "krb5_context context" -.Fa "const char *check_library" -.Fa "const char *check_function" -.Fc -.Ft "krb5_error_code" -.Fo kadm5_add_passwd_quality_verifier -.Fa "krb5_context context" -.Fa "const char *check_library" -.Fc -.Ft "const char *" -.Fo kadm5_check_password_quality -.Fa "krb5_context context" -.Fa "krb5_principal principal" -.Fa "krb5_data *pwd_data" -.Fc -.Ft int -.Fo "(*kadm5_passwd_quality_check_func)" -.Fa "krb5_context context" -.Fa "krb5_principal principal" -.Fa "krb5_data *password" -.Fa "const char *tuning" -.Fa "char *message" -.Fa "size_t length" -.Fc -.Sh DESCRIPTION -These functions perform the quality check for the heimdal database -library. -.Pp -There are two versions of the shared object API; the old version (0) -is deprecated, but still supported. The new version (1) supports -multiple password quality checking policies in the same shared object. -See below for details. -.Pp -The password quality checker will run all policies that are -configured by the user. If any policy rejects the password, the password -will be rejected. -.Pp -Policy names are of the form -.Ql module-name:policy-name -or, if the the policy name is unique enough, just -.Ql policy-name . -.Sh IMPLEMENTING A PASSWORD QUALITY CHECKING SHARED OBJECT -(This refers to the version 1 API only.) -.Pp -Module shared objects may conveniently be compiled and linked with -.Xr libtool 1 . -An object needs to export a symbol called -.Ql kadm5_password_verifier -of the type -.Ft "struct kadm5_pw_policy_verifier" . -.Pp -Its -.Ft name -and -.Ft vendor -fields should contain the obvious information. -.Ft name -must match the -.Ql module-name -portion of the policy name (the part before the colon), if the policy name -contains a colon, or the policy will not be run. -.Ft version -should be -.Dv KADM5_PASSWD_VERSION_V1 . -.Pp -.Ft funcs -contains an array of -.Ft "struct kadm5_pw_policy_check_func" -structures that is terminated with an entry whose -.Ft name -component is -.Dv NULL . -The -.Ft name -field of the array must match the -.Ql policy-name -portion of a policy name (the part after the colon, or the complete policy -name if there is no colon) specified by the user or the policy will not be -run. The -.Ft func -fields of the array elements are functions that are exported by the -module to be called to check the password. They get the following -arguments: the Kerberos context, principal, password, a tuning parameter, and -a pointer to a message buffer and its length. The tuning parameter -for the quality check function is currently always -.Dv NULL . -If the password is acceptable, the function returns zero. Otherwise -it returns non-zero and fills in the message buffer with an -appropriate explanation. -.Sh RUNNING THE CHECKS -.Nm kadm5_setup_passwd_quality_check -sets up type 0 checks. It sets up all type 0 checks defined in -.Xr krb5.conf 5 -if called with the last two arguments null. -.Pp -.Nm kadm5_add_passwd_quality_verifier -sets up type 1 checks. It sets up all type 1 tests defined in -.Xr krb5.conf 5 -if called with a null second argument. -.Nm kadm5_check_password_quality -runs the checks in the order in which they are defined in -.Xr krb5.conf 5 -and the order in which they occur in a -module's -.Ft funcs -array until one returns non-zero. -.Sh SEE ALSO -.Xr libtool 1 , -.Xr krb5 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/kadm5/keys.c b/kerberosV/src/lib/kadm5/keys.c deleted file mode 100644 index 040413d8fa2..00000000000 --- a/kerberosV/src/lib/kadm5/keys.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: keys.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -/* - * free all the memory used by (len, keys) - */ - -void -_kadm5_free_keys (krb5_context context, - int len, Key *keys) -{ - hdb_free_keys(context, len, keys); -} - -/* - * null-ify `len', `keys' - */ - -void -_kadm5_init_keys (Key *keys, int len) -{ - int i; - - for (i = 0; i < len; ++i) { - keys[i].mkvno = NULL; - keys[i].salt = NULL; - keys[i].key.keyvalue.length = 0; - keys[i].key.keyvalue.data = NULL; - } -} - -/* - * return 1 if any key in `keys1, len1' exists in `keys2, len2' - */ - -int -_kadm5_exists_keys(Key *keys1, int len1, Key *keys2, int len2) -{ - int i, j; - - for (i = 0; i < len1; ++i) { - for (j = 0; j < len2; j++) { - if ((keys1[i].salt != NULL && keys2[j].salt == NULL) - || (keys1[i].salt == NULL && keys2[j].salt != NULL)) - continue; - - if (keys1[i].salt != NULL) { - if (keys1[i].salt->type != keys2[j].salt->type) - continue; - if (keys1[i].salt->salt.length != keys2[j].salt->salt.length) - continue; - if (memcmp (keys1[i].salt->salt.data, keys2[j].salt->salt.data, - keys1[i].salt->salt.length) != 0) - continue; - } - if (keys1[i].key.keytype != keys2[j].key.keytype) - continue; - if (keys1[i].key.keyvalue.length != keys2[j].key.keyvalue.length) - continue; - if (memcmp (keys1[i].key.keyvalue.data, keys2[j].key.keyvalue.data, - keys1[i].key.keyvalue.length) != 0) - continue; - - return 1; - } - } - return 0; -} diff --git a/kerberosV/src/lib/kadm5/libkadm5srv-exports.def b/kerberosV/src/lib/kadm5/libkadm5srv-exports.def deleted file mode 100644 index ad5fa37e9ea..00000000000 --- a/kerberosV/src/lib/kadm5/libkadm5srv-exports.def +++ /dev/null @@ -1,61 +0,0 @@ -EXPORTS -;! kadm5_ad_init_with_password -;! kadm5_ad_init_with_password_ctx - kadm5_add_passwd_quality_verifier - kadm5_check_password_quality - kadm5_chpass_principal - kadm5_chpass_principal_with_key - kadm5_create_principal - kadm5_delete_principal - kadm5_destroy - kadm5_flush - kadm5_free_key_data - kadm5_free_name_list - kadm5_free_principal_ent - kadm5_get_principal - kadm5_get_principals - kadm5_get_privs - kadm5_init_with_creds - kadm5_init_with_creds_ctx - kadm5_init_with_password - kadm5_init_with_password_ctx - kadm5_init_with_skey - kadm5_init_with_skey_ctx - kadm5_modify_principal - kadm5_randkey_principal - kadm5_rename_principal - kadm5_ret_key_data - kadm5_ret_principal_ent - kadm5_ret_principal_ent_mask - kadm5_ret_tl_data - kadm5_setup_passwd_quality_check - kadm5_store_key_data - kadm5_store_principal_ent - kadm5_store_principal_ent_mask - kadm5_store_tl_data - kadm5_s_init_with_password_ctx - kadm5_s_init_with_password - kadm5_s_init_with_skey_ctx - kadm5_s_init_with_skey - kadm5_s_init_with_creds_ctx - kadm5_s_init_with_creds - kadm5_s_chpass_principal_cond - kadm5_log_set_version -;! kadm5_log_signal_socket - kadm5_log_signal_socket_info ;! - kadm5_log_previous - kadm5_log_goto_end - kadm5_log_foreach - kadm5_log_get_version_fd - kadm5_log_get_version - kadm5_log_replay - kadm5_log_end - kadm5_log_reinit - kadm5_log_init - kadm5_log_nop - kadm5_log_truncate - kadm5_log_modify - _kadm5_acl_check_permission - _kadm5_unmarshal_params - _kadm5_s_get_db - _kadm5_privs_to_string diff --git a/kerberosV/src/lib/kadm5/libkadm5srv-version.rc b/kerberosV/src/lib/kadm5/libkadm5srv-version.rc deleted file mode 100644 index 065c18f9598..00000000000 --- a/kerberosV/src/lib/kadm5/libkadm5srv-version.rc +++ /dev/null @@ -1,36 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2010, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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. - * - **********************************************************************/ - -#define RC_FILE_TYPE VFT_DLL -#define RC_FILE_DESC_0409 "Heimdal Kerberos v5 Administration Library" -#define RC_FILE_ORIG_0409 "libkadm5srv.dll" - -#include "../../windows/version.rc" diff --git a/kerberosV/src/lib/kadm5/log.c b/kerberosV/src/lib/kadm5/log.c deleted file mode 100644 index c7de0996a6c..00000000000 --- a/kerberosV/src/lib/kadm5/log.c +++ /dev/null @@ -1,1057 +0,0 @@ -/* - * Copyright (c) 1997 - 2007 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 "kadm5_locl.h" -#include "heim_threads.h" - -RCSID("$Id: log.c,v 1.3 2013/06/17 18:57:43 robert Exp $"); - -/* - * A log record consists of: - * - * version number 4 bytes - * time in seconds 4 bytes - * operation (enum kadm_ops) 4 bytes - * length of record 4 bytes - * data... n bytes - * length of record 4 bytes - * version number 4 bytes - * - */ - -kadm5_ret_t -kadm5_log_get_version_fd (int fd, - uint32_t *ver) -{ - int ret; - krb5_storage *sp; - int32_t old_version; - - ret = lseek (fd, 0, SEEK_END); - if(ret < 0) - return errno; - if(ret == 0) { - *ver = 0; - return 0; - } - sp = krb5_storage_from_fd (fd); - krb5_storage_seek(sp, -4, SEEK_CUR); - krb5_ret_int32 (sp, &old_version); - *ver = old_version; - krb5_storage_free(sp); - lseek (fd, 0, SEEK_END); - return 0; -} - -kadm5_ret_t -kadm5_log_get_version (kadm5_server_context *context, uint32_t *ver) -{ - return kadm5_log_get_version_fd (context->log_context.log_fd, ver); -} - -kadm5_ret_t -kadm5_log_set_version (kadm5_server_context *context, uint32_t vno) -{ - kadm5_log_context *log_context = &context->log_context; - - log_context->version = vno; - return 0; -} - -kadm5_ret_t -kadm5_log_init (kadm5_server_context *context) -{ - int fd; - kadm5_ret_t ret; - kadm5_log_context *log_context = &context->log_context; - - if (log_context->log_fd != -1) - return 0; - fd = open (log_context->log_file, O_RDWR | O_CREAT, 0600); - if (fd < 0) { - ret = errno; - krb5_set_error_message(context->context, ret, "kadm5_log_init: open %s", - log_context->log_file); - return ret; - } - if (flock (fd, LOCK_EX) < 0) { - ret = errno; - krb5_set_error_message(context->context, ret, "kadm5_log_init: flock %s", - log_context->log_file); - close (fd); - return errno; - } - - ret = kadm5_log_get_version_fd (fd, &log_context->version); - if (ret) - return ret; - - log_context->log_fd = fd; - return 0; -} - -kadm5_ret_t -kadm5_log_reinit (kadm5_server_context *context) -{ - int fd; - kadm5_log_context *log_context = &context->log_context; - - if (log_context->log_fd != -1) { - flock (log_context->log_fd, LOCK_UN); - close (log_context->log_fd); - log_context->log_fd = -1; - } - fd = open (log_context->log_file, O_RDWR | O_CREAT | O_TRUNC, 0600); - if (fd < 0) - return errno; - if (flock (fd, LOCK_EX) < 0) { - close (fd); - return errno; - } - - log_context->version = 0; - log_context->log_fd = fd; - return 0; -} - - -kadm5_ret_t -kadm5_log_end (kadm5_server_context *context) -{ - kadm5_log_context *log_context = &context->log_context; - int fd = log_context->log_fd; - - flock (fd, LOCK_UN); - close(fd); - log_context->log_fd = -1; - return 0; -} - -static kadm5_ret_t -kadm5_log_preamble (kadm5_server_context *context, - krb5_storage *sp, - enum kadm_ops op) -{ - kadm5_log_context *log_context = &context->log_context; - kadm5_ret_t kadm_ret; - - kadm_ret = kadm5_log_init (context); - if (kadm_ret) - return kadm_ret; - - krb5_store_int32 (sp, ++log_context->version); - krb5_store_int32 (sp, time(NULL)); - krb5_store_int32 (sp, op); - return 0; -} - -static kadm5_ret_t -kadm5_log_postamble (kadm5_log_context *context, - krb5_storage *sp) -{ - krb5_store_int32 (sp, context->version); - return 0; -} - -/* - * flush the log record in `sp'. - */ - -static kadm5_ret_t -kadm5_log_flush (kadm5_log_context *log_context, - krb5_storage *sp) -{ - krb5_data data; - size_t len; - ssize_t ret; - - krb5_storage_to_data(sp, &data); - len = data.length; - ret = write (log_context->log_fd, data.data, len); - if (ret < 0 || (size_t)ret != len) { - krb5_data_free(&data); - return errno; - } - if (fsync (log_context->log_fd) < 0) { - krb5_data_free(&data); - return errno; - } - - /* - * Try to send a signal to any running `ipropd-master' - */ -#ifndef NO_UNIX_SOCKETS - sendto (log_context->socket_fd, - (void *)&log_context->version, - sizeof(log_context->version), - 0, - (struct sockaddr *)&log_context->socket_name, - sizeof(log_context->socket_name)); -#else - sendto (log_context->socket_fd, - (void *)&log_context->version, - sizeof(log_context->version), - 0, - log_context->socket_info->ai_addr, - log_context->socket_info->ai_addrlen); -#endif - - krb5_data_free(&data); - return 0; -} - -/* - * Add a `create' operation to the log. - */ - -kadm5_ret_t -kadm5_log_create (kadm5_server_context *context, - hdb_entry *ent) -{ - krb5_storage *sp; - kadm5_ret_t ret; - krb5_data value; - kadm5_log_context *log_context = &context->log_context; - - sp = krb5_storage_emem(); - ret = hdb_entry2value (context->context, ent, &value); - if (ret) { - krb5_storage_free(sp); - return ret; - } - ret = kadm5_log_preamble (context, sp, kadm_create); - if (ret) { - krb5_data_free (&value); - krb5_storage_free(sp); - return ret; - } - krb5_store_int32 (sp, value.length); - krb5_storage_write(sp, value.data, value.length); - krb5_store_int32 (sp, value.length); - krb5_data_free (&value); - ret = kadm5_log_postamble (log_context, sp); - if (ret) { - krb5_storage_free (sp); - return ret; - } - ret = kadm5_log_flush (log_context, sp); - krb5_storage_free (sp); - if (ret) - return ret; - ret = kadm5_log_end (context); - return ret; -} - -/* - * Read the data of a create log record from `sp' and change the - * database. - */ - -static kadm5_ret_t -kadm5_log_replay_create (kadm5_server_context *context, - uint32_t ver, - uint32_t len, - krb5_storage *sp) -{ - krb5_error_code ret; - krb5_data data; - hdb_entry_ex ent; - - memset(&ent, 0, sizeof(ent)); - - ret = krb5_data_alloc (&data, len); - if (ret) { - krb5_set_error_message(context->context, ret, "out of memory"); - return ret; - } - krb5_storage_read (sp, data.data, len); - ret = hdb_value2entry (context->context, &data, &ent.entry); - krb5_data_free(&data); - if (ret) { - krb5_set_error_message(context->context, ret, - "Unmarshaling hdb entry failed"); - return ret; - } - ret = context->db->hdb_store(context->context, context->db, 0, &ent); - hdb_free_entry (context->context, &ent); - return ret; -} - -/* - * Add a `delete' operation to the log. - */ - -kadm5_ret_t -kadm5_log_delete (kadm5_server_context *context, - krb5_principal princ) -{ - krb5_storage *sp; - kadm5_ret_t ret; - off_t off; - off_t len; - kadm5_log_context *log_context = &context->log_context; - - sp = krb5_storage_emem(); - if (sp == NULL) - return ENOMEM; - ret = kadm5_log_preamble (context, sp, kadm_delete); - if (ret) - goto out; - ret = krb5_store_int32 (sp, 0); - if (ret) - goto out; - off = krb5_storage_seek (sp, 0, SEEK_CUR); - ret = krb5_store_principal (sp, princ); - if (ret) - goto out; - len = krb5_storage_seek (sp, 0, SEEK_CUR) - off; - krb5_storage_seek(sp, -(len + 4), SEEK_CUR); - ret = krb5_store_int32 (sp, len); - if (ret) - goto out; - krb5_storage_seek(sp, len, SEEK_CUR); - ret = krb5_store_int32 (sp, len); - if (ret) - goto out; - ret = kadm5_log_postamble (log_context, sp); - if (ret) - goto out; - ret = kadm5_log_flush (log_context, sp); - if (ret) - goto out; - ret = kadm5_log_end (context); -out: - krb5_storage_free (sp); - return ret; -} - -/* - * Read a `delete' log operation from `sp' and apply it. - */ - -static kadm5_ret_t -kadm5_log_replay_delete (kadm5_server_context *context, - uint32_t ver, - uint32_t len, - krb5_storage *sp) -{ - krb5_error_code ret; - krb5_principal principal; - - ret = krb5_ret_principal (sp, &principal); - if (ret) { - krb5_set_error_message(context->context, ret, "Failed to read deleted " - "principal from log version: %ld", (long)ver); - return ret; - } - - ret = context->db->hdb_remove(context->context, context->db, principal); - krb5_free_principal (context->context, principal); - return ret; -} - -/* - * Add a `rename' operation to the log. - */ - -kadm5_ret_t -kadm5_log_rename (kadm5_server_context *context, - krb5_principal source, - hdb_entry *ent) -{ - krb5_storage *sp; - kadm5_ret_t ret; - off_t off; - off_t len; - krb5_data value; - kadm5_log_context *log_context = &context->log_context; - - krb5_data_zero(&value); - - sp = krb5_storage_emem(); - ret = hdb_entry2value (context->context, ent, &value); - if (ret) - goto failed; - - ret = kadm5_log_preamble (context, sp, kadm_rename); - if (ret) - goto failed; - - ret = krb5_store_int32 (sp, 0); - if (ret) - goto failed; - off = krb5_storage_seek (sp, 0, SEEK_CUR); - ret = krb5_store_principal (sp, source); - if (ret) - goto failed; - - krb5_storage_write(sp, value.data, value.length); - len = krb5_storage_seek (sp, 0, SEEK_CUR) - off; - - krb5_storage_seek(sp, -(len + 4), SEEK_CUR); - ret = krb5_store_int32 (sp, len); - if (ret) - goto failed; - - krb5_storage_seek(sp, len, SEEK_CUR); - ret = krb5_store_int32 (sp, len); - if (ret) - goto failed; - - ret = kadm5_log_postamble (log_context, sp); - if (ret) - goto failed; - - ret = kadm5_log_flush (log_context, sp); - if (ret) - goto failed; - krb5_storage_free (sp); - krb5_data_free (&value); - - return kadm5_log_end (context); - -failed: - krb5_data_free(&value); - krb5_storage_free(sp); - return ret; -} - -/* - * Read a `rename' log operation from `sp' and apply it. - */ - -static kadm5_ret_t -kadm5_log_replay_rename (kadm5_server_context *context, - uint32_t ver, - uint32_t len, - krb5_storage *sp) -{ - krb5_error_code ret; - krb5_principal source; - hdb_entry_ex target_ent; - krb5_data value; - off_t off; - size_t princ_len, data_len; - - memset(&target_ent, 0, sizeof(target_ent)); - - off = krb5_storage_seek(sp, 0, SEEK_CUR); - ret = krb5_ret_principal (sp, &source); - if (ret) { - krb5_set_error_message(context->context, ret, "Failed to read renamed " - "principal in log, version: %ld", (long)ver); - return ret; - } - princ_len = krb5_storage_seek(sp, 0, SEEK_CUR) - off; - data_len = len - princ_len; - ret = krb5_data_alloc (&value, data_len); - if (ret) { - krb5_free_principal (context->context, source); - return ret; - } - krb5_storage_read (sp, value.data, data_len); - ret = hdb_value2entry (context->context, &value, &target_ent.entry); - krb5_data_free(&value); - if (ret) { - krb5_free_principal (context->context, source); - return ret; - } - ret = context->db->hdb_store (context->context, context->db, - 0, &target_ent); - hdb_free_entry (context->context, &target_ent); - if (ret) { - krb5_free_principal (context->context, source); - return ret; - } - ret = context->db->hdb_remove (context->context, context->db, source); - krb5_free_principal (context->context, source); - return ret; -} - - -/* - * Add a `modify' operation to the log. - */ - -kadm5_ret_t -kadm5_log_modify (kadm5_server_context *context, - hdb_entry *ent, - uint32_t mask) -{ - krb5_storage *sp; - kadm5_ret_t ret; - krb5_data value; - uint32_t len; - kadm5_log_context *log_context = &context->log_context; - - krb5_data_zero(&value); - - sp = krb5_storage_emem(); - ret = hdb_entry2value (context->context, ent, &value); - if (ret) - goto failed; - - ret = kadm5_log_preamble (context, sp, kadm_modify); - if (ret) - goto failed; - - len = value.length + 4; - ret = krb5_store_int32 (sp, len); - if (ret) - goto failed; - ret = krb5_store_int32 (sp, mask); - if (ret) - goto failed; - krb5_storage_write (sp, value.data, value.length); - - ret = krb5_store_int32 (sp, len); - if (ret) - goto failed; - ret = kadm5_log_postamble (log_context, sp); - if (ret) - goto failed; - ret = kadm5_log_flush (log_context, sp); - if (ret) - goto failed; - krb5_data_free(&value); - krb5_storage_free (sp); - return kadm5_log_end (context); -failed: - krb5_data_free(&value); - krb5_storage_free(sp); - return ret; -} - -/* - * Read a `modify' log operation from `sp' and apply it. - */ - -static kadm5_ret_t -kadm5_log_replay_modify (kadm5_server_context *context, - uint32_t ver, - uint32_t len, - krb5_storage *sp) -{ - krb5_error_code ret; - int32_t mask; - krb5_data value; - hdb_entry_ex ent, log_ent; - - memset(&log_ent, 0, sizeof(log_ent)); - - krb5_ret_int32 (sp, &mask); - len -= 4; - ret = krb5_data_alloc (&value, len); - if (ret) { - krb5_set_error_message(context->context, ret, "out of memory"); - return ret; - } - krb5_storage_read (sp, value.data, len); - ret = hdb_value2entry (context->context, &value, &log_ent.entry); - krb5_data_free(&value); - if (ret) - return ret; - - memset(&ent, 0, sizeof(ent)); - ret = context->db->hdb_fetch_kvno(context->context, context->db, - log_ent.entry.principal, - HDB_F_DECRYPT|HDB_F_GET_ANY|HDB_F_ADMIN_DATA, 0, &ent); - if (ret) - goto out; - if (mask & KADM5_PRINC_EXPIRE_TIME) { - if (log_ent.entry.valid_end == NULL) { - ent.entry.valid_end = NULL; - } else { - if (ent.entry.valid_end == NULL) { - ent.entry.valid_end = malloc(sizeof(*ent.entry.valid_end)); - if (ent.entry.valid_end == NULL) { - ret = ENOMEM; - krb5_set_error_message(context->context, ret, "out of memory"); - goto out; - } - } - *ent.entry.valid_end = *log_ent.entry.valid_end; - } - } - if (mask & KADM5_PW_EXPIRATION) { - if (log_ent.entry.pw_end == NULL) { - ent.entry.pw_end = NULL; - } else { - if (ent.entry.pw_end == NULL) { - ent.entry.pw_end = malloc(sizeof(*ent.entry.pw_end)); - if (ent.entry.pw_end == NULL) { - ret = ENOMEM; - krb5_set_error_message(context->context, ret, "out of memory"); - goto out; - } - } - *ent.entry.pw_end = *log_ent.entry.pw_end; - } - } - if (mask & KADM5_LAST_PWD_CHANGE) { - abort (); /* XXX */ - } - if (mask & KADM5_ATTRIBUTES) { - ent.entry.flags = log_ent.entry.flags; - } - if (mask & KADM5_MAX_LIFE) { - if (log_ent.entry.max_life == NULL) { - ent.entry.max_life = NULL; - } else { - if (ent.entry.max_life == NULL) { - ent.entry.max_life = malloc (sizeof(*ent.entry.max_life)); - if (ent.entry.max_life == NULL) { - ret = ENOMEM; - krb5_set_error_message(context->context, ret, "out of memory"); - goto out; - } - } - *ent.entry.max_life = *log_ent.entry.max_life; - } - } - if ((mask & KADM5_MOD_TIME) && (mask & KADM5_MOD_NAME)) { - if (ent.entry.modified_by == NULL) { - ent.entry.modified_by = malloc(sizeof(*ent.entry.modified_by)); - if (ent.entry.modified_by == NULL) { - ret = ENOMEM; - krb5_set_error_message(context->context, ret, "out of memory"); - goto out; - } - } else - free_Event(ent.entry.modified_by); - ret = copy_Event(log_ent.entry.modified_by, ent.entry.modified_by); - if (ret) { - krb5_set_error_message(context->context, ret, "out of memory"); - goto out; - } - } - if (mask & KADM5_KVNO) { - ent.entry.kvno = log_ent.entry.kvno; - } - if (mask & KADM5_MKVNO) { - abort (); /* XXX */ - } - if (mask & KADM5_AUX_ATTRIBUTES) { - abort (); /* XXX */ - } - if (mask & KADM5_POLICY) { - abort (); /* XXX */ - } - if (mask & KADM5_POLICY_CLR) { - abort (); /* XXX */ - } - if (mask & KADM5_MAX_RLIFE) { - if (log_ent.entry.max_renew == NULL) { - ent.entry.max_renew = NULL; - } else { - if (ent.entry.max_renew == NULL) { - ent.entry.max_renew = malloc (sizeof(*ent.entry.max_renew)); - if (ent.entry.max_renew == NULL) { - ret = ENOMEM; - krb5_set_error_message(context->context, ret, "out of memory"); - goto out; - } - } - *ent.entry.max_renew = *log_ent.entry.max_renew; - } - } - if (mask & KADM5_LAST_SUCCESS) { - abort (); /* XXX */ - } - if (mask & KADM5_LAST_FAILED) { - abort (); /* XXX */ - } - if (mask & KADM5_FAIL_AUTH_COUNT) { - abort (); /* XXX */ - } - if (mask & KADM5_KEY_DATA) { - size_t num; - size_t i; - - for (i = 0; i < ent.entry.keys.len; ++i) - free_Key(&ent.entry.keys.val[i]); - free (ent.entry.keys.val); - - num = log_ent.entry.keys.len; - - ent.entry.keys.len = num; - ent.entry.keys.val = malloc(len * sizeof(*ent.entry.keys.val)); - if (ent.entry.keys.val == NULL) { - krb5_set_error_message(context->context, ENOMEM, "out of memory"); - return ENOMEM; - } - for (i = 0; i < ent.entry.keys.len; ++i) { - ret = copy_Key(&log_ent.entry.keys.val[i], - &ent.entry.keys.val[i]); - if (ret) { - krb5_set_error_message(context->context, ret, "out of memory"); - goto out; - } - } - } - if ((mask & KADM5_TL_DATA) && log_ent.entry.extensions) { - HDB_extensions *es = ent.entry.extensions; - - ent.entry.extensions = calloc(1, sizeof(*ent.entry.extensions)); - if (ent.entry.extensions == NULL) - goto out; - - ret = copy_HDB_extensions(log_ent.entry.extensions, - ent.entry.extensions); - if (ret) { - krb5_set_error_message(context->context, ret, "out of memory"); - free(ent.entry.extensions); - ent.entry.extensions = es; - goto out; - } - if (es) { - free_HDB_extensions(es); - free(es); - } - } - ret = context->db->hdb_store(context->context, context->db, - HDB_F_REPLACE, &ent); - out: - hdb_free_entry (context->context, &ent); - hdb_free_entry (context->context, &log_ent); - return ret; -} - -/* - * Add a `nop' operation to the log. Does not close the log. - */ - -kadm5_ret_t -kadm5_log_nop (kadm5_server_context *context) -{ - krb5_storage *sp; - kadm5_ret_t ret; - kadm5_log_context *log_context = &context->log_context; - - sp = krb5_storage_emem(); - ret = kadm5_log_preamble (context, sp, kadm_nop); - if (ret) { - krb5_storage_free (sp); - return ret; - } - krb5_store_int32 (sp, 0); - krb5_store_int32 (sp, 0); - ret = kadm5_log_postamble (log_context, sp); - if (ret) { - krb5_storage_free (sp); - return ret; - } - ret = kadm5_log_flush (log_context, sp); - krb5_storage_free (sp); - - return ret; -} - -/* - * Read a `nop' log operation from `sp' and apply it. - */ - -static kadm5_ret_t -kadm5_log_replay_nop (kadm5_server_context *context, - uint32_t ver, - uint32_t len, - krb5_storage *sp) -{ - return 0; -} - -/* - * Call `func' for each log record in the log in `context' - */ - -kadm5_ret_t -kadm5_log_foreach (kadm5_server_context *context, - void (*func)(kadm5_server_context *server_context, - uint32_t ver, - time_t timestamp, - enum kadm_ops op, - uint32_t len, - krb5_storage *, - void *), - void *ctx) -{ - int fd = context->log_context.log_fd; - krb5_storage *sp; - - lseek (fd, 0, SEEK_SET); - sp = krb5_storage_from_fd (fd); - for (;;) { - int32_t ver, timestamp, op, len, len2, ver2; - - if(krb5_ret_int32 (sp, &ver) != 0) - break; - krb5_ret_int32 (sp, ×tamp); - krb5_ret_int32 (sp, &op); - krb5_ret_int32 (sp, &len); - (*func)(context, ver, timestamp, op, len, sp, ctx); - krb5_ret_int32 (sp, &len2); - krb5_ret_int32 (sp, &ver2); - if (len != len2) - abort(); - if (ver != ver2) - abort(); - } - krb5_storage_free(sp); - return 0; -} - -/* - * Go to end of log. - */ - -krb5_storage * -kadm5_log_goto_end (int fd) -{ - krb5_storage *sp; - - sp = krb5_storage_from_fd (fd); - krb5_storage_seek(sp, 0, SEEK_END); - return sp; -} - -/* - * Return previous log entry. - * - * The pointer in `sp´ is assumed to be at the top of the entry before - * previous entry. On success, the `sp´ pointer is set to data portion - * of previous entry. In case of error, it's not changed at all. - */ - -kadm5_ret_t -kadm5_log_previous (krb5_context context, - krb5_storage *sp, - uint32_t *ver, - time_t *timestamp, - enum kadm_ops *op, - uint32_t *len) -{ - krb5_error_code ret; - off_t off, oldoff; - int32_t tmp; - - oldoff = krb5_storage_seek(sp, 0, SEEK_CUR); - - krb5_storage_seek(sp, -8, SEEK_CUR); - ret = krb5_ret_int32 (sp, &tmp); - if (ret) - goto end_of_storage; - *len = tmp; - ret = krb5_ret_int32 (sp, &tmp); - if (ret) - goto end_of_storage; - *ver = tmp; - off = 24 + *len; - krb5_storage_seek(sp, -off, SEEK_CUR); - ret = krb5_ret_int32 (sp, &tmp); - if (ret) - goto end_of_storage; - if ((uint32_t)tmp != *ver) { - krb5_storage_seek(sp, oldoff, SEEK_SET); - krb5_set_error_message(context, KADM5_BAD_DB, - "kadm5_log_previous: log entry " - "have consistency failure, version number wrong " - "(tmp %lu ver %lu)", - (unsigned long)tmp, - (unsigned long)*ver); - return KADM5_BAD_DB; - } - ret = krb5_ret_int32 (sp, &tmp); - if (ret) - goto end_of_storage; - *timestamp = tmp; - ret = krb5_ret_int32 (sp, &tmp); - if (ret) - goto end_of_storage; - *op = tmp; - ret = krb5_ret_int32 (sp, &tmp); - if (ret) - goto end_of_storage; - if ((uint32_t)tmp != *len) { - krb5_storage_seek(sp, oldoff, SEEK_SET); - krb5_set_error_message(context, KADM5_BAD_DB, - "kadm5_log_previous: log entry " - "have consistency failure, length wrong"); - return KADM5_BAD_DB; - } - return 0; - - end_of_storage: - krb5_storage_seek(sp, oldoff, SEEK_SET); - krb5_set_error_message(context, ret, "kadm5_log_previous: end of storage " - "reached before end"); - return ret; -} - -/* - * Replay a record from the log - */ - -kadm5_ret_t -kadm5_log_replay (kadm5_server_context *context, - enum kadm_ops op, - uint32_t ver, - uint32_t len, - krb5_storage *sp) -{ - switch (op) { - case kadm_create : - return kadm5_log_replay_create (context, ver, len, sp); - case kadm_delete : - return kadm5_log_replay_delete (context, ver, len, sp); - case kadm_rename : - return kadm5_log_replay_rename (context, ver, len, sp); - case kadm_modify : - return kadm5_log_replay_modify (context, ver, len, sp); - case kadm_nop : - return kadm5_log_replay_nop (context, ver, len, sp); - default : - krb5_set_error_message(context->context, KADM5_FAILURE, - "Unsupported replay op %d", (int)op); - return KADM5_FAILURE; - } -} - -/* - * truncate the log - i.e. create an empty file with just (nop vno + 2) - */ - -kadm5_ret_t -kadm5_log_truncate (kadm5_server_context *server_context) -{ - kadm5_ret_t ret; - uint32_t vno; - - ret = kadm5_log_init (server_context); - if (ret) - return ret; - - ret = kadm5_log_get_version (server_context, &vno); - if (ret) - return ret; - - ret = kadm5_log_reinit (server_context); - if (ret) - return ret; - - ret = kadm5_log_set_version (server_context, vno); - if (ret) - return ret; - - ret = kadm5_log_nop (server_context); - if (ret) - return ret; - - ret = kadm5_log_end (server_context); - if (ret) - return ret; - return 0; - -} - -#ifndef NO_UNIX_SOCKETS - -static char *default_signal = NULL; -static HEIMDAL_MUTEX signal_mutex = HEIMDAL_MUTEX_INITIALIZER; - -const char * -kadm5_log_signal_socket(krb5_context context) -{ - HEIMDAL_MUTEX_lock(&signal_mutex); - if (!default_signal) - asprintf(&default_signal, "%s/signal", hdb_db_dir(context)); - HEIMDAL_MUTEX_unlock(&signal_mutex); - - return krb5_config_get_string_default(context, - NULL, - default_signal, - "kdc", - "signal_socket", - NULL); -} - -#else /* NO_UNIX_SOCKETS */ - -#define SIGNAL_SOCKET_HOST "127.0.0.1" -#define SIGNAL_SOCKET_PORT "12701" - -kadm5_ret_t -kadm5_log_signal_socket_info(krb5_context context, - int server_end, - struct addrinfo **ret_addrs) -{ - struct addrinfo hints; - struct addrinfo *addrs = NULL; - kadm5_ret_t ret = KADM5_FAILURE; - int wsret; - - memset(&hints, 0, sizeof(hints)); - - hints.ai_flags = AI_NUMERICHOST; - if (server_end) - hints.ai_flags |= AI_PASSIVE; - hints.ai_family = AF_INET; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - - wsret = getaddrinfo(SIGNAL_SOCKET_HOST, - SIGNAL_SOCKET_PORT, - &hints, &addrs); - - if (wsret != 0) { - krb5_set_error_message(context, KADM5_FAILURE, - "%s", gai_strerror(wsret)); - goto done; - } - - if (addrs == NULL) { - krb5_set_error_message(context, KADM5_FAILURE, - "getaddrinfo() failed to return address list"); - goto done; - } - - *ret_addrs = addrs; - addrs = NULL; - ret = 0; - - done: - if (addrs) - freeaddrinfo(addrs); - return ret; -} - -#endif diff --git a/kerberosV/src/lib/kadm5/marshall.c b/kerberosV/src/lib/kadm5/marshall.c deleted file mode 100644 index de3157e04ce..00000000000 --- a/kerberosV/src/lib/kadm5/marshall.c +++ /dev/null @@ -1,344 +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 "kadm5_locl.h" - -RCSID("$Id: marshall.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_store_key_data(krb5_storage *sp, - krb5_key_data *key) -{ - krb5_data c; - krb5_store_int32(sp, key->key_data_ver); - krb5_store_int32(sp, key->key_data_kvno); - krb5_store_int32(sp, key->key_data_type[0]); - c.length = key->key_data_length[0]; - c.data = key->key_data_contents[0]; - krb5_store_data(sp, c); - krb5_store_int32(sp, key->key_data_type[1]); - c.length = key->key_data_length[1]; - c.data = key->key_data_contents[1]; - krb5_store_data(sp, c); - return 0; -} - -kadm5_ret_t -kadm5_ret_key_data(krb5_storage *sp, - krb5_key_data *key) -{ - krb5_data c; - int32_t tmp; - krb5_ret_int32(sp, &tmp); - key->key_data_ver = tmp; - krb5_ret_int32(sp, &tmp); - key->key_data_kvno = tmp; - krb5_ret_int32(sp, &tmp); - key->key_data_type[0] = tmp; - krb5_ret_data(sp, &c); - key->key_data_length[0] = c.length; - key->key_data_contents[0] = c.data; - krb5_ret_int32(sp, &tmp); - key->key_data_type[1] = tmp; - krb5_ret_data(sp, &c); - key->key_data_length[1] = c.length; - key->key_data_contents[1] = c.data; - return 0; -} - -kadm5_ret_t -kadm5_store_tl_data(krb5_storage *sp, - krb5_tl_data *tl) -{ - krb5_data c; - krb5_store_int32(sp, tl->tl_data_type); - c.length = tl->tl_data_length; - c.data = tl->tl_data_contents; - krb5_store_data(sp, c); - return 0; -} - -kadm5_ret_t -kadm5_ret_tl_data(krb5_storage *sp, - krb5_tl_data *tl) -{ - krb5_data c; - int32_t tmp; - krb5_ret_int32(sp, &tmp); - tl->tl_data_type = tmp; - krb5_ret_data(sp, &c); - tl->tl_data_length = c.length; - tl->tl_data_contents = c.data; - return 0; -} - -static kadm5_ret_t -store_principal_ent(krb5_storage *sp, - kadm5_principal_ent_t princ, - uint32_t mask) -{ - int i; - - if (mask & KADM5_PRINCIPAL) - krb5_store_principal(sp, princ->principal); - if (mask & KADM5_PRINC_EXPIRE_TIME) - krb5_store_int32(sp, princ->princ_expire_time); - if (mask & KADM5_PW_EXPIRATION) - krb5_store_int32(sp, princ->pw_expiration); - if (mask & KADM5_LAST_PWD_CHANGE) - krb5_store_int32(sp, princ->last_pwd_change); - if (mask & KADM5_MAX_LIFE) - krb5_store_int32(sp, princ->max_life); - if (mask & KADM5_MOD_NAME) { - krb5_store_int32(sp, princ->mod_name != NULL); - if(princ->mod_name) - krb5_store_principal(sp, princ->mod_name); - } - if (mask & KADM5_MOD_TIME) - krb5_store_int32(sp, princ->mod_date); - if (mask & KADM5_ATTRIBUTES) - krb5_store_int32(sp, princ->attributes); - if (mask & KADM5_KVNO) - krb5_store_int32(sp, princ->kvno); - if (mask & KADM5_MKVNO) - krb5_store_int32(sp, princ->mkvno); - if (mask & KADM5_POLICY) { - krb5_store_int32(sp, princ->policy != NULL); - if(princ->policy) - krb5_store_string(sp, princ->policy); - } - if (mask & KADM5_AUX_ATTRIBUTES) - krb5_store_int32(sp, princ->aux_attributes); - if (mask & KADM5_MAX_RLIFE) - krb5_store_int32(sp, princ->max_renewable_life); - if (mask & KADM5_LAST_SUCCESS) - krb5_store_int32(sp, princ->last_success); - if (mask & KADM5_LAST_FAILED) - krb5_store_int32(sp, princ->last_failed); - if (mask & KADM5_FAIL_AUTH_COUNT) - krb5_store_int32(sp, princ->fail_auth_count); - if (mask & KADM5_KEY_DATA) { - krb5_store_int32(sp, princ->n_key_data); - for(i = 0; i < princ->n_key_data; i++) - kadm5_store_key_data(sp, &princ->key_data[i]); - } - if (mask & KADM5_TL_DATA) { - krb5_tl_data *tp; - - krb5_store_int32(sp, princ->n_tl_data); - for(tp = princ->tl_data; tp; tp = tp->tl_data_next) - kadm5_store_tl_data(sp, tp); - } - return 0; -} - - -kadm5_ret_t -kadm5_store_principal_ent(krb5_storage *sp, - kadm5_principal_ent_t princ) -{ - return store_principal_ent (sp, princ, ~0); -} - -kadm5_ret_t -kadm5_store_principal_ent_mask(krb5_storage *sp, - kadm5_principal_ent_t princ, - uint32_t mask) -{ - krb5_store_int32(sp, mask); - return store_principal_ent (sp, princ, mask); -} - -static kadm5_ret_t -ret_principal_ent(krb5_storage *sp, - kadm5_principal_ent_t princ, - uint32_t mask) -{ - int i; - int32_t tmp; - - if (mask & KADM5_PRINCIPAL) - krb5_ret_principal(sp, &princ->principal); - - if (mask & KADM5_PRINC_EXPIRE_TIME) { - krb5_ret_int32(sp, &tmp); - princ->princ_expire_time = tmp; - } - if (mask & KADM5_PW_EXPIRATION) { - krb5_ret_int32(sp, &tmp); - princ->pw_expiration = tmp; - } - if (mask & KADM5_LAST_PWD_CHANGE) { - krb5_ret_int32(sp, &tmp); - princ->last_pwd_change = tmp; - } - if (mask & KADM5_MAX_LIFE) { - krb5_ret_int32(sp, &tmp); - princ->max_life = tmp; - } - if (mask & KADM5_MOD_NAME) { - krb5_ret_int32(sp, &tmp); - if(tmp) - krb5_ret_principal(sp, &princ->mod_name); - else - princ->mod_name = NULL; - } - if (mask & KADM5_MOD_TIME) { - krb5_ret_int32(sp, &tmp); - princ->mod_date = tmp; - } - if (mask & KADM5_ATTRIBUTES) { - krb5_ret_int32(sp, &tmp); - princ->attributes = tmp; - } - if (mask & KADM5_KVNO) { - krb5_ret_int32(sp, &tmp); - princ->kvno = tmp; - } - if (mask & KADM5_MKVNO) { - krb5_ret_int32(sp, &tmp); - princ->mkvno = tmp; - } - if (mask & KADM5_POLICY) { - krb5_ret_int32(sp, &tmp); - if(tmp) - krb5_ret_string(sp, &princ->policy); - else - princ->policy = NULL; - } - if (mask & KADM5_AUX_ATTRIBUTES) { - krb5_ret_int32(sp, &tmp); - princ->aux_attributes = tmp; - } - if (mask & KADM5_MAX_RLIFE) { - krb5_ret_int32(sp, &tmp); - princ->max_renewable_life = tmp; - } - if (mask & KADM5_LAST_SUCCESS) { - krb5_ret_int32(sp, &tmp); - princ->last_success = tmp; - } - if (mask & KADM5_LAST_FAILED) { - krb5_ret_int32(sp, &tmp); - princ->last_failed = tmp; - } - if (mask & KADM5_FAIL_AUTH_COUNT) { - krb5_ret_int32(sp, &tmp); - princ->fail_auth_count = tmp; - } - if (mask & KADM5_KEY_DATA) { - krb5_ret_int32(sp, &tmp); - princ->n_key_data = tmp; - princ->key_data = malloc(princ->n_key_data * sizeof(*princ->key_data)); - if (princ->key_data == NULL && princ->n_key_data != 0) - return ENOMEM; - for(i = 0; i < princ->n_key_data; i++) - kadm5_ret_key_data(sp, &princ->key_data[i]); - } - if (mask & KADM5_TL_DATA) { - krb5_ret_int32(sp, &tmp); - princ->n_tl_data = tmp; - princ->tl_data = NULL; - for(i = 0; i < princ->n_tl_data; i++){ - krb5_tl_data *tp = malloc(sizeof(*tp)); - if (tp == NULL) - return ENOMEM; - kadm5_ret_tl_data(sp, tp); - tp->tl_data_next = princ->tl_data; - princ->tl_data = tp; - } - } - return 0; -} - -kadm5_ret_t -kadm5_ret_principal_ent(krb5_storage *sp, - kadm5_principal_ent_t princ) -{ - return ret_principal_ent (sp, princ, ~0); -} - -kadm5_ret_t -kadm5_ret_principal_ent_mask(krb5_storage *sp, - kadm5_principal_ent_t princ, - uint32_t *mask) -{ - int32_t tmp; - - krb5_ret_int32 (sp, &tmp); - *mask = tmp; - return ret_principal_ent (sp, princ, *mask); -} - -kadm5_ret_t -_kadm5_marshal_params(krb5_context context, - kadm5_config_params *params, - krb5_data *out) -{ - krb5_storage *sp = krb5_storage_emem(); - - krb5_store_int32(sp, params->mask & (KADM5_CONFIG_REALM)); - - if(params->mask & KADM5_CONFIG_REALM) - krb5_store_string(sp, params->realm); - krb5_storage_to_data(sp, out); - krb5_storage_free(sp); - - return 0; -} - -kadm5_ret_t -_kadm5_unmarshal_params(krb5_context context, - krb5_data *in, - kadm5_config_params *params) -{ - krb5_error_code ret; - krb5_storage *sp; - int32_t mask; - - sp = krb5_storage_from_data(in); - if (sp == NULL) - return ENOMEM; - - ret = krb5_ret_int32(sp, &mask); - if (ret) - goto out; - params->mask = mask; - - if(params->mask & KADM5_CONFIG_REALM) - ret = krb5_ret_string(sp, ¶ms->realm); - out: - krb5_storage_free(sp); - - return ret; -} diff --git a/kerberosV/src/lib/kadm5/modify_c.c b/kerberosV/src/lib/kadm5/modify_c.c deleted file mode 100644 index 3200389c6e1..00000000000 --- a/kerberosV/src/lib/kadm5/modify_c.c +++ /dev/null @@ -1,81 +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 "kadm5_locl.h" - -RCSID("$Id: modify_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_modify_principal(void *server_handle, - kadm5_principal_ent_t princ, - uint32_t mask) -{ - kadm5_client_context *context = server_handle; - kadm5_ret_t ret; - krb5_storage *sp; - unsigned char buf[1024]; - int32_t tmp; - krb5_data reply; - - ret = _kadm5_connect(server_handle); - if(ret) - return ret; - - sp = krb5_storage_from_mem(buf, sizeof(buf)); - if (sp == NULL) { - krb5_clear_error_message(context->context); - return ENOMEM; - } - krb5_store_int32(sp, kadm_modify); - kadm5_store_principal_ent(sp, princ); - krb5_store_int32(sp, mask); - ret = _kadm5_client_send(context, sp); - krb5_storage_free(sp); - if(ret) - return ret; - ret = _kadm5_client_recv(context, &reply); - if(ret) - return ret; - sp = krb5_storage_from_data (&reply); - if (sp == NULL) { - krb5_clear_error_message(context->context); - krb5_data_free (&reply); - return ENOMEM; - } - krb5_ret_int32(sp, &tmp); - krb5_clear_error_message(context->context); - krb5_storage_free(sp); - krb5_data_free (&reply); - return tmp; -} - diff --git a/kerberosV/src/lib/kadm5/modify_s.c b/kerberosV/src/lib/kadm5/modify_s.c deleted file mode 100644 index 7a7f017dbae..00000000000 --- a/kerberosV/src/lib/kadm5/modify_s.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 1997-2001, 2003, 2005-2006 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 "kadm5_locl.h" - -RCSID("$Id: modify_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -static kadm5_ret_t -modify_principal(void *server_handle, - kadm5_principal_ent_t princ, - uint32_t mask, - uint32_t forbidden_mask) -{ - kadm5_server_context *context = server_handle; - hdb_entry_ex ent; - kadm5_ret_t ret; - if((mask & forbidden_mask)) - return KADM5_BAD_MASK; - if((mask & KADM5_POLICY) && strcmp(princ->policy, "default")) - return KADM5_UNK_POLICY; - - memset(&ent, 0, sizeof(ent)); - ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0); - if(ret) - return ret; - ret = context->db->hdb_fetch_kvno(context->context, context->db, - princ->principal, HDB_F_GET_ANY|HDB_F_ADMIN_DATA, 0, &ent); - if(ret) - goto out; - ret = _kadm5_setup_entry(context, &ent, mask, princ, mask, NULL, 0); - if(ret) - goto out2; - ret = _kadm5_set_modifier(context, &ent.entry); - if(ret) - goto out2; - - ret = hdb_seal_keys(context->context, context->db, &ent.entry); - if (ret) - goto out2; - - ret = context->db->hdb_store(context->context, context->db, - HDB_F_REPLACE, &ent); - if (ret) - goto out2; - - kadm5_log_modify (context, - &ent.entry, - mask | KADM5_MOD_NAME | KADM5_MOD_TIME); - -out2: - hdb_free_entry(context->context, &ent); -out: - context->db->hdb_close(context->context, context->db); - return _kadm5_error_code(ret); -} - - -kadm5_ret_t -kadm5_s_modify_principal(void *server_handle, - kadm5_principal_ent_t princ, - uint32_t mask) -{ - return modify_principal(server_handle, princ, mask, - KADM5_LAST_PWD_CHANGE | KADM5_MOD_TIME - | KADM5_MOD_NAME | KADM5_MKVNO - | KADM5_AUX_ATTRIBUTES | KADM5_LAST_SUCCESS - | KADM5_LAST_FAILED); -} diff --git a/kerberosV/src/lib/kadm5/password_quality.c b/kerberosV/src/lib/kadm5/password_quality.c deleted file mode 100644 index eb72ba6182e..00000000000 --- a/kerberosV/src/lib/kadm5/password_quality.c +++ /dev/null @@ -1,512 +0,0 @@ -/* - * Copyright (c) 1997-2000, 2003-2005 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 "kadm5_locl.h" -#include "kadm5-pwcheck.h" - -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_DLFCN_H -#include -#endif - -static int -min_length_passwd_quality (krb5_context context, - krb5_principal principal, - krb5_data *pwd, - const char *opaque, - char *message, - size_t length) -{ - uint32_t min_length = krb5_config_get_int_default(context, NULL, 6, - "password_quality", - "min_length", - NULL); - - if (pwd->length < min_length) { - strlcpy(message, "Password too short", length); - return 1; - } else - return 0; -} - -static const char * -min_length_passwd_quality_v0 (krb5_context context, - krb5_principal principal, - krb5_data *pwd) -{ - static char message[1024]; - int ret; - - message[0] = '\0'; - - ret = min_length_passwd_quality(context, principal, pwd, NULL, - message, sizeof(message)); - if (ret) - return message; - return NULL; -} - - -static int -char_class_passwd_quality (krb5_context context, - krb5_principal principal, - krb5_data *pwd, - const char *opaque, - char *message, - size_t length) -{ - const char *classes[] = { - "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "abcdefghijklmnopqrstuvwxyz", - "1234567890", - "!@#$%^&*()/?<>,.{[]}\\|'~`\" " - }; - int counter = 0, req_classes; - size_t i, len; - char *pw; - - req_classes = krb5_config_get_int_default(context, NULL, 3, - "password_quality", - "min_classes", - NULL); - - len = pwd->length + 1; - pw = malloc(len); - if (pw == NULL) { - strlcpy(message, "out of memory", length); - return 1; - } - strlcpy(pw, pwd->data, len); - len = strlen(pw); - - for (i = 0; i < sizeof(classes)/sizeof(classes[0]); i++) { - if (strcspn(pw, classes[i]) < len) - counter++; - } - memset(pw, 0, pwd->length + 1); - free(pw); - if (counter < req_classes) { - snprintf(message, length, - "Password doesn't meet complexity requirement.\n" - "Add more characters from the following classes:\n" - "1. English uppercase characters (A through Z)\n" - "2. English lowercase characters (a through z)\n" - "3. Base 10 digits (0 through 9)\n" - "4. Nonalphanumeric characters (e.g., !, $, #, %%)"); - return 1; - } - return 0; -} - -static int -external_passwd_quality (krb5_context context, - krb5_principal principal, - krb5_data *pwd, - const char *opaque, - char *message, - size_t length) -{ - krb5_error_code ret; - const char *program; - char *p; - pid_t child; - int status; - char reply[1024]; - FILE *in = NULL, *out = NULL, *error = NULL; - - if (memchr(pwd->data, '\n', pwd->length) != NULL) { - snprintf(message, length, "password contains newline, " - "not valid for external test"); - return 1; - } - - program = krb5_config_get_string(context, NULL, - "password_quality", - "external_program", - NULL); - if (program == NULL) { - snprintf(message, length, "external password quality " - "program not configured"); - return 1; - } - - ret = krb5_unparse_name(context, principal, &p); - if (ret) { - strlcpy(message, "out of memory", length); - return 1; - } - - child = pipe_execv(&in, &out, &error, program, program, p, NULL); - if (child < 0) { - snprintf(message, length, "external password quality " - "program failed to execute for principal %s", p); - free(p); - return 1; - } - - fprintf(in, "principal: %s\n" - "new-password: %.*s\n" - "end\n", - p, (int)pwd->length, (char *)pwd->data); - - fclose(in); - - if (fgets(reply, sizeof(reply), out) == NULL) { - - if (fgets(reply, sizeof(reply), error) == NULL) { - snprintf(message, length, "external password quality " - "program failed without error"); - - } else { - reply[strcspn(reply, "\n")] = '\0'; - snprintf(message, length, "External password quality " - "program failed: %s", reply); - } - - fclose(out); - fclose(error); - wait_for_process(child); - return 1; - } - reply[strcspn(reply, "\n")] = '\0'; - - fclose(out); - fclose(error); - - status = wait_for_process(child); - - if (SE_IS_ERROR(status) || SE_PROCSTATUS(status) != 0) { - snprintf(message, length, "external program failed: %s", reply); - free(p); - return 1; - } - - if (strcmp(reply, "APPROVED") != 0) { - snprintf(message, length, "%s", reply); - free(p); - return 1; - } - - free(p); - - return 0; -} - - -static kadm5_passwd_quality_check_func_v0 passwd_quality_check = - min_length_passwd_quality_v0; - -struct kadm5_pw_policy_check_func builtin_funcs[] = { - { "minimum-length", min_length_passwd_quality }, - { "character-class", char_class_passwd_quality }, - { "external-check", external_passwd_quality }, - { NULL, NULL } -}; -struct kadm5_pw_policy_verifier builtin_verifier = { - "builtin", - KADM5_PASSWD_VERSION_V1, - "Heimdal builtin", - builtin_funcs -}; - -static struct kadm5_pw_policy_verifier **verifiers; -static int num_verifiers; - -/* - * setup the password quality hook - */ - -#ifndef RTLD_NOW -#define RTLD_NOW 0 -#endif - -void -kadm5_setup_passwd_quality_check(krb5_context context, - const char *check_library, - const char *check_function) -{ -#ifdef HAVE_DLOPEN - void *handle; - void *sym; - int *version; - const char *tmp; - - if(check_library == NULL) { - tmp = krb5_config_get_string(context, NULL, - "password_quality", - "check_library", - NULL); - if(tmp != NULL) - check_library = tmp; - } - if(check_function == NULL) { - tmp = krb5_config_get_string(context, NULL, - "password_quality", - "check_function", - NULL); - if(tmp != NULL) - check_function = tmp; - } - if(check_library != NULL && check_function == NULL) - check_function = "passwd_check"; - - if(check_library == NULL) - return; - handle = dlopen(check_library, RTLD_NOW); - if(handle == NULL) { - krb5_warnx(context, "failed to open `%s'", check_library); - return; - } - version = (int *) dlsym(handle, "version"); - if(version == NULL) { - krb5_warnx(context, - "didn't find `version' symbol in `%s'", check_library); - dlclose(handle); - return; - } - if(*version != KADM5_PASSWD_VERSION_V0) { - krb5_warnx(context, - "version of loaded library is %d (expected %d)", - *version, KADM5_PASSWD_VERSION_V0); - dlclose(handle); - return; - } - sym = dlsym(handle, check_function); - if(sym == NULL) { - krb5_warnx(context, - "didn't find `%s' symbol in `%s'", - check_function, check_library); - dlclose(handle); - return; - } - passwd_quality_check = (kadm5_passwd_quality_check_func_v0) sym; -#endif /* HAVE_DLOPEN */ -} - -#ifdef HAVE_DLOPEN - -static krb5_error_code -add_verifier(krb5_context context, const char *check_library) -{ - struct kadm5_pw_policy_verifier *v, **tmp; - void *handle; - int i; - - handle = dlopen(check_library, RTLD_NOW); - if(handle == NULL) { - krb5_warnx(context, "failed to open `%s'", check_library); - return ENOENT; - } - v = (struct kadm5_pw_policy_verifier *) dlsym(handle, "kadm5_password_verifier"); - if(v == NULL) { - krb5_warnx(context, - "didn't find `kadm5_password_verifier' symbol " - "in `%s'", check_library); - dlclose(handle); - return ENOENT; - } - if(v->version != KADM5_PASSWD_VERSION_V1) { - krb5_warnx(context, - "version of loaded library is %d (expected %d)", - v->version, KADM5_PASSWD_VERSION_V1); - dlclose(handle); - return EINVAL; - } - for (i = 0; i < num_verifiers; i++) { - if (strcmp(v->name, verifiers[i]->name) == 0) - break; - } - if (i < num_verifiers) { - krb5_warnx(context, "password verifier library `%s' is already loaded", - v->name); - dlclose(handle); - return 0; - } - - tmp = realloc(verifiers, (num_verifiers + 1) * sizeof(*verifiers)); - if (tmp == NULL) { - krb5_warnx(context, "out of memory"); - dlclose(handle); - return 0; - } - verifiers = tmp; - verifiers[num_verifiers] = v; - num_verifiers++; - - return 0; -} - -#endif - -krb5_error_code -kadm5_add_passwd_quality_verifier(krb5_context context, - const char *check_library) -{ -#ifdef HAVE_DLOPEN - - if(check_library == NULL) { - krb5_error_code ret; - char **tmp; - - tmp = krb5_config_get_strings(context, NULL, - "password_quality", - "policy_libraries", - NULL); - if(tmp == NULL || *tmp == NULL) - return 0; - - while (*tmp) { - ret = add_verifier(context, *tmp); - if (ret) - return ret; - tmp++; - } - return 0; - } else { - return add_verifier(context, check_library); - } -#else - return 0; -#endif /* HAVE_DLOPEN */ -} - -/* - * - */ - -static const struct kadm5_pw_policy_check_func * -find_func(krb5_context context, const char *name) -{ - const struct kadm5_pw_policy_check_func *f; - char *module = NULL; - const char *p, *func; - int i; - - p = strchr(name, ':'); - if (p) { - size_t len = p - name + 1; - func = p + 1; - module = malloc(len); - if (module == NULL) - return NULL; - strlcpy(module, name, len); - } else - func = name; - - /* Find module in loaded modules first */ - for (i = 0; i < num_verifiers; i++) { - if (module && strcmp(module, verifiers[i]->name) != 0) - continue; - for (f = verifiers[i]->funcs; f->name ; f++) - if (strcmp(func, f->name) == 0) { - if (module) - free(module); - return f; - } - } - /* Lets try try the builtin modules */ - if (module == NULL || strcmp(module, "builtin") == 0) { - for (f = builtin_verifier.funcs; f->name ; f++) - if (strcmp(func, f->name) == 0) { - if (module) - free(module); - return f; - } - } - if (module) - free(module); - return NULL; -} - -const char * -kadm5_check_password_quality (krb5_context context, - krb5_principal principal, - krb5_data *pwd_data) -{ - const struct kadm5_pw_policy_check_func *proc; - static char error_msg[1024]; - const char *msg; - char **v, **vp; - int ret; - - /* - * Check if we should use the old version of policy function. - */ - - v = krb5_config_get_strings(context, NULL, - "password_quality", - "policies", - NULL); - if (v == NULL) { - msg = (*passwd_quality_check) (context, principal, pwd_data); - if (msg) - krb5_set_error_message(context, 0, "password policy failed: %s", msg); - return msg; - } - - error_msg[0] = '\0'; - - msg = NULL; - for(vp = v; *vp; vp++) { - proc = find_func(context, *vp); - if (proc == NULL) { - msg = "failed to find password verifier function"; - krb5_set_error_message(context, 0, "Failed to find password policy " - "function: %s", *vp); - break; - } - ret = (proc->func)(context, principal, pwd_data, NULL, - error_msg, sizeof(error_msg)); - if (ret) { - krb5_set_error_message(context, 0, "Password policy " - "%s failed with %s", - proc->name, error_msg); - msg = error_msg; - break; - } - } - krb5_config_free_strings(v); - - /* If the default quality check isn't used, lets check that the - * old quality function the user have set too */ - if (msg == NULL && passwd_quality_check != min_length_passwd_quality_v0) { - msg = (*passwd_quality_check) (context, principal, pwd_data); - if (msg) - krb5_set_error_message(context, 0, "(old) password policy " - "failed with %s", msg); - - } - return msg; -} diff --git a/kerberosV/src/lib/kadm5/private.h b/kerberosV/src/lib/kadm5/private.h deleted file mode 100644 index bbaa138acb1..00000000000 --- a/kerberosV/src/lib/kadm5/private.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 1997-2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: private.h,v 1.2 2013/06/17 18:57:43 robert Exp $ */ - -#ifndef __kadm5_privatex_h__ -#define __kadm5_privatex_h__ - -struct kadm_func { - kadm5_ret_t (*chpass_principal) (void *, krb5_principal, const char*); - kadm5_ret_t (*create_principal) (void*, kadm5_principal_ent_t, - uint32_t, const char*); - kadm5_ret_t (*delete_principal) (void*, krb5_principal); - kadm5_ret_t (*destroy) (void*); - kadm5_ret_t (*flush) (void*); - kadm5_ret_t (*get_principal) (void*, krb5_principal, - kadm5_principal_ent_t, uint32_t); - kadm5_ret_t (*get_principals) (void*, const char*, char***, int*); - kadm5_ret_t (*get_privs) (void*, uint32_t*); - kadm5_ret_t (*modify_principal) (void*, kadm5_principal_ent_t, uint32_t); - kadm5_ret_t (*randkey_principal) (void*, krb5_principal, - krb5_keyblock**, int*); - kadm5_ret_t (*rename_principal) (void*, krb5_principal, krb5_principal); - kadm5_ret_t (*chpass_principal_with_key) (void *, krb5_principal, - int, krb5_key_data *); -}; - -/* XXX should be integrated */ -typedef struct kadm5_common_context { - krb5_context context; - krb5_boolean my_context; - struct kadm_func funcs; - void *data; -}kadm5_common_context; - -typedef struct kadm5_log_peer { - int fd; - char *name; - krb5_auth_context ac; - struct kadm5_log_peer *next; -} kadm5_log_peer; - -typedef struct kadm5_log_context { - char *log_file; - int log_fd; - uint32_t version; -#ifndef NO_UNIX_SOCKETS - struct sockaddr_un socket_name; -#else - struct addrinfo *socket_info; -#endif - krb5_socket_t socket_fd; -} kadm5_log_context; - -typedef struct kadm5_server_context { - krb5_context context; - krb5_boolean my_context; - struct kadm_func funcs; - /* */ - kadm5_config_params config; - HDB *db; - krb5_principal caller; - unsigned acl_flags; - kadm5_log_context log_context; -} kadm5_server_context; - -typedef struct kadm5_client_context { - krb5_context context; - krb5_boolean my_context; - struct kadm_func funcs; - /* */ - krb5_auth_context ac; - char *realm; - char *admin_server; - int kadmind_port; - int sock; - char *client_name; - char *service_name; - krb5_prompter_fct prompter; - const char *keytab; - krb5_ccache ccache; - kadm5_config_params *realm_params; -}kadm5_client_context; - -typedef struct kadm5_ad_context { - krb5_context context; - krb5_boolean my_context; - struct kadm_func funcs; - /* */ - kadm5_config_params config; - krb5_principal caller; - krb5_ccache ccache; - char *client_name; - char *realm; - void *ldap_conn; - char *base_dn; -} kadm5_ad_context; - -enum kadm_ops { - kadm_get, - kadm_delete, - kadm_create, - kadm_rename, - kadm_chpass, - kadm_modify, - kadm_randkey, - kadm_get_privs, - kadm_get_princs, - kadm_chpass_with_key, - kadm_nop -}; - -#define KADMIN_APPL_VERSION "KADM0.1" -#define KADMIN_OLD_APPL_VERSION "KADM0.0" - -#include "kadm5-private.h" - -#endif /* __kadm5_privatex_h__ */ diff --git a/kerberosV/src/lib/kadm5/privs_c.c b/kerberosV/src/lib/kadm5/privs_c.c deleted file mode 100644 index 16c77a2b22b..00000000000 --- a/kerberosV/src/lib/kadm5/privs_c.c +++ /dev/null @@ -1,82 +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 "kadm5_locl.h" - -RCSID("$Id: privs_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_get_privs(void *server_handle, uint32_t *privs) -{ - kadm5_client_context *context = server_handle; - kadm5_ret_t ret; - krb5_storage *sp; - unsigned char buf[1024]; - int32_t tmp; - krb5_data reply; - - *privs = 0; - - ret = _kadm5_connect(server_handle); - if(ret) - return ret; - - sp = krb5_storage_from_mem(buf, sizeof(buf)); - if (sp == NULL) { - krb5_clear_error_message(context->context); - return ENOMEM; - } - krb5_store_int32(sp, kadm_get_privs); - ret = _kadm5_client_send(context, sp); - krb5_storage_free(sp); - if(ret) - return ret; - ret = _kadm5_client_recv(context, &reply); - if (ret) - return ret; - sp = krb5_storage_from_data(&reply); - if (sp == NULL) { - krb5_clear_error_message(context->context); - krb5_data_free (&reply); - return ENOMEM; - } - krb5_ret_int32(sp, &tmp); - krb5_clear_error_message(context->context); - ret = tmp; - if(ret == 0){ - krb5_ret_uint32(sp, privs); - } - krb5_storage_free(sp); - krb5_data_free (&reply); - return ret; -} diff --git a/kerberosV/src/lib/kadm5/privs_s.c b/kerberosV/src/lib/kadm5/privs_s.c deleted file mode 100644 index 54b30c49981..00000000000 --- a/kerberosV/src/lib/kadm5/privs_s.c +++ /dev/null @@ -1,44 +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. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: privs_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_s_get_privs(void *server_handle, uint32_t *privs) -{ - kadm5_server_context *context = server_handle; - *privs = context->acl_flags; - return 0; -} diff --git a/kerberosV/src/lib/kadm5/randkey_c.c b/kerberosV/src/lib/kadm5/randkey_c.c deleted file mode 100644 index d9d4195ec86..00000000000 --- a/kerberosV/src/lib/kadm5/randkey_c.c +++ /dev/null @@ -1,97 +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 "kadm5_locl.h" - -RCSID("$Id: randkey_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_randkey_principal(void *server_handle, - krb5_principal princ, - krb5_keyblock **new_keys, - int *n_keys) -{ - kadm5_client_context *context = server_handle; - kadm5_ret_t ret; - krb5_storage *sp; - unsigned char buf[1024]; - int32_t tmp; - krb5_data reply; - - ret = _kadm5_connect(server_handle); - if(ret) - return ret; - - sp = krb5_storage_from_mem(buf, sizeof(buf)); - if (sp == NULL) { - krb5_clear_error_message(context->context); - return ENOMEM; - } - krb5_store_int32(sp, kadm_randkey); - krb5_store_principal(sp, princ); - ret = _kadm5_client_send(context, sp); - krb5_storage_free(sp); - if (ret) - return ret; - ret = _kadm5_client_recv(context, &reply); - if(ret) - return ret; - sp = krb5_storage_from_data(&reply); - if (sp == NULL) { - krb5_clear_error_message(context->context); - krb5_data_free (&reply); - return ENOMEM; - } - krb5_clear_error_message(context->context); - krb5_ret_int32(sp, &tmp); - ret = tmp; - if(ret == 0){ - krb5_keyblock *k; - int i; - - krb5_ret_int32(sp, &tmp); - k = malloc(tmp * sizeof(*k)); - if (k == NULL) { - ret = ENOMEM; - goto out; - } - for(i = 0; i < tmp; i++) - krb5_ret_keyblock(sp, &k[i]); - *n_keys = tmp; - *new_keys = k; - } -out: - krb5_storage_free(sp); - krb5_data_free (&reply); - return ret; -} diff --git a/kerberosV/src/lib/kadm5/randkey_s.c b/kerberosV/src/lib/kadm5/randkey_s.c deleted file mode 100644 index cba98fd95f9..00000000000 --- a/kerberosV/src/lib/kadm5/randkey_s.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 1997-2001, 2003-2006 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 "kadm5_locl.h" - -RCSID("$Id: randkey_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -/* - * Set the keys of `princ' to random values, returning the random keys - * in `new_keys', `n_keys'. - */ - -kadm5_ret_t -kadm5_s_randkey_principal(void *server_handle, - krb5_principal princ, - krb5_keyblock **new_keys, - int *n_keys) -{ - kadm5_server_context *context = server_handle; - hdb_entry_ex ent; - kadm5_ret_t ret; - - memset(&ent, 0, sizeof(ent)); - ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0); - if(ret) - return ret; - ret = context->db->hdb_fetch_kvno(context->context, context->db, princ, - HDB_F_GET_ANY|HDB_F_ADMIN_DATA, 0, &ent); - if(ret) - goto out; - - ret = _kadm5_set_keys_randomly (context, - &ent.entry, - new_keys, - n_keys); - if (ret) - goto out2; - ent.entry.kvno++; - - ret = _kadm5_set_modifier(context, &ent.entry); - if(ret) - goto out3; - ret = _kadm5_bump_pw_expire(context, &ent.entry); - if (ret) - goto out2; - - ret = hdb_seal_keys(context->context, context->db, &ent.entry); - if (ret) - goto out2; - - ret = context->db->hdb_store(context->context, context->db, - HDB_F_REPLACE, &ent); - if (ret) - goto out2; - - kadm5_log_modify (context, - &ent.entry, - KADM5_PRINCIPAL | KADM5_MOD_NAME | KADM5_MOD_TIME | - KADM5_KEY_DATA | KADM5_KVNO | KADM5_PW_EXPIRATION | - KADM5_TL_DATA); - -out3: - if (ret) { - int i; - - for (i = 0; i < *n_keys; ++i) - krb5_free_keyblock_contents (context->context, &(*new_keys)[i]); - free (*new_keys); - *new_keys = NULL; - *n_keys = 0; - } -out2: - hdb_free_entry(context->context, &ent); -out: - context->db->hdb_close(context->context, context->db); - return _kadm5_error_code(ret); -} diff --git a/kerberosV/src/lib/kadm5/rename_c.c b/kerberosV/src/lib/kadm5/rename_c.c deleted file mode 100644 index 01399d662ef..00000000000 --- a/kerberosV/src/lib/kadm5/rename_c.c +++ /dev/null @@ -1,77 +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 "kadm5_locl.h" - -RCSID("$Id: rename_c.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_c_rename_principal(void *server_handle, - krb5_principal source, - krb5_principal target) -{ - kadm5_client_context *context = server_handle; - kadm5_ret_t ret; - krb5_storage *sp; - unsigned char buf[1024]; - int32_t tmp; - krb5_data reply; - - ret = _kadm5_connect(server_handle); - if(ret) - return ret; - - sp = krb5_storage_from_mem(buf, sizeof(buf)); - if (sp == NULL) - return ENOMEM; - krb5_store_int32(sp, kadm_rename); - krb5_store_principal(sp, source); - krb5_store_principal(sp, target); - ret = _kadm5_client_send(context, sp); - krb5_storage_free(sp); - if (ret) - return ret; - ret = _kadm5_client_recv(context, &reply); - if(ret) - return ret; - sp = krb5_storage_from_data (&reply); - if (sp == NULL) { - krb5_data_free (&reply); - return ENOMEM; - } - krb5_ret_int32(sp, &tmp); - ret = tmp; - krb5_storage_free(sp); - krb5_data_free (&reply); - return ret; -} diff --git a/kerberosV/src/lib/kadm5/rename_s.c b/kerberosV/src/lib/kadm5/rename_s.c deleted file mode 100644 index a08de6ed4ec..00000000000 --- a/kerberosV/src/lib/kadm5/rename_s.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 1997 - 2001, 2003, 2005 - 2005 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 "kadm5_locl.h" - -RCSID("$Id: rename_s.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_s_rename_principal(void *server_handle, - krb5_principal source, - krb5_principal target) -{ - kadm5_server_context *context = server_handle; - kadm5_ret_t ret; - hdb_entry_ex ent; - krb5_principal oldname; - - memset(&ent, 0, sizeof(ent)); - if(krb5_principal_compare(context->context, source, target)) - return KADM5_DUP; /* XXX is this right? */ - ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0); - if(ret) - return ret; - ret = context->db->hdb_fetch_kvno(context->context, context->db, - source, HDB_F_GET_ANY|HDB_F_ADMIN_DATA, 0, &ent); - if(ret){ - context->db->hdb_close(context->context, context->db); - goto out; - } - ret = _kadm5_set_modifier(context, &ent.entry); - if(ret) - goto out2; - { - /* fix salt */ - size_t i; - Salt salt; - krb5_salt salt2; - memset(&salt, 0, sizeof(salt)); - krb5_get_pw_salt(context->context, source, &salt2); - salt.type = hdb_pw_salt; - salt.salt = salt2.saltvalue; - for(i = 0; i < ent.entry.keys.len; i++){ - if(ent.entry.keys.val[i].salt == NULL){ - ent.entry.keys.val[i].salt = - malloc(sizeof(*ent.entry.keys.val[i].salt)); - if(ent.entry.keys.val[i].salt == NULL) - return ENOMEM; - ret = copy_Salt(&salt, ent.entry.keys.val[i].salt); - if(ret) - break; - } - } - krb5_free_salt(context->context, salt2); - } - if(ret) - goto out2; - oldname = ent.entry.principal; - ent.entry.principal = target; - - ret = hdb_seal_keys(context->context, context->db, &ent.entry); - if (ret) { - ent.entry.principal = oldname; - goto out2; - } - - kadm5_log_rename (context, source, &ent.entry); - - ret = context->db->hdb_store(context->context, context->db, 0, &ent); - if(ret){ - ent.entry.principal = oldname; - goto out2; - } - ret = context->db->hdb_remove(context->context, context->db, oldname); - ent.entry.principal = oldname; -out2: - context->db->hdb_close(context->context, context->db); - hdb_free_entry(context->context, &ent); -out: - return _kadm5_error_code(ret); -} - diff --git a/kerberosV/src/lib/kadm5/sample_passwd_check.c b/kerberosV/src/lib/kadm5/sample_passwd_check.c deleted file mode 100644 index 0de3d93c810..00000000000 --- a/kerberosV/src/lib/kadm5/sample_passwd_check.c +++ /dev/null @@ -1,87 +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: sample_passwd_check.c,v 1.2 2013/06/17 18:57:43 robert Exp $ */ - -#include -#include -#include - -const char* check_length(krb5_context, krb5_principal, krb5_data *); - -/* specify the api-version this library conforms to */ - -int version = 0; - -/* just check the length of the password, this is what the default - check does, but this lets you specify the minimum length in - krb5.conf */ -const char* -check_length(krb5_context context, - krb5_principal prinipal, - krb5_data *password) -{ - int min_length = krb5_config_get_int_default(context, NULL, 6, - "password_quality", - "min_length", - NULL); - if(password->length < min_length) - return "Password too short"; - return NULL; -} - -#ifdef DICTPATH - -/* use cracklib to check password quality; this requires a patch for - cracklib that can be found at - ftp://ftp.pdc.kth.se/pub/krb/src/cracklib.patch */ - -const char* -check_cracklib(krb5_context context, - krb5_principal principal, - krb5_data *password) -{ - char *s = malloc(password->length + 1); - char *msg; - char *strings[2]; - if(s == NULL) - return NULL; /* XXX */ - strings[0] = principal->name.name_string.val[0]; /* XXX */ - strings[1] = NULL; - memcpy(s, password->data, password->length); - s[password->length] = '\0'; - msg = FascistCheck(s, DICTPATH, strings); - memset(s, 0, password->length); - free(s); - return msg; -} -#endif diff --git a/kerberosV/src/lib/kadm5/send_recv.c b/kerberosV/src/lib/kadm5/send_recv.c deleted file mode 100644 index 756fef4069c..00000000000 --- a/kerberosV/src/lib/kadm5/send_recv.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 1997-2003, 2006 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 "kadm5_locl.h" - -RCSID("$Id: send_recv.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -_kadm5_client_send(kadm5_client_context *context, krb5_storage *sp) -{ - krb5_data msg, out; - krb5_error_code ret; - size_t len; - krb5_storage *sock; - - assert(context->sock != -1); - - len = krb5_storage_seek(sp, 0, SEEK_CUR); - ret = krb5_data_alloc(&msg, len); - if (ret) { - krb5_clear_error_message(context->context); - return ret; - } - krb5_storage_seek(sp, 0, SEEK_SET); - krb5_storage_read(sp, msg.data, msg.length); - - ret = krb5_mk_priv(context->context, context->ac, &msg, &out, NULL); - krb5_data_free(&msg); - if(ret) - return ret; - - sock = krb5_storage_from_fd(context->sock); - if(sock == NULL) { - krb5_clear_error_message(context->context); - krb5_data_free(&out); - return ENOMEM; - } - - ret = krb5_store_data(sock, out); - if (ret) - krb5_clear_error_message(context->context); - krb5_storage_free(sock); - krb5_data_free(&out); - return ret; -} - -kadm5_ret_t -_kadm5_client_recv(kadm5_client_context *context, krb5_data *reply) -{ - krb5_error_code ret; - krb5_data data; - krb5_storage *sock; - - sock = krb5_storage_from_fd(context->sock); - if(sock == NULL) { - krb5_clear_error_message(context->context); - return ENOMEM; - } - ret = krb5_ret_data(sock, &data); - krb5_storage_free(sock); - krb5_clear_error_message(context->context); - if(ret == KRB5_CC_END) - return KADM5_RPC_ERROR; - else if(ret) - return ret; - - ret = krb5_rd_priv(context->context, context->ac, &data, reply, NULL); - krb5_data_free(&data); - return ret; -} - diff --git a/kerberosV/src/lib/kadm5/server_glue.c b/kerberosV/src/lib/kadm5/server_glue.c deleted file mode 100644 index a428e232bd7..00000000000 --- a/kerberosV/src/lib/kadm5/server_glue.c +++ /dev/null @@ -1,150 +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. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: server_glue.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -kadm5_init_with_password(const char *client_name, - const char *password, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_s_init_with_password(client_name, - password, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_init_with_password_ctx(krb5_context context, - const char *client_name, - const char *password, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_s_init_with_password_ctx(context, - client_name, - password, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_init_with_skey(const char *client_name, - const char *keytab, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_s_init_with_skey(client_name, - keytab, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_init_with_skey_ctx(krb5_context context, - const char *client_name, - const char *keytab, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_s_init_with_skey_ctx(context, - client_name, - keytab, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_init_with_creds(const char *client_name, - krb5_ccache ccache, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_s_init_with_creds(client_name, - ccache, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} - -kadm5_ret_t -kadm5_init_with_creds_ctx(krb5_context context, - const char *client_name, - krb5_ccache ccache, - const char *service_name, - kadm5_config_params *realm_params, - unsigned long struct_version, - unsigned long api_version, - void **server_handle) -{ - return kadm5_s_init_with_creds_ctx(context, - client_name, - ccache, - service_name, - realm_params, - struct_version, - api_version, - server_handle); -} diff --git a/kerberosV/src/lib/kadm5/set_keys.c b/kerberosV/src/lib/kadm5/set_keys.c deleted file mode 100644 index a21bc0baec2..00000000000 --- a/kerberosV/src/lib/kadm5/set_keys.c +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright (c) 1997 - 2001, 2003 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 "kadm5_locl.h" - -RCSID("$Id: set_keys.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -/* - * Set the keys of `ent' to the string-to-key of `password' - */ - -kadm5_ret_t -_kadm5_set_keys(kadm5_server_context *context, - hdb_entry *ent, - const char *password) -{ - Key *keys; - size_t num_keys; - kadm5_ret_t ret; - - ret = hdb_generate_key_set_password(context->context, - ent->principal, - password, &keys, &num_keys); - if (ret) - return ret; - - _kadm5_free_keys (context->context, ent->keys.len, ent->keys.val); - ent->keys.val = keys; - ent->keys.len = num_keys; - - hdb_entry_set_pw_change_time(context->context, ent, 0); - - if (krb5_config_get_bool_default(context->context, NULL, FALSE, - "kadmin", "save-password", NULL)) - { - ret = hdb_entry_set_password(context->context, context->db, - ent, password); - if (ret) - return ret; - } - - return 0; -} - -/* - * Set the keys of `ent' to (`n_key_data', `key_data') - */ - -kadm5_ret_t -_kadm5_set_keys2(kadm5_server_context *context, - hdb_entry *ent, - int16_t n_key_data, - krb5_key_data *key_data) -{ - krb5_error_code ret; - int i; - unsigned len; - Key *keys; - - len = n_key_data; - keys = malloc (len * sizeof(*keys)); - if (keys == NULL && len != 0) - return ENOMEM; - - _kadm5_init_keys (keys, len); - - for(i = 0; i < n_key_data; i++) { - keys[i].mkvno = NULL; - keys[i].key.keytype = key_data[i].key_data_type[0]; - ret = krb5_data_copy(&keys[i].key.keyvalue, - key_data[i].key_data_contents[0], - key_data[i].key_data_length[0]); - if(ret) - goto out; - if(key_data[i].key_data_ver == 2) { - Salt *salt; - - salt = calloc(1, sizeof(*salt)); - if(salt == NULL) { - ret = ENOMEM; - goto out; - } - keys[i].salt = salt; - salt->type = key_data[i].key_data_type[1]; - krb5_data_copy(&salt->salt, - key_data[i].key_data_contents[1], - key_data[i].key_data_length[1]); - } else - keys[i].salt = NULL; - } - _kadm5_free_keys (context->context, ent->keys.len, ent->keys.val); - ent->keys.len = len; - ent->keys.val = keys; - - hdb_entry_set_pw_change_time(context->context, ent, 0); - hdb_entry_clear_password(context->context, ent); - - return 0; - out: - _kadm5_free_keys (context->context, len, keys); - return ret; -} - -/* - * Set the keys of `ent' to `n_keys, keys' - */ - -kadm5_ret_t -_kadm5_set_keys3(kadm5_server_context *context, - hdb_entry *ent, - int n_keys, - krb5_keyblock *keyblocks) -{ - krb5_error_code ret; - int i; - unsigned len; - Key *keys; - - len = n_keys; - keys = malloc (len * sizeof(*keys)); - if (keys == NULL && len != 0) - return ENOMEM; - - _kadm5_init_keys (keys, len); - - for(i = 0; i < n_keys; i++) { - keys[i].mkvno = NULL; - ret = krb5_copy_keyblock_contents (context->context, - &keyblocks[i], - &keys[i].key); - if(ret) - goto out; - keys[i].salt = NULL; - } - _kadm5_free_keys (context->context, ent->keys.len, ent->keys.val); - ent->keys.len = len; - ent->keys.val = keys; - - hdb_entry_set_pw_change_time(context->context, ent, 0); - hdb_entry_clear_password(context->context, ent); - - return 0; - out: - _kadm5_free_keys (context->context, len, keys); - return ret; -} - -/* - * - */ - -static int -is_des_key_p(int keytype) -{ - return keytype == ETYPE_DES_CBC_CRC || - keytype == ETYPE_DES_CBC_MD4 || - keytype == ETYPE_DES_CBC_MD5; -} - - -/* - * Set the keys of `ent' to random keys and return them in `n_keys' - * and `new_keys'. - */ - -kadm5_ret_t -_kadm5_set_keys_randomly (kadm5_server_context *context, - hdb_entry *ent, - krb5_keyblock **new_keys, - int *n_keys) -{ - krb5_keyblock *kblock = NULL; - kadm5_ret_t ret = 0; - int des_keyblock; - size_t i, num_keys; - Key *keys; - - ret = hdb_generate_key_set(context->context, ent->principal, - &keys, &num_keys, 1); - if (ret) - return ret; - - kblock = malloc(num_keys * sizeof(kblock[0])); - if (kblock == NULL) { - ret = ENOMEM; - _kadm5_free_keys (context->context, num_keys, keys); - return ret; - } - memset(kblock, 0, num_keys * sizeof(kblock[0])); - - des_keyblock = -1; - for (i = 0; i < num_keys; i++) { - - /* - * To make sure all des keys are the the same we generate only - * the first one and then copy key to all other des keys. - */ - - if (des_keyblock != -1 && is_des_key_p(keys[i].key.keytype)) { - ret = krb5_copy_keyblock_contents (context->context, - &kblock[des_keyblock], - &kblock[i]); - if (ret) - goto out; - kblock[i].keytype = keys[i].key.keytype; - } else { - ret = krb5_generate_random_keyblock (context->context, - keys[i].key.keytype, - &kblock[i]); - if (ret) - goto out; - - if (is_des_key_p(keys[i].key.keytype)) - des_keyblock = i; - } - - ret = krb5_copy_keyblock_contents (context->context, - &kblock[i], - &keys[i].key); - if (ret) - goto out; - } - -out: - if(ret) { - for (i = 0; i < num_keys; ++i) - krb5_free_keyblock_contents (context->context, &kblock[i]); - free(kblock); - _kadm5_free_keys (context->context, num_keys, keys); - return ret; - } - - _kadm5_free_keys (context->context, ent->keys.len, ent->keys.val); - ent->keys.val = keys; - ent->keys.len = num_keys; - *new_keys = kblock; - *n_keys = num_keys; - - hdb_entry_set_pw_change_time(context->context, ent, 0); - hdb_entry_clear_password(context->context, ent); - - return 0; -} diff --git a/kerberosV/src/lib/kadm5/set_modifier.c b/kerberosV/src/lib/kadm5/set_modifier.c deleted file mode 100644 index 1dc76be8aff..00000000000 --- a/kerberosV/src/lib/kadm5/set_modifier.c +++ /dev/null @@ -1,54 +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. - */ - -#include "kadm5_locl.h" - -RCSID("$Id: set_modifier.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -kadm5_ret_t -_kadm5_set_modifier(kadm5_server_context *context, - hdb_entry *ent) -{ - kadm5_ret_t ret; - if(ent->modified_by == NULL){ - ent->modified_by = malloc(sizeof(*ent->modified_by)); - if(ent->modified_by == NULL) - return ENOMEM; - } else - free_Event(ent->modified_by); - ent->modified_by->time = time(NULL); - ret = krb5_copy_principal(context->context, context->caller, - &ent->modified_by->principal); - return ret; -} - diff --git a/kerberosV/src/lib/kadm5/test_pw_quality.c b/kerberosV/src/lib/kadm5/test_pw_quality.c deleted file mode 100644 index 1490edbb98c..00000000000 --- a/kerberosV/src/lib/kadm5/test_pw_quality.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2003, 2005 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 "kadm5_locl.h" -#include - -RCSID("$Id: test_pw_quality.c,v 1.2 2013/06/17 18:57:43 robert Exp $"); - -static int version_flag; -static int help_flag; -static char *principal; -static char *password; - -static struct getargs args[] = { - { "principal", 0, arg_string, &principal }, - { "password", 0, arg_string, &password }, - { "version", 0, arg_flag, &version_flag }, - { "help", 0, arg_flag, &help_flag } -}; -int num_args = sizeof(args) / sizeof(args[0]); - -int -main(int argc, char **argv) -{ - krb5_error_code ret; - krb5_context context; - krb5_principal p; - const char *s; - krb5_data pw_data; - - krb5_program_setup(&context, argc, argv, args, num_args, NULL); - - if(help_flag) - krb5_std_usage(0, args, num_args); - if(version_flag) { - print_version(NULL); - exit(0); - } - - if (principal == NULL) - krb5_errx(context, 1, "no principal given"); - if (password == NULL) - krb5_errx(context, 1, "no password given"); - - ret = krb5_parse_name(context, principal, &p); - if (ret) - krb5_errx(context, 1, "krb5_parse_name: %s", principal); - - pw_data.data = password; - pw_data.length = strlen(password); - - kadm5_setup_passwd_quality_check (context, NULL, NULL); - ret = kadm5_add_passwd_quality_verifier(context, NULL); - if (ret) - krb5_errx(context, 1, "kadm5_add_passwd_quality_verifier"); - - s = kadm5_check_password_quality (context, p, &pw_data); - if (s) - krb5_errx(context, 1, "kadm5_check_password_quality:\n%s", s); - - krb5_free_principal(context, p); - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/kadm5/version-script.map b/kerberosV/src/lib/kadm5/version-script.map deleted file mode 100644 index ab55275e9b0..00000000000 --- a/kerberosV/src/lib/kadm5/version-script.map +++ /dev/null @@ -1,66 +0,0 @@ -# $Id: version-script.map,v 1.1 2013/06/17 18:57:43 robert Exp $ - -HEIMDAL_KAMD5_SERVER_1.0 { - global: - kadm5_ad_init_with_password; - kadm5_ad_init_with_password_ctx; - kadm5_add_passwd_quality_verifier; - kadm5_check_password_quality; - kadm5_chpass_principal; - kadm5_chpass_principal_with_key; - kadm5_create_principal; - kadm5_delete_principal; - kadm5_destroy; - kadm5_flush; - kadm5_free_key_data; - kadm5_free_name_list; - kadm5_free_principal_ent; - kadm5_get_principal; - kadm5_get_principals; - kadm5_get_privs; - kadm5_init_with_creds; - kadm5_init_with_creds_ctx; - kadm5_init_with_password; - kadm5_init_with_password_ctx; - kadm5_init_with_skey; - kadm5_init_with_skey_ctx; - kadm5_modify_principal; - kadm5_randkey_principal; - kadm5_rename_principal; - kadm5_ret_key_data; - kadm5_ret_principal_ent; - kadm5_ret_principal_ent_mask; - kadm5_ret_tl_data; - kadm5_setup_passwd_quality_check; - kadm5_store_key_data; - kadm5_store_principal_ent; - kadm5_store_principal_ent_mask; - kadm5_store_tl_data; - kadm5_s_init_with_password_ctx; - kadm5_s_init_with_password; - kadm5_s_init_with_skey_ctx; - kadm5_s_init_with_skey; - kadm5_s_init_with_creds_ctx; - kadm5_s_init_with_creds; - kadm5_s_chpass_principal_cond; - kadm5_log_set_version; - kadm5_log_signal_socket; - kadm5_log_previous; - kadm5_log_goto_end; - kadm5_log_foreach; - kadm5_log_get_version_fd; - kadm5_log_get_version; - kadm5_log_replay; - kadm5_log_end; - kadm5_log_reinit; - kadm5_log_init; - kadm5_log_nop; - kadm5_log_truncate; - kadm5_log_modify; - _kadm5_acl_check_permission; - _kadm5_unmarshal_params; - _kadm5_s_get_db; - _kadm5_privs_to_string; - local: - *; -}; diff --git a/kerberosV/src/lib/kafs/ChangeLog b/kerberosV/src/lib/kafs/ChangeLog deleted file mode 100644 index 302146adc92..00000000000 --- a/kerberosV/src/lib/kafs/ChangeLog +++ /dev/null @@ -1,572 +0,0 @@ -2008-07-17 Love Hörnquist Åstrand - - * common.c: Try afs/cell@REALM before afs@REALM since that is what - OpenAFS folks have been saying is best pratices for some time - now. Patch from Derrick Brashear. - -2008-04-15 Love Hörnquist Åstrand - * afssys.c: Avoid using entry points depending on _IOWR if there - is no _IOWR (on cygwin). - -2007-07-10 Love Hörnquist Åstrand - - * Makefile.am: New library version. - -2007-05-10 Love Hörnquist Åstrand - - * kafs.h: Add VIOCSETTOK2 - -2006-10-21 Love Hörnquist Åstrand - - * Makefile.am: unbreak previous - - * Makefile.am: split dist and nodist sources - -2006-10-20 Love Hörnquist Åstrand - - * Makefile.am: add more files - -2006-05-01 Love Hörnquist Åstrand - - * kafs.3: Spelling, from Björn Sandell. - -2006-04-11 Love Hörnquist Åstrand - - * afssys.c: use afs_ioctlnum, From Tomas Olsson - -2006-04-10 Love Hörnquist Åstrand - - * afssys.c: Try harder to get the pioctl to work via the /proc or - /dev interface, OpenAFS choose to reuse the same ioctl number, - while Arla didn't. Also, try new ioctl before the the old - syscalls. - - * afskrb5.c (afslog_uid_int): use the simpler - krb5_principal_get_realm function. - -2005-12-21 Love Hörnquist Åstrand - - * Makefile.am: Remove dependency on config.h, breaks IRIX build, - could depend on libkafs_la_OBJECTS, but that is just asking for - trubble. - -2005-10-20 Love Hörnquist Åstrand - - * afssys.c (k_hasafs_recheck): new function, allow rechecking if - AFS client have started now, internaly it resets the internal - state from k_hasafs() and retry retry the probing. The problem - with calling k_hasaf() is that is plays around with signals, and - that cases problem for some systems/applications. - -2005-10-02 Love Hörnquist Åstrand - - * kafs_locl.h: Maybe include . - - * afssys.c: Mac OS X 10.4 needs a runtime check if we are going to - use the syscall, there is no cpp define to use to check the - version. Every after 10.0 (darwin 8.0) uses the /dev/ version of - the pioctl. - -2005-10-01 Love Hörnquist Åstrand - - * afssys.c: Support the new MacOS X 10.4 ioctl interface that is a - device node. Patched from Tomas Olson . - -2005-08-26 Love Hörnquist Åstrand - - * afskrb5.c: Default to use 2b tokens. - -2005-06-17 Love Hörnquist Åstrand - - * common.c: rename index to idx - - * afssys.c (k_afs_cell_of_file): unconst path - -2005-06-02 Love Hörnquist Åstrand - - * use struct kafs_data everywhere, don't mix with the typedef - kafs_data - - * roken_rename.h: rename more resolve.c symbols - - * afssys.c: Don't building map_syscall_name_to_number where its - not used. - -2005-02-24 Love Hörnquist Åstrand - - * Makefile.am: bump version to 4:1:4 - -2005-02-03 Love Hörnquist Åstrand - - * kafs.h: de-__P - -2004-12-06 Love Hörnquist Åstrand - - * afskrb5.c: s/KEYTYPE_DES/ETYPE_DES_CBC_CRC/ - -2004-08-09 Love Hörnquist Åstrand - - * afssysdefs.h: ifdef protect AFS_SYSCALL for DragonFly since they - still define __FreeBSD__ (and __FreeBSD_version), but claim that - they will stop doing it some time... - - * afssysdefs.h: dragonflybsd uses 339 just like freebsd5 - -2004-06-22 Love Hörnquist Åstrand - - * afssys.c: s/arla/nnpfs/ - - * afssys.c: support the linux /proc/fs/mumel/afs_ioctl afs - "syscall" interface - -2004-01-22 Love Hörnquist Åstrand - - * common.c: search paths for AFS configuration files for the - OpenAFS MacOS X, fix comment - - * kafs.h: search paths for AFS configuration files for the OpenAFS - MacOS X - -2003-12-02 Love Hörnquist Åstrand - - * common.c: add _PATH_ARLA_OPENBSD & c/o - - * kafs.h: add _PATH_ARLA_OPENBSD & c/o - -2003-11-14 Love Hörnquist Åstrand - - * common.c: typo, Bruno Rohee - -2003-11-08 Love Hörnquist Åstrand - - * kafs.3: spelling, partly from jmc - -2003-09-30 Love Hörnquist Åstrand - - * afskrb5.c (krb5_afslog_uid_home): be even more friendly to the - user and fetch context and id ourself - -2003-09-23 Love Hörnquist Åstrand - - * afskrb5.c (afslog_uid_int): just belive that realm hint the user - passed us - -2003-07-23 Love Hörnquist Åstrand - - * Makefile.am: always include v4 symbols - - * afskrb.c: provide dummy krb_ function to there is no need to - bump major - -2003-06-22 Love Hörnquist Åstrand - - * afskrb5.c (v5_convert): rename one of the two c to cred4 - -2003-04-23 Love Hörnquist Åstrand - - * common.c, kafs.h: drop the int argument (the error code) from - the logging function - -2003-04-22 Johan Danielsson - - * afskrb5.c (v5_convert): better match what other functions do - with values from krb5.conf, like case insensitivity - -2003-04-16 Love Hörnquist Åstrand - - * kafs.3: Change .Fd #include to .In header.h - from Thomas Klausner - -2003-04-14 Love Hörnquist Åstrand - - * Makefile.am: (libkafs_la_LDFLAGS): update version - - * Makefile.am (ROKEN_SRCS): drop strupr.c - - * kafs.3: document kafs_set_verbose - - * common.c (kafs_set_verbose): add function that (re)sets the - logging function - (_kafs_try_get_cred): add function that does (krb_data->get_cred) to - make logging easier (that is now done in this function) - (*): use _kafs_try_get_cred - - * afskrb5.c (get_cred): handle that inst can be the empty string too - (v5_convert): use _kafs_foldup - (krb5_afslog_uid_home): set name - (krb5_afslog_uid_home): ditto - - * afskrb.c (krb_afslog_uid_home): set name - (krb_afslog_uid_home): ditto - - * kafs_locl.h (kafs_data): add name - (_kafs_foldup): internally export - -2003-04-11 Love Hörnquist Åstrand - - * kafs.3: tell that cell-name is uppercased - - * Makefile.am: add INCLUDE_krb4 when using krb4, add INCLUDE_des - when using krb5, add strupr.c - - * afskrb5.c: Check the cell part of the name, not the realm part - when checking if 2b should be used. The reson is afs@REALM might - have updated their servers but not afs/cell@REALM. Add constant - KAFS_RXKAD_2B_KVNO. - -2003-04-06 Love Hörnquist Åstrand - - * kafs.3: s/kerberos/Kerberos/ - -2003-03-19 Love Hörnquist Åstrand - - * kafs.3: spelling, from - - * kafs.3: document the kafs_settoken functions write about the - krb5_appdefault option for kerberos 5 afs tokens fix prototypes - -2003-03-18 Love Hörnquist Åstrand - - * afskrb5.c (kafs_settoken5): change signature to include a - krb5_context, use v5_convert - (v5_convert): new function, converts a krb5_ccreds to a kafs_token in - three diffrent ways, not at all, local 524/2b, and using 524 - (v5_to_kt): add code to do local 524/2b - (get_cred): use v5_convert - - - * kafs.h (kafs_settoken5): change signature to include a - krb5_context - - * Makefile.am: always build the libkafs library now that the - kerberos 5 can stand on their own - - * kafs.3: expose the krb5 functions - - * common.c (kafs_settoken_rxkad): move all content kerberos - version from kafs_settoken to kafs_settoken_rxkad - (_kafs_fixup_viceid): move the fixup the timestamp to make client - happy code here. - (_kafs_v4_to_kt): move all the kerberos 4 dependant parts from - kafs_settoken here. - (*): adapt to kafs_token - - * afskrb5.c (kafs_settoken5): new function, inserts a krb5_creds - into kernel - (v5_to_kt): new function, stores a krb5_creds in struct kafs_token - (get_cred): add a appdefault boolean ("libkafs", realm, "afs-use-524") - that can used to toggle if there should v5 token should be used - directly or converted via 524 first. - - * afskrb.c: move kafs_settoken here, use struct kafs_token - - * kafs_locl.h: include krb5-v4compat.h if needed, define an - internal structure struct kafs_token that carries around for rxkad - data that is independant of kerberos version - -2003-02-18 Love Hörnquist Åstrand - - * dlfcn.h: s/intialize/initialize, from - - -2003-02-08 Assar Westerlund - - * afssysdefs.h: fix FreeBSD section - -2003-02-06 Love Hörnquist Åstrand - - * afssysdefs.h: use syscall 208 on openbsd (all version) use - syscall 339 on freebsd 5.0 and later, use 210 on 4.x and earlier - -2002-08-28 Johan Danielsson - - * kafs.3: move around sections (from NetBSD) - -2002-05-31 Assar Westerlund - - * common.c: remove the trial of afs@REALM for cell != realm, it - tries to use the wrong key for foreign cells - -2002-05-20 Johan Danielsson - - * Makefile.am: version number - -2002-04-18 Johan Danielsson - - * common.c (find_cells): make file parameter const - -2001-11-01 Assar Westerlund - - * add strsep, and bump version to 3:3:3 - -2001-10-27 Assar Westerlund - - * Makefile.am (libkafs_la_LDFLAGS): set version to 3:2:3 - -2001-10-24 Assar Westerlund - - * afskrb.c (afslog_uid_int): handle krb_get_tf_fullname that - cannot take NULLs - (such as the MIT one) - -2001-10-22 Assar Westerlund - - * Makefile.am (ROKEN_SRCS): add strlcpy.c - -2001-10-09 Assar Westerlund - - * Makefile.am (ROKEN_SRCS): add strtok_r.c - * roken_rename.h (dns_srv_order): rename correctly - (strtok_r): add renaming - -2001-09-10 Assar Westerlund - - * kafs.h, common.c: look for configuration files in /etc/arla (the - location in debian's arla package) - -2001-08-26 Assar Westerlund - - * Makefile.am: handle both krb5 and krb4 cases - -2001-07-19 Assar Westerlund - - * Makefile.am (libkafs_la_LDFLAGS): set version to 3:0:3 - -2001-07-12 Assar Westerlund - - * common.c: look in /etc/openafs for debian openafs - * kafs.h: add paths for openafs debian (/etc/openafs) - - * Makefile.am: add required library dependencies - -2001-07-03 Assar Westerlund - - * Makefile.am (libkafs_la_LDFLAGS): set versoin to 2:4:2 - -2001-06-19 Assar Westerlund - - * common.c (_kafs_realm_of_cell): changed to first try exact match - in CellServDB, then exact match in DNS, and finally in-exact match - in CellServDB - -2001-05-18 Johan Danielsson - - * Makefile.am: only build resolve.c if doing renaming - -2001-02-12 Assar Westerlund - - * Makefile.am, roken_rename.h: add rename of dns functions - -2000-12-11 Assar Westerlund - - * Makefile.am (libkafs_la_LDFLAGS): set version to 2:3:2 - -2000-11-17 Assar Westerlund - - * afssysdefs.h: solaris 8 apperently uses 65 - -2000-09-19 Assar Westerlund - - * Makefile.am (libkafs_la_LDFLAGS): bump version to 2:2:2 - -2000-09-12 Johan Danielsson - - * dlfcn.c: correct arguments to some snprintf:s - -2000-07-25 Johan Danielsson - - * Makefile.am: bump version to 2:1:2 - -2000-04-03 Assar Westerlund - - * Makefile.am: set version to 2:0:2 - -2000-03-20 Assar Westerlund - - * afssysdefs.h: make versions later than 5.7 of solaris also use - 73 - -2000-03-16 Assar Westerlund - - * afskrb.c (afslog_uid_int): use krb_get_tf_fullname instead of - krb_get_default_principal - -2000-03-15 Assar Westerlund - - * afssys.c (map_syscall_name_to_number): ignore # at - beginning-of-line - -2000-03-13 Assar Westerlund - - * afssysdefs.h: add 230 for MacOS X per information from - - -1999-12-06 Assar Westerlund - - * Makefile.am: set version to 1:2:1 - -1999-11-22 Assar Westerlund - - * afskrb5.c (afslog_uid_int): handle d->realm == NULL - -1999-11-17 Assar Westerlund - - * 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 - - * 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 - - * 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 - - * 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 - - * afskrb5.c (get_cred): update to new krb524_convert_creds_kdc - -1999-08-12 Johan Danielsson - - * Makefile.am: ignore the comlicated aix construct if !krb4 - -1999-07-26 Assar Westerlund - - * Makefile.am: set version to 1:0:1 - -1999-07-22 Assar Westerlund - - * afssysdefs.h: define AFS_SYSCALL to 73 for Solaris 2.7 - -1999-07-07 Assar Westerlund - - * 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 - - * common.c (realm_of_cell): rename to _kafs_realm_of_cell and - un-staticize - -Fri Mar 19 14:52:29 1999 Johan Danielsson - - * Makefile.am: add version-info - -Thu Mar 18 11:24:02 1999 Johan Danielsson - - * Makefile.am: include Makefile.am.common - -Sat Feb 27 19:46:21 1999 Johan Danielsson - - * Makefile.am: remove EXTRA_DATA (as of autoconf 2.13/automake - 1.4) - -Thu Feb 11 22:57:37 1999 Johan Danielsson - - * Makefile.am: set AIX_SRC also if !AIX - -Tue Dec 1 14:45:15 1998 Johan Danielsson - - * Makefile.am: fix AIX linkage - -Sun Nov 22 10:40:44 1998 Assar Westerlund - - * Makefile.in (WFLAGS): set - -Sat Nov 21 16:55:19 1998 Johan Danielsson - - * afskrb5.c: add homedir support - -Sun Sep 6 20:16:27 1998 Assar Westerlund - - * add new functionality for specifying the homedir to krb_afslog - et al - -Thu Jul 16 01:27:19 1998 Assar Westerlund - - * afssys.c: reorganize order of definitions. - (try_one, try_two): conditionalize - -Thu Jul 9 18:31:52 1998 Johan Danielsson - - * common.c (realm_of_cell): make the dns fallback work - -Wed Jul 8 01:39:44 1998 Assar Westerlund - - * 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 - - * 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 - - * Makefile.in (roken_rename.h): remove dependency - -Mon May 25 05:25:54 1998 Assar Westerlund - - * Makefile.in (clean): try to remove shared library debris - -Sun Apr 19 09:58:40 1998 Assar Westerlund - - * Makefile.in: add symlink magic for linux - -Sat Apr 4 15:08:48 1998 Assar Westerlund - - * 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 - - * 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 - - * Makefile.in: Install/uninstall one library at a time. - -Thu Feb 12 05:38:58 1998 Assar Westerlund - - * Makefile.in (install): one library at a time. - -Mon Feb 9 23:40:32 1998 Assar Westerlund - - * common.c (find_cells): ignore empty lines - -Tue Jan 6 04:25:58 1998 Assar Westerlund - - * afssysdefs.h (AFS_SYSCALL): add FreeBSD - -Fri Jan 2 17:08:24 1998 Assar Westerlund - - * kafs.h: new VICEIOCTL's. From - - * afssysdefs.h: Add OpenBSD diff --git a/kerberosV/src/lib/kafs/Makefile.am b/kerberosV/src/lib/kafs/Makefile.am deleted file mode 100644 index ce1fdc1c7e6..00000000000 --- a/kerberosV/src/lib/kafs/Makefile.am +++ /dev/null @@ -1,93 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:43 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(AFS_EXTRA_DEFS) $(ROKEN_RENAME) - -if KRB5 -DEPLIB_krb5 = ../krb5/libkrb5.la -krb5_am_workaround = $(INCLUDE_hcrypto) -I$(top_srcdir)/lib/krb5 -else -DEPLIB_krb5 = -krb5_am_workaround = -endif # KRB5 -AM_CPPFLAGS += $(krb5_am_workaround) - - -if AIX -AFSL_EXP = $(srcdir)/afsl.exp - -if AIX4 -AFS_EXTRA_LD = -bnoentry -else -AFS_EXTRA_LD = -e _nostart -endif - -if AIX_DYNAMIC_AFS -AIX_SRC = -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 - -libkafs_la_LIBADD = $(DEPLIB_krb5) $(LIBADD_roken) - -lib_LTLIBRARIES = libkafs.la -libkafs_la_LDFLAGS = -version-info 5:1:5 -foodir = $(libdir) -foo_DATA = $(AFS_EXTRA_LIBS) -# EXTRA_DATA = afslib.so - -CLEANFILES= $(AFS_EXTRA_LIBS) $(ROKEN_SRCS) - -include_HEADERS = kafs.h - -if KRB5 -afskrb5_c = -endif - -if do_roken_rename -ROKEN_SRCS = resolve.c strtok_r.c strlcpy.c strsep.c -endif - -dist_libkafs_la_SOURCES = \ - afssys.c \ - afskrb5.c \ - common.c \ - $(AIX_SRC) \ - kafs_locl.h \ - afssysdefs.h \ - roken_rename.h - -nodist_libkafs_la_SOURCES = $(ROKEN_SRCS) - -EXTRA_libkafs_la_SOURCES = afskrb5.c afslib.c - -EXTRA_DIST = NTMakefile afsl.exp afslib.exp $(man_MANS) - -man_MANS = kafs.3 - -# 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 - -resolve.c: - $(LN_S) $(srcdir)/../roken/resolve.c . - -strtok_r.c: - $(LN_S) $(srcdir)/../roken/strtok_r.c . - -strlcpy.c: - $(LN_S) $(srcdir)/../roken/strlcpy.c . - -strsep.c: - $(LN_S) $(srcdir)/../roken/strsep.c . diff --git a/kerberosV/src/lib/kafs/Makefile.in b/kerberosV/src/lib/kafs/Makefile.in deleted file mode 100644 index 5d640a096e5..00000000000 --- a/kerberosV/src/lib/kafs/Makefile.in +++ /dev/null @@ -1,1055 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:43 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:43 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:43 robert Exp $ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -subdir = lib/kafs -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" \ - "$(DESTDIR)$(foodir)" "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -@KRB5_TRUE@am__DEPENDENCIES_1 = ../krb5/libkrb5.la -am__DEPENDENCIES_2 = -libkafs_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) -am__dist_libkafs_la_SOURCES_DIST = afssys.c afskrb5.c common.c \ - afslib.c kafs_locl.h afssysdefs.h roken_rename.h -@AIX_DYNAMIC_AFS_FALSE@@AIX_TRUE@am__objects_1 = afslib.lo -dist_libkafs_la_OBJECTS = afssys.lo afskrb5.lo common.lo \ - $(am__objects_1) -@do_roken_rename_TRUE@am__objects_2 = resolve.lo strtok_r.lo \ -@do_roken_rename_TRUE@ strlcpy.lo strsep.lo -nodist_libkafs_la_OBJECTS = $(am__objects_2) -libkafs_la_OBJECTS = $(dist_libkafs_la_OBJECTS) \ - $(nodist_libkafs_la_OBJECTS) -libkafs_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libkafs_la_LDFLAGS) $(LDFLAGS) -o $@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(EXTRA_libkafs_la_SOURCES) $(dist_libkafs_la_SOURCES) \ - $(nodist_libkafs_la_SOURCES) -DIST_SOURCES = $(EXTRA_libkafs_la_SOURCES) \ - $(am__dist_libkafs_la_SOURCES_DIST) -man3dir = $(mandir)/man3 -MANS = $(man_MANS) -DATA = $(foo_DATA) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(AFS_EXTRA_DEFS) $(ROKEN_RENAME) \ - $(krb5_am_workaround) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -@KRB5_FALSE@DEPLIB_krb5 = -@KRB5_TRUE@DEPLIB_krb5 = ../krb5/libkrb5.la -@KRB5_FALSE@krb5_am_workaround = -@KRB5_TRUE@krb5_am_workaround = $(INCLUDE_hcrypto) -I$(top_srcdir)/lib/krb5 -@AIX_FALSE@AFSL_EXP = -@AIX_TRUE@AFSL_EXP = $(srcdir)/afsl.exp -@AIX4_FALSE@@AIX_TRUE@AFS_EXTRA_LD = -e _nostart -@AIX4_TRUE@@AIX_TRUE@AFS_EXTRA_LD = -bnoentry -@AIX_DYNAMIC_AFS_FALSE@@AIX_TRUE@AIX_SRC = afslib.c -@AIX_DYNAMIC_AFS_TRUE@@AIX_TRUE@AIX_SRC = -@AIX_FALSE@AIX_SRC = -@AIX_DYNAMIC_AFS_FALSE@@AIX_TRUE@AFS_EXTRA_LIBS = -@AIX_DYNAMIC_AFS_TRUE@@AIX_TRUE@AFS_EXTRA_LIBS = afslib.so -@AIX_DYNAMIC_AFS_FALSE@@AIX_TRUE@AFS_EXTRA_DEFS = -DSTATIC_AFS -@AIX_DYNAMIC_AFS_TRUE@@AIX_TRUE@AFS_EXTRA_DEFS = -libkafs_la_LIBADD = $(DEPLIB_krb5) $(LIBADD_roken) -lib_LTLIBRARIES = libkafs.la -libkafs_la_LDFLAGS = -version-info 19:0:0 -foodir = $(libdir) -foo_DATA = $(AFS_EXTRA_LIBS) -# EXTRA_DATA = afslib.so -CLEANFILES = $(AFS_EXTRA_LIBS) $(ROKEN_SRCS) -include_HEADERS = kafs.h -@KRB5_TRUE@afskrb5_c = -@do_roken_rename_TRUE@ROKEN_SRCS = resolve.c strtok_r.c strlcpy.c strsep.c -dist_libkafs_la_SOURCES = \ - afssys.c \ - afskrb5.c \ - common.c \ - $(AIX_SRC) \ - kafs_locl.h \ - afssysdefs.h \ - roken_rename.h - -nodist_libkafs_la_SOURCES = $(ROKEN_SRCS) -EXTRA_libkafs_la_SOURCES = afskrb5.c afslib.c -EXTRA_DIST = NTMakefile afsl.exp afslib.exp $(man_MANS) -man_MANS = kafs.3 -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/kafs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/kafs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libkafs.la: $(libkafs_la_OBJECTS) $(libkafs_la_DEPENDENCIES) - $(libkafs_la_LINK) -rpath $(libdir) $(libkafs_la_OBJECTS) $(libkafs_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afskrb5.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afslib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/afssys.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsep.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtok_r.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man3: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list=''; test -n "$(man3dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ - done; } - -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man3dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } -install-fooDATA: $(foo_DATA) - @$(NORMAL_INSTALL) - test -z "$(foodir)" || $(MKDIR_P) "$(DESTDIR)$(foodir)" - @list='$(foo_DATA)'; test -n "$(foodir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(foodir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(foodir)" || exit $$?; \ - done - -uninstall-fooDATA: - @$(NORMAL_UNINSTALL) - @list='$(foo_DATA)'; test -n "$(foodir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(foodir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(foodir)" && rm -f $$files -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) $(MANS) $(DATA) $(HEADERS) all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(foodir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-fooDATA install-includeHEADERS install-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man3 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-fooDATA uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES uninstall-man - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man3 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libLTLIBRARIES clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-fooDATA \ - install-html install-html-am install-includeHEADERS \ - install-info install-info-am install-libLTLIBRARIES \ - install-man install-man3 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-fooDATA uninstall-hook \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-man uninstall-man3 - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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 - -resolve.c: - $(LN_S) $(srcdir)/../roken/resolve.c . - -strtok_r.c: - $(LN_S) $(srcdir)/../roken/strtok_r.c . - -strlcpy.c: - $(LN_S) $(srcdir)/../roken/strlcpy.c . - -strsep.c: - $(LN_S) $(srcdir)/../roken/strsep.c . - -# 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/kerberosV/src/lib/kafs/NTMakefile b/kerberosV/src/lib/kafs/NTMakefile deleted file mode 100644 index 4cff3426f10..00000000000 --- a/kerberosV/src/lib/kafs/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=lib\kafs - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/lib/kafs/afskrb5.c b/kerberosV/src/lib/kafs/afskrb5.c deleted file mode 100644 index c04f43abbc2..00000000000 --- a/kerberosV/src/lib/kafs/afskrb5.c +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright (c) 1995-2003 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" - -struct krb5_kafs_data { - krb5_context context; - krb5_ccache id; - krb5_const_realm realm; -}; - -enum { - KAFS_RXKAD_2B_KVNO = 213, - KAFS_RXKAD_K5_KVNO = 256 -}; - -static int -v5_to_kt(krb5_creds *cred, uid_t uid, struct kafs_token *kt, int local524) -{ - int kvno, ret; - - kt->ticket = NULL; - - /* check if des key */ - if (cred->session.keyvalue.length != 8) - return EINVAL; - - if (local524) { - Ticket t; - unsigned char *buf; - size_t buf_len; - size_t len; - - kvno = KAFS_RXKAD_2B_KVNO; - - ret = decode_Ticket(cred->ticket.data, cred->ticket.length, &t, &len); - if (ret) - return ret; - if (t.tkt_vno != 5) - return -1; - - ASN1_MALLOC_ENCODE(EncryptedData, buf, buf_len, &t.enc_part, - &len, ret); - free_Ticket(&t); - if (ret) - return ret; - if(buf_len != len) { - free(buf); - return KRB5KRB_ERR_GENERIC; - } - - kt->ticket = buf; - kt->ticket_len = buf_len; - - } else { - kvno = KAFS_RXKAD_K5_KVNO; - kt->ticket = malloc(cred->ticket.length); - if (kt->ticket == NULL) - return ENOMEM; - kt->ticket_len = cred->ticket.length; - memcpy(kt->ticket, cred->ticket.data, kt->ticket_len); - - ret = 0; - } - - - /* - * Build a struct ClearToken - */ - - kt->ct.AuthHandle = kvno; - memcpy(kt->ct.HandShakeKey, cred->session.keyvalue.data, 8); - kt->ct.ViceId = uid; - kt->ct.BeginTimestamp = cred->times.starttime; - kt->ct.EndTimestamp = cred->times.endtime; - - _kafs_fixup_viceid(&kt->ct, uid); - - return 0; -} - -static krb5_error_code -v5_convert(krb5_context context, krb5_ccache id, - krb5_creds *cred, uid_t uid, - const char *cell, - struct kafs_token *kt) -{ - krb5_error_code ret; - char *c, *val; - - c = strdup(cell); - if (c == NULL) - return ENOMEM; - _kafs_foldup(c, c); - krb5_appdefault_string (context, "libkafs", - c, - "afs-use-524", "2b", &val); - free(c); - - if (strcasecmp(val, "local") == 0 || - strcasecmp(val, "2b") == 0) - ret = v5_to_kt(cred, uid, kt, 1); - else - ret = v5_to_kt(cred, uid, kt, 0); - - free(val); - return ret; -} - - -/* - * - */ - -static int -get_cred(struct kafs_data *data, const char *name, const char *inst, - const char *realm, uid_t uid, struct kafs_token *kt) -{ - krb5_error_code ret; - krb5_creds in_creds, *out_creds; - struct krb5_kafs_data *d = data->data; - int invalid; - - memset(&in_creds, 0, sizeof(in_creds)); - - ret = krb5_make_principal(d->context, &in_creds.server, - realm, name, inst, NULL); - 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 = ETYPE_DES_CBC_CRC; - - /* check if des is disable, and in that case enable it for afs */ - invalid = krb5_enctype_valid(d->context, in_creds.session.keytype); - if (invalid) - krb5_enctype_enable(d->context, in_creds.session.keytype); - - ret = krb5_get_credentials(d->context, 0, d->id, &in_creds, &out_creds); - if (ret) { - in_creds.session.keytype = ETYPE_DES_CBC_MD5; - ret = krb5_get_credentials(d->context, 0, d->id, &in_creds, &out_creds); - } - - if (invalid) - krb5_enctype_disable(d->context, in_creds.session.keytype); - - krb5_free_principal(d->context, in_creds.server); - krb5_free_principal(d->context, in_creds.client); - if(ret) - return ret; - - ret = v5_convert(d->context, d->id, out_creds, uid, - (inst != NULL && inst[0] != '\0') ? inst : realm, kt); - krb5_free_creds(d->context, out_creds); - - return ret; -} - -static const char * -get_error(struct kafs_data *data, int error) -{ - struct krb5_kafs_data *d = data->data; - return krb5_get_error_message(d->context, error); -} - -static void -free_error(struct kafs_data *data, const char *str) -{ - struct krb5_kafs_data *d = data->data; - krb5_free_error_message(d->context, str); -} - -static krb5_error_code -afslog_uid_int(struct kafs_data *data, const char *cell, const char *rh, - uid_t uid, const char *homedir) -{ - krb5_error_code ret; - struct kafs_token kt; - krb5_principal princ; - const char *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_principal_get_realm (d->context, princ); - - kt.ticket = NULL; - ret = _kafs_get_cred(data, cell, d->realm, trealm, uid, &kt); - krb5_free_principal (d->context, princ); - - if(ret == 0) { - ret = kafs_settoken_rxkad(cell, &kt.ct, kt.ticket, kt.ticket_len); - free(kt.ticket); - } - return ret; -} - -static char * -get_realm(struct 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) -{ - struct kafs_data kd; - struct krb5_kafs_data d; - krb5_error_code ret; - - kd.name = "krb5"; - kd.afslog_uid = afslog_uid_int; - kd.get_cred = get_cred; - kd.get_realm = get_realm; - kd.get_error = get_error; - kd.free_error = free_error; - kd.data = &d; - if (context == NULL) { - ret = krb5_init_context(&d.context); - if (ret) - return ret; - } else - d.context = context; - if (id == NULL) { - ret = krb5_cc_default(d.context, &d.id); - if (ret) - goto out; - } else - d.id = id; - d.realm = realm; - ret = afslog_uid_int(&kd, cell, 0, uid, homedir); - if (id == NULL) - krb5_cc_close(context, d.id); - out: - if (context == NULL) - krb5_free_context(d.context); - return ret; -} - -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) -{ - struct kafs_data kd; - - kd.name = "krb5"; - kd.get_realm = get_realm; - kd.get_error = get_error; - kd.free_error = free_error; - return _kafs_realm_of_cell(&kd, cell, realm); -} - -/* - * - */ - -int -kafs_settoken5(krb5_context context, const char *cell, uid_t uid, - krb5_creds *cred) -{ - struct kafs_token kt; - int ret; - - ret = v5_convert(context, NULL, cred, uid, cell, &kt); - if (ret) - return ret; - - ret = kafs_settoken_rxkad(cell, &kt.ct, kt.ticket, kt.ticket_len); - - free(kt.ticket); - - return ret; -} diff --git a/kerberosV/src/lib/kafs/afsl.exp b/kerberosV/src/lib/kafs/afsl.exp deleted file mode 100644 index 4d2b00e2833..00000000000 --- a/kerberosV/src/lib/kafs/afsl.exp +++ /dev/null @@ -1,6 +0,0 @@ -#!/unix - -* This mumbo jumbo creates entry points to syscalls in _AIX - -lpioctl syscall -lsetpag syscall diff --git a/kerberosV/src/lib/kafs/afslib.c b/kerberosV/src/lib/kafs/afslib.c deleted file mode 100644 index f2ef8481ed8..00000000000 --- a/kerberosV/src/lib/kafs/afslib.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * This file is only used with AIX - */ - -#include "kafs_locl.h" - -int -aix_pioctl(char *a_path, - int o_opcode, - struct ViceIoctl *a_paramsP, - int a_followSymlinks) -{ - return lpioctl(a_path, o_opcode, a_paramsP, a_followSymlinks); -} - -int -aix_setpag(void) -{ - return lsetpag(); -} diff --git a/kerberosV/src/lib/kafs/afslib.exp b/kerberosV/src/lib/kafs/afslib.exp deleted file mode 100644 index f288717706e..00000000000 --- a/kerberosV/src/lib/kafs/afslib.exp +++ /dev/null @@ -1,3 +0,0 @@ -#! -aix_pioctl -aix_setpag diff --git a/kerberosV/src/lib/kafs/afssys.c b/kerberosV/src/lib/kafs/afssys.c deleted file mode 100644 index 740df045058..00000000000 --- a/kerberosV/src/lib/kafs/afssys.c +++ /dev/null @@ -1,570 +0,0 @@ -/* - * Copyright (c) 1995 - 2000, 2002, 2004, 2005 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" - -struct procdata { - unsigned long param4; - unsigned long param3; - unsigned long param2; - unsigned long param1; - unsigned long syscall; -}; -#define VIOC_SYSCALL_PROC _IOW('C', 1, void *) - -struct devdata { - unsigned long syscall; - unsigned long param1; - unsigned long param2; - unsigned long param3; - unsigned long param4; - unsigned long param5; - unsigned long param6; - unsigned long retval; -}; -#ifdef _IOWR -#define VIOC_SYSCALL_DEV _IOWR('C', 2, struct devdata) -#define VIOC_SYSCALL_DEV_OPENAFS _IOWR('C', 1, struct devdata) -#endif - - -int _kafs_debug; /* this should be done in a better way */ - -#define UNKNOWN_ENTRY_POINT (-1) -#define NO_ENTRY_POINT 0 -#define SINGLE_ENTRY_POINT 1 -#define MULTIPLE_ENTRY_POINT 2 -#define SINGLE_ENTRY_POINT2 3 -#define SINGLE_ENTRY_POINT3 4 -#define LINUX_PROC_POINT 5 -#define AIX_ENTRY_POINTS 6 -#define MACOS_DEV_POINT 7 - -static int afs_entry_point = UNKNOWN_ENTRY_POINT; -static int afs_syscalls[2]; -static char *afs_ioctlpath; -static unsigned long afs_ioctlnum; - -/* Magic to get AIX syscalls to work */ -#ifdef _AIX - -static int (*Pioctl)(char*, int, struct ViceIoctl*, int); -static int (*Setpag)(void); - -#include "dlfcn.h" - -/* - * - */ - -static int -try_aix(void) -{ -#ifdef STATIC_AFS_SYSCALLS - Pioctl = aix_pioctl; - Setpag = aix_setpag; -#else - void *ptr; - char path[MaxPathLen], *p; - /* - * If we are root or running setuid don't trust AFSLIBPATH! - */ - if (getuid() != 0 && !issuid() && (p = getenv("AFSLIBPATH")) != NULL) - strlcpy(path, p, sizeof(path)); - else - snprintf(path, sizeof(path), "%s/afslib.so", LIBDIR); - - ptr = dlopen(path, RTLD_NOW); - if(ptr == NULL) { - if(_kafs_debug) { - if(errno == ENOEXEC && (p = dlerror()) != NULL) - fprintf(stderr, "dlopen(%s): %s\n", path, p); - else if (errno != ENOENT) - fprintf(stderr, "dlopen(%s): %s\n", path, strerror(errno)); - } - return 1; - } - Setpag = (int (*)(void))dlsym(ptr, "aix_setpag"); - Pioctl = (int (*)(char*, int, - struct ViceIoctl*, int))dlsym(ptr, "aix_pioctl"); -#endif - afs_entry_point = AIX_ENTRY_POINTS; - return 0; -} -#endif /* _AIX */ - -/* - * This probably only works under Solaris and could get confused if - * there's a /etc/name_to_sysnum file. - */ - -#if defined(AFS_SYSCALL) || defined(AFS_SYSCALL2) || defined(AFS_SYSCALL3) - -#define _PATH_ETC_NAME_TO_SYSNUM "/etc/name_to_sysnum" - -static int -map_syscall_name_to_number (const char *str, int *res) -{ - FILE *f; - char buf[256]; - size_t str_len = strlen (str); - - f = fopen (_PATH_ETC_NAME_TO_SYSNUM, "r"); - if (f == NULL) - return -1; - while (fgets (buf, sizeof(buf), f) != NULL) { - if (buf[0] == '#') - continue; - - if (strncmp (str, buf, str_len) == 0) { - char *begptr = buf + str_len; - char *endptr; - long val = strtol (begptr, &endptr, 0); - - if (val != 0 && endptr != begptr) { - fclose (f); - *res = val; - return 0; - } - } - } - fclose (f); - return -1; -} -#endif - -static int -try_ioctlpath(const char *path, unsigned long ioctlnum, int entrypoint) -{ - int fd, ret, saved_errno; - - fd = open(path, O_RDWR); - if (fd < 0) - return 1; - switch (entrypoint) { - case LINUX_PROC_POINT: { - struct procdata data = { 0, 0, 0, 0, AFSCALL_PIOCTL }; - data.param2 = (unsigned long)VIOCGETTOK; - ret = ioctl(fd, ioctlnum, &data); - break; - } - case MACOS_DEV_POINT: { - struct devdata data = { AFSCALL_PIOCTL, 0, 0, 0, 0, 0, 0, 0 }; - data.param2 = (unsigned long)VIOCGETTOK; - ret = ioctl(fd, ioctlnum, &data); - break; - } - default: - abort(); - } - saved_errno = errno; - close(fd); - /* - * Be quite liberal in what error are ok, the first is the one - * that should trigger given that params is NULL. - */ - if (ret && - (saved_errno != EFAULT && - saved_errno != EDOM && - saved_errno != ENOTCONN)) - return 1; - afs_ioctlnum = ioctlnum; - afs_ioctlpath = strdup(path); - if (afs_ioctlpath == NULL) - return 1; - afs_entry_point = entrypoint; - return 0; -} - -static int -do_ioctl(void *data) -{ - int fd, ret, saved_errno; - fd = open(afs_ioctlpath, O_RDWR); - if (fd < 0) { - errno = EINVAL; - return -1; - } - ret = ioctl(fd, afs_ioctlnum, data); - saved_errno = errno; - close(fd); - errno = saved_errno; - return ret; -} - -int -k_pioctl(char *a_path, - int o_opcode, - struct ViceIoctl *a_paramsP, - int a_followSymlinks) -{ -#ifndef NO_AFS - switch(afs_entry_point){ -#if defined(AFS_SYSCALL) || defined(AFS_SYSCALL2) || defined(AFS_SYSCALL3) - case SINGLE_ENTRY_POINT: - case SINGLE_ENTRY_POINT2: - case SINGLE_ENTRY_POINT3: - return syscall(afs_syscalls[0], AFSCALL_PIOCTL, - a_path, o_opcode, a_paramsP, a_followSymlinks); -#endif -#if defined(AFS_PIOCTL) - case MULTIPLE_ENTRY_POINT: - return syscall(afs_syscalls[0], - a_path, o_opcode, a_paramsP, a_followSymlinks); -#endif - case LINUX_PROC_POINT: { - struct procdata data = { 0, 0, 0, 0, AFSCALL_PIOCTL }; - data.param1 = (unsigned long)a_path; - data.param2 = (unsigned long)o_opcode; - data.param3 = (unsigned long)a_paramsP; - data.param4 = (unsigned long)a_followSymlinks; - return do_ioctl(&data); - } - case MACOS_DEV_POINT: { - struct devdata data = { AFSCALL_PIOCTL, 0, 0, 0, 0, 0, 0, 0 }; - int ret; - - data.param1 = (unsigned long)a_path; - data.param2 = (unsigned long)o_opcode; - data.param3 = (unsigned long)a_paramsP; - data.param4 = (unsigned long)a_followSymlinks; - - ret = do_ioctl(&data); - if (ret) - return ret; - - return data.retval; - } -#ifdef _AIX - case AIX_ENTRY_POINTS: - return Pioctl(a_path, o_opcode, a_paramsP, a_followSymlinks); -#endif - } - errno = ENOSYS; -#ifdef SIGSYS - kill(getpid(), SIGSYS); /* You lose! */ -#endif -#endif /* NO_AFS */ - return -1; -} - -int -k_afs_cell_of_file(const char *path, char *cell, int len) -{ - struct ViceIoctl parms; - parms.in = NULL; - parms.in_size = 0; - parms.out = cell; - parms.out_size = len; - return k_pioctl(rk_UNCONST(path), VIOC_FILE_CELL_NAME, &parms, 1); -} - -int -k_unlog(void) -{ - struct ViceIoctl parms; - memset(&parms, 0, sizeof(parms)); - return k_pioctl(0, VIOCUNLOG, &parms, 0); -} - -int -k_setpag(void) -{ -#ifndef NO_AFS - switch(afs_entry_point){ -#if defined(AFS_SYSCALL) || defined(AFS_SYSCALL2) || defined(AFS_SYSCALL3) - case SINGLE_ENTRY_POINT: - case SINGLE_ENTRY_POINT2: - case SINGLE_ENTRY_POINT3: - return syscall(afs_syscalls[0], AFSCALL_SETPAG); -#endif -#if defined(AFS_PIOCTL) - case MULTIPLE_ENTRY_POINT: - return syscall(afs_syscalls[1]); -#endif - case LINUX_PROC_POINT: { - struct procdata data = { 0, 0, 0, 0, AFSCALL_SETPAG }; - return do_ioctl(&data); - } - case MACOS_DEV_POINT: { - struct devdata data = { AFSCALL_SETPAG, 0, 0, 0, 0, 0, 0, 0 }; - int ret = do_ioctl(&data); - if (ret) - return ret; - return data.retval; - } -#ifdef _AIX - case AIX_ENTRY_POINTS: - return Setpag(); -#endif - } - - errno = ENOSYS; -#ifdef SIGSYS - kill(getpid(), SIGSYS); /* You lose! */ -#endif -#endif /* NO_AFS */ - return -1; -} - -static jmp_buf catch_SIGSYS; - -#ifdef SIGSYS - -static RETSIGTYPE -SIGSYS_handler(int sig) -{ - errno = 0; - signal(SIGSYS, SIGSYS_handler); /* Need to reinstall handler on SYSV */ - longjmp(catch_SIGSYS, 1); -} - -#endif - -/* - * Try to see if `syscall' is a pioctl. Return 0 iff succesful. - */ - -#if defined(AFS_SYSCALL) || defined(AFS_SYSCALL2) || defined(AFS_SYSCALL3) -static int -try_one (int syscall_num) -{ - struct ViceIoctl parms; - memset(&parms, 0, sizeof(parms)); - - if (setjmp(catch_SIGSYS) == 0) { - syscall(syscall_num, AFSCALL_PIOCTL, - 0, VIOCSETTOK, &parms, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (errno == EINVAL) { - afs_entry_point = SINGLE_ENTRY_POINT; - afs_syscalls[0] = syscall_num; - return 0; - } - } - return 1; -} -#endif - -/* - * Try to see if `syscall_pioctl' is a pioctl syscall. Return 0 iff - * succesful. - * - */ - -#ifdef AFS_PIOCTL -static int -try_two (int syscall_pioctl, int syscall_setpag) -{ - struct ViceIoctl parms; - memset(&parms, 0, sizeof(parms)); - - if (setjmp(catch_SIGSYS) == 0) { - syscall(syscall_pioctl, - 0, VIOCSETTOK, &parms, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (errno == EINVAL) { - afs_entry_point = MULTIPLE_ENTRY_POINT; - afs_syscalls[0] = syscall_pioctl; - afs_syscalls[1] = syscall_setpag; - return 0; - } - } - return 1; -} -#endif - -int -k_hasafs(void) -{ -#if !defined(NO_AFS) && defined(SIGSYS) - RETSIGTYPE (*saved_func)(int); -#endif - int saved_errno, ret; - char *env = NULL; - - if (!issuid()) - env = getenv ("AFS_SYSCALL"); - - /* - * Already checked presence of AFS syscalls? - */ - if (afs_entry_point != UNKNOWN_ENTRY_POINT) - return afs_entry_point != NO_ENTRY_POINT; - - /* - * Probe kernel for AFS specific syscalls, - * they (currently) come in two flavors. - * If the syscall is absent we recive a SIGSYS. - */ - afs_entry_point = NO_ENTRY_POINT; - - saved_errno = errno; -#ifndef NO_AFS -#ifdef SIGSYS - saved_func = signal(SIGSYS, SIGSYS_handler); -#endif - if (env && strstr(env, "..") == NULL) { - - if (strncmp("/proc/", env, 6) == 0) { - if (try_ioctlpath(env, VIOC_SYSCALL_PROC, LINUX_PROC_POINT) == 0) - goto done; - } - if (strncmp("/dev/", env, 5) == 0) { -#ifdef VIOC_SYSCALL_DEV - if (try_ioctlpath(env, VIOC_SYSCALL_DEV, MACOS_DEV_POINT) == 0) - goto done; -#endif -#ifdef VIOC_SYSCALL_DEV_OPENAFS - if (try_ioctlpath(env,VIOC_SYSCALL_DEV_OPENAFS,MACOS_DEV_POINT) ==0) - goto done; -#endif - } - } - - ret = try_ioctlpath("/proc/fs/openafs/afs_ioctl", - VIOC_SYSCALL_PROC, LINUX_PROC_POINT); - if (ret == 0) - goto done; - ret = try_ioctlpath("/proc/fs/nnpfs/afs_ioctl", - VIOC_SYSCALL_PROC, LINUX_PROC_POINT); - if (ret == 0) - goto done; - -#ifdef VIOC_SYSCALL_DEV_OPENAFS - ret = try_ioctlpath("/dev/openafs_ioctl", - VIOC_SYSCALL_DEV_OPENAFS, MACOS_DEV_POINT); - if (ret == 0) - goto done; -#endif -#ifdef VIOC_SYSCALL_DEV - ret = try_ioctlpath("/dev/nnpfs_ioctl", VIOC_SYSCALL_DEV, MACOS_DEV_POINT); - if (ret == 0) - goto done; -#endif - -#if defined(AFS_SYSCALL) || defined(AFS_SYSCALL2) || defined(AFS_SYSCALL3) - { - int tmp; - - if (env != NULL) { - if (sscanf (env, "%d", &tmp) == 1) { - if (try_one (tmp) == 0) - goto done; - } else { - char *end = NULL; - char *p; - char *s = strdup (env); - - if (s != NULL) { - for (p = strtok_r (s, ",", &end); - p != NULL; - p = strtok_r (NULL, ",", &end)) { - if (map_syscall_name_to_number (p, &tmp) == 0) - if (try_one (tmp) == 0) { - free (s); - goto done; - } - } - free (s); - } - } - } - } -#endif /* AFS_SYSCALL || AFS_SYSCALL2 || AFS_SYSCALL3 */ - -#ifdef AFS_SYSCALL - if (try_one (AFS_SYSCALL) == 0) - goto done; -#endif /* AFS_SYSCALL */ - -#ifdef AFS_PIOCTL - { - int tmp[2]; - - if (env != NULL && sscanf (env, "%d%d", &tmp[0], &tmp[1]) == 2) - if (try_two (tmp[0], tmp[1]) == 2) - goto done; - } -#endif /* AFS_PIOCTL */ - -#ifdef AFS_PIOCTL - if (try_two (AFS_PIOCTL, AFS_SETPAG) == 0) - goto done; -#endif /* AFS_PIOCTL */ - -#ifdef AFS_SYSCALL2 - if (try_one (AFS_SYSCALL2) == 0) - goto done; -#endif /* AFS_SYSCALL2 */ - -#ifdef AFS_SYSCALL3 - if (try_one (AFS_SYSCALL3) == 0) - goto done; -#endif /* AFS_SYSCALL3 */ - -#ifdef _AIX -#if 0 - if (env != NULL) { - char *pos = NULL; - char *pioctl_name; - char *setpag_name; - - pioctl_name = strtok_r (env, ", \t", &pos); - if (pioctl_name != NULL) { - setpag_name = strtok_r (NULL, ", \t", &pos); - if (setpag_name != NULL) - if (try_aix (pioctl_name, setpag_name) == 0) - goto done; - } - } -#endif - - if(try_aix() == 0) - goto done; -#endif - - -done: -#ifdef SIGSYS - signal(SIGSYS, saved_func); -#endif -#endif /* NO_AFS */ - errno = saved_errno; - return afs_entry_point != NO_ENTRY_POINT; -} - -int -k_hasafs_recheck(void) -{ - afs_entry_point = UNKNOWN_ENTRY_POINT; - return k_hasafs(); -} diff --git a/kerberosV/src/lib/kafs/afssysdefs.h b/kerberosV/src/lib/kafs/afssysdefs.h deleted file mode 100644 index 9669ae1a940..00000000000 --- a/kerberosV/src/lib/kafs/afssysdefs.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 1995 - 2003 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: afssysdefs.h,v 1.2 2013/06/17 18:57:43 robert Exp $ */ - -/* - * This section is for machines using single entry point AFS syscalls! - * and/or - * This section is for machines using multiple entry point AFS syscalls! - * - * SunOS 4 is an example of single entry point and sgi of multiple - * entry point syscalls. - */ - -#if SunOS == 40 -#define AFS_SYSCALL 31 -#endif - -#if SunOS >= 50 && SunOS < 57 -#define AFS_SYSCALL 105 -#endif - -#if SunOS == 57 -#define AFS_SYSCALL 73 -#endif - -#if SunOS >= 58 -#define AFS_SYSCALL 65 -#endif - -#if defined(__hpux) -#define AFS_SYSCALL 50 -#define AFS_SYSCALL2 49 -#define AFS_SYSCALL3 48 -#endif - -#if defined(_AIX) -/* _AIX is too weird */ -#endif - -#if defined(__sgi) -#define AFS_PIOCTL (64+1000) -#define AFS_SETPAG (65+1000) -#endif - -#if defined(__osf__) -#define AFS_SYSCALL 232 -#define AFS_SYSCALL2 258 -#endif - -#if defined(__ultrix) -#define AFS_SYSCALL 31 -#endif - -#if defined(__FreeBSD__) -#if __FreeBSD_version >= 500000 -#define AFS_SYSCALL 339 -#else -#define AFS_SYSCALL 210 -#endif -#endif /* __FreeBSD__ */ - -#ifdef __DragonFly__ -#ifndef AFS_SYSCALL -#define AFS_SYSCALL 339 -#endif -#endif - -#ifdef __OpenBSD__ -#define AFS_SYSCALL 208 -#endif - -#if defined(__NetBSD__) -#define AFS_SYSCALL 210 -#endif - -#ifdef __APPLE__ /* MacOS X */ -#define AFS_SYSCALL 230 -#endif - -#ifdef SYS_afs_syscall -#define AFS_SYSCALL3 SYS_afs_syscall -#endif diff --git a/kerberosV/src/lib/kafs/common.c b/kerberosV/src/lib/kafs/common.c deleted file mode 100644 index a14eea8dd2d..00000000000 --- a/kerberosV/src/lib/kafs/common.c +++ /dev/null @@ -1,463 +0,0 @@ -/* - * Copyright (c) 1997 - 2005 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" - -#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 (*kafs_verbose)(void *, const char *); -static void *kafs_verbose_ctx; - -void -_kafs_foldup(char *a, const char *b) -{ - for (; *b; a++, b++) - if (IsAsciiLower(*b)) - *a = ToAsciiUpper(*b); - else - *a = *b; - *a = '\0'; -} - -void -kafs_set_verbose(void (*f)(void *, const char *), void *ctx) -{ - if (f) { - kafs_verbose = f; - kafs_verbose_ctx = ctx; - } -} - -int -kafs_settoken_rxkad(const char *cell, struct ClearToken *ct, - void *ticket, size_t ticket_len) -{ - struct ViceIoctl parms; - char buf[2048], *t; - int32_t sizeof_x; - - t = buf; - /* - * length of secret token followed by secret token - */ - sizeof_x = ticket_len; - memcpy(t, &sizeof_x, sizeof(sizeof_x)); - t += sizeof(sizeof_x); - memcpy(t, ticket, 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; - - return k_pioctl(0, VIOCSETTOK, &parms, 0); -} - -void -_kafs_fixup_viceid(struct ClearToken *ct, uid_t uid) -{ -#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--; - } -} - -/* 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 rk_dns_reply *r; - int ok = -1; - r = rk_dns_lookup(cell, "afsdb"); - if(r){ - struct rk_resource_record *rr = r->head; - while(rr){ - if(rr->type == rk_ns_t_afsdb && rr->u.afsdb->preference == 1){ - strlcpy(dbserver, - rr->u.afsdb->domain, - len); - ok = 0; - break; - } - rr = rr->next; - } - rk_dns_free_data(r); - } - return ok; -} - - -/* - * Try to find the cells we should try to klog to in "file". - */ -static void -find_cells(const char *file, char ***cells, int *idx) -{ - FILE *f; - char cell[64]; - int i; - int ind = *idx; - - 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); - *idx = ind; -} - -/* - * Get tokens for all cells[] - */ -static int -afslog_cells(struct 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(struct kafs_data *data, - uid_t uid, const char *homedir) -{ - int ret; - char **cells = NULL; - int idx = 0; - - if (homedir == NULL) - homedir = getenv("HOME"); - if (homedir != NULL) { - char home[MaxPathLen]; - snprintf(home, sizeof(home), "%s/.TheseCells", homedir); - find_cells(home, &cells, &idx); - } - find_cells(_PATH_THESECELLS, &cells, &idx); - find_cells(_PATH_THISCELL, &cells, &idx); - find_cells(_PATH_ARLA_THESECELLS, &cells, &idx); - find_cells(_PATH_ARLA_THISCELL, &cells, &idx); - find_cells(_PATH_OPENAFS_DEBIAN_THESECELLS, &cells, &idx); - find_cells(_PATH_OPENAFS_DEBIAN_THISCELL, &cells, &idx); - find_cells(_PATH_OPENAFS_MACOSX_THESECELLS, &cells, &idx); - find_cells(_PATH_OPENAFS_MACOSX_THISCELL, &cells, &idx); - find_cells(_PATH_ARLA_DEBIAN_THESECELLS, &cells, &idx); - find_cells(_PATH_ARLA_DEBIAN_THISCELL, &cells, &idx); - find_cells(_PATH_ARLA_OPENBSD_THESECELLS, &cells, &idx); - find_cells(_PATH_ARLA_OPENBSD_THISCELL, &cells, &idx); - - ret = afslog_cells(data, cells, idx, uid, homedir); - while(idx > 0) - free(cells[--idx]); - free(cells); - return ret; -} - - -static int -file_find_cell(struct kafs_data *data, - const char *cell, char **realm, int exact) -{ - FILE *F; - char buf[1024]; - char *p; - int ret = -1; - - if ((F = fopen(_PATH_CELLSERVDB, "r")) - || (F = fopen(_PATH_ARLA_CELLSERVDB, "r")) - || (F = fopen(_PATH_OPENAFS_DEBIAN_CELLSERVDB, "r")) - || (F = fopen(_PATH_OPENAFS_MACOSX_CELLSERVDB, "r")) - || (F = fopen(_PATH_ARLA_DEBIAN_CELLSERVDB, "r"))) { - while (fgets(buf, sizeof(buf), F)) { - int cmp; - - if (buf[0] != '>') - continue; /* Not a cell name line, try next line */ - p = buf; - strsep(&p, " \t\n#"); - - if (exact) - cmp = strcmp(buf + 1, cell); - else - cmp = strncmp(buf + 1, cell, strlen(cell)); - - if (cmp == 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); - } - return ret; -} - -/* Find the realm associated with cell. Do this by opening CellServDB - file 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(struct kafs_data *data, - const char *cell, char **realm) -{ - char buf[1024]; - int ret; - - ret = file_find_cell(data, cell, realm, 1); - if (ret == 0) - return ret; - if (dns_find_cell(cell, buf, sizeof(buf)) == 0) { - *realm = (*data->get_realm)(data, buf); - if(*realm != NULL) - return 0; - } - return file_find_cell(data, cell, realm, 0); -} - -static int -_kafs_try_get_cred(struct kafs_data *data, const char *user, const char *cell, - const char *realm, uid_t uid, struct kafs_token *kt) -{ - int ret; - - ret = (*data->get_cred)(data, user, cell, realm, uid, kt); - if (kafs_verbose) { - const char *estr = (*data->get_error)(data, ret); - char *str; - asprintf(&str, "%s tried afs%s%s@%s -> %s (%d)", - data->name, cell ? "/" : "", - cell ? cell : "", realm, estr ? estr : "unknown", ret); - (*kafs_verbose)(kafs_verbose_ctx, str); - if (estr) - (*data->free_error)(data, estr); - free(str); - } - - return ret; -} - - -int -_kafs_get_cred(struct kafs_data *data, - const char *cell, - const char *realm_hint, - const char *realm, - uid_t uid, - struct kafs_token *kt) -{ - int ret = -1; - char *vl_realm; - char CELL[64]; - - /* We're about to find 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. - */ - - if (realm_hint) { - ret = _kafs_try_get_cred(data, AUTH_SUPERUSER, - cell, realm_hint, uid, kt); - if (ret == 0) return 0; - ret = _kafs_try_get_cred(data, AUTH_SUPERUSER, - NULL, realm_hint, uid, kt); - if (ret == 0) return 0; - } - - _kafs_foldup(CELL, cell); - - /* - * 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 = _kafs_try_get_cred(data, AUTH_SUPERUSER, - cell, realm, uid, kt); - if (ret == 0) return 0; - - /* - * If cell == realm we don't need no cross-cell authentication. - * Try afs@REALM. - */ - if (strcmp(CELL, realm) == 0) { - ret = _kafs_try_get_cred(data, AUTH_SUPERUSER, - NULL, realm, uid, kt); - 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 = _kafs_try_get_cred(data, AUTH_SUPERUSER, - NULL, CELL, uid, kt); - if (ret == 0) return 0; - ret = _kafs_try_get_cred(data, AUTH_SUPERUSER, - cell, CELL, uid, kt); - 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 = _kafs_try_get_cred(data, AUTH_SUPERUSER, - cell, vl_realm, uid, kt); - if (ret) - ret = _kafs_try_get_cred(data, AUTH_SUPERUSER, - NULL, vl_realm, uid, kt); - free(vl_realm); - if (ret == 0) return 0; - } - - return ret; -} diff --git a/kerberosV/src/lib/kafs/kafs.3 b/kerberosV/src/lib/kafs/kafs.3 deleted file mode 100644 index dc6d4fded90..00000000000 --- a/kerberosV/src/lib/kafs/kafs.3 +++ /dev/null @@ -1,296 +0,0 @@ -.\" Copyright (c) 1998 - 2006 Kungliga Tekniska Högskolan -.\" (Royal Institute of Technology, Stockholm, Sweden). -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" 3. Neither the name of the Institute nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $Id: kafs.3,v 1.6 2013/06/17 18:57:43 robert Exp $ -.\" -.Dd May 1, 2006 -.Os HEIMDAL -.Dt KAFS 3 -.Sh NAME -.Nm k_hasafs , -.Nm k_hasafs_recheck , -.Nm k_pioctl , -.Nm k_unlog , -.Nm k_setpag , -.Nm k_afs_cell_of_file , -.Nm kafs_set_verbose , -.Nm kafs_settoken_rxkad , -.Nm kafs_settoken , -.Nm krb_afslog , -.Nm krb_afslog_uid , -.Nm kafs_settoken5 , -.Nm krb5_afslog , -.Nm krb5_afslog_uid -.Nd AFS library -.Sh LIBRARY -AFS cache manager access library (libkafs, -lkafs) -.Sh SYNOPSIS -.In kafs.h -.Ft int -.Fn k_afs_cell_of_file "const char *path" "char *cell" "int len" -.Ft int -.Fn k_hasafs "void" -.Ft int -.Fn k_hasafs_recheck "void" -.Ft int -.Fn k_pioctl "char *a_path" "int o_opcode" "struct ViceIoctl *a_paramsP" "int a_followSymlinks" -.Ft int -.Fn k_setpag "void" -.Ft int -.Fn k_unlog "void" -.Ft void -.Fn kafs_set_verbose "void (*func)(void *, const char *, int)" "void *" -.Ft int -.Fn kafs_settoken_rxkad "const char *cell" "struct ClearToken *token" "void *ticket" "size_t ticket_len" -.Ft int -.Fn kafs_settoken "const char *cell" "uid_t uid" "CREDENTIALS *c" -.Fn krb_afslog "char *cell" "char *realm" -.Ft int -.Fn krb_afslog_uid "char *cell" "char *realm" "uid_t uid" -.Ft krb5_error_code -.Fn krb5_afslog_uid "krb5_context context" "krb5_ccache id" "const char *cell" "krb5_const_realm realm" "uid_t uid" -.Ft int -.Fn kafs_settoken5 "const char *cell" "uid_t uid" "krb5_creds *c" -.Ft krb5_error_code -.Fn krb5_afslog "krb5_context context" "krb5_ccache id" "const char *cell" "krb5_const_realm realm" -.Sh DESCRIPTION -.Fn k_hasafs -initializes some library internal structures, and tests for the -presence of AFS in the kernel, none of the other functions should be -called before -.Fn k_hasafs -is called, or if it fails. -.Pp -.Fn k_hasafs_recheck -forces a recheck if a AFS client has started since last time -.Fn k_hasafs -or -.Fn k_hasafs_recheck -was called. -.Pp -.Fn kafs_set_verbose -set a log function that will be called each time the kafs library does -something important so that the application using libkafs can output -verbose logging. -Calling the function -.Fa kafs_set_verbose -with the function argument set to -.Dv NULL -will stop libkafs from calling the logging function (if set). -.Pp -.Fn kafs_settoken_rxkad -set -.Li rxkad -with the -.Fa token -and -.Fa ticket -(that have the length -.Fa ticket_len ) -for a given -.Fa cell . -.Pp -.Fn kafs_settoken -and -.Fn kafs_settoken5 -work the same way as -.Fn kafs_settoken_rxkad -but internally converts the Kerberos 4 or 5 credential to a afs -cleartoken and ticket. -.Pp -.Fn krb_afslog , -and -.Fn krb_afslog_uid -obtains new tokens (and possibly tickets) for the specified -.Fa cell -and -.Fa realm . -If -.Fa cell -is -.Dv NULL , -the local cell is used. If -.Fa realm -is -.Dv NULL , -the function tries to guess what realm to use. Unless you have some good knowledge of what cell or realm to use, you should pass -.Dv NULL . -.Fn krb_afslog -will use the real user-id for the -.Dv ViceId -field in the token, -.Fn krb_afslog_uid -will use -.Fa uid . -.Pp -.Fn krb5_afslog , -and -.Fn krb5_afslog_uid -are the Kerberos 5 equivalents of -.Fn krb_afslog , -and -.Fn krb_afslog_uid . -.Pp -.Fn krb5_afslog , -.Fn kafs_settoken5 -can be configured to behave differently via a -.Nm krb5_appdefault -option -.Li afs-use-524 -in -.Pa krb5.conf . -Possible values for -.Li afs-use-524 -are: -.Bl -tag -width local -.It yes -use the 524 server in the realm to convert the ticket -.It no -use the Kerberos 5 ticket directly, can be used with if the afs cell -support 2b token. -.It local, 2b -convert the Kerberos 5 credential to a 2b token locally (the same work -as a 2b 524 server should have done). -.El -.Pp -Example: -.Pp -.Bd -literal -[appdefaults] - SU.SE = { afs-use-524 = local } - PDC.KTH.SE = { afs-use-524 = yes } - afs-use-524 = yes -.Ed -.Pp -libkafs will use the -.Li libkafs -as application name when running the -.Nm krb5_appdefault -function call. -.Pp -The (uppercased) cell name is used as the realm to the -.Nm krb5_appdefault function. -.Pp -.\" The extra arguments are the ubiquitous context, and the cache id where -.\" to store any obtained tickets. Since AFS servers normally can't handle -.\" Kerberos 5 tickets directly, these functions will first obtain version -.\" 5 tickets for the requested cells, and then convert them to version 4 -.\" tickets, that can be stashed in the kernel. To convert tickets the -.\" .Fn krb524_convert_creds_kdc -.\" function will be used. -.\" .Pp -.Fn k_afs_cell_of_file -will in -.Fa cell -return the cell of a specified file, no more than -.Fa len -characters is put in -.Fa cell . -.Pp -.Fn k_pioctl -does a -.Fn pioctl -system call with the specified arguments. This function is equivalent to -.Fn lpioctl . -.Pp -.Fn k_setpag -initializes a new PAG. -.Pp -.Fn k_unlog -removes destroys all tokens in the current PAG. -.Sh RETURN VALUES -.Fn k_hasafs -returns 1 if AFS is present in the kernel, 0 otherwise. -.Fn krb_afslog -and -.Fn krb_afslog_uid -returns 0 on success, or a Kerberos error number on failure. -.Fn k_afs_cell_of_file , -.Fn k_pioctl , -.Fn k_setpag , -and -.Fn k_unlog -all return the value of the underlaying system call, 0 on success. -.Sh ENVIRONMENT -The following environment variable affect the mode of operation of -.Nm kafs : -.Bl -tag -width AFS_SYSCALL -.It Ev AFS_SYSCALL -Normally, -.Nm kafs -will try to figure out the correct system call(s) that are used by AFS -by itself. If it does not manage to do that, or does it incorrectly, -you can set this variable to the system call number or list of system -call numbers that should be used. -.El -.Sh EXAMPLES -The following code from -.Nm login -will obtain a new PAG and tokens for the local cell and the cell of -the users home directory. -.Bd -literal -if (k_hasafs()) { - char cell[64]; - k_setpag(); - if(k_afs_cell_of_file(pwd->pw_dir, cell, sizeof(cell)) == 0) - krb_afslog(cell, NULL); - krb_afslog(NULL, NULL); -} -.Ed -.Sh ERRORS -If any of these functions (apart from -.Fn k_hasafs ) -is called without AFS being present in the kernel, the process will -usually (depending on the operating system) receive a SIGSYS signal. -.Sh SEE ALSO -.Xr krb5_appdefault 3 , -.Xr krb5.conf 5 -.Rs -.%A Transarc Corporation -.%J AFS-3 Programmer's Reference -.%T File Server/Cache Manager Interface -.%D 1991 -.Re -.Sh FILES -libkafs will search for -.Pa ThisCell and -.Pa TheseCells -in the following locations: -.Pa /usr/vice/etc , -.Pa /etc/openafs , -.Pa /var/db/openafs/etc , -.Pa /usr/arla/etc , -.Pa /etc/arla , -and -.Pa /etc/afs -.Sh BUGS -.Ev AFS_SYSCALL -has no effect under AIX. diff --git a/kerberosV/src/lib/kafs/kafs.h b/kerberosV/src/lib/kafs/kafs.h deleted file mode 100644 index 0a0675f0b63..00000000000 --- a/kerberosV/src/lib/kafs/kafs.h +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (c) 1995 - 2001, 2003 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: kafs.h,v 1.11 2013/06/17 18:57:43 robert Exp $ */ - -#ifndef __KAFS_H -#define __KAFS_H - -/* XXX must include krb5.h or krb.h */ - -/* sys/ioctl.h must be included manually before kafs.h */ - -/* - */ -#define AFSCALL_PIOCTL 20 -#define AFSCALL_SETPAG 21 - -#ifndef _VICEIOCTL -#define _VICEIOCTL(id) ((unsigned int ) _IOW('V', id, struct ViceIoctl)) -#define _AFSCIOCTL(id) ((unsigned int ) _IOW('C', id, struct ViceIoctl)) -#endif /* _VICEIOCTL */ - -#define VIOCSETAL _VICEIOCTL(1) -#define VIOCGETAL _VICEIOCTL(2) -#define VIOCSETTOK _VICEIOCTL(3) -#define VIOCGETVOLSTAT _VICEIOCTL(4) -#define VIOCSETVOLSTAT _VICEIOCTL(5) -#define VIOCFLUSH _VICEIOCTL(6) -#define VIOCGETTOK _VICEIOCTL(8) -#define VIOCUNLOG _VICEIOCTL(9) -#define VIOCCKSERV _VICEIOCTL(10) -#define VIOCCKBACK _VICEIOCTL(11) -#define VIOCCKCONN _VICEIOCTL(12) -#define VIOCWHEREIS _VICEIOCTL(14) -#define VIOCACCESS _VICEIOCTL(20) -#define VIOCUNPAG _VICEIOCTL(21) -#define VIOCGETFID _VICEIOCTL(22) -#define VIOCSETCACHESIZE _VICEIOCTL(24) -#define VIOCFLUSHCB _VICEIOCTL(25) -#define VIOCNEWCELL _VICEIOCTL(26) -#define VIOCGETCELL _VICEIOCTL(27) -#define VIOC_AFS_DELETE_MT_PT _VICEIOCTL(28) -#define VIOC_AFS_STAT_MT_PT _VICEIOCTL(29) -#define VIOC_FILE_CELL_NAME _VICEIOCTL(30) -#define VIOC_GET_WS_CELL _VICEIOCTL(31) -#define VIOC_AFS_MARINER_HOST _VICEIOCTL(32) -#define VIOC_GET_PRIMARY_CELL _VICEIOCTL(33) -#define VIOC_VENUSLOG _VICEIOCTL(34) -#define VIOC_GETCELLSTATUS _VICEIOCTL(35) -#define VIOC_SETCELLSTATUS _VICEIOCTL(36) -#define VIOC_FLUSHVOLUME _VICEIOCTL(37) -#define VIOC_AFS_SYSNAME _VICEIOCTL(38) -#define VIOC_EXPORTAFS _VICEIOCTL(39) -#define VIOCGETCACHEPARAMS _VICEIOCTL(40) -#define VIOC_GCPAGS _VICEIOCTL(48) - -#define VIOCGETTOK2 _AFSCIOCTL(7) -#define VIOCSETTOK2 _AFSCIOCTL(8) - -struct ViceIoctl { - caddr_t in, out; - unsigned short in_size; - unsigned short out_size; -}; - -struct ClearToken { - int32_t AuthHandle; - char HandShakeKey[8]; - int32_t ViceId; - int32_t BeginTimestamp; - int32_t EndTimestamp; -}; - -/* Use k_hasafs() to probe if the machine supports AFS syscalls. - The other functions will generate a SIGSYS if AFS is not supported */ - -int k_hasafs (void); -int k_hasafs_recheck (void); - -int krb_afslog (const char *cell, const char *realm); -int krb_afslog_uid (const char *cell, const char *realm, uid_t uid); -int krb_afslog_home (const char *cell, const char *realm, - const char *homedir); -int krb_afslog_uid_home (const char *cell, const char *realm, uid_t uid, - const char *homedir); - -int krb_realm_of_cell (const char *cell, char **realm); - -/* compat */ -#define k_afsklog krb_afslog -#define k_afsklog_uid krb_afslog_uid - -int k_pioctl (char *a_path, - int o_opcode, - struct ViceIoctl *a_paramsP, - int a_followSymlinks); -int k_unlog (void); -int k_setpag (void); -int k_afs_cell_of_file (const char *path, char *cell, int len); - - - -/* XXX */ -#ifdef KFAILURE -#define KRB_H_INCLUDED -#endif - -#ifdef KRB5_RECVAUTH_IGNORE_VERSION -#define KRB5_H_INCLUDED -#endif - -void kafs_set_verbose (void (*kafs_verbose)(void *, const char *), void *); -int kafs_settoken_rxkad (const char *, struct ClearToken *, - void *ticket, size_t ticket_len); -#ifdef KRB_H_INCLUDED -int kafs_settoken (const char*, uid_t, CREDENTIALS*); -#endif -#ifdef KRB5_H_INCLUDED -int kafs_settoken5 (krb5_context, const char*, uid_t, krb5_creds*); -#endif - - -#ifdef KRB5_H_INCLUDED -krb5_error_code krb5_afslog_uid (krb5_context context, - krb5_ccache id, - const char *cell, - krb5_const_realm realm, - uid_t uid); -krb5_error_code krb5_afslog (krb5_context context, - krb5_ccache id, - const char *cell, - krb5_const_realm realm); -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); - -krb5_error_code krb5_afslog_home (krb5_context context, - krb5_ccache id, - const char *cell, - krb5_const_realm realm, - const char *homedir); - -krb5_error_code krb5_realm_of_cell (const char *cell, char **realm); - -#endif - - -#define _PATH_VICE "/usr/vice/etc/" -#define _PATH_THISCELL _PATH_VICE "ThisCell" -#define _PATH_CELLSERVDB _PATH_VICE "CellServDB" -#define _PATH_THESECELLS _PATH_VICE "TheseCells" - -#define _PATH_ARLA_VICE "/usr/arla/etc/" -#define _PATH_ARLA_THISCELL _PATH_ARLA_VICE "ThisCell" -#define _PATH_ARLA_CELLSERVDB _PATH_ARLA_VICE "CellServDB" -#define _PATH_ARLA_THESECELLS _PATH_ARLA_VICE "TheseCells" - -#define _PATH_OPENAFS_DEBIAN_VICE "/etc/openafs/" -#define _PATH_OPENAFS_DEBIAN_THISCELL _PATH_OPENAFS_DEBIAN_VICE "ThisCell" -#define _PATH_OPENAFS_DEBIAN_CELLSERVDB _PATH_OPENAFS_DEBIAN_VICE "CellServDB" -#define _PATH_OPENAFS_DEBIAN_THESECELLS _PATH_OPENAFS_DEBIAN_VICE "TheseCells" - -#define _PATH_OPENAFS_MACOSX_VICE "/var/db/openafs/etc/" -#define _PATH_OPENAFS_MACOSX_THISCELL _PATH_OPENAFS_MACOSX_VICE "ThisCell" -#define _PATH_OPENAFS_MACOSX_CELLSERVDB _PATH_OPENAFS_MACOSX_VICE "CellServDB" -#define _PATH_OPENAFS_MACOSX_THESECELLS _PATH_OPENAFS_MACOSX_VICE "TheseCells" - -#define _PATH_ARLA_DEBIAN_VICE "/etc/arla/" -#define _PATH_ARLA_DEBIAN_THISCELL _PATH_ARLA_DEBIAN_VICE "ThisCell" -#define _PATH_ARLA_DEBIAN_CELLSERVDB _PATH_ARLA_DEBIAN_VICE "CellServDB" -#define _PATH_ARLA_DEBIAN_THESECELLS _PATH_ARLA_DEBIAN_VICE "TheseCells" - -#define _PATH_ARLA_OPENBSD_VICE "/etc/afs/" -#define _PATH_ARLA_OPENBSD_THISCELL _PATH_ARLA_OPENBSD_VICE "ThisCell" -#define _PATH_ARLA_OPENBSD_CELLSERVDB _PATH_ARLA_OPENBSD_VICE "CellServDB" -#define _PATH_ARLA_OPENBSD_THESECELLS _PATH_ARLA_OPENBSD_VICE "TheseCells" - -extern int _kafs_debug; - -#endif /* __KAFS_H */ diff --git a/kerberosV/src/lib/kafs/kafs_locl.h b/kerberosV/src/lib/kafs/kafs_locl.h deleted file mode 100644 index c9d1c64c198..00000000000 --- a/kerberosV/src/lib/kafs/kafs_locl.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: kafs_locl.h,v 1.2 2013/06/17 18:57:43 robert Exp $ */ - -#ifndef __KAFS_LOCL_H__ -#define __KAFS_LOCL_H__ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#if defined(HAVE_SYS_IOCTL_H) && SunOS != 40 -#include -#endif -#ifdef HAVE_SYS_FILIO_H -#include -#endif -#ifdef HAVE_SYS_SYSCTL_H -#include -#endif - -#ifdef HAVE_SYS_SYSCALL_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif - -#ifdef HAVE_NETDB_H -#include -#endif - -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -#include - -#ifdef KRB5 -#include -#endif -#ifdef KRB5 -#include "crypto-headers.h" -#include -typedef struct credentials CREDENTIALS; -#endif /* KRB5 */ -#include - -#include - -#include "afssysdefs.h" - -struct kafs_data; -struct kafs_token; -typedef int (*afslog_uid_func_t)(struct kafs_data *, - const char *, - const char *, - uid_t, - const char *); - -typedef int (*get_cred_func_t)(struct kafs_data*, const char*, const char*, - const char*, uid_t, struct kafs_token *); - -typedef char* (*get_realm_func_t)(struct kafs_data*, const char*); - -struct kafs_data { - const char *name; - afslog_uid_func_t afslog_uid; - get_cred_func_t get_cred; - get_realm_func_t get_realm; - const char *(*get_error)(struct kafs_data *, int); - void (*free_error)(struct kafs_data *, const char *); - void *data; -}; - -struct kafs_token { - struct ClearToken ct; - void *ticket; - size_t ticket_len; -}; - -void _kafs_foldup(char *, const char *); - -int _kafs_afslog_all_local_cells(struct kafs_data*, uid_t, const char*); - -int _kafs_get_cred(struct kafs_data*, const char*, const char*, const char *, - uid_t, struct kafs_token *); - -int -_kafs_realm_of_cell(struct kafs_data *, const char *, char **); - -int -_kafs_v4_to_kt(CREDENTIALS *, uid_t, struct kafs_token *); - -void -_kafs_fixup_viceid(struct ClearToken *, uid_t); - -#ifdef _AIX -int aix_pioctl(char*, int, struct ViceIoctl*, int); -int aix_setpag(void); -#endif - -#endif /* __KAFS_LOCL_H__ */ diff --git a/kerberosV/src/lib/kafs/roken_rename.h b/kerberosV/src/lib/kafs/roken_rename.h deleted file mode 100644 index 9cac2dec808..00000000000 --- a/kerberosV/src/lib/kafs/roken_rename.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2001-2002 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.2 2013/06/17 18:57:43 robert Exp $ */ - -#ifndef __roken_rename_h__ -#define __roken_rename_h__ - -/* - * Libroken routines that are added libkafs - */ - -#define _resolve_debug _kafs_resolve_debug - -#define rk_dns_free_data _kafs_dns_free_data -#define rk_dns_lookup _kafs_dns_lookup -#define rk_dns_string_to_type _kafs_dns_string_to_type -#define rk_dns_type_to_string _kafs_dns_type_to_string -#define rk_dns_srv_order _kafs_dns_srv_order -#define rk_dns_make_query _kafs_dns_make_query -#define rk_dns_free_query _kafs_dns_free_query -#define rk_dns_parse_reply _kafs_dns_parse_reply - -#ifndef HAVE_STRTOK_R -#define rk_strtok_r _kafs_strtok_r -#endif -#ifndef HAVE_STRLCPY -#define rk_strlcpy _kafs_strlcpy -#endif -#ifndef HAVE_STRSEP -#define rk_strsep _kafs_strsep -#endif - -#endif /* __roken_rename_h__ */ diff --git a/kerberosV/src/lib/kdfs/ChangeLog b/kerberosV/src/lib/kdfs/ChangeLog deleted file mode 100644 index c4bc2a367c3..00000000000 --- a/kerberosV/src/lib/kdfs/ChangeLog +++ /dev/null @@ -1,28 +0,0 @@ -2002-08-12 Johan Danielsson - - * k5dfspag.c: don't use ## in string concatenation - -2002-03-11 Assar Westerlund - - * Makefile.am (libkdfs_la_LDFLAGS): set versoin to 0:2:0 - -2002-01-23 Assar Westerlund - - * k5dfspag.c: use SIG_DFL and not SIG_IGN for SIGCHLD. - from "Todd C. Miller" - -2001-02-07 Assar Westerlund - - * k5dfspag.c: add config.h - -2000-12-11 Assar Westerlund - - * Makefile.am (libkdfs_la_LDFLAGS): set version to 0:1:0 - -2000-07-02 Assar Westerlund - - * k5dfspag.c: use krb5.h instead of krb5_locl.h - - * initial import from Ake Sandgren - - diff --git a/kerberosV/src/lib/kdfs/Makefile.am b/kerberosV/src/lib/kdfs/Makefile.am deleted file mode 100644 index 24cad4ceae6..00000000000 --- a/kerberosV/src/lib/kdfs/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:44 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -lib_LTLIBRARIES = libkdfs.la - -libkdfs_la_SOURCES = \ - k5dfspag.c - -libkdfs_la_LDFLAGS = -version-info 0:3:0 - -EXTRA_DIST = NTMakefile diff --git a/kerberosV/src/lib/kdfs/Makefile.in b/kerberosV/src/lib/kdfs/Makefile.in deleted file mode 100644 index fefb755888b..00000000000 --- a/kerberosV/src/lib/kdfs/Makefile.in +++ /dev/null @@ -1,882 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:44 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:44 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:44 robert Exp $ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -subdir = lib/kdfs -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libkdfs_la_LIBADD = -am_libkdfs_la_OBJECTS = k5dfspag.lo -libkdfs_la_OBJECTS = $(am_libkdfs_la_OBJECTS) -libkdfs_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libkdfs_la_LDFLAGS) $(LDFLAGS) -o $@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libkdfs_la_SOURCES) -DIST_SOURCES = $(libkdfs_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -lib_LTLIBRARIES = libkdfs.la -libkdfs_la_SOURCES = \ - k5dfspag.c - -libkdfs_la_LDFLAGS = -version-info 0:3:0 -EXTRA_DIST = NTMakefile -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/kdfs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/kdfs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libkdfs.la: $(libkdfs_la_OBJECTS) $(libkdfs_la_DEPENDENCIES) - $(libkdfs_la_LINK) -rpath $(libdir) $(libkdfs_la_OBJECTS) $(libkdfs_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/k5dfspag.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libLTLIBRARIES clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-libLTLIBRARIES - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/lib/kdfs/NTMakefile b/kerberosV/src/lib/kdfs/NTMakefile deleted file mode 100644 index 4ec8f31ad58..00000000000 --- a/kerberosV/src/lib/kdfs/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=lib\kdfs - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/lib/kdfs/k5dfspag.c b/kerberosV/src/lib/kdfs/k5dfspag.c deleted file mode 100644 index 6356fd8d3d0..00000000000 --- a/kerberosV/src/lib/kdfs/k5dfspag.c +++ /dev/null @@ -1,368 +0,0 @@ -/* - * lib/krb5/os/k5dfspag.c - * - * New Kerberos module to issue the DFS PAG syscalls. - * It also contains the routine to fork and exec the - * k5dcecon routine to do most of the work. - * - * This file is designed to be as independent of DCE - * and DFS as possible. The only dependencies are on - * the syscall numbers. If DFS not running or not installed, - * the sig handlers will catch and the signal and - * will continue. - * - * krb5_dfs_newpag and krb5_dfs_getpag should not be real - * Kerberos routines, since they should be setpag and getpag - * in the DCE library, but without the DCE baggage. - * Thus they don't have context, and don't return a krb5 error. - * - * - * - * krb5_dfs_pag() - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -RCSID("$Id: k5dfspag.c,v 1.5 2013/06/17 19:11:44 robert Exp $"); - -#include - -#ifdef DCE - -#include -#include -#include -#include -#include - -/* Only run this DFS PAG code on systems with POSIX - * All that we are interested in dor:, AIX 4.x, - * Solaris 2.5.x, HPUX 10.x Even SunOS 4.1.4, AIX 3.2.5 - * and SGI 5.3 are OK. This simplifies - * the build/configure which I don't want to change now. - * All of them also have waitpid as well. - */ - -#define POSIX_SETJMP -#define POSIX_SIGNALS -#define HAVE_WAITPID - -#include -#include -#ifndef POSIX_SETJMP -#undef sigjmp_buf -#undef sigsetjmp -#undef siglongjmp -#define sigjmp_buf jmp_buf -#define sigsetjmp(j,s) setjmp(j) -#define siglongjmp longjmp -#endif - -#ifdef POSIX_SIGNALS -typedef struct sigaction handler; -#define handler_init(H,F) (sigemptyset(&(H).sa_mask), \ - (H).sa_flags=0, \ - (H).sa_handler=(F)) -#define handler_swap(S,NEW,OLD) sigaction(S, &NEW, &OLD) -#define handler_set(S,OLD) sigaction(S, &OLD, NULL) -#else -typedef sigtype (*handler)(); -#define handler_init(H,F) ((H) = (F)) -#define handler_swap(S,NEW,OLD) ((OLD) = signal ((S), (NEW))) -#define handler_set(S,OLD) (signal ((S), (OLD))) -#endif - -#define krb5_sigtype void -#define WAIT_USES_INT -typedef krb5_sigtype sigtype; - - -/* - * Need some syscall numbers based on different systems. - * These are based on: - * HPUX 10.10 /opt/dce/include/dcedfs/syscall.h - * Solaris 2.5 /opt/dcelocal/share/include/dcedfs/syscall.h - * AIX 4.2 - needs some funny games with load and kafs_syscall - * to get the kernel extentions. There should be a better way! - * - * DEE 5/27/97 - * - */ - - -#define AFSCALL_SETPAG 2 -#define AFSCALL_GETPAG 11 - -#if defined(sun) -#define AFS_SYSCALL 72 - -#elif defined(hpux) -/* assume HPUX 10 + or is it 50 */ -#define AFS_SYSCALL 326 - -#elif defined(_AIX) -#ifndef DPAGAIX -#define DPAGAIX LIBEXECDIR "/dpagaix" -#endif -int *load(); -static int (*dpagaix)(int, int, int, int, int, int) = 0; - -#elif defined(sgi) || defined(_sgi) -#define AFS_SYSCALL 206+1000 - -#else -#define AFS_SYSCALL (Unknown_DFS_AFS_SYSCALL) -#endif - - -#ifdef WAIT_USES_INT - int wait_status; -#else /* WAIT_USES_INT */ - union wait wait_status; -#endif /* WAIT_USES_INT */ - -#ifndef K5DCECON -#define K5DCECON LIBEXECDIR "/k5dcecon" -#endif - -/* - * mysig() - * - * signal handler if DFS not running - * - */ - -static sigjmp_buf setpag_buf; - -static sigtype mysig() -{ - siglongjmp(setpag_buf, 1); -} - -/* - * krb5_dfs_pag_syscall() - * - * wrapper for the syscall with signal handlers - * - */ - -static int krb5_dfs_pag_syscall(opt1,opt2) - int opt1; - int opt2; -{ - handler sa1, osa1; - handler sa2, osa2; - int pag = -2; - - handler_init (sa1, mysig); - handler_init (sa2, mysig); - handler_swap (SIGSYS, sa1, osa1); - handler_swap (SIGSEGV, sa2, osa2); - - if (sigsetjmp(setpag_buf, 1) == 0) { - -#if defined(_AIX) - if (!dpagaix) - dpagaix = load(DPAGAIX, 0, 0); - if (dpagaix) - pag = (*dpagaix)(opt1, opt2, 0, 0, 0, 0); -#else - pag = syscall(AFS_SYSCALL, opt1, opt2, 0, 0, 0, 0); -#endif - - handler_set (SIGSYS, osa1); - handler_set (SIGSEGV, osa2); - return(pag); - } - - /* syscall failed! return 0 */ - handler_set (SIGSYS, osa1); - handler_set (SIGSEGV, osa2); - return(-2); -} - -/* - * krb5_dfs_newpag() - * - * issue a DCE/DFS setpag system call to set the newpag - * for this process. This takes advantage of a currently - * undocumented feature of the Transarc port of DFS. - * Even in DCE 1.2.2 for which the source is available, - * (but no vendors have released), this feature is not - * there, but it should be, or could be added. - * If new_pag is zero, then the syscall will get a new pag - * and return its value. - */ - -int krb5_dfs_newpag(new_pag) - int new_pag; -{ - return(krb5_dfs_pag_syscall(AFSCALL_SETPAG, new_pag)); -} - -/* - * krb5_dfs_getpag() - * - * get the current PAG. Used mostly as a test. - */ - -int krb5_dfs_getpag() -{ - return(krb5_dfs_pag_syscall(AFSCALL_GETPAG, 0)); -} - -/* - * krb5_dfs_pag() - * - * Given a principal and local username, - * fork and exec the k5dcecon module to create - * refresh or join a new DCE/DFS - * Process Authentication Group (PAG) - * - * This routine should be called after krb5_kuserok has - * determined that this combination of local user and - * principal are acceptable for the local host. - * - * It should also be called after a forwarded ticket has - * been received, and the KRB5CCNAME environment variable - * has been set to point at it. k5dcecon will convert this - * to a new DCE context and a new pag and replace KRB5CCNAME - * in the environment. - * - * If there is no forwarded ticket, k5dcecon will attempt - * to join an existing PAG for the same principal and local - * user. - * - * And it should be called before access to the home directory - * as this may be in DFS, not accessable by root, and require - * the PAG to have been setup. - * - * The krb5_afs_pag can be called after this routine to - * use the the cache obtained by k5dcecon to get an AFS token. - * DEE - 7/97 - */ - -int krb5_dfs_pag(context, flag, principal, luser) - krb5_context context; - int flag; /* 1 if a forwarded TGT is to be used */ - krb5_principal principal; - const char *luser; - -{ - - struct stat stx; - int fd[2]; - int i,j; - int pid; - int new_pag; - int pag; - char newccname[MAXPATHLEN] = ""; - char *princ; - int err; - struct sigaction newsig, oldsig; - -#ifdef WAIT_USES_INT - int wait_status; -#else /* WAIT_USES_INT */ - union wait wait_status; -#endif /* WAIT_USES_INT */ - - if (krb5_unparse_name(context, principal, &princ)) - return(0); - - /* test if DFS is running or installed */ - if (krb5_dfs_getpag() == -2) - return(0); /* DFS not running, dont try */ - - if (pipe(fd) == -1) - return(0); - - /* Make sure that telnetd.c's SIGCHLD action don't happen right now... */ - memset((char *)&newsig, 0, sizeof(newsig)); - newsig.sa_handler = SIG_DFL; - sigaction(SIGCHLD, &newsig, &oldsig); - - pid = fork(); - if (pid <0) - return(0); - - if (pid == 0) { /* child process */ - - close(1); /* close stdout */ - dup(fd[1]); /* point stdout at pipe here */ - close(fd[0]); /* don't use end of pipe here */ - close(fd[1]); /* pipe now as stdout */ - - execl(K5DCECON, "k5dcecon", - (flag) ? "-f" : "-s" , - "-l", luser, - "-p", princ, (char *)0); - - exit(127); /* incase execl fails */ - } - - /* parent, wait for child to finish */ - - close(fd[1]); /* dont need this end of pipe */ - -/* #if defined(sgi) || defined(_sgi) */ - /* wait_status.w_status = 0; */ - /* waitpid((pid_t) pid, &wait_status.w_status, 0); */ -/* #else */ - - - wait_status = 0; -#ifdef HAVE_WAITPID - err = waitpid((pid_t) pid, &wait_status, 0); -#else /* HAVE_WAITPID */ - err = wait4(pid, &wait_status, 0, (struct rusage *) NULL); -#endif /* HAVE_WAITPID */ -/* #endif */ - - sigaction(SIGCHLD, &oldsig, 0); - if (WIFEXITED(wait_status)){ - if (WEXITSTATUS(wait_status) == 0) { - i = 1; - j = 0; - while (i != 0) { - i = read(fd[0], &newccname[j], sizeof(newccname)-1-j); - if ( i > 0) - j += i; - if (j >= sizeof(newccname)-1) - i = 0; - } - close(fd[0]); - if (j > 0) { - newccname[j] = '\0'; - esetenv("KRB5CCNAME",newccname,1); - sscanf(&newccname[j-8],"%8x",&new_pag); - if (new_pag && strncmp("FILE:/opt/dcelocal/var/security/creds/dcecred_", newccname, 46) == 0) { - if((pag = krb5_dfs_newpag(new_pag)) != -2) { - return(pag); - } - } - } - } - } - return(0); /* something not right */ -} - -#else /* DCE */ - -/* - * krb5_dfs_pag - dummy version for the lib for systems - * which don't have DFS, or the needed setpag kernel code. - */ - -krb5_boolean -krb5_dfs_pag(context, principal, luser) - krb5_context context; - krb5_principal principal; - const char *luser; -{ - return(0); -} - -#endif /* DCE */ diff --git a/kerberosV/src/lib/krb5/Makefile.am b/kerberosV/src/lib/krb5/Makefile.am deleted file mode 100644 index e9ee91c6860..00000000000 --- a/kerberosV/src/lib/krb5/Makefile.am +++ /dev/null @@ -1,382 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:43 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(INCLUDE_krb4) $(INCLUDE_hcrypto) -I../com_err -I$(srcdir)/../com_err $(INCLUDE_sqlite3) $(INCLUDE_libintl) - -bin_PROGRAMS = verify_krb5_conf - -noinst_PROGRAMS = \ - krbhst-test \ - test_gic \ - test_alname \ - test_crypto \ - test_rfc3961 \ - test_get_addrs \ - test_kuserok \ - test_renew \ - test_forward - -noinst_LTLIBRARIES = \ - librfc3961.la - -TESTS = \ - aes-test \ - derived-key-test \ - n-fold-test \ - parse-name-test \ - store-test \ - string-to-key-test \ - test_acl \ - test_addr \ - test_cc \ - test_config \ - test_fx \ - test_prf \ - test_store \ - test_crypto_wrapping \ - test_keytab \ - test_mem \ - test_pac \ - test_plugin \ - test_princ \ - test_pkinit_dh2key \ - test_pknistkdf \ - test_time \ - test_x500 - -check_DATA = test_config_strings.out - -check_PROGRAMS = $(TESTS) test_hostname test_ap-req - -LDADD = libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la \ - $(LIB_roken) - -if PKINIT -LIB_pkinit = ../hx509/libhx509.la -endif - -if have_scc -use_sqlite = $(LIB_sqlite3) -endif - -libkrb5_la_LIBADD = \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/ipc/libheim-ipcc.la \ - $(top_builddir)/lib/wind/libwind.la \ - $(top_builddir)/base/libheimbase.la \ - $(LIB_pkinit) \ - $(use_sqlite) \ - $(LIB_com_err) \ - $(LIB_hcrypto) \ - $(LIB_libintl) \ - $(LIBADD_roken) \ - $(PTHREAD_LIBADD) \ - $(LIB_door_create) \ - $(LIB_dlopen) - -librfc3961_la_LIBADD = \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/ipc/libheim-ipcc.la \ - $(top_builddir)/lib/wind/libwind.la \ - $(LIB_pkinit) \ - $(use_sqlite) \ - $(LIB_com_err) \ - $(LIB_hcrypto) \ - $(LIB_libintl) \ - $(LIBADD_roken) \ - $(PTHREAD_LIBADD) \ - $(LIB_door_create) \ - $(LIB_dlopen) - -lib_LTLIBRARIES = libkrb5.la - -ERR_FILES = krb5_err.c krb_err.c heim_err.c k524_err.c - -libkrb5_la_CPPFLAGS = \ - -DBUILD_KRB5_LIB \ - $(AM_CPPFLAGS) \ - -DHEIMDAL_LOCALEDIR='"$(localedir)"' - -librfc3961_la_CPPFLAGS = \ - -DBUILD_KRB5_LIB \ - $(AM_CPPFLAGS) \ - -DHEIMDAL_LOCALEDIR='"$(localedir)"' - -dist_libkrb5_la_SOURCES = \ - acache.c \ - acl.c \ - add_et_list.c \ - addr_families.c \ - aname_to_localname.c \ - appdefault.c \ - asn1_glue.c \ - auth_context.c \ - build_ap_req.c \ - build_auth.c \ - cache.c \ - changepw.c \ - codec.c \ - config_file.c \ - convert_creds.c \ - constants.c \ - context.c \ - copy_host_realm.c \ - crc.c \ - creds.c \ - crypto.c \ - crypto.h \ - crypto-aes.c \ - crypto-algs.c \ - crypto-arcfour.c \ - crypto-des.c \ - crypto-des-common.c \ - crypto-des3.c \ - crypto-evp.c \ - crypto-null.c \ - crypto-pk.c \ - crypto-rand.c \ - doxygen.c \ - data.c \ - deprecated.c \ - digest.c \ - eai_to_heim_errno.c \ - error_string.c \ - expand_hostname.c \ - expand_path.c \ - fcache.c \ - free.c \ - free_host_realm.c \ - generate_seq_number.c \ - generate_subkey.c \ - get_addrs.c \ - get_cred.c \ - get_default_principal.c \ - get_default_realm.c \ - get_for_creds.c \ - get_host_realm.c \ - get_in_tkt.c \ - get_port.c \ - init_creds.c \ - init_creds_pw.c \ - kcm.c \ - kcm.h \ - keyblock.c \ - keytab.c \ - keytab_any.c \ - keytab_file.c \ - keytab_keyfile.c \ - keytab_memory.c \ - krb5_locl.h \ - krb5-v4compat.h \ - krbhst.c \ - kuserok.c \ - log.c \ - mcache.c \ - misc.c \ - mk_error.c \ - mk_priv.c \ - mk_rep.c \ - mk_req.c \ - mk_req_ext.c \ - mk_safe.c \ - mit_glue.c \ - net_read.c \ - net_write.c \ - n-fold.c \ - pac.c \ - padata.c \ - pcache.c \ - pkinit.c \ - principal.c \ - prog_setup.c \ - prompter_posix.c \ - rd_cred.c \ - rd_error.c \ - rd_priv.c \ - rd_rep.c \ - rd_req.c \ - rd_safe.c \ - read_message.c \ - recvauth.c \ - replay.c \ - salt.c \ - salt-aes.c \ - salt-arcfour.c \ - salt-des.c \ - salt-des3.c \ - scache.c \ - send_to_kdc.c \ - sendauth.c \ - set_default_realm.c \ - sock_principal.c \ - store.c \ - store-int.c \ - store-int.h \ - store_emem.c \ - store_fd.c \ - store_mem.c \ - plugin.c \ - ticket.c \ - time.c \ - transited.c \ - verify_init.c \ - verify_user.c \ - version.c \ - warn.c \ - write_message.c - -nodist_libkrb5_la_SOURCES = \ - $(ERR_FILES) - -libkrb5_la_DEPENDENCIES = \ - version-script.map - -libkrb5_la_LDFLAGS = -version-info 26:0:0 - -if versionscript -libkrb5_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -endif - -$(libkrb5_la_OBJECTS) $(verify_krb5_conf_OBJECTS) $(librfc3961_la_OBJECTS): $(srcdir)/krb5-protos.h $(srcdir)/krb5-private.h krb5_err.h heim_err.h k524_err.h krb5_err.h krb_err.h k524_err.h - -librfc3961_la_SOURCES = \ - crc.c \ - crypto.c \ - crypto.h \ - crypto-aes.c \ - crypto-algs.c \ - crypto-arcfour.c \ - crypto-des.c \ - crypto-des-common.c \ - crypto-des3.c \ - crypto-evp.c \ - crypto-null.c \ - crypto-pk.c \ - crypto-rand.c \ - crypto-stubs.c \ - data.c \ - error_string.c \ - keyblock.c \ - n-fold.c \ - salt.c \ - salt-aes.c \ - salt-arcfour.c \ - salt-des.c \ - salt-des3.c \ - store-int.c \ - warn.c - -test_rfc3961_LDADD = \ - librfc3961.la \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la \ - $(LIB_hcrypto) \ - $(LIB_roken) - -$(srcdir)/krb5-protos.h: - cd $(srcdir) && perl ../../cf/make-proto.pl -E KRB5_LIB -q -P comment -o krb5-protos.h $(dist_libkrb5_la_SOURCES) || rm -f krb5-protos.h - -$(srcdir)/krb5-private.h: - cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p krb5-private.h $(dist_libkrb5_la_SOURCES) || rm -f krb5-private.h - -man_MANS = \ - kerberos.8 \ - krb5.conf.5 \ - krb524_convert_creds_kdc.3 \ - krb5_425_conv_principal.3 \ - krb5_acl_match_file.3 \ - krb5_aname_to_localname.3 \ - krb5_appdefault.3 \ - krb5_auth_context.3 \ - krb5_c_make_checksum.3 \ - krb5_check_transited.3 \ - krb5_create_checksum.3 \ - krb5_creds.3 \ - krb5_digest.3 \ - krb5_eai_to_heim_errno.3 \ - krb5_encrypt.3 \ - krb5_find_padata.3 \ - krb5_generate_random_block.3 \ - krb5_get_all_client_addrs.3 \ - krb5_get_credentials.3 \ - krb5_get_creds.3 \ - krb5_get_forwarded_creds.3 \ - krb5_get_in_cred.3 \ - krb5_get_init_creds.3 \ - krb5_get_krbhst.3 \ - krb5_getportbyname.3 \ - krb5_init_context.3 \ - krb5_is_thread_safe.3 \ - krb5_krbhst_init.3 \ - krb5_mk_req.3 \ - krb5_mk_safe.3 \ - krb5_openlog.3 \ - krb5_parse_name.3 \ - krb5_principal.3 \ - krb5_rcache.3 \ - krb5_rd_error.3 \ - krb5_rd_safe.3 \ - krb5_set_default_realm.3 \ - krb5_set_password.3 \ - krb5_string_to_key.3 \ - krb5_timeofday.3 \ - krb5_verify_init_creds.3 \ - krb5_verify_user.3 \ - verify_krb5_conf.8 - -dist_include_HEADERS = \ - krb5.h \ - krb5-protos.h \ - krb5-private.h \ - krb5_ccapi.h - -nodist_include_HEADERS = krb5_err.h heim_err.h k524_err.h - -# XXX use nobase_include_HEADERS = krb5/locate_plugin.h -krb5dir = $(includedir)/krb5 -krb5_HEADERS = locate_plugin.h send_to_kdc_plugin.h ccache_plugin.h - -build_HEADERZ = \ - $(krb5_HEADERS) \ - krb_err.h - -CLEANFILES = \ - test_config_strings.out \ - test-store-data \ - krb5_err.c krb5_err.h \ - krb_err.c krb_err.h \ - heim_err.c heim_err.h \ - k524_err.c k524_err.h - -$(libkrb5_la_OBJECTS): krb5_err.h krb_err.h heim_err.h k524_err.h - -test_config_strings.out: test_config_strings.cfg - $(CP) $(srcdir)/test_config_strings.cfg test_config_strings.out - -EXTRA_DIST = \ - NTMakefile \ - verify_krb5_conf-version.rc \ - krb5_err.et \ - krb_err.et \ - heim_err.et \ - k524_err.et \ - $(man_MANS) \ - version-script.map \ - test_config_strings.cfg \ - krb5.moduli - -#sysconf_DATA = krb5.moduli - -# to help stupid solaris make - -krb5_err.h: krb5_err.et - -krb_err.h: krb_err.et - -heim_err.h: heim_err.et - -k524_err.h: k524_err.et diff --git a/kerberosV/src/lib/krb5/Makefile.in b/kerberosV/src/lib/krb5/Makefile.in deleted file mode 100644 index bc5074aaed1..00000000000 --- a/kerberosV/src/lib/krb5/Makefile.in +++ /dev/null @@ -1,3215 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:43 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:43 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:43 robert Exp $ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(dist_include_HEADERS) $(krb5_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -bin_PROGRAMS = verify_krb5_conf$(EXEEXT) -noinst_PROGRAMS = krbhst-test$(EXEEXT) test_gic$(EXEEXT) \ - test_alname$(EXEEXT) test_crypto$(EXEEXT) \ - test_rfc3961$(EXEEXT) test_get_addrs$(EXEEXT) \ - test_kuserok$(EXEEXT) test_renew$(EXEEXT) \ - test_forward$(EXEEXT) -TESTS = aes-test$(EXEEXT) derived-key-test$(EXEEXT) \ - n-fold-test$(EXEEXT) parse-name-test$(EXEEXT) \ - store-test$(EXEEXT) string-to-key-test$(EXEEXT) \ - test_acl$(EXEEXT) test_addr$(EXEEXT) test_cc$(EXEEXT) \ - test_config$(EXEEXT) test_fx$(EXEEXT) test_prf$(EXEEXT) \ - test_store$(EXEEXT) test_crypto_wrapping$(EXEEXT) \ - test_keytab$(EXEEXT) test_mem$(EXEEXT) test_pac$(EXEEXT) \ - test_plugin$(EXEEXT) test_princ$(EXEEXT) \ - test_pkinit_dh2key$(EXEEXT) test_pknistkdf$(EXEEXT) \ - test_time$(EXEEXT) test_x500$(EXEEXT) -check_PROGRAMS = $(am__EXEEXT_1) test_hostname$(EXEEXT) \ - test_ap-req$(EXEEXT) -@versionscript_TRUE@am__append_1 = $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -subdir = lib/krb5 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" \ - "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(includedir)" \ - "$(DESTDIR)$(krb5dir)" "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -@have_scc_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -dist_libkrb5_la_OBJECTS = libkrb5_la-acache.lo libkrb5_la-acl.lo \ - libkrb5_la-add_et_list.lo libkrb5_la-addr_families.lo \ - libkrb5_la-aname_to_localname.lo libkrb5_la-appdefault.lo \ - libkrb5_la-asn1_glue.lo libkrb5_la-auth_context.lo \ - libkrb5_la-build_ap_req.lo libkrb5_la-build_auth.lo \ - libkrb5_la-cache.lo libkrb5_la-changepw.lo libkrb5_la-codec.lo \ - libkrb5_la-config_file.lo libkrb5_la-convert_creds.lo \ - libkrb5_la-constants.lo libkrb5_la-context.lo \ - libkrb5_la-copy_host_realm.lo libkrb5_la-crc.lo \ - libkrb5_la-creds.lo libkrb5_la-crypto.lo \ - libkrb5_la-crypto-aes.lo libkrb5_la-crypto-algs.lo \ - libkrb5_la-crypto-arcfour.lo libkrb5_la-crypto-des.lo \ - libkrb5_la-crypto-des-common.lo libkrb5_la-crypto-des3.lo \ - libkrb5_la-crypto-evp.lo libkrb5_la-crypto-null.lo \ - libkrb5_la-crypto-pk.lo libkrb5_la-crypto-rand.lo \ - libkrb5_la-doxygen.lo libkrb5_la-data.lo \ - libkrb5_la-deprecated.lo libkrb5_la-digest.lo \ - libkrb5_la-eai_to_heim_errno.lo libkrb5_la-error_string.lo \ - libkrb5_la-expand_hostname.lo libkrb5_la-expand_path.lo \ - libkrb5_la-fcache.lo libkrb5_la-free.lo \ - libkrb5_la-free_host_realm.lo \ - libkrb5_la-generate_seq_number.lo \ - libkrb5_la-generate_subkey.lo libkrb5_la-get_addrs.lo \ - libkrb5_la-get_cred.lo libkrb5_la-get_default_principal.lo \ - libkrb5_la-get_default_realm.lo libkrb5_la-get_for_creds.lo \ - libkrb5_la-get_host_realm.lo libkrb5_la-get_in_tkt.lo \ - libkrb5_la-get_port.lo libkrb5_la-init_creds.lo \ - libkrb5_la-init_creds_pw.lo libkrb5_la-kcm.lo \ - libkrb5_la-keyblock.lo libkrb5_la-keytab.lo \ - libkrb5_la-keytab_any.lo libkrb5_la-keytab_file.lo \ - libkrb5_la-keytab_keyfile.lo libkrb5_la-keytab_memory.lo \ - libkrb5_la-krbhst.lo libkrb5_la-kuserok.lo libkrb5_la-log.lo \ - libkrb5_la-mcache.lo libkrb5_la-misc.lo libkrb5_la-mk_error.lo \ - libkrb5_la-mk_priv.lo libkrb5_la-mk_rep.lo \ - libkrb5_la-mk_req.lo libkrb5_la-mk_req_ext.lo \ - libkrb5_la-mk_safe.lo libkrb5_la-mit_glue.lo \ - libkrb5_la-net_read.lo libkrb5_la-net_write.lo \ - libkrb5_la-n-fold.lo libkrb5_la-pac.lo libkrb5_la-padata.lo \ - libkrb5_la-pcache.lo libkrb5_la-pkinit.lo \ - libkrb5_la-principal.lo libkrb5_la-prog_setup.lo \ - libkrb5_la-prompter_posix.lo libkrb5_la-rd_cred.lo \ - libkrb5_la-rd_error.lo libkrb5_la-rd_priv.lo \ - libkrb5_la-rd_rep.lo libkrb5_la-rd_req.lo \ - libkrb5_la-rd_safe.lo libkrb5_la-read_message.lo \ - libkrb5_la-recvauth.lo libkrb5_la-replay.lo libkrb5_la-salt.lo \ - libkrb5_la-salt-aes.lo libkrb5_la-salt-arcfour.lo \ - libkrb5_la-salt-des.lo libkrb5_la-salt-des3.lo \ - libkrb5_la-scache.lo libkrb5_la-send_to_kdc.lo \ - libkrb5_la-sendauth.lo libkrb5_la-set_default_realm.lo \ - libkrb5_la-sock_principal.lo libkrb5_la-store.lo \ - libkrb5_la-store-int.lo libkrb5_la-store_emem.lo \ - libkrb5_la-store_fd.lo libkrb5_la-store_mem.lo \ - libkrb5_la-plugin.lo libkrb5_la-ticket.lo libkrb5_la-time.lo \ - libkrb5_la-transited.lo libkrb5_la-verify_init.lo \ - libkrb5_la-verify_user.lo libkrb5_la-version.lo \ - libkrb5_la-warn.lo libkrb5_la-write_message.lo -am__objects_1 = libkrb5_la-krb5_err.lo libkrb5_la-krb_err.lo \ - libkrb5_la-heim_err.lo libkrb5_la-k524_err.lo -nodist_libkrb5_la_OBJECTS = $(am__objects_1) -libkrb5_la_OBJECTS = $(dist_libkrb5_la_OBJECTS) \ - $(nodist_libkrb5_la_OBJECTS) -libkrb5_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libkrb5_la_LDFLAGS) $(LDFLAGS) -o $@ -librfc3961_la_DEPENDENCIES = $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/ipc/libheim-ipcc.la \ - $(top_builddir)/lib/wind/libwind.la $(LIB_pkinit) \ - $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_librfc3961_la_OBJECTS = librfc3961_la-crc.lo \ - librfc3961_la-crypto.lo librfc3961_la-crypto-aes.lo \ - librfc3961_la-crypto-algs.lo librfc3961_la-crypto-arcfour.lo \ - librfc3961_la-crypto-des.lo librfc3961_la-crypto-des-common.lo \ - librfc3961_la-crypto-des3.lo librfc3961_la-crypto-evp.lo \ - librfc3961_la-crypto-null.lo librfc3961_la-crypto-pk.lo \ - librfc3961_la-crypto-rand.lo librfc3961_la-crypto-stubs.lo \ - librfc3961_la-data.lo librfc3961_la-error_string.lo \ - librfc3961_la-keyblock.lo librfc3961_la-n-fold.lo \ - librfc3961_la-salt.lo librfc3961_la-salt-aes.lo \ - librfc3961_la-salt-arcfour.lo librfc3961_la-salt-des.lo \ - librfc3961_la-salt-des3.lo librfc3961_la-store-int.lo \ - librfc3961_la-warn.lo -librfc3961_la_OBJECTS = $(am_librfc3961_la_OBJECTS) -am__EXEEXT_1 = aes-test$(EXEEXT) derived-key-test$(EXEEXT) \ - n-fold-test$(EXEEXT) parse-name-test$(EXEEXT) \ - store-test$(EXEEXT) string-to-key-test$(EXEEXT) \ - test_acl$(EXEEXT) test_addr$(EXEEXT) test_cc$(EXEEXT) \ - test_config$(EXEEXT) test_fx$(EXEEXT) test_prf$(EXEEXT) \ - test_store$(EXEEXT) test_crypto_wrapping$(EXEEXT) \ - test_keytab$(EXEEXT) test_mem$(EXEEXT) test_pac$(EXEEXT) \ - test_plugin$(EXEEXT) test_princ$(EXEEXT) \ - test_pkinit_dh2key$(EXEEXT) test_pknistkdf$(EXEEXT) \ - test_time$(EXEEXT) test_x500$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) -aes_test_SOURCES = aes-test.c -aes_test_OBJECTS = aes-test.$(OBJEXT) -aes_test_LDADD = $(LDADD) -aes_test_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -derived_key_test_SOURCES = derived-key-test.c -derived_key_test_OBJECTS = derived-key-test.$(OBJEXT) -derived_key_test_LDADD = $(LDADD) -derived_key_test_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -krbhst_test_SOURCES = krbhst-test.c -krbhst_test_OBJECTS = krbhst-test.$(OBJEXT) -krbhst_test_LDADD = $(LDADD) -krbhst_test_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -n_fold_test_SOURCES = n-fold-test.c -n_fold_test_OBJECTS = n-fold-test.$(OBJEXT) -n_fold_test_LDADD = $(LDADD) -n_fold_test_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -parse_name_test_SOURCES = parse-name-test.c -parse_name_test_OBJECTS = parse-name-test.$(OBJEXT) -parse_name_test_LDADD = $(LDADD) -parse_name_test_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -store_test_SOURCES = store-test.c -store_test_OBJECTS = store-test.$(OBJEXT) -store_test_LDADD = $(LDADD) -store_test_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -string_to_key_test_SOURCES = string-to-key-test.c -string_to_key_test_OBJECTS = string-to-key-test.$(OBJEXT) -string_to_key_test_LDADD = $(LDADD) -string_to_key_test_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_acl_SOURCES = test_acl.c -test_acl_OBJECTS = test_acl.$(OBJEXT) -test_acl_LDADD = $(LDADD) -test_acl_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_addr_SOURCES = test_addr.c -test_addr_OBJECTS = test_addr.$(OBJEXT) -test_addr_LDADD = $(LDADD) -test_addr_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_alname_SOURCES = test_alname.c -test_alname_OBJECTS = test_alname.$(OBJEXT) -test_alname_LDADD = $(LDADD) -test_alname_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_ap_req_SOURCES = test_ap-req.c -test_ap_req_OBJECTS = test_ap-req.$(OBJEXT) -test_ap_req_LDADD = $(LDADD) -test_ap_req_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_cc_SOURCES = test_cc.c -test_cc_OBJECTS = test_cc.$(OBJEXT) -test_cc_LDADD = $(LDADD) -test_cc_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_config_SOURCES = test_config.c -test_config_OBJECTS = test_config.$(OBJEXT) -test_config_LDADD = $(LDADD) -test_config_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_crypto_SOURCES = test_crypto.c -test_crypto_OBJECTS = test_crypto.$(OBJEXT) -test_crypto_LDADD = $(LDADD) -test_crypto_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_crypto_wrapping_SOURCES = test_crypto_wrapping.c -test_crypto_wrapping_OBJECTS = test_crypto_wrapping.$(OBJEXT) -test_crypto_wrapping_LDADD = $(LDADD) -test_crypto_wrapping_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_forward_SOURCES = test_forward.c -test_forward_OBJECTS = test_forward.$(OBJEXT) -test_forward_LDADD = $(LDADD) -test_forward_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_fx_SOURCES = test_fx.c -test_fx_OBJECTS = test_fx.$(OBJEXT) -test_fx_LDADD = $(LDADD) -test_fx_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_get_addrs_SOURCES = test_get_addrs.c -test_get_addrs_OBJECTS = test_get_addrs.$(OBJEXT) -test_get_addrs_LDADD = $(LDADD) -test_get_addrs_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_gic_SOURCES = test_gic.c -test_gic_OBJECTS = test_gic.$(OBJEXT) -test_gic_LDADD = $(LDADD) -test_gic_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_hostname_SOURCES = test_hostname.c -test_hostname_OBJECTS = test_hostname.$(OBJEXT) -test_hostname_LDADD = $(LDADD) -test_hostname_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_keytab_SOURCES = test_keytab.c -test_keytab_OBJECTS = test_keytab.$(OBJEXT) -test_keytab_LDADD = $(LDADD) -test_keytab_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_kuserok_SOURCES = test_kuserok.c -test_kuserok_OBJECTS = test_kuserok.$(OBJEXT) -test_kuserok_LDADD = $(LDADD) -test_kuserok_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_mem_SOURCES = test_mem.c -test_mem_OBJECTS = test_mem.$(OBJEXT) -test_mem_LDADD = $(LDADD) -test_mem_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_pac_SOURCES = test_pac.c -test_pac_OBJECTS = test_pac.$(OBJEXT) -test_pac_LDADD = $(LDADD) -test_pac_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_pkinit_dh2key_SOURCES = test_pkinit_dh2key.c -test_pkinit_dh2key_OBJECTS = test_pkinit_dh2key.$(OBJEXT) -test_pkinit_dh2key_LDADD = $(LDADD) -test_pkinit_dh2key_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_pknistkdf_SOURCES = test_pknistkdf.c -test_pknistkdf_OBJECTS = test_pknistkdf.$(OBJEXT) -test_pknistkdf_LDADD = $(LDADD) -test_pknistkdf_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_plugin_SOURCES = test_plugin.c -test_plugin_OBJECTS = test_plugin.$(OBJEXT) -test_plugin_LDADD = $(LDADD) -test_plugin_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_prf_SOURCES = test_prf.c -test_prf_OBJECTS = test_prf.$(OBJEXT) -test_prf_LDADD = $(LDADD) -test_prf_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_princ_SOURCES = test_princ.c -test_princ_OBJECTS = test_princ.$(OBJEXT) -test_princ_LDADD = $(LDADD) -test_princ_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_renew_SOURCES = test_renew.c -test_renew_OBJECTS = test_renew.$(OBJEXT) -test_renew_LDADD = $(LDADD) -test_renew_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_rfc3961_SOURCES = test_rfc3961.c -test_rfc3961_OBJECTS = test_rfc3961.$(OBJEXT) -test_rfc3961_DEPENDENCIES = librfc3961.la \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -test_store_SOURCES = test_store.c -test_store_OBJECTS = test_store.$(OBJEXT) -test_store_LDADD = $(LDADD) -test_store_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_time_SOURCES = test_time.c -test_time_OBJECTS = test_time.$(OBJEXT) -test_time_LDADD = $(LDADD) -test_time_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -test_x500_SOURCES = test_x500.c -test_x500_OBJECTS = test_x500.$(OBJEXT) -test_x500_LDADD = $(LDADD) -test_x500_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -verify_krb5_conf_SOURCES = verify_krb5_conf.c -verify_krb5_conf_OBJECTS = verify_krb5_conf.$(OBJEXT) -verify_krb5_conf_LDADD = $(LDADD) -verify_krb5_conf_DEPENDENCIES = libkrb5.la $(am__DEPENDENCIES_1) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(dist_libkrb5_la_SOURCES) $(nodist_libkrb5_la_SOURCES) \ - $(librfc3961_la_SOURCES) aes-test.c derived-key-test.c \ - krbhst-test.c n-fold-test.c parse-name-test.c store-test.c \ - string-to-key-test.c test_acl.c test_addr.c test_alname.c \ - test_ap-req.c test_cc.c test_config.c test_crypto.c \ - test_crypto_wrapping.c test_forward.c test_fx.c \ - test_get_addrs.c test_gic.c test_hostname.c test_keytab.c \ - test_kuserok.c test_mem.c test_pac.c test_pkinit_dh2key.c \ - test_pknistkdf.c test_plugin.c test_prf.c test_princ.c \ - test_renew.c test_rfc3961.c test_store.c test_time.c \ - test_x500.c verify_krb5_conf.c -DIST_SOURCES = $(dist_libkrb5_la_SOURCES) $(librfc3961_la_SOURCES) \ - aes-test.c derived-key-test.c krbhst-test.c n-fold-test.c \ - parse-name-test.c store-test.c string-to-key-test.c test_acl.c \ - test_addr.c test_alname.c test_ap-req.c test_cc.c \ - test_config.c test_crypto.c test_crypto_wrapping.c \ - test_forward.c test_fx.c test_get_addrs.c test_gic.c \ - test_hostname.c test_keytab.c test_kuserok.c test_mem.c \ - test_pac.c test_pkinit_dh2key.c test_pknistkdf.c test_plugin.c \ - test_prf.c test_princ.c test_renew.c test_rfc3961.c \ - test_store.c test_time.c test_x500.c verify_krb5_conf.c -man3dir = $(mandir)/man3 -man5dir = $(mandir)/man5 -man8dir = $(mandir)/man8 -MANS = $(man_MANS) -HEADERS = $(dist_include_HEADERS) $(krb5_HEADERS) \ - $(nodist_include_HEADERS) -ETAGS = etags -CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(INCLUDE_krb4) $(INCLUDE_hcrypto) \ - -I../com_err -I$(srcdir)/../com_err $(INCLUDE_sqlite3) \ - $(INCLUDE_libintl) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -noinst_LTLIBRARIES = \ - librfc3961.la - -check_DATA = test_config_strings.out -LDADD = libkrb5.la \ - $(LIB_hcrypto) \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la \ - $(LIB_roken) - -@PKINIT_TRUE@LIB_pkinit = ../hx509/libhx509.la -@have_scc_TRUE@use_sqlite = $(LIB_sqlite3) -libkrb5_la_LIBADD = \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/ipc/libheim-ipcc.la \ - $(top_builddir)/lib/wind/libwind.la \ - $(top_builddir)/base/libheimbase.la \ - $(LIB_pkinit) \ - $(use_sqlite) \ - $(LIB_com_err) \ - $(LIB_hcrypto) \ - $(LIB_libintl) \ - $(LIBADD_roken) \ - $(PTHREAD_LIBADD) \ - $(LIB_door_create) \ - $(LIB_dlopen) - -librfc3961_la_LIBADD = \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/ipc/libheim-ipcc.la \ - $(top_builddir)/lib/wind/libwind.la \ - $(LIB_pkinit) \ - $(use_sqlite) \ - $(LIB_com_err) \ - $(LIB_hcrypto) \ - $(LIB_libintl) \ - $(LIBADD_roken) \ - $(PTHREAD_LIBADD) \ - $(LIB_door_create) \ - $(LIB_dlopen) - -lib_LTLIBRARIES = libkrb5.la -ERR_FILES = krb5_err.c krb_err.c heim_err.c k524_err.c -libkrb5_la_CPPFLAGS = \ - -DBUILD_KRB5_LIB \ - $(AM_CPPFLAGS) \ - -DHEIMDAL_LOCALEDIR='"$(localedir)"' - -librfc3961_la_CPPFLAGS = \ - -DBUILD_KRB5_LIB \ - $(AM_CPPFLAGS) \ - -DHEIMDAL_LOCALEDIR='"$(localedir)"' - -dist_libkrb5_la_SOURCES = \ - acache.c \ - acl.c \ - add_et_list.c \ - addr_families.c \ - aname_to_localname.c \ - appdefault.c \ - asn1_glue.c \ - auth_context.c \ - build_ap_req.c \ - build_auth.c \ - cache.c \ - changepw.c \ - codec.c \ - config_file.c \ - convert_creds.c \ - constants.c \ - context.c \ - copy_host_realm.c \ - crc.c \ - creds.c \ - crypto.c \ - crypto.h \ - crypto-aes.c \ - crypto-algs.c \ - crypto-arcfour.c \ - crypto-des.c \ - crypto-des-common.c \ - crypto-des3.c \ - crypto-evp.c \ - crypto-null.c \ - crypto-pk.c \ - crypto-rand.c \ - doxygen.c \ - data.c \ - deprecated.c \ - digest.c \ - eai_to_heim_errno.c \ - error_string.c \ - expand_hostname.c \ - expand_path.c \ - fcache.c \ - free.c \ - free_host_realm.c \ - generate_seq_number.c \ - generate_subkey.c \ - get_addrs.c \ - get_cred.c \ - get_default_principal.c \ - get_default_realm.c \ - get_for_creds.c \ - get_host_realm.c \ - get_in_tkt.c \ - get_port.c \ - init_creds.c \ - init_creds_pw.c \ - kcm.c \ - kcm.h \ - keyblock.c \ - keytab.c \ - keytab_any.c \ - keytab_file.c \ - keytab_keyfile.c \ - keytab_memory.c \ - krb5_locl.h \ - krb5-v4compat.h \ - krbhst.c \ - kuserok.c \ - log.c \ - mcache.c \ - misc.c \ - mk_error.c \ - mk_priv.c \ - mk_rep.c \ - mk_req.c \ - mk_req_ext.c \ - mk_safe.c \ - mit_glue.c \ - net_read.c \ - net_write.c \ - n-fold.c \ - pac.c \ - padata.c \ - pcache.c \ - pkinit.c \ - principal.c \ - prog_setup.c \ - prompter_posix.c \ - rd_cred.c \ - rd_error.c \ - rd_priv.c \ - rd_rep.c \ - rd_req.c \ - rd_safe.c \ - read_message.c \ - recvauth.c \ - replay.c \ - salt.c \ - salt-aes.c \ - salt-arcfour.c \ - salt-des.c \ - salt-des3.c \ - scache.c \ - send_to_kdc.c \ - sendauth.c \ - set_default_realm.c \ - sock_principal.c \ - store.c \ - store-int.c \ - store-int.h \ - store_emem.c \ - store_fd.c \ - store_mem.c \ - plugin.c \ - ticket.c \ - time.c \ - transited.c \ - verify_init.c \ - verify_user.c \ - version.c \ - warn.c \ - write_message.c - -nodist_libkrb5_la_SOURCES = \ - $(ERR_FILES) - -libkrb5_la_DEPENDENCIES = \ - version-script.map - -libkrb5_la_LDFLAGS = -version-info 26:0:0 $(am__append_1) -librfc3961_la_SOURCES = \ - crc.c \ - crypto.c \ - crypto.h \ - crypto-aes.c \ - crypto-algs.c \ - crypto-arcfour.c \ - crypto-des.c \ - crypto-des-common.c \ - crypto-des3.c \ - crypto-evp.c \ - crypto-null.c \ - crypto-pk.c \ - crypto-rand.c \ - crypto-stubs.c \ - data.c \ - error_string.c \ - keyblock.c \ - n-fold.c \ - salt.c \ - salt-aes.c \ - salt-arcfour.c \ - salt-des.c \ - salt-des3.c \ - store-int.c \ - warn.c - -test_rfc3961_LDADD = \ - librfc3961.la \ - $(top_builddir)/lib/asn1/libasn1.la \ - $(top_builddir)/lib/wind/libwind.la \ - $(LIB_hcrypto) \ - $(LIB_roken) - -man_MANS = \ - kerberos.8 \ - krb5.conf.5 \ - krb524_convert_creds_kdc.3 \ - krb5_425_conv_principal.3 \ - krb5_acl_match_file.3 \ - krb5_aname_to_localname.3 \ - krb5_appdefault.3 \ - krb5_auth_context.3 \ - krb5_c_make_checksum.3 \ - krb5_check_transited.3 \ - krb5_create_checksum.3 \ - krb5_creds.3 \ - krb5_digest.3 \ - krb5_eai_to_heim_errno.3 \ - krb5_encrypt.3 \ - krb5_find_padata.3 \ - krb5_generate_random_block.3 \ - krb5_get_all_client_addrs.3 \ - krb5_get_credentials.3 \ - krb5_get_creds.3 \ - krb5_get_forwarded_creds.3 \ - krb5_get_in_cred.3 \ - krb5_get_init_creds.3 \ - krb5_get_krbhst.3 \ - krb5_getportbyname.3 \ - krb5_init_context.3 \ - krb5_is_thread_safe.3 \ - krb5_krbhst_init.3 \ - krb5_mk_req.3 \ - krb5_mk_safe.3 \ - krb5_openlog.3 \ - krb5_parse_name.3 \ - krb5_principal.3 \ - krb5_rcache.3 \ - krb5_rd_error.3 \ - krb5_rd_safe.3 \ - krb5_set_default_realm.3 \ - krb5_set_password.3 \ - krb5_string_to_key.3 \ - krb5_timeofday.3 \ - krb5_verify_init_creds.3 \ - krb5_verify_user.3 \ - verify_krb5_conf.8 - -dist_include_HEADERS = \ - krb5.h \ - krb5-protos.h \ - krb5-private.h \ - krb5_ccapi.h - -nodist_include_HEADERS = krb5_err.h heim_err.h k524_err.h - -# XXX use nobase_include_HEADERS = krb5/locate_plugin.h -krb5dir = $(includedir)/krb5 -krb5_HEADERS = locate_plugin.h send_to_kdc_plugin.h ccache_plugin.h -build_HEADERZ = \ - $(krb5_HEADERS) \ - krb_err.h - -CLEANFILES = \ - test_config_strings.out \ - test-store-data \ - krb5_err.c krb5_err.h \ - krb_err.c krb_err.h \ - heim_err.c heim_err.h \ - k524_err.c k524_err.h - -EXTRA_DIST = \ - NTMakefile \ - verify_krb5_conf-version.rc \ - krb5_err.et \ - krb_err.et \ - heim_err.et \ - k524_err.et \ - $(man_MANS) \ - version-script.map \ - test_config_strings.cfg \ - krb5.moduli - -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/krb5/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/krb5/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libkrb5.la: $(libkrb5_la_OBJECTS) $(libkrb5_la_DEPENDENCIES) - $(libkrb5_la_LINK) -rpath $(libdir) $(libkrb5_la_OBJECTS) $(libkrb5_la_LIBADD) $(LIBS) -librfc3961.la: $(librfc3961_la_OBJECTS) $(librfc3961_la_DEPENDENCIES) - $(LINK) $(librfc3961_la_OBJECTS) $(librfc3961_la_LIBADD) $(LIBS) -install-binPROGRAMS: - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -aes-test$(EXEEXT): $(aes_test_OBJECTS) $(aes_test_DEPENDENCIES) - @rm -f aes-test$(EXEEXT) - $(LINK) $(aes_test_OBJECTS) $(aes_test_LDADD) $(LIBS) -derived-key-test$(EXEEXT): $(derived_key_test_OBJECTS) $(derived_key_test_DEPENDENCIES) - @rm -f derived-key-test$(EXEEXT) - $(LINK) $(derived_key_test_OBJECTS) $(derived_key_test_LDADD) $(LIBS) -krbhst-test$(EXEEXT): $(krbhst_test_OBJECTS) $(krbhst_test_DEPENDENCIES) - @rm -f krbhst-test$(EXEEXT) - $(LINK) $(krbhst_test_OBJECTS) $(krbhst_test_LDADD) $(LIBS) -n-fold-test$(EXEEXT): $(n_fold_test_OBJECTS) $(n_fold_test_DEPENDENCIES) - @rm -f n-fold-test$(EXEEXT) - $(LINK) $(n_fold_test_OBJECTS) $(n_fold_test_LDADD) $(LIBS) -parse-name-test$(EXEEXT): $(parse_name_test_OBJECTS) $(parse_name_test_DEPENDENCIES) - @rm -f parse-name-test$(EXEEXT) - $(LINK) $(parse_name_test_OBJECTS) $(parse_name_test_LDADD) $(LIBS) -store-test$(EXEEXT): $(store_test_OBJECTS) $(store_test_DEPENDENCIES) - @rm -f store-test$(EXEEXT) - $(LINK) $(store_test_OBJECTS) $(store_test_LDADD) $(LIBS) -string-to-key-test$(EXEEXT): $(string_to_key_test_OBJECTS) $(string_to_key_test_DEPENDENCIES) - @rm -f string-to-key-test$(EXEEXT) - $(LINK) $(string_to_key_test_OBJECTS) $(string_to_key_test_LDADD) $(LIBS) -test_acl$(EXEEXT): $(test_acl_OBJECTS) $(test_acl_DEPENDENCIES) - @rm -f test_acl$(EXEEXT) - $(LINK) $(test_acl_OBJECTS) $(test_acl_LDADD) $(LIBS) -test_addr$(EXEEXT): $(test_addr_OBJECTS) $(test_addr_DEPENDENCIES) - @rm -f test_addr$(EXEEXT) - $(LINK) $(test_addr_OBJECTS) $(test_addr_LDADD) $(LIBS) -test_alname$(EXEEXT): $(test_alname_OBJECTS) $(test_alname_DEPENDENCIES) - @rm -f test_alname$(EXEEXT) - $(LINK) $(test_alname_OBJECTS) $(test_alname_LDADD) $(LIBS) -test_ap-req$(EXEEXT): $(test_ap_req_OBJECTS) $(test_ap_req_DEPENDENCIES) - @rm -f test_ap-req$(EXEEXT) - $(LINK) $(test_ap_req_OBJECTS) $(test_ap_req_LDADD) $(LIBS) -test_cc$(EXEEXT): $(test_cc_OBJECTS) $(test_cc_DEPENDENCIES) - @rm -f test_cc$(EXEEXT) - $(LINK) $(test_cc_OBJECTS) $(test_cc_LDADD) $(LIBS) -test_config$(EXEEXT): $(test_config_OBJECTS) $(test_config_DEPENDENCIES) - @rm -f test_config$(EXEEXT) - $(LINK) $(test_config_OBJECTS) $(test_config_LDADD) $(LIBS) -test_crypto$(EXEEXT): $(test_crypto_OBJECTS) $(test_crypto_DEPENDENCIES) - @rm -f test_crypto$(EXEEXT) - $(LINK) $(test_crypto_OBJECTS) $(test_crypto_LDADD) $(LIBS) -test_crypto_wrapping$(EXEEXT): $(test_crypto_wrapping_OBJECTS) $(test_crypto_wrapping_DEPENDENCIES) - @rm -f test_crypto_wrapping$(EXEEXT) - $(LINK) $(test_crypto_wrapping_OBJECTS) $(test_crypto_wrapping_LDADD) $(LIBS) -test_forward$(EXEEXT): $(test_forward_OBJECTS) $(test_forward_DEPENDENCIES) - @rm -f test_forward$(EXEEXT) - $(LINK) $(test_forward_OBJECTS) $(test_forward_LDADD) $(LIBS) -test_fx$(EXEEXT): $(test_fx_OBJECTS) $(test_fx_DEPENDENCIES) - @rm -f test_fx$(EXEEXT) - $(LINK) $(test_fx_OBJECTS) $(test_fx_LDADD) $(LIBS) -test_get_addrs$(EXEEXT): $(test_get_addrs_OBJECTS) $(test_get_addrs_DEPENDENCIES) - @rm -f test_get_addrs$(EXEEXT) - $(LINK) $(test_get_addrs_OBJECTS) $(test_get_addrs_LDADD) $(LIBS) -test_gic$(EXEEXT): $(test_gic_OBJECTS) $(test_gic_DEPENDENCIES) - @rm -f test_gic$(EXEEXT) - $(LINK) $(test_gic_OBJECTS) $(test_gic_LDADD) $(LIBS) -test_hostname$(EXEEXT): $(test_hostname_OBJECTS) $(test_hostname_DEPENDENCIES) - @rm -f test_hostname$(EXEEXT) - $(LINK) $(test_hostname_OBJECTS) $(test_hostname_LDADD) $(LIBS) -test_keytab$(EXEEXT): $(test_keytab_OBJECTS) $(test_keytab_DEPENDENCIES) - @rm -f test_keytab$(EXEEXT) - $(LINK) $(test_keytab_OBJECTS) $(test_keytab_LDADD) $(LIBS) -test_kuserok$(EXEEXT): $(test_kuserok_OBJECTS) $(test_kuserok_DEPENDENCIES) - @rm -f test_kuserok$(EXEEXT) - $(LINK) $(test_kuserok_OBJECTS) $(test_kuserok_LDADD) $(LIBS) -test_mem$(EXEEXT): $(test_mem_OBJECTS) $(test_mem_DEPENDENCIES) - @rm -f test_mem$(EXEEXT) - $(LINK) $(test_mem_OBJECTS) $(test_mem_LDADD) $(LIBS) -test_pac$(EXEEXT): $(test_pac_OBJECTS) $(test_pac_DEPENDENCIES) - @rm -f test_pac$(EXEEXT) - $(LINK) $(test_pac_OBJECTS) $(test_pac_LDADD) $(LIBS) -test_pkinit_dh2key$(EXEEXT): $(test_pkinit_dh2key_OBJECTS) $(test_pkinit_dh2key_DEPENDENCIES) - @rm -f test_pkinit_dh2key$(EXEEXT) - $(LINK) $(test_pkinit_dh2key_OBJECTS) $(test_pkinit_dh2key_LDADD) $(LIBS) -test_pknistkdf$(EXEEXT): $(test_pknistkdf_OBJECTS) $(test_pknistkdf_DEPENDENCIES) - @rm -f test_pknistkdf$(EXEEXT) - $(LINK) $(test_pknistkdf_OBJECTS) $(test_pknistkdf_LDADD) $(LIBS) -test_plugin$(EXEEXT): $(test_plugin_OBJECTS) $(test_plugin_DEPENDENCIES) - @rm -f test_plugin$(EXEEXT) - $(LINK) $(test_plugin_OBJECTS) $(test_plugin_LDADD) $(LIBS) -test_prf$(EXEEXT): $(test_prf_OBJECTS) $(test_prf_DEPENDENCIES) - @rm -f test_prf$(EXEEXT) - $(LINK) $(test_prf_OBJECTS) $(test_prf_LDADD) $(LIBS) -test_princ$(EXEEXT): $(test_princ_OBJECTS) $(test_princ_DEPENDENCIES) - @rm -f test_princ$(EXEEXT) - $(LINK) $(test_princ_OBJECTS) $(test_princ_LDADD) $(LIBS) -test_renew$(EXEEXT): $(test_renew_OBJECTS) $(test_renew_DEPENDENCIES) - @rm -f test_renew$(EXEEXT) - $(LINK) $(test_renew_OBJECTS) $(test_renew_LDADD) $(LIBS) -test_rfc3961$(EXEEXT): $(test_rfc3961_OBJECTS) $(test_rfc3961_DEPENDENCIES) - @rm -f test_rfc3961$(EXEEXT) - $(LINK) $(test_rfc3961_OBJECTS) $(test_rfc3961_LDADD) $(LIBS) -test_store$(EXEEXT): $(test_store_OBJECTS) $(test_store_DEPENDENCIES) - @rm -f test_store$(EXEEXT) - $(LINK) $(test_store_OBJECTS) $(test_store_LDADD) $(LIBS) -test_time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) - @rm -f test_time$(EXEEXT) - $(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS) -test_x500$(EXEEXT): $(test_x500_OBJECTS) $(test_x500_DEPENDENCIES) - @rm -f test_x500$(EXEEXT) - $(LINK) $(test_x500_OBJECTS) $(test_x500_LDADD) $(LIBS) -verify_krb5_conf$(EXEEXT): $(verify_krb5_conf_OBJECTS) $(verify_krb5_conf_DEPENDENCIES) - @rm -f verify_krb5_conf$(EXEEXT) - $(LINK) $(verify_krb5_conf_OBJECTS) $(verify_krb5_conf_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aes-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/derived-key-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/krbhst-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-acache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-acl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-add_et_list.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-addr_families.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-aname_to_localname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-appdefault.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-asn1_glue.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-auth_context.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-build_ap_req.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-build_auth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-cache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-changepw.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-codec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-config_file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-constants.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-context.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-convert_creds.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-copy_host_realm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-creds.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto-aes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto-algs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto-arcfour.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto-des-common.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto-des.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto-des3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto-evp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto-null.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto-pk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto-rand.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-crypto.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-data.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-deprecated.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-digest.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-doxygen.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-eai_to_heim_errno.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-error_string.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-expand_hostname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-expand_path.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-fcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-free.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-free_host_realm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-generate_seq_number.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-generate_subkey.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-get_addrs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-get_cred.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-get_default_principal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-get_default_realm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-get_for_creds.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-get_host_realm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-get_in_tkt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-get_port.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-heim_err.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-init_creds.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-init_creds_pw.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-k524_err.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-kcm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-keyblock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-keytab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-keytab_any.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-keytab_file.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-keytab_keyfile.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-keytab_memory.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-krb5_err.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-krb_err.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-krbhst.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-kuserok.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-log.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-mcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-misc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-mit_glue.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-mk_error.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-mk_priv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-mk_rep.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-mk_req.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-mk_req_ext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-mk_safe.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-n-fold.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-net_read.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-net_write.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-pac.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-padata.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-pcache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-pkinit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-plugin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-principal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-prog_setup.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-prompter_posix.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-rd_cred.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-rd_error.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-rd_priv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-rd_rep.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-rd_req.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-rd_safe.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-read_message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-recvauth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-replay.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-salt-aes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-salt-arcfour.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-salt-des.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-salt-des3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-salt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-scache.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-send_to_kdc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-sendauth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-set_default_realm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-sock_principal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-store-int.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-store.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-store_emem.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-store_fd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-store_mem.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-ticket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-time.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-transited.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-verify_init.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-verify_user.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-version.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-warn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkrb5_la-write_message.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-aes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-algs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-arcfour.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-des-common.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-des.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-des3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-evp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-null.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-pk.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-rand.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto-stubs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-crypto.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-data.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-error_string.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-keyblock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-n-fold.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-salt-aes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-salt-arcfour.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-salt-des.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-salt-des3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-salt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-store-int.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librfc3961_la-warn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/n-fold-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse-name-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/store-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string-to-key-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_acl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_addr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_alname.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ap-req.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_config.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_crypto_wrapping.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_forward.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_fx.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_get_addrs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gic.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hostname.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_keytab.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kuserok.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_mem.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pac.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pkinit_dh2key.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pknistkdf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_plugin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_prf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_princ.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_renew.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_rfc3961.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_store.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_time.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_x500.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verify_krb5_conf.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libkrb5_la-acache.lo: acache.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-acache.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-acache.Tpo -c -o libkrb5_la-acache.lo `test -f 'acache.c' || echo '$(srcdir)/'`acache.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-acache.Tpo $(DEPDIR)/libkrb5_la-acache.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='acache.c' object='libkrb5_la-acache.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-acache.lo `test -f 'acache.c' || echo '$(srcdir)/'`acache.c - -libkrb5_la-acl.lo: acl.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-acl.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-acl.Tpo -c -o libkrb5_la-acl.lo `test -f 'acl.c' || echo '$(srcdir)/'`acl.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-acl.Tpo $(DEPDIR)/libkrb5_la-acl.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='acl.c' object='libkrb5_la-acl.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-acl.lo `test -f 'acl.c' || echo '$(srcdir)/'`acl.c - -libkrb5_la-add_et_list.lo: add_et_list.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-add_et_list.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-add_et_list.Tpo -c -o libkrb5_la-add_et_list.lo `test -f 'add_et_list.c' || echo '$(srcdir)/'`add_et_list.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-add_et_list.Tpo $(DEPDIR)/libkrb5_la-add_et_list.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='add_et_list.c' object='libkrb5_la-add_et_list.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-add_et_list.lo `test -f 'add_et_list.c' || echo '$(srcdir)/'`add_et_list.c - -libkrb5_la-addr_families.lo: addr_families.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-addr_families.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-addr_families.Tpo -c -o libkrb5_la-addr_families.lo `test -f 'addr_families.c' || echo '$(srcdir)/'`addr_families.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-addr_families.Tpo $(DEPDIR)/libkrb5_la-addr_families.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='addr_families.c' object='libkrb5_la-addr_families.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-addr_families.lo `test -f 'addr_families.c' || echo '$(srcdir)/'`addr_families.c - -libkrb5_la-aname_to_localname.lo: aname_to_localname.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-aname_to_localname.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-aname_to_localname.Tpo -c -o libkrb5_la-aname_to_localname.lo `test -f 'aname_to_localname.c' || echo '$(srcdir)/'`aname_to_localname.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-aname_to_localname.Tpo $(DEPDIR)/libkrb5_la-aname_to_localname.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='aname_to_localname.c' object='libkrb5_la-aname_to_localname.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-aname_to_localname.lo `test -f 'aname_to_localname.c' || echo '$(srcdir)/'`aname_to_localname.c - -libkrb5_la-appdefault.lo: appdefault.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-appdefault.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-appdefault.Tpo -c -o libkrb5_la-appdefault.lo `test -f 'appdefault.c' || echo '$(srcdir)/'`appdefault.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-appdefault.Tpo $(DEPDIR)/libkrb5_la-appdefault.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='appdefault.c' object='libkrb5_la-appdefault.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-appdefault.lo `test -f 'appdefault.c' || echo '$(srcdir)/'`appdefault.c - -libkrb5_la-asn1_glue.lo: asn1_glue.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-asn1_glue.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-asn1_glue.Tpo -c -o libkrb5_la-asn1_glue.lo `test -f 'asn1_glue.c' || echo '$(srcdir)/'`asn1_glue.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-asn1_glue.Tpo $(DEPDIR)/libkrb5_la-asn1_glue.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='asn1_glue.c' object='libkrb5_la-asn1_glue.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-asn1_glue.lo `test -f 'asn1_glue.c' || echo '$(srcdir)/'`asn1_glue.c - -libkrb5_la-auth_context.lo: auth_context.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-auth_context.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-auth_context.Tpo -c -o libkrb5_la-auth_context.lo `test -f 'auth_context.c' || echo '$(srcdir)/'`auth_context.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-auth_context.Tpo $(DEPDIR)/libkrb5_la-auth_context.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='auth_context.c' object='libkrb5_la-auth_context.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-auth_context.lo `test -f 'auth_context.c' || echo '$(srcdir)/'`auth_context.c - -libkrb5_la-build_ap_req.lo: build_ap_req.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-build_ap_req.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-build_ap_req.Tpo -c -o libkrb5_la-build_ap_req.lo `test -f 'build_ap_req.c' || echo '$(srcdir)/'`build_ap_req.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-build_ap_req.Tpo $(DEPDIR)/libkrb5_la-build_ap_req.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_ap_req.c' object='libkrb5_la-build_ap_req.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-build_ap_req.lo `test -f 'build_ap_req.c' || echo '$(srcdir)/'`build_ap_req.c - -libkrb5_la-build_auth.lo: build_auth.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-build_auth.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-build_auth.Tpo -c -o libkrb5_la-build_auth.lo `test -f 'build_auth.c' || echo '$(srcdir)/'`build_auth.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-build_auth.Tpo $(DEPDIR)/libkrb5_la-build_auth.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='build_auth.c' object='libkrb5_la-build_auth.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-build_auth.lo `test -f 'build_auth.c' || echo '$(srcdir)/'`build_auth.c - -libkrb5_la-cache.lo: cache.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-cache.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-cache.Tpo -c -o libkrb5_la-cache.lo `test -f 'cache.c' || echo '$(srcdir)/'`cache.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-cache.Tpo $(DEPDIR)/libkrb5_la-cache.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cache.c' object='libkrb5_la-cache.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-cache.lo `test -f 'cache.c' || echo '$(srcdir)/'`cache.c - -libkrb5_la-changepw.lo: changepw.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-changepw.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-changepw.Tpo -c -o libkrb5_la-changepw.lo `test -f 'changepw.c' || echo '$(srcdir)/'`changepw.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-changepw.Tpo $(DEPDIR)/libkrb5_la-changepw.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='changepw.c' object='libkrb5_la-changepw.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-changepw.lo `test -f 'changepw.c' || echo '$(srcdir)/'`changepw.c - -libkrb5_la-codec.lo: codec.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-codec.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-codec.Tpo -c -o libkrb5_la-codec.lo `test -f 'codec.c' || echo '$(srcdir)/'`codec.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-codec.Tpo $(DEPDIR)/libkrb5_la-codec.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='codec.c' object='libkrb5_la-codec.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-codec.lo `test -f 'codec.c' || echo '$(srcdir)/'`codec.c - -libkrb5_la-config_file.lo: config_file.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-config_file.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-config_file.Tpo -c -o libkrb5_la-config_file.lo `test -f 'config_file.c' || echo '$(srcdir)/'`config_file.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-config_file.Tpo $(DEPDIR)/libkrb5_la-config_file.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config_file.c' object='libkrb5_la-config_file.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-config_file.lo `test -f 'config_file.c' || echo '$(srcdir)/'`config_file.c - -libkrb5_la-convert_creds.lo: convert_creds.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-convert_creds.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-convert_creds.Tpo -c -o libkrb5_la-convert_creds.lo `test -f 'convert_creds.c' || echo '$(srcdir)/'`convert_creds.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-convert_creds.Tpo $(DEPDIR)/libkrb5_la-convert_creds.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='convert_creds.c' object='libkrb5_la-convert_creds.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-convert_creds.lo `test -f 'convert_creds.c' || echo '$(srcdir)/'`convert_creds.c - -libkrb5_la-constants.lo: constants.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-constants.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-constants.Tpo -c -o libkrb5_la-constants.lo `test -f 'constants.c' || echo '$(srcdir)/'`constants.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-constants.Tpo $(DEPDIR)/libkrb5_la-constants.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='constants.c' object='libkrb5_la-constants.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-constants.lo `test -f 'constants.c' || echo '$(srcdir)/'`constants.c - -libkrb5_la-context.lo: context.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-context.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-context.Tpo -c -o libkrb5_la-context.lo `test -f 'context.c' || echo '$(srcdir)/'`context.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-context.Tpo $(DEPDIR)/libkrb5_la-context.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='context.c' object='libkrb5_la-context.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-context.lo `test -f 'context.c' || echo '$(srcdir)/'`context.c - -libkrb5_la-copy_host_realm.lo: copy_host_realm.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-copy_host_realm.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-copy_host_realm.Tpo -c -o libkrb5_la-copy_host_realm.lo `test -f 'copy_host_realm.c' || echo '$(srcdir)/'`copy_host_realm.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-copy_host_realm.Tpo $(DEPDIR)/libkrb5_la-copy_host_realm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy_host_realm.c' object='libkrb5_la-copy_host_realm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-copy_host_realm.lo `test -f 'copy_host_realm.c' || echo '$(srcdir)/'`copy_host_realm.c - -libkrb5_la-crc.lo: crc.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crc.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crc.Tpo -c -o libkrb5_la-crc.lo `test -f 'crc.c' || echo '$(srcdir)/'`crc.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crc.Tpo $(DEPDIR)/libkrb5_la-crc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crc.c' object='libkrb5_la-crc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crc.lo `test -f 'crc.c' || echo '$(srcdir)/'`crc.c - -libkrb5_la-creds.lo: creds.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-creds.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-creds.Tpo -c -o libkrb5_la-creds.lo `test -f 'creds.c' || echo '$(srcdir)/'`creds.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-creds.Tpo $(DEPDIR)/libkrb5_la-creds.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='creds.c' object='libkrb5_la-creds.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-creds.lo `test -f 'creds.c' || echo '$(srcdir)/'`creds.c - -libkrb5_la-crypto.lo: crypto.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto.Tpo -c -o libkrb5_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto.Tpo $(DEPDIR)/libkrb5_la-crypto.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto.c' object='libkrb5_la-crypto.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c - -libkrb5_la-crypto-aes.lo: crypto-aes.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto-aes.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto-aes.Tpo -c -o libkrb5_la-crypto-aes.lo `test -f 'crypto-aes.c' || echo '$(srcdir)/'`crypto-aes.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto-aes.Tpo $(DEPDIR)/libkrb5_la-crypto-aes.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-aes.c' object='libkrb5_la-crypto-aes.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto-aes.lo `test -f 'crypto-aes.c' || echo '$(srcdir)/'`crypto-aes.c - -libkrb5_la-crypto-algs.lo: crypto-algs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto-algs.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto-algs.Tpo -c -o libkrb5_la-crypto-algs.lo `test -f 'crypto-algs.c' || echo '$(srcdir)/'`crypto-algs.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto-algs.Tpo $(DEPDIR)/libkrb5_la-crypto-algs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-algs.c' object='libkrb5_la-crypto-algs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto-algs.lo `test -f 'crypto-algs.c' || echo '$(srcdir)/'`crypto-algs.c - -libkrb5_la-crypto-arcfour.lo: crypto-arcfour.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto-arcfour.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto-arcfour.Tpo -c -o libkrb5_la-crypto-arcfour.lo `test -f 'crypto-arcfour.c' || echo '$(srcdir)/'`crypto-arcfour.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto-arcfour.Tpo $(DEPDIR)/libkrb5_la-crypto-arcfour.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-arcfour.c' object='libkrb5_la-crypto-arcfour.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto-arcfour.lo `test -f 'crypto-arcfour.c' || echo '$(srcdir)/'`crypto-arcfour.c - -libkrb5_la-crypto-des.lo: crypto-des.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto-des.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto-des.Tpo -c -o libkrb5_la-crypto-des.lo `test -f 'crypto-des.c' || echo '$(srcdir)/'`crypto-des.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto-des.Tpo $(DEPDIR)/libkrb5_la-crypto-des.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-des.c' object='libkrb5_la-crypto-des.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto-des.lo `test -f 'crypto-des.c' || echo '$(srcdir)/'`crypto-des.c - -libkrb5_la-crypto-des-common.lo: crypto-des-common.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto-des-common.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto-des-common.Tpo -c -o libkrb5_la-crypto-des-common.lo `test -f 'crypto-des-common.c' || echo '$(srcdir)/'`crypto-des-common.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto-des-common.Tpo $(DEPDIR)/libkrb5_la-crypto-des-common.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-des-common.c' object='libkrb5_la-crypto-des-common.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto-des-common.lo `test -f 'crypto-des-common.c' || echo '$(srcdir)/'`crypto-des-common.c - -libkrb5_la-crypto-des3.lo: crypto-des3.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto-des3.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto-des3.Tpo -c -o libkrb5_la-crypto-des3.lo `test -f 'crypto-des3.c' || echo '$(srcdir)/'`crypto-des3.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto-des3.Tpo $(DEPDIR)/libkrb5_la-crypto-des3.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-des3.c' object='libkrb5_la-crypto-des3.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto-des3.lo `test -f 'crypto-des3.c' || echo '$(srcdir)/'`crypto-des3.c - -libkrb5_la-crypto-evp.lo: crypto-evp.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto-evp.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto-evp.Tpo -c -o libkrb5_la-crypto-evp.lo `test -f 'crypto-evp.c' || echo '$(srcdir)/'`crypto-evp.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto-evp.Tpo $(DEPDIR)/libkrb5_la-crypto-evp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-evp.c' object='libkrb5_la-crypto-evp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto-evp.lo `test -f 'crypto-evp.c' || echo '$(srcdir)/'`crypto-evp.c - -libkrb5_la-crypto-null.lo: crypto-null.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto-null.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto-null.Tpo -c -o libkrb5_la-crypto-null.lo `test -f 'crypto-null.c' || echo '$(srcdir)/'`crypto-null.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto-null.Tpo $(DEPDIR)/libkrb5_la-crypto-null.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-null.c' object='libkrb5_la-crypto-null.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto-null.lo `test -f 'crypto-null.c' || echo '$(srcdir)/'`crypto-null.c - -libkrb5_la-crypto-pk.lo: crypto-pk.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto-pk.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto-pk.Tpo -c -o libkrb5_la-crypto-pk.lo `test -f 'crypto-pk.c' || echo '$(srcdir)/'`crypto-pk.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto-pk.Tpo $(DEPDIR)/libkrb5_la-crypto-pk.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-pk.c' object='libkrb5_la-crypto-pk.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto-pk.lo `test -f 'crypto-pk.c' || echo '$(srcdir)/'`crypto-pk.c - -libkrb5_la-crypto-rand.lo: crypto-rand.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-crypto-rand.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-crypto-rand.Tpo -c -o libkrb5_la-crypto-rand.lo `test -f 'crypto-rand.c' || echo '$(srcdir)/'`crypto-rand.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-crypto-rand.Tpo $(DEPDIR)/libkrb5_la-crypto-rand.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-rand.c' object='libkrb5_la-crypto-rand.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-crypto-rand.lo `test -f 'crypto-rand.c' || echo '$(srcdir)/'`crypto-rand.c - -libkrb5_la-doxygen.lo: doxygen.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-doxygen.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-doxygen.Tpo -c -o libkrb5_la-doxygen.lo `test -f 'doxygen.c' || echo '$(srcdir)/'`doxygen.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-doxygen.Tpo $(DEPDIR)/libkrb5_la-doxygen.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='doxygen.c' object='libkrb5_la-doxygen.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-doxygen.lo `test -f 'doxygen.c' || echo '$(srcdir)/'`doxygen.c - -libkrb5_la-data.lo: data.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-data.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-data.Tpo -c -o libkrb5_la-data.lo `test -f 'data.c' || echo '$(srcdir)/'`data.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-data.Tpo $(DEPDIR)/libkrb5_la-data.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data.c' object='libkrb5_la-data.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-data.lo `test -f 'data.c' || echo '$(srcdir)/'`data.c - -libkrb5_la-deprecated.lo: deprecated.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-deprecated.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-deprecated.Tpo -c -o libkrb5_la-deprecated.lo `test -f 'deprecated.c' || echo '$(srcdir)/'`deprecated.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-deprecated.Tpo $(DEPDIR)/libkrb5_la-deprecated.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='deprecated.c' object='libkrb5_la-deprecated.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-deprecated.lo `test -f 'deprecated.c' || echo '$(srcdir)/'`deprecated.c - -libkrb5_la-digest.lo: digest.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-digest.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-digest.Tpo -c -o libkrb5_la-digest.lo `test -f 'digest.c' || echo '$(srcdir)/'`digest.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-digest.Tpo $(DEPDIR)/libkrb5_la-digest.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='digest.c' object='libkrb5_la-digest.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-digest.lo `test -f 'digest.c' || echo '$(srcdir)/'`digest.c - -libkrb5_la-eai_to_heim_errno.lo: eai_to_heim_errno.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-eai_to_heim_errno.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-eai_to_heim_errno.Tpo -c -o libkrb5_la-eai_to_heim_errno.lo `test -f 'eai_to_heim_errno.c' || echo '$(srcdir)/'`eai_to_heim_errno.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-eai_to_heim_errno.Tpo $(DEPDIR)/libkrb5_la-eai_to_heim_errno.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eai_to_heim_errno.c' object='libkrb5_la-eai_to_heim_errno.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-eai_to_heim_errno.lo `test -f 'eai_to_heim_errno.c' || echo '$(srcdir)/'`eai_to_heim_errno.c - -libkrb5_la-error_string.lo: error_string.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-error_string.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-error_string.Tpo -c -o libkrb5_la-error_string.lo `test -f 'error_string.c' || echo '$(srcdir)/'`error_string.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-error_string.Tpo $(DEPDIR)/libkrb5_la-error_string.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error_string.c' object='libkrb5_la-error_string.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-error_string.lo `test -f 'error_string.c' || echo '$(srcdir)/'`error_string.c - -libkrb5_la-expand_hostname.lo: expand_hostname.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-expand_hostname.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-expand_hostname.Tpo -c -o libkrb5_la-expand_hostname.lo `test -f 'expand_hostname.c' || echo '$(srcdir)/'`expand_hostname.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-expand_hostname.Tpo $(DEPDIR)/libkrb5_la-expand_hostname.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='expand_hostname.c' object='libkrb5_la-expand_hostname.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-expand_hostname.lo `test -f 'expand_hostname.c' || echo '$(srcdir)/'`expand_hostname.c - -libkrb5_la-expand_path.lo: expand_path.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-expand_path.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-expand_path.Tpo -c -o libkrb5_la-expand_path.lo `test -f 'expand_path.c' || echo '$(srcdir)/'`expand_path.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-expand_path.Tpo $(DEPDIR)/libkrb5_la-expand_path.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='expand_path.c' object='libkrb5_la-expand_path.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-expand_path.lo `test -f 'expand_path.c' || echo '$(srcdir)/'`expand_path.c - -libkrb5_la-fcache.lo: fcache.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-fcache.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-fcache.Tpo -c -o libkrb5_la-fcache.lo `test -f 'fcache.c' || echo '$(srcdir)/'`fcache.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-fcache.Tpo $(DEPDIR)/libkrb5_la-fcache.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fcache.c' object='libkrb5_la-fcache.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-fcache.lo `test -f 'fcache.c' || echo '$(srcdir)/'`fcache.c - -libkrb5_la-free.lo: free.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-free.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-free.Tpo -c -o libkrb5_la-free.lo `test -f 'free.c' || echo '$(srcdir)/'`free.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-free.Tpo $(DEPDIR)/libkrb5_la-free.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='free.c' object='libkrb5_la-free.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-free.lo `test -f 'free.c' || echo '$(srcdir)/'`free.c - -libkrb5_la-free_host_realm.lo: free_host_realm.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-free_host_realm.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-free_host_realm.Tpo -c -o libkrb5_la-free_host_realm.lo `test -f 'free_host_realm.c' || echo '$(srcdir)/'`free_host_realm.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-free_host_realm.Tpo $(DEPDIR)/libkrb5_la-free_host_realm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='free_host_realm.c' object='libkrb5_la-free_host_realm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-free_host_realm.lo `test -f 'free_host_realm.c' || echo '$(srcdir)/'`free_host_realm.c - -libkrb5_la-generate_seq_number.lo: generate_seq_number.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-generate_seq_number.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-generate_seq_number.Tpo -c -o libkrb5_la-generate_seq_number.lo `test -f 'generate_seq_number.c' || echo '$(srcdir)/'`generate_seq_number.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-generate_seq_number.Tpo $(DEPDIR)/libkrb5_la-generate_seq_number.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_seq_number.c' object='libkrb5_la-generate_seq_number.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-generate_seq_number.lo `test -f 'generate_seq_number.c' || echo '$(srcdir)/'`generate_seq_number.c - -libkrb5_la-generate_subkey.lo: generate_subkey.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-generate_subkey.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-generate_subkey.Tpo -c -o libkrb5_la-generate_subkey.lo `test -f 'generate_subkey.c' || echo '$(srcdir)/'`generate_subkey.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-generate_subkey.Tpo $(DEPDIR)/libkrb5_la-generate_subkey.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate_subkey.c' object='libkrb5_la-generate_subkey.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-generate_subkey.lo `test -f 'generate_subkey.c' || echo '$(srcdir)/'`generate_subkey.c - -libkrb5_la-get_addrs.lo: get_addrs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-get_addrs.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-get_addrs.Tpo -c -o libkrb5_la-get_addrs.lo `test -f 'get_addrs.c' || echo '$(srcdir)/'`get_addrs.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-get_addrs.Tpo $(DEPDIR)/libkrb5_la-get_addrs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='get_addrs.c' object='libkrb5_la-get_addrs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-get_addrs.lo `test -f 'get_addrs.c' || echo '$(srcdir)/'`get_addrs.c - -libkrb5_la-get_cred.lo: get_cred.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-get_cred.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-get_cred.Tpo -c -o libkrb5_la-get_cred.lo `test -f 'get_cred.c' || echo '$(srcdir)/'`get_cred.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-get_cred.Tpo $(DEPDIR)/libkrb5_la-get_cred.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='get_cred.c' object='libkrb5_la-get_cred.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-get_cred.lo `test -f 'get_cred.c' || echo '$(srcdir)/'`get_cred.c - -libkrb5_la-get_default_principal.lo: get_default_principal.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-get_default_principal.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-get_default_principal.Tpo -c -o libkrb5_la-get_default_principal.lo `test -f 'get_default_principal.c' || echo '$(srcdir)/'`get_default_principal.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-get_default_principal.Tpo $(DEPDIR)/libkrb5_la-get_default_principal.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='get_default_principal.c' object='libkrb5_la-get_default_principal.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-get_default_principal.lo `test -f 'get_default_principal.c' || echo '$(srcdir)/'`get_default_principal.c - -libkrb5_la-get_default_realm.lo: get_default_realm.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-get_default_realm.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-get_default_realm.Tpo -c -o libkrb5_la-get_default_realm.lo `test -f 'get_default_realm.c' || echo '$(srcdir)/'`get_default_realm.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-get_default_realm.Tpo $(DEPDIR)/libkrb5_la-get_default_realm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='get_default_realm.c' object='libkrb5_la-get_default_realm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-get_default_realm.lo `test -f 'get_default_realm.c' || echo '$(srcdir)/'`get_default_realm.c - -libkrb5_la-get_for_creds.lo: get_for_creds.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-get_for_creds.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-get_for_creds.Tpo -c -o libkrb5_la-get_for_creds.lo `test -f 'get_for_creds.c' || echo '$(srcdir)/'`get_for_creds.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-get_for_creds.Tpo $(DEPDIR)/libkrb5_la-get_for_creds.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='get_for_creds.c' object='libkrb5_la-get_for_creds.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-get_for_creds.lo `test -f 'get_for_creds.c' || echo '$(srcdir)/'`get_for_creds.c - -libkrb5_la-get_host_realm.lo: get_host_realm.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-get_host_realm.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-get_host_realm.Tpo -c -o libkrb5_la-get_host_realm.lo `test -f 'get_host_realm.c' || echo '$(srcdir)/'`get_host_realm.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-get_host_realm.Tpo $(DEPDIR)/libkrb5_la-get_host_realm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='get_host_realm.c' object='libkrb5_la-get_host_realm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-get_host_realm.lo `test -f 'get_host_realm.c' || echo '$(srcdir)/'`get_host_realm.c - -libkrb5_la-get_in_tkt.lo: get_in_tkt.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-get_in_tkt.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-get_in_tkt.Tpo -c -o libkrb5_la-get_in_tkt.lo `test -f 'get_in_tkt.c' || echo '$(srcdir)/'`get_in_tkt.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-get_in_tkt.Tpo $(DEPDIR)/libkrb5_la-get_in_tkt.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='get_in_tkt.c' object='libkrb5_la-get_in_tkt.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-get_in_tkt.lo `test -f 'get_in_tkt.c' || echo '$(srcdir)/'`get_in_tkt.c - -libkrb5_la-get_port.lo: get_port.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-get_port.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-get_port.Tpo -c -o libkrb5_la-get_port.lo `test -f 'get_port.c' || echo '$(srcdir)/'`get_port.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-get_port.Tpo $(DEPDIR)/libkrb5_la-get_port.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='get_port.c' object='libkrb5_la-get_port.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-get_port.lo `test -f 'get_port.c' || echo '$(srcdir)/'`get_port.c - -libkrb5_la-init_creds.lo: init_creds.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-init_creds.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-init_creds.Tpo -c -o libkrb5_la-init_creds.lo `test -f 'init_creds.c' || echo '$(srcdir)/'`init_creds.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-init_creds.Tpo $(DEPDIR)/libkrb5_la-init_creds.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='init_creds.c' object='libkrb5_la-init_creds.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-init_creds.lo `test -f 'init_creds.c' || echo '$(srcdir)/'`init_creds.c - -libkrb5_la-init_creds_pw.lo: init_creds_pw.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-init_creds_pw.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-init_creds_pw.Tpo -c -o libkrb5_la-init_creds_pw.lo `test -f 'init_creds_pw.c' || echo '$(srcdir)/'`init_creds_pw.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-init_creds_pw.Tpo $(DEPDIR)/libkrb5_la-init_creds_pw.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='init_creds_pw.c' object='libkrb5_la-init_creds_pw.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-init_creds_pw.lo `test -f 'init_creds_pw.c' || echo '$(srcdir)/'`init_creds_pw.c - -libkrb5_la-kcm.lo: kcm.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-kcm.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-kcm.Tpo -c -o libkrb5_la-kcm.lo `test -f 'kcm.c' || echo '$(srcdir)/'`kcm.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-kcm.Tpo $(DEPDIR)/libkrb5_la-kcm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kcm.c' object='libkrb5_la-kcm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-kcm.lo `test -f 'kcm.c' || echo '$(srcdir)/'`kcm.c - -libkrb5_la-keyblock.lo: keyblock.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-keyblock.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-keyblock.Tpo -c -o libkrb5_la-keyblock.lo `test -f 'keyblock.c' || echo '$(srcdir)/'`keyblock.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-keyblock.Tpo $(DEPDIR)/libkrb5_la-keyblock.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyblock.c' object='libkrb5_la-keyblock.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-keyblock.lo `test -f 'keyblock.c' || echo '$(srcdir)/'`keyblock.c - -libkrb5_la-keytab.lo: keytab.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-keytab.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-keytab.Tpo -c -o libkrb5_la-keytab.lo `test -f 'keytab.c' || echo '$(srcdir)/'`keytab.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-keytab.Tpo $(DEPDIR)/libkrb5_la-keytab.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keytab.c' object='libkrb5_la-keytab.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-keytab.lo `test -f 'keytab.c' || echo '$(srcdir)/'`keytab.c - -libkrb5_la-keytab_any.lo: keytab_any.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-keytab_any.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-keytab_any.Tpo -c -o libkrb5_la-keytab_any.lo `test -f 'keytab_any.c' || echo '$(srcdir)/'`keytab_any.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-keytab_any.Tpo $(DEPDIR)/libkrb5_la-keytab_any.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keytab_any.c' object='libkrb5_la-keytab_any.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-keytab_any.lo `test -f 'keytab_any.c' || echo '$(srcdir)/'`keytab_any.c - -libkrb5_la-keytab_file.lo: keytab_file.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-keytab_file.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-keytab_file.Tpo -c -o libkrb5_la-keytab_file.lo `test -f 'keytab_file.c' || echo '$(srcdir)/'`keytab_file.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-keytab_file.Tpo $(DEPDIR)/libkrb5_la-keytab_file.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keytab_file.c' object='libkrb5_la-keytab_file.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-keytab_file.lo `test -f 'keytab_file.c' || echo '$(srcdir)/'`keytab_file.c - -libkrb5_la-keytab_keyfile.lo: keytab_keyfile.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-keytab_keyfile.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-keytab_keyfile.Tpo -c -o libkrb5_la-keytab_keyfile.lo `test -f 'keytab_keyfile.c' || echo '$(srcdir)/'`keytab_keyfile.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-keytab_keyfile.Tpo $(DEPDIR)/libkrb5_la-keytab_keyfile.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keytab_keyfile.c' object='libkrb5_la-keytab_keyfile.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-keytab_keyfile.lo `test -f 'keytab_keyfile.c' || echo '$(srcdir)/'`keytab_keyfile.c - -libkrb5_la-keytab_memory.lo: keytab_memory.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-keytab_memory.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-keytab_memory.Tpo -c -o libkrb5_la-keytab_memory.lo `test -f 'keytab_memory.c' || echo '$(srcdir)/'`keytab_memory.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-keytab_memory.Tpo $(DEPDIR)/libkrb5_la-keytab_memory.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keytab_memory.c' object='libkrb5_la-keytab_memory.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-keytab_memory.lo `test -f 'keytab_memory.c' || echo '$(srcdir)/'`keytab_memory.c - -libkrb5_la-krbhst.lo: krbhst.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-krbhst.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-krbhst.Tpo -c -o libkrb5_la-krbhst.lo `test -f 'krbhst.c' || echo '$(srcdir)/'`krbhst.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-krbhst.Tpo $(DEPDIR)/libkrb5_la-krbhst.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='krbhst.c' object='libkrb5_la-krbhst.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-krbhst.lo `test -f 'krbhst.c' || echo '$(srcdir)/'`krbhst.c - -libkrb5_la-kuserok.lo: kuserok.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-kuserok.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-kuserok.Tpo -c -o libkrb5_la-kuserok.lo `test -f 'kuserok.c' || echo '$(srcdir)/'`kuserok.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-kuserok.Tpo $(DEPDIR)/libkrb5_la-kuserok.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kuserok.c' object='libkrb5_la-kuserok.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-kuserok.lo `test -f 'kuserok.c' || echo '$(srcdir)/'`kuserok.c - -libkrb5_la-log.lo: log.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-log.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-log.Tpo -c -o libkrb5_la-log.lo `test -f 'log.c' || echo '$(srcdir)/'`log.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-log.Tpo $(DEPDIR)/libkrb5_la-log.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='log.c' object='libkrb5_la-log.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-log.lo `test -f 'log.c' || echo '$(srcdir)/'`log.c - -libkrb5_la-mcache.lo: mcache.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-mcache.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-mcache.Tpo -c -o libkrb5_la-mcache.lo `test -f 'mcache.c' || echo '$(srcdir)/'`mcache.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-mcache.Tpo $(DEPDIR)/libkrb5_la-mcache.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mcache.c' object='libkrb5_la-mcache.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-mcache.lo `test -f 'mcache.c' || echo '$(srcdir)/'`mcache.c - -libkrb5_la-misc.lo: misc.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-misc.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-misc.Tpo -c -o libkrb5_la-misc.lo `test -f 'misc.c' || echo '$(srcdir)/'`misc.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-misc.Tpo $(DEPDIR)/libkrb5_la-misc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libkrb5_la-misc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-misc.lo `test -f 'misc.c' || echo '$(srcdir)/'`misc.c - -libkrb5_la-mk_error.lo: mk_error.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-mk_error.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-mk_error.Tpo -c -o libkrb5_la-mk_error.lo `test -f 'mk_error.c' || echo '$(srcdir)/'`mk_error.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-mk_error.Tpo $(DEPDIR)/libkrb5_la-mk_error.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mk_error.c' object='libkrb5_la-mk_error.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-mk_error.lo `test -f 'mk_error.c' || echo '$(srcdir)/'`mk_error.c - -libkrb5_la-mk_priv.lo: mk_priv.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-mk_priv.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-mk_priv.Tpo -c -o libkrb5_la-mk_priv.lo `test -f 'mk_priv.c' || echo '$(srcdir)/'`mk_priv.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-mk_priv.Tpo $(DEPDIR)/libkrb5_la-mk_priv.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mk_priv.c' object='libkrb5_la-mk_priv.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-mk_priv.lo `test -f 'mk_priv.c' || echo '$(srcdir)/'`mk_priv.c - -libkrb5_la-mk_rep.lo: mk_rep.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-mk_rep.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-mk_rep.Tpo -c -o libkrb5_la-mk_rep.lo `test -f 'mk_rep.c' || echo '$(srcdir)/'`mk_rep.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-mk_rep.Tpo $(DEPDIR)/libkrb5_la-mk_rep.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mk_rep.c' object='libkrb5_la-mk_rep.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-mk_rep.lo `test -f 'mk_rep.c' || echo '$(srcdir)/'`mk_rep.c - -libkrb5_la-mk_req.lo: mk_req.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-mk_req.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-mk_req.Tpo -c -o libkrb5_la-mk_req.lo `test -f 'mk_req.c' || echo '$(srcdir)/'`mk_req.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-mk_req.Tpo $(DEPDIR)/libkrb5_la-mk_req.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mk_req.c' object='libkrb5_la-mk_req.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-mk_req.lo `test -f 'mk_req.c' || echo '$(srcdir)/'`mk_req.c - -libkrb5_la-mk_req_ext.lo: mk_req_ext.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-mk_req_ext.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-mk_req_ext.Tpo -c -o libkrb5_la-mk_req_ext.lo `test -f 'mk_req_ext.c' || echo '$(srcdir)/'`mk_req_ext.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-mk_req_ext.Tpo $(DEPDIR)/libkrb5_la-mk_req_ext.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mk_req_ext.c' object='libkrb5_la-mk_req_ext.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-mk_req_ext.lo `test -f 'mk_req_ext.c' || echo '$(srcdir)/'`mk_req_ext.c - -libkrb5_la-mk_safe.lo: mk_safe.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-mk_safe.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-mk_safe.Tpo -c -o libkrb5_la-mk_safe.lo `test -f 'mk_safe.c' || echo '$(srcdir)/'`mk_safe.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-mk_safe.Tpo $(DEPDIR)/libkrb5_la-mk_safe.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mk_safe.c' object='libkrb5_la-mk_safe.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-mk_safe.lo `test -f 'mk_safe.c' || echo '$(srcdir)/'`mk_safe.c - -libkrb5_la-mit_glue.lo: mit_glue.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-mit_glue.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-mit_glue.Tpo -c -o libkrb5_la-mit_glue.lo `test -f 'mit_glue.c' || echo '$(srcdir)/'`mit_glue.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-mit_glue.Tpo $(DEPDIR)/libkrb5_la-mit_glue.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mit_glue.c' object='libkrb5_la-mit_glue.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-mit_glue.lo `test -f 'mit_glue.c' || echo '$(srcdir)/'`mit_glue.c - -libkrb5_la-net_read.lo: net_read.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-net_read.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-net_read.Tpo -c -o libkrb5_la-net_read.lo `test -f 'net_read.c' || echo '$(srcdir)/'`net_read.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-net_read.Tpo $(DEPDIR)/libkrb5_la-net_read.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='net_read.c' object='libkrb5_la-net_read.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-net_read.lo `test -f 'net_read.c' || echo '$(srcdir)/'`net_read.c - -libkrb5_la-net_write.lo: net_write.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-net_write.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-net_write.Tpo -c -o libkrb5_la-net_write.lo `test -f 'net_write.c' || echo '$(srcdir)/'`net_write.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-net_write.Tpo $(DEPDIR)/libkrb5_la-net_write.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='net_write.c' object='libkrb5_la-net_write.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-net_write.lo `test -f 'net_write.c' || echo '$(srcdir)/'`net_write.c - -libkrb5_la-n-fold.lo: n-fold.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-n-fold.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-n-fold.Tpo -c -o libkrb5_la-n-fold.lo `test -f 'n-fold.c' || echo '$(srcdir)/'`n-fold.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-n-fold.Tpo $(DEPDIR)/libkrb5_la-n-fold.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='n-fold.c' object='libkrb5_la-n-fold.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-n-fold.lo `test -f 'n-fold.c' || echo '$(srcdir)/'`n-fold.c - -libkrb5_la-pac.lo: pac.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-pac.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-pac.Tpo -c -o libkrb5_la-pac.lo `test -f 'pac.c' || echo '$(srcdir)/'`pac.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-pac.Tpo $(DEPDIR)/libkrb5_la-pac.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pac.c' object='libkrb5_la-pac.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-pac.lo `test -f 'pac.c' || echo '$(srcdir)/'`pac.c - -libkrb5_la-padata.lo: padata.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-padata.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-padata.Tpo -c -o libkrb5_la-padata.lo `test -f 'padata.c' || echo '$(srcdir)/'`padata.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-padata.Tpo $(DEPDIR)/libkrb5_la-padata.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='padata.c' object='libkrb5_la-padata.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-padata.lo `test -f 'padata.c' || echo '$(srcdir)/'`padata.c - -libkrb5_la-pcache.lo: pcache.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-pcache.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-pcache.Tpo -c -o libkrb5_la-pcache.lo `test -f 'pcache.c' || echo '$(srcdir)/'`pcache.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-pcache.Tpo $(DEPDIR)/libkrb5_la-pcache.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pcache.c' object='libkrb5_la-pcache.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-pcache.lo `test -f 'pcache.c' || echo '$(srcdir)/'`pcache.c - -libkrb5_la-pkinit.lo: pkinit.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-pkinit.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-pkinit.Tpo -c -o libkrb5_la-pkinit.lo `test -f 'pkinit.c' || echo '$(srcdir)/'`pkinit.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-pkinit.Tpo $(DEPDIR)/libkrb5_la-pkinit.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pkinit.c' object='libkrb5_la-pkinit.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-pkinit.lo `test -f 'pkinit.c' || echo '$(srcdir)/'`pkinit.c - -libkrb5_la-principal.lo: principal.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-principal.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-principal.Tpo -c -o libkrb5_la-principal.lo `test -f 'principal.c' || echo '$(srcdir)/'`principal.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-principal.Tpo $(DEPDIR)/libkrb5_la-principal.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='principal.c' object='libkrb5_la-principal.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-principal.lo `test -f 'principal.c' || echo '$(srcdir)/'`principal.c - -libkrb5_la-prog_setup.lo: prog_setup.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-prog_setup.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-prog_setup.Tpo -c -o libkrb5_la-prog_setup.lo `test -f 'prog_setup.c' || echo '$(srcdir)/'`prog_setup.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-prog_setup.Tpo $(DEPDIR)/libkrb5_la-prog_setup.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='prog_setup.c' object='libkrb5_la-prog_setup.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-prog_setup.lo `test -f 'prog_setup.c' || echo '$(srcdir)/'`prog_setup.c - -libkrb5_la-prompter_posix.lo: prompter_posix.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-prompter_posix.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-prompter_posix.Tpo -c -o libkrb5_la-prompter_posix.lo `test -f 'prompter_posix.c' || echo '$(srcdir)/'`prompter_posix.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-prompter_posix.Tpo $(DEPDIR)/libkrb5_la-prompter_posix.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='prompter_posix.c' object='libkrb5_la-prompter_posix.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-prompter_posix.lo `test -f 'prompter_posix.c' || echo '$(srcdir)/'`prompter_posix.c - -libkrb5_la-rd_cred.lo: rd_cred.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-rd_cred.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-rd_cred.Tpo -c -o libkrb5_la-rd_cred.lo `test -f 'rd_cred.c' || echo '$(srcdir)/'`rd_cred.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-rd_cred.Tpo $(DEPDIR)/libkrb5_la-rd_cred.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rd_cred.c' object='libkrb5_la-rd_cred.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-rd_cred.lo `test -f 'rd_cred.c' || echo '$(srcdir)/'`rd_cred.c - -libkrb5_la-rd_error.lo: rd_error.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-rd_error.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-rd_error.Tpo -c -o libkrb5_la-rd_error.lo `test -f 'rd_error.c' || echo '$(srcdir)/'`rd_error.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-rd_error.Tpo $(DEPDIR)/libkrb5_la-rd_error.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rd_error.c' object='libkrb5_la-rd_error.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-rd_error.lo `test -f 'rd_error.c' || echo '$(srcdir)/'`rd_error.c - -libkrb5_la-rd_priv.lo: rd_priv.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-rd_priv.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-rd_priv.Tpo -c -o libkrb5_la-rd_priv.lo `test -f 'rd_priv.c' || echo '$(srcdir)/'`rd_priv.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-rd_priv.Tpo $(DEPDIR)/libkrb5_la-rd_priv.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rd_priv.c' object='libkrb5_la-rd_priv.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-rd_priv.lo `test -f 'rd_priv.c' || echo '$(srcdir)/'`rd_priv.c - -libkrb5_la-rd_rep.lo: rd_rep.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-rd_rep.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-rd_rep.Tpo -c -o libkrb5_la-rd_rep.lo `test -f 'rd_rep.c' || echo '$(srcdir)/'`rd_rep.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-rd_rep.Tpo $(DEPDIR)/libkrb5_la-rd_rep.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rd_rep.c' object='libkrb5_la-rd_rep.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-rd_rep.lo `test -f 'rd_rep.c' || echo '$(srcdir)/'`rd_rep.c - -libkrb5_la-rd_req.lo: rd_req.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-rd_req.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-rd_req.Tpo -c -o libkrb5_la-rd_req.lo `test -f 'rd_req.c' || echo '$(srcdir)/'`rd_req.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-rd_req.Tpo $(DEPDIR)/libkrb5_la-rd_req.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rd_req.c' object='libkrb5_la-rd_req.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-rd_req.lo `test -f 'rd_req.c' || echo '$(srcdir)/'`rd_req.c - -libkrb5_la-rd_safe.lo: rd_safe.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-rd_safe.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-rd_safe.Tpo -c -o libkrb5_la-rd_safe.lo `test -f 'rd_safe.c' || echo '$(srcdir)/'`rd_safe.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-rd_safe.Tpo $(DEPDIR)/libkrb5_la-rd_safe.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rd_safe.c' object='libkrb5_la-rd_safe.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-rd_safe.lo `test -f 'rd_safe.c' || echo '$(srcdir)/'`rd_safe.c - -libkrb5_la-read_message.lo: read_message.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-read_message.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-read_message.Tpo -c -o libkrb5_la-read_message.lo `test -f 'read_message.c' || echo '$(srcdir)/'`read_message.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-read_message.Tpo $(DEPDIR)/libkrb5_la-read_message.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='read_message.c' object='libkrb5_la-read_message.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-read_message.lo `test -f 'read_message.c' || echo '$(srcdir)/'`read_message.c - -libkrb5_la-recvauth.lo: recvauth.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-recvauth.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-recvauth.Tpo -c -o libkrb5_la-recvauth.lo `test -f 'recvauth.c' || echo '$(srcdir)/'`recvauth.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-recvauth.Tpo $(DEPDIR)/libkrb5_la-recvauth.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='recvauth.c' object='libkrb5_la-recvauth.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-recvauth.lo `test -f 'recvauth.c' || echo '$(srcdir)/'`recvauth.c - -libkrb5_la-replay.lo: replay.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-replay.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-replay.Tpo -c -o libkrb5_la-replay.lo `test -f 'replay.c' || echo '$(srcdir)/'`replay.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-replay.Tpo $(DEPDIR)/libkrb5_la-replay.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='replay.c' object='libkrb5_la-replay.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-replay.lo `test -f 'replay.c' || echo '$(srcdir)/'`replay.c - -libkrb5_la-salt.lo: salt.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-salt.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-salt.Tpo -c -o libkrb5_la-salt.lo `test -f 'salt.c' || echo '$(srcdir)/'`salt.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-salt.Tpo $(DEPDIR)/libkrb5_la-salt.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='salt.c' object='libkrb5_la-salt.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-salt.lo `test -f 'salt.c' || echo '$(srcdir)/'`salt.c - -libkrb5_la-salt-aes.lo: salt-aes.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-salt-aes.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-salt-aes.Tpo -c -o libkrb5_la-salt-aes.lo `test -f 'salt-aes.c' || echo '$(srcdir)/'`salt-aes.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-salt-aes.Tpo $(DEPDIR)/libkrb5_la-salt-aes.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='salt-aes.c' object='libkrb5_la-salt-aes.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-salt-aes.lo `test -f 'salt-aes.c' || echo '$(srcdir)/'`salt-aes.c - -libkrb5_la-salt-arcfour.lo: salt-arcfour.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-salt-arcfour.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-salt-arcfour.Tpo -c -o libkrb5_la-salt-arcfour.lo `test -f 'salt-arcfour.c' || echo '$(srcdir)/'`salt-arcfour.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-salt-arcfour.Tpo $(DEPDIR)/libkrb5_la-salt-arcfour.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='salt-arcfour.c' object='libkrb5_la-salt-arcfour.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-salt-arcfour.lo `test -f 'salt-arcfour.c' || echo '$(srcdir)/'`salt-arcfour.c - -libkrb5_la-salt-des.lo: salt-des.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-salt-des.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-salt-des.Tpo -c -o libkrb5_la-salt-des.lo `test -f 'salt-des.c' || echo '$(srcdir)/'`salt-des.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-salt-des.Tpo $(DEPDIR)/libkrb5_la-salt-des.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='salt-des.c' object='libkrb5_la-salt-des.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-salt-des.lo `test -f 'salt-des.c' || echo '$(srcdir)/'`salt-des.c - -libkrb5_la-salt-des3.lo: salt-des3.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-salt-des3.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-salt-des3.Tpo -c -o libkrb5_la-salt-des3.lo `test -f 'salt-des3.c' || echo '$(srcdir)/'`salt-des3.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-salt-des3.Tpo $(DEPDIR)/libkrb5_la-salt-des3.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='salt-des3.c' object='libkrb5_la-salt-des3.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-salt-des3.lo `test -f 'salt-des3.c' || echo '$(srcdir)/'`salt-des3.c - -libkrb5_la-scache.lo: scache.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-scache.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-scache.Tpo -c -o libkrb5_la-scache.lo `test -f 'scache.c' || echo '$(srcdir)/'`scache.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-scache.Tpo $(DEPDIR)/libkrb5_la-scache.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scache.c' object='libkrb5_la-scache.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-scache.lo `test -f 'scache.c' || echo '$(srcdir)/'`scache.c - -libkrb5_la-send_to_kdc.lo: send_to_kdc.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-send_to_kdc.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-send_to_kdc.Tpo -c -o libkrb5_la-send_to_kdc.lo `test -f 'send_to_kdc.c' || echo '$(srcdir)/'`send_to_kdc.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-send_to_kdc.Tpo $(DEPDIR)/libkrb5_la-send_to_kdc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='send_to_kdc.c' object='libkrb5_la-send_to_kdc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-send_to_kdc.lo `test -f 'send_to_kdc.c' || echo '$(srcdir)/'`send_to_kdc.c - -libkrb5_la-sendauth.lo: sendauth.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-sendauth.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-sendauth.Tpo -c -o libkrb5_la-sendauth.lo `test -f 'sendauth.c' || echo '$(srcdir)/'`sendauth.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-sendauth.Tpo $(DEPDIR)/libkrb5_la-sendauth.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sendauth.c' object='libkrb5_la-sendauth.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-sendauth.lo `test -f 'sendauth.c' || echo '$(srcdir)/'`sendauth.c - -libkrb5_la-set_default_realm.lo: set_default_realm.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-set_default_realm.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-set_default_realm.Tpo -c -o libkrb5_la-set_default_realm.lo `test -f 'set_default_realm.c' || echo '$(srcdir)/'`set_default_realm.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-set_default_realm.Tpo $(DEPDIR)/libkrb5_la-set_default_realm.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='set_default_realm.c' object='libkrb5_la-set_default_realm.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-set_default_realm.lo `test -f 'set_default_realm.c' || echo '$(srcdir)/'`set_default_realm.c - -libkrb5_la-sock_principal.lo: sock_principal.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-sock_principal.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-sock_principal.Tpo -c -o libkrb5_la-sock_principal.lo `test -f 'sock_principal.c' || echo '$(srcdir)/'`sock_principal.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-sock_principal.Tpo $(DEPDIR)/libkrb5_la-sock_principal.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sock_principal.c' object='libkrb5_la-sock_principal.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-sock_principal.lo `test -f 'sock_principal.c' || echo '$(srcdir)/'`sock_principal.c - -libkrb5_la-store.lo: store.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-store.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-store.Tpo -c -o libkrb5_la-store.lo `test -f 'store.c' || echo '$(srcdir)/'`store.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-store.Tpo $(DEPDIR)/libkrb5_la-store.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='store.c' object='libkrb5_la-store.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-store.lo `test -f 'store.c' || echo '$(srcdir)/'`store.c - -libkrb5_la-store-int.lo: store-int.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-store-int.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-store-int.Tpo -c -o libkrb5_la-store-int.lo `test -f 'store-int.c' || echo '$(srcdir)/'`store-int.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-store-int.Tpo $(DEPDIR)/libkrb5_la-store-int.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='store-int.c' object='libkrb5_la-store-int.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-store-int.lo `test -f 'store-int.c' || echo '$(srcdir)/'`store-int.c - -libkrb5_la-store_emem.lo: store_emem.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-store_emem.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-store_emem.Tpo -c -o libkrb5_la-store_emem.lo `test -f 'store_emem.c' || echo '$(srcdir)/'`store_emem.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-store_emem.Tpo $(DEPDIR)/libkrb5_la-store_emem.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='store_emem.c' object='libkrb5_la-store_emem.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-store_emem.lo `test -f 'store_emem.c' || echo '$(srcdir)/'`store_emem.c - -libkrb5_la-store_fd.lo: store_fd.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-store_fd.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-store_fd.Tpo -c -o libkrb5_la-store_fd.lo `test -f 'store_fd.c' || echo '$(srcdir)/'`store_fd.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-store_fd.Tpo $(DEPDIR)/libkrb5_la-store_fd.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='store_fd.c' object='libkrb5_la-store_fd.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-store_fd.lo `test -f 'store_fd.c' || echo '$(srcdir)/'`store_fd.c - -libkrb5_la-store_mem.lo: store_mem.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-store_mem.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-store_mem.Tpo -c -o libkrb5_la-store_mem.lo `test -f 'store_mem.c' || echo '$(srcdir)/'`store_mem.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-store_mem.Tpo $(DEPDIR)/libkrb5_la-store_mem.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='store_mem.c' object='libkrb5_la-store_mem.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-store_mem.lo `test -f 'store_mem.c' || echo '$(srcdir)/'`store_mem.c - -libkrb5_la-plugin.lo: plugin.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-plugin.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-plugin.Tpo -c -o libkrb5_la-plugin.lo `test -f 'plugin.c' || echo '$(srcdir)/'`plugin.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-plugin.Tpo $(DEPDIR)/libkrb5_la-plugin.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='plugin.c' object='libkrb5_la-plugin.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-plugin.lo `test -f 'plugin.c' || echo '$(srcdir)/'`plugin.c - -libkrb5_la-ticket.lo: ticket.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-ticket.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-ticket.Tpo -c -o libkrb5_la-ticket.lo `test -f 'ticket.c' || echo '$(srcdir)/'`ticket.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-ticket.Tpo $(DEPDIR)/libkrb5_la-ticket.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ticket.c' object='libkrb5_la-ticket.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-ticket.lo `test -f 'ticket.c' || echo '$(srcdir)/'`ticket.c - -libkrb5_la-time.lo: time.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-time.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-time.Tpo -c -o libkrb5_la-time.lo `test -f 'time.c' || echo '$(srcdir)/'`time.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-time.Tpo $(DEPDIR)/libkrb5_la-time.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='time.c' object='libkrb5_la-time.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-time.lo `test -f 'time.c' || echo '$(srcdir)/'`time.c - -libkrb5_la-transited.lo: transited.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-transited.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-transited.Tpo -c -o libkrb5_la-transited.lo `test -f 'transited.c' || echo '$(srcdir)/'`transited.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-transited.Tpo $(DEPDIR)/libkrb5_la-transited.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='transited.c' object='libkrb5_la-transited.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-transited.lo `test -f 'transited.c' || echo '$(srcdir)/'`transited.c - -libkrb5_la-verify_init.lo: verify_init.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-verify_init.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-verify_init.Tpo -c -o libkrb5_la-verify_init.lo `test -f 'verify_init.c' || echo '$(srcdir)/'`verify_init.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-verify_init.Tpo $(DEPDIR)/libkrb5_la-verify_init.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='verify_init.c' object='libkrb5_la-verify_init.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-verify_init.lo `test -f 'verify_init.c' || echo '$(srcdir)/'`verify_init.c - -libkrb5_la-verify_user.lo: verify_user.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-verify_user.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-verify_user.Tpo -c -o libkrb5_la-verify_user.lo `test -f 'verify_user.c' || echo '$(srcdir)/'`verify_user.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-verify_user.Tpo $(DEPDIR)/libkrb5_la-verify_user.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='verify_user.c' object='libkrb5_la-verify_user.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-verify_user.lo `test -f 'verify_user.c' || echo '$(srcdir)/'`verify_user.c - -libkrb5_la-version.lo: version.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-version.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-version.Tpo -c -o libkrb5_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-version.Tpo $(DEPDIR)/libkrb5_la-version.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='version.c' object='libkrb5_la-version.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c - -libkrb5_la-warn.lo: warn.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-warn.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-warn.Tpo -c -o libkrb5_la-warn.lo `test -f 'warn.c' || echo '$(srcdir)/'`warn.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-warn.Tpo $(DEPDIR)/libkrb5_la-warn.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='warn.c' object='libkrb5_la-warn.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-warn.lo `test -f 'warn.c' || echo '$(srcdir)/'`warn.c - -libkrb5_la-write_message.lo: write_message.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-write_message.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-write_message.Tpo -c -o libkrb5_la-write_message.lo `test -f 'write_message.c' || echo '$(srcdir)/'`write_message.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-write_message.Tpo $(DEPDIR)/libkrb5_la-write_message.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='write_message.c' object='libkrb5_la-write_message.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-write_message.lo `test -f 'write_message.c' || echo '$(srcdir)/'`write_message.c - -libkrb5_la-krb5_err.lo: krb5_err.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-krb5_err.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-krb5_err.Tpo -c -o libkrb5_la-krb5_err.lo `test -f 'krb5_err.c' || echo '$(srcdir)/'`krb5_err.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-krb5_err.Tpo $(DEPDIR)/libkrb5_la-krb5_err.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='krb5_err.c' object='libkrb5_la-krb5_err.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-krb5_err.lo `test -f 'krb5_err.c' || echo '$(srcdir)/'`krb5_err.c - -libkrb5_la-krb_err.lo: krb_err.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-krb_err.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-krb_err.Tpo -c -o libkrb5_la-krb_err.lo `test -f 'krb_err.c' || echo '$(srcdir)/'`krb_err.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-krb_err.Tpo $(DEPDIR)/libkrb5_la-krb_err.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='krb_err.c' object='libkrb5_la-krb_err.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-krb_err.lo `test -f 'krb_err.c' || echo '$(srcdir)/'`krb_err.c - -libkrb5_la-heim_err.lo: heim_err.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-heim_err.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-heim_err.Tpo -c -o libkrb5_la-heim_err.lo `test -f 'heim_err.c' || echo '$(srcdir)/'`heim_err.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-heim_err.Tpo $(DEPDIR)/libkrb5_la-heim_err.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='heim_err.c' object='libkrb5_la-heim_err.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-heim_err.lo `test -f 'heim_err.c' || echo '$(srcdir)/'`heim_err.c - -libkrb5_la-k524_err.lo: k524_err.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkrb5_la-k524_err.lo -MD -MP -MF $(DEPDIR)/libkrb5_la-k524_err.Tpo -c -o libkrb5_la-k524_err.lo `test -f 'k524_err.c' || echo '$(srcdir)/'`k524_err.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libkrb5_la-k524_err.Tpo $(DEPDIR)/libkrb5_la-k524_err.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='k524_err.c' object='libkrb5_la-k524_err.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkrb5_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkrb5_la-k524_err.lo `test -f 'k524_err.c' || echo '$(srcdir)/'`k524_err.c - -librfc3961_la-crc.lo: crc.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crc.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crc.Tpo -c -o librfc3961_la-crc.lo `test -f 'crc.c' || echo '$(srcdir)/'`crc.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crc.Tpo $(DEPDIR)/librfc3961_la-crc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crc.c' object='librfc3961_la-crc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crc.lo `test -f 'crc.c' || echo '$(srcdir)/'`crc.c - -librfc3961_la-crypto.lo: crypto.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto.Tpo -c -o librfc3961_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto.Tpo $(DEPDIR)/librfc3961_la-crypto.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto.c' object='librfc3961_la-crypto.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c - -librfc3961_la-crypto-aes.lo: crypto-aes.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-aes.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-aes.Tpo -c -o librfc3961_la-crypto-aes.lo `test -f 'crypto-aes.c' || echo '$(srcdir)/'`crypto-aes.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-aes.Tpo $(DEPDIR)/librfc3961_la-crypto-aes.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-aes.c' object='librfc3961_la-crypto-aes.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-aes.lo `test -f 'crypto-aes.c' || echo '$(srcdir)/'`crypto-aes.c - -librfc3961_la-crypto-algs.lo: crypto-algs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-algs.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-algs.Tpo -c -o librfc3961_la-crypto-algs.lo `test -f 'crypto-algs.c' || echo '$(srcdir)/'`crypto-algs.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-algs.Tpo $(DEPDIR)/librfc3961_la-crypto-algs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-algs.c' object='librfc3961_la-crypto-algs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-algs.lo `test -f 'crypto-algs.c' || echo '$(srcdir)/'`crypto-algs.c - -librfc3961_la-crypto-arcfour.lo: crypto-arcfour.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-arcfour.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-arcfour.Tpo -c -o librfc3961_la-crypto-arcfour.lo `test -f 'crypto-arcfour.c' || echo '$(srcdir)/'`crypto-arcfour.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-arcfour.Tpo $(DEPDIR)/librfc3961_la-crypto-arcfour.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-arcfour.c' object='librfc3961_la-crypto-arcfour.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-arcfour.lo `test -f 'crypto-arcfour.c' || echo '$(srcdir)/'`crypto-arcfour.c - -librfc3961_la-crypto-des.lo: crypto-des.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-des.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-des.Tpo -c -o librfc3961_la-crypto-des.lo `test -f 'crypto-des.c' || echo '$(srcdir)/'`crypto-des.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-des.Tpo $(DEPDIR)/librfc3961_la-crypto-des.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-des.c' object='librfc3961_la-crypto-des.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-des.lo `test -f 'crypto-des.c' || echo '$(srcdir)/'`crypto-des.c - -librfc3961_la-crypto-des-common.lo: crypto-des-common.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-des-common.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-des-common.Tpo -c -o librfc3961_la-crypto-des-common.lo `test -f 'crypto-des-common.c' || echo '$(srcdir)/'`crypto-des-common.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-des-common.Tpo $(DEPDIR)/librfc3961_la-crypto-des-common.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-des-common.c' object='librfc3961_la-crypto-des-common.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-des-common.lo `test -f 'crypto-des-common.c' || echo '$(srcdir)/'`crypto-des-common.c - -librfc3961_la-crypto-des3.lo: crypto-des3.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-des3.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-des3.Tpo -c -o librfc3961_la-crypto-des3.lo `test -f 'crypto-des3.c' || echo '$(srcdir)/'`crypto-des3.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-des3.Tpo $(DEPDIR)/librfc3961_la-crypto-des3.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-des3.c' object='librfc3961_la-crypto-des3.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-des3.lo `test -f 'crypto-des3.c' || echo '$(srcdir)/'`crypto-des3.c - -librfc3961_la-crypto-evp.lo: crypto-evp.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-evp.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-evp.Tpo -c -o librfc3961_la-crypto-evp.lo `test -f 'crypto-evp.c' || echo '$(srcdir)/'`crypto-evp.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-evp.Tpo $(DEPDIR)/librfc3961_la-crypto-evp.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-evp.c' object='librfc3961_la-crypto-evp.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-evp.lo `test -f 'crypto-evp.c' || echo '$(srcdir)/'`crypto-evp.c - -librfc3961_la-crypto-null.lo: crypto-null.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-null.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-null.Tpo -c -o librfc3961_la-crypto-null.lo `test -f 'crypto-null.c' || echo '$(srcdir)/'`crypto-null.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-null.Tpo $(DEPDIR)/librfc3961_la-crypto-null.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-null.c' object='librfc3961_la-crypto-null.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-null.lo `test -f 'crypto-null.c' || echo '$(srcdir)/'`crypto-null.c - -librfc3961_la-crypto-pk.lo: crypto-pk.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-pk.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-pk.Tpo -c -o librfc3961_la-crypto-pk.lo `test -f 'crypto-pk.c' || echo '$(srcdir)/'`crypto-pk.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-pk.Tpo $(DEPDIR)/librfc3961_la-crypto-pk.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-pk.c' object='librfc3961_la-crypto-pk.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-pk.lo `test -f 'crypto-pk.c' || echo '$(srcdir)/'`crypto-pk.c - -librfc3961_la-crypto-rand.lo: crypto-rand.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-rand.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-rand.Tpo -c -o librfc3961_la-crypto-rand.lo `test -f 'crypto-rand.c' || echo '$(srcdir)/'`crypto-rand.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-rand.Tpo $(DEPDIR)/librfc3961_la-crypto-rand.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-rand.c' object='librfc3961_la-crypto-rand.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-rand.lo `test -f 'crypto-rand.c' || echo '$(srcdir)/'`crypto-rand.c - -librfc3961_la-crypto-stubs.lo: crypto-stubs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-crypto-stubs.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-crypto-stubs.Tpo -c -o librfc3961_la-crypto-stubs.lo `test -f 'crypto-stubs.c' || echo '$(srcdir)/'`crypto-stubs.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-crypto-stubs.Tpo $(DEPDIR)/librfc3961_la-crypto-stubs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crypto-stubs.c' object='librfc3961_la-crypto-stubs.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-crypto-stubs.lo `test -f 'crypto-stubs.c' || echo '$(srcdir)/'`crypto-stubs.c - -librfc3961_la-data.lo: data.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-data.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-data.Tpo -c -o librfc3961_la-data.lo `test -f 'data.c' || echo '$(srcdir)/'`data.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-data.Tpo $(DEPDIR)/librfc3961_la-data.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='data.c' object='librfc3961_la-data.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-data.lo `test -f 'data.c' || echo '$(srcdir)/'`data.c - -librfc3961_la-error_string.lo: error_string.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-error_string.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-error_string.Tpo -c -o librfc3961_la-error_string.lo `test -f 'error_string.c' || echo '$(srcdir)/'`error_string.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-error_string.Tpo $(DEPDIR)/librfc3961_la-error_string.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='error_string.c' object='librfc3961_la-error_string.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-error_string.lo `test -f 'error_string.c' || echo '$(srcdir)/'`error_string.c - -librfc3961_la-keyblock.lo: keyblock.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-keyblock.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-keyblock.Tpo -c -o librfc3961_la-keyblock.lo `test -f 'keyblock.c' || echo '$(srcdir)/'`keyblock.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-keyblock.Tpo $(DEPDIR)/librfc3961_la-keyblock.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyblock.c' object='librfc3961_la-keyblock.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-keyblock.lo `test -f 'keyblock.c' || echo '$(srcdir)/'`keyblock.c - -librfc3961_la-n-fold.lo: n-fold.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-n-fold.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-n-fold.Tpo -c -o librfc3961_la-n-fold.lo `test -f 'n-fold.c' || echo '$(srcdir)/'`n-fold.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-n-fold.Tpo $(DEPDIR)/librfc3961_la-n-fold.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='n-fold.c' object='librfc3961_la-n-fold.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-n-fold.lo `test -f 'n-fold.c' || echo '$(srcdir)/'`n-fold.c - -librfc3961_la-salt.lo: salt.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-salt.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-salt.Tpo -c -o librfc3961_la-salt.lo `test -f 'salt.c' || echo '$(srcdir)/'`salt.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-salt.Tpo $(DEPDIR)/librfc3961_la-salt.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='salt.c' object='librfc3961_la-salt.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-salt.lo `test -f 'salt.c' || echo '$(srcdir)/'`salt.c - -librfc3961_la-salt-aes.lo: salt-aes.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-salt-aes.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-salt-aes.Tpo -c -o librfc3961_la-salt-aes.lo `test -f 'salt-aes.c' || echo '$(srcdir)/'`salt-aes.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-salt-aes.Tpo $(DEPDIR)/librfc3961_la-salt-aes.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='salt-aes.c' object='librfc3961_la-salt-aes.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-salt-aes.lo `test -f 'salt-aes.c' || echo '$(srcdir)/'`salt-aes.c - -librfc3961_la-salt-arcfour.lo: salt-arcfour.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-salt-arcfour.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-salt-arcfour.Tpo -c -o librfc3961_la-salt-arcfour.lo `test -f 'salt-arcfour.c' || echo '$(srcdir)/'`salt-arcfour.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-salt-arcfour.Tpo $(DEPDIR)/librfc3961_la-salt-arcfour.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='salt-arcfour.c' object='librfc3961_la-salt-arcfour.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-salt-arcfour.lo `test -f 'salt-arcfour.c' || echo '$(srcdir)/'`salt-arcfour.c - -librfc3961_la-salt-des.lo: salt-des.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-salt-des.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-salt-des.Tpo -c -o librfc3961_la-salt-des.lo `test -f 'salt-des.c' || echo '$(srcdir)/'`salt-des.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-salt-des.Tpo $(DEPDIR)/librfc3961_la-salt-des.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='salt-des.c' object='librfc3961_la-salt-des.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-salt-des.lo `test -f 'salt-des.c' || echo '$(srcdir)/'`salt-des.c - -librfc3961_la-salt-des3.lo: salt-des3.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-salt-des3.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-salt-des3.Tpo -c -o librfc3961_la-salt-des3.lo `test -f 'salt-des3.c' || echo '$(srcdir)/'`salt-des3.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-salt-des3.Tpo $(DEPDIR)/librfc3961_la-salt-des3.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='salt-des3.c' object='librfc3961_la-salt-des3.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-salt-des3.lo `test -f 'salt-des3.c' || echo '$(srcdir)/'`salt-des3.c - -librfc3961_la-store-int.lo: store-int.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-store-int.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-store-int.Tpo -c -o librfc3961_la-store-int.lo `test -f 'store-int.c' || echo '$(srcdir)/'`store-int.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-store-int.Tpo $(DEPDIR)/librfc3961_la-store-int.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='store-int.c' object='librfc3961_la-store-int.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-store-int.lo `test -f 'store-int.c' || echo '$(srcdir)/'`store-int.c - -librfc3961_la-warn.lo: warn.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT librfc3961_la-warn.lo -MD -MP -MF $(DEPDIR)/librfc3961_la-warn.Tpo -c -o librfc3961_la-warn.lo `test -f 'warn.c' || echo '$(srcdir)/'`warn.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/librfc3961_la-warn.Tpo $(DEPDIR)/librfc3961_la-warn.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='warn.c' object='librfc3961_la-warn.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(librfc3961_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o librfc3961_la-warn.lo `test -f 'warn.c' || echo '$(srcdir)/'`warn.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man3: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list=''; test -n "$(man3dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ - done; } - -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man3dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } -install-man5: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" - @list=''; test -n "$(man5dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ - done; } - -uninstall-man5: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man5dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } -install-man8: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ - done; } - -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man8dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } -install-dist_includeHEADERS: $(dist_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(dist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-dist_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(dist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files -install-krb5HEADERS: $(krb5_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(krb5dir)" || $(MKDIR_P) "$(DESTDIR)$(krb5dir)" - @list='$(krb5_HEADERS)'; test -n "$(krb5dir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(krb5dir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(krb5dir)" || exit $$?; \ - done - -uninstall-krb5HEADERS: - @$(NORMAL_UNINSTALL) - @list='$(krb5_HEADERS)'; test -n "$(krb5dir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(krb5dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(krb5dir)" && rm -f $$files -install-nodist_includeHEADERS: $(nodist_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-nodist_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_DATA) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS) \ - all-local -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(krb5dir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-dist_includeHEADERS install-krb5HEADERS \ - install-man install-nodist_includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man3 install-man5 install-man8 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-dist_includeHEADERS \ - uninstall-krb5HEADERS uninstall-libLTLIBRARIES uninstall-man \ - uninstall-nodist_includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man3 uninstall-man5 uninstall-man8 - -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \ - check-local clean clean-binPROGRAMS clean-checkPROGRAMS \ - clean-generic clean-libLTLIBRARIES clean-libtool \ - clean-noinstLTLIBRARIES clean-noinstPROGRAMS ctags dist-hook \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-hook \ - install-dist_includeHEADERS install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ - install-krb5HEADERS install-libLTLIBRARIES install-man \ - install-man3 install-man5 install-man8 \ - install-nodist_includeHEADERS install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-dist_includeHEADERS uninstall-hook \ - uninstall-krb5HEADERS uninstall-libLTLIBRARIES uninstall-man \ - uninstall-man3 uninstall-man5 uninstall-man8 \ - uninstall-nodist_includeHEADERS - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -$(libkrb5_la_OBJECTS) $(verify_krb5_conf_OBJECTS) $(librfc3961_la_OBJECTS): $(srcdir)/krb5-protos.h $(srcdir)/krb5-private.h krb5_err.h heim_err.h k524_err.h krb5_err.h krb_err.h k524_err.h - -$(srcdir)/krb5-protos.h: - cd $(srcdir) && perl ../../cf/make-proto.pl -E KRB5_LIB -q -P comment -o krb5-protos.h $(dist_libkrb5_la_SOURCES) || rm -f krb5-protos.h - -$(srcdir)/krb5-private.h: - cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p krb5-private.h $(dist_libkrb5_la_SOURCES) || rm -f krb5-private.h - -$(libkrb5_la_OBJECTS): krb5_err.h krb_err.h heim_err.h k524_err.h - -test_config_strings.out: test_config_strings.cfg - $(CP) $(srcdir)/test_config_strings.cfg test_config_strings.out - -#sysconf_DATA = krb5.moduli - -# to help stupid solaris make - -krb5_err.h: krb5_err.et - -krb_err.h: krb_err.et - -heim_err.h: heim_err.et - -k524_err.h: k524_err.et - -# 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/kerberosV/src/lib/krb5/NTMakefile b/kerberosV/src/lib/krb5/NTMakefile deleted file mode 100644 index 733121c80a9..00000000000 --- a/kerberosV/src/lib/krb5/NTMakefile +++ /dev/null @@ -1,485 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=lib\krb5 - -!include ../../windows/NTMakefile.w32 - -libkrb5_OBJS = \ - $(OBJ)\acache.obj \ - $(OBJ)\acl.obj \ - $(OBJ)\add_et_list.obj \ - $(OBJ)\addr_families.obj \ - $(OBJ)\aname_to_localname.obj \ - $(OBJ)\appdefault.obj \ - $(OBJ)\asn1_glue.obj \ - $(OBJ)\auth_context.obj \ - $(OBJ)\build_ap_req.obj \ - $(OBJ)\build_auth.obj \ - $(OBJ)\cache.obj \ - $(OBJ)\changepw.obj \ - $(OBJ)\codec.obj \ - $(OBJ)\config_file.obj \ - $(OBJ)\config_reg.obj \ - $(OBJ)\constants.obj \ - $(OBJ)\context.obj \ - $(OBJ)\copy_host_realm.obj \ - $(OBJ)\crc.obj \ - $(OBJ)\creds.obj \ - $(OBJ)\crypto.obj \ - $(OBJ)\crypto-aes.obj \ - $(OBJ)\crypto-algs.obj \ - $(OBJ)\crypto-arcfour.obj \ - $(OBJ)\crypto-des-common.obj \ - $(OBJ)\crypto-des.obj \ - $(OBJ)\crypto-des3.obj \ - $(OBJ)\crypto-evp.obj \ - $(OBJ)\crypto-null.obj \ - $(OBJ)\crypto-pk.obj \ - $(OBJ)\crypto-rand.obj \ - $(OBJ)\data.obj \ - $(OBJ)\deprecated.obj \ - $(OBJ)\digest.obj \ - $(OBJ)\dll.obj \ - $(OBJ)\eai_to_heim_errno.obj \ - $(OBJ)\error_string.obj \ - $(OBJ)\expand_hostname.obj \ - $(OBJ)\expand_path.obj \ - $(OBJ)\fcache.obj \ - $(OBJ)\free.obj \ - $(OBJ)\free_host_realm.obj \ - $(OBJ)\generate_seq_number.obj \ - $(OBJ)\generate_subkey.obj \ - $(OBJ)\get_addrs.obj \ - $(OBJ)\get_cred.obj \ - $(OBJ)\get_default_principal.obj \ - $(OBJ)\get_default_realm.obj \ - $(OBJ)\get_for_creds.obj \ - $(OBJ)\get_host_realm.obj \ - $(OBJ)\get_in_tkt.obj \ - $(OBJ)\get_port.obj \ - $(OBJ)\init_creds.obj \ - $(OBJ)\init_creds_pw.obj \ - $(OBJ)\kcm.obj \ - $(OBJ)\keyblock.obj \ - $(OBJ)\keytab.obj \ - $(OBJ)\keytab_any.obj \ - $(OBJ)\keytab_file.obj \ - $(OBJ)\keytab_keyfile.obj \ - $(OBJ)\keytab_memory.obj \ - $(OBJ)\krbhst.obj \ - $(OBJ)\kuserok.obj \ - $(OBJ)\log.obj \ - $(OBJ)\mcache.obj \ - $(OBJ)\misc.obj \ - $(OBJ)\mit_glue.obj \ - $(OBJ)\mk_error.obj \ - $(OBJ)\mk_priv.obj \ - $(OBJ)\mk_rep.obj \ - $(OBJ)\mk_req.obj \ - $(OBJ)\mk_req_ext.obj \ - $(OBJ)\mk_safe.obj \ - $(OBJ)\net_read.obj \ - $(OBJ)\net_write.obj \ - $(OBJ)\n-fold.obj \ - $(OBJ)\pac.obj \ - $(OBJ)\padata.obj \ - $(OBJ)\pkinit.obj \ - $(OBJ)\principal.obj \ - $(OBJ)\prog_setup.obj \ - $(OBJ)\prompter_posix.obj \ - $(OBJ)\rd_cred.obj \ - $(OBJ)\rd_error.obj \ - $(OBJ)\rd_priv.obj \ - $(OBJ)\rd_rep.obj \ - $(OBJ)\rd_req.obj \ - $(OBJ)\rd_safe.obj \ - $(OBJ)\read_message.obj \ - $(OBJ)\recvauth.obj \ - $(OBJ)\replay.obj \ - $(OBJ)\salt-aes.obj \ - $(OBJ)\salt-arcfour.obj \ - $(OBJ)\salt-des.obj \ - $(OBJ)\salt-des3.obj \ - $(OBJ)\salt.obj \ - $(OBJ)\scache.obj \ - $(OBJ)\send_to_kdc.obj \ - $(OBJ)\sendauth.obj \ - $(OBJ)\set_default_realm.obj \ - $(OBJ)\sock_principal.obj \ - $(OBJ)\store.obj \ - $(OBJ)\store-int.obj \ - $(OBJ)\store_emem.obj \ - $(OBJ)\store_fd.obj \ - $(OBJ)\store_mem.obj \ - $(OBJ)\pcache.obj \ - $(OBJ)\plugin.obj \ - $(OBJ)\ticket.obj \ - $(OBJ)\time.obj \ - $(OBJ)\transited.obj \ - $(OBJ)\verify_init.obj \ - $(OBJ)\verify_user.obj \ - $(OBJ)\version.obj \ - $(OBJ)\warn.obj \ - $(OBJ)\write_message.obj - -libkrb5_gen_OBJS= \ - $(OBJ)\krb5_err.obj \ - $(OBJ)\krb_err.obj \ - $(OBJ)\heim_err.obj \ - $(OBJ)\k524_err.obj - -INCFILES= \ - $(INCDIR)\heim_err.h \ - $(INCDIR)\k524_err.h \ - $(INCDIR)\kcm.h \ - $(INCDIR)\krb_err.h \ - $(INCDIR)\krb5.h \ - $(INCDIR)\krb5_ccapi.h \ - $(INCDIR)\krb5_err.h \ - $(INCDIR)\krb5_locl.h \ - $(INCDIR)\krb5-protos.h \ - $(INCDIR)\krb5-private.h \ - $(INCDIR)\krb5-v4compat.h \ - $(INCDIR)\crypto.h - -all:: $(INCFILES) - -clean:: - -$(RM) $(INCFILES) - -dist_libkrb5_la_SOURCES = \ - acache.c \ - acl.c \ - add_et_list.c \ - addr_families.c \ - aname_to_localname.c \ - appdefault.c \ - asn1_glue.c \ - auth_context.c \ - build_ap_req.c \ - build_auth.c \ - cache.c \ - changepw.c \ - codec.c \ - config_file.c \ - config_reg.c \ - constants.c \ - context.c \ - copy_host_realm.c \ - crc.c \ - creds.c \ - crypto.c \ - crypto.h \ - crypto-aes.c \ - crypto-algs.c \ - crypto-arcfour.c \ - crypto-des.c \ - crypto-des-common.c \ - crypto-des3.c \ - crypto-evp.c \ - crypto-pk.c \ - crypto-rand.c \ - doxygen.c \ - data.c \ - deprecated.c \ - digest.c \ - eai_to_heim_errno.c \ - error_string.c \ - expand_hostname.c \ - expand_path.c \ - fcache.c \ - free.c \ - free_host_realm.c \ - generate_seq_number.c \ - generate_subkey.c \ - get_addrs.c \ - get_cred.c \ - get_default_principal.c \ - get_default_realm.c \ - get_for_creds.c \ - get_host_realm.c \ - get_in_tkt.c \ - get_port.c \ - init_creds.c \ - init_creds_pw.c \ - kcm.c \ - kcm.h \ - keyblock.c \ - keytab.c \ - keytab_any.c \ - keytab_file.c \ - keytab_keyfile.c \ - keytab_memory.c \ - krb5_locl.h \ - krb5-v4compat.h \ - krbhst.c \ - kuserok.c \ - log.c \ - mcache.c \ - misc.c \ - mk_error.c \ - mk_priv.c \ - mk_rep.c \ - mk_req.c \ - mk_req_ext.c \ - mk_safe.c \ - mit_glue.c \ - net_read.c \ - net_write.c \ - n-fold.c \ - pac.c \ - padata.c \ - pkinit.c \ - principal.c \ - prog_setup.c \ - prompter_posix.c \ - rd_cred.c \ - rd_error.c \ - rd_priv.c \ - rd_rep.c \ - rd_req.c \ - rd_safe.c \ - read_message.c \ - recvauth.c \ - replay.c \ - salt.c \ - salt-aes.c \ - salt-arcfour.c \ - salt-des.c \ - salt-des3.c \ - scache.c \ - send_to_kdc.c \ - sendauth.c \ - set_default_realm.c \ - sock_principal.c \ - store.c \ - store-int.c \ - store-int.h \ - store_emem.c \ - store_fd.c \ - store_mem.c \ - pcache.c \ - plugin.c \ - ticket.c \ - time.c \ - transited.c \ - verify_init.c \ - verify_user.c \ - version.c \ - warn.c \ - write_message.c - -$(OBJ)\krb5-protos.h: $(dist_libkrb5_la_SOURCES) - $(PERL) ..\..\cf\make-proto.pl -E KRB5_LIB -q -P remove -o $(OBJ)\krb5-protos.h $(dist_libkrb5_la_SOURCES) || $(RM) -f $(OBJ)\krb5-protos.h - -$(OBJ)\krb5-private.h: $(dist_libkrb5_la_SOURCES) - $(PERL) ..\..\cf\make-proto.pl -q -P remove -p $(OBJ)\krb5-private.h $(dist_libkrb5_la_SOURCES) || $(RM) -f $(OBJ)\krb5-private.h - -$(OBJ)\krb5_err.c $(OBJ)\krb5_err.h: krb5_err.et - cd $(OBJ) - $(BINDIR)\compile_et.exe $(SRCDIR)\krb5_err.et - cd $(SRCDIR) - -$(OBJ)\krb_err.c $(OBJ)\krb_err.h: krb_err.et - cd $(OBJ) - $(BINDIR)\compile_et.exe $(SRCDIR)\krb_err.et - cd $(SRCDIR) - -$(OBJ)\heim_err.c $(OBJ)\heim_err.h: heim_err.et - cd $(OBJ) - $(BINDIR)\compile_et.exe $(SRCDIR)\heim_err.et - cd $(SRCDIR) - -$(OBJ)\k524_err.c $(OBJ)\k524_err.h: k524_err.et - cd $(OBJ) - $(BINDIR)\compile_et.exe $(SRCDIR)\k524_err.et - cd $(SRCDIR) - -#---------------------------------------------------------------------- -# libkrb5 - -$(LIBKRB5): $(libkrb5_OBJS) $(libkrb5_gen_OBJS) - $(LIBCON) - -all:: $(LIBKRB5) - -clean:: - -$(RM) $(LIBKRB5) - -$(OBJ)\libkrb5-exports.def: libkrb5-exports.def.in $(INCDIR)\config.h - $(CPREPROCESSOUT) libkrb5-exports.def.in > $@ || $(RM) $@ - -all:: $(OBJ)\libkrb5-exports.def - -clean:: - -$(RM) $(OBJ)\libkrb5-exports.def - -#---------------------------------------------------------------------- -# librfc3961 - -librfc3961_OBJS=\ - $(OBJ)\crc.obj \ - $(OBJ)\crypto.obj \ - $(OBJ)\crypto-aes.obj \ - $(OBJ)\crypto-algs.obj \ - $(OBJ)\crypto-arcfour.obj \ - $(OBJ)\crypto-des.obj \ - $(OBJ)\crypto-des-common.obj \ - $(OBJ)\crypto-des3.obj \ - $(OBJ)\crypto-evp.obj \ - $(OBJ)\crypto-null.obj \ - $(OBJ)\crypto-pk.obj \ - $(OBJ)\crypto-rand.obj \ - $(OBJ)\crypto-stubs.obj \ - $(OBJ)\data.obj \ - $(OBJ)\error_string.obj \ - $(OBJ)\keyblock.obj \ - $(OBJ)\n-fold.obj \ - $(OBJ)\salt.obj \ - $(OBJ)\salt-aes.obj \ - $(OBJ)\salt-arcfour.obj \ - $(OBJ)\salt-des.obj \ - $(OBJ)\salt-des3.obj \ - $(OBJ)\store-int.obj \ - $(OBJ)\warn.obj - -$(LIBRFC3961): $(librfc3961_OBJS) - $(LIBCON) - -all:: $(LIBRFC3961) - -clean:: - -$(RM) $(LIBRFC3961) - -#---------------------------------------------------------------------- -# Tools - -all-tools:: $(BINDIR)\verify_krb5_conf.exe - -clean:: - -$(RM) $(BINDIR)\verify_krb5_conf.* - -$(BINDIR)\verify_krb5_conf.exe: $(OBJ)\verify_krb5_conf.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS) $(OBJ)\verify_krb5_conf-version.res - $(EXECONLINK) - $(EXEPREP) - -{}.c{$(OBJ)}.obj:: - $(C2OBJ_P) -DBUILD_KRB5_LIB -DASN1_LIB - -{$(OBJ)}.c{$(OBJ)}.obj:: - $(C2OBJ_P) -DBUILD_KRB5_LIB -DASN1_LIB - -#---------------------------------------------------------------------- -# Tests - -test:: test-binaries test-files test-run - -test_binaries = \ - $(OBJ)\aes-test.exe \ - $(OBJ)\derived-key-test.exe \ - $(OBJ)\krbhst-test.exe \ - $(OBJ)\n-fold-test.exe \ - $(OBJ)\parse-name-test.exe \ - $(OBJ)\store-test.exe \ - $(OBJ)\string-to-key-test.exe \ - $(OBJ)\test_acl.exe \ - $(OBJ)\test_addr.exe \ - $(OBJ)\test_alname.exe \ - $(OBJ)\test_cc.exe \ - $(OBJ)\test_config.exe \ - $(OBJ)\test_crypto.exe \ - $(OBJ)\test_crypto_wrapping.exe \ - $(OBJ)\test_forward.exe \ - $(OBJ)\test_get_addrs.exe \ - $(OBJ)\test_hostname.exe \ - $(OBJ)\test_keytab.exe \ - $(OBJ)\test_kuserok.exe \ - $(OBJ)\test_mem.exe \ - $(OBJ)\test_pac.exe \ - $(OBJ)\test_pkinit_dh2key.exe \ - $(OBJ)\test_pknistkdf.exe \ - $(OBJ)\test_plugin.exe \ - $(OBJ)\test_prf.exe \ - $(OBJ)\test_princ.exe \ - $(OBJ)\test_renew.exe \ - $(OBJ)\test_rfc3961.exe \ - $(OBJ)\test_store.exe \ - $(OBJ)\test_time.exe \ - -test-binaries: $(test_binaries) - -test-files: $(OBJ)\test_config_strings.out - -$(OBJ)\test_config_strings.out: test_config_strings.cfg - $(CP) $** $@ - -test-run: - cd $(OBJ) - aes-test.exe - derived-key-test.exe - n-fold-test.exe - parse-name-test.exe - store-test.exe - string-to-key-test.exe - test_acl.exe - test_addr.exe - test_cc.exe - test_config.exe - test_prf.exe - test_store.exe - test_crypto.exe - test_crypto_wrapping.exe - test_keytab.exe - test_mem.exe - test_pac.exe - test_plugin.exe - test_princ.exe - test_pkinit_dh2key.exe - test_pknistkdf.exe - test_time.exe - cd $(SRCDIR) - -$(test_binaries): $$(@R).obj $(LIBHEIMDAL) $(LIBVERS) $(LIBROKEN) - $(EXECONLINK) - $(EXEPREP_NODIST) - -$(OBJ)\test_rfc3961.exe: $(OBJ)\test_rfc3961.obj $(LIBRFC3961) $(LIBHEIMDAL) $(LIBVERS) $(LIBROKEN) - $(EXECONLINK) - $(EXEPREP_NODIST) - -$(test_binaries:.exe=.obj): $$(@B).c - $(C2OBJ_C) -Fo$@ -Fd$(@D)\ $** -DBlah - -test-exports: - $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libkrb5-exports.def.in - -test:: test-exports diff --git a/kerberosV/src/lib/krb5/acache.c b/kerberosV/src/lib/krb5/acache.c deleted file mode 100644 index 19eeecda429..00000000000 --- a/kerberosV/src/lib/krb5/acache.c +++ /dev/null @@ -1,1122 +0,0 @@ -/* - * Copyright (c) 2004 - 2007 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" -#include -#ifdef HAVE_DLFCN_H -#include -#endif - -#ifndef KCM_IS_API_CACHE - -static HEIMDAL_MUTEX acc_mutex = HEIMDAL_MUTEX_INITIALIZER; -static cc_initialize_func init_func; -static void (KRB5_CALLCONV *set_target_uid)(uid_t); -static void (KRB5_CALLCONV *clear_target)(void); - -#ifdef HAVE_DLOPEN -static void *cc_handle; -#endif - -typedef struct krb5_acc { - char *cache_name; - cc_context_t context; - cc_ccache_t ccache; -} krb5_acc; - -static krb5_error_code KRB5_CALLCONV acc_close(krb5_context, krb5_ccache); - -#define ACACHE(X) ((krb5_acc *)(X)->data.data) - -static const struct { - cc_int32 error; - krb5_error_code ret; -} cc_errors[] = { - { ccErrBadName, KRB5_CC_BADNAME }, - { ccErrCredentialsNotFound, KRB5_CC_NOTFOUND }, - { ccErrCCacheNotFound, KRB5_FCC_NOFILE }, - { ccErrContextNotFound, KRB5_CC_NOTFOUND }, - { ccIteratorEnd, KRB5_CC_END }, - { ccErrNoMem, KRB5_CC_NOMEM }, - { ccErrServerUnavailable, KRB5_CC_NOSUPP }, - { ccErrInvalidCCache, KRB5_CC_BADNAME }, - { ccNoError, 0 } -}; - -static krb5_error_code -translate_cc_error(krb5_context context, cc_int32 error) -{ - size_t i; - krb5_clear_error_message(context); - for(i = 0; i < sizeof(cc_errors)/sizeof(cc_errors[0]); i++) - if (cc_errors[i].error == error) - return cc_errors[i].ret; - return KRB5_FCC_INTERNAL; -} - -static krb5_error_code -init_ccapi(krb5_context context) -{ - const char *lib = NULL; - - HEIMDAL_MUTEX_lock(&acc_mutex); - if (init_func) { - HEIMDAL_MUTEX_unlock(&acc_mutex); - if (context) - krb5_clear_error_message(context); - return 0; - } - - if (context) - lib = krb5_config_get_string(context, NULL, - "libdefaults", "ccapi_library", - NULL); - if (lib == NULL) { -#ifdef __APPLE__ - lib = "/System/Library/Frameworks/Kerberos.framework/Kerberos"; -#elif defined(KRB5_USE_PATH_TOKENS) && defined(_WIN32) - lib = "%{LIBDIR}/libkrb5_cc.dll"; -#else - lib = "/usr/lib/libkrb5_cc.so"; -#endif - } - -#ifdef HAVE_DLOPEN - -#ifndef RTLD_LAZY -#define RTLD_LAZY 0 -#endif -#ifndef RTLD_LOCAL -#define RTLD_LOCAL 0 -#endif - -#ifdef KRB5_USE_PATH_TOKENS - { - char * explib = NULL; - if (_krb5_expand_path_tokens(context, lib, &explib) == 0) { - cc_handle = dlopen(explib, RTLD_LAZY|RTLD_LOCAL); - free(explib); - } - } -#else - cc_handle = dlopen(lib, RTLD_LAZY|RTLD_LOCAL); -#endif - - if (cc_handle == NULL) { - HEIMDAL_MUTEX_unlock(&acc_mutex); - if (context) - krb5_set_error_message(context, KRB5_CC_NOSUPP, - N_("Failed to load API cache module %s", "file"), - lib); - return KRB5_CC_NOSUPP; - } - - init_func = (cc_initialize_func)dlsym(cc_handle, "cc_initialize"); - set_target_uid = (void (KRB5_CALLCONV *)(uid_t)) - dlsym(cc_handle, "krb5_ipc_client_set_target_uid"); - clear_target = (void (KRB5_CALLCONV *)(void)) - dlsym(cc_handle, "krb5_ipc_client_clear_target"); - HEIMDAL_MUTEX_unlock(&acc_mutex); - if (init_func == NULL) { - if (context) - krb5_set_error_message(context, KRB5_CC_NOSUPP, - N_("Failed to find cc_initialize" - "in %s: %s", "file, error"), lib, dlerror()); - dlclose(cc_handle); - return KRB5_CC_NOSUPP; - } - - return 0; -#else - HEIMDAL_MUTEX_unlock(&acc_mutex); - if (context) - krb5_set_error_message(context, KRB5_CC_NOSUPP, - N_("no support for shared object", "")); - return KRB5_CC_NOSUPP; -#endif -} - -void -_heim_krb5_ipc_client_set_target_uid(uid_t uid) -{ - init_ccapi(NULL); - if (set_target_uid != NULL) - (*set_target_uid)(uid); -} - -void -_heim_krb5_ipc_client_clear_target(void) -{ - init_ccapi(NULL); - if (clear_target != NULL) - (*clear_target)(); -} - -static krb5_error_code -make_cred_from_ccred(krb5_context context, - const cc_credentials_v5_t *incred, - krb5_creds *cred) -{ - krb5_error_code ret; - unsigned int i; - - memset(cred, 0, sizeof(*cred)); - - ret = krb5_parse_name(context, incred->client, &cred->client); - if (ret) - goto fail; - - ret = krb5_parse_name(context, incred->server, &cred->server); - if (ret) - goto fail; - - cred->session.keytype = incred->keyblock.type; - cred->session.keyvalue.length = incred->keyblock.length; - cred->session.keyvalue.data = malloc(incred->keyblock.length); - if (cred->session.keyvalue.data == NULL) - goto nomem; - memcpy(cred->session.keyvalue.data, incred->keyblock.data, - incred->keyblock.length); - - cred->times.authtime = incred->authtime; - cred->times.starttime = incred->starttime; - cred->times.endtime = incred->endtime; - cred->times.renew_till = incred->renew_till; - - ret = krb5_data_copy(&cred->ticket, - incred->ticket.data, - incred->ticket.length); - if (ret) - goto nomem; - - ret = krb5_data_copy(&cred->second_ticket, - incred->second_ticket.data, - incred->second_ticket.length); - if (ret) - goto nomem; - - cred->authdata.val = NULL; - cred->authdata.len = 0; - - cred->addresses.val = NULL; - cred->addresses.len = 0; - - for (i = 0; incred->authdata && incred->authdata[i]; i++) - ; - - if (i) { - cred->authdata.val = calloc(i, sizeof(cred->authdata.val[0])); - if (cred->authdata.val == NULL) - goto nomem; - cred->authdata.len = i; - for (i = 0; i < cred->authdata.len; i++) { - cred->authdata.val[i].ad_type = incred->authdata[i]->type; - ret = krb5_data_copy(&cred->authdata.val[i].ad_data, - incred->authdata[i]->data, - incred->authdata[i]->length); - if (ret) - goto nomem; - } - } - - for (i = 0; incred->addresses && incred->addresses[i]; i++) - ; - - if (i) { - cred->addresses.val = calloc(i, sizeof(cred->addresses.val[0])); - if (cred->addresses.val == NULL) - goto nomem; - cred->addresses.len = i; - - for (i = 0; i < cred->addresses.len; i++) { - cred->addresses.val[i].addr_type = incred->addresses[i]->type; - ret = krb5_data_copy(&cred->addresses.val[i].address, - incred->addresses[i]->data, - incred->addresses[i]->length); - if (ret) - goto nomem; - } - } - - cred->flags.i = 0; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_FORWARDABLE) - cred->flags.b.forwardable = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_FORWARDED) - cred->flags.b.forwarded = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_PROXIABLE) - cred->flags.b.proxiable = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_PROXY) - cred->flags.b.proxy = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_MAY_POSTDATE) - cred->flags.b.may_postdate = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_POSTDATED) - cred->flags.b.postdated = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_INVALID) - cred->flags.b.invalid = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_RENEWABLE) - cred->flags.b.renewable = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_INITIAL) - cred->flags.b.initial = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_PRE_AUTH) - cred->flags.b.pre_authent = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_HW_AUTH) - cred->flags.b.hw_authent = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_TRANSIT_POLICY_CHECKED) - cred->flags.b.transited_policy_checked = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_OK_AS_DELEGATE) - cred->flags.b.ok_as_delegate = 1; - if (incred->ticket_flags & KRB5_CCAPI_TKT_FLG_ANONYMOUS) - cred->flags.b.anonymous = 1; - - return 0; - -nomem: - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "malloc")); - -fail: - krb5_free_cred_contents(context, cred); - return ret; -} - -static void -free_ccred(cc_credentials_v5_t *cred) -{ - int i; - - if (cred->addresses) { - for (i = 0; cred->addresses[i] != 0; i++) { - if (cred->addresses[i]->data) - free(cred->addresses[i]->data); - free(cred->addresses[i]); - } - free(cred->addresses); - } - if (cred->server) - free(cred->server); - if (cred->client) - free(cred->client); - memset(cred, 0, sizeof(*cred)); -} - -static krb5_error_code -make_ccred_from_cred(krb5_context context, - const krb5_creds *incred, - cc_credentials_v5_t *cred) -{ - krb5_error_code ret; - size_t i; - - memset(cred, 0, sizeof(*cred)); - - ret = krb5_unparse_name(context, incred->client, &cred->client); - if (ret) - goto fail; - - ret = krb5_unparse_name(context, incred->server, &cred->server); - if (ret) - goto fail; - - cred->keyblock.type = incred->session.keytype; - cred->keyblock.length = incred->session.keyvalue.length; - cred->keyblock.data = incred->session.keyvalue.data; - - cred->authtime = incred->times.authtime; - cred->starttime = incred->times.starttime; - cred->endtime = incred->times.endtime; - cred->renew_till = incred->times.renew_till; - - cred->ticket.length = incred->ticket.length; - cred->ticket.data = incred->ticket.data; - - cred->second_ticket.length = incred->second_ticket.length; - cred->second_ticket.data = incred->second_ticket.data; - - /* XXX this one should also be filled in */ - cred->authdata = NULL; - - cred->addresses = calloc(incred->addresses.len + 1, - sizeof(cred->addresses[0])); - if (cred->addresses == NULL) { - - ret = ENOMEM; - goto fail; - } - - for (i = 0; i < incred->addresses.len; i++) { - cc_data *addr; - addr = malloc(sizeof(*addr)); - if (addr == NULL) { - ret = ENOMEM; - goto fail; - } - addr->type = incred->addresses.val[i].addr_type; - addr->length = incred->addresses.val[i].address.length; - addr->data = malloc(addr->length); - if (addr->data == NULL) { - free(addr); - ret = ENOMEM; - goto fail; - } - memcpy(addr->data, incred->addresses.val[i].address.data, - addr->length); - cred->addresses[i] = addr; - } - cred->addresses[i] = NULL; - - cred->ticket_flags = 0; - if (incred->flags.b.forwardable) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_FORWARDABLE; - if (incred->flags.b.forwarded) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_FORWARDED; - if (incred->flags.b.proxiable) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_PROXIABLE; - if (incred->flags.b.proxy) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_PROXY; - if (incred->flags.b.may_postdate) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_MAY_POSTDATE; - if (incred->flags.b.postdated) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_POSTDATED; - if (incred->flags.b.invalid) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_INVALID; - if (incred->flags.b.renewable) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_RENEWABLE; - if (incred->flags.b.initial) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_INITIAL; - if (incred->flags.b.pre_authent) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_PRE_AUTH; - if (incred->flags.b.hw_authent) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_HW_AUTH; - if (incred->flags.b.transited_policy_checked) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_TRANSIT_POLICY_CHECKED; - if (incred->flags.b.ok_as_delegate) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_OK_AS_DELEGATE; - if (incred->flags.b.anonymous) - cred->ticket_flags |= KRB5_CCAPI_TKT_FLG_ANONYMOUS; - - return 0; - -fail: - free_ccred(cred); - - krb5_clear_error_message(context); - return ret; -} - -static cc_int32 -get_cc_name(krb5_acc *a) -{ - cc_string_t name; - cc_int32 error; - - error = (*a->ccache->func->get_name)(a->ccache, &name); - if (error) - return error; - - a->cache_name = strdup(name->data); - (*name->func->release)(name); - if (a->cache_name == NULL) - return ccErrNoMem; - return ccNoError; -} - - -static const char* KRB5_CALLCONV -acc_get_name(krb5_context context, - krb5_ccache id) -{ - krb5_acc *a = ACACHE(id); - int32_t error; - - if (a->cache_name == NULL) { - krb5_error_code ret; - krb5_principal principal; - char *name; - - ret = _krb5_get_default_principal_local(context, &principal); - if (ret) - return NULL; - - ret = krb5_unparse_name(context, principal, &name); - krb5_free_principal(context, principal); - if (ret) - return NULL; - - error = (*a->context->func->create_new_ccache)(a->context, - cc_credentials_v5, - name, - &a->ccache); - krb5_xfree(name); - if (error) - return NULL; - - error = get_cc_name(a); - if (error) - return NULL; - } - - return a->cache_name; -} - -static krb5_error_code KRB5_CALLCONV -acc_alloc(krb5_context context, krb5_ccache *id) -{ - krb5_error_code ret; - cc_int32 error; - krb5_acc *a; - - ret = init_ccapi(context); - if (ret) - return ret; - - ret = krb5_data_alloc(&(*id)->data, sizeof(*a)); - if (ret) { - krb5_clear_error_message(context); - return ret; - } - - a = ACACHE(*id); - - error = (*init_func)(&a->context, ccapi_version_3, NULL, NULL); - if (error) { - krb5_data_free(&(*id)->data); - return translate_cc_error(context, error); - } - - a->cache_name = NULL; - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -acc_resolve(krb5_context context, krb5_ccache *id, const char *res) -{ - krb5_error_code ret; - cc_int32 error; - krb5_acc *a; - - ret = acc_alloc(context, id); - if (ret) - return ret; - - a = ACACHE(*id); - - error = (*a->context->func->open_ccache)(a->context, res, &a->ccache); - if (error == ccNoError) { - cc_time_t offset; - error = get_cc_name(a); - if (error != ccNoError) { - acc_close(context, *id); - *id = NULL; - return translate_cc_error(context, error); - } - - error = (*a->ccache->func->get_kdc_time_offset)(a->ccache, - cc_credentials_v5, - &offset); - if (error == 0) - context->kdc_sec_offset = offset; - - } else if (error == ccErrCCacheNotFound) { - a->ccache = NULL; - a->cache_name = NULL; - } else { - *id = NULL; - return translate_cc_error(context, error); - } - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -acc_gen_new(krb5_context context, krb5_ccache *id) -{ - krb5_error_code ret; - krb5_acc *a; - - ret = acc_alloc(context, id); - if (ret) - return ret; - - a = ACACHE(*id); - - a->ccache = NULL; - a->cache_name = NULL; - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -acc_initialize(krb5_context context, - krb5_ccache id, - krb5_principal primary_principal) -{ - krb5_acc *a = ACACHE(id); - krb5_error_code ret; - int32_t error; - char *name; - - ret = krb5_unparse_name(context, primary_principal, &name); - if (ret) - return ret; - - if (a->cache_name == NULL) { - error = (*a->context->func->create_new_ccache)(a->context, - cc_credentials_v5, - name, - &a->ccache); - free(name); - if (error == ccNoError) - error = get_cc_name(a); - } else { - cc_credentials_iterator_t iter; - cc_credentials_t ccred; - - error = (*a->ccache->func->new_credentials_iterator)(a->ccache, &iter); - if (error) { - free(name); - return translate_cc_error(context, error); - } - - while (1) { - error = (*iter->func->next)(iter, &ccred); - if (error) - break; - (*a->ccache->func->remove_credentials)(a->ccache, ccred); - (*ccred->func->release)(ccred); - } - (*iter->func->release)(iter); - - error = (*a->ccache->func->set_principal)(a->ccache, - cc_credentials_v5, - name); - } - - if (error == 0 && context->kdc_sec_offset) - error = (*a->ccache->func->set_kdc_time_offset)(a->ccache, - cc_credentials_v5, - context->kdc_sec_offset); - - return translate_cc_error(context, error); -} - -static krb5_error_code KRB5_CALLCONV -acc_close(krb5_context context, - krb5_ccache id) -{ - krb5_acc *a = ACACHE(id); - - if (a->ccache) { - (*a->ccache->func->release)(a->ccache); - a->ccache = NULL; - } - if (a->cache_name) { - free(a->cache_name); - a->cache_name = NULL; - } - if (a->context) { - (*a->context->func->release)(a->context); - a->context = NULL; - } - krb5_data_free(&id->data); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -acc_destroy(krb5_context context, - krb5_ccache id) -{ - krb5_acc *a = ACACHE(id); - cc_int32 error = 0; - - if (a->ccache) { - error = (*a->ccache->func->destroy)(a->ccache); - a->ccache = NULL; - } - if (a->context) { - error = (a->context->func->release)(a->context); - a->context = NULL; - } - return translate_cc_error(context, error); -} - -static krb5_error_code KRB5_CALLCONV -acc_store_cred(krb5_context context, - krb5_ccache id, - krb5_creds *creds) -{ - krb5_acc *a = ACACHE(id); - cc_credentials_union cred; - cc_credentials_v5_t v5cred; - krb5_error_code ret; - cc_int32 error; - - if (a->ccache == NULL) { - krb5_set_error_message(context, KRB5_CC_NOTFOUND, - N_("No API credential found", "")); - return KRB5_CC_NOTFOUND; - } - - cred.version = cc_credentials_v5; - cred.credentials.credentials_v5 = &v5cred; - - ret = make_ccred_from_cred(context, - creds, - &v5cred); - if (ret) - return ret; - - error = (*a->ccache->func->store_credentials)(a->ccache, &cred); - if (error) - ret = translate_cc_error(context, error); - - free_ccred(&v5cred); - - return ret; -} - -static krb5_error_code KRB5_CALLCONV -acc_get_principal(krb5_context context, - krb5_ccache id, - krb5_principal *principal) -{ - krb5_acc *a = ACACHE(id); - krb5_error_code ret; - int32_t error; - cc_string_t name; - - if (a->ccache == NULL) { - krb5_set_error_message(context, KRB5_CC_NOTFOUND, - N_("No API credential found", "")); - return KRB5_CC_NOTFOUND; - } - - error = (*a->ccache->func->get_principal)(a->ccache, - cc_credentials_v5, - &name); - if (error) - return translate_cc_error(context, error); - - ret = krb5_parse_name(context, name->data, principal); - - (*name->func->release)(name); - return ret; -} - -static krb5_error_code KRB5_CALLCONV -acc_get_first (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor) -{ - cc_credentials_iterator_t iter; - krb5_acc *a = ACACHE(id); - int32_t error; - - if (a->ccache == NULL) { - krb5_set_error_message(context, KRB5_CC_NOTFOUND, - N_("No API credential found", "")); - return KRB5_CC_NOTFOUND; - } - - error = (*a->ccache->func->new_credentials_iterator)(a->ccache, &iter); - if (error) { - krb5_clear_error_message(context); - return ENOENT; - } - *cursor = iter; - return 0; -} - - -static krb5_error_code KRB5_CALLCONV -acc_get_next (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor, - krb5_creds *creds) -{ - cc_credentials_iterator_t iter = *cursor; - cc_credentials_t cred; - krb5_error_code ret; - int32_t error; - - while (1) { - error = (*iter->func->next)(iter, &cred); - if (error) - return translate_cc_error(context, error); - if (cred->data->version == cc_credentials_v5) - break; - (*cred->func->release)(cred); - } - - ret = make_cred_from_ccred(context, - cred->data->credentials.credentials_v5, - creds); - (*cred->func->release)(cred); - return ret; -} - -static krb5_error_code KRB5_CALLCONV -acc_end_get (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor) -{ - cc_credentials_iterator_t iter = *cursor; - (*iter->func->release)(iter); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -acc_remove_cred(krb5_context context, - krb5_ccache id, - krb5_flags which, - krb5_creds *cred) -{ - cc_credentials_iterator_t iter; - krb5_acc *a = ACACHE(id); - cc_credentials_t ccred; - krb5_error_code ret; - cc_int32 error; - char *client, *server; - - if (a->ccache == NULL) { - krb5_set_error_message(context, KRB5_CC_NOTFOUND, - N_("No API credential found", "")); - return KRB5_CC_NOTFOUND; - } - - if (cred->client) { - ret = krb5_unparse_name(context, cred->client, &client); - if (ret) - return ret; - } else - client = NULL; - - ret = krb5_unparse_name(context, cred->server, &server); - if (ret) { - free(client); - return ret; - } - - error = (*a->ccache->func->new_credentials_iterator)(a->ccache, &iter); - if (error) { - free(server); - free(client); - return translate_cc_error(context, error); - } - - ret = KRB5_CC_NOTFOUND; - while (1) { - cc_credentials_v5_t *v5cred; - - error = (*iter->func->next)(iter, &ccred); - if (error) - break; - - if (ccred->data->version != cc_credentials_v5) - goto next; - - v5cred = ccred->data->credentials.credentials_v5; - - if (client && strcmp(v5cred->client, client) != 0) - goto next; - - if (strcmp(v5cred->server, server) != 0) - goto next; - - (*a->ccache->func->remove_credentials)(a->ccache, ccred); - ret = 0; - next: - (*ccred->func->release)(ccred); - } - - (*iter->func->release)(iter); - - if (ret) - krb5_set_error_message(context, ret, - N_("Can't find credential %s in cache", - "principal"), server); - free(server); - free(client); - - return ret; -} - -static krb5_error_code KRB5_CALLCONV -acc_set_flags(krb5_context context, - krb5_ccache id, - krb5_flags flags) -{ - return 0; -} - -static int KRB5_CALLCONV -acc_get_version(krb5_context context, - krb5_ccache id) -{ - return 0; -} - -struct cache_iter { - cc_context_t context; - cc_ccache_iterator_t iter; -}; - -static krb5_error_code KRB5_CALLCONV -acc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) -{ - struct cache_iter *iter; - krb5_error_code ret; - cc_int32 error; - - ret = init_ccapi(context); - if (ret) - return ret; - - iter = calloc(1, sizeof(*iter)); - if (iter == NULL) { - krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); - return ENOMEM; - } - - error = (*init_func)(&iter->context, ccapi_version_3, NULL, NULL); - if (error) { - free(iter); - return translate_cc_error(context, error); - } - - error = (*iter->context->func->new_ccache_iterator)(iter->context, - &iter->iter); - if (error) { - free(iter); - krb5_clear_error_message(context); - return ENOENT; - } - *cursor = iter; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -acc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) -{ - struct cache_iter *iter = cursor; - cc_ccache_t cache; - krb5_acc *a; - krb5_error_code ret; - int32_t error; - - error = (*iter->iter->func->next)(iter->iter, &cache); - if (error) - return translate_cc_error(context, error); - - ret = _krb5_cc_allocate(context, &krb5_acc_ops, id); - if (ret) { - (*cache->func->release)(cache); - return ret; - } - - ret = acc_alloc(context, id); - if (ret) { - (*cache->func->release)(cache); - free(*id); - return ret; - } - - a = ACACHE(*id); - a->ccache = cache; - - error = get_cc_name(a); - if (error) { - acc_close(context, *id); - *id = NULL; - return translate_cc_error(context, error); - } - return 0; -} - -static krb5_error_code KRB5_CALLCONV -acc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) -{ - struct cache_iter *iter = cursor; - - (*iter->iter->func->release)(iter->iter); - iter->iter = NULL; - (*iter->context->func->release)(iter->context); - iter->context = NULL; - free(iter); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -acc_move(krb5_context context, krb5_ccache from, krb5_ccache to) -{ - krb5_acc *afrom = ACACHE(from); - krb5_acc *ato = ACACHE(to); - int32_t error; - - if (ato->ccache == NULL) { - cc_string_t name; - - error = (*afrom->ccache->func->get_principal)(afrom->ccache, - cc_credentials_v5, - &name); - if (error) - return translate_cc_error(context, error); - - error = (*ato->context->func->create_new_ccache)(ato->context, - cc_credentials_v5, - name->data, - &ato->ccache); - (*name->func->release)(name); - if (error) - return translate_cc_error(context, error); - } - - error = (*ato->ccache->func->move)(afrom->ccache, ato->ccache); - - acc_destroy(context, from); - - return translate_cc_error(context, error); -} - -static krb5_error_code KRB5_CALLCONV -acc_get_default_name(krb5_context context, char **str) -{ - krb5_error_code ret; - cc_context_t cc; - cc_string_t name; - int32_t error; - - ret = init_ccapi(context); - if (ret) - return ret; - - error = (*init_func)(&cc, ccapi_version_3, NULL, NULL); - if (error) - return translate_cc_error(context, error); - - error = (*cc->func->get_default_ccache_name)(cc, &name); - if (error) { - (*cc->func->release)(cc); - return translate_cc_error(context, error); - } - - error = asprintf(str, "API:%s", name->data); - (*name->func->release)(name); - (*cc->func->release)(cc); - - if (error < 0 || *str == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -static krb5_error_code KRB5_CALLCONV -acc_set_default(krb5_context context, krb5_ccache id) -{ - krb5_acc *a = ACACHE(id); - cc_int32 error; - - if (a->ccache == NULL) { - krb5_set_error_message(context, KRB5_CC_NOTFOUND, - N_("No API credential found", "")); - return KRB5_CC_NOTFOUND; - } - - error = (*a->ccache->func->set_default)(a->ccache); - if (error) - return translate_cc_error(context, error); - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -acc_lastchange(krb5_context context, krb5_ccache id, krb5_timestamp *mtime) -{ - krb5_acc *a = ACACHE(id); - cc_int32 error; - cc_time_t t; - - if (a->ccache == NULL) { - krb5_set_error_message(context, KRB5_CC_NOTFOUND, - N_("No API credential found", "")); - return KRB5_CC_NOTFOUND; - } - - error = (*a->ccache->func->get_change_time)(a->ccache, &t); - if (error) - return translate_cc_error(context, error); - - *mtime = t; - - return 0; -} - -/** - * Variable containing the API based credential cache implemention. - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_VARIABLE const krb5_cc_ops krb5_acc_ops = { - KRB5_CC_OPS_VERSION, - "API", - acc_get_name, - acc_resolve, - acc_gen_new, - acc_initialize, - acc_destroy, - acc_close, - acc_store_cred, - NULL, /* acc_retrieve */ - acc_get_principal, - acc_get_first, - acc_get_next, - acc_end_get, - acc_remove_cred, - acc_set_flags, - acc_get_version, - acc_get_cache_first, - acc_get_cache_next, - acc_end_cache_get, - acc_move, - acc_get_default_name, - acc_set_default, - acc_lastchange, - NULL, - NULL, -}; - -#endif diff --git a/kerberosV/src/lib/krb5/acl.c b/kerberosV/src/lib/krb5/acl.c deleted file mode 100644 index c94aae361b8..00000000000 --- a/kerberosV/src/lib/krb5/acl.c +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright (c) 2000 - 2002, 2004 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 "krb5_locl.h" -#include - -struct acl_field { - enum { acl_string, acl_fnmatch, acl_retval } type; - union { - const char *cstr; - char **retv; - } u; - struct acl_field *next, **last; -}; - -static void -free_retv(struct acl_field *acl) -{ - while(acl != NULL) { - if (acl->type == acl_retval) { - if (*acl->u.retv) - free(*acl->u.retv); - *acl->u.retv = NULL; - } - acl = acl->next; - } -} - -static void -acl_free_list(struct acl_field *acl, int retv) -{ - struct acl_field *next; - if (retv) - free_retv(acl); - while(acl != NULL) { - next = acl->next; - free(acl); - acl = next; - } -} - -static krb5_error_code -acl_parse_format(krb5_context context, - struct acl_field **acl_ret, - const char *format, - va_list ap) -{ - const char *p; - struct acl_field *acl = NULL, *tmp; - - for(p = format; *p != '\0'; p++) { - tmp = malloc(sizeof(*tmp)); - if(tmp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - acl_free_list(acl, 0); - return ENOMEM; - } - if(*p == 's') { - tmp->type = acl_string; - tmp->u.cstr = va_arg(ap, const char*); - } else if(*p == 'f') { - tmp->type = acl_fnmatch; - tmp->u.cstr = va_arg(ap, const char*); - } else if(*p == 'r') { - tmp->type = acl_retval; - tmp->u.retv = va_arg(ap, char **); - *tmp->u.retv = NULL; - } else { - krb5_set_error_message(context, EINVAL, - N_("Unknown format specifier %c while " - "parsing ACL", "specifier"), *p); - acl_free_list(acl, 0); - free(tmp); - return EINVAL; - } - tmp->next = NULL; - if(acl == NULL) - acl = tmp; - else - *acl->last = tmp; - acl->last = &tmp->next; - } - *acl_ret = acl; - return 0; -} - -static krb5_boolean -acl_match_field(krb5_context context, - const char *string, - struct acl_field *field) -{ - if(field->type == acl_string) { - return !strcmp(field->u.cstr, string); - } else if(field->type == acl_fnmatch) { - return !fnmatch(field->u.cstr, string, 0); - } else if(field->type == acl_retval) { - *field->u.retv = strdup(string); - return TRUE; - } - return FALSE; -} - -static krb5_boolean -acl_match_acl(krb5_context context, - struct acl_field *acl, - const char *string) -{ - char buf[256]; - while(strsep_copy(&string, " \t", buf, sizeof(buf)) != -1) { - if(buf[0] == '\0') - continue; /* skip ws */ - if (acl == NULL) - return FALSE; - if(!acl_match_field(context, buf, acl)) { - return FALSE; - } - acl = acl->next; - } - if (acl) - return FALSE; - return TRUE; -} - -/** - * krb5_acl_match_string matches ACL format against a string. - * - * The ACL format has three format specifiers: s, f, and r. Each - * specifier will retrieve one argument from the variable arguments - * for either matching or storing data. The input string is split up - * using " " (space) and "\t" (tab) as a delimiter; multiple and "\t" - * in a row are considered to be the same. - * - * List of format specifiers: - * - s Matches a string using strcmp(3) (case sensitive). - * - f Matches the string with fnmatch(3). Theflags - * argument (the last argument) passed to the fnmatch function is 0. - * - r Returns a copy of the string in the char ** passed in; the copy - * must be freed with free(3). There is no need to free(3) the - * string on error: the function will clean up and set the pointer - * to NULL. - * - * @param context Kerberos 5 context - * @param string string to match with - * @param format format to match - * @param ... parameter to format string - * - * @return Return an error code or 0. - * - * - * @code - * char *s; - * - * ret = krb5_acl_match_string(context, "foo", "s", "foo"); - * if (ret) - * krb5_errx(context, 1, "acl didn't match"); - * ret = krb5_acl_match_string(context, "foo foo baz/kaka", - * "ss", "foo", &s, "foo/\\*"); - * if (ret) { - * // no need to free(s) on error - * assert(s == NULL); - * krb5_errx(context, 1, "acl didn't match"); - * } - * free(s); - * @endcode - * - * @sa krb5_acl_match_file - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_acl_match_string(krb5_context context, - const char *string, - const char *format, - ...) -{ - krb5_error_code ret; - krb5_boolean found; - struct acl_field *acl; - - va_list ap; - va_start(ap, format); - ret = acl_parse_format(context, &acl, format, ap); - va_end(ap); - if(ret) - return ret; - - found = acl_match_acl(context, acl, string); - acl_free_list(acl, !found); - if (found) { - return 0; - } else { - krb5_set_error_message(context, EACCES, N_("ACL did not match", "")); - return EACCES; - } -} - -/** - * krb5_acl_match_file matches ACL format against each line in a file - * using krb5_acl_match_string(). Lines starting with # are treated - * like comments and ignored. - * - * @param context Kerberos 5 context. - * @param file file with acl listed in the file. - * @param format format to match. - * @param ... parameter to format string. - * - * @return Return an error code or 0. - * - * @sa krb5_acl_match_string - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_acl_match_file(krb5_context context, - const char *file, - const char *format, - ...) -{ - krb5_error_code ret; - struct acl_field *acl; - char buf[256]; - va_list ap; - FILE *f; - krb5_boolean found; - - f = fopen(file, "r"); - if(f == NULL) { - int save_errno = errno; - rk_strerror_r(save_errno, buf, sizeof(buf)); - krb5_set_error_message(context, save_errno, - N_("open(%s): %s", "file, errno"), - file, buf); - return save_errno; - } - rk_cloexec_file(f); - - va_start(ap, format); - ret = acl_parse_format(context, &acl, format, ap); - va_end(ap); - if(ret) { - fclose(f); - return ret; - } - - found = FALSE; - while(fgets(buf, sizeof(buf), f)) { - if(buf[0] == '#') - continue; - if(acl_match_acl(context, acl, buf)) { - found = TRUE; - break; - } - free_retv(acl); - } - - fclose(f); - acl_free_list(acl, !found); - if (found) { - return 0; - } else { - krb5_set_error_message(context, EACCES, N_("ACL did not match", "")); - return EACCES; - } -} diff --git a/kerberosV/src/lib/krb5/add_et_list.c b/kerberosV/src/lib/krb5/add_et_list.c deleted file mode 100644 index 082014e107a..00000000000 --- a/kerberosV/src/lib/krb5/add_et_list.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. - */ - -#include "krb5_locl.h" - -/** - * Add a specified list of error messages to the et list in context. - * Call func (probably a comerr-generated function) with a pointer to - * the current et_list. - * - * @param context A kerberos context. - * @param func The generated com_err et function. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_add_et_list (krb5_context context, - void (*func)(struct et_list **)) -{ - (*func)(&context->et_list); - return 0; -} diff --git a/kerberosV/src/lib/krb5/addr_families.c b/kerberosV/src/lib/krb5/addr_families.c deleted file mode 100644 index 5d321a7e917..00000000000 --- a/kerberosV/src/lib/krb5/addr_families.c +++ /dev/null @@ -1,1559 +0,0 @@ -/* - * Copyright (c) 1997-2007 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 "krb5_locl.h" - -struct addr_operations { - int af; - krb5_address_type atype; - size_t max_sockaddr_size; - krb5_error_code (*sockaddr2addr)(const struct sockaddr *, krb5_address *); - krb5_error_code (*sockaddr2port)(const struct sockaddr *, int16_t *); - void (*addr2sockaddr)(const krb5_address *, struct sockaddr *, - krb5_socklen_t *sa_size, int port); - void (*h_addr2sockaddr)(const char *, struct sockaddr *, krb5_socklen_t *, int); - krb5_error_code (*h_addr2addr)(const char *, krb5_address *); - krb5_boolean (*uninteresting)(const struct sockaddr *); - krb5_boolean (*is_loopback)(const struct sockaddr *); - void (*anyaddr)(struct sockaddr *, krb5_socklen_t *, int); - int (*print_addr)(const krb5_address *, char *, size_t); - int (*parse_addr)(krb5_context, const char*, krb5_address *); - int (*order_addr)(krb5_context, const krb5_address*, const krb5_address*); - int (*free_addr)(krb5_context, krb5_address*); - int (*copy_addr)(krb5_context, const krb5_address*, krb5_address*); - int (*mask_boundary)(krb5_context, const krb5_address*, unsigned long, - krb5_address*, krb5_address*); -}; - -/* - * AF_INET - aka IPv4 implementation - */ - -static krb5_error_code -ipv4_sockaddr2addr (const struct sockaddr *sa, krb5_address *a) -{ - const struct sockaddr_in *sin4 = (const struct sockaddr_in *)sa; - unsigned char buf[4]; - - a->addr_type = KRB5_ADDRESS_INET; - memcpy (buf, &sin4->sin_addr, 4); - return krb5_data_copy(&a->address, buf, 4); -} - -static krb5_error_code -ipv4_sockaddr2port (const struct sockaddr *sa, int16_t *port) -{ - const struct sockaddr_in *sin4 = (const struct sockaddr_in *)sa; - - *port = sin4->sin_port; - return 0; -} - -static void -ipv4_addr2sockaddr (const krb5_address *a, - struct sockaddr *sa, - krb5_socklen_t *sa_size, - int port) -{ - struct sockaddr_in tmp; - - memset (&tmp, 0, sizeof(tmp)); - tmp.sin_family = AF_INET; - memcpy (&tmp.sin_addr, a->address.data, 4); - tmp.sin_port = port; - memcpy(sa, &tmp, min(sizeof(tmp), *sa_size)); - *sa_size = sizeof(tmp); -} - -static void -ipv4_h_addr2sockaddr(const char *addr, - struct sockaddr *sa, - krb5_socklen_t *sa_size, - int port) -{ - struct sockaddr_in tmp; - - memset (&tmp, 0, sizeof(tmp)); - tmp.sin_family = AF_INET; - tmp.sin_port = port; - tmp.sin_addr = *((const struct in_addr *)addr); - memcpy(sa, &tmp, min(sizeof(tmp), *sa_size)); - *sa_size = sizeof(tmp); -} - -static krb5_error_code -ipv4_h_addr2addr (const char *addr, - krb5_address *a) -{ - unsigned char buf[4]; - - a->addr_type = KRB5_ADDRESS_INET; - memcpy(buf, addr, 4); - return krb5_data_copy(&a->address, buf, 4); -} - -/* - * Are there any addresses that should be considered `uninteresting'? - */ - -static krb5_boolean -ipv4_uninteresting (const struct sockaddr *sa) -{ - const struct sockaddr_in *sin4 = (const struct sockaddr_in *)sa; - - if (sin4->sin_addr.s_addr == INADDR_ANY) - return TRUE; - - return FALSE; -} - -static krb5_boolean -ipv4_is_loopback (const struct sockaddr *sa) -{ - const struct sockaddr_in *sin4 = (const struct sockaddr_in *)sa; - - if ((ntohl(sin4->sin_addr.s_addr) >> 24) == IN_LOOPBACKNET) - return TRUE; - - return FALSE; -} - -static void -ipv4_anyaddr (struct sockaddr *sa, krb5_socklen_t *sa_size, int port) -{ - struct sockaddr_in tmp; - - memset (&tmp, 0, sizeof(tmp)); - tmp.sin_family = AF_INET; - tmp.sin_port = port; - tmp.sin_addr.s_addr = INADDR_ANY; - memcpy(sa, &tmp, min(sizeof(tmp), *sa_size)); - *sa_size = sizeof(tmp); -} - -static int -ipv4_print_addr (const krb5_address *addr, char *str, size_t len) -{ - struct in_addr ia; - - memcpy (&ia, addr->address.data, 4); - - return snprintf (str, len, "IPv4:%s", inet_ntoa(ia)); -} - -static int -ipv4_parse_addr (krb5_context context, const char *address, krb5_address *addr) -{ - const char *p; - struct in_addr a; - - p = strchr(address, ':'); - if(p) { - p++; - if(strncasecmp(address, "ip:", p - address) != 0 && - strncasecmp(address, "ip4:", p - address) != 0 && - strncasecmp(address, "ipv4:", p - address) != 0 && - strncasecmp(address, "inet:", p - address) != 0) - return -1; - } else - p = address; - if(inet_aton(p, &a) == 0) - return -1; - addr->addr_type = KRB5_ADDRESS_INET; - if(krb5_data_alloc(&addr->address, 4) != 0) - return -1; - _krb5_put_int(addr->address.data, ntohl(a.s_addr), addr->address.length); - return 0; -} - -static int -ipv4_mask_boundary(krb5_context context, const krb5_address *inaddr, - unsigned long len, krb5_address *low, krb5_address *high) -{ - unsigned long ia; - uint32_t l, h, m = 0xffffffff; - - if (len > 32) { - krb5_set_error_message(context, KRB5_PROG_ATYPE_NOSUPP, - N_("IPv4 prefix too large (%ld)", "len"), len); - return KRB5_PROG_ATYPE_NOSUPP; - } - m = m << (32 - len); - - _krb5_get_int(inaddr->address.data, &ia, inaddr->address.length); - - l = ia & m; - h = l | ~m; - - low->addr_type = KRB5_ADDRESS_INET; - if(krb5_data_alloc(&low->address, 4) != 0) - return -1; - _krb5_put_int(low->address.data, l, low->address.length); - - high->addr_type = KRB5_ADDRESS_INET; - if(krb5_data_alloc(&high->address, 4) != 0) { - krb5_free_address(context, low); - return -1; - } - _krb5_put_int(high->address.data, h, high->address.length); - - return 0; -} - - -/* - * AF_INET6 - aka IPv6 implementation - */ - -#ifdef HAVE_IPV6 - -static krb5_error_code -ipv6_sockaddr2addr (const struct sockaddr *sa, krb5_address *a) -{ - const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; - - if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { - unsigned char buf[4]; - - a->addr_type = KRB5_ADDRESS_INET; -#ifndef IN6_ADDR_V6_TO_V4 -#ifdef IN6_EXTRACT_V4ADDR -#define IN6_ADDR_V6_TO_V4(x) (&IN6_EXTRACT_V4ADDR(x)) -#else -#define IN6_ADDR_V6_TO_V4(x) ((const struct in_addr *)&(x)->s6_addr[12]) -#endif -#endif - memcpy (buf, IN6_ADDR_V6_TO_V4(&sin6->sin6_addr), 4); - return krb5_data_copy(&a->address, buf, 4); - } else { - a->addr_type = KRB5_ADDRESS_INET6; - return krb5_data_copy(&a->address, - &sin6->sin6_addr, - sizeof(sin6->sin6_addr)); - } -} - -static krb5_error_code -ipv6_sockaddr2port (const struct sockaddr *sa, int16_t *port) -{ - const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; - - *port = sin6->sin6_port; - return 0; -} - -static void -ipv6_addr2sockaddr (const krb5_address *a, - struct sockaddr *sa, - krb5_socklen_t *sa_size, - int port) -{ - struct sockaddr_in6 tmp; - - memset (&tmp, 0, sizeof(tmp)); - tmp.sin6_family = AF_INET6; - memcpy (&tmp.sin6_addr, a->address.data, sizeof(tmp.sin6_addr)); - tmp.sin6_port = port; - memcpy(sa, &tmp, min(sizeof(tmp), *sa_size)); - *sa_size = sizeof(tmp); -} - -static void -ipv6_h_addr2sockaddr(const char *addr, - struct sockaddr *sa, - krb5_socklen_t *sa_size, - int port) -{ - struct sockaddr_in6 tmp; - - memset (&tmp, 0, sizeof(tmp)); - tmp.sin6_family = AF_INET6; - tmp.sin6_port = port; - tmp.sin6_addr = *((const struct in6_addr *)addr); - memcpy(sa, &tmp, min(sizeof(tmp), *sa_size)); - *sa_size = sizeof(tmp); -} - -static krb5_error_code -ipv6_h_addr2addr (const char *addr, - krb5_address *a) -{ - a->addr_type = KRB5_ADDRESS_INET6; - return krb5_data_copy(&a->address, addr, sizeof(struct in6_addr)); -} - -/* - * - */ - -static krb5_boolean -ipv6_uninteresting (const struct sockaddr *sa) -{ - const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; - const struct in6_addr *in6 = (const struct in6_addr *)&sin6->sin6_addr; - - return IN6_IS_ADDR_LINKLOCAL(in6) - || IN6_IS_ADDR_V4COMPAT(in6); -} - -static krb5_boolean -ipv6_is_loopback (const struct sockaddr *sa) -{ - const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; - const struct in6_addr *in6 = (const struct in6_addr *)&sin6->sin6_addr; - - return (IN6_IS_ADDR_LOOPBACK(in6)); -} - -static void -ipv6_anyaddr (struct sockaddr *sa, krb5_socklen_t *sa_size, int port) -{ - struct sockaddr_in6 tmp; - - memset (&tmp, 0, sizeof(tmp)); - tmp.sin6_family = AF_INET6; - tmp.sin6_port = port; - tmp.sin6_addr = in6addr_any; - *sa_size = sizeof(tmp); -} - -static int -ipv6_print_addr (const krb5_address *addr, char *str, size_t len) -{ - char buf[128], buf2[3]; - if(inet_ntop(AF_INET6, addr->address.data, buf, sizeof(buf)) == NULL) - { - /* XXX this is pretty ugly, but better than abort() */ - size_t i; - unsigned char *p = addr->address.data; - buf[0] = '\0'; - for(i = 0; i < addr->address.length; i++) { - snprintf(buf2, sizeof(buf2), "%02x", p[i]); - if(i > 0 && (i & 1) == 0) - strlcat(buf, ":", sizeof(buf)); - strlcat(buf, buf2, sizeof(buf)); - } - } - return snprintf(str, len, "IPv6:%s", buf); -} - -static int -ipv6_parse_addr (krb5_context context, const char *address, krb5_address *addr) -{ - int ret; - struct in6_addr in6; - const char *p; - - p = strchr(address, ':'); - if(p) { - p++; - if(strncasecmp(address, "ip6:", p - address) == 0 || - strncasecmp(address, "ipv6:", p - address) == 0 || - strncasecmp(address, "inet6:", p - address) == 0) - address = p; - } - - ret = inet_pton(AF_INET6, address, &in6.s6_addr); - if(ret == 1) { - addr->addr_type = KRB5_ADDRESS_INET6; - ret = krb5_data_alloc(&addr->address, sizeof(in6.s6_addr)); - if (ret) - return -1; - memcpy(addr->address.data, in6.s6_addr, sizeof(in6.s6_addr)); - return 0; - } - return -1; -} - -static int -ipv6_mask_boundary(krb5_context context, const krb5_address *inaddr, - unsigned long len, krb5_address *low, krb5_address *high) -{ - struct in6_addr addr, laddr, haddr; - uint32_t m; - int i, sub_len; - - if (len > 128) { - krb5_set_error_message(context, KRB5_PROG_ATYPE_NOSUPP, - N_("IPv6 prefix too large (%ld)", "length"), len); - return KRB5_PROG_ATYPE_NOSUPP; - } - - if (inaddr->address.length != sizeof(addr)) { - krb5_set_error_message(context, KRB5_PROG_ATYPE_NOSUPP, - N_("IPv6 addr bad length", "")); - return KRB5_PROG_ATYPE_NOSUPP; - } - - memcpy(&addr, inaddr->address.data, inaddr->address.length); - - for (i = 0; i < 16; i++) { - sub_len = min(8, len); - - m = 0xff << (8 - sub_len); - - laddr.s6_addr[i] = addr.s6_addr[i] & m; - haddr.s6_addr[i] = (addr.s6_addr[i] & m) | ~m; - - if (len > 8) - len -= 8; - else - len = 0; - } - - low->addr_type = KRB5_ADDRESS_INET6; - if (krb5_data_alloc(&low->address, sizeof(laddr.s6_addr)) != 0) - return -1; - memcpy(low->address.data, laddr.s6_addr, sizeof(laddr.s6_addr)); - - high->addr_type = KRB5_ADDRESS_INET6; - if (krb5_data_alloc(&high->address, sizeof(haddr.s6_addr)) != 0) { - krb5_free_address(context, low); - return -1; - } - memcpy(high->address.data, haddr.s6_addr, sizeof(haddr.s6_addr)); - - return 0; -} - -#endif /* IPv6 */ - -#ifndef HEIMDAL_SMALLER - -/* - * table - */ - -#define KRB5_ADDRESS_ARANGE (-100) - -struct arange { - krb5_address low; - krb5_address high; -}; - -static int -arange_parse_addr (krb5_context context, - const char *address, krb5_address *addr) -{ - char buf[1024], *p; - krb5_address low0, high0; - struct arange *a; - krb5_error_code ret; - - if(strncasecmp(address, "RANGE:", 6) != 0) - return -1; - - address += 6; - - p = strrchr(address, '/'); - if (p) { - krb5_addresses addrmask; - char *q; - long num; - - if (strlcpy(buf, address, sizeof(buf)) > sizeof(buf)) - return -1; - buf[p - address] = '\0'; - ret = krb5_parse_address(context, buf, &addrmask); - if (ret) - return ret; - if(addrmask.len != 1) { - krb5_free_addresses(context, &addrmask); - return -1; - } - - address += p - address + 1; - - num = strtol(address, &q, 10); - if (q == address || *q != '\0' || num < 0) { - krb5_free_addresses(context, &addrmask); - return -1; - } - - ret = krb5_address_prefixlen_boundary(context, &addrmask.val[0], num, - &low0, &high0); - krb5_free_addresses(context, &addrmask); - if (ret) - return ret; - - } else { - krb5_addresses low, high; - - strsep_copy(&address, "-", buf, sizeof(buf)); - ret = krb5_parse_address(context, buf, &low); - if(ret) - return ret; - if(low.len != 1) { - krb5_free_addresses(context, &low); - return -1; - } - - strsep_copy(&address, "-", buf, sizeof(buf)); - ret = krb5_parse_address(context, buf, &high); - if(ret) { - krb5_free_addresses(context, &low); - return ret; - } - - if(high.len != 1 && high.val[0].addr_type != low.val[0].addr_type) { - krb5_free_addresses(context, &low); - krb5_free_addresses(context, &high); - return -1; - } - - ret = krb5_copy_address(context, &high.val[0], &high0); - if (ret == 0) { - ret = krb5_copy_address(context, &low.val[0], &low0); - if (ret) - krb5_free_address(context, &high0); - } - krb5_free_addresses(context, &low); - krb5_free_addresses(context, &high); - if (ret) - return ret; - } - - krb5_data_alloc(&addr->address, sizeof(*a)); - addr->addr_type = KRB5_ADDRESS_ARANGE; - a = addr->address.data; - - if(krb5_address_order(context, &low0, &high0) < 0) { - a->low = low0; - a->high = high0; - } else { - a->low = high0; - a->high = low0; - } - return 0; -} - -static int -arange_free (krb5_context context, krb5_address *addr) -{ - struct arange *a; - a = addr->address.data; - krb5_free_address(context, &a->low); - krb5_free_address(context, &a->high); - krb5_data_free(&addr->address); - return 0; -} - - -static int -arange_copy (krb5_context context, const krb5_address *inaddr, - krb5_address *outaddr) -{ - krb5_error_code ret; - struct arange *i, *o; - - outaddr->addr_type = KRB5_ADDRESS_ARANGE; - ret = krb5_data_alloc(&outaddr->address, sizeof(*o)); - if(ret) - return ret; - i = inaddr->address.data; - o = outaddr->address.data; - ret = krb5_copy_address(context, &i->low, &o->low); - if(ret) { - krb5_data_free(&outaddr->address); - return ret; - } - ret = krb5_copy_address(context, &i->high, &o->high); - if(ret) { - krb5_free_address(context, &o->low); - krb5_data_free(&outaddr->address); - return ret; - } - return 0; -} - -static int -arange_print_addr (const krb5_address *addr, char *str, size_t len) -{ - struct arange *a; - krb5_error_code ret; - size_t l, size, ret_len; - - a = addr->address.data; - - l = strlcpy(str, "RANGE:", len); - ret_len = l; - if (l > len) - l = len; - size = l; - - ret = krb5_print_address (&a->low, str + size, len - size, &l); - if (ret) - return ret; - ret_len += l; - if (len - size > l) - size += l; - else - size = len; - - l = strlcat(str + size, "-", len - size); - ret_len += l; - if (len - size > l) - size += l; - else - size = len; - - ret = krb5_print_address (&a->high, str + size, len - size, &l); - if (ret) - return ret; - ret_len += l; - - return ret_len; -} - -static int -arange_order_addr(krb5_context context, - const krb5_address *addr1, - const krb5_address *addr2) -{ - int tmp1, tmp2, sign; - struct arange *a; - const krb5_address *a2; - - if(addr1->addr_type == KRB5_ADDRESS_ARANGE) { - a = addr1->address.data; - a2 = addr2; - sign = 1; - } else if(addr2->addr_type == KRB5_ADDRESS_ARANGE) { - a = addr2->address.data; - a2 = addr1; - sign = -1; - } else { - abort(); - UNREACHABLE(return 0); - } - - if(a2->addr_type == KRB5_ADDRESS_ARANGE) { - struct arange *b = a2->address.data; - tmp1 = krb5_address_order(context, &a->low, &b->low); - if(tmp1 != 0) - return sign * tmp1; - return sign * krb5_address_order(context, &a->high, &b->high); - } else if(a2->addr_type == a->low.addr_type) { - tmp1 = krb5_address_order(context, &a->low, a2); - if(tmp1 > 0) - return sign; - tmp2 = krb5_address_order(context, &a->high, a2); - if(tmp2 < 0) - return -sign; - return 0; - } else { - return sign * (addr1->addr_type - addr2->addr_type); - } -} - -#endif /* HEIMDAL_SMALLER */ - -static int -addrport_print_addr (const krb5_address *addr, char *str, size_t len) -{ - krb5_error_code ret; - krb5_address addr1, addr2; - uint16_t port = 0; - size_t ret_len = 0, l, size = 0; - krb5_storage *sp; - - sp = krb5_storage_from_data((krb5_data*)rk_UNCONST(&addr->address)); - if (sp == NULL) - return ENOMEM; - - /* for totally obscure reasons, these are not in network byteorder */ - krb5_storage_set_byteorder(sp, KRB5_STORAGE_BYTEORDER_LE); - - krb5_storage_seek(sp, 2, SEEK_CUR); /* skip first two bytes */ - krb5_ret_address(sp, &addr1); - - krb5_storage_seek(sp, 2, SEEK_CUR); /* skip two bytes */ - krb5_ret_address(sp, &addr2); - krb5_storage_free(sp); - if(addr2.addr_type == KRB5_ADDRESS_IPPORT && addr2.address.length == 2) { - unsigned long value; - _krb5_get_int(addr2.address.data, &value, 2); - port = value; - } - l = strlcpy(str, "ADDRPORT:", len); - ret_len += l; - if (len > l) - size += l; - else - size = len; - - ret = krb5_print_address(&addr1, str + size, len - size, &l); - if (ret) - return ret; - ret_len += l; - if (len - size > l) - size += l; - else - size = len; - - ret = snprintf(str + size, len - size, ",PORT=%u", port); - if (ret < 0) - return EINVAL; - ret_len += ret; - return ret_len; -} - -static struct addr_operations at[] = { - { - AF_INET, KRB5_ADDRESS_INET, sizeof(struct sockaddr_in), - ipv4_sockaddr2addr, - ipv4_sockaddr2port, - ipv4_addr2sockaddr, - ipv4_h_addr2sockaddr, - ipv4_h_addr2addr, - ipv4_uninteresting, - ipv4_is_loopback, - ipv4_anyaddr, - ipv4_print_addr, - ipv4_parse_addr, - NULL, - NULL, - NULL, - ipv4_mask_boundary - }, -#ifdef HAVE_IPV6 - { - AF_INET6, KRB5_ADDRESS_INET6, sizeof(struct sockaddr_in6), - ipv6_sockaddr2addr, - ipv6_sockaddr2port, - ipv6_addr2sockaddr, - ipv6_h_addr2sockaddr, - ipv6_h_addr2addr, - ipv6_uninteresting, - ipv6_is_loopback, - ipv6_anyaddr, - ipv6_print_addr, - ipv6_parse_addr, - NULL, - NULL, - NULL, - ipv6_mask_boundary - } , -#endif -#ifndef HEIMDAL_SMALLER - /* fake address type */ - { - KRB5_ADDRESS_ARANGE, KRB5_ADDRESS_ARANGE, sizeof(struct arange), - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - arange_print_addr, - arange_parse_addr, - arange_order_addr, - arange_free, - arange_copy, - NULL - }, -#endif - { - KRB5_ADDRESS_ADDRPORT, KRB5_ADDRESS_ADDRPORT, 0, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - addrport_print_addr, - NULL, - NULL, - NULL, - NULL - } -}; - -static int num_addrs = sizeof(at) / sizeof(at[0]); - -static size_t max_sockaddr_size = 0; - -/* - * generic functions - */ - -static struct addr_operations * -find_af(int af) -{ - struct addr_operations *a; - - for (a = at; a < at + num_addrs; ++a) - if (af == a->af) - return a; - return NULL; -} - -static struct addr_operations * -find_atype(krb5_address_type atype) -{ - struct addr_operations *a; - - for (a = at; a < at + num_addrs; ++a) - if (atype == a->atype) - return a; - return NULL; -} - -/** - * krb5_sockaddr2address stores a address a "struct sockaddr" sa in - * the krb5_address addr. - * - * @param context a Keberos context - * @param sa a struct sockaddr to extract the address from - * @param addr an Kerberos 5 address to store the address in. - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sockaddr2address (krb5_context context, - const struct sockaddr *sa, krb5_address *addr) -{ - struct addr_operations *a = find_af(sa->sa_family); - if (a == NULL) { - krb5_set_error_message (context, KRB5_PROG_ATYPE_NOSUPP, - N_("Address family %d not supported", ""), - sa->sa_family); - return KRB5_PROG_ATYPE_NOSUPP; - } - return (*a->sockaddr2addr)(sa, addr); -} - -/** - * krb5_sockaddr2port extracts a port (if possible) from a "struct - * sockaddr. - * - * @param context a Keberos context - * @param sa a struct sockaddr to extract the port from - * @param port a pointer to an int16_t store the port in. - * - * @return Return an error code or 0. Will return - * KRB5_PROG_ATYPE_NOSUPP in case address type is not supported. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sockaddr2port (krb5_context context, - const struct sockaddr *sa, int16_t *port) -{ - struct addr_operations *a = find_af(sa->sa_family); - if (a == NULL) { - krb5_set_error_message (context, KRB5_PROG_ATYPE_NOSUPP, - N_("Address family %d not supported", ""), - sa->sa_family); - return KRB5_PROG_ATYPE_NOSUPP; - } - return (*a->sockaddr2port)(sa, port); -} - -/** - * krb5_addr2sockaddr sets the "struct sockaddr sockaddr" from addr - * and port. The argument sa_size should initially contain the size of - * the sa and after the call, it will contain the actual length of the - * address. In case of the sa is too small to fit the whole address, - * the up to *sa_size will be stored, and then *sa_size will be set to - * the required length. - * - * @param context a Keberos context - * @param addr the address to copy the from - * @param sa the struct sockaddr that will be filled in - * @param sa_size pointer to length of sa, and after the call, it will - * contain the actual length of the address. - * @param port set port in sa. - * - * @return Return an error code or 0. Will return - * KRB5_PROG_ATYPE_NOSUPP in case address type is not supported. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_addr2sockaddr (krb5_context context, - const krb5_address *addr, - struct sockaddr *sa, - krb5_socklen_t *sa_size, - int port) -{ - struct addr_operations *a = find_atype(addr->addr_type); - - if (a == NULL) { - krb5_set_error_message (context, KRB5_PROG_ATYPE_NOSUPP, - N_("Address type %d not supported", - "krb5_address type"), - addr->addr_type); - return KRB5_PROG_ATYPE_NOSUPP; - } - if (a->addr2sockaddr == NULL) { - krb5_set_error_message (context, - KRB5_PROG_ATYPE_NOSUPP, - N_("Can't convert address type %d to sockaddr", ""), - addr->addr_type); - return KRB5_PROG_ATYPE_NOSUPP; - } - (*a->addr2sockaddr)(addr, sa, sa_size, port); - return 0; -} - -/** - * krb5_max_sockaddr_size returns the max size of the .Li struct - * sockaddr that the Kerberos library will return. - * - * @return Return an size_t of the maximum struct sockaddr. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION size_t KRB5_LIB_CALL -krb5_max_sockaddr_size (void) -{ - if (max_sockaddr_size == 0) { - struct addr_operations *a; - - for(a = at; a < at + num_addrs; ++a) - max_sockaddr_size = max(max_sockaddr_size, a->max_sockaddr_size); - } - return max_sockaddr_size; -} - -/** - * krb5_sockaddr_uninteresting returns TRUE for all .Fa sa that the - * kerberos library thinks are uninteresting. One example are link - * local addresses. - * - * @param sa pointer to struct sockaddr that might be interesting. - * - * @return Return a non zero for uninteresting addresses. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_sockaddr_uninteresting(const struct sockaddr *sa) -{ - struct addr_operations *a = find_af(sa->sa_family); - if (a == NULL || a->uninteresting == NULL) - return TRUE; - return (*a->uninteresting)(sa); -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_sockaddr_is_loopback(const struct sockaddr *sa) -{ - struct addr_operations *a = find_af(sa->sa_family); - if (a == NULL || a->is_loopback == NULL) - return TRUE; - return (*a->is_loopback)(sa); -} - -/** - * krb5_h_addr2sockaddr initializes a "struct sockaddr sa" from af and - * the "struct hostent" (see gethostbyname(3) ) h_addr_list - * component. The argument sa_size should initially contain the size - * of the sa, and after the call, it will contain the actual length of - * the address. - * - * @param context a Keberos context - * @param af addresses - * @param addr address - * @param sa returned struct sockaddr - * @param sa_size size of sa - * @param port port to set in sa. - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_h_addr2sockaddr (krb5_context context, - int af, - const char *addr, struct sockaddr *sa, - krb5_socklen_t *sa_size, - int port) -{ - struct addr_operations *a = find_af(af); - if (a == NULL) { - krb5_set_error_message (context, KRB5_PROG_ATYPE_NOSUPP, - "Address family %d not supported", af); - return KRB5_PROG_ATYPE_NOSUPP; - } - (*a->h_addr2sockaddr)(addr, sa, sa_size, port); - return 0; -} - -/** - * krb5_h_addr2addr works like krb5_h_addr2sockaddr with the exception - * that it operates on a krb5_address instead of a struct sockaddr. - * - * @param context a Keberos context - * @param af address family - * @param haddr host address from struct hostent. - * @param addr returned krb5_address. - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_h_addr2addr (krb5_context context, - int af, - const char *haddr, krb5_address *addr) -{ - struct addr_operations *a = find_af(af); - if (a == NULL) { - krb5_set_error_message (context, KRB5_PROG_ATYPE_NOSUPP, - N_("Address family %d not supported", ""), af); - return KRB5_PROG_ATYPE_NOSUPP; - } - return (*a->h_addr2addr)(haddr, addr); -} - -/** - * krb5_anyaddr fills in a "struct sockaddr sa" that can be used to - * bind(2) to. The argument sa_size should initially contain the size - * of the sa, and after the call, it will contain the actual length - * of the address. - * - * @param context a Keberos context - * @param af address family - * @param sa sockaddr - * @param sa_size lenght of sa. - * @param port for to fill into sa. - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_anyaddr (krb5_context context, - int af, - struct sockaddr *sa, - krb5_socklen_t *sa_size, - int port) -{ - struct addr_operations *a = find_af (af); - - if (a == NULL) { - krb5_set_error_message (context, KRB5_PROG_ATYPE_NOSUPP, - N_("Address family %d not supported", ""), af); - return KRB5_PROG_ATYPE_NOSUPP; - } - - (*a->anyaddr)(sa, sa_size, port); - return 0; -} - -/** - * krb5_print_address prints the address in addr to the string string - * that have the length len. If ret_len is not NULL, it will be filled - * with the length of the string if size were unlimited (not including - * the final NUL) . - * - * @param addr address to be printed - * @param str pointer string to print the address into - * @param len length that will fit into area pointed to by "str". - * @param ret_len return length the str. - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_print_address (const krb5_address *addr, - char *str, size_t len, size_t *ret_len) -{ - struct addr_operations *a = find_atype(addr->addr_type); - int ret; - - if (a == NULL || a->print_addr == NULL) { - char *s; - int l; - size_t i; - - s = str; - l = snprintf(s, len, "TYPE_%d:", addr->addr_type); - if (l < 0 || (size_t)l >= len) - return EINVAL; - s += l; - len -= l; - for(i = 0; i < addr->address.length; i++) { - l = snprintf(s, len, "%02x", ((char*)addr->address.data)[i]); - if (l < 0 || (size_t)l >= len) - return EINVAL; - len -= l; - s += l; - } - if(ret_len != NULL) - *ret_len = s - str; - return 0; - } - ret = (*a->print_addr)(addr, str, len); - if (ret < 0) - return EINVAL; - if(ret_len != NULL) - *ret_len = ret; - return 0; -} - -/** - * krb5_parse_address returns the resolved hostname in string to the - * krb5_addresses addresses . - * - * @param context a Keberos context - * @param string - * @param addresses - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_parse_address(krb5_context context, - const char *string, - krb5_addresses *addresses) -{ - int i, n; - struct addrinfo *ai, *a; - int error; - int save_errno; - - addresses->len = 0; - addresses->val = NULL; - - for(i = 0; i < num_addrs; i++) { - if(at[i].parse_addr) { - krb5_address addr; - if((*at[i].parse_addr)(context, string, &addr) == 0) { - ALLOC_SEQ(addresses, 1); - if (addresses->val == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - addresses->val[0] = addr; - return 0; - } - } - } - - error = getaddrinfo (string, NULL, NULL, &ai); - if (error) { - krb5_error_code ret2; - save_errno = errno; - ret2 = krb5_eai_to_heim_errno(error, save_errno); - krb5_set_error_message (context, ret2, "%s: %s", - string, gai_strerror(error)); - return ret2; - } - - n = 0; - for (a = ai; a != NULL; a = a->ai_next) - ++n; - - ALLOC_SEQ(addresses, n); - if (addresses->val == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - freeaddrinfo(ai); - return ENOMEM; - } - - addresses->len = 0; - for (a = ai, i = 0; a != NULL; a = a->ai_next) { - if (krb5_sockaddr2address (context, ai->ai_addr, &addresses->val[i])) - continue; - if(krb5_address_search(context, &addresses->val[i], addresses)) { - krb5_free_address(context, &addresses->val[i]); - continue; - } - i++; - addresses->len = i; - } - freeaddrinfo (ai); - return 0; -} - -/** - * krb5_address_order compares the addresses addr1 and addr2 so that - * it can be used for sorting addresses. If the addresses are the same - * address krb5_address_order will return 0. Behavies like memcmp(2). - * - * @param context a Keberos context - * @param addr1 krb5_address to compare - * @param addr2 krb5_address to compare - * - * @return < 0 if address addr1 in "less" then addr2. 0 if addr1 and - * addr2 is the same address, > 0 if addr2 is "less" then addr1. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_address_order(krb5_context context, - const krb5_address *addr1, - const krb5_address *addr2) -{ - /* this sucks; what if both addresses have order functions, which - should we call? this works for now, though */ - struct addr_operations *a; - a = find_atype(addr1->addr_type); - if(a == NULL) { - krb5_set_error_message (context, KRB5_PROG_ATYPE_NOSUPP, - N_("Address family %d not supported", ""), - addr1->addr_type); - return KRB5_PROG_ATYPE_NOSUPP; - } - if(a->order_addr != NULL) - return (*a->order_addr)(context, addr1, addr2); - a = find_atype(addr2->addr_type); - if(a == NULL) { - krb5_set_error_message (context, KRB5_PROG_ATYPE_NOSUPP, - N_("Address family %d not supported", ""), - addr2->addr_type); - return KRB5_PROG_ATYPE_NOSUPP; - } - if(a->order_addr != NULL) - return (*a->order_addr)(context, addr1, addr2); - - if(addr1->addr_type != addr2->addr_type) - return addr1->addr_type - addr2->addr_type; - if(addr1->address.length != addr2->address.length) - return addr1->address.length - addr2->address.length; - return memcmp (addr1->address.data, - addr2->address.data, - addr1->address.length); -} - -/** - * krb5_address_compare compares the addresses addr1 and addr2. - * Returns TRUE if the two addresses are the same. - * - * @param context a Keberos context - * @param addr1 address to compare - * @param addr2 address to compare - * - * @return Return an TRUE is the address are the same FALSE if not - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_address_compare(krb5_context context, - const krb5_address *addr1, - const krb5_address *addr2) -{ - return krb5_address_order (context, addr1, addr2) == 0; -} - -/** - * krb5_address_search checks if the address addr is a member of the - * address set list addrlist . - * - * @param context a Keberos context. - * @param addr address to search for. - * @param addrlist list of addresses to look in for addr. - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_address_search(krb5_context context, - const krb5_address *addr, - const krb5_addresses *addrlist) -{ - size_t i; - - for (i = 0; i < addrlist->len; ++i) - if (krb5_address_compare (context, addr, &addrlist->val[i])) - return TRUE; - return FALSE; -} - -/** - * krb5_free_address frees the data stored in the address that is - * alloced with any of the krb5_address functions. - * - * @param context a Keberos context - * @param address addresss to be freed. - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_address(krb5_context context, - krb5_address *address) -{ - struct addr_operations *a = find_atype (address->addr_type); - if(a != NULL && a->free_addr != NULL) - return (*a->free_addr)(context, address); - krb5_data_free (&address->address); - memset(address, 0, sizeof(*address)); - return 0; -} - -/** - * krb5_free_addresses frees the data stored in the address that is - * alloced with any of the krb5_address functions. - * - * @param context a Keberos context - * @param addresses addressses to be freed. - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_addresses(krb5_context context, - krb5_addresses *addresses) -{ - size_t i; - for(i = 0; i < addresses->len; i++) - krb5_free_address(context, &addresses->val[i]); - free(addresses->val); - addresses->len = 0; - addresses->val = NULL; - return 0; -} - -/** - * krb5_copy_address copies the content of address - * inaddr to outaddr. - * - * @param context a Keberos context - * @param inaddr pointer to source address - * @param outaddr pointer to destination address - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_address(krb5_context context, - const krb5_address *inaddr, - krb5_address *outaddr) -{ - struct addr_operations *a = find_af (inaddr->addr_type); - if(a != NULL && a->copy_addr != NULL) - return (*a->copy_addr)(context, inaddr, outaddr); - return copy_HostAddress(inaddr, outaddr); -} - -/** - * krb5_copy_addresses copies the content of addresses - * inaddr to outaddr. - * - * @param context a Keberos context - * @param inaddr pointer to source addresses - * @param outaddr pointer to destination addresses - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_addresses(krb5_context context, - const krb5_addresses *inaddr, - krb5_addresses *outaddr) -{ - size_t i; - ALLOC_SEQ(outaddr, inaddr->len); - if(inaddr->len > 0 && outaddr->val == NULL) - return ENOMEM; - for(i = 0; i < inaddr->len; i++) - krb5_copy_address(context, &inaddr->val[i], &outaddr->val[i]); - return 0; -} - -/** - * krb5_append_addresses adds the set of addresses in source to - * dest. While copying the addresses, duplicates are also sorted out. - * - * @param context a Keberos context - * @param dest destination of copy operation - * @param source adresses that are going to be added to dest - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_append_addresses(krb5_context context, - krb5_addresses *dest, - const krb5_addresses *source) -{ - krb5_address *tmp; - krb5_error_code ret; - size_t i; - if(source->len > 0) { - tmp = realloc(dest->val, (dest->len + source->len) * sizeof(*tmp)); - if(tmp == NULL) { - krb5_set_error_message (context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - dest->val = tmp; - for(i = 0; i < source->len; i++) { - /* skip duplicates */ - if(krb5_address_search(context, &source->val[i], dest)) - continue; - ret = krb5_copy_address(context, - &source->val[i], - &dest->val[dest->len]); - if(ret) - return ret; - dest->len++; - } - } - return 0; -} - -/** - * Create an address of type KRB5_ADDRESS_ADDRPORT from (addr, port) - * - * @param context a Keberos context - * @param res built address from addr/port - * @param addr address to use - * @param port port to use - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_make_addrport (krb5_context context, - krb5_address **res, const krb5_address *addr, int16_t port) -{ - krb5_error_code ret; - size_t len = addr->address.length + 2 + 4 * 4; - u_char *p; - - *res = malloc (sizeof(**res)); - if (*res == NULL) { - krb5_set_error_message (context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - (*res)->addr_type = KRB5_ADDRESS_ADDRPORT; - ret = krb5_data_alloc (&(*res)->address, len); - if (ret) { - krb5_set_error_message (context, ret, - N_("malloc: out of memory", "")); - free (*res); - *res = NULL; - return ret; - } - p = (*res)->address.data; - *p++ = 0; - *p++ = 0; - *p++ = (addr->addr_type ) & 0xFF; - *p++ = (addr->addr_type >> 8) & 0xFF; - - *p++ = (addr->address.length ) & 0xFF; - *p++ = (addr->address.length >> 8) & 0xFF; - *p++ = (addr->address.length >> 16) & 0xFF; - *p++ = (addr->address.length >> 24) & 0xFF; - - memcpy (p, addr->address.data, addr->address.length); - p += addr->address.length; - - *p++ = 0; - *p++ = 0; - *p++ = (KRB5_ADDRESS_IPPORT ) & 0xFF; - *p++ = (KRB5_ADDRESS_IPPORT >> 8) & 0xFF; - - *p++ = (2 ) & 0xFF; - *p++ = (2 >> 8) & 0xFF; - *p++ = (2 >> 16) & 0xFF; - *p++ = (2 >> 24) & 0xFF; - - memcpy (p, &port, 2); - - return 0; -} - -/** - * Calculate the boundary addresses of `inaddr'/`prefixlen' and store - * them in `low' and `high'. - * - * @param context a Keberos context - * @param inaddr address in prefixlen that the bondery searched - * @param prefixlen width of boundery - * @param low lowest address - * @param high highest address - * - * @return Return an error code or 0. - * - * @ingroup krb5_address - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_address_prefixlen_boundary(krb5_context context, - const krb5_address *inaddr, - unsigned long prefixlen, - krb5_address *low, - krb5_address *high) -{ - struct addr_operations *a = find_atype (inaddr->addr_type); - if(a != NULL && a->mask_boundary != NULL) - return (*a->mask_boundary)(context, inaddr, prefixlen, low, high); - krb5_set_error_message(context, KRB5_PROG_ATYPE_NOSUPP, - N_("Address family %d doesn't support " - "address mask operation", ""), - inaddr->addr_type); - return KRB5_PROG_ATYPE_NOSUPP; -} diff --git a/kerberosV/src/lib/krb5/aes-test.c b/kerberosV/src/lib/krb5/aes-test.c deleted file mode 100644 index 19b0ddd0750..00000000000 --- a/kerberosV/src/lib/krb5/aes-test.c +++ /dev/null @@ -1,878 +0,0 @@ -/* - * Copyright (c) 2003 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 "krb5_locl.h" -#include -#include -#include - -#ifdef HAVE_OPENSSL -#include -#endif - -static int verbose = 0; - -static void -hex_dump_data(const void *data, size_t length) -{ - char *p; - - hex_encode(data, length, &p); - printf("%s\n", p); - free(p); -} - -struct { - char *password; - char *salt; - int saltlen; - int iterations; - krb5_enctype enctype; - size_t keylen; - char *pbkdf2; - char *key; -} keys[] = { - { - "password", "ATHENA.MIT.EDUraeburn", -1, - 1, - ETYPE_AES128_CTS_HMAC_SHA1_96, 16, - "\xcd\xed\xb5\x28\x1b\xb2\xf8\x01\x56\x5a\x11\x22\xb2\x56\x35\x15", - "\x42\x26\x3c\x6e\x89\xf4\xfc\x28\xb8\xdf\x68\xee\x09\x79\x9f\x15" - }, - { - "password", "ATHENA.MIT.EDUraeburn", -1, - 1, - ETYPE_AES256_CTS_HMAC_SHA1_96, 32, - "\xcd\xed\xb5\x28\x1b\xb2\xf8\x01\x56\x5a\x11\x22\xb2\x56\x35\x15" - "\x0a\xd1\xf7\xa0\x4b\xb9\xf3\xa3\x33\xec\xc0\xe2\xe1\xf7\x08\x37", - "\xfe\x69\x7b\x52\xbc\x0d\x3c\xe1\x44\x32\xba\x03\x6a\x92\xe6\x5b" - "\xbb\x52\x28\x09\x90\xa2\xfa\x27\x88\x39\x98\xd7\x2a\xf3\x01\x61" - }, - { - "password", "ATHENA.MIT.EDUraeburn", -1, - 2, - ETYPE_AES128_CTS_HMAC_SHA1_96, 16, - "\x01\xdb\xee\x7f\x4a\x9e\x24\x3e\x98\x8b\x62\xc7\x3c\xda\x93\x5d", - "\xc6\x51\xbf\x29\xe2\x30\x0a\xc2\x7f\xa4\x69\xd6\x93\xbd\xda\x13" - }, - { - "password", "ATHENA.MIT.EDUraeburn", -1, - 2, - ETYPE_AES256_CTS_HMAC_SHA1_96, 32, - "\x01\xdb\xee\x7f\x4a\x9e\x24\x3e\x98\x8b\x62\xc7\x3c\xda\x93\x5d" - "\xa0\x53\x78\xb9\x32\x44\xec\x8f\x48\xa9\x9e\x61\xad\x79\x9d\x86", - "\xa2\xe1\x6d\x16\xb3\x60\x69\xc1\x35\xd5\xe9\xd2\xe2\x5f\x89\x61" - "\x02\x68\x56\x18\xb9\x59\x14\xb4\x67\xc6\x76\x22\x22\x58\x24\xff" - }, - { - "password", "ATHENA.MIT.EDUraeburn", -1, - 1200, - ETYPE_AES128_CTS_HMAC_SHA1_96, 16, - "\x5c\x08\xeb\x61\xfd\xf7\x1e\x4e\x4e\xc3\xcf\x6b\xa1\xf5\x51\x2b", - "\x4c\x01\xcd\x46\xd6\x32\xd0\x1e\x6d\xbe\x23\x0a\x01\xed\x64\x2a" - }, - { - "password", "ATHENA.MIT.EDUraeburn", -1, - 1200, - ETYPE_AES256_CTS_HMAC_SHA1_96, 32, - "\x5c\x08\xeb\x61\xfd\xf7\x1e\x4e\x4e\xc3\xcf\x6b\xa1\xf5\x51\x2b" - "\xa7\xe5\x2d\xdb\xc5\xe5\x14\x2f\x70\x8a\x31\xe2\xe6\x2b\x1e\x13", - "\x55\xa6\xac\x74\x0a\xd1\x7b\x48\x46\x94\x10\x51\xe1\xe8\xb0\xa7" - "\x54\x8d\x93\xb0\xab\x30\xa8\xbc\x3f\xf1\x62\x80\x38\x2b\x8c\x2a" - }, - { - "password", "\x12\x34\x56\x78\x78\x56\x34\x12", 8, - 5, - ETYPE_AES128_CTS_HMAC_SHA1_96, 16, - "\xd1\xda\xa7\x86\x15\xf2\x87\xe6\xa1\xc8\xb1\x20\xd7\x06\x2a\x49", - "\xe9\xb2\x3d\x52\x27\x37\x47\xdd\x5c\x35\xcb\x55\xbe\x61\x9d\x8e" - }, - { - "password", "\x12\x34\x56\x78\x78\x56\x34\x12", 8, - 5, - ETYPE_AES256_CTS_HMAC_SHA1_96, 32, - "\xd1\xda\xa7\x86\x15\xf2\x87\xe6\xa1\xc8\xb1\x20\xd7\x06\x2a\x49" - "\x3f\x98\xd2\x03\xe6\xbe\x49\xa6\xad\xf4\xfa\x57\x4b\x6e\x64\xee", - "\x97\xa4\xe7\x86\xbe\x20\xd8\x1a\x38\x2d\x5e\xbc\x96\xd5\x90\x9c" - "\xab\xcd\xad\xc8\x7c\xa4\x8f\x57\x45\x04\x15\x9f\x16\xc3\x6e\x31" - }, - { - "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", - "pass phrase equals block size", -1, - 1200, - ETYPE_AES128_CTS_HMAC_SHA1_96, 16, - "\x13\x9c\x30\xc0\x96\x6b\xc3\x2b\xa5\x5f\xdb\xf2\x12\x53\x0a\xc9", - "\x59\xd1\xbb\x78\x9a\x82\x8b\x1a\xa5\x4e\xf9\xc2\x88\x3f\x69\xed" - }, - { - "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", - "pass phrase equals block size", -1, - 1200, - ETYPE_AES256_CTS_HMAC_SHA1_96, 32, - "\x13\x9c\x30\xc0\x96\x6b\xc3\x2b\xa5\x5f\xdb\xf2\x12\x53\x0a\xc9" - "\xc5\xec\x59\xf1\xa4\x52\xf5\xcc\x9a\xd9\x40\xfe\xa0\x59\x8e\xd1", - "\x89\xad\xee\x36\x08\xdb\x8b\xc7\x1f\x1b\xfb\xfe\x45\x94\x86\xb0" - "\x56\x18\xb7\x0c\xba\xe2\x20\x92\x53\x4e\x56\xc5\x53\xba\x4b\x34" - }, - { - "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", - "pass phrase exceeds block size", -1, - 1200, - ETYPE_AES128_CTS_HMAC_SHA1_96, 16, - "\x9c\xca\xd6\xd4\x68\x77\x0c\xd5\x1b\x10\xe6\xa6\x87\x21\xbe\x61", - "\xcb\x80\x05\xdc\x5f\x90\x17\x9a\x7f\x02\x10\x4c\x00\x18\x75\x1d" - }, - { - "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", - "pass phrase exceeds block size", -1, - 1200, - ETYPE_AES256_CTS_HMAC_SHA1_96, 32, - "\x9c\xca\xd6\xd4\x68\x77\x0c\xd5\x1b\x10\xe6\xa6\x87\x21\xbe\x61" - "\x1a\x8b\x4d\x28\x26\x01\xdb\x3b\x36\xbe\x92\x46\x91\x5e\xc8\x2a", - "\xd7\x8c\x5c\x9c\xb8\x72\xa8\xc9\xda\xd4\x69\x7f\x0b\xb5\xb2\xd2" - "\x14\x96\xc8\x2b\xeb\x2c\xae\xda\x21\x12\xfc\xee\xa0\x57\x40\x1b" - - }, - { - "\xf0\x9d\x84\x9e" /* g-clef */, "EXAMPLE.COMpianist", -1, - 50, - ETYPE_AES128_CTS_HMAC_SHA1_96, 16, - "\x6b\x9c\xf2\x6d\x45\x45\x5a\x43\xa5\xb8\xbb\x27\x6a\x40\x3b\x39", - "\xf1\x49\xc1\xf2\xe1\x54\xa7\x34\x52\xd4\x3e\x7f\xe6\x2a\x56\xe5" - }, - { - "\xf0\x9d\x84\x9e" /* g-clef */, "EXAMPLE.COMpianist", -1, - 50, - ETYPE_AES256_CTS_HMAC_SHA1_96, 32, - "\x6b\x9c\xf2\x6d\x45\x45\x5a\x43\xa5\xb8\xbb\x27\x6a\x40\x3b\x39" - "\xe7\xfe\x37\xa0\xc4\x1e\x02\xc2\x81\xff\x30\x69\xe1\xe9\x4f\x52", - "\x4b\x6d\x98\x39\xf8\x44\x06\xdf\x1f\x09\xcc\x16\x6d\xb4\xb8\x3c" - "\x57\x18\x48\xb7\x84\xa3\xd6\xbd\xc3\x46\x58\x9a\x3e\x39\x3f\x9e" - }, - { - "foo", "", -1, - 0, - ETYPE_ARCFOUR_HMAC_MD5, 16, - NULL, - "\xac\x8e\x65\x7f\x83\xdf\x82\xbe\xea\x5d\x43\xbd\xaf\x78\x00\xcc" - }, - { - "test", "", -1, - 0, - ETYPE_ARCFOUR_HMAC_MD5, 16, - NULL, - "\x0c\xb6\x94\x88\x05\xf7\x97\xbf\x2a\x82\x80\x79\x73\xb8\x95\x37" - } -}; - -static int -string_to_key_test(krb5_context context) -{ - krb5_data password, opaque; - krb5_error_code ret; - krb5_salt salt; - int i, val = 0; - char iter[4]; - - for (i = 0; i < sizeof(keys)/sizeof(keys[0]); i++) { - - password.data = keys[i].password; - password.length = strlen(password.data); - - salt.salttype = KRB5_PW_SALT; - salt.saltvalue.data = keys[i].salt; - if (keys[i].saltlen == -1) - salt.saltvalue.length = strlen(salt.saltvalue.data); - else - salt.saltvalue.length = keys[i].saltlen; - - opaque.data = iter; - opaque.length = sizeof(iter); - _krb5_put_int(iter, keys[i].iterations, 4); - - if (keys[i].pbkdf2) { - unsigned char keyout[32]; - - if (keys[i].keylen > sizeof(keyout)) - abort(); - - PKCS5_PBKDF2_HMAC_SHA1(password.data, password.length, - salt.saltvalue.data, salt.saltvalue.length, - keys[i].iterations, - keys[i].keylen, keyout); - - if (memcmp(keyout, keys[i].pbkdf2, keys[i].keylen) != 0) { - krb5_warnx(context, "%d: pbkdf2", i); - val = 1; - continue; - } - - if (verbose) { - printf("PBKDF2:\n"); - hex_dump_data(keyout, keys[i].keylen); - } - } - - { - krb5_keyblock key; - - ret = krb5_string_to_key_data_salt_opaque (context, - keys[i].enctype, - password, - salt, - opaque, - &key); - if (ret) { - krb5_warn(context, ret, "%d: string_to_key_data_salt_opaque", - i); - val = 1; - continue; - } - - if (key.keyvalue.length != keys[i].keylen) { - krb5_warnx(context, "%d: key wrong length (%lu/%lu)", - i, (unsigned long)key.keyvalue.length, - (unsigned long)keys[i].keylen); - val = 1; - continue; - } - - if (memcmp(key.keyvalue.data, keys[i].key, keys[i].keylen) != 0) { - krb5_warnx(context, "%d: key wrong", i); - val = 1; - continue; - } - - if (verbose) { - printf("key:\n"); - hex_dump_data(key.keyvalue.data, key.keyvalue.length); - } - krb5_free_keyblock_contents(context, &key); - } - } - return val; -} - -static int -krb_enc(krb5_context context, - krb5_crypto crypto, - unsigned usage, - krb5_data *cipher, - krb5_data *clear) -{ - krb5_data decrypt; - krb5_error_code ret; - - krb5_data_zero(&decrypt); - - ret = krb5_decrypt(context, - crypto, - usage, - cipher->data, - cipher->length, - &decrypt); - - if (ret) { - krb5_warn(context, ret, "krb5_decrypt"); - return ret; - } - - if (decrypt.length != clear->length || - memcmp(decrypt.data, clear->data, decrypt.length) != 0) { - krb5_warnx(context, "clear text not same"); - return EINVAL; - } - - krb5_data_free(&decrypt); - - return 0; -} - -static int -krb_enc_iov2(krb5_context context, - krb5_crypto crypto, - unsigned usage, - size_t cipher_len, - krb5_data *clear) -{ - krb5_crypto_iov iov[4]; - krb5_data decrypt; - int ret; - char *p, *q; - size_t len, i; - - p = clear->data; - len = clear->length; - - iov[0].flags = KRB5_CRYPTO_TYPE_HEADER; - krb5_crypto_length(context, crypto, iov[0].flags, &iov[0].data.length); - iov[0].data.data = emalloc(iov[0].data.length); - - iov[1].flags = KRB5_CRYPTO_TYPE_DATA; - iov[1].data.length = len; - iov[1].data.data = emalloc(iov[1].data.length); - memcpy(iov[1].data.data, p, iov[1].data.length); - - /* padding buffer */ - iov[2].flags = KRB5_CRYPTO_TYPE_PADDING; - krb5_crypto_length(context, crypto, KRB5_CRYPTO_TYPE_PADDING, &iov[2].data.length); - iov[2].data.data = emalloc(iov[2].data.length); - - iov[3].flags = KRB5_CRYPTO_TYPE_TRAILER; - krb5_crypto_length(context, crypto, iov[3].flags, &iov[3].data.length); - iov[3].data.data = emalloc(iov[3].data.length); - - ret = krb5_encrypt_iov_ivec(context, crypto, usage, - iov, sizeof(iov)/sizeof(iov[0]), NULL); - if (ret) - errx(1, "encrypt iov failed: %d", ret); - - /* check len */ - for (i = 0, len = 0; i < sizeof(iov)/sizeof(iov[0]); i++) - len += iov[i].data.length; - if (len != cipher_len) - errx(1, "cipher len wrong"); - - /* - * Plain decrypt - */ - - p = q = emalloc(len); - for (i = 0; i < sizeof(iov)/sizeof(iov[0]); i++) { - memcpy(q, iov[i].data.data, iov[i].data.length); - q += iov[i].data.length; - } - - ret = krb5_decrypt(context, crypto, usage, p, len, &decrypt); - if (ret) - krb5_err(context, 1, ret, "krb5_decrypt"); - else - krb5_data_free(&decrypt); - - free(p); - - /* - * Now decrypt use iov - */ - - /* padding turn into data */ - p = q = emalloc(iov[1].data.length + iov[2].data.length); - - memcpy(q, iov[1].data.data, iov[1].data.length); - q += iov[1].data.length; - memcpy(q, iov[2].data.data, iov[2].data.length); - - free(iov[1].data.data); - free(iov[2].data.data); - - iov[1].data.data = p; - iov[1].data.length += iov[2].data.length; - - iov[2].flags = KRB5_CRYPTO_TYPE_EMPTY; - iov[2].data.length = 0; - - ret = krb5_decrypt_iov_ivec(context, crypto, usage, - iov, sizeof(iov)/sizeof(iov[0]), NULL); - free(iov[0].data.data); - free(iov[3].data.data); - - if (ret) - krb5_err(context, 1, ret, "decrypt iov failed: %d", ret); - - if (clear->length != iov[1].data.length) - errx(1, "length incorrect"); - - p = clear->data; - if (memcmp(iov[1].data.data, p, iov[1].data.length) != 0) - errx(1, "iov[1] incorrect"); - - free(iov[1].data.data); - - return 0; -} - - -static int -krb_enc_iov(krb5_context context, - krb5_crypto crypto, - unsigned usage, - krb5_data *cipher, - krb5_data *clear) -{ - krb5_crypto_iov iov[3]; - int ret; - char *p; - size_t len; - - p = cipher->data; - len = cipher->length; - - iov[0].flags = KRB5_CRYPTO_TYPE_HEADER; - krb5_crypto_length(context, crypto, iov[0].flags, &iov[0].data.length); - iov[0].data.data = emalloc(iov[0].data.length); - memcpy(iov[0].data.data, p, iov[0].data.length); - p += iov[0].data.length; - len -= iov[0].data.length; - - iov[1].flags = KRB5_CRYPTO_TYPE_TRAILER; - krb5_crypto_length(context, crypto, iov[1].flags, &iov[1].data.length); - iov[1].data.data = emalloc(iov[1].data.length); - memcpy(iov[1].data.data, p + len - iov[1].data.length, iov[1].data.length); - len -= iov[1].data.length; - - iov[2].flags = KRB5_CRYPTO_TYPE_DATA; - iov[2].data.length = len; - iov[2].data.data = emalloc(len); - memcpy(iov[2].data.data, p, len); - - ret = krb5_decrypt_iov_ivec(context, crypto, usage, - iov, sizeof(iov)/sizeof(iov[0]), NULL); - if (ret) - krb5_err(context, 1, ret, "krb_enc_iov decrypt iov failed: %d", ret); - - if (clear->length != iov[2].data.length) - errx(1, "length incorrect"); - - p = clear->data; - if (memcmp(iov[2].data.data, p, iov[2].data.length) != 0) - errx(1, "iov[2] incorrect"); - - free(iov[0].data.data); - free(iov[1].data.data); - free(iov[2].data.data); - - - return 0; -} - -static int -krb_checksum_iov(krb5_context context, - krb5_crypto crypto, - unsigned usage, - krb5_data *plain) -{ - krb5_crypto_iov iov[4]; - int ret; - char *p; - size_t len; - - p = plain->data; - len = plain->length; - - iov[0].flags = KRB5_CRYPTO_TYPE_CHECKSUM; - krb5_crypto_length(context, crypto, iov[0].flags, &iov[0].data.length); - iov[0].data.data = emalloc(iov[0].data.length); - - iov[1].flags = KRB5_CRYPTO_TYPE_DATA; - iov[1].data.length = len; - iov[1].data.data = p; - - iov[2].flags = KRB5_CRYPTO_TYPE_TRAILER; - krb5_crypto_length(context, crypto, iov[0].flags, &iov[2].data.length); - iov[2].data.data = malloc(iov[2].data.length); - - ret = krb5_create_checksum_iov(context, crypto, usage, - iov, sizeof(iov)/sizeof(iov[0]), NULL); - if (ret) - krb5_err(context, 1, ret, "krb5_create_checksum_iov failed"); - - ret = krb5_verify_checksum_iov(context, crypto, usage, iov, sizeof(iov)/sizeof(iov[0]), NULL); - if (ret) - krb5_err(context, 1, ret, "krb5_verify_checksum_iov"); - - free(iov[0].data.data); - free(iov[2].data.data); - - return 0; -} - - -static int -krb_enc_mit(krb5_context context, - krb5_enctype enctype, - krb5_keyblock *key, - unsigned usage, - krb5_data *cipher, - krb5_data *clear) -{ -#ifndef HEIMDAL_SMALLER - krb5_error_code ret; - krb5_enc_data e; - krb5_data decrypt; - size_t len; - - e.kvno = 0; - e.enctype = enctype; - e.ciphertext = *cipher; - - ret = krb5_c_decrypt(context, *key, usage, NULL, &e, &decrypt); - if (ret) - return ret; - - if (decrypt.length != clear->length || - memcmp(decrypt.data, clear->data, decrypt.length) != 0) { - krb5_warnx(context, "clear text not same"); - return EINVAL; - } - - krb5_data_free(&decrypt); - - ret = krb5_c_encrypt_length(context, enctype, clear->length, &len); - if (ret) - return ret; - - if (len != cipher->length) { - krb5_warnx(context, "c_encrypt_length wrong %lu != %lu", - (unsigned long)len, (unsigned long)cipher->length); - return EINVAL; - } -#endif /* HEIMDAL_SMALLER */ - return 0; -} - - -struct { - krb5_enctype enctype; - unsigned usage; - size_t keylen; - void *key; - size_t elen; - void* edata; - size_t plen; - void *pdata; -} krbencs[] = { - { - ETYPE_AES256_CTS_HMAC_SHA1_96, - 7, - 32, - "\x47\x75\x69\x64\x65\x6c\x69\x6e\x65\x73\x20\x74\x6f\x20\x41\x75" - "\x74\x68\x6f\x72\x73\x20\x6f\x66\x20\x49\x6e\x74\x65\x72\x6e\x65", - 44, - "\xcf\x79\x8f\x0d\x76\xf3\xe0\xbe\x8e\x66\x94\x70\xfa\xcc\x9e\x91" - "\xa9\xec\x1c\x5c\x21\xfb\x6e\xef\x1a\x7a\xc8\xc1\xcc\x5a\x95\x24" - "\x6f\x9f\xf4\xd5\xbe\x5d\x59\x97\x44\xd8\x47\xcd", - 16, - "\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x74\x65\x73\x74\x2e\x0a" - } -}; - - -static int -krb_enc_test(krb5_context context) -{ - krb5_error_code ret; - krb5_crypto crypto; - krb5_keyblock kb; - krb5_data cipher, plain; - int i; - - for (i = 0; i < sizeof(krbencs)/sizeof(krbencs[0]); i++) { - - kb.keytype = krbencs[i].enctype; - kb.keyvalue.length = krbencs[i].keylen; - kb.keyvalue.data = krbencs[i].key; - - ret = krb5_crypto_init(context, &kb, krbencs[i].enctype, &crypto); - - cipher.length = krbencs[i].elen; - cipher.data = krbencs[i].edata; - plain.length = krbencs[i].plen; - plain.data = krbencs[i].pdata; - - ret = krb_enc(context, crypto, krbencs[i].usage, &cipher, &plain); - - if (ret) - errx(1, "krb_enc failed with %d for test %d", ret, i); - - ret = krb_enc_iov(context, crypto, krbencs[i].usage, &cipher, &plain); - if (ret) - errx(1, "krb_enc_iov failed with %d for test %d", ret, i); - - ret = krb_enc_iov2(context, crypto, krbencs[i].usage, - cipher.length, &plain); - if (ret) - errx(1, "krb_enc_iov2 failed with %d for test %d", ret, i); - - ret = krb_checksum_iov(context, crypto, krbencs[i].usage, &plain); - if (ret) - errx(1, "krb_checksum_iov failed with %d for test %d", ret, i); - - krb5_crypto_destroy(context, crypto); - - ret = krb_enc_mit(context, krbencs[i].enctype, &kb, - krbencs[i].usage, &cipher, &plain); - if (ret) - errx(1, "krb_enc_mit failed with %d for test %d", ret, i); - } - - return 0; -} - -static int -iov_test(krb5_context context) -{ - krb5_enctype enctype = ENCTYPE_AES256_CTS_HMAC_SHA1_96; - krb5_error_code ret; - krb5_crypto crypto; - krb5_keyblock key; - krb5_data signonly, in, in2; - krb5_crypto_iov iov[6]; - size_t len, i; - unsigned char *base, *p; - - ret = krb5_generate_random_keyblock(context, enctype, &key); - if (ret) - krb5_err(context, 1, ret, "krb5_generate_random_keyblock"); - - ret = krb5_crypto_init(context, &key, 0, &crypto); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_init"); - - - ret = krb5_crypto_length(context, crypto, KRB5_CRYPTO_TYPE_HEADER, &len); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_length"); - - signonly.data = "This should be signed"; - signonly.length = strlen(signonly.data); - in.data = "inputdata"; - in.length = strlen(in.data); - - in2.data = "INPUTDATA"; - in2.length = strlen(in2.data); - - - memset(iov, 0, sizeof(iov)); - - iov[0].flags = KRB5_CRYPTO_TYPE_HEADER; - iov[1].flags = KRB5_CRYPTO_TYPE_DATA; - iov[1].data = in; - iov[2].flags = KRB5_CRYPTO_TYPE_SIGN_ONLY; - iov[2].data = signonly; - iov[3].flags = KRB5_CRYPTO_TYPE_EMPTY; - iov[4].flags = KRB5_CRYPTO_TYPE_PADDING; - iov[5].flags = KRB5_CRYPTO_TYPE_TRAILER; - - ret = krb5_crypto_length_iov(context, crypto, iov, - sizeof(iov)/sizeof(iov[0])); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_length_iov"); - - for (len = 0, i = 0; i < sizeof(iov)/sizeof(iov[0]); i++) { - if (iov[i].flags == KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue; - len += iov[i].data.length; - } - - base = emalloc(len); - - /* - * Allocate data for the fields - */ - - for (p = base, i = 0; i < sizeof(iov)/sizeof(iov[0]); i++) { - if (iov[i].flags == KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue;; - iov[i].data.data = p; - p += iov[i].data.length; - } - assert(iov[1].data.length == in.length); - memcpy(iov[1].data.data, in.data, iov[1].data.length); - - /* - * Encrypt - */ - - ret = krb5_encrypt_iov_ivec(context, crypto, 7, iov, - sizeof(iov)/sizeof(iov[0]), NULL); - if (ret) - krb5_err(context, 1, ret, "krb5_encrypt_iov_ivec"); - - /* - * Decrypt - */ - - ret = krb5_decrypt_iov_ivec(context, crypto, 7, - iov, sizeof(iov)/sizeof(iov[0]), NULL); - if (ret) - krb5_err(context, 1, ret, "krb5_decrypt_iov_ivec"); - - /* - * Verify data - */ - - if (krb5_data_cmp(&iov[1].data, &in) != 0) - krb5_errx(context, 1, "decrypted data not same"); - - /* - * Free memory - */ - - free(base); - - /* Set up for second try */ - - iov[3].flags = KRB5_CRYPTO_TYPE_DATA; - iov[3].data = in; - - ret = krb5_crypto_length_iov(context, crypto, - iov, sizeof(iov)/sizeof(iov[0])); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_length_iov"); - - for (len = 0, i = 0; i < sizeof(iov)/sizeof(iov[0]); i++) { - if (iov[i].flags == KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue; - len += iov[i].data.length; - } - - base = emalloc(len); - - /* - * Allocate data for the fields - */ - - for (p = base, i = 0; i < sizeof(iov)/sizeof(iov[0]); i++) { - if (iov[i].flags == KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue;; - iov[i].data.data = p; - p += iov[i].data.length; - } - assert(iov[1].data.length == in.length); - memcpy(iov[1].data.data, in.data, iov[1].data.length); - - assert(iov[3].data.length == in2.length); - memcpy(iov[3].data.data, in2.data, iov[3].data.length); - - - - /* - * Encrypt - */ - - ret = krb5_encrypt_iov_ivec(context, crypto, 7, - iov, sizeof(iov)/sizeof(iov[0]), NULL); - if (ret) - krb5_err(context, 1, ret, "krb5_encrypt_iov_ivec"); - - /* - * Decrypt - */ - - ret = krb5_decrypt_iov_ivec(context, crypto, 7, - iov, sizeof(iov)/sizeof(iov[0]), NULL); - if (ret) - krb5_err(context, 1, ret, "krb5_decrypt_iov_ivec"); - - /* - * Verify data - */ - - if (krb5_data_cmp(&iov[1].data, &in) != 0) - krb5_errx(context, 1, "decrypted data 2.1 not same"); - - if (krb5_data_cmp(&iov[3].data, &in2) != 0) - krb5_errx(context, 1, "decrypted data 2.2 not same"); - - /* - * Free memory - */ - - free(base); - - krb5_crypto_destroy(context, crypto); - - krb5_free_keyblock_contents(context, &key); - - return 0; -} - - - -static int -random_to_key(krb5_context context) -{ - krb5_error_code ret; - krb5_keyblock key; - - ret = krb5_random_to_key(context, - ETYPE_DES3_CBC_SHA1, - "\x21\x39\x04\x58\x6A\xBD\x7F" - "\x21\x39\x04\x58\x6A\xBD\x7F" - "\x21\x39\x04\x58\x6A\xBD\x7F", - 21, - &key); - if (ret){ - krb5_warn(context, ret, "random_to_key"); - return 1; - } - if (key.keyvalue.length != 24) - return 1; - - if (memcmp(key.keyvalue.data, - "\x20\x38\x04\x58\x6b\xbc\x7f\xc7" - "\x20\x38\x04\x58\x6b\xbc\x7f\xc7" - "\x20\x38\x04\x58\x6b\xbc\x7f\xc7", - 24) != 0) - return 1; - - krb5_free_keyblock_contents(context, &key); - - return 0; -} - -int -main(int argc, char **argv) -{ - krb5_error_code ret; - krb5_context context; - int val = 0; - - ret = krb5_init_context (&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - val |= string_to_key_test(context); - - val |= krb_enc_test(context); - val |= random_to_key(context); - val |= iov_test(context); - - if (verbose && val == 0) - printf("all ok\n"); - if (val) - printf("tests failed\n"); - - krb5_free_context(context); - - return val; -} diff --git a/kerberosV/src/lib/krb5/aname_to_localname.c b/kerberosV/src/lib/krb5/aname_to_localname.c deleted file mode 100644 index 7bfd861da94..00000000000 --- a/kerberosV/src/lib/krb5/aname_to_localname.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 1997 - 1999, 2002 - 2003 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_aname_to_localname (krb5_context context, - krb5_const_principal aname, - size_t lnsize, - char *lname) -{ - krb5_error_code ret; - krb5_realm *lrealms, *r; - int valid; - size_t len; - const char *res; - - ret = krb5_get_default_realms (context, &lrealms); - if (ret) - return ret; - - valid = 0; - for (r = lrealms; *r != NULL; ++r) { - if (strcmp (*r, aname->realm) == 0) { - valid = 1; - break; - } - } - krb5_free_host_realm (context, lrealms); - if (valid == 0) - return KRB5_NO_LOCALNAME; - - if (aname->name.name_string.len == 1) - res = aname->name.name_string.val[0]; - else if (aname->name.name_string.len == 2 - && strcmp (aname->name.name_string.val[1], "root") == 0) { - krb5_principal rootprinc; - krb5_boolean userok; - - res = "root"; - - ret = krb5_copy_principal(context, aname, &rootprinc); - if (ret) - return ret; - - userok = krb5_kuserok(context, rootprinc, res); - krb5_free_principal(context, rootprinc); - if (!userok) - return KRB5_NO_LOCALNAME; - - } else - return KRB5_NO_LOCALNAME; - - len = strlen (res); - if (len >= lnsize) - return ERANGE; - strlcpy (lname, res, lnsize); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/appdefault.c b/kerberosV/src/lib/krb5/appdefault.c deleted file mode 100644 index d4e963d74ab..00000000000 --- a/kerberosV/src/lib/krb5/appdefault.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2000 - 2001 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_appdefault_boolean(krb5_context context, const char *appname, - krb5_const_realm realm, const char *option, - krb5_boolean def_val, krb5_boolean *ret_val) -{ - - if(appname == NULL) - appname = getprogname(); - - def_val = krb5_config_get_bool_default(context, NULL, def_val, - "libdefaults", option, NULL); - if(realm != NULL) - def_val = krb5_config_get_bool_default(context, NULL, def_val, - "realms", realm, option, NULL); - - def_val = krb5_config_get_bool_default(context, NULL, def_val, - "appdefaults", - option, - NULL); - if(realm != NULL) - def_val = krb5_config_get_bool_default(context, NULL, def_val, - "appdefaults", - realm, - option, - NULL); - if(appname != NULL) { - def_val = krb5_config_get_bool_default(context, NULL, def_val, - "appdefaults", - appname, - option, - NULL); - if(realm != NULL) - def_val = krb5_config_get_bool_default(context, NULL, def_val, - "appdefaults", - appname, - realm, - option, - NULL); - } - *ret_val = def_val; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_appdefault_string(krb5_context context, const char *appname, - krb5_const_realm realm, const char *option, - const char *def_val, char **ret_val) -{ - if(appname == NULL) - appname = getprogname(); - - def_val = krb5_config_get_string_default(context, NULL, def_val, - "libdefaults", option, NULL); - if(realm != NULL) - def_val = krb5_config_get_string_default(context, NULL, def_val, - "realms", realm, option, NULL); - - def_val = krb5_config_get_string_default(context, NULL, def_val, - "appdefaults", - option, - NULL); - if(realm != NULL) - def_val = krb5_config_get_string_default(context, NULL, def_val, - "appdefaults", - realm, - option, - NULL); - if(appname != NULL) { - def_val = krb5_config_get_string_default(context, NULL, def_val, - "appdefaults", - appname, - option, - NULL); - if(realm != NULL) - def_val = krb5_config_get_string_default(context, NULL, def_val, - "appdefaults", - appname, - realm, - option, - NULL); - } - if(def_val != NULL) - *ret_val = strdup(def_val); - else - *ret_val = NULL; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_appdefault_time(krb5_context context, const char *appname, - krb5_const_realm realm, const char *option, - time_t def_val, time_t *ret_val) -{ - krb5_deltat t; - char *val; - - krb5_appdefault_string(context, appname, realm, option, NULL, &val); - if (val == NULL) { - *ret_val = def_val; - return; - } - if (krb5_string_to_deltat(val, &t)) - *ret_val = def_val; - else - *ret_val = t; - free(val); -} diff --git a/kerberosV/src/lib/krb5/asn1_glue.c b/kerberosV/src/lib/krb5/asn1_glue.c deleted file mode 100644 index a821faff93e..00000000000 --- a/kerberosV/src/lib/krb5/asn1_glue.c +++ /dev/null @@ -1,72 +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. - */ - -/* - * - */ - -#include "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_principal2principalname (PrincipalName *p, - const krb5_principal from) -{ - return copy_PrincipalName(&from->name, p); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_principalname2krb5_principal (krb5_context context, - krb5_principal *principal, - const PrincipalName from, - const Realm realm) -{ - krb5_error_code ret; - krb5_principal p; - - p = malloc(sizeof(*p)); - if (p == NULL) - return ENOMEM; - ret = copy_PrincipalName(&from, &p->name); - if (ret) { - free(p); - return ret; - } - p->realm = strdup(realm); - if (p->realm == NULL) { - free_PrincipalName(&p->name); - free(p); - return ENOMEM; - } - *principal = p; - return 0; -} diff --git a/kerberosV/src/lib/krb5/auth_context.c b/kerberosV/src/lib/krb5/auth_context.c deleted file mode 100644 index 25ae15cf0f3..00000000000 --- a/kerberosV/src/lib/krb5/auth_context.c +++ /dev/null @@ -1,522 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_init(krb5_context context, - krb5_auth_context *auth_context) -{ - krb5_auth_context p; - - ALLOC(p, 1); - if(!p) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - memset(p, 0, sizeof(*p)); - ALLOC(p->authenticator, 1); - if (!p->authenticator) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(p); - return ENOMEM; - } - memset (p->authenticator, 0, sizeof(*p->authenticator)); - p->flags = KRB5_AUTH_CONTEXT_DO_TIME; - - p->local_address = NULL; - p->remote_address = NULL; - p->local_port = 0; - p->remote_port = 0; - p->keytype = ENCTYPE_NULL; - p->cksumtype = CKSUMTYPE_NONE; - *auth_context = p; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_free(krb5_context context, - krb5_auth_context auth_context) -{ - if (auth_context != NULL) { - krb5_free_authenticator(context, &auth_context->authenticator); - if(auth_context->local_address){ - free_HostAddress(auth_context->local_address); - free(auth_context->local_address); - } - if(auth_context->remote_address){ - free_HostAddress(auth_context->remote_address); - free(auth_context->remote_address); - } - krb5_free_keyblock(context, auth_context->keyblock); - krb5_free_keyblock(context, auth_context->remote_subkey); - krb5_free_keyblock(context, auth_context->local_subkey); - free (auth_context); - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setflags(krb5_context context, - krb5_auth_context auth_context, - int32_t flags) -{ - auth_context->flags = flags; - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getflags(krb5_context context, - krb5_auth_context auth_context, - int32_t *flags) -{ - *flags = auth_context->flags; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_addflags(krb5_context context, - krb5_auth_context auth_context, - int32_t addflags, - int32_t *flags) -{ - if (flags) - *flags = auth_context->flags; - auth_context->flags |= addflags; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_removeflags(krb5_context context, - krb5_auth_context auth_context, - int32_t removeflags, - int32_t *flags) -{ - if (flags) - *flags = auth_context->flags; - auth_context->flags &= ~removeflags; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setaddrs(krb5_context context, - krb5_auth_context auth_context, - krb5_address *local_addr, - krb5_address *remote_addr) -{ - if (local_addr) { - if (auth_context->local_address) - krb5_free_address (context, auth_context->local_address); - else - if ((auth_context->local_address = malloc(sizeof(krb5_address))) == NULL) - return ENOMEM; - krb5_copy_address(context, local_addr, auth_context->local_address); - } - if (remote_addr) { - if (auth_context->remote_address) - krb5_free_address (context, auth_context->remote_address); - else - if ((auth_context->remote_address = malloc(sizeof(krb5_address))) == NULL) - return ENOMEM; - krb5_copy_address(context, remote_addr, auth_context->remote_address); - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_genaddrs(krb5_context context, - krb5_auth_context auth_context, - krb5_socket_t fd, int flags) -{ - krb5_error_code ret; - krb5_address local_k_address, remote_k_address; - krb5_address *lptr = NULL, *rptr = NULL; - struct sockaddr_storage ss_local, ss_remote; - struct sockaddr *local = (struct sockaddr *)&ss_local; - struct sockaddr *remote = (struct sockaddr *)&ss_remote; - socklen_t len; - - if(flags & KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR) { - if (auth_context->local_address == NULL) { - len = sizeof(ss_local); - if(rk_IS_SOCKET_ERROR(getsockname(fd, local, &len))) { - char buf[128]; - ret = rk_SOCK_ERRNO; - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message(context, ret, "getsockname: %s", buf); - goto out; - } - ret = krb5_sockaddr2address (context, local, &local_k_address); - if(ret) goto out; - if(flags & KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR) { - krb5_sockaddr2port (context, local, &auth_context->local_port); - } else - auth_context->local_port = 0; - lptr = &local_k_address; - } - } - if(flags & KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR) { - len = sizeof(ss_remote); - if(rk_IS_SOCKET_ERROR(getpeername(fd, remote, &len))) { - char buf[128]; - ret = rk_SOCK_ERRNO; - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message(context, ret, "getpeername: %s", buf); - goto out; - } - ret = krb5_sockaddr2address (context, remote, &remote_k_address); - if(ret) goto out; - if(flags & KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR) { - krb5_sockaddr2port (context, remote, &auth_context->remote_port); - } else - auth_context->remote_port = 0; - rptr = &remote_k_address; - } - ret = krb5_auth_con_setaddrs (context, - auth_context, - lptr, - rptr); - out: - if (lptr) - krb5_free_address (context, lptr); - if (rptr) - krb5_free_address (context, rptr); - return ret; - -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setaddrs_from_fd (krb5_context context, - krb5_auth_context auth_context, - void *p_fd) -{ - krb5_socket_t fd = *(krb5_socket_t *)p_fd; - int flags = 0; - if(auth_context->local_address == NULL) - flags |= KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR; - if(auth_context->remote_address == NULL) - flags |= KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR; - return krb5_auth_con_genaddrs(context, auth_context, fd, flags); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getaddrs(krb5_context context, - krb5_auth_context auth_context, - krb5_address **local_addr, - krb5_address **remote_addr) -{ - if(*local_addr) - krb5_free_address (context, *local_addr); - *local_addr = malloc (sizeof(**local_addr)); - if (*local_addr == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - krb5_copy_address(context, - auth_context->local_address, - *local_addr); - - if(*remote_addr) - krb5_free_address (context, *remote_addr); - *remote_addr = malloc (sizeof(**remote_addr)); - if (*remote_addr == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - krb5_free_address (context, *local_addr); - *local_addr = NULL; - return ENOMEM; - } - krb5_copy_address(context, - auth_context->remote_address, - *remote_addr); - return 0; -} - -/* coverity[+alloc : arg-*2] */ -static krb5_error_code -copy_key(krb5_context context, - krb5_keyblock *in, - krb5_keyblock **out) -{ - if(in) - return krb5_copy_keyblock(context, in, out); - *out = NULL; /* is this right? */ - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getkey(krb5_context context, - krb5_auth_context auth_context, - krb5_keyblock **keyblock) -{ - return copy_key(context, auth_context->keyblock, keyblock); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getlocalsubkey(krb5_context context, - krb5_auth_context auth_context, - krb5_keyblock **keyblock) -{ - return copy_key(context, auth_context->local_subkey, keyblock); -} - -/* coverity[+alloc : arg-*2] */ -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getremotesubkey(krb5_context context, - krb5_auth_context auth_context, - krb5_keyblock **keyblock) -{ - return copy_key(context, auth_context->remote_subkey, keyblock); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setkey(krb5_context context, - krb5_auth_context auth_context, - krb5_keyblock *keyblock) -{ - if(auth_context->keyblock) - krb5_free_keyblock(context, auth_context->keyblock); - return copy_key(context, keyblock, &auth_context->keyblock); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setlocalsubkey(krb5_context context, - krb5_auth_context auth_context, - krb5_keyblock *keyblock) -{ - if(auth_context->local_subkey) - krb5_free_keyblock(context, auth_context->local_subkey); - return copy_key(context, keyblock, &auth_context->local_subkey); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_generatelocalsubkey(krb5_context context, - krb5_auth_context auth_context, - krb5_keyblock *key) -{ - krb5_error_code ret; - krb5_keyblock *subkey; - - ret = krb5_generate_subkey_extended (context, key, - auth_context->keytype, - &subkey); - if(ret) - return ret; - if(auth_context->local_subkey) - krb5_free_keyblock(context, auth_context->local_subkey); - auth_context->local_subkey = subkey; - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setremotesubkey(krb5_context context, - krb5_auth_context auth_context, - krb5_keyblock *keyblock) -{ - if(auth_context->remote_subkey) - krb5_free_keyblock(context, auth_context->remote_subkey); - return copy_key(context, keyblock, &auth_context->remote_subkey); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setcksumtype(krb5_context context, - krb5_auth_context auth_context, - krb5_cksumtype cksumtype) -{ - auth_context->cksumtype = cksumtype; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getcksumtype(krb5_context context, - krb5_auth_context auth_context, - krb5_cksumtype *cksumtype) -{ - *cksumtype = auth_context->cksumtype; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setkeytype (krb5_context context, - krb5_auth_context auth_context, - krb5_keytype keytype) -{ - auth_context->keytype = keytype; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getkeytype (krb5_context context, - krb5_auth_context auth_context, - krb5_keytype *keytype) -{ - *keytype = auth_context->keytype; - return 0; -} - -#if 0 -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setenctype(krb5_context context, - krb5_auth_context auth_context, - krb5_enctype etype) -{ - if(auth_context->keyblock) - krb5_free_keyblock(context, auth_context->keyblock); - ALLOC(auth_context->keyblock, 1); - if(auth_context->keyblock == NULL) - return ENOMEM; - auth_context->keyblock->keytype = etype; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getenctype(krb5_context context, - krb5_auth_context auth_context, - krb5_enctype *etype) -{ - krb5_abortx(context, "unimplemented krb5_auth_getenctype called"); -} -#endif - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getlocalseqnumber(krb5_context context, - krb5_auth_context auth_context, - int32_t *seqnumber) -{ - *seqnumber = auth_context->local_seqnumber; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setlocalseqnumber (krb5_context context, - krb5_auth_context auth_context, - int32_t seqnumber) -{ - auth_context->local_seqnumber = seqnumber; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getremoteseqnumber(krb5_context context, - krb5_auth_context auth_context, - int32_t *seqnumber) -{ - *seqnumber = auth_context->remote_seqnumber; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setremoteseqnumber (krb5_context context, - krb5_auth_context auth_context, - int32_t seqnumber) -{ - auth_context->remote_seqnumber = seqnumber; - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getauthenticator(krb5_context context, - krb5_auth_context auth_context, - krb5_authenticator *authenticator) -{ - *authenticator = malloc(sizeof(**authenticator)); - if (*authenticator == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - copy_Authenticator(auth_context->authenticator, - *authenticator); - return 0; -} - - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_authenticator(krb5_context context, - krb5_authenticator *authenticator) -{ - free_Authenticator (*authenticator); - free (*authenticator); - *authenticator = NULL; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setuserkey(krb5_context context, - krb5_auth_context auth_context, - krb5_keyblock *keyblock) -{ - if(auth_context->keyblock) - krb5_free_keyblock(context, auth_context->keyblock); - return krb5_copy_keyblock(context, keyblock, &auth_context->keyblock); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getrcache(krb5_context context, - krb5_auth_context auth_context, - krb5_rcache *rcache) -{ - *rcache = auth_context->rcache; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setrcache(krb5_context context, - krb5_auth_context auth_context, - krb5_rcache rcache) -{ - auth_context->rcache = rcache; - return 0; -} - -#if 0 /* not implemented */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_initivector(krb5_context context, - krb5_auth_context auth_context) -{ - krb5_abortx(context, "unimplemented krb5_auth_con_initivector called"); -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setivector(krb5_context context, - krb5_auth_context auth_context, - krb5_pointer ivector) -{ - krb5_abortx(context, "unimplemented krb5_auth_con_setivector called"); -} - -#endif /* not implemented */ diff --git a/kerberosV/src/lib/krb5/build_ap_req.c b/kerberosV/src/lib/krb5/build_ap_req.c deleted file mode 100644 index d56a0a194e1..00000000000 --- a/kerberosV/src/lib/krb5/build_ap_req.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_build_ap_req (krb5_context context, - krb5_enctype enctype, - krb5_creds *cred, - krb5_flags ap_options, - krb5_data authenticator, - krb5_data *retdata) -{ - krb5_error_code ret = 0; - AP_REQ ap; - Ticket t; - size_t len; - - ap.pvno = 5; - ap.msg_type = krb_ap_req; - memset(&ap.ap_options, 0, sizeof(ap.ap_options)); - ap.ap_options.use_session_key = (ap_options & AP_OPTS_USE_SESSION_KEY) > 0; - ap.ap_options.mutual_required = (ap_options & AP_OPTS_MUTUAL_REQUIRED) > 0; - - ap.ticket.tkt_vno = 5; - copy_Realm(&cred->server->realm, &ap.ticket.realm); - copy_PrincipalName(&cred->server->name, &ap.ticket.sname); - - decode_Ticket(cred->ticket.data, cred->ticket.length, &t, &len); - copy_EncryptedData(&t.enc_part, &ap.ticket.enc_part); - free_Ticket(&t); - - ap.authenticator.etype = enctype; - ap.authenticator.kvno = NULL; - ap.authenticator.cipher = authenticator; - - ASN1_MALLOC_ENCODE(AP_REQ, retdata->data, retdata->length, - &ap, &len, ret); - if(ret == 0 && retdata->length != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - free_AP_REQ(&ap); - return ret; - -} diff --git a/kerberosV/src/lib/krb5/build_auth.c b/kerberosV/src/lib/krb5/build_auth.c deleted file mode 100644 index 01145a28c60..00000000000 --- a/kerberosV/src/lib/krb5/build_auth.c +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright (c) 1997 - 2003 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 "krb5_locl.h" - -static krb5_error_code -make_etypelist(krb5_context context, - krb5_authdata **auth_data) -{ - EtypeList etypes; - krb5_error_code ret; - krb5_authdata ad; - u_char *buf; - size_t len = 0; - size_t buf_size; - - ret = _krb5_init_etype(context, KRB5_PDU_NONE, - &etypes.len, &etypes.val, - NULL); - if (ret) - return ret; - - ASN1_MALLOC_ENCODE(EtypeList, buf, buf_size, &etypes, &len, ret); - if (ret) { - free_EtypeList(&etypes); - return ret; - } - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - free_EtypeList(&etypes); - - ALLOC_SEQ(&ad, 1); - if (ad.val == NULL) { - free(buf); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - ad.val[0].ad_type = KRB5_AUTHDATA_GSS_API_ETYPE_NEGOTIATION; - ad.val[0].ad_data.length = len; - ad.val[0].ad_data.data = buf; - - ASN1_MALLOC_ENCODE(AD_IF_RELEVANT, buf, buf_size, &ad, &len, ret); - if (ret) { - free_AuthorizationData(&ad); - return ret; - } - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - free_AuthorizationData(&ad); - - ALLOC(*auth_data, 1); - if (*auth_data == NULL) { - free(buf); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - ALLOC_SEQ(*auth_data, 1); - if ((*auth_data)->val == NULL) { - free(*auth_data); - free(buf); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - (*auth_data)->val[0].ad_type = KRB5_AUTHDATA_IF_RELEVANT; - (*auth_data)->val[0].ad_data.length = len; - (*auth_data)->val[0].ad_data.data = buf; - - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_build_authenticator (krb5_context context, - krb5_auth_context auth_context, - krb5_enctype enctype, - krb5_creds *cred, - Checksum *cksum, - krb5_data *result, - krb5_key_usage usage) -{ - Authenticator auth; - u_char *buf = NULL; - size_t buf_size; - size_t len = 0; - krb5_error_code ret; - krb5_crypto crypto; - - memset(&auth, 0, sizeof(auth)); - - auth.authenticator_vno = 5; - copy_Realm(&cred->client->realm, &auth.crealm); - copy_PrincipalName(&cred->client->name, &auth.cname); - - krb5_us_timeofday (context, &auth.ctime, &auth.cusec); - - ret = krb5_auth_con_getlocalsubkey(context, auth_context, &auth.subkey); - if(ret) - goto fail; - - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { - if(auth_context->local_seqnumber == 0) - krb5_generate_seq_number (context, - &cred->session, - &auth_context->local_seqnumber); - ALLOC(auth.seq_number, 1); - if(auth.seq_number == NULL) { - ret = ENOMEM; - goto fail; - } - *auth.seq_number = auth_context->local_seqnumber; - } else - auth.seq_number = NULL; - auth.authorization_data = NULL; - - if (cksum) { - ALLOC(auth.cksum, 1); - if (auth.cksum == NULL) { - ret = ENOMEM; - goto fail; - } - ret = copy_Checksum(cksum, auth.cksum); - if (ret) - goto fail; - - if (auth.cksum->cksumtype == CKSUMTYPE_GSSAPI) { - /* - * This is not GSS-API specific, we only enable it for - * GSS for now - */ - ret = make_etypelist(context, &auth.authorization_data); - if (ret) - goto fail; - } - } - - /* XXX - Copy more to auth_context? */ - - auth_context->authenticator->ctime = auth.ctime; - auth_context->authenticator->cusec = auth.cusec; - - ASN1_MALLOC_ENCODE(Authenticator, buf, buf_size, &auth, &len, ret); - if (ret) - goto fail; - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - ret = krb5_crypto_init(context, &cred->session, enctype, &crypto); - if (ret) - goto fail; - ret = krb5_encrypt (context, - crypto, - usage /* KRB5_KU_AP_REQ_AUTH */, - buf, - len, - result); - krb5_crypto_destroy(context, crypto); - - if (ret) - goto fail; - - fail: - free_Authenticator (&auth); - free (buf); - - return ret; -} diff --git a/kerberosV/src/lib/krb5/cache.c b/kerberosV/src/lib/krb5/cache.c deleted file mode 100644 index 88040cbc6f3..00000000000 --- a/kerberosV/src/lib/krb5/cache.c +++ /dev/null @@ -1,1763 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" - -/** - * @page krb5_ccache_intro The credential cache functions - * @section section_krb5_ccache Kerberos credential caches - * - * krb5_ccache structure holds a Kerberos credential cache. - * - * Heimdal support the follow types of credential caches: - * - * - SCC - * Store the credential in a database - * - FILE - * Store the credential in memory - * - MEMORY - * Store the credential in memory - * - API - * A credential cache server based solution for Mac OS X - * - KCM - * A credential cache server based solution for all platforms - * - * @subsection Example - * - * This is a minimalistic version of klist: -@code -#include - -int -main (int argc, char **argv) -{ - krb5_context context; - krb5_cc_cursor cursor; - krb5_error_code ret; - krb5_ccache id; - krb5_creds creds; - - if (krb5_init_context (&context) != 0) - errx(1, "krb5_context"); - - ret = krb5_cc_default (context, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_default"); - - ret = krb5_cc_start_seq_get(context, id, &cursor); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_start_seq_get"); - - while((ret = krb5_cc_next_cred(context, id, &cursor, &creds)) == 0){ - char *principal; - - krb5_unparse_name(context, creds.server, &principal); - printf("principal: %s\\n", principal); - free(principal); - krb5_free_cred_contents (context, &creds); - } - ret = krb5_cc_end_seq_get(context, id, &cursor); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_end_seq_get"); - - krb5_cc_close(context, id); - - krb5_free_context(context); - return 0; -} -* @endcode -*/ - -/** - * Add a new ccache type with operations `ops', overwriting any - * existing one if `override'. - * - * @param context a Keberos context - * @param ops type of plugin symbol - * @param override flag to select if the registration is to overide - * an existing ops with the same name. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_register(krb5_context context, - const krb5_cc_ops *ops, - krb5_boolean override) -{ - int i; - - for(i = 0; i < context->num_cc_ops && context->cc_ops[i]->prefix; i++) { - if(strcmp(context->cc_ops[i]->prefix, ops->prefix) == 0) { - if(!override) { - krb5_set_error_message(context, - KRB5_CC_TYPE_EXISTS, - N_("cache type %s already exists", "type"), - ops->prefix); - return KRB5_CC_TYPE_EXISTS; - } - break; - } - } - if(i == context->num_cc_ops) { - const krb5_cc_ops **o = realloc(rk_UNCONST(context->cc_ops), - (context->num_cc_ops + 1) * - sizeof(context->cc_ops[0])); - if(o == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - context->cc_ops = o; - context->cc_ops[context->num_cc_ops] = NULL; - context->num_cc_ops++; - } - context->cc_ops[i] = ops; - return 0; -} - -/* - * Allocate the memory for a `id' and the that function table to - * `ops'. Returns 0 or and error code. - */ - -krb5_error_code -_krb5_cc_allocate(krb5_context context, - const krb5_cc_ops *ops, - krb5_ccache *id) -{ - krb5_ccache p; - - p = malloc (sizeof(*p)); - if(p == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - p->ops = ops; - *id = p; - - return 0; -} - -/* - * Allocate memory for a new ccache in `id' with operations `ops' - * and name `residual'. Return 0 or an error code. - */ - -static krb5_error_code -allocate_ccache (krb5_context context, - const krb5_cc_ops *ops, - const char *residual, - krb5_ccache *id) -{ - krb5_error_code ret; -#ifdef KRB5_USE_PATH_TOKENS - char * exp_residual = NULL; - - ret = _krb5_expand_path_tokens(context, residual, &exp_residual); - if (ret) - return ret; - - residual = exp_residual; -#endif - - ret = _krb5_cc_allocate(context, ops, id); - if (ret) { -#ifdef KRB5_USE_PATH_TOKENS - if (exp_residual) - free(exp_residual); -#endif - return ret; - } - - ret = (*id)->ops->resolve(context, id, residual); - if(ret) { - free(*id); - *id = NULL; - } - -#ifdef KRB5_USE_PATH_TOKENS - if (exp_residual) - free(exp_residual); -#endif - - return ret; -} - -static int -is_possible_path_name(const char * name) -{ - const char * colon; - - if ((colon = strchr(name, ':')) == NULL) - return TRUE; - -#ifdef _WIN32 - /* :\path\to\cache ? */ - - if (colon == name + 1 && - strchr(colon + 1, ':') == NULL) - return TRUE; -#endif - - return FALSE; -} - -/** - * Find and allocate a ccache in `id' from the specification in `residual'. - * If the ccache name doesn't contain any colon, interpret it as a file name. - * - * @param context a Keberos context. - * @param name string name of a credential cache. - * @param id return pointer to a found credential cache. - * - * @return Return 0 or an error code. In case of an error, id is set - * to NULL, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_resolve(krb5_context context, - const char *name, - krb5_ccache *id) -{ - int i; - - *id = NULL; - - for(i = 0; i < context->num_cc_ops && context->cc_ops[i]->prefix; i++) { - size_t prefix_len = strlen(context->cc_ops[i]->prefix); - - if(strncmp(context->cc_ops[i]->prefix, name, prefix_len) == 0 - && name[prefix_len] == ':') { - return allocate_ccache (context, context->cc_ops[i], - name + prefix_len + 1, - id); - } - } - if (is_possible_path_name(name)) - return allocate_ccache (context, &krb5_fcc_ops, name, id); - else { - krb5_set_error_message(context, KRB5_CC_UNKNOWN_TYPE, - N_("unknown ccache type %s", "name"), name); - return KRB5_CC_UNKNOWN_TYPE; - } -} - -/** - * Generates a new unique ccache of `type` in `id'. If `type' is NULL, - * the library chooses the default credential cache type. The supplied - * `hint' (that can be NULL) is a string that the credential cache - * type can use to base the name of the credential on, this is to make - * it easier for the user to differentiate the credentials. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_new_unique(krb5_context context, const char *type, - const char *hint, krb5_ccache *id) -{ - const krb5_cc_ops *ops; - krb5_error_code ret; - - ops = krb5_cc_get_prefix_ops(context, type); - if (ops == NULL) { - krb5_set_error_message(context, KRB5_CC_UNKNOWN_TYPE, - "Credential cache type %s is unknown", type); - return KRB5_CC_UNKNOWN_TYPE; - } - - ret = _krb5_cc_allocate(context, ops, id); - if (ret) - return ret; - ret = (*id)->ops->gen_new(context, id); - if (ret) { - free(*id); - *id = NULL; - } - return ret; -} - -/** - * Return the name of the ccache `id' - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_cc_get_name(krb5_context context, - krb5_ccache id) -{ - return id->ops->get_name(context, id); -} - -/** - * Return the type of the ccache `id'. - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_cc_get_type(krb5_context context, - krb5_ccache id) -{ - return id->ops->prefix; -} - -/** - * Return the complete resolvable name the cache - - * @param context a Keberos context - * @param id return pointer to a found credential cache - * @param str the returned name of a credential cache, free with krb5_xfree() - * - * @return Returns 0 or an error (and then *str is set to NULL). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_full_name(krb5_context context, - krb5_ccache id, - char **str) -{ - const char *type, *name; - - *str = NULL; - - type = krb5_cc_get_type(context, id); - if (type == NULL) { - krb5_set_error_message(context, KRB5_CC_UNKNOWN_TYPE, - "cache have no name of type"); - return KRB5_CC_UNKNOWN_TYPE; - } - - name = krb5_cc_get_name(context, id); - if (name == NULL) { - krb5_set_error_message(context, KRB5_CC_BADNAME, - "cache of type %s have no name", type); - return KRB5_CC_BADNAME; - } - - if (asprintf(str, "%s:%s", type, name) == -1) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - *str = NULL; - return ENOMEM; - } - return 0; -} - -/** - * Return krb5_cc_ops of a the ccache `id'. - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION const krb5_cc_ops * KRB5_LIB_CALL -krb5_cc_get_ops(krb5_context context, krb5_ccache id) -{ - return id->ops; -} - -/* - * Expand variables in `str' into `res' - */ - -krb5_error_code -_krb5_expand_default_cc_name(krb5_context context, const char *str, char **res) -{ - return _krb5_expand_path_tokens(context, str, res); -} - -/* - * Return non-zero if envirnoment that will determine default krb5cc - * name has changed. - */ - -static int -environment_changed(krb5_context context) -{ - const char *e; - - /* if the cc name was set, don't change it */ - if (context->default_cc_name_set) - return 0; - - /* XXX performance: always ask KCM/API if default name has changed */ - if (context->default_cc_name && - (strncmp(context->default_cc_name, "KCM:", 4) == 0 || - strncmp(context->default_cc_name, "API:", 4) == 0)) - return 1; - - if(issuid()) - return 0; - - e = getenv("KRB5CCNAME"); - if (e == NULL) { - if (context->default_cc_name_env) { - free(context->default_cc_name_env); - context->default_cc_name_env = NULL; - return 1; - } - } else { - if (context->default_cc_name_env == NULL) - return 1; - if (strcmp(e, context->default_cc_name_env) != 0) - return 1; - } - return 0; -} - -/** - * Switch the default default credential cache for a specific - * credcache type (and name for some implementations). - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_switch(krb5_context context, krb5_ccache id) -{ -#ifdef _WIN32 - _krb5_set_default_cc_name_to_registry(context, id); -#endif - - if (id->ops->set_default == NULL) - return 0; - - return (*id->ops->set_default)(context, id); -} - -/** - * Return true if the default credential cache support switch - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_cc_support_switch(krb5_context context, const char *type) -{ - const krb5_cc_ops *ops; - - ops = krb5_cc_get_prefix_ops(context, type); - if (ops && ops->set_default) - return 1; - return FALSE; -} - -/** - * Set the default cc name for `context' to `name'. - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_set_default_name(krb5_context context, const char *name) -{ - krb5_error_code ret = 0; - char *p = NULL, *exp_p = NULL; - - if (name == NULL) { - const char *e = NULL; - - if(!issuid()) { - e = getenv("KRB5CCNAME"); - if (e) { - p = strdup(e); - if (context->default_cc_name_env) - free(context->default_cc_name_env); - context->default_cc_name_env = strdup(e); - } - } - -#ifdef _WIN32 - if (e == NULL) { - e = p = _krb5_get_default_cc_name_from_registry(context); - } -#endif - if (e == NULL) { - e = krb5_config_get_string(context, NULL, "libdefaults", - "default_cc_name", NULL); - if (e) { - ret = _krb5_expand_default_cc_name(context, e, &p); - if (ret) - return ret; - } - if (e == NULL) { - const krb5_cc_ops *ops = KRB5_DEFAULT_CCTYPE; - e = krb5_config_get_string(context, NULL, "libdefaults", - "default_cc_type", NULL); - if (e) { - ops = krb5_cc_get_prefix_ops(context, e); - if (ops == NULL) { - krb5_set_error_message(context, - KRB5_CC_UNKNOWN_TYPE, - "Credential cache type %s " - "is unknown", e); - return KRB5_CC_UNKNOWN_TYPE; - } - } - ret = (*ops->get_default_name)(context, &p); - if (ret) - return ret; - } - } - context->default_cc_name_set = 0; - } else { - p = strdup(name); - context->default_cc_name_set = 1; - } - - if (p == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = _krb5_expand_path_tokens(context, p, &exp_p); - free(p); - if (ret) - return ret; - - if (context->default_cc_name) - free(context->default_cc_name); - - context->default_cc_name = exp_p; - - return 0; -} - -/** - * Return a pointer to a context static string containing the default - * ccache name. - * - * @return String to the default credential cache name. - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_cc_default_name(krb5_context context) -{ - if (context->default_cc_name == NULL || environment_changed(context)) - krb5_cc_set_default_name(context, NULL); - - return context->default_cc_name; -} - -/** - * Open the default ccache in `id'. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_default(krb5_context context, - krb5_ccache *id) -{ - const char *p = krb5_cc_default_name(context); - - if (p == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return krb5_cc_resolve(context, p, id); -} - -/** - * Create a new ccache in `id' for `primary_principal'. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_initialize(krb5_context context, - krb5_ccache id, - krb5_principal primary_principal) -{ - return (*id->ops->init)(context, id, primary_principal); -} - - -/** - * Remove the ccache `id'. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_destroy(krb5_context context, - krb5_ccache id) -{ - krb5_error_code ret; - - ret = (*id->ops->destroy)(context, id); - krb5_cc_close (context, id); - return ret; -} - -/** - * Stop using the ccache `id' and free the related resources. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_close(krb5_context context, - krb5_ccache id) -{ - krb5_error_code ret; - ret = (*id->ops->close)(context, id); - free(id); - return ret; -} - -/** - * Store `creds' in the ccache `id'. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_store_cred(krb5_context context, - krb5_ccache id, - krb5_creds *creds) -{ - return (*id->ops->store)(context, id, creds); -} - -/** - * Retrieve the credential identified by `mcreds' (and `whichfields') - * from `id' in `creds'. 'creds' must be free by the caller using - * krb5_free_cred_contents. - * - * @param context A Kerberos 5 context - * @param id a Kerberos 5 credential cache - * @param whichfields what fields to use for matching credentials, same - * flags as whichfields in krb5_compare_creds() - * @param mcreds template credential to use for comparing - * @param creds returned credential, free with krb5_free_cred_contents() - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_retrieve_cred(krb5_context context, - krb5_ccache id, - krb5_flags whichfields, - const krb5_creds *mcreds, - krb5_creds *creds) -{ - krb5_error_code ret; - krb5_cc_cursor cursor; - - if (id->ops->retrieve != NULL) { - return (*id->ops->retrieve)(context, id, whichfields, - mcreds, creds); - } - - ret = krb5_cc_start_seq_get(context, id, &cursor); - if (ret) - return ret; - while((ret = krb5_cc_next_cred(context, id, &cursor, creds)) == 0){ - if(krb5_compare_creds(context, whichfields, mcreds, creds)){ - ret = 0; - break; - } - krb5_free_cred_contents (context, creds); - } - krb5_cc_end_seq_get(context, id, &cursor); - return ret; -} - -/** - * Return the principal of `id' in `principal'. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_principal(krb5_context context, - krb5_ccache id, - krb5_principal *principal) -{ - return (*id->ops->get_princ)(context, id, principal); -} - -/** - * Start iterating over `id', `cursor' is initialized to the - * beginning. Caller must free the cursor with krb5_cc_end_seq_get(). - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_start_seq_get (krb5_context context, - const krb5_ccache id, - krb5_cc_cursor *cursor) -{ - return (*id->ops->get_first)(context, id, cursor); -} - -/** - * Retrieve the next cred pointed to by (`id', `cursor') in `creds' - * and advance `cursor'. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_next_cred (krb5_context context, - const krb5_ccache id, - krb5_cc_cursor *cursor, - krb5_creds *creds) -{ - return (*id->ops->get_next)(context, id, cursor, creds); -} - -/** - * Destroy the cursor `cursor'. - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_end_seq_get (krb5_context context, - const krb5_ccache id, - krb5_cc_cursor *cursor) -{ - return (*id->ops->end_get)(context, id, cursor); -} - -/** - * Remove the credential identified by `cred', `which' from `id'. - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_remove_cred(krb5_context context, - krb5_ccache id, - krb5_flags which, - krb5_creds *cred) -{ - if(id->ops->remove_cred == NULL) { - krb5_set_error_message(context, - EACCES, - "ccache %s does not support remove_cred", - id->ops->prefix); - return EACCES; /* XXX */ - } - return (*id->ops->remove_cred)(context, id, which, cred); -} - -/** - * Set the flags of `id' to `flags'. - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_set_flags(krb5_context context, - krb5_ccache id, - krb5_flags flags) -{ - return (*id->ops->set_flags)(context, id, flags); -} - -/** - * Get the flags of `id', store them in `flags'. - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_flags(krb5_context context, - krb5_ccache id, - krb5_flags *flags) -{ - *flags = 0; - return 0; -} - -/** - * Copy the contents of `from' to `to' if the given match function - * return true. - * - * @param context A Kerberos 5 context. - * @param from the cache to copy data from. - * @param to the cache to copy data to. - * @param match a match function that should return TRUE if cred argument should be copied, if NULL, all credentials are copied. - * @param matchctx context passed to match function. - * @param matched set to true if there was a credential that matched, may be NULL. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_copy_match_f(krb5_context context, - const krb5_ccache from, - krb5_ccache to, - krb5_boolean (*match)(krb5_context, void *, const krb5_creds *), - void *matchctx, - unsigned int *matched) -{ - krb5_error_code ret; - krb5_cc_cursor cursor; - krb5_creds cred; - krb5_principal princ; - - if (matched) - *matched = 0; - - ret = krb5_cc_get_principal(context, from, &princ); - if (ret) - return ret; - ret = krb5_cc_initialize(context, to, princ); - if (ret) { - krb5_free_principal(context, princ); - return ret; - } - ret = krb5_cc_start_seq_get(context, from, &cursor); - if (ret) { - krb5_free_principal(context, princ); - return ret; - } - - while ((ret = krb5_cc_next_cred(context, from, &cursor, &cred)) == 0) { - if (match == NULL || (*match)(context, matchctx, &cred) == 0) { - if (matched) - (*matched)++; - ret = krb5_cc_store_cred(context, to, &cred); - if (ret) - break; - } - krb5_free_cred_contents(context, &cred); - } - krb5_cc_end_seq_get(context, from, &cursor); - krb5_free_principal(context, princ); - if (ret == KRB5_CC_END) - ret = 0; - return ret; -} - -/** - * Just like krb5_cc_copy_match_f(), but copy everything. - * - * @ingroup @krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_copy_cache(krb5_context context, - const krb5_ccache from, - krb5_ccache to) -{ - return krb5_cc_copy_match_f(context, from, to, NULL, NULL, NULL); -} - -/** - * Return the version of `id'. - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_version(krb5_context context, - const krb5_ccache id) -{ - if(id->ops->get_version) - return (*id->ops->get_version)(context, id); - else - return 0; -} - -/** - * Clear `mcreds' so it can be used with krb5_cc_retrieve_cred - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_cc_clear_mcred(krb5_creds *mcred) -{ - memset(mcred, 0, sizeof(*mcred)); -} - -/** - * Get the cc ops that is registered in `context' to handle the - * prefix. prefix can be a complete credential cache name or a - * prefix, the function will only use part up to the first colon (:) - * if there is one. If prefix the argument is NULL, the default ccache - * implemtation is returned. - * - * @return Returns NULL if ops not found. - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION const krb5_cc_ops * KRB5_LIB_CALL -krb5_cc_get_prefix_ops(krb5_context context, const char *prefix) -{ - char *p, *p1; - int i; - - if (prefix == NULL) - return KRB5_DEFAULT_CCTYPE; - if (prefix[0] == '/') - return &krb5_fcc_ops; - - p = strdup(prefix); - if (p == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return NULL; - } - p1 = strchr(p, ':'); - if (p1) - *p1 = '\0'; - - for(i = 0; i < context->num_cc_ops && context->cc_ops[i]->prefix; i++) { - if(strcmp(context->cc_ops[i]->prefix, p) == 0) { - free(p); - return context->cc_ops[i]; - } - } - free(p); - return NULL; -} - -struct krb5_cc_cache_cursor_data { - const krb5_cc_ops *ops; - krb5_cc_cursor cursor; -}; - -/** - * Start iterating over all caches of specified type. See also - * krb5_cccol_cursor_new(). - - * @param context A Kerberos 5 context - * @param type optional type to iterate over, if NULL, the default cache is used. - * @param cursor cursor should be freed with krb5_cc_cache_end_seq_get(). - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_cache_get_first (krb5_context context, - const char *type, - krb5_cc_cache_cursor *cursor) -{ - const krb5_cc_ops *ops; - krb5_error_code ret; - - if (type == NULL) - type = krb5_cc_default_name(context); - - ops = krb5_cc_get_prefix_ops(context, type); - if (ops == NULL) { - krb5_set_error_message(context, KRB5_CC_UNKNOWN_TYPE, - "Unknown type \"%s\" when iterating " - "trying to iterate the credential caches", type); - return KRB5_CC_UNKNOWN_TYPE; - } - - if (ops->get_cache_first == NULL) { - krb5_set_error_message(context, KRB5_CC_NOSUPP, - N_("Credential cache type %s doesn't support " - "iterations over caches", "type"), - ops->prefix); - return KRB5_CC_NOSUPP; - } - - *cursor = calloc(1, sizeof(**cursor)); - if (*cursor == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - (*cursor)->ops = ops; - - ret = ops->get_cache_first(context, &(*cursor)->cursor); - if (ret) { - free(*cursor); - *cursor = NULL; - } - return ret; -} - -/** - * Retrieve the next cache pointed to by (`cursor') in `id' - * and advance `cursor'. - * - * @param context A Kerberos 5 context - * @param cursor the iterator cursor, returned by krb5_cc_cache_get_first() - * @param id next ccache - * - * @return Return 0 or an error code. Returns KRB5_CC_END when the end - * of caches is reached, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_cache_next (krb5_context context, - krb5_cc_cache_cursor cursor, - krb5_ccache *id) -{ - return cursor->ops->get_cache_next(context, cursor->cursor, id); -} - -/** - * Destroy the cursor `cursor'. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_cache_end_seq_get (krb5_context context, - krb5_cc_cache_cursor cursor) -{ - krb5_error_code ret; - ret = cursor->ops->end_cache_get(context, cursor->cursor); - cursor->ops = NULL; - free(cursor); - return ret; -} - -/** - * Search for a matching credential cache that have the - * `principal' as the default principal. On success, `id' needs to be - * freed with krb5_cc_close() or krb5_cc_destroy(). - * - * @param context A Kerberos 5 context - * @param client The principal to search for - * @param id the returned credential cache - * - * @return On failure, error code is returned and `id' is set to NULL. - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_cache_match (krb5_context context, - krb5_principal client, - krb5_ccache *id) -{ - krb5_cccol_cursor cursor; - krb5_error_code ret; - krb5_ccache cache = NULL; - - *id = NULL; - - ret = krb5_cccol_cursor_new (context, &cursor); - if (ret) - return ret; - - while (krb5_cccol_cursor_next (context, cursor, &cache) == 0 && cache != NULL) { - krb5_principal principal; - - ret = krb5_cc_get_principal(context, cache, &principal); - if (ret == 0) { - krb5_boolean match; - - match = krb5_principal_compare(context, principal, client); - krb5_free_principal(context, principal); - if (match) - break; - } - - krb5_cc_close(context, cache); - cache = NULL; - } - - krb5_cccol_cursor_free(context, &cursor); - - if (cache == NULL) { - char *str; - - krb5_unparse_name(context, client, &str); - - krb5_set_error_message(context, KRB5_CC_NOTFOUND, - N_("Principal %s not found in any " - "credential cache", ""), - str ? str : ""); - if (str) - free(str); - return KRB5_CC_NOTFOUND; - } - *id = cache; - - return 0; -} - -/** - * Move the content from one credential cache to another. The - * operation is an atomic switch. - * - * @param context a Keberos context - * @param from the credential cache to move the content from - * @param to the credential cache to move the content to - - * @return On sucess, from is freed. On failure, error code is - * returned and from and to are both still allocated, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_move(krb5_context context, krb5_ccache from, krb5_ccache to) -{ - krb5_error_code ret; - - if (strcmp(from->ops->prefix, to->ops->prefix) != 0) { - krb5_set_error_message(context, KRB5_CC_NOSUPP, - N_("Moving credentials between diffrent " - "types not yet supported", "")); - return KRB5_CC_NOSUPP; - } - - ret = (*to->ops->move)(context, from, to); - if (ret == 0) { - memset(from, 0, sizeof(*from)); - free(from); - } - return ret; -} - -#define KRB5_CONF_NAME "krb5_ccache_conf_data" -#define KRB5_REALM_NAME "X-CACHECONF:" - -static krb5_error_code -build_conf_principals(krb5_context context, krb5_ccache id, - krb5_const_principal principal, - const char *name, krb5_creds *cred) -{ - krb5_principal client; - krb5_error_code ret; - char *pname = NULL; - - memset(cred, 0, sizeof(*cred)); - - ret = krb5_cc_get_principal(context, id, &client); - if (ret) - return ret; - - if (principal) { - ret = krb5_unparse_name(context, principal, &pname); - if (ret) - return ret; - } - - ret = krb5_make_principal(context, &cred->server, - KRB5_REALM_NAME, - KRB5_CONF_NAME, name, pname, NULL); - free(pname); - if (ret) { - krb5_free_principal(context, client); - return ret; - } - ret = krb5_copy_principal(context, client, &cred->client); - krb5_free_principal(context, client); - return ret; -} - -/** - * Return TRUE (non zero) if the principal is a configuration - * principal (generated part of krb5_cc_set_config()). Returns FALSE - * (zero) if not a configuration principal. - * - * @param context a Keberos context - * @param principal principal to check if it a configuration principal - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_is_config_principal(krb5_context context, - krb5_const_principal principal) -{ - if (strcmp(principal->realm, KRB5_REALM_NAME) != 0) - return FALSE; - - if (principal->name.name_string.len == 0 || - strcmp(principal->name.name_string.val[0], KRB5_CONF_NAME) != 0) - return FALSE; - - return TRUE; -} - -/** - * Store some configuration for the credential cache in the cache. - * Existing configuration under the same name is over-written. - * - * @param context a Keberos context - * @param id the credential cache to store the data for - * @param principal configuration for a specific principal, if - * NULL, global for the whole cache. - * @param name name under which the configuraion is stored. - * @param data data to store, if NULL, configure is removed. - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_set_config(krb5_context context, krb5_ccache id, - krb5_const_principal principal, - const char *name, krb5_data *data) -{ - krb5_error_code ret; - krb5_creds cred; - - ret = build_conf_principals(context, id, principal, name, &cred); - if (ret) - goto out; - - /* Remove old configuration */ - ret = krb5_cc_remove_cred(context, id, 0, &cred); - if (ret && ret != KRB5_CC_NOTFOUND) - goto out; - - if (data) { - /* not that anyone care when this expire */ - cred.times.authtime = time(NULL); - cred.times.endtime = cred.times.authtime + 3600 * 24 * 30; - - ret = krb5_data_copy(&cred.ticket, data->data, data->length); - if (ret) - goto out; - - ret = krb5_cc_store_cred(context, id, &cred); - } - -out: - krb5_free_cred_contents (context, &cred); - return ret; -} - -/** - * Get some configuration for the credential cache in the cache. - * - * @param context a Keberos context - * @param id the credential cache to store the data for - * @param principal configuration for a specific principal, if - * NULL, global for the whole cache. - * @param name name under which the configuraion is stored. - * @param data data to fetched, free with krb5_data_free() - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_config(krb5_context context, krb5_ccache id, - krb5_const_principal principal, - const char *name, krb5_data *data) -{ - krb5_creds mcred, cred; - krb5_error_code ret; - - memset(&cred, 0, sizeof(cred)); - krb5_data_zero(data); - - ret = build_conf_principals(context, id, principal, name, &mcred); - if (ret) - goto out; - - ret = krb5_cc_retrieve_cred(context, id, 0, &mcred, &cred); - if (ret) - goto out; - - ret = krb5_data_copy(data, cred.ticket.data, cred.ticket.length); - -out: - krb5_free_cred_contents (context, &cred); - krb5_free_cred_contents (context, &mcred); - return ret; -} - -/* - * - */ - -struct krb5_cccol_cursor_data { - int idx; - krb5_cc_cache_cursor cursor; -}; - -/** - * Get a new cache interation cursor that will interate over all - * credentials caches independent of type. - * - * @param context a Keberos context - * @param cursor passed into krb5_cccol_cursor_next() and free with krb5_cccol_cursor_free(). - * - * @return Returns 0 or and error code, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cccol_cursor_new(krb5_context context, krb5_cccol_cursor *cursor) -{ - *cursor = calloc(1, sizeof(**cursor)); - if (*cursor == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - (*cursor)->idx = 0; - (*cursor)->cursor = NULL; - - return 0; -} - -/** - * Get next credential cache from the iteration. - * - * @param context A Kerberos 5 context - * @param cursor the iteration cursor - * @param cache the returned cursor, pointer is set to NULL on failure - * and a cache on success. The returned cache needs to be freed - * with krb5_cc_close() or destroyed with krb5_cc_destroy(). - * MIT Kerberos behavies slightly diffrent and sets cache to NULL - * when all caches are iterated over and return 0. - * - * @return Return 0 or and error, KRB5_CC_END is returned at the end - * of iteration. See krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cccol_cursor_next(krb5_context context, krb5_cccol_cursor cursor, - krb5_ccache *cache) -{ - krb5_error_code ret; - - *cache = NULL; - - while (cursor->idx < context->num_cc_ops) { - - if (cursor->cursor == NULL) { - ret = krb5_cc_cache_get_first (context, - context->cc_ops[cursor->idx]->prefix, - &cursor->cursor); - if (ret) { - cursor->idx++; - continue; - } - } - ret = krb5_cc_cache_next(context, cursor->cursor, cache); - if (ret == 0) - break; - - krb5_cc_cache_end_seq_get(context, cursor->cursor); - cursor->cursor = NULL; - if (ret != KRB5_CC_END) - break; - - cursor->idx++; - } - if (cursor->idx >= context->num_cc_ops) { - krb5_set_error_message(context, KRB5_CC_END, - N_("Reached end of credential caches", "")); - return KRB5_CC_END; - } - - return 0; -} - -/** - * End an iteration and free all resources, can be done before end is reached. - * - * @param context A Kerberos 5 context - * @param cursor the iteration cursor to be freed. - * - * @return Return 0 or and error, KRB5_CC_END is returned at the end - * of iteration. See krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cccol_cursor_free(krb5_context context, krb5_cccol_cursor *cursor) -{ - krb5_cccol_cursor c = *cursor; - - *cursor = NULL; - if (c) { - if (c->cursor) - krb5_cc_cache_end_seq_get(context, c->cursor); - free(c); - } - return 0; -} - -/** - * Return the last time the credential cache was modified. - * - * @param context A Kerberos 5 context - * @param id The credential cache to probe - * @param mtime the last modification time, set to 0 on error. - - * @return Return 0 or and error. See krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_last_change_time(krb5_context context, - krb5_ccache id, - krb5_timestamp *mtime) -{ - *mtime = 0; - return (*id->ops->lastchange)(context, id, mtime); -} - -/** - * Return the last modfication time for a cache collection. The query - * can be limited to a specific cache type. If the function return 0 - * and mtime is 0, there was no credentials in the caches. - * - * @param context A Kerberos 5 context - * @param type The credential cache to probe, if NULL, all type are traversed. - * @param mtime the last modification time, set to 0 on error. - - * @return Return 0 or and error. See krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cccol_last_change_time(krb5_context context, - const char *type, - krb5_timestamp *mtime) -{ - krb5_cccol_cursor cursor; - krb5_error_code ret; - krb5_ccache id; - krb5_timestamp t = 0; - - *mtime = 0; - - ret = krb5_cccol_cursor_new (context, &cursor); - if (ret) - return ret; - - while (krb5_cccol_cursor_next(context, cursor, &id) == 0 && id != NULL) { - - if (type && strcmp(krb5_cc_get_type(context, id), type) != 0) - continue; - - ret = krb5_cc_last_change_time(context, id, &t); - krb5_cc_close(context, id); - if (ret) - continue; - if (t > *mtime) - *mtime = t; - } - - krb5_cccol_cursor_free(context, &cursor); - - return 0; -} -/** - * Return a friendly name on credential cache. Free the result with krb5_xfree(). - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_friendly_name(krb5_context context, - krb5_ccache id, - char **name) -{ - krb5_error_code ret; - krb5_data data; - - ret = krb5_cc_get_config(context, id, NULL, "FriendlyName", &data); - if (ret) { - krb5_principal principal; - ret = krb5_cc_get_principal(context, id, &principal); - if (ret) - return ret; - ret = krb5_unparse_name(context, principal, name); - krb5_free_principal(context, principal); - } else { - ret = asprintf(name, "%.*s", (int)data.length, (char *)data.data); - krb5_data_free(&data); - if (ret <= 0) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - } else - ret = 0; - } - - return ret; -} - -/** - * Set the friendly name on credential cache. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_set_friendly_name(krb5_context context, - krb5_ccache id, - const char *name) -{ - krb5_data data; - - data.data = rk_UNCONST(name); - data.length = strlen(name); - - return krb5_cc_set_config(context, id, NULL, "FriendlyName", &data); -} - -/** - * Get the lifetime of the initial ticket in the cache - * - * Get the lifetime of the initial ticket in the cache, if the initial - * ticket was not found, the error code KRB5_CC_END is returned. - * - * @param context A Kerberos 5 context. - * @param id a credential cache - * @param t the relative lifetime of the initial ticket - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_lifetime(krb5_context context, krb5_ccache id, time_t *t) -{ - krb5_cc_cursor cursor; - krb5_error_code ret; - krb5_creds cred; - time_t now; - - *t = 0; - now = time(NULL); - - ret = krb5_cc_start_seq_get(context, id, &cursor); - if (ret) - return ret; - - while ((ret = krb5_cc_next_cred(context, id, &cursor, &cred)) == 0) { - if (cred.flags.b.initial) { - if (now < cred.times.endtime) - *t = cred.times.endtime - now; - krb5_free_cred_contents(context, &cred); - break; - } - krb5_free_cred_contents(context, &cred); - } - - krb5_cc_end_seq_get(context, id, &cursor); - - return ret; -} - -/** - * Set the time offset betwen the client and the KDC - * - * If the backend doesn't support KDC offset, use the context global setting. - * - * @param context A Kerberos 5 context. - * @param id a credential cache - * @param offset the offset in seconds - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_set_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat offset) -{ - if (id->ops->set_kdc_offset == NULL) { - context->kdc_sec_offset = offset; - context->kdc_usec_offset = 0; - return 0; - } - return (*id->ops->set_kdc_offset)(context, id, offset); -} - -/** - * Get the time offset betwen the client and the KDC - * - * If the backend doesn't support KDC offset, use the context global setting. - * - * @param context A Kerberos 5 context. - * @param id a credential cache - * @param offset the offset in seconds - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat *offset) -{ - if (id->ops->get_kdc_offset == NULL) { - *offset = context->kdc_sec_offset; - return 0; - } - return (*id->ops->get_kdc_offset)(context, id, offset); -} - - -#ifdef _WIN32 - -#define REGPATH_MIT_KRB5 "SOFTWARE\\MIT\\Kerberos5" -char * -_krb5_get_default_cc_name_from_registry(krb5_context context) -{ - HKEY hk_k5 = 0; - LONG code; - char * ccname = NULL; - - code = RegOpenKeyEx(HKEY_CURRENT_USER, - REGPATH_MIT_KRB5, - 0, KEY_READ, &hk_k5); - - if (code != ERROR_SUCCESS) - return NULL; - - ccname = _krb5_parse_reg_value_as_string(context, hk_k5, "ccname", - REG_NONE, 0); - - RegCloseKey(hk_k5); - - return ccname; -} - -int -_krb5_set_default_cc_name_to_registry(krb5_context context, krb5_ccache id) -{ - HKEY hk_k5 = 0; - LONG code; - int ret = -1; - char * ccname = NULL; - - code = RegOpenKeyEx(HKEY_CURRENT_USER, - REGPATH_MIT_KRB5, - 0, KEY_READ|KEY_WRITE, &hk_k5); - - if (code != ERROR_SUCCESS) - return -1; - - ret = asprintf(&ccname, "%s:%s", krb5_cc_get_type(context, id), krb5_cc_get_name(context, id)); - if (ret < 0) - goto cleanup; - - ret = _krb5_store_string_to_reg_value(context, hk_k5, "ccname", - REG_SZ, ccname, -1, 0); - - cleanup: - - if (ccname) - free(ccname); - - RegCloseKey(hk_k5); - - return ret; -} - -#endif diff --git a/kerberosV/src/lib/krb5/ccache_plugin.h b/kerberosV/src/lib/krb5/ccache_plugin.h deleted file mode 100644 index f6871d65d16..00000000000 --- a/kerberosV/src/lib/krb5/ccache_plugin.h +++ /dev/null @@ -1,39 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2010, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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. - * - **********************************************************************/ - -#ifndef HEIMDAL_KRB5_CCACHE_PLUGIN_H -#define HEIMDAL_KRB5_CCACHE_PLUGIN_H 1 - -#include - -#define KRB5_PLUGIN_CCACHE "ccache_ops" - -#endif /* HEIMDAL_KRB5_CCACHE_PLUGIN_H */ diff --git a/kerberosV/src/lib/krb5/changepw.c b/kerberosV/src/lib/krb5/changepw.c deleted file mode 100644 index 1e7cd0d464f..00000000000 --- a/kerberosV/src/lib/krb5/changepw.c +++ /dev/null @@ -1,856 +0,0 @@ -/* - * Copyright (c) 1997 - 2005 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 "krb5_locl.h" - -#undef __attribute__ -#define __attribute__(X) - - -static void -str2data (krb5_data *d, - const char *fmt, - ...) __attribute__ ((format (printf, 2, 3))); - -static void -str2data (krb5_data *d, - const char *fmt, - ...) -{ - va_list args; - char *str; - - va_start(args, fmt); - d->length = vasprintf (&str, fmt, args); - va_end(args); - d->data = str; -} - -/* - * Change password protocol defined by - * draft-ietf-cat-kerb-chg-password-02.txt - * - * Share the response part of the protocol with MS set password - * (RFC3244) - */ - -static krb5_error_code -chgpw_send_request (krb5_context context, - krb5_auth_context *auth_context, - krb5_creds *creds, - krb5_principal targprinc, - int is_stream, - rk_socket_t sock, - const char *passwd, - const char *host) -{ - krb5_error_code ret; - krb5_data ap_req_data; - krb5_data krb_priv_data; - krb5_data passwd_data; - size_t len; - u_char header[6]; - struct iovec iov[3]; - struct msghdr msghdr; - - if (is_stream) - return KRB5_KPASSWD_MALFORMED; - - if (targprinc && - krb5_principal_compare(context, creds->client, targprinc) != TRUE) - return KRB5_KPASSWD_MALFORMED; - - krb5_data_zero (&ap_req_data); - - ret = krb5_mk_req_extended (context, - auth_context, - AP_OPTS_MUTUAL_REQUIRED | AP_OPTS_USE_SUBKEY, - NULL, /* in_data */ - creds, - &ap_req_data); - if (ret) - return ret; - - passwd_data.data = rk_UNCONST(passwd); - passwd_data.length = strlen(passwd); - - krb5_data_zero (&krb_priv_data); - - ret = krb5_mk_priv (context, - *auth_context, - &passwd_data, - &krb_priv_data, - NULL); - if (ret) - goto out2; - - len = 6 + ap_req_data.length + krb_priv_data.length; - header[0] = (len >> 8) & 0xFF; - header[1] = (len >> 0) & 0xFF; - header[2] = 0; - header[3] = 1; - header[4] = (ap_req_data.length >> 8) & 0xFF; - header[5] = (ap_req_data.length >> 0) & 0xFF; - - memset(&msghdr, 0, sizeof(msghdr)); - msghdr.msg_name = NULL; - msghdr.msg_namelen = 0; - msghdr.msg_iov = iov; - msghdr.msg_iovlen = sizeof(iov)/sizeof(*iov); -#if 0 - msghdr.msg_control = NULL; - msghdr.msg_controllen = 0; -#endif - - iov[0].iov_base = (void*)header; - iov[0].iov_len = 6; - iov[1].iov_base = ap_req_data.data; - iov[1].iov_len = ap_req_data.length; - iov[2].iov_base = krb_priv_data.data; - iov[2].iov_len = krb_priv_data.length; - - if (rk_IS_SOCKET_ERROR( sendmsg (sock, &msghdr, 0) )) { - ret = rk_SOCK_ERRNO; - krb5_set_error_message(context, ret, "sendmsg %s: %s", - host, strerror(ret)); - } - - krb5_data_free (&krb_priv_data); -out2: - krb5_data_free (&ap_req_data); - return ret; -} - -/* - * Set password protocol as defined by RFC3244 -- - * Microsoft Windows 2000 Kerberos Change Password and Set Password Protocols - */ - -static krb5_error_code -setpw_send_request (krb5_context context, - krb5_auth_context *auth_context, - krb5_creds *creds, - krb5_principal targprinc, - int is_stream, - rk_socket_t sock, - const char *passwd, - const char *host) -{ - krb5_error_code ret; - krb5_data ap_req_data; - krb5_data krb_priv_data; - krb5_data pwd_data; - ChangePasswdDataMS chpw; - size_t len = 0; - u_char header[4 + 6]; - u_char *p; - struct iovec iov[3]; - struct msghdr msghdr; - - krb5_data_zero (&ap_req_data); - - ret = krb5_mk_req_extended (context, - auth_context, - AP_OPTS_MUTUAL_REQUIRED | AP_OPTS_USE_SUBKEY, - NULL, /* in_data */ - creds, - &ap_req_data); - if (ret) - return ret; - - chpw.newpasswd.length = strlen(passwd); - chpw.newpasswd.data = rk_UNCONST(passwd); - if (targprinc) { - chpw.targname = &targprinc->name; - chpw.targrealm = &targprinc->realm; - } else { - chpw.targname = NULL; - chpw.targrealm = NULL; - } - - ASN1_MALLOC_ENCODE(ChangePasswdDataMS, pwd_data.data, pwd_data.length, - &chpw, &len, ret); - if (ret) { - krb5_data_free (&ap_req_data); - return ret; - } - - if(pwd_data.length != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - ret = krb5_mk_priv (context, - *auth_context, - &pwd_data, - &krb_priv_data, - NULL); - if (ret) - goto out2; - - len = 6 + ap_req_data.length + krb_priv_data.length; - p = header; - if (is_stream) { - _krb5_put_int(p, len, 4); - p += 4; - } - *p++ = (len >> 8) & 0xFF; - *p++ = (len >> 0) & 0xFF; - *p++ = 0xff; - *p++ = 0x80; - *p++ = (ap_req_data.length >> 8) & 0xFF; - *p = (ap_req_data.length >> 0) & 0xFF; - - memset(&msghdr, 0, sizeof(msghdr)); - msghdr.msg_name = NULL; - msghdr.msg_namelen = 0; - msghdr.msg_iov = iov; - msghdr.msg_iovlen = sizeof(iov)/sizeof(*iov); -#if 0 - msghdr.msg_control = NULL; - msghdr.msg_controllen = 0; -#endif - - iov[0].iov_base = (void*)header; - if (is_stream) - iov[0].iov_len = 10; - else - iov[0].iov_len = 6; - iov[1].iov_base = ap_req_data.data; - iov[1].iov_len = ap_req_data.length; - iov[2].iov_base = krb_priv_data.data; - iov[2].iov_len = krb_priv_data.length; - - if (rk_IS_SOCKET_ERROR( sendmsg (sock, &msghdr, 0) )) { - ret = rk_SOCK_ERRNO; - krb5_set_error_message(context, ret, "sendmsg %s: %s", - host, strerror(ret)); - } - - krb5_data_free (&krb_priv_data); -out2: - krb5_data_free (&ap_req_data); - krb5_data_free (&pwd_data); - return ret; -} - -static krb5_error_code -process_reply (krb5_context context, - krb5_auth_context auth_context, - int is_stream, - rk_socket_t sock, - int *result_code, - krb5_data *result_code_string, - krb5_data *result_string, - const char *host) -{ - krb5_error_code ret; - u_char reply[1024 * 3]; - size_t len; - uint16_t pkt_len, pkt_ver; - krb5_data ap_rep_data; - int save_errno; - - len = 0; - if (is_stream) { - while (len < sizeof(reply)) { - unsigned long size; - - ret = recvfrom (sock, reply + len, sizeof(reply) - len, - 0, NULL, NULL); - if (rk_IS_SOCKET_ERROR(ret)) { - save_errno = rk_SOCK_ERRNO; - krb5_set_error_message(context, save_errno, - "recvfrom %s: %s", - host, strerror(save_errno)); - return save_errno; - } else if (ret == 0) { - krb5_set_error_message(context, 1,"recvfrom timeout %s", host); - return 1; - } - len += ret; - if (len < 4) - continue; - _krb5_get_int(reply, &size, 4); - if (size + 4 < len) - continue; - memmove(reply, reply + 4, size); - len = size; - break; - } - if (len == sizeof(reply)) { - krb5_set_error_message(context, ENOMEM, - N_("Message too large from %s", "host"), - host); - return ENOMEM; - } - } else { - ret = recvfrom (sock, reply, sizeof(reply), 0, NULL, NULL); - if (rk_IS_SOCKET_ERROR(ret)) { - save_errno = rk_SOCK_ERRNO; - krb5_set_error_message(context, save_errno, - "recvfrom %s: %s", - host, strerror(save_errno)); - return save_errno; - } - len = ret; - } - - if (len < 6) { - str2data (result_string, "server %s sent to too short message " - "(%zu bytes)", host, len); - *result_code = KRB5_KPASSWD_MALFORMED; - return 0; - } - - pkt_len = (reply[0] << 8) | (reply[1]); - pkt_ver = (reply[2] << 8) | (reply[3]); - - if ((pkt_len != len) || (reply[1] == 0x7e || reply[1] == 0x5e)) { - KRB_ERROR error; - size_t size; - u_char *p; - - memset(&error, 0, sizeof(error)); - - ret = decode_KRB_ERROR(reply, len, &error, &size); - if (ret) - return ret; - - if (error.e_data->length < 2) { - str2data(result_string, "server %s sent too short " - "e_data to print anything usable", host); - free_KRB_ERROR(&error); - *result_code = KRB5_KPASSWD_MALFORMED; - return 0; - } - - p = error.e_data->data; - *result_code = (p[0] << 8) | p[1]; - if (error.e_data->length == 2) - str2data(result_string, "server only sent error code"); - else - krb5_data_copy (result_string, - p + 2, - error.e_data->length - 2); - free_KRB_ERROR(&error); - return 0; - } - - if (pkt_len != len) { - str2data (result_string, "client: wrong len in reply"); - *result_code = KRB5_KPASSWD_MALFORMED; - return 0; - } - if (pkt_ver != KRB5_KPASSWD_VERS_CHANGEPW) { - str2data (result_string, - "client: wrong version number (%d)", pkt_ver); - *result_code = KRB5_KPASSWD_MALFORMED; - return 0; - } - - ap_rep_data.data = reply + 6; - ap_rep_data.length = (reply[4] << 8) | (reply[5]); - - if (reply + len < (u_char *)ap_rep_data.data + ap_rep_data.length) { - str2data (result_string, "client: wrong AP len in reply"); - *result_code = KRB5_KPASSWD_MALFORMED; - return 0; - } - - if (ap_rep_data.length) { - krb5_ap_rep_enc_part *ap_rep; - krb5_data priv_data; - u_char *p; - - priv_data.data = (u_char*)ap_rep_data.data + ap_rep_data.length; - priv_data.length = len - ap_rep_data.length - 6; - - ret = krb5_rd_rep (context, - auth_context, - &ap_rep_data, - &ap_rep); - if (ret) - return ret; - - krb5_free_ap_rep_enc_part (context, ap_rep); - - ret = krb5_rd_priv (context, - auth_context, - &priv_data, - result_code_string, - NULL); - if (ret) { - krb5_data_free (result_code_string); - return ret; - } - - if (result_code_string->length < 2) { - *result_code = KRB5_KPASSWD_MALFORMED; - str2data (result_string, - "client: bad length in result"); - return 0; - } - - p = result_code_string->data; - - *result_code = (p[0] << 8) | p[1]; - krb5_data_copy (result_string, - (unsigned char*)result_code_string->data + 2, - result_code_string->length - 2); - return 0; - } else { - KRB_ERROR error; - size_t size; - u_char *p; - - ret = decode_KRB_ERROR(reply + 6, len - 6, &error, &size); - if (ret) { - return ret; - } - if (error.e_data->length < 2) { - krb5_warnx (context, "too short e_data to print anything usable"); - return 1; /* XXX */ - } - - p = error.e_data->data; - *result_code = (p[0] << 8) | p[1]; - krb5_data_copy (result_string, - p + 2, - error.e_data->length - 2); - return 0; - } -} - - -/* - * change the password using the credentials in `creds' (for the - * principal indicated in them) to `newpw', storing the result of - * the operation in `result_*' and an error code or 0. - */ - -typedef krb5_error_code (*kpwd_send_request) (krb5_context, - krb5_auth_context *, - krb5_creds *, - krb5_principal, - int, - rk_socket_t, - const char *, - const char *); -typedef krb5_error_code (*kpwd_process_reply) (krb5_context, - krb5_auth_context, - int, - rk_socket_t, - int *, - krb5_data *, - krb5_data *, - const char *); - -static struct kpwd_proc { - const char *name; - int flags; -#define SUPPORT_TCP 1 -#define SUPPORT_UDP 2 - kpwd_send_request send_req; - kpwd_process_reply process_rep; -} procs[] = { - { - "MS set password", - SUPPORT_TCP|SUPPORT_UDP, - setpw_send_request, - process_reply - }, - { - "change password", - SUPPORT_UDP, - chgpw_send_request, - process_reply - }, - { NULL, 0, NULL, NULL } -}; - -/* - * - */ - -static krb5_error_code -change_password_loop (krb5_context context, - krb5_creds *creds, - krb5_principal targprinc, - const char *newpw, - int *result_code, - krb5_data *result_code_string, - krb5_data *result_string, - struct kpwd_proc *proc) -{ - krb5_error_code ret; - krb5_auth_context auth_context = NULL; - krb5_krbhst_handle handle = NULL; - krb5_krbhst_info *hi; - rk_socket_t sock; - unsigned int i; - int done = 0; - krb5_realm realm; - - if (targprinc) - realm = targprinc->realm; - else - realm = creds->client->realm; - - ret = krb5_auth_con_init (context, &auth_context); - if (ret) - return ret; - - krb5_auth_con_setflags (context, auth_context, - KRB5_AUTH_CONTEXT_DO_SEQUENCE); - - ret = krb5_krbhst_init (context, realm, KRB5_KRBHST_CHANGEPW, &handle); - if (ret) - goto out; - - while (!done && (ret = krb5_krbhst_next(context, handle, &hi)) == 0) { - struct addrinfo *ai, *a; - int is_stream; - - switch (hi->proto) { - case KRB5_KRBHST_UDP: - if ((proc->flags & SUPPORT_UDP) == 0) - continue; - is_stream = 0; - break; - case KRB5_KRBHST_TCP: - if ((proc->flags & SUPPORT_TCP) == 0) - continue; - is_stream = 1; - break; - default: - continue; - } - - ret = krb5_krbhst_get_addrinfo(context, hi, &ai); - if (ret) - continue; - - for (a = ai; !done && a != NULL; a = a->ai_next) { - int replied = 0; - - sock = socket (a->ai_family, a->ai_socktype | SOCK_CLOEXEC, a->ai_protocol); - if (rk_IS_BAD_SOCKET(sock)) - continue; - rk_cloexec(sock); - - ret = connect(sock, a->ai_addr, a->ai_addrlen); - if (rk_IS_SOCKET_ERROR(ret)) { - rk_closesocket (sock); - goto out; - } - - ret = krb5_auth_con_genaddrs (context, auth_context, sock, - KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR); - if (ret) { - rk_closesocket (sock); - goto out; - } - - for (i = 0; !done && i < 5; ++i) { - fd_set fdset; - struct timeval tv; - - if (!replied) { - replied = 0; - - ret = (*proc->send_req) (context, - &auth_context, - creds, - targprinc, - is_stream, - sock, - newpw, - hi->hostname); - if (ret) { - rk_closesocket(sock); - goto out; - } - } - -#ifndef NO_LIMIT_FD_SETSIZE - if (sock >= FD_SETSIZE) { - ret = ERANGE; - krb5_set_error_message(context, ret, - "fd %d too large", sock); - rk_closesocket (sock); - goto out; - } -#endif - - FD_ZERO(&fdset); - FD_SET(sock, &fdset); - tv.tv_usec = 0; - tv.tv_sec = 1 + (1 << i); - - ret = select (sock + 1, &fdset, NULL, NULL, &tv); - if (rk_IS_SOCKET_ERROR(ret) && rk_SOCK_ERRNO != EINTR) { - rk_closesocket(sock); - goto out; - } - if (ret == 1) { - ret = (*proc->process_rep) (context, - auth_context, - is_stream, - sock, - result_code, - result_code_string, - result_string, - hi->hostname); - if (ret == 0) - done = 1; - else if (i > 0 && ret == KRB5KRB_AP_ERR_MUT_FAIL) - replied = 1; - } else { - ret = KRB5_KDC_UNREACH; - } - } - rk_closesocket (sock); - } - } - - out: - krb5_krbhst_free (context, handle); - krb5_auth_con_free (context, auth_context); - - if (ret == KRB5_KDC_UNREACH) { - krb5_set_error_message(context, - ret, - N_("Unable to reach any changepw server " - " in realm %s", "realm"), realm); - *result_code = KRB5_KPASSWD_HARDERROR; - } - return ret; -} - -#ifndef HEIMDAL_SMALLER - -static struct kpwd_proc * -find_chpw_proto(const char *name) -{ - struct kpwd_proc *p; - for (p = procs; p->name != NULL; p++) { - if (strcmp(p->name, name) == 0) - return p; - } - return NULL; -} - -/** - * Deprecated: krb5_change_password() is deprecated, use krb5_set_password(). - * - * @param context a Keberos context - * @param creds - * @param newpw - * @param result_code - * @param result_code_string - * @param result_string - * - * @return On sucess password is changed. - - * @ingroup @krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_change_password (krb5_context context, - krb5_creds *creds, - const char *newpw, - int *result_code, - krb5_data *result_code_string, - krb5_data *result_string) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - struct kpwd_proc *p = find_chpw_proto("change password"); - - *result_code = KRB5_KPASSWD_MALFORMED; - result_code_string->data = result_string->data = NULL; - result_code_string->length = result_string->length = 0; - - if (p == NULL) - return KRB5_KPASSWD_MALFORMED; - - return change_password_loop(context, creds, NULL, newpw, - result_code, result_code_string, - result_string, p); -} -#endif /* HEIMDAL_SMALLER */ - -/** - * Change password using creds. - * - * @param context a Keberos context - * @param creds The initial kadmin/passwd for the principal or an admin principal - * @param newpw The new password to set - * @param targprinc if unset, the default principal is used. - * @param result_code Result code, KRB5_KPASSWD_SUCCESS is when password is changed. - * @param result_code_string binary message from the server, contains - * at least the result_code. - * @param result_string A message from the kpasswd service or the - * library in human printable form. The string is NUL terminated. - * - * @return On sucess and *result_code is KRB5_KPASSWD_SUCCESS, the password is changed. - - * @ingroup @krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_password(krb5_context context, - krb5_creds *creds, - const char *newpw, - krb5_principal targprinc, - int *result_code, - krb5_data *result_code_string, - krb5_data *result_string) -{ - krb5_principal principal = NULL; - krb5_error_code ret = 0; - int i; - - *result_code = KRB5_KPASSWD_MALFORMED; - krb5_data_zero(result_code_string); - krb5_data_zero(result_string); - - if (targprinc == NULL) { - ret = krb5_get_default_principal(context, &principal); - if (ret) - return ret; - } else - principal = targprinc; - - for (i = 0; procs[i].name != NULL; i++) { - *result_code = 0; - ret = change_password_loop(context, creds, principal, newpw, - result_code, result_code_string, - result_string, - &procs[i]); - if (ret == 0 && *result_code == 0) - break; - } - - if (targprinc == NULL) - krb5_free_principal(context, principal); - return ret; -} - -/* - * - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_password_using_ccache(krb5_context context, - krb5_ccache ccache, - const char *newpw, - krb5_principal targprinc, - int *result_code, - krb5_data *result_code_string, - krb5_data *result_string) -{ - krb5_creds creds, *credsp; - krb5_error_code ret; - krb5_principal principal = NULL; - - *result_code = KRB5_KPASSWD_MALFORMED; - result_code_string->data = result_string->data = NULL; - result_code_string->length = result_string->length = 0; - - memset(&creds, 0, sizeof(creds)); - - if (targprinc == NULL) { - ret = krb5_cc_get_principal(context, ccache, &principal); - if (ret) - return ret; - } else - principal = targprinc; - - ret = krb5_make_principal(context, &creds.server, - krb5_principal_get_realm(context, principal), - "kadmin", "changepw", NULL); - if (ret) - goto out; - - ret = krb5_cc_get_principal(context, ccache, &creds.client); - if (ret) { - krb5_free_principal(context, creds.server); - goto out; - } - - ret = krb5_get_credentials(context, 0, ccache, &creds, &credsp); - krb5_free_principal(context, creds.server); - krb5_free_principal(context, creds.client); - if (ret) - goto out; - - ret = krb5_set_password(context, - credsp, - newpw, - principal, - result_code, - result_code_string, - result_string); - - krb5_free_creds(context, credsp); - - return ret; - out: - if (targprinc == NULL) - krb5_free_principal(context, principal); - return ret; -} - -/* - * - */ - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_passwd_result_to_string (krb5_context context, - int result) -{ - static const char *strings[] = { - "Success", - "Malformed", - "Hard error", - "Auth error", - "Soft error" , - "Access denied", - "Bad version", - "Initial flag needed" - }; - - if (result < 0 || result > KRB5_KPASSWD_INITIAL_FLAG_NEEDED) - return "unknown result code"; - else - return strings[result]; -} diff --git a/kerberosV/src/lib/krb5/codec.c b/kerberosV/src/lib/krb5/codec.c deleted file mode 100644 index 5e754c60cba..00000000000 --- a/kerberosV/src/lib/krb5/codec.c +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright (c) 1998 - 2001 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 "krb5_locl.h" - -#ifndef HEIMDAL_SMALLER - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_EncTicketPart (krb5_context context, - const void *data, - size_t length, - EncTicketPart *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return decode_EncTicketPart(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_EncTicketPart (krb5_context context, - void *data, - size_t length, - EncTicketPart *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return encode_EncTicketPart(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_EncASRepPart (krb5_context context, - const void *data, - size_t length, - EncASRepPart *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return decode_EncASRepPart(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_EncASRepPart (krb5_context context, - void *data, - size_t length, - EncASRepPart *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return encode_EncASRepPart(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_EncTGSRepPart (krb5_context context, - const void *data, - size_t length, - EncTGSRepPart *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return decode_EncTGSRepPart(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_EncTGSRepPart (krb5_context context, - void *data, - size_t length, - EncTGSRepPart *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return encode_EncTGSRepPart(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_EncAPRepPart (krb5_context context, - const void *data, - size_t length, - EncAPRepPart *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return decode_EncAPRepPart(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_EncAPRepPart (krb5_context context, - void *data, - size_t length, - EncAPRepPart *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return encode_EncAPRepPart(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_Authenticator (krb5_context context, - const void *data, - size_t length, - Authenticator *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return decode_Authenticator(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_Authenticator (krb5_context context, - void *data, - size_t length, - Authenticator *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return encode_Authenticator(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_EncKrbCredPart (krb5_context context, - const void *data, - size_t length, - EncKrbCredPart *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return decode_EncKrbCredPart(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_EncKrbCredPart (krb5_context context, - void *data, - size_t length, - EncKrbCredPart *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return encode_EncKrbCredPart (data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_ETYPE_INFO (krb5_context context, - const void *data, - size_t length, - ETYPE_INFO *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return decode_ETYPE_INFO(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_ETYPE_INFO (krb5_context context, - void *data, - size_t length, - ETYPE_INFO *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return encode_ETYPE_INFO (data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_ETYPE_INFO2 (krb5_context context, - const void *data, - size_t length, - ETYPE_INFO2 *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return decode_ETYPE_INFO2(data, length, t, len); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_ETYPE_INFO2 (krb5_context context, - void *data, - size_t length, - ETYPE_INFO2 *t, - size_t *len) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return encode_ETYPE_INFO2 (data, length, t, len); -} - -#endif /* HEIMDAL_SMALLER */ diff --git a/kerberosV/src/lib/krb5/config_file.c b/kerberosV/src/lib/krb5/config_file.c deleted file mode 100644 index 4ac25ae2870..00000000000 --- a/kerberosV/src/lib/krb5/config_file.c +++ /dev/null @@ -1,1325 +0,0 @@ -/* - * Copyright (c) 1997 - 2004 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" - -#ifdef __APPLE__ -#include -#endif - -/* Gaah! I want a portable funopen */ -struct fileptr { - const char *s; - FILE *f; -}; - -static char * -config_fgets(char *str, size_t len, struct fileptr *ptr) -{ - /* XXX this is not correct, in that they don't do the same if the - line is longer than len */ - if(ptr->f != NULL) - return fgets(str, len, ptr->f); - else { - /* this is almost strsep_copy */ - const char *p; - ssize_t l; - if(*ptr->s == '\0') - return NULL; - p = ptr->s + strcspn(ptr->s, "\n"); - if(*p == '\n') - p++; - l = min(len, (size_t)(p - ptr->s)); - if(len > 0) { - memcpy(str, ptr->s, l); - str[l] = '\0'; - } - ptr->s = p; - return str; - } -} - -static krb5_error_code parse_section(char *p, krb5_config_section **s, - krb5_config_section **res, - const char **err_message); -static krb5_error_code parse_binding(struct fileptr *f, unsigned *lineno, char *p, - krb5_config_binding **b, - krb5_config_binding **parent, - const char **err_message); -static krb5_error_code parse_list(struct fileptr *f, unsigned *lineno, - krb5_config_binding **parent, - const char **err_message); - -krb5_config_section * -_krb5_config_get_entry(krb5_config_section **parent, const char *name, int type) -{ - krb5_config_section **q; - - for(q = parent; *q != NULL; q = &(*q)->next) - if(type == krb5_config_list && - (unsigned)type == (*q)->type && - strcmp(name, (*q)->name) == 0) - return *q; - *q = calloc(1, sizeof(**q)); - if(*q == NULL) - return NULL; - (*q)->name = strdup(name); - (*q)->type = type; - if((*q)->name == NULL) { - free(*q); - *q = NULL; - return NULL; - } - return *q; -} - -/* - * Parse a section: - * - * [section] - * foo = bar - * b = { - * a - * } - * ... - * - * starting at the line in `p', storing the resulting structure in - * `s' and hooking it into `parent'. - * Store the error message in `err_message'. - */ - -static krb5_error_code -parse_section(char *p, krb5_config_section **s, krb5_config_section **parent, - const char **err_message) -{ - char *p1; - krb5_config_section *tmp; - - p1 = strchr (p + 1, ']'); - if (p1 == NULL) { - *err_message = "missing ]"; - return KRB5_CONFIG_BADFORMAT; - } - *p1 = '\0'; - tmp = _krb5_config_get_entry(parent, p + 1, krb5_config_list); - if(tmp == NULL) { - *err_message = "out of memory"; - return KRB5_CONFIG_BADFORMAT; - } - *s = tmp; - return 0; -} - -/* - * Parse a brace-enclosed list from `f', hooking in the structure at - * `parent'. - * Store the error message in `err_message'. - */ - -static krb5_error_code -parse_list(struct fileptr *f, unsigned *lineno, krb5_config_binding **parent, - const char **err_message) -{ - char buf[KRB5_BUFSIZ]; - krb5_error_code ret; - krb5_config_binding *b = NULL; - unsigned beg_lineno = *lineno; - - while(config_fgets(buf, sizeof(buf), f) != NULL) { - char *p; - - ++*lineno; - buf[strcspn(buf, "\r\n")] = '\0'; - p = buf; - while(isspace((unsigned char)*p)) - ++p; - if (*p == '#' || *p == ';' || *p == '\0') - continue; - while(isspace((unsigned char)*p)) - ++p; - if (*p == '}') - return 0; - if (*p == '\0') - continue; - ret = parse_binding (f, lineno, p, &b, parent, err_message); - if (ret) - return ret; - } - *lineno = beg_lineno; - *err_message = "unclosed {"; - return KRB5_CONFIG_BADFORMAT; -} - -/* - * - */ - -static krb5_error_code -parse_binding(struct fileptr *f, unsigned *lineno, char *p, - krb5_config_binding **b, krb5_config_binding **parent, - const char **err_message) -{ - krb5_config_binding *tmp; - char *p1, *p2; - krb5_error_code ret = 0; - - p1 = p; - while (*p && *p != '=' && !isspace((unsigned char)*p)) - ++p; - if (*p == '\0') { - *err_message = "missing ="; - return KRB5_CONFIG_BADFORMAT; - } - p2 = p; - while (isspace((unsigned char)*p)) - ++p; - if (*p != '=') { - *err_message = "missing ="; - return KRB5_CONFIG_BADFORMAT; - } - ++p; - while(isspace((unsigned char)*p)) - ++p; - *p2 = '\0'; - if (*p == '{') { - tmp = _krb5_config_get_entry(parent, p1, krb5_config_list); - if (tmp == NULL) { - *err_message = "out of memory"; - return KRB5_CONFIG_BADFORMAT; - } - ret = parse_list (f, lineno, &tmp->u.list, err_message); - } else { - tmp = _krb5_config_get_entry(parent, p1, krb5_config_string); - if (tmp == NULL) { - *err_message = "out of memory"; - return KRB5_CONFIG_BADFORMAT; - } - p1 = p; - p = p1 + strlen(p1); - while(p > p1 && isspace((unsigned char)*(p-1))) - --p; - *p = '\0'; - tmp->u.string = strdup(p1); - } - *b = tmp; - return ret; -} - -#if defined(__APPLE__) - -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 -#define HAVE_CFPROPERTYLISTCREATEWITHSTREAM 1 -#endif - -static char * -cfstring2cstring(CFStringRef string) -{ - CFIndex len; - char *str; - - str = (char *) CFStringGetCStringPtr(string, kCFStringEncodingUTF8); - if (str) - return strdup(str); - - len = CFStringGetLength(string); - len = 1 + CFStringGetMaximumSizeForEncoding(len, kCFStringEncodingUTF8); - str = malloc(len); - if (str == NULL) - return NULL; - - if (!CFStringGetCString (string, str, len, kCFStringEncodingUTF8)) { - free (str); - return NULL; - } - return str; -} - -static void -convert_content(const void *key, const void *value, void *context) -{ - krb5_config_section *tmp, **parent = context; - char *k; - - if (CFGetTypeID(key) != CFStringGetTypeID()) - return; - - k = cfstring2cstring(key); - if (k == NULL) - return; - - if (CFGetTypeID(value) == CFStringGetTypeID()) { - tmp = _krb5_config_get_entry(parent, k, krb5_config_string); - tmp->u.string = cfstring2cstring(value); - } else if (CFGetTypeID(value) == CFDictionaryGetTypeID()) { - tmp = _krb5_config_get_entry(parent, k, krb5_config_list); - CFDictionaryApplyFunction(value, convert_content, &tmp->u.list); - } else { - /* log */ - } - free(k); -} - -static krb5_error_code -parse_plist_config(krb5_context context, const char *path, krb5_config_section **parent) -{ - CFReadStreamRef s; - CFDictionaryRef d; - CFURLRef url; - - url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (UInt8 *)path, strlen(path), FALSE); - if (url == NULL) { - krb5_clear_error_message(context); - return ENOMEM; - } - - s = CFReadStreamCreateWithFile(kCFAllocatorDefault, url); - CFRelease(url); - if (s == NULL) { - krb5_clear_error_message(context); - return ENOMEM; - } - - if (!CFReadStreamOpen(s)) { - CFRelease(s); - krb5_clear_error_message(context); - return ENOENT; - } - -#ifdef HAVE_CFPROPERTYLISTCREATEWITHSTREAM - d = (CFDictionaryRef)CFPropertyListCreateWithStream(NULL, s, 0, kCFPropertyListImmutable, NULL, NULL); -#else - d = (CFDictionaryRef)CFPropertyListCreateFromStream(NULL, s, 0, kCFPropertyListImmutable, NULL, NULL); -#endif - CFRelease(s); - if (d == NULL) { - krb5_clear_error_message(context); - return ENOENT; - } - - CFDictionaryApplyFunction(d, convert_content, parent); - CFRelease(d); - - return 0; -} - -#endif - - -/* - * Parse the config file `fname', generating the structures into `res' - * returning error messages in `err_message' - */ - -static krb5_error_code -krb5_config_parse_debug (struct fileptr *f, - krb5_config_section **res, - unsigned *lineno, - const char **err_message) -{ - krb5_config_section *s = NULL; - krb5_config_binding *b = NULL; - char buf[KRB5_BUFSIZ]; - krb5_error_code ret; - - while (config_fgets(buf, sizeof(buf), f) != NULL) { - char *p; - - ++*lineno; - buf[strcspn(buf, "\r\n")] = '\0'; - p = buf; - while(isspace((unsigned char)*p)) - ++p; - if (*p == '#' || *p == ';') - continue; - if (*p == '[') { - ret = parse_section(p, &s, res, err_message); - if (ret) - return ret; - b = NULL; - } else if (*p == '}') { - *err_message = "unmatched }"; - return EINVAL; /* XXX */ - } else if(*p != '\0') { - if (s == NULL) { - *err_message = "binding before section"; - return EINVAL; - } - ret = parse_binding(f, lineno, p, &b, &s->u.list, err_message); - if (ret) - return ret; - } - } - return 0; -} - -static int -is_plist_file(const char *fname) -{ - size_t len = strlen(fname); - char suffix[] = ".plist"; - if (len < sizeof(suffix)) - return 0; - if (strcasecmp(&fname[len - (sizeof(suffix) - 1)], suffix) != 0) - return 0; - return 1; -} - -/** - * Parse a configuration file and add the result into res. This - * interface can be used to parse several configuration files into one - * resulting krb5_config_section by calling it repeatably. - * - * @param context a Kerberos 5 context. - * @param fname a file name to a Kerberos configuration file - * @param res the returned result, must be free with krb5_free_config_files(). - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_config_parse_file_multi (krb5_context context, - const char *fname, - krb5_config_section **res) -{ - const char *str; - char *newfname = NULL; - unsigned lineno = 0; - krb5_error_code ret; - struct fileptr f; - - /** - * If the fname starts with "~/" parse configuration file in the - * current users home directory. The behavior can be disabled and - * enabled by calling krb5_set_home_dir_access(). - */ - if (fname[0] == '~' && fname[1] == '/') { -#ifndef KRB5_USE_PATH_TOKENS - const char *home = NULL; - - if (!_krb5_homedir_access(context)) { - krb5_set_error_message(context, EPERM, - "Access to home directory not allowed"); - return EPERM; - } - - if(!issuid()) - home = getenv("HOME"); - - if (home == NULL) { - struct passwd *pw = getpwuid(getuid()); - if(pw != NULL) - home = pw->pw_dir; - } - if (home) { - asprintf(&newfname, "%s%s", home, &fname[1]); - if (newfname == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - fname = newfname; - } -#else /* KRB5_USE_PATH_TOKENS */ - if (asprintf(&newfname, "%%{USERCONFIG}%s", &fname[1]) < 0 || - newfname == NULL) - { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - fname = newfname; -#endif - } - - if (is_plist_file(fname)) { -#ifdef __APPLE__ - ret = parse_plist_config(context, fname, res); - if (ret) { - krb5_set_error_message(context, ret, - "Failed to parse plist %s", fname); - if (newfname) - free(newfname); - return ret; - } -#else - krb5_set_error_message(context, ENOENT, - "no support for plist configuration files"); - return ENOENT; -#endif - } else { -#ifdef KRB5_USE_PATH_TOKENS - char * exp_fname = NULL; - - ret = _krb5_expand_path_tokens(context, fname, &exp_fname); - if (ret) { - if (newfname) - free(newfname); - return ret; - } - - if (newfname) - free(newfname); - fname = newfname = exp_fname; -#endif - - f.f = fopen(fname, "r"); - f.s = NULL; - if(f.f == NULL) { - ret = errno; - krb5_set_error_message (context, ret, "open %s: %s", - fname, strerror(ret)); - if (newfname) - free(newfname); - return ret; - } - - ret = krb5_config_parse_debug (&f, res, &lineno, &str); - fclose(f.f); - if (ret) { - krb5_set_error_message (context, ret, "%s:%u: %s", - fname, lineno, str); - if (newfname) - free(newfname); - return ret; - } - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_config_parse_file (krb5_context context, - const char *fname, - krb5_config_section **res) -{ - *res = NULL; - return krb5_config_parse_file_multi(context, fname, res); -} - -static void -free_binding (krb5_context context, krb5_config_binding *b) -{ - krb5_config_binding *next_b; - - while (b) { - free (b->name); - if (b->type == krb5_config_string) - free (b->u.string); - else if (b->type == krb5_config_list) - free_binding (context, b->u.list); - else - krb5_abortx(context, "unknown binding type (%d) in free_binding", - b->type); - next_b = b->next; - free (b); - b = next_b; - } -} - -/** - * Free configuration file section, the result of - * krb5_config_parse_file() and krb5_config_parse_file_multi(). - * - * @param context A Kerberos 5 context - * @param s the configuration section to free - * - * @return returns 0 on successes, otherwise an error code, see - * krb5_get_error_message() - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_config_file_free (krb5_context context, krb5_config_section *s) -{ - free_binding (context, s); - return 0; -} - -#ifndef HEIMDAL_SMALLER - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_config_copy(krb5_context context, - krb5_config_section *c, - krb5_config_section **head) -{ - krb5_config_binding *d, *previous = NULL; - - *head = NULL; - - while (c) { - d = calloc(1, sizeof(*d)); - - if (*head == NULL) - *head = d; - - d->name = strdup(c->name); - d->type = c->type; - if (d->type == krb5_config_string) - d->u.string = strdup(c->u.string); - else if (d->type == krb5_config_list) - _krb5_config_copy (context, c->u.list, &d->u.list); - else - krb5_abortx(context, - "unknown binding type (%d) in krb5_config_copy", - d->type); - if (previous) - previous->next = d; - - previous = d; - c = c->next; - } - return 0; -} - -#endif /* HEIMDAL_SMALLER */ - -KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL -_krb5_config_get_next (krb5_context context, - const krb5_config_section *c, - const krb5_config_binding **pointer, - int type, - ...) -{ - const char *ret; - va_list args; - - va_start(args, type); - ret = _krb5_config_vget_next (context, c, pointer, type, args); - va_end(args); - return ret; -} - -static const void * -vget_next(krb5_context context, - const krb5_config_binding *b, - const krb5_config_binding **pointer, - int type, - const char *name, - va_list args) -{ - const char *p = va_arg(args, const char *); - while(b != NULL) { - if(strcmp(b->name, name) == 0) { - if(b->type == (unsigned)type && p == NULL) { - *pointer = b; - return b->u.generic; - } else if(b->type == krb5_config_list && p != NULL) { - return vget_next(context, b->u.list, pointer, type, p, args); - } - } - b = b->next; - } - return NULL; -} - -KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL -_krb5_config_vget_next (krb5_context context, - const krb5_config_section *c, - const krb5_config_binding **pointer, - int type, - va_list args) -{ - const krb5_config_binding *b; - const char *p; - - if(c == NULL) - c = context->cf; - - if (c == NULL) - return NULL; - - if (*pointer == NULL) { - /* first time here, walk down the tree looking for the right - section */ - p = va_arg(args, const char *); - if (p == NULL) - return NULL; - return vget_next(context, c, pointer, type, p, args); - } - - /* we were called again, so just look for more entries with the - same name and type */ - for (b = (*pointer)->next; b != NULL; b = b->next) { - if(strcmp(b->name, (*pointer)->name) == 0 && b->type == (unsigned)type) { - *pointer = b; - return b->u.generic; - } - } - return NULL; -} - -KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL -_krb5_config_get (krb5_context context, - const krb5_config_section *c, - int type, - ...) -{ - const void *ret; - va_list args; - - va_start(args, type); - ret = _krb5_config_vget (context, c, type, args); - va_end(args); - return ret; -} - - -const void * -_krb5_config_vget (krb5_context context, - const krb5_config_section *c, - int type, - va_list args) -{ - const krb5_config_binding *foo = NULL; - - return _krb5_config_vget_next (context, c, &foo, type, args); -} - -/** - * Get a list of configuration binding list for more processing - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param ... a list of names, terminated with NULL. - * - * @return NULL if configuration list is not found, a list otherwise - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION const krb5_config_binding * KRB5_LIB_CALL -krb5_config_get_list (krb5_context context, - const krb5_config_section *c, - ...) -{ - const krb5_config_binding *ret; - va_list args; - - va_start(args, c); - ret = krb5_config_vget_list (context, c, args); - va_end(args); - return ret; -} - -/** - * Get a list of configuration binding list for more processing - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param args a va_list of arguments - * - * @return NULL if configuration list is not found, a list otherwise - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION const krb5_config_binding * KRB5_LIB_CALL -krb5_config_vget_list (krb5_context context, - const krb5_config_section *c, - va_list args) -{ - return _krb5_config_vget (context, c, krb5_config_list, args); -} - -/** - * Returns a "const char *" to a string in the configuration database. - * The string may not be valid after a reload of the configuration - * database so a caller should make a local copy if it needs to keep - * the string. - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param ... a list of names, terminated with NULL. - * - * @return NULL if configuration string not found, a string otherwise - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_config_get_string (krb5_context context, - const krb5_config_section *c, - ...) -{ - const char *ret; - va_list args; - - va_start(args, c); - ret = krb5_config_vget_string (context, c, args); - va_end(args); - return ret; -} - -/** - * Like krb5_config_get_string(), but uses a va_list instead of ... - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param args a va_list of arguments - * - * @return NULL if configuration string not found, a string otherwise - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_config_vget_string (krb5_context context, - const krb5_config_section *c, - va_list args) -{ - return _krb5_config_vget (context, c, krb5_config_string, args); -} - -/** - * Like krb5_config_vget_string(), but instead of returning NULL, - * instead return a default value. - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param def_value the default value to return if no configuration - * found in the database. - * @param args a va_list of arguments - * - * @return a configuration string - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_config_vget_string_default (krb5_context context, - const krb5_config_section *c, - const char *def_value, - va_list args) -{ - const char *ret; - - ret = krb5_config_vget_string (context, c, args); - if (ret == NULL) - ret = def_value; - return ret; -} - -/** - * Like krb5_config_get_string(), but instead of returning NULL, - * instead return a default value. - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param def_value the default value to return if no configuration - * found in the database. - * @param ... a list of names, terminated with NULL. - * - * @return a configuration string - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_config_get_string_default (krb5_context context, - const krb5_config_section *c, - const char *def_value, - ...) -{ - const char *ret; - va_list args; - - va_start(args, def_value); - ret = krb5_config_vget_string_default (context, c, def_value, args); - va_end(args); - return ret; -} - -static char * -next_component_string(char * begin, const char * delims, char **state) -{ - char * end; - - if (begin == NULL) - begin = *state; - - if (*begin == '\0') - return NULL; - - end = begin; - while (*end == '"') { - char * t = strchr(end + 1, '"'); - - if (t) - end = ++t; - else - end += strlen(end); - } - - if (*end != '\0') { - size_t pos; - - pos = strcspn(end, delims); - end = end + pos; - } - - if (*end != '\0') { - *end = '\0'; - *state = end + 1; - if (*begin == '"' && *(end - 1) == '"' && begin + 1 < end) { - begin++; *(end - 1) = '\0'; - } - return begin; - } - - *state = end; - if (*begin == '"' && *(end - 1) == '"' && begin + 1 < end) { - begin++; *(end - 1) = '\0'; - } - return begin; -} - -/** - * Get a list of configuration strings, free the result with - * krb5_config_free_strings(). - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param args a va_list of arguments - * - * @return TRUE or FALSE - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION char ** KRB5_LIB_CALL -krb5_config_vget_strings(krb5_context context, - const krb5_config_section *c, - va_list args) -{ - char **strings = NULL; - int nstr = 0; - const krb5_config_binding *b = NULL; - const char *p; - - while((p = _krb5_config_vget_next(context, c, &b, - krb5_config_string, args))) { - char *tmp = strdup(p); - char *pos = NULL; - char *s; - if(tmp == NULL) - goto cleanup; - s = next_component_string(tmp, " \t", &pos); - while(s){ - char **tmp2 = realloc(strings, (nstr + 1) * sizeof(*strings)); - if(tmp2 == NULL) - goto cleanup; - strings = tmp2; - strings[nstr] = strdup(s); - nstr++; - if(strings[nstr-1] == NULL) - goto cleanup; - s = next_component_string(NULL, " \t", &pos); - } - free(tmp); - } - if(nstr){ - char **tmp = realloc(strings, (nstr + 1) * sizeof(*strings)); - if(tmp == NULL) - goto cleanup; - strings = tmp; - strings[nstr] = NULL; - } - return strings; -cleanup: - while(nstr--) - free(strings[nstr]); - free(strings); - return NULL; - -} - -/** - * Get a list of configuration strings, free the result with - * krb5_config_free_strings(). - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param ... a list of names, terminated with NULL. - * - * @return TRUE or FALSE - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION char** KRB5_LIB_CALL -krb5_config_get_strings(krb5_context context, - const krb5_config_section *c, - ...) -{ - va_list ap; - char **ret; - va_start(ap, c); - ret = krb5_config_vget_strings(context, c, ap); - va_end(ap); - return ret; -} - -/** - * Free the resulting strings from krb5_config-get_strings() and - * krb5_config_vget_strings(). - * - * @param strings strings to free - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_config_free_strings(char **strings) -{ - char **s = strings; - while(s && *s){ - free(*s); - s++; - } - free(strings); -} - -/** - * Like krb5_config_get_bool_default() but with a va_list list of - * configuration selection. - * - * Configuration value to a boolean value, where yes/true and any - * non-zero number means TRUE and other value is FALSE. - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param def_value the default value to return if no configuration - * found in the database. - * @param args a va_list of arguments - * - * @return TRUE or FALSE - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_config_vget_bool_default (krb5_context context, - const krb5_config_section *c, - krb5_boolean def_value, - va_list args) -{ - const char *str; - str = krb5_config_vget_string (context, c, args); - if(str == NULL) - return def_value; - if(strcasecmp(str, "yes") == 0 || - strcasecmp(str, "true") == 0 || - atoi(str)) return TRUE; - return FALSE; -} - -/** - * krb5_config_get_bool() will convert the configuration - * option value to a boolean value, where yes/true and any non-zero - * number means TRUE and other value is FALSE. - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param args a va_list of arguments - * - * @return TRUE or FALSE - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_config_vget_bool (krb5_context context, - const krb5_config_section *c, - va_list args) -{ - return krb5_config_vget_bool_default (context, c, FALSE, args); -} - -/** - * krb5_config_get_bool_default() will convert the configuration - * option value to a boolean value, where yes/true and any non-zero - * number means TRUE and other value is FALSE. - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param def_value the default value to return if no configuration - * found in the database. - * @param ... a list of names, terminated with NULL. - * - * @return TRUE or FALSE - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_config_get_bool_default (krb5_context context, - const krb5_config_section *c, - krb5_boolean def_value, - ...) -{ - va_list ap; - krb5_boolean ret; - va_start(ap, def_value); - ret = krb5_config_vget_bool_default(context, c, def_value, ap); - va_end(ap); - return ret; -} - -/** - * Like krb5_config_get_bool() but with a va_list list of - * configuration selection. - * - * Configuration value to a boolean value, where yes/true and any - * non-zero number means TRUE and other value is FALSE. - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param ... a list of names, terminated with NULL. - * - * @return TRUE or FALSE - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_config_get_bool (krb5_context context, - const krb5_config_section *c, - ...) -{ - va_list ap; - krb5_boolean ret; - va_start(ap, c); - ret = krb5_config_vget_bool (context, c, ap); - va_end(ap); - return ret; -} - -/** - * Get the time from the configuration file using a relative time. - * - * Like krb5_config_get_time_default() but with a va_list list of - * configuration selection. - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param def_value the default value to return if no configuration - * found in the database. - * @param args a va_list of arguments - * - * @return parsed the time (or def_value on parse error) - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_vget_time_default (krb5_context context, - const krb5_config_section *c, - int def_value, - va_list args) -{ - const char *str; - krb5_deltat t; - - str = krb5_config_vget_string (context, c, args); - if(str == NULL) - return def_value; - if (krb5_string_to_deltat(str, &t)) - return def_value; - return t; -} - -/** - * Get the time from the configuration file using a relative time, for example: 1h30s - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param args a va_list of arguments - * - * @return parsed the time or -1 on error - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_vget_time (krb5_context context, - const krb5_config_section *c, - va_list args) -{ - return krb5_config_vget_time_default (context, c, -1, args); -} - -/** - * Get the time from the configuration file using a relative time, for example: 1h30s - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param def_value the default value to return if no configuration - * found in the database. - * @param ... a list of names, terminated with NULL. - * - * @return parsed the time (or def_value on parse error) - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_get_time_default (krb5_context context, - const krb5_config_section *c, - int def_value, - ...) -{ - va_list ap; - int ret; - va_start(ap, def_value); - ret = krb5_config_vget_time_default(context, c, def_value, ap); - va_end(ap); - return ret; -} - -/** - * Get the time from the configuration file using a relative time, for example: 1h30s - * - * @param context A Kerberos 5 context. - * @param c a configuration section, or NULL to use the section from context - * @param ... a list of names, terminated with NULL. - * - * @return parsed the time or -1 on error - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_get_time (krb5_context context, - const krb5_config_section *c, - ...) -{ - va_list ap; - int ret; - va_start(ap, c); - ret = krb5_config_vget_time (context, c, ap); - va_end(ap); - return ret; -} - - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_vget_int_default (krb5_context context, - const krb5_config_section *c, - int def_value, - va_list args) -{ - const char *str; - str = krb5_config_vget_string (context, c, args); - if(str == NULL) - return def_value; - else { - char *endptr; - long l; - l = strtol(str, &endptr, 0); - if (endptr == str) - return def_value; - else - return l; - } -} - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_vget_int (krb5_context context, - const krb5_config_section *c, - va_list args) -{ - return krb5_config_vget_int_default (context, c, -1, args); -} - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_get_int_default (krb5_context context, - const krb5_config_section *c, - int def_value, - ...) -{ - va_list ap; - int ret; - va_start(ap, def_value); - ret = krb5_config_vget_int_default(context, c, def_value, ap); - va_end(ap); - return ret; -} - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_get_int (krb5_context context, - const krb5_config_section *c, - ...) -{ - va_list ap; - int ret; - va_start(ap, c); - ret = krb5_config_vget_int (context, c, ap); - va_end(ap); - return ret; -} - - -#ifndef HEIMDAL_SMALLER - -/** - * Deprecated: configuration files are not strings - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_config_parse_string_multi(krb5_context context, - const char *string, - krb5_config_section **res) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - const char *str; - unsigned lineno = 0; - krb5_error_code ret; - struct fileptr f; - f.f = NULL; - f.s = string; - - ret = krb5_config_parse_debug (&f, res, &lineno, &str); - if (ret) { - krb5_set_error_message (context, ret, "%s:%u: %s", - "", lineno, str); - return ret; - } - return 0; -} - -#endif diff --git a/kerberosV/src/lib/krb5/constants.c b/kerberosV/src/lib/krb5/constants.c deleted file mode 100644 index bbb4832657f..00000000000 --- a/kerberosV/src/lib/krb5/constants.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 1997-2004 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" - -KRB5_LIB_VARIABLE const char *krb5_config_file = -#ifdef __APPLE__ -"~/Library/Preferences/com.apple.Kerberos.plist" PATH_SEP -"/Library/Preferences/com.apple.Kerberos.plist" PATH_SEP -"~/Library/Preferences/edu.mit.Kerberos" PATH_SEP -"/Library/Preferences/edu.mit.Kerberos" PATH_SEP -#endif /* __APPLE__ */ -"~/.krb5/config" PATH_SEP -SYSCONFDIR "/krb5.conf" -#ifdef _WIN32 -PATH_SEP "%{COMMON_APPDATA}/Kerberos/krb5.conf" -PATH_SEP "%{WINDOWS}/krb5.ini" -#else -PATH_SEP "/etc/krb5.conf" -#endif -; - -KRB5_LIB_VARIABLE const char *krb5_defkeyname = KEYTAB_DEFAULT; - -KRB5_LIB_VARIABLE const char *krb5_cc_type_api = "API"; -KRB5_LIB_VARIABLE const char *krb5_cc_type_file = "FILE"; -KRB5_LIB_VARIABLE const char *krb5_cc_type_memory = "MEMORY"; -KRB5_LIB_VARIABLE const char *krb5_cc_type_kcm = "KCM"; -KRB5_LIB_VARIABLE const char *krb5_cc_type_scc = "SCC"; diff --git a/kerberosV/src/lib/krb5/context.c b/kerberosV/src/lib/krb5/context.c deleted file mode 100644 index 99bf1b419b0..00000000000 --- a/kerberosV/src/lib/krb5/context.c +++ /dev/null @@ -1,1516 +0,0 @@ -/* - * Copyright (c) 1997 - 2010 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" -#include -#include - -#define INIT_FIELD(C, T, E, D, F) \ - (C)->E = krb5_config_get_ ## T ## _default ((C), NULL, (D), \ - "libdefaults", F, NULL) - -#define INIT_FLAG(C, O, V, D, F) \ - do { \ - if (krb5_config_get_bool_default((C), NULL, (D),"libdefaults", F, NULL)) { \ - (C)->O |= V; \ - } \ - } while(0) - -/* - * Set the list of etypes `ret_etypes' from the configuration variable - * `name' - */ - -static krb5_error_code -set_etypes (krb5_context context, - const char *name, - krb5_enctype **ret_enctypes) -{ - char **etypes_str; - krb5_enctype *etypes = NULL; - - etypes_str = krb5_config_get_strings(context, NULL, "libdefaults", - name, NULL); - if(etypes_str){ - int i, j, k; - for(i = 0; etypes_str[i]; i++); - etypes = malloc((i+1) * sizeof(*etypes)); - if (etypes == NULL) { - krb5_config_free_strings (etypes_str); - krb5_set_error_message (context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - for(j = 0, k = 0; j < i; j++) { - krb5_enctype e; - if(krb5_string_to_enctype(context, etypes_str[j], &e) != 0) - continue; - if (krb5_enctype_valid(context, e) != 0) - continue; - etypes[k++] = e; - } - etypes[k] = ETYPE_NULL; - krb5_config_free_strings(etypes_str); - } - *ret_enctypes = etypes; - return 0; -} - -/* - * read variables from the configuration file and set in `context' - */ - -static krb5_error_code -init_context_from_config_file(krb5_context context) -{ - krb5_error_code ret; - const char * tmp; - char **s; - krb5_enctype *tmptypes; - - INIT_FIELD(context, time, max_skew, 5 * 60, "clockskew"); - INIT_FIELD(context, time, kdc_timeout, 3, "kdc_timeout"); - INIT_FIELD(context, int, max_retries, 3, "max_retries"); - - INIT_FIELD(context, string, http_proxy, NULL, "http_proxy"); - - ret = krb5_config_get_bool_default(context, NULL, FALSE, - "libdefaults", - "allow_weak_crypto", NULL); - if (ret) { - krb5_enctype_enable(context, ETYPE_DES_CBC_CRC); - krb5_enctype_enable(context, ETYPE_DES_CBC_MD4); - krb5_enctype_enable(context, ETYPE_DES_CBC_MD5); - krb5_enctype_enable(context, ETYPE_DES_CBC_NONE); - krb5_enctype_enable(context, ETYPE_DES_CFB64_NONE); - krb5_enctype_enable(context, ETYPE_DES_PCBC_NONE); - } - - ret = set_etypes (context, "default_etypes", &tmptypes); - if(ret) - return ret; - free(context->etypes); - context->etypes = tmptypes; - - ret = set_etypes (context, "default_etypes_des", &tmptypes); - if(ret) - return ret; - free(context->etypes_des); - context->etypes_des = tmptypes; - - ret = set_etypes (context, "default_as_etypes", &tmptypes); - if(ret) - return ret; - free(context->as_etypes); - context->as_etypes = tmptypes; - - ret = set_etypes (context, "default_tgs_etypes", &tmptypes); - if(ret) - return ret; - free(context->tgs_etypes); - context->tgs_etypes = tmptypes; - - ret = set_etypes (context, "permitted_enctypes", &tmptypes); - if(ret) - return ret; - free(context->permitted_enctypes); - context->permitted_enctypes = tmptypes; - - /* default keytab name */ - tmp = NULL; - if(!issuid()) - tmp = getenv("KRB5_KTNAME"); - if(tmp != NULL) - context->default_keytab = tmp; - else - INIT_FIELD(context, string, default_keytab, - KEYTAB_DEFAULT, "default_keytab_name"); - - INIT_FIELD(context, string, default_keytab_modify, - NULL, "default_keytab_modify_name"); - - INIT_FIELD(context, string, time_fmt, - "%Y-%m-%dT%H:%M:%S", "time_format"); - - INIT_FIELD(context, string, date_fmt, - "%Y-%m-%d", "date_format"); - - INIT_FIELD(context, bool, log_utc, - FALSE, "log_utc"); - - - - /* init dns-proxy slime */ - tmp = krb5_config_get_string(context, NULL, "libdefaults", - "dns_proxy", NULL); - if(tmp) - roken_gethostby_setup(context->http_proxy, tmp); - krb5_free_host_realm (context, context->default_realms); - context->default_realms = NULL; - - { - krb5_addresses addresses; - char **adr, **a; - - krb5_set_extra_addresses(context, NULL); - adr = krb5_config_get_strings(context, NULL, - "libdefaults", - "extra_addresses", - NULL); - memset(&addresses, 0, sizeof(addresses)); - for(a = adr; a && *a; a++) { - ret = krb5_parse_address(context, *a, &addresses); - if (ret == 0) { - krb5_add_extra_addresses(context, &addresses); - krb5_free_addresses(context, &addresses); - } - } - krb5_config_free_strings(adr); - - krb5_set_ignore_addresses(context, NULL); - adr = krb5_config_get_strings(context, NULL, - "libdefaults", - "ignore_addresses", - NULL); - memset(&addresses, 0, sizeof(addresses)); - for(a = adr; a && *a; a++) { - ret = krb5_parse_address(context, *a, &addresses); - if (ret == 0) { - krb5_add_ignore_addresses(context, &addresses); - krb5_free_addresses(context, &addresses); - } - } - krb5_config_free_strings(adr); - } - - INIT_FIELD(context, bool, scan_interfaces, TRUE, "scan_interfaces"); - INIT_FIELD(context, int, fcache_vno, 0, "fcache_version"); - /* prefer dns_lookup_kdc over srv_lookup. */ - INIT_FIELD(context, bool, srv_lookup, TRUE, "srv_lookup"); - INIT_FIELD(context, bool, srv_lookup, context->srv_lookup, "dns_lookup_kdc"); - INIT_FIELD(context, int, large_msg_size, 1400, "large_message_size"); - INIT_FLAG(context, flags, KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME, TRUE, "dns_canonicalize_hostname"); - INIT_FLAG(context, flags, KRB5_CTX_F_CHECK_PAC, TRUE, "check_pac"); - context->default_cc_name = NULL; - context->default_cc_name_set = 0; - - s = krb5_config_get_strings(context, NULL, "logging", "krb5", NULL); - if(s) { - char **p; - krb5_initlog(context, "libkrb5", &context->debug_dest); - for(p = s; *p; p++) - krb5_addlog_dest(context, context->debug_dest, *p); - krb5_config_free_strings(s); - } - - tmp = krb5_config_get_string(context, NULL, "libdefaults", - "check-rd-req-server", NULL); - if (tmp == NULL && !issuid()) - tmp = getenv("KRB5_CHECK_RD_REQ_SERVER"); - if(tmp) { - if (strcasecmp(tmp, "ignore") == 0) - context->flags |= KRB5_CTX_F_RD_REQ_IGNORE; - } - - return 0; -} - -static krb5_error_code -cc_ops_register(krb5_context context) -{ - context->cc_ops = NULL; - context->num_cc_ops = 0; - -#ifndef KCM_IS_API_CACHE - krb5_cc_register(context, &krb5_acc_ops, TRUE); -#endif - krb5_cc_register(context, &krb5_fcc_ops, TRUE); - krb5_cc_register(context, &krb5_mcc_ops, TRUE); -#ifdef HAVE_SCC - krb5_cc_register(context, &krb5_scc_ops, TRUE); -#endif -#ifdef HAVE_KCM -#ifdef KCM_IS_API_CACHE - krb5_cc_register(context, &krb5_akcm_ops, TRUE); -#endif - krb5_cc_register(context, &krb5_kcm_ops, TRUE); -#endif - _krb5_load_ccache_plugins(context); - return 0; -} - -static krb5_error_code -cc_ops_copy(krb5_context context, const krb5_context src_context) -{ - const krb5_cc_ops **cc_ops; - - context->cc_ops = NULL; - context->num_cc_ops = 0; - - if (src_context->num_cc_ops == 0) - return 0; - - cc_ops = malloc(sizeof(cc_ops[0]) * src_context->num_cc_ops); - if (cc_ops == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - - memcpy(rk_UNCONST(cc_ops), src_context->cc_ops, - sizeof(cc_ops[0]) * src_context->num_cc_ops); - context->cc_ops = cc_ops; - context->num_cc_ops = src_context->num_cc_ops; - - return 0; -} - -static krb5_error_code -kt_ops_register(krb5_context context) -{ - context->num_kt_types = 0; - context->kt_types = NULL; - - krb5_kt_register (context, &krb5_fkt_ops); - krb5_kt_register (context, &krb5_wrfkt_ops); - krb5_kt_register (context, &krb5_javakt_ops); - krb5_kt_register (context, &krb5_mkt_ops); -#ifndef HEIMDAL_SMALLER - krb5_kt_register (context, &krb5_akf_ops); -#endif - krb5_kt_register (context, &krb5_any_ops); - return 0; -} - -static krb5_error_code -kt_ops_copy(krb5_context context, const krb5_context src_context) -{ - context->num_kt_types = 0; - context->kt_types = NULL; - - if (src_context->num_kt_types == 0) - return 0; - - context->kt_types = malloc(sizeof(context->kt_types[0]) * src_context->num_kt_types); - if (context->kt_types == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - context->num_kt_types = src_context->num_kt_types; - memcpy(context->kt_types, src_context->kt_types, - sizeof(context->kt_types[0]) * src_context->num_kt_types); - - return 0; -} - -static const char *sysplugin_dirs[] = { - LIBDIR "/plugin/krb5", -#ifdef __APPLE__ - "/Library/KerberosPlugins/KerberosFrameworkPlugins", - "/System/Library/KerberosPlugins/KerberosFrameworkPlugins", -#endif - NULL -}; - -static void -init_context_once(void *ctx) -{ - krb5_context context = ctx; - - _krb5_load_plugins(context, "krb5", sysplugin_dirs); - - bindtextdomain(HEIMDAL_TEXTDOMAIN, HEIMDAL_LOCALEDIR); -} - - -/** - * Initializes the context structure and reads the configuration file - * /etc/krb5.conf. The structure should be freed by calling - * krb5_free_context() when it is no longer being used. - * - * @param context pointer to returned context - * - * @return Returns 0 to indicate success. Otherwise an errno code is - * returned. Failure means either that something bad happened during - * initialization (typically ENOMEM) or that Kerberos should not be - * used ENXIO. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_context(krb5_context *context) -{ - static heim_base_once_t init_context = HEIM_BASE_ONCE_INIT; - krb5_context p; - krb5_error_code ret; - char **files; - - *context = NULL; - - p = calloc(1, sizeof(*p)); - if(!p) - return ENOMEM; - - p->mutex = malloc(sizeof(HEIMDAL_MUTEX)); - if (p->mutex == NULL) { - free(p); - return ENOMEM; - } - HEIMDAL_MUTEX_init(p->mutex); - - p->flags |= KRB5_CTX_F_HOMEDIR_ACCESS; - - ret = krb5_get_default_config_files(&files); - if(ret) - goto out; - ret = krb5_set_config_files(p, files); - krb5_free_config_files(files); - if(ret) - goto out; - - /* init error tables */ - krb5_init_ets(p); - cc_ops_register(p); - kt_ops_register(p); - -#ifdef PKINIT - ret = hx509_context_init(&p->hx509ctx); - if (ret) - goto out; -#endif - if (rk_SOCK_INIT()) - p->flags |= KRB5_CTX_F_SOCKETS_INITIALIZED; - -out: - if(ret) { - krb5_free_context(p); - p = NULL; - } else { - heim_base_once_f(&init_context, p, init_context_once); - } - *context = p; - return ret; -} - -#ifndef HEIMDAL_SMALLER - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_permitted_enctypes(krb5_context context, - krb5_enctype **etypes) -{ - return krb5_get_default_in_tkt_etypes(context, KRB5_PDU_NONE, etypes); -} - -/* - * - */ - -static krb5_error_code -copy_etypes (krb5_context context, - krb5_enctype *enctypes, - krb5_enctype **ret_enctypes) -{ - unsigned int i; - - for (i = 0; enctypes[i]; i++) - ; - i++; - - *ret_enctypes = malloc(sizeof(ret_enctypes[0]) * i); - if (*ret_enctypes == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy(*ret_enctypes, enctypes, sizeof(ret_enctypes[0]) * i); - return 0; -} - -/** - * Make a copy for the Kerberos 5 context, the new krb5_context shoud - * be freed with krb5_free_context(). - * - * @param context the Kerberos context to copy - * @param out the copy of the Kerberos, set to NULL error. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_context(krb5_context context, krb5_context *out) -{ - krb5_error_code ret; - krb5_context p; - - *out = NULL; - - p = calloc(1, sizeof(*p)); - if (p == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - p->mutex = malloc(sizeof(HEIMDAL_MUTEX)); - if (p->mutex == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(p); - return ENOMEM; - } - HEIMDAL_MUTEX_init(p->mutex); - - - if (context->default_cc_name) - p->default_cc_name = strdup(context->default_cc_name); - if (context->default_cc_name_env) - p->default_cc_name_env = strdup(context->default_cc_name_env); - - if (context->etypes) { - ret = copy_etypes(context, context->etypes, &p->etypes); - if (ret) - goto out; - } - if (context->etypes_des) { - ret = copy_etypes(context, context->etypes_des, &p->etypes_des); - if (ret) - goto out; - } - - if (context->default_realms) { - ret = krb5_copy_host_realm(context, - context->default_realms, &p->default_realms); - if (ret) - goto out; - } - - ret = _krb5_config_copy(context, context->cf, &p->cf); - if (ret) - goto out; - - /* XXX should copy */ - krb5_init_ets(p); - - cc_ops_copy(p, context); - kt_ops_copy(p, context); - -#if 0 /* XXX */ - if(context->warn_dest != NULL) - ; - if(context->debug_dest != NULL) - ; -#endif - - ret = krb5_set_extra_addresses(p, context->extra_addresses); - if (ret) - goto out; - ret = krb5_set_extra_addresses(p, context->ignore_addresses); - if (ret) - goto out; - - ret = _krb5_copy_send_to_kdc_func(p, context); - if (ret) - goto out; - - *out = p; - - return 0; - - out: - krb5_free_context(p); - return ret; -} - -#endif - -/** - * Frees the krb5_context allocated by krb5_init_context(). - * - * @param context context to be freed. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_context(krb5_context context) -{ - if (context->default_cc_name) - free(context->default_cc_name); - if (context->default_cc_name_env) - free(context->default_cc_name_env); - free(context->etypes); - free(context->etypes_des); - krb5_free_host_realm (context, context->default_realms); - krb5_config_file_free (context, context->cf); - free_error_table (context->et_list); - free(rk_UNCONST(context->cc_ops)); - free(context->kt_types); - krb5_clear_error_message(context); - if(context->warn_dest != NULL) - krb5_closelog(context, context->warn_dest); - if(context->debug_dest != NULL) - krb5_closelog(context, context->debug_dest); - krb5_set_extra_addresses(context, NULL); - krb5_set_ignore_addresses(context, NULL); - krb5_set_send_to_kdc_func(context, NULL, NULL); - -#ifdef PKINIT - if (context->hx509ctx) - hx509_context_free(&context->hx509ctx); -#endif - - HEIMDAL_MUTEX_destroy(context->mutex); - free(context->mutex); - if (context->flags & KRB5_CTX_F_SOCKETS_INITIALIZED) { - rk_SOCK_EXIT(); - } - - memset(context, 0, sizeof(*context)); - free(context); -} - -/** - * Reinit the context from a new set of filenames. - * - * @param context context to add configuration too. - * @param filenames array of filenames, end of list is indicated with a NULL filename. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_config_files(krb5_context context, char **filenames) -{ - krb5_error_code ret; - krb5_config_binding *tmp = NULL; - while(filenames != NULL && *filenames != NULL && **filenames != '\0') { - ret = krb5_config_parse_file_multi(context, *filenames, &tmp); - if(ret != 0 && ret != ENOENT && ret != EACCES && ret != EPERM) { - krb5_config_file_free(context, tmp); - return ret; - } - filenames++; - } -#if 0 - /* with this enabled and if there are no config files, Kerberos is - considererd disabled */ - if(tmp == NULL) - return ENXIO; -#endif - -#ifdef _WIN32 - _krb5_load_config_from_registry(context, &tmp); -#endif - - krb5_config_file_free(context, context->cf); - context->cf = tmp; - ret = init_context_from_config_file(context); - return ret; -} - -static krb5_error_code -add_file(char ***pfilenames, int *len, char *file) -{ - char **pp = *pfilenames; - int i; - - for(i = 0; i < *len; i++) { - if(strcmp(pp[i], file) == 0) { - free(file); - return 0; - } - } - - pp = realloc(*pfilenames, (*len + 2) * sizeof(*pp)); - if (pp == NULL) { - free(file); - return ENOMEM; - } - - pp[*len] = file; - pp[*len + 1] = NULL; - *pfilenames = pp; - *len += 1; - return 0; -} - -/* - * `pq' isn't free, it's up the the caller - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_prepend_config_files(const char *filelist, char **pq, char ***ret_pp) -{ - krb5_error_code ret; - const char *p, *q; - char **pp; - int len; - char *fn; - - pp = NULL; - - len = 0; - p = filelist; - while(1) { - ssize_t l; - q = p; - l = strsep_copy(&q, PATH_SEP, NULL, 0); - if(l == -1) - break; - fn = malloc(l + 1); - if(fn == NULL) { - krb5_free_config_files(pp); - return ENOMEM; - } - (void)strsep_copy(&p, PATH_SEP, fn, l + 1); - ret = add_file(&pp, &len, fn); - if (ret) { - krb5_free_config_files(pp); - return ret; - } - } - - if (pq != NULL) { - int i; - - for (i = 0; pq[i] != NULL; i++) { - fn = strdup(pq[i]); - if (fn == NULL) { - krb5_free_config_files(pp); - return ENOMEM; - } - ret = add_file(&pp, &len, fn); - if (ret) { - krb5_free_config_files(pp); - return ret; - } - } - } - - *ret_pp = pp; - return 0; -} - -/** - * Prepend the filename to the global configuration list. - * - * @param filelist a filename to add to the default list of filename - * @param pfilenames return array of filenames, should be freed with krb5_free_config_files(). - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_prepend_config_files_default(const char *filelist, char ***pfilenames) -{ - krb5_error_code ret; - char **defpp, **pp = NULL; - - ret = krb5_get_default_config_files(&defpp); - if (ret) - return ret; - - ret = krb5_prepend_config_files(filelist, defpp, &pp); - krb5_free_config_files(defpp); - if (ret) { - return ret; - } - *pfilenames = pp; - return 0; -} - -#ifdef _WIN32 - -/** - * Checks the registry for configuration file location - * - * Kerberos for Windows and other legacy Kerberos applications expect - * to find the configuration file location in the - * SOFTWARE\MIT\Kerberos registry key under the value "config". - */ -char * -_krb5_get_default_config_config_files_from_registry() -{ - static const char * KeyName = "Software\\MIT\\Kerberos"; - char *config_file = NULL; - LONG rcode; - HKEY key; - - rcode = RegOpenKeyEx(HKEY_CURRENT_USER, KeyName, 0, KEY_READ, &key); - if (rcode == ERROR_SUCCESS) { - config_file = _krb5_parse_reg_value_as_multi_string(NULL, key, "config", - REG_NONE, 0, PATH_SEP); - RegCloseKey(key); - } - - if (config_file) - return config_file; - - rcode = RegOpenKeyEx(HKEY_LOCAL_MACHINE, KeyName, 0, KEY_READ, &key); - if (rcode == ERROR_SUCCESS) { - config_file = _krb5_parse_reg_value_as_multi_string(NULL, key, "config", - REG_NONE, 0, PATH_SEP); - RegCloseKey(key); - } - - return config_file; -} - -#endif - -/** - * Get the global configuration list. - * - * @param pfilenames return array of filenames, should be freed with krb5_free_config_files(). - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_default_config_files(char ***pfilenames) -{ - const char *files = NULL; - - if (pfilenames == NULL) - return EINVAL; - if(!issuid()) - files = getenv("KRB5_CONFIG"); - -#ifdef _WIN32 - if (files == NULL) { - char * reg_files; - reg_files = _krb5_get_default_config_config_files_from_registry(); - if (reg_files != NULL) { - krb5_error_code code; - - code = krb5_prepend_config_files(reg_files, NULL, pfilenames); - free(reg_files); - - return code; - } - } -#endif - - if (files == NULL) - files = krb5_config_file; - - return krb5_prepend_config_files(files, NULL, pfilenames); -} - -/** - * Free a list of configuration files. - * - * @param filenames list, terminated with a NULL pointer, to be - * freed. NULL is an valid argument. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_config_files(char **filenames) -{ - char **p; - for(p = filenames; p && *p != NULL; p++) - free(*p); - free(filenames); -} - -/** - * Returns the list of Kerberos encryption types sorted in order of - * most preferred to least preferred encryption type. Note that some - * encryption types might be disabled, so you need to check with - * krb5_enctype_valid() before using the encryption type. - * - * @return list of enctypes, terminated with ETYPE_NULL. Its a static - * array completed into the Kerberos library so the content doesn't - * need to be freed. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION const krb5_enctype * KRB5_LIB_CALL -krb5_kerberos_enctypes(krb5_context context) -{ - static const krb5_enctype p[] = { - ETYPE_AES256_CTS_HMAC_SHA1_96, - ETYPE_AES128_CTS_HMAC_SHA1_96, - ETYPE_DES3_CBC_SHA1, - ETYPE_DES3_CBC_MD5, - ETYPE_ARCFOUR_HMAC_MD5, - ETYPE_DES_CBC_MD5, - ETYPE_DES_CBC_MD4, - ETYPE_DES_CBC_CRC, - ETYPE_NULL - }; - return p; -} - -/* - * - */ - -static krb5_error_code -copy_enctypes(krb5_context context, - const krb5_enctype *in, - krb5_enctype **out) -{ - krb5_enctype *p = NULL; - size_t m, n; - - for (n = 0; in[n]; n++) - ; - n++; - ALLOC(p, n); - if(p == NULL) - return krb5_enomem(context); - for (n = 0, m = 0; in[n]; n++) { - if (krb5_enctype_valid(context, in[n]) != 0) - continue; - p[m++] = in[n]; - } - p[m] = KRB5_ENCTYPE_NULL; - if (m == 0) { - free(p); - krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP, - N_("no valid enctype set", "")); - return KRB5_PROG_ETYPE_NOSUPP; - } - *out = p; - return 0; -} - - -/* - * set `etype' to a malloced list of the default enctypes - */ - -static krb5_error_code -default_etypes(krb5_context context, krb5_enctype **etype) -{ - const krb5_enctype *p = krb5_kerberos_enctypes(context); - return copy_enctypes(context, p, etype); -} - -/** - * Set the default encryption types that will be use in communcation - * with the KDC, clients and servers. - * - * @param context Kerberos 5 context. - * @param etypes Encryption types, array terminated with ETYPE_NULL (0). - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_default_in_tkt_etypes(krb5_context context, - const krb5_enctype *etypes) -{ - krb5_error_code ret; - krb5_enctype *p = NULL; - - if(etypes) { - ret = copy_enctypes(context, etypes, &p); - if (ret) - return ret; - } - if(context->etypes) - free(context->etypes); - context->etypes = p; - return 0; -} - -/** - * Get the default encryption types that will be use in communcation - * with the KDC, clients and servers. - * - * @param context Kerberos 5 context. - * @param etypes Encryption types, array terminated with - * ETYPE_NULL(0), caller should free array with krb5_xfree(): - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_default_in_tkt_etypes(krb5_context context, - krb5_pdu pdu_type, - krb5_enctype **etypes) -{ - krb5_enctype *enctypes = NULL; - krb5_error_code ret; - krb5_enctype *p; - - heim_assert(pdu_type == KRB5_PDU_AS_REQUEST || - pdu_type == KRB5_PDU_TGS_REQUEST || - pdu_type == KRB5_PDU_NONE, "pdu contant not as expected"); - - if (pdu_type == KRB5_PDU_AS_REQUEST && context->as_etypes != NULL) - enctypes = context->as_etypes; - else if (pdu_type == KRB5_PDU_TGS_REQUEST && context->tgs_etypes != NULL) - enctypes = context->tgs_etypes; - else if (context->etypes != NULL) - enctypes = context->etypes; - - if (enctypes != NULL) { - ret = copy_enctypes(context, enctypes, &p); - if (ret) - return ret; - } else { - ret = default_etypes(context, &p); - if (ret) - return ret; - } - *etypes = p; - return 0; -} - -/** - * Init the built-in ets in the Kerberos library. - * - * @param context kerberos context to add the ets too - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_init_ets(krb5_context context) -{ - if(context->et_list == NULL){ - krb5_add_et_list(context, initialize_krb5_error_table_r); - krb5_add_et_list(context, initialize_asn1_error_table_r); - krb5_add_et_list(context, initialize_heim_error_table_r); - - krb5_add_et_list(context, initialize_k524_error_table_r); - -#ifdef COM_ERR_BINDDOMAIN_krb5 - bindtextdomain(COM_ERR_BINDDOMAIN_krb5, HEIMDAL_LOCALEDIR); - bindtextdomain(COM_ERR_BINDDOMAIN_asn1, HEIMDAL_LOCALEDIR); - bindtextdomain(COM_ERR_BINDDOMAIN_heim, HEIMDAL_LOCALEDIR); - bindtextdomain(COM_ERR_BINDDOMAIN_k524, HEIMDAL_LOCALEDIR); -#endif - -#ifdef PKINIT - krb5_add_et_list(context, initialize_hx_error_table_r); -#ifdef COM_ERR_BINDDOMAIN_hx - bindtextdomain(COM_ERR_BINDDOMAIN_hx, HEIMDAL_LOCALEDIR); -#endif -#endif - } -} - -/** - * Make the kerberos library default to the admin KDC. - * - * @param context Kerberos 5 context. - * @param flag boolean flag to select if the use the admin KDC or not. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_set_use_admin_kdc (krb5_context context, krb5_boolean flag) -{ - context->use_admin_kdc = flag; -} - -/** - * Make the kerberos library default to the admin KDC. - * - * @param context Kerberos 5 context. - * - * @return boolean flag to telling the context will use admin KDC as the default KDC. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_get_use_admin_kdc (krb5_context context) -{ - return context->use_admin_kdc; -} - -/** - * Add extra address to the address list that the library will add to - * the client's address list when communicating with the KDC. - * - * @param context Kerberos 5 context. - * @param addresses addreses to add - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_add_extra_addresses(krb5_context context, krb5_addresses *addresses) -{ - - if(context->extra_addresses) - return krb5_append_addresses(context, - context->extra_addresses, addresses); - else - return krb5_set_extra_addresses(context, addresses); -} - -/** - * Set extra address to the address list that the library will add to - * the client's address list when communicating with the KDC. - * - * @param context Kerberos 5 context. - * @param addresses addreses to set - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_extra_addresses(krb5_context context, const krb5_addresses *addresses) -{ - if(context->extra_addresses) - krb5_free_addresses(context, context->extra_addresses); - - if(addresses == NULL) { - if(context->extra_addresses != NULL) { - free(context->extra_addresses); - context->extra_addresses = NULL; - } - return 0; - } - if(context->extra_addresses == NULL) { - context->extra_addresses = malloc(sizeof(*context->extra_addresses)); - if(context->extra_addresses == NULL) { - krb5_set_error_message (context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - } - return krb5_copy_addresses(context, addresses, context->extra_addresses); -} - -/** - * Get extra address to the address list that the library will add to - * the client's address list when communicating with the KDC. - * - * @param context Kerberos 5 context. - * @param addresses addreses to set - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_extra_addresses(krb5_context context, krb5_addresses *addresses) -{ - if(context->extra_addresses == NULL) { - memset(addresses, 0, sizeof(*addresses)); - return 0; - } - return krb5_copy_addresses(context,context->extra_addresses, addresses); -} - -/** - * Add extra addresses to ignore when fetching addresses from the - * underlaying operating system. - * - * @param context Kerberos 5 context. - * @param addresses addreses to ignore - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_add_ignore_addresses(krb5_context context, krb5_addresses *addresses) -{ - - if(context->ignore_addresses) - return krb5_append_addresses(context, - context->ignore_addresses, addresses); - else - return krb5_set_ignore_addresses(context, addresses); -} - -/** - * Set extra addresses to ignore when fetching addresses from the - * underlaying operating system. - * - * @param context Kerberos 5 context. - * @param addresses addreses to ignore - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_ignore_addresses(krb5_context context, const krb5_addresses *addresses) -{ - if(context->ignore_addresses) - krb5_free_addresses(context, context->ignore_addresses); - if(addresses == NULL) { - if(context->ignore_addresses != NULL) { - free(context->ignore_addresses); - context->ignore_addresses = NULL; - } - return 0; - } - if(context->ignore_addresses == NULL) { - context->ignore_addresses = malloc(sizeof(*context->ignore_addresses)); - if(context->ignore_addresses == NULL) { - krb5_set_error_message (context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - } - return krb5_copy_addresses(context, addresses, context->ignore_addresses); -} - -/** - * Get extra addresses to ignore when fetching addresses from the - * underlaying operating system. - * - * @param context Kerberos 5 context. - * @param addresses list addreses ignored - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_ignore_addresses(krb5_context context, krb5_addresses *addresses) -{ - if(context->ignore_addresses == NULL) { - memset(addresses, 0, sizeof(*addresses)); - return 0; - } - return krb5_copy_addresses(context, context->ignore_addresses, addresses); -} - -/** - * Set version of fcache that the library should use. - * - * @param context Kerberos 5 context. - * @param version version number. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_fcache_version(krb5_context context, int version) -{ - context->fcache_vno = version; - return 0; -} - -/** - * Get version of fcache that the library should use. - * - * @param context Kerberos 5 context. - * @param version version number. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_fcache_version(krb5_context context, int *version) -{ - *version = context->fcache_vno; - return 0; -} - -/** - * Runtime check if the Kerberos library was complied with thread support. - * - * @return TRUE if the library was compiled with thread support, FALSE if not. - * - * @ingroup krb5 - */ - - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_is_thread_safe(void) -{ -#ifdef ENABLE_PTHREAD_SUPPORT - return TRUE; -#else - return FALSE; -#endif -} - -/** - * Set if the library should use DNS to canonicalize hostnames. - * - * @param context Kerberos 5 context. - * @param flag if its dns canonicalizion is used or not. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_set_dns_canonicalize_hostname (krb5_context context, krb5_boolean flag) -{ - if (flag) - context->flags |= KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME; - else - context->flags &= ~KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME; -} - -/** - * Get if the library uses DNS to canonicalize hostnames. - * - * @param context Kerberos 5 context. - * - * @return return non zero if the library uses DNS to canonicalize hostnames. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_get_dns_canonicalize_hostname (krb5_context context) -{ - return (context->flags & KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME) ? 1 : 0; -} - -/** - * Get current offset in time to the KDC. - * - * @param context Kerberos 5 context. - * @param sec seconds part of offset. - * @param usec micro seconds part of offset. - * - * @return returns zero - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_kdc_sec_offset (krb5_context context, int32_t *sec, int32_t *usec) -{ - if (sec) - *sec = context->kdc_sec_offset; - if (usec) - *usec = context->kdc_usec_offset; - return 0; -} - -/** - * Set current offset in time to the KDC. - * - * @param context Kerberos 5 context. - * @param sec seconds part of offset. - * @param usec micro seconds part of offset. - * - * @return returns zero - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_kdc_sec_offset (krb5_context context, int32_t sec, int32_t usec) -{ - context->kdc_sec_offset = sec; - if (usec >= 0) - context->kdc_usec_offset = usec; - return 0; -} - -/** - * Get max time skew allowed. - * - * @param context Kerberos 5 context. - * - * @return timeskew in seconds. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL -krb5_get_max_time_skew (krb5_context context) -{ - return context->max_skew; -} - -/** - * Set max time skew allowed. - * - * @param context Kerberos 5 context. - * @param t timeskew in seconds. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_set_max_time_skew (krb5_context context, time_t t) -{ - context->max_skew = t; -} - -/* - * Init encryption types in len, val with etypes. - * - * @param context Kerberos 5 context. - * @param pdu_type type of pdu - * @param len output length of val. - * @param val output array of enctypes. - * @param etypes etypes to set val and len to, if NULL, use default enctypes. - - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_init_etype(krb5_context context, - krb5_pdu pdu_type, - unsigned *len, - krb5_enctype **val, - const krb5_enctype *etypes) -{ - krb5_error_code ret; - - if (etypes == NULL) - ret = krb5_get_default_in_tkt_etypes(context, pdu_type, val); - else - ret = copy_enctypes(context, etypes, val); - if (ret) - return ret; - - if (len) { - *len = 0; - while ((*val)[*len] != KRB5_ENCTYPE_NULL) - (*len)++; - } - return 0; -} - -/* - * Allow homedir accces - */ - -static HEIMDAL_MUTEX homedir_mutex = HEIMDAL_MUTEX_INITIALIZER; -static krb5_boolean allow_homedir = TRUE; - -krb5_boolean -_krb5_homedir_access(krb5_context context) -{ - krb5_boolean allow; - -#ifdef HAVE_GETEUID - /* is never allowed for root */ - if (geteuid() == 0) - return FALSE; -#endif - - if (context && (context->flags & KRB5_CTX_F_HOMEDIR_ACCESS) == 0) - return FALSE; - - HEIMDAL_MUTEX_lock(&homedir_mutex); - allow = allow_homedir; - HEIMDAL_MUTEX_unlock(&homedir_mutex); - return allow; -} - -/** - * Enable and disable home directory access on either the global state - * or the krb5_context state. By calling krb5_set_home_dir_access() - * with context set to NULL, the global state is configured otherwise - * the state for the krb5_context is modified. - * - * For home directory access to be allowed, both the global state and - * the krb5_context state have to be allowed. - * - * Administrator (root user), never uses the home directory. - * - * @param context a Kerberos 5 context or NULL - * @param allow allow if TRUE home directory - * @return the old value - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_set_home_dir_access(krb5_context context, krb5_boolean allow) -{ - krb5_boolean old; - if (context) { - old = (context->flags & KRB5_CTX_F_HOMEDIR_ACCESS) ? TRUE : FALSE; - if (allow) - context->flags |= KRB5_CTX_F_HOMEDIR_ACCESS; - else - context->flags &= ~KRB5_CTX_F_HOMEDIR_ACCESS; - } else { - HEIMDAL_MUTEX_lock(&homedir_mutex); - old = allow_homedir; - allow_homedir = allow; - HEIMDAL_MUTEX_unlock(&homedir_mutex); - } - - return old; -} diff --git a/kerberosV/src/lib/krb5/convert_creds.c b/kerberosV/src/lib/krb5/convert_creds.c deleted file mode 100644 index fc371c63776..00000000000 --- a/kerberosV/src/lib/krb5/convert_creds.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 1997 - 2004 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 "krb5_locl.h" -#include "krb5-v4compat.h" - -#ifndef HEIMDAL_SMALLER - -/** - * Convert the v5 credentials in in_cred to v4-dito in v4creds. This - * is done by sending them to the 524 function in the KDC. If - * `in_cred' doesn't contain a DES session key, then a new one is - * gotten from the KDC and stored in the cred cache `ccache'. - * - * @param context Kerberos 5 context. - * @param in_cred the credential to convert - * @param v4creds the converted credential - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5_v4compat - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb524_convert_creds_kdc(krb5_context context, - krb5_creds *in_cred, - struct credentials *v4creds) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - memset(v4creds, 0, sizeof(*v4creds)); - krb5_set_error_message(context, EINVAL, - N_("krb524_convert_creds_kdc not supported", "")); - return EINVAL; -} - -/** - * Convert the v5 credentials in in_cred to v4-dito in v4creds, - * check the credential cache ccache before checking with the KDC. - * - * @param context Kerberos 5 context. - * @param ccache credential cache used to check for des-ticket. - * @param in_cred the credential to convert - * @param v4creds the converted credential - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5_v4compat - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb524_convert_creds_kdc_ccache(krb5_context context, - krb5_ccache ccache, - krb5_creds *in_cred, - struct credentials *v4creds) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - memset(v4creds, 0, sizeof(*v4creds)); - krb5_set_error_message(context, EINVAL, - N_("krb524_convert_creds_kdc_ccache not supported", "")); - return EINVAL; -} - -#endif diff --git a/kerberosV/src/lib/krb5/copy_host_realm.c b/kerberosV/src/lib/krb5/copy_host_realm.c deleted file mode 100644 index 73bc117f12a..00000000000 --- a/kerberosV/src/lib/krb5/copy_host_realm.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 "krb5_locl.h" - -/** - * Copy the list of realms from `from' to `to'. - * - * @param context Kerberos 5 context. - * @param from list of realms to copy from. - * @param to list of realms to copy to, free list of krb5_free_host_realm(). - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_host_realm(krb5_context context, - const krb5_realm *from, - krb5_realm **to) -{ - unsigned int n, i; - const krb5_realm *p; - - for (n = 1, p = from; *p != NULL; ++p) - ++n; - - *to = calloc (n, sizeof(**to)); - if (*to == NULL) { - krb5_set_error_message (context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - for (i = 0, p = from; *p != NULL; ++p, ++i) { - (*to)[i] = strdup(*p); - if ((*to)[i] == NULL) { - krb5_free_host_realm (context, *to); - krb5_set_error_message (context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - } - return 0; -} diff --git a/kerberosV/src/lib/krb5/crc.c b/kerberosV/src/lib/krb5/crc.c deleted file mode 100644 index eab946541db..00000000000 --- a/kerberosV/src/lib/krb5/crc.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "krb5_locl.h" - -static u_long table[256]; - -#define CRC_GEN 0xEDB88320L - -void -_krb5_crc_init_table(void) -{ - static int flag = 0; - unsigned long crc, poly; - unsigned int i, j; - - if(flag) return; - poly = CRC_GEN; - for (i = 0; i < 256; i++) { - crc = i; - for (j = 8; j > 0; j--) { - if (crc & 1) { - crc = (crc >> 1) ^ poly; - } else { - crc >>= 1; - } - } - table[i] = crc; - } - flag = 1; -} - -uint32_t -_krb5_crc_update (const char *p, size_t len, uint32_t res) -{ - while (len--) - res = table[(res ^ *p++) & 0xFF] ^ (res >> 8); - return res & 0xFFFFFFFF; -} diff --git a/kerberosV/src/lib/krb5/creds.c b/kerberosV/src/lib/krb5/creds.c deleted file mode 100644 index 7ef8eb96095..00000000000 --- a/kerberosV/src/lib/krb5/creds.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright (c) 1997 - 2005 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 "krb5_locl.h" - -/** - * Free content of krb5_creds. - * - * @param context Kerberos 5 context. - * @param c krb5_creds to free. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_cred_contents (krb5_context context, krb5_creds *c) -{ - krb5_free_principal (context, c->client); - c->client = NULL; - krb5_free_principal (context, c->server); - c->server = NULL; - krb5_free_keyblock_contents (context, &c->session); - krb5_data_free (&c->ticket); - krb5_data_free (&c->second_ticket); - free_AuthorizationData (&c->authdata); - krb5_free_addresses (context, &c->addresses); - memset(c, 0, sizeof(*c)); - return 0; -} - -/** - * Copy content of krb5_creds. - * - * @param context Kerberos 5 context. - * @param incred source credential - * @param c destination credential, free with krb5_free_cred_contents(). - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_creds_contents (krb5_context context, - const krb5_creds *incred, - krb5_creds *c) -{ - krb5_error_code ret; - - memset(c, 0, sizeof(*c)); - ret = krb5_copy_principal (context, incred->client, &c->client); - if (ret) - goto fail; - ret = krb5_copy_principal (context, incred->server, &c->server); - if (ret) - goto fail; - ret = krb5_copy_keyblock_contents (context, &incred->session, &c->session); - if (ret) - goto fail; - c->times = incred->times; - ret = krb5_data_copy (&c->ticket, - incred->ticket.data, - incred->ticket.length); - if (ret) - goto fail; - ret = krb5_data_copy (&c->second_ticket, - incred->second_ticket.data, - incred->second_ticket.length); - if (ret) - goto fail; - ret = copy_AuthorizationData(&incred->authdata, &c->authdata); - if (ret) - goto fail; - ret = krb5_copy_addresses (context, - &incred->addresses, - &c->addresses); - if (ret) - goto fail; - c->flags = incred->flags; - return 0; - -fail: - krb5_free_cred_contents (context, c); - return ret; -} - -/** - * Copy krb5_creds. - * - * @param context Kerberos 5 context. - * @param incred source credential - * @param outcred destination credential, free with krb5_free_creds(). - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_creds (krb5_context context, - const krb5_creds *incred, - krb5_creds **outcred) -{ - krb5_creds *c; - - c = malloc (sizeof (*c)); - if (c == NULL) { - krb5_set_error_message (context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - memset (c, 0, sizeof(*c)); - *outcred = c; - return krb5_copy_creds_contents (context, incred, c); -} - -/** - * Free krb5_creds. - * - * @param context Kerberos 5 context. - * @param c krb5_creds to free. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_creds (krb5_context context, krb5_creds *c) -{ - krb5_free_cred_contents (context, c); - free (c); - return 0; -} - -/* XXX this do not belong here */ -static krb5_boolean -krb5_times_equal(const krb5_times *a, const krb5_times *b) -{ - return a->starttime == b->starttime && - a->authtime == b->authtime && - a->endtime == b->endtime && - a->renew_till == b->renew_till; -} - -/** - * Return TRUE if `mcreds' and `creds' are equal (`whichfields' - * determines what equal means). - * - * - * The following flags, set in whichfields affects the comparison: - * - KRB5_TC_MATCH_SRV_NAMEONLY Consider all realms equal when comparing the service principal. - * - KRB5_TC_MATCH_KEYTYPE Compare enctypes. - * - KRB5_TC_MATCH_FLAGS_EXACT Make sure that the ticket flags are identical. - * - KRB5_TC_MATCH_FLAGS Make sure that all ticket flags set in mcreds are also present in creds . - * - KRB5_TC_MATCH_TIMES_EXACT Compares the ticket times exactly. - * - KRB5_TC_MATCH_TIMES Compares only the expiration times of the creds. - * - KRB5_TC_MATCH_AUTHDATA Compares the authdata fields. - * - KRB5_TC_MATCH_2ND_TKT Compares the second tickets (used by user-to-user authentication). - * - KRB5_TC_MATCH_IS_SKEY Compares the existance of the second ticket. - * - * @param context Kerberos 5 context. - * @param whichfields which fields to compare. - * @param mcreds cred to compare with. - * @param creds cred to compare with. - * - * @return return TRUE if mcred and creds are equal, FALSE if not. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_compare_creds(krb5_context context, krb5_flags whichfields, - const krb5_creds * mcreds, const krb5_creds * creds) -{ - krb5_boolean match = TRUE; - - if (match && mcreds->server) { - if (whichfields & (KRB5_TC_DONT_MATCH_REALM | KRB5_TC_MATCH_SRV_NAMEONLY)) - match = krb5_principal_compare_any_realm (context, mcreds->server, - creds->server); - else - match = krb5_principal_compare (context, mcreds->server, - creds->server); - } - - if (match && mcreds->client) { - if(whichfields & KRB5_TC_DONT_MATCH_REALM) - match = krb5_principal_compare_any_realm (context, mcreds->client, - creds->client); - else - match = krb5_principal_compare (context, mcreds->client, - creds->client); - } - - if (match && (whichfields & KRB5_TC_MATCH_KEYTYPE)) - match = mcreds->session.keytype == creds->session.keytype; - - if (match && (whichfields & KRB5_TC_MATCH_FLAGS_EXACT)) - match = mcreds->flags.i == creds->flags.i; - - if (match && (whichfields & KRB5_TC_MATCH_FLAGS)) - match = (creds->flags.i & mcreds->flags.i) == mcreds->flags.i; - - if (match && (whichfields & KRB5_TC_MATCH_TIMES_EXACT)) - match = krb5_times_equal(&mcreds->times, &creds->times); - - if (match && (whichfields & KRB5_TC_MATCH_TIMES)) - /* compare only expiration times */ - match = (mcreds->times.renew_till <= creds->times.renew_till) && - (mcreds->times.endtime <= creds->times.endtime); - - if (match && (whichfields & KRB5_TC_MATCH_AUTHDATA)) { - unsigned int i; - if(mcreds->authdata.len != creds->authdata.len) - match = FALSE; - else - for(i = 0; match && i < mcreds->authdata.len; i++) - match = (mcreds->authdata.val[i].ad_type == - creds->authdata.val[i].ad_type) && - (krb5_data_cmp(&mcreds->authdata.val[i].ad_data, - &creds->authdata.val[i].ad_data) == 0); - } - if (match && (whichfields & KRB5_TC_MATCH_2ND_TKT)) - match = (krb5_data_cmp(&mcreds->second_ticket, &creds->second_ticket) == 0); - - if (match && (whichfields & KRB5_TC_MATCH_IS_SKEY)) - match = ((mcreds->second_ticket.length == 0) == - (creds->second_ticket.length == 0)); - - return match; -} - -/** - * Returns the ticket flags for the credentials in creds. - * See also krb5_ticket_get_flags(). - * - * @param creds credential to get ticket flags from - * - * @return ticket flags - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL -krb5_creds_get_ticket_flags(krb5_creds *creds) -{ - return TicketFlags2int(creds->flags.b); -} diff --git a/kerberosV/src/lib/krb5/crypto-aes.c b/kerberosV/src/lib/krb5/crypto-aes.c deleted file mode 100644 index b97854206ce..00000000000 --- a/kerberosV/src/lib/krb5/crypto-aes.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -/* - * AES - */ - -static struct _krb5_key_type keytype_aes128 = { - ENCTYPE_AES128_CTS_HMAC_SHA1_96, - "aes-128", - 128, - 16, - sizeof(struct _krb5_evp_schedule), - NULL, - _krb5_evp_schedule, - _krb5_AES_salt, - NULL, - _krb5_evp_cleanup, - EVP_aes_128_cbc -}; - -static struct _krb5_key_type keytype_aes256 = { - ENCTYPE_AES256_CTS_HMAC_SHA1_96, - "aes-256", - 256, - 32, - sizeof(struct _krb5_evp_schedule), - NULL, - _krb5_evp_schedule, - _krb5_AES_salt, - NULL, - _krb5_evp_cleanup, - EVP_aes_256_cbc -}; - -struct _krb5_checksum_type _krb5_checksum_hmac_sha1_aes128 = { - CKSUMTYPE_HMAC_SHA1_96_AES_128, - "hmac-sha1-96-aes128", - 64, - 12, - F_KEYED | F_CPROOF | F_DERIVED, - _krb5_SP_HMAC_SHA1_checksum, - NULL -}; - -struct _krb5_checksum_type _krb5_checksum_hmac_sha1_aes256 = { - CKSUMTYPE_HMAC_SHA1_96_AES_256, - "hmac-sha1-96-aes256", - 64, - 12, - F_KEYED | F_CPROOF | F_DERIVED, - _krb5_SP_HMAC_SHA1_checksum, - NULL -}; - -static krb5_error_code -AES_PRF(krb5_context context, - krb5_crypto crypto, - const krb5_data *in, - krb5_data *out) -{ - struct _krb5_checksum_type *ct = crypto->et->checksum; - krb5_error_code ret; - Checksum result; - krb5_keyblock *derived; - - result.cksumtype = ct->type; - ret = krb5_data_alloc(&result.checksum, ct->checksumsize); - if (ret) { - krb5_set_error_message(context, ret, N_("malloc: out memory", "")); - return ret; - } - - ret = (*ct->checksum)(context, NULL, in->data, in->length, 0, &result); - if (ret) { - krb5_data_free(&result.checksum); - return ret; - } - - if (result.checksum.length < crypto->et->blocksize) - krb5_abortx(context, "internal prf error"); - - derived = NULL; - ret = krb5_derive_key(context, crypto->key.key, - crypto->et->type, "prf", 3, &derived); - if (ret) - krb5_abortx(context, "krb5_derive_key"); - - ret = krb5_data_alloc(out, crypto->et->blocksize); - if (ret) - krb5_abortx(context, "malloc failed"); - - { - const EVP_CIPHER *c = (*crypto->et->keytype->evp)(); - EVP_CIPHER_CTX ctx; - - EVP_CIPHER_CTX_init(&ctx); /* ivec all zero */ - EVP_CipherInit_ex(&ctx, c, NULL, derived->keyvalue.data, NULL, 1); - EVP_Cipher(&ctx, out->data, result.checksum.data, - crypto->et->blocksize); - EVP_CIPHER_CTX_cleanup(&ctx); - } - - krb5_data_free(&result.checksum); - krb5_free_keyblock(context, derived); - - return ret; -} - -struct _krb5_encryption_type _krb5_enctype_aes128_cts_hmac_sha1 = { - ETYPE_AES128_CTS_HMAC_SHA1_96, - "aes128-cts-hmac-sha1-96", - 16, - 1, - 16, - &keytype_aes128, - &_krb5_checksum_sha1, - &_krb5_checksum_hmac_sha1_aes128, - F_DERIVED, - _krb5_evp_encrypt_cts, - 16, - AES_PRF -}; - -struct _krb5_encryption_type _krb5_enctype_aes256_cts_hmac_sha1 = { - ETYPE_AES256_CTS_HMAC_SHA1_96, - "aes256-cts-hmac-sha1-96", - 16, - 1, - 16, - &keytype_aes256, - &_krb5_checksum_sha1, - &_krb5_checksum_hmac_sha1_aes256, - F_DERIVED, - _krb5_evp_encrypt_cts, - 16, - AES_PRF -}; diff --git a/kerberosV/src/lib/krb5/crypto-algs.c b/kerberosV/src/lib/krb5/crypto-algs.c deleted file mode 100644 index ed31377bd07..00000000000 --- a/kerberosV/src/lib/krb5/crypto-algs.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -#ifndef HEIMDAL_SMALLER -#define DES3_OLD_ENCTYPE 1 -#endif - -struct _krb5_checksum_type *_krb5_checksum_types[] = { - &_krb5_checksum_none, -#ifdef HEIM_WEAK_CRYPTO - &_krb5_checksum_crc32, - &_krb5_checksum_rsa_md4, - &_krb5_checksum_rsa_md4_des, - &_krb5_checksum_rsa_md5_des, -#endif -#ifdef DES3_OLD_ENCTYPE - &_krb5_checksum_rsa_md5_des3, -#endif - &_krb5_checksum_rsa_md5, - &_krb5_checksum_sha1, - &_krb5_checksum_hmac_sha1_des3, - &_krb5_checksum_hmac_sha1_aes128, - &_krb5_checksum_hmac_sha1_aes256, - &_krb5_checksum_hmac_md5 -}; - -int _krb5_num_checksums - = sizeof(_krb5_checksum_types) / sizeof(_krb5_checksum_types[0]); - -/* - * these should currently be in reverse preference order. - * (only relevant for !F_PSEUDO) */ - -struct _krb5_encryption_type *_krb5_etypes[] = { - &_krb5_enctype_aes256_cts_hmac_sha1, - &_krb5_enctype_aes128_cts_hmac_sha1, - &_krb5_enctype_des3_cbc_sha1, - &_krb5_enctype_des3_cbc_none, /* used by the gss-api mech */ - &_krb5_enctype_arcfour_hmac_md5, -#ifdef DES3_OLD_ENCTYPE - &_krb5_enctype_des3_cbc_md5, - &_krb5_enctype_old_des3_cbc_sha1, -#endif -#ifdef HEIM_WEAK_CRYPTO - &_krb5_enctype_des_cbc_md5, - &_krb5_enctype_des_cbc_md4, - &_krb5_enctype_des_cbc_crc, - &_krb5_enctype_des_cbc_none, - &_krb5_enctype_des_cfb64_none, - &_krb5_enctype_des_pcbc_none, -#endif - &_krb5_enctype_null -}; - -int _krb5_num_etypes = sizeof(_krb5_etypes) / sizeof(_krb5_etypes[0]); diff --git a/kerberosV/src/lib/krb5/crypto-arcfour.c b/kerberosV/src/lib/krb5/crypto-arcfour.c deleted file mode 100644 index 7f7e21d0d22..00000000000 --- a/kerberosV/src/lib/krb5/crypto-arcfour.c +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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. - */ - -/* - * ARCFOUR - */ - -#include "krb5_locl.h" - -static struct _krb5_key_type keytype_arcfour = { - ENCTYPE_ARCFOUR_HMAC_MD5, - "arcfour", - 128, - 16, - sizeof(struct _krb5_evp_schedule), - NULL, - _krb5_evp_schedule, - _krb5_arcfour_salt, - NULL, - _krb5_evp_cleanup, - EVP_rc4 -}; - -/* - * checksum according to section 5. of draft-brezak-win2k-krb-rc4-hmac-03.txt - */ - -krb5_error_code -_krb5_HMAC_MD5_checksum(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *result) -{ - EVP_MD_CTX *m; - struct _krb5_checksum_type *c = _krb5_find_checksum (CKSUMTYPE_RSA_MD5); - const char signature[] = "signaturekey"; - Checksum ksign_c; - struct _krb5_key_data ksign; - krb5_keyblock kb; - unsigned char t[4]; - unsigned char tmp[16]; - unsigned char ksign_c_data[16]; - krb5_error_code ret; - - m = EVP_MD_CTX_create(); - if (m == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ksign_c.checksum.length = sizeof(ksign_c_data); - ksign_c.checksum.data = ksign_c_data; - ret = _krb5_internal_hmac(context, c, signature, sizeof(signature), - 0, key, &ksign_c); - if (ret) { - EVP_MD_CTX_destroy(m); - return ret; - } - ksign.key = &kb; - kb.keyvalue = ksign_c.checksum; - EVP_DigestInit_ex(m, EVP_md5(), NULL); - t[0] = (usage >> 0) & 0xFF; - t[1] = (usage >> 8) & 0xFF; - t[2] = (usage >> 16) & 0xFF; - t[3] = (usage >> 24) & 0xFF; - EVP_DigestUpdate(m, t, 4); - EVP_DigestUpdate(m, data, len); - EVP_DigestFinal_ex (m, tmp, NULL); - EVP_MD_CTX_destroy(m); - - ret = _krb5_internal_hmac(context, c, tmp, sizeof(tmp), 0, &ksign, result); - if (ret) - return ret; - return 0; -} - -struct _krb5_checksum_type _krb5_checksum_hmac_md5 = { - CKSUMTYPE_HMAC_MD5, - "hmac-md5", - 64, - 16, - F_KEYED | F_CPROOF, - _krb5_HMAC_MD5_checksum, - NULL -}; - -/* - * section 6 of draft-brezak-win2k-krb-rc4-hmac-03 - * - * warning: not for small children - */ - -static krb5_error_code -ARCFOUR_subencrypt(krb5_context context, - struct _krb5_key_data *key, - void *data, - size_t len, - unsigned usage, - void *ivec) -{ - EVP_CIPHER_CTX ctx; - struct _krb5_checksum_type *c = _krb5_find_checksum (CKSUMTYPE_RSA_MD5); - Checksum k1_c, k2_c, k3_c, cksum; - struct _krb5_key_data ke; - krb5_keyblock kb; - unsigned char t[4]; - unsigned char *cdata = data; - unsigned char k1_c_data[16], k2_c_data[16], k3_c_data[16]; - krb5_error_code ret; - - t[0] = (usage >> 0) & 0xFF; - t[1] = (usage >> 8) & 0xFF; - t[2] = (usage >> 16) & 0xFF; - t[3] = (usage >> 24) & 0xFF; - - k1_c.checksum.length = sizeof(k1_c_data); - k1_c.checksum.data = k1_c_data; - - ret = _krb5_internal_hmac(NULL, c, t, sizeof(t), 0, key, &k1_c); - if (ret) - krb5_abortx(context, "hmac failed"); - - memcpy (k2_c_data, k1_c_data, sizeof(k1_c_data)); - - k2_c.checksum.length = sizeof(k2_c_data); - k2_c.checksum.data = k2_c_data; - - ke.key = &kb; - kb.keyvalue = k2_c.checksum; - - cksum.checksum.length = 16; - cksum.checksum.data = data; - - ret = _krb5_internal_hmac(NULL, c, cdata + 16, len - 16, 0, &ke, &cksum); - if (ret) - krb5_abortx(context, "hmac failed"); - - ke.key = &kb; - kb.keyvalue = k1_c.checksum; - - k3_c.checksum.length = sizeof(k3_c_data); - k3_c.checksum.data = k3_c_data; - - ret = _krb5_internal_hmac(NULL, c, data, 16, 0, &ke, &k3_c); - if (ret) - krb5_abortx(context, "hmac failed"); - - EVP_CIPHER_CTX_init(&ctx); - - EVP_CipherInit_ex(&ctx, EVP_rc4(), NULL, k3_c.checksum.data, NULL, 1); - EVP_Cipher(&ctx, cdata + 16, cdata + 16, len - 16); - EVP_CIPHER_CTX_cleanup(&ctx); - - memset (k1_c_data, 0, sizeof(k1_c_data)); - memset (k2_c_data, 0, sizeof(k2_c_data)); - memset (k3_c_data, 0, sizeof(k3_c_data)); - return 0; -} - -static krb5_error_code -ARCFOUR_subdecrypt(krb5_context context, - struct _krb5_key_data *key, - void *data, - size_t len, - unsigned usage, - void *ivec) -{ - EVP_CIPHER_CTX ctx; - struct _krb5_checksum_type *c = _krb5_find_checksum (CKSUMTYPE_RSA_MD5); - Checksum k1_c, k2_c, k3_c, cksum; - struct _krb5_key_data ke; - krb5_keyblock kb; - unsigned char t[4]; - unsigned char *cdata = data; - unsigned char k1_c_data[16], k2_c_data[16], k3_c_data[16]; - unsigned char cksum_data[16]; - krb5_error_code ret; - - t[0] = (usage >> 0) & 0xFF; - t[1] = (usage >> 8) & 0xFF; - t[2] = (usage >> 16) & 0xFF; - t[3] = (usage >> 24) & 0xFF; - - k1_c.checksum.length = sizeof(k1_c_data); - k1_c.checksum.data = k1_c_data; - - ret = _krb5_internal_hmac(NULL, c, t, sizeof(t), 0, key, &k1_c); - if (ret) - krb5_abortx(context, "hmac failed"); - - memcpy (k2_c_data, k1_c_data, sizeof(k1_c_data)); - - k2_c.checksum.length = sizeof(k2_c_data); - k2_c.checksum.data = k2_c_data; - - ke.key = &kb; - kb.keyvalue = k1_c.checksum; - - k3_c.checksum.length = sizeof(k3_c_data); - k3_c.checksum.data = k3_c_data; - - ret = _krb5_internal_hmac(NULL, c, cdata, 16, 0, &ke, &k3_c); - if (ret) - krb5_abortx(context, "hmac failed"); - - EVP_CIPHER_CTX_init(&ctx); - EVP_CipherInit_ex(&ctx, EVP_rc4(), NULL, k3_c.checksum.data, NULL, 0); - EVP_Cipher(&ctx, cdata + 16, cdata + 16, len - 16); - EVP_CIPHER_CTX_cleanup(&ctx); - - ke.key = &kb; - kb.keyvalue = k2_c.checksum; - - cksum.checksum.length = 16; - cksum.checksum.data = cksum_data; - - ret = _krb5_internal_hmac(NULL, c, cdata + 16, len - 16, 0, &ke, &cksum); - if (ret) - krb5_abortx(context, "hmac failed"); - - memset (k1_c_data, 0, sizeof(k1_c_data)); - memset (k2_c_data, 0, sizeof(k2_c_data)); - memset (k3_c_data, 0, sizeof(k3_c_data)); - - if (ct_memcmp (cksum.checksum.data, data, 16) != 0) { - krb5_clear_error_message (context); - return KRB5KRB_AP_ERR_BAD_INTEGRITY; - } else { - return 0; - } -} - -/* - * convert the usage numbers used in - * draft-ietf-cat-kerb-key-derivation-00.txt to the ones in - * draft-brezak-win2k-krb-rc4-hmac-04.txt - */ - -krb5_error_code -_krb5_usage2arcfour(krb5_context context, unsigned *usage) -{ - switch (*usage) { - case KRB5_KU_AS_REP_ENC_PART : /* 3 */ - *usage = 8; - return 0; - case KRB5_KU_USAGE_SEAL : /* 22 */ - *usage = 13; - return 0; - case KRB5_KU_USAGE_SIGN : /* 23 */ - *usage = 15; - return 0; - case KRB5_KU_USAGE_SEQ: /* 24 */ - *usage = 0; - return 0; - default : - return 0; - } -} - -static krb5_error_code -ARCFOUR_encrypt(krb5_context context, - struct _krb5_key_data *key, - void *data, - size_t len, - krb5_boolean encryptp, - int usage, - void *ivec) -{ - krb5_error_code ret; - unsigned keyusage = usage; - - if((ret = _krb5_usage2arcfour (context, &keyusage)) != 0) - return ret; - - if (encryptp) - return ARCFOUR_subencrypt (context, key, data, len, keyusage, ivec); - else - return ARCFOUR_subdecrypt (context, key, data, len, keyusage, ivec); -} - -struct _krb5_encryption_type _krb5_enctype_arcfour_hmac_md5 = { - ETYPE_ARCFOUR_HMAC_MD5, - "arcfour-hmac-md5", - 1, - 1, - 8, - &keytype_arcfour, - &_krb5_checksum_hmac_md5, - &_krb5_checksum_hmac_md5, - F_SPECIAL, - ARCFOUR_encrypt, - 0, - NULL -}; diff --git a/kerberosV/src/lib/krb5/crypto-des-common.c b/kerberosV/src/lib/krb5/crypto-des-common.c deleted file mode 100644 index f8313952dc7..00000000000 --- a/kerberosV/src/lib/krb5/crypto-des-common.c +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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. - */ - -/* Functions which are used by both single and triple DES enctypes */ - -#include "krb5_locl.h" - -/* - * A = A xor B. A & B are 8 bytes. - */ - -void -_krb5_xor (DES_cblock *key, const unsigned char *b) -{ - unsigned char *a = (unsigned char*)key; - a[0] ^= b[0]; - a[1] ^= b[1]; - a[2] ^= b[2]; - a[3] ^= b[3]; - a[4] ^= b[4]; - a[5] ^= b[5]; - a[6] ^= b[6]; - a[7] ^= b[7]; -} - -#if defined(DES3_OLD_ENCTYPE) || defined(HEIM_WEAK_CRYPTO) -krb5_error_code -_krb5_des_checksum(krb5_context context, - const EVP_MD *evp_md, - struct _krb5_key_data *key, - const void *data, - size_t len, - Checksum *cksum) -{ - struct _krb5_evp_schedule *ctx = key->schedule->data; - EVP_MD_CTX *m; - DES_cblock ivec; - unsigned char *p = cksum->checksum.data; - - krb5_generate_random_block(p, 8); - - m = EVP_MD_CTX_create(); - if (m == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - EVP_DigestInit_ex(m, evp_md, NULL); - EVP_DigestUpdate(m, p, 8); - EVP_DigestUpdate(m, data, len); - EVP_DigestFinal_ex (m, p + 8, NULL); - EVP_MD_CTX_destroy(m); - memset (&ivec, 0, sizeof(ivec)); - EVP_CipherInit_ex(&ctx->ectx, NULL, NULL, NULL, (void *)&ivec, -1); - EVP_Cipher(&ctx->ectx, p, p, 24); - - return 0; -} - -krb5_error_code -_krb5_des_verify(krb5_context context, - const EVP_MD *evp_md, - struct _krb5_key_data *key, - const void *data, - size_t len, - Checksum *C) -{ - struct _krb5_evp_schedule *ctx = key->schedule->data; - EVP_MD_CTX *m; - unsigned char tmp[24]; - unsigned char res[16]; - DES_cblock ivec; - krb5_error_code ret = 0; - - m = EVP_MD_CTX_create(); - if (m == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - memset(&ivec, 0, sizeof(ivec)); - EVP_CipherInit_ex(&ctx->dctx, NULL, NULL, NULL, (void *)&ivec, -1); - EVP_Cipher(&ctx->dctx, tmp, C->checksum.data, 24); - - EVP_DigestInit_ex(m, evp_md, NULL); - EVP_DigestUpdate(m, tmp, 8); /* confounder */ - EVP_DigestUpdate(m, data, len); - EVP_DigestFinal_ex (m, res, NULL); - EVP_MD_CTX_destroy(m); - if(ct_memcmp(res, tmp + 8, sizeof(res)) != 0) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_BAD_INTEGRITY; - } - memset(tmp, 0, sizeof(tmp)); - memset(res, 0, sizeof(res)); - return ret; -} - -#endif - -static krb5_error_code -RSA_MD5_checksum(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *C) -{ - if (EVP_Digest(data, len, C->checksum.data, NULL, EVP_md5(), NULL) != 1) - krb5_abortx(context, "md5 checksum failed"); - return 0; -} - -struct _krb5_checksum_type _krb5_checksum_rsa_md5 = { - CKSUMTYPE_RSA_MD5, - "rsa-md5", - 64, - 16, - F_CPROOF, - RSA_MD5_checksum, - NULL -}; diff --git a/kerberosV/src/lib/krb5/crypto-des.c b/kerberosV/src/lib/krb5/crypto-des.c deleted file mode 100644 index f6f1c6881c9..00000000000 --- a/kerberosV/src/lib/krb5/crypto-des.c +++ /dev/null @@ -1,377 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -#ifdef HEIM_WEAK_CRYPTO - - -static void -krb5_DES_random_key(krb5_context context, - krb5_keyblock *key) -{ - DES_cblock *k = key->keyvalue.data; - do { - krb5_generate_random_block(k, sizeof(DES_cblock)); - DES_set_odd_parity(k); - } while(DES_is_weak_key(k)); -} - -static void -krb5_DES_schedule_old(krb5_context context, - struct _krb5_key_type *kt, - struct _krb5_key_data *key) -{ - DES_set_key_unchecked(key->key->keyvalue.data, key->schedule->data); -} - -static void -krb5_DES_random_to_key(krb5_context context, - krb5_keyblock *key, - const void *data, - size_t size) -{ - DES_cblock *k = key->keyvalue.data; - memcpy(k, data, key->keyvalue.length); - DES_set_odd_parity(k); - if(DES_is_weak_key(k)) - _krb5_xor(k, (const unsigned char*)"\0\0\0\0\0\0\0\xf0"); -} - -static struct _krb5_key_type keytype_des_old = { - ETYPE_DES_CBC_CRC, - "des-old", - 56, - 8, - sizeof(DES_key_schedule), - krb5_DES_random_key, - krb5_DES_schedule_old, - _krb5_des_salt, - krb5_DES_random_to_key, - NULL, - NULL -}; - -static struct _krb5_key_type keytype_des = { - ETYPE_DES_CBC_CRC, - "des", - 56, - 8, - sizeof(struct _krb5_evp_schedule), - krb5_DES_random_key, - _krb5_evp_schedule, - _krb5_des_salt, - krb5_DES_random_to_key, - _krb5_evp_cleanup, - EVP_des_cbc -}; - -static krb5_error_code -CRC32_checksum(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *C) -{ - uint32_t crc; - unsigned char *r = C->checksum.data; - _krb5_crc_init_table (); - crc = _krb5_crc_update (data, len, 0); - r[0] = crc & 0xff; - r[1] = (crc >> 8) & 0xff; - r[2] = (crc >> 16) & 0xff; - r[3] = (crc >> 24) & 0xff; - return 0; -} - -static krb5_error_code -RSA_MD4_checksum(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *C) -{ - if (EVP_Digest(data, len, C->checksum.data, NULL, EVP_md4(), NULL) != 1) - krb5_abortx(context, "md4 checksum failed"); - return 0; -} - -static krb5_error_code -RSA_MD4_DES_checksum(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *cksum) -{ - return _krb5_des_checksum(context, EVP_md4(), key, data, len, cksum); -} - -static krb5_error_code -RSA_MD4_DES_verify(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *C) -{ - return _krb5_des_verify(context, EVP_md4(), key, data, len, C); -} - -static krb5_error_code -RSA_MD5_DES_checksum(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *C) -{ - return _krb5_des_checksum(context, EVP_md5(), key, data, len, C); -} - -static krb5_error_code -RSA_MD5_DES_verify(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *C) -{ - return _krb5_des_verify(context, EVP_md5(), key, data, len, C); -} - -struct _krb5_checksum_type _krb5_checksum_crc32 = { - CKSUMTYPE_CRC32, - "crc32", - 1, - 4, - 0, - CRC32_checksum, - NULL -}; - -struct _krb5_checksum_type _krb5_checksum_rsa_md4 = { - CKSUMTYPE_RSA_MD4, - "rsa-md4", - 64, - 16, - F_CPROOF, - RSA_MD4_checksum, - NULL -}; - -struct _krb5_checksum_type _krb5_checksum_rsa_md4_des = { - CKSUMTYPE_RSA_MD4_DES, - "rsa-md4-des", - 64, - 24, - F_KEYED | F_CPROOF | F_VARIANT, - RSA_MD4_DES_checksum, - RSA_MD4_DES_verify -}; - -struct _krb5_checksum_type _krb5_checksum_rsa_md5_des = { - CKSUMTYPE_RSA_MD5_DES, - "rsa-md5-des", - 64, - 24, - F_KEYED | F_CPROOF | F_VARIANT, - RSA_MD5_DES_checksum, - RSA_MD5_DES_verify -}; - -static krb5_error_code -evp_des_encrypt_null_ivec(krb5_context context, - struct _krb5_key_data *key, - void *data, - size_t len, - krb5_boolean encryptp, - int usage, - void *ignore_ivec) -{ - struct _krb5_evp_schedule *ctx = key->schedule->data; - EVP_CIPHER_CTX *c; - DES_cblock ivec; - memset(&ivec, 0, sizeof(ivec)); - c = encryptp ? &ctx->ectx : &ctx->dctx; - EVP_CipherInit_ex(c, NULL, NULL, NULL, (void *)&ivec, -1); - EVP_Cipher(c, data, data, len); - return 0; -} - -static krb5_error_code -evp_des_encrypt_key_ivec(krb5_context context, - struct _krb5_key_data *key, - void *data, - size_t len, - krb5_boolean encryptp, - int usage, - void *ignore_ivec) -{ - struct _krb5_evp_schedule *ctx = key->schedule->data; - EVP_CIPHER_CTX *c; - DES_cblock ivec; - memcpy(&ivec, key->key->keyvalue.data, sizeof(ivec)); - c = encryptp ? &ctx->ectx : &ctx->dctx; - EVP_CipherInit_ex(c, NULL, NULL, NULL, (void *)&ivec, -1); - EVP_Cipher(c, data, data, len); - return 0; -} - -static krb5_error_code -DES_CFB64_encrypt_null_ivec(krb5_context context, - struct _krb5_key_data *key, - void *data, - size_t len, - krb5_boolean encryptp, - int usage, - void *ignore_ivec) -{ - DES_cblock ivec; - int num = 0; - DES_key_schedule *s = key->schedule->data; - memset(&ivec, 0, sizeof(ivec)); - - DES_cfb64_encrypt(data, data, len, s, &ivec, &num, encryptp); - return 0; -} - -static krb5_error_code -DES_PCBC_encrypt_key_ivec(krb5_context context, - struct _krb5_key_data *key, - void *data, - size_t len, - krb5_boolean encryptp, - int usage, - void *ignore_ivec) -{ - DES_cblock ivec; - DES_key_schedule *s = key->schedule->data; - memcpy(&ivec, key->key->keyvalue.data, sizeof(ivec)); - - DES_pcbc_encrypt(data, data, len, s, &ivec, encryptp); - return 0; -} - -struct _krb5_encryption_type _krb5_enctype_des_cbc_crc = { - ETYPE_DES_CBC_CRC, - "des-cbc-crc", - 8, - 8, - 8, - &keytype_des, - &_krb5_checksum_crc32, - NULL, - F_DISABLED|F_WEAK, - evp_des_encrypt_key_ivec, - 0, - NULL -}; - -struct _krb5_encryption_type _krb5_enctype_des_cbc_md4 = { - ETYPE_DES_CBC_MD4, - "des-cbc-md4", - 8, - 8, - 8, - &keytype_des, - &_krb5_checksum_rsa_md4, - &_krb5_checksum_rsa_md4_des, - F_DISABLED|F_WEAK, - evp_des_encrypt_null_ivec, - 0, - NULL -}; - -struct _krb5_encryption_type _krb5_enctype_des_cbc_md5 = { - ETYPE_DES_CBC_MD5, - "des-cbc-md5", - 8, - 8, - 8, - &keytype_des, - &_krb5_checksum_rsa_md5, - &_krb5_checksum_rsa_md5_des, - F_DISABLED|F_WEAK, - evp_des_encrypt_null_ivec, - 0, - NULL -}; - -struct _krb5_encryption_type _krb5_enctype_des_cbc_none = { - ETYPE_DES_CBC_NONE, - "des-cbc-none", - 8, - 8, - 0, - &keytype_des, - &_krb5_checksum_none, - NULL, - F_PSEUDO|F_DISABLED|F_WEAK, - evp_des_encrypt_null_ivec, - 0, - NULL -}; - -struct _krb5_encryption_type _krb5_enctype_des_cfb64_none = { - ETYPE_DES_CFB64_NONE, - "des-cfb64-none", - 1, - 1, - 0, - &keytype_des_old, - &_krb5_checksum_none, - NULL, - F_PSEUDO|F_DISABLED|F_WEAK, - DES_CFB64_encrypt_null_ivec, - 0, - NULL -}; - -struct _krb5_encryption_type _krb5_enctype_des_pcbc_none = { - ETYPE_DES_PCBC_NONE, - "des-pcbc-none", - 8, - 8, - 0, - &keytype_des_old, - &_krb5_checksum_none, - NULL, - F_PSEUDO|F_DISABLED|F_WEAK, - DES_PCBC_encrypt_key_ivec, - 0, - NULL -}; -#endif /* HEIM_WEAK_CRYPTO */ diff --git a/kerberosV/src/lib/krb5/crypto-des3.c b/kerberosV/src/lib/krb5/crypto-des3.c deleted file mode 100644 index 43806038b71..00000000000 --- a/kerberosV/src/lib/krb5/crypto-des3.c +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -/* - * - */ - -static void -DES3_random_key(krb5_context context, - krb5_keyblock *key) -{ - DES_cblock *k = key->keyvalue.data; - do { - krb5_generate_random_block(k, 3 * sizeof(DES_cblock)); - DES_set_odd_parity(&k[0]); - DES_set_odd_parity(&k[1]); - DES_set_odd_parity(&k[2]); - } while(DES_is_weak_key(&k[0]) || - DES_is_weak_key(&k[1]) || - DES_is_weak_key(&k[2])); -} - - -#ifdef DES3_OLD_ENCTYPE -static struct _krb5_key_type keytype_des3 = { - ETYPE_OLD_DES3_CBC_SHA1, - "des3", - 168, - 24, - sizeof(struct _krb5_evp_schedule), - DES3_random_key, - _krb5_evp_schedule, - _krb5_des3_salt, - _krb5_DES3_random_to_key, - _krb5_evp_cleanup, - EVP_des_ede3_cbc -}; -#endif - -static struct _krb5_key_type keytype_des3_derived = { - ETYPE_OLD_DES3_CBC_SHA1, - "des3", - 168, - 24, - sizeof(struct _krb5_evp_schedule), - DES3_random_key, - _krb5_evp_schedule, - _krb5_des3_salt_derived, - _krb5_DES3_random_to_key, - _krb5_evp_cleanup, - EVP_des_ede3_cbc -}; - -#ifdef DES3_OLD_ENCTYPE -static krb5_error_code -RSA_MD5_DES3_checksum(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *C) -{ - return _krb5_des_checksum(context, EVP_md5(), key, data, len, C); -} - -static krb5_error_code -RSA_MD5_DES3_verify(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *C) -{ - return _krb5_des_verify(context, EVP_md5(), key, data, len, C); -} - -struct _krb5_checksum_type _krb5_checksum_rsa_md5_des3 = { - CKSUMTYPE_RSA_MD5_DES3, - "rsa-md5-des3", - 64, - 24, - F_KEYED | F_CPROOF | F_VARIANT, - RSA_MD5_DES3_checksum, - RSA_MD5_DES3_verify -}; -#endif - -struct _krb5_checksum_type _krb5_checksum_hmac_sha1_des3 = { - CKSUMTYPE_HMAC_SHA1_DES3, - "hmac-sha1-des3", - 64, - 20, - F_KEYED | F_CPROOF | F_DERIVED, - _krb5_SP_HMAC_SHA1_checksum, - NULL -}; - -#ifdef DES3_OLD_ENCTYPE -struct _krb5_encryption_type _krb5_enctype_des3_cbc_md5 = { - ETYPE_DES3_CBC_MD5, - "des3-cbc-md5", - 8, - 8, - 8, - &keytype_des3, - &_krb5_checksum_rsa_md5, - &_krb5_checksum_rsa_md5_des3, - 0, - _krb5_evp_encrypt, - 0, - NULL -}; -#endif - -struct _krb5_encryption_type _krb5_enctype_des3_cbc_sha1 = { - ETYPE_DES3_CBC_SHA1, - "des3-cbc-sha1", - 8, - 8, - 8, - &keytype_des3_derived, - &_krb5_checksum_sha1, - &_krb5_checksum_hmac_sha1_des3, - F_DERIVED, - _krb5_evp_encrypt, - 0, - NULL -}; - -#ifdef DES3_OLD_ENCTYPE -struct _krb5_encryption_type _krb5_enctype_old_des3_cbc_sha1 = { - ETYPE_OLD_DES3_CBC_SHA1, - "old-des3-cbc-sha1", - 8, - 8, - 8, - &keytype_des3, - &_krb5_checksum_sha1, - &_krb5_checksum_hmac_sha1_des3, - 0, - _krb5_evp_encrypt, - 0, - NULL -}; -#endif - -struct _krb5_encryption_type _krb5_enctype_des3_cbc_none = { - ETYPE_DES3_CBC_NONE, - "des3-cbc-none", - 8, - 8, - 0, - &keytype_des3_derived, - &_krb5_checksum_none, - NULL, - F_PSEUDO, - _krb5_evp_encrypt, - 0, - NULL -}; - -void -_krb5_DES3_random_to_key(krb5_context context, - krb5_keyblock *key, - const void *data, - size_t size) -{ - unsigned char *x = key->keyvalue.data; - const u_char *q = data; - DES_cblock *k; - int i, j; - - memset(key->keyvalue.data, 0, key->keyvalue.length); - for (i = 0; i < 3; ++i) { - unsigned char foo; - for (j = 0; j < 7; ++j) { - unsigned char b = q[7 * i + j]; - - x[8 * i + j] = b; - } - foo = 0; - for (j = 6; j >= 0; --j) { - foo |= q[7 * i + j] & 1; - foo <<= 1; - } - x[8 * i + 7] = foo; - } - k = key->keyvalue.data; - for (i = 0; i < 3; i++) { - DES_set_odd_parity(&k[i]); - if(DES_is_weak_key(&k[i])) - _krb5_xor(&k[i], (const unsigned char*)"\0\0\0\0\0\0\0\xf0"); - } -} diff --git a/kerberosV/src/lib/krb5/crypto-evp.c b/kerberosV/src/lib/krb5/crypto-evp.c deleted file mode 100644 index e8fb1caf6ae..00000000000 --- a/kerberosV/src/lib/krb5/crypto-evp.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -void -_krb5_evp_schedule(krb5_context context, - struct _krb5_key_type *kt, - struct _krb5_key_data *kd) -{ - struct _krb5_evp_schedule *key = kd->schedule->data; - const EVP_CIPHER *c = (*kt->evp)(); - - EVP_CIPHER_CTX_init(&key->ectx); - EVP_CIPHER_CTX_init(&key->dctx); - - EVP_CipherInit_ex(&key->ectx, c, NULL, kd->key->keyvalue.data, NULL, 1); - EVP_CipherInit_ex(&key->dctx, c, NULL, kd->key->keyvalue.data, NULL, 0); -} - -void -_krb5_evp_cleanup(krb5_context context, struct _krb5_key_data *kd) -{ - struct _krb5_evp_schedule *key = kd->schedule->data; - EVP_CIPHER_CTX_cleanup(&key->ectx); - EVP_CIPHER_CTX_cleanup(&key->dctx); -} - -krb5_error_code -_krb5_evp_encrypt(krb5_context context, - struct _krb5_key_data *key, - void *data, - size_t len, - krb5_boolean encryptp, - int usage, - void *ivec) -{ - struct _krb5_evp_schedule *ctx = key->schedule->data; - EVP_CIPHER_CTX *c; - c = encryptp ? &ctx->ectx : &ctx->dctx; - if (ivec == NULL) { - /* alloca ? */ - size_t len2 = EVP_CIPHER_CTX_iv_length(c); - void *loiv = malloc(len2); - if (loiv == NULL) { - krb5_clear_error_message(context); - return ENOMEM; - } - memset(loiv, 0, len2); - EVP_CipherInit_ex(c, NULL, NULL, NULL, loiv, -1); - free(loiv); - } else - EVP_CipherInit_ex(c, NULL, NULL, NULL, ivec, -1); - EVP_Cipher(c, data, data, len); - return 0; -} - -static const unsigned char zero_ivec[EVP_MAX_BLOCK_LENGTH] = { 0 }; - -krb5_error_code -_krb5_evp_encrypt_cts(krb5_context context, - struct _krb5_key_data *key, - void *data, - size_t len, - krb5_boolean encryptp, - int usage, - void *ivec) -{ - size_t i, blocksize; - struct _krb5_evp_schedule *ctx = key->schedule->data; - unsigned char tmp[EVP_MAX_BLOCK_LENGTH], ivec2[EVP_MAX_BLOCK_LENGTH]; - EVP_CIPHER_CTX *c; - unsigned char *p; - - c = encryptp ? &ctx->ectx : &ctx->dctx; - - blocksize = EVP_CIPHER_CTX_block_size(c); - - if (len < blocksize) { - krb5_set_error_message(context, EINVAL, - "message block too short"); - return EINVAL; - } else if (len == blocksize) { - EVP_CipherInit_ex(c, NULL, NULL, NULL, zero_ivec, -1); - EVP_Cipher(c, data, data, len); - return 0; - } - - if (ivec) - EVP_CipherInit_ex(c, NULL, NULL, NULL, ivec, -1); - else - EVP_CipherInit_ex(c, NULL, NULL, NULL, zero_ivec, -1); - - if (encryptp) { - - p = data; - i = ((len - 1) / blocksize) * blocksize; - EVP_Cipher(c, p, p, i); - p += i - blocksize; - len -= i; - memcpy(ivec2, p, blocksize); - - for (i = 0; i < len; i++) - tmp[i] = p[i + blocksize] ^ ivec2[i]; - for (; i < blocksize; i++) - tmp[i] = 0 ^ ivec2[i]; - - EVP_CipherInit_ex(c, NULL, NULL, NULL, zero_ivec, -1); - EVP_Cipher(c, p, tmp, blocksize); - - memcpy(p + blocksize, ivec2, len); - if (ivec) - memcpy(ivec, p, blocksize); - } else { - unsigned char tmp2[EVP_MAX_BLOCK_LENGTH], tmp3[EVP_MAX_BLOCK_LENGTH]; - - p = data; - if (len > blocksize * 2) { - /* remove last two blocks and round up, decrypt this with cbc, then do cts dance */ - i = ((((len - blocksize * 2) + blocksize - 1) / blocksize) * blocksize); - memcpy(ivec2, p + i - blocksize, blocksize); - EVP_Cipher(c, p, p, i); - p += i; - len -= i + blocksize; - } else { - if (ivec) - memcpy(ivec2, ivec, blocksize); - else - memcpy(ivec2, zero_ivec, blocksize); - len -= blocksize; - } - - memcpy(tmp, p, blocksize); - EVP_CipherInit_ex(c, NULL, NULL, NULL, zero_ivec, -1); - EVP_Cipher(c, tmp2, p, blocksize); - - memcpy(tmp3, p + blocksize, len); - memcpy(tmp3 + len, tmp2 + len, blocksize - len); /* xor 0 */ - - for (i = 0; i < len; i++) - p[i + blocksize] = tmp2[i] ^ tmp3[i]; - - EVP_CipherInit_ex(c, NULL, NULL, NULL, zero_ivec, -1); - EVP_Cipher(c, p, tmp3, blocksize); - - for (i = 0; i < blocksize; i++) - p[i] ^= ivec2[i]; - if (ivec) - memcpy(ivec, tmp, blocksize); - } - return 0; -} diff --git a/kerberosV/src/lib/krb5/crypto-null.c b/kerberosV/src/lib/krb5/crypto-null.c deleted file mode 100644 index 3b643123f52..00000000000 --- a/kerberosV/src/lib/krb5/crypto-null.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -#ifndef HEIMDAL_SMALLER -#define DES3_OLD_ENCTYPE 1 -#endif - -static struct _krb5_key_type keytype_null = { - ENCTYPE_NULL, - "null", - 0, - 0, - 0, - NULL, - NULL, - NULL -}; - -static krb5_error_code -NONE_checksum(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *C) -{ - return 0; -} - -struct _krb5_checksum_type _krb5_checksum_none = { - CKSUMTYPE_NONE, - "none", - 1, - 0, - 0, - NONE_checksum, - NULL -}; - -static krb5_error_code -NULL_encrypt(krb5_context context, - struct _krb5_key_data *key, - void *data, - size_t len, - krb5_boolean encryptp, - int usage, - void *ivec) -{ - return 0; -} - -struct _krb5_encryption_type _krb5_enctype_null = { - ETYPE_NULL, - "null", - 1, - 1, - 0, - &keytype_null, - &_krb5_checksum_none, - NULL, - F_DISABLED, - NULL_encrypt, - 0, - NULL -}; diff --git a/kerberosV/src/lib/krb5/crypto-pk.c b/kerberosV/src/lib/krb5/crypto-pk.c deleted file mode 100644 index 7fedb65c9ed..00000000000 --- a/kerberosV/src/lib/krb5/crypto-pk.c +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -#include - -krb5_error_code -_krb5_pk_octetstring2key(krb5_context context, - krb5_enctype type, - const void *dhdata, - size_t dhsize, - const heim_octet_string *c_n, - const heim_octet_string *k_n, - krb5_keyblock *key) -{ - struct _krb5_encryption_type *et = _krb5_find_enctype(type); - krb5_error_code ret; - size_t keylen, offset; - void *keydata; - unsigned char counter; - unsigned char shaoutput[SHA_DIGEST_LENGTH]; - EVP_MD_CTX *m; - - if(et == NULL) { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %d not supported", ""), - type); - return KRB5_PROG_ETYPE_NOSUPP; - } - keylen = (et->keytype->bits + 7) / 8; - - keydata = malloc(keylen); - if (keydata == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - m = EVP_MD_CTX_create(); - if (m == NULL) { - free(keydata); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - counter = 0; - offset = 0; - do { - - EVP_DigestInit_ex(m, EVP_sha1(), NULL); - EVP_DigestUpdate(m, &counter, 1); - EVP_DigestUpdate(m, dhdata, dhsize); - - if (c_n) - EVP_DigestUpdate(m, c_n->data, c_n->length); - if (k_n) - EVP_DigestUpdate(m, k_n->data, k_n->length); - - EVP_DigestFinal_ex(m, shaoutput, NULL); - - memcpy((unsigned char *)keydata + offset, - shaoutput, - min(keylen - offset, sizeof(shaoutput))); - - offset += sizeof(shaoutput); - counter++; - } while(offset < keylen); - memset(shaoutput, 0, sizeof(shaoutput)); - - EVP_MD_CTX_destroy(m); - - ret = krb5_random_to_key(context, type, keydata, keylen, key); - memset(keydata, 0, sizeof(keylen)); - free(keydata); - return ret; -} - -static krb5_error_code -encode_uvinfo(krb5_context context, krb5_const_principal p, krb5_data *data) -{ - KRB5PrincipalName pn; - krb5_error_code ret; - size_t size = 0; - - pn.principalName = p->name; - pn.realm = p->realm; - - ASN1_MALLOC_ENCODE(KRB5PrincipalName, data->data, data->length, - &pn, &size, ret); - if (ret) { - krb5_data_zero(data); - krb5_set_error_message(context, ret, - N_("Failed to encode KRB5PrincipalName", "")); - return ret; - } - if (data->length != size) - krb5_abortx(context, "asn1 compiler internal error"); - return 0; -} - -static krb5_error_code -encode_otherinfo(krb5_context context, - const AlgorithmIdentifier *ai, - krb5_const_principal client, - krb5_const_principal server, - krb5_enctype enctype, - const krb5_data *as_req, - const krb5_data *pk_as_rep, - const Ticket *ticket, - krb5_data *other) -{ - PkinitSP80056AOtherInfo otherinfo; - PkinitSuppPubInfo pubinfo; - krb5_error_code ret; - krb5_data pub; - size_t size = 0; - - krb5_data_zero(other); - memset(&otherinfo, 0, sizeof(otherinfo)); - memset(&pubinfo, 0, sizeof(pubinfo)); - - pubinfo.enctype = enctype; - pubinfo.as_REQ = *as_req; - pubinfo.pk_as_rep = *pk_as_rep; - pubinfo.ticket = *ticket; - ASN1_MALLOC_ENCODE(PkinitSuppPubInfo, pub.data, pub.length, - &pubinfo, &size, ret); - if (ret) { - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - return ret; - } - if (pub.length != size) - krb5_abortx(context, "asn1 compiler internal error"); - - ret = encode_uvinfo(context, client, &otherinfo.partyUInfo); - if (ret) { - free(pub.data); - return ret; - } - ret = encode_uvinfo(context, server, &otherinfo.partyVInfo); - if (ret) { - free(otherinfo.partyUInfo.data); - free(pub.data); - return ret; - } - - otherinfo.algorithmID = *ai; - otherinfo.suppPubInfo = &pub; - - ASN1_MALLOC_ENCODE(PkinitSP80056AOtherInfo, other->data, other->length, - &otherinfo, &size, ret); - free(otherinfo.partyUInfo.data); - free(otherinfo.partyVInfo.data); - free(pub.data); - if (ret) { - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - return ret; - } - if (other->length != size) - krb5_abortx(context, "asn1 compiler internal error"); - - return 0; -} - - - -krb5_error_code -_krb5_pk_kdf(krb5_context context, - const struct AlgorithmIdentifier *ai, - const void *dhdata, - size_t dhsize, - krb5_const_principal client, - krb5_const_principal server, - krb5_enctype enctype, - const krb5_data *as_req, - const krb5_data *pk_as_rep, - const Ticket *ticket, - krb5_keyblock *key) -{ - struct _krb5_encryption_type *et; - krb5_error_code ret; - krb5_data other; - size_t keylen, offset; - uint32_t counter; - unsigned char *keydata; - unsigned char shaoutput[SHA512_DIGEST_LENGTH]; - const EVP_MD *md; - EVP_MD_CTX *m; - - if (der_heim_oid_cmp(&asn1_oid_id_pkinit_kdf_ah_sha1, &ai->algorithm) == 0) { - md = EVP_sha1(); - } else if (der_heim_oid_cmp(&asn1_oid_id_pkinit_kdf_ah_sha256, &ai->algorithm) == 0) { - md = EVP_sha256(); - } else if (der_heim_oid_cmp(&asn1_oid_id_pkinit_kdf_ah_sha512, &ai->algorithm) == 0) { - md = EVP_sha512(); - } else { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - N_("KDF not supported", "")); - return KRB5_PROG_ETYPE_NOSUPP; - } - if (ai->parameters != NULL && - (ai->parameters->length != 2 || - memcmp(ai->parameters->data, "\x05\x00", 2) != 0)) - { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - N_("kdf params not NULL or the NULL-type", - "")); - return KRB5_PROG_ETYPE_NOSUPP; - } - - et = _krb5_find_enctype(enctype); - if(et == NULL) { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %d not supported", ""), - enctype); - return KRB5_PROG_ETYPE_NOSUPP; - } - keylen = (et->keytype->bits + 7) / 8; - - keydata = malloc(keylen); - if (keydata == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = encode_otherinfo(context, ai, client, server, - enctype, as_req, pk_as_rep, ticket, &other); - if (ret) { - free(keydata); - return ret; - } - - m = EVP_MD_CTX_create(); - if (m == NULL) { - free(keydata); - free(other.data); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - offset = 0; - counter = 1; - do { - unsigned char cdata[4]; - - EVP_DigestInit_ex(m, md, NULL); - _krb5_put_int(cdata, counter, 4); - EVP_DigestUpdate(m, cdata, 4); - EVP_DigestUpdate(m, dhdata, dhsize); - EVP_DigestUpdate(m, other.data, other.length); - - EVP_DigestFinal_ex(m, shaoutput, NULL); - - memcpy((unsigned char *)keydata + offset, - shaoutput, - min(keylen - offset, EVP_MD_CTX_size(m))); - - offset += EVP_MD_CTX_size(m); - counter++; - } while(offset < keylen); - memset(shaoutput, 0, sizeof(shaoutput)); - - EVP_MD_CTX_destroy(m); - free(other.data); - - ret = krb5_random_to_key(context, enctype, keydata, keylen, key); - memset(keydata, 0, sizeof(keylen)); - free(keydata); - - return ret; -} diff --git a/kerberosV/src/lib/krb5/crypto-rand.c b/kerberosV/src/lib/krb5/crypto-rand.c deleted file mode 100644 index e96e11febb2..00000000000 --- a/kerberosV/src/lib/krb5/crypto-rand.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_generate_random_block(void *buf, size_t len) -{ - arc4random_buf(buf, len); -} diff --git a/kerberosV/src/lib/krb5/crypto-stubs.c b/kerberosV/src/lib/krb5/crypto-stubs.c deleted file mode 100644 index b462680643f..00000000000 --- a/kerberosV/src/lib/krb5/crypto-stubs.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 - -/* These are stub functions for the standalone RFC3961 crypto library */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_context(krb5_context *context) -{ - krb5_context p; - - *context = NULL; - - /* should have a run_once */ - bindtextdomain(HEIMDAL_TEXTDOMAIN, HEIMDAL_LOCALEDIR); - - p = calloc(1, sizeof(*p)); - if(!p) - return ENOMEM; - - p->mutex = malloc(sizeof(HEIMDAL_MUTEX)); - if (p->mutex == NULL) { - free(p); - return ENOMEM; - } - HEIMDAL_MUTEX_init(p->mutex); - - *context = p; - return 0; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_context(krb5_context context) -{ - krb5_clear_error_message(context); - - HEIMDAL_MUTEX_destroy(context->mutex); - free(context->mutex); - if (context->flags & KRB5_CTX_F_SOCKETS_INITIALIZED) { - rk_SOCK_EXIT(); - } - - memset(context, 0, sizeof(*context)); - free(context); -} - -krb5_boolean -_krb5_homedir_access(krb5_context context) { - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_log(krb5_context context, - krb5_log_facility *fac, - int level, - const char *fmt, - ...) -{ - return 0; -} - -/* This function is currently just used to get the location of the EGD - * socket. If we're not using an EGD, then we can just return NULL */ - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_config_get_string (krb5_context context, - const krb5_config_section *c, - ...) -{ - return NULL; -} diff --git a/kerberosV/src/lib/krb5/crypto.c b/kerberosV/src/lib/krb5/crypto.c deleted file mode 100644 index 8634e026256..00000000000 --- a/kerberosV/src/lib/krb5/crypto.c +++ /dev/null @@ -1,2652 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -struct _krb5_key_usage { - unsigned usage; - struct _krb5_key_data key; -}; - - -#ifndef HEIMDAL_SMALLER -#define DES3_OLD_ENCTYPE 1 -#endif - -static krb5_error_code _get_derived_key(krb5_context, krb5_crypto, - unsigned, struct _krb5_key_data**); -static struct _krb5_key_data *_new_derived_key(krb5_crypto crypto, unsigned usage); - -static void free_key_schedule(krb5_context, - struct _krb5_key_data *, - struct _krb5_encryption_type *); - -/* - * Converts etype to a user readable string and sets as a side effect - * the krb5_error_message containing this string. Returns - * KRB5_PROG_ETYPE_NOSUPP in not the conversion of the etype failed in - * which case the error code of the etype convesion is returned. - */ - -static krb5_error_code -unsupported_enctype(krb5_context context, krb5_enctype etype) -{ - krb5_error_code ret; - char *name; - - ret = krb5_enctype_to_string(context, etype, &name); - if (ret) - return ret; - - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - N_("Encryption type %s not supported", ""), - name); - free(name); - return KRB5_PROG_ETYPE_NOSUPP; -} - -/* - * - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_keysize(krb5_context context, - krb5_enctype type, - size_t *keysize) -{ - struct _krb5_encryption_type *et = _krb5_find_enctype(type); - if(et == NULL) { - return unsupported_enctype (context, type); - } - *keysize = et->keytype->size; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_keybits(krb5_context context, - krb5_enctype type, - size_t *keybits) -{ - struct _krb5_encryption_type *et = _krb5_find_enctype(type); - if(et == NULL) { - return unsupported_enctype (context, type); - } - *keybits = et->keytype->bits; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_generate_random_keyblock(krb5_context context, - krb5_enctype type, - krb5_keyblock *key) -{ - krb5_error_code ret; - struct _krb5_encryption_type *et = _krb5_find_enctype(type); - if(et == NULL) { - return unsupported_enctype (context, type); - } - ret = krb5_data_alloc(&key->keyvalue, et->keytype->size); - if(ret) - return ret; - key->keytype = type; - if(et->keytype->random_key) - (*et->keytype->random_key)(context, key); - else - krb5_generate_random_block(key->keyvalue.data, - key->keyvalue.length); - return 0; -} - -static krb5_error_code -_key_schedule(krb5_context context, - struct _krb5_key_data *key) -{ - krb5_error_code ret; - struct _krb5_encryption_type *et = _krb5_find_enctype(key->key->keytype); - struct _krb5_key_type *kt; - - if (et == NULL) { - return unsupported_enctype (context, - key->key->keytype); - } - - kt = et->keytype; - - if(kt->schedule == NULL) - return 0; - if (key->schedule != NULL) - return 0; - ALLOC(key->schedule, 1); - if(key->schedule == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ret = krb5_data_alloc(key->schedule, kt->schedule_size); - if(ret) { - free(key->schedule); - key->schedule = NULL; - return ret; - } - (*kt->schedule)(context, kt, key); - return 0; -} - -/************************************************************ - * * - ************************************************************/ - -static krb5_error_code -SHA1_checksum(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *C) -{ - if (EVP_Digest(data, len, C->checksum.data, NULL, EVP_sha1(), NULL) != 1) - krb5_abortx(context, "sha1 checksum failed"); - return 0; -} - -/* HMAC according to RFC2104 */ -krb5_error_code -_krb5_internal_hmac(krb5_context context, - struct _krb5_checksum_type *cm, - const void *data, - size_t len, - unsigned usage, - struct _krb5_key_data *keyblock, - Checksum *result) -{ - unsigned char *ipad, *opad; - unsigned char *key; - size_t key_len; - size_t i; - - ipad = malloc(cm->blocksize + len); - if (ipad == NULL) - return ENOMEM; - opad = malloc(cm->blocksize + cm->checksumsize); - if (opad == NULL) { - free(ipad); - return ENOMEM; - } - memset(ipad, 0x36, cm->blocksize); - memset(opad, 0x5c, cm->blocksize); - - if(keyblock->key->keyvalue.length > cm->blocksize){ - (*cm->checksum)(context, - keyblock, - keyblock->key->keyvalue.data, - keyblock->key->keyvalue.length, - usage, - result); - key = result->checksum.data; - key_len = result->checksum.length; - } else { - key = keyblock->key->keyvalue.data; - key_len = keyblock->key->keyvalue.length; - } - for(i = 0; i < key_len; i++){ - ipad[i] ^= key[i]; - opad[i] ^= key[i]; - } - memcpy(ipad + cm->blocksize, data, len); - (*cm->checksum)(context, keyblock, ipad, cm->blocksize + len, - usage, result); - memcpy(opad + cm->blocksize, result->checksum.data, - result->checksum.length); - (*cm->checksum)(context, keyblock, opad, - cm->blocksize + cm->checksumsize, usage, result); - memset(ipad, 0, cm->blocksize + len); - free(ipad); - memset(opad, 0, cm->blocksize + cm->checksumsize); - free(opad); - - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_hmac(krb5_context context, - krb5_cksumtype cktype, - const void *data, - size_t len, - unsigned usage, - krb5_keyblock *key, - Checksum *result) -{ - struct _krb5_checksum_type *c = _krb5_find_checksum(cktype); - struct _krb5_key_data kd; - krb5_error_code ret; - - if (c == NULL) { - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %d not supported", ""), - cktype); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - - kd.key = key; - kd.schedule = NULL; - - ret = _krb5_internal_hmac(context, c, data, len, usage, &kd, result); - - if (kd.schedule) - krb5_free_data(context, kd.schedule); - - return ret; -} - -krb5_error_code -_krb5_SP_HMAC_SHA1_checksum(krb5_context context, - struct _krb5_key_data *key, - const void *data, - size_t len, - unsigned usage, - Checksum *result) -{ - struct _krb5_checksum_type *c = _krb5_find_checksum(CKSUMTYPE_SHA1); - Checksum res; - char sha1_data[20]; - krb5_error_code ret; - - res.checksum.data = sha1_data; - res.checksum.length = sizeof(sha1_data); - - ret = _krb5_internal_hmac(context, c, data, len, usage, key, &res); - if (ret) - krb5_abortx(context, "hmac failed"); - memcpy(result->checksum.data, res.checksum.data, result->checksum.length); - return 0; -} - -struct _krb5_checksum_type _krb5_checksum_sha1 = { - CKSUMTYPE_SHA1, - "sha1", - 64, - 20, - F_CPROOF, - SHA1_checksum, - NULL -}; - -struct _krb5_checksum_type * -_krb5_find_checksum(krb5_cksumtype type) -{ - int i; - for(i = 0; i < _krb5_num_checksums; i++) - if(_krb5_checksum_types[i]->type == type) - return _krb5_checksum_types[i]; - return NULL; -} - -static krb5_error_code -get_checksum_key(krb5_context context, - krb5_crypto crypto, - unsigned usage, /* not krb5_key_usage */ - struct _krb5_checksum_type *ct, - struct _krb5_key_data **key) -{ - krb5_error_code ret = 0; - - if(ct->flags & F_DERIVED) - ret = _get_derived_key(context, crypto, usage, key); - else if(ct->flags & F_VARIANT) { - size_t i; - - *key = _new_derived_key(crypto, 0xff/* KRB5_KU_RFC1510_VARIANT */); - if(*key == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ret = krb5_copy_keyblock(context, crypto->key.key, &(*key)->key); - if(ret) - return ret; - for(i = 0; i < (*key)->key->keyvalue.length; i++) - ((unsigned char*)(*key)->key->keyvalue.data)[i] ^= 0xF0; - } else { - *key = &crypto->key; - } - if(ret == 0) - ret = _key_schedule(context, *key); - return ret; -} - -static krb5_error_code -create_checksum (krb5_context context, - struct _krb5_checksum_type *ct, - krb5_crypto crypto, - unsigned usage, - void *data, - size_t len, - Checksum *result) -{ - krb5_error_code ret; - struct _krb5_key_data *dkey; - int keyed_checksum; - - if (ct->flags & F_DISABLED) { - krb5_clear_error_message (context); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - keyed_checksum = (ct->flags & F_KEYED) != 0; - if(keyed_checksum && crypto == NULL) { - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("Checksum type %s is keyed but no " - "crypto context (key) was passed in", ""), - ct->name); - return KRB5_PROG_SUMTYPE_NOSUPP; /* XXX */ - } - if(keyed_checksum) { - ret = get_checksum_key(context, crypto, usage, ct, &dkey); - if (ret) - return ret; - } else - dkey = NULL; - result->cksumtype = ct->type; - ret = krb5_data_alloc(&result->checksum, ct->checksumsize); - if (ret) - return (ret); - return (*ct->checksum)(context, dkey, data, len, usage, result); -} - -static int -arcfour_checksum_p(struct _krb5_checksum_type *ct, krb5_crypto crypto) -{ - return (ct->type == CKSUMTYPE_HMAC_MD5) && - (crypto->key.key->keytype == KEYTYPE_ARCFOUR); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_create_checksum(krb5_context context, - krb5_crypto crypto, - krb5_key_usage usage, - int type, - void *data, - size_t len, - Checksum *result) -{ - struct _krb5_checksum_type *ct = NULL; - unsigned keyusage; - - /* type 0 -> pick from crypto */ - if (type) { - ct = _krb5_find_checksum(type); - } else if (crypto) { - ct = crypto->et->keyed_checksum; - if (ct == NULL) - ct = crypto->et->checksum; - } - - if(ct == NULL) { - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %d not supported", ""), - type); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - - if (arcfour_checksum_p(ct, crypto)) { - keyusage = usage; - _krb5_usage2arcfour(context, &keyusage); - } else - keyusage = CHECKSUM_USAGE(usage); - - return create_checksum(context, ct, crypto, keyusage, - data, len, result); -} - -static krb5_error_code -verify_checksum(krb5_context context, - krb5_crypto crypto, - unsigned usage, /* not krb5_key_usage */ - void *data, - size_t len, - Checksum *cksum) -{ - krb5_error_code ret; - struct _krb5_key_data *dkey; - int keyed_checksum; - Checksum c; - struct _krb5_checksum_type *ct; - - ct = _krb5_find_checksum(cksum->cksumtype); - if (ct == NULL || (ct->flags & F_DISABLED)) { - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %d not supported", ""), - cksum->cksumtype); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - if(ct->checksumsize != cksum->checksum.length) { - krb5_clear_error_message (context); - krb5_set_error_message(context, KRB5KRB_AP_ERR_BAD_INTEGRITY, - N_("Decrypt integrity check failed for checksum type %s, " - "length was %u, expected %u", ""), - ct->name, (unsigned)cksum->checksum.length, - (unsigned)ct->checksumsize); - - return KRB5KRB_AP_ERR_BAD_INTEGRITY; /* XXX */ - } - keyed_checksum = (ct->flags & F_KEYED) != 0; - if(keyed_checksum) { - struct _krb5_checksum_type *kct; - if (crypto == NULL) { - krb5_set_error_message(context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("Checksum type %s is keyed but no " - "crypto context (key) was passed in", ""), - ct->name); - return KRB5_PROG_SUMTYPE_NOSUPP; /* XXX */ - } - kct = crypto->et->keyed_checksum; - if (kct == NULL || kct->type != ct->type) { - krb5_set_error_message(context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("Checksum type %s is keyed, but " - "the key type %s passed didnt have that checksum " - "type as the keyed type", ""), - ct->name, crypto->et->name); - return KRB5_PROG_SUMTYPE_NOSUPP; /* XXX */ - } - - ret = get_checksum_key(context, crypto, usage, ct, &dkey); - if (ret) - return ret; - } else - dkey = NULL; - - /* - * If checksum have a verify function, lets use that instead of - * calling ->checksum and then compare result. - */ - - if(ct->verify) { - ret = (*ct->verify)(context, dkey, data, len, usage, cksum); - if (ret) - krb5_set_error_message(context, ret, - N_("Decrypt integrity check failed for checksum " - "type %s, key type %s", ""), - ct->name, (crypto != NULL)? crypto->et->name : "(none)"); - return ret; - } - - ret = krb5_data_alloc (&c.checksum, ct->checksumsize); - if (ret) - return ret; - - ret = (*ct->checksum)(context, dkey, data, len, usage, &c); - if (ret) { - krb5_data_free(&c.checksum); - return ret; - } - - if(krb5_data_ct_cmp(&c.checksum, &cksum->checksum) != 0) { - ret = KRB5KRB_AP_ERR_BAD_INTEGRITY; - krb5_set_error_message(context, ret, - N_("Decrypt integrity check failed for checksum " - "type %s, key type %s", ""), - ct->name, crypto ? crypto->et->name : "(unkeyed)"); - } else { - ret = 0; - } - krb5_data_free (&c.checksum); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_checksum(krb5_context context, - krb5_crypto crypto, - krb5_key_usage usage, - void *data, - size_t len, - Checksum *cksum) -{ - struct _krb5_checksum_type *ct; - unsigned keyusage; - - ct = _krb5_find_checksum(cksum->cksumtype); - if(ct == NULL) { - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %d not supported", ""), - cksum->cksumtype); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - - if (arcfour_checksum_p(ct, crypto)) { - keyusage = usage; - _krb5_usage2arcfour(context, &keyusage); - } else - keyusage = CHECKSUM_USAGE(usage); - - return verify_checksum(context, crypto, keyusage, - data, len, cksum); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_get_checksum_type(krb5_context context, - krb5_crypto crypto, - krb5_cksumtype *type) -{ - struct _krb5_checksum_type *ct = NULL; - - if (crypto != NULL) { - ct = crypto->et->keyed_checksum; - if (ct == NULL) - ct = crypto->et->checksum; - } - - if (ct == NULL) { - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type not found", "")); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - - *type = ct->type; - - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_checksumsize(krb5_context context, - krb5_cksumtype type, - size_t *size) -{ - struct _krb5_checksum_type *ct = _krb5_find_checksum(type); - if(ct == NULL) { - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %d not supported", ""), - type); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - *size = ct->checksumsize; - return 0; -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_checksum_is_keyed(krb5_context context, - krb5_cksumtype type) -{ - struct _krb5_checksum_type *ct = _krb5_find_checksum(type); - if(ct == NULL) { - if (context) - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %d not supported", ""), - type); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - return ct->flags & F_KEYED; -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_checksum_is_collision_proof(krb5_context context, - krb5_cksumtype type) -{ - struct _krb5_checksum_type *ct = _krb5_find_checksum(type); - if(ct == NULL) { - if (context) - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %d not supported", ""), - type); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - return ct->flags & F_CPROOF; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_checksum_disable(krb5_context context, - krb5_cksumtype type) -{ - struct _krb5_checksum_type *ct = _krb5_find_checksum(type); - if(ct == NULL) { - if (context) - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %d not supported", ""), - type); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - ct->flags |= F_DISABLED; - return 0; -} - -/************************************************************ - * * - ************************************************************/ - -struct _krb5_encryption_type * -_krb5_find_enctype(krb5_enctype type) -{ - int i; - for(i = 0; i < _krb5_num_etypes; i++) - if(_krb5_etypes[i]->type == type) - return _krb5_etypes[i]; - return NULL; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_to_string(krb5_context context, - krb5_enctype etype, - char **string) -{ - struct _krb5_encryption_type *e; - e = _krb5_find_enctype(etype); - if(e == NULL) { - krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %d not supported", ""), - etype); - *string = NULL; - return KRB5_PROG_ETYPE_NOSUPP; - } - *string = strdup(e->name); - if(*string == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_enctype(krb5_context context, - const char *string, - krb5_enctype *etype) -{ - int i; - for(i = 0; i < _krb5_num_etypes; i++) - if(strcasecmp(_krb5_etypes[i]->name, string) == 0){ - *etype = _krb5_etypes[i]->type; - return 0; - } - krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %s not supported", ""), - string); - return KRB5_PROG_ETYPE_NOSUPP; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_to_keytype(krb5_context context, - krb5_enctype etype, - krb5_keytype *keytype) -{ - struct _krb5_encryption_type *e = _krb5_find_enctype(etype); - if(e == NULL) { - return unsupported_enctype (context, etype); - } - *keytype = e->keytype->type; /* XXX */ - return 0; -} - -/** - * Check if a enctype is valid, return 0 if it is. - * - * @param context Kerberos context - * @param etype enctype to check if its valid or not - * - * @return Return an error code for an failure or 0 on success (enctype valid). - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_valid(krb5_context context, - krb5_enctype etype) -{ - struct _krb5_encryption_type *e = _krb5_find_enctype(etype); - if(e && (e->flags & F_DISABLED) == 0) - return 0; - if (context == NULL) - return KRB5_PROG_ETYPE_NOSUPP; - if(e == NULL) { - return unsupported_enctype (context, etype); - } - /* Must be (e->flags & F_DISABLED) */ - krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %s is disabled", ""), - e->name); - return KRB5_PROG_ETYPE_NOSUPP; -} - -/** - * Return the coresponding encryption type for a checksum type. - * - * @param context Kerberos context - * @param ctype The checksum type to get the result enctype for - * @param etype The returned encryption, when the matching etype is - * not found, etype is set to ETYPE_NULL. - * - * @return Return an error code for an failure or 0 on success. - * @ingroup krb5_crypto - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cksumtype_to_enctype(krb5_context context, - krb5_cksumtype ctype, - krb5_enctype *etype) -{ - int i; - - *etype = ETYPE_NULL; - - for(i = 0; i < _krb5_num_etypes; i++) { - if(_krb5_etypes[i]->keyed_checksum && - _krb5_etypes[i]->keyed_checksum->type == ctype) - { - *etype = _krb5_etypes[i]->type; - return 0; - } - } - - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %d not supported", ""), - (int)ctype); - return KRB5_PROG_SUMTYPE_NOSUPP; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cksumtype_valid(krb5_context context, - krb5_cksumtype ctype) -{ - struct _krb5_checksum_type *c = _krb5_find_checksum(ctype); - if (c == NULL) { - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %d not supported", ""), - ctype); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - if (c->flags & F_DISABLED) { - krb5_set_error_message (context, KRB5_PROG_SUMTYPE_NOSUPP, - N_("checksum type %s is disabled", ""), - c->name); - return KRB5_PROG_SUMTYPE_NOSUPP; - } - return 0; -} - - -static krb5_boolean -derived_crypto(krb5_context context, - krb5_crypto crypto) -{ - return (crypto->et->flags & F_DERIVED) != 0; -} - -static krb5_boolean -special_crypto(krb5_context context, - krb5_crypto crypto) -{ - return (crypto->et->flags & F_SPECIAL) != 0; -} - -#define CHECKSUMSIZE(C) ((C)->checksumsize) -#define CHECKSUMTYPE(C) ((C)->type) - -static krb5_error_code -encrypt_internal_derived(krb5_context context, - krb5_crypto crypto, - unsigned usage, - const void *data, - size_t len, - krb5_data *result, - void *ivec) -{ - size_t sz, block_sz, checksum_sz, total_sz; - Checksum cksum; - unsigned char *p, *q; - krb5_error_code ret; - struct _krb5_key_data *dkey; - const struct _krb5_encryption_type *et = crypto->et; - - checksum_sz = CHECKSUMSIZE(et->keyed_checksum); - - sz = et->confoundersize + len; - block_sz = (sz + et->padsize - 1) &~ (et->padsize - 1); /* pad */ - total_sz = block_sz + checksum_sz; - p = calloc(1, total_sz); - if(p == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - q = p; - krb5_generate_random_block(q, et->confoundersize); /* XXX */ - q += et->confoundersize; - memcpy(q, data, len); - - ret = create_checksum(context, - et->keyed_checksum, - crypto, - INTEGRITY_USAGE(usage), - p, - block_sz, - &cksum); - if(ret == 0 && cksum.checksum.length != checksum_sz) { - free_Checksum (&cksum); - krb5_clear_error_message (context); - ret = KRB5_CRYPTO_INTERNAL; - } - if(ret) - goto fail; - memcpy(p + block_sz, cksum.checksum.data, cksum.checksum.length); - free_Checksum (&cksum); - ret = _get_derived_key(context, crypto, ENCRYPTION_USAGE(usage), &dkey); - if(ret) - goto fail; - ret = _key_schedule(context, dkey); - if(ret) - goto fail; - ret = (*et->encrypt)(context, dkey, p, block_sz, 1, usage, ivec); - if (ret) - goto fail; - result->data = p; - result->length = total_sz; - return 0; - fail: - memset(p, 0, total_sz); - free(p); - return ret; -} - - -static krb5_error_code -encrypt_internal(krb5_context context, - krb5_crypto crypto, - const void *data, - size_t len, - krb5_data *result, - void *ivec) -{ - size_t sz, block_sz, checksum_sz; - Checksum cksum; - unsigned char *p, *q; - krb5_error_code ret; - const struct _krb5_encryption_type *et = crypto->et; - - checksum_sz = CHECKSUMSIZE(et->checksum); - - sz = et->confoundersize + checksum_sz + len; - block_sz = (sz + et->padsize - 1) &~ (et->padsize - 1); /* pad */ - p = calloc(1, block_sz); - if(p == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - q = p; - krb5_generate_random_block(q, et->confoundersize); /* XXX */ - q += et->confoundersize; - memset(q, 0, checksum_sz); - q += checksum_sz; - memcpy(q, data, len); - - ret = create_checksum(context, - et->checksum, - crypto, - 0, - p, - block_sz, - &cksum); - if(ret == 0 && cksum.checksum.length != checksum_sz) { - krb5_clear_error_message (context); - free_Checksum(&cksum); - ret = KRB5_CRYPTO_INTERNAL; - } - if(ret) - goto fail; - memcpy(p + et->confoundersize, cksum.checksum.data, cksum.checksum.length); - free_Checksum(&cksum); - ret = _key_schedule(context, &crypto->key); - if(ret) - goto fail; - ret = (*et->encrypt)(context, &crypto->key, p, block_sz, 1, 0, ivec); - if (ret) { - memset(p, 0, block_sz); - free(p); - return ret; - } - result->data = p; - result->length = block_sz; - return 0; - fail: - memset(p, 0, block_sz); - free(p); - return ret; -} - -static krb5_error_code -encrypt_internal_special(krb5_context context, - krb5_crypto crypto, - int usage, - const void *data, - size_t len, - krb5_data *result, - void *ivec) -{ - struct _krb5_encryption_type *et = crypto->et; - size_t cksum_sz = CHECKSUMSIZE(et->checksum); - size_t sz = len + cksum_sz + et->confoundersize; - char *tmp, *p; - krb5_error_code ret; - - tmp = malloc (sz); - if (tmp == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - p = tmp; - memset (p, 0, cksum_sz); - p += cksum_sz; - krb5_generate_random_block(p, et->confoundersize); - p += et->confoundersize; - memcpy (p, data, len); - ret = (*et->encrypt)(context, &crypto->key, tmp, sz, TRUE, usage, ivec); - if (ret) { - memset(tmp, 0, sz); - free(tmp); - return ret; - } - result->data = tmp; - result->length = sz; - return 0; -} - -static krb5_error_code -decrypt_internal_derived(krb5_context context, - krb5_crypto crypto, - unsigned usage, - void *data, - size_t len, - krb5_data *result, - void *ivec) -{ - size_t checksum_sz; - Checksum cksum; - unsigned char *p; - krb5_error_code ret; - struct _krb5_key_data *dkey; - struct _krb5_encryption_type *et = crypto->et; - unsigned long l; - - checksum_sz = CHECKSUMSIZE(et->keyed_checksum); - if (len < checksum_sz + et->confoundersize) { - krb5_set_error_message(context, KRB5_BAD_MSIZE, - N_("Encrypted data shorter then " - "checksum + confunder", "")); - return KRB5_BAD_MSIZE; - } - - if (((len - checksum_sz) % et->padsize) != 0) { - krb5_clear_error_message(context); - return KRB5_BAD_MSIZE; - } - - p = malloc(len); - if(len != 0 && p == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy(p, data, len); - - len -= checksum_sz; - - ret = _get_derived_key(context, crypto, ENCRYPTION_USAGE(usage), &dkey); - if(ret) { - free(p); - return ret; - } - ret = _key_schedule(context, dkey); - if(ret) { - free(p); - return ret; - } - ret = (*et->encrypt)(context, dkey, p, len, 0, usage, ivec); - if (ret) { - free(p); - return ret; - } - - cksum.checksum.data = p + len; - cksum.checksum.length = checksum_sz; - cksum.cksumtype = CHECKSUMTYPE(et->keyed_checksum); - - ret = verify_checksum(context, - crypto, - INTEGRITY_USAGE(usage), - p, - len, - &cksum); - if(ret) { - free(p); - return ret; - } - l = len - et->confoundersize; - memmove(p, p + et->confoundersize, l); - result->data = realloc(p, l); - if(result->data == NULL && l != 0) { - free(p); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - result->length = l; - return 0; -} - -static krb5_error_code -decrypt_internal(krb5_context context, - krb5_crypto crypto, - void *data, - size_t len, - krb5_data *result, - void *ivec) -{ - krb5_error_code ret; - unsigned char *p; - Checksum cksum; - size_t checksum_sz, l; - struct _krb5_encryption_type *et = crypto->et; - - if ((len % et->padsize) != 0) { - krb5_clear_error_message(context); - return KRB5_BAD_MSIZE; - } - checksum_sz = CHECKSUMSIZE(et->checksum); - if (len < checksum_sz + et->confoundersize) { - krb5_set_error_message(context, KRB5_BAD_MSIZE, - N_("Encrypted data shorter then " - "checksum + confunder", "")); - return KRB5_BAD_MSIZE; - } - - p = malloc(len); - if(len != 0 && p == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy(p, data, len); - - ret = _key_schedule(context, &crypto->key); - if(ret) { - free(p); - return ret; - } - ret = (*et->encrypt)(context, &crypto->key, p, len, 0, 0, ivec); - if (ret) { - free(p); - return ret; - } - ret = krb5_data_copy(&cksum.checksum, p + et->confoundersize, checksum_sz); - if(ret) { - free(p); - return ret; - } - memset(p + et->confoundersize, 0, checksum_sz); - cksum.cksumtype = CHECKSUMTYPE(et->checksum); - ret = verify_checksum(context, NULL, 0, p, len, &cksum); - free_Checksum(&cksum); - if(ret) { - free(p); - return ret; - } - l = len - et->confoundersize - checksum_sz; - memmove(p, p + et->confoundersize + checksum_sz, l); - result->data = realloc(p, l); - if(result->data == NULL && l != 0) { - free(p); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - result->length = l; - return 0; -} - -static krb5_error_code -decrypt_internal_special(krb5_context context, - krb5_crypto crypto, - int usage, - void *data, - size_t len, - krb5_data *result, - void *ivec) -{ - struct _krb5_encryption_type *et = crypto->et; - size_t cksum_sz = CHECKSUMSIZE(et->checksum); - size_t sz = len - cksum_sz - et->confoundersize; - unsigned char *p; - krb5_error_code ret; - - if ((len % et->padsize) != 0) { - krb5_clear_error_message(context); - return KRB5_BAD_MSIZE; - } - if (len < cksum_sz + et->confoundersize) { - krb5_set_error_message(context, KRB5_BAD_MSIZE, - N_("Encrypted data shorter then " - "checksum + confunder", "")); - return KRB5_BAD_MSIZE; - } - - p = malloc (len); - if (p == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy(p, data, len); - - ret = (*et->encrypt)(context, &crypto->key, p, len, FALSE, usage, ivec); - if (ret) { - free(p); - return ret; - } - - memmove (p, p + cksum_sz + et->confoundersize, sz); - result->data = realloc(p, sz); - if(result->data == NULL && sz != 0) { - free(p); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - result->length = sz; - return 0; -} - -static krb5_crypto_iov * -find_iv(krb5_crypto_iov *data, size_t num_data, unsigned type) -{ - size_t i; - for (i = 0; i < num_data; i++) - if (data[i].flags == type) - return &data[i]; - return NULL; -} - -/** - * Inline encrypt a kerberos message - * - * @param context Kerberos context - * @param crypto Kerberos crypto context - * @param usage Key usage for this buffer - * @param data array of buffers to process - * @param num_data length of array - * @param ivec initial cbc/cts vector - * - * @return Return an error code or 0. - * @ingroup krb5_crypto - * - * Kerberos encrypted data look like this: - * - * 1. KRB5_CRYPTO_TYPE_HEADER - * 2. array [1,...] KRB5_CRYPTO_TYPE_DATA and array [0,...] - * KRB5_CRYPTO_TYPE_SIGN_ONLY in any order, however the receiver - * have to aware of the order. KRB5_CRYPTO_TYPE_SIGN_ONLY is - * commonly used headers and trailers. - * 3. KRB5_CRYPTO_TYPE_PADDING, at least on padsize long if padsize > 1 - * 4. KRB5_CRYPTO_TYPE_TRAILER - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encrypt_iov_ivec(krb5_context context, - krb5_crypto crypto, - unsigned usage, - krb5_crypto_iov *data, - int num_data, - void *ivec) -{ - size_t headersz, trailersz, len; - int i; - size_t sz, block_sz, pad_sz; - Checksum cksum; - unsigned char *p, *q; - krb5_error_code ret; - struct _krb5_key_data *dkey; - const struct _krb5_encryption_type *et = crypto->et; - krb5_crypto_iov *tiv, *piv, *hiv; - - if (num_data < 0) { - krb5_clear_error_message(context); - return KRB5_CRYPTO_INTERNAL; - } - - if(!derived_crypto(context, crypto)) { - krb5_clear_error_message(context); - return KRB5_CRYPTO_INTERNAL; - } - - headersz = et->confoundersize; - trailersz = CHECKSUMSIZE(et->keyed_checksum); - - for (len = 0, i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA) - continue; - len += data[i].data.length; - } - - sz = headersz + len; - block_sz = (sz + et->padsize - 1) &~ (et->padsize - 1); /* pad */ - - pad_sz = block_sz - sz; - - /* header */ - - hiv = find_iv(data, num_data, KRB5_CRYPTO_TYPE_HEADER); - if (hiv == NULL || hiv->data.length != headersz) - return KRB5_BAD_MSIZE; - - krb5_generate_random_block(hiv->data.data, hiv->data.length); - - /* padding */ - piv = find_iv(data, num_data, KRB5_CRYPTO_TYPE_PADDING); - /* its ok to have no TYPE_PADDING if there is no padding */ - if (piv == NULL && pad_sz != 0) - return KRB5_BAD_MSIZE; - if (piv) { - if (piv->data.length < pad_sz) - return KRB5_BAD_MSIZE; - piv->data.length = pad_sz; - if (pad_sz) - memset(piv->data.data, pad_sz, pad_sz); - else - piv = NULL; - } - - /* trailer */ - tiv = find_iv(data, num_data, KRB5_CRYPTO_TYPE_TRAILER); - if (tiv == NULL || tiv->data.length != trailersz) - return KRB5_BAD_MSIZE; - - /* - * XXX replace with EVP_Sign? at least make create_checksum an iov - * function. - * XXX CTS EVP is broken, can't handle multi buffers :( - */ - - len = block_sz; - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue; - len += data[i].data.length; - } - - p = q = malloc(len); - - memcpy(q, hiv->data.data, hiv->data.length); - q += hiv->data.length; - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA && - data[i].flags != KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue; - memcpy(q, data[i].data.data, data[i].data.length); - q += data[i].data.length; - } - if (piv) - memset(q, 0, piv->data.length); - - ret = create_checksum(context, - et->keyed_checksum, - crypto, - INTEGRITY_USAGE(usage), - p, - len, - &cksum); - free(p); - if(ret == 0 && cksum.checksum.length != trailersz) { - free_Checksum (&cksum); - krb5_clear_error_message (context); - ret = KRB5_CRYPTO_INTERNAL; - } - if(ret) - return ret; - - /* save cksum at end */ - memcpy(tiv->data.data, cksum.checksum.data, cksum.checksum.length); - free_Checksum (&cksum); - - /* XXX replace with EVP_Cipher */ - p = q = malloc(block_sz); - if(p == NULL) - return ENOMEM; - - memcpy(q, hiv->data.data, hiv->data.length); - q += hiv->data.length; - - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA) - continue; - memcpy(q, data[i].data.data, data[i].data.length); - q += data[i].data.length; - } - if (piv) - memset(q, 0, piv->data.length); - - - ret = _get_derived_key(context, crypto, ENCRYPTION_USAGE(usage), &dkey); - if(ret) { - free(p); - return ret; - } - ret = _key_schedule(context, dkey); - if(ret) { - free(p); - return ret; - } - - ret = (*et->encrypt)(context, dkey, p, block_sz, 1, usage, ivec); - if (ret) { - free(p); - return ret; - } - - /* now copy data back to buffers */ - q = p; - - memcpy(hiv->data.data, q, hiv->data.length); - q += hiv->data.length; - - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA) - continue; - memcpy(data[i].data.data, q, data[i].data.length); - q += data[i].data.length; - } - if (piv) - memcpy(piv->data.data, q, pad_sz); - - free(p); - - return ret; -} - -/** - * Inline decrypt a Kerberos message. - * - * @param context Kerberos context - * @param crypto Kerberos crypto context - * @param usage Key usage for this buffer - * @param data array of buffers to process - * @param num_data length of array - * @param ivec initial cbc/cts vector - * - * @return Return an error code or 0. - * @ingroup krb5_crypto - * - * 1. KRB5_CRYPTO_TYPE_HEADER - * 2. one KRB5_CRYPTO_TYPE_DATA and array [0,...] of KRB5_CRYPTO_TYPE_SIGN_ONLY in - * any order, however the receiver have to aware of the - * order. KRB5_CRYPTO_TYPE_SIGN_ONLY is commonly used unencrypoted - * protocol headers and trailers. The output data will be of same - * size as the input data or shorter. - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decrypt_iov_ivec(krb5_context context, - krb5_crypto crypto, - unsigned usage, - krb5_crypto_iov *data, - unsigned int num_data, - void *ivec) -{ - unsigned int i; - size_t headersz, trailersz, len; - Checksum cksum; - unsigned char *p, *q; - krb5_error_code ret; - struct _krb5_key_data *dkey; - struct _krb5_encryption_type *et = crypto->et; - krb5_crypto_iov *tiv, *hiv; - - if(!derived_crypto(context, crypto)) { - krb5_clear_error_message(context); - return KRB5_CRYPTO_INTERNAL; - } - - headersz = et->confoundersize; - - hiv = find_iv(data, num_data, KRB5_CRYPTO_TYPE_HEADER); - if (hiv == NULL || hiv->data.length != headersz) - return KRB5_BAD_MSIZE; - - /* trailer */ - trailersz = CHECKSUMSIZE(et->keyed_checksum); - - tiv = find_iv(data, num_data, KRB5_CRYPTO_TYPE_TRAILER); - if (tiv->data.length != trailersz) - return KRB5_BAD_MSIZE; - - /* Find length of data we will decrypt */ - - len = headersz; - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA) - continue; - len += data[i].data.length; - } - - if ((len % et->padsize) != 0) { - krb5_clear_error_message(context); - return KRB5_BAD_MSIZE; - } - - /* XXX replace with EVP_Cipher */ - - p = q = malloc(len); - if (p == NULL) - return ENOMEM; - - memcpy(q, hiv->data.data, hiv->data.length); - q += hiv->data.length; - - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA) - continue; - memcpy(q, data[i].data.data, data[i].data.length); - q += data[i].data.length; - } - - ret = _get_derived_key(context, crypto, ENCRYPTION_USAGE(usage), &dkey); - if(ret) { - free(p); - return ret; - } - ret = _key_schedule(context, dkey); - if(ret) { - free(p); - return ret; - } - - ret = (*et->encrypt)(context, dkey, p, len, 0, usage, ivec); - if (ret) { - free(p); - return ret; - } - - /* copy data back to buffers */ - memcpy(hiv->data.data, p, hiv->data.length); - q = p + hiv->data.length; - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA) - continue; - memcpy(data[i].data.data, q, data[i].data.length); - q += data[i].data.length; - } - - free(p); - - /* check signature */ - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue; - len += data[i].data.length; - } - - p = q = malloc(len); - if (p == NULL) - return ENOMEM; - - memcpy(q, hiv->data.data, hiv->data.length); - q += hiv->data.length; - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA && - data[i].flags != KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue; - memcpy(q, data[i].data.data, data[i].data.length); - q += data[i].data.length; - } - - cksum.checksum.data = tiv->data.data; - cksum.checksum.length = tiv->data.length; - cksum.cksumtype = CHECKSUMTYPE(et->keyed_checksum); - - ret = verify_checksum(context, - crypto, - INTEGRITY_USAGE(usage), - p, - len, - &cksum); - free(p); - return ret; -} - -/** - * Create a Kerberos message checksum. - * - * @param context Kerberos context - * @param crypto Kerberos crypto context - * @param usage Key usage for this buffer - * @param data array of buffers to process - * @param num_data length of array - * @param type output data - * - * @return Return an error code or 0. - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_create_checksum_iov(krb5_context context, - krb5_crypto crypto, - unsigned usage, - krb5_crypto_iov *data, - unsigned int num_data, - krb5_cksumtype *type) -{ - Checksum cksum; - krb5_crypto_iov *civ; - krb5_error_code ret; - size_t i; - size_t len; - char *p, *q; - - if(!derived_crypto(context, crypto)) { - krb5_clear_error_message(context); - return KRB5_CRYPTO_INTERNAL; - } - - civ = find_iv(data, num_data, KRB5_CRYPTO_TYPE_CHECKSUM); - if (civ == NULL) - return KRB5_BAD_MSIZE; - - len = 0; - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA && - data[i].flags != KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue; - len += data[i].data.length; - } - - p = q = malloc(len); - - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA && - data[i].flags != KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue; - memcpy(q, data[i].data.data, data[i].data.length); - q += data[i].data.length; - } - - ret = krb5_create_checksum(context, crypto, usage, 0, p, len, &cksum); - free(p); - if (ret) - return ret; - - if (type) - *type = cksum.cksumtype; - - if (cksum.checksum.length > civ->data.length) { - krb5_set_error_message(context, KRB5_BAD_MSIZE, - N_("Checksum larger then input buffer", "")); - free_Checksum(&cksum); - return KRB5_BAD_MSIZE; - } - - civ->data.length = cksum.checksum.length; - memcpy(civ->data.data, cksum.checksum.data, civ->data.length); - free_Checksum(&cksum); - - return 0; -} - -/** - * Verify a Kerberos message checksum. - * - * @param context Kerberos context - * @param crypto Kerberos crypto context - * @param usage Key usage for this buffer - * @param data array of buffers to process - * @param num_data length of array - * @param type return checksum type if not NULL - * - * @return Return an error code or 0. - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_checksum_iov(krb5_context context, - krb5_crypto crypto, - unsigned usage, - krb5_crypto_iov *data, - unsigned int num_data, - krb5_cksumtype *type) -{ - struct _krb5_encryption_type *et = crypto->et; - Checksum cksum; - krb5_crypto_iov *civ; - krb5_error_code ret; - size_t i; - size_t len; - char *p, *q; - - if(!derived_crypto(context, crypto)) { - krb5_clear_error_message(context); - return KRB5_CRYPTO_INTERNAL; - } - - civ = find_iv(data, num_data, KRB5_CRYPTO_TYPE_CHECKSUM); - if (civ == NULL) - return KRB5_BAD_MSIZE; - - len = 0; - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA && - data[i].flags != KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue; - len += data[i].data.length; - } - - p = q = malloc(len); - - for (i = 0; i < num_data; i++) { - if (data[i].flags != KRB5_CRYPTO_TYPE_DATA && - data[i].flags != KRB5_CRYPTO_TYPE_SIGN_ONLY) - continue; - memcpy(q, data[i].data.data, data[i].data.length); - q += data[i].data.length; - } - - cksum.cksumtype = CHECKSUMTYPE(et->keyed_checksum); - cksum.checksum.length = civ->data.length; - cksum.checksum.data = civ->data.data; - - ret = krb5_verify_checksum(context, crypto, usage, p, len, &cksum); - free(p); - - if (ret == 0 && type) - *type = cksum.cksumtype; - - return ret; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_length(krb5_context context, - krb5_crypto crypto, - int type, - size_t *len) -{ - if (!derived_crypto(context, crypto)) { - krb5_set_error_message(context, EINVAL, "not a derived crypto"); - return EINVAL; - } - - switch(type) { - case KRB5_CRYPTO_TYPE_EMPTY: - *len = 0; - return 0; - case KRB5_CRYPTO_TYPE_HEADER: - *len = crypto->et->blocksize; - return 0; - case KRB5_CRYPTO_TYPE_DATA: - case KRB5_CRYPTO_TYPE_SIGN_ONLY: - /* len must already been filled in */ - return 0; - case KRB5_CRYPTO_TYPE_PADDING: - if (crypto->et->padsize > 1) - *len = crypto->et->padsize; - else - *len = 0; - return 0; - case KRB5_CRYPTO_TYPE_TRAILER: - *len = CHECKSUMSIZE(crypto->et->keyed_checksum); - return 0; - case KRB5_CRYPTO_TYPE_CHECKSUM: - if (crypto->et->keyed_checksum) - *len = CHECKSUMSIZE(crypto->et->keyed_checksum); - else - *len = CHECKSUMSIZE(crypto->et->checksum); - return 0; - } - krb5_set_error_message(context, EINVAL, - "%d not a supported type", type); - return EINVAL; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_length_iov(krb5_context context, - krb5_crypto crypto, - krb5_crypto_iov *data, - unsigned int num_data) -{ - krb5_error_code ret; - size_t i; - - for (i = 0; i < num_data; i++) { - ret = krb5_crypto_length(context, crypto, - data[i].flags, - &data[i].data.length); - if (ret) - return ret; - } - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encrypt_ivec(krb5_context context, - krb5_crypto crypto, - unsigned usage, - const void *data, - size_t len, - krb5_data *result, - void *ivec) -{ - if(derived_crypto(context, crypto)) - return encrypt_internal_derived(context, crypto, usage, - data, len, result, ivec); - else if (special_crypto(context, crypto)) - return encrypt_internal_special (context, crypto, usage, - data, len, result, ivec); - else - return encrypt_internal(context, crypto, data, len, result, ivec); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encrypt(krb5_context context, - krb5_crypto crypto, - unsigned usage, - const void *data, - size_t len, - krb5_data *result) -{ - return krb5_encrypt_ivec(context, crypto, usage, data, len, result, NULL); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encrypt_EncryptedData(krb5_context context, - krb5_crypto crypto, - unsigned usage, - void *data, - size_t len, - int kvno, - EncryptedData *result) -{ - result->etype = CRYPTO_ETYPE(crypto); - if(kvno){ - ALLOC(result->kvno, 1); - *result->kvno = kvno; - }else - result->kvno = NULL; - return krb5_encrypt(context, crypto, usage, data, len, &result->cipher); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decrypt_ivec(krb5_context context, - krb5_crypto crypto, - unsigned usage, - void *data, - size_t len, - krb5_data *result, - void *ivec) -{ - if(derived_crypto(context, crypto)) - return decrypt_internal_derived(context, crypto, usage, - data, len, result, ivec); - else if (special_crypto (context, crypto)) - return decrypt_internal_special(context, crypto, usage, - data, len, result, ivec); - else - return decrypt_internal(context, crypto, data, len, result, ivec); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decrypt(krb5_context context, - krb5_crypto crypto, - unsigned usage, - void *data, - size_t len, - krb5_data *result) -{ - return krb5_decrypt_ivec (context, crypto, usage, data, len, result, - NULL); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decrypt_EncryptedData(krb5_context context, - krb5_crypto crypto, - unsigned usage, - const EncryptedData *e, - krb5_data *result) -{ - return krb5_decrypt(context, crypto, usage, - e->cipher.data, e->cipher.length, result); -} - -/************************************************************ - * * - ************************************************************/ - -krb5_error_code -_krb5_derive_key(krb5_context context, - struct _krb5_encryption_type *et, - struct _krb5_key_data *key, - const void *constant, - size_t len) -{ - unsigned char *k = NULL; - unsigned int nblocks = 0, i; - krb5_error_code ret = 0; - struct _krb5_key_type *kt = et->keytype; - - ret = _key_schedule(context, key); - if(ret) - return ret; - if(et->blocksize * 8 < kt->bits || len != et->blocksize) { - nblocks = (kt->bits + et->blocksize * 8 - 1) / (et->blocksize * 8); - k = malloc(nblocks * et->blocksize); - if(k == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - ret = _krb5_n_fold(constant, len, k, et->blocksize); - if (ret) { - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - - for(i = 0; i < nblocks; i++) { - if(i > 0) - memcpy(k + i * et->blocksize, - k + (i - 1) * et->blocksize, - et->blocksize); - (*et->encrypt)(context, key, k + i * et->blocksize, et->blocksize, - 1, 0, NULL); - } - } else { - /* this case is probably broken, but won't be run anyway */ - void *c = malloc(len); - size_t res_len = (kt->bits + 7) / 8; - - if(len != 0 && c == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - memcpy(c, constant, len); - (*et->encrypt)(context, key, c, len, 1, 0, NULL); - k = malloc(res_len); - if(res_len != 0 && k == NULL) { - free(c); - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - ret = _krb5_n_fold(c, len, k, res_len); - free(c); - if (ret) { - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - } - - /* XXX keytype dependent post-processing */ - switch(kt->type) { - case ETYPE_OLD_DES3_CBC_SHA1: - _krb5_DES3_random_to_key(context, key->key, k, nblocks * et->blocksize); - break; - case ENCTYPE_AES128_CTS_HMAC_SHA1_96: - case ENCTYPE_AES256_CTS_HMAC_SHA1_96: - memcpy(key->key->keyvalue.data, k, key->key->keyvalue.length); - break; - default: - ret = KRB5_CRYPTO_INTERNAL; - krb5_set_error_message(context, ret, - N_("derive_key() called with unknown keytype (%u)", ""), - kt->type); - break; - } - out: - if (key->schedule) { - free_key_schedule(context, key, et); - key->schedule = NULL; - } - if (k) { - memset(k, 0, nblocks * et->blocksize); - free(k); - } - return ret; -} - -static struct _krb5_key_data * -_new_derived_key(krb5_crypto crypto, unsigned usage) -{ - struct _krb5_key_usage *d = crypto->key_usage; - d = realloc(d, (crypto->num_key_usage + 1) * sizeof(*d)); - if(d == NULL) - return NULL; - crypto->key_usage = d; - d += crypto->num_key_usage++; - memset(d, 0, sizeof(*d)); - d->usage = usage; - return &d->key; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_derive_key(krb5_context context, - const krb5_keyblock *key, - krb5_enctype etype, - const void *constant, - size_t constant_len, - krb5_keyblock **derived_key) -{ - krb5_error_code ret; - struct _krb5_encryption_type *et; - struct _krb5_key_data d; - - *derived_key = NULL; - - et = _krb5_find_enctype (etype); - if (et == NULL) { - return unsupported_enctype (context, etype); - } - - ret = krb5_copy_keyblock(context, key, &d.key); - if (ret) - return ret; - - d.schedule = NULL; - ret = _krb5_derive_key(context, et, &d, constant, constant_len); - if (ret == 0) - ret = krb5_copy_keyblock(context, d.key, derived_key); - _krb5_free_key_data(context, &d, et); - return ret; -} - -static krb5_error_code -_get_derived_key(krb5_context context, - krb5_crypto crypto, - unsigned usage, - struct _krb5_key_data **key) -{ - int i; - struct _krb5_key_data *d; - unsigned char constant[5]; - - for(i = 0; i < crypto->num_key_usage; i++) - if(crypto->key_usage[i].usage == usage) { - *key = &crypto->key_usage[i].key; - return 0; - } - d = _new_derived_key(crypto, usage); - if(d == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - krb5_copy_keyblock(context, crypto->key.key, &d->key); - _krb5_put_int(constant, usage, 5); - _krb5_derive_key(context, crypto->et, d, constant, sizeof(constant)); - *key = d; - return 0; -} - -/** - * Create a crypto context used for all encryption and signature - * operation. The encryption type to use is taken from the key, but - * can be overridden with the enctype parameter. This can be useful - * for encryptions types which is compatiable (DES for example). - * - * To free the crypto context, use krb5_crypto_destroy(). - * - * @param context Kerberos context - * @param key the key block information with all key data - * @param etype the encryption type - * @param crypto the resulting crypto context - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_init(krb5_context context, - const krb5_keyblock *key, - krb5_enctype etype, - krb5_crypto *crypto) -{ - krb5_error_code ret; - ALLOC(*crypto, 1); - if(*crypto == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - if(etype == ETYPE_NULL) - etype = key->keytype; - (*crypto)->et = _krb5_find_enctype(etype); - if((*crypto)->et == NULL || ((*crypto)->et->flags & F_DISABLED)) { - free(*crypto); - *crypto = NULL; - return unsupported_enctype(context, etype); - } - if((*crypto)->et->keytype->size != key->keyvalue.length) { - free(*crypto); - *crypto = NULL; - krb5_set_error_message (context, KRB5_BAD_KEYSIZE, - "encryption key has bad length"); - return KRB5_BAD_KEYSIZE; - } - ret = krb5_copy_keyblock(context, key, &(*crypto)->key.key); - if(ret) { - free(*crypto); - *crypto = NULL; - return ret; - } - (*crypto)->key.schedule = NULL; - (*crypto)->num_key_usage = 0; - (*crypto)->key_usage = NULL; - return 0; -} - -static void -free_key_schedule(krb5_context context, - struct _krb5_key_data *key, - struct _krb5_encryption_type *et) -{ - if (et->keytype->cleanup) - (*et->keytype->cleanup)(context, key); - memset(key->schedule->data, 0, key->schedule->length); - krb5_free_data(context, key->schedule); -} - -void -_krb5_free_key_data(krb5_context context, struct _krb5_key_data *key, - struct _krb5_encryption_type *et) -{ - krb5_free_keyblock(context, key->key); - if(key->schedule) { - free_key_schedule(context, key, et); - key->schedule = NULL; - } -} - -static void -free_key_usage(krb5_context context, struct _krb5_key_usage *ku, - struct _krb5_encryption_type *et) -{ - _krb5_free_key_data(context, &ku->key, et); -} - -/** - * Free a crypto context created by krb5_crypto_init(). - * - * @param context Kerberos context - * @param crypto crypto context to free - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_destroy(krb5_context context, - krb5_crypto crypto) -{ - int i; - - for(i = 0; i < crypto->num_key_usage; i++) - free_key_usage(context, &crypto->key_usage[i], crypto->et); - free(crypto->key_usage); - _krb5_free_key_data(context, &crypto->key, crypto->et); - free (crypto); - return 0; -} - -/** - * Return the blocksize used algorithm referenced by the crypto context - * - * @param context Kerberos context - * @param crypto crypto context to query - * @param blocksize the resulting blocksize - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_getblocksize(krb5_context context, - krb5_crypto crypto, - size_t *blocksize) -{ - *blocksize = crypto->et->blocksize; - return 0; -} - -/** - * Return the encryption type used by the crypto context - * - * @param context Kerberos context - * @param crypto crypto context to query - * @param enctype the resulting encryption type - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_getenctype(krb5_context context, - krb5_crypto crypto, - krb5_enctype *enctype) -{ - *enctype = crypto->et->type; - return 0; -} - -/** - * Return the padding size used by the crypto context - * - * @param context Kerberos context - * @param crypto crypto context to query - * @param padsize the return padding size - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_getpadsize(krb5_context context, - krb5_crypto crypto, - size_t *padsize) -{ - *padsize = crypto->et->padsize; - return 0; -} - -/** - * Return the confounder size used by the crypto context - * - * @param context Kerberos context - * @param crypto crypto context to query - * @param confoundersize the returned confounder size - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_getconfoundersize(krb5_context context, - krb5_crypto crypto, - size_t *confoundersize) -{ - *confoundersize = crypto->et->confoundersize; - return 0; -} - - -/** - * Disable encryption type - * - * @param context Kerberos 5 context - * @param enctype encryption type to disable - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_disable(krb5_context context, - krb5_enctype enctype) -{ - struct _krb5_encryption_type *et = _krb5_find_enctype(enctype); - if(et == NULL) { - if (context) - krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %d not supported", ""), - enctype); - return KRB5_PROG_ETYPE_NOSUPP; - } - et->flags |= F_DISABLED; - return 0; -} - -/** - * Enable encryption type - * - * @param context Kerberos 5 context - * @param enctype encryption type to enable - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_enable(krb5_context context, - krb5_enctype enctype) -{ - struct _krb5_encryption_type *et = _krb5_find_enctype(enctype); - if(et == NULL) { - if (context) - krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %d not supported", ""), - enctype); - return KRB5_PROG_ETYPE_NOSUPP; - } - et->flags &= ~F_DISABLED; - return 0; -} - -/** - * Enable or disable all weak encryption types - * - * @param context Kerberos 5 context - * @param enable true to enable, false to disable - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_allow_weak_crypto(krb5_context context, - krb5_boolean enable) -{ - int i; - - for(i = 0; i < _krb5_num_etypes; i++) - if(_krb5_etypes[i]->flags & F_WEAK) { - if(enable) - _krb5_etypes[i]->flags &= ~F_DISABLED; - else - _krb5_etypes[i]->flags |= F_DISABLED; - } - return 0; -} - -static size_t -wrapped_length (krb5_context context, - krb5_crypto crypto, - size_t data_len) -{ - struct _krb5_encryption_type *et = crypto->et; - size_t padsize = et->padsize; - size_t checksumsize = CHECKSUMSIZE(et->checksum); - size_t res; - - res = et->confoundersize + checksumsize + data_len; - res = (res + padsize - 1) / padsize * padsize; - return res; -} - -static size_t -wrapped_length_dervied (krb5_context context, - krb5_crypto crypto, - size_t data_len) -{ - struct _krb5_encryption_type *et = crypto->et; - size_t padsize = et->padsize; - size_t res; - - res = et->confoundersize + data_len; - res = (res + padsize - 1) / padsize * padsize; - if (et->keyed_checksum) - res += et->keyed_checksum->checksumsize; - else - res += et->checksum->checksumsize; - return res; -} - -/* - * Return the size of an encrypted packet of length `data_len' - */ - -KRB5_LIB_FUNCTION size_t KRB5_LIB_CALL -krb5_get_wrapped_length (krb5_context context, - krb5_crypto crypto, - size_t data_len) -{ - if (derived_crypto (context, crypto)) - return wrapped_length_dervied (context, crypto, data_len); - else - return wrapped_length (context, crypto, data_len); -} - -/* - * Return the size of an encrypted packet of length `data_len' - */ - -static size_t -crypto_overhead (krb5_context context, - krb5_crypto crypto) -{ - struct _krb5_encryption_type *et = crypto->et; - size_t res; - - res = CHECKSUMSIZE(et->checksum); - res += et->confoundersize; - if (et->padsize > 1) - res += et->padsize; - return res; -} - -static size_t -crypto_overhead_dervied (krb5_context context, - krb5_crypto crypto) -{ - struct _krb5_encryption_type *et = crypto->et; - size_t res; - - if (et->keyed_checksum) - res = CHECKSUMSIZE(et->keyed_checksum); - else - res = CHECKSUMSIZE(et->checksum); - res += et->confoundersize; - if (et->padsize > 1) - res += et->padsize; - return res; -} - -KRB5_LIB_FUNCTION size_t KRB5_LIB_CALL -krb5_crypto_overhead (krb5_context context, krb5_crypto crypto) -{ - if (derived_crypto (context, crypto)) - return crypto_overhead_dervied (context, crypto); - else - return crypto_overhead (context, crypto); -} - -/** - * Converts the random bytestring to a protocol key according to - * Kerberos crypto frame work. It may be assumed that all the bits of - * the input string are equally random, even though the entropy - * present in the random source may be limited. - * - * @param context Kerberos 5 context - * @param type the enctype resulting key will be of - * @param data input random data to convert to a key - * @param size size of input random data, at least krb5_enctype_keysize() long - * @param key key, output key, free with krb5_free_keyblock_contents() - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_random_to_key(krb5_context context, - krb5_enctype type, - const void *data, - size_t size, - krb5_keyblock *key) -{ - krb5_error_code ret; - struct _krb5_encryption_type *et = _krb5_find_enctype(type); - if(et == NULL) { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %d not supported", ""), - type); - return KRB5_PROG_ETYPE_NOSUPP; - } - if ((et->keytype->bits + 7) / 8 > size) { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption key %s needs %d bytes " - "of random to make an encryption key " - "out of it", ""), - et->name, (int)et->keytype->size); - return KRB5_PROG_ETYPE_NOSUPP; - } - ret = krb5_data_alloc(&key->keyvalue, et->keytype->size); - if(ret) - return ret; - key->keytype = type; - if (et->keytype->random_to_key) - (*et->keytype->random_to_key)(context, key, data, size); - else - memcpy(key->keyvalue.data, data, et->keytype->size); - - return 0; -} - - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_prf_length(krb5_context context, - krb5_enctype type, - size_t *length) -{ - struct _krb5_encryption_type *et = _krb5_find_enctype(type); - - if(et == NULL || et->prf_length == 0) { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %d not supported", ""), - type); - return KRB5_PROG_ETYPE_NOSUPP; - } - - *length = et->prf_length; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_prf(krb5_context context, - const krb5_crypto crypto, - const krb5_data *input, - krb5_data *output) -{ - struct _krb5_encryption_type *et = crypto->et; - - krb5_data_zero(output); - - if(et->prf == NULL) { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - "kerberos prf for %s not supported", - et->name); - return KRB5_PROG_ETYPE_NOSUPP; - } - - return (*et->prf)(context, crypto, input, output); -} - -static krb5_error_code -krb5_crypto_prfplus(krb5_context context, - const krb5_crypto crypto, - const krb5_data *input, - size_t length, - krb5_data *output) -{ - krb5_error_code ret; - krb5_data input2; - unsigned char i = 1; - unsigned char *p; - - krb5_data_zero(&input2); - krb5_data_zero(output); - - krb5_clear_error_message(context); - - ret = krb5_data_alloc(output, length); - if (ret) goto out; - ret = krb5_data_alloc(&input2, input->length + 1); - if (ret) goto out; - - krb5_clear_error_message(context); - - memcpy(((unsigned char *)input2.data) + 1, input->data, input->length); - - p = output->data; - - while (length) { - krb5_data block; - - ((unsigned char *)input2.data)[0] = i++; - - ret = krb5_crypto_prf(context, crypto, &input2, &block); - if (ret) - goto out; - - if (block.length < length) { - memcpy(p, block.data, block.length); - length -= block.length; - } else { - memcpy(p, block.data, length); - length = 0; - } - p += block.length; - krb5_data_free(&block); - } - - out: - krb5_data_free(&input2); - if (ret) - krb5_data_free(output); - return ret; -} - -/** - * The FX-CF2 key derivation function, used in FAST and preauth framework. - * - * @param context Kerberos 5 context - * @param crypto1 first key to combine - * @param crypto2 second key to combine - * @param pepper1 factor to combine with first key to garante uniqueness - * @param pepper2 factor to combine with second key to garante uniqueness - * @param enctype the encryption type of the resulting key - * @param res allocated key, free with krb5_free_keyblock_contents() - * - * @return Return an error code or 0. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_fx_cf2(krb5_context context, - const krb5_crypto crypto1, - const krb5_crypto crypto2, - krb5_data *pepper1, - krb5_data *pepper2, - krb5_enctype enctype, - krb5_keyblock *res) -{ - krb5_error_code ret; - krb5_data os1, os2; - size_t i, keysize; - - memset(res, 0, sizeof(*res)); - krb5_data_zero(&os1); - krb5_data_zero(&os2); - - ret = krb5_enctype_keysize(context, enctype, &keysize); - if (ret) - return ret; - - ret = krb5_data_alloc(&res->keyvalue, keysize); - if (ret) - goto out; - ret = krb5_crypto_prfplus(context, crypto1, pepper1, keysize, &os1); - if (ret) - goto out; - ret = krb5_crypto_prfplus(context, crypto2, pepper2, keysize, &os2); - if (ret) - goto out; - - res->keytype = enctype; - { - unsigned char *p1 = os1.data, *p2 = os2.data, *p3 = res->keyvalue.data; - for (i = 0; i < keysize; i++) - p3[i] = p1[i] ^ p2[i]; - } - out: - if (ret) - krb5_data_free(&res->keyvalue); - krb5_data_free(&os1); - krb5_data_free(&os2); - - return ret; -} - - - -#ifndef HEIMDAL_SMALLER - -/** - * Deprecated: keytypes doesn't exists, they are really enctypes. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_keytype_to_enctypes (krb5_context context, - krb5_keytype keytype, - unsigned *len, - krb5_enctype **val) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - int i; - unsigned n = 0; - krb5_enctype *ret; - - for (i = _krb5_num_etypes - 1; i >= 0; --i) { - if (_krb5_etypes[i]->keytype->type == keytype - && !(_krb5_etypes[i]->flags & F_PSEUDO) - && krb5_enctype_valid(context, _krb5_etypes[i]->type) == 0) - ++n; - } - if (n == 0) { - krb5_set_error_message(context, KRB5_PROG_KEYTYPE_NOSUPP, - "Keytype have no mapping"); - return KRB5_PROG_KEYTYPE_NOSUPP; - } - - ret = malloc(n * sizeof(*ret)); - if (ret == NULL && n != 0) { - krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); - return ENOMEM; - } - n = 0; - for (i = _krb5_num_etypes - 1; i >= 0; --i) { - if (_krb5_etypes[i]->keytype->type == keytype - && !(_krb5_etypes[i]->flags & F_PSEUDO) - && krb5_enctype_valid(context, _krb5_etypes[i]->type) == 0) - ret[n++] = _krb5_etypes[i]->type; - } - *len = n; - *val = ret; - return 0; -} - -/** - * Deprecated: keytypes doesn't exists, they are really enctypes. - * - * @ingroup krb5_deprecated - */ - -/* if two enctypes have compatible keys */ -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_enctypes_compatible_keys(krb5_context context, - krb5_enctype etype1, - krb5_enctype etype2) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - struct _krb5_encryption_type *e1 = _krb5_find_enctype(etype1); - struct _krb5_encryption_type *e2 = _krb5_find_enctype(etype2); - return e1 != NULL && e2 != NULL && e1->keytype == e2->keytype; -} - -#endif /* HEIMDAL_SMALLER */ diff --git a/kerberosV/src/lib/krb5/crypto.h b/kerberosV/src/lib/krb5/crypto.h deleted file mode 100644 index 9b95b8f0cbc..00000000000 --- a/kerberosV/src/lib/krb5/crypto.h +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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. - */ - -#ifndef HEIMDAL_SMALLER -#define DES3_OLD_ENCTYPE 1 -#endif - -struct _krb5_key_data { - krb5_keyblock *key; - krb5_data *schedule; -}; - -struct _krb5_key_usage; - -struct krb5_crypto_data { - struct _krb5_encryption_type *et; - struct _krb5_key_data key; - int num_key_usage; - struct _krb5_key_usage *key_usage; -}; - -#define CRYPTO_ETYPE(C) ((C)->et->type) - -/* bits for `flags' below */ -#define F_KEYED 1 /* checksum is keyed */ -#define F_CPROOF 2 /* checksum is collision proof */ -#define F_DERIVED 4 /* uses derived keys */ -#define F_VARIANT 8 /* uses `variant' keys (6.4.3) */ -#define F_PSEUDO 16 /* not a real protocol type */ -#define F_SPECIAL 32 /* backwards */ -#define F_DISABLED 64 /* enctype/checksum disabled */ -#define F_WEAK 128 /* enctype is considered weak */ - -struct salt_type { - krb5_salttype type; - const char *name; - krb5_error_code (*string_to_key)(krb5_context, krb5_enctype, krb5_data, - krb5_salt, krb5_data, krb5_keyblock*); -}; - -struct _krb5_key_type { - krb5_enctype type; - const char *name; - size_t bits; - size_t size; - size_t schedule_size; - void (*random_key)(krb5_context, krb5_keyblock*); - void (*schedule)(krb5_context, struct _krb5_key_type *, struct _krb5_key_data *); - struct salt_type *string_to_key; - void (*random_to_key)(krb5_context, krb5_keyblock*, const void*, size_t); - void (*cleanup)(krb5_context, struct _krb5_key_data *); - const EVP_CIPHER *(*evp)(void); -}; - -struct _krb5_checksum_type { - krb5_cksumtype type; - const char *name; - size_t blocksize; - size_t checksumsize; - unsigned flags; - krb5_error_code (*checksum)(krb5_context context, - struct _krb5_key_data *key, - const void *buf, size_t len, - unsigned usage, - Checksum *csum); - krb5_error_code (*verify)(krb5_context context, - struct _krb5_key_data *key, - const void *buf, size_t len, - unsigned usage, - Checksum *csum); -}; - -struct _krb5_encryption_type { - krb5_enctype type; - const char *name; - size_t blocksize; - size_t padsize; - size_t confoundersize; - struct _krb5_key_type *keytype; - struct _krb5_checksum_type *checksum; - struct _krb5_checksum_type *keyed_checksum; - unsigned flags; - krb5_error_code (*encrypt)(krb5_context context, - struct _krb5_key_data *key, - void *data, size_t len, - krb5_boolean encryptp, - int usage, - void *ivec); - size_t prf_length; - krb5_error_code (*prf)(krb5_context, - krb5_crypto, const krb5_data *, krb5_data *); -}; - -#define ENCRYPTION_USAGE(U) (((U) << 8) | 0xAA) -#define INTEGRITY_USAGE(U) (((U) << 8) | 0x55) -#define CHECKSUM_USAGE(U) (((U) << 8) | 0x99) - -/* Checksums */ - -extern struct _krb5_checksum_type _krb5_checksum_none; -extern struct _krb5_checksum_type _krb5_checksum_crc32; -extern struct _krb5_checksum_type _krb5_checksum_rsa_md4; -extern struct _krb5_checksum_type _krb5_checksum_rsa_md4_des; -extern struct _krb5_checksum_type _krb5_checksum_rsa_md5_des; -extern struct _krb5_checksum_type _krb5_checksum_rsa_md5_des3; -extern struct _krb5_checksum_type _krb5_checksum_rsa_md5; -extern struct _krb5_checksum_type _krb5_checksum_hmac_sha1_des3; -extern struct _krb5_checksum_type _krb5_checksum_hmac_sha1_aes128; -extern struct _krb5_checksum_type _krb5_checksum_hmac_sha1_aes256; -extern struct _krb5_checksum_type _krb5_checksum_hmac_md5; -extern struct _krb5_checksum_type _krb5_checksum_sha1; - -extern struct _krb5_checksum_type *_krb5_checksum_types[]; -extern int _krb5_num_checksums; - -/* Salts */ - -extern struct salt_type _krb5_AES_salt[]; -extern struct salt_type _krb5_arcfour_salt[]; -extern struct salt_type _krb5_des_salt[]; -extern struct salt_type _krb5_des3_salt[]; -extern struct salt_type _krb5_des3_salt_derived[]; - -/* Encryption types */ - -extern struct _krb5_encryption_type _krb5_enctype_aes256_cts_hmac_sha1; -extern struct _krb5_encryption_type _krb5_enctype_aes128_cts_hmac_sha1; -extern struct _krb5_encryption_type _krb5_enctype_des3_cbc_sha1; -extern struct _krb5_encryption_type _krb5_enctype_des3_cbc_md5; -extern struct _krb5_encryption_type _krb5_enctype_des3_cbc_none; -extern struct _krb5_encryption_type _krb5_enctype_arcfour_hmac_md5; -extern struct _krb5_encryption_type _krb5_enctype_des_cbc_md5; -extern struct _krb5_encryption_type _krb5_enctype_old_des3_cbc_sha1; -extern struct _krb5_encryption_type _krb5_enctype_des_cbc_crc; -extern struct _krb5_encryption_type _krb5_enctype_des_cbc_md4; -extern struct _krb5_encryption_type _krb5_enctype_des_cbc_md5; -extern struct _krb5_encryption_type _krb5_enctype_des_cbc_none; -extern struct _krb5_encryption_type _krb5_enctype_des_cfb64_none; -extern struct _krb5_encryption_type _krb5_enctype_des_pcbc_none; -extern struct _krb5_encryption_type _krb5_enctype_null; - -extern struct _krb5_encryption_type *_krb5_etypes[]; -extern int _krb5_num_etypes; - -/* Interface to the EVP crypto layer provided by hcrypto */ -struct _krb5_evp_schedule { - EVP_CIPHER_CTX ectx; - EVP_CIPHER_CTX dctx; -}; diff --git a/kerberosV/src/lib/krb5/data.c b/kerberosV/src/lib/krb5/data.c deleted file mode 100644 index f62a5532ab6..00000000000 --- a/kerberosV/src/lib/krb5/data.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (c) 1997 - 2007 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 "krb5_locl.h" - -/** - * Reset the (potentially uninitalized) krb5_data structure. - * - * @param p krb5_data to reset. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_data_zero(krb5_data *p) -{ - p->length = 0; - p->data = NULL; -} - -/** - * Free the content of krb5_data structure, its ok to free a zeroed - * structure (with memset() or krb5_data_zero()). When done, the - * structure will be zeroed. The same function is called - * krb5_free_data_contents() in MIT Kerberos. - * - * @param p krb5_data to free. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_data_free(krb5_data *p) -{ - if(p->data != NULL) - free(p->data); - krb5_data_zero(p); -} - -/** - * Free krb5_data (and its content). - * - * @param context Kerberos 5 context. - * @param p krb5_data to free. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_data(krb5_context context, - krb5_data *p) -{ - krb5_data_free(p); - free(p); -} - -/** - * Allocate data of and krb5_data. - * - * @param p krb5_data to allocate. - * @param len size to allocate. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_data_alloc(krb5_data *p, int len) -{ - p->data = malloc(len); - if(len && p->data == NULL) - return ENOMEM; - p->length = len; - return 0; -} - -/** - * Grow (or shrink) the content of krb5_data to a new size. - * - * @param p krb5_data to free. - * @param len new size. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_data_realloc(krb5_data *p, int len) -{ - void *tmp; - tmp = realloc(p->data, len); - if(len && !tmp) - return ENOMEM; - p->data = tmp; - p->length = len; - return 0; -} - -/** - * Copy the data of len into the krb5_data. - * - * @param p krb5_data to copy into. - * @param data data to copy.. - * @param len new size. - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_data_copy(krb5_data *p, const void *data, size_t len) -{ - if (len) { - if(krb5_data_alloc(p, len)) - return ENOMEM; - memmove(p->data, data, len); - } else - p->data = NULL; - p->length = len; - return 0; -} - -/** - * Copy the data into a newly allocated krb5_data. - * - * @param context Kerberos 5 context. - * @param indata the krb5_data data to copy - * @param outdata new krb5_date to copy too. Free with krb5_free_data(). - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_data(krb5_context context, - const krb5_data *indata, - krb5_data **outdata) -{ - krb5_error_code ret; - ALLOC(*outdata, 1); - if(*outdata == NULL) { - krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); - return ENOMEM; - } - ret = der_copy_octet_string(indata, *outdata); - if(ret) { - krb5_clear_error_message (context); - free(*outdata); - *outdata = NULL; - } - return ret; -} - -/** - * Compare to data. - * - * @param data1 krb5_data to compare - * @param data2 krb5_data to compare - * - * @return return the same way as memcmp(), useful when sorting. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_data_cmp(const krb5_data *data1, const krb5_data *data2) -{ - if (data1->length != data2->length) - return data1->length - data2->length; - return memcmp(data1->data, data2->data, data1->length); -} - -/** - * Compare to data not exposing timing information from the checksum data - * - * @param data1 krb5_data to compare - * @param data2 krb5_data to compare - * - * @return returns zero for same data, otherwise non zero. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_data_ct_cmp(const krb5_data *data1, const krb5_data *data2) -{ - if (data1->length != data2->length) - return data1->length - data2->length; - return ct_memcmp(data1->data, data2->data, data1->length); -} diff --git a/kerberosV/src/lib/krb5/deprecated.c b/kerberosV/src/lib/krb5/deprecated.c deleted file mode 100644 index 1d44d21b170..00000000000 --- a/kerberosV/src/lib/krb5/deprecated.c +++ /dev/null @@ -1,609 +0,0 @@ -/* - * Copyright (c) 1997 - 2009 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 "krb5_locl.h" - -#undef __attribute__ -#define __attribute__(x) - -#ifndef HEIMDAL_SMALLER - -/** - * Same as krb5_data_free(). MIT compat. - * - * Deprecated: use krb5_data_free(). - * - * @param context Kerberos 5 context. - * @param data krb5_data to free. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_data_contents(krb5_context context, krb5_data *data) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_data_free(data); -} - -/** - * Deprecated: keytypes doesn't exists, they are really enctypes. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_keytype_to_enctypes_default (krb5_context context, - krb5_keytype keytype, - unsigned *len, - krb5_enctype **val) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - unsigned int i, n; - krb5_enctype *ret; - - if (keytype != KEYTYPE_DES || context->etypes_des == NULL) - return krb5_keytype_to_enctypes (context, keytype, len, val); - - for (n = 0; context->etypes_des[n]; ++n) - ; - ret = malloc (n * sizeof(*ret)); - if (ret == NULL && n != 0) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - for (i = 0; i < n; ++i) - ret[i] = context->etypes_des[i]; - *len = n; - *val = ret; - return 0; -} - - -static struct { - const char *name; - krb5_keytype type; -} keys[] = { - { "null", ENCTYPE_NULL }, - { "des", ETYPE_DES_CBC_CRC }, - { "des3", ETYPE_OLD_DES3_CBC_SHA1 }, - { "aes-128", ETYPE_AES128_CTS_HMAC_SHA1_96 }, - { "aes-256", ETYPE_AES256_CTS_HMAC_SHA1_96 }, - { "arcfour", ETYPE_ARCFOUR_HMAC_MD5 }, - { "arcfour-56", ETYPE_ARCFOUR_HMAC_MD5_56 } -}; - -static int num_keys = sizeof(keys) / sizeof(keys[0]); - -/** - * Deprecated: keytypes doesn't exists, they are really enctypes in - * most cases, use krb5_enctype_to_string(). - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_keytype_to_string(krb5_context context, - krb5_keytype keytype, - char **string) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - const char *name = NULL; - int i; - - for(i = 0; i < num_keys; i++) { - if(keys[i].type == keytype) { - name = keys[i].name; - break; - } - } - - if(i >= num_keys) { - krb5_set_error_message(context, KRB5_PROG_KEYTYPE_NOSUPP, - "key type %d not supported", keytype); - return KRB5_PROG_KEYTYPE_NOSUPP; - } - *string = strdup(name); - if(*string == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -/** - * Deprecated: keytypes doesn't exists, they are really enctypes in - * most cases, use krb5_string_to_enctype(). - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_keytype(krb5_context context, - const char *string, - krb5_keytype *keytype) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - char *end; - int i; - - for(i = 0; i < num_keys; i++) - if(strcasecmp(keys[i].name, string) == 0){ - *keytype = keys[i].type; - return 0; - } - - /* check if the enctype is a number */ - *keytype = strtol(string, &end, 0); - if(*end == '\0' && *keytype != 0) { - if (krb5_enctype_valid(context, *keytype) == 0) - return 0; - } - - krb5_set_error_message(context, KRB5_PROG_KEYTYPE_NOSUPP, - "key type %s not supported", string); - return KRB5_PROG_KEYTYPE_NOSUPP; -} - -/** - * Deprecated: use krb5_get_init_creds() and friends. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV -krb5_password_key_proc (krb5_context context, - krb5_enctype type, - krb5_salt salt, - krb5_const_pointer keyseed, - krb5_keyblock **key) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_error_code ret; - const char *password = (const char *)keyseed; - char buf[BUFSIZ]; - - *key = malloc (sizeof (**key)); - if (*key == NULL) { - krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); - return ENOMEM; - } - if (password == NULL) { - if(UI_UTIL_read_pw_string (buf, sizeof(buf), "Password: ", 0)) { - free (*key); - krb5_clear_error_message(context); - return KRB5_LIBOS_PWDINTR; - } - password = buf; - } - ret = krb5_string_to_key_salt (context, type, password, salt, *key); - memset (buf, 0, sizeof(buf)); - return ret; -} - -/** - * Deprecated: use krb5_get_init_creds() and friends. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_in_tkt_with_password (krb5_context context, - krb5_flags options, - krb5_addresses *addrs, - const krb5_enctype *etypes, - const krb5_preauthtype *pre_auth_types, - const char *password, - krb5_ccache ccache, - krb5_creds *creds, - krb5_kdc_rep *ret_as_reply) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return krb5_get_in_tkt (context, - options, - addrs, - etypes, - pre_auth_types, - krb5_password_key_proc, - password, - NULL, - NULL, - creds, - ccache, - ret_as_reply); -} - -static krb5_error_code KRB5_CALLCONV -krb5_skey_key_proc (krb5_context context, - krb5_enctype type, - krb5_salt salt, - krb5_const_pointer keyseed, - krb5_keyblock **key) -{ - return krb5_copy_keyblock (context, keyseed, key); -} - -/** - * Deprecated: use krb5_get_init_creds() and friends. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_in_tkt_with_skey (krb5_context context, - krb5_flags options, - krb5_addresses *addrs, - const krb5_enctype *etypes, - const krb5_preauthtype *pre_auth_types, - const krb5_keyblock *key, - krb5_ccache ccache, - krb5_creds *creds, - krb5_kdc_rep *ret_as_reply) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - if(key == NULL) - return krb5_get_in_tkt_with_keytab (context, - options, - addrs, - etypes, - pre_auth_types, - NULL, - ccache, - creds, - ret_as_reply); - else - return krb5_get_in_tkt (context, - options, - addrs, - etypes, - pre_auth_types, - krb5_skey_key_proc, - key, - NULL, - NULL, - creds, - ccache, - ret_as_reply); -} - -/** - * Deprecated: use krb5_get_init_creds() and friends. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV -krb5_keytab_key_proc (krb5_context context, - krb5_enctype enctype, - krb5_salt salt, - krb5_const_pointer keyseed, - krb5_keyblock **key) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_keytab_key_proc_args *args = rk_UNCONST(keyseed); - krb5_keytab keytab = args->keytab; - krb5_principal principal = args->principal; - krb5_error_code ret; - krb5_keytab real_keytab; - krb5_keytab_entry entry; - - if(keytab == NULL) - krb5_kt_default(context, &real_keytab); - else - real_keytab = keytab; - - ret = krb5_kt_get_entry (context, real_keytab, principal, - 0, enctype, &entry); - - if (keytab == NULL) - krb5_kt_close (context, real_keytab); - - if (ret) - return ret; - - ret = krb5_copy_keyblock (context, &entry.keyblock, key); - krb5_kt_free_entry(context, &entry); - return ret; -} - -/** - * Deprecated: use krb5_get_init_creds() and friends. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_in_tkt_with_keytab (krb5_context context, - krb5_flags options, - krb5_addresses *addrs, - const krb5_enctype *etypes, - const krb5_preauthtype *pre_auth_types, - krb5_keytab keytab, - krb5_ccache ccache, - krb5_creds *creds, - krb5_kdc_rep *ret_as_reply) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_keytab_key_proc_args a; - - a.principal = creds->client; - a.keytab = keytab; - - return krb5_get_in_tkt (context, - options, - addrs, - etypes, - pre_auth_types, - krb5_keytab_key_proc, - &a, - NULL, - NULL, - creds, - ccache, - ret_as_reply); -} - -/** - * Generate a new ccache of type `ops' in `id'. - * - * Deprecated: use krb5_cc_new_unique() instead. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_ccache - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_gen_new(krb5_context context, - const krb5_cc_ops *ops, - krb5_ccache *id) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return krb5_cc_new_unique(context, ops->prefix, NULL, id); -} - -/** - * Deprecated: use krb5_principal_get_realm() - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_realm * KRB5_LIB_CALL -krb5_princ_realm(krb5_context context, - krb5_principal principal) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return &principal->realm; -} - - -/** - * Deprecated: use krb5_principal_set_realm() - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_princ_set_realm(krb5_context context, - krb5_principal principal, - krb5_realm *realm) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - principal->realm = *realm; -} - -/** - * Deprecated: use krb5_free_cred_contents() - * - * @ingroup krb5_deprecated - */ - -/* keep this for compatibility with older code */ -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_creds_contents (krb5_context context, krb5_creds *c) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return krb5_free_cred_contents (context, c); -} - -/** - * Free the error message returned by krb5_get_error_string(). - * - * Deprecated: use krb5_free_error_message() - * - * @param context Kerberos context - * @param str error message to free - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_error_string(krb5_context context, char *str) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_free_error_message(context, str); -} - -/** - * Set the error message returned by krb5_get_error_string(). - * - * Deprecated: use krb5_get_error_message() - * - * @param context Kerberos context - * @param fmt error message to free - * - * @return Return an error code or 0. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_error_string(krb5_context context, const char *fmt, ...) - __attribute__((format (printf, 2, 3))) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - va_list ap; - - va_start(ap, fmt); - krb5_vset_error_message (context, 0, fmt, ap); - va_end(ap); - return 0; -} - -/** - * Set the error message returned by krb5_get_error_string(), - * deprecated, use krb5_set_error_message(). - * - * Deprecated: use krb5_vset_error_message() - * - * @param context Kerberos context - * @param msg error message to free - * - * @return Return an error code or 0. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vset_error_string(krb5_context context, const char *fmt, va_list args) - __attribute__ ((format (printf, 2, 0))) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_vset_error_message(context, 0, fmt, args); - return 0; -} - -/** - * Clear the error message returned by krb5_get_error_string(). - * - * Deprecated: use krb5_clear_error_message() - * - * @param context Kerberos context - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_clear_error_string(krb5_context context) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_clear_error_message(context); -} - -/** - * Deprecated: use krb5_get_credentials_with_flags(). - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_cred_from_kdc_opt(krb5_context context, - krb5_ccache ccache, - krb5_creds *in_creds, - krb5_creds **out_creds, - krb5_creds ***ret_tgts, - krb5_flags flags) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_kdc_flags f; - f.i = flags; - return _krb5_get_cred_kdc_any(context, f, ccache, - in_creds, NULL, NULL, - out_creds, ret_tgts); -} - -/** - * Deprecated: use krb5_get_credentials_with_flags(). - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_cred_from_kdc(krb5_context context, - krb5_ccache ccache, - krb5_creds *in_creds, - krb5_creds **out_creds, - krb5_creds ***ret_tgts) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return krb5_get_cred_from_kdc_opt(context, ccache, - in_creds, out_creds, ret_tgts, 0); -} - -/** - * Deprecated: use krb5_xfree(). - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_unparsed_name(krb5_context context, char *str) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_xfree(str); -} - -/** - * Deprecated: use krb5_generate_subkey_extended() - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_generate_subkey(krb5_context context, - const krb5_keyblock *key, - krb5_keyblock **subkey) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - return krb5_generate_subkey_extended(context, key, ETYPE_NULL, subkey); -} - -/** - * Deprecated: use krb5_auth_con_getremoteseqnumber() - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_getremoteseqnumber(krb5_context context, - krb5_auth_context auth_context, - int32_t *seqnumber) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - *seqnumber = auth_context->remote_seqnumber; - return 0; -} - -#endif /* HEIMDAL_SMALLER */ diff --git a/kerberosV/src/lib/krb5/derived-key-test.c b/kerberosV/src/lib/krb5/derived-key-test.c deleted file mode 100644 index a67c95a54cb..00000000000 --- a/kerberosV/src/lib/krb5/derived-key-test.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2001 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 "krb5_locl.h" -#include - -enum { MAXSIZE = 24 }; - -static struct testcase { - krb5_enctype enctype; - unsigned char constant[MAXSIZE]; - size_t constant_len; - unsigned char key[MAXSIZE]; - unsigned char res[MAXSIZE]; -} tests[] = { - {ETYPE_DES3_CBC_SHA1, {0x00, 0x00, 0x00, 0x01, 0x55}, 5, - {0xdc, 0xe0, 0x6b, 0x1f, 0x64, 0xc8, 0x57, 0xa1, 0x1c, 0x3d, 0xb5, 0x7c, 0x51, 0x89, 0x9b, 0x2c, 0xc1, 0x79, 0x10, 0x08, 0xce, 0x97, 0x3b, 0x92}, - {0x92, 0x51, 0x79, 0xd0, 0x45, 0x91, 0xa7, 0x9b, 0x5d, 0x31, 0x92, 0xc4, 0xa7, 0xe9, 0xc2, 0x89, 0xb0, 0x49, 0xc7, 0x1f, 0x6e, 0xe6, 0x04, 0xcd}}, - {ETYPE_DES3_CBC_SHA1, {0x00, 0x00, 0x00, 0x01, 0xaa}, 5, - {0x5e, 0x13, 0xd3, 0x1c, 0x70, 0xef, 0x76, 0x57, 0x46, 0x57, 0x85, 0x31, 0xcb, 0x51, 0xc1, 0x5b, 0xf1, 0x1c, 0xa8, 0x2c, 0x97, 0xce, 0xe9, 0xf2}, - {0x9e, 0x58, 0xe5, 0xa1, 0x46, 0xd9, 0x94, 0x2a, 0x10, 0x1c, 0x46, 0x98, 0x45, 0xd6, 0x7a, 0x20, 0xe3, 0xc4, 0x25, 0x9e, 0xd9, 0x13, 0xf2, 0x07}}, - {ETYPE_DES3_CBC_SHA1, {0x00, 0x00, 0x00, 0x01, 0x55}, 5, - {0x98, 0xe6, 0xfd, 0x8a, 0x04, 0xa4, 0xb6, 0x85, 0x9b, 0x75, 0xa1, 0x76, 0x54, 0x0b, 0x97, 0x52, 0xba, 0xd3, 0xec, 0xd6, 0x10, 0xa2, 0x52, 0xbc}, - {0x13, 0xfe, 0xf8, 0x0d, 0x76, 0x3e, 0x94, 0xec, 0x6d, 0x13, 0xfd, 0x2c, 0xa1, 0xd0, 0x85, 0x07, 0x02, 0x49, 0xda, 0xd3, 0x98, 0x08, 0xea, 0xbf}}, - {ETYPE_DES3_CBC_SHA1, {0x00, 0x00, 0x00, 0x01, 0xaa}, 5, - {0x62, 0x2a, 0xec, 0x25, 0xa2, 0xfe, 0x2c, 0xad, 0x70, 0x94, 0x68, 0x0b, 0x7c, 0x64, 0x94, 0x02, 0x80, 0x08, 0x4c, 0x1a, 0x7c, 0xec, 0x92, 0xb5}, - {0xf8, 0xdf, 0xbf, 0x04, 0xb0, 0x97, 0xe6, 0xd9, 0xdc, 0x07, 0x02, 0x68, 0x6b, 0xcb, 0x34, 0x89, 0xd9, 0x1f, 0xd9, 0xa4, 0x51, 0x6b, 0x70, 0x3e}}, - {ETYPE_DES3_CBC_SHA1, {0x6b, 0x65, 0x72, 0x62, 0x65, 0x72, 0x6f, 0x73}, 8, - {0xd3, 0xf8, 0x29, 0x8c, 0xcb, 0x16, 0x64, 0x38, 0xdc, 0xb9, 0xb9, 0x3e, 0xe5, 0xa7, 0x62, 0x92, 0x86, 0xa4, 0x91, 0xf8, 0x38, 0xf8, 0x02, 0xfb}, - {0x23, 0x70, 0xda, 0x57, 0x5d, 0x2a, 0x3d, 0xa8, 0x64, 0xce, 0xbf, 0xdc, 0x52, 0x04, 0xd5, 0x6d, 0xf7, 0x79, 0xa7, 0xdf, 0x43, 0xd9, 0xda, 0x43}}, - {ETYPE_DES3_CBC_SHA1, {0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65}, 7, - {0xb5, 0x5e, 0x98, 0x34, 0x67, 0xe5, 0x51, 0xb3, 0xe5, 0xd0, 0xe5, 0xb6, 0xc8, 0x0d, 0x45, 0x76, 0x94, 0x23, 0xa8, 0x73, 0xdc, 0x62, 0xb3, 0x0e}, - {0x01, 0x26, 0x38, 0x8a, 0xad, 0xc8, 0x1a, 0x1f, 0x2a, 0x62, 0xbc, 0x45, 0xf8, 0xd5, 0xc1, 0x91, 0x51, 0xba, 0xcd, 0xd5, 0xcb, 0x79, 0x8a, 0x3e}}, - {ETYPE_DES3_CBC_SHA1, {0x00, 0x00, 0x00, 0x01, 0x55}, 5, - {0xc1, 0x08, 0x16, 0x49, 0xad, 0xa7, 0x43, 0x62, 0xe6, 0xa1, 0x45, 0x9d, 0x01, 0xdf, 0xd3, 0x0d, 0x67, 0xc2, 0x23, 0x4c, 0x94, 0x07, 0x04, 0xda}, - {0x34, 0x80, 0x57, 0xec, 0x98, 0xfd, 0xc4, 0x80, 0x16, 0x16, 0x1c, 0x2a, 0x4c, 0x7a, 0x94, 0x3e, 0x92, 0xae, 0x49, 0x2c, 0x98, 0x91, 0x75, 0xf7}}, - {ETYPE_DES3_CBC_SHA1, {0x00, 0x00, 0x00, 0x01, 0xaa}, 5, - {0x5d, 0x15, 0x4a, 0xf2, 0x38, 0xf4, 0x67, 0x13, 0x15, 0x57, 0x19, 0xd5, 0x5e, 0x2f, 0x1f, 0x79, 0x0d, 0xd6, 0x61, 0xf2, 0x79, 0xa7, 0x91, 0x7c}, - {0xa8, 0x80, 0x8a, 0xc2, 0x67, 0xda, 0xda, 0x3d, 0xcb, 0xe9, 0xa7, 0xc8, 0x46, 0x26, 0xfb, 0xc7, 0x61, 0xc2, 0x94, 0xb0, 0x13, 0x15, 0xe5, 0xc1}}, - {ETYPE_DES3_CBC_SHA1, {0x00, 0x00, 0x00, 0x01, 0x55}, 5, - {0x79, 0x85, 0x62, 0xe0, 0x49, 0x85, 0x2f, 0x57, 0xdc, 0x8c, 0x34, 0x3b, 0xa1, 0x7f, 0x2c, 0xa1, 0xd9, 0x73, 0x94, 0xef, 0xc8, 0xad, 0xc4, 0x43}, - {0xc8, 0x13, 0xf8, 0x8a, 0x3b, 0xe3, 0xb3, 0x34, 0xf7, 0x54, 0x25, 0xce, 0x91, 0x75, 0xfb, 0xe3, 0xc8, 0x49, 0x3b, 0x89, 0xc8, 0x70, 0x3b, 0x49}}, - {ETYPE_DES3_CBC_SHA1, {0x00, 0x00, 0x00, 0x01, 0xaa}, 5, - {0x26, 0xdc, 0xe3, 0x34, 0xb5, 0x45, 0x29, 0x2f, 0x2f, 0xea, 0xb9, 0xa8, 0x70, 0x1a, 0x89, 0xa4, 0xb9, 0x9e, 0xb9, 0x94, 0x2c, 0xec, 0xd0, 0x16}, - {0xf4, 0x8f, 0xfd, 0x6e, 0x83, 0xf8, 0x3e, 0x73, 0x54, 0xe6, 0x94, 0xfd, 0x25, 0x2c, 0xf8, 0x3b, 0xfe, 0x58, 0xf7, 0xd5, 0xba, 0x37, 0xec, 0x5d}}, - {0} -}; - -int -main(int argc, char **argv) -{ - struct testcase *t; - krb5_context context; - krb5_error_code ret; - int val = 0; - - ret = krb5_init_context (&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - for (t = tests; t->enctype != 0; ++t) { - krb5_keyblock key; - krb5_keyblock *dkey; - - key.keytype = KEYTYPE_DES3; - key.keyvalue.length = MAXSIZE; - key.keyvalue.data = t->key; - - ret = krb5_derive_key(context, &key, t->enctype, t->constant, - t->constant_len, &dkey); - if (ret) - krb5_err (context, 1, ret, "krb5_derive_key"); - if (memcmp (dkey->keyvalue.data, t->res, dkey->keyvalue.length) != 0) { - const unsigned char *p = dkey->keyvalue.data; - int i; - - printf ("derive_key failed\n"); - printf ("should be: "); - for (i = 0; i < dkey->keyvalue.length; ++i) - printf ("%02x", t->res[i]); - printf ("\nresult was: "); - for (i = 0; i < dkey->keyvalue.length; ++i) - printf ("%02x", p[i]); - printf ("\n"); - val = 1; - } - krb5_free_keyblock(context, dkey); - } - krb5_free_context(context); - - return val; -} diff --git a/kerberosV/src/lib/krb5/digest.c b/kerberosV/src/lib/krb5/digest.c deleted file mode 100644 index ef3267b3a76..00000000000 --- a/kerberosV/src/lib/krb5/digest.c +++ /dev/null @@ -1,1225 +0,0 @@ -/* - * Copyright (c) 2006 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 "krb5_locl.h" -#include "digest_asn1.h" - -#ifndef HEIMDAL_SMALLER - -struct krb5_digest_data { - char *cbtype; - char *cbbinding; - - DigestInit init; - DigestInitReply initReply; - DigestRequest request; - DigestResponse response; -}; - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_alloc(krb5_context context, krb5_digest *digest) -{ - krb5_digest d; - - d = calloc(1, sizeof(*d)); - if (d == NULL) { - *digest = NULL; - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - *digest = d; - - return 0; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_digest_free(krb5_digest digest) -{ - if (digest == NULL) - return; - free_DigestInit(&digest->init); - free_DigestInitReply(&digest->initReply); - free_DigestRequest(&digest->request); - free_DigestResponse(&digest->response); - memset(digest, 0, sizeof(*digest)); - free(digest); - return; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_server_cb(krb5_context context, - krb5_digest digest, - const char *type, - const char *binding) -{ - if (digest->init.channel) { - krb5_set_error_message(context, EINVAL, - N_("server channel binding already set", "")); - return EINVAL; - } - digest->init.channel = calloc(1, sizeof(*digest->init.channel)); - if (digest->init.channel == NULL) - goto error; - - digest->init.channel->cb_type = strdup(type); - if (digest->init.channel->cb_type == NULL) - goto error; - - digest->init.channel->cb_binding = strdup(binding); - if (digest->init.channel->cb_binding == NULL) - goto error; - return 0; - error: - if (digest->init.channel) { - free(digest->init.channel->cb_type); - free(digest->init.channel->cb_binding); - free(digest->init.channel); - digest->init.channel = NULL; - } - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_type(krb5_context context, - krb5_digest digest, - const char *type) -{ - if (digest->init.type) { - krb5_set_error_message(context, EINVAL, "client type already set"); - return EINVAL; - } - digest->init.type = strdup(type); - if (digest->init.type == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_hostname(krb5_context context, - krb5_digest digest, - const char *hostname) -{ - if (digest->init.hostname) { - krb5_set_error_message(context, EINVAL, "server hostname already set"); - return EINVAL; - } - digest->init.hostname = malloc(sizeof(*digest->init.hostname)); - if (digest->init.hostname == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - *digest->init.hostname = strdup(hostname); - if (*digest->init.hostname == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(digest->init.hostname); - digest->init.hostname = NULL; - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL -krb5_digest_get_server_nonce(krb5_context context, - krb5_digest digest) -{ - return digest->initReply.nonce; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_server_nonce(krb5_context context, - krb5_digest digest, - const char *nonce) -{ - if (digest->request.serverNonce) { - krb5_set_error_message(context, EINVAL, N_("nonce already set", "")); - return EINVAL; - } - digest->request.serverNonce = strdup(nonce); - if (digest->request.serverNonce == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL -krb5_digest_get_opaque(krb5_context context, - krb5_digest digest) -{ - return digest->initReply.opaque; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_opaque(krb5_context context, - krb5_digest digest, - const char *opaque) -{ - if (digest->request.opaque) { - krb5_set_error_message(context, EINVAL, "opaque already set"); - return EINVAL; - } - digest->request.opaque = strdup(opaque); - if (digest->request.opaque == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL -krb5_digest_get_identifier(krb5_context context, - krb5_digest digest) -{ - if (digest->initReply.identifier == NULL) - return NULL; - return *digest->initReply.identifier; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_identifier(krb5_context context, - krb5_digest digest, - const char *id) -{ - if (digest->request.identifier) { - krb5_set_error_message(context, EINVAL, N_("identifier already set", "")); - return EINVAL; - } - digest->request.identifier = calloc(1, sizeof(*digest->request.identifier)); - if (digest->request.identifier == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - *digest->request.identifier = strdup(id); - if (*digest->request.identifier == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(digest->request.identifier); - digest->request.identifier = NULL; - return ENOMEM; - } - return 0; -} - -static krb5_error_code -digest_request(krb5_context context, - krb5_realm realm, - krb5_ccache ccache, - krb5_key_usage usage, - const DigestReqInner *ireq, - DigestRepInner *irep) -{ - DigestREQ req; - DigestREP rep; - krb5_error_code ret; - krb5_data data, data2; - size_t size = 0; - krb5_crypto crypto = NULL; - krb5_auth_context ac = NULL; - krb5_principal principal = NULL; - krb5_ccache id = NULL; - krb5_realm r = NULL; - - krb5_data_zero(&data); - krb5_data_zero(&data2); - memset(&req, 0, sizeof(req)); - memset(&rep, 0, sizeof(rep)); - - if (ccache == NULL) { - ret = krb5_cc_default(context, &id); - if (ret) - goto out; - } else - id = ccache; - - if (realm == NULL) { - ret = krb5_get_default_realm(context, &r); - if (ret) - goto out; - } else - r = realm; - - /* - * - */ - - ret = krb5_make_principal(context, &principal, - r, KRB5_DIGEST_NAME, r, NULL); - if (ret) - goto out; - - ASN1_MALLOC_ENCODE(DigestReqInner, data.data, data.length, - ireq, &size, ret); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to encode digest inner request", "")); - goto out; - } - if (size != data.length) - krb5_abortx(context, "ASN.1 internal encoder error"); - - ret = krb5_mk_req_exact(context, &ac, - AP_OPTS_USE_SUBKEY|AP_OPTS_MUTUAL_REQUIRED, - principal, NULL, id, &req.apReq); - if (ret) - goto out; - - { - krb5_keyblock *key; - - ret = krb5_auth_con_getlocalsubkey(context, ac, &key); - if (ret) - goto out; - if (key == NULL) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("Digest failed to get local subkey", "")); - goto out; - } - - ret = krb5_crypto_init(context, key, 0, &crypto); - krb5_free_keyblock (context, key); - if (ret) - goto out; - } - - ret = krb5_encrypt_EncryptedData(context, crypto, usage, - data.data, data.length, 0, - &req.innerReq); - if (ret) - goto out; - - krb5_data_free(&data); - - ASN1_MALLOC_ENCODE(DigestREQ, data.data, data.length, - &req, &size, ret); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to encode DigestREQest", "")); - goto out; - } - if (size != data.length) - krb5_abortx(context, "ASN.1 internal encoder error"); - - ret = krb5_sendto_kdc(context, &data, &r, &data2); - if (ret) - goto out; - - ret = decode_DigestREP(data2.data, data2.length, &rep, NULL); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to parse digest response", "")); - goto out; - } - - { - krb5_ap_rep_enc_part *repl; - - ret = krb5_rd_rep(context, ac, &rep.apRep, &repl); - if (ret) - goto out; - - krb5_free_ap_rep_enc_part(context, repl); - } - { - krb5_keyblock *key; - - ret = krb5_auth_con_getremotesubkey(context, ac, &key); - if (ret) - goto out; - if (key == NULL) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("Digest reply have no remote subkey", "")); - goto out; - } - - krb5_crypto_destroy(context, crypto); - ret = krb5_crypto_init(context, key, 0, &crypto); - krb5_free_keyblock (context, key); - if (ret) - goto out; - } - - krb5_data_free(&data); - ret = krb5_decrypt_EncryptedData(context, crypto, usage, - &rep.innerRep, &data); - if (ret) - goto out; - - ret = decode_DigestRepInner(data.data, data.length, irep, NULL); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to decode digest inner reply", "")); - goto out; - } - - out: - if (ccache == NULL && id) - krb5_cc_close(context, id); - if (realm == NULL && r) - free(r); - if (crypto) - krb5_crypto_destroy(context, crypto); - if (ac) - krb5_auth_con_free(context, ac); - if (principal) - krb5_free_principal(context, principal); - - krb5_data_free(&data); - krb5_data_free(&data2); - - free_DigestREQ(&req); - free_DigestREP(&rep); - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_init_request(krb5_context context, - krb5_digest digest, - krb5_realm realm, - krb5_ccache ccache) -{ - DigestReqInner ireq; - DigestRepInner irep; - krb5_error_code ret; - - memset(&ireq, 0, sizeof(ireq)); - memset(&irep, 0, sizeof(irep)); - - if (digest->init.type == NULL) { - krb5_set_error_message(context, EINVAL, - N_("Type missing from init req", "")); - return EINVAL; - } - - ireq.element = choice_DigestReqInner_init; - ireq.u.init = digest->init; - - ret = digest_request(context, realm, ccache, - KRB5_KU_DIGEST_ENCRYPT, &ireq, &irep); - if (ret) - goto out; - - if (irep.element == choice_DigestRepInner_error) { - ret = irep.u.error.code; - krb5_set_error_message(context, ret, N_("Digest init error: %s", ""), - irep.u.error.reason); - goto out; - } - - if (irep.element != choice_DigestRepInner_initReply) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("digest reply not an initReply", "")); - goto out; - } - - ret = copy_DigestInitReply(&irep.u.initReply, &digest->initReply); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to copy initReply", "")); - goto out; - } - - out: - free_DigestRepInner(&irep); - - return ret; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_client_nonce(krb5_context context, - krb5_digest digest, - const char *nonce) -{ - if (digest->request.clientNonce) { - krb5_set_error_message(context, EINVAL, - N_("clientNonce already set", "")); - return EINVAL; - } - digest->request.clientNonce = - calloc(1, sizeof(*digest->request.clientNonce)); - if (digest->request.clientNonce == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - *digest->request.clientNonce = strdup(nonce); - if (*digest->request.clientNonce == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(digest->request.clientNonce); - digest->request.clientNonce = NULL; - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_digest(krb5_context context, - krb5_digest digest, - const char *dgst) -{ - if (digest->request.digest) { - krb5_set_error_message(context, EINVAL, - N_("digest already set", "")); - return EINVAL; - } - digest->request.digest = strdup(dgst); - if (digest->request.digest == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_username(krb5_context context, - krb5_digest digest, - const char *username) -{ - if (digest->request.username) { - krb5_set_error_message(context, EINVAL, "username already set"); - return EINVAL; - } - digest->request.username = strdup(username); - if (digest->request.username == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_authid(krb5_context context, - krb5_digest digest, - const char *authid) -{ - if (digest->request.authid) { - krb5_set_error_message(context, EINVAL, "authid already set"); - return EINVAL; - } - digest->request.authid = malloc(sizeof(*digest->request.authid)); - if (digest->request.authid == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - *digest->request.authid = strdup(authid); - if (*digest->request.authid == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(digest->request.authid); - digest->request.authid = NULL; - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_authentication_user(krb5_context context, - krb5_digest digest, - krb5_principal authentication_user) -{ - krb5_error_code ret; - - if (digest->request.authentication_user) { - krb5_set_error_message(context, EINVAL, - N_("authentication_user already set", "")); - return EINVAL; - } - ret = krb5_copy_principal(context, - authentication_user, - &digest->request.authentication_user); - if (ret) - return ret; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_realm(krb5_context context, - krb5_digest digest, - const char *realm) -{ - if (digest->request.realm) { - krb5_set_error_message(context, EINVAL, "realm already set"); - return EINVAL; - } - digest->request.realm = malloc(sizeof(*digest->request.realm)); - if (digest->request.realm == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - *digest->request.realm = strdup(realm); - if (*digest->request.realm == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(digest->request.realm); - digest->request.realm = NULL; - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_method(krb5_context context, - krb5_digest digest, - const char *method) -{ - if (digest->request.method) { - krb5_set_error_message(context, EINVAL, - N_("method already set", "")); - return EINVAL; - } - digest->request.method = malloc(sizeof(*digest->request.method)); - if (digest->request.method == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - *digest->request.method = strdup(method); - if (*digest->request.method == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(digest->request.method); - digest->request.method = NULL; - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_uri(krb5_context context, - krb5_digest digest, - const char *uri) -{ - if (digest->request.uri) { - krb5_set_error_message(context, EINVAL, N_("uri already set", "")); - return EINVAL; - } - digest->request.uri = malloc(sizeof(*digest->request.uri)); - if (digest->request.uri == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - *digest->request.uri = strdup(uri); - if (*digest->request.uri == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(digest->request.uri); - digest->request.uri = NULL; - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_nonceCount(krb5_context context, - krb5_digest digest, - const char *nonce_count) -{ - if (digest->request.nonceCount) { - krb5_set_error_message(context, EINVAL, - N_("nonceCount already set", "")); - return EINVAL; - } - digest->request.nonceCount = - malloc(sizeof(*digest->request.nonceCount)); - if (digest->request.nonceCount == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - *digest->request.nonceCount = strdup(nonce_count); - if (*digest->request.nonceCount == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(digest->request.nonceCount); - digest->request.nonceCount = NULL; - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_qop(krb5_context context, - krb5_digest digest, - const char *qop) -{ - if (digest->request.qop) { - krb5_set_error_message(context, EINVAL, "qop already set"); - return EINVAL; - } - digest->request.qop = malloc(sizeof(*digest->request.qop)); - if (digest->request.qop == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - *digest->request.qop = strdup(qop); - if (*digest->request.qop == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - free(digest->request.qop); - digest->request.qop = NULL; - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_digest_set_responseData(krb5_context context, - krb5_digest digest, - const char *response) -{ - digest->request.responseData = strdup(response); - if (digest->request.responseData == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_request(krb5_context context, - krb5_digest digest, - krb5_realm realm, - krb5_ccache ccache) -{ - DigestReqInner ireq; - DigestRepInner irep; - krb5_error_code ret; - - memset(&ireq, 0, sizeof(ireq)); - memset(&irep, 0, sizeof(irep)); - - ireq.element = choice_DigestReqInner_digestRequest; - ireq.u.digestRequest = digest->request; - - if (digest->request.type == NULL) { - if (digest->init.type == NULL) { - krb5_set_error_message(context, EINVAL, - N_("Type missing from req", "")); - return EINVAL; - } - ireq.u.digestRequest.type = digest->init.type; - } - - if (ireq.u.digestRequest.digest == NULL) { - static char md5[] = "md5"; - ireq.u.digestRequest.digest = md5; - } - - ret = digest_request(context, realm, ccache, - KRB5_KU_DIGEST_ENCRYPT, &ireq, &irep); - if (ret) - return ret; - - if (irep.element == choice_DigestRepInner_error) { - ret = irep.u.error.code; - krb5_set_error_message(context, ret, - N_("Digest response error: %s", ""), - irep.u.error.reason); - goto out; - } - - if (irep.element != choice_DigestRepInner_response) { - krb5_set_error_message(context, EINVAL, - N_("digest reply not an DigestResponse", "")); - ret = EINVAL; - goto out; - } - - ret = copy_DigestResponse(&irep.u.response, &digest->response); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to copy initReply,", "")); - goto out; - } - - out: - free_DigestRepInner(&irep); - - return ret; -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_digest_rep_get_status(krb5_context context, - krb5_digest digest) -{ - return digest->response.success ? TRUE : FALSE; -} - -KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL -krb5_digest_get_rsp(krb5_context context, - krb5_digest digest) -{ - if (digest->response.rsp == NULL) - return NULL; - return *digest->response.rsp; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_get_tickets(krb5_context context, - krb5_digest digest, - Ticket **tickets) -{ - *tickets = NULL; - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_get_client_binding(krb5_context context, - krb5_digest digest, - char **type, - char **binding) -{ - if (digest->response.channel) { - *type = strdup(digest->response.channel->cb_type); - *binding = strdup(digest->response.channel->cb_binding); - if (*type == NULL || *binding == NULL) { - free(*type); - free(*binding); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - } else { - *type = NULL; - *binding = NULL; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_get_session_key(krb5_context context, - krb5_digest digest, - krb5_data *data) -{ - krb5_error_code ret; - - krb5_data_zero(data); - if (digest->response.session_key == NULL) - return 0; - ret = der_copy_octet_string(digest->response.session_key, data); - if (ret) - krb5_clear_error_message(context); - - return ret; -} - -struct krb5_ntlm_data { - NTLMInit init; - NTLMInitReply initReply; - NTLMRequest request; - NTLMResponse response; -}; - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_alloc(krb5_context context, - krb5_ntlm *ntlm) -{ - *ntlm = calloc(1, sizeof(**ntlm)); - if (*ntlm == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_free(krb5_context context, krb5_ntlm ntlm) -{ - free_NTLMInit(&ntlm->init); - free_NTLMInitReply(&ntlm->initReply); - free_NTLMRequest(&ntlm->request); - free_NTLMResponse(&ntlm->response); - memset(ntlm, 0, sizeof(*ntlm)); - free(ntlm); - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_request(krb5_context context, - krb5_ntlm ntlm, - krb5_realm realm, - krb5_ccache ccache, - uint32_t flags, - const char *hostname, - const char *domainname) -{ - DigestReqInner ireq; - DigestRepInner irep; - krb5_error_code ret; - - memset(&ireq, 0, sizeof(ireq)); - memset(&irep, 0, sizeof(irep)); - - ntlm->init.flags = flags; - if (hostname) { - ALLOC(ntlm->init.hostname, 1); - *ntlm->init.hostname = strdup(hostname); - } - if (domainname) { - ALLOC(ntlm->init.domain, 1); - *ntlm->init.domain = strdup(domainname); - } - - ireq.element = choice_DigestReqInner_ntlmInit; - ireq.u.ntlmInit = ntlm->init; - - ret = digest_request(context, realm, ccache, - KRB5_KU_DIGEST_ENCRYPT, &ireq, &irep); - if (ret) - goto out; - - if (irep.element == choice_DigestRepInner_error) { - ret = irep.u.error.code; - krb5_set_error_message(context, ret, N_("Digest init error: %s", ""), - irep.u.error.reason); - goto out; - } - - if (irep.element != choice_DigestRepInner_ntlmInitReply) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("ntlm reply not an initReply", "")); - goto out; - } - - ret = copy_NTLMInitReply(&irep.u.ntlmInitReply, &ntlm->initReply); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to copy initReply", "")); - goto out; - } - - out: - free_DigestRepInner(&irep); - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_get_flags(krb5_context context, - krb5_ntlm ntlm, - uint32_t *flags) -{ - *flags = ntlm->initReply.flags; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_get_challange(krb5_context context, - krb5_ntlm ntlm, - krb5_data *challange) -{ - krb5_error_code ret; - - ret = der_copy_octet_string(&ntlm->initReply.challange, challange); - if (ret) - krb5_clear_error_message(context); - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_get_opaque(krb5_context context, - krb5_ntlm ntlm, - krb5_data *opaque) -{ - krb5_error_code ret; - - ret = der_copy_octet_string(&ntlm->initReply.opaque, opaque); - if (ret) - krb5_clear_error_message(context); - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_get_targetname(krb5_context context, - krb5_ntlm ntlm, - char **name) -{ - *name = strdup(ntlm->initReply.targetname); - if (*name == NULL) { - krb5_clear_error_message(context); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_get_targetinfo(krb5_context context, - krb5_ntlm ntlm, - krb5_data *data) -{ - krb5_error_code ret; - - if (ntlm->initReply.targetinfo == NULL) { - krb5_data_zero(data); - return 0; - } - - ret = krb5_data_copy(data, - ntlm->initReply.targetinfo->data, - ntlm->initReply.targetinfo->length); - if (ret) { - krb5_clear_error_message(context); - return ret; - } - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_request(krb5_context context, - krb5_ntlm ntlm, - krb5_realm realm, - krb5_ccache ccache) -{ - DigestReqInner ireq; - DigestRepInner irep; - krb5_error_code ret; - - memset(&ireq, 0, sizeof(ireq)); - memset(&irep, 0, sizeof(irep)); - - ireq.element = choice_DigestReqInner_ntlmRequest; - ireq.u.ntlmRequest = ntlm->request; - - ret = digest_request(context, realm, ccache, - KRB5_KU_DIGEST_ENCRYPT, &ireq, &irep); - if (ret) - return ret; - - if (irep.element == choice_DigestRepInner_error) { - ret = irep.u.error.code; - krb5_set_error_message(context, ret, - N_("NTLM response error: %s", ""), - irep.u.error.reason); - goto out; - } - - if (irep.element != choice_DigestRepInner_ntlmResponse) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("NTLM reply not an NTLMResponse", "")); - goto out; - } - - ret = copy_NTLMResponse(&irep.u.ntlmResponse, &ntlm->response); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to copy NTLMResponse", "")); - goto out; - } - - out: - free_DigestRepInner(&irep); - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_flags(krb5_context context, - krb5_ntlm ntlm, - uint32_t flags) -{ - ntlm->request.flags = flags; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_username(krb5_context context, - krb5_ntlm ntlm, - const char *username) -{ - ntlm->request.username = strdup(username); - if (ntlm->request.username == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_targetname(krb5_context context, - krb5_ntlm ntlm, - const char *targetname) -{ - ntlm->request.targetname = strdup(targetname); - if (ntlm->request.targetname == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_lm(krb5_context context, - krb5_ntlm ntlm, - void *hash, size_t len) -{ - ntlm->request.lm.data = malloc(len); - if (ntlm->request.lm.data == NULL && len != 0) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ntlm->request.lm.length = len; - memcpy(ntlm->request.lm.data, hash, len); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_ntlm(krb5_context context, - krb5_ntlm ntlm, - void *hash, size_t len) -{ - ntlm->request.ntlm.data = malloc(len); - if (ntlm->request.ntlm.data == NULL && len != 0) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ntlm->request.ntlm.length = len; - memcpy(ntlm->request.ntlm.data, hash, len); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_opaque(krb5_context context, - krb5_ntlm ntlm, - krb5_data *opaque) -{ - ntlm->request.opaque.data = malloc(opaque->length); - if (ntlm->request.opaque.data == NULL && opaque->length != 0) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ntlm->request.opaque.length = opaque->length; - memcpy(ntlm->request.opaque.data, opaque->data, opaque->length); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_session(krb5_context context, - krb5_ntlm ntlm, - void *sessionkey, size_t length) -{ - ntlm->request.sessionkey = calloc(1, sizeof(*ntlm->request.sessionkey)); - if (ntlm->request.sessionkey == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ntlm->request.sessionkey->data = malloc(length); - if (ntlm->request.sessionkey->data == NULL && length != 0) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy(ntlm->request.sessionkey->data, sessionkey, length); - ntlm->request.sessionkey->length = length; - return 0; -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_ntlm_rep_get_status(krb5_context context, - krb5_ntlm ntlm) -{ - return ntlm->response.success ? TRUE : FALSE; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_rep_get_sessionkey(krb5_context context, - krb5_ntlm ntlm, - krb5_data *data) -{ - if (ntlm->response.sessionkey == NULL) { - krb5_set_error_message(context, EINVAL, - N_("no ntlm session key", "")); - return EINVAL; - } - krb5_clear_error_message(context); - return krb5_data_copy(data, - ntlm->response.sessionkey->data, - ntlm->response.sessionkey->length); -} - -/** - * Get the supported/allowed mechanism for this principal. - * - * @param context A Keberos context. - * @param realm The realm of the KDC. - * @param ccache The credential cache to use when talking to the KDC. - * @param flags The supported mechanism. - * - * @return Return an error code or 0. - * - * @ingroup krb5_digest - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_probe(krb5_context context, - krb5_realm realm, - krb5_ccache ccache, - unsigned *flags) -{ - DigestReqInner ireq; - DigestRepInner irep; - krb5_error_code ret; - - memset(&ireq, 0, sizeof(ireq)); - memset(&irep, 0, sizeof(irep)); - - ireq.element = choice_DigestReqInner_supportedMechs; - - ret = digest_request(context, realm, ccache, - KRB5_KU_DIGEST_ENCRYPT, &ireq, &irep); - if (ret) - goto out; - - if (irep.element == choice_DigestRepInner_error) { - ret = irep.u.error.code; - krb5_set_error_message(context, ret, "Digest probe error: %s", - irep.u.error.reason); - goto out; - } - - if (irep.element != choice_DigestRepInner_supportedMechs) { - ret = EINVAL; - krb5_set_error_message(context, ret, "Digest reply not an probe"); - goto out; - } - - *flags = DigestTypes2int(irep.u.supportedMechs); - - out: - free_DigestRepInner(&irep); - - return ret; -} - -#endif /* HEIMDAL_SMALLER */ diff --git a/kerberosV/src/lib/krb5/doxygen.c b/kerberosV/src/lib/krb5/doxygen.c deleted file mode 100644 index fec9a671930..00000000000 --- a/kerberosV/src/lib/krb5/doxygen.c +++ /dev/null @@ -1,700 +0,0 @@ -/* - * Copyright (c) 2007-2008 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 "krb5_locl.h" - -/** - * - */ - -/*! @mainpage Heimdal Kerberos 5 library - * - * @section intro Introduction - * - * Heimdal libkrb5 library is a implementation of the Kerberos - * protocol. - * - * Kerberos is a system for authenticating users and services on a - * network. It is built upon the assumption that the network is - * ``unsafe''. For example, data sent over the network can be - * eavesdropped and altered, and addresses can also be faked. - * Therefore they cannot be used for authentication purposes. - * - * - * - @ref krb5_introduction - * - @ref krb5_principal_intro - * - @ref krb5_ccache_intro - * - @ref krb5_keytab_intro - * - * If you want to know more about the file formats that is used by - * Heimdal, please see: @ref krb5_fileformats - * - * The project web page: http://www.h5l.org/ - * - */ - -/** @defgroup krb5 Heimdal Kerberos 5 library */ -/** @defgroup krb5_address Heimdal Kerberos 5 address functions */ -/** @defgroup krb5_principal Heimdal Kerberos 5 principal functions */ -/** @defgroup krb5_ccache Heimdal Kerberos 5 credential cache functions */ -/** @defgroup krb5_crypto Heimdal Kerberos 5 cryptography functions */ -/** @defgroup krb5_credential Heimdal Kerberos 5 credential handing functions */ -/** @defgroup krb5_deprecated Heimdal Kerberos 5 deprecated functions */ -/** @defgroup krb5_digest Heimdal Kerberos 5 digest service */ -/** @defgroup krb5_error Heimdal Kerberos 5 error reporting functions */ -/** @defgroup krb5_keytab Heimdal Kerberos 5 keytab handling functions */ -/** @defgroup krb5_ticket Heimdal Kerberos 5 ticket functions */ -/** @defgroup krb5_pac Heimdal Kerberos 5 PAC handling functions */ -/** @defgroup krb5_v4compat Heimdal Kerberos 4 compatiblity functions */ -/** @defgroup krb5_storage Heimdal Kerberos 5 storage functions */ -/** @defgroup krb5_support Heimdal Kerberos 5 support functions */ -/** @defgroup krb5_auth Heimdal Kerberos 5 authentication functions */ - - -/** - * @page krb5_introduction Introduction to the Kerberos 5 API - * @section api_overview Kerberos 5 API Overview - * - * All functions are documented in manual pages. This section tries - * to give an overview of the major components used in Kerberos - * library, and point to where to look for a specific function. - * - * @subsection intro_krb5_context Kerberos context - * - * A kerberos context (krb5_context) holds all per thread state. All - * global variables that are context specific are stored in this - * structure, including default encryption types, credential cache - * (for example, a ticket file), and default realms. - * - * The internals of the structure should never be accessed directly, - * functions exist for extracting information. - * - * See the manual page for krb5_init_context() how to create a context - * and module @ref krb5 for more information about the functions. - * - * @subsection intro_krb5_auth_context Kerberos authentication context - * - * Kerberos authentication context (krb5_auth_context) holds all - * context related to an authenticated connection, in a similar way to - * the kerberos context that holds the context for the thread or - * process. - * - * The krb5_auth_context is used by various functions that are - * directly related to authentication between the - * server/client. Example of data that this structure contains are - * various flags, addresses of client and server, port numbers, - * keyblocks (and subkeys), sequence numbers, replay cache, and - * checksum types. - * - * @subsection intro_krb5_principal Kerberos principal - * - * The Kerberos principal is the structure that identifies a user or - * service in Kerberos. The structure that holds the principal is the - * krb5_principal. There are function to extract the realm and - * elements of the principal, but most applications have no reason to - * inspect the content of the structure. - * - * The are several ways to create a principal (with different degree of - * portability), and one way to free it. - * - * See also the page @ref krb5_principal_intro for more information and also - * module @ref krb5_principal. - * - * @subsection intro_krb5_ccache Credential cache - * - * A credential cache holds the tickets for a user. A given user can - * have several credential caches, one for each realm where the user - * have the initial tickets (the first krbtgt). - * - * The credential cache data can be stored internally in different - * way, each of them for different proposes. File credential (FILE) - * caches and processes based (KCM) caches are for permanent - * storage. While memory caches (MEMORY) are local caches to the local - * process. - * - * Caches are opened with krb5_cc_resolve() or created with - * krb5_cc_new_unique(). - * - * If the cache needs to be opened again (using krb5_cc_resolve()) - * krb5_cc_close() will close the handle, but not the remove the - * cache. krb5_cc_destroy() will zero out the cache, remove the cache - * so it can no longer be referenced. - * - * See also @ref krb5_ccache_intro and @ref krb5_ccache . - * - * @subsection intro_krb5_error_code Kerberos errors - * - * Kerberos errors are based on the com_err library. All error codes are - * 32-bit signed numbers, the first 24 bits define what subsystem the - * error originates from, and last 8 bits are 255 error codes within the - * library. Each error code have fixed string associated with it. For - * example, the error-code -1765328383 have the symbolic name - * KRB5KDC_ERR_NAME_EXP, and associated error string ``Client's entry in - * database has expired''. - * - * This is a great improvement compared to just getting one of the unix - * error-codes back. However, Heimdal have an extention to pass back - * customised errors messages. Instead of getting ``Key table entry not - * found'', the user might back ``failed to find - * host/host.example.com\@EXAMLE.COM(kvno 3) in keytab /etc/krb5.keytab - * (des-cbc-crc)''. This improves the chance that the user find the - * cause of the error so you should use the customised error message - * whenever it's available. - * - * See also module @ref krb5_error . - * - * - * @subsection intro_krb5_keytab Keytab management - * - * A keytab is a storage for locally stored keys. Heimdal includes keytab - * support for Kerberos 5 keytabs, Kerberos 4 srvtab, AFS-KeyFile's, - * and for storing keys in memory. - * - * Keytabs are used for servers and long-running services. - * - * See also @ref krb5_keytab_intro and @ref krb5_keytab . - * - * @subsection intro_krb5_crypto Kerberos crypto - * - * Heimdal includes a implementation of the Kerberos crypto framework, - * all crypto operations. To create a crypto context call krb5_crypto_init(). - * - * See also module @ref krb5_crypto . - * - * @section kerberos5_client Walkthrough of a sample Kerberos 5 client - * - * This example contains parts of a sample TCP Kerberos 5 clients, if you - * want a real working client, please look in appl/test directory in - * the Heimdal distribution. - * - * All Kerberos error-codes that are returned from kerberos functions in - * this program are passed to krb5_err, that will print a - * descriptive text of the error code and exit. Graphical programs can - * convert error-code to a human readable error-string with the - * krb5_get_error_message() function. - * - * Note that you should not use any Kerberos function before - * krb5_init_context() have completed successfully. That is the - * reason err() is used when krb5_init_context() fails. - * - * First the client needs to call krb5_init_context to initialise - * the Kerberos 5 library. This is only needed once per thread - * in the program. If the function returns a non-zero value it indicates - * that either the Kerberos implementation is failing or it's disabled on - * this host. - * - * @code - * #include - * - * int - * main(int argc, char **argv) - * { - * krb5_context context; - * - * if (krb5_init_context(&context)) - * errx (1, "krb5_context"); - * @endcode - * - * Now the client wants to connect to the host at the other end. The - * preferred way of doing this is using getaddrinfo (for - * operating system that have this function implemented), since getaddrinfo - * is neutral to the address type and can use any protocol that is available. - * - * @code - * struct addrinfo *ai, *a; - * struct addrinfo hints; - * int error; - * - * memset (&hints, 0, sizeof(hints)); - * hints.ai_socktype = SOCK_STREAM; - * hints.ai_protocol = IPPROTO_TCP; - * - * error = getaddrinfo (hostname, "pop3", &hints, &ai); - * if (error) - * errx (1, "%s: %s", hostname, gai_strerror(error)); - * - * for (a = ai; a != NULL; a = a->ai_next) { - * int s; - * - * s = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - * if (s < 0) - * continue; - * if (connect (s, a->ai_addr, a->ai_addrlen) < 0) { - * warn ("connect(%s)", hostname); - * close (s); - * continue; - * } - * freeaddrinfo (ai); - * ai = NULL; - * } - * if (ai) { - * freeaddrinfo (ai); - * errx ("failed to contact %s", hostname); - * } - * @endcode - * - * Before authenticating, an authentication context needs to be - * created. This context keeps all information for one (to be) authenticated - * connection (see krb5_auth_context). - * - * @code - * status = krb5_auth_con_init (context, &auth_context); - * if (status) - * krb5_err (context, 1, status, "krb5_auth_con_init"); - * @endcode - * - * For setting the address in the authentication there is a help function - * krb5_auth_con_setaddrs_from_fd() that does everything that is needed - * when given a connected file descriptor to the socket. - * - * @code - * status = krb5_auth_con_setaddrs_from_fd (context, - * auth_context, - * &sock); - * if (status) - * krb5_err (context, 1, status, - * "krb5_auth_con_setaddrs_from_fd"); - * @endcode - * - * The next step is to build a server principal for the service we want - * to connect to. (See also krb5_sname_to_principal().) - * - * @code - * status = krb5_sname_to_principal (context, - * hostname, - * service, - * KRB5_NT_SRV_HST, - * &server); - * if (status) - * krb5_err (context, 1, status, "krb5_sname_to_principal"); - * @endcode - * - * The client principal is not passed to krb5_sendauth() - * function, this causes the krb5_sendauth() function to try to figure it - * out itself. - * - * The server program is using the function krb5_recvauth() to - * receive the Kerberos 5 authenticator. - * - * In this case, mutual authentication will be tried. That means that the server - * will authenticate to the client. Using mutual authentication - * is good since it enables the user to verify that they are talking to the - * right server (a server that knows the key). - * - * If you are using a non-blocking socket you will need to do all work of - * krb5_sendauth() yourself. Basically you need to send over the - * authenticator from krb5_mk_req() and, in case of mutual - * authentication, verifying the result from the server with - * krb5_rd_rep(). - * - * @code - * status = krb5_sendauth (context, - * &auth_context, - * &sock, - * VERSION, - * NULL, - * server, - * AP_OPTS_MUTUAL_REQUIRED, - * NULL, - * NULL, - * NULL, - * NULL, - * NULL, - * NULL); - * if (status) - * krb5_err (context, 1, status, "krb5_sendauth"); - * @endcode - * - * Once authentication has been performed, it is time to send some - * data. First we create a krb5_data structure, then we sign it with - * krb5_mk_safe() using the auth_context that contains the - * session-key that was exchanged in the - * krb5_sendauth()/krb5_recvauth() authentication - * sequence. - * - * @code - * data.data = "hej"; - * data.length = 3; - * - * krb5_data_zero (&packet); - * - * status = krb5_mk_safe (context, - * auth_context, - * &data, - * &packet, - * NULL); - * if (status) - * krb5_err (context, 1, status, "krb5_mk_safe"); - * @endcode - * - * And send it over the network. - * - * @code - * len = packet.length; - * net_len = htonl(len); - * - * if (krb5_net_write (context, &sock, &net_len, 4) != 4) - * err (1, "krb5_net_write"); - * if (krb5_net_write (context, &sock, packet.data, len) != len) - * err (1, "krb5_net_write"); - * @endcode - * - * To send encrypted (and signed) data krb5_mk_priv() should be - * used instead. krb5_mk_priv() works the same way as - * krb5_mk_safe(), with the exception that it encrypts the data - * in addition to signing it. - * - * @code - * data.data = "hemligt"; - * data.length = 7; - * - * krb5_data_free (&packet); - * - * status = krb5_mk_priv (context, - * auth_context, - * &data, - * &packet, - * NULL); - * if (status) - * krb5_err (context, 1, status, "krb5_mk_priv"); - * @endcode - * - * And send it over the network. - * - * @code - * len = packet.length; - * net_len = htonl(len); - * - * if (krb5_net_write (context, &sock, &net_len, 4) != 4) - * err (1, "krb5_net_write"); - * if (krb5_net_write (context, &sock, packet.data, len) != len) - * err (1, "krb5_net_write"); - * - * @endcode - * - * The server is using krb5_rd_safe() and - * krb5_rd_priv() to verify the signature and decrypt the packet. - * - * @section intro_krb5_verify_user Validating a password in an application - * - * See the manual page for krb5_verify_user(). - * - * @section mit_differences API differences to MIT Kerberos - * - * This section is somewhat disorganised, but so far there is no overall - * structure to the differences, though some of the have their root in - * that Heimdal uses an ASN.1 compiler and MIT doesn't. - * - * @subsection mit_krb5_principal Principal and realms - * - * Heimdal stores the realm as a krb5_realm, that is a char *. - * MIT Kerberos uses a krb5_data to store a realm. - * - * In Heimdal krb5_principal doesn't contain the component - * name_type; it's instead stored in component - * name.name_type. To get and set the nametype in Heimdal, use - * krb5_principal_get_type() and - * krb5_principal_set_type(). - * - * For more information about principal and realms, see - * krb5_principal. - * - * @subsection mit_krb5_error_code Error messages - * - * To get the error string, Heimdal uses - * krb5_get_error_message(). This is to return custom error messages - * (like ``Can't find host/datan.example.com\@CODE.COM in - * /etc/krb5.conf.'' instead of a ``Key table entry not found'' that - * error_message returns. - * - * Heimdal uses a threadsafe(r) version of the com_err interface; the - * global com_err table isn't initialised. Then - * error_message returns quite a boring error string (just - * the error code itself). - * - * - */ - -/** - * - * - * @page krb5_fileformats File formats - * - * @section fileformats File formats - * - * This section documents the diffrent file formats that are used in - * Heimdal and other Kerberos implementations. - * - * @subsection file_keytab keytab - * - * The keytab binary format is not a standard format. The format has - * evolved and may continue to. It is however understood by several - * Kerberos implementations including Heimdal, MIT, Sun's Java ktab and - * are created by the ktpass.exe utility from Windows. So it has - * established itself as the defacto format for storing Kerberos keys. - * - * The following C-like structure definitions illustrate the MIT keytab - * file format. All values are in network byte order. All text is ASCII. - * - * @code - * keytab { - * uint16_t file_format_version; # 0x502 - * keytab_entry entries[*]; - * }; - * - * keytab_entry { - * int32_t size; - * uint16_t num_components; # subtract 1 if version 0x501 - * counted_octet_string realm; - * counted_octet_string components[num_components]; - * uint32_t name_type; # not present if version 0x501 - * uint32_t timestamp; - * uint8_t vno8; - * keyblock key; - * uint32_t vno; #only present if >= 4 bytes left in entry - * uint32_t flags; #only present if >= 4 bytes left in entry - * }; - * - * counted_octet_string { - * uint16_t length; - * uint8_t data[length]; - * }; - * - * keyblock { - * uint16_t type; - * counted_octet_string; - * }; - * @endcode - * - * All numbers are stored in network byteorder (big endian) format. - * - * The keytab file format begins with the 16 bit file_format_version which - * at the time this document was authored is 0x502. The format of older - * keytabs is described at the end of this document. - * - * The file_format_version is immediately followed by an array of - * keytab_entry structures which are prefixed with a 32 bit size indicating - * the number of bytes that follow in the entry. Note that the size should be - * evaluated as signed. This is because a negative value indicates that the - * entry is in fact empty (e.g. it has been deleted) and that the negative - * value of that negative value (which is of course a positive value) is - * the offset to the next keytab_entry. Based on these size values alone - * the entire keytab file can be traversed. - * - * The size is followed by a 16 bit num_components field indicating the - * number of counted_octet_string components in the components array. - * - * The num_components field is followed by a counted_octet_string - * representing the realm of the principal. - * - * A counted_octet_string is simply an array of bytes prefixed with a 16 - * bit length. For the realm and name components, the counted_octet_string - * bytes are ASCII encoded text with no zero terminator. - * - * Following the realm is the components array that represents the name of - * the principal. The text of these components may be joined with slashs - * to construct the typical SPN representation. For example, the service - * principal HTTP/www.foo.net\@FOO.NET would consist of name components - * "HTTP" followed by "www.foo.net". - * - * Following the components array is the 32 bit name_type (e.g. 1 is - * KRB5_NT_PRINCIPAL, 2 is KRB5_NT_SRV_INST, 5 is KRB5_NT_UID, etc). In - * practice the name_type is almost certainly 1 meaning KRB5_NT_PRINCIPAL. - * - * The 32 bit timestamp indicates the time the key was established for that - * principal. The value represents the number of seconds since Jan 1, 1970. - * - * The 8 bit vno8 field is the version number of the key. This value is - * overridden by the 32 bit vno field if it is present. The vno8 field is - * filled with the lower 8 bits of the 32 bit protocol kvno field. - * - * The keyblock structure consists of a 16 bit value indicating the - * encryption type and is a counted_octet_string containing the key. The - * encryption type is the same as the Kerberos standard (e.g. 3 is - * des-cbc-md5, 23 is arcfour-hmac-md5, etc). - * - * The last field of the keytab_entry structure is optional. If the size of - * the keytab_entry indicates that there are at least 4 bytes remaining, - * a 32 bit value representing the key version number is present. This - * value supersedes the 8 bit vno8 value preceeding the keyblock. - * - * Older keytabs with a file_format_version of 0x501 are different in - * three ways: - * - * - All integers are in host byte order [1]. - * - The num_components field is 1 too large (i.e. after decoding, decrement by 1). - * - The 32 bit name_type field is not present. - * - * [1] The file_format_version field should really be treated as two - * separate 8 bit quantities representing the major and minor version - * number respectively. - * - * @subsection file_hdb_dump Heimdal database dump file - * - * Format of the Heimdal text dump file as of Heimdal 0.6.3: - * - * Each line in the dump file is one entry in the database. - * - * Each field of a line is separated by one or more spaces, with the - * exception of fields consisting of principals containing spaces, where - * space can be quoted with \ and \ is quoted by \. - * - * Fields and their types are: - * - * @code - * Quoted princial (quote character is \) [string] - * Keys [keys] - * Created by [event] - * Modified by [event optional] - * Valid start time [time optional] - * Valid end time [time optional] - * Password end valid time [time optional] - * Max lifetime of ticket [time optional] - * Max renew time of ticket [integer optional] - * Flags [hdb flags] - * Generation number [generation optional] - * Extensions [extentions optional] - * @endcode - * - * Fields following these silently are ignored. - * - * All optional fields will be skipped if they fail to parse (or comprise - * the optional field marker of "-", w/o quotes). - * - * Example: - * - * @code - * fred\@CODE.COM 27:1:16:e8b4c8fc7e60b9e641dcf4cff3f08a701d982a2f89ba373733d26ca59ba6c789666f6b8bfcf169412bb1e5dceb9b33cda29f3412:-:1:3:4498a933881178c744f4232172dcd774c64e81fa6d05ecdf643a7e390624a0ebf3c7407a:-:1:2:b01934b13eb795d76f3a80717d469639b4da0cfb644161340ef44fdeb375e54d684dbb85:-:1:1:ea8e16d8078bf60c781da90f508d4deccba70595258b9d31888d33987cd31af0c9cced2e:- 20020415130120:admin\@CODE.COM 20041221112428:fred\@CODE.COM - - - 86400 604800 126 20020415130120:793707:28 - - * @endcode - * - * Encoding of types are as follows: - * - * - keys - * - * @code - * kvno:[masterkvno:keytype:keydata:salt]{zero or more separated by :} - * @endcode - * - * kvno is the key version number. - * - * keydata is hex-encoded - * - * masterkvno is the kvno of the database master key. If this field is - * empty, the kadmin load and merge operations will encrypt the key data - * with the master key if there is one. Otherwise the key data will be - * imported asis. - * - * salt is encoded as "-" (no/default salt) or - * - * @code - * salt-type / - * salt-type / "string" - * salt-type / hex-encoded-data - * @endcode - * - * keytype is the protocol enctype number; see enum ENCTYPE in - * include/krb5_asn1.h for values. - * - * Example: - * @code - * 27:1:16:e8b4c8fc7e60b9e641dcf4cff3f08a701d982a2f89ba373733d26ca59ba6c789666f6b8bfcf169412bb1e5dceb9b33cda29f3412:-:1:3:4498a933881178c744f4232172dcd774c64e81fa6d05ecdf643a7e390624a0ebf3c7407a:-:1:2:b01934b13eb795d76f3a80717d469639b4da0cfb644161340ef44fdeb375e54d684dbb85:-:1:1:ea8e16d8078bf60c781da90f508d4deccba70595258b9d31888d33987cd31af0c9cced2e:- - * @endcode - * - * - * @code - * kvno=27,{key: masterkvno=1,keytype=des3-cbc-sha1,keydata=..., default salt}... - * @endcode - * - * - time - * - * Format of the time is: YYYYmmddHHMMSS, corresponding to strftime - * format "%Y%m%d%k%M%S". - * - * Time is expressed in UTC. - * - * Time can be optional (using -), when the time 0 is used. - * - * Example: - * - * @code - * 20041221112428 - * @endcode - * - * - event - * - * @code - * time:principal - * @endcode - * - * time is as given in format time - * - * principal is a string. Not quoting it may not work in earlier - * versions of Heimdal. - * - * Example: - * @code - * 20041221112428:bloggs\@CODE.COM - * @endcode - * - * - hdb flags - * - * Integer encoding of HDB flags, see HDBFlags in lib/hdb/hdb.asn1. Each - * bit in the integer is the same as the bit in the specification. - * - * - generation: - * - * @code - * time:usec:gen - * @endcode - * - * - * usec is a the microsecond, integer. - * gen is generation number, integer. - * - * The generation can be defaulted (using '-') or the empty string - * - * - extensions: - * - * @code - * first-hex-encoded-HDB-Extension[:second-...] - * @endcode - * - * HDB-extension is encoded the DER encoded HDB-Extension from - * lib/hdb/hdb.asn1. Consumers HDB extensions should be aware that - * unknown entires needs to be preserved even thought the ASN.1 data - * content might be unknown. There is a critical flag in the data to show - * to the KDC that the entry MUST be understod if the entry is to be - * used. - * - * - */ diff --git a/kerberosV/src/lib/krb5/eai_to_heim_errno.c b/kerberosV/src/lib/krb5/eai_to_heim_errno.c deleted file mode 100644 index a6e14aba31d..00000000000 --- a/kerberosV/src/lib/krb5/eai_to_heim_errno.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2000 - 2001 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 "krb5_locl.h" - -/** - * Convert the getaddrinfo() error code to a Kerberos et error code. - * - * @param eai_errno contains the error code from getaddrinfo(). - * @param system_error should have the value of errno after the failed getaddrinfo(). - * - * @return Kerberos error code representing the EAI errors. - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_eai_to_heim_errno(int eai_errno, int system_error) -{ - switch(eai_errno) { - case EAI_NOERROR: - return 0; -#ifdef EAI_ADDRFAMILY - case EAI_ADDRFAMILY: - return HEIM_EAI_ADDRFAMILY; -#endif - case EAI_AGAIN: - return HEIM_EAI_AGAIN; - case EAI_BADFLAGS: - return HEIM_EAI_BADFLAGS; - case EAI_FAIL: - return HEIM_EAI_FAIL; - case EAI_FAMILY: - return HEIM_EAI_FAMILY; - case EAI_MEMORY: - return HEIM_EAI_MEMORY; -#if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME - case EAI_NODATA: - return HEIM_EAI_NODATA; -#endif -#ifdef WSANO_DATA - case WSANO_DATA: - return HEIM_EAI_NODATA; -#endif - case EAI_NONAME: - return HEIM_EAI_NONAME; - case EAI_SERVICE: - return HEIM_EAI_SERVICE; - case EAI_SOCKTYPE: - return HEIM_EAI_SOCKTYPE; -#ifdef EAI_SYSTEM - case EAI_SYSTEM: - return system_error; -#endif - default: - return HEIM_EAI_UNKNOWN; /* XXX */ - } -} - -/** - * Convert the gethostname() error code (h_error) to a Kerberos et - * error code. - * - * @param eai_errno contains the error code from gethostname(). - * - * @return Kerberos error code representing the gethostname errors. - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_h_errno_to_heim_errno(int eai_errno) -{ - switch(eai_errno) { - case 0: - return 0; - case HOST_NOT_FOUND: - return HEIM_EAI_NONAME; - case TRY_AGAIN: - return HEIM_EAI_AGAIN; - case NO_RECOVERY: - return HEIM_EAI_FAIL; - case NO_DATA: - return HEIM_EAI_NONAME; - default: - return HEIM_EAI_UNKNOWN; /* XXX */ - } -} diff --git a/kerberosV/src/lib/krb5/error_string.c b/kerberosV/src/lib/krb5/error_string.c deleted file mode 100644 index 1bfbad0bfb0..00000000000 --- a/kerberosV/src/lib/krb5/error_string.c +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Copyright (c) 2001, 2003, 2005 - 2006 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 "krb5_locl.h" - -#undef __attribute__ -#define __attribute__(x) - -/** - * Clears the error message from the Kerberos 5 context. - * - * @param context The Kerberos 5 context to clear - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_clear_error_message(krb5_context context) -{ - HEIMDAL_MUTEX_lock(context->mutex); - if (context->error_string) - free(context->error_string); - context->error_code = 0; - context->error_string = NULL; - HEIMDAL_MUTEX_unlock(context->mutex); -} - -/** - * Set the context full error string for a specific error code. - * The error that is stored should be internationalized. - * - * The if context is NULL, no error string is stored. - * - * @param context Kerberos 5 context - * @param ret The error code - * @param fmt Error string for the error code - * @param ... printf(3) style parameters. - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_set_error_message(krb5_context context, krb5_error_code ret, - const char *fmt, ...) - __attribute__ ((format (printf, 3, 4))) -{ - va_list ap; - - va_start(ap, fmt); - krb5_vset_error_message (context, ret, fmt, ap); - va_end(ap); -} - -/** - * Set the context full error string for a specific error code. - * - * The if context is NULL, no error string is stored. - * - * @param context Kerberos 5 context - * @param ret The error code - * @param fmt Error string for the error code - * @param args printf(3) style parameters. - * - * @ingroup krb5_error - */ - - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_vset_error_message (krb5_context context, krb5_error_code ret, - const char *fmt, va_list args) - __attribute__ ((format (printf, 3, 0))) -{ - int r; - - if (context == NULL) - return; - - HEIMDAL_MUTEX_lock(context->mutex); - if (context->error_string) { - free(context->error_string); - context->error_string = NULL; - } - context->error_code = ret; - r = vasprintf(&context->error_string, fmt, args); - if (r < 0) - context->error_string = NULL; - HEIMDAL_MUTEX_unlock(context->mutex); -} - -/** - * Prepend the context full error string for a specific error code. - * The error that is stored should be internationalized. - * - * The if context is NULL, no error string is stored. - * - * @param context Kerberos 5 context - * @param ret The error code - * @param fmt Error string for the error code - * @param ... printf(3) style parameters. - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_prepend_error_message(krb5_context context, krb5_error_code ret, - const char *fmt, ...) - __attribute__ ((format (printf, 3, 4))) -{ - va_list ap; - - va_start(ap, fmt); - krb5_vprepend_error_message(context, ret, fmt, ap); - va_end(ap); -} - -/** - * Prepend the contexts's full error string for a specific error code. - * - * The if context is NULL, no error string is stored. - * - * @param context Kerberos 5 context - * @param ret The error code - * @param fmt Error string for the error code - * @param args printf(3) style parameters. - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_vprepend_error_message(krb5_context context, krb5_error_code ret, - const char *fmt, va_list args) - __attribute__ ((format (printf, 3, 0))) -{ - char *str = NULL, *str2 = NULL; - - if (context == NULL) - return; - - HEIMDAL_MUTEX_lock(context->mutex); - if (context->error_code != ret) { - HEIMDAL_MUTEX_unlock(context->mutex); - return; - } - if (vasprintf(&str, fmt, args) < 0 || str == NULL) { - HEIMDAL_MUTEX_unlock(context->mutex); - return; - } - if (context->error_string) { - int e; - - e = asprintf(&str2, "%s: %s", str, context->error_string); - free(context->error_string); - if (e < 0 || str2 == NULL) - context->error_string = NULL; - else - context->error_string = str2; - free(str); - } else - context->error_string = str; - HEIMDAL_MUTEX_unlock(context->mutex); -} - - -/** - * Return the error message in context. On error or no error string, - * the function returns NULL. - * - * @param context Kerberos 5 context - * - * @return an error string, needs to be freed with - * krb5_free_error_message(). The functions return NULL on error. - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION char * KRB5_LIB_CALL -krb5_get_error_string(krb5_context context) -{ - char *ret = NULL; - - HEIMDAL_MUTEX_lock(context->mutex); - if (context->error_string) - ret = strdup(context->error_string); - HEIMDAL_MUTEX_unlock(context->mutex); - return ret; -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_have_error_string(krb5_context context) -{ - char *str; - HEIMDAL_MUTEX_lock(context->mutex); - str = context->error_string; - HEIMDAL_MUTEX_unlock(context->mutex); - return str != NULL; -} - -/** - * Return the error message for `code' in context. On memory - * allocation error the function returns NULL. - * - * @param context Kerberos 5 context - * @param code Error code related to the error - * - * @return an error string, needs to be freed with - * krb5_free_error_message(). The functions return NULL on error. - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL -krb5_get_error_message(krb5_context context, krb5_error_code code) -{ - char *str = NULL; - const char *cstr = NULL; - char buf[128]; - int free_context = 0; - - if (code == 0) - return strdup("Success"); - - /* - * The MIT version of this function ignores the krb5_context - * and several widely deployed applications call krb5_get_error_message() - * with a NULL context in order to translate an error code as a - * replacement for error_message(). Another reason a NULL context - * might be provided is if the krb5_init_context() call itself - * failed. - */ - if (context) - { - HEIMDAL_MUTEX_lock(context->mutex); - if (context->error_string && - (code == context->error_code || context->error_code == 0)) - { - str = strdup(context->error_string); - } - HEIMDAL_MUTEX_unlock(context->mutex); - - if (str) - return str; - } - else - { - if (krb5_init_context(&context) == 0) - free_context = 1; - } - - if (context) - cstr = com_right_r(context->et_list, code, buf, sizeof(buf)); - - if (free_context) - krb5_free_context(context); - - if (cstr) - return strdup(cstr); - - cstr = error_message(code); - if (cstr) - return strdup(cstr); - - if (asprintf(&str, "", (int)code) == -1 || str == NULL) - return NULL; - - return str; -} - - -/** - * Free the error message returned by krb5_get_error_message(). - * - * @param context Kerberos context - * @param msg error message to free, returned byg - * krb5_get_error_message(). - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_error_message(krb5_context context, const char *msg) -{ - free(rk_UNCONST(msg)); -} - - -/** - * Return the error string for the error code. The caller must not - * free the string. - * - * This function is deprecated since its not threadsafe. - * - * @param context Kerberos 5 context. - * @param code Kerberos error code. - * - * @return the error message matching code - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_get_err_text(krb5_context context, krb5_error_code code) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - const char *p = NULL; - if(context != NULL) - p = com_right(context->et_list, code); - if(p == NULL) - p = strerror(code); - if (p == NULL) - p = "Unknown error"; - return p; -} diff --git a/kerberosV/src/lib/krb5/expand_hostname.c b/kerberosV/src/lib/krb5/expand_hostname.c deleted file mode 100644 index 7b638d5f017..00000000000 --- a/kerberosV/src/lib/krb5/expand_hostname.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 "krb5_locl.h" - -static krb5_error_code -copy_hostname(krb5_context context, - const char *orig_hostname, - char **new_hostname) -{ - *new_hostname = strdup (orig_hostname); - if (*new_hostname == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - strlwr (*new_hostname); - return 0; -} - -/** - * krb5_expand_hostname() tries to make orig_hostname into a more - * canonical one in the newly allocated space returned in - * new_hostname. - - * @param context a Keberos context - * @param orig_hostname hostname to canonicalise. - * @param new_hostname output hostname, caller must free hostname with - * krb5_xfree(). - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_expand_hostname (krb5_context context, - const char *orig_hostname, - char **new_hostname) -{ - struct addrinfo *ai, *a, hints; - int error; - - if ((context->flags & KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME) == 0) - return copy_hostname (context, orig_hostname, new_hostname); - - memset (&hints, 0, sizeof(hints)); - hints.ai_flags = AI_CANONNAME; - - error = getaddrinfo (orig_hostname, NULL, &hints, &ai); - if (error) - return copy_hostname (context, orig_hostname, new_hostname); - for (a = ai; a != NULL; a = a->ai_next) { - if (a->ai_canonname != NULL) { - *new_hostname = strdup (a->ai_canonname); - freeaddrinfo (ai); - if (*new_hostname == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } else { - return 0; - } - } - } - freeaddrinfo (ai); - return copy_hostname (context, orig_hostname, new_hostname); -} - -/* - * handle the case of the hostname being unresolvable and thus identical - */ - -static krb5_error_code -vanilla_hostname (krb5_context context, - const char *orig_hostname, - char **new_hostname, - char ***realms) -{ - krb5_error_code ret; - - ret = copy_hostname (context, orig_hostname, new_hostname); - if (ret) - return ret; - strlwr (*new_hostname); - - ret = krb5_get_host_realm (context, *new_hostname, realms); - if (ret) { - free (*new_hostname); - return ret; - } - return 0; -} - -/** - * krb5_expand_hostname_realms() expands orig_hostname to a name we - * believe to be a hostname in newly allocated space in new_hostname - * and return the realms new_hostname is believed to belong to in - * realms. - * - * @param context a Keberos context - * @param orig_hostname hostname to canonicalise. - * @param new_hostname output hostname, caller must free hostname with - * krb5_xfree(). - * @param realms output possible realms, is an array that is terminated - * with NULL. Caller must free with krb5_free_host_realm(). - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_expand_hostname_realms (krb5_context context, - const char *orig_hostname, - char **new_hostname, - char ***realms) -{ - struct addrinfo *ai, *a, hints; - int error; - krb5_error_code ret = 0; - - if ((context->flags & KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME) == 0) - return vanilla_hostname (context, orig_hostname, new_hostname, - realms); - - memset (&hints, 0, sizeof(hints)); - hints.ai_flags = AI_CANONNAME; - - error = getaddrinfo (orig_hostname, NULL, &hints, &ai); - if (error) - return vanilla_hostname (context, orig_hostname, new_hostname, - realms); - - for (a = ai; a != NULL; a = a->ai_next) { - if (a->ai_canonname != NULL) { - ret = copy_hostname (context, a->ai_canonname, new_hostname); - if (ret) { - freeaddrinfo (ai); - return ret; - } - strlwr (*new_hostname); - ret = krb5_get_host_realm (context, *new_hostname, realms); - if (ret == 0) { - freeaddrinfo (ai); - return 0; - } - free (*new_hostname); - } - } - freeaddrinfo(ai); - return vanilla_hostname (context, orig_hostname, new_hostname, realms); -} diff --git a/kerberosV/src/lib/krb5/expand_path.c b/kerberosV/src/lib/krb5/expand_path.c deleted file mode 100644 index 4c4898a79ea..00000000000 --- a/kerberosV/src/lib/krb5/expand_path.c +++ /dev/null @@ -1,500 +0,0 @@ - -/*********************************************************************** - * Copyright (c) 2009, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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 "krb5_locl.h" - -typedef int PTYPE; - -#ifdef _WIN32 -#include -#include - -/* - * Expand a %{TEMP} token - * - * The %{TEMP} token expands to the temporary path for the current - * user as returned by GetTempPath(). - * - * @note: Since the GetTempPath() function relies on the TMP or TEMP - * environment variables, this function will failover to the system - * temporary directory until the user profile is loaded. In addition, - * the returned path may or may not exist. - */ -static int -_expand_temp_folder(krb5_context context, PTYPE param, const char *postfix, char **ret) -{ - TCHAR tpath[MAX_PATH]; - size_t len; - - if (!GetTempPath(sizeof(tpath)/sizeof(tpath[0]), tpath)) { - if (context) - krb5_set_error_message(context, EINVAL, - "Failed to get temporary path (GLE=%d)", - GetLastError()); - return EINVAL; - } - - len = strlen(tpath); - - if (len > 0 && tpath[len - 1] == '\\') - tpath[len - 1] = '\0'; - - *ret = strdup(tpath); - - if (*ret == NULL) { - if (context) - krb5_set_error_message(context, ENOMEM, "strdup - Out of memory"); - return ENOMEM; - } - - return 0; -} - -extern HINSTANCE _krb5_hInstance; - -/* - * Expand a %{BINDIR} token - * - * This is also used to expand a few other tokens on Windows, since - * most of the executable binaries end up in the same directory. The - * "bin" directory is considered to be the directory in which the - * krb5.dll is located. - */ -static int -_expand_bin_dir(krb5_context context, PTYPE param, const char *postfix, char **ret) -{ - TCHAR path[MAX_PATH]; - TCHAR *lastSlash; - DWORD nc; - - nc = GetModuleFileName(_krb5_hInstance, path, sizeof(path)/sizeof(path[0])); - if (nc == 0 || - nc == sizeof(path)/sizeof(path[0])) { - return EINVAL; - } - - lastSlash = strrchr(path, '\\'); - if (lastSlash != NULL) { - TCHAR *fslash = strrchr(lastSlash, '/'); - - if (fslash != NULL) - lastSlash = fslash; - - *lastSlash = '\0'; - } - - if (postfix) { - if (strlcat(path, postfix, sizeof(path)/sizeof(path[0])) >= sizeof(path)/sizeof(path[0])) - return EINVAL; - } - - *ret = strdup(path); - if (*ret == NULL) - return ENOMEM; - - return 0; -} - -/* - * Expand a %{USERID} token - * - * The %{USERID} token expands to the string representation of the - * user's SID. The user account that will be used is the account - * corresponding to the current thread's security token. This means - * that: - * - * - If the current thread token has the anonymous impersonation - * level, the call will fail. - * - * - If the current thread is impersonating a token at - * SecurityIdentification level the call will fail. - * - */ -static int -_expand_userid(krb5_context context, PTYPE param, const char *postfix, char **ret) -{ - int rv = EINVAL; - HANDLE hThread = NULL; - HANDLE hToken = NULL; - PTOKEN_OWNER pOwner = NULL; - DWORD len = 0; - LPTSTR strSid = NULL; - - hThread = GetCurrentThread(); - - if (!OpenThreadToken(hThread, TOKEN_QUERY, - FALSE, /* Open the thread token as the - current thread user. */ - &hToken)) { - - DWORD le = GetLastError(); - - if (le == ERROR_NO_TOKEN) { - HANDLE hProcess = GetCurrentProcess(); - - le = 0; - if (!OpenProcessToken(hProcess, TOKEN_QUERY, &hToken)) - le = GetLastError(); - } - - if (le != 0) { - if (context) - krb5_set_error_message(context, rv, - "Can't open thread token (GLE=%d)", le); - goto _exit; - } - } - - if (!GetTokenInformation(hToken, TokenOwner, NULL, 0, &len)) { - if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) { - if (context) - krb5_set_error_message(context, rv, - "Unexpected error reading token information (GLE=%d)", - GetLastError()); - goto _exit; - } - - if (len == 0) { - if (context) - krb5_set_error_message(context, rv, - "GetTokenInformation() returned truncated buffer"); - goto _exit; - } - - pOwner = malloc(len); - if (pOwner == NULL) { - if (context) - krb5_set_error_message(context, rv, "Out of memory"); - goto _exit; - } - } else { - if (context) - krb5_set_error_message(context, rv, "GetTokenInformation() returned truncated buffer"); - goto _exit; - } - - if (!GetTokenInformation(hToken, TokenOwner, pOwner, len, &len)) { - if (context) - krb5_set_error_message(context, rv, "GetTokenInformation() failed. GLE=%d", GetLastError()); - goto _exit; - } - - if (!ConvertSidToStringSid(pOwner->Owner, &strSid)) { - if (context) - krb5_set_error_message(context, rv, "Can't convert SID to string. GLE=%d", GetLastError()); - goto _exit; - } - - *ret = strdup(strSid); - if (*ret == NULL && context) - krb5_set_error_message(context, rv, "Out of memory"); - - rv = 0; - - _exit: - if (hToken != NULL) - CloseHandle(hToken); - - if (pOwner != NULL) - free (pOwner); - - if (strSid != NULL) - LocalFree(strSid); - - return rv; -} - -/* - * Expand a folder identified by a CSIDL - */ - -static int -_expand_csidl(krb5_context context, PTYPE folder, const char *postfix, char **ret) -{ - TCHAR path[MAX_PATH]; - size_t len; - - if (SHGetFolderPath(NULL, folder, NULL, SHGFP_TYPE_CURRENT, path) != S_OK) { - if (context) - krb5_set_error_message(context, EINVAL, "Unable to determine folder path"); - return EINVAL; - } - - len = strlen(path); - - if (len > 0 && path[len - 1] == '\\') - path[len - 1] = '\0'; - - if (postfix && - strlcat(path, postfix, sizeof(path)/sizeof(path[0])) >= sizeof(path)/sizeof(path[0])) { - return ENOMEM; - } - - *ret = strdup(path); - if (*ret == NULL) { - if (context) - krb5_set_error_message(context, ENOMEM, "Out of memory"); - return ENOMEM; - } - return 0; -} - -#else - -static int -_expand_path(krb5_context context, PTYPE param, const char *postfix, char **ret) -{ - *ret = strdup(postfix); - if (*ret == NULL) { - krb5_set_error_message(context, ENOMEM, "malloc - out of memory"); - return ENOMEM; - } - return 0; -} - -static int -_expand_temp_folder(krb5_context context, PTYPE param, const char *postfix, char **ret) -{ - const char *p = NULL; - - if (issuid()) - p = getenv("TEMP"); - if (p) - *ret = strdup(p); - else - *ret = strdup("/tmp"); - if (*ret == NULL) - return ENOMEM; - return 0; -} - -static int -_expand_userid(krb5_context context, PTYPE param, const char *postfix, char **str) -{ - int ret = asprintf(str, "%ld", (unsigned long)getuid()); - if (ret < 0 || *str == NULL) - return ENOMEM; - return 0; -} - - -#endif /* _WIN32 */ - -/** - * Expand a %{null} token - * - * The expansion of a %{null} token is always the empty string. - */ - -static int -_expand_null(krb5_context context, PTYPE param, const char *postfix, char **ret) -{ - *ret = strdup(""); - if (*ret == NULL) { - if (context) - krb5_set_error_message(context, ENOMEM, "Out of memory"); - return ENOMEM; - } - return 0; -} - - -static const struct token { - const char * tok; - int ftype; -#define FTYPE_CSIDL 0 -#define FTYPE_SPECIAL 1 - - PTYPE param; - const char * postfix; - - int (*exp_func)(krb5_context, PTYPE, const char *, char **); - -#define SPECIALP(f, P) FTYPE_SPECIAL, 0, P, f -#define SPECIAL(f) SPECIALP(f, NULL) - -} tokens[] = { -#ifdef _WIN32 -#define CSIDLP(C,P) FTYPE_CSIDL, C, P, _expand_csidl -#define CSIDL(C) CSIDLP(C, NULL) - - {"APPDATA", CSIDL(CSIDL_APPDATA)}, /* Roaming application data (for current user) */ - {"COMMON_APPDATA", CSIDL(CSIDL_COMMON_APPDATA)}, /* Application data (all users) */ - {"LOCAL_APPDATA", CSIDL(CSIDL_LOCAL_APPDATA)}, /* Local application data (for current user) */ - {"SYSTEM", CSIDL(CSIDL_SYSTEM)}, /* Windows System folder (e.g. %WINDIR%\System32) */ - {"WINDOWS", CSIDL(CSIDL_WINDOWS)}, /* Windows folder */ - {"USERCONFIG", CSIDLP(CSIDL_APPDATA, "\\" PACKAGE)}, /* Per user Heimdal configuration file path */ - {"COMMONCONFIG", CSIDLP(CSIDL_COMMON_APPDATA, "\\" PACKAGE)}, /* Common Heimdal configuration file path */ - {"LIBDIR", SPECIAL(_expand_bin_dir)}, - {"BINDIR", SPECIAL(_expand_bin_dir)}, - {"LIBEXEC", SPECIAL(_expand_bin_dir)}, - {"SBINDIR", SPECIAL(_expand_bin_dir)}, -#else - {"LIBDIR", FTYPE_SPECIAL, 0, LIBDIR, _expand_path}, - {"BINDIR", FTYPE_SPECIAL, 0, BINDIR, _expand_path}, - {"LIBEXEC", FTYPE_SPECIAL, 0, LIBEXECDIR, _expand_path}, - {"SBINDIR", FTYPE_SPECIAL, 0, SBINDIR, _expand_path}, -#endif - {"TEMP", SPECIAL(_expand_temp_folder)}, - {"USERID", SPECIAL(_expand_userid)}, - {"uid", SPECIAL(_expand_userid)}, - {"null", SPECIAL(_expand_null)} -}; - -static int -_expand_token(krb5_context context, - const char *token, - const char *token_end, - char **ret) -{ - size_t i; - - *ret = NULL; - - if (token[0] != '%' || token[1] != '{' || token_end[0] != '}' || - token_end - token <= 2) { - if (context) - krb5_set_error_message(context, EINVAL,"Invalid token."); - return EINVAL; - } - - for (i = 0; i < sizeof(tokens)/sizeof(tokens[0]); i++) { - if (!strncmp(token+2, tokens[i].tok, (token_end - token) - 2)) - return tokens[i].exp_func(context, tokens[i].param, - tokens[i].postfix, ret); - } - - if (context) - krb5_set_error_message(context, EINVAL, "Invalid token."); - return EINVAL; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_expand_path_tokens(krb5_context context, - const char *path_in, - char **ppath_out) -{ - char *tok_begin, *tok_end, *append; - const char *path_left; - size_t len = 0; - - if (path_in == NULL || *path_in == '\0') { - *ppath_out = strdup(""); - return 0; - } - - *ppath_out = NULL; - - for (path_left = path_in; path_left && *path_left; ) { - - tok_begin = strstr(path_left, "%{"); - - if (tok_begin && tok_begin != path_left) { - - append = malloc((tok_begin - path_left) + 1); - if (append) { - memcpy(append, path_left, tok_begin - path_left); - append[tok_begin - path_left] = '\0'; - } - path_left = tok_begin; - - } else if (tok_begin) { - - tok_end = strchr(tok_begin, '}'); - if (tok_end == NULL) { - if (*ppath_out) - free(*ppath_out); - *ppath_out = NULL; - if (context) - krb5_set_error_message(context, EINVAL, "variable missing }"); - return EINVAL; - } - - if (_expand_token(context, tok_begin, tok_end, &append)) { - if (*ppath_out) - free(*ppath_out); - *ppath_out = NULL; - return EINVAL; - } - - path_left = tok_end + 1; - } else { - - append = strdup(path_left); - path_left = NULL; - - } - - if (append == NULL) { - - if (*ppath_out) - free(*ppath_out); - *ppath_out = NULL; - if (context) - krb5_set_error_message(context, ENOMEM, "malloc - out of memory"); - return ENOMEM; - - } - - { - size_t append_len = strlen(append); - char * new_str = realloc(*ppath_out, len + append_len + 1); - - if (new_str == NULL) { - free(append); - if (*ppath_out) - free(*ppath_out); - *ppath_out = NULL; - if (context) - krb5_set_error_message(context, ENOMEM, "malloc - out of memory"); - return ENOMEM; - } - - *ppath_out = new_str; - memcpy(*ppath_out + len, append, append_len + 1); - len = len + append_len; - free(append); - } - } - -#ifdef _WIN32 - /* Also deal with slashes */ - if (*ppath_out) { - char * c; - for (c = *ppath_out; *c; c++) - if (*c == '/') - *c = '\\'; - } -#endif - - return 0; -} diff --git a/kerberosV/src/lib/krb5/fcache.c b/kerberosV/src/lib/krb5/fcache.c deleted file mode 100644 index 731f2934146..00000000000 --- a/kerberosV/src/lib/krb5/fcache.c +++ /dev/null @@ -1,1124 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" - -typedef struct krb5_fcache{ - char *filename; - int version; -}krb5_fcache; - -struct fcc_cursor { - int fd; - krb5_storage *sp; -}; - -#define KRB5_FCC_FVNO_1 1 -#define KRB5_FCC_FVNO_2 2 -#define KRB5_FCC_FVNO_3 3 -#define KRB5_FCC_FVNO_4 4 - -#define FCC_TAG_DELTATIME 1 - -#define FCACHE(X) ((krb5_fcache*)(X)->data.data) - -#define FILENAME(X) (FCACHE(X)->filename) - -#define FCC_CURSOR(C) ((struct fcc_cursor*)(C)) - -static const char* KRB5_CALLCONV -fcc_get_name(krb5_context context, - krb5_ccache id) -{ - if (FCACHE(id) == NULL) - return NULL; - - return FILENAME(id); -} - -int -_krb5_xlock(krb5_context context, int fd, krb5_boolean exclusive, - const char *filename) -{ - int ret; -#ifdef HAVE_FCNTL - struct flock l; - - l.l_start = 0; - l.l_len = 0; - l.l_type = exclusive ? F_WRLCK : F_RDLCK; - l.l_whence = SEEK_SET; - ret = fcntl(fd, F_SETLKW, &l); -#else - ret = flock(fd, exclusive ? LOCK_EX : LOCK_SH); -#endif - if(ret < 0) - ret = errno; - if(ret == EACCES) /* fcntl can return EACCES instead of EAGAIN */ - ret = EAGAIN; - - switch (ret) { - case 0: - break; - case EINVAL: /* filesystem doesn't support locking, let the user have it */ - ret = 0; - break; - case EAGAIN: - krb5_set_error_message(context, ret, - N_("timed out locking cache file %s", "file"), - filename); - break; - default: { - char buf[128]; - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message(context, ret, - N_("error locking cache file %s: %s", - "file, error"), filename, buf); - break; - } - } - return ret; -} - -int -_krb5_xunlock(krb5_context context, int fd) -{ - int ret; -#ifdef HAVE_FCNTL - struct flock l; - l.l_start = 0; - l.l_len = 0; - l.l_type = F_UNLCK; - l.l_whence = SEEK_SET; - ret = fcntl(fd, F_SETLKW, &l); -#else - ret = flock(fd, LOCK_UN); -#endif - if (ret < 0) - ret = errno; - switch (ret) { - case 0: - break; - case EINVAL: /* filesystem doesn't support locking, let the user have it */ - ret = 0; - break; - default: { - char buf[128]; - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message(context, ret, - N_("Failed to unlock file: %s", ""), buf); - break; - } - } - return ret; -} - -static krb5_error_code -write_storage(krb5_context context, krb5_storage *sp, int fd) -{ - krb5_error_code ret; - krb5_data data; - ssize_t sret; - - ret = krb5_storage_to_data(sp, &data); - if (ret) { - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - return ret; - } - sret = write(fd, data.data, data.length); - ret = (sret != (ssize_t)data.length); - krb5_data_free(&data); - if (ret) { - ret = errno; - krb5_set_error_message(context, ret, - N_("Failed to write FILE credential data", "")); - return ret; - } - return 0; -} - - -static krb5_error_code KRB5_CALLCONV -fcc_lock(krb5_context context, krb5_ccache id, - int fd, krb5_boolean exclusive) -{ - return _krb5_xlock(context, fd, exclusive, fcc_get_name(context, id)); -} - -static krb5_error_code KRB5_CALLCONV -fcc_unlock(krb5_context context, int fd) -{ - return _krb5_xunlock(context, fd); -} - -static krb5_error_code KRB5_CALLCONV -fcc_resolve(krb5_context context, krb5_ccache *id, const char *res) -{ - krb5_fcache *f; - f = malloc(sizeof(*f)); - if(f == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - f->filename = strdup(res); - if(f->filename == NULL){ - free(f); - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - f->version = 0; - (*id)->data.data = f; - (*id)->data.length = sizeof(*f); - return 0; -} - -/* - * Try to scrub the contents of `filename' safely. - */ - -static int -scrub_file (int fd) -{ - off_t pos; - char buf[128]; - - pos = lseek(fd, 0, SEEK_END); - if (pos < 0) - return errno; - if (lseek(fd, 0, SEEK_SET) < 0) - return errno; - memset(buf, 0, sizeof(buf)); - while(pos > 0) { - ssize_t tmp = write(fd, buf, min((off_t)sizeof(buf), pos)); - - if (tmp < 0) - return errno; - pos -= tmp; - } -#ifdef _MSC_VER - _commit (fd); -#else - fsync (fd); -#endif - return 0; -} - -/* - * Erase `filename' if it exists, trying to remove the contents if - * it's `safe'. We always try to remove the file, it it exists. It's - * only overwritten if it's a regular file (not a symlink and not a - * hardlink) - */ - -krb5_error_code -_krb5_erase_file(krb5_context context, const char *filename) -{ - int fd; - struct stat sb1, sb2; - int ret; - - ret = lstat (filename, &sb1); - if (ret < 0) - return errno; - - fd = open(filename, O_RDWR | O_BINARY); - if(fd < 0) { - if(errno == ENOENT) - return 0; - else - return errno; - } - rk_cloexec(fd); - ret = _krb5_xlock(context, fd, 1, filename); - if (ret) { - close(fd); - return ret; - } - if (unlink(filename) < 0) { - _krb5_xunlock(context, fd); - close (fd); - return errno; - } - ret = fstat (fd, &sb2); - if (ret < 0) { - _krb5_xunlock(context, fd); - close (fd); - return errno; - } - - /* check if someone was playing with symlinks */ - - if (sb1.st_dev != sb2.st_dev || sb1.st_ino != sb2.st_ino) { - _krb5_xunlock(context, fd); - close (fd); - return EPERM; - } - - /* there are still hard links to this file */ - - if (sb2.st_nlink != 0) { - _krb5_xunlock(context, fd); - close (fd); - return 0; - } - - ret = scrub_file (fd); - if (ret) { - _krb5_xunlock(context, fd); - close(fd); - return ret; - } - ret = _krb5_xunlock(context, fd); - close (fd); - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fcc_gen_new(krb5_context context, krb5_ccache *id) -{ - char *file = NULL, *exp_file = NULL; - krb5_error_code ret; - krb5_fcache *f; - int fd; - - f = malloc(sizeof(*f)); - if(f == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - ret = asprintf (&file, "%sXXXXXX", KRB5_DEFAULT_CCFILE_ROOT); - if(ret < 0 || file == NULL) { - free(f); - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - ret = _krb5_expand_path_tokens(context, file, &exp_file); - free(file); - if (ret) - return ret; - - file = exp_file; - - fd = mkstemp(exp_file); - if(fd < 0) { - int xret = errno; - krb5_set_error_message(context, xret, N_("mkstemp %s failed", ""), exp_file); - free(f); - free(exp_file); - return xret; - } - close(fd); - f->filename = exp_file; - f->version = 0; - (*id)->data.data = f; - (*id)->data.length = sizeof(*f); - return 0; -} - -static void -storage_set_flags(krb5_context context, krb5_storage *sp, int vno) -{ - int flags = 0; - switch(vno) { - case KRB5_FCC_FVNO_1: - flags |= KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS; - flags |= KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE; - flags |= KRB5_STORAGE_HOST_BYTEORDER; - break; - case KRB5_FCC_FVNO_2: - flags |= KRB5_STORAGE_HOST_BYTEORDER; - break; - case KRB5_FCC_FVNO_3: - flags |= KRB5_STORAGE_KEYBLOCK_KEYTYPE_TWICE; - break; - case KRB5_FCC_FVNO_4: - break; - default: - krb5_abortx(context, - "storage_set_flags called with bad vno (%x)", vno); - } - krb5_storage_set_flags(sp, flags); -} - -static krb5_error_code KRB5_CALLCONV -fcc_open(krb5_context context, - krb5_ccache id, - int *fd_ret, - int flags, - mode_t mode) -{ - krb5_boolean exclusive = ((flags | O_WRONLY) == flags || - (flags | O_RDWR) == flags); - krb5_error_code ret; - const char *filename; - int fd; - - if (FCACHE(id) == NULL) - return krb5_einval(context, 2); - - filename = FILENAME(id); - - fd = open(filename, flags, mode); - if(fd < 0) { - char buf[128]; - ret = errno; - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message(context, ret, N_("open(%s): %s", "file, error"), - filename, buf); - return ret; - } - rk_cloexec(fd); - - if((ret = fcc_lock(context, id, fd, exclusive)) != 0) { - close(fd); - return ret; - } - *fd_ret = fd; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fcc_initialize(krb5_context context, - krb5_ccache id, - krb5_principal primary_principal) -{ - krb5_fcache *f = FCACHE(id); - int ret = 0; - int fd; - - if (f == NULL) - return krb5_einval(context, 2); - - unlink (f->filename); - - ret = fcc_open(context, id, &fd, O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600); - if(ret) - return ret; - { - krb5_storage *sp; - sp = krb5_storage_emem(); - krb5_storage_set_eof_code(sp, KRB5_CC_END); - if(context->fcache_vno != 0) - f->version = context->fcache_vno; - else - f->version = KRB5_FCC_FVNO_4; - ret |= krb5_store_int8(sp, 5); - ret |= krb5_store_int8(sp, f->version); - storage_set_flags(context, sp, f->version); - if(f->version == KRB5_FCC_FVNO_4 && ret == 0) { - /* V4 stuff */ - if (context->kdc_sec_offset) { - ret |= krb5_store_int16 (sp, 12); /* length */ - ret |= krb5_store_int16 (sp, FCC_TAG_DELTATIME); /* Tag */ - ret |= krb5_store_int16 (sp, 8); /* length of data */ - ret |= krb5_store_int32 (sp, context->kdc_sec_offset); - ret |= krb5_store_int32 (sp, context->kdc_usec_offset); - } else { - ret |= krb5_store_int16 (sp, 0); - } - } - ret |= krb5_store_principal(sp, primary_principal); - - ret |= write_storage(context, sp, fd); - - krb5_storage_free(sp); - } - fcc_unlock(context, fd); - if (close(fd) < 0) - if (ret == 0) { - char buf[128]; - ret = errno; - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message (context, ret, N_("close %s: %s", ""), - FILENAME(id), buf); - } - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fcc_close(krb5_context context, - krb5_ccache id) -{ - if (FCACHE(id) == NULL) - return krb5_einval(context, 2); - - free (FILENAME(id)); - krb5_data_free(&id->data); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fcc_destroy(krb5_context context, - krb5_ccache id) -{ - if (FCACHE(id) == NULL) - return krb5_einval(context, 2); - - _krb5_erase_file(context, FILENAME(id)); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fcc_store_cred(krb5_context context, - krb5_ccache id, - krb5_creds *creds) -{ - int ret; - int fd; - - ret = fcc_open(context, id, &fd, O_WRONLY | O_APPEND | O_BINARY | O_CLOEXEC, 0); - if(ret) - return ret; - { - krb5_storage *sp; - - sp = krb5_storage_emem(); - krb5_storage_set_eof_code(sp, KRB5_CC_END); - storage_set_flags(context, sp, FCACHE(id)->version); - if (!krb5_config_get_bool_default(context, NULL, TRUE, - "libdefaults", - "fcc-mit-ticketflags", - NULL)) - krb5_storage_set_flags(sp, KRB5_STORAGE_CREDS_FLAGS_WRONG_BITORDER); - ret = krb5_store_creds(sp, creds); - if (ret == 0) - ret = write_storage(context, sp, fd); - krb5_storage_free(sp); - } - fcc_unlock(context, fd); - if (close(fd) < 0) { - if (ret == 0) { - char buf[128]; - rk_strerror_r(ret, buf, sizeof(buf)); - ret = errno; - krb5_set_error_message (context, ret, N_("close %s: %s", ""), - FILENAME(id), buf); - } - } - return ret; -} - -static krb5_error_code -init_fcc (krb5_context context, - krb5_ccache id, - krb5_storage **ret_sp, - int *ret_fd, - krb5_deltat *kdc_offset) -{ - int fd; - int8_t pvno, tag; - krb5_storage *sp; - krb5_error_code ret; - - if (kdc_offset) - *kdc_offset = 0; - - ret = fcc_open(context, id, &fd, O_RDONLY | O_BINARY | O_CLOEXEC, 0); - if(ret) - return ret; - - sp = krb5_storage_from_fd(fd); - if(sp == NULL) { - krb5_clear_error_message(context); - ret = ENOMEM; - goto out; - } - krb5_storage_set_eof_code(sp, KRB5_CC_END); - ret = krb5_ret_int8(sp, &pvno); - if(ret != 0) { - if(ret == KRB5_CC_END) { - ret = ENOENT; - krb5_set_error_message(context, ret, - N_("Empty credential cache file: %s", ""), - FILENAME(id)); - } else - krb5_set_error_message(context, ret, N_("Error reading pvno " - "in cache file: %s", ""), - FILENAME(id)); - goto out; - } - if(pvno != 5) { - ret = KRB5_CCACHE_BADVNO; - krb5_set_error_message(context, ret, N_("Bad version number in credential " - "cache file: %s", ""), - FILENAME(id)); - goto out; - } - ret = krb5_ret_int8(sp, &tag); /* should not be host byte order */ - if(ret != 0) { - ret = KRB5_CC_FORMAT; - krb5_set_error_message(context, ret, "Error reading tag in " - "cache file: %s", FILENAME(id)); - goto out; - } - FCACHE(id)->version = tag; - storage_set_flags(context, sp, FCACHE(id)->version); - switch (tag) { - case KRB5_FCC_FVNO_4: { - int16_t length; - - ret = krb5_ret_int16 (sp, &length); - if(ret) { - ret = KRB5_CC_FORMAT; - krb5_set_error_message(context, ret, - N_("Error reading tag length in " - "cache file: %s", ""), FILENAME(id)); - goto out; - } - while(length > 0) { - int16_t dtag, data_len; - int i; - int8_t dummy; - - ret = krb5_ret_int16 (sp, &dtag); - if(ret) { - ret = KRB5_CC_FORMAT; - krb5_set_error_message(context, ret, N_("Error reading dtag in " - "cache file: %s", ""), - FILENAME(id)); - goto out; - } - ret = krb5_ret_int16 (sp, &data_len); - if(ret) { - ret = KRB5_CC_FORMAT; - krb5_set_error_message(context, ret, - N_("Error reading dlength " - "in cache file: %s",""), - FILENAME(id)); - goto out; - } - switch (dtag) { - case FCC_TAG_DELTATIME : { - int32_t offset; - - ret = krb5_ret_int32 (sp, &offset); - ret |= krb5_ret_int32 (sp, &context->kdc_usec_offset); - if(ret) { - ret = KRB5_CC_FORMAT; - krb5_set_error_message(context, ret, - N_("Error reading kdc_sec in " - "cache file: %s", ""), - FILENAME(id)); - goto out; - } - context->kdc_sec_offset = offset; - if (kdc_offset) - *kdc_offset = offset; - break; - } - default : - for (i = 0; i < data_len; ++i) { - ret = krb5_ret_int8 (sp, &dummy); - if(ret) { - ret = KRB5_CC_FORMAT; - krb5_set_error_message(context, ret, - N_("Error reading unknown " - "tag in cache file: %s", ""), - FILENAME(id)); - goto out; - } - } - break; - } - length -= 4 + data_len; - } - break; - } - case KRB5_FCC_FVNO_3: - case KRB5_FCC_FVNO_2: - case KRB5_FCC_FVNO_1: - break; - default : - ret = KRB5_CCACHE_BADVNO; - krb5_set_error_message(context, ret, - N_("Unknown version number (%d) in " - "credential cache file: %s", ""), - (int)tag, FILENAME(id)); - goto out; - } - *ret_sp = sp; - *ret_fd = fd; - - return 0; - out: - if(sp != NULL) - krb5_storage_free(sp); - fcc_unlock(context, fd); - close(fd); - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fcc_get_principal(krb5_context context, - krb5_ccache id, - krb5_principal *principal) -{ - krb5_error_code ret; - int fd; - krb5_storage *sp; - - ret = init_fcc (context, id, &sp, &fd, NULL); - if (ret) - return ret; - ret = krb5_ret_principal(sp, principal); - if (ret) - krb5_clear_error_message(context); - krb5_storage_free(sp); - fcc_unlock(context, fd); - close(fd); - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fcc_end_get (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor); - -static krb5_error_code KRB5_CALLCONV -fcc_get_first (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor) -{ - krb5_error_code ret; - krb5_principal principal; - - if (FCACHE(id) == NULL) - return krb5_einval(context, 2); - - *cursor = malloc(sizeof(struct fcc_cursor)); - if (*cursor == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - memset(*cursor, 0, sizeof(struct fcc_cursor)); - - ret = init_fcc (context, id, &FCC_CURSOR(*cursor)->sp, - &FCC_CURSOR(*cursor)->fd, NULL); - if (ret) { - free(*cursor); - *cursor = NULL; - return ret; - } - ret = krb5_ret_principal (FCC_CURSOR(*cursor)->sp, &principal); - if(ret) { - krb5_clear_error_message(context); - fcc_end_get(context, id, cursor); - return ret; - } - krb5_free_principal (context, principal); - fcc_unlock(context, FCC_CURSOR(*cursor)->fd); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fcc_get_next (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor, - krb5_creds *creds) -{ - krb5_error_code ret; - - if (FCACHE(id) == NULL) - return krb5_einval(context, 2); - - if (FCC_CURSOR(*cursor) == NULL) - return krb5_einval(context, 3); - - if((ret = fcc_lock(context, id, FCC_CURSOR(*cursor)->fd, FALSE)) != 0) - return ret; - - ret = krb5_ret_creds(FCC_CURSOR(*cursor)->sp, creds); - if (ret) - krb5_clear_error_message(context); - - fcc_unlock(context, FCC_CURSOR(*cursor)->fd); - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fcc_end_get (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor) -{ - - if (FCACHE(id) == NULL) - return krb5_einval(context, 2); - - if (FCC_CURSOR(*cursor) == NULL) - return krb5_einval(context, 3); - - krb5_storage_free(FCC_CURSOR(*cursor)->sp); - close (FCC_CURSOR(*cursor)->fd); - free(*cursor); - *cursor = NULL; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fcc_remove_cred(krb5_context context, - krb5_ccache id, - krb5_flags which, - krb5_creds *cred) -{ - krb5_error_code ret; - krb5_ccache copy, newfile; - char *newname = NULL; - int fd; - - if (FCACHE(id) == NULL) - return krb5_einval(context, 2); - - ret = krb5_cc_new_unique(context, krb5_cc_type_memory, NULL, ©); - if (ret) - return ret; - - ret = krb5_cc_copy_cache(context, id, copy); - if (ret) { - krb5_cc_destroy(context, copy); - return ret; - } - - ret = krb5_cc_remove_cred(context, copy, which, cred); - if (ret) { - krb5_cc_destroy(context, copy); - return ret; - } - - ret = asprintf(&newname, "FILE:%s.XXXXXX", FILENAME(id)); - if (ret < 0 || newname == NULL) { - krb5_cc_destroy(context, copy); - return ENOMEM; - } - - fd = mkstemp(&newname[5]); - if (fd < 0) { - ret = errno; - krb5_cc_destroy(context, copy); - return ret; - } - close(fd); - - ret = krb5_cc_resolve(context, newname, &newfile); - if (ret) { - unlink(&newname[5]); - free(newname); - krb5_cc_destroy(context, copy); - return ret; - } - - ret = krb5_cc_copy_cache(context, copy, newfile); - krb5_cc_destroy(context, copy); - if (ret) { - free(newname); - krb5_cc_destroy(context, newfile); - return ret; - } - - ret = rk_rename(&newname[5], FILENAME(id)); - if (ret) - ret = errno; - free(newname); - krb5_cc_close(context, newfile); - - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fcc_set_flags(krb5_context context, - krb5_ccache id, - krb5_flags flags) -{ - if (FCACHE(id) == NULL) - return krb5_einval(context, 2); - - return 0; /* XXX */ -} - -static int KRB5_CALLCONV -fcc_get_version(krb5_context context, - krb5_ccache id) -{ - if (FCACHE(id) == NULL) - return -1; - - return FCACHE(id)->version; -} - -struct fcache_iter { - int first; -}; - -static krb5_error_code KRB5_CALLCONV -fcc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) -{ - struct fcache_iter *iter; - - iter = calloc(1, sizeof(*iter)); - if (iter == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - iter->first = 1; - *cursor = iter; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fcc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) -{ - struct fcache_iter *iter = cursor; - krb5_error_code ret; - const char *fn; - char *expandedfn = NULL; - - if (iter == NULL) - return krb5_einval(context, 2); - - if (!iter->first) { - krb5_clear_error_message(context); - return KRB5_CC_END; - } - iter->first = 0; - - fn = krb5_cc_default_name(context); - if (fn == NULL || strncasecmp(fn, "FILE:", 5) != 0) { - ret = _krb5_expand_default_cc_name(context, - KRB5_DEFAULT_CCNAME_FILE, - &expandedfn); - if (ret) - return ret; - fn = expandedfn; - } - /* check if file exists, don't return a non existant "next" */ - if (strncasecmp(fn, "FILE:", 5) == 0) { - struct stat sb; - ret = stat(fn + 5, &sb); - if (ret) { - ret = KRB5_CC_END; - goto out; - } - } - ret = krb5_cc_resolve(context, fn, id); - out: - if (expandedfn) - free(expandedfn); - - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fcc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) -{ - struct fcache_iter *iter = cursor; - - if (iter == NULL) - return krb5_einval(context, 2); - - free(iter); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fcc_move(krb5_context context, krb5_ccache from, krb5_ccache to) -{ - krb5_error_code ret = 0; - - ret = rk_rename(FILENAME(from), FILENAME(to)); - - if (ret && errno != EXDEV) { - char buf[128]; - ret = errno; - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message(context, ret, - N_("Rename of file from %s " - "to %s failed: %s", ""), - FILENAME(from), FILENAME(to), buf); - return ret; - } else if (ret && errno == EXDEV) { - /* make a copy and delete the orignal */ - krb5_ssize_t sz1, sz2; - int fd1, fd2; - char buf[BUFSIZ]; - - ret = fcc_open(context, from, &fd1, O_RDONLY | O_BINARY | O_CLOEXEC, 0); - if(ret) - return ret; - - unlink(FILENAME(to)); - - ret = fcc_open(context, to, &fd2, - O_WRONLY | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600); - if(ret) - goto out1; - - while((sz1 = read(fd1, buf, sizeof(buf))) > 0) { - sz2 = write(fd2, buf, sz1); - if (sz1 != sz2) { - ret = EIO; - krb5_set_error_message(context, ret, - N_("Failed to write data from one file " - "credential cache to the other", "")); - goto out2; - } - } - if (sz1 < 0) { - ret = EIO; - krb5_set_error_message(context, ret, - N_("Failed to read data from one file " - "credential cache to the other", "")); - goto out2; - } - out2: - fcc_unlock(context, fd2); - close(fd2); - - out1: - fcc_unlock(context, fd1); - close(fd1); - - _krb5_erase_file(context, FILENAME(from)); - - if (ret) { - _krb5_erase_file(context, FILENAME(to)); - return ret; - } - } - - /* make sure ->version is uptodate */ - { - krb5_storage *sp; - int fd; - if ((ret = init_fcc (context, to, &sp, &fd, NULL)) == 0) { - if (sp) - krb5_storage_free(sp); - fcc_unlock(context, fd); - close(fd); - } - } - - fcc_close(context, from); - - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fcc_get_default_name(krb5_context context, char **str) -{ - return _krb5_expand_default_cc_name(context, - KRB5_DEFAULT_CCNAME_FILE, - str); -} - -static krb5_error_code KRB5_CALLCONV -fcc_lastchange(krb5_context context, krb5_ccache id, krb5_timestamp *mtime) -{ - krb5_error_code ret; - struct stat sb; - int fd; - - ret = fcc_open(context, id, &fd, O_RDONLY | O_BINARY | O_CLOEXEC, 0); - if(ret) - return ret; - ret = fstat(fd, &sb); - close(fd); - if (ret) { - ret = errno; - krb5_set_error_message(context, ret, N_("Failed to stat cache file", "")); - return ret; - } - *mtime = sb.st_mtime; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fcc_set_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat kdc_offset) -{ - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fcc_get_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat *kdc_offset) -{ - krb5_error_code ret; - krb5_storage *sp = NULL; - int fd; - ret = init_fcc(context, id, &sp, &fd, kdc_offset); - if (sp) - krb5_storage_free(sp); - fcc_unlock(context, fd); - close(fd); - - return ret; -} - - -/** - * Variable containing the FILE based credential cache implemention. - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_VARIABLE const krb5_cc_ops krb5_fcc_ops = { - KRB5_CC_OPS_VERSION, - "FILE", - fcc_get_name, - fcc_resolve, - fcc_gen_new, - fcc_initialize, - fcc_destroy, - fcc_close, - fcc_store_cred, - NULL, /* fcc_retrieve */ - fcc_get_principal, - fcc_get_first, - fcc_get_next, - fcc_end_get, - fcc_remove_cred, - fcc_set_flags, - fcc_get_version, - fcc_get_cache_first, - fcc_get_cache_next, - fcc_end_cache_get, - fcc_move, - fcc_get_default_name, - NULL, - fcc_lastchange, - fcc_set_kdc_offset, - fcc_get_kdc_offset -}; diff --git a/kerberosV/src/lib/krb5/free.c b/kerberosV/src/lib/krb5/free.c deleted file mode 100644 index 5bb33b443cb..00000000000 --- a/kerberosV/src/lib/krb5/free.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 1997 - 1999, 2004 - 2005 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_kdc_rep(krb5_context context, krb5_kdc_rep *rep) -{ - free_KDC_REP(&rep->kdc_rep); - free_EncTGSRepPart(&rep->enc_part); - free_KRB_ERROR(&rep->error); - memset(rep, 0, sizeof(*rep)); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_xfree (void *ptr) -{ - free (ptr); - return 0; -} diff --git a/kerberosV/src/lib/krb5/free_host_realm.c b/kerberosV/src/lib/krb5/free_host_realm.c deleted file mode 100644 index 0932674e9be..00000000000 --- a/kerberosV/src/lib/krb5/free_host_realm.c +++ /dev/null @@ -1,59 +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 "krb5_locl.h" - -/** - * Free all memory allocated by `realmlist' - * - * @param context A Kerberos 5 context. - * @param realmlist realmlist to free, NULL is ok - * - * @return a Kerberos error code, always 0. - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_host_realm(krb5_context context, - krb5_realm *realmlist) -{ - krb5_realm *p; - - if(realmlist == NULL) - return 0; - for (p = realmlist; *p; ++p) - free (*p); - free (realmlist); - return 0; -} diff --git a/kerberosV/src/lib/krb5/generate_seq_number.c b/kerberosV/src/lib/krb5/generate_seq_number.c deleted file mode 100644 index 6001d692613..00000000000 --- a/kerberosV/src/lib/krb5/generate_seq_number.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_generate_seq_number(krb5_context context, - const krb5_keyblock *key, - uint32_t *seqno) -{ - if (RAND_bytes((void *)seqno, sizeof(*seqno)) <= 0) - krb5_abortx(context, "Failed to generate random block"); - /* MIT used signed numbers, lets not stomp into that space directly */ - *seqno &= 0x3fffffff; - if (*seqno == 0) - *seqno = 1; - return 0; -} diff --git a/kerberosV/src/lib/krb5/generate_subkey.c b/kerberosV/src/lib/krb5/generate_subkey.c deleted file mode 100644 index e09dc2a9168..00000000000 --- a/kerberosV/src/lib/krb5/generate_subkey.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -/** - * Generate subkey, from keyblock - * - * @param context kerberos context - * @param key session key - * @param etype encryption type of subkey, if ETYPE_NULL, use key's enctype - * @param subkey returned new, free with krb5_free_keyblock(). - * - * @return 0 on success or a Kerberos 5 error code - * -* @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_generate_subkey_extended(krb5_context context, - const krb5_keyblock *key, - krb5_enctype etype, - krb5_keyblock **subkey) -{ - krb5_error_code ret; - - ALLOC(*subkey, 1); - if (*subkey == NULL) { - krb5_set_error_message(context, ENOMEM,N_("malloc: out of memory", "")); - return ENOMEM; - } - - if (etype == ETYPE_NULL) - etype = key->keytype; /* use session key etype */ - - /* XXX should we use the session key as input to the RF? */ - ret = krb5_generate_random_keyblock(context, etype, *subkey); - if (ret != 0) { - free(*subkey); - *subkey = NULL; - } - - return ret; -} - diff --git a/kerberosV/src/lib/krb5/get_addrs.c b/kerberosV/src/lib/krb5/get_addrs.c deleted file mode 100644 index 0e2bfcf66f9..00000000000 --- a/kerberosV/src/lib/krb5/get_addrs.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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 "krb5_locl.h" - -#ifdef __osf__ -/* hate */ -struct rtentry; -struct mbuf; -#endif -#ifdef HAVE_NET_IF_H -#include -#endif -#include - -static krb5_error_code -gethostname_fallback (krb5_context context, krb5_addresses *res) -{ - krb5_error_code ret; - char hostname[MAXHOSTNAMELEN]; - struct hostent *hostent; - - if (gethostname (hostname, sizeof(hostname))) { - ret = errno; - krb5_set_error_message(context, ret, "gethostname: %s", strerror(ret)); - return ret; - } - hostent = roken_gethostbyname (hostname); - if (hostent == NULL) { - ret = errno; - krb5_set_error_message (context, ret, "gethostbyname %s: %s", - hostname, strerror(ret)); - return ret; - } - res->len = 1; - res->val = malloc (sizeof(*res->val)); - if (res->val == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - res->val[0].addr_type = hostent->h_addrtype; - res->val[0].address.data = NULL; - res->val[0].address.length = 0; - ret = krb5_data_copy (&res->val[0].address, - hostent->h_addr, - hostent->h_length); - if (ret) { - free (res->val); - return ret; - } - return 0; -} - -enum { - LOOP = 1, /* do include loopback addrs */ - LOOP_IF_NONE = 2, /* include loopback addrs if no others */ - EXTRA_ADDRESSES = 4, /* include extra addresses */ - SCAN_INTERFACES = 8 /* scan interfaces for addresses */ -}; - -/* - * Try to figure out the addresses of all configured interfaces with a - * lot of magic ioctls. - */ - -static krb5_error_code -find_all_addresses (krb5_context context, krb5_addresses *res, int flags) -{ - struct sockaddr sa_zero; - struct ifaddrs *ifa0, *ifa; - krb5_error_code ret = ENXIO; - unsigned int num, idx; - krb5_addresses ignore_addresses; - - if (getifaddrs(&ifa0) == -1) { - ret = errno; - krb5_set_error_message(context, ret, "getifaddrs: %s", strerror(ret)); - return (ret); - } - - memset(&sa_zero, 0, sizeof(sa_zero)); - - /* First, count all the ifaddrs. */ - for (ifa = ifa0, num = 0; ifa != NULL; ifa = ifa->ifa_next, num++) - /* nothing */; - - if (num == 0) { - freeifaddrs(ifa0); - krb5_set_error_message(context, ENXIO, N_("no addresses found", "")); - return (ENXIO); - } - - if (flags & EXTRA_ADDRESSES) { - /* we'll remove the addresses we don't care about */ - ret = krb5_get_ignore_addresses(context, &ignore_addresses); - if(ret) - return ret; - } - - /* Allocate storage for them. */ - res->val = calloc(num, sizeof(*res->val)); - if (res->val == NULL) { - krb5_free_addresses(context, &ignore_addresses); - freeifaddrs(ifa0); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - /* Now traverse the list. */ - for (ifa = ifa0, idx = 0; ifa != NULL; ifa = ifa->ifa_next) { - if ((ifa->ifa_flags & IFF_UP) == 0) - continue; - if (ifa->ifa_addr == NULL) - continue; - if (memcmp(ifa->ifa_addr, &sa_zero, sizeof(sa_zero)) == 0) - continue; - if (krb5_sockaddr_uninteresting(ifa->ifa_addr)) - continue; - if (krb5_sockaddr_is_loopback(ifa->ifa_addr) && (flags & LOOP) == 0) - /* We'll deal with the LOOP_IF_NONE case later. */ - continue; - - ret = krb5_sockaddr2address(context, ifa->ifa_addr, &res->val[idx]); - if (ret) { - /* - * The most likely error here is going to be "Program - * lacks support for address type". This is no big - * deal -- just continue, and we'll listen on the - * addresses who's type we *do* support. - */ - continue; - } - /* possibly skip this address? */ - if((flags & EXTRA_ADDRESSES) && - krb5_address_search(context, &res->val[idx], &ignore_addresses)) { - krb5_free_address(context, &res->val[idx]); - flags &= ~LOOP_IF_NONE; /* we actually found an address, - so don't add any loop-back - addresses */ - continue; - } - - idx++; - } - - /* - * If no addresses were found, and LOOP_IF_NONE is set, then find - * the loopback addresses and add them to our list. - */ - if ((flags & LOOP_IF_NONE) != 0 && idx == 0) { - for (ifa = ifa0; ifa != NULL; ifa = ifa->ifa_next) { - if ((ifa->ifa_flags & IFF_UP) == 0) - continue; - if (ifa->ifa_addr == NULL) - continue; - if (memcmp(ifa->ifa_addr, &sa_zero, sizeof(sa_zero)) == 0) - continue; - if (krb5_sockaddr_uninteresting(ifa->ifa_addr)) - continue; - if (!krb5_sockaddr_is_loopback(ifa->ifa_addr)) - continue; - if ((ifa->ifa_flags & IFF_LOOPBACK) == 0) - /* Presumably loopback addrs are only used on loopback ifs! */ - continue; - ret = krb5_sockaddr2address(context, - ifa->ifa_addr, &res->val[idx]); - if (ret) - continue; /* We don't consider this failure fatal */ - if((flags & EXTRA_ADDRESSES) && - krb5_address_search(context, &res->val[idx], - &ignore_addresses)) { - krb5_free_address(context, &res->val[idx]); - continue; - } - idx++; - } - } - - if (flags & EXTRA_ADDRESSES) - krb5_free_addresses(context, &ignore_addresses); - freeifaddrs(ifa0); - if (ret) { - free(res->val); - res->val = NULL; - } else - res->len = idx; /* Now a count. */ - return (ret); -} - -static krb5_error_code -get_addrs_int (krb5_context context, krb5_addresses *res, int flags) -{ - krb5_error_code ret = -1; - - res->len = 0; - res->val = NULL; - - if (flags & SCAN_INTERFACES) { - ret = find_all_addresses (context, res, flags); - if(ret || res->len == 0) - ret = gethostname_fallback (context, res); - } else { - ret = 0; - } - - if(ret == 0 && (flags & EXTRA_ADDRESSES)) { - krb5_addresses a; - /* append user specified addresses */ - ret = krb5_get_extra_addresses(context, &a); - if(ret) { - krb5_free_addresses(context, res); - return ret; - } - ret = krb5_append_addresses(context, res, &a); - if(ret) { - krb5_free_addresses(context, res); - return ret; - } - krb5_free_addresses(context, &a); - } - if(res->len == 0) { - free(res->val); - res->val = NULL; - } - return ret; -} - -/* - * Try to get all addresses, but return the one corresponding to - * `hostname' if we fail. - * - * Only include loopback address if there are no other. - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_all_client_addrs (krb5_context context, krb5_addresses *res) -{ - int flags = LOOP_IF_NONE | EXTRA_ADDRESSES; - - if (context->scan_interfaces) - flags |= SCAN_INTERFACES; - - return get_addrs_int (context, res, flags); -} - -/* - * Try to get all local addresses that a server should listen to. - * If that fails, we return the address corresponding to `hostname'. - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_all_server_addrs (krb5_context context, krb5_addresses *res) -{ - return get_addrs_int (context, res, LOOP | SCAN_INTERFACES); -} diff --git a/kerberosV/src/lib/krb5/get_cred.c b/kerberosV/src/lib/krb5/get_cred.c deleted file mode 100644 index 509568d9566..00000000000 --- a/kerberosV/src/lib/krb5/get_cred.c +++ /dev/null @@ -1,1527 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" -#include - -static krb5_error_code -get_cred_kdc_capath(krb5_context, krb5_kdc_flags, - krb5_ccache, krb5_creds *, krb5_principal, - Ticket *, krb5_creds **, krb5_creds ***); - -/* - * Take the `body' and encode it into `padata' using the credentials - * in `creds'. - */ - -static krb5_error_code -make_pa_tgs_req(krb5_context context, - krb5_auth_context ac, - KDC_REQ_BODY *body, - PA_DATA *padata, - krb5_creds *creds) -{ - u_char *buf; - size_t buf_size; - size_t len = 0; - krb5_data in_data; - krb5_error_code ret; - - ASN1_MALLOC_ENCODE(KDC_REQ_BODY, buf, buf_size, body, &len, ret); - if (ret) - goto out; - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - in_data.length = len; - in_data.data = buf; - ret = _krb5_mk_req_internal(context, &ac, 0, &in_data, creds, - &padata->padata_value, - KRB5_KU_TGS_REQ_AUTH_CKSUM, - KRB5_KU_TGS_REQ_AUTH); - out: - free (buf); - if(ret) - return ret; - padata->padata_type = KRB5_PADATA_TGS_REQ; - return 0; -} - -/* - * Set the `enc-authorization-data' in `req_body' based on `authdata' - */ - -static krb5_error_code -set_auth_data (krb5_context context, - KDC_REQ_BODY *req_body, - krb5_authdata *authdata, - krb5_keyblock *subkey) -{ - if(authdata->len) { - size_t len = 0, buf_size; - unsigned char *buf; - krb5_crypto crypto; - krb5_error_code ret; - - ASN1_MALLOC_ENCODE(AuthorizationData, buf, buf_size, authdata, - &len, ret); - if (ret) - return ret; - if (buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - ALLOC(req_body->enc_authorization_data, 1); - if (req_body->enc_authorization_data == NULL) { - free (buf); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - ret = krb5_crypto_init(context, subkey, 0, &crypto); - if (ret) { - free (buf); - free (req_body->enc_authorization_data); - req_body->enc_authorization_data = NULL; - return ret; - } - krb5_encrypt_EncryptedData(context, - crypto, - KRB5_KU_TGS_REQ_AUTH_DAT_SUBKEY, - buf, - len, - 0, - req_body->enc_authorization_data); - free (buf); - krb5_crypto_destroy(context, crypto); - } else { - req_body->enc_authorization_data = NULL; - } - return 0; -} - -/* - * Create a tgs-req in `t' with `addresses', `flags', `second_ticket' - * (if not-NULL), `in_creds', `krbtgt', and returning the generated - * subkey in `subkey'. - */ - -static krb5_error_code -init_tgs_req (krb5_context context, - krb5_ccache ccache, - krb5_addresses *addresses, - krb5_kdc_flags flags, - Ticket *second_ticket, - krb5_creds *in_creds, - krb5_creds *krbtgt, - unsigned nonce, - const METHOD_DATA *padata, - krb5_keyblock **subkey, - TGS_REQ *t) -{ - krb5_auth_context ac = NULL; - krb5_error_code ret = 0; - - memset(t, 0, sizeof(*t)); - t->pvno = 5; - t->msg_type = krb_tgs_req; - if (in_creds->session.keytype) { - ALLOC_SEQ(&t->req_body.etype, 1); - if(t->req_body.etype.val == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto fail; - } - t->req_body.etype.val[0] = in_creds->session.keytype; - } else { - ret = _krb5_init_etype(context, - KRB5_PDU_TGS_REQUEST, - &t->req_body.etype.len, - &t->req_body.etype.val, - NULL); - } - if (ret) - goto fail; - t->req_body.addresses = addresses; - t->req_body.kdc_options = flags.b; - t->req_body.kdc_options.forwardable = krbtgt->flags.b.forwardable; - t->req_body.kdc_options.renewable = krbtgt->flags.b.renewable; - t->req_body.kdc_options.proxiable = krbtgt->flags.b.proxiable; - ret = copy_Realm(&in_creds->server->realm, &t->req_body.realm); - if (ret) - goto fail; - ALLOC(t->req_body.sname, 1); - if (t->req_body.sname == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - - /* some versions of some code might require that the client be - present in TGS-REQs, but this is clearly against the spec */ - - ret = copy_PrincipalName(&in_creds->server->name, t->req_body.sname); - if (ret) - goto fail; - - if (krbtgt->times.starttime) { - ALLOC(t->req_body.from, 1); - if(t->req_body.from == NULL){ - ret = krb5_enomem(context); - goto fail; - } - *t->req_body.from = in_creds->times.starttime; - } - - /* req_body.till should be NULL if there is no endtime specified, - but old MIT code (like DCE secd) doesn't like that */ - ALLOC(t->req_body.till, 1); - if(t->req_body.till == NULL){ - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - *t->req_body.till = in_creds->times.endtime; - - if (t->req_body.kdc_options.renewable && krbtgt->times.renew_till) { - ALLOC(t->req_body.rtime, 1); - if(t->req_body.rtime == NULL){ - ret = krb5_enomem(context); - goto fail; - } - *t->req_body.rtime = in_creds->times.renew_till; - } - - t->req_body.nonce = nonce; - if(second_ticket){ - ALLOC(t->req_body.additional_tickets, 1); - if (t->req_body.additional_tickets == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto fail; - } - ALLOC_SEQ(t->req_body.additional_tickets, 1); - if (t->req_body.additional_tickets->val == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto fail; - } - ret = copy_Ticket(second_ticket, t->req_body.additional_tickets->val); - if (ret) - goto fail; - } - ALLOC(t->padata, 1); - if (t->padata == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - ALLOC_SEQ(t->padata, 1 + padata->len); - if (t->padata->val == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - { - size_t i; - for (i = 0; i < padata->len; i++) { - ret = copy_PA_DATA(&padata->val[i], &t->padata->val[i + 1]); - if (ret) { - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto fail; - } - } - } - - ret = krb5_auth_con_init(context, &ac); - if(ret) - goto fail; - - ret = krb5_auth_con_generatelocalsubkey(context, ac, &krbtgt->session); - if (ret) - goto fail; - - ret = set_auth_data (context, &t->req_body, &in_creds->authdata, - ac->local_subkey); - if (ret) - goto fail; - - ret = make_pa_tgs_req(context, - ac, - &t->req_body, - &t->padata->val[0], - krbtgt); - if(ret) - goto fail; - - ret = krb5_auth_con_getlocalsubkey(context, ac, subkey); - if (ret) - goto fail; - -fail: - if (ac) - krb5_auth_con_free(context, ac); - if (ret) { - t->req_body.addresses = NULL; - free_TGS_REQ (t); - } - return ret; -} - -krb5_error_code -_krb5_get_krbtgt(krb5_context context, - krb5_ccache id, - krb5_realm realm, - krb5_creds **cred) -{ - krb5_error_code ret; - krb5_creds tmp_cred; - - memset(&tmp_cred, 0, sizeof(tmp_cred)); - - ret = krb5_cc_get_principal(context, id, &tmp_cred.client); - if (ret) - return ret; - - ret = krb5_make_principal(context, - &tmp_cred.server, - realm, - KRB5_TGS_NAME, - realm, - NULL); - if(ret) { - krb5_free_principal(context, tmp_cred.client); - return ret; - } - ret = krb5_get_credentials(context, - KRB5_GC_CACHED, - id, - &tmp_cred, - cred); - krb5_free_principal(context, tmp_cred.client); - krb5_free_principal(context, tmp_cred.server); - if(ret) - return ret; - return 0; -} - -/* DCE compatible decrypt proc */ -static krb5_error_code KRB5_CALLCONV -decrypt_tkt_with_subkey (krb5_context context, - krb5_keyblock *key, - krb5_key_usage usage, - krb5_const_pointer skey, - krb5_kdc_rep *dec_rep) -{ - const krb5_keyblock *subkey = skey; - krb5_error_code ret = 0; - krb5_data data; - size_t size; - krb5_crypto crypto; - - assert(usage == 0); - - krb5_data_zero(&data); - - /* - * start out with trying with subkey if we have one - */ - if (subkey) { - ret = krb5_crypto_init(context, subkey, 0, &crypto); - if (ret) - return ret; - ret = krb5_decrypt_EncryptedData (context, - crypto, - KRB5_KU_TGS_REP_ENC_PART_SUB_KEY, - &dec_rep->kdc_rep.enc_part, - &data); - /* - * If the is Windows 2000 DC, we need to retry with key usage - * 8 when doing ARCFOUR. - */ - if (ret && subkey->keytype == ETYPE_ARCFOUR_HMAC_MD5) { - ret = krb5_decrypt_EncryptedData(context, - crypto, - 8, - &dec_rep->kdc_rep.enc_part, - &data); - } - krb5_crypto_destroy(context, crypto); - } - if (subkey == NULL || ret) { - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - return ret; - ret = krb5_decrypt_EncryptedData (context, - crypto, - KRB5_KU_TGS_REP_ENC_PART_SESSION, - &dec_rep->kdc_rep.enc_part, - &data); - krb5_crypto_destroy(context, crypto); - } - if (ret) - return ret; - - ret = decode_EncASRepPart(data.data, - data.length, - &dec_rep->enc_part, - &size); - if (ret) - ret = decode_EncTGSRepPart(data.data, - data.length, - &dec_rep->enc_part, - &size); - if (ret) - krb5_set_error_message(context, ret, - N_("Failed to decode encpart in ticket", "")); - krb5_data_free (&data); - return ret; -} - -static krb5_error_code -get_cred_kdc(krb5_context context, - krb5_ccache id, - krb5_kdc_flags flags, - krb5_addresses *addresses, - krb5_creds *in_creds, - krb5_creds *krbtgt, - krb5_principal impersonate_principal, - Ticket *second_ticket, - krb5_creds *out_creds) -{ - TGS_REQ req; - krb5_data enc; - krb5_data resp; - krb5_kdc_rep rep; - KRB_ERROR error; - krb5_error_code ret; - unsigned nonce; - krb5_keyblock *subkey = NULL; - size_t len = 0; - Ticket second_ticket_data; - METHOD_DATA padata; - - krb5_data_zero(&resp); - krb5_data_zero(&enc); - padata.val = NULL; - padata.len = 0; - - krb5_generate_random_block(&nonce, sizeof(nonce)); - nonce &= 0xffffffff; - - if(flags.b.enc_tkt_in_skey && second_ticket == NULL){ - ret = decode_Ticket(in_creds->second_ticket.data, - in_creds->second_ticket.length, - &second_ticket_data, &len); - if(ret) - return ret; - second_ticket = &second_ticket_data; - } - - - if (impersonate_principal) { - krb5_crypto crypto; - PA_S4U2Self self; - krb5_data data; - void *buf; - size_t size = 0; - - self.name = impersonate_principal->name; - self.realm = impersonate_principal->realm; - self.auth = estrdup("Kerberos"); - - ret = _krb5_s4u2self_to_checksumdata(context, &self, &data); - if (ret) { - free(self.auth); - goto out; - } - - ret = krb5_crypto_init(context, &krbtgt->session, 0, &crypto); - if (ret) { - free(self.auth); - krb5_data_free(&data); - goto out; - } - - ret = krb5_create_checksum(context, - crypto, - KRB5_KU_OTHER_CKSUM, - 0, - data.data, - data.length, - &self.cksum); - krb5_crypto_destroy(context, crypto); - krb5_data_free(&data); - if (ret) { - free(self.auth); - goto out; - } - - ASN1_MALLOC_ENCODE(PA_S4U2Self, buf, len, &self, &size, ret); - free(self.auth); - free_Checksum(&self.cksum); - if (ret) - goto out; - if (len != size) - krb5_abortx(context, "internal asn1 error"); - - ret = krb5_padata_add(context, &padata, KRB5_PADATA_FOR_USER, buf, len); - if (ret) - goto out; - } - - ret = init_tgs_req (context, - id, - addresses, - flags, - second_ticket, - in_creds, - krbtgt, - nonce, - &padata, - &subkey, - &req); - if (ret) - goto out; - - ASN1_MALLOC_ENCODE(TGS_REQ, enc.data, enc.length, &req, &len, ret); - if (ret) - goto out; - if(enc.length != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - /* don't free addresses */ - req.req_body.addresses = NULL; - free_TGS_REQ(&req); - - /* - * Send and receive - */ - { - krb5_sendto_ctx stctx; - ret = krb5_sendto_ctx_alloc(context, &stctx); - if (ret) - return ret; - krb5_sendto_ctx_set_func(stctx, _krb5_kdc_retry, NULL); - - ret = krb5_sendto_context (context, stctx, &enc, - krbtgt->server->name.name_string.val[1], - &resp); - krb5_sendto_ctx_free(context, stctx); - } - if(ret) - goto out; - - memset(&rep, 0, sizeof(rep)); - if(decode_TGS_REP(resp.data, resp.length, &rep.kdc_rep, &len) == 0) { - unsigned eflags = 0; - - ret = krb5_copy_principal(context, - in_creds->client, - &out_creds->client); - if(ret) - goto out2; - ret = krb5_copy_principal(context, - in_creds->server, - &out_creds->server); - if(ret) - goto out2; - /* this should go someplace else */ - out_creds->times.endtime = in_creds->times.endtime; - - /* XXX should do better testing */ - if (flags.b.constrained_delegation || impersonate_principal) - eflags |= EXTRACT_TICKET_ALLOW_CNAME_MISMATCH; - - ret = _krb5_extract_ticket(context, - &rep, - out_creds, - &krbtgt->session, - NULL, - 0, - &krbtgt->addresses, - nonce, - eflags, - decrypt_tkt_with_subkey, - subkey); - out2: - krb5_free_kdc_rep(context, &rep); - } else if(krb5_rd_error(context, &resp, &error) == 0) { - ret = krb5_error_from_rd_error(context, &error, in_creds); - krb5_free_error_contents(context, &error); - } else if(resp.length > 0 && ((char*)resp.data)[0] == 4) { - ret = KRB5KRB_AP_ERR_V4_REPLY; - krb5_clear_error_message(context); - } else { - ret = KRB5KRB_AP_ERR_MSG_TYPE; - krb5_clear_error_message(context); - } - -out: - if (second_ticket == &second_ticket_data) - free_Ticket(&second_ticket_data); - free_METHOD_DATA(&padata); - krb5_data_free(&resp); - krb5_data_free(&enc); - if(subkey) - krb5_free_keyblock(context, subkey); - return ret; - -} - -/* - * same as above, just get local addresses first if the krbtgt have - * them and the realm is not addressless - */ - -static krb5_error_code -get_cred_kdc_address(krb5_context context, - krb5_ccache id, - krb5_kdc_flags flags, - krb5_addresses *addrs, - krb5_creds *in_creds, - krb5_creds *krbtgt, - krb5_principal impersonate_principal, - Ticket *second_ticket, - krb5_creds *out_creds) -{ - krb5_error_code ret; - krb5_addresses addresses = { 0, NULL }; - - /* - * Inherit the address-ness of the krbtgt if the address is not - * specified. - */ - - if (addrs == NULL && krbtgt->addresses.len != 0) { - krb5_boolean noaddr; - - krb5_appdefault_boolean(context, NULL, krbtgt->server->realm, - "no-addresses", FALSE, &noaddr); - - if (!noaddr) { - krb5_get_all_client_addrs(context, &addresses); - /* XXX this sucks. */ - addrs = &addresses; - if(addresses.len == 0) - addrs = NULL; - } - } - ret = get_cred_kdc(context, id, flags, addrs, in_creds, - krbtgt, impersonate_principal, - second_ticket, out_creds); - krb5_free_addresses(context, &addresses); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_kdc_cred(krb5_context context, - krb5_ccache id, - krb5_kdc_flags flags, - krb5_addresses *addresses, - Ticket *second_ticket, - krb5_creds *in_creds, - krb5_creds **out_creds - ) -{ - krb5_error_code ret; - krb5_creds *krbtgt; - - *out_creds = calloc(1, sizeof(**out_creds)); - if(*out_creds == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - ret = _krb5_get_krbtgt (context, - id, - in_creds->server->realm, - &krbtgt); - if(ret) { - free(*out_creds); - *out_creds = NULL; - return ret; - } - ret = get_cred_kdc(context, id, flags, addresses, - in_creds, krbtgt, NULL, NULL, *out_creds); - krb5_free_creds (context, krbtgt); - if(ret) { - free(*out_creds); - *out_creds = NULL; - } - return ret; -} - -static int -not_found(krb5_context context, krb5_const_principal p, krb5_error_code code) -{ - krb5_error_code ret; - char *str; - - ret = krb5_unparse_name(context, p, &str); - if(ret) { - krb5_clear_error_message(context); - return code; - } - krb5_set_error_message(context, code, - N_("Matching credential (%s) not found", ""), str); - free(str); - return code; -} - -static krb5_error_code -find_cred(krb5_context context, - krb5_ccache id, - krb5_principal server, - krb5_creds **tgts, - krb5_creds *out_creds) -{ - krb5_error_code ret; - krb5_creds mcreds; - - krb5_cc_clear_mcred(&mcreds); - mcreds.server = server; - ret = krb5_cc_retrieve_cred(context, id, KRB5_TC_DONT_MATCH_REALM, - &mcreds, out_creds); - if(ret == 0) - return 0; - while(tgts && *tgts){ - if(krb5_compare_creds(context, KRB5_TC_DONT_MATCH_REALM, - &mcreds, *tgts)){ - ret = krb5_copy_creds_contents(context, *tgts, out_creds); - return ret; - } - tgts++; - } - return not_found(context, server, KRB5_CC_NOTFOUND); -} - -static krb5_error_code -add_cred(krb5_context context, krb5_creds const *tkt, krb5_creds ***tgts) -{ - int i; - krb5_error_code ret; - krb5_creds **tmp = *tgts; - - for(i = 0; tmp && tmp[i]; i++); /* XXX */ - tmp = realloc(tmp, (i+2)*sizeof(*tmp)); - if(tmp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - *tgts = tmp; - ret = krb5_copy_creds(context, tkt, &tmp[i]); - tmp[i+1] = NULL; - return ret; -} - -static krb5_error_code -get_cred_kdc_capath_worker(krb5_context context, - krb5_kdc_flags flags, - krb5_ccache ccache, - krb5_creds *in_creds, - krb5_const_realm try_realm, - krb5_principal impersonate_principal, - Ticket *second_ticket, - krb5_creds **out_creds, - krb5_creds ***ret_tgts) -{ - krb5_error_code ret; - krb5_creds *tgt, tmp_creds; - krb5_const_realm client_realm, server_realm; - int ok_as_delegate = 1; - - *out_creds = NULL; - - client_realm = krb5_principal_get_realm(context, in_creds->client); - server_realm = krb5_principal_get_realm(context, in_creds->server); - memset(&tmp_creds, 0, sizeof(tmp_creds)); - ret = krb5_copy_principal(context, in_creds->client, &tmp_creds.client); - if(ret) - return ret; - - ret = krb5_make_principal(context, - &tmp_creds.server, - try_realm, - KRB5_TGS_NAME, - server_realm, - NULL); - if(ret){ - krb5_free_principal(context, tmp_creds.client); - return ret; - } - { - krb5_creds tgts; - - ret = find_cred(context, ccache, tmp_creds.server, - *ret_tgts, &tgts); - if(ret == 0){ - /* only allow implicit ok_as_delegate if the realm is the clients realm */ - if (strcmp(try_realm, client_realm) != 0 || strcmp(try_realm, server_realm) != 0) - ok_as_delegate = tgts.flags.b.ok_as_delegate; - - *out_creds = calloc(1, sizeof(**out_creds)); - if(*out_creds == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - } else { - ret = get_cred_kdc_address(context, ccache, flags, NULL, - in_creds, &tgts, - impersonate_principal, - second_ticket, - *out_creds); - if (ret) { - free (*out_creds); - *out_creds = NULL; - } else if (ok_as_delegate == 0) - (*out_creds)->flags.b.ok_as_delegate = 0; - } - krb5_free_cred_contents(context, &tgts); - krb5_free_principal(context, tmp_creds.server); - krb5_free_principal(context, tmp_creds.client); - return ret; - } - } - if(krb5_realm_compare(context, in_creds->client, in_creds->server)) - return not_found(context, in_creds->server, KRB5_CC_NOTFOUND); - - /* XXX this can loop forever */ - while(1){ - heim_general_string tgt_inst; - - ret = get_cred_kdc_capath(context, flags, ccache, &tmp_creds, - NULL, NULL, &tgt, ret_tgts); - if(ret) { - krb5_free_principal(context, tmp_creds.server); - krb5_free_principal(context, tmp_creds.client); - return ret; - } - /* - * if either of the chain or the ok_as_delegate was stripped - * by the kdc, make sure we strip it too. - */ - if (ok_as_delegate == 0 || tgt->flags.b.ok_as_delegate == 0) { - ok_as_delegate = 0; - tgt->flags.b.ok_as_delegate = 0; - } - - ret = add_cred(context, tgt, ret_tgts); - if(ret) { - krb5_free_principal(context, tmp_creds.server); - krb5_free_principal(context, tmp_creds.client); - return ret; - } - tgt_inst = tgt->server->name.name_string.val[1]; - if(strcmp(tgt_inst, server_realm) == 0) - break; - krb5_free_principal(context, tmp_creds.server); - ret = krb5_make_principal(context, &tmp_creds.server, - tgt_inst, KRB5_TGS_NAME, server_realm, NULL); - if(ret) { - krb5_free_principal(context, tmp_creds.server); - krb5_free_principal(context, tmp_creds.client); - return ret; - } - ret = krb5_free_creds(context, tgt); - if(ret) { - krb5_free_principal(context, tmp_creds.server); - krb5_free_principal(context, tmp_creds.client); - return ret; - } - } - - krb5_free_principal(context, tmp_creds.server); - krb5_free_principal(context, tmp_creds.client); - *out_creds = calloc(1, sizeof(**out_creds)); - if(*out_creds == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - } else { - ret = get_cred_kdc_address (context, ccache, flags, NULL, - in_creds, tgt, impersonate_principal, - second_ticket, *out_creds); - if (ret) { - free (*out_creds); - *out_creds = NULL; - } - } - krb5_free_creds(context, tgt); - return ret; -} - -/* -get_cred(server) - creds = cc_get_cred(server) - if(creds) return creds - tgt = cc_get_cred(krbtgt/server_realm@any_realm) - if(tgt) - return get_cred_tgt(server, tgt) - if(client_realm == server_realm) - return NULL - tgt = get_cred(krbtgt/server_realm@client_realm) - while(tgt_inst != server_realm) - tgt = get_cred(krbtgt/server_realm@tgt_inst) - return get_cred_tgt(server, tgt) - */ - -static krb5_error_code -get_cred_kdc_capath(krb5_context context, - krb5_kdc_flags flags, - krb5_ccache ccache, - krb5_creds *in_creds, - krb5_principal impersonate_principal, - Ticket *second_ticket, - krb5_creds **out_creds, - krb5_creds ***ret_tgts) -{ - krb5_error_code ret; - krb5_const_realm client_realm, server_realm, try_realm; - - client_realm = krb5_principal_get_realm(context, in_creds->client); - server_realm = krb5_principal_get_realm(context, in_creds->server); - - try_realm = client_realm; - ret = get_cred_kdc_capath_worker(context, flags, ccache, in_creds, try_realm, - impersonate_principal, second_ticket, out_creds, - ret_tgts); - - if (ret == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN) { - try_realm = krb5_config_get_string(context, NULL, "capaths", - client_realm, server_realm, NULL); - - if (try_realm != NULL && strcmp(try_realm, client_realm)) { - ret = get_cred_kdc_capath_worker(context, flags, ccache, in_creds, - try_realm, impersonate_principal, - second_ticket, out_creds, ret_tgts); - } - } - - return ret; -} - -static krb5_error_code -get_cred_kdc_referral(krb5_context context, - krb5_kdc_flags flags, - krb5_ccache ccache, - krb5_creds *in_creds, - krb5_principal impersonate_principal, - Ticket *second_ticket, - krb5_creds **out_creds, - krb5_creds ***ret_tgts) -{ - krb5_const_realm client_realm; - krb5_error_code ret; - krb5_creds tgt, referral, ticket; - int loop = 0; - int ok_as_delegate = 1; - - if (in_creds->server->name.name_string.len < 2 && !flags.b.canonicalize) { - krb5_set_error_message(context, KRB5KDC_ERR_PATH_NOT_ACCEPTED, - N_("Name too short to do referals, skipping", "")); - return KRB5KDC_ERR_PATH_NOT_ACCEPTED; - } - - memset(&tgt, 0, sizeof(tgt)); - memset(&ticket, 0, sizeof(ticket)); - - flags.b.canonicalize = 1; - - *out_creds = NULL; - - client_realm = krb5_principal_get_realm(context, in_creds->client); - - /* find tgt for the clients base realm */ - { - krb5_principal tgtname; - - ret = krb5_make_principal(context, &tgtname, - client_realm, - KRB5_TGS_NAME, - client_realm, - NULL); - if(ret) - return ret; - - ret = find_cred(context, ccache, tgtname, *ret_tgts, &tgt); - krb5_free_principal(context, tgtname); - if (ret) - return ret; - } - - referral = *in_creds; - ret = krb5_copy_principal(context, in_creds->server, &referral.server); - if (ret) { - krb5_free_cred_contents(context, &tgt); - return ret; - } - ret = krb5_principal_set_realm(context, referral.server, client_realm); - if (ret) { - krb5_free_cred_contents(context, &tgt); - krb5_free_principal(context, referral.server); - return ret; - } - - while (loop++ < 17) { - krb5_creds **tickets; - krb5_creds mcreds; - char *referral_realm; - - /* Use cache if we are not doing impersonation or contrainte deleg */ - if (impersonate_principal == NULL || flags.b.constrained_delegation) { - krb5_cc_clear_mcred(&mcreds); - mcreds.server = referral.server; - ret = krb5_cc_retrieve_cred(context, ccache, 0, &mcreds, &ticket); - } else - ret = EINVAL; - - if (ret) { - ret = get_cred_kdc_address(context, ccache, flags, NULL, - &referral, &tgt, impersonate_principal, - second_ticket, &ticket); - if (ret) - goto out; - } - - /* Did we get the right ticket ? */ - if (krb5_principal_compare_any_realm(context, - referral.server, - ticket.server)) - break; - - if (!krb5_principal_is_krbtgt(context, ticket.server)) { - krb5_set_error_message(context, KRB5KRB_AP_ERR_NOT_US, - N_("Got back an non krbtgt " - "ticket referrals", "")); - ret = KRB5KRB_AP_ERR_NOT_US; - goto out; - } - - referral_realm = ticket.server->name.name_string.val[1]; - - /* check that there are no referrals loops */ - tickets = *ret_tgts; - - krb5_cc_clear_mcred(&mcreds); - mcreds.server = ticket.server; - - while(tickets && *tickets){ - if(krb5_compare_creds(context, - KRB5_TC_DONT_MATCH_REALM, - &mcreds, - *tickets)) - { - krb5_set_error_message(context, KRB5_GET_IN_TKT_LOOP, - N_("Referral from %s " - "loops back to realm %s", ""), - tgt.server->realm, - referral_realm); - ret = KRB5_GET_IN_TKT_LOOP; - goto out; - } - tickets++; - } - - /* - * if either of the chain or the ok_as_delegate was stripped - * by the kdc, make sure we strip it too. - */ - - if (ok_as_delegate == 0 || ticket.flags.b.ok_as_delegate == 0) { - ok_as_delegate = 0; - ticket.flags.b.ok_as_delegate = 0; - } - - ret = add_cred(context, &ticket, ret_tgts); - if (ret) - goto out; - - /* try realm in the referral */ - ret = krb5_principal_set_realm(context, - referral.server, - referral_realm); - krb5_free_cred_contents(context, &tgt); - tgt = ticket; - memset(&ticket, 0, sizeof(ticket)); - if (ret) - goto out; - } - - ret = krb5_copy_creds(context, &ticket, out_creds); - -out: - krb5_free_principal(context, referral.server); - krb5_free_cred_contents(context, &tgt); - krb5_free_cred_contents(context, &ticket); - return ret; -} - - -/* - * Glue function between referrals version and old client chasing - * codebase. - */ - -krb5_error_code -_krb5_get_cred_kdc_any(krb5_context context, - krb5_kdc_flags flags, - krb5_ccache ccache, - krb5_creds *in_creds, - krb5_principal impersonate_principal, - Ticket *second_ticket, - krb5_creds **out_creds, - krb5_creds ***ret_tgts) -{ - krb5_error_code ret; - krb5_deltat offset; - - ret = krb5_cc_get_kdc_offset(context, ccache, &offset); - if (ret) { - context->kdc_sec_offset = offset; - context->kdc_usec_offset = 0; - } - - ret = get_cred_kdc_referral(context, - flags, - ccache, - in_creds, - impersonate_principal, - second_ticket, - out_creds, - ret_tgts); - if (ret == 0 || flags.b.canonicalize) - return ret; - return get_cred_kdc_capath(context, - flags, - ccache, - in_creds, - impersonate_principal, - second_ticket, - out_creds, - ret_tgts); -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_credentials_with_flags(krb5_context context, - krb5_flags options, - krb5_kdc_flags flags, - krb5_ccache ccache, - krb5_creds *in_creds, - krb5_creds **out_creds) -{ - krb5_error_code ret; - krb5_creds **tgts; - krb5_creds *res_creds; - int i; - - if (in_creds->session.keytype) { - ret = krb5_enctype_valid(context, in_creds->session.keytype); - if (ret) - return ret; - } - - *out_creds = NULL; - res_creds = calloc(1, sizeof(*res_creds)); - if (res_creds == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - if (in_creds->session.keytype) - options |= KRB5_TC_MATCH_KEYTYPE; - - /* - * If we got a credential, check if credential is expired before - * returning it. - */ - ret = krb5_cc_retrieve_cred(context, - ccache, - in_creds->session.keytype ? - KRB5_TC_MATCH_KEYTYPE : 0, - in_creds, res_creds); - /* - * If we got a credential, check if credential is expired before - * returning it, but only if KRB5_GC_EXPIRED_OK is not set. - */ - if (ret == 0) { - krb5_timestamp timeret; - - /* If expired ok, don't bother checking */ - if(options & KRB5_GC_EXPIRED_OK) { - *out_creds = res_creds; - return 0; - } - - krb5_timeofday(context, &timeret); - if(res_creds->times.endtime > timeret) { - *out_creds = res_creds; - return 0; - } - if(options & KRB5_GC_CACHED) - krb5_cc_remove_cred(context, ccache, 0, res_creds); - - } else if(ret != KRB5_CC_END) { - free(res_creds); - return ret; - } - free(res_creds); - if(options & KRB5_GC_CACHED) - return not_found(context, in_creds->server, KRB5_CC_NOTFOUND); - - if(options & KRB5_GC_USER_USER) - flags.b.enc_tkt_in_skey = 1; - if (flags.b.enc_tkt_in_skey) - options |= KRB5_GC_NO_STORE; - - tgts = NULL; - ret = _krb5_get_cred_kdc_any(context, flags, ccache, - in_creds, NULL, NULL, out_creds, &tgts); - for(i = 0; tgts && tgts[i]; i++) { - krb5_cc_store_cred(context, ccache, tgts[i]); - krb5_free_creds(context, tgts[i]); - } - free(tgts); - if(ret == 0 && (options & KRB5_GC_NO_STORE) == 0) - krb5_cc_store_cred(context, ccache, *out_creds); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_credentials(krb5_context context, - krb5_flags options, - krb5_ccache ccache, - krb5_creds *in_creds, - krb5_creds **out_creds) -{ - krb5_kdc_flags flags; - flags.i = 0; - return krb5_get_credentials_with_flags(context, options, flags, - ccache, in_creds, out_creds); -} - -struct krb5_get_creds_opt_data { - krb5_principal self; - krb5_flags options; - krb5_enctype enctype; - Ticket *ticket; -}; - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_creds_opt_alloc(krb5_context context, krb5_get_creds_opt *opt) -{ - *opt = calloc(1, sizeof(**opt)); - if (*opt == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_creds_opt_free(krb5_context context, krb5_get_creds_opt opt) -{ - if (opt->self) - krb5_free_principal(context, opt->self); - if (opt->ticket) { - free_Ticket(opt->ticket); - free(opt->ticket); - } - memset(opt, 0, sizeof(*opt)); - free(opt); -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_creds_opt_set_options(krb5_context context, - krb5_get_creds_opt opt, - krb5_flags options) -{ - opt->options = options; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_creds_opt_add_options(krb5_context context, - krb5_get_creds_opt opt, - krb5_flags options) -{ - opt->options |= options; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_creds_opt_set_enctype(krb5_context context, - krb5_get_creds_opt opt, - krb5_enctype enctype) -{ - opt->enctype = enctype; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_creds_opt_set_impersonate(krb5_context context, - krb5_get_creds_opt opt, - krb5_const_principal self) -{ - if (opt->self) - krb5_free_principal(context, opt->self); - return krb5_copy_principal(context, self, &opt->self); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_creds_opt_set_ticket(krb5_context context, - krb5_get_creds_opt opt, - const Ticket *ticket) -{ - if (opt->ticket) { - free_Ticket(opt->ticket); - free(opt->ticket); - opt->ticket = NULL; - } - if (ticket) { - krb5_error_code ret; - - opt->ticket = malloc(sizeof(*ticket)); - if (opt->ticket == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - ret = copy_Ticket(ticket, opt->ticket); - if (ret) { - free(opt->ticket); - opt->ticket = NULL; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - return ret; - } - } - return 0; -} - - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_creds(krb5_context context, - krb5_get_creds_opt opt, - krb5_ccache ccache, - krb5_const_principal inprinc, - krb5_creds **out_creds) -{ - krb5_kdc_flags flags; - krb5_flags options; - krb5_creds in_creds; - krb5_error_code ret; - krb5_creds **tgts; - krb5_creds *res_creds; - int i; - - if (opt && opt->enctype) { - ret = krb5_enctype_valid(context, opt->enctype); - if (ret) - return ret; - } - - memset(&in_creds, 0, sizeof(in_creds)); - in_creds.server = rk_UNCONST(inprinc); - - ret = krb5_cc_get_principal(context, ccache, &in_creds.client); - if (ret) - return ret; - - if (opt) - options = opt->options; - else - options = 0; - flags.i = 0; - - *out_creds = NULL; - res_creds = calloc(1, sizeof(*res_creds)); - if (res_creds == NULL) { - krb5_free_principal(context, in_creds.client); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - if (opt && opt->enctype) { - in_creds.session.keytype = opt->enctype; - options |= KRB5_TC_MATCH_KEYTYPE; - } - - /* - * If we got a credential, check if credential is expired before - * returning it. - */ - ret = krb5_cc_retrieve_cred(context, - ccache, - options & KRB5_TC_MATCH_KEYTYPE, - &in_creds, res_creds); - /* - * If we got a credential, check if credential is expired before - * returning it, but only if KRB5_GC_EXPIRED_OK is not set. - */ - if (ret == 0) { - krb5_timestamp timeret; - - /* If expired ok, don't bother checking */ - if(options & KRB5_GC_EXPIRED_OK) { - *out_creds = res_creds; - krb5_free_principal(context, in_creds.client); - goto out; - } - - krb5_timeofday(context, &timeret); - if(res_creds->times.endtime > timeret) { - *out_creds = res_creds; - krb5_free_principal(context, in_creds.client); - goto out; - } - if(options & KRB5_GC_CACHED) - krb5_cc_remove_cred(context, ccache, 0, res_creds); - - } else if(ret != KRB5_CC_END) { - free(res_creds); - krb5_free_principal(context, in_creds.client); - goto out; - } - free(res_creds); - if(options & KRB5_GC_CACHED) { - krb5_free_principal(context, in_creds.client); - ret = not_found(context, in_creds.server, KRB5_CC_NOTFOUND); - goto out; - } - if(options & KRB5_GC_USER_USER) { - flags.b.enc_tkt_in_skey = 1; - options |= KRB5_GC_NO_STORE; - } - if (options & KRB5_GC_FORWARDABLE) - flags.b.forwardable = 1; - if (options & KRB5_GC_NO_TRANSIT_CHECK) - flags.b.disable_transited_check = 1; - if (options & KRB5_GC_CONSTRAINED_DELEGATION) { - flags.b.request_anonymous = 1; /* XXX ARGH confusion */ - flags.b.constrained_delegation = 1; - } - if (options & KRB5_GC_CANONICALIZE) - flags.b.canonicalize = 1; - - tgts = NULL; - ret = _krb5_get_cred_kdc_any(context, flags, ccache, - &in_creds, opt->self, opt->ticket, - out_creds, &tgts); - krb5_free_principal(context, in_creds.client); - for(i = 0; tgts && tgts[i]; i++) { - krb5_cc_store_cred(context, ccache, tgts[i]); - krb5_free_creds(context, tgts[i]); - } - free(tgts); - if(ret == 0 && (options & KRB5_GC_NO_STORE) == 0) - krb5_cc_store_cred(context, ccache, *out_creds); - - out: - _krb5_debug(context, 5, "krb5_get_creds: ret = %d", ret); - - return ret; -} - -/* - * - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_renewed_creds(krb5_context context, - krb5_creds *creds, - krb5_const_principal client, - krb5_ccache ccache, - const char *in_tkt_service) -{ - krb5_error_code ret; - krb5_kdc_flags flags; - krb5_creds in, *template, *out = NULL; - - memset(&in, 0, sizeof(in)); - memset(creds, 0, sizeof(*creds)); - - ret = krb5_copy_principal(context, client, &in.client); - if (ret) - return ret; - - if (in_tkt_service) { - ret = krb5_parse_name(context, in_tkt_service, &in.server); - if (ret) { - krb5_free_principal(context, in.client); - return ret; - } - } else { - const char *realm = krb5_principal_get_realm(context, client); - - ret = krb5_make_principal(context, &in.server, realm, KRB5_TGS_NAME, - realm, NULL); - if (ret) { - krb5_free_principal(context, in.client); - return ret; - } - } - - flags.i = 0; - flags.b.renewable = flags.b.renew = 1; - - /* - * Get template from old credential cache for the same entry, if - * this failes, no worries. - */ - ret = krb5_get_credentials(context, KRB5_GC_CACHED, ccache, &in, &template); - if (ret == 0) { - flags.b.forwardable = template->flags.b.forwardable; - flags.b.proxiable = template->flags.b.proxiable; - krb5_free_creds (context, template); - } - - ret = krb5_get_kdc_cred(context, ccache, flags, NULL, NULL, &in, &out); - krb5_free_principal(context, in.client); - krb5_free_principal(context, in.server); - if (ret) - return ret; - - ret = krb5_copy_creds_contents(context, out, creds); - krb5_free_creds(context, out); - - return ret; -} diff --git a/kerberosV/src/lib/krb5/get_default_principal.c b/kerberosV/src/lib/krb5/get_default_principal.c deleted file mode 100644 index 44baa6d1c2c..00000000000 --- a/kerberosV/src/lib/krb5/get_default_principal.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -/* - * Try to find out what's a reasonable default principal. - */ - -static const char* -get_env_user(void) -{ - const char *user = getenv("USER"); - if(user == NULL) - user = getenv("LOGNAME"); - if(user == NULL) - user = getenv("USERNAME"); - return user; -} - -#ifndef _WIN32 - -/* - * Will only use operating-system dependant operation to get the - * default principal, for use of functions that in ccache layer to - * avoid recursive calls. - */ - -krb5_error_code -_krb5_get_default_principal_local (krb5_context context, - krb5_principal *princ) -{ - krb5_error_code ret; - const char *user; - uid_t uid; - - *princ = NULL; - - uid = getuid(); - if(uid == 0) { - user = getlogin(); - if(user == NULL) - user = get_env_user(); - if(user != NULL && strcmp(user, "root") != 0) - ret = krb5_make_principal(context, princ, NULL, user, "root", NULL); - else - ret = krb5_make_principal(context, princ, NULL, "root", NULL); - } else { - struct passwd *pw = getpwuid(uid); - if(pw != NULL) - user = pw->pw_name; - else { - user = get_env_user(); - if(user == NULL) - user = getlogin(); - } - if(user == NULL) { - krb5_set_error_message(context, ENOTTY, - N_("unable to figure out current " - "principal", "")); - return ENOTTY; /* XXX */ - } - ret = krb5_make_principal(context, princ, NULL, user, NULL); - } - return ret; -} - -#else /* _WIN32 */ - -#define SECURITY_WIN32 -#include - -krb5_error_code -_krb5_get_default_principal_local(krb5_context context, - krb5_principal *princ) -{ - /* See if we can get the principal first. We only expect this to - work if logged into a domain. */ - { - char username[1024]; - ULONG sz = sizeof(username); - - if (GetUserNameEx(NameUserPrincipal, username, &sz)) { - return krb5_parse_name_flags(context, username, - KRB5_PRINCIPAL_PARSE_ENTERPRISE, - princ); - } - } - - /* Just get the Windows username. This should pretty much always - work. */ - { - char username[1024]; - DWORD dsz = sizeof(username); - - if (GetUserName(username, &dsz)) { - return krb5_make_principal(context, princ, NULL, username, NULL); - } - } - - /* Failing that, we look at the environment */ - { - const char * username = get_env_user(); - - if (username == NULL) { - krb5_set_error_string(context, - "unable to figure out current principal"); - return ENOTTY; /* Really? */ - } - - return krb5_make_principal(context, princ, NULL, username, NULL); - } -} - -#endif - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_default_principal (krb5_context context, - krb5_principal *princ) -{ - krb5_error_code ret; - krb5_ccache id; - - *princ = NULL; - - ret = krb5_cc_default (context, &id); - if (ret == 0) { - ret = krb5_cc_get_principal (context, id, princ); - krb5_cc_close (context, id); - if (ret == 0) - return 0; - } - - return _krb5_get_default_principal_local(context, princ); -} diff --git a/kerberosV/src/lib/krb5/get_default_realm.c b/kerberosV/src/lib/krb5/get_default_realm.c deleted file mode 100644 index 2a4933a62a7..00000000000 --- a/kerberosV/src/lib/krb5/get_default_realm.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 1997 - 2001, 2004 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 "krb5_locl.h" - -/* - * Return a NULL-terminated list of default realms in `realms'. - * Free this memory with krb5_free_host_realm. - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_default_realms (krb5_context context, - krb5_realm **realms) -{ - if (context->default_realms == NULL) { - krb5_error_code ret = krb5_set_default_realm (context, NULL); - if (ret) - return KRB5_CONFIG_NODEFREALM; - } - - return krb5_copy_host_realm (context, - context->default_realms, - realms); -} - -/* - * Return the first default realm. For compatibility. - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_default_realm(krb5_context context, - krb5_realm *realm) -{ - krb5_error_code ret; - char *res; - - if (context->default_realms == NULL - || context->default_realms[0] == NULL) { - krb5_clear_error_message(context); - ret = krb5_set_default_realm (context, NULL); - if (ret) - return ret; - } - - res = strdup (context->default_realms[0]); - if (res == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - *realm = res; - return 0; -} diff --git a/kerberosV/src/lib/krb5/get_for_creds.c b/kerberosV/src/lib/krb5/get_for_creds.c deleted file mode 100644 index 979fc9b0ae9..00000000000 --- a/kerberosV/src/lib/krb5/get_for_creds.c +++ /dev/null @@ -1,459 +0,0 @@ -/* - * Copyright (c) 1997 - 2004 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 "krb5_locl.h" - -static krb5_error_code -add_addrs(krb5_context context, - krb5_addresses *addr, - struct addrinfo *ai) -{ - krb5_error_code ret; - unsigned n, i; - void *tmp; - struct addrinfo *a; - - n = 0; - for (a = ai; a != NULL; a = a->ai_next) - ++n; - - tmp = realloc(addr->val, (addr->len + n) * sizeof(*addr->val)); - if (tmp == NULL && (addr->len + n) != 0) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - addr->val = tmp; - for (i = addr->len; i < (addr->len + n); ++i) { - addr->val[i].addr_type = 0; - krb5_data_zero(&addr->val[i].address); - } - i = addr->len; - for (a = ai; a != NULL; a = a->ai_next) { - krb5_address ad; - - ret = krb5_sockaddr2address (context, a->ai_addr, &ad); - if (ret == 0) { - if (krb5_address_search(context, &ad, addr)) - krb5_free_address(context, &ad); - else - addr->val[i++] = ad; - } - else if (ret == KRB5_PROG_ATYPE_NOSUPP) - krb5_clear_error_message (context); - else - goto fail; - addr->len = i; - } - return 0; -fail: - krb5_free_addresses (context, addr); - return ret; -} - -/** - * Forward credentials for client to host hostname , making them - * forwardable if forwardable, and returning the blob of data to sent - * in out_data. If hostname == NULL, pick it from server. - * - * @param context A kerberos 5 context. - * @param auth_context the auth context with the key to encrypt the out_data. - * @param hostname the host to forward the tickets too. - * @param client the client to delegate from. - * @param server the server to delegate the credential too. - * @param ccache credential cache to use. - * @param forwardable make the forwarded ticket forwabledable. - * @param out_data the resulting credential. - * - * @return Return an error code or 0. - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_fwd_tgt_creds (krb5_context context, - krb5_auth_context auth_context, - const char *hostname, - krb5_principal client, - krb5_principal server, - krb5_ccache ccache, - int forwardable, - krb5_data *out_data) -{ - krb5_flags flags = 0; - krb5_creds creds; - krb5_error_code ret; - krb5_const_realm client_realm; - - flags |= KDC_OPT_FORWARDED; - - if (forwardable) - flags |= KDC_OPT_FORWARDABLE; - - if (hostname == NULL && - krb5_principal_get_type(context, server) == KRB5_NT_SRV_HST) { - const char *inst = krb5_principal_get_comp_string(context, server, 0); - const char *host = krb5_principal_get_comp_string(context, server, 1); - - if (inst != NULL && - strcmp(inst, "host") == 0 && - host != NULL && - krb5_principal_get_comp_string(context, server, 2) == NULL) - hostname = host; - } - - client_realm = krb5_principal_get_realm(context, client); - - memset (&creds, 0, sizeof(creds)); - creds.client = client; - - ret = krb5_make_principal(context, - &creds.server, - client_realm, - KRB5_TGS_NAME, - client_realm, - NULL); - if (ret) - return ret; - - ret = krb5_get_forwarded_creds (context, - auth_context, - ccache, - flags, - hostname, - &creds, - out_data); - return ret; -} - -/** - * Gets tickets forwarded to hostname. If the tickets that are - * forwarded are address-less, the forwarded tickets will also be - * address-less. - * - * If the ticket have any address, hostname will be used for figure - * out the address to forward the ticket too. This since this might - * use DNS, its insecure and also doesn't represent configured all - * addresses of the host. For example, the host might have two - * adresses, one IPv4 and one IPv6 address where the later is not - * published in DNS. This IPv6 address might be used communications - * and thus the resulting ticket useless. - * - * @param context A kerberos 5 context. - * @param auth_context the auth context with the key to encrypt the out_data. - * @param ccache credential cache to use - * @param flags the flags to control the resulting ticket flags - * @param hostname the host to forward the tickets too. - * @param in_creds the in client and server ticket names. The client - * and server components forwarded to the remote host. - * @param out_data the resulting credential. - * - * @return Return an error code or 0. - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_forwarded_creds (krb5_context context, - krb5_auth_context auth_context, - krb5_ccache ccache, - krb5_flags flags, - const char *hostname, - krb5_creds *in_creds, - krb5_data *out_data) -{ - krb5_error_code ret; - krb5_creds *out_creds; - krb5_addresses addrs, *paddrs; - KRB_CRED cred; - KrbCredInfo *krb_cred_info; - EncKrbCredPart enc_krb_cred_part; - size_t len; - unsigned char *buf; - size_t buf_size; - krb5_kdc_flags kdc_flags; - krb5_crypto crypto; - struct addrinfo *ai; - krb5_creds *ticket; - - paddrs = NULL; - addrs.len = 0; - addrs.val = NULL; - - ret = krb5_get_credentials(context, 0, ccache, in_creds, &ticket); - if(ret == 0) { - if (ticket->addresses.len) - paddrs = &addrs; - krb5_free_creds (context, ticket); - } else { - krb5_boolean noaddr; - krb5_appdefault_boolean(context, NULL, - krb5_principal_get_realm(context, - in_creds->client), - "no-addresses", KRB5_ADDRESSLESS_DEFAULT, - &noaddr); - if (!noaddr) - paddrs = &addrs; - } - - /* - * If tickets have addresses, get the address of the remote host. - */ - - if (paddrs != NULL) { - - ret = getaddrinfo (hostname, NULL, NULL, &ai); - if (ret) { - krb5_error_code ret2 = krb5_eai_to_heim_errno(ret, errno); - krb5_set_error_message(context, ret2, - N_("resolving host %s failed: %s", - "hostname, error"), - hostname, gai_strerror(ret)); - return ret2; - } - - ret = add_addrs (context, &addrs, ai); - freeaddrinfo (ai); - if (ret) - return ret; - } - - kdc_flags.b = int2KDCOptions(flags); - - ret = krb5_get_kdc_cred (context, - ccache, - kdc_flags, - paddrs, - NULL, - in_creds, - &out_creds); - krb5_free_addresses (context, &addrs); - if (ret) - return ret; - - memset (&cred, 0, sizeof(cred)); - cred.pvno = 5; - cred.msg_type = krb_cred; - ALLOC_SEQ(&cred.tickets, 1); - if (cred.tickets.val == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out2; - } - ret = decode_Ticket(out_creds->ticket.data, - out_creds->ticket.length, - cred.tickets.val, &len); - if (ret) - goto out3; - - memset (&enc_krb_cred_part, 0, sizeof(enc_krb_cred_part)); - ALLOC_SEQ(&enc_krb_cred_part.ticket_info, 1); - if (enc_krb_cred_part.ticket_info.val == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out4; - } - - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { - krb5_timestamp sec; - int32_t usec; - - krb5_us_timeofday (context, &sec, &usec); - - ALLOC(enc_krb_cred_part.timestamp, 1); - if (enc_krb_cred_part.timestamp == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out4; - } - *enc_krb_cred_part.timestamp = sec; - ALLOC(enc_krb_cred_part.usec, 1); - if (enc_krb_cred_part.usec == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out4; - } - *enc_krb_cred_part.usec = usec; - } else { - enc_krb_cred_part.timestamp = NULL; - enc_krb_cred_part.usec = NULL; - } - - if (auth_context->local_address && auth_context->local_port && paddrs) { - - ret = krb5_make_addrport (context, - &enc_krb_cred_part.s_address, - auth_context->local_address, - auth_context->local_port); - if (ret) - goto out4; - } - - if (auth_context->remote_address) { - if (auth_context->remote_port) { - krb5_boolean noaddr; - krb5_const_realm srealm; - - srealm = krb5_principal_get_realm(context, out_creds->server); - /* Is this correct, and should we use the paddrs == NULL - trick here as well? Having an address-less ticket may - indicate that we don't know our own global address, but - it does not necessary mean that we don't know the - server's. */ - krb5_appdefault_boolean(context, NULL, srealm, "no-addresses", - FALSE, &noaddr); - if (!noaddr) { - ret = krb5_make_addrport (context, - &enc_krb_cred_part.r_address, - auth_context->remote_address, - auth_context->remote_port); - if (ret) - goto out4; - } - } else { - ALLOC(enc_krb_cred_part.r_address, 1); - if (enc_krb_cred_part.r_address == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto out4; - } - - ret = krb5_copy_address (context, auth_context->remote_address, - enc_krb_cred_part.r_address); - if (ret) - goto out4; - } - } - - /* fill ticket_info.val[0] */ - - enc_krb_cred_part.ticket_info.len = 1; - - krb_cred_info = enc_krb_cred_part.ticket_info.val; - - copy_EncryptionKey (&out_creds->session, &krb_cred_info->key); - ALLOC(krb_cred_info->prealm, 1); - copy_Realm (&out_creds->client->realm, krb_cred_info->prealm); - ALLOC(krb_cred_info->pname, 1); - copy_PrincipalName(&out_creds->client->name, krb_cred_info->pname); - ALLOC(krb_cred_info->flags, 1); - *krb_cred_info->flags = out_creds->flags.b; - ALLOC(krb_cred_info->authtime, 1); - *krb_cred_info->authtime = out_creds->times.authtime; - ALLOC(krb_cred_info->starttime, 1); - *krb_cred_info->starttime = out_creds->times.starttime; - ALLOC(krb_cred_info->endtime, 1); - *krb_cred_info->endtime = out_creds->times.endtime; - ALLOC(krb_cred_info->renew_till, 1); - *krb_cred_info->renew_till = out_creds->times.renew_till; - ALLOC(krb_cred_info->srealm, 1); - copy_Realm (&out_creds->server->realm, krb_cred_info->srealm); - ALLOC(krb_cred_info->sname, 1); - copy_PrincipalName (&out_creds->server->name, krb_cred_info->sname); - ALLOC(krb_cred_info->caddr, 1); - copy_HostAddresses (&out_creds->addresses, krb_cred_info->caddr); - - krb5_free_creds (context, out_creds); - - /* encode EncKrbCredPart */ - - ASN1_MALLOC_ENCODE(EncKrbCredPart, buf, buf_size, - &enc_krb_cred_part, &len, ret); - free_EncKrbCredPart (&enc_krb_cred_part); - if (ret) { - free_KRB_CRED(&cred); - return ret; - } - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - /** - * Some older of the MIT gssapi library used clear-text tickets - * (warped inside AP-REQ encryption), use the krb5_auth_context - * flag KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED to support those - * tickets. The session key is used otherwise to encrypt the - * forwarded ticket. - */ - - if (auth_context->flags & KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED) { - cred.enc_part.etype = ENCTYPE_NULL; - cred.enc_part.kvno = NULL; - cred.enc_part.cipher.data = buf; - cred.enc_part.cipher.length = buf_size; - } else { - /* - * Here older versions then 0.7.2 of Heimdal used the local or - * remote subkey. That is wrong, the session key should be - * used. Heimdal 0.7.2 and newer have code to try both in the - * receiving end. - */ - - ret = krb5_crypto_init(context, auth_context->keyblock, 0, &crypto); - if (ret) { - free(buf); - free_KRB_CRED(&cred); - return ret; - } - ret = krb5_encrypt_EncryptedData (context, - crypto, - KRB5_KU_KRB_CRED, - buf, - len, - 0, - &cred.enc_part); - free(buf); - krb5_crypto_destroy(context, crypto); - if (ret) { - free_KRB_CRED(&cred); - return ret; - } - } - - ASN1_MALLOC_ENCODE(KRB_CRED, buf, buf_size, &cred, &len, ret); - free_KRB_CRED (&cred); - if (ret) - return ret; - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - out_data->length = len; - out_data->data = buf; - return 0; - out4: - free_EncKrbCredPart(&enc_krb_cred_part); - out3: - free_KRB_CRED(&cred); - out2: - krb5_free_creds (context, out_creds); - return ret; -} diff --git a/kerberosV/src/lib/krb5/get_host_realm.c b/kerberosV/src/lib/krb5/get_host_realm.c deleted file mode 100644 index ed7f54b3d69..00000000000 --- a/kerberosV/src/lib/krb5/get_host_realm.c +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (c) 1997 - 2005 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 "krb5_locl.h" -#include - -/* To automagically find the correct realm of a host (without - * [domain_realm] in krb5.conf) add a text record for your domain with - * the name of your realm, like this: - * - * _kerberos IN TXT "FOO.SE" - * - * The search is recursive, so you can add entries for specific - * hosts. To find the realm of host a.b.c, it first tries - * _kerberos.a.b.c, then _kerberos.b.c and so on. - * - * This method is described in draft-ietf-cat-krb-dns-locate-03.txt. - * - */ - -static int -copy_txt_to_realms (struct rk_resource_record *head, - krb5_realm **realms) -{ - struct rk_resource_record *rr; - unsigned int n, i; - - for(n = 0, rr = head; rr; rr = rr->next) - if (rr->type == rk_ns_t_txt) - ++n; - - if (n == 0) - return -1; - - *realms = malloc ((n + 1) * sizeof(krb5_realm)); - if (*realms == NULL) - return -1; - - for (i = 0; i < n + 1; ++i) - (*realms)[i] = NULL; - - for (i = 0, rr = head; rr; rr = rr->next) { - if (rr->type == rk_ns_t_txt) { - char *tmp; - - tmp = strdup(rr->u.txt); - if (tmp == NULL) { - for (i = 0; i < n; ++i) - free ((*realms)[i]); - free (*realms); - return -1; - } - (*realms)[i] = tmp; - ++i; - } - } - return 0; -} - -static int -dns_find_realm(krb5_context context, - const char *domain, - krb5_realm **realms) -{ - static const char *default_labels[] = { "_kerberos", NULL }; - char dom[MAXHOSTNAMELEN]; - struct rk_dns_reply *r; - const char **labels; - char **config_labels; - int i, ret; - - config_labels = krb5_config_get_strings(context, NULL, "libdefaults", - "dns_lookup_realm_labels", NULL); - if(config_labels != NULL) - labels = (const char **)config_labels; - else - labels = default_labels; - if(*domain == '.') - domain++; - for (i = 0; labels[i] != NULL; i++) { - ret = snprintf(dom, sizeof(dom), "%s.%s.", labels[i], domain); - if(ret < 0 || (size_t)ret >= sizeof(dom)) { - if (config_labels) - krb5_config_free_strings(config_labels); - return -1; - } - r = rk_dns_lookup(dom, "TXT"); - if(r != NULL) { - ret = copy_txt_to_realms (r->head, realms); - rk_dns_free_data(r); - if(ret == 0) { - if (config_labels) - krb5_config_free_strings(config_labels); - return 0; - } - } - } - if (config_labels) - krb5_config_free_strings(config_labels); - return -1; -} - -/* - * Try to figure out what realms host in `domain' belong to from the - * configuration file. - */ - -static int -config_find_realm(krb5_context context, - const char *domain, - krb5_realm **realms) -{ - char **tmp = krb5_config_get_strings (context, NULL, - "domain_realm", - domain, - NULL); - - if (tmp == NULL) - return -1; - *realms = tmp; - return 0; -} - -/* - * This function assumes that `host' is a FQDN (and doesn't handle the - * special case of host == NULL either). - * Try to find mapping in the config file or DNS and it that fails, - * fall back to guessing - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_get_host_realm_int (krb5_context context, - const char *host, - krb5_boolean use_dns, - krb5_realm **realms) -{ - const char *p, *q; - krb5_boolean dns_locate_enable; - - dns_locate_enable = krb5_config_get_bool_default(context, NULL, TRUE, - "libdefaults", "dns_lookup_realm", NULL); - for (p = host; p != NULL; p = strchr (p + 1, '.')) { - if(config_find_realm(context, p, realms) == 0) { - if(strcasecmp(*realms[0], "dns_locate") == 0) { - if(use_dns) - for (q = host; q != NULL; q = strchr(q + 1, '.')) - if(dns_find_realm(context, q, realms) == 0) - return 0; - continue; - } else - return 0; - } - else if(use_dns && dns_locate_enable) { - if(dns_find_realm(context, p, realms) == 0) - return 0; - } - } - p = strchr(host, '.'); - if(p != NULL) { - p++; - *realms = malloc(2 * sizeof(krb5_realm)); - if (*realms == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - (*realms)[0] = strdup(p); - if((*realms)[0] == NULL) { - free(*realms); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - strupr((*realms)[0]); - (*realms)[1] = NULL; - return 0; - } - krb5_set_error_message(context, KRB5_ERR_HOST_REALM_UNKNOWN, - N_("unable to find realm of host %s", ""), - host); - return KRB5_ERR_HOST_REALM_UNKNOWN; -} - -/* - * Return the realm(s) of `host' as a NULL-terminated list in - * `realms'. Free `realms' with krb5_free_host_realm(). - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_host_realm(krb5_context context, - const char *targethost, - krb5_realm **realms) -{ - const char *host = targethost; - char hostname[MAXHOSTNAMELEN]; - krb5_error_code ret; - int use_dns; - - if (host == NULL) { - if (gethostname (hostname, sizeof(hostname))) { - *realms = NULL; - return errno; - } - host = hostname; - } - - /* - * If our local hostname is without components, don't even try to dns. - */ - - use_dns = (strchr(host, '.') != NULL); - - ret = _krb5_get_host_realm_int (context, host, use_dns, realms); - if (ret && targethost != NULL) { - /* - * If there was no realm mapping for the host (and we wasn't - * looking for ourself), guess at the local realm, maybe our - * KDC knows better then we do and we get a referral back. - */ - ret = krb5_get_default_realms(context, realms); - if (ret) { - krb5_set_error_message(context, KRB5_ERR_HOST_REALM_UNKNOWN, - N_("Unable to find realm of host %s", ""), - host); - return KRB5_ERR_HOST_REALM_UNKNOWN; - } - } - return ret; -} diff --git a/kerberosV/src/lib/krb5/get_in_tkt.c b/kerberosV/src/lib/krb5/get_in_tkt.c deleted file mode 100644 index 41618b9616a..00000000000 --- a/kerberosV/src/lib/krb5/get_in_tkt.c +++ /dev/null @@ -1,564 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -#ifndef HEIMDAL_SMALLER - -static krb5_error_code -make_pa_enc_timestamp(krb5_context context, PA_DATA *pa, - krb5_enctype etype, krb5_keyblock *key) -{ - PA_ENC_TS_ENC p; - unsigned char *buf; - size_t buf_size; - size_t len = 0; - EncryptedData encdata; - krb5_error_code ret; - int32_t usec; - int usec2; - krb5_crypto crypto; - - krb5_us_timeofday (context, &p.patimestamp, &usec); - usec2 = usec; - p.pausec = &usec2; - - ASN1_MALLOC_ENCODE(PA_ENC_TS_ENC, buf, buf_size, &p, &len, ret); - if (ret) - return ret; - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) { - free(buf); - return ret; - } - ret = krb5_encrypt_EncryptedData(context, - crypto, - KRB5_KU_PA_ENC_TIMESTAMP, - buf, - len, - 0, - &encdata); - free(buf); - krb5_crypto_destroy(context, crypto); - if (ret) - return ret; - - ASN1_MALLOC_ENCODE(EncryptedData, buf, buf_size, &encdata, &len, ret); - free_EncryptedData(&encdata); - if (ret) - return ret; - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - pa->padata_type = KRB5_PADATA_ENC_TIMESTAMP; - pa->padata_value.length = len; - pa->padata_value.data = buf; - return 0; -} - -static krb5_error_code -add_padata(krb5_context context, - METHOD_DATA *md, - krb5_principal client, - krb5_key_proc key_proc, - krb5_const_pointer keyseed, - krb5_enctype *enctypes, - unsigned netypes, - krb5_salt *salt) -{ - krb5_error_code ret; - PA_DATA *pa2; - krb5_salt salt2; - krb5_enctype *ep; - size_t i; - - if(salt == NULL) { - /* default to standard salt */ - ret = krb5_get_pw_salt (context, client, &salt2); - if (ret) - return ret; - salt = &salt2; - } - if (!enctypes) { - enctypes = context->etypes; - netypes = 0; - for (ep = enctypes; *ep != ETYPE_NULL; ep++) - netypes++; - } - pa2 = realloc (md->val, (md->len + netypes) * sizeof(*md->val)); - if (pa2 == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - md->val = pa2; - - for (i = 0; i < netypes; ++i) { - krb5_keyblock *key; - - ret = (*key_proc)(context, enctypes[i], *salt, keyseed, &key); - if (ret) - continue; - ret = make_pa_enc_timestamp (context, &md->val[md->len], - enctypes[i], key); - krb5_free_keyblock (context, key); - if (ret) - return ret; - ++md->len; - } - if(salt == &salt2) - krb5_free_salt(context, salt2); - return 0; -} - -static krb5_error_code -init_as_req (krb5_context context, - KDCOptions opts, - krb5_creds *creds, - const krb5_addresses *addrs, - const krb5_enctype *etypes, - const krb5_preauthtype *ptypes, - const krb5_preauthdata *preauth, - krb5_key_proc key_proc, - krb5_const_pointer keyseed, - unsigned nonce, - AS_REQ *a) -{ - krb5_error_code ret; - krb5_salt salt; - - memset(a, 0, sizeof(*a)); - - a->pvno = 5; - a->msg_type = krb_as_req; - a->req_body.kdc_options = opts; - a->req_body.cname = malloc(sizeof(*a->req_body.cname)); - if (a->req_body.cname == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - a->req_body.sname = malloc(sizeof(*a->req_body.sname)); - if (a->req_body.sname == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - ret = _krb5_principal2principalname (a->req_body.cname, creds->client); - if (ret) - goto fail; - ret = _krb5_principal2principalname (a->req_body.sname, creds->server); - if (ret) - goto fail; - ret = copy_Realm(&creds->client->realm, &a->req_body.realm); - if (ret) - goto fail; - - if(creds->times.starttime) { - a->req_body.from = malloc(sizeof(*a->req_body.from)); - if (a->req_body.from == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - *a->req_body.from = creds->times.starttime; - } - if(creds->times.endtime){ - ALLOC(a->req_body.till, 1); - *a->req_body.till = creds->times.endtime; - } - if(creds->times.renew_till){ - a->req_body.rtime = malloc(sizeof(*a->req_body.rtime)); - if (a->req_body.rtime == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - *a->req_body.rtime = creds->times.renew_till; - } - a->req_body.nonce = nonce; - ret = _krb5_init_etype(context, - KRB5_PDU_AS_REQUEST, - &a->req_body.etype.len, - &a->req_body.etype.val, - etypes); - if (ret) - goto fail; - - /* - * This means no addresses - */ - - if (addrs && addrs->len == 0) { - a->req_body.addresses = NULL; - } else { - a->req_body.addresses = malloc(sizeof(*a->req_body.addresses)); - if (a->req_body.addresses == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - - if (addrs) - ret = krb5_copy_addresses(context, addrs, a->req_body.addresses); - else { - ret = krb5_get_all_client_addrs (context, a->req_body.addresses); - if(ret == 0 && a->req_body.addresses->len == 0) { - free(a->req_body.addresses); - a->req_body.addresses = NULL; - } - } - if (ret) - return ret; - } - - a->req_body.enc_authorization_data = NULL; - a->req_body.additional_tickets = NULL; - - if(preauth != NULL) { - size_t i; - ALLOC(a->padata, 1); - if(a->padata == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - a->padata->val = NULL; - a->padata->len = 0; - for(i = 0; i < preauth->len; i++) { - if(preauth->val[i].type == KRB5_PADATA_ENC_TIMESTAMP){ - size_t j; - - for(j = 0; j < preauth->val[i].info.len; j++) { - krb5_salt *sp = &salt; - if(preauth->val[i].info.val[j].salttype) - salt.salttype = *preauth->val[i].info.val[j].salttype; - else - salt.salttype = KRB5_PW_SALT; - if(preauth->val[i].info.val[j].salt) - salt.saltvalue = *preauth->val[i].info.val[j].salt; - else - if(salt.salttype == KRB5_PW_SALT) - sp = NULL; - else - krb5_data_zero(&salt.saltvalue); - ret = add_padata(context, a->padata, creds->client, - key_proc, keyseed, - &preauth->val[i].info.val[j].etype, 1, - sp); - if (ret == 0) - break; - } - } - } - } else - /* not sure this is the way to use `ptypes' */ - if (ptypes == NULL || *ptypes == KRB5_PADATA_NONE) - a->padata = NULL; - else if (*ptypes == KRB5_PADATA_ENC_TIMESTAMP) { - ALLOC(a->padata, 1); - if (a->padata == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - a->padata->len = 0; - a->padata->val = NULL; - - /* make a v5 salted pa-data */ - add_padata(context, a->padata, creds->client, - key_proc, keyseed, a->req_body.etype.val, - a->req_body.etype.len, NULL); - - /* make a v4 salted pa-data */ - salt.salttype = KRB5_PW_SALT; - krb5_data_zero(&salt.saltvalue); - add_padata(context, a->padata, creds->client, - key_proc, keyseed, a->req_body.etype.val, - a->req_body.etype.len, &salt); - } else { - ret = KRB5_PREAUTH_BAD_TYPE; - krb5_set_error_message (context, ret, - N_("pre-auth type %d not supported", ""), - *ptypes); - goto fail; - } - return 0; -fail: - free_AS_REQ(a); - return ret; -} - -static int -set_ptypes(krb5_context context, - KRB_ERROR *error, - const krb5_preauthtype **ptypes, - krb5_preauthdata **preauth) -{ - static krb5_preauthdata preauth2; - static krb5_preauthtype ptypes2[] = { KRB5_PADATA_ENC_TIMESTAMP, KRB5_PADATA_NONE }; - - if(error->e_data) { - METHOD_DATA md; - size_t i; - decode_METHOD_DATA(error->e_data->data, - error->e_data->length, - &md, - NULL); - for(i = 0; i < md.len; i++){ - switch(md.val[i].padata_type){ - case KRB5_PADATA_ENC_TIMESTAMP: - *ptypes = ptypes2; - break; - case KRB5_PADATA_ETYPE_INFO: - *preauth = &preauth2; - ALLOC_SEQ(*preauth, 1); - (*preauth)->val[0].type = KRB5_PADATA_ENC_TIMESTAMP; - decode_ETYPE_INFO(md.val[i].padata_value.data, - md.val[i].padata_value.length, - &(*preauth)->val[0].info, - NULL); - break; - default: - break; - } - } - free_METHOD_DATA(&md); - } else { - *ptypes = ptypes2; - } - return(1); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_in_cred(krb5_context context, - krb5_flags options, - const krb5_addresses *addrs, - const krb5_enctype *etypes, - const krb5_preauthtype *ptypes, - const krb5_preauthdata *preauth, - krb5_key_proc key_proc, - krb5_const_pointer keyseed, - krb5_decrypt_proc decrypt_proc, - krb5_const_pointer decryptarg, - krb5_creds *creds, - krb5_kdc_rep *ret_as_reply) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_error_code ret; - AS_REQ a; - krb5_kdc_rep rep; - krb5_data req, resp; - size_t len = 0; - krb5_salt salt; - krb5_keyblock *key; - size_t size; - KDCOptions opts; - PA_DATA *pa; - krb5_enctype etype; - krb5_preauthdata *my_preauth = NULL; - unsigned nonce; - int done; - - opts = int2KDCOptions(options); - - krb5_generate_random_block (&nonce, sizeof(nonce)); - nonce &= 0xffffffff; - - do { - done = 1; - ret = init_as_req (context, - opts, - creds, - addrs, - etypes, - ptypes, - preauth, - key_proc, - keyseed, - nonce, - &a); - if (my_preauth) { - free_ETYPE_INFO(&my_preauth->val[0].info); - free (my_preauth->val); - my_preauth = NULL; - } - if (ret) - return ret; - - ASN1_MALLOC_ENCODE(AS_REQ, req.data, req.length, &a, &len, ret); - free_AS_REQ(&a); - if (ret) - return ret; - if(len != req.length) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - ret = krb5_sendto_kdc (context, &req, &creds->client->realm, &resp); - krb5_data_free(&req); - if (ret) - return ret; - - memset (&rep, 0, sizeof(rep)); - ret = decode_AS_REP(resp.data, resp.length, &rep.kdc_rep, &size); - if(ret) { - /* let's try to parse it as a KRB-ERROR */ - KRB_ERROR error; - int ret2; - - ret2 = krb5_rd_error(context, &resp, &error); - if(ret2 && resp.data && ((char*)resp.data)[0] == 4) - ret = KRB5KRB_AP_ERR_V4_REPLY; - krb5_data_free(&resp); - if (ret2 == 0) { - ret = krb5_error_from_rd_error(context, &error, creds); - /* if no preauth was set and KDC requires it, give it - one more try */ - if (!ptypes && !preauth - && ret == KRB5KDC_ERR_PREAUTH_REQUIRED -#if 0 - || ret == KRB5KDC_ERR_BADOPTION -#endif - && set_ptypes(context, &error, &ptypes, &my_preauth)) { - done = 0; - preauth = my_preauth; - krb5_free_error_contents(context, &error); - krb5_clear_error_message(context); - continue; - } - if(ret_as_reply) - ret_as_reply->error = error; - else - free_KRB_ERROR (&error); - return ret; - } - return ret; - } - krb5_data_free(&resp); - } while(!done); - - pa = NULL; - etype = rep.kdc_rep.enc_part.etype; - if(rep.kdc_rep.padata){ - int i = 0; - pa = krb5_find_padata(rep.kdc_rep.padata->val, rep.kdc_rep.padata->len, - KRB5_PADATA_PW_SALT, &i); - if(pa == NULL) { - i = 0; - pa = krb5_find_padata(rep.kdc_rep.padata->val, - rep.kdc_rep.padata->len, - KRB5_PADATA_AFS3_SALT, &i); - } - } - if(pa) { - salt.salttype = (krb5_salttype)pa->padata_type; - salt.saltvalue = pa->padata_value; - - ret = (*key_proc)(context, etype, salt, keyseed, &key); - } else { - /* make a v5 salted pa-data */ - ret = krb5_get_pw_salt (context, creds->client, &salt); - - if (ret) - goto out; - ret = (*key_proc)(context, etype, salt, keyseed, &key); - krb5_free_salt(context, salt); - } - if (ret) - goto out; - - { - unsigned flags = EXTRACT_TICKET_TIMESYNC; - if (opts.request_anonymous) - flags |= EXTRACT_TICKET_ALLOW_SERVER_MISMATCH; - - ret = _krb5_extract_ticket(context, - &rep, - creds, - key, - keyseed, - KRB5_KU_AS_REP_ENC_PART, - NULL, - nonce, - flags, - decrypt_proc, - decryptarg); - } - memset (key->keyvalue.data, 0, key->keyvalue.length); - krb5_free_keyblock_contents (context, key); - free (key); - -out: - if (ret == 0 && ret_as_reply) - *ret_as_reply = rep; - else - krb5_free_kdc_rep (context, &rep); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_in_tkt(krb5_context context, - krb5_flags options, - const krb5_addresses *addrs, - const krb5_enctype *etypes, - const krb5_preauthtype *ptypes, - krb5_key_proc key_proc, - krb5_const_pointer keyseed, - krb5_decrypt_proc decrypt_proc, - krb5_const_pointer decryptarg, - krb5_creds *creds, - krb5_ccache ccache, - krb5_kdc_rep *ret_as_reply) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - krb5_error_code ret; - - ret = krb5_get_in_cred (context, - options, - addrs, - etypes, - ptypes, - NULL, - key_proc, - keyseed, - decrypt_proc, - decryptarg, - creds, - ret_as_reply); - if(ret) - return ret; - if (ccache) - ret = krb5_cc_store_cred (context, ccache, creds); - return ret; -} - -#endif /* HEIMDAL_SMALLER */ diff --git a/kerberosV/src/lib/krb5/get_port.c b/kerberosV/src/lib/krb5/get_port.c deleted file mode 100644 index 93d9433cd03..00000000000 --- a/kerberosV/src/lib/krb5/get_port.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1997-2001 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_getportbyname (krb5_context context, - const char *service, - const char *proto, - int default_port) -{ - struct servent *sp; - - if ((sp = roken_getservbyname (service, proto)) == NULL) { -#if 0 - krb5_warnx(context, "%s/%s unknown service, using default port %d", - service, proto, default_port); -#endif - return htons(default_port); - } else - return sp->s_port; -} diff --git a/kerberosV/src/lib/krb5/heim_err.et b/kerberosV/src/lib/krb5/heim_err.et deleted file mode 100644 index b19f6d6f8e6..00000000000 --- a/kerberosV/src/lib/krb5/heim_err.et +++ /dev/null @@ -1,47 +0,0 @@ -# -# Error messages for the krb5 library -# -# This might look like a com_err file, but is not -# -id "$Id: heim_err.et,v 1.2 2013/06/17 18:57:44 robert Exp $" - -error_table heim - -prefix HEIM_ERR - -error_code LOG_PARSE, "Error parsing log destination" -error_code V4_PRINC_NO_CONV, "Failed to convert v4 principal" -error_code SALTTYPE_NOSUPP, "Salt type is not supported by enctype" -error_code NOHOST, "Host not found" -error_code OPNOTSUPP, "Operation not supported" -error_code EOF, "End of file" -error_code BAD_MKEY, "Failed to get the master key" -error_code SERVICE_NOMATCH, "Unacceptable service used" -error_code NOT_SEEKABLE, "File descriptor not seekable" -error_code TOO_BIG, "Offset too large" -error_code BAD_HDBENT_ENCODING, "Invalid HDB entry encoding" - -index 64 -prefix HEIM_PKINIT -error_code NO_CERTIFICATE, "Certificate missing" -error_code NO_PRIVATE_KEY, "Private key missing" -error_code NO_VALID_CA, "No valid certificate authority" -error_code CERTIFICATE_INVALID, "Certificate invalid" -error_code PRIVATE_KEY_INVALID, "Private key invalid" - -index 128 -prefix HEIM_EAI -#error_code NOERROR, "no error" -error_code UNKNOWN, "unknown error from getaddrinfo" -error_code ADDRFAMILY, "address family for nodename not supported" -error_code AGAIN, "temporary failure in name resolution" -error_code BADFLAGS, "invalid value for ai_flags" -error_code FAIL, "non-recoverable failure in name resolution" -error_code FAMILY, "ai_family not supported" -error_code MEMORY, "memory allocation failure" -error_code NODATA, "no address associated with nodename" -error_code NONAME, "nodename nor servname provided, or not known" -error_code SERVICE, "servname not supported for ai_socktype" -error_code SOCKTYPE, "ai_socktype not supported" -error_code SYSTEM, "system error returned in errno" -end diff --git a/kerberosV/src/lib/krb5/init_creds.c b/kerberosV/src/lib/krb5/init_creds.c deleted file mode 100644 index 25bef0f3404..00000000000 --- a/kerberosV/src/lib/krb5/init_creds.c +++ /dev/null @@ -1,434 +0,0 @@ -/* - * Copyright (c) 1997 - 2004 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" - -#undef __attribute__ -#define __attribute__(x) - -/** - * @page krb5_init_creds_intro The initial credential handing functions - * @section section_krb5_init_creds Initial credential - * - * Functions to get initial credentials: @ref krb5_credential . - */ - -/** - * Allocate a new krb5_get_init_creds_opt structure, free with - * krb5_get_init_creds_opt_free(). - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_alloc(krb5_context context, - krb5_get_init_creds_opt **opt) -{ - krb5_get_init_creds_opt *o; - - *opt = NULL; - o = calloc(1, sizeof(*o)); - if (o == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - o->opt_private = calloc(1, sizeof(*o->opt_private)); - if (o->opt_private == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - free(o); - return ENOMEM; - } - o->opt_private->refcount = 1; - *opt = o; - return 0; -} - -/** - * Free krb5_get_init_creds_opt structure. - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_free(krb5_context context, - krb5_get_init_creds_opt *opt) -{ - if (opt == NULL || opt->opt_private == NULL) - return; - if (opt->opt_private->refcount < 1) /* abort ? */ - return; - if (--opt->opt_private->refcount == 0) { - _krb5_get_init_creds_opt_free_pkinit(opt); - free(opt->opt_private); - } - memset(opt, 0, sizeof(*opt)); - free(opt); -} - -static int -get_config_time (krb5_context context, - const char *realm, - const char *name, - int def) -{ - int ret; - - ret = krb5_config_get_time (context, NULL, - "realms", - realm, - name, - NULL); - if (ret >= 0) - return ret; - ret = krb5_config_get_time (context, NULL, - "libdefaults", - name, - NULL); - if (ret >= 0) - return ret; - return def; -} - -static krb5_boolean -get_config_bool (krb5_context context, - krb5_boolean def_value, - const char *realm, - const char *name) -{ - krb5_boolean b; - - b = krb5_config_get_bool_default(context, NULL, def_value, - "realms", realm, name, NULL); - if (b != def_value) - return b; - b = krb5_config_get_bool_default (context, NULL, def_value, - "libdefaults", name, NULL); - if (b != def_value) - return b; - return def_value; -} - -/* - * set all the values in `opt' to the appropriate values for - * application `appname' (default to getprogname() if NULL), and realm - * `realm'. First looks in [appdefaults] but falls back to - * [realms] or [libdefaults] for some of the values. - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_default_flags(krb5_context context, - const char *appname, - krb5_const_realm realm, - krb5_get_init_creds_opt *opt) -{ - krb5_boolean b; - time_t t; - - b = get_config_bool (context, KRB5_FORWARDABLE_DEFAULT, - realm, "forwardable"); - krb5_appdefault_boolean(context, appname, realm, "forwardable", b, &b); - krb5_get_init_creds_opt_set_forwardable(opt, b); - - b = get_config_bool (context, FALSE, realm, "proxiable"); - krb5_appdefault_boolean(context, appname, realm, "proxiable", b, &b); - krb5_get_init_creds_opt_set_proxiable (opt, b); - - krb5_appdefault_time(context, appname, realm, "ticket_lifetime", 0, &t); - if (t == 0) - t = get_config_time (context, realm, "ticket_lifetime", 0); - if(t != 0) - krb5_get_init_creds_opt_set_tkt_life(opt, t); - - krb5_appdefault_time(context, appname, realm, "renew_lifetime", 0, &t); - if (t == 0) - t = get_config_time (context, realm, "renew_lifetime", 0); - if(t != 0) - krb5_get_init_creds_opt_set_renew_life(opt, t); - - krb5_appdefault_boolean(context, appname, realm, "no-addresses", - KRB5_ADDRESSLESS_DEFAULT, &b); - krb5_get_init_creds_opt_set_addressless (context, opt, b); - -#if 0 - krb5_appdefault_boolean(context, appname, realm, "anonymous", FALSE, &b); - krb5_get_init_creds_opt_set_anonymous (opt, b); - - krb5_get_init_creds_opt_set_etype_list(opt, enctype, - etype_str.num_strings); - - krb5_get_init_creds_opt_set_salt(krb5_get_init_creds_opt *opt, - krb5_data *salt); - - krb5_get_init_creds_opt_set_preauth_list(krb5_get_init_creds_opt *opt, - krb5_preauthtype *preauth_list, - int preauth_list_length); -#endif -} - - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_tkt_life(krb5_get_init_creds_opt *opt, - krb5_deltat tkt_life) -{ - opt->flags |= KRB5_GET_INIT_CREDS_OPT_TKT_LIFE; - opt->tkt_life = tkt_life; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_renew_life(krb5_get_init_creds_opt *opt, - krb5_deltat renew_life) -{ - opt->flags |= KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE; - opt->renew_life = renew_life; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_forwardable(krb5_get_init_creds_opt *opt, - int forwardable) -{ - opt->flags |= KRB5_GET_INIT_CREDS_OPT_FORWARDABLE; - opt->forwardable = forwardable; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_proxiable(krb5_get_init_creds_opt *opt, - int proxiable) -{ - opt->flags |= KRB5_GET_INIT_CREDS_OPT_PROXIABLE; - opt->proxiable = proxiable; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_etype_list(krb5_get_init_creds_opt *opt, - krb5_enctype *etype_list, - int etype_list_length) -{ - opt->flags |= KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST; - opt->etype_list = etype_list; - opt->etype_list_length = etype_list_length; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_address_list(krb5_get_init_creds_opt *opt, - krb5_addresses *addresses) -{ - opt->flags |= KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST; - opt->address_list = addresses; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_preauth_list(krb5_get_init_creds_opt *opt, - krb5_preauthtype *preauth_list, - int preauth_list_length) -{ - opt->flags |= KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST; - opt->preauth_list_length = preauth_list_length; - opt->preauth_list = preauth_list; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_salt(krb5_get_init_creds_opt *opt, - krb5_data *salt) -{ - opt->flags |= KRB5_GET_INIT_CREDS_OPT_SALT; - opt->salt = salt; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_anonymous(krb5_get_init_creds_opt *opt, - int anonymous) -{ - opt->flags |= KRB5_GET_INIT_CREDS_OPT_ANONYMOUS; - opt->anonymous = anonymous; -} - -static krb5_error_code -require_ext_opt(krb5_context context, - krb5_get_init_creds_opt *opt, - const char *type) -{ - if (opt->opt_private == NULL) { - krb5_set_error_message(context, EINVAL, - N_("%s on non extendable opt", ""), type); - return EINVAL; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_pa_password(krb5_context context, - krb5_get_init_creds_opt *opt, - const char *password, - krb5_s2k_proc key_proc) -{ - krb5_error_code ret; - ret = require_ext_opt(context, opt, "init_creds_opt_set_pa_password"); - if (ret) - return ret; - opt->opt_private->password = password; - opt->opt_private->key_proc = key_proc; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_pac_request(krb5_context context, - krb5_get_init_creds_opt *opt, - krb5_boolean req_pac) -{ - krb5_error_code ret; - ret = require_ext_opt(context, opt, "init_creds_opt_set_pac_req"); - if (ret) - return ret; - opt->opt_private->req_pac = req_pac ? - KRB5_INIT_CREDS_TRISTATE_TRUE : - KRB5_INIT_CREDS_TRISTATE_FALSE; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_addressless(krb5_context context, - krb5_get_init_creds_opt *opt, - krb5_boolean addressless) -{ - krb5_error_code ret; - ret = require_ext_opt(context, opt, "init_creds_opt_set_pac_req"); - if (ret) - return ret; - if (addressless) - opt->opt_private->addressless = KRB5_INIT_CREDS_TRISTATE_TRUE; - else - opt->opt_private->addressless = KRB5_INIT_CREDS_TRISTATE_FALSE; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_canonicalize(krb5_context context, - krb5_get_init_creds_opt *opt, - krb5_boolean req) -{ - krb5_error_code ret; - ret = require_ext_opt(context, opt, "init_creds_opt_set_canonicalize"); - if (ret) - return ret; - if (req) - opt->opt_private->flags |= KRB5_INIT_CREDS_CANONICALIZE; - else - opt->opt_private->flags &= ~KRB5_INIT_CREDS_CANONICALIZE; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_win2k(krb5_context context, - krb5_get_init_creds_opt *opt, - krb5_boolean req) -{ - krb5_error_code ret; - ret = require_ext_opt(context, opt, "init_creds_opt_set_win2k"); - if (ret) - return ret; - if (req) { - opt->opt_private->flags |= KRB5_INIT_CREDS_NO_C_CANON_CHECK; - opt->opt_private->flags |= KRB5_INIT_CREDS_NO_C_NO_EKU_CHECK; - } else { - opt->opt_private->flags &= ~KRB5_INIT_CREDS_NO_C_CANON_CHECK; - opt->opt_private->flags &= ~KRB5_INIT_CREDS_NO_C_NO_EKU_CHECK; - } - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_process_last_req(krb5_context context, - krb5_get_init_creds_opt *opt, - krb5_gic_process_last_req func, - void *ctx) -{ - krb5_error_code ret; - ret = require_ext_opt(context, opt, "init_creds_opt_set_win2k"); - if (ret) - return ret; - - opt->opt_private->lr.func = func; - opt->opt_private->lr.ctx = ctx; - - return 0; -} - - -#ifndef HEIMDAL_SMALLER - -/** - * Deprecated: use krb5_get_init_creds_opt_alloc(). - * - * The reason krb5_get_init_creds_opt_init() is deprecated is that - * krb5_get_init_creds_opt is a static structure and for ABI reason it - * can't grow, ie can't add new functionality. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - memset (opt, 0, sizeof(*opt)); -} - -/** - * Deprecated: use the new krb5_init_creds_init() and - * krb5_init_creds_get_error(). - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_get_error(krb5_context context, - krb5_get_init_creds_opt *opt, - KRB_ERROR **error) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - *error = calloc(1, sizeof(**error)); - if (*error == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - return 0; -} - -#endif /* HEIMDAL_SMALLER */ diff --git a/kerberosV/src/lib/krb5/init_creds_pw.c b/kerberosV/src/lib/krb5/init_creds_pw.c deleted file mode 100644 index 37f4147c372..00000000000 --- a/kerberosV/src/lib/krb5/init_creds_pw.c +++ /dev/null @@ -1,2150 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" - -typedef struct krb5_get_init_creds_ctx { - KDCOptions flags; - krb5_creds cred; - krb5_addresses *addrs; - krb5_enctype *etypes; - krb5_preauthtype *pre_auth_types; - char *in_tkt_service; - unsigned nonce; - unsigned pk_nonce; - - krb5_data req_buffer; - AS_REQ as_req; - int pa_counter; - - /* password and keytab_data is freed on completion */ - char *password; - krb5_keytab_key_proc_args *keytab_data; - - krb5_pointer *keyseed; - krb5_s2k_proc keyproc; - - krb5_get_init_creds_tristate req_pac; - - krb5_pk_init_ctx pk_init_ctx; - int ic_flags; - - int used_pa_types; -#define USED_PKINIT 1 -#define USED_PKINIT_W2K 2 -#define USED_ENC_TS_GUESS 4 -#define USED_ENC_TS_INFO 8 - - METHOD_DATA md; - KRB_ERROR error; - AS_REP as_rep; - EncKDCRepPart enc_part; - - krb5_prompter_fct prompter; - void *prompter_data; - - struct pa_info_data *ppaid; - -} krb5_get_init_creds_ctx; - - -struct pa_info_data { - krb5_enctype etype; - krb5_salt salt; - krb5_data *s2kparams; -}; - -static void -free_paid(krb5_context context, struct pa_info_data *ppaid) -{ - krb5_free_salt(context, ppaid->salt); - if (ppaid->s2kparams) - krb5_free_data(context, ppaid->s2kparams); -} - -static krb5_error_code KRB5_CALLCONV -default_s2k_func(krb5_context context, krb5_enctype type, - krb5_const_pointer keyseed, - krb5_salt salt, krb5_data *s2kparms, - krb5_keyblock **key) -{ - krb5_error_code ret; - krb5_data password; - krb5_data opaque; - - _krb5_debug(context, 5, "krb5_get_init_creds: using default_s2k_func"); - - password.data = rk_UNCONST(keyseed); - password.length = strlen(keyseed); - if (s2kparms) - opaque = *s2kparms; - else - krb5_data_zero(&opaque); - - *key = malloc(sizeof(**key)); - if (*key == NULL) - return ENOMEM; - ret = krb5_string_to_key_data_salt_opaque(context, type, password, - salt, opaque, *key); - if (ret) { - free(*key); - *key = NULL; - } - return ret; -} - -static void -free_init_creds_ctx(krb5_context context, krb5_init_creds_context ctx) -{ - if (ctx->etypes) - free(ctx->etypes); - if (ctx->pre_auth_types) - free (ctx->pre_auth_types); - if (ctx->in_tkt_service) - free(ctx->in_tkt_service); - if (ctx->keytab_data) - free(ctx->keytab_data); - if (ctx->password) { - memset(ctx->password, 0, strlen(ctx->password)); - free(ctx->password); - } - krb5_data_free(&ctx->req_buffer); - krb5_free_cred_contents(context, &ctx->cred); - free_METHOD_DATA(&ctx->md); - free_AS_REP(&ctx->as_rep); - free_EncKDCRepPart(&ctx->enc_part); - free_KRB_ERROR(&ctx->error); - free_AS_REQ(&ctx->as_req); - if (ctx->ppaid) { - free_paid(context, ctx->ppaid); - free(ctx->ppaid); - } - memset(ctx, 0, sizeof(*ctx)); -} - -static int -get_config_time (krb5_context context, - const char *realm, - const char *name, - int def) -{ - int ret; - - ret = krb5_config_get_time (context, NULL, - "realms", - realm, - name, - NULL); - if (ret >= 0) - return ret; - ret = krb5_config_get_time (context, NULL, - "libdefaults", - name, - NULL); - if (ret >= 0) - return ret; - return def; -} - -static krb5_error_code -init_cred (krb5_context context, - krb5_creds *cred, - krb5_principal client, - krb5_deltat start_time, - krb5_get_init_creds_opt *options) -{ - krb5_error_code ret; - int tmp; - krb5_timestamp now; - - krb5_timeofday (context, &now); - - memset (cred, 0, sizeof(*cred)); - - if (client) - krb5_copy_principal(context, client, &cred->client); - else { - ret = krb5_get_default_principal (context, - &cred->client); - if (ret) - goto out; - } - - if (start_time) - cred->times.starttime = now + start_time; - - if (options->flags & KRB5_GET_INIT_CREDS_OPT_TKT_LIFE) - tmp = options->tkt_life; - else - tmp = 10 * 60 * 60; - cred->times.endtime = now + tmp; - - if ((options->flags & KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE) && - options->renew_life > 0) { - cred->times.renew_till = now + options->renew_life; - } - - return 0; - -out: - krb5_free_cred_contents (context, cred); - return ret; -} - -/* - * Print a message (str) to the user about the expiration in `lr' - */ - -static void -report_expiration (krb5_context context, - krb5_prompter_fct prompter, - krb5_data *data, - const char *str, - time_t now) -{ - char *p = NULL; - - if (asprintf(&p, "%s%s", str, ctime(&now)) < 0 || p == NULL) - return; - (*prompter)(context, data, NULL, p, 0, NULL); - free(p); -} - -/* - * Check the context, and in the case there is a expiration warning, - * use the prompter to print the warning. - * - * @param context A Kerberos 5 context. - * @param options An GIC options structure - * @param ctx The krb5_init_creds_context check for expiration. - */ - -static krb5_error_code -process_last_request(krb5_context context, - krb5_get_init_creds_opt *options, - krb5_init_creds_context ctx) -{ - krb5_const_realm realm; - LastReq *lr; - krb5_boolean reported = FALSE; - krb5_timestamp sec; - time_t t; - size_t i; - - /* - * First check if there is a API consumer. - */ - - realm = krb5_principal_get_realm (context, ctx->cred.client); - lr = &ctx->enc_part.last_req; - - if (options && options->opt_private && options->opt_private->lr.func) { - krb5_last_req_entry **lre; - - lre = calloc(lr->len + 1, sizeof(**lre)); - if (lre == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - for (i = 0; i < lr->len; i++) { - lre[i] = calloc(1, sizeof(*lre[i])); - if (lre[i] == NULL) - break; - lre[i]->lr_type = lr->val[i].lr_type; - lre[i]->value = lr->val[i].lr_value; - } - - (*options->opt_private->lr.func)(context, lre, - options->opt_private->lr.ctx); - - for (i = 0; i < lr->len; i++) - free(lre[i]); - free(lre); - } - - /* - * Now check if we should prompt the user - */ - - if (ctx->prompter == NULL) - return 0; - - krb5_timeofday (context, &sec); - - t = sec + get_config_time (context, - realm, - "warn_pwexpire", - 7 * 24 * 60 * 60); - - for (i = 0; i < lr->len; ++i) { - if (lr->val[i].lr_value <= t) { - switch (abs(lr->val[i].lr_type)) { - case LR_PW_EXPTIME : - report_expiration(context, ctx->prompter, - ctx->prompter_data, - "Your password will expire at ", - lr->val[i].lr_value); - reported = TRUE; - break; - case LR_ACCT_EXPTIME : - report_expiration(context, ctx->prompter, - ctx->prompter_data, - "Your account will expire at ", - lr->val[i].lr_value); - reported = TRUE; - break; - } - } - } - - if (!reported - && ctx->enc_part.key_expiration - && *ctx->enc_part.key_expiration <= t) { - report_expiration(context, ctx->prompter, - ctx->prompter_data, - "Your password/account will expire at ", - *ctx->enc_part.key_expiration); - } - return 0; -} - -static krb5_addresses no_addrs = { 0, NULL }; - -static krb5_error_code -get_init_creds_common(krb5_context context, - krb5_principal client, - krb5_deltat start_time, - krb5_get_init_creds_opt *options, - krb5_init_creds_context ctx) -{ - krb5_get_init_creds_opt *default_opt = NULL; - krb5_error_code ret; - krb5_enctype *etypes; - krb5_preauthtype *pre_auth_types; - - memset(ctx, 0, sizeof(*ctx)); - - if (options == NULL) { - const char *realm = krb5_principal_get_realm(context, client); - - krb5_get_init_creds_opt_alloc (context, &default_opt); - options = default_opt; - krb5_get_init_creds_opt_set_default_flags(context, NULL, realm, options); - } - - if (options->opt_private) { - if (options->opt_private->password) { - ret = krb5_init_creds_set_password(context, ctx, - options->opt_private->password); - if (ret) - goto out; - } - - ctx->keyproc = options->opt_private->key_proc; - ctx->req_pac = options->opt_private->req_pac; - ctx->pk_init_ctx = options->opt_private->pk_init_ctx; - ctx->ic_flags = options->opt_private->flags; - } else - ctx->req_pac = KRB5_INIT_CREDS_TRISTATE_UNSET; - - if (ctx->keyproc == NULL) - ctx->keyproc = default_s2k_func; - - /* Enterprise name implicitly turns on canonicalize */ - if ((ctx->ic_flags & KRB5_INIT_CREDS_CANONICALIZE) || - krb5_principal_get_type(context, client) == KRB5_NT_ENTERPRISE_PRINCIPAL) - ctx->flags.canonicalize = 1; - - ctx->pre_auth_types = NULL; - ctx->addrs = NULL; - ctx->etypes = NULL; - ctx->pre_auth_types = NULL; - - ret = init_cred(context, &ctx->cred, client, start_time, options); - if (ret) { - if (default_opt) - krb5_get_init_creds_opt_free(context, default_opt); - return ret; - } - - ret = krb5_init_creds_set_service(context, ctx, NULL); - if (ret) - goto out; - - if (options->flags & KRB5_GET_INIT_CREDS_OPT_FORWARDABLE) - ctx->flags.forwardable = options->forwardable; - - if (options->flags & KRB5_GET_INIT_CREDS_OPT_PROXIABLE) - ctx->flags.proxiable = options->proxiable; - - if (start_time) - ctx->flags.postdated = 1; - if (ctx->cred.times.renew_till) - ctx->flags.renewable = 1; - if (options->flags & KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST) { - ctx->addrs = options->address_list; - } else if (options->opt_private) { - switch (options->opt_private->addressless) { - case KRB5_INIT_CREDS_TRISTATE_UNSET: -#if KRB5_ADDRESSLESS_DEFAULT == TRUE - ctx->addrs = &no_addrs; -#else - ctx->addrs = NULL; -#endif - break; - case KRB5_INIT_CREDS_TRISTATE_FALSE: - ctx->addrs = NULL; - break; - case KRB5_INIT_CREDS_TRISTATE_TRUE: - ctx->addrs = &no_addrs; - break; - } - } - if (options->flags & KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST) { - if (ctx->etypes) - free(ctx->etypes); - - etypes = malloc((options->etype_list_length + 1) - * sizeof(krb5_enctype)); - if (etypes == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - memcpy (etypes, options->etype_list, - options->etype_list_length * sizeof(krb5_enctype)); - etypes[options->etype_list_length] = ETYPE_NULL; - ctx->etypes = etypes; - } - if (options->flags & KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST) { - pre_auth_types = malloc((options->preauth_list_length + 1) - * sizeof(krb5_preauthtype)); - if (pre_auth_types == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - memcpy (pre_auth_types, options->preauth_list, - options->preauth_list_length * sizeof(krb5_preauthtype)); - pre_auth_types[options->preauth_list_length] = KRB5_PADATA_NONE; - ctx->pre_auth_types = pre_auth_types; - } - if (options->flags & KRB5_GET_INIT_CREDS_OPT_ANONYMOUS) - ctx->flags.request_anonymous = options->anonymous; - if (default_opt) - krb5_get_init_creds_opt_free(context, default_opt); - return 0; - out: - if (default_opt) - krb5_get_init_creds_opt_free(context, default_opt); - return ret; -} - -static krb5_error_code -change_password (krb5_context context, - krb5_principal client, - const char *password, - char *newpw, - size_t newpw_sz, - krb5_prompter_fct prompter, - void *data, - krb5_get_init_creds_opt *old_options) -{ - krb5_prompt prompts[2]; - krb5_error_code ret; - krb5_creds cpw_cred; - char buf1[BUFSIZ], buf2[BUFSIZ]; - krb5_data password_data[2]; - int result_code; - krb5_data result_code_string; - krb5_data result_string; - char *p; - krb5_get_init_creds_opt *options; - - memset (&cpw_cred, 0, sizeof(cpw_cred)); - - ret = krb5_get_init_creds_opt_alloc(context, &options); - if (ret) - return ret; - krb5_get_init_creds_opt_set_tkt_life (options, 60); - krb5_get_init_creds_opt_set_forwardable (options, FALSE); - krb5_get_init_creds_opt_set_proxiable (options, FALSE); - if (old_options && old_options->flags & KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST) - krb5_get_init_creds_opt_set_preauth_list (options, - old_options->preauth_list, - old_options->preauth_list_length); - - krb5_data_zero (&result_code_string); - krb5_data_zero (&result_string); - - ret = krb5_get_init_creds_password (context, - &cpw_cred, - client, - password, - prompter, - data, - 0, - "kadmin/changepw", - options); - krb5_get_init_creds_opt_free(context, options); - if (ret) - goto out; - - for(;;) { - password_data[0].data = buf1; - password_data[0].length = sizeof(buf1); - - prompts[0].hidden = 1; - prompts[0].prompt = "New password: "; - prompts[0].reply = &password_data[0]; - prompts[0].type = KRB5_PROMPT_TYPE_NEW_PASSWORD; - - password_data[1].data = buf2; - password_data[1].length = sizeof(buf2); - - prompts[1].hidden = 1; - prompts[1].prompt = "Repeat new password: "; - prompts[1].reply = &password_data[1]; - prompts[1].type = KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN; - - ret = (*prompter) (context, data, NULL, "Changing password", - 2, prompts); - if (ret) { - memset (buf1, 0, sizeof(buf1)); - memset (buf2, 0, sizeof(buf2)); - goto out; - } - - if (strcmp (buf1, buf2) == 0) - break; - memset (buf1, 0, sizeof(buf1)); - memset (buf2, 0, sizeof(buf2)); - } - - ret = krb5_set_password (context, - &cpw_cred, - buf1, - client, - &result_code, - &result_code_string, - &result_string); - if (ret) - goto out; - if (asprintf(&p, "%s: %.*s\n", - result_code ? "Error" : "Success", - (int)result_string.length, - result_string.length > 0 ? (char*)result_string.data : "") < 0) - { - ret = ENOMEM; - goto out; - } - - /* return the result */ - (*prompter) (context, data, NULL, p, 0, NULL); - - free (p); - if (result_code == 0) { - strlcpy (newpw, buf1, newpw_sz); - ret = 0; - } else { - ret = ENOTTY; - krb5_set_error_message(context, ret, - N_("failed changing password", "")); - } - -out: - memset (buf1, 0, sizeof(buf1)); - memset (buf2, 0, sizeof(buf2)); - krb5_data_free (&result_string); - krb5_data_free (&result_code_string); - krb5_free_cred_contents (context, &cpw_cred); - return ret; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_keyblock_key_proc (krb5_context context, - krb5_keytype type, - krb5_data *salt, - krb5_const_pointer keyseed, - krb5_keyblock **key) -{ - return krb5_copy_keyblock (context, keyseed, key); -} - -/* - * - */ - -static krb5_error_code -init_as_req (krb5_context context, - KDCOptions opts, - const krb5_creds *creds, - const krb5_addresses *addrs, - const krb5_enctype *etypes, - AS_REQ *a) -{ - krb5_error_code ret; - - memset(a, 0, sizeof(*a)); - - a->pvno = 5; - a->msg_type = krb_as_req; - a->req_body.kdc_options = opts; - a->req_body.cname = malloc(sizeof(*a->req_body.cname)); - if (a->req_body.cname == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - a->req_body.sname = malloc(sizeof(*a->req_body.sname)); - if (a->req_body.sname == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - - ret = _krb5_principal2principalname (a->req_body.cname, creds->client); - if (ret) - goto fail; - ret = copy_Realm(&creds->client->realm, &a->req_body.realm); - if (ret) - goto fail; - - ret = _krb5_principal2principalname (a->req_body.sname, creds->server); - if (ret) - goto fail; - - if(creds->times.starttime) { - a->req_body.from = malloc(sizeof(*a->req_body.from)); - if (a->req_body.from == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - *a->req_body.from = creds->times.starttime; - } - if(creds->times.endtime){ - ALLOC(a->req_body.till, 1); - *a->req_body.till = creds->times.endtime; - } - if(creds->times.renew_till){ - a->req_body.rtime = malloc(sizeof(*a->req_body.rtime)); - if (a->req_body.rtime == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - *a->req_body.rtime = creds->times.renew_till; - } - a->req_body.nonce = 0; - ret = _krb5_init_etype(context, - KRB5_PDU_AS_REQUEST, - &a->req_body.etype.len, - &a->req_body.etype.val, - etypes); - if (ret) - goto fail; - - /* - * This means no addresses - */ - - if (addrs && addrs->len == 0) { - a->req_body.addresses = NULL; - } else { - a->req_body.addresses = malloc(sizeof(*a->req_body.addresses)); - if (a->req_body.addresses == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - - if (addrs) - ret = krb5_copy_addresses(context, addrs, a->req_body.addresses); - else { - ret = krb5_get_all_client_addrs (context, a->req_body.addresses); - if(ret == 0 && a->req_body.addresses->len == 0) { - free(a->req_body.addresses); - a->req_body.addresses = NULL; - } - } - if (ret) - goto fail; - } - - a->req_body.enc_authorization_data = NULL; - a->req_body.additional_tickets = NULL; - - a->padata = NULL; - - return 0; - fail: - free_AS_REQ(a); - memset(a, 0, sizeof(*a)); - return ret; -} - - -static krb5_error_code -set_paid(struct pa_info_data *paid, krb5_context context, - krb5_enctype etype, - krb5_salttype salttype, void *salt_string, size_t salt_len, - krb5_data *s2kparams) -{ - paid->etype = etype; - paid->salt.salttype = salttype; - paid->salt.saltvalue.data = malloc(salt_len + 1); - if (paid->salt.saltvalue.data == NULL) { - krb5_clear_error_message(context); - return ENOMEM; - } - memcpy(paid->salt.saltvalue.data, salt_string, salt_len); - ((char *)paid->salt.saltvalue.data)[salt_len] = '\0'; - paid->salt.saltvalue.length = salt_len; - if (s2kparams) { - krb5_error_code ret; - - ret = krb5_copy_data(context, s2kparams, &paid->s2kparams); - if (ret) { - krb5_clear_error_message(context); - krb5_free_salt(context, paid->salt); - return ret; - } - } else - paid->s2kparams = NULL; - - return 0; -} - -static struct pa_info_data * -pa_etype_info2(krb5_context context, - const krb5_principal client, - const AS_REQ *asreq, - struct pa_info_data *paid, - heim_octet_string *data) -{ - krb5_error_code ret; - ETYPE_INFO2 e; - size_t sz; - size_t i, j; - - memset(&e, 0, sizeof(e)); - ret = decode_ETYPE_INFO2(data->data, data->length, &e, &sz); - if (ret) - goto out; - if (e.len == 0) - goto out; - for (j = 0; j < asreq->req_body.etype.len; j++) { - for (i = 0; i < e.len; i++) { - if (asreq->req_body.etype.val[j] == e.val[i].etype) { - krb5_salt salt; - if (e.val[i].salt == NULL) - ret = krb5_get_pw_salt(context, client, &salt); - else { - salt.saltvalue.data = *e.val[i].salt; - salt.saltvalue.length = strlen(*e.val[i].salt); - ret = 0; - } - if (ret == 0) - ret = set_paid(paid, context, e.val[i].etype, - KRB5_PW_SALT, - salt.saltvalue.data, - salt.saltvalue.length, - e.val[i].s2kparams); - if (e.val[i].salt == NULL) - krb5_free_salt(context, salt); - if (ret == 0) { - free_ETYPE_INFO2(&e); - return paid; - } - } - } - } - out: - free_ETYPE_INFO2(&e); - return NULL; -} - -static struct pa_info_data * -pa_etype_info(krb5_context context, - const krb5_principal client, - const AS_REQ *asreq, - struct pa_info_data *paid, - heim_octet_string *data) -{ - krb5_error_code ret; - ETYPE_INFO e; - size_t sz; - size_t i, j; - - memset(&e, 0, sizeof(e)); - ret = decode_ETYPE_INFO(data->data, data->length, &e, &sz); - if (ret) - goto out; - if (e.len == 0) - goto out; - for (j = 0; j < asreq->req_body.etype.len; j++) { - for (i = 0; i < e.len; i++) { - if (asreq->req_body.etype.val[j] == e.val[i].etype) { - krb5_salt salt; - salt.salttype = KRB5_PW_SALT; - if (e.val[i].salt == NULL) - ret = krb5_get_pw_salt(context, client, &salt); - else { - salt.saltvalue = *e.val[i].salt; - ret = 0; - } - if (e.val[i].salttype) - salt.salttype = *e.val[i].salttype; - if (ret == 0) { - ret = set_paid(paid, context, e.val[i].etype, - salt.salttype, - salt.saltvalue.data, - salt.saltvalue.length, - NULL); - if (e.val[i].salt == NULL) - krb5_free_salt(context, salt); - } - if (ret == 0) { - free_ETYPE_INFO(&e); - return paid; - } - } - } - } - out: - free_ETYPE_INFO(&e); - return NULL; -} - -static struct pa_info_data * -pa_pw_or_afs3_salt(krb5_context context, - const krb5_principal client, - const AS_REQ *asreq, - struct pa_info_data *paid, - heim_octet_string *data) -{ - krb5_error_code ret; - if (paid->etype == ENCTYPE_NULL) - return NULL; - ret = set_paid(paid, context, - paid->etype, - paid->salt.salttype, - data->data, - data->length, - NULL); - if (ret) - return NULL; - return paid; -} - - -struct pa_info { - krb5_preauthtype type; - struct pa_info_data *(*salt_info)(krb5_context, - const krb5_principal, - const AS_REQ *, - struct pa_info_data *, - heim_octet_string *); -}; - -static struct pa_info pa_prefs[] = { - { KRB5_PADATA_ETYPE_INFO2, pa_etype_info2 }, - { KRB5_PADATA_ETYPE_INFO, pa_etype_info }, - { KRB5_PADATA_PW_SALT, pa_pw_or_afs3_salt }, - { KRB5_PADATA_AFS3_SALT, pa_pw_or_afs3_salt } -}; - -static PA_DATA * -find_pa_data(const METHOD_DATA *md, unsigned type) -{ - size_t i; - if (md == NULL) - return NULL; - for (i = 0; i < md->len; i++) - if (md->val[i].padata_type == type) - return &md->val[i]; - return NULL; -} - -static struct pa_info_data * -process_pa_info(krb5_context context, - const krb5_principal client, - const AS_REQ *asreq, - struct pa_info_data *paid, - METHOD_DATA *md) -{ - struct pa_info_data *p = NULL; - size_t i; - - for (i = 0; p == NULL && i < sizeof(pa_prefs)/sizeof(pa_prefs[0]); i++) { - PA_DATA *pa = find_pa_data(md, pa_prefs[i].type); - if (pa == NULL) - continue; - paid->salt.salttype = (krb5_salttype)pa_prefs[i].type; - p = (*pa_prefs[i].salt_info)(context, client, asreq, - paid, &pa->padata_value); - } - return p; -} - -static krb5_error_code -make_pa_enc_timestamp(krb5_context context, METHOD_DATA *md, - krb5_enctype etype, krb5_keyblock *key) -{ - PA_ENC_TS_ENC p; - unsigned char *buf; - size_t buf_size; - size_t len = 0; - EncryptedData encdata; - krb5_error_code ret; - int32_t usec; - int usec2; - krb5_crypto crypto; - - krb5_us_timeofday (context, &p.patimestamp, &usec); - usec2 = usec; - p.pausec = &usec2; - - ASN1_MALLOC_ENCODE(PA_ENC_TS_ENC, buf, buf_size, &p, &len, ret); - if (ret) - return ret; - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) { - free(buf); - return ret; - } - ret = krb5_encrypt_EncryptedData(context, - crypto, - KRB5_KU_PA_ENC_TIMESTAMP, - buf, - len, - 0, - &encdata); - free(buf); - krb5_crypto_destroy(context, crypto); - if (ret) - return ret; - - ASN1_MALLOC_ENCODE(EncryptedData, buf, buf_size, &encdata, &len, ret); - free_EncryptedData(&encdata); - if (ret) - return ret; - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - ret = krb5_padata_add(context, md, KRB5_PADATA_ENC_TIMESTAMP, buf, len); - if (ret) - free(buf); - return ret; -} - -static krb5_error_code -add_enc_ts_padata(krb5_context context, - METHOD_DATA *md, - krb5_principal client, - krb5_s2k_proc keyproc, - krb5_const_pointer keyseed, - krb5_enctype *enctypes, - unsigned netypes, - krb5_salt *salt, - krb5_data *s2kparams) -{ - krb5_error_code ret; - krb5_salt salt2; - krb5_enctype *ep; - size_t i; - - if(salt == NULL) { - /* default to standard salt */ - ret = krb5_get_pw_salt (context, client, &salt2); - if (ret) - return ret; - salt = &salt2; - } - if (!enctypes) { - enctypes = context->etypes; - netypes = 0; - for (ep = enctypes; *ep != ETYPE_NULL; ep++) - netypes++; - } - - for (i = 0; i < netypes; ++i) { - krb5_keyblock *key; - - _krb5_debug(context, 5, "krb5_get_init_creds: using ENC-TS with enctype %d", enctypes[i]); - - ret = (*keyproc)(context, enctypes[i], keyseed, - *salt, s2kparams, &key); - if (ret) - continue; - ret = make_pa_enc_timestamp (context, md, enctypes[i], key); - krb5_free_keyblock (context, key); - if (ret) - return ret; - } - if(salt == &salt2) - krb5_free_salt(context, salt2); - return 0; -} - -static krb5_error_code -pa_data_to_md_ts_enc(krb5_context context, - const AS_REQ *a, - const krb5_principal client, - krb5_get_init_creds_ctx *ctx, - struct pa_info_data *ppaid, - METHOD_DATA *md) -{ - if (ctx->keyproc == NULL || ctx->keyseed == NULL) - return 0; - - if (ppaid) { - add_enc_ts_padata(context, md, client, - ctx->keyproc, ctx->keyseed, - &ppaid->etype, 1, - &ppaid->salt, ppaid->s2kparams); - } else { - krb5_salt salt; - - _krb5_debug(context, 5, "krb5_get_init_creds: pa-info not found, guessing salt"); - - /* make a v5 salted pa-data */ - add_enc_ts_padata(context, md, client, - ctx->keyproc, ctx->keyseed, - a->req_body.etype.val, a->req_body.etype.len, - NULL, NULL); - - /* make a v4 salted pa-data */ - salt.salttype = KRB5_PW_SALT; - krb5_data_zero(&salt.saltvalue); - add_enc_ts_padata(context, md, client, - ctx->keyproc, ctx->keyseed, - a->req_body.etype.val, a->req_body.etype.len, - &salt, NULL); - } - return 0; -} - -static krb5_error_code -pa_data_to_key_plain(krb5_context context, - const krb5_principal client, - krb5_get_init_creds_ctx *ctx, - krb5_salt salt, - krb5_data *s2kparams, - krb5_enctype etype, - krb5_keyblock **key) -{ - krb5_error_code ret; - - ret = (*ctx->keyproc)(context, etype, ctx->keyseed, - salt, s2kparams, key); - return ret; -} - - -static krb5_error_code -pa_data_to_md_pkinit(krb5_context context, - const AS_REQ *a, - const krb5_principal client, - int win2k, - krb5_get_init_creds_ctx *ctx, - METHOD_DATA *md) -{ - if (ctx->pk_init_ctx == NULL) - return 0; -#ifdef PKINIT - return _krb5_pk_mk_padata(context, - ctx->pk_init_ctx, - ctx->ic_flags, - win2k, - &a->req_body, - ctx->pk_nonce, - md); -#else - krb5_set_error_message(context, EINVAL, - N_("no support for PKINIT compiled in", "")); - return EINVAL; -#endif -} - -static krb5_error_code -pa_data_add_pac_request(krb5_context context, - krb5_get_init_creds_ctx *ctx, - METHOD_DATA *md) -{ - size_t len = 0, length; - krb5_error_code ret; - PA_PAC_REQUEST req; - void *buf; - - switch (ctx->req_pac) { - case KRB5_INIT_CREDS_TRISTATE_UNSET: - return 0; /* don't bother */ - case KRB5_INIT_CREDS_TRISTATE_TRUE: - req.include_pac = 1; - break; - case KRB5_INIT_CREDS_TRISTATE_FALSE: - req.include_pac = 0; - } - - ASN1_MALLOC_ENCODE(PA_PAC_REQUEST, buf, length, - &req, &len, ret); - if (ret) - return ret; - if(len != length) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - ret = krb5_padata_add(context, md, KRB5_PADATA_PA_PAC_REQUEST, buf, len); - if (ret) - free(buf); - - return 0; -} - -/* - * Assumes caller always will free `out_md', even on error. - */ - -static krb5_error_code -process_pa_data_to_md(krb5_context context, - const krb5_creds *creds, - const AS_REQ *a, - krb5_get_init_creds_ctx *ctx, - METHOD_DATA *in_md, - METHOD_DATA **out_md, - krb5_prompter_fct prompter, - void *prompter_data) -{ - krb5_error_code ret; - - ALLOC(*out_md, 1); - if (*out_md == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - (*out_md)->len = 0; - (*out_md)->val = NULL; - - if (_krb5_have_debug(context, 5)) { - unsigned i; - _krb5_debug(context, 5, "KDC send %d patypes", in_md->len); - for (i = 0; i < in_md->len; i++) - _krb5_debug(context, 5, "KDC send PA-DATA type: %d", in_md->val[i].padata_type); - } - - /* - * Make sure we don't sent both ENC-TS and PK-INIT pa data, no - * need to expose our password protecting our PKCS12 key. - */ - - if (ctx->pk_init_ctx) { - - _krb5_debug(context, 5, "krb5_get_init_creds: " - "prepareing PKINIT padata (%s)", - (ctx->used_pa_types & USED_PKINIT_W2K) ? "win2k" : "ietf"); - - if (ctx->used_pa_types & USED_PKINIT_W2K) { - krb5_set_error_message(context, KRB5_GET_IN_TKT_LOOP, - "Already tried pkinit, looping"); - return KRB5_GET_IN_TKT_LOOP; - } - - ret = pa_data_to_md_pkinit(context, a, creds->client, - (ctx->used_pa_types & USED_PKINIT), - ctx, *out_md); - if (ret) - return ret; - - if (ctx->used_pa_types & USED_PKINIT) - ctx->used_pa_types |= USED_PKINIT_W2K; - else - ctx->used_pa_types |= USED_PKINIT; - - } else if (in_md->len != 0) { - struct pa_info_data *paid, *ppaid; - unsigned flag; - - paid = calloc(1, sizeof(*paid)); - - paid->etype = ENCTYPE_NULL; - ppaid = process_pa_info(context, creds->client, a, paid, in_md); - - if (ppaid) - flag = USED_ENC_TS_INFO; - else - flag = USED_ENC_TS_GUESS; - - if (ctx->used_pa_types & flag) { - if (ppaid) - free_paid(context, ppaid); - krb5_set_error_message(context, KRB5_GET_IN_TKT_LOOP, - "Already tried ENC-TS-%s, looping", - flag == USED_ENC_TS_INFO ? "info" : "guess"); - return KRB5_GET_IN_TKT_LOOP; - } - - pa_data_to_md_ts_enc(context, a, creds->client, ctx, ppaid, *out_md); - - ctx->used_pa_types |= flag; - - if (ppaid) { - if (ctx->ppaid) { - free_paid(context, ctx->ppaid); - free(ctx->ppaid); - } - ctx->ppaid = ppaid; - } else - free(paid); - } - - pa_data_add_pac_request(context, ctx, *out_md); - - if ((*out_md)->len == 0) { - free(*out_md); - *out_md = NULL; - } - - return 0; -} - -static krb5_error_code -process_pa_data_to_key(krb5_context context, - krb5_get_init_creds_ctx *ctx, - krb5_creds *creds, - AS_REQ *a, - AS_REP *rep, - const krb5_krbhst_info *hi, - krb5_keyblock **key) -{ - struct pa_info_data paid, *ppaid = NULL; - krb5_error_code ret; - krb5_enctype etype; - PA_DATA *pa; - - memset(&paid, 0, sizeof(paid)); - - etype = rep->enc_part.etype; - - if (rep->padata) { - paid.etype = etype; - ppaid = process_pa_info(context, creds->client, a, &paid, - rep->padata); - } - if (ppaid == NULL) - ppaid = ctx->ppaid; - if (ppaid == NULL) { - ret = krb5_get_pw_salt (context, creds->client, &paid.salt); - if (ret) - return ret; - paid.etype = etype; - paid.s2kparams = NULL; - ppaid = &paid; - } - - pa = NULL; - if (rep->padata) { - int idx = 0; - pa = krb5_find_padata(rep->padata->val, - rep->padata->len, - KRB5_PADATA_PK_AS_REP, - &idx); - if (pa == NULL) { - idx = 0; - pa = krb5_find_padata(rep->padata->val, - rep->padata->len, - KRB5_PADATA_PK_AS_REP_19, - &idx); - } - } - if (pa && ctx->pk_init_ctx) { -#ifdef PKINIT - _krb5_debug(context, 5, "krb5_get_init_creds: using PKINIT"); - - ret = _krb5_pk_rd_pa_reply(context, - a->req_body.realm, - ctx->pk_init_ctx, - etype, - hi, - ctx->pk_nonce, - &ctx->req_buffer, - pa, - key); -#else - ret = EINVAL; - krb5_set_error_message(context, ret, N_("no support for PKINIT compiled in", "")); -#endif - } else if (ctx->keyseed) { - _krb5_debug(context, 5, "krb5_get_init_creds: using keyproc"); - ret = pa_data_to_key_plain(context, creds->client, ctx, - ppaid->salt, ppaid->s2kparams, etype, key); - } else { - ret = EINVAL; - krb5_set_error_message(context, ret, N_("No usable pa data type", "")); - } - - free_paid(context, &paid); - return ret; -} - -/** - * Start a new context to get a new initial credential. - * - * @param context A Kerberos 5 context. - * @param client The Kerberos principal to get the credential for, if - * NULL is given, the default principal is used as determined by - * krb5_get_default_principal(). - * @param prompter - * @param prompter_data - * @param start_time the time the ticket should start to be valid or 0 for now. - * @param options a options structure, can be NULL for default options. - * @param rctx A new allocated free with krb5_init_creds_free(). - * - * @return 0 for success or an Kerberos 5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_init(krb5_context context, - krb5_principal client, - krb5_prompter_fct prompter, - void *prompter_data, - krb5_deltat start_time, - krb5_get_init_creds_opt *options, - krb5_init_creds_context *rctx) -{ - krb5_init_creds_context ctx; - krb5_error_code ret; - - *rctx = NULL; - - ctx = calloc(1, sizeof(*ctx)); - if (ctx == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = get_init_creds_common(context, client, start_time, options, ctx); - if (ret) { - free(ctx); - return ret; - } - - /* Set a new nonce. */ - krb5_generate_random_block (&ctx->nonce, sizeof(ctx->nonce)); - ctx->nonce &= 0x7fffffff; - /* XXX these just needs to be the same when using Windows PK-INIT */ - ctx->pk_nonce = ctx->nonce; - - ctx->prompter = prompter; - ctx->prompter_data = prompter_data; - - *rctx = ctx; - - return ret; -} - -/** - * Sets the service that the is requested. This call is only neede for - * special initial tickets, by default the a krbtgt is fetched in the default realm. - * - * @param context a Kerberos 5 context. - * @param ctx a krb5_init_creds_context context. - * @param service the service given as a string, for example - * "kadmind/admin". If NULL, the default krbtgt in the clients - * realm is set. - * - * @return 0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_set_service(krb5_context context, - krb5_init_creds_context ctx, - const char *service) -{ - krb5_const_realm client_realm; - krb5_principal principal; - krb5_error_code ret; - - client_realm = krb5_principal_get_realm (context, ctx->cred.client); - - if (service) { - ret = krb5_parse_name (context, service, &principal); - if (ret) - return ret; - krb5_principal_set_realm (context, principal, client_realm); - } else { - ret = krb5_make_principal(context, &principal, - client_realm, KRB5_TGS_NAME, client_realm, - NULL); - if (ret) - return ret; - } - - /* - * This is for Windows RODC that are picky about what name type - * the server principal have, and the really strange part is that - * they are picky about the AS-REQ name type and not the TGS-REQ - * later. Oh well. - */ - - if (krb5_principal_is_krbtgt(context, principal)) - krb5_principal_set_type(context, principal, KRB5_NT_SRV_INST); - - krb5_free_principal(context, ctx->cred.server); - ctx->cred.server = principal; - - return 0; -} - -/** - * Sets the password that will use for the request. - * - * @param context a Kerberos 5 context. - * @param ctx ctx krb5_init_creds_context context. - * @param password the password to use. - * - * @return 0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_set_password(krb5_context context, - krb5_init_creds_context ctx, - const char *password) -{ - if (ctx->password) { - memset(ctx->password, 0, strlen(ctx->password)); - free(ctx->password); - } - if (password) { - ctx->password = strdup(password); - if (ctx->password == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ctx->keyseed = (void *) ctx->password; - } else { - ctx->keyseed = NULL; - ctx->password = NULL; - } - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -keytab_key_proc(krb5_context context, krb5_enctype enctype, - krb5_const_pointer keyseed, - krb5_salt salt, krb5_data *s2kparms, - krb5_keyblock **key) -{ - krb5_keytab_key_proc_args *args = rk_UNCONST(keyseed); - krb5_keytab keytab = args->keytab; - krb5_principal principal = args->principal; - krb5_error_code ret; - krb5_keytab real_keytab; - krb5_keytab_entry entry; - - if(keytab == NULL) - krb5_kt_default(context, &real_keytab); - else - real_keytab = keytab; - - ret = krb5_kt_get_entry (context, real_keytab, principal, - 0, enctype, &entry); - - if (keytab == NULL) - krb5_kt_close (context, real_keytab); - - if (ret) - return ret; - - ret = krb5_copy_keyblock (context, &entry.keyblock, key); - krb5_kt_free_entry(context, &entry); - return ret; -} - - -/** - * Set the keytab to use for authentication. - * - * @param context a Kerberos 5 context. - * @param ctx ctx krb5_init_creds_context context. - * @param keytab the keytab to read the key from. - * - * @return 0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_set_keytab(krb5_context context, - krb5_init_creds_context ctx, - krb5_keytab keytab) -{ - krb5_keytab_key_proc_args *a; - krb5_keytab_entry entry; - krb5_kt_cursor cursor; - krb5_enctype *etypes = NULL; - krb5_error_code ret; - size_t netypes = 0; - int kvno = 0; - - a = malloc(sizeof(*a)); - if (a == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - a->principal = ctx->cred.client; - a->keytab = keytab; - - ctx->keytab_data = a; - ctx->keyseed = (void *)a; - ctx->keyproc = keytab_key_proc; - - /* - * We need to the KDC what enctypes we support for this keytab, - * esp if the keytab is really a password based entry, then the - * KDC might have more enctypes in the database then what we have - * in the keytab. - */ - - ret = krb5_kt_start_seq_get(context, keytab, &cursor); - if(ret) - goto out; - - while(krb5_kt_next_entry(context, keytab, &entry, &cursor) == 0){ - void *ptr; - - if (!krb5_principal_compare(context, entry.principal, ctx->cred.client)) - goto next; - - /* check if we ahve this kvno already */ - if (entry.vno > kvno) { - /* remove old list of etype */ - if (etypes) - free(etypes); - etypes = NULL; - netypes = 0; - kvno = entry.vno; - } else if (entry.vno != kvno) - goto next; - - /* check if enctype is supported */ - if (krb5_enctype_valid(context, entry.keyblock.keytype) != 0) - goto next; - - /* add enctype to supported list */ - ptr = realloc(etypes, sizeof(etypes[0]) * (netypes + 2)); - if (ptr == NULL) - goto next; - - etypes = ptr; - etypes[netypes] = entry.keyblock.keytype; - etypes[netypes + 1] = ETYPE_NULL; - netypes++; - next: - krb5_kt_free_entry(context, &entry); - } - krb5_kt_end_seq_get(context, keytab, &cursor); - - if (etypes) { - if (ctx->etypes) - free(ctx->etypes); - ctx->etypes = etypes; - } - - out: - return 0; -} - -static krb5_error_code KRB5_CALLCONV -keyblock_key_proc(krb5_context context, krb5_enctype enctype, - krb5_const_pointer keyseed, - krb5_salt salt, krb5_data *s2kparms, - krb5_keyblock **key) -{ - return krb5_copy_keyblock (context, keyseed, key); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_set_keyblock(krb5_context context, - krb5_init_creds_context ctx, - krb5_keyblock *keyblock) -{ - ctx->keyseed = (void *)keyblock; - ctx->keyproc = keyblock_key_proc; - - return 0; -} - -/** - * The core loop if krb5_get_init_creds() function family. Create the - * packets and have the caller send them off to the KDC. - * - * If the caller want all work been done for them, use - * krb5_init_creds_get() instead. - * - * @param context a Kerberos 5 context. - * @param ctx ctx krb5_init_creds_context context. - * @param in input data from KDC, first round it should be reset by krb5_data_zer(). - * @param out reply to KDC. - * @param hostinfo KDC address info, first round it can be NULL. - * @param flags status of the round, if - * KRB5_INIT_CREDS_STEP_FLAG_CONTINUE is set, continue one more round. - * - * @return 0 for success, or an Kerberos 5 error code, see - * krb5_get_error_message(). - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_step(krb5_context context, - krb5_init_creds_context ctx, - krb5_data *in, - krb5_data *out, - krb5_krbhst_info *hostinfo, - unsigned int *flags) -{ - krb5_error_code ret; - size_t len = 0; - size_t size; - - krb5_data_zero(out); - - if (ctx->as_req.req_body.cname == NULL) { - ret = init_as_req(context, ctx->flags, &ctx->cred, - ctx->addrs, ctx->etypes, &ctx->as_req); - if (ret) { - free_init_creds_ctx(context, ctx); - return ret; - } - } - -#define MAX_PA_COUNTER 10 - if (ctx->pa_counter > MAX_PA_COUNTER) { - krb5_set_error_message(context, KRB5_GET_IN_TKT_LOOP, - N_("Looping %d times while getting " - "initial credentials", ""), - ctx->pa_counter); - return KRB5_GET_IN_TKT_LOOP; - } - ctx->pa_counter++; - - _krb5_debug(context, 5, "krb5_get_init_creds: loop %d", ctx->pa_counter); - - /* Lets process the input packet */ - if (in && in->length) { - krb5_kdc_rep rep; - - memset(&rep, 0, sizeof(rep)); - - _krb5_debug(context, 5, "krb5_get_init_creds: processing input"); - - ret = decode_AS_REP(in->data, in->length, &rep.kdc_rep, &size); - if (ret == 0) { - krb5_keyblock *key = NULL; - unsigned eflags = EXTRACT_TICKET_AS_REQ | EXTRACT_TICKET_TIMESYNC; - - if (ctx->flags.canonicalize) { - eflags |= EXTRACT_TICKET_ALLOW_SERVER_MISMATCH; - eflags |= EXTRACT_TICKET_MATCH_REALM; - } - if (ctx->ic_flags & KRB5_INIT_CREDS_NO_C_CANON_CHECK) - eflags |= EXTRACT_TICKET_ALLOW_CNAME_MISMATCH; - - ret = process_pa_data_to_key(context, ctx, &ctx->cred, - &ctx->as_req, &rep.kdc_rep, hostinfo, &key); - if (ret) { - free_AS_REP(&rep.kdc_rep); - goto out; - } - - _krb5_debug(context, 5, "krb5_get_init_creds: extracting ticket"); - - ret = _krb5_extract_ticket(context, - &rep, - &ctx->cred, - key, - NULL, - KRB5_KU_AS_REP_ENC_PART, - NULL, - ctx->nonce, - eflags, - NULL, - NULL); - krb5_free_keyblock(context, key); - - *flags = 0; - - if (ret == 0) - ret = copy_EncKDCRepPart(&rep.enc_part, &ctx->enc_part); - - free_AS_REP(&rep.kdc_rep); - free_EncASRepPart(&rep.enc_part); - - return ret; - - } else { - /* let's try to parse it as a KRB-ERROR */ - - _krb5_debug(context, 5, "krb5_get_init_creds: got an error"); - - free_KRB_ERROR(&ctx->error); - - ret = krb5_rd_error(context, in, &ctx->error); - if(ret && in->length && ((char*)in->data)[0] == 4) - ret = KRB5KRB_AP_ERR_V4_REPLY; - if (ret) { - _krb5_debug(context, 5, "krb5_get_init_creds: failed to read error"); - goto out; - } - - ret = krb5_error_from_rd_error(context, &ctx->error, &ctx->cred); - - _krb5_debug(context, 5, "krb5_get_init_creds: KRB-ERROR %d", ret); - - /* - * If no preauth was set and KDC requires it, give it one - * more try. - */ - - if (ret == KRB5KDC_ERR_PREAUTH_REQUIRED) { - - free_METHOD_DATA(&ctx->md); - memset(&ctx->md, 0, sizeof(ctx->md)); - - if (ctx->error.e_data) { - ret = decode_METHOD_DATA(ctx->error.e_data->data, - ctx->error.e_data->length, - &ctx->md, - NULL); - if (ret) - krb5_set_error_message(context, ret, - N_("Failed to decode METHOD-DATA", "")); - } else { - krb5_set_error_message(context, ret, - N_("Preauth required but no preauth " - "options send by KDC", "")); - } - } else if (ret == KRB5KRB_AP_ERR_SKEW && context->kdc_sec_offset == 0) { - /* - * Try adapt to timeskrew when we are using pre-auth, and - * if there was a time skew, try again. - */ - krb5_set_real_time(context, ctx->error.stime, -1); - if (context->kdc_sec_offset) - ret = 0; - - _krb5_debug(context, 10, "init_creds: err skew updateing kdc offset to %d", - context->kdc_sec_offset); - - ctx->used_pa_types = 0; - - } else if (ret == KRB5_KDC_ERR_WRONG_REALM && ctx->flags.canonicalize) { - /* client referal to a new realm */ - - if (ctx->error.crealm == NULL) { - krb5_set_error_message(context, ret, - N_("Got a client referral, not but no realm", "")); - goto out; - } - _krb5_debug(context, 5, - "krb5_get_init_creds: got referal to realm %s", - *ctx->error.crealm); - - ret = krb5_principal_set_realm(context, - ctx->cred.client, - *ctx->error.crealm); - - ctx->used_pa_types = 0; - } - if (ret) - goto out; - } - } - - if (ctx->as_req.padata) { - free_METHOD_DATA(ctx->as_req.padata); - free(ctx->as_req.padata); - ctx->as_req.padata = NULL; - } - - /* Set a new nonce. */ - ctx->as_req.req_body.nonce = ctx->nonce; - - /* fill_in_md_data */ - ret = process_pa_data_to_md(context, &ctx->cred, &ctx->as_req, ctx, - &ctx->md, &ctx->as_req.padata, - ctx->prompter, ctx->prompter_data); - if (ret) - goto out; - - krb5_data_free(&ctx->req_buffer); - - ASN1_MALLOC_ENCODE(AS_REQ, - ctx->req_buffer.data, ctx->req_buffer.length, - &ctx->as_req, &len, ret); - if (ret) - goto out; - if(len != ctx->req_buffer.length) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - out->data = ctx->req_buffer.data; - out->length = ctx->req_buffer.length; - - *flags = KRB5_INIT_CREDS_STEP_FLAG_CONTINUE; - - return 0; - out: - return ret; -} - -/** - * Extract the newly acquired credentials from krb5_init_creds_context - * context. - * - * @param context A Kerberos 5 context. - * @param ctx - * @param cred credentials, free with krb5_free_cred_contents(). - * - * @return 0 for sucess or An Kerberos error code, see krb5_get_error_message(). - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_get_creds(krb5_context context, - krb5_init_creds_context ctx, - krb5_creds *cred) -{ - return krb5_copy_creds_contents(context, &ctx->cred, cred); -} - -/** - * Get the last error from the transaction. - * - * @return Returns 0 or an error code - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_get_error(krb5_context context, - krb5_init_creds_context ctx, - KRB_ERROR *error) -{ - krb5_error_code ret; - - ret = copy_KRB_ERROR(&ctx->error, error); - if (ret) - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - - return ret; -} - -/** - * Free the krb5_init_creds_context allocated by krb5_init_creds_init(). - * - * @param context A Kerberos 5 context. - * @param ctx The krb5_init_creds_context to free. - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_init_creds_free(krb5_context context, - krb5_init_creds_context ctx) -{ - free_init_creds_ctx(context, ctx); - free(ctx); -} - -/** - * Get new credentials as setup by the krb5_init_creds_context. - * - * @param context A Kerberos 5 context. - * @param ctx The krb5_init_creds_context to process. - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_get(krb5_context context, krb5_init_creds_context ctx) -{ - krb5_sendto_ctx stctx = NULL; - krb5_krbhst_info *hostinfo = NULL; - krb5_error_code ret; - krb5_data in, out; - unsigned int flags = 0; - - krb5_data_zero(&in); - krb5_data_zero(&out); - - ret = krb5_sendto_ctx_alloc(context, &stctx); - if (ret) - goto out; - krb5_sendto_ctx_set_func(stctx, _krb5_kdc_retry, NULL); - - while (1) { - flags = 0; - ret = krb5_init_creds_step(context, ctx, &in, &out, hostinfo, &flags); - krb5_data_free(&in); - if (ret) - goto out; - - if ((flags & 1) == 0) - break; - - ret = krb5_sendto_context (context, stctx, &out, - ctx->cred.client->realm, &in); - if (ret) - goto out; - - } - - out: - if (stctx) - krb5_sendto_ctx_free(context, stctx); - - return ret; -} - -/** - * Get new credentials using password. - * - * @ingroup krb5_credential - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_password(krb5_context context, - krb5_creds *creds, - krb5_principal client, - const char *password, - krb5_prompter_fct prompter, - void *data, - krb5_deltat start_time, - const char *in_tkt_service, - krb5_get_init_creds_opt *options) -{ - krb5_init_creds_context ctx; - char buf[BUFSIZ]; - krb5_error_code ret; - int chpw = 0; - - again: - ret = krb5_init_creds_init(context, client, prompter, data, start_time, options, &ctx); - if (ret) - goto out; - - ret = krb5_init_creds_set_service(context, ctx, in_tkt_service); - if (ret) - goto out; - - if (prompter != NULL && ctx->password == NULL && password == NULL) { - krb5_prompt prompt; - krb5_data password_data; - char *p, *q; - - krb5_unparse_name (context, client, &p); - asprintf (&q, "%s's Password: ", p); - free (p); - prompt.prompt = q; - password_data.data = buf; - password_data.length = sizeof(buf); - prompt.hidden = 1; - prompt.reply = &password_data; - prompt.type = KRB5_PROMPT_TYPE_PASSWORD; - - ret = (*prompter) (context, data, NULL, NULL, 1, &prompt); - free (q); - if (ret) { - memset (buf, 0, sizeof(buf)); - ret = KRB5_LIBOS_PWDINTR; - krb5_clear_error_message (context); - goto out; - } - password = password_data.data; - } - - if (password) { - ret = krb5_init_creds_set_password(context, ctx, password); - if (ret) - goto out; - } - - ret = krb5_init_creds_get(context, ctx); - - if (ret == 0) - process_last_request(context, options, ctx); - - - if (ret == KRB5KDC_ERR_KEY_EXPIRED && chpw == 0) { - char buf2[1024]; - - /* try to avoid recursion */ - if (in_tkt_service != NULL && strcmp(in_tkt_service, "kadmin/changepw") == 0) - goto out; - - /* don't try to change password where then where none */ - if (prompter == NULL) - goto out; - - ret = change_password (context, - client, - ctx->password, - buf2, - sizeof(buf), - prompter, - data, - options); - if (ret) - goto out; - chpw = 1; - krb5_init_creds_free(context, ctx); - goto again; - } - - out: - if (ret == 0) - krb5_init_creds_get_creds(context, ctx, creds); - - if (ctx) - krb5_init_creds_free(context, ctx); - - memset(buf, 0, sizeof(buf)); - return ret; -} - -/** - * Get new credentials using keyblock. - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_keyblock(krb5_context context, - krb5_creds *creds, - krb5_principal client, - krb5_keyblock *keyblock, - krb5_deltat start_time, - const char *in_tkt_service, - krb5_get_init_creds_opt *options) -{ - krb5_init_creds_context ctx; - krb5_error_code ret; - - memset(creds, 0, sizeof(*creds)); - - ret = krb5_init_creds_init(context, client, NULL, NULL, start_time, options, &ctx); - if (ret) - goto out; - - ret = krb5_init_creds_set_service(context, ctx, in_tkt_service); - if (ret) - goto out; - - ret = krb5_init_creds_set_keyblock(context, ctx, keyblock); - if (ret) - goto out; - - ret = krb5_init_creds_get(context, ctx); - - if (ret == 0) - process_last_request(context, options, ctx); - - out: - if (ret == 0) - krb5_init_creds_get_creds(context, ctx, creds); - - if (ctx) - krb5_init_creds_free(context, ctx); - - return ret; -} - -/** - * Get new credentials using keytab. - * - * @ingroup krb5_credential - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_keytab(krb5_context context, - krb5_creds *creds, - krb5_principal client, - krb5_keytab keytab, - krb5_deltat start_time, - const char *in_tkt_service, - krb5_get_init_creds_opt *options) -{ - krb5_init_creds_context ctx; - krb5_error_code ret; - - memset(creds, 0, sizeof(*creds)); - - ret = krb5_init_creds_init(context, client, NULL, NULL, start_time, options, &ctx); - if (ret) - goto out; - - ret = krb5_init_creds_set_service(context, ctx, in_tkt_service); - if (ret) - goto out; - - ret = krb5_init_creds_set_keytab(context, ctx, keytab); - if (ret) - goto out; - - ret = krb5_init_creds_get(context, ctx); - if (ret == 0) - process_last_request(context, options, ctx); - - out: - if (ret == 0) - krb5_init_creds_get_creds(context, ctx, creds); - - if (ctx) - krb5_init_creds_free(context, ctx); - - return ret; -} diff --git a/kerberosV/src/lib/krb5/k524_err.et b/kerberosV/src/lib/krb5/k524_err.et deleted file mode 100644 index c6b17b1fe57..00000000000 --- a/kerberosV/src/lib/krb5/k524_err.et +++ /dev/null @@ -1,20 +0,0 @@ -# -# Error messages for the k524 functions -# -# This might look like a com_err file, but is not -# -id "$Id: k524_err.et,v 1.2 2013/06/17 18:57:44 robert Exp $" - -error_table k524 - -prefix KRB524 -error_code BADKEY, "wrong keytype in ticket" -error_code BADADDR, "incorrect network address" -error_code BADPRINC, "cannot convert V5 principal" #unused -error_code BADREALM, "V5 realm name longer than V4 maximum" #unused -error_code V4ERR, "kerberos V4 error server" -error_code ENCFULL, "encoding too large at server" -error_code DECEMPTY, "decoding out of data" #unused -error_code NOTRESP, "service not responding" #unused -end - diff --git a/kerberosV/src/lib/krb5/kcm.c b/kerberosV/src/lib/krb5/kcm.c deleted file mode 100644 index 5a28b5138b5..00000000000 --- a/kerberosV/src/lib/krb5/kcm.c +++ /dev/null @@ -1,1319 +0,0 @@ -/* - * Copyright (c) 2005, PADL Software Pty Ltd. - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 PADL Software 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 PADL SOFTWARE 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 PADL SOFTWARE 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 "krb5_locl.h" - -#ifdef HAVE_KCM -/* - * Client library for Kerberos Credentials Manager (KCM) daemon - */ - -#include "kcm.h" -#include - -static krb5_error_code -kcm_set_kdc_offset(krb5_context, krb5_ccache, krb5_deltat); - -static const char *kcm_ipc_name = "ANY:org.h5l.kcm"; - -typedef struct krb5_kcmcache { - char *name; -} krb5_kcmcache; - -typedef struct krb5_kcm_cursor { - unsigned long offset; - unsigned long length; - kcmuuid_t *uuids; -} *krb5_kcm_cursor; - - -#define KCMCACHE(X) ((krb5_kcmcache *)(X)->data.data) -#define CACHENAME(X) (KCMCACHE(X)->name) -#define KCMCURSOR(C) ((krb5_kcm_cursor)(C)) - -static HEIMDAL_MUTEX kcm_mutex = HEIMDAL_MUTEX_INITIALIZER; -static heim_ipc kcm_ipc = NULL; - -static krb5_error_code -kcm_send_request(krb5_context context, - krb5_storage *request, - krb5_data *response_data) -{ - krb5_error_code ret = 0; - krb5_data request_data; - - HEIMDAL_MUTEX_lock(&kcm_mutex); - if (kcm_ipc == NULL) - ret = heim_ipc_init_context(kcm_ipc_name, &kcm_ipc); - HEIMDAL_MUTEX_unlock(&kcm_mutex); - if (ret) - return KRB5_CC_NOSUPP; - - ret = krb5_storage_to_data(request, &request_data); - if (ret) { - krb5_clear_error_message(context); - return KRB5_CC_NOMEM; - } - - ret = heim_ipc_call(kcm_ipc, &request_data, response_data, NULL); - krb5_data_free(&request_data); - - if (ret) { - krb5_clear_error_message(context); - ret = KRB5_CC_NOSUPP; - } - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kcm_storage_request(krb5_context context, - uint16_t opcode, - krb5_storage **storage_p) -{ - krb5_storage *sp; - krb5_error_code ret; - - *storage_p = NULL; - - sp = krb5_storage_emem(); - if (sp == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - - /* Send MAJOR | VERSION | OPCODE */ - ret = krb5_store_int8(sp, KCM_PROTOCOL_VERSION_MAJOR); - if (ret) - goto fail; - ret = krb5_store_int8(sp, KCM_PROTOCOL_VERSION_MINOR); - if (ret) - goto fail; - ret = krb5_store_int16(sp, opcode); - if (ret) - goto fail; - - *storage_p = sp; - fail: - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to encode KCM request", "")); - krb5_storage_free(sp); - } - - return ret; -} - -static krb5_error_code -kcm_alloc(krb5_context context, const char *name, krb5_ccache *id) -{ - krb5_kcmcache *k; - - k = malloc(sizeof(*k)); - if (k == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - - if (name != NULL) { - k->name = strdup(name); - if (k->name == NULL) { - free(k); - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - } else - k->name = NULL; - - (*id)->data.data = k; - (*id)->data.length = sizeof(*k); - - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kcm_call(krb5_context context, - krb5_storage *request, - krb5_storage **response_p, - krb5_data *response_data_p) -{ - krb5_data response_data; - krb5_error_code ret; - int32_t status; - krb5_storage *response; - - if (response_p != NULL) - *response_p = NULL; - - krb5_data_zero(&response_data); - - ret = kcm_send_request(context, request, &response_data); - if (ret) - return ret; - - response = krb5_storage_from_data(&response_data); - if (response == NULL) { - krb5_data_free(&response_data); - return KRB5_CC_IO; - } - - ret = krb5_ret_int32(response, &status); - if (ret) { - krb5_storage_free(response); - krb5_data_free(&response_data); - return KRB5_CC_FORMAT; - } - - if (status) { - krb5_storage_free(response); - krb5_data_free(&response_data); - return status; - } - - if (response_p != NULL) { - *response_data_p = response_data; - *response_p = response; - - return 0; - } - - krb5_storage_free(response); - krb5_data_free(&response_data); - - return 0; -} - -static void -kcm_free(krb5_context context, krb5_ccache *id) -{ - krb5_kcmcache *k = KCMCACHE(*id); - - if (k != NULL) { - if (k->name != NULL) - free(k->name); - memset(k, 0, sizeof(*k)); - krb5_data_free(&(*id)->data); - } -} - -static const char * -kcm_get_name(krb5_context context, - krb5_ccache id) -{ - return CACHENAME(id); -} - -static krb5_error_code -kcm_resolve(krb5_context context, krb5_ccache *id, const char *res) -{ - return kcm_alloc(context, res, id); -} - -/* - * Request: - * - * Response: - * NameZ - */ -static krb5_error_code -kcm_gen_new(krb5_context context, krb5_ccache *id) -{ - krb5_kcmcache *k; - krb5_error_code ret; - krb5_storage *request, *response; - krb5_data response_data; - - ret = kcm_alloc(context, NULL, id); - if (ret) - return ret; - - k = KCMCACHE(*id); - - ret = krb5_kcm_storage_request(context, KCM_OP_GEN_NEW, &request); - if (ret) { - kcm_free(context, id); - return ret; - } - - ret = krb5_kcm_call(context, request, &response, &response_data); - if (ret) { - krb5_storage_free(request); - kcm_free(context, id); - return ret; - } - - ret = krb5_ret_stringz(response, &k->name); - if (ret) - ret = KRB5_CC_IO; - - krb5_storage_free(request); - krb5_storage_free(response); - krb5_data_free(&response_data); - - if (ret) - kcm_free(context, id); - - return ret; -} - -/* - * Request: - * NameZ - * Principal - * - * Response: - * - */ -static krb5_error_code -kcm_initialize(krb5_context context, - krb5_ccache id, - krb5_principal primary_principal) -{ - krb5_error_code ret; - krb5_kcmcache *k = KCMCACHE(id); - krb5_storage *request; - - ret = krb5_kcm_storage_request(context, KCM_OP_INITIALIZE, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_principal(request, primary_principal); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, NULL, NULL); - - krb5_storage_free(request); - - if (context->kdc_sec_offset) - kcm_set_kdc_offset(context, id, context->kdc_sec_offset); - - return ret; -} - -static krb5_error_code -kcm_close(krb5_context context, - krb5_ccache id) -{ - kcm_free(context, &id); - return 0; -} - -/* - * Request: - * NameZ - * - * Response: - * - */ -static krb5_error_code -kcm_destroy(krb5_context context, - krb5_ccache id) -{ - krb5_error_code ret; - krb5_kcmcache *k = KCMCACHE(id); - krb5_storage *request; - - ret = krb5_kcm_storage_request(context, KCM_OP_DESTROY, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, NULL, NULL); - - krb5_storage_free(request); - return ret; -} - -/* - * Request: - * NameZ - * Creds - * - * Response: - * - */ -static krb5_error_code -kcm_store_cred(krb5_context context, - krb5_ccache id, - krb5_creds *creds) -{ - krb5_error_code ret; - krb5_kcmcache *k = KCMCACHE(id); - krb5_storage *request; - - ret = krb5_kcm_storage_request(context, KCM_OP_STORE, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_creds(request, creds); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, NULL, NULL); - - krb5_storage_free(request); - return ret; -} - -#if 0 -/* - * Request: - * NameZ - * WhichFields - * MatchCreds - * - * Response: - * Creds - * - */ -static krb5_error_code -kcm_retrieve(krb5_context context, - krb5_ccache id, - krb5_flags which, - const krb5_creds *mcred, - krb5_creds *creds) -{ - krb5_error_code ret; - krb5_kcmcache *k = KCMCACHE(id); - krb5_storage *request, *response; - krb5_data response_data; - - ret = krb5_kcm_storage_request(context, KCM_OP_RETRIEVE, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_int32(request, which); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_creds_tag(request, rk_UNCONST(mcred)); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, &response, &response_data); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_ret_creds(response, creds); - if (ret) - ret = KRB5_CC_IO; - - krb5_storage_free(request); - krb5_storage_free(response); - krb5_data_free(&response_data); - - return ret; -} -#endif - -/* - * Request: - * NameZ - * - * Response: - * Principal - */ -static krb5_error_code -kcm_get_principal(krb5_context context, - krb5_ccache id, - krb5_principal *principal) -{ - krb5_error_code ret; - krb5_kcmcache *k = KCMCACHE(id); - krb5_storage *request, *response; - krb5_data response_data; - - ret = krb5_kcm_storage_request(context, KCM_OP_GET_PRINCIPAL, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, &response, &response_data); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_ret_principal(response, principal); - if (ret) - ret = KRB5_CC_IO; - - krb5_storage_free(request); - krb5_storage_free(response); - krb5_data_free(&response_data); - - return ret; -} - -/* - * Request: - * NameZ - * - * Response: - * Cursor - * - */ -static krb5_error_code -kcm_get_first (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor) -{ - krb5_error_code ret; - krb5_kcm_cursor c; - krb5_kcmcache *k = KCMCACHE(id); - krb5_storage *request, *response; - krb5_data response_data; - - ret = krb5_kcm_storage_request(context, KCM_OP_GET_CRED_UUID_LIST, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, &response, &response_data); - krb5_storage_free(request); - if (ret) - return ret; - - c = calloc(1, sizeof(*c)); - if (c == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - return ret; - } - - while (1) { - ssize_t sret; - kcmuuid_t uuid; - void *ptr; - - sret = krb5_storage_read(response, &uuid, sizeof(uuid)); - if (sret == 0) { - ret = 0; - break; - } else if (sret != sizeof(uuid)) { - ret = EINVAL; - break; - } - - ptr = realloc(c->uuids, sizeof(c->uuids[0]) * (c->length + 1)); - if (ptr == NULL) { - free(c->uuids); - free(c); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - c->uuids = ptr; - - memcpy(&c->uuids[c->length], &uuid, sizeof(uuid)); - c->length += 1; - } - - krb5_storage_free(response); - krb5_data_free(&response_data); - - if (ret) { - free(c->uuids); - free(c); - return ret; - } - - *cursor = c; - - return 0; -} - -/* - * Request: - * NameZ - * Cursor - * - * Response: - * Creds - */ -static krb5_error_code -kcm_get_next (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor, - krb5_creds *creds) -{ - krb5_error_code ret; - krb5_kcmcache *k = KCMCACHE(id); - krb5_kcm_cursor c = KCMCURSOR(*cursor); - krb5_storage *request, *response; - krb5_data response_data; - ssize_t sret; - - again: - - if (c->offset >= c->length) - return KRB5_CC_END; - - ret = krb5_kcm_storage_request(context, KCM_OP_GET_CRED_BY_UUID, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - sret = krb5_storage_write(request, - &c->uuids[c->offset], - sizeof(c->uuids[c->offset])); - c->offset++; - if (sret != sizeof(c->uuids[c->offset])) { - krb5_storage_free(request); - krb5_clear_error_message(context); - return ENOMEM; - } - - ret = krb5_kcm_call(context, request, &response, &response_data); - krb5_storage_free(request); - if (ret == KRB5_CC_END) { - goto again; - } - - ret = krb5_ret_creds(response, creds); - if (ret) - ret = KRB5_CC_IO; - - krb5_storage_free(response); - krb5_data_free(&response_data); - - return ret; -} - -/* - * Request: - * NameZ - * Cursor - * - * Response: - * - */ -static krb5_error_code -kcm_end_get (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor) -{ - krb5_kcm_cursor c = KCMCURSOR(*cursor); - - free(c->uuids); - free(c); - - *cursor = NULL; - - return 0; -} - -/* - * Request: - * NameZ - * WhichFields - * MatchCreds - * - * Response: - * - */ -static krb5_error_code -kcm_remove_cred(krb5_context context, - krb5_ccache id, - krb5_flags which, - krb5_creds *cred) -{ - krb5_error_code ret; - krb5_kcmcache *k = KCMCACHE(id); - krb5_storage *request; - - ret = krb5_kcm_storage_request(context, KCM_OP_REMOVE_CRED, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_int32(request, which); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_creds_tag(request, cred); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, NULL, NULL); - - krb5_storage_free(request); - return ret; -} - -static krb5_error_code -kcm_set_flags(krb5_context context, - krb5_ccache id, - krb5_flags flags) -{ - krb5_error_code ret; - krb5_kcmcache *k = KCMCACHE(id); - krb5_storage *request; - - ret = krb5_kcm_storage_request(context, KCM_OP_SET_FLAGS, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_int32(request, flags); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, NULL, NULL); - - krb5_storage_free(request); - return ret; -} - -static int -kcm_get_version(krb5_context context, - krb5_ccache id) -{ - return 0; -} - -/* - * Send nothing - * get back list of uuids - */ - -static krb5_error_code -kcm_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) -{ - krb5_error_code ret; - krb5_kcm_cursor c; - krb5_storage *request, *response; - krb5_data response_data; - - *cursor = NULL; - - c = calloc(1, sizeof(*c)); - if (c == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto out; - } - - ret = krb5_kcm_storage_request(context, KCM_OP_GET_CACHE_UUID_LIST, &request); - if (ret) - goto out; - - ret = krb5_kcm_call(context, request, &response, &response_data); - krb5_storage_free(request); - if (ret) - goto out; - - while (1) { - ssize_t sret; - kcmuuid_t uuid; - void *ptr; - - sret = krb5_storage_read(response, &uuid, sizeof(uuid)); - if (sret == 0) { - ret = 0; - break; - } else if (sret != sizeof(uuid)) { - ret = EINVAL; - goto out; - } - - ptr = realloc(c->uuids, sizeof(c->uuids[0]) * (c->length + 1)); - if (ptr == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto out; - } - c->uuids = ptr; - - memcpy(&c->uuids[c->length], &uuid, sizeof(uuid)); - c->length += 1; - } - - krb5_storage_free(response); - krb5_data_free(&response_data); - - out: - if (ret && c) { - free(c->uuids); - free(c); - } else - *cursor = c; - - return ret; -} - -/* - * Send uuid - * Recv cache name - */ - -static krb5_error_code -kcm_get_cache_next(krb5_context context, krb5_cc_cursor cursor, const krb5_cc_ops *ops, krb5_ccache *id) -{ - krb5_error_code ret; - krb5_kcm_cursor c = KCMCURSOR(cursor); - krb5_storage *request, *response; - krb5_data response_data; - ssize_t sret; - char *name; - - *id = NULL; - - again: - - if (c->offset >= c->length) - return KRB5_CC_END; - - ret = krb5_kcm_storage_request(context, KCM_OP_GET_CACHE_BY_UUID, &request); - if (ret) - return ret; - - sret = krb5_storage_write(request, - &c->uuids[c->offset], - sizeof(c->uuids[c->offset])); - c->offset++; - if (sret != sizeof(c->uuids[c->offset])) { - krb5_storage_free(request); - krb5_clear_error_message(context); - return ENOMEM; - } - - ret = krb5_kcm_call(context, request, &response, &response_data); - krb5_storage_free(request); - if (ret == KRB5_CC_END) - goto again; - - ret = krb5_ret_stringz(response, &name); - krb5_storage_free(response); - krb5_data_free(&response_data); - - if (ret == 0) { - ret = _krb5_cc_allocate(context, ops, id); - if (ret == 0) - ret = kcm_alloc(context, name, id); - krb5_xfree(name); - } - - return ret; -} - -static krb5_error_code -kcm_get_cache_next_kcm(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) -{ -#ifndef KCM_IS_API_CACHE - return kcm_get_cache_next(context, cursor, &krb5_kcm_ops, id); -#else - return KRB5_CC_END; -#endif -} - -static krb5_error_code -kcm_get_cache_next_api(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) -{ - return kcm_get_cache_next(context, cursor, &krb5_akcm_ops, id); -} - - -static krb5_error_code -kcm_end_cache_get(krb5_context context, krb5_cc_cursor cursor) -{ - krb5_kcm_cursor c = KCMCURSOR(cursor); - - free(c->uuids); - free(c); - return 0; -} - - -static krb5_error_code -kcm_move(krb5_context context, krb5_ccache from, krb5_ccache to) -{ - krb5_error_code ret; - krb5_kcmcache *oldk = KCMCACHE(from); - krb5_kcmcache *newk = KCMCACHE(to); - krb5_storage *request; - - ret = krb5_kcm_storage_request(context, KCM_OP_MOVE_CACHE, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, oldk->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_stringz(request, newk->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - ret = krb5_kcm_call(context, request, NULL, NULL); - - krb5_storage_free(request); - return ret; -} - -static krb5_error_code -kcm_get_default_name(krb5_context context, const krb5_cc_ops *ops, - const char *defstr, char **str) -{ - krb5_error_code ret; - krb5_storage *request, *response; - krb5_data response_data; - char *name; - - *str = NULL; - - ret = krb5_kcm_storage_request(context, KCM_OP_GET_DEFAULT_CACHE, &request); - if (ret) - return ret; - - ret = krb5_kcm_call(context, request, &response, &response_data); - krb5_storage_free(request); - if (ret) - return _krb5_expand_default_cc_name(context, defstr, str); - - ret = krb5_ret_stringz(response, &name); - krb5_storage_free(response); - krb5_data_free(&response_data); - if (ret) - return ret; - - asprintf(str, "%s:%s", ops->prefix, name); - free(name); - if (str == NULL) - return ENOMEM; - - return 0; -} - -static krb5_error_code -kcm_get_default_name_api(krb5_context context, char **str) -{ - return kcm_get_default_name(context, &krb5_akcm_ops, - KRB5_DEFAULT_CCNAME_KCM_API, str); -} - -static krb5_error_code -kcm_get_default_name_kcm(krb5_context context, char **str) -{ - return kcm_get_default_name(context, &krb5_kcm_ops, - KRB5_DEFAULT_CCNAME_KCM_KCM, str); -} - -static krb5_error_code -kcm_set_default(krb5_context context, krb5_ccache id) -{ - krb5_error_code ret; - krb5_storage *request; - krb5_kcmcache *k = KCMCACHE(id); - - ret = krb5_kcm_storage_request(context, KCM_OP_SET_DEFAULT_CACHE, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, NULL, NULL); - krb5_storage_free(request); - - return ret; -} - -static krb5_error_code -kcm_lastchange(krb5_context context, krb5_ccache id, krb5_timestamp *mtime) -{ - *mtime = time(NULL); - return 0; -} - -static krb5_error_code -kcm_set_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat kdc_offset) -{ - krb5_kcmcache *k = KCMCACHE(id); - krb5_error_code ret; - krb5_storage *request; - - ret = krb5_kcm_storage_request(context, KCM_OP_SET_KDC_OFFSET, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - ret = krb5_store_int32(request, kdc_offset); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, NULL, NULL); - krb5_storage_free(request); - - return ret; -} - -static krb5_error_code -kcm_get_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat *kdc_offset) -{ - krb5_kcmcache *k = KCMCACHE(id); - krb5_error_code ret; - krb5_storage *request, *response; - krb5_data response_data; - int32_t offset; - - ret = krb5_kcm_storage_request(context, KCM_OP_GET_KDC_OFFSET, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, &response, &response_data); - krb5_storage_free(request); - if (ret) - return ret; - - ret = krb5_ret_int32(response, &offset); - krb5_storage_free(response); - krb5_data_free(&response_data); - if (ret) - return ret; - - *kdc_offset = offset; - - return 0; -} - -/** - * Variable containing the KCM based credential cache implemention. - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_VARIABLE const krb5_cc_ops krb5_kcm_ops = { - KRB5_CC_OPS_VERSION, - "KCM", - kcm_get_name, - kcm_resolve, - kcm_gen_new, - kcm_initialize, - kcm_destroy, - kcm_close, - kcm_store_cred, - NULL /* kcm_retrieve */, - kcm_get_principal, - kcm_get_first, - kcm_get_next, - kcm_end_get, - kcm_remove_cred, - kcm_set_flags, - kcm_get_version, - kcm_get_cache_first, - kcm_get_cache_next_kcm, - kcm_end_cache_get, - kcm_move, - kcm_get_default_name_kcm, - kcm_set_default, - kcm_lastchange, - kcm_set_kdc_offset, - kcm_get_kdc_offset -}; - -KRB5_LIB_VARIABLE const krb5_cc_ops krb5_akcm_ops = { - KRB5_CC_OPS_VERSION, - "API", - kcm_get_name, - kcm_resolve, - kcm_gen_new, - kcm_initialize, - kcm_destroy, - kcm_close, - kcm_store_cred, - NULL /* kcm_retrieve */, - kcm_get_principal, - kcm_get_first, - kcm_get_next, - kcm_end_get, - kcm_remove_cred, - kcm_set_flags, - kcm_get_version, - kcm_get_cache_first, - kcm_get_cache_next_api, - kcm_end_cache_get, - kcm_move, - kcm_get_default_name_api, - kcm_set_default, - kcm_lastchange, - NULL, - NULL -}; - - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -_krb5_kcm_is_running(krb5_context context) -{ - krb5_error_code ret; - krb5_ccache_data ccdata; - krb5_ccache id = &ccdata; - krb5_boolean running; - - ret = kcm_alloc(context, NULL, &id); - if (ret) - return 0; - - running = (_krb5_kcm_noop(context, id) == 0); - - kcm_free(context, &id); - - return running; -} - -/* - * Request: - * - * Response: - * - */ -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_kcm_noop(krb5_context context, - krb5_ccache id) -{ - krb5_error_code ret; - krb5_storage *request; - - ret = krb5_kcm_storage_request(context, KCM_OP_NOOP, &request); - if (ret) - return ret; - - ret = krb5_kcm_call(context, request, NULL, NULL); - - krb5_storage_free(request); - return ret; -} - - -/* - * Request: - * NameZ - * ServerPrincipalPresent - * ServerPrincipal OPTIONAL - * Key - * - * Repsonse: - * - */ -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_kcm_get_initial_ticket(krb5_context context, - krb5_ccache id, - krb5_principal server, - krb5_keyblock *key) -{ - krb5_kcmcache *k = KCMCACHE(id); - krb5_error_code ret; - krb5_storage *request; - - ret = krb5_kcm_storage_request(context, KCM_OP_GET_INITIAL_TICKET, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_int8(request, (server == NULL) ? 0 : 1); - if (ret) { - krb5_storage_free(request); - return ret; - } - - if (server != NULL) { - ret = krb5_store_principal(request, server); - if (ret) { - krb5_storage_free(request); - return ret; - } - } - - ret = krb5_store_keyblock(request, *key); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, NULL, NULL); - - krb5_storage_free(request); - return ret; -} - - -/* - * Request: - * NameZ - * KDCFlags - * EncryptionType - * ServerPrincipal - * - * Repsonse: - * - */ -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_kcm_get_ticket(krb5_context context, - krb5_ccache id, - krb5_kdc_flags flags, - krb5_enctype enctype, - krb5_principal server) -{ - krb5_error_code ret; - krb5_kcmcache *k = KCMCACHE(id); - krb5_storage *request; - - ret = krb5_kcm_storage_request(context, KCM_OP_GET_TICKET, &request); - if (ret) - return ret; - - ret = krb5_store_stringz(request, k->name); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_int32(request, flags.i); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_int32(request, enctype); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_store_principal(request, server); - if (ret) { - krb5_storage_free(request); - return ret; - } - - ret = krb5_kcm_call(context, request, NULL, NULL); - - krb5_storage_free(request); - return ret; -} - -#endif /* HAVE_KCM */ diff --git a/kerberosV/src/lib/krb5/kcm.h b/kerberosV/src/lib/krb5/kcm.h deleted file mode 100644 index 27197fec3ed..00000000000 --- a/kerberosV/src/lib/krb5/kcm.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2005, PADL Software Pty Ltd. - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 PADL Software 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 PADL SOFTWARE 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 PADL SOFTWARE 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. - */ - -#ifndef __KCM_H__ -#define __KCM_H__ - -/* - * KCM protocol definitions - */ - -#define KCM_PROTOCOL_VERSION_MAJOR 2 -#define KCM_PROTOCOL_VERSION_MINOR 0 - -typedef unsigned char kcmuuid_t[16]; - -typedef enum kcm_operation { - KCM_OP_NOOP, - KCM_OP_GET_NAME, - KCM_OP_RESOLVE, - KCM_OP_GEN_NEW, - KCM_OP_INITIALIZE, - KCM_OP_DESTROY, - KCM_OP_STORE, - KCM_OP_RETRIEVE, - KCM_OP_GET_PRINCIPAL, - KCM_OP_GET_CRED_UUID_LIST, - KCM_OP_GET_CRED_BY_UUID, - KCM_OP_REMOVE_CRED, - KCM_OP_SET_FLAGS, - KCM_OP_CHOWN, - KCM_OP_CHMOD, - KCM_OP_GET_INITIAL_TICKET, - KCM_OP_GET_TICKET, - KCM_OP_MOVE_CACHE, - KCM_OP_GET_CACHE_UUID_LIST, - KCM_OP_GET_CACHE_BY_UUID, - KCM_OP_GET_DEFAULT_CACHE, - KCM_OP_SET_DEFAULT_CACHE, - KCM_OP_GET_KDC_OFFSET, - KCM_OP_SET_KDC_OFFSET, - /* NTLM operations */ - KCM_OP_ADD_NTLM_CRED, - KCM_OP_HAVE_NTLM_CRED, - KCM_OP_DEL_NTLM_CRED, - KCM_OP_DO_NTLM_AUTH, - KCM_OP_GET_NTLM_USER_LIST, - KCM_OP_MAX -} kcm_operation; - -#define _PATH_KCM_SOCKET "/var/run/.kcm_socket" -#define _PATH_KCM_DOOR "/var/run/.kcm_door" - -#define KCM_NTLM_FLAG_SESSIONKEY 1 -#define KCM_NTLM_FLAG_NTLM2_SESSION 2 -#define KCM_NTLM_FLAG_KEYEX 4 -#define KCM_NTLM_FLAG_AV_GUEST 8 - -#endif /* __KCM_H__ */ - diff --git a/kerberosV/src/lib/krb5/kerberos.8 b/kerberosV/src/lib/krb5/kerberos.8 deleted file mode 100644 index 028614a40ac..00000000000 --- a/kerberosV/src/lib/krb5/kerberos.8 +++ /dev/null @@ -1,107 +0,0 @@ -.\" Copyright (c) 2000 Kungliga Tekniska Högskolan -.\" (Royal Institute of Technology, Stockholm, Sweden). -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" 3. Neither the name of the Institute nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $Id: kerberos.8,v 1.6 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd September 1, 2000 -.Dt KERBEROS 8 -.Os HEIMDAL -.Sh NAME -.Nm kerberos -.Nd introduction to the Kerberos system -.Sh DESCRIPTION -Kerberos is a network authentication system. Its purpose is to -securely authenticate users and services in an insecure network -environment. -.Pp -This is done with a Kerberos server acting as a trusted third party, -keeping a database with secret keys for all users and services -(collectively called -.Em principals ) . -.Pp -Each principal belongs to exactly one -.Em realm , -which is the administrative domain in Kerberos. A realm usually -corresponds to an organisation, and the realm should normally be -derived from that organisation's domain name. A realm is served by one -or more Kerberos servers. -.Pp -The authentication process involves exchange of -.Sq tickets -and -.Sq authenticators -which together prove the principal's identity. -.Pp -When you login to the Kerberos system, either through the normal -system login or with the -.Xr kinit 1 -program, you acquire a -.Em ticket granting ticket -which allows you to get new tickets for other services, such as -.Ic telnet -or -.Ic ftp , -without giving your password. -.Pp -For more information on how Kerberos works, and other general Kerberos -questions see the Kerberos FAQ at -.Pa http://www.nrl.navy.mil/CCS/people/kenh/kerberos-faq.html . -.Pp -For setup instructions see the Heimdal Texinfo manual. -.Sh SEE ALSO -.Xr ftp 1 , -.Xr kdestroy 1 , -.Xr kinit 1 , -.Xr klist 1 , -.Xr kpasswd 1 , -.Xr telnet 1 -.Sh HISTORY -The Kerberos authentication system was developed in the late 1980's as -part of the Athena Project at the Massachusetts Institute of -Technology. Versions one through three never reached outside MIT, but -version 4 was (and still is) quite popular, especially in the academic -community, but is also used in commercial products like the AFS -filesystem. -.Pp -The problems with version 4 are that it has many limitations, the code -was not too well written (since it had been developed over a long -time), and it has a number of known security problems. To resolve many -of these issues work on version five started, and resulted in IETF RFC -1510 in 1993. IETF RFC 1510 was obsoleted in 2005 with IETF RFC 4120, -also known as Kerberos clarifications. With the arrival of IETF RFC -4120, the work on adding extensibility and internationalization have -started (Kerberos extensions), and a new RFC will hopefully appear -soon. -.Pp -This manual page is part of the -.Nm Heimdal -Kerberos 5 distribution, which has been in development at the Royal -Institute of Technology in Stockholm, Sweden, since about 1997. diff --git a/kerberosV/src/lib/krb5/kerberos.cat8 b/kerberosV/src/lib/krb5/kerberos.cat8 deleted file mode 100644 index a6e1fa3fe37..00000000000 --- a/kerberosV/src/lib/krb5/kerberos.cat8 +++ /dev/null @@ -1,57 +0,0 @@ - -KERBEROS(8) BSD System Manager's Manual KERBEROS(8) - -NNAAMMEE - kkeerrbbeerrooss -- introduction to the Kerberos system - -DDEESSCCRRIIPPTTIIOONN - Kerberos is a network authentication system. Its purpose is to securely - authenticate users and services in an insecure network environment. - - This is done with a Kerberos server acting as a trusted third party, - keeping a database with secret keys for all users and services (collec- - tively called _p_r_i_n_c_i_p_a_l_s). - - Each principal belongs to exactly one _r_e_a_l_m, which is the administrative - domain in Kerberos. A realm usually corresponds to an organisation, and - the realm should normally be derived from that organisation's domain - name. A realm is served by one or more Kerberos servers. - - The authentication process involves exchange of `tickets' and - `authenticators' which together prove the principal's identity. - - When you login to the Kerberos system, either through the normal system - login or with the kinit(1) program, you acquire a _t_i_c_k_e_t _g_r_a_n_t_i_n_g _t_i_c_k_e_t - which allows you to get new tickets for other services, such as tteellnneett or - ffttpp, without giving your password. - - For more information on how Kerberos works, and other general Kerberos - questions see the Kerberos FAQ at - _h_t_t_p_:_/_/_w_w_w_._n_r_l_._n_a_v_y_._m_i_l_/_C_C_S_/_p_e_o_p_l_e_/_k_e_n_h_/_k_e_r_b_e_r_o_s_-_f_a_q_._h_t_m_l. - - For setup instructions see the Heimdal Texinfo manual. - -SSEEEE AALLSSOO - ftp(1), kdestroy(1), kinit(1), klist(1), kpasswd(1), telnet(1) - -HHIISSTTOORRYY - The Kerberos authentication system was developed in the late 1980's as - part of the Athena Project at the Massachusetts Institute of Technology. - Versions one through three never reached outside MIT, but version 4 was - (and still is) quite popular, especially in the academic community, but - is also used in commercial products like the AFS filesystem. - - The problems with version 4 are that it has many limitations, the code - was not too well written (since it had been developed over a long time), - and it has a number of known security problems. To resolve many of these - issues work on version five started, and resulted in IETF RFC 1510 in - 1993. IETF RFC 1510 was obsoleted in 2005 with IETF RFC 4120, also known - as Kerberos clarifications. With the arrival of IETF RFC 4120, the work - on adding extensibility and internationalization have started (Kerberos - extensions), and a new RFC will hopefully appear soon. - - This manual page is part of the HHeeiimmddaall Kerberos 5 distribution, which - has been in development at the Royal Institute of Technology in Stock- - holm, Sweden, since about 1997. - -HEIMDAL September 1, 2000 HEIMDAL diff --git a/kerberosV/src/lib/krb5/keyblock.c b/kerberosV/src/lib/krb5/keyblock.c deleted file mode 100644 index 9ba9c4b290d..00000000000 --- a/kerberosV/src/lib/krb5/keyblock.c +++ /dev/null @@ -1,204 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -/** - * Zero out a keyblock - * - * @param keyblock keyblock to zero out - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_keyblock_zero(krb5_keyblock *keyblock) -{ - keyblock->keytype = 0; - krb5_data_zero(&keyblock->keyvalue); -} - -/** - * Free a keyblock's content, also zero out the content of the keyblock. - * - * @param context a Kerberos 5 context - * @param keyblock keyblock content to free, NULL is valid argument - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_keyblock_contents(krb5_context context, - krb5_keyblock *keyblock) -{ - if(keyblock) { - if (keyblock->keyvalue.data != NULL) - memset(keyblock->keyvalue.data, 0, keyblock->keyvalue.length); - krb5_data_free (&keyblock->keyvalue); - keyblock->keytype = ENCTYPE_NULL; - } -} - -/** - * Free a keyblock, also zero out the content of the keyblock, uses - * krb5_free_keyblock_contents() to free the content. - * - * @param context a Kerberos 5 context - * @param keyblock keyblock to free, NULL is valid argument - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_keyblock(krb5_context context, - krb5_keyblock *keyblock) -{ - if(keyblock){ - krb5_free_keyblock_contents(context, keyblock); - free(keyblock); - } -} - -/** - * Copy a keyblock, free the output keyblock with - * krb5_free_keyblock_contents(). - * - * @param context a Kerberos 5 context - * @param inblock the key to copy - * @param to the output key. - * - * @return 0 on success or a Kerberos 5 error code - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_keyblock_contents (krb5_context context, - const krb5_keyblock *inblock, - krb5_keyblock *to) -{ - return copy_EncryptionKey(inblock, to); -} - -/** - * Copy a keyblock, free the output keyblock with - * krb5_free_keyblock(). - * - * @param context a Kerberos 5 context - * @param inblock the key to copy - * @param to the output key. - * - * @return 0 on success or a Kerberos 5 error code - * - * @ingroup krb5_crypto - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_keyblock (krb5_context context, - const krb5_keyblock *inblock, - krb5_keyblock **to) -{ - krb5_error_code ret; - krb5_keyblock *k; - - *to = NULL; - - k = calloc (1, sizeof(*k)); - if (k == NULL) { - krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); - return ENOMEM; - } - - ret = krb5_copy_keyblock_contents (context, inblock, k); - if (ret) { - free(k); - return ret; - } - *to = k; - return 0; -} - -/** - * Get encryption type of a keyblock. - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_enctype KRB5_LIB_CALL -krb5_keyblock_get_enctype(const krb5_keyblock *block) -{ - return block->keytype; -} - -/** - * Fill in `key' with key data of type `enctype' from `data' of length - * `size'. Key should be freed using krb5_free_keyblock_contents(). - * - * @return 0 on success or a Kerberos 5 error code - * - * @ingroup krb5_crypto - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_keyblock_init(krb5_context context, - krb5_enctype type, - const void *data, - size_t size, - krb5_keyblock *key) -{ - krb5_error_code ret; - size_t len; - - memset(key, 0, sizeof(*key)); - - ret = krb5_enctype_keysize(context, type, &len); - if (ret) - return ret; - - if (len != size) { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - "Encryption key %d is %lu bytes " - "long, %lu was passed in", - type, (unsigned long)len, (unsigned long)size); - return KRB5_PROG_ETYPE_NOSUPP; - } - ret = krb5_data_copy(&key->keyvalue, data, len); - if(ret) { - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - return ret; - } - key->keytype = type; - - return 0; -} diff --git a/kerberosV/src/lib/krb5/keytab.c b/kerberosV/src/lib/krb5/keytab.c deleted file mode 100644 index 8ca515f2133..00000000000 --- a/kerberosV/src/lib/krb5/keytab.c +++ /dev/null @@ -1,893 +0,0 @@ -/* - * Copyright (c) 1997 - 2005 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 "krb5_locl.h" - -/** - * @page krb5_keytab_intro The keytab handing functions - * @section section_krb5_keytab Kerberos Keytabs - * - * See the library functions here: @ref krb5_keytab - * - * Keytabs are long term key storage for servers, their equvalment of - * password files. - * - * Normally the only function that useful for server are to specify - * what keytab to use to other core functions like krb5_rd_req() - * krb5_kt_resolve(), and krb5_kt_close(). - * - * @subsection krb5_keytab_names Keytab names - * - * A keytab name is on the form type:residual. The residual part is - * specific to each keytab-type. - * - * When a keytab-name is resolved, the type is matched with an internal - * list of keytab types. If there is no matching keytab type, - * the default keytab is used. The current default type is FILE. - * - * The default value can be changed in the configuration file - * /etc/krb5.conf by setting the variable - * [defaults]default_keytab_name. - * - * The keytab types that are implemented in Heimdal are: - * - file - * store the keytab in a file, the type's name is FILE . The - * residual part is a filename. For compatibility with other - * Kerberos implemtation WRFILE and JAVA14 is also accepted. WRFILE - * has the same format as FILE. JAVA14 have a format that is - * compatible with older versions of MIT kerberos and SUN's Java - * based installation. They store a truncted kvno, so when the knvo - * excess 255, they are truncted in this format. - * - * - keytab - * store the keytab in a AFS keyfile (usually /usr/afs/etc/KeyFile ), - * the type's name is AFSKEYFILE. The residual part is a filename. - * - * - memory - * The keytab is stored in a memory segment. This allows sensitive - * and/or temporary data not to be stored on disk. The type's name - * is MEMORY. Each MEMORY keytab is referenced counted by and - * opened by the residual name, so two handles can point to the - * same memory area. When the last user closes using krb5_kt_close() - * the keytab, the keys in they keytab is memset() to zero and freed - * and can no longer be looked up by name. - * - * - * @subsection krb5_keytab_example Keytab example - * - * This is a minimalistic version of ktutil. - * - * @code -int -main (int argc, char **argv) -{ - krb5_context context; - krb5_keytab keytab; - krb5_kt_cursor cursor; - krb5_keytab_entry entry; - krb5_error_code ret; - char *principal; - - if (krb5_init_context (&context) != 0) - errx(1, "krb5_context"); - - ret = krb5_kt_default (context, &keytab); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_default"); - - ret = krb5_kt_start_seq_get(context, keytab, &cursor); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_start_seq_get"); - while((ret = krb5_kt_next_entry(context, keytab, &entry, &cursor)) == 0){ - krb5_unparse_name(context, entry.principal, &principal); - printf("principal: %s\n", principal); - free(principal); - krb5_kt_free_entry(context, &entry); - } - ret = krb5_kt_end_seq_get(context, keytab, &cursor); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_end_seq_get"); - ret = krb5_kt_close(context, keytab); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_close"); - krb5_free_context(context); - return 0; -} - * @endcode - * - */ - - -/** - * Register a new keytab backend. - * - * @param context a Keberos context. - * @param ops a backend to register. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_register(krb5_context context, - const krb5_kt_ops *ops) -{ - struct krb5_keytab_data *tmp; - - if (strlen(ops->prefix) > KRB5_KT_PREFIX_MAX_LEN - 1) { - krb5_set_error_message(context, KRB5_KT_BADNAME, - N_("can't register cache type, prefix too long", "")); - return KRB5_KT_BADNAME; - } - - tmp = realloc(context->kt_types, - (context->num_kt_types + 1) * sizeof(*context->kt_types)); - if(tmp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy(&tmp[context->num_kt_types], ops, - sizeof(tmp[context->num_kt_types])); - context->kt_types = tmp; - context->num_kt_types++; - return 0; -} - -static const char * -keytab_name(const char *name, const char **type, size_t *type_len) -{ - const char *residual; - - residual = strchr(name, ':'); - - if (residual == NULL || - name[0] == '/' -#ifdef _WIN32 - /* Avoid treating : as a keytab type - * specification */ - || name + 1 == residual -#endif - ) { - - *type = "FILE"; - *type_len = strlen(*type); - residual = name; - } else { - *type = name; - *type_len = residual - name; - residual++; - } - - return residual; -} - -/** - * Resolve the keytab name (of the form `type:residual') in `name' - * into a keytab in `id'. - * - * @param context a Keberos context. - * @param name name to resolve - * @param id resulting keytab, free with krb5_kt_close(). - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_resolve(krb5_context context, - const char *name, - krb5_keytab *id) -{ - krb5_keytab k; - int i; - const char *type, *residual; - size_t type_len; - krb5_error_code ret; - - residual = keytab_name(name, &type, &type_len); - - for(i = 0; i < context->num_kt_types; i++) { - if(strncasecmp(type, context->kt_types[i].prefix, type_len) == 0) - break; - } - if(i == context->num_kt_types) { - krb5_set_error_message(context, KRB5_KT_UNKNOWN_TYPE, - N_("unknown keytab type %.*s", "type"), - (int)type_len, type); - return KRB5_KT_UNKNOWN_TYPE; - } - - k = malloc (sizeof(*k)); - if (k == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy(k, &context->kt_types[i], sizeof(*k)); - k->data = NULL; - ret = (*k->resolve)(context, residual, k); - if(ret) { - free(k); - k = NULL; - } - *id = k; - return ret; -} - -/** - * copy the name of the default keytab into `name'. - * - * @param context a Keberos context. - * @param name buffer where the name will be written - * @param namesize length of name - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_default_name(krb5_context context, char *name, size_t namesize) -{ - if (strlcpy (name, context->default_keytab, namesize) >= namesize) { - krb5_clear_error_message (context); - return KRB5_CONFIG_NOTENUFSPACE; - } - return 0; -} - -/** - * Copy the name of the default modify keytab into `name'. - * - * @param context a Keberos context. - * @param name buffer where the name will be written - * @param namesize length of name - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_default_modify_name(krb5_context context, char *name, size_t namesize) -{ - const char *kt = NULL; - if(context->default_keytab_modify == NULL) { - if(strncasecmp(context->default_keytab, "ANY:", 4) != 0) - kt = context->default_keytab; - else { - size_t len = strcspn(context->default_keytab + 4, ","); - if(len >= namesize) { - krb5_clear_error_message(context); - return KRB5_CONFIG_NOTENUFSPACE; - } - strlcpy(name, context->default_keytab + 4, namesize); - name[len] = '\0'; - return 0; - } - } else - kt = context->default_keytab_modify; - if (strlcpy (name, kt, namesize) >= namesize) { - krb5_clear_error_message (context); - return KRB5_CONFIG_NOTENUFSPACE; - } - return 0; -} - -/** - * Set `id' to the default keytab. - * - * @param context a Keberos context. - * @param id the new default keytab. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_default(krb5_context context, krb5_keytab *id) -{ - return krb5_kt_resolve (context, context->default_keytab, id); -} - -/** - * Read the key identified by `(principal, vno, enctype)' from the - * keytab in `keyprocarg' (the default if == NULL) into `*key'. - * - * @param context a Keberos context. - * @param keyprocarg - * @param principal - * @param vno - * @param enctype - * @param key - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_read_service_key(krb5_context context, - krb5_pointer keyprocarg, - krb5_principal principal, - krb5_kvno vno, - krb5_enctype enctype, - krb5_keyblock **key) -{ - krb5_keytab keytab; - krb5_keytab_entry entry; - krb5_error_code ret; - - if (keyprocarg) - ret = krb5_kt_resolve (context, keyprocarg, &keytab); - else - ret = krb5_kt_default (context, &keytab); - - if (ret) - return ret; - - ret = krb5_kt_get_entry (context, keytab, principal, vno, enctype, &entry); - krb5_kt_close (context, keytab); - if (ret) - return ret; - ret = krb5_copy_keyblock (context, &entry.keyblock, key); - krb5_kt_free_entry(context, &entry); - return ret; -} - -/** - * Return the type of the `keytab' in the string `prefix of length - * `prefixsize'. - * - * @param context a Keberos context. - * @param keytab the keytab to get the prefix for - * @param prefix prefix buffer - * @param prefixsize length of prefix buffer - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_get_type(krb5_context context, - krb5_keytab keytab, - char *prefix, - size_t prefixsize) -{ - strlcpy(prefix, keytab->prefix, prefixsize); - return 0; -} - -/** - * Retrieve the name of the keytab `keytab' into `name', `namesize' - * - * @param context a Keberos context. - * @param keytab the keytab to get the name for. - * @param name name buffer. - * @param namesize size of name buffer. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_get_name(krb5_context context, - krb5_keytab keytab, - char *name, - size_t namesize) -{ - return (*keytab->get_name)(context, keytab, name, namesize); -} - -/** - * Retrieve the full name of the keytab `keytab' and store the name in - * `str'. - * - * @param context a Keberos context. - * @param keytab keytab to get name for. - * @param str the name of the keytab name, usee krb5_xfree() to free - * the string. On error, *str is set to NULL. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_get_full_name(krb5_context context, - krb5_keytab keytab, - char **str) -{ - char type[KRB5_KT_PREFIX_MAX_LEN]; - char name[MAXPATHLEN]; - krb5_error_code ret; - - *str = NULL; - - ret = krb5_kt_get_type(context, keytab, type, sizeof(type)); - if (ret) - return ret; - - ret = krb5_kt_get_name(context, keytab, name, sizeof(name)); - if (ret) - return ret; - - if (asprintf(str, "%s:%s", type, name) == -1) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - *str = NULL; - return ENOMEM; - } - - return 0; -} - -/** - * Finish using the keytab in `id'. All resources will be released, - * even on errors. - * - * @param context a Keberos context. - * @param id keytab to close. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_close(krb5_context context, - krb5_keytab id) -{ - krb5_error_code ret; - - ret = (*id->close)(context, id); - memset(id, 0, sizeof(*id)); - free(id); - return ret; -} - -/** - * Destroy (remove) the keytab in `id'. All resources will be released, - * even on errors, does the equvalment of krb5_kt_close() on the resources. - * - * @param context a Keberos context. - * @param id keytab to destroy. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_destroy(krb5_context context, - krb5_keytab id) -{ - krb5_error_code ret; - - ret = (*id->destroy)(context, id); - krb5_kt_close(context, id); - return ret; -} - -/* - * Match any aliases in keytab `entry' with `principal'. - */ - -static krb5_boolean -compare_aliseses(krb5_context context, - krb5_keytab_entry *entry, - krb5_const_principal principal) -{ - unsigned int i; - if (entry->aliases == NULL) - return FALSE; - for (i = 0; i < entry->aliases->len; i++) - if (krb5_principal_compare(context, &entry->aliases->val[i], principal)) - return TRUE; - return FALSE; -} - -/** - * Compare `entry' against `principal, vno, enctype'. - * Any of `principal, vno, enctype' might be 0 which acts as a wildcard. - * Return TRUE if they compare the same, FALSE otherwise. - * - * @param context a Keberos context. - * @param entry an entry to match with. - * @param principal principal to match, NULL matches all principals. - * @param vno key version to match, 0 matches all key version numbers. - * @param enctype encryption type to match, 0 matches all encryption types. - * - * @return Return TRUE or match, FALSE if not matched. - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_kt_compare(krb5_context context, - krb5_keytab_entry *entry, - krb5_const_principal principal, - krb5_kvno vno, - krb5_enctype enctype) -{ - if(principal != NULL && - !(krb5_principal_compare(context, entry->principal, principal) || - compare_aliseses(context, entry, principal))) - return FALSE; - if(vno && vno != entry->vno) - return FALSE; - if(enctype && enctype != entry->keyblock.keytype) - return FALSE; - return TRUE; -} - -krb5_error_code -_krb5_kt_principal_not_found(krb5_context context, - krb5_error_code ret, - krb5_keytab id, - krb5_const_principal principal, - krb5_enctype enctype, - int kvno) -{ - char princ[256], kvno_str[25], *kt_name; - char *enctype_str = NULL; - - krb5_unparse_name_fixed (context, principal, princ, sizeof(princ)); - krb5_kt_get_full_name (context, id, &kt_name); - krb5_enctype_to_string(context, enctype, &enctype_str); - - if (kvno) - snprintf(kvno_str, sizeof(kvno_str), "(kvno %d)", kvno); - else - kvno_str[0] = '\0'; - - krb5_set_error_message (context, ret, - N_("Failed to find %s%s in keytab %s (%s)", - "principal, kvno, keytab file, enctype"), - princ, - kvno_str, - kt_name ? kt_name : "unknown keytab", - enctype_str ? enctype_str : "unknown enctype"); - free(kt_name); - free(enctype_str); - return ret; -} - - -/** - * Retrieve the keytab entry for `principal, kvno, enctype' into `entry' - * from the keytab `id'. Matching is done like krb5_kt_compare(). - * - * @param context a Keberos context. - * @param id a keytab. - * @param principal principal to match, NULL matches all principals. - * @param kvno key version to match, 0 matches all key version numbers. - * @param enctype encryption type to match, 0 matches all encryption types. - * @param entry the returned entry, free with krb5_kt_free_entry(). - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_get_entry(krb5_context context, - krb5_keytab id, - krb5_const_principal principal, - krb5_kvno kvno, - krb5_enctype enctype, - krb5_keytab_entry *entry) -{ - krb5_keytab_entry tmp; - krb5_error_code ret; - krb5_kt_cursor cursor; - - if(id->get) - return (*id->get)(context, id, principal, kvno, enctype, entry); - - ret = krb5_kt_start_seq_get (context, id, &cursor); - if (ret) { - /* This is needed for krb5_verify_init_creds, but keep error - * string from previous error for the human. */ - context->error_code = KRB5_KT_NOTFOUND; - return KRB5_KT_NOTFOUND; - } - - entry->vno = 0; - while (krb5_kt_next_entry(context, id, &tmp, &cursor) == 0) { - if (krb5_kt_compare(context, &tmp, principal, 0, enctype)) { - /* the file keytab might only store the lower 8 bits of - the kvno, so only compare those bits */ - if (kvno == tmp.vno - || (tmp.vno < 256 && kvno % 256 == tmp.vno)) { - krb5_kt_copy_entry_contents (context, &tmp, entry); - krb5_kt_free_entry (context, &tmp); - krb5_kt_end_seq_get(context, id, &cursor); - return 0; - } else if (kvno == 0 && tmp.vno > entry->vno) { - if (entry->vno) - krb5_kt_free_entry (context, entry); - krb5_kt_copy_entry_contents (context, &tmp, entry); - } - } - krb5_kt_free_entry(context, &tmp); - } - krb5_kt_end_seq_get (context, id, &cursor); - if (entry->vno == 0) - return _krb5_kt_principal_not_found(context, KRB5_KT_NOTFOUND, - id, principal, enctype, kvno); - return 0; -} - -/** - * Copy the contents of `in' into `out'. - * - * @param context a Keberos context. - * @param in the keytab entry to copy. - * @param out the copy of the keytab entry, free with krb5_kt_free_entry(). - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_copy_entry_contents(krb5_context context, - const krb5_keytab_entry *in, - krb5_keytab_entry *out) -{ - krb5_error_code ret; - - memset(out, 0, sizeof(*out)); - out->vno = in->vno; - - ret = krb5_copy_principal (context, in->principal, &out->principal); - if (ret) - goto fail; - ret = krb5_copy_keyblock_contents (context, - &in->keyblock, - &out->keyblock); - if (ret) - goto fail; - out->timestamp = in->timestamp; - return 0; -fail: - krb5_kt_free_entry (context, out); - return ret; -} - -/** - * Free the contents of `entry'. - * - * @param context a Keberos context. - * @param entry the entry to free - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_free_entry(krb5_context context, - krb5_keytab_entry *entry) -{ - krb5_free_principal (context, entry->principal); - krb5_free_keyblock_contents (context, &entry->keyblock); - memset(entry, 0, sizeof(*entry)); - return 0; -} - -/** - * Set `cursor' to point at the beginning of `id'. - * - * @param context a Keberos context. - * @param id a keytab. - * @param cursor a newly allocated cursor, free with krb5_kt_end_seq_get(). - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_start_seq_get(krb5_context context, - krb5_keytab id, - krb5_kt_cursor *cursor) -{ - if(id->start_seq_get == NULL) { - krb5_set_error_message(context, HEIM_ERR_OPNOTSUPP, - N_("start_seq_get is not supported " - "in the %s keytab type", ""), - id->prefix); - return HEIM_ERR_OPNOTSUPP; - } - return (*id->start_seq_get)(context, id, cursor); -} - -/** - * Get the next entry from keytab, advance the cursor. On last entry - * the function will return KRB5_KT_END. - * - * @param context a Keberos context. - * @param id a keytab. - * @param entry the returned entry, free with krb5_kt_free_entry(). - * @param cursor the cursor of the iteration. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_next_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry, - krb5_kt_cursor *cursor) -{ - if(id->next_entry == NULL) { - krb5_set_error_message(context, HEIM_ERR_OPNOTSUPP, - N_("next_entry is not supported in the %s " - " keytab", ""), - id->prefix); - return HEIM_ERR_OPNOTSUPP; - } - return (*id->next_entry)(context, id, entry, cursor); -} - -/** - * Release all resources associated with `cursor'. - * - * @param context a Keberos context. - * @param id a keytab. - * @param cursor the cursor to free. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_end_seq_get(krb5_context context, - krb5_keytab id, - krb5_kt_cursor *cursor) -{ - if(id->end_seq_get == NULL) { - krb5_set_error_message(context, HEIM_ERR_OPNOTSUPP, - "end_seq_get is not supported in the %s " - " keytab", id->prefix); - return HEIM_ERR_OPNOTSUPP; - } - return (*id->end_seq_get)(context, id, cursor); -} - -/** - * Add the entry in `entry' to the keytab `id'. - * - * @param context a Keberos context. - * @param id a keytab. - * @param entry the entry to add - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_add_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry) -{ - if(id->add == NULL) { - krb5_set_error_message(context, KRB5_KT_NOWRITE, - N_("Add is not supported in the %s keytab", ""), - id->prefix); - return KRB5_KT_NOWRITE; - } - entry->timestamp = time(NULL); - return (*id->add)(context, id,entry); -} - -/** - * Remove an entry from the keytab, matching is done using - * krb5_kt_compare(). - - * @param context a Keberos context. - * @param id a keytab. - * @param entry the entry to remove - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_remove_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry) -{ - if(id->remove == NULL) { - krb5_set_error_message(context, KRB5_KT_NOWRITE, - N_("Remove is not supported in the %s keytab", ""), - id->prefix); - return KRB5_KT_NOWRITE; - } - return (*id->remove)(context, id, entry); -} - -/** - * Return true if the keytab exists and have entries - * - * @param context a Keberos context. - * @param id a keytab. - * - * @return Return an error code or 0, see krb5_get_error_message(). - * - * @ingroup krb5_keytab - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_kt_have_content(krb5_context context, - krb5_keytab id) -{ - krb5_keytab_entry entry; - krb5_kt_cursor cursor; - krb5_error_code ret; - char *name; - - ret = krb5_kt_start_seq_get(context, id, &cursor); - if (ret) - goto notfound; - - ret = krb5_kt_next_entry(context, id, &entry, &cursor); - krb5_kt_end_seq_get(context, id, &cursor); - if (ret) - goto notfound; - - krb5_kt_free_entry(context, &entry); - - return 0; - - notfound: - ret = krb5_kt_get_full_name(context, id, &name); - if (ret == 0) { - krb5_set_error_message(context, KRB5_KT_NOTFOUND, - N_("No entry in keytab: %s", ""), name); - free(name); - } - return KRB5_KT_NOTFOUND; -} diff --git a/kerberosV/src/lib/krb5/keytab_any.c b/kerberosV/src/lib/krb5/keytab_any.c deleted file mode 100644 index d5ac4883db1..00000000000 --- a/kerberosV/src/lib/krb5/keytab_any.c +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Copyright (c) 2001-2002 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 "krb5_locl.h" - -struct any_data { - krb5_keytab kt; - char *name; - struct any_data *next; -}; - -static void -free_list (krb5_context context, struct any_data *a) -{ - struct any_data *next; - - for (; a != NULL; a = next) { - next = a->next; - free (a->name); - if(a->kt) - krb5_kt_close(context, a->kt); - free (a); - } -} - -static krb5_error_code KRB5_CALLCONV -any_resolve(krb5_context context, const char *name, krb5_keytab id) -{ - struct any_data *a, *a0 = NULL, *prev = NULL; - krb5_error_code ret; - char buf[256]; - - while (strsep_copy(&name, ",", buf, sizeof(buf)) != -1) { - a = calloc(1, sizeof(*a)); - if (a == NULL) { - ret = ENOMEM; - goto fail; - } - if (a0 == NULL) { - a0 = a; - a->name = strdup(buf); - if (a->name == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto fail; - } - } else - a->name = NULL; - if (prev != NULL) - prev->next = a; - a->next = NULL; - ret = krb5_kt_resolve (context, buf, &a->kt); - if (ret) - goto fail; - prev = a; - } - if (a0 == NULL) { - krb5_set_error_message(context, ENOENT, N_("empty ANY: keytab", "")); - return ENOENT; - } - id->data = a0; - return 0; - fail: - free_list (context, a0); - return ret; -} - -static krb5_error_code KRB5_CALLCONV -any_get_name (krb5_context context, - krb5_keytab id, - char *name, - size_t namesize) -{ - struct any_data *a = id->data; - strlcpy(name, a->name, namesize); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -any_close (krb5_context context, - krb5_keytab id) -{ - struct any_data *a = id->data; - - free_list (context, a); - return 0; -} - -struct any_cursor_extra_data { - struct any_data *a; - krb5_kt_cursor cursor; -}; - -static krb5_error_code KRB5_CALLCONV -any_start_seq_get(krb5_context context, - krb5_keytab id, - krb5_kt_cursor *c) -{ - struct any_data *a = id->data; - struct any_cursor_extra_data *ed; - krb5_error_code ret; - - c->data = malloc (sizeof(struct any_cursor_extra_data)); - if(c->data == NULL){ - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ed = (struct any_cursor_extra_data *)c->data; - for (ed->a = a; ed->a != NULL; ed->a = ed->a->next) { - ret = krb5_kt_start_seq_get(context, ed->a->kt, &ed->cursor); - if (ret == 0) - break; - } - if (ed->a == NULL) { - free (c->data); - c->data = NULL; - krb5_clear_error_message (context); - return KRB5_KT_END; - } - return 0; -} - -static krb5_error_code KRB5_CALLCONV -any_next_entry (krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry, - krb5_kt_cursor *cursor) -{ - krb5_error_code ret, ret2; - struct any_cursor_extra_data *ed; - - ed = (struct any_cursor_extra_data *)cursor->data; - do { - ret = krb5_kt_next_entry(context, ed->a->kt, entry, &ed->cursor); - if (ret == 0) - return 0; - else if (ret != KRB5_KT_END) - return ret; - - ret2 = krb5_kt_end_seq_get (context, ed->a->kt, &ed->cursor); - if (ret2) - return ret2; - while ((ed->a = ed->a->next) != NULL) { - ret2 = krb5_kt_start_seq_get(context, ed->a->kt, &ed->cursor); - if (ret2 == 0) - break; - } - if (ed->a == NULL) { - krb5_clear_error_message (context); - return KRB5_KT_END; - } - } while (1); -} - -static krb5_error_code KRB5_CALLCONV -any_end_seq_get(krb5_context context, - krb5_keytab id, - krb5_kt_cursor *cursor) -{ - krb5_error_code ret = 0; - struct any_cursor_extra_data *ed; - - ed = (struct any_cursor_extra_data *)cursor->data; - if (ed->a != NULL) - ret = krb5_kt_end_seq_get(context, ed->a->kt, &ed->cursor); - free (ed); - cursor->data = NULL; - return ret; -} - -static krb5_error_code KRB5_CALLCONV -any_add_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry) -{ - struct any_data *a = id->data; - krb5_error_code ret; - while(a != NULL) { - ret = krb5_kt_add_entry(context, a->kt, entry); - if(ret != 0 && ret != KRB5_KT_NOWRITE) { - krb5_set_error_message(context, ret, - N_("failed to add entry to %s", ""), - a->name); - return ret; - } - a = a->next; - } - return 0; -} - -static krb5_error_code KRB5_CALLCONV -any_remove_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry) -{ - struct any_data *a = id->data; - krb5_error_code ret; - int found = 0; - while(a != NULL) { - ret = krb5_kt_remove_entry(context, a->kt, entry); - if(ret == 0) - found++; - else { - if(ret != KRB5_KT_NOWRITE && ret != KRB5_KT_NOTFOUND) { - krb5_set_error_message(context, ret, - N_("Failed to remove keytab " - "entry from %s", "keytab name"), - a->name); - return ret; - } - } - a = a->next; - } - if(!found) - return KRB5_KT_NOTFOUND; - return 0; -} - -const krb5_kt_ops krb5_any_ops = { - "ANY", - any_resolve, - any_get_name, - any_close, - NULL, /* destroy */ - NULL, /* get */ - any_start_seq_get, - any_next_entry, - any_end_seq_get, - any_add_entry, - any_remove_entry -}; diff --git a/kerberosV/src/lib/krb5/keytab_file.c b/kerberosV/src/lib/krb5/keytab_file.c deleted file mode 100644 index ccaf62fcb4c..00000000000 --- a/kerberosV/src/lib/krb5/keytab_file.c +++ /dev/null @@ -1,808 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -#define KRB5_KT_VNO_1 1 -#define KRB5_KT_VNO_2 2 -#define KRB5_KT_VNO KRB5_KT_VNO_2 - -#define KRB5_KT_FL_JAVA 1 - - -/* file operations -------------------------------------------- */ - -struct fkt_data { - char *filename; - int flags; -}; - -static krb5_error_code -krb5_kt_ret_data(krb5_context context, - krb5_storage *sp, - krb5_data *data) -{ - int ret; - int16_t size; - ret = krb5_ret_int16(sp, &size); - if(ret) - return ret; - data->length = size; - data->data = malloc(size); - if (data->data == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ret = krb5_storage_read(sp, data->data, size); - if(ret != size) - return (ret < 0)? errno : KRB5_KT_END; - return 0; -} - -static krb5_error_code -krb5_kt_ret_string(krb5_context context, - krb5_storage *sp, - heim_general_string *data) -{ - int ret; - int16_t size; - ret = krb5_ret_int16(sp, &size); - if(ret) - return ret; - *data = malloc(size + 1); - if (*data == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ret = krb5_storage_read(sp, *data, size); - (*data)[size] = '\0'; - if(ret != size) - return (ret < 0)? errno : KRB5_KT_END; - return 0; -} - -static krb5_error_code -krb5_kt_store_data(krb5_context context, - krb5_storage *sp, - krb5_data data) -{ - int ret; - ret = krb5_store_int16(sp, data.length); - if(ret < 0) - return ret; - ret = krb5_storage_write(sp, data.data, data.length); - if(ret != (int)data.length){ - if(ret < 0) - return errno; - return KRB5_KT_END; - } - return 0; -} - -static krb5_error_code -krb5_kt_store_string(krb5_storage *sp, - heim_general_string data) -{ - int ret; - size_t len = strlen(data); - ret = krb5_store_int16(sp, len); - if(ret < 0) - return ret; - ret = krb5_storage_write(sp, data, len); - if(ret != (int)len){ - if(ret < 0) - return errno; - return KRB5_KT_END; - } - return 0; -} - -static krb5_error_code -krb5_kt_ret_keyblock(krb5_context context, - struct fkt_data *fkt, - krb5_storage *sp, - krb5_keyblock *p) -{ - int ret; - int16_t tmp; - - ret = krb5_ret_int16(sp, &tmp); /* keytype + etype */ - if(ret) { - krb5_set_error_message(context, ret, - N_("Cant read keyblock from file %s", ""), - fkt->filename); - return ret; - } - p->keytype = tmp; - ret = krb5_kt_ret_data(context, sp, &p->keyvalue); - if (ret) - krb5_set_error_message(context, ret, - N_("Cant read keyblock from file %s", ""), - fkt->filename); - return ret; -} - -static krb5_error_code -krb5_kt_store_keyblock(krb5_context context, - struct fkt_data *fkt, - krb5_storage *sp, - krb5_keyblock *p) -{ - int ret; - - ret = krb5_store_int16(sp, p->keytype); /* keytype + etype */ - if(ret) { - krb5_set_error_message(context, ret, - N_("Cant store keyblock to file %s", ""), - fkt->filename); - return ret; - } - ret = krb5_kt_store_data(context, sp, p->keyvalue); - if (ret) - krb5_set_error_message(context, ret, - N_("Cant store keyblock to file %s", ""), - fkt->filename); - return ret; -} - - -static krb5_error_code -krb5_kt_ret_principal(krb5_context context, - struct fkt_data *fkt, - krb5_storage *sp, - krb5_principal *princ) -{ - size_t i; - int ret; - krb5_principal p; - int16_t len; - - ALLOC(p, 1); - if(p == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = krb5_ret_int16(sp, &len); - if(ret) { - krb5_set_error_message(context, ret, - N_("Failed decoding length of " - "keytab principal in keytab file %s", ""), - fkt->filename); - goto out; - } - if(krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS)) - len--; - if (len < 0) { - ret = KRB5_KT_END; - krb5_set_error_message(context, ret, - N_("Keytab principal contains " - "invalid length in keytab %s", ""), - fkt->filename); - goto out; - } - ret = krb5_kt_ret_string(context, sp, &p->realm); - if(ret) { - krb5_set_error_message(context, ret, - N_("Can't read realm from keytab: %s", ""), - fkt->filename); - goto out; - } - p->name.name_string.val = calloc(len, sizeof(*p->name.name_string.val)); - if(p->name.name_string.val == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - p->name.name_string.len = len; - for(i = 0; i < p->name.name_string.len; i++){ - ret = krb5_kt_ret_string(context, sp, p->name.name_string.val + i); - if(ret) { - krb5_set_error_message(context, ret, - N_("Can't read principal from " - "keytab: %s", ""), - fkt->filename); - goto out; - } - } - if (krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE)) - p->name.name_type = KRB5_NT_UNKNOWN; - else { - int32_t tmp32; - ret = krb5_ret_int32(sp, &tmp32); - p->name.name_type = tmp32; - if (ret) { - krb5_set_error_message(context, ret, - N_("Can't read name-type from " - "keytab: %s", ""), - fkt->filename); - goto out; - } - } - *princ = p; - return 0; -out: - krb5_free_principal(context, p); - return ret; -} - -static krb5_error_code -krb5_kt_store_principal(krb5_context context, - krb5_storage *sp, - krb5_principal p) -{ - size_t i; - int ret; - - if(krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS)) - ret = krb5_store_int16(sp, p->name.name_string.len + 1); - else - ret = krb5_store_int16(sp, p->name.name_string.len); - if(ret) return ret; - ret = krb5_kt_store_string(sp, p->realm); - if(ret) return ret; - for(i = 0; i < p->name.name_string.len; i++){ - ret = krb5_kt_store_string(sp, p->name.name_string.val[i]); - if(ret) - return ret; - } - if(!krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE)) { - ret = krb5_store_int32(sp, p->name.name_type); - if(ret) - return ret; - } - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fkt_resolve(krb5_context context, const char *name, krb5_keytab id) -{ - struct fkt_data *d; - - d = malloc(sizeof(*d)); - if(d == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - d->filename = strdup(name); - if(d->filename == NULL) { - free(d); - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - d->flags = 0; - id->data = d; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fkt_resolve_java14(krb5_context context, const char *name, krb5_keytab id) -{ - krb5_error_code ret; - - ret = fkt_resolve(context, name, id); - if (ret == 0) { - struct fkt_data *d = id->data; - d->flags |= KRB5_KT_FL_JAVA; - } - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fkt_close(krb5_context context, krb5_keytab id) -{ - struct fkt_data *d = id->data; - free(d->filename); - free(d); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fkt_destroy(krb5_context context, krb5_keytab id) -{ - struct fkt_data *d = id->data; - _krb5_erase_file(context, d->filename); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fkt_get_name(krb5_context context, - krb5_keytab id, - char *name, - size_t namesize) -{ - /* This function is XXX */ - struct fkt_data *d = id->data; - strlcpy(name, d->filename, namesize); - return 0; -} - -static void -storage_set_flags(krb5_context context, krb5_storage *sp, int vno) -{ - int flags = 0; - switch(vno) { - case KRB5_KT_VNO_1: - flags |= KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS; - flags |= KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE; - flags |= KRB5_STORAGE_HOST_BYTEORDER; - break; - case KRB5_KT_VNO_2: - break; - default: - krb5_warnx(context, - "storage_set_flags called with bad vno (%d)", vno); - } - krb5_storage_set_flags(sp, flags); -} - -static krb5_error_code -fkt_start_seq_get_int(krb5_context context, - krb5_keytab id, - int flags, - int exclusive, - krb5_kt_cursor *c) -{ - int8_t pvno, tag; - krb5_error_code ret; - struct fkt_data *d = id->data; - - c->fd = open (d->filename, flags); - if (c->fd < 0) { - ret = errno; - krb5_set_error_message(context, ret, - N_("keytab %s open failed: %s", ""), - d->filename, strerror(ret)); - return ret; - } - rk_cloexec(c->fd); - ret = _krb5_xlock(context, c->fd, exclusive, d->filename); - if (ret) { - close(c->fd); - return ret; - } - c->sp = krb5_storage_from_fd(c->fd); - if (c->sp == NULL) { - _krb5_xunlock(context, c->fd); - close(c->fd); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - krb5_storage_set_eof_code(c->sp, KRB5_KT_END); - ret = krb5_ret_int8(c->sp, &pvno); - if(ret) { - krb5_storage_free(c->sp); - _krb5_xunlock(context, c->fd); - close(c->fd); - krb5_clear_error_message(context); - return ret; - } - if(pvno != 5) { - krb5_storage_free(c->sp); - _krb5_xunlock(context, c->fd); - close(c->fd); - krb5_clear_error_message (context); - return KRB5_KEYTAB_BADVNO; - } - ret = krb5_ret_int8(c->sp, &tag); - if (ret) { - krb5_storage_free(c->sp); - _krb5_xunlock(context, c->fd); - close(c->fd); - krb5_clear_error_message(context); - return ret; - } - id->version = tag; - storage_set_flags(context, c->sp, id->version); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fkt_start_seq_get(krb5_context context, - krb5_keytab id, - krb5_kt_cursor *c) -{ - return fkt_start_seq_get_int(context, id, O_RDONLY | O_BINARY | O_CLOEXEC, 0, c); -} - -static krb5_error_code -fkt_next_entry_int(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry, - krb5_kt_cursor *cursor, - off_t *start, - off_t *end) -{ - struct fkt_data *d = id->data; - int32_t len; - int ret; - int8_t tmp8; - int32_t tmp32; - uint32_t utmp32; - off_t pos, curpos; - - pos = krb5_storage_seek(cursor->sp, 0, SEEK_CUR); -loop: - ret = krb5_ret_int32(cursor->sp, &len); - if (ret) - return ret; - if(len < 0) { - pos = krb5_storage_seek(cursor->sp, -len, SEEK_CUR); - goto loop; - } - ret = krb5_kt_ret_principal (context, d, cursor->sp, &entry->principal); - if (ret) - goto out; - ret = krb5_ret_uint32(cursor->sp, &utmp32); - entry->timestamp = utmp32; - if (ret) - goto out; - ret = krb5_ret_int8(cursor->sp, &tmp8); - if (ret) - goto out; - entry->vno = tmp8; - ret = krb5_kt_ret_keyblock (context, d, cursor->sp, &entry->keyblock); - if (ret) - goto out; - /* there might be a 32 bit kvno here - * if it's zero, assume that the 8bit one was right, - * otherwise trust the new value */ - curpos = krb5_storage_seek(cursor->sp, 0, SEEK_CUR); - if(len + 4 + pos - curpos >= 4) { - ret = krb5_ret_int32(cursor->sp, &tmp32); - if (ret == 0 && tmp32 != 0) - entry->vno = tmp32; - } - /* there might be a flags field here */ - if(len + 4 + pos - curpos >= 8) { - ret = krb5_ret_uint32(cursor->sp, &utmp32); - if (ret == 0) - entry->flags = utmp32; - } else - entry->flags = 0; - - entry->aliases = NULL; - - if(start) *start = pos; - if(end) *end = pos + 4 + len; - out: - krb5_storage_seek(cursor->sp, pos + 4 + len, SEEK_SET); - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fkt_next_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry, - krb5_kt_cursor *cursor) -{ - return fkt_next_entry_int(context, id, entry, cursor, NULL, NULL); -} - -static krb5_error_code KRB5_CALLCONV -fkt_end_seq_get(krb5_context context, - krb5_keytab id, - krb5_kt_cursor *cursor) -{ - krb5_storage_free(cursor->sp); - _krb5_xunlock(context, cursor->fd); - close(cursor->fd); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -fkt_setup_keytab(krb5_context context, - krb5_keytab id, - krb5_storage *sp) -{ - krb5_error_code ret; - ret = krb5_store_int8(sp, 5); - if(ret) - return ret; - if(id->version == 0) - id->version = KRB5_KT_VNO; - return krb5_store_int8 (sp, id->version); -} - -static krb5_error_code KRB5_CALLCONV -fkt_add_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry) -{ - int ret; - int fd; - krb5_storage *sp; - struct fkt_data *d = id->data; - krb5_data keytab; - int32_t len; - - fd = open (d->filename, O_RDWR | O_BINARY | O_CLOEXEC); - if (fd < 0) { - fd = open (d->filename, O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600); - if (fd < 0) { - ret = errno; - krb5_set_error_message(context, ret, - N_("open(%s): %s", ""), d->filename, - strerror(ret)); - return ret; - } - rk_cloexec(fd); - - ret = _krb5_xlock(context, fd, 1, d->filename); - if (ret) { - close(fd); - return ret; - } - sp = krb5_storage_from_fd(fd); - krb5_storage_set_eof_code(sp, KRB5_KT_END); - ret = fkt_setup_keytab(context, id, sp); - if(ret) { - goto out; - } - storage_set_flags(context, sp, id->version); - } else { - int8_t pvno, tag; - - rk_cloexec(fd); - - ret = _krb5_xlock(context, fd, 1, d->filename); - if (ret) { - close(fd); - return ret; - } - sp = krb5_storage_from_fd(fd); - krb5_storage_set_eof_code(sp, KRB5_KT_END); - ret = krb5_ret_int8(sp, &pvno); - if(ret) { - /* we probably have a zero byte file, so try to set it up - properly */ - ret = fkt_setup_keytab(context, id, sp); - if(ret) { - krb5_set_error_message(context, ret, - N_("%s: keytab is corrupted: %s", ""), - d->filename, strerror(ret)); - goto out; - } - storage_set_flags(context, sp, id->version); - } else { - if(pvno != 5) { - ret = KRB5_KEYTAB_BADVNO; - krb5_set_error_message(context, ret, - N_("Bad version in keytab %s", ""), - d->filename); - goto out; - } - ret = krb5_ret_int8 (sp, &tag); - if (ret) { - krb5_set_error_message(context, ret, - N_("failed reading tag from " - "keytab %s", ""), - d->filename); - goto out; - } - id->version = tag; - storage_set_flags(context, sp, id->version); - } - } - - { - krb5_storage *emem; - emem = krb5_storage_emem(); - if(emem == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto out; - } - ret = krb5_kt_store_principal(context, emem, entry->principal); - if(ret) { - krb5_set_error_message(context, ret, - N_("Failed storing principal " - "in keytab %s", ""), - d->filename); - krb5_storage_free(emem); - goto out; - } - ret = krb5_store_int32 (emem, entry->timestamp); - if(ret) { - krb5_set_error_message(context, ret, - N_("Failed storing timpstamp " - "in keytab %s", ""), - d->filename); - krb5_storage_free(emem); - goto out; - } - ret = krb5_store_int8 (emem, entry->vno % 256); - if(ret) { - krb5_set_error_message(context, ret, - N_("Failed storing kvno " - "in keytab %s", ""), - d->filename); - krb5_storage_free(emem); - goto out; - } - ret = krb5_kt_store_keyblock (context, d, emem, &entry->keyblock); - if(ret) { - krb5_storage_free(emem); - goto out; - } - if ((d->flags & KRB5_KT_FL_JAVA) == 0) { - ret = krb5_store_int32 (emem, entry->vno); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed storing extended kvno " - "in keytab %s", ""), - d->filename); - krb5_storage_free(emem); - goto out; - } - ret = krb5_store_uint32 (emem, entry->flags); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed storing extended kvno " - "in keytab %s", ""), - d->filename); - krb5_storage_free(emem); - goto out; - } - } - - ret = krb5_storage_to_data(emem, &keytab); - krb5_storage_free(emem); - if(ret) { - krb5_set_error_message(context, ret, - N_("Failed converting keytab entry " - "to memory block for keytab %s", ""), - d->filename); - goto out; - } - } - - while(1) { - ret = krb5_ret_int32(sp, &len); - if(ret == KRB5_KT_END) { - len = keytab.length; - break; - } - if(len < 0) { - len = -len; - if(len >= (int)keytab.length) { - krb5_storage_seek(sp, -4, SEEK_CUR); - break; - } - } - krb5_storage_seek(sp, len, SEEK_CUR); - } - ret = krb5_store_int32(sp, len); - if(krb5_storage_write(sp, keytab.data, keytab.length) < 0) { - ret = errno; - krb5_set_error_message(context, ret, - N_("Failed writing keytab block " - "in keytab %s: %s", ""), - d->filename, strerror(ret)); - } - memset(keytab.data, 0, keytab.length); - krb5_data_free(&keytab); - out: - krb5_storage_free(sp); - _krb5_xunlock(context, fd); - close(fd); - return ret; -} - -static krb5_error_code KRB5_CALLCONV -fkt_remove_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry) -{ - krb5_keytab_entry e; - krb5_kt_cursor cursor; - off_t pos_start, pos_end; - int found = 0; - krb5_error_code ret; - - ret = fkt_start_seq_get_int(context, id, O_RDWR | O_BINARY | O_CLOEXEC, 1, &cursor); - if(ret != 0) - goto out; /* return other error here? */ - while(fkt_next_entry_int(context, id, &e, &cursor, - &pos_start, &pos_end) == 0) { - if(krb5_kt_compare(context, &e, entry->principal, - entry->vno, entry->keyblock.keytype)) { - int32_t len; - unsigned char buf[128]; - found = 1; - krb5_storage_seek(cursor.sp, pos_start, SEEK_SET); - len = pos_end - pos_start - 4; - krb5_store_int32(cursor.sp, -len); - memset(buf, 0, sizeof(buf)); - while(len > 0) { - krb5_storage_write(cursor.sp, buf, - min((size_t)len, sizeof(buf))); - len -= min((size_t)len, sizeof(buf)); - } - } - krb5_kt_free_entry(context, &e); - } - krb5_kt_end_seq_get(context, id, &cursor); - out: - if (!found) { - krb5_clear_error_message (context); - return KRB5_KT_NOTFOUND; - } - return 0; -} - -const krb5_kt_ops krb5_fkt_ops = { - "FILE", - fkt_resolve, - fkt_get_name, - fkt_close, - fkt_destroy, - NULL, /* get */ - fkt_start_seq_get, - fkt_next_entry, - fkt_end_seq_get, - fkt_add_entry, - fkt_remove_entry -}; - -const krb5_kt_ops krb5_wrfkt_ops = { - "WRFILE", - fkt_resolve, - fkt_get_name, - fkt_close, - fkt_destroy, - NULL, /* get */ - fkt_start_seq_get, - fkt_next_entry, - fkt_end_seq_get, - fkt_add_entry, - fkt_remove_entry -}; - -const krb5_kt_ops krb5_javakt_ops = { - "JAVA14", - fkt_resolve_java14, - fkt_get_name, - fkt_close, - fkt_destroy, - NULL, /* get */ - fkt_start_seq_get, - fkt_next_entry, - fkt_end_seq_get, - fkt_add_entry, - fkt_remove_entry -}; diff --git a/kerberosV/src/lib/krb5/keytab_keyfile.c b/kerberosV/src/lib/krb5/keytab_keyfile.c deleted file mode 100644 index 12008321554..00000000000 --- a/kerberosV/src/lib/krb5/keytab_keyfile.c +++ /dev/null @@ -1,468 +0,0 @@ -/* - * Copyright (c) 1997 - 2007 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 "krb5_locl.h" - -#ifndef HEIMDAL_SMALLER - -/* afs keyfile operations --------------------------------------- */ - -/* - * Minimum tools to handle the AFS KeyFile. - * - * Format of the KeyFile is: - * {[ ] * numkeys} - * - * It just adds to the end of the keyfile, deleting isn't implemented. - * Use your favorite text/hex editor to delete keys. - * - */ - -#define AFS_SERVERTHISCELL "/usr/afs/etc/ThisCell" -#define AFS_SERVERMAGICKRBCONF "/usr/afs/etc/krb.conf" - -struct akf_data { - uint32_t num_entries; - char *filename; - char *cell; - char *realm; -}; - -/* - * set `d->cell' and `d->realm' - */ - -static int -get_cell_and_realm (krb5_context context, struct akf_data *d) -{ - FILE *f; - char buf[BUFSIZ], *cp; - int ret; - - f = fopen (AFS_SERVERTHISCELL, "r"); - if (f == NULL) { - ret = errno; - krb5_set_error_message (context, ret, - N_("Open ThisCell %s: %s", ""), - AFS_SERVERTHISCELL, - strerror(ret)); - return ret; - } - if (fgets (buf, sizeof(buf), f) == NULL) { - fclose (f); - krb5_set_error_message (context, EINVAL, - N_("No cell in ThisCell file %s", ""), - AFS_SERVERTHISCELL); - return EINVAL; - } - buf[strcspn(buf, "\n")] = '\0'; - fclose(f); - - d->cell = strdup (buf); - if (d->cell == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - f = fopen (AFS_SERVERMAGICKRBCONF, "r"); - if (f != NULL) { - if (fgets (buf, sizeof(buf), f) == NULL) { - free (d->cell); - d->cell = NULL; - fclose (f); - krb5_set_error_message (context, EINVAL, - N_("No realm in ThisCell file %s", ""), - AFS_SERVERMAGICKRBCONF); - return EINVAL; - } - buf[strcspn(buf, "\n")] = '\0'; - fclose(f); - } - /* uppercase */ - for (cp = buf; *cp != '\0'; cp++) - *cp = toupper((unsigned char)*cp); - - d->realm = strdup (buf); - if (d->realm == NULL) { - free (d->cell); - d->cell = NULL; - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -/* - * init and get filename - */ - -static krb5_error_code KRB5_CALLCONV -akf_resolve(krb5_context context, const char *name, krb5_keytab id) -{ - int ret; - struct akf_data *d = malloc(sizeof (struct akf_data)); - - if (d == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - d->num_entries = 0; - ret = get_cell_and_realm (context, d); - if (ret) { - free (d); - return ret; - } - d->filename = strdup (name); - if (d->filename == NULL) { - free (d->cell); - free (d->realm); - free (d); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - id->data = d; - - return 0; -} - -/* - * cleanup - */ - -static krb5_error_code KRB5_CALLCONV -akf_close(krb5_context context, krb5_keytab id) -{ - struct akf_data *d = id->data; - - free (d->filename); - free (d->cell); - free (d); - return 0; -} - -/* - * Return filename - */ - -static krb5_error_code KRB5_CALLCONV -akf_get_name(krb5_context context, - krb5_keytab id, - char *name, - size_t name_sz) -{ - struct akf_data *d = id->data; - - strlcpy (name, d->filename, name_sz); - return 0; -} - -/* - * Init - */ - -static krb5_error_code KRB5_CALLCONV -akf_start_seq_get(krb5_context context, - krb5_keytab id, - krb5_kt_cursor *c) -{ - int32_t ret; - struct akf_data *d = id->data; - - c->fd = open (d->filename, O_RDONLY | O_BINARY | O_CLOEXEC, 0600); - if (c->fd < 0) { - ret = errno; - krb5_set_error_message(context, ret, - N_("keytab afs keyfile open %s failed: %s", ""), - d->filename, strerror(ret)); - return ret; - } - - c->data = NULL; - c->sp = krb5_storage_from_fd(c->fd); - if (c->sp == NULL) { - close(c->fd); - krb5_clear_error_message (context); - return KRB5_KT_NOTFOUND; - } - krb5_storage_set_eof_code(c->sp, KRB5_KT_END); - - ret = krb5_ret_uint32(c->sp, &d->num_entries); - if(ret || d->num_entries > INT_MAX / 8) { - krb5_storage_free(c->sp); - close(c->fd); - krb5_clear_error_message (context); - if(ret == KRB5_KT_END) - return KRB5_KT_NOTFOUND; - return ret; - } - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -akf_next_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry, - krb5_kt_cursor *cursor) -{ - struct akf_data *d = id->data; - int32_t kvno; - off_t pos; - int ret; - - pos = krb5_storage_seek(cursor->sp, 0, SEEK_CUR); - - if ((pos - 4) / (4 + 8) >= d->num_entries) - return KRB5_KT_END; - - ret = krb5_make_principal (context, &entry->principal, - d->realm, "afs", d->cell, NULL); - if (ret) - goto out; - - ret = krb5_ret_int32(cursor->sp, &kvno); - if (ret) { - krb5_free_principal (context, entry->principal); - goto out; - } - - entry->vno = kvno; - - if (cursor->data) - entry->keyblock.keytype = ETYPE_DES_CBC_MD5; - else - entry->keyblock.keytype = ETYPE_DES_CBC_CRC; - entry->keyblock.keyvalue.length = 8; - entry->keyblock.keyvalue.data = malloc (8); - if (entry->keyblock.keyvalue.data == NULL) { - krb5_free_principal (context, entry->principal); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - ret = ENOMEM; - goto out; - } - - ret = krb5_storage_read(cursor->sp, entry->keyblock.keyvalue.data, 8); - if(ret != 8) - ret = (ret < 0) ? errno : KRB5_KT_END; - else - ret = 0; - - entry->timestamp = time(NULL); - entry->flags = 0; - entry->aliases = NULL; - - out: - if (cursor->data) { - krb5_storage_seek(cursor->sp, pos + 4 + 8, SEEK_SET); - cursor->data = NULL; - } else - cursor->data = cursor; - return ret; -} - -static krb5_error_code KRB5_CALLCONV -akf_end_seq_get(krb5_context context, - krb5_keytab id, - krb5_kt_cursor *cursor) -{ - krb5_storage_free(cursor->sp); - close(cursor->fd); - cursor->data = NULL; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -akf_add_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry) -{ - struct akf_data *d = id->data; - int fd, created = 0; - krb5_error_code ret; - int32_t len; - krb5_storage *sp; - - - if (entry->keyblock.keyvalue.length != 8) - return 0; - switch(entry->keyblock.keytype) { - case ETYPE_DES_CBC_CRC: - case ETYPE_DES_CBC_MD4: - case ETYPE_DES_CBC_MD5: - break; - default: - return 0; - } - - fd = open (d->filename, O_RDWR | O_BINARY | O_CLOEXEC); - if (fd < 0) { - fd = open (d->filename, - O_RDWR | O_BINARY | O_CREAT | O_EXCL | O_CLOEXEC, 0600); - if (fd < 0) { - ret = errno; - krb5_set_error_message(context, ret, - N_("open keyfile(%s): %s", ""), - d->filename, - strerror(ret)); - return ret; - } - created = 1; - } - - sp = krb5_storage_from_fd(fd); - if(sp == NULL) { - close(fd); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - if (created) - len = 0; - else { - if(krb5_storage_seek(sp, 0, SEEK_SET) < 0) { - ret = errno; - krb5_storage_free(sp); - close(fd); - krb5_set_error_message(context, ret, - N_("seeking in keyfile: %s", ""), - strerror(ret)); - return ret; - } - - ret = krb5_ret_int32(sp, &len); - if(ret) { - krb5_storage_free(sp); - close(fd); - return ret; - } - } - - /* - * Make sure we don't add the entry twice, assumes the DES - * encryption types are all the same key. - */ - if (len > 0) { - int32_t kvno; - int i; - - for (i = 0; i < len; i++) { - ret = krb5_ret_int32(sp, &kvno); - if (ret) { - krb5_set_error_message (context, ret, - N_("Failed getting kvno from keyfile", "")); - goto out; - } - if(krb5_storage_seek(sp, 8, SEEK_CUR) < 0) { - ret = errno; - krb5_set_error_message (context, ret, - N_("Failed seeing in keyfile: %s", ""), - strerror(ret)); - goto out; - } - if (kvno == entry->vno) { - ret = 0; - goto out; - } - } - } - - len++; - - if(krb5_storage_seek(sp, 0, SEEK_SET) < 0) { - ret = errno; - krb5_set_error_message (context, ret, - N_("Failed seeing in keyfile: %s", ""), - strerror(ret)); - goto out; - } - - ret = krb5_store_int32(sp, len); - if(ret) { - ret = errno; - krb5_set_error_message (context, ret, - N_("keytab keyfile failed new length", "")); - return ret; - } - - if(krb5_storage_seek(sp, (len - 1) * (8 + 4), SEEK_CUR) < 0) { - ret = errno; - krb5_set_error_message (context, ret, - N_("seek to end: %s", ""), strerror(ret)); - goto out; - } - - ret = krb5_store_int32(sp, entry->vno); - if(ret) { - krb5_set_error_message(context, ret, - N_("keytab keyfile failed store kvno", "")); - goto out; - } - ret = krb5_storage_write(sp, entry->keyblock.keyvalue.data, - entry->keyblock.keyvalue.length); - if(ret != entry->keyblock.keyvalue.length) { - if (ret < 0) - ret = errno; - else - ret = ENOTTY; - krb5_set_error_message(context, ret, - N_("keytab keyfile failed to add key", "")); - goto out; - } - ret = 0; -out: - krb5_storage_free(sp); - close (fd); - return ret; -} - -const krb5_kt_ops krb5_akf_ops = { - "AFSKEYFILE", - akf_resolve, - akf_get_name, - akf_close, - NULL, /* destroy */ - NULL, /* get */ - akf_start_seq_get, - akf_next_entry, - akf_end_seq_get, - akf_add_entry, - NULL /* remove */ -}; - -#endif /* HEIMDAL_SMALLER */ diff --git a/kerberosV/src/lib/krb5/keytab_memory.c b/kerberosV/src/lib/krb5/keytab_memory.c deleted file mode 100644 index 0ee684d3638..00000000000 --- a/kerberosV/src/lib/krb5/keytab_memory.c +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -/* memory operations -------------------------------------------- */ - -struct mkt_data { - krb5_keytab_entry *entries; - int num_entries; - char *name; - int refcount; - struct mkt_data *next; -}; - -/* this mutex protects mkt_head, ->refcount, and ->next - * content is not protected (name is static and need no protection) - */ -static HEIMDAL_MUTEX mkt_mutex = HEIMDAL_MUTEX_INITIALIZER; -static struct mkt_data *mkt_head; - - -static krb5_error_code KRB5_CALLCONV -mkt_resolve(krb5_context context, const char *name, krb5_keytab id) -{ - struct mkt_data *d; - - HEIMDAL_MUTEX_lock(&mkt_mutex); - - for (d = mkt_head; d != NULL; d = d->next) - if (strcmp(d->name, name) == 0) - break; - if (d) { - if (d->refcount < 1) - krb5_abortx(context, "Double close on memory keytab, " - "refcount < 1 %d", d->refcount); - d->refcount++; - id->data = d; - HEIMDAL_MUTEX_unlock(&mkt_mutex); - return 0; - } - - d = calloc(1, sizeof(*d)); - if(d == NULL) { - HEIMDAL_MUTEX_unlock(&mkt_mutex); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - d->name = strdup(name); - if (d->name == NULL) { - HEIMDAL_MUTEX_unlock(&mkt_mutex); - free(d); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - d->entries = NULL; - d->num_entries = 0; - d->refcount = 1; - d->next = mkt_head; - mkt_head = d; - HEIMDAL_MUTEX_unlock(&mkt_mutex); - id->data = d; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mkt_close(krb5_context context, krb5_keytab id) -{ - struct mkt_data *d = id->data, **dp; - int i; - - HEIMDAL_MUTEX_lock(&mkt_mutex); - if (d->refcount < 1) - krb5_abortx(context, - "krb5 internal error, memory keytab refcount < 1 on close"); - - if (--d->refcount > 0) { - HEIMDAL_MUTEX_unlock(&mkt_mutex); - return 0; - } - for (dp = &mkt_head; *dp != NULL; dp = &(*dp)->next) { - if (*dp == d) { - *dp = d->next; - break; - } - } - HEIMDAL_MUTEX_unlock(&mkt_mutex); - - free(d->name); - for(i = 0; i < d->num_entries; i++) - krb5_kt_free_entry(context, &d->entries[i]); - free(d->entries); - free(d); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mkt_get_name(krb5_context context, - krb5_keytab id, - char *name, - size_t namesize) -{ - struct mkt_data *d = id->data; - strlcpy(name, d->name, namesize); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mkt_start_seq_get(krb5_context context, - krb5_keytab id, - krb5_kt_cursor *c) -{ - /* XXX */ - c->fd = 0; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mkt_next_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry, - krb5_kt_cursor *c) -{ - struct mkt_data *d = id->data; - if(c->fd >= d->num_entries) - return KRB5_KT_END; - return krb5_kt_copy_entry_contents(context, &d->entries[c->fd++], entry); -} - -static krb5_error_code KRB5_CALLCONV -mkt_end_seq_get(krb5_context context, - krb5_keytab id, - krb5_kt_cursor *cursor) -{ - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mkt_add_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry) -{ - struct mkt_data *d = id->data; - krb5_keytab_entry *tmp; - tmp = realloc(d->entries, (d->num_entries + 1) * sizeof(*d->entries)); - if(tmp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - d->entries = tmp; - return krb5_kt_copy_entry_contents(context, entry, - &d->entries[d->num_entries++]); -} - -static krb5_error_code KRB5_CALLCONV -mkt_remove_entry(krb5_context context, - krb5_keytab id, - krb5_keytab_entry *entry) -{ - struct mkt_data *d = id->data; - krb5_keytab_entry *e, *end; - int found = 0; - - if (d->num_entries == 0) { - krb5_clear_error_message(context); - return KRB5_KT_NOTFOUND; - } - - /* do this backwards to minimize copying */ - for(end = d->entries + d->num_entries, e = end - 1; e >= d->entries; e--) { - if(krb5_kt_compare(context, e, entry->principal, - entry->vno, entry->keyblock.keytype)) { - krb5_kt_free_entry(context, e); - memmove(e, e + 1, (end - e - 1) * sizeof(*e)); - memset(end - 1, 0, sizeof(*end)); - d->num_entries--; - end--; - found = 1; - } - } - if (!found) { - krb5_clear_error_message (context); - return KRB5_KT_NOTFOUND; - } - e = realloc(d->entries, d->num_entries * sizeof(*d->entries)); - if(e != NULL || d->num_entries == 0) - d->entries = e; - return 0; -} - -const krb5_kt_ops krb5_mkt_ops = { - "MEMORY", - mkt_resolve, - mkt_get_name, - mkt_close, - NULL, /* destroy */ - NULL, /* get */ - mkt_start_seq_get, - mkt_next_entry, - mkt_end_seq_get, - mkt_add_entry, - mkt_remove_entry -}; diff --git a/kerberosV/src/lib/krb5/krb5-private.h b/kerberosV/src/lib/krb5/krb5-private.h deleted file mode 100644 index 956e00e4aaf..00000000000 --- a/kerberosV/src/lib/krb5/krb5-private.h +++ /dev/null @@ -1,593 +0,0 @@ -/* This is a generated file */ -#ifndef __krb5_private_h__ -#define __krb5_private_h__ - -#include - -#if !defined(__GNUC__) && !defined(__attribute__) -#define __attribute__(x) -#endif - -#ifndef KRB5_DEPRECATED_FUNCTION -#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) -#define KRB5_DEPRECATED_FUNCTION(X) __attribute__((__deprecated__)) -#else -#define KRB5_DEPRECATED_FUNCTION(X) -#endif -#endif - - -void -_heim_krb5_ipc_client_clear_target (void); - -void -_heim_krb5_ipc_client_set_target_uid (uid_t /*uid*/); - -void -_krb5_DES3_random_to_key ( - krb5_context /*context*/, - krb5_keyblock */*key*/, - const void */*data*/, - size_t /*size*/); - -krb5_error_code -_krb5_HMAC_MD5_checksum ( - krb5_context /*context*/, - struct _krb5_key_data */*key*/, - const void */*data*/, - size_t /*len*/, - unsigned /*usage*/, - Checksum */*result*/); - -krb5_error_code -_krb5_SP_HMAC_SHA1_checksum ( - krb5_context /*context*/, - struct _krb5_key_data */*key*/, - const void */*data*/, - size_t /*len*/, - unsigned /*usage*/, - Checksum */*result*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_build_authenticator ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_enctype /*enctype*/, - krb5_creds */*cred*/, - Checksum */*cksum*/, - krb5_data */*result*/, - krb5_key_usage /*usage*/); - -krb5_error_code -_krb5_cc_allocate ( - krb5_context /*context*/, - const krb5_cc_ops */*ops*/, - krb5_ccache */*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_config_copy ( - krb5_context /*context*/, - krb5_config_section */*c*/, - krb5_config_section **/*head*/); - -KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL -_krb5_config_get ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - int /*type*/, - ...); - -krb5_config_section * -_krb5_config_get_entry ( - krb5_config_section **/*parent*/, - const char */*name*/, - int /*type*/); - -KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL -_krb5_config_get_next ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - const krb5_config_binding **/*pointer*/, - int /*type*/, - ...); - -const void * -_krb5_config_vget ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - int /*type*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL -_krb5_config_vget_next ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - const krb5_config_binding **/*pointer*/, - int /*type*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_copy_send_to_kdc_func ( - krb5_context /*context*/, - krb5_context /*to*/); - -void -_krb5_crc_init_table (void); - -uint32_t -_krb5_crc_update ( - const char */*p*/, - size_t /*len*/, - uint32_t /*res*/); - -void KRB5_LIB_FUNCTION -_krb5_debug ( - krb5_context /*context*/, - int /*level*/, - const char */*fmt*/, - ...) - __attribute__((format (printf, 3, 4))); - -void -_krb5_debug_backtrace (krb5_context /*context*/); - -krb5_error_code -_krb5_derive_key ( - krb5_context /*context*/, - struct _krb5_encryption_type */*et*/, - struct _krb5_key_data */*key*/, - const void */*constant*/, - size_t /*len*/); - -krb5_error_code -_krb5_des_checksum ( - krb5_context /*context*/, - const EVP_MD */*evp_md*/, - struct _krb5_key_data */*key*/, - const void */*data*/, - size_t /*len*/, - Checksum */*cksum*/); - -krb5_error_code -_krb5_des_verify ( - krb5_context /*context*/, - const EVP_MD */*evp_md*/, - struct _krb5_key_data */*key*/, - const void */*data*/, - size_t /*len*/, - Checksum */*C*/); - -krb5_error_code -_krb5_dh_group_ok ( - krb5_context /*context*/, - unsigned long /*bits*/, - heim_integer */*p*/, - heim_integer */*g*/, - heim_integer */*q*/, - struct krb5_dh_moduli **/*moduli*/, - char **/*name*/); - -krb5_error_code -_krb5_einval ( - krb5_context /*context*/, - const char */*func*/, - unsigned long /*argn*/); - -krb5_error_code -_krb5_erase_file ( - krb5_context /*context*/, - const char */*filename*/); - -void -_krb5_evp_cleanup ( - krb5_context /*context*/, - struct _krb5_key_data */*kd*/); - -krb5_error_code -_krb5_evp_encrypt ( - krb5_context /*context*/, - struct _krb5_key_data */*key*/, - void */*data*/, - size_t /*len*/, - krb5_boolean /*encryptp*/, - int /*usage*/, - void */*ivec*/); - -krb5_error_code -_krb5_evp_encrypt_cts ( - krb5_context /*context*/, - struct _krb5_key_data */*key*/, - void */*data*/, - size_t /*len*/, - krb5_boolean /*encryptp*/, - int /*usage*/, - void */*ivec*/); - -void -_krb5_evp_schedule ( - krb5_context /*context*/, - struct _krb5_key_type */*kt*/, - struct _krb5_key_data */*kd*/); - -krb5_error_code -_krb5_expand_default_cc_name ( - krb5_context /*context*/, - const char */*str*/, - char **/*res*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_expand_path_tokens ( - krb5_context /*context*/, - const char */*path_in*/, - char **/*ppath_out*/); - -int -_krb5_extract_ticket ( - krb5_context /*context*/, - krb5_kdc_rep */*rep*/, - krb5_creds */*creds*/, - krb5_keyblock */*key*/, - krb5_const_pointer /*keyseed*/, - krb5_key_usage /*key_usage*/, - krb5_addresses */*addrs*/, - unsigned /*nonce*/, - unsigned /*flags*/, - krb5_decrypt_proc /*decrypt_proc*/, - krb5_const_pointer /*decryptarg*/); - -struct _krb5_checksum_type * -_krb5_find_checksum (krb5_cksumtype /*type*/); - -struct _krb5_encryption_type * -_krb5_find_enctype (krb5_enctype /*type*/); - -void -_krb5_free_key_data ( - krb5_context /*context*/, - struct _krb5_key_data */*key*/, - struct _krb5_encryption_type */*et*/); - -void -_krb5_free_krbhst_info (krb5_krbhst_info */*hi*/); - -void -_krb5_free_moduli (struct krb5_dh_moduli **/*moduli*/); - -krb5_error_code -_krb5_get_cred_kdc_any ( - krb5_context /*context*/, - krb5_kdc_flags /*flags*/, - krb5_ccache /*ccache*/, - krb5_creds */*in_creds*/, - krb5_principal /*impersonate_principal*/, - Ticket */*second_ticket*/, - krb5_creds **/*out_creds*/, - krb5_creds ***/*ret_tgts*/); - -char * -_krb5_get_default_cc_name_from_registry (krb5_context /*context*/); - -char * -_krb5_get_default_config_config_files_from_registry (void); - -krb5_error_code -_krb5_get_default_principal_local ( - krb5_context /*context*/, - krb5_principal */*princ*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_get_host_realm_int ( - krb5_context /*context*/, - const char */*host*/, - krb5_boolean /*use_dns*/, - krb5_realm **/*realms*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -_krb5_get_init_creds_opt_free_pkinit (krb5_get_init_creds_opt */*opt*/); - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -_krb5_get_int ( - void */*buffer*/, - unsigned long */*value*/, - size_t /*size*/); - -krb5_error_code -_krb5_get_krbtgt ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_realm /*realm*/, - krb5_creds **/*cred*/); - -krb5_boolean KRB5_LIB_FUNCTION -_krb5_have_debug ( - krb5_context /*context*/, - int /*level*/); - -krb5_boolean -_krb5_homedir_access (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_init_etype ( - krb5_context /*context*/, - krb5_pdu /*pdu_type*/, - unsigned */*len*/, - krb5_enctype **/*val*/, - const krb5_enctype */*etypes*/); - -krb5_error_code -_krb5_internal_hmac ( - krb5_context /*context*/, - struct _krb5_checksum_type */*cm*/, - const void */*data*/, - size_t /*len*/, - unsigned /*usage*/, - struct _krb5_key_data */*keyblock*/, - Checksum */*result*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_kcm_get_initial_ticket ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_principal /*server*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_kcm_get_ticket ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_kdc_flags /*flags*/, - krb5_enctype /*enctype*/, - krb5_principal /*server*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -_krb5_kcm_is_running (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_kcm_noop ( - krb5_context /*context*/, - krb5_ccache /*id*/); - -krb5_error_code KRB5_CALLCONV -_krb5_kdc_retry ( - krb5_context /*context*/, - krb5_sendto_ctx /*ctx*/, - void */*data*/, - const krb5_data */*reply*/, - int */*action*/); - -krb5_error_code -_krb5_krbhost_info_move ( - krb5_context /*context*/, - krb5_krbhst_info */*from*/, - krb5_krbhst_info **/*to*/); - -const char * -_krb5_krbhst_get_realm (krb5_krbhst_handle /*handle*/); - -krb5_error_code -_krb5_kt_principal_not_found ( - krb5_context /*context*/, - krb5_error_code /*ret*/, - krb5_keytab /*id*/, - krb5_const_principal /*principal*/, - krb5_enctype /*enctype*/, - int /*kvno*/); - -krb5_error_code -_krb5_load_ccache_plugins (krb5_context /*context*/); - -void -_krb5_load_plugins ( - krb5_context /*context*/, - const char */*name*/, - const char **/*paths*/); - -krb5_error_code -_krb5_mk_req_internal ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - const krb5_flags /*ap_req_options*/, - krb5_data */*in_data*/, - krb5_creds */*in_creds*/, - krb5_data */*outbuf*/, - krb5_key_usage /*checksum_usage*/, - krb5_key_usage /*encrypt_usage*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_n_fold ( - const void */*str*/, - size_t /*len*/, - void */*key*/, - size_t /*size*/); - -krb5_error_code -_krb5_pac_sign ( - krb5_context /*context*/, - krb5_pac /*p*/, - time_t /*authtime*/, - krb5_principal /*principal*/, - const krb5_keyblock */*server_key*/, - const krb5_keyblock */*priv_key*/, - krb5_data */*data*/); - -krb5_error_code -_krb5_parse_moduli ( - krb5_context /*context*/, - const char */*file*/, - struct krb5_dh_moduli ***/*moduli*/); - -krb5_error_code -_krb5_parse_moduli_line ( - krb5_context /*context*/, - const char */*file*/, - int /*lineno*/, - char */*p*/, - struct krb5_dh_moduli **/*m*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -_krb5_pk_cert_free (struct krb5_pk_cert */*cert*/); - -krb5_error_code -_krb5_pk_kdf ( - krb5_context /*context*/, - const struct AlgorithmIdentifier */*ai*/, - const void */*dhdata*/, - size_t /*dhsize*/, - krb5_const_principal /*client*/, - krb5_const_principal /*server*/, - krb5_enctype /*enctype*/, - const krb5_data */*as_req*/, - const krb5_data */*pk_as_rep*/, - const Ticket */*ticket*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_pk_load_id ( - krb5_context /*context*/, - struct krb5_pk_identity **/*ret_id*/, - const char */*user_id*/, - const char */*anchor_id*/, - char * const */*chain_list*/, - char * const */*revoke_list*/, - krb5_prompter_fct /*prompter*/, - void */*prompter_data*/, - char */*password*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_pk_mk_ContentInfo ( - krb5_context /*context*/, - const krb5_data */*buf*/, - const heim_oid */*oid*/, - struct ContentInfo */*content_info*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_pk_mk_padata ( - krb5_context /*context*/, - void */*c*/, - int /*ic_flags*/, - int /*win2k*/, - const KDC_REQ_BODY */*req_body*/, - unsigned /*nonce*/, - METHOD_DATA */*md*/); - -krb5_error_code -_krb5_pk_octetstring2key ( - krb5_context /*context*/, - krb5_enctype /*type*/, - const void */*dhdata*/, - size_t /*dhsize*/, - const heim_octet_string */*c_n*/, - const heim_octet_string */*k_n*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_pk_rd_pa_reply ( - krb5_context /*context*/, - const char */*realm*/, - void */*c*/, - krb5_enctype /*etype*/, - const krb5_krbhst_info */*hi*/, - unsigned /*nonce*/, - const krb5_data */*req_buffer*/, - PA_DATA */*pa*/, - krb5_keyblock **/*key*/); - -krb5_error_code -_krb5_plugin_find ( - krb5_context /*context*/, - enum krb5_plugin_type /*type*/, - const char */*name*/, - struct krb5_plugin **/*list*/); - -void -_krb5_plugin_free (struct krb5_plugin */*list*/); - -struct krb5_plugin * -_krb5_plugin_get_next (struct krb5_plugin */*p*/); - -void * -_krb5_plugin_get_symbol (struct krb5_plugin */*p*/); - -krb5_error_code -_krb5_plugin_run_f ( - krb5_context /*context*/, - const char */*module*/, - const char */*name*/, - int /*min_version*/, - int /*flags*/, - void */*userctx*/, - krb5_error_code (*/*func*/)(krb5_context, const void *, void *, void *)); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_principal2principalname ( - PrincipalName */*p*/, - const krb5_principal /*from*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -_krb5_principal_compare_PrincipalName ( - krb5_context /*context*/, - krb5_const_principal /*princ1*/, - PrincipalName */*princ2*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_principalname2krb5_principal ( - krb5_context /*context*/, - krb5_principal */*principal*/, - const PrincipalName /*from*/, - const Realm /*realm*/); - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -_krb5_put_int ( - void */*buffer*/, - unsigned long /*value*/, - size_t /*size*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_s4u2self_to_checksumdata ( - krb5_context /*context*/, - const PA_S4U2Self */*self*/, - krb5_data */*data*/); - -int -_krb5_send_and_recv_tcp ( - krb5_socket_t /*fd*/, - time_t /*tmout*/, - const krb5_data */*req*/, - krb5_data */*rep*/); - -int -_krb5_set_default_cc_name_to_registry ( - krb5_context /*context*/, - krb5_ccache /*id*/); - -void -_krb5_unload_plugins ( - krb5_context /*context*/, - const char */*name*/); - -krb5_error_code -_krb5_usage2arcfour ( - krb5_context /*context*/, - unsigned */*usage*/); - -int -_krb5_xlock ( - krb5_context /*context*/, - int /*fd*/, - krb5_boolean /*exclusive*/, - const char */*filename*/); - -void -_krb5_xor ( - DES_cblock */*key*/, - const unsigned char */*b*/); - -int -_krb5_xunlock ( - krb5_context /*context*/, - int /*fd*/); - -#undef KRB5_DEPRECATED_FUNCTION -#define KRB5_DEPRECATED_FUNCTION(X) - -#endif /* __krb5_private_h__ */ diff --git a/kerberosV/src/lib/krb5/krb5-protos.h b/kerberosV/src/lib/krb5/krb5-protos.h deleted file mode 100644 index c72e796afe2..00000000000 --- a/kerberosV/src/lib/krb5/krb5-protos.h +++ /dev/null @@ -1,4527 +0,0 @@ -/* This is a generated file */ -#ifndef __krb5_protos_h__ -#define __krb5_protos_h__ - -#include - -#if !defined(__GNUC__) && !defined(__attribute__) -#define __attribute__(x) -#endif - -#ifndef KRB5_DEPRECATED_FUNCTION -#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) -#define KRB5_DEPRECATED_FUNCTION(X) __attribute__((__deprecated__)) -#else -#define KRB5_DEPRECATED_FUNCTION(X) -#endif -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef KRB5_LIB -#ifndef KRB5_LIB_FUNCTION -#if defined(_WIN32) -#define KRB5_LIB_FUNCTION __declspec(dllimport) -#define KRB5_LIB_CALL __stdcall -#define KRB5_LIB_VARIABLE __declspec(dllimport) -#else -#define KRB5_LIB_FUNCTION -#define KRB5_LIB_CALL -#define KRB5_LIB_VARIABLE -#endif -#endif -#endif -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb524_convert_creds_kdc ( - krb5_context /*context*/, - krb5_creds */*in_cred*/, - struct credentials */*v4creds*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb524_convert_creds_kdc_ccache ( - krb5_context /*context*/, - krb5_ccache /*ccache*/, - krb5_creds */*in_cred*/, - struct credentials */*v4creds*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_abort ( - krb5_context /*context*/, - krb5_error_code /*code*/, - const char */*fmt*/, - ...) - __attribute__ ((noreturn, format (printf, 3, 4))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_abortx ( - krb5_context /*context*/, - const char */*fmt*/, - ...) - __attribute__ ((noreturn, format (printf, 2, 3))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_acl_match_file ( - krb5_context /*context*/, - const char */*file*/, - const char */*format*/, - ...); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_acl_match_string ( - krb5_context /*context*/, - const char */*string*/, - const char */*format*/, - ...); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_add_et_list ( - krb5_context /*context*/, - void (*/*func*/)(struct et_list **)); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_add_extra_addresses ( - krb5_context /*context*/, - krb5_addresses */*addresses*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_add_ignore_addresses ( - krb5_context /*context*/, - krb5_addresses */*addresses*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_addlog_dest ( - krb5_context /*context*/, - krb5_log_facility */*f*/, - const char */*orig*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_addlog_func ( - krb5_context /*context*/, - krb5_log_facility */*fac*/, - int /*min*/, - int /*max*/, - krb5_log_log_func_t /*log_func*/, - krb5_log_close_func_t /*close_func*/, - void */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_addr2sockaddr ( - krb5_context /*context*/, - const krb5_address */*addr*/, - struct sockaddr */*sa*/, - krb5_socklen_t */*sa_size*/, - int /*port*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_address_compare ( - krb5_context /*context*/, - const krb5_address */*addr1*/, - const krb5_address */*addr2*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_address_order ( - krb5_context /*context*/, - const krb5_address */*addr1*/, - const krb5_address */*addr2*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_address_prefixlen_boundary ( - krb5_context /*context*/, - const krb5_address */*inaddr*/, - unsigned long /*prefixlen*/, - krb5_address */*low*/, - krb5_address */*high*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_address_search ( - krb5_context /*context*/, - const krb5_address */*addr*/, - const krb5_addresses */*addrlist*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_allow_weak_crypto ( - krb5_context /*context*/, - krb5_boolean /*enable*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_aname_to_localname ( - krb5_context /*context*/, - krb5_const_principal /*aname*/, - size_t /*lnsize*/, - char */*lname*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_anyaddr ( - krb5_context /*context*/, - int /*af*/, - struct sockaddr */*sa*/, - krb5_socklen_t */*sa_size*/, - int /*port*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_appdefault_boolean ( - krb5_context /*context*/, - const char */*appname*/, - krb5_const_realm /*realm*/, - const char */*option*/, - krb5_boolean /*def_val*/, - krb5_boolean */*ret_val*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_appdefault_string ( - krb5_context /*context*/, - const char */*appname*/, - krb5_const_realm /*realm*/, - const char */*option*/, - const char */*def_val*/, - char **/*ret_val*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_appdefault_time ( - krb5_context /*context*/, - const char */*appname*/, - krb5_const_realm /*realm*/, - const char */*option*/, - time_t /*def_val*/, - time_t */*ret_val*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_append_addresses ( - krb5_context /*context*/, - krb5_addresses */*dest*/, - const krb5_addresses */*source*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_addflags ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - int32_t /*addflags*/, - int32_t */*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_free ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_genaddrs ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_socket_t /*fd*/, - int /*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_generatelocalsubkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getaddrs ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_address **/*local_addr*/, - krb5_address **/*remote_addr*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getauthenticator ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_authenticator */*authenticator*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getcksumtype ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_cksumtype */*cksumtype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getflags ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - int32_t */*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock **/*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getkeytype ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keytype */*keytype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getlocalseqnumber ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - int32_t */*seqnumber*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getlocalsubkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock **/*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getrcache ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_rcache */*rcache*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getrecvsubkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock **/*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getremoteseqnumber ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - int32_t */*seqnumber*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getremotesubkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock **/*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getsendsubkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock **/*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_init ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_removeflags ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - int32_t /*removeflags*/, - int32_t */*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setaddrs ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_address */*local_addr*/, - krb5_address */*remote_addr*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setaddrs_from_fd ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - void */*p_fd*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setcksumtype ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_cksumtype /*cksumtype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setflags ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - int32_t /*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setkeytype ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keytype /*keytype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setlocalseqnumber ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - int32_t /*seqnumber*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setlocalsubkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setrcache ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_rcache /*rcache*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setrecvsubkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setremoteseqnumber ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - int32_t /*seqnumber*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setremotesubkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setsendsubkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setuserkey ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_getremoteseqnumber ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - int32_t */*seqnumber*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_build_ap_req ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - krb5_creds */*cred*/, - krb5_flags /*ap_options*/, - krb5_data /*authenticator*/, - krb5_data */*retdata*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_build_principal ( - krb5_context /*context*/, - krb5_principal */*principal*/, - int /*rlen*/, - krb5_const_realm /*realm*/, - ...); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_build_principal_ext ( - krb5_context /*context*/, - krb5_principal */*principal*/, - int /*rlen*/, - krb5_const_realm /*realm*/, - ...); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_build_principal_va ( - krb5_context /*context*/, - krb5_principal */*principal*/, - int /*rlen*/, - krb5_const_realm /*realm*/, - va_list /*ap*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_build_principal_va_ext ( - krb5_context /*context*/, - krb5_principal */*principal*/, - int /*rlen*/, - krb5_const_realm /*realm*/, - va_list /*ap*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_block_size ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - size_t */*blocksize*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_checksum_length ( - krb5_context /*context*/, - krb5_cksumtype /*cksumtype*/, - size_t */*length*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_decrypt ( - krb5_context /*context*/, - const krb5_keyblock /*key*/, - krb5_keyusage /*usage*/, - const krb5_data */*ivec*/, - krb5_enc_data */*input*/, - krb5_data */*output*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_encrypt ( - krb5_context /*context*/, - const krb5_keyblock */*key*/, - krb5_keyusage /*usage*/, - const krb5_data */*ivec*/, - const krb5_data */*input*/, - krb5_enc_data */*output*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_encrypt_length ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - size_t /*inputlen*/, - size_t */*length*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_enctype_compare ( - krb5_context /*context*/, - krb5_enctype /*e1*/, - krb5_enctype /*e2*/, - krb5_boolean */*similar*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_get_checksum ( - krb5_context /*context*/, - const krb5_checksum */*cksum*/, - krb5_cksumtype */*type*/, - krb5_data **/*data*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_c_is_coll_proof_cksum (krb5_cksumtype /*ctype*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_c_is_keyed_cksum (krb5_cksumtype /*ctype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_keylengths ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - size_t */*ilen*/, - size_t */*keylen*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_make_checksum ( - krb5_context /*context*/, - krb5_cksumtype /*cksumtype*/, - const krb5_keyblock */*key*/, - krb5_keyusage /*usage*/, - const krb5_data */*input*/, - krb5_checksum */*cksum*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_make_random_key ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - krb5_keyblock */*random_key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_prf ( - krb5_context /*context*/, - const krb5_keyblock */*key*/, - const krb5_data */*input*/, - krb5_data */*output*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_prf_length ( - krb5_context /*context*/, - krb5_enctype /*type*/, - size_t */*length*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_random_make_octets ( - krb5_context /*context*/, - krb5_data * /*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_set_checksum ( - krb5_context /*context*/, - krb5_checksum */*cksum*/, - krb5_cksumtype /*type*/, - const krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_c_valid_cksumtype (krb5_cksumtype /*ctype*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_c_valid_enctype (krb5_enctype /*etype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_verify_checksum ( - krb5_context /*context*/, - const krb5_keyblock */*key*/, - krb5_keyusage /*usage*/, - const krb5_data */*data*/, - const krb5_checksum */*cksum*/, - krb5_boolean */*valid*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_cache_end_seq_get ( - krb5_context /*context*/, - krb5_cc_cache_cursor /*cursor*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_cache_get_first ( - krb5_context /*context*/, - const char */*type*/, - krb5_cc_cache_cursor */*cursor*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_cache_match ( - krb5_context /*context*/, - krb5_principal /*client*/, - krb5_ccache */*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_cache_next ( - krb5_context /*context*/, - krb5_cc_cache_cursor /*cursor*/, - krb5_ccache */*id*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_cc_clear_mcred (krb5_creds */*mcred*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_close ( - krb5_context /*context*/, - krb5_ccache /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_copy_cache ( - krb5_context /*context*/, - const krb5_ccache /*from*/, - krb5_ccache /*to*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_copy_creds ( - krb5_context /*context*/, - const krb5_ccache /*from*/, - krb5_ccache /*to*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_copy_match_f ( - krb5_context /*context*/, - const krb5_ccache /*from*/, - krb5_ccache /*to*/, - krb5_boolean (*/*match*/)(krb5_context, void *, const krb5_creds *), - void */*matchctx*/, - unsigned int */*matched*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_default ( - krb5_context /*context*/, - krb5_ccache */*id*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_cc_default_name (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_destroy ( - krb5_context /*context*/, - krb5_ccache /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_end_seq_get ( - krb5_context /*context*/, - const krb5_ccache /*id*/, - krb5_cc_cursor */*cursor*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_gen_new ( - krb5_context /*context*/, - const krb5_cc_ops */*ops*/, - krb5_ccache */*id*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_config ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_const_principal /*principal*/, - const char */*name*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_flags ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_flags */*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_friendly_name ( - krb5_context /*context*/, - krb5_ccache /*id*/, - char **/*name*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_full_name ( - krb5_context /*context*/, - krb5_ccache /*id*/, - char **/*str*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_kdc_offset ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_deltat */*offset*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_lifetime ( - krb5_context /*context*/, - krb5_ccache /*id*/, - time_t */*t*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_cc_get_name ( - krb5_context /*context*/, - krb5_ccache /*id*/); - -KRB5_LIB_FUNCTION const krb5_cc_ops * KRB5_LIB_CALL -krb5_cc_get_ops ( - krb5_context /*context*/, - krb5_ccache /*id*/); - -KRB5_LIB_FUNCTION const krb5_cc_ops * KRB5_LIB_CALL -krb5_cc_get_prefix_ops ( - krb5_context /*context*/, - const char */*prefix*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_principal ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_principal */*principal*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_cc_get_type ( - krb5_context /*context*/, - krb5_ccache /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_get_version ( - krb5_context /*context*/, - const krb5_ccache /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_initialize ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_principal /*primary_principal*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_last_change_time ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_timestamp */*mtime*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_move ( - krb5_context /*context*/, - krb5_ccache /*from*/, - krb5_ccache /*to*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_new_unique ( - krb5_context /*context*/, - const char */*type*/, - const char */*hint*/, - krb5_ccache */*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_next_cred ( - krb5_context /*context*/, - const krb5_ccache /*id*/, - krb5_cc_cursor */*cursor*/, - krb5_creds */*creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_register ( - krb5_context /*context*/, - const krb5_cc_ops */*ops*/, - krb5_boolean /*override*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_remove_cred ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_flags /*which*/, - krb5_creds */*cred*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_resolve ( - krb5_context /*context*/, - const char */*name*/, - krb5_ccache */*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_retrieve_cred ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_flags /*whichfields*/, - const krb5_creds */*mcreds*/, - krb5_creds */*creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_set_config ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_const_principal /*principal*/, - const char */*name*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_set_default_name ( - krb5_context /*context*/, - const char */*name*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_set_flags ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_flags /*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_set_friendly_name ( - krb5_context /*context*/, - krb5_ccache /*id*/, - const char */*name*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_set_kdc_offset ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_deltat /*offset*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_start_seq_get ( - krb5_context /*context*/, - const krb5_ccache /*id*/, - krb5_cc_cursor */*cursor*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_store_cred ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_creds */*creds*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_cc_support_switch ( - krb5_context /*context*/, - const char */*type*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_switch ( - krb5_context /*context*/, - krb5_ccache /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cccol_cursor_free ( - krb5_context /*context*/, - krb5_cccol_cursor */*cursor*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cccol_cursor_new ( - krb5_context /*context*/, - krb5_cccol_cursor */*cursor*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cccol_cursor_next ( - krb5_context /*context*/, - krb5_cccol_cursor /*cursor*/, - krb5_ccache */*cache*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cccol_last_change_time ( - krb5_context /*context*/, - const char */*type*/, - krb5_timestamp */*mtime*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_change_password ( - krb5_context /*context*/, - krb5_creds */*creds*/, - const char */*newpw*/, - int */*result_code*/, - krb5_data */*result_code_string*/, - krb5_data */*result_string*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_check_transited ( - krb5_context /*context*/, - krb5_const_realm /*client_realm*/, - krb5_const_realm /*server_realm*/, - krb5_realm */*realms*/, - unsigned int /*num_realms*/, - int */*bad_realm*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_check_transited_realms ( - krb5_context /*context*/, - const char *const */*realms*/, - unsigned int /*num_realms*/, - int */*bad_realm*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_checksum_disable ( - krb5_context /*context*/, - krb5_cksumtype /*type*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_checksum_free ( - krb5_context /*context*/, - krb5_checksum */*cksum*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_checksum_is_collision_proof ( - krb5_context /*context*/, - krb5_cksumtype /*type*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_checksum_is_keyed ( - krb5_context /*context*/, - krb5_cksumtype /*type*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_checksumsize ( - krb5_context /*context*/, - krb5_cksumtype /*type*/, - size_t */*size*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cksumtype_to_enctype ( - krb5_context /*context*/, - krb5_cksumtype /*ctype*/, - krb5_enctype */*etype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cksumtype_valid ( - krb5_context /*context*/, - krb5_cksumtype /*ctype*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_clear_error_message (krb5_context /*context*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_clear_error_string (krb5_context /*context*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_closelog ( - krb5_context /*context*/, - krb5_log_facility */*fac*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_compare_creds ( - krb5_context /*context*/, - krb5_flags /*whichfields*/, - const krb5_creds * /*mcreds*/, - const krb5_creds * /*creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_config_file_free ( - krb5_context /*context*/, - krb5_config_section */*s*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_config_free_strings (char **/*strings*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_config_get_bool ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - ...); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_config_get_bool_default ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - krb5_boolean /*def_value*/, - ...); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_get_int ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - ...); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_get_int_default ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - int /*def_value*/, - ...); - -KRB5_LIB_FUNCTION const krb5_config_binding * KRB5_LIB_CALL -krb5_config_get_list ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - ...); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_config_get_string ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - ...); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_config_get_string_default ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - const char */*def_value*/, - ...); - -KRB5_LIB_FUNCTION char** KRB5_LIB_CALL -krb5_config_get_strings ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - ...); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_get_time ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - ...); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_get_time_default ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - int /*def_value*/, - ...); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_config_parse_file ( - krb5_context /*context*/, - const char */*fname*/, - krb5_config_section **/*res*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_config_parse_file_multi ( - krb5_context /*context*/, - const char */*fname*/, - krb5_config_section **/*res*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_config_parse_string_multi ( - krb5_context /*context*/, - const char */*string*/, - krb5_config_section **/*res*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_config_vget_bool ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_config_vget_bool_default ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - krb5_boolean /*def_value*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_vget_int ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_vget_int_default ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - int /*def_value*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION const krb5_config_binding * KRB5_LIB_CALL -krb5_config_vget_list ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_config_vget_string ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_config_vget_string_default ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - const char */*def_value*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION char ** KRB5_LIB_CALL -krb5_config_vget_strings ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_vget_time ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_config_vget_time_default ( - krb5_context /*context*/, - const krb5_config_section */*c*/, - int /*def_value*/, - va_list /*args*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_address ( - krb5_context /*context*/, - const krb5_address */*inaddr*/, - krb5_address */*outaddr*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_addresses ( - krb5_context /*context*/, - const krb5_addresses */*inaddr*/, - krb5_addresses */*outaddr*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_checksum ( - krb5_context /*context*/, - const krb5_checksum */*old*/, - krb5_checksum **/*new*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_context ( - krb5_context /*context*/, - krb5_context */*out*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_creds ( - krb5_context /*context*/, - const krb5_creds */*incred*/, - krb5_creds **/*outcred*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_creds_contents ( - krb5_context /*context*/, - const krb5_creds */*incred*/, - krb5_creds */*c*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_data ( - krb5_context /*context*/, - const krb5_data */*indata*/, - krb5_data **/*outdata*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_host_realm ( - krb5_context /*context*/, - const krb5_realm */*from*/, - krb5_realm **/*to*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_keyblock ( - krb5_context /*context*/, - const krb5_keyblock */*inblock*/, - krb5_keyblock **/*to*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_keyblock_contents ( - krb5_context /*context*/, - const krb5_keyblock */*inblock*/, - krb5_keyblock */*to*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_principal ( - krb5_context /*context*/, - krb5_const_principal /*inprinc*/, - krb5_principal */*outprinc*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_ticket ( - krb5_context /*context*/, - const krb5_ticket */*from*/, - krb5_ticket **/*to*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_create_checksum ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - krb5_key_usage /*usage*/, - int /*type*/, - void */*data*/, - size_t /*len*/, - Checksum */*result*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_create_checksum_iov ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - unsigned /*usage*/, - krb5_crypto_iov */*data*/, - unsigned int /*num_data*/, - krb5_cksumtype */*type*/); - -KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL -krb5_creds_get_ticket_flags (krb5_creds */*creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_destroy ( - krb5_context /*context*/, - krb5_crypto /*crypto*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_fx_cf2 ( - krb5_context /*context*/, - const krb5_crypto /*crypto1*/, - const krb5_crypto /*crypto2*/, - krb5_data */*pepper1*/, - krb5_data */*pepper2*/, - krb5_enctype /*enctype*/, - krb5_keyblock */*res*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_get_checksum_type ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - krb5_cksumtype */*type*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_getblocksize ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - size_t */*blocksize*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_getconfoundersize ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - size_t */*confoundersize*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_getenctype ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - krb5_enctype */*enctype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_getpadsize ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - size_t */*padsize*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_init ( - krb5_context /*context*/, - const krb5_keyblock */*key*/, - krb5_enctype /*etype*/, - krb5_crypto */*crypto*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_length ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - int /*type*/, - size_t */*len*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_length_iov ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - krb5_crypto_iov */*data*/, - unsigned int /*num_data*/); - -KRB5_LIB_FUNCTION size_t KRB5_LIB_CALL -krb5_crypto_overhead ( - krb5_context /*context*/, - krb5_crypto /*crypto*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_prf ( - krb5_context /*context*/, - const krb5_crypto /*crypto*/, - const krb5_data */*input*/, - krb5_data */*output*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_crypto_prf_length ( - krb5_context /*context*/, - krb5_enctype /*type*/, - size_t */*length*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_data_alloc ( - krb5_data */*p*/, - int /*len*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_data_cmp ( - const krb5_data */*data1*/, - const krb5_data */*data2*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_data_copy ( - krb5_data */*p*/, - const void */*data*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_data_ct_cmp ( - const krb5_data */*data1*/, - const krb5_data */*data2*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_data_free (krb5_data */*p*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_data_realloc ( - krb5_data */*p*/, - int /*len*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_data_zero (krb5_data */*p*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_Authenticator ( - krb5_context /*context*/, - const void */*data*/, - size_t /*length*/, - Authenticator */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_ETYPE_INFO ( - krb5_context /*context*/, - const void */*data*/, - size_t /*length*/, - ETYPE_INFO */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_ETYPE_INFO2 ( - krb5_context /*context*/, - const void */*data*/, - size_t /*length*/, - ETYPE_INFO2 */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_EncAPRepPart ( - krb5_context /*context*/, - const void */*data*/, - size_t /*length*/, - EncAPRepPart */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_EncASRepPart ( - krb5_context /*context*/, - const void */*data*/, - size_t /*length*/, - EncASRepPart */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_EncKrbCredPart ( - krb5_context /*context*/, - const void */*data*/, - size_t /*length*/, - EncKrbCredPart */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_EncTGSRepPart ( - krb5_context /*context*/, - const void */*data*/, - size_t /*length*/, - EncTGSRepPart */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_EncTicketPart ( - krb5_context /*context*/, - const void */*data*/, - size_t /*length*/, - EncTicketPart */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_ap_req ( - krb5_context /*context*/, - const krb5_data */*inbuf*/, - krb5_ap_req */*ap_req*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decrypt ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - unsigned /*usage*/, - void */*data*/, - size_t /*len*/, - krb5_data */*result*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decrypt_EncryptedData ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - unsigned /*usage*/, - const EncryptedData */*e*/, - krb5_data */*result*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decrypt_iov_ivec ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - unsigned /*usage*/, - krb5_crypto_iov */*data*/, - unsigned int /*num_data*/, - void */*ivec*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decrypt_ivec ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - unsigned /*usage*/, - void */*data*/, - size_t /*len*/, - krb5_data */*result*/, - void */*ivec*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decrypt_ticket ( - krb5_context /*context*/, - Ticket */*ticket*/, - krb5_keyblock */*key*/, - EncTicketPart */*out*/, - krb5_flags /*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_derive_key ( - krb5_context /*context*/, - const krb5_keyblock */*key*/, - krb5_enctype /*etype*/, - const void */*constant*/, - size_t /*constant_len*/, - krb5_keyblock **/*derived_key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_alloc ( - krb5_context /*context*/, - krb5_digest */*digest*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_digest_free (krb5_digest /*digest*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_get_client_binding ( - krb5_context /*context*/, - krb5_digest /*digest*/, - char **/*type*/, - char **/*binding*/); - -KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL -krb5_digest_get_identifier ( - krb5_context /*context*/, - krb5_digest /*digest*/); - -KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL -krb5_digest_get_opaque ( - krb5_context /*context*/, - krb5_digest /*digest*/); - -KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL -krb5_digest_get_rsp ( - krb5_context /*context*/, - krb5_digest /*digest*/); - -KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL -krb5_digest_get_server_nonce ( - krb5_context /*context*/, - krb5_digest /*digest*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_get_session_key ( - krb5_context /*context*/, - krb5_digest /*digest*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_get_tickets ( - krb5_context /*context*/, - krb5_digest /*digest*/, - Ticket **/*tickets*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_init_request ( - krb5_context /*context*/, - krb5_digest /*digest*/, - krb5_realm /*realm*/, - krb5_ccache /*ccache*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_probe ( - krb5_context /*context*/, - krb5_realm /*realm*/, - krb5_ccache /*ccache*/, - unsigned */*flags*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_digest_rep_get_status ( - krb5_context /*context*/, - krb5_digest /*digest*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_request ( - krb5_context /*context*/, - krb5_digest /*digest*/, - krb5_realm /*realm*/, - krb5_ccache /*ccache*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_authentication_user ( - krb5_context /*context*/, - krb5_digest /*digest*/, - krb5_principal /*authentication_user*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_authid ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*authid*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_client_nonce ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*nonce*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_digest ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*dgst*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_hostname ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*hostname*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_identifier ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_method ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*method*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_nonceCount ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*nonce_count*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_opaque ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*opaque*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_qop ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*qop*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_realm ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*realm*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_digest_set_responseData ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*response*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_server_cb ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*type*/, - const char */*binding*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_server_nonce ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*nonce*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_type ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*type*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_uri ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*uri*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_digest_set_username ( - krb5_context /*context*/, - krb5_digest /*digest*/, - const char */*username*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_domain_x500_decode ( - krb5_context /*context*/, - krb5_data /*tr*/, - char ***/*realms*/, - unsigned int */*num_realms*/, - const char */*client_realm*/, - const char */*server_realm*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_domain_x500_encode ( - char **/*realms*/, - unsigned int /*num_realms*/, - krb5_data */*encoding*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_eai_to_heim_errno ( - int /*eai_errno*/, - int /*system_error*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_Authenticator ( - krb5_context /*context*/, - void */*data*/, - size_t /*length*/, - Authenticator */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_ETYPE_INFO ( - krb5_context /*context*/, - void */*data*/, - size_t /*length*/, - ETYPE_INFO */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_ETYPE_INFO2 ( - krb5_context /*context*/, - void */*data*/, - size_t /*length*/, - ETYPE_INFO2 */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_EncAPRepPart ( - krb5_context /*context*/, - void */*data*/, - size_t /*length*/, - EncAPRepPart */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_EncASRepPart ( - krb5_context /*context*/, - void */*data*/, - size_t /*length*/, - EncASRepPart */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_EncKrbCredPart ( - krb5_context /*context*/, - void */*data*/, - size_t /*length*/, - EncKrbCredPart */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_EncTGSRepPart ( - krb5_context /*context*/, - void */*data*/, - size_t /*length*/, - EncTGSRepPart */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encode_EncTicketPart ( - krb5_context /*context*/, - void */*data*/, - size_t /*length*/, - EncTicketPart */*t*/, - size_t */*len*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encrypt ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - unsigned /*usage*/, - const void */*data*/, - size_t /*len*/, - krb5_data */*result*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encrypt_EncryptedData ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - unsigned /*usage*/, - void */*data*/, - size_t /*len*/, - int /*kvno*/, - EncryptedData */*result*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encrypt_iov_ivec ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - unsigned /*usage*/, - krb5_crypto_iov */*data*/, - int /*num_data*/, - void */*ivec*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_encrypt_ivec ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - unsigned /*usage*/, - const void */*data*/, - size_t /*len*/, - krb5_data */*result*/, - void */*ivec*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_disable ( - krb5_context /*context*/, - krb5_enctype /*enctype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_enable ( - krb5_context /*context*/, - krb5_enctype /*enctype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_keybits ( - krb5_context /*context*/, - krb5_enctype /*type*/, - size_t */*keybits*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_keysize ( - krb5_context /*context*/, - krb5_enctype /*type*/, - size_t */*keysize*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_to_keytype ( - krb5_context /*context*/, - krb5_enctype /*etype*/, - krb5_keytype */*keytype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_to_string ( - krb5_context /*context*/, - krb5_enctype /*etype*/, - char **/*string*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_enctype_valid ( - krb5_context /*context*/, - krb5_enctype /*etype*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_enctypes_compatible_keys ( - krb5_context /*context*/, - krb5_enctype /*etype1*/, - krb5_enctype /*etype2*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -krb5_error_code -krb5_enomem (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_err ( - krb5_context /*context*/, - int /*eval*/, - krb5_error_code /*code*/, - const char */*fmt*/, - ...) - __attribute__ ((noreturn, format (printf, 4, 5))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_error_from_rd_error ( - krb5_context /*context*/, - const krb5_error */*error*/, - const krb5_creds */*creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_errx ( - krb5_context /*context*/, - int /*eval*/, - const char */*fmt*/, - ...) - __attribute__ ((noreturn, format (printf, 3, 4))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_expand_hostname ( - krb5_context /*context*/, - const char */*orig_hostname*/, - char **/*new_hostname*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_expand_hostname_realms ( - krb5_context /*context*/, - const char */*orig_hostname*/, - char **/*new_hostname*/, - char ***/*realms*/); - -KRB5_LIB_FUNCTION PA_DATA * KRB5_LIB_CALL -krb5_find_padata ( - PA_DATA */*val*/, - unsigned /*len*/, - int /*type*/, - int */*idx*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_format_time ( - krb5_context /*context*/, - time_t /*t*/, - char */*s*/, - size_t /*len*/, - krb5_boolean /*include_time*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_address ( - krb5_context /*context*/, - krb5_address */*address*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_addresses ( - krb5_context /*context*/, - krb5_addresses */*addresses*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_ap_rep_enc_part ( - krb5_context /*context*/, - krb5_ap_rep_enc_part */*val*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_authenticator ( - krb5_context /*context*/, - krb5_authenticator */*authenticator*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_checksum ( - krb5_context /*context*/, - krb5_checksum */*cksum*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_checksum_contents ( - krb5_context /*context*/, - krb5_checksum */*cksum*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_config_files (char **/*filenames*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_context (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_cred_contents ( - krb5_context /*context*/, - krb5_creds */*c*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_creds ( - krb5_context /*context*/, - krb5_creds */*c*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_creds_contents ( - krb5_context /*context*/, - krb5_creds */*c*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_data ( - krb5_context /*context*/, - krb5_data */*p*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_data_contents ( - krb5_context /*context*/, - krb5_data */*data*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_default_realm ( - krb5_context /*context*/, - krb5_realm /*realm*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_error ( - krb5_context /*context*/, - krb5_error */*error*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_error_contents ( - krb5_context /*context*/, - krb5_error */*error*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_error_message ( - krb5_context /*context*/, - const char */*msg*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_error_string ( - krb5_context /*context*/, - char */*str*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_host_realm ( - krb5_context /*context*/, - krb5_realm */*realmlist*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_kdc_rep ( - krb5_context /*context*/, - krb5_kdc_rep */*rep*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_keyblock ( - krb5_context /*context*/, - krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_keyblock_contents ( - krb5_context /*context*/, - krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_krbhst ( - krb5_context /*context*/, - char **/*hostlist*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_principal ( - krb5_context /*context*/, - krb5_principal /*p*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_salt ( - krb5_context /*context*/, - krb5_salt /*salt*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_ticket ( - krb5_context /*context*/, - krb5_ticket */*ticket*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_unparsed_name ( - krb5_context /*context*/, - char */*str*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_fwd_tgt_creds ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - const char */*hostname*/, - krb5_principal /*client*/, - krb5_principal /*server*/, - krb5_ccache /*ccache*/, - int /*forwardable*/, - krb5_data */*out_data*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_generate_random_block ( - void */*buf*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_generate_random_keyblock ( - krb5_context /*context*/, - krb5_enctype /*type*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_generate_seq_number ( - krb5_context /*context*/, - const krb5_keyblock */*key*/, - uint32_t */*seqno*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_generate_subkey ( - krb5_context /*context*/, - const krb5_keyblock */*key*/, - krb5_keyblock **/*subkey*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_generate_subkey_extended ( - krb5_context /*context*/, - const krb5_keyblock */*key*/, - krb5_enctype /*etype*/, - krb5_keyblock **/*subkey*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_all_client_addrs ( - krb5_context /*context*/, - krb5_addresses */*res*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_all_server_addrs ( - krb5_context /*context*/, - krb5_addresses */*res*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_cred_from_kdc ( - krb5_context /*context*/, - krb5_ccache /*ccache*/, - krb5_creds */*in_creds*/, - krb5_creds **/*out_creds*/, - krb5_creds ***/*ret_tgts*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_cred_from_kdc_opt ( - krb5_context /*context*/, - krb5_ccache /*ccache*/, - krb5_creds */*in_creds*/, - krb5_creds **/*out_creds*/, - krb5_creds ***/*ret_tgts*/, - krb5_flags /*flags*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_credentials ( - krb5_context /*context*/, - krb5_flags /*options*/, - krb5_ccache /*ccache*/, - krb5_creds */*in_creds*/, - krb5_creds **/*out_creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_credentials_with_flags ( - krb5_context /*context*/, - krb5_flags /*options*/, - krb5_kdc_flags /*flags*/, - krb5_ccache /*ccache*/, - krb5_creds */*in_creds*/, - krb5_creds **/*out_creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_creds ( - krb5_context /*context*/, - krb5_get_creds_opt /*opt*/, - krb5_ccache /*ccache*/, - krb5_const_principal /*inprinc*/, - krb5_creds **/*out_creds*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_creds_opt_add_options ( - krb5_context /*context*/, - krb5_get_creds_opt /*opt*/, - krb5_flags /*options*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_creds_opt_alloc ( - krb5_context /*context*/, - krb5_get_creds_opt */*opt*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_creds_opt_free ( - krb5_context /*context*/, - krb5_get_creds_opt /*opt*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_creds_opt_set_enctype ( - krb5_context /*context*/, - krb5_get_creds_opt /*opt*/, - krb5_enctype /*enctype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_creds_opt_set_impersonate ( - krb5_context /*context*/, - krb5_get_creds_opt /*opt*/, - krb5_const_principal /*self*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_creds_opt_set_options ( - krb5_context /*context*/, - krb5_get_creds_opt /*opt*/, - krb5_flags /*options*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_creds_opt_set_ticket ( - krb5_context /*context*/, - krb5_get_creds_opt /*opt*/, - const Ticket */*ticket*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_default_config_files (char ***/*pfilenames*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_default_in_tkt_etypes ( - krb5_context /*context*/, - krb5_pdu /*pdu_type*/, - krb5_enctype **/*etypes*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_default_principal ( - krb5_context /*context*/, - krb5_principal */*princ*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_default_realm ( - krb5_context /*context*/, - krb5_realm */*realm*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_default_realms ( - krb5_context /*context*/, - krb5_realm **/*realms*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_get_dns_canonicalize_hostname (krb5_context /*context*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_get_err_text ( - krb5_context /*context*/, - krb5_error_code /*code*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL -krb5_get_error_message ( - krb5_context /*context*/, - krb5_error_code /*code*/); - -KRB5_LIB_FUNCTION char * KRB5_LIB_CALL -krb5_get_error_string (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_extra_addresses ( - krb5_context /*context*/, - krb5_addresses */*addresses*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_fcache_version ( - krb5_context /*context*/, - int */*version*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_forwarded_creds ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_ccache /*ccache*/, - krb5_flags /*flags*/, - const char */*hostname*/, - krb5_creds */*in_creds*/, - krb5_data */*out_data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_host_realm ( - krb5_context /*context*/, - const char */*targethost*/, - krb5_realm **/*realms*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_ignore_addresses ( - krb5_context /*context*/, - krb5_addresses */*addresses*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_in_cred ( - krb5_context /*context*/, - krb5_flags /*options*/, - const krb5_addresses */*addrs*/, - const krb5_enctype */*etypes*/, - const krb5_preauthtype */*ptypes*/, - const krb5_preauthdata */*preauth*/, - krb5_key_proc /*key_proc*/, - krb5_const_pointer /*keyseed*/, - krb5_decrypt_proc /*decrypt_proc*/, - krb5_const_pointer /*decryptarg*/, - krb5_creds */*creds*/, - krb5_kdc_rep */*ret_as_reply*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_in_tkt ( - krb5_context /*context*/, - krb5_flags /*options*/, - const krb5_addresses */*addrs*/, - const krb5_enctype */*etypes*/, - const krb5_preauthtype */*ptypes*/, - krb5_key_proc /*key_proc*/, - krb5_const_pointer /*keyseed*/, - krb5_decrypt_proc /*decrypt_proc*/, - krb5_const_pointer /*decryptarg*/, - krb5_creds */*creds*/, - krb5_ccache /*ccache*/, - krb5_kdc_rep */*ret_as_reply*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_in_tkt_with_keytab ( - krb5_context /*context*/, - krb5_flags /*options*/, - krb5_addresses */*addrs*/, - const krb5_enctype */*etypes*/, - const krb5_preauthtype */*pre_auth_types*/, - krb5_keytab /*keytab*/, - krb5_ccache /*ccache*/, - krb5_creds */*creds*/, - krb5_kdc_rep */*ret_as_reply*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_in_tkt_with_password ( - krb5_context /*context*/, - krb5_flags /*options*/, - krb5_addresses */*addrs*/, - const krb5_enctype */*etypes*/, - const krb5_preauthtype */*pre_auth_types*/, - const char */*password*/, - krb5_ccache /*ccache*/, - krb5_creds */*creds*/, - krb5_kdc_rep */*ret_as_reply*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_in_tkt_with_skey ( - krb5_context /*context*/, - krb5_flags /*options*/, - krb5_addresses */*addrs*/, - const krb5_enctype */*etypes*/, - const krb5_preauthtype */*pre_auth_types*/, - const krb5_keyblock */*key*/, - krb5_ccache /*ccache*/, - krb5_creds */*creds*/, - krb5_kdc_rep */*ret_as_reply*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_keyblock ( - krb5_context /*context*/, - krb5_creds */*creds*/, - krb5_principal /*client*/, - krb5_keyblock */*keyblock*/, - krb5_deltat /*start_time*/, - const char */*in_tkt_service*/, - krb5_get_init_creds_opt */*options*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_keytab ( - krb5_context /*context*/, - krb5_creds */*creds*/, - krb5_principal /*client*/, - krb5_keytab /*keytab*/, - krb5_deltat /*start_time*/, - const char */*in_tkt_service*/, - krb5_get_init_creds_opt */*options*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_alloc ( - krb5_context /*context*/, - krb5_get_init_creds_opt **/*opt*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_free ( - krb5_context /*context*/, - krb5_get_init_creds_opt */*opt*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_get_error ( - krb5_context /*context*/, - krb5_get_init_creds_opt */*opt*/, - KRB_ERROR **/*error*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_init (krb5_get_init_creds_opt */*opt*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_address_list ( - krb5_get_init_creds_opt */*opt*/, - krb5_addresses */*addresses*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_addressless ( - krb5_context /*context*/, - krb5_get_init_creds_opt */*opt*/, - krb5_boolean /*addressless*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_anonymous ( - krb5_get_init_creds_opt */*opt*/, - int /*anonymous*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_canonicalize ( - krb5_context /*context*/, - krb5_get_init_creds_opt */*opt*/, - krb5_boolean /*req*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_default_flags ( - krb5_context /*context*/, - const char */*appname*/, - krb5_const_realm /*realm*/, - krb5_get_init_creds_opt */*opt*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_etype_list ( - krb5_get_init_creds_opt */*opt*/, - krb5_enctype */*etype_list*/, - int /*etype_list_length*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_forwardable ( - krb5_get_init_creds_opt */*opt*/, - int /*forwardable*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_pa_password ( - krb5_context /*context*/, - krb5_get_init_creds_opt */*opt*/, - const char */*password*/, - krb5_s2k_proc /*key_proc*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_pac_request ( - krb5_context /*context*/, - krb5_get_init_creds_opt */*opt*/, - krb5_boolean /*req_pac*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_pkinit ( - krb5_context /*context*/, - krb5_get_init_creds_opt */*opt*/, - krb5_principal /*principal*/, - const char */*user_id*/, - const char */*x509_anchors*/, - char * const * /*pool*/, - char * const * /*pki_revoke*/, - int /*flags*/, - krb5_prompter_fct /*prompter*/, - void */*prompter_data*/, - char */*password*/); - -krb5_error_code KRB5_LIB_FUNCTION -krb5_get_init_creds_opt_set_pkinit_user_certs ( - krb5_context /*context*/, - krb5_get_init_creds_opt */*opt*/, - struct hx509_certs_data */*certs*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_preauth_list ( - krb5_get_init_creds_opt */*opt*/, - krb5_preauthtype */*preauth_list*/, - int /*preauth_list_length*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_process_last_req ( - krb5_context /*context*/, - krb5_get_init_creds_opt */*opt*/, - krb5_gic_process_last_req /*func*/, - void */*ctx*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_proxiable ( - krb5_get_init_creds_opt */*opt*/, - int /*proxiable*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_renew_life ( - krb5_get_init_creds_opt */*opt*/, - krb5_deltat /*renew_life*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_salt ( - krb5_get_init_creds_opt */*opt*/, - krb5_data */*salt*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_get_init_creds_opt_set_tkt_life ( - krb5_get_init_creds_opt */*opt*/, - krb5_deltat /*tkt_life*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_win2k ( - krb5_context /*context*/, - krb5_get_init_creds_opt */*opt*/, - krb5_boolean /*req*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_password ( - krb5_context /*context*/, - krb5_creds */*creds*/, - krb5_principal /*client*/, - const char */*password*/, - krb5_prompter_fct /*prompter*/, - void */*data*/, - krb5_deltat /*start_time*/, - const char */*in_tkt_service*/, - krb5_get_init_creds_opt */*options*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_kdc_cred ( - krb5_context /*context*/, - krb5_ccache /*id*/, - krb5_kdc_flags /*flags*/, - krb5_addresses */*addresses*/, - Ticket */*second_ticket*/, - krb5_creds */*in_creds*/, - krb5_creds **out_creds ); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_kdc_sec_offset ( - krb5_context /*context*/, - int32_t */*sec*/, - int32_t */*usec*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_krb524hst ( - krb5_context /*context*/, - const krb5_realm */*realm*/, - char ***/*hostlist*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_krb_admin_hst ( - krb5_context /*context*/, - const krb5_realm */*realm*/, - char ***/*hostlist*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_krb_changepw_hst ( - krb5_context /*context*/, - const krb5_realm */*realm*/, - char ***/*hostlist*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_krbhst ( - krb5_context /*context*/, - const krb5_realm */*realm*/, - char ***/*hostlist*/); - -KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL -krb5_get_max_time_skew (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_permitted_enctypes ( - krb5_context /*context*/, - krb5_enctype **/*etypes*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_pw_salt ( - krb5_context /*context*/, - krb5_const_principal /*principal*/, - krb5_salt */*salt*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_renewed_creds ( - krb5_context /*context*/, - krb5_creds */*creds*/, - krb5_const_principal /*client*/, - krb5_ccache /*ccache*/, - const char */*in_tkt_service*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_server_rcache ( - krb5_context /*context*/, - const krb5_data */*piece*/, - krb5_rcache */*id*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_get_use_admin_kdc (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_validated_creds ( - krb5_context /*context*/, - krb5_creds */*creds*/, - krb5_principal /*client*/, - krb5_ccache /*ccache*/, - char */*service*/); - -KRB5_LIB_FUNCTION krb5_log_facility * KRB5_LIB_CALL -krb5_get_warn_dest (krb5_context /*context*/); - -KRB5_LIB_FUNCTION size_t KRB5_LIB_CALL -krb5_get_wrapped_length ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - size_t /*data_len*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_getportbyname ( - krb5_context /*context*/, - const char */*service*/, - const char */*proto*/, - int /*default_port*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_h_addr2addr ( - krb5_context /*context*/, - int /*af*/, - const char */*haddr*/, - krb5_address */*addr*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_h_addr2sockaddr ( - krb5_context /*context*/, - int /*af*/, - const char */*addr*/, - struct sockaddr */*sa*/, - krb5_socklen_t */*sa_size*/, - int /*port*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_h_errno_to_heim_errno (int /*eai_errno*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_have_error_string (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_hmac ( - krb5_context /*context*/, - krb5_cksumtype /*cktype*/, - const void */*data*/, - size_t /*len*/, - unsigned /*usage*/, - krb5_keyblock */*key*/, - Checksum */*result*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_context (krb5_context */*context*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_init_creds_free ( - krb5_context /*context*/, - krb5_init_creds_context /*ctx*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_get ( - krb5_context /*context*/, - krb5_init_creds_context /*ctx*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_get_creds ( - krb5_context /*context*/, - krb5_init_creds_context /*ctx*/, - krb5_creds */*cred*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_get_error ( - krb5_context /*context*/, - krb5_init_creds_context /*ctx*/, - KRB_ERROR */*error*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_init ( - krb5_context /*context*/, - krb5_principal /*client*/, - krb5_prompter_fct /*prompter*/, - void */*prompter_data*/, - krb5_deltat /*start_time*/, - krb5_get_init_creds_opt */*options*/, - krb5_init_creds_context */*rctx*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_set_keyblock ( - krb5_context /*context*/, - krb5_init_creds_context /*ctx*/, - krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_set_keytab ( - krb5_context /*context*/, - krb5_init_creds_context /*ctx*/, - krb5_keytab /*keytab*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_set_password ( - krb5_context /*context*/, - krb5_init_creds_context /*ctx*/, - const char */*password*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_set_service ( - krb5_context /*context*/, - krb5_init_creds_context /*ctx*/, - const char */*service*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_init_creds_step ( - krb5_context /*context*/, - krb5_init_creds_context /*ctx*/, - krb5_data */*in*/, - krb5_data */*out*/, - krb5_krbhst_info */*hostinfo*/, - unsigned int */*flags*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_init_ets (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_initlog ( - krb5_context /*context*/, - const char */*program*/, - krb5_log_facility **/*fac*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_is_config_principal ( - krb5_context /*context*/, - krb5_const_principal /*principal*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_is_thread_safe (void); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kcm_call ( - krb5_context /*context*/, - krb5_storage */*request*/, - krb5_storage **/*response_p*/, - krb5_data */*response_data_p*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kcm_storage_request ( - krb5_context /*context*/, - uint16_t /*opcode*/, - krb5_storage **/*storage_p*/); - -KRB5_LIB_FUNCTION const krb5_enctype * KRB5_LIB_CALL -krb5_kerberos_enctypes (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_enctype KRB5_LIB_CALL -krb5_keyblock_get_enctype (const krb5_keyblock */*block*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_keyblock_init ( - krb5_context /*context*/, - krb5_enctype /*type*/, - const void */*data*/, - size_t /*size*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_keyblock_key_proc ( - krb5_context /*context*/, - krb5_keytype /*type*/, - krb5_data */*salt*/, - krb5_const_pointer /*keyseed*/, - krb5_keyblock **/*key*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_keyblock_zero (krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV -krb5_keytab_key_proc ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - krb5_salt /*salt*/, - krb5_const_pointer /*keyseed*/, - krb5_keyblock **/*key*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_keytype_to_enctypes ( - krb5_context /*context*/, - krb5_keytype /*keytype*/, - unsigned */*len*/, - krb5_enctype **/*val*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_keytype_to_enctypes_default ( - krb5_context /*context*/, - krb5_keytype /*keytype*/, - unsigned */*len*/, - krb5_enctype **/*val*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_keytype_to_string ( - krb5_context /*context*/, - krb5_keytype /*keytype*/, - char **/*string*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_format_string ( - krb5_context /*context*/, - const krb5_krbhst_info */*host*/, - char */*hostname*/, - size_t /*hostlen*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_krbhst_free ( - krb5_context /*context*/, - krb5_krbhst_handle /*handle*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_get_addrinfo ( - krb5_context /*context*/, - krb5_krbhst_info */*host*/, - struct addrinfo **/*ai*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_init ( - krb5_context /*context*/, - const char */*realm*/, - unsigned int /*type*/, - krb5_krbhst_handle */*handle*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_init_flags ( - krb5_context /*context*/, - const char */*realm*/, - unsigned int /*type*/, - int /*flags*/, - krb5_krbhst_handle */*handle*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_next ( - krb5_context /*context*/, - krb5_krbhst_handle /*handle*/, - krb5_krbhst_info **/*host*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_next_as_string ( - krb5_context /*context*/, - krb5_krbhst_handle /*handle*/, - char */*hostname*/, - size_t /*hostlen*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_krbhst_reset ( - krb5_context /*context*/, - krb5_krbhst_handle /*handle*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_add_entry ( - krb5_context /*context*/, - krb5_keytab /*id*/, - krb5_keytab_entry */*entry*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_close ( - krb5_context /*context*/, - krb5_keytab /*id*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_kt_compare ( - krb5_context /*context*/, - krb5_keytab_entry */*entry*/, - krb5_const_principal /*principal*/, - krb5_kvno /*vno*/, - krb5_enctype /*enctype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_copy_entry_contents ( - krb5_context /*context*/, - const krb5_keytab_entry */*in*/, - krb5_keytab_entry */*out*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_default ( - krb5_context /*context*/, - krb5_keytab */*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_default_modify_name ( - krb5_context /*context*/, - char */*name*/, - size_t /*namesize*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_default_name ( - krb5_context /*context*/, - char */*name*/, - size_t /*namesize*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_destroy ( - krb5_context /*context*/, - krb5_keytab /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_end_seq_get ( - krb5_context /*context*/, - krb5_keytab /*id*/, - krb5_kt_cursor */*cursor*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_free_entry ( - krb5_context /*context*/, - krb5_keytab_entry */*entry*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_get_entry ( - krb5_context /*context*/, - krb5_keytab /*id*/, - krb5_const_principal /*principal*/, - krb5_kvno /*kvno*/, - krb5_enctype /*enctype*/, - krb5_keytab_entry */*entry*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_get_full_name ( - krb5_context /*context*/, - krb5_keytab /*keytab*/, - char **/*str*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_get_name ( - krb5_context /*context*/, - krb5_keytab /*keytab*/, - char */*name*/, - size_t /*namesize*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_get_type ( - krb5_context /*context*/, - krb5_keytab /*keytab*/, - char */*prefix*/, - size_t /*prefixsize*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_kt_have_content ( - krb5_context /*context*/, - krb5_keytab /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_next_entry ( - krb5_context /*context*/, - krb5_keytab /*id*/, - krb5_keytab_entry */*entry*/, - krb5_kt_cursor */*cursor*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_read_service_key ( - krb5_context /*context*/, - krb5_pointer /*keyprocarg*/, - krb5_principal /*principal*/, - krb5_kvno /*vno*/, - krb5_enctype /*enctype*/, - krb5_keyblock **/*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_register ( - krb5_context /*context*/, - const krb5_kt_ops */*ops*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_remove_entry ( - krb5_context /*context*/, - krb5_keytab /*id*/, - krb5_keytab_entry */*entry*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_resolve ( - krb5_context /*context*/, - const char */*name*/, - krb5_keytab */*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_kt_start_seq_get ( - krb5_context /*context*/, - krb5_keytab /*id*/, - krb5_kt_cursor */*cursor*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_kuserok ( - krb5_context /*context*/, - krb5_principal /*principal*/, - const char */*luser*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_log ( - krb5_context /*context*/, - krb5_log_facility */*fac*/, - int /*level*/, - const char */*fmt*/, - ...) - __attribute__((format (printf, 4, 5))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_log_msg ( - krb5_context /*context*/, - krb5_log_facility */*fac*/, - int /*level*/, - char **/*reply*/, - const char */*fmt*/, - ...) - __attribute__((format (printf, 5, 6))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_make_addrport ( - krb5_context /*context*/, - krb5_address **/*res*/, - const krb5_address */*addr*/, - int16_t /*port*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_make_principal ( - krb5_context /*context*/, - krb5_principal */*principal*/, - krb5_const_realm /*realm*/, - ...); - -KRB5_LIB_FUNCTION size_t KRB5_LIB_CALL -krb5_max_sockaddr_size (void); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_error ( - krb5_context /*context*/, - krb5_error_code /*error_code*/, - const char */*e_text*/, - const krb5_data */*e_data*/, - const krb5_principal /*client*/, - const krb5_principal /*server*/, - time_t */*client_time*/, - int */*client_usec*/, - krb5_data */*reply*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_priv ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - const krb5_data */*userdata*/, - krb5_data */*outbuf*/, - krb5_replay_data */*outdata*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_rep ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_data */*outbuf*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_req ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - const krb5_flags /*ap_req_options*/, - const char */*service*/, - const char */*hostname*/, - krb5_data */*in_data*/, - krb5_ccache /*ccache*/, - krb5_data */*outbuf*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_req_exact ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - const krb5_flags /*ap_req_options*/, - const krb5_principal /*server*/, - krb5_data */*in_data*/, - krb5_ccache /*ccache*/, - krb5_data */*outbuf*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_req_extended ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - const krb5_flags /*ap_req_options*/, - krb5_data */*in_data*/, - krb5_creds */*in_creds*/, - krb5_data */*outbuf*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_safe ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - const krb5_data */*userdata*/, - krb5_data */*outbuf*/, - krb5_replay_data */*outdata*/); - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -krb5_net_read ( - krb5_context /*context*/, - void */*p_fd*/, - void */*buf*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -krb5_net_write ( - krb5_context /*context*/, - void */*p_fd*/, - const void */*buf*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -krb5_net_write_block ( - krb5_context /*context*/, - void */*p_fd*/, - const void */*buf*/, - size_t /*len*/, - time_t /*timeout*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_alloc ( - krb5_context /*context*/, - krb5_ntlm */*ntlm*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_free ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_get_challange ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - krb5_data */*challange*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_get_flags ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - uint32_t */*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_get_opaque ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - krb5_data */*opaque*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_get_targetinfo ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_get_targetname ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - char **/*name*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_init_request ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - krb5_realm /*realm*/, - krb5_ccache /*ccache*/, - uint32_t /*flags*/, - const char */*hostname*/, - const char */*domainname*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_rep_get_sessionkey ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_ntlm_rep_get_status ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_flags ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - uint32_t /*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_lm ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - void */*hash*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_ntlm ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - void */*hash*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_opaque ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - krb5_data */*opaque*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_session ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - void */*sessionkey*/, - size_t /*length*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_targetname ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - const char */*targetname*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_req_set_username ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - const char */*username*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ntlm_request ( - krb5_context /*context*/, - krb5_ntlm /*ntlm*/, - krb5_realm /*realm*/, - krb5_ccache /*ccache*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_openlog ( - krb5_context /*context*/, - const char */*program*/, - krb5_log_facility **/*fac*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_add_buffer ( - krb5_context /*context*/, - krb5_pac /*p*/, - uint32_t /*type*/, - const krb5_data */*data*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_pac_free ( - krb5_context /*context*/, - krb5_pac /*pac*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_get_buffer ( - krb5_context /*context*/, - krb5_pac /*p*/, - uint32_t /*type*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_get_types ( - krb5_context /*context*/, - krb5_pac /*p*/, - size_t */*len*/, - uint32_t **/*types*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_init ( - krb5_context /*context*/, - krb5_pac */*pac*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_parse ( - krb5_context /*context*/, - const void */*ptr*/, - size_t /*len*/, - krb5_pac */*pac*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_verify ( - krb5_context /*context*/, - const krb5_pac /*pac*/, - time_t /*authtime*/, - krb5_const_principal /*principal*/, - const krb5_keyblock */*server*/, - const krb5_keyblock */*privsvr*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_padata_add ( - krb5_context /*context*/, - METHOD_DATA */*md*/, - int /*type*/, - void */*buf*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_parse_address ( - krb5_context /*context*/, - const char */*string*/, - krb5_addresses */*addresses*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_parse_name ( - krb5_context /*context*/, - const char */*name*/, - krb5_principal */*principal*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_parse_name_flags ( - krb5_context /*context*/, - const char */*name*/, - int /*flags*/, - krb5_principal */*principal*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_parse_nametype ( - krb5_context /*context*/, - const char */*str*/, - int32_t */*nametype*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_passwd_result_to_string ( - krb5_context /*context*/, - int /*result*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV -krb5_password_key_proc ( - krb5_context /*context*/, - krb5_enctype /*type*/, - krb5_salt /*salt*/, - krb5_const_pointer /*keyseed*/, - krb5_keyblock **/*key*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pk_enterprise_cert ( - krb5_context /*context*/, - const char */*user_id*/, - krb5_const_realm /*realm*/, - krb5_principal */*principal*/, - struct hx509_certs_data **/*res*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_plugin_register ( - krb5_context /*context*/, - enum krb5_plugin_type /*type*/, - const char */*name*/, - void */*symbol*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_prepend_config_files ( - const char */*filelist*/, - char **/*pq*/, - char ***/*ret_pp*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_prepend_config_files_default ( - const char */*filelist*/, - char ***/*pfilenames*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_prepend_error_message ( - krb5_context /*context*/, - krb5_error_code /*ret*/, - const char */*fmt*/, - ...) - __attribute__ ((format (printf, 3, 4))); - -KRB5_LIB_FUNCTION krb5_realm * KRB5_LIB_CALL -krb5_princ_realm ( - krb5_context /*context*/, - krb5_principal /*principal*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_princ_set_realm ( - krb5_context /*context*/, - krb5_principal /*principal*/, - krb5_realm */*realm*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_principal_compare ( - krb5_context /*context*/, - krb5_const_principal /*princ1*/, - krb5_const_principal /*princ2*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_principal_compare_any_realm ( - krb5_context /*context*/, - krb5_const_principal /*princ1*/, - krb5_const_principal /*princ2*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_principal_get_comp_string ( - krb5_context /*context*/, - krb5_const_principal /*principal*/, - unsigned int /*component*/); - -KRB5_LIB_FUNCTION unsigned int KRB5_LIB_CALL -krb5_principal_get_num_comp ( - krb5_context /*context*/, - krb5_const_principal /*principal*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_principal_get_realm ( - krb5_context /*context*/, - krb5_const_principal /*principal*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_principal_get_type ( - krb5_context /*context*/, - krb5_const_principal /*principal*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_principal_is_krbtgt ( - krb5_context /*context*/, - krb5_const_principal /*p*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_principal_match ( - krb5_context /*context*/, - krb5_const_principal /*princ*/, - krb5_const_principal /*pattern*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_principal_set_realm ( - krb5_context /*context*/, - krb5_principal /*principal*/, - krb5_const_realm /*realm*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_principal_set_type ( - krb5_context /*context*/, - krb5_principal /*principal*/, - int /*type*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_print_address ( - const krb5_address */*addr*/, - char */*str*/, - size_t /*len*/, - size_t */*ret_len*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_program_setup ( - krb5_context */*context*/, - int /*argc*/, - char **/*argv*/, - struct getargs */*args*/, - int /*num_args*/, - void (KRB5_LIB_CALL *usage)(int, struct getargs*, int)); - -KRB5_LIB_FUNCTION int KRB5_CALLCONV -krb5_prompter_posix ( - krb5_context /*context*/, - void */*data*/, - const char */*name*/, - const char */*banner*/, - int /*num_prompts*/, - krb5_prompt prompts[]); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_random_to_key ( - krb5_context /*context*/, - krb5_enctype /*type*/, - const void */*data*/, - size_t /*size*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_close ( - krb5_context /*context*/, - krb5_rcache /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_default ( - krb5_context /*context*/, - krb5_rcache */*id*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_rc_default_name (krb5_context /*context*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_rc_default_type (krb5_context /*context*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_destroy ( - krb5_context /*context*/, - krb5_rcache /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_expunge ( - krb5_context /*context*/, - krb5_rcache /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_get_lifespan ( - krb5_context /*context*/, - krb5_rcache /*id*/, - krb5_deltat */*auth_lifespan*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_rc_get_name ( - krb5_context /*context*/, - krb5_rcache /*id*/); - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_rc_get_type ( - krb5_context /*context*/, - krb5_rcache /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_initialize ( - krb5_context /*context*/, - krb5_rcache /*id*/, - krb5_deltat /*auth_lifespan*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_recover ( - krb5_context /*context*/, - krb5_rcache /*id*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_resolve ( - krb5_context /*context*/, - krb5_rcache /*id*/, - const char */*name*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_resolve_full ( - krb5_context /*context*/, - krb5_rcache */*id*/, - const char */*string_name*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_resolve_type ( - krb5_context /*context*/, - krb5_rcache */*id*/, - const char */*type*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_store ( - krb5_context /*context*/, - krb5_rcache /*id*/, - krb5_donot_replay */*rep*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_cred ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_data */*in_data*/, - krb5_creds ***/*ret_creds*/, - krb5_replay_data */*outdata*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_cred2 ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - krb5_ccache /*ccache*/, - krb5_data */*in_data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_error ( - krb5_context /*context*/, - const krb5_data */*msg*/, - KRB_ERROR */*result*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_priv ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - const krb5_data */*inbuf*/, - krb5_data */*outbuf*/, - krb5_replay_data */*outdata*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_rep ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - const krb5_data */*inbuf*/, - krb5_ap_rep_enc_part **/*repl*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - const krb5_data */*inbuf*/, - krb5_const_principal /*server*/, - krb5_keytab /*keytab*/, - krb5_flags */*ap_req_options*/, - krb5_ticket **/*ticket*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_ctx ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - const krb5_data */*inbuf*/, - krb5_const_principal /*server*/, - krb5_rd_req_in_ctx /*inctx*/, - krb5_rd_req_out_ctx */*outctx*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_in_ctx_alloc ( - krb5_context /*context*/, - krb5_rd_req_in_ctx */*ctx*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_rd_req_in_ctx_free ( - krb5_context /*context*/, - krb5_rd_req_in_ctx /*ctx*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_in_set_keyblock ( - krb5_context /*context*/, - krb5_rd_req_in_ctx /*in*/, - krb5_keyblock */*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_in_set_keytab ( - krb5_context /*context*/, - krb5_rd_req_in_ctx /*in*/, - krb5_keytab /*keytab*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_in_set_pac_check ( - krb5_context /*context*/, - krb5_rd_req_in_ctx /*in*/, - krb5_boolean /*flag*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_rd_req_out_ctx_free ( - krb5_context /*context*/, - krb5_rd_req_out_ctx /*ctx*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_out_get_ap_req_options ( - krb5_context /*context*/, - krb5_rd_req_out_ctx /*out*/, - krb5_flags */*ap_req_options*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_out_get_keyblock ( - krb5_context /*context*/, - krb5_rd_req_out_ctx /*out*/, - krb5_keyblock **/*keyblock*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_out_get_server ( - krb5_context /*context*/, - krb5_rd_req_out_ctx /*out*/, - krb5_principal */*principal*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_out_get_ticket ( - krb5_context /*context*/, - krb5_rd_req_out_ctx /*out*/, - krb5_ticket **/*ticket*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_with_keyblock ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - const krb5_data */*inbuf*/, - krb5_const_principal /*server*/, - krb5_keyblock */*keyblock*/, - krb5_flags */*ap_req_options*/, - krb5_ticket **/*ticket*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_safe ( - krb5_context /*context*/, - krb5_auth_context /*auth_context*/, - const krb5_data */*inbuf*/, - krb5_data */*outbuf*/, - krb5_replay_data */*outdata*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_read_message ( - krb5_context /*context*/, - krb5_pointer /*p_fd*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_read_priv_message ( - krb5_context /*context*/, - krb5_auth_context /*ac*/, - krb5_pointer /*p_fd*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_read_safe_message ( - krb5_context /*context*/, - krb5_auth_context /*ac*/, - krb5_pointer /*p_fd*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_realm_compare ( - krb5_context /*context*/, - krb5_const_principal /*princ1*/, - krb5_const_principal /*princ2*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_recvauth ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - krb5_pointer /*p_fd*/, - const char */*appl_version*/, - krb5_principal /*server*/, - int32_t /*flags*/, - krb5_keytab /*keytab*/, - krb5_ticket **/*ticket*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_recvauth_match_version ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - krb5_pointer /*p_fd*/, - krb5_boolean (*/*match_appl_version*/)(const void *, const char*), - const void */*match_data*/, - krb5_principal /*server*/, - int32_t /*flags*/, - krb5_keytab /*keytab*/, - krb5_ticket **/*ticket*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_address ( - krb5_storage */*sp*/, - krb5_address */*adr*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_addrs ( - krb5_storage */*sp*/, - krb5_addresses */*adr*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_authdata ( - krb5_storage */*sp*/, - krb5_authdata */*auth*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_creds ( - krb5_storage */*sp*/, - krb5_creds */*creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_creds_tag ( - krb5_storage */*sp*/, - krb5_creds */*creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_data ( - krb5_storage */*sp*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_int16 ( - krb5_storage */*sp*/, - int16_t */*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_int32 ( - krb5_storage */*sp*/, - int32_t */*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_int8 ( - krb5_storage */*sp*/, - int8_t */*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_keyblock ( - krb5_storage */*sp*/, - krb5_keyblock */*p*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_principal ( - krb5_storage */*sp*/, - krb5_principal */*princ*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_string ( - krb5_storage */*sp*/, - char **/*string*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_stringnl ( - krb5_storage */*sp*/, - char **/*string*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_stringz ( - krb5_storage */*sp*/, - char **/*string*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_times ( - krb5_storage */*sp*/, - krb5_times */*times*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_uint16 ( - krb5_storage */*sp*/, - uint16_t */*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_uint32 ( - krb5_storage */*sp*/, - uint32_t */*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_uint8 ( - krb5_storage */*sp*/, - uint8_t */*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_salttype_to_string ( - krb5_context /*context*/, - krb5_enctype /*etype*/, - krb5_salttype /*stype*/, - char **/*string*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendauth ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - krb5_pointer /*p_fd*/, - const char */*appl_version*/, - krb5_principal /*client*/, - krb5_principal /*server*/, - krb5_flags /*ap_req_options*/, - krb5_data */*in_data*/, - krb5_creds */*in_creds*/, - krb5_ccache /*ccache*/, - krb5_error **/*ret_error*/, - krb5_ap_rep_enc_part **/*rep_result*/, - krb5_creds **/*out_creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendto ( - krb5_context /*context*/, - const krb5_data */*send_data*/, - krb5_krbhst_handle /*handle*/, - krb5_data */*receive*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendto_context ( - krb5_context /*context*/, - krb5_sendto_ctx /*ctx*/, - const krb5_data */*send_data*/, - const krb5_realm /*realm*/, - krb5_data */*receive*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_sendto_ctx_add_flags ( - krb5_sendto_ctx /*ctx*/, - int /*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendto_ctx_alloc ( - krb5_context /*context*/, - krb5_sendto_ctx */*ctx*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_sendto_ctx_free ( - krb5_context /*context*/, - krb5_sendto_ctx /*ctx*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_sendto_ctx_get_flags (krb5_sendto_ctx /*ctx*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_sendto_ctx_set_func ( - krb5_sendto_ctx /*ctx*/, - krb5_sendto_ctx_func /*func*/, - void */*data*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_sendto_ctx_set_type ( - krb5_sendto_ctx /*ctx*/, - int /*type*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendto_kdc ( - krb5_context /*context*/, - const krb5_data */*send_data*/, - const krb5_realm */*realm*/, - krb5_data */*receive*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendto_kdc_flags ( - krb5_context /*context*/, - const krb5_data */*send_data*/, - const krb5_realm */*realm*/, - krb5_data */*receive*/, - int /*flags*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_config_files ( - krb5_context /*context*/, - char **/*filenames*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_default_in_tkt_etypes ( - krb5_context /*context*/, - const krb5_enctype */*etypes*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_default_realm ( - krb5_context /*context*/, - const char */*realm*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_set_dns_canonicalize_hostname ( - krb5_context /*context*/, - krb5_boolean /*flag*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_set_error_message ( - krb5_context /*context*/, - krb5_error_code /*ret*/, - const char */*fmt*/, - ...) - __attribute__ ((format (printf, 3, 4))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_error_string ( - krb5_context /*context*/, - const char */*fmt*/, - ...) - __attribute__((format (printf, 2, 3))) KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_extra_addresses ( - krb5_context /*context*/, - const krb5_addresses */*addresses*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_fcache_version ( - krb5_context /*context*/, - int /*version*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_set_home_dir_access ( - krb5_context /*context*/, - krb5_boolean /*allow*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_ignore_addresses ( - krb5_context /*context*/, - const krb5_addresses */*addresses*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_kdc_sec_offset ( - krb5_context /*context*/, - int32_t /*sec*/, - int32_t /*usec*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_set_max_time_skew ( - krb5_context /*context*/, - time_t /*t*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_password ( - krb5_context /*context*/, - krb5_creds */*creds*/, - const char */*newpw*/, - krb5_principal /*targprinc*/, - int */*result_code*/, - krb5_data */*result_code_string*/, - krb5_data */*result_string*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_password_using_ccache ( - krb5_context /*context*/, - krb5_ccache /*ccache*/, - const char */*newpw*/, - krb5_principal /*targprinc*/, - int */*result_code*/, - krb5_data */*result_code_string*/, - krb5_data */*result_string*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_real_time ( - krb5_context /*context*/, - krb5_timestamp /*sec*/, - int32_t /*usec*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_send_to_kdc_func ( - krb5_context /*context*/, - krb5_send_to_kdc_func /*func*/, - void */*data*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_set_use_admin_kdc ( - krb5_context /*context*/, - krb5_boolean /*flag*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_warn_dest ( - krb5_context /*context*/, - krb5_log_facility */*fac*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sname_to_principal ( - krb5_context /*context*/, - const char */*hostname*/, - const char */*sname*/, - int32_t /*type*/, - krb5_principal */*ret_princ*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sock_to_principal ( - krb5_context /*context*/, - int /*sock*/, - const char */*sname*/, - int32_t /*type*/, - krb5_principal */*ret_princ*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sockaddr2address ( - krb5_context /*context*/, - const struct sockaddr */*sa*/, - krb5_address */*addr*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sockaddr2port ( - krb5_context /*context*/, - const struct sockaddr */*sa*/, - int16_t */*port*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_sockaddr_is_loopback (const struct sockaddr */*sa*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_sockaddr_uninteresting (const struct sockaddr */*sa*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_std_usage ( - int /*code*/, - struct getargs */*args*/, - int /*num_args*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_storage_clear_flags ( - krb5_storage */*sp*/, - krb5_flags /*flags*/); - -KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL -krb5_storage_emem (void); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_storage_free (krb5_storage */*sp*/); - -KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL -krb5_storage_from_data (krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL -krb5_storage_from_fd (krb5_socket_t /*fd_in*/); - -KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL -krb5_storage_from_mem ( - void */*buf*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL -krb5_storage_from_readonly_mem ( - const void */*buf*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_flags KRB5_LIB_CALL -krb5_storage_get_byteorder (krb5_storage */*sp*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_storage_get_eof_code (krb5_storage */*sp*/); - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_storage_is_flags ( - krb5_storage */*sp*/, - krb5_flags /*flags*/); - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -krb5_storage_read ( - krb5_storage */*sp*/, - void */*buf*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION off_t KRB5_LIB_CALL -krb5_storage_seek ( - krb5_storage */*sp*/, - off_t /*offset*/, - int /*whence*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_storage_set_byteorder ( - krb5_storage */*sp*/, - krb5_flags /*byteorder*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_storage_set_eof_code ( - krb5_storage */*sp*/, - int /*code*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_storage_set_flags ( - krb5_storage */*sp*/, - krb5_flags /*flags*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_storage_set_max_alloc ( - krb5_storage */*sp*/, - size_t /*size*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_storage_to_data ( - krb5_storage */*sp*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_storage_truncate ( - krb5_storage */*sp*/, - off_t /*offset*/); - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -krb5_storage_write ( - krb5_storage */*sp*/, - const void */*buf*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_address ( - krb5_storage */*sp*/, - krb5_address /*p*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_addrs ( - krb5_storage */*sp*/, - krb5_addresses /*p*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_authdata ( - krb5_storage */*sp*/, - krb5_authdata /*auth*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_creds ( - krb5_storage */*sp*/, - krb5_creds */*creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_creds_tag ( - krb5_storage */*sp*/, - krb5_creds */*creds*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_data ( - krb5_storage */*sp*/, - krb5_data /*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_int16 ( - krb5_storage */*sp*/, - int16_t /*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_int32 ( - krb5_storage */*sp*/, - int32_t /*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_int8 ( - krb5_storage */*sp*/, - int8_t /*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_keyblock ( - krb5_storage */*sp*/, - krb5_keyblock /*p*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_principal ( - krb5_storage */*sp*/, - krb5_const_principal /*p*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_string ( - krb5_storage */*sp*/, - const char */*s*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_stringnl ( - krb5_storage */*sp*/, - const char */*s*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_stringz ( - krb5_storage */*sp*/, - const char */*s*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_times ( - krb5_storage */*sp*/, - krb5_times /*times*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_uint16 ( - krb5_storage */*sp*/, - uint16_t /*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_uint32 ( - krb5_storage */*sp*/, - uint32_t /*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_uint8 ( - krb5_storage */*sp*/, - uint8_t /*value*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_deltat ( - const char */*string*/, - krb5_deltat */*deltat*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_enctype ( - krb5_context /*context*/, - const char */*string*/, - krb5_enctype */*etype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - const char */*password*/, - krb5_principal /*principal*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_data ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - krb5_data /*password*/, - krb5_principal /*principal*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_data_salt ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - krb5_data /*password*/, - krb5_salt /*salt*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_data_salt_opaque ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - krb5_data /*password*/, - krb5_salt /*salt*/, - krb5_data /*opaque*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_derived ( - krb5_context /*context*/, - const void */*str*/, - size_t /*len*/, - krb5_enctype /*etype*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_salt ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - const char */*password*/, - krb5_salt /*salt*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_salt_opaque ( - krb5_context /*context*/, - krb5_enctype /*enctype*/, - const char */*password*/, - krb5_salt /*salt*/, - krb5_data /*opaque*/, - krb5_keyblock */*key*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_keytype ( - krb5_context /*context*/, - const char */*string*/, - krb5_keytype */*keytype*/) - KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_salttype ( - krb5_context /*context*/, - krb5_enctype /*etype*/, - const char */*string*/, - krb5_salttype */*salttype*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ticket_get_authorization_data_type ( - krb5_context /*context*/, - krb5_ticket */*ticket*/, - int /*type*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ticket_get_client ( - krb5_context /*context*/, - const krb5_ticket */*ticket*/, - krb5_principal */*client*/); - -KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL -krb5_ticket_get_endtime ( - krb5_context /*context*/, - const krb5_ticket */*ticket*/); - -KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL -krb5_ticket_get_flags ( - krb5_context /*context*/, - const krb5_ticket */*ticket*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ticket_get_server ( - krb5_context /*context*/, - const krb5_ticket */*ticket*/, - krb5_principal */*server*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_timeofday ( - krb5_context /*context*/, - krb5_timestamp */*timeret*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name ( - krb5_context /*context*/, - krb5_const_principal /*principal*/, - char **/*name*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name_fixed ( - krb5_context /*context*/, - krb5_const_principal /*principal*/, - char */*name*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name_fixed_flags ( - krb5_context /*context*/, - krb5_const_principal /*principal*/, - int /*flags*/, - char */*name*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name_fixed_short ( - krb5_context /*context*/, - krb5_const_principal /*principal*/, - char */*name*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name_flags ( - krb5_context /*context*/, - krb5_const_principal /*principal*/, - int /*flags*/, - char **/*name*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name_short ( - krb5_context /*context*/, - krb5_const_principal /*principal*/, - char **/*name*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_us_timeofday ( - krb5_context /*context*/, - krb5_timestamp */*sec*/, - int32_t */*usec*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vabort ( - krb5_context /*context*/, - krb5_error_code /*code*/, - const char */*fmt*/, - va_list /*ap*/) - __attribute__ ((noreturn, format (printf, 3, 0))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vabortx ( - krb5_context /*context*/, - const char */*fmt*/, - va_list /*ap*/) - __attribute__ ((noreturn, format (printf, 2, 0))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_ap_req ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - krb5_ap_req */*ap_req*/, - krb5_const_principal /*server*/, - krb5_keyblock */*keyblock*/, - krb5_flags /*flags*/, - krb5_flags */*ap_req_options*/, - krb5_ticket **/*ticket*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_ap_req2 ( - krb5_context /*context*/, - krb5_auth_context */*auth_context*/, - krb5_ap_req */*ap_req*/, - krb5_const_principal /*server*/, - krb5_keyblock */*keyblock*/, - krb5_flags /*flags*/, - krb5_flags */*ap_req_options*/, - krb5_ticket **/*ticket*/, - krb5_key_usage /*usage*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_authenticator_checksum ( - krb5_context /*context*/, - krb5_auth_context /*ac*/, - void */*data*/, - size_t /*len*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_checksum ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - krb5_key_usage /*usage*/, - void */*data*/, - size_t /*len*/, - Checksum */*cksum*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_checksum_iov ( - krb5_context /*context*/, - krb5_crypto /*crypto*/, - unsigned /*usage*/, - krb5_crypto_iov */*data*/, - unsigned int /*num_data*/, - krb5_cksumtype */*type*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_init_creds ( - krb5_context /*context*/, - krb5_creds */*creds*/, - krb5_principal /*ap_req_server*/, - krb5_keytab /*ap_req_keytab*/, - krb5_ccache */*ccache*/, - krb5_verify_init_creds_opt */*options*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_init_creds_opt_init (krb5_verify_init_creds_opt */*options*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_init_creds_opt_set_ap_req_nofail ( - krb5_verify_init_creds_opt */*options*/, - int /*ap_req_nofail*/); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_verify_opt_alloc ( - krb5_context /*context*/, - krb5_verify_opt **/*opt*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_free (krb5_verify_opt */*opt*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_init (krb5_verify_opt */*opt*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_set_ccache ( - krb5_verify_opt */*opt*/, - krb5_ccache /*ccache*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_set_flags ( - krb5_verify_opt */*opt*/, - unsigned int /*flags*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_set_keytab ( - krb5_verify_opt */*opt*/, - krb5_keytab /*keytab*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_set_secure ( - krb5_verify_opt */*opt*/, - krb5_boolean /*secure*/); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_set_service ( - krb5_verify_opt */*opt*/, - const char */*service*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_user ( - krb5_context /*context*/, - krb5_principal /*principal*/, - krb5_ccache /*ccache*/, - const char */*password*/, - krb5_boolean /*secure*/, - const char */*service*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_user_lrealm ( - krb5_context /*context*/, - krb5_principal /*principal*/, - krb5_ccache /*ccache*/, - const char */*password*/, - krb5_boolean /*secure*/, - const char */*service*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_user_opt ( - krb5_context /*context*/, - krb5_principal /*principal*/, - const char */*password*/, - krb5_verify_opt */*opt*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verr ( - krb5_context /*context*/, - int /*eval*/, - krb5_error_code /*code*/, - const char */*fmt*/, - va_list /*ap*/) - __attribute__ ((noreturn, format (printf, 4, 0))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verrx ( - krb5_context /*context*/, - int /*eval*/, - const char */*fmt*/, - va_list /*ap*/) - __attribute__ ((noreturn, format (printf, 3, 0))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vlog ( - krb5_context /*context*/, - krb5_log_facility */*fac*/, - int /*level*/, - const char */*fmt*/, - va_list /*ap*/) - __attribute__((format (printf, 4, 0))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vlog_msg ( - krb5_context /*context*/, - krb5_log_facility */*fac*/, - char **/*reply*/, - int /*level*/, - const char */*fmt*/, - va_list /*ap*/) - __attribute__((format (printf, 5, 0))); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_vprepend_error_message ( - krb5_context /*context*/, - krb5_error_code /*ret*/, - const char */*fmt*/, - va_list /*args*/) - __attribute__ ((format (printf, 3, 0))); - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_vset_error_message ( - krb5_context /*context*/, - krb5_error_code /*ret*/, - const char */*fmt*/, - va_list /*args*/) - __attribute__ ((format (printf, 3, 0))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vset_error_string ( - krb5_context /*context*/, - const char */*fmt*/, - va_list /*args*/) - __attribute__ ((format (printf, 2, 0))) KRB5_DEPRECATED_FUNCTION("Use X instead"); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vwarn ( - krb5_context /*context*/, - krb5_error_code /*code*/, - const char */*fmt*/, - va_list /*ap*/) - __attribute__ ((format (printf, 3, 0))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vwarnx ( - krb5_context /*context*/, - const char */*fmt*/, - va_list /*ap*/) - __attribute__ ((format (printf, 2, 0))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_warn ( - krb5_context /*context*/, - krb5_error_code /*code*/, - const char */*fmt*/, - ...) - __attribute__ ((format (printf, 3, 4))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_warnx ( - krb5_context /*context*/, - const char */*fmt*/, - ...) - __attribute__ ((format (printf, 2, 3))); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_write_message ( - krb5_context /*context*/, - krb5_pointer /*p_fd*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_write_priv_message ( - krb5_context /*context*/, - krb5_auth_context /*ac*/, - krb5_pointer /*p_fd*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_write_safe_message ( - krb5_context /*context*/, - krb5_auth_context /*ac*/, - krb5_pointer /*p_fd*/, - krb5_data */*data*/); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_xfree (void */*ptr*/); - -#ifdef __cplusplus -} -#endif - -#undef KRB5_DEPRECATED_FUNCTION - -#endif /* __krb5_protos_h__ */ diff --git a/kerberosV/src/lib/krb5/krb5-v4compat.h b/kerberosV/src/lib/krb5/krb5-v4compat.h deleted file mode 100644 index 5efdef2ae09..00000000000 --- a/kerberosV/src/lib/krb5/krb5-v4compat.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (c) 1997 - 2003 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: krb5-v4compat.h,v 1.2 2013/06/17 18:57:44 robert Exp $ */ - -#ifndef __KRB5_V4COMPAT_H__ -#define __KRB5_V4COMPAT_H__ - -#include "krb_err.h" - -/* - * This file must only be included with v4 compat glue stuff in - * heimdal sources. - * - * It MUST NOT be installed. - */ - -#define KRB_PROT_VERSION 4 - -#define AUTH_MSG_KDC_REQUEST (1<<1) -#define AUTH_MSG_KDC_REPLY (2<<1) -#define AUTH_MSG_APPL_REQUEST (3<<1) -#define AUTH_MSG_APPL_REQUEST_MUTUAL (4<<1) -#define AUTH_MSG_ERR_REPLY (5<<1) -#define AUTH_MSG_PRIVATE (6<<1) -#define AUTH_MSG_SAFE (7<<1) -#define AUTH_MSG_APPL_ERR (8<<1) -#define AUTH_MSG_KDC_FORWARD (9<<1) -#define AUTH_MSG_KDC_RENEW (10<<1) -#define AUTH_MSG_DIE (63<<1) - -/* General definitions */ -#define KSUCCESS 0 -#define KFAILURE 255 - -/* */ - -#define MAX_KTXT_LEN 1250 - -#define ANAME_SZ 40 -#define REALM_SZ 40 -#define SNAME_SZ 40 -#define INST_SZ 40 - -struct ktext { - unsigned int length; /* Length of the text */ - unsigned char dat[MAX_KTXT_LEN]; /* The data itself */ - uint32_t mbz; /* zero to catch runaway strings */ -}; - -struct credentials { - char service[ANAME_SZ]; /* Service name */ - char instance[INST_SZ]; /* Instance */ - char realm[REALM_SZ]; /* Auth domain */ - char session[8]; /* Session key */ - int lifetime; /* Lifetime */ - int kvno; /* Key version number */ - struct ktext ticket_st; /* The ticket itself */ - int32_t issue_date; /* The issue time */ - char pname[ANAME_SZ]; /* Principal's name */ - char pinst[INST_SZ]; /* Principal's instance */ -}; - -#define TKTLIFENUMFIXED 64 -#define TKTLIFEMINFIXED 0x80 -#define TKTLIFEMAXFIXED 0xBF -#define TKTLIFENOEXPIRE 0xFF -#define MAXTKTLIFETIME (30*24*3600) /* 30 days */ -#ifndef NEVERDATE -#define NEVERDATE ((time_t)0x7fffffffL) -#endif - -#define KERB_ERR_NULL_KEY 10 - -#define CLOCK_SKEW 5*60 - -#ifndef TKT_ROOT -#ifdef KRB5_USE_PATH_TOKENS -#define TKT_ROOT "%{TEMP}/tkt" -#else -#define TKT_ROOT "/tmp/tkt" -#endif -#endif - -struct _krb5_krb_auth_data { - int8_t k_flags; /* Flags from ticket */ - char *pname; /* Principal's name */ - char *pinst; /* His Instance */ - char *prealm; /* His Realm */ - uint32_t checksum; /* Data checksum (opt) */ - krb5_keyblock session; /* Session Key */ - unsigned char life; /* Life of ticket */ - uint32_t time_sec; /* Time ticket issued */ - uint32_t address; /* Address in ticket */ -}; - -KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL -_krb5_krb_life_to_time (int, int); - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -_krb5_krb_time_to_life (time_t, time_t); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_krb_tf_setup (krb5_context, struct credentials *, - const char *, int); - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_krb_dest_tkt(krb5_context, const char *); - -#define krb_time_to_life _krb5_krb_time_to_life -#define krb_life_to_time _krb5_krb_life_to_time - -#endif /* __KRB5_V4COMPAT_H__ */ diff --git a/kerberosV/src/lib/krb5/krb5.conf.5 b/kerberosV/src/lib/krb5/krb5.conf.5 deleted file mode 100644 index 54a18989bb1..00000000000 --- a/kerberosV/src/lib/krb5/krb5.conf.5 +++ /dev/null @@ -1,575 +0,0 @@ -.\" Copyright (c) 1999 - 2005 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: krb5.conf.5,v 1.12 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 4, 2005 -.Dt KRB5.CONF 5 -.Os HEIMDAL -.Sh NAME -.Nm krb5.conf -.Nd configuration file for Kerberos 5 -.Sh SYNOPSIS -.In krb5.h -.Sh DESCRIPTION -The -.Nm -file specifies several configuration parameters for the Kerberos 5 -library, as well as for some programs. -.Pp -The file consists of one or more sections, containing a number of -bindings. -The value of each binding can be either a string or a list of other -bindings. -The grammar looks like: -.Bd -literal -offset indent -file: - /* empty */ - sections - -sections: - section sections - section - -section: - '[' section_name ']' bindings - -section_name: - STRING - -bindings: - binding bindings - binding - -binding: - name '=' STRING - name '=' '{' bindings '}' - -name: - STRING - -.Ed -.Li STRINGs -consists of one or more non-whitespace characters. -.Pp -STRINGs that are specified later in this man-page uses the following -notation. -.Bl -tag -width "xxx" -offset indent -.It boolean -values can be either yes/true or no/false. -.It time -values can be a list of year, month, day, hour, min, second. -Example: 1 month 2 days 30 min. -If no unit is given, seconds is assumed. -.It etypes -valid encryption types are: des-cbc-crc, des-cbc-md4, des-cbc-md5, -des3-cbc-sha1, arcfour-hmac-md5, aes128-cts-hmac-sha1-96, and -aes256-cts-hmac-sha1-96 . -.It address -an address can be either a IPv4 or a IPv6 address. -.El -.Pp -Currently recognised sections and bindings are: -.Bl -tag -width "xxx" -offset indent -.It Li [appdefaults] -Specifies the default values to be used for Kerberos applications. -You can specify defaults per application, realm, or a combination of -these. -The preference order is: -.Bl -enum -compact -.It -.Va application Va realm Va option -.It -.Va application Va option -.It -.Va realm Va option -.It -.Va option -.El -.Pp -The supported options are: -.Bl -tag -width "xxx" -offset indent -.It Li forwardable = Va boolean -When obtaining initial credentials, make the credentials forwardable. -.It Li proxiable = Va boolean -When obtaining initial credentials, make the credentials proxiable. -.It Li no-addresses = Va boolean -When obtaining initial credentials, request them for an empty set of -addresses, making the tickets valid from any address. -.It Li ticket_lifetime = Va time -Default ticket lifetime. -.It Li renew_lifetime = Va time -Default renewable ticket lifetime. -.It Li encrypt = Va boolean -Use encryption, when available. -.It Li forward = Va boolean -Forward credentials to remote host (for -.Xr rsh 1 , -.Xr telnet 1 , -etc). -.El -.It Li [libdefaults] -.Bl -tag -width "xxx" -offset indent -.It Li default_realm = Va REALM -Default realm to use, this is also known as your -.Dq local realm . -The default is the result of -.Fn krb5_get_host_realm "local hostname" . -.It Li allow_weak_crypto = Va boolean -is weaks crypto algorithms allowed to be used, among others, DES is -considered weak. -.It Li clockskew = Va time -Maximum time differential (in seconds) allowed when comparing -times. -Default is 300 seconds (five minutes). -.It Li kdc_timeout = Va time -Maximum time to wait for a reply from the kdc, default is 3 seconds. -.It Li v4_name_convert -.It Li v4_instance_resolve -These are described in the -.Xr krb5_425_conv_principal 3 -manual page. -.It Li capath = { -.Bl -tag -width "xxx" -offset indent -.It Va destination-realm Li = Va next-hop-realm -.It ... -.It Li } -.El -This is deprecated, see the -.Li capaths -section below. -.It Li default_cc_type = Va cctype -sets the default credentials type. -.It Li default_cc_name = Va ccname -the default credentials cache name. -If you want to change the type only use -.Li default_cc_type . -The string can contain variables that are expanded on runtime. -Only support variable now is -.Li %{uid} -that expands to the current user id. -.It Li default_etypes = Va etypes ... -A list of default encryption types to use. (Default: all enctypes if -allow_weak_crypto = TRUE, else all enctypes except single DES enctypes.) -.It Li default_as_etypes = Va etypes ... -A list of default encryption types to use in AS requests. (Default: the -value of default_etypes.) -.It Li default_tgs_etypes = Va etypes ... -A list of default encryption types to use in TGS requests. (Default: -the value of default_etypes.) -.It Li default_etypes_des = Va etypes ... -A list of default encryption types to use when requesting a DES credential. -.It Li default_keytab_name = Va keytab -The keytab to use if no other is specified, default is -.Dq FILE:/etc/krb5.keytab . -.It Li dns_lookup_kdc = Va boolean -Use DNS SRV records to lookup KDC services location. -.It Li dns_lookup_realm = Va boolean -Use DNS TXT records to lookup domain to realm mappings. -.It Li kdc_timesync = Va boolean -Try to keep track of the time differential between the local machine -and the KDC, and then compensate for that when issuing requests. -.It Li max_retries = Va number -The max number of times to try to contact each KDC. -.It Li large_msg_size = Va number -The threshold where protocols with tiny maximum message sizes are not -considered usable to send messages to the KDC. -.It Li ticket_lifetime = Va time -Default ticket lifetime. -.It Li renew_lifetime = Va time -Default renewable ticket lifetime. -.It Li forwardable = Va boolean -When obtaining initial credentials, make the credentials forwardable. -This option is also valid in the [realms] section. -.It Li proxiable = Va boolean -When obtaining initial credentials, make the credentials proxiable. -This option is also valid in the [realms] section. -.It Li verify_ap_req_nofail = Va boolean -If enabled, failure to verify credentials against a local key is a -fatal error. -The application has to be able to read the corresponding service key -for this to work. -Some applications, like -.Xr su 1 , -enable this option unconditionally. -.It Li warn_pwexpire = Va time -How soon to warn for expiring password. -Default is seven days. -.It Li http_proxy = Va proxy-spec -A HTTP-proxy to use when talking to the KDC via HTTP. -.It Li dns_proxy = Va proxy-spec -Enable using DNS via HTTP. -.It Li extra_addresses = Va address ... -A list of addresses to get tickets for along with all local addresses. -.It Li time_format = Va string -How to print time strings in logs, this string is passed to -.Xr strftime 3 . -.It Li date_format = Va string -How to print date strings in logs, this string is passed to -.Xr strftime 3 . -.It Li log_utc = Va boolean -Write log-entries using UTC instead of your local time zone. -.It Li scan_interfaces = Va boolean -Scan all network interfaces for addresses, as opposed to simply using -the address associated with the system's host name. -.It Li fcache_version = Va int -Use file credential cache format version specified. -.It Li krb4_get_tickets = Va boolean -Also get Kerberos 4 tickets in -.Nm kinit , -.Nm login , -and other programs. -This option is also valid in the [realms] section. -.It Li fcc-mit-ticketflags = Va boolean -Use MIT compatible format for file credential cache. -It's the field ticketflags that is stored in reverse bit order for -older than Heimdal 0.7. -Setting this flag to -.Dv TRUE -make it store the MIT way, this is default for Heimdal 0.7. -.It Li check-rd-req-server -If set to "ignore", the framework will ignore any the server input to -.Xr krb5_rd_req 3, -this is very useful when the GSS-API server input the -wrong server name into the gss_accept_sec_context call. -.El -.It Li [domain_realm] -This is a list of mappings from DNS domain to Kerberos realm. -Each binding in this section looks like: -.Pp -.Dl domain = realm -.Pp -The domain can be either a full name of a host or a trailing -component, in the latter case the domain-string should start with a -period. -The trailing component only matches hosts that are in the same domain, ie -.Dq .example.com -matches -.Dq foo.example.com , -but not -.Dq foo.test.example.com . -.Pp -The realm may be the token `dns_locate', in which case the actual -realm will be determined using DNS (independently of the setting -of the `dns_lookup_realm' option). -.It Li [realms] -.Bl -tag -width "xxx" -offset indent -.It Va REALM Li = { -.Bl -tag -width "xxx" -offset indent -.It Li kdc = Va [service/]host[:port] -Specifies a list of kdcs for this realm. -If the optional -.Va port -is absent, the -default value for the -.Dq kerberos/udp -.Dq kerberos/tcp , -and -.Dq http/tcp -port (depending on service) will be used. -The kdcs will be used in the order that they are specified. -.Pp -The optional -.Va service -specifies over what medium the kdc should be -contacted. -Possible services are -.Dq udp , -.Dq tcp , -and -.Dq http . -Http can also be written as -.Dq http:// . -Default service is -.Dq udp -and -.Dq tcp . -.It Li admin_server = Va host[:port] -Specifies the admin server for this realm, where all the modifications -to the database are performed. -.It Li kpasswd_server = Va host[:port] -Points to the server where all the password changes are performed. -If there is no such entry, the kpasswd port on the admin_server host -will be tried. -.It Li krb524_server = Va host[:port] -Points to the server that does 524 conversions. -If it is not mentioned, the krb524 port on the kdcs will be tried. -.It Li v4_instance_convert -.It Li v4_name_convert -.It Li default_domain -See -.Xr krb5_425_conv_principal 3 . -.It Li tgs_require_subkey -a boolan variable that defaults to false. -Old DCE secd (pre 1.1) might need this to be true. -.El -.It Li } -.El -.It Li [capaths] -.Bl -tag -width "xxx" -offset indent -.It Va client-realm Li = { -.Bl -tag -width "xxx" -offset indent -.It Va server-realm Li = Va hop-realm ... -This serves two purposes. First the first listed -.Va hop-realm -tells a client which realm it should contact in order to ultimately -obtain credentials for a service in the -.Va server-realm . -Secondly, it tells the KDC (and other servers) which realms are -allowed in a multi-hop traversal from -.Va client-realm -to -.Va server-realm . -Except for the client case, the order of the realms are not important. -.El -.It Va } -.El -.It Li [logging] -.Bl -tag -width "xxx" -offset indent -.It Va entity Li = Va destination -Specifies that -.Va entity -should use the specified -.Li destination -for logging. -See the -.Xr krb5_openlog 3 -manual page for a list of defined destinations. -.El -.It Li [kdc] -.Bl -tag -width "xxx" -offset indent -.It Li database Li = { -.Bl -tag -width "xxx" -offset indent -.It Li dbname Li = Va DATABASENAME -Use this database for this realm. -See the info documetation how to configure different database backends. -.It Li realm Li = Va REALM -Specifies the realm that will be stored in this database. -It realm isn't set, it will used as the default database, there can -only be one entry that doesn't have a -.Li realm -stanza. -.It Li mkey_file Li = Pa FILENAME -Use this keytab file for the master key of this database. -If not specified -.Va DATABASENAME Ns .mkey -will be used. -.It Li acl_file Li = PA FILENAME -Use this file for the ACL list of this database. -.It Li log_file Li = Pa FILENAME -Use this file as the log of changes performed to the database. -This file is used by -.Nm ipropd-master -for propagating changes to slaves. -.El -.It Li } -.It Li max-request = Va SIZE -Maximum size of a kdc request. -.It Li require-preauth = Va BOOL -If set pre-authentication is required. -Since krb4 requests are not pre-authenticated they will be rejected. -.It Li ports = Va "list of ports" -List of ports the kdc should listen to. -.It Li addresses = Va "list of interfaces" -List of addresses the kdc should bind to. -.It Li enable-kerberos4 = Va BOOL -Turn on Kerberos 4 support. -.It Li v4-realm = Va REALM -To what realm v4 requests should be mapped. -.It Li enable-524 = Va BOOL -Should the Kerberos 524 converting facility be turned on. -Default is the same as -.Va enable-kerberos4 . -.It Li enable-http = Va BOOL -Should the kdc answer kdc-requests over http. -.It Li enable-kaserver = Va BOOL -If this kdc should emulate the AFS kaserver. -.It Li tgt-use-strongest-session-key = Va BOOL -If this is TRUE then the KDC will prefer the strongest key from the -client's AS-REQ or TGS-REQ enctype list for the ticket session key that -is supported by the KDC and the target principal when the target -principal is a krbtgt principal. Else it will prefer the first key from -the client's AS-REQ enctype list that is also supported by the KDC and -the target principal. Defaults to TRUE. -.It Li svc-use-strongest-session-key = Va BOOL -Like tgt-use-strongest-session-key, but applies to the session key -enctype of tickets for services other than krbtgt principals. Defaults -to TRUE. -.It Li preauth-use-strongest-session-key = Va BOOL -If TRUE then select the strongest possible enctype from the client's -AS-REQ for PA-ETYPE-INFO2 (i.e., for password-based pre-authentication). -Else pick the first supported enctype from the client's AS-REQ. Defaults -to TRUE. -.It Li use-strongest-server-key = Va BOOL -If TRUE then the KDC picks, for the ticket encrypted part's key, the -first supported enctype from the target service principal's hdb entry's -current keyset. Else the KDC picks the first supported enctype from the -target service principal's hdb entry's current keyset. Defaults to TRUE. -.It Li check-ticket-addresses = Va BOOL -Verify the addresses in the tickets used in tgs requests. -.\" XXX -.It Li allow-null-ticket-addresses = Va BOOL -Allow address-less tickets. -.\" XXX -.It Li allow-anonymous = Va BOOL -If the kdc is allowed to hand out anonymous tickets. -.It Li encode_as_rep_as_tgs_rep = Va BOOL -Encode as-rep as tgs-rep tobe compatible with mistakes older DCE secd did. -.\" XXX -.It Li kdc_warn_pwexpire = Va TIME -The time before expiration that the user should be warned that her -password is about to expire. -.It Li logging = Va Logging -What type of logging the kdc should use, see also [logging]/kdc. -.It Li use_2b = { -.Bl -tag -width "xxx" -offset indent -.It Va principal Li = Va BOOL -boolean value if the 524 daemon should return AFS 2b tokens for -.Fa principal . -.It ... -.El -.It Li } -.It Li hdb-ldap-structural-object Va structural object -If the LDAP backend is used for storing principals, this is the -structural object that will be used when creating and when reading -objects. -The default value is account . -.It Li hdb-ldap-create-base Va creation dn -is the dn that will be appended to the principal when creating entries. -Default value is the search dn. -.It Li enable-digest = Va BOOL -Should the kdc answer digest requests. The default is FALSE. -.It Li digests_allowed = Va list of digests -Specifies the digests the kdc will reply to. The default is -.Li ntlm-v2 . -.El -.It Li [kadmin] -.Bl -tag -width "xxx" -offset indent -.It Li require-preauth = Va BOOL -If pre-authentication is required to talk to the kadmin server. -.It Li password_lifetime = Va time -If a principal already have its password set for expiration, this is -the time it will be valid for after a change. -.It Li default_keys = Va keytypes... -For each entry in -.Va default_keys -try to parse it as a sequence of -.Va etype:salttype:salt -syntax of this if something like: -.Pp -[(des|des3|etype):](pw-salt|afs3-salt)[:string] -.Pp -If -.Ar etype -is omitted it means everything, and if string is omitted it means the -default salt string (for that principal and encryption type). -Additional special values of keytypes are: -.Bl -tag -width "xxx" -offset indent -.It Li v5 -The Kerberos 5 salt -.Va pw-salt -.It Li v4 -The Kerberos 4 salt -.Va des:pw-salt: -.El -.It Li use_v4_salt = Va BOOL -When true, this is the same as -.Pp -.Va default_keys = Va des3:pw-salt Va v4 -.Pp -and is only left for backwards compatibility. -.El -.It Li [password_quality] -Check the Password quality assurance in the info documentation for -more information. -.Bl -tag -width "xxx" -offset indent -.It Li check_library = Va library-name -Library name that contains the password check_function -.It Li check_function = Va function-name -Function name for checking passwords in check_library -.It Li policy_libraries = Va library1 ... libraryN -List of libraries that can do password policy checks -.It Li policies = Va policy1 ... policyN -List of policy names to apply to the password. Builtin policies are -among other minimum-length, character-class, external-check. -.El -.El -.Sh ENVIRONMENT -.Ev KRB5_CONFIG -points to the configuration file to read. -.Sh FILES -.Bl -tag -width "/etc/krb5.conf" -.It Pa /etc/krb5.conf -configuration file for Kerberos 5. -.El -.Sh EXAMPLES -.Bd -literal -offset indent -[libdefaults] - default_realm = FOO.SE -[domain_realm] - .foo.se = FOO.SE - .bar.se = FOO.SE -[realms] - FOO.SE = { - kdc = kerberos.foo.se - v4_name_convert = { - rcmd = host - } - v4_instance_convert = { - xyz = xyz.bar.se - } - default_domain = foo.se - } -[logging] - kdc = FILE:/var/heimdal/kdc.log - kdc = SYSLOG:INFO - default = SYSLOG:INFO:USER -.Ed -.Sh DIAGNOSTICS -Since -.Nm -is read and parsed by the krb5 library, there is not a lot of -opportunities for programs to report parsing errors in any useful -format. -To help overcome this problem, there is a program -.Nm verify_krb5_conf -that reads -.Nm -and tries to emit useful diagnostics from parsing errors. -Note that this program does not have any way of knowing what options -are actually used and thus cannot warn about unknown or misspelled -ones. -.Sh SEE ALSO -.Xr kinit 1 , -.Xr krb5_425_conv_principal 3 , -.Xr krb5_openlog 3 , -.Xr strftime 3 , -.Xr verify_krb5_conf 8 diff --git a/kerberosV/src/lib/krb5/krb5.conf.cat5 b/kerberosV/src/lib/krb5/krb5.conf.cat5 deleted file mode 100644 index aa5ab91bc5e..00000000000 --- a/kerberosV/src/lib/krb5/krb5.conf.cat5 +++ /dev/null @@ -1,600 +0,0 @@ - -KRB5.CONF(5) BSD File Formats Manual KRB5.CONF(5) - -NNAAMMEE - kkrrbb55..ccoonnff -- configuration file for Kerberos 5 - -SSYYNNOOPPSSIISS - ##iinncclluuddee <> - -DDEESSCCRRIIPPTTIIOONN - The kkrrbb55..ccoonnff file specifies several configuration parameters for the - Kerberos 5 library, as well as for some programs. - - The file consists of one or more sections, containing a number of bind- - ings. The value of each binding can be either a string or a list of - other bindings. The grammar looks like: - - file: - /* empty */ - sections - - sections: - section sections - section - - section: - '[' section_name ']' bindings - - section_name: - STRING - - bindings: - binding bindings - binding - - binding: - name '=' STRING - name '=' '{' bindings '}' - - name: - STRING - - STRINGs consists of one or more non-whitespace characters. - - STRINGs that are specified later in this man-page uses the following - notation. - - boolean - values can be either yes/true or no/false. - - time - values can be a list of year, month, day, hour, min, second. - Example: 1 month 2 days 30 min. If no unit is given, seconds - is assumed. - - etypes - valid encryption types are: des-cbc-crc, des-cbc-md4, des-cbc- - md5, des3-cbc-sha1, arcfour-hmac-md5, aes128-cts-hmac-sha1-96, - and aes256-cts-hmac-sha1-96 . - - address - an address can be either a IPv4 or a IPv6 address. - - Currently recognised sections and bindings are: - - [appdefaults] - Specifies the default values to be used for Kerberos applica- - tions. You can specify defaults per application, realm, or a - combination of these. The preference order is: - 1. _a_p_p_l_i_c_a_t_i_o_n _r_e_a_l_m _o_p_t_i_o_n - 2. _a_p_p_l_i_c_a_t_i_o_n _o_p_t_i_o_n - 3. _r_e_a_l_m _o_p_t_i_o_n - 4. _o_p_t_i_o_n - - The supported options are: - - forwardable = _b_o_o_l_e_a_n - When obtaining initial credentials, make the cre- - dentials forwardable. - - proxiable = _b_o_o_l_e_a_n - When obtaining initial credentials, make the cre- - dentials proxiable. - - no-addresses = _b_o_o_l_e_a_n - When obtaining initial credentials, request them - for an empty set of addresses, making the tickets - valid from any address. - - ticket_lifetime = _t_i_m_e - Default ticket lifetime. - - renew_lifetime = _t_i_m_e - Default renewable ticket lifetime. - - encrypt = _b_o_o_l_e_a_n - Use encryption, when available. - - forward = _b_o_o_l_e_a_n - Forward credentials to remote host (for rsh(1), - telnet(1), etc). - - [libdefaults] - - default_realm = _R_E_A_L_M - Default realm to use, this is also known as your - ``local realm''. The default is the result of - kkrrbb55__ggeett__hhoosstt__rreeaallmm(_l_o_c_a_l _h_o_s_t_n_a_m_e). - - allow_weak_crypto = _b_o_o_l_e_a_n - is weaks crypto algorithms allowed to be used, - among others, DES is considered weak. - - clockskew = _t_i_m_e - Maximum time differential (in seconds) allowed when - comparing times. Default is 300 seconds (five min- - utes). - - kdc_timeout = _t_i_m_e - Maximum time to wait for a reply from the kdc, - default is 3 seconds. - - v4_name_convert - - v4_instance_resolve - These are described in the - krb5_425_conv_principal(3) manual page. - - capath = { - - _d_e_s_t_i_n_a_t_i_o_n_-_r_e_a_l_m = _n_e_x_t_-_h_o_p_-_r_e_a_l_m - - ... - - } - This is deprecated, see the capaths section below. - - default_cc_type = _c_c_t_y_p_e - sets the default credentials type. - - default_cc_name = _c_c_n_a_m_e - the default credentials cache name. If you want to - change the type only use default_cc_type. The - string can contain variables that are expanded on - runtime. Only support variable now is %{uid} that - expands to the current user id. - - default_etypes = _e_t_y_p_e_s _._._. - A list of default encryption types to use. - (Default: all enctypes if allow_weak_crypto = TRUE, - else all enctypes except single DES enctypes.) - - default_as_etypes = _e_t_y_p_e_s _._._. - A list of default encryption types to use in AS - requests. (Default: the value of default_etypes.) - - default_tgs_etypes = _e_t_y_p_e_s _._._. - A list of default encryption types to use in TGS - requests. (Default: the value of default_etypes.) - - default_etypes_des = _e_t_y_p_e_s _._._. - A list of default encryption types to use when - requesting a DES credential. - - default_keytab_name = _k_e_y_t_a_b - The keytab to use if no other is specified, default - is ``FILE:/etc/krb5.keytab''. - - dns_lookup_kdc = _b_o_o_l_e_a_n - Use DNS SRV records to lookup KDC services loca- - tion. - - dns_lookup_realm = _b_o_o_l_e_a_n - Use DNS TXT records to lookup domain to realm map- - pings. - - kdc_timesync = _b_o_o_l_e_a_n - Try to keep track of the time differential between - the local machine and the KDC, and then compensate - for that when issuing requests. - - max_retries = _n_u_m_b_e_r - The max number of times to try to contact each KDC. - - large_msg_size = _n_u_m_b_e_r - The threshold where protocols with tiny maximum - message sizes are not considered usable to send - messages to the KDC. - - ticket_lifetime = _t_i_m_e - Default ticket lifetime. - - renew_lifetime = _t_i_m_e - Default renewable ticket lifetime. - - forwardable = _b_o_o_l_e_a_n - When obtaining initial credentials, make the cre- - dentials forwardable. This option is also valid in - the [realms] section. - - proxiable = _b_o_o_l_e_a_n - When obtaining initial credentials, make the cre- - dentials proxiable. This option is also valid in - the [realms] section. - - verify_ap_req_nofail = _b_o_o_l_e_a_n - If enabled, failure to verify credentials against a - local key is a fatal error. The application has to - be able to read the corresponding service key for - this to work. Some applications, like su(1), - enable this option unconditionally. - - warn_pwexpire = _t_i_m_e - How soon to warn for expiring password. Default is - seven days. - - http_proxy = _p_r_o_x_y_-_s_p_e_c - A HTTP-proxy to use when talking to the KDC via - HTTP. - - dns_proxy = _p_r_o_x_y_-_s_p_e_c - Enable using DNS via HTTP. - - extra_addresses = _a_d_d_r_e_s_s _._._. - A list of addresses to get tickets for along with - all local addresses. - - time_format = _s_t_r_i_n_g - How to print time strings in logs, this string is - passed to strftime(3). - - date_format = _s_t_r_i_n_g - How to print date strings in logs, this string is - passed to strftime(3). - - log_utc = _b_o_o_l_e_a_n - Write log-entries using UTC instead of your local - time zone. - - scan_interfaces = _b_o_o_l_e_a_n - Scan all network interfaces for addresses, as - opposed to simply using the address associated with - the system's host name. - - fcache_version = _i_n_t - Use file credential cache format version specified. - - krb4_get_tickets = _b_o_o_l_e_a_n - Also get Kerberos 4 tickets in kkiinniitt, llooggiinn, and - other programs. This option is also valid in the - [realms] section. - - fcc-mit-ticketflags = _b_o_o_l_e_a_n - Use MIT compatible format for file credential - cache. It's the field ticketflags that is stored - in reverse bit order for older than Heimdal 0.7. - Setting this flag to TRUE make it store the MIT - way, this is default for Heimdal 0.7. - - check-rd-req-server - If set to "ignore", the framework will ignore any - the server input to krb5_rd_req(3,) this is very - useful when the GSS-API server input the wrong - server name into the gss_accept_sec_context call. - - [domain_realm] - This is a list of mappings from DNS domain to Kerberos realm. - Each binding in this section looks like: - - domain = realm - - The domain can be either a full name of a host or a trailing - component, in the latter case the domain-string should start - with a period. The trailing component only matches hosts that - are in the same domain, ie ``.example.com'' matches - ``foo.example.com'', but not ``foo.test.example.com''. - - The realm may be the token `dns_locate', in which case the - actual realm will be determined using DNS (independently of - the setting of the `dns_lookup_realm' option). - - [realms] - - _R_E_A_L_M = { - - kdc = _[_s_e_r_v_i_c_e_/_]_h_o_s_t_[_:_p_o_r_t_] - Specifies a list of kdcs for this realm. - If the optional _p_o_r_t is absent, the - default value for the ``kerberos/udp'' - ``kerberos/tcp'', and ``http/tcp'' port - (depending on service) will be used. - The kdcs will be used in the order that - they are specified. - - The optional _s_e_r_v_i_c_e specifies over what - medium the kdc should be contacted. - Possible services are ``udp'', ``tcp'', - and ``http''. Http can also be written - as ``http://''. Default service is - ``udp'' and ``tcp''. - - admin_server = _h_o_s_t_[_:_p_o_r_t_] - Specifies the admin server for this - realm, where all the modifications to - the database are performed. - - kpasswd_server = _h_o_s_t_[_:_p_o_r_t_] - Points to the server where all the pass- - word changes are performed. If there is - no such entry, the kpasswd port on the - admin_server host will be tried. - - krb524_server = _h_o_s_t_[_:_p_o_r_t_] - Points to the server that does 524 con- - versions. If it is not mentioned, the - krb524 port on the kdcs will be tried. - - v4_instance_convert - - v4_name_convert - - default_domain - See krb5_425_conv_principal(3). - - tgs_require_subkey - a boolan variable that defaults to - false. Old DCE secd (pre 1.1) might - need this to be true. - - } - - [capaths] - - _c_l_i_e_n_t_-_r_e_a_l_m = { - - _s_e_r_v_e_r_-_r_e_a_l_m = _h_o_p_-_r_e_a_l_m _._._. - This serves two purposes. First the - first listed _h_o_p_-_r_e_a_l_m tells a client - which realm it should contact in order - to ultimately obtain credentials for a - service in the _s_e_r_v_e_r_-_r_e_a_l_m. Secondly, - it tells the KDC (and other servers) - which realms are allowed in a multi-hop - traversal from _c_l_i_e_n_t_-_r_e_a_l_m to - _s_e_r_v_e_r_-_r_e_a_l_m. Except for the client - case, the order of the realms are not - important. - - _} - - [logging] - - _e_n_t_i_t_y = _d_e_s_t_i_n_a_t_i_o_n - Specifies that _e_n_t_i_t_y should use the specified - destination for logging. See the krb5_openlog(3) - manual page for a list of defined destinations. - - [kdc] - - database = { - - dbname = _D_A_T_A_B_A_S_E_N_A_M_E - Use this database for this realm. See - the info documetation how to configure - different database backends. - - realm = _R_E_A_L_M - Specifies the realm that will be stored - in this database. It realm isn't set, - it will used as the default database, - there can only be one entry that doesn't - have a realm stanza. - - mkey_file = _F_I_L_E_N_A_M_E - Use this keytab file for the master key - of this database. If not specified - _D_A_T_A_B_A_S_E_N_A_M_E.mkey will be used. - - acl_file = PA FILENAME - Use this file for the ACL list of this - database. - - log_file = _F_I_L_E_N_A_M_E - Use this file as the log of changes per- - formed to the database. This file is - used by iipprrooppdd--mmaasstteerr for propagating - changes to slaves. - - } - - max-request = _S_I_Z_E - Maximum size of a kdc request. - - require-preauth = _B_O_O_L - If set pre-authentication is required. Since krb4 - requests are not pre-authenticated they will be - rejected. - - ports = _l_i_s_t _o_f _p_o_r_t_s - List of ports the kdc should listen to. - - addresses = _l_i_s_t _o_f _i_n_t_e_r_f_a_c_e_s - List of addresses the kdc should bind to. - - enable-kerberos4 = _B_O_O_L - Turn on Kerberos 4 support. - - v4-realm = _R_E_A_L_M - To what realm v4 requests should be mapped. - - enable-524 = _B_O_O_L - Should the Kerberos 524 converting facility be - turned on. Default is the same as - _e_n_a_b_l_e_-_k_e_r_b_e_r_o_s_4. - - enable-http = _B_O_O_L - Should the kdc answer kdc-requests over http. - - enable-kaserver = _B_O_O_L - If this kdc should emulate the AFS kaserver. - - tgt-use-strongest-session-key = _B_O_O_L - If this is TRUE then the KDC will prefer the - strongest key from the client's AS-REQ or TGS-REQ - enctype list for the ticket session key that is - supported by the KDC and the target principal when - the target principal is a krbtgt principal. Else - it will prefer the first key from the client's AS- - REQ enctype list that is also supported by the KDC - and the target principal. Defaults to TRUE. - - svc-use-strongest-session-key = _B_O_O_L - Like tgt-use-strongest-session-key, but applies to - the session key enctype of tickets for services - other than krbtgt principals. Defaults to TRUE. - - preauth-use-strongest-session-key = _B_O_O_L - If TRUE then select the strongest possible enctype - from the client's AS-REQ for PA-ETYPE-INFO2 (i.e., - for password-based pre-authentication). Else pick - the first supported enctype from the client's AS- - REQ. Defaults to TRUE. - - use-strongest-server-key = _B_O_O_L - If TRUE then the KDC picks, for the ticket - encrypted part's key, the first supported enctype - from the target service principal's hdb entry's - current keyset. Else the KDC picks the first sup- - ported enctype from the target service principal's - hdb entry's current keyset. Defaults to TRUE. - - check-ticket-addresses = _B_O_O_L - Verify the addresses in the tickets used in tgs - requests. - - allow-null-ticket-addresses = _B_O_O_L - Allow address-less tickets. - - allow-anonymous = _B_O_O_L - If the kdc is allowed to hand out anonymous tick- - ets. - - encode_as_rep_as_tgs_rep = _B_O_O_L - Encode as-rep as tgs-rep tobe compatible with mis- - takes older DCE secd did. - - kdc_warn_pwexpire = _T_I_M_E - The time before expiration that the user should be - warned that her password is about to expire. - - logging = _L_o_g_g_i_n_g - What type of logging the kdc should use, see also - [logging]/kdc. - - use_2b = { - - _p_r_i_n_c_i_p_a_l = _B_O_O_L - boolean value if the 524 daemon should - return AFS 2b tokens for _p_r_i_n_c_i_p_a_l. - - ... - - } - - hdb-ldap-structural-object _s_t_r_u_c_t_u_r_a_l _o_b_j_e_c_t - If the LDAP backend is used for storing principals, - this is the structural object that will be used - when creating and when reading objects. The - default value is account . - - hdb-ldap-create-base _c_r_e_a_t_i_o_n _d_n - is the dn that will be appended to the principal - when creating entries. Default value is the search - dn. - - enable-digest = _B_O_O_L - Should the kdc answer digest requests. The default - is FALSE. - - digests_allowed = _l_i_s_t _o_f _d_i_g_e_s_t_s - Specifies the digests the kdc will reply to. The - default is ntlm-v2. - - [kadmin] - - require-preauth = _B_O_O_L - If pre-authentication is required to talk to the - kadmin server. - - password_lifetime = _t_i_m_e - If a principal already have its password set for - expiration, this is the time it will be valid for - after a change. - - default_keys = _k_e_y_t_y_p_e_s_._._. - For each entry in _d_e_f_a_u_l_t___k_e_y_s try to parse it as a - sequence of _e_t_y_p_e_:_s_a_l_t_t_y_p_e_:_s_a_l_t syntax of this if - something like: - - [(des|des3|etype):](pw-salt|afs3-salt)[:string] - - If _e_t_y_p_e is omitted it means everything, and if - string is omitted it means the default salt string - (for that principal and encryption type). Addi- - tional special values of keytypes are: - - v5 The Kerberos 5 salt _p_w_-_s_a_l_t - - v4 The Kerberos 4 salt _d_e_s_:_p_w_-_s_a_l_t_: - - use_v4_salt = _B_O_O_L - When true, this is the same as - - _d_e_f_a_u_l_t___k_e_y_s _= _d_e_s_3_:_p_w_-_s_a_l_t _v_4 - - and is only left for backwards compatibility. - - [password_quality] - Check the Password quality assurance in the info documentation - for more information. - - check_library = _l_i_b_r_a_r_y_-_n_a_m_e - Library name that contains the password check_func- - tion - - check_function = _f_u_n_c_t_i_o_n_-_n_a_m_e - Function name for checking passwords in - check_library - - policy_libraries = _l_i_b_r_a_r_y_1 _._._. _l_i_b_r_a_r_y_N - List of libraries that can do password policy - checks - - policies = _p_o_l_i_c_y_1 _._._. _p_o_l_i_c_y_N - List of policy names to apply to the password. - Builtin policies are among other minimum-length, - character-class, external-check. - -EENNVVIIRROONNMMEENNTT - KRB5_CONFIG points to the configuration file to read. - -FFIILLEESS - /etc/krb5.conf configuration file for Kerberos 5. - -EEXXAAMMPPLLEESS - [libdefaults] - default_realm = FOO.SE - [domain_realm] - .foo.se = FOO.SE - .bar.se = FOO.SE - [realms] - FOO.SE = { - kdc = kerberos.foo.se - v4_name_convert = { - rcmd = host - } - v4_instance_convert = { - xyz = xyz.bar.se - } - default_domain = foo.se - } - [logging] - kdc = FILE:/var/heimdal/kdc.log - kdc = SYSLOG:INFO - default = SYSLOG:INFO:USER - -DDIIAAGGNNOOSSTTIICCSS - Since kkrrbb55..ccoonnff is read and parsed by the krb5 library, there is not a - lot of opportunities for programs to report parsing errors in any useful - format. To help overcome this problem, there is a program - vveerriiffyy__kkrrbb55__ccoonnff that reads kkrrbb55..ccoonnff and tries to emit useful diagnos- - tics from parsing errors. Note that this program does not have any way - of knowing what options are actually used and thus cannot warn about - unknown or misspelled ones. - -SSEEEE AALLSSOO - kinit(1), krb5_425_conv_principal(3), krb5_openlog(3), strftime(3), - verify_krb5_conf(8) - -HEIMDAL May 4, 2005 HEIMDAL diff --git a/kerberosV/src/lib/krb5/krb5.h b/kerberosV/src/lib/krb5/krb5.h deleted file mode 100644 index fecc5e55848..00000000000 --- a/kerberosV/src/lib/krb5/krb5.h +++ /dev/null @@ -1,916 +0,0 @@ -/* - * Copyright (c) 1997 - 2007 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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: krb5.h,v 1.10 2013/11/26 19:15:49 deraadt Exp $ */ - -#ifndef __KRB5_H__ -#define __KRB5_H__ - -#include -#include - -#include -#include -#include -#include - -#include - -/* name confusion with MIT */ -#ifndef KRB5KDC_ERR_KEY_EXP -#define KRB5KDC_ERR_KEY_EXP KRB5KDC_ERR_KEY_EXPIRED -#endif - -#ifdef _WIN32 -#define KRB5_CALLCONV __stdcall -#else -#define KRB5_CALLCONV -#endif - -/* simple constants */ - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif - -typedef int krb5_boolean; - -typedef int32_t krb5_error_code; - -typedef int32_t krb5_kvno; - -typedef uint32_t krb5_flags; - -typedef void *krb5_pointer; -typedef const void *krb5_const_pointer; - -struct krb5_crypto_data; -typedef struct krb5_crypto_data *krb5_crypto; - -struct krb5_get_creds_opt_data; -typedef struct krb5_get_creds_opt_data *krb5_get_creds_opt; - -struct krb5_digest_data; -typedef struct krb5_digest_data *krb5_digest; -struct krb5_ntlm_data; -typedef struct krb5_ntlm_data *krb5_ntlm; - -struct krb5_pac_data; -typedef struct krb5_pac_data *krb5_pac; - -typedef struct krb5_rd_req_in_ctx_data *krb5_rd_req_in_ctx; -typedef struct krb5_rd_req_out_ctx_data *krb5_rd_req_out_ctx; - -typedef CKSUMTYPE krb5_cksumtype; - -typedef Checksum krb5_checksum; - -typedef ENCTYPE krb5_enctype; - -typedef struct krb5_get_init_creds_ctx *krb5_init_creds_context; - -typedef heim_octet_string krb5_data; - -/* PKINIT related forward declarations */ -struct ContentInfo; -struct krb5_pk_identity; -struct krb5_pk_cert; - -/* krb5_enc_data is a mit compat structure */ -typedef struct krb5_enc_data { - krb5_enctype enctype; - krb5_kvno kvno; - krb5_data ciphertext; -} krb5_enc_data; - -/* alternative names */ -enum { - ENCTYPE_NULL = KRB5_ENCTYPE_NULL, - ENCTYPE_DES_CBC_CRC = KRB5_ENCTYPE_DES_CBC_CRC, - ENCTYPE_DES_CBC_MD4 = KRB5_ENCTYPE_DES_CBC_MD4, - ENCTYPE_DES_CBC_MD5 = KRB5_ENCTYPE_DES_CBC_MD5, - ENCTYPE_DES3_CBC_MD5 = KRB5_ENCTYPE_DES3_CBC_MD5, - ENCTYPE_OLD_DES3_CBC_SHA1 = KRB5_ENCTYPE_OLD_DES3_CBC_SHA1, - ENCTYPE_SIGN_DSA_GENERATE = KRB5_ENCTYPE_SIGN_DSA_GENERATE, - ENCTYPE_ENCRYPT_RSA_PRIV = KRB5_ENCTYPE_ENCRYPT_RSA_PRIV, - ENCTYPE_ENCRYPT_RSA_PUB = KRB5_ENCTYPE_ENCRYPT_RSA_PUB, - ENCTYPE_DES3_CBC_SHA1 = KRB5_ENCTYPE_DES3_CBC_SHA1, - ENCTYPE_AES128_CTS_HMAC_SHA1_96 = KRB5_ENCTYPE_AES128_CTS_HMAC_SHA1_96, - ENCTYPE_AES256_CTS_HMAC_SHA1_96 = KRB5_ENCTYPE_AES256_CTS_HMAC_SHA1_96, - ENCTYPE_ARCFOUR_HMAC = KRB5_ENCTYPE_ARCFOUR_HMAC_MD5, - ENCTYPE_ARCFOUR_HMAC_MD5 = KRB5_ENCTYPE_ARCFOUR_HMAC_MD5, - ENCTYPE_ARCFOUR_HMAC_MD5_56 = KRB5_ENCTYPE_ARCFOUR_HMAC_MD5_56, - ENCTYPE_ENCTYPE_PK_CROSS = KRB5_ENCTYPE_ENCTYPE_PK_CROSS, - ENCTYPE_DES_CBC_NONE = KRB5_ENCTYPE_DES_CBC_NONE, - ENCTYPE_DES3_CBC_NONE = KRB5_ENCTYPE_DES3_CBC_NONE, - ENCTYPE_DES_CFB64_NONE = KRB5_ENCTYPE_DES_CFB64_NONE, - ENCTYPE_DES_PCBC_NONE = KRB5_ENCTYPE_DES_PCBC_NONE, - ETYPE_NULL = KRB5_ENCTYPE_NULL, - ETYPE_DES_CBC_CRC = KRB5_ENCTYPE_DES_CBC_CRC, - ETYPE_DES_CBC_MD4 = KRB5_ENCTYPE_DES_CBC_MD4, - ETYPE_DES_CBC_MD5 = KRB5_ENCTYPE_DES_CBC_MD5, - ETYPE_DES3_CBC_MD5 = KRB5_ENCTYPE_DES3_CBC_MD5, - ETYPE_OLD_DES3_CBC_SHA1 = KRB5_ENCTYPE_OLD_DES3_CBC_SHA1, - ETYPE_SIGN_DSA_GENERATE = KRB5_ENCTYPE_SIGN_DSA_GENERATE, - ETYPE_ENCRYPT_RSA_PRIV = KRB5_ENCTYPE_ENCRYPT_RSA_PRIV, - ETYPE_ENCRYPT_RSA_PUB = KRB5_ENCTYPE_ENCRYPT_RSA_PUB, - ETYPE_DES3_CBC_SHA1 = KRB5_ENCTYPE_DES3_CBC_SHA1, - ETYPE_AES128_CTS_HMAC_SHA1_96 = KRB5_ENCTYPE_AES128_CTS_HMAC_SHA1_96, - ETYPE_AES256_CTS_HMAC_SHA1_96 = KRB5_ENCTYPE_AES256_CTS_HMAC_SHA1_96, - ETYPE_ARCFOUR_HMAC_MD5 = KRB5_ENCTYPE_ARCFOUR_HMAC_MD5, - ETYPE_ARCFOUR_HMAC_MD5_56 = KRB5_ENCTYPE_ARCFOUR_HMAC_MD5_56, - ETYPE_ENCTYPE_PK_CROSS = KRB5_ENCTYPE_ENCTYPE_PK_CROSS, - ETYPE_ARCFOUR_MD4 = KRB5_ENCTYPE_ARCFOUR_MD4, - ETYPE_ARCFOUR_HMAC_OLD = KRB5_ENCTYPE_ARCFOUR_HMAC_OLD, - ETYPE_ARCFOUR_HMAC_OLD_EXP = KRB5_ENCTYPE_ARCFOUR_HMAC_OLD_EXP, - ETYPE_DES_CBC_NONE = KRB5_ENCTYPE_DES_CBC_NONE, - ETYPE_DES3_CBC_NONE = KRB5_ENCTYPE_DES3_CBC_NONE, - ETYPE_DES_CFB64_NONE = KRB5_ENCTYPE_DES_CFB64_NONE, - ETYPE_DES_PCBC_NONE = KRB5_ENCTYPE_DES_PCBC_NONE, - ETYPE_DIGEST_MD5_NONE = KRB5_ENCTYPE_DIGEST_MD5_NONE, - ETYPE_CRAM_MD5_NONE = KRB5_ENCTYPE_CRAM_MD5_NONE - -}; - -/* PDU types */ -typedef enum krb5_pdu { - KRB5_PDU_ERROR = 0, - KRB5_PDU_TICKET = 1, - KRB5_PDU_AS_REQUEST = 2, - KRB5_PDU_AS_REPLY = 3, - KRB5_PDU_TGS_REQUEST = 4, - KRB5_PDU_TGS_REPLY = 5, - KRB5_PDU_AP_REQUEST = 6, - KRB5_PDU_AP_REPLY = 7, - KRB5_PDU_KRB_SAFE = 8, - KRB5_PDU_KRB_PRIV = 9, - KRB5_PDU_KRB_CRED = 10, - KRB5_PDU_NONE = 11 /* See krb5_get_permitted_enctypes() */ -} krb5_pdu; - -typedef PADATA_TYPE krb5_preauthtype; - -typedef enum krb5_key_usage { - KRB5_KU_PA_ENC_TIMESTAMP = 1, - /* AS-REQ PA-ENC-TIMESTAMP padata timestamp, encrypted with the - client key (section 5.4.1) */ - KRB5_KU_TICKET = 2, - /* AS-REP Ticket and TGS-REP Ticket (includes tgs session key or - application session key), encrypted with the service key - (section 5.4.2) */ - KRB5_KU_AS_REP_ENC_PART = 3, - /* AS-REP encrypted part (includes tgs session key or application - session key), encrypted with the client key (section 5.4.2) */ - KRB5_KU_TGS_REQ_AUTH_DAT_SESSION = 4, - /* TGS-REQ KDC-REQ-BODY AuthorizationData, encrypted with the tgs - session key (section 5.4.1) */ - KRB5_KU_TGS_REQ_AUTH_DAT_SUBKEY = 5, - /* TGS-REQ KDC-REQ-BODY AuthorizationData, encrypted with the tgs - authenticator subkey (section 5.4.1) */ - KRB5_KU_TGS_REQ_AUTH_CKSUM = 6, - /* TGS-REQ PA-TGS-REQ padata AP-REQ Authenticator cksum, keyed - with the tgs session key (sections 5.3.2, 5.4.1) */ - KRB5_KU_TGS_REQ_AUTH = 7, - /* TGS-REQ PA-TGS-REQ padata AP-REQ Authenticator (includes tgs - authenticator subkey), encrypted with the tgs session key - (section 5.3.2) */ - KRB5_KU_TGS_REP_ENC_PART_SESSION = 8, - /* TGS-REP encrypted part (includes application session key), - encrypted with the tgs session key (section 5.4.2) */ - KRB5_KU_TGS_REP_ENC_PART_SUB_KEY = 9, - /* TGS-REP encrypted part (includes application session key), - encrypted with the tgs authenticator subkey (section 5.4.2) */ - KRB5_KU_AP_REQ_AUTH_CKSUM = 10, - /* AP-REQ Authenticator cksum, keyed with the application session - key (section 5.3.2) */ - KRB5_KU_AP_REQ_AUTH = 11, - /* AP-REQ Authenticator (includes application authenticator - subkey), encrypted with the application session key (section - 5.3.2) */ - KRB5_KU_AP_REQ_ENC_PART = 12, - /* AP-REP encrypted part (includes application session subkey), - encrypted with the application session key (section 5.5.2) */ - KRB5_KU_KRB_PRIV = 13, - /* KRB-PRIV encrypted part, encrypted with a key chosen by the - application (section 5.7.1) */ - KRB5_KU_KRB_CRED = 14, - /* KRB-CRED encrypted part, encrypted with a key chosen by the - application (section 5.8.1) */ - KRB5_KU_KRB_SAFE_CKSUM = 15, - /* KRB-SAFE cksum, keyed with a key chosen by the application - (section 5.6.1) */ - KRB5_KU_OTHER_ENCRYPTED = 16, - /* Data which is defined in some specification outside of - Kerberos to be encrypted using an RFC1510 encryption type. */ - KRB5_KU_OTHER_CKSUM = 17, - /* Data which is defined in some specification outside of - Kerberos to be checksummed using an RFC1510 checksum type. */ - KRB5_KU_KRB_ERROR = 18, - /* Krb-error checksum */ - KRB5_KU_AD_KDC_ISSUED = 19, - /* AD-KDCIssued checksum */ - KRB5_KU_MANDATORY_TICKET_EXTENSION = 20, - /* Checksum for Mandatory Ticket Extensions */ - KRB5_KU_AUTH_DATA_TICKET_EXTENSION = 21, - /* Checksum in Authorization Data in Ticket Extensions */ - KRB5_KU_USAGE_SEAL = 22, - /* seal in GSSAPI krb5 mechanism */ - KRB5_KU_USAGE_SIGN = 23, - /* sign in GSSAPI krb5 mechanism */ - KRB5_KU_USAGE_SEQ = 24, - /* SEQ in GSSAPI krb5 mechanism */ - KRB5_KU_USAGE_ACCEPTOR_SEAL = 22, - /* acceptor sign in GSSAPI CFX krb5 mechanism */ - KRB5_KU_USAGE_ACCEPTOR_SIGN = 23, - /* acceptor seal in GSSAPI CFX krb5 mechanism */ - KRB5_KU_USAGE_INITIATOR_SEAL = 24, - /* initiator sign in GSSAPI CFX krb5 mechanism */ - KRB5_KU_USAGE_INITIATOR_SIGN = 25, - /* initiator seal in GSSAPI CFX krb5 mechanism */ - KRB5_KU_PA_SERVER_REFERRAL_DATA = 22, - /* encrypted server referral data */ - KRB5_KU_SAM_CHECKSUM = 25, - /* Checksum for the SAM-CHECKSUM field */ - KRB5_KU_SAM_ENC_TRACK_ID = 26, - /* Encryption of the SAM-TRACK-ID field */ - KRB5_KU_PA_SERVER_REFERRAL = 26, - /* Keyusage for the server referral in a TGS req */ - KRB5_KU_SAM_ENC_NONCE_SAD = 27, - /* Encryption of the SAM-NONCE-OR-SAD field */ - KRB5_KU_PA_PKINIT_KX = 44, - /* Encryption type of the kdc session contribution in pk-init */ - KRB5_KU_AS_REQ = 56, - /* Checksum of over the AS-REQ send by the KDC in PA-REQ-ENC-PA-REP */ - KRB5_KU_DIGEST_ENCRYPT = -18, - /* Encryption key usage used in the digest encryption field */ - KRB5_KU_DIGEST_OPAQUE = -19, - /* Checksum key usage used in the digest opaque field */ - KRB5_KU_KRB5SIGNEDPATH = -21, - /* Checksum key usage on KRB5SignedPath */ - KRB5_KU_CANONICALIZED_NAMES = -23 - /* Checksum key usage on PA-CANONICALIZED */ -} krb5_key_usage; - -typedef krb5_key_usage krb5_keyusage; - -typedef enum krb5_salttype { - KRB5_PW_SALT = KRB5_PADATA_PW_SALT, - KRB5_AFS3_SALT = KRB5_PADATA_AFS3_SALT -}krb5_salttype; - -typedef struct krb5_salt { - krb5_salttype salttype; - krb5_data saltvalue; -} krb5_salt; - -typedef ETYPE_INFO krb5_preauthinfo; - -typedef struct { - krb5_preauthtype type; - krb5_preauthinfo info; /* list of preauthinfo for this type */ -} krb5_preauthdata_entry; - -typedef struct krb5_preauthdata { - unsigned len; - krb5_preauthdata_entry *val; -}krb5_preauthdata; - -typedef enum krb5_address_type { - KRB5_ADDRESS_INET = 2, - KRB5_ADDRESS_NETBIOS = 20, - KRB5_ADDRESS_INET6 = 24, - KRB5_ADDRESS_ADDRPORT = 256, - KRB5_ADDRESS_IPPORT = 257 -} krb5_address_type; - -enum { - AP_OPTS_USE_SESSION_KEY = 1, - AP_OPTS_MUTUAL_REQUIRED = 2, - AP_OPTS_USE_SUBKEY = 4 /* library internal */ -}; - -typedef HostAddress krb5_address; - -typedef HostAddresses krb5_addresses; - -typedef krb5_enctype krb5_keytype; - -enum krb5_keytype_old { - KEYTYPE_NULL = ETYPE_NULL, - KEYTYPE_DES = ETYPE_DES_CBC_CRC, - KEYTYPE_DES3 = ETYPE_OLD_DES3_CBC_SHA1, - KEYTYPE_AES128 = ETYPE_AES128_CTS_HMAC_SHA1_96, - KEYTYPE_AES256 = ETYPE_AES256_CTS_HMAC_SHA1_96, - KEYTYPE_ARCFOUR = ETYPE_ARCFOUR_HMAC_MD5, - KEYTYPE_ARCFOUR_56 = ETYPE_ARCFOUR_HMAC_MD5_56 -}; - -typedef EncryptionKey krb5_keyblock; - -typedef AP_REQ krb5_ap_req; - -struct krb5_cc_ops; - -#ifdef _WIN32 -#define KRB5_USE_PATH_TOKENS 1 -#endif - -#ifdef KRB5_USE_PATH_TOKENS -#define KRB5_DEFAULT_CCFILE_ROOT "%{TEMP}/krb5cc_" -#else -#define KRB5_DEFAULT_CCFILE_ROOT "/tmp/krb5cc_" -#endif - -#define KRB5_DEFAULT_CCROOT "FILE:" KRB5_DEFAULT_CCFILE_ROOT - -#define KRB5_ACCEPT_NULL_ADDRESSES(C) \ - krb5_config_get_bool_default((C), NULL, TRUE, \ - "libdefaults", "accept_null_addresses", \ - NULL) - -typedef void *krb5_cc_cursor; -typedef struct krb5_cccol_cursor_data *krb5_cccol_cursor; - -typedef struct krb5_ccache_data { - const struct krb5_cc_ops *ops; - krb5_data data; -}krb5_ccache_data; - -typedef struct krb5_ccache_data *krb5_ccache; - -typedef struct krb5_context_data *krb5_context; - -typedef Realm krb5_realm; -typedef const char *krb5_const_realm; /* stupid language */ - -#define krb5_realm_length(r) strlen(r) -#define krb5_realm_data(r) (r) - -typedef Principal krb5_principal_data; -typedef struct Principal *krb5_principal; -typedef const struct Principal *krb5_const_principal; -typedef struct Principals *krb5_principals; - -typedef time_t krb5_deltat; -typedef time_t krb5_timestamp; - -typedef struct krb5_times { - krb5_timestamp authtime; - krb5_timestamp starttime; - krb5_timestamp endtime; - krb5_timestamp renew_till; -} krb5_times; - -typedef union { - TicketFlags b; - krb5_flags i; -} krb5_ticket_flags; - -/* options for krb5_get_in_tkt() */ -#define KDC_OPT_FORWARDABLE (1 << 1) -#define KDC_OPT_FORWARDED (1 << 2) -#define KDC_OPT_PROXIABLE (1 << 3) -#define KDC_OPT_PROXY (1 << 4) -#define KDC_OPT_ALLOW_POSTDATE (1 << 5) -#define KDC_OPT_POSTDATED (1 << 6) -#define KDC_OPT_RENEWABLE (1 << 8) -#define KDC_OPT_REQUEST_ANONYMOUS (1 << 14) -#define KDC_OPT_DISABLE_TRANSITED_CHECK (1 << 26) -#define KDC_OPT_RENEWABLE_OK (1 << 27) -#define KDC_OPT_ENC_TKT_IN_SKEY (1 << 28) -#define KDC_OPT_RENEW (1 << 30) -#define KDC_OPT_VALIDATE (1U << 31) - -typedef union { - KDCOptions b; - krb5_flags i; -} krb5_kdc_flags; - -/* flags for krb5_verify_ap_req */ - -#define KRB5_VERIFY_AP_REQ_IGNORE_INVALID (1 << 0) - -#define KRB5_GC_CACHED (1U << 0) -#define KRB5_GC_USER_USER (1U << 1) -#define KRB5_GC_EXPIRED_OK (1U << 2) -#define KRB5_GC_NO_STORE (1U << 3) -#define KRB5_GC_FORWARDABLE (1U << 4) -#define KRB5_GC_NO_TRANSIT_CHECK (1U << 5) -#define KRB5_GC_CONSTRAINED_DELEGATION (1U << 6) -#define KRB5_GC_CANONICALIZE (1U << 7) - -/* constants for compare_creds (and cc_retrieve_cred) */ -#define KRB5_TC_DONT_MATCH_REALM (1U << 31) -#define KRB5_TC_MATCH_KEYTYPE (1U << 30) -#define KRB5_TC_MATCH_KTYPE KRB5_TC_MATCH_KEYTYPE /* MIT name */ -#define KRB5_TC_MATCH_SRV_NAMEONLY (1 << 29) -#define KRB5_TC_MATCH_FLAGS_EXACT (1 << 28) -#define KRB5_TC_MATCH_FLAGS (1 << 27) -#define KRB5_TC_MATCH_TIMES_EXACT (1 << 26) -#define KRB5_TC_MATCH_TIMES (1 << 25) -#define KRB5_TC_MATCH_AUTHDATA (1 << 24) -#define KRB5_TC_MATCH_2ND_TKT (1 << 23) -#define KRB5_TC_MATCH_IS_SKEY (1 << 22) - -/* constants for get_flags and set_flags */ -#define KRB5_TC_OPENCLOSE 0x00000001 -#define KRB5_TC_NOTICKET 0x00000002 - -typedef AuthorizationData krb5_authdata; - -typedef KRB_ERROR krb5_error; - -typedef struct krb5_creds { - krb5_principal client; - krb5_principal server; - krb5_keyblock session; - krb5_times times; - krb5_data ticket; - krb5_data second_ticket; - krb5_authdata authdata; - krb5_addresses addresses; - krb5_ticket_flags flags; -} krb5_creds; - -typedef struct krb5_cc_cache_cursor_data *krb5_cc_cache_cursor; - -#define KRB5_CC_OPS_VERSION 3 - -typedef struct krb5_cc_ops { - int version; - const char *prefix; - const char* (KRB5_CALLCONV * get_name)(krb5_context, krb5_ccache); - krb5_error_code (KRB5_CALLCONV * resolve)(krb5_context, krb5_ccache *, const char *); - krb5_error_code (KRB5_CALLCONV * gen_new)(krb5_context, krb5_ccache *); - krb5_error_code (KRB5_CALLCONV * init)(krb5_context, krb5_ccache, krb5_principal); - krb5_error_code (KRB5_CALLCONV * destroy)(krb5_context, krb5_ccache); - krb5_error_code (KRB5_CALLCONV * close)(krb5_context, krb5_ccache); - krb5_error_code (KRB5_CALLCONV * store)(krb5_context, krb5_ccache, krb5_creds*); - krb5_error_code (KRB5_CALLCONV * retrieve)(krb5_context, krb5_ccache, - krb5_flags, const krb5_creds*, krb5_creds *); - krb5_error_code (KRB5_CALLCONV * get_princ)(krb5_context, krb5_ccache, krb5_principal*); - krb5_error_code (KRB5_CALLCONV * get_first)(krb5_context, krb5_ccache, krb5_cc_cursor *); - krb5_error_code (KRB5_CALLCONV * get_next)(krb5_context, krb5_ccache, - krb5_cc_cursor*, krb5_creds*); - krb5_error_code (KRB5_CALLCONV * end_get)(krb5_context, krb5_ccache, krb5_cc_cursor*); - krb5_error_code (KRB5_CALLCONV * remove_cred)(krb5_context, krb5_ccache, - krb5_flags, krb5_creds*); - krb5_error_code (KRB5_CALLCONV * set_flags)(krb5_context, krb5_ccache, krb5_flags); - int (KRB5_CALLCONV * get_version)(krb5_context, krb5_ccache); - krb5_error_code (KRB5_CALLCONV * get_cache_first)(krb5_context, krb5_cc_cursor *); - krb5_error_code (KRB5_CALLCONV * get_cache_next)(krb5_context, krb5_cc_cursor, - krb5_ccache *); - krb5_error_code (KRB5_CALLCONV * end_cache_get)(krb5_context, krb5_cc_cursor); - krb5_error_code (KRB5_CALLCONV * move)(krb5_context, krb5_ccache, krb5_ccache); - krb5_error_code (KRB5_CALLCONV * get_default_name)(krb5_context, char **); - krb5_error_code (KRB5_CALLCONV * set_default)(krb5_context, krb5_ccache); - krb5_error_code (KRB5_CALLCONV * lastchange)(krb5_context, krb5_ccache, krb5_timestamp *); - krb5_error_code (KRB5_CALLCONV * set_kdc_offset)(krb5_context, krb5_ccache, krb5_deltat); - krb5_error_code (KRB5_CALLCONV * get_kdc_offset)(krb5_context, krb5_ccache, krb5_deltat *); -} krb5_cc_ops; - -struct krb5_log_facility; - -struct krb5_config_binding { - enum { krb5_config_string, krb5_config_list } type; - char *name; - struct krb5_config_binding *next; - union { - char *string; - struct krb5_config_binding *list; - void *generic; - } u; -}; - -typedef struct krb5_config_binding krb5_config_binding; - -typedef krb5_config_binding krb5_config_section; - -typedef struct krb5_ticket { - EncTicketPart ticket; - krb5_principal client; - krb5_principal server; -} krb5_ticket; - -typedef Authenticator krb5_authenticator_data; - -typedef krb5_authenticator_data *krb5_authenticator; - -struct krb5_rcache_data; -typedef struct krb5_rcache_data *krb5_rcache; -typedef Authenticator krb5_donot_replay; - -#define KRB5_STORAGE_HOST_BYTEORDER 0x01 /* old */ -#define KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS 0x02 -#define KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE 0x04 -#define KRB5_STORAGE_KEYBLOCK_KEYTYPE_TWICE 0x08 -#define KRB5_STORAGE_BYTEORDER_MASK 0x60 -#define KRB5_STORAGE_BYTEORDER_BE 0x00 /* default */ -#define KRB5_STORAGE_BYTEORDER_LE 0x20 -#define KRB5_STORAGE_BYTEORDER_HOST 0x40 -#define KRB5_STORAGE_CREDS_FLAGS_WRONG_BITORDER 0x80 - -struct krb5_storage_data; -typedef struct krb5_storage_data krb5_storage; - -typedef struct krb5_keytab_entry { - krb5_principal principal; - krb5_kvno vno; - krb5_keyblock keyblock; - uint32_t timestamp; - uint32_t flags; - krb5_principals aliases; -} krb5_keytab_entry; - -typedef struct krb5_kt_cursor { - int fd; - krb5_storage *sp; - void *data; -} krb5_kt_cursor; - -struct krb5_keytab_data; - -typedef struct krb5_keytab_data *krb5_keytab; - -#define KRB5_KT_PREFIX_MAX_LEN 30 - -struct krb5_keytab_data { - const char *prefix; - krb5_error_code (KRB5_CALLCONV * resolve)(krb5_context, const char*, krb5_keytab); - krb5_error_code (KRB5_CALLCONV * get_name)(krb5_context, krb5_keytab, char*, size_t); - krb5_error_code (KRB5_CALLCONV * close)(krb5_context, krb5_keytab); - krb5_error_code (KRB5_CALLCONV * destroy)(krb5_context, krb5_keytab); - krb5_error_code (KRB5_CALLCONV * get)(krb5_context, krb5_keytab, krb5_const_principal, - krb5_kvno, krb5_enctype, krb5_keytab_entry*); - krb5_error_code (KRB5_CALLCONV * start_seq_get)(krb5_context, krb5_keytab, krb5_kt_cursor*); - krb5_error_code (KRB5_CALLCONV * next_entry)(krb5_context, krb5_keytab, - krb5_keytab_entry*, krb5_kt_cursor*); - krb5_error_code (KRB5_CALLCONV * end_seq_get)(krb5_context, krb5_keytab, krb5_kt_cursor*); - krb5_error_code (KRB5_CALLCONV * add)(krb5_context, krb5_keytab, krb5_keytab_entry*); - krb5_error_code (KRB5_CALLCONV * remove)(krb5_context, krb5_keytab, krb5_keytab_entry*); - void *data; - int32_t version; -}; - -typedef struct krb5_keytab_data krb5_kt_ops; - -struct krb5_keytab_key_proc_args { - krb5_keytab keytab; - krb5_principal principal; -}; - -typedef struct krb5_keytab_key_proc_args krb5_keytab_key_proc_args; - -typedef struct krb5_replay_data { - krb5_timestamp timestamp; - int32_t usec; - uint32_t seq; -} krb5_replay_data; - -/* flags for krb5_auth_con_setflags */ -enum { - KRB5_AUTH_CONTEXT_DO_TIME = 1, - KRB5_AUTH_CONTEXT_RET_TIME = 2, - KRB5_AUTH_CONTEXT_DO_SEQUENCE = 4, - KRB5_AUTH_CONTEXT_RET_SEQUENCE = 8, - KRB5_AUTH_CONTEXT_PERMIT_ALL = 16, - KRB5_AUTH_CONTEXT_USE_SUBKEY = 32, - KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED = 64 -}; - -/* flags for krb5_auth_con_genaddrs */ -enum { - KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR = 1, - KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR = 3, - KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR = 4, - KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR = 12 -}; - -typedef struct krb5_auth_context_data { - unsigned int flags; - - krb5_address *local_address; - krb5_address *remote_address; - int16_t local_port; - int16_t remote_port; - krb5_keyblock *keyblock; - krb5_keyblock *local_subkey; - krb5_keyblock *remote_subkey; - - uint32_t local_seqnumber; - uint32_t remote_seqnumber; - - krb5_authenticator authenticator; - - krb5_pointer i_vector; - - krb5_rcache rcache; - - krb5_keytype keytype; /* ¿requested key type ? */ - krb5_cksumtype cksumtype; /* ¡requested checksum type! */ - -}krb5_auth_context_data, *krb5_auth_context; - -typedef struct { - KDC_REP kdc_rep; - EncKDCRepPart enc_part; - KRB_ERROR error; -} krb5_kdc_rep; - -extern const char *heimdal_version, *heimdal_long_version; - -typedef void (KRB5_CALLCONV * krb5_log_log_func_t)(const char*, const char*, void*); -typedef void (KRB5_CALLCONV * krb5_log_close_func_t)(void*); - -typedef struct krb5_log_facility { - char *program; - int len; - struct facility *val; -} krb5_log_facility; - -typedef EncAPRepPart krb5_ap_rep_enc_part; - -#define KRB5_RECVAUTH_IGNORE_VERSION 1 - -#define KRB5_SENDAUTH_VERSION "KRB5_SENDAUTH_V1.0" - -#define KRB5_TGS_NAME_SIZE (6) -#define KRB5_TGS_NAME ("krbtgt") -#define KRB5_WELLKNOWN_NAME ("WELLKNOWN") -#define KRB5_ANON_NAME ("ANONYMOUS") -#define KRB5_DIGEST_NAME ("digest") - -typedef enum { - KRB5_PROMPT_TYPE_PASSWORD = 0x1, - KRB5_PROMPT_TYPE_NEW_PASSWORD = 0x2, - KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN = 0x3, - KRB5_PROMPT_TYPE_PREAUTH = 0x4, - KRB5_PROMPT_TYPE_INFO = 0x5 -} krb5_prompt_type; - -typedef struct _krb5_prompt { - const char *prompt; - int hidden; - krb5_data *reply; - krb5_prompt_type type; -} krb5_prompt; - -typedef int (KRB5_CALLCONV * krb5_prompter_fct)(krb5_context /*context*/, - void * /*data*/, - const char * /*name*/, - const char * /*banner*/, - int /*num_prompts*/, - krb5_prompt /*prompts*/[]); -typedef krb5_error_code (KRB5_CALLCONV * krb5_key_proc)(krb5_context /*context*/, - krb5_enctype /*type*/, - krb5_salt /*salt*/, - krb5_const_pointer /*keyseed*/, - krb5_keyblock ** /*key*/); -typedef krb5_error_code (KRB5_CALLCONV * krb5_decrypt_proc)(krb5_context /*context*/, - krb5_keyblock * /*key*/, - krb5_key_usage /*usage*/, - krb5_const_pointer /*decrypt_arg*/, - krb5_kdc_rep * /*dec_rep*/); -typedef krb5_error_code (KRB5_CALLCONV * krb5_s2k_proc)(krb5_context /*context*/, - krb5_enctype /*type*/, - krb5_const_pointer /*keyseed*/, - krb5_salt /*salt*/, - krb5_data * /*s2kparms*/, - krb5_keyblock ** /*key*/); - -struct _krb5_get_init_creds_opt_private; - -struct _krb5_get_init_creds_opt { - krb5_flags flags; - krb5_deltat tkt_life; - krb5_deltat renew_life; - int forwardable; - int proxiable; - int anonymous; - krb5_enctype *etype_list; - int etype_list_length; - krb5_addresses *address_list; - /* XXX the next three should not be used, as they may be - removed later */ - krb5_preauthtype *preauth_list; - int preauth_list_length; - krb5_data *salt; - struct _krb5_get_init_creds_opt_private *opt_private; -}; - -typedef struct _krb5_get_init_creds_opt krb5_get_init_creds_opt; - -#define KRB5_GET_INIT_CREDS_OPT_TKT_LIFE 0x0001 -#define KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE 0x0002 -#define KRB5_GET_INIT_CREDS_OPT_FORWARDABLE 0x0004 -#define KRB5_GET_INIT_CREDS_OPT_PROXIABLE 0x0008 -#define KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST 0x0010 -#define KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST 0x0020 -#define KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST 0x0040 -#define KRB5_GET_INIT_CREDS_OPT_SALT 0x0080 /* no supported */ -#define KRB5_GET_INIT_CREDS_OPT_ANONYMOUS 0x0100 -#define KRB5_GET_INIT_CREDS_OPT_DISABLE_TRANSITED_CHECK 0x0200 - -/* krb5_init_creds_step flags argument */ -#define KRB5_INIT_CREDS_STEP_FLAG_CONTINUE 0x0001 - -typedef struct _krb5_verify_init_creds_opt { - krb5_flags flags; - int ap_req_nofail; -} krb5_verify_init_creds_opt; - -#define KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL 0x0001 - -typedef struct krb5_verify_opt { - unsigned int flags; - krb5_ccache ccache; - krb5_keytab keytab; - krb5_boolean secure; - const char *service; -} krb5_verify_opt; - -#define KRB5_VERIFY_LREALMS 1 -#define KRB5_VERIFY_NO_ADDRESSES 2 - -#define KRB5_KPASSWD_VERS_CHANGEPW 1 -#define KRB5_KPASSWD_VERS_SETPW 0xff80 - -#define KRB5_KPASSWD_SUCCESS 0 -#define KRB5_KPASSWD_MALFORMED 1 -#define KRB5_KPASSWD_HARDERROR 2 -#define KRB5_KPASSWD_AUTHERROR 3 -#define KRB5_KPASSWD_SOFTERROR 4 -#define KRB5_KPASSWD_ACCESSDENIED 5 -#define KRB5_KPASSWD_BAD_VERSION 6 -#define KRB5_KPASSWD_INITIAL_FLAG_NEEDED 7 - -#define KPASSWD_PORT 464 - -/* types for the new krbhst interface */ -struct krb5_krbhst_data; -typedef struct krb5_krbhst_data *krb5_krbhst_handle; - -#define KRB5_KRBHST_KDC 1 -#define KRB5_KRBHST_ADMIN 2 -#define KRB5_KRBHST_CHANGEPW 3 -#define KRB5_KRBHST_KRB524 4 -#define KRB5_KRBHST_KCA 5 - -typedef struct krb5_krbhst_info { - enum { KRB5_KRBHST_UDP, - KRB5_KRBHST_TCP, - KRB5_KRBHST_HTTP } proto; - unsigned short port; - unsigned short def_port; - struct addrinfo *ai; - struct krb5_krbhst_info *next; - char hostname[1]; /* has to come last */ -} krb5_krbhst_info; - -/* flags for krb5_krbhst_init_flags (and krb5_send_to_kdc_flags) */ -enum { - KRB5_KRBHST_FLAGS_MASTER = 1, - KRB5_KRBHST_FLAGS_LARGE_MSG = 2 -}; - -typedef krb5_error_code -(KRB5_CALLCONV * krb5_send_to_kdc_func)(krb5_context, void *, krb5_krbhst_info *, time_t, - const krb5_data *, krb5_data *); - -/** flags for krb5_parse_name_flags */ -enum { - KRB5_PRINCIPAL_PARSE_NO_REALM = 1, /**< Require that there are no realm */ - KRB5_PRINCIPAL_PARSE_REQUIRE_REALM = 2, /**< Require a realm present */ - KRB5_PRINCIPAL_PARSE_ENTERPRISE = 4 /**< Parse as a NT-ENTERPRISE name */ -}; - -/** flags for krb5_unparse_name_flags */ -enum { - KRB5_PRINCIPAL_UNPARSE_SHORT = 1, /**< No realm if it is the default realm */ - KRB5_PRINCIPAL_UNPARSE_NO_REALM = 2, /**< No realm */ - KRB5_PRINCIPAL_UNPARSE_DISPLAY = 4 /**< No quoting */ -}; - -typedef struct krb5_sendto_ctx_data *krb5_sendto_ctx; - -#define KRB5_SENDTO_DONE 0 -#define KRB5_SENDTO_RESTART 1 -#define KRB5_SENDTO_CONTINUE 2 - -typedef krb5_error_code -(KRB5_CALLCONV * krb5_sendto_ctx_func)(krb5_context, krb5_sendto_ctx, void *, - const krb5_data *, int *); - -struct krb5_plugin; -enum krb5_plugin_type { - PLUGIN_TYPE_DATA = 1, - PLUGIN_TYPE_FUNC -}; - -struct credentials; /* this is to keep the compiler happy */ -struct getargs; -struct sockaddr; - -/** - * Semi private, not stable yet - */ - -typedef struct krb5_crypto_iov { - unsigned int flags; - /* ignored */ -#define KRB5_CRYPTO_TYPE_EMPTY 0 - /* OUT krb5_crypto_length(KRB5_CRYPTO_TYPE_HEADER) */ -#define KRB5_CRYPTO_TYPE_HEADER 1 - /* IN and OUT */ -#define KRB5_CRYPTO_TYPE_DATA 2 - /* IN */ -#define KRB5_CRYPTO_TYPE_SIGN_ONLY 3 - /* (only for encryption) OUT krb5_crypto_length(KRB5_CRYPTO_TYPE_TRAILER) */ -#define KRB5_CRYPTO_TYPE_PADDING 4 - /* OUT krb5_crypto_length(KRB5_CRYPTO_TYPE_TRAILER) */ -#define KRB5_CRYPTO_TYPE_TRAILER 5 - /* OUT krb5_crypto_length(KRB5_CRYPTO_TYPE_CHECKSUM) */ -#define KRB5_CRYPTO_TYPE_CHECKSUM 6 - krb5_data data; -} krb5_crypto_iov; - - -/* Glue for MIT */ - -typedef struct { - int32_t lr_type; - krb5_timestamp value; -} krb5_last_req_entry; - -typedef krb5_error_code -(KRB5_CALLCONV * krb5_gic_process_last_req)(krb5_context, krb5_last_req_entry **, void *); - -/* - * - */ - -struct hx509_certs_data; - -#include - -/* variables */ - -extern KRB5_LIB_VARIABLE const char *krb5_config_file; -extern KRB5_LIB_VARIABLE const char *krb5_defkeyname; - - -extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_acc_ops; -extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_fcc_ops; -extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_mcc_ops; -extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_kcm_ops; -extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_akcm_ops; -extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_scc_ops; - -extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_fkt_ops; -extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_wrfkt_ops; -extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_javakt_ops; -extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_mkt_ops; -extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_akf_ops; -extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_any_ops; - -extern KRB5_LIB_VARIABLE const char *krb5_cc_type_api; -extern KRB5_LIB_VARIABLE const char *krb5_cc_type_file; -extern KRB5_LIB_VARIABLE const char *krb5_cc_type_memory; -extern KRB5_LIB_VARIABLE const char *krb5_cc_type_kcm; -extern KRB5_LIB_VARIABLE const char *krb5_cc_type_scc; - -#endif /* __KRB5_H__ */ - diff --git a/kerberosV/src/lib/krb5/krb5.moduli b/kerberosV/src/lib/krb5/krb5.moduli deleted file mode 100644 index fb05a2a3b6c..00000000000 --- a/kerberosV/src/lib/krb5/krb5.moduli +++ /dev/null @@ -1,3 +0,0 @@ -# $Id: krb5.moduli,v 1.1 2013/06/17 18:57:44 robert Exp $ -# comment security-bits-decimal secure-prime(p)-hex generator(g)-hex (q)-hex -rfc3526-MODP-group14 1760 FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AACAA68FFFFFFFFFFFFFFFF 02 7FFFFFFFFFFFFFFFE487ED5110B4611A62633145C06E0E68948127044533E63A0105DF531D89CD9128A5043CC71A026EF7CA8CD9E69D218D98158536F92F8A1BA7F09AB6B6A8E122F242DABB312F3F637A262174D31BF6B585FFAE5B7A035BF6F71C35FDAD44CFD2D74F9208BE258FF324943328F6722D9EE1003E5C50B1DF82CC6D241B0E2AE9CD348B1FD47E9267AFC1B2AE91EE51D6CB0E3179AB1042A95DCF6A9483B84B4B36B3861AA7255E4C0278BA3604650C10BE19482F23171B671DF1CF3B960C074301CD93C1D17603D147DAE2AEF837A62964EF15E5FB4AAC0B8C1CCAA4BE754AB5728AE9130C4C7D02880AB9472D455655347FFFFFFFFFFFFFFF diff --git a/kerberosV/src/lib/krb5/krb524_convert_creds_kdc.3 b/kerberosV/src/lib/krb5/krb524_convert_creds_kdc.3 deleted file mode 100644 index 19b928e71b3..00000000000 --- a/kerberosV/src/lib/krb5/krb524_convert_creds_kdc.3 +++ /dev/null @@ -1,86 +0,0 @@ -.\" Copyright (c) 2004 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: krb524_convert_creds_kdc.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd March 20, 2004 -.Dt KRB524_CONVERT_CREDS_KDC 3 -.Os HEIMDAL -.Sh NAME -.Nm krb524_convert_creds_kdc , -.Nm krb524_convert_creds_kdc_ccache -.Nd converts Kerberos 5 credentials to Kerberos 4 credentials -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb524_convert_creds_kdc -.Fa "krb5_context context" -.Fa "krb5_creds *in_cred" -.Fa "struct credentials *v4creds" -.Fc -.Ft krb5_error_code -.Fo krb524_convert_creds_kdc_ccache -.Fa "krb5_context context" -.Fa "krb5_ccache ccache" -.Fa "krb5_creds *in_cred" -.Fa "struct credentials *v4creds" -.Fc -.Sh DESCRIPTION -Convert the Kerberos 5 credential to Kerberos 4 credential. -This is done by sending them to the 524 service in the KDC. -.Pp -.Fn krb524_convert_creds_kdc -converts the Kerberos 5 credential in -.Fa in_cred -to Kerberos 4 credential that is stored in -.Fa credentials . -.Pp -.Fn krb524_convert_creds_kdc_ccache -is different from -.Fn krb524_convert_creds_kdc -in that way that if -.Fa in_cred -doesn't contain a DES session key, then a new one is fetched from the -KDC and stored in the cred cache -.Fa ccache , -and then the KDC is queried to convert the credential. -.Pp -This interfaces are used to make the migration to Kerberos 5 from -Kerberos 4 easier. -There are few services that still need Kerberos 4, and this is mainly -for compatibility for those services. -Some services, like AFS, really have Kerberos 5 supports, but still -uses the 524 interface to make the migration easier. -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_425_conv_principal.3 b/kerberosV/src/lib/krb5/krb5_425_conv_principal.3 deleted file mode 100644 index fb6185a415c..00000000000 --- a/kerberosV/src/lib/krb5/krb5_425_conv_principal.3 +++ /dev/null @@ -1,224 +0,0 @@ -.\" Copyright (c) 1997-2003 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: krb5_425_conv_principal.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd September 3, 2003 -.Dt KRB5_425_CONV_PRINCIPAL 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_425_conv_principal , -.Nm krb5_425_conv_principal_ext , -.Nm krb5_524_conv_principal -.Nd converts to and from version 4 principals -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fn krb5_425_conv_principal "krb5_context context" "const char *name" "const char *instance" "const char *realm" "krb5_principal *principal" -.Ft krb5_error_code -.Fn krb5_425_conv_principal_ext "krb5_context context" "const char *name" "const char *instance" "const char *realm" "krb5_boolean (*func)(krb5_context, krb5_principal)" "krb5_boolean resolve" "krb5_principal *principal" -.Ft krb5_error_code -.Fn krb5_524_conv_principal "krb5_context context" "const krb5_principal principal" "char *name" "char *instance" "char *realm" -.Sh DESCRIPTION -Converting between version 4 and version 5 principals can at best be -described as a mess. -.Pp -A version 4 principal consists of a name, an instance, and a realm. A -version 5 principal consists of one or more components, and a -realm. In some cases also the first component/name will differ between -version 4 and version 5. Furthermore the second component of a host -principal will be the fully qualified domain name of the host in -question, while the instance of a version 4 principal will only -contain the first part (short hostname). Because of these problems -the conversion between principals will have to be site customized. -.Pp -.Fn krb5_425_conv_principal_ext -will try to convert a version 4 principal, given by -.Fa name , -.Fa instance , -and -.Fa realm , -to a version 5 principal. This can result in several possible -principals, and if -.Fa func -is non-NULL, it will be called for each candidate principal. -.Fa func -should return true if the principal was -.Dq good . -To accomplish this, -.Fn krb5_425_conv_principal_ext -will look up the name in -.Pa krb5.conf . -It first looks in the -.Li v4_name_convert/host -subsection, which should contain a list of version 4 names whose -instance should be treated as a hostname. This list can be specified -for each realm (in the -.Li realms -section), or in the -.Li libdefaults -section. If the name is found the resulting name of the principal -will be the value of this binding. The instance is then first looked -up in -.Li v4_instance_convert -for the specified realm. If found the resulting value will be used as -instance (this can be used for special cases), no further attempts -will be made to find a conversion if this fails (with -.Fa func ) . -If the -.Fa resolve -parameter is true, the instance will be looked up with -.Fn gethostbyname . -This can be a time consuming, error prone, and unsafe operation. Next -a list of hostnames will be created from the instance and the -.Li v4_domains -variable, which should contain a list of possible domains for the -specific realm. -.Pp -On the other hand, if the name is not found in a -.Li host -section, it is looked up in a -.Li v4_name_convert/plain -binding. If found here the name will be converted, but the instance -will be untouched. -.Pp -This list of default host-type conversions is compiled-in: -.Bd -literal -offset indent -v4_name_convert = { - host = { - ftp = ftp - hprop = hprop - imap = imap - pop = pop - rcmd = host - smtp = smtp - } -} -.Ed -.Pp -It will only be used if there isn't an entry for these names in the -config file, so you can override these defaults. -.Pp -.Fn krb5_425_conv_principal -will call -.Fn krb5_425_conv_principal_ext -with -.Dv NULL -as -.Fa func , -and the value of -.Li v4_instance_resolve -(from the -.Li libdefaults -section) as -.Fa resolve . -.Pp -.Fn krb5_524_conv_principal -basically does the opposite of -.Fn krb5_425_conv_principal , -it just doesn't have to look up any names, but will instead truncate -instances found to belong to a host principal. The -.Fa name , -.Fa instance , -and -.Fa realm -should be at least 40 characters long. -.Sh EXAMPLES -Since this is confusing an example is in place. -.Pp -Assume that we have the -.Dq foo.com , -and -.Dq bar.com -domains that have shared a single version 4 realm, FOO.COM. The version 4 -.Pa krb.realms -file looked like: -.Bd -literal -offset indent -foo.com FOO.COM -\&.foo.com FOO.COM -\&.bar.com FOO.COM -.Ed -.Pp -A -.Pa krb5.conf -file that covers this case might look like: -.Bd -literal -offset indent -[libdefaults] - v4_instance_resolve = yes -[realms] - FOO.COM = { - kdc = kerberos.foo.com - v4_instance_convert = { - foo = foo.com - } - v4_domains = foo.com - } -.Ed -.Pp -With this setup and the following host table: -.Bd -literal -offset indent -foo.com -a-host.foo.com -b-host.bar.com -.Ed -the following conversions will be made: -.Bd -literal -offset indent -rcmd.a-host -\*(Gt host/a-host.foo.com -ftp.b-host -\*(Gt ftp/b-host.bar.com -pop.foo -\*(Gt pop/foo.com -ftp.other -\*(Gt ftp/other.foo.com -other.a-host -\*(Gt other/a-host -.Ed -.Pp -The first three are what you expect. If you remove the -.Dq v4_domains , -the fourth entry will result in an error (since the host -.Dq other -can't be found). Even if -.Dq a-host -is a valid host name, the last entry will not be converted, since the -.Dq other -name is not known to represent a host-type principal. -If you turn off -.Dq v4_instance_resolve -the second example will result in -.Dq ftp/b-host.foo.com -(because of the default domain). And all of this is of course only -valid if you have working name resolving. -.Sh SEE ALSO -.Xr krb5_build_principal 3 , -.Xr krb5_free_principal 3 , -.Xr krb5_parse_name 3 , -.Xr krb5_sname_to_principal 3 , -.Xr krb5_unparse_name 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_acl_match_file.3 b/kerberosV/src/lib/krb5/krb5_acl_match_file.3 deleted file mode 100644 index aae3299685d..00000000000 --- a/kerberosV/src/lib/krb5/krb5_acl_match_file.3 +++ /dev/null @@ -1,111 +0,0 @@ -.\" Copyright (c) 2004, 2006 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: krb5_acl_match_file.3,v 1.3 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 12, 2006 -.Dt KRB5_ACL_MATCH_FILE 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_acl_match_file , -.Nm krb5_acl_match_string -.Nd ACL matching functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.Ft krb5_error_code -.Fo krb5_acl_match_file -.Fa "krb5_context context" -.Fa "const char *file" -.Fa "const char *format" -.Fa "..." -.Fc -.Ft krb5_error_code -.Fo krb5_acl_match_string -.Fa "krb5_context context" -.Fa "const char *string" -.Fa "const char *format" -.Fa "..." -.Fc -.Sh DESCRIPTION -.Nm krb5_acl_match_file -matches ACL format against each line in a file. -Lines starting with # are treated like comments and ignored. -.Pp -.Nm krb5_acl_match_string -matches ACL format against a string. -.Pp -The ACL format has three format specifiers: s, f, and r. -Each specifier will retrieve one argument from the variable arguments -for either matching or storing data. -The input string is split up using " " and "\et" as a delimiter; multiple -" " and "\et" in a row are considered to be the same. -.Pp -.Bl -tag -width "fXX" -offset indent -.It s -Matches a string using -.Xr strcmp 3 -(case sensitive). -.It f -Matches the string with -.Xr fnmatch 3 . -The -.Fa flags -argument (the last argument) passed to the fnmatch function is 0. -.It r -Returns a copy of the string in the char ** passed in; the copy must be -freed with -.Xr free 3 . -There is no need to -.Xr free 3 -the string on error: the function will clean up and set the pointer to -.Dv NULL . -.El -.Pp -All unknown format specifiers cause an error. -.Sh EXAMPLES -.Bd -literal -offset indent -char *s; - -ret = krb5_acl_match_string(context, "foo", "s", "foo"); -if (ret) - krb5_errx(context, 1, "acl didn't match"); -ret = krb5_acl_match_string(context, "foo foo baz/kaka", - "ss", "foo", &s, "foo/*"); -if (ret) { - /* no need to free(s) on error */ - assert(s == NULL); - krb5_errx(context, 1, "acl didn't match"); -} -free(s); -.Ed -.Sh SEE ALSO -.Xr krb5 3 diff --git a/kerberosV/src/lib/krb5/krb5_aname_to_localname.3 b/kerberosV/src/lib/krb5/krb5_aname_to_localname.3 deleted file mode 100644 index 2d1ac53c677..00000000000 --- a/kerberosV/src/lib/krb5/krb5_aname_to_localname.3 +++ /dev/null @@ -1,80 +0,0 @@ -.\" Copyright (c) 2003 - 2007 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: krb5_aname_to_localname.3,v 1.5 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd February 18, 2006 -.Dt KRB5_ANAME_TO_LOCALNAME 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_aname_to_localname -.Nd converts a principal to a system local name -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_boolean -.Fo krb5_aname_to_localname -.Fa "krb5_context context" -.Fa "krb5_const_principal name" -.Fa "size_t lnsize" -.Fa "char *lname" -.Fc -.Sh DESCRIPTION -This function takes a principal -.Fa name , -verifies that it is in the local realm (using -.Fn krb5_get_default_realms ) -and then returns the local name of the principal. -.Pp -If -.Fa name -isn't in one of the local realms an error is returned. -.Pp -If the size -.Fa ( lnsize ) -of the local name -.Fa ( lname ) -is too small, an error is returned. -.Pp -.Fn krb5_aname_to_localname -should only be use by an application that implements protocols that -don't transport the login name and thus needs to convert a principal -to a local name. -.Pp -Protocols should be designed so that they authenticate using -Kerberos, send over the login name and then verify the principal -that is authenticated is allowed to login and the login name. -A way to check if a user is allowed to login is using the function -.Fn krb5_kuserok . -.Sh SEE ALSO -.Xr krb5_get_default_realms 3 , -.Xr krb5_kuserok 3 diff --git a/kerberosV/src/lib/krb5/krb5_appdefault.3 b/kerberosV/src/lib/krb5/krb5_appdefault.3 deleted file mode 100644 index 68a3bb44ef2..00000000000 --- a/kerberosV/src/lib/krb5/krb5_appdefault.3 +++ /dev/null @@ -1,88 +0,0 @@ -.\" Copyright (c) 2000 Kungliga Tekniska Högskolan -.\" (Royal Institute of Technology, Stockholm, Sweden). -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" 3. Neither the name of the Institute nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $Id: krb5_appdefault.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd July 25, 2000 -.Dt KRB5_APPDEFAULT 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_appdefault_boolean , -.Nm krb5_appdefault_string , -.Nm krb5_appdefault_time -.Nd get application configuration value -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft void -.Fn krb5_appdefault_boolean "krb5_context context" "const char *appname" "krb5_realm realm" "const char *option" "krb5_boolean def_val" "krb5_boolean *ret_val" -.Ft void -.Fn krb5_appdefault_string "krb5_context context" "const char *appname" "krb5_realm realm" "const char *option" "const char *def_val" "char **ret_val" -.Ft void -.Fn krb5_appdefault_time "krb5_context context" "const char *appname" "krb5_realm realm" "const char *option" "time_t def_val" "time_t *ret_val" -.Sh DESCRIPTION -These functions get application defaults from the -.Dv appdefaults -section of the -.Xr krb5.conf 5 -configuration file. These defaults can be specified per application, -and/or per realm. -.Pp -These values will be looked for in -.Xr krb5.conf 5 , -in order of descending importance. -.Bd -literal -offset indent -[appdefaults] - appname = { - realm = { - option = value - } - } - appname = { - option = value - } - realm = { - option = value - } - option = value -.Ed -.Fa appname -is the name of the application, and -.Fa realm -is the realm name. If the realm is omitted it will not be used for -resolving values. -.Fa def_val -is the value to return if no value is found in -.Xr krb5.conf 5 . -.Sh SEE ALSO -.Xr krb5_config 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_auth_context.3 b/kerberosV/src/lib/krb5/krb5_auth_context.3 deleted file mode 100644 index 79a84631f8e..00000000000 --- a/kerberosV/src/lib/krb5/krb5_auth_context.3 +++ /dev/null @@ -1,395 +0,0 @@ -.\" Copyright (c) 2001 - 2005 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: krb5_auth_context.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 17, 2005 -.Dt KRB5_AUTH_CONTEXT 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_auth_con_addflags , -.Nm krb5_auth_con_free , -.Nm krb5_auth_con_genaddrs , -.Nm krb5_auth_con_generatelocalsubkey , -.Nm krb5_auth_con_getaddrs , -.Nm krb5_auth_con_getauthenticator , -.Nm krb5_auth_con_getflags , -.Nm krb5_auth_con_getkey , -.Nm krb5_auth_con_getlocalsubkey , -.Nm krb5_auth_con_getrcache , -.Nm krb5_auth_con_getremotesubkey , -.Nm krb5_auth_con_getuserkey , -.Nm krb5_auth_con_init , -.Nm krb5_auth_con_initivector , -.Nm krb5_auth_con_removeflags , -.Nm krb5_auth_con_setaddrs , -.Nm krb5_auth_con_setaddrs_from_fd , -.Nm krb5_auth_con_setflags , -.Nm krb5_auth_con_setivector , -.Nm krb5_auth_con_setkey , -.Nm krb5_auth_con_setlocalsubkey , -.Nm krb5_auth_con_setrcache , -.Nm krb5_auth_con_setremotesubkey , -.Nm krb5_auth_con_setuserkey , -.Nm krb5_auth_context , -.Nm krb5_auth_getcksumtype , -.Nm krb5_auth_getkeytype , -.Nm krb5_auth_getlocalseqnumber , -.Nm krb5_auth_getremoteseqnumber , -.Nm krb5_auth_setcksumtype , -.Nm krb5_auth_setkeytype , -.Nm krb5_auth_setlocalseqnumber , -.Nm krb5_auth_setremoteseqnumber , -.Nm krb5_free_authenticator -.Nd manage authentication on connection level -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_auth_con_init -.Fa "krb5_context context" -.Fa "krb5_auth_context *auth_context" -.Fc -.Ft void -.Fo krb5_auth_con_free -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_setflags -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "int32_t flags" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_getflags -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "int32_t *flags" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_addflags -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "int32_t addflags" -.Fa "int32_t *flags" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_removeflags -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "int32_t removelags" -.Fa "int32_t *flags" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_setaddrs -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "krb5_address *local_addr" -.Fa "krb5_address *remote_addr" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_getaddrs -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "krb5_address **local_addr" -.Fa "krb5_address **remote_addr" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_genaddrs -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "int fd" -.Fa "int flags" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_setaddrs_from_fd -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "void *p_fd" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_getkey -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "krb5_keyblock **keyblock" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_getlocalsubkey -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "krb5_keyblock **keyblock" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_getremotesubkey -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "krb5_keyblock **keyblock" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_generatelocalsubkey -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa krb5_keyblock *key" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_initivector -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fc -.Ft krb5_error_code -.Fo krb5_auth_con_setivector -.Fa "krb5_context context" -.Fa "krb5_auth_context *auth_context" -.Fa "krb5_pointer ivector" -.Fc -.Ft void -.Fo krb5_free_authenticator -.Fa "krb5_context context" -.Fa "krb5_authenticator *authenticator" -.Fc -.Sh DESCRIPTION -The -.Nm krb5_auth_context -structure holds all context related to an authenticated connection, in -a similar way to -.Nm krb5_context -that holds the context for the thread or process. -.Nm krb5_auth_context -is used by various functions that are directly related to -authentication between the server/client. Example of data that this -structure contains are various flags, addresses of client and server, -port numbers, keyblocks (and subkeys), sequence numbers, replay cache, -and checksum-type. -.Pp -.Fn krb5_auth_con_init -allocates and initializes the -.Nm krb5_auth_context -structure. Default values can be changed with -.Fn krb5_auth_con_setcksumtype -and -.Fn krb5_auth_con_setflags . -The -.Nm auth_context -structure must be freed by -.Fn krb5_auth_con_free . -.Pp -.Fn krb5_auth_con_getflags , -.Fn krb5_auth_con_setflags , -.Fn krb5_auth_con_addflags -and -.Fn krb5_auth_con_removeflags -gets and modifies the flags for a -.Nm krb5_auth_context -structure. Possible flags to set are: -.Bl -tag -width Ds -.It Dv KRB5_AUTH_CONTEXT_DO_SEQUENCE -Generate and check sequence-number on each packet. -.It Dv KRB5_AUTH_CONTEXT_DO_TIME -Check timestamp on incoming packets. -.It Dv KRB5_AUTH_CONTEXT_RET_SEQUENCE , Dv KRB5_AUTH_CONTEXT_RET_TIME -Return sequence numbers and time stamps in the outdata parameters. -.It Dv KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED -will force -.Fn krb5_get_forwarded_creds -and -.Fn krb5_fwd_tgt_creds -to create unencrypted ) -.Dv ENCTYPE_NULL ) -credentials. -This is for use with old MIT server and JAVA based servers as -they can't handle encrypted -.Dv KRB-CRED . -Note that sending such -.Dv KRB-CRED -is clear exposes crypto keys and tickets and is insecure, -make sure the packet is encrypted in the protocol. -.Xr krb5_rd_cred 3 , -.Xr krb5_rd_priv 3 , -.Xr krb5_rd_safe 3 , -.Xr krb5_mk_priv 3 -and -.Xr krb5_mk_safe 3 . -Setting this flag requires that parameter to be passed to these -functions. -.Pp -The flags -.Dv KRB5_AUTH_CONTEXT_DO_TIME -also modifies the behavior the function -.Fn krb5_get_forwarded_creds -by removing the timestamp in the forward credential message, this have -backward compatibility problems since not all versions of the heimdal -supports timeless credentional messages. -Is very useful since it always the sender of the message to cache -forward message and thus avoiding a round trip to the KDC for each -time a credential is forwarded. -The same functionality can be obtained by using address-less tickets. -.\".It Dv KRB5_AUTH_CONTEXT_PERMIT_ALL -.El -.Pp -.Fn krb5_auth_con_setaddrs , -.Fn krb5_auth_con_setaddrs_from_fd -and -.Fn krb5_auth_con_getaddrs -gets and sets the addresses that are checked when a packet is received. -It is mandatory to set an address for the remote -host. If the local address is not set, it iss deduced from the underlaying -operating system. -.Fn krb5_auth_con_getaddrs -will call -.Fn krb5_free_address -on any address that is passed in -.Fa local_addr -or -.Fa remote_addr . -.Fn krb5_auth_con_setaddr -allows passing in a -.Dv NULL -pointer as -.Fa local_addr -and -.Fa remote_addr , -in that case it will just not set that address. -.Pp -.Fn krb5_auth_con_setaddrs_from_fd -fetches the addresses from a file descriptor. -.Pp -.Fn krb5_auth_con_genaddrs -fetches the address information from the given file descriptor -.Fa fd -depending on the bitmap argument -.Fa flags . -.Pp -Possible values on -.Fa flags -are: -.Bl -tag -width Ds -.It Va KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR -fetches the local address from -.Fa fd . -.It Va KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR -fetches the remote address from -.Fa fd . -.El -.Pp -.Fn krb5_auth_con_setkey , -.Fn krb5_auth_con_setuserkey -and -.Fn krb5_auth_con_getkey -gets and sets the key used for this auth context. The keyblock returned by -.Fn krb5_auth_con_getkey -should be freed with -.Fn krb5_free_keyblock . -The keyblock send into -.Fn krb5_auth_con_setkey -is copied into the -.Nm krb5_auth_context , -and thus no special handling is needed. -.Dv NULL -is not a valid keyblock to -.Fn krb5_auth_con_setkey . -.Pp -.Fn krb5_auth_con_setuserkey -is only useful when doing user to user authentication. -.Fn krb5_auth_con_setkey -is equivalent to -.Fn krb5_auth_con_setuserkey . -.Pp -.Fn krb5_auth_con_getlocalsubkey , -.Fn krb5_auth_con_setlocalsubkey , -.Fn krb5_auth_con_getremotesubkey -and -.Fn krb5_auth_con_setremotesubkey -gets and sets the keyblock for the local and remote subkey. -The keyblock returned by -.Fn krb5_auth_con_getlocalsubkey -and -.Fn krb5_auth_con_getremotesubkey -must be freed with -.Fn krb5_free_keyblock . -.Pp -.Fn krb5_auth_setcksumtype -and -.Fn krb5_auth_getcksumtype -sets and gets the checksum type that should be used for this -connection. -.Pp -.Fn krb5_auth_con_generatelocalsubkey -generates a local subkey that have the same encryption type as -.Fa key . -.Pp -.Fn krb5_auth_getremoteseqnumber -.Fn krb5_auth_setremoteseqnumber , -.Fn krb5_auth_getlocalseqnumber -and -.Fn krb5_auth_setlocalseqnumber -gets and sets the sequence-number for the local and remote -sequence-number counter. -.Pp -.Fn krb5_auth_setkeytype -and -.Fn krb5_auth_getkeytype -gets and gets the keytype of the keyblock in -.Nm krb5_auth_context . -.Pp -.Fn krb5_auth_con_getauthenticator -Retrieves the authenticator that was used during mutual -authentication. The -.Dv authenticator -returned should be freed by calling -.Fn krb5_free_authenticator . -.Pp -.Fn krb5_auth_con_getrcache -and -.Fn krb5_auth_con_setrcache -gets and sets the replay-cache. -.Pp -.Fn krb5_auth_con_initivector -allocates memory for and zeros the initial vector in the -.Fa auth_context -keyblock. -.Pp -.Fn krb5_auth_con_setivector -sets the i_vector portion of -.Fa auth_context -to -.Fa ivector . -.Pp -.Fn krb5_free_authenticator -free the content of -.Fa authenticator -and -.Fa authenticator -itself. -.Sh SEE ALSO -.Xr krb5_context 3 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_c_make_checksum.3 b/kerberosV/src/lib/krb5/krb5_c_make_checksum.3 deleted file mode 100644 index 13ac2136d36..00000000000 --- a/kerberosV/src/lib/krb5/krb5_c_make_checksum.3 +++ /dev/null @@ -1,297 +0,0 @@ -.\" Copyright (c) 2003 - 2006 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: krb5_c_make_checksum.3,v 1.4 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd Nov 17, 2006 -.Dt KRB5_C_MAKE_CHECKSUM 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_c_block_size , -.Nm krb5_c_decrypt , -.Nm krb5_c_encrypt , -.Nm krb5_c_encrypt_length , -.Nm krb5_c_enctype_compare , -.Nm krb5_c_get_checksum , -.Nm krb5_c_is_coll_proof_cksum , -.Nm krb5_c_is_keyed_cksum , -.Nm krb5_c_keylength , -.Nm krb5_c_make_checksum , -.Nm krb5_c_make_random_key , -.Nm krb5_c_set_checksum , -.Nm krb5_c_valid_cksumtype , -.Nm krb5_c_valid_enctype , -.Nm krb5_c_verify_checksum , -.Nm krb5_c_checksum_length -.Nd Kerberos 5 crypto API -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Ft krb5_error_code -.Fo krb5_c_block_size -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "size_t *blocksize" -.Fc -.Ft krb5_error_code -.Fo krb5_c_decrypt -.Fa "krb5_context context" -.Fa "const krb5_keyblock key" -.Fa "krb5_keyusage usage" -.Fa "const krb5_data *ivec" -.Fa "krb5_enc_data *input" -.Fa "krb5_data *output" -.Fc -.Ft krb5_error_code -.Fo krb5_c_encrypt -.Fa "krb5_context context" -.Fa "const krb5_keyblock *key" -.Fa "krb5_keyusage usage" -.Fa "const krb5_data *ivec" -.Fa "const krb5_data *input" -.Fa "krb5_enc_data *output" -.Fc -.Ft krb5_error_code -.Fo krb5_c_encrypt_length -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "size_t inputlen" -.Fa "size_t *length" -.Fc -.Ft krb5_error_code -.Fo krb5_c_enctype_compare -.Fa "krb5_context context" -.Fa "krb5_enctype e1" -.Fa "krb5_enctype e2" -.Fa "krb5_boolean *similar" -.Fc -.Ft krb5_error_code -.Fo krb5_c_make_random_key -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "krb5_keyblock *random_key" -.Fc -.Ft krb5_error_code -.Fo krb5_c_make_checksum -.Fa "krb5_context context" -.Fa "krb5_cksumtype cksumtype" -.Fa "const krb5_keyblock *key" -.Fa "krb5_keyusage usage" -.Fa "const krb5_data *input" -.Fa "krb5_checksum *cksum" -.Fc -.Ft krb5_error_code -.Fo krb5_c_verify_checksum -.Fa "krb5_context context" -.Fa "const krb5_keyblock *key" -.Fa "krb5_keyusage usage" -.Fa "const krb5_data *data" -.Fa "const krb5_checksum *cksum" -.Fa "krb5_boolean *valid" -.Fc -.Ft krb5_error_code -.Fo krb5_c_checksum_length -.Fa "krb5_context context" -.Fa "krb5_cksumtype cksumtype" -.Fa "size_t *length" -.Fc -.Ft krb5_error_code -.Fo krb5_c_get_checksum -.Fa "krb5_context context" -.Fa "const krb5_checksum *cksum" -.Fa "krb5_cksumtype *type" -.Fa "krb5_data **data" -.Fc -.Ft krb5_error_code -.Fo krb5_c_set_checksum -.Fa "krb5_context context" -.Fa "krb5_checksum *cksum" -.Fa "krb5_cksumtype type" -.Fa "const krb5_data *data" -.Fc -.Ft krb5_boolean -.Fo krb5_c_valid_enctype -.Fa krb5_enctype etype" -.Fc -.Ft krb5_boolean -.Fo krb5_c_valid_cksumtype -.Fa "krb5_cksumtype ctype" -.Fc -.Ft krb5_boolean -.Fo krb5_c_is_coll_proof_cksum -.Fa "krb5_cksumtype ctype" -.Fc -.Ft krb5_boolean -.Fo krb5_c_is_keyed_cksum -.Fa "krb5_cksumtype ctype" -.Fc -.Ft krb5_error_code -.Fo krb5_c_keylengths -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "size_t *inlength" -.Fa "size_t *keylength" -.Fc -.Sh DESCRIPTION -The functions starting with krb5_c are compat functions with MIT kerberos. -.Pp -The -.Li krb5_enc_data -structure holds and encrypted data. -There are two public accessable members of -.Li krb5_enc_data . -.Li enctype -that holds the encryption type of the data encrypted and -.Li ciphertext -that is a -.Ft krb5_data -that might contain the encrypted data. -.Pp -.Fn krb5_c_block_size -returns the blocksize of the encryption type. -.Pp -.Fn krb5_c_decrypt -decrypts -.Fa input -and store the data in -.Fa output. -If -.Fa ivec -is -.Dv NULL -the default initialization vector for that encryption type will be used. -.Pp -.Fn krb5_c_encrypt -encrypts the plaintext in -.Fa input -and store the ciphertext in -.Fa output . -.Pp -.Fn krb5_c_encrypt_length -returns the length the encrypted data given the plaintext length. -.Pp -.Fn krb5_c_enctype_compare -compares to encryption types and returns if they use compatible -encryption key types. -.Pp -.Fn krb5_c_make_checksum -creates a checksum -.Fa cksum -with the checksum type -.Fa cksumtype -of the data in -.Fa data . -.Fa key -and -.Fa usage -are used if the checksum is a keyed checksum type. -Returns 0 or an error code. -.Pp -.Fn krb5_c_verify_checksum -verifies the checksum -of -.Fa data -in -.Fa cksum -that was created with -.Fa key -using the key usage -.Fa usage . -.Fa verify -is set to non-zero if the checksum verifies correctly and zero if not. -Returns 0 or an error code. -.Pp -.Fn krb5_c_checksum_length -returns the length of the checksum. -.Pp -.Fn krb5_c_set_checksum -sets the -.Li krb5_checksum -structure given -.Fa type -and -.Fa data . -The content of -.Fa cksum -should be freeed with -.Fn krb5_c_free_checksum_contents . -.Pp -.Fn krb5_c_get_checksum -retrieves the components of the -.Li krb5_checksum . -structure. -.Fa data -should be free with -.Fn krb5_free_data . -If some either of -.Fa data -or -.Fa checksum -is not needed for the application, -.Dv NULL -can be passed in. -.Pp -.Fn krb5_c_valid_enctype -returns true if -.Fa etype -is a valid encryption type. -.Pp -.Fn krb5_c_valid_cksumtype -returns true if -.Fa ctype -is a valid checksum type. -.Pp -.Fn krb5_c_is_keyed_cksum -return true if -.Fa ctype -is a keyed checksum type. -.Pp -.Fn krb5_c_is_coll_proof_cksum -returns true if -.Fa ctype -is a collision proof checksum type. -.Pp -.Fn krb5_c_keylengths -return the minimum length -.Fa ( inlength ) -bytes needed to create a key and the -length -.Fa ( keylength ) -of the resulting key -for the -.Fa enctype . -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_create_checksum 3 , -.Xr krb5_free_data 3 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_ccapi.h b/kerberosV/src/lib/krb5/krb5_ccapi.h deleted file mode 100644 index 2342e4d8c4e..00000000000 --- a/kerberosV/src/lib/krb5/krb5_ccapi.h +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (c) 2004 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: krb5_ccapi.h,v 1.2 2013/06/17 18:57:44 robert Exp $ */ - -#ifndef KRB5_CCAPI_H -#define KRB5_CCAPI_H 1 - -#include - - #ifdef __APPLE__ -#pragma pack(push,2) -#endif - -enum { - cc_credentials_v5 = 2 -}; - -enum { - ccapi_version_3 = 3, - ccapi_version_4 = 4 -}; - -enum { - ccNoError = 0, - - ccIteratorEnd = 201, - ccErrBadParam, - ccErrNoMem, - ccErrInvalidContext, - ccErrInvalidCCache, - - ccErrInvalidString, /* 206 */ - ccErrInvalidCredentials, - ccErrInvalidCCacheIterator, - ccErrInvalidCredentialsIterator, - ccErrInvalidLock, - - ccErrBadName, /* 211 */ - ccErrBadCredentialsVersion, - ccErrBadAPIVersion, - ccErrContextLocked, - ccErrContextUnlocked, - - ccErrCCacheLocked, /* 216 */ - ccErrCCacheUnlocked, - ccErrBadLockType, - ccErrNeverDefault, - ccErrCredentialsNotFound, - - ccErrCCacheNotFound, /* 221 */ - ccErrContextNotFound, - ccErrServerUnavailable, - ccErrServerInsecure, - ccErrServerCantBecomeUID, - - ccErrTimeOffsetNotSet /* 226 */ -}; - -typedef int32_t cc_int32; -typedef uint32_t cc_uint32; -typedef struct cc_context_t *cc_context_t; -typedef struct cc_ccache_t *cc_ccache_t; -typedef struct cc_ccache_iterator_t *cc_ccache_iterator_t; -typedef struct cc_credentials_v5_t cc_credentials_v5_t; -typedef struct cc_credentials_t *cc_credentials_t; -typedef struct cc_credentials_iterator_t *cc_credentials_iterator_t; -typedef struct cc_string_t *cc_string_t; -typedef cc_uint32 cc_time_t; - -typedef struct cc_data { - cc_uint32 type; - cc_uint32 length; - void *data; -} cc_data; - -struct cc_credentials_v5_t { - char *client; - char *server; - cc_data keyblock; - cc_time_t authtime; - cc_time_t starttime; - cc_time_t endtime; - cc_time_t renew_till; - cc_uint32 is_skey; - cc_uint32 ticket_flags; -#define KRB5_CCAPI_TKT_FLG_FORWARDABLE 0x40000000 -#define KRB5_CCAPI_TKT_FLG_FORWARDED 0x20000000 -#define KRB5_CCAPI_TKT_FLG_PROXIABLE 0x10000000 -#define KRB5_CCAPI_TKT_FLG_PROXY 0x08000000 -#define KRB5_CCAPI_TKT_FLG_MAY_POSTDATE 0x04000000 -#define KRB5_CCAPI_TKT_FLG_POSTDATED 0x02000000 -#define KRB5_CCAPI_TKT_FLG_INVALID 0x01000000 -#define KRB5_CCAPI_TKT_FLG_RENEWABLE 0x00800000 -#define KRB5_CCAPI_TKT_FLG_INITIAL 0x00400000 -#define KRB5_CCAPI_TKT_FLG_PRE_AUTH 0x00200000 -#define KRB5_CCAPI_TKT_FLG_HW_AUTH 0x00100000 -#define KRB5_CCAPI_TKT_FLG_TRANSIT_POLICY_CHECKED 0x00080000 -#define KRB5_CCAPI_TKT_FLG_OK_AS_DELEGATE 0x00040000 -#define KRB5_CCAPI_TKT_FLG_ANONYMOUS 0x00020000 - cc_data **addresses; - cc_data ticket; - cc_data second_ticket; - cc_data **authdata; -}; - - -typedef struct cc_string_functions { - cc_int32 (*release)(cc_string_t); -} cc_string_functions; - -struct cc_string_t { - const char *data; - const cc_string_functions *func; -}; - -typedef struct cc_credentials_union { - cc_int32 version; - union { - cc_credentials_v5_t* credentials_v5; - } credentials; -} cc_credentials_union; - -struct cc_credentials_functions { - cc_int32 (*release)(cc_credentials_t); - cc_int32 (*compare)(cc_credentials_t, cc_credentials_t, cc_uint32*); -}; - -struct cc_credentials_t { - const cc_credentials_union* data; - const struct cc_credentials_functions* func; -}; - -struct cc_credentials_iterator_functions { - cc_int32 (*release)(cc_credentials_iterator_t); - cc_int32 (*next)(cc_credentials_iterator_t, cc_credentials_t*); -}; - -struct cc_credentials_iterator_t { - const struct cc_credentials_iterator_functions *func; -}; - -struct cc_ccache_iterator_functions { - cc_int32 (*release) (cc_ccache_iterator_t); - cc_int32 (*next)(cc_ccache_iterator_t, cc_ccache_t*); -}; - -struct cc_ccache_iterator_t { - const struct cc_ccache_iterator_functions* func; -}; - -typedef struct cc_ccache_functions { - cc_int32 (*release)(cc_ccache_t); - cc_int32 (*destroy)(cc_ccache_t); - cc_int32 (*set_default)(cc_ccache_t); - cc_int32 (*get_credentials_version)(cc_ccache_t, cc_uint32*); - cc_int32 (*get_name)(cc_ccache_t, cc_string_t*); - cc_int32 (*get_principal)(cc_ccache_t, cc_uint32, cc_string_t*); - cc_int32 (*set_principal)(cc_ccache_t, cc_uint32, const char*); - cc_int32 (*store_credentials)(cc_ccache_t, const cc_credentials_union*); - cc_int32 (*remove_credentials)(cc_ccache_t, cc_credentials_t); - cc_int32 (*new_credentials_iterator)(cc_ccache_t, - cc_credentials_iterator_t*); - cc_int32 (*move)(cc_ccache_t, cc_ccache_t); - cc_int32 (*lock)(cc_ccache_t, cc_uint32, cc_uint32); - cc_int32 (*unlock)(cc_ccache_t); - cc_int32 (*get_last_default_time)(cc_ccache_t, cc_time_t*); - cc_int32 (*get_change_time)(cc_ccache_t, cc_time_t*); - cc_int32 (*compare)(cc_ccache_t, cc_ccache_t, cc_uint32*); - cc_int32 (*get_kdc_time_offset)(cc_ccache_t, cc_int32, cc_time_t *); - cc_int32 (*set_kdc_time_offset)(cc_ccache_t, cc_int32, cc_time_t); - cc_int32 (*clear_kdc_time_offset)(cc_ccache_t, cc_int32); -} cc_ccache_functions; - -struct cc_ccache_t { - const cc_ccache_functions *func; -}; - -struct cc_context_functions { - cc_int32 (*release)(cc_context_t); - cc_int32 (*get_change_time)(cc_context_t, cc_time_t *); - cc_int32 (*get_default_ccache_name)(cc_context_t, cc_string_t*); - cc_int32 (*open_ccache)(cc_context_t, const char*, cc_ccache_t *); - cc_int32 (*open_default_ccache)(cc_context_t, cc_ccache_t*); - cc_int32 (*create_ccache)(cc_context_t,const char*, cc_uint32, - const char*, cc_ccache_t*); - cc_int32 (*create_default_ccache)(cc_context_t, cc_uint32, - const char*, cc_ccache_t*); - cc_int32 (*create_new_ccache)(cc_context_t, cc_uint32, - const char*, cc_ccache_t*); - cc_int32 (*new_ccache_iterator)(cc_context_t, cc_ccache_iterator_t*); - cc_int32 (*lock)(cc_context_t, cc_uint32, cc_uint32); - cc_int32 (*unlock)(cc_context_t); - cc_int32 (*compare)(cc_context_t, cc_context_t, cc_uint32*); -}; - -struct cc_context_t { - const struct cc_context_functions* func; -}; - -typedef cc_int32 -(*cc_initialize_func)(cc_context_t*, cc_int32, cc_int32 *, char const **); - -#ifdef __APPLE__ -#pragma pack(pop) -#endif - - -#endif /* KRB5_CCAPI_H */ diff --git a/kerberosV/src/lib/krb5/krb5_check_transited.3 b/kerberosV/src/lib/krb5/krb5_check_transited.3 deleted file mode 100644 index e5038f5cf6c..00000000000 --- a/kerberosV/src/lib/krb5/krb5_check_transited.3 +++ /dev/null @@ -1,106 +0,0 @@ -.\" Copyright (c) 2004, 2006 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: krb5_check_transited.3,v 1.3 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 1, 2006 -.Dt KRB5_CHECK_TRANSITED 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_check_transited , -.Nm krb5_check_transited_realms , -.Nm krb5_domain_x500_decode , -.Nm krb5_domain_x500_encode -.Nd realm transit verification and encoding/decoding functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_check_transited -.Fa "krb5_context context" -.Fa "krb5_const_realm client_realm" -.Fa "krb5_const_realm server_realm" -.Fa "krb5_realm *realms" -.Fa "int num_realms" -.Fa "int *bad_realm" -.Fc -.Ft krb5_error_code -.Fo krb5_check_transited_realms -.Fa "krb5_context context" -.Fa "const char *const *realms" -.Fa "int num_realms" -.Fa "int *bad_realm" -.Fc -.Ft krb5_error_code -.Fo krb5_domain_x500_decode -.Fa "krb5_context context" -.Fa "krb5_data tr" -.Fa "char ***realms" -.Fa "int *num_realms" -.Fa "const char *client_realm" -.Fa "const char *server_realm" -.Fc -.Ft krb5_error_code -.Fo krb5_domain_x500_encode -.Fa "char **realms" -.Fa "int num_realms" -.Fa "krb5_data *encoding" -.Fc -.Sh DESCRIPTION -.Fn krb5_check_transited -checks the path from -.Fa client_realm -to -.Fa server_realm -where -.Fa realms -and -.Fa num_realms -is the realms between them. -If the function returns an error value, -.Fa bad_realm -will be set to the realm in the list causing the error. -.Fn krb5_check_transited -is used internally by the KDC and libkrb5 and should not be called by -client applications. -.Pp -.Fn krb5_check_transited_realms -is deprecated. -.Pp -.Fn krb5_domain_x500_encode -and -.Fn krb5_domain_x500_decode -encodes and decodes the realm names in the X500 format that Kerberos -uses to describe the transited realms in krbtgts. -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_create_checksum.3 b/kerberosV/src/lib/krb5/krb5_create_checksum.3 deleted file mode 100644 index 04332358c7e..00000000000 --- a/kerberosV/src/lib/krb5/krb5_create_checksum.3 +++ /dev/null @@ -1,226 +0,0 @@ -.\" Copyright (c) 1999-2005 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: krb5_create_checksum.3,v 1.4 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd August 12, 2005 -.Dt NAME 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_checksum , -.Nm krb5_checksum_disable , -.Nm krb5_checksum_is_collision_proof , -.Nm krb5_checksum_is_keyed , -.Nm krb5_checksumsize , -.Nm krb5_cksumtype_valid , -.Nm krb5_copy_checksum , -.Nm krb5_create_checksum , -.Nm krb5_crypto_get_checksum_type -.Nm krb5_free_checksum , -.Nm krb5_free_checksum_contents , -.Nm krb5_hmac , -.Nm krb5_verify_checksum -.Nd creates, handles and verifies checksums -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Li "typedef Checksum krb5_checksum;" -.Ft void -.Fo krb5_checksum_disable -.Fa "krb5_context context" -.Fa "krb5_cksumtype type" -.Fc -.Ft krb5_boolean -.Fo krb5_checksum_is_collision_proof -.Fa "krb5_context context" -.Fa "krb5_cksumtype type" -.Fc -.Ft krb5_boolean -.Fo krb5_checksum_is_keyed -.Fa "krb5_context context" -.Fa "krb5_cksumtype type" -.Fc -.Ft krb5_error_code -.Fo krb5_cksumtype_valid -.Fa "krb5_context context" -.Fa "krb5_cksumtype ctype" -.Fc -.Ft krb5_error_code -.Fo krb5_checksumsize -.Fa "krb5_context context" -.Fa "krb5_cksumtype type" -.Fa "size_t *size" -.Fc -.Ft krb5_error_code -.Fo krb5_create_checksum -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "krb5_key_usage usage" -.Fa "int type" -.Fa "void *data" -.Fa "size_t len" -.Fa "Checksum *result" -.Fc -.Ft krb5_error_code -.Fo krb5_verify_checksum -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "krb5_key_usage usage" -.Fa "void *data" -.Fa "size_t len" -.Fa "Checksum *cksum" -.Fc -.Ft krb5_error_code -.Fo krb5_crypto_get_checksum_type -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "krb5_cksumtype *type" -.Fc -.Ft void -.Fo krb5_free_checksum -.Fa "krb5_context context" -.Fa "krb5_checksum *cksum" -.Fc -.Ft void -.Fo krb5_free_checksum_contents -.Fa "krb5_context context" -.Fa "krb5_checksum *cksum" -.Fc -.Ft krb5_error_code -.Fo krb5_hmac -.Fa "krb5_context context" -.Fa "krb5_cksumtype cktype" -.Fa "const void *data" -.Fa "size_t len" -.Fa "unsigned usage" -.Fa "krb5_keyblock *key" -.Fa "Checksum *result" -.Fc -.Ft krb5_error_code -.Fo krb5_copy_checksum -.Fa "krb5_context context" -.Fa "const krb5_checksum *old" -.Fa "krb5_checksum **new" -.Fc -.Sh DESCRIPTION -The -.Li krb5_checksum -structure holds a Kerberos checksum. -There is no component inside -.Li krb5_checksum -that is directly referable. -.Pp -The functions are used to create and verify checksums. -.Fn krb5_create_checksum -creates a checksum of the specified data, and puts it in -.Fa result . -If -.Fa crypto -is -.Dv NULL , -.Fa usage_or_type -specifies the checksum type to use; it must not be keyed. Otherwise -.Fa crypto -is an encryption context created by -.Fn krb5_crypto_init , -and -.Fa usage_or_type -specifies a key-usage. -.Pp -.Fn krb5_verify_checksum -verifies the -.Fa checksum -against the provided data. -.Pp -.Fn krb5_checksum_is_collision_proof -returns true is the specified checksum is collision proof (that it's -very unlikely that two strings has the same hash value, and that it's -hard to find two strings that has the same hash). Examples of -collision proof checksums are MD5, and SHA1, while CRC32 is not. -.Pp -.Fn krb5_checksum_is_keyed -returns true if the specified checksum type is keyed (that the hash -value is a function of both the data, and a separate key). Examples of -keyed hash algorithms are HMAC-SHA1-DES3, and RSA-MD5-DES. The -.Dq plain -hash functions MD5, and SHA1 are not keyed. -.Pp -.Fn krb5_crypto_get_checksum_type -returns the checksum type that will be used when creating a checksum for the given -.Fa crypto -context. -This function is useful in combination with -.Fn krb5_checksumsize -when you want to know the size a checksum will -use when you create it. -.Pp -.Fn krb5_cksumtype_valid -returns 0 or an error if the checksumtype is implemented and not -currently disabled in this kerberos library. -.Pp -.Fn krb5_checksumsize -returns the size of the outdata of checksum function. -.Pp -.Fn krb5_copy_checksum -returns a copy of the checksum -.Fn krb5_free_checksum -should use used to free the -.Fa new -checksum. -.Pp -.Fn krb5_free_checksum -free the checksum and the content of the checksum. -.Pp -.Fn krb5_free_checksum_contents -frees the content of checksum in -.Fa cksum . -.Pp -.Fn krb5_hmac -calculates the HMAC over -.Fa data -(with length -.Fa len ) -using the keyusage -.Fa usage -and keyblock -.Fa key . -Note that keyusage is not always used in checksums. -.Pp -.Nm krb5_checksum_disable -globally disables the checksum type. -.\" .Sh EXAMPLE -.\" .Sh BUGS -.Sh SEE ALSO -.Xr krb5_crypto_init 3 , -.Xr krb5_c_encrypt 3 , -.Xr krb5_encrypt 3 diff --git a/kerberosV/src/lib/krb5/krb5_creds.3 b/kerberosV/src/lib/krb5/krb5_creds.3 deleted file mode 100644 index 0d1425e7c94..00000000000 --- a/kerberosV/src/lib/krb5/krb5_creds.3 +++ /dev/null @@ -1,119 +0,0 @@ -.\" Copyright (c) 2004, 2006 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: krb5_creds.3,v 1.3 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 1, 2006 -.Dt KRB5_CREDS 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_creds , -.Nm krb5_copy_creds , -.Nm krb5_copy_creds_contents , -.Nm krb5_free_creds , -.Nm krb5_free_cred_contents -.Nd Kerberos 5 credential handling functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_copy_creds -.Fa "krb5_context context" -.Fa "const krb5_creds *incred" -.Fa "krb5_creds **outcred" -.Fc -.Ft krb5_error_code -.Fo krb5_copy_creds_contents -.Fa "krb5_context context" -.Fa "const krb5_creds *incred" -.Fa "krb5_creds *outcred" -.Fc -.Ft krb5_error_code -.Fo krb5_free_creds -.Fa "krb5_context context" -.Fa "krb5_creds *outcred" -.Fc -.Ft krb5_error_code -.Fo krb5_free_cred_contents -.Fa "krb5_context context" -.Fa "krb5_creds *cred" -.Fc -.Sh DESCRIPTION -.Vt krb5_creds -holds Kerberos credentials: -.Bd -literal -offset -typedef struct krb5_creds { - krb5_principal client; - krb5_principal server; - krb5_keyblock session; - krb5_times times; - krb5_data ticket; - krb5_data second_ticket; - krb5_authdata authdata; - krb5_addresses addresses; - krb5_ticket_flags flags; -} krb5_creds; -.Ed -.Pp -.Fn krb5_copy_creds -makes a copy of -.Fa incred -to -.Fa outcred . -.Fa outcred -should be freed with -.Fn krb5_free_creds -by the caller. -.Pp -.Fn krb5_copy_creds_contents -makes a copy of the content of -.Fa incred -to -.Fa outcreds . -.Fa outcreds -should be freed by the called with -.Fn krb5_free_creds_contents . -.Pp -.Fn krb5_free_creds -frees the content of the -.Fa cred -structure and the structure itself. -.Pp -.Fn krb5_free_cred_contents -frees the content of the -.Fa cred -structure. -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_compare_creds 3 , -.Xr krb5_get_init_creds 3 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_digest.3 b/kerberosV/src/lib/krb5/krb5_digest.3 deleted file mode 100644 index 5e84fa0c614..00000000000 --- a/kerberosV/src/lib/krb5/krb5_digest.3 +++ /dev/null @@ -1,260 +0,0 @@ -.\" Copyright (c) 2006 - 2007 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: krb5_digest.3,v 1.1 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd February 18, 2007 -.Dt KRB5_DIGEST 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_digest , -.Nm krb5_digest_alloc , -.Nm krb5_digest_free , -.Nm krb5_digest_set_server_cb , -.Nm krb5_digest_set_type , -.Nm krb5_digest_set_hostname , -.Nm krb5_digest_get_server_nonce , -.Nm krb5_digest_set_server_nonce , -.Nm krb5_digest_get_opaque , -.Nm krb5_digest_set_opaque , -.Nm krb5_digest_get_identifier , -.Nm krb5_digest_set_identifier , -.Nm krb5_digest_init_request , -.Nm krb5_digest_set_client_nonce , -.Nm krb5_digest_set_digest , -.Nm krb5_digest_set_username , -.Nm krb5_digest_set_authid , -.Nm krb5_digest_set_authentication_user , -.Nm krb5_digest_set_realm , -.Nm krb5_digest_set_method , -.Nm krb5_digest_set_uri , -.Nm krb5_digest_set_nonceCount , -.Nm krb5_digest_set_qop , -.Nm krb5_digest_request , -.Nm krb5_digest_get_responseData , -.Nm krb5_digest_get_rsp , -.Nm krb5_digest_get_tickets , -.Nm krb5_digest_get_client_binding , -.Nm krb5_digest_get_a1_hash -.Nd remote digest (HTTP-DIGEST, SASL, CHAP) suppport -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Li "typedef struct krb5_digest *krb5_digest;" -.Pp -.Ft krb5_error_code -.Fo krb5_digest_alloc -.Fa "krb5_context context" -.Fa "krb5_digest *digest" -.Fc -.Ft void -.Fo krb5_digest_free -.Fa "krb5_digest digest" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_type -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *type" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_server_cb -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *type" -.Fa "const char *binding" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_hostname -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *hostname" -.Fc -.Ft "const char *" -.Fo krb5_digest_get_server_nonce -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_server_nonce -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *nonce" -.Fc -.Ft "const char *" -.Fo krb5_digest_get_opaque -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_opaque -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *opaque" -.Fc -.Ft "const char *" -.Fo krb5_digest_get_identifier -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_identifier -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *id" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_init_request -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "krb5_realm realm" -.Fa "krb5_ccache ccache" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_client_nonce -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *nonce" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_digest -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *dgst" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_username -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *username" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_authid -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *authid" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_authentication_user -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "krb5_principal authentication_user" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_realm -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *realm" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_method -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *method" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_uri -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *uri" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_nonceCount -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *nonce_count" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_set_qop -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "const char *qop" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_request -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "krb5_realm realm" -.Fa "krb5_ccache ccache" -.Fc -.Ft "const char *" -.Fo krb5_digest_get_responseData -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fc -.Ft "const char *" -.Fo krb5_digest_get_rsp -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_get_tickets -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "Ticket **tickets" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_get_client_binding -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "char **type" -.Fa "char **binding" -.Fc -.Ft krb5_error_code -.Fo krb5_digest_get_a1_hash -.Fa "krb5_context context" -.Fa "krb5_digest digest" -.Fa "krb5_data *data" -.Fc -.Sh DESCRIPTION -The -.Fn krb5_digest_alloc -function allocatates the -.Fa digest -structure. The structure should be freed with -.Fn krb5_digest_free -when it is no longer being used. -.Pp -.Fn krb5_digest_alloc -returns 0 to indicate success. -Otherwise an kerberos code is returned and the pointer that -.Fa digest -points to is set to -.Dv NULL . -.Pp -.Fn krb5_digest_free -free the structure -.Fa digest . -.Sh SEE ALSO -.Xr krb5 3 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_eai_to_heim_errno.3 b/kerberosV/src/lib/krb5/krb5_eai_to_heim_errno.3 deleted file mode 100644 index d0cfe8c5383..00000000000 --- a/kerberosV/src/lib/krb5/krb5_eai_to_heim_errno.3 +++ /dev/null @@ -1,68 +0,0 @@ -.\" Copyright (c) 2004 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: krb5_eai_to_heim_errno.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd April 13, 2004 -.Dt KRB5_EAI_TO_HEIM_ERRNO 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_eai_to_heim_errno , -.Nm krb5_h_errno_to_heim_errno -.Nd convert resolver error code to com_err error codes -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_eai_to_heim_errno -.Fa "int eai_errno" -.Fa "int system_error" -.Fc -.Ft krb5_error_code -.Fo krb5_h_errno_to_heim_errno -.Fa "int eai_errno" -.Fc -.Sh DESCRIPTION -.Fn krb5_eai_to_heim_errno -and -.Fn krb5_h_errno_to_heim_errno -convert -.Xr getaddrinfo 3 , -.Xr getnameinfo 3 , -and -.Xr h_errno 3 -to com_err error code that are used by Heimdal, this is useful for for -function returning kerberos errors and needs to communicate failures -from resolver function. -.Sh SEE ALSO -.Xr krb5 3 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_encrypt.3 b/kerberosV/src/lib/krb5/krb5_encrypt.3 deleted file mode 100644 index 69904ea96f7..00000000000 --- a/kerberosV/src/lib/krb5/krb5_encrypt.3 +++ /dev/null @@ -1,278 +0,0 @@ -.\" Copyright (c) 1999 - 2004 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: krb5_encrypt.3,v 1.5 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd March 20, 2004 -.Dt KRB5_ENCRYPT 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_crypto_getblocksize , -.Nm krb5_crypto_getconfoundersize -.Nm krb5_crypto_getenctype , -.Nm krb5_crypto_getpadsize , -.Nm krb5_crypto_overhead , -.Nm krb5_decrypt , -.Nm krb5_decrypt_EncryptedData , -.Nm krb5_decrypt_ivec , -.Nm krb5_decrypt_ticket , -.Nm krb5_encrypt , -.Nm krb5_encrypt_EncryptedData , -.Nm krb5_encrypt_ivec , -.Nm krb5_enctype_disable , -.Nm krb5_enctype_keysize , -.Nm krb5_enctype_to_string , -.Nm krb5_enctype_valid , -.Nm krb5_get_wrapped_length , -.Nm krb5_string_to_enctype -.Nd "encrypt and decrypt data, set and get encryption type parameters" -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_encrypt -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "unsigned usage" -.Fa "void *data" -.Fa "size_t len" -.Fa "krb5_data *result" -.Fc -.Ft krb5_error_code -.Fo krb5_encrypt_EncryptedData -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "unsigned usage" -.Fa "void *data" -.Fa "size_t len" -.Fa "int kvno" -.Fa "EncryptedData *result" -.Fc -.Ft krb5_error_code -.Fo krb5_encrypt_ivec -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "unsigned usage" -.Fa "void *data" -.Fa "size_t len" -.Fa "krb5_data *result" -.Fa "void *ivec" -.Fc -.Ft krb5_error_code -.Fo krb5_decrypt -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "unsigned usage" -.Fa "void *data" -.Fa "size_t len" -.Fa "krb5_data *result" -.Fc -.Ft krb5_error_code -.Fo krb5_decrypt_EncryptedData -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "unsigned usage" -.Fa "EncryptedData *e" -.Fa "krb5_data *result" -.Fc -.Ft krb5_error_code -.Fo krb5_decrypt_ivec -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "unsigned usage" -.Fa "void *data" -.Fa "size_t len" -.Fa "krb5_data *result" -.Fa "void *ivec" -.Fc -.Ft krb5_error_code -.Fo krb5_decrypt_ticket -.Fa "krb5_context context" -.Fa "Ticket *ticket" -.Fa "krb5_keyblock *key" -.Fa "EncTicketPart *out" -.Fa "krb5_flags flags" -.Fc -.Ft krb5_error_code -.Fo krb5_crypto_getblocksize -.Fa "krb5_context context" -.Fa "size_t *blocksize" -.Fc -.Ft krb5_error_code -.Fo krb5_crypto_getenctype -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "krb5_enctype *enctype" -.Fc -.Ft krb5_error_code -.Fo krb5_crypto_getpadsize -.Fa "krb5_context context" -.Fa size_t *padsize" -.Fc -.Ft krb5_error_code -.Fo krb5_crypto_getconfoundersize -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa size_t *confoundersize" -.Fc -.Ft krb5_error_code -.Fo krb5_enctype_keysize -.Fa "krb5_context context" -.Fa "krb5_enctype type" -.Fa "size_t *keysize" -.Fc -.Ft krb5_error_code -.Fo krb5_crypto_overhead -.Fa "krb5_context context" -.Fa size_t *padsize" -.Fc -.Ft krb5_error_code -.Fo krb5_string_to_enctype -.Fa "krb5_context context" -.Fa "const char *string" -.Fa "krb5_enctype *etype" -.Fc -.Ft krb5_error_code -.Fo krb5_enctype_to_string -.Fa "krb5_context context" -.Fa "krb5_enctype etype" -.Fa "char **string" -.Fc -.Ft krb5_error_code -.Fo krb5_enctype_valid -.Fa "krb5_context context" -.Fa "krb5_enctype etype" -.Fc -.Ft void -.Fo krb5_enctype_disable -.Fa "krb5_context context" -.Fa "krb5_enctype etype" -.Fc -.Ft size_t -.Fo krb5_get_wrapped_length -.Fa "krb5_context context" -.Fa "krb5_crypto crypto" -.Fa "size_t data_len" -.Fc -.Sh DESCRIPTION -These functions are used to encrypt and decrypt data. -.Pp -.Fn krb5_encrypt_ivec -puts the encrypted version of -.Fa data -(of size -.Fa len ) -in -.Fa result . -If the encryption type supports using derived keys, -.Fa usage -should be the appropriate key-usage. -.Fa ivec -is a pointer to a initial IV, it is modified to the end IV at the end of -the round. -Ivec should be the size of -If -.Dv NULL -is passed in, the default IV is used. -.Fn krb5_encrypt -does the same as -.Fn krb5_encrypt_ivec -but with -.Fa ivec -being -.Dv NULL . -.Fn krb5_encrypt_EncryptedData -does the same as -.Fn krb5_encrypt , -but it puts the encrypted data in a -.Fa EncryptedData -structure instead. If -.Fa kvno -is not zero, it will be put in the (optional) -.Fa kvno -field in the -.Fa EncryptedData . -.Pp -.Fn krb5_decrypt_ivec , -.Fn krb5_decrypt , -and -.Fn krb5_decrypt_EncryptedData -works similarly. -.Pp -.Fn krb5_decrypt_ticket -decrypts the encrypted part of -.Fa ticket -with -.Fa key . -.Fn krb5_decrypt_ticket -also verifies the timestamp in the ticket, invalid flag and if the KDC -haven't verified the transited path, the transit path. -.Pp -.Fn krb5_enctype_keysize , -.Fn krb5_crypto_getconfoundersize , -.Fn krb5_crypto_getblocksize , -.Fn krb5_crypto_getenctype , -.Fn krb5_crypto_getpadsize , -.Fn krb5_crypto_overhead -all returns various (sometimes) useful information from a crypto context. -.Fn krb5_crypto_overhead -is the combination of krb5_crypto_getconfoundersize, -krb5_crypto_getblocksize and krb5_crypto_getpadsize and return the -maximum overhead size. -.Pp -.Fn krb5_enctype_to_string -converts a encryption type number to a string that can be printable -and stored. The strings returned should be freed with -.Xr free 3 . -.Pp -.Fn krb5_string_to_enctype -converts a encryption type strings to a encryption type number that -can use used for other Kerberos crypto functions. -.Pp -.Fn krb5_enctype_valid -returns 0 if the encrypt is supported and not disabled, otherwise and -error code is returned. -.Pp -.Fn krb5_enctype_disable -(globally, for all contextes) disables the -.Fa enctype . -.Pp -.Fn krb5_get_wrapped_length -returns the size of an encrypted packet by -.Fa crypto -of length -.Fa data_len . -.\" .Sh EXAMPLE -.\" .Sh BUGS -.Sh SEE ALSO -.Xr krb5_create_checksum 3 , -.Xr krb5_crypto_init 3 diff --git a/kerberosV/src/lib/krb5/krb5_err.et b/kerberosV/src/lib/krb5/krb5_err.et deleted file mode 100644 index 18ddb4cea63..00000000000 --- a/kerberosV/src/lib/krb5/krb5_err.et +++ /dev/null @@ -1,274 +0,0 @@ -# -# Error messages for the krb5 library -# -# This might look like a com_err file, but is not -# -id "$Id: krb5_err.et,v 1.2 2013/06/17 18:57:44 robert Exp $" - -error_table krb5 - -prefix KRB5KDC_ERR -error_code NONE, "No error" -error_code NAME_EXP, "Client's entry in database has expired" -error_code SERVICE_EXP, "Server's entry in database has expired" -error_code BAD_PVNO, "Requested protocol version not supported" -error_code C_OLD_MAST_KVNO, "Client's key is encrypted in an old master key" -error_code S_OLD_MAST_KVNO, "Server's key is encrypted in an old master key" -error_code C_PRINCIPAL_UNKNOWN, "Client not found in Kerberos database" -error_code S_PRINCIPAL_UNKNOWN, "Server not found in Kerberos database" -error_code PRINCIPAL_NOT_UNIQUE,"Principal has multiple entries in Kerberos database" -error_code NULL_KEY, "Client or server has a null key" -error_code CANNOT_POSTDATE, "Ticket is ineligible for postdating" -error_code NEVER_VALID, "Requested effective lifetime is negative or too short" -error_code POLICY, "KDC policy rejects request" -error_code BADOPTION, "KDC can't fulfill requested option" -error_code ETYPE_NOSUPP, "KDC has no support for encryption type" -error_code SUMTYPE_NOSUPP, "KDC has no support for checksum type" -error_code PADATA_TYPE_NOSUPP, "KDC has no support for padata type" -error_code TRTYPE_NOSUPP, "KDC has no support for transited type" -error_code CLIENT_REVOKED, "Clients credentials have been revoked" -error_code SERVICE_REVOKED, "Credentials for server have been revoked" -error_code TGT_REVOKED, "TGT has been revoked" -error_code CLIENT_NOTYET, "Client not yet valid - try again later" -error_code SERVICE_NOTYET, "Server not yet valid - try again later" -error_code KEY_EXPIRED, "Password has expired" -error_code PREAUTH_FAILED, "Preauthentication failed" -error_code PREAUTH_REQUIRED, "Additional pre-authentication required" -error_code SERVER_NOMATCH, "Requested server and ticket don't match" -error_code KDC_ERR_MUST_USE_USER2USER, "Server principal valid for user2user only" -error_code PATH_NOT_ACCEPTED, "KDC Policy rejects transited path" -error_code SVC_UNAVAILABLE, "A service is not available" - -index 31 -prefix KRB5KRB_AP -error_code ERR_BAD_INTEGRITY, "Decrypt integrity check failed" -error_code ERR_TKT_EXPIRED, "Ticket expired" -error_code ERR_TKT_NYV, "Ticket not yet valid" -error_code ERR_REPEAT, "Request is a replay" -error_code ERR_NOT_US, "The ticket isn't for us" -error_code ERR_BADMATCH, "Ticket/authenticator don't match" -error_code ERR_SKEW, "Clock skew too great" -error_code ERR_BADADDR, "Incorrect net address" -error_code ERR_BADVERSION, "Protocol version mismatch" -error_code ERR_MSG_TYPE, "Invalid message type" -error_code ERR_MODIFIED, "Message stream modified" -error_code ERR_BADORDER, "Message out of order" -error_code ERR_ILL_CR_TKT, "Invalid cross-realm ticket" -error_code ERR_BADKEYVER, "Key version is not available" -error_code ERR_NOKEY, "Service key not available" -error_code ERR_MUT_FAIL, "Mutual authentication failed" -error_code ERR_BADDIRECTION, "Incorrect message direction" -error_code ERR_METHOD, "Alternative authentication method required" -error_code ERR_BADSEQ, "Incorrect sequence number in message" -error_code ERR_INAPP_CKSUM, "Inappropriate type of checksum in message" -error_code PATH_NOT_ACCEPTED, "Policy rejects transited path" - -prefix KRB5KRB_ERR -error_code RESPONSE_TOO_BIG, "Response too big for UDP, retry with TCP" -# 53-59 are reserved -index 60 -error_code GENERIC, "Generic error (see e-text)" -error_code FIELD_TOOLONG, "Field is too long for this implementation" - -# pkinit -index 62 -prefix KRB5_KDC_ERR -error_code CLIENT_NOT_TRUSTED, "Client not trusted" -error_code KDC_NOT_TRUSTED, "KDC not trusted" -error_code INVALID_SIG, "Invalid signature" -error_code DH_KEY_PARAMETERS_NOT_ACCEPTED, "DH parameters not accepted" - -index 68 -prefix KRB5_KDC_ERR -error_code WRONG_REALM, "Wrong realm" - -index 69 -prefix KRB5_AP_ERR -error_code USER_TO_USER_REQUIRED, "User to user required" - -index 70 -prefix KRB5_KDC_ERR -error_code CANT_VERIFY_CERTIFICATE, "Cannot verify certificate" -error_code INVALID_CERTIFICATE, "Certificate invalid" -error_code REVOKED_CERTIFICATE, "Certificate revoked" -error_code REVOCATION_STATUS_UNKNOWN, "Revocation status unknown" -error_code REVOCATION_STATUS_UNAVAILABLE, "Revocation status unavaible" -error_code CLIENT_NAME_MISMATCH, "Client name mismatch in certificate" -error_code INCONSISTENT_KEY_PURPOSE, "Inconsistent key purpose" -error_code DIGEST_IN_CERT_NOT_ACCEPTED, "Digest in certificate not accepted" -error_code PA_CHECKSUM_MUST_BE_INCLUDED, "paChecksum must be included" -error_code DIGEST_IN_SIGNED_DATA_NOT_ACCEPTED, "Digest in signedData not accepted" -error_code PUBLIC_KEY_ENCRYPTION_NOT_SUPPORTED, "Public key encryption not supported" - -## these are never used -#index 80 -#prefix KRB5_IAKERB -#error_code ERR_KDC_NOT_FOUND, "IAKERB proxy could not find a KDC" -#error_code ERR_KDC_NO_RESPONSE, "IAKERB proxy never reeived a response from a KDC" - -# 82-93 are reserved - -index 94 -error_code INVALID_HASH_ALG, "Invalid OTP digest algorithm" -error_code INVALID_ITERATION_COUNT, "Invalid OTP iteration count" - -# 97-127 are reserved - -index 128 -prefix -error_code KRB5_ERR_RCSID, "$Id: krb5_err.et,v 1.2 2013/06/17 18:57:44 robert Exp $" - -error_code KRB5_LIBOS_BADLOCKFLAG, "Invalid flag for file lock mode" -error_code KRB5_LIBOS_CANTREADPWD, "Cannot read password" -error_code KRB5_LIBOS_BADPWDMATCH, "Password mismatch" -error_code KRB5_LIBOS_PWDINTR, "Password read interrupted" - -error_code KRB5_PARSE_ILLCHAR, "Invalid character in component name" -error_code KRB5_PARSE_MALFORMED, "Malformed representation of principal" - -error_code KRB5_CONFIG_CANTOPEN, "Can't open/find configuration file" -error_code KRB5_CONFIG_BADFORMAT, "Improper format of configuration file" -error_code KRB5_CONFIG_NOTENUFSPACE, "Insufficient space to return complete information" - -error_code KRB5_BADMSGTYPE, "Invalid message type specified for encoding" - -error_code KRB5_CC_BADNAME, "Credential cache name malformed" -error_code KRB5_CC_UNKNOWN_TYPE, "Unknown credential cache type" -error_code KRB5_CC_NOTFOUND, "Matching credential not found" -error_code KRB5_CC_END, "End of credential cache reached" - -error_code KRB5_NO_TKT_SUPPLIED, "Request did not supply a ticket" - -error_code KRB5KRB_AP_WRONG_PRINC, "Wrong principal in request" -error_code KRB5KRB_AP_ERR_TKT_INVALID, "Ticket has invalid flag set" - -error_code KRB5_PRINC_NOMATCH, "Requested principal and ticket don't match" -error_code KRB5_KDCREP_MODIFIED, "KDC reply did not match expectations" -error_code KRB5_KDCREP_SKEW, "Clock skew too great in KDC reply" -error_code KRB5_IN_TKT_REALM_MISMATCH, "Client/server realm mismatch in initial ticket request" - -error_code KRB5_PROG_ETYPE_NOSUPP, "Program lacks support for encryption type" -error_code KRB5_PROG_KEYTYPE_NOSUPP, "Program lacks support for key type" -error_code KRB5_WRONG_ETYPE, "Requested encryption type not used in message" -error_code KRB5_PROG_SUMTYPE_NOSUPP, "Program lacks support for checksum type" - -error_code KRB5_REALM_UNKNOWN, "Cannot find KDC for requested realm" -error_code KRB5_SERVICE_UNKNOWN, "Kerberos service unknown" -error_code KRB5_KDC_UNREACH, "Cannot contact any KDC for requested realm" -error_code KRB5_NO_LOCALNAME, "No local name found for principal name" - -error_code KRB5_MUTUAL_FAILED, "Mutual authentication failed" - -# some of these should be combined/supplanted by system codes - -error_code KRB5_RC_TYPE_EXISTS, "Replay cache type is already registered" -error_code KRB5_RC_MALLOC, "No more memory to allocate (in replay cache code)" -error_code KRB5_RC_TYPE_NOTFOUND, "Replay cache type is unknown" -error_code KRB5_RC_UNKNOWN, "Generic unknown RC error" -error_code KRB5_RC_REPLAY, "Message is a replay" -error_code KRB5_RC_IO, "Replay I/O operation failed XXX" -error_code KRB5_RC_NOIO, "Replay cache type does not support non-volatile storage" -error_code KRB5_RC_PARSE, "Replay cache name parse/format error" - -error_code KRB5_RC_IO_EOF, "End-of-file on replay cache I/O" -error_code KRB5_RC_IO_MALLOC, "No more memory to allocate (in replay cache I/O code)" -error_code KRB5_RC_IO_PERM, "Permission denied in replay cache code" -error_code KRB5_RC_IO_IO, "I/O error in replay cache i/o code" -error_code KRB5_RC_IO_UNKNOWN, "Generic unknown RC/IO error" -error_code KRB5_RC_IO_SPACE, "Insufficient system space to store replay information" - -error_code KRB5_TRANS_CANTOPEN, "Can't open/find realm translation file" -error_code KRB5_TRANS_BADFORMAT, "Improper format of realm translation file" - -error_code KRB5_LNAME_CANTOPEN, "Can't open/find lname translation database" -error_code KRB5_LNAME_NOTRANS, "No translation available for requested principal" -error_code KRB5_LNAME_BADFORMAT, "Improper format of translation database entry" - -error_code KRB5_CRYPTO_INTERNAL, "Cryptosystem internal error" - -error_code KRB5_KT_BADNAME, "Key table name malformed" -error_code KRB5_KT_UNKNOWN_TYPE, "Unknown Key table type" -error_code KRB5_KT_NOTFOUND, "Key table entry not found" -error_code KRB5_KT_END, "End of key table reached" -error_code KRB5_KT_NOWRITE, "Cannot write to specified key table" -error_code KRB5_KT_IOERR, "Error writing to key table" - -error_code KRB5_NO_TKT_IN_RLM, "Cannot find ticket for requested realm" -error_code KRB5DES_BAD_KEYPAR, "DES key has bad parity" -error_code KRB5DES_WEAK_KEY, "DES key is a weak key" - -error_code KRB5_BAD_ENCTYPE, "Bad encryption type" -error_code KRB5_BAD_KEYSIZE, "Key size is incompatible with encryption type" -error_code KRB5_BAD_MSIZE, "Message size is incompatible with encryption type" - -error_code KRB5_CC_TYPE_EXISTS, "Credentials cache type is already registered." -error_code KRB5_KT_TYPE_EXISTS, "Key table type is already registered." - -error_code KRB5_CC_IO, "Credentials cache I/O operation failed XXX" -error_code KRB5_FCC_PERM, "Credentials cache file permissions incorrect" -error_code KRB5_FCC_NOFILE, "No credentials cache file found" -error_code KRB5_FCC_INTERNAL, "Internal file credentials cache error" -error_code KRB5_CC_WRITE, "Error writing to credentials cache file" -error_code KRB5_CC_NOMEM, "No more memory to allocate (in credentials cache code)" -error_code KRB5_CC_FORMAT, "Bad format in credentials cache" -error_code KRB5_CC_NOT_KTYPE, "No credentials found with supported encryption types" - -# errors for dual tgt library calls -error_code KRB5_INVALID_FLAGS, "Invalid KDC option combination (library internal error)" -error_code KRB5_NO_2ND_TKT, "Request missing second ticket" - -error_code KRB5_NOCREDS_SUPPLIED, "No credentials supplied to library routine" - -# errors for sendauth (and recvauth) - -error_code KRB5_SENDAUTH_BADAUTHVERS, "Bad sendauth version was sent" -error_code KRB5_SENDAUTH_BADAPPLVERS, "Bad application version was sent (via sendauth)" -error_code KRB5_SENDAUTH_BADRESPONSE, "Bad response (during sendauth exchange)" -error_code KRB5_SENDAUTH_REJECTED, "Server rejected authentication (during sendauth exchange)" - -# errors for preauthentication - -error_code KRB5_PREAUTH_BAD_TYPE, "Unsupported preauthentication type" -error_code KRB5_PREAUTH_NO_KEY, "Required preauthentication key not supplied" -error_code KRB5_PREAUTH_FAILED, "Generic preauthentication failure" - -# version number errors - -error_code KRB5_RCACHE_BADVNO, "Unsupported replay cache format version number" -error_code KRB5_CCACHE_BADVNO, "Unsupported credentials cache format version number" -error_code KRB5_KEYTAB_BADVNO, "Unsupported key table format version number" - -# -# - -error_code KRB5_PROG_ATYPE_NOSUPP, "Program lacks support for address type" -error_code KRB5_RC_REQUIRED, "Message replay detection requires rcache parameter" -error_code KRB5_ERR_BAD_HOSTNAME, "Hostname cannot be canonicalized" -error_code KRB5_ERR_HOST_REALM_UNKNOWN, "Cannot determine realm for host" -error_code KRB5_SNAME_UNSUPP_NAMETYPE, "Conversion to service principal undefined for name type" - -error_code KRB5KRB_AP_ERR_V4_REPLY, "Initial Ticket response appears to be Version 4" -error_code KRB5_REALM_CANT_RESOLVE, "Cannot resolve KDC for requested realm" -error_code KRB5_TKT_NOT_FORWARDABLE, "Requesting ticket can't get forwardable tickets" -error_code KRB5_FWD_BAD_PRINCIPAL, "Bad principal name while trying to forward credentials" - -error_code KRB5_GET_IN_TKT_LOOP, "Looping detected inside krb5_get_in_tkt" -error_code KRB5_CONFIG_NODEFREALM, "Configuration file does not specify default realm" - -error_code KRB5_SAM_UNSUPPORTED, "Bad SAM flags in obtain_sam_padata" -error_code KRB5_SAM_INVALID_ETYPE, "Invalid encryption type in SAM challenge" -error_code KRB5_SAM_NO_CHECKSUM, "Missing checksum in SAM challenge" -error_code KRB5_SAM_BAD_CHECKSUM, "Bad checksum in SAM challenge" - -index 238 -error_code KRB5_OBSOLETE_FN, "Program called an obsolete, deleted function" - -index 245 -error_code KRB5_ERR_BAD_S2K_PARAMS, "Invalid key generation parameters from KDC" -error_code KRB5_ERR_NO_SERVICE, "Service not available" -error_code KRB5_CC_NOSUPP, "Credential cache function not supported" -error_code KRB5_DELTAT_BADFORMAT, "Invalid format of Kerberos lifetime or clock skew string" -error_code KRB5_PLUGIN_NO_HANDLE, "Supplied data not handled by this plugin" -error_code KRB5_PLUGIN_OP_NOTSUPP, "Plugin does not support the operaton" - -end diff --git a/kerberosV/src/lib/krb5/krb5_find_padata.3 b/kerberosV/src/lib/krb5/krb5_find_padata.3 deleted file mode 100644 index 3f80e05ab15..00000000000 --- a/kerberosV/src/lib/krb5/krb5_find_padata.3 +++ /dev/null @@ -1,87 +0,0 @@ -.\" Copyright (c) 2004 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: krb5_find_padata.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd March 21, 2004 -.Dt KRB5_FIND_PADATA 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_find_padata , -.Nm krb5_padata_add -.Nd Kerberos 5 pre-authentication data handling functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Ft "PA_DATA *" -.Fo krb5_find_padata -.Fa "PA_DATA *val" -.Fa "unsigned len" -.Fa "int type" -.Fa "int *index" -.Fc -.Ft int -.Fo krb5_padata_add -.Fa "krb5_context context" -.Fa "METHOD_DATA *md" -.Fa "int type" -.Fa "void *buf" -.Fa "size_t len" -.Fc -.Sh DESCRIPTION -.Fn krb5_find_padata -tries to find the pre-authentication data entry of type -.Fa type -in the array -.Fa val -of length -.Fa len . -The search is started at entry pointed out by -.Fa *index -(zero based indexing). -If the type isn't found, -.Dv NULL -is returned. -.Pp -.Fn krb5_padata_add -adds a pre-authentication data entry of type -.Fa type -pointed out by -.Fa buf -and -.Fa len -to -.Fa md . -.Sh SEE ALSO -.Xr krb5 3 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_generate_random_block.3 b/kerberosV/src/lib/krb5/krb5_generate_random_block.3 deleted file mode 100644 index 399400ced9e..00000000000 --- a/kerberosV/src/lib/krb5/krb5_generate_random_block.3 +++ /dev/null @@ -1,57 +0,0 @@ -.\" Copyright (c) 2004 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: krb5_generate_random_block.3,v 1.3 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd March 21, 2004 -.Dt KRB5_GENERATE_RANDOM_BLOCK 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_generate_random_block -.Nd Kerberos 5 random functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft void -.Fo krb5_generate_random_block -.Fa "void *buf" -.Fa "size_t len" -.Fc -.Sh DESCRIPTION -.Fn krb5_generate_random_block -generates a cryptographically strong pseudo-random block into the buffer -.Fa buf -of length -.Fa len . -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_get_all_client_addrs.3 b/kerberosV/src/lib/krb5/krb5_get_all_client_addrs.3 deleted file mode 100644 index 9b153afadff..00000000000 --- a/kerberosV/src/lib/krb5/krb5_get_all_client_addrs.3 +++ /dev/null @@ -1,74 +0,0 @@ -.\" Copyright (c) 2001 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: krb5_get_all_client_addrs.3,v 1.4 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd July 1, 2001 -.Dt KRB5_GET_ADDRS 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_get_all_client_addrs , -.Nm krb5_get_all_server_addrs -.Nd return local addresses -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft "krb5_error_code" -.Fn krb5_get_all_client_addrs "krb5_context context" "krb5_addresses *addrs" -.Ft "krb5_error_code" -.Fn krb5_get_all_server_addrs "krb5_context context" "krb5_addresses *addrs" -.Sh DESCRIPTION -These functions return in -.Fa addrs -a list of addresses associated with the local -host. -.Pp -The server variant returns all configured interface addresses (if -possible), including loop-back addresses. This is useful if you want -to create sockets to listen to. -.Pp -The client version will also scan local interfaces (can be turned off -by setting -.Li libdefaults/scan_interfaces -to false in -.Pa krb5.conf ) , -but will not include loop-back addresses, unless there are no other -addresses found. It will remove all addresses included in -.Li libdefaults/ignore_addresses -but will unconditionally include addresses in -.Li libdefaults/extra_addresses . -.Pp -The returned addresses should be freed by calling -.Fn krb5_free_addresses . -.\".Sh EXAMPLE -.Sh SEE ALSO -.Xr krb5_free_addresses 3 diff --git a/kerberosV/src/lib/krb5/krb5_get_credentials.3 b/kerberosV/src/lib/krb5/krb5_get_credentials.3 deleted file mode 100644 index 4d90ceb3a15..00000000000 --- a/kerberosV/src/lib/krb5/krb5_get_credentials.3 +++ /dev/null @@ -1,181 +0,0 @@ -.\" Copyright (c) 2004 - 2005 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: krb5_get_credentials.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd July 26, 2004 -.Dt KRB5_GET_CREDENTIALS 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_get_credentials , -.Nm krb5_get_credentials_with_flags , -.Nm krb5_get_kdc_cred , -.Nm krb5_get_renewed_creds -.Nd get credentials from the KDC using krbtgt -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_get_credentials -.Fa "krb5_context context" -.Fa "krb5_flags options" -.Fa "krb5_ccache ccache" -.Fa "krb5_creds *in_creds" -.Fa "krb5_creds **out_creds" -.Fc -.Ft krb5_error_code -.Fo krb5_get_credentials_with_flags -.Fa "krb5_context context" -.Fa "krb5_flags options" -.Fa "krb5_kdc_flags flags" -.Fa "krb5_ccache ccache" -.Fa "krb5_creds *in_creds" -.Fa "krb5_creds **out_creds" -.Fc -.Ft krb5_error_code -.Fo krb5_get_kdc_cred -.Fa "krb5_context context" -.Fa "krb5_ccache id" -.Fa "krb5_kdc_flags flags" -.Fa "krb5_addresses *addresses" -.Fa "Ticket *second_ticket" -.Fa "krb5_creds *in_creds" -.Fa "krb5_creds **out_creds" -.Fc -.Ft krb5_error_code -.Fo krb5_get_renewed_creds -.Fa "krb5_context context" -.Fa "krb5_creds *creds" -.Fa "krb5_const_principal client" -.Fa "krb5_ccache ccache" -.Fa "const char *in_tkt_service" -.Fc -.Sh DESCRIPTION -.Fn krb5_get_credentials_with_flags -get credentials specified by -.Fa in_creds->server -and -.Fa in_creds->client -(the rest of the -.Fa in_creds -structure is ignored) -by first looking in the -.Fa ccache -and if doesn't exists or is expired, fetch the credential from the KDC -using the krbtgt in -.Fa ccache . -The credential is returned in -.Fa out_creds -and should be freed using the function -.Fn krb5_free_creds . -.Pp -Valid flags to pass into -.Fa options -argument are: -.Pp -.Bl -tag -width "KRB5_GC_EXPIRED_OK" -compact -.It KRB5_GC_CACHED -Only check the -.Fa ccache , -don't got out on network to fetch credential. -.It KRB5_GC_USER_USER -Request a user to user ticket. -This option doesn't store the resulting user to user credential in -the -.Fa ccache . -.It KRB5_GC_EXPIRED_OK -returns the credential even if it is expired, default behavior is trying -to refetch the credential from the KDC. -.El -.Pp -.Fa Flags -are KDCOptions, note the caller must fill in the bit-field and not -use the integer associated structure. -.Pp -.Fn krb5_get_credentials -works the same way as -.Fn krb5_get_credentials_with_flags -except that the -.Fa flags -field is missing. -.Pp -.Fn krb5_get_kdc_cred -does the same as the functions above, but the caller must fill in all -the information andits closer to the wire protocol. -.Pp -.Fn krb5_get_renewed_creds -renews a credential given by -.Fa in_tkt_service -(if -.Dv NULL -the default -.Li krbtgt ) -using the credential cache -.Fa ccache . -The result is stored in -.Fa creds -and should be freed using -.Fa krb5_free_creds . -.Sh EXAMPLES -Here is a example function that get a credential from a credential cache -.Fa id -or the KDC and returns it to the caller. -.Bd -literal -#include - -int -getcred(krb5_context context, krb5_ccache id, krb5_creds **creds) -{ - krb5_error_code ret; - krb5_creds in; - - ret = krb5_parse_name(context, "client@EXAMPLE.COM", - &in.client); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_parse_name(context, "host/server.example.com@EXAMPLE.COM", - &in.server); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_get_credentials(context, 0, id, &in, creds); - if (ret) - krb5_err(context, 1, ret, "krb5_get_credentials"); - - return 0; -} -.Ed -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_get_forwarded_creds 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_get_creds.3 b/kerberosV/src/lib/krb5/krb5_get_creds.3 deleted file mode 100644 index 19db936b046..00000000000 --- a/kerberosV/src/lib/krb5/krb5_get_creds.3 +++ /dev/null @@ -1,173 +0,0 @@ -.\" Copyright (c) 2006 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: krb5_get_creds.3,v 1.1 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd June 15, 2006 -.Dt KRB5_GET_CREDS 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_get_creds , -.Nm krb5_get_creds_opt_add_options , -.Nm krb5_get_creds_opt_alloc , -.Nm krb5_get_creds_opt_free , -.Nm krb5_get_creds_opt_set_enctype , -.Nm krb5_get_creds_opt_set_impersonate , -.Nm krb5_get_creds_opt_set_options , -.Nm krb5_get_creds_opt_set_ticket -.Nd get credentials from the KDC -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_get_creds -.Fa "krb5_context context" -.Fa "krb5_get_creds_opt opt" -.Fa "krb5_ccache ccache" -.Fa "krb5_const_principal inprinc" -.Fa "krb5_creds **out_creds" -.Fc -.Ft void -.Fo krb5_get_creds_opt_add_options -.Fa "krb5_context context" -.Fa "krb5_get_creds_opt opt" -.Fa "krb5_flags options" -.Fc -.Ft krb5_error_code -.Fo krb5_get_creds_opt_alloc -.Fa "krb5_context context" -.Fa "krb5_get_creds_opt *opt" -.Fc -.Ft void -.Fo krb5_get_creds_opt_free -.Fa "krb5_context context" -.Fa "krb5_get_creds_opt opt" -.Fc -.Ft void -.Fo krb5_get_creds_opt_set_enctype -.Fa "krb5_context context" -.Fa "krb5_get_creds_opt opt" -.Fa "krb5_enctype enctype" -.Fc -.Ft krb5_error_code -.Fo krb5_get_creds_opt_set_impersonate -.Fa "krb5_context context" -.Fa "krb5_get_creds_opt opt" -.Fa "krb5_const_principal self" -.Fc -.Ft void -.Fo krb5_get_creds_opt_set_options -.Fa "krb5_context context" -.Fa "krb5_get_creds_opt opt" -.Fa "krb5_flags options" -.Fc -.Ft krb5_error_code -.Fo krb5_get_creds_opt_set_ticket -.Fa "krb5_context context" -.Fa "krb5_get_creds_opt opt" -.Fa "const Ticket *ticket" -.Fc -.Sh DESCRIPTION -.Fn krb5_get_creds -fetches credentials specified by -.Fa opt -by first looking in the -.Fa ccache , -and then it doesn't exists, fetch the credential from the KDC -using the krbtgts in -.Fa ccache . -The credential is returned in -.Fa out_creds -and should be freed using the function -.Fn krb5_free_creds . -.Pp -The structure -.Li krb5_get_creds_opt -controls the behavior of -.Fn krb5_get_creds . -The structure is opaque to consumers that can set the content of the -structure with accessors functions. All accessor functions make copies -of the data that is passed into accessor functions, so external -consumers free the memory before calling -.Fn krb5_get_creds . -.Pp -The structure -.Li krb5_get_creds_opt -is allocated with -.Fn krb5_get_creds_opt_alloc -and freed with -.Fn krb5_get_creds_opt_free . -The free function also frees the content of the structure set by the -accessor functions. -.Pp -.Fn krb5_get_creds_opt_add_options -and -.Fn krb5_get_creds_opt_set_options -adds and sets options to the -.Fi krb5_get_creds_opt -structure . -The possible options to set are -.Bl -tag -width "KRB5_GC_USER_USER" -compact -.It KRB5_GC_CACHED -Only check the -.Fa ccache , -don't got out on network to fetch credential. -.It KRB5_GC_USER_USER -request a user to user ticket. -This options doesn't store the resulting user to user credential in -the -.Fa ccache . -.It KRB5_GC_EXPIRED_OK -returns the credential even if it is expired, default behavior is trying -to refetch the credential from the KDC. -.It KRB5_GC_NO_STORE -Do not store the resulting credentials in the -.Fa ccache . -.El -.Pp -.Fn krb5_get_creds_opt_set_enctype -sets the preferred encryption type of the application. Don't set this -unless you have to since if there is no match in the KDC, the function -call will fail. -.Pp -.Fn krb5_get_creds_opt_set_impersonate -sets the principal to impersonate., Returns a ticket that have the -impersonation principal as a client and the requestor as the -service. Note that the requested principal have to be the same as the -client principal in the krbtgt. -.Pp -.Fn krb5_get_creds_opt_set_ticket -sets the extra ticket used in user-to-user or contrained delegation use case. -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_get_credentials 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_get_forwarded_creds.3 b/kerberosV/src/lib/krb5/krb5_get_forwarded_creds.3 deleted file mode 100644 index 25707221d6d..00000000000 --- a/kerberosV/src/lib/krb5/krb5_get_forwarded_creds.3 +++ /dev/null @@ -1,79 +0,0 @@ -.\" Copyright (c) 2004 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: krb5_get_forwarded_creds.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd July 26, 2004 -.Dt KRB5_GET_FORWARDED_CREDS 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_get_forwarded_creds , -.Nm krb5_fwd_tgt_creds -.Nd get forwarded credentials from the KDC -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_get_forwarded_creds -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "krb5_ccache ccache" -.Fa "krb5_flags flags" -.Fa "const char *hostname" -.Fa "krb5_creds *in_creds" -.Fa "krb5_data *out_data" -.Fc -.Ft krb5_error_code -.Fo krb5_fwd_tgt_creds -.Fa "krb5_context context" -.Fa "krb5_auth_context auth_context" -.Fa "const char *hostname" -.Fa "krb5_principal client" -.Fa "krb5_principal server" -.Fa "krb5_ccache ccache" -.Fa "int forwardable" -.Fa "krb5_data *out_data" -.Fc -.Sh DESCRIPTION -.Fn krb5_get_forwarded_creds -and -.Fn krb5_fwd_tgt_creds -get tickets forwarded to -.Fa hostname. -If the tickets that are forwarded are address-less, the forwarded -tickets will also be address-less, otherwise -.Fa hostname -will be used for figure out the address to forward the ticket too. -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_get_credentials 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_get_in_cred.3 b/kerberosV/src/lib/krb5/krb5_get_in_cred.3 deleted file mode 100644 index 30804d30bb9..00000000000 --- a/kerberosV/src/lib/krb5/krb5_get_in_cred.3 +++ /dev/null @@ -1,274 +0,0 @@ -.\" Copyright (c) 2003 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: krb5_get_in_cred.3,v 1.4 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 31, 2003 -.Dt KRB5_GET_IN_TKT 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_get_in_tkt , -.Nm krb5_get_in_cred , -.Nm krb5_get_in_tkt_with_password , -.Nm krb5_get_in_tkt_with_keytab , -.Nm krb5_get_in_tkt_with_skey , -.Nm krb5_free_kdc_rep , -.Nm krb5_password_key_proc -.Nd deprecated initial authentication functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Ft krb5_error_code -.Fo krb5_get_in_tkt -.Fa "krb5_context context" -.Fa "krb5_flags options" -.Fa "const krb5_addresses *addrs" -.Fa "const krb5_enctype *etypes" -.Fa "const krb5_preauthtype *ptypes" -.Fa "krb5_key_proc key_proc" -.Fa "krb5_const_pointer keyseed" -.Fa "krb5_decrypt_proc decrypt_proc" -.Fa "krb5_const_pointer decryptarg" -.Fa "krb5_creds *creds" -.Fa "krb5_ccache ccache" -.Fa "krb5_kdc_rep *ret_as_reply" -.Fc -.Ft krb5_error_code -.Fo krb5_get_in_cred -.Fa "krb5_context context" -.Fa "krb5_flags options" -.Fa "const krb5_addresses *addrs" -.Fa "const krb5_enctype *etypes" -.Fa "const krb5_preauthtype *ptypes" -.Fa "const krb5_preauthdata *preauth" -.Fa "krb5_key_proc key_proc" -.Fa "krb5_const_pointer keyseed" -.Fa "krb5_decrypt_proc decrypt_proc" -.Fa "krb5_const_pointer decryptarg" -.Fa "krb5_creds *creds" -.Fa "krb5_kdc_rep *ret_as_reply" -.Fc -.Ft krb5_error_code -.Fo krb5_get_in_tkt_with_password -.Fa "krb5_context context" -.Fa "krb5_flags options" -.Fa "krb5_addresses *addrs" -.Fa "const krb5_enctype *etypes" -.Fa "const krb5_preauthtype *pre_auth_types" -.Fa "const char *password" -.Fa "krb5_ccache ccache" -.Fa "krb5_creds *creds" -.Fa "krb5_kdc_rep *ret_as_reply" -.Fc -.Ft krb5_error_code -.Fo krb5_get_in_tkt_with_keytab -.Fa "krb5_context context" -.Fa "krb5_flags options" -.Fa "krb5_addresses *addrs" -.Fa "const krb5_enctype *etypes" -.Fa "const krb5_preauthtype *pre_auth_types" -.Fa "krb5_keytab keytab" -.Fa "krb5_ccache ccache" -.Fa "krb5_creds *creds" -.Fa "krb5_kdc_rep *ret_as_reply" -.Fc -.Ft krb5_error_code -.Fo krb5_get_in_tkt_with_skey -.Fa "krb5_context context" -.Fa "krb5_flags options" -.Fa "krb5_addresses *addrs" -.Fa "const krb5_enctype *etypes" -.Fa "const krb5_preauthtype *pre_auth_types" -.Fa "const krb5_keyblock *key" -.Fa "krb5_ccache ccache" -.Fa "krb5_creds *creds" -.Fa "krb5_kdc_rep *ret_as_reply" -.Fc -.Ft krb5_error_code -.Fo krb5_free_kdc_rep -.Fa "krb5_context context" -.Fa "krb5_kdc_rep *rep" -.Fc -.Ft krb5_error_code -.Fo krb5_password_key_proc -.Fa "krb5_context context" -.Fa "krb5_enctype type" -.Fa "krb5_salt salt" -.Fa "krb5_const_pointer keyseed" -.Fa "krb5_keyblock **key" -.Fc -.Sh DESCRIPTION -.Bf Em -All the functions in this manual page are deprecated in the MIT -implementation, and will soon be deprecated in Heimdal too, don't use them. -.Ef -.Pp -Getting initial credential ticket for a principal. -.Nm krb5_get_in_cred -is the function all other krb5_get_in function uses to fetch tickets. -The other krb5_get_in function are more specialized and therefor -somewhat easier to use. -.Pp -If your need is only to verify a user and password, consider using -.Xr krb5_verify_user 3 -instead, it have a much simpler interface. -.Pp -.Nm krb5_get_in_tkt -and -.Nm krb5_get_in_cred -fetches initial credential, queries after key using the -.Fa key_proc -argument. -The differences between the two function is that -.Nm krb5_get_in_tkt -stores the credential in a -.Li krb5_creds -while -.Nm krb5_get_in_cred -stores the credential in a -.Li krb5_ccache . -.Pp -.Nm krb5_get_in_tkt_with_password , -.Nm krb5_get_in_tkt_with_keytab , -and -.Nm krb5_get_in_tkt_with_skey -does the same work as -.Nm krb5_get_in_cred -but are more specialized. -.Pp -.Nm krb5_get_in_tkt_with_password -uses the clients password to authenticate. -If the password argument is -.Dv NULL -the user user queried with the default password query function. -.Pp -.Nm krb5_get_in_tkt_with_keytab -searches the given keytab for a service entry for the client principal. -If the keytab is -.Dv NULL -the default keytab is used. -.Pp -.Nm krb5_get_in_tkt_with_skey -uses a key to get the initial credential. -.Pp -There are some common arguments to the krb5_get_in functions, these are: -.Pp -.Fa options -are the -.Dv KDC_OPT -flags. -.Pp -.Fa etypes -is a -.Dv NULL -terminated array of encryption types that the client approves. -.Pp -.Fa addrs -a list of the addresses that the initial ticket. -If it is -.Dv NULL -the list will be generated by the library. -.Pp -.Fa pre_auth_types -a -.Dv NULL -terminated array of pre-authentication types. -If -.Fa pre_auth_types -is -.Dv NULL -the function will try without pre-authentication and return those -pre-authentication that the KDC returned. -.Pp -.Fa ret_as_reply -will (if not -.Dv NULL ) -be filled in with the response of the KDC and should be free with -.Fn krb5_free_kdc_rep . -.Pp -.Fa key_proc -is a pointer to a function that should return a key salted appropriately. -Using -.Dv NULL -will use the default password query function. -.Pp -.Fa decrypt_proc -Using -.Dv NULL -will use the default decryption function. -.Pp -.Fa decryptarg -will be passed to the decryption function -.Fa decrypt_proc . -.Pp -.Fa creds -creds should be filled in with the template for a credential that -should be requested. -The client and server elements of the creds structure must be filled in. -Upon return of the function it will be contain the content of the -requested credential -.Fa ( krb5_get_in_cred ) , -or it will be freed with -.Xr krb5_free_creds 3 -(all the other krb5_get_in functions). -.Pp -.Fa ccache -will store the credential in the credential cache -.Fa ccache . -The credential cache will not be initialized, thats up the the caller. -.Pp -.Nm krb5_password_key_proc -is a library function that is suitable using as the -.Fa krb5_key_proc -argument to -.Nm krb5_get_in_cred -or -.Nm krb5_get_in_tkt . -.Fa keyseed -should be a pointer to a -.Dv NUL -terminated string or -.Dv NULL . -.Nm krb5_password_key_proc -will query the user for the pass on the console if the password isn't -given as the argument -.Fa keyseed . -.Pp -.Fn krb5_free_kdc_rep -frees the content of -.Fa rep . -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_verify_user 3 , -.Xr krb5.conf 5 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_get_init_creds.3 b/kerberosV/src/lib/krb5/krb5_get_init_creds.3 deleted file mode 100644 index 49615a5140f..00000000000 --- a/kerberosV/src/lib/krb5/krb5_get_init_creds.3 +++ /dev/null @@ -1,398 +0,0 @@ -.\" Copyright (c) 2003 - 2007 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: krb5_get_init_creds.3,v 1.5 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd Sep 16, 2006 -.Dt KRB5_GET_INIT_CREDS 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_get_init_creds , -.Nm krb5_get_init_creds_keytab , -.Nm krb5_get_init_creds_opt , -.Nm krb5_get_init_creds_opt_alloc , -.Nm krb5_get_init_creds_opt_free , -.Nm krb5_get_init_creds_opt_init , -.Nm krb5_get_init_creds_opt_set_address_list , -.Nm krb5_get_init_creds_opt_set_addressless , -.Nm krb5_get_init_creds_opt_set_anonymous , -.Nm krb5_get_init_creds_opt_set_default_flags , -.Nm krb5_get_init_creds_opt_set_etype_list , -.Nm krb5_get_init_creds_opt_set_forwardable , -.Nm krb5_get_init_creds_opt_set_pa_password , -.Nm krb5_get_init_creds_opt_set_paq_request , -.Nm krb5_get_init_creds_opt_set_preauth_list , -.Nm krb5_get_init_creds_opt_set_proxiable , -.Nm krb5_get_init_creds_opt_set_renew_life , -.Nm krb5_get_init_creds_opt_set_salt , -.Nm krb5_get_init_creds_opt_set_tkt_life , -.Nm krb5_get_init_creds_opt_set_canonicalize , -.Nm krb5_get_init_creds_opt_set_win2k , -.Nm krb5_get_init_creds_password , -.Nm krb5_prompt , -.Nm krb5_prompter_posix -.Nd Kerberos 5 initial authentication functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Ft krb5_get_init_creds_opt; -.Pp -.Ft krb5_error_code -.Fo krb5_get_init_creds_opt_alloc -.Fa "krb5_context context" -.Fa "krb5_get_init_creds_opt **opt" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_free -.Fa "krb5_context context" -.Fa "krb5_get_init_creds_opt *opt" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_init -.Fa "krb5_get_init_creds_opt *opt" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_address_list -.Fa "krb5_get_init_creds_opt *opt" -.Fa "krb5_addresses *addresses" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_addressless -.Fa "krb5_get_init_creds_opt *opt" -.Fa "krb5_boolean addressless" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_anonymous -.Fa "krb5_get_init_creds_opt *opt" -.Fa "int anonymous" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_default_flags -.Fa "krb5_context context" -.Fa "const char *appname" -.Fa "krb5_const_realm realm" -.Fa "krb5_get_init_creds_opt *opt" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_etype_list -.Fa "krb5_get_init_creds_opt *opt" -.Fa "krb5_enctype *etype_list" -.Fa "int etype_list_length" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_forwardable -.Fa "krb5_get_init_creds_opt *opt" -.Fa "int forwardable" -.Fc -.Ft krb5_error_code -.Fo krb5_get_init_creds_opt_set_pa_password -.Fa "krb5_context context" -.Fa "krb5_get_init_creds_opt *opt" -.Fa "const char *password" -.Fa "krb5_s2k_proc key_proc" -.Fc -.Ft krb5_error_code -.Fo krb5_get_init_creds_opt_set_paq_request -.Fa "krb5_context context" -.Fa "krb5_get_init_creds_opt *opt" -.Fa "krb5_boolean req_pac" -.Fc -.Ft krb5_error_code -.Fo krb5_get_init_creds_opt_set_pkinit -.Fa "krb5_context context" -.Fa "krb5_get_init_creds_opt *opt" -.Fa "const char *cert_file" -.Fa "const char *key_file" -.Fa "const char *x509_anchors" -.Fa "int flags" -.Fa "char *password" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_preauth_list -.Fa "krb5_get_init_creds_opt *opt" -.Fa "krb5_preauthtype *preauth_list" -.Fa "int preauth_list_length" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_proxiable -.Fa "krb5_get_init_creds_opt *opt" -.Fa "int proxiable" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_renew_life -.Fa "krb5_get_init_creds_opt *opt" -.Fa "krb5_deltat renew_life" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_salt -.Fa "krb5_get_init_creds_opt *opt" -.Fa "krb5_data *salt" -.Fc -.Ft void -.Fo krb5_get_init_creds_opt_set_tkt_life -.Fa "krb5_get_init_creds_opt *opt" -.Fa "krb5_deltat tkt_life" -.Fc -.Ft krb5_error_code -.Fo krb5_get_init_creds_opt_set_canonicalize -.Fa "krb5_context context" -.Fa "krb5_get_init_creds_opt *opt" -.Fa "krb5_boolean req" -.Fc -.Ft krb5_error_code -.Fo krb5_get_init_creds_opt_set_win2k -.Fa "krb5_context context" -.Fa "krb5_get_init_creds_opt *opt" -.Fa "krb5_boolean req" -.Fc -.Ft krb5_error_code -.Fo krb5_get_init_creds -.Fa "krb5_context context" -.Fa "krb5_creds *creds" -.Fa "krb5_principal client" -.Fa "krb5_prompter_fct prompter" -.Fa "void *prompter_data" -.Fa "krb5_deltat start_time" -.Fa "const char *in_tkt_service" -.Fa "krb5_get_init_creds_opt *options" -.Fc -.Ft krb5_error_code -.Fo krb5_get_init_creds_password -.Fa "krb5_context context" -.Fa "krb5_creds *creds" -.Fa "krb5_principal client" -.Fa "const char *password" -.Fa "krb5_prompter_fct prompter" -.Fa "void *prompter_data" -.Fa "krb5_deltat start_time" -.Fa "const char *in_tkt_service" -.Fa "krb5_get_init_creds_opt *in_options" -.Fc -.Ft krb5_error_code -.Fo krb5_get_init_creds_keytab -.Fa "krb5_context context" -.Fa "krb5_creds *creds" -.Fa "krb5_principal client" -.Fa "krb5_keytab keytab" -.Fa "krb5_deltat start_time" -.Fa "const char *in_tkt_service" -.Fa "krb5_get_init_creds_opt *options" -.Fc -.Ft int -.Fo krb5_prompter_posix -.Fa "krb5_context context" -.Fa "void *data" -.Fa "const char *name" -.Fa "const char *banner" -.Fa "int num_prompts" -.Fa "krb5_prompt prompts[]" -.Fc -.Sh DESCRIPTION -Getting initial credential ticket for a principal. -That may include changing an expired password, and doing preauthentication. -This interface that replaces the deprecated -.Fa krb5_in_tkt -and -.Fa krb5_in_cred -functions. -.Pp -If you only want to verify a username and password, consider using -.Xr krb5_verify_user 3 -instead, since it also verifies that initial credentials with using a -keytab to make sure the response was from the KDC. -.Pp -First a -.Li krb5_get_init_creds_opt -structure is initialized -with -.Fn krb5_get_init_creds_opt_alloc -or -.Fn krb5_get_init_creds_opt_init . -.Fn krb5_get_init_creds_opt_alloc -allocates a extendible structures that needs to be freed with -.Fn krb5_get_init_creds_opt_free . -The structure may be modified by any of the -.Fn krb5_get_init_creds_opt_set -functions to change request parameters and authentication information. -.Pp -If the caller want to use the default options, -.Dv NULL -can be passed instead. -.Pp -The the actual request to the KDC is done by any of the -.Fn krb5_get_init_creds , -.Fn krb5_get_init_creds_password , -or -.Fn krb5_get_init_creds_keytab -functions. -.Fn krb5_get_init_creds -is the least specialized function and can, with the right in data, -behave like the latter two. -The latter two are there for compatibility with older releases and -they are slightly easier to use. -.Pp -.Li krb5_prompt -is a structure containing the following elements: -.Bd -literal -typedef struct { - const char *prompt; - int hidden; - krb5_data *reply; - krb5_prompt_type type -} krb5_prompt; -.Ed -.Pp -.Fa prompt -is the prompt that should shown to the user -If -.Fa hidden -is set, the prompter function shouldn't echo the output to the display -device. -.Fa reply -must be preallocated; it will not be allocated by the prompter -function. -Possible values for the -.Fa type -element are: -.Pp -.Bl -tag -width Ds -compact -offset indent -.It KRB5_PROMPT_TYPE_PASSWORD -.It KRB5_PROMPT_TYPE_NEW_PASSWORD -.It KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN -.It KRB5_PROMPT_TYPE_PREAUTH -.It KRB5_PROMPT_TYPE_INFO -.El -.Pp -.Fn krb5_prompter_posix -is the default prompter function in a POSIX environment. -It matches the -.Fa krb5_prompter_fct -and can be used in the -.Fa krb5_get_init_creds -functions. -.Fn krb5_prompter_posix -doesn't require -.Fa prompter_data. -.Pp -If the -.Fa start_time -is zero, then the requested ticket will be valid -beginning immediately. -Otherwise, the -.Fa start_time -indicates how far in the future the ticket should be postdated. -.Pp -If the -.Fa in_tkt_service -name is -.Dv non-NULL , -that principal name will be -used as the server name for the initial ticket request. -The realm of the name specified will be ignored and will be set to the -realm of the client name. -If no in_tkt_service name is specified, -krbtgt/CLIENT-REALM@CLIENT-REALM will be used. -.Pp -For the rest of arguments, a configuration or library default will be -used if no value is specified in the options structure. -.Pp -.Fn krb5_get_init_creds_opt_set_address_list -sets the list of -.Fa addresses -that is should be stored in the ticket. -.Pp -.Fn krb5_get_init_creds_opt_set_addressless -controls if the ticket is requested with addresses or not, -.Fn krb5_get_init_creds_opt_set_address_list -overrides this option. -.Pp -.Fn krb5_get_init_creds_opt_set_anonymous -make the request anonymous if the -.Fa anonymous -parameter is non-zero. -.Pp -.Fn krb5_get_init_creds_opt_set_default_flags -sets the default flags using the configuration file. -.Pp -.Fn krb5_get_init_creds_opt_set_etype_list -set a list of enctypes that the client is willing to support in the -request. -.Pp -.Fn krb5_get_init_creds_opt_set_forwardable -request a forwardable ticket. -.Pp -.Fn krb5_get_init_creds_opt_set_pa_password -set the -.Fa password -and -.Fa key_proc -that is going to be used to get a new ticket. -.Fa password -or -.Fa key_proc -can be -.Dv NULL -if the caller wants to use the default values. -If the -.Fa password -is unset and needed, the user will be prompted for it. -.Pp -.Fn krb5_get_init_creds_opt_set_paq_request -sets the password that is going to be used to get a new ticket. -.Pp -.Fn krb5_get_init_creds_opt_set_preauth_list -sets the list of client-supported preauth types. -.Pp -.Fn krb5_get_init_creds_opt_set_proxiable -makes the request proxiable. -.Pp -.Fn krb5_get_init_creds_opt_set_renew_life -sets the requested renewable lifetime. -.Pp -.Fn krb5_get_init_creds_opt_set_salt -sets the salt that is going to be used in the request. -.Pp -.Fn krb5_get_init_creds_opt_set_tkt_life -sets requested ticket lifetime. -.Pp -.Fn krb5_get_init_creds_opt_set_canonicalize -requests that the KDC canonicalize the client pricipal if possible. -.Pp -.Fn krb5_get_init_creds_opt_set_win2k -turns on compatibility with Windows 2000. -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_creds 3 , -.Xr krb5_verify_user 3 , -.Xr krb5.conf 5 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_get_krbhst.3 b/kerberosV/src/lib/krb5/krb5_get_krbhst.3 deleted file mode 100644 index d3fc084fa64..00000000000 --- a/kerberosV/src/lib/krb5/krb5_get_krbhst.3 +++ /dev/null @@ -1,86 +0,0 @@ -.\" Copyright (c) 2001 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: krb5_get_krbhst.3,v 1.4 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd April 24, 2005 -.Dt KRB5_GET_KRBHST 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_get_krbhst , -.Nm krb5_get_krb_admin_hst , -.Nm krb5_get_krb_changepw_hst , -.Nm krb5_get_krb524hst , -.Nm krb5_free_krbhst -.Nd lookup Kerberos KDC hosts -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fn krb5_get_krbhst "krb5_context context" "const krb5_realm *realm" "char ***hostlist" -.Ft krb5_error_code -.Fn krb5_get_krb_admin_hst "krb5_context context" "const krb5_realm *realm" "char ***hostlist" -.Ft krb5_error_code -.Fn krb5_get_krb_changepw_hst "krb5_context context" "const krb5_realm *realm" "char ***hostlist" -.Ft krb5_error_code -.Fn krb5_get_krb524hst "krb5_context context" "const krb5_realm *realm" "char ***hostlist" -.Ft krb5_error_code -.Fn krb5_free_krbhst "krb5_context context" "char **hostlist" -.Sh DESCRIPTION -These functions implement the old API to get a list of Kerberos hosts, -and are thus similar to the -.Fn krb5_krbhst_init -functions. However, since these functions returns -.Em all -hosts in one go, they potentially have to do more lookups than -necessary. These functions remain for compatibility reasons. -.Pp -After a call to one of these functions, -.Fa hostlist -is a -.Dv NULL -terminated list of strings, pointing to the requested Kerberos hosts. These should be freed with -.Fn krb5_free_krbhst -when done with. -.Sh EXAMPLES -The following code will print the KDCs of the realm -.Dq MY.REALM . -.Bd -literal -offset indent -char **hosts, **p; -krb5_get_krbhst(context, "MY.REALM", &hosts); -for(p = hosts; *p; p++) - printf("%s\\n", *p); -krb5_free_krbhst(context, hosts); -.Ed -.\" .Sh BUGS -.Sh SEE ALSO -.Xr krb5_krbhst_init 3 diff --git a/kerberosV/src/lib/krb5/krb5_getportbyname.3 b/kerberosV/src/lib/krb5/krb5_getportbyname.3 deleted file mode 100644 index dbcb710af23..00000000000 --- a/kerberosV/src/lib/krb5/krb5_getportbyname.3 +++ /dev/null @@ -1,67 +0,0 @@ -.\" Copyright (c) 2004 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: krb5_getportbyname.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd August 15, 2004 -.Dt NAME 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_getportbyname -.Nd get port number by name -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft int -.Fo krb5_getportbyname -.Fa "krb5_context context" -.Fa "const char *service" -.Fa "const char *proto" -.Fa "int default_port" -.Fc -.Sh DESCRIPTION -.Fn krb5_getportbyname -gets the port number for -.Fa service / -.Fa proto -pair from the global service table for and returns it in network order. -If it isn't found in the global table, the -.Fa default_port -(given in host order) -is returned. -.Sh EXAMPLE -.Bd -literal -int port = krb5_getportbyname(context, "kerberos", "tcp", 88); -.Ed -.\" .Sh BUGS -.Sh SEE ALSO -.Xr krb5 3 diff --git a/kerberosV/src/lib/krb5/krb5_init_context.3 b/kerberosV/src/lib/krb5/krb5_init_context.3 deleted file mode 100644 index 995bd94d1d3..00000000000 --- a/kerberosV/src/lib/krb5/krb5_init_context.3 +++ /dev/null @@ -1,308 +0,0 @@ -.\" Copyright (c) 2001 - 2004 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: krb5_init_context.3,v 1.11 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd December 8, 2004 -.Dt KRB5_CONTEXT 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_add_et_list , -.Nm krb5_add_extra_addresses , -.Nm krb5_add_ignore_addresses , -.Nm krb5_context , -.Nm krb5_free_config_files , -.Nm krb5_free_context , -.Nm krb5_get_default_config_files , -.Nm krb5_get_dns_canonize_hostname , -.Nm krb5_get_extra_addresses , -.Nm krb5_get_fcache_version , -.Nm krb5_get_ignore_addresses , -.Nm krb5_get_kdc_sec_offset , -.Nm krb5_get_max_time_skew , -.Nm krb5_get_use_admin_kdc -.Nm krb5_init_context , -.Nm krb5_init_ets , -.Nm krb5_prepend_config_files , -.Nm krb5_prepend_config_files_default , -.Nm krb5_set_config_files , -.Nm krb5_set_dns_canonize_hostname , -.Nm krb5_set_extra_addresses , -.Nm krb5_set_fcache_version , -.Nm krb5_set_ignore_addresses , -.Nm krb5_set_max_time_skew , -.Nm krb5_set_use_admin_kdc , -.Nd create, modify and delete krb5_context structures -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Li "struct krb5_context;" -.Pp -.Ft krb5_error_code -.Fo krb5_init_context -.Fa "krb5_context *context" -.Fc -.Ft void -.Fo krb5_free_context -.Fa "krb5_context context" -.Fc -.Ft void -.Fo krb5_init_ets -.Fa "krb5_context context" -.Fc -.Ft krb5_error_code -.Fo krb5_add_et_list -.Fa "krb5_context context" -.Fa "void (*func)(struct et_list **)" -.Fc -.Ft krb5_error_code -.Fo krb5_add_extra_addresses -.Fa "krb5_context context" -.Fa "krb5_addresses *addresses" -.Fc -.Ft krb5_error_code -.Fo krb5_set_extra_addresses -.Fa "krb5_context context" -.Fa "const krb5_addresses *addresses" -.Fc -.Ft krb5_error_code -.Fo krb5_get_extra_addresses -.Fa "krb5_context context" -.Fa "krb5_addresses *addresses" -.Fc -.Ft krb5_error_code -.Fo krb5_add_ignore_addresses -.Fa "krb5_context context" -.Fa "krb5_addresses *addresses" -.Fc -.Ft krb5_error_code -.Fo krb5_set_ignore_addresses -.Fa "krb5_context context" -.Fa "const krb5_addresses *addresses" -.Fc -.Ft krb5_error_code -.Fo krb5_get_ignore_addresses -.Fa "krb5_context context" -.Fa "krb5_addresses *addresses" -.Fc -.Ft krb5_error_code -.Fo krb5_set_fcache_version -.Fa "krb5_context context" -.Fa "int version" -.Fc -.Ft krb5_error_code -.Fo krb5_get_fcache_version -.Fa "krb5_context context" -.Fa "int *version" -.Fc -.Ft void -.Fo krb5_set_dns_canonize_hostname -.Fa "krb5_context context" -.Fa "krb5_boolean flag" -.Fc -.Ft krb5_boolean -.Fo krb5_get_dns_canonize_hostname -.Fa "krb5_context context" -.Fc -.Ft krb5_error_code -.Fo krb5_get_kdc_sec_offset -.Fa "krb5_context context" -.Fa "int32_t *sec" -.Fa "int32_t *usec" -.Fc -.Ft krb5_error_code -.Fo krb5_set_config_files -.Fa "krb5_context context" -.Fa "char **filenames" -.Fc -.Ft krb5_error_code -.Fo krb5_prepend_config_files -.Fa "const char *filelist" -.Fa "char **pq" -.Fa "char ***ret_pp" -.Fc -.Ft krb5_error_code -.Fo krb5_prepend_config_files_default -.Fa "const char *filelist" -.Fa "char ***pfilenames" -.Fc -.Ft krb5_error_code -.Fo krb5_get_default_config_files -.Fa "char ***pfilenames" -.Fc -.Ft void -.Fo krb5_free_config_files -.Fa "char **filenames" -.Fc -.Ft void -.Fo krb5_set_use_admin_kdc -.Fa "krb5_context context" -.Fa "krb5_boolean flag" -.Fc -.Ft krb5_boolean -.Fo krb5_get_use_admin_kdc -.Fa "krb5_context context" -.Fc -.Ft time_t -.Fo krb5_get_max_time_skew -.Fa "krb5_context context" -.Fc -.Ft krb5_error_code -.Fo krb5_set_max_time_skew -.Fa "krb5_context context" -.Fa "time_t time" -.Fc -.Sh DESCRIPTION -The -.Fn krb5_init_context -function initializes the -.Fa context -structure and reads the configuration file -.Pa /etc/krb5.conf . -.Pp -The structure should be freed by calling -.Fn krb5_free_context -when it is no longer being used. -.Pp -.Fn krb5_init_context -returns 0 to indicate success. -Otherwise an errno code is returned. -Failure means either that something bad happened during initialization -(typically -.Bq ENOMEM ) -or that Kerberos should not be used -.Bq ENXIO . -.Pp -.Fn krb5_init_ets -adds all -.Xr com_err 3 -libs to -.Fa context . -This is done by -.Fn krb5_init_context . -.Pp -.Fn krb5_add_et_list -adds a -.Xr com_err 3 -error-code handler -.Fa func -to the specified -.Fa context . -The error handler must generated by the the re-rentrant version of the -.Xr compile_et 1 -program. -.Fn krb5_add_extra_addresses -add a list of addresses that should be added when requesting tickets. -.Pp -.Fn krb5_add_ignore_addresses -add a list of addresses that should be ignored when requesting tickets. -.Pp -.Fn krb5_get_extra_addresses -get the list of addresses that should be added when requesting tickets. -.Pp -.Fn krb5_get_ignore_addresses -get the list of addresses that should be ignored when requesting tickets. -.Pp -.Fn krb5_set_ignore_addresses -set the list of addresses that should be ignored when requesting tickets. -.Pp -.Fn krb5_set_extra_addresses -set the list of addresses that should be added when requesting tickets. -.Pp -.Fn krb5_set_fcache_version -sets the version of file credentials caches that should be used. -.Pp -.Fn krb5_get_fcache_version -gets the version of file credentials caches that should be used. -.Pp -.Fn krb5_set_dns_canonize_hostname -sets if the context is configured to canonicalize hostnames using DNS. -.Pp -.Fn krb5_get_dns_canonize_hostname -returns if the context is configured to canonicalize hostnames using DNS. -.Pp -.Fn krb5_get_kdc_sec_offset -returns the offset between the localtime and the KDC's time. -.Fa sec -and -.Fa usec -are both optional argument and -.Dv NULL -can be passed in. -.Pp -.Fn krb5_set_config_files -set the list of configuration files to use and re-initialize the -configuration from the files. -.Pp -.Fn krb5_prepend_config_files -parse the -.Fa filelist -and prepend the result to the already existing list -.Fa pq -The result is returned in -.Fa ret_pp -and should be freed with -.Fn krb5_free_config_files . -.Pp -.Fn krb5_prepend_config_files_default -parse the -.Fa filelist -and append that to the default -list of configuration files. -.Pp -.Fn krb5_get_default_config_files -get a list of default configuration files. -.Pp -.Fn krb5_free_config_files -free a list of configuration files returned by -.Fn krb5_get_default_config_files , -.Fn krb5_prepend_config_files_default , -or -.Fn krb5_prepend_config_files . -.Pp -.Fn krb5_set_use_admin_kdc -sets if all KDC requests should go admin KDC. -.Pp -.Fn krb5_get_use_admin_kdc -gets if all KDC requests should go admin KDC. -.Pp -.Fn krb5_get_max_time_skew -and -.Fn krb5_set_max_time_skew -get and sets the maximum allowed time skew between client and server. -.Sh SEE ALSO -.Xr errno 2 , -.Xr krb5 3 , -.Xr krb5_config 3 , -.Xr krb5_context 3 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_is_thread_safe.3 b/kerberosV/src/lib/krb5/krb5_is_thread_safe.3 deleted file mode 100644 index f47a0ef6cac..00000000000 --- a/kerberosV/src/lib/krb5/krb5_is_thread_safe.3 +++ /dev/null @@ -1,58 +0,0 @@ -.\" Copyright (c) 2005 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: krb5_is_thread_safe.3,v 1.5 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 5, 2006 -.Dt KRB5_IS_THREAD_SAFE 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_is_thread_safe -.Nd "is the Kerberos library compiled with multithread support" -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_boolean -.Fn krb5_is_thread_safe "void" -.Sh DESCRIPTION -.Nm -returns -.Dv TRUE -if the library was compiled with with multithread support. -If the library isn't compiled, the consumer have to use a global lock -to make sure Kerboros functions are not called at the same time by -different threads. -.\" .Sh EXAMPLE -.\" .Sh BUGS -.Sh SEE ALSO -.Xr krb5_create_checksum 3 , -.Xr krb5_encrypt 3 diff --git a/kerberosV/src/lib/krb5/krb5_krbhst_init.3 b/kerberosV/src/lib/krb5/krb5_krbhst_init.3 deleted file mode 100644 index 8ca95278cfe..00000000000 --- a/kerberosV/src/lib/krb5/krb5_krbhst_init.3 +++ /dev/null @@ -1,174 +0,0 @@ -.\" Copyright (c) 2001-2005 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: krb5_krbhst_init.3,v 1.4 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 10, 2005 -.Dt KRB5_KRBHST_INIT 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_krbhst_init , -.Nm krb5_krbhst_init_flags , -.Nm krb5_krbhst_next , -.Nm krb5_krbhst_next_as_string , -.Nm krb5_krbhst_reset , -.Nm krb5_krbhst_free , -.Nm krb5_krbhst_format_string , -.Nm krb5_krbhst_get_addrinfo -.Nd lookup Kerberos KDC hosts -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fn krb5_krbhst_init "krb5_context context" "const char *realm" "unsigned int type" "krb5_krbhst_handle *handle" -.Ft krb5_error_code -.Fn krb5_krbhst_init_flags "krb5_context context" "const char *realm" "unsigned int type" "int flags" "krb5_krbhst_handle *handle" -.Ft krb5_error_code -.Fn "krb5_krbhst_next" "krb5_context context" "krb5_krbhst_handle handle" "krb5_krbhst_info **host" -.Ft krb5_error_code -.Fn krb5_krbhst_next_as_string "krb5_context context" "krb5_krbhst_handle handle" "char *hostname" "size_t hostlen" -.Ft void -.Fn krb5_krbhst_reset "krb5_context context" "krb5_krbhst_handle handle" -.Ft void -.Fn krb5_krbhst_free "krb5_context context" "krb5_krbhst_handle handle" -.Ft krb5_error_code -.Fn krb5_krbhst_format_string "krb5_context context" "const krb5_krbhst_info *host" "char *hostname" "size_t hostlen" -.Ft krb5_error_code -.Fn krb5_krbhst_get_addrinfo "krb5_context context" "krb5_krbhst_info *host" "struct addrinfo **ai" -.Sh DESCRIPTION -These functions are used to sequence through all Kerberos hosts of a -particular realm and service. The service type can be the KDCs, the -administrative servers, the password changing servers, or the servers -for Kerberos 4 ticket conversion. -.Pp -First a handle to a particular service is obtained by calling -.Fn krb5_krbhst_init -(or -.Fn krb5_krbhst_init_flags ) -with the -.Fa realm -of interest and the type of service to lookup. The -.Fa type -can be one of: -.Pp -.Bl -tag -width Ds -compact -offset indent -.It KRB5_KRBHST_KDC -.It KRB5_KRBHST_ADMIN -.It KRB5_KRBHST_CHANGEPW -.It KRB5_KRBHST_KRB524 -.El -.Pp -The -.Fa handle -is returned to the caller, and should be passed to the other -functions. -.Pp -The -.Fa flag -argument to -.Nm krb5_krbhst_init_flags -is the same flags as -.Fn krb5_send_to_kdc_flags -uses. -Possible values are: -.Pp -.Bl -tag -width KRB5_KRBHST_FLAGS_LARGE_MSG -compact -offset indent -.It KRB5_KRBHST_FLAGS_MASTER -only talk to master (readwrite) KDC -.It KRB5_KRBHST_FLAGS_LARGE_MSG -this is a large message, so use transport that can handle that. -.El -.Pp -For each call to -.Fn krb5_krbhst_next -information on a new host is returned. The former function returns in -.Fa host -a pointer to a structure containing information about the host, such -as protocol, hostname, and port: -.Bd -literal -offset indent -typedef struct krb5_krbhst_info { - enum { KRB5_KRBHST_UDP, - KRB5_KRBHST_TCP, - KRB5_KRBHST_HTTP } proto; - unsigned short port; - struct addrinfo *ai; - struct krb5_krbhst_info *next; - char hostname[1]; -} krb5_krbhst_info; -.Ed -.Pp -The related function, -.Fn krb5_krbhst_next_as_string , -return the same information as a URL-like string. -.Pp -When there are no more hosts, these functions return -.Dv KRB5_KDC_UNREACH . -.Pp -To re-iterate over all hosts, call -.Fn krb5_krbhst_reset -and the next call to -.Fn krb5_krbhst_next -will return the first host. -.Pp -When done with the handle, -.Fn krb5_krbhst_free -should be called. -.Pp -To use a -.Va krb5_krbhst_info , -there are two functions: -.Fn krb5_krbhst_format_string -that will return a printable representation of that struct -and -.Fn krb5_krbhst_get_addrinfo -that will return a -.Va struct addrinfo -that can then be used for communicating with the server mentioned. -.Sh EXAMPLES -The following code will print the KDCs of the realm -.Dq MY.REALM : -.Bd -literal -offset indent -krb5_krbhst_handle handle; -char host[MAXHOSTNAMELEN]; -krb5_krbhst_init(context, "MY.REALM", KRB5_KRBHST_KDC, &handle); -while(krb5_krbhst_next_as_string(context, handle, - host, sizeof(host)) == 0) - printf("%s\\n", host); -krb5_krbhst_free(context, handle); -.Ed -.\" .Sh BUGS -.Sh SEE ALSO -.Xr getaddrinfo 3 , -.Xr krb5_get_krbhst 3 , -.Xr krb5_send_to_kdc_flags 3 -.Sh HISTORY -These functions first appeared in Heimdal 0.3g. diff --git a/kerberosV/src/lib/krb5/krb5_locl.h b/kerberosV/src/lib/krb5/krb5_locl.h deleted file mode 100644 index e726776cf1d..00000000000 --- a/kerberosV/src/lib/krb5/krb5_locl.h +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright (c) 1997-2006 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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: krb5_locl.h,v 1.10 2014/04/18 09:47:36 ajacoutot Exp $ */ - -#ifndef __KRB5_LOCL_H__ -#define __KRB5_LOCL_H__ - -#include - -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_POLL_H -#include -#endif - -#include - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_MMAN_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif - -#if defined(HAVE_SYS_IOCTL_H) && SunOS != 40 -#include -#endif -#ifdef HAVE_PWD_H -#undef _POSIX_PTHREAD_SEMANTICS -/* This gets us the 5-arg getpwnam_r on Solaris 9. */ -#define _POSIX_PTHREAD_SEMANTICS -#include -#endif - -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_SYS_SELECT_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef _AIX -struct ether_addr; -struct mbuf; -struct sockaddr_dl; -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_SYS_UIO_H -#include -#endif -#ifdef HAVE_SYS_FILIO_H -#include -#endif -#ifdef HAVE_SYS_FILE_H -#include -#endif - -#include - -#include - -#define HEIMDAL_TEXTDOMAIN "heimdal_krb5" - -#ifdef LIBINTL -#include -#define N_(x,y) dgettext(HEIMDAL_TEXTDOMAIN, x) -#else -#define N_(x,y) (x) -#define bindtextdomain(package, localedir) -#endif - - -#ifdef HAVE_CRYPT_H -#undef des_encrypt -#define des_encrypt wingless_pigs_mostly_fail_to_fly -#include -#undef des_encrypt -#endif - -#ifdef HAVE_DOOR_CREATE -#include -#endif - -#include -#include -#include - -#include - -#define HC_DEPRECATED_CRYPTO -#include "crypto-headers.h" - - -#include - -struct send_to_kdc; - -/* XXX glue for pkinit */ -struct hx509_certs_data; -struct krb5_pk_identity; -struct krb5_pk_cert; -struct ContentInfo; -struct AlgorithmIdentifier; -typedef struct krb5_pk_init_ctx_data *krb5_pk_init_ctx; -struct krb5_dh_moduli; - -/* v4 glue */ -struct _krb5_krb_auth_data; - -#include - -#include -#include -#include -#ifdef PKINIT -#include -#endif - -#include "crypto.h" - -#include - -#include "heim_threads.h" - -#define ALLOC(X, N) (X) = calloc((N), sizeof(*(X))) -#define ALLOC_SEQ(X, N) do { (X)->len = (N); ALLOC((X)->val, (N)); } while(0) - -#ifndef __func__ -#define __func__ "unknown-function" -#endif - -#define krb5_einval(context, argnum) _krb5_einval((context), __func__, (argnum)) - -#ifndef PATH_SEP -#define PATH_SEP ":" -#endif - -/* should this be public? */ -#define KEYTAB_DEFAULT "FILE:" SYSCONFDIR "/krb5.keytab" -#define KEYTAB_DEFAULT_MODIFY "FILE:" SYSCONFDIR "/krb5.keytab" - - -#define MODULI_FILE SYSCONFDIR "/krb5.moduli" - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -#ifndef O_CLOEXEC -#define O_CLOEXEC 0 -#endif - -#ifndef SOCK_CLOEXEC -#define SOCK_CLOEXEC 0 -#endif - - -#define KRB5_BUFSIZ 2048 - -typedef enum { - KRB5_INIT_CREDS_TRISTATE_UNSET = 0, - KRB5_INIT_CREDS_TRISTATE_TRUE, - KRB5_INIT_CREDS_TRISTATE_FALSE -} krb5_get_init_creds_tristate; - -struct _krb5_get_init_creds_opt_private { - int refcount; - /* ENC_TIMESTAMP */ - const char *password; - krb5_s2k_proc key_proc; - /* PA_PAC_REQUEST */ - krb5_get_init_creds_tristate req_pac; - /* PKINIT */ - krb5_pk_init_ctx pk_init_ctx; - krb5_get_init_creds_tristate addressless; - int flags; -#define KRB5_INIT_CREDS_CANONICALIZE 1 -#define KRB5_INIT_CREDS_NO_C_CANON_CHECK 2 -#define KRB5_INIT_CREDS_NO_C_NO_EKU_CHECK 4 - struct { - krb5_gic_process_last_req func; - void *ctx; - } lr; -}; - -typedef uint32_t krb5_enctype_set; - -typedef struct krb5_context_data { - krb5_enctype *etypes; - krb5_enctype *etypes_des;/* deprecated */ - krb5_enctype *as_etypes; - krb5_enctype *tgs_etypes; - krb5_enctype *permitted_enctypes; - char **default_realms; - time_t max_skew; - time_t kdc_timeout; - unsigned max_retries; - int32_t kdc_sec_offset; - int32_t kdc_usec_offset; - krb5_config_section *cf; - struct et_list *et_list; - struct krb5_log_facility *warn_dest; - struct krb5_log_facility *debug_dest; - const krb5_cc_ops **cc_ops; - int num_cc_ops; - const char *http_proxy; - const char *time_fmt; - krb5_boolean log_utc; - const char *default_keytab; - const char *default_keytab_modify; - krb5_boolean use_admin_kdc; - krb5_addresses *extra_addresses; - krb5_boolean scan_interfaces; /* `ifconfig -a' */ - krb5_boolean srv_lookup; /* do SRV lookups */ - krb5_boolean srv_try_txt; /* try TXT records also */ - int32_t fcache_vno; /* create cache files w/ this - version */ - int num_kt_types; /* # of registered keytab types */ - struct krb5_keytab_data *kt_types; /* registered keytab types */ - const char *date_fmt; - char *error_string; - krb5_error_code error_code; - krb5_addresses *ignore_addresses; - char *default_cc_name; - char *default_cc_name_env; - int default_cc_name_set; - void *mutex; /* protects error_string/error_buf */ - int large_msg_size; - int flags; -#define KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME 1 -#define KRB5_CTX_F_CHECK_PAC 2 -#define KRB5_CTX_F_HOMEDIR_ACCESS 4 -#define KRB5_CTX_F_SOCKETS_INITIALIZED 8 -#define KRB5_CTX_F_RD_REQ_IGNORE 16 - struct send_to_kdc *send_to_kdc; -#ifdef PKINIT - hx509_context hx509ctx; -#endif -} krb5_context_data; - -#ifndef KRB5_USE_PATH_TOKENS -#define KRB5_DEFAULT_CCNAME_FILE "FILE:/tmp/krb5cc_%{uid}" -#else -#define KRB5_DEFAULT_CCNAME_FILE "FILE:%{TEMP}/krb5cc_%{uid}" -#endif -#define KRB5_DEFAULT_CCNAME_API "API:" -#define KRB5_DEFAULT_CCNAME_KCM_KCM "KCM:%{uid}" -#define KRB5_DEFAULT_CCNAME_KCM_API "API:%{uid}" - -#define EXTRACT_TICKET_ALLOW_CNAME_MISMATCH 1 -#define EXTRACT_TICKET_ALLOW_SERVER_MISMATCH 2 -#define EXTRACT_TICKET_MATCH_REALM 4 -#define EXTRACT_TICKET_AS_REQ 8 -#define EXTRACT_TICKET_TIMESYNC 16 - -/* - * Configurable options - */ - -#ifndef KRB5_DEFAULT_CCTYPE -#ifdef __APPLE__ -#define KRB5_DEFAULT_CCTYPE (&krb5_acc_ops) -#else -#define KRB5_DEFAULT_CCTYPE (&krb5_fcc_ops) -#endif -#endif - -#ifndef KRB5_ADDRESSLESS_DEFAULT -#define KRB5_ADDRESSLESS_DEFAULT TRUE -#endif - -#ifndef KRB5_FORWARDABLE_DEFAULT -#define KRB5_FORWARDABLE_DEFAULT TRUE -#endif - -#ifdef PKINIT - -struct krb5_pk_identity { - hx509_verify_ctx verify_ctx; - hx509_certs certs; - hx509_cert cert; - hx509_certs anchors; - hx509_certs certpool; - hx509_revoke_ctx revokectx; - int flags; -#define PKINIT_BTMM 1 -}; - -enum krb5_pk_type { - PKINIT_WIN2K = 1, - PKINIT_27 = 2 -}; - -#endif /* PKINIT */ - -#endif /* __KRB5_LOCL_H__ */ diff --git a/kerberosV/src/lib/krb5/krb5_mk_req.3 b/kerberosV/src/lib/krb5/krb5_mk_req.3 deleted file mode 100644 index 4431e1c9768..00000000000 --- a/kerberosV/src/lib/krb5/krb5_mk_req.3 +++ /dev/null @@ -1,187 +0,0 @@ -.\" Copyright (c) 2005 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: krb5_mk_req.3,v 1.1 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd August 27, 2005 -.Dt KRB5_MK_REQ 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_mk_req , -.Nm krb5_mk_req_exact , -.Nm krb5_mk_req_extended , -.Nm krb5_rd_req , -.Nm krb5_rd_req_with_keyblock , -.Nm krb5_mk_rep , -.Nm krb5_mk_rep_exact , -.Nm krb5_mk_rep_extended , -.Nm krb5_rd_rep , -.Nm krb5_build_ap_req , -.Nm krb5_verify_ap_req -.Nd create and read application authentication request -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_mk_req -.Fa "krb5_context context" -.Fa "krb5_auth_context *auth_context" -.Fa "const krb5_flags ap_req_options" -.Fa "const char *service" -.Fa "const char *hostname" -.Fa "krb5_data *in_data" -.Fa "krb5_ccache ccache" -.Fa "krb5_data *outbuf" -.Fc -.Ft krb5_error_code -.Fo krb5_mk_req_extended -.Fa "krb5_context context" -.Fa "krb5_auth_context *auth_context" -.Fa "const krb5_flags ap_req_options" -.Fa "krb5_data *in_data" -.Fa "krb5_creds *in_creds" -.Fa "krb5_data *outbuf" -.Fc -.Ft krb5_error_code -.Fo krb5_rd_req -.Fa "krb5_context context" -.Fa "krb5_auth_context *auth_context" -.Fa "const krb5_data *inbuf" -.Fa "krb5_const_principal server" -.Fa "krb5_keytab keytab" -.Fa "krb5_flags *ap_req_options" -.Fa "krb5_ticket **ticket" -.Fc -.Ft krb5_error_code -.Fo krb5_build_ap_req -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "krb5_creds *cred" -.Fa "krb5_flags ap_options" -.Fa "krb5_data authenticator" -.Fa "krb5_data *retdata" -.Fc -.Ft krb5_error_code -.Fo krb5_verify_ap_req -.Fa "krb5_context context" -.Fa "krb5_auth_context *auth_context" -.Fa "krb5_ap_req *ap_req" -.Fa "krb5_const_principal server" -.Fa "krb5_keyblock *keyblock" -.Fa "krb5_flags flags" -.Fa "krb5_flags *ap_req_options" -.Fa "krb5_ticket **ticket" -.Fc -.Sh DESCRIPTION -The functions documented in this manual page document the functions -that facilitates the exchange between a Kerberos client and server. -They are the core functions used in the authentication exchange -between the client and the server. -.Pp -The -.Nm krb5_mk_req -and -.Nm krb5_mk_req_extended -creates the Kerberos message -.Dv KRB_AP_REQ -that is sent from the client to the server as the first packet in a client/server exchange. The result that should be sent to server is stored in -.Fa outbuf . -.Pp -.Fa auth_context -should be allocated with -.Fn krb5_auth_con_init -or -.Dv NULL -passed in, in that case, it will be allocated and freed internally. -.Pp -The input data -.Fa in_data -will have a checksum calculated over it and checksum will be -transported in the message to the server. -.Pp -.Fa ap_req_options -can be set to one or more of the following flags: -.Pp -.Bl -tag -width indent -.It Dv AP_OPTS_USE_SESSION_KEY -Use the session key when creating the request, used for user to user -authentication. -.It Dv AP_OPTS_MUTUAL_REQUIRED -Mark the request as mutual authenticate required so that the receiver -returns a mutual authentication packet. -.El -.Pp -The -.Nm krb5_rd_req -read the AP_REQ in -.Fa inbuf -and verify and extract the content. -If -.Fa server -is specified, that server will be fetched from the -.Fa keytab -and used unconditionally. -If -.Fa server -is -.Dv NULL , -the -.Fa keytab -will be search for a matching principal. -.Pp -The -.Fa keytab -argument specifies what keytab to search for receiving principals. -The arguments -.Fa ap_req_options -and -.Fa ticket -returns the content. -.Pp -When the AS-REQ is a user to user request, neither of -.Fa keytab -or -.Fa principal -are used, instead -.Fn krb5_rd_req -expects the session key to be set in -.Fa auth_context . -.Pp -The -.Nm krb5_verify_ap_req -and -.Nm krb5_build_ap_req -both constructs and verify the AP_REQ message, should not be used by -external code. -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_mk_safe.3 b/kerberosV/src/lib/krb5/krb5_mk_safe.3 deleted file mode 100644 index 60a2c72cc7f..00000000000 --- a/kerberosV/src/lib/krb5/krb5_mk_safe.3 +++ /dev/null @@ -1,82 +0,0 @@ -.\" Copyright (c) 2003 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: krb5_mk_safe.3,v 1.3 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 1, 2006 -.Dt KRB5_MK_SAFE 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_mk_safe , -.Nm krb5_mk_priv -.Nd generates integrity protected and/or encrypted messages -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Ft krb5_error_code -.Fn krb5_mk_priv "krb5_context context" "krb5_auth_context auth_context" "const krb5_data *userdata" "krb5_data *outbuf" "krb5_replay_data *outdata" -.Ft krb5_error_code -.Fn krb5_mk_safe "krb5_context context" "krb5_auth_context auth_context" "const krb5_data *userdata" "krb5_data *outbuf" "krb5_replay_data *outdata" -.Sh DESCRIPTION -.Fn krb5_mk_safe -and -.Fn krb5_mk_priv -formats -.Li KRB-SAFE -(integrity protected) -and -.Li KRB-PRIV -(also encrypted) -messages into -.Fa outbuf . -The actual message data is taken from -.Fa userdata . -If the -.Dv KRB5_AUTH_CONTEXT_DO_SEQUENCE -or -.Dv KRB5_AUTH_CONTEXT_DO_TIME -flags are set in the -.Fa auth_context , -sequence numbers and time stamps are generated. -If the -.Dv KRB5_AUTH_CONTEXT_RET_SEQUENCE -or -.Dv KRB5_AUTH_CONTEXT_RET_TIME -flags are set -they are also returned in the -.Fa outdata -parameter. -.Sh SEE ALSO -.Xr krb5_auth_con_init 3 , -.Xr krb5_rd_priv 3 , -.Xr krb5_rd_safe 3 diff --git a/kerberosV/src/lib/krb5/krb5_openlog.3 b/kerberosV/src/lib/krb5/krb5_openlog.3 deleted file mode 100644 index cc50cc6dce0..00000000000 --- a/kerberosV/src/lib/krb5/krb5_openlog.3 +++ /dev/null @@ -1,242 +0,0 @@ -.\" Copyright (c) 1997, 1999, 2001 - 2002 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: krb5_openlog.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.Dd August 6, 1997 -.Dt KRB5_OPENLOG 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_initlog , -.Nm krb5_openlog , -.Nm krb5_closelog , -.Nm krb5_addlog_dest , -.Nm krb5_addlog_func , -.Nm krb5_log , -.Nm krb5_vlog , -.Nm krb5_log_msg , -.Nm krb5_vlog_msg -.Nd Heimdal logging functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft "typedef void" -.Fn "\*(lp*krb5_log_log_func_t\*(rp" "const char *time" "const char *message" "void *data" -.Ft "typedef void" -.Fn "\*(lp*krb5_log_close_func_t\*(rp" "void *data" -.Ft krb5_error_code -.Fn krb5_addlog_dest "krb5_context context" "krb5_log_facility *facility" "const char *destination" -.Ft krb5_error_code -.Fn krb5_addlog_func "krb5_context context" "krb5_log_facility *facility" "int min" "int max" "krb5_log_log_func_t log" "krb5_log_close_func_t close" "void *data" -.Ft krb5_error_code -.Fn krb5_closelog "krb5_context context" "krb5_log_facility *facility" -.Ft krb5_error_code -.Fn krb5_initlog "krb5_context context" "const char *program" "krb5_log_facility **facility" -.Ft krb5_error_code -.Fn krb5_log "krb5_context context" "krb5_log_facility *facility" "int level" "const char *format" "..." -.Ft krb5_error_code -.Fn krb5_log_msg "krb5_context context" "krb5_log_facility *facility" "char **reply" "int level" "const char *format" "..." -.Ft krb5_error_code -.Fn krb5_openlog "krb5_context context" "const char *program" "krb5_log_facility **facility" -.Ft krb5_error_code -.Fn krb5_vlog "krb5_context context" "krb5_log_facility *facility" "int level" "const char *format" "va_list arglist" -.Ft krb5_error_code -.Fn krb5_vlog_msg "krb5_context context" "krb5_log_facility *facility" "char **reply" "int level" "const char *format" "va_list arglist" -.Sh DESCRIPTION -These functions logs messages to one or more destinations. -.Pp -The -.Fn krb5_openlog -function creates a logging -.Fa facility , -that is used to log messages. A facility consists of one or more -destinations (which can be files or syslog or some other device). The -.Fa program -parameter should be the generic name of the program that is doing the -logging. This name is used to lookup which destinations to use. This -information is contained in the -.Li logging -section of the -.Pa krb5.conf -configuration file. If no entry is found for -.Fa program , -the entry for -.Li default -is used, or if that is missing too, -.Li SYSLOG -will be used as destination. -.Pp -To close a logging facility, use the -.Fn krb5_closelog -function. -.Pp -To log a message to a facility use one of the functions -.Fn krb5_log , -.Fn krb5_log_msg , -.Fn krb5_vlog , -or -.Fn krb5_vlog_msg . -The functions ending in -.Li _msg -return in -.Fa reply -a pointer to the message that just got logged. This string is allocated, -and should be freed with -.Fn free . -The -.Fa format -is a standard -.Fn printf -style format string (but see the BUGS section). -.Pp -If you want better control of where things gets logged, you can instead of using -.Fn krb5_openlog -call -.Fn krb5_initlog , -which just initializes a facility, but doesn't define any actual logging -destinations. You can then add destinations with the -.Fn krb5_addlog_dest -and -.Fn krb5_addlog_func -functions. The first of these takes a string specifying a logging -destination, and adds this to the facility. If you want to do some -non-standard logging you can use the -.Fn krb5_addlog_func -function, which takes a function to use when logging. -The -.Fa log -function is called for each message with -.Fa time -being a string specifying the current time, and -.Fa message -the message to log. -.Fa close -is called when the facility is closed. You can pass application specific data in the -.Fa data -parameter. The -.Fa min -and -.Fa max -parameter are the same as in a destination (defined below). To specify a -max of infinity, pass -1. -.Pp -.Fn krb5_openlog -calls -.Fn krb5_initlog -and then calls -.Fn krb5_addlog_dest -for each destination found. -.Ss Destinations -The defined destinations (as specified in -.Pa krb5.conf ) -follows: -.Bl -tag -width "xxx" -offset indent -.It Li STDERR -This logs to the program's stderr. -.It Li FILE: Ns Pa /file -.It Li FILE= Ns Pa /file -Log to the specified file. The form using a colon appends to the file, the -form with an equal truncates the file. The truncating form keeps the file -open, while the appending form closes it after each log message (which -makes it possible to rotate logs). The truncating form is mainly for -compatibility with the MIT libkrb5. -.It Li DEVICE= Ns Pa /device -This logs to the specified device, at present this is the same as -.Li FILE:/device . -.It Li CONSOLE -Log to the console, this is the same as -.Li DEVICE=/dev/console . -.It Li SYSLOG Ns Op :priority Ns Op :facility -Send messages to the syslog system, using priority, and facility. To -get the name for one of these, you take the name of the macro passed -to -.Xr syslog 3 , -and remove the leading -.Li LOG_ -.No ( Li LOG_NOTICE -becomes -.Li NOTICE ) . -The default values (as well as the values used for unrecognised -values), are -.Li ERR , -and -.Li AUTH , -respectively. See -.Xr syslog 3 -for a list of priorities and facilities. -.El -.Pp -Each destination may optionally be prepended with a range of logging -levels, specified as -.Li min-max/ . -If the -.Fa level -parameter to -.Fn krb5_log -is within this range (inclusive) the message gets logged to this -destination, otherwise not. Either of the min and max valued may be -omitted, in this case min is assumed to be zero, and max is assumed to be -infinity. If you don't include a dash, both min and max gets set to the -specified value. If no range is specified, all messages gets logged. -.Sh EXAMPLES -.Bd -literal -offset indent -[logging] - kdc = 0/FILE:/var/log/kdc.log - kdc = 1-/SYSLOG:INFO:USER - default = STDERR -.Ed -.Pp -This will log all messages from the -.Nm kdc -program with level 0 to -.Pa /var/log/kdc.log , -other messages will be logged to syslog with priority -.Li LOG_INFO , -and facility -.Li LOG_USER . -All other programs will log all messages to their stderr. -.Sh SEE ALSO -.Xr syslog 3 , -.Xr krb5.conf 5 -.Sh BUGS -These functions use -.Fn asprintf -to format the message. If your operating system does not have a working -.Fn asprintf , -a replacement will be used. At present this replacement does not handle -some correct conversion specifications (like floating point numbers). Until -this is fixed, the use of these conversions should be avoided. -.Pp -If logging is done to the syslog facility, these functions might not be -thread-safe, depending on the implementation of -.Fn openlog , -and -.Fn syslog . diff --git a/kerberosV/src/lib/krb5/krb5_parse_name.3 b/kerberosV/src/lib/krb5/krb5_parse_name.3 deleted file mode 100644 index 3431a6032f1..00000000000 --- a/kerberosV/src/lib/krb5/krb5_parse_name.3 +++ /dev/null @@ -1,68 +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: krb5_parse_name.3,v 1.3 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 1, 2006 -.Dt KRB5_PARSE_NAME 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_parse_name -.Nd string to principal conversion -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fn krb5_parse_name "krb5_context context" "const char *name" "krb5_principal *principal" -.Sh DESCRIPTION -.Fn krb5_parse_name -converts a string representation of a principal name to -.Nm krb5_principal . -The -.Fa principal -will point to allocated data that should be freed with -.Fn krb5_free_principal . -.Pp -The string should consist of one or more name components separated with slashes -.Pq Dq / , -optionally followed with an -.Dq @ -and a realm name. A slash or @ may be contained in a name component by -quoting it with a backslash -.Pq Dq \e . -A realm should not contain slashes or colons. -.Sh SEE ALSO -.Xr krb5_425_conv_principal 3 , -.Xr krb5_build_principal 3 , -.Xr krb5_free_principal 3 , -.Xr krb5_sname_to_principal 3 , -.Xr krb5_unparse_name 3 diff --git a/kerberosV/src/lib/krb5/krb5_principal.3 b/kerberosV/src/lib/krb5/krb5_principal.3 deleted file mode 100644 index 37f467485be..00000000000 --- a/kerberosV/src/lib/krb5/krb5_principal.3 +++ /dev/null @@ -1,372 +0,0 @@ -.\" Copyright (c) 2003 - 2007 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: krb5_principal.3,v 1.3 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 1, 2006 -.Dt KRB5_PRINCIPAL 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_get_default_principal , -.Nm krb5_principal , -.Nm krb5_build_principal , -.Nm krb5_build_principal_ext , -.Nm krb5_build_principal_va , -.Nm krb5_build_principal_va_ext , -.Nm krb5_copy_principal , -.Nm krb5_free_principal , -.Nm krb5_make_principal , -.Nm krb5_parse_name , -.Nm krb5_parse_name_flags , -.Nm krb5_parse_nametype , -.Nm krb5_princ_set_realm , -.Nm krb5_principal_compare , -.Nm krb5_principal_compare_any_realm , -.Nm krb5_principal_get_comp_string , -.Nm krb5_principal_get_realm , -.Nm krb5_principal_get_type , -.Nm krb5_principal_match , -.Nm krb5_principal_set_type , -.Nm krb5_realm_compare , -.Nm krb5_sname_to_principal , -.Nm krb5_sock_to_principal , -.Nm krb5_unparse_name , -.Nm krb5_unparse_name_flags , -.Nm krb5_unparse_name_fixed , -.Nm krb5_unparse_name_fixed_flags , -.Nm krb5_unparse_name_fixed_short , -.Nm krb5_unparse_name_short -.Nd Kerberos 5 principal handling functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Li krb5_principal ; -.Ft void -.Fn krb5_free_principal "krb5_context context" "krb5_principal principal" -.Ft krb5_error_code -.Fn krb5_parse_name "krb5_context context" "const char *name" "krb5_principal *principal" -.Ft krb5_error_code -.Fn krb5_parse_name_flags "krb5_context context" "const char *name" "int flags" "krb5_principal *principal" -.Ft krb5_error_code -.Fn "krb5_unparse_name" "krb5_context context" "krb5_const_principal principal" "char **name" -.Ft krb5_error_code -.Fn "krb5_unparse_name_flags" "krb5_context context" "krb5_const_principal principal" "int flags" "char **name" -.Ft krb5_error_code -.Fn krb5_unparse_name_fixed "krb5_context context" "krb5_const_principal principal" "char *name" "size_t len" -.Ft krb5_error_code -.Fn krb5_unparse_name_fixed_flags "krb5_context context" "krb5_const_principal principal" "int flags" "char *name" "size_t len" -.Ft krb5_error_code -.Fn "krb5_unparse_name_short" "krb5_context context" "krb5_const_principal principal" "char **name" -.Ft krb5_error_code -.Fn krb5_unparse_name_fixed_short "krb5_context context" "krb5_const_principal principal" "char *name" "size_t len" -.Ft void -.Fn krb5_princ_set_realm "krb5_context context" "krb5_principal principal" "krb5_realm *realm" -.Ft krb5_error_code -.Fn krb5_build_principal "krb5_context context" "krb5_principal *principal" "int rlen" "krb5_const_realm realm" "..." -.Ft krb5_error_code -.Fn krb5_build_principal_va "krb5_context context" "krb5_principal *principal" "int rlen" "krb5_const_realm realm" "va_list ap" -.Ft krb5_error_code -.Fn "krb5_build_principal_ext" "krb5_context context" "krb5_principal *principal" "int rlen" "krb5_const_realm realm" "..." -.Ft krb5_error_code -.Fn krb5_build_principal_va_ext "krb5_context context" "krb5_principal *principal" "int rlen" "krb5_const_realm realm" "va_list ap" -.Ft krb5_error_code -.Fn krb5_make_principal "krb5_context context" "krb5_principal *principal" "krb5_const_realm realm" "..." -.Ft krb5_error_code -.Fn krb5_copy_principal "krb5_context context" "krb5_const_principal inprinc" "krb5_principal *outprinc" -.Ft krb5_boolean -.Fn krb5_principal_compare "krb5_context context" "krb5_const_principal princ1" "krb5_const_principal princ2" -.Ft krb5_boolean -.Fn krb5_principal_compare_any_realm "krb5_context context" "krb5_const_principal princ1" "krb5_const_principal princ2" -.Ft "const char *" -.Fn krb5_principal_get_comp_string "krb5_context context" "krb5_const_principal principal" "unsigned int component" -.Ft "const char *" -.Fn krb5_principal_get_realm "krb5_context context" "krb5_const_principal principal" -.Ft int -.Fn krb5_principal_get_type "krb5_context context" "krb5_const_principal principal" -.Ft krb5_boolean -.Fn krb5_principal_match "krb5_context context" "krb5_const_principal principal" "krb5_const_principal pattern" -.Ft void -.Fn krb5_principal_set_type "krb5_context context" "krb5_principal principal" "int type" -.Ft krb5_boolean -.Fn krb5_realm_compare "krb5_context context" "krb5_const_principal princ1" "krb5_const_principal princ2" -.Ft krb5_error_code -.Fn krb5_sname_to_principal "krb5_context context" "const char *hostname" "const char *sname" "int32_t type" "krb5_principal *ret_princ" -.Ft krb5_error_code -.Fn krb5_sock_to_principal "krb5_context context" "int socket" "const char *sname" "int32_t type" "krb5_principal *principal" -.Ft krb5_error_code -.Fn krb5_get_default_principal "krb5_context context" "krb5_principal *princ" -.Ft krb5_error_code -.Fn krb5_parse_nametype "krb5_context context" "const char *str" "int32_t *type" -.Sh DESCRIPTION -.Li krb5_principal -holds the name of a user or service in Kerberos. -.Pp -A principal has two parts, a -.Li PrincipalName -and a -.Li realm . -The PrincipalName consists of one or more components. In printed form, -the components are separated by /. -The PrincipalName also has a name-type. -.Pp -Examples of a principal are -.Li nisse/root@EXAMPLE.COM -and -.Li host/datan.kth.se@KTH.SE . -.Fn krb5_parse_name -and -.Fn krb5_parse_name_flags -passes a principal name in -.Fa name -to the kerberos principal structure. -.Fn krb5_parse_name_flags -takes an extra -.Fa flags -argument the following flags can be passed in -.Bl -tag -width Ds -.It Dv KRB5_PRINCIPAL_PARSE_NO_REALM -requires the input string to be without a realm, and no realm is -stored in the -.Fa principal -return argument. -.It Dv KRB5_PRINCIPAL_PARSE_REQUIRE_REALM -requires the input string to with a realm. -.El -.Pp -.Fn krb5_unparse_name -and -.Fn krb5_unparse_name_flags -prints the principal -.Fa princ -to the string -.Fa name . -.Fa name -should be freed with -.Xr free 3 . -To the -.Fa flags -argument the following flags can be passed in -.Bl -tag -width Ds -.It Dv KRB5_PRINCIPAL_UNPARSE_SHORT -no realm if the realm is one of the local realms. -.It Dv KRB5_PRINCIPAL_UNPARSE_NO_REALM -never include any realm in the principal name. -.It Dv KRB5_PRINCIPAL_UNPARSE_DISPLAY -don't quote -.El -On failure -.Fa name -is set to -.Dv NULL . -.Fn krb5_unparse_name_fixed -and -.Fn krb5_unparse_name_fixed_flags -behaves just like -.Fn krb5_unparse , -but instead unparses the principal into a fixed size buffer. -.Pp -.Fn krb5_unparse_name_short -just returns the principal without the realm if the principal is -in the default realm. If the principal isn't, the full name is -returned. -.Fn krb5_unparse_name_fixed_short -works just like -.Fn krb5_unparse_name_short -but on a fixed size buffer. -.Pp -.Fn krb5_build_principal -builds a principal from the realm -.Fa realm -that has the length -.Fa rlen . -The following arguments form the components of the principal. -The list of components is terminated with -.Dv NULL . -.Pp -.Fn krb5_build_principal_va -works like -.Fn krb5_build_principal -using vargs. -.Pp -.Fn krb5_build_principal_ext -and -.Fn krb5_build_principal_va_ext -take a list of length-value pairs, the list is terminated with a zero -length. -.Pp -.Fn krb5_make_principal -works the same way as -.Fn krb5_build_principal , -except it figures out the length of the realm itself. -.Pp -.Fn krb5_copy_principal -makes a copy of a principal. -The copy needs to be freed with -.Fn krb5_free_principal . -.Pp -.Fn krb5_principal_compare -compares the two principals, including realm of the principals and returns -.Dv TRUE -if they are the same and -.Dv FALSE -if not. -.Pp -.Fn krb5_principal_compare_any_realm -works the same way as -.Fn krb5_principal_compare -but doesn't compare the realm component of the principal. -.Pp -.Fn krb5_realm_compare -compares the realms of the two principals and returns -.Dv TRUE -is they are the same, and -.Dv FALSE -if not. -.Pp -.Fn krb5_principal_match -matches a -.Fa principal -against a -.Fa pattern . -The pattern is a globbing expression, where each component (separated -by /) is matched against the corresponding component of the principal. -.Pp -The -.Fn krb5_principal_get_realm -and -.Fn krb5_principal_get_comp_string -functions return parts of the -.Fa principal , -either the realm or a specific component. -Both functions return string pointers to data inside the principal, so -they are valid only as long as the principal exists. -.Pp -The -.Fa component -argument to -.Fn krb5_principal_get_comp_string -is the index of the component to return, from zero to the total number of -components minus one. If the index is out of range -.Dv NULL -is returned. -.Pp -.Fn krb5_principal_get_realm -and -.Fn krb5_principal_get_comp_string -are replacements for -.Fn krb5_princ_component -and related macros, described as internal in the MIT API -specification. -Unlike the macros, these functions return strings, not -.Dv krb5_data . -A reason to return -.Dv krb5_data -was that it was believed that principal components could contain -binary data, but this belief was unfounded, and it has been decided -that principal components are infact UTF8, so it's safe to use zero -terminated strings. -.Pp -It's generally not necessary to look at the components of a principal. -.Pp -.Fn krb5_principal_get_type -and -.Fn krb5_principal_set_type -get and sets the name type for a principal. -Name type handling is tricky and not often needed, -don't use this unless you know what you do. -.Pp -.Fn krb5_sname_to_principal -and -.Fn krb5_sock_to_principal -are for easy creation of -.Dq service -principals that can, for instance, be used to lookup a key in a keytab. -For both functions the -.Fa sname -parameter will be used for the first component of the created principal. -If -.Fa sname -is -.Dv NULL , -.Dq host -will be used instead. -.Pp -.Fn krb5_sname_to_principal -will use the passed -.Fa hostname -for the second component. -If -.Fa type -is -.Dv KRB5_NT_SRV_HST -this name will be looked up with -.Fn gethostbyname . -If -.Fa hostname -is -.Dv NULL , -the local hostname will be used. -.Pp -.Fn krb5_sock_to_principal -will use the -.Dq sockname -of the passed -.Fa socket , -which should be a bound -.Dv AF_INET -or -.Dv AF_INET6 -socket. -There must be a mapping between the address and -.Dq sockname . -The function may try to resolve the name in DNS. -.Pp -.Fn krb5_get_default_principal -tries to find out what's a reasonable default principal by looking at -the environment it is running in. -.Pp -.Fn krb5_parse_nametype -parses and returns the name type integer value in -.Fa type . -On failure the function returns an error code and set the error -string. -.\" .Sh EXAMPLES -.Sh SEE ALSO -.Xr krb5_425_conv_principal 3 , -.Xr krb5_config 3 , -.Xr krb5.conf 5 -.Sh BUGS -You can not have a NUL in a component in some of the variable argument -functions above. -Until someone can give a good example of where it would be a good idea -to have NUL's in a component, this will not be fixed. diff --git a/kerberosV/src/lib/krb5/krb5_rcache.3 b/kerberosV/src/lib/krb5/krb5_rcache.3 deleted file mode 100644 index a0371822c88..00000000000 --- a/kerberosV/src/lib/krb5/krb5_rcache.3 +++ /dev/null @@ -1,163 +0,0 @@ -.\" Copyright (c) 2004 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: krb5_rcache.3,v 1.3 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 1, 2006 -.Dt KRB5_RCACHE 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_rcache , -.Nm krb5_rc_close , -.Nm krb5_rc_default , -.Nm krb5_rc_default_name , -.Nm krb5_rc_default_type , -.Nm krb5_rc_destroy , -.Nm krb5_rc_expunge , -.Nm krb5_rc_get_lifespan , -.Nm krb5_rc_get_name , -.Nm krb5_rc_get_type , -.Nm krb5_rc_initialize , -.Nm krb5_rc_recover , -.Nm krb5_rc_resolve , -.Nm krb5_rc_resolve_full , -.Nm krb5_rc_resolve_type , -.Nm krb5_rc_store , -.Nm krb5_get_server_rcache -.Nd Kerberos 5 replay cache -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Li "struct krb5_rcache;" -.Pp -.Ft krb5_error_code -.Fo krb5_rc_close -.Fa "krb5_context context" -.Fa "krb5_rcache id" -.Fc -.Ft krb5_error_code -.Fo krb5_rc_default -.Fa "krb5_context context" -.Fa "krb5_rcache *id" -.Fc -.Ft "const char *" -.Fo krb5_rc_default_name -.Fa "krb5_context context" -.Fc -.Ft "const char *" -.Fo krb5_rc_default_type -.Fa "krb5_context context" -.Fc -.Ft krb5_error_code -.Fo krb5_rc_destroy -.Fa "krb5_context context" -.Fa "krb5_rcache id" -.Fc -.Ft krb5_error_code -.Fo krb5_rc_expunge -.Fa "krb5_context context" -.Fa "krb5_rcache id" -.Fc -.Ft krb5_error_code -.Fo krb5_rc_get_lifespan -.Fa "krb5_context context" -.Fa "krb5_rcache id" -.Fa "krb5_deltat *auth_lifespan" -.Fc -.Ft "const char*" -.Fo krb5_rc_get_name -.Fa "krb5_context context" -.Fa "krb5_rcache id" -.Fc -.Ft "const char*" -.Fo "krb5_rc_get_type" -.Fa "krb5_context context" -.Fa "krb5_rcache id" -.Fc -.Ft krb5_error_code -.Fo krb5_rc_initialize -.Fa "krb5_context context" -.Fa "krb5_rcache id" -.Fa "krb5_deltat auth_lifespan" -.Fc -.Ft krb5_error_code -.Fo krb5_rc_recover -.Fa "krb5_context context" -.Fa "krb5_rcache id" -.Fc -.Ft krb5_error_code -.Fo krb5_rc_resolve -.Fa "krb5_context context" -.Fa "krb5_rcache id" -.Fa "const char *name" -.Fc -.Ft krb5_error_code -.Fo krb5_rc_resolve_full -.Fa "krb5_context context" -.Fa "krb5_rcache *id" -.Fa "const char *string_name" -.Fc -.Ft krb5_error_code -.Fo krb5_rc_resolve_type -.Fa "krb5_context context" -.Fa "krb5_rcache *id" -.Fa "const char *type" -.Fc -.Ft krb5_error_code -.Fo krb5_rc_store -.Fa "krb5_context context" -.Fa "krb5_rcache id" -.Fa "krb5_donot_replay *rep" -.Fc -.Ft krb5_error_code -.Fo krb5_get_server_rcache -.Fa "krb5_context context" -.Fa "const krb5_data *piece" -.Fa "krb5_rcache *id" -.Fc -.Sh DESCRIPTION -The -.Li krb5_rcache -structure holds a storage element that is used for data manipulation. -The structure contains no public accessible elements. -.Pp -.Fn krb5_rc_initialize -Creates the reply cache -.Fa id -and sets it lifespan to -.Fa auth_lifespan . -If the cache already exists, the content is destroyed. -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_data 3 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_rd_error.3 b/kerberosV/src/lib/krb5/krb5_rd_error.3 deleted file mode 100644 index cddda505bf2..00000000000 --- a/kerberosV/src/lib/krb5/krb5_rd_error.3 +++ /dev/null @@ -1,98 +0,0 @@ -.\" Copyright (c) 2004 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: krb5_rd_error.3,v 1.2 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd July 26, 2004 -.Dt KRB5_RD_ERROR 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_rd_error , -.Nm krb5_free_error , -.Nm krb5_free_error_contents , -.Nm krb5_error_from_rd_error -.Nd parse, free and read error from KRB-ERROR message -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_rd_error -.Fa "krb5_context context" -.Fa "const krb5_data *msg" -.Fa "KRB_ERROR *result" -.Fc -.Ft void -.Fo krb5_free_error -.Fa "krb5_context context" -.Fa "krb5_error *error" -.Fc -.Ft void -.Fo krb5_free_error_contents -.Fa "krb5_context context" -.Fa "krb5_error *error" -.Fc -.Ft krb5_error_code -.Fo krb5_error_from_rd_error -.Fa "krb5_context context" -.Fa "const krb5_error *error" -.Fa "const krb5_creds *creds" -.Fc -.Sh DESCRIPTION -Usually applications never needs to parse and understand Kerberos -error messages since higher level functions will parse and push up the -error in the krb5_context. -These functions are described for completeness. -.Pp -.Fn krb5_rd_error -parses and returns the kerboeros error message, the structure should be freed with -.Fn krb5_free_error_contents -when the caller is done with the structure. -.Pp -.Fn krb5_free_error -frees the content and the memory region holding the structure iself. -.Pp -.Fn krb5_free_error_contents -free the content of the KRB-ERROR message. -.Pp -.Fn krb5_error_from_rd_error -will parse the error message and set the error buffer in krb5_context -to the error string passed back or the matching error code in the -KRB-ERROR message. -Caller should pick up the message with -.Fn krb5_get_error_string 3 -(don't forget to free the returned string with -.Fn krb5_free_error_string ) . -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_set_error_string 3 , -.Xr krb5_get_error_string 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_rd_safe.3 b/kerberosV/src/lib/krb5/krb5_rd_safe.3 deleted file mode 100644 index 686d2184b49..00000000000 --- a/kerberosV/src/lib/krb5/krb5_rd_safe.3 +++ /dev/null @@ -1,81 +0,0 @@ -.\" Copyright (c) 2003 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: krb5_rd_safe.3,v 1.3 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 1, 2006 -.Dt KRB5_RD_SAFE 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_rd_safe , -.Nm krb5_rd_priv -.Nd verifies authenticity of messages -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Ft krb5_error_code -.Fn krb5_rd_priv "krb5_context context" "krb5_auth_context auth_context" "const krb5_data *inbuf" "krb5_data *outbuf" "krb5_replay_data *outdata" -.Ft krb5_error_code -.Fn krb5_rd_safe "krb5_context context" "krb5_auth_context auth_context" "const krb5_data *inbuf" "krb5_data *outbuf" "krb5_replay_data *outdata" -.Sh DESCRIPTION -.Fn krb5_rd_safe -and -.Fn krb5_rd_priv -parses -.Li KRB-SAFE -and -.Li KRB-PRIV -messages (as generated by -.Xr krb5_mk_safe 3 -and -.Xr krb5_mk_priv 3 ) -from -.Fa inbuf -and verifies its integrity. The user data part of the message in put -in -.Fa outbuf . -The encryption state, including keyblocks and addresses, is taken from -.Fa auth_context . -If the -.Dv KRB5_AUTH_CONTEXT_RET_SEQUENCE -or -.Dv KRB5_AUTH_CONTEXT_RET_TIME -flags are set in the -.Fa auth_context -the sequence number and time are returned in the -.Fa outdata -parameter. -.Sh SEE ALSO -.Xr krb5_auth_con_init 3 , -.Xr krb5_mk_priv 3 , -.Xr krb5_mk_safe 3 diff --git a/kerberosV/src/lib/krb5/krb5_set_default_realm.3 b/kerberosV/src/lib/krb5/krb5_set_default_realm.3 deleted file mode 100644 index 1874e70b221..00000000000 --- a/kerberosV/src/lib/krb5/krb5_set_default_realm.3 +++ /dev/null @@ -1,164 +0,0 @@ -.\" Copyright (c) 2003 - 2005 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: krb5_set_default_realm.3,v 1.5 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd April 24, 2005 -.Dt KRB5_SET_DEFAULT_REALM 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_copy_host_realm , -.Nm krb5_free_host_realm , -.Nm krb5_get_default_realm , -.Nm krb5_get_default_realms , -.Nm krb5_get_host_realm , -.Nm krb5_set_default_realm -.Nd default and host realm read and manipulation routines -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_copy_host_realm -.Fa "krb5_context context" -.Fa "const krb5_realm *from" -.Fa "krb5_realm **to" -.Fc -.Ft krb5_error_code -.Fo krb5_free_host_realm -.Fa "krb5_context context" -.Fa "krb5_realm *realmlist" -.Fc -.Ft krb5_error_code -.Fo krb5_get_default_realm -.Fa "krb5_context context" -.Fa "krb5_realm *realm" -.Fc -.Ft krb5_error_code -.Fo krb5_get_default_realms -.Fa "krb5_context context" -.Fa "krb5_realm **realm" -.Fc -.Ft krb5_error_code -.Fo krb5_get_host_realm -.Fa "krb5_context context" -.Fa "const char *host" -.Fa "krb5_realm **realms" -.Fc -.Ft krb5_error_code -.Fo krb5_set_default_realm -.Fa "krb5_context context" -.Fa "const char *realm" -.Fc -.Sh DESCRIPTION -.Fn krb5_copy_host_realm -copies the list of realms from -.Fa from -to -.Fa to . -.Fa to -should be freed by the caller using -.Fa krb5_free_host_realm . -.Pp -.Fn krb5_free_host_realm -frees all memory allocated by -.Fa realmlist . -.Pp -.Fn krb5_get_default_realm -returns the first default realm for this host. -The realm returned should be freed with -.Fn free . -.Pp -.Fn krb5_get_default_realms -returns a -.Dv NULL -terminated list of default realms for this context. -Realms returned by -.Fn krb5_get_default_realms -should be freed with -.Fn krb5_free_host_realm . -.Pp -.Fn krb5_get_host_realm -returns a -.Dv NULL -terminated list of realms for -.Fa host -by looking up the information in the -.Li [domain_realm] -in -.Pa krb5.conf -or in -.Li DNS . -If the mapping in -.Li [domain_realm] -results in the string -.Li dns_locate , -DNS is used to lookup the realm. -.Pp -When using -.Li DNS -to a resolve the domain for the host a.b.c, -.Fn krb5_get_host_realm -looks for a -.Dv TXT -resource record named -.Li _kerberos.a.b.c , -and if not found, it strips off the first component and tries a again -(_kerberos.b.c) until it reaches the root. -.Pp -If there is no configuration or DNS information found, -.Fn krb5_get_host_realm -assumes it can use the domain part of the -.Fa host -to form a realm. -Caller must free -.Fa realmlist -with -.Fn krb5_free_host_realm . -.Pp -.Fn krb5_set_default_realm -sets the default realm for the -.Fa context . -If -.Dv NULL -is used as a -.Fa realm , -the -.Li [libdefaults]default_realm -stanza in -.Pa krb5.conf -is used. -If there is no such stanza in the configuration file, the -.Fn krb5_get_host_realm -function is used to form a default realm. -.Sh SEE ALSO -.Xr free 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_set_password.3 b/kerberosV/src/lib/krb5/krb5_set_password.3 deleted file mode 100644 index ca1549ed990..00000000000 --- a/kerberosV/src/lib/krb5/krb5_set_password.3 +++ /dev/null @@ -1,143 +0,0 @@ -.\" Copyright (c) 2003 - 2004 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: krb5_set_password.3,v 1.4 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd July 15, 2004 -.Dt KRB5_SET_PASSWORD 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_change_password , -.Nm krb5_set_password , -.Nm krb5_set_password_using_ccache , -.Nm krb5_passwd_result_to_string -.Nd change password functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_change_password -.Fa "krb5_context context" -.Fa "krb5_creds *creds" -.Fa "char *newpw" -.Fa "int *result_code" -.Fa "krb5_data *result_code_string" -.Fa "krb5_data *result_string" -.Fc -.Ft krb5_error_code -.Fo krb5_set_password -.Fa "krb5_context context" -.Fa "krb5_creds *creds" -.Fa "char *newpw" -.Fa "krb5_principal targprinc" -.Fa "int *result_code" -.Fa "krb5_data *result_code_string" -.Fa "krb5_data *result_string" -.Fc -.Ft krb5_error_code -.Fo krb5_set_password_using_ccache -.Fa "krb5_context context" -.Fa "krb5_ccache ccache" -.Fa "char *newpw" -.Fa "krb5_principal targprinc" -.Fa "int *result_code" -.Fa "krb5_data *result_code_string" -.Fa "krb5_data *result_string" -.Fc -.Ft "const char *" -.Fo krb5_passwd_result_to_string -.Fa "krb5_context context" -.Fa "int result" -.Fc -.Sh DESCRIPTION -These functions change the password for a given principal. -.Pp -.Fn krb5_set_password -and -.Fn krb5_set_password_using_ccache -are the newer of the three functions, and use a newer version of the -protocol (and also fall back to the older set-password protocol if the -newer protocol doesn't work). -.Pp -.Fn krb5_change_password -sets the password -.Fa newpasswd -for the client principal in -.Fa creds . -The server principal of creds must be -.Li kadmin/changepw . -.Pp -.Fn krb5_set_password -and -.Fn krb5_set_password_using_ccache -change the password for the principal -.Fa targprinc . -.Pp -.Fn krb5_set_password -requires that the credential for -.Li kadmin/changepw@REALM -is in -.Fa creds . -If the user caller isn't an administrator, this credential -needs to be an initial credential, see -.Xr krb5_get_init_creds 3 -how to get such credentials. -.Pp -.Fn krb5_set_password_using_ccache -will get the credential from -.Fa ccache . -.Pp -If -.Fa targprinc -is -.Dv NULL , -.Fn krb5_set_password_using_ccache -uses the the default principal in -.Fa ccache -and -.Fn krb5_set_password -uses the global the default principal. -.Pp -All three functions return an error in -.Fa result_code -and maybe an error string to print in -.Fa result_string . -.Pp -.Fn krb5_passwd_result_to_string -returns an human readable string describing the error code in -.Fa result_code -from the -.Fn krb5_set_password -functions. -.Sh SEE ALSO -.Xr krb5_ccache 3 , -.Xr krb5_init_context 3 diff --git a/kerberosV/src/lib/krb5/krb5_string_to_key.3 b/kerberosV/src/lib/krb5/krb5_string_to_key.3 deleted file mode 100644 index 6fac93636f8..00000000000 --- a/kerberosV/src/lib/krb5/krb5_string_to_key.3 +++ /dev/null @@ -1,156 +0,0 @@ -.\" Copyright (c) 2004 - 2006 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: krb5_string_to_key.3,v 1.3 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd July 10, 2006 -.Dt KRB5_STRING_TO_KEY 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_string_to_key , -.Nm krb5_string_to_key_data , -.Nm krb5_string_to_key_data_salt , -.Nm krb5_string_to_key_data_salt_opaque , -.Nm krb5_string_to_key_salt , -.Nm krb5_string_to_key_salt_opaque , -.Nm krb5_get_pw_salt , -.Nm krb5_free_salt -.Nd turns a string to a Kerberos key -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fo krb5_string_to_key -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "const char *password" -.Fa "krb5_principal principal" -.Fa "krb5_keyblock *key" -.Fc -.Ft krb5_error_code -.Fo krb5_string_to_key_data -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "krb5_data password" -.Fa "krb5_principal principal" -.Fa "krb5_keyblock *key" -.Fc -.Ft krb5_error_code -.Fo krb5_string_to_key_data_salt -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "krb5_data password" -.Fa "krb5_salt salt" -.Fa "krb5_keyblock *key" -.Fc -.Ft krb5_error_code -.Fo krb5_string_to_key_data_salt_opaque -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "krb5_data password" -.Fa "krb5_salt salt" -.Fa "krb5_data opaque" -.Fa "krb5_keyblock *key" -.Fc -.Ft krb5_error_code -.Fo krb5_string_to_key_salt -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "const char *password" -.Fa "krb5_salt salt" -.Fa "krb5_keyblock *key" -.Fc -.Ft krb5_error_code -.Fo krb5_string_to_key_salt_opaque -.Fa "krb5_context context" -.Fa "krb5_enctype enctype" -.Fa "const char *password" -.Fa "krb5_salt salt" -.Fa "krb5_data opaque" -.Fa "krb5_keyblock *key" -.Fc -.Ft krb5_error_code -.Fo krb5_get_pw_salt -.Fa "krb5_context context" -.Fa "krb5_const_principal principal" -.Fa "krb5_salt *salt" -.Fc -.Ft krb5_error_code -.Fo krb5_free_salt -.Fa "krb5_context context" -.Fa "krb5_salt salt" -.Fc -.Sh DESCRIPTION -The string to key functions convert a string to a kerberos key. -.Pp -.Fn krb5_string_to_key_data_salt_opaque -is the function that does all the work, the rest of the functions are -just wrappers around -.Fn krb5_string_to_key_data_salt_opaque -that calls it with default values. -.Pp -.Fn krb5_string_to_key_data_salt_opaque -transforms the -.Fa password -with the given salt-string -.Fa salt -and the opaque, encryption type specific parameter -.Fa opaque -to a encryption key -.Fa key -according to the string to key function associated with -.Fa enctype . -.Pp -The -.Fa key -should be freed with -.Fn krb5_free_keyblock_contents . -.Pp -If one of the functions that doesn't take a -.Li krb5_salt -as it argument -.Fn krb5_get_pw_salt -is used to get the salt value. -.Pp -.Fn krb5_get_pw_salt -get the default password salt for a principal, use -.Fn krb5_free_salt -to free the salt when done. -.Pp -.Fn krb5_free_salt -frees the content of -.Fa salt . -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_data 3 , -.Xr krb5_keyblock 3 , -.Xr kerberos 8 diff --git a/kerberosV/src/lib/krb5/krb5_timeofday.3 b/kerberosV/src/lib/krb5/krb5_timeofday.3 deleted file mode 100644 index 26d89e36202..00000000000 --- a/kerberosV/src/lib/krb5/krb5_timeofday.3 +++ /dev/null @@ -1,118 +0,0 @@ -.\" $Id: krb5_timeofday.3,v 1.6 2013/06/17 18:57:44 robert Exp $ -.\" -.\" Copyright (c) 2001, 2003, 2006 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: krb5_timeofday.3,v 1.6 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd Sepember 16, 2006 -.Dt KRB5_TIMEOFDAY 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_timeofday , -.Nm krb5_set_real_time , -.Nm krb5_us_timeofday , -.Nm krb5_format_time , -.Nm krb5_string_to_deltat -.Nd Kerberos 5 time handling functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Li krb5_timestamp ; -.Pp -.Li krb5_deltat ; -.Ft krb5_error_code -.Fo krb5_set_real_time -.Fa "krb5_context context" -.Fa "krb5_timestamp sec" -.Fa "int32_t usec" -.Fc -.Ft krb5_error_code -.Fo krb5_timeofday -.Fa "krb5_context context" -.Fa "krb5_timestamp *timeret" -.Fc -.Ft krb5_error_code -.Fo krb5_us_timeofday -.Fa "krb5_context context" -.Fa "krb5_timestamp *sec" -.Fa "int32_t *usec" -.Fc -.Ft krb5_error_code -.Fo krb5_format_time -.Fa "krb5_context context" -.Fa "time_t t" -.Fa "char *s" -.Fa "size_t len" -.Fa "krb5_boolean include_time" -.Fc -.Ft krb5_error_code -.Fo krb5_string_to_deltat -.Fa "const char *string" -.Fa "krb5_deltat *deltat" -.Fc -.Sh DESCRIPTION -.Nm krb5_set_real_time -sets the absolute time that the caller knows the KDC has. -With this the Kerberos library can calculate the relative -difference between the KDC time and the local system time and store it -in the -.Fa context . -With this information the Kerberos library can adjust all time stamps -in Kerberos packages. -.Pp -.Fn krb5_timeofday -returns the current time, but adjusted with the time difference -between the local host and the KDC. -.Fn krb5_us_timeofday -also returns microseconds. -.Pp -.Nm krb5_format_time -formats the time -.Fa t -into the string -.Fa s -of length -.Fa len . -If -.Fa include_time -is set, the time is set include_time. -.Pp -.Nm krb5_string_to_deltat -parses delta time -.Fa string -into -.Fa deltat . -.Sh SEE ALSO -.Xr gettimeofday 2 , -.Xr krb5 3 diff --git a/kerberosV/src/lib/krb5/krb5_verify_init_creds.3 b/kerberosV/src/lib/krb5/krb5_verify_init_creds.3 deleted file mode 100644 index 1f9d734f736..00000000000 --- a/kerberosV/src/lib/krb5/krb5_verify_init_creds.3 +++ /dev/null @@ -1,103 +0,0 @@ -.\" Copyright (c) 2003 - 2006 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: krb5_verify_init_creds.3,v 1.4 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 1, 2006 -.Dt KRB5_VERIFY_INIT_CREDS 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_verify_init_creds_opt_init , -.Nm krb5_verify_init_creds_opt_set_ap_req_nofail , -.Nm krb5_verify_init_creds -.Nd "verifies a credential cache is correct by using a local keytab" -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Pp -.Li "struct krb5_verify_init_creds_opt;" -.Ft void -.Fo krb5_verify_init_creds_opt_init -.Fa "krb5_verify_init_creds_opt *options" -.Fc -.Ft void -.Fo krb5_verify_init_creds_opt_set_ap_req_nofail -.Fa "krb5_verify_init_creds_opt *options" -.Fa "int ap_req_nofail" -.Fc -.Ft krb5_error_code -.Fo krb5_verify_init_creds -.Fa "krb5_context context" -.Fa "krb5_creds *creds" -.Fa "krb5_principal ap_req_server" -.Fa "krb5_ccache *ccache" -.Fa "krb5_verify_init_creds_opt *options" -.Fc -.Sh DESCRIPTION -The -.Nm krb5_verify_init_creds -function verifies the initial tickets with the local keytab to make -sure the response of the KDC was spoof-ed. -.Pp -.Nm krb5_verify_init_creds -will use principal -.Fa ap_req_server -from the local keytab, if -.Dv NULL -is passed in, the code will guess the local hostname and use that to -form host/hostname/GUESSED-REALM-FOR-HOSTNAME. -.Fa creds -is the credential that -.Nm krb5_verify_init_creds -should verify. -If -.Fa ccache -is given -.Fn krb5_verify_init_creds -stores all credentials it fetched from the KDC there, otherwise it -will use a memory credential cache that is destroyed when done. -.Pp -.Fn krb5_verify_init_creds_opt_init -cleans the the structure, must be used before trying to pass it in to -.Fn krb5_verify_init_creds . -.Pp -.Fn krb5_verify_init_creds_opt_set_ap_req_nofail -controls controls the behavior if -.Fa ap_req_server -doesn't exists in the local keytab or in the KDC's database, if it's -true, the error will be ignored. Note that this use is possible -insecure. -.Sh SEE ALSO -.Xr krb5 3 , -.Xr krb5_get_init_creds 3 , -.Xr krb5_verify_user 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb5_verify_user.3 b/kerberosV/src/lib/krb5/krb5_verify_user.3 deleted file mode 100644 index daeb783bd6a..00000000000 --- a/kerberosV/src/lib/krb5/krb5_verify_user.3 +++ /dev/null @@ -1,241 +0,0 @@ -.\" Copyright (c) 2001 - 2006 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: krb5_verify_user.3,v 1.7 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd May 1, 2006 -.Dt KRB5_VERIFY_USER 3 -.Os HEIMDAL -.Sh NAME -.Nm krb5_verify_user , -.Nm krb5_verify_user_lrealm , -.Nm krb5_verify_user_opt , -.Nm krb5_verify_opt_init , -.Nm krb5_verify_opt_alloc , -.Nm krb5_verify_opt_free , -.Nm krb5_verify_opt_set_ccache , -.Nm krb5_verify_opt_set_flags , -.Nm krb5_verify_opt_set_service , -.Nm krb5_verify_opt_set_secure , -.Nm krb5_verify_opt_set_keytab -.Nd Heimdal password verifying functions -.Sh LIBRARY -Kerberos 5 Library (libkrb5, -lkrb5) -.Sh SYNOPSIS -.In krb5.h -.Ft krb5_error_code -.Fn "krb5_verify_user" "krb5_context context" " krb5_principal principal" "krb5_ccache ccache" "const char *password" "krb5_boolean secure" "const char *service" -.Ft krb5_error_code -.Fn "krb5_verify_user_lrealm" "krb5_context context" "krb5_principal principal" "krb5_ccache ccache" "const char *password" "krb5_boolean secure" "const char *service" -.Ft void -.Fn krb5_verify_opt_init "krb5_verify_opt *opt" -.Ft void -.Fn krb5_verify_opt_alloc "krb5_verify_opt **opt" -.Ft void -.Fn krb5_verify_opt_free "krb5_verify_opt *opt" -.Ft void -.Fn krb5_verify_opt_set_ccache "krb5_verify_opt *opt" "krb5_ccache ccache" -.Ft void -.Fn krb5_verify_opt_set_keytab "krb5_verify_opt *opt" "krb5_keytab keytab" -.Ft void -.Fn krb5_verify_opt_set_secure "krb5_verify_opt *opt" "krb5_boolean secure" -.Ft void -.Fn krb5_verify_opt_set_service "krb5_verify_opt *opt" "const char *service" -.Ft void -.Fn krb5_verify_opt_set_flags "krb5_verify_opt *opt" "unsigned int flags" -.Ft krb5_error_code -.Fo krb5_verify_user_opt -.Fa "krb5_context context" -.Fa "krb5_principal principal" -.Fa "const char *password" -.Fa "krb5_verify_opt *opt" -.Fc -.Sh DESCRIPTION -The -.Nm krb5_verify_user -function verifies the password supplied by a user. -The principal whose password will be verified is specified in -.Fa principal . -New tickets will be obtained as a side-effect and stored in -.Fa ccache -(if -.Dv NULL , -the default ccache is used). -.Fn krb5_verify_user -will call -.Fn krb5_cc_initialize -on the given -.Fa ccache , -so -.Fa ccache -must only initialized with -.Fn krb5_cc_resolve -or -.Fn krb5_cc_gen_new . -If the password is not supplied in -.Fa password -(and is given as -.Dv NULL ) -the user will be prompted for it. -If -.Fa secure -the ticket will be verified against the locally stored service key -.Fa service -(by default -.Ql host -if given as -.Dv NULL -). -.Pp -The -.Fn krb5_verify_user_lrealm -function does the same, except that it ignores the realm in -.Fa principal -and tries all the local realms (see -.Xr krb5.conf 5 ) . -After a successful return, the principal is set to the authenticated -realm. If the call fails, the principal will not be meaningful, and -should only be freed with -.Xr krb5_free_principal 3 . -.Pp -.Fn krb5_verify_opt_alloc -and -.Fn krb5_verify_opt_free -allocates and frees a -.Li krb5_verify_opt . -You should use the the alloc and free function instead of allocation -the structure yourself, this is because in a future release the -structure wont be exported. -.Pp -.Fn krb5_verify_opt_init -resets all opt to default values. -.Pp -None of the krb5_verify_opt_set function makes a copy of the data -structure that they are called with. It's up the caller to free them -after the -.Fn krb5_verify_user_opt -is called. -.Pp -.Fn krb5_verify_opt_set_ccache -sets the -.Fa ccache -that user of -.Fa opt -will use. If not set, the default credential cache will be used. -.Pp -.Fn krb5_verify_opt_set_keytab -sets the -.Fa keytab -that user of -.Fa opt -will use. If not set, the default keytab will be used. -.Pp -.Fn krb5_verify_opt_set_secure -if -.Fa secure -if true, the password verification will require that the ticket will -be verified against the locally stored service key. If not set, -default value is true. -.Pp -.Fn krb5_verify_opt_set_service -sets the -.Fa service -principal that user of -.Fa opt -will use. If not set, the -.Ql host -service will be used. -.Pp -.Fn krb5_verify_opt_set_flags -sets -.Fa flags -that user of -.Fa opt -will use. -If the flag -.Dv KRB5_VERIFY_LREALMS -is used, the -.Fa principal -will be modified like -.Fn krb5_verify_user_lrealm -modifies it. -.Pp -.Fn krb5_verify_user_opt -function verifies the -.Fa password -supplied by a user. -The principal whose password will be verified is specified in -.Fa principal . -Options the to the verification process is pass in in -.Fa opt . -.Sh EXAMPLES -Here is a example program that verifies a password. it uses the -.Ql host/`hostname` -service principal in -.Pa krb5.keytab . -.Bd -literal -#include - -int -main(int argc, char **argv) -{ - char *user; - krb5_error_code error; - krb5_principal princ; - krb5_context context; - - if (argc != 2) - errx(1, "usage: verify_passwd "); - - user = argv[1]; - - if (krb5_init_context(&context) < 0) - errx(1, "krb5_init_context"); - - if ((error = krb5_parse_name(context, user, &princ)) != 0) - krb5_err(context, 1, error, "krb5_parse_name"); - - error = krb5_verify_user(context, princ, NULL, NULL, TRUE, NULL); - if (error) - krb5_err(context, 1, error, "krb5_verify_user"); - - return 0; -} -.Ed -.Sh SEE ALSO -.Xr krb5_cc_gen_new 3 , -.Xr krb5_cc_initialize 3 , -.Xr krb5_cc_resolve 3 , -.Xr krb5_err 3 , -.Xr krb5_free_principal 3 , -.Xr krb5_init_context 3 , -.Xr krb5_kt_default 3 , -.Xr krb5.conf 5 diff --git a/kerberosV/src/lib/krb5/krb_err.et b/kerberosV/src/lib/krb5/krb_err.et deleted file mode 100644 index 5c7353c6aab..00000000000 --- a/kerberosV/src/lib/krb5/krb_err.et +++ /dev/null @@ -1,63 +0,0 @@ -# -# Error messages for the krb4 library -# -# This might look like a com_err file, but is not -# -id "$Id: krb_err.et,v 1.1 2013/06/17 18:57:44 robert Exp $" - -error_table krb - -prefix KRB4ET -ec KSUCCESS, "Kerberos 4 successful" -ec KDC_NAME_EXP, "Kerberos 4 principal expired" -ec KDC_SERVICE_EXP, "Kerberos 4 service expired" -ec KDC_AUTH_EXP, "Kerberos 4 auth expired" -ec KDC_PKT_VER, "Incorrect Kerberos 4 master key version" -ec KDC_P_MKEY_VER, "Incorrect Kerberos 4 master key version" -ec KDC_S_MKEY_VER, "Incorrect Kerberos 4 master key version" -ec KDC_BYTE_ORDER, "Kerberos 4 byte order unknown" -ec KDC_PR_UNKNOWN, "Kerberos 4 principal unknown" -ec KDC_PR_N_UNIQUE, "Kerberos 4 principal not unique" -ec KDC_NULL_KEY, "Kerberos 4 principal has null key" -index 20 -ec KDC_GEN_ERR, "Generic error from KDC (Kerberos 4)" -ec GC_TKFIL, "Can't read Kerberos 4 ticket file" -ec GC_NOTKT, "Can't find Kerberos 4 ticket or TGT" -index 26 -ec MK_AP_TGTEXP, "Kerberos 4 TGT Expired" -index 31 -ec RD_AP_UNDEC, "Kerberos 4: Can't decode authenticator" -ec RD_AP_EXP, "Kerberos 4 ticket expired" -ec RD_AP_NYV, "Kerberos 4 ticket not yet valid" -ec RD_AP_REPEAT, "Kerberos 4: Repeated request" -ec RD_AP_NOT_US, "The Kerberos 4 ticket isn't for us" -ec RD_AP_INCON, "Kerberos 4 request inconsistent" -ec RD_AP_TIME, "Kerberos 4: delta_t too big" -ec RD_AP_BADD, "Kerberos 4: incorrect net address" -ec RD_AP_VERSION, "Kerberos protocol not version 4" -ec RD_AP_MSG_TYPE, "Kerberos 4: invalid msg type" -ec RD_AP_MODIFIED, "Kerberos 4: message stream modified" -ec RD_AP_ORDER, "Kerberos 4: message out of order" -ec RD_AP_UNAUTHOR, "Kerberos 4: unauthorized request" -index 51 -ec GT_PW_NULL, "Kerberos 4: current PW is null" -ec GT_PW_BADPW, "Kerberos 4: Incorrect current password" -ec GT_PW_PROT, "Kerberos 4 protocol error" -ec GT_PW_KDCERR, "Error returned by KDC (Kerberos 4)" -ec GT_PW_NULLTKT, "Null Kerberos 4 ticket returned by KDC" -ec SKDC_RETRY, "Kerberos 4: Retry count exceeded" -ec SKDC_CANT, "Kerberos 4: Can't send request" -index 61 -ec INTK_W_NOTALL, "Kerberos 4: not all tickets returned" -ec INTK_BADPW, "Kerberos 4: incorrect password" -ec INTK_PROT, "Kerberos 4: Protocol Error" -index 70 -ec INTK_ERR, "Other error in Kerberos 4" -ec AD_NOTGT, "Don't have Kerberos 4 ticket-granting ticket" -index 76 -ec NO_TKT_FIL, "No Kerberos 4 ticket file found" -ec TKT_FIL_ACC, "Couldn't access Kerberos 4 ticket file" -ec TKT_FIL_LCK, "Couldn't lock Kerberos 4 ticket file" -ec TKT_FIL_FMT, "Bad Kerberos 4 ticket file format" -ec TKT_FIL_INI, "Kerberos 4: tf_init not called first" -ec KNAME_FMT, "Bad Kerberos 4 name format" diff --git a/kerberosV/src/lib/krb5/krbhst-test.c b/kerberosV/src/lib/krb5/krbhst-test.c deleted file mode 100644 index 873734fce77..00000000000 --- a/kerberosV/src/lib/krb5/krbhst-test.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2001 - 2002 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 "krb5_locl.h" - -#include -#include - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - "[realms ...]"); - exit (ret); -} - -int -main(int argc, char **argv) -{ - int i, j; - krb5_context context; - int types[] = {KRB5_KRBHST_KDC, KRB5_KRBHST_ADMIN, KRB5_KRBHST_CHANGEPW, - KRB5_KRBHST_KRB524}; - const char *type_str[] = {"kdc", "admin", "changepw", "krb524"}; - int optidx = 0; - - setprogname (argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - krb5_init_context (&context); - for(i = 0; i < argc; i++) { - krb5_krbhst_handle handle; - char host[MAXHOSTNAMELEN]; - - for (j = 0; j < sizeof(types)/sizeof(*types); ++j) { - printf ("%s for %s:\n", type_str[j], argv[i]); - - krb5_krbhst_init(context, argv[i], types[j], &handle); - while(krb5_krbhst_next_as_string(context, handle, - host, sizeof(host)) == 0) - printf("\thost: %s\n", host); - krb5_krbhst_reset(context, handle); - printf ("\n"); - } - } - return 0; -} diff --git a/kerberosV/src/lib/krb5/krbhst.c b/kerberosV/src/lib/krb5/krbhst.c deleted file mode 100644 index 3242cdb9995..00000000000 --- a/kerberosV/src/lib/krb5/krbhst.c +++ /dev/null @@ -1,1121 +0,0 @@ -/* - * Copyright (c) 2001 - 2003 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 "krb5_locl.h" -#include -#include "locate_plugin.h" - -static int -string_to_proto(const char *string) -{ - if(strcasecmp(string, "udp") == 0) - return KRB5_KRBHST_UDP; - else if(strcasecmp(string, "tcp") == 0) - return KRB5_KRBHST_TCP; - else if(strcasecmp(string, "http") == 0) - return KRB5_KRBHST_HTTP; - return -1; -} - -/* - * set `res' and `count' to the result of looking up SRV RR in DNS for - * `proto', `proto', `realm' using `dns_type'. - * if `port' != 0, force that port number - */ - -static krb5_error_code -srv_find_realm(krb5_context context, krb5_krbhst_info ***res, int *count, - const char *realm, const char *dns_type, - const char *proto, const char *service, int port) -{ - char domain[1024]; - struct rk_dns_reply *r; - struct rk_resource_record *rr; - int num_srv; - int proto_num; - int def_port; - - *res = NULL; - *count = 0; - - proto_num = string_to_proto(proto); - if(proto_num < 0) { - krb5_set_error_message(context, EINVAL, - N_("unknown protocol `%s' to lookup", ""), - proto); - return EINVAL; - } - - if(proto_num == KRB5_KRBHST_HTTP) - def_port = ntohs(krb5_getportbyname (context, "http", "tcp", 80)); - else if(port == 0) - def_port = ntohs(krb5_getportbyname (context, service, proto, 88)); - else - def_port = port; - - snprintf(domain, sizeof(domain), "_%s._%s.%s.", service, proto, realm); - - r = rk_dns_lookup(domain, dns_type); - if(r == NULL) { - _krb5_debug(context, 0, - "DNS lookup failed domain: %s", domain); - return KRB5_KDC_UNREACH; - } - - for(num_srv = 0, rr = r->head; rr; rr = rr->next) - if(rr->type == rk_ns_t_srv) - num_srv++; - - *res = malloc(num_srv * sizeof(**res)); - if(*res == NULL) { - rk_dns_free_data(r); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - rk_dns_srv_order(r); - - for(num_srv = 0, rr = r->head; rr; rr = rr->next) - if(rr->type == rk_ns_t_srv) { - krb5_krbhst_info *hi; - size_t len = strlen(rr->u.srv->target); - - hi = calloc(1, sizeof(*hi) + len); - if(hi == NULL) { - rk_dns_free_data(r); - while(--num_srv >= 0) - free((*res)[num_srv]); - free(*res); - *res = NULL; - return ENOMEM; - } - (*res)[num_srv++] = hi; - - hi->proto = proto_num; - - hi->def_port = def_port; - if (port != 0) - hi->port = port; - else - hi->port = rr->u.srv->port; - - strlcpy(hi->hostname, rr->u.srv->target, len + 1); - } - - *count = num_srv; - - rk_dns_free_data(r); - return 0; -} - - -struct krb5_krbhst_data { - char *realm; - unsigned int flags; - int def_port; - int port; /* hardwired port number if != 0 */ -#define KD_CONFIG 1 -#define KD_SRV_UDP 2 -#define KD_SRV_TCP 4 -#define KD_SRV_HTTP 8 -#define KD_FALLBACK 16 -#define KD_CONFIG_EXISTS 32 -#define KD_LARGE_MSG 64 -#define KD_PLUGIN 128 - krb5_error_code (*get_next)(krb5_context, struct krb5_krbhst_data *, - krb5_krbhst_info**); - - unsigned int fallback_count; - - struct krb5_krbhst_info *hosts, **index, **end; -}; - -static krb5_boolean -krbhst_empty(const struct krb5_krbhst_data *kd) -{ - return kd->index == &kd->hosts; -} - -/* - * Return the default protocol for the `kd' (either TCP or UDP) - */ - -static int -krbhst_get_default_proto(struct krb5_krbhst_data *kd) -{ - if (kd->flags & KD_LARGE_MSG) - return KRB5_KRBHST_TCP; - return KRB5_KRBHST_UDP; -} - -/* - * - */ - -const char * -_krb5_krbhst_get_realm(krb5_krbhst_handle handle) -{ - return handle->realm; -} - -/* - * parse `spec' into a krb5_krbhst_info, defaulting the port to `def_port' - * and forcing it to `port' if port != 0 - */ - -static struct krb5_krbhst_info* -parse_hostspec(krb5_context context, struct krb5_krbhst_data *kd, - const char *spec, int def_port, int port) -{ - const char *p = spec, *q; - struct krb5_krbhst_info *hi; - - hi = calloc(1, sizeof(*hi) + strlen(spec)); - if(hi == NULL) - return NULL; - - hi->proto = krbhst_get_default_proto(kd); - - if(strncmp(p, "http://", 7) == 0){ - hi->proto = KRB5_KRBHST_HTTP; - p += 7; - } else if(strncmp(p, "http/", 5) == 0) { - hi->proto = KRB5_KRBHST_HTTP; - p += 5; - def_port = ntohs(krb5_getportbyname (context, "http", "tcp", 80)); - }else if(strncmp(p, "tcp/", 4) == 0){ - hi->proto = KRB5_KRBHST_TCP; - p += 4; - } else if(strncmp(p, "udp/", 4) == 0) { - p += 4; - } - - if (p[0] == '[' && (q = strchr(p, ']')) != NULL) { - /* if address looks like [foo:bar] or [foo:bar]: its a ipv6 - adress, strip of [] */ - memcpy(hi->hostname, &p[1], q - p - 1); - hi->hostname[q - p - 1] = '\0'; - p = q + 1; - /* get trailing : */ - if (p[0] == ':') - p++; - } else if(strsep_copy(&p, ":", hi->hostname, strlen(spec) + 1) < 0) { - /* copy everything before : */ - free(hi); - return NULL; - } - /* get rid of trailing /, and convert to lower case */ - hi->hostname[strcspn(hi->hostname, "/")] = '\0'; - strlwr(hi->hostname); - - hi->port = hi->def_port = def_port; - if(p != NULL && p[0]) { - char *end; - hi->port = strtol(p, &end, 0); - if(end == p) { - free(hi); - return NULL; - } - } - if (port) - hi->port = port; - return hi; -} - -void -_krb5_free_krbhst_info(krb5_krbhst_info *hi) -{ - if (hi->ai != NULL) - freeaddrinfo(hi->ai); - free(hi); -} - -krb5_error_code -_krb5_krbhost_info_move(krb5_context context, - krb5_krbhst_info *from, - krb5_krbhst_info **to) -{ - size_t hostnamelen = strlen(from->hostname); - /* trailing NUL is included in structure */ - *to = calloc(1, sizeof(**to) + hostnamelen); - if(*to == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - (*to)->proto = from->proto; - (*to)->port = from->port; - (*to)->def_port = from->def_port; - (*to)->ai = from->ai; - from->ai = NULL; - (*to)->next = NULL; - memcpy((*to)->hostname, from->hostname, hostnamelen + 1); - return 0; -} - - -static void -append_host_hostinfo(struct krb5_krbhst_data *kd, struct krb5_krbhst_info *host) -{ - struct krb5_krbhst_info *h; - - for(h = kd->hosts; h; h = h->next) - if(h->proto == host->proto && - h->port == host->port && - strcmp(h->hostname, host->hostname) == 0) { - _krb5_free_krbhst_info(host); - return; - } - *kd->end = host; - kd->end = &host->next; -} - -static krb5_error_code -append_host_string(krb5_context context, struct krb5_krbhst_data *kd, - const char *host, int def_port, int port) -{ - struct krb5_krbhst_info *hi; - - hi = parse_hostspec(context, kd, host, def_port, port); - if(hi == NULL) - return ENOMEM; - - append_host_hostinfo(kd, hi); - return 0; -} - -/* - * return a readable representation of `host' in `hostname, hostlen' - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_format_string(krb5_context context, const krb5_krbhst_info *host, - char *hostname, size_t hostlen) -{ - const char *proto = ""; - char portstr[7] = ""; - if(host->proto == KRB5_KRBHST_TCP) - proto = "tcp/"; - else if(host->proto == KRB5_KRBHST_HTTP) - proto = "http://"; - if(host->port != host->def_port) - snprintf(portstr, sizeof(portstr), ":%d", host->port); - snprintf(hostname, hostlen, "%s%s%s", proto, host->hostname, portstr); - return 0; -} - -/* - * create a getaddrinfo `hints' based on `proto' - */ - -static void -make_hints(struct addrinfo *hints, int proto) -{ - memset(hints, 0, sizeof(*hints)); - hints->ai_family = AF_UNSPEC; - switch(proto) { - case KRB5_KRBHST_UDP : - hints->ai_socktype = SOCK_DGRAM; - break; - case KRB5_KRBHST_HTTP : - case KRB5_KRBHST_TCP : - hints->ai_socktype = SOCK_STREAM; - break; - } -} - -/** - * Return an `struct addrinfo *' for a KDC host. - * - * Returns an the struct addrinfo in in that corresponds to the - * information in `host'. free:ing is handled by krb5_krbhst_free, so - * the returned ai must not be released. - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_get_addrinfo(krb5_context context, krb5_krbhst_info *host, - struct addrinfo **ai) -{ - int ret = 0; - - if (host->ai == NULL) { - struct addrinfo hints; - char portstr[NI_MAXSERV]; - char *hostname = host->hostname; - - snprintf (portstr, sizeof(portstr), "%d", host->port); - make_hints(&hints, host->proto); - - /** - * First try this as an IP address, this allows us to add a - * dot at the end to stop using the search domains. - */ - - hints.ai_flags |= AI_NUMERICHOST | AI_NUMERICSERV; - - ret = getaddrinfo(host->hostname, portstr, &hints, &host->ai); - if (ret == 0) - goto out; - - /** - * If the hostname contains a dot, assumes it's a FQDN and - * don't use search domains since that might be painfully slow - * when machine is disconnected from that network. - */ - - hints.ai_flags &= ~(AI_NUMERICHOST); - - if (strchr(hostname, '.') && hostname[strlen(hostname) - 1] != '.') { - ret = asprintf(&hostname, "%s.", host->hostname); - if (ret < 0 || hostname == NULL) - return ENOMEM; - } - - ret = getaddrinfo(hostname, portstr, &hints, &host->ai); - if (hostname != host->hostname) - free(hostname); - if (ret) { - ret = krb5_eai_to_heim_errno(ret, errno); - goto out; - } - } - out: - *ai = host->ai; - return ret; -} - -static krb5_boolean -get_next(struct krb5_krbhst_data *kd, krb5_krbhst_info **host) -{ - struct krb5_krbhst_info *hi = *kd->index; - if(hi != NULL) { - *host = hi; - kd->index = &(*kd->index)->next; - return TRUE; - } - return FALSE; -} - -static void -srv_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, - const char *proto, const char *service) -{ - krb5_error_code ret; - krb5_krbhst_info **res; - int count, i; - - ret = srv_find_realm(context, &res, &count, kd->realm, "SRV", proto, service, - kd->port); - _krb5_debug(context, 2, "searching DNS for realm %s %s.%s -> %d", - kd->realm, proto, service, ret); - if (ret) - return; - for(i = 0; i < count; i++) - append_host_hostinfo(kd, res[i]); - free(res); -} - -/* - * read the configuration for `conf_string', defaulting to kd->def_port and - * forcing it to `kd->port' if kd->port != 0 - */ - -static void -config_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, - const char *conf_string) -{ - int i; - char **hostlist; - hostlist = krb5_config_get_strings(context, NULL, - "realms", kd->realm, conf_string, NULL); - - _krb5_debug(context, 2, "configuration file for realm %s%s found", - kd->realm, hostlist ? "" : " not"); - - if(hostlist == NULL) - return; - kd->flags |= KD_CONFIG_EXISTS; - for(i = 0; hostlist && hostlist[i] != NULL; i++) - append_host_string(context, kd, hostlist[i], kd->def_port, kd->port); - - krb5_config_free_strings(hostlist); -} - -/* - * as a fallback, look for `serv_string.kd->realm' (typically - * kerberos.REALM, kerberos-1.REALM, ... - * `port' is the default port for the service, and `proto' the - * protocol - */ - -static krb5_error_code -fallback_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, - const char *serv_string, int port, int proto) -{ - char *host = NULL; - int ret; - struct addrinfo *ai; - struct addrinfo hints; - char portstr[NI_MAXSERV]; - - _krb5_debug(context, 2, "fallback lookup %d for realm %s (service %s)", - kd->fallback_count, kd->realm, serv_string); - - /* - * Don't try forever in case the DNS server keep returning us - * entries (like wildcard entries or the .nu TLD) - */ - if(kd->fallback_count >= 5) { - kd->flags |= KD_FALLBACK; - return 0; - } - - if(kd->fallback_count == 0) - ret = asprintf(&host, "%s.%s.", serv_string, kd->realm); - else - ret = asprintf(&host, "%s-%d.%s.", - serv_string, kd->fallback_count, kd->realm); - - if (ret < 0 || host == NULL) - return ENOMEM; - - make_hints(&hints, proto); - snprintf(portstr, sizeof(portstr), "%d", port); - ret = getaddrinfo(host, portstr, &hints, &ai); - if (ret) { - /* no more hosts, so we're done here */ - free(host); - kd->flags |= KD_FALLBACK; - } else { - struct krb5_krbhst_info *hi; - size_t hostlen = strlen(host); - - hi = calloc(1, sizeof(*hi) + hostlen); - if(hi == NULL) { - free(host); - return ENOMEM; - } - - hi->proto = proto; - hi->port = hi->def_port = port; - hi->ai = ai; - memmove(hi->hostname, host, hostlen); - hi->hostname[hostlen] = '\0'; - free(host); - append_host_hostinfo(kd, hi); - kd->fallback_count++; - } - return 0; -} - -/* - * Fetch hosts from plugin - */ - -static krb5_error_code -add_locate(void *ctx, int type, struct sockaddr *addr) -{ - struct krb5_krbhst_info *hi; - struct krb5_krbhst_data *kd = ctx; - char host[NI_MAXHOST], port[NI_MAXSERV]; - struct addrinfo hints, *ai; - socklen_t socklen; - size_t hostlen; - int ret; - - socklen = socket_sockaddr_size(addr); - - ret = getnameinfo(addr, socklen, host, sizeof(host), port, sizeof(port), - NI_NUMERICHOST|NI_NUMERICSERV); - if (ret != 0) - return 0; - - make_hints(&hints, krbhst_get_default_proto(kd)); - ret = getaddrinfo(host, port, &hints, &ai); - if (ret) - return 0; - - hostlen = strlen(host); - - hi = calloc(1, sizeof(*hi) + hostlen); - if(hi == NULL) - return ENOMEM; - - hi->proto = krbhst_get_default_proto(kd); - hi->port = hi->def_port = socket_get_port(addr); - hi->ai = ai; - memmove(hi->hostname, host, hostlen); - hi->hostname[hostlen] = '\0'; - append_host_hostinfo(kd, hi); - - return 0; -} - -static void -plugin_get_hosts(krb5_context context, - struct krb5_krbhst_data *kd, - enum locate_service_type type) -{ - struct krb5_plugin *list = NULL, *e; - krb5_error_code ret; - - ret = _krb5_plugin_find(context, PLUGIN_TYPE_DATA, - KRB5_PLUGIN_LOCATE, &list); - if(ret != 0 || list == NULL) - return; - - for (e = list; e != NULL; e = _krb5_plugin_get_next(e)) { - krb5plugin_service_locate_ftable *service; - void *ctx; - - service = _krb5_plugin_get_symbol(e); - if (service->minor_version != 0) - continue; - - (*service->init)(context, &ctx); - ret = (*service->lookup)(ctx, type, kd->realm, 0, 0, add_locate, kd); - (*service->fini)(ctx); - if (ret && ret != KRB5_PLUGIN_NO_HANDLE) { - krb5_set_error_message(context, ret, - N_("Locate plugin failed to lookup realm %s: %d", ""), - kd->realm, ret); - break; - } else if (ret == 0) { - _krb5_debug(context, 2, "plugin found result for realm %s", kd->realm); - kd->flags |= KD_CONFIG_EXISTS; - } - - } - _krb5_plugin_free(list); -} - -/* - * - */ - -static krb5_error_code -kdc_get_next(krb5_context context, - struct krb5_krbhst_data *kd, - krb5_krbhst_info **host) -{ - krb5_error_code ret; - - if ((kd->flags & KD_PLUGIN) == 0) { - plugin_get_hosts(context, kd, locate_service_kdc); - kd->flags |= KD_PLUGIN; - if(get_next(kd, host)) - return 0; - } - - if((kd->flags & KD_CONFIG) == 0) { - config_get_hosts(context, kd, "kdc"); - kd->flags |= KD_CONFIG; - if(get_next(kd, host)) - return 0; - } - - if (kd->flags & KD_CONFIG_EXISTS) { - _krb5_debug(context, 1, - "Configuration exists for realm %s, wont go to DNS", - kd->realm); - return KRB5_KDC_UNREACH; - } - - if(context->srv_lookup) { - if((kd->flags & KD_SRV_UDP) == 0 && (kd->flags & KD_LARGE_MSG) == 0) { - srv_get_hosts(context, kd, "udp", "kerberos"); - kd->flags |= KD_SRV_UDP; - if(get_next(kd, host)) - return 0; - } - - if((kd->flags & KD_SRV_TCP) == 0) { - srv_get_hosts(context, kd, "tcp", "kerberos"); - kd->flags |= KD_SRV_TCP; - if(get_next(kd, host)) - return 0; - } - if((kd->flags & KD_SRV_HTTP) == 0) { - srv_get_hosts(context, kd, "http", "kerberos"); - kd->flags |= KD_SRV_HTTP; - if(get_next(kd, host)) - return 0; - } - } - - while((kd->flags & KD_FALLBACK) == 0) { - ret = fallback_get_hosts(context, kd, "kerberos", - kd->def_port, - krbhst_get_default_proto(kd)); - if(ret) - return ret; - if(get_next(kd, host)) - return 0; - } - - _krb5_debug(context, 0, "No KDC entries found for %s", kd->realm); - - return KRB5_KDC_UNREACH; /* XXX */ -} - -static krb5_error_code -admin_get_next(krb5_context context, - struct krb5_krbhst_data *kd, - krb5_krbhst_info **host) -{ - krb5_error_code ret; - - if ((kd->flags & KD_PLUGIN) == 0) { - plugin_get_hosts(context, kd, locate_service_kadmin); - kd->flags |= KD_PLUGIN; - if(get_next(kd, host)) - return 0; - } - - if((kd->flags & KD_CONFIG) == 0) { - config_get_hosts(context, kd, "admin_server"); - kd->flags |= KD_CONFIG; - if(get_next(kd, host)) - return 0; - } - - if (kd->flags & KD_CONFIG_EXISTS) { - _krb5_debug(context, 1, - "Configuration exists for realm %s, wont go to DNS", - kd->realm); - return KRB5_KDC_UNREACH; - } - - if(context->srv_lookup) { - if((kd->flags & KD_SRV_TCP) == 0) { - srv_get_hosts(context, kd, "tcp", "kerberos-adm"); - kd->flags |= KD_SRV_TCP; - if(get_next(kd, host)) - return 0; - } - } - - if (krbhst_empty(kd) - && (kd->flags & KD_FALLBACK) == 0) { - ret = fallback_get_hosts(context, kd, "kerberos", - kd->def_port, - krbhst_get_default_proto(kd)); - if(ret) - return ret; - kd->flags |= KD_FALLBACK; - if(get_next(kd, host)) - return 0; - } - - _krb5_debug(context, 0, "No admin entries found for realm %s", kd->realm); - - return KRB5_KDC_UNREACH; /* XXX */ -} - -static krb5_error_code -kpasswd_get_next(krb5_context context, - struct krb5_krbhst_data *kd, - krb5_krbhst_info **host) -{ - krb5_error_code ret; - - if ((kd->flags & KD_PLUGIN) == 0) { - plugin_get_hosts(context, kd, locate_service_kpasswd); - kd->flags |= KD_PLUGIN; - if(get_next(kd, host)) - return 0; - } - - if((kd->flags & KD_CONFIG) == 0) { - config_get_hosts(context, kd, "kpasswd_server"); - kd->flags |= KD_CONFIG; - if(get_next(kd, host)) - return 0; - } - - if (kd->flags & KD_CONFIG_EXISTS) { - _krb5_debug(context, 1, - "Configuration exists for realm %s, wont go to DNS", - kd->realm); - return KRB5_KDC_UNREACH; - } - - if(context->srv_lookup) { - if((kd->flags & KD_SRV_UDP) == 0) { - srv_get_hosts(context, kd, "udp", "kpasswd"); - kd->flags |= KD_SRV_UDP; - if(get_next(kd, host)) - return 0; - } - if((kd->flags & KD_SRV_TCP) == 0) { - srv_get_hosts(context, kd, "tcp", "kpasswd"); - kd->flags |= KD_SRV_TCP; - if(get_next(kd, host)) - return 0; - } - } - - /* no matches -> try admin */ - - if (krbhst_empty(kd)) { - kd->flags = 0; - kd->port = kd->def_port; - kd->get_next = admin_get_next; - ret = (*kd->get_next)(context, kd, host); - if (ret == 0) - (*host)->proto = krbhst_get_default_proto(kd); - return ret; - } - - _krb5_debug(context, 0, "No kpasswd entries found for realm %s", kd->realm); - - return KRB5_KDC_UNREACH; -} - -static krb5_error_code -krb524_get_next(krb5_context context, - struct krb5_krbhst_data *kd, - krb5_krbhst_info **host) -{ - if ((kd->flags & KD_PLUGIN) == 0) { - plugin_get_hosts(context, kd, locate_service_krb524); - kd->flags |= KD_PLUGIN; - if(get_next(kd, host)) - return 0; - } - - if((kd->flags & KD_CONFIG) == 0) { - config_get_hosts(context, kd, "krb524_server"); - if(get_next(kd, host)) - return 0; - kd->flags |= KD_CONFIG; - } - - if (kd->flags & KD_CONFIG_EXISTS) { - _krb5_debug(context, 1, - "Configuration exists for realm %s, wont go to DNS", - kd->realm); - return KRB5_KDC_UNREACH; - } - - if(context->srv_lookup) { - if((kd->flags & KD_SRV_UDP) == 0) { - srv_get_hosts(context, kd, "udp", "krb524"); - kd->flags |= KD_SRV_UDP; - if(get_next(kd, host)) - return 0; - } - - if((kd->flags & KD_SRV_TCP) == 0) { - srv_get_hosts(context, kd, "tcp", "krb524"); - kd->flags |= KD_SRV_TCP; - if(get_next(kd, host)) - return 0; - } - } - - /* no matches -> try kdc */ - - if (krbhst_empty(kd)) { - kd->flags = 0; - kd->port = kd->def_port; - kd->get_next = kdc_get_next; - return (*kd->get_next)(context, kd, host); - } - - _krb5_debug(context, 0, "No kpasswd entries found for realm %s", kd->realm); - - return KRB5_KDC_UNREACH; -} - -static struct krb5_krbhst_data* -common_init(krb5_context context, - const char *service, - const char *realm, - int flags) -{ - struct krb5_krbhst_data *kd; - - if((kd = calloc(1, sizeof(*kd))) == NULL) - return NULL; - - if((kd->realm = strdup(realm)) == NULL) { - free(kd); - return NULL; - } - - _krb5_debug(context, 2, "Trying to find service %s for realm %s flags %x", - service, realm, flags); - - /* For 'realms' without a . do not even think of going to DNS */ - if (!strchr(realm, '.')) - kd->flags |= KD_CONFIG_EXISTS; - - if (flags & KRB5_KRBHST_FLAGS_LARGE_MSG) - kd->flags |= KD_LARGE_MSG; - kd->end = kd->index = &kd->hosts; - return kd; -} - -/* - * initialize `handle' to look for hosts of type `type' in realm `realm' - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_init(krb5_context context, - const char *realm, - unsigned int type, - krb5_krbhst_handle *handle) -{ - return krb5_krbhst_init_flags(context, realm, type, 0, handle); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_init_flags(krb5_context context, - const char *realm, - unsigned int type, - int flags, - krb5_krbhst_handle *handle) -{ - struct krb5_krbhst_data *kd; - krb5_error_code (*next)(krb5_context, struct krb5_krbhst_data *, - krb5_krbhst_info **); - int def_port; - const char *service; - - switch(type) { - case KRB5_KRBHST_KDC: - next = kdc_get_next; - def_port = ntohs(krb5_getportbyname (context, "kerberos", "udp", 88)); - service = "kdc"; - break; - case KRB5_KRBHST_ADMIN: - next = admin_get_next; - def_port = ntohs(krb5_getportbyname (context, "kerberos-adm", - "tcp", 749)); - service = "admin"; - break; - case KRB5_KRBHST_CHANGEPW: - next = kpasswd_get_next; - def_port = ntohs(krb5_getportbyname (context, "kpasswd", "udp", - KPASSWD_PORT)); - service = "change_password"; - break; - case KRB5_KRBHST_KRB524: - next = krb524_get_next; - def_port = ntohs(krb5_getportbyname (context, "krb524", "udp", 4444)); - service = "524"; - break; - default: - krb5_set_error_message(context, ENOTTY, - N_("unknown krbhst type (%u)", ""), type); - return ENOTTY; - } - if((kd = common_init(context, service, realm, flags)) == NULL) - return ENOMEM; - kd->get_next = next; - kd->def_port = def_port; - *handle = kd; - return 0; -} - -/* - * return the next host information from `handle' in `host' - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_next(krb5_context context, - krb5_krbhst_handle handle, - krb5_krbhst_info **host) -{ - if(get_next(handle, host)) - return 0; - - return (*handle->get_next)(context, handle, host); -} - -/* - * return the next host information from `handle' as a host name - * in `hostname' (or length `hostlen) - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_krbhst_next_as_string(krb5_context context, - krb5_krbhst_handle handle, - char *hostname, - size_t hostlen) -{ - krb5_error_code ret; - krb5_krbhst_info *host; - ret = krb5_krbhst_next(context, handle, &host); - if(ret) - return ret; - return krb5_krbhst_format_string(context, host, hostname, hostlen); -} - - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_krbhst_reset(krb5_context context, krb5_krbhst_handle handle) -{ - handle->index = &handle->hosts; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_krbhst_free(krb5_context context, krb5_krbhst_handle handle) -{ - krb5_krbhst_info *h, *next; - - if (handle == NULL) - return; - - for (h = handle->hosts; h != NULL; h = next) { - next = h->next; - _krb5_free_krbhst_info(h); - } - - free(handle->realm); - free(handle); -} - -/* backwards compatibility ahead */ - -static krb5_error_code -gethostlist(krb5_context context, const char *realm, - unsigned int type, char ***hostlist) -{ - krb5_error_code ret; - int nhost = 0; - krb5_krbhst_handle handle; - char host[MAXHOSTNAMELEN]; - krb5_krbhst_info *hostinfo; - - ret = krb5_krbhst_init(context, realm, type, &handle); - if (ret) - return ret; - - while(krb5_krbhst_next(context, handle, &hostinfo) == 0) - nhost++; - if(nhost == 0) { - krb5_set_error_message(context, KRB5_KDC_UNREACH, - N_("No KDC found for realm %s", ""), realm); - return KRB5_KDC_UNREACH; - } - *hostlist = calloc(nhost + 1, sizeof(**hostlist)); - if(*hostlist == NULL) { - krb5_krbhst_free(context, handle); - return ENOMEM; - } - - krb5_krbhst_reset(context, handle); - nhost = 0; - while(krb5_krbhst_next_as_string(context, handle, - host, sizeof(host)) == 0) { - if(((*hostlist)[nhost++] = strdup(host)) == NULL) { - krb5_free_krbhst(context, *hostlist); - krb5_krbhst_free(context, handle); - return ENOMEM; - } - } - (*hostlist)[nhost] = NULL; - krb5_krbhst_free(context, handle); - return 0; -} - -/* - * return an malloced list of kadmin-hosts for `realm' in `hostlist' - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_krb_admin_hst (krb5_context context, - const krb5_realm *realm, - char ***hostlist) -{ - return gethostlist(context, *realm, KRB5_KRBHST_ADMIN, hostlist); -} - -/* - * return an malloced list of changepw-hosts for `realm' in `hostlist' - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_krb_changepw_hst (krb5_context context, - const krb5_realm *realm, - char ***hostlist) -{ - return gethostlist(context, *realm, KRB5_KRBHST_CHANGEPW, hostlist); -} - -/* - * return an malloced list of 524-hosts for `realm' in `hostlist' - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_krb524hst (krb5_context context, - const krb5_realm *realm, - char ***hostlist) -{ - return gethostlist(context, *realm, KRB5_KRBHST_KRB524, hostlist); -} - - -/* - * return an malloced list of KDC's for `realm' in `hostlist' - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_krbhst (krb5_context context, - const krb5_realm *realm, - char ***hostlist) -{ - return gethostlist(context, *realm, KRB5_KRBHST_KDC, hostlist); -} - -/* - * free all the memory allocated in `hostlist' - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_krbhst (krb5_context context, - char **hostlist) -{ - char **p; - - for (p = hostlist; *p; ++p) - free (*p); - free (hostlist); - return 0; -} diff --git a/kerberosV/src/lib/krb5/kuserok.c b/kerberosV/src/lib/krb5/kuserok.c deleted file mode 100644 index 2fe4e490aa4..00000000000 --- a/kerberosV/src/lib/krb5/kuserok.c +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Copyright (c) 1997 - 2005 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 "krb5_locl.h" -#include - -#ifndef _WIN32 - -/* see if principal is mentioned in the filename access file, return - TRUE (in result) if so, FALSE otherwise */ - -static krb5_error_code -check_one_file(krb5_context context, - const char *filename, - struct passwd *pwd, - krb5_principal principal, - krb5_boolean *result) -{ - FILE *f; - char buf[BUFSIZ]; - krb5_error_code ret; - struct stat st; - - *result = FALSE; - - f = fopen (filename, "r"); - if (f == NULL) - return errno; - rk_cloexec_file(f); - - /* check type and mode of file */ - if (fstat(fileno(f), &st) != 0) { - fclose (f); - return errno; - } - if (S_ISDIR(st.st_mode)) { - fclose (f); - return EISDIR; - } - if (st.st_uid != pwd->pw_uid && st.st_uid != 0) { - fclose (f); - return EACCES; - } - if ((st.st_mode & (S_IWGRP | S_IWOTH)) != 0) { - fclose (f); - return EACCES; - } - - while (fgets (buf, sizeof(buf), f) != NULL) { - krb5_principal tmp; - char *newline = buf + strcspn(buf, "\n"); - - if(*newline != '\n') { - int c; - c = fgetc(f); - if(c != EOF) { - while(c != EOF && c != '\n') - c = fgetc(f); - /* line was too long, so ignore it */ - continue; - } - } - *newline = '\0'; - ret = krb5_parse_name (context, buf, &tmp); - if (ret) - continue; - *result = krb5_principal_compare (context, principal, tmp); - krb5_free_principal (context, tmp); - if (*result) { - fclose (f); - return 0; - } - } - fclose (f); - return 0; -} - -static krb5_error_code -check_directory(krb5_context context, - const char *dirname, - struct passwd *pwd, - krb5_principal principal, - krb5_boolean *result) -{ - DIR *d; - struct dirent *dent; - char filename[MAXPATHLEN]; - krb5_error_code ret = 0; - struct stat st; - - *result = FALSE; - - if(lstat(dirname, &st) < 0) - return errno; - - if (!S_ISDIR(st.st_mode)) - return ENOTDIR; - - if (st.st_uid != pwd->pw_uid && st.st_uid != 0) - return EACCES; - if ((st.st_mode & (S_IWGRP | S_IWOTH)) != 0) - return EACCES; - - if((d = opendir(dirname)) == NULL) - return errno; - - { - int fd; - struct stat st2; - - fd = dirfd(d); - if(fstat(fd, &st2) < 0) { - closedir(d); - return errno; - } - if(st.st_dev != st2.st_dev || st.st_ino != st2.st_ino) { - closedir(d); - return EACCES; - } - } - - while((dent = readdir(d)) != NULL) { - if(strcmp(dent->d_name, ".") == 0 || - strcmp(dent->d_name, "..") == 0 || - dent->d_name[0] == '#' || /* emacs autosave */ - dent->d_name[strlen(dent->d_name) - 1] == '~') /* emacs backup */ - continue; - snprintf(filename, sizeof(filename), "%s/%s", dirname, dent->d_name); - ret = check_one_file(context, filename, pwd, principal, result); - if(ret == 0 && *result == TRUE) - break; - ret = 0; /* don't propagate errors upstream */ - } - closedir(d); - return ret; -} - -#endif /* !_WIN32 */ - -static krb5_boolean -match_local_principals(krb5_context context, - krb5_principal principal, - const char *luser) -{ - krb5_error_code ret; - krb5_realm *realms, *r; - krb5_boolean result = FALSE; - - /* multi-component principals can never match */ - if(krb5_principal_get_comp_string(context, principal, 1) != NULL) - return FALSE; - - ret = krb5_get_default_realms (context, &realms); - if (ret) - return FALSE; - - for (r = realms; *r != NULL; ++r) { - if(strcmp(krb5_principal_get_realm(context, principal), - *r) != 0) - continue; - if(strcmp(krb5_principal_get_comp_string(context, principal, 0), - luser) == 0) { - result = TRUE; - break; - } - } - krb5_free_host_realm (context, realms); - return result; -} - -/** - * This function takes the name of a local user and checks if - * principal is allowed to log in as that user. - * - * The user may have a ~/.k5login file listing principals that are - * allowed to login as that user. If that file does not exist, all - * principals with a first component identical to the username, and a - * realm considered local, are allowed access. - * - * The .k5login file must contain one principal per line, be owned by - * user and not be writable by group or other (but must be readable by - * anyone). - * - * Note that if the file exists, no implicit access rights are given - * to user@@LOCALREALM. - * - * Optionally, a set of files may be put in ~/.k5login.d (a - * directory), in which case they will all be checked in the same - * manner as .k5login. The files may be called anything, but files - * starting with a hash (#) , or ending with a tilde (~) are - * ignored. Subdirectories are not traversed. Note that this directory - * may not be checked by other Kerberos implementations. - * - * If no configuration file exists, match user against local domains, - * ie luser@@LOCAL-REALMS-IN-CONFIGURATION-FILES. - * - * @param context Kerberos 5 context. - * @param principal principal to check if allowed to login - * @param luser local user id - * - * @return returns TRUE if access should be granted, FALSE otherwise. - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_kuserok (krb5_context context, - krb5_principal principal, - const char *luser) -{ -#ifndef _WIN32 - char *buf; - size_t buflen; - struct passwd *pwd = NULL; - char *profile_dir = NULL; - krb5_error_code ret; - krb5_boolean result = FALSE; - - krb5_boolean found_file = FALSE; - -#ifdef POSIX_GETPWNAM_R - char pwbuf[2048]; - struct passwd pw; - - if(getpwnam_r(luser, &pw, pwbuf, sizeof(pwbuf), &pwd) != 0) - return FALSE; -#else - pwd = getpwnam (luser); -#endif - if (pwd == NULL) - return FALSE; - profile_dir = pwd->pw_dir; - -#define KLOGIN "/.k5login" - buflen = strlen(profile_dir) + sizeof(KLOGIN) + 2; /* 2 for .d */ - buf = malloc(buflen); - if(buf == NULL) - return FALSE; - /* check user's ~/.k5login */ - strlcpy(buf, profile_dir, buflen); - strlcat(buf, KLOGIN, buflen); - ret = check_one_file(context, buf, pwd, principal, &result); - - if(ret == 0 && result == TRUE) { - free(buf); - return TRUE; - } - - if(ret != ENOENT) - found_file = TRUE; - - strlcat(buf, ".d", buflen); - ret = check_directory(context, buf, pwd, principal, &result); - free(buf); - if(ret == 0 && result == TRUE) - return TRUE; - - if(ret != ENOENT && ret != ENOTDIR) - found_file = TRUE; - - /* finally if no files exist, allow all principals matching - @ */ - if(found_file == FALSE) - return match_local_principals(context, principal, luser); - - return FALSE; -#else - /* The .k5login file may be on a remote profile and we don't have - access to the profile until we have a token handle for the - user's credentials. */ - return match_local_principals(context, principal, luser); -#endif -} diff --git a/kerberosV/src/lib/krb5/locate_plugin.h b/kerberosV/src/lib/krb5/locate_plugin.h deleted file mode 100644 index e756642aadb..00000000000 --- a/kerberosV/src/lib/krb5/locate_plugin.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2006 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: locate_plugin.h,v 1.1 2013/06/17 18:57:44 robert Exp $ */ - -#ifndef HEIMDAL_KRB5_LOCATE_PLUGIN_H -#define HEIMDAL_KRB5_LOCATE_PLUGIN_H 1 - -#define KRB5_PLUGIN_LOCATE "service_locator" - -enum locate_service_type { - locate_service_kdc = 1, - locate_service_master_kdc, - locate_service_kadmin, - locate_service_krb524, - locate_service_kpasswd -}; - -typedef krb5_error_code -(*krb5plugin_service_locate_lookup) (void *, enum locate_service_type, - const char *, int, int, - int (*)(void *,int,struct sockaddr *), - void *); - - -typedef struct krb5plugin_service_locate_ftable { - int minor_version; - krb5_error_code (*init)(krb5_context, void **); - void (*fini)(void *); - krb5plugin_service_locate_lookup lookup; -} krb5plugin_service_locate_ftable; - -#endif /* HEIMDAL_KRB5_LOCATE_PLUGIN_H */ - diff --git a/kerberosV/src/lib/krb5/log.c b/kerberosV/src/lib/krb5/log.c deleted file mode 100644 index 172b7165bb1..00000000000 --- a/kerberosV/src/lib/krb5/log.c +++ /dev/null @@ -1,516 +0,0 @@ -/* - * Copyright (c) 1997-2006 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" -#include - -struct facility { - int min; - int max; - krb5_log_log_func_t log_func; - krb5_log_close_func_t close_func; - void *data; -}; - -static struct facility* -log_realloc(krb5_log_facility *f) -{ - struct facility *fp; - fp = realloc(f->val, (f->len + 1) * sizeof(*f->val)); - if(fp == NULL) - return NULL; - f->len++; - f->val = fp; - fp += f->len - 1; - return fp; -} - -struct s2i { - const char *s; - int val; -}; - -#define L(X) { #X, LOG_ ## X } - -static struct s2i syslogvals[] = { - L(EMERG), - L(ALERT), - L(CRIT), - L(ERR), - L(WARNING), - L(NOTICE), - L(INFO), - L(DEBUG), - - L(AUTH), -#ifdef LOG_AUTHPRIV - L(AUTHPRIV), -#endif -#ifdef LOG_CRON - L(CRON), -#endif - L(DAEMON), -#ifdef LOG_FTP - L(FTP), -#endif - L(KERN), - L(LPR), - L(MAIL), -#ifdef LOG_NEWS - L(NEWS), -#endif - L(SYSLOG), - L(USER), -#ifdef LOG_UUCP - L(UUCP), -#endif - L(LOCAL0), - L(LOCAL1), - L(LOCAL2), - L(LOCAL3), - L(LOCAL4), - L(LOCAL5), - L(LOCAL6), - L(LOCAL7), - { NULL, -1 } -}; - -static int -find_value(const char *s, struct s2i *table) -{ - while(table->s && strcasecmp(table->s, s)) - table++; - return table->val; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_initlog(krb5_context context, - const char *program, - krb5_log_facility **fac) -{ - krb5_log_facility *f = calloc(1, sizeof(*f)); - if(f == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - f->program = strdup(program); - if(f->program == NULL){ - free(f); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - *fac = f; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_addlog_func(krb5_context context, - krb5_log_facility *fac, - int min, - int max, - krb5_log_log_func_t log_func, - krb5_log_close_func_t close_func, - void *data) -{ - struct facility *fp = log_realloc(fac); - if(fp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - fp->min = min; - fp->max = max; - fp->log_func = log_func; - fp->close_func = close_func; - fp->data = data; - return 0; -} - - -struct _heimdal_syslog_data{ - int priority; -}; - -static void KRB5_CALLCONV -log_syslog(const char *timestr, - const char *msg, - void *data) - -{ - struct _heimdal_syslog_data *s = data; - syslog(s->priority, "%s", msg); -} - -static void KRB5_CALLCONV -close_syslog(void *data) -{ - free(data); - closelog(); -} - -static krb5_error_code -open_syslog(krb5_context context, - krb5_log_facility *facility, int min, int max, - const char *sev, const char *fac) -{ - struct _heimdal_syslog_data *sd = malloc(sizeof(*sd)); - int i; - - if(sd == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - i = find_value(sev, syslogvals); - if(i == -1) - i = LOG_ERR; - sd->priority = i; - i = find_value(fac, syslogvals); - if(i == -1) - i = LOG_AUTH; - sd->priority |= i; - roken_openlog(facility->program, LOG_PID | LOG_NDELAY, i); - return krb5_addlog_func(context, facility, min, max, - log_syslog, close_syslog, sd); -} - -struct file_data{ - const char *filename; - const char *mode; - FILE *fd; - int keep_open; -}; - -static void KRB5_CALLCONV -log_file(const char *timestr, - const char *msg, - void *data) -{ - struct file_data *f = data; - char *msgclean; - size_t len = strlen(msg); - if(f->keep_open == 0) - f->fd = fopen(f->filename, f->mode); - if(f->fd == NULL) - return; - /* make sure the log doesn't contain special chars */ - msgclean = malloc((len + 1) * 4); - if (msgclean == NULL) - goto out; - strvisx(msgclean, rk_UNCONST(msg), len, VIS_OCTAL); - fprintf(f->fd, "%s %s\n", timestr, msgclean); - free(msgclean); - out: - if(f->keep_open == 0) { - fclose(f->fd); - f->fd = NULL; - } -} - -static void KRB5_CALLCONV -close_file(void *data) -{ - struct file_data *f = data; - if(f->keep_open && f->filename) - fclose(f->fd); - free(data); -} - -static krb5_error_code -open_file(krb5_context context, krb5_log_facility *fac, int min, int max, - const char *filename, const char *mode, FILE *f, int keep_open) -{ - struct file_data *fd = malloc(sizeof(*fd)); - if(fd == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - fd->filename = filename; - fd->mode = mode; - fd->fd = f; - fd->keep_open = keep_open; - - return krb5_addlog_func(context, fac, min, max, log_file, close_file, fd); -} - - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_addlog_dest(krb5_context context, krb5_log_facility *f, const char *orig) -{ - krb5_error_code ret = 0; - int min = 0, max = -1, n; - char c; - const char *p = orig; - - n = sscanf(p, "%d%c%d/", &min, &c, &max); - if(n == 2){ - if(c == '/') { - if(min < 0){ - max = -min; - min = 0; - }else{ - max = min; - } - } - } - if(n){ - p = strchr(p, '/'); - if(p == NULL) { - krb5_set_error_message(context, HEIM_ERR_LOG_PARSE, - N_("failed to parse \"%s\"", ""), orig); - return HEIM_ERR_LOG_PARSE; - } - p++; - } - if(strcmp(p, "STDERR") == 0){ - ret = open_file(context, f, min, max, NULL, NULL, stderr, 1); - }else if(strcmp(p, "CONSOLE") == 0){ - ret = open_file(context, f, min, max, "/dev/console", "w", NULL, 0); - }else if(strncmp(p, "FILE", 4) == 0 && (p[4] == ':' || p[4] == '=')){ - char *fn; - FILE *file = NULL; - int keep_open = 0; - fn = strdup(p + 5); - if(fn == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - if(p[4] == '='){ - int i = open(fn, O_WRONLY | O_CREAT | - O_TRUNC | O_APPEND, 0666); - if(i < 0) { - ret = errno; - krb5_set_error_message(context, ret, - N_("open(%s) logile: %s", ""), fn, - strerror(ret)); - free(fn); - return ret; - } - rk_cloexec(i); - file = fdopen(i, "a"); - if(file == NULL){ - ret = errno; - close(i); - krb5_set_error_message(context, ret, - N_("fdopen(%s) logfile: %s", ""), - fn, strerror(ret)); - free(fn); - return ret; - } - keep_open = 1; - } - ret = open_file(context, f, min, max, fn, "a", file, keep_open); - }else if(strncmp(p, "DEVICE", 6) == 0 && (p[6] == ':' || p[6] == '=')){ - ret = open_file(context, f, min, max, strdup(p + 7), "w", NULL, 0); - }else if(strncmp(p, "SYSLOG", 6) == 0 && (p[6] == '\0' || p[6] == ':')){ - char severity[128] = ""; - char facility[128] = ""; - p += 6; - if(*p != '\0') - p++; - if(strsep_copy(&p, ":", severity, sizeof(severity)) != -1) - strsep_copy(&p, ":", facility, sizeof(facility)); - if(*severity == '\0') - strlcpy(severity, "ERR", sizeof(severity)); - if(*facility == '\0') - strlcpy(facility, "AUTH", sizeof(facility)); - ret = open_syslog(context, f, min, max, severity, facility); - }else{ - ret = HEIM_ERR_LOG_PARSE; /* XXX */ - krb5_set_error_message (context, ret, - N_("unknown log type: %s", ""), p); - } - return ret; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_openlog(krb5_context context, - const char *program, - krb5_log_facility **fac) -{ - krb5_error_code ret; - char **p, **q; - - ret = krb5_initlog(context, program, fac); - if(ret) - return ret; - - p = krb5_config_get_strings(context, NULL, "logging", program, NULL); - if(p == NULL) - p = krb5_config_get_strings(context, NULL, "logging", "default", NULL); - if(p){ - for(q = p; *q && ret == 0; q++) - ret = krb5_addlog_dest(context, *fac, *q); - krb5_config_free_strings(p); - }else - ret = krb5_addlog_dest(context, *fac, "SYSLOG"); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_closelog(krb5_context context, - krb5_log_facility *fac) -{ - int i; - for(i = 0; i < fac->len; i++) - (*fac->val[i].close_func)(fac->val[i].data); - free(fac->val); - free(fac->program); - fac->val = NULL; - fac->len = 0; - fac->program = NULL; - free(fac); - return 0; -} - -#undef __attribute__ -#define __attribute__(X) - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vlog_msg(krb5_context context, - krb5_log_facility *fac, - char **reply, - int level, - const char *fmt, - va_list ap) - __attribute__((format (printf, 5, 0))) -{ - - char *msg = NULL; - const char *actual = NULL; - char buf[64]; - time_t t = 0; - int i; - - for(i = 0; fac && i < fac->len; i++) - if(fac->val[i].min <= level && - (fac->val[i].max < 0 || fac->val[i].max >= level)) { - if(t == 0) { - t = time(NULL); - krb5_format_time(context, t, buf, sizeof(buf), TRUE); - } - if(actual == NULL) { - int ret = vasprintf(&msg, fmt, ap); - if(ret < 0 || msg == NULL) - actual = fmt; - else - actual = msg; - } - (*fac->val[i].log_func)(buf, actual, fac->val[i].data); - } - if(reply == NULL) - free(msg); - else - *reply = msg; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vlog(krb5_context context, - krb5_log_facility *fac, - int level, - const char *fmt, - va_list ap) - __attribute__((format (printf, 4, 0))) -{ - return krb5_vlog_msg(context, fac, NULL, level, fmt, ap); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_log_msg(krb5_context context, - krb5_log_facility *fac, - int level, - char **reply, - const char *fmt, - ...) - __attribute__((format (printf, 5, 6))) -{ - va_list ap; - krb5_error_code ret; - - va_start(ap, fmt); - ret = krb5_vlog_msg(context, fac, reply, level, fmt, ap); - va_end(ap); - return ret; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_log(krb5_context context, - krb5_log_facility *fac, - int level, - const char *fmt, - ...) - __attribute__((format (printf, 4, 5))) -{ - va_list ap; - krb5_error_code ret; - - va_start(ap, fmt); - ret = krb5_vlog(context, fac, level, fmt, ap); - va_end(ap); - return ret; -} - -void KRB5_LIB_FUNCTION -_krb5_debug(krb5_context context, - int level, - const char *fmt, - ...) - __attribute__((format (printf, 3, 4))) -{ - va_list ap; - - if (context == NULL || context->debug_dest == NULL) - return; - - va_start(ap, fmt); - krb5_vlog(context, context->debug_dest, level, fmt, ap); - va_end(ap); -} - -krb5_boolean KRB5_LIB_FUNCTION -_krb5_have_debug(krb5_context context, int level) -{ - if (context == NULL || context->debug_dest == NULL) - return 0 ; - return 1; -} diff --git a/kerberosV/src/lib/krb5/mcache.c b/kerberosV/src/lib/krb5/mcache.c deleted file mode 100644 index e4b90c17e7b..00000000000 --- a/kerberosV/src/lib/krb5/mcache.c +++ /dev/null @@ -1,520 +0,0 @@ -/* - * Copyright (c) 1997-2004 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" - -typedef struct krb5_mcache { - char *name; - unsigned int refcnt; - int dead; - krb5_principal primary_principal; - struct link { - krb5_creds cred; - struct link *next; - } *creds; - struct krb5_mcache *next; - time_t mtime; - krb5_deltat kdc_offset; -} krb5_mcache; - -static HEIMDAL_MUTEX mcc_mutex = HEIMDAL_MUTEX_INITIALIZER; -static struct krb5_mcache *mcc_head; - -#define MCACHE(X) ((krb5_mcache *)(X)->data.data) - -#define MISDEAD(X) ((X)->dead) - -static const char* KRB5_CALLCONV -mcc_get_name(krb5_context context, - krb5_ccache id) -{ - return MCACHE(id)->name; -} - -static krb5_mcache * KRB5_CALLCONV -mcc_alloc(const char *name) -{ - krb5_mcache *m, *m_c; - int ret = 0; - - ALLOC(m, 1); - if(m == NULL) - return NULL; - if(name == NULL) - ret = asprintf(&m->name, "%p", m); - else - m->name = strdup(name); - if(ret < 0 || m->name == NULL) { - free(m); - return NULL; - } - /* check for dups first */ - HEIMDAL_MUTEX_lock(&mcc_mutex); - for (m_c = mcc_head; m_c != NULL; m_c = m_c->next) - if (strcmp(m->name, m_c->name) == 0) - break; - if (m_c) { - free(m->name); - free(m); - HEIMDAL_MUTEX_unlock(&mcc_mutex); - return NULL; - } - - m->dead = 0; - m->refcnt = 1; - m->primary_principal = NULL; - m->creds = NULL; - m->mtime = time(NULL); - m->kdc_offset = 0; - m->next = mcc_head; - mcc_head = m; - HEIMDAL_MUTEX_unlock(&mcc_mutex); - return m; -} - -static krb5_error_code KRB5_CALLCONV -mcc_resolve(krb5_context context, krb5_ccache *id, const char *res) -{ - krb5_mcache *m; - - HEIMDAL_MUTEX_lock(&mcc_mutex); - for (m = mcc_head; m != NULL; m = m->next) - if (strcmp(m->name, res) == 0) - break; - HEIMDAL_MUTEX_unlock(&mcc_mutex); - - if (m != NULL) { - m->refcnt++; - (*id)->data.data = m; - (*id)->data.length = sizeof(*m); - return 0; - } - - m = mcc_alloc(res); - if (m == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - - (*id)->data.data = m; - (*id)->data.length = sizeof(*m); - - return 0; -} - - -static krb5_error_code KRB5_CALLCONV -mcc_gen_new(krb5_context context, krb5_ccache *id) -{ - krb5_mcache *m; - - m = mcc_alloc(NULL); - - if (m == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - - (*id)->data.data = m; - (*id)->data.length = sizeof(*m); - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_initialize(krb5_context context, - krb5_ccache id, - krb5_principal primary_principal) -{ - krb5_mcache *m = MCACHE(id); - m->dead = 0; - m->mtime = time(NULL); - return krb5_copy_principal (context, - primary_principal, - &m->primary_principal); -} - -static int -mcc_close_internal(krb5_mcache *m) -{ - if (--m->refcnt != 0) - return 0; - - if (MISDEAD(m)) { - free (m->name); - return 1; - } - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_close(krb5_context context, - krb5_ccache id) -{ - if (mcc_close_internal(MCACHE(id))) - krb5_data_free(&id->data); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_destroy(krb5_context context, - krb5_ccache id) -{ - krb5_mcache **n, *m = MCACHE(id); - struct link *l; - - if (m->refcnt == 0) - krb5_abortx(context, "mcc_destroy: refcnt already 0"); - - if (!MISDEAD(m)) { - /* if this is an active mcache, remove it from the linked - list, and free all data */ - HEIMDAL_MUTEX_lock(&mcc_mutex); - for(n = &mcc_head; n && *n; n = &(*n)->next) { - if(m == *n) { - *n = m->next; - break; - } - } - HEIMDAL_MUTEX_unlock(&mcc_mutex); - if (m->primary_principal != NULL) { - krb5_free_principal (context, m->primary_principal); - m->primary_principal = NULL; - } - m->dead = 1; - - l = m->creds; - while (l != NULL) { - struct link *old; - - krb5_free_cred_contents (context, &l->cred); - old = l; - l = l->next; - free (old); - } - m->creds = NULL; - } - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_store_cred(krb5_context context, - krb5_ccache id, - krb5_creds *creds) -{ - krb5_mcache *m = MCACHE(id); - krb5_error_code ret; - struct link *l; - - if (MISDEAD(m)) - return ENOENT; - - l = malloc (sizeof(*l)); - if (l == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - l->next = m->creds; - m->creds = l; - memset (&l->cred, 0, sizeof(l->cred)); - ret = krb5_copy_creds_contents (context, creds, &l->cred); - if (ret) { - m->creds = l->next; - free (l); - return ret; - } - m->mtime = time(NULL); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_get_principal(krb5_context context, - krb5_ccache id, - krb5_principal *principal) -{ - krb5_mcache *m = MCACHE(id); - - if (MISDEAD(m) || m->primary_principal == NULL) - return ENOENT; - return krb5_copy_principal (context, - m->primary_principal, - principal); -} - -static krb5_error_code KRB5_CALLCONV -mcc_get_first (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor) -{ - krb5_mcache *m = MCACHE(id); - - if (MISDEAD(m)) - return ENOENT; - - *cursor = m->creds; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_get_next (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor, - krb5_creds *creds) -{ - krb5_mcache *m = MCACHE(id); - struct link *l; - - if (MISDEAD(m)) - return ENOENT; - - l = *cursor; - if (l != NULL) { - *cursor = l->next; - return krb5_copy_creds_contents (context, - &l->cred, - creds); - } else - return KRB5_CC_END; -} - -static krb5_error_code KRB5_CALLCONV -mcc_end_get (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor) -{ - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_remove_cred(krb5_context context, - krb5_ccache id, - krb5_flags which, - krb5_creds *mcreds) -{ - krb5_mcache *m = MCACHE(id); - struct link **q, *p; - for(q = &m->creds, p = *q; p; p = *q) { - if(krb5_compare_creds(context, which, mcreds, &p->cred)) { - *q = p->next; - krb5_free_cred_contents(context, &p->cred); - free(p); - m->mtime = time(NULL); - } else - q = &p->next; - } - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_set_flags(krb5_context context, - krb5_ccache id, - krb5_flags flags) -{ - return 0; /* XXX */ -} - -struct mcache_iter { - krb5_mcache *cache; -}; - -static krb5_error_code KRB5_CALLCONV -mcc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) -{ - struct mcache_iter *iter; - - iter = calloc(1, sizeof(*iter)); - if (iter == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - HEIMDAL_MUTEX_lock(&mcc_mutex); - iter->cache = mcc_head; - if (iter->cache) - iter->cache->refcnt++; - HEIMDAL_MUTEX_unlock(&mcc_mutex); - - *cursor = iter; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_get_cache_next(krb5_context context, krb5_cc_cursor cursor, krb5_ccache *id) -{ - struct mcache_iter *iter = cursor; - krb5_error_code ret; - krb5_mcache *m; - - if (iter->cache == NULL) - return KRB5_CC_END; - - HEIMDAL_MUTEX_lock(&mcc_mutex); - m = iter->cache; - if (m->next) - m->next->refcnt++; - iter->cache = m->next; - HEIMDAL_MUTEX_unlock(&mcc_mutex); - - ret = _krb5_cc_allocate(context, &krb5_mcc_ops, id); - if (ret) - return ret; - - (*id)->data.data = m; - (*id)->data.length = sizeof(*m); - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) -{ - struct mcache_iter *iter = cursor; - - if (iter->cache) - mcc_close_internal(iter->cache); - iter->cache = NULL; - free(iter); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_move(krb5_context context, krb5_ccache from, krb5_ccache to) -{ - krb5_mcache *mfrom = MCACHE(from), *mto = MCACHE(to); - struct link *creds; - krb5_principal principal; - krb5_mcache **n; - - HEIMDAL_MUTEX_lock(&mcc_mutex); - - /* drop the from cache from the linked list to avoid lookups */ - for(n = &mcc_head; n && *n; n = &(*n)->next) { - if(mfrom == *n) { - *n = mfrom->next; - break; - } - } - - /* swap creds */ - creds = mto->creds; - mto->creds = mfrom->creds; - mfrom->creds = creds; - /* swap principal */ - principal = mto->primary_principal; - mto->primary_principal = mfrom->primary_principal; - mfrom->primary_principal = principal; - - mto->mtime = mfrom->mtime = time(NULL); - - HEIMDAL_MUTEX_unlock(&mcc_mutex); - mcc_destroy(context, from); - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_default_name(krb5_context context, char **str) -{ - *str = strdup("MEMORY:"); - if (*str == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_lastchange(krb5_context context, krb5_ccache id, krb5_timestamp *mtime) -{ - *mtime = MCACHE(id)->mtime; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_set_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat kdc_offset) -{ - krb5_mcache *m = MCACHE(id); - m->kdc_offset = kdc_offset; - return 0; -} - -static krb5_error_code KRB5_CALLCONV -mcc_get_kdc_offset(krb5_context context, krb5_ccache id, krb5_deltat *kdc_offset) -{ - krb5_mcache *m = MCACHE(id); - *kdc_offset = m->kdc_offset; - return 0; -} - - -/** - * Variable containing the MEMORY based credential cache implemention. - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_VARIABLE const krb5_cc_ops krb5_mcc_ops = { - KRB5_CC_OPS_VERSION, - "MEMORY", - mcc_get_name, - mcc_resolve, - mcc_gen_new, - mcc_initialize, - mcc_destroy, - mcc_close, - mcc_store_cred, - NULL, /* mcc_retrieve */ - mcc_get_principal, - mcc_get_first, - mcc_get_next, - mcc_end_get, - mcc_remove_cred, - mcc_set_flags, - NULL, - mcc_get_cache_first, - mcc_get_cache_next, - mcc_end_cache_get, - mcc_move, - mcc_default_name, - NULL, - mcc_lastchange, - mcc_set_kdc_offset, - mcc_get_kdc_offset -}; diff --git a/kerberosV/src/lib/krb5/misc.c b/kerberosV/src/lib/krb5/misc.c deleted file mode 100644 index ac6720c4e99..00000000000 --- a/kerberosV/src/lib/krb5/misc.c +++ /dev/null @@ -1,128 +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. - */ - -#include "krb5_locl.h" -#ifdef HAVE_EXECINFO_H -#include -#endif - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_s4u2self_to_checksumdata(krb5_context context, - const PA_S4U2Self *self, - krb5_data *data) -{ - krb5_error_code ret; - krb5_ssize_t ssize; - krb5_storage *sp; - size_t size; - size_t i; - - sp = krb5_storage_emem(); - if (sp == NULL) { - krb5_clear_error_message(context); - return ENOMEM; - } - krb5_storage_set_flags(sp, KRB5_STORAGE_BYTEORDER_LE); - ret = krb5_store_int32(sp, self->name.name_type); - if (ret) - goto out; - for (i = 0; i < self->name.name_string.len; i++) { - size = strlen(self->name.name_string.val[i]); - ssize = krb5_storage_write(sp, self->name.name_string.val[i], size); - if (ssize != (krb5_ssize_t)size) { - ret = ENOMEM; - goto out; - } - } - size = strlen(self->realm); - ssize = krb5_storage_write(sp, self->realm, size); - if (ssize != (krb5_ssize_t)size) { - ret = ENOMEM; - goto out; - } - size = strlen(self->auth); - ssize = krb5_storage_write(sp, self->auth, size); - if (ssize != (krb5_ssize_t)size) { - ret = ENOMEM; - goto out; - } - - ret = krb5_storage_to_data(sp, data); - krb5_storage_free(sp); - return ret; - -out: - krb5_clear_error_message(context); - return ret; -} - -krb5_error_code -krb5_enomem(krb5_context context) -{ - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; -} - -void -_krb5_debug_backtrace(krb5_context context) -{ -#if defined(HAVE_BACKTRACE) && !defined(HEIMDAL_SMALLER) - void *stack[128]; - char **strs = NULL; - int i, frames = backtrace(stack, sizeof(stack) / sizeof(stack[0])); - if (frames > 0) - strs = backtrace_symbols(stack, frames); - if (strs) { - for (i = 0; i < frames; i++) - _krb5_debug(context, 10, "frame %d: %s", i, strs[i]); - free(strs); - } -#endif -} - -krb5_error_code -_krb5_einval(krb5_context context, const char *func, unsigned long argn) -{ -#ifndef HEIMDAL_SMALLER - krb5_set_error_message(context, EINVAL, - N_("programmer error: invalid argument to %s argument %lu", - "function:line"), - func, argn); - if (_krb5_have_debug(context, 10)) { - _krb5_debug(context, 10, "invalid argument to function %s argument %lu", - func, argn); - _krb5_debug_backtrace(context); - } -#endif - return EINVAL; -} diff --git a/kerberosV/src/lib/krb5/mit_glue.c b/kerberosV/src/lib/krb5/mit_glue.c deleted file mode 100644 index 16c230a11f9..00000000000 --- a/kerberosV/src/lib/krb5/mit_glue.c +++ /dev/null @@ -1,432 +0,0 @@ -/* - * Copyright (c) 2003 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 "krb5_locl.h" - -#ifndef HEIMDAL_SMALLER - -/* - * Glue for MIT API - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_make_checksum(krb5_context context, - krb5_cksumtype cksumtype, - const krb5_keyblock *key, - krb5_keyusage usage, - const krb5_data *input, - krb5_checksum *cksum) -{ - krb5_error_code ret; - krb5_crypto crypto; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - return ret; - - ret = krb5_create_checksum(context, crypto, usage, cksumtype, - input->data, input->length, cksum); - krb5_crypto_destroy(context, crypto); - - return ret ; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_verify_checksum(krb5_context context, const krb5_keyblock *key, - krb5_keyusage usage, const krb5_data *data, - const krb5_checksum *cksum, krb5_boolean *valid) -{ - krb5_error_code ret; - krb5_checksum data_cksum; - - *valid = 0; - - ret = krb5_c_make_checksum(context, cksum->cksumtype, - key, usage, data, &data_cksum); - if (ret) - return ret; - - if (data_cksum.cksumtype == cksum->cksumtype - && krb5_data_ct_cmp(&data_cksum.checksum, &cksum->checksum) == 0) - *valid = 1; - - krb5_free_checksum_contents(context, &data_cksum); - - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_get_checksum(krb5_context context, const krb5_checksum *cksum, - krb5_cksumtype *type, krb5_data **data) -{ - krb5_error_code ret; - - if (type) - *type = cksum->cksumtype; - if (data) { - *data = malloc(sizeof(**data)); - if (*data == NULL) - return ENOMEM; - - ret = der_copy_octet_string(&cksum->checksum, *data); - if (ret) { - free(*data); - *data = NULL; - return ret; - } - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_set_checksum(krb5_context context, krb5_checksum *cksum, - krb5_cksumtype type, const krb5_data *data) -{ - cksum->cksumtype = type; - return der_copy_octet_string(data, &cksum->checksum); -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_checksum (krb5_context context, krb5_checksum *cksum) -{ - krb5_checksum_free(context, cksum); - free(cksum); -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_checksum_contents(krb5_context context, krb5_checksum *cksum) -{ - krb5_checksum_free(context, cksum); - memset(cksum, 0, sizeof(*cksum)); -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_checksum_free(krb5_context context, krb5_checksum *cksum) -{ - free_Checksum(cksum); -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_c_valid_enctype (krb5_enctype etype) -{ - return !krb5_enctype_valid(NULL, etype); -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_c_valid_cksumtype(krb5_cksumtype ctype) -{ - return krb5_cksumtype_valid(NULL, ctype); -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_c_is_coll_proof_cksum(krb5_cksumtype ctype) -{ - return krb5_checksum_is_collision_proof(NULL, ctype); -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_c_is_keyed_cksum(krb5_cksumtype ctype) -{ - return krb5_checksum_is_keyed(NULL, ctype); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_checksum (krb5_context context, - const krb5_checksum *old, - krb5_checksum **new) -{ - *new = malloc(sizeof(**new)); - if (*new == NULL) - return ENOMEM; - return copy_Checksum(old, *new); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_checksum_length (krb5_context context, krb5_cksumtype cksumtype, - size_t *length) -{ - return krb5_checksumsize(context, cksumtype, length); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_block_size(krb5_context context, - krb5_enctype enctype, - size_t *blocksize) -{ - krb5_error_code ret; - krb5_crypto crypto; - krb5_keyblock key; - - ret = krb5_generate_random_keyblock(context, enctype, &key); - if (ret) - return ret; - - ret = krb5_crypto_init(context, &key, 0, &crypto); - krb5_free_keyblock_contents(context, &key); - if (ret) - return ret; - ret = krb5_crypto_getblocksize(context, crypto, blocksize); - krb5_crypto_destroy(context, crypto); - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_decrypt(krb5_context context, - const krb5_keyblock key, - krb5_keyusage usage, - const krb5_data *ivec, - krb5_enc_data *input, - krb5_data *output) -{ - krb5_error_code ret; - krb5_crypto crypto; - - ret = krb5_crypto_init(context, &key, input->enctype, &crypto); - if (ret) - return ret; - - if (ivec) { - size_t blocksize; - - ret = krb5_crypto_getblocksize(context, crypto, &blocksize); - if (ret) { - krb5_crypto_destroy(context, crypto); - return ret; - } - - if (blocksize > ivec->length) { - krb5_crypto_destroy(context, crypto); - return KRB5_BAD_MSIZE; - } - } - - ret = krb5_decrypt_ivec(context, crypto, usage, - input->ciphertext.data, input->ciphertext.length, - output, - ivec ? ivec->data : NULL); - - krb5_crypto_destroy(context, crypto); - - return ret ; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_encrypt(krb5_context context, - const krb5_keyblock *key, - krb5_keyusage usage, - const krb5_data *ivec, - const krb5_data *input, - krb5_enc_data *output) -{ - krb5_error_code ret; - krb5_crypto crypto; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - return ret; - - if (ivec) { - size_t blocksize; - - ret = krb5_crypto_getblocksize(context, crypto, &blocksize); - if (ret) { - krb5_crypto_destroy(context, crypto); - return ret; - } - - if (blocksize > ivec->length) { - krb5_crypto_destroy(context, crypto); - return KRB5_BAD_MSIZE; - } - } - - ret = krb5_encrypt_ivec(context, crypto, usage, - input->data, input->length, - &output->ciphertext, - ivec ? ivec->data : NULL); - output->kvno = 0; - krb5_crypto_getenctype(context, crypto, &output->enctype); - - krb5_crypto_destroy(context, crypto); - - return ret ; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_encrypt_length(krb5_context context, - krb5_enctype enctype, - size_t inputlen, - size_t *length) -{ - krb5_error_code ret; - krb5_crypto crypto; - krb5_keyblock key; - - ret = krb5_generate_random_keyblock(context, enctype, &key); - if (ret) - return ret; - - ret = krb5_crypto_init(context, &key, 0, &crypto); - krb5_free_keyblock_contents(context, &key); - if (ret) - return ret; - - *length = krb5_get_wrapped_length(context, crypto, inputlen); - krb5_crypto_destroy(context, crypto); - - return 0; -} - -/** - * Deprecated: keytypes doesn't exists, they are really enctypes. - * - * @ingroup krb5_deprecated - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_enctype_compare(krb5_context context, - krb5_enctype e1, - krb5_enctype e2, - krb5_boolean *similar) - KRB5_DEPRECATED_FUNCTION("Use X instead") -{ - *similar = (e1 == e2); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_make_random_key(krb5_context context, - krb5_enctype enctype, - krb5_keyblock *random_key) -{ - return krb5_generate_random_keyblock(context, enctype, random_key); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_keylengths(krb5_context context, - krb5_enctype enctype, - size_t *ilen, - size_t *keylen) -{ - krb5_error_code ret; - - ret = krb5_enctype_keybits(context, enctype, ilen); - if (ret) - return ret; - *ilen = (*ilen + 7) / 8; - return krb5_enctype_keysize(context, enctype, keylen); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_prf_length(krb5_context context, - krb5_enctype type, - size_t *length) -{ - return krb5_crypto_prf_length(context, type, length); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_prf(krb5_context context, - const krb5_keyblock *key, - const krb5_data *input, - krb5_data *output) -{ - krb5_crypto crypto; - krb5_error_code ret; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - return ret; - - ret = krb5_crypto_prf(context, crypto, input, output); - krb5_crypto_destroy(context, crypto); - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_c_random_make_octets(krb5_context context, krb5_data * data) -{ - return krb5_generate_random_keyblock(context, data->length, data->data); -} - -/** - * MIT compat glue - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_cc_copy_creds(krb5_context context, - const krb5_ccache from, - krb5_ccache to) -{ - return krb5_cc_copy_cache(context, from, to); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getsendsubkey(krb5_context context, krb5_auth_context auth_context, - krb5_keyblock **keyblock) -{ - return krb5_auth_con_getlocalsubkey(context, auth_context, keyblock); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_getrecvsubkey(krb5_context context, krb5_auth_context auth_context, - krb5_keyblock **keyblock) -{ - return krb5_auth_con_getremotesubkey(context, auth_context, keyblock); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setsendsubkey(krb5_context context, krb5_auth_context auth_context, - krb5_keyblock *keyblock) -{ - return krb5_auth_con_setlocalsubkey(context, auth_context, keyblock); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_auth_con_setrecvsubkey(krb5_context context, krb5_auth_context auth_context, - krb5_keyblock *keyblock) -{ - return krb5_auth_con_setremotesubkey(context, auth_context, keyblock); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_default_realm(krb5_context context, krb5_realm realm) -{ - return krb5_xfree(realm); -} - -#endif /* HEIMDAL_SMALLER */ diff --git a/kerberosV/src/lib/krb5/mk_error.c b/kerberosV/src/lib/krb5/mk_error.c deleted file mode 100644 index 5fee1d6bed6..00000000000 --- a/kerberosV/src/lib/krb5/mk_error.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 1997 - 2003 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_error(krb5_context context, - krb5_error_code error_code, - const char *e_text, - const krb5_data *e_data, - const krb5_principal client, - const krb5_principal server, - time_t *client_time, - int *client_usec, - krb5_data *reply) -{ - const char *e_text2 = NULL; - KRB_ERROR msg; - krb5_timestamp sec; - int32_t usec; - size_t len = 0; - krb5_error_code ret = 0; - - krb5_us_timeofday (context, &sec, &usec); - - memset(&msg, 0, sizeof(msg)); - msg.pvno = 5; - msg.msg_type = krb_error; - msg.stime = sec; - msg.susec = usec; - msg.ctime = client_time; - msg.cusec = client_usec; - /* Make sure we only send `protocol' error codes */ - if(error_code < KRB5KDC_ERR_NONE || error_code >= KRB5_ERR_RCSID) { - if(e_text == NULL) - e_text = e_text2 = krb5_get_error_message(context, error_code); - error_code = KRB5KRB_ERR_GENERIC; - } - msg.error_code = error_code - KRB5KDC_ERR_NONE; - if (e_text) - msg.e_text = rk_UNCONST(&e_text); - if (e_data) - msg.e_data = rk_UNCONST(e_data); - if(server){ - msg.realm = server->realm; - msg.sname = server->name; - }else{ - static char unspec[] = ""; - msg.realm = unspec; - } - if(client){ - msg.crealm = &client->realm; - msg.cname = &client->name; - } - - ASN1_MALLOC_ENCODE(KRB_ERROR, reply->data, reply->length, &msg, &len, ret); - if (e_text2) - krb5_free_error_message(context, e_text2); - if (ret) - return ret; - if(reply->length != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - return 0; -} diff --git a/kerberosV/src/lib/krb5/mk_priv.c b/kerberosV/src/lib/krb5/mk_priv.c deleted file mode 100644 index dede6d2fa4d..00000000000 --- a/kerberosV/src/lib/krb5/mk_priv.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 1997 - 2003 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_priv(krb5_context context, - krb5_auth_context auth_context, - const krb5_data *userdata, - krb5_data *outbuf, - krb5_replay_data *outdata) -{ - krb5_error_code ret; - KRB_PRIV s; - EncKrbPrivPart part; - u_char *buf = NULL; - size_t buf_size; - size_t len = 0; - krb5_crypto crypto; - krb5_keyblock *key; - krb5_replay_data rdata; - - if ((auth_context->flags & - (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE)) && - outdata == NULL) - return KRB5_RC_REQUIRED; /* XXX better error, MIT returns this */ - - if (auth_context->local_subkey) - key = auth_context->local_subkey; - else if (auth_context->remote_subkey) - key = auth_context->remote_subkey; - else - key = auth_context->keyblock; - - memset(&rdata, 0, sizeof(rdata)); - - part.user_data = *userdata; - - krb5_us_timeofday (context, &rdata.timestamp, &rdata.usec); - - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { - part.timestamp = &rdata.timestamp; - part.usec = &rdata.usec; - } else { - part.timestamp = NULL; - part.usec = NULL; - } - - if (auth_context->flags & KRB5_AUTH_CONTEXT_RET_TIME) { - outdata->timestamp = rdata.timestamp; - outdata->usec = rdata.usec; - } - - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { - rdata.seq = auth_context->local_seqnumber; - part.seq_number = &rdata.seq; - } else - part.seq_number = NULL; - - if (auth_context->flags & KRB5_AUTH_CONTEXT_RET_SEQUENCE) - outdata->seq = auth_context->local_seqnumber; - - part.s_address = auth_context->local_address; - part.r_address = auth_context->remote_address; - - krb5_data_zero (&s.enc_part.cipher); - - ASN1_MALLOC_ENCODE(EncKrbPrivPart, buf, buf_size, &part, &len, ret); - if (ret) - goto fail; - if (buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - s.pvno = 5; - s.msg_type = krb_priv; - s.enc_part.etype = key->keytype; - s.enc_part.kvno = NULL; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) { - free (buf); - return ret; - } - ret = krb5_encrypt (context, - crypto, - KRB5_KU_KRB_PRIV, - buf + buf_size - len, - len, - &s.enc_part.cipher); - krb5_crypto_destroy(context, crypto); - if (ret) { - free(buf); - return ret; - } - free(buf); - - - ASN1_MALLOC_ENCODE(KRB_PRIV, buf, buf_size, &s, &len, ret); - if (ret) - goto fail; - if (buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - krb5_data_free (&s.enc_part.cipher); - - ret = krb5_data_copy(outbuf, buf + buf_size - len, len); - if (ret) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - free(buf); - return ENOMEM; - } - free (buf); - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) - auth_context->local_seqnumber = - (auth_context->local_seqnumber + 1) & 0xFFFFFFFF; - return 0; - - fail: - free (buf); - krb5_data_free (&s.enc_part.cipher); - return ret; -} diff --git a/kerberosV/src/lib/krb5/mk_rep.c b/kerberosV/src/lib/krb5/mk_rep.c deleted file mode 100644 index 84c315291c1..00000000000 --- a/kerberosV/src/lib/krb5/mk_rep.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 1997 - 2003 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_rep(krb5_context context, - krb5_auth_context auth_context, - krb5_data *outbuf) -{ - krb5_error_code ret; - AP_REP ap; - EncAPRepPart body; - u_char *buf = NULL; - size_t buf_size; - size_t len = 0; - krb5_crypto crypto; - - ap.pvno = 5; - ap.msg_type = krb_ap_rep; - - memset (&body, 0, sizeof(body)); - - body.ctime = auth_context->authenticator->ctime; - body.cusec = auth_context->authenticator->cusec; - if (auth_context->flags & KRB5_AUTH_CONTEXT_USE_SUBKEY) { - if (auth_context->local_subkey == NULL) { - ret = krb5_auth_con_generatelocalsubkey(context, - auth_context, - auth_context->keyblock); - if(ret) { - free_EncAPRepPart(&body); - return ret; - } - } - ret = krb5_copy_keyblock(context, auth_context->local_subkey, - &body.subkey); - if (ret) { - free_EncAPRepPart(&body); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - } else - body.subkey = NULL; - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { - if(auth_context->local_seqnumber == 0) - krb5_generate_seq_number (context, - auth_context->keyblock, - &auth_context->local_seqnumber); - ALLOC(body.seq_number, 1); - if (body.seq_number == NULL) { - krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); - free_EncAPRepPart(&body); - return ENOMEM; - } - *(body.seq_number) = auth_context->local_seqnumber; - } else - body.seq_number = NULL; - - ap.enc_part.etype = auth_context->keyblock->keytype; - ap.enc_part.kvno = NULL; - - ASN1_MALLOC_ENCODE(EncAPRepPart, buf, buf_size, &body, &len, ret); - free_EncAPRepPart (&body); - if(ret) - return ret; - if (buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - ret = krb5_crypto_init(context, auth_context->keyblock, - 0 /* ap.enc_part.etype */, &crypto); - if (ret) { - free (buf); - return ret; - } - ret = krb5_encrypt (context, - crypto, - KRB5_KU_AP_REQ_ENC_PART, - buf + buf_size - len, - len, - &ap.enc_part.cipher); - krb5_crypto_destroy(context, crypto); - free(buf); - if (ret) - return ret; - - ASN1_MALLOC_ENCODE(AP_REP, outbuf->data, outbuf->length, &ap, &len, ret); - if (ret == 0 && outbuf->length != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - free_AP_REP (&ap); - return ret; -} diff --git a/kerberosV/src/lib/krb5/mk_req.c b/kerberosV/src/lib/krb5/mk_req.c deleted file mode 100644 index 44e6c8b68a1..00000000000 --- a/kerberosV/src/lib/krb5/mk_req.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 1997 - 2004 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_req_exact(krb5_context context, - krb5_auth_context *auth_context, - const krb5_flags ap_req_options, - const krb5_principal server, - krb5_data *in_data, - krb5_ccache ccache, - krb5_data *outbuf) -{ - krb5_error_code ret; - krb5_creds this_cred, *cred; - - memset(&this_cred, 0, sizeof(this_cred)); - - ret = krb5_cc_get_principal(context, ccache, &this_cred.client); - - if(ret) - return ret; - - ret = krb5_copy_principal (context, server, &this_cred.server); - if (ret) { - krb5_free_cred_contents (context, &this_cred); - return ret; - } - - this_cred.times.endtime = 0; - if (auth_context && *auth_context && (*auth_context)->keytype) - this_cred.session.keytype = (*auth_context)->keytype; - - ret = krb5_get_credentials (context, 0, ccache, &this_cred, &cred); - krb5_free_cred_contents(context, &this_cred); - if (ret) - return ret; - - ret = krb5_mk_req_extended (context, - auth_context, - ap_req_options, - in_data, - cred, - outbuf); - krb5_free_creds(context, cred); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_req(krb5_context context, - krb5_auth_context *auth_context, - const krb5_flags ap_req_options, - const char *service, - const char *hostname, - krb5_data *in_data, - krb5_ccache ccache, - krb5_data *outbuf) -{ - krb5_error_code ret; - char **realms; - char *real_hostname; - krb5_principal server; - - ret = krb5_expand_hostname_realms (context, hostname, - &real_hostname, &realms); - if (ret) - return ret; - - ret = krb5_build_principal (context, &server, - strlen(*realms), - *realms, - service, - real_hostname, - NULL); - free (real_hostname); - krb5_free_host_realm (context, realms); - if (ret) - return ret; - ret = krb5_mk_req_exact (context, auth_context, ap_req_options, - server, in_data, ccache, outbuf); - krb5_free_principal (context, server); - return ret; -} diff --git a/kerberosV/src/lib/krb5/mk_req_ext.c b/kerberosV/src/lib/krb5/mk_req_ext.c deleted file mode 100644 index af68e4e1953..00000000000 --- a/kerberosV/src/lib/krb5/mk_req_ext.c +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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 "krb5_locl.h" - -krb5_error_code -_krb5_mk_req_internal(krb5_context context, - krb5_auth_context *auth_context, - const krb5_flags ap_req_options, - krb5_data *in_data, - krb5_creds *in_creds, - krb5_data *outbuf, - krb5_key_usage checksum_usage, - krb5_key_usage encrypt_usage) -{ - krb5_error_code ret; - krb5_data authenticator; - Checksum c; - Checksum *c_opt; - krb5_auth_context ac; - - if(auth_context) { - if(*auth_context == NULL) - ret = krb5_auth_con_init(context, auth_context); - else - ret = 0; - ac = *auth_context; - } else - ret = krb5_auth_con_init(context, &ac); - if(ret) - return ret; - - if(ac->local_subkey == NULL && (ap_req_options & AP_OPTS_USE_SUBKEY)) { - ret = krb5_auth_con_generatelocalsubkey(context, - ac, - &in_creds->session); - if(ret) - goto out; - } - - krb5_free_keyblock(context, ac->keyblock); - ret = krb5_copy_keyblock(context, &in_creds->session, &ac->keyblock); - if (ret) - goto out; - - /* it's unclear what type of checksum we can use. try the best one, except: - * a) if it's configured differently for the current realm, or - * b) if the session key is des-cbc-crc - */ - - if (in_data) { - if(ac->keyblock->keytype == ETYPE_DES_CBC_CRC) { - /* this is to make DCE secd (and older MIT kdcs?) happy */ - ret = krb5_create_checksum(context, - NULL, - 0, - CKSUMTYPE_RSA_MD4, - in_data->data, - in_data->length, - &c); - } else if(ac->keyblock->keytype == ETYPE_ARCFOUR_HMAC_MD5 || - ac->keyblock->keytype == ETYPE_ARCFOUR_HMAC_MD5_56 || - ac->keyblock->keytype == ETYPE_DES_CBC_MD4 || - ac->keyblock->keytype == ETYPE_DES_CBC_MD5) { - /* this is to make MS kdc happy */ - ret = krb5_create_checksum(context, - NULL, - 0, - CKSUMTYPE_RSA_MD5, - in_data->data, - in_data->length, - &c); - } else { - krb5_crypto crypto; - - ret = krb5_crypto_init(context, ac->keyblock, 0, &crypto); - if (ret) - goto out; - ret = krb5_create_checksum(context, - crypto, - checksum_usage, - 0, - in_data->data, - in_data->length, - &c); - krb5_crypto_destroy(context, crypto); - } - c_opt = &c; - } else { - c_opt = NULL; - } - - if (ret) - goto out; - - ret = _krb5_build_authenticator(context, - ac, - ac->keyblock->keytype, - in_creds, - c_opt, - &authenticator, - encrypt_usage); - if (c_opt) - free_Checksum (c_opt); - if (ret) - goto out; - - ret = krb5_build_ap_req (context, ac->keyblock->keytype, - in_creds, ap_req_options, authenticator, outbuf); -out: - if(auth_context == NULL) - krb5_auth_con_free(context, ac); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_req_extended(krb5_context context, - krb5_auth_context *auth_context, - const krb5_flags ap_req_options, - krb5_data *in_data, - krb5_creds *in_creds, - krb5_data *outbuf) -{ - return _krb5_mk_req_internal (context, - auth_context, - ap_req_options, - in_data, - in_creds, - outbuf, - KRB5_KU_AP_REQ_AUTH_CKSUM, - KRB5_KU_AP_REQ_AUTH); -} diff --git a/kerberosV/src/lib/krb5/mk_safe.c b/kerberosV/src/lib/krb5/mk_safe.c deleted file mode 100644 index b327e1ce72f..00000000000 --- a/kerberosV/src/lib/krb5/mk_safe.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 1997 - 2003 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_mk_safe(krb5_context context, - krb5_auth_context auth_context, - const krb5_data *userdata, - krb5_data *outbuf, - krb5_replay_data *outdata) -{ - krb5_error_code ret; - KRB_SAFE s; - u_char *buf = NULL; - size_t buf_size; - size_t len = 0; - krb5_crypto crypto; - krb5_keyblock *key; - krb5_replay_data rdata; - - if ((auth_context->flags & - (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE)) && - outdata == NULL) - return KRB5_RC_REQUIRED; /* XXX better error, MIT returns this */ - - if (auth_context->local_subkey) - key = auth_context->local_subkey; - else if (auth_context->remote_subkey) - key = auth_context->remote_subkey; - else - key = auth_context->keyblock; - - s.pvno = 5; - s.msg_type = krb_safe; - - memset(&rdata, 0, sizeof(rdata)); - - s.safe_body.user_data = *userdata; - - krb5_us_timeofday (context, &rdata.timestamp, &rdata.usec); - - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { - s.safe_body.timestamp = &rdata.timestamp; - s.safe_body.usec = &rdata.usec; - } else { - s.safe_body.timestamp = NULL; - s.safe_body.usec = NULL; - } - - if (auth_context->flags & KRB5_AUTH_CONTEXT_RET_TIME) { - outdata->timestamp = rdata.timestamp; - outdata->usec = rdata.usec; - } - - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { - rdata.seq = auth_context->local_seqnumber; - s.safe_body.seq_number = &rdata.seq; - } else - s.safe_body.seq_number = NULL; - - if (auth_context->flags & KRB5_AUTH_CONTEXT_RET_SEQUENCE) - outdata->seq = auth_context->local_seqnumber; - - s.safe_body.s_address = auth_context->local_address; - s.safe_body.r_address = auth_context->remote_address; - - s.cksum.cksumtype = 0; - s.cksum.checksum.data = NULL; - s.cksum.checksum.length = 0; - - ASN1_MALLOC_ENCODE(KRB_SAFE, buf, buf_size, &s, &len, ret); - if (ret) - return ret; - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) { - free (buf); - return ret; - } - ret = krb5_create_checksum(context, - crypto, - KRB5_KU_KRB_SAFE_CKSUM, - 0, - buf, - len, - &s.cksum); - krb5_crypto_destroy(context, crypto); - if (ret) { - free (buf); - return ret; - } - - free(buf); - ASN1_MALLOC_ENCODE(KRB_SAFE, buf, buf_size, &s, &len, ret); - free_Checksum (&s.cksum); - if(ret) - return ret; - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - outbuf->length = len; - outbuf->data = buf; - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) - auth_context->local_seqnumber = - (auth_context->local_seqnumber + 1) & 0xFFFFFFFF; - return 0; -} diff --git a/kerberosV/src/lib/krb5/n-fold-test.c b/kerberosV/src/lib/krb5/n-fold-test.c deleted file mode 100644 index 452964522be..00000000000 --- a/kerberosV/src/lib/krb5/n-fold-test.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 "krb5_locl.h" - -enum { MAXSIZE = 24 }; - -static struct testcase { - const char *str; - unsigned n; - unsigned char res[MAXSIZE]; -} tests[] = { - {"012345", 8, - {0xbe, 0x07, 0x26, 0x31, 0x27, 0x6b, 0x19, 0x55} - }, - {"basch", 24, - {0x1a, 0xab, 0x6b, 0x42, 0x96, 0x4b, 0x98, 0xb2, 0x1f, 0x8c, 0xde, - 0x2d, 0x24, 0x48, 0xba, 0x34, 0x55, 0xd7, 0x86, 0x2c, 0x97, 0x31, - 0x64, 0x3f} - }, - {"eichin", 24, - {0x65, 0x69, 0x63, 0x68, 0x69, 0x6e, 0x4b, 0x73, 0x2b, 0x4b, - 0x1b, 0x43, 0xda, 0x1a, 0x5b, 0x99, 0x5a, 0x58, 0xd2, 0xc6, 0xd0, - 0xd2, 0xdc, 0xca} - }, - {"sommerfeld", 24, - {0x2f, 0x7a, 0x98, 0x55, 0x7c, 0x6e, 0xe4, 0xab, 0xad, 0xf4, - 0xe7, 0x11, 0x92, 0xdd, 0x44, 0x2b, 0xd4, 0xff, 0x53, 0x25, 0xa5, - 0xde, 0xf7, 0x5c} - }, - {"MASSACHVSETTS INSTITVTE OF TECHNOLOGY", 24, - {0xdb, 0x3b, 0x0d, 0x8f, 0x0b, 0x06, 0x1e, 0x60, 0x32, 0x82, - 0xb3, 0x08, 0xa5, 0x08, 0x41, 0x22, 0x9a, 0xd7, 0x98, 0xfa, 0xb9, - 0x54, 0x0c, 0x1b} - }, - {"assar@NADA.KTH.SE", 24, - {0x5c, 0x06, 0xc3, 0x4d, 0x2c, 0x89, 0x05, 0xbe, 0x7a, 0x51, - 0x83, 0x6c, 0xd6, 0xf8, 0x1c, 0x4b, 0x7a, 0x93, 0x49, 0x16, 0x5a, - 0xb3, 0xfa, 0xa9} - }, - {"testKRBTEST.MIT.EDUtestkey", 24, - {0x50, 0x2c, 0xf8, 0x29, 0x78, 0xe5, 0xfb, 0x1a, 0x29, 0x06, - 0xbd, 0x22, 0x28, 0x91, 0x56, 0xc0, 0x06, 0xa0, 0xdc, 0xf5, 0xb6, - 0xc2, 0xda, 0x6c} - }, - {"password", 7, - {0x78, 0xa0, 0x7b, 0x6c, 0xaf, 0x85, 0xfa} - }, - {"Rough Consensus, and Running Code", 8, - {0xbb, 0x6e, 0xd3, 0x08, 0x70, 0xb7, 0xf0, 0xe0}, - }, - {"password", 21, - {0x59, 0xe4, 0xa8, 0xca, 0x7c, 0x03, 0x85, 0xc3, 0xc3, 0x7b, 0x3f, - 0x6d, 0x20, 0x00, 0x24, 0x7c, 0xb6, 0xe6, 0xbd, 0x5b, 0x3e}, - }, - {"MASSACHVSETTS INSTITVTE OF TECHNOLOGY", 24, - {0xdb, 0x3b, 0x0d, 0x8f, 0x0b, 0x06, 0x1e, 0x60, 0x32, 0x82, 0xb3, - 0x08, 0xa5, 0x08, 0x41, 0x22, 0x9a, 0xd7, 0x98, 0xfa, 0xb9, 0x54, - 0x0c, 0x1b} - }, - {NULL, 0} -}; - -int -main(int argc, char **argv) -{ - unsigned char data[MAXSIZE]; - struct testcase *t; - int ret = 0; - - for (t = tests; t->str; ++t) { - int i; - - ret = _krb5_n_fold (t->str, strlen(t->str), data, t->n); - if (ret) - errx(1, "out of memory"); - if (memcmp (data, t->res, t->n) != 0) { - printf ("n-fold(\"%s\", %d) failed\n", t->str, t->n); - printf ("should be: "); - for (i = 0; i < t->n; ++i) - printf ("%02x", t->res[i]); - printf ("\nresult was: "); - for (i = 0; i < t->n; ++i) - printf ("%02x", data[i]); - printf ("\n"); - ret = 1; - } - } - return ret; -} diff --git a/kerberosV/src/lib/krb5/n-fold.c b/kerberosV/src/lib/krb5/n-fold.c deleted file mode 100644 index 2e6092c5ca8..00000000000 --- a/kerberosV/src/lib/krb5/n-fold.c +++ /dev/null @@ -1,141 +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 "krb5_locl.h" - -static krb5_error_code -rr13(unsigned char *buf, size_t len) -{ - unsigned char *tmp; - int bytes = (len + 7) / 8; - int i; - if(len == 0) - return 0; - { - const int bits = 13 % len; - const int lbit = len % 8; - - tmp = malloc(bytes); - if (tmp == NULL) - return ENOMEM; - memcpy(tmp, buf, bytes); - if(lbit) { - /* pad final byte with inital bits */ - tmp[bytes - 1] &= 0xff << (8 - lbit); - for(i = lbit; i < 8; i += len) - tmp[bytes - 1] |= buf[0] >> i; - } - for(i = 0; i < bytes; i++) { - int bb; - int b1, s1, b2, s2; - /* calculate first bit position of this byte */ - bb = 8 * i - bits; - while(bb < 0) - bb += len; - /* byte offset and shift count */ - b1 = bb / 8; - s1 = bb % 8; - - if(bb + 8 > bytes * 8) - /* watch for wraparound */ - s2 = (len + 8 - s1) % 8; - else - s2 = 8 - s1; - b2 = (b1 + 1) % bytes; - buf[i] = (tmp[b1] << s1) | (tmp[b2] >> s2); - } - free(tmp); - } - return 0; -} - -/* Add `b' to `a', both being one's complement numbers. */ -static void -add1(unsigned char *a, unsigned char *b, size_t len) -{ - int i; - int carry = 0; - for(i = len - 1; i >= 0; i--){ - int x = a[i] + b[i] + carry; - carry = x > 0xff; - a[i] = x & 0xff; - } - for(i = len - 1; carry && i >= 0; i--){ - int x = a[i] + carry; - carry = x > 0xff; - a[i] = x & 0xff; - } -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_n_fold(const void *str, size_t len, void *key, size_t size) -{ - /* if len < size we need at most N * len bytes, ie < 2 * size; - if len > size we need at most 2 * len */ - krb5_error_code ret = 0; - size_t maxlen = 2 * max(size, len); - size_t l = 0; - unsigned char *tmp = malloc(maxlen); - unsigned char *buf = malloc(len); - - if (tmp == NULL || buf == NULL) { - ret = ENOMEM; - goto out; - } - - memcpy(buf, str, len); - memset(key, 0, size); - do { - memcpy(tmp + l, buf, len); - l += len; - ret = rr13(buf, len * 8); - if (ret) - goto out; - while(l >= size) { - add1(key, tmp, size); - l -= size; - if(l == 0) - break; - memmove(tmp, tmp + size, l); - } - } while(l != 0); -out: - if (buf) { - memset(buf, 0, len); - free(buf); - } - if (tmp) { - memset(tmp, 0, maxlen); - free(tmp); - } - return ret; -} diff --git a/kerberosV/src/lib/krb5/net_read.c b/kerberosV/src/lib/krb5/net_read.c deleted file mode 100644 index f6d781c27c0..00000000000 --- a/kerberosV/src/lib/krb5/net_read.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 1997, 1998, 2002 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -krb5_net_read (krb5_context context, - void *p_fd, - void *buf, - size_t len) -{ - krb5_socket_t fd = *((krb5_socket_t *)p_fd); - return net_read(fd, buf, len); -} diff --git a/kerberosV/src/lib/krb5/net_write.c b/kerberosV/src/lib/krb5/net_write.c deleted file mode 100644 index 289b96541fe..00000000000 --- a/kerberosV/src/lib/krb5/net_write.c +++ /dev/null @@ -1,118 +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. - */ - -#include "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -krb5_net_write (krb5_context context, - void *p_fd, - const void *buf, - size_t len) -{ - krb5_socket_t fd = *((krb5_socket_t *)p_fd); - return net_write(fd, buf, len); -} - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -krb5_net_write_block(krb5_context context, - void *p_fd, - const void *buf, - size_t len, - time_t timeout) -{ - krb5_socket_t fd = *((krb5_socket_t *)p_fd); - int ret; - struct timeval tv, *tvp; - const char *cbuf = (const char *)buf; - size_t rem = len; - ssize_t count; - fd_set wfds; - - do { - FD_ZERO(&wfds); - FD_SET(fd, &wfds); - - if (timeout != 0) { - tv.tv_sec = timeout; - tv.tv_usec = 0; - tvp = &tv; - } else - tvp = NULL; - - ret = select(fd + 1, NULL, &wfds, NULL, tvp); - if (rk_IS_SOCKET_ERROR(ret)) { - if (rk_SOCK_ERRNO == EINTR) - continue; - return -1; - } - -#ifdef HAVE_WINSOCK - if (ret == 0) { - WSASetLastError( WSAETIMEDOUT ); - return 0; - } - - count = send (fd, cbuf, rem, 0); - - if (rk_IS_SOCKET_ERROR(count)) { - return -1; - } - -#else - if (ret == 0) { - return 0; - } - - if (!FD_ISSET(fd, &wfds)) { - errno = ETIMEDOUT; - return -1; - } - - count = write (fd, cbuf, rem); - - if (count < 0) { - if (errno == EINTR) - continue; - else - return count; - } - -#endif - - cbuf += count; - rem -= count; - - } while (rem > 0); - - return len; -} diff --git a/kerberosV/src/lib/krb5/pac.c b/kerberosV/src/lib/krb5/pac.c deleted file mode 100644 index 91f68d5e00e..00000000000 --- a/kerberosV/src/lib/krb5/pac.c +++ /dev/null @@ -1,1145 +0,0 @@ -/* - * Copyright (c) 2006 - 2007 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 "krb5_locl.h" -#include - -struct PAC_INFO_BUFFER { - uint32_t type; - uint32_t buffersize; - uint32_t offset_hi; - uint32_t offset_lo; -}; - -struct PACTYPE { - uint32_t numbuffers; - uint32_t version; - struct PAC_INFO_BUFFER buffers[1]; -}; - -struct krb5_pac_data { - struct PACTYPE *pac; - krb5_data data; - struct PAC_INFO_BUFFER *server_checksum; - struct PAC_INFO_BUFFER *privsvr_checksum; - struct PAC_INFO_BUFFER *logon_name; -}; - -#define PAC_ALIGNMENT 8 - -#define PACTYPE_SIZE 8 -#define PAC_INFO_BUFFER_SIZE 16 - -#define PAC_SERVER_CHECKSUM 6 -#define PAC_PRIVSVR_CHECKSUM 7 -#define PAC_LOGON_NAME 10 -#define PAC_CONSTRAINED_DELEGATION 11 - -#define CHECK(r,f,l) \ - do { \ - if (((r) = f ) != 0) { \ - krb5_clear_error_message(context); \ - goto l; \ - } \ - } while(0) - -static const char zeros[PAC_ALIGNMENT] = { 0 }; - -/* - * HMAC-MD5 checksum over any key (needed for the PAC routines) - */ - -static krb5_error_code -HMAC_MD5_any_checksum(krb5_context context, - const krb5_keyblock *key, - const void *data, - size_t len, - unsigned usage, - Checksum *result) -{ - struct _krb5_key_data local_key; - krb5_error_code ret; - - memset(&local_key, 0, sizeof(local_key)); - - ret = krb5_copy_keyblock(context, key, &local_key.key); - if (ret) - return ret; - - ret = krb5_data_alloc (&result->checksum, 16); - if (ret) { - krb5_free_keyblock(context, local_key.key); - return ret; - } - - result->cksumtype = CKSUMTYPE_HMAC_MD5; - ret = _krb5_HMAC_MD5_checksum(context, &local_key, data, len, usage, result); - if (ret) - krb5_data_free(&result->checksum); - - krb5_free_keyblock(context, local_key.key); - return ret; -} - - -/* - * - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_parse(krb5_context context, const void *ptr, size_t len, - krb5_pac *pac) -{ - krb5_error_code ret; - krb5_pac p; - krb5_storage *sp = NULL; - uint32_t i, tmp, tmp2, header_end; - - p = calloc(1, sizeof(*p)); - if (p == NULL) { - ret = krb5_enomem(context); - goto out; - } - - sp = krb5_storage_from_readonly_mem(ptr, len); - if (sp == NULL) { - ret = krb5_enomem(context); - goto out; - } - krb5_storage_set_flags(sp, KRB5_STORAGE_BYTEORDER_LE); - - CHECK(ret, krb5_ret_uint32(sp, &tmp), out); - CHECK(ret, krb5_ret_uint32(sp, &tmp2), out); - if (tmp < 1) { - ret = EINVAL; /* Too few buffers */ - krb5_set_error_message(context, ret, N_("PAC have too few buffer", "")); - goto out; - } - if (tmp2 != 0) { - ret = EINVAL; /* Wrong version */ - krb5_set_error_message(context, ret, - N_("PAC have wrong version %d", ""), - (int)tmp2); - goto out; - } - - p->pac = calloc(1, - sizeof(*p->pac) + (sizeof(p->pac->buffers[0]) * (tmp - 1))); - if (p->pac == NULL) { - ret = krb5_enomem(context); - goto out; - } - - p->pac->numbuffers = tmp; - p->pac->version = tmp2; - - header_end = PACTYPE_SIZE + (PAC_INFO_BUFFER_SIZE * p->pac->numbuffers); - if (header_end > len) { - ret = EINVAL; - goto out; - } - - for (i = 0; i < p->pac->numbuffers; i++) { - CHECK(ret, krb5_ret_uint32(sp, &p->pac->buffers[i].type), out); - CHECK(ret, krb5_ret_uint32(sp, &p->pac->buffers[i].buffersize), out); - CHECK(ret, krb5_ret_uint32(sp, &p->pac->buffers[i].offset_lo), out); - CHECK(ret, krb5_ret_uint32(sp, &p->pac->buffers[i].offset_hi), out); - - /* consistency checks */ - if (p->pac->buffers[i].offset_lo & (PAC_ALIGNMENT - 1)) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("PAC out of allignment", "")); - goto out; - } - if (p->pac->buffers[i].offset_hi) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("PAC high offset set", "")); - goto out; - } - if (p->pac->buffers[i].offset_lo > len) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("PAC offset off end", "")); - goto out; - } - if (p->pac->buffers[i].offset_lo < header_end) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("PAC offset inside header: %lu %lu", ""), - (unsigned long)p->pac->buffers[i].offset_lo, - (unsigned long)header_end); - goto out; - } - if (p->pac->buffers[i].buffersize > len - p->pac->buffers[i].offset_lo){ - ret = EINVAL; - krb5_set_error_message(context, ret, N_("PAC length off end", "")); - goto out; - } - - /* let save pointer to data we need later */ - if (p->pac->buffers[i].type == PAC_SERVER_CHECKSUM) { - if (p->server_checksum) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("PAC have two server checksums", "")); - goto out; - } - p->server_checksum = &p->pac->buffers[i]; - } else if (p->pac->buffers[i].type == PAC_PRIVSVR_CHECKSUM) { - if (p->privsvr_checksum) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("PAC have two KDC checksums", "")); - goto out; - } - p->privsvr_checksum = &p->pac->buffers[i]; - } else if (p->pac->buffers[i].type == PAC_LOGON_NAME) { - if (p->logon_name) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("PAC have two logon names", "")); - goto out; - } - p->logon_name = &p->pac->buffers[i]; - } - } - - ret = krb5_data_copy(&p->data, ptr, len); - if (ret) - goto out; - - krb5_storage_free(sp); - - *pac = p; - return 0; - -out: - if (sp) - krb5_storage_free(sp); - if (p) { - if (p->pac) - free(p->pac); - free(p); - } - *pac = NULL; - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_init(krb5_context context, krb5_pac *pac) -{ - krb5_error_code ret; - krb5_pac p; - - p = calloc(1, sizeof(*p)); - if (p == NULL) { - return krb5_enomem(context); - } - - p->pac = calloc(1, sizeof(*p->pac)); - if (p->pac == NULL) { - free(p); - return krb5_enomem(context); - } - - ret = krb5_data_alloc(&p->data, PACTYPE_SIZE); - if (ret) { - free (p->pac); - free(p); - return krb5_enomem(context); - } - - *pac = p; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_add_buffer(krb5_context context, krb5_pac p, - uint32_t type, const krb5_data *data) -{ - krb5_error_code ret; - void *ptr; - size_t len, offset, header_end, old_end; - uint32_t i; - - len = p->pac->numbuffers; - - ptr = realloc(p->pac, - sizeof(*p->pac) + (sizeof(p->pac->buffers[0]) * len)); - if (ptr == NULL) - return krb5_enomem(context); - - p->pac = ptr; - - for (i = 0; i < len; i++) - p->pac->buffers[i].offset_lo += PAC_INFO_BUFFER_SIZE; - - offset = p->data.length + PAC_INFO_BUFFER_SIZE; - - p->pac->buffers[len].type = type; - p->pac->buffers[len].buffersize = data->length; - p->pac->buffers[len].offset_lo = offset; - p->pac->buffers[len].offset_hi = 0; - - old_end = p->data.length; - len = p->data.length + data->length + PAC_INFO_BUFFER_SIZE; - if (len < p->data.length) { - krb5_set_error_message(context, EINVAL, "integer overrun"); - return EINVAL; - } - - /* align to PAC_ALIGNMENT */ - len = ((len + PAC_ALIGNMENT - 1) / PAC_ALIGNMENT) * PAC_ALIGNMENT; - - ret = krb5_data_realloc(&p->data, len); - if (ret) { - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - return ret; - } - - /* - * make place for new PAC INFO BUFFER header - */ - header_end = PACTYPE_SIZE + (PAC_INFO_BUFFER_SIZE * p->pac->numbuffers); - memmove((unsigned char *)p->data.data + header_end + PAC_INFO_BUFFER_SIZE, - (unsigned char *)p->data.data + header_end , - old_end - header_end); - memset((unsigned char *)p->data.data + header_end, 0, PAC_INFO_BUFFER_SIZE); - - /* - * copy in new data part - */ - - memcpy((unsigned char *)p->data.data + offset, - data->data, data->length); - memset((unsigned char *)p->data.data + offset + data->length, - 0, p->data.length - offset - data->length); - - p->pac->numbuffers += 1; - - return 0; -} - -/** - * Get the PAC buffer of specific type from the pac. - * - * @param context Kerberos 5 context. - * @param p the pac structure returned by krb5_pac_parse(). - * @param type type of buffer to get - * @param data return data, free with krb5_data_free(). - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5_pac - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_get_buffer(krb5_context context, krb5_pac p, - uint32_t type, krb5_data *data) -{ - krb5_error_code ret; - uint32_t i; - - for (i = 0; i < p->pac->numbuffers; i++) { - const size_t len = p->pac->buffers[i].buffersize; - const size_t offset = p->pac->buffers[i].offset_lo; - - if (p->pac->buffers[i].type != type) - continue; - - ret = krb5_data_copy(data, (unsigned char *)p->data.data + offset, len); - if (ret) { - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - return ret; - } - return 0; - } - krb5_set_error_message(context, ENOENT, "No PAC buffer of type %lu was found", - (unsigned long)type); - return ENOENT; -} - -/* - * - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_get_types(krb5_context context, - krb5_pac p, - size_t *len, - uint32_t **types) -{ - size_t i; - - *types = calloc(p->pac->numbuffers, sizeof(*types)); - if (*types == NULL) { - *len = 0; - return krb5_enomem(context); - } - for (i = 0; i < p->pac->numbuffers; i++) - (*types)[i] = p->pac->buffers[i].type; - *len = p->pac->numbuffers; - - return 0; -} - -/* - * - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_pac_free(krb5_context context, krb5_pac pac) -{ - krb5_data_free(&pac->data); - free(pac->pac); - free(pac); -} - -/* - * - */ - -static krb5_error_code -verify_checksum(krb5_context context, - const struct PAC_INFO_BUFFER *sig, - const krb5_data *data, - void *ptr, size_t len, - const krb5_keyblock *key) -{ - krb5_storage *sp = NULL; - uint32_t type; - krb5_error_code ret; - Checksum cksum; - - memset(&cksum, 0, sizeof(cksum)); - - sp = krb5_storage_from_mem((char *)data->data + sig->offset_lo, - sig->buffersize); - if (sp == NULL) - return krb5_enomem(context); - - krb5_storage_set_flags(sp, KRB5_STORAGE_BYTEORDER_LE); - - CHECK(ret, krb5_ret_uint32(sp, &type), out); - cksum.cksumtype = type; - cksum.checksum.length = - sig->buffersize - krb5_storage_seek(sp, 0, SEEK_CUR); - cksum.checksum.data = malloc(cksum.checksum.length); - if (cksum.checksum.data == NULL) { - ret = krb5_enomem(context); - goto out; - } - ret = krb5_storage_read(sp, cksum.checksum.data, cksum.checksum.length); - if (ret != (int)cksum.checksum.length) { - ret = EINVAL; - krb5_set_error_message(context, ret, "PAC checksum missing checksum"); - goto out; - } - - if (!krb5_checksum_is_keyed(context, cksum.cksumtype)) { - ret = EINVAL; - krb5_set_error_message(context, ret, "Checksum type %d not keyed", - cksum.cksumtype); - goto out; - } - - /* If the checksum is HMAC-MD5, the checksum type is not tied to - * the key type, instead the HMAC-MD5 checksum is applied blindly - * on whatever key is used for this connection, avoiding issues - * with unkeyed checksums on des-cbc-md5 and des-cbc-crc. See - * http://comments.gmane.org/gmane.comp.encryption.kerberos.devel/8743 - * for the same issue in MIT, and - * http://blogs.msdn.com/b/openspecification/archive/2010/01/01/verifying-the-server-signature-in-kerberos-privilege-account-certificate.aspx - * for Microsoft's explaination */ - - if (cksum.cksumtype == CKSUMTYPE_HMAC_MD5) { - Checksum local_checksum; - - memset(&local_checksum, 0, sizeof(local_checksum)); - - ret = HMAC_MD5_any_checksum(context, key, ptr, len, - KRB5_KU_OTHER_CKSUM, &local_checksum); - - if (ret != 0 || krb5_data_ct_cmp(&local_checksum.checksum, &cksum.checksum) != 0) { - ret = KRB5KRB_AP_ERR_BAD_INTEGRITY; - krb5_set_error_message(context, ret, - N_("PAC integrity check failed for " - "hmac-md5 checksum", "")); - } - krb5_data_free(&local_checksum.checksum); - - } else { - krb5_crypto crypto = NULL; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - goto out; - - ret = krb5_verify_checksum(context, crypto, KRB5_KU_OTHER_CKSUM, - ptr, len, &cksum); - krb5_crypto_destroy(context, crypto); - } - free(cksum.checksum.data); - krb5_storage_free(sp); - - return ret; - -out: - if (cksum.checksum.data) - free(cksum.checksum.data); - if (sp) - krb5_storage_free(sp); - return ret; -} - -static krb5_error_code -create_checksum(krb5_context context, - const krb5_keyblock *key, - uint32_t cksumtype, - void *data, size_t datalen, - void *sig, size_t siglen) -{ - krb5_crypto crypto = NULL; - krb5_error_code ret; - Checksum cksum; - - /* If the checksum is HMAC-MD5, the checksum type is not tied to - * the key type, instead the HMAC-MD5 checksum is applied blindly - * on whatever key is used for this connection, avoiding issues - * with unkeyed checksums on des-cbc-md5 and des-cbc-crc. See - * http://comments.gmane.org/gmane.comp.encryption.kerberos.devel/8743 - * for the same issue in MIT, and - * http://blogs.msdn.com/b/openspecification/archive/2010/01/01/verifying-the-server-signature-in-kerberos-privilege-account-certificate.aspx - * for Microsoft's explaination */ - - if (cksumtype == (uint32_t)CKSUMTYPE_HMAC_MD5) { - ret = HMAC_MD5_any_checksum(context, key, data, datalen, - KRB5_KU_OTHER_CKSUM, &cksum); - } else { - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - return ret; - - ret = krb5_create_checksum(context, crypto, KRB5_KU_OTHER_CKSUM, 0, - data, datalen, &cksum); - krb5_crypto_destroy(context, crypto); - if (ret) - return ret; - } - if (cksum.checksum.length != siglen) { - krb5_set_error_message(context, EINVAL, "pac checksum wrong length"); - free_Checksum(&cksum); - return EINVAL; - } - - memcpy(sig, cksum.checksum.data, siglen); - free_Checksum(&cksum); - - return 0; -} - - -/* - * - */ - -#define NTTIME_EPOCH 0x019DB1DED53E8000LL - -static uint64_t -unix2nttime(time_t unix_time) -{ - long long wt; - wt = unix_time * (uint64_t)10000000 + (uint64_t)NTTIME_EPOCH; - return wt; -} - -static krb5_error_code -verify_logonname(krb5_context context, - const struct PAC_INFO_BUFFER *logon_name, - const krb5_data *data, - time_t authtime, - krb5_const_principal principal) -{ - krb5_error_code ret; - krb5_principal p2; - uint32_t time1, time2; - krb5_storage *sp; - uint16_t len; - char *s; - - sp = krb5_storage_from_readonly_mem((const char *)data->data + logon_name->offset_lo, - logon_name->buffersize); - if (sp == NULL) - return krb5_enomem(context); - - krb5_storage_set_flags(sp, KRB5_STORAGE_BYTEORDER_LE); - - CHECK(ret, krb5_ret_uint32(sp, &time1), out); - CHECK(ret, krb5_ret_uint32(sp, &time2), out); - - { - uint64_t t1, t2; - t1 = unix2nttime(authtime); - t2 = ((uint64_t)time2 << 32) | time1; - if (t1 != t2) { - krb5_storage_free(sp); - krb5_set_error_message(context, EINVAL, "PAC timestamp mismatch"); - return EINVAL; - } - } - CHECK(ret, krb5_ret_uint16(sp, &len), out); - if (len == 0) { - krb5_storage_free(sp); - krb5_set_error_message(context, EINVAL, "PAC logon name length missing"); - return EINVAL; - } - - s = malloc(len); - if (s == NULL) { - krb5_storage_free(sp); - return krb5_enomem(context); - } - ret = krb5_storage_read(sp, s, len); - if (ret != len) { - krb5_storage_free(sp); - krb5_set_error_message(context, EINVAL, "Failed to read PAC logon name"); - return EINVAL; - } - krb5_storage_free(sp); - { - size_t ucs2len = len / 2; - uint16_t *ucs2; - size_t u8len; - unsigned int flags = WIND_RW_LE; - - ucs2 = malloc(sizeof(ucs2[0]) * ucs2len); - if (ucs2 == NULL) - return krb5_enomem(context); - - ret = wind_ucs2read(s, len, &flags, ucs2, &ucs2len); - free(s); - if (ret) { - free(ucs2); - krb5_set_error_message(context, ret, "Failed to convert string to UCS-2"); - return ret; - } - ret = wind_ucs2utf8_length(ucs2, ucs2len, &u8len); - if (ret) { - free(ucs2); - krb5_set_error_message(context, ret, "Failed to count length of UCS-2 string"); - return ret; - } - u8len += 1; /* Add space for NUL */ - s = malloc(u8len); - if (s == NULL) { - free(ucs2); - return krb5_enomem(context); - } - ret = wind_ucs2utf8(ucs2, ucs2len, s, &u8len); - free(ucs2); - if (ret) { - free(s); - krb5_set_error_message(context, ret, "Failed to convert to UTF-8"); - return ret; - } - } - ret = krb5_parse_name_flags(context, s, KRB5_PRINCIPAL_PARSE_NO_REALM, &p2); - free(s); - if (ret) - return ret; - - if (krb5_principal_compare_any_realm(context, principal, p2) != TRUE) { - ret = EINVAL; - krb5_set_error_message(context, ret, "PAC logon name mismatch"); - } - krb5_free_principal(context, p2); - return ret; -out: - return ret; -} - -/* - * - */ - -static krb5_error_code -build_logon_name(krb5_context context, - time_t authtime, - krb5_const_principal principal, - krb5_data *logon) -{ - krb5_error_code ret; - krb5_storage *sp; - uint64_t t; - char *s, *s2; - size_t s2_len; - - t = unix2nttime(authtime); - - krb5_data_zero(logon); - - sp = krb5_storage_emem(); - if (sp == NULL) - return krb5_enomem(context); - - krb5_storage_set_flags(sp, KRB5_STORAGE_BYTEORDER_LE); - - CHECK(ret, krb5_store_uint32(sp, t & 0xffffffff), out); - CHECK(ret, krb5_store_uint32(sp, t >> 32), out); - - ret = krb5_unparse_name_flags(context, principal, - KRB5_PRINCIPAL_UNPARSE_NO_REALM, &s); - if (ret) - goto out; - - { - size_t ucs2_len; - uint16_t *ucs2; - unsigned int flags; - - ret = wind_utf8ucs2_length(s, &ucs2_len); - if (ret) { - free(s); - krb5_set_error_message(context, ret, "Failed to count length of UTF-8 string"); - return ret; - } - - ucs2 = malloc(sizeof(ucs2[0]) * ucs2_len); - if (ucs2 == NULL) { - free(s); - return krb5_enomem(context); - } - - ret = wind_utf8ucs2(s, ucs2, &ucs2_len); - free(s); - if (ret) { - free(ucs2); - krb5_set_error_message(context, ret, "Failed to convert string to UCS-2"); - return ret; - } - - s2_len = (ucs2_len + 1) * 2; - s2 = malloc(s2_len); - if (ucs2 == NULL) { - free(ucs2); - return krb5_enomem(context); - } - - flags = WIND_RW_LE; - ret = wind_ucs2write(ucs2, ucs2_len, - &flags, s2, &s2_len); - free(ucs2); - if (ret) { - free(s2); - krb5_set_error_message(context, ret, "Failed to write to UCS-2 buffer"); - return ret; - } - - /* - * we do not want zero termination - */ - s2_len = ucs2_len * 2; - } - - CHECK(ret, krb5_store_uint16(sp, s2_len), out); - - ret = krb5_storage_write(sp, s2, s2_len); - free(s2); - if (ret != (int)s2_len) { - ret = krb5_enomem(context); - goto out; - } - ret = krb5_storage_to_data(sp, logon); - if (ret) - goto out; - krb5_storage_free(sp); - - return 0; -out: - krb5_storage_free(sp); - return ret; -} - - -/** - * Verify the PAC. - * - * @param context Kerberos 5 context. - * @param pac the pac structure returned by krb5_pac_parse(). - * @param authtime The time of the ticket the PAC belongs to. - * @param principal the principal to verify. - * @param server The service key, most always be given. - * @param privsvr The KDC key, may be given. - - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5_pac - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pac_verify(krb5_context context, - const krb5_pac pac, - time_t authtime, - krb5_const_principal principal, - const krb5_keyblock *server, - const krb5_keyblock *privsvr) -{ - krb5_error_code ret; - - if (pac->server_checksum == NULL) { - krb5_set_error_message(context, EINVAL, "PAC missing server checksum"); - return EINVAL; - } - if (pac->privsvr_checksum == NULL) { - krb5_set_error_message(context, EINVAL, "PAC missing kdc checksum"); - return EINVAL; - } - if (pac->logon_name == NULL) { - krb5_set_error_message(context, EINVAL, "PAC missing logon name"); - return EINVAL; - } - - ret = verify_logonname(context, - pac->logon_name, - &pac->data, - authtime, - principal); - if (ret) - return ret; - - /* - * in the service case, clean out data option of the privsvr and - * server checksum before checking the checksum. - */ - { - krb5_data *copy; - - ret = krb5_copy_data(context, &pac->data, ©); - if (ret) - return ret; - - if (pac->server_checksum->buffersize < 4) - return EINVAL; - if (pac->privsvr_checksum->buffersize < 4) - return EINVAL; - - memset((char *)copy->data + pac->server_checksum->offset_lo + 4, - 0, - pac->server_checksum->buffersize - 4); - - memset((char *)copy->data + pac->privsvr_checksum->offset_lo + 4, - 0, - pac->privsvr_checksum->buffersize - 4); - - ret = verify_checksum(context, - pac->server_checksum, - &pac->data, - copy->data, - copy->length, - server); - krb5_free_data(context, copy); - if (ret) - return ret; - } - if (privsvr) { - /* The priv checksum covers the server checksum */ - ret = verify_checksum(context, - pac->privsvr_checksum, - &pac->data, - (char *)pac->data.data - + pac->server_checksum->offset_lo + 4, - pac->server_checksum->buffersize - 4, - privsvr); - if (ret) - return ret; - } - - return 0; -} - -/* - * - */ - -static krb5_error_code -fill_zeros(krb5_context context, krb5_storage *sp, size_t len) -{ - ssize_t sret; - size_t l; - - while (len) { - l = len; - if (l > sizeof(zeros)) - l = sizeof(zeros); - sret = krb5_storage_write(sp, zeros, l); - if (sret <= 0) - return krb5_enomem(context); - - len -= sret; - } - return 0; -} - -static krb5_error_code -pac_checksum(krb5_context context, - const krb5_keyblock *key, - uint32_t *cksumtype, - size_t *cksumsize) -{ - krb5_cksumtype cktype; - krb5_error_code ret; - krb5_crypto crypto = NULL; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - return ret; - - ret = krb5_crypto_get_checksum_type(context, crypto, &cktype); - krb5_crypto_destroy(context, crypto); - if (ret) - return ret; - - if (krb5_checksum_is_keyed(context, cktype) == FALSE) { - *cksumtype = CKSUMTYPE_HMAC_MD5; - *cksumsize = 16; - } - - ret = krb5_checksumsize(context, cktype, cksumsize); - if (ret) - return ret; - - *cksumtype = (uint32_t)cktype; - - return 0; -} - -krb5_error_code -_krb5_pac_sign(krb5_context context, - krb5_pac p, - time_t authtime, - krb5_principal principal, - const krb5_keyblock *server_key, - const krb5_keyblock *priv_key, - krb5_data *data) -{ - krb5_error_code ret; - krb5_storage *sp = NULL, *spdata = NULL; - uint32_t end; - size_t server_size, priv_size; - uint32_t server_offset = 0, priv_offset = 0; - uint32_t server_cksumtype = 0, priv_cksumtype = 0; - int num = 0; - size_t i; - krb5_data logon, d; - - krb5_data_zero(&logon); - - if (p->logon_name == NULL) - num++; - if (p->server_checksum == NULL) - num++; - if (p->privsvr_checksum == NULL) - num++; - - if (num) { - void *ptr; - - ptr = realloc(p->pac, sizeof(*p->pac) + (sizeof(p->pac->buffers[0]) * (p->pac->numbuffers + num - 1))); - if (ptr == NULL) - return krb5_enomem(context); - - p->pac = ptr; - - if (p->logon_name == NULL) { - p->logon_name = &p->pac->buffers[p->pac->numbuffers++]; - memset(p->logon_name, 0, sizeof(*p->logon_name)); - p->logon_name->type = PAC_LOGON_NAME; - } - if (p->server_checksum == NULL) { - p->server_checksum = &p->pac->buffers[p->pac->numbuffers++]; - memset(p->server_checksum, 0, sizeof(*p->server_checksum)); - p->server_checksum->type = PAC_SERVER_CHECKSUM; - } - if (p->privsvr_checksum == NULL) { - p->privsvr_checksum = &p->pac->buffers[p->pac->numbuffers++]; - memset(p->privsvr_checksum, 0, sizeof(*p->privsvr_checksum)); - p->privsvr_checksum->type = PAC_PRIVSVR_CHECKSUM; - } - } - - /* Calculate LOGON NAME */ - ret = build_logon_name(context, authtime, principal, &logon); - if (ret) - goto out; - - /* Set lengths for checksum */ - ret = pac_checksum(context, server_key, &server_cksumtype, &server_size); - if (ret) - goto out; - ret = pac_checksum(context, priv_key, &priv_cksumtype, &priv_size); - if (ret) - goto out; - - /* Encode PAC */ - sp = krb5_storage_emem(); - if (sp == NULL) - return krb5_enomem(context); - - krb5_storage_set_flags(sp, KRB5_STORAGE_BYTEORDER_LE); - - spdata = krb5_storage_emem(); - if (spdata == NULL) { - krb5_storage_free(sp); - return krb5_enomem(context); - } - krb5_storage_set_flags(spdata, KRB5_STORAGE_BYTEORDER_LE); - - CHECK(ret, krb5_store_uint32(sp, p->pac->numbuffers), out); - CHECK(ret, krb5_store_uint32(sp, p->pac->version), out); - - end = PACTYPE_SIZE + (PAC_INFO_BUFFER_SIZE * p->pac->numbuffers); - - for (i = 0; i < p->pac->numbuffers; i++) { - uint32_t len; - size_t sret; - void *ptr = NULL; - - /* store data */ - - if (p->pac->buffers[i].type == PAC_SERVER_CHECKSUM) { - len = server_size + 4; - server_offset = end + 4; - CHECK(ret, krb5_store_uint32(spdata, server_cksumtype), out); - CHECK(ret, fill_zeros(context, spdata, server_size), out); - } else if (p->pac->buffers[i].type == PAC_PRIVSVR_CHECKSUM) { - len = priv_size + 4; - priv_offset = end + 4; - CHECK(ret, krb5_store_uint32(spdata, priv_cksumtype), out); - CHECK(ret, fill_zeros(context, spdata, priv_size), out); - } else if (p->pac->buffers[i].type == PAC_LOGON_NAME) { - len = krb5_storage_write(spdata, logon.data, logon.length); - if (logon.length != len) { - ret = EINVAL; - goto out; - } - } else { - len = p->pac->buffers[i].buffersize; - ptr = (char *)p->data.data + p->pac->buffers[i].offset_lo; - - sret = krb5_storage_write(spdata, ptr, len); - if (sret != len) { - ret = krb5_enomem(context); - goto out; - } - /* XXX if not aligned, fill_zeros */ - } - - /* write header */ - CHECK(ret, krb5_store_uint32(sp, p->pac->buffers[i].type), out); - CHECK(ret, krb5_store_uint32(sp, len), out); - CHECK(ret, krb5_store_uint32(sp, end), out); - CHECK(ret, krb5_store_uint32(sp, 0), out); - - /* advance data endpointer and align */ - { - int32_t e; - - end += len; - e = ((end + PAC_ALIGNMENT - 1) / PAC_ALIGNMENT) * PAC_ALIGNMENT; - if ((int32_t)end != e) { - CHECK(ret, fill_zeros(context, spdata, e - end), out); - } - end = e; - } - - } - - /* assert (server_offset != 0 && priv_offset != 0); */ - - /* export PAC */ - ret = krb5_storage_to_data(spdata, &d); - if (ret) { - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - ret = krb5_storage_write(sp, d.data, d.length); - if (ret != (int)d.length) { - krb5_data_free(&d); - ret = krb5_enomem(context); - goto out; - } - krb5_data_free(&d); - - ret = krb5_storage_to_data(sp, &d); - if (ret) { - ret = krb5_enomem(context); - goto out; - } - - /* sign */ - ret = create_checksum(context, server_key, server_cksumtype, - d.data, d.length, - (char *)d.data + server_offset, server_size); - if (ret) { - krb5_data_free(&d); - goto out; - } - ret = create_checksum(context, priv_key, priv_cksumtype, - (char *)d.data + server_offset, server_size, - (char *)d.data + priv_offset, priv_size); - if (ret) { - krb5_data_free(&d); - goto out; - } - - /* done */ - *data = d; - - krb5_data_free(&logon); - krb5_storage_free(sp); - krb5_storage_free(spdata); - - return 0; -out: - krb5_data_free(&logon); - if (sp) - krb5_storage_free(sp); - if (spdata) - krb5_storage_free(spdata); - return ret; -} diff --git a/kerberosV/src/lib/krb5/padata.c b/kerberosV/src/lib/krb5/padata.c deleted file mode 100644 index babe22cb387..00000000000 --- a/kerberosV/src/lib/krb5/padata.c +++ /dev/null @@ -1,65 +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. - */ - -#include "krb5_locl.h" - -KRB5_LIB_FUNCTION PA_DATA * KRB5_LIB_CALL -krb5_find_padata(PA_DATA *val, unsigned len, int type, int *idx) -{ - for(; *idx < (int)len; (*idx)++) - if(val[*idx].padata_type == (unsigned)type) - return val + *idx; - return NULL; -} - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_padata_add(krb5_context context, METHOD_DATA *md, - int type, void *buf, size_t len) -{ - PA_DATA *pa; - - pa = realloc (md->val, (md->len + 1) * sizeof(*md->val)); - if (pa == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - md->val = pa; - - pa[md->len].padata_type = type; - pa[md->len].padata_value.length = len; - pa[md->len].padata_value.data = buf; - md->len++; - - return 0; -} diff --git a/kerberosV/src/lib/krb5/parse-name-test.c b/kerberosV/src/lib/krb5/parse-name-test.c deleted file mode 100644 index bb2fc024e61..00000000000 --- a/kerberosV/src/lib/krb5/parse-name-test.c +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2002 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 "krb5_locl.h" -#include - -enum { MAX_COMPONENTS = 3 }; - -static struct testcase { - const char *input_string; - const char *output_string; - krb5_realm realm; - unsigned ncomponents; - char *comp_val[MAX_COMPONENTS]; - int realmp; -} tests[] = { - {"", "@", "", 1, {""}, FALSE}, - {"a", "a@", "", 1, {"a"}, FALSE}, - {"\\n", "\\n@", "", 1, {"\n"}, FALSE}, - {"\\ ", "\\ @", "", 1, {" "}, FALSE}, - {"\\t", "\\t@", "", 1, {"\t"}, FALSE}, - {"\\b", "\\b@", "", 1, {"\b"}, FALSE}, - {"\\\\", "\\\\@", "", 1, {"\\"}, FALSE}, - {"\\/", "\\/@", "", 1, {"/"}, FALSE}, - {"\\@", "\\@@", "", 1, {"@"}, FALSE}, - {"@", "@", "", 1, {""}, TRUE}, - {"a/b", "a/b@", "", 2, {"a", "b"}, FALSE}, - {"a/", "a/@", "", 2, {"a", ""}, FALSE}, - {"a\\//\\/", "a\\//\\/@", "", 2, {"a/", "/"}, FALSE}, - {"/a", "/a@", "", 2, {"", "a"}, FALSE}, - {"\\@@\\@", "\\@@\\@", "@", 1, {"@"}, TRUE}, - {"a/b/c", "a/b/c@", "", 3, {"a", "b", "c"}, FALSE}, - {NULL, NULL, "", 0, { NULL }, FALSE}}; - -int -main(int argc, char **argv) -{ - struct testcase *t; - krb5_context context; - krb5_error_code ret; - int val = 0; - - ret = krb5_init_context (&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - /* to enable realm-less principal name above */ - - krb5_set_default_realm(context, ""); - - for (t = tests; t->input_string; ++t) { - krb5_principal princ; - int i, j; - char name_buf[1024]; - char *s; - - ret = krb5_parse_name(context, t->input_string, &princ); - if (ret) - krb5_err (context, 1, ret, "krb5_parse_name %s", - t->input_string); - if (strcmp (t->realm, princ->realm) != 0) { - printf ("wrong realm (\"%s\" should be \"%s\")" - " for \"%s\"\n", - princ->realm, t->realm, - t->input_string); - val = 1; - } - - if (t->ncomponents != princ->name.name_string.len) { - printf ("wrong number of components (%u should be %u)" - " for \"%s\"\n", - princ->name.name_string.len, t->ncomponents, - t->input_string); - val = 1; - } else { - for (i = 0; i < t->ncomponents; ++i) { - if (strcmp(t->comp_val[i], - princ->name.name_string.val[i]) != 0) { - printf ("bad component %d (\"%s\" should be \"%s\")" - " for \"%s\"\n", - i, - princ->name.name_string.val[i], - t->comp_val[i], - t->input_string); - val = 1; - } - } - } - for (j = 0; j < strlen(t->output_string); ++j) { - ret = krb5_unparse_name_fixed(context, princ, - name_buf, j); - if (ret != ERANGE) { - printf ("unparse_name %s with length %d should have failed\n", - t->input_string, j); - val = 1; - break; - } - } - ret = krb5_unparse_name_fixed(context, princ, - name_buf, sizeof(name_buf)); - if (ret) - krb5_err (context, 1, ret, "krb5_unparse_name_fixed"); - - if (strcmp (t->output_string, name_buf) != 0) { - printf ("failed comparing the re-parsed" - " (\"%s\" should be \"%s\")\n", - name_buf, t->output_string); - val = 1; - } - - ret = krb5_unparse_name(context, princ, &s); - if (ret) - krb5_err (context, 1, ret, "krb5_unparse_name"); - - if (strcmp (t->output_string, s) != 0) { - printf ("failed comparing the re-parsed" - " (\"%s\" should be \"%s\"\n", - s, t->output_string); - val = 1; - } - free(s); - - if (!t->realmp) { - for (j = 0; j < strlen(t->input_string); ++j) { - ret = krb5_unparse_name_fixed_short(context, princ, - name_buf, j); - if (ret != ERANGE) { - printf ("unparse_name_short %s with length %d" - " should have failed\n", - t->input_string, j); - val = 1; - break; - } - } - ret = krb5_unparse_name_fixed_short(context, princ, - name_buf, sizeof(name_buf)); - if (ret) - krb5_err (context, 1, ret, "krb5_unparse_name_fixed"); - - if (strcmp (t->input_string, name_buf) != 0) { - printf ("failed comparing the re-parsed" - " (\"%s\" should be \"%s\")\n", - name_buf, t->input_string); - val = 1; - } - - ret = krb5_unparse_name_short(context, princ, &s); - if (ret) - krb5_err (context, 1, ret, "krb5_unparse_name_short"); - - if (strcmp (t->input_string, s) != 0) { - printf ("failed comparing the re-parsed" - " (\"%s\" should be \"%s\"\n", - s, t->input_string); - val = 1; - } - free(s); - } - krb5_free_principal (context, princ); - } - krb5_free_context(context); - return val; -} diff --git a/kerberosV/src/lib/krb5/pcache.c b/kerberosV/src/lib/krb5/pcache.c deleted file mode 100644 index 23d5389a607..00000000000 --- a/kerberosV/src/lib/krb5/pcache.c +++ /dev/null @@ -1,66 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2010, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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 "krb5_locl.h" -#include "ccache_plugin.h" -#ifdef HAVE_DLFCN_H -#include -#endif -#include - -krb5_error_code -_krb5_load_ccache_plugins(krb5_context context) -{ - struct krb5_plugin * plist = NULL; - struct krb5_plugin *p; - krb5_error_code code; - - code = _krb5_plugin_find(context, PLUGIN_TYPE_DATA, KRB5_PLUGIN_CCACHE, - &plist); - if (code) - return code; - - for (p = plist; p != NULL; p = _krb5_plugin_get_next(p)) { - krb5_cc_ops * ccops; - krb5_error_code c_load; - - ccops = _krb5_plugin_get_symbol(p); - if (ccops != NULL && ccops->version == KRB5_CC_OPS_VERSION) { - c_load = krb5_cc_register(context, ccops, TRUE); - if (c_load != 0) - code = c_load; - } - } - - _krb5_plugin_free(plist); - - return code; -} diff --git a/kerberosV/src/lib/krb5/pkinit.c b/kerberosV/src/lib/krb5/pkinit.c deleted file mode 100644 index 1103a17807b..00000000000 --- a/kerberosV/src/lib/krb5/pkinit.c +++ /dev/null @@ -1,2641 +0,0 @@ -/* - * Copyright (c) 2003 - 2007 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" - -struct krb5_dh_moduli { - char *name; - unsigned long bits; - heim_integer p; - heim_integer g; - heim_integer q; -}; - -#ifdef PKINIT - -#include -#include -#include -#include -#include -#include - -#include - -struct krb5_pk_cert { - hx509_cert cert; -}; - -struct krb5_pk_init_ctx_data { - struct krb5_pk_identity *id; - enum { USE_RSA, USE_DH, USE_ECDH } keyex; - union { - DH *dh; -#ifdef HAVE_OPENSSL - EC_KEY *eckey; -#endif - } u; - krb5_data *clientDHNonce; - struct krb5_dh_moduli **m; - hx509_peer_info peer; - enum krb5_pk_type type; - unsigned int require_binding:1; - unsigned int require_eku:1; - unsigned int require_krbtgt_otherName:1; - unsigned int require_hostname_match:1; - unsigned int trustedCertifiers:1; - unsigned int anonymous:1; -}; - -static void -pk_copy_error(krb5_context context, - hx509_context hx509ctx, - int hxret, - const char *fmt, - ...) - __attribute__ ((format (printf, 4, 5))); - -/* - * - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -_krb5_pk_cert_free(struct krb5_pk_cert *cert) -{ - if (cert->cert) { - hx509_cert_free(cert->cert); - } - free(cert); -} - -static krb5_error_code -BN_to_integer(krb5_context context, BIGNUM *bn, heim_integer *integer) -{ - integer->length = BN_num_bytes(bn); - integer->data = malloc(integer->length); - if (integer->data == NULL) { - krb5_clear_error_message(context); - return ENOMEM; - } - BN_bn2bin(bn, integer->data); - integer->negative = BN_is_negative(bn); - return 0; -} - -static BIGNUM * -integer_to_BN(krb5_context context, const char *field, const heim_integer *f) -{ - BIGNUM *bn; - - bn = BN_bin2bn((const unsigned char *)f->data, f->length, NULL); - if (bn == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("PKINIT: parsing BN failed %s", ""), field); - return NULL; - } - BN_set_negative(bn, f->negative); - return bn; -} - -static krb5_error_code -select_dh_group(krb5_context context, DH *dh, unsigned long bits, - struct krb5_dh_moduli **moduli) -{ - const struct krb5_dh_moduli *m; - - if (bits == 0) { - m = moduli[1]; /* XXX */ - if (m == NULL) - m = moduli[0]; /* XXX */ - } else { - int i; - for (i = 0; moduli[i] != NULL; i++) { - if (bits < moduli[i]->bits) - break; - } - if (moduli[i] == NULL) { - krb5_set_error_message(context, EINVAL, - N_("Did not find a DH group parameter " - "matching requirement of %lu bits", ""), - bits); - return EINVAL; - } - m = moduli[i]; - } - - dh->p = integer_to_BN(context, "p", &m->p); - if (dh->p == NULL) - return ENOMEM; - dh->g = integer_to_BN(context, "g", &m->g); - if (dh->g == NULL) - return ENOMEM; - dh->q = integer_to_BN(context, "q", &m->q); - if (dh->q == NULL) - return ENOMEM; - - return 0; -} - -struct certfind { - const char *type; - const heim_oid *oid; -}; - -/* - * Try searchin the key by to use by first looking for for PK-INIT - * EKU, then the Microsoft smart card EKU and last, no special EKU at all. - */ - -static krb5_error_code -find_cert(krb5_context context, struct krb5_pk_identity *id, - hx509_query *q, hx509_cert *cert) -{ - struct certfind cf[4] = { - { "MobileMe EKU" }, - { "PKINIT EKU" }, - { "MS EKU" }, - { "any (or no)" } - }; - int ret = HX509_CERT_NOT_FOUND; - size_t i, start = 1; - unsigned oids[] = { 1, 2, 840, 113635, 100, 3, 2, 1 }; - const heim_oid mobileMe = { sizeof(oids)/sizeof(oids[0]), oids }; - - - if (id->flags & PKINIT_BTMM) - start = 0; - - cf[0].oid = &mobileMe; - cf[1].oid = &asn1_oid_id_pkekuoid; - cf[2].oid = &asn1_oid_id_pkinit_ms_eku; - cf[3].oid = NULL; - - for (i = start; i < sizeof(cf)/sizeof(cf[0]); i++) { - ret = hx509_query_match_eku(q, cf[i].oid); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed setting %s OID", cf[i].type); - return ret; - } - - ret = hx509_certs_find(context->hx509ctx, id->certs, q, cert); - if (ret == 0) - break; - pk_copy_error(context, context->hx509ctx, ret, - "Failed finding certificate with %s OID", cf[i].type); - } - return ret; -} - - -static krb5_error_code -create_signature(krb5_context context, - const heim_oid *eContentType, - krb5_data *eContent, - struct krb5_pk_identity *id, - hx509_peer_info peer, - krb5_data *sd_data) -{ - int ret, flags = 0; - - if (id->cert == NULL) - flags |= HX509_CMS_SIGNATURE_NO_SIGNER; - - ret = hx509_cms_create_signed_1(context->hx509ctx, - flags, - eContentType, - eContent->data, - eContent->length, - NULL, - id->cert, - peer, - NULL, - id->certs, - sd_data); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Create CMS signedData"); - return ret; - } - - return 0; -} - -static int -cert2epi(hx509_context context, void *ctx, hx509_cert c) -{ - ExternalPrincipalIdentifiers *ids = ctx; - ExternalPrincipalIdentifier id; - hx509_name subject = NULL; - void *p; - int ret; - - if (ids->len > 10) - return 0; - - memset(&id, 0, sizeof(id)); - - ret = hx509_cert_get_subject(c, &subject); - if (ret) - return ret; - - if (hx509_name_is_null_p(subject) != 0) { - - id.subjectName = calloc(1, sizeof(*id.subjectName)); - if (id.subjectName == NULL) { - hx509_name_free(&subject); - free_ExternalPrincipalIdentifier(&id); - return ENOMEM; - } - - ret = hx509_name_binary(subject, id.subjectName); - if (ret) { - hx509_name_free(&subject); - free_ExternalPrincipalIdentifier(&id); - return ret; - } - } - hx509_name_free(&subject); - - - id.issuerAndSerialNumber = calloc(1, sizeof(*id.issuerAndSerialNumber)); - if (id.issuerAndSerialNumber == NULL) { - free_ExternalPrincipalIdentifier(&id); - return ENOMEM; - } - - { - IssuerAndSerialNumber iasn; - hx509_name issuer; - size_t size = 0; - - memset(&iasn, 0, sizeof(iasn)); - - ret = hx509_cert_get_issuer(c, &issuer); - if (ret) { - free_ExternalPrincipalIdentifier(&id); - return ret; - } - - ret = hx509_name_to_Name(issuer, &iasn.issuer); - hx509_name_free(&issuer); - if (ret) { - free_ExternalPrincipalIdentifier(&id); - return ret; - } - - ret = hx509_cert_get_serialnumber(c, &iasn.serialNumber); - if (ret) { - free_IssuerAndSerialNumber(&iasn); - free_ExternalPrincipalIdentifier(&id); - return ret; - } - - ASN1_MALLOC_ENCODE(IssuerAndSerialNumber, - id.issuerAndSerialNumber->data, - id.issuerAndSerialNumber->length, - &iasn, &size, ret); - free_IssuerAndSerialNumber(&iasn); - if (ret) - return ret; - if (id.issuerAndSerialNumber->length != size) - abort(); - } - - id.subjectKeyIdentifier = NULL; - - p = realloc(ids->val, sizeof(ids->val[0]) * (ids->len + 1)); - if (p == NULL) { - free_ExternalPrincipalIdentifier(&id); - return ENOMEM; - } - - ids->val = p; - ids->val[ids->len] = id; - ids->len++; - - return 0; -} - -static krb5_error_code -build_edi(krb5_context context, - hx509_context hx509ctx, - hx509_certs certs, - ExternalPrincipalIdentifiers *ids) -{ - return hx509_certs_iter_f(hx509ctx, certs, cert2epi, ids); -} - -static krb5_error_code -build_auth_pack(krb5_context context, - unsigned nonce, - krb5_pk_init_ctx ctx, - const KDC_REQ_BODY *body, - AuthPack *a) -{ - size_t buf_size, len = 0; - krb5_error_code ret; - void *buf; - krb5_timestamp sec; - int32_t usec; - Checksum checksum; - - krb5_clear_error_message(context); - - memset(&checksum, 0, sizeof(checksum)); - - krb5_us_timeofday(context, &sec, &usec); - a->pkAuthenticator.ctime = sec; - a->pkAuthenticator.nonce = nonce; - - ASN1_MALLOC_ENCODE(KDC_REQ_BODY, buf, buf_size, body, &len, ret); - if (ret) - return ret; - if (buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - ret = krb5_create_checksum(context, - NULL, - 0, - CKSUMTYPE_SHA1, - buf, - len, - &checksum); - free(buf); - if (ret) - return ret; - - ALLOC(a->pkAuthenticator.paChecksum, 1); - if (a->pkAuthenticator.paChecksum == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = krb5_data_copy(a->pkAuthenticator.paChecksum, - checksum.checksum.data, checksum.checksum.length); - free_Checksum(&checksum); - if (ret) - return ret; - - if (ctx->keyex == USE_DH || ctx->keyex == USE_ECDH) { - const char *moduli_file; - unsigned long dh_min_bits; - krb5_data dhbuf; - size_t size = 0; - - krb5_data_zero(&dhbuf); - - - - moduli_file = krb5_config_get_string(context, NULL, - "libdefaults", - "moduli", - NULL); - - dh_min_bits = - krb5_config_get_int_default(context, NULL, 0, - "libdefaults", - "pkinit_dh_min_bits", - NULL); - - ret = _krb5_parse_moduli(context, moduli_file, &ctx->m); - if (ret) - return ret; - - ctx->u.dh = DH_new(); - if (ctx->u.dh == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = select_dh_group(context, ctx->u.dh, dh_min_bits, ctx->m); - if (ret) - return ret; - - if (DH_generate_key(ctx->u.dh) != 1) { - krb5_set_error_message(context, ENOMEM, - N_("pkinit: failed to generate DH key", "")); - return ENOMEM; - } - - - if (1 /* support_cached_dh */) { - ALLOC(a->clientDHNonce, 1); - if (a->clientDHNonce == NULL) { - krb5_clear_error_message(context); - return ENOMEM; - } - ret = krb5_data_alloc(a->clientDHNonce, 40); - if (a->clientDHNonce == NULL) { - krb5_clear_error_message(context); - return ret; - } - RAND_bytes(a->clientDHNonce->data, a->clientDHNonce->length); - ret = krb5_copy_data(context, a->clientDHNonce, - &ctx->clientDHNonce); - if (ret) - return ret; - } - - ALLOC(a->clientPublicValue, 1); - if (a->clientPublicValue == NULL) - return ENOMEM; - - if (ctx->keyex == USE_DH) { - DH *dh = ctx->u.dh; - DomainParameters dp; - heim_integer dh_pub_key; - - ret = der_copy_oid(&asn1_oid_id_dhpublicnumber, - &a->clientPublicValue->algorithm.algorithm); - if (ret) - return ret; - - memset(&dp, 0, sizeof(dp)); - - ret = BN_to_integer(context, dh->p, &dp.p); - if (ret) { - free_DomainParameters(&dp); - return ret; - } - ret = BN_to_integer(context, dh->g, &dp.g); - if (ret) { - free_DomainParameters(&dp); - return ret; - } - ret = BN_to_integer(context, dh->q, &dp.q); - if (ret) { - free_DomainParameters(&dp); - return ret; - } - dp.j = NULL; - dp.validationParms = NULL; - - a->clientPublicValue->algorithm.parameters = - malloc(sizeof(*a->clientPublicValue->algorithm.parameters)); - if (a->clientPublicValue->algorithm.parameters == NULL) { - free_DomainParameters(&dp); - return ret; - } - - ASN1_MALLOC_ENCODE(DomainParameters, - a->clientPublicValue->algorithm.parameters->data, - a->clientPublicValue->algorithm.parameters->length, - &dp, &size, ret); - free_DomainParameters(&dp); - if (ret) - return ret; - if (size != a->clientPublicValue->algorithm.parameters->length) - krb5_abortx(context, "Internal ASN1 encoder error"); - - ret = BN_to_integer(context, dh->pub_key, &dh_pub_key); - if (ret) - return ret; - - ASN1_MALLOC_ENCODE(DHPublicKey, dhbuf.data, dhbuf.length, - &dh_pub_key, &size, ret); - der_free_heim_integer(&dh_pub_key); - if (ret) - return ret; - if (size != dhbuf.length) - krb5_abortx(context, "asn1 internal error"); - } else if (ctx->keyex == USE_ECDH) { -#ifdef HAVE_OPENSSL - ECParameters ecp; - unsigned char *p; - int xlen; - - /* copy in public key, XXX find the best curve that the server support or use the clients curve if possible */ - - ecp.element = choice_ECParameters_namedCurve; - ret = der_copy_oid(&asn1_oid_id_ec_group_secp256r1, - &ecp.u.namedCurve); - if (ret) - return ret; - - ALLOC(a->clientPublicValue->algorithm.parameters, 1); - if (a->clientPublicValue->algorithm.parameters == NULL) { - free_ECParameters(&ecp); - return ENOMEM; - } - ASN1_MALLOC_ENCODE(ECParameters, p, xlen, &ecp, &size, ret); - free_ECParameters(&ecp); - if (ret) - return ret; - if ((int)size != xlen) - krb5_abortx(context, "asn1 internal error"); - - a->clientPublicValue->algorithm.parameters->data = p; - a->clientPublicValue->algorithm.parameters->length = size; - - /* copy in public key */ - - ret = der_copy_oid(&asn1_oid_id_ecPublicKey, - &a->clientPublicValue->algorithm.algorithm); - if (ret) - return ret; - - ctx->u.eckey = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); - if (ctx->u.eckey == NULL) - return ENOMEM; - - ret = EC_KEY_generate_key(ctx->u.eckey); - if (ret != 1) - return EINVAL; - - /* encode onto dhkey */ - - xlen = i2o_ECPublicKey(ctx->u.eckey, NULL); - if (xlen <= 0) - abort(); - - dhbuf.data = malloc(xlen); - if (dhbuf.data == NULL) - abort(); - dhbuf.length = xlen; - p = dhbuf.data; - - xlen = i2o_ECPublicKey(ctx->u.eckey, &p); - if (xlen <= 0) - abort(); - - /* XXX verify that this is right with RFC3279 */ -#else - return EINVAL; -#endif - } else - krb5_abortx(context, "internal error"); - a->clientPublicValue->subjectPublicKey.length = dhbuf.length * 8; - a->clientPublicValue->subjectPublicKey.data = dhbuf.data; - } - - { - a->supportedCMSTypes = calloc(1, sizeof(*a->supportedCMSTypes)); - if (a->supportedCMSTypes == NULL) - return ENOMEM; - - ret = hx509_crypto_available(context->hx509ctx, HX509_SELECT_ALL, - ctx->id->cert, - &a->supportedCMSTypes->val, - &a->supportedCMSTypes->len); - if (ret) - return ret; - } - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_pk_mk_ContentInfo(krb5_context context, - const krb5_data *buf, - const heim_oid *oid, - struct ContentInfo *content_info) -{ - krb5_error_code ret; - - ret = der_copy_oid(oid, &content_info->contentType); - if (ret) - return ret; - ALLOC(content_info->content, 1); - if (content_info->content == NULL) - return ENOMEM; - content_info->content->data = malloc(buf->length); - if (content_info->content->data == NULL) - return ENOMEM; - memcpy(content_info->content->data, buf->data, buf->length); - content_info->content->length = buf->length; - return 0; -} - -static krb5_error_code -pk_mk_padata(krb5_context context, - krb5_pk_init_ctx ctx, - const KDC_REQ_BODY *req_body, - unsigned nonce, - METHOD_DATA *md) -{ - struct ContentInfo content_info; - krb5_error_code ret; - const heim_oid *oid = NULL; - size_t size = 0; - krb5_data buf, sd_buf; - int pa_type = -1; - - krb5_data_zero(&buf); - krb5_data_zero(&sd_buf); - memset(&content_info, 0, sizeof(content_info)); - - if (ctx->type == PKINIT_WIN2K) { - AuthPack_Win2k ap; - krb5_timestamp sec; - int32_t usec; - - memset(&ap, 0, sizeof(ap)); - - /* fill in PKAuthenticator */ - ret = copy_PrincipalName(req_body->sname, &ap.pkAuthenticator.kdcName); - if (ret) { - free_AuthPack_Win2k(&ap); - krb5_clear_error_message(context); - goto out; - } - ret = copy_Realm(&req_body->realm, &ap.pkAuthenticator.kdcRealm); - if (ret) { - free_AuthPack_Win2k(&ap); - krb5_clear_error_message(context); - goto out; - } - - krb5_us_timeofday(context, &sec, &usec); - ap.pkAuthenticator.ctime = sec; - ap.pkAuthenticator.cusec = usec; - ap.pkAuthenticator.nonce = nonce; - - ASN1_MALLOC_ENCODE(AuthPack_Win2k, buf.data, buf.length, - &ap, &size, ret); - free_AuthPack_Win2k(&ap); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed encoding AuthPackWin: %d", ""), - (int)ret); - goto out; - } - if (buf.length != size) - krb5_abortx(context, "internal ASN1 encoder error"); - - oid = &asn1_oid_id_pkcs7_data; - } else if (ctx->type == PKINIT_27) { - AuthPack ap; - - memset(&ap, 0, sizeof(ap)); - - ret = build_auth_pack(context, nonce, ctx, req_body, &ap); - if (ret) { - free_AuthPack(&ap); - goto out; - } - - ASN1_MALLOC_ENCODE(AuthPack, buf.data, buf.length, &ap, &size, ret); - free_AuthPack(&ap); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed encoding AuthPack: %d", ""), - (int)ret); - goto out; - } - if (buf.length != size) - krb5_abortx(context, "internal ASN1 encoder error"); - - oid = &asn1_oid_id_pkauthdata; - } else - krb5_abortx(context, "internal pkinit error"); - - ret = create_signature(context, oid, &buf, ctx->id, - ctx->peer, &sd_buf); - krb5_data_free(&buf); - if (ret) - goto out; - - ret = hx509_cms_wrap_ContentInfo(&asn1_oid_id_pkcs7_signedData, &sd_buf, &buf); - krb5_data_free(&sd_buf); - if (ret) { - krb5_set_error_message(context, ret, - N_("ContentInfo wrapping of signedData failed","")); - goto out; - } - - if (ctx->type == PKINIT_WIN2K) { - PA_PK_AS_REQ_Win2k winreq; - - pa_type = KRB5_PADATA_PK_AS_REQ_WIN; - - memset(&winreq, 0, sizeof(winreq)); - - winreq.signed_auth_pack = buf; - - ASN1_MALLOC_ENCODE(PA_PK_AS_REQ_Win2k, buf.data, buf.length, - &winreq, &size, ret); - free_PA_PK_AS_REQ_Win2k(&winreq); - - } else if (ctx->type == PKINIT_27) { - PA_PK_AS_REQ req; - - pa_type = KRB5_PADATA_PK_AS_REQ; - - memset(&req, 0, sizeof(req)); - req.signedAuthPack = buf; - - if (ctx->trustedCertifiers) { - - req.trustedCertifiers = calloc(1, sizeof(*req.trustedCertifiers)); - if (req.trustedCertifiers == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - free_PA_PK_AS_REQ(&req); - goto out; - } - ret = build_edi(context, context->hx509ctx, - ctx->id->anchors, req.trustedCertifiers); - if (ret) { - krb5_set_error_message(context, ret, - N_("pk-init: failed to build " - "trustedCertifiers", "")); - free_PA_PK_AS_REQ(&req); - goto out; - } - } - req.kdcPkId = NULL; - - ASN1_MALLOC_ENCODE(PA_PK_AS_REQ, buf.data, buf.length, - &req, &size, ret); - - free_PA_PK_AS_REQ(&req); - - } else - krb5_abortx(context, "internal pkinit error"); - if (ret) { - krb5_set_error_message(context, ret, "PA-PK-AS-REQ %d", (int)ret); - goto out; - } - if (buf.length != size) - krb5_abortx(context, "Internal ASN1 encoder error"); - - ret = krb5_padata_add(context, md, pa_type, buf.data, buf.length); - if (ret) - free(buf.data); - - if (ret == 0) - krb5_padata_add(context, md, KRB5_PADATA_PK_AS_09_BINDING, NULL, 0); - - out: - free_ContentInfo(&content_info); - - return ret; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_pk_mk_padata(krb5_context context, - void *c, - int ic_flags, - int win2k, - const KDC_REQ_BODY *req_body, - unsigned nonce, - METHOD_DATA *md) -{ - krb5_pk_init_ctx ctx = c; - int win2k_compat; - - if (ctx->id->certs == NULL && ctx->anonymous == 0) { - krb5_set_error_message(context, HEIM_PKINIT_NO_PRIVATE_KEY, - N_("PKINIT: No user certificate given", "")); - return HEIM_PKINIT_NO_PRIVATE_KEY; - } - - win2k_compat = krb5_config_get_bool_default(context, NULL, - win2k, - "realms", - req_body->realm, - "pkinit_win2k", - NULL); - - if (win2k_compat) { - ctx->require_binding = - krb5_config_get_bool_default(context, NULL, - TRUE, - "realms", - req_body->realm, - "pkinit_win2k_require_binding", - NULL); - ctx->type = PKINIT_WIN2K; - } else - ctx->type = PKINIT_27; - - ctx->require_eku = - krb5_config_get_bool_default(context, NULL, - TRUE, - "realms", - req_body->realm, - "pkinit_require_eku", - NULL); - if (ic_flags & KRB5_INIT_CREDS_NO_C_NO_EKU_CHECK) - ctx->require_eku = 0; - if (ctx->id->flags & PKINIT_BTMM) - ctx->require_eku = 0; - - ctx->require_krbtgt_otherName = - krb5_config_get_bool_default(context, NULL, - TRUE, - "realms", - req_body->realm, - "pkinit_require_krbtgt_otherName", - NULL); - - ctx->require_hostname_match = - krb5_config_get_bool_default(context, NULL, - FALSE, - "realms", - req_body->realm, - "pkinit_require_hostname_match", - NULL); - - ctx->trustedCertifiers = - krb5_config_get_bool_default(context, NULL, - TRUE, - "realms", - req_body->realm, - "pkinit_trustedCertifiers", - NULL); - - return pk_mk_padata(context, ctx, req_body, nonce, md); -} - -static krb5_error_code -pk_verify_sign(krb5_context context, - const void *data, - size_t length, - struct krb5_pk_identity *id, - heim_oid *contentType, - krb5_data *content, - struct krb5_pk_cert **signer) -{ - hx509_certs signer_certs; - int ret, flags = 0; - - /* BTMM is broken in Leo and SnowLeo */ - if (id->flags & PKINIT_BTMM) { - flags |= HX509_CMS_VS_ALLOW_DATA_OID_MISMATCH; - flags |= HX509_CMS_VS_NO_KU_CHECK; - flags |= HX509_CMS_VS_NO_VALIDATE; - } - - *signer = NULL; - - ret = hx509_cms_verify_signed(context->hx509ctx, - id->verify_ctx, - flags, - data, - length, - NULL, - id->certpool, - contentType, - content, - &signer_certs); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "CMS verify signed failed"); - return ret; - } - - *signer = calloc(1, sizeof(**signer)); - if (*signer == NULL) { - krb5_clear_error_message(context); - ret = ENOMEM; - goto out; - } - - ret = hx509_get_one_cert(context->hx509ctx, signer_certs, &(*signer)->cert); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed to get on of the signer certs"); - goto out; - } - - out: - hx509_certs_free(&signer_certs); - if (ret) { - if (*signer) { - hx509_cert_free((*signer)->cert); - free(*signer); - *signer = NULL; - } - } - - return ret; -} - -static krb5_error_code -get_reply_key_win(krb5_context context, - const krb5_data *content, - unsigned nonce, - krb5_keyblock **key) -{ - ReplyKeyPack_Win2k key_pack; - krb5_error_code ret; - size_t size; - - ret = decode_ReplyKeyPack_Win2k(content->data, - content->length, - &key_pack, - &size); - if (ret) { - krb5_set_error_message(context, ret, - N_("PKINIT decoding reply key failed", "")); - free_ReplyKeyPack_Win2k(&key_pack); - return ret; - } - - if ((unsigned)key_pack.nonce != nonce) { - krb5_set_error_message(context, ret, - N_("PKINIT enckey nonce is wrong", "")); - free_ReplyKeyPack_Win2k(&key_pack); - return KRB5KRB_AP_ERR_MODIFIED; - } - - *key = malloc (sizeof (**key)); - if (*key == NULL) { - free_ReplyKeyPack_Win2k(&key_pack); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = copy_EncryptionKey(&key_pack.replyKey, *key); - free_ReplyKeyPack_Win2k(&key_pack); - if (ret) { - krb5_set_error_message(context, ret, - N_("PKINIT failed copying reply key", "")); - free(*key); - *key = NULL; - } - - return ret; -} - -static krb5_error_code -get_reply_key(krb5_context context, - const krb5_data *content, - const krb5_data *req_buffer, - krb5_keyblock **key) -{ - ReplyKeyPack key_pack; - krb5_error_code ret; - size_t size; - - ret = decode_ReplyKeyPack(content->data, - content->length, - &key_pack, - &size); - if (ret) { - krb5_set_error_message(context, ret, - N_("PKINIT decoding reply key failed", "")); - free_ReplyKeyPack(&key_pack); - return ret; - } - - { - krb5_crypto crypto; - - /* - * XXX Verify kp.replyKey is a allowed enctype in the - * configuration file - */ - - ret = krb5_crypto_init(context, &key_pack.replyKey, 0, &crypto); - if (ret) { - free_ReplyKeyPack(&key_pack); - return ret; - } - - ret = krb5_verify_checksum(context, crypto, 6, - req_buffer->data, req_buffer->length, - &key_pack.asChecksum); - krb5_crypto_destroy(context, crypto); - if (ret) { - free_ReplyKeyPack(&key_pack); - return ret; - } - } - - *key = malloc (sizeof (**key)); - if (*key == NULL) { - free_ReplyKeyPack(&key_pack); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = copy_EncryptionKey(&key_pack.replyKey, *key); - free_ReplyKeyPack(&key_pack); - if (ret) { - krb5_set_error_message(context, ret, - N_("PKINIT failed copying reply key", "")); - free(*key); - *key = NULL; - } - - return ret; -} - - -static krb5_error_code -pk_verify_host(krb5_context context, - const char *realm, - const krb5_krbhst_info *hi, - struct krb5_pk_init_ctx_data *ctx, - struct krb5_pk_cert *host) -{ - krb5_error_code ret = 0; - - if (ctx->require_eku) { - ret = hx509_cert_check_eku(context->hx509ctx, host->cert, - &asn1_oid_id_pkkdcekuoid, 0); - if (ret) { - krb5_set_error_message(context, ret, - N_("No PK-INIT KDC EKU in kdc certificate", "")); - return ret; - } - } - if (ctx->require_krbtgt_otherName) { - hx509_octet_string_list list; - size_t i; - - ret = hx509_cert_find_subjectAltName_otherName(context->hx509ctx, - host->cert, - &asn1_oid_id_pkinit_san, - &list); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to find the PK-INIT " - "subjectAltName in the KDC " - "certificate", "")); - - return ret; - } - - for (i = 0; i < list.len; i++) { - KRB5PrincipalName r; - - ret = decode_KRB5PrincipalName(list.val[i].data, - list.val[i].length, - &r, - NULL); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to decode the PK-INIT " - "subjectAltName in the " - "KDC certificate", "")); - - break; - } - - if (r.principalName.name_string.len != 2 || - strcmp(r.principalName.name_string.val[0], KRB5_TGS_NAME) != 0 || - strcmp(r.principalName.name_string.val[1], realm) != 0 || - strcmp(r.realm, realm) != 0) - { - ret = KRB5_KDC_ERR_INVALID_CERTIFICATE; - krb5_set_error_message(context, ret, - N_("KDC have wrong realm name in " - "the certificate", "")); - } - - free_KRB5PrincipalName(&r); - if (ret) - break; - } - hx509_free_octet_string_list(&list); - } - if (ret) - return ret; - - if (hi) { - ret = hx509_verify_hostname(context->hx509ctx, host->cert, - ctx->require_hostname_match, - HX509_HN_HOSTNAME, - hi->hostname, - hi->ai->ai_addr, hi->ai->ai_addrlen); - - if (ret) - krb5_set_error_message(context, ret, - N_("Address mismatch in " - "the KDC certificate", "")); - } - return ret; -} - -static krb5_error_code -pk_rd_pa_reply_enckey(krb5_context context, - int type, - const heim_octet_string *indata, - const heim_oid *dataType, - const char *realm, - krb5_pk_init_ctx ctx, - krb5_enctype etype, - const krb5_krbhst_info *hi, - unsigned nonce, - const krb5_data *req_buffer, - PA_DATA *pa, - krb5_keyblock **key) -{ - krb5_error_code ret; - struct krb5_pk_cert *host = NULL; - krb5_data content; - heim_oid contentType = { 0, NULL }; - int flags = HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT; - - if (der_heim_oid_cmp(&asn1_oid_id_pkcs7_envelopedData, dataType)) { - krb5_set_error_message(context, EINVAL, - N_("PKINIT: Invalid content type", "")); - return EINVAL; - } - - if (ctx->type == PKINIT_WIN2K) - flags |= HX509_CMS_UE_ALLOW_WEAK; - - ret = hx509_cms_unenvelope(context->hx509ctx, - ctx->id->certs, - flags, - indata->data, - indata->length, - NULL, - 0, - &contentType, - &content); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed to unenvelope CMS data in PK-INIT reply"); - return ret; - } - der_free_oid(&contentType); - - /* win2k uses ContentInfo */ - if (type == PKINIT_WIN2K) { - heim_oid type2; - heim_octet_string out; - - ret = hx509_cms_unwrap_ContentInfo(&content, &type2, &out, NULL); - if (ret) { - /* windows LH with interesting CMS packets */ - size_t ph = 1 + der_length_len(content.length); - unsigned char *ptr = malloc(content.length + ph); - size_t l; - - memcpy(ptr + ph, content.data, content.length); - - ret = der_put_length_and_tag (ptr + ph - 1, ph, content.length, - ASN1_C_UNIV, CONS, UT_Sequence, &l); - if (ret) - return ret; - free(content.data); - content.data = ptr; - content.length += ph; - - ret = hx509_cms_unwrap_ContentInfo(&content, &type2, &out, NULL); - if (ret) - goto out; - } - if (der_heim_oid_cmp(&type2, &asn1_oid_id_pkcs7_signedData)) { - ret = EINVAL; /* XXX */ - krb5_set_error_message(context, ret, - N_("PKINIT: Invalid content type", "")); - der_free_oid(&type2); - der_free_octet_string(&out); - goto out; - } - der_free_oid(&type2); - krb5_data_free(&content); - ret = krb5_data_copy(&content, out.data, out.length); - der_free_octet_string(&out); - if (ret) { - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto out; - } - } - - ret = pk_verify_sign(context, - content.data, - content.length, - ctx->id, - &contentType, - &content, - &host); - if (ret) - goto out; - - /* make sure that it is the kdc's certificate */ - ret = pk_verify_host(context, realm, hi, ctx, host); - if (ret) { - goto out; - } - -#if 0 - if (type == PKINIT_WIN2K) { - if (der_heim_oid_cmp(&contentType, &asn1_oid_id_pkcs7_data) != 0) { - ret = KRB5KRB_AP_ERR_MSG_TYPE; - krb5_set_error_message(context, ret, "PKINIT: reply key, wrong oid"); - goto out; - } - } else { - if (der_heim_oid_cmp(&contentType, &asn1_oid_id_pkrkeydata) != 0) { - ret = KRB5KRB_AP_ERR_MSG_TYPE; - krb5_set_error_message(context, ret, "PKINIT: reply key, wrong oid"); - goto out; - } - } -#endif - - switch(type) { - case PKINIT_WIN2K: - ret = get_reply_key(context, &content, req_buffer, key); - if (ret != 0 && ctx->require_binding == 0) - ret = get_reply_key_win(context, &content, nonce, key); - break; - case PKINIT_27: - ret = get_reply_key(context, &content, req_buffer, key); - break; - } - if (ret) - goto out; - - /* XXX compare given etype with key->etype */ - - out: - if (host) - _krb5_pk_cert_free(host); - der_free_oid(&contentType); - krb5_data_free(&content); - - return ret; -} - -static krb5_error_code -pk_rd_pa_reply_dh(krb5_context context, - const heim_octet_string *indata, - const heim_oid *dataType, - const char *realm, - krb5_pk_init_ctx ctx, - krb5_enctype etype, - const krb5_krbhst_info *hi, - const DHNonce *c_n, - const DHNonce *k_n, - unsigned nonce, - PA_DATA *pa, - krb5_keyblock **key) -{ - const unsigned char *p; - unsigned char *dh_gen_key = NULL; - struct krb5_pk_cert *host = NULL; - BIGNUM *kdc_dh_pubkey = NULL; - KDCDHKeyInfo kdc_dh_info; - heim_oid contentType = { 0, NULL }; - krb5_data content; - krb5_error_code ret; - int dh_gen_keylen = 0; - size_t size; - - krb5_data_zero(&content); - memset(&kdc_dh_info, 0, sizeof(kdc_dh_info)); - - if (der_heim_oid_cmp(&asn1_oid_id_pkcs7_signedData, dataType)) { - krb5_set_error_message(context, EINVAL, - N_("PKINIT: Invalid content type", "")); - return EINVAL; - } - - ret = pk_verify_sign(context, - indata->data, - indata->length, - ctx->id, - &contentType, - &content, - &host); - if (ret) - goto out; - - /* make sure that it is the kdc's certificate */ - ret = pk_verify_host(context, realm, hi, ctx, host); - if (ret) - goto out; - - if (der_heim_oid_cmp(&contentType, &asn1_oid_id_pkdhkeydata)) { - ret = KRB5KRB_AP_ERR_MSG_TYPE; - krb5_set_error_message(context, ret, - N_("pkinit - dh reply contains wrong oid", "")); - goto out; - } - - ret = decode_KDCDHKeyInfo(content.data, - content.length, - &kdc_dh_info, - &size); - - if (ret) { - krb5_set_error_message(context, ret, - N_("pkinit - failed to decode " - "KDC DH Key Info", "")); - goto out; - } - - if (kdc_dh_info.nonce != nonce) { - ret = KRB5KRB_AP_ERR_MODIFIED; - krb5_set_error_message(context, ret, - N_("PKINIT: DH nonce is wrong", "")); - goto out; - } - - if (kdc_dh_info.dhKeyExpiration) { - if (k_n == NULL) { - ret = KRB5KRB_ERR_GENERIC; - krb5_set_error_message(context, ret, - N_("pkinit; got key expiration " - "without server nonce", "")); - goto out; - } - if (c_n == NULL) { - ret = KRB5KRB_ERR_GENERIC; - krb5_set_error_message(context, ret, - N_("pkinit; got DH reuse but no " - "client nonce", "")); - goto out; - } - } else { - if (k_n) { - ret = KRB5KRB_ERR_GENERIC; - krb5_set_error_message(context, ret, - N_("pkinit: got server nonce " - "without key expiration", "")); - goto out; - } - c_n = NULL; - } - - - p = kdc_dh_info.subjectPublicKey.data; - size = (kdc_dh_info.subjectPublicKey.length + 7) / 8; - - if (ctx->keyex == USE_DH) { - DHPublicKey k; - ret = decode_DHPublicKey(p, size, &k, NULL); - if (ret) { - krb5_set_error_message(context, ret, - N_("pkinit: can't decode " - "without key expiration", "")); - goto out; - } - - kdc_dh_pubkey = integer_to_BN(context, "DHPublicKey", &k); - free_DHPublicKey(&k); - if (kdc_dh_pubkey == NULL) { - ret = ENOMEM; - goto out; - } - - - size = DH_size(ctx->u.dh); - - dh_gen_key = malloc(size); - if (dh_gen_key == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - - dh_gen_keylen = DH_compute_key(dh_gen_key, kdc_dh_pubkey, ctx->u.dh); - if (dh_gen_keylen == -1) { - ret = KRB5KRB_ERR_GENERIC; - dh_gen_keylen = 0; - krb5_set_error_message(context, ret, - N_("PKINIT: Can't compute Diffie-Hellman key", "")); - goto out; - } - if (dh_gen_keylen < (int)size) { - size -= dh_gen_keylen; - memmove(dh_gen_key + size, dh_gen_key, dh_gen_keylen); - memset(dh_gen_key, 0, size); - } - - } else { -#ifdef HAVE_OPENSSL - const EC_GROUP *group; - EC_KEY *public = NULL; - - group = EC_KEY_get0_group(ctx->u.eckey); - - public = EC_KEY_new(); - if (public == NULL) { - ret = ENOMEM; - goto out; - } - if (EC_KEY_set_group(public, group) != 1) { - EC_KEY_free(public); - ret = ENOMEM; - goto out; - } - - if (o2i_ECPublicKey(&public, &p, size) == NULL) { - EC_KEY_free(public); - ret = KRB5KRB_ERR_GENERIC; - krb5_set_error_message(context, ret, - N_("PKINIT: Can't parse ECDH public key", "")); - goto out; - } - - size = (EC_GROUP_get_degree(group) + 7) / 8; - dh_gen_key = malloc(size); - if (dh_gen_key == NULL) { - EC_KEY_free(public); - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto out; - } - dh_gen_keylen = ECDH_compute_key(dh_gen_key, size, - EC_KEY_get0_public_key(public), ctx->u.eckey, NULL); - EC_KEY_free(public); - if (dh_gen_keylen == -1) { - ret = KRB5KRB_ERR_GENERIC; - dh_gen_keylen = 0; - krb5_set_error_message(context, ret, - N_("PKINIT: Can't compute ECDH public key", "")); - goto out; - } -#else - ret = EINVAL; -#endif - } - - if (dh_gen_keylen <= 0) { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("PKINIT: resulting DH key <= 0", "")); - dh_gen_keylen = 0; - goto out; - } - - *key = malloc (sizeof (**key)); - if (*key == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto out; - } - - ret = _krb5_pk_octetstring2key(context, - etype, - dh_gen_key, dh_gen_keylen, - c_n, k_n, - *key); - if (ret) { - krb5_set_error_message(context, ret, - N_("PKINIT: can't create key from DH key", "")); - free(*key); - *key = NULL; - goto out; - } - - out: - if (kdc_dh_pubkey) - BN_free(kdc_dh_pubkey); - if (dh_gen_key) { - memset(dh_gen_key, 0, dh_gen_keylen); - free(dh_gen_key); - } - if (host) - _krb5_pk_cert_free(host); - if (content.data) - krb5_data_free(&content); - der_free_oid(&contentType); - free_KDCDHKeyInfo(&kdc_dh_info); - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_pk_rd_pa_reply(krb5_context context, - const char *realm, - void *c, - krb5_enctype etype, - const krb5_krbhst_info *hi, - unsigned nonce, - const krb5_data *req_buffer, - PA_DATA *pa, - krb5_keyblock **key) -{ - krb5_pk_init_ctx ctx = c; - krb5_error_code ret; - size_t size; - - /* Check for IETF PK-INIT first */ - if (ctx->type == PKINIT_27) { - PA_PK_AS_REP rep; - heim_octet_string os, data; - heim_oid oid; - - if (pa->padata_type != KRB5_PADATA_PK_AS_REP) { - krb5_set_error_message(context, EINVAL, - N_("PKINIT: wrong padata recv", "")); - return EINVAL; - } - - ret = decode_PA_PK_AS_REP(pa->padata_value.data, - pa->padata_value.length, - &rep, - &size); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to decode pkinit AS rep", "")); - return ret; - } - - switch (rep.element) { - case choice_PA_PK_AS_REP_dhInfo: - _krb5_debug(context, 5, "krb5_get_init_creds: using pkinit dh"); - os = rep.u.dhInfo.dhSignedData; - break; - case choice_PA_PK_AS_REP_encKeyPack: - _krb5_debug(context, 5, "krb5_get_init_creds: using kinit enc reply key"); - os = rep.u.encKeyPack; - break; - default: { - PA_PK_AS_REP_BTMM btmm; - free_PA_PK_AS_REP(&rep); - memset(&rep, 0, sizeof(rep)); - - _krb5_debug(context, 5, "krb5_get_init_creds: using BTMM kinit enc reply key"); - - ret = decode_PA_PK_AS_REP_BTMM(pa->padata_value.data, - pa->padata_value.length, - &btmm, - &size); - if (ret) { - krb5_set_error_message(context, EINVAL, - N_("PKINIT: -27 reply " - "invalid content type", "")); - return EINVAL; - } - - if (btmm.dhSignedData || btmm.encKeyPack == NULL) { - free_PA_PK_AS_REP_BTMM(&btmm); - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("DH mode not supported for BTMM mode", "")); - return ret; - } - - /* - * Transform to IETF style PK-INIT reply so that free works below - */ - - rep.element = choice_PA_PK_AS_REP_encKeyPack; - rep.u.encKeyPack.data = btmm.encKeyPack->data; - rep.u.encKeyPack.length = btmm.encKeyPack->length; - btmm.encKeyPack->data = NULL; - btmm.encKeyPack->length = 0; - free_PA_PK_AS_REP_BTMM(&btmm); - os = rep.u.encKeyPack; - } - } - - ret = hx509_cms_unwrap_ContentInfo(&os, &oid, &data, NULL); - if (ret) { - free_PA_PK_AS_REP(&rep); - krb5_set_error_message(context, ret, - N_("PKINIT: failed to unwrap CI", "")); - return ret; - } - - switch (rep.element) { - case choice_PA_PK_AS_REP_dhInfo: - ret = pk_rd_pa_reply_dh(context, &data, &oid, realm, ctx, etype, hi, - ctx->clientDHNonce, - rep.u.dhInfo.serverDHNonce, - nonce, pa, key); - break; - case choice_PA_PK_AS_REP_encKeyPack: - ret = pk_rd_pa_reply_enckey(context, PKINIT_27, &data, &oid, realm, - ctx, etype, hi, nonce, req_buffer, pa, key); - break; - default: - krb5_abortx(context, "pk-init as-rep case not possible to happen"); - } - der_free_octet_string(&data); - der_free_oid(&oid); - free_PA_PK_AS_REP(&rep); - - } else if (ctx->type == PKINIT_WIN2K) { - PA_PK_AS_REP_Win2k w2krep; - - /* Check for Windows encoding of the AS-REP pa data */ - -#if 0 /* should this be ? */ - if (pa->padata_type != KRB5_PADATA_PK_AS_REP) { - krb5_set_error_message(context, EINVAL, - "PKINIT: wrong padata recv"); - return EINVAL; - } -#endif - - memset(&w2krep, 0, sizeof(w2krep)); - - ret = decode_PA_PK_AS_REP_Win2k(pa->padata_value.data, - pa->padata_value.length, - &w2krep, - &size); - if (ret) { - krb5_set_error_message(context, ret, - N_("PKINIT: Failed decoding windows " - "pkinit reply %d", ""), (int)ret); - return ret; - } - - krb5_clear_error_message(context); - - switch (w2krep.element) { - case choice_PA_PK_AS_REP_Win2k_encKeyPack: { - heim_octet_string data; - heim_oid oid; - - ret = hx509_cms_unwrap_ContentInfo(&w2krep.u.encKeyPack, - &oid, &data, NULL); - free_PA_PK_AS_REP_Win2k(&w2krep); - if (ret) { - krb5_set_error_message(context, ret, - N_("PKINIT: failed to unwrap CI", "")); - return ret; - } - - ret = pk_rd_pa_reply_enckey(context, PKINIT_WIN2K, &data, &oid, realm, - ctx, etype, hi, nonce, req_buffer, pa, key); - der_free_octet_string(&data); - der_free_oid(&oid); - - break; - } - default: - free_PA_PK_AS_REP_Win2k(&w2krep); - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("PKINIT: win2k reply invalid " - "content type", "")); - break; - } - - } else { - ret = EINVAL; - krb5_set_error_message(context, ret, - N_("PKINIT: unknown reply type", "")); - } - - return ret; -} - -struct prompter { - krb5_context context; - krb5_prompter_fct prompter; - void *prompter_data; -}; - -static int -hx_pass_prompter(void *data, const hx509_prompt *prompter) -{ - krb5_error_code ret; - krb5_prompt prompt; - krb5_data password_data; - struct prompter *p = data; - - password_data.data = prompter->reply.data; - password_data.length = prompter->reply.length; - - prompt.prompt = prompter->prompt; - prompt.hidden = hx509_prompt_hidden(prompter->type); - prompt.reply = &password_data; - - switch (prompter->type) { - case HX509_PROMPT_TYPE_INFO: - prompt.type = KRB5_PROMPT_TYPE_INFO; - break; - case HX509_PROMPT_TYPE_PASSWORD: - case HX509_PROMPT_TYPE_QUESTION: - default: - prompt.type = KRB5_PROMPT_TYPE_PASSWORD; - break; - } - - ret = (*p->prompter)(p->context, p->prompter_data, NULL, NULL, 1, &prompt); - if (ret) { - memset (prompter->reply.data, 0, prompter->reply.length); - return 1; - } - return 0; -} - -static krb5_error_code -_krb5_pk_set_user_id(krb5_context context, - krb5_principal principal, - krb5_pk_init_ctx ctx, - struct hx509_certs_data *certs) -{ - hx509_certs c = hx509_certs_ref(certs); - hx509_query *q = NULL; - int ret; - - if (ctx->id->certs) - hx509_certs_free(&ctx->id->certs); - if (ctx->id->cert) { - hx509_cert_free(ctx->id->cert); - ctx->id->cert = NULL; - } - - ctx->id->certs = c; - ctx->anonymous = 0; - - ret = hx509_query_alloc(context->hx509ctx, &q); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Allocate query to find signing certificate"); - return ret; - } - - hx509_query_match_option(q, HX509_QUERY_OPTION_PRIVATE_KEY); - hx509_query_match_option(q, HX509_QUERY_OPTION_KU_DIGITALSIGNATURE); - - if (principal && strncmp("LKDC:SHA1.", krb5_principal_get_realm(context, principal), 9) == 0) { - ctx->id->flags |= PKINIT_BTMM; - } - - ret = find_cert(context, ctx->id, q, &ctx->id->cert); - hx509_query_free(context->hx509ctx, q); - - if (ret == 0 && _krb5_have_debug(context, 2)) { - hx509_name name; - char *str, *sn; - heim_integer i; - - ret = hx509_cert_get_subject(ctx->id->cert, &name); - if (ret) - goto out; - - ret = hx509_name_to_string(name, &str); - hx509_name_free(&name); - if (ret) - goto out; - - ret = hx509_cert_get_serialnumber(ctx->id->cert, &i); - if (ret) { - free(str); - goto out; - } - - ret = der_print_hex_heim_integer(&i, &sn); - der_free_heim_integer(&i); - if (ret) { - free(name); - goto out; - } - - _krb5_debug(context, 2, "using cert: subject: %s sn: %s", str, sn); - free(str); - free(sn); - } - out: - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_pk_load_id(krb5_context context, - struct krb5_pk_identity **ret_id, - const char *user_id, - const char *anchor_id, - char * const *chain_list, - char * const *revoke_list, - krb5_prompter_fct prompter, - void *prompter_data, - char *password) -{ - struct krb5_pk_identity *id = NULL; - struct prompter p; - int ret; - - *ret_id = NULL; - - if (anchor_id == NULL) { - krb5_set_error_message(context, HEIM_PKINIT_NO_VALID_CA, - N_("PKINIT: No anchor given", "")); - return HEIM_PKINIT_NO_VALID_CA; - } - - /* load cert */ - - id = calloc(1, sizeof(*id)); - if (id == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - if (user_id) { - hx509_lock lock; - - ret = hx509_lock_init(context->hx509ctx, &lock); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, "Failed init lock"); - goto out; - } - - if (password && password[0]) - hx509_lock_add_password(lock, password); - - if (prompter) { - p.context = context; - p.prompter = prompter; - p.prompter_data = prompter_data; - - ret = hx509_lock_set_prompter(lock, hx_pass_prompter, &p); - if (ret) { - hx509_lock_free(lock); - goto out; - } - } - - ret = hx509_certs_init(context->hx509ctx, user_id, 0, lock, &id->certs); - hx509_lock_free(lock); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed to init cert certs"); - goto out; - } - } else { - id->certs = NULL; - } - - ret = hx509_certs_init(context->hx509ctx, anchor_id, 0, NULL, &id->anchors); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed to init anchors"); - goto out; - } - - ret = hx509_certs_init(context->hx509ctx, "MEMORY:pkinit-cert-chain", - 0, NULL, &id->certpool); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed to init chain"); - goto out; - } - - while (chain_list && *chain_list) { - ret = hx509_certs_append(context->hx509ctx, id->certpool, - NULL, *chain_list); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed to laod chain %s", - *chain_list); - goto out; - } - chain_list++; - } - - if (revoke_list) { - ret = hx509_revoke_init(context->hx509ctx, &id->revokectx); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed init revoke list"); - goto out; - } - - while (*revoke_list) { - ret = hx509_revoke_add_crl(context->hx509ctx, - id->revokectx, - *revoke_list); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed load revoke list"); - goto out; - } - revoke_list++; - } - } else - hx509_context_set_missing_revoke(context->hx509ctx, 1); - - ret = hx509_verify_init_ctx(context->hx509ctx, &id->verify_ctx); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed init verify context"); - goto out; - } - - hx509_verify_attach_anchors(id->verify_ctx, id->anchors); - hx509_verify_attach_revoke(id->verify_ctx, id->revokectx); - - out: - if (ret) { - hx509_verify_destroy_ctx(id->verify_ctx); - hx509_certs_free(&id->certs); - hx509_certs_free(&id->anchors); - hx509_certs_free(&id->certpool); - hx509_revoke_free(&id->revokectx); - free(id); - } else - *ret_id = id; - - return ret; -} - -/* - * - */ - -static void -pk_copy_error(krb5_context context, - hx509_context hx509ctx, - int hxret, - const char *fmt, - ...) -{ - va_list va; - char *s, *f; - int ret; - - va_start(va, fmt); - ret = vasprintf(&f, fmt, va); - va_end(va); - if (ret == -1 || f == NULL) { - krb5_clear_error_message(context); - return; - } - - s = hx509_get_error_string(hx509ctx, hxret); - if (s == NULL) { - krb5_clear_error_message(context); - free(f); - return; - } - krb5_set_error_message(context, hxret, "%s: %s", f, s); - free(s); - free(f); -} - -static int -parse_integer(krb5_context context, char **p, const char *file, int lineno, - const char *name, heim_integer *integer) -{ - int ret; - char *p1; - p1 = strsep(p, " \t"); - if (p1 == NULL) { - krb5_set_error_message(context, EINVAL, - N_("moduli file %s missing %s on line %d", ""), - file, name, lineno); - return EINVAL; - } - ret = der_parse_hex_heim_integer(p1, integer); - if (ret) { - krb5_set_error_message(context, ret, - N_("moduli file %s failed parsing %s " - "on line %d", ""), - file, name, lineno); - return ret; - } - - return 0; -} - -krb5_error_code -_krb5_parse_moduli_line(krb5_context context, - const char *file, - int lineno, - char *p, - struct krb5_dh_moduli **m) -{ - struct krb5_dh_moduli *m1; - char *p1; - int ret; - - *m = NULL; - - m1 = calloc(1, sizeof(*m1)); - if (m1 == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - while (isspace((unsigned char)*p)) - p++; - if (*p == '#') { - free(m1); - return 0; - } - ret = EINVAL; - - p1 = strsep(&p, " \t"); - if (p1 == NULL) { - krb5_set_error_message(context, ret, - N_("moduli file %s missing name on line %d", ""), - file, lineno); - goto out; - } - m1->name = strdup(p1); - if (m1->name == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memeory", "")); - goto out; - } - - p1 = strsep(&p, " \t"); - if (p1 == NULL) { - krb5_set_error_message(context, ret, - N_("moduli file %s missing bits on line %d", ""), - file, lineno); - goto out; - } - - m1->bits = atoi(p1); - if (m1->bits == 0) { - krb5_set_error_message(context, ret, - N_("moduli file %s have un-parsable " - "bits on line %d", ""), file, lineno); - goto out; - } - - ret = parse_integer(context, &p, file, lineno, "p", &m1->p); - if (ret) - goto out; - ret = parse_integer(context, &p, file, lineno, "g", &m1->g); - if (ret) - goto out; - ret = parse_integer(context, &p, file, lineno, "q", &m1->q); - if (ret) - goto out; - - *m = m1; - - return 0; - out: - free(m1->name); - der_free_heim_integer(&m1->p); - der_free_heim_integer(&m1->g); - der_free_heim_integer(&m1->q); - free(m1); - return ret; -} - -void -_krb5_free_moduli(struct krb5_dh_moduli **moduli) -{ - int i; - for (i = 0; moduli[i] != NULL; i++) { - free(moduli[i]->name); - der_free_heim_integer(&moduli[i]->p); - der_free_heim_integer(&moduli[i]->g); - der_free_heim_integer(&moduli[i]->q); - free(moduli[i]); - } - free(moduli); -} - -static const char *default_moduli_RFC2412_MODP_group2 = - /* name */ - "RFC2412-MODP-group2 " - /* bits */ - "1024 " - /* p */ - "FFFFFFFF" "FFFFFFFF" "C90FDAA2" "2168C234" "C4C6628B" "80DC1CD1" - "29024E08" "8A67CC74" "020BBEA6" "3B139B22" "514A0879" "8E3404DD" - "EF9519B3" "CD3A431B" "302B0A6D" "F25F1437" "4FE1356D" "6D51C245" - "E485B576" "625E7EC6" "F44C42E9" "A637ED6B" "0BFF5CB6" "F406B7ED" - "EE386BFB" "5A899FA5" "AE9F2411" "7C4B1FE6" "49286651" "ECE65381" - "FFFFFFFF" "FFFFFFFF " - /* g */ - "02 " - /* q */ - "7FFFFFFF" "FFFFFFFF" "E487ED51" "10B4611A" "62633145" "C06E0E68" - "94812704" "4533E63A" "0105DF53" "1D89CD91" "28A5043C" "C71A026E" - "F7CA8CD9" "E69D218D" "98158536" "F92F8A1B" "A7F09AB6" "B6A8E122" - "F242DABB" "312F3F63" "7A262174" "D31BF6B5" "85FFAE5B" "7A035BF6" - "F71C35FD" "AD44CFD2" "D74F9208" "BE258FF3" "24943328" "F67329C0" - "FFFFFFFF" "FFFFFFFF"; - -static const char *default_moduli_rfc3526_MODP_group14 = - /* name */ - "rfc3526-MODP-group14 " - /* bits */ - "1760 " - /* p */ - "FFFFFFFF" "FFFFFFFF" "C90FDAA2" "2168C234" "C4C6628B" "80DC1CD1" - "29024E08" "8A67CC74" "020BBEA6" "3B139B22" "514A0879" "8E3404DD" - "EF9519B3" "CD3A431B" "302B0A6D" "F25F1437" "4FE1356D" "6D51C245" - "E485B576" "625E7EC6" "F44C42E9" "A637ED6B" "0BFF5CB6" "F406B7ED" - "EE386BFB" "5A899FA5" "AE9F2411" "7C4B1FE6" "49286651" "ECE45B3D" - "C2007CB8" "A163BF05" "98DA4836" "1C55D39A" "69163FA8" "FD24CF5F" - "83655D23" "DCA3AD96" "1C62F356" "208552BB" "9ED52907" "7096966D" - "670C354E" "4ABC9804" "F1746C08" "CA18217C" "32905E46" "2E36CE3B" - "E39E772C" "180E8603" "9B2783A2" "EC07A28F" "B5C55DF0" "6F4C52C9" - "DE2BCBF6" "95581718" "3995497C" "EA956AE5" "15D22618" "98FA0510" - "15728E5A" "8AACAA68" "FFFFFFFF" "FFFFFFFF " - /* g */ - "02 " - /* q */ - "7FFFFFFF" "FFFFFFFF" "E487ED51" "10B4611A" "62633145" "C06E0E68" - "94812704" "4533E63A" "0105DF53" "1D89CD91" "28A5043C" "C71A026E" - "F7CA8CD9" "E69D218D" "98158536" "F92F8A1B" "A7F09AB6" "B6A8E122" - "F242DABB" "312F3F63" "7A262174" "D31BF6B5" "85FFAE5B" "7A035BF6" - "F71C35FD" "AD44CFD2" "D74F9208" "BE258FF3" "24943328" "F6722D9E" - "E1003E5C" "50B1DF82" "CC6D241B" "0E2AE9CD" "348B1FD4" "7E9267AF" - "C1B2AE91" "EE51D6CB" "0E3179AB" "1042A95D" "CF6A9483" "B84B4B36" - "B3861AA7" "255E4C02" "78BA3604" "650C10BE" "19482F23" "171B671D" - "F1CF3B96" "0C074301" "CD93C1D1" "7603D147" "DAE2AEF8" "37A62964" - "EF15E5FB" "4AAC0B8C" "1CCAA4BE" "754AB572" "8AE9130C" "4C7D0288" - "0AB9472D" "45565534" "7FFFFFFF" "FFFFFFFF"; - -krb5_error_code -_krb5_parse_moduli(krb5_context context, const char *file, - struct krb5_dh_moduli ***moduli) -{ - /* name bits P G Q */ - krb5_error_code ret; - struct krb5_dh_moduli **m = NULL, **m2; - char buf[4096]; - FILE *f; - int lineno = 0, n = 0; - - *moduli = NULL; - - m = calloc(1, sizeof(m[0]) * 3); - if (m == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - strlcpy(buf, default_moduli_rfc3526_MODP_group14, sizeof(buf)); - ret = _krb5_parse_moduli_line(context, "builtin", 1, buf, &m[0]); - if (ret) { - _krb5_free_moduli(m); - return ret; - } - n++; - - strlcpy(buf, default_moduli_RFC2412_MODP_group2, sizeof(buf)); - ret = _krb5_parse_moduli_line(context, "builtin", 1, buf, &m[1]); - if (ret) { - _krb5_free_moduli(m); - return ret; - } - n++; - - - if (file == NULL) - file = MODULI_FILE; - -#ifdef KRB5_USE_PATH_TOKENS - { - char * exp_file; - - if (_krb5_expand_path_tokens(context, file, &exp_file) == 0) { - f = fopen(exp_file, "r"); - krb5_xfree(exp_file); - } else { - f = NULL; - } - } -#else - f = fopen(file, "r"); -#endif - - if (f == NULL) { - *moduli = m; - return 0; - } - rk_cloexec_file(f); - - while(fgets(buf, sizeof(buf), f) != NULL) { - struct krb5_dh_moduli *element; - - buf[strcspn(buf, "\n")] = '\0'; - lineno++; - - m2 = realloc(m, (n + 2) * sizeof(m[0])); - if (m2 == NULL) { - _krb5_free_moduli(m); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - m = m2; - - m[n] = NULL; - - ret = _krb5_parse_moduli_line(context, file, lineno, buf, &element); - if (ret) { - _krb5_free_moduli(m); - return ret; - } - if (element == NULL) - continue; - - m[n] = element; - m[n + 1] = NULL; - n++; - } - *moduli = m; - return 0; -} - -krb5_error_code -_krb5_dh_group_ok(krb5_context context, unsigned long bits, - heim_integer *p, heim_integer *g, heim_integer *q, - struct krb5_dh_moduli **moduli, - char **name) -{ - int i; - - if (name) - *name = NULL; - - for (i = 0; moduli[i] != NULL; i++) { - if (der_heim_integer_cmp(&moduli[i]->g, g) == 0 && - der_heim_integer_cmp(&moduli[i]->p, p) == 0 && - (q == NULL || der_heim_integer_cmp(&moduli[i]->q, q) == 0)) - { - if (bits && bits > moduli[i]->bits) { - krb5_set_error_message(context, - KRB5_KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED, - N_("PKINIT: DH group parameter %s " - "no accepted, not enough bits " - "generated", ""), - moduli[i]->name); - return KRB5_KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED; - } - if (name) - *name = strdup(moduli[i]->name); - return 0; - } - } - krb5_set_error_message(context, - KRB5_KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED, - N_("PKINIT: DH group parameter no ok", "")); - return KRB5_KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED; -} -#endif /* PKINIT */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -_krb5_get_init_creds_opt_free_pkinit(krb5_get_init_creds_opt *opt) -{ -#ifdef PKINIT - krb5_pk_init_ctx ctx; - - if (opt->opt_private == NULL || opt->opt_private->pk_init_ctx == NULL) - return; - ctx = opt->opt_private->pk_init_ctx; - switch (ctx->keyex) { - case USE_DH: - if (ctx->u.dh) - DH_free(ctx->u.dh); - break; - case USE_RSA: - break; - case USE_ECDH: -#ifdef HAVE_OPENSSL - if (ctx->u.eckey) - EC_KEY_free(ctx->u.eckey); -#endif - break; - } - if (ctx->id) { - hx509_verify_destroy_ctx(ctx->id->verify_ctx); - hx509_certs_free(&ctx->id->certs); - hx509_cert_free(ctx->id->cert); - hx509_certs_free(&ctx->id->anchors); - hx509_certs_free(&ctx->id->certpool); - - if (ctx->clientDHNonce) { - krb5_free_data(NULL, ctx->clientDHNonce); - ctx->clientDHNonce = NULL; - } - if (ctx->m) - _krb5_free_moduli(ctx->m); - free(ctx->id); - ctx->id = NULL; - } - free(opt->opt_private->pk_init_ctx); - opt->opt_private->pk_init_ctx = NULL; -#endif -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_init_creds_opt_set_pkinit(krb5_context context, - krb5_get_init_creds_opt *opt, - krb5_principal principal, - const char *user_id, - const char *x509_anchors, - char * const * pool, - char * const * pki_revoke, - int flags, - krb5_prompter_fct prompter, - void *prompter_data, - char *password) -{ -#ifdef PKINIT - krb5_error_code ret; - char *anchors = NULL; - - if (opt->opt_private == NULL) { - krb5_set_error_message(context, EINVAL, - N_("PKINIT: on non extendable opt", "")); - return EINVAL; - } - - opt->opt_private->pk_init_ctx = - calloc(1, sizeof(*opt->opt_private->pk_init_ctx)); - if (opt->opt_private->pk_init_ctx == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - opt->opt_private->pk_init_ctx->require_binding = 0; - opt->opt_private->pk_init_ctx->require_eku = 1; - opt->opt_private->pk_init_ctx->require_krbtgt_otherName = 1; - opt->opt_private->pk_init_ctx->peer = NULL; - - /* XXX implement krb5_appdefault_strings */ - if (pool == NULL) - pool = krb5_config_get_strings(context, NULL, - "appdefaults", - "pkinit_pool", - NULL); - - if (pki_revoke == NULL) - pki_revoke = krb5_config_get_strings(context, NULL, - "appdefaults", - "pkinit_revoke", - NULL); - - if (x509_anchors == NULL) { - krb5_appdefault_string(context, "kinit", - krb5_principal_get_realm(context, principal), - "pkinit_anchors", NULL, &anchors); - x509_anchors = anchors; - } - - if (flags & 4) - opt->opt_private->pk_init_ctx->anonymous = 1; - - ret = _krb5_pk_load_id(context, - &opt->opt_private->pk_init_ctx->id, - user_id, - x509_anchors, - pool, - pki_revoke, - prompter, - prompter_data, - password); - if (ret) { - free(opt->opt_private->pk_init_ctx); - opt->opt_private->pk_init_ctx = NULL; - return ret; - } - - if (opt->opt_private->pk_init_ctx->id->certs) { - _krb5_pk_set_user_id(context, - principal, - opt->opt_private->pk_init_ctx, - opt->opt_private->pk_init_ctx->id->certs); - } else - opt->opt_private->pk_init_ctx->id->cert = NULL; - - if ((flags & 2) == 0) { - hx509_context hx509ctx = context->hx509ctx; - hx509_cert cert = opt->opt_private->pk_init_ctx->id->cert; - - opt->opt_private->pk_init_ctx->keyex = USE_DH; - - /* - * If its a ECDSA certs, lets select ECDSA as the keyex algorithm. - */ - if (cert) { - AlgorithmIdentifier alg; - - ret = hx509_cert_get_SPKI_AlgorithmIdentifier(hx509ctx, cert, &alg); - if (ret == 0) { - if (der_heim_oid_cmp(&alg.algorithm, &asn1_oid_id_ecPublicKey) == 0) - opt->opt_private->pk_init_ctx->keyex = USE_ECDH; - free_AlgorithmIdentifier(&alg); - } - } - - } else { - opt->opt_private->pk_init_ctx->keyex = USE_RSA; - - if (opt->opt_private->pk_init_ctx->id->certs == NULL) { - krb5_set_error_message(context, EINVAL, - N_("No anonymous pkinit support in RSA mode", "")); - return EINVAL; - } - } - - return 0; -#else - krb5_set_error_message(context, EINVAL, - N_("no support for PKINIT compiled in", "")); - return EINVAL; -#endif -} - -krb5_error_code KRB5_LIB_FUNCTION -krb5_get_init_creds_opt_set_pkinit_user_certs(krb5_context context, - krb5_get_init_creds_opt *opt, - struct hx509_certs_data *certs) -{ -#ifdef PKINIT - if (opt->opt_private == NULL) { - krb5_set_error_message(context, EINVAL, - N_("PKINIT: on non extendable opt", "")); - return EINVAL; - } - if (opt->opt_private->pk_init_ctx == NULL) { - krb5_set_error_message(context, EINVAL, - N_("PKINIT: on pkinit context", "")); - return EINVAL; - } - - _krb5_pk_set_user_id(context, NULL, opt->opt_private->pk_init_ctx, certs); - - return 0; -#else - krb5_set_error_message(context, EINVAL, - N_("no support for PKINIT compiled in", "")); - return EINVAL; -#endif -} - -#ifdef PKINIT - -static int -get_ms_san(hx509_context context, hx509_cert cert, char **upn) -{ - hx509_octet_string_list list; - int ret; - - *upn = NULL; - - ret = hx509_cert_find_subjectAltName_otherName(context, - cert, - &asn1_oid_id_pkinit_ms_san, - &list); - if (ret) - return 0; - - if (list.len > 0 && list.val[0].length > 0) - ret = decode_MS_UPN_SAN(list.val[0].data, list.val[0].length, - upn, NULL); - else - ret = 1; - hx509_free_octet_string_list(&list); - - return ret; -} - -static int -find_ms_san(hx509_context context, hx509_cert cert, void *ctx) -{ - char *upn; - int ret; - - ret = get_ms_san(context, cert, &upn); - if (ret == 0) - free(upn); - return ret; -} - - - -#endif - -/* - * Private since it need to be redesigned using krb5_get_init_creds() - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_pk_enterprise_cert(krb5_context context, - const char *user_id, - krb5_const_realm realm, - krb5_principal *principal, - struct hx509_certs_data **res) -{ -#ifdef PKINIT - krb5_error_code ret; - hx509_certs certs, result; - hx509_cert cert = NULL; - hx509_query *q; - char *name; - - *principal = NULL; - if (res) - *res = NULL; - - if (user_id == NULL) { - krb5_set_error_message(context, ENOENT, "no user id"); - return ENOENT; - } - - ret = hx509_certs_init(context->hx509ctx, user_id, 0, NULL, &certs); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed to init cert certs"); - goto out; - } - - ret = hx509_query_alloc(context->hx509ctx, &q); - if (ret) { - krb5_set_error_message(context, ret, "out of memory"); - hx509_certs_free(&certs); - goto out; - } - - hx509_query_match_option(q, HX509_QUERY_OPTION_PRIVATE_KEY); - hx509_query_match_option(q, HX509_QUERY_OPTION_KU_DIGITALSIGNATURE); - hx509_query_match_eku(q, &asn1_oid_id_pkinit_ms_eku); - hx509_query_match_cmp_func(q, find_ms_san, NULL); - - ret = hx509_certs_filter(context->hx509ctx, certs, q, &result); - hx509_query_free(context->hx509ctx, q); - hx509_certs_free(&certs); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed to find PKINIT certificate"); - return ret; - } - - ret = hx509_get_one_cert(context->hx509ctx, result, &cert); - hx509_certs_free(&result); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed to get one cert"); - goto out; - } - - ret = get_ms_san(context->hx509ctx, cert, &name); - if (ret) { - pk_copy_error(context, context->hx509ctx, ret, - "Failed to get MS SAN"); - goto out; - } - - ret = krb5_make_principal(context, principal, realm, name, NULL); - free(name); - if (ret) - goto out; - - krb5_principal_set_type(context, *principal, KRB5_NT_ENTERPRISE_PRINCIPAL); - - if (res) { - ret = hx509_certs_init(context->hx509ctx, "MEMORY:", 0, NULL, res); - if (ret) - goto out; - - ret = hx509_certs_add(context->hx509ctx, *res, cert); - if (ret) { - hx509_certs_free(res); - goto out; - } - } - - out: - hx509_cert_free(cert); - - return ret; -#else - krb5_set_error_message(context, EINVAL, - N_("no support for PKINIT compiled in", "")); - return EINVAL; -#endif -} diff --git a/kerberosV/src/lib/krb5/plugin.c b/kerberosV/src/lib/krb5/plugin.c deleted file mode 100644 index b1136a11897..00000000000 --- a/kerberosV/src/lib/krb5/plugin.c +++ /dev/null @@ -1,643 +0,0 @@ -/* - * Copyright (c) 2006 - 2007 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 "krb5_locl.h" - -#ifdef HAVE_DLFCN_H -#include -#endif -#include - -struct krb5_plugin { - void *symbol; - struct krb5_plugin *next; -}; - -struct plugin { - enum { DSO, SYMBOL } type; - union { - struct { - char *path; - void *dsohandle; - } dso; - struct { - enum krb5_plugin_type type; - char *name; - char *symbol; - } symbol; - } u; - struct plugin *next; -}; - -static HEIMDAL_MUTEX plugin_mutex = HEIMDAL_MUTEX_INITIALIZER; -static struct plugin *registered = NULL; -static int plugins_needs_scan = 1; - -static const char *sysplugin_dirs[] = { - LIBDIR "/plugin/krb5", -#ifdef __APPLE__ - "/System/Library/KerberosPlugins/KerberosFrameworkPlugins", -#endif - NULL -}; - -/* - * - */ - -void * -_krb5_plugin_get_symbol(struct krb5_plugin *p) -{ - return p->symbol; -} - -struct krb5_plugin * -_krb5_plugin_get_next(struct krb5_plugin *p) -{ - return p->next; -} - -/* - * - */ - -#ifdef HAVE_DLOPEN - -static krb5_error_code -loadlib(krb5_context context, char *path) -{ - struct plugin *e; - - e = calloc(1, sizeof(*e)); - if (e == NULL) { - krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); - free(path); - return ENOMEM; - } - -#ifndef RTLD_LAZY -#define RTLD_LAZY 0 -#endif -#ifndef RTLD_LOCAL -#define RTLD_LOCAL 0 -#endif - e->type = DSO; - /* ignore error from dlopen, and just keep it as negative cache entry */ - e->u.dso.dsohandle = dlopen(path, RTLD_LOCAL|RTLD_LAZY); - e->u.dso.path = path; - - e->next = registered; - registered = e; - - return 0; -} -#endif /* HAVE_DLOPEN */ - -/** - * Register a plugin symbol name of specific type. - * @param context a Keberos context - * @param type type of plugin symbol - * @param name name of plugin symbol - * @param symbol a pointer to the named symbol - * @return In case of error a non zero error com_err error is returned - * and the Kerberos error string is set. - * - * @ingroup krb5_support - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_plugin_register(krb5_context context, - enum krb5_plugin_type type, - const char *name, - void *symbol) -{ - struct plugin *e; - - HEIMDAL_MUTEX_lock(&plugin_mutex); - - /* check for duplicates */ - for (e = registered; e != NULL; e = e->next) { - if (e->type == SYMBOL && - strcmp(e->u.symbol.name, name) == 0 && - e->u.symbol.type == type && e->u.symbol.symbol == symbol) { - HEIMDAL_MUTEX_unlock(&plugin_mutex); - return 0; - } - } - - e = calloc(1, sizeof(*e)); - if (e == NULL) { - HEIMDAL_MUTEX_unlock(&plugin_mutex); - krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); - return ENOMEM; - } - e->type = SYMBOL; - e->u.symbol.type = type; - e->u.symbol.name = strdup(name); - if (e->u.symbol.name == NULL) { - HEIMDAL_MUTEX_unlock(&plugin_mutex); - free(e); - krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); - return ENOMEM; - } - e->u.symbol.symbol = symbol; - - e->next = registered; - registered = e; - HEIMDAL_MUTEX_unlock(&plugin_mutex); - - return 0; -} - -static int -is_valid_plugin_filename(const char * n) -{ - if (n[0] == '.' && (n[1] == '\0' || (n[1] == '.' && n[2] == '\0'))) - return 0; - -#ifdef _WIN32 - /* On Windows, we only attempt to load .dll files as plug-ins. */ - { - const char * ext; - - ext = strrchr(n, '.'); - if (ext == NULL) - return 0; - - return !stricmp(ext, ".dll"); - } -#else - return 1; -#endif -} - -static void -trim_trailing_slash(char * path) -{ - size_t l; - - l = strlen(path); - while (l > 0 && (path[l - 1] == '/' -#ifdef BACKSLASH_PATH_DELIM - || path[l - 1] == '\\' -#endif - )) { - path[--l] = '\0'; - } -} - -static krb5_error_code -load_plugins(krb5_context context) -{ - struct plugin *e; - krb5_error_code ret; - char **dirs = NULL, **di; - struct dirent *entry; - char *path; - DIR *d = NULL; - - if (!plugins_needs_scan) - return 0; - plugins_needs_scan = 0; - -#ifdef HAVE_DLOPEN - - dirs = krb5_config_get_strings(context, NULL, "libdefaults", - "plugin_dir", NULL); - if (dirs == NULL) - dirs = rk_UNCONST(sysplugin_dirs); - - for (di = dirs; *di != NULL; di++) { - char * dir = *di; - -#ifdef KRB5_USE_PATH_TOKENS - if (_krb5_expand_path_tokens(context, *di, &dir)) - goto next_dir; -#endif - - trim_trailing_slash(dir); - - d = opendir(dir); - - if (d == NULL) - goto next_dir; - - rk_cloexec_dir(d); - - while ((entry = readdir(d)) != NULL) { - char *n = entry->d_name; - - /* skip . and .. */ - if (!is_valid_plugin_filename(n)) - continue; - - path = NULL; - ret = 0; -#ifdef __APPLE__ - { /* support loading bundles on MacOS */ - size_t len = strlen(n); - if (len > 7 && strcmp(&n[len - 7], ".bundle") == 0) - ret = asprintf(&path, "%s/%s/Contents/MacOS/%.*s", dir, n, (int)(len - 7), n); - } -#endif - if (ret < 0 || path == NULL) - ret = asprintf(&path, "%s/%s", dir, n); - - if (ret < 0 || path == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, "malloc: out of memory"); - return ret; - } - - /* check if already tried */ - for (e = registered; e != NULL; e = e->next) - if (e->type == DSO && strcmp(e->u.dso.path, path) == 0) - break; - if (e) { - free(path); - } else { - loadlib(context, path); /* store or frees path */ - } - } - closedir(d); - - next_dir: - if (dir != *di) - free(dir); - } - if (dirs != rk_UNCONST(sysplugin_dirs)) - krb5_config_free_strings(dirs); -#endif /* HAVE_DLOPEN */ - return 0; -} - -static krb5_error_code -add_symbol(krb5_context context, struct krb5_plugin **list, void *symbol) -{ - struct krb5_plugin *e; - - e = calloc(1, sizeof(*e)); - if (e == NULL) { - krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); - return ENOMEM; - } - e->symbol = symbol; - e->next = *list; - *list = e; - return 0; -} - -krb5_error_code -_krb5_plugin_find(krb5_context context, - enum krb5_plugin_type type, - const char *name, - struct krb5_plugin **list) -{ - struct plugin *e; - krb5_error_code ret; - - *list = NULL; - - HEIMDAL_MUTEX_lock(&plugin_mutex); - - load_plugins(context); - - for (ret = 0, e = registered; e != NULL; e = e->next) { - switch(e->type) { - case DSO: { -#ifdef HAVE_DLOPEN - void *sym; -#endif - if (e->u.dso.dsohandle == NULL) - continue; -#ifdef HAVE_DLOPEN - sym = dlsym(e->u.dso.dsohandle, name); - if (sym) - ret = add_symbol(context, list, sym); -#endif - break; - } - case SYMBOL: - if (strcmp(e->u.symbol.name, name) == 0 && e->u.symbol.type == type) - ret = add_symbol(context, list, e->u.symbol.symbol); - break; - } - if (ret) { - _krb5_plugin_free(*list); - *list = NULL; - } - } - - HEIMDAL_MUTEX_unlock(&plugin_mutex); - if (ret) - return ret; - - if (*list == NULL) { - krb5_set_error_message(context, ENOENT, "Did not find a plugin for %s", name); - return ENOENT; - } - - return 0; -} - -void -_krb5_plugin_free(struct krb5_plugin *list) -{ - struct krb5_plugin *next; - while (list) { - next = list->next; - free(list); - list = next; - } -} -/* - * module - dict of { - * ModuleName = [ - * plugin = object{ - * array = { ptr, ctx } - * } - * ] - * } - */ - -static heim_dict_t modules; - -struct plugin2 { - heim_string_t path; - void *dsohandle; - heim_dict_t names; -}; - -static void -plug_dealloc(void *ptr) -{ - struct plugin2 *p = ptr; - heim_release(p->path); - heim_release(p->names); -#ifdef HAVE_DLOPEN - if (p->dsohandle) - dlclose(p->dsohandle); -#endif -} - - -void -_krb5_load_plugins(krb5_context context, const char *name, const char **paths) -{ -#ifdef HAVE_DLOPEN - heim_string_t s = heim_string_create(name); - heim_dict_t module; - struct dirent *entry; - krb5_error_code ret; - const char **di; - DIR *d; - - HEIMDAL_MUTEX_lock(&plugin_mutex); - - if (modules == NULL) { - modules = heim_dict_create(11); - if (modules == NULL) { - HEIMDAL_MUTEX_unlock(&plugin_mutex); - return; - } - } - - module = heim_dict_copy_value(modules, s); - if (module == NULL) { - module = heim_dict_create(11); - if (module == NULL) { - HEIMDAL_MUTEX_unlock(&plugin_mutex); - heim_release(s); - return; - } - heim_dict_add_value(modules, s, module); - } - heim_release(s); - - for (di = paths; *di != NULL; di++) { - d = opendir(*di); - if (d == NULL) - continue; - rk_cloexec_dir(d); - - while ((entry = readdir(d)) != NULL) { - char *n = entry->d_name; - char *path = NULL; - heim_string_t spath; - struct plugin2 *p; - - /* skip . and .. */ - if (n[0] == '.' && (n[1] == '\0' || (n[1] == '.' && n[2] == '\0'))) - continue; - - ret = 0; -#ifdef __APPLE__ - { /* support loading bundles on MacOS */ - size_t len = strlen(n); - if (len > 7 && strcmp(&n[len - 7], ".bundle") == 0) - ret = asprintf(&path, "%s/%s/Contents/MacOS/%.*s", *di, n, (int)(len - 7), n); - } -#endif - if (ret < 0 || path == NULL) - ret = asprintf(&path, "%s/%s", *di, n); - - if (ret < 0 || path == NULL) - continue; - - spath = heim_string_create(n); - if (spath == NULL) { - free(path); - continue; - } - - /* check if already cached */ - p = heim_dict_copy_value(module, spath); - if (p == NULL) { - p = heim_alloc(sizeof(*p), "krb5-plugin", plug_dealloc); - if (p) - p->dsohandle = dlopen(path, RTLD_LOCAL|RTLD_LAZY); - - if (p->dsohandle) { - p->path = heim_retain(spath); - p->names = heim_dict_create(11); - heim_dict_add_value(module, spath, p); - } - } - heim_release(spath); - heim_release(p); - free(path); - } - closedir(d); - } - heim_release(module); - HEIMDAL_MUTEX_unlock(&plugin_mutex); -#endif /* HAVE_DLOPEN */ -} - -void -_krb5_unload_plugins(krb5_context context, const char *name) -{ - HEIMDAL_MUTEX_lock(&plugin_mutex); - heim_release(modules); - modules = NULL; - HEIMDAL_MUTEX_unlock(&plugin_mutex); -} - -/* - * - */ - -struct common_plugin_method { - int version; - krb5_error_code (*init)(krb5_context, void **); - void (*fini)(void *); -}; - -struct plug { - void *dataptr; - void *ctx; -}; - -static void -plug_free(void *ptr) -{ - struct plug *pl = ptr; - if (pl->dataptr) { - struct common_plugin_method *cpm = pl->dataptr; - cpm->fini(pl->ctx); - } -} - -struct iter_ctx { - krb5_context context; - heim_string_t n; - const char *name; - int min_version; - heim_array_t result; - krb5_error_code (*func)(krb5_context, const void *, void *, void *); - void *userctx; - krb5_error_code ret; -}; - -static void -search_modules(void *ctx, heim_object_t key, heim_object_t value) -{ - struct iter_ctx *s = ctx; - struct plugin2 *p = value; - struct plug *pl = heim_dict_copy_value(p->names, s->n); - struct common_plugin_method *cpm; - - if (pl == NULL) { - if (p->dsohandle == NULL) - return; - -#ifdef HAVE_DLOPEN - pl = heim_alloc(sizeof(*pl), "struct-plug", plug_free); - - cpm = pl->dataptr = dlsym(p->dsohandle, s->name); - if (cpm) { - int ret; - - ret = cpm->init(s->context, &pl->ctx); - if (ret) - cpm = pl->dataptr = NULL; - } - heim_dict_add_value(p->names, s->n, pl); -#endif - } else { - cpm = pl->dataptr; - } - - if (cpm && cpm->version >= s->min_version) - heim_array_append_value(s->result, pl); - - heim_release(pl); -} - -static void -eval_results(heim_object_t value, void *ctx) -{ - struct plug *pl = value; - struct iter_ctx *s = ctx; - - if (s->ret != KRB5_PLUGIN_NO_HANDLE) - return; - - s->ret = s->func(s->context, pl->dataptr, pl->ctx, s->userctx); -} - -krb5_error_code -_krb5_plugin_run_f(krb5_context context, - const char *module, - const char *name, - int min_version, - int flags, - void *userctx, - krb5_error_code (*func)(krb5_context, const void *, void *, void *)) -{ - heim_string_t m = heim_string_create(module); - heim_dict_t dict; - struct iter_ctx s; - - HEIMDAL_MUTEX_lock(&plugin_mutex); - - dict = heim_dict_copy_value(modules, m); - heim_release(m); - if (dict == NULL) { - HEIMDAL_MUTEX_unlock(&plugin_mutex); - return KRB5_PLUGIN_NO_HANDLE; - } - - s.context = context; - s.name = name; - s.n = heim_string_create(name); - s.min_version = min_version; - s.result = heim_array_create(); - s.func = func; - s.userctx = userctx; - - heim_dict_iterate_f(dict, search_modules, &s); - - heim_release(dict); - - HEIMDAL_MUTEX_unlock(&plugin_mutex); - - s.ret = KRB5_PLUGIN_NO_HANDLE; - - heim_array_iterate_f(s.result, eval_results, &s); - - heim_release(s.result); - heim_release(s.n); - - return s.ret; -} diff --git a/kerberosV/src/lib/krb5/principal.c b/kerberosV/src/lib/krb5/principal.c deleted file mode 100644 index a10d2d07980..00000000000 --- a/kerberosV/src/lib/krb5/principal.c +++ /dev/null @@ -1,1136 +0,0 @@ -/* - * Copyright (c) 1997-2007 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. - */ - -/** - * @page krb5_principal_intro The principal handing functions. - * - * A Kerberos principal is a email address looking string that - * contains to parts separeted by a @. The later part is the kerbero - * realm the principal belongs to and the former is a list of 0 or - * more components. For example - * @verbatim -lha@SU.SE -host/hummel.it.su.se@SU.SE -host/admin@H5L.ORG -@endverbatim - * - * See the library functions here: @ref krb5_principal - */ - -#include "krb5_locl.h" -#ifdef HAVE_RES_SEARCH -#define USE_RESOLVER -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#include -#include "resolve.h" - -#define princ_num_comp(P) ((P)->name.name_string.len) -#define princ_type(P) ((P)->name.name_type) -#define princ_comp(P) ((P)->name.name_string.val) -#define princ_ncomp(P, N) ((P)->name.name_string.val[(N)]) -#define princ_realm(P) ((P)->realm) - -/** - * Frees a Kerberos principal allocated by the library with - * krb5_parse_name(), krb5_make_principal() or any other related - * principal functions. - * - * @param context A Kerberos context. - * @param p a principal to free. - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_principal(krb5_context context, - krb5_principal p) -{ - if(p){ - free_Principal(p); - free(p); - } -} - -/** - * Set the type of the principal - * - * @param context A Kerberos context. - * @param principal principal to set the type for - * @param type the new type - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_principal_set_type(krb5_context context, - krb5_principal principal, - int type) -{ - princ_type(principal) = type; -} - -/** - * Get the type of the principal - * - * @param context A Kerberos context. - * @param principal principal to get the type for - * - * @return the type of principal - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_principal_get_type(krb5_context context, - krb5_const_principal principal) -{ - return princ_type(principal); -} - -/** - * Get the realm of the principal - * - * @param context A Kerberos context. - * @param principal principal to get the realm for - * - * @return realm of the principal, don't free or use after krb5_principal is freed - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_principal_get_realm(krb5_context context, - krb5_const_principal principal) -{ - return princ_realm(principal); -} - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_principal_get_comp_string(krb5_context context, - krb5_const_principal principal, - unsigned int component) -{ - if(component >= princ_num_comp(principal)) - return NULL; - return princ_ncomp(principal, component); -} - -/** - * Get number of component is principal. - * - * @param context Kerberos 5 context - * @param principal principal to query - * - * @return number of components in string - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION unsigned int KRB5_LIB_CALL -krb5_principal_get_num_comp(krb5_context context, - krb5_const_principal principal) -{ - return princ_num_comp(principal); -} - -/** - * Parse a name into a krb5_principal structure, flags controls the behavior. - * - * @param context Kerberos 5 context - * @param name name to parse into a Kerberos principal - * @param flags flags to control the behavior - * @param principal returned principal, free with krb5_free_principal(). - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_parse_name_flags(krb5_context context, - const char *name, - int flags, - krb5_principal *principal) -{ - krb5_error_code ret; - heim_general_string *comp; - heim_general_string realm = NULL; - int ncomp; - - const char *p; - char *q; - char *s; - char *start; - - int n; - char c; - int got_realm = 0; - int first_at = 1; - int enterprise = (flags & KRB5_PRINCIPAL_PARSE_ENTERPRISE); - - *principal = NULL; - -#define RFLAGS (KRB5_PRINCIPAL_PARSE_NO_REALM|KRB5_PRINCIPAL_PARSE_REQUIRE_REALM) - - if ((flags & RFLAGS) == RFLAGS) { - krb5_set_error_message(context, KRB5_ERR_NO_SERVICE, - N_("Can't require both realm and " - "no realm at the same time", "")); - return KRB5_ERR_NO_SERVICE; - } -#undef RFLAGS - - /* count number of component, - * enterprise names only have one component - */ - ncomp = 1; - if (!enterprise) { - for(p = name; *p; p++){ - if(*p=='\\'){ - if(!p[1]) { - krb5_set_error_message(context, KRB5_PARSE_MALFORMED, - N_("trailing \\ in principal name", "")); - return KRB5_PARSE_MALFORMED; - } - p++; - } else if(*p == '/') - ncomp++; - else if(*p == '@') - break; - } - } - comp = calloc(ncomp, sizeof(*comp)); - if (comp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - n = 0; - p = start = q = s = strdup(name); - if (start == NULL) { - free (comp); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - while(*p){ - c = *p++; - if(c == '\\'){ - c = *p++; - if(c == 'n') - c = '\n'; - else if(c == 't') - c = '\t'; - else if(c == 'b') - c = '\b'; - else if(c == '0') - c = '\0'; - else if(c == '\0') { - ret = KRB5_PARSE_MALFORMED; - krb5_set_error_message(context, ret, - N_("trailing \\ in principal name", "")); - goto exit; - } - }else if(enterprise && first_at) { - if (c == '@') - first_at = 0; - }else if((c == '/' && !enterprise) || c == '@'){ - if(got_realm){ - ret = KRB5_PARSE_MALFORMED; - krb5_set_error_message(context, ret, - N_("part after realm in principal name", "")); - goto exit; - }else{ - comp[n] = malloc(q - start + 1); - if (comp[n] == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto exit; - } - memcpy(comp[n], start, q - start); - comp[n][q - start] = 0; - n++; - } - if(c == '@') - got_realm = 1; - start = q; - continue; - } - if(got_realm && (c == '/' || c == '\0')) { - ret = KRB5_PARSE_MALFORMED; - krb5_set_error_message(context, ret, - N_("part after realm in principal name", "")); - goto exit; - } - *q++ = c; - } - if(got_realm){ - if (flags & KRB5_PRINCIPAL_PARSE_NO_REALM) { - ret = KRB5_PARSE_MALFORMED; - krb5_set_error_message(context, ret, - N_("realm found in 'short' principal " - "expected to be without one", "")); - goto exit; - } - realm = malloc(q - start + 1); - if (realm == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto exit; - } - memcpy(realm, start, q - start); - realm[q - start] = 0; - }else{ - if (flags & KRB5_PRINCIPAL_PARSE_REQUIRE_REALM) { - ret = KRB5_PARSE_MALFORMED; - krb5_set_error_message(context, ret, - N_("realm NOT found in principal " - "expected to be with one", "")); - goto exit; - } else if (flags & KRB5_PRINCIPAL_PARSE_NO_REALM) { - realm = NULL; - } else { - ret = krb5_get_default_realm (context, &realm); - if (ret) - goto exit; - } - - comp[n] = malloc(q - start + 1); - if (comp[n] == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto exit; - } - memcpy(comp[n], start, q - start); - comp[n][q - start] = 0; - n++; - } - *principal = malloc(sizeof(**principal)); - if (*principal == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto exit; - } - if (enterprise) - (*principal)->name.name_type = KRB5_NT_ENTERPRISE_PRINCIPAL; - else - (*principal)->name.name_type = KRB5_NT_PRINCIPAL; - (*principal)->name.name_string.val = comp; - princ_num_comp(*principal) = n; - (*principal)->realm = realm; - free(s); - return 0; -exit: - while(n>0){ - free(comp[--n]); - } - free(comp); - free(realm); - free(s); - return ret; -} - -/** - * Parse a name into a krb5_principal structure - * - * @param context Kerberos 5 context - * @param name name to parse into a Kerberos principal - * @param principal returned principal, free with krb5_free_principal(). - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_parse_name(krb5_context context, - const char *name, - krb5_principal *principal) -{ - return krb5_parse_name_flags(context, name, 0, principal); -} - -static const char quotable_chars[] = " \n\t\b\\/@"; -static const char replace_chars[] = " ntb\\/@"; -static const char nq_chars[] = " \\/@"; - -#define add_char(BASE, INDEX, LEN, C) do { if((INDEX) < (LEN)) (BASE)[(INDEX)++] = (C); }while(0); - -static size_t -quote_string(const char *s, char *out, size_t idx, size_t len, int display) -{ - const char *p, *q; - for(p = s; *p && idx < len; p++){ - q = strchr(quotable_chars, *p); - if (q && display) { - add_char(out, idx, len, replace_chars[q - quotable_chars]); - } else if (q) { - add_char(out, idx, len, '\\'); - add_char(out, idx, len, replace_chars[q - quotable_chars]); - }else - add_char(out, idx, len, *p); - } - if(idx < len) - out[idx] = '\0'; - return idx; -} - - -static krb5_error_code -unparse_name_fixed(krb5_context context, - krb5_const_principal principal, - char *name, - size_t len, - int flags) -{ - size_t idx = 0; - size_t i; - int short_form = (flags & KRB5_PRINCIPAL_UNPARSE_SHORT) != 0; - int no_realm = (flags & KRB5_PRINCIPAL_UNPARSE_NO_REALM) != 0; - int display = (flags & KRB5_PRINCIPAL_UNPARSE_DISPLAY) != 0; - - if (!no_realm && princ_realm(principal) == NULL) { - krb5_set_error_message(context, ERANGE, - N_("Realm missing from principal, " - "can't unparse", "")); - return ERANGE; - } - - for(i = 0; i < princ_num_comp(principal); i++){ - if(i) - add_char(name, idx, len, '/'); - idx = quote_string(princ_ncomp(principal, i), name, idx, len, display); - if(idx == len) { - krb5_set_error_message(context, ERANGE, - N_("Out of space printing principal", "")); - return ERANGE; - } - } - /* add realm if different from default realm */ - if(short_form && !no_realm) { - krb5_realm r; - krb5_error_code ret; - ret = krb5_get_default_realm(context, &r); - if(ret) - return ret; - if(strcmp(princ_realm(principal), r) != 0) - short_form = 0; - free(r); - } - if(!short_form && !no_realm) { - add_char(name, idx, len, '@'); - idx = quote_string(princ_realm(principal), name, idx, len, display); - if(idx == len) { - krb5_set_error_message(context, ERANGE, - N_("Out of space printing " - "realm of principal", "")); - return ERANGE; - } - } - return 0; -} - -/** - * Unparse the principal name to a fixed buffer - * - * @param context A Kerberos context. - * @param principal principal to unparse - * @param name buffer to write name to - * @param len length of buffer - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name_fixed(krb5_context context, - krb5_const_principal principal, - char *name, - size_t len) -{ - return unparse_name_fixed(context, principal, name, len, 0); -} - -/** - * Unparse the principal name to a fixed buffer. The realm is skipped - * if its a default realm. - * - * @param context A Kerberos context. - * @param principal principal to unparse - * @param name buffer to write name to - * @param len length of buffer - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name_fixed_short(krb5_context context, - krb5_const_principal principal, - char *name, - size_t len) -{ - return unparse_name_fixed(context, principal, name, len, - KRB5_PRINCIPAL_UNPARSE_SHORT); -} - -/** - * Unparse the principal name with unparse flags to a fixed buffer. - * - * @param context A Kerberos context. - * @param principal principal to unparse - * @param flags unparse flags - * @param name buffer to write name to - * @param len length of buffer - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name_fixed_flags(krb5_context context, - krb5_const_principal principal, - int flags, - char *name, - size_t len) -{ - return unparse_name_fixed(context, principal, name, len, flags); -} - -static krb5_error_code -unparse_name(krb5_context context, - krb5_const_principal principal, - char **name, - int flags) -{ - size_t len = 0, plen; - size_t i; - krb5_error_code ret; - /* count length */ - if (princ_realm(principal)) { - plen = strlen(princ_realm(principal)); - - if(strcspn(princ_realm(principal), quotable_chars) == plen) - len += plen; - else - len += 2*plen; - len++; /* '@' */ - } - for(i = 0; i < princ_num_comp(principal); i++){ - plen = strlen(princ_ncomp(principal, i)); - if(strcspn(princ_ncomp(principal, i), quotable_chars) == plen) - len += plen; - else - len += 2*plen; - len++; - } - len++; /* '\0' */ - *name = malloc(len); - if(*name == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - ret = unparse_name_fixed(context, principal, *name, len, flags); - if(ret) { - free(*name); - *name = NULL; - } - return ret; -} - -/** - * Unparse the Kerberos name into a string - * - * @param context Kerberos 5 context - * @param principal principal to query - * @param name resulting string, free with krb5_xfree() - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name(krb5_context context, - krb5_const_principal principal, - char **name) -{ - return unparse_name(context, principal, name, 0); -} - -/** - * Unparse the Kerberos name into a string - * - * @param context Kerberos 5 context - * @param principal principal to query - * @param flags flag to determine the behavior - * @param name resulting string, free with krb5_xfree() - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name_flags(krb5_context context, - krb5_const_principal principal, - int flags, - char **name) -{ - return unparse_name(context, principal, name, flags); -} - -/** - * Unparse the principal name to a allocated buffer. The realm is - * skipped if its a default realm. - * - * @param context A Kerberos context. - * @param principal principal to unparse - * @param name returned buffer, free with krb5_xfree() - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_unparse_name_short(krb5_context context, - krb5_const_principal principal, - char **name) -{ - return unparse_name(context, principal, name, KRB5_PRINCIPAL_UNPARSE_SHORT); -} - -/** - * Set a new realm for a principal, and as a side-effect free the - * previous realm. - * - * @param context A Kerberos context. - * @param principal principal set the realm for - * @param realm the new realm to set - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_principal_set_realm(krb5_context context, - krb5_principal principal, - krb5_const_realm realm) -{ - if (princ_realm(principal)) - free(princ_realm(principal)); - - princ_realm(principal) = strdup(realm); - if (princ_realm(principal) == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -#ifndef HEIMDAL_SMALLER -/** - * Build a principal using vararg style building - * - * @param context A Kerberos context. - * @param principal returned principal - * @param rlen length of realm - * @param realm realm name - * @param ... a list of components ended with NULL. - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_build_principal(krb5_context context, - krb5_principal *principal, - int rlen, - krb5_const_realm realm, - ...) -{ - krb5_error_code ret; - va_list ap; - va_start(ap, realm); - ret = krb5_build_principal_va(context, principal, rlen, realm, ap); - va_end(ap); - return ret; -} -#endif - -/** - * Build a principal using vararg style building - * - * @param context A Kerberos context. - * @param principal returned principal - * @param realm realm name - * @param ... a list of components ended with NULL. - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_make_principal(krb5_context context, - krb5_principal *principal, - krb5_const_realm realm, - ...) -{ - krb5_error_code ret; - krb5_realm r = NULL; - va_list ap; - if(realm == NULL) { - ret = krb5_get_default_realm(context, &r); - if(ret) - return ret; - realm = r; - } - va_start(ap, realm); - ret = krb5_build_principal_va(context, principal, strlen(realm), realm, ap); - va_end(ap); - if(r) - free(r); - return ret; -} - -static krb5_error_code -append_component(krb5_context context, krb5_principal p, - const char *comp, - size_t comp_len) -{ - heim_general_string *tmp; - size_t len = princ_num_comp(p); - - tmp = realloc(princ_comp(p), (len + 1) * sizeof(*tmp)); - if(tmp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - princ_comp(p) = tmp; - princ_ncomp(p, len) = malloc(comp_len + 1); - if (princ_ncomp(p, len) == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy (princ_ncomp(p, len), comp, comp_len); - princ_ncomp(p, len)[comp_len] = '\0'; - princ_num_comp(p)++; - return 0; -} - -static void -va_ext_princ(krb5_context context, krb5_principal p, va_list ap) -{ - while(1){ - const char *s; - int len; - len = va_arg(ap, int); - if(len == 0) - break; - s = va_arg(ap, const char*); - append_component(context, p, s, len); - } -} - -static void -va_princ(krb5_context context, krb5_principal p, va_list ap) -{ - while(1){ - const char *s; - s = va_arg(ap, const char*); - if(s == NULL) - break; - append_component(context, p, s, strlen(s)); - } -} - -static krb5_error_code -build_principal(krb5_context context, - krb5_principal *principal, - int rlen, - krb5_const_realm realm, - void (*func)(krb5_context, krb5_principal, va_list), - va_list ap) -{ - krb5_principal p; - - p = calloc(1, sizeof(*p)); - if (p == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - princ_type(p) = KRB5_NT_PRINCIPAL; - - princ_realm(p) = strdup(realm); - if(p->realm == NULL){ - free(p); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - (*func)(context, p, ap); - *principal = p; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_build_principal_va(krb5_context context, - krb5_principal *principal, - int rlen, - krb5_const_realm realm, - va_list ap) -{ - return build_principal(context, principal, rlen, realm, va_princ, ap); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_build_principal_va_ext(krb5_context context, - krb5_principal *principal, - int rlen, - krb5_const_realm realm, - va_list ap) -{ - return build_principal(context, principal, rlen, realm, va_ext_princ, ap); -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_build_principal_ext(krb5_context context, - krb5_principal *principal, - int rlen, - krb5_const_realm realm, - ...) -{ - krb5_error_code ret; - va_list ap; - va_start(ap, realm); - ret = krb5_build_principal_va_ext(context, principal, rlen, realm, ap); - va_end(ap); - return ret; -} - -/** - * Copy a principal - * - * @param context A Kerberos context. - * @param inprinc principal to copy - * @param outprinc copied principal, free with krb5_free_principal() - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_principal(krb5_context context, - krb5_const_principal inprinc, - krb5_principal *outprinc) -{ - krb5_principal p = malloc(sizeof(*p)); - if (p == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - if(copy_Principal(inprinc, p)) { - free(p); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - *outprinc = p; - return 0; -} - -/** - * Return TRUE iff princ1 == princ2 (without considering the realm) - * - * @param context Kerberos 5 context - * @param princ1 first principal to compare - * @param princ2 second principal to compare - * - * @return non zero if equal, 0 if not - * - * @ingroup krb5_principal - * @see krb5_principal_compare() - * @see krb5_realm_compare() - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_principal_compare_any_realm(krb5_context context, - krb5_const_principal princ1, - krb5_const_principal princ2) -{ - size_t i; - if(princ_num_comp(princ1) != princ_num_comp(princ2)) - return FALSE; - for(i = 0; i < princ_num_comp(princ1); i++){ - if(strcmp(princ_ncomp(princ1, i), princ_ncomp(princ2, i)) != 0) - return FALSE; - } - return TRUE; -} - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -_krb5_principal_compare_PrincipalName(krb5_context context, - krb5_const_principal princ1, - PrincipalName *princ2) -{ - size_t i; - if (princ_num_comp(princ1) != princ2->name_string.len) - return FALSE; - for(i = 0; i < princ_num_comp(princ1); i++){ - if(strcmp(princ_ncomp(princ1, i), princ2->name_string.val[i]) != 0) - return FALSE; - } - return TRUE; -} - - -/** - * Compares the two principals, including realm of the principals and returns - * TRUE if they are the same and FALSE if not. - * - * @param context Kerberos 5 context - * @param princ1 first principal to compare - * @param princ2 second principal to compare - * - * @ingroup krb5_principal - * @see krb5_principal_compare_any_realm() - * @see krb5_realm_compare() - */ - -/* - * return TRUE iff princ1 == princ2 - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_principal_compare(krb5_context context, - krb5_const_principal princ1, - krb5_const_principal princ2) -{ - if(!krb5_realm_compare(context, princ1, princ2)) - return FALSE; - return krb5_principal_compare_any_realm(context, princ1, princ2); -} - -/** - * return TRUE iff realm(princ1) == realm(princ2) - * - * @param context Kerberos 5 context - * @param princ1 first principal to compare - * @param princ2 second principal to compare - * - * @ingroup krb5_principal - * @see krb5_principal_compare_any_realm() - * @see krb5_principal_compare() - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_realm_compare(krb5_context context, - krb5_const_principal princ1, - krb5_const_principal princ2) -{ - return strcmp(princ_realm(princ1), princ_realm(princ2)) == 0; -} - -/** - * return TRUE iff princ matches pattern - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_principal_match(krb5_context context, - krb5_const_principal princ, - krb5_const_principal pattern) -{ - size_t i; - if(princ_num_comp(princ) != princ_num_comp(pattern)) - return FALSE; - if(fnmatch(princ_realm(pattern), princ_realm(princ), 0) != 0) - return FALSE; - for(i = 0; i < princ_num_comp(princ); i++){ - if(fnmatch(princ_ncomp(pattern, i), princ_ncomp(princ, i), 0) != 0) - return FALSE; - } - return TRUE; -} - -/** - * Create a principal for the service running on hostname. If - * KRB5_NT_SRV_HST is used, the hostname is canonization using DNS (or - * some other service), this is potentially insecure. - * - * @param context A Kerberos context. - * @param hostname hostname to use - * @param sname Service name to use - * @param type name type of pricipal, use KRB5_NT_SRV_HST or KRB5_NT_UNKNOWN. - * @param ret_princ return principal, free with krb5_free_principal(). - * - * @return An krb5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sname_to_principal (krb5_context context, - const char *hostname, - const char *sname, - int32_t type, - krb5_principal *ret_princ) -{ - krb5_error_code ret; - char localhost[MAXHOSTNAMELEN]; - char **realms, *host = NULL; - - if(type != KRB5_NT_SRV_HST && type != KRB5_NT_UNKNOWN) { - krb5_set_error_message(context, KRB5_SNAME_UNSUPP_NAMETYPE, - N_("unsupported name type %d", ""), - (int)type); - return KRB5_SNAME_UNSUPP_NAMETYPE; - } - if(hostname == NULL) { - ret = gethostname(localhost, sizeof(localhost) - 1); - if (ret != 0) { - ret = errno; - krb5_set_error_message(context, ret, - N_("Failed to get local hostname", "")); - return ret; - } - localhost[sizeof(localhost) - 1] = '\0'; - hostname = localhost; - } - if(sname == NULL) - sname = "host"; - if(type == KRB5_NT_SRV_HST) { - ret = krb5_expand_hostname_realms (context, hostname, - &host, &realms); - if (ret) - return ret; - strlwr(host); - hostname = host; - } else { - ret = krb5_get_host_realm(context, hostname, &realms); - if(ret) - return ret; - } - - ret = krb5_make_principal(context, ret_princ, realms[0], sname, - hostname, NULL); - if(host) - free(host); - krb5_free_host_realm(context, realms); - return ret; -} - -static const struct { - const char *type; - int32_t value; -} nametypes[] = { - { "UNKNOWN", KRB5_NT_UNKNOWN }, - { "PRINCIPAL", KRB5_NT_PRINCIPAL }, - { "SRV_INST", KRB5_NT_SRV_INST }, - { "SRV_HST", KRB5_NT_SRV_HST }, - { "SRV_XHST", KRB5_NT_SRV_XHST }, - { "UID", KRB5_NT_UID }, - { "X500_PRINCIPAL", KRB5_NT_X500_PRINCIPAL }, - { "SMTP_NAME", KRB5_NT_SMTP_NAME }, - { "ENTERPRISE_PRINCIPAL", KRB5_NT_ENTERPRISE_PRINCIPAL }, - { "ENT_PRINCIPAL_AND_ID", KRB5_NT_ENT_PRINCIPAL_AND_ID }, - { "MS_PRINCIPAL", KRB5_NT_MS_PRINCIPAL }, - { "MS_PRINCIPAL_AND_ID", KRB5_NT_MS_PRINCIPAL_AND_ID }, - { NULL, 0 } -}; - -/** - * Parse nametype string and return a nametype integer - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_parse_nametype(krb5_context context, const char *str, int32_t *nametype) -{ - size_t i; - - for(i = 0; nametypes[i].type; i++) { - if (strcasecmp(nametypes[i].type, str) == 0) { - *nametype = nametypes[i].value; - return 0; - } - } - krb5_set_error_message(context, KRB5_PARSE_MALFORMED, - N_("Failed to find name type %s", ""), str); - return KRB5_PARSE_MALFORMED; -} - -/** - * Check if the cname part of the principal is a krbtgt principal - * - * @ingroup krb5_principal - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_principal_is_krbtgt(krb5_context context, krb5_const_principal p) -{ - return p->name.name_string.len == 2 && - strcmp(p->name.name_string.val[0], KRB5_TGS_NAME) == 0; - -} diff --git a/kerberosV/src/lib/krb5/prog_setup.c b/kerberosV/src/lib/krb5/prog_setup.c deleted file mode 100644 index 21afbf8d103..00000000000 --- a/kerberosV/src/lib/krb5/prog_setup.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" -#include -#include - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_std_usage(int code, struct getargs *args, int num_args) -{ - arg_printusage(args, num_args, NULL, ""); - exit(code); -} - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_program_setup(krb5_context *context, int argc, char **argv, - struct getargs *args, int num_args, - void (KRB5_LIB_CALL *usage)(int, struct getargs*, int)) -{ - krb5_error_code ret; - int optidx = 0; - - if(usage == NULL) - usage = krb5_std_usage; - - setprogname(argv[0]); - ret = krb5_init_context(context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - if(getarg(args, num_args, argc, argv, &optidx)) - (*usage)(1, args, num_args); - return optidx; -} diff --git a/kerberosV/src/lib/krb5/prompter_posix.c b/kerberosV/src/lib/krb5/prompter_posix.c deleted file mode 100644 index 1bf748c5123..00000000000 --- a/kerberosV/src/lib/krb5/prompter_posix.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION int KRB5_CALLCONV -krb5_prompter_posix (krb5_context context, - void *data, - const char *name, - const char *banner, - int num_prompts, - krb5_prompt prompts[]) -{ - int i; - - if (name) - fprintf (stderr, "%s\n", name); - if (banner) - fprintf (stderr, "%s\n", banner); - if (name || banner) - fflush(stderr); - for (i = 0; i < num_prompts; ++i) { - if (prompts[i].hidden) { - if(UI_UTIL_read_pw_string(prompts[i].reply->data, - prompts[i].reply->length, - prompts[i].prompt, - 0)) - return 1; - } else { - char *s = prompts[i].reply->data; - - fputs (prompts[i].prompt, stdout); - fflush (stdout); - if(fgets(prompts[i].reply->data, - prompts[i].reply->length, - stdin) == NULL) - return 1; - s[strcspn(s, "\n")] = '\0'; - } - } - return 0; -} diff --git a/kerberosV/src/lib/krb5/rd_cred.c b/kerberosV/src/lib/krb5/rd_cred.c deleted file mode 100644 index c08547112b2..00000000000 --- a/kerberosV/src/lib/krb5/rd_cred.c +++ /dev/null @@ -1,348 +0,0 @@ -/* - * Copyright (c) 1997 - 2007 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 "krb5_locl.h" - -static krb5_error_code -compare_addrs(krb5_context context, - krb5_address *a, - krb5_address *b, - const char *message) -{ - char a_str[64], b_str[64]; - size_t len; - - if(krb5_address_compare (context, a, b)) - return 0; - - krb5_print_address (a, a_str, sizeof(a_str), &len); - krb5_print_address (b, b_str, sizeof(b_str), &len); - krb5_set_error_message(context, KRB5KRB_AP_ERR_BADADDR, - "%s: %s != %s", message, b_str, a_str); - return KRB5KRB_AP_ERR_BADADDR; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_cred(krb5_context context, - krb5_auth_context auth_context, - krb5_data *in_data, - krb5_creds ***ret_creds, - krb5_replay_data *outdata) -{ - krb5_error_code ret; - size_t len; - KRB_CRED cred; - EncKrbCredPart enc_krb_cred_part; - krb5_data enc_krb_cred_part_data; - krb5_crypto crypto; - size_t i; - - memset(&enc_krb_cred_part, 0, sizeof(enc_krb_cred_part)); - krb5_data_zero(&enc_krb_cred_part_data); - - if ((auth_context->flags & - (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE)) && - outdata == NULL) - return KRB5_RC_REQUIRED; /* XXX better error, MIT returns this */ - - *ret_creds = NULL; - - ret = decode_KRB_CRED(in_data->data, in_data->length, - &cred, &len); - if(ret) { - krb5_clear_error_message(context); - return ret; - } - - if (cred.pvno != 5) { - ret = KRB5KRB_AP_ERR_BADVERSION; - krb5_clear_error_message (context); - goto out; - } - - if (cred.msg_type != krb_cred) { - ret = KRB5KRB_AP_ERR_MSG_TYPE; - krb5_clear_error_message (context); - goto out; - } - - if (cred.enc_part.etype == ETYPE_NULL) { - /* DK: MIT GSS-API Compatibility */ - enc_krb_cred_part_data.length = cred.enc_part.cipher.length; - enc_krb_cred_part_data.data = cred.enc_part.cipher.data; - } else { - /* Try both subkey and session key. - * - * RFC4120 claims we should use the session key, but Heimdal - * before 0.8 used the remote subkey if it was send in the - * auth_context. - */ - - if (auth_context->remote_subkey) { - ret = krb5_crypto_init(context, auth_context->remote_subkey, - 0, &crypto); - if (ret) - goto out; - - ret = krb5_decrypt_EncryptedData(context, - crypto, - KRB5_KU_KRB_CRED, - &cred.enc_part, - &enc_krb_cred_part_data); - - krb5_crypto_destroy(context, crypto); - } - - /* - * If there was not subkey, or we failed using subkey, - * retry using the session key - */ - if (auth_context->remote_subkey == NULL || ret == KRB5KRB_AP_ERR_BAD_INTEGRITY) - { - - ret = krb5_crypto_init(context, auth_context->keyblock, - 0, &crypto); - - if (ret) - goto out; - - ret = krb5_decrypt_EncryptedData(context, - crypto, - KRB5_KU_KRB_CRED, - &cred.enc_part, - &enc_krb_cred_part_data); - - krb5_crypto_destroy(context, crypto); - } - if (ret) - goto out; - } - - ret = decode_EncKrbCredPart(enc_krb_cred_part_data.data, - enc_krb_cred_part_data.length, - &enc_krb_cred_part, - &len); - if (enc_krb_cred_part_data.data != cred.enc_part.cipher.data) - krb5_data_free(&enc_krb_cred_part_data); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to decode " - "encrypte credential part", "")); - goto out; - } - - /* check sender address */ - - if (enc_krb_cred_part.s_address - && auth_context->remote_address - && auth_context->remote_port) { - krb5_address *a; - - ret = krb5_make_addrport (context, &a, - auth_context->remote_address, - auth_context->remote_port); - if (ret) - goto out; - - - ret = compare_addrs(context, a, enc_krb_cred_part.s_address, - N_("sender address is wrong " - "in received creds", "")); - krb5_free_address(context, a); - free(a); - if(ret) - goto out; - } - - /* check receiver address */ - - if (enc_krb_cred_part.r_address - && auth_context->local_address) { - if(auth_context->local_port && - enc_krb_cred_part.r_address->addr_type == KRB5_ADDRESS_ADDRPORT) { - krb5_address *a; - ret = krb5_make_addrport (context, &a, - auth_context->local_address, - auth_context->local_port); - if (ret) - goto out; - - ret = compare_addrs(context, a, enc_krb_cred_part.r_address, - N_("receiver address is wrong " - "in received creds", "")); - krb5_free_address(context, a); - free(a); - if(ret) - goto out; - } else { - ret = compare_addrs(context, auth_context->local_address, - enc_krb_cred_part.r_address, - N_("receiver address is wrong " - "in received creds", "")); - if(ret) - goto out; - } - } - - /* check timestamp */ - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { - krb5_timestamp sec; - - krb5_timeofday (context, &sec); - - if (enc_krb_cred_part.timestamp == NULL || - enc_krb_cred_part.usec == NULL || - abs(*enc_krb_cred_part.timestamp - sec) - > context->max_skew) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_SKEW; - goto out; - } - } - - if ((auth_context->flags & - (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE))) { - /* if these fields are not present in the cred-part, silently - return zero */ - memset(outdata, 0, sizeof(*outdata)); - if(enc_krb_cred_part.timestamp) - outdata->timestamp = *enc_krb_cred_part.timestamp; - if(enc_krb_cred_part.usec) - outdata->usec = *enc_krb_cred_part.usec; - if(enc_krb_cred_part.nonce) - outdata->seq = *enc_krb_cred_part.nonce; - } - - /* Convert to NULL terminated list of creds */ - - *ret_creds = calloc(enc_krb_cred_part.ticket_info.len + 1, - sizeof(**ret_creds)); - - if (*ret_creds == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto out; - } - - for (i = 0; i < enc_krb_cred_part.ticket_info.len; ++i) { - KrbCredInfo *kci = &enc_krb_cred_part.ticket_info.val[i]; - krb5_creds *creds; - - creds = calloc(1, sizeof(*creds)); - if(creds == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto out; - } - - ASN1_MALLOC_ENCODE(Ticket, creds->ticket.data, creds->ticket.length, - &cred.tickets.val[i], &len, ret); - if (ret) { - free(creds); - goto out; - } - if(creds->ticket.length != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - copy_EncryptionKey (&kci->key, &creds->session); - if (kci->prealm && kci->pname) - _krb5_principalname2krb5_principal (context, - &creds->client, - *kci->pname, - *kci->prealm); - if (kci->flags) - creds->flags.b = *kci->flags; - if (kci->authtime) - creds->times.authtime = *kci->authtime; - if (kci->starttime) - creds->times.starttime = *kci->starttime; - if (kci->endtime) - creds->times.endtime = *kci->endtime; - if (kci->renew_till) - creds->times.renew_till = *kci->renew_till; - if (kci->srealm && kci->sname) - _krb5_principalname2krb5_principal (context, - &creds->server, - *kci->sname, - *kci->srealm); - if (kci->caddr) - krb5_copy_addresses (context, - kci->caddr, - &creds->addresses); - - (*ret_creds)[i] = creds; - - } - (*ret_creds)[i] = NULL; - - free_KRB_CRED (&cred); - free_EncKrbCredPart(&enc_krb_cred_part); - - return 0; - - out: - free_EncKrbCredPart(&enc_krb_cred_part); - free_KRB_CRED (&cred); - if(*ret_creds) { - for(i = 0; (*ret_creds)[i]; i++) - krb5_free_creds(context, (*ret_creds)[i]); - free(*ret_creds); - *ret_creds = NULL; - } - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_cred2 (krb5_context context, - krb5_auth_context auth_context, - krb5_ccache ccache, - krb5_data *in_data) -{ - krb5_error_code ret; - krb5_creds **creds; - int i; - - ret = krb5_rd_cred(context, auth_context, in_data, &creds, NULL); - if(ret) - return ret; - - /* Store the creds in the ccache */ - - for(i = 0; creds && creds[i]; i++) { - krb5_cc_store_cred(context, ccache, creds[i]); - krb5_free_creds(context, creds[i]); - } - free(creds); - return 0; -} diff --git a/kerberosV/src/lib/krb5/rd_error.c b/kerberosV/src/lib/krb5/rd_error.c deleted file mode 100644 index d778c68cd63..00000000000 --- a/kerberosV/src/lib/krb5/rd_error.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_error(krb5_context context, - const krb5_data *msg, - KRB_ERROR *result) -{ - - size_t len; - krb5_error_code ret; - - ret = decode_KRB_ERROR(msg->data, msg->length, result, &len); - if(ret) { - krb5_clear_error_message(context); - return ret; - } - result->error_code += KRB5KDC_ERR_NONE; - return 0; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_error_contents (krb5_context context, - krb5_error *error) -{ - free_KRB_ERROR(error); - memset(error, 0, sizeof(*error)); -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_error (krb5_context context, - krb5_error *error) -{ - krb5_free_error_contents (context, error); - free (error); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_error_from_rd_error(krb5_context context, - const krb5_error *error, - const krb5_creds *creds) -{ - krb5_error_code ret; - - ret = error->error_code; - if (error->e_text != NULL) { - krb5_set_error_message(context, ret, "%s", *error->e_text); - } else { - char clientname[256], servername[256]; - - if (creds != NULL) { - krb5_unparse_name_fixed(context, creds->client, - clientname, sizeof(clientname)); - krb5_unparse_name_fixed(context, creds->server, - servername, sizeof(servername)); - } - - switch (ret) { - case KRB5KDC_ERR_NAME_EXP : - krb5_set_error_message(context, ret, - N_("Client %s%s%s expired", ""), - creds ? "(" : "", - creds ? clientname : "", - creds ? ")" : ""); - break; - case KRB5KDC_ERR_SERVICE_EXP : - krb5_set_error_message(context, ret, - N_("Server %s%s%s expired", ""), - creds ? "(" : "", - creds ? servername : "", - creds ? ")" : ""); - break; - case KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN : - krb5_set_error_message(context, ret, - N_("Client %s%s%s unknown", ""), - creds ? "(" : "", - creds ? clientname : "", - creds ? ")" : ""); - break; - case KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN : - krb5_set_error_message(context, ret, - N_("Server %s%s%s unknown", ""), - creds ? "(" : "", - creds ? servername : "", - creds ? ")" : ""); - break; - default : - krb5_clear_error_message(context); - break; - } - } - return ret; -} diff --git a/kerberosV/src/lib/krb5/rd_priv.c b/kerberosV/src/lib/krb5/rd_priv.c deleted file mode 100644 index 8a46195b694..00000000000 --- a/kerberosV/src/lib/krb5/rd_priv.c +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 1997-2007 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_priv(krb5_context context, - krb5_auth_context auth_context, - const krb5_data *inbuf, - krb5_data *outbuf, - krb5_replay_data *outdata) -{ - krb5_error_code ret; - KRB_PRIV priv; - EncKrbPrivPart part; - size_t len; - krb5_data plain; - krb5_keyblock *key; - krb5_crypto crypto; - - krb5_data_zero(outbuf); - - if ((auth_context->flags & - (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE))) - { - if (outdata == NULL) { - krb5_clear_error_message (context); - return KRB5_RC_REQUIRED; /* XXX better error, MIT returns this */ - } - /* if these fields are not present in the priv-part, silently - return zero */ - memset(outdata, 0, sizeof(*outdata)); - } - - memset(&priv, 0, sizeof(priv)); - ret = decode_KRB_PRIV (inbuf->data, inbuf->length, &priv, &len); - if (ret) { - krb5_clear_error_message (context); - goto failure; - } - if (priv.pvno != 5) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_BADVERSION; - goto failure; - } - if (priv.msg_type != krb_priv) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_MSG_TYPE; - goto failure; - } - - if (auth_context->remote_subkey) - key = auth_context->remote_subkey; - else if (auth_context->local_subkey) - key = auth_context->local_subkey; - else - key = auth_context->keyblock; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - goto failure; - ret = krb5_decrypt_EncryptedData(context, - crypto, - KRB5_KU_KRB_PRIV, - &priv.enc_part, - &plain); - krb5_crypto_destroy(context, crypto); - if (ret) - goto failure; - - ret = decode_EncKrbPrivPart (plain.data, plain.length, &part, &len); - krb5_data_free (&plain); - if (ret) { - krb5_clear_error_message (context); - goto failure; - } - - /* check sender address */ - - if (part.s_address - && auth_context->remote_address - && !krb5_address_compare (context, - auth_context->remote_address, - part.s_address)) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_BADADDR; - goto failure_part; - } - - /* check receiver address */ - - if (part.r_address - && auth_context->local_address - && !krb5_address_compare (context, - auth_context->local_address, - part.r_address)) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_BADADDR; - goto failure_part; - } - - /* check timestamp */ - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { - krb5_timestamp sec; - - krb5_timeofday (context, &sec); - if (part.timestamp == NULL || - part.usec == NULL || - abs(*part.timestamp - sec) > context->max_skew) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_SKEW; - goto failure_part; - } - } - - /* XXX - check replay cache */ - - /* check sequence number. since MIT krb5 cannot generate a sequence - number of zero but instead generates no sequence number, we accept that - */ - - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { - if ((part.seq_number == NULL - && auth_context->remote_seqnumber != 0) - || (part.seq_number != NULL - && *part.seq_number != auth_context->remote_seqnumber)) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_BADORDER; - goto failure_part; - } - auth_context->remote_seqnumber++; - } - - ret = krb5_data_copy (outbuf, part.user_data.data, part.user_data.length); - if (ret) - goto failure_part; - - if ((auth_context->flags & - (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE))) { - if(part.timestamp) - outdata->timestamp = *part.timestamp; - if(part.usec) - outdata->usec = *part.usec; - if(part.seq_number) - outdata->seq = *part.seq_number; - } - - failure_part: - free_EncKrbPrivPart (&part); - - failure: - free_KRB_PRIV (&priv); - return ret; -} diff --git a/kerberosV/src/lib/krb5/rd_rep.c b/kerberosV/src/lib/krb5/rd_rep.c deleted file mode 100644 index 391d81c191b..00000000000 --- a/kerberosV/src/lib/krb5/rd_rep.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_rep(krb5_context context, - krb5_auth_context auth_context, - const krb5_data *inbuf, - krb5_ap_rep_enc_part **repl) -{ - krb5_error_code ret; - AP_REP ap_rep; - size_t len; - krb5_data data; - krb5_crypto crypto; - - krb5_data_zero (&data); - - ret = decode_AP_REP(inbuf->data, inbuf->length, &ap_rep, &len); - if (ret) - return ret; - if (ap_rep.pvno != 5) { - ret = KRB5KRB_AP_ERR_BADVERSION; - krb5_clear_error_message (context); - goto out; - } - if (ap_rep.msg_type != krb_ap_rep) { - ret = KRB5KRB_AP_ERR_MSG_TYPE; - krb5_clear_error_message (context); - goto out; - } - - ret = krb5_crypto_init(context, auth_context->keyblock, 0, &crypto); - if (ret) - goto out; - ret = krb5_decrypt_EncryptedData (context, - crypto, - KRB5_KU_AP_REQ_ENC_PART, - &ap_rep.enc_part, - &data); - krb5_crypto_destroy(context, crypto); - if (ret) - goto out; - - *repl = malloc(sizeof(**repl)); - if (*repl == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - ret = decode_EncAPRepPart(data.data, data.length, *repl, &len); - if (ret) { - krb5_set_error_message(context, ret, N_("Failed to decode EncAPRepPart", "")); - return ret; - } - - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { - if ((*repl)->ctime != auth_context->authenticator->ctime || - (*repl)->cusec != auth_context->authenticator->cusec) - { - krb5_free_ap_rep_enc_part(context, *repl); - *repl = NULL; - ret = KRB5KRB_AP_ERR_MUT_FAIL; - krb5_clear_error_message (context); - goto out; - } - } - if ((*repl)->seq_number) - krb5_auth_con_setremoteseqnumber(context, auth_context, - *((*repl)->seq_number)); - if ((*repl)->subkey) - krb5_auth_con_setremotesubkey(context, auth_context, (*repl)->subkey); - - out: - krb5_data_free (&data); - free_AP_REP (&ap_rep); - return ret; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_free_ap_rep_enc_part (krb5_context context, - krb5_ap_rep_enc_part *val) -{ - if (val) { - free_EncAPRepPart (val); - free (val); - } -} diff --git a/kerberosV/src/lib/krb5/rd_req.c b/kerberosV/src/lib/krb5/rd_req.c deleted file mode 100644 index 21daeb596b5..00000000000 --- a/kerberosV/src/lib/krb5/rd_req.c +++ /dev/null @@ -1,1079 +0,0 @@ - -/* - * Copyright (c) 1997 - 2007 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 "krb5_locl.h" - -static krb5_error_code -decrypt_tkt_enc_part (krb5_context context, - krb5_keyblock *key, - EncryptedData *enc_part, - EncTicketPart *decr_part) -{ - krb5_error_code ret; - krb5_data plain; - size_t len; - krb5_crypto crypto; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - return ret; - ret = krb5_decrypt_EncryptedData (context, - crypto, - KRB5_KU_TICKET, - enc_part, - &plain); - krb5_crypto_destroy(context, crypto); - if (ret) - return ret; - - ret = decode_EncTicketPart(plain.data, plain.length, decr_part, &len); - if (ret) - krb5_set_error_message(context, ret, - N_("Failed to decode encrypted " - "ticket part", "")); - krb5_data_free (&plain); - return ret; -} - -static krb5_error_code -decrypt_authenticator (krb5_context context, - EncryptionKey *key, - EncryptedData *enc_part, - Authenticator *authenticator, - krb5_key_usage usage) -{ - krb5_error_code ret; - krb5_data plain; - size_t len; - krb5_crypto crypto; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - return ret; - ret = krb5_decrypt_EncryptedData (context, - crypto, - usage /* KRB5_KU_AP_REQ_AUTH */, - enc_part, - &plain); - /* for backwards compatibility, also try the old usage */ - if (ret && usage == KRB5_KU_TGS_REQ_AUTH) - ret = krb5_decrypt_EncryptedData (context, - crypto, - KRB5_KU_AP_REQ_AUTH, - enc_part, - &plain); - krb5_crypto_destroy(context, crypto); - if (ret) - return ret; - - ret = decode_Authenticator(plain.data, plain.length, - authenticator, &len); - krb5_data_free (&plain); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decode_ap_req(krb5_context context, - const krb5_data *inbuf, - krb5_ap_req *ap_req) -{ - krb5_error_code ret; - size_t len; - ret = decode_AP_REQ(inbuf->data, inbuf->length, ap_req, &len); - if (ret) - return ret; - if (ap_req->pvno != 5){ - free_AP_REQ(ap_req); - krb5_clear_error_message (context); - return KRB5KRB_AP_ERR_BADVERSION; - } - if (ap_req->msg_type != krb_ap_req){ - free_AP_REQ(ap_req); - krb5_clear_error_message (context); - return KRB5KRB_AP_ERR_MSG_TYPE; - } - if (ap_req->ticket.tkt_vno != 5){ - free_AP_REQ(ap_req); - krb5_clear_error_message (context); - return KRB5KRB_AP_ERR_BADVERSION; - } - return 0; -} - -static krb5_error_code -check_transited(krb5_context context, Ticket *ticket, EncTicketPart *enc) -{ - char **realms; - unsigned int num_realms, n; - krb5_error_code ret; - - /* - * Windows 2000 and 2003 uses this inside their TGT so it's normaly - * not seen by others, however, samba4 joined with a Windows AD as - * a Domain Controller gets exposed to this. - */ - if(enc->transited.tr_type == 0 && enc->transited.contents.length == 0) - return 0; - - if(enc->transited.tr_type != DOMAIN_X500_COMPRESS) - return KRB5KDC_ERR_TRTYPE_NOSUPP; - - if(enc->transited.contents.length == 0) - return 0; - - ret = krb5_domain_x500_decode(context, enc->transited.contents, - &realms, &num_realms, - enc->crealm, - ticket->realm); - if(ret) - return ret; - ret = krb5_check_transited(context, enc->crealm, - ticket->realm, - realms, num_realms, NULL); - for (n = 0; n < num_realms; n++) - free(realms[n]); - free(realms); - return ret; -} - -static krb5_error_code -find_etypelist(krb5_context context, - krb5_auth_context auth_context, - EtypeList *etypes) -{ - krb5_error_code ret; - krb5_authdata *ad; - krb5_authdata adIfRelevant; - unsigned i; - - memset(&adIfRelevant, 0, sizeof(adIfRelevant)); - - etypes->len = 0; - etypes->val = NULL; - - ad = auth_context->authenticator->authorization_data; - if (ad == NULL) - return 0; - - for (i = 0; i < ad->len; i++) { - if (ad->val[i].ad_type == KRB5_AUTHDATA_IF_RELEVANT) { - ret = decode_AD_IF_RELEVANT(ad->val[i].ad_data.data, - ad->val[i].ad_data.length, - &adIfRelevant, - NULL); - if (ret) - return ret; - - if (adIfRelevant.len == 1 && - adIfRelevant.val[0].ad_type == - KRB5_AUTHDATA_GSS_API_ETYPE_NEGOTIATION) { - break; - } - free_AD_IF_RELEVANT(&adIfRelevant); - adIfRelevant.len = 0; - } - } - - if (adIfRelevant.len == 0) - return 0; - - ret = decode_EtypeList(adIfRelevant.val[0].ad_data.data, - adIfRelevant.val[0].ad_data.length, - etypes, - NULL); - if (ret) - krb5_clear_error_message(context); - - free_AD_IF_RELEVANT(&adIfRelevant); - - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_decrypt_ticket(krb5_context context, - Ticket *ticket, - krb5_keyblock *key, - EncTicketPart *out, - krb5_flags flags) -{ - EncTicketPart t; - krb5_error_code ret; - ret = decrypt_tkt_enc_part (context, key, &ticket->enc_part, &t); - if (ret) - return ret; - - { - krb5_timestamp now; - time_t start = t.authtime; - - krb5_timeofday (context, &now); - if(t.starttime) - start = *t.starttime; - if(start - now > context->max_skew - || (t.flags.invalid - && !(flags & KRB5_VERIFY_AP_REQ_IGNORE_INVALID))) { - free_EncTicketPart(&t); - krb5_clear_error_message (context); - return KRB5KRB_AP_ERR_TKT_NYV; - } - if(now - t.endtime > context->max_skew) { - free_EncTicketPart(&t); - krb5_clear_error_message (context); - return KRB5KRB_AP_ERR_TKT_EXPIRED; - } - - if(!t.flags.transited_policy_checked) { - ret = check_transited(context, ticket, &t); - if(ret) { - free_EncTicketPart(&t); - return ret; - } - } - } - - if(out) - *out = t; - else - free_EncTicketPart(&t); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_authenticator_checksum(krb5_context context, - krb5_auth_context ac, - void *data, - size_t len) -{ - krb5_error_code ret; - krb5_keyblock *key; - krb5_authenticator authenticator; - krb5_crypto crypto; - - ret = krb5_auth_con_getauthenticator (context, - ac, - &authenticator); - if(ret) - return ret; - if(authenticator->cksum == NULL) { - krb5_free_authenticator(context, &authenticator); - return -17; - } - ret = krb5_auth_con_getkey(context, ac, &key); - if(ret) { - krb5_free_authenticator(context, &authenticator); - return ret; - } - ret = krb5_crypto_init(context, key, 0, &crypto); - if(ret) - goto out; - ret = krb5_verify_checksum (context, - crypto, - KRB5_KU_AP_REQ_AUTH_CKSUM, - data, - len, - authenticator->cksum); - krb5_crypto_destroy(context, crypto); -out: - krb5_free_authenticator(context, &authenticator); - krb5_free_keyblock(context, key); - return ret; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_ap_req(krb5_context context, - krb5_auth_context *auth_context, - krb5_ap_req *ap_req, - krb5_const_principal server, - krb5_keyblock *keyblock, - krb5_flags flags, - krb5_flags *ap_req_options, - krb5_ticket **ticket) -{ - return krb5_verify_ap_req2 (context, - auth_context, - ap_req, - server, - keyblock, - flags, - ap_req_options, - ticket, - KRB5_KU_AP_REQ_AUTH); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_ap_req2(krb5_context context, - krb5_auth_context *auth_context, - krb5_ap_req *ap_req, - krb5_const_principal server, - krb5_keyblock *keyblock, - krb5_flags flags, - krb5_flags *ap_req_options, - krb5_ticket **ticket, - krb5_key_usage usage) -{ - krb5_ticket *t; - krb5_auth_context ac; - krb5_error_code ret; - EtypeList etypes; - - if (ticket) - *ticket = NULL; - - if (auth_context && *auth_context) { - ac = *auth_context; - } else { - ret = krb5_auth_con_init (context, &ac); - if (ret) - return ret; - } - - t = calloc(1, sizeof(*t)); - if (t == NULL) { - ret = ENOMEM; - krb5_clear_error_message (context); - goto out; - } - - if (ap_req->ap_options.use_session_key && ac->keyblock){ - ret = krb5_decrypt_ticket(context, &ap_req->ticket, - ac->keyblock, - &t->ticket, - flags); - krb5_free_keyblock(context, ac->keyblock); - ac->keyblock = NULL; - }else - ret = krb5_decrypt_ticket(context, &ap_req->ticket, - keyblock, - &t->ticket, - flags); - - if(ret) - goto out; - - ret = _krb5_principalname2krb5_principal(context, - &t->server, - ap_req->ticket.sname, - ap_req->ticket.realm); - if (ret) goto out; - ret = _krb5_principalname2krb5_principal(context, - &t->client, - t->ticket.cname, - t->ticket.crealm); - if (ret) goto out; - - ret = decrypt_authenticator (context, - &t->ticket.key, - &ap_req->authenticator, - ac->authenticator, - usage); - if (ret) - goto out; - - { - krb5_principal p1, p2; - krb5_boolean res; - - _krb5_principalname2krb5_principal(context, - &p1, - ac->authenticator->cname, - ac->authenticator->crealm); - _krb5_principalname2krb5_principal(context, - &p2, - t->ticket.cname, - t->ticket.crealm); - res = krb5_principal_compare (context, p1, p2); - krb5_free_principal (context, p1); - krb5_free_principal (context, p2); - if (!res) { - ret = KRB5KRB_AP_ERR_BADMATCH; - krb5_clear_error_message (context); - goto out; - } - } - - /* check addresses */ - - if (t->ticket.caddr - && ac->remote_address - && !krb5_address_search (context, - ac->remote_address, - t->ticket.caddr)) { - ret = KRB5KRB_AP_ERR_BADADDR; - krb5_clear_error_message (context); - goto out; - } - - /* check timestamp in authenticator */ - { - krb5_timestamp now; - - krb5_timeofday (context, &now); - - if (abs(ac->authenticator->ctime - now) > context->max_skew) { - ret = KRB5KRB_AP_ERR_SKEW; - krb5_clear_error_message (context); - goto out; - } - } - - if (ac->authenticator->seq_number) - krb5_auth_con_setremoteseqnumber(context, ac, - *ac->authenticator->seq_number); - - /* XXX - Xor sequence numbers */ - - if (ac->authenticator->subkey) { - ret = krb5_auth_con_setremotesubkey(context, ac, - ac->authenticator->subkey); - if (ret) - goto out; - } - - ret = find_etypelist(context, ac, &etypes); - if (ret) - goto out; - - ac->keytype = ETYPE_NULL; - - if (etypes.val) { - size_t i; - - for (i = 0; i < etypes.len; i++) { - if (krb5_enctype_valid(context, etypes.val[i]) == 0) { - ac->keytype = etypes.val[i]; - break; - } - } - } - - /* save key */ - ret = krb5_copy_keyblock(context, &t->ticket.key, &ac->keyblock); - if (ret) goto out; - - if (ap_req_options) { - *ap_req_options = 0; - if (ac->keytype != ETYPE_NULL) - *ap_req_options |= AP_OPTS_USE_SUBKEY; - if (ap_req->ap_options.use_session_key) - *ap_req_options |= AP_OPTS_USE_SESSION_KEY; - if (ap_req->ap_options.mutual_required) - *ap_req_options |= AP_OPTS_MUTUAL_REQUIRED; - } - - if(ticket) - *ticket = t; - else - krb5_free_ticket (context, t); - if (auth_context) { - if (*auth_context == NULL) - *auth_context = ac; - } else - krb5_auth_con_free (context, ac); - free_EtypeList(&etypes); - return 0; - out: - if (t) - krb5_free_ticket (context, t); - if (auth_context == NULL || *auth_context == NULL) - krb5_auth_con_free (context, ac); - return ret; -} - -/* - * - */ - -struct krb5_rd_req_in_ctx_data { - krb5_keytab keytab; - krb5_keyblock *keyblock; - krb5_boolean check_pac; -}; - -struct krb5_rd_req_out_ctx_data { - krb5_keyblock *keyblock; - krb5_flags ap_req_options; - krb5_ticket *ticket; - krb5_principal server; -}; - -/** - * Allocate a krb5_rd_req_in_ctx as an input parameter to - * krb5_rd_req_ctx(). The caller should free the context with - * krb5_rd_req_in_ctx_free() when done with the context. - * - * @param context Keberos 5 context. - * @param ctx in ctx to krb5_rd_req_ctx(). - * - * @return Kerberos 5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_auth - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_in_ctx_alloc(krb5_context context, krb5_rd_req_in_ctx *ctx) -{ - *ctx = calloc(1, sizeof(**ctx)); - if (*ctx == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - (*ctx)->check_pac = (context->flags & KRB5_CTX_F_CHECK_PAC) ? 1 : 0; - return 0; -} - -/** - * Set the keytab that krb5_rd_req_ctx() will use. - * - * @param context Keberos 5 context. - * @param in in ctx to krb5_rd_req_ctx(). - * @param keytab keytab that krb5_rd_req_ctx() will use, only copy the - * pointer, so the caller must free they keytab after - * krb5_rd_req_in_ctx_free() is called. - * - * @return Kerberos 5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_auth - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_in_set_keytab(krb5_context context, - krb5_rd_req_in_ctx in, - krb5_keytab keytab) -{ - in->keytab = keytab; - return 0; -} - -/** - * Set if krb5_rq_red() is going to check the Windows PAC or not - * - * @param context Keberos 5 context. - * @param in krb5_rd_req_in_ctx to check the option on. - * @param flag flag to select if to check the pac (TRUE) or not (FALSE). - * - * @return Kerberos 5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_auth - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_in_set_pac_check(krb5_context context, - krb5_rd_req_in_ctx in, - krb5_boolean flag) -{ - in->check_pac = flag; - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_in_set_keyblock(krb5_context context, - krb5_rd_req_in_ctx in, - krb5_keyblock *keyblock) -{ - in->keyblock = keyblock; /* XXX should make copy */ - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_out_get_ap_req_options(krb5_context context, - krb5_rd_req_out_ctx out, - krb5_flags *ap_req_options) -{ - *ap_req_options = out->ap_req_options; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_out_get_ticket(krb5_context context, - krb5_rd_req_out_ctx out, - krb5_ticket **ticket) -{ - return krb5_copy_ticket(context, out->ticket, ticket); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_out_get_keyblock(krb5_context context, - krb5_rd_req_out_ctx out, - krb5_keyblock **keyblock) -{ - return krb5_copy_keyblock(context, out->keyblock, keyblock); -} - -/** - * Get the principal that was used in the request from the - * client. Might not match whats in the ticket if krb5_rd_req_ctx() - * searched in the keytab for a matching key. - * - * @param context a Kerberos 5 context. - * @param out a krb5_rd_req_out_ctx from krb5_rd_req_ctx(). - * @param principal return principal, free with krb5_free_principal(). - * - * @ingroup krb5_auth - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_out_get_server(krb5_context context, - krb5_rd_req_out_ctx out, - krb5_principal *principal) -{ - return krb5_copy_principal(context, out->server, principal); -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_rd_req_in_ctx_free(krb5_context context, krb5_rd_req_in_ctx ctx) -{ - free(ctx); -} - -/** - * Free the krb5_rd_req_out_ctx. - * - * @param context Keberos 5 context. - * @param ctx krb5_rd_req_out_ctx context to free. - * - * @ingroup krb5_auth - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_rd_req_out_ctx_free(krb5_context context, krb5_rd_req_out_ctx ctx) -{ - if (ctx->ticket) - krb5_free_ticket(context, ctx->ticket); - if (ctx->keyblock) - krb5_free_keyblock(context, ctx->keyblock); - if (ctx->server) - krb5_free_principal(context, ctx->server); - free(ctx); -} - -/* - * - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req(krb5_context context, - krb5_auth_context *auth_context, - const krb5_data *inbuf, - krb5_const_principal server, - krb5_keytab keytab, - krb5_flags *ap_req_options, - krb5_ticket **ticket) -{ - krb5_error_code ret; - krb5_rd_req_in_ctx in; - krb5_rd_req_out_ctx out; - - ret = krb5_rd_req_in_ctx_alloc(context, &in); - if (ret) - return ret; - - ret = krb5_rd_req_in_set_keytab(context, in, keytab); - if (ret) { - krb5_rd_req_in_ctx_free(context, in); - return ret; - } - - ret = krb5_rd_req_ctx(context, auth_context, inbuf, server, in, &out); - krb5_rd_req_in_ctx_free(context, in); - if (ret) - return ret; - - if (ap_req_options) - *ap_req_options = out->ap_req_options; - if (ticket) { - ret = krb5_copy_ticket(context, out->ticket, ticket); - if (ret) - goto out; - } - -out: - krb5_rd_req_out_ctx_free(context, out); - return ret; -} - -/* - * - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_with_keyblock(krb5_context context, - krb5_auth_context *auth_context, - const krb5_data *inbuf, - krb5_const_principal server, - krb5_keyblock *keyblock, - krb5_flags *ap_req_options, - krb5_ticket **ticket) -{ - krb5_error_code ret; - krb5_rd_req_in_ctx in; - krb5_rd_req_out_ctx out; - - ret = krb5_rd_req_in_ctx_alloc(context, &in); - if (ret) - return ret; - - ret = krb5_rd_req_in_set_keyblock(context, in, keyblock); - if (ret) { - krb5_rd_req_in_ctx_free(context, in); - return ret; - } - - ret = krb5_rd_req_ctx(context, auth_context, inbuf, server, in, &out); - krb5_rd_req_in_ctx_free(context, in); - if (ret) - return ret; - - if (ap_req_options) - *ap_req_options = out->ap_req_options; - if (ticket) { - ret = krb5_copy_ticket(context, out->ticket, ticket); - if (ret) - goto out; - } - -out: - krb5_rd_req_out_ctx_free(context, out); - return ret; -} - -/* - * - */ - -static krb5_error_code -get_key_from_keytab(krb5_context context, - krb5_ap_req *ap_req, - krb5_const_principal server, - krb5_keytab keytab, - krb5_keyblock **out_key) -{ - krb5_keytab_entry entry; - krb5_error_code ret; - int kvno; - krb5_keytab real_keytab; - - if(keytab == NULL) - krb5_kt_default(context, &real_keytab); - else - real_keytab = keytab; - - if (ap_req->ticket.enc_part.kvno) - kvno = *ap_req->ticket.enc_part.kvno; - else - kvno = 0; - - ret = krb5_kt_get_entry (context, - real_keytab, - server, - kvno, - ap_req->ticket.enc_part.etype, - &entry); - if(ret) - goto out; - ret = krb5_copy_keyblock(context, &entry.keyblock, out_key); - krb5_kt_free_entry (context, &entry); -out: - if(keytab == NULL) - krb5_kt_close(context, real_keytab); - - return ret; -} - -/** - * The core server function that verify application authentication - * requests from clients. - * - * @param context Keberos 5 context. - * @param auth_context the authentication context, can be NULL, then - * default values for the authentication context will used. - * @param inbuf the (AP-REQ) authentication buffer - * - * @param server the server with authenticate as, if NULL the function - * will try to find any available credential in the keytab - * that will verify the reply. The function will prefer the - * server the server client specified in the AP-REQ, but if - * there is no mach, it will try all keytab entries for a - * match. This have serious performance issues for larger keytabs. - * - * @param inctx control the behavior of the function, if NULL, the - * default behavior is used. - * @param outctx the return outctx, free with krb5_rd_req_out_ctx_free(). - * @return Kerberos 5 error code, see krb5_get_error_message(). - * - * @ingroup krb5_auth - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_req_ctx(krb5_context context, - krb5_auth_context *auth_context, - const krb5_data *inbuf, - krb5_const_principal server, - krb5_rd_req_in_ctx inctx, - krb5_rd_req_out_ctx *outctx) -{ - krb5_error_code ret; - krb5_ap_req ap_req; - krb5_rd_req_out_ctx o = NULL; - krb5_keytab id = NULL, keytab = NULL; - krb5_principal service = NULL; - - *outctx = NULL; - - o = calloc(1, sizeof(*o)); - if (o == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - if (*auth_context == NULL) { - ret = krb5_auth_con_init(context, auth_context); - if (ret) - goto out; - } - - ret = krb5_decode_ap_req(context, inbuf, &ap_req); - if(ret) - goto out; - - /* Save that principal that was in the request */ - ret = _krb5_principalname2krb5_principal(context, - &o->server, - ap_req.ticket.sname, - ap_req.ticket.realm); - if (ret) - goto out; - - if (ap_req.ap_options.use_session_key && - (*auth_context)->keyblock == NULL) { - ret = KRB5KRB_AP_ERR_NOKEY; - krb5_set_error_message(context, ret, - N_("krb5_rd_req: user to user auth " - "without session key given", "")); - goto out; - } - - if (inctx && inctx->keytab) - id = inctx->keytab; - - if((*auth_context)->keyblock){ - ret = krb5_copy_keyblock(context, - (*auth_context)->keyblock, - &o->keyblock); - if (ret) - goto out; - } else if(inctx && inctx->keyblock){ - ret = krb5_copy_keyblock(context, - inctx->keyblock, - &o->keyblock); - if (ret) - goto out; - } else { - - if(id == NULL) { - krb5_kt_default(context, &keytab); - id = keytab; - } - if (id == NULL) - goto out; - - if (server == NULL) { - ret = _krb5_principalname2krb5_principal(context, - &service, - ap_req.ticket.sname, - ap_req.ticket.realm); - if (ret) - goto out; - server = service; - } - - ret = get_key_from_keytab(context, - &ap_req, - server, - id, - &o->keyblock); - if (ret) { - /* If caller specified a server, fail. */ - if (service == NULL && (context->flags & KRB5_CTX_F_RD_REQ_IGNORE) == 0) - goto out; - /* Otherwise, fall back to iterating over the keytab. This - * have serious performace issues for larger keytab. - */ - o->keyblock = NULL; - } - } - - if (o->keyblock) { - /* - * We got an exact keymatch, use that. - */ - - ret = krb5_verify_ap_req2(context, - auth_context, - &ap_req, - server, - o->keyblock, - 0, - &o->ap_req_options, - &o->ticket, - KRB5_KU_AP_REQ_AUTH); - - if (ret) - goto out; - - } else { - /* - * Interate over keytab to find a key that can decrypt the request. - */ - - krb5_keytab_entry entry; - krb5_kt_cursor cursor; - int done = 0, kvno = 0; - - memset(&cursor, 0, sizeof(cursor)); - - if (ap_req.ticket.enc_part.kvno) - kvno = *ap_req.ticket.enc_part.kvno; - - ret = krb5_kt_start_seq_get(context, id, &cursor); - if (ret) - goto out; - - done = 0; - while (!done) { - krb5_principal p; - - ret = krb5_kt_next_entry(context, id, &entry, &cursor); - if (ret) { - _krb5_kt_principal_not_found(context, ret, id, o->server, - ap_req.ticket.enc_part.etype, - kvno); - goto out; - } - - if (entry.keyblock.keytype != ap_req.ticket.enc_part.etype) { - krb5_kt_free_entry (context, &entry); - continue; - } - - ret = krb5_verify_ap_req2(context, - auth_context, - &ap_req, - server, - &entry.keyblock, - 0, - &o->ap_req_options, - &o->ticket, - KRB5_KU_AP_REQ_AUTH); - if (ret) { - krb5_kt_free_entry (context, &entry); - continue; - } - - /* - * Found a match, save the keyblock for PAC processing, - * and update the service principal in the ticket to match - * whatever is in the keytab. - */ - - ret = krb5_copy_keyblock(context, - &entry.keyblock, - &o->keyblock); - if (ret) { - krb5_kt_free_entry (context, &entry); - goto out; - } - - ret = krb5_copy_principal(context, entry.principal, &p); - if (ret) { - krb5_kt_free_entry (context, &entry); - goto out; - } - krb5_free_principal(context, o->ticket->server); - o->ticket->server = p; - - krb5_kt_free_entry (context, &entry); - - done = 1; - } - krb5_kt_end_seq_get (context, id, &cursor); - } - - /* If there is a PAC, verify its server signature */ - if (inctx == NULL || inctx->check_pac) { - krb5_pac pac; - krb5_data data; - - ret = krb5_ticket_get_authorization_data_type(context, - o->ticket, - KRB5_AUTHDATA_WIN2K_PAC, - &data); - if (ret == 0) { - ret = krb5_pac_parse(context, data.data, data.length, &pac); - krb5_data_free(&data); - if (ret) - goto out; - - ret = krb5_pac_verify(context, - pac, - o->ticket->ticket.authtime, - o->ticket->client, - o->keyblock, - NULL); - krb5_pac_free(context, pac); - if (ret) - goto out; - } else - ret = 0; - } -out: - - if (ret || outctx == NULL) { - krb5_rd_req_out_ctx_free(context, o); - } else - *outctx = o; - - free_AP_REQ(&ap_req); - - if (service) - krb5_free_principal(context, service); - - if (keytab) - krb5_kt_close(context, keytab); - - return ret; -} diff --git a/kerberosV/src/lib/krb5/rd_safe.c b/kerberosV/src/lib/krb5/rd_safe.c deleted file mode 100644 index e62906b1f72..00000000000 --- a/kerberosV/src/lib/krb5/rd_safe.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 1997 - 2003 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 "krb5_locl.h" - -static krb5_error_code -verify_checksum(krb5_context context, - krb5_auth_context auth_context, - KRB_SAFE *safe) -{ - krb5_error_code ret; - u_char *buf; - size_t buf_size; - size_t len = 0; - Checksum c; - krb5_crypto crypto; - krb5_keyblock *key; - - c = safe->cksum; - safe->cksum.cksumtype = 0; - safe->cksum.checksum.data = NULL; - safe->cksum.checksum.length = 0; - - ASN1_MALLOC_ENCODE(KRB_SAFE, buf, buf_size, safe, &len, ret); - if(ret) - return ret; - if(buf_size != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - if (auth_context->remote_subkey) - key = auth_context->remote_subkey; - else if (auth_context->local_subkey) - key = auth_context->local_subkey; - else - key = auth_context->keyblock; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - goto out; - ret = krb5_verify_checksum (context, - crypto, - KRB5_KU_KRB_SAFE_CKSUM, - buf + buf_size - len, - len, - &c); - krb5_crypto_destroy(context, crypto); -out: - safe->cksum = c; - free (buf); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rd_safe(krb5_context context, - krb5_auth_context auth_context, - const krb5_data *inbuf, - krb5_data *outbuf, - krb5_replay_data *outdata) -{ - krb5_error_code ret; - KRB_SAFE safe; - size_t len; - - krb5_data_zero(outbuf); - - if ((auth_context->flags & - (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE))) - { - if (outdata == NULL) { - krb5_set_error_message(context, KRB5_RC_REQUIRED, - N_("rd_safe: need outdata " - "to return data", "")); - return KRB5_RC_REQUIRED; /* XXX better error, MIT returns this */ - } - /* if these fields are not present in the safe-part, silently - return zero */ - memset(outdata, 0, sizeof(*outdata)); - } - - ret = decode_KRB_SAFE (inbuf->data, inbuf->length, &safe, &len); - if (ret) - return ret; - if (safe.pvno != 5) { - ret = KRB5KRB_AP_ERR_BADVERSION; - krb5_clear_error_message (context); - goto failure; - } - if (safe.msg_type != krb_safe) { - ret = KRB5KRB_AP_ERR_MSG_TYPE; - krb5_clear_error_message (context); - goto failure; - } - if (!krb5_checksum_is_keyed(context, safe.cksum.cksumtype) - || !krb5_checksum_is_collision_proof(context, safe.cksum.cksumtype)) { - ret = KRB5KRB_AP_ERR_INAPP_CKSUM; - krb5_clear_error_message (context); - goto failure; - } - - /* check sender address */ - - if (safe.safe_body.s_address - && auth_context->remote_address - && !krb5_address_compare (context, - auth_context->remote_address, - safe.safe_body.s_address)) { - ret = KRB5KRB_AP_ERR_BADADDR; - krb5_clear_error_message (context); - goto failure; - } - - /* check receiver address */ - - if (safe.safe_body.r_address - && auth_context->local_address - && !krb5_address_compare (context, - auth_context->local_address, - safe.safe_body.r_address)) { - ret = KRB5KRB_AP_ERR_BADADDR; - krb5_clear_error_message (context); - goto failure; - } - - /* check timestamp */ - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) { - krb5_timestamp sec; - - krb5_timeofday (context, &sec); - - if (safe.safe_body.timestamp == NULL || - safe.safe_body.usec == NULL || - abs(*safe.safe_body.timestamp - sec) > context->max_skew) { - ret = KRB5KRB_AP_ERR_SKEW; - krb5_clear_error_message (context); - goto failure; - } - } - /* XXX - check replay cache */ - - /* check sequence number. since MIT krb5 cannot generate a sequence - number of zero but instead generates no sequence number, we accept that - */ - - if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { - if ((safe.safe_body.seq_number == NULL - && auth_context->remote_seqnumber != 0) - || (safe.safe_body.seq_number != NULL - && *safe.safe_body.seq_number != - auth_context->remote_seqnumber)) { - ret = KRB5KRB_AP_ERR_BADORDER; - krb5_clear_error_message (context); - goto failure; - } - auth_context->remote_seqnumber++; - } - - ret = verify_checksum (context, auth_context, &safe); - if (ret) - goto failure; - - outbuf->length = safe.safe_body.user_data.length; - outbuf->data = malloc(outbuf->length); - if (outbuf->data == NULL && outbuf->length != 0) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - krb5_data_zero(outbuf); - goto failure; - } - memcpy (outbuf->data, safe.safe_body.user_data.data, outbuf->length); - - if ((auth_context->flags & - (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE))) { - - if(safe.safe_body.timestamp) - outdata->timestamp = *safe.safe_body.timestamp; - if(safe.safe_body.usec) - outdata->usec = *safe.safe_body.usec; - if(safe.safe_body.seq_number) - outdata->seq = *safe.safe_body.seq_number; - } - - failure: - free_KRB_SAFE (&safe); - return ret; -} diff --git a/kerberosV/src/lib/krb5/read_message.c b/kerberosV/src/lib/krb5/read_message.c deleted file mode 100644 index 4e9bd012dd6..00000000000 --- a/kerberosV/src/lib/krb5/read_message.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_read_message (krb5_context context, - krb5_pointer p_fd, - krb5_data *data) -{ - krb5_error_code ret; - uint32_t len; - uint8_t buf[4]; - - krb5_data_zero(data); - - ret = krb5_net_read (context, p_fd, buf, 4); - if(ret == -1) { - ret = errno; - krb5_clear_error_message (context); - return ret; - } - if(ret < 4) { - krb5_clear_error_message(context); - return HEIM_ERR_EOF; - } - len = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; - ret = krb5_data_alloc (data, len); - if (ret) { - krb5_clear_error_message(context); - return ret; - } - if (krb5_net_read (context, p_fd, data->data, len) != len) { - ret = errno; - krb5_data_free (data); - krb5_clear_error_message (context); - return ret; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_read_priv_message(krb5_context context, - krb5_auth_context ac, - krb5_pointer p_fd, - krb5_data *data) -{ - krb5_error_code ret; - krb5_data packet; - - ret = krb5_read_message(context, p_fd, &packet); - if(ret) - return ret; - ret = krb5_rd_priv (context, ac, &packet, data, NULL); - krb5_data_free(&packet); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_read_safe_message(krb5_context context, - krb5_auth_context ac, - krb5_pointer p_fd, - krb5_data *data) -{ - krb5_error_code ret; - krb5_data packet; - - ret = krb5_read_message(context, p_fd, &packet); - if(ret) - return ret; - ret = krb5_rd_safe (context, ac, &packet, data, NULL); - krb5_data_free(&packet); - return ret; -} diff --git a/kerberosV/src/lib/krb5/recvauth.c b/kerberosV/src/lib/krb5/recvauth.c deleted file mode 100644 index 78e98a10fc1..00000000000 --- a/kerberosV/src/lib/krb5/recvauth.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (c) 1997-2007 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 "krb5_locl.h" - -/* - * See `sendauth.c' for the format. - */ - -static krb5_boolean -match_exact(const void *data, const char *appl_version) -{ - return strcmp(data, appl_version) == 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_recvauth(krb5_context context, - krb5_auth_context *auth_context, - krb5_pointer p_fd, - const char *appl_version, - krb5_principal server, - int32_t flags, - krb5_keytab keytab, - krb5_ticket **ticket) -{ - return krb5_recvauth_match_version(context, auth_context, p_fd, - match_exact, appl_version, - server, flags, - keytab, ticket); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_recvauth_match_version(krb5_context context, - krb5_auth_context *auth_context, - krb5_pointer p_fd, - krb5_boolean (*match_appl_version)(const void *, - const char*), - const void *match_data, - krb5_principal server, - int32_t flags, - krb5_keytab keytab, - krb5_ticket **ticket) -{ - krb5_error_code ret; - const char *version = KRB5_SENDAUTH_VERSION; - char her_version[sizeof(KRB5_SENDAUTH_VERSION)]; - char *her_appl_version; - uint32_t len; - u_char repl; - krb5_data data; - krb5_flags ap_options; - ssize_t n; - - /* - * If there are no addresses in auth_context, get them from `fd'. - */ - - if (*auth_context == NULL) { - ret = krb5_auth_con_init (context, auth_context); - if (ret) - return ret; - } - - ret = krb5_auth_con_setaddrs_from_fd (context, - *auth_context, - p_fd); - if (ret) - return ret; - - if(!(flags & KRB5_RECVAUTH_IGNORE_VERSION)) { - n = krb5_net_read (context, p_fd, &len, 4); - if (n < 0) { - ret = errno; - krb5_set_error_message(context, ret, "read: %s", strerror(ret)); - return ret; - } - if (n == 0) { - krb5_set_error_message(context, KRB5_SENDAUTH_BADAUTHVERS, - N_("Failed to receive sendauth data", "")); - return KRB5_SENDAUTH_BADAUTHVERS; - } - len = ntohl(len); - if (len != sizeof(her_version) - || krb5_net_read (context, p_fd, her_version, len) != len - || strncmp (version, her_version, len)) { - repl = 1; - krb5_net_write (context, p_fd, &repl, 1); - krb5_clear_error_message (context); - return KRB5_SENDAUTH_BADAUTHVERS; - } - } - - n = krb5_net_read (context, p_fd, &len, 4); - if (n < 0) { - ret = errno; - krb5_set_error_message(context, ret, "read: %s", strerror(ret)); - return ret; - } - if (n == 0) { - krb5_clear_error_message (context); - return KRB5_SENDAUTH_BADAPPLVERS; - } - len = ntohl(len); - her_appl_version = malloc (len); - if (her_appl_version == NULL) { - repl = 2; - krb5_net_write (context, p_fd, &repl, 1); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - if (krb5_net_read (context, p_fd, her_appl_version, len) != len - || !(*match_appl_version)(match_data, her_appl_version)) { - repl = 2; - krb5_net_write (context, p_fd, &repl, 1); - krb5_set_error_message(context, KRB5_SENDAUTH_BADAPPLVERS, - N_("wrong sendauth version (%s)", ""), - her_appl_version); - free (her_appl_version); - return KRB5_SENDAUTH_BADAPPLVERS; - } - free (her_appl_version); - - repl = 0; - if (krb5_net_write (context, p_fd, &repl, 1) != 1) { - ret = errno; - krb5_set_error_message(context, ret, "write: %s", strerror(ret)); - return ret; - } - - krb5_data_zero (&data); - ret = krb5_read_message (context, p_fd, &data); - if (ret) - return ret; - - ret = krb5_rd_req (context, - auth_context, - &data, - server, - keytab, - &ap_options, - ticket); - krb5_data_free (&data); - if (ret) { - krb5_data error_data; - krb5_error_code ret2; - - ret2 = krb5_mk_error (context, - ret, - NULL, - NULL, - NULL, - server, - NULL, - NULL, - &error_data); - if (ret2 == 0) { - krb5_write_message (context, p_fd, &error_data); - krb5_data_free (&error_data); - } - return ret; - } - - len = 0; - if (krb5_net_write (context, p_fd, &len, 4) != 4) { - ret = errno; - krb5_set_error_message(context, ret, "write: %s", strerror(ret)); - krb5_free_ticket(context, *ticket); - *ticket = NULL; - return ret; - } - - if (ap_options & AP_OPTS_MUTUAL_REQUIRED) { - ret = krb5_mk_rep (context, *auth_context, &data); - if (ret) { - krb5_free_ticket(context, *ticket); - *ticket = NULL; - return ret; - } - - ret = krb5_write_message (context, p_fd, &data); - if (ret) { - krb5_free_ticket(context, *ticket); - *ticket = NULL; - return ret; - } - krb5_data_free (&data); - } - return 0; -} diff --git a/kerberosV/src/lib/krb5/replay.c b/kerberosV/src/lib/krb5/replay.c deleted file mode 100644 index b866673502c..00000000000 --- a/kerberosV/src/lib/krb5/replay.c +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright (c) 1997-2001 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 "krb5_locl.h" -#include - -struct krb5_rcache_data { - char *name; -}; - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_resolve(krb5_context context, - krb5_rcache id, - const char *name) -{ - id->name = strdup(name); - if(id->name == NULL) { - krb5_set_error_message(context, KRB5_RC_MALLOC, - N_("malloc: out of memory", "")); - return KRB5_RC_MALLOC; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_resolve_type(krb5_context context, - krb5_rcache *id, - const char *type) -{ - *id = NULL; - if(strcmp(type, "FILE")) { - krb5_set_error_message (context, KRB5_RC_TYPE_NOTFOUND, - N_("replay cache type %s not supported", ""), - type); - return KRB5_RC_TYPE_NOTFOUND; - } - *id = calloc(1, sizeof(**id)); - if(*id == NULL) { - krb5_set_error_message(context, KRB5_RC_MALLOC, - N_("malloc: out of memory", "")); - return KRB5_RC_MALLOC; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_resolve_full(krb5_context context, - krb5_rcache *id, - const char *string_name) -{ - krb5_error_code ret; - - *id = NULL; - - if(strncmp(string_name, "FILE:", 5)) { - krb5_set_error_message(context, KRB5_RC_TYPE_NOTFOUND, - N_("replay cache type %s not supported", ""), - string_name); - return KRB5_RC_TYPE_NOTFOUND; - } - ret = krb5_rc_resolve_type(context, id, "FILE"); - if(ret) - return ret; - ret = krb5_rc_resolve(context, *id, string_name + 5); - if (ret) { - krb5_rc_close(context, *id); - *id = NULL; - } - return ret; -} - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_rc_default_name(krb5_context context) -{ - return "FILE:/var/run/default_rcache"; -} - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_rc_default_type(krb5_context context) -{ - return "FILE"; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_default(krb5_context context, - krb5_rcache *id) -{ - return krb5_rc_resolve_full(context, id, krb5_rc_default_name(context)); -} - -struct rc_entry{ - time_t stamp; - unsigned char data[16]; -}; - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_initialize(krb5_context context, - krb5_rcache id, - krb5_deltat auth_lifespan) -{ - FILE *f = fopen(id->name, "w"); - struct rc_entry tmp; - int ret; - - if(f == NULL) { - char buf[128]; - ret = errno; - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message(context, ret, "open(%s): %s", id->name, buf); - return ret; - } - tmp.stamp = auth_lifespan; - fwrite(&tmp, 1, sizeof(tmp), f); - fclose(f); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_recover(krb5_context context, - krb5_rcache id) -{ - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_destroy(krb5_context context, - krb5_rcache id) -{ - int ret; - - if(remove(id->name) < 0) { - char buf[128]; - ret = errno; - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message(context, ret, "remove(%s): %s", id->name, buf); - return ret; - } - return krb5_rc_close(context, id); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_close(krb5_context context, - krb5_rcache id) -{ - free(id->name); - free(id); - return 0; -} - -static void -checksum_authenticator(Authenticator *auth, void *data) -{ - EVP_MD_CTX *m = EVP_MD_CTX_create(); - unsigned i; - - EVP_DigestInit_ex(m, EVP_md5(), NULL); - - EVP_DigestUpdate(m, auth->crealm, strlen(auth->crealm)); - for(i = 0; i < auth->cname.name_string.len; i++) - EVP_DigestUpdate(m, auth->cname.name_string.val[i], - strlen(auth->cname.name_string.val[i])); - EVP_DigestUpdate(m, &auth->ctime, sizeof(auth->ctime)); - EVP_DigestUpdate(m, &auth->cusec, sizeof(auth->cusec)); - - EVP_DigestFinal_ex(m, data, NULL); - EVP_MD_CTX_destroy(m); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_store(krb5_context context, - krb5_rcache id, - krb5_donot_replay *rep) -{ - struct rc_entry ent, tmp; - time_t t; - FILE *f; - int ret; - - ent.stamp = time(NULL); - checksum_authenticator(rep, ent.data); - f = fopen(id->name, "r"); - if(f == NULL) { - char buf[128]; - ret = errno; - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message(context, ret, "open(%s): %s", id->name, buf); - return ret; - } - rk_cloexec_file(f); - fread(&tmp, sizeof(ent), 1, f); - t = ent.stamp - tmp.stamp; - while(fread(&tmp, sizeof(ent), 1, f)){ - if(tmp.stamp < t) - continue; - if(memcmp(tmp.data, ent.data, sizeof(ent.data)) == 0){ - fclose(f); - krb5_clear_error_message (context); - return KRB5_RC_REPLAY; - } - } - if(ferror(f)){ - char buf[128]; - ret = errno; - fclose(f); - rk_strerror_r(ret, buf, sizeof(buf)); - krb5_set_error_message(context, ret, "%s: %s", - id->name, buf); - return ret; - } - fclose(f); - f = fopen(id->name, "a"); - if(f == NULL) { - char buf[128]; - rk_strerror_r(errno, buf, sizeof(buf)); - krb5_set_error_message(context, KRB5_RC_IO_UNKNOWN, - "open(%s): %s", id->name, buf); - return KRB5_RC_IO_UNKNOWN; - } - fwrite(&ent, 1, sizeof(ent), f); - fclose(f); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_expunge(krb5_context context, - krb5_rcache id) -{ - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_rc_get_lifespan(krb5_context context, - krb5_rcache id, - krb5_deltat *auth_lifespan) -{ - FILE *f = fopen(id->name, "r"); - int r; - struct rc_entry ent; - r = fread(&ent, sizeof(ent), 1, f); - fclose(f); - if(r){ - *auth_lifespan = ent.stamp; - return 0; - } - krb5_clear_error_message (context); - return KRB5_RC_IO_UNKNOWN; -} - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_rc_get_name(krb5_context context, - krb5_rcache id) -{ - return id->name; -} - -KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL -krb5_rc_get_type(krb5_context context, - krb5_rcache id) -{ - return "FILE"; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_server_rcache(krb5_context context, - const krb5_data *piece, - krb5_rcache *id) -{ - krb5_rcache rcache; - krb5_error_code ret; - - char *tmp = malloc(4 * piece->length + 1); - char *name; - - if(tmp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - strvisx(tmp, piece->data, piece->length, VIS_WHITE | VIS_OCTAL); -#ifdef HAVE_GETEUID - ret = asprintf(&name, "FILE:rc_%s_%u", tmp, (unsigned)geteuid()); -#else - ret = asprintf(&name, "FILE:rc_%s", tmp); -#endif - free(tmp); - if(ret < 0 || name == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = krb5_rc_resolve_full(context, &rcache, name); - free(name); - if(ret) - return ret; - *id = rcache; - return ret; -} diff --git a/kerberosV/src/lib/krb5/salt-aes.c b/kerberosV/src/lib/krb5/salt-aes.c deleted file mode 100644 index 32dafd68cb8..00000000000 --- a/kerberosV/src/lib/krb5/salt-aes.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -int _krb5_AES_string_to_default_iterator = 4096; - -static krb5_error_code -AES_string_to_key(krb5_context context, - krb5_enctype enctype, - krb5_data password, - krb5_salt salt, - krb5_data opaque, - krb5_keyblock *key) -{ - krb5_error_code ret; - uint32_t iter; - struct _krb5_encryption_type *et; - struct _krb5_key_data kd; - - if (opaque.length == 0) - iter = _krb5_AES_string_to_default_iterator; - else if (opaque.length == 4) { - unsigned long v; - _krb5_get_int(opaque.data, &v, 4); - iter = ((uint32_t)v); - } else - return KRB5_PROG_KEYTYPE_NOSUPP; /* XXX */ - - et = _krb5_find_enctype(enctype); - if (et == NULL) - return KRB5_PROG_KEYTYPE_NOSUPP; - - kd.schedule = NULL; - ALLOC(kd.key, 1); - if(kd.key == NULL) { - krb5_set_error_message (context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - kd.key->keytype = enctype; - ret = krb5_data_alloc(&kd.key->keyvalue, et->keytype->size); - if (ret) { - krb5_set_error_message (context, ret, N_("malloc: out of memory", "")); - return ret; - } - - ret = PKCS5_PBKDF2_HMAC_SHA1(password.data, password.length, - salt.saltvalue.data, salt.saltvalue.length, - iter, - et->keytype->size, kd.key->keyvalue.data); - if (ret != 1) { - _krb5_free_key_data(context, &kd, et); - krb5_set_error_message(context, KRB5_PROG_KEYTYPE_NOSUPP, - "Error calculating s2k"); - return KRB5_PROG_KEYTYPE_NOSUPP; - } - - ret = _krb5_derive_key(context, et, &kd, "kerberos", strlen("kerberos")); - if (ret == 0) - ret = krb5_copy_keyblock_contents(context, kd.key, key); - _krb5_free_key_data(context, &kd, et); - - return ret; -} - -struct salt_type _krb5_AES_salt[] = { - { - KRB5_PW_SALT, - "pw-salt", - AES_string_to_key - }, - { 0 } -}; diff --git a/kerberosV/src/lib/krb5/salt-arcfour.c b/kerberosV/src/lib/krb5/salt-arcfour.c deleted file mode 100644 index ab5e51270c8..00000000000 --- a/kerberosV/src/lib/krb5/salt-arcfour.c +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -static krb5_error_code -ARCFOUR_string_to_key(krb5_context context, - krb5_enctype enctype, - krb5_data password, - krb5_salt salt, - krb5_data opaque, - krb5_keyblock *key) -{ - krb5_error_code ret; - uint16_t *s = NULL; - size_t len = 0, i; - EVP_MD_CTX *m; - - m = EVP_MD_CTX_create(); - if (m == NULL) { - ret = ENOMEM; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - - EVP_DigestInit_ex(m, EVP_md4(), NULL); - - ret = wind_utf8ucs2_length(password.data, &len); - if (ret) { - krb5_set_error_message (context, ret, - N_("Password not an UCS2 string", "")); - goto out; - } - - s = malloc (len * sizeof(s[0])); - if (len != 0 && s == NULL) { - krb5_set_error_message (context, ENOMEM, - N_("malloc: out of memory", "")); - ret = ENOMEM; - goto out; - } - - ret = wind_utf8ucs2(password.data, s, &len); - if (ret) { - krb5_set_error_message (context, ret, - N_("Password not an UCS2 string", "")); - goto out; - } - - /* LE encoding */ - for (i = 0; i < len; i++) { - unsigned char p; - p = (s[i] & 0xff); - EVP_DigestUpdate (m, &p, 1); - p = (s[i] >> 8) & 0xff; - EVP_DigestUpdate (m, &p, 1); - } - - key->keytype = enctype; - ret = krb5_data_alloc (&key->keyvalue, 16); - if (ret) { - krb5_set_error_message (context, ENOMEM, N_("malloc: out of memory", "")); - goto out; - } - EVP_DigestFinal_ex (m, key->keyvalue.data, NULL); - - out: - EVP_MD_CTX_destroy(m); - if (s) - memset (s, 0, len); - free (s); - return ret; -} - -struct salt_type _krb5_arcfour_salt[] = { - { - KRB5_PW_SALT, - "pw-salt", - ARCFOUR_string_to_key - }, - { 0 } -}; diff --git a/kerberosV/src/lib/krb5/salt-des.c b/kerberosV/src/lib/krb5/salt-des.c deleted file mode 100644 index 56b285f72ed..00000000000 --- a/kerberosV/src/lib/krb5/salt-des.c +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -#ifdef HEIM_WEAK_CRYPTO - -#ifdef ENABLE_AFS_STRING_TO_KEY - -/* This defines the Andrew string_to_key function. It accepts a password - * string as input and converts it via a one-way encryption algorithm to a DES - * encryption key. It is compatible with the original Andrew authentication - * service password database. - */ - -/* - * Short passwords, i.e 8 characters or less. - */ -static void -krb5_DES_AFS3_CMU_string_to_key (krb5_data pw, - krb5_data cell, - DES_cblock *key) -{ - char password[8+1]; /* crypt is limited to 8 chars anyway */ - size_t i; - - for(i = 0; i < 8; i++) { - char c = ((i < pw.length) ? ((char*)pw.data)[i] : 0) ^ - ((i < cell.length) ? - tolower(((unsigned char*)cell.data)[i]) : 0); - password[i] = c ? c : 'X'; - } - password[8] = '\0'; - - memcpy(key, crypt(password, "p1") + 2, sizeof(DES_cblock)); - - /* parity is inserted into the LSB so left shift each byte up one - bit. This allows ascii characters with a zero MSB to retain as - much significance as possible. */ - for (i = 0; i < sizeof(DES_cblock); i++) - ((unsigned char*)key)[i] <<= 1; - DES_set_odd_parity (key); -} - -/* - * Long passwords, i.e 9 characters or more. - */ -static void -krb5_DES_AFS3_Transarc_string_to_key (krb5_data pw, - krb5_data cell, - DES_cblock *key) -{ - DES_key_schedule schedule; - DES_cblock temp_key; - DES_cblock ivec; - char password[512]; - size_t passlen; - - memcpy(password, pw.data, min(pw.length, sizeof(password))); - if(pw.length < sizeof(password)) { - int len = min(cell.length, sizeof(password) - pw.length); - size_t i; - - memcpy(password + pw.length, cell.data, len); - for (i = pw.length; i < pw.length + len; ++i) - password[i] = tolower((unsigned char)password[i]); - } - passlen = min(sizeof(password), pw.length + cell.length); - memcpy(&ivec, "kerberos", 8); - memcpy(&temp_key, "kerberos", 8); - DES_set_odd_parity (&temp_key); - DES_set_key_unchecked (&temp_key, &schedule); - DES_cbc_cksum ((void*)password, &ivec, passlen, &schedule, &ivec); - - memcpy(&temp_key, &ivec, 8); - DES_set_odd_parity (&temp_key); - DES_set_key_unchecked (&temp_key, &schedule); - DES_cbc_cksum ((void*)password, key, passlen, &schedule, &ivec); - memset(&schedule, 0, sizeof(schedule)); - memset(&temp_key, 0, sizeof(temp_key)); - memset(&ivec, 0, sizeof(ivec)); - memset(password, 0, sizeof(password)); - - DES_set_odd_parity (key); -} - -static krb5_error_code -DES_AFS3_string_to_key(krb5_context context, - krb5_enctype enctype, - krb5_data password, - krb5_salt salt, - krb5_data opaque, - krb5_keyblock *key) -{ - DES_cblock tmp; - if(password.length > 8) - krb5_DES_AFS3_Transarc_string_to_key(password, salt.saltvalue, &tmp); - else - krb5_DES_AFS3_CMU_string_to_key(password, salt.saltvalue, &tmp); - key->keytype = enctype; - krb5_data_copy(&key->keyvalue, tmp, sizeof(tmp)); - memset(&key, 0, sizeof(key)); - return 0; -} -#endif /* ENABLE_AFS_STRING_TO_KEY */ - -static void -DES_string_to_key_int(unsigned char *data, size_t length, DES_cblock *key) -{ - DES_key_schedule schedule; - size_t i; - int reverse = 0; - unsigned char *p; - - unsigned char swap[] = { 0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe, - 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf }; - memset(key, 0, 8); - - p = (unsigned char*)key; - for (i = 0; i < length; i++) { - unsigned char tmp = data[i]; - if (!reverse) - *p++ ^= (tmp << 1); - else - *--p ^= (swap[tmp & 0xf] << 4) | swap[(tmp & 0xf0) >> 4]; - if((i % 8) == 7) - reverse = !reverse; - } - DES_set_odd_parity(key); - if(DES_is_weak_key(key)) - (*key)[7] ^= 0xF0; - DES_set_key_unchecked(key, &schedule); - DES_cbc_cksum((void*)data, key, length, &schedule, key); - memset(&schedule, 0, sizeof(schedule)); - DES_set_odd_parity(key); - if(DES_is_weak_key(key)) - (*key)[7] ^= 0xF0; -} - -static krb5_error_code -krb5_DES_string_to_key(krb5_context context, - krb5_enctype enctype, - krb5_data password, - krb5_salt salt, - krb5_data opaque, - krb5_keyblock *key) -{ - unsigned char *s; - size_t len; - DES_cblock tmp; - -#ifdef ENABLE_AFS_STRING_TO_KEY - if (opaque.length == 1) { - unsigned long v; - _krb5_get_int(opaque.data, &v, 1); - if (v == 1) - return DES_AFS3_string_to_key(context, enctype, password, - salt, opaque, key); - } -#endif - - len = password.length + salt.saltvalue.length; - s = malloc(len); - if(len > 0 && s == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy(s, password.data, password.length); - memcpy(s + password.length, salt.saltvalue.data, salt.saltvalue.length); - DES_string_to_key_int(s, len, &tmp); - key->keytype = enctype; - krb5_data_copy(&key->keyvalue, tmp, sizeof(tmp)); - memset(&tmp, 0, sizeof(tmp)); - memset(s, 0, len); - free(s); - return 0; -} - -struct salt_type _krb5_des_salt[] = { - { - KRB5_PW_SALT, - "pw-salt", - krb5_DES_string_to_key - }, -#ifdef ENABLE_AFS_STRING_TO_KEY - { - KRB5_AFS3_SALT, - "afs3-salt", - DES_AFS3_string_to_key - }, -#endif - { 0 } -}; -#endif diff --git a/kerberosV/src/lib/krb5/salt-des3.c b/kerberosV/src/lib/krb5/salt-des3.c deleted file mode 100644 index 79140a274f9..00000000000 --- a/kerberosV/src/lib/krb5/salt-des3.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -#ifdef DES3_OLD_ENCTYPE -static krb5_error_code -DES3_string_to_key(krb5_context context, - krb5_enctype enctype, - krb5_data password, - krb5_salt salt, - krb5_data opaque, - krb5_keyblock *key) -{ - char *str; - size_t len; - unsigned char tmp[24]; - DES_cblock keys[3]; - krb5_error_code ret; - - len = password.length + salt.saltvalue.length; - str = malloc(len); - if(len != 0 && str == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy(str, password.data, password.length); - memcpy(str + password.length, salt.saltvalue.data, salt.saltvalue.length); - { - DES_cblock ivec; - DES_key_schedule s[3]; - int i; - - ret = _krb5_n_fold(str, len, tmp, 24); - if (ret) { - memset(str, 0, len); - free(str); - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - return ret; - } - - for(i = 0; i < 3; i++){ - memcpy(keys + i, tmp + i * 8, sizeof(keys[i])); - DES_set_odd_parity(keys + i); - if(DES_is_weak_key(keys + i)) - _krb5_xor(keys + i, (const unsigned char*)"\0\0\0\0\0\0\0\xf0"); - DES_set_key_unchecked(keys + i, &s[i]); - } - memset(&ivec, 0, sizeof(ivec)); - DES_ede3_cbc_encrypt(tmp, - tmp, sizeof(tmp), - &s[0], &s[1], &s[2], &ivec, DES_ENCRYPT); - memset(s, 0, sizeof(s)); - memset(&ivec, 0, sizeof(ivec)); - for(i = 0; i < 3; i++){ - memcpy(keys + i, tmp + i * 8, sizeof(keys[i])); - DES_set_odd_parity(keys + i); - if(DES_is_weak_key(keys + i)) - _krb5_xor(keys + i, (const unsigned char*)"\0\0\0\0\0\0\0\xf0"); - } - memset(tmp, 0, sizeof(tmp)); - } - key->keytype = enctype; - krb5_data_copy(&key->keyvalue, keys, sizeof(keys)); - memset(keys, 0, sizeof(keys)); - memset(str, 0, len); - free(str); - return 0; -} -#endif - -static krb5_error_code -DES3_string_to_key_derived(krb5_context context, - krb5_enctype enctype, - krb5_data password, - krb5_salt salt, - krb5_data opaque, - krb5_keyblock *key) -{ - krb5_error_code ret; - size_t len = password.length + salt.saltvalue.length; - char *s; - - s = malloc(len); - if(len != 0 && s == NULL) { - krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - memcpy(s, password.data, password.length); - memcpy(s + password.length, salt.saltvalue.data, salt.saltvalue.length); - ret = krb5_string_to_key_derived(context, - s, - len, - enctype, - key); - memset(s, 0, len); - free(s); - return ret; -} - - -#ifdef DES3_OLD_ENCTYPE -struct salt_type _krb5_des3_salt[] = { - { - KRB5_PW_SALT, - "pw-salt", - DES3_string_to_key - }, - { 0 } -}; -#endif - -struct salt_type _krb5_des3_salt_derived[] = { - { - KRB5_PW_SALT, - "pw-salt", - DES3_string_to_key_derived - }, - { 0 } -}; diff --git a/kerberosV/src/lib/krb5/salt.c b/kerberosV/src/lib/krb5/salt.c deleted file mode 100644 index 5e4c8a1c857..00000000000 --- a/kerberosV/src/lib/krb5/salt.c +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -/* coverity[+alloc : arg-*3] */ -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_salttype_to_string (krb5_context context, - krb5_enctype etype, - krb5_salttype stype, - char **string) -{ - struct _krb5_encryption_type *e; - struct salt_type *st; - - e = _krb5_find_enctype (etype); - if (e == NULL) { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - "encryption type %d not supported", - etype); - return KRB5_PROG_ETYPE_NOSUPP; - } - for (st = e->keytype->string_to_key; st && st->type; st++) { - if (st->type == stype) { - *string = strdup (st->name); - if (*string == NULL) { - krb5_set_error_message (context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; - } - } - krb5_set_error_message (context, HEIM_ERR_SALTTYPE_NOSUPP, - "salttype %d not supported", stype); - return HEIM_ERR_SALTTYPE_NOSUPP; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_salttype (krb5_context context, - krb5_enctype etype, - const char *string, - krb5_salttype *salttype) -{ - struct _krb5_encryption_type *e; - struct salt_type *st; - - e = _krb5_find_enctype (etype); - if (e == NULL) { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %d not supported", ""), - etype); - return KRB5_PROG_ETYPE_NOSUPP; - } - for (st = e->keytype->string_to_key; st && st->type; st++) { - if (strcasecmp (st->name, string) == 0) { - *salttype = st->type; - return 0; - } - } - krb5_set_error_message(context, HEIM_ERR_SALTTYPE_NOSUPP, - N_("salttype %s not supported", ""), string); - return HEIM_ERR_SALTTYPE_NOSUPP; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_pw_salt(krb5_context context, - krb5_const_principal principal, - krb5_salt *salt) -{ - size_t len; - size_t i; - krb5_error_code ret; - char *p; - - salt->salttype = KRB5_PW_SALT; - len = strlen(principal->realm); - for (i = 0; i < principal->name.name_string.len; ++i) - len += strlen(principal->name.name_string.val[i]); - ret = krb5_data_alloc (&salt->saltvalue, len); - if (ret) - return ret; - p = salt->saltvalue.data; - memcpy (p, principal->realm, strlen(principal->realm)); - p += strlen(principal->realm); - for (i = 0; i < principal->name.name_string.len; ++i) { - memcpy (p, - principal->name.name_string.val[i], - strlen(principal->name.name_string.val[i])); - p += strlen(principal->name.name_string.val[i]); - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_salt(krb5_context context, - krb5_salt salt) -{ - krb5_data_free(&salt.saltvalue); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_data (krb5_context context, - krb5_enctype enctype, - krb5_data password, - krb5_principal principal, - krb5_keyblock *key) -{ - krb5_error_code ret; - krb5_salt salt; - - ret = krb5_get_pw_salt(context, principal, &salt); - if(ret) - return ret; - ret = krb5_string_to_key_data_salt(context, enctype, password, salt, key); - krb5_free_salt(context, salt); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key (krb5_context context, - krb5_enctype enctype, - const char *password, - krb5_principal principal, - krb5_keyblock *key) -{ - krb5_data pw; - pw.data = rk_UNCONST(password); - pw.length = strlen(password); - return krb5_string_to_key_data(context, enctype, pw, principal, key); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_data_salt (krb5_context context, - krb5_enctype enctype, - krb5_data password, - krb5_salt salt, - krb5_keyblock *key) -{ - krb5_data opaque; - krb5_data_zero(&opaque); - return krb5_string_to_key_data_salt_opaque(context, enctype, password, - salt, opaque, key); -} - -/* - * Do a string -> key for encryption type `enctype' operation on - * `password' (with salt `salt' and the enctype specific data string - * `opaque'), returning the resulting key in `key' - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_data_salt_opaque (krb5_context context, - krb5_enctype enctype, - krb5_data password, - krb5_salt salt, - krb5_data opaque, - krb5_keyblock *key) -{ - struct _krb5_encryption_type *et =_krb5_find_enctype(enctype); - struct salt_type *st; - if(et == NULL) { - krb5_set_error_message(context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %d not supported", ""), - enctype); - return KRB5_PROG_ETYPE_NOSUPP; - } - for(st = et->keytype->string_to_key; st && st->type; st++) - if(st->type == salt.salttype) - return (*st->string_to_key)(context, enctype, password, - salt, opaque, key); - krb5_set_error_message(context, HEIM_ERR_SALTTYPE_NOSUPP, - N_("salt type %d not supported", ""), - salt.salttype); - return HEIM_ERR_SALTTYPE_NOSUPP; -} - -/* - * Do a string -> key for encryption type `enctype' operation on the - * string `password' (with salt `salt'), returning the resulting key - * in `key' - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_salt (krb5_context context, - krb5_enctype enctype, - const char *password, - krb5_salt salt, - krb5_keyblock *key) -{ - krb5_data pw; - pw.data = rk_UNCONST(password); - pw.length = strlen(password); - return krb5_string_to_key_data_salt(context, enctype, pw, salt, key); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_salt_opaque (krb5_context context, - krb5_enctype enctype, - const char *password, - krb5_salt salt, - krb5_data opaque, - krb5_keyblock *key) -{ - krb5_data pw; - pw.data = rk_UNCONST(password); - pw.length = strlen(password); - return krb5_string_to_key_data_salt_opaque(context, enctype, - pw, salt, opaque, key); -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_key_derived(krb5_context context, - const void *str, - size_t len, - krb5_enctype etype, - krb5_keyblock *key) -{ - struct _krb5_encryption_type *et = _krb5_find_enctype(etype); - krb5_error_code ret; - struct _krb5_key_data kd; - size_t keylen; - u_char *tmp; - - if(et == NULL) { - krb5_set_error_message (context, KRB5_PROG_ETYPE_NOSUPP, - N_("encryption type %d not supported", ""), - etype); - return KRB5_PROG_ETYPE_NOSUPP; - } - keylen = et->keytype->bits / 8; - - ALLOC(kd.key, 1); - if(kd.key == NULL) { - krb5_set_error_message (context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - ret = krb5_data_alloc(&kd.key->keyvalue, et->keytype->size); - if(ret) { - free(kd.key); - return ret; - } - kd.key->keytype = etype; - tmp = malloc (keylen); - if(tmp == NULL) { - krb5_free_keyblock(context, kd.key); - krb5_set_error_message (context, ENOMEM, N_("malloc: out of memory", "")); - return ENOMEM; - } - ret = _krb5_n_fold(str, len, tmp, keylen); - if (ret) { - free(tmp); - krb5_set_error_message (context, ENOMEM, N_("malloc: out of memory", "")); - return ret; - } - kd.schedule = NULL; - _krb5_DES3_random_to_key(context, kd.key, tmp, keylen); - memset(tmp, 0, keylen); - free(tmp); - ret = _krb5_derive_key(context, - et, - &kd, - "kerberos", /* XXX well known constant */ - strlen("kerberos")); - if (ret) { - _krb5_free_key_data(context, &kd, et); - return ret; - } - ret = krb5_copy_keyblock_contents(context, kd.key, key); - _krb5_free_key_data(context, &kd, et); - return ret; -} diff --git a/kerberosV/src/lib/krb5/scache.c b/kerberosV/src/lib/krb5/scache.c deleted file mode 100644 index 5c422c6a449..00000000000 --- a/kerberosV/src/lib/krb5/scache.c +++ /dev/null @@ -1,1451 +0,0 @@ -/* - * Copyright (c) 2008 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 "krb5_locl.h" - -#ifdef HAVE_SCC - -#include - -typedef struct krb5_scache { - char *name; - char *file; - sqlite3 *db; - - sqlite_uint64 cid; - - sqlite3_stmt *icred; - sqlite3_stmt *dcred; - sqlite3_stmt *iprincipal; - - sqlite3_stmt *icache; - sqlite3_stmt *ucachen; - sqlite3_stmt *ucachep; - sqlite3_stmt *dcache; - sqlite3_stmt *scache; - sqlite3_stmt *scache_name; - sqlite3_stmt *umaster; - -} krb5_scache; - -#define SCACHE(X) ((krb5_scache *)(X)->data.data) - -#define SCACHE_DEF_NAME "Default-cache" -#ifdef KRB5_USE_PATH_TOKENS -#define KRB5_SCACHE_DB "%{TEMP}/krb5scc_%{uid}" -#else -#define KRB5_SCACHE_DB "/tmp/krb5scc_%{uid}" -#endif -#define KRB5_SCACHE_NAME "SCC:" SCACHE_DEF_NAME ":" KRB5_SCACHE_DB - -#define SCACHE_INVALID_CID ((sqlite_uint64)-1) - -/* - * - */ - -#define SQL_CMASTER "" \ - "CREATE TABLE master (" \ - "oid INTEGER PRIMARY KEY," \ - "version INTEGER NOT NULL," \ - "defaultcache TEXT NOT NULL" \ - ")" - -#define SQL_SETUP_MASTER \ - "INSERT INTO master (version,defaultcache) VALUES(2, \"" SCACHE_DEF_NAME "\")" -#define SQL_UMASTER "UPDATE master SET defaultcache=? WHERE version=2" - -#define SQL_CCACHE "" \ - "CREATE TABLE caches (" \ - "oid INTEGER PRIMARY KEY," \ - "principal TEXT," \ - "name TEXT NOT NULL" \ - ")" - -#define SQL_TCACHE "" \ - "CREATE TRIGGER CacheDropCreds AFTER DELETE ON caches " \ - "FOR EACH ROW BEGIN " \ - "DELETE FROM credentials WHERE cid=old.oid;" \ - "END" - -#define SQL_ICACHE "INSERT INTO caches (name) VALUES(?)" -#define SQL_UCACHE_NAME "UPDATE caches SET name=? WHERE OID=?" -#define SQL_UCACHE_PRINCIPAL "UPDATE caches SET principal=? WHERE OID=?" -#define SQL_DCACHE "DELETE FROM caches WHERE OID=?" -#define SQL_SCACHE "SELECT principal,name FROM caches WHERE OID=?" -#define SQL_SCACHE_NAME "SELECT oid FROM caches WHERE NAME=?" - -#define SQL_CCREDS "" \ - "CREATE TABLE credentials (" \ - "oid INTEGER PRIMARY KEY," \ - "cid INTEGER NOT NULL," \ - "kvno INTEGER NOT NULL," \ - "etype INTEGER NOT NULL," \ - "created_at INTEGER NOT NULL," \ - "cred BLOB NOT NULL" \ - ")" - -#define SQL_TCRED "" \ - "CREATE TRIGGER credDropPrincipal AFTER DELETE ON credentials " \ - "FOR EACH ROW BEGIN " \ - "DELETE FROM principals WHERE credential_id=old.oid;" \ - "END" - -#define SQL_ICRED "INSERT INTO credentials (cid, kvno, etype, cred, created_at) VALUES (?,?,?,?,?)" -#define SQL_DCRED "DELETE FROM credentials WHERE cid=?" - -#define SQL_CPRINCIPALS "" \ - "CREATE TABLE principals (" \ - "oid INTEGER PRIMARY KEY," \ - "principal TEXT NOT NULL," \ - "type INTEGER NOT NULL," \ - "credential_id INTEGER NOT NULL" \ - ")" - -#define SQL_IPRINCIPAL "INSERT INTO principals (principal, type, credential_id) VALUES (?,?,?)" - -/* - * sqlite destructors - */ - -static void -free_data(void *data) -{ - free(data); -} - -static void -free_krb5(void *str) -{ - krb5_xfree(str); -} - -static void -scc_free(krb5_scache *s) -{ - if (s->file) - free(s->file); - if (s->name) - free(s->name); - - if (s->icred) - sqlite3_finalize(s->icred); - if (s->dcred) - sqlite3_finalize(s->dcred); - if (s->iprincipal) - sqlite3_finalize(s->iprincipal); - if (s->icache) - sqlite3_finalize(s->icache); - if (s->ucachen) - sqlite3_finalize(s->ucachen); - if (s->ucachep) - sqlite3_finalize(s->ucachep); - if (s->dcache) - sqlite3_finalize(s->dcache); - if (s->scache) - sqlite3_finalize(s->scache); - if (s->scache_name) - sqlite3_finalize(s->scache_name); - if (s->umaster) - sqlite3_finalize(s->umaster); - - if (s->db) - sqlite3_close(s->db); - free(s); -} - -#ifdef TRACEME -static void -trace(void* ptr, const char * str) -{ - printf("SQL: %s\n", str); -} -#endif - -static krb5_error_code -prepare_stmt(krb5_context context, sqlite3 *db, - sqlite3_stmt **stmt, const char *str) -{ - int ret; - - ret = sqlite3_prepare_v2(db, str, -1, stmt, NULL); - if (ret != SQLITE_OK) { - krb5_set_error_message(context, ENOENT, - N_("Failed to prepare stmt %s: %s", ""), - str, sqlite3_errmsg(db)); - return ENOENT; - } - return 0; -} - -static krb5_error_code -exec_stmt(krb5_context context, sqlite3 *db, const char *str, - krb5_error_code code) -{ - int ret; - - ret = sqlite3_exec(db, str, NULL, NULL, NULL); - if (ret != SQLITE_OK && code) { - krb5_set_error_message(context, code, - N_("scache execute %s: %s", ""), str, - sqlite3_errmsg(db)); - return code; - } - return 0; -} - -static krb5_error_code -default_db(krb5_context context, sqlite3 **db) -{ - char *name; - int ret; - - ret = _krb5_expand_default_cc_name(context, KRB5_SCACHE_DB, &name); - if (ret) - return ret; - - ret = sqlite3_open_v2(name, db, SQLITE_OPEN_READWRITE, NULL); - free(name); - if (ret != SQLITE_OK) { - krb5_clear_error_message(context); - return ENOENT; - } - -#ifdef TRACEME - sqlite3_trace(*db, trace, NULL); -#endif - - return 0; -} - -static krb5_error_code -get_def_name(krb5_context context, char **str) -{ - krb5_error_code ret; - sqlite3_stmt *stmt; - const char *name; - sqlite3 *db; - - ret = default_db(context, &db); - if (ret) - return ret; - - ret = prepare_stmt(context, db, &stmt, "SELECT defaultcache FROM master"); - if (ret) { - sqlite3_close(db); - return ret; - } - - ret = sqlite3_step(stmt); - if (ret != SQLITE_ROW) - goto out; - - if (sqlite3_column_type(stmt, 0) != SQLITE_TEXT) - goto out; - - name = (const char *)sqlite3_column_text(stmt, 0); - if (name == NULL) - goto out; - - *str = strdup(name); - if (*str == NULL) - goto out; - - sqlite3_finalize(stmt); - sqlite3_close(db); - return 0; -out: - sqlite3_finalize(stmt); - sqlite3_close(db); - krb5_clear_error_message(context); - return ENOENT; -} - - - -static krb5_scache * KRB5_CALLCONV -scc_alloc(krb5_context context, const char *name) -{ - krb5_error_code ret; - krb5_scache *s; - - ALLOC(s, 1); - if(s == NULL) - return NULL; - - s->cid = SCACHE_INVALID_CID; - - if (name) { - char *file; - - if (*name == '\0') { - krb5_error_code ret; - ret = get_def_name(context, &s->name); - if (ret) - s->name = strdup(SCACHE_DEF_NAME); - } else - s->name = strdup(name); - - file = strrchr(s->name, ':'); - if (file) { - *file++ = '\0'; - s->file = strdup(file); - ret = 0; - } else { - ret = _krb5_expand_default_cc_name(context, KRB5_SCACHE_DB, &s->file); - } - } else { - _krb5_expand_default_cc_name(context, KRB5_SCACHE_DB, &s->file); - ret = asprintf(&s->name, "unique-%p", s); - } - if (ret < 0 || s->file == NULL || s->name == NULL) { - scc_free(s); - return NULL; - } - - return s; -} - -static krb5_error_code -open_database(krb5_context context, krb5_scache *s, int flags) -{ - int ret; - - ret = sqlite3_open_v2(s->file, &s->db, SQLITE_OPEN_READWRITE|flags, NULL); - if (ret) { - if (s->db) { - krb5_set_error_message(context, ENOENT, - N_("Error opening scache file %s: %s", ""), - s->file, sqlite3_errmsg(s->db)); - sqlite3_close(s->db); - s->db = NULL; - } else - krb5_set_error_message(context, ENOENT, - N_("malloc: out of memory", "")); - return ENOENT; - } - return 0; -} - -static krb5_error_code -create_cache(krb5_context context, krb5_scache *s) -{ - int ret; - - sqlite3_bind_text(s->icache, 1, s->name, -1, NULL); - do { - ret = sqlite3_step(s->icache); - } while (ret == SQLITE_ROW); - if (ret != SQLITE_DONE) { - krb5_set_error_message(context, KRB5_CC_IO, - N_("Failed to add scache: %d", ""), ret); - return KRB5_CC_IO; - } - sqlite3_reset(s->icache); - - s->cid = sqlite3_last_insert_rowid(s->db); - - return 0; -} - -static krb5_error_code -make_database(krb5_context context, krb5_scache *s) -{ - int created_file = 0; - int ret; - - if (s->db) - return 0; - - ret = open_database(context, s, 0); - if (ret) { - mode_t oldumask = umask(077); - ret = open_database(context, s, SQLITE_OPEN_CREATE); - umask(oldumask); - if (ret) goto out; - - created_file = 1; - - ret = exec_stmt(context, s->db, SQL_CMASTER, KRB5_CC_IO); - if (ret) goto out; - ret = exec_stmt(context, s->db, SQL_CCACHE, KRB5_CC_IO); - if (ret) goto out; - ret = exec_stmt(context, s->db, SQL_CCREDS, KRB5_CC_IO); - if (ret) goto out; - ret = exec_stmt(context, s->db, SQL_CPRINCIPALS, KRB5_CC_IO); - if (ret) goto out; - ret = exec_stmt(context, s->db, SQL_SETUP_MASTER, KRB5_CC_IO); - if (ret) goto out; - - ret = exec_stmt(context, s->db, SQL_TCACHE, KRB5_CC_IO); - if (ret) goto out; - ret = exec_stmt(context, s->db, SQL_TCRED, KRB5_CC_IO); - if (ret) goto out; - } - -#ifdef TRACEME - sqlite3_trace(s->db, trace, NULL); -#endif - - ret = prepare_stmt(context, s->db, &s->icred, SQL_ICRED); - if (ret) goto out; - ret = prepare_stmt(context, s->db, &s->dcred, SQL_DCRED); - if (ret) goto out; - ret = prepare_stmt(context, s->db, &s->iprincipal, SQL_IPRINCIPAL); - if (ret) goto out; - ret = prepare_stmt(context, s->db, &s->icache, SQL_ICACHE); - if (ret) goto out; - ret = prepare_stmt(context, s->db, &s->ucachen, SQL_UCACHE_NAME); - if (ret) goto out; - ret = prepare_stmt(context, s->db, &s->ucachep, SQL_UCACHE_PRINCIPAL); - if (ret) goto out; - ret = prepare_stmt(context, s->db, &s->dcache, SQL_DCACHE); - if (ret) goto out; - ret = prepare_stmt(context, s->db, &s->scache, SQL_SCACHE); - if (ret) goto out; - ret = prepare_stmt(context, s->db, &s->scache_name, SQL_SCACHE_NAME); - if (ret) goto out; - ret = prepare_stmt(context, s->db, &s->umaster, SQL_UMASTER); - if (ret) goto out; - - return 0; - -out: - if (s->db) - sqlite3_close(s->db); - if (created_file) - unlink(s->file); - - return ret; -} - -static krb5_error_code -bind_principal(krb5_context context, - sqlite3 *db, - sqlite3_stmt *stmt, - int col, - krb5_const_principal principal) -{ - krb5_error_code ret; - char *str; - - ret = krb5_unparse_name(context, principal, &str); - if (ret) - return ret; - - ret = sqlite3_bind_text(stmt, col, str, -1, free_krb5); - if (ret != SQLITE_OK) { - krb5_xfree(str); - krb5_set_error_message(context, ENOMEM, - N_("scache bind principal: %s", ""), - sqlite3_errmsg(db)); - return ENOMEM; - } - return 0; -} - -/* - * - */ - -static const char* KRB5_CALLCONV -scc_get_name(krb5_context context, - krb5_ccache id) -{ - return SCACHE(id)->name; -} - -static krb5_error_code KRB5_CALLCONV -scc_resolve(krb5_context context, krb5_ccache *id, const char *res) -{ - krb5_scache *s; - int ret; - - s = scc_alloc(context, res); - if (s == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - - ret = make_database(context, s); - if (ret) { - scc_free(s); - return ret; - } - - ret = sqlite3_bind_text(s->scache_name, 1, s->name, -1, NULL); - if (ret != SQLITE_OK) { - krb5_set_error_message(context, ENOMEM, - "bind name: %s", sqlite3_errmsg(s->db)); - scc_free(s); - return ENOMEM; - } - - if (sqlite3_step(s->scache_name) == SQLITE_ROW) { - - if (sqlite3_column_type(s->scache_name, 0) != SQLITE_INTEGER) { - sqlite3_reset(s->scache_name); - krb5_set_error_message(context, KRB5_CC_END, - N_("Cache name of wrong type " - "for scache %s", ""), - s->name); - scc_free(s); - return KRB5_CC_END; - } - - s->cid = sqlite3_column_int(s->scache_name, 0); - } else { - s->cid = SCACHE_INVALID_CID; - } - sqlite3_reset(s->scache_name); - - (*id)->data.data = s; - (*id)->data.length = sizeof(*s); - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -scc_gen_new(krb5_context context, krb5_ccache *id) -{ - krb5_scache *s; - - s = scc_alloc(context, NULL); - - if (s == NULL) { - krb5_set_error_message(context, KRB5_CC_NOMEM, - N_("malloc: out of memory", "")); - return KRB5_CC_NOMEM; - } - - (*id)->data.data = s; - (*id)->data.length = sizeof(*s); - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -scc_initialize(krb5_context context, - krb5_ccache id, - krb5_principal primary_principal) -{ - krb5_scache *s = SCACHE(id); - krb5_error_code ret; - - ret = make_database(context, s); - if (ret) - return ret; - - ret = exec_stmt(context, s->db, "BEGIN IMMEDIATE TRANSACTION", KRB5_CC_IO); - if (ret) return ret; - - if (s->cid == SCACHE_INVALID_CID) { - ret = create_cache(context, s); - if (ret) - goto rollback; - } else { - sqlite3_bind_int(s->dcred, 1, s->cid); - do { - ret = sqlite3_step(s->dcred); - } while (ret == SQLITE_ROW); - sqlite3_reset(s->dcred); - if (ret != SQLITE_DONE) { - ret = KRB5_CC_IO; - krb5_set_error_message(context, ret, - N_("Failed to delete old " - "credentials: %s", ""), - sqlite3_errmsg(s->db)); - goto rollback; - } - } - - ret = bind_principal(context, s->db, s->ucachep, 1, primary_principal); - if (ret) - goto rollback; - sqlite3_bind_int(s->ucachep, 2, s->cid); - - do { - ret = sqlite3_step(s->ucachep); - } while (ret == SQLITE_ROW); - sqlite3_reset(s->ucachep); - if (ret != SQLITE_DONE) { - ret = KRB5_CC_IO; - krb5_set_error_message(context, ret, - N_("Failed to bind principal to cache %s", ""), - sqlite3_errmsg(s->db)); - goto rollback; - } - - ret = exec_stmt(context, s->db, "COMMIT", KRB5_CC_IO); - if (ret) return ret; - - return 0; - -rollback: - exec_stmt(context, s->db, "ROLLBACK", 0); - - return ret; - -} - -static krb5_error_code KRB5_CALLCONV -scc_close(krb5_context context, - krb5_ccache id) -{ - scc_free(SCACHE(id)); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -scc_destroy(krb5_context context, - krb5_ccache id) -{ - krb5_scache *s = SCACHE(id); - int ret; - - if (s->cid == SCACHE_INVALID_CID) - return 0; - - sqlite3_bind_int(s->dcache, 1, s->cid); - do { - ret = sqlite3_step(s->dcache); - } while (ret == SQLITE_ROW); - sqlite3_reset(s->dcache); - if (ret != SQLITE_DONE) { - krb5_set_error_message(context, KRB5_CC_IO, - N_("Failed to destroy cache %s: %s", ""), - s->name, sqlite3_errmsg(s->db)); - return KRB5_CC_IO; - } - return 0; -} - -static krb5_error_code -encode_creds(krb5_context context, krb5_creds *creds, krb5_data *data) -{ - krb5_error_code ret; - krb5_storage *sp; - - sp = krb5_storage_emem(); - if (sp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = krb5_store_creds(sp, creds); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to store credential in scache", "")); - krb5_storage_free(sp); - return ret; - } - - ret = krb5_storage_to_data(sp, data); - krb5_storage_free(sp); - if (ret) - krb5_set_error_message(context, ret, - N_("Failed to encode credential in scache", "")); - return ret; -} - -static krb5_error_code -decode_creds(krb5_context context, const void *data, size_t length, - krb5_creds *creds) -{ - krb5_error_code ret; - krb5_storage *sp; - - sp = krb5_storage_from_readonly_mem(data, length); - if (sp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = krb5_ret_creds(sp, creds); - krb5_storage_free(sp); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to read credential in scache", "")); - return ret; - } - return 0; -} - - -static krb5_error_code KRB5_CALLCONV -scc_store_cred(krb5_context context, - krb5_ccache id, - krb5_creds *creds) -{ - sqlite_uint64 credid; - krb5_scache *s = SCACHE(id); - krb5_error_code ret; - krb5_data data; - - ret = make_database(context, s); - if (ret) - return ret; - - ret = encode_creds(context, creds, &data); - if (ret) - return ret; - - sqlite3_bind_int(s->icred, 1, s->cid); - { - krb5_enctype etype = 0; - int kvno = 0; - Ticket t; - size_t len; - - ret = decode_Ticket(creds->ticket.data, - creds->ticket.length, &t, &len); - if (ret == 0) { - if(t.enc_part.kvno) - kvno = *t.enc_part.kvno; - - etype = t.enc_part.etype; - - free_Ticket(&t); - } - - sqlite3_bind_int(s->icred, 2, kvno); - sqlite3_bind_int(s->icred, 3, etype); - - } - - sqlite3_bind_blob(s->icred, 4, data.data, data.length, free_data); - sqlite3_bind_int(s->icred, 5, time(NULL)); - - ret = exec_stmt(context, s->db, "BEGIN IMMEDIATE TRANSACTION", KRB5_CC_IO); - if (ret) return ret; - - do { - ret = sqlite3_step(s->icred); - } while (ret == SQLITE_ROW); - sqlite3_reset(s->icred); - if (ret != SQLITE_DONE) { - ret = KRB5_CC_IO; - krb5_set_error_message(context, ret, - N_("Failed to add credential: %s", ""), - sqlite3_errmsg(s->db)); - goto rollback; - } - - credid = sqlite3_last_insert_rowid(s->db); - - { - bind_principal(context, s->db, s->iprincipal, 1, creds->server); - sqlite3_bind_int(s->iprincipal, 2, 1); - sqlite3_bind_int(s->iprincipal, 3, credid); - - do { - ret = sqlite3_step(s->iprincipal); - } while (ret == SQLITE_ROW); - sqlite3_reset(s->iprincipal); - if (ret != SQLITE_DONE) { - ret = KRB5_CC_IO; - krb5_set_error_message(context, ret, - N_("Failed to add principal: %s", ""), - sqlite3_errmsg(s->db)); - goto rollback; - } - } - - { - bind_principal(context, s->db, s->iprincipal, 1, creds->client); - sqlite3_bind_int(s->iprincipal, 2, 0); - sqlite3_bind_int(s->iprincipal, 3, credid); - - do { - ret = sqlite3_step(s->iprincipal); - } while (ret == SQLITE_ROW); - sqlite3_reset(s->iprincipal); - if (ret != SQLITE_DONE) { - ret = KRB5_CC_IO; - krb5_set_error_message(context, ret, - N_("Failed to add principal: %s", ""), - sqlite3_errmsg(s->db)); - goto rollback; - } - } - - ret = exec_stmt(context, s->db, "COMMIT", KRB5_CC_IO); - if (ret) return ret; - - return 0; - -rollback: - exec_stmt(context, s->db, "ROLLBACK", 0); - - return ret; -} - -static krb5_error_code KRB5_CALLCONV -scc_get_principal(krb5_context context, - krb5_ccache id, - krb5_principal *principal) -{ - krb5_scache *s = SCACHE(id); - krb5_error_code ret; - const char *str; - - *principal = NULL; - - ret = make_database(context, s); - if (ret) - return ret; - - sqlite3_bind_int(s->scache, 1, s->cid); - - if (sqlite3_step(s->scache) != SQLITE_ROW) { - sqlite3_reset(s->scache); - krb5_set_error_message(context, KRB5_CC_END, - N_("No principal for cache SCC:%s:%s", ""), - s->name, s->file); - return KRB5_CC_END; - } - - if (sqlite3_column_type(s->scache, 0) != SQLITE_TEXT) { - sqlite3_reset(s->scache); - krb5_set_error_message(context, KRB5_CC_END, - N_("Principal data of wrong type " - "for SCC:%s:%s", ""), - s->name, s->file); - return KRB5_CC_END; - } - - str = (const char *)sqlite3_column_text(s->scache, 0); - if (str == NULL) { - sqlite3_reset(s->scache); - krb5_set_error_message(context, KRB5_CC_END, - N_("Principal not set for SCC:%s:%s", ""), - s->name, s->file); - return KRB5_CC_END; - } - - ret = krb5_parse_name(context, str, principal); - - sqlite3_reset(s->scache); - - return ret; -} - -struct cred_ctx { - char *drop; - sqlite3_stmt *stmt; - sqlite3_stmt *credstmt; -}; - -static krb5_error_code KRB5_CALLCONV -scc_get_first (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor) -{ - krb5_scache *s = SCACHE(id); - krb5_error_code ret; - struct cred_ctx *ctx; - char *str = NULL, *name = NULL; - - *cursor = NULL; - - ctx = calloc(1, sizeof(*ctx)); - if (ctx == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = make_database(context, s); - if (ret) { - free(ctx); - return ret; - } - - if (s->cid == SCACHE_INVALID_CID) { - krb5_set_error_message(context, KRB5_CC_END, - N_("Iterating a invalid scache %s", ""), - s->name); - free(ctx); - return KRB5_CC_END; - } - - ret = asprintf(&name, "credIteration%pPid%d", - ctx, (int)getpid()); - if (ret < 0 || name == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - free(ctx); - return ENOMEM; - } - - ret = asprintf(&ctx->drop, "DROP TABLE %s", name); - if (ret < 0 || ctx->drop == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - free(name); - free(ctx); - return ENOMEM; - } - - ret = asprintf(&str, "CREATE TEMPORARY TABLE %s " - "AS SELECT oid,created_at FROM credentials WHERE cid = %lu", - name, (unsigned long)s->cid); - if (ret < 0 || str == NULL) { - free(ctx->drop); - free(name); - free(ctx); - return ENOMEM; - } - - ret = exec_stmt(context, s->db, str, KRB5_CC_IO); - free(str); - str = NULL; - if (ret) { - free(ctx->drop); - free(name); - free(ctx); - return ret; - } - - ret = asprintf(&str, "SELECT oid FROM %s ORDER BY created_at", name); - if (ret < 0 || str == NULL) { - exec_stmt(context, s->db, ctx->drop, 0); - free(ctx->drop); - free(name); - free(ctx); - return ret; - } - - ret = prepare_stmt(context, s->db, &ctx->stmt, str); - free(str); - str = NULL; - free(name); - if (ret) { - exec_stmt(context, s->db, ctx->drop, 0); - free(ctx->drop); - free(ctx); - return ret; - } - - ret = prepare_stmt(context, s->db, &ctx->credstmt, - "SELECT cred FROM credentials WHERE oid = ?"); - if (ret) { - sqlite3_finalize(ctx->stmt); - exec_stmt(context, s->db, ctx->drop, 0); - free(ctx->drop); - free(ctx); - return ret; - } - - *cursor = ctx; - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -scc_get_next (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor, - krb5_creds *creds) -{ - struct cred_ctx *ctx = *cursor; - krb5_scache *s = SCACHE(id); - krb5_error_code ret; - sqlite_uint64 oid; - const void *data = NULL; - size_t len = 0; - -next: - ret = sqlite3_step(ctx->stmt); - if (ret == SQLITE_DONE) { - krb5_clear_error_message(context); - return KRB5_CC_END; - } else if (ret != SQLITE_ROW) { - krb5_set_error_message(context, KRB5_CC_IO, - N_("scache Database failed: %s", ""), - sqlite3_errmsg(s->db)); - return KRB5_CC_IO; - } - - oid = sqlite3_column_int64(ctx->stmt, 0); - - /* read cred from credentials table */ - - sqlite3_bind_int(ctx->credstmt, 1, oid); - - ret = sqlite3_step(ctx->credstmt); - if (ret != SQLITE_ROW) { - sqlite3_reset(ctx->credstmt); - goto next; - } - - if (sqlite3_column_type(ctx->credstmt, 0) != SQLITE_BLOB) { - krb5_set_error_message(context, KRB5_CC_END, - N_("credential of wrong type for SCC:%s:%s", ""), - s->name, s->file); - sqlite3_reset(ctx->credstmt); - return KRB5_CC_END; - } - - data = sqlite3_column_blob(ctx->credstmt, 0); - len = sqlite3_column_bytes(ctx->credstmt, 0); - - ret = decode_creds(context, data, len, creds); - sqlite3_reset(ctx->credstmt); - return ret; -} - -static krb5_error_code KRB5_CALLCONV -scc_end_get (krb5_context context, - krb5_ccache id, - krb5_cc_cursor *cursor) -{ - struct cred_ctx *ctx = *cursor; - krb5_scache *s = SCACHE(id); - - sqlite3_finalize(ctx->stmt); - sqlite3_finalize(ctx->credstmt); - - exec_stmt(context, s->db, ctx->drop, 0); - - free(ctx->drop); - free(ctx); - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -scc_remove_cred(krb5_context context, - krb5_ccache id, - krb5_flags which, - krb5_creds *mcreds) -{ - krb5_scache *s = SCACHE(id); - krb5_error_code ret; - sqlite3_stmt *stmt; - sqlite_uint64 credid = 0; - const void *data = NULL; - size_t len = 0; - - ret = make_database(context, s); - if (ret) - return ret; - - ret = prepare_stmt(context, s->db, &stmt, - "SELECT cred,oid FROM credentials " - "WHERE cid = ?"); - if (ret) - return ret; - - sqlite3_bind_int(stmt, 1, s->cid); - - /* find credential... */ - while (1) { - krb5_creds creds; - - ret = sqlite3_step(stmt); - if (ret == SQLITE_DONE) { - ret = 0; - break; - } else if (ret != SQLITE_ROW) { - ret = KRB5_CC_IO; - krb5_set_error_message(context, ret, - N_("scache Database failed: %s", ""), - sqlite3_errmsg(s->db)); - break; - } - - if (sqlite3_column_type(stmt, 0) != SQLITE_BLOB) { - ret = KRB5_CC_END; - krb5_set_error_message(context, ret, - N_("Credential of wrong type " - "for SCC:%s:%s", ""), - s->name, s->file); - break; - } - - data = sqlite3_column_blob(stmt, 0); - len = sqlite3_column_bytes(stmt, 0); - - ret = decode_creds(context, data, len, &creds); - if (ret) - break; - - ret = krb5_compare_creds(context, which, mcreds, &creds); - krb5_free_cred_contents(context, &creds); - if (ret) { - credid = sqlite3_column_int64(stmt, 1); - ret = 0; - break; - } - } - - sqlite3_finalize(stmt); - - if (id) { - ret = prepare_stmt(context, s->db, &stmt, - "DELETE FROM credentials WHERE oid=?"); - if (ret) - return ret; - sqlite3_bind_int(stmt, 1, credid); - - do { - ret = sqlite3_step(stmt); - } while (ret == SQLITE_ROW); - sqlite3_finalize(stmt); - if (ret != SQLITE_DONE) { - ret = KRB5_CC_IO; - krb5_set_error_message(context, ret, - N_("failed to delete scache credental", "")); - } else - ret = 0; - } - - return ret; -} - -static krb5_error_code KRB5_CALLCONV -scc_set_flags(krb5_context context, - krb5_ccache id, - krb5_flags flags) -{ - return 0; /* XXX */ -} - -struct cache_iter { - char *drop; - sqlite3 *db; - sqlite3_stmt *stmt; -}; - -static krb5_error_code KRB5_CALLCONV -scc_get_cache_first(krb5_context context, krb5_cc_cursor *cursor) -{ - struct cache_iter *ctx; - krb5_error_code ret; - char *name = NULL, *str = NULL; - - *cursor = NULL; - - ctx = calloc(1, sizeof(*ctx)); - if (ctx == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - ret = default_db(context, &ctx->db); - if (ctx->db == NULL) { - free(ctx); - return ret; - } - - ret = asprintf(&name, "cacheIteration%pPid%d", - ctx, (int)getpid()); - if (ret < 0 || name == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - sqlite3_close(ctx->db); - free(ctx); - return ENOMEM; - } - - ret = asprintf(&ctx->drop, "DROP TABLE %s", name); - if (ret < 0 || ctx->drop == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - sqlite3_close(ctx->db); - free(name); - free(ctx); - return ENOMEM; - } - - ret = asprintf(&str, "CREATE TEMPORARY TABLE %s AS SELECT name FROM caches", - name); - if (ret < 0 || str == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - sqlite3_close(ctx->db); - free(name); - free(ctx->drop); - free(ctx); - return ENOMEM; - } - - ret = exec_stmt(context, ctx->db, str, KRB5_CC_IO); - free(str); - str = NULL; - if (ret) { - sqlite3_close(ctx->db); - free(name); - free(ctx->drop); - free(ctx); - return ret; - } - - ret = asprintf(&str, "SELECT name FROM %s", name); - free(name); - if (ret < 0 || str == NULL) { - exec_stmt(context, ctx->db, ctx->drop, 0); - sqlite3_close(ctx->db); - free(name); - free(ctx->drop); - free(ctx); - return ENOMEM; - } - - ret = prepare_stmt(context, ctx->db, &ctx->stmt, str); - free(str); - if (ret) { - exec_stmt(context, ctx->db, ctx->drop, 0); - sqlite3_close(ctx->db); - free(ctx->drop); - free(ctx); - return ret; - } - - *cursor = ctx; - - return 0; -} - -static krb5_error_code KRB5_CALLCONV -scc_get_cache_next(krb5_context context, - krb5_cc_cursor cursor, - krb5_ccache *id) -{ - struct cache_iter *ctx = cursor; - krb5_error_code ret; - const char *name; - -again: - ret = sqlite3_step(ctx->stmt); - if (ret == SQLITE_DONE) { - krb5_clear_error_message(context); - return KRB5_CC_END; - } else if (ret != SQLITE_ROW) { - krb5_set_error_message(context, KRB5_CC_IO, - N_("Database failed: %s", ""), - sqlite3_errmsg(ctx->db)); - return KRB5_CC_IO; - } - - if (sqlite3_column_type(ctx->stmt, 0) != SQLITE_TEXT) - goto again; - - name = (const char *)sqlite3_column_text(ctx->stmt, 0); - if (name == NULL) - goto again; - - ret = _krb5_cc_allocate(context, &krb5_scc_ops, id); - if (ret) - return ret; - - return scc_resolve(context, id, name); -} - -static krb5_error_code KRB5_CALLCONV -scc_end_cache_get(krb5_context context, krb5_cc_cursor cursor) -{ - struct cache_iter *ctx = cursor; - - exec_stmt(context, ctx->db, ctx->drop, 0); - sqlite3_finalize(ctx->stmt); - sqlite3_close(ctx->db); - free(ctx->drop); - free(ctx); - return 0; -} - -static krb5_error_code KRB5_CALLCONV -scc_move(krb5_context context, krb5_ccache from, krb5_ccache to) -{ - krb5_scache *sfrom = SCACHE(from); - krb5_scache *sto = SCACHE(to); - krb5_error_code ret; - - if (strcmp(sfrom->file, sto->file) != 0) { - krb5_set_error_message(context, KRB5_CC_BADNAME, - N_("Can't handle cross database " - "credential move: %s -> %s", ""), - sfrom->file, sto->file); - return KRB5_CC_BADNAME; - } - - ret = make_database(context, sfrom); - if (ret) - return ret; - - ret = exec_stmt(context, sfrom->db, - "BEGIN IMMEDIATE TRANSACTION", KRB5_CC_IO); - if (ret) return ret; - - if (sto->cid != SCACHE_INVALID_CID) { - /* drop old cache entry */ - - sqlite3_bind_int(sfrom->dcache, 1, sto->cid); - do { - ret = sqlite3_step(sfrom->dcache); - } while (ret == SQLITE_ROW); - sqlite3_reset(sfrom->dcache); - if (ret != SQLITE_DONE) { - krb5_set_error_message(context, KRB5_CC_IO, - N_("Failed to delete old cache: %d", ""), - (int)ret); - goto rollback; - } - } - - sqlite3_bind_text(sfrom->ucachen, 1, sto->name, -1, NULL); - sqlite3_bind_int(sfrom->ucachen, 2, sfrom->cid); - - do { - ret = sqlite3_step(sfrom->ucachen); - } while (ret == SQLITE_ROW); - sqlite3_reset(sfrom->ucachen); - if (ret != SQLITE_DONE) { - krb5_set_error_message(context, KRB5_CC_IO, - N_("Failed to update new cache: %d", ""), - (int)ret); - goto rollback; - } - - sto->cid = sfrom->cid; - - ret = exec_stmt(context, sfrom->db, "COMMIT", KRB5_CC_IO); - if (ret) return ret; - - scc_free(sfrom); - - return 0; - -rollback: - exec_stmt(context, sfrom->db, "ROLLBACK", 0); - scc_free(sfrom); - - return KRB5_CC_IO; -} - -static krb5_error_code KRB5_CALLCONV -scc_get_default_name(krb5_context context, char **str) -{ - krb5_error_code ret; - char *name; - - *str = NULL; - - ret = get_def_name(context, &name); - if (ret) - return _krb5_expand_default_cc_name(context, KRB5_SCACHE_NAME, str); - - ret = asprintf(str, "SCC:%s", name); - free(name); - if (ret < 0 || *str == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -static krb5_error_code KRB5_CALLCONV -scc_set_default(krb5_context context, krb5_ccache id) -{ - krb5_scache *s = SCACHE(id); - krb5_error_code ret; - - if (s->cid == SCACHE_INVALID_CID) { - krb5_set_error_message(context, KRB5_CC_IO, - N_("Trying to set a invalid cache " - "as default %s", ""), - s->name); - return KRB5_CC_IO; - } - - ret = sqlite3_bind_text(s->umaster, 1, s->name, -1, NULL); - if (ret) { - sqlite3_reset(s->umaster); - krb5_set_error_message(context, KRB5_CC_IO, - N_("Failed to set name of default cache", "")); - return KRB5_CC_IO; - } - - do { - ret = sqlite3_step(s->umaster); - } while (ret == SQLITE_ROW); - sqlite3_reset(s->umaster); - if (ret != SQLITE_DONE) { - krb5_set_error_message(context, KRB5_CC_IO, - N_("Failed to update default cache", "")); - return KRB5_CC_IO; - } - - return 0; -} - -/** - * Variable containing the SCC based credential cache implemention. - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_VARIABLE const krb5_cc_ops krb5_scc_ops = { - KRB5_CC_OPS_VERSION, - "SCC", - scc_get_name, - scc_resolve, - scc_gen_new, - scc_initialize, - scc_destroy, - scc_close, - scc_store_cred, - NULL, /* scc_retrieve */ - scc_get_principal, - scc_get_first, - scc_get_next, - scc_end_get, - scc_remove_cred, - scc_set_flags, - NULL, - scc_get_cache_first, - scc_get_cache_next, - scc_end_cache_get, - scc_move, - scc_get_default_name, - scc_set_default -}; - -#endif diff --git a/kerberosV/src/lib/krb5/send_to_kdc.c b/kerberosV/src/lib/krb5/send_to_kdc.c deleted file mode 100644 index a68084bf55a..00000000000 --- a/kerberosV/src/lib/krb5/send_to_kdc.c +++ /dev/null @@ -1,732 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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 "krb5_locl.h" -#include "send_to_kdc_plugin.h" - -struct send_to_kdc { - krb5_send_to_kdc_func func; - void *data; -}; - -/* - * connect to a remote host and in the case of stream sockets, provide - * a timeout for the connexion. - */ - -static int -timed_connect(int s, struct addrinfo *addr, time_t tmout) -{ -#ifdef HAVE_POLL - socklen_t sl; - int err; - int flags; - int ret; - - if (addr->ai_socktype != SOCK_STREAM) - return connect(s, addr->ai_addr, addr->ai_addrlen); - - flags = fcntl(s, F_GETFL); - if (flags == -1) - return -1; - - fcntl(s, F_SETFL, flags | O_NONBLOCK); - ret = connect(s, addr->ai_addr, addr->ai_addrlen); - if (ret == -1 && errno != EINPROGRESS) - return -1; - - for (;;) { - struct pollfd fds; - - fds.fd = s; - fds.events = POLLIN | POLLOUT; - fds.revents = 0; - - ret = poll(&fds, 1, tmout * 1000); - if (ret != -1 || errno != EINTR) - break; - } - fcntl(s, F_SETFL, flags); - - if (ret != 1) - return -1; - - sl = sizeof(err); - ret = getsockopt(s, SOL_SOCKET, SO_ERROR, &err, &sl); - if (ret == -1) - return -1; - if (err != 0) - return -1; - - return 0; -#else - return connect(s, addr->ai_addr, addr->ai_addrlen); -#endif -} - -/* - * send the data in `req' on the socket `fd' (which is datagram iff udp) - * waiting `tmout' for a reply and returning the reply in `rep'. - * iff limit read up to this many bytes - * returns 0 and data in `rep' if succesful, otherwise -1 - */ - -static int -recv_loop (krb5_socket_t fd, - time_t tmout, - int udp, - size_t limit, - krb5_data *rep) -{ - fd_set fdset; - struct timeval timeout; - int ret; - int nbytes; - -#ifndef NO_LIMIT_FD_SETSIZE - if (fd >= FD_SETSIZE) { - return -1; - } -#endif - - krb5_data_zero(rep); - do { - FD_ZERO(&fdset); - FD_SET(fd, &fdset); - timeout.tv_sec = tmout; - timeout.tv_usec = 0; - ret = select (fd + 1, &fdset, NULL, NULL, &timeout); - if (ret < 0) { - if (errno == EINTR) - continue; - return -1; - } else if (ret == 0) { - return 0; - } else { - void *tmp; - - if (rk_SOCK_IOCTL (fd, FIONREAD, &nbytes) < 0) { - krb5_data_free (rep); - return -1; - } - if(nbytes <= 0) - return 0; - - if (limit) - nbytes = min((size_t)nbytes, limit - rep->length); - - tmp = realloc (rep->data, rep->length + nbytes); - if (tmp == NULL) { - krb5_data_free (rep); - return -1; - } - rep->data = tmp; - ret = recv (fd, (char*)tmp + rep->length, nbytes, 0); - if (ret < 0) { - krb5_data_free (rep); - return -1; - } - rep->length += ret; - } - } while(!udp && (limit == 0 || rep->length < limit)); - return 0; -} - -/* - * Send kerberos requests and receive a reply on a udp or any other kind - * of a datagram socket. See `recv_loop'. - */ - -static int -send_and_recv_udp(krb5_socket_t fd, - time_t tmout, - const krb5_data *req, - krb5_data *rep) -{ - if (send (fd, req->data, req->length, 0) < 0) - return -1; - - return recv_loop(fd, tmout, 1, 0, rep); -} - -/* - * `send_and_recv' for a TCP (or any other stream) socket. - * Since there are no record limits on a stream socket the protocol here - * is to prepend the request with 4 bytes of its length and the reply - * is similarly encoded. - */ - -static int -send_and_recv_tcp(krb5_socket_t fd, - time_t tmout, - const krb5_data *req, - krb5_data *rep) -{ - unsigned char len[4]; - unsigned long rep_len; - krb5_data len_data; - - _krb5_put_int(len, req->length, 4); - if(net_write (fd, len, sizeof(len)) < 0) - return -1; - if(net_write (fd, req->data, req->length) < 0) - return -1; - if (recv_loop (fd, tmout, 0, 4, &len_data) < 0) - return -1; - if (len_data.length != 4) { - krb5_data_free (&len_data); - return -1; - } - _krb5_get_int(len_data.data, &rep_len, 4); - krb5_data_free (&len_data); - if (recv_loop (fd, tmout, 0, rep_len, rep) < 0) - return -1; - if(rep->length != rep_len) { - krb5_data_free (rep); - return -1; - } - return 0; -} - -int -_krb5_send_and_recv_tcp(krb5_socket_t fd, - time_t tmout, - const krb5_data *req, - krb5_data *rep) -{ - return send_and_recv_tcp(fd, tmout, req, rep); -} - -/* - * `send_and_recv' tailored for the HTTP protocol. - */ - -static int -send_and_recv_http(krb5_socket_t fd, - time_t tmout, - const char *prefix, - const krb5_data *req, - krb5_data *rep) -{ - char *request = NULL; - char *str; - int ret; - int len = base64_encode(req->data, req->length, &str); - - if(len < 0) - return -1; - ret = asprintf(&request, "GET %s%s HTTP/1.0\r\n\r\n", prefix, str); - free(str); - if (ret < 0 || request == NULL) - return -1; - ret = net_write (fd, request, strlen(request)); - free (request); - if (ret < 0) - return ret; - ret = recv_loop(fd, tmout, 0, 0, rep); - if(ret) - return ret; - { - unsigned long rep_len; - char *s, *p; - - s = realloc(rep->data, rep->length + 1); - if (s == NULL) { - krb5_data_free (rep); - return -1; - } - s[rep->length] = 0; - p = strstr(s, "\r\n\r\n"); - if(p == NULL) { - krb5_data_zero(rep); - free(s); - return -1; - } - p += 4; - rep->data = s; - rep->length -= p - s; - if(rep->length < 4) { /* remove length */ - krb5_data_zero(rep); - free(s); - return -1; - } - rep->length -= 4; - _krb5_get_int(p, &rep_len, 4); - if (rep_len != rep->length) { - krb5_data_zero(rep); - free(s); - return -1; - } - memmove(rep->data, p + 4, rep->length); - } - return 0; -} - -static int -init_port(const char *s, int fallback) -{ - if (s) { - int tmp; - - sscanf (s, "%d", &tmp); - return htons(tmp); - } else - return fallback; -} - -/* - * Return 0 if succesful, otherwise 1 - */ - -static int -send_via_proxy (krb5_context context, - const krb5_krbhst_info *hi, - const krb5_data *send_data, - krb5_data *receive) -{ - char *proxy2 = strdup(context->http_proxy); - char *proxy = proxy2; - char *prefix = NULL; - char *colon; - struct addrinfo hints; - struct addrinfo *ai, *a; - int ret; - krb5_socket_t s = rk_INVALID_SOCKET; - char portstr[NI_MAXSERV]; - - if (proxy == NULL) - return ENOMEM; - if (strncmp (proxy, "http://", 7) == 0) - proxy += 7; - - colon = strchr(proxy, ':'); - if(colon != NULL) - *colon++ = '\0'; - memset (&hints, 0, sizeof(hints)); - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - snprintf (portstr, sizeof(portstr), "%d", - ntohs(init_port (colon, htons(80)))); - ret = getaddrinfo (proxy, portstr, &hints, &ai); - free (proxy2); - if (ret) - return krb5_eai_to_heim_errno(ret, errno); - - for (a = ai; a != NULL; a = a->ai_next) { - s = socket (a->ai_family, a->ai_socktype | SOCK_CLOEXEC, a->ai_protocol); - if (s < 0) - continue; - rk_cloexec(s); - if (timed_connect (s, a, context->kdc_timeout) < 0) { - rk_closesocket (s); - continue; - } - break; - } - if (a == NULL) { - freeaddrinfo (ai); - return 1; - } - freeaddrinfo (ai); - - ret = asprintf(&prefix, "http://%s/", hi->hostname); - if(ret < 0 || prefix == NULL) { - close(s); - return 1; - } - ret = send_and_recv_http(s, context->kdc_timeout, - prefix, send_data, receive); - rk_closesocket (s); - free(prefix); - if(ret == 0 && receive->length != 0) - return 0; - return 1; -} - -static krb5_error_code -send_via_plugin(krb5_context context, - krb5_krbhst_info *hi, - time_t timeout, - const krb5_data *send_data, - krb5_data *receive) -{ - struct krb5_plugin *list = NULL, *e; - krb5_error_code ret; - - ret = _krb5_plugin_find(context, PLUGIN_TYPE_DATA, KRB5_PLUGIN_SEND_TO_KDC, &list); - if(ret != 0 || list == NULL) - return KRB5_PLUGIN_NO_HANDLE; - - for (e = list; e != NULL; e = _krb5_plugin_get_next(e)) { - krb5plugin_send_to_kdc_ftable *service; - void *ctx; - - service = _krb5_plugin_get_symbol(e); - if (service->minor_version != 0) - continue; - - (*service->init)(context, &ctx); - ret = (*service->send_to_kdc)(context, ctx, hi, - timeout, send_data, receive); - (*service->fini)(ctx); - if (ret == 0) - break; - if (ret != KRB5_PLUGIN_NO_HANDLE) { - krb5_set_error_message(context, ret, - N_("Plugin send_to_kdc failed to " - "lookup with error: %d", ""), ret); - break; - } - } - _krb5_plugin_free(list); - return KRB5_PLUGIN_NO_HANDLE; -} - - -/* - * Send the data `send' to one host from `handle` and get back the reply - * in `receive'. - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendto (krb5_context context, - const krb5_data *send_data, - krb5_krbhst_handle handle, - krb5_data *receive) -{ - krb5_error_code ret; - krb5_socket_t fd; - size_t i; - - krb5_data_zero(receive); - - for (i = 0; i < context->max_retries; ++i) { - krb5_krbhst_info *hi; - - while (krb5_krbhst_next(context, handle, &hi) == 0) { - struct addrinfo *ai, *a; - - _krb5_debug(context, 2, - "trying to communicate with host %s in realm %s", - hi->hostname, _krb5_krbhst_get_realm(handle)); - - if (context->send_to_kdc) { - struct send_to_kdc *s = context->send_to_kdc; - - ret = (*s->func)(context, s->data, hi, - context->kdc_timeout, send_data, receive); - if (ret == 0 && receive->length != 0) - goto out; - continue; - } - - ret = send_via_plugin(context, hi, context->kdc_timeout, - send_data, receive); - if (ret == 0 && receive->length != 0) - goto out; - else if (ret != KRB5_PLUGIN_NO_HANDLE) - continue; - - if(hi->proto == KRB5_KRBHST_HTTP && context->http_proxy) { - if (send_via_proxy (context, hi, send_data, receive) == 0) { - ret = 0; - goto out; - } - continue; - } - - ret = krb5_krbhst_get_addrinfo(context, hi, &ai); - if (ret) - continue; - - for (a = ai; a != NULL; a = a->ai_next) { - fd = socket (a->ai_family, a->ai_socktype | SOCK_CLOEXEC, a->ai_protocol); - if (rk_IS_BAD_SOCKET(fd)) - continue; - rk_cloexec(fd); - if (timed_connect (fd, a, context->kdc_timeout) < 0) { - rk_closesocket (fd); - continue; - } - switch (hi->proto) { - case KRB5_KRBHST_HTTP : - ret = send_and_recv_http(fd, context->kdc_timeout, - "", send_data, receive); - break; - case KRB5_KRBHST_TCP : - ret = send_and_recv_tcp (fd, context->kdc_timeout, - send_data, receive); - break; - case KRB5_KRBHST_UDP : - ret = send_and_recv_udp (fd, context->kdc_timeout, - send_data, receive); - break; - } - rk_closesocket (fd); - if(ret == 0 && receive->length != 0) - goto out; - } - } - krb5_krbhst_reset(context, handle); - } - krb5_clear_error_message (context); - ret = KRB5_KDC_UNREACH; -out: - _krb5_debug(context, 2, - "result of trying to talk to realm %s = %d", - _krb5_krbhst_get_realm(handle), ret); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendto_kdc(krb5_context context, - const krb5_data *send_data, - const krb5_realm *realm, - krb5_data *receive) -{ - return krb5_sendto_kdc_flags(context, send_data, realm, receive, 0); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendto_kdc_flags(krb5_context context, - const krb5_data *send_data, - const krb5_realm *realm, - krb5_data *receive, - int flags) -{ - krb5_error_code ret; - krb5_sendto_ctx ctx; - - ret = krb5_sendto_ctx_alloc(context, &ctx); - if (ret) - return ret; - krb5_sendto_ctx_add_flags(ctx, flags); - krb5_sendto_ctx_set_func(ctx, _krb5_kdc_retry, NULL); - - ret = krb5_sendto_context(context, ctx, send_data, *realm, receive); - krb5_sendto_ctx_free(context, ctx); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_send_to_kdc_func(krb5_context context, - krb5_send_to_kdc_func func, - void *data) -{ - free(context->send_to_kdc); - if (func == NULL) { - context->send_to_kdc = NULL; - return 0; - } - - context->send_to_kdc = malloc(sizeof(*context->send_to_kdc)); - if (context->send_to_kdc == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - - context->send_to_kdc->func = func; - context->send_to_kdc->data = data; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -_krb5_copy_send_to_kdc_func(krb5_context context, krb5_context to) -{ - if (context->send_to_kdc) - return krb5_set_send_to_kdc_func(to, - context->send_to_kdc->func, - context->send_to_kdc->data); - else - return krb5_set_send_to_kdc_func(to, NULL, NULL); -} - - - -struct krb5_sendto_ctx_data { - int flags; - int type; - krb5_sendto_ctx_func func; - void *data; -}; - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendto_ctx_alloc(krb5_context context, krb5_sendto_ctx *ctx) -{ - *ctx = calloc(1, sizeof(**ctx)); - if (*ctx == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - return 0; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_sendto_ctx_add_flags(krb5_sendto_ctx ctx, int flags) -{ - ctx->flags |= flags; -} - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_sendto_ctx_get_flags(krb5_sendto_ctx ctx) -{ - return ctx->flags; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_sendto_ctx_set_type(krb5_sendto_ctx ctx, int type) -{ - ctx->type = type; -} - - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_sendto_ctx_set_func(krb5_sendto_ctx ctx, - krb5_sendto_ctx_func func, - void *data) -{ - ctx->func = func; - ctx->data = data; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_sendto_ctx_free(krb5_context context, krb5_sendto_ctx ctx) -{ - memset(ctx, 0, sizeof(*ctx)); - free(ctx); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendto_context(krb5_context context, - krb5_sendto_ctx ctx, - const krb5_data *send_data, - const krb5_realm realm, - krb5_data *receive) -{ - krb5_error_code ret; - krb5_krbhst_handle handle = NULL; - int type, freectx = 0; - int action; - - krb5_data_zero(receive); - - if (ctx == NULL) { - freectx = 1; - ret = krb5_sendto_ctx_alloc(context, &ctx); - if (ret) - return ret; - } - - type = ctx->type; - if (type == 0) { - if ((ctx->flags & KRB5_KRBHST_FLAGS_MASTER) || context->use_admin_kdc) - type = KRB5_KRBHST_ADMIN; - else - type = KRB5_KRBHST_KDC; - } - - if ((int)send_data->length > context->large_msg_size) - ctx->flags |= KRB5_KRBHST_FLAGS_LARGE_MSG; - - /* loop until we get back a appropriate response */ - - do { - action = KRB5_SENDTO_DONE; - - krb5_data_free(receive); - - if (handle == NULL) { - ret = krb5_krbhst_init_flags(context, realm, type, - ctx->flags, &handle); - if (ret) { - if (freectx) - krb5_sendto_ctx_free(context, ctx); - return ret; - } - } - - ret = krb5_sendto(context, send_data, handle, receive); - if (ret) - break; - if (ctx->func) { - ret = (*ctx->func)(context, ctx, ctx->data, receive, &action); - if (ret) - break; - } - if (action != KRB5_SENDTO_CONTINUE) { - krb5_krbhst_free(context, handle); - handle = NULL; - } - } while (action != KRB5_SENDTO_DONE); - if (handle) - krb5_krbhst_free(context, handle); - if (ret == KRB5_KDC_UNREACH) - krb5_set_error_message(context, ret, - N_("unable to reach any KDC in realm %s", ""), - realm); - if (ret) - krb5_data_free(receive); - if (freectx) - krb5_sendto_ctx_free(context, ctx); - return ret; -} - -krb5_error_code KRB5_CALLCONV -_krb5_kdc_retry(krb5_context context, krb5_sendto_ctx ctx, void *data, - const krb5_data *reply, int *action) -{ - krb5_error_code ret; - KRB_ERROR error; - - if(krb5_rd_error(context, reply, &error)) - return 0; - - ret = krb5_error_from_rd_error(context, &error, NULL); - krb5_free_error_contents(context, &error); - - switch(ret) { - case KRB5KRB_ERR_RESPONSE_TOO_BIG: { - if (krb5_sendto_ctx_get_flags(ctx) & KRB5_KRBHST_FLAGS_LARGE_MSG) - break; - krb5_sendto_ctx_add_flags(ctx, KRB5_KRBHST_FLAGS_LARGE_MSG); - *action = KRB5_SENDTO_RESTART; - break; - } - case KRB5KDC_ERR_SVC_UNAVAILABLE: - *action = KRB5_SENDTO_CONTINUE; - break; - } - return 0; -} diff --git a/kerberosV/src/lib/krb5/send_to_kdc_plugin.h b/kerberosV/src/lib/krb5/send_to_kdc_plugin.h deleted file mode 100644 index 2374580652b..00000000000 --- a/kerberosV/src/lib/krb5/send_to_kdc_plugin.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2008 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: send_to_kdc_plugin.h,v 1.1 2013/06/17 18:57:44 robert Exp $ */ - -#ifndef HEIMDAL_KRB5_SEND_TO_KDC_PLUGIN_H -#define HEIMDAL_KRB5_SEND_TO_KDC_PLUGIN_H 1 - -#include - -#define KRB5_PLUGIN_SEND_TO_KDC "send_to_kdc" - -typedef krb5_error_code -(*krb5plugin_send_to_kdc_func)(krb5_context, - void *, - krb5_krbhst_info *, - time_t timeout, - const krb5_data *, - krb5_data *); - -typedef struct krb5plugin_send_to_kdc_ftable { - int minor_version; - krb5_error_code (*init)(krb5_context, void **); - void (*fini)(void *); - krb5plugin_send_to_kdc_func send_to_kdc; -} krb5plugin_send_to_kdc_ftable; - -#endif /* HEIMDAL_KRB5_SEND_TO_KDC_PLUGIN_H */ diff --git a/kerberosV/src/lib/krb5/sendauth.c b/kerberosV/src/lib/krb5/sendauth.c deleted file mode 100644 index d334d34497a..00000000000 --- a/kerberosV/src/lib/krb5/sendauth.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (c) 1997 - 2006 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 "krb5_locl.h" - -/* - * The format seems to be: - * client -> server - * - * 4 bytes - length - * KRB5_SENDAUTH_V1.0 (including zero) - * 4 bytes - length - * protocol string (with terminating zero) - * - * server -> client - * 1 byte - (0 = OK, else some kind of error) - * - * client -> server - * 4 bytes - length - * AP-REQ - * - * server -> client - * 4 bytes - length (0 = OK, else length of error) - * (error) - * - * if(mutual) { - * server -> client - * 4 bytes - length - * AP-REP - * } - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sendauth(krb5_context context, - krb5_auth_context *auth_context, - krb5_pointer p_fd, - const char *appl_version, - krb5_principal client, - krb5_principal server, - krb5_flags ap_req_options, - krb5_data *in_data, - krb5_creds *in_creds, - krb5_ccache ccache, - krb5_error **ret_error, - krb5_ap_rep_enc_part **rep_result, - krb5_creds **out_creds) -{ - krb5_error_code ret; - uint32_t len, net_len; - const char *version = KRB5_SENDAUTH_VERSION; - u_char repl; - krb5_data ap_req, error_data; - krb5_creds this_cred; - krb5_principal this_client = NULL; - krb5_creds *creds; - ssize_t sret; - krb5_boolean my_ccache = FALSE; - - len = strlen(version) + 1; - net_len = htonl(len); - if (krb5_net_write (context, p_fd, &net_len, 4) != 4 - || krb5_net_write (context, p_fd, version, len) != len) { - ret = errno; - krb5_set_error_message (context, ret, "write: %s", strerror(ret)); - return ret; - } - - len = strlen(appl_version) + 1; - net_len = htonl(len); - if (krb5_net_write (context, p_fd, &net_len, 4) != 4 - || krb5_net_write (context, p_fd, appl_version, len) != len) { - ret = errno; - krb5_set_error_message (context, ret, "write: %s", strerror(ret)); - return ret; - } - - sret = krb5_net_read (context, p_fd, &repl, sizeof(repl)); - if (sret < 0) { - ret = errno; - krb5_set_error_message (context, ret, "read: %s", strerror(ret)); - return ret; - } else if (sret != sizeof(repl)) { - krb5_clear_error_message (context); - return KRB5_SENDAUTH_BADRESPONSE; - } - - if (repl != 0) { - krb5_clear_error_message (context); - return KRB5_SENDAUTH_REJECTED; - } - - if (in_creds == NULL) { - if (ccache == NULL) { - ret = krb5_cc_default (context, &ccache); - if (ret) - return ret; - my_ccache = TRUE; - } - - if (client == NULL) { - ret = krb5_cc_get_principal (context, ccache, &this_client); - if (ret) { - if(my_ccache) - krb5_cc_close(context, ccache); - return ret; - } - client = this_client; - } - memset(&this_cred, 0, sizeof(this_cred)); - this_cred.client = client; - this_cred.server = server; - this_cred.times.endtime = 0; - this_cred.ticket.length = 0; - in_creds = &this_cred; - } - if (in_creds->ticket.length == 0) { - ret = krb5_get_credentials (context, 0, ccache, in_creds, &creds); - if (ret) { - if(my_ccache) - krb5_cc_close(context, ccache); - return ret; - } - } else { - creds = in_creds; - } - if(my_ccache) - krb5_cc_close(context, ccache); - ret = krb5_mk_req_extended (context, - auth_context, - ap_req_options, - in_data, - creds, - &ap_req); - - if (out_creds) - *out_creds = creds; - else - krb5_free_creds(context, creds); - if(this_client) - krb5_free_principal(context, this_client); - - if (ret) - return ret; - - ret = krb5_write_message (context, - p_fd, - &ap_req); - if (ret) - return ret; - - krb5_data_free (&ap_req); - - ret = krb5_read_message (context, p_fd, &error_data); - if (ret) - return ret; - - if (error_data.length != 0) { - KRB_ERROR error; - - ret = krb5_rd_error (context, &error_data, &error); - krb5_data_free (&error_data); - if (ret == 0) { - ret = krb5_error_from_rd_error(context, &error, NULL); - if (ret_error != NULL) { - *ret_error = malloc (sizeof(krb5_error)); - if (*ret_error == NULL) { - krb5_free_error_contents (context, &error); - } else { - **ret_error = error; - } - } else { - krb5_free_error_contents (context, &error); - } - return ret; - } else { - krb5_clear_error_message(context); - return ret; - } - } else - krb5_data_free (&error_data); - - if (ap_req_options & AP_OPTS_MUTUAL_REQUIRED) { - krb5_data ap_rep; - krb5_ap_rep_enc_part *ignore = NULL; - - krb5_data_zero (&ap_rep); - ret = krb5_read_message (context, - p_fd, - &ap_rep); - if (ret) - return ret; - - ret = krb5_rd_rep (context, *auth_context, &ap_rep, - rep_result ? rep_result : &ignore); - krb5_data_free (&ap_rep); - if (ret) - return ret; - if (rep_result == NULL) - krb5_free_ap_rep_enc_part (context, ignore); - } - return 0; -} diff --git a/kerberosV/src/lib/krb5/set_default_realm.c b/kerberosV/src/lib/krb5/set_default_realm.c deleted file mode 100644 index ddce677c1ac..00000000000 --- a/kerberosV/src/lib/krb5/set_default_realm.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -/* - * Convert the simple string `s' into a NULL-terminated and freshly allocated - * list in `list'. Return an error code. - */ - -static krb5_error_code -string_to_list (krb5_context context, const char *s, krb5_realm **list) -{ - - *list = malloc (2 * sizeof(**list)); - if (*list == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - (*list)[0] = strdup (s); - if ((*list)[0] == NULL) { - free (*list); - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - (*list)[1] = NULL; - return 0; -} - -/* - * Set the knowledge of the default realm(s) in `context'. - * If realm != NULL, that's the new default realm. - * Otherwise, the realm(s) are figured out from configuration or DNS. - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_default_realm(krb5_context context, - const char *realm) -{ - krb5_error_code ret = 0; - krb5_realm *realms = NULL; - - if (realm == NULL) { - realms = krb5_config_get_strings (context, NULL, - "libdefaults", - "default_realm", - NULL); - if (realms == NULL) - ret = krb5_get_host_realm(context, NULL, &realms); - } else { - ret = string_to_list (context, realm, &realms); - } - if (ret) - return ret; - krb5_free_host_realm (context, context->default_realms); - context->default_realms = realms; - return 0; -} diff --git a/kerberosV/src/lib/krb5/sock_principal.c b/kerberosV/src/lib/krb5/sock_principal.c deleted file mode 100644 index a43546de340..00000000000 --- a/kerberosV/src/lib/krb5/sock_principal.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_sock_to_principal (krb5_context context, - int sock, - const char *sname, - int32_t type, - krb5_principal *ret_princ) -{ - krb5_error_code ret; - struct sockaddr_storage __ss; - struct sockaddr *sa = (struct sockaddr *)&__ss; - socklen_t salen = sizeof(__ss); - char hostname[NI_MAXHOST]; - - if (getsockname (sock, sa, &salen) < 0) { - ret = errno; - krb5_set_error_message (context, ret, "getsockname: %s", strerror(ret)); - return ret; - } - ret = getnameinfo (sa, salen, hostname, sizeof(hostname), NULL, 0, 0); - if (ret) { - int save_errno = errno; - krb5_error_code ret2 = krb5_eai_to_heim_errno(ret, save_errno); - krb5_set_error_message (context, ret2, "getnameinfo: %s", gai_strerror(ret)); - return ret2; - } - - ret = krb5_sname_to_principal (context, - hostname, - sname, - type, - ret_princ); - return ret; -} diff --git a/kerberosV/src/lib/krb5/store-int.c b/kerberosV/src/lib/krb5/store-int.c deleted file mode 100644 index d5776297181..00000000000 --- a/kerberosV/src/lib/krb5/store-int.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1997-2008 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -_krb5_put_int(void *buffer, unsigned long value, size_t size) -{ - unsigned char *p = buffer; - int i; - for (i = size - 1; i >= 0; i--) { - p[i] = value & 0xff; - value >>= 8; - } - return size; -} - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -_krb5_get_int(void *buffer, unsigned long *value, size_t size) -{ - unsigned char *p = buffer; - unsigned long v = 0; - size_t i; - for (i = 0; i < size; i++) - v = (v << 8) + p[i]; - *value = v; - return size; -} diff --git a/kerberosV/src/lib/krb5/store-int.h b/kerberosV/src/lib/krb5/store-int.h deleted file mode 100644 index 877ccc008dc..00000000000 --- a/kerberosV/src/lib/krb5/store-int.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2002 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. - */ - -#ifndef __store_int_h__ -#define __store_int_h__ - -struct krb5_storage_data { - void *data; - ssize_t (*fetch)(struct krb5_storage_data*, void*, size_t); - ssize_t (*store)(struct krb5_storage_data*, const void*, size_t); - off_t (*seek)(struct krb5_storage_data*, off_t, int); - int (*trunc)(struct krb5_storage_data*, off_t); - void (*free)(struct krb5_storage_data*); - krb5_flags flags; - int eof_code; - size_t max_alloc; -}; - -#endif /* __store_int_h__ */ diff --git a/kerberosV/src/lib/krb5/store-test.c b/kerberosV/src/lib/krb5/store-test.c deleted file mode 100644 index 3d0f9e0b46c..00000000000 --- a/kerberosV/src/lib/krb5/store-test.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2001 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 "krb5_locl.h" - -static void -print_data(unsigned char *data, size_t len) -{ - int i; - for(i = 0; i < len; i++) { - if(i > 0 && (i % 16) == 0) - printf("\n "); - printf("%02x ", data[i]); - } - printf("\n"); -} - -static int -compare(const char *name, krb5_storage *sp, void *expected, size_t len) -{ - int ret = 0; - krb5_data data; - if (krb5_storage_to_data(sp, &data)) - errx(1, "krb5_storage_to_data failed"); - krb5_storage_free(sp); - if(data.length != len || memcmp(data.data, expected, len) != 0) { - printf("%s mismatch\n", name); - printf(" Expected: "); - print_data(expected, len); - printf(" Actual: "); - print_data(data.data, data.length); - ret++; - } - krb5_data_free(&data); - return ret; -} - -int -main(int argc, char **argv) -{ - int nerr = 0; - krb5_storage *sp; - krb5_context context; - krb5_principal principal; - - - krb5_init_context(&context); - - sp = krb5_storage_emem(); - krb5_store_int32(sp, 0x01020304); - nerr += compare("Integer", sp, "\x1\x2\x3\x4", 4); - - sp = krb5_storage_emem(); - krb5_storage_set_byteorder(sp, KRB5_STORAGE_BYTEORDER_LE); - krb5_store_int32(sp, 0x01020304); - nerr += compare("Integer (LE)", sp, "\x4\x3\x2\x1", 4); - - sp = krb5_storage_emem(); - krb5_storage_set_byteorder(sp, KRB5_STORAGE_BYTEORDER_BE); - krb5_store_int32(sp, 0x01020304); - nerr += compare("Integer (BE)", sp, "\x1\x2\x3\x4", 4); - - sp = krb5_storage_emem(); - krb5_storage_set_byteorder(sp, KRB5_STORAGE_BYTEORDER_HOST); - krb5_store_int32(sp, 0x01020304); - { - int test = 1; - void *data; - if(*(char*)&test) - data = "\x4\x3\x2\x1"; - else - data = "\x1\x2\x3\x4"; - nerr += compare("Integer (host)", sp, data, 4); - } - - sp = krb5_storage_emem(); - krb5_make_principal(context, &principal, "TEST", "foobar", NULL); - krb5_store_principal(sp, principal); - krb5_free_principal(context, principal); - nerr += compare("Principal", sp, "\x0\x0\x0\x1" - "\x0\x0\x0\x1" - "\x0\x0\x0\x4TEST" - "\x0\x0\x0\x6""foobar", 26); - - krb5_free_context(context); - - return nerr ? 1 : 0; -} diff --git a/kerberosV/src/lib/krb5/store.c b/kerberosV/src/lib/krb5/store.c deleted file mode 100644 index 3aeb8d62814..00000000000 --- a/kerberosV/src/lib/krb5/store.c +++ /dev/null @@ -1,1591 +0,0 @@ -/* - * Copyright (c) 1997-2008 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 "krb5_locl.h" -#include "store-int.h" - -#define BYTEORDER_IS(SP, V) (((SP)->flags & KRB5_STORAGE_BYTEORDER_MASK) == (V)) -#define BYTEORDER_IS_LE(SP) BYTEORDER_IS((SP), KRB5_STORAGE_BYTEORDER_LE) -#define BYTEORDER_IS_BE(SP) BYTEORDER_IS((SP), KRB5_STORAGE_BYTEORDER_BE) -#define BYTEORDER_IS_HOST(SP) (BYTEORDER_IS((SP), KRB5_STORAGE_BYTEORDER_HOST) || \ - krb5_storage_is_flags((SP), KRB5_STORAGE_HOST_BYTEORDER)) - -/** - * Add the flags on a storage buffer by or-ing in the flags to the buffer. - * - * @param sp the storage buffer to set the flags on - * @param flags the flags to set - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_storage_set_flags(krb5_storage *sp, krb5_flags flags) -{ - sp->flags |= flags; -} - -/** - * Clear the flags on a storage buffer - * - * @param sp the storage buffer to clear the flags on - * @param flags the flags to clear - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_storage_clear_flags(krb5_storage *sp, krb5_flags flags) -{ - sp->flags &= ~flags; -} - -/** - * Return true or false depending on if the storage flags is set or - * not. NB testing for the flag 0 always return true. - * - * @param sp the storage buffer to check flags on - * @param flags The flags to test for - * - * @return true if all the flags are set, false if not. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL -krb5_storage_is_flags(krb5_storage *sp, krb5_flags flags) -{ - return (sp->flags & flags) == flags; -} - -/** - * Set the new byte order of the storage buffer. - * - * @param sp the storage buffer to set the byte order for. - * @param byteorder the new byte order. - * - * The byte order are: KRB5_STORAGE_BYTEORDER_BE, - * KRB5_STORAGE_BYTEORDER_LE and KRB5_STORAGE_BYTEORDER_HOST. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_storage_set_byteorder(krb5_storage *sp, krb5_flags byteorder) -{ - sp->flags &= ~KRB5_STORAGE_BYTEORDER_MASK; - sp->flags |= byteorder; -} - -/** - * Return the current byteorder for the buffer. See krb5_storage_set_byteorder() for the list or byte order contants. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_flags KRB5_LIB_CALL -krb5_storage_get_byteorder(krb5_storage *sp) -{ - return sp->flags & KRB5_STORAGE_BYTEORDER_MASK; -} - -/** - * Set the max alloc value - * - * @param sp the storage buffer set the max allow for - * @param size maximum size to allocate, use 0 to remove limit - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_storage_set_max_alloc(krb5_storage *sp, size_t size) -{ - sp->max_alloc = size; -} - -/* don't allocate unresonable amount of memory */ -static krb5_error_code -size_too_large(krb5_storage *sp, size_t size) -{ - if (sp->max_alloc && sp->max_alloc < size) - return HEIM_ERR_TOO_BIG; - return 0; -} - -static krb5_error_code -size_too_large_num(krb5_storage *sp, size_t count, size_t size) -{ - if (sp->max_alloc == 0 || size == 0) - return 0; - size = sp->max_alloc / size; - if (size < count) - return HEIM_ERR_TOO_BIG; - return 0; -} - -/** - * Seek to a new offset. - * - * @param sp the storage buffer to seek in. - * @param offset the offset to seek - * @param whence relateive searching, SEEK_CUR from the current - * position, SEEK_END from the end, SEEK_SET absolute from the start. - * - * @return The new current offset - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION off_t KRB5_LIB_CALL -krb5_storage_seek(krb5_storage *sp, off_t offset, int whence) -{ - return (*sp->seek)(sp, offset, whence); -} - -/** - * Truncate the storage buffer in sp to offset. - * - * @param sp the storage buffer to truncate. - * @param offset the offset to truncate too. - * - * @return An Kerberos 5 error code. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_storage_truncate(krb5_storage *sp, off_t offset) -{ - return (*sp->trunc)(sp, offset); -} - -/** - * Read to the storage buffer. - * - * @param sp the storage buffer to read from - * @param buf the buffer to store the data in - * @param len the length to read - * - * @return The length of data read (can be shorter then len), or negative on error. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -krb5_storage_read(krb5_storage *sp, void *buf, size_t len) -{ - return sp->fetch(sp, buf, len); -} - -/** - * Write to the storage buffer. - * - * @param sp the storage buffer to write to - * @param buf the buffer to write to the storage buffer - * @param len the length to write - * - * @return The length of data written (can be shorter then len), or negative on error. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL -krb5_storage_write(krb5_storage *sp, const void *buf, size_t len) -{ - return sp->store(sp, buf, len); -} - -/** - * Set the return code that will be used when end of storage is reached. - * - * @param sp the storage - * @param code the error code to return on end of storage - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_storage_set_eof_code(krb5_storage *sp, int code) -{ - sp->eof_code = code; -} - -/** - * Get the return code that will be used when end of storage is reached. - * - * @param sp the storage - * - * @return storage error code - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_storage_get_eof_code(krb5_storage *sp) -{ - return sp->eof_code; -} - -/** - * Free a krb5 storage. - * - * @param sp the storage to free. - * - * @return An Kerberos 5 error code. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_storage_free(krb5_storage *sp) -{ - if(sp->free) - (*sp->free)(sp); - free(sp->data); - free(sp); - return 0; -} - -/** - * Copy the contnent of storage - * - * @param sp the storage to copy to a data - * @param data the copied data, free with krb5_data_free() - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_storage_to_data(krb5_storage *sp, krb5_data *data) -{ - off_t pos, size; - krb5_error_code ret; - - pos = sp->seek(sp, 0, SEEK_CUR); - if (pos < 0) - return HEIM_ERR_NOT_SEEKABLE; - size = sp->seek(sp, 0, SEEK_END); - ret = size_too_large(sp, size); - if (ret) - return ret; - ret = krb5_data_alloc(data, size); - if (ret) { - sp->seek(sp, pos, SEEK_SET); - return ret; - } - if (size) { - sp->seek(sp, 0, SEEK_SET); - sp->fetch(sp, data->data, data->length); - sp->seek(sp, pos, SEEK_SET); - } - return 0; -} - -static krb5_error_code -krb5_store_int(krb5_storage *sp, - int32_t value, - size_t len) -{ - int ret; - unsigned char v[16]; - - if(len > sizeof(v)) - return EINVAL; - _krb5_put_int(v, value, len); - ret = sp->store(sp, v, len); - if (ret < 0) - return errno; - if ((size_t)ret != len) - return sp->eof_code; - return 0; -} - -/** - * Store a int32 to storage, byte order is controlled by the settings - * on the storage, see krb5_storage_set_byteorder(). - * - * @param sp the storage to write too - * @param value the value to store - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_int32(krb5_storage *sp, - int32_t value) -{ - if(BYTEORDER_IS_HOST(sp)) - value = htonl(value); - else if(BYTEORDER_IS_LE(sp)) - value = bswap32(value); - return krb5_store_int(sp, value, 4); -} - -/** - * Store a uint32 to storage, byte order is controlled by the settings - * on the storage, see krb5_storage_set_byteorder(). - * - * @param sp the storage to write too - * @param value the value to store - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_uint32(krb5_storage *sp, - uint32_t value) -{ - return krb5_store_int32(sp, (int32_t)value); -} - -static krb5_error_code -krb5_ret_int(krb5_storage *sp, - int32_t *value, - size_t len) -{ - int ret; - unsigned char v[4]; - unsigned long w; - ret = sp->fetch(sp, v, len); - if (ret < 0) - return errno; - if ((size_t)ret != len) - return sp->eof_code; - _krb5_get_int(v, &w, len); - *value = w; - return 0; -} - -/** - * Read a int32 from storage, byte order is controlled by the settings - * on the storage, see krb5_storage_set_byteorder(). - * - * @param sp the storage to write too - * @param value the value read from the buffer - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_int32(krb5_storage *sp, - int32_t *value) -{ - krb5_error_code ret = krb5_ret_int(sp, value, 4); - if(ret) - return ret; - if(BYTEORDER_IS_HOST(sp)) - *value = htonl(*value); - else if(BYTEORDER_IS_LE(sp)) - *value = bswap32(*value); - return 0; -} - -/** - * Read a uint32 from storage, byte order is controlled by the settings - * on the storage, see krb5_storage_set_byteorder(). - * - * @param sp the storage to write too - * @param value the value read from the buffer - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_uint32(krb5_storage *sp, - uint32_t *value) -{ - krb5_error_code ret; - int32_t v; - - ret = krb5_ret_int32(sp, &v); - if (ret == 0) - *value = (uint32_t)v; - - return ret; -} - -/** - * Store a int16 to storage, byte order is controlled by the settings - * on the storage, see krb5_storage_set_byteorder(). - * - * @param sp the storage to write too - * @param value the value to store - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_int16(krb5_storage *sp, - int16_t value) -{ - if(BYTEORDER_IS_HOST(sp)) - value = htons(value); - else if(BYTEORDER_IS_LE(sp)) - value = bswap16(value); - return krb5_store_int(sp, value, 2); -} - -/** - * Store a uint16 to storage, byte order is controlled by the settings - * on the storage, see krb5_storage_set_byteorder(). - * - * @param sp the storage to write too - * @param value the value to store - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_uint16(krb5_storage *sp, - uint16_t value) -{ - return krb5_store_int16(sp, (int16_t)value); -} - -/** - * Read a int16 from storage, byte order is controlled by the settings - * on the storage, see krb5_storage_set_byteorder(). - * - * @param sp the storage to write too - * @param value the value read from the buffer - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_int16(krb5_storage *sp, - int16_t *value) -{ - int32_t v; - int ret; - ret = krb5_ret_int(sp, &v, 2); - if(ret) - return ret; - *value = v; - if(BYTEORDER_IS_HOST(sp)) - *value = htons(*value); - else if(BYTEORDER_IS_LE(sp)) - *value = bswap16(*value); - return 0; -} - -/** - * Read a int16 from storage, byte order is controlled by the settings - * on the storage, see krb5_storage_set_byteorder(). - * - * @param sp the storage to write too - * @param value the value read from the buffer - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_uint16(krb5_storage *sp, - uint16_t *value) -{ - krb5_error_code ret; - int16_t v; - - ret = krb5_ret_int16(sp, &v); - if (ret == 0) - *value = (uint16_t)v; - - return ret; -} - -/** - * Store a int8 to storage. - * - * @param sp the storage to write too - * @param value the value to store - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_int8(krb5_storage *sp, - int8_t value) -{ - int ret; - - ret = sp->store(sp, &value, sizeof(value)); - if (ret != sizeof(value)) - return (ret<0)?errno:sp->eof_code; - return 0; -} - -/** - * Store a uint8 to storage. - * - * @param sp the storage to write too - * @param value the value to store - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_uint8(krb5_storage *sp, - uint8_t value) -{ - return krb5_store_int8(sp, (int8_t)value); -} - -/** - * Read a int8 from storage - * - * @param sp the storage to write too - * @param value the value read from the buffer - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_int8(krb5_storage *sp, - int8_t *value) -{ - int ret; - - ret = sp->fetch(sp, value, sizeof(*value)); - if (ret != sizeof(*value)) - return (ret<0)?errno:sp->eof_code; - return 0; -} - -/** - * Read a uint8 from storage - * - * @param sp the storage to write too - * @param value the value read from the buffer - * - * @return 0 for success, or a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_uint8(krb5_storage *sp, - uint8_t *value) -{ - krb5_error_code ret; - int8_t v; - - ret = krb5_ret_int8(sp, &v); - if (ret == 0) - *value = (uint8_t)v; - - return ret; -} - -/** - * Store a data to the storage. The data is stored with an int32 as - * lenght plus the data (not padded). - * - * @param sp the storage buffer to write to - * @param data the buffer to store. - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_data(krb5_storage *sp, - krb5_data data) -{ - int ret; - ret = krb5_store_int32(sp, data.length); - if(ret < 0) - return ret; - ret = sp->store(sp, data.data, data.length); - if(ret < 0) - return errno; - if((size_t)ret != data.length) - return sp->eof_code; - return 0; -} - -/** - * Parse a data from the storage. - * - * @param sp the storage buffer to read from - * @param data the parsed data - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_data(krb5_storage *sp, - krb5_data *data) -{ - int ret; - int32_t size; - - ret = krb5_ret_int32(sp, &size); - if(ret) - return ret; - ret = size_too_large(sp, size); - if (ret) - return ret; - ret = krb5_data_alloc (data, size); - if (ret) - return ret; - if (size) { - ret = sp->fetch(sp, data->data, size); - if(ret != size) - return (ret < 0)? errno : sp->eof_code; - } - return 0; -} - -/** - * Store a string to the buffer. The data is formated as an len:uint32 - * plus the string itself (not padded). - * - * @param sp the storage buffer to write to - * @param s the string to store. - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_string(krb5_storage *sp, const char *s) -{ - krb5_data data; - data.length = strlen(s); - data.data = rk_UNCONST(s); - return krb5_store_data(sp, data); -} - -/** - * Parse a string from the storage. - * - * @param sp the storage buffer to read from - * @param string the parsed string - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_string(krb5_storage *sp, - char **string) -{ - int ret; - krb5_data data; - ret = krb5_ret_data(sp, &data); - if(ret) - return ret; - *string = realloc(data.data, data.length + 1); - if(*string == NULL){ - free(data.data); - return ENOMEM; - } - (*string)[data.length] = 0; - return 0; -} - -/** - * Store a zero terminated string to the buffer. The data is stored - * one character at a time until a NUL is stored. - * - * @param sp the storage buffer to write to - * @param s the string to store. - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_stringz(krb5_storage *sp, const char *s) -{ - size_t len = strlen(s) + 1; - ssize_t ret; - - ret = sp->store(sp, s, len); - if(ret < 0) - return ret; - if((size_t)ret != len) - return sp->eof_code; - return 0; -} - -/** - * Parse zero terminated string from the storage. - * - * @param sp the storage buffer to read from - * @param string the parsed string - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_stringz(krb5_storage *sp, - char **string) -{ - char c; - char *s = NULL; - size_t len = 0; - ssize_t ret; - - while((ret = sp->fetch(sp, &c, 1)) == 1){ - char *tmp; - - len++; - ret = size_too_large(sp, len); - if (ret) - break; - tmp = realloc (s, len); - if (tmp == NULL) { - free (s); - return ENOMEM; - } - s = tmp; - s[len - 1] = c; - if(c == 0) - break; - } - if(ret != 1){ - free(s); - if(ret == 0) - return sp->eof_code; - return ret; - } - *string = s; - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_stringnl(krb5_storage *sp, const char *s) -{ - size_t len = strlen(s); - ssize_t ret; - - ret = sp->store(sp, s, len); - if(ret < 0) - return ret; - if((size_t)ret != len) - return sp->eof_code; - ret = sp->store(sp, "\n", 1); - if(ret != 1) { - if(ret < 0) - return ret; - else - return sp->eof_code; - } - - return 0; - -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_stringnl(krb5_storage *sp, - char **string) -{ - int expect_nl = 0; - char c; - char *s = NULL; - size_t len = 0; - ssize_t ret; - - while((ret = sp->fetch(sp, &c, 1)) == 1){ - char *tmp; - - if (c == '\r') { - expect_nl = 1; - continue; - } - if (expect_nl && c != '\n') { - free(s); - return KRB5_BADMSGTYPE; - } - - len++; - ret = size_too_large(sp, len); - if (ret) - break; - tmp = realloc (s, len); - if (tmp == NULL) { - free (s); - return ENOMEM; - } - s = tmp; - if(c == '\n') { - s[len - 1] = '\0'; - break; - } - s[len - 1] = c; - } - if(ret != 1){ - free(s); - if(ret == 0) - return sp->eof_code; - return ret; - } - *string = s; - return 0; -} - -/** - * Write a principal block to storage. - * - * @param sp the storage buffer to write to - * @param p the principal block to write. - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_principal(krb5_storage *sp, - krb5_const_principal p) -{ - size_t i; - int ret; - - if(!krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE)) { - ret = krb5_store_int32(sp, p->name.name_type); - if(ret) return ret; - } - if(krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS)) - ret = krb5_store_int32(sp, p->name.name_string.len + 1); - else - ret = krb5_store_int32(sp, p->name.name_string.len); - - if(ret) return ret; - ret = krb5_store_string(sp, p->realm); - if(ret) return ret; - for(i = 0; i < p->name.name_string.len; i++){ - ret = krb5_store_string(sp, p->name.name_string.val[i]); - if(ret) return ret; - } - return 0; -} - -/** - * Parse principal from the storage. - * - * @param sp the storage buffer to read from - * @param princ the parsed principal - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_principal(krb5_storage *sp, - krb5_principal *princ) -{ - int i; - int ret; - krb5_principal p; - int32_t type; - int32_t ncomp; - - p = calloc(1, sizeof(*p)); - if(p == NULL) - return ENOMEM; - - if(krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE)) - type = KRB5_NT_UNKNOWN; - else if((ret = krb5_ret_int32(sp, &type))){ - free(p); - return ret; - } - if((ret = krb5_ret_int32(sp, &ncomp))){ - free(p); - return ret; - } - if(krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS)) - ncomp--; - if (ncomp < 0) { - free(p); - return EINVAL; - } - ret = size_too_large_num(sp, ncomp, sizeof(p->name.name_string.val[0])); - if (ret) { - free(p); - return ret; - } - p->name.name_type = type; - p->name.name_string.len = ncomp; - ret = krb5_ret_string(sp, &p->realm); - if(ret) { - free(p); - return ret; - } - p->name.name_string.val = calloc(ncomp, sizeof(p->name.name_string.val[0])); - if(p->name.name_string.val == NULL && ncomp != 0){ - free(p->realm); - free(p); - return ENOMEM; - } - for(i = 0; i < ncomp; i++){ - ret = krb5_ret_string(sp, &p->name.name_string.val[i]); - if(ret) { - while (i >= 0) - free(p->name.name_string.val[i--]); - free(p->realm); - free(p); - return ret; - } - } - *princ = p; - return 0; -} - -/** - * Store a keyblock to the storage. - * - * @param sp the storage buffer to write to - * @param p the keyblock to write - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_keyblock(krb5_storage *sp, krb5_keyblock p) -{ - int ret; - ret = krb5_store_int16(sp, p.keytype); - if(ret) return ret; - - if(krb5_storage_is_flags(sp, KRB5_STORAGE_KEYBLOCK_KEYTYPE_TWICE)){ - /* this should really be enctype, but it is the same as - keytype nowadays */ - ret = krb5_store_int16(sp, p.keytype); - if(ret) return ret; - } - - ret = krb5_store_data(sp, p.keyvalue); - return ret; -} - -/** - * Read a keyblock from the storage. - * - * @param sp the storage buffer to write to - * @param p the keyblock read from storage, free using krb5_free_keyblock() - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_keyblock(krb5_storage *sp, krb5_keyblock *p) -{ - int ret; - int16_t tmp; - - ret = krb5_ret_int16(sp, &tmp); - if(ret) return ret; - p->keytype = tmp; - - if(krb5_storage_is_flags(sp, KRB5_STORAGE_KEYBLOCK_KEYTYPE_TWICE)){ - ret = krb5_ret_int16(sp, &tmp); - if(ret) return ret; - } - - ret = krb5_ret_data(sp, &p->keyvalue); - return ret; -} - -/** - * Write a times block to storage. - * - * @param sp the storage buffer to write to - * @param times the times block to write. - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_times(krb5_storage *sp, krb5_times times) -{ - int ret; - ret = krb5_store_int32(sp, times.authtime); - if(ret) return ret; - ret = krb5_store_int32(sp, times.starttime); - if(ret) return ret; - ret = krb5_store_int32(sp, times.endtime); - if(ret) return ret; - ret = krb5_store_int32(sp, times.renew_till); - return ret; -} - -/** - * Read a times block from the storage. - * - * @param sp the storage buffer to write to - * @param times the times block read from storage - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_times(krb5_storage *sp, krb5_times *times) -{ - int ret; - int32_t tmp; - ret = krb5_ret_int32(sp, &tmp); - times->authtime = tmp; - if(ret) return ret; - ret = krb5_ret_int32(sp, &tmp); - times->starttime = tmp; - if(ret) return ret; - ret = krb5_ret_int32(sp, &tmp); - times->endtime = tmp; - if(ret) return ret; - ret = krb5_ret_int32(sp, &tmp); - times->renew_till = tmp; - return ret; -} - -/** - * Write a address block to storage. - * - * @param sp the storage buffer to write to - * @param p the address block to write. - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_address(krb5_storage *sp, krb5_address p) -{ - int ret; - ret = krb5_store_int16(sp, p.addr_type); - if(ret) return ret; - ret = krb5_store_data(sp, p.address); - return ret; -} - -/** - * Read a address block from the storage. - * - * @param sp the storage buffer to write to - * @param adr the address block read from storage - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_address(krb5_storage *sp, krb5_address *adr) -{ - int16_t t; - int ret; - ret = krb5_ret_int16(sp, &t); - if(ret) return ret; - adr->addr_type = t; - ret = krb5_ret_data(sp, &adr->address); - return ret; -} - -/** - * Write a addresses block to storage. - * - * @param sp the storage buffer to write to - * @param p the addresses block to write. - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_addrs(krb5_storage *sp, krb5_addresses p) -{ - size_t i; - int ret; - ret = krb5_store_int32(sp, p.len); - if(ret) return ret; - for(i = 0; ival[0])); - if (ret) return ret; - adr->len = tmp; - ALLOC(adr->val, adr->len); - if (adr->val == NULL && adr->len != 0) - return ENOMEM; - for(i = 0; i < adr->len; i++){ - ret = krb5_ret_address(sp, &adr->val[i]); - if(ret) break; - } - return ret; -} - -/** - * Write a auth data block to storage. - * - * @param sp the storage buffer to write to - * @param auth the auth data block to write. - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_authdata(krb5_storage *sp, krb5_authdata auth) -{ - krb5_error_code ret; - size_t i; - ret = krb5_store_int32(sp, auth.len); - if(ret) return ret; - for(i = 0; i < auth.len; i++){ - ret = krb5_store_int16(sp, auth.val[i].ad_type); - if(ret) break; - ret = krb5_store_data(sp, auth.val[i].ad_data); - if(ret) break; - } - return 0; -} - -/** - * Read a auth data from the storage. - * - * @param sp the storage buffer to write to - * @param auth the auth data block read from storage - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_authdata(krb5_storage *sp, krb5_authdata *auth) -{ - krb5_error_code ret; - int32_t tmp; - int16_t tmp2; - int i; - ret = krb5_ret_int32(sp, &tmp); - if(ret) return ret; - ret = size_too_large_num(sp, tmp, sizeof(auth->val[0])); - if (ret) return ret; - ALLOC_SEQ(auth, tmp); - if (auth->val == NULL && tmp != 0) - return ENOMEM; - for(i = 0; i < tmp; i++){ - ret = krb5_ret_int16(sp, &tmp2); - if(ret) break; - auth->val[i].ad_type = tmp2; - ret = krb5_ret_data(sp, &auth->val[i].ad_data); - if(ret) break; - } - return ret; -} - -static int32_t -bitswap32(int32_t b) -{ - int32_t r = 0; - int i; - for (i = 0; i < 32; i++) { - r = r << 1 | (b & 1); - b = b >> 1; - } - return r; -} - -/** - * Write a credentials block to storage. - * - * @param sp the storage buffer to write to - * @param creds the creds block to write. - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_creds(krb5_storage *sp, krb5_creds *creds) -{ - int ret; - - ret = krb5_store_principal(sp, creds->client); - if(ret) - return ret; - ret = krb5_store_principal(sp, creds->server); - if(ret) - return ret; - ret = krb5_store_keyblock(sp, creds->session); - if(ret) - return ret; - ret = krb5_store_times(sp, creds->times); - if(ret) - return ret; - ret = krb5_store_int8(sp, creds->second_ticket.length != 0); /* is_skey */ - if(ret) - return ret; - - if(krb5_storage_is_flags(sp, KRB5_STORAGE_CREDS_FLAGS_WRONG_BITORDER)) - ret = krb5_store_int32(sp, creds->flags.i); - else - ret = krb5_store_int32(sp, bitswap32(TicketFlags2int(creds->flags.b))); - if(ret) - return ret; - - ret = krb5_store_addrs(sp, creds->addresses); - if(ret) - return ret; - ret = krb5_store_authdata(sp, creds->authdata); - if(ret) - return ret; - ret = krb5_store_data(sp, creds->ticket); - if(ret) - return ret; - ret = krb5_store_data(sp, creds->second_ticket); - return ret; -} - -/** - * Read a credentials block from the storage. - * - * @param sp the storage buffer to write to - * @param creds the credentials block read from storage - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_creds(krb5_storage *sp, krb5_creds *creds) -{ - krb5_error_code ret; - int8_t dummy8; - int32_t dummy32; - - memset(creds, 0, sizeof(*creds)); - ret = krb5_ret_principal (sp, &creds->client); - if(ret) goto cleanup; - ret = krb5_ret_principal (sp, &creds->server); - if(ret) goto cleanup; - ret = krb5_ret_keyblock (sp, &creds->session); - if(ret) goto cleanup; - ret = krb5_ret_times (sp, &creds->times); - if(ret) goto cleanup; - ret = krb5_ret_int8 (sp, &dummy8); - if(ret) goto cleanup; - ret = krb5_ret_int32 (sp, &dummy32); - if(ret) goto cleanup; - /* - * Runtime detect the what is the higher bits of the bitfield. If - * any of the higher bits are set in the input data, it's either a - * new ticket flag (and this code need to be removed), or it's a - * MIT cache (or new Heimdal cache), lets change it to our current - * format. - */ - { - uint32_t mask = 0xffff0000; - creds->flags.i = 0; - creds->flags.b.anonymous = 1; - if (creds->flags.i & mask) - mask = ~mask; - if (dummy32 & mask) - dummy32 = bitswap32(dummy32); - } - creds->flags.i = dummy32; - ret = krb5_ret_addrs (sp, &creds->addresses); - if(ret) goto cleanup; - ret = krb5_ret_authdata (sp, &creds->authdata); - if(ret) goto cleanup; - ret = krb5_ret_data (sp, &creds->ticket); - if(ret) goto cleanup; - ret = krb5_ret_data (sp, &creds->second_ticket); -cleanup: - if(ret) { -#if 0 - krb5_free_cred_contents(context, creds); /* XXX */ -#endif - } - return ret; -} - -#define SC_CLIENT_PRINCIPAL 0x0001 -#define SC_SERVER_PRINCIPAL 0x0002 -#define SC_SESSION_KEY 0x0004 -#define SC_TICKET 0x0008 -#define SC_SECOND_TICKET 0x0010 -#define SC_AUTHDATA 0x0020 -#define SC_ADDRESSES 0x0040 - -/** - * Write a tagged credentials block to storage. - * - * @param sp the storage buffer to write to - * @param creds the creds block to write. - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_store_creds_tag(krb5_storage *sp, krb5_creds *creds) -{ - int ret; - int32_t header = 0; - - if (creds->client) - header |= SC_CLIENT_PRINCIPAL; - if (creds->server) - header |= SC_SERVER_PRINCIPAL; - if (creds->session.keytype != ETYPE_NULL) - header |= SC_SESSION_KEY; - if (creds->ticket.data) - header |= SC_TICKET; - if (creds->second_ticket.length) - header |= SC_SECOND_TICKET; - if (creds->authdata.len) - header |= SC_AUTHDATA; - if (creds->addresses.len) - header |= SC_ADDRESSES; - - ret = krb5_store_int32(sp, header); - if (ret) - return ret; - - if (creds->client) { - ret = krb5_store_principal(sp, creds->client); - if(ret) - return ret; - } - - if (creds->server) { - ret = krb5_store_principal(sp, creds->server); - if(ret) - return ret; - } - - if (creds->session.keytype != ETYPE_NULL) { - ret = krb5_store_keyblock(sp, creds->session); - if(ret) - return ret; - } - - ret = krb5_store_times(sp, creds->times); - if(ret) - return ret; - ret = krb5_store_int8(sp, creds->second_ticket.length != 0); /* is_skey */ - if(ret) - return ret; - - ret = krb5_store_int32(sp, bitswap32(TicketFlags2int(creds->flags.b))); - if(ret) - return ret; - - if (creds->addresses.len) { - ret = krb5_store_addrs(sp, creds->addresses); - if(ret) - return ret; - } - - if (creds->authdata.len) { - ret = krb5_store_authdata(sp, creds->authdata); - if(ret) - return ret; - } - - if (creds->ticket.data) { - ret = krb5_store_data(sp, creds->ticket); - if(ret) - return ret; - } - - if (creds->second_ticket.data) { - ret = krb5_store_data(sp, creds->second_ticket); - if (ret) - return ret; - } - - return ret; -} - -/** - * Read a tagged credentials block from the storage. - * - * @param sp the storage buffer to write to - * @param creds the credentials block read from storage - * - * @return 0 on success, a Kerberos 5 error code on failure. - * - * @ingroup krb5_storage - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ret_creds_tag(krb5_storage *sp, - krb5_creds *creds) -{ - krb5_error_code ret; - int8_t dummy8; - int32_t dummy32, header; - - memset(creds, 0, sizeof(*creds)); - - ret = krb5_ret_int32 (sp, &header); - if (ret) goto cleanup; - - if (header & SC_CLIENT_PRINCIPAL) { - ret = krb5_ret_principal (sp, &creds->client); - if(ret) goto cleanup; - } - if (header & SC_SERVER_PRINCIPAL) { - ret = krb5_ret_principal (sp, &creds->server); - if(ret) goto cleanup; - } - if (header & SC_SESSION_KEY) { - ret = krb5_ret_keyblock (sp, &creds->session); - if(ret) goto cleanup; - } - ret = krb5_ret_times (sp, &creds->times); - if(ret) goto cleanup; - ret = krb5_ret_int8 (sp, &dummy8); - if(ret) goto cleanup; - ret = krb5_ret_int32 (sp, &dummy32); - if(ret) goto cleanup; - /* - * Runtime detect the what is the higher bits of the bitfield. If - * any of the higher bits are set in the input data, it's either a - * new ticket flag (and this code need to be removed), or it's a - * MIT cache (or new Heimdal cache), lets change it to our current - * format. - */ - { - uint32_t mask = 0xffff0000; - creds->flags.i = 0; - creds->flags.b.anonymous = 1; - if (creds->flags.i & mask) - mask = ~mask; - if (dummy32 & mask) - dummy32 = bitswap32(dummy32); - } - creds->flags.i = dummy32; - if (header & SC_ADDRESSES) { - ret = krb5_ret_addrs (sp, &creds->addresses); - if(ret) goto cleanup; - } - if (header & SC_AUTHDATA) { - ret = krb5_ret_authdata (sp, &creds->authdata); - if(ret) goto cleanup; - } - if (header & SC_TICKET) { - ret = krb5_ret_data (sp, &creds->ticket); - if(ret) goto cleanup; - } - if (header & SC_SECOND_TICKET) { - ret = krb5_ret_data (sp, &creds->second_ticket); - if(ret) goto cleanup; - } - -cleanup: - if(ret) { -#if 0 - krb5_free_cred_contents(context, creds); /* XXX */ -#endif - } - return ret; -} diff --git a/kerberosV/src/lib/krb5/store_emem.c b/kerberosV/src/lib/krb5/store_emem.c deleted file mode 100644 index 7f91b084862..00000000000 --- a/kerberosV/src/lib/krb5/store_emem.c +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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 "krb5_locl.h" -#include "store-int.h" - -typedef struct emem_storage{ - unsigned char *base; - size_t size; - size_t len; - unsigned char *ptr; -}emem_storage; - -static ssize_t -emem_fetch(krb5_storage *sp, void *data, size_t size) -{ - emem_storage *s = (emem_storage*)sp->data; - if((size_t)(s->base + s->len - s->ptr) < size) - size = s->base + s->len - s->ptr; - memmove(data, s->ptr, size); - sp->seek(sp, size, SEEK_CUR); - return size; -} - -static ssize_t -emem_store(krb5_storage *sp, const void *data, size_t size) -{ - emem_storage *s = (emem_storage*)sp->data; - if(size > (size_t)(s->base + s->size - s->ptr)){ - void *base; - size_t sz, off; - off = s->ptr - s->base; - sz = off + size; - if (sz < 4096) - sz *= 2; - base = realloc(s->base, sz); - if(base == NULL) - return -1; - s->size = sz; - s->base = base; - s->ptr = (unsigned char*)base + off; - } - memmove(s->ptr, data, size); - sp->seek(sp, size, SEEK_CUR); - return size; -} - -static off_t -emem_seek(krb5_storage *sp, off_t offset, int whence) -{ - emem_storage *s = (emem_storage*)sp->data; - switch(whence){ - case SEEK_SET: - if((size_t)offset > s->size) - offset = s->size; - if(offset < 0) - offset = 0; - s->ptr = s->base + offset; - if((size_t)offset > s->len) - s->len = offset; - break; - case SEEK_CUR: - sp->seek(sp,s->ptr - s->base + offset, SEEK_SET); - break; - case SEEK_END: - sp->seek(sp, s->len + offset, SEEK_SET); - break; - default: - errno = EINVAL; - return -1; - } - return s->ptr - s->base; -} - -static int -emem_trunc(krb5_storage *sp, off_t offset) -{ - emem_storage *s = (emem_storage*)sp->data; - /* - * If offset is larget then current size, or current size is - * shrunk more then half of the current size, adjust buffer. - */ - if (offset == 0) { - free(s->base); - s->size = 0; - s->base = NULL; - s->ptr = NULL; - } else if ((size_t)offset > s->size || (s->size / 2) > (size_t)offset) { - void *base; - size_t off; - off = s->ptr - s->base; - base = realloc(s->base, offset); - if(base == NULL) - return ENOMEM; - if ((size_t)offset > s->size) - memset((char *)base + s->size, 0, offset - s->size); - s->size = offset; - s->base = base; - s->ptr = (unsigned char *)base + off; - } - s->len = offset; - if ((s->ptr - s->base) > offset) - s->ptr = s->base + offset; - return 0; -} - - -static void -emem_free(krb5_storage *sp) -{ - emem_storage *s = sp->data; - memset(s->base, 0, s->len); - free(s->base); -} - -/** - * Create a elastic (allocating) memory storage backend. Memory is - * allocated on demand. Free returned krb5_storage with - * krb5_storage_free(). - * - * @return A krb5_storage on success, or NULL on out of memory error. - * - * @ingroup krb5_storage - * - * @sa krb5_storage_from_mem() - * @sa krb5_storage_from_readonly_mem() - * @sa krb5_storage_from_fd() - * @sa krb5_storage_from_data() - */ - -KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL -krb5_storage_emem(void) -{ - krb5_storage *sp; - emem_storage *s; - - sp = malloc(sizeof(krb5_storage)); - if (sp == NULL) - return NULL; - - s = malloc(sizeof(*s)); - if (s == NULL) { - free(sp); - return NULL; - } - sp->data = s; - sp->flags = 0; - sp->eof_code = HEIM_ERR_EOF; - s->size = 1024; - s->base = malloc(s->size); - if (s->base == NULL) { - free(sp); - free(s); - return NULL; - } - s->len = 0; - s->ptr = s->base; - sp->fetch = emem_fetch; - sp->store = emem_store; - sp->seek = emem_seek; - sp->trunc = emem_trunc; - sp->free = emem_free; - sp->max_alloc = UINT_MAX/8; - return sp; -} diff --git a/kerberosV/src/lib/krb5/store_fd.c b/kerberosV/src/lib/krb5/store_fd.c deleted file mode 100644 index 2b72dea3a3f..00000000000 --- a/kerberosV/src/lib/krb5/store_fd.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) 1997 - 2004 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 "krb5_locl.h" -#include "store-int.h" - -typedef struct fd_storage { - int fd; -} fd_storage; - -#define FD(S) (((fd_storage*)(S)->data)->fd) - -static ssize_t -fd_fetch(krb5_storage * sp, void *data, size_t size) -{ - return net_read(FD(sp), data, size); -} - -static ssize_t -fd_store(krb5_storage * sp, const void *data, size_t size) -{ - return net_write(FD(sp), data, size); -} - -static off_t -fd_seek(krb5_storage * sp, off_t offset, int whence) -{ - return lseek(FD(sp), offset, whence); -} - -static int -fd_trunc(krb5_storage * sp, off_t offset) -{ - if (ftruncate(FD(sp), offset) == -1) - return errno; - return 0; -} - -static void -fd_free(krb5_storage * sp) -{ - close(FD(sp)); -} - -/** - * - * - * @return A krb5_storage on success, or NULL on out of memory error. - * - * @ingroup krb5_storage - * - * @sa krb5_storage_emem() - * @sa krb5_storage_from_mem() - * @sa krb5_storage_from_readonly_mem() - * @sa krb5_storage_from_data() - */ - -KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL -krb5_storage_from_fd(krb5_socket_t fd_in) -{ - krb5_storage *sp; - int fd; - -#ifdef SOCKET_IS_NOT_AN_FD -#ifdef _MSC_VER - if (_get_osfhandle(fd_in) != -1) { - fd = dup(fd_in); - } else { - fd = _open_osfhandle(fd_in, 0); - } -#else -#error Dont know how to deal with fd that may or may not be a socket. -#endif -#else /* SOCKET_IS_NOT_AN_FD */ - fd = dup(fd_in); -#endif - - if (fd < 0) - return NULL; - - sp = malloc(sizeof(krb5_storage)); - if (sp == NULL) { - close(fd); - return NULL; - } - - sp->data = malloc(sizeof(fd_storage)); - if (sp->data == NULL) { - close(fd); - free(sp); - return NULL; - } - sp->flags = 0; - sp->eof_code = HEIM_ERR_EOF; - FD(sp) = fd; - sp->fetch = fd_fetch; - sp->store = fd_store; - sp->seek = fd_seek; - sp->trunc = fd_trunc; - sp->free = fd_free; - sp->max_alloc = UINT_MAX/8; - return sp; -} diff --git a/kerberosV/src/lib/krb5/store_mem.c b/kerberosV/src/lib/krb5/store_mem.c deleted file mode 100644 index e674a95dbad..00000000000 --- a/kerberosV/src/lib/krb5/store_mem.c +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (c) 1997 - 2000, 2002 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 "krb5_locl.h" -#include "store-int.h" - -typedef struct mem_storage{ - unsigned char *base; - size_t size; - unsigned char *ptr; -}mem_storage; - -static ssize_t -mem_fetch(krb5_storage *sp, void *data, size_t size) -{ - mem_storage *s = (mem_storage*)sp->data; - if(size > (size_t)(s->base + s->size - s->ptr)) - size = s->base + s->size - s->ptr; - memmove(data, s->ptr, size); - sp->seek(sp, size, SEEK_CUR); - return size; -} - -static ssize_t -mem_store(krb5_storage *sp, const void *data, size_t size) -{ - mem_storage *s = (mem_storage*)sp->data; - if(size > (size_t)(s->base + s->size - s->ptr)) - size = s->base + s->size - s->ptr; - memmove(s->ptr, data, size); - sp->seek(sp, size, SEEK_CUR); - return size; -} - -static ssize_t -mem_no_store(krb5_storage *sp, const void *data, size_t size) -{ - return -1; -} - -static off_t -mem_seek(krb5_storage *sp, off_t offset, int whence) -{ - mem_storage *s = (mem_storage*)sp->data; - switch(whence){ - case SEEK_SET: - if((size_t)offset > s->size) - offset = s->size; - if(offset < 0) - offset = 0; - s->ptr = s->base + offset; - break; - case SEEK_CUR: - return sp->seek(sp, s->ptr - s->base + offset, SEEK_SET); - case SEEK_END: - return sp->seek(sp, s->size + offset, SEEK_SET); - default: - errno = EINVAL; - return -1; - } - return s->ptr - s->base; -} - -static int -mem_trunc(krb5_storage *sp, off_t offset) -{ - mem_storage *s = (mem_storage*)sp->data; - if((size_t)offset > s->size) - return ERANGE; - s->size = offset; - if ((s->ptr - s->base) > offset) - s->ptr = s->base + offset; - return 0; -} - -static int -mem_no_trunc(krb5_storage *sp, off_t offset) -{ - return EINVAL; -} - -/** - * Create a fixed size memory storage block - * - * @return A krb5_storage on success, or NULL on out of memory error. - * - * @ingroup krb5_storage - * - * @sa krb5_storage_mem() - * @sa krb5_storage_from_readonly_mem() - * @sa krb5_storage_from_data() - * @sa krb5_storage_from_fd() - */ - -KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL -krb5_storage_from_mem(void *buf, size_t len) -{ - krb5_storage *sp = malloc(sizeof(krb5_storage)); - mem_storage *s; - if(sp == NULL) - return NULL; - s = malloc(sizeof(*s)); - if(s == NULL) { - free(sp); - return NULL; - } - sp->data = s; - sp->flags = 0; - sp->eof_code = HEIM_ERR_EOF; - s->base = buf; - s->size = len; - s->ptr = buf; - sp->fetch = mem_fetch; - sp->store = mem_store; - sp->seek = mem_seek; - sp->trunc = mem_trunc; - sp->free = NULL; - sp->max_alloc = UINT_MAX/8; - return sp; -} - -/** - * Create a fixed size memory storage block - * - * @return A krb5_storage on success, or NULL on out of memory error. - * - * @ingroup krb5_storage - * - * @sa krb5_storage_mem() - * @sa krb5_storage_from_mem() - * @sa krb5_storage_from_readonly_mem() - * @sa krb5_storage_from_fd() - */ - -KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL -krb5_storage_from_data(krb5_data *data) -{ - return krb5_storage_from_mem(data->data, data->length); -} - -/** - * Create a fixed size memory storage block that is read only - * - * @return A krb5_storage on success, or NULL on out of memory error. - * - * @ingroup krb5_storage - * - * @sa krb5_storage_mem() - * @sa krb5_storage_from_mem() - * @sa krb5_storage_from_data() - * @sa krb5_storage_from_fd() - */ - -KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL -krb5_storage_from_readonly_mem(const void *buf, size_t len) -{ - krb5_storage *sp = malloc(sizeof(krb5_storage)); - mem_storage *s; - if(sp == NULL) - return NULL; - s = malloc(sizeof(*s)); - if(s == NULL) { - free(sp); - return NULL; - } - sp->data = s; - sp->flags = 0; - sp->eof_code = HEIM_ERR_EOF; - s->base = rk_UNCONST(buf); - s->size = len; - s->ptr = rk_UNCONST(buf); - sp->fetch = mem_fetch; - sp->store = mem_no_store; - sp->seek = mem_seek; - sp->trunc = mem_no_trunc; - sp->free = NULL; - sp->max_alloc = UINT_MAX/8; - return sp; -} diff --git a/kerberosV/src/lib/krb5/string-to-key-test.c b/kerberosV/src/lib/krb5/string-to-key-test.c deleted file mode 100644 index cb7081b9e0f..00000000000 --- a/kerberosV/src/lib/krb5/string-to-key-test.c +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 "krb5_locl.h" -#include - -enum { MAXSIZE = 24 }; - -static struct testcase { - const char *principal_name; - const char *password; - krb5_enctype enctype; - unsigned char res[MAXSIZE]; -} tests[] = { -#ifdef HEIM_WEAK_CRYPTO - {"@", "", ETYPE_DES_CBC_MD5, - {0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xf1}}, - {"nisse@FOO.SE", "hej", ETYPE_DES_CBC_MD5, - {0xfe, 0x67, 0xbf, 0x9e, 0x57, 0x6b, 0xfe, 0x52}}, - {"assar/liten@FOO.SE", "hemligt", ETYPE_DES_CBC_MD5, - {0x5b, 0x9b, 0xcb, 0xf2, 0x97, 0x43, 0xc8, 0x40}}, - {"raeburn@ATHENA.MIT.EDU", "password", ETYPE_DES_CBC_MD5, - {0xcb, 0xc2, 0x2f, 0xae, 0x23, 0x52, 0x98, 0xe3}}, - {"danny@WHITEHOUSE.GOV", "potatoe", ETYPE_DES_CBC_MD5, - {0xdf, 0x3d, 0x32, 0xa7, 0x4f, 0xd9, 0x2a, 0x01}}, - {"buckaroo@EXAMPLE.COM", "penny", ETYPE_DES_CBC_MD5, - {0x94, 0x43, 0xa2, 0xe5, 0x32, 0xfd, 0xc4, 0xf1}}, - {"Juri\xc5\xa1i\xc4\x87@ATHENA.MIT.EDU", "\xc3\x9f", ETYPE_DES_CBC_MD5, - {0x62, 0xc8, 0x1a, 0x52, 0x32, 0xb5, 0xe6, 0x9d}}, - {"AAAAAAAA", "11119999", ETYPE_DES_CBC_MD5, - {0x98, 0x40, 0x54, 0xd0, 0xf1, 0xa7, 0x3e, 0x31}}, - {"FFFFAAAA", "NNNN6666", ETYPE_DES_CBC_MD5, - {0xc4, 0xbf, 0x6b, 0x25, 0xad, 0xf7, 0xa4, 0xf8}}, -#endif -#if 0 - {"@", "", ETYPE_DES3_CBC_SHA1, - {0xce, 0xa2, 0x2f, 0x9b, 0x52, 0x2c, 0xb0, 0x15, 0x6e, 0x6b, 0x64, - 0x73, 0x62, 0x64, 0x73, 0x4f, 0x6e, 0x73, 0xce, 0xa2, 0x2f, 0x9b, - 0x52, 0x57}}, -#endif - {"nisse@FOO.SE", "hej", ETYPE_DES3_CBC_SHA1, - {0x0e, 0xbc, 0x23, 0x9d, 0x68, 0x46, 0xf2, 0xd5, 0x51, 0x98, 0x5b, - 0x57, 0xc1, 0x57, 0x01, 0x79, 0x04, 0xc4, 0xe9, 0xfe, 0xc1, 0x0e, - 0x13, 0xd0}}, - {"assar/liten@FOO.SE", "hemligt", ETYPE_DES3_CBC_SHA1, - {0x7f, 0x40, 0x67, 0xb9, 0xbc, 0xc4, 0x40, 0xfb, 0x43, 0x73, 0xd9, - 0xd3, 0xcd, 0x7c, 0xc7, 0x67, 0xe6, 0x79, 0x94, 0xd0, 0xa8, 0x34, - 0xdf, 0x62}}, - {"does/not@MATTER", "foo", ETYPE_ARCFOUR_HMAC_MD5, - {0xac, 0x8e, 0x65, 0x7f, 0x83, 0xdf, 0x82, 0xbe, - 0xea, 0x5d, 0x43, 0xbd, 0xaf, 0x78, 0x00, 0xcc}}, - {"raeburn@ATHENA.MIT.EDU", "password", ETYPE_DES3_CBC_SHA1, - {0x85, 0x0b, 0xb5, 0x13, 0x58, 0x54, 0x8c, 0xd0, 0x5e, 0x86, 0x76, 0x8c, 0x31, 0x3e, 0x3b, 0xfe, 0xf7, 0x51, 0x19, 0x37, 0xdc, 0xf7, 0x2c, 0x3e}}, - {"danny@WHITEHOUSE.GOV", "potatoe", ETYPE_DES3_CBC_SHA1, - {0xdf, 0xcd, 0x23, 0x3d, 0xd0, 0xa4, 0x32, 0x04, 0xea, 0x6d, 0xc4, 0x37, 0xfb, 0x15, 0xe0, 0x61, 0xb0, 0x29, 0x79, 0xc1, 0xf7, 0x4f, 0x37, 0x7a}}, - {"buckaroo@EXAMPLE.COM", "penny", ETYPE_DES3_CBC_SHA1, - {0x6d, 0x2f, 0xcd, 0xf2, 0xd6, 0xfb, 0xbc, 0x3d, 0xdc, 0xad, 0xb5, 0xda, 0x57, 0x10, 0xa2, 0x34, 0x89, 0xb0, 0xd3, 0xb6, 0x9d, 0x5d, 0x9d, 0x4a}}, - {"Juri\xc5\xa1i\xc4\x87@ATHENA.MIT.EDU", "\xc3\x9f", ETYPE_DES3_CBC_SHA1, - {0x16, 0xd5, 0xa4, 0x0e, 0x1c, 0xe3, 0xba, 0xcb, 0x61, 0xb9, 0xdc, 0xe0, 0x04, 0x70, 0x32, 0x4c, 0x83, 0x19, 0x73, 0xa7, 0xb9, 0x52, 0xfe, 0xb0}}, - {NULL} -}; - -int -main(int argc, char **argv) -{ - struct testcase *t; - krb5_context context; - krb5_error_code ret; - int val = 0; - - ret = krb5_init_context (&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - /* to enable realm-less principal name above */ - - krb5_set_default_realm(context, ""); - - for (t = tests; t->principal_name; ++t) { - krb5_keyblock key; - krb5_principal principal; - int i; - - ret = krb5_parse_name (context, t->principal_name, &principal); - if (ret) - krb5_err (context, 1, ret, "krb5_parse_name %s", - t->principal_name); - ret = krb5_string_to_key (context, t->enctype, t->password, - principal, &key); - if (ret) - krb5_err (context, 1, ret, "krb5_string_to_key"); - krb5_free_principal (context, principal); - if (memcmp (key.keyvalue.data, t->res, key.keyvalue.length) != 0) { - const unsigned char *p = key.keyvalue.data; - - printf ("string_to_key(%s, %s) failed\n", - t->principal_name, t->password); - printf ("should be: "); - for (i = 0; i < key.keyvalue.length; ++i) - printf ("%02x", t->res[i]); - printf ("\nresult was: "); - for (i = 0; i < key.keyvalue.length; ++i) - printf ("%02x", p[i]); - printf ("\n"); - val = 1; - } - krb5_free_keyblock_contents(context, &key); - } - krb5_free_context(context); - return val; -} diff --git a/kerberosV/src/lib/krb5/test_acl.c b/kerberosV/src/lib/krb5/test_acl.c deleted file mode 100644 index 9e27c040864..00000000000 --- a/kerberosV/src/lib/krb5/test_acl.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2004 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 "krb5_locl.h" -#include - -#define RETVAL(c, r, e, s) \ - do { if (r != e) krb5_errx(c, 1, "%s", s); } while (0) -#define STRINGMATCH(c, s, _s1, _s2) \ - do { \ - if (_s1 == NULL || _s2 == NULL) \ - krb5_errx(c, 1, "s1 or s2 is NULL"); \ - if (strcmp(_s1,_s2) != 0) \ - krb5_errx(c, 1, "%s", s); \ - } while (0) - -static void -test_match_string(krb5_context context) -{ - krb5_error_code ret; - char *s1, *s2; - - ret = krb5_acl_match_string(context, "foo", "s", "foo"); - RETVAL(context, ret, 0, "single s"); - ret = krb5_acl_match_string(context, "foo foo", "s", "foo"); - RETVAL(context, ret, EACCES, "too many strings"); - ret = krb5_acl_match_string(context, "foo bar", "ss", "foo", "bar"); - RETVAL(context, ret, 0, "two strings"); - ret = krb5_acl_match_string(context, "foo bar", "ss", "foo", "bar"); - RETVAL(context, ret, 0, "two strings double space"); - ret = krb5_acl_match_string(context, "foo \tbar", "ss", "foo", "bar"); - RETVAL(context, ret, 0, "two strings space + tab"); - ret = krb5_acl_match_string(context, "foo", "ss", "foo", "bar"); - RETVAL(context, ret, EACCES, "one string, two format strings"); - ret = krb5_acl_match_string(context, "foo", "ss", "foo", "foo"); - RETVAL(context, ret, EACCES, "one string, two format strings (same)"); - ret = krb5_acl_match_string(context, "foo \t", "s", "foo"); - RETVAL(context, ret, 0, "ending space"); - - ret = krb5_acl_match_string(context, "foo/bar", "f", "foo/bar"); - RETVAL(context, ret, 0, "liternal fnmatch"); - ret = krb5_acl_match_string(context, "foo/bar", "f", "foo/*"); - RETVAL(context, ret, 0, "foo/*"); - ret = krb5_acl_match_string(context, "foo/bar.example.org", "f", - "foo/*.example.org"); - RETVAL(context, ret, 0, "foo/*.example.org"); - ret = krb5_acl_match_string(context, "foo/bar.example.com", "f", - "foo/*.example.org"); - RETVAL(context, ret, EACCES, "foo/*.example.com"); - - ret = krb5_acl_match_string(context, "foo/bar/baz", "f", "foo/*/baz"); - RETVAL(context, ret, 0, "foo/*/baz"); - - ret = krb5_acl_match_string(context, "foo", "r", &s1); - RETVAL(context, ret, 0, "ret 1"); - STRINGMATCH(context, "ret 1 match", s1, "foo"); free(s1); - - ret = krb5_acl_match_string(context, "foo bar", "rr", &s1, &s2); - RETVAL(context, ret, 0, "ret 2"); - STRINGMATCH(context, "ret 2 match 1", s1, "foo"); free(s1); - STRINGMATCH(context, "ret 2 match 2", s2, "bar"); free(s2); - - ret = krb5_acl_match_string(context, "foo bar", "sr", "bar", &s1); - RETVAL(context, ret, EACCES, "ret mismatch"); - if (s1 != NULL) krb5_errx(context, 1, "s1 not NULL"); - - ret = krb5_acl_match_string(context, "foo", "l", "foo"); - RETVAL(context, ret, EINVAL, "unknown letter"); -} - - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - - setprogname(argv[0]); - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - test_match_string(context); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_addr.c b/kerberosV/src/lib/krb5/test_addr.c deleted file mode 100644 index 79a55ff303e..00000000000 --- a/kerberosV/src/lib/krb5/test_addr.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Copyright (c) 2005 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 "krb5_locl.h" -#include - -static void -print_addr(krb5_context context, const char *addr) -{ - krb5_addresses addresses; - krb5_error_code ret; - char buf[38]; - char buf2[1000]; - size_t len; - int i; - - ret = krb5_parse_address(context, addr, &addresses); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_address"); - - if (addresses.len < 1) - krb5_err(context, 1, ret, "too few addresses"); - - for (i = 0; i < addresses.len; i++) { - krb5_print_address(&addresses.val[i], buf, sizeof(buf), &len); -#if 0 - printf("addr %d: %s (%d/%d)\n", i, buf, (int)len, (int)strlen(buf)); -#endif - if (strlen(buf) > sizeof(buf)) - krb5_err(context, 1, ret, "len %d larger then buf %d", - (int)strlen(buf), (int)sizeof(buf)); - krb5_print_address(&addresses.val[i], buf2, sizeof(buf2), &len); -#if 0 - printf("addr %d: %s (%d/%d)\n", i, buf2, (int)len, (int)strlen(buf2)); -#endif - if (strlen(buf2) > sizeof(buf2)) - krb5_err(context, 1, ret, "len %d larger then buf %d", - (int)strlen(buf2), (int)sizeof(buf2)); - - } - krb5_free_addresses(context, &addresses); - -} - -static void -truncated_addr(krb5_context context, const char *addr, - size_t truncate_len, size_t outlen) -{ - krb5_addresses addresses; - krb5_error_code ret; - char *buf; - size_t len; - - buf = ecalloc(1, outlen + 1); - - ret = krb5_parse_address(context, addr, &addresses); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_address"); - - if (addresses.len != 1) - krb5_err(context, 1, ret, "addresses should be one"); - - krb5_print_address(&addresses.val[0], buf, truncate_len, &len); - -#if 0 - printf("addr %s (%d/%d) should be %d\n", buf, (int)len, (int)strlen(buf), (int)outlen); -#endif - - if (truncate_len > strlen(buf) + 1) - krb5_err(context, 1, ret, "%s truncate_len %d larger then strlen %d source %s", - buf, (int)truncate_len, (int)strlen(buf), addr); - - if (outlen != len) - krb5_err(context, 1, ret, "%s: outlen %d != len %d", - buf, (int)outlen, (int)strlen(buf)); - - krb5_print_address(&addresses.val[0], buf, outlen + 1, &len); - -#if 0 - printf("addr %s (%d/%d)\n", buf, (int)len, (int)strlen(buf)); -#endif - - if (len != outlen) - abort(); - if (strlen(buf) != len) - abort(); - - krb5_free_addresses(context, &addresses); - free(buf); -} - -static void -check_truncation(krb5_context context, const char *addr) -{ - int i, len = strlen(addr); - - truncated_addr(context, addr, len, len); - - for (i = 0; i < len; i++) - truncated_addr(context, addr, i, len); -} - -static void -match_addr(krb5_context context, const char *range_addr, - const char *one_addr, int match) -{ - krb5_addresses range, one; - krb5_error_code ret; - - ret = krb5_parse_address(context, range_addr, &range); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_address"); - - if (range.len != 1) - krb5_err(context, 1, ret, "wrong num of addresses"); - - ret = krb5_parse_address(context, one_addr, &one); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_address"); - - if (one.len != 1) - krb5_err(context, 1, ret, "wrong num of addresses"); - - if (krb5_address_order(context, &range.val[0], &one.val[0]) == 0) { - if (!match) - krb5_errx(context, 1, "match when one shouldn't be"); - } else { - if (match) - krb5_errx(context, 1, "no match when one should be"); - } - - krb5_free_addresses(context, &range); - krb5_free_addresses(context, &one); -} - -#ifdef _MSC_VER - -/* For the truncation tests, calling strcpy_s() or strcat_s() with a - size of 0 results in the invalid parameter handler being invoked. - For the debug version, the runtime also throws an assert. */ - -static void -inv_param_handler(const wchar_t* expression, - const wchar_t* function, - const wchar_t* file, - unsigned int line, - uintptr_t pReserved) -{ - printf("Invalid parameter handler invoked for: %S in %S(%d) [%S]\n", - function, file, line, expression); -} - -static _invalid_parameter_handler _inv_old = NULL; - -#define SET_INVALID_PARAM_HANDLER _inv_old = _set_invalid_parameter_handler(inv_param_handler) - -#else - -#define SET_INVALID_PARAM_HANDLER ((void) 0) - -#endif - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - - SET_INVALID_PARAM_HANDLER; - - setprogname(argv[0]); - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - print_addr(context, "RANGE:127.0.0.0/8"); - print_addr(context, "RANGE:127.0.0.0/24"); - print_addr(context, "RANGE:IPv4:127.0.0.0-IPv4:127.0.0.255"); - print_addr(context, "RANGE:130.237.237.4/29"); -#ifdef HAVE_IPV6 - print_addr(context, "RANGE:2001:db8:1:2:3:4:1428:7ab/64"); - print_addr(context, "RANGE:IPv6:fe80::209:6bff:fea0:e522/64"); - print_addr(context, "RANGE:IPv6:fe80::-IPv6:fe80::ffff:ffff:ffff:ffff"); - print_addr(context, "RANGE:fe80::-fe80::ffff:ffff:ffff:ffff"); -#endif - - check_truncation(context, "IPv4:127.0.0.0"); - check_truncation(context, "RANGE:IPv4:127.0.0.0-IPv4:127.0.0.255"); -#ifdef HAVE_IPV6 - check_truncation(context, "IPv6:::"); - check_truncation(context, "IPv6:::1"); - check_truncation(context, "IPv6:2001:db8:1:2:3:4:1428:7ab"); - check_truncation(context, "IPv6:fe80::209:0:0:0"); - check_truncation(context, "IPv6:fe80::ffff:ffff:ffff:ffff"); -#endif - - match_addr(context, "RANGE:127.0.0.0/8", "inet:127.0.0.0", 1); - match_addr(context, "RANGE:127.0.0.0/8", "inet:127.255.255.255", 1); - match_addr(context, "RANGE:127.0.0.0/8", "inet:128.0.0.0", 0); - - match_addr(context, "RANGE:130.237.237.8/29", "inet:130.237.237.7", 0); - match_addr(context, "RANGE:130.237.237.8/29", "inet:130.237.237.8", 1); - match_addr(context, "RANGE:130.237.237.8/29", "inet:130.237.237.15", 1); - match_addr(context, "RANGE:130.237.237.8/29", "inet:130.237.237.16", 0); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_alname.c b/kerberosV/src/lib/krb5/test_alname.c deleted file mode 100644 index 21e4bff8d82..00000000000 --- a/kerberosV/src/lib/krb5/test_alname.c +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) 2003 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 "krb5_locl.h" -#include -#include - -static void -test_alname(krb5_context context, krb5_const_realm realm, - const char *user, const char *inst, - const char *localuser, int ok) -{ - krb5_principal p; - char localname[1024]; - krb5_error_code ret; - char *princ; - - ret = krb5_make_principal(context, &p, realm, user, inst, NULL); - if (ret) - krb5_err(context, 1, ret, "krb5_build_principal"); - - ret = krb5_unparse_name(context, p, &princ); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name"); - - ret = krb5_aname_to_localname(context, p, sizeof(localname), localname); - krb5_free_principal(context, p); - free(princ); - if (ret) { - if (!ok) - return; - krb5_err(context, 1, ret, "krb5_aname_to_localname: %s -> %s", - princ, localuser); - } - - if (strcmp(localname, localuser) != 0) { - if (ok) - errx(1, "compared failed %s != %s (should have succeded)", - localname, localuser); - } else { - if (!ok) - errx(1, "compared failed %s == %s (should have failed)", - localname, localuser); - } - -} - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - krb5_realm realm; - int optidx = 0; - char *user; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - if (argc != 1) - errx(1, "first argument should be a local user that in root .k5login"); - - user = argv[0]; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - ret = krb5_get_default_realm(context, &realm); - if (ret) - krb5_err(context, 1, ret, "krb5_get_default_realm"); - - test_alname(context, realm, user, NULL, user, 1); - test_alname(context, realm, user, "root", "root", 1); - - test_alname(context, "FOO.BAR.BAZ.KAKA", user, NULL, user, 0); - test_alname(context, "FOO.BAR.BAZ.KAKA", user, "root", "root", 0); - - test_alname(context, realm, user, NULL, - "not-same-as-user", 0); - test_alname(context, realm, user, "root", - "not-same-as-user", 0); - - test_alname(context, "FOO.BAR.BAZ.KAKA", user, NULL, - "not-same-as-user", 0); - test_alname(context, "FOO.BAR.BAZ.KAKA", user, "root", - "not-same-as-user", 0); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_ap-req.c b/kerberosV/src/lib/krb5/test_ap-req.c deleted file mode 100644 index dcdddb81498..00000000000 --- a/kerberosV/src/lib/krb5/test_ap-req.c +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (c) 2006 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 - -#include -#include -#include -#include -#include -#include - -static int verify_pac = 0; -static int server_any = 0; -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"verify-pac",0, arg_flag, &verify_pac, - "verify the PAC", NULL }, - {"server-any",0, arg_flag, &server_any, - "let server pick the principal", NULL }, - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, sizeof(args)/sizeof(*args), NULL, "..."); - exit (ret); -} - - -static void -test_ap(krb5_context context, - krb5_principal target, - krb5_principal server, - krb5_keytab keytab, - krb5_ccache ccache, - const krb5_flags client_flags) -{ - krb5_error_code ret; - krb5_auth_context client_ac = NULL, server_ac = NULL; - krb5_data data; - krb5_flags server_flags; - krb5_ticket *ticket = NULL; - int32_t server_seq, client_seq; - - ret = krb5_mk_req_exact(context, - &client_ac, - client_flags, - target, - NULL, - ccache, - &data); - if (ret) - krb5_err(context, 1, ret, "krb5_mk_req_exact"); - - ret = krb5_rd_req(context, - &server_ac, - &data, - server, - keytab, - &server_flags, - &ticket); - if (ret) - krb5_err(context, 1, ret, "krb5_rd_req"); - - - if (server_flags & AP_OPTS_MUTUAL_REQUIRED) { - krb5_ap_rep_enc_part *repl; - - krb5_data_free(&data); - - if ((client_flags & AP_OPTS_MUTUAL_REQUIRED) == 0) - krb5_errx(context, 1, "client flag missing mutual req"); - - ret = krb5_mk_rep (context, server_ac, &data); - if (ret) - krb5_err(context, 1, ret, "krb5_mk_rep"); - - ret = krb5_rd_rep (context, - client_ac, - &data, - &repl); - if (ret) - krb5_err(context, 1, ret, "krb5_rd_rep"); - - krb5_free_ap_rep_enc_part (context, repl); - } else { - if (client_flags & AP_OPTS_MUTUAL_REQUIRED) - krb5_errx(context, 1, "server flag missing mutual req"); - } - - krb5_auth_con_getremoteseqnumber(context, server_ac, &server_seq); - krb5_auth_con_getremoteseqnumber(context, client_ac, &client_seq); - if (server_seq != client_seq) - krb5_errx(context, 1, "seq num differ"); - - krb5_auth_con_getlocalseqnumber(context, server_ac, &server_seq); - krb5_auth_con_getlocalseqnumber(context, client_ac, &client_seq); - if (server_seq != client_seq) - krb5_errx(context, 1, "seq num differ"); - - krb5_data_free(&data); - krb5_auth_con_free(context, client_ac); - krb5_auth_con_free(context, server_ac); - - if (verify_pac) { - krb5_pac pac; - - ret = krb5_ticket_get_authorization_data_type(context, - ticket, - KRB5_AUTHDATA_WIN2K_PAC, - &data); - if (ret) - krb5_err(context, 1, ret, "get pac"); - - ret = krb5_pac_parse(context, data.data, data.length, &pac); - if (ret) - krb5_err(context, 1, ret, "pac parse"); - - krb5_pac_free(context, pac); - } - - krb5_free_ticket(context, ticket); -} - - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int optidx = 0; - const char *principal, *keytab, *ccache; - krb5_ccache id; - krb5_keytab kt; - krb5_principal sprincipal, server; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - if (argc < 3) - usage(1); - - principal = argv[0]; - keytab = argv[1]; - ccache = argv[2]; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - ret = krb5_cc_resolve(context, ccache, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_resolve"); - - ret = krb5_parse_name(context, principal, &sprincipal); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_kt_resolve(context, keytab, &kt); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_resolve"); - - if (server_any) - server = NULL; - else - server = sprincipal; - - test_ap(context, sprincipal, server, kt, id, 0); - test_ap(context, sprincipal, server, kt, id, AP_OPTS_MUTUAL_REQUIRED); - - krb5_cc_close(context, id); - krb5_kt_close(context, kt); - krb5_free_principal(context, sprincipal); - - krb5_free_context(context); - - return ret; -} diff --git a/kerberosV/src/lib/krb5/test_cc.c b/kerberosV/src/lib/krb5/test_cc.c deleted file mode 100644 index 911fba52405..00000000000 --- a/kerberosV/src/lib/krb5/test_cc.c +++ /dev/null @@ -1,736 +0,0 @@ -/* - * Copyright (c) 2003 - 2007 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 "krb5_locl.h" -#include -#include - -static int debug_flag = 0; -static int version_flag = 0; -static int help_flag = 0; - -#ifdef KRB5_USE_PATH_TOKENS -#define TEST_CC_NAME "%{TEMP}/krb5-cc-test-foo" -#else -#define TEST_CC_NAME "/tmp/krb5-cc-test-foo" -#endif - -static void -test_default_name(krb5_context context) -{ - krb5_error_code ret; - const char *p, *test_cc_name = TEST_CC_NAME; - char *p1, *p2, *p3; - - p = krb5_cc_default_name(context); - if (p == NULL) - krb5_errx (context, 1, "krb5_cc_default_name 1 failed"); - p1 = estrdup(p); - - ret = krb5_cc_set_default_name(context, NULL); - if (p == NULL) - krb5_errx (context, 1, "krb5_cc_set_default_name failed"); - - p = krb5_cc_default_name(context); - if (p == NULL) - krb5_errx (context, 1, "krb5_cc_default_name 2 failed"); - p2 = estrdup(p); - - if (strcmp(p1, p2) != 0) - krb5_errx (context, 1, "krb5_cc_default_name no longer same"); - - ret = krb5_cc_set_default_name(context, test_cc_name); - if (p == NULL) - krb5_errx (context, 1, "krb5_cc_set_default_name 1 failed"); - - p = krb5_cc_default_name(context); - if (p == NULL) - krb5_errx (context, 1, "krb5_cc_default_name 2 failed"); - p3 = estrdup(p); - -#ifndef KRB5_USE_PATH_TOKENS - /* If we are using path tokens, we don't expect the p3 and - test_cc_name to match since p3 is going to have expanded - tokens. */ - if (strcmp(p3, test_cc_name) != 0) - krb5_errx (context, 1, "krb5_cc_set_default_name 1 failed"); -#endif - - free(p1); - free(p2); - free(p3); -} - -/* - * Check that a closed cc still keeps it data and that it's no longer - * there when it's destroyed. - */ - -static void -test_mcache(krb5_context context) -{ - krb5_error_code ret; - krb5_ccache id, id2; - const char *nc, *tc; - char *c; - krb5_principal p, p2; - - ret = krb5_parse_name(context, "lha@SU.SE", &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_cc_new_unique(context, krb5_cc_type_memory, NULL, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_new_unique"); - - ret = krb5_cc_initialize(context, id, p); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_initialize"); - - nc = krb5_cc_get_name(context, id); - if (nc == NULL) - krb5_errx(context, 1, "krb5_cc_get_name"); - - tc = krb5_cc_get_type(context, id); - if (tc == NULL) - krb5_errx(context, 1, "krb5_cc_get_name"); - - if (asprintf(&c, "%s:%s", tc, nc) < 0 || c == NULL) - errx(1, "malloc"); - - krb5_cc_close(context, id); - - ret = krb5_cc_resolve(context, c, &id2); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_resolve"); - - ret = krb5_cc_get_principal(context, id2, &p2); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_get_principal"); - - if (krb5_principal_compare(context, p, p2) == FALSE) - krb5_errx(context, 1, "p != p2"); - - krb5_cc_destroy(context, id2); - krb5_free_principal(context, p); - krb5_free_principal(context, p2); - - ret = krb5_cc_resolve(context, c, &id2); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_resolve"); - - ret = krb5_cc_get_principal(context, id2, &p2); - if (ret == 0) - krb5_errx(context, 1, "krb5_cc_get_principal"); - - krb5_cc_destroy(context, id2); - free(c); -} - -/* - * Test that init works on a destroyed cc. - */ - -static void -test_init_vs_destroy(krb5_context context, const char *type) -{ - krb5_error_code ret; - krb5_ccache id, id2; - krb5_principal p, p2; - char *n = NULL; - - ret = krb5_parse_name(context, "lha@SU.SE", &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_cc_new_unique(context, type, NULL, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_new_unique: %s", type); - - if (asprintf(&n, "%s:%s", - krb5_cc_get_type(context, id), - krb5_cc_get_name(context, id)) < 0 || n == NULL) - errx(1, "malloc"); - - - ret = krb5_cc_resolve(context, n, &id2); - free(n); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_resolve"); - - krb5_cc_destroy(context, id); - - ret = krb5_cc_initialize(context, id2, p); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_initialize"); - - ret = krb5_cc_get_principal(context, id2, &p2); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_get_principal"); - - krb5_cc_destroy(context, id2); - krb5_free_principal(context, p); - krb5_free_principal(context, p2); -} - -static void -test_cache_remove(krb5_context context, const char *type) -{ - krb5_error_code ret; - krb5_ccache id; - krb5_principal p; - krb5_creds cred; - - ret = krb5_parse_name(context, "lha@SU.SE", &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_cc_new_unique(context, type, NULL, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_gen_new: %s", type); - - ret = krb5_cc_initialize(context, id, p); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_initialize"); - - /* */ - memset(&cred, 0, sizeof(cred)); - ret = krb5_parse_name(context, "krbtgt/SU.SE@SU.SE", &cred.server); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - ret = krb5_parse_name(context, "lha@SU.SE", &cred.client); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_cc_store_cred(context, id, &cred); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_store_cred"); - - ret = krb5_cc_remove_cred(context, id, 0, &cred); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_remove_cred"); - - ret = krb5_cc_destroy(context, id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_destroy"); - - krb5_free_principal(context, p); - krb5_free_principal(context, cred.server); - krb5_free_principal(context, cred.client); -} - -static void -test_mcc_default(void) -{ - krb5_context context; - krb5_error_code ret; - krb5_ccache id, id2; - int i; - - for (i = 0; i < 10; i++) { - - ret = krb5_init_context(&context); - if (ret) - krb5_err(context, 1, ret, "krb5_init_context"); - - ret = krb5_cc_set_default_name(context, "MEMORY:foo"); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_set_default_name"); - - ret = krb5_cc_default(context, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_default"); - - ret = krb5_cc_default(context, &id2); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_default"); - - ret = krb5_cc_close(context, id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_close"); - - ret = krb5_cc_close(context, id2); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_close"); - - krb5_free_context(context); - } -} - -struct { - char *str; - int fail; - char *res; -} cc_names[] = { - { "foo", 0, "foo" }, - { "foo%}", 0, "foo%}" }, - { "%{uid}", 0 }, - { "foo%{null}", 0, "foo" }, - { "foo%{null}bar", 0, "foobar" }, - { "%{", 1 }, - { "%{foo %{", 1 }, - { "%{{", 1 }, - { "%{{}", 1 }, - { "%{nulll}", 1 }, - { "%{does not exist}", 1 }, - { "%{}", 1 }, -#ifdef KRB5_USE_PATH_TOKENS - { "%{APPDATA}", 0 }, - { "%{COMMON_APPDATA}", 0}, - { "%{LOCAL_APPDATA}", 0}, - { "%{SYSTEM}", 0}, - { "%{WINDOWS}", 0}, - { "%{TEMP}", 0}, - { "%{USERID}", 0}, - { "%{uid}", 0}, - { "%{USERCONFIG}", 0}, - { "%{COMMONCONFIG}", 0}, - { "%{LIBDIR}", 0}, - { "%{BINDIR}", 0}, - { "%{LIBEXEC}", 0}, - { "%{SBINDIR}", 0}, -#endif -}; - -static void -test_def_cc_name(krb5_context context) -{ - krb5_error_code ret; - char *str; - int i; - - for (i = 0; i < sizeof(cc_names)/sizeof(cc_names[0]); i++) { - ret = _krb5_expand_default_cc_name(context, cc_names[i].str, &str); - if (ret) { - if (cc_names[i].fail == 0) - krb5_errx(context, 1, "test %d \"%s\" failed", - i, cc_names[i].str); - } else { - if (cc_names[i].fail) - krb5_errx(context, 1, "test %d \"%s\" was successful", - i, cc_names[i].str); - if (cc_names[i].res && strcmp(cc_names[i].res, str) != 0) - krb5_errx(context, 1, "test %d %s != %s", - i, cc_names[i].res, str); - if (debug_flag) - printf("%s => %s\n", cc_names[i].str, str); - free(str); - } - } -} - -static void -test_cache_find(krb5_context context, const char *principal, int find) -{ - krb5_principal client; - krb5_error_code ret; - krb5_ccache id = NULL; - - ret = krb5_parse_name(context, principal, &client); - if (ret) - krb5_err(context, 1, ret, "parse_name for %s failed", principal); - - ret = krb5_cc_cache_match(context, client, &id); - if (ret && find) - krb5_err(context, 1, ret, "cc_cache_match for %s failed", principal); - if (ret == 0 && !find) - krb5_err(context, 1, ret, "cc_cache_match for %s found", principal); - - if (id) - krb5_cc_close(context, id); - krb5_free_principal(context, client); -} - - -static void -test_cache_iter(krb5_context context, const char *type, int destroy) -{ - krb5_cc_cache_cursor cursor; - krb5_error_code ret; - krb5_ccache id; - - ret = krb5_cc_cache_get_first (context, type, &cursor); - if (ret == KRB5_CC_NOSUPP) - return; - else if (ret) - krb5_err(context, 1, ret, "krb5_cc_cache_get_first(%s)", type); - - - while ((ret = krb5_cc_cache_next (context, cursor, &id)) == 0) { - krb5_principal principal; - char *name; - - if (debug_flag) - printf("name: %s\n", krb5_cc_get_name(context, id)); - ret = krb5_cc_get_principal(context, id, &principal); - if (ret == 0) { - ret = krb5_unparse_name(context, principal, &name); - if (ret == 0) { - if (debug_flag) - printf("\tprincipal: %s\n", name); - free(name); - } - krb5_free_principal(context, principal); - } - if (destroy) - krb5_cc_destroy(context, id); - else - krb5_cc_close(context, id); - } - - krb5_cc_cache_end_seq_get(context, cursor); -} - -static void -test_cache_iter_all(krb5_context context) -{ - krb5_cccol_cursor cursor; - krb5_error_code ret; - krb5_ccache id; - - ret = krb5_cccol_cursor_new (context, &cursor); - if (ret) - krb5_err(context, 1, ret, "krb5_cccol_cursor_new"); - - - while ((ret = krb5_cccol_cursor_next (context, cursor, &id)) == 0 && id != NULL) { - krb5_principal principal; - char *name; - - if (debug_flag) - printf("name: %s\n", krb5_cc_get_name(context, id)); - ret = krb5_cc_get_principal(context, id, &principal); - if (ret == 0) { - ret = krb5_unparse_name(context, principal, &name); - if (ret == 0) { - if (debug_flag) - printf("\tprincipal: %s\n", name); - free(name); - } - krb5_free_principal(context, principal); - } - krb5_cc_close(context, id); - } - - krb5_cccol_cursor_free(context, &cursor); -} - - -static void -test_copy(krb5_context context, const char *from, const char *to) -{ - krb5_ccache fromid, toid; - krb5_error_code ret; - krb5_principal p, p2; - - ret = krb5_parse_name(context, "lha@SU.SE", &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_cc_new_unique(context, from, NULL, &fromid); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_new_unique: %s", from); - - ret = krb5_cc_initialize(context, fromid, p); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_initialize"); - - ret = krb5_cc_new_unique(context, to, NULL, &toid); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_gen_new: %s", to); - - ret = krb5_cc_copy_cache(context, fromid, toid); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_copy_cache"); - - ret = krb5_cc_get_principal(context, toid, &p2); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_get_principal"); - - if (krb5_principal_compare(context, p, p2) == FALSE) - krb5_errx(context, 1, "p != p2"); - - krb5_free_principal(context, p); - krb5_free_principal(context, p2); - - krb5_cc_destroy(context, fromid); - krb5_cc_destroy(context, toid); -} - -static void -test_move(krb5_context context, const char *type) -{ - const krb5_cc_ops *ops; - krb5_ccache fromid, toid; - krb5_error_code ret; - krb5_principal p, p2; - - ops = krb5_cc_get_prefix_ops(context, type); - if (ops == NULL) - return; - - ret = krb5_cc_new_unique(context, type, NULL, &fromid); - if (ret == KRB5_CC_NOSUPP) - return; - else if (ret) - krb5_err(context, 1, ret, "krb5_cc_new_unique: %s", type); - - ret = krb5_parse_name(context, "lha@SU.SE", &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_cc_initialize(context, fromid, p); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_initialize"); - - ret = krb5_cc_new_unique(context, type, NULL, &toid); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_new_unique"); - - ret = krb5_cc_initialize(context, toid, p); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_initialize"); - - ret = krb5_cc_get_principal(context, toid, &p2); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_get_principal"); - - if (krb5_principal_compare(context, p, p2) == FALSE) - krb5_errx(context, 1, "p != p2"); - - krb5_free_principal(context, p); - krb5_free_principal(context, p2); - - krb5_cc_destroy(context, toid); - krb5_cc_destroy(context, fromid); -} - - -static void -test_prefix_ops(krb5_context context, const char *name, const krb5_cc_ops *ops) -{ - const krb5_cc_ops *o; - - o = krb5_cc_get_prefix_ops(context, name); - if (o == NULL) - krb5_errx(context, 1, "found no match for prefix '%s'", name); - if (strcmp(o->prefix, ops->prefix) != 0) - krb5_errx(context, 1, "ops for prefix '%s' is not " - "the expected %s != %s", name, o->prefix, ops->prefix); -} - -static void -test_cc_config(krb5_context context) -{ - krb5_error_code ret; - krb5_principal p; - krb5_ccache id; - unsigned int i; - - ret = krb5_cc_new_unique(context, "MEMORY", "bar", &id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_new_unique"); - - ret = krb5_parse_name(context, "lha@SU.SE", &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_cc_initialize(context, id, p); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_initialize"); - - for (i = 0; i < 1000; i++) { - krb5_data data, data2; - const char *name = "foo"; - krb5_principal p1 = NULL; - - if (i & 1) - p1 = p; - - data.data = rk_UNCONST(name); - data.length = strlen(name); - - ret = krb5_cc_set_config(context, id, p1, "FriendlyName", &data); - if (ret) - krb5_errx(context, 1, "krb5_cc_set_config: add"); - - ret = krb5_cc_get_config(context, id, p1, "FriendlyName", &data2); - if (ret) - krb5_errx(context, 1, "krb5_cc_get_config: first"); - krb5_data_free(&data2); - - ret = krb5_cc_set_config(context, id, p1, "FriendlyName", &data); - if (ret) - krb5_errx(context, 1, "krb5_cc_set_config: add -second"); - - ret = krb5_cc_get_config(context, id, p1, "FriendlyName", &data2); - if (ret) - krb5_errx(context, 1, "krb5_cc_get_config: second"); - krb5_data_free(&data2); - - ret = krb5_cc_set_config(context, id, p1, "FriendlyName", NULL); - if (ret) - krb5_errx(context, 1, "krb5_cc_set_config: delete"); - - ret = krb5_cc_get_config(context, id, p1, "FriendlyName", &data2); - if (ret == 0) - krb5_errx(context, 1, "krb5_cc_get_config: non-existant"); - } - - krb5_cc_destroy(context, id); - krb5_free_principal(context, p); -} - - -static struct getargs args[] = { - {"debug", 'd', arg_flag, &debug_flag, - "turn on debuggin", NULL }, - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, sizeof(args)/sizeof(*args), NULL, "hostname ..."); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int optidx = 0; - krb5_ccache id1, id2; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - test_cache_remove(context, krb5_cc_type_file); - test_cache_remove(context, krb5_cc_type_memory); -#ifdef USE_SQLITE - test_cache_remove(context, krb5_cc_type_scc); -#endif - - test_default_name(context); - test_mcache(context); - test_init_vs_destroy(context, krb5_cc_type_memory); - test_init_vs_destroy(context, krb5_cc_type_file); -#if 0 - test_init_vs_destroy(context, krb5_cc_type_api); -#endif - test_init_vs_destroy(context, krb5_cc_type_scc); - test_mcc_default(); - test_def_cc_name(context); - - test_cache_iter_all(context); - - test_cache_iter(context, krb5_cc_type_memory, 0); - { - krb5_principal p; - krb5_cc_new_unique(context, krb5_cc_type_memory, "bar", &id1); - krb5_cc_new_unique(context, krb5_cc_type_memory, "baz", &id2); - krb5_parse_name(context, "lha@SU.SE", &p); - krb5_cc_initialize(context, id1, p); - krb5_free_principal(context, p); - } - - test_cache_find(context, "lha@SU.SE", 1); - test_cache_find(context, "hulabundulahotentot@SU.SE", 0); - - test_cache_iter(context, krb5_cc_type_memory, 0); - test_cache_iter(context, krb5_cc_type_memory, 1); - test_cache_iter(context, krb5_cc_type_memory, 0); - test_cache_iter(context, krb5_cc_type_file, 0); - test_cache_iter(context, krb5_cc_type_api, 0); - test_cache_iter(context, krb5_cc_type_scc, 0); - test_cache_iter(context, krb5_cc_type_scc, 1); - - test_copy(context, krb5_cc_type_file, krb5_cc_type_file); - test_copy(context, krb5_cc_type_memory, krb5_cc_type_memory); - test_copy(context, krb5_cc_type_file, krb5_cc_type_memory); - test_copy(context, krb5_cc_type_memory, krb5_cc_type_file); - test_copy(context, krb5_cc_type_scc, krb5_cc_type_file); - test_copy(context, krb5_cc_type_file, krb5_cc_type_scc); - test_copy(context, krb5_cc_type_scc, krb5_cc_type_memory); - test_copy(context, krb5_cc_type_memory, krb5_cc_type_scc); - - test_move(context, krb5_cc_type_file); - test_move(context, krb5_cc_type_memory); -#ifdef HAVE_KCM - test_move(context, krb5_cc_type_kcm); -#endif - test_move(context, krb5_cc_type_scc); - - test_prefix_ops(context, "FILE:/tmp/foo", &krb5_fcc_ops); - test_prefix_ops(context, "FILE", &krb5_fcc_ops); - test_prefix_ops(context, "MEMORY", &krb5_mcc_ops); - test_prefix_ops(context, "MEMORY:foo", &krb5_mcc_ops); - test_prefix_ops(context, "/tmp/kaka", &krb5_fcc_ops); -#ifdef HAVE_SCC - test_prefix_ops(context, "SCC:", &krb5_scc_ops); - test_prefix_ops(context, "SCC:foo", &krb5_scc_ops); -#endif - - krb5_cc_destroy(context, id1); - krb5_cc_destroy(context, id2); - - test_cc_config(context); - - krb5_free_context(context); - -#if 0 - sleep(60); -#endif - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_config.c b/kerberosV/src/lib/krb5/test_config.c deleted file mode 100644 index a2816332dab..00000000000 --- a/kerberosV/src/lib/krb5/test_config.c +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright (c) 2003 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 "krb5_locl.h" -#include - -static int -check_config_file(krb5_context context, char *filelist, char **res, int def) -{ - krb5_error_code ret; - char **pp; - int i; - - pp = NULL; - - if (def) - ret = krb5_prepend_config_files_default(filelist, &pp); - else - ret = krb5_prepend_config_files(filelist, NULL, &pp); - - if (ret) - krb5_err(context, 1, ret, "prepend_config_files"); - - for (i = 0; res[i] && pp[i]; i++) - if (strcmp(pp[i], res[i]) != 0) - krb5_errx(context, 1, "'%s' != '%s'", pp[i], res[i]); - - if (res[i] != NULL) - krb5_errx(context, 1, "pp ended before res list"); - - if (def) { - char **deflist; - int j; - - ret = krb5_get_default_config_files(&deflist); - if (ret) - krb5_err(context, 1, ret, "get_default_config_files"); - - for (j = 0 ; pp[i] && deflist[j]; i++, j++) - if (strcmp(pp[i], deflist[j]) != 0) - krb5_errx(context, 1, "'%s' != '%s'", pp[i], deflist[j]); - - if (deflist[j] != NULL) - krb5_errx(context, 1, "pp ended before def list"); - krb5_free_config_files(deflist); - } - - if (pp[i] != NULL) - krb5_errx(context, 1, "pp ended after res (and def) list"); - - krb5_free_config_files(pp); - - return 0; -} - -char *list0[] = { "/tmp/foo", NULL }; -char *list1[] = { "/tmp/foo", "/tmp/foo/bar", NULL }; -char *list2[] = { "", NULL }; - -struct { - char *fl; - char **res; -} test[] = { - { "/tmp/foo", NULL }, - { "/tmp/foo" PATH_SEP "/tmp/foo/bar", NULL }, - { "", NULL } -}; - -static void -check_config_files(void) -{ - krb5_context context; - krb5_error_code ret; - int i; - - ret = krb5_init_context(&context); - if (ret) - errx(1, "krb5_init_context %d", ret); - - test[0].res = list0; - test[1].res = list1; - test[2].res = list2; - - for (i = 0; i < sizeof(test)/sizeof(*test); i++) { - check_config_file(context, test[i].fl, test[i].res, 0); - check_config_file(context, test[i].fl, test[i].res, 1); - } - - krb5_free_context(context); -} - -const char *config_string_result0[] = { - "A", "B", "C", "D", NULL -}; - -const char *config_string_result1[] = { - "A", "B", "C D", NULL -}; - -const char *config_string_result2[] = { - "A", "B", "", NULL -}; - -const char *config_string_result3[] = { - "A B;C: D", NULL -}; - -const char *config_string_result4[] = { - "\"\"", "", "\"\"", NULL -}; - -const char *config_string_result5[] = { - "A\"BQd", NULL -}; - -const char *config_string_result6[] = { - "efgh\"", "ABC", NULL -}; - -const char *config_string_result7[] = { - "SnapeKills\\", "Dumbledore", NULL -}; - -const char *config_string_result8[] = { - "\"TownOf Sandwich: Massachusetts\"Oldest", "Town", "In", "Cape Cod", NULL -}; - -const char *config_string_result9[] = { - "\"Begins and\"ends", "In", "One", "String", NULL -}; - -const char *config_string_result10[] = { - "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.", - "Why do we test with such long strings? Because some people have config files", - "That", "look", "Like this.", NULL -}; - -const struct { - const char * name; - const char ** expected; -} config_strings_tests[] = { - { "foo", config_string_result0 }, - { "bar", config_string_result1 }, - { "baz", config_string_result2 }, - { "quux", config_string_result3 }, - { "questionable", config_string_result4 }, - { "mismatch1", config_string_result5 }, - { "mismatch2", config_string_result6 }, - { "internal1", config_string_result7 }, - { "internal2", config_string_result8 }, - { "internal3", config_string_result9 }, - { "longer_strings", config_string_result10 } -}; - -static void -check_escaped_strings(void) -{ - krb5_context context; - krb5_config_section *c = NULL; - krb5_error_code ret; - int i; - - ret = krb5_init_context(&context); - if (ret) - errx(1, "krb5_init_context %d", ret); - - ret = krb5_config_parse_file(context, "test_config_strings.out", &c); - if (ret) - krb5_errx(context, 1, "krb5_config_parse_file()"); - - for (i=0; i < sizeof(config_strings_tests)/sizeof(config_strings_tests[0]); i++) { - char **ps; - const char **s; - const char **e; - - ps = krb5_config_get_strings(context, c, "escapes", config_strings_tests[i].name, - NULL); - if (ps == NULL) - errx(1, "Failed to read string value %s", config_strings_tests[i].name); - - e = config_strings_tests[i].expected; - - for (s = (const char **)ps; *s && *e; s++, e++) { - if (strcmp(*s, *e)) - errx(1, - "Unexpected configuration string at value [%s].\n" - "Actual=[%s]\n" - "Expected=[%s]\n", - config_strings_tests[i].name, *s, *e); - } - - if (*s || *e) - errx(1, "Configuation string list for value [%s] has incorrect length.", - config_strings_tests[i].name); - - krb5_config_free_strings(ps); - } - - ret = krb5_config_file_free(context, c); - if (ret) - krb5_errx(context, 1, "krb5_config_file_free()"); - - krb5_free_context(context); -} - -int -main(int argc, char **argv) -{ - check_config_files(); - check_escaped_strings(); - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_config_strings.cfg b/kerberosV/src/lib/krb5/test_config_strings.cfg deleted file mode 100644 index c62201b1336..00000000000 --- a/kerberosV/src/lib/krb5/test_config_strings.cfg +++ /dev/null @@ -1,12 +0,0 @@ -[escapes] - foo = A B C D - bar = A B "C D" - baz = A B "" - quux = "A B;C: D" - questionable="""" "" """" - mismatch1 = A"BQd - mismatch2 = efgh" ABC - internal1 = "SnapeKills\" "Dumbledore" - internal2 = "TownOf Sandwich: Massachusetts"Oldest Town In "Cape Cod" - internal3 = "Begins and"ends In One String - longer_strings = "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." "Why do we test with such long strings? Because some people have config files" That look "Like this." diff --git a/kerberosV/src/lib/krb5/test_crypto.c b/kerberosV/src/lib/krb5/test_crypto.c deleted file mode 100644 index b37263238f5..00000000000 --- a/kerberosV/src/lib/krb5/test_crypto.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2003-2005 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 "krb5_locl.h" -#include -#include - -static void -time_encryption(krb5_context context, size_t size, - krb5_enctype etype, int iterations) -{ - struct timeval tv1, tv2; - krb5_error_code ret; - krb5_keyblock key; - krb5_crypto crypto; - krb5_data data; - char *etype_name; - void *buf; - int i; - - ret = krb5_generate_random_keyblock(context, etype, &key); - if (ret) - krb5_err(context, 1, ret, "krb5_generate_random_keyblock"); - - ret = krb5_enctype_to_string(context, etype, &etype_name); - if (ret) - krb5_err(context, 1, ret, "krb5_enctype_to_string"); - - buf = malloc(size); - if (buf == NULL) - krb5_errx(context, 1, "out of memory"); - memset(buf, 0, size); - - ret = krb5_crypto_init(context, &key, 0, &crypto); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_init"); - - gettimeofday(&tv1, NULL); - - for (i = 0; i < iterations; i++) { - ret = krb5_encrypt(context, crypto, 0, buf, size, &data); - if (ret) - krb5_err(context, 1, ret, "encrypt: %d", i); - krb5_data_free(&data); - } - - gettimeofday(&tv2, NULL); - - timevalsub(&tv2, &tv1); - - printf("%s size: %7lu iterations: %d time: %3lld.%06ld\n", - etype_name, (unsigned long)size, iterations, - (long long)tv2.tv_sec, tv2.tv_usec); - - free(buf); - free(etype_name); - krb5_crypto_destroy(context, crypto); - krb5_free_keyblock_contents(context, &key); -} - -static void -time_s2k(krb5_context context, - krb5_enctype etype, - const char *password, - krb5_salt salt, - int iterations) -{ - struct timeval tv1, tv2; - krb5_error_code ret; - krb5_keyblock key; - krb5_data opaque; - char *etype_name; - int i; - - ret = krb5_enctype_to_string(context, etype, &etype_name); - if (ret) - krb5_err(context, 1, ret, "krb5_enctype_to_string"); - - opaque.data = NULL; - opaque.length = 0; - - gettimeofday(&tv1, NULL); - - for (i = 0; i < iterations; i++) { - ret = krb5_string_to_key_salt_opaque(context, etype, password, salt, - opaque, &key); - if (ret) - krb5_err(context, 1, ret, "krb5_string_to_key_data_salt_opaque"); - krb5_free_keyblock_contents(context, &key); - } - - gettimeofday(&tv2, NULL); - - timevalsub(&tv2, &tv1); - - printf("%s string2key %d iterations time: %3lld.%06ld\n", - etype_name, iterations, (long long)tv2.tv_sec, tv2.tv_usec); - free(etype_name); - -} - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int i, enciter, s2kiter; - int optidx = 0; - krb5_salt salt; - - krb5_enctype enctypes[] = { - ETYPE_DES_CBC_CRC, - ETYPE_DES3_CBC_SHA1, - ETYPE_ARCFOUR_HMAC_MD5, - ETYPE_AES128_CTS_HMAC_SHA1_96, - ETYPE_AES256_CTS_HMAC_SHA1_96 - }; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - salt.salttype = KRB5_PW_SALT; - salt.saltvalue.data = NULL; - salt.saltvalue.length = 0; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - enciter = 1000; - s2kiter = 100; - - for (i = 0; i < sizeof(enctypes)/sizeof(enctypes[0]); i++) { - - krb5_enctype_enable(context, enctypes[i]); - - time_encryption(context, 16, enctypes[i], enciter); - time_encryption(context, 32, enctypes[i], enciter); - time_encryption(context, 512, enctypes[i], enciter); - time_encryption(context, 1024, enctypes[i], enciter); - time_encryption(context, 2048, enctypes[i], enciter); - time_encryption(context, 4096, enctypes[i], enciter); - time_encryption(context, 8192, enctypes[i], enciter); - time_encryption(context, 16384, enctypes[i], enciter); - time_encryption(context, 32768, enctypes[i], enciter); - - time_s2k(context, enctypes[i], "mYsecreitPassword", salt, s2kiter); - } - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_crypto_wrapping.c b/kerberosV/src/lib/krb5/test_crypto_wrapping.c deleted file mode 100644 index 81905a8eadd..00000000000 --- a/kerberosV/src/lib/krb5/test_crypto_wrapping.c +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2005 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 "krb5_locl.h" -#include -#include - -static void -test_wrapping(krb5_context context, - size_t min_size, - size_t max_size, - size_t step, - krb5_enctype etype) -{ - krb5_error_code ret; - krb5_keyblock key; - krb5_crypto crypto; - krb5_data data; - char *etype_name; - void *buf; - size_t size; - - ret = krb5_generate_random_keyblock(context, etype, &key); - if (ret) - krb5_err(context, 1, ret, "krb5_generate_random_keyblock"); - - ret = krb5_enctype_to_string(context, etype, &etype_name); - if (ret) - krb5_err(context, 1, ret, "krb5_enctype_to_string"); - - buf = malloc(max_size); - if (buf == NULL) - krb5_errx(context, 1, "out of memory"); - memset(buf, 0, max_size); - - ret = krb5_crypto_init(context, &key, 0, &crypto); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_init"); - - for (size = min_size; size < max_size; size += step) { - size_t wrapped_size; - - ret = krb5_encrypt(context, crypto, 0, buf, size, &data); - if (ret) - krb5_err(context, 1, ret, "encrypt size %lu using %s", - (unsigned long)size, etype_name); - - wrapped_size = krb5_get_wrapped_length(context, crypto, size); - - if (wrapped_size != data.length) - krb5_errx(context, 1, "calculated wrapped length %lu != " - "real wrapped length %lu for data length %lu using " - "enctype %s", - (unsigned long)wrapped_size, - (unsigned long)data.length, - (unsigned long)size, - etype_name); - krb5_data_free(&data); - } - - free(etype_name); - free(buf); - krb5_crypto_destroy(context, crypto); - krb5_free_keyblock_contents(context, &key); -} - - - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int i, optidx = 0; - - krb5_enctype enctypes[] = { -#ifdef HEIM_WEAK_CRYPTO - ETYPE_DES_CBC_CRC, - ETYPE_DES_CBC_MD4, - ETYPE_DES_CBC_MD5, -#endif - ETYPE_DES3_CBC_SHA1, - ETYPE_ARCFOUR_HMAC_MD5, - ETYPE_AES128_CTS_HMAC_SHA1_96, - ETYPE_AES256_CTS_HMAC_SHA1_96 - }; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - for (i = 0; i < sizeof(enctypes)/sizeof(enctypes[0]); i++) { - krb5_enctype_enable(context, enctypes[i]); - - test_wrapping(context, 0, 1024, 1, enctypes[i]); - test_wrapping(context, 1024, 1024 * 100, 1024, enctypes[i]); - } - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_forward.c b/kerberosV/src/lib/krb5/test_forward.c deleted file mode 100644 index 3782e5074f6..00000000000 --- a/kerberosV/src/lib/krb5/test_forward.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2008 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 "krb5_locl.h" -#include -#include - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - "hostname"); - exit (ret); -} - -int -main(int argc, char **argv) -{ - const char *hostname; - krb5_context context; - krb5_auth_context ac; - krb5_error_code ret; - krb5_creds cred; - krb5_ccache id; - krb5_data data; - int optidx = 0; - - setprogname (argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - if (argc < 1) - usage(1); - - hostname = argv[0]; - - memset(&cred, 0, sizeof(cred)); - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - ret = krb5_cc_default(context, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_default failed"); - - ret = krb5_auth_con_init(context, &ac); - if (ret) - krb5_err(context, 1, ret, "krb5_auth_con_init failed"); - - krb5_auth_con_addflags(context, ac, - KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED, NULL); - - ret = krb5_cc_get_principal(context, id, &cred.client); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_get_principal"); - - ret = krb5_make_principal(context, - &cred.server, - krb5_principal_get_realm(context, cred.client), - KRB5_TGS_NAME, - krb5_principal_get_realm(context, cred.client), - NULL); - if (ret) - krb5_err(context, 1, ret, "krb5_make_principal(server)"); - - ret = krb5_get_forwarded_creds (context, - ac, - id, - KDC_OPT_FORWARDABLE, - hostname, - &cred, - &data); - if (ret) - krb5_err (context, 1, ret, "krb5_get_forwarded_creds"); - - krb5_data_free(&data); - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_fx.c b/kerberosV/src/lib/krb5/test_fx.c deleted file mode 100644 index 10aa2aebdc7..00000000000 --- a/kerberosV/src/lib/krb5/test_fx.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright (c) 2009 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 "krb5_locl.h" -#include -#include - -struct { - char *p1; - char *pepper1; - krb5_enctype e1; - char *p2; - char *pepper2; - krb5_enctype e2; - krb5_enctype e3; - char *key; - size_t len; -} cf2[] = { - { - "key1", "a", ETYPE_AES128_CTS_HMAC_SHA1_96, - "key2", "b", ETYPE_AES128_CTS_HMAC_SHA1_96, - ETYPE_AES128_CTS_HMAC_SHA1_96, - "\x97\xdf\x97\xe4\xb7\x98\xb2\x9e\xb3\x1e\xd7\x28\x02\x87\xa9\x2a", - 16 - }, - { - "key1", "a", ETYPE_AES256_CTS_HMAC_SHA1_96, - "key2", "b", ETYPE_AES256_CTS_HMAC_SHA1_96, - ETYPE_AES256_CTS_HMAC_SHA1_96, - "\x4d\x6c\xa4\xe6\x29\x78\x5c\x1f\x01\xba\xf5\x5e\x2e\x54\x85\x66" - "\xb9\x61\x7a\xe3\xa9\x68\x68\xc3\x37\xcb\x93\xb5\xe7\x2b\x1c\x7b", - 32 - }, - { - "key1", "a", ETYPE_AES128_CTS_HMAC_SHA1_96, - "key2", "b", ETYPE_AES128_CTS_HMAC_SHA1_96, - ETYPE_AES256_CTS_HMAC_SHA1_96, - "\x97\xdf\x97\xe4\xb7\x98\xb2\x9e\xb3\x1e\xd7\x28\x2\x87\xa9\x2a" - "\x1\x96\xfa\xf2\x44\xf8\x11\x20\xc2\x1c\x51\x17\xb3\xe6\xeb\x98", - 32 - }, - { - "key1", "a", ETYPE_AES256_CTS_HMAC_SHA1_96, - "key2", "b", ETYPE_AES256_CTS_HMAC_SHA1_96, - ETYPE_AES128_CTS_HMAC_SHA1_96, - "\x4d\x6c\xa4\xe6\x29\x78\x5c\x1f\x01\xba\xf5\x5e\x2e\x54\x85\x66", - 16 - }, - { - "key1", "a", ETYPE_AES128_CTS_HMAC_SHA1_96, - "key2", "b", ETYPE_AES256_CTS_HMAC_SHA1_96, - ETYPE_AES256_CTS_HMAC_SHA1_96, - "\x88\xbd\xb2\xa9\xf\x3e\x52\x5a\xb0\x5f\x68\xc5\x43\x9a\x4d\x5e" - "\x9c\x2b\xfd\x2b\x02\x24\xde\x39\xb5\x82\xf4\xbb\x05\xfe\x2\x2e", - 32 - } -}; - - -static void -test_cf2(krb5_context context) -{ - krb5_error_code ret; - krb5_data pw, p1, p2; - krb5_salt salt; - krb5_keyblock k1, k2, k3; - krb5_crypto c1, c2; - unsigned int i; - - for (i = 0; i < sizeof(cf2)/sizeof(cf2[0]); i++) { - pw.data = cf2[i].p1; - pw.length = strlen(cf2[i].p1); - salt.salttype = (krb5_salttype)KRB5_PADATA_PW_SALT; - salt.saltvalue.data = cf2[i].p1; - salt.saltvalue.length = strlen(cf2[i].p1); - - ret = krb5_string_to_key_data_salt(context, - cf2[i].e1, - pw, - salt, - &k1); - if (ret) - krb5_err(context, 1, ret, "krb5_string_to_key_data_salt"); - - ret = krb5_crypto_init(context, &k1, 0, &c1); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_init"); - - pw.data = cf2[i].p2; - pw.length = strlen(cf2[i].p2); - salt.saltvalue.data = cf2[i].p2; - salt.saltvalue.length = strlen(cf2[i].p2); - - ret = krb5_string_to_key_data_salt(context, - cf2[i].e2, - pw, - salt, - &k2); - if (ret) - krb5_err(context, 1, ret, "krb5_string_to_key_data_salt"); - - ret = krb5_crypto_init(context, &k2, 0, &c2); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_init"); - - - p1.data = cf2[i].pepper1; - p1.length = strlen(cf2[i].pepper1); - - p2.data = cf2[i].pepper2; - p2.length = strlen(cf2[i].pepper2); - - ret = krb5_crypto_fx_cf2(context, c1, c2, &p1, &p2, cf2[i].e3, &k3); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_fx_cf2"); - - if (k3.keytype != cf2[i].e3) - krb5_errx(context, 1, "length not right"); - if (k3.keyvalue.length != cf2[i].len || - memcmp(k3.keyvalue.data, cf2[i].key, cf2[i].len) != 0) - krb5_errx(context, 1, "key not same"); - - krb5_crypto_destroy(context, c1); - krb5_crypto_destroy(context, c2); - - krb5_free_keyblock_contents(context, &k1); - krb5_free_keyblock_contents(context, &k2); - krb5_free_keyblock_contents(context, &k3); - } -} - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int optidx = 0; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - test_cf2(context); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_get_addrs.c b/kerberosV/src/lib/krb5/test_get_addrs.c deleted file mode 100644 index 33ca929e6e8..00000000000 --- a/kerberosV/src/lib/krb5/test_get_addrs.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2000 - 2002 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 "krb5_locl.h" -#include -#include - -/* print all addresses that we find */ - -static void -print_addresses (krb5_context context, const krb5_addresses *addrs) -{ - int i; - char buf[256]; - size_t len; - - for (i = 0; i < addrs->len; ++i) { - krb5_print_address (&addrs->val[i], buf, sizeof(buf), &len); - printf ("%s\n", buf); - } -} - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - krb5_addresses addrs; - int optidx = 0; - - setprogname (argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - ret = krb5_get_all_client_addrs (context, &addrs); - if (ret) - krb5_err (context, 1, ret, "krb5_get_all_client_addrs"); - printf ("client addresses\n"); - print_addresses (context, &addrs); - krb5_free_addresses (context, &addrs); - - ret = krb5_get_all_server_addrs (context, &addrs); - if (ret) - krb5_err (context, 1, ret, "krb5_get_all_server_addrs"); - printf ("server addresses\n"); - print_addresses (context, &addrs); - krb5_free_addresses (context, &addrs); - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_gic.c b/kerberosV/src/lib/krb5/test_gic.c deleted file mode 100644 index f22a6930fcf..00000000000 --- a/kerberosV/src/lib/krb5/test_gic.c +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2009 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 "krb5_locl.h" -#include -#include - -static char *password_str; - -static krb5_error_code -lr_proc(krb5_context context, krb5_last_req_entry **e, void *ctx) -{ - while (e && *e) { - printf("e type: %d value: %d\n", (*e)->lr_type, (int)(*e)->value); - e++; - } - return 0; -} - -static void -test_get_init_creds(krb5_context context, - krb5_principal client) -{ - krb5_error_code ret; - krb5_get_init_creds_opt *opt; - krb5_creds cred; - - ret = krb5_get_init_creds_opt_alloc(context, &opt); - if (ret) - krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc"); - - - ret = krb5_get_init_creds_opt_set_process_last_req(context, - opt, - lr_proc, - NULL); - if (ret) - krb5_err(context, 1, ret, - "krb5_get_init_creds_opt_set_process_last_req"); - - ret = krb5_get_init_creds_password(context, - &cred, - client, - password_str, - krb5_prompter_posix, - NULL, - 0, - NULL, - opt); - if (ret) - krb5_err(context, 1, ret, "krb5_get_init_creds_password"); - - krb5_get_init_creds_opt_free(context, opt); -} - -static char *client_str = NULL; -static int debug_flag = 0; -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"client", 0, arg_string, &client_str, - "client principal to use", NULL }, - {"password",0, arg_string, &password_str, - "password", NULL }, - {"debug", 'd', arg_flag, &debug_flag, - "turn on debuggin", NULL }, - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, sizeof(args)/sizeof(*args), NULL, "hostname ..."); - exit (ret); -} - - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int optidx = 0, errors = 0; - krb5_principal client; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - if(client_str == NULL) - errx(1, "client is not set"); - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - ret = krb5_parse_name(context, client_str, &client); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name: %d", ret); - - test_get_init_creds(context, client); - - krb5_free_context(context); - - return errors; -} diff --git a/kerberosV/src/lib/krb5/test_hostname.c b/kerberosV/src/lib/krb5/test_hostname.c deleted file mode 100644 index fbdb5c9c322..00000000000 --- a/kerberosV/src/lib/krb5/test_hostname.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2005 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 "krb5_locl.h" -#include -#include - -static int debug_flag = 0; -static int version_flag = 0; -static int help_flag = 0; - -static int -expand_hostname(krb5_context context, const char *host) -{ - krb5_error_code ret; - char *h, **r; - - ret = krb5_expand_hostname(context, host, &h); - if (ret) - krb5_err(context, 1, ret, "krb5_expand_hostname(%s)", host); - - free(h); - - if (debug_flag) - printf("hostname: %s -> %s\n", host, h); - - ret = krb5_expand_hostname_realms(context, host, &h, &r); - if (ret) - krb5_err(context, 1, ret, "krb5_expand_hostname_realms(%s)", host); - - if (debug_flag) { - int j; - - printf("hostname: %s -> %s\n", host, h); - for (j = 0; r[j]; j++) { - printf("\trealm: %s\n", r[j]); - } - } - free(h); - krb5_free_host_realm(context, r); - - return 0; -} - -static int -test_expand_hostname(krb5_context context) -{ - int i, errors = 0; - - struct t { - krb5_error_code ret; - const char *orig_hostname; - const char *new_hostname; - } tests[] = { - { 0, "pstn1.su.se", "pstn1.su.se" }, - { 0, "pstnproxy.su.se", "pstnproxy.su.se" }, - }; - - for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) { - errors += expand_hostname(context, tests[i].orig_hostname); - } - - return errors; -} - -static struct getargs args[] = { - {"debug", 'd', arg_flag, &debug_flag, - "turn on debuggin", NULL }, - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, sizeof(args)/sizeof(*args), NULL, "hostname ..."); - exit (ret); -} - - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int optidx = 0, errors = 0; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - if (argc > 0) { - while (argc-- > 0) - errors += expand_hostname(context, *argv++); - return errors; - } - - errors += test_expand_hostname(context); - - krb5_free_context(context); - - return errors; -} diff --git a/kerberosV/src/lib/krb5/test_keytab.c b/kerberosV/src/lib/krb5/test_keytab.c deleted file mode 100644 index 134b0f17e69..00000000000 --- a/kerberosV/src/lib/krb5/test_keytab.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (c) 2005 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 "krb5_locl.h" -#include -#include - -/* - * Test that removal entry from of empty keytab doesn't corrupts - * memory. - */ - -static void -test_empty_keytab(krb5_context context, const char *keytab) -{ - krb5_error_code ret; - krb5_keytab id; - krb5_keytab_entry entry; - - ret = krb5_kt_resolve(context, keytab, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_resolve"); - - memset(&entry, 0, sizeof(entry)); - - krb5_kt_remove_entry(context, id, &entry); - - ret = krb5_kt_have_content(context, id); - if (ret == 0) - krb5_errx(context, 1, "supposed to be empty keytab isn't"); - - ret = krb5_kt_close(context, id); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_close"); -} - -/* - * Test that memory keytab are refcounted. - */ - -static void -test_memory_keytab(krb5_context context, const char *keytab, const char *keytab2) -{ - krb5_error_code ret; - krb5_keytab id, id2, id3; - krb5_keytab_entry entry, entry2, entry3; - - ret = krb5_kt_resolve(context, keytab, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_resolve"); - - memset(&entry, 0, sizeof(entry)); - ret = krb5_parse_name(context, "lha@SU.SE", &entry.principal); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - entry.vno = 1; - ret = krb5_generate_random_keyblock(context, - ETYPE_AES256_CTS_HMAC_SHA1_96, - &entry.keyblock); - if (ret) - krb5_err(context, 1, ret, "krb5_generate_random_keyblock"); - - krb5_kt_add_entry(context, id, &entry); - - ret = krb5_kt_resolve(context, keytab, &id2); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_resolve"); - - ret = krb5_kt_get_entry(context, id, - entry.principal, - 0, - ETYPE_AES256_CTS_HMAC_SHA1_96, - &entry2); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_get_entry"); - krb5_kt_free_entry(context, &entry2); - - ret = krb5_kt_close(context, id); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_close"); - - ret = krb5_kt_get_entry(context, id2, - entry.principal, - 0, - ETYPE_AES256_CTS_HMAC_SHA1_96, - &entry2); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_get_entry"); - krb5_kt_free_entry(context, &entry2); - - ret = krb5_kt_close(context, id2); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_close"); - - - ret = krb5_kt_resolve(context, keytab2, &id3); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_resolve"); - - memset(&entry3, 0, sizeof(entry3)); - ret = krb5_parse_name(context, "lha3@SU.SE", &entry3.principal); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - entry3.vno = 1; - ret = krb5_generate_random_keyblock(context, - ETYPE_AES256_CTS_HMAC_SHA1_96, - &entry3.keyblock); - if (ret) - krb5_err(context, 1, ret, "krb5_generate_random_keyblock"); - - krb5_kt_add_entry(context, id3, &entry3); - - - ret = krb5_kt_resolve(context, keytab, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_resolve"); - - ret = krb5_kt_get_entry(context, id, - entry.principal, - 0, - ETYPE_AES256_CTS_HMAC_SHA1_96, - &entry2); - if (ret == 0) - krb5_errx(context, 1, "krb5_kt_get_entry when if should fail"); - - krb5_kt_remove_entry(context, id, &entry); - - ret = krb5_kt_close(context, id); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_close"); - - krb5_kt_free_entry(context, &entry); - - krb5_kt_remove_entry(context, id3, &entry3); - - ret = krb5_kt_close(context, id3); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_close"); - - krb5_free_principal(context, entry3.principal); - krb5_free_keyblock_contents(context, &entry3.keyblock); -} - -static void -perf_add(krb5_context context, krb5_keytab id, int times) -{ -} - -static void -perf_find(krb5_context context, krb5_keytab id, int times) -{ -} - -static void -perf_delete(krb5_context context, krb5_keytab id, int forward, int times) -{ -} - - -static int version_flag = 0; -static int help_flag = 0; -static char *perf_str = NULL; -static int times = 1000; - -static struct getargs args[] = { - {"performance", 0, arg_string, &perf_str, - "test performance for named keytab", "keytab" }, - {"times", 0, arg_integer, ×, - "number of times to run the perforamce test", "number" }, - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int optidx = 0; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - if (argc != 0) - errx(1, "argc != 0"); - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - if (perf_str) { - krb5_keytab id; - - ret = krb5_kt_resolve(context, perf_str, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_resolve: %s", perf_str); - - /* add, find, delete on keytab */ - perf_add(context, id, times); - perf_find(context, id, times); - perf_delete(context, id, 0, times); - - /* add and find again on used keytab */ - perf_add(context, id, times); - perf_find(context, id, times); - - ret = krb5_kt_destroy(context, id); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_destroy: %s", perf_str); - - ret = krb5_kt_resolve(context, perf_str, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_resolve: %s", perf_str); - - /* try delete backwards */ -#if 0 - perf_add(context, id, times); - perf_delete(context, id, 1, times); -#endif - - ret = krb5_kt_destroy(context, id); - if (ret) - krb5_err(context, 1, ret, "krb5_kt_destroy"); - - } else { - - test_empty_keytab(context, "MEMORY:foo"); - test_empty_keytab(context, "FILE:foo"); - - test_memory_keytab(context, "MEMORY:foo", "MEMORY:foo2"); - - } - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_kuserok.c b/kerberosV/src/lib/krb5/test_kuserok.c deleted file mode 100644 index 5beb1b75732..00000000000 --- a/kerberosV/src/lib/krb5/test_kuserok.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2005 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 "krb5_locl.h" -#include -#include - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - "principal luser"); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - krb5_principal principal; - char *p; - int o = 0; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &o)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= o; - argv += o; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - if (argc != 2) - usage(1); - - ret = krb5_parse_name(context, argv[0], &principal); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_unparse_name(context, principal, &p); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name"); - - ret = krb5_kuserok(context, principal, argv[1]); - - krb5_free_context(context); - - printf("%s is %sallowed to login as %s\n", p, ret ? "" : "NOT ", argv[1]); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_mem.c b/kerberosV/src/lib/krb5/test_mem.c deleted file mode 100644 index 3333d0dc6d9..00000000000 --- a/kerberosV/src/lib/krb5/test_mem.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2005 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 "krb5_locl.h" -#include - -/* - * Test run functions, to be used with valgrind to detect memoryleaks. - */ - -static void -check_log(void) -{ - int i; - - for (i = 0; i < 10; i++) { - krb5_log_facility *logfacility; - krb5_context context; - krb5_error_code ret; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - krb5_initlog(context, "test-mem", &logfacility); - krb5_addlog_dest(context, logfacility, "0/STDERR:"); - krb5_set_warn_dest(context, logfacility); - - krb5_free_context(context); - } -} - - -int -main(int argc, char **argv) -{ - setprogname(argv[0]); - - check_log(); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_pac.c b/kerberosV/src/lib/krb5/test_pac.c deleted file mode 100644 index 983294ecf90..00000000000 --- a/kerberosV/src/lib/krb5/test_pac.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (c) 2006 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 "krb5_locl.h" - -/* - * This PAC and keys are copied (with permission) from Samba torture - * regression test suite, they where created by Andrew Bartlet. - */ - -static const unsigned char saved_pac[] = { - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xd8, 0x01, 0x00, 0x00, - 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x58, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0x08, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, - 0xc8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x30, 0xdf, 0xa6, 0xcb, - 0x4f, 0x7d, 0xc5, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x7f, 0xc0, 0x3c, 0x4e, 0x59, 0x62, 0x73, 0xc5, 0x01, 0xc0, 0x3c, 0x4e, 0x59, - 0x62, 0x73, 0xc5, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x16, 0x00, 0x16, 0x00, - 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x02, 0x00, 0x65, 0x00, 0x00, 0x00, - 0xed, 0x03, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x02, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x16, 0x00, 0x20, 0x00, 0x02, 0x00, 0x16, 0x00, 0x18, 0x00, - 0x24, 0x00, 0x02, 0x00, 0x28, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, - 0x57, 0x00, 0x32, 0x00, 0x30, 0x00, 0x30, 0x00, 0x33, 0x00, 0x46, 0x00, 0x49, 0x00, 0x4e, 0x00, - 0x41, 0x00, 0x4c, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, - 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x57, 0x00, 0x32, 0x00, - 0x30, 0x00, 0x30, 0x00, 0x33, 0x00, 0x46, 0x00, 0x49, 0x00, 0x4e, 0x00, 0x41, 0x00, 0x4c, 0x00, - 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x57, 0x00, 0x49, 0x00, - 0x4e, 0x00, 0x32, 0x00, 0x4b, 0x00, 0x33, 0x00, 0x54, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4e, 0x00, - 0x4b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x15, 0x00, 0x00, 0x00, 0x11, 0x2f, 0xaf, 0xb5, 0x90, 0x04, 0x1b, 0xec, 0x50, 0x3b, 0xec, 0xdc, - 0x01, 0x00, 0x00, 0x00, 0x30, 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x66, 0x28, 0xea, 0x37, 0x80, 0xc5, 0x01, 0x16, 0x00, 0x77, 0x00, 0x32, 0x00, 0x30, 0x00, - 0x30, 0x00, 0x33, 0x00, 0x66, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x24, 0x00, - 0x76, 0xff, 0xff, 0xff, 0x37, 0xd5, 0xb0, 0xf7, 0x24, 0xf0, 0xd6, 0xd4, 0xec, 0x09, 0x86, 0x5a, - 0xa0, 0xe8, 0xc3, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x76, 0xff, 0xff, 0xff, 0xb4, 0xd8, 0xb8, 0xfe, - 0x83, 0xb3, 0x13, 0x3f, 0xfc, 0x5c, 0x41, 0xad, 0xe2, 0x64, 0x83, 0xe0, 0x00, 0x00, 0x00, 0x00 -}; - -static int type_1_length = 472; - -static const krb5_keyblock kdc_keyblock = { - ETYPE_ARCFOUR_HMAC_MD5, - { 16, "\xB2\x86\x75\x71\x48\xAF\x7F\xD2\x52\xC5\x36\x03\xA1\x50\xB7\xE7" } -}; - -static const krb5_keyblock member_keyblock = { - ETYPE_ARCFOUR_HMAC_MD5, - { 16, "\xD2\x17\xFA\xEA\xE5\xE6\xB5\xF9\x5C\xCC\x94\x07\x7A\xB8\xA5\xFC" } -}; - -static time_t authtime = 1120440609; -static const char *user = "w2003final$"; - -/* - * This pac from Christan Krause - */ - -static const unsigned char saved_pac2[] = - "\x05\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\xc8\x01\x00\x00" - "\x58\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x18\x00\x00\x00" - "\x20\x02\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x70\x00\x00\x00" - "\x38\x02\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x14\x00\x00\x00" - "\xa8\x02\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x14\x00\x00\x00" - "\xc0\x02\x00\x00\x00\x00\x00\x00\x01\x10\x08\x00\xcc\xcc\xcc\xcc" - "\xb8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x7d\xee\x09\x76" - "\xf2\x39\xc9\x01\xff\xff\xff\xff\xff\xff\xff\x7f\xff\xff\xff\xff" - "\xff\xff\xff\x7f\x6d\x49\x38\x62\xf2\x39\xc9\x01\x6d\x09\xa2\x8c" - "\xbb\x3a\xc9\x01\xff\xff\xff\xff\xff\xff\xff\x7f\x0e\x00\x0e\x00" - "\x04\x00\x02\x00\x10\x00\x10\x00\x08\x00\x02\x00\x00\x00\x00\x00" - "\x0c\x00\x02\x00\x00\x00\x00\x00\x10\x00\x02\x00\x00\x00\x00\x00" - "\x14\x00\x02\x00\x00\x00\x00\x00\x18\x00\x02\x00\x02\x01\x00\x00" - "\x52\x04\x00\x00\x01\x02\x00\x00\x03\x00\x00\x00\x1c\x00\x02\x00" - "\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x10\x00\x12\x00\x20\x00\x02\x00\x0e\x00\x10\x00" - "\x24\x00\x02\x00\x28\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x10\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x07\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00" - "\x6f\x00\x70\x00\x65\x00\x6e\x00\x6d\x00\x73\x00\x70\x00\x00\x00" - "\x08\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x6f\x00\x70\x00" - "\x65\x00\x6e\x00\x20\x00\x6d\x00\x73\x00\x70\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00" - "\x60\x04\x00\x00\x07\x00\x00\x00\x01\x02\x00\x00\x07\x00\x00\x00" - "\x5e\x04\x00\x00\x07\x00\x00\x00\x09\x00\x00\x00\x00\x00\x00\x00" - "\x08\x00\x00\x00\x43\x00\x48\x00\x4b\x00\x52\x00\x2d\x00\x41\x00" - "\x44\x00\x53\x00\x08\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00" - "\x4d\x00\x53\x00\x50\x00\x2d\x00\x41\x00\x44\x00\x53\x00\x00\x00" - "\x04\x00\x00\x00\x01\x04\x00\x00\x00\x00\x00\x05\x15\x00\x00\x00" - "\x91\xad\xdc\x4c\x63\xb8\xb5\x48\xd5\x53\xd2\xd1\x00\x00\x00\x00" - "\x00\x66\xeb\x75\xf2\x39\xc9\x01\x0e\x00\x6f\x00\x70\x00\x65\x00" - "\x6e\x00\x6d\x00\x73\x00\x70\x00\x38\x00\x10\x00\x28\x00\x48\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x70\x00\x65\x00\x6e\x00" - "\x6d\x00\x73\x00\x70\x00\x40\x00\x6d\x00\x73\x00\x70\x00\x2d\x00" - "\x61\x00\x64\x00\x73\x00\x2e\x00\x70\x00\x65\x00\x70\x00\x70\x00" - "\x65\x00\x72\x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x64\x00\x65\x00" - "\x4d\x00\x53\x00\x50\x00\x2d\x00\x41\x00\x44\x00\x53\x00\x2e\x00" - "\x50\x00\x45\x00\x50\x00\x50\x00\x45\x00\x52\x00\x43\x00\x4f\x00" - "\x4e\x00\x2e\x00\x44\x00\x45\x00\x76\xff\xff\xff\xb3\x56\x15\x29" - "\x37\xc6\x5c\xf7\x97\x35\xfa\xec\x59\xe8\x96\xa0\x00\x00\x00\x00" - "\x76\xff\xff\xff\x50\x71\xa2\xb1\xa3\x64\x82\x5c\xfd\x23\xea\x3b" - "\xb0\x19\x12\xd4\x00\x00\x00\x00"; - - -static const krb5_keyblock member_keyblock2 = { - ETYPE_DES_CBC_MD5, - { 8, "\x9e\x37\x83\x25\x4a\x7f\xf2\xf8" } -}; - -static time_t authtime2 = 1225304188; -static const char *user2 = "openmsp"; - - - -int -main(int argc, char **argv) -{ - krb5_error_code ret; - krb5_context context; - krb5_pac pac; - krb5_data data; - krb5_principal p, p2; - - ret = krb5_init_context(&context); - if (ret) - errx(1, "krb5_init_contex"); - - krb5_enctype_enable(context, ETYPE_DES_CBC_MD5); - - ret = krb5_parse_name_flags(context, user, - KRB5_PRINCIPAL_PARSE_NO_REALM, &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_pac_parse(context, saved_pac, sizeof(saved_pac), &pac); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_parse"); - - ret = krb5_pac_verify(context, pac, authtime, p, - &member_keyblock, &kdc_keyblock); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_verify"); - - ret = _krb5_pac_sign(context, pac, authtime, p, - &member_keyblock, &kdc_keyblock, &data); - if (ret) - krb5_err(context, 1, ret, "_krb5_pac_sign"); - - krb5_pac_free(context, pac); - - ret = krb5_pac_parse(context, data.data, data.length, &pac); - krb5_data_free(&data); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_parse 2"); - - ret = krb5_pac_verify(context, pac, authtime, p, - &member_keyblock, &kdc_keyblock); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_verify 2"); - - /* make a copy and try to reproduce it */ - { - uint32_t *list; - size_t len, i; - krb5_pac pac2; - - ret = krb5_pac_init(context, &pac2); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_init"); - - /* our two user buffer plus the three "system" buffers */ - ret = krb5_pac_get_types(context, pac, &len, &list); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_get_types"); - - for (i = 0; i < len; i++) { - /* skip server_cksum, privsvr_cksum, and logon_name */ - if (list[i] == 6 || list[i] == 7 || list[i] == 10) - continue; - - ret = krb5_pac_get_buffer(context, pac, list[i], &data); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_get_buffer"); - - if (list[i] == 1) { - if (type_1_length != data.length) - krb5_errx(context, 1, "type 1 have wrong length: %lu", - (unsigned long)data.length); - } else - krb5_errx(context, 1, "unknown type %lu", - (unsigned long)list[i]); - - ret = krb5_pac_add_buffer(context, pac2, list[i], &data); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_add_buffer"); - krb5_data_free(&data); - } - free(list); - - ret = _krb5_pac_sign(context, pac2, authtime, p, - &member_keyblock, &kdc_keyblock, &data); - if (ret) - krb5_err(context, 1, ret, "_krb5_pac_sign 4"); - - krb5_pac_free(context, pac2); - - ret = krb5_pac_parse(context, data.data, data.length, &pac2); - krb5_data_free(&data); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_parse 4"); - - ret = krb5_pac_verify(context, pac2, authtime, p, - &member_keyblock, &kdc_keyblock); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_verify 4"); - - krb5_pac_free(context, pac2); - } - - krb5_pac_free(context, pac); - - /* - * check pac from Christian - */ - - ret = krb5_parse_name_flags(context, user2, - KRB5_PRINCIPAL_PARSE_NO_REALM, &p2); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_pac_parse(context, saved_pac2, sizeof(saved_pac2) -1, &pac); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_parse"); - - ret = krb5_pac_verify(context, pac, authtime2, p2, - &member_keyblock2, NULL); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_verify c1"); - - krb5_pac_free(context, pac); - krb5_free_principal(context, p2); - - /* - * Test empty free - */ - - ret = krb5_pac_init(context, &pac); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_init"); - krb5_pac_free(context, pac); - - /* - * Test add remove buffer - */ - - ret = krb5_pac_init(context, &pac); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_init"); - - { - const krb5_data cdata = { 2, "\x00\x01" } ; - - ret = krb5_pac_add_buffer(context, pac, 1, &cdata); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_add_buffer"); - } - { - ret = krb5_pac_get_buffer(context, pac, 1, &data); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_get_buffer"); - if (data.length != 2 || memcmp(data.data, "\x00\x01", 2) != 0) - krb5_errx(context, 1, "krb5_pac_get_buffer data not the same"); - krb5_data_free(&data); - } - - { - const krb5_data cdata = { 2, "\x02\x00" } ; - - ret = krb5_pac_add_buffer(context, pac, 2, &cdata); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_add_buffer"); - } - { - ret = krb5_pac_get_buffer(context, pac, 1, &data); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_get_buffer"); - if (data.length != 2 || memcmp(data.data, "\x00\x01", 2) != 0) - krb5_errx(context, 1, "krb5_pac_get_buffer data not the same"); - krb5_data_free(&data); - /* */ - ret = krb5_pac_get_buffer(context, pac, 2, &data); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_get_buffer"); - if (data.length != 2 || memcmp(data.data, "\x02\x00", 2) != 0) - krb5_errx(context, 1, "krb5_pac_get_buffer data not the same"); - krb5_data_free(&data); - } - - ret = _krb5_pac_sign(context, pac, authtime, p, - &member_keyblock, &kdc_keyblock, &data); - if (ret) - krb5_err(context, 1, ret, "_krb5_pac_sign"); - - krb5_pac_free(context, pac); - - ret = krb5_pac_parse(context, data.data, data.length, &pac); - krb5_data_free(&data); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_parse 3"); - - ret = krb5_pac_verify(context, pac, authtime, p, - &member_keyblock, &kdc_keyblock); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_verify 3"); - - { - uint32_t *list; - size_t len; - - /* our two user buffer plus the three "system" buffers */ - ret = krb5_pac_get_types(context, pac, &len, &list); - if (ret) - krb5_err(context, 1, ret, "krb5_pac_get_types"); - if (len != 5) - krb5_errx(context, 1, "list wrong length"); - free(list); - } - - krb5_pac_free(context, pac); - - krb5_free_principal(context, p); - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_pkinit_dh2key.c b/kerberosV/src/lib/krb5/test_pkinit_dh2key.c deleted file mode 100644 index e18fd174a58..00000000000 --- a/kerberosV/src/lib/krb5/test_pkinit_dh2key.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 2005 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 "krb5_locl.h" -#include -#include - -static void -test_dh2key(int i, - krb5_context context, - const heim_octet_string *dh, - const heim_octet_string *c_n, - const heim_octet_string *k_n, - krb5_enctype etype, - const heim_octet_string *result) -{ - krb5_error_code ret; - krb5_keyblock key; - - ret = _krb5_pk_octetstring2key(context, - etype, - dh->data, dh->length, - c_n, - k_n, - &key); - if (ret != 0) - krb5_err(context, 1, ret, "_krb5_pk_octetstring2key: %d", i); - - if (key.keyvalue.length != result->length || - memcmp(key.keyvalue.data, result->data, result->length) != 0) - krb5_errx(context, 1, "resulting key wrong: %d", i); - - krb5_free_keyblock_contents(context, &key); -} - - -struct { - krb5_enctype type; - krb5_data X; - krb5_data key; -} tests[] = { - /* 0 */ - { - ETYPE_AES256_CTS_HMAC_SHA1_96, - { - 256, - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - }, - { - 32, - "\x5e\xe5\x0d\x67\x5c\x80\x9f\xe5\x9e\x4a\x77\x62\xc5\x4b\x65\x83" - "\x75\x47\xea\xfb\x15\x9b\xd8\xcd\xc7\x5f\xfc\xa5\x91\x1e\x4c\x41" - } - }, - /* 1 */ - { - ETYPE_AES256_CTS_HMAC_SHA1_96, - { - 128, - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - }, - { - 32, - "\xac\xf7\x70\x7c\x08\x97\x3d\xdf\xdb\x27\xcd\x36\x14\x42\xcc\xfb" - "\xa3\x55\xc8\x88\x4c\xb4\x72\xf3\x7d\xa6\x36\xd0\x7d\x56\x78\x7e" - } - }, - /* 2 */ - { - ETYPE_AES256_CTS_HMAC_SHA1_96, - { - 128, - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" - "\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e" - "\x0f\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d" - "\x0e\x0f\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c" - "\x0d\x0e\x0f\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b" - "\x0c\x0d\x0e\x0f\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a" - "\x0b\x0c\x0d\x0e\x0f\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09" - "\x0a\x0b\x0c\x0d\x0e\x0f\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08" - }, - { - 32, - "\xc4\x42\xda\x58\x5f\xcb\x80\xe4\x3b\x47\x94\x6f\x25\x40\x93\xe3" - "\x73\x29\xd9\x90\x01\x38\x0d\xb7\x83\x71\xdb\x3a\xcf\x5c\x79\x7e" - } - }, - /* 3 */ - { - ETYPE_AES256_CTS_HMAC_SHA1_96, - { - 77, - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" - "\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e" - "\x0f\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d" - "\x0e\x0f\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c" - "\x0d\x0e\x0f\x10\x00\x01\x02\x03" - "\x04\x05\x06\x07\x08" - }, - { - 32, - "\x00\x53\x95\x3b\x84\xc8\x96\xf4\xeb\x38\x5c\x3f\x2e\x75\x1c\x4a" - "\x59\x0e\xd6\xff\xad\xca\x6f\xf6\x4f\x47\xeb\xeb\x8d\x78\x0f\xfc" - } - } -}; - - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - ""); - exit (ret); -} - - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int i, optidx = 0; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) { - test_dh2key(i, context, &tests[i].X, NULL, NULL, - tests[i].type, &tests[i].key); - } - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_pknistkdf.c b/kerberosV/src/lib/krb5/test_pknistkdf.c deleted file mode 100644 index ca78e3c04d3..00000000000 --- a/kerberosV/src/lib/krb5/test_pknistkdf.c +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright (c) 2008 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 "krb5_locl.h" -#include -#include -#include -#include - -static int verbose_flag = 0; - -struct testcase { - const heim_oid *oid; - krb5_data Z; - const char *client; - const char *server; - krb5_enctype enctype; - krb5_data as_req; - krb5_data pk_as_rep; - krb5_data ticket; - - krb5_data key; -} tests[] = { - /* 0 */ - { - NULL, /* AlgorithmIdentifier */ - { /* Z */ - 256, - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - }, - "lha@SU.SE", /* client, partyUInfo */ - "krbtgt/SU.SE@SU.SE", /* server, partyVInfo */ - ETYPE_AES256_CTS_HMAC_SHA1_96, /* enctype */ - { /* as_req */ - 10, - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - }, - { /* pk_as_rep */ - 9, - "\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB" - }, - { /* ticket */ - 55, - "\x61\x35\x30\x33\xa0\x03\x02\x01\x05\xa1\x07\x1b\x05\x53\x55\x2e" - "\x53\x45\xa2\x10\x30\x0e\xa0\x03\x02\x01\x01\xa1\x07\x30\x05\x1b" - "\x03\x6c\x68\x61\xa3\x11\x30\x0f\xa0\x03\x02\x01\x12\xa2\x08\x04" - "\x06\x68\x65\x6a\x68\x65\x6a" - }, - { /* key */ - 32, - "\xc7\x62\x89\xec\x4b\x28\xa6\x91\xff\xce\x80\xbb\xb7\xec\x82\x41" - "\x52\x3f\x99\xb1\x90\xcf\x2d\x34\x8f\x54\xa8\x65\x81\x2c\x32\x73" - } - }, - /* 1 */ - { - NULL, /* AlgorithmIdentifier */ - { /* Z */ - 256, - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - }, - "lha@SU.SE", /* client, partyUInfo */ - "krbtgt/SU.SE@SU.SE", /* server, partyVInfo */ - ETYPE_AES256_CTS_HMAC_SHA1_96, /* enctype */ - { /* as_req */ - 10, - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - }, - { /* pk_as_rep */ - 9, - "\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB" - }, - { /* ticket */ - 55, - "\x61\x35\x30\x33\xa0\x03\x02\x01\x05\xa1\x07\x1b\x05\x53\x55\x2e" - "\x53\x45\xa2\x10\x30\x0e\xa0\x03\x02\x01\x01\xa1\x07\x30\x05\x1b" - "\x03\x6c\x68\x61\xa3\x11\x30\x0f\xa0\x03\x02\x01\x12\xa2\x08\x04" - "\x06\x68\x65\x6a\x68\x65\x6a" - }, - { /* key */ - 32, - "\x59\xf3\xca\x77\x5b\x20\x17\xe9\xad\x36\x3f\x47\xca\xbd\x43\xb8" - "\x8c\xb8\x90\x35\x8d\xc6\x0d\x52\x0d\x11\x9f\xb0\xdc\x24\x0b\x61" - } - }, - /* 2 */ - { - NULL, /* AlgorithmIdentifier */ - { /* Z */ - 256, - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" - }, - "lha@SU.SE", /* client, partyUInfo */ - "krbtgt/SU.SE@SU.SE", /* server, partyVInfo */ - ETYPE_AES256_CTS_HMAC_SHA1_96, /* enctype */ - { /* as_req */ - 10, - "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" - }, - { /* pk_as_rep */ - 9, - "\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB" - }, - { /* ticket */ - 55, - "\x61\x35\x30\x33\xa0\x03\x02\x01\x05\xa1\x07\x1b\x05\x53\x55\x2e" - "\x53\x45\xa2\x10\x30\x0e\xa0\x03\x02\x01\x01\xa1\x07\x30\x05\x1b" - "\x03\x6c\x68\x61\xa3\x11\x30\x0f\xa0\x03\x02\x01\x12\xa2\x08\x04" - "\x06\x68\x65\x6a\x68\x65\x6a" - }, - { /* key */ - 32, - "\x8a\x9a\xc5\x5f\x45\xda\x1a\x73\xd9\x1e\xe9\x88\x1f\xa9\x48\x81" - "\xce\xac\x66\x2d\xb1\xd3\xb9\x0a\x9d\x0e\x52\x83\xdf\xe1\x84\x3d" - } - } -}; - -#ifdef MAKETICKET -static void -fooTicket(void) -{ - krb5_error_code ret; - krb5_data data; - size_t size; - Ticket t; - - t.tkt_vno = 5; - t.realm = "SU.SE"; - t.sname.name_type = KRB5_NT_PRINCIPAL; - t.sname.name_string.len = 1; - t.sname.name_string.val = ecalloc(1, sizeof(t.sname.name_string.val[0])); - t.sname.name_string.val[0] = estrdup("lha"); - t.enc_part.etype = ETYPE_AES256_CTS_HMAC_SHA1_96; - t.enc_part.kvno = NULL; - t.enc_part.cipher.length = 6; - t.enc_part.cipher.data = "hejhej"; - - ASN1_MALLOC_ENCODE(Ticket, data.data, data.length, &t, &size, ret); - if (ret) - errx(1, "ASN1_MALLOC_ENCODE(Ticket)"); - - rk_dumpdata("foo", data.data, data.length); - free(data.data); -} -#endif - -static void -test_dh2key(krb5_context context, int i, struct testcase *c) -{ - krb5_error_code ret; - krb5_keyblock key; - krb5_principal client, server; - Ticket ticket; - AlgorithmIdentifier ai; - size_t size; - - memset(&ticket, 0, sizeof(&ticket)); - - ai.algorithm = *c->oid; - ai.parameters = NULL; - - ret = decode_Ticket(c->ticket.data, c->ticket.length, &ticket, &size); - if (ret) - krb5_errx(context, 1, "decode ticket: %d", ret); - - ret = krb5_parse_name(context, c->client, &client); - if (ret) - krb5_err(context, 1, ret, "parse_name: %s", c->client); - ret = krb5_parse_name(context, c->server, &server); - if (ret) - krb5_err(context, 1, ret, "parse_name: %s", c->server); - - if (verbose_flag) { - char *str; - hex_encode(c->Z.data, c->Z.length, &str); - printf("Z: %s\n", str); - free(str); - printf("client: %s\n", c->client); - printf("server: %s\n", c->server); - printf("enctype: %d\n", (int)c->enctype); - hex_encode(c->as_req.data, c->as_req.length, &str); - printf("as-req: %s\n", str); - free(str); - hex_encode(c->pk_as_rep.data, c->pk_as_rep.length, &str); - printf("pk-as-rep: %s\n", str); - free(str); - hex_encode(c->ticket.data, c->ticket.length, &str); - printf("ticket: %s\n", str); - free(str); - } - - ret = _krb5_pk_kdf(context, - &ai, - c->Z.data, - c->Z.length, - client, - server, - c->enctype, - &c->as_req, - &c->pk_as_rep, - &ticket, - &key); - krb5_free_principal(context, client); - krb5_free_principal(context, server); - if (ret) - krb5_err(context, 1, ret, "_krb5_pk_kdf: %d", i); - - if (verbose_flag) { - char *str; - hex_encode(key.keyvalue.data, key.keyvalue.length, &str); - printf("key: %s\n", str); - free(str); - } - - if (key.keyvalue.length != c->key.length || - memcmp(key.keyvalue.data, c->key.data, c->key.length) != 0) - krb5_errx(context, 1, "resulting key wrong: %d", i); - - krb5_free_keyblock_contents(context, &key); - free_Ticket(&ticket); -} - - - - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"verbose", 0, arg_flag, &verbose_flag, - "verbose output", NULL }, - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - ""); - exit (ret); -} - - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int i, optidx = 0; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - -#ifdef MAKETICKET - fooTicket(); -#endif - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - tests[0].oid = &asn1_oid_id_pkinit_kdf_ah_sha1; - tests[1].oid = &asn1_oid_id_pkinit_kdf_ah_sha256; - tests[2].oid = &asn1_oid_id_pkinit_kdf_ah_sha512; - - for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) - test_dh2key(context, i, &tests[i]); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_plugin.c b/kerberosV/src/lib/krb5/test_plugin.c deleted file mode 100644 index 4235442b999..00000000000 --- a/kerberosV/src/lib/krb5/test_plugin.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2006 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 -#include "locate_plugin.h" - -static krb5_error_code -resolve_init(krb5_context context, void **ctx) -{ - *ctx = NULL; - return 0; -} - -static void -resolve_fini(void *ctx) -{ -} - -static krb5_error_code -resolve_lookup(void *ctx, - enum locate_service_type service, - const char *realm, - int domain, - int type, - int (*add)(void *,int,struct sockaddr *), - void *addctx) -{ - struct sockaddr_in s; - - memset(&s, 0, sizeof(s)); - -#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - s.sin_len = sizeof(s); -#endif - s.sin_family = AF_INET; - s.sin_port = htons(88); - s.sin_addr.s_addr = htonl(0x7f000002); - - if (strcmp(realm, "NOTHERE.H5L.SE") == 0) - (*add)(addctx, type, (struct sockaddr *)&s); - - return 0; -} - - -krb5plugin_service_locate_ftable resolve = { - 0, - resolve_init, - resolve_fini, - resolve_lookup -}; - - -int -main(int argc, char **argv) -{ - krb5_error_code ret; - krb5_context context; - krb5_krbhst_handle handle; - char host[MAXHOSTNAMELEN]; - int found = 0; - - setprogname(argv[0]); - - ret = krb5_init_context(&context); - if (ret) - errx(1, "krb5_init_contex"); - - ret = krb5_plugin_register(context, PLUGIN_TYPE_DATA, - KRB5_PLUGIN_LOCATE, &resolve); - if (ret) - krb5_err(context, 1, ret, "krb5_plugin_register"); - - - ret = krb5_krbhst_init_flags(context, - "NOTHERE.H5L.SE", - KRB5_KRBHST_KDC, - 0, - &handle); - if (ret) - krb5_err(context, 1, ret, "krb5_krbhst_init_flags"); - - - while(krb5_krbhst_next_as_string(context, handle, host, sizeof(host)) == 0){ - found++; - if (strcmp(host, "127.0.0.2") != 0) - krb5_errx(context, 1, "wrong address: %s", host); - } - if (!found) - krb5_errx(context, 1, "failed to find host"); - - krb5_krbhst_free(context, handle); - - krb5_free_context(context); - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_prf.c b/kerberosV/src/lib/krb5/test_prf.c deleted file mode 100644 index 26ba2a6ef49..00000000000 --- a/kerberosV/src/lib/krb5/test_prf.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2007 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 "krb5_locl.h" - -#include -#include - -/* - * key: string2key(aes256, "testkey", "testkey", default_params) - * input: unhex(1122334455667788) - * output: 58b594b8a61df6e9439b7baa991ff5c1 - * - * key: string2key(aes128, "testkey", "testkey", default_params) - * input: unhex(1122334455667788) - * output: ffa2f823aa7f83a8ce3c5fb730587129 - */ - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - krb5_keyblock key; - krb5_crypto crypto; - size_t length; - krb5_data input, output, output2; - krb5_enctype etype = ETYPE_AES256_CTS_HMAC_SHA1_96; - - ret = krb5_init_context(&context); - if (ret) - errx(1, "krb5_init_context %d", ret); - - ret = krb5_generate_random_keyblock(context, etype, &key); - if (ret) - krb5_err(context, 1, ret, "krb5_generate_random_keyblock"); - - ret = krb5_crypto_prf_length(context, etype, &length); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_prf_length"); - - ret = krb5_crypto_init(context, &key, 0, &crypto); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_init"); - - input.data = rk_UNCONST("foo"); - input.length = 3; - - ret = krb5_crypto_prf(context, crypto, &input, &output); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_prf"); - - ret = krb5_crypto_prf(context, crypto, &input, &output2); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_prf"); - - if (krb5_data_cmp(&output, &output2) != 0) - krb5_errx(context, 1, "krb5_data_cmp"); - - krb5_data_free(&output); - krb5_data_free(&output2); - - krb5_crypto_destroy(context, crypto); - - krb5_free_keyblock_contents(context, &key); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_princ.c b/kerberosV/src/lib/krb5/test_princ.c deleted file mode 100644 index 98e61e3d8bf..00000000000 --- a/kerberosV/src/lib/krb5/test_princ.c +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright (c) 2003 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 "krb5_locl.h" -#include - -/* - * Check that a closed cc still keeps it data and that it's no longer - * there when it's destroyed. - */ - -static void -test_princ(krb5_context context) -{ - const char *princ = "lha@SU.SE"; - const char *princ_short = "lha"; - const char *noquote; - krb5_error_code ret; - char *princ_unparsed; - char *princ_reformed = NULL; - const char *realm; - - krb5_principal p, p2; - - ret = krb5_parse_name(context, princ, &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_unparse_name(context, p, &princ_unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (strcmp(princ, princ_unparsed)) { - krb5_errx(context, 1, "%s != %s", princ, princ_unparsed); - } - - free(princ_unparsed); - - ret = krb5_unparse_name_flags(context, p, - KRB5_PRINCIPAL_UNPARSE_NO_REALM, - &princ_unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (strcmp(princ_short, princ_unparsed)) - krb5_errx(context, 1, "%s != %s", princ_short, princ_unparsed); - free(princ_unparsed); - - realm = krb5_principal_get_realm(context, p); - - if (asprintf(&princ_reformed, "%s@%s", princ_short, realm) < 0 || princ_reformed == NULL) - errx(1, "malloc"); - - ret = krb5_parse_name(context, princ_reformed, &p2); - free(princ_reformed); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (!krb5_principal_compare(context, p, p2)) { - krb5_errx(context, 1, "p != p2"); - } - - krb5_free_principal(context, p2); - - ret = krb5_set_default_realm(context, "SU.SE"); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_unparse_name_flags(context, p, - KRB5_PRINCIPAL_UNPARSE_SHORT, - &princ_unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (strcmp(princ_short, princ_unparsed)) - krb5_errx(context, 1, "'%s' != '%s'", princ_short, princ_unparsed); - free(princ_unparsed); - - ret = krb5_parse_name(context, princ_short, &p2); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (!krb5_principal_compare(context, p, p2)) - krb5_errx(context, 1, "p != p2"); - krb5_free_principal(context, p2); - - ret = krb5_unparse_name(context, p, &princ_unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (strcmp(princ, princ_unparsed)) - krb5_errx(context, 1, "'%s' != '%s'", princ, princ_unparsed); - free(princ_unparsed); - - ret = krb5_set_default_realm(context, "SAMBA.ORG"); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_parse_name(context, princ_short, &p2); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (krb5_principal_compare(context, p, p2)) - krb5_errx(context, 1, "p == p2"); - - if (!krb5_principal_compare_any_realm(context, p, p2)) - krb5_errx(context, 1, "(ignoring realms) p != p2"); - - ret = krb5_unparse_name(context, p2, &princ_unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (strcmp(princ, princ_unparsed) == 0) - krb5_errx(context, 1, "%s == %s", princ, princ_unparsed); - free(princ_unparsed); - - krb5_free_principal(context, p2); - - ret = krb5_parse_name(context, princ, &p2); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (!krb5_principal_compare(context, p, p2)) - krb5_errx(context, 1, "p != p2"); - - ret = krb5_unparse_name(context, p2, &princ_unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (strcmp(princ, princ_unparsed)) - krb5_errx(context, 1, "'%s' != '%s'", princ, princ_unparsed); - free(princ_unparsed); - - krb5_free_principal(context, p2); - - ret = krb5_unparse_name_flags(context, p, - KRB5_PRINCIPAL_UNPARSE_SHORT, - &princ_unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name_short"); - - if (strcmp(princ, princ_unparsed) != 0) - krb5_errx(context, 1, "'%s' != '%s'", princ, princ_unparsed); - free(princ_unparsed); - - ret = krb5_unparse_name(context, p, &princ_unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name_short"); - - if (strcmp(princ, princ_unparsed)) - krb5_errx(context, 1, "'%s' != '%s'", princ, princ_unparsed); - free(princ_unparsed); - - ret = krb5_parse_name_flags(context, princ, - KRB5_PRINCIPAL_PARSE_NO_REALM, - &p2); - if (!ret) - krb5_err(context, 1, ret, "Should have failed to parse %s a " - "short name", princ); - - ret = krb5_parse_name_flags(context, princ_short, - KRB5_PRINCIPAL_PARSE_NO_REALM, - &p2); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_unparse_name_flags(context, p2, - KRB5_PRINCIPAL_UNPARSE_NO_REALM, - &princ_unparsed); - krb5_free_principal(context, p2); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name_norealm"); - - if (strcmp(princ_short, princ_unparsed)) - krb5_errx(context, 1, "'%s' != '%s'", princ_short, princ_unparsed); - free(princ_unparsed); - - ret = krb5_parse_name_flags(context, princ_short, - KRB5_PRINCIPAL_PARSE_REQUIRE_REALM, - &p2); - if (!ret) - krb5_err(context, 1, ret, "Should have failed to parse %s " - "because it lacked a realm", princ_short); - - ret = krb5_parse_name_flags(context, princ, - KRB5_PRINCIPAL_PARSE_REQUIRE_REALM, - &p2); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - if (!krb5_principal_compare(context, p, p2)) - krb5_errx(context, 1, "p != p2"); - - ret = krb5_unparse_name_flags(context, p2, - KRB5_PRINCIPAL_UNPARSE_NO_REALM, - &princ_unparsed); - krb5_free_principal(context, p2); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name_norealm"); - - if (strcmp(princ_short, princ_unparsed)) - krb5_errx(context, 1, "'%s' != '%s'", princ_short, princ_unparsed); - free(princ_unparsed); - - krb5_free_principal(context, p); - - /* test quoting */ - - princ = "test\\ principal@SU.SE"; - noquote = "test principal@SU.SE"; - - ret = krb5_parse_name_flags(context, princ, 0, &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_unparse_name_flags(context, p, 0, &princ_unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name_flags"); - - if (strcmp(princ, princ_unparsed)) - krb5_errx(context, 1, "q '%s' != '%s'", princ, princ_unparsed); - free(princ_unparsed); - - ret = krb5_unparse_name_flags(context, p, KRB5_PRINCIPAL_UNPARSE_DISPLAY, - &princ_unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name_flags"); - - if (strcmp(noquote, princ_unparsed)) - krb5_errx(context, 1, "nq '%s' != '%s'", noquote, princ_unparsed); - free(princ_unparsed); - - krb5_free_principal(context, p); -} - -static void -test_enterprise(krb5_context context) -{ - krb5_error_code ret; - char *unparsed; - krb5_principal p; - - ret = krb5_set_default_realm(context, "SAMBA.ORG"); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name"); - - ret = krb5_parse_name_flags(context, "lha@su.se@WIN.SU.SE", - KRB5_PRINCIPAL_PARSE_ENTERPRISE, &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name_flags"); - - ret = krb5_unparse_name(context, p, &unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name"); - - krb5_free_principal(context, p); - - if (strcmp(unparsed, "lha\\@su.se@WIN.SU.SE") != 0) - krb5_errx(context, 1, "enterprise name failed 1"); - free(unparsed); - - /* - * - */ - - ret = krb5_parse_name_flags(context, "lha\\@su.se@WIN.SU.SE", - KRB5_PRINCIPAL_PARSE_ENTERPRISE, &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name_flags"); - - ret = krb5_unparse_name(context, p, &unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name"); - - krb5_free_principal(context, p); - if (strcmp(unparsed, "lha\\@su.se\\@WIN.SU.SE@SAMBA.ORG") != 0) - krb5_errx(context, 1, "enterprise name failed 2: %s", unparsed); - free(unparsed); - - /* - * - */ - - ret = krb5_parse_name_flags(context, "lha\\@su.se@WIN.SU.SE", 0, &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name_flags"); - - ret = krb5_unparse_name(context, p, &unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name"); - - krb5_free_principal(context, p); - if (strcmp(unparsed, "lha\\@su.se@WIN.SU.SE") != 0) - krb5_errx(context, 1, "enterprise name failed 3"); - free(unparsed); - - /* - * - */ - - ret = krb5_parse_name_flags(context, "lha@su.se", - KRB5_PRINCIPAL_PARSE_ENTERPRISE, &p); - if (ret) - krb5_err(context, 1, ret, "krb5_parse_name_flags"); - - ret = krb5_unparse_name(context, p, &unparsed); - if (ret) - krb5_err(context, 1, ret, "krb5_unparse_name"); - - krb5_free_principal(context, p); - if (strcmp(unparsed, "lha\\@su.se@SAMBA.ORG") != 0) - krb5_errx(context, 1, "enterprise name failed 2: %s", unparsed); - free(unparsed); -} - - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - - setprogname(argv[0]); - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - test_princ(context); - - test_enterprise(context); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_renew.c b/kerberosV/src/lib/krb5/test_renew.c deleted file mode 100644 index 40d373917ab..00000000000 --- a/kerberosV/src/lib/krb5/test_renew.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2007 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 "krb5_locl.h" -#include -#include - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - "[principal]"); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_principal client; - krb5_context context; - const char *in_tkt_service = NULL; - krb5_ccache id; - krb5_error_code ret; - krb5_creds out; - int optidx = 0; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - if (argc > 0) - in_tkt_service = argv[0]; - - memset(&out, 0, sizeof(out)); - - ret = krb5_init_context(&context); - if (ret) - krb5_err(context, 1, ret, "krb5_init_context"); - - ret = krb5_cc_default(context, &id); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_default"); - - ret = krb5_cc_get_principal(context, id, &client); - if (ret) - krb5_err(context, 1, ret, "krb5_cc_default"); - - ret = krb5_get_renewed_creds(context, - &out, - client, - id, - in_tkt_service); - - if(ret) - krb5_err(context, 1, ret, "krb5_get_renewed_creds"); - - if (krb5_principal_compare(context, out.client, client) != TRUE) - krb5_errx(context, 1, "return principal is not as expected"); - - krb5_free_cred_contents(context, &out); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_rfc3961.c b/kerberosV/src/lib/krb5/test_rfc3961.c deleted file mode 100644 index b37263238f5..00000000000 --- a/kerberosV/src/lib/krb5/test_rfc3961.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 2003-2005 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 "krb5_locl.h" -#include -#include - -static void -time_encryption(krb5_context context, size_t size, - krb5_enctype etype, int iterations) -{ - struct timeval tv1, tv2; - krb5_error_code ret; - krb5_keyblock key; - krb5_crypto crypto; - krb5_data data; - char *etype_name; - void *buf; - int i; - - ret = krb5_generate_random_keyblock(context, etype, &key); - if (ret) - krb5_err(context, 1, ret, "krb5_generate_random_keyblock"); - - ret = krb5_enctype_to_string(context, etype, &etype_name); - if (ret) - krb5_err(context, 1, ret, "krb5_enctype_to_string"); - - buf = malloc(size); - if (buf == NULL) - krb5_errx(context, 1, "out of memory"); - memset(buf, 0, size); - - ret = krb5_crypto_init(context, &key, 0, &crypto); - if (ret) - krb5_err(context, 1, ret, "krb5_crypto_init"); - - gettimeofday(&tv1, NULL); - - for (i = 0; i < iterations; i++) { - ret = krb5_encrypt(context, crypto, 0, buf, size, &data); - if (ret) - krb5_err(context, 1, ret, "encrypt: %d", i); - krb5_data_free(&data); - } - - gettimeofday(&tv2, NULL); - - timevalsub(&tv2, &tv1); - - printf("%s size: %7lu iterations: %d time: %3lld.%06ld\n", - etype_name, (unsigned long)size, iterations, - (long long)tv2.tv_sec, tv2.tv_usec); - - free(buf); - free(etype_name); - krb5_crypto_destroy(context, crypto); - krb5_free_keyblock_contents(context, &key); -} - -static void -time_s2k(krb5_context context, - krb5_enctype etype, - const char *password, - krb5_salt salt, - int iterations) -{ - struct timeval tv1, tv2; - krb5_error_code ret; - krb5_keyblock key; - krb5_data opaque; - char *etype_name; - int i; - - ret = krb5_enctype_to_string(context, etype, &etype_name); - if (ret) - krb5_err(context, 1, ret, "krb5_enctype_to_string"); - - opaque.data = NULL; - opaque.length = 0; - - gettimeofday(&tv1, NULL); - - for (i = 0; i < iterations; i++) { - ret = krb5_string_to_key_salt_opaque(context, etype, password, salt, - opaque, &key); - if (ret) - krb5_err(context, 1, ret, "krb5_string_to_key_data_salt_opaque"); - krb5_free_keyblock_contents(context, &key); - } - - gettimeofday(&tv2, NULL); - - timevalsub(&tv2, &tv1); - - printf("%s string2key %d iterations time: %3lld.%06ld\n", - etype_name, iterations, (long long)tv2.tv_sec, tv2.tv_usec); - free(etype_name); - -} - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int i, enciter, s2kiter; - int optidx = 0; - krb5_salt salt; - - krb5_enctype enctypes[] = { - ETYPE_DES_CBC_CRC, - ETYPE_DES3_CBC_SHA1, - ETYPE_ARCFOUR_HMAC_MD5, - ETYPE_AES128_CTS_HMAC_SHA1_96, - ETYPE_AES256_CTS_HMAC_SHA1_96 - }; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - salt.salttype = KRB5_PW_SALT; - salt.saltvalue.data = NULL; - salt.saltvalue.length = 0; - - ret = krb5_init_context(&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - enciter = 1000; - s2kiter = 100; - - for (i = 0; i < sizeof(enctypes)/sizeof(enctypes[0]); i++) { - - krb5_enctype_enable(context, enctypes[i]); - - time_encryption(context, 16, enctypes[i], enciter); - time_encryption(context, 32, enctypes[i], enciter); - time_encryption(context, 512, enctypes[i], enciter); - time_encryption(context, 1024, enctypes[i], enciter); - time_encryption(context, 2048, enctypes[i], enciter); - time_encryption(context, 4096, enctypes[i], enciter); - time_encryption(context, 8192, enctypes[i], enciter); - time_encryption(context, 16384, enctypes[i], enciter); - time_encryption(context, 32768, enctypes[i], enciter); - - time_s2k(context, enctypes[i], "mYsecreitPassword", salt, s2kiter); - } - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_store.c b/kerberosV/src/lib/krb5/test_store.c deleted file mode 100644 index 6b930775c0c..00000000000 --- a/kerberosV/src/lib/krb5/test_store.c +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Copyright (c) 2006 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 "krb5_locl.h" -#include - -static void -test_int8(krb5_context context, krb5_storage *sp) -{ - krb5_error_code ret; - int i; - int8_t val[] = { - 0, 1, -1, 128, -127 - }, v; - - krb5_storage_truncate(sp, 0); - - for (i = 0; i < sizeof(val[0])/sizeof(val); i++) { - - ret = krb5_store_int8(sp, val[i]); - if (ret) - krb5_err(context, 1, ret, "krb5_store_int8"); - krb5_storage_seek(sp, 0, SEEK_SET); - ret = krb5_ret_int8(sp, &v); - if (ret) - krb5_err(context, 1, ret, "krb5_ret_int8"); - if (v != val[i]) - krb5_errx(context, 1, "store and ret mismatch"); - } -} - -static void -test_int16(krb5_context context, krb5_storage *sp) -{ - krb5_error_code ret; - int i; - int16_t val[] = { - 0, 1, -1, 32768, -32767 - }, v; - - krb5_storage_truncate(sp, 0); - - for (i = 0; i < sizeof(val[0])/sizeof(val); i++) { - - ret = krb5_store_int16(sp, val[i]); - if (ret) - krb5_err(context, 1, ret, "krb5_store_int16"); - krb5_storage_seek(sp, 0, SEEK_SET); - ret = krb5_ret_int16(sp, &v); - if (ret) - krb5_err(context, 1, ret, "krb5_ret_int16"); - if (v != val[i]) - krb5_errx(context, 1, "store and ret mismatch"); - } -} - -static void -test_int32(krb5_context context, krb5_storage *sp) -{ - krb5_error_code ret; - int i; - int32_t val[] = { - 0, 1, -1, 2147483647, -2147483646 - }, v; - - krb5_storage_truncate(sp, 0); - - for (i = 0; i < sizeof(val[0])/sizeof(val); i++) { - - ret = krb5_store_int32(sp, val[i]); - if (ret) - krb5_err(context, 1, ret, "krb5_store_int32"); - krb5_storage_seek(sp, 0, SEEK_SET); - ret = krb5_ret_int32(sp, &v); - if (ret) - krb5_err(context, 1, ret, "krb5_ret_int32"); - if (v != val[i]) - krb5_errx(context, 1, "store and ret mismatch"); - } -} - -static void -test_uint8(krb5_context context, krb5_storage *sp) -{ - krb5_error_code ret; - int i; - uint8_t val[] = { - 0, 1, 255 - }, v; - - krb5_storage_truncate(sp, 0); - - for (i = 0; i < sizeof(val[0])/sizeof(val); i++) { - - ret = krb5_store_uint8(sp, val[i]); - if (ret) - krb5_err(context, 1, ret, "krb5_store_uint8"); - krb5_storage_seek(sp, 0, SEEK_SET); - ret = krb5_ret_uint8(sp, &v); - if (ret) - krb5_err(context, 1, ret, "krb5_ret_uint8"); - if (v != val[i]) - krb5_errx(context, 1, "store and ret mismatch"); - } -} - -static void -test_uint16(krb5_context context, krb5_storage *sp) -{ - krb5_error_code ret; - int i; - uint16_t val[] = { - 0, 1, 65535 - }, v; - - krb5_storage_truncate(sp, 0); - - for (i = 0; i < sizeof(val[0])/sizeof(val); i++) { - - ret = krb5_store_uint16(sp, val[i]); - if (ret) - krb5_err(context, 1, ret, "krb5_store_uint16"); - krb5_storage_seek(sp, 0, SEEK_SET); - ret = krb5_ret_uint16(sp, &v); - if (ret) - krb5_err(context, 1, ret, "krb5_ret_uint16"); - if (v != val[i]) - krb5_errx(context, 1, "store and ret mismatch"); - } -} - -static void -test_uint32(krb5_context context, krb5_storage *sp) -{ - krb5_error_code ret; - int i; - uint32_t val[] = { - 0, 1, 4294967295UL - }, v; - - krb5_storage_truncate(sp, 0); - - for (i = 0; i < sizeof(val[0])/sizeof(val); i++) { - - ret = krb5_store_uint32(sp, val[i]); - if (ret) - krb5_err(context, 1, ret, "krb5_store_uint32"); - krb5_storage_seek(sp, 0, SEEK_SET); - ret = krb5_ret_uint32(sp, &v); - if (ret) - krb5_err(context, 1, ret, "krb5_ret_uint32"); - if (v != val[i]) - krb5_errx(context, 1, "store and ret mismatch"); - } -} - - -static void -test_storage(krb5_context context, krb5_storage *sp) -{ - test_int8(context, sp); - test_int16(context, sp); - test_int32(context, sp); - test_uint8(context, sp); - test_uint16(context, sp); - test_uint32(context, sp); -} - - -static void -test_truncate(krb5_context context, krb5_storage *sp, int fd) -{ - struct stat sb; - - krb5_store_string(sp, "hej"); - krb5_storage_truncate(sp, 2); - - if (fstat(fd, &sb) != 0) - krb5_err(context, 1, errno, "fstat"); - if (sb.st_size != 2) - krb5_errx(context, 1, "length not 2"); - - krb5_storage_truncate(sp, 1024); - - if (fstat(fd, &sb) != 0) - krb5_err(context, 1, errno, "fstat"); - if (sb.st_size != 1024) - krb5_errx(context, 1, "length not 2"); -} - -static void -check_too_large(krb5_context context, krb5_storage *sp) -{ - uint32_t too_big_sizes[] = { INT_MAX, INT_MAX / 2, INT_MAX / 4, INT_MAX / 8 + 1}; - krb5_error_code ret; - krb5_data data; - size_t n; - - for (n = 0; n < sizeof(too_big_sizes) / sizeof(too_big_sizes); n++) { - krb5_storage_truncate(sp, 0); - krb5_store_uint32(sp, too_big_sizes[n]); - krb5_storage_seek(sp, 0, SEEK_SET); - ret = krb5_ret_data(sp, &data); - if (ret != HEIM_ERR_TOO_BIG) - errx(1, "not too big: %lu", (unsigned long)n); - } -} - -/* - * - */ - -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - int fd, optidx = 0; - krb5_storage *sp; - const char *fn = "test-store-data"; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - ret = krb5_init_context (&context); - if (ret) - errx (1, "krb5_init_context failed: %d", ret); - - /* - * Test encoding/decoding of primotive types on diffrent backends - */ - - sp = krb5_storage_emem(); - if (sp == NULL) - krb5_errx(context, 1, "krb5_storage_emem: no mem"); - - test_storage(context, sp); - check_too_large(context, sp); - krb5_storage_free(sp); - - - fd = open(fn, O_RDWR|O_CREAT|O_TRUNC, 0600); - if (fd < 0) - krb5_err(context, 1, errno, "open(%s)", fn); - - sp = krb5_storage_from_fd(fd); - close(fd); - if (sp == NULL) - krb5_errx(context, 1, "krb5_storage_from_fd: %s no mem", fn); - - test_storage(context, sp); - krb5_storage_free(sp); - unlink(fn); - - /* - * test truncate behavior - */ - - fd = open(fn, O_RDWR|O_CREAT|O_TRUNC, 0600); - if (fd < 0) - krb5_err(context, 1, errno, "open(%s)", fn); - - sp = krb5_storage_from_fd(fd); - if (sp == NULL) - krb5_errx(context, 1, "krb5_storage_from_fd: %s no mem", fn); - - test_truncate(context, sp, fd); - krb5_storage_free(sp); - close(fd); - unlink(fn); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_time.c b/kerberosV/src/lib/krb5/test_time.c deleted file mode 100644 index 5f6625c9090..00000000000 --- a/kerberosV/src/lib/krb5/test_time.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2003 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 "krb5_locl.h" -#include - -static void -check_set_time(krb5_context context) -{ - krb5_error_code ret; - krb5_timestamp sec; - int32_t usec; - struct timeval tv; - int diff = 10; - int diff2; - - gettimeofday(&tv, NULL); - - ret = krb5_set_real_time(context, tv.tv_sec + diff, tv.tv_usec); - if (ret) - krb5_err(context, 1, ret, "krb5_us_timeofday"); - - ret = krb5_us_timeofday(context, &sec, &usec); - if (ret) - krb5_err(context, 1, ret, "krb5_us_timeofday"); - - diff2 = abs(sec - tv.tv_sec); - - if (diff2 < 9 || diff > 11) - krb5_errx(context, 1, "set time error: diff: %d", - abs(sec - tv.tv_sec)); -} - - - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - - ret = krb5_init_context(&context); - if (ret) - errx(1, "krb5_init_context %d", ret); - - check_set_time(context); - check_set_time(context); - check_set_time(context); - check_set_time(context); - check_set_time(context); - - krb5_free_context(context); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/test_x500.c b/kerberosV/src/lib/krb5/test_x500.c deleted file mode 100644 index ecad7798e7f..00000000000 --- a/kerberosV/src/lib/krb5/test_x500.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2011 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 "krb5_locl.h" -#include - -/* - * - */ - -static void -check_linear(krb5_context context, - const char *client_realm, - const char *server_realm, - const char *realm, - ...) -{ - unsigned int num_inrealms = 0, num_realms = 0, n; - char **inrealms = NULL; - char **realms = NULL; - krb5_error_code ret; - krb5_data tr; - va_list va; - - krb5_data_zero(&tr); - - va_start(va, realm); - - while (realm) { - inrealms = erealloc(inrealms, (num_inrealms + 2) * sizeof(inrealms[0])); - inrealms[num_inrealms] = rk_UNCONST(realm); - num_inrealms++; - realm = va_arg(va, const char *); - } - if (inrealms) - inrealms[num_inrealms] = NULL; - - ret = krb5_domain_x500_encode(inrealms, num_inrealms, &tr); - if (ret) - krb5_err(context, 1, ret, "krb5_domain_x500_encode"); - - ret = krb5_domain_x500_decode(context, tr, - &realms, &num_realms, - client_realm, server_realm); - if (ret) - krb5_err(context, 1, ret, "krb5_domain_x500_decode"); - - krb5_data_free(&tr); - - if (num_inrealms != num_realms) - errx(1, "num_inrealms != num_realms"); - - for(n = 0; n < num_realms; n++) - free(realms[n]); - free(realms); - - free(inrealms); -} - - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - - setprogname(argv[0]); - - ret = krb5_init_context(&context); - if (ret) - errx(1, "krb5_init_context"); - - - check_linear(context, "KTH1.SE", "KTH1.SE", NULL); - check_linear(context, "KTH1.SE", "KTH2.SE", NULL); - check_linear(context, "KTH1.SE", "KTH3.SE", "KTH2.SE", NULL); - check_linear(context, "KTH1.SE", "KTH4.SE", "KTH3.SE", "KTH2.SE", NULL); - check_linear(context, "KTH1.SE", "KTH5.SE", "KTH4.SE", "KTH3.SE", "KTH2.SE", NULL); - - return 0; -} diff --git a/kerberosV/src/lib/krb5/ticket.c b/kerberosV/src/lib/krb5/ticket.c deleted file mode 100644 index 4845a93d944..00000000000 --- a/kerberosV/src/lib/krb5/ticket.c +++ /dev/null @@ -1,850 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009 Apple Inc. 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 "krb5_locl.h" - -/** - * Free ticket and content - * - * @param context a Kerberos 5 context - * @param ticket ticket to free - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_free_ticket(krb5_context context, - krb5_ticket *ticket) -{ - free_EncTicketPart(&ticket->ticket); - krb5_free_principal(context, ticket->client); - krb5_free_principal(context, ticket->server); - free(ticket); - return 0; -} - -/** - * Copy ticket and content - * - * @param context a Kerberos 5 context - * @param from ticket to copy - * @param to new copy of ticket, free with krb5_free_ticket() - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_copy_ticket(krb5_context context, - const krb5_ticket *from, - krb5_ticket **to) -{ - krb5_error_code ret; - krb5_ticket *tmp; - - *to = NULL; - tmp = malloc(sizeof(*tmp)); - if(tmp == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - if((ret = copy_EncTicketPart(&from->ticket, &tmp->ticket))){ - free(tmp); - return ret; - } - ret = krb5_copy_principal(context, from->client, &tmp->client); - if(ret){ - free_EncTicketPart(&tmp->ticket); - free(tmp); - return ret; - } - ret = krb5_copy_principal(context, from->server, &tmp->server); - if(ret){ - krb5_free_principal(context, tmp->client); - free_EncTicketPart(&tmp->ticket); - free(tmp); - return ret; - } - *to = tmp; - return 0; -} - -/** - * Return client principal in ticket - * - * @param context a Kerberos 5 context - * @param ticket ticket to copy - * @param client client principal, free with krb5_free_principal() - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ticket_get_client(krb5_context context, - const krb5_ticket *ticket, - krb5_principal *client) -{ - return krb5_copy_principal(context, ticket->client, client); -} - -/** - * Return server principal in ticket - * - * @param context a Kerberos 5 context - * @param ticket ticket to copy - * @param server server principal, free with krb5_free_principal() - * - * @return Returns 0 to indicate success. Otherwise an kerberos et - * error code is returned, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ticket_get_server(krb5_context context, - const krb5_ticket *ticket, - krb5_principal *server) -{ - return krb5_copy_principal(context, ticket->server, server); -} - -/** - * Return end time of ticket - * - * @param context a Kerberos 5 context - * @param ticket ticket to copy - * - * @return end time of ticket - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL -krb5_ticket_get_endtime(krb5_context context, - const krb5_ticket *ticket) -{ - return ticket->ticket.endtime; -} - -/** - * Get the flags from the Kerberos ticket - * - * @param context Kerberos context - * @param ticket Kerberos ticket - * - * @return ticket flags - * - * @ingroup krb5_ticket - */ -KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL -krb5_ticket_get_flags(krb5_context context, - const krb5_ticket *ticket) -{ - return TicketFlags2int(ticket->ticket.flags); -} - -static int -find_type_in_ad(krb5_context context, - int type, - krb5_data *data, - krb5_boolean *found, - krb5_boolean failp, - krb5_keyblock *sessionkey, - const AuthorizationData *ad, - int level) -{ - krb5_error_code ret = 0; - size_t i; - - if (level > 9) { - ret = ENOENT; /* XXX */ - krb5_set_error_message(context, ret, - N_("Authorization data nested deeper " - "then %d levels, stop searching", ""), - level); - goto out; - } - - /* - * Only copy out the element the first time we get to it, we need - * to run over the whole authorization data fields to check if - * there are any container clases we need to care about. - */ - for (i = 0; i < ad->len; i++) { - if (!*found && ad->val[i].ad_type == type) { - ret = der_copy_octet_string(&ad->val[i].ad_data, data); - if (ret) { - krb5_set_error_message(context, ret, - N_("malloc: out of memory", "")); - goto out; - } - *found = TRUE; - continue; - } - switch (ad->val[i].ad_type) { - case KRB5_AUTHDATA_IF_RELEVANT: { - AuthorizationData child; - ret = decode_AuthorizationData(ad->val[i].ad_data.data, - ad->val[i].ad_data.length, - &child, - NULL); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to decode " - "IF_RELEVANT with %d", ""), - (int)ret); - goto out; - } - ret = find_type_in_ad(context, type, data, found, FALSE, - sessionkey, &child, level + 1); - free_AuthorizationData(&child); - if (ret) - goto out; - break; - } -#if 0 /* XXX test */ - case KRB5_AUTHDATA_KDC_ISSUED: { - AD_KDCIssued child; - - ret = decode_AD_KDCIssued(ad->val[i].ad_data.data, - ad->val[i].ad_data.length, - &child, - NULL); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to decode " - "AD_KDCIssued with %d", ""), - ret); - goto out; - } - if (failp) { - krb5_boolean valid; - krb5_data buf; - size_t len; - - ASN1_MALLOC_ENCODE(AuthorizationData, buf.data, buf.length, - &child.elements, &len, ret); - if (ret) { - free_AD_KDCIssued(&child); - krb5_clear_error_message(context); - goto out; - } - if(buf.length != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - - ret = krb5_c_verify_checksum(context, sessionkey, 19, &buf, - &child.ad_checksum, &valid); - krb5_data_free(&buf); - if (ret) { - free_AD_KDCIssued(&child); - goto out; - } - if (!valid) { - krb5_clear_error_message(context); - ret = ENOENT; - free_AD_KDCIssued(&child); - goto out; - } - } - ret = find_type_in_ad(context, type, data, found, failp, sessionkey, - &child.elements, level + 1); - free_AD_KDCIssued(&child); - if (ret) - goto out; - break; - } -#endif - case KRB5_AUTHDATA_AND_OR: - if (!failp) - break; - ret = ENOENT; /* XXX */ - krb5_set_error_message(context, ret, - N_("Authorization data contains " - "AND-OR element that is unknown to the " - "application", "")); - goto out; - default: - if (!failp) - break; - ret = ENOENT; /* XXX */ - krb5_set_error_message(context, ret, - N_("Authorization data contains " - "unknown type (%d) ", ""), - ad->val[i].ad_type); - goto out; - } - } -out: - if (ret) { - if (*found) { - krb5_data_free(data); - *found = 0; - } - } - return ret; -} - -/** - * Extract the authorization data type of type from the ticket. Store - * the field in data. This function is to use for kerberos - * applications. - * - * @param context a Kerberos 5 context - * @param ticket Kerberos ticket - * @param type type to fetch - * @param data returned data, free with krb5_data_free() - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_ticket_get_authorization_data_type(krb5_context context, - krb5_ticket *ticket, - int type, - krb5_data *data) -{ - AuthorizationData *ad; - krb5_error_code ret; - krb5_boolean found = FALSE; - - krb5_data_zero(data); - - ad = ticket->ticket.authorization_data; - if (ticket->ticket.authorization_data == NULL) { - krb5_set_error_message(context, ENOENT, - N_("Ticket have not authorization data", "")); - return ENOENT; /* XXX */ - } - - ret = find_type_in_ad(context, type, data, &found, TRUE, - &ticket->ticket.key, ad, 0); - if (ret) - return ret; - if (!found) { - krb5_set_error_message(context, ENOENT, - N_("Ticket have not " - "authorization data of type %d", ""), - type); - return ENOENT; /* XXX */ - } - return 0; -} - -static krb5_error_code -check_server_referral(krb5_context context, - krb5_kdc_rep *rep, - unsigned flags, - krb5_const_principal requested, - krb5_const_principal returned, - krb5_keyblock * key) -{ - krb5_error_code ret; - PA_ServerReferralData ref; - krb5_crypto session; - EncryptedData ed; - size_t len; - krb5_data data; - PA_DATA *pa; - int i = 0, cmp; - - if (rep->kdc_rep.padata == NULL) - goto noreferral; - - pa = krb5_find_padata(rep->kdc_rep.padata->val, - rep->kdc_rep.padata->len, - KRB5_PADATA_SERVER_REFERRAL, &i); - if (pa == NULL) - goto noreferral; - - memset(&ed, 0, sizeof(ed)); - memset(&ref, 0, sizeof(ref)); - - ret = decode_EncryptedData(pa->padata_value.data, - pa->padata_value.length, - &ed, &len); - if (ret) - return ret; - if (len != pa->padata_value.length) { - free_EncryptedData(&ed); - krb5_set_error_message(context, KRB5KRB_AP_ERR_MODIFIED, - N_("Referral EncryptedData wrong for realm %s", - "realm"), requested->realm); - return KRB5KRB_AP_ERR_MODIFIED; - } - - ret = krb5_crypto_init(context, key, 0, &session); - if (ret) { - free_EncryptedData(&ed); - return ret; - } - - ret = krb5_decrypt_EncryptedData(context, session, - KRB5_KU_PA_SERVER_REFERRAL, - &ed, &data); - free_EncryptedData(&ed); - krb5_crypto_destroy(context, session); - if (ret) - return ret; - - ret = decode_PA_ServerReferralData(data.data, data.length, &ref, &len); - if (ret) { - krb5_data_free(&data); - return ret; - } - krb5_data_free(&data); - - if (strcmp(requested->realm, returned->realm) != 0) { - free_PA_ServerReferralData(&ref); - krb5_set_error_message(context, KRB5KRB_AP_ERR_MODIFIED, - N_("server ref realm mismatch, " - "requested realm %s got back %s", ""), - requested->realm, returned->realm); - return KRB5KRB_AP_ERR_MODIFIED; - } - - if (krb5_principal_is_krbtgt(context, returned)) { - const char *realm = returned->name.name_string.val[1]; - - if (ref.referred_realm == NULL - || strcmp(*ref.referred_realm, realm) != 0) - { - free_PA_ServerReferralData(&ref); - krb5_set_error_message(context, KRB5KRB_AP_ERR_MODIFIED, - N_("tgt returned with wrong ref", "")); - return KRB5KRB_AP_ERR_MODIFIED; - } - } else if (krb5_principal_compare(context, returned, requested) == 0) { - free_PA_ServerReferralData(&ref); - krb5_set_error_message(context, KRB5KRB_AP_ERR_MODIFIED, - N_("req princ no same as returned", "")); - return KRB5KRB_AP_ERR_MODIFIED; - } - - if (ref.requested_principal_name) { - cmp = _krb5_principal_compare_PrincipalName(context, - requested, - ref.requested_principal_name); - if (!cmp) { - free_PA_ServerReferralData(&ref); - krb5_set_error_message(context, KRB5KRB_AP_ERR_MODIFIED, - N_("referred principal not same " - "as requested", "")); - return KRB5KRB_AP_ERR_MODIFIED; - } - } else if (flags & EXTRACT_TICKET_AS_REQ) { - free_PA_ServerReferralData(&ref); - krb5_set_error_message(context, KRB5KRB_AP_ERR_MODIFIED, - N_("Requested principal missing on AS-REQ", "")); - return KRB5KRB_AP_ERR_MODIFIED; - } - - free_PA_ServerReferralData(&ref); - - return ret; -noreferral: - /* - * Expect excact match or that we got a krbtgt - */ - if (krb5_principal_compare(context, requested, returned) != TRUE && - (krb5_realm_compare(context, requested, returned) != TRUE && - krb5_principal_is_krbtgt(context, returned) != TRUE)) - { - krb5_set_error_message(context, KRB5KRB_AP_ERR_MODIFIED, - N_("Not same server principal returned " - "as requested", "")); - return KRB5KRB_AP_ERR_MODIFIED; - } - return 0; -} - - -/* - * Verify referral data - */ - - -static krb5_error_code -check_client_referral(krb5_context context, - krb5_kdc_rep *rep, - krb5_const_principal requested, - krb5_const_principal mapped, - krb5_keyblock const * key) -{ - krb5_error_code ret; - PA_ClientCanonicalized canon; - krb5_crypto crypto; - krb5_data data; - PA_DATA *pa; - size_t len; - int i = 0; - - if (rep->kdc_rep.padata == NULL) - goto noreferral; - - pa = krb5_find_padata(rep->kdc_rep.padata->val, - rep->kdc_rep.padata->len, - KRB5_PADATA_CLIENT_CANONICALIZED, &i); - if (pa == NULL) - goto noreferral; - - ret = decode_PA_ClientCanonicalized(pa->padata_value.data, - pa->padata_value.length, - &canon, &len); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to decode ClientCanonicalized " - "from realm %s", ""), requested->realm); - return ret; - } - - ASN1_MALLOC_ENCODE(PA_ClientCanonicalizedNames, data.data, data.length, - &canon.names, &len, ret); - if (ret) { - free_PA_ClientCanonicalized(&canon); - return ret; - } - if (data.length != len) - krb5_abortx(context, "internal asn.1 error"); - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) { - free(data.data); - free_PA_ClientCanonicalized(&canon); - return ret; - } - - ret = krb5_verify_checksum(context, crypto, KRB5_KU_CANONICALIZED_NAMES, - data.data, data.length, - &canon.canon_checksum); - krb5_crypto_destroy(context, crypto); - free(data.data); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to verify client canonicalized " - "data from realm %s", ""), - requested->realm); - free_PA_ClientCanonicalized(&canon); - return ret; - } - - if (!_krb5_principal_compare_PrincipalName(context, - requested, - &canon.names.requested_name)) - { - free_PA_ClientCanonicalized(&canon); - krb5_set_error_message(context, KRB5_PRINC_NOMATCH, - N_("Requested name doesn't match" - " in client referral", "")); - return KRB5_PRINC_NOMATCH; - } - if (!_krb5_principal_compare_PrincipalName(context, - mapped, - &canon.names.mapped_name)) - { - free_PA_ClientCanonicalized(&canon); - krb5_set_error_message(context, KRB5_PRINC_NOMATCH, - N_("Mapped name doesn't match" - " in client referral", "")); - return KRB5_PRINC_NOMATCH; - } - - return 0; - -noreferral: - if (krb5_principal_compare(context, requested, mapped) == FALSE) { - krb5_set_error_message(context, KRB5KRB_AP_ERR_MODIFIED, - N_("Not same client principal returned " - "as requested", "")); - return KRB5KRB_AP_ERR_MODIFIED; - } - return 0; -} - - -static krb5_error_code KRB5_CALLCONV -decrypt_tkt (krb5_context context, - krb5_keyblock *key, - krb5_key_usage usage, - krb5_const_pointer decrypt_arg, - krb5_kdc_rep *dec_rep) -{ - krb5_error_code ret; - krb5_data data; - size_t size; - krb5_crypto crypto; - - ret = krb5_crypto_init(context, key, 0, &crypto); - if (ret) - return ret; - - ret = krb5_decrypt_EncryptedData (context, - crypto, - usage, - &dec_rep->kdc_rep.enc_part, - &data); - krb5_crypto_destroy(context, crypto); - - if (ret) - return ret; - - ret = decode_EncASRepPart(data.data, - data.length, - &dec_rep->enc_part, - &size); - if (ret) - ret = decode_EncTGSRepPart(data.data, - data.length, - &dec_rep->enc_part, - &size); - krb5_data_free (&data); - if (ret) { - krb5_set_error_message(context, ret, - N_("Failed to decode encpart in ticket", "")); - return ret; - } - return 0; -} - -int -_krb5_extract_ticket(krb5_context context, - krb5_kdc_rep *rep, - krb5_creds *creds, - krb5_keyblock *key, - krb5_const_pointer keyseed, - krb5_key_usage key_usage, - krb5_addresses *addrs, - unsigned nonce, - unsigned flags, - krb5_decrypt_proc decrypt_proc, - krb5_const_pointer decryptarg) -{ - krb5_error_code ret; - krb5_principal tmp_principal; - size_t len = 0; - time_t tmp_time; - krb5_timestamp sec_now; - - /* decrypt */ - - if (decrypt_proc == NULL) - decrypt_proc = decrypt_tkt; - - ret = (*decrypt_proc)(context, key, key_usage, decryptarg, rep); - if (ret) - goto out; - - /* save session key */ - - creds->session.keyvalue.length = 0; - creds->session.keyvalue.data = NULL; - creds->session.keytype = rep->enc_part.key.keytype; - ret = krb5_data_copy (&creds->session.keyvalue, - rep->enc_part.key.keyvalue.data, - rep->enc_part.key.keyvalue.length); - if (ret) { - krb5_clear_error_message(context); - goto out; - } - - /* compare client and save */ - ret = _krb5_principalname2krb5_principal (context, - &tmp_principal, - rep->kdc_rep.cname, - rep->kdc_rep.crealm); - if (ret) - goto out; - - /* check client referral and save principal */ - /* anonymous here ? */ - if((flags & EXTRACT_TICKET_ALLOW_CNAME_MISMATCH) == 0) { - ret = check_client_referral(context, rep, - creds->client, - tmp_principal, - &creds->session); - if (ret) { - krb5_free_principal (context, tmp_principal); - goto out; - } - } - krb5_free_principal (context, creds->client); - creds->client = tmp_principal; - - /* check server referral and save principal */ - ret = _krb5_principalname2krb5_principal (context, - &tmp_principal, - rep->kdc_rep.ticket.sname, - rep->kdc_rep.ticket.realm); - if (ret) - goto out; - if((flags & EXTRACT_TICKET_ALLOW_SERVER_MISMATCH) == 0){ - ret = check_server_referral(context, - rep, - flags, - creds->server, - tmp_principal, - &creds->session); - if (ret) { - krb5_free_principal (context, tmp_principal); - goto out; - } - } - krb5_free_principal(context, creds->server); - creds->server = tmp_principal; - - /* verify names */ - if(flags & EXTRACT_TICKET_MATCH_REALM){ - const char *srealm = krb5_principal_get_realm(context, creds->server); - const char *crealm = krb5_principal_get_realm(context, creds->client); - - if (strcmp(rep->enc_part.srealm, srealm) != 0 || - strcmp(rep->enc_part.srealm, crealm) != 0) - { - ret = KRB5KRB_AP_ERR_MODIFIED; - krb5_clear_error_message(context); - goto out; - } - } - - /* compare nonces */ - - if (nonce != (unsigned)rep->enc_part.nonce) { - ret = KRB5KRB_AP_ERR_MODIFIED; - krb5_set_error_message(context, ret, N_("malloc: out of memory", "")); - goto out; - } - - /* set kdc-offset */ - - krb5_timeofday (context, &sec_now); - if (rep->enc_part.flags.initial - && (flags & EXTRACT_TICKET_TIMESYNC) - && context->kdc_sec_offset == 0 - && krb5_config_get_bool (context, NULL, - "libdefaults", - "kdc_timesync", - NULL)) { - context->kdc_sec_offset = rep->enc_part.authtime - sec_now; - krb5_timeofday (context, &sec_now); - } - - /* check all times */ - - if (rep->enc_part.starttime) { - tmp_time = *rep->enc_part.starttime; - } else - tmp_time = rep->enc_part.authtime; - - if (creds->times.starttime == 0 - && abs(tmp_time - sec_now) > context->max_skew) { - ret = KRB5KRB_AP_ERR_SKEW; - krb5_set_error_message (context, ret, - N_("time skew (%d) larger than max (%d)", ""), - abs(tmp_time - sec_now), - (int)context->max_skew); - goto out; - } - - if (creds->times.starttime != 0 - && tmp_time != creds->times.starttime) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_MODIFIED; - goto out; - } - - creds->times.starttime = tmp_time; - - if (rep->enc_part.renew_till) { - tmp_time = *rep->enc_part.renew_till; - } else - tmp_time = 0; - - if (creds->times.renew_till != 0 - && tmp_time > creds->times.renew_till) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_MODIFIED; - goto out; - } - - creds->times.renew_till = tmp_time; - - creds->times.authtime = rep->enc_part.authtime; - - if (creds->times.endtime != 0 - && rep->enc_part.endtime > creds->times.endtime) { - krb5_clear_error_message (context); - ret = KRB5KRB_AP_ERR_MODIFIED; - goto out; - } - - creds->times.endtime = rep->enc_part.endtime; - - if(rep->enc_part.caddr) - krb5_copy_addresses (context, rep->enc_part.caddr, &creds->addresses); - else if(addrs) - krb5_copy_addresses (context, addrs, &creds->addresses); - else { - creds->addresses.len = 0; - creds->addresses.val = NULL; - } - creds->flags.b = rep->enc_part.flags; - - creds->authdata.len = 0; - creds->authdata.val = NULL; - - /* extract ticket */ - ASN1_MALLOC_ENCODE(Ticket, creds->ticket.data, creds->ticket.length, - &rep->kdc_rep.ticket, &len, ret); - if(ret) - goto out; - if (creds->ticket.length != len) - krb5_abortx(context, "internal error in ASN.1 encoder"); - creds->second_ticket.length = 0; - creds->second_ticket.data = NULL; - - -out: - memset (rep->enc_part.key.keyvalue.data, 0, - rep->enc_part.key.keyvalue.length); - return ret; -} diff --git a/kerberosV/src/lib/krb5/time.c b/kerberosV/src/lib/krb5/time.c deleted file mode 100644 index 247549ba237..00000000000 --- a/kerberosV/src/lib/krb5/time.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 1997-2004 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 "krb5_locl.h" - -/** - * Set the absolute time that the caller knows the kdc has so the - * kerberos library can calculate the relative diffrence beteen the - * KDC time and local system time. - * - * @param context Keberos 5 context. - * @param sec The applications new of "now" in seconds - * @param usec The applications new of "now" in micro seconds - - * @return Kerberos 5 error code, see krb5_get_error_message(). - * - * @ingroup krb5 - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_real_time (krb5_context context, - krb5_timestamp sec, - int32_t usec) -{ - struct timeval tv; - - gettimeofday(&tv, NULL); - - context->kdc_sec_offset = sec - tv.tv_sec; - - /** - * If the caller passes in a negative usec, its assumed to be - * unknown and the function will use the current time usec. - */ - if (usec >= 0) { - context->kdc_usec_offset = usec - tv.tv_usec; - - if (context->kdc_usec_offset < 0) { - context->kdc_sec_offset--; - context->kdc_usec_offset += 1000000; - } - } else - context->kdc_usec_offset = tv.tv_usec; - - return 0; -} - -/* - * return ``corrected'' time in `timeret'. - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_timeofday (krb5_context context, - krb5_timestamp *timeret) -{ - *timeret = time(NULL) + context->kdc_sec_offset; - return 0; -} - -/* - * like gettimeofday but with time correction to the KDC - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_us_timeofday (krb5_context context, - krb5_timestamp *sec, - int32_t *usec) -{ - struct timeval tv; - - gettimeofday (&tv, NULL); - - *sec = tv.tv_sec + context->kdc_sec_offset; - *usec = tv.tv_usec; /* XXX */ - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_format_time(krb5_context context, time_t t, - char *s, size_t len, krb5_boolean include_time) -{ - struct tm *tm; - if(context->log_utc) - tm = gmtime (&t); - else - tm = localtime(&t); - if(tm == NULL || - strftime(s, len, include_time ? context->time_fmt : context->date_fmt, tm) == 0) - snprintf(s, len, "%ld", (long)t); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_string_to_deltat(const char *string, krb5_deltat *deltat) -{ - if((*deltat = parse_time(string, "s")) == -1) - return KRB5_DELTAT_BADFORMAT; - return 0; -} diff --git a/kerberosV/src/lib/krb5/transited.c b/kerberosV/src/lib/krb5/transited.c deleted file mode 100644 index 5e21987bca9..00000000000 --- a/kerberosV/src/lib/krb5/transited.c +++ /dev/null @@ -1,490 +0,0 @@ -/* - * Copyright (c) 1997 - 2001, 2003 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 "krb5_locl.h" - -/* this is an attempt at one of the most horrible `compression' - schemes that has ever been invented; it's so amazingly brain-dead - that words can not describe it, and all this just to save a few - silly bytes */ - -struct tr_realm { - char *realm; - unsigned leading_space:1; - unsigned leading_slash:1; - unsigned trailing_dot:1; - struct tr_realm *next; -}; - -static void -free_realms(struct tr_realm *r) -{ - struct tr_realm *p; - while(r){ - p = r; - r = r->next; - free(p->realm); - free(p); - } -} - -static int -make_path(krb5_context context, struct tr_realm *r, - const char *from, const char *to) -{ - struct tr_realm *tmp; - const char *p; - - if(strlen(from) < strlen(to)){ - const char *str; - str = from; - from = to; - to = str; - } - - if(strcmp(from + strlen(from) - strlen(to), to) == 0){ - p = from; - while(1){ - p = strchr(p, '.'); - if(p == NULL) { - krb5_clear_error_message (context); - return KRB5KDC_ERR_POLICY; - } - p++; - if(strcmp(p, to) == 0) - break; - tmp = calloc(1, sizeof(*tmp)); - if(tmp == NULL) - return krb5_enomem(context); - tmp->next = r->next; - r->next = tmp; - tmp->realm = strdup(p); - if(tmp->realm == NULL){ - r->next = tmp->next; - free(tmp); - return krb5_enomem(context); - } - } - }else if(strncmp(from, to, strlen(to)) == 0){ - p = from + strlen(from); - while(1){ - while(p >= from && *p != '/') p--; - if(p == from) - return KRB5KDC_ERR_POLICY; - - if(strncmp(to, from, p - from) == 0) - break; - tmp = calloc(1, sizeof(*tmp)); - if(tmp == NULL) - return krb5_enomem(context); - tmp->next = r->next; - r->next = tmp; - tmp->realm = malloc(p - from + 1); - if(tmp->realm == NULL){ - r->next = tmp->next; - free(tmp); - return krb5_enomem(context); - } - memcpy(tmp->realm, from, p - from); - tmp->realm[p - from] = '\0'; - p--; - } - } else { - krb5_clear_error_message (context); - return KRB5KDC_ERR_POLICY; - } - - return 0; -} - -static int -make_paths(krb5_context context, - struct tr_realm *realms, const char *client_realm, - const char *server_realm) -{ - struct tr_realm *r; - int ret; - const char *prev_realm = client_realm; - const char *next_realm = NULL; - for(r = realms; r; r = r->next){ - /* it *might* be that you can have more than one empty - component in a row, at least that's how I interpret the - "," exception in 1510 */ - if(r->realm[0] == '\0'){ - while(r->next && r->next->realm[0] == '\0') - r = r->next; - if(r->next) - next_realm = r->next->realm; - else - next_realm = server_realm; - ret = make_path(context, r, prev_realm, next_realm); - if(ret){ - free_realms(realms); - return ret; - } - } - prev_realm = r->realm; - } - return 0; -} - -static int -expand_realms(krb5_context context, - struct tr_realm *realms, const char *client_realm) -{ - struct tr_realm *r; - const char *prev_realm = NULL; - for(r = realms; r; r = r->next){ - if(r->trailing_dot){ - char *tmp; - size_t len; - - if(prev_realm == NULL) - prev_realm = client_realm; - - len = strlen(r->realm) + strlen(prev_realm) + 1; - - tmp = realloc(r->realm, len); - if(tmp == NULL){ - free_realms(realms); - return krb5_enomem(context); - } - r->realm = tmp; - strlcat(r->realm, prev_realm, len); - }else if(r->leading_slash && !r->leading_space && prev_realm){ - /* yet another exception: if you use x500-names, the - leading realm doesn't have to be "quoted" with a space */ - char *tmp; - size_t len = strlen(r->realm) + strlen(prev_realm) + 1; - - tmp = malloc(len); - if(tmp == NULL){ - free_realms(realms); - return krb5_enomem(context); - } - strlcpy(tmp, prev_realm, len); - strlcat(tmp, r->realm, len); - free(r->realm); - r->realm = tmp; - } - prev_realm = r->realm; - } - return 0; -} - -static struct tr_realm * -make_realm(char *realm) -{ - struct tr_realm *r; - char *p, *q; - int quote = 0; - r = calloc(1, sizeof(*r)); - if(r == NULL){ - free(realm); - return NULL; - } - r->realm = realm; - for(p = q = r->realm; *p; p++){ - if(p == r->realm && *p == ' '){ - r->leading_space = 1; - continue; - } - if(q == r->realm && *p == '/') - r->leading_slash = 1; - if(quote){ - *q++ = *p; - quote = 0; - continue; - } - if(*p == '\\'){ - quote = 1; - continue; - } - if(p[0] == '.' && p[1] == '\0') - r->trailing_dot = 1; - *q++ = *p; - } - *q = '\0'; - return r; -} - -static struct tr_realm* -append_realm(struct tr_realm *head, struct tr_realm *r) -{ - struct tr_realm *p; - if(head == NULL){ - r->next = NULL; - return r; - } - p = head; - while(p->next) p = p->next; - p->next = r; - return head; -} - -static int -decode_realms(krb5_context context, - const char *tr, int length, struct tr_realm **realms) -{ - struct tr_realm *r = NULL; - - char *tmp; - int quote = 0; - const char *start = tr; - int i; - - for(i = 0; i < length; i++){ - if(quote){ - quote = 0; - continue; - } - if(tr[i] == '\\'){ - quote = 1; - continue; - } - if(tr[i] == ','){ - tmp = malloc(tr + i - start + 1); - if(tmp == NULL) - return krb5_enomem(context); - memcpy(tmp, start, tr + i - start); - tmp[tr + i - start] = '\0'; - r = make_realm(tmp); - if(r == NULL){ - free_realms(*realms); - return krb5_enomem(context); - } - *realms = append_realm(*realms, r); - start = tr + i + 1; - } - } - tmp = malloc(tr + i - start + 1); - if(tmp == NULL){ - free(*realms); - return krb5_enomem(context); - } - memcpy(tmp, start, tr + i - start); - tmp[tr + i - start] = '\0'; - r = make_realm(tmp); - if(r == NULL){ - free_realms(*realms); - return krb5_enomem(context); - } - *realms = append_realm(*realms, r); - - return 0; -} - - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_domain_x500_decode(krb5_context context, - krb5_data tr, char ***realms, unsigned int *num_realms, - const char *client_realm, const char *server_realm) -{ - struct tr_realm *r = NULL; - struct tr_realm *p, **q; - int ret; - - if(tr.length == 0) { - *realms = NULL; - *num_realms = 0; - return 0; - } - - /* split string in components */ - ret = decode_realms(context, tr.data, tr.length, &r); - if(ret) - return ret; - - /* apply prefix rule */ - ret = expand_realms(context, r, client_realm); - if(ret) - return ret; - - ret = make_paths(context, r, client_realm, server_realm); - if(ret) - return ret; - - /* remove empty components and count realms */ - *num_realms = 0; - for(q = &r; *q; ){ - if((*q)->realm[0] == '\0'){ - p = *q; - *q = (*q)->next; - free(p->realm); - free(p); - }else{ - q = &(*q)->next; - (*num_realms)++; - } - } - if (*num_realms + 1 > UINT_MAX/sizeof(**realms)) - return ERANGE; - - { - char **R; - R = malloc((*num_realms + 1) * sizeof(*R)); - if (R == NULL) - return krb5_enomem(context); - *realms = R; - while(r){ - *R++ = r->realm; - p = r->next; - free(r); - r = p; - } - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_domain_x500_encode(char **realms, unsigned int num_realms, - krb5_data *encoding) -{ - char *s = NULL; - int len = 0; - unsigned int i; - krb5_data_zero(encoding); - if (num_realms == 0) - return 0; - for(i = 0; i < num_realms; i++){ - len += strlen(realms[i]); - if(realms[i][0] == '/') - len++; - } - len += num_realms - 1; - s = malloc(len + 1); - if (s == NULL) - return ENOMEM; - *s = '\0'; - for(i = 0; i < num_realms; i++){ - if(i) - strlcat(s, ",", len + 1); - if(realms[i][0] == '/') - strlcat(s, " ", len + 1); - strlcat(s, realms[i], len + 1); - } - encoding->data = s; - encoding->length = strlen(s); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_check_transited(krb5_context context, - krb5_const_realm client_realm, - krb5_const_realm server_realm, - krb5_realm *realms, - unsigned int num_realms, - int *bad_realm) -{ - char **tr_realms; - char **p; - size_t i; - - if(num_realms == 0) - return 0; - - tr_realms = krb5_config_get_strings(context, NULL, - "capaths", - client_realm, - server_realm, - NULL); - for(i = 0; i < num_realms; i++) { - for(p = tr_realms; p && *p; p++) { - if(strcmp(*p, realms[i]) == 0) - break; - } - if(p == NULL || *p == NULL) { - krb5_config_free_strings(tr_realms); - krb5_set_error_message (context, KRB5KRB_AP_ERR_ILL_CR_TKT, - N_("no transit allowed " - "through realm %s", ""), - realms[i]); - if(bad_realm) - *bad_realm = i; - return KRB5KRB_AP_ERR_ILL_CR_TKT; - } - } - krb5_config_free_strings(tr_realms); - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_check_transited_realms(krb5_context context, - const char *const *realms, - unsigned int num_realms, - int *bad_realm) -{ - size_t i; - int ret = 0; - char **bad_realms = krb5_config_get_strings(context, NULL, - "libdefaults", - "transited_realms_reject", - NULL); - if(bad_realms == NULL) - return 0; - - for(i = 0; i < num_realms; i++) { - char **p; - for(p = bad_realms; *p; p++) - if(strcmp(*p, realms[i]) == 0) { - ret = KRB5KRB_AP_ERR_ILL_CR_TKT; - krb5_set_error_message (context, ret, - N_("no transit allowed " - "through realm %s", ""), - *p); - if(bad_realm) - *bad_realm = i; - break; - } - } - krb5_config_free_strings(bad_realms); - return ret; -} - -#if 0 -int -main(int argc, char **argv) -{ - krb5_data x; - char **r; - int num, i; - x.data = argv[1]; - x.length = strlen(x.data); - if(domain_expand(x, &r, &num, argv[2], argv[3])) - exit(1); - for(i = 0; i < num; i++) - printf("%s\n", r[i]); - return 0; -} -#endif - diff --git a/kerberosV/src/lib/krb5/verify_init.c b/kerberosV/src/lib/krb5/verify_init.c deleted file mode 100644 index 2e77b7e59d9..00000000000 --- a/kerberosV/src/lib/krb5/verify_init.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright (c) 1997 - 2008 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_init_creds_opt_init(krb5_verify_init_creds_opt *options) -{ - memset (options, 0, sizeof(*options)); -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_init_creds_opt_set_ap_req_nofail(krb5_verify_init_creds_opt *options, - int ap_req_nofail) -{ - options->flags |= KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL; - options->ap_req_nofail = ap_req_nofail; -} - -/* - * - */ - -static krb5_boolean -fail_verify_is_ok (krb5_context context, - krb5_verify_init_creds_opt *options) -{ - if ((options->flags & KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL - && options->ap_req_nofail != 0) - || krb5_config_get_bool (context, - NULL, - "libdefaults", - "verify_ap_req_nofail", - NULL)) - return FALSE; - else - return TRUE; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_init_creds(krb5_context context, - krb5_creds *creds, - krb5_principal ap_req_server, - krb5_keytab ap_req_keytab, - krb5_ccache *ccache, - krb5_verify_init_creds_opt *options) -{ - krb5_error_code ret; - krb5_data req; - krb5_ccache local_ccache = NULL; - krb5_creds *new_creds = NULL; - krb5_auth_context auth_context = NULL; - krb5_principal server = NULL; - krb5_keytab keytab = NULL; - - krb5_data_zero (&req); - - if (ap_req_server == NULL) { - char local_hostname[MAXHOSTNAMELEN]; - - if (gethostname (local_hostname, sizeof(local_hostname)) < 0) { - ret = errno; - krb5_set_error_message (context, ret, "gethostname: %s", - strerror(ret)); - return ret; - } - - ret = krb5_sname_to_principal (context, - local_hostname, - "host", - KRB5_NT_SRV_HST, - &server); - if (ret) - goto cleanup; - } else - server = ap_req_server; - - if (ap_req_keytab == NULL) { - ret = krb5_kt_default (context, &keytab); - if (ret) - goto cleanup; - } else - keytab = ap_req_keytab; - - if (ccache && *ccache) - local_ccache = *ccache; - else { - ret = krb5_cc_new_unique(context, krb5_cc_type_memory, - NULL, &local_ccache); - if (ret) - goto cleanup; - ret = krb5_cc_initialize (context, - local_ccache, - creds->client); - if (ret) - goto cleanup; - ret = krb5_cc_store_cred (context, - local_ccache, - creds); - if (ret) - goto cleanup; - } - - if (!krb5_principal_compare (context, server, creds->server)) { - krb5_creds match_cred; - - memset (&match_cred, 0, sizeof(match_cred)); - - match_cred.client = creds->client; - match_cred.server = server; - - ret = krb5_get_credentials (context, - 0, - local_ccache, - &match_cred, - &new_creds); - if (ret) { - if (fail_verify_is_ok (context, options)) - ret = 0; - goto cleanup; - } - creds = new_creds; - } - - ret = krb5_mk_req_extended (context, - &auth_context, - 0, - NULL, - creds, - &req); - - krb5_auth_con_free (context, auth_context); - auth_context = NULL; - - if (ret) - goto cleanup; - - ret = krb5_rd_req (context, - &auth_context, - &req, - server, - keytab, - 0, - NULL); - - if (ret == KRB5_KT_NOTFOUND && fail_verify_is_ok (context, options)) - ret = 0; -cleanup: - if (auth_context) - krb5_auth_con_free (context, auth_context); - krb5_data_free (&req); - if (new_creds != NULL) - krb5_free_creds (context, new_creds); - if (ap_req_server == NULL && server) - krb5_free_principal (context, server); - if (ap_req_keytab == NULL && keytab) - krb5_kt_close (context, keytab); - if (local_ccache != NULL - && - (ccache == NULL - || (ret != 0 && *ccache == NULL))) - krb5_cc_destroy (context, local_ccache); - - if (ret == 0 && ccache != NULL && *ccache == NULL) - *ccache = local_ccache; - - return ret; -} - -/** - * Validate the newly fetch credential, see also krb5_verify_init_creds(). - * - * @param context a Kerberos 5 context - * @param creds the credentials to verify - * @param client the client name to match up - * @param ccache the credential cache to use - * @param service a service name to use, used with - * krb5_sname_to_principal() to build a hostname to use to - * verify. - * - * @ingroup krb5_ccache - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_get_validated_creds(krb5_context context, - krb5_creds *creds, - krb5_principal client, - krb5_ccache ccache, - char *service) -{ - krb5_verify_init_creds_opt vopt; - krb5_principal server; - krb5_error_code ret; - - if (krb5_principal_compare(context, creds->client, client) != TRUE) { - krb5_set_error_message(context, KRB5_PRINC_NOMATCH, - N_("Validation credentials and client " - "doesn't match", "")); - return KRB5_PRINC_NOMATCH; - } - - ret = krb5_sname_to_principal (context, NULL, service, - KRB5_NT_SRV_HST, &server); - if(ret) - return ret; - - krb5_verify_init_creds_opt_init(&vopt); - - ret = krb5_verify_init_creds(context, creds, server, NULL, NULL, &vopt); - krb5_free_principal(context, server); - - return ret; -} diff --git a/kerberosV/src/lib/krb5/verify_krb5_conf-version.rc b/kerberosV/src/lib/krb5/verify_krb5_conf-version.rc deleted file mode 100644 index f7d90dfae8f..00000000000 --- a/kerberosV/src/lib/krb5/verify_krb5_conf-version.rc +++ /dev/null @@ -1,36 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2010, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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. - * - **********************************************************************/ - -#define RC_FILE_TYPE VFT_APP -#define RC_FILE_DESC_0409 "Krb5.conf Verification Tool" -#define RC_FILE_ORIG_0409 "verify_krb5_conf.exe" - -#include "../../windows/version.rc" diff --git a/kerberosV/src/lib/krb5/verify_krb5_conf.8 b/kerberosV/src/lib/krb5/verify_krb5_conf.8 deleted file mode 100644 index 9f0207b91f5..00000000000 --- a/kerberosV/src/lib/krb5/verify_krb5_conf.8 +++ /dev/null @@ -1,95 +0,0 @@ -.\" Copyright (c) 2000 - 2004 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: verify_krb5_conf.8,v 1.6 2013/06/17 18:57:44 robert Exp $ -.\" -.Dd December 8, 2004 -.Dt VERIFY_KRB5_CONF 8 -.Os HEIMDAL -.Sh NAME -.Nm verify_krb5_conf -.Nd checks krb5.conf for obvious errors -.Sh SYNOPSIS -.Nm -.Ar [config-file] -.Sh DESCRIPTION -.Nm -reads the configuration file -.Pa krb5.conf , -or the file given on the command line, -parses it, checking verifying that the syntax is not correctly wrong. -.Pp -If the file is syntactically correct, -.Nm -tries to verify that the contents of the file is of relevant nature. -.Sh ENVIRONMENT -.Ev KRB5_CONFIG -points to the configuration file to read. -.Sh FILES -.Bl -tag -width /etc/krb5.conf -compact -.It Pa /etc/krb5.conf -Kerberos 5 configuration file -.El -.Sh DIAGNOSTICS -Possible output from -.Nm -include: -.Bl -tag -width "FpathF" -.It ": failed to parse as size/time/number/boolean" -Usually means that is misspelled, or that it contains -weird characters. The parsing done by -.Nm -is more strict than the one performed by libkrb5, so strings that -work in real life might be reported as bad. -.It ": host not found ()" -Means that is supposed to point to a host, but it can't be -recognised as one. -.It : unknown or wrong type -Means that is either a string when it should be a list, vice -versa, or just that -.Nm -is confused. -.It : unknown entry -Means that is not known by -.Nm . -.El -.Sh SEE ALSO -.Xr krb5.conf 5 -.Sh BUGS -Since each application can put almost anything in the config file, -it's hard to come up with a watertight verification process. Most of -the default settings are sanity checked, but this does not mean that -every problem is discovered, or that everything that is reported as a -possible problem actually is one. This tool should thus be used with -some care. -.Pp -It should warn about obsolete data, or bad practice, but currently -doesn't. diff --git a/kerberosV/src/lib/krb5/verify_krb5_conf.c b/kerberosV/src/lib/krb5/verify_krb5_conf.c deleted file mode 100644 index 647a311a2ca..00000000000 --- a/kerberosV/src/lib/krb5/verify_krb5_conf.c +++ /dev/null @@ -1,689 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 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 "krb5_locl.h" -#include -#include -#include - -/* verify krb5.conf */ - -static int dumpconfig_flag = 0; -static int version_flag = 0; -static int help_flag = 0; -static int warn_mit_syntax_flag = 0; - -static struct getargs args[] = { - {"dumpconfig", 0, arg_flag, &dumpconfig_flag, - "show the parsed config files", NULL }, - {"warn-mit-syntax", 0, arg_flag, &warn_mit_syntax_flag, - "show the parsed config files", NULL }, - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - "[config-file]"); - exit (ret); -} - -static int -check_bytes(krb5_context context, const char *path, char *data) -{ - if(parse_bytes(data, NULL) == -1) { - krb5_warnx(context, "%s: failed to parse \"%s\" as size", path, data); - return 1; - } - return 0; -} - -static int -check_time(krb5_context context, const char *path, char *data) -{ - if(parse_time(data, NULL) == -1) { - krb5_warnx(context, "%s: failed to parse \"%s\" as time", path, data); - return 1; - } - return 0; -} - -static int -check_numeric(krb5_context context, const char *path, char *data) -{ - long v; - char *end; - v = strtol(data, &end, 0); - - if ((v == LONG_MIN || v == LONG_MAX) && errno != 0) { - krb5_warnx(context, "%s: over/under flow for \"%s\"", - path, data); - return 1; - } - if(*end != '\0') { - krb5_warnx(context, "%s: failed to parse \"%s\" as a number", - path, data); - return 1; - } - return 0; -} - -static int -check_boolean(krb5_context context, const char *path, char *data) -{ - long int v; - char *end; - if(strcasecmp(data, "yes") == 0 || - strcasecmp(data, "true") == 0 || - strcasecmp(data, "no") == 0 || - strcasecmp(data, "false") == 0) - return 0; - v = strtol(data, &end, 0); - if(*end != '\0') { - krb5_warnx(context, "%s: failed to parse \"%s\" as a boolean", - path, data); - return 1; - } - if(v != 0 && v != 1) - krb5_warnx(context, "%s: numeric value \"%s\" is treated as \"true\"", - path, data); - return 0; -} - -static int -check_524(krb5_context context, const char *path, char *data) -{ - if(strcasecmp(data, "yes") == 0 || - strcasecmp(data, "no") == 0 || - strcasecmp(data, "2b") == 0 || - strcasecmp(data, "local") == 0) - return 0; - - krb5_warnx(context, "%s: didn't contain a valid option `%s'", - path, data); - return 1; -} - -static int -check_host(krb5_context context, const char *path, char *data) -{ - int ret; - char hostname[128]; - const char *p = data; - struct addrinfo hints; - char service[32]; - int defport; - struct addrinfo *ai; - - hints.ai_flags = 0; - hints.ai_family = PF_UNSPEC; - hints.ai_socktype = 0; - hints.ai_protocol = 0; - - hints.ai_addrlen = 0; - hints.ai_canonname = NULL; - hints.ai_addr = NULL; - hints.ai_next = NULL; - - /* XXX data could be a list of hosts that this code can't handle */ - /* XXX copied from krbhst.c */ - if(strncmp(p, "http://", 7) == 0){ - p += 7; - hints.ai_socktype = SOCK_STREAM; - strlcpy(service, "http", sizeof(service)); - defport = 80; - } else if(strncmp(p, "http/", 5) == 0) { - p += 5; - hints.ai_socktype = SOCK_STREAM; - strlcpy(service, "http", sizeof(service)); - defport = 80; - }else if(strncmp(p, "tcp/", 4) == 0){ - p += 4; - hints.ai_socktype = SOCK_STREAM; - strlcpy(service, "kerberos", sizeof(service)); - defport = 88; - } else if(strncmp(p, "udp/", 4) == 0) { - p += 4; - hints.ai_socktype = SOCK_DGRAM; - strlcpy(service, "kerberos", sizeof(service)); - defport = 88; - } else { - hints.ai_socktype = SOCK_DGRAM; - strlcpy(service, "kerberos", sizeof(service)); - defport = 88; - } - if(strsep_copy(&p, ":", hostname, sizeof(hostname)) < 0) { - return 1; - } - hostname[strcspn(hostname, "/")] = '\0'; - if(p != NULL) { - char *end; - int tmp = strtol(p, &end, 0); - if(end == p) { - krb5_warnx(context, "%s: failed to parse port number in %s", - path, data); - return 1; - } - defport = tmp; - snprintf(service, sizeof(service), "%u", defport); - } - ret = getaddrinfo(hostname, service, &hints, &ai); - if(ret == EAI_SERVICE && !isdigit((unsigned char)service[0])) { - snprintf(service, sizeof(service), "%u", defport); - ret = getaddrinfo(hostname, service, &hints, &ai); - } - if(ret != 0) { - krb5_warnx(context, "%s: %s (%s)", path, gai_strerror(ret), hostname); - return 1; - } - return 0; -} - -static int -mit_entry(krb5_context context, const char *path, char *data) -{ - if (warn_mit_syntax_flag) - krb5_warnx(context, "%s is only used by MIT Kerberos", path); - return 0; -} - -struct s2i { - const char *s; - int val; -}; - -#define L(X) { #X, LOG_ ## X } - -static struct s2i syslogvals[] = { - /* severity */ - L(EMERG), - L(ALERT), - L(CRIT), - L(ERR), - L(WARNING), - L(NOTICE), - L(INFO), - L(DEBUG), - /* facility */ - L(AUTH), -#ifdef LOG_AUTHPRIV - L(AUTHPRIV), -#endif -#ifdef LOG_CRON - L(CRON), -#endif - L(DAEMON), -#ifdef LOG_FTP - L(FTP), -#endif - L(KERN), - L(LPR), - L(MAIL), -#ifdef LOG_NEWS - L(NEWS), -#endif - L(SYSLOG), - L(USER), -#ifdef LOG_UUCP - L(UUCP), -#endif - L(LOCAL0), - L(LOCAL1), - L(LOCAL2), - L(LOCAL3), - L(LOCAL4), - L(LOCAL5), - L(LOCAL6), - L(LOCAL7), - { NULL, -1 } -}; - -static int -find_value(const char *s, struct s2i *table) -{ - while(table->s && strcasecmp(table->s, s)) - table++; - return table->val; -} - -static int -check_log(krb5_context context, const char *path, char *data) -{ - /* XXX sync with log.c */ - int min = 0, max = -1, n; - char c; - const char *p = data; - - n = sscanf(p, "%d%c%d/", &min, &c, &max); - if(n == 2){ - if(c == '/') { - if(min < 0){ - max = -min; - min = 0; - }else{ - max = min; - } - } - } - if(n){ - p = strchr(p, '/'); - if(p == NULL) { - krb5_warnx(context, "%s: failed to parse \"%s\"", path, data); - return 1; - } - p++; - } - if(strcmp(p, "STDERR") == 0 || - strcmp(p, "CONSOLE") == 0 || - (strncmp(p, "FILE", 4) == 0 && (p[4] == ':' || p[4] == '=')) || - (strncmp(p, "DEVICE", 6) == 0 && p[6] == '=')) - return 0; - if(strncmp(p, "SYSLOG", 6) == 0){ - int ret = 0; - char severity[128] = ""; - char facility[128] = ""; - p += 6; - if(*p != '\0') - p++; - if(strsep_copy(&p, ":", severity, sizeof(severity)) != -1) - strsep_copy(&p, ":", facility, sizeof(facility)); - if(*severity == '\0') - strlcpy(severity, "ERR", sizeof(severity)); - if(*facility == '\0') - strlcpy(facility, "AUTH", sizeof(facility)); - if(find_value(severity, syslogvals) == -1) { - krb5_warnx(context, "%s: unknown syslog facility \"%s\"", - path, facility); - ret++; - } - if(find_value(severity, syslogvals) == -1) { - krb5_warnx(context, "%s: unknown syslog severity \"%s\"", - path, severity); - ret++; - } - return ret; - }else{ - krb5_warnx(context, "%s: unknown log type: \"%s\"", path, data); - return 1; - } -} - -typedef int (*check_func_t)(krb5_context, const char*, char*); -struct entry { - const char *name; - int type; - void *check_data; - int deprecated; -}; - -struct entry all_strings[] = { - { "", krb5_config_string, NULL }, - { NULL } -}; - -struct entry all_boolean[] = { - { "", krb5_config_string, check_boolean }, - { NULL } -}; - - -struct entry v4_name_convert_entries[] = { - { "host", krb5_config_list, all_strings }, - { "plain", krb5_config_list, all_strings }, - { NULL } -}; - -struct entry libdefaults_entries[] = { - { "accept_null_addresses", krb5_config_string, check_boolean }, - { "allow_weak_crypto", krb5_config_string, check_boolean }, - { "capath", krb5_config_list, all_strings, 1 }, - { "check_pac", krb5_config_string, check_boolean }, - { "clockskew", krb5_config_string, check_time }, - { "date_format", krb5_config_string, NULL }, - { "default_cc_name", krb5_config_string, NULL }, - { "default_etypes", krb5_config_string, NULL }, - { "default_etypes_des", krb5_config_string, NULL }, - { "default_keytab_modify_name", krb5_config_string, NULL }, - { "default_keytab_name", krb5_config_string, NULL }, - { "default_realm", krb5_config_string, NULL }, - { "dns_canonize_hostname", krb5_config_string, check_boolean }, - { "dns_proxy", krb5_config_string, NULL }, - { "dns_lookup_kdc", krb5_config_string, check_boolean }, - { "dns_lookup_realm", krb5_config_string, check_boolean }, - { "dns_lookup_realm_labels", krb5_config_string, NULL }, - { "egd_socket", krb5_config_string, NULL }, - { "encrypt", krb5_config_string, check_boolean }, - { "extra_addresses", krb5_config_string, NULL }, - { "fcache_version", krb5_config_string, check_numeric }, - { "fcc-mit-ticketflags", krb5_config_string, check_boolean }, - { "forward", krb5_config_string, check_boolean }, - { "forwardable", krb5_config_string, check_boolean }, - { "http_proxy", krb5_config_string, check_host /* XXX */ }, - { "ignore_addresses", krb5_config_string, NULL }, - { "kdc_timeout", krb5_config_string, check_time }, - { "kdc_timesync", krb5_config_string, check_boolean }, - { "log_utc", krb5_config_string, check_boolean }, - { "maxretries", krb5_config_string, check_numeric }, - { "scan_interfaces", krb5_config_string, check_boolean }, - { "srv_lookup", krb5_config_string, check_boolean }, - { "srv_try_txt", krb5_config_string, check_boolean }, - { "ticket_lifetime", krb5_config_string, check_time }, - { "time_format", krb5_config_string, NULL }, - { "transited_realms_reject", krb5_config_string, NULL }, - { "no-addresses", krb5_config_string, check_boolean }, - { "v4_instance_resolve", krb5_config_string, check_boolean }, - { "v4_name_convert", krb5_config_list, v4_name_convert_entries }, - { "verify_ap_req_nofail", krb5_config_string, check_boolean }, - { "max_retries", krb5_config_string, check_time }, - { "renew_lifetime", krb5_config_string, check_time }, - { "proxiable", krb5_config_string, check_boolean }, - { "warn_pwexpire", krb5_config_string, check_time }, - /* MIT stuff */ - { "permitted_enctypes", krb5_config_string, mit_entry }, - { "default_tgs_enctypes", krb5_config_string, mit_entry }, - { "default_tkt_enctypes", krb5_config_string, mit_entry }, - { NULL } -}; - -struct entry appdefaults_entries[] = { - { "afslog", krb5_config_string, check_boolean }, - { "afs-use-524", krb5_config_string, check_524 }, - { "encrypt", krb5_config_string, check_boolean }, - { "forward", krb5_config_string, check_boolean }, - { "forwardable", krb5_config_string, check_boolean }, - { "proxiable", krb5_config_string, check_boolean }, - { "ticket_lifetime", krb5_config_string, check_time }, - { "renew_lifetime", krb5_config_string, check_time }, - { "no-addresses", krb5_config_string, check_boolean }, - { "krb4_get_tickets", krb5_config_string, check_boolean }, - { "pkinit_anchors", krb5_config_string, NULL }, - { "pkinit_win2k", krb5_config_string, NULL }, - { "pkinit_win2k_require_binding", krb5_config_string, NULL }, - { "pkinit_require_eku", krb5_config_string, NULL }, - { "pkinit_require_krbtgt_otherName", krb5_config_string, NULL }, - { "pkinit_require_hostname_match", krb5_config_string, NULL }, -#if 0 - { "anonymous", krb5_config_string, check_boolean }, -#endif - { "", krb5_config_list, appdefaults_entries }, - { NULL } -}; - -struct entry realms_entries[] = { - { "forwardable", krb5_config_string, check_boolean }, - { "proxiable", krb5_config_string, check_boolean }, - { "ticket_lifetime", krb5_config_string, check_time }, - { "renew_lifetime", krb5_config_string, check_time }, - { "warn_pwexpire", krb5_config_string, check_time }, - { "kdc", krb5_config_string, check_host }, - { "admin_server", krb5_config_string, check_host }, - { "kpasswd_server", krb5_config_string, check_host }, - { "krb524_server", krb5_config_string, check_host }, - { "v4_name_convert", krb5_config_list, v4_name_convert_entries }, - { "v4_instance_convert", krb5_config_list, all_strings }, - { "v4_domains", krb5_config_string, NULL }, - { "default_domain", krb5_config_string, NULL }, - { "win2k_pkinit", krb5_config_string, NULL }, - /* MIT stuff */ - { "admin_keytab", krb5_config_string, mit_entry }, - { "acl_file", krb5_config_string, mit_entry }, - { "dict_file", krb5_config_string, mit_entry }, - { "kadmind_port", krb5_config_string, mit_entry }, - { "kpasswd_port", krb5_config_string, mit_entry }, - { "master_key_name", krb5_config_string, mit_entry }, - { "master_key_type", krb5_config_string, mit_entry }, - { "key_stash_file", krb5_config_string, mit_entry }, - { "max_life", krb5_config_string, mit_entry }, - { "max_renewable_life", krb5_config_string, mit_entry }, - { "default_principal_expiration", krb5_config_string, mit_entry }, - { "default_principal_flags", krb5_config_string, mit_entry }, - { "supported_enctypes", krb5_config_string, mit_entry }, - { "database_name", krb5_config_string, mit_entry }, - { NULL } -}; - -struct entry realms_foobar[] = { - { "", krb5_config_list, realms_entries }, - { NULL } -}; - - -struct entry kdc_database_entries[] = { - { "realm", krb5_config_string, NULL }, - { "dbname", krb5_config_string, NULL }, - { "mkey_file", krb5_config_string, NULL }, - { "acl_file", krb5_config_string, NULL }, - { "log_file", krb5_config_string, NULL }, - { NULL } -}; - -struct entry kdc_entries[] = { - { "database", krb5_config_list, kdc_database_entries }, - { "key-file", krb5_config_string, NULL }, - { "logging", krb5_config_string, check_log }, - { "max-request", krb5_config_string, check_bytes }, - { "require-preauth", krb5_config_string, check_boolean }, - { "ports", krb5_config_string, NULL }, - { "addresses", krb5_config_string, NULL }, - { "enable-kerberos4", krb5_config_string, check_boolean }, - { "enable-524", krb5_config_string, check_boolean }, - { "enable-http", krb5_config_string, check_boolean }, - { "check-ticket-addresses", krb5_config_string, check_boolean }, - { "allow-null-ticket-addresses", krb5_config_string, check_boolean }, - { "allow-anonymous", krb5_config_string, check_boolean }, - { "v4_realm", krb5_config_string, NULL }, - { "enable-kaserver", krb5_config_string, check_boolean, 1 }, - { "encode_as_rep_as_tgs_rep", krb5_config_string, check_boolean }, - { "kdc_warn_pwexpire", krb5_config_string, check_time }, - { "use_2b", krb5_config_list, NULL }, - { "enable-pkinit", krb5_config_string, check_boolean }, - { "pkinit_identity", krb5_config_string, NULL }, - { "pkinit_anchors", krb5_config_string, NULL }, - { "pkinit_pool", krb5_config_string, NULL }, - { "pkinit_revoke", krb5_config_string, NULL }, - { "pkinit_kdc_ocsp", krb5_config_string, NULL }, - { "pkinit_principal_in_certificate", krb5_config_string, NULL }, - { "pkinit_dh_min_bits", krb5_config_string, NULL }, - { "pkinit_allow_proxy_certificate", krb5_config_string, NULL }, - { "hdb-ldap-create-base", krb5_config_string, NULL }, - { "v4-realm", krb5_config_string, NULL }, - { NULL } -}; - -struct entry kadmin_entries[] = { - { "password_lifetime", krb5_config_string, check_time }, - { "default_keys", krb5_config_string, NULL }, - { "use_v4_salt", krb5_config_string, NULL }, - { "require-preauth", krb5_config_string, check_boolean }, - { NULL } -}; -struct entry log_strings[] = { - { "", krb5_config_string, check_log }, - { NULL } -}; - - -/* MIT stuff */ -struct entry kdcdefaults_entries[] = { - { "kdc_ports", krb5_config_string, mit_entry }, - { "v4_mode", krb5_config_string, mit_entry }, - { NULL } -}; - -struct entry capaths_entries[] = { - { "", krb5_config_list, all_strings }, - { NULL } -}; - -struct entry password_quality_entries[] = { - { "policies", krb5_config_string, NULL }, - { "external_program", krb5_config_string, NULL }, - { "min_classes", krb5_config_string, check_numeric }, - { "min_length", krb5_config_string, check_numeric }, - { "", krb5_config_list, all_strings }, - { NULL } -}; - -struct entry toplevel_sections[] = { - { "libdefaults" , krb5_config_list, libdefaults_entries }, - { "realms", krb5_config_list, realms_foobar }, - { "domain_realm", krb5_config_list, all_strings }, - { "logging", krb5_config_list, log_strings }, - { "kdc", krb5_config_list, kdc_entries }, - { "kadmin", krb5_config_list, kadmin_entries }, - { "appdefaults", krb5_config_list, appdefaults_entries }, - { "gssapi", krb5_config_list, NULL }, - { "capaths", krb5_config_list, capaths_entries }, - { "password_quality", krb5_config_list, password_quality_entries }, - /* MIT stuff */ - { "kdcdefaults", krb5_config_list, kdcdefaults_entries }, - { NULL } -}; - - -static int -check_section(krb5_context context, const char *path, krb5_config_section *cf, - struct entry *entries) -{ - int error = 0; - krb5_config_section *p; - struct entry *e; - - char *local; - - for(p = cf; p != NULL; p = p->next) { - local = NULL; - if (asprintf(&local, "%s/%s", path, p->name) < 0 || local == NULL) - errx(1, "out of memory"); - for(e = entries; e->name != NULL; e++) { - if(*e->name == '\0' || strcmp(e->name, p->name) == 0) { - if(e->type != p->type) { - krb5_warnx(context, "%s: unknown or wrong type", local); - error |= 1; - } else if(p->type == krb5_config_string && e->check_data != NULL) { - error |= (*(check_func_t)e->check_data)(context, local, p->u.string); - } else if(p->type == krb5_config_list && e->check_data != NULL) { - error |= check_section(context, local, p->u.list, e->check_data); - } - if(e->deprecated) { - krb5_warnx(context, "%s: is a deprecated entry", local); - error |= 1; - } - break; - } - } - if(e->name == NULL) { - krb5_warnx(context, "%s: unknown entry", local); - error |= 1; - } - free(local); - } - return error; -} - - -static void -dumpconfig(int level, krb5_config_section *top) -{ - krb5_config_section *x; - for(x = top; x; x = x->next) { - switch(x->type) { - case krb5_config_list: - if(level == 0) { - printf("[%s]\n", x->name); - } else { - printf("%*s%s = {\n", 4 * level, " ", x->name); - } - dumpconfig(level + 1, x->u.list); - if(level > 0) - printf("%*s}\n", 4 * level, " "); - break; - case krb5_config_string: - printf("%*s%s = %s\n", 4 * level, " ", x->name, x->u.string); - break; - } - } -} - -int -main(int argc, char **argv) -{ - krb5_context context; - krb5_error_code ret; - krb5_config_section *tmp_cf; - int optidx = 0; - - setprogname (argv[0]); - - ret = krb5_init_context(&context); - if (ret == KRB5_CONFIG_BADFORMAT) - errx (1, "krb5_init_context failed to parse configuration file"); - else if (ret) - errx (1, "krb5_init_context failed with %d", ret); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optidx; - argv += optidx; - - tmp_cf = NULL; - if(argc == 0) - krb5_get_default_config_files(&argv); - - while(*argv) { - ret = krb5_config_parse_file_multi(context, *argv, &tmp_cf); - if (ret != 0) - krb5_warn (context, ret, "krb5_config_parse_file"); - argv++; - } - - if(dumpconfig_flag) - dumpconfig(0, tmp_cf); - - return check_section(context, "", tmp_cf, toplevel_sections); -} diff --git a/kerberosV/src/lib/krb5/verify_krb5_conf.cat8 b/kerberosV/src/lib/krb5/verify_krb5_conf.cat8 deleted file mode 100644 index 25143916cfc..00000000000 --- a/kerberosV/src/lib/krb5/verify_krb5_conf.cat8 +++ /dev/null @@ -1,57 +0,0 @@ - -VERIFY_KRB5_CONF(8) BSD System Manager's Manual VERIFY_KRB5_CONF(8) - -NNAAMMEE - vveerriiffyy__kkrrbb55__ccoonnff -- checks krb5.conf for obvious errors - -SSYYNNOOPPSSIISS - vveerriiffyy__kkrrbb55__ccoonnff _[_c_o_n_f_i_g_-_f_i_l_e_] - -DDEESSCCRRIIPPTTIIOONN - vveerriiffyy__kkrrbb55__ccoonnff reads the configuration file _k_r_b_5_._c_o_n_f, or the file - given on the command line, parses it, checking verifying that the syntax - is not correctly wrong. - - If the file is syntactically correct, vveerriiffyy__kkrrbb55__ccoonnff tries to verify - that the contents of the file is of relevant nature. - -EENNVVIIRROONNMMEENNTT - KRB5_CONFIG points to the configuration file to read. - -FFIILLEESS - /etc/krb5.conf Kerberos 5 configuration file - -DDIIAAGGNNOOSSTTIICCSS - Possible output from vveerriiffyy__kkrrbb55__ccoonnff include: - - : failed to parse as size/time/number/boolean - Usually means that is misspelled, or that it contains - weird characters. The parsing done by vveerriiffyy__kkrrbb55__ccoonnff is more - strict than the one performed by libkrb5, so strings that work in - real life might be reported as bad. - - : host not found () - Means that is supposed to point to a host, but it can't be - recognised as one. - - : unknown or wrong type - Means that is either a string when it should be a list, - vice versa, or just that vveerriiffyy__kkrrbb55__ccoonnff is confused. - - : unknown entry - Means that is not known by vveerriiffyy__kkrrbb55__ccoonnff. - -SSEEEE AALLSSOO - krb5.conf(5) - -BBUUGGSS - Since each application can put almost anything in the config file, it's - hard to come up with a watertight verification process. Most of the - default settings are sanity checked, but this does not mean that every - problem is discovered, or that everything that is reported as a possible - problem actually is one. This tool should thus be used with some care. - - It should warn about obsolete data, or bad practice, but currently - doesn't. - -HEIMDAL December 8, 2004 HEIMDAL diff --git a/kerberosV/src/lib/krb5/verify_user.c b/kerberosV/src/lib/krb5/verify_user.c deleted file mode 100644 index 01562ef562a..00000000000 --- a/kerberosV/src/lib/krb5/verify_user.c +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright (c) 1997-2004 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 "krb5_locl.h" - -static krb5_error_code -verify_common (krb5_context context, - krb5_principal principal, - krb5_ccache ccache, - krb5_keytab keytab, - krb5_boolean secure, - const char *service, - krb5_creds cred) -{ - krb5_error_code ret; - krb5_principal server; - krb5_verify_init_creds_opt vopt; - krb5_ccache id; - - ret = krb5_sname_to_principal (context, NULL, service, KRB5_NT_SRV_HST, - &server); - if(ret) - return ret; - - krb5_verify_init_creds_opt_init(&vopt); - krb5_verify_init_creds_opt_set_ap_req_nofail(&vopt, secure); - - ret = krb5_verify_init_creds(context, - &cred, - server, - keytab, - NULL, - &vopt); - krb5_free_principal(context, server); - if(ret) - return ret; - if(ccache == NULL) - ret = krb5_cc_default (context, &id); - else - id = ccache; - if(ret == 0){ - ret = krb5_cc_initialize(context, id, principal); - if(ret == 0){ - ret = krb5_cc_store_cred(context, id, &cred); - } - if(ccache == NULL) - krb5_cc_close(context, id); - } - krb5_free_cred_contents(context, &cred); - return ret; -} - -/* - * Verify user `principal' with `password'. - * - * If `secure', also verify against local service key for `service'. - * - * As a side effect, fresh tickets are obtained and stored in `ccache'. - */ - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_init(krb5_verify_opt *opt) -{ - memset(opt, 0, sizeof(*opt)); - opt->secure = TRUE; - opt->service = "host"; -} - -KRB5_LIB_FUNCTION int KRB5_LIB_CALL -krb5_verify_opt_alloc(krb5_context context, krb5_verify_opt **opt) -{ - *opt = calloc(1, sizeof(**opt)); - if ((*opt) == NULL) { - krb5_set_error_message(context, ENOMEM, - N_("malloc: out of memory", "")); - return ENOMEM; - } - krb5_verify_opt_init(*opt); - return 0; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_free(krb5_verify_opt *opt) -{ - free(opt); -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_set_ccache(krb5_verify_opt *opt, krb5_ccache ccache) -{ - opt->ccache = ccache; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_set_keytab(krb5_verify_opt *opt, krb5_keytab keytab) -{ - opt->keytab = keytab; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_set_secure(krb5_verify_opt *opt, krb5_boolean secure) -{ - opt->secure = secure; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_set_service(krb5_verify_opt *opt, const char *service) -{ - opt->service = service; -} - -KRB5_LIB_FUNCTION void KRB5_LIB_CALL -krb5_verify_opt_set_flags(krb5_verify_opt *opt, unsigned int flags) -{ - opt->flags |= flags; -} - -static krb5_error_code -verify_user_opt_int(krb5_context context, - krb5_principal principal, - const char *password, - krb5_verify_opt *vopt) - -{ - krb5_error_code ret; - krb5_get_init_creds_opt *opt; - krb5_creds cred; - - ret = krb5_get_init_creds_opt_alloc (context, &opt); - if (ret) - return ret; - krb5_get_init_creds_opt_set_default_flags(context, NULL, - krb5_principal_get_realm(context, principal), - opt); - ret = krb5_get_init_creds_password (context, - &cred, - principal, - password, - krb5_prompter_posix, - NULL, - 0, - NULL, - opt); - krb5_get_init_creds_opt_free(context, opt); - if(ret) - return ret; -#define OPT(V, D) ((vopt && (vopt->V)) ? (vopt->V) : (D)) - return verify_common (context, principal, OPT(ccache, NULL), - OPT(keytab, NULL), vopt ? vopt->secure : TRUE, - OPT(service, "host"), cred); -#undef OPT -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_user_opt(krb5_context context, - krb5_principal principal, - const char *password, - krb5_verify_opt *opt) -{ - krb5_error_code ret; - - if(opt && (opt->flags & KRB5_VERIFY_LREALMS)) { - krb5_realm *realms, *r; - ret = krb5_get_default_realms (context, &realms); - if (ret) - return ret; - ret = KRB5_CONFIG_NODEFREALM; - - for (r = realms; *r != NULL && ret != 0; ++r) { - ret = krb5_principal_set_realm(context, principal, *r); - if (ret) { - krb5_free_host_realm (context, realms); - return ret; - } - - ret = verify_user_opt_int(context, principal, password, opt); - } - krb5_free_host_realm (context, realms); - if(ret) - return ret; - } else - ret = verify_user_opt_int(context, principal, password, opt); - return ret; -} - -/* compat function that calls above */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_user(krb5_context context, - krb5_principal principal, - krb5_ccache ccache, - const char *password, - krb5_boolean secure, - const char *service) -{ - krb5_verify_opt opt; - - krb5_verify_opt_init(&opt); - - krb5_verify_opt_set_ccache(&opt, ccache); - krb5_verify_opt_set_secure(&opt, secure); - krb5_verify_opt_set_service(&opt, service); - - return krb5_verify_user_opt(context, principal, password, &opt); -} - -/* - * A variant of `krb5_verify_user'. The realm of `principal' is - * ignored and all the local realms are tried. - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verify_user_lrealm(krb5_context context, - krb5_principal principal, - krb5_ccache ccache, - const char *password, - krb5_boolean secure, - const char *service) -{ - krb5_verify_opt opt; - - krb5_verify_opt_init(&opt); - - krb5_verify_opt_set_ccache(&opt, ccache); - krb5_verify_opt_set_secure(&opt, secure); - krb5_verify_opt_set_service(&opt, service); - krb5_verify_opt_set_flags(&opt, KRB5_VERIFY_LREALMS); - - return krb5_verify_user_opt(context, principal, password, &opt); -} diff --git a/kerberosV/src/lib/krb5/version-script.map b/kerberosV/src/lib/krb5/version-script.map deleted file mode 100644 index 818e6e071cb..00000000000 --- a/kerberosV/src/lib/krb5/version-script.map +++ /dev/null @@ -1,774 +0,0 @@ -HEIMDAL_KRB5_2.0 { - global: - krb524_convert_creds_kdc; - krb524_convert_creds_kdc_ccache; - krb5_425_conv_principal; - krb5_425_conv_principal_ext2; - krb5_425_conv_principal_ext; - krb5_524_conv_principal; - krb5_abort; - krb5_abortx; - krb5_acl_match_file; - krb5_acl_match_string; - krb5_add_et_list; - krb5_add_extra_addresses; - krb5_add_ignore_addresses; - krb5_addlog_dest; - krb5_addlog_func; - krb5_addr2sockaddr; - krb5_address_compare; - krb5_address_order; - krb5_address_prefixlen_boundary; - krb5_address_search; - krb5_allow_weak_crypto; - krb5_aname_to_localname; - krb5_anyaddr; - krb5_appdefault_boolean; - krb5_appdefault_string; - krb5_appdefault_time; - krb5_append_addresses; - krb5_auth_con_addflags; - krb5_auth_con_free; - krb5_auth_con_genaddrs; - krb5_auth_con_generatelocalsubkey; - krb5_auth_con_getaddrs; - krb5_auth_con_getauthenticator; - krb5_auth_con_getcksumtype; - krb5_auth_con_getflags; - krb5_auth_con_getkey; - krb5_auth_con_getkeytype; - krb5_auth_con_getlocalseqnumber; - krb5_auth_con_getlocalsubkey; - krb5_auth_con_getrcache; - krb5_auth_con_getremoteseqnumber; - krb5_auth_con_getremotesubkey; - krb5_auth_con_init; - krb5_auth_con_removeflags; - krb5_auth_con_setaddrs; - krb5_auth_con_setaddrs_from_fd; - krb5_auth_con_setcksumtype; - krb5_auth_con_setflags; - krb5_auth_con_setkey; - krb5_auth_con_setkeytype; - krb5_auth_con_setlocalseqnumber; - krb5_auth_con_setlocalsubkey; - krb5_auth_con_setrcache; - krb5_auth_con_setremoteseqnumber; - krb5_auth_con_setremotesubkey; - krb5_auth_con_setuserkey; - krb5_auth_getremoteseqnumber; - krb5_build_ap_req; - krb5_build_principal; - krb5_build_principal_ext; - krb5_build_principal_va; - krb5_build_principal_va_ext; - krb5_c_block_size; - krb5_c_checksum_length; - krb5_c_decrypt; - krb5_c_encrypt; - krb5_c_encrypt_length; - krb5_c_enctype_compare; - krb5_c_get_checksum; - krb5_c_is_coll_proof_cksum; - krb5_c_is_keyed_cksum; - krb5_c_keylengths; - krb5_c_make_checksum; - krb5_c_make_random_key; - krb5_c_prf; - krb5_c_prf_length; - krb5_c_set_checksum; - krb5_c_valid_cksumtype; - krb5_c_valid_enctype; - krb5_c_verify_checksum; - krb5_cc_cache_end_seq_get; - krb5_cc_cache_get_first; - krb5_cc_cache_match; - krb5_cc_cache_next; - krb5_cc_clear_mcred; - krb5_cc_close; - krb5_cc_copy_cache; - krb5_cc_copy_match_f; - krb5_cc_default; - krb5_cc_default_name; - krb5_cc_destroy; - krb5_cc_end_seq_get; - krb5_cc_gen_new; - krb5_cc_get_config; - krb5_cc_get_friendly_name; - krb5_cc_get_full_name; - krb5_cc_get_kdc_offset; - krb5_cc_get_lifetime; - krb5_cc_get_name; - krb5_cc_get_ops; - krb5_cc_get_prefix_ops; - krb5_cc_get_principal; - krb5_cc_get_type; - krb5_cc_get_version; - krb5_cc_initialize; - krb5_cc_last_change_time; - krb5_cc_move; - krb5_cc_new_unique; - krb5_cc_next_cred; - krb5_cc_next_cred_match; - krb5_cc_register; - krb5_cc_remove_cred; - krb5_cc_resolve; - krb5_cc_retrieve_cred; - krb5_cc_set_config; - krb5_cc_set_default_name; - krb5_cc_set_flags; - krb5_cc_set_kdc_offset; - krb5_cc_start_seq_get; - krb5_cc_store_cred; - krb5_cc_support_switch; - krb5_cc_switch; - krb5_cc_set_friendly_name; - krb5_change_password; - krb5_check_transited; - krb5_check_transited_realms; - krb5_checksum_disable; - krb5_checksum_free; - krb5_checksum_is_collision_proof; - krb5_checksum_is_keyed; - krb5_checksumsize; - krb5_cksumtype_to_enctype; - krb5_cksumtype_valid; - krb5_clear_error_string; - krb5_clear_error_message; - krb5_closelog; - krb5_compare_creds; - krb5_config_file_free; - krb5_config_free_strings; - krb5_config_get_bool; - krb5_config_get_bool_default; - krb5_config_get_int; - krb5_config_get_int_default; - krb5_config_get_list; - krb5_config_get_string; - krb5_config_get_string_default; - krb5_config_get_strings; - krb5_config_get_time; - krb5_config_get_time_default; - krb5_config_parse_file; - krb5_config_parse_file_multi; - krb5_config_parse_string_multi; - krb5_config_vget_bool; - krb5_config_vget_bool_default; - krb5_config_vget_int; - krb5_config_vget_int_default; - krb5_config_vget_list; - krb5_config_vget_string; - krb5_config_vget_string_default; - krb5_config_vget_strings; - krb5_config_vget_time; - krb5_config_vget_time_default; - krb5_copy_address; - krb5_copy_addresses; - krb5_copy_checksum; - krb5_copy_creds; - krb5_copy_creds_contents; - krb5_copy_context; - krb5_copy_data; - krb5_copy_host_realm; - krb5_copy_keyblock; - krb5_copy_keyblock_contents; - krb5_copy_principal; - krb5_copy_ticket; - krb5_create_checksum; - krb5_create_checksum_iov; - krb5_crypto_destroy; - krb5_crypto_fx_cf2; - krb5_crypto_get_checksum_type; - krb5_crypto_getblocksize; - krb5_crypto_getconfoundersize; - krb5_crypto_getenctype; - krb5_crypto_getpadsize; - krb5_crypto_init; - krb5_crypto_overhead; - krb5_crypto_prf; - krb5_crypto_prf_length; - krb5_crypto_length; - krb5_crypto_length_iov; - krb5_decrypt_iov_ivec; - krb5_encrypt_iov_ivec; - krb5_enomem; - krb5_data_alloc; - krb5_data_ct_cmp; - krb5_data_cmp; - krb5_data_copy; - krb5_data_free; - krb5_data_realloc; - krb5_data_zero; - krb5_decode_Authenticator; - krb5_decode_ETYPE_INFO2; - krb5_decode_ETYPE_INFO; - krb5_decode_EncAPRepPart; - krb5_decode_EncASRepPart; - krb5_decode_EncKrbCredPart; - krb5_decode_EncTGSRepPart; - krb5_decode_EncTicketPart; - krb5_decode_ap_req; - krb5_decrypt; - krb5_decrypt_EncryptedData; - krb5_decrypt_ivec; - krb5_decrypt_ticket; - krb5_derive_key; - krb5_digest_alloc; - krb5_digest_free; - krb5_digest_get_client_binding; - krb5_digest_get_identifier; - krb5_digest_get_opaque; - krb5_digest_get_rsp; - krb5_digest_get_server_nonce; - krb5_digest_get_session_key; - krb5_digest_get_tickets; - krb5_digest_init_request; - krb5_digest_probe; - krb5_digest_rep_get_status; - krb5_digest_request; - krb5_digest_set_authentication_user; - krb5_digest_set_authid; - krb5_digest_set_client_nonce; - krb5_digest_set_digest; - krb5_digest_set_hostname; - krb5_digest_set_identifier; - krb5_digest_set_method; - krb5_digest_set_nonceCount; - krb5_digest_set_opaque; - krb5_digest_set_qop; - krb5_digest_set_realm; - krb5_digest_set_responseData; - krb5_digest_set_server_cb; - krb5_digest_set_server_nonce; - krb5_digest_set_type; - krb5_digest_set_uri; - krb5_digest_set_username; - krb5_domain_x500_decode; - krb5_domain_x500_encode; - krb5_eai_to_heim_errno; - krb5_encode_Authenticator; - krb5_encode_ETYPE_INFO2; - krb5_encode_ETYPE_INFO; - krb5_encode_EncAPRepPart; - krb5_encode_EncASRepPart; - krb5_encode_EncKrbCredPart; - krb5_encode_EncTGSRepPart; - krb5_encode_EncTicketPart; - krb5_encrypt; - krb5_encrypt_EncryptedData; - krb5_encrypt_ivec; - krb5_enctype_enable; - krb5_enctype_disable; - krb5_enctype_keybits; - krb5_enctype_keysize; - krb5_enctype_to_keytype; - krb5_enctype_to_string; - krb5_enctype_valid; - krb5_enctypes_compatible_keys; - krb5_err; - krb5_error_from_rd_error; - krb5_errx; - krb5_expand_hostname; - krb5_expand_hostname_realms; - krb5_find_padata; - krb5_format_time; - krb5_free_address; - krb5_free_addresses; - krb5_free_ap_rep_enc_part; - krb5_free_authenticator; - krb5_free_checksum; - krb5_free_checksum_contents; - krb5_free_config_files; - krb5_free_context; - krb5_free_cred_contents; - krb5_free_creds; - krb5_free_creds_contents; - krb5_free_data; - krb5_free_data_contents; - krb5_free_default_realm; - krb5_free_error; - krb5_free_error_contents; - krb5_free_error_string; - krb5_free_error_message; - krb5_free_host_realm; - krb5_free_kdc_rep; - krb5_free_keyblock; - krb5_free_keyblock_contents; - krb5_free_krbhst; - krb5_free_principal; - krb5_free_salt; - krb5_free_ticket; - krb5_free_unparsed_name; - krb5_fwd_tgt_creds; - krb5_generate_random_block; - krb5_generate_random_keyblock; - krb5_generate_seq_number; - krb5_generate_subkey; - krb5_generate_subkey_extended; - krb5_get_all_client_addrs; - krb5_get_all_server_addrs; - krb5_get_cred_from_kdc; - krb5_get_cred_from_kdc_opt; - krb5_get_credentials; - krb5_get_credentials_with_flags; - krb5_get_creds; - krb5_get_creds_opt_add_options; - krb5_get_creds_opt_alloc; - krb5_get_creds_opt_free; - krb5_get_creds_opt_set_enctype; - krb5_get_creds_opt_set_impersonate; - krb5_get_creds_opt_set_options; - krb5_get_creds_opt_set_ticket; - krb5_get_default_config_files; - krb5_get_default_in_tkt_etypes; - krb5_get_default_principal; - krb5_get_default_realm; - krb5_get_default_realms; - krb5_get_dns_canonicalize_hostname; - krb5_get_err_text; - krb5_get_error_message; - krb5_get_error_string; - krb5_get_extra_addresses; - krb5_get_fcache_version; - krb5_get_forwarded_creds; - krb5_get_host_realm; - krb5_get_ignore_addresses; - krb5_get_in_cred; - krb5_cccol_last_change_time; - krb5_get_in_tkt; - krb5_get_in_tkt_with_keytab; - krb5_get_in_tkt_with_password; - krb5_get_in_tkt_with_skey; - krb5_get_init_creds; - krb5_get_init_creds_keyblock; - krb5_get_init_creds_keytab; - krb5_get_init_creds_opt_alloc; - krb5_get_init_creds_opt_free; - krb5_get_init_creds_opt_get_error; - krb5_get_init_creds_opt_init; - krb5_get_init_creds_opt_set_address_list; - krb5_get_init_creds_opt_set_addressless; - krb5_get_init_creds_opt_set_anonymous; - krb5_get_init_creds_opt_set_canonicalize; - krb5_get_init_creds_opt_set_default_flags; - krb5_get_init_creds_opt_set_etype_list; - krb5_get_init_creds_opt_set_forwardable; - krb5_get_init_creds_opt_set_pa_password; - krb5_get_init_creds_opt_set_pac_request; - krb5_get_init_creds_opt_set_pkinit; - krb5_get_init_creds_opt_set_preauth_list; - krb5_get_init_creds_opt_set_process_last_req; - krb5_get_init_creds_opt_set_proxiable; - krb5_get_init_creds_opt_set_renew_life; - krb5_get_init_creds_opt_set_salt; - krb5_get_init_creds_opt_set_tkt_life; - krb5_get_init_creds_opt_set_win2k; - krb5_get_init_creds_password; - krb5_get_kdc_cred; - krb5_get_kdc_sec_offset; - krb5_get_krb524hst; - krb5_get_krb_admin_hst; - krb5_get_krb_changepw_hst; - krb5_get_krbhst; - krb5_get_max_time_skew; - krb5_get_pw_salt; - krb5_get_renewed_creds; - krb5_get_server_rcache; - krb5_get_use_admin_kdc; - krb5_get_warn_dest; - krb5_get_wrapped_length; - krb5_getportbyname; - krb5_h_addr2addr; - krb5_h_addr2sockaddr; - krb5_h_errno_to_heim_errno; - krb5_have_error_string; - krb5_hmac; - krb5_init_context; - krb5_init_ets; - krb5_initlog; - krb5_is_config_principal; - krb5_is_thread_safe; - krb5_kcm_call; - krb5_kcm_storage_request; - krb5_kerberos_enctypes; - krb5_keyblock_get_enctype; - krb5_keyblock_init; - krb5_keyblock_key_proc; - krb5_keyblock_zero; - krb5_keytab_key_proc; - krb5_keytype_to_enctypes; - krb5_keytype_to_enctypes_default; - krb5_keytype_to_string; - krb5_krbhst_format_string; - krb5_krbhst_free; - krb5_krbhst_get_addrinfo; - krb5_krbhst_init; - krb5_krbhst_init_flags; - krb5_krbhst_next; - krb5_krbhst_next_as_string; - krb5_krbhst_reset; - krb5_kt_add_entry; - krb5_kt_close; - krb5_kt_compare; - krb5_kt_copy_entry_contents; - krb5_kt_default; - krb5_kt_default_modify_name; - krb5_kt_default_name; - krb5_kt_destroy; - krb5_kt_end_seq_get; - krb5_kt_free_entry; - krb5_kt_get_entry; - krb5_kt_get_full_name; - krb5_kt_get_name; - krb5_kt_get_type; - krb5_kt_have_content; - krb5_kt_next_entry; - krb5_kt_read_service_key; - krb5_kt_register; - krb5_kt_remove_entry; - krb5_kt_resolve; - krb5_kt_start_seq_get; - krb5_kuserok; - krb5_log; - krb5_log_msg; - krb5_make_addrport; - krb5_make_principal; - krb5_max_sockaddr_size; - krb5_mk_error; - krb5_mk_priv; - krb5_mk_rep; - krb5_mk_req; - krb5_mk_req_exact; - krb5_mk_req_extended; - krb5_mk_safe; - krb5_net_read; - krb5_net_write; - krb5_net_write_block; - krb5_ntlm_alloc; - krb5_ntlm_free; - krb5_ntlm_init_get_challange; - krb5_ntlm_init_get_flags; - krb5_ntlm_init_get_opaque; - krb5_ntlm_init_get_targetinfo; - krb5_ntlm_init_get_targetname; - krb5_ntlm_init_request; - krb5_ntlm_rep_get_sessionkey; - krb5_ntlm_rep_get_status; - krb5_ntlm_req_set_flags; - krb5_ntlm_req_set_lm; - krb5_ntlm_req_set_ntlm; - krb5_ntlm_req_set_opaque; - krb5_ntlm_req_set_session; - krb5_ntlm_req_set_targetname; - krb5_ntlm_req_set_username; - krb5_ntlm_request; - krb5_openlog; - krb5_pac_add_buffer; - krb5_pac_free; - krb5_pac_get_buffer; - krb5_pac_get_types; - krb5_pac_init; - krb5_pac_parse; - krb5_pac_verify; - krb5_padata_add; - krb5_parse_address; - krb5_parse_name; - krb5_parse_name_flags; - krb5_parse_nametype; - krb5_passwd_result_to_string; - krb5_password_key_proc; - krb5_get_permitted_enctypes; - krb5_plugin_register; - krb5_prepend_config_files; - krb5_prepend_config_files_default; - krb5_prepend_error_message; - krb5_princ_realm; - krb5_princ_set_realm; - krb5_principal_compare; - krb5_principal_compare_any_realm; - krb5_principal_get_comp_string; - krb5_principal_get_num_comp; - krb5_principal_get_realm; - krb5_principal_get_type; - krb5_principal_match; - krb5_principal_set_realm; - krb5_principal_set_type; - krb5_principal_is_krbtgt; - krb5_print_address; - krb5_program_setup; - krb5_prompter_posix; - krb5_random_to_key; - krb5_rc_close; - krb5_rc_default; - krb5_rc_default_name; - krb5_rc_default_type; - krb5_rc_destroy; - krb5_rc_expunge; - krb5_rc_get_lifespan; - krb5_rc_get_name; - krb5_rc_get_type; - krb5_rc_initialize; - krb5_rc_recover; - krb5_rc_resolve; - krb5_rc_resolve_full; - krb5_rc_resolve_type; - krb5_rc_store; - krb5_rd_cred2; - krb5_rd_cred; - krb5_rd_error; - krb5_rd_priv; - krb5_rd_rep; - krb5_rd_req; - krb5_rd_req_ctx; - krb5_rd_req_in_ctx_alloc; - krb5_rd_req_in_ctx_free; - krb5_rd_req_in_set_keyblock; - krb5_rd_req_in_set_keytab; - krb5_rd_req_in_set_pac_check; - krb5_rd_req_out_ctx_free; - krb5_rd_req_out_get_ap_req_options; - krb5_rd_req_out_get_keyblock; - krb5_rd_req_out_get_ticket; - krb5_rd_req_with_keyblock; - krb5_rd_safe; - krb5_read_message; - krb5_read_priv_message; - krb5_read_safe_message; - krb5_realm_compare; - krb5_recvauth; - krb5_recvauth_match_version; - krb5_ret_address; - krb5_ret_addrs; - krb5_ret_authdata; - krb5_ret_creds; - krb5_ret_creds_tag; - krb5_ret_data; - krb5_ret_int16; - krb5_ret_int32; - krb5_ret_int8; - krb5_ret_keyblock; - krb5_ret_principal; - krb5_ret_string; - krb5_ret_stringnl; - krb5_ret_stringz; - krb5_ret_times; - krb5_ret_uint16; - krb5_ret_uint32; - krb5_ret_uint8; - krb5_salttype_to_string; - krb5_sendauth; - krb5_sendto; - krb5_sendto_context; - krb5_sendto_ctx_add_flags; - krb5_sendto_ctx_alloc; - krb5_sendto_ctx_free; - krb5_sendto_ctx_get_flags; - krb5_sendto_ctx_set_func; - krb5_sendto_ctx_set_type; - krb5_sendto_kdc; - krb5_sendto_kdc_flags; - krb5_set_config_files; - krb5_set_default_in_tkt_etypes; - krb5_set_default_realm; - krb5_set_dns_canonicalize_hostname; - krb5_set_error_message; - krb5_set_error_string; - krb5_set_extra_addresses; - krb5_set_fcache_version; - krb5_set_home_dir_access; - krb5_set_ignore_addresses; - krb5_set_kdc_sec_offset; - krb5_set_max_time_skew; - krb5_set_password; - krb5_set_password_using_ccache; - krb5_set_real_time; - krb5_set_send_to_kdc_func; - krb5_set_use_admin_kdc; - krb5_set_warn_dest; - krb5_sname_to_principal; - krb5_sock_to_principal; - krb5_sockaddr2address; - krb5_sockaddr2port; - krb5_sockaddr_uninteresting; - krb5_std_usage; - krb5_storage_clear_flags; - krb5_storage_emem; - krb5_storage_free; - krb5_storage_from_data; - krb5_storage_from_fd; - krb5_storage_from_mem; - krb5_storage_from_readonly_mem; - krb5_storage_get_byteorder; - krb5_storage_get_eof_code; - krb5_storage_is_flags; - krb5_storage_read; - krb5_storage_seek; - krb5_storage_set_byteorder; - krb5_storage_set_eof_code; - krb5_storage_set_flags; - krb5_storage_set_max_alloc; - krb5_storage_to_data; - krb5_storage_truncate; - krb5_storage_write; - krb5_store_address; - krb5_store_addrs; - krb5_store_authdata; - krb5_store_creds; - krb5_store_creds_tag; - krb5_store_data; - krb5_store_int16; - krb5_store_int32; - krb5_store_int8; - krb5_store_keyblock; - krb5_store_principal; - krb5_store_string; - krb5_store_stringnl; - krb5_store_stringz; - krb5_store_times; - krb5_store_uint16; - krb5_store_uint32; - krb5_store_uint8; - krb5_string_to_deltat; - krb5_string_to_enctype; - krb5_string_to_key; - krb5_string_to_key_data; - krb5_string_to_key_data_salt; - krb5_string_to_key_data_salt_opaque; - krb5_string_to_key_derived; - krb5_string_to_key_salt; - krb5_string_to_key_salt_opaque; - krb5_string_to_keytype; - krb5_string_to_salttype; - krb5_ticket_get_authorization_data_type; - krb5_ticket_get_client; - krb5_ticket_get_endtime; - krb5_ticket_get_server; - krb5_timeofday; - krb5_unparse_name; - krb5_unparse_name_fixed; - krb5_unparse_name_fixed_flags; - krb5_unparse_name_fixed_short; - krb5_unparse_name_flags; - krb5_unparse_name_short; - krb5_us_timeofday; - krb5_vabort; - krb5_vabortx; - krb5_verify_ap_req2; - krb5_verify_ap_req; - krb5_verify_authenticator_checksum; - krb5_verify_checksum; - krb5_verify_checksum_iov; - krb5_verify_init_creds; - krb5_verify_init_creds_opt_init; - krb5_verify_init_creds_opt_set_ap_req_nofail; - krb5_verify_opt_alloc; - krb5_verify_opt_free; - krb5_verify_opt_init; - krb5_verify_opt_set_ccache; - krb5_verify_opt_set_flags; - krb5_verify_opt_set_keytab; - krb5_verify_opt_set_secure; - krb5_verify_opt_set_service; - krb5_verify_user; - krb5_verify_user_lrealm; - krb5_verify_user_opt; - krb5_verr; - krb5_verrx; - krb5_vlog; - krb5_vlog_msg; - krb5_vprepend_error_message; - krb5_vset_error_message; - krb5_vset_error_string; - krb5_vwarn; - krb5_vwarnx; - krb5_warn; - krb5_warnx; - krb5_write_message; - krb5_write_priv_message; - krb5_write_safe_message; - krb5_xfree; - krb5_cccol_cursor_new; - krb5_cccol_cursor_next; - krb5_cccol_cursor_free; - - # com_err error tables - initialize_krb5_error_table_r; - initialize_krb5_error_table; - initialize_krb_error_table_r; - initialize_krb_error_table; - initialize_heim_error_table_r; - initialize_heim_error_table; - initialize_k524_error_table_r; - initialize_k524_error_table; - - # variables - krb5_mcc_ops; - krb5_acc_ops; - krb5_fcc_ops; - krb5_scc_ops; - krb5_kcm_ops; - krb5_wrfkt_ops; - krb5_mkt_ops; - krb5_akf_ops; - krb5_any_ops; - heimdal_version; - heimdal_long_version; - krb5_config_file; - krb5_defkeyname; - krb5_cc_type_api; - krb5_cc_type_file; - krb5_cc_type_memory; - krb5_cc_type_kcm; - krb5_cc_type_scc; - - # Shared with GSSAPI krb5 - _krb5_crc_init_table; - _krb5_crc_update; - _krb5_get_krbtgt; - _krb5_build_authenticator; - - # V4 compat glue - _krb5_krb_tf_setup; - _krb5_krb_dest_tkt; - _krb5_krb_life_to_time; - _krb5_krb_decomp_ticket; - _krb5_krb_decomp_ticket; - _krb5_krb_create_ticket; - _krb5_krb_create_ciph; - _krb5_krb_create_auth_reply; - _krb5_krb_rd_req; - _krb5_krb_free_auth_data; - _krb5_krb_time_to_life; - _krb5_krb_cr_err_reply; - - # Shared with libkdc - _krb5_AES_string_to_default_iterator; - _krb5_dh_group_ok; - _krb5_get_host_realm_int; - _krb5_get_int; - _krb5_pac_sign; - _krb5_parse_moduli; - _krb5_pk_kdf; - _krb5_pk_load_id; - _krb5_pk_mk_ContentInfo; - _krb5_pk_octetstring2key; - _krb5_plugin_find; - _krb5_plugin_free; - _krb5_plugin_get_next; - _krb5_plugin_get_symbol; - _krb5_principal2principalname; - _krb5_principalname2krb5_principal; - _krb5_put_int; - _krb5_s4u2self_to_checksumdata; - - # kinit helper - krb5_get_init_creds_opt_set_pkinit_user_certs; - krb5_pk_enterprise_cert; - - # testing - _krb5_aes_cts_encrypt; - _krb5_n_fold; - _krb5_expand_default_cc_name; - local: - *; -}; diff --git a/kerberosV/src/lib/krb5/version.c b/kerberosV/src/lib/krb5/version.c deleted file mode 100644 index 302854de3f2..00000000000 --- a/kerberosV/src/lib/krb5/version.c +++ /dev/null @@ -1,39 +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. - */ - -#include "krb5_locl.h" - -/* this is just to get a version stamp in the library file */ - -#include "version.h" - diff --git a/kerberosV/src/lib/krb5/warn.c b/kerberosV/src/lib/krb5/warn.c deleted file mode 100644 index cb3be76fccf..00000000000 --- a/kerberosV/src/lib/krb5/warn.c +++ /dev/null @@ -1,347 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" -#include - -static krb5_error_code _warnerr(krb5_context context, int do_errtext, - krb5_error_code code, int level, const char *fmt, va_list ap) - __attribute__((__format__(__printf__, 5, 0))); - -static krb5_error_code -_warnerr(krb5_context context, int do_errtext, - krb5_error_code code, int level, const char *fmt, va_list ap) -{ - char xfmt[7] = ""; - const char *args[2], **arg; - char *msg = NULL; - const char *err_str = NULL; - krb5_error_code ret; - - args[0] = args[1] = NULL; - arg = args; - if(fmt){ - strlcat(xfmt, "%s", sizeof(xfmt)); - if(do_errtext) - strlcat(xfmt, ": ", sizeof(xfmt)); - ret = vasprintf(&msg, fmt, ap); - if(ret < 0 || msg == NULL) - return ENOMEM; - *arg++ = msg; - } - if(context && do_errtext){ - strlcat(xfmt, "%s", sizeof(xfmt)); - - err_str = krb5_get_error_message(context, code); - if (err_str != NULL) { - *arg = err_str; - } else { - *arg= ""; - } - } - - if(context && context->warn_dest) - krb5_log(context, context->warn_dest, level, xfmt, args[0], args[1]); - else - warnx(xfmt, args[0], args[1]); - free(msg); - krb5_free_error_message(context, err_str); - return 0; -} - -#define FUNC(ETEXT, CODE, LEVEL) \ - krb5_error_code ret; \ - va_list ap; \ - va_start(ap, fmt); \ - ret = _warnerr(context, ETEXT, CODE, LEVEL, fmt, ap); \ - va_end(ap); - -#undef __attribute__ -#define __attribute__(X) - -/** - * Log a warning to the log, default stderr, include the error from - * the last failure. - * - * @param context A Kerberos 5 context. - * @param code error code of the last error - * @param fmt message to print - * @param ap arguments - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vwarn(krb5_context context, krb5_error_code code, - const char *fmt, va_list ap) - __attribute__ ((format (printf, 3, 0))) -{ - return _warnerr(context, 1, code, 1, fmt, ap); -} - -/** - * Log a warning to the log, default stderr, include the error from - * the last failure. - * - * @param context A Kerberos 5 context. - * @param code error code of the last error - * @param fmt message to print - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_warn(krb5_context context, krb5_error_code code, const char *fmt, ...) - __attribute__ ((format (printf, 3, 4))) -{ - FUNC(1, code, 1); - return ret; -} - -/** - * Log a warning to the log, default stderr. - * - * @param context A Kerberos 5 context. - * @param fmt message to print - * @param ap arguments - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vwarnx(krb5_context context, const char *fmt, va_list ap) - __attribute__ ((format (printf, 2, 0))) -{ - return _warnerr(context, 0, 0, 1, fmt, ap); -} - -/** - * Log a warning to the log, default stderr. - * - * @param context A Kerberos 5 context. - * @param fmt message to print - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_warnx(krb5_context context, const char *fmt, ...) - __attribute__ ((format (printf, 2, 3))) -{ - FUNC(0, 0, 1); - return ret; -} - -/** - * Log a warning to the log, default stderr, include bthe error from - * the last failure and then exit. - * - * @param context A Kerberos 5 context - * @param eval the exit code to exit with - * @param code error code of the last error - * @param fmt message to print - * @param ap arguments - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verr(krb5_context context, int eval, krb5_error_code code, - const char *fmt, va_list ap) - __attribute__ ((noreturn, format (printf, 4, 0))) -{ - _warnerr(context, 1, code, 0, fmt, ap); - exit(eval); - UNREACHABLE(return 0); -} - -/** - * Log a warning to the log, default stderr, include bthe error from - * the last failure and then exit. - * - * @param context A Kerberos 5 context - * @param eval the exit code to exit with - * @param code error code of the last error - * @param fmt message to print - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_err(krb5_context context, int eval, krb5_error_code code, - const char *fmt, ...) - __attribute__ ((noreturn, format (printf, 4, 5))) -{ - FUNC(1, code, 0); - exit(eval); - UNREACHABLE(return 0); -} - -/** - * Log a warning to the log, default stderr, and then exit. - * - * @param context A Kerberos 5 context - * @param eval the exit code to exit with - * @param fmt message to print - * @param ap arguments - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_verrx(krb5_context context, int eval, const char *fmt, va_list ap) - __attribute__ ((noreturn, format (printf, 3, 0))) -{ - _warnerr(context, 0, 0, 0, fmt, ap); - exit(eval); - UNREACHABLE(return 0); -} - -/** - * Log a warning to the log, default stderr, and then exit. - * - * @param context A Kerberos 5 context - * @param eval the exit code to exit with - * @param fmt message to print - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_errx(krb5_context context, int eval, const char *fmt, ...) - __attribute__ ((noreturn, format (printf, 3, 4))) -{ - FUNC(0, 0, 0); - exit(eval); - UNREACHABLE(return 0); -} - -/** - * Log a warning to the log, default stderr, include bthe error from - * the last failure and then abort. - * - * @param context A Kerberos 5 context - * @param code error code of the last error - * @param fmt message to print - * @param ap arguments - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vabort(krb5_context context, krb5_error_code code, - const char *fmt, va_list ap) - __attribute__ ((noreturn, format (printf, 3, 0))) -{ - _warnerr(context, 1, code, 0, fmt, ap); - abort(); - UNREACHABLE(return 0); -} - -/** - * Log a warning to the log, default stderr, include the error from - * the last failure and then abort. - * - * @param context A Kerberos 5 context - * @param code error code of the last error - * @param fmt message to print - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_abort(krb5_context context, krb5_error_code code, const char *fmt, ...) - __attribute__ ((noreturn, format (printf, 3, 4))) -{ - FUNC(1, code, 0); - abort(); - UNREACHABLE(return 0); -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_vabortx(krb5_context context, const char *fmt, va_list ap) - __attribute__ ((noreturn, format (printf, 2, 0))) -{ - _warnerr(context, 0, 0, 0, fmt, ap); - abort(); - UNREACHABLE(return 0); -} - -/** - * Log a warning to the log, default stderr, and then abort. - * - * @param context A Kerberos 5 context - * @param code error code of the last error - * @param fmt message to print - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_abortx(krb5_context context, const char *fmt, ...) - __attribute__ ((noreturn, format (printf, 2, 3))) -{ - FUNC(0, 0, 0); - abort(); - UNREACHABLE(return 0); -} - -/** - * Set the default logging facility. - * - * @param context A Kerberos 5 context - * @param fac Facility to use for logging. - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_set_warn_dest(krb5_context context, krb5_log_facility *fac) -{ - context->warn_dest = fac; - return 0; -} - -/** - * Get the default logging facility. - * - * @param context A Kerberos 5 context - * - * @ingroup krb5_error - */ - -KRB5_LIB_FUNCTION krb5_log_facility * KRB5_LIB_CALL -krb5_get_warn_dest(krb5_context context) -{ - return context->warn_dest; -} diff --git a/kerberosV/src/lib/krb5/write_message.c b/kerberosV/src/lib/krb5/write_message.c deleted file mode 100644 index 84100461444..00000000000 --- a/kerberosV/src/lib/krb5/write_message.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 "krb5_locl.h" - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_write_message (krb5_context context, - krb5_pointer p_fd, - krb5_data *data) -{ - uint32_t len; - uint8_t buf[4]; - int ret; - - len = data->length; - _krb5_put_int(buf, len, 4); - if (krb5_net_write (context, p_fd, buf, 4) != 4 - || krb5_net_write (context, p_fd, data->data, len) != len) { - ret = errno; - krb5_set_error_message (context, ret, "write: %s", strerror(ret)); - return ret; - } - return 0; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_write_priv_message(krb5_context context, - krb5_auth_context ac, - krb5_pointer p_fd, - krb5_data *data) -{ - krb5_error_code ret; - krb5_data packet; - - ret = krb5_mk_priv (context, ac, data, &packet, NULL); - if(ret) - return ret; - ret = krb5_write_message(context, p_fd, &packet); - krb5_data_free(&packet); - return ret; -} - -KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL -krb5_write_safe_message(krb5_context context, - krb5_auth_context ac, - krb5_pointer p_fd, - krb5_data *data) -{ - krb5_error_code ret; - krb5_data packet; - ret = krb5_mk_safe (context, ac, data, &packet, NULL); - if(ret) - return ret; - ret = krb5_write_message(context, p_fd, &packet); - krb5_data_free(&packet); - return ret; -} diff --git a/kerberosV/src/lib/libedit/COPYING b/kerberosV/src/lib/libedit/COPYING deleted file mode 100644 index 742f005f8f9..00000000000 --- a/kerberosV/src/lib/libedit/COPYING +++ /dev/null @@ -1,30 +0,0 @@ -Copyright (c) 1992, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Christos Zoulas of Cornell University. - -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 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. - diff --git a/kerberosV/src/lib/libedit/ChangeLog b/kerberosV/src/lib/libedit/ChangeLog deleted file mode 100644 index bdcb1e26c77..00000000000 --- a/kerberosV/src/lib/libedit/ChangeLog +++ /dev/null @@ -1,300 +0,0 @@ - * See also NetBSD changelog: - http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit - -2011-02-27 Jess Thrysoee - - * version-info: 0:36:0 - - * all: sync with upstream source. - -2010-04-24 Jess Thrysoee - - * version-info: 0:35:0 - - * all: sync with upstream source. - Now with UTF-8 support. To enable this run 'configure --enable-widec'. - For now an UTF-32 encoded wchar_t is required. - This requirement is met on NetBSD, Solaris and OS X for any UTF-8 locale, - and any system that define __STDC_ISO_10646__ (e.g. GNU libc on Linux). - -2009-09-23 Jess Thrysoee - * version-info: 0:34:0 - - * all: apply Apple patches from: - http://opensource.apple.com/source/libedit/libedit-11/patches - -2009-09-05 Jess Thrysoee - - * version-info: 0:33:0 - - * all: Use predefined macro __sun to identify Solaris - - * src/el.c: Ignore comment lines in .editrc - -2009-07-23 Jess Thrysoee - - * version-info: 0:32:0 - - * all: sync with upstream source. - -2009-06-10 Jess Thrysoee - - * version-info: 0:31:0 - - * all: sync with upstream source. - -2009-05-03 Jess Thrysoee - - * version-info: 0:30:0 - - * all: sync with upstream source. - -2009-04-05 Jess Thrysoee - - * version-info: 0:29:0 - - * all: sync with upstream source. - -2009-01-11 Jess Thrysoee - - * version-info: 0:28:0 - - * all: sync with upstream source. MAJOR.MINOR version is now 3.0. - This is due to NetBSD changing time_t and dev_t to 64 bits. It does - not really effect this package. - - * configure.ac: Remove '--enable-debug' configure flag. The autoconf way - to control flags is by specifying them when running configure, - e.g. 'CFLAGS="-O0 -g" ./configure' - -2008-07-12 Jess Thrysoee - - * version-info: 0:27:0 - - * configure.ac: Added '--enable-debug' configure flag, to produce debugging - information. - - * examples/fileman.c: cast stat struct members, st_nlink and st_size, - appropriately (see also 'man 2 stat'). Patch by Alex Elder. - - * all: sync with upstream source. MINOR version is now 11. - -2007-08-31 Jess Thrysoee - - * version-info: 0:26:0 - - * libedit.pc.in,Makefile.am,configure.ac,patches/extra_dist_list.sh: - Added pkg-config support for libedit. Patch by Masatake YAMATO. - -2007-08-13 Jess Thrysoee - - * version-info: 0:25:0 - - * all: sync with upstream source. - -2007-03-02 Jess Thrysoee - - * version-info: 0:24:0 - - * all: sync with upstream source. - -2006-10-22 Jess Thrysoee - - * version-info: 0:23:0 - - * src/shlib_version: Upstream bumped minor version from 9 to 10. - - * all: sync with upstream source. More readline functions. - -2006-10-22 Jess Thrysoee - - * version-info: 0:22:0 - - * all: sync with upstream source. - -2006-08-29 Jess Thrysoee - - * version-info: 0:21:0 - - * all: License cleanup. All 4-clause advertising BSD licenses has been - changed to the 3-clause version by upstream. - - * src/fgetln.c: use src/tools/compat/fgetln.c instead of - othersrc/libexec/tnftpd/libnetbsd/fgetln.c - -2006-08-16 Jess Thrysoee - - * version-info: 0:20:0 - - * all: sync with upstream source. - -2006-06-03 Jess Thrysoee - - * version-info: 0:19:0 - - * COPYING: added global license file - - * all: sync with upstream source. - -2006-02-13 Jess Thrysoee - - * version-info: 0:18:0 - - * src/readline.c: Partial rl_getc_function support, patch by Kjeld Borch - Egevang. - - * src/readline.c: Make write_history and read_history returncode readline - compatible. Upstream patch. - -2006-01-03 Jess Thrysoee - - * version-info: 0:17:0 - - * patches/cvs_export.sh: strlcat.c and strlcpy.c was moved to - src/common/lib/libc/string in the upstream cvs repository. - - * all: sync with upstream source. - -2005-10-22 Jess Thrysoee - - * version-info: 0:16:0 - - * patches/*.patch, configure.ac: define SCCSID, undef LIBC_SCCS. Remove - fourteen cosmetic patches. - - * all: sync with upstream source. - -2005-09-11 Jess Thrysoee - - * version-info: 0:15:0 - - * src/Makefile.am: fix typo that meant generated files were distributes, - and make generated file targets dependent on the the 'makelist' input - files. - - * all: sync with upstream source. This is just a manpage update - -2005-08-28 Jess Thrysoee - - * version-info: 0:14:0 - - * src/sys.h: include config.h to avoid "redefinition of - `u_int32_t'". Patch by Norihiko Murase. - - * src/search.c: explicitly include sys/types.h, because regex.h on - FreeBSD needs it and does not include it itself. Patch by Norihiko Murase. - - * acinclude.m4: added EL_GETPW_R_DRAFT test and use AC_TRY_LINK instead - of AC_TRY_COMPILE. Suggested by Norihiko Murase. - - * all: sync with upstream source. - -2005-08-16 Jess Thrysoee - - * version-info: 0:13:0 - - * all: sync with upstream source. - -2005-08-05 Jess Thrysoee - - * version-info: 0:12:0 - - * all: sync with upstream source. - -2005-07-24 Jess Thrysoee - - * version-info: 0:11:0 - - * histedit.h, histedit.c, readline.c, editline/readline.h: From - upstream; added remove_history(). - -2005-07-07 Jess Thrysoee - - * version-info: 0:10:0 - - * history.c, key.c: From upstream source; Fix memory leaks found by - valgrind. - -2005-06-28 Jess Thrysoee - - * version-info: 0:9:0 - - * src/readline.c: getpwent_r is not POSIX, always use getpwent. - Reported by Gerrit P. Haase. - - * src/Makefile.am: Added libtool -no-undefined. This is needed on Cygwin - to get a shared editline library. Should not affect other platforms. - Suggested by Gerrit P. Haase. - -2005-06-15 Jess Thrysoee - - * version-info: 0:8:0 - - * all: sync with upstream source. - -2005-06-01 Jess Thrysoee - - * version-info: 0:7:0 - - * all: sync with upstream source. - - * src/readline.c, src/filecomplete.c: Solaris use POSIX draft versions - of getpwent_r, getpwnam_r and getpwuid_r which return 'struct passwd *'. - Define HAVE_GETPW_R_POSIX if these functions are (non draft) POSIX - compatible. Patch by Julien Torrès. - -2005-05-28 Jess Thrysoee - - * version-info: 0:6:0 - - * all: sync with upstream source. - -2005-03-11 Jess Thrysoee - - * version-info: 0:5:0 - - * all: sync with upstream source. - -2004-12-07 Jess Thrysoee - - * version-info: 0:4:0 - - * src/readline.c: d_namlen (in struct dirent) is not portable, always - use strlen. Patch by Scott Rankin. - -2004-11-27 Jess Thrysoee - - * version-info: 0:3:0 - - * src/history.c: bug #26785 fixed upstream, removed local patch. - -2004-11-06 Jess Thrysoee - - * version-info: 0:2:0 - - * all: sync with upstream source. - - * doc/Makefile.am: If mdoc2man fails, remove empty file. Patch by - Darren Tucker. - -2004-10-14 Jess Thrysoee - - * version-info: 0:1:0 - - * doc/Makefile.am: 'make install' twice fails. Remove old links before - trying to link the man pages. Patch by Rick Richardson. - -2004-09-28 Jess Thrysoee - - * version-info: 0:0:0 - - * acinclude.m4 configure.ac src/Makefile.am: Adhere to - LibTools library interface versions recommendation. - http://www.gnu.org/software/libtool/manual.html#SEC32 - - * doc/Makefile.am: name all manpage links as el_* (e.g. el_history.3) - to avoid conflicts. - -2004-09-08 Jess Thrysoee - - * all: Initial package. diff --git a/kerberosV/src/lib/libedit/INSTALL b/kerberosV/src/lib/libedit/INSTALL deleted file mode 100644 index 54caf7c190f..00000000000 --- a/kerberosV/src/lib/libedit/INSTALL +++ /dev/null @@ -1,229 +0,0 @@ -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software -Foundation, Inc. - - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/kerberosV/src/lib/libedit/Makefile.am b/kerberosV/src/lib/libedit/Makefile.am deleted file mode 100644 index 4018edca54f..00000000000 --- a/kerberosV/src/lib/libedit/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ - -AUTOMAKE_OPTIONS = foreign - -#SUBDIRS = src examples doc -SUBDIRS = src - -#EXTRA_DIST = libedit.pc.in -#pkgconfigdir = $(libdir)/pkgconfig -#pkgconfig_DATA = libedit.pc diff --git a/kerberosV/src/lib/libedit/Makefile.in b/kerberosV/src/lib/libedit/Makefile.in deleted file mode 100644 index d41b8b897a1..00000000000 --- a/kerberosV/src/lib/libedit/Makefile.in +++ /dev/null @@ -1,734 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = . -DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure COPYING ChangeLog INSTALL THANKS \ - config.guess config.sub depcomp install-sh ltmain.sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_VERSION = @LT_VERSION@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MANTYPE = @MANTYPE@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign - -#SUBDIRS = src examples doc -SUBDIRS = src -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile config.h -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr \ - distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am - - -#EXTRA_DIST = libedit.pc.in -#pkgconfigdir = $(libdir)/pkgconfig -#pkgconfig_DATA = libedit.pc - -# 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/kerberosV/src/lib/libedit/THANKS b/kerberosV/src/lib/libedit/THANKS deleted file mode 100644 index 98ad22b8bc6..00000000000 --- a/kerberosV/src/lib/libedit/THANKS +++ /dev/null @@ -1 +0,0 @@ -Thanks to the NetBSD Project maintainers of libedit! diff --git a/kerberosV/src/lib/libedit/[config.h].in b/kerberosV/src/lib/libedit/[config.h].in deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/kerberosV/src/lib/libedit/acinclude.m4 b/kerberosV/src/lib/libedit/acinclude.m4 deleted file mode 100644 index 4a581894bc7..00000000000 --- a/kerberosV/src/lib/libedit/acinclude.m4 +++ /dev/null @@ -1,85 +0,0 @@ - -dnl -dnl read lib version from file (and trim trailing newline) -dnl -define([EL_RELEASE], [patsubst(esyscmd([. src/shlib_version; echo $major.$minor]), [ -])]) - -dnl -dnl read cvsexport timestamp from file (and trim trailing newline) -dnl -define([EL_TIMESTAMP], [patsubst(esyscmd([date +"%Y%m%d"]), [ -])]) - - -dnl -dnl NetBSD use the -mdoc macro package for manpages, but e.g. -dnl AIX and Solaris only support the -man package. -dnl -AC_DEFUN([EL_MANTYPE], -[ - MANTYPE= - TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb" - AC_PATH_PROGS(NROFF, nroff awf, /bin/false, $TestPath) - if ${NROFF} -mdoc ${srcdir}/doc/editrc.5.roff >/dev/null 2>&1; then - MANTYPE=mdoc - fi - AC_SUBST(MANTYPE) -]) - - -dnl -dnl Check if getpwnam_r and getpwuid_r are POSIX.1 compatible -dnl POSIX draft version returns 'struct passwd *' (used on Solaris) -dnl NOTE: getpwent_r is not POSIX so we always use getpwent -dnl -AC_DEFUN([EL_GETPW_R_POSIX], -[ - AC_MSG_CHECKING([whether getpwnam_r and getpwuid_r are posix like]) - # The prototype for the POSIX version is: - # int getpwnam_r(char *, struct passwd *, char *, size_t, struct passwd **) - # int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **); - AC_TRY_LINK([#include - #include - #include ], - [getpwnam_r(NULL, NULL, NULL, (size_t)0, NULL); - getpwuid_r((uid_t)0, NULL, NULL, (size_t)0, NULL);], - [AC_DEFINE([HAVE_GETPW_R_POSIX], 1, [Define to 1 if you have getpwnam_r and getpwuid_r that are POSIX.1 compatible.]) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) -]) - -AC_DEFUN([EL_GETPW_R_DRAFT], -[ - AC_MSG_CHECKING([whether getpwnam_r and getpwuid_r are posix _draft_ like]) - # The prototype for the POSIX draft version is: - # struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int); - # struct passwd *getpwnam_r(char *, struct passwd *, char *, int); - AC_TRY_LINK([#include - #include - #include ], - [getpwnam_r(NULL, NULL, NULL, (size_t)0); - getpwuid_r((uid_t)0, NULL, NULL, (size_t)0);], - [AC_DEFINE([HAVE_GETPW_R_DRAFT], 1, [Define to 1 if you have getpwnam_r and getpwuid_r that are draft POSIX.1 versions.]) - AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no)]) -]) - - -dnl -dnl use option --enable-widec to turn on use of wide-character support -dnl -AC_DEFUN([EL_ENABLE_WIDEC], -[ - AC_MSG_CHECKING(if you want wide-character code) - AC_ARG_ENABLE(widec, - [ --enable-widec compile with wide-char/UTF-8 code], - [with_widec=$enableval], - [with_widec=no]) - AC_MSG_RESULT($with_widec) - if test "$with_widec" = yes ; then - AC_DEFINE(WIDECHAR, 1, [Define to 1 if you want wide-character code]) - fi - AM_CONDITIONAL([WIDECHAR], [test "$with_widec" = yes]) -]) - diff --git a/kerberosV/src/lib/libedit/aclocal.m4 b/kerberosV/src/lib/libedit/aclocal.m4 deleted file mode 100644 index 22f6418d393..00000000000 --- a/kerberosV/src/lib/libedit/aclocal.m4 +++ /dev/null @@ -1,9406 +0,0 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -# This file 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. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file 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. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl - -_LT_DECL([], [host_alias], [0], [The host system])dnl -_LT_DECL([], [host], [0])dnl -_LT_DECL([], [host_os], [0])dnl -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING. - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.lt script is free software; the Free Software Foundation -gives unlimited permision to copy, distribute and modify it." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_REPLACE_SHELLFNS - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -m4_case([$1], - [C], [_LT_LANG(C)], - [C++], [_LT_LANG(CXX)], - [Java], [_LT_LANG(GCJ)], - [Fortran 77], [_LT_LANG(F77)], - [Fortran], [_LT_LANG(FC)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _LT_LANG - - -# _LT_LANG_DEFAULT_CONFIG -# ----------------------- -m4_defun([_LT_LANG_DEFAULT_CONFIG], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([LT_PROG_GCJ], - [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) - -AC_PROVIDE_IFELSE([LT_PROG_RC], - [LT_LANG(RC)], - [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi]) - AC_CACHE_CHECK([for -exported_symbols_list linker flag], - [lt_cv_ld_exported_symbols_list], - [lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [lt_cv_ld_exported_symbols_list=no]) - LDFLAGS="$save_LDFLAGS" - ]) - AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], - [lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&AS_MESSAGE_LOG_FD - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='' - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([${with_sysroot}]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK ['"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' - ;; - *Sun\ C*) - # Sun C 5.9 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - esac - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - cl*) ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - ;; - esac - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], - [Flag to hardcode $libdir into a binary during linking. - This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) -_LT_TAGDECL([], [hardcode_libdir_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC=$CC - lt_save_CFLAGS=$CFLAGS - lt_save_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd[[12]]*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_LT_EOF -]) - -_lt_libdeps_save_CFLAGS=$CFLAGS -case "$CC $CFLAGS " in #( -*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; -*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; -esac - -dnl Parse the compiler output and extract the necessary -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(export_dynamic_flag_spec, $1)= -_LT_TAGVAR(hardcode_direct, $1)=no -_LT_TAGVAR(hardcode_direct_absolute, $1)=no -_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= -_LT_TAGVAR(hardcode_libdir_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # ltmain only uses $CC for tagged configurations so make sure $CC is set. - _LT_TAG_COMPILER - - # save warnings/boilerplate of simple test code - _LT_COMPILER_BOILERPLATE - _LT_LINKER_BOILERPLATE - - # Allow CC to be a program name with arguments. - lt_save_CC="$CC" - lt_save_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## CAVEAT EMPTOR: - ## There is no encapsulation within the following macros, do not change - ## the running order or otherwise move them around unless you know exactly - ## what you are doing... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC=$CC -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC=yes -CC=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -_LT_TAGVAR(archive_cmds_need_lc, $1)=no - -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds - -if test -n "$compiler"; then - _LT_COMPILER_NO_RTTI($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) -fi - -AC_LANG_RESTORE - -GCC=$lt_save_GCC -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_GCJ_CONFIG - - -# _LT_LANG_RC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for the Windows resource compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# ltmain only uses $CC for tagged configurations so make sure $CC is set. -_LT_TAG_COMPILER - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -lt_save_CFLAGS=$CFLAGS -lt_save_GCC=$GCC -GCC= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_GCJ], []) - - -# LT_PROG_RC -# ---------- -AC_DEFUN([LT_PROG_RC], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine which file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS - -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file 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. - -# serial 7 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# MODE is either `yes' or `no'. If omitted, it defaults to `both'. -m4_define([_LT_WITH_PIC], -[AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], - [pic_mode=default]) - -test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) - -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# This file 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. - -# serial 6 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) - -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# This file 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. - -# @configure_input@ - -# serial 3293 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) - -AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' -_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) -_LT_DECL(, macro_revision, 0) -]) - -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file 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. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 9 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 10 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file 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. - -# serial 16 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -AC_CONFIG_COMMANDS_PRE(dnl -[m4_provide_if([_AM_COMPILER_EXEEXT], - [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) - -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -dnl mangled by Autoconf and run in a shell conditional statement. -m4_define([_AC_COMPILER_EXEEXT], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file 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. - -# serial 4 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 6 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 5 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2009 Free Software Foundation, Inc. -# -# This file 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. - -# serial 1 - -# AM_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; -esac -AC_SUBST([AM_DEFAULT_VERBOSITY])dnl -AM_BACKSLASH='\' -AC_SUBST([AM_BACKSLASH])dnl -_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl -]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Public sister of _AM_SUBST_NOTMAKE. -AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - -m4_include([acinclude.m4]) diff --git a/kerberosV/src/lib/libedit/config.guess b/kerberosV/src/lib/libedit/config.guess deleted file mode 100755 index dc84c68ef79..00000000000 --- a/kerberosV/src/lib/libedit/config.guess +++ /dev/null @@ -1,1501 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-11-20' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/kerberosV/src/lib/libedit/config.h.in b/kerberosV/src/lib/libedit/config.h.in deleted file mode 100644 index df59ac31796..00000000000 --- a/kerberosV/src/lib/libedit/config.h.in +++ /dev/null @@ -1,278 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if the `closedir' function returns void instead of `int'. */ -#undef CLOSEDIR_VOID - -/* 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 1 if using `alloca.c'. */ -#undef C_ALLOCA - -/* Define to 1 if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_CURSES_H - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_DIRENT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the `endpwent' function. */ -#undef HAVE_ENDPWENT - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `fork' function. */ -#undef HAVE_FORK - -/* Define to 1 if you have getpwnam_r and getpwuid_r that are draft POSIX.1 - versions. */ -#undef HAVE_GETPW_R_DRAFT - -/* Define to 1 if you have getpwnam_r and getpwuid_r that are POSIX.1 - compatible. */ -#undef HAVE_GETPW_R_POSIX - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `isascii' function. */ -#undef HAVE_ISASCII - -/* Define to 1 if you have the `issetugid' function. */ -#undef HAVE_ISSETUGID - -/* Define to 1 if you have the `curses' library (-lcurses). */ -#undef HAVE_LIBCURSES - -/* Define to 1 if you have the `ncurses' library (-lncurses). */ -#undef HAVE_LIBNCURSES - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MALLOC_H - -/* Define to 1 if you have the `memchr' function. */ -#undef HAVE_MEMCHR - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `memset' function. */ -#undef HAVE_MEMSET - -/* Define to 1 if you have the header file. */ -#undef HAVE_NCURSES_H - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -#undef HAVE_NDIR_H - -/* Define to 1 if you have the `regcomp' function. */ -#undef HAVE_REGCOMP - -/* Define to 1 if you have the `re_comp' function. */ -#undef HAVE_RE_COMP - -/* Define to 1 if `stat' has the bug that it succeeds when given the - zero-length file name argument. */ -#undef HAVE_STAT_EMPTY_STRING_BUG - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - -/* Define to 1 if you have the `strchr' function. */ -#undef HAVE_STRCHR - -/* Define to 1 if you have the `strcspn' function. */ -#undef HAVE_STRCSPN - -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRDUP - -/* Define to 1 if you have the `strerror' function. */ -#undef HAVE_STRERROR - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strrchr' function. */ -#undef HAVE_STRRCHR - -/* Define to 1 if you have the `strstr' function. */ -#undef HAVE_STRSTR - -/* Define to 1 if you have the `strtol' function. */ -#undef HAVE_STRTOL - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_CDEFS_H - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_SYS_DIR_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_IOCTL_H - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#undef HAVE_SYS_NDIR_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_TERM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if the system has the type `u_int32_t'. */ -#undef HAVE_U_INT32_T - -/* Define to 1 if you have the `vfork' function. */ -#undef HAVE_VFORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_VFORK_H - -/* Define to 1 if you have the `wcsdup' function. */ -#undef HAVE_WCSDUP - -/* Define to 1 if `fork' works. */ -#undef HAVE_WORKING_FORK - -/* Define to 1 if `vfork' works. */ -#undef HAVE_WORKING_VFORK - -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing - slash. */ -#undef LSTAT_FOLLOWS_SLASHED_SYMLINK - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define as the return type of signal handlers (`int' or `void'). */ -#undef RETSIGTYPE - -/* 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 runtime. - 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 to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* Version number of package */ -#undef VERSION - -/* Define to 1 if you want wide-character code */ -#undef WIDECHAR - -/* Define to 1 if on MINIX. */ -#undef _MINIX - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `int' if does not define. */ -#undef pid_t - -/* Define to `unsigned int' if does not define. */ -#undef size_t - -/* Define as `fork' if `vfork' does not work. */ -#undef vfork - - -#include "sys.h" -#define SCCSID -#undef LIBC_SCCS -#define lint - diff --git a/kerberosV/src/lib/libedit/config.sub b/kerberosV/src/lib/libedit/config.sub deleted file mode 100755 index 2a55a50751c..00000000000 --- a/kerberosV/src/lib/libedit/config.sub +++ /dev/null @@ -1,1705 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-11-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze) - basic_machine=microblaze-xilinx - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux - ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/kerberosV/src/lib/libedit/configure b/kerberosV/src/lib/libedit/configure deleted file mode 100755 index 9255bbfa810..00000000000 --- a/kerberosV/src/lib/libedit/configure +++ /dev/null @@ -1,15262 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for libedit 3.0. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='libedit' -PACKAGE_TARNAME='libedit-20121209' -PACKAGE_VERSION='3.0' -PACKAGE_STRING='libedit 3.0' -PACKAGE_BUGREPORT='' -PACKAGE_URL='' - -ac_unique_file="src/strlcat.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -ALLOCA -WIDECHAR_FALSE -WIDECHAR_TRUE -MANTYPE -NROFF -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -LT_VERSION -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -RANLIB -ac_ct_AR -AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -SED -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBTOOL -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_dependency_tracking -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_silent_rules -enable_widec -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures libedit 3.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root - [DATAROOTDIR/doc/libedit-20121209] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of libedit 3.0:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --enable-widec compile with wide-char/UTF-8 code - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use - both] - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -libedit configure 3.0 -generated by GNU Autoconf 2.65 - -Copyright (C) 2009 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_type -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by libedit $as_me 3.0, which was -generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_config_headers="$ac_config_headers config.h" - - -# features of Posix that are extensions to C (define _GNU_SOURCE) -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = x""yes; then : - MINIX=yes -else - MINIX= -fi - - - if test "$MINIX" = yes; then - -$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h - - -$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h - - -$as_echo "#define _MINIX 1" >>confdefs.h - - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_safe_to_define___extensions__=yes -else - ac_cv_safe_to_define___extensions__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - - $as_echo "#define _ALL_SOURCE 1" >>confdefs.h - - $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h - - - -am__api_version='1.11' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -esac - -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - as_fn_error "newly created file is older than distributed files! -Check your system clock" "$LINENO" 5 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='libedit-20121209' - VERSION='3.0' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has - # not run yet. These depmodes are late enough in the game, and - # so weak that their functioning should not be impacted. - am__obj=conftest.${OBJEXT-o} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4' -macro_revision='1.3293' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue -# Check for GNU ac_path_FGREP and select it if it is found. - # Check for GNU $ac_path_FGREP -case `"$ac_path_FGREP" --version 2>&1` in -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if test "${lt_cv_path_LD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if test "${lt_cv_to_host_file_cmd+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if test "${lt_cv_to_tool_file_cmd+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if test "${lt_cv_ar_at_file+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # which start with @ or ?. - lt_cv_sys_global_symbol_pipe="$AWK '"\ -" {last_section=section; section=\$ 3};"\ -" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" \$ 0!~/External *\|/{next};"\ -" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } - as_fn_error "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - ppc64-*linux*|powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - ppc*-*linux*|powerpc*-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -sparc*-*solaris*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) - if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then - LD="${LD-ld} -64" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test "${lt_cv_path_mainfest_tool+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if test "${lt_cv_ld_force_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_LT_EOF - echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err - _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then - lt_cv_ld_force_load=yes - else - cat conftest.err >&5 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" -else - pic_mode=default -fi - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='/usr/bin/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -if test -n "$compiler"; then - -lt_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' - ;; - *Sun\ C*) - # Sun C 5.9 - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - esac - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if test "${lt_cv_prog_compiler_pic+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - xlf* | bgf* | bgxlf* | mpixlf*) - # IBM XL Fortran 10.1 on PPC cannot create shared libs itself - whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if test "${lt_cv_aix_libpath_+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if test "${lt_cv_aix_libpath_+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # The linker will not automatically build a static lib if we build a DLL. - # _LT_TAGVAR(old_archive_from_new_cmds, )='true' - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' - # Don't use ranlib - old_postinstall_cmds='chmod 644 $oldlib' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' - else - whole_archive_flag_spec='' - fi - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - freebsd1*) - ld_shlibs=no - ;; - - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor - # support. Future versions do this automatically, but an explicit c++rt0.o - # does not break anything, and helps significantly (at the cost of a little - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if test "${lt_cv_prog_compiler__b+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test "${lt_cv_irix_exported_symbol+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if test "${lt_cv_archive_cmds_need_lc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' - shlibpath_var=LIBPATH - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - version_type=linux - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -freebsd1*) - dynamic_linker=no - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -haiku*) - version_type=linux - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - - -# libtool -version-info -LT_VERSION=0:36:0 - - -# Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : - enableval=$enable_silent_rules; -fi - -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; -esac -AM_BACKSLASH='\' - - -# Checks for programs. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 -$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if test "${ac_cv_prog_cc_c99+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -#include - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -#define debug(...) fprintf (stderr, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - your preprocessor is broken; -#endif -#if BIG_OK -#else - your preprocessor is broken; -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static void -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str; - int number; - float fnumber; - - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg (args_copy, const char *); - break; - case 'd': // int - number = va_arg (args_copy, int); - break; - case 'f': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); -} - -int -main () -{ - - // Check bool. - _Bool success = false; - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - test_varargs ("s, d' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' - || dynamic_array[ni.number - 1] != 543); - - ; - return 0; -} -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c99" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c99" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c99" != xno; then : - -fi - - -#AC_PROG_CC -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - - - MANTYPE= - TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb" - for ac_prog in nroff awf -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_NROFF+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - case $NROFF in - [\\/]* | ?:[\\/]*) - ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $TestPath -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -NROFF=$ac_cv_path_NROFF -if test -n "$NROFF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5 -$as_echo "$NROFF" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$NROFF" && break -done -test -n "$NROFF" || NROFF="/bin/false" - - if ${NROFF} -mdoc ${srcdir}/doc/editrc.5.roff >/dev/null 2>&1; then - MANTYPE=mdoc - fi - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 -$as_echo_n "checking for tgetent in -lcurses... " >&6; } -if test "${ac_cv_lib_curses_tgetent+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurses $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tgetent (); -int -main () -{ -return tgetent (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_curses_tgetent=yes -else - ac_cv_lib_curses_tgetent=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 -$as_echo "$ac_cv_lib_curses_tgetent" >&6; } -if test "x$ac_cv_lib_curses_tgetent" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCURSES 1 -_ACEOF - - LIBS="-lcurses $LIBS" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 -$as_echo_n "checking for tgetent in -lncurses... " >&6; } -if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lncurses $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tgetent (); -int -main () -{ -return tgetent (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ncurses_tgetent=yes -else - ac_cv_lib_ncurses_tgetent=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 -$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; } -if test "x$ac_cv_lib_ncurses_tgetent" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBNCURSES 1 -_ACEOF - - LIBS="-lncurses $LIBS" - -else - as_fn_error "libcurses or libncurses are required!" "$LINENO" 5 -fi - -fi - - - -### use option --enable-widec to turn on use of wide-character support - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you want wide-character code" >&5 -$as_echo_n "checking if you want wide-character code... " >&6; } - # Check whether --enable-widec was given. -if test "${enable_widec+set}" = set; then : - enableval=$enable_widec; with_widec=$enableval -else - with_widec=no -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_widec" >&5 -$as_echo "$with_widec" >&6; } - if test "$with_widec" = yes ; then - -$as_echo "#define WIDECHAR 1" >>confdefs.h - - fi - if test "$with_widec" = yes; then - WIDECHAR_TRUE= - WIDECHAR_FALSE='#' -else - WIDECHAR_TRUE='#' - WIDECHAR_FALSE= -fi - - - -# Checks for header files. -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_working_alloca_h=yes -else - ac_cv_working_alloca_h=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then - -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif - -int -main () -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_alloca_works=yes -else - ac_cv_func_alloca_works=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } - -if test $ac_cv_func_alloca_works = yes; then - -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - -else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. - -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - -$as_echo "#define C_ALLOCA 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi - - done -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_c_stack_direction=0 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} - -int -main () -{ - return find_stack_direction () < 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_stack_direction=1 -else - ac_cv_c_stack_direction=-1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF - - -fi - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_ac_Header=yes" -else - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then : - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then : - -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 -$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif - -int -main () -{ - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_sys_wait_h=yes -else - ac_cv_header_sys_wait_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 -$as_echo "$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then - -$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h - -fi - -for ac_header in fcntl.h limits.h malloc.h stdlib.h string.h sys/ioctl.h sys/param.h unistd.h curses.h ncurses.h sys/cdefs.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -ac_fn_c_check_header_mongrel "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" -if test "x$ac_cv_header_termios_h" = x""yes; then : - -else - as_fn_error "termios.h is required!" "$LINENO" 5 -fi - - - -## include curses.h to prevent "Present But Cannot Be Compiled" -for ac_header in term.h -do : - ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H -# include -#elif HAVE_NCURSES_H -# include -#endif - -" -if test "x$ac_cv_header_term_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TERM_H 1 -_ACEOF - -fi - -done - - -# Checks for typedefs, structures, and compiler characteristics. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_const=yes -else - ac_cv_c_const=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -$as_echo "#define const /**/" >>confdefs.h - -fi - -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default" -if test "x$ac_cv_type_u_int32_t" = x""yes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_U_INT32_T 1 -_ACEOF - - -fi - - -# Checks for library functions. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 -$as_echo_n "checking whether closedir returns void... " >&6; } -if test "${ac_cv_func_closedir_void+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_closedir_void=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header_dirent> -#ifndef __cplusplus -int closedir (); -#endif - -int -main () -{ -return closedir (opendir (".")) != 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_closedir_void=no -else - ac_cv_func_closedir_void=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5 -$as_echo "$ac_cv_func_closedir_void" >&6; } -if test $ac_cv_func_closedir_void = yes; then - -$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h - -fi - -for ac_header in vfork.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" -if test "x$ac_cv_header_vfork_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VFORK_H 1 -_ACEOF - -fi - -done - -for ac_func in fork vfork -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -if test "x$ac_cv_func_fork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 -$as_echo_n "checking for working fork... " >&6; } -if test "${ac_cv_func_fork_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_fork_works=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* By Ruediger Kuhlmann. */ - return fork () < 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_fork_works=yes -else - ac_cv_func_fork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 -$as_echo "$ac_cv_func_fork_works" >&6; } - -else - ac_cv_func_fork_works=$ac_cv_func_fork -fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} -fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 -$as_echo_n "checking for working vfork... " >&6; } -if test "${ac_cv_func_vfork_works+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_vfork_works=cross -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Thanks to Paul Eggert for this test. */ -$ac_includes_default -#include -#ifdef HAVE_VFORK_H -# include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include , but some compilers - (e.g. gcc -O) don't grok . Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void -#ifdef __cplusplus -sparc_address_test (int arg) -# else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} - -int -main () -{ - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (0); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - return ( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_vfork_works=yes -else - ac_cv_func_vfork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 -$as_echo "$ac_cv_func_vfork_works" >&6; } - -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} -fi - -if test "x$ac_cv_func_vfork_works" = xyes; then - -$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h - -else - -$as_echo "#define vfork fork" >>confdefs.h - -fi -if test "x$ac_cv_func_fork_works" = xyes; then - -$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h - -fi - -if test $ac_cv_c_compiler_gnu = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 -$as_echo_n "checking whether $CC needs -traditional... " >&6; } -if test "${ac_cv_prog_gcc_traditional+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_pattern="Autoconf.*'x'" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TIOCGETP -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : - ac_cv_prog_gcc_traditional=yes -else - ac_cv_prog_gcc_traditional=no -fi -rm -f conftest* - - - if test $ac_cv_prog_gcc_traditional = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -Autoconf TCGETA -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1; then : - ac_cv_prog_gcc_traditional=yes -fi -rm -f conftest* - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 -$as_echo "$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi - -## _AIX is offended by rpl_malloc and rpl_realloc -#AC_FUNC_MALLOC -#AC_FUNC_REALLOC -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 -$as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -return *(signal (0, 0)) (0) == 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_signal=int -else - ac_cv_type_signal=void -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 -$as_echo "$ac_cv_type_signal" >&6; } - -cat >>confdefs.h <<_ACEOF -#define RETSIGTYPE $ac_cv_type_signal -_ACEOF - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - rm -f conftest.sym conftest.file -echo >conftest.file -if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : - ac_cv_func_lstat_dereferences_slashed_symlink=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by POSIX. - That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_lstat_dereferences_slashed_symlink=yes -else - ac_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -else - # If the `ln -s' command failed, then we probably don't even - # have an lstat function. - ac_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f conftest.sym conftest.file - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } - -test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && - -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 -_ACEOF - - -if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then - case " $LIBOBJS " in - *" lstat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS lstat.$ac_objext" - ;; -esac - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 -$as_echo_n "checking whether stat accepts an empty string... " >&6; } -if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_stat_empty_string_bug=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -struct stat sbuf; - return stat ("", &sbuf) == 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_stat_empty_string_bug=no -else - ac_cv_func_stat_empty_string_bug=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 -$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } -if test $ac_cv_func_stat_empty_string_bug = yes; then - case " $LIBOBJS " in - *" stat.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS stat.$ac_objext" - ;; -esac - - -cat >>confdefs.h <<_ACEOF -#define HAVE_STAT_EMPTY_STRING_BUG 1 -_ACEOF - -fi - -for ac_func in endpwent isascii memchr memset re_comp regcomp strcasecmp strchr strcspn strdup strerror strrchr strstr strtol issetugid wcsdup -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwnam_r and getpwuid_r are posix like" >&5 -$as_echo_n "checking whether getpwnam_r and getpwuid_r are posix like... " >&6; } - # The prototype for the POSIX version is: - # int getpwnam_r(char *, struct passwd *, char *, size_t, struct passwd **) - # int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **); - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include -int -main () -{ -getpwnam_r(NULL, NULL, NULL, (size_t)0, NULL); - getpwuid_r((uid_t)0, NULL, NULL, (size_t)0, NULL); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define HAVE_GETPW_R_POSIX 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpwnam_r and getpwuid_r are posix _draft_ like" >&5 -$as_echo_n "checking whether getpwnam_r and getpwuid_r are posix _draft_ like... " >&6; } - # The prototype for the POSIX draft version is: - # struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int); - # struct passwd *getpwnam_r(char *, struct passwd *, char *, int); - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include -int -main () -{ -getpwnam_r(NULL, NULL, NULL, (size_t)0); - getpwuid_r((uid_t)0, NULL, NULL, (size_t)0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define HAVE_GETPW_R_DRAFT 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - - - - -ac_config_files="$ac_config_files Makefile src/Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - if test -n "$EXEEXT"; then - am__EXEEXT_TRUE= - am__EXEEXT_FALSE='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${WIDECHAR_TRUE}" && test -z "${WIDECHAR_FALSE}"; then - as_fn_error "conditional \"WIDECHAR\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by libedit $as_me 3.0, which was -generated by GNU Autoconf 2.65. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -libedit config.status 3.0 -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2009 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' -ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' -host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' -host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' -host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -nm_file_list_spec \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that protects backslashes. -ECHO=$lt_ECHO - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and in which our libraries should be installed. -lt_sysroot=$lt_sysroot - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/kerberosV/src/lib/libedit/configure.ac b/kerberosV/src/lib/libedit/configure.ac deleted file mode 100644 index 08591bab139..00000000000 --- a/kerberosV/src/lib/libedit/configure.ac +++ /dev/null @@ -1,92 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. -# -# Compile with debug symbols: -# CFLAGS="-ggdb -pedandic -O0" ./configure -# CFLAGS="-ggdb -Wall -Wextra -pedantic -O0" ./configure -# -# Verbose output can be enabled with -# "./configure --disable-silent-rules" or "make V=1" -# - -AC_PREREQ(2.61) -AC_INIT(libedit, [EL_RELEASE],, libedit-[EL_TIMESTAMP]) -AC_CONFIG_SRCDIR([src/strlcat.c]) -AC_CONFIG_HEADER([config.h]) - -# features of Posix that are extensions to C (define _GNU_SOURCE) -AC_USE_SYSTEM_EXTENSIONS - -AM_INIT_AUTOMAKE -AC_PROG_LIBTOOL - -# libtool -version-info -AC_SUBST(LT_VERSION, [0:36:0]) - -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) - -# Checks for programs. -AC_PROG_CC_C99 -#AC_PROG_CC -AC_PROG_LN_S -AC_PROG_AWK -EL_MANTYPE - - -AC_CHECK_LIB(curses, tgetent,, - [AC_CHECK_LIB(ncurses, tgetent,, - [AC_MSG_ERROR([libcurses or libncurses are required!])] )] ) - - -### use option --enable-widec to turn on use of wide-character support -EL_ENABLE_WIDEC - -# Checks for header files. -AC_FUNC_ALLOCA -AC_HEADER_DIRENT -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/ioctl.h sys/param.h unistd.h curses.h ncurses.h sys/cdefs.h]) - -AC_CHECK_HEADER([termios.h], [], [AC_MSG_ERROR([termios.h is required!])],[]) - -## include curses.h to prevent "Present But Cannot Be Compiled" -AC_CHECK_HEADERS([term.h],,, -[[#if HAVE_CURSES_H -# include -#elif HAVE_NCURSES_H -# include -#endif -]]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_CHECK_TYPES([u_int32_t]) - -# Checks for library functions. -AC_FUNC_CLOSEDIR_VOID -AC_FUNC_FORK -AC_PROG_GCC_TRADITIONAL -## _AIX is offended by rpl_malloc and rpl_realloc -#AC_FUNC_MALLOC -#AC_FUNC_REALLOC -AC_TYPE_SIGNAL -AC_FUNC_STAT -AC_CHECK_FUNCS([endpwent isascii memchr memset re_comp regcomp strcasecmp strchr strcspn strdup strerror strrchr strstr strtol issetugid wcsdup]) -EL_GETPW_R_POSIX -EL_GETPW_R_DRAFT - - -AH_BOTTOM([ -#include "sys.h" -#define SCCSID -#undef LIBC_SCCS -#define lint -]) - -AC_CONFIG_FILES([Makefile - src/Makefile -]) -AC_OUTPUT diff --git a/kerberosV/src/lib/libedit/depcomp b/kerberosV/src/lib/libedit/depcomp deleted file mode 100755 index df8eea7e4ce..00000000000 --- a/kerberosV/src/lib/libedit/depcomp +++ /dev/null @@ -1,630 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -cygpath_u="cygpath -u -f -" -if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" - echo >> "$depfile" - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - fi - stat=$? - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # 'foo.d', which lands next to the object file, wherever that - # happens to be. - # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" "$tmpdepfile2" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E 2>/dev/null | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/kerberosV/src/lib/libedit/install-sh b/kerberosV/src/lib/libedit/install-sh deleted file mode 100755 index 6781b987bdb..00000000000 --- a/kerberosV/src/lib/libedit/install-sh +++ /dev/null @@ -1,520 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2009-04-28.21; # UTC - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - fi - shift # arg - dst_arg=$arg - done -fi - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 - - # Set umask so as not to create temps with too-generous modes. - # However, 'strip' requires both read and write access to temps. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test -z "$d" && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/kerberosV/src/lib/libedit/ltmain.sh b/kerberosV/src/lib/libedit/ltmain.sh deleted file mode 100755 index 3061e3c5a2f..00000000000 --- a/kerberosV/src/lib/libedit/ltmain.sh +++ /dev/null @@ -1,9636 +0,0 @@ - -# libtool (GNU libtool) 2.4 -# Written by Gordon Matzigkeit , 1996 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . - -PROGRAM=libtool -PACKAGE=libtool -VERSION=2.4 -TIMESTAMP="" -package_revision=1.3293 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL - -$lt_unset CDPATH - - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - - - -: ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="grep -E"} -: ${FGREP="grep -F"} -: ${GREP="grep"} -: ${LN_S="ln -s"} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SED="sed"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} # func_dirname may be replaced by extended shell implementation - - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} # func_basename may be replaced by extended shell implementation - - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} # func_dirname_and_basename may be replaced by extended shell implementation - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname may be replaced by extended shell implementation - - -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' - -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi - - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} - -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=: - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' - -# Sed substitution that converts a w32 file name or path -# which contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` - done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "$my_tmpdir" -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - -# func_tr_sh -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $opt_debug - - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $opt_debug - - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. -func_help () -{ - $opt_debug - - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $opt_debug - - func_error "missing argument for $1." - exit_cmd=exit -} - - -# func_split_short_opt shortopt -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -func_split_short_opt () -{ - my_sed_short_opt='1s/^\(..\).*$/\1/;q' - my_sed_short_rest='1s/^..\(.*\)$/\1/;q' - - func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` - func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -} # func_split_short_opt may be replaced by extended shell implementation - - -# func_split_long_opt longopt -# Set func_split_long_opt_name and func_split_long_opt_arg shell -# variables after splitting LONGOPT at the `=' sign. -func_split_long_opt () -{ - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' - - func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` - func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -} # func_split_long_opt may be replaced by extended shell implementation - -exit_cmd=: - - - - - -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" - -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "${1}=\$${1}\${2}" -} # func_append may be replaced by extended shell implementation - -# func_append_quoted var value -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -func_append_quoted () -{ - func_quote_for_eval "${2}" - eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -} # func_append_quoted may be replaced by extended shell implementation - - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "${@}"` -} # func_arith may be replaced by extended shell implementation - - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -} # func_len may be replaced by extended shell implementation - - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} # func_lo2o may be replaced by extended shell implementation - - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} # func_xform may be replaced by extended shell implementation - - -# func_fatal_configuration arg... -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." -} - - -# func_config -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - -# func_features -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - -# func_enable_tag tagname -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname="$1" - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# Shorthand for --mode=foo, only valid as the first argument -case $1 in -clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; -compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; -execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; -finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; -install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; -link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; -uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; -esac - - - -# Option defaults: -opt_debug=: -opt_dry_run=false -opt_config=false -opt_preserve_dup_deps=false -opt_features=false -opt_finish=false -opt_help=false -opt_help_all=false -opt_silent=: -opt_verbose=: -opt_silent=false -opt_verbose=false - - -# Parse options once, thoroughly. This comes as soon as possible in the -# script to make things like `--version' happen as quickly as we can. -{ - # this just eases exit handling - while test $# -gt 0; do - opt="$1" - shift - case $opt in - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --finish) - opt_finish=: -set dummy --mode finish ${1+"$@"}; shift - ;; - --help) - opt_help=: - ;; - --help-all) - opt_help_all=: -opt_help=': help-all' - ;; - --mode) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_mode="$optarg" -case $optarg in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; -esac - shift - ;; - --no-silent|--no-quiet) - opt_silent=false -func_append preserve_args " $opt" - ;; - --no-verbose) - opt_verbose=false -func_append preserve_args " $opt" - ;; - --silent|--quiet) - opt_silent=: -func_append preserve_args " $opt" - opt_verbose=false - ;; - --verbose|-v) - opt_verbose=: -func_append preserve_args " $opt" -opt_silent=false - ;; - --tag) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_tag="$optarg" -func_append preserve_args " $opt $optarg" -func_enable_tag "$optarg" - shift - ;; - - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - - # Separate optargs to long options: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-n*|-v*) - func_split_short_opt "$opt" - set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) set dummy "$opt" ${1+"$@"}; shift; break ;; - esac - done - - # Validate options: - - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi - - # preserve --debug - test "$opt_debug" = : || func_append preserve_args " --debug" - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test "$opt_mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } - - - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE -} - - - - -## ----------- ## -## Main. ## -## ----------- ## - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case "$lt_sysroot:$1" in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result="=$func_stripname_result" - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$lt_sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $opt_debug - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result="" - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result" ; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $opt_debug - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $opt_debug - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $opt_debug - if test -z "$2" && test -n "$1" ; then - func_error "Could not determine host file name corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result="$1" - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $opt_debug - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " \`$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result="$3" - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $opt_debug - case $4 in - $1 ) func_to_host_path_result="$3$func_to_host_path_result" - ;; - esac - case $4 in - $2 ) func_append func_to_host_path_result "$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via `$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $opt_debug - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $opt_debug - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result="$1" -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result="$func_convert_core_msys_to_w32_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result="$func_cygpath_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result="$func_cygpath_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via `$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $opt_debug - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd="func_convert_path_${func_stripname_result}" - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $opt_debug - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result="$1" -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_msys_to_w32_result" - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result="$func_cygpath_result" - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result="$func_cygpath_result" - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_mode_compile arg... -func_mode_compile () -{ - $opt_debug - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - func_append_quoted lastarg "$arg" - done - IFS="$save_ifs" - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with \`-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj="$func_basename_result" - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from \`$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$opt_mode'" - ;; - esac - - echo - $ECHO "Try \`$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test "$opt_help" = :; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - sed '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - func_append libdirs " $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - func_append libs " $opt" - else - func_warning "\`$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument \`$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and \`=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test "$opt_mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - func_append staticlibs " $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - func_show_eval "$install_prog \$file \$oldlib" 'exit $?' - - if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$opt_mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename="" - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname" ; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename="$func_basename_result" - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename" ; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $opt_debug - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $opt_debug - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive which possess that section. Heuristic: eliminate - # all those which have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $opt_debug - if func_cygming_gnu_implib_p "$1" ; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1" ; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result="" - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done - func_exec_program_core \${1+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -/* declarations of non-ANSI functions */ -#if defined(__MINGW32__) -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined(__CYGWIN__) -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined (other platforms) ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined(__CYGWIN__) -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ -#endif - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#if defined(LT_DEBUGWRAPPER) -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $opt_debug - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir="$arg" - prev= - continue - ;; - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; - *) func_append deplibs " -L$dir" ;; - esac - func_append lib_search_path " $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-flto*|-fwhopr*|-fuse-linker-plugin) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - func_append compiler_flags " $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - func_append deplibs " $arg" - func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps ; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - func_append convenience " $ladir/$objdir/$old_library" - func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test "$prefer_static_libs" = yes || - test "$prefer_static_libs,$installed" = "built,no"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib="$l" - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - case "$host" in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - func_append newdlprefiles " $dir/$linklib" - else - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - func_append newdlprefiles " $dir/$dlname" - else - func_append newdlprefiles " $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - echo - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$opt_mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$opt_mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - func_append newlib_search_path " $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - func_append verstring ":${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$opt_mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) func_append dlprefiles " $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd1 in $cmds; do - IFS="$save_ifs" - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test "$try_normal_branch" = yes \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=${output_objdir}/${output_la}.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - func_append delfiles " $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - func_append delfiles " $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - func_append delfiles " $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " ${wl}-bind_at_load" - func_append finalize_command " ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - func_append compile_command " $compile_deplibs" - func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no - ;; - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) func_append oldobjs " $obj" ;; - esac - done - fi - eval cmds=\"$old_archive_cmds\" - - func_len " $cmds" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -R$func_replace_sysroot_result" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=yes ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" - else - odir="$dir/$objdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" - - # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case "$opt_mode" in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$opt_mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - func_append rmfiles " $odir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$opt_mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/kerberosV/src/lib/libedit/missing b/kerberosV/src/lib/libedit/missing deleted file mode 100755 index 28055d2ae6f..00000000000 --- a/kerberosV/src/lib/libedit/missing +++ /dev/null @@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/kerberosV/src/lib/libedit/src/Makefile.am b/kerberosV/src/lib/libedit/src/Makefile.am deleted file mode 100644 index 47e8a50265b..00000000000 --- a/kerberosV/src/lib/libedit/src/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ - -BUILT_SOURCES = vi.h emacs.h common.h fcns.h help.h fcns.c help.c -if WIDECHAR -BUILT_SOURCES += tokenizern.c historyn.c -endif - -AHDR= vi.h emacs.h common.h -ASRC= $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c - -vi.h: Makefile $(srcdir)/vi.c - AWK=$(AWK) sh $(srcdir)/makelist -h $(srcdir)/vi.c > $@ - -emacs.h: Makefile $(srcdir)/emacs.c - AWK=$(AWK) sh $(srcdir)/makelist -h $(srcdir)/emacs.c > $@ - -common.h: Makefile $(srcdir)/common.c - AWK=$(AWK) sh $(srcdir)/makelist -h $(srcdir)/common.c > $@ - -fcns.h: Makefile $(AHDR) - AWK=$(AWK) sh $(srcdir)/makelist -fh $(AHDR) > $@ - -help.h: Makefile $(ASRC) - AWK=$(AWK) sh $(srcdir)/makelist -bh $(ASRC) > $@ - -fcns.c: Makefile $(AHDR) - AWK=$(AWK) sh $(srcdir)/makelist -fc $(AHDR) > $@ - -help.c: Makefile $(ASRC) - AWK=$(AWK) sh $(srcdir)/makelist -bc $(ASRC) > $@ - -tokenizern.c: Makefile $(srcdir)/tokenizer.c - AWK=$(AWK) sh $(srcdir)/makelist -n $(srcdir)/tokenizer.c > $@ - -historyn.c: Makefile $(srcdir)/history.c - AWK=$(AWK) sh $(srcdir)/makelist -n $(srcdir)/history.c > $@ - -CLEANFILES = $(BUILT_SOURCES) - -lib_LTLIBRARIES = libheimedit.la -libheimedit_la_SOURCES = chared.c common.c el.c emacs.c hist.c key.c map.c chartype.c parse.c \ - prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c \ - fgetln.c strlcat.c strlcpy.c unvis.c vis.c wcsdup.c tokenizer.c \ - history.c filecomplete.c readline.c chared.h el.h hist.h \ - histedit.h key.h map.h chartype.h parse.h prompt.h read.h refresh.h \ - search.h sig.h sys.h el_term.h tty.h vis.h filecomplete.h \ - editline/readline.h -if WIDECHAR -libheimedit_la_SOURCES += eln.c -endif - -EXTRA_DIST = makelist shlib_version -#nobase_include_HEADERS = histedit.h editline/readline.h -EXTRA_DIST += histedit.h editline/readline.h - -nodist_libheimedit_la_SOURCES = $(BUILT_SOURCES) - -libheimedit_la_LDFLAGS = -no-undefined -version-info $(LT_VERSION) - diff --git a/kerberosV/src/lib/libedit/src/Makefile.in b/kerberosV/src/lib/libedit/src/Makefile.in deleted file mode 100644 index 8b92898b32a..00000000000 --- a/kerberosV/src/lib/libedit/src/Makefile.in +++ /dev/null @@ -1,639 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@WIDECHAR_TRUE@am__append_1 = tokenizern.c historyn.c -@WIDECHAR_TRUE@am__append_2 = eln.c -subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libheimedit_la_LIBADD = -am__libheimedit_la_SOURCES_DIST = chared.c common.c el.c emacs.c \ - hist.c key.c map.c chartype.c parse.c prompt.c read.c \ - refresh.c search.c sig.c term.c tty.c vi.c fgetln.c strlcat.c \ - strlcpy.c unvis.c vis.c wcsdup.c tokenizer.c history.c \ - filecomplete.c readline.c chared.h el.h hist.h histedit.h \ - key.h map.h chartype.h parse.h prompt.h read.h refresh.h \ - search.h sig.h sys.h el_term.h tty.h vis.h filecomplete.h \ - editline/readline.h eln.c -@WIDECHAR_TRUE@am__objects_1 = eln.lo -am_libheimedit_la_OBJECTS = chared.lo common.lo el.lo emacs.lo hist.lo \ - key.lo map.lo chartype.lo parse.lo prompt.lo read.lo \ - refresh.lo search.lo sig.lo term.lo tty.lo vi.lo fgetln.lo \ - strlcat.lo strlcpy.lo unvis.lo vis.lo wcsdup.lo tokenizer.lo \ - history.lo filecomplete.lo readline.lo $(am__objects_1) -@WIDECHAR_TRUE@am__objects_2 = tokenizern.lo historyn.lo -am__objects_3 = fcns.lo help.lo $(am__objects_2) -nodist_libheimedit_la_OBJECTS = $(am__objects_3) -libheimedit_la_OBJECTS = $(am_libheimedit_la_OBJECTS) \ - $(nodist_libheimedit_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent -libheimedit_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(AM_CFLAGS) $(CFLAGS) $(libheimedit_la_LDFLAGS) $(LDFLAGS) -o \ - $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libheimedit_la_SOURCES) $(nodist_libheimedit_la_SOURCES) -DIST_SOURCES = $(am__libheimedit_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LT_VERSION = @LT_VERSION@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MANTYPE = @MANTYPE@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -BUILT_SOURCES = vi.h emacs.h common.h fcns.h help.h fcns.c help.c \ - $(am__append_1) -AHDR = vi.h emacs.h common.h -ASRC = $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c -CLEANFILES = $(BUILT_SOURCES) -lib_LTLIBRARIES = libheimedit.la -libheimedit_la_SOURCES = chared.c common.c el.c emacs.c hist.c key.c \ - map.c chartype.c parse.c prompt.c read.c refresh.c search.c \ - sig.c term.c tty.c vi.c fgetln.c strlcat.c strlcpy.c unvis.c \ - vis.c wcsdup.c tokenizer.c history.c filecomplete.c readline.c \ - chared.h el.h hist.h histedit.h key.h map.h chartype.h parse.h \ - prompt.h read.h refresh.h search.h sig.h sys.h el_term.h tty.h \ - vis.h filecomplete.h editline/readline.h $(am__append_2) -#nobase_include_HEADERS = histedit.h editline/readline.h -EXTRA_DIST = makelist shlib_version histedit.h editline/readline.h -nodist_libheimedit_la_SOURCES = $(BUILT_SOURCES) -libheimedit_la_LDFLAGS = -no-undefined -version-info $(LT_VERSION) -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libheimedit.la: $(libheimedit_la_OBJECTS) $(libheimedit_la_DEPENDENCIES) - $(AM_V_CCLD)$(libheimedit_la_LINK) -rpath $(libdir) $(libheimedit_la_OBJECTS) $(libheimedit_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chared.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chartype.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/el.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eln.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emacs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcns.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fgetln.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filecomplete.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/help.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hist.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/historyn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/key.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prompt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readline.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/refresh.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/search.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/term.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tokenizer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tokenizern.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tty.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unvis.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vi.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vis.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcsdup.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - -.MAKE: all check install install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES - - -vi.h: Makefile $(srcdir)/vi.c - AWK=$(AWK) sh $(srcdir)/makelist -h $(srcdir)/vi.c > $@ - -emacs.h: Makefile $(srcdir)/emacs.c - AWK=$(AWK) sh $(srcdir)/makelist -h $(srcdir)/emacs.c > $@ - -common.h: Makefile $(srcdir)/common.c - AWK=$(AWK) sh $(srcdir)/makelist -h $(srcdir)/common.c > $@ - -fcns.h: Makefile $(AHDR) - AWK=$(AWK) sh $(srcdir)/makelist -fh $(AHDR) > $@ - -help.h: Makefile $(ASRC) - AWK=$(AWK) sh $(srcdir)/makelist -bh $(ASRC) > $@ - -fcns.c: Makefile $(AHDR) - AWK=$(AWK) sh $(srcdir)/makelist -fc $(AHDR) > $@ - -help.c: Makefile $(ASRC) - AWK=$(AWK) sh $(srcdir)/makelist -bc $(ASRC) > $@ - -tokenizern.c: Makefile $(srcdir)/tokenizer.c - AWK=$(AWK) sh $(srcdir)/makelist -n $(srcdir)/tokenizer.c > $@ - -historyn.c: Makefile $(srcdir)/history.c - AWK=$(AWK) sh $(srcdir)/makelist -n $(srcdir)/history.c > $@ - -# 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/kerberosV/src/lib/libedit/src/chared.c b/kerberosV/src/lib/libedit/src/chared.c deleted file mode 100644 index ec600a7bd38..00000000000 --- a/kerberosV/src/lib/libedit/src/chared.c +++ /dev/null @@ -1,796 +0,0 @@ -/* $NetBSD: chared.c,v 1.29 2010/08/28 15:44:59 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: chared.c,v 1.29 2010/08/28 15:44:59 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * chared.c: Character editor utilities - */ -#include -#include "el.h" - -private void ch__clearmacro (EditLine *); - -/* value to leave unused in line buffer */ -#define EL_LEAVE 2 - -/* cv_undo(): - * Handle state for the vi undo command - */ -protected void -cv_undo(EditLine *el) -{ - c_undo_t *vu = &el->el_chared.c_undo; - c_redo_t *r = &el->el_chared.c_redo; - size_t size; - - /* Save entire line for undo */ - size = el->el_line.lastchar - el->el_line.buffer; - vu->len = size; - vu->cursor = (int)(el->el_line.cursor - el->el_line.buffer); - (void)memcpy(vu->buf, el->el_line.buffer, size * sizeof(*vu->buf)); - - /* save command info for redo */ - r->count = el->el_state.doingarg ? el->el_state.argument : 0; - r->action = el->el_chared.c_vcmd.action; - r->pos = r->buf; - r->cmd = el->el_state.thiscmd; - r->ch = el->el_state.thisch; -} - -/* cv_yank(): - * Save yank/delete data for paste - */ -protected void -cv_yank(EditLine *el, const Char *ptr, int size) -{ - c_kill_t *k = &el->el_chared.c_kill; - - (void)memcpy(k->buf, ptr, size * sizeof(*k->buf)); - k->last = k->buf + size; -} - - -/* c_insert(): - * Insert num characters - */ -protected void -c_insert(EditLine *el, int num) -{ - Char *cp; - - if (el->el_line.lastchar + num >= el->el_line.limit) { - if (!ch_enlargebufs(el, (size_t)num)) - return; /* can't go past end of buffer */ - } - - if (el->el_line.cursor < el->el_line.lastchar) { - /* if I must move chars */ - for (cp = el->el_line.lastchar; cp >= el->el_line.cursor; cp--) - cp[num] = *cp; - } - el->el_line.lastchar += num; -} - - -/* c_delafter(): - * Delete num characters after the cursor - */ -protected void -c_delafter(EditLine *el, int num) -{ - - if (el->el_line.cursor + num > el->el_line.lastchar) - num = (int)(el->el_line.lastchar - el->el_line.cursor); - - if (el->el_map.current != el->el_map.emacs) { - cv_undo(el); - cv_yank(el, el->el_line.cursor, num); - } - - if (num > 0) { - Char *cp; - - for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++) - *cp = cp[num]; - - el->el_line.lastchar -= num; - } -} - - -/* c_delafter1(): - * Delete the character after the cursor, do not yank - */ -protected void -c_delafter1(EditLine *el) -{ - Char *cp; - - for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++) - *cp = cp[1]; - - el->el_line.lastchar--; -} - - -/* c_delbefore(): - * Delete num characters before the cursor - */ -protected void -c_delbefore(EditLine *el, int num) -{ - - if (el->el_line.cursor - num < el->el_line.buffer) - num = (int)(el->el_line.cursor - el->el_line.buffer); - - if (el->el_map.current != el->el_map.emacs) { - cv_undo(el); - cv_yank(el, el->el_line.cursor - num, num); - } - - if (num > 0) { - Char *cp; - - for (cp = el->el_line.cursor - num; - cp <= el->el_line.lastchar; - cp++) - *cp = cp[num]; - - el->el_line.lastchar -= num; - } -} - - -/* c_delbefore1(): - * Delete the character before the cursor, do not yank - */ -protected void -c_delbefore1(EditLine *el) -{ - Char *cp; - - for (cp = el->el_line.cursor - 1; cp <= el->el_line.lastchar; cp++) - *cp = cp[1]; - - el->el_line.lastchar--; -} - - -/* ce__isword(): - * Return if p is part of a word according to emacs - */ -protected int -ce__isword(Int p) -{ - return (Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL); -} - - -/* cv__isword(): - * Return if p is part of a word according to vi - */ -protected int -cv__isword(Int p) -{ - if (Isalnum(p) || p == '_') - return 1; - if (Isgraph(p)) - return 2; - return 0; -} - - -/* cv__isWord(): - * Return if p is part of a big word according to vi - */ -protected int -cv__isWord(Int p) -{ - return (!Isspace(p)); -} - - -/* c__prev_word(): - * Find the previous word - */ -protected Char * -c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) -{ - p--; - - while (n--) { - while ((p >= low) && !(*wtest)(*p)) - p--; - while ((p >= low) && (*wtest)(*p)) - p--; - } - - /* cp now points to one character before the word */ - p++; - if (p < low) - p = low; - /* cp now points where we want it */ - return (p); -} - - -/* c__next_word(): - * Find the next word - */ -protected Char * -c__next_word(Char *p, Char *high, int n, int (*wtest)(Int)) -{ - while (n--) { - while ((p < high) && !(*wtest)(*p)) - p++; - while ((p < high) && (*wtest)(*p)) - p++; - } - if (p > high) - p = high; - /* p now points where we want it */ - return (p); -} - -/* cv_next_word(): - * Find the next word vi style - */ -protected Char * -cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int)) -{ - int test; - - while (n--) { - test = (*wtest)(*p); - while ((p < high) && (*wtest)(*p) == test) - p++; - /* - * vi historically deletes with cw only the word preserving the - * trailing whitespace! This is not what 'w' does.. - */ - if (n || el->el_chared.c_vcmd.action != (DELETE|INSERT)) - while ((p < high) && Isspace(*p)) - p++; - } - - /* p now points where we want it */ - if (p > high) - return (high); - else - return (p); -} - - -/* cv_prev_word(): - * Find the previous word vi style - */ -protected Char * -cv_prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) -{ - int test; - - p--; - while (n--) { - while ((p > low) && Isspace(*p)) - p--; - test = (*wtest)(*p); - while ((p >= low) && (*wtest)(*p) == test) - p--; - } - p++; - - /* p now points where we want it */ - if (p < low) - return (low); - else - return (p); -} - - -#ifdef notdef -/* c__number(): - * Ignore character p points to, return number appearing after that. - * A '$' by itself means a big number; "$-" is for negative; '^' means 1. - * Return p pointing to last char used. - */ -protected Char * -c__number( - Char *p, /* character position */ - int *num, /* Return value */ - int dval) /* dval is the number to subtract from like $-3 */ -{ - int i; - int sign = 1; - - if (*++p == '^') { - *num = 1; - return (p); - } - if (*p == '$') { - if (*++p != '-') { - *num = 0x7fffffff; /* Handle $ */ - return (--p); - } - sign = -1; /* Handle $- */ - ++p; - } - /* XXX: this assumes ASCII compatible digits */ - for (i = 0; Isdigit(*p); i = 10 * i + *p++ - '0') - continue; - *num = (sign < 0 ? dval - i : i); - return (--p); -} -#endif - -/* cv_delfini(): - * Finish vi delete action - */ -protected void -cv_delfini(EditLine *el) -{ - int size; - int action = el->el_chared.c_vcmd.action; - - if (action & INSERT) - el->el_map.current = el->el_map.key; - - if (el->el_chared.c_vcmd.pos == 0) - /* sanity */ - return; - - size = (int)(el->el_line.cursor - el->el_chared.c_vcmd.pos); - if (size == 0) - size = 1; - el->el_line.cursor = el->el_chared.c_vcmd.pos; - if (action & YANK) { - if (size > 0) - cv_yank(el, el->el_line.cursor, size); - else - cv_yank(el, el->el_line.cursor + size, -size); - } else { - if (size > 0) { - c_delafter(el, size); - re_refresh_cursor(el); - } else { - c_delbefore(el, -size); - el->el_line.cursor += size; - } - } - el->el_chared.c_vcmd.action = NOP; -} - - -#ifdef notdef -/* ce__endword(): - * Go to the end of this word according to emacs - */ -protected Char * -ce__endword(Char *p, Char *high, int n) -{ - p++; - - while (n--) { - while ((p < high) && Isspace(*p)) - p++; - while ((p < high) && !Isspace(*p)) - p++; - } - - p--; - return (p); -} -#endif - - -/* cv__endword(): - * Go to the end of this word according to vi - */ -protected Char * -cv__endword(Char *p, Char *high, int n, int (*wtest)(Int)) -{ - int test; - - p++; - - while (n--) { - while ((p < high) && Isspace(*p)) - p++; - - test = (*wtest)(*p); - while ((p < high) && (*wtest)(*p) == test) - p++; - } - p--; - return (p); -} - -/* ch_init(): - * Initialize the character editor - */ -protected int -ch_init(EditLine *el) -{ - c_macro_t *ma = &el->el_chared.c_macro; - - el->el_line.buffer = el_malloc(EL_BUFSIZ * - sizeof(*el->el_line.buffer)); - if (el->el_line.buffer == NULL) - return (-1); - - (void) memset(el->el_line.buffer, 0, EL_BUFSIZ * - sizeof(*el->el_line.buffer)); - el->el_line.cursor = el->el_line.buffer; - el->el_line.lastchar = el->el_line.buffer; - el->el_line.limit = &el->el_line.buffer[EL_BUFSIZ - EL_LEAVE]; - - el->el_chared.c_undo.buf = el_malloc(EL_BUFSIZ * - sizeof(*el->el_chared.c_undo.buf)); - if (el->el_chared.c_undo.buf == NULL) - return (-1); - (void) memset(el->el_chared.c_undo.buf, 0, EL_BUFSIZ * - sizeof(*el->el_chared.c_undo.buf)); - el->el_chared.c_undo.len = -1; - el->el_chared.c_undo.cursor = 0; - el->el_chared.c_redo.buf = el_malloc(EL_BUFSIZ * - sizeof(*el->el_chared.c_redo.buf)); - if (el->el_chared.c_redo.buf == NULL) - return (-1); - el->el_chared.c_redo.pos = el->el_chared.c_redo.buf; - el->el_chared.c_redo.lim = el->el_chared.c_redo.buf + EL_BUFSIZ; - el->el_chared.c_redo.cmd = ED_UNASSIGNED; - - el->el_chared.c_vcmd.action = NOP; - el->el_chared.c_vcmd.pos = el->el_line.buffer; - - el->el_chared.c_kill.buf = el_malloc(EL_BUFSIZ * - sizeof(*el->el_chared.c_kill.buf)); - if (el->el_chared.c_kill.buf == NULL) - return (-1); - (void) memset(el->el_chared.c_kill.buf, 0, EL_BUFSIZ * - sizeof(*el->el_chared.c_kill.buf)); - el->el_chared.c_kill.mark = el->el_line.buffer; - el->el_chared.c_kill.last = el->el_chared.c_kill.buf; - el->el_chared.c_resizefun = NULL; - el->el_chared.c_resizearg = NULL; - - el->el_map.current = el->el_map.key; - - el->el_state.inputmode = MODE_INSERT; /* XXX: save a default */ - el->el_state.doingarg = 0; - el->el_state.metanext = 0; - el->el_state.argument = 1; - el->el_state.lastcmd = ED_UNASSIGNED; - - ma->level = -1; - ma->offset = 0; - ma->macro = el_malloc(EL_MAXMACRO * sizeof(*ma->macro)); - if (ma->macro == NULL) - return (-1); - return (0); -} - -/* ch_reset(): - * Reset the character editor - */ -protected void -ch_reset(EditLine *el, int mclear) -{ - el->el_line.cursor = el->el_line.buffer; - el->el_line.lastchar = el->el_line.buffer; - - el->el_chared.c_undo.len = -1; - el->el_chared.c_undo.cursor = 0; - - el->el_chared.c_vcmd.action = NOP; - el->el_chared.c_vcmd.pos = el->el_line.buffer; - - el->el_chared.c_kill.mark = el->el_line.buffer; - - el->el_map.current = el->el_map.key; - - el->el_state.inputmode = MODE_INSERT; /* XXX: save a default */ - el->el_state.doingarg = 0; - el->el_state.metanext = 0; - el->el_state.argument = 1; - el->el_state.lastcmd = ED_UNASSIGNED; - - el->el_history.eventno = 0; - - if (mclear) - ch__clearmacro(el); -} - -private void -ch__clearmacro(EditLine *el) -{ - c_macro_t *ma = &el->el_chared.c_macro; - while (ma->level >= 0) - el_free((ptr_t)ma->macro[ma->level--]); -} - -/* ch_enlargebufs(): - * Enlarge line buffer to be able to hold twice as much characters. - * Returns 1 if successful, 0 if not. - */ -protected int -ch_enlargebufs(EditLine *el, size_t addlen) -{ - size_t sz, newsz; - Char *newbuffer, *oldbuf, *oldkbuf; - - sz = el->el_line.limit - el->el_line.buffer + EL_LEAVE; - newsz = sz * 2; - /* - * If newly required length is longer than current buffer, we need - * to make the buffer big enough to hold both old and new stuff. - */ - if (addlen > sz) { - while(newsz - sz < addlen) - newsz *= 2; - } - - /* - * Reallocate line buffer. - */ - newbuffer = el_realloc(el->el_line.buffer, newsz * sizeof(*newbuffer)); - if (!newbuffer) - return 0; - - /* zero the newly added memory, leave old data in */ - (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); - - oldbuf = el->el_line.buffer; - - el->el_line.buffer = newbuffer; - el->el_line.cursor = newbuffer + (el->el_line.cursor - oldbuf); - el->el_line.lastchar = newbuffer + (el->el_line.lastchar - oldbuf); - /* don't set new size until all buffers are enlarged */ - el->el_line.limit = &newbuffer[sz - EL_LEAVE]; - - /* - * Reallocate kill buffer. - */ - newbuffer = el_realloc(el->el_chared.c_kill.buf, newsz * sizeof(*newbuffer)); - if (!newbuffer) - return 0; - - /* zero the newly added memory, leave old data in */ - (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); - - oldkbuf = el->el_chared.c_kill.buf; - - el->el_chared.c_kill.buf = newbuffer; - el->el_chared.c_kill.last = newbuffer + - (el->el_chared.c_kill.last - oldkbuf); - el->el_chared.c_kill.mark = el->el_line.buffer + - (el->el_chared.c_kill.mark - oldbuf); - - /* - * Reallocate undo buffer. - */ - newbuffer = el_realloc(el->el_chared.c_undo.buf, - newsz * sizeof(*newbuffer)); - if (!newbuffer) - return 0; - - /* zero the newly added memory, leave old data in */ - (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); - el->el_chared.c_undo.buf = newbuffer; - - newbuffer = el_realloc(el->el_chared.c_redo.buf, - newsz * sizeof(*newbuffer)); - if (!newbuffer) - return 0; - el->el_chared.c_redo.pos = newbuffer + - (el->el_chared.c_redo.pos - el->el_chared.c_redo.buf); - el->el_chared.c_redo.lim = newbuffer + - (el->el_chared.c_redo.lim - el->el_chared.c_redo.buf); - el->el_chared.c_redo.buf = newbuffer; - - if (!hist_enlargebuf(el, sz, newsz)) - return 0; - - /* Safe to set enlarged buffer size */ - el->el_line.limit = &el->el_line.buffer[newsz - EL_LEAVE]; - if (el->el_chared.c_resizefun) - (*el->el_chared.c_resizefun)(el, el->el_chared.c_resizearg); - return 1; -} - -/* ch_end(): - * Free the data structures used by the editor - */ -protected void -ch_end(EditLine *el) -{ - el_free((ptr_t) el->el_line.buffer); - el->el_line.buffer = NULL; - el->el_line.limit = NULL; - el_free((ptr_t) el->el_chared.c_undo.buf); - el->el_chared.c_undo.buf = NULL; - el_free((ptr_t) el->el_chared.c_redo.buf); - el->el_chared.c_redo.buf = NULL; - el->el_chared.c_redo.pos = NULL; - el->el_chared.c_redo.lim = NULL; - el->el_chared.c_redo.cmd = ED_UNASSIGNED; - el_free((ptr_t) el->el_chared.c_kill.buf); - el->el_chared.c_kill.buf = NULL; - ch_reset(el, 1); - el_free((ptr_t) el->el_chared.c_macro.macro); - el->el_chared.c_macro.macro = NULL; -} - - -/* el_insertstr(): - * Insert string at cursorI - */ -public int -FUN(el,insertstr)(EditLine *el, const Char *s) -{ - size_t len; - - if ((len = Strlen(s)) == 0) - return (-1); - if (el->el_line.lastchar + len >= el->el_line.limit) { - if (!ch_enlargebufs(el, len)) - return (-1); - } - - c_insert(el, (int)len); - while (*s) - *el->el_line.cursor++ = *s++; - return (0); -} - - -/* el_deletestr(): - * Delete num characters before the cursor - */ -public void -el_deletestr(EditLine *el, int n) -{ - if (n <= 0) - return; - - if (el->el_line.cursor < &el->el_line.buffer[n]) - return; - - c_delbefore(el, n); /* delete before dot */ - el->el_line.cursor -= n; - if (el->el_line.cursor < el->el_line.buffer) - el->el_line.cursor = el->el_line.buffer; -} - -/* c_gets(): - * Get a string - */ -protected int -c_gets(EditLine *el, Char *buf, const Char *prompt) -{ - Char ch; - ssize_t len; - Char *cp = el->el_line.buffer; - - if (prompt) { - len = Strlen(prompt); - (void)memcpy(cp, prompt, len * sizeof(*cp)); - cp += len; - } - len = 0; - - for (;;) { - el->el_line.cursor = cp; - *cp = ' '; - el->el_line.lastchar = cp + 1; - re_refresh(el); - - if (FUN(el,getc)(el, &ch) != 1) { - ed_end_of_file(el, 0); - len = -1; - break; - } - - switch (ch) { - - case 0010: /* Delete and backspace */ - case 0177: - if (len == 0) { - len = -1; - break; - } - cp--; - continue; - - case 0033: /* ESC */ - case '\r': /* Newline */ - case '\n': - buf[len] = ch; - break; - - default: - if (len >= EL_BUFSIZ - 16) - term_beep(el); - else { - buf[len++] = ch; - *cp++ = ch; - } - continue; - } - break; - } - - el->el_line.buffer[0] = '\0'; - el->el_line.lastchar = el->el_line.buffer; - el->el_line.cursor = el->el_line.buffer; - return (int)len; -} - - -/* c_hpos(): - * Return the current horizontal position of the cursor - */ -protected int -c_hpos(EditLine *el) -{ - Char *ptr; - - /* - * Find how many characters till the beginning of this line. - */ - if (el->el_line.cursor == el->el_line.buffer) - return (0); - else { - for (ptr = el->el_line.cursor - 1; - ptr >= el->el_line.buffer && *ptr != '\n'; - ptr--) - continue; - return (int)(el->el_line.cursor - ptr - 1); - } -} - -protected int -ch_resizefun(EditLine *el, el_zfunc_t f, void *a) -{ - el->el_chared.c_resizefun = f; - el->el_chared.c_resizearg = a; - return 0; -} diff --git a/kerberosV/src/lib/libedit/src/chared.h b/kerberosV/src/lib/libedit/src/chared.h deleted file mode 100644 index 176475ac8f0..00000000000 --- a/kerberosV/src/lib/libedit/src/chared.h +++ /dev/null @@ -1,171 +0,0 @@ -/* $NetBSD: chared.h,v 1.21 2010/08/28 15:44:59 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)chared.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.chared.h: Character editor interface - */ -#ifndef _h_el_chared -#define _h_el_chared - -#include -#include - -#include "histedit.h" - -#define EL_MAXMACRO 10 - -/* - * This is an issue of basic "vi" look-and-feel. Defining VI_MOVE works - * like real vi: i.e. the transition from command<->insert modes moves - * the cursor. - * - * On the other hand we really don't want to move the cursor, because - * all the editing commands don't include the character under the cursor. - * Probably the best fix is to make all the editing commands aware of - * this fact. - */ -#define VI_MOVE - - -typedef struct c_macro_t { - int level; - int offset; - Char **macro; -} c_macro_t; - -/* - * Undo information for vi - no undo in emacs (yet) - */ -typedef struct c_undo_t { - ssize_t len; /* length of saved line */ - int cursor; /* position of saved cursor */ - Char *buf; /* full saved text */ -} c_undo_t; - -/* redo for vi */ -typedef struct c_redo_t { - Char *buf; /* redo insert key sequence */ - Char *pos; - Char *lim; - el_action_t cmd; /* command to redo */ - Char ch; /* char that invoked it */ - int count; - int action; /* from cv_action() */ -} c_redo_t; - -/* - * Current action information for vi - */ -typedef struct c_vcmd_t { - int action; - Char *pos; -} c_vcmd_t; - -/* - * Kill buffer for emacs - */ -typedef struct c_kill_t { - Char *buf; - Char *last; - Char *mark; -} c_kill_t; - -typedef void (*el_zfunc_t)(EditLine *, void *); - -/* - * Note that we use both data structures because the user can bind - * commands from both editors! - */ -typedef struct el_chared_t { - c_undo_t c_undo; - c_kill_t c_kill; - c_redo_t c_redo; - c_vcmd_t c_vcmd; - c_macro_t c_macro; - el_zfunc_t c_resizefun; - void * c_resizearg; -} el_chared_t; - - -#define STRQQ "\"\"" - -#define isglob(a) (strchr("*[]?", (a)) != NULL) - -#define NOP 0x00 -#define DELETE 0x01 -#define INSERT 0x02 -#define YANK 0x04 - -#define CHAR_FWD (+1) -#define CHAR_BACK (-1) - -#define MODE_INSERT 0 -#define MODE_REPLACE 1 -#define MODE_REPLACE_1 2 - -#include "common.h" -#include "vi.h" -#include "emacs.h" -#include "search.h" -#include "fcns.h" - - -protected int cv__isword(Int); -protected int cv__isWord(Int); -protected void cv_delfini(EditLine *); -protected Char *cv__endword(Char *, Char *, int, int (*)(Int)); -protected int ce__isword(Int); -protected void cv_undo(EditLine *); -protected void cv_yank(EditLine *, const Char *, int); -protected Char *cv_next_word(EditLine*, Char *, Char *, int, int (*)(Int)); -protected Char *cv_prev_word(Char *, Char *, int, int (*)(Int)); -protected Char *c__next_word(Char *, Char *, int, int (*)(Int)); -protected Char *c__prev_word(Char *, Char *, int, int (*)(Int)); -protected void c_insert(EditLine *, int); -protected void c_delbefore(EditLine *, int); -protected void c_delbefore1(EditLine *); -protected void c_delafter(EditLine *, int); -protected void c_delafter1(EditLine *); -protected int c_gets(EditLine *, Char *, const Char *); -protected int c_hpos(EditLine *); - -protected int ch_init(EditLine *); -protected void ch_reset(EditLine *, int); -protected int ch_resizefun(EditLine *, el_zfunc_t, void *); -protected int ch_enlargebufs(EditLine *, size_t); -protected void ch_end(EditLine *); - -#endif /* _h_el_chared */ diff --git a/kerberosV/src/lib/libedit/src/chartype.c b/kerberosV/src/lib/libedit/src/chartype.c deleted file mode 100644 index a0adde6f608..00000000000 --- a/kerberosV/src/lib/libedit/src/chartype.c +++ /dev/null @@ -1,360 +0,0 @@ -/* $NetBSD: chartype.c,v 1.4 2010/04/15 00:55:57 christos Exp $ */ - -/*- - * Copyright (c) 2009 The NetBSD Foundation, Inc. - * 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 NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -/* - * chartype.c: character classification and meta information - */ -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: chartype.c,v 1.4 2010/04/15 00:55:57 christos Exp $"); -#endif /* not lint && not SCCSID */ -#include "el.h" -#include - -#define CT_BUFSIZ 1024 - -#ifdef WIDECHAR -protected void -ct_conv_buff_resize(ct_buffer_t *conv, size_t mincsize, size_t minwsize) -{ - void *p; - if (mincsize > conv->csize) { - conv->csize = mincsize; - p = el_realloc(conv->cbuff, conv->csize); - if (p == NULL) { - conv->csize = 0; - el_free(conv->cbuff); - conv->cbuff = NULL; - } else - conv->cbuff = p; - } - - if (minwsize > conv->wsize) { - conv->wsize = minwsize; - p = el_realloc(conv->wbuff, conv->wsize); - if (p == NULL) { - conv->wsize = 0; - el_free(conv->wbuff); - conv->wbuff = NULL; - } else - conv->wbuff = p; - } -} - - -public char * -ct_encode_string(const Char *s, ct_buffer_t *conv) -{ - char *dst; - ssize_t used = 0; - - if (!s) - return NULL; - if (!conv->cbuff) - ct_conv_buff_resize(conv, CT_BUFSIZ, 0); - if (!conv->cbuff) - return NULL; - - dst = conv->cbuff; - while (*s) { - used = ct_encode_char(dst, (int)(conv->csize - - (dst - conv->cbuff)), *s); - if (used == -1) { /* failed to encode, need more buffer space */ - used = dst - conv->cbuff; - ct_conv_buff_resize(conv, conv->csize + CT_BUFSIZ, 0); - if (!conv->cbuff) - return NULL; - dst = conv->cbuff + used; - /* don't increment s here - we want to retry it! */ - } - else - ++s; - dst += used; - } - if (dst >= (conv->cbuff + conv->csize)) { - used = dst - conv->cbuff; - ct_conv_buff_resize(conv, conv->csize + 1, 0); - if (!conv->cbuff) - return NULL; - dst = conv->cbuff + used; - } - *dst = '\0'; - return conv->cbuff; -} - -public Char * -ct_decode_string(const char *s, ct_buffer_t *conv) -{ - size_t len = 0; - - if (!s) - return NULL; - if (!conv->wbuff) - ct_conv_buff_resize(conv, 0, CT_BUFSIZ); - if (!conv->wbuff) - return NULL; - - len = ct_mbstowcs(0, s, 0); - if (len > conv->wsize) - ct_conv_buff_resize(conv, 0, len + 1); - if (!conv->wbuff) - return NULL; - ct_mbstowcs(conv->wbuff, s, conv->wsize); - return conv->wbuff; -} - - -protected Char ** -ct_decode_argv(int argc, const char *argv[], ct_buffer_t *conv) -{ - size_t bufspace; - int i; - Char *p; - Char **wargv; - ssize_t bytes; - - /* Make sure we have enough space in the conversion buffer to store all - * the argv strings. */ - for (i = 0, bufspace = 0; i < argc; ++i) - bufspace += argv[i] ? strlen(argv[i]) + 1 : 0; - ct_conv_buff_resize(conv, 0, bufspace); - if (!conv->wsize) - return NULL; - - wargv = el_malloc(argc * sizeof(*wargv)); - - for (i = 0, p = conv->wbuff; i < argc; ++i) { - if (!argv[i]) { /* don't pass null pointers to mbstowcs */ - wargv[i] = NULL; - continue; - } else { - wargv[i] = p; - bytes = mbstowcs(p, argv[i], bufspace); - } - if (bytes == -1) { - el_free(wargv); - return NULL; - } else - bytes++; /* include '\0' in the count */ - bufspace -= bytes; - p += bytes; - } - - return wargv; -} - - -protected size_t -ct_enc_width(Char c) -{ - /* UTF-8 encoding specific values */ - if (c < 0x80) - return 1; - else if (c < 0x0800) - return 2; - else if (c < 0x10000) - return 3; - else if (c < 0x110000) - return 4; - else - return 0; /* not a valid codepoint */ -} - -protected ssize_t -ct_encode_char(char *dst, size_t len, Char c) -{ - ssize_t l = 0; - if (len < ct_enc_width(c)) - return -1; - l = ct_wctomb(dst, c); - - if (l < 0) { - ct_wctomb_reset; - l = 0; - } - return l; -} -#endif - -protected const Char * -ct_visual_string(const Char *s) -{ - static Char *buff = NULL; - static size_t buffsize = 0; - void *p; - Char *dst; - ssize_t used = 0; - - if (!s) - return NULL; - if (!buff) { - buffsize = CT_BUFSIZ; - buff = el_malloc(buffsize * sizeof(*buff)); - } - dst = buff; - while (*s) { - used = ct_visual_char(dst, buffsize - (dst - buff), *s); - if (used == -1) { /* failed to encode, need more buffer space */ - used = dst - buff; - buffsize += CT_BUFSIZ; - p = el_realloc(buff, buffsize * sizeof(*buff)); - if (p == NULL) - goto out; - buff = p; - dst = buff + used; - /* don't increment s here - we want to retry it! */ - } - else - ++s; - dst += used; - } - if (dst >= (buff + buffsize)) { /* sigh */ - buffsize += 1; - p = el_realloc(buff, buffsize * sizeof(*buff)); - if (p == NULL) - goto out; - buff = p; - dst = buff + buffsize - 1; - } - *dst = 0; - return buff; -out: - el_free(buff); - buffsize = 0; - return NULL; -} - - - -protected int -ct_visual_width(Char c) -{ - int t = ct_chr_class(c); - switch (t) { - case CHTYPE_ASCIICTL: - return 2; /* ^@ ^? etc. */ - case CHTYPE_TAB: - return 1; /* Hmm, this really need to be handled outside! */ - case CHTYPE_NL: - return 0; /* Should this be 1 instead? */ -#ifdef WIDECHAR - case CHTYPE_PRINT: - return wcwidth(c); - case CHTYPE_NONPRINT: - if (c > 0xffff) /* prefer standard 4-byte display over 5-byte */ - return 8; /* \U+12345 */ - else - return 7; /* \U+1234 */ -#else - case CHTYPE_PRINT: - return 1; - case CHTYPE_NONPRINT: - return 4; /* \123 */ -#endif - default: - return 0; /* should not happen */ - } -} - - -protected ssize_t -ct_visual_char(Char *dst, size_t len, Char c) -{ - int t = ct_chr_class(c); - switch (t) { - case CHTYPE_TAB: - case CHTYPE_NL: - case CHTYPE_ASCIICTL: - if (len < 2) - return -1; /* insufficient space */ - *dst++ = '^'; - if (c == '\177') - *dst = '?'; /* DEL -> ^? */ - else - *dst = c | 0100; /* uncontrolify it */ - return 2; - case CHTYPE_PRINT: - if (len < 1) - return -1; /* insufficient space */ - *dst = c; - return 1; - case CHTYPE_NONPRINT: - /* we only use single-width glyphs for display, - * so this is right */ - if ((ssize_t)len < ct_visual_width(c)) - return -1; /* insufficient space */ -#ifdef WIDECHAR - *dst++ = '\\'; - *dst++ = 'U'; - *dst++ = '+'; -#define tohexdigit(v) "0123456789ABCDEF"[v] - if (c > 0xffff) /* prefer standard 4-byte display over 5-byte */ - *dst++ = tohexdigit(((unsigned int) c >> 16) & 0xf); - *dst++ = tohexdigit(((unsigned int) c >> 12) & 0xf); - *dst++ = tohexdigit(((unsigned int) c >> 8) & 0xf); - *dst++ = tohexdigit(((unsigned int) c >> 4) & 0xf); - *dst = tohexdigit(((unsigned int) c ) & 0xf); - return (c > 0xffff) ? 8 : 7; -#else - *dst++ = '\\'; -#define tooctaldigit(v) ((v) + '0') - *dst++ = tooctaldigit(((unsigned int) c >> 6) & 0x7); - *dst++ = tooctaldigit(((unsigned int) c >> 3) & 0x7); - *dst++ = tooctaldigit(((unsigned int) c ) & 0x7); -#endif - /*FALLTHROUGH*/ - /* these two should be handled outside this function */ - default: /* we should never hit the default */ - return 0; - } -} - - - - -protected int -ct_chr_class(Char c) -{ - if (c == '\t') - return CHTYPE_TAB; - else if (c == '\n') - return CHTYPE_NL; - else if (IsASCII(c) && Iscntrl(c)) - return CHTYPE_ASCIICTL; - else if (Isprint(c)) - return CHTYPE_PRINT; - else - return CHTYPE_NONPRINT; -} diff --git a/kerberosV/src/lib/libedit/src/chartype.h b/kerberosV/src/lib/libedit/src/chartype.h deleted file mode 100644 index df65b02c00f..00000000000 --- a/kerberosV/src/lib/libedit/src/chartype.h +++ /dev/null @@ -1,249 +0,0 @@ -/* $NetBSD: chartype.h,v 1.7 2010/12/16 17:42:28 wiz Exp $ */ - -/*- - * Copyright (c) 2009 The NetBSD Foundation, Inc. - * 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 NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -#ifndef _h_chartype_f -#define _h_chartype_f - - - -#ifdef WIDECHAR - -/* Ideally we should also test the value of the define to see if it - * supports non-BMP code points without requiring UTF-16, but nothing - * seems to actually advertise this properly, despite Unicode 3.1 having - * been around since 2001... */ -#if !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) -#ifndef __STDC_ISO_10646__ -/* In many places it is assumed that the first 127 code points are ASCII - * compatible, so ensure wchar_t indeed does ISO 10646 and not some other - * funky encoding that could break us in weird and wonderful ways. */ - #error wchar_t must store ISO 10646 characters -#endif -#endif - -/* Oh for a with char32_t and __STDC_UTF_32__ in it... - * ref: ISO/IEC DTR 19769 - */ -#if WCHAR_MAX < INT32_MAX -#warning Build environment does not support non-BMP characters -#endif - -#ifndef HAVE_WCSDUP -wchar_t *wcsdup(const wchar_t *s); -#endif - -#define ct_mbtowc mbtowc -#define ct_mbtowc_reset mbtowc(0,0,0) -#define ct_wctomb wctomb -#define ct_wctomb_reset wctomb(0,0) -#define ct_wcstombs wcstombs -#define ct_mbstowcs mbstowcs - -#define Char wchar_t -#define Int wint_t -#define FUN(prefix,rest) prefix ## _w ## rest -#define FUNW(type) type ## _w -#define TYPE(type) type ## W -#define FSTR "%ls" -#define STR(x) L ## x -#define UC(c) c -#define Isalpha(x) iswalpha(x) -#define Isalnum(x) iswalnum(x) -#define Isgraph(x) iswgraph(x) -#define Isspace(x) iswspace(x) -#define Isdigit(x) iswdigit(x) -#define Iscntrl(x) iswcntrl(x) -#define Isprint(x) iswprint(x) - -#define Isupper(x) iswupper(x) -#define Islower(x) iswlower(x) -#define Toupper(x) towupper(x) -#define Tolower(x) towlower(x) - -#define IsASCII(x) (x < 0x100) - -#define Strlen(x) wcslen(x) -#define Strchr(s,c) wcschr(s,c) -#define Strrchr(s,c) wcsrchr(s,c) -#define Strstr(s,v) wcsstr(s,v) -#define Strdup(x) wcsdup(x) -#define Strcpy(d,s) wcscpy(d,s) -#define Strncpy(d,s,n) wcsncpy(d,s,n) -#define Strncat(d,s,n) wcsncat(d,s,n) - -#define Strcmp(s,v) wcscmp(s,v) -#define Strncmp(s,v,n) wcsncmp(s,v,n) -#define Strcspn(s,r) wcscspn(s,r) - -#define Strtol(p,e,b) wcstol(p,e,b) - -#define Width(c) wcwidth(c) - -#else /* NARROW */ - -#define ct_mbtowc error -#define ct_mbtowc_reset -#define ct_wctomb error -#define ct_wctomb_reset -#define ct_wcstombs(a, b, c) (strncpy(a, b, c), strlen(a)) -#define ct_mbstowcs(a, b, c) (strncpy(a, b, c), strlen(a)) - -#define Char char -#define Int int -#define FUN(prefix,rest) prefix ## _ ## rest -#define FUNW(type) type -#define TYPE(type) type -#define FSTR "%s" -#define STR(x) x -#define UC(c) (unsigned char)(c) - -#define Isalpha(x) isalpha((unsigned char)x) -#define Isalnum(x) isalnum((unsigned char)x) -#define Isgraph(x) isgraph((unsigned char)x) -#define Isspace(x) isspace((unsigned char)x) -#define Isdigit(x) isdigit((unsigned char)x) -#define Iscntrl(x) iscntrl((unsigned char)x) -#define Isprint(x) isprint((unsigned char)x) - -#define Isupper(x) isupper((unsigned char)x) -#define Islower(x) islower((unsigned char)x) -#define Toupper(x) toupper((unsigned char)x) -#define Tolower(x) tolower((unsigned char)x) - -#define IsASCII(x) isascii((unsigned char)x) - -#define Strlen(x) strlen(x) -#define Strchr(s,c) strchr(s,c) -#define Strrchr(s,c) strrchr(s,c) -#define Strstr(s,v) strstr(s,v) -#define Strdup(x) strdup(x) -#define Strcpy(d,s) strcpy(d,s) -#define Strncpy(d,s,n) strncpy(d,s,n) -#define Strncat(d,s,n) strncat(d,s,n) - -#define Strcmp(s,v) strcmp(s,v) -#define Strncmp(s,v,n) strncmp(s,v,n) -#define Strcspn(s,r) strcspn(s,r) - -#define Strtol(p,e,b) strtol(p,e,b) - -#define Width(c) 1 - -#endif - - -#ifdef WIDECHAR -/* - * Conversion buffer - */ -typedef struct ct_buffer_t { - char *cbuff; - size_t csize; - Char *wbuff; - size_t wsize; -} ct_buffer_t; - -#define ct_encode_string __ct_encode_string -/* Encode a wide-character string and return the UTF-8 encoded result. */ -public char *ct_encode_string(const Char *, ct_buffer_t *); - -#define ct_decode_string __ct_decode_string -/* Decode a (multi)?byte string and return the wide-character string result. */ -public Char *ct_decode_string(const char *, ct_buffer_t *); - -/* Decode a (multi)?byte argv string array. - * The pointer returned must be free()d when done. */ -protected Char **ct_decode_argv(int, const char *[], ct_buffer_t *); - -/* Resizes the conversion buffer(s) if needed. */ -protected void ct_conv_buff_resize(ct_buffer_t *, size_t, size_t); -protected ssize_t ct_encode_char(char *, size_t, Char); -protected size_t ct_enc_width(Char); - -#define ct_free_argv(s) el_free(s) - -#else -#define ct_encode_string(s, b) (s) -#define ct_decode_string(s, b) (s) -#define ct_decode_argv(l, s, b) (s) -#define ct_conv_buff_resize(b, os, ns) -#define ct_encode_char(d, l, s) (*d = s, 1) -#define ct_free_argv(s) -#endif - -#ifndef NARROWCHAR -/* Encode a characted into the destination buffer, provided there is sufficent - * buffer space available. Returns the number of bytes used up (zero if the - * character cannot be encoded, -1 if there was not enough space available). */ - -/* The maximum buffer size to hold the most unwieldly visual representation, - * in this case \U+nnnnn. */ -#define VISUAL_WIDTH_MAX 8 - -/* The terminal is thought of in terms of X columns by Y lines. In the cases - * where a wide character takes up more than one column, the adjacent - * occupied column entries will contain this faux character. */ -#define MB_FILL_CHAR ((Char)-1) - -/* Visual width of character c, taking into account ^? , \0177 and \U+nnnnn - * style visual expansions. */ -protected int ct_visual_width(Char); - -/* Turn the given character into the appropriate visual format, matching - * the width given by ct_visual_width(). Returns the number of characters used - * up, or -1 if insufficient space. Buffer length is in count of Char's. */ -protected ssize_t ct_visual_char(Char *, size_t, Char); - -/* Convert the given string into visual format, using the ct_visual_char() - * function. Uses a static buffer, so not threadsafe. */ -protected const Char *ct_visual_string(const Char *); - - -/* printable character, use ct_visual_width() to find out display width */ -#define CHTYPE_PRINT ( 0) -/* control character found inside the ASCII portion of the charset */ -#define CHTYPE_ASCIICTL (-1) -/* a \t */ -#define CHTYPE_TAB (-2) -/* a \n */ -#define CHTYPE_NL (-3) -/* non-printable character */ -#define CHTYPE_NONPRINT (-4) -/* classification of character c, as one of the above defines */ -protected int ct_chr_class(Char c); -#endif - - -#endif /* _chartype_f */ diff --git a/kerberosV/src/lib/libedit/src/common.c b/kerberosV/src/lib/libedit/src/common.c deleted file mode 100644 index c4d21aa9328..00000000000 --- a/kerberosV/src/lib/libedit/src/common.c +++ /dev/null @@ -1,921 +0,0 @@ -/* $NetBSD: common.c,v 1.24 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: common.c,v 1.24 2009/12/30 22:37:40 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * common.c: Common Editor functions - */ -#include "el.h" - -/* ed_end_of_file(): - * Indicate end of file - * [^D] - */ -protected el_action_t -/*ARGSUSED*/ -ed_end_of_file(EditLine *el, Int c __attribute__((__unused__))) -{ - - re_goto_bottom(el); - *el->el_line.lastchar = '\0'; - return (CC_EOF); -} - - -/* ed_insert(): - * Add character to the line - * Insert a character [bound to all insert keys] - */ -protected el_action_t -ed_insert(EditLine *el, Int c) -{ - int count = el->el_state.argument; - - if (c == '\0') - return (CC_ERROR); - - if (el->el_line.lastchar + el->el_state.argument >= - el->el_line.limit) { - /* end of buffer space, try to allocate more */ - if (!ch_enlargebufs(el, (size_t) count)) - return CC_ERROR; /* error allocating more */ - } - - if (count == 1) { - if (el->el_state.inputmode == MODE_INSERT - || el->el_line.cursor >= el->el_line.lastchar) - c_insert(el, 1); - - *el->el_line.cursor++ = c; - re_fastaddc(el); /* fast refresh for one char. */ - } else { - if (el->el_state.inputmode != MODE_REPLACE_1) - c_insert(el, el->el_state.argument); - - while (count-- && el->el_line.cursor < el->el_line.lastchar) - *el->el_line.cursor++ = c; - re_refresh(el); - } - - if (el->el_state.inputmode == MODE_REPLACE_1) - return vi_command_mode(el, 0); - - return (CC_NORM); -} - - -/* ed_delete_prev_word(): - * Delete from beginning of current word to cursor - * [M-^?] [^W] - */ -protected el_action_t -/*ARGSUSED*/ -ed_delete_prev_word(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *cp, *p, *kp; - - if (el->el_line.cursor == el->el_line.buffer) - return (CC_ERROR); - - cp = c__prev_word(el->el_line.cursor, el->el_line.buffer, - el->el_state.argument, ce__isword); - - for (p = cp, kp = el->el_chared.c_kill.buf; p < el->el_line.cursor; p++) - *kp++ = *p; - el->el_chared.c_kill.last = kp; - - c_delbefore(el, (int)(el->el_line.cursor - cp));/* delete before dot */ - el->el_line.cursor = cp; - if (el->el_line.cursor < el->el_line.buffer) - el->el_line.cursor = el->el_line.buffer; /* bounds check */ - return (CC_REFRESH); -} - - -/* ed_delete_next_char(): - * Delete character under cursor - * [^D] [x] - */ -protected el_action_t -/*ARGSUSED*/ -ed_delete_next_char(EditLine *el, Int c) -{ -#ifdef notdef /* XXX */ -#define EL el->el_line - (void) fprintf(el->el_errlfile, - "\nD(b: %x(%s) c: %x(%s) last: %x(%s) limit: %x(%s)\n", - EL.buffer, EL.buffer, EL.cursor, EL.cursor, EL.lastchar, - EL.lastchar, EL.limit, EL.limit); -#endif - if (el->el_line.cursor == el->el_line.lastchar) { - /* if I'm at the end */ - if (el->el_map.type == MAP_VI) { - if (el->el_line.cursor == el->el_line.buffer) { - /* if I'm also at the beginning */ -#ifdef KSHVI - return (CC_ERROR); -#else - /* then do an EOF */ - term_writec(el, c); - return (CC_EOF); -#endif - } else { -#ifdef KSHVI - el->el_line.cursor--; -#else - return (CC_ERROR); -#endif - } - } else { - if (el->el_line.cursor != el->el_line.buffer) - el->el_line.cursor--; - else - return (CC_ERROR); - } - } - c_delafter(el, el->el_state.argument); /* delete after dot */ - if (el->el_line.cursor >= el->el_line.lastchar && - el->el_line.cursor > el->el_line.buffer) - /* bounds check */ - el->el_line.cursor = el->el_line.lastchar - 1; - return (CC_REFRESH); -} - - -/* ed_kill_line(): - * Cut to the end of line - * [^K] [^K] - */ -protected el_action_t -/*ARGSUSED*/ -ed_kill_line(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *kp, *cp; - - cp = el->el_line.cursor; - kp = el->el_chared.c_kill.buf; - while (cp < el->el_line.lastchar) - *kp++ = *cp++; /* copy it */ - el->el_chared.c_kill.last = kp; - /* zap! -- delete to end */ - el->el_line.lastchar = el->el_line.cursor; - return (CC_REFRESH); -} - - -/* ed_move_to_end(): - * Move cursor to the end of line - * [^E] [^E] - */ -protected el_action_t -/*ARGSUSED*/ -ed_move_to_end(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_line.cursor = el->el_line.lastchar; - if (el->el_map.type == MAP_VI) { - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } -#ifdef VI_MOVE - el->el_line.cursor--; -#endif - } - return (CC_CURSOR); -} - - -/* ed_move_to_beg(): - * Move cursor to the beginning of line - * [^A] [^A] - */ -protected el_action_t -/*ARGSUSED*/ -ed_move_to_beg(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_line.cursor = el->el_line.buffer; - - if (el->el_map.type == MAP_VI) { - /* We want FIRST non space character */ - while (Isspace(*el->el_line.cursor)) - el->el_line.cursor++; - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } - } - return (CC_CURSOR); -} - - -/* ed_transpose_chars(): - * Exchange the character to the left of the cursor with the one under it - * [^T] [^T] - */ -protected el_action_t -ed_transpose_chars(EditLine *el, Int c) -{ - - if (el->el_line.cursor < el->el_line.lastchar) { - if (el->el_line.lastchar <= &el->el_line.buffer[1]) - return (CC_ERROR); - else - el->el_line.cursor++; - } - if (el->el_line.cursor > &el->el_line.buffer[1]) { - /* must have at least two chars entered */ - c = el->el_line.cursor[-2]; - el->el_line.cursor[-2] = el->el_line.cursor[-1]; - el->el_line.cursor[-1] = c; - return (CC_REFRESH); - } else - return (CC_ERROR); -} - - -/* ed_next_char(): - * Move to the right one character - * [^F] [^F] - */ -protected el_action_t -/*ARGSUSED*/ -ed_next_char(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *lim = el->el_line.lastchar; - - if (el->el_line.cursor >= lim || - (el->el_line.cursor == lim - 1 && - el->el_map.type == MAP_VI && - el->el_chared.c_vcmd.action == NOP)) - return (CC_ERROR); - - el->el_line.cursor += el->el_state.argument; - if (el->el_line.cursor > lim) - el->el_line.cursor = lim; - - if (el->el_map.type == MAP_VI) - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - - -/* ed_prev_word(): - * Move to the beginning of the current word - * [M-b] [b] - */ -protected el_action_t -/*ARGSUSED*/ -ed_prev_word(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor == el->el_line.buffer) - return (CC_ERROR); - - el->el_line.cursor = c__prev_word(el->el_line.cursor, - el->el_line.buffer, - el->el_state.argument, - ce__isword); - - if (el->el_map.type == MAP_VI) - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - - -/* ed_prev_char(): - * Move to the left one character - * [^B] [^B] - */ -protected el_action_t -/*ARGSUSED*/ -ed_prev_char(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor > el->el_line.buffer) { - el->el_line.cursor -= el->el_state.argument; - if (el->el_line.cursor < el->el_line.buffer) - el->el_line.cursor = el->el_line.buffer; - - if (el->el_map.type == MAP_VI) - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); - } else - return (CC_ERROR); -} - - -/* ed_quoted_insert(): - * Add the next character typed verbatim - * [^V] [^V] - */ -protected el_action_t -ed_quoted_insert(EditLine *el, Int c) -{ - int num; - Char tc; - - tty_quotemode(el); - num = FUN(el,getc)(el, &tc); - c = tc; - tty_noquotemode(el); - if (num == 1) - return (ed_insert(el, c)); - else - return (ed_end_of_file(el, 0)); -} - - -/* ed_digit(): - * Adds to argument or enters a digit - */ -protected el_action_t -ed_digit(EditLine *el, Int c) -{ - - if (!Isdigit(c)) - return (CC_ERROR); - - if (el->el_state.doingarg) { - /* if doing an arg, add this in... */ - if (el->el_state.lastcmd == EM_UNIVERSAL_ARGUMENT) - el->el_state.argument = c - '0'; - else { - if (el->el_state.argument > 1000000) - return (CC_ERROR); - el->el_state.argument = - (el->el_state.argument * 10) + (c - '0'); - } - return (CC_ARGHACK); - } - - return ed_insert(el, c); -} - - -/* ed_argument_digit(): - * Digit that starts argument - * For ESC-n - */ -protected el_action_t -ed_argument_digit(EditLine *el, Int c) -{ - - if (!Isdigit(c)) - return (CC_ERROR); - - if (el->el_state.doingarg) { - if (el->el_state.argument > 1000000) - return (CC_ERROR); - el->el_state.argument = (el->el_state.argument * 10) + - (c - '0'); - } else { /* else starting an argument */ - el->el_state.argument = c - '0'; - el->el_state.doingarg = 1; - } - return (CC_ARGHACK); -} - - -/* ed_unassigned(): - * Indicates unbound character - * Bound to keys that are not assigned - */ -protected el_action_t -/*ARGSUSED*/ -ed_unassigned(EditLine *el, Int c __attribute__((__unused__))) -{ - - return (CC_ERROR); -} - - -/** - ** TTY key handling. - **/ - -/* ed_tty_sigint(): - * Tty interrupt character - * [^C] - */ -protected el_action_t -/*ARGSUSED*/ -ed_tty_sigint(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) -{ - - return (CC_NORM); -} - - -/* ed_tty_dsusp(): - * Tty delayed suspend character - * [^Y] - */ -protected el_action_t -/*ARGSUSED*/ -ed_tty_dsusp(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) -{ - - return (CC_NORM); -} - - -/* ed_tty_flush_output(): - * Tty flush output characters - * [^O] - */ -protected el_action_t -/*ARGSUSED*/ -ed_tty_flush_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) -{ - - return (CC_NORM); -} - - -/* ed_tty_sigquit(): - * Tty quit character - * [^\] - */ -protected el_action_t -/*ARGSUSED*/ -ed_tty_sigquit(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) -{ - - return (CC_NORM); -} - - -/* ed_tty_sigtstp(): - * Tty suspend character - * [^Z] - */ -protected el_action_t -/*ARGSUSED*/ -ed_tty_sigtstp(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) -{ - - return (CC_NORM); -} - - -/* ed_tty_stop_output(): - * Tty disallow output characters - * [^S] - */ -protected el_action_t -/*ARGSUSED*/ -ed_tty_stop_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) -{ - - return (CC_NORM); -} - - -/* ed_tty_start_output(): - * Tty allow output characters - * [^Q] - */ -protected el_action_t -/*ARGSUSED*/ -ed_tty_start_output(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) -{ - - return (CC_NORM); -} - - -/* ed_newline(): - * Execute command - * [^J] - */ -protected el_action_t -/*ARGSUSED*/ -ed_newline(EditLine *el, Int c __attribute__((__unused__))) -{ - - re_goto_bottom(el); - *el->el_line.lastchar++ = '\n'; - *el->el_line.lastchar = '\0'; - return (CC_NEWLINE); -} - - -/* ed_delete_prev_char(): - * Delete the character to the left of the cursor - * [^?] - */ -protected el_action_t -/*ARGSUSED*/ -ed_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor <= el->el_line.buffer) - return (CC_ERROR); - - c_delbefore(el, el->el_state.argument); - el->el_line.cursor -= el->el_state.argument; - if (el->el_line.cursor < el->el_line.buffer) - el->el_line.cursor = el->el_line.buffer; - return (CC_REFRESH); -} - - -/* ed_clear_screen(): - * Clear screen leaving current line at the top - * [^L] - */ -protected el_action_t -/*ARGSUSED*/ -ed_clear_screen(EditLine *el, Int c __attribute__((__unused__))) -{ - - term_clear_screen(el); /* clear the whole real screen */ - re_clear_display(el); /* reset everything */ - return (CC_REFRESH); -} - - -/* ed_redisplay(): - * Redisplay everything - * ^R - */ -protected el_action_t -/*ARGSUSED*/ -ed_redisplay(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) -{ - - return (CC_REDISPLAY); -} - - -/* ed_start_over(): - * Erase current line and start from scratch - * [^G] - */ -protected el_action_t -/*ARGSUSED*/ -ed_start_over(EditLine *el, Int c __attribute__((__unused__))) -{ - - ch_reset(el, 0); - return (CC_REFRESH); -} - - -/* ed_sequence_lead_in(): - * First character in a bound sequence - * Placeholder for external keys - */ -protected el_action_t -/*ARGSUSED*/ -ed_sequence_lead_in(EditLine *el __attribute__((__unused__)), - Int c __attribute__((__unused__))) -{ - - return (CC_NORM); -} - - -/* ed_prev_history(): - * Move to the previous history line - * [^P] [k] - */ -protected el_action_t -/*ARGSUSED*/ -ed_prev_history(EditLine *el, Int c __attribute__((__unused__))) -{ - char beep = 0; - int sv_event = el->el_history.eventno; - - el->el_chared.c_undo.len = -1; - *el->el_line.lastchar = '\0'; /* just in case */ - - if (el->el_history.eventno == 0) { /* save the current buffer - * away */ - (void) Strncpy(el->el_history.buf, el->el_line.buffer, - EL_BUFSIZ); - el->el_history.last = el->el_history.buf + - (el->el_line.lastchar - el->el_line.buffer); - } - el->el_history.eventno += el->el_state.argument; - - if (hist_get(el) == CC_ERROR) { - if (el->el_map.type == MAP_VI) { - el->el_history.eventno = sv_event; - - } - beep = 1; - /* el->el_history.eventno was fixed by first call */ - (void) hist_get(el); - } - if (beep) - return CC_REFRESH_BEEP; - return CC_REFRESH; -} - - -/* ed_next_history(): - * Move to the next history line - * [^N] [j] - */ -protected el_action_t -/*ARGSUSED*/ -ed_next_history(EditLine *el, Int c __attribute__((__unused__))) -{ - el_action_t beep = CC_REFRESH, rval; - - el->el_chared.c_undo.len = -1; - *el->el_line.lastchar = '\0'; /* just in case */ - - el->el_history.eventno -= el->el_state.argument; - - if (el->el_history.eventno < 0) { - el->el_history.eventno = 0; - beep = CC_REFRESH_BEEP; - } - rval = hist_get(el); - if (rval == CC_REFRESH) - return beep; - return rval; - -} - - -/* ed_search_prev_history(): - * Search previous in history for a line matching the current - * next search history [M-P] [K] - */ -protected el_action_t -/*ARGSUSED*/ -ed_search_prev_history(EditLine *el, Int c __attribute__((__unused__))) -{ - const Char *hp; - int h; - bool_t found = 0; - - el->el_chared.c_vcmd.action = NOP; - el->el_chared.c_undo.len = -1; - *el->el_line.lastchar = '\0'; /* just in case */ - if (el->el_history.eventno < 0) { -#ifdef DEBUG_EDIT - (void) fprintf(el->el_errfile, - "e_prev_search_hist(): eventno < 0;\n"); -#endif - el->el_history.eventno = 0; - return (CC_ERROR); - } - if (el->el_history.eventno == 0) { - (void) Strncpy(el->el_history.buf, el->el_line.buffer, - EL_BUFSIZ); - el->el_history.last = el->el_history.buf + - (el->el_line.lastchar - el->el_line.buffer); - } - if (el->el_history.ref == NULL) - return (CC_ERROR); - - hp = HIST_FIRST(el); - if (hp == NULL) - return (CC_ERROR); - - c_setpat(el); /* Set search pattern !! */ - - for (h = 1; h <= el->el_history.eventno; h++) - hp = HIST_NEXT(el); - - while (hp != NULL) { -#ifdef SDEBUG - (void) fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp); -#endif - if ((Strncmp(hp, el->el_line.buffer, (size_t) - (el->el_line.lastchar - el->el_line.buffer)) || - hp[el->el_line.lastchar - el->el_line.buffer]) && - c_hmatch(el, hp)) { - found++; - break; - } - h++; - hp = HIST_NEXT(el); - } - - if (!found) { -#ifdef SDEBUG - (void) fprintf(el->el_errfile, "not found\n"); -#endif - return (CC_ERROR); - } - el->el_history.eventno = h; - - return (hist_get(el)); -} - - -/* ed_search_next_history(): - * Search next in history for a line matching the current - * [M-N] [J] - */ -protected el_action_t -/*ARGSUSED*/ -ed_search_next_history(EditLine *el, Int c __attribute__((__unused__))) -{ - const Char *hp; - int h; - bool_t found = 0; - - el->el_chared.c_vcmd.action = NOP; - el->el_chared.c_undo.len = -1; - *el->el_line.lastchar = '\0'; /* just in case */ - - if (el->el_history.eventno == 0) - return (CC_ERROR); - - if (el->el_history.ref == NULL) - return (CC_ERROR); - - hp = HIST_FIRST(el); - if (hp == NULL) - return (CC_ERROR); - - c_setpat(el); /* Set search pattern !! */ - - for (h = 1; h < el->el_history.eventno && hp; h++) { -#ifdef SDEBUG - (void) fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp); -#endif - if ((Strncmp(hp, el->el_line.buffer, (size_t) - (el->el_line.lastchar - el->el_line.buffer)) || - hp[el->el_line.lastchar - el->el_line.buffer]) && - c_hmatch(el, hp)) - found = h; - hp = HIST_NEXT(el); - } - - if (!found) { /* is it the current history number? */ - if (!c_hmatch(el, el->el_history.buf)) { -#ifdef SDEBUG - (void) fprintf(el->el_errfile, "not found\n"); -#endif - return (CC_ERROR); - } - } - el->el_history.eventno = found; - - return (hist_get(el)); -} - - -/* ed_prev_line(): - * Move up one line - * Could be [k] [^p] - */ -protected el_action_t -/*ARGSUSED*/ -ed_prev_line(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *ptr; - int nchars = c_hpos(el); - - /* - * Move to the line requested - */ - if (*(ptr = el->el_line.cursor) == '\n') - ptr--; - - for (; ptr >= el->el_line.buffer; ptr--) - if (*ptr == '\n' && --el->el_state.argument <= 0) - break; - - if (el->el_state.argument > 0) - return (CC_ERROR); - - /* - * Move to the beginning of the line - */ - for (ptr--; ptr >= el->el_line.buffer && *ptr != '\n'; ptr--) - continue; - - /* - * Move to the character requested - */ - for (ptr++; - nchars-- > 0 && ptr < el->el_line.lastchar && *ptr != '\n'; - ptr++) - continue; - - el->el_line.cursor = ptr; - return (CC_CURSOR); -} - - -/* ed_next_line(): - * Move down one line - * Could be [j] [^n] - */ -protected el_action_t -/*ARGSUSED*/ -ed_next_line(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *ptr; - int nchars = c_hpos(el); - - /* - * Move to the line requested - */ - for (ptr = el->el_line.cursor; ptr < el->el_line.lastchar; ptr++) - if (*ptr == '\n' && --el->el_state.argument <= 0) - break; - - if (el->el_state.argument > 0) - return (CC_ERROR); - - /* - * Move to the character requested - */ - for (ptr++; - nchars-- > 0 && ptr < el->el_line.lastchar && *ptr != '\n'; - ptr++) - continue; - - el->el_line.cursor = ptr; - return (CC_CURSOR); -} - - -/* ed_command(): - * Editline extended command - * [M-X] [:] - */ -protected el_action_t -/*ARGSUSED*/ -ed_command(EditLine *el, Int c __attribute__((__unused__))) -{ - Char tmpbuf[EL_BUFSIZ]; - int tmplen; - - tmplen = c_gets(el, tmpbuf, STR("\n: ")); - term__putc(el, '\n'); - - if (tmplen < 0 || (tmpbuf[tmplen] = 0, parse_line(el, tmpbuf)) == -1) - term_beep(el); - - el->el_map.current = el->el_map.key; - re_clear_display(el); - return CC_REFRESH; -} diff --git a/kerberosV/src/lib/libedit/src/editline/readline.h b/kerberosV/src/lib/libedit/src/editline/readline.h deleted file mode 100644 index b36d405e0ab..00000000000 --- a/kerberosV/src/lib/libedit/src/editline/readline.h +++ /dev/null @@ -1,221 +0,0 @@ -/* $NetBSD: readline.h,v 1.32 2010/09/16 20:08:52 christos Exp $ */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Jaromir Dolecek. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ -#ifndef _READLINE_H_ -#define _READLINE_H_ - -#include -#include - -/* list of readline stuff supported by editline library's readline wrapper */ - -/* typedefs */ -typedef int Function(const char *, int); -typedef void VFunction(void); -typedef void VCPFunction(char *); -typedef char *CPFunction(const char *, int); -typedef char **CPPFunction(const char *, int, int); -typedef char *rl_compentry_func_t(const char *, int); -typedef int rl_command_func_t(int, int); - -/* only supports length */ -typedef struct { - int length; -} HISTORY_STATE; - -typedef void *histdata_t; - -typedef struct _hist_entry { - const char *line; - histdata_t data; -} HIST_ENTRY; - -typedef struct _keymap_entry { - char type; -#define ISFUNC 0 -#define ISKMAP 1 -#define ISMACR 2 - Function *function; -} KEYMAP_ENTRY; - -#define KEYMAP_SIZE 256 - -typedef KEYMAP_ENTRY KEYMAP_ENTRY_ARRAY[KEYMAP_SIZE]; -typedef KEYMAP_ENTRY *Keymap; - -#define control_character_threshold 0x20 -#define control_character_bit 0x40 - -#ifndef CTRL -#include -#if !defined(__sun) && !defined(__hpux) && !defined(_AIX) -#include -#endif -#ifndef CTRL -#define CTRL(c) ((c) & 037) -#endif -#endif -#ifndef UNCTRL -#define UNCTRL(c) (((c) - 'a' + 'A')|control_character_bit) -#endif - -#define RUBOUT 0x7f -#define ABORT_CHAR CTRL('G') -#define RL_READLINE_VERSION 0x0402 -#define RL_PROMPT_START_IGNORE '\1' -#define RL_PROMPT_END_IGNORE '\2' - -/* global variables used by readline enabled applications */ -#ifdef __cplusplus -extern "C" { -#endif -extern const char *rl_library_version; -extern int rl_readline_version; -extern char *rl_readline_name; -extern FILE *rl_instream; -extern FILE *rl_outstream; -extern char *rl_line_buffer; -extern int rl_point, rl_end; -extern int history_base, history_length; -extern int max_input_history; -extern char *rl_basic_word_break_characters; -extern char *rl_completer_word_break_characters; -extern char *rl_completer_quote_characters; -extern Function *rl_completion_entry_function; -extern CPPFunction *rl_attempted_completion_function; -extern int rl_attempted_completion_over; -extern int rl_completion_type; -extern int rl_completion_query_items; -extern char *rl_special_prefixes; -extern int rl_completion_append_character; -extern int rl_inhibit_completion; -extern Function *rl_pre_input_hook; -extern Function *rl_startup_hook; -extern char *rl_terminal_name; -extern int rl_already_prompted; -extern char *rl_prompt; -/* - * The following is not implemented - */ -extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap, - emacs_meta_keymap, - emacs_ctlx_keymap; -extern int rl_filename_completion_desired; -extern int rl_ignore_completion_duplicates; -extern int (*rl_getc_function)(FILE *); -extern VFunction *rl_redisplay_function; -extern VFunction *rl_completion_display_matches_hook; -extern VFunction *rl_prep_term_function; -extern VFunction *rl_deprep_term_function; -extern int readline_echoing_p; -extern int _rl_print_completions_horizontally; - -/* supported functions */ -char *readline(const char *); -int rl_initialize(void); - -void using_history(void); -int add_history(const char *); -void clear_history(void); -void stifle_history(int); -int unstifle_history(void); -int history_is_stifled(void); -int where_history(void); -HIST_ENTRY *current_history(void); -HIST_ENTRY *history_get(int); -HIST_ENTRY *remove_history(int); -HIST_ENTRY *replace_history_entry(int, const char *, histdata_t); -int history_total_bytes(void); -int history_set_pos(int); -HIST_ENTRY *previous_history(void); -HIST_ENTRY *next_history(void); -int history_search(const char *, int); -int history_search_prefix(const char *, int); -int history_search_pos(const char *, int, int); -int read_history(const char *); -int write_history(const char *); -int history_truncate_file (const char *, int); -int history_expand(char *, char **); -char **history_tokenize(const char *); -const char *get_history_event(const char *, int *, int); -char *history_arg_extract(int, int, const char *); - -char *tilde_expand(char *); -char *filename_completion_function(const char *, int); -char *username_completion_function(const char *, int); -int rl_complete(int, int); -int rl_read_key(void); -char **completion_matches(const char *, CPFunction *); -void rl_display_match_list(char **, int, int); - -int rl_insert(int, int); -int rl_insert_text(const char *); -void rl_reset_terminal(const char *); -int rl_bind_key(int, rl_command_func_t *); -int rl_newline(int, int); -void rl_callback_read_char(void); -void rl_callback_handler_install(const char *, VCPFunction *); -void rl_callback_handler_remove(void); -void rl_redisplay(void); -int rl_get_previous_history(int, int); -void rl_prep_terminal(int); -void rl_deprep_terminal(void); -int rl_read_init_file(const char *); -int rl_parse_and_bind(const char *); -int rl_variable_bind(const char *, const char *); -void rl_stuff_char(int); -int rl_add_defun(const char *, Function *, int); -HISTORY_STATE *history_get_history_state(void); -void rl_get_screen_size(int *, int *); -void rl_set_screen_size(int, int); -char *rl_filename_completion_function (const char *, int); -int _rl_abort_internal(void); -int _rl_qsort_string_compare(char **, char **); -char **rl_completion_matches(const char *, rl_compentry_func_t *); -void rl_forced_update_display(void); -int rl_set_prompt(const char *); -int rl_on_new_line(void); - -/* - * The following are not implemented - */ -int rl_kill_text(int, int); -Keymap rl_get_keymap(void); -void rl_set_keymap(Keymap); -Keymap rl_make_bare_keymap(void); -int rl_generic_bind(int, const char *, const char *, Keymap); -int rl_bind_key_in_map(int, rl_command_func_t *, Keymap); -void rl_cleanup_after_signal(void); -void rl_free_line_state(void); -#ifdef __cplusplus -} -#endif - -#endif /* _READLINE_H_ */ diff --git a/kerberosV/src/lib/libedit/src/el.c b/kerberosV/src/lib/libedit/src/el.c deleted file mode 100644 index 168734cec6f..00000000000 --- a/kerberosV/src/lib/libedit/src/el.c +++ /dev/null @@ -1,618 +0,0 @@ -/* $NetBSD: el.c,v 1.61 2011/01/27 23:11:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94"; -#else -__RCSID("$NetBSD: el.c,v 1.61 2011/01/27 23:11:40 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -#ifndef MAXPATHLEN -#define MAXPATHLEN 4096 -#endif - -/* - * el.c: EditLine interface functions - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include "el.h" - -/* el_init(): - * Initialize editline and set default parameters. - */ -public EditLine * -el_init(const char *prog, FILE *fin, FILE *fout, FILE *ferr) -{ - EditLine *el = (EditLine *) el_malloc(sizeof(EditLine)); - - if (el == NULL) - return (NULL); - - memset(el, 0, sizeof(EditLine)); - - el->el_infile = fin; - el->el_outfile = fout; - el->el_errfile = ferr; - - el->el_infd = fileno(fin); - el->el_outfd = fileno(fout); - el->el_errfd = fileno(ferr); - - el->el_prog = Strdup(ct_decode_string(prog, &el->el_scratch)); - if (el->el_prog == NULL) { - el_free(el); - return NULL; - } - - /* - * Initialize all the modules. Order is important!!! - */ - el->el_flags = 0; -#ifdef WIDECHAR - if (setlocale(LC_CTYPE, NULL) != NULL){ - if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) - el->el_flags |= CHARSET_IS_UTF8; - } -#endif - - if (term_init(el) == -1) { - el_free(el->el_prog); - el_free(el); - return NULL; - } - (void) key_init(el); - (void) map_init(el); - if (tty_init(el) == -1) - el->el_flags |= NO_TTY; - (void) ch_init(el); - (void) search_init(el); - (void) hist_init(el); - (void) prompt_init(el); - (void) sig_init(el); - (void) read_init(el); - - return (el); -} - - -/* el_end(): - * Clean up. - */ -public void -el_end(EditLine *el) -{ - - if (el == NULL) - return; - - el_reset(el); - - term_end(el); - key_end(el); - map_end(el); - tty_end(el); - ch_end(el); - search_end(el); - hist_end(el); - prompt_end(el); - sig_end(el); - - el_free((ptr_t) el->el_prog); - el_free((ptr_t) el); -#ifdef WIDECHAR - el_free((ptr_t) el->el_scratch.cbuff); - el_free((ptr_t) el->el_scratch.wbuff); - el_free((ptr_t) el->el_lgcyconv.cbuff); - el_free((ptr_t) el->el_lgcyconv.wbuff); -#endif -} - - -/* el_reset(): - * Reset the tty and the parser - */ -public void -el_reset(EditLine *el) -{ - - tty_cookedmode(el); - ch_reset(el, 0); /* XXX: Do we want that? */ -} - - -/* el_set(): - * set the editline parameters - */ -public int -FUN(el,set)(EditLine *el, int op, ...) -{ - va_list ap; - int rv = 0; - - if (el == NULL) - return (-1); - va_start(ap, op); - - switch (op) { - case EL_PROMPT: - case EL_RPROMPT: { - el_pfunc_t p = va_arg(ap, el_pfunc_t); - - rv = prompt_set(el, p, 0, op, 1); - break; - } - - case EL_RESIZE: { - el_zfunc_t p = va_arg(ap, el_zfunc_t); - void *arg = va_arg(ap, void *); - rv = ch_resizefun(el, p, arg); - break; - } - - case EL_PROMPT_ESC: - case EL_RPROMPT_ESC: { - el_pfunc_t p = va_arg(ap, el_pfunc_t); - int c = va_arg(ap, int); - - rv = prompt_set(el, p, c, op, 1); - break; - } - - case EL_TERMINAL: - rv = term_set(el, va_arg(ap, char *)); - break; - - case EL_EDITOR: - rv = map_set_editor(el, va_arg(ap, Char *)); - break; - - case EL_SIGNAL: - if (va_arg(ap, int)) - el->el_flags |= HANDLE_SIGNALS; - else - el->el_flags &= ~HANDLE_SIGNALS; - break; - - case EL_BIND: - case EL_TELLTC: - case EL_SETTC: - case EL_ECHOTC: - case EL_SETTY: - { - const Char *argv[20]; - int i; - - for (i = 1; i < 20; i++) - if ((argv[i] = va_arg(ap, Char *)) == NULL) - break; - - switch (op) { - case EL_BIND: - argv[0] = STR("bind"); - rv = map_bind(el, i, argv); - break; - - case EL_TELLTC: - argv[0] = STR("telltc"); - rv = term_telltc(el, i, argv); - break; - - case EL_SETTC: - argv[0] = STR("settc"); - rv = term_settc(el, i, argv); - break; - - case EL_ECHOTC: - argv[0] = STR("echotc"); - rv = term_echotc(el, i, argv); - break; - - case EL_SETTY: - argv[0] = STR("setty"); - rv = tty_stty(el, i, argv); - break; - - default: - rv = -1; - EL_ABORT((el->el_errfile, "Bad op %d\n", op)); - break; - } - break; - } - - case EL_ADDFN: - { - Char *name = va_arg(ap, Char *); - Char *help = va_arg(ap, Char *); - el_func_t func = va_arg(ap, el_func_t); - - rv = map_addfunc(el, name, help, func); - break; - } - - case EL_HIST: - { - hist_fun_t func = va_arg(ap, hist_fun_t); - ptr_t ptr = va_arg(ap, ptr_t); - - rv = hist_set(el, func, ptr); - if (!(el->el_flags & CHARSET_IS_UTF8)) - el->el_flags &= ~NARROW_HISTORY; - break; - } - - case EL_EDITMODE: - if (va_arg(ap, int)) - el->el_flags &= ~EDIT_DISABLED; - else - el->el_flags |= EDIT_DISABLED; - rv = 0; - break; - - case EL_GETCFN: - { - el_rfunc_t rc = va_arg(ap, el_rfunc_t); - rv = el_read_setfn(el, rc); - el->el_flags &= ~NARROW_READ; - break; - } - - case EL_CLIENTDATA: - el->el_data = va_arg(ap, void *); - break; - - case EL_UNBUFFERED: - rv = va_arg(ap, int); - if (rv && !(el->el_flags & UNBUFFERED)) { - el->el_flags |= UNBUFFERED; - read_prepare(el); - } else if (!rv && (el->el_flags & UNBUFFERED)) { - el->el_flags &= ~UNBUFFERED; - read_finish(el); - } - rv = 0; - break; - - case EL_PREP_TERM: - rv = va_arg(ap, int); - if (rv) - (void) tty_rawmode(el); - else - (void) tty_cookedmode(el); - rv = 0; - break; - - case EL_SETFP: - { - FILE *fp; - int what; - - what = va_arg(ap, int); - fp = va_arg(ap, FILE *); - - rv = 0; - switch (what) { - case 0: - el->el_infile = fp; - el->el_infd = fileno(fp); - break; - case 1: - el->el_outfile = fp; - el->el_outfd = fileno(fp); - break; - case 2: - el->el_errfile = fp; - el->el_errfd = fileno(fp); - break; - default: - rv = -1; - break; - } - break; - } - - case EL_REFRESH: - re_clear_display(el); - re_refresh(el); - term__flush(el); - break; - - default: - rv = -1; - break; - } - - va_end(ap); - return (rv); -} - - -/* el_get(): - * retrieve the editline parameters - */ -public int -FUN(el,get)(EditLine *el, int op, ...) -{ - va_list ap; - int rv; - - if (el == NULL) - return -1; - - va_start(ap, op); - - switch (op) { - case EL_PROMPT: - case EL_RPROMPT: { - el_pfunc_t *p = va_arg(ap, el_pfunc_t *); - rv = prompt_get(el, p, 0, op); - break; - } - case EL_PROMPT_ESC: - case EL_RPROMPT_ESC: { - el_pfunc_t *p = va_arg(ap, el_pfunc_t *); - Char *c = va_arg(ap, Char *); - - rv = prompt_get(el, p, c, op); - break; - } - - case EL_EDITOR: - rv = map_get_editor(el, va_arg(ap, const Char **)); - break; - - case EL_SIGNAL: - *va_arg(ap, int *) = (el->el_flags & HANDLE_SIGNALS); - rv = 0; - break; - - case EL_EDITMODE: - *va_arg(ap, int *) = !(el->el_flags & EDIT_DISABLED); - rv = 0; - break; - - case EL_TERMINAL: - term_get(el, va_arg(ap, const char **)); - rv = 0; - break; - - case EL_GETTC: - { - static char name[] = "gettc"; - char *argv[20]; - int i; - - for (i = 1; i < (int)(sizeof(argv) / sizeof(argv[0])); i++) - if ((argv[i] = va_arg(ap, char *)) == NULL) - break; - - switch (op) { - case EL_GETTC: - argv[0] = name; - rv = term_gettc(el, i, argv); - break; - - default: - rv = -1; - EL_ABORT((el->el_errfile, "Bad op %d\n", op)); - break; - } - break; - } - - case EL_GETCFN: - *va_arg(ap, el_rfunc_t *) = el_read_getfn(el); - rv = 0; - break; - - case EL_CLIENTDATA: - *va_arg(ap, void **) = el->el_data; - rv = 0; - break; - - case EL_UNBUFFERED: - *va_arg(ap, int *) = (!(el->el_flags & UNBUFFERED)); - rv = 0; - break; - - case EL_GETFP: - { - int what; - FILE **fpp; - - what = va_arg(ap, int); - fpp = va_arg(ap, FILE **); - rv = 0; - switch (what) { - case 0: - *fpp = el->el_infile; - break; - case 1: - *fpp = el->el_outfile; - break; - case 2: - *fpp = el->el_errfile; - break; - default: - rv = -1; - break; - } - break; - } - default: - rv = -1; - break; - } - va_end(ap); - - return (rv); -} - - -/* el_line(): - * Return editing info - */ -public const TYPE(LineInfo) * -FUN(el,line)(EditLine *el) -{ - - return (const TYPE(LineInfo) *) (void *) &el->el_line; -} - - -/* el_source(): - * Source a file - */ -public int -el_source(EditLine *el, const char *fname) -{ - FILE *fp; - size_t len; - char *ptr; - char path[MAXPATHLEN]; - const Char *dptr; - - fp = NULL; - if (fname == NULL) { - static const char elpath[] = "/.editrc"; - -#ifdef HAVE_ISSETUGID - if (issetugid()) - return (-1); -#endif - if ((ptr = getenv("HOME")) == NULL) - return (-1); - if (strlcpy(path, ptr, sizeof(path)) >= sizeof(path)) - return (-1); - if (strlcat(path, elpath, sizeof(path)) >= sizeof(path)) - return (-1); - fname = path; - } - if (fp == NULL) - fp = fopen(fname, "r"); - if (fp == NULL) - return (-1); - - while ((ptr = fgetln(fp, &len)) != NULL) { - dptr = ct_decode_string(ptr, &el->el_scratch); - if (!dptr) - continue; - if (len > 0 && dptr[len - 1] == '\n') - --len; - - /* loop until first non-space char or EOL */ - while (*dptr != '\0' && Isspace(*dptr)) - dptr++; - if (*dptr == '#') - continue; /* ignore, this is a comment line */ - if (parse_line(el, dptr) == -1) { - (void) fclose(fp); - return (-1); - } - } - - (void) fclose(fp); - return (0); -} - - -/* el_resize(): - * Called from program when terminal is resized - */ -public void -el_resize(EditLine *el) -{ - int lins, cols; - sigset_t oset, nset; - - (void) sigemptyset(&nset); - (void) sigaddset(&nset, SIGWINCH); - (void) sigprocmask(SIG_BLOCK, &nset, &oset); - - /* get the correct window size */ - if (term_get_size(el, &lins, &cols)) - term_change_size(el, lins, cols); - - (void) sigprocmask(SIG_SETMASK, &oset, NULL); -} - - -/* el_beep(): - * Called from the program to beep - */ -public void -el_beep(EditLine *el) -{ - - term_beep(el); -} - - -/* el_editmode() - * Set the state of EDIT_DISABLED from the `edit' command. - */ -protected int -/*ARGSUSED*/ -el_editmode(EditLine *el, int argc, const Char **argv) -{ - const Char *how; - - if (argv == NULL || argc != 2 || argv[1] == NULL) - return (-1); - - how = argv[1]; - if (Strcmp(how, STR("on")) == 0) { - el->el_flags &= ~EDIT_DISABLED; - tty_rawmode(el); - } else if (Strcmp(how, STR("off")) == 0) { - tty_cookedmode(el); - el->el_flags |= EDIT_DISABLED; - } - else { - (void) fprintf(el->el_errfile, "edit: Bad value `" FSTR "'.\n", - how); - return (-1); - } - return (0); -} diff --git a/kerberosV/src/lib/libedit/src/el.h b/kerberosV/src/lib/libedit/src/el.h deleted file mode 100644 index da07b3061a3..00000000000 --- a/kerberosV/src/lib/libedit/src/el.h +++ /dev/null @@ -1,163 +0,0 @@ -/* $NetBSD: el.h,v 1.22 2011/01/27 23:11:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)el.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.h: Internal structures. - */ -#ifndef _h_el -#define _h_el -/* - * Local defaults - */ -#define KSHVI -#define VIDEFAULT -#define ANCHOR - -#include "histedit.h" -#include "chartype.h" -#include -#include - -#define EL_BUFSIZ 1024 /* Maximum line size */ - -#define HANDLE_SIGNALS 0x01 -#define NO_TTY 0x02 -#define EDIT_DISABLED 0x04 -#define UNBUFFERED 0x08 -#define CHARSET_IS_UTF8 0x10 -#define IGNORE_EXTCHARS 0x20 /* Ignore characters read > 0xff */ -#define NARROW_HISTORY 0x40 -#define NARROW_READ 0x80 - -typedef int bool_t; /* True or not */ - -typedef unsigned char el_action_t; /* Index to command array */ - -typedef struct coord_t { /* Position on the screen */ - int h; - int v; -} coord_t; - -typedef struct el_line_t { - Char *buffer; /* Input line */ - Char *cursor; /* Cursor position */ - Char *lastchar; /* Last character */ - const Char *limit; /* Max position */ -} el_line_t; - -/* - * Editor state - */ -typedef struct el_state_t { - int inputmode; /* What mode are we in? */ - int doingarg; /* Are we getting an argument? */ - int argument; /* Numeric argument */ - int metanext; /* Is the next char a meta char */ - el_action_t lastcmd; /* Previous command */ - el_action_t thiscmd; /* this command */ - Char thisch; /* char that generated it */ -} el_state_t; - -/* - * Until we come up with something better... - */ -#define el_malloc(a) malloc(a) -#define el_realloc(a,b) realloc(a, b) -#define el_free(a) free(a) - -#include "tty.h" -#include "prompt.h" -#include "key.h" -#include "el_term.h" -#include "refresh.h" -#include "chared.h" -#include "common.h" -#include "search.h" -#include "hist.h" -#include "map.h" -#include "parse.h" -#include "sig.h" -#include "help.h" -#include "read.h" - -struct editline { - Char *el_prog; /* the program name */ - FILE *el_infile; /* Stdio stuff */ - FILE *el_outfile; /* Stdio stuff */ - FILE *el_errfile; /* Stdio stuff */ - int el_infd; /* Input file descriptor */ - int el_outfd; /* Output file descriptor */ - int el_errfd; /* Error file descriptor */ - int el_flags; /* Various flags. */ - int el_errno; /* Local copy of errno */ - coord_t el_cursor; /* Cursor location */ - Char **el_display; /* Real screen image = what is there */ - Char **el_vdisplay; /* Virtual screen image = what we see */ - void *el_data; /* Client data */ - el_line_t el_line; /* The current line information */ - el_state_t el_state; /* Current editor state */ - el_term_t el_term; /* Terminal dependent stuff */ - el_tty_t el_tty; /* Tty dependent stuff */ - el_refresh_t el_refresh; /* Refresh stuff */ - el_prompt_t el_prompt; /* Prompt stuff */ - el_prompt_t el_rprompt; /* Prompt stuff */ - el_chared_t el_chared; /* Characted editor stuff */ - el_map_t el_map; /* Key mapping stuff */ - el_key_t el_key; /* Key binding stuff */ - el_history_t el_history; /* History stuff */ - el_search_t el_search; /* Search stuff */ - el_signal_t el_signal; /* Signal handling stuff */ - el_read_t el_read; /* Character reading stuff */ -#ifdef WIDECHAR - ct_buffer_t el_scratch; /* Scratch conversion buffer */ - ct_buffer_t el_lgcyconv; /* Buffer for legacy wrappers */ - LineInfo el_lgcylinfo; /* Legacy LineInfo buffer */ -#endif -}; - -protected int el_editmode(EditLine *, int, const Char **); - -#ifdef DEBUG -#define EL_ABORT(a) do { \ - fprintf(el->el_errfile, "%s, %d: ", \ - __FILE__, __LINE__); \ - fprintf a; \ - abort(); \ - } while( /*CONSTCOND*/0); -#else -#define EL_ABORT(a) abort() -#endif -#endif /* _h_el */ diff --git a/kerberosV/src/lib/libedit/src/el_term.h b/kerberosV/src/lib/libedit/src/el_term.h deleted file mode 100644 index c8572075f52..00000000000 --- a/kerberosV/src/lib/libedit/src/el_term.h +++ /dev/null @@ -1,134 +0,0 @@ -/* $NetBSD: term.h,v 1.21 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)term.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.term.h: Termcap header - */ -#ifndef _h_el_term -#define _h_el_term - -#include "histedit.h" - -typedef struct { /* Symbolic function key bindings */ - const Char *name; /* name of the key */ - int key; /* Index in termcap table */ - key_value_t fun; /* Function bound to it */ - int type; /* Type of function */ -} fkey_t; - -typedef struct { - const char *t_name; /* the terminal name */ - coord_t t_size; /* # lines and cols */ - int t_flags; -#define TERM_CAN_INSERT 0x001 /* Has insert cap */ -#define TERM_CAN_DELETE 0x002 /* Has delete cap */ -#define TERM_CAN_CEOL 0x004 /* Has CEOL cap */ -#define TERM_CAN_TAB 0x008 /* Can use tabs */ -#define TERM_CAN_ME 0x010 /* Can turn all attrs. */ -#define TERM_CAN_UP 0x020 /* Can move up */ -#define TERM_HAS_META 0x040 /* Has a meta key */ -#define TERM_HAS_AUTO_MARGINS 0x080 /* Has auto margins */ -#define TERM_HAS_MAGIC_MARGINS 0x100 /* Has magic margins */ - char *t_buf; /* Termcap buffer */ - int t_loc; /* location used */ - char **t_str; /* termcap strings */ - int *t_val; /* termcap values */ - char *t_cap; /* Termcap buffer */ - fkey_t *t_fkey; /* Array of keys */ -} el_term_t; - -/* - * fKey indexes - */ -#define A_K_DN 0 -#define A_K_UP 1 -#define A_K_LT 2 -#define A_K_RT 3 -#define A_K_HO 4 -#define A_K_EN 5 -#define A_K_NKEYS 6 - -#ifdef __sun -extern int tgetent(char *, const char *); -extern int tgetflag(char *); -extern int tgetnum(char *); -extern int tputs(const char *, int, int (*)(int)); -extern char* tgoto(const char*, int, int); -extern char* tgetstr(char*, char**); -#endif - -protected void term_move_to_line(EditLine *, int); -protected void term_move_to_char(EditLine *, int); -protected void term_clear_EOL(EditLine *, int); -protected void term_overwrite(EditLine *, const Char *, size_t); -protected void term_insertwrite(EditLine *, Char *, int); -protected void term_deletechars(EditLine *, int); -protected void term_clear_screen(EditLine *); -protected void term_beep(EditLine *); -protected int term_change_size(EditLine *, int, int); -protected int term_get_size(EditLine *, int *, int *); -protected int term_init(EditLine *); -protected void term_bind_arrow(EditLine *); -protected void term_print_arrow(EditLine *, const Char *); -protected int term_clear_arrow(EditLine *, const Char *); -protected int term_set_arrow(EditLine *, const Char *, key_value_t *, int); -protected void term_end(EditLine *); -protected void term_get(EditLine *, const char **); -protected int term_set(EditLine *, const char *); -protected int term_settc(EditLine *, int, const Char **); -protected int term_gettc(EditLine *, int, char **); -protected int term_telltc(EditLine *, int, const Char **); -protected int term_echotc(EditLine *, int, const Char **); -protected void term_writec(EditLine *, Int); -protected int term__putc(EditLine *, Int); -protected void term__flush(EditLine *); - -/* - * Easy access macros - */ -#define EL_FLAGS (el)->el_term.t_flags - -#define EL_CAN_INSERT (EL_FLAGS & TERM_CAN_INSERT) -#define EL_CAN_DELETE (EL_FLAGS & TERM_CAN_DELETE) -#define EL_CAN_CEOL (EL_FLAGS & TERM_CAN_CEOL) -#define EL_CAN_TAB (EL_FLAGS & TERM_CAN_TAB) -#define EL_CAN_ME (EL_FLAGS & TERM_CAN_ME) -#define EL_CAN_UP (EL_FLAGS & TERM_CAN_UP) -#define EL_HAS_META (EL_FLAGS & TERM_HAS_META) -#define EL_HAS_AUTO_MARGINS (EL_FLAGS & TERM_HAS_AUTO_MARGINS) -#define EL_HAS_MAGIC_MARGINS (EL_FLAGS & TERM_HAS_MAGIC_MARGINS) - -#endif /* _h_el_term */ diff --git a/kerberosV/src/lib/libedit/src/eln.c b/kerberosV/src/lib/libedit/src/eln.c deleted file mode 100644 index 04e992fbad2..00000000000 --- a/kerberosV/src/lib/libedit/src/eln.c +++ /dev/null @@ -1,371 +0,0 @@ -/* $NetBSD: eln.c,v 1.9 2010/11/04 13:53:12 christos Exp $ */ - -/*- - * Copyright (c) 2009 The NetBSD Foundation, Inc. - * 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 NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 "config.h" -#if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: eln.c,v 1.9 2010/11/04 13:53:12 christos Exp $"); -#endif /* not lint && not SCCSID */ - -#include "histedit.h" -#include "el.h" -#include "read.h" -#include -#include -#include - -public int -el_getc(EditLine *el, char *cp) -{ - int num_read; - wchar_t wc = 0; - - if (!(el->el_flags & CHARSET_IS_UTF8)) - el->el_flags |= IGNORE_EXTCHARS; - num_read = el_wgetc (el, &wc); - if (!(el->el_flags & CHARSET_IS_UTF8)) - el->el_flags &= ~IGNORE_EXTCHARS; - - if (num_read > 0) - *cp = (unsigned char)wc; - return num_read; -} - - -public void -el_push(EditLine *el, const char *str) -{ - /* Using multibyte->wide string decoding works fine under single-byte - * character sets too, and Does The Right Thing. */ - el_wpush(el, ct_decode_string(str, &el->el_lgcyconv)); -} - - -public const char * -el_gets(EditLine *el, int *nread) -{ - const wchar_t *tmp; - - el->el_flags |= IGNORE_EXTCHARS; - tmp = el_wgets(el, nread); - el->el_flags &= ~IGNORE_EXTCHARS; - return ct_encode_string(tmp, &el->el_lgcyconv); -} - - -public int -el_parse(EditLine *el, int argc, const char *argv[]) -{ - int ret; - const wchar_t **wargv; - - wargv = (const wchar_t **) - ct_decode_argv(argc, argv, &el->el_lgcyconv); - if (!wargv) - return -1; - ret = el_wparse(el, argc, wargv); - ct_free_argv(wargv); - - return ret; -} - - -public int -el_set(EditLine *el, int op, ...) -{ - va_list ap; - int ret; - - if (!el) - return -1; - va_start(ap, op); - - switch (op) { - case EL_PROMPT: /* el_pfunc_t */ - case EL_RPROMPT: { - el_pfunc_t p = va_arg(ap, el_pfunc_t); - ret = prompt_set(el, p, 0, op, 0); - break; - } - - case EL_RESIZE: { - el_zfunc_t p = va_arg(ap, el_zfunc_t); - void *arg = va_arg(ap, void *); - ret = ch_resizefun(el, p, arg); - break; - } - - case EL_TERMINAL: /* const char * */ - ret = el_wset(el, op, va_arg(ap, char *)); - break; - - case EL_EDITOR: /* const wchar_t * */ - ret = el_wset(el, op, ct_decode_string(va_arg(ap, char *), - &el->el_lgcyconv)); - break; - - case EL_SIGNAL: /* int */ - case EL_EDITMODE: - case EL_UNBUFFERED: - case EL_PREP_TERM: - ret = el_wset(el, op, va_arg(ap, int)); - break; - - case EL_BIND: /* const char * list -> const wchar_t * list */ - case EL_TELLTC: - case EL_SETTC: - case EL_ECHOTC: - case EL_SETTY: { - const char *argv[20]; - int i; - const wchar_t **wargv; - for (i = 1; i < (int)__arraycount(argv); ++i) - if ((argv[i] = va_arg(ap, char *)) == NULL) - break; - argv[0] = NULL; - wargv = (const wchar_t **) - ct_decode_argv(i, argv, &el->el_lgcyconv); - if (!wargv) { - ret = -1; - goto out; - } - /* - * AFAIK we can't portably pass through our new wargv to - * el_wset(), so we have to reimplement the body of - * el_wset() for these ops. - */ - switch (op) { - case EL_BIND: - wargv[0] = STR("bind"); - ret = map_bind(el, i, wargv); - break; - case EL_TELLTC: - wargv[0] = STR("telltc"); - ret = term_telltc(el, i, wargv); - break; - case EL_SETTC: - wargv[0] = STR("settc"); - ret = term_settc(el, i, wargv); - break; - case EL_ECHOTC: - wargv[0] = STR("echotc"); - ret = term_echotc(el, i, wargv); - break; - case EL_SETTY: - wargv[0] = STR("setty"); - ret = tty_stty(el, i, wargv); - break; - default: - ret = -1; - } - ct_free_argv(wargv); - break; - } - - /* XXX: do we need to change el_func_t too? */ - case EL_ADDFN: { /* const char *, const char *, el_func_t */ - const char *args[2]; - el_func_t func; - wchar_t **wargv; - - args[0] = va_arg(ap, const char *); - args[1] = va_arg(ap, const char *); - func = va_arg(ap, el_func_t); - - wargv = ct_decode_argv(2, args, &el->el_lgcyconv); - if (!wargv) { - ret = -1; - goto out; - } - // XXX: The two strdup's leak - ret = map_addfunc(el, Strdup(wargv[0]), Strdup(wargv[1]), - func); - ct_free_argv(wargv); - break; - } - case EL_HIST: { /* hist_fun_t, const char * */ - hist_fun_t fun = va_arg(ap, hist_fun_t); - ptr_t ptr = va_arg(ap, ptr_t); - ret = hist_set(el, fun, ptr); - el->el_flags |= NARROW_HISTORY; - break; - } - /* XXX: do we need to change el_rfunc_t? */ - case EL_GETCFN: /* el_rfunc_t */ - ret = el_wset(el, op, va_arg(ap, el_rfunc_t)); - el->el_flags |= NARROW_READ; - break; - case EL_CLIENTDATA: /* void * */ - ret = el_wset(el, op, va_arg(ap, void *)); - break; - case EL_SETFP: { /* int, FILE * */ - int what = va_arg(ap, int); - FILE *fp = va_arg(ap, FILE *); - ret = el_wset(el, op, what, fp); - break; - } - case EL_PROMPT_ESC: /* el_pfunc_t, char */ - case EL_RPROMPT_ESC: { - el_pfunc_t p = va_arg(ap, el_pfunc_t); - char c = va_arg(ap, int); - ret = prompt_set(el, p, c, op, 0); - break; - } - default: - ret = -1; - break; - } - -out: - va_end(ap); - return ret; -} - - -public int -el_get(EditLine *el, int op, ...) -{ - va_list ap; - int ret; - - if (!el) - return -1; - - va_start(ap, op); - - switch (op) { - case EL_PROMPT: /* el_pfunc_t * */ - case EL_RPROMPT: { - el_pfunc_t *p = va_arg(ap, el_pfunc_t *); - ret = prompt_get(el, p, 0, op); - break; - } - - case EL_PROMPT_ESC: /* el_pfunc_t *, char **/ - case EL_RPROMPT_ESC: { - el_pfunc_t *p = va_arg(ap, el_pfunc_t *); - char *c = va_arg(ap, char *); - wchar_t wc; - ret = prompt_get(el, p, &wc, op); - *c = (unsigned char)wc; - break; - } - - case EL_EDITOR: { - const char **p = va_arg(ap, const char **); - const wchar_t *pw; - ret = el_wget(el, op, &pw); - *p = ct_encode_string(pw, &el->el_lgcyconv); - if (!el->el_lgcyconv.csize) - ret = -1; - break; - } - - case EL_TERMINAL: /* const char ** */ - ret = el_wget(el, op, va_arg(ap, const char **)); - break; - - case EL_SIGNAL: /* int * */ - case EL_EDITMODE: - case EL_UNBUFFERED: - case EL_PREP_TERM: - ret = el_wget(el, op, va_arg(ap, int *)); - break; - - case EL_GETTC: { - char *argv[20]; - static char gettc[] = "gettc"; - int i; - for (i = 1; i < (int)__arraycount(argv); ++i) - if ((argv[i] = va_arg(ap, char *)) == NULL) - break; - argv[0] = gettc; - ret = term_gettc(el, i, argv); - break; - } - - /* XXX: do we need to change el_rfunc_t? */ - case EL_GETCFN: /* el_rfunc_t */ - ret = el_wget(el, op, va_arg(ap, el_rfunc_t *)); - break; - - case EL_CLIENTDATA: /* void ** */ - ret = el_wget(el, op, va_arg(ap, void **)); - break; - - case EL_GETFP: { /* int, FILE ** */ - int what = va_arg(ap, int); - FILE **fpp = va_arg(ap, FILE **); - ret = el_wget(el, op, what, fpp); - break; - } - - default: - ret = -1; - break; - } - - va_end(ap); - return ret; -} - - -const LineInfo * -el_line(EditLine *el) -{ - const LineInfoW *winfo = el_wline(el); - LineInfo *info = &el->el_lgcylinfo; - size_t offset; - const Char *p; - - info->buffer = ct_encode_string(winfo->buffer, &el->el_lgcyconv); - - offset = 0; - for (p = winfo->buffer; p < winfo->cursor; p++) - offset += ct_enc_width(*p); - info->cursor = info->buffer + offset; - - offset = 0; - for (p = winfo->buffer; p < winfo->lastchar; p++) - offset += ct_enc_width(*p); - info->lastchar = info->buffer + offset; - - return info; -} - - -int -el_insertstr(EditLine *el, const char *str) -{ - return el_winsertstr(el, ct_decode_string(str, &el->el_lgcyconv)); -} diff --git a/kerberosV/src/lib/libedit/src/emacs.c b/kerberosV/src/lib/libedit/src/emacs.c deleted file mode 100644 index 8fb6f4b50ae..00000000000 --- a/kerberosV/src/lib/libedit/src/emacs.c +++ /dev/null @@ -1,508 +0,0 @@ -/* $NetBSD: emacs.c,v 1.23 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)emacs.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: emacs.c,v 1.23 2009/12/30 22:37:40 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * emacs.c: Emacs functions - */ -#include "el.h" - -/* em_delete_or_list(): - * Delete character under cursor or list completions if at end of line - * [^D] - */ -protected el_action_t -/*ARGSUSED*/ -em_delete_or_list(EditLine *el, Int c) -{ - - if (el->el_line.cursor == el->el_line.lastchar) { - /* if I'm at the end */ - if (el->el_line.cursor == el->el_line.buffer) { - /* and the beginning */ - term_writec(el, c); /* then do an EOF */ - return (CC_EOF); - } else { - /* - * Here we could list completions, but it is an - * error right now - */ - term_beep(el); - return (CC_ERROR); - } - } else { - if (el->el_state.doingarg) - c_delafter(el, el->el_state.argument); - else - c_delafter1(el); - if (el->el_line.cursor > el->el_line.lastchar) - el->el_line.cursor = el->el_line.lastchar; - /* bounds check */ - return (CC_REFRESH); - } -} - - -/* em_delete_next_word(): - * Cut from cursor to end of current word - * [M-d] - */ -protected el_action_t -/*ARGSUSED*/ -em_delete_next_word(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *cp, *p, *kp; - - if (el->el_line.cursor == el->el_line.lastchar) - return (CC_ERROR); - - cp = c__next_word(el->el_line.cursor, el->el_line.lastchar, - el->el_state.argument, ce__isword); - - for (p = el->el_line.cursor, kp = el->el_chared.c_kill.buf; p < cp; p++) - /* save the text */ - *kp++ = *p; - el->el_chared.c_kill.last = kp; - - c_delafter(el, (int)(cp - el->el_line.cursor)); /* delete after dot */ - if (el->el_line.cursor > el->el_line.lastchar) - el->el_line.cursor = el->el_line.lastchar; - /* bounds check */ - return (CC_REFRESH); -} - - -/* em_yank(): - * Paste cut buffer at cursor position - * [^Y] - */ -protected el_action_t -/*ARGSUSED*/ -em_yank(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *kp, *cp; - - if (el->el_chared.c_kill.last == el->el_chared.c_kill.buf) - return (CC_NORM); - - if (el->el_line.lastchar + - (el->el_chared.c_kill.last - el->el_chared.c_kill.buf) >= - el->el_line.limit) - return (CC_ERROR); - - el->el_chared.c_kill.mark = el->el_line.cursor; - cp = el->el_line.cursor; - - /* open the space, */ - c_insert(el, - (int)(el->el_chared.c_kill.last - el->el_chared.c_kill.buf)); - /* copy the chars */ - for (kp = el->el_chared.c_kill.buf; kp < el->el_chared.c_kill.last; kp++) - *cp++ = *kp; - - /* if an arg, cursor at beginning else cursor at end */ - if (el->el_state.argument == 1) - el->el_line.cursor = cp; - - return (CC_REFRESH); -} - - -/* em_kill_line(): - * Cut the entire line and save in cut buffer - * [^U] - */ -protected el_action_t -/*ARGSUSED*/ -em_kill_line(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *kp, *cp; - - cp = el->el_line.buffer; - kp = el->el_chared.c_kill.buf; - while (cp < el->el_line.lastchar) - *kp++ = *cp++; /* copy it */ - el->el_chared.c_kill.last = kp; - /* zap! -- delete all of it */ - el->el_line.lastchar = el->el_line.buffer; - el->el_line.cursor = el->el_line.buffer; - return (CC_REFRESH); -} - - -/* em_kill_region(): - * Cut area between mark and cursor and save in cut buffer - * [^W] - */ -protected el_action_t -/*ARGSUSED*/ -em_kill_region(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *kp, *cp; - - if (!el->el_chared.c_kill.mark) - return (CC_ERROR); - - if (el->el_chared.c_kill.mark > el->el_line.cursor) { - cp = el->el_line.cursor; - kp = el->el_chared.c_kill.buf; - while (cp < el->el_chared.c_kill.mark) - *kp++ = *cp++; /* copy it */ - el->el_chared.c_kill.last = kp; - c_delafter(el, (int)(cp - el->el_line.cursor)); - } else { /* mark is before cursor */ - cp = el->el_chared.c_kill.mark; - kp = el->el_chared.c_kill.buf; - while (cp < el->el_line.cursor) - *kp++ = *cp++; /* copy it */ - el->el_chared.c_kill.last = kp; - c_delbefore(el, (int)(cp - el->el_chared.c_kill.mark)); - el->el_line.cursor = el->el_chared.c_kill.mark; - } - return (CC_REFRESH); -} - - -/* em_copy_region(): - * Copy area between mark and cursor to cut buffer - * [M-W] - */ -protected el_action_t -/*ARGSUSED*/ -em_copy_region(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *kp, *cp; - - if (!el->el_chared.c_kill.mark) - return (CC_ERROR); - - if (el->el_chared.c_kill.mark > el->el_line.cursor) { - cp = el->el_line.cursor; - kp = el->el_chared.c_kill.buf; - while (cp < el->el_chared.c_kill.mark) - *kp++ = *cp++; /* copy it */ - el->el_chared.c_kill.last = kp; - } else { - cp = el->el_chared.c_kill.mark; - kp = el->el_chared.c_kill.buf; - while (cp < el->el_line.cursor) - *kp++ = *cp++; /* copy it */ - el->el_chared.c_kill.last = kp; - } - return (CC_NORM); -} - - -/* em_gosmacs_transpose(): - * Exchange the two characters before the cursor - * Gosling emacs transpose chars [^T] - */ -protected el_action_t -em_gosmacs_transpose(EditLine *el, Int c) -{ - - if (el->el_line.cursor > &el->el_line.buffer[1]) { - /* must have at least two chars entered */ - c = el->el_line.cursor[-2]; - el->el_line.cursor[-2] = el->el_line.cursor[-1]; - el->el_line.cursor[-1] = c; - return (CC_REFRESH); - } else - return (CC_ERROR); -} - - -/* em_next_word(): - * Move next to end of current word - * [M-f] - */ -protected el_action_t -/*ARGSUSED*/ -em_next_word(EditLine *el, Int c __attribute__((__unused__))) -{ - if (el->el_line.cursor == el->el_line.lastchar) - return (CC_ERROR); - - el->el_line.cursor = c__next_word(el->el_line.cursor, - el->el_line.lastchar, - el->el_state.argument, - ce__isword); - - if (el->el_map.type == MAP_VI) - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - - -/* em_upper_case(): - * Uppercase the characters from cursor to end of current word - * [M-u] - */ -protected el_action_t -/*ARGSUSED*/ -em_upper_case(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *cp, *ep; - - ep = c__next_word(el->el_line.cursor, el->el_line.lastchar, - el->el_state.argument, ce__isword); - - for (cp = el->el_line.cursor; cp < ep; cp++) - if (Islower(*cp)) - *cp = Toupper(*cp); - - el->el_line.cursor = ep; - if (el->el_line.cursor > el->el_line.lastchar) - el->el_line.cursor = el->el_line.lastchar; - return (CC_REFRESH); -} - - -/* em_capitol_case(): - * Capitalize the characters from cursor to end of current word - * [M-c] - */ -protected el_action_t -/*ARGSUSED*/ -em_capitol_case(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *cp, *ep; - - ep = c__next_word(el->el_line.cursor, el->el_line.lastchar, - el->el_state.argument, ce__isword); - - for (cp = el->el_line.cursor; cp < ep; cp++) { - if (Isalpha(*cp)) { - if (Islower(*cp)) - *cp = Toupper(*cp); - cp++; - break; - } - } - for (; cp < ep; cp++) - if (Isupper(*cp)) - *cp = Tolower(*cp); - - el->el_line.cursor = ep; - if (el->el_line.cursor > el->el_line.lastchar) - el->el_line.cursor = el->el_line.lastchar; - return (CC_REFRESH); -} - - -/* em_lower_case(): - * Lowercase the characters from cursor to end of current word - * [M-l] - */ -protected el_action_t -/*ARGSUSED*/ -em_lower_case(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *cp, *ep; - - ep = c__next_word(el->el_line.cursor, el->el_line.lastchar, - el->el_state.argument, ce__isword); - - for (cp = el->el_line.cursor; cp < ep; cp++) - if (Isupper(*cp)) - *cp = Tolower(*cp); - - el->el_line.cursor = ep; - if (el->el_line.cursor > el->el_line.lastchar) - el->el_line.cursor = el->el_line.lastchar; - return (CC_REFRESH); -} - - -/* em_set_mark(): - * Set the mark at cursor - * [^@] - */ -protected el_action_t -/*ARGSUSED*/ -em_set_mark(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_chared.c_kill.mark = el->el_line.cursor; - return (CC_NORM); -} - - -/* em_exchange_mark(): - * Exchange the cursor and mark - * [^X^X] - */ -protected el_action_t -/*ARGSUSED*/ -em_exchange_mark(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *cp; - - cp = el->el_line.cursor; - el->el_line.cursor = el->el_chared.c_kill.mark; - el->el_chared.c_kill.mark = cp; - return (CC_CURSOR); -} - - -/* em_universal_argument(): - * Universal argument (argument times 4) - * [^U] - */ -protected el_action_t -/*ARGSUSED*/ -em_universal_argument(EditLine *el, Int c __attribute__((__unused__))) -{ /* multiply current argument by 4 */ - - if (el->el_state.argument > 1000000) - return (CC_ERROR); - el->el_state.doingarg = 1; - el->el_state.argument *= 4; - return (CC_ARGHACK); -} - - -/* em_meta_next(): - * Add 8th bit to next character typed - * [] - */ -protected el_action_t -/*ARGSUSED*/ -em_meta_next(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_state.metanext = 1; - return (CC_ARGHACK); -} - - -/* em_toggle_overwrite(): - * Switch from insert to overwrite mode or vice versa - */ -protected el_action_t -/*ARGSUSED*/ -em_toggle_overwrite(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_state.inputmode = (el->el_state.inputmode == MODE_INSERT) ? - MODE_REPLACE : MODE_INSERT; - return (CC_NORM); -} - - -/* em_copy_prev_word(): - * Copy current word to cursor - */ -protected el_action_t -/*ARGSUSED*/ -em_copy_prev_word(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *cp, *oldc, *dp; - - if (el->el_line.cursor == el->el_line.buffer) - return (CC_ERROR); - - oldc = el->el_line.cursor; - /* does a bounds check */ - cp = c__prev_word(el->el_line.cursor, el->el_line.buffer, - el->el_state.argument, ce__isword); - - c_insert(el, (int)(oldc - cp)); - for (dp = oldc; cp < oldc && dp < el->el_line.lastchar; cp++) - *dp++ = *cp; - - el->el_line.cursor = dp;/* put cursor at end */ - - return (CC_REFRESH); -} - - -/* em_inc_search_next(): - * Emacs incremental next search - */ -protected el_action_t -/*ARGSUSED*/ -em_inc_search_next(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_search.patlen = 0; - return (ce_inc_search(el, ED_SEARCH_NEXT_HISTORY)); -} - - -/* em_inc_search_prev(): - * Emacs incremental reverse search - */ -protected el_action_t -/*ARGSUSED*/ -em_inc_search_prev(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_search.patlen = 0; - return (ce_inc_search(el, ED_SEARCH_PREV_HISTORY)); -} - - -/* em_delete_prev_char(): - * Delete the character to the left of the cursor - * [^?] - */ -protected el_action_t -/*ARGSUSED*/ -em_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor <= el->el_line.buffer) - return (CC_ERROR); - - if (el->el_state.doingarg) - c_delbefore(el, el->el_state.argument); - else - c_delbefore1(el); - el->el_line.cursor -= el->el_state.argument; - if (el->el_line.cursor < el->el_line.buffer) - el->el_line.cursor = el->el_line.buffer; - return (CC_REFRESH); -} diff --git a/kerberosV/src/lib/libedit/src/fgetln.c b/kerberosV/src/lib/libedit/src/fgetln.c deleted file mode 100644 index 6c4f320c12c..00000000000 --- a/kerberosV/src/lib/libedit/src/fgetln.c +++ /dev/null @@ -1,107 +0,0 @@ -/* $NetBSD: fgetln.c,v 1.9 2008/04/29 06:53:03 martin Exp $ */ - -/*- - * Copyright (c) 1998 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Christos Zoulas. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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_NBTOOL_CONFIG_H -#include "nbtool_config.h" -#endif - -#if !HAVE_FGETLN -#include "config.h" -#include -#ifndef HAVE_NBTOOL_CONFIG_H -/* These headers are required, but included from nbtool_config.h */ -#include -#include -#include -#include -#endif - -char * -fgetln(FILE *fp, size_t *len) -{ - static char *buf = NULL; - static size_t bufsiz = 0; - char *ptr; - - - if (buf == NULL) { - bufsiz = BUFSIZ; - if ((buf = malloc(bufsiz)) == NULL) - return NULL; - } - - if (fgets(buf, bufsiz, fp) == NULL) - return NULL; - - *len = 0; - while ((ptr = strchr(&buf[*len], '\n')) == NULL) { - size_t nbufsiz = bufsiz + BUFSIZ; - char *nbuf = realloc(buf, nbufsiz); - - if (nbuf == NULL) { - int oerrno = errno; - free(buf); - errno = oerrno; - buf = NULL; - return NULL; - } else - buf = nbuf; - - if (fgets(&buf[bufsiz], BUFSIZ, fp) == NULL) { - buf[bufsiz] = '\0'; - *len = strlen(buf); - return buf; - } - - *len = bufsiz; - bufsiz = nbufsiz; - } - - *len = (ptr - buf) + 1; - return buf; -} - -#endif - -#ifdef TEST -int -main(int argc, char *argv[]) -{ - char *p; - size_t len; - - while ((p = fgetln(stdin, &len)) != NULL) { - (void)printf("%zu %s", len, p); - free(p); - } - return 0; -} -#endif diff --git a/kerberosV/src/lib/libedit/src/filecomplete.c b/kerberosV/src/lib/libedit/src/filecomplete.c deleted file mode 100644 index 1dcf75bd992..00000000000 --- a/kerberosV/src/lib/libedit/src/filecomplete.c +++ /dev/null @@ -1,589 +0,0 @@ -/* $NetBSD: filecomplete.c,v 1.23 2010/12/06 00:05:38 dholland Exp $ */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Jaromir Dolecek. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -/* AIX requires this to be the first thing in the file. */ -#if defined (_AIX) && !defined (__GNUC__) - #pragma alloca -#endif - -#include "config.h" - -#ifdef __GNUC__ -# undef alloca -# define alloca(n) __builtin_alloca (n) -#else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifndef _AIX -extern char *alloca (); -# endif -# endif -#endif - -#if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: filecomplete.c,v 1.23 2010/12/06 00:05:38 dholland Exp $"); -#endif /* not lint && not SCCSID */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "el.h" -#include "fcns.h" /* for EL_NUM_FCNS */ -#include "histedit.h" -#include "filecomplete.h" - -static const Char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@', - '$', '>', '<', '=', ';', '|', '&', '{', '(', '\0' }; - - -/********************************/ -/* completion functions */ - -/* - * does tilde expansion of strings of type ``~user/foo'' - * if ``user'' isn't valid user name or ``txt'' doesn't start - * w/ '~', returns pointer to strdup()ed copy of ``txt'' - * - * it's callers's responsibility to free() returned string - */ -char * -fn_tilde_expand(const char *txt) -{ - struct passwd pwres, *pass; - char *temp; - size_t len = 0; - char pwbuf[1024]; - - if (txt[0] != '~') - return (strdup(txt)); - - temp = strchr(txt + 1, '/'); - if (temp == NULL) { - temp = strdup(txt + 1); - if (temp == NULL) - return NULL; - } else { - len = temp - txt + 1; /* text until string after slash */ - temp = malloc(len); - if (temp == NULL) - return NULL; - (void)strncpy(temp, txt + 1, len - 2); - temp[len - 2] = '\0'; - } - if (temp[0] == 0) { -#ifdef HAVE_GETPW_R_POSIX - if (getpwuid_r(getuid(), &pwres, pwbuf, sizeof(pwbuf), &pass) != 0) - pass = NULL; -#elif HAVE_GETPW_R_DRAFT - pass = getpwuid_r(getuid(), &pwres, pwbuf, sizeof(pwbuf)); -#else - pass = getpwuid(getuid()); -#endif - } else { -#ifdef HAVE_GETPW_R_POSIX - if (getpwnam_r(temp, &pwres, pwbuf, sizeof(pwbuf), &pass) != 0) - pass = NULL; -#elif HAVE_GETPW_R_DRAFT - pass = getpwnam_r(temp, &pwres, pwbuf, sizeof(pwbuf)); -#else - pass = getpwnam(temp); -#endif - } - free(temp); /* value no more needed */ - if (pass == NULL) - return (strdup(txt)); - - /* update pointer txt to point at string immedially following */ - /* first slash */ - txt += len; - - temp = malloc(strlen(pass->pw_dir) + 1 + strlen(txt) + 1); - if (temp == NULL) - return NULL; - (void)sprintf(temp, "%s/%s", pass->pw_dir, txt); - - return (temp); -} - - -/* - * return first found file name starting by the ``text'' or NULL if no - * such file can be found - * value of ``state'' is ignored - * - * it's caller's responsibility to free returned string - */ -char * -fn_filename_completion_function(const char *text, int state) -{ - static DIR *dir = NULL; - static char *filename = NULL, *dirname = NULL, *dirpath = NULL; - static size_t filename_len = 0; - struct dirent *entry; - char *temp; - size_t len; - - if (state == 0 || dir == NULL) { - temp = strrchr(text, '/'); - if (temp) { - char *nptr; - temp++; - nptr = realloc(filename, strlen(temp) + 1); - if (nptr == NULL) { - free(filename); - filename = NULL; - return NULL; - } - filename = nptr; - (void)strcpy(filename, temp); - len = temp - text; /* including last slash */ - - nptr = realloc(dirname, len + 1); - if (nptr == NULL) { - free(dirname); - dirname = NULL; - return NULL; - } - dirname = nptr; - (void)strncpy(dirname, text, len); - dirname[len] = '\0'; - } else { - free(filename); - if (*text == 0) - filename = NULL; - else { - filename = strdup(text); - if (filename == NULL) - return NULL; - } - free(dirname); - dirname = NULL; - } - - if (dir != NULL) { - (void)closedir(dir); - dir = NULL; - } - - /* support for ``~user'' syntax */ - - free(dirpath); - dirpath = NULL; - if (dirname == NULL) { - if ((dirname = strdup("")) == NULL) - return NULL; - dirpath = strdup("./"); - } else if (*dirname == '~') - dirpath = fn_tilde_expand(dirname); - else - dirpath = strdup(dirname); - - if (dirpath == NULL) - return NULL; - - dir = opendir(dirpath); - if (!dir) - return (NULL); /* cannot open the directory */ - - /* will be used in cycle */ - filename_len = filename ? strlen(filename) : 0; - } - - /* find the match */ - while ((entry = readdir(dir)) != NULL) { - /* skip . and .. */ - if (entry->d_name[0] == '.' && (!entry->d_name[1] - || (entry->d_name[1] == '.' && !entry->d_name[2]))) - continue; - if (filename_len == 0) - break; - /* otherwise, get first entry where first */ - /* filename_len characters are equal */ - if (entry->d_name[0] == filename[0] - /* Some dirents have d_namlen, but it is not portable. */ - && strlen(entry->d_name) >= filename_len - && strncmp(entry->d_name, filename, - filename_len) == 0) - break; - } - - if (entry) { /* match found */ - - /* Some dirents have d_namlen, but it is not portable. */ - len = strlen(entry->d_name); - - temp = malloc(strlen(dirname) + len + 1); - if (temp == NULL) - return NULL; - (void)sprintf(temp, "%s%s", dirname, entry->d_name); - } else { - (void)closedir(dir); - dir = NULL; - temp = NULL; - } - - return (temp); -} - - -static const char * -append_char_function(const char *name) -{ - struct stat stbuf; - char *expname = *name == '~' ? fn_tilde_expand(name) : NULL; - const char *rs = " "; - - if (stat(expname ? expname : name, &stbuf) == -1) - goto out; - if (S_ISDIR(stbuf.st_mode)) - rs = "/"; -out: - if (expname) - free(expname); - return rs; -} -/* - * returns list of completions for text given - * non-static for readline. - */ -char ** completion_matches(const char *, char *(*)(const char *, int)); -char ** -completion_matches(const char *text, char *(*genfunc)(const char *, int)) -{ - char **match_list = NULL, *retstr, *prevstr; - size_t match_list_len, max_equal, which, i; - size_t matches; - - matches = 0; - match_list_len = 1; - while ((retstr = (*genfunc) (text, (int)matches)) != NULL) { - /* allow for list terminator here */ - if (matches + 3 >= match_list_len) { - char **nmatch_list; - while (matches + 3 >= match_list_len) - match_list_len <<= 1; - nmatch_list = realloc(match_list, - match_list_len * sizeof(char *)); - if (nmatch_list == NULL) { - free(match_list); - return NULL; - } - match_list = nmatch_list; - - } - match_list[++matches] = retstr; - } - - if (!match_list) - return NULL; /* nothing found */ - - /* find least denominator and insert it to match_list[0] */ - which = 2; - prevstr = match_list[1]; - max_equal = strlen(prevstr); - for (; which <= matches; which++) { - for (i = 0; i < max_equal && - prevstr[i] == match_list[which][i]; i++) - continue; - max_equal = i; - } - - retstr = malloc(max_equal + 1); - if (retstr == NULL) { - free(match_list); - return NULL; - } - (void)strncpy(retstr, match_list[1], max_equal); - retstr[max_equal] = '\0'; - match_list[0] = retstr; - - /* add NULL as last pointer to the array */ - match_list[matches + 1] = (char *) NULL; - - return (match_list); -} - -/* - * Sort function for qsort(). Just wrapper around strcasecmp(). - */ -static int -_fn_qsort_string_compare(const void *i1, const void *i2) -{ - const char *s1 = ((const char * const *)i1)[0]; - const char *s2 = ((const char * const *)i2)[0]; - - return strcasecmp(s1, s2); -} - -/* - * Display list of strings in columnar format on readline's output stream. - * 'matches' is list of strings, 'num' is number of strings in 'matches', - * 'width' is maximum length of string in 'matches'. - * - * matches[0] is not one of the match strings, but it is counted in - * num, so the strings are matches[1] *through* matches[num-1]. - */ -void -fn_display_match_list (EditLine *el, char **matches, size_t num, size_t width) -{ - size_t line, lines, col, cols, thisguy; - int screenwidth = el->el_term.t_size.h; - - /* Ignore matches[0]. Avoid 1-based array logic below. */ - matches++; - num--; - - /* - * Find out how many entries can be put on one line; count - * with one space between strings the same way it's printed. - */ - cols = screenwidth / (width + 1); - if (cols == 0) - cols = 1; - - /* how many lines of output, rounded up */ - lines = (num + cols - 1) / cols; - - /* Sort the items. */ - qsort(matches, num, sizeof(char *), _fn_qsort_string_compare); - - /* - * On the ith line print elements i, i+lines, i+lines*2, etc. - */ - for (line = 0; line < lines; line++) { - for (col = 0; col < cols; col++) { - thisguy = line + col * lines; - if (thisguy >= num) - break; - (void)fprintf(el->el_outfile, "%s%-*s", - col == 0 ? "" : " ", (int)width, matches[thisguy]); - } - (void)fprintf(el->el_outfile, "\n"); - } -} - -/* - * Complete the word at or before point, - * 'what_to_do' says what to do with the completion. - * \t means do standard completion. - * `?' means list the possible completions. - * `*' means insert all of the possible completions. - * `!' means to do standard completion, and list all possible completions if - * there is more than one. - * - * Note: '*' support is not implemented - * '!' could never be invoked - */ -int -fn_complete(EditLine *el, - char *(*complet_func)(const char *, int), - char **(*attempted_completion_function)(const char *, int, int), - const Char *word_break, const Char *special_prefixes, - const char *(*app_func)(const char *), size_t query_items, - int *completion_type, int *over, int *point, int *end) -{ - const TYPE(LineInfo) *li; - Char *temp; - char **matches; - const Char *ctemp; - size_t len; - int what_to_do = '\t'; - int retval = CC_NORM; - - if (el->el_state.lastcmd == el->el_state.thiscmd) - what_to_do = '?'; - - /* readline's rl_complete() has to be told what we did... */ - if (completion_type != NULL) - *completion_type = what_to_do; - - if (!complet_func) - complet_func = fn_filename_completion_function; - if (!app_func) - app_func = append_char_function; - - /* We now look backwards for the start of a filename/variable word */ - li = FUN(el,line)(el); - ctemp = li->cursor; - while (ctemp > li->buffer - && !Strchr(word_break, ctemp[-1]) - && (!special_prefixes || !Strchr(special_prefixes, ctemp[-1]) ) ) - ctemp--; - - len = li->cursor - ctemp; -#if defined(__SSP__) || defined(__SSP_ALL__) - temp = malloc(sizeof(*temp) * (len + 1)); -#else - temp = alloca(sizeof(*temp) * (len + 1)); -#endif - (void)Strncpy(temp, ctemp, len); - temp[len] = '\0'; - - /* these can be used by function called in completion_matches() */ - /* or (*attempted_completion_function)() */ - if (point != 0) - *point = (int)(li->cursor - li->buffer); - if (end != NULL) - *end = (int)(li->lastchar - li->buffer); - - if (attempted_completion_function) { - int cur_off = (int)(li->cursor - li->buffer); - matches = (*attempted_completion_function) (ct_encode_string(temp, &el->el_scratch), - (int)(cur_off - len), cur_off); - } else - matches = 0; - if (!attempted_completion_function || - (over != NULL && !*over && !matches)) - matches = completion_matches(ct_encode_string(temp, &el->el_scratch), complet_func); - - if (over != NULL) - *over = 0; - - if (matches) { - int i; - size_t matches_num, maxlen, match_len, match_display=1; - - retval = CC_REFRESH; - /* - * Only replace the completed string with common part of - * possible matches if there is possible completion. - */ - if (matches[0][0] != '\0') { - el_deletestr(el, (int) len); - FUN(el,insertstr)(el, - ct_decode_string(matches[0], &el->el_scratch)); - } - - if (what_to_do == '?') - goto display_matches; - - if (matches[2] == NULL && strcmp(matches[0], matches[1]) == 0) { - /* - * We found exact match. Add a space after - * it, unless we do filename completion and the - * object is a directory. - */ - FUN(el,insertstr)(el, - ct_decode_string((*app_func)(matches[0]), - &el->el_scratch)); - } else if (what_to_do == '!') { - display_matches: - /* - * More than one match and requested to list possible - * matches. - */ - - for(i = 1, maxlen = 0; matches[i]; i++) { - match_len = strlen(matches[i]); - if (match_len > maxlen) - maxlen = match_len; - } - /* matches[1] through matches[i-1] are available */ - matches_num = i - 1; - - /* newline to get on next line from command line */ - (void)fprintf(el->el_outfile, "\n"); - - /* - * If there are too many items, ask user for display - * confirmation. - */ - if (matches_num > query_items) { - (void)fprintf(el->el_outfile, - "Display all %zu possibilities? (y or n) ", - matches_num); - (void)fflush(el->el_outfile); - if (getc(stdin) != 'y') - match_display = 0; - (void)fprintf(el->el_outfile, "\n"); - } - - if (match_display) { - /* - * Interface of this function requires the - * strings be matches[1..num-1] for compat. - * We have matches_num strings not counting - * the prefix in matches[0], so we need to - * add 1 to matches_num for the call. - */ - fn_display_match_list(el, matches, - matches_num+1, maxlen); - } - retval = CC_REDISPLAY; - } else if (matches[0][0]) { - /* - * There was some common match, but the name was - * not complete enough. Next tab will print possible - * completions. - */ - el_beep(el); - } else { - /* lcd is not a valid object - further specification */ - /* is needed */ - el_beep(el); - retval = CC_NORM; - } - - /* free elements of array and the array itself */ - for (i = 0; matches[i]; i++) - free(matches[i]); - free(matches); - matches = NULL; - } -#if defined(__SSP__) || defined(__SSP_ALL__) - free(temp); -#endif - return retval; -} - -/* - * el-compatible wrapper around rl_complete; needed for key binding - */ -/* ARGSUSED */ -unsigned char -_el_fn_complete(EditLine *el, int ch __attribute__((__unused__))) -{ - return (unsigned char)fn_complete(el, NULL, NULL, - break_chars, NULL, NULL, 100, - NULL, NULL, NULL, NULL); -} diff --git a/kerberosV/src/lib/libedit/src/filecomplete.h b/kerberosV/src/lib/libedit/src/filecomplete.h deleted file mode 100644 index 971e6e05939..00000000000 --- a/kerberosV/src/lib/libedit/src/filecomplete.h +++ /dev/null @@ -1,44 +0,0 @@ -/* $NetBSD: filecomplete.h,v 1.9 2009/12/30 22:37:40 christos Exp $ */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Jaromir Dolecek. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ -#ifndef _FILECOMPLETE_H_ -#define _FILECOMPLETE_H_ - -int fn_complete(EditLine *, - char *(*)(const char *, int), - char **(*)(const char *, int, int), - const Char *, const Char *, const char *(*)(const char *), size_t, - int *, int *, int *, int *); - -void fn_display_match_list(EditLine *, char **, size_t, size_t); -char *fn_tilde_expand(const char *); -char *fn_filename_completion_function(const char *, int); - -#endif diff --git a/kerberosV/src/lib/libedit/src/hist.c b/kerberosV/src/lib/libedit/src/hist.c deleted file mode 100644 index e12bfb9b9b4..00000000000 --- a/kerberosV/src/lib/libedit/src/hist.c +++ /dev/null @@ -1,223 +0,0 @@ -/* $NetBSD: hist.c,v 1.17 2009/12/30 23:54:52 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)hist.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: hist.c,v 1.17 2009/12/30 23:54:52 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * hist.c: History access functions - */ -#include -#include "el.h" - -/* hist_init(): - * Initialization function. - */ -protected int -hist_init(EditLine *el) -{ - - el->el_history.fun = NULL; - el->el_history.ref = NULL; - el->el_history.buf = el_malloc(EL_BUFSIZ * sizeof(*el->el_history.buf)); - el->el_history.sz = EL_BUFSIZ; - if (el->el_history.buf == NULL) - return (-1); - el->el_history.last = el->el_history.buf; - return (0); -} - - -/* hist_end(): - * clean up history; - */ -protected void -hist_end(EditLine *el) -{ - - el_free((ptr_t) el->el_history.buf); - el->el_history.buf = NULL; -} - - -/* hist_set(): - * Set new history interface - */ -protected int -hist_set(EditLine *el, hist_fun_t fun, ptr_t ptr) -{ - - el->el_history.ref = ptr; - el->el_history.fun = fun; - return (0); -} - - -/* hist_get(): - * Get a history line and update it in the buffer. - * eventno tells us the event to get. - */ -protected el_action_t -hist_get(EditLine *el) -{ - const Char *hp; - int h; - - if (el->el_history.eventno == 0) { /* if really the current line */ - (void) Strncpy(el->el_line.buffer, el->el_history.buf, - el->el_history.sz); - el->el_line.lastchar = el->el_line.buffer + - (el->el_history.last - el->el_history.buf); - -#ifdef KSHVI - if (el->el_map.type == MAP_VI) - el->el_line.cursor = el->el_line.buffer; - else -#endif /* KSHVI */ - el->el_line.cursor = el->el_line.lastchar; - - return (CC_REFRESH); - } - if (el->el_history.ref == NULL) - return (CC_ERROR); - - hp = HIST_FIRST(el); - - if (hp == NULL) - return (CC_ERROR); - - for (h = 1; h < el->el_history.eventno; h++) - if ((hp = HIST_NEXT(el)) == NULL) { - el->el_history.eventno = h; - return (CC_ERROR); - } - (void) Strncpy(el->el_line.buffer, hp, - (size_t)(el->el_line.limit - el->el_line.buffer)); - el->el_line.buffer[el->el_line.limit - el->el_line.buffer - 1] = '\0'; - el->el_line.lastchar = el->el_line.buffer + Strlen(el->el_line.buffer); - - if (el->el_line.lastchar > el->el_line.buffer - && el->el_line.lastchar[-1] == '\n') - el->el_line.lastchar--; - if (el->el_line.lastchar > el->el_line.buffer - && el->el_line.lastchar[-1] == ' ') - el->el_line.lastchar--; -#ifdef KSHVI - if (el->el_map.type == MAP_VI) - el->el_line.cursor = el->el_line.buffer; - else -#endif /* KSHVI */ - el->el_line.cursor = el->el_line.lastchar; - - return (CC_REFRESH); -} - - -/* hist_command() - * process a history command - */ -protected int -hist_command(EditLine *el, int argc, const Char **argv) -{ - const Char *str; - int num; - HistEvent ev; - - if (el->el_history.ref == NULL) - return (-1); - - if (argc == 1 || Strcmp(argv[1], STR("list")) == 0) { - /* List history entries */ - - for (str = HIST_LAST(el); str != NULL; str = HIST_PREV(el)) - (void) fprintf(el->el_outfile, "%d %s", - el->el_history.ev.num, ct_encode_string(str, &el->el_scratch)); - return (0); - } - - if (argc != 3) - return (-1); - - num = (int)Strtol(argv[2], NULL, 0); - - if (Strcmp(argv[1], STR("size")) == 0) - return history(el->el_history.ref, &ev, H_SETSIZE, num); - - if (Strcmp(argv[1], STR("unique")) == 0) - return history(el->el_history.ref, &ev, H_SETUNIQUE, num); - - return -1; -} - -/* hist_enlargebuf() - * Enlarge history buffer to specified value. Called from el_enlargebufs(). - * Return 0 for failure, 1 for success. - */ -protected int -/*ARGSUSED*/ -hist_enlargebuf(EditLine *el, size_t oldsz, size_t newsz) -{ - Char *newbuf; - - newbuf = el_realloc(el->el_history.buf, newsz * sizeof(*newbuf)); - if (!newbuf) - return 0; - - (void) memset(&newbuf[oldsz], '\0', (newsz - oldsz) * sizeof(*newbuf)); - - el->el_history.last = newbuf + - (el->el_history.last - el->el_history.buf); - el->el_history.buf = newbuf; - el->el_history.sz = newsz; - - return 1; -} - -#ifdef WIDECHAR -protected wchar_t * -hist_convert(EditLine *el, int fn, ptr_t arg) -{ - HistEventW ev; - if ((*(el)->el_history.fun)((el)->el_history.ref, &ev, fn, arg) == -1) - return NULL; - return ct_decode_string((const char *)(const void *)ev.str, - &el->el_scratch); -} -#endif diff --git a/kerberosV/src/lib/libedit/src/hist.h b/kerberosV/src/lib/libedit/src/hist.h deleted file mode 100644 index 8c3af40bf86..00000000000 --- a/kerberosV/src/lib/libedit/src/hist.h +++ /dev/null @@ -1,87 +0,0 @@ -/* $NetBSD: hist.h,v 1.12 2009/12/30 23:54:52 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)hist.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.hist.c: History functions - */ -#ifndef _h_el_hist -#define _h_el_hist - -#include "histedit.h" - -typedef int (*hist_fun_t)(ptr_t, TYPE(HistEvent) *, int, ...); - -typedef struct el_history_t { - Char *buf; /* The history buffer */ - size_t sz; /* Size of history buffer */ - Char *last; /* The last character */ - int eventno; /* Event we are looking for */ - ptr_t ref; /* Argument for history fcns */ - hist_fun_t fun; /* Event access */ - TYPE(HistEvent) ev; /* Event cookie */ -} el_history_t; - -#define HIST_FUN_INTERNAL(el, fn, arg) \ - ((((*(el)->el_history.fun) ((el)->el_history.ref, &(el)->el_history.ev, \ - fn, arg)) == -1) ? NULL : (el)->el_history.ev.str) -#ifdef WIDECHAR -#define HIST_FUN(el, fn, arg) \ - (((el)->el_flags & NARROW_HISTORY) ? hist_convert(el, fn, arg) : \ - HIST_FUN_INTERNAL(el, fn, arg)) -#else -#define HIST_FUN(el, fn, arg) HIST_FUN_INTERNAL(el, fn, arg) -#endif - - -#define HIST_NEXT(el) HIST_FUN(el, H_NEXT, NULL) -#define HIST_FIRST(el) HIST_FUN(el, H_FIRST, NULL) -#define HIST_LAST(el) HIST_FUN(el, H_LAST, NULL) -#define HIST_PREV(el) HIST_FUN(el, H_PREV, NULL) -#define HIST_SET(el, num) HIST_FUN(el, H_SET, num) -#define HIST_LOAD(el, fname) HIST_FUN(el, H_LOAD fname) -#define HIST_SAVE(el, fname) HIST_FUN(el, H_SAVE fname) - -protected int hist_init(EditLine *); -protected void hist_end(EditLine *); -protected el_action_t hist_get(EditLine *); -protected int hist_set(EditLine *, hist_fun_t, ptr_t); -protected int hist_command(EditLine *, int, const Char **); -protected int hist_enlargebuf(EditLine *, size_t, size_t); -#ifdef WIDECHAR -protected wchar_t *hist_convert(EditLine *, int, ptr_t); -#endif - -#endif /* _h_el_hist */ diff --git a/kerberosV/src/lib/libedit/src/histedit.h b/kerberosV/src/lib/libedit/src/histedit.h deleted file mode 100644 index 5009feec62c..00000000000 --- a/kerberosV/src/lib/libedit/src/histedit.h +++ /dev/null @@ -1,319 +0,0 @@ -/* $NetBSD: histedit.h,v 1.47 2010/08/28 15:44:59 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)histedit.h 8.2 (Berkeley) 1/3/94 - */ - -/* - * histedit.h: Line editor and history interface. - */ -#ifndef _HISTEDIT_H_ -#define _HISTEDIT_H_ - -#define LIBEDIT_MAJOR 2 -#define LIBEDIT_MINOR 11 - -#include - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * ==== Editing ==== - */ - -typedef struct editline EditLine; - -/* - * For user-defined function interface - */ -typedef struct lineinfo { - const char *buffer; - const char *cursor; - const char *lastchar; -} LineInfo; - -/* - * EditLine editor function return codes. - * For user-defined function interface - */ -#define CC_NORM 0 -#define CC_NEWLINE 1 -#define CC_EOF 2 -#define CC_ARGHACK 3 -#define CC_REFRESH 4 -#define CC_CURSOR 5 -#define CC_ERROR 6 -#define CC_FATAL 7 -#define CC_REDISPLAY 8 -#define CC_REFRESH_BEEP 9 - -/* - * Initialization, cleanup, and resetting - */ -EditLine *el_init(const char *, FILE *, FILE *, FILE *); -void el_end(EditLine *); -void el_reset(EditLine *); - -/* - * Get a line, a character or push a string back in the input queue - */ -const char *el_gets(EditLine *, int *); -int el_getc(EditLine *, char *); -void el_push(EditLine *, const char *); - -/* - * Beep! - */ -void el_beep(EditLine *); - -/* - * High level function internals control - * Parses argc, argv array and executes builtin editline commands - */ -int el_parse(EditLine *, int, const char **); - -/* - * Low level editline access functions - */ -int el_set(EditLine *, int, ...); -int el_get(EditLine *, int, ...); -unsigned char _el_fn_complete(EditLine *, int); - -/* - * el_set/el_get parameters - * - * When using el_wset/el_wget (as opposed to el_set/el_get): - * Char is wchar_t, otherwise it is char. - * prompt_func is el_wpfunc_t, otherwise it is el_pfunc_t . - - * Prompt function prototypes are: - * typedef char *(*el_pfunct_t) (EditLine *); - * typedef wchar_t *(*el_wpfunct_t) (EditLine *); - * - * For operations that support set or set/get, the argument types listed are for - * the "set" operation. For "get", each listed type must be a pointer. - * E.g. EL_EDITMODE takes an int when set, but an int* when get. - * - * Operations that only support "get" have the correct argument types listed. - */ -#define EL_PROMPT 0 /* , prompt_func); set/get */ -#define EL_TERMINAL 1 /* , const char *); set/get */ -#define EL_EDITOR 2 /* , const Char *); set/get */ -#define EL_SIGNAL 3 /* , int); set/get */ -#define EL_BIND 4 /* , const Char *, ..., NULL); set */ -#define EL_TELLTC 5 /* , const Char *, ..., NULL); set */ -#define EL_SETTC 6 /* , const Char *, ..., NULL); set */ -#define EL_ECHOTC 7 /* , const Char *, ..., NULL); set */ -#define EL_SETTY 8 /* , const Char *, ..., NULL); set */ -#define EL_ADDFN 9 /* , const Char *, const Char, set */ - /* el_func_t); */ -#define EL_HIST 10 /* , hist_fun_t, const ptr_t); set */ -#define EL_EDITMODE 11 /* , int); set/get */ -#define EL_RPROMPT 12 /* , prompt_func); set/get */ -#define EL_GETCFN 13 /* , el_rfunc_t); set/get */ -#define EL_CLIENTDATA 14 /* , void *); set/get */ -#define EL_UNBUFFERED 15 /* , int); set/get */ -#define EL_PREP_TERM 16 /* , int); set */ -#define EL_GETTC 17 /* , const Char *, ..., NULL); get */ -#define EL_GETFP 18 /* , int, FILE **); get */ -#define EL_SETFP 19 /* , int, FILE *); set */ -#define EL_REFRESH 20 /* , void); set */ -#define EL_PROMPT_ESC 21 /* , prompt_func, Char); set/get */ -#define EL_RPROMPT_ESC 22 /* , prompt_func, Char); set/get */ -#define EL_RESIZE 23 /* , el_zfunc_t, void *); set */ - -#define EL_BUILTIN_GETCFN (NULL) - -/* - * Source named file or $PWD/.editrc or $HOME/.editrc - */ -int el_source(EditLine *, const char *); - -/* - * Must be called when the terminal changes size; If EL_SIGNAL - * is set this is done automatically otherwise it is the responsibility - * of the application - */ -void el_resize(EditLine *); - -/* - * User-defined function interface. - */ -const LineInfo *el_line(EditLine *); -int el_insertstr(EditLine *, const char *); -void el_deletestr(EditLine *, int); - - -/* - * ==== History ==== - */ - -typedef struct history History; - -typedef struct HistEvent { - int num; - const char *str; -} HistEvent; - -/* - * History access functions. - */ -History * history_init(void); -void history_end(History *); - -int history(History *, HistEvent *, int, ...); - -#define H_FUNC 0 /* , UTSL */ -#define H_SETSIZE 1 /* , const int); */ -#define H_GETSIZE 2 /* , void); */ -#define H_FIRST 3 /* , void); */ -#define H_LAST 4 /* , void); */ -#define H_PREV 5 /* , void); */ -#define H_NEXT 6 /* , void); */ -#define H_CURR 8 /* , const int); */ -#define H_SET 7 /* , int); */ -#define H_ADD 9 /* , const wchar_t *); */ -#define H_ENTER 10 /* , const wchar_t *); */ -#define H_APPEND 11 /* , const wchar_t *); */ -#define H_END 12 /* , void); */ -#define H_NEXT_STR 13 /* , const wchar_t *); */ -#define H_PREV_STR 14 /* , const wchar_t *); */ -#define H_NEXT_EVENT 15 /* , const int); */ -#define H_PREV_EVENT 16 /* , const int); */ -#define H_LOAD 17 /* , const char *); */ -#define H_SAVE 18 /* , const char *); */ -#define H_CLEAR 19 /* , void); */ -#define H_SETUNIQUE 20 /* , int); */ -#define H_GETUNIQUE 21 /* , void); */ -#define H_DEL 22 /* , int); */ -#define H_NEXT_EVDATA 23 /* , const int, histdata_t *); */ -#define H_DELDATA 24 /* , int, histdata_t *);*/ -#define H_REPLACE 25 /* , const char *, histdata_t); */ - - - -/* - * ==== Tokenization ==== - */ - -typedef struct tokenizer Tokenizer; - -/* - * String tokenization functions, using simplified sh(1) quoting rules - */ -Tokenizer *tok_init(const char *); -void tok_end(Tokenizer *); -void tok_reset(Tokenizer *); -int tok_line(Tokenizer *, const LineInfo *, - int *, const char ***, int *, int *); -int tok_str(Tokenizer *, const char *, - int *, const char ***); - -/* - * Begin Wide Character Support - */ -#ifdef __linux__ -/* Apparently we need _GNU_SOURCE defined to get access to wcsdup on Linux */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif -#endif - -#include -#include - -/* - * Wide character versions - */ - -/* - * ==== Editing ==== - */ -typedef struct lineinfow { - const wchar_t *buffer; - const wchar_t *cursor; - const wchar_t *lastchar; -} LineInfoW; - -const wchar_t *el_wgets(EditLine *, int *); -int el_wgetc(EditLine *, wchar_t *); -void el_wpush(EditLine *, const wchar_t *); - -int el_wparse(EditLine *, int, const wchar_t **); - -int el_wset(EditLine *, int, ...); -int el_wget(EditLine *, int, ...); - -const LineInfoW *el_wline(EditLine *); -int el_winsertstr(EditLine *, const wchar_t *); -#define el_wdeletestr el_deletestr - -/* - * ==== History ==== - */ -typedef struct histeventW { - int num; - const wchar_t *str; -} HistEventW; - -typedef struct historyW HistoryW; - -HistoryW * history_winit(void); -void history_wend(HistoryW *); - -int history_w(HistoryW *, HistEventW *, int, ...); - -/* - * ==== Tokenization ==== - */ -typedef struct tokenizerW TokenizerW; - -/* Wide character tokenizer support */ -TokenizerW *tok_winit(const wchar_t *); -void tok_wend(TokenizerW *); -void tok_wreset(TokenizerW *); -int tok_wline(TokenizerW *, const LineInfoW *, - int *, const wchar_t ***, int *, int *); -int tok_wstr(TokenizerW *, const wchar_t *, - int *, const wchar_t ***); - -#ifdef __cplusplus -} -#endif - -#endif /* _HISTEDIT_H_ */ diff --git a/kerberosV/src/lib/libedit/src/history.c b/kerberosV/src/lib/libedit/src/history.c deleted file mode 100644 index 3ec16a77bc0..00000000000 --- a/kerberosV/src/lib/libedit/src/history.c +++ /dev/null @@ -1,1097 +0,0 @@ -/* $NetBSD: history.c,v 1.38 2011/01/16 03:05:51 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#ifndef NARROWCHAR -#include "config.h" -#endif - -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)history.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: history.c,v 1.38 2011/01/16 03:05:51 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * hist.c: TYPE(History) access functions - */ -#include -#include -#include -#include -#include - -static const char hist_cookie[] = "_HiStOrY_V2_\n"; - -#include "histedit.h" -#include "chartype.h" - -typedef int (*history_gfun_t)(ptr_t, TYPE(HistEvent) *); -typedef int (*history_efun_t)(ptr_t, TYPE(HistEvent) *, const Char *); -typedef void (*history_vfun_t)(ptr_t, TYPE(HistEvent) *); -typedef int (*history_sfun_t)(ptr_t, TYPE(HistEvent) *, const int); - -struct TYPE(history) { - ptr_t h_ref; /* Argument for history fcns */ - int h_ent; /* Last entry point for history */ - history_gfun_t h_first; /* Get the first element */ - history_gfun_t h_next; /* Get the next element */ - history_gfun_t h_last; /* Get the last element */ - history_gfun_t h_prev; /* Get the previous element */ - history_gfun_t h_curr; /* Get the current element */ - history_sfun_t h_set; /* Set the current element */ - history_sfun_t h_del; /* Set the given element */ - history_vfun_t h_clear; /* Clear the history list */ - history_efun_t h_enter; /* Add an element */ - history_efun_t h_add; /* Append to an element */ -}; - -#define HNEXT(h, ev) (*(h)->h_next)((h)->h_ref, ev) -#define HFIRST(h, ev) (*(h)->h_first)((h)->h_ref, ev) -#define HPREV(h, ev) (*(h)->h_prev)((h)->h_ref, ev) -#define HLAST(h, ev) (*(h)->h_last)((h)->h_ref, ev) -#define HCURR(h, ev) (*(h)->h_curr)((h)->h_ref, ev) -#define HSET(h, ev, n) (*(h)->h_set)((h)->h_ref, ev, n) -#define HCLEAR(h, ev) (*(h)->h_clear)((h)->h_ref, ev) -#define HENTER(h, ev, str) (*(h)->h_enter)((h)->h_ref, ev, str) -#define HADD(h, ev, str) (*(h)->h_add)((h)->h_ref, ev, str) -#define HDEL(h, ev, n) (*(h)->h_del)((h)->h_ref, ev, n) - -#define h_strdup(a) Strdup(a) -#define h_malloc(a) malloc(a) -#define h_realloc(a, b) realloc((a), (b)) -#define h_free(a) free(a) - -typedef struct { - int num; - Char *str; -} HistEventPrivate; - - - -private int history_setsize(TYPE(History) *, TYPE(HistEvent) *, int); -private int history_getsize(TYPE(History) *, TYPE(HistEvent) *); -private int history_setunique(TYPE(History) *, TYPE(HistEvent) *, int); -private int history_getunique(TYPE(History) *, TYPE(HistEvent) *); -private int history_set_fun(TYPE(History) *, TYPE(History) *); -private int history_load(TYPE(History) *, const char *); -private int history_save(TYPE(History) *, const char *); -private int history_prev_event(TYPE(History) *, TYPE(HistEvent) *, int); -private int history_next_event(TYPE(History) *, TYPE(HistEvent) *, int); -private int history_next_string(TYPE(History) *, TYPE(HistEvent) *, const Char *); -private int history_prev_string(TYPE(History) *, TYPE(HistEvent) *, const Char *); - - -/***********************************************************************/ - -/* - * Builtin- history implementation - */ -typedef struct hentry_t { - TYPE(HistEvent) ev; /* What we return */ - void *data; /* data */ - struct hentry_t *next; /* Next entry */ - struct hentry_t *prev; /* Previous entry */ -} hentry_t; - -typedef struct history_t { - hentry_t list; /* Fake list header element */ - hentry_t *cursor; /* Current element in the list */ - int max; /* Maximum number of events */ - int cur; /* Current number of events */ - int eventid; /* For generation of unique event id */ - int flags; /* TYPE(History) flags */ -#define H_UNIQUE 1 /* Store only unique elements */ -} history_t; - -private int history_def_next(ptr_t, TYPE(HistEvent) *); -private int history_def_first(ptr_t, TYPE(HistEvent) *); -private int history_def_prev(ptr_t, TYPE(HistEvent) *); -private int history_def_last(ptr_t, TYPE(HistEvent) *); -private int history_def_curr(ptr_t, TYPE(HistEvent) *); -private int history_def_set(ptr_t, TYPE(HistEvent) *, const int); -private void history_def_clear(ptr_t, TYPE(HistEvent) *); -private int history_def_enter(ptr_t, TYPE(HistEvent) *, const Char *); -private int history_def_add(ptr_t, TYPE(HistEvent) *, const Char *); -private int history_def_del(ptr_t, TYPE(HistEvent) *, const int); - -private int history_def_init(ptr_t *, TYPE(HistEvent) *, int); -private int history_def_insert(history_t *, TYPE(HistEvent) *, const Char *); -private void history_def_delete(history_t *, TYPE(HistEvent) *, hentry_t *); - -private int history_deldata_nth(history_t *, TYPE(HistEvent) *, int, void **); -private int history_set_nth(ptr_t, TYPE(HistEvent) *, int); - -#define history_def_setsize(p, num)(void) (((history_t *)p)->max = (num)) -#define history_def_getsize(p) (((history_t *)p)->cur) -#define history_def_getunique(p) (((((history_t *)p)->flags) & H_UNIQUE) != 0) -#define history_def_setunique(p, uni) \ - if (uni) \ - (((history_t *)p)->flags) |= H_UNIQUE; \ - else \ - (((history_t *)p)->flags) &= ~H_UNIQUE - -#define he_strerror(code) he_errlist[code] -#define he_seterrev(evp, code) {\ - evp->num = code;\ - evp->str = he_strerror(code);\ - } - -/* error messages */ -static const Char *const he_errlist[] = { - STR("OK"), - STR("unknown error"), - STR("malloc() failed"), - STR("first event not found"), - STR("last event not found"), - STR("empty list"), - STR("no next event"), - STR("no previous event"), - STR("current event is invalid"), - STR("event not found"), - STR("can't read history from file"), - STR("can't write history"), - STR("required parameter(s) not supplied"), - STR("history size negative"), - STR("function not allowed with other history-functions-set the default"), - STR("bad parameters") -}; -/* error codes */ -#define _HE_OK 0 -#define _HE_UNKNOWN 1 -#define _HE_MALLOC_FAILED 2 -#define _HE_FIRST_NOTFOUND 3 -#define _HE_LAST_NOTFOUND 4 -#define _HE_EMPTY_LIST 5 -#define _HE_END_REACHED 6 -#define _HE_START_REACHED 7 -#define _HE_CURR_INVALID 8 -#define _HE_NOT_FOUND 9 -#define _HE_HIST_READ 10 -#define _HE_HIST_WRITE 11 -#define _HE_PARAM_MISSING 12 -#define _HE_SIZE_NEGATIVE 13 -#define _HE_NOT_ALLOWED 14 -#define _HE_BAD_PARAM 15 - -/* history_def_first(): - * Default function to return the first event in the history. - */ -private int -history_def_first(ptr_t p, TYPE(HistEvent) *ev) -{ - history_t *h = (history_t *) p; - - h->cursor = h->list.next; - if (h->cursor != &h->list) - *ev = h->cursor->ev; - else { - he_seterrev(ev, _HE_FIRST_NOTFOUND); - return (-1); - } - - return (0); -} - - -/* history_def_last(): - * Default function to return the last event in the history. - */ -private int -history_def_last(ptr_t p, TYPE(HistEvent) *ev) -{ - history_t *h = (history_t *) p; - - h->cursor = h->list.prev; - if (h->cursor != &h->list) - *ev = h->cursor->ev; - else { - he_seterrev(ev, _HE_LAST_NOTFOUND); - return (-1); - } - - return (0); -} - - -/* history_def_next(): - * Default function to return the next event in the history. - */ -private int -history_def_next(ptr_t p, TYPE(HistEvent) *ev) -{ - history_t *h = (history_t *) p; - - if (h->cursor == &h->list) { - he_seterrev(ev, _HE_EMPTY_LIST); - return (-1); - } - - if (h->cursor->next == &h->list) { - he_seterrev(ev, _HE_END_REACHED); - return (-1); - } - - h->cursor = h->cursor->next; - *ev = h->cursor->ev; - - return (0); -} - - -/* history_def_prev(): - * Default function to return the previous event in the history. - */ -private int -history_def_prev(ptr_t p, TYPE(HistEvent) *ev) -{ - history_t *h = (history_t *) p; - - if (h->cursor == &h->list) { - he_seterrev(ev, - (h->cur > 0) ? _HE_END_REACHED : _HE_EMPTY_LIST); - return (-1); - } - - if (h->cursor->prev == &h->list) { - he_seterrev(ev, _HE_START_REACHED); - return (-1); - } - - h->cursor = h->cursor->prev; - *ev = h->cursor->ev; - - return (0); -} - - -/* history_def_curr(): - * Default function to return the current event in the history. - */ -private int -history_def_curr(ptr_t p, TYPE(HistEvent) *ev) -{ - history_t *h = (history_t *) p; - - if (h->cursor != &h->list) - *ev = h->cursor->ev; - else { - he_seterrev(ev, - (h->cur > 0) ? _HE_CURR_INVALID : _HE_EMPTY_LIST); - return (-1); - } - - return (0); -} - - -/* history_def_set(): - * Default function to set the current event in the history to the - * given one. - */ -private int -history_def_set(ptr_t p, TYPE(HistEvent) *ev, const int n) -{ - history_t *h = (history_t *) p; - - if (h->cur == 0) { - he_seterrev(ev, _HE_EMPTY_LIST); - return (-1); - } - if (h->cursor == &h->list || h->cursor->ev.num != n) { - for (h->cursor = h->list.next; h->cursor != &h->list; - h->cursor = h->cursor->next) - if (h->cursor->ev.num == n) - break; - } - if (h->cursor == &h->list) { - he_seterrev(ev, _HE_NOT_FOUND); - return (-1); - } - return (0); -} - - -/* history_set_nth(): - * Default function to set the current event in the history to the - * n-th one. - */ -private int -history_set_nth(ptr_t p, TYPE(HistEvent) *ev, int n) -{ - history_t *h = (history_t *) p; - - if (h->cur == 0) { - he_seterrev(ev, _HE_EMPTY_LIST); - return (-1); - } - for (h->cursor = h->list.prev; h->cursor != &h->list; - h->cursor = h->cursor->prev) - if (n-- <= 0) - break; - if (h->cursor == &h->list) { - he_seterrev(ev, _HE_NOT_FOUND); - return (-1); - } - return (0); -} - - -/* history_def_add(): - * Append string to element - */ -private int -history_def_add(ptr_t p, TYPE(HistEvent) *ev, const Char *str) -{ - history_t *h = (history_t *) p; - size_t len; - Char *s; - HistEventPrivate *evp = (void *)&h->cursor->ev; - - if (h->cursor == &h->list) - return (history_def_enter(p, ev, str)); - len = Strlen(evp->str) + Strlen(str) + 1; - s = h_malloc(len * sizeof(*s)); - if (s == NULL) { - he_seterrev(ev, _HE_MALLOC_FAILED); - return (-1); - } - (void) Strncpy(s, h->cursor->ev.str, len); - s[len - 1] = '\0'; - (void) Strncat(s, str, len - Strlen(s) - 1); - h_free((ptr_t)evp->str); - evp->str = s; - *ev = h->cursor->ev; - return (0); -} - - -private int -history_deldata_nth(history_t *h, TYPE(HistEvent) *ev, - int num, void **data) -{ - if (history_set_nth(h, ev, num) != 0) - return (-1); - /* magic value to skip delete (just set to n-th history) */ - if (data == (void **)-1) - return (0); - ev->str = Strdup(h->cursor->ev.str); - ev->num = h->cursor->ev.num; - if (data) - *data = h->cursor->data; - history_def_delete(h, ev, h->cursor); - return (0); -} - - -/* history_def_del(): - * Delete element hp of the h list - */ -/* ARGSUSED */ -private int -history_def_del(ptr_t p, TYPE(HistEvent) *ev __attribute__((__unused__)), - const int num) -{ - history_t *h = (history_t *) p; - if (history_def_set(h, ev, num) != 0) - return (-1); - ev->str = Strdup(h->cursor->ev.str); - ev->num = h->cursor->ev.num; - history_def_delete(h, ev, h->cursor); - return (0); -} - - -/* history_def_delete(): - * Delete element hp of the h list - */ -/* ARGSUSED */ -private void -history_def_delete(history_t *h, - TYPE(HistEvent) *ev __attribute__((__unused__)), hentry_t *hp) -{ - HistEventPrivate *evp = (void *)&hp->ev; - if (hp == &h->list) - abort(); - if (h->cursor == hp) { - h->cursor = hp->prev; - if (h->cursor == &h->list) - h->cursor = hp->next; - } - hp->prev->next = hp->next; - hp->next->prev = hp->prev; - h_free((ptr_t) evp->str); - h_free(hp); - h->cur--; -} - - -/* history_def_insert(): - * Insert element with string str in the h list - */ -private int -history_def_insert(history_t *h, TYPE(HistEvent) *ev, const Char *str) -{ - - h->cursor = (hentry_t *) h_malloc(sizeof(hentry_t)); - if (h->cursor == NULL) - goto oomem; - if ((h->cursor->ev.str = h_strdup(str)) == NULL) { - h_free((ptr_t)h->cursor); - goto oomem; - } - h->cursor->data = NULL; - h->cursor->ev.num = ++h->eventid; - h->cursor->next = h->list.next; - h->cursor->prev = &h->list; - h->list.next->prev = h->cursor; - h->list.next = h->cursor; - h->cur++; - - *ev = h->cursor->ev; - return (0); -oomem: - he_seterrev(ev, _HE_MALLOC_FAILED); - return (-1); -} - - -/* history_def_enter(): - * Default function to enter an item in the history - */ -private int -history_def_enter(ptr_t p, TYPE(HistEvent) *ev, const Char *str) -{ - history_t *h = (history_t *) p; - - if ((h->flags & H_UNIQUE) != 0 && h->list.next != &h->list && - Strcmp(h->list.next->ev.str, str) == 0) - return (0); - - if (history_def_insert(h, ev, str) == -1) - return (-1); /* error, keep error message */ - - /* - * Always keep at least one entry. - * This way we don't have to check for the empty list. - */ - while (h->cur > h->max && h->cur > 0) - history_def_delete(h, ev, h->list.prev); - - return (1); -} - - -/* history_def_init(): - * Default history initialization function - */ -/* ARGSUSED */ -private int -history_def_init(ptr_t *p, TYPE(HistEvent) *ev __attribute__((__unused__)), int n) -{ - history_t *h = (history_t *) h_malloc(sizeof(history_t)); - if (h == NULL) - return -1; - - if (n <= 0) - n = 0; - h->eventid = 0; - h->cur = 0; - h->max = n; - h->list.next = h->list.prev = &h->list; - h->list.ev.str = NULL; - h->list.ev.num = 0; - h->cursor = &h->list; - h->flags = 0; - *p = (ptr_t) h; - return 0; -} - - -/* history_def_clear(): - * Default history cleanup function - */ -private void -history_def_clear(ptr_t p, TYPE(HistEvent) *ev) -{ - history_t *h = (history_t *) p; - - while (h->list.prev != &h->list) - history_def_delete(h, ev, h->list.prev); - h->eventid = 0; - h->cur = 0; -} - - - - -/************************************************************************/ - -/* history_init(): - * Initialization function. - */ -public TYPE(History) * -FUN(history,init)(void) -{ - TYPE(HistEvent) ev; - TYPE(History) *h = (TYPE(History) *) h_malloc(sizeof(TYPE(History))); - if (h == NULL) - return NULL; - - if (history_def_init(&h->h_ref, &ev, 0) == -1) { - h_free((ptr_t)h); - return NULL; - } - h->h_ent = -1; - h->h_next = history_def_next; - h->h_first = history_def_first; - h->h_last = history_def_last; - h->h_prev = history_def_prev; - h->h_curr = history_def_curr; - h->h_set = history_def_set; - h->h_clear = history_def_clear; - h->h_enter = history_def_enter; - h->h_add = history_def_add; - h->h_del = history_def_del; - - return (h); -} - - -/* history_end(): - * clean up history; - */ -public void -FUN(history,end)(TYPE(History) *h) -{ - TYPE(HistEvent) ev; - - if (h->h_next == history_def_next) - history_def_clear(h->h_ref, &ev); - h_free(h->h_ref); - h_free(h); -} - - - -/* history_setsize(): - * Set history number of events - */ -private int -history_setsize(TYPE(History) *h, TYPE(HistEvent) *ev, int num) -{ - - if (h->h_next != history_def_next) { - he_seterrev(ev, _HE_NOT_ALLOWED); - return (-1); - } - if (num < 0) { - he_seterrev(ev, _HE_BAD_PARAM); - return (-1); - } - history_def_setsize(h->h_ref, num); - return (0); -} - - -/* history_getsize(): - * Get number of events currently in history - */ -private int -history_getsize(TYPE(History) *h, TYPE(HistEvent) *ev) -{ - if (h->h_next != history_def_next) { - he_seterrev(ev, _HE_NOT_ALLOWED); - return (-1); - } - ev->num = history_def_getsize(h->h_ref); - if (ev->num < -1) { - he_seterrev(ev, _HE_SIZE_NEGATIVE); - return (-1); - } - return (0); -} - - -/* history_setunique(): - * Set if adjacent equal events should not be entered in history. - */ -private int -history_setunique(TYPE(History) *h, TYPE(HistEvent) *ev, int uni) -{ - - if (h->h_next != history_def_next) { - he_seterrev(ev, _HE_NOT_ALLOWED); - return (-1); - } - history_def_setunique(h->h_ref, uni); - return (0); -} - - -/* history_getunique(): - * Get if adjacent equal events should not be entered in history. - */ -private int -history_getunique(TYPE(History) *h, TYPE(HistEvent) *ev) -{ - if (h->h_next != history_def_next) { - he_seterrev(ev, _HE_NOT_ALLOWED); - return (-1); - } - ev->num = history_def_getunique(h->h_ref); - return (0); -} - - -/* history_set_fun(): - * Set history functions - */ -private int -history_set_fun(TYPE(History) *h, TYPE(History) *nh) -{ - TYPE(HistEvent) ev; - - if (nh->h_first == NULL || nh->h_next == NULL || nh->h_last == NULL || - nh->h_prev == NULL || nh->h_curr == NULL || nh->h_set == NULL || - nh->h_enter == NULL || nh->h_add == NULL || nh->h_clear == NULL || - nh->h_del == NULL || nh->h_ref == NULL) { - if (h->h_next != history_def_next) { - history_def_init(&h->h_ref, &ev, 0); - h->h_first = history_def_first; - h->h_next = history_def_next; - h->h_last = history_def_last; - h->h_prev = history_def_prev; - h->h_curr = history_def_curr; - h->h_set = history_def_set; - h->h_clear = history_def_clear; - h->h_enter = history_def_enter; - h->h_add = history_def_add; - h->h_del = history_def_del; - } - return (-1); - } - if (h->h_next == history_def_next) - history_def_clear(h->h_ref, &ev); - - h->h_ent = -1; - h->h_first = nh->h_first; - h->h_next = nh->h_next; - h->h_last = nh->h_last; - h->h_prev = nh->h_prev; - h->h_curr = nh->h_curr; - h->h_set = nh->h_set; - h->h_clear = nh->h_clear; - h->h_enter = nh->h_enter; - h->h_add = nh->h_add; - h->h_del = nh->h_del; - - return (0); -} - - -/* history_load(): - * TYPE(History) load function - */ -private int -history_load(TYPE(History) *h, const char *fname) -{ - FILE *fp; - char *line; - size_t sz, max_size; - char *ptr; - int i = -1; - TYPE(HistEvent) ev; -#ifdef WIDECHAR - static ct_buffer_t conv; -#endif - - if ((fp = fopen(fname, "r")) == NULL) - return (i); - - if ((line = fgetln(fp, &sz)) == NULL) - goto done; - - if (strncmp(line, hist_cookie, sz) != 0) - goto done; - - ptr = h_malloc(max_size = 1024); - if (ptr == NULL) - goto done; - for (i = 0; (line = fgetln(fp, &sz)) != NULL; i++) { - char c = line[sz]; - - if (sz != 0 && line[sz - 1] == '\n') - line[--sz] = '\0'; - else - line[sz] = '\0'; - - if (max_size < sz) { - char *nptr; - max_size = (sz + 1024) & ~1023; - nptr = h_realloc(ptr, max_size); - if (nptr == NULL) { - i = -1; - goto oomem; - } - ptr = nptr; - } - (void) strunvis(ptr, line); - line[sz] = c; - if (HENTER(h, &ev, ct_decode_string(ptr, &conv)) == -1) { - i = -1; - goto oomem; - } - } -oomem: - h_free((ptr_t)ptr); -done: - (void) fclose(fp); - return (i); -} - - -/* history_save(): - * TYPE(History) save function - */ -private int -history_save(TYPE(History) *h, const char *fname) -{ - FILE *fp; - TYPE(HistEvent) ev; - int i = -1, retval; - size_t len, max_size; - char *ptr; -#ifdef WIDECHAR - static ct_buffer_t conv; -#endif - - if ((fp = fopen(fname, "w")) == NULL) - return (-1); - - if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1) - goto done; - if (fputs(hist_cookie, fp) == EOF) - goto done; - ptr = h_malloc(max_size = 1024); - if (ptr == NULL) - goto done; - for (i = 0, retval = HLAST(h, &ev); - retval != -1; - retval = HPREV(h, &ev), i++) { - len = Strlen(ev.str) * 4; - if (len >= max_size) { - char *nptr; - max_size = (len + 1024) & ~1023; - nptr = h_realloc(ptr, max_size); - if (nptr == NULL) { - i = -1; - goto oomem; - } - ptr = nptr; - } - (void) strvis(ptr, ct_encode_string(ev.str, &conv), VIS_WHITE); - (void) fprintf(fp, "%s\n", ptr); - } -oomem: - h_free((ptr_t)ptr); -done: - (void) fclose(fp); - return (i); -} - - -/* history_prev_event(): - * Find the previous event, with number given - */ -private int -history_prev_event(TYPE(History) *h, TYPE(HistEvent) *ev, int num) -{ - int retval; - - for (retval = HCURR(h, ev); retval != -1; retval = HPREV(h, ev)) - if (ev->num == num) - return (0); - - he_seterrev(ev, _HE_NOT_FOUND); - return (-1); -} - - -private int -history_next_evdata(TYPE(History) *h, TYPE(HistEvent) *ev, int num, void **d) -{ - int retval; - - for (retval = HCURR(h, ev); retval != -1; retval = HPREV(h, ev)) - if (ev->num == num) { - if (d) - *d = ((history_t *)h->h_ref)->cursor->data; - return (0); - } - - he_seterrev(ev, _HE_NOT_FOUND); - return (-1); -} - - -/* history_next_event(): - * Find the next event, with number given - */ -private int -history_next_event(TYPE(History) *h, TYPE(HistEvent) *ev, int num) -{ - int retval; - - for (retval = HCURR(h, ev); retval != -1; retval = HNEXT(h, ev)) - if (ev->num == num) - return (0); - - he_seterrev(ev, _HE_NOT_FOUND); - return (-1); -} - - -/* history_prev_string(): - * Find the previous event beginning with string - */ -private int -history_prev_string(TYPE(History) *h, TYPE(HistEvent) *ev, const Char *str) -{ - size_t len = Strlen(str); - int retval; - - for (retval = HCURR(h, ev); retval != -1; retval = HNEXT(h, ev)) - if (Strncmp(str, ev->str, len) == 0) - return (0); - - he_seterrev(ev, _HE_NOT_FOUND); - return (-1); -} - - -/* history_next_string(): - * Find the next event beginning with string - */ -private int -history_next_string(TYPE(History) *h, TYPE(HistEvent) *ev, const Char *str) -{ - size_t len = Strlen(str); - int retval; - - for (retval = HCURR(h, ev); retval != -1; retval = HPREV(h, ev)) - if (Strncmp(str, ev->str, len) == 0) - return (0); - - he_seterrev(ev, _HE_NOT_FOUND); - return (-1); -} - - -/* history(): - * User interface to history functions. - */ -int -FUNW(history)(TYPE(History) *h, TYPE(HistEvent) *ev, int fun, ...) -{ - va_list va; - const Char *str; - int retval; - - va_start(va, fun); - - he_seterrev(ev, _HE_OK); - - switch (fun) { - case H_GETSIZE: - retval = history_getsize(h, ev); - break; - - case H_SETSIZE: - retval = history_setsize(h, ev, va_arg(va, int)); - break; - - case H_GETUNIQUE: - retval = history_getunique(h, ev); - break; - - case H_SETUNIQUE: - retval = history_setunique(h, ev, va_arg(va, int)); - break; - - case H_ADD: - str = va_arg(va, const Char *); - retval = HADD(h, ev, str); - break; - - case H_DEL: - retval = HDEL(h, ev, va_arg(va, const int)); - break; - - case H_ENTER: - str = va_arg(va, const Char *); - if ((retval = HENTER(h, ev, str)) != -1) - h->h_ent = ev->num; - break; - - case H_APPEND: - str = va_arg(va, const Char *); - if ((retval = HSET(h, ev, h->h_ent)) != -1) - retval = HADD(h, ev, str); - break; - - case H_FIRST: - retval = HFIRST(h, ev); - break; - - case H_NEXT: - retval = HNEXT(h, ev); - break; - - case H_LAST: - retval = HLAST(h, ev); - break; - - case H_PREV: - retval = HPREV(h, ev); - break; - - case H_CURR: - retval = HCURR(h, ev); - break; - - case H_SET: - retval = HSET(h, ev, va_arg(va, const int)); - break; - - case H_CLEAR: - HCLEAR(h, ev); - retval = 0; - break; - - case H_LOAD: - retval = history_load(h, va_arg(va, const char *)); - if (retval == -1) - he_seterrev(ev, _HE_HIST_READ); - break; - - case H_SAVE: - retval = history_save(h, va_arg(va, const char *)); - if (retval == -1) - he_seterrev(ev, _HE_HIST_WRITE); - break; - - case H_PREV_EVENT: - retval = history_prev_event(h, ev, va_arg(va, int)); - break; - - case H_NEXT_EVENT: - retval = history_next_event(h, ev, va_arg(va, int)); - break; - - case H_PREV_STR: - retval = history_prev_string(h, ev, va_arg(va, const Char *)); - break; - - case H_NEXT_STR: - retval = history_next_string(h, ev, va_arg(va, const Char *)); - break; - - case H_FUNC: - { - TYPE(History) hf; - - hf.h_ref = va_arg(va, ptr_t); - h->h_ent = -1; - hf.h_first = va_arg(va, history_gfun_t); - hf.h_next = va_arg(va, history_gfun_t); - hf.h_last = va_arg(va, history_gfun_t); - hf.h_prev = va_arg(va, history_gfun_t); - hf.h_curr = va_arg(va, history_gfun_t); - hf.h_set = va_arg(va, history_sfun_t); - hf.h_clear = va_arg(va, history_vfun_t); - hf.h_enter = va_arg(va, history_efun_t); - hf.h_add = va_arg(va, history_efun_t); - hf.h_del = va_arg(va, history_sfun_t); - - if ((retval = history_set_fun(h, &hf)) == -1) - he_seterrev(ev, _HE_PARAM_MISSING); - break; - } - - case H_END: - FUN(history,end)(h); - retval = 0; - break; - - case H_NEXT_EVDATA: - { - int num = va_arg(va, int); - void **d = va_arg(va, void **); - retval = history_next_evdata(h, ev, num, d); - break; - } - - case H_DELDATA: - { - int num = va_arg(va, int); - void **d = va_arg(va, void **); - retval = history_deldata_nth((history_t *)h->h_ref, ev, num, d); - break; - } - - case H_REPLACE: /* only use after H_NEXT_EVDATA */ - { - const Char *line = va_arg(va, const Char *); - void *d = va_arg(va, void *); - const Char *s; - if(!line || !(s = Strdup(line))) { - retval = -1; - break; - } - ((history_t *)h->h_ref)->cursor->ev.str = s; - ((history_t *)h->h_ref)->cursor->data = d; - retval = 0; - break; - } - - default: - retval = -1; - he_seterrev(ev, _HE_UNKNOWN); - break; - } - va_end(va); - return retval; -} diff --git a/kerberosV/src/lib/libedit/src/key.c b/kerberosV/src/lib/libedit/src/key.c deleted file mode 100644 index daf679fd5bb..00000000000 --- a/kerberosV/src/lib/libedit/src/key.c +++ /dev/null @@ -1,665 +0,0 @@ -/* $NetBSD: key.c,v 1.23 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)key.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: key.c,v 1.23 2009/12/30 22:37:40 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * key.c: This module contains the procedures for maintaining - * the extended-key map. - * - * An extended-key (key) is a sequence of keystrokes introduced - * with a sequence introducer and consisting of an arbitrary - * number of characters. This module maintains a map (the el->el_key.map) - * to convert these extended-key sequences into input strs - * (XK_STR), editor functions (XK_CMD), or unix commands (XK_EXE). - * - * Warning: - * If key is a substr of some other keys, then the longer - * keys are lost!! That is, if the keys "abcd" and "abcef" - * are in el->el_key.map, adding the key "abc" will cause the first two - * definitions to be lost. - * - * Restrictions: - * ------------- - * 1) It is not possible to have one key that is a - * substr of another. - */ -#include -#include - -#include "el.h" - -/* - * The Nodes of the el->el_key.map. The el->el_key.map is a linked list - * of these node elements - */ -struct key_node_t { - Char ch; /* single character of key */ - int type; /* node type */ - key_value_t val; /* command code or pointer to str, */ - /* if this is a leaf */ - struct key_node_t *next; /* ptr to next char of this key */ - struct key_node_t *sibling; /* ptr to another key with same prefix*/ -}; - -private int node_trav(EditLine *, key_node_t *, Char *, - key_value_t *); -private int node__try(EditLine *, key_node_t *, const Char *, - key_value_t *, int); -private key_node_t *node__get(Int); -private void node__free(key_node_t *); -private void node__put(EditLine *, key_node_t *); -private int node__delete(EditLine *, key_node_t **, const Char *); -private int node_lookup(EditLine *, const Char *, key_node_t *, - size_t); -private int node_enum(EditLine *, key_node_t *, size_t); - -#define KEY_BUFSIZ EL_BUFSIZ - - -/* key_init(): - * Initialize the key maps - */ -protected int -key_init(EditLine *el) -{ - - el->el_key.buf = el_malloc(KEY_BUFSIZ * sizeof(*el->el_key.buf)); - if (el->el_key.buf == NULL) - return (-1); - el->el_key.map = NULL; - key_reset(el); - return (0); -} - -/* key_end(): - * Free the key maps - */ -protected void -key_end(EditLine *el) -{ - - el_free((ptr_t) el->el_key.buf); - el->el_key.buf = NULL; - node__free(el->el_key.map); -} - - -/* key_map_cmd(): - * Associate cmd with a key value - */ -protected key_value_t * -key_map_cmd(EditLine *el, int cmd) -{ - - el->el_key.val.cmd = (el_action_t) cmd; - return (&el->el_key.val); -} - - -/* key_map_str(): - * Associate str with a key value - */ -protected key_value_t * -key_map_str(EditLine *el, Char *str) -{ - - el->el_key.val.str = str; - return (&el->el_key.val); -} - - -/* key_reset(): - * Takes all nodes on el->el_key.map and puts them on free list. Then - * initializes el->el_key.map with arrow keys - * [Always bind the ansi arrow keys?] - */ -protected void -key_reset(EditLine *el) -{ - - node__put(el, el->el_key.map); - el->el_key.map = NULL; - return; -} - - -/* key_get(): - * Calls the recursive function with entry point el->el_key.map - * Looks up *ch in map and then reads characters until a - * complete match is found or a mismatch occurs. Returns the - * type of the match found (XK_STR, XK_CMD, or XK_EXE). - * Returns NULL in val.str and XK_STR for no match. - * The last character read is returned in *ch. - */ -protected int -key_get(EditLine *el, Char *ch, key_value_t *val) -{ - - return (node_trav(el, el->el_key.map, ch, val)); -} - - -/* key_add(): - * Adds key to the el->el_key.map and associates the value in val with it. - * If key is already is in el->el_key.map, the new code is applied to the - * existing key. Ntype specifies if code is a command, an - * out str or a unix command. - */ -protected void -key_add(EditLine *el, const Char *key, key_value_t *val, int ntype) -{ - - if (key[0] == '\0') { - (void) fprintf(el->el_errfile, - "key_add: Null extended-key not allowed.\n"); - return; - } - if (ntype == XK_CMD && val->cmd == ED_SEQUENCE_LEAD_IN) { - (void) fprintf(el->el_errfile, - "key_add: sequence-lead-in command not allowed\n"); - return; - } - if (el->el_key.map == NULL) - /* tree is initially empty. Set up new node to match key[0] */ - el->el_key.map = node__get(key[0]); - /* it is properly initialized */ - - /* Now recurse through el->el_key.map */ - (void) node__try(el, el->el_key.map, key, val, ntype); - return; -} - - -/* key_clear(): - * - */ -protected void -key_clear(EditLine *el, el_action_t *map, const Char *in) -{ -#ifdef WIDECHAR - if (*in > N_KEYS) /* can't be in the map */ - return; -#endif - if ((map[(unsigned char)*in] == ED_SEQUENCE_LEAD_IN) && - ((map == el->el_map.key && - el->el_map.alt[(unsigned char)*in] != ED_SEQUENCE_LEAD_IN) || - (map == el->el_map.alt && - el->el_map.key[(unsigned char)*in] != ED_SEQUENCE_LEAD_IN))) - (void) key_delete(el, in); -} - - -/* key_delete(): - * Delete the key and all longer keys staring with key, if - * they exists. - */ -protected int -key_delete(EditLine *el, const Char *key) -{ - - if (key[0] == '\0') { - (void) fprintf(el->el_errfile, - "key_delete: Null extended-key not allowed.\n"); - return (-1); - } - if (el->el_key.map == NULL) - return (0); - - (void) node__delete(el, &el->el_key.map, key); - return (0); -} - - -/* key_print(): - * Print the binding associated with key key. - * Print entire el->el_key.map if null - */ -protected void -key_print(EditLine *el, const Char *key) -{ - - /* do nothing if el->el_key.map is empty and null key specified */ - if (el->el_key.map == NULL && *key == 0) - return; - - el->el_key.buf[0] = '"'; - if (node_lookup(el, key, el->el_key.map, 1) <= -1) - /* key is not bound */ - (void) fprintf(el->el_errfile, "Unbound extended key \"" FSTR "\"\n", - key); - return; -} - - -/* node_trav(): - * recursively traverses node in tree until match or mismatch is - * found. May read in more characters. - */ -private int -node_trav(EditLine *el, key_node_t *ptr, Char *ch, key_value_t *val) -{ - - if (ptr->ch == *ch) { - /* match found */ - if (ptr->next) { - /* key not complete so get next char */ - if (FUN(el,getc)(el, ch) != 1) {/* if EOF or error */ - val->cmd = ED_END_OF_FILE; - return (XK_CMD); - /* PWP: Pretend we just read an end-of-file */ - } - return (node_trav(el, ptr->next, ch, val)); - } else { - *val = ptr->val; - if (ptr->type != XK_CMD) - *ch = '\0'; - return (ptr->type); - } - } else { - /* no match found here */ - if (ptr->sibling) { - /* try next sibling */ - return (node_trav(el, ptr->sibling, ch, val)); - } else { - /* no next sibling -- mismatch */ - val->str = NULL; - return (XK_STR); - } - } -} - - -/* node__try(): - * Find a node that matches *str or allocate a new one - */ -private int -node__try(EditLine *el, key_node_t *ptr, const Char *str, key_value_t *val, int ntype) -{ - - if (ptr->ch != *str) { - key_node_t *xm; - - for (xm = ptr; xm->sibling != NULL; xm = xm->sibling) - if (xm->sibling->ch == *str) - break; - if (xm->sibling == NULL) - xm->sibling = node__get(*str); /* setup new node */ - ptr = xm->sibling; - } - if (*++str == '\0') { - /* we're there */ - if (ptr->next != NULL) { - node__put(el, ptr->next); - /* lose longer keys with this prefix */ - ptr->next = NULL; - } - switch (ptr->type) { - case XK_CMD: - case XK_NOD: - break; - case XK_STR: - case XK_EXE: - if (ptr->val.str) - el_free((ptr_t) ptr->val.str); - break; - default: - EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", - ptr->type)); - break; - } - - switch (ptr->type = ntype) { - case XK_CMD: - ptr->val = *val; - break; - case XK_STR: - case XK_EXE: - if ((ptr->val.str = Strdup(val->str)) == NULL) - return -1; - break; - default: - EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", ntype)); - break; - } - } else { - /* still more chars to go */ - if (ptr->next == NULL) - ptr->next = node__get(*str); /* setup new node */ - (void) node__try(el, ptr->next, str, val, ntype); - } - return (0); -} - - -/* node__delete(): - * Delete node that matches str - */ -private int -node__delete(EditLine *el, key_node_t **inptr, const Char *str) -{ - key_node_t *ptr; - key_node_t *prev_ptr = NULL; - - ptr = *inptr; - - if (ptr->ch != *str) { - key_node_t *xm; - - for (xm = ptr; xm->sibling != NULL; xm = xm->sibling) - if (xm->sibling->ch == *str) - break; - if (xm->sibling == NULL) - return (0); - prev_ptr = xm; - ptr = xm->sibling; - } - if (*++str == '\0') { - /* we're there */ - if (prev_ptr == NULL) - *inptr = ptr->sibling; - else - prev_ptr->sibling = ptr->sibling; - ptr->sibling = NULL; - node__put(el, ptr); - return (1); - } else if (ptr->next != NULL && - node__delete(el, &ptr->next, str) == 1) { - if (ptr->next != NULL) - return (0); - if (prev_ptr == NULL) - *inptr = ptr->sibling; - else - prev_ptr->sibling = ptr->sibling; - ptr->sibling = NULL; - node__put(el, ptr); - return (1); - } else { - return (0); - } -} - - -/* node__put(): - * Puts a tree of nodes onto free list using free(3). - */ -private void -node__put(EditLine *el, key_node_t *ptr) -{ - if (ptr == NULL) - return; - - if (ptr->next != NULL) { - node__put(el, ptr->next); - ptr->next = NULL; - } - node__put(el, ptr->sibling); - - switch (ptr->type) { - case XK_CMD: - case XK_NOD: - break; - case XK_EXE: - case XK_STR: - if (ptr->val.str != NULL) - el_free((ptr_t) ptr->val.str); - break; - default: - EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", ptr->type)); - break; - } - el_free((ptr_t) ptr); -} - - -/* node__get(): - * Returns pointer to a key_node_t for ch. - */ -private key_node_t * -node__get(Int ch) -{ - key_node_t *ptr; - - ptr = (key_node_t *) el_malloc((size_t) sizeof(key_node_t)); - if (ptr == NULL) - return NULL; - ptr->ch = ch; - ptr->type = XK_NOD; - ptr->val.str = NULL; - ptr->next = NULL; - ptr->sibling = NULL; - return (ptr); -} - -private void -node__free(key_node_t *k) -{ - if (k == NULL) - return; - node__free(k->sibling); - node__free(k->next); - el_free((ptr_t) k); -} - -/* node_lookup(): - * look for the str starting at node ptr. - * Print if last node - */ -private int -node_lookup(EditLine *el, const Char *str, key_node_t *ptr, size_t cnt) -{ - ssize_t used; - - if (ptr == NULL) - return (-1); /* cannot have null ptr */ - - if (!str || *str == 0) { - /* no more chars in str. node_enum from here. */ - (void) node_enum(el, ptr, cnt); - return (0); - } else { - /* If match put this char into el->el_key.buf. Recurse */ - if (ptr->ch == *str) { - /* match found */ - used = ct_visual_char(el->el_key.buf + cnt, - KEY_BUFSIZ - cnt, ptr->ch); - if (used == -1) - return (-1); /* ran out of buffer space */ - if (ptr->next != NULL) - /* not yet at leaf */ - return (node_lookup(el, str + 1, ptr->next, - used + cnt)); - else { - /* next node is null so key should be complete */ - if (str[1] == 0) { - el->el_key.buf[cnt + used ] = '"'; - el->el_key.buf[cnt + used + 1] = '\0'; - key_kprint(el, el->el_key.buf, - &ptr->val, ptr->type); - return (0); - } else - return (-1); - /* mismatch -- str still has chars */ - } - } else { - /* no match found try sibling */ - if (ptr->sibling) - return (node_lookup(el, str, ptr->sibling, - cnt)); - else - return (-1); - } - } -} - - -/* node_enum(): - * Traverse the node printing the characters it is bound in buffer - */ -private int -node_enum(EditLine *el, key_node_t *ptr, size_t cnt) -{ - ssize_t used; - - if (cnt >= KEY_BUFSIZ - 5) { /* buffer too small */ - el->el_key.buf[++cnt] = '"'; - el->el_key.buf[++cnt] = '\0'; - (void) fprintf(el->el_errfile, - "Some extended keys too long for internal print buffer"); - (void) fprintf(el->el_errfile, " \"" FSTR "...\"\n", el->el_key.buf); - return (0); - } - if (ptr == NULL) { -#ifdef DEBUG_EDIT - (void) fprintf(el->el_errfile, - "node_enum: BUG!! Null ptr passed\n!"); -#endif - return (-1); - } - /* put this char at end of str */ - used = ct_visual_char(el->el_key.buf + cnt, KEY_BUFSIZ - cnt, ptr->ch); - if (ptr->next == NULL) { - /* print this key and function */ - el->el_key.buf[cnt + used ] = '"'; - el->el_key.buf[cnt + used + 1] = '\0'; - key_kprint(el, el->el_key.buf, &ptr->val, ptr->type); - } else - (void) node_enum(el, ptr->next, cnt + used); - - /* go to sibling if there is one */ - if (ptr->sibling) - (void) node_enum(el, ptr->sibling, cnt); - return (0); -} - - -/* key_kprint(): - * Print the specified key and its associated - * function specified by val - */ -protected void -key_kprint(EditLine *el, const Char *key, key_value_t *val, int ntype) -{ - el_bindings_t *fp; - char unparsbuf[EL_BUFSIZ]; - static const char fmt[] = "%-15s-> %s\n"; - - if (val != NULL) - switch (ntype) { - case XK_STR: - case XK_EXE: - (void) key__decode_str(val->str, unparsbuf, - sizeof(unparsbuf), - ntype == XK_STR ? "\"\"" : "[]"); - (void) fprintf(el->el_outfile, fmt, - ct_encode_string(key, &el->el_scratch), unparsbuf); - break; - case XK_CMD: - for (fp = el->el_map.help; fp->name; fp++) - if (val->cmd == fp->func) { - ct_wcstombs(unparsbuf, fp->name, sizeof(unparsbuf)); - unparsbuf[sizeof(unparsbuf) -1] = '\0'; - (void) fprintf(el->el_outfile, fmt, - ct_encode_string(key, &el->el_scratch), unparsbuf); - break; - } -#ifdef DEBUG_KEY - if (fp->name == NULL) - (void) fprintf(el->el_outfile, - "BUG! Command not found.\n"); -#endif - - break; - default: - EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", ntype)); - break; - } - else - (void) fprintf(el->el_outfile, fmt, ct_encode_string(key, - &el->el_scratch), "no input"); -} - - -#define ADDC(c) \ - if (b < eb) \ - *b++ = c; \ - else \ - b++ -/* key__decode_str(): - * Make a printable version of the ey - */ -protected size_t -key__decode_str(const Char *str, char *buf, size_t len, const char *sep) -{ - char *b = buf, *eb = b + len; - const Char *p; - - b = buf; - if (sep[0] != '\0') { - ADDC(sep[0]); - } - if (*str == '\0') { - ADDC('^'); - ADDC('@'); - goto add_endsep; - } - for (p = str; *p != 0; p++) { - Char dbuf[VISUAL_WIDTH_MAX]; - Char *p2 = dbuf; - ssize_t l = ct_visual_char(dbuf, VISUAL_WIDTH_MAX, *p); - while (l-- > 0) { - ssize_t n = ct_encode_char(b, (size_t)(eb - b), *p2++); - if (n == -1) /* ran out of space */ - goto add_endsep; - else - b += n; - } - } -add_endsep: - if (sep[0] != '\0' && sep[1] != '\0') { - ADDC(sep[1]); - } - ADDC('\0'); - if ((size_t)(b - buf) >= len) - buf[len - 1] = '\0'; - return (size_t)(b - buf); -} - diff --git a/kerberosV/src/lib/libedit/src/key.h b/kerberosV/src/lib/libedit/src/key.h deleted file mode 100644 index 8f067a0647c..00000000000 --- a/kerberosV/src/lib/libedit/src/key.h +++ /dev/null @@ -1,80 +0,0 @@ -/* $NetBSD: key.h,v 1.13 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)key.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.key.h: Key macro header - */ -#ifndef _h_el_key -#define _h_el_key - -typedef union key_value_t { - el_action_t cmd; /* If it is a command the # */ - Char *str; /* If it is a string... */ -} key_value_t; - -typedef struct key_node_t key_node_t; - -typedef struct el_key_t { - Char *buf; /* Key print buffer */ - key_node_t *map; /* Key map */ - key_value_t val; /* Local conversion buffer */ -} el_key_t; - -#define XK_CMD 0 -#define XK_STR 1 -#define XK_NOD 2 -#define XK_EXE 3 - -#undef key_end -#undef key_clear -#undef key_print - -protected int key_init(EditLine *); -protected void key_end(EditLine *); -protected key_value_t *key_map_cmd(EditLine *, int); -protected key_value_t *key_map_str(EditLine *, Char *); -protected void key_reset(EditLine *); -protected int key_get(EditLine *, Char *, key_value_t *); -protected void key_add(EditLine *, const Char *, key_value_t *, int); -protected void key_clear(EditLine *, el_action_t *, const Char *); -protected int key_delete(EditLine *, const Char *); -protected void key_print(EditLine *, const Char *); -protected void key_kprint(EditLine *, const Char *, key_value_t *, - int); -protected size_t key__decode_str(const Char *, char *, size_t, - const char *); - -#endif /* _h_el_key */ diff --git a/kerberosV/src/lib/libedit/src/makelist b/kerberosV/src/lib/libedit/src/makelist deleted file mode 100644 index 662bc0704b4..00000000000 --- a/kerberosV/src/lib/libedit/src/makelist +++ /dev/null @@ -1,258 +0,0 @@ -#!/bin/sh - -# $NetBSD: makelist,v 1.16 2010/04/18 21:17:05 christos 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 -# Christos Zoulas of Cornell University. -# -# 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 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. -# -# @(#)makelist 5.3 (Berkeley) 6/4/93 - -# makelist.sh: Automatically generate header files... - -USAGE="Usage: $0 -n|-h|-e|-fc|-fh|-bc|-bh|-m " - -if [ "x$1" = "x" ] -then - echo $USAGE 1>&2 - exit 1 -fi - -FLAG="$1" -shift - -FILES="$@" - -case $FLAG in - -# generate foo.h file from foo.c -# --n) - cat << _EOF -#include "config.h" -#undef WIDECHAR -#define NARROWCHAR -#include "${FILES}" -_EOF - ;; - --h) - set - `echo $FILES | sed -e 's/\\./_/g'` - hdr="_h_`basename $1`" - cat $FILES | $AWK ' - BEGIN { - printf("/* Automatically generated file, do not edit */\n"); - printf("#ifndef %s\n#define %s\n", "'$hdr'", "'$hdr'"); - } - /\(\):/ { - pr = substr($2, 1, 2); - if (pr == "vi" || pr == "em" || pr == "ed") { - name = substr($2, 1, length($2) - 3); -# -# XXX: need a space between name and prototype so that -fc and -fh -# parsing is much easier -# - printf("protected el_action_t\t%s (EditLine *, Int);\n", name); - } - } - END { - printf("#endif /* %s */\n", "'$hdr'"); - }' - ;; - -# generate help.c from various .c files -# --bc) - cat $FILES | $AWK ' - BEGIN { - printf("/* Automatically generated file, do not edit */\n"); - printf("#include \"config.h\"\n#include \"el.h\"\n"); - printf("#include \"chartype.h\"\n"); - printf("private const struct el_bindings_t el_func_help[] = {\n"); - low = "abcdefghijklmnopqrstuvwxyz_"; - high = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_"; - for (i = 1; i <= length(low); i++) - tr[substr(low, i, 1)] = substr(high, i, 1); - } - /\(\):/ { - pr = substr($2, 1, 2); - if (pr == "vi" || pr == "em" || pr == "ed") { - name = substr($2, 1, length($2) - 3); - uname = ""; - fname = ""; - for (i = 1; i <= length(name); i++) { - s = substr(name, i, 1); - uname = uname tr[s]; - if (s == "_") - s = "-"; - fname = fname s; - } - - printf(" { %-30.30s %-30.30s\n","STR(\"" fname "\"),", uname ","); - ok = 1; - } - } - /^ \*/ { - if (ok) { - printf(" STR(\""); - for (i = 2; i < NF; i++) - printf("%s ", $i); - printf("%s\") },\n", $i); - ok = 0; - } - } - END { - printf("};\n"); - printf("\nprotected const el_bindings_t* help__get()"); - printf("{ return el_func_help; }\n"); - }' - ;; - -# generate help.h from various .c files -# --bh) - $AWK ' - BEGIN { - printf("/* Automatically generated file, do not edit */\n"); - printf("#ifndef _h_help_c\n#define _h_help_c\n"); - printf("protected const el_bindings_t *help__get(void);\n"); - printf("#endif /* _h_help_c */\n"); - }' /dev/null - ;; - -# generate fcns.h from various .h files -# --fh) - cat $FILES | $AWK '/el_action_t/ { print $3 }' | \ - sort | tr '[a-z]' '[A-Z]' | $AWK ' - BEGIN { - printf("/* Automatically generated file, do not edit */\n"); - printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n"); - count = 0; - } - { - printf("#define\t%-30.30s\t%3d\n", $1, count++); - } - END { - printf("#define\t%-30.30s\t%3d\n", "EL_NUM_FCNS", count); - - printf("typedef el_action_t (*el_func_t)(EditLine *, Int);"); - printf("\nprotected const el_func_t* func__get(void);\n"); - printf("#endif /* _h_fcns_c */\n"); - }' - ;; - -# generate fcns.c from various .h files -# --fc) - cat $FILES | $AWK '/el_action_t/ { print $3 }' | sort | $AWK ' - BEGIN { - printf("/* Automatically generated file, do not edit */\n"); - printf("#include \"config.h\"\n#include \"el.h\"\n"); - printf("private const el_func_t el_func[] = {"); - maxlen = 80; - needn = 1; - len = 0; - } - { - clen = 25 + 2; - len += clen; - if (len >= maxlen) - needn = 1; - if (needn) { - printf("\n "); - needn = 0; - len = 4 + clen; - } - s = $1 ","; - printf("%-26.26s ", s); - } - END { - printf("\n};\n"); - printf("\nprotected const el_func_t* func__get() { return el_func; }\n"); - }' - ;; - -# generate editline.c from various .c files -# --e) - echo "$FILES" | tr ' ' '\012' | $AWK ' - BEGIN { - printf("/* Automatically generated file, do not edit */\n"); - printf("#define protected static\n"); - printf("#define SCCSID\n"); - } - { - printf("#include \"%s\"\n", $1); - }' - ;; - -# generate man page fragment from various .c files -# --m) - cat $FILES | $AWK ' - BEGIN { - printf(".\\\" Section automatically generated with makelist\n"); - printf(".Bl -tag -width 4n\n"); - } - /\(\):/ { - pr = substr($2, 1, 2); - if (pr == "vi" || pr == "em" || pr == "ed") { - name = substr($2, 1, length($2) - 3); - fname = ""; - for (i = 1; i <= length(name); i++) { - s = substr(name, i, 1); - if (s == "_") - s = "-"; - fname = fname s; - } - - printf(".It Ic %s\n", fname); - ok = 1; - } - } - /^ \*/ { - if (ok) { - for (i = 2; i < NF; i++) - printf("%s ", $i); - printf("%s.\n", $i); - ok = 0; - } - } - END { - printf(".El\n"); - printf(".\\\" End of section automatically generated with makelist\n"); - }' - ;; - -*) - echo $USAGE 1>&2 - exit 1 - ;; - -esac diff --git a/kerberosV/src/lib/libedit/src/map.c b/kerberosV/src/lib/libedit/src/map.c deleted file mode 100644 index e622060faff..00000000000 --- a/kerberosV/src/lib/libedit/src/map.c +++ /dev/null @@ -1,1421 +0,0 @@ -/* $NetBSD: map.c,v 1.25 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: map.c,v 1.25 2009/12/30 22:37:40 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * map.c: Editor function definitions - */ -#include -#include "el.h" - -private void map_print_key(EditLine *, el_action_t *, const Char *); -private void map_print_some_keys(EditLine *, el_action_t *, Int, Int); -private void map_print_all_keys(EditLine *); -private void map_init_nls(EditLine *); -private void map_init_meta(EditLine *); - -/* keymap tables ; should be N_KEYS*sizeof(KEYCMD) bytes long */ - - -private const el_action_t el_map_emacs[] = { - /* 0 */ EM_SET_MARK, /* ^@ */ - /* 1 */ ED_MOVE_TO_BEG, /* ^A */ - /* 2 */ ED_PREV_CHAR, /* ^B */ - /* 3 */ ED_TTY_SIGINT, /* ^C */ - /* 4 */ EM_DELETE_OR_LIST, /* ^D */ - /* 5 */ ED_MOVE_TO_END, /* ^E */ - /* 6 */ ED_NEXT_CHAR, /* ^F */ - /* 7 */ ED_UNASSIGNED, /* ^G */ - /* 8 */ EM_DELETE_PREV_CHAR, /* ^H */ - /* 9 */ ED_UNASSIGNED, /* ^I */ - /* 10 */ ED_NEWLINE, /* ^J */ - /* 11 */ ED_KILL_LINE, /* ^K */ - /* 12 */ ED_CLEAR_SCREEN, /* ^L */ - /* 13 */ ED_NEWLINE, /* ^M */ - /* 14 */ ED_NEXT_HISTORY, /* ^N */ - /* 15 */ ED_TTY_FLUSH_OUTPUT, /* ^O */ - /* 16 */ ED_PREV_HISTORY, /* ^P */ - /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */ - /* 18 */ ED_REDISPLAY, /* ^R */ - /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */ - /* 20 */ ED_TRANSPOSE_CHARS, /* ^T */ - /* 21 */ EM_KILL_LINE, /* ^U */ - /* 22 */ ED_QUOTED_INSERT, /* ^V */ - /* 23 */ EM_KILL_REGION, /* ^W */ - /* 24 */ ED_SEQUENCE_LEAD_IN, /* ^X */ - /* 25 */ EM_YANK, /* ^Y */ - /* 26 */ ED_TTY_SIGTSTP, /* ^Z */ - /* 27 */ EM_META_NEXT, /* ^[ */ - /* 28 */ ED_TTY_SIGQUIT, /* ^\ */ - /* 29 */ ED_TTY_DSUSP, /* ^] */ - /* 30 */ ED_UNASSIGNED, /* ^^ */ - /* 31 */ ED_UNASSIGNED, /* ^_ */ - /* 32 */ ED_INSERT, /* SPACE */ - /* 33 */ ED_INSERT, /* ! */ - /* 34 */ ED_INSERT, /* " */ - /* 35 */ ED_INSERT, /* # */ - /* 36 */ ED_INSERT, /* $ */ - /* 37 */ ED_INSERT, /* % */ - /* 38 */ ED_INSERT, /* & */ - /* 39 */ ED_INSERT, /* ' */ - /* 40 */ ED_INSERT, /* ( */ - /* 41 */ ED_INSERT, /* ) */ - /* 42 */ ED_INSERT, /* * */ - /* 43 */ ED_INSERT, /* + */ - /* 44 */ ED_INSERT, /* , */ - /* 45 */ ED_INSERT, /* - */ - /* 46 */ ED_INSERT, /* . */ - /* 47 */ ED_INSERT, /* / */ - /* 48 */ ED_DIGIT, /* 0 */ - /* 49 */ ED_DIGIT, /* 1 */ - /* 50 */ ED_DIGIT, /* 2 */ - /* 51 */ ED_DIGIT, /* 3 */ - /* 52 */ ED_DIGIT, /* 4 */ - /* 53 */ ED_DIGIT, /* 5 */ - /* 54 */ ED_DIGIT, /* 6 */ - /* 55 */ ED_DIGIT, /* 7 */ - /* 56 */ ED_DIGIT, /* 8 */ - /* 57 */ ED_DIGIT, /* 9 */ - /* 58 */ ED_INSERT, /* : */ - /* 59 */ ED_INSERT, /* ; */ - /* 60 */ ED_INSERT, /* < */ - /* 61 */ ED_INSERT, /* = */ - /* 62 */ ED_INSERT, /* > */ - /* 63 */ ED_INSERT, /* ? */ - /* 64 */ ED_INSERT, /* @ */ - /* 65 */ ED_INSERT, /* A */ - /* 66 */ ED_INSERT, /* B */ - /* 67 */ ED_INSERT, /* C */ - /* 68 */ ED_INSERT, /* D */ - /* 69 */ ED_INSERT, /* E */ - /* 70 */ ED_INSERT, /* F */ - /* 71 */ ED_INSERT, /* G */ - /* 72 */ ED_INSERT, /* H */ - /* 73 */ ED_INSERT, /* I */ - /* 74 */ ED_INSERT, /* J */ - /* 75 */ ED_INSERT, /* K */ - /* 76 */ ED_INSERT, /* L */ - /* 77 */ ED_INSERT, /* M */ - /* 78 */ ED_INSERT, /* N */ - /* 79 */ ED_INSERT, /* O */ - /* 80 */ ED_INSERT, /* P */ - /* 81 */ ED_INSERT, /* Q */ - /* 82 */ ED_INSERT, /* R */ - /* 83 */ ED_INSERT, /* S */ - /* 84 */ ED_INSERT, /* T */ - /* 85 */ ED_INSERT, /* U */ - /* 86 */ ED_INSERT, /* V */ - /* 87 */ ED_INSERT, /* W */ - /* 88 */ ED_INSERT, /* X */ - /* 89 */ ED_INSERT, /* Y */ - /* 90 */ ED_INSERT, /* Z */ - /* 91 */ ED_INSERT, /* [ */ - /* 92 */ ED_INSERT, /* \ */ - /* 93 */ ED_INSERT, /* ] */ - /* 94 */ ED_INSERT, /* ^ */ - /* 95 */ ED_INSERT, /* _ */ - /* 96 */ ED_INSERT, /* ` */ - /* 97 */ ED_INSERT, /* a */ - /* 98 */ ED_INSERT, /* b */ - /* 99 */ ED_INSERT, /* c */ - /* 100 */ ED_INSERT, /* d */ - /* 101 */ ED_INSERT, /* e */ - /* 102 */ ED_INSERT, /* f */ - /* 103 */ ED_INSERT, /* g */ - /* 104 */ ED_INSERT, /* h */ - /* 105 */ ED_INSERT, /* i */ - /* 106 */ ED_INSERT, /* j */ - /* 107 */ ED_INSERT, /* k */ - /* 108 */ ED_INSERT, /* l */ - /* 109 */ ED_INSERT, /* m */ - /* 110 */ ED_INSERT, /* n */ - /* 111 */ ED_INSERT, /* o */ - /* 112 */ ED_INSERT, /* p */ - /* 113 */ ED_INSERT, /* q */ - /* 114 */ ED_INSERT, /* r */ - /* 115 */ ED_INSERT, /* s */ - /* 116 */ ED_INSERT, /* t */ - /* 117 */ ED_INSERT, /* u */ - /* 118 */ ED_INSERT, /* v */ - /* 119 */ ED_INSERT, /* w */ - /* 120 */ ED_INSERT, /* x */ - /* 121 */ ED_INSERT, /* y */ - /* 122 */ ED_INSERT, /* z */ - /* 123 */ ED_INSERT, /* { */ - /* 124 */ ED_INSERT, /* | */ - /* 125 */ ED_INSERT, /* } */ - /* 126 */ ED_INSERT, /* ~ */ - /* 127 */ EM_DELETE_PREV_CHAR, /* ^? */ - /* 128 */ ED_UNASSIGNED, /* M-^@ */ - /* 129 */ ED_UNASSIGNED, /* M-^A */ - /* 130 */ ED_UNASSIGNED, /* M-^B */ - /* 131 */ ED_UNASSIGNED, /* M-^C */ - /* 132 */ ED_UNASSIGNED, /* M-^D */ - /* 133 */ ED_UNASSIGNED, /* M-^E */ - /* 134 */ ED_UNASSIGNED, /* M-^F */ - /* 135 */ ED_UNASSIGNED, /* M-^G */ - /* 136 */ ED_DELETE_PREV_WORD, /* M-^H */ - /* 137 */ ED_UNASSIGNED, /* M-^I */ - /* 138 */ ED_UNASSIGNED, /* M-^J */ - /* 139 */ ED_UNASSIGNED, /* M-^K */ - /* 140 */ ED_CLEAR_SCREEN, /* M-^L */ - /* 141 */ ED_UNASSIGNED, /* M-^M */ - /* 142 */ ED_UNASSIGNED, /* M-^N */ - /* 143 */ ED_UNASSIGNED, /* M-^O */ - /* 144 */ ED_UNASSIGNED, /* M-^P */ - /* 145 */ ED_UNASSIGNED, /* M-^Q */ - /* 146 */ ED_UNASSIGNED, /* M-^R */ - /* 147 */ ED_UNASSIGNED, /* M-^S */ - /* 148 */ ED_UNASSIGNED, /* M-^T */ - /* 149 */ ED_UNASSIGNED, /* M-^U */ - /* 150 */ ED_UNASSIGNED, /* M-^V */ - /* 151 */ ED_UNASSIGNED, /* M-^W */ - /* 152 */ ED_UNASSIGNED, /* M-^X */ - /* 153 */ ED_UNASSIGNED, /* M-^Y */ - /* 154 */ ED_UNASSIGNED, /* M-^Z */ - /* 155 */ ED_UNASSIGNED, /* M-^[ */ - /* 156 */ ED_UNASSIGNED, /* M-^\ */ - /* 157 */ ED_UNASSIGNED, /* M-^] */ - /* 158 */ ED_UNASSIGNED, /* M-^^ */ - /* 159 */ EM_COPY_PREV_WORD, /* M-^_ */ - /* 160 */ ED_UNASSIGNED, /* M-SPACE */ - /* 161 */ ED_UNASSIGNED, /* M-! */ - /* 162 */ ED_UNASSIGNED, /* M-" */ - /* 163 */ ED_UNASSIGNED, /* M-# */ - /* 164 */ ED_UNASSIGNED, /* M-$ */ - /* 165 */ ED_UNASSIGNED, /* M-% */ - /* 166 */ ED_UNASSIGNED, /* M-& */ - /* 167 */ ED_UNASSIGNED, /* M-' */ - /* 168 */ ED_UNASSIGNED, /* M-( */ - /* 169 */ ED_UNASSIGNED, /* M-) */ - /* 170 */ ED_UNASSIGNED, /* M-* */ - /* 171 */ ED_UNASSIGNED, /* M-+ */ - /* 172 */ ED_UNASSIGNED, /* M-, */ - /* 173 */ ED_UNASSIGNED, /* M-- */ - /* 174 */ ED_UNASSIGNED, /* M-. */ - /* 175 */ ED_UNASSIGNED, /* M-/ */ - /* 176 */ ED_ARGUMENT_DIGIT, /* M-0 */ - /* 177 */ ED_ARGUMENT_DIGIT, /* M-1 */ - /* 178 */ ED_ARGUMENT_DIGIT, /* M-2 */ - /* 179 */ ED_ARGUMENT_DIGIT, /* M-3 */ - /* 180 */ ED_ARGUMENT_DIGIT, /* M-4 */ - /* 181 */ ED_ARGUMENT_DIGIT, /* M-5 */ - /* 182 */ ED_ARGUMENT_DIGIT, /* M-6 */ - /* 183 */ ED_ARGUMENT_DIGIT, /* M-7 */ - /* 184 */ ED_ARGUMENT_DIGIT, /* M-8 */ - /* 185 */ ED_ARGUMENT_DIGIT, /* M-9 */ - /* 186 */ ED_UNASSIGNED, /* M-: */ - /* 187 */ ED_UNASSIGNED, /* M-; */ - /* 188 */ ED_UNASSIGNED, /* M-< */ - /* 189 */ ED_UNASSIGNED, /* M-= */ - /* 190 */ ED_UNASSIGNED, /* M-> */ - /* 191 */ ED_UNASSIGNED, /* M-? */ - /* 192 */ ED_UNASSIGNED, /* M-@ */ - /* 193 */ ED_UNASSIGNED, /* M-A */ - /* 194 */ ED_PREV_WORD, /* M-B */ - /* 195 */ EM_CAPITOL_CASE, /* M-C */ - /* 196 */ EM_DELETE_NEXT_WORD, /* M-D */ - /* 197 */ ED_UNASSIGNED, /* M-E */ - /* 198 */ EM_NEXT_WORD, /* M-F */ - /* 199 */ ED_UNASSIGNED, /* M-G */ - /* 200 */ ED_UNASSIGNED, /* M-H */ - /* 201 */ ED_UNASSIGNED, /* M-I */ - /* 202 */ ED_UNASSIGNED, /* M-J */ - /* 203 */ ED_UNASSIGNED, /* M-K */ - /* 204 */ EM_LOWER_CASE, /* M-L */ - /* 205 */ ED_UNASSIGNED, /* M-M */ - /* 206 */ ED_SEARCH_NEXT_HISTORY, /* M-N */ - /* 207 */ ED_SEQUENCE_LEAD_IN, /* M-O */ - /* 208 */ ED_SEARCH_PREV_HISTORY, /* M-P */ - /* 209 */ ED_UNASSIGNED, /* M-Q */ - /* 210 */ ED_UNASSIGNED, /* M-R */ - /* 211 */ ED_UNASSIGNED, /* M-S */ - /* 212 */ ED_UNASSIGNED, /* M-T */ - /* 213 */ EM_UPPER_CASE, /* M-U */ - /* 214 */ ED_UNASSIGNED, /* M-V */ - /* 215 */ EM_COPY_REGION, /* M-W */ - /* 216 */ ED_COMMAND, /* M-X */ - /* 217 */ ED_UNASSIGNED, /* M-Y */ - /* 218 */ ED_UNASSIGNED, /* M-Z */ - /* 219 */ ED_SEQUENCE_LEAD_IN, /* M-[ */ - /* 220 */ ED_UNASSIGNED, /* M-\ */ - /* 221 */ ED_UNASSIGNED, /* M-] */ - /* 222 */ ED_UNASSIGNED, /* M-^ */ - /* 223 */ ED_UNASSIGNED, /* M-_ */ - /* 223 */ ED_UNASSIGNED, /* M-` */ - /* 224 */ ED_UNASSIGNED, /* M-a */ - /* 225 */ ED_PREV_WORD, /* M-b */ - /* 226 */ EM_CAPITOL_CASE, /* M-c */ - /* 227 */ EM_DELETE_NEXT_WORD, /* M-d */ - /* 228 */ ED_UNASSIGNED, /* M-e */ - /* 229 */ EM_NEXT_WORD, /* M-f */ - /* 230 */ ED_UNASSIGNED, /* M-g */ - /* 231 */ ED_UNASSIGNED, /* M-h */ - /* 232 */ ED_UNASSIGNED, /* M-i */ - /* 233 */ ED_UNASSIGNED, /* M-j */ - /* 234 */ ED_UNASSIGNED, /* M-k */ - /* 235 */ EM_LOWER_CASE, /* M-l */ - /* 236 */ ED_UNASSIGNED, /* M-m */ - /* 237 */ ED_SEARCH_NEXT_HISTORY, /* M-n */ - /* 238 */ ED_UNASSIGNED, /* M-o */ - /* 239 */ ED_SEARCH_PREV_HISTORY, /* M-p */ - /* 240 */ ED_UNASSIGNED, /* M-q */ - /* 241 */ ED_UNASSIGNED, /* M-r */ - /* 242 */ ED_UNASSIGNED, /* M-s */ - /* 243 */ ED_UNASSIGNED, /* M-t */ - /* 244 */ EM_UPPER_CASE, /* M-u */ - /* 245 */ ED_UNASSIGNED, /* M-v */ - /* 246 */ EM_COPY_REGION, /* M-w */ - /* 247 */ ED_COMMAND, /* M-x */ - /* 248 */ ED_UNASSIGNED, /* M-y */ - /* 249 */ ED_UNASSIGNED, /* M-z */ - /* 250 */ ED_UNASSIGNED, /* M-{ */ - /* 251 */ ED_UNASSIGNED, /* M-| */ - /* 252 */ ED_UNASSIGNED, /* M-} */ - /* 253 */ ED_UNASSIGNED, /* M-~ */ - /* 254 */ ED_DELETE_PREV_WORD /* M-^? */ - /* 255 */ -}; - - -/* - * keymap table for vi. Each index into above tbl; should be - * N_KEYS entries long. Vi mode uses a sticky-extend to do command mode: - * insert mode characters are in the normal keymap, and command mode - * in the extended keymap. - */ -private const el_action_t el_map_vi_insert[] = { -#ifdef KSHVI - /* 0 */ ED_UNASSIGNED, /* ^@ */ - /* 1 */ ED_INSERT, /* ^A */ - /* 2 */ ED_INSERT, /* ^B */ - /* 3 */ ED_INSERT, /* ^C */ - /* 4 */ VI_LIST_OR_EOF, /* ^D */ - /* 5 */ ED_INSERT, /* ^E */ - /* 6 */ ED_INSERT, /* ^F */ - /* 7 */ ED_INSERT, /* ^G */ - /* 8 */ VI_DELETE_PREV_CHAR, /* ^H */ /* BackSpace key */ - /* 9 */ ED_INSERT, /* ^I */ /* Tab Key */ - /* 10 */ ED_NEWLINE, /* ^J */ - /* 11 */ ED_INSERT, /* ^K */ - /* 12 */ ED_INSERT, /* ^L */ - /* 13 */ ED_NEWLINE, /* ^M */ - /* 14 */ ED_INSERT, /* ^N */ - /* 15 */ ED_INSERT, /* ^O */ - /* 16 */ ED_INSERT, /* ^P */ - /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */ - /* 18 */ ED_INSERT, /* ^R */ - /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */ - /* 20 */ ED_INSERT, /* ^T */ - /* 21 */ VI_KILL_LINE_PREV, /* ^U */ - /* 22 */ ED_QUOTED_INSERT, /* ^V */ - /* 23 */ ED_DELETE_PREV_WORD, /* ^W */ - /* ED_DELETE_PREV_WORD: Only until strt edit pos */ - /* 24 */ ED_INSERT, /* ^X */ - /* 25 */ ED_INSERT, /* ^Y */ - /* 26 */ ED_INSERT, /* ^Z */ - /* 27 */ VI_COMMAND_MODE, /* ^[ */ /* [ Esc ] key */ - /* 28 */ ED_TTY_SIGQUIT, /* ^\ */ - /* 29 */ ED_INSERT, /* ^] */ - /* 30 */ ED_INSERT, /* ^^ */ - /* 31 */ ED_INSERT, /* ^_ */ -#else /* !KSHVI */ - /* - * NOTE: These mappings do NOT Correspond well - * to the KSH VI editing assignments. - * On the other and they are convenient and - * many people have have gotten used to them. - */ - /* 0 */ ED_UNASSIGNED, /* ^@ */ - /* 1 */ ED_MOVE_TO_BEG, /* ^A */ - /* 2 */ ED_PREV_CHAR, /* ^B */ - /* 3 */ ED_TTY_SIGINT, /* ^C */ - /* 4 */ VI_LIST_OR_EOF, /* ^D */ - /* 5 */ ED_MOVE_TO_END, /* ^E */ - /* 6 */ ED_NEXT_CHAR, /* ^F */ - /* 7 */ ED_UNASSIGNED, /* ^G */ - /* 8 */ VI_DELETE_PREV_CHAR, /* ^H */ /* BackSpace key */ - /* 9 */ ED_UNASSIGNED, /* ^I */ /* Tab Key */ - /* 10 */ ED_NEWLINE, /* ^J */ - /* 11 */ ED_KILL_LINE, /* ^K */ - /* 12 */ ED_CLEAR_SCREEN, /* ^L */ - /* 13 */ ED_NEWLINE, /* ^M */ - /* 14 */ ED_NEXT_HISTORY, /* ^N */ - /* 15 */ ED_TTY_FLUSH_OUTPUT, /* ^O */ - /* 16 */ ED_PREV_HISTORY, /* ^P */ - /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */ - /* 18 */ ED_REDISPLAY, /* ^R */ - /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */ - /* 20 */ ED_TRANSPOSE_CHARS, /* ^T */ - /* 21 */ VI_KILL_LINE_PREV, /* ^U */ - /* 22 */ ED_QUOTED_INSERT, /* ^V */ - /* 23 */ ED_DELETE_PREV_WORD, /* ^W */ - /* 24 */ ED_UNASSIGNED, /* ^X */ - /* 25 */ ED_TTY_DSUSP, /* ^Y */ - /* 26 */ ED_TTY_SIGTSTP, /* ^Z */ - /* 27 */ VI_COMMAND_MODE, /* ^[ */ - /* 28 */ ED_TTY_SIGQUIT, /* ^\ */ - /* 29 */ ED_UNASSIGNED, /* ^] */ - /* 30 */ ED_UNASSIGNED, /* ^^ */ - /* 31 */ ED_UNASSIGNED, /* ^_ */ -#endif /* KSHVI */ - /* 32 */ ED_INSERT, /* SPACE */ - /* 33 */ ED_INSERT, /* ! */ - /* 34 */ ED_INSERT, /* " */ - /* 35 */ ED_INSERT, /* # */ - /* 36 */ ED_INSERT, /* $ */ - /* 37 */ ED_INSERT, /* % */ - /* 38 */ ED_INSERT, /* & */ - /* 39 */ ED_INSERT, /* ' */ - /* 40 */ ED_INSERT, /* ( */ - /* 41 */ ED_INSERT, /* ) */ - /* 42 */ ED_INSERT, /* * */ - /* 43 */ ED_INSERT, /* + */ - /* 44 */ ED_INSERT, /* , */ - /* 45 */ ED_INSERT, /* - */ - /* 46 */ ED_INSERT, /* . */ - /* 47 */ ED_INSERT, /* / */ - /* 48 */ ED_INSERT, /* 0 */ - /* 49 */ ED_INSERT, /* 1 */ - /* 50 */ ED_INSERT, /* 2 */ - /* 51 */ ED_INSERT, /* 3 */ - /* 52 */ ED_INSERT, /* 4 */ - /* 53 */ ED_INSERT, /* 5 */ - /* 54 */ ED_INSERT, /* 6 */ - /* 55 */ ED_INSERT, /* 7 */ - /* 56 */ ED_INSERT, /* 8 */ - /* 57 */ ED_INSERT, /* 9 */ - /* 58 */ ED_INSERT, /* : */ - /* 59 */ ED_INSERT, /* ; */ - /* 60 */ ED_INSERT, /* < */ - /* 61 */ ED_INSERT, /* = */ - /* 62 */ ED_INSERT, /* > */ - /* 63 */ ED_INSERT, /* ? */ - /* 64 */ ED_INSERT, /* @ */ - /* 65 */ ED_INSERT, /* A */ - /* 66 */ ED_INSERT, /* B */ - /* 67 */ ED_INSERT, /* C */ - /* 68 */ ED_INSERT, /* D */ - /* 69 */ ED_INSERT, /* E */ - /* 70 */ ED_INSERT, /* F */ - /* 71 */ ED_INSERT, /* G */ - /* 72 */ ED_INSERT, /* H */ - /* 73 */ ED_INSERT, /* I */ - /* 74 */ ED_INSERT, /* J */ - /* 75 */ ED_INSERT, /* K */ - /* 76 */ ED_INSERT, /* L */ - /* 77 */ ED_INSERT, /* M */ - /* 78 */ ED_INSERT, /* N */ - /* 79 */ ED_INSERT, /* O */ - /* 80 */ ED_INSERT, /* P */ - /* 81 */ ED_INSERT, /* Q */ - /* 82 */ ED_INSERT, /* R */ - /* 83 */ ED_INSERT, /* S */ - /* 84 */ ED_INSERT, /* T */ - /* 85 */ ED_INSERT, /* U */ - /* 86 */ ED_INSERT, /* V */ - /* 87 */ ED_INSERT, /* W */ - /* 88 */ ED_INSERT, /* X */ - /* 89 */ ED_INSERT, /* Y */ - /* 90 */ ED_INSERT, /* Z */ - /* 91 */ ED_INSERT, /* [ */ - /* 92 */ ED_INSERT, /* \ */ - /* 93 */ ED_INSERT, /* ] */ - /* 94 */ ED_INSERT, /* ^ */ - /* 95 */ ED_INSERT, /* _ */ - /* 96 */ ED_INSERT, /* ` */ - /* 97 */ ED_INSERT, /* a */ - /* 98 */ ED_INSERT, /* b */ - /* 99 */ ED_INSERT, /* c */ - /* 100 */ ED_INSERT, /* d */ - /* 101 */ ED_INSERT, /* e */ - /* 102 */ ED_INSERT, /* f */ - /* 103 */ ED_INSERT, /* g */ - /* 104 */ ED_INSERT, /* h */ - /* 105 */ ED_INSERT, /* i */ - /* 106 */ ED_INSERT, /* j */ - /* 107 */ ED_INSERT, /* k */ - /* 108 */ ED_INSERT, /* l */ - /* 109 */ ED_INSERT, /* m */ - /* 110 */ ED_INSERT, /* n */ - /* 111 */ ED_INSERT, /* o */ - /* 112 */ ED_INSERT, /* p */ - /* 113 */ ED_INSERT, /* q */ - /* 114 */ ED_INSERT, /* r */ - /* 115 */ ED_INSERT, /* s */ - /* 116 */ ED_INSERT, /* t */ - /* 117 */ ED_INSERT, /* u */ - /* 118 */ ED_INSERT, /* v */ - /* 119 */ ED_INSERT, /* w */ - /* 120 */ ED_INSERT, /* x */ - /* 121 */ ED_INSERT, /* y */ - /* 122 */ ED_INSERT, /* z */ - /* 123 */ ED_INSERT, /* { */ - /* 124 */ ED_INSERT, /* | */ - /* 125 */ ED_INSERT, /* } */ - /* 126 */ ED_INSERT, /* ~ */ - /* 127 */ VI_DELETE_PREV_CHAR, /* ^? */ - /* 128 */ ED_INSERT, /* M-^@ */ - /* 129 */ ED_INSERT, /* M-^A */ - /* 130 */ ED_INSERT, /* M-^B */ - /* 131 */ ED_INSERT, /* M-^C */ - /* 132 */ ED_INSERT, /* M-^D */ - /* 133 */ ED_INSERT, /* M-^E */ - /* 134 */ ED_INSERT, /* M-^F */ - /* 135 */ ED_INSERT, /* M-^G */ - /* 136 */ ED_INSERT, /* M-^H */ - /* 137 */ ED_INSERT, /* M-^I */ - /* 138 */ ED_INSERT, /* M-^J */ - /* 139 */ ED_INSERT, /* M-^K */ - /* 140 */ ED_INSERT, /* M-^L */ - /* 141 */ ED_INSERT, /* M-^M */ - /* 142 */ ED_INSERT, /* M-^N */ - /* 143 */ ED_INSERT, /* M-^O */ - /* 144 */ ED_INSERT, /* M-^P */ - /* 145 */ ED_INSERT, /* M-^Q */ - /* 146 */ ED_INSERT, /* M-^R */ - /* 147 */ ED_INSERT, /* M-^S */ - /* 148 */ ED_INSERT, /* M-^T */ - /* 149 */ ED_INSERT, /* M-^U */ - /* 150 */ ED_INSERT, /* M-^V */ - /* 151 */ ED_INSERT, /* M-^W */ - /* 152 */ ED_INSERT, /* M-^X */ - /* 153 */ ED_INSERT, /* M-^Y */ - /* 154 */ ED_INSERT, /* M-^Z */ - /* 155 */ ED_INSERT, /* M-^[ */ - /* 156 */ ED_INSERT, /* M-^\ */ - /* 157 */ ED_INSERT, /* M-^] */ - /* 158 */ ED_INSERT, /* M-^^ */ - /* 159 */ ED_INSERT, /* M-^_ */ - /* 160 */ ED_INSERT, /* M-SPACE */ - /* 161 */ ED_INSERT, /* M-! */ - /* 162 */ ED_INSERT, /* M-" */ - /* 163 */ ED_INSERT, /* M-# */ - /* 164 */ ED_INSERT, /* M-$ */ - /* 165 */ ED_INSERT, /* M-% */ - /* 166 */ ED_INSERT, /* M-& */ - /* 167 */ ED_INSERT, /* M-' */ - /* 168 */ ED_INSERT, /* M-( */ - /* 169 */ ED_INSERT, /* M-) */ - /* 170 */ ED_INSERT, /* M-* */ - /* 171 */ ED_INSERT, /* M-+ */ - /* 172 */ ED_INSERT, /* M-, */ - /* 173 */ ED_INSERT, /* M-- */ - /* 174 */ ED_INSERT, /* M-. */ - /* 175 */ ED_INSERT, /* M-/ */ - /* 176 */ ED_INSERT, /* M-0 */ - /* 177 */ ED_INSERT, /* M-1 */ - /* 178 */ ED_INSERT, /* M-2 */ - /* 179 */ ED_INSERT, /* M-3 */ - /* 180 */ ED_INSERT, /* M-4 */ - /* 181 */ ED_INSERT, /* M-5 */ - /* 182 */ ED_INSERT, /* M-6 */ - /* 183 */ ED_INSERT, /* M-7 */ - /* 184 */ ED_INSERT, /* M-8 */ - /* 185 */ ED_INSERT, /* M-9 */ - /* 186 */ ED_INSERT, /* M-: */ - /* 187 */ ED_INSERT, /* M-; */ - /* 188 */ ED_INSERT, /* M-< */ - /* 189 */ ED_INSERT, /* M-= */ - /* 190 */ ED_INSERT, /* M-> */ - /* 191 */ ED_INSERT, /* M-? */ - /* 192 */ ED_INSERT, /* M-@ */ - /* 193 */ ED_INSERT, /* M-A */ - /* 194 */ ED_INSERT, /* M-B */ - /* 195 */ ED_INSERT, /* M-C */ - /* 196 */ ED_INSERT, /* M-D */ - /* 197 */ ED_INSERT, /* M-E */ - /* 198 */ ED_INSERT, /* M-F */ - /* 199 */ ED_INSERT, /* M-G */ - /* 200 */ ED_INSERT, /* M-H */ - /* 201 */ ED_INSERT, /* M-I */ - /* 202 */ ED_INSERT, /* M-J */ - /* 203 */ ED_INSERT, /* M-K */ - /* 204 */ ED_INSERT, /* M-L */ - /* 205 */ ED_INSERT, /* M-M */ - /* 206 */ ED_INSERT, /* M-N */ - /* 207 */ ED_INSERT, /* M-O */ - /* 208 */ ED_INSERT, /* M-P */ - /* 209 */ ED_INSERT, /* M-Q */ - /* 210 */ ED_INSERT, /* M-R */ - /* 211 */ ED_INSERT, /* M-S */ - /* 212 */ ED_INSERT, /* M-T */ - /* 213 */ ED_INSERT, /* M-U */ - /* 214 */ ED_INSERT, /* M-V */ - /* 215 */ ED_INSERT, /* M-W */ - /* 216 */ ED_INSERT, /* M-X */ - /* 217 */ ED_INSERT, /* M-Y */ - /* 218 */ ED_INSERT, /* M-Z */ - /* 219 */ ED_INSERT, /* M-[ */ - /* 220 */ ED_INSERT, /* M-\ */ - /* 221 */ ED_INSERT, /* M-] */ - /* 222 */ ED_INSERT, /* M-^ */ - /* 223 */ ED_INSERT, /* M-_ */ - /* 224 */ ED_INSERT, /* M-` */ - /* 225 */ ED_INSERT, /* M-a */ - /* 226 */ ED_INSERT, /* M-b */ - /* 227 */ ED_INSERT, /* M-c */ - /* 228 */ ED_INSERT, /* M-d */ - /* 229 */ ED_INSERT, /* M-e */ - /* 230 */ ED_INSERT, /* M-f */ - /* 231 */ ED_INSERT, /* M-g */ - /* 232 */ ED_INSERT, /* M-h */ - /* 233 */ ED_INSERT, /* M-i */ - /* 234 */ ED_INSERT, /* M-j */ - /* 235 */ ED_INSERT, /* M-k */ - /* 236 */ ED_INSERT, /* M-l */ - /* 237 */ ED_INSERT, /* M-m */ - /* 238 */ ED_INSERT, /* M-n */ - /* 239 */ ED_INSERT, /* M-o */ - /* 240 */ ED_INSERT, /* M-p */ - /* 241 */ ED_INSERT, /* M-q */ - /* 242 */ ED_INSERT, /* M-r */ - /* 243 */ ED_INSERT, /* M-s */ - /* 244 */ ED_INSERT, /* M-t */ - /* 245 */ ED_INSERT, /* M-u */ - /* 246 */ ED_INSERT, /* M-v */ - /* 247 */ ED_INSERT, /* M-w */ - /* 248 */ ED_INSERT, /* M-x */ - /* 249 */ ED_INSERT, /* M-y */ - /* 250 */ ED_INSERT, /* M-z */ - /* 251 */ ED_INSERT, /* M-{ */ - /* 252 */ ED_INSERT, /* M-| */ - /* 253 */ ED_INSERT, /* M-} */ - /* 254 */ ED_INSERT, /* M-~ */ - /* 255 */ ED_INSERT /* M-^? */ -}; - -private const el_action_t el_map_vi_command[] = { - /* 0 */ ED_UNASSIGNED, /* ^@ */ - /* 1 */ ED_MOVE_TO_BEG, /* ^A */ - /* 2 */ ED_UNASSIGNED, /* ^B */ - /* 3 */ ED_TTY_SIGINT, /* ^C */ - /* 4 */ ED_UNASSIGNED, /* ^D */ - /* 5 */ ED_MOVE_TO_END, /* ^E */ - /* 6 */ ED_UNASSIGNED, /* ^F */ - /* 7 */ ED_UNASSIGNED, /* ^G */ - /* 8 */ ED_DELETE_PREV_CHAR, /* ^H */ - /* 9 */ ED_UNASSIGNED, /* ^I */ - /* 10 */ ED_NEWLINE, /* ^J */ - /* 11 */ ED_KILL_LINE, /* ^K */ - /* 12 */ ED_CLEAR_SCREEN, /* ^L */ - /* 13 */ ED_NEWLINE, /* ^M */ - /* 14 */ ED_NEXT_HISTORY, /* ^N */ - /* 15 */ ED_TTY_FLUSH_OUTPUT, /* ^O */ - /* 16 */ ED_PREV_HISTORY, /* ^P */ - /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */ - /* 18 */ ED_REDISPLAY, /* ^R */ - /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */ - /* 20 */ ED_UNASSIGNED, /* ^T */ - /* 21 */ VI_KILL_LINE_PREV, /* ^U */ - /* 22 */ ED_UNASSIGNED, /* ^V */ - /* 23 */ ED_DELETE_PREV_WORD, /* ^W */ - /* 24 */ ED_UNASSIGNED, /* ^X */ - /* 25 */ ED_UNASSIGNED, /* ^Y */ - /* 26 */ ED_UNASSIGNED, /* ^Z */ - /* 27 */ EM_META_NEXT, /* ^[ */ - /* 28 */ ED_TTY_SIGQUIT, /* ^\ */ - /* 29 */ ED_UNASSIGNED, /* ^] */ - /* 30 */ ED_UNASSIGNED, /* ^^ */ - /* 31 */ ED_UNASSIGNED, /* ^_ */ - /* 32 */ ED_NEXT_CHAR, /* SPACE */ - /* 33 */ ED_UNASSIGNED, /* ! */ - /* 34 */ ED_UNASSIGNED, /* " */ - /* 35 */ VI_COMMENT_OUT, /* # */ - /* 36 */ ED_MOVE_TO_END, /* $ */ - /* 37 */ VI_MATCH, /* % */ - /* 38 */ ED_UNASSIGNED, /* & */ - /* 39 */ ED_UNASSIGNED, /* ' */ - /* 40 */ ED_UNASSIGNED, /* ( */ - /* 41 */ ED_UNASSIGNED, /* ) */ - /* 42 */ ED_UNASSIGNED, /* * */ - /* 43 */ ED_NEXT_HISTORY, /* + */ - /* 44 */ VI_REPEAT_PREV_CHAR, /* , */ - /* 45 */ ED_PREV_HISTORY, /* - */ - /* 46 */ VI_REDO, /* . */ - /* 47 */ VI_SEARCH_PREV, /* / */ - /* 48 */ VI_ZERO, /* 0 */ - /* 49 */ ED_ARGUMENT_DIGIT, /* 1 */ - /* 50 */ ED_ARGUMENT_DIGIT, /* 2 */ - /* 51 */ ED_ARGUMENT_DIGIT, /* 3 */ - /* 52 */ ED_ARGUMENT_DIGIT, /* 4 */ - /* 53 */ ED_ARGUMENT_DIGIT, /* 5 */ - /* 54 */ ED_ARGUMENT_DIGIT, /* 6 */ - /* 55 */ ED_ARGUMENT_DIGIT, /* 7 */ - /* 56 */ ED_ARGUMENT_DIGIT, /* 8 */ - /* 57 */ ED_ARGUMENT_DIGIT, /* 9 */ - /* 58 */ ED_COMMAND, /* : */ - /* 59 */ VI_REPEAT_NEXT_CHAR, /* ; */ - /* 60 */ ED_UNASSIGNED, /* < */ - /* 61 */ ED_UNASSIGNED, /* = */ - /* 62 */ ED_UNASSIGNED, /* > */ - /* 63 */ VI_SEARCH_NEXT, /* ? */ - /* 64 */ VI_ALIAS, /* @ */ - /* 65 */ VI_ADD_AT_EOL, /* A */ - /* 66 */ VI_PREV_BIG_WORD, /* B */ - /* 67 */ VI_CHANGE_TO_EOL, /* C */ - /* 68 */ ED_KILL_LINE, /* D */ - /* 69 */ VI_END_BIG_WORD, /* E */ - /* 70 */ VI_PREV_CHAR, /* F */ - /* 71 */ VI_TO_HISTORY_LINE, /* G */ - /* 72 */ ED_UNASSIGNED, /* H */ - /* 73 */ VI_INSERT_AT_BOL, /* I */ - /* 74 */ ED_SEARCH_NEXT_HISTORY, /* J */ - /* 75 */ ED_SEARCH_PREV_HISTORY, /* K */ - /* 76 */ ED_UNASSIGNED, /* L */ - /* 77 */ ED_UNASSIGNED, /* M */ - /* 78 */ VI_REPEAT_SEARCH_PREV, /* N */ - /* 79 */ ED_SEQUENCE_LEAD_IN, /* O */ - /* 80 */ VI_PASTE_PREV, /* P */ - /* 81 */ ED_UNASSIGNED, /* Q */ - /* 82 */ VI_REPLACE_MODE, /* R */ - /* 83 */ VI_SUBSTITUTE_LINE, /* S */ - /* 84 */ VI_TO_PREV_CHAR, /* T */ - /* 85 */ VI_UNDO_LINE, /* U */ - /* 86 */ ED_UNASSIGNED, /* V */ - /* 87 */ VI_NEXT_BIG_WORD, /* W */ - /* 88 */ ED_DELETE_PREV_CHAR, /* X */ - /* 89 */ VI_YANK_END, /* Y */ - /* 90 */ ED_UNASSIGNED, /* Z */ - /* 91 */ ED_SEQUENCE_LEAD_IN, /* [ */ - /* 92 */ ED_UNASSIGNED, /* \ */ - /* 93 */ ED_UNASSIGNED, /* ] */ - /* 94 */ ED_MOVE_TO_BEG, /* ^ */ - /* 95 */ VI_HISTORY_WORD, /* _ */ - /* 96 */ ED_UNASSIGNED, /* ` */ - /* 97 */ VI_ADD, /* a */ - /* 98 */ VI_PREV_WORD, /* b */ - /* 99 */ VI_CHANGE_META, /* c */ - /* 100 */ VI_DELETE_META, /* d */ - /* 101 */ VI_END_WORD, /* e */ - /* 102 */ VI_NEXT_CHAR, /* f */ - /* 103 */ ED_UNASSIGNED, /* g */ - /* 104 */ ED_PREV_CHAR, /* h */ - /* 105 */ VI_INSERT, /* i */ - /* 106 */ ED_NEXT_HISTORY, /* j */ - /* 107 */ ED_PREV_HISTORY, /* k */ - /* 108 */ ED_NEXT_CHAR, /* l */ - /* 109 */ ED_UNASSIGNED, /* m */ - /* 110 */ VI_REPEAT_SEARCH_NEXT, /* n */ - /* 111 */ ED_UNASSIGNED, /* o */ - /* 112 */ VI_PASTE_NEXT, /* p */ - /* 113 */ ED_UNASSIGNED, /* q */ - /* 114 */ VI_REPLACE_CHAR, /* r */ - /* 115 */ VI_SUBSTITUTE_CHAR, /* s */ - /* 116 */ VI_TO_NEXT_CHAR, /* t */ - /* 117 */ VI_UNDO, /* u */ - /* 118 */ VI_HISTEDIT, /* v */ - /* 119 */ VI_NEXT_WORD, /* w */ - /* 120 */ ED_DELETE_NEXT_CHAR, /* x */ - /* 121 */ VI_YANK, /* y */ - /* 122 */ ED_UNASSIGNED, /* z */ - /* 123 */ ED_UNASSIGNED, /* { */ - /* 124 */ VI_TO_COLUMN, /* | */ - /* 125 */ ED_UNASSIGNED, /* } */ - /* 126 */ VI_CHANGE_CASE, /* ~ */ - /* 127 */ ED_DELETE_PREV_CHAR, /* ^? */ - /* 128 */ ED_UNASSIGNED, /* M-^@ */ - /* 129 */ ED_UNASSIGNED, /* M-^A */ - /* 130 */ ED_UNASSIGNED, /* M-^B */ - /* 131 */ ED_UNASSIGNED, /* M-^C */ - /* 132 */ ED_UNASSIGNED, /* M-^D */ - /* 133 */ ED_UNASSIGNED, /* M-^E */ - /* 134 */ ED_UNASSIGNED, /* M-^F */ - /* 135 */ ED_UNASSIGNED, /* M-^G */ - /* 136 */ ED_UNASSIGNED, /* M-^H */ - /* 137 */ ED_UNASSIGNED, /* M-^I */ - /* 138 */ ED_UNASSIGNED, /* M-^J */ - /* 139 */ ED_UNASSIGNED, /* M-^K */ - /* 140 */ ED_UNASSIGNED, /* M-^L */ - /* 141 */ ED_UNASSIGNED, /* M-^M */ - /* 142 */ ED_UNASSIGNED, /* M-^N */ - /* 143 */ ED_UNASSIGNED, /* M-^O */ - /* 144 */ ED_UNASSIGNED, /* M-^P */ - /* 145 */ ED_UNASSIGNED, /* M-^Q */ - /* 146 */ ED_UNASSIGNED, /* M-^R */ - /* 147 */ ED_UNASSIGNED, /* M-^S */ - /* 148 */ ED_UNASSIGNED, /* M-^T */ - /* 149 */ ED_UNASSIGNED, /* M-^U */ - /* 150 */ ED_UNASSIGNED, /* M-^V */ - /* 151 */ ED_UNASSIGNED, /* M-^W */ - /* 152 */ ED_UNASSIGNED, /* M-^X */ - /* 153 */ ED_UNASSIGNED, /* M-^Y */ - /* 154 */ ED_UNASSIGNED, /* M-^Z */ - /* 155 */ ED_UNASSIGNED, /* M-^[ */ - /* 156 */ ED_UNASSIGNED, /* M-^\ */ - /* 157 */ ED_UNASSIGNED, /* M-^] */ - /* 158 */ ED_UNASSIGNED, /* M-^^ */ - /* 159 */ ED_UNASSIGNED, /* M-^_ */ - /* 160 */ ED_UNASSIGNED, /* M-SPACE */ - /* 161 */ ED_UNASSIGNED, /* M-! */ - /* 162 */ ED_UNASSIGNED, /* M-" */ - /* 163 */ ED_UNASSIGNED, /* M-# */ - /* 164 */ ED_UNASSIGNED, /* M-$ */ - /* 165 */ ED_UNASSIGNED, /* M-% */ - /* 166 */ ED_UNASSIGNED, /* M-& */ - /* 167 */ ED_UNASSIGNED, /* M-' */ - /* 168 */ ED_UNASSIGNED, /* M-( */ - /* 169 */ ED_UNASSIGNED, /* M-) */ - /* 170 */ ED_UNASSIGNED, /* M-* */ - /* 171 */ ED_UNASSIGNED, /* M-+ */ - /* 172 */ ED_UNASSIGNED, /* M-, */ - /* 173 */ ED_UNASSIGNED, /* M-- */ - /* 174 */ ED_UNASSIGNED, /* M-. */ - /* 175 */ ED_UNASSIGNED, /* M-/ */ - /* 176 */ ED_UNASSIGNED, /* M-0 */ - /* 177 */ ED_UNASSIGNED, /* M-1 */ - /* 178 */ ED_UNASSIGNED, /* M-2 */ - /* 179 */ ED_UNASSIGNED, /* M-3 */ - /* 180 */ ED_UNASSIGNED, /* M-4 */ - /* 181 */ ED_UNASSIGNED, /* M-5 */ - /* 182 */ ED_UNASSIGNED, /* M-6 */ - /* 183 */ ED_UNASSIGNED, /* M-7 */ - /* 184 */ ED_UNASSIGNED, /* M-8 */ - /* 185 */ ED_UNASSIGNED, /* M-9 */ - /* 186 */ ED_UNASSIGNED, /* M-: */ - /* 187 */ ED_UNASSIGNED, /* M-; */ - /* 188 */ ED_UNASSIGNED, /* M-< */ - /* 189 */ ED_UNASSIGNED, /* M-= */ - /* 190 */ ED_UNASSIGNED, /* M-> */ - /* 191 */ ED_UNASSIGNED, /* M-? */ - /* 192 */ ED_UNASSIGNED, /* M-@ */ - /* 193 */ ED_UNASSIGNED, /* M-A */ - /* 194 */ ED_UNASSIGNED, /* M-B */ - /* 195 */ ED_UNASSIGNED, /* M-C */ - /* 196 */ ED_UNASSIGNED, /* M-D */ - /* 197 */ ED_UNASSIGNED, /* M-E */ - /* 198 */ ED_UNASSIGNED, /* M-F */ - /* 199 */ ED_UNASSIGNED, /* M-G */ - /* 200 */ ED_UNASSIGNED, /* M-H */ - /* 201 */ ED_UNASSIGNED, /* M-I */ - /* 202 */ ED_UNASSIGNED, /* M-J */ - /* 203 */ ED_UNASSIGNED, /* M-K */ - /* 204 */ ED_UNASSIGNED, /* M-L */ - /* 205 */ ED_UNASSIGNED, /* M-M */ - /* 206 */ ED_UNASSIGNED, /* M-N */ - /* 207 */ ED_SEQUENCE_LEAD_IN, /* M-O */ - /* 208 */ ED_UNASSIGNED, /* M-P */ - /* 209 */ ED_UNASSIGNED, /* M-Q */ - /* 210 */ ED_UNASSIGNED, /* M-R */ - /* 211 */ ED_UNASSIGNED, /* M-S */ - /* 212 */ ED_UNASSIGNED, /* M-T */ - /* 213 */ ED_UNASSIGNED, /* M-U */ - /* 214 */ ED_UNASSIGNED, /* M-V */ - /* 215 */ ED_UNASSIGNED, /* M-W */ - /* 216 */ ED_UNASSIGNED, /* M-X */ - /* 217 */ ED_UNASSIGNED, /* M-Y */ - /* 218 */ ED_UNASSIGNED, /* M-Z */ - /* 219 */ ED_SEQUENCE_LEAD_IN, /* M-[ */ - /* 220 */ ED_UNASSIGNED, /* M-\ */ - /* 221 */ ED_UNASSIGNED, /* M-] */ - /* 222 */ ED_UNASSIGNED, /* M-^ */ - /* 223 */ ED_UNASSIGNED, /* M-_ */ - /* 224 */ ED_UNASSIGNED, /* M-` */ - /* 225 */ ED_UNASSIGNED, /* M-a */ - /* 226 */ ED_UNASSIGNED, /* M-b */ - /* 227 */ ED_UNASSIGNED, /* M-c */ - /* 228 */ ED_UNASSIGNED, /* M-d */ - /* 229 */ ED_UNASSIGNED, /* M-e */ - /* 230 */ ED_UNASSIGNED, /* M-f */ - /* 231 */ ED_UNASSIGNED, /* M-g */ - /* 232 */ ED_UNASSIGNED, /* M-h */ - /* 233 */ ED_UNASSIGNED, /* M-i */ - /* 234 */ ED_UNASSIGNED, /* M-j */ - /* 235 */ ED_UNASSIGNED, /* M-k */ - /* 236 */ ED_UNASSIGNED, /* M-l */ - /* 237 */ ED_UNASSIGNED, /* M-m */ - /* 238 */ ED_UNASSIGNED, /* M-n */ - /* 239 */ ED_UNASSIGNED, /* M-o */ - /* 240 */ ED_UNASSIGNED, /* M-p */ - /* 241 */ ED_UNASSIGNED, /* M-q */ - /* 242 */ ED_UNASSIGNED, /* M-r */ - /* 243 */ ED_UNASSIGNED, /* M-s */ - /* 244 */ ED_UNASSIGNED, /* M-t */ - /* 245 */ ED_UNASSIGNED, /* M-u */ - /* 246 */ ED_UNASSIGNED, /* M-v */ - /* 247 */ ED_UNASSIGNED, /* M-w */ - /* 248 */ ED_UNASSIGNED, /* M-x */ - /* 249 */ ED_UNASSIGNED, /* M-y */ - /* 250 */ ED_UNASSIGNED, /* M-z */ - /* 251 */ ED_UNASSIGNED, /* M-{ */ - /* 252 */ ED_UNASSIGNED, /* M-| */ - /* 253 */ ED_UNASSIGNED, /* M-} */ - /* 254 */ ED_UNASSIGNED, /* M-~ */ - /* 255 */ ED_UNASSIGNED /* M-^? */ -}; - - -/* map_init(): - * Initialize and allocate the maps - */ -protected int -map_init(EditLine *el) -{ - - /* - * Make sure those are correct before starting. - */ -#ifdef MAP_DEBUG - if (sizeof(el_map_emacs) != N_KEYS * sizeof(el_action_t)) - EL_ABORT((el->errfile, "Emacs map incorrect\n")); - if (sizeof(el_map_vi_command) != N_KEYS * sizeof(el_action_t)) - EL_ABORT((el->errfile, "Vi command map incorrect\n")); - if (sizeof(el_map_vi_insert) != N_KEYS * sizeof(el_action_t)) - EL_ABORT((el->errfile, "Vi insert map incorrect\n")); -#endif - - el->el_map.alt = (el_action_t *)el_malloc(sizeof(el_action_t) * N_KEYS); - if (el->el_map.alt == NULL) - return (-1); - el->el_map.key = (el_action_t *)el_malloc(sizeof(el_action_t) * N_KEYS); - if (el->el_map.key == NULL) - return (-1); - el->el_map.emacs = el_map_emacs; - el->el_map.vic = el_map_vi_command; - el->el_map.vii = el_map_vi_insert; - el->el_map.help = (el_bindings_t *) el_malloc(sizeof(el_bindings_t) * - EL_NUM_FCNS); - if (el->el_map.help == NULL) - return (-1); - (void) memcpy(el->el_map.help, help__get(), - sizeof(el_bindings_t) * EL_NUM_FCNS); - el->el_map.func = (el_func_t *)el_malloc(sizeof(el_func_t) * - EL_NUM_FCNS); - if (el->el_map.func == NULL) - return (-1); - memcpy(el->el_map.func, func__get(), sizeof(el_func_t) * EL_NUM_FCNS); - el->el_map.nfunc = EL_NUM_FCNS; - -#ifdef VIDEFAULT - map_init_vi(el); -#else - map_init_emacs(el); -#endif /* VIDEFAULT */ - return (0); -} - - -/* map_end(): - * Free the space taken by the editor maps - */ -protected void -map_end(EditLine *el) -{ - - el_free((ptr_t) el->el_map.alt); - el->el_map.alt = NULL; - el_free((ptr_t) el->el_map.key); - el->el_map.key = NULL; - el->el_map.emacs = NULL; - el->el_map.vic = NULL; - el->el_map.vii = NULL; - el_free((ptr_t) el->el_map.help); - el->el_map.help = NULL; - el_free((ptr_t) el->el_map.func); - el->el_map.func = NULL; -} - - -/* map_init_nls(): - * Find all the printable keys and bind them to self insert - */ -private void -map_init_nls(EditLine *el) -{ - int i; - - el_action_t *map = el->el_map.key; - - for (i = 0200; i <= 0377; i++) - if (Isprint(i)) - map[i] = ED_INSERT; -} - - -/* map_init_meta(): - * Bind all the meta keys to the appropriate ESC- sequence - */ -private void -map_init_meta(EditLine *el) -{ - Char buf[3]; - int i; - el_action_t *map = el->el_map.key; - el_action_t *alt = el->el_map.alt; - - for (i = 0; i <= 0377 && map[i] != EM_META_NEXT; i++) - continue; - - if (i > 0377) { - for (i = 0; i <= 0377 && alt[i] != EM_META_NEXT; i++) - continue; - if (i > 0377) { - i = 033; - if (el->el_map.type == MAP_VI) - map = alt; - } else - map = alt; - } - buf[0] = (Char) i; - buf[2] = 0; - for (i = 0200; i <= 0377; i++) - switch (map[i]) { - case ED_INSERT: - case ED_UNASSIGNED: - case ED_SEQUENCE_LEAD_IN: - break; - default: - buf[1] = i & 0177; - key_add(el, buf, key_map_cmd(el, (int) map[i]), XK_CMD); - break; - } - map[(int) buf[0]] = ED_SEQUENCE_LEAD_IN; -} - - -/* map_init_vi(): - * Initialize the vi bindings - */ -protected void -map_init_vi(EditLine *el) -{ - int i; - el_action_t *key = el->el_map.key; - el_action_t *alt = el->el_map.alt; - const el_action_t *vii = el->el_map.vii; - const el_action_t *vic = el->el_map.vic; - - el->el_map.type = MAP_VI; - el->el_map.current = el->el_map.key; - - key_reset(el); - - for (i = 0; i < N_KEYS; i++) { - key[i] = vii[i]; - alt[i] = vic[i]; - } - - map_init_meta(el); - map_init_nls(el); - - tty_bind_char(el, 1); - term_bind_arrow(el); -} - - -/* map_init_emacs(): - * Initialize the emacs bindings - */ -protected void -map_init_emacs(EditLine *el) -{ - int i; - Char buf[3]; - el_action_t *key = el->el_map.key; - el_action_t *alt = el->el_map.alt; - const el_action_t *emacs = el->el_map.emacs; - - el->el_map.type = MAP_EMACS; - el->el_map.current = el->el_map.key; - key_reset(el); - - for (i = 0; i < N_KEYS; i++) { - key[i] = emacs[i]; - alt[i] = ED_UNASSIGNED; - } - - map_init_meta(el); - map_init_nls(el); - - buf[0] = CONTROL('X'); - buf[1] = CONTROL('X'); - buf[2] = 0; - key_add(el, buf, key_map_cmd(el, EM_EXCHANGE_MARK), XK_CMD); - - tty_bind_char(el, 1); - term_bind_arrow(el); -} - - -/* map_set_editor(): - * Set the editor - */ -protected int -map_set_editor(EditLine *el, Char *editor) -{ - - if (Strcmp(editor, STR("emacs")) == 0) { - map_init_emacs(el); - return (0); - } - if (Strcmp(editor, STR("vi")) == 0) { - map_init_vi(el); - return (0); - } - return (-1); -} - - -/* map_get_editor(): - * Retrieve the editor - */ -protected int -map_get_editor(EditLine *el, const Char **editor) -{ - - if (editor == NULL) - return (-1); - switch (el->el_map.type) { - case MAP_EMACS: - *editor = STR("emacs"); - return (0); - case MAP_VI: - *editor = STR("vi"); - return (0); - } - return (-1); -} - - -/* map_print_key(): - * Print the function description for 1 key - */ -private void -map_print_key(EditLine *el, el_action_t *map, const Char *in) -{ - char outbuf[EL_BUFSIZ]; - el_bindings_t *bp, *ep; - - if (in[0] == '\0' || in[1] == '\0') { - (void) key__decode_str(in, outbuf, sizeof(outbuf), ""); - ep = &el->el_map.help[el->el_map.nfunc]; - for (bp = el->el_map.help; bp < ep; bp++) - if (bp->func == map[(unsigned char) *in]) { - (void) fprintf(el->el_outfile, - "%s\t->\t" FSTR "\n", outbuf, bp->name); - return; - } - } else - key_print(el, in); -} - - -/* map_print_some_keys(): - * Print keys from first to last - */ -private void -map_print_some_keys(EditLine *el, el_action_t *map, Int first, Int last) -{ - el_bindings_t *bp, *ep; - Char firstbuf[2], lastbuf[2]; - char unparsbuf[EL_BUFSIZ], extrabuf[EL_BUFSIZ]; - - firstbuf[0] = first; - firstbuf[1] = 0; - lastbuf[0] = last; - lastbuf[1] = 0; - if (map[first] == ED_UNASSIGNED) { - if (first == last) { - (void) key__decode_str(firstbuf, unparsbuf, - sizeof(unparsbuf), STRQQ); - (void) fprintf(el->el_outfile, - "%-15s-> is undefined\n", unparsbuf); - } - return; - } - ep = &el->el_map.help[el->el_map.nfunc]; - for (bp = el->el_map.help; bp < ep; bp++) { - if (bp->func == map[first]) { - if (first == last) { - (void) key__decode_str(firstbuf, unparsbuf, - sizeof(unparsbuf), STRQQ); - (void) fprintf(el->el_outfile, "%-15s-> " FSTR "\n", - unparsbuf, bp->name); - } else { - (void) key__decode_str(firstbuf, unparsbuf, - sizeof(unparsbuf), STRQQ); - (void) key__decode_str(lastbuf, extrabuf, - sizeof(extrabuf), STRQQ); - (void) fprintf(el->el_outfile, - "%-4s to %-7s-> " FSTR "\n", - unparsbuf, extrabuf, bp->name); - } - return; - } - } -#ifdef MAP_DEBUG - if (map == el->el_map.key) { - (void) key__decode_str(firstbuf, unparsbuf, - sizeof(unparsbuf), STRQQ); - (void) fprintf(el->el_outfile, - "BUG!!! %s isn't bound to anything.\n", unparsbuf); - (void) fprintf(el->el_outfile, "el->el_map.key[%d] == %d\n", - first, el->el_map.key[first]); - } else { - (void) key__decode_str(firstbuf, unparsbuf, - sizeof(unparsbuf), STRQQ); - (void) fprintf(el->el_outfile, - "BUG!!! %s isn't bound to anything.\n", unparsbuf); - (void) fprintf(el->el_outfile, "el->el_map.alt[%d] == %d\n", - first, el->el_map.alt[first]); - } -#endif - EL_ABORT((el->el_errfile, "Error printing keys\n")); -} - - -/* map_print_all_keys(): - * Print the function description for all keys. - */ -private void -map_print_all_keys(EditLine *el) -{ - int prev, i; - - (void) fprintf(el->el_outfile, "Standard key bindings\n"); - prev = 0; - for (i = 0; i < N_KEYS; i++) { - if (el->el_map.key[prev] == el->el_map.key[i]) - continue; - map_print_some_keys(el, el->el_map.key, prev, i - 1); - prev = i; - } - map_print_some_keys(el, el->el_map.key, prev, i - 1); - - (void) fprintf(el->el_outfile, "Alternative key bindings\n"); - prev = 0; - for (i = 0; i < N_KEYS; i++) { - if (el->el_map.alt[prev] == el->el_map.alt[i]) - continue; - map_print_some_keys(el, el->el_map.alt, prev, i - 1); - prev = i; - } - map_print_some_keys(el, el->el_map.alt, prev, i - 1); - - (void) fprintf(el->el_outfile, "Multi-character bindings\n"); - key_print(el, STR("")); - (void) fprintf(el->el_outfile, "Arrow key bindings\n"); - term_print_arrow(el, STR("")); -} - - -/* map_bind(): - * Add/remove/change bindings - */ -protected int -map_bind(EditLine *el, int argc, const Char **argv) -{ - el_action_t *map; - int ntype, rem; - const Char *p; - Char inbuf[EL_BUFSIZ]; - Char outbuf[EL_BUFSIZ]; - const Char *in = NULL; - Char *out = NULL; - el_bindings_t *bp, *ep; - int cmd; - int key; - - if (argv == NULL) - return (-1); - - map = el->el_map.key; - ntype = XK_CMD; - key = rem = 0; - for (argc = 1; (p = argv[argc]) != NULL; argc++) - if (p[0] == '-') - switch (p[1]) { - case 'a': - map = el->el_map.alt; - break; - - case 's': - ntype = XK_STR; - break; -#ifdef notyet - case 'c': - ntype = XK_EXE; - break; -#endif - case 'k': - key = 1; - break; - - case 'r': - rem = 1; - break; - - case 'v': - map_init_vi(el); - return (0); - - case 'e': - map_init_emacs(el); - return (0); - - case 'l': - ep = &el->el_map.help[el->el_map.nfunc]; - for (bp = el->el_map.help; bp < ep; bp++) - (void) fprintf(el->el_outfile, - "" FSTR "\n\t" FSTR "\n", - bp->name, bp->description); - return (0); - default: - (void) fprintf(el->el_errfile, - "" FSTR ": Invalid switch `%c'.\n", - argv[0], p[1]); - } - else - break; - - if (argv[argc] == NULL) { - map_print_all_keys(el); - return (0); - } - if (key) - in = argv[argc++]; - else if ((in = parse__string(inbuf, argv[argc++])) == NULL) { - (void) fprintf(el->el_errfile, - "" FSTR ": Invalid \\ or ^ in instring.\n", - argv[0]); - return (-1); - } - if (rem) { - if (key) { - (void) term_clear_arrow(el, in); - return (-1); - } - if (in[1]) - (void) key_delete(el, in); - else if (map[(unsigned char) *in] == ED_SEQUENCE_LEAD_IN) - (void) key_delete(el, in); - else - map[(unsigned char) *in] = ED_UNASSIGNED; - return (0); - } - if (argv[argc] == NULL) { - if (key) - term_print_arrow(el, in); - else - map_print_key(el, map, in); - return (0); - } -#ifdef notyet - if (argv[argc + 1] != NULL) { - bindkey_usage(); - return (-1); - } -#endif - - switch (ntype) { - case XK_STR: - case XK_EXE: - if ((out = parse__string(outbuf, argv[argc])) == NULL) { - (void) fprintf(el->el_errfile, - "" FSTR ": Invalid \\ or ^ in outstring.\n", argv[0]); - return (-1); - } - if (key) - term_set_arrow(el, in, key_map_str(el, out), ntype); - else - key_add(el, in, key_map_str(el, out), ntype); - map[(unsigned char) *in] = ED_SEQUENCE_LEAD_IN; - break; - - case XK_CMD: - if ((cmd = parse_cmd(el, argv[argc])) == -1) { - (void) fprintf(el->el_errfile, - "" FSTR ": Invalid command `" FSTR "'.\n", - argv[0], argv[argc]); - return (-1); - } - if (key) - term_set_arrow(el, in, key_map_str(el, out), ntype); - else { - if (in[1]) { - key_add(el, in, key_map_cmd(el, cmd), ntype); - map[(unsigned char) *in] = ED_SEQUENCE_LEAD_IN; - } else { - key_clear(el, map, in); - map[(unsigned char) *in] = cmd; - } - } - break; - - default: - EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", ntype)); - break; - } - return (0); -} - - -/* map_addfunc(): - * add a user defined function - */ -protected int -map_addfunc(EditLine *el, const Char *name, const Char *help, el_func_t func) -{ - void *p; - int nf = el->el_map.nfunc + 1; - - if (name == NULL || help == NULL || func == NULL) - return (-1); - - if ((p = el_realloc(el->el_map.func, nf * sizeof(el_func_t))) == NULL) - return (-1); - el->el_map.func = (el_func_t *) p; - if ((p = el_realloc(el->el_map.help, nf * sizeof(el_bindings_t))) - == NULL) - return (-1); - el->el_map.help = (el_bindings_t *) p; - - nf = el->el_map.nfunc; - el->el_map.func[nf] = func; - - el->el_map.help[nf].name = name; - el->el_map.help[nf].func = nf; - el->el_map.help[nf].description = help; - el->el_map.nfunc++; - - return (0); -} diff --git a/kerberosV/src/lib/libedit/src/map.h b/kerberosV/src/lib/libedit/src/map.h deleted file mode 100644 index 8e0c7e4eaa1..00000000000 --- a/kerberosV/src/lib/libedit/src/map.h +++ /dev/null @@ -1,77 +0,0 @@ -/* $NetBSD: map.h,v 1.9 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)map.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.map.h: Editor maps - */ -#ifndef _h_el_map -#define _h_el_map - -typedef struct el_bindings_t { /* for the "bind" shell command */ - const Char *name; /* function name for bind command */ - int func; /* function numeric value */ - const Char *description; /* description of function */ -} el_bindings_t; - - -typedef struct el_map_t { - el_action_t *alt; /* The current alternate key map */ - el_action_t *key; /* The current normal key map */ - el_action_t *current; /* The keymap we are using */ - const el_action_t *emacs; /* The default emacs key map */ - const el_action_t *vic; /* The vi command mode key map */ - const el_action_t *vii; /* The vi insert mode key map */ - int type; /* Emacs or vi */ - el_bindings_t *help; /* The help for the editor functions */ - el_func_t *func; /* List of available functions */ - int nfunc; /* The number of functions/help items */ -} el_map_t; - -#define MAP_EMACS 0 -#define MAP_VI 1 - -#define N_KEYS 256 - -protected int map_bind(EditLine *, int, const Char **); -protected int map_init(EditLine *); -protected void map_end(EditLine *); -protected void map_init_vi(EditLine *); -protected void map_init_emacs(EditLine *); -protected int map_set_editor(EditLine *, Char *); -protected int map_get_editor(EditLine *, const Char **); -protected int map_addfunc(EditLine *, const Char *, const Char *, el_func_t); - -#endif /* _h_el_map */ diff --git a/kerberosV/src/lib/libedit/src/parse.c b/kerberosV/src/lib/libedit/src/parse.c deleted file mode 100644 index 9983fa75037..00000000000 --- a/kerberosV/src/lib/libedit/src/parse.c +++ /dev/null @@ -1,285 +0,0 @@ -/* $NetBSD: parse.c,v 1.23 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: parse.c,v 1.23 2009/12/30 22:37:40 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * parse.c: parse an editline extended command - * - * commands are: - * - * bind - * echotc - * edit - * gettc - * history - * settc - * setty - */ -#include "el.h" -#include - -private const struct { - const Char *name; - int (*func)(EditLine *, int, const Char **); -} cmds[] = { - { STR("bind"), map_bind }, - { STR("echotc"), term_echotc }, - { STR("edit"), el_editmode }, - { STR("history"), hist_command }, - { STR("telltc"), term_telltc }, - { STR("settc"), term_settc }, - { STR("setty"), tty_stty }, - { NULL, NULL } -}; - - -/* parse_line(): - * Parse a line and dispatch it - */ -protected int -parse_line(EditLine *el, const Char *line) -{ - const Char **argv; - int argc; - TYPE(Tokenizer) *tok; - - tok = FUN(tok,init)(NULL); - FUN(tok,str)(tok, line, &argc, &argv); - argc = FUN(el,parse)(el, argc, argv); - FUN(tok,end)(tok); - return (argc); -} - - -/* el_parse(): - * Command dispatcher - */ -public int -FUN(el,parse)(EditLine *el, int argc, const Char *argv[]) -{ - const Char *ptr; - int i; - - if (argc < 1) - return (-1); - ptr = Strchr(argv[0], ':'); - if (ptr != NULL) { - Char *tprog; - size_t l; - - if (ptr == argv[0]) - return (0); - l = ptr - argv[0] - 1; - tprog = el_malloc((l + 1) * sizeof(*tprog)); - if (tprog == NULL) - return (0); - (void) Strncpy(tprog, argv[0], l); - tprog[l] = '\0'; - ptr++; - l = el_match(el->el_prog, tprog); - el_free(tprog); - if (!l) - return (0); - } else - ptr = argv[0]; - - for (i = 0; cmds[i].name != NULL; i++) - if (Strcmp(cmds[i].name, ptr) == 0) { - i = (*cmds[i].func) (el, argc, argv); - return (-i); - } - return (-1); -} - - -/* parse__escape(): - * Parse a string of the form ^ \ \ \U+xxxx and return - * the appropriate character or -1 if the escape is not valid - */ -protected int -parse__escape(const Char **ptr) -{ - const Char *p; - Int c; - - p = *ptr; - - if (p[1] == 0) - return (-1); - - if (*p == '\\') { - p++; - switch (*p) { - case 'a': - c = '\007'; /* Bell */ - break; - case 'b': - c = '\010'; /* Backspace */ - break; - case 't': - c = '\011'; /* Horizontal Tab */ - break; - case 'n': - c = '\012'; /* New Line */ - break; - case 'v': - c = '\013'; /* Vertical Tab */ - break; - case 'f': - c = '\014'; /* Form Feed */ - break; - case 'r': - c = '\015'; /* Carriage Return */ - break; - case 'e': - c = '\033'; /* Escape */ - break; - case 'U': /* Unicode \U+xxxx or \U+xxxxx format */ - { - int i; - const Char hex[] = STR("0123456789ABCDEF"); - const Char *h; - ++p; - if (*p++ != '+') - return (-1); - c = 0; - for (i = 0; i < 5; ++i) { - h = Strchr(hex, *p++); - if (!h && i < 4) - return (-1); - else if (h) - c = (c << 4) | ((int)(h - hex)); - else - --p; - } - if (c > 0x10FFFF) /* outside valid character range */ - return -1; - break; - } - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - { - int cnt, ch; - - for (cnt = 0, c = 0; cnt < 3; cnt++) { - ch = *p++; - if (ch < '0' || ch > '7') { - p--; - break; - } - c = (c << 3) | (ch - '0'); - } - if ((c & 0xffffff00) != 0) - return (-1); - --p; - break; - } - default: - c = *p; - break; - } - } else if (*p == '^') { - p++; - c = (*p == '?') ? '\177' : (*p & 0237); - } else - c = *p; - *ptr = ++p; - return (c); -} - -/* parse__string(): - * Parse the escapes from in and put the raw string out - */ -protected Char * -parse__string(Char *out, const Char *in) -{ - Char *rv = out; - int n; - - for (;;) - switch (*in) { - case '\0': - *out = '\0'; - return (rv); - - case '\\': - case '^': - if ((n = parse__escape(&in)) == -1) - return (NULL); - *out++ = n; - break; - - case 'M': - if (in[1] == '-' && in[2] != '\0') { - *out++ = '\033'; - in += 2; - break; - } - /*FALLTHROUGH*/ - - default: - *out++ = *in++; - break; - } -} - - -/* parse_cmd(): - * Return the command number for the command string given - * or -1 if one is not found - */ -protected int -parse_cmd(EditLine *el, const Char *cmd) -{ - el_bindings_t *b; - - for (b = el->el_map.help; b->name != NULL; b++) - if (Strcmp(b->name, cmd) == 0) - return (b->func); - return (-1); -} diff --git a/kerberosV/src/lib/libedit/src/parse.h b/kerberosV/src/lib/libedit/src/parse.h deleted file mode 100644 index ec04051bc27..00000000000 --- a/kerberosV/src/lib/libedit/src/parse.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $NetBSD: parse.h,v 1.7 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)parse.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.parse.h: Parser functions - */ -#ifndef _h_el_parse -#define _h_el_parse - -protected int parse_line(EditLine *, const Char *); -protected int parse__escape(const Char **); -protected Char *parse__string(Char *, const Char *); -protected int parse_cmd(EditLine *, const Char *); - -#endif /* _h_el_parse */ diff --git a/kerberosV/src/lib/libedit/src/prompt.c b/kerberosV/src/lib/libedit/src/prompt.c deleted file mode 100644 index acfb4372e4a..00000000000 --- a/kerberosV/src/lib/libedit/src/prompt.c +++ /dev/null @@ -1,199 +0,0 @@ -/* $NetBSD: prompt.c,v 1.18 2009/12/31 15:58:26 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)prompt.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: prompt.c,v 1.18 2009/12/31 15:58:26 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * prompt.c: Prompt printing functions - */ -#include -#include "el.h" - -private Char *prompt_default(EditLine *); -private Char *prompt_default_r(EditLine *); - -/* prompt_default(): - * Just a default prompt, in case the user did not provide one - */ -private Char * -/*ARGSUSED*/ -prompt_default(EditLine *el __attribute__((__unused__))) -{ - static Char a[3] = {'?', ' ', '\0'}; - - return (a); -} - - -/* prompt_default_r(): - * Just a default rprompt, in case the user did not provide one - */ -private Char * -/*ARGSUSED*/ -prompt_default_r(EditLine *el __attribute__((__unused__))) -{ - static Char a[1] = {'\0'}; - - return (a); -} - - -/* prompt_print(): - * Print the prompt and update the prompt position. - */ -protected void -prompt_print(EditLine *el, int op) -{ - el_prompt_t *elp; - Char *p; - int ignore = 0; - - if (op == EL_PROMPT) - elp = &el->el_prompt; - else - elp = &el->el_rprompt; - - if (elp->p_wide) - p = (*elp->p_func)(el); - else - p = ct_decode_string((char *)(void *)(*elp->p_func)(el), - &el->el_scratch); - - for (; *p; p++) { - if (elp->p_ignore == *p) { - ignore = !ignore; - continue; - } - if (ignore) - term__putc(el, *p); - else - re_putc(el, *p, 1); - } - - elp->p_pos.v = el->el_refresh.r_cursor.v; - elp->p_pos.h = el->el_refresh.r_cursor.h; -} - - -/* prompt_init(): - * Initialize the prompt stuff - */ -protected int -prompt_init(EditLine *el) -{ - - el->el_prompt.p_func = prompt_default; - el->el_prompt.p_pos.v = 0; - el->el_prompt.p_pos.h = 0; - el->el_prompt.p_ignore = '\0'; - el->el_rprompt.p_func = prompt_default_r; - el->el_rprompt.p_pos.v = 0; - el->el_rprompt.p_pos.h = 0; - el->el_rprompt.p_ignore = '\0'; - return 0; -} - - -/* prompt_end(): - * Clean up the prompt stuff - */ -protected void -/*ARGSUSED*/ -prompt_end(EditLine *el __attribute__((__unused__))) -{ -} - - -/* prompt_set(): - * Install a prompt printing function - */ -protected int -prompt_set(EditLine *el, el_pfunc_t prf, Char c, int op, int wide) -{ - el_prompt_t *p; - - if (op == EL_PROMPT || op == EL_PROMPT_ESC) - p = &el->el_prompt; - else - p = &el->el_rprompt; - - if (prf == NULL) { - if (op == EL_PROMPT || op == EL_PROMPT_ESC) - p->p_func = prompt_default; - else - p->p_func = prompt_default_r; - } else { - p->p_func = prf; - } - - p->p_ignore = c; - - p->p_pos.v = 0; - p->p_pos.h = 0; - p->p_wide = wide; - - return 0; -} - - -/* prompt_get(): - * Retrieve the prompt printing function - */ -protected int -prompt_get(EditLine *el, el_pfunc_t *prf, Char *c, int op) -{ - el_prompt_t *p; - - if (prf == NULL) - return -1; - - if (op == EL_PROMPT) - p = &el->el_prompt; - else - p = &el->el_rprompt; - - if (prf) - *prf = p->p_func; - if (c) - *c = p->p_ignore; - - return 0; -} diff --git a/kerberosV/src/lib/libedit/src/prompt.h b/kerberosV/src/lib/libedit/src/prompt.h deleted file mode 100644 index cde7462859b..00000000000 --- a/kerberosV/src/lib/libedit/src/prompt.h +++ /dev/null @@ -1,60 +0,0 @@ -/* $NetBSD: prompt.h,v 1.10 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)prompt.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.prompt.h: Prompt printing stuff - */ -#ifndef _h_el_prompt -#define _h_el_prompt - -#include "histedit.h" - -typedef Char *(*el_pfunc_t)(EditLine *); - -typedef struct el_prompt_t { - el_pfunc_t p_func; /* Function to return the prompt */ - coord_t p_pos; /* position in the line after prompt */ - Char p_ignore; /* character to start/end literal */ - int p_wide; -} el_prompt_t; - -protected void prompt_print(EditLine *, int); -protected int prompt_set(EditLine *, el_pfunc_t, Char, int, int); -protected int prompt_get(EditLine *, el_pfunc_t *, Char *, int); -protected int prompt_init(EditLine *); -protected void prompt_end(EditLine *); - -#endif /* _h_el_prompt */ diff --git a/kerberosV/src/lib/libedit/src/read.c b/kerberosV/src/lib/libedit/src/read.c deleted file mode 100644 index 094977f7267..00000000000 --- a/kerberosV/src/lib/libedit/src/read.c +++ /dev/null @@ -1,718 +0,0 @@ -/* $NetBSD: read.c,v 1.58 2011/02/18 20:53:05 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)read.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: read.c,v 1.58 2011/02/18 20:53:05 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * read.c: Clean this junk up! This is horrible code. - * Terminal read functions - */ -#include -#include -#include -#include -#include -#include "el.h" - -#define OKCMD -1 /* must be -1! */ - -private int read__fixio(int, int); -private int read_preread(EditLine *); -private int read_char(EditLine *, Char *); -private int read_getcmd(EditLine *, el_action_t *, Char *); -private void read_pop(c_macro_t *); - -/* read_init(): - * Initialize the read stuff - */ -protected int -read_init(EditLine *el) -{ - /* builtin read_char */ - el->el_read.read_char = read_char; - return 0; -} - - -/* el_read_setfn(): - * Set the read char function to the one provided. - * If it is set to EL_BUILTIN_GETCFN, then reset to the builtin one. - */ -protected int -el_read_setfn(EditLine *el, el_rfunc_t rc) -{ - el->el_read.read_char = (rc == EL_BUILTIN_GETCFN) ? read_char : rc; - return 0; -} - - -/* el_read_getfn(): - * return the current read char function, or EL_BUILTIN_GETCFN - * if it is the default one - */ -protected el_rfunc_t -el_read_getfn(EditLine *el) -{ - return (el->el_read.read_char == read_char) ? - EL_BUILTIN_GETCFN : el->el_read.read_char; -} - - -#ifndef MIN -#define MIN(A,B) ((A) < (B) ? (A) : (B)) -#endif - -#ifdef DEBUG_EDIT -private void -read_debug(EditLine *el) -{ - - if (el->el_line.cursor > el->el_line.lastchar) - (void) fprintf(el->el_errfile, "cursor > lastchar\r\n"); - if (el->el_line.cursor < el->el_line.buffer) - (void) fprintf(el->el_errfile, "cursor < buffer\r\n"); - if (el->el_line.cursor > el->el_line.limit) - (void) fprintf(el->el_errfile, "cursor > limit\r\n"); - if (el->el_line.lastchar > el->el_line.limit) - (void) fprintf(el->el_errfile, "lastchar > limit\r\n"); - if (el->el_line.limit != &el->el_line.buffer[EL_BUFSIZ - 2]) - (void) fprintf(el->el_errfile, "limit != &buffer[EL_BUFSIZ-2]\r\n"); -} -#endif /* DEBUG_EDIT */ - - -/* read__fixio(): - * Try to recover from a read error - */ -/* ARGSUSED */ -private int -read__fixio(int fd __attribute__((__unused__)), int e) -{ - - switch (e) { - case -1: /* Make sure that the code is reachable */ - -#ifdef EWOULDBLOCK - case EWOULDBLOCK: -#ifndef TRY_AGAIN -#define TRY_AGAIN -#endif -#endif /* EWOULDBLOCK */ - -#if defined(POSIX) && defined(EAGAIN) -#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN - case EAGAIN: -#ifndef TRY_AGAIN -#define TRY_AGAIN -#endif -#endif /* EWOULDBLOCK && EWOULDBLOCK != EAGAIN */ -#endif /* POSIX && EAGAIN */ - - e = 0; -#ifdef TRY_AGAIN -#if defined(F_SETFL) && defined(O_NDELAY) - if ((e = fcntl(fd, F_GETFL, 0)) == -1) - return (-1); - - if (fcntl(fd, F_SETFL, e & ~O_NDELAY) == -1) - return (-1); - else - e = 1; -#endif /* F_SETFL && O_NDELAY */ - -#ifdef FIONBIO - { - int zero = 0; - - if (ioctl(fd, FIONBIO, (ioctl_t) & zero) == -1) - return (-1); - else - e = 1; - } -#endif /* FIONBIO */ - -#endif /* TRY_AGAIN */ - return (e ? 0 : -1); - - case EINTR: - return (0); - - default: - return (-1); - } -} - - -/* read_preread(): - * Try to read the stuff in the input queue; - */ -private int -read_preread(EditLine *el) -{ - int chrs = 0; - - if (el->el_tty.t_mode == ED_IO) - return (0); - -#ifndef WIDECHAR -/* FIONREAD attempts to buffer up multiple bytes, and to make that work - * properly with partial wide/UTF-8 characters would need some careful work. */ -#ifdef FIONREAD - (void) ioctl(el->el_infd, FIONREAD, (ioctl_t) & chrs); - if (chrs > 0) { - char buf[EL_BUFSIZ]; - - chrs = read(el->el_infd, buf, - (size_t) MIN(chrs, EL_BUFSIZ - 1)); - if (chrs > 0) { - buf[chrs] = '\0'; - el_push(el, buf); - } - } -#endif /* FIONREAD */ -#endif - return (chrs > 0); -} - - -/* el_push(): - * Push a macro - */ -public void -FUN(el,push)(EditLine *el, const Char *str) -{ - c_macro_t *ma = &el->el_chared.c_macro; - - if (str != NULL && ma->level + 1 < EL_MAXMACRO) { - ma->level++; - if ((ma->macro[ma->level] = Strdup(str)) != NULL) - return; - ma->level--; - } - term_beep(el); - term__flush(el); -} - - -/* read_getcmd(): - * Return next command from the input stream. - * Character values > 255 are not looked up in the map, but inserted. - */ -private int -read_getcmd(EditLine *el, el_action_t *cmdnum, Char *ch) -{ - el_action_t cmd; - int num; - - el->el_errno = 0; - do { - if ((num = FUN(el,getc)(el, ch)) != 1) {/* if EOF or error */ - el->el_errno = num == 0 ? 0 : errno; - return (num); - } - -#ifdef KANJI - if ((*ch & 0200)) { - el->el_state.metanext = 0; - cmd = CcViMap[' ']; - break; - } else -#endif /* KANJI */ - - if (el->el_state.metanext) { - el->el_state.metanext = 0; - *ch |= 0200; - } -#ifdef WIDECHAR - if (*ch >= N_KEYS) - cmd = ED_INSERT; - else -#endif - cmd = el->el_map.current[(unsigned char) *ch]; - if (cmd == ED_SEQUENCE_LEAD_IN) { - key_value_t val; - switch (key_get(el, ch, &val)) { - case XK_CMD: - cmd = val.cmd; - break; - case XK_STR: - FUN(el,push)(el, val.str); - break; -#ifdef notyet - case XK_EXE: - /* XXX: In the future to run a user function */ - RunCommand(val.str); - break; -#endif - default: - EL_ABORT((el->el_errfile, "Bad XK_ type \n")); - break; - } - } - if (el->el_map.alt == NULL) - el->el_map.current = el->el_map.key; - } while (cmd == ED_SEQUENCE_LEAD_IN); - *cmdnum = cmd; - return (OKCMD); -} - -#ifdef WIDECHAR -/* utf8_islead(): - * Test whether a byte is a leading byte of a UTF-8 sequence. - */ -private int -utf8_islead(unsigned char c) -{ - return (c < 0x80) || /* single byte char */ - (c >= 0xc2 && c <= 0xf4); /* start of multibyte sequence */ -} -#endif - -/* read_char(): - * Read a character from the tty. - */ -private int -read_char(EditLine *el, Char *cp) -{ - ssize_t num_read; - int tried = 0; - char cbuf[MB_LEN_MAX]; - int cbp = 0; - int bytes = 0; - - again: - el->el_signal->sig_no = 0; - while ((num_read = read(el->el_infd, cbuf + cbp, 1)) == -1) { - switch (el->el_signal->sig_no) { - case SIGCONT: - el_set(el, EL_REFRESH); - /*FALLTHROUGH*/ - case SIGWINCH: - sig_set(el); - goto again; - default: - break; - } - if (!tried && read__fixio(el->el_infd, errno) == 0) - tried = 1; - else { - *cp = '\0'; - return (-1); - } - } - -#ifdef WIDECHAR - if (el->el_flags & CHARSET_IS_UTF8) { - if (!utf8_islead((unsigned char)cbuf[0])) - goto again; /* discard the byte we read and try again */ - ++cbp; - if ((bytes = ct_mbtowc(cp, cbuf, cbp)) == -1) { - ct_mbtowc_reset; - if (cbp >= MB_LEN_MAX) { /* "shouldn't happen" */ - *cp = '\0'; - return (-1); - } - goto again; - } - } else /* we don't support other multibyte charsets */ -#endif - *cp = (unsigned char)cbuf[0]; - - if ((el->el_flags & IGNORE_EXTCHARS) && bytes > 1) { - cbp = 0; /* skip this character */ - goto again; - } - - return (int)num_read; -} - -/* read_pop(): - * Pop a macro from the stack - */ -private void -read_pop(c_macro_t *ma) -{ - int i; - - el_free(ma->macro[0]); - for (i = 0; i < ma->level; i++) - ma->macro[i] = ma->macro[i + 1]; - ma->level--; - ma->offset = 0; -} - -/* el_getc(): - * Read a character - */ -public int -FUN(el,getc)(EditLine *el, Char *cp) -{ - int num_read; - c_macro_t *ma = &el->el_chared.c_macro; - - term__flush(el); - for (;;) { - if (ma->level < 0) { - if (!read_preread(el)) - break; - } - - if (ma->level < 0) - break; - - if (ma->macro[0][ma->offset] == '\0') { - read_pop(ma); - continue; - } - - *cp = ma->macro[0][ma->offset++]; - - if (ma->macro[0][ma->offset] == '\0') { - /* Needed for QuoteMode On */ - read_pop(ma); - } - - return (1); - } - -#ifdef DEBUG_READ - (void) fprintf(el->el_errfile, "Turning raw mode on\n"); -#endif /* DEBUG_READ */ - if (tty_rawmode(el) < 0)/* make sure the tty is set up correctly */ - return (0); - -#ifdef DEBUG_READ - (void) fprintf(el->el_errfile, "Reading a character\n"); -#endif /* DEBUG_READ */ - num_read = (*el->el_read.read_char)(el, cp); -#ifdef WIDECHAR - if (el->el_flags & NARROW_READ) - *cp = *(char *)(void *)cp; -#endif -#ifdef DEBUG_READ - (void) fprintf(el->el_errfile, "Got it %c\n", *cp); -#endif /* DEBUG_READ */ - return (num_read); -} - -protected void -read_prepare(EditLine *el) -{ - if (el->el_flags & HANDLE_SIGNALS) - sig_set(el); - if (el->el_flags & NO_TTY) - return; - if ((el->el_flags & (UNBUFFERED|EDIT_DISABLED)) == UNBUFFERED) - tty_rawmode(el); - - /* This is relatively cheap, and things go terribly wrong if - we have the wrong size. */ - el_resize(el); - re_clear_display(el); /* reset the display stuff */ - ch_reset(el, 0); - re_refresh(el); /* print the prompt */ - - if (el->el_flags & UNBUFFERED) - term__flush(el); -} - -protected void -read_finish(EditLine *el) -{ - if ((el->el_flags & UNBUFFERED) == 0) - (void) tty_cookedmode(el); - if (el->el_flags & HANDLE_SIGNALS) - sig_clr(el); -} - -public const Char * -FUN(el,gets)(EditLine *el, int *nread) -{ - int retval; - el_action_t cmdnum = 0; - int num; /* how many chars we have read at NL */ - Char ch, *cp; - int crlf = 0; - int nrb; -#ifdef FIONREAD - c_macro_t *ma = &el->el_chared.c_macro; -#endif /* FIONREAD */ - - if (nread == NULL) - nread = &nrb; - *nread = 0; - - if (el->el_flags & NO_TTY) { - size_t idx; - - cp = el->el_line.buffer; - while ((num = (*el->el_read.read_char)(el, cp)) == 1) { - /* make sure there is space for next character */ - if (cp + 1 >= el->el_line.limit) { - idx = (cp - el->el_line.buffer); - if (!ch_enlargebufs(el, 2)) - break; - cp = &el->el_line.buffer[idx]; - } - cp++; - if (el->el_flags & UNBUFFERED) - break; - if (cp[-1] == '\r' || cp[-1] == '\n') - break; - } - if (num == -1) { - if (errno == EINTR) - cp = el->el_line.buffer; - el->el_errno = errno; - } - - goto noedit; - } - - -#ifdef FIONREAD - if (el->el_tty.t_mode == EX_IO && ma->level < 0) { - long chrs = 0; - - (void) ioctl(el->el_infd, FIONREAD, (ioctl_t) & chrs); - if (chrs == 0) { - if (tty_rawmode(el) < 0) { - errno = 0; - *nread = 0; - return (NULL); - } - } - } -#endif /* FIONREAD */ - - if ((el->el_flags & UNBUFFERED) == 0) - read_prepare(el); - - if (el->el_flags & EDIT_DISABLED) { - size_t idx; - - if ((el->el_flags & UNBUFFERED) == 0) - cp = el->el_line.buffer; - else - cp = el->el_line.lastchar; - - term__flush(el); - - while ((num = (*el->el_read.read_char)(el, cp)) == 1) { - /* make sure there is space next character */ - if (cp + 1 >= el->el_line.limit) { - idx = (cp - el->el_line.buffer); - if (!ch_enlargebufs(el, 2)) - break; - cp = &el->el_line.buffer[idx]; - } - cp++; - crlf = cp[-1] == '\r' || cp[-1] == '\n'; - if (el->el_flags & UNBUFFERED) - break; - if (crlf) - break; - } - - if (num == -1) { - if (errno == EINTR) - cp = el->el_line.buffer; - el->el_errno = errno; - } - - goto noedit; - } - - for (num = OKCMD; num == OKCMD;) { /* while still editing this - * line */ -#ifdef DEBUG_EDIT - read_debug(el); -#endif /* DEBUG_EDIT */ - /* if EOF or error */ - if ((num = read_getcmd(el, &cmdnum, &ch)) != OKCMD) { -#ifdef DEBUG_READ - (void) fprintf(el->el_errfile, - "Returning from el_gets %d\n", num); -#endif /* DEBUG_READ */ - break; - } - if (el->el_errno == EINTR) { - el->el_line.buffer[0] = '\0'; - el->el_line.lastchar = - el->el_line.cursor = el->el_line.buffer; - break; - } - if ((unsigned int)cmdnum >= (unsigned int)el->el_map.nfunc) { /* BUG CHECK command */ -#ifdef DEBUG_EDIT - (void) fprintf(el->el_errfile, - "ERROR: illegal command from key 0%o\r\n", ch); -#endif /* DEBUG_EDIT */ - continue; /* try again */ - } - /* now do the real command */ -#ifdef DEBUG_READ - { - el_bindings_t *b; - for (b = el->el_map.help; b->name; b++) - if (b->func == cmdnum) - break; - if (b->name) - (void) fprintf(el->el_errfile, - "Executing %s\n", b->name); - else - (void) fprintf(el->el_errfile, - "Error command = %d\n", cmdnum); - } -#endif /* DEBUG_READ */ - /* vi redo needs these way down the levels... */ - el->el_state.thiscmd = cmdnum; - el->el_state.thisch = ch; - if (el->el_map.type == MAP_VI && - el->el_map.current == el->el_map.key && - el->el_chared.c_redo.pos < el->el_chared.c_redo.lim) { - if (cmdnum == VI_DELETE_PREV_CHAR && - el->el_chared.c_redo.pos != el->el_chared.c_redo.buf - && Isprint(el->el_chared.c_redo.pos[-1])) - el->el_chared.c_redo.pos--; - else - *el->el_chared.c_redo.pos++ = ch; - } - retval = (*el->el_map.func[cmdnum]) (el, ch); -#ifdef DEBUG_READ - (void) fprintf(el->el_errfile, - "Returned state %d\n", retval ); -#endif /* DEBUG_READ */ - - /* save the last command here */ - el->el_state.lastcmd = cmdnum; - - /* use any return value */ - switch (retval) { - case CC_CURSOR: - re_refresh_cursor(el); - break; - - case CC_REDISPLAY: - re_clear_lines(el); - re_clear_display(el); - /* FALLTHROUGH */ - - case CC_REFRESH: - re_refresh(el); - break; - - case CC_REFRESH_BEEP: - re_refresh(el); - term_beep(el); - break; - - case CC_NORM: /* normal char */ - break; - - case CC_ARGHACK: /* Suggested by Rich Salz */ - /* */ - continue; /* keep going... */ - - case CC_EOF: /* end of file typed */ - if ((el->el_flags & UNBUFFERED) == 0) - num = 0; - else if (num == -1) { - *el->el_line.lastchar++ = CONTROL('d'); - el->el_line.cursor = el->el_line.lastchar; - num = 1; - } - break; - - case CC_NEWLINE: /* normal end of line */ - num = (int)(el->el_line.lastchar - el->el_line.buffer); - break; - - case CC_FATAL: /* fatal error, reset to known state */ -#ifdef DEBUG_READ - (void) fprintf(el->el_errfile, - "*** editor fatal ERROR ***\r\n\n"); -#endif /* DEBUG_READ */ - /* put (real) cursor in a known place */ - re_clear_display(el); /* reset the display stuff */ - ch_reset(el, 1); /* reset the input pointers */ - re_refresh(el); /* print the prompt again */ - break; - - case CC_ERROR: - default: /* functions we don't know about */ -#ifdef DEBUG_READ - (void) fprintf(el->el_errfile, - "*** editor ERROR ***\r\n\n"); -#endif /* DEBUG_READ */ - term_beep(el); - term__flush(el); - break; - } - el->el_state.argument = 1; - el->el_state.doingarg = 0; - el->el_chared.c_vcmd.action = NOP; - if (el->el_flags & UNBUFFERED) - break; - } - - term__flush(el); /* flush any buffered output */ - /* make sure the tty is set up correctly */ - if ((el->el_flags & UNBUFFERED) == 0) { - read_finish(el); - *nread = num != -1 ? num : 0; - } else { - *nread = (int)(el->el_line.lastchar - el->el_line.buffer); - } - goto done; -noedit: - el->el_line.cursor = el->el_line.lastchar = cp; - *cp = '\0'; - *nread = (int)(el->el_line.cursor - el->el_line.buffer); -done: - if (*nread == 0) { - if (num == -1) { - *nread = -1; - errno = el->el_errno; - } - return NULL; - } else - return el->el_line.buffer; -} diff --git a/kerberosV/src/lib/libedit/src/read.h b/kerberosV/src/lib/libedit/src/read.h deleted file mode 100644 index 1ded7c1cf2a..00000000000 --- a/kerberosV/src/lib/libedit/src/read.h +++ /dev/null @@ -1,50 +0,0 @@ -/* $NetBSD: read.h,v 1.7 2009/12/30 22:37:40 christos Exp $ */ - -/*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Anthony Mallet. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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. - */ - -/* - * el.read.h: Character reading functions - */ -#ifndef _h_el_read -#define _h_el_read - -typedef int (*el_rfunc_t)(EditLine *, Char *); - -typedef struct el_read_t { - el_rfunc_t read_char; /* Function to read a character */ -} el_read_t; - -protected int read_init(EditLine *); -protected void read_prepare(EditLine *); -protected void read_finish(EditLine *); -protected int el_read_setfn(EditLine *, el_rfunc_t); -protected el_rfunc_t el_read_getfn(EditLine *); - -#endif /* _h_el_read */ diff --git a/kerberosV/src/lib/libedit/src/readline.c b/kerberosV/src/lib/libedit/src/readline.c deleted file mode 100644 index aeb6c46f41e..00000000000 --- a/kerberosV/src/lib/libedit/src/readline.c +++ /dev/null @@ -1,2243 +0,0 @@ -/* $NetBSD: readline.c,v 1.92 2010/09/16 20:08:51 christos Exp $ */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Jaromir Dolecek. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 "config.h" -#if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: readline.c,v 1.92 2010/09/16 20:08:51 christos Exp $"); -#endif /* not lint && not SCCSID */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "editline/readline.h" -#include "el.h" -#include "fcns.h" /* for EL_NUM_FCNS */ -#include "histedit.h" -#include "filecomplete.h" - -#if !defined(SIZE_T_MAX) -# define SIZE_T_MAX (size_t)(-1) -#endif - -void rl_prep_terminal(int); -void rl_deprep_terminal(void); - -/* for rl_complete() */ -#define TAB '\r' - -/* see comment at the #ifdef for sense of this */ -/* #define GDB_411_HACK */ - -/* readline compatibility stuff - look at readline sources/documentation */ -/* to see what these variables mean */ -const char *rl_library_version = "EditLine wrapper"; -int rl_readline_version = RL_READLINE_VERSION; -static char empty[] = { '\0' }; -static char expand_chars[] = { ' ', '\t', '\n', '=', '(', '\0' }; -static char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@', '$', - '>', '<', '=', ';', '|', '&', '{', '(', '\0' }; -char *rl_readline_name = empty; -FILE *rl_instream = NULL; -FILE *rl_outstream = NULL; -int rl_point = 0; -int rl_end = 0; -char *rl_line_buffer = NULL; -VCPFunction *rl_linefunc = NULL; -int rl_done = 0; -VFunction *rl_event_hook = NULL; -KEYMAP_ENTRY_ARRAY emacs_standard_keymap, - emacs_meta_keymap, - emacs_ctlx_keymap; - -int history_base = 1; /* probably never subject to change */ -int history_length = 0; -int max_input_history = 0; -char history_expansion_char = '!'; -char history_subst_char = '^'; -char *history_no_expand_chars = expand_chars; -Function *history_inhibit_expansion_function = NULL; -char *history_arg_extract(int start, int end, const char *str); - -int rl_inhibit_completion = 0; -int rl_attempted_completion_over = 0; -char *rl_basic_word_break_characters = break_chars; -char *rl_completer_word_break_characters = NULL; -char *rl_completer_quote_characters = NULL; -Function *rl_completion_entry_function = NULL; -CPPFunction *rl_attempted_completion_function = NULL; -Function *rl_pre_input_hook = NULL; -Function *rl_startup1_hook = NULL; -int (*rl_getc_function)(FILE *) = NULL; -char *rl_terminal_name = NULL; -int rl_already_prompted = 0; -int rl_filename_completion_desired = 0; -int rl_ignore_completion_duplicates = 0; -int rl_catch_signals = 1; -int readline_echoing_p = 1; -int _rl_print_completions_horizontally = 0; -VFunction *rl_redisplay_function = NULL; -Function *rl_startup_hook = NULL; -VFunction *rl_completion_display_matches_hook = NULL; -VFunction *rl_prep_term_function = (VFunction *)rl_prep_terminal; -VFunction *rl_deprep_term_function = (VFunction *)rl_deprep_terminal; -KEYMAP_ENTRY_ARRAY emacs_meta_keymap; - -/* - * The current prompt string. - */ -char *rl_prompt = NULL; -/* - * This is set to character indicating type of completion being done by - * rl_complete_internal(); this is available for application completion - * functions. - */ -int rl_completion_type = 0; - -/* - * If more than this number of items results from query for possible - * completions, we ask user if they are sure to really display the list. - */ -int rl_completion_query_items = 100; - -/* - * List of characters which are word break characters, but should be left - * in the parsed text when it is passed to the completion function. - * Shell uses this to help determine what kind of completing to do. - */ -char *rl_special_prefixes = NULL; - -/* - * This is the character appended to the completed words if at the end of - * the line. Default is ' ' (a space). - */ -int rl_completion_append_character = ' '; - -/* stuff below is used internally by libedit for readline emulation */ - -static History *h = NULL; -static EditLine *e = NULL; -static Function *map[256]; -static jmp_buf topbuf; - -/* internal functions */ -static unsigned char _el_rl_complete(EditLine *, int); -static unsigned char _el_rl_tstp(EditLine *, int); -static char *_get_prompt(EditLine *); -static int _getc_function(EditLine *, char *); -static HIST_ENTRY *_move_history(int); -static int _history_expand_command(const char *, size_t, size_t, - char **); -static char *_rl_compat_sub(const char *, const char *, - const char *, int); -static int _rl_event_read_char(EditLine *, char *); -static void _rl_update_pos(void); - - -/* ARGSUSED */ -static char * -_get_prompt(EditLine *el __attribute__((__unused__))) -{ - rl_already_prompted = 1; - return (rl_prompt); -} - - -/* - * generic function for moving around history - */ -static HIST_ENTRY * -_move_history(int op) -{ - HistEvent ev; - static HIST_ENTRY rl_he; - - if (history(h, &ev, op) != 0) - return (HIST_ENTRY *) NULL; - - rl_he.line = ev.str; - rl_he.data = NULL; - - return (&rl_he); -} - - -/* - * read one key from user defined input function - */ -static int -/*ARGSUSED*/ -_getc_function(EditLine *el, char *c) -{ - int i; - - i = (*rl_getc_function)(NULL); - if (i == -1) - return 0; - *c = i; - return 1; -} - -static void -_resize_fun(EditLine *el, void *a) -{ - const LineInfo *li; - char **ap = a; - - li = el_line(el); - /* a cheesy way to get rid of const cast. */ - *ap = memchr(li->buffer, *li->buffer, 1); -} - -static const char _dothistory[] = "/.history"; - -static const char * -_default_history_file(void) -{ - struct passwd *p; - static char path[PATH_MAX]; - - if (*path) - return path; - if ((p = getpwuid(getuid())) == NULL) - return NULL; - strlcpy(path, p->pw_dir, PATH_MAX); - strlcat(path, _dothistory, PATH_MAX); - return path; -} - -/* - * READLINE compatibility stuff - */ - -/* - * Set the prompt - */ -int -rl_set_prompt(const char *prompt) -{ - char *p; - - if (!prompt) - prompt = ""; - if (rl_prompt != NULL && strcmp(rl_prompt, prompt) == 0) - return 0; - if (rl_prompt) - free(rl_prompt); - rl_prompt = strdup(prompt); - if (rl_prompt == NULL) - return -1; - - while ((p = strchr(rl_prompt, RL_PROMPT_END_IGNORE)) != NULL) - *p = RL_PROMPT_START_IGNORE; - - return 0; -} - -/* - * initialize rl compat stuff - */ -int -rl_initialize(void) -{ - HistEvent ev; - int editmode = 1; - struct termios t; - - if (e != NULL) - el_end(e); - if (h != NULL) - history_end(h); - - if (!rl_instream) - rl_instream = stdin; - if (!rl_outstream) - rl_outstream = stdout; - - /* - * See if we don't really want to run the editor - */ - if (tcgetattr(fileno(rl_instream), &t) != -1 && (t.c_lflag & ECHO) == 0) - editmode = 0; - - e = el_init(rl_readline_name, rl_instream, rl_outstream, stderr); - - if (!editmode) - el_set(e, EL_EDITMODE, 0); - - h = history_init(); - if (!e || !h) - return (-1); - - history(h, &ev, H_SETSIZE, INT_MAX); /* unlimited */ - history_length = 0; - max_input_history = INT_MAX; - el_set(e, EL_HIST, history, h); - - /* Setup resize function */ - el_set(e, EL_RESIZE, _resize_fun, &rl_line_buffer); - - /* setup getc function if valid */ - if (rl_getc_function) - el_set(e, EL_GETCFN, _getc_function); - - /* for proper prompt printing in readline() */ - if (rl_set_prompt("") == -1) { - history_end(h); - el_end(e); - return -1; - } - el_set(e, EL_PROMPT, _get_prompt, RL_PROMPT_START_IGNORE); - el_set(e, EL_SIGNAL, rl_catch_signals); - - /* set default mode to "emacs"-style and read setting afterwards */ - /* so this can be overriden */ - el_set(e, EL_EDITOR, "emacs"); - if (rl_terminal_name != NULL) - el_set(e, EL_TERMINAL, rl_terminal_name); - else - el_get(e, EL_TERMINAL, &rl_terminal_name); - - /* - * Word completion - this has to go AFTER rebinding keys - * to emacs-style. - */ - el_set(e, EL_ADDFN, "rl_complete", - "ReadLine compatible completion function", - _el_rl_complete); - el_set(e, EL_BIND, "^I", "rl_complete", NULL); - - /* - * Send TSTP when ^Z is pressed. - */ - el_set(e, EL_ADDFN, "rl_tstp", - "ReadLine compatible suspend function", - _el_rl_tstp); - el_set(e, EL_BIND, "^Z", "rl_tstp", NULL); - - /* read settings from configuration file */ - el_source(e, NULL); - - /* - * Unfortunately, some applications really do use rl_point - * and rl_line_buffer directly. - */ - _resize_fun(e, &rl_line_buffer); - _rl_update_pos(); - - if (rl_startup_hook) - (*rl_startup_hook)(NULL, 0); - - return (0); -} - - -/* - * read one line from input stream and return it, chomping - * trailing newline (if there is any) - */ -char * -readline(const char *p) -{ - HistEvent ev; - const char * volatile prompt = p; - int count; - const char *ret; - char *buf; - static int used_event_hook; - - if (e == NULL || h == NULL) - rl_initialize(); - - rl_done = 0; - - (void)setjmp(topbuf); - - /* update prompt accordingly to what has been passed */ - if (rl_set_prompt(prompt) == -1) - return NULL; - - if (rl_pre_input_hook) - (*rl_pre_input_hook)(NULL, 0); - - if (rl_event_hook && !(e->el_flags&NO_TTY)) { - el_set(e, EL_GETCFN, _rl_event_read_char); - used_event_hook = 1; - } - - if (!rl_event_hook && used_event_hook) { - el_set(e, EL_GETCFN, EL_BUILTIN_GETCFN); - used_event_hook = 0; - } - - rl_already_prompted = 0; - - /* get one line from input stream */ - ret = el_gets(e, &count); - - if (ret && count > 0) { - int lastidx; - - buf = strdup(ret); - if (buf == NULL) - return NULL; - lastidx = count - 1; - if (buf[lastidx] == '\n') - buf[lastidx] = '\0'; - } else - buf = NULL; - - history(h, &ev, H_GETSIZE); - history_length = ev.num; - - return buf; -} - -/* - * history functions - */ - -/* - * is normally called before application starts to use - * history expansion functions - */ -void -using_history(void) -{ - if (h == NULL || e == NULL) - rl_initialize(); -} - - -/* - * substitute ``what'' with ``with'', returning resulting string; if - * globally == 1, substitutes all occurrences of what, otherwise only the - * first one - */ -static char * -_rl_compat_sub(const char *str, const char *what, const char *with, - int globally) -{ - const char *s; - char *r, *result; - size_t len, with_len, what_len; - - len = strlen(str); - with_len = strlen(with); - what_len = strlen(what); - - /* calculate length we need for result */ - s = str; - while (*s) { - if (*s == *what && !strncmp(s, what, what_len)) { - len += with_len - what_len; - if (!globally) - break; - s += what_len; - } else - s++; - } - r = result = malloc(len + 1); - if (result == NULL) - return NULL; - s = str; - while (*s) { - if (*s == *what && !strncmp(s, what, what_len)) { - (void)strncpy(r, with, with_len); - r += with_len; - s += what_len; - if (!globally) { - (void)strcpy(r, s); - return(result); - } - } else - *r++ = *s++; - } - *r = '\0'; - return(result); -} - -static char *last_search_pat; /* last !?pat[?] search pattern */ -static char *last_search_match; /* last !?pat[?] that matched */ - -const char * -get_history_event(const char *cmd, int *cindex, int qchar) -{ - int idx, sign, sub, num, begin, ret; - size_t len; - char *pat; - const char *rptr; - HistEvent ev; - - idx = *cindex; - if (cmd[idx++] != history_expansion_char) - return(NULL); - - /* find out which event to take */ - if (cmd[idx] == history_expansion_char || cmd[idx] == '\0') { - if (history(h, &ev, H_FIRST) != 0) - return(NULL); - *cindex = cmd[idx]? (idx + 1):idx; - return ev.str; - } - sign = 0; - if (cmd[idx] == '-') { - sign = 1; - idx++; - } - - if ('0' <= cmd[idx] && cmd[idx] <= '9') { - HIST_ENTRY *rl_he; - - num = 0; - while (cmd[idx] && '0' <= cmd[idx] && cmd[idx] <= '9') { - num = num * 10 + cmd[idx] - '0'; - idx++; - } - if (sign) - num = history_length - num + 1; - - if (!(rl_he = history_get(num))) - return(NULL); - - *cindex = idx; - return(rl_he->line); - } - sub = 0; - if (cmd[idx] == '?') { - sub = 1; - idx++; - } - begin = idx; - while (cmd[idx]) { - if (cmd[idx] == '\n') - break; - if (sub && cmd[idx] == '?') - break; - if (!sub && (cmd[idx] == ':' || cmd[idx] == ' ' - || cmd[idx] == '\t' || cmd[idx] == qchar)) - break; - idx++; - } - len = idx - begin; - if (sub && cmd[idx] == '?') - idx++; - if (sub && len == 0 && last_search_pat && *last_search_pat) - pat = last_search_pat; - else if (len == 0) - return(NULL); - else { - if ((pat = malloc(len + 1)) == NULL) - return NULL; - (void)strncpy(pat, cmd + begin, len); - pat[len] = '\0'; - } - - if (history(h, &ev, H_CURR) != 0) { - if (pat != last_search_pat) - free(pat); - return (NULL); - } - num = ev.num; - - if (sub) { - if (pat != last_search_pat) { - if (last_search_pat) - free(last_search_pat); - last_search_pat = pat; - } - ret = history_search(pat, -1); - } else - ret = history_search_prefix(pat, -1); - - if (ret == -1) { - /* restore to end of list on failed search */ - history(h, &ev, H_FIRST); - (void)fprintf(rl_outstream, "%s: Event not found\n", pat); - if (pat != last_search_pat) - free(pat); - return(NULL); - } - - if (sub && len) { - if (last_search_match && last_search_match != pat) - free(last_search_match); - last_search_match = pat; - } - - if (pat != last_search_pat) - free(pat); - - if (history(h, &ev, H_CURR) != 0) - return(NULL); - *cindex = idx; - rptr = ev.str; - - /* roll back to original position */ - (void)history(h, &ev, H_SET, num); - - return rptr; -} - -/* - * the real function doing history expansion - takes as argument command - * to do and data upon which the command should be executed - * does expansion the way I've understood readline documentation - * - * returns 0 if data was not modified, 1 if it was and 2 if the string - * should be only printed and not executed; in case of error, - * returns -1 and *result points to NULL - * it's callers responsibility to free() string returned in *result - */ -static int -_history_expand_command(const char *command, size_t offs, size_t cmdlen, - char **result) -{ - char *tmp, *search = NULL, *aptr; - const char *ptr, *cmd; - static char *from = NULL, *to = NULL; - int start, end, idx, has_mods = 0; - int p_on = 0, g_on = 0; - - *result = NULL; - aptr = NULL; - ptr = NULL; - - /* First get event specifier */ - idx = 0; - - if (strchr(":^*$", command[offs + 1])) { - char str[4]; - /* - * "!:" is shorthand for "!!:". - * "!^", "!*" and "!$" are shorthand for - * "!!:^", "!!:*" and "!!:$" respectively. - */ - str[0] = str[1] = '!'; - str[2] = '0'; - ptr = get_history_event(str, &idx, 0); - idx = (command[offs + 1] == ':')? 1:0; - has_mods = 1; - } else { - if (command[offs + 1] == '#') { - /* use command so far */ - if ((aptr = malloc(offs + 1)) == NULL) - return -1; - (void)strncpy(aptr, command, offs); - aptr[offs] = '\0'; - idx = 1; - } else { - int qchar; - - qchar = (offs > 0 && command[offs - 1] == '"')? '"':0; - ptr = get_history_event(command + offs, &idx, qchar); - } - has_mods = command[offs + idx] == ':'; - } - - if (ptr == NULL && aptr == NULL) - return(-1); - - if (!has_mods) { - *result = strdup(aptr ? aptr : ptr); - if (aptr) - free(aptr); - if (*result == NULL) - return -1; - return(1); - } - - cmd = command + offs + idx + 1; - - /* Now parse any word designators */ - - if (*cmd == '%') /* last word matched by ?pat? */ - tmp = strdup(last_search_match? last_search_match:""); - else if (strchr("^*$-0123456789", *cmd)) { - start = end = -1; - if (*cmd == '^') - start = end = 1, cmd++; - else if (*cmd == '$') - start = -1, cmd++; - else if (*cmd == '*') - start = 1, cmd++; - else if (*cmd == '-' || isdigit((unsigned char) *cmd)) { - start = 0; - while (*cmd && '0' <= *cmd && *cmd <= '9') - start = start * 10 + *cmd++ - '0'; - - if (*cmd == '-') { - if (isdigit((unsigned char) cmd[1])) { - cmd++; - end = 0; - while (*cmd && '0' <= *cmd && *cmd <= '9') - end = end * 10 + *cmd++ - '0'; - } else if (cmd[1] == '$') { - cmd += 2; - end = -1; - } else { - cmd++; - end = -2; - } - } else if (*cmd == '*') - end = -1, cmd++; - else - end = start; - } - tmp = history_arg_extract(start, end, aptr? aptr:ptr); - if (tmp == NULL) { - (void)fprintf(rl_outstream, "%s: Bad word specifier", - command + offs + idx); - if (aptr) - free(aptr); - return(-1); - } - } else - tmp = strdup(aptr? aptr:ptr); - - if (aptr) - free(aptr); - - if (*cmd == '\0' || ((size_t)(cmd - (command + offs)) >= cmdlen)) { - *result = tmp; - return(1); - } - - for (; *cmd; cmd++) { - if (*cmd == ':') - continue; - else if (*cmd == 'h') { /* remove trailing path */ - if ((aptr = strrchr(tmp, '/')) != NULL) - *aptr = '\0'; - } else if (*cmd == 't') { /* remove leading path */ - if ((aptr = strrchr(tmp, '/')) != NULL) { - aptr = strdup(aptr + 1); - free(tmp); - tmp = aptr; - } - } else if (*cmd == 'r') { /* remove trailing suffix */ - if ((aptr = strrchr(tmp, '.')) != NULL) - *aptr = '\0'; - } else if (*cmd == 'e') { /* remove all but suffix */ - if ((aptr = strrchr(tmp, '.')) != NULL) { - aptr = strdup(aptr); - free(tmp); - tmp = aptr; - } - } else if (*cmd == 'p') /* print only */ - p_on = 1; - else if (*cmd == 'g') - g_on = 2; - else if (*cmd == 's' || *cmd == '&') { - char *what, *with, delim; - size_t len, from_len; - size_t size; - - if (*cmd == '&' && (from == NULL || to == NULL)) - continue; - else if (*cmd == 's') { - delim = *(++cmd), cmd++; - size = 16; - what = realloc(from, size); - if (what == NULL) { - free(from); - free(tmp); - return 0; - } - len = 0; - for (; *cmd && *cmd != delim; cmd++) { - if (*cmd == '\\' && cmd[1] == delim) - cmd++; - if (len >= size) { - char *nwhat; - nwhat = realloc(what, - (size <<= 1)); - if (nwhat == NULL) { - free(what); - free(tmp); - return 0; - } - what = nwhat; - } - what[len++] = *cmd; - } - what[len] = '\0'; - from = what; - if (*what == '\0') { - free(what); - if (search) { - from = strdup(search); - if (from == NULL) { - free(tmp); - return 0; - } - } else { - from = NULL; - free(tmp); - return (-1); - } - } - cmd++; /* shift after delim */ - if (!*cmd) - continue; - - size = 16; - with = realloc(to, size); - if (with == NULL) { - free(to); - free(tmp); - return -1; - } - len = 0; - from_len = strlen(from); - for (; *cmd && *cmd != delim; cmd++) { - if (len + from_len + 1 >= size) { - char *nwith; - size += from_len + 1; - nwith = realloc(with, size); - if (nwith == NULL) { - free(with); - free(tmp); - return -1; - } - with = nwith; - } - if (*cmd == '&') { - /* safe */ - (void)strcpy(&with[len], from); - len += from_len; - continue; - } - if (*cmd == '\\' - && (*(cmd + 1) == delim - || *(cmd + 1) == '&')) - cmd++; - with[len++] = *cmd; - } - with[len] = '\0'; - to = with; - } - - aptr = _rl_compat_sub(tmp, from, to, g_on); - if (aptr) { - free(tmp); - tmp = aptr; - } - g_on = 0; - } - } - *result = tmp; - return (p_on? 2:1); -} - - -/* - * csh-style history expansion - */ -int -history_expand(char *str, char **output) -{ - int ret = 0; - size_t idx, i, size; - char *tmp, *result; - - if (h == NULL || e == NULL) - rl_initialize(); - - if (history_expansion_char == 0) { - *output = strdup(str); - return(0); - } - - *output = NULL; - if (str[0] == history_subst_char) { - /* ^foo^foo2^ is equivalent to !!:s^foo^foo2^ */ - *output = malloc(strlen(str) + 4 + 1); - if (*output == NULL) - return 0; - (*output)[0] = (*output)[1] = history_expansion_char; - (*output)[2] = ':'; - (*output)[3] = 's'; - (void)strcpy((*output) + 4, str); - str = *output; - } else { - *output = strdup(str); - if (*output == NULL) - return 0; - } - -#define ADD_STRING(what, len, fr) \ - { \ - if (idx + len + 1 > size) { \ - char *nresult = realloc(result, (size += len + 1));\ - if (nresult == NULL) { \ - free(*output); \ - if (/*CONSTCOND*/fr) \ - free(tmp); \ - return 0; \ - } \ - result = nresult; \ - } \ - (void)strncpy(&result[idx], what, len); \ - idx += len; \ - result[idx] = '\0'; \ - } - - result = NULL; - size = idx = 0; - tmp = NULL; - for (i = 0; str[i];) { - int qchar, loop_again; - size_t len, start, j; - - qchar = 0; - loop_again = 1; - start = j = i; -loop: - for (; str[j]; j++) { - if (str[j] == '\\' && - str[j + 1] == history_expansion_char) { - (void)strcpy(&str[j], &str[j + 1]); - continue; - } - if (!loop_again) { - if (isspace((unsigned char) str[j]) - || str[j] == qchar) - break; - } - if (str[j] == history_expansion_char - && !strchr(history_no_expand_chars, str[j + 1]) - && (!history_inhibit_expansion_function || - (*history_inhibit_expansion_function)(str, - (int)j) == 0)) - break; - } - - if (str[j] && loop_again) { - i = j; - qchar = (j > 0 && str[j - 1] == '"' )? '"':0; - j++; - if (str[j] == history_expansion_char) - j++; - loop_again = 0; - goto loop; - } - len = i - start; - ADD_STRING(&str[start], len, 0); - - if (str[i] == '\0' || str[i] != history_expansion_char) { - len = j - i; - ADD_STRING(&str[i], len, 0); - if (start == 0) - ret = 0; - else - ret = 1; - break; - } - ret = _history_expand_command (str, i, (j - i), &tmp); - if (ret > 0 && tmp) { - len = strlen(tmp); - ADD_STRING(tmp, len, 1); - } - if (tmp) { - free(tmp); - tmp = NULL; - } - i = j; - } - - /* ret is 2 for "print only" option */ - if (ret == 2) { - add_history(result); -#ifdef GDB_411_HACK - /* gdb 4.11 has been shipped with readline, where */ - /* history_expand() returned -1 when the line */ - /* should not be executed; in readline 2.1+ */ - /* it should return 2 in such a case */ - ret = -1; -#endif - } - free(*output); - *output = result; - - return (ret); -} - -/* -* Return a string consisting of arguments of "str" from "start" to "end". -*/ -char * -history_arg_extract(int start, int end, const char *str) -{ - size_t i, len, max; - char **arr, *result = NULL; - - arr = history_tokenize(str); - if (!arr) - return NULL; - if (arr && *arr == NULL) - goto out; - - for (max = 0; arr[max]; max++) - continue; - max--; - - if (start == '$') - start = (int)max; - if (end == '$') - end = (int)max; - if (end < 0) - end = (int)max + end + 1; - if (start < 0) - start = end; - - if (start < 0 || end < 0 || (size_t)start > max || - (size_t)end > max || start > end) - goto out; - - for (i = start, len = 0; i <= (size_t)end; i++) - len += strlen(arr[i]) + 1; - len++; - result = malloc(len); - if (result == NULL) - goto out; - - for (i = start, len = 0; i <= (size_t)end; i++) { - (void)strcpy(result + len, arr[i]); - len += strlen(arr[i]); - if (i < (size_t)end) - result[len++] = ' '; - } - result[len] = '\0'; - -out: - for (i = 0; arr[i]; i++) - free(arr[i]); - free(arr); - - return result; -} - -/* - * Parse the string into individual tokens, - * similar to how shell would do it. - */ -char ** -history_tokenize(const char *str) -{ - int size = 1, idx = 0, i, start; - size_t len; - char **result = NULL, *temp, delim = '\0'; - - for (i = 0; str[i];) { - while (isspace((unsigned char) str[i])) - i++; - start = i; - for (; str[i];) { - if (str[i] == '\\') { - if (str[i+1] != '\0') - i++; - } else if (str[i] == delim) - delim = '\0'; - else if (!delim && - (isspace((unsigned char) str[i]) || - strchr("()<>;&|$", str[i]))) - break; - else if (!delim && strchr("'`\"", str[i])) - delim = str[i]; - if (str[i]) - i++; - } - - if (idx + 2 >= size) { - char **nresult; - size <<= 1; - nresult = realloc(result, size * sizeof(char *)); - if (nresult == NULL) { - free(result); - return NULL; - } - result = nresult; - } - len = i - start; - temp = malloc(len + 1); - if (temp == NULL) { - for (i = 0; i < idx; i++) - free(result[i]); - free(result); - return NULL; - } - (void)strncpy(temp, &str[start], len); - temp[len] = '\0'; - result[idx++] = temp; - result[idx] = NULL; - if (str[i]) - i++; - } - return (result); -} - - -/* - * limit size of history record to ``max'' events - */ -void -stifle_history(int max) -{ - HistEvent ev; - - if (h == NULL || e == NULL) - rl_initialize(); - - if (history(h, &ev, H_SETSIZE, max) == 0) - max_input_history = max; -} - - -/* - * "unlimit" size of history - set the limit to maximum allowed int value - */ -int -unstifle_history(void) -{ - HistEvent ev; - int omax; - - history(h, &ev, H_SETSIZE, INT_MAX); - omax = max_input_history; - max_input_history = INT_MAX; - return (omax); /* some value _must_ be returned */ -} - - -int -history_is_stifled(void) -{ - - /* cannot return true answer */ - return (max_input_history != INT_MAX); -} - -static const char _history_tmp_template[] = "/tmp/.historyXXXXXX"; - -int -history_truncate_file (const char *filename, int nlines) -{ - int ret = 0; - FILE *fp, *tp; - char template[sizeof(_history_tmp_template)]; - char buf[4096]; - int fd; - char *cp; - off_t off; - int count = 0; - ssize_t left = 0; - - if (filename == NULL && (filename = _default_history_file()) == NULL) - return errno; - if ((fp = fopen(filename, "r+")) == NULL) - return errno; - strcpy(template, _history_tmp_template); - if ((fd = mkstemp(template)) == -1) { - ret = errno; - goto out1; - } - - if ((tp = fdopen(fd, "r+")) == NULL) { - close(fd); - ret = errno; - goto out2; - } - - for(;;) { - if (fread(buf, sizeof(buf), 1, fp) != 1) { - if (ferror(fp)) { - ret = errno; - break; - } - if (fseeko(fp, (off_t)sizeof(buf) * count, SEEK_SET) == - (off_t)-1) { - ret = errno; - break; - } - left = fread(buf, 1, sizeof(buf), fp); - if (ferror(fp)) { - ret = errno; - break; - } - if (left == 0) { - count--; - left = sizeof(buf); - } else if (fwrite(buf, (size_t)left, 1, tp) != 1) { - ret = errno; - break; - } - fflush(tp); - break; - } - if (fwrite(buf, sizeof(buf), 1, tp) != 1) { - ret = errno; - break; - } - count++; - } - if (ret) - goto out3; - cp = buf + left - 1; - if(*cp != '\n') - cp++; - for(;;) { - while (--cp >= buf) { - if (*cp == '\n') { - if (--nlines == 0) { - if (++cp >= buf + sizeof(buf)) { - count++; - cp = buf; - } - break; - } - } - } - if (nlines <= 0 || count == 0) - break; - count--; - if (fseeko(tp, (off_t)sizeof(buf) * count, SEEK_SET) < 0) { - ret = errno; - break; - } - if (fread(buf, sizeof(buf), 1, tp) != 1) { - if (ferror(tp)) { - ret = errno; - break; - } - ret = EAGAIN; - break; - } - cp = buf + sizeof(buf); - } - - if (ret || nlines > 0) - goto out3; - - if (fseeko(fp, 0, SEEK_SET) == (off_t)-1) { - ret = errno; - goto out3; - } - - if (fseeko(tp, (off_t)sizeof(buf) * count + (cp - buf), SEEK_SET) == - (off_t)-1) { - ret = errno; - goto out3; - } - - for(;;) { - if ((left = fread(buf, 1, sizeof(buf), tp)) == 0) { - if (ferror(fp)) - ret = errno; - break; - } - if (fwrite(buf, (size_t)left, 1, fp) != 1) { - ret = errno; - break; - } - } - fflush(fp); - if((off = ftello(fp)) > 0) - (void)ftruncate(fileno(fp), off); -out3: - fclose(tp); -out2: - unlink(template); -out1: - fclose(fp); - - return ret; -} - - -/* - * read history from a file given - */ -int -read_history(const char *filename) -{ - HistEvent ev; - - if (h == NULL || e == NULL) - rl_initialize(); - if (filename == NULL && (filename = _default_history_file()) == NULL) - return errno; - return (history(h, &ev, H_LOAD, filename) == -1 ? - (errno ? errno : EINVAL) : 0); -} - - -/* - * write history to a file given - */ -int -write_history(const char *filename) -{ - HistEvent ev; - - if (h == NULL || e == NULL) - rl_initialize(); - if (filename == NULL && (filename = _default_history_file()) == NULL) - return errno; - return (history(h, &ev, H_SAVE, filename) == -1 ? - (errno ? errno : EINVAL) : 0); -} - - -/* - * returns history ``num''th event - * - * returned pointer points to static variable - */ -HIST_ENTRY * -history_get(int num) -{ - static HIST_ENTRY she; - HistEvent ev; - int curr_num; - - if (h == NULL || e == NULL) - rl_initialize(); - - /* save current position */ - if (history(h, &ev, H_CURR) != 0) - return (NULL); - curr_num = ev.num; - - /* start from the oldest */ - if (history(h, &ev, H_LAST) != 0) - return (NULL); /* error */ - - /* look forwards for event matching specified offset */ - if (history(h, &ev, H_NEXT_EVDATA, num, &she.data)) - return (NULL); - - she.line = ev.str; - - /* restore pointer to where it was */ - (void)history(h, &ev, H_SET, curr_num); - - return (&she); -} - - -/* - * add the line to history table - */ -int -add_history(const char *line) -{ - HistEvent ev; - - if (h == NULL || e == NULL) - rl_initialize(); - - (void)history(h, &ev, H_ENTER, line); - if (history(h, &ev, H_GETSIZE) == 0) - history_length = ev.num; - - return (!(history_length > 0)); /* return 0 if all is okay */ -} - - -/* - * remove the specified entry from the history list and return it. - */ -HIST_ENTRY * -remove_history(int num) -{ - HIST_ENTRY *he; - HistEvent ev; - - if (h == NULL || e == NULL) - rl_initialize(); - - if ((he = malloc(sizeof(*he))) == NULL) - return NULL; - - if (history(h, &ev, H_DELDATA, num, &he->data) != 0) { - free(he); - return NULL; - } - - he->line = ev.str; - if (history(h, &ev, H_GETSIZE) == 0) - history_length = ev.num; - - return he; -} - - -/* - * replace the line and data of the num-th entry - */ -HIST_ENTRY * -replace_history_entry(int num, const char *line, histdata_t data) -{ - HIST_ENTRY *he; - HistEvent ev; - int curr_num; - - if (h == NULL || e == NULL) - rl_initialize(); - - /* save current position */ - if (history(h, &ev, H_CURR) != 0) - return NULL; - curr_num = ev.num; - - /* start from the oldest */ - if (history(h, &ev, H_LAST) != 0) - return NULL; /* error */ - - if ((he = malloc(sizeof(*he))) == NULL) - return NULL; - - /* look forwards for event matching specified offset */ - if (history(h, &ev, H_NEXT_EVDATA, num, &he->data)) - goto out; - - he->line = strdup(ev.str); - if (he->line == NULL) - goto out; - - if (history(h, &ev, H_REPLACE, line, data)) - goto out; - - /* restore pointer to where it was */ - if (history(h, &ev, H_SET, curr_num)) - goto out; - - return he; -out: - free(he); - return NULL; -} - -/* - * clear the history list - delete all entries - */ -void -clear_history(void) -{ - HistEvent ev; - - (void)history(h, &ev, H_CLEAR); - history_length = 0; -} - - -/* - * returns offset of the current history event - */ -int -where_history(void) -{ - HistEvent ev; - int curr_num, off; - - if (history(h, &ev, H_CURR) != 0) - return (0); - curr_num = ev.num; - - (void)history(h, &ev, H_FIRST); - off = 1; - while (ev.num != curr_num && history(h, &ev, H_NEXT) == 0) - off++; - - return (off); -} - - -/* - * returns current history event or NULL if there is no such event - */ -HIST_ENTRY * -current_history(void) -{ - - return (_move_history(H_CURR)); -} - - -/* - * returns total number of bytes history events' data are using - */ -int -history_total_bytes(void) -{ - HistEvent ev; - int curr_num; - size_t size; - - if (history(h, &ev, H_CURR) != 0) - return (-1); - curr_num = ev.num; - - (void)history(h, &ev, H_FIRST); - size = 0; - do - size += strlen(ev.str) * sizeof(*ev.str); - while (history(h, &ev, H_NEXT) == 0); - - /* get to the same position as before */ - history(h, &ev, H_PREV_EVENT, curr_num); - - return (int)(size); -} - - -/* - * sets the position in the history list to ``pos'' - */ -int -history_set_pos(int pos) -{ - HistEvent ev; - int curr_num; - - if (pos >= history_length || pos < 0) - return (-1); - - (void)history(h, &ev, H_CURR); - curr_num = ev.num; - - /* - * use H_DELDATA to set to nth history (without delete) by passing - * (void **)-1 - */ - if (history(h, &ev, H_DELDATA, pos, (void **)-1)) { - (void)history(h, &ev, H_SET, curr_num); - return(-1); - } - return (0); -} - - -/* - * returns previous event in history and shifts pointer accordingly - */ -HIST_ENTRY * -previous_history(void) -{ - - return (_move_history(H_PREV)); -} - - -/* - * returns next event in history and shifts pointer accordingly - */ -HIST_ENTRY * -next_history(void) -{ - - return (_move_history(H_NEXT)); -} - - -/* - * searches for first history event containing the str - */ -int -history_search(const char *str, int direction) -{ - HistEvent ev; - const char *strp; - int curr_num; - - if (history(h, &ev, H_CURR) != 0) - return (-1); - curr_num = ev.num; - - for (;;) { - if ((strp = strstr(ev.str, str)) != NULL) - return (int) (strp - ev.str); - if (history(h, &ev, direction < 0 ? H_NEXT:H_PREV) != 0) - break; - } - (void)history(h, &ev, H_SET, curr_num); - return (-1); -} - - -/* - * searches for first history event beginning with str - */ -int -history_search_prefix(const char *str, int direction) -{ - HistEvent ev; - - return (history(h, &ev, direction < 0 ? - H_PREV_STR : H_NEXT_STR, str)); -} - - -/* - * search for event in history containing str, starting at offset - * abs(pos); continue backward, if pos<0, forward otherwise - */ -/* ARGSUSED */ -int -history_search_pos(const char *str, - int direction __attribute__((__unused__)), int pos) -{ - HistEvent ev; - int curr_num, off; - - off = (pos > 0) ? pos : -pos; - pos = (pos > 0) ? 1 : -1; - - if (history(h, &ev, H_CURR) != 0) - return (-1); - curr_num = ev.num; - - if (history_set_pos(off) != 0 || history(h, &ev, H_CURR) != 0) - return (-1); - - for (;;) { - if (strstr(ev.str, str)) - return (off); - if (history(h, &ev, (pos < 0) ? H_PREV : H_NEXT) != 0) - break; - } - - /* set "current" pointer back to previous state */ - (void)history(h, &ev, - pos < 0 ? H_NEXT_EVENT : H_PREV_EVENT, curr_num); - - return (-1); -} - - -/********************************/ -/* completion functions */ - -char * -tilde_expand(char *name) -{ - return fn_tilde_expand(name); -} - -char * -filename_completion_function(const char *name, int state) -{ - return fn_filename_completion_function(name, state); -} - -/* - * a completion generator for usernames; returns _first_ username - * which starts with supplied text - * text contains a partial username preceded by random character - * (usually '~'); state is ignored - * it's callers responsibility to free returned value - */ -char * -username_completion_function(const char *text, int state) -{ - struct passwd *pwd; - - if (text[0] == '\0') - return (NULL); - - if (*text == '~') - text++; - - if (state == 0) - setpwent(); - - while ((pwd = getpwent()) - && pwd != NULL && text[0] == pwd->pw_name[0] - && strcmp(text, pwd->pw_name) == 0); - - if (pwd == NULL) { - endpwent(); - return NULL; - } - return strdup(pwd->pw_name); -} - - -/* - * el-compatible wrapper to send TSTP on ^Z - */ -/* ARGSUSED */ -static unsigned char -_el_rl_tstp(EditLine *el __attribute__((__unused__)), int ch __attribute__((__unused__))) -{ - (void)kill(0, SIGTSTP); - return CC_NORM; -} - -/* - * Display list of strings in columnar format on readline's output stream. - * 'matches' is list of strings, 'len' is number of strings in 'matches', - * 'max' is maximum length of string in 'matches'. - */ -void -rl_display_match_list(char **matches, int len, int max) -{ - - fn_display_match_list(e, matches, (size_t)len, (size_t)max); -} - -static const char * -/*ARGSUSED*/ -_rl_completion_append_character_function(const char *dummy - __attribute__((__unused__))) -{ - static char buf[2]; - buf[0] = rl_completion_append_character; - buf[1] = '\0'; - return buf; -} - - -/* - * complete word at current point - */ -/* ARGSUSED */ -int -rl_complete(int ignore __attribute__((__unused__)), int invoking_key) -{ -#ifdef WIDECHAR - static ct_buffer_t wbreak_conv, sprefix_conv; -#endif - - if (h == NULL || e == NULL) - rl_initialize(); - - if (rl_inhibit_completion) { - char arr[2]; - arr[0] = (char)invoking_key; - arr[1] = '\0'; - el_insertstr(e, arr); - return (CC_REFRESH); - } - - /* Just look at how many global variables modify this operation! */ - return fn_complete(e, - (CPFunction *)rl_completion_entry_function, - rl_attempted_completion_function, - ct_decode_string(rl_basic_word_break_characters, &wbreak_conv), - ct_decode_string(rl_special_prefixes, &sprefix_conv), - _rl_completion_append_character_function, - (size_t)rl_completion_query_items, - &rl_completion_type, &rl_attempted_completion_over, - &rl_point, &rl_end); - - -} - - -/* ARGSUSED */ -static unsigned char -_el_rl_complete(EditLine *el __attribute__((__unused__)), int ch) -{ - return (unsigned char)rl_complete(0, ch); -} - -/* - * misc other functions - */ - -/* - * bind key c to readline-type function func - */ -int -rl_bind_key(int c, rl_command_func_t *func) -{ - int retval = -1; - - if (h == NULL || e == NULL) - rl_initialize(); - - if (func == rl_insert) { - /* XXX notice there is no range checking of ``c'' */ - e->el_map.key[c] = ED_INSERT; - retval = 0; - } - return (retval); -} - - -/* - * read one key from input - handles chars pushed back - * to input stream also - */ -int -rl_read_key(void) -{ - char fooarr[2 * sizeof(int)]; - - if (e == NULL || h == NULL) - rl_initialize(); - - return (el_getc(e, fooarr)); -} - - -/* - * reset the terminal - */ -/* ARGSUSED */ -void -rl_reset_terminal(const char *p __attribute__((__unused__))) -{ - - if (h == NULL || e == NULL) - rl_initialize(); - el_reset(e); -} - - -/* - * insert character ``c'' back into input stream, ``count'' times - */ -int -rl_insert(int count, int c) -{ - char arr[2]; - - if (h == NULL || e == NULL) - rl_initialize(); - - /* XXX - int -> char conversion can lose on multichars */ - arr[0] = c; - arr[1] = '\0'; - - for (; count > 0; count--) - el_push(e, arr); - - return (0); -} - -int -rl_insert_text(const char *text) -{ - if (!text || *text == 0) - return (0); - - if (h == NULL || e == NULL) - rl_initialize(); - - if (el_insertstr(e, text) < 0) - return (0); - return (int)strlen(text); -} - -/*ARGSUSED*/ -int -rl_newline(int count, int c) -{ - /* - * Readline-4.0 appears to ignore the args. - */ - return rl_insert(1, '\n'); -} - -/*ARGSUSED*/ -static unsigned char -rl_bind_wrapper(EditLine *el, unsigned char c) -{ - if (map[c] == NULL) - return CC_ERROR; - - _rl_update_pos(); - - (*map[c])(NULL, c); - - /* If rl_done was set by the above call, deal with it here */ - if (rl_done) - return CC_EOF; - - return CC_NORM; -} - -int -rl_add_defun(const char *name, Function *fun, int c) -{ - char dest[8]; - if ((size_t)c >= sizeof(map) / sizeof(map[0]) || c < 0) - return -1; - map[(unsigned char)c] = fun; - el_set(e, EL_ADDFN, name, name, rl_bind_wrapper); - vis(dest, c, VIS_WHITE|VIS_NOSLASH, 0); - el_set(e, EL_BIND, dest, name); - return 0; -} - -void -rl_callback_read_char() -{ - int count = 0, done = 0; - const char *buf = el_gets(e, &count); - char *wbuf; - - if (buf == NULL || count-- <= 0) - return; - if (count == 0 && buf[0] == e->el_tty.t_c[TS_IO][C_EOF]) - done = 1; - if (buf[count] == '\n' || buf[count] == '\r') - done = 2; - - if (done && rl_linefunc != NULL) { - el_set(e, EL_UNBUFFERED, 0); - if (done == 2) { - if ((wbuf = strdup(buf)) != NULL) - wbuf[count] = '\0'; - } else - wbuf = NULL; - (*(void (*)(const char *))rl_linefunc)(wbuf); - //el_set(e, EL_UNBUFFERED, 1); - } -} - -void -rl_callback_handler_install(const char *prompt, VCPFunction *linefunc) -{ - if (e == NULL) { - rl_initialize(); - } - (void)rl_set_prompt(prompt); - rl_linefunc = linefunc; - el_set(e, EL_UNBUFFERED, 1); -} - -void -rl_callback_handler_remove(void) -{ - el_set(e, EL_UNBUFFERED, 0); - rl_linefunc = NULL; -} - -void -rl_redisplay(void) -{ - char a[2]; - a[0] = e->el_tty.t_c[TS_IO][C_REPRINT]; - a[1] = '\0'; - el_push(e, a); -} - -int -rl_get_previous_history(int count, int key) -{ - char a[2]; - a[0] = key; - a[1] = '\0'; - while (count--) - el_push(e, a); - return 0; -} - -void -/*ARGSUSED*/ -rl_prep_terminal(int meta_flag) -{ - el_set(e, EL_PREP_TERM, 1); -} - -void -rl_deprep_terminal(void) -{ - el_set(e, EL_PREP_TERM, 0); -} - -int -rl_read_init_file(const char *s) -{ - return(el_source(e, s)); -} - -int -rl_parse_and_bind(const char *line) -{ - const char **argv; - int argc; - Tokenizer *tok; - - tok = tok_init(NULL); - tok_str(tok, line, &argc, &argv); - argc = el_parse(e, argc, argv); - tok_end(tok); - return (argc ? 1 : 0); -} - -int -rl_variable_bind(const char *var, const char *value) -{ - /* - * The proper return value is undocument, but this is what the - * readline source seems to do. - */ - return ((el_set(e, EL_BIND, "", var, value) == -1) ? 1 : 0); -} - -void -rl_stuff_char(int c) -{ - char buf[2]; - - buf[0] = c; - buf[1] = '\0'; - el_insertstr(e, buf); -} - -static int -_rl_event_read_char(EditLine *el, char *cp) -{ - int n; - ssize_t num_read = 0; - - *cp = '\0'; - while (rl_event_hook) { - - (*rl_event_hook)(); - -#if defined(FIONREAD) - if (ioctl(el->el_infd, FIONREAD, &n) < 0) - return(-1); - if (n) - num_read = read(el->el_infd, cp, 1); - else - num_read = 0; -#elif defined(F_SETFL) && defined(O_NDELAY) - if ((n = fcntl(el->el_infd, F_GETFL, 0)) < 0) - return(-1); - if (fcntl(el->el_infd, F_SETFL, n|O_NDELAY) < 0) - return(-1); - num_read = read(el->el_infd, cp, 1); - if (fcntl(el->el_infd, F_SETFL, n)) - return(-1); -#else - /* not non-blocking, but what you gonna do? */ - num_read = read(el->el_infd, cp, 1); - return(-1); -#endif - - if (num_read < 0 && errno == EAGAIN) - continue; - if (num_read == 0) - continue; - break; - } - if (!rl_event_hook) - el_set(el, EL_GETCFN, EL_BUILTIN_GETCFN); - return (int)num_read; -} - -static void -_rl_update_pos(void) -{ - const LineInfo *li = el_line(e); - - rl_point = (int)(li->cursor - li->buffer); - rl_end = (int)(li->lastchar - li->buffer); -} - -void -rl_get_screen_size(int *rows, int *cols) -{ - if (rows) - el_get(e, EL_GETTC, "li", rows); - if (cols) - el_get(e, EL_GETTC, "co", cols); -} - -void -rl_set_screen_size(int rows, int cols) -{ - char buf[64]; - (void)snprintf(buf, sizeof(buf), "%d", rows); - el_set(e, EL_SETTC, "li", buf); - (void)snprintf(buf, sizeof(buf), "%d", cols); - el_set(e, EL_SETTC, "co", buf); -} - -char ** -rl_completion_matches(const char *str, rl_compentry_func_t *fun) -{ - size_t len, max, i, j, min; - char **list, *match, *a, *b; - - len = 1; - max = 10; - if ((list = malloc(max * sizeof(*list))) == NULL) - return NULL; - - while ((match = (*fun)(str, (int)(len - 1))) != NULL) { - list[len++] = match; - if (len == max) { - char **nl; - max += 10; - if ((nl = realloc(list, max * sizeof(*nl))) == NULL) - goto out; - list = nl; - } - } - if (len == 1) - goto out; - list[len] = NULL; - if (len == 2) { - if ((list[0] = strdup(list[1])) == NULL) - goto out; - return list; - } - qsort(&list[1], len - 1, sizeof(*list), - (int (*)(const void *, const void *)) strcmp); - min = SIZE_T_MAX; - for (i = 1, a = list[i]; i < len - 1; i++, a = b) { - b = list[i + 1]; - for (j = 0; a[j] && a[j] == b[j]; j++) - continue; - if (min > j) - min = j; - } - if (min == 0 && *str) { - if ((list[0] = strdup(str)) == NULL) - goto out; - } else { - if ((list[0] = malloc(min + 1)) == NULL) - goto out; - (void)memcpy(list[0], list[1], min); - list[0][min] = '\0'; - } - return list; - -out: - free(list); - return NULL; -} - -char * -rl_filename_completion_function (const char *text, int state) -{ - return fn_filename_completion_function(text, state); -} - -void -rl_forced_update_display(void) -{ - el_set(e, EL_REFRESH); -} - -int -_rl_abort_internal(void) -{ - el_beep(e); - longjmp(topbuf, 1); - /*NOTREACHED*/ -} - -int -_rl_qsort_string_compare(char **s1, char **s2) -{ - return strcoll(*s1, *s2); -} - -HISTORY_STATE * -history_get_history_state(void) -{ - HISTORY_STATE *hs; - - if ((hs = malloc(sizeof(HISTORY_STATE))) == NULL) - return (NULL); - hs->length = history_length; - return (hs); -} - -int -/*ARGSUSED*/ -rl_kill_text(int from, int to) -{ - return 0; -} - -Keymap -rl_make_bare_keymap(void) -{ - return NULL; -} - -Keymap -rl_get_keymap(void) -{ - return NULL; -} - -void -/*ARGSUSED*/ -rl_set_keymap(Keymap k) -{ -} - -int -/*ARGSUSED*/ -rl_generic_bind(int type, const char * keyseq, const char * data, Keymap k) -{ - return 0; -} - -int -/*ARGSUSED*/ -rl_bind_key_in_map(int key, rl_command_func_t *fun, Keymap k) -{ - return 0; -} - -/* unsupported, but needed by python */ -void -rl_cleanup_after_signal(void) -{ -} - -int -rl_on_new_line(void) -{ - return 0; -} diff --git a/kerberosV/src/lib/libedit/src/refresh.c b/kerberosV/src/lib/libedit/src/refresh.c deleted file mode 100644 index 7f35ce1536b..00000000000 --- a/kerberosV/src/lib/libedit/src/refresh.c +++ /dev/null @@ -1,1183 +0,0 @@ -/* $NetBSD: refresh.c,v 1.35 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)refresh.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: refresh.c,v 1.35 2009/12/30 22:37:40 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * refresh.c: Lower level screen refreshing functions - */ -#include -#include -#include -#include - -#include "el.h" - -private void re_nextline(EditLine *); -private void re_addc(EditLine *, Int); -private void re_update_line(EditLine *, Char *, Char *, int); -private void re_insert (EditLine *, Char *, int, int, Char *, int); -private void re_delete(EditLine *, Char *, int, int, int); -private void re_fastputc(EditLine *, Int); -private void re_clear_eol(EditLine *, int, int, int); -private void re__strncopy(Char *, Char *, size_t); -private void re__copy_and_pad(Char *, const Char *, size_t); - -#ifdef DEBUG_REFRESH -private void re_printstr(EditLine *, const char *, char *, char *); -#define __F el->el_errfile -#define ELRE_ASSERT(a, b, c) do \ - if (/*CONSTCOND*/ a) { \ - (void) fprintf b; \ - c; \ - } \ - while (/*CONSTCOND*/0) -#define ELRE_DEBUG(a, b) ELRE_ASSERT(a,b,;) - -/* re_printstr(): - * Print a string on the debugging pty - */ -private void -re_printstr(EditLine *el, const char *str, char *f, char *t) -{ - - ELRE_DEBUG(1, (__F, "%s:\"", str)); - while (f < t) - ELRE_DEBUG(1, (__F, "%c", *f++ & 0177)); - ELRE_DEBUG(1, (__F, "\"\r\n")); -} -#else -#define ELRE_ASSERT(a, b, c) -#define ELRE_DEBUG(a, b) -#endif - -/* re_nextline(): - * Move to the next line or scroll - */ -private void -re_nextline(EditLine *el) -{ - el->el_refresh.r_cursor.h = 0; /* reset it. */ - - /* - * If we would overflow (input is longer than terminal size), - * emulate scroll by dropping first line and shuffling the rest. - * We do this via pointer shuffling - it's safe in this case - * and we avoid memcpy(). - */ - if (el->el_refresh.r_cursor.v + 1 >= el->el_term.t_size.v) { - int i, lins = el->el_term.t_size.v; - Char *firstline = el->el_vdisplay[0]; - - for(i = 1; i < lins; i++) - el->el_vdisplay[i - 1] = el->el_vdisplay[i]; - - firstline[0] = '\0'; /* empty the string */ - el->el_vdisplay[i - 1] = firstline; - } else - el->el_refresh.r_cursor.v++; - - ELRE_ASSERT(el->el_refresh.r_cursor.v >= el->el_term.t_size.v, - (__F, "\r\nre_putc: overflow! r_cursor.v == %d > %d\r\n", - el->el_refresh.r_cursor.v, el->el_term.t_size.v), - abort()); -} - -/* re_addc(): - * Draw c, expanding tabs, control chars etc. - */ -private void -re_addc(EditLine *el, Int c) -{ - switch (ct_chr_class((Char)c)) { - case CHTYPE_TAB: /* expand the tab */ - for (;;) { - re_putc(el, ' ', 1); - if ((el->el_refresh.r_cursor.h & 07) == 0) - break; /* go until tab stop */ - } - break; - case CHTYPE_NL: { - int oldv = el->el_refresh.r_cursor.v; - re_putc(el, '\0', 0); /* assure end of line */ - if (oldv == el->el_refresh.r_cursor.v) /* XXX */ - re_nextline(el); - break; - } - case CHTYPE_PRINT: - re_putc(el, c, 1); - break; - default: { - Char visbuf[VISUAL_WIDTH_MAX]; - ssize_t i, n = - ct_visual_char(visbuf, VISUAL_WIDTH_MAX, (Char)c); - for (i = 0; n-- > 0; ++i) - re_putc(el, visbuf[i], 1); - break; - } - } -} - - -/* re_putc(): - * Draw the character given - */ -protected void -re_putc(EditLine *el, Int c, int shift) -{ - int i, w = Width(c); - ELRE_DEBUG(1, (__F, "printing %5x '%c'\r\n", c, c)); - - while (shift && (el->el_refresh.r_cursor.h + w > el->el_term.t_size.h)) - re_putc(el, ' ', 1); - - el->el_vdisplay[el->el_refresh.r_cursor.v] - [el->el_refresh.r_cursor.h] = c; - /* assumes !shift is only used for single-column chars */ - i = w; - while (--i > 0) - el->el_vdisplay[el->el_refresh.r_cursor.v] - [el->el_refresh.r_cursor.h + i] = MB_FILL_CHAR; - - if (!shift) - return; - - el->el_refresh.r_cursor.h += w; /* advance to next place */ - if (el->el_refresh.r_cursor.h >= el->el_term.t_size.h) { - /* assure end of line */ - el->el_vdisplay[el->el_refresh.r_cursor.v][el->el_term.t_size.h] - = '\0'; - re_nextline(el); - } -} - - -/* re_refresh(): - * draws the new virtual screen image from the current input - * line, then goes line-by-line changing the real image to the new - * virtual image. The routine to re-draw a line can be replaced - * easily in hopes of a smarter one being placed there. - */ -protected void -re_refresh(EditLine *el) -{ - int i, rhdiff; - Char *cp, *st; - coord_t cur; -#ifdef notyet - size_t termsz; -#endif - - ELRE_DEBUG(1, (__F, "el->el_line.buffer = :%s:\r\n", - el->el_line.buffer)); - - /* reset the Drawing cursor */ - el->el_refresh.r_cursor.h = 0; - el->el_refresh.r_cursor.v = 0; - - /* temporarily draw rprompt to calculate its size */ - prompt_print(el, EL_RPROMPT); - - /* reset the Drawing cursor */ - el->el_refresh.r_cursor.h = 0; - el->el_refresh.r_cursor.v = 0; - - if (el->el_line.cursor >= el->el_line.lastchar) { - if (el->el_map.current == el->el_map.alt - && el->el_line.lastchar != el->el_line.buffer) - el->el_line.cursor = el->el_line.lastchar - 1; - else - el->el_line.cursor = el->el_line.lastchar; - } - - cur.h = -1; /* set flag in case I'm not set */ - cur.v = 0; - - prompt_print(el, EL_PROMPT); - - /* draw the current input buffer */ -#if notyet - termsz = el->el_term.t_size.h * el->el_term.t_size.v; - if (el->el_line.lastchar - el->el_line.buffer > termsz) { - /* - * If line is longer than terminal, process only part - * of line which would influence display. - */ - size_t rem = (el->el_line.lastchar-el->el_line.buffer)%termsz; - - st = el->el_line.lastchar - rem - - (termsz - (((rem / el->el_term.t_size.v) - 1) - * el->el_term.t_size.v)); - } else -#endif - st = el->el_line.buffer; - - for (cp = st; cp < el->el_line.lastchar; cp++) { - if (cp == el->el_line.cursor) { - int w = Width(*cp); - /* save for later */ - cur.h = el->el_refresh.r_cursor.h; - cur.v = el->el_refresh.r_cursor.v; - /* handle being at a linebroken doublewidth char */ - if (w > 1 && el->el_refresh.r_cursor.h + w > - el->el_term.t_size.h) { - cur.h = 0; - cur.v++; - } - } - re_addc(el, *cp); - } - - if (cur.h == -1) { /* if I haven't been set yet, I'm at the end */ - cur.h = el->el_refresh.r_cursor.h; - cur.v = el->el_refresh.r_cursor.v; - } - rhdiff = el->el_term.t_size.h - el->el_refresh.r_cursor.h - - el->el_rprompt.p_pos.h; - if (el->el_rprompt.p_pos.h && !el->el_rprompt.p_pos.v && - !el->el_refresh.r_cursor.v && rhdiff > 1) { - /* - * have a right-hand side prompt that will fit - * on the end of the first line with at least - * one character gap to the input buffer. - */ - while (--rhdiff > 0) /* pad out with spaces */ - re_putc(el, ' ', 1); - prompt_print(el, EL_RPROMPT); - } else { - el->el_rprompt.p_pos.h = 0; /* flag "not using rprompt" */ - el->el_rprompt.p_pos.v = 0; - } - - re_putc(el, '\0', 0); /* make line ended with NUL, no cursor shift */ - - el->el_refresh.r_newcv = el->el_refresh.r_cursor.v; - - ELRE_DEBUG(1, (__F, - "term.h=%d vcur.h=%d vcur.v=%d vdisplay[0]=\r\n:%80.80s:\r\n", - el->el_term.t_size.h, el->el_refresh.r_cursor.h, - el->el_refresh.r_cursor.v, ct_encode_string(el->el_vdisplay[0]))); - - ELRE_DEBUG(1, (__F, "updating %d lines.\r\n", el->el_refresh.r_newcv)); - for (i = 0; i <= el->el_refresh.r_newcv; i++) { - /* NOTE THAT re_update_line MAY CHANGE el_display[i] */ - re_update_line(el, el->el_display[i], el->el_vdisplay[i], i); - - /* - * Copy the new line to be the current one, and pad out with - * spaces to the full width of the terminal so that if we try - * moving the cursor by writing the character that is at the - * end of the screen line, it won't be a NUL or some old - * leftover stuff. - */ - re__copy_and_pad(el->el_display[i], el->el_vdisplay[i], - (size_t) el->el_term.t_size.h); - } - ELRE_DEBUG(1, (__F, - "\r\nel->el_refresh.r_cursor.v=%d,el->el_refresh.r_oldcv=%d i=%d\r\n", - el->el_refresh.r_cursor.v, el->el_refresh.r_oldcv, i)); - - if (el->el_refresh.r_oldcv > el->el_refresh.r_newcv) - for (; i <= el->el_refresh.r_oldcv; i++) { - term_move_to_line(el, i); - term_move_to_char(el, 0); - /* This Strlen should be safe even with MB_FILL_CHARs */ - term_clear_EOL(el, (int) Strlen(el->el_display[i])); -#ifdef DEBUG_REFRESH - term_overwrite(el, "C\b", (size_t)2); -#endif /* DEBUG_REFRESH */ - el->el_display[i][0] = '\0'; - } - - el->el_refresh.r_oldcv = el->el_refresh.r_newcv; /* set for next time */ - ELRE_DEBUG(1, (__F, - "\r\ncursor.h = %d, cursor.v = %d, cur.h = %d, cur.v = %d\r\n", - el->el_refresh.r_cursor.h, el->el_refresh.r_cursor.v, - cur.h, cur.v)); - term_move_to_line(el, cur.v); /* go to where the cursor is */ - term_move_to_char(el, cur.h); -} - - -/* re_goto_bottom(): - * used to go to last used screen line - */ -protected void -re_goto_bottom(EditLine *el) -{ - - term_move_to_line(el, el->el_refresh.r_oldcv); - term__putc(el, '\n'); - re_clear_display(el); - term__flush(el); -} - - -/* re_insert(): - * insert num characters of s into d (in front of the character) - * at dat, maximum length of d is dlen - */ -private void -/*ARGSUSED*/ -re_insert(EditLine *el __attribute__((__unused__)), - Char *d, int dat, int dlen, Char *s, int num) -{ - Char *a, *b; - - if (num <= 0) - return; - if (num > dlen - dat) - num = dlen - dat; - - ELRE_DEBUG(1, - (__F, "re_insert() starting: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); - ELRE_DEBUG(1, (__F, "s == \"%s\"\n", ct_encode_string(s))); - - /* open up the space for num chars */ - if (num > 0) { - b = d + dlen - 1; - a = b - num; - while (a >= &d[dat]) - *b-- = *a--; - d[dlen] = '\0'; /* just in case */ - } - - ELRE_DEBUG(1, (__F, - "re_insert() after insert: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); - ELRE_DEBUG(1, (__F, "s == \"%s\"\n", ct_encode_string(s))); - - /* copy the characters */ - for (a = d + dat; (a < d + dlen) && (num > 0); num--) - *a++ = *s++; - -#ifdef notyet - /* ct_encode_string() uses a static buffer, so we can't conveniently - * encode both d & s here */ - ELRE_DEBUG(1, - (__F, "re_insert() after copy: %d at %d max %d, %s == \"%s\"\n", - num, dat, dlen, d, s)); - ELRE_DEBUG(1, (__F, "s == \"%s\"\n", s)); -#endif -} - - -/* re_delete(): - * delete num characters d at dat, maximum length of d is dlen - */ -private void -/*ARGSUSED*/ -re_delete(EditLine *el __attribute__((__unused__)), - Char *d, int dat, int dlen, int num) -{ - Char *a, *b; - - if (num <= 0) - return; - if (dat + num >= dlen) { - d[dat] = '\0'; - return; - } - ELRE_DEBUG(1, - (__F, "re_delete() starting: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); - - /* open up the space for num chars */ - if (num > 0) { - b = d + dat; - a = b + num; - while (a < &d[dlen]) - *b++ = *a++; - d[dlen] = '\0'; /* just in case */ - } - ELRE_DEBUG(1, - (__F, "re_delete() after delete: %d at %d max %d, d == \"%s\"\n", - num, dat, dlen, ct_encode_string(d))); -} - - -/* re__strncopy(): - * Like strncpy without padding. - */ -private void -re__strncopy(Char *a, Char *b, size_t n) -{ - - while (n-- && *b) - *a++ = *b++; -} - -/* re_clear_eol(): - * Find the number of characters we need to clear till the end of line - * in order to make sure that we have cleared the previous contents of - * the line. fx and sx is the number of characters inserted or deleted - * in the first or second diff, diff is the difference between the - * number of characters between the new and old line. - */ -private void -re_clear_eol(EditLine *el, int fx, int sx, int diff) -{ - - ELRE_DEBUG(1, (__F, "re_clear_eol sx %d, fx %d, diff %d\n", - sx, fx, diff)); - - if (fx < 0) - fx = -fx; - if (sx < 0) - sx = -sx; - if (fx > diff) - diff = fx; - if (sx > diff) - diff = sx; - - ELRE_DEBUG(1, (__F, "re_clear_eol %d\n", diff)); - term_clear_EOL(el, diff); -} - -/***************************************************************** - re_update_line() is based on finding the middle difference of each line - on the screen; vis: - - /old first difference - /beginning of line | /old last same /old EOL - v v v v -old: eddie> Oh, my little gruntle-buggy is to me, as lurgid as -new: eddie> Oh, my little buggy says to me, as lurgid as - ^ ^ ^ ^ - \beginning of line | \new last same \new end of line - \new first difference - - all are character pointers for the sake of speed. Special cases for - no differences, as well as for end of line additions must be handled. -**************************************************************** */ - -/* Minimum at which doing an insert it "worth it". This should be about - * half the "cost" of going into insert mode, inserting a character, and - * going back out. This should really be calculated from the termcap - * data... For the moment, a good number for ANSI terminals. - */ -#define MIN_END_KEEP 4 - -private void -re_update_line(EditLine *el, Char *old, Char *new, int i) -{ - Char *o, *n, *p, c; - Char *ofd, *ols, *oe, *nfd, *nls, *ne; - Char *osb, *ose, *nsb, *nse; - int fx, sx; - size_t len; - - /* - * find first diff - */ - for (o = old, n = new; *o && (*o == *n); o++, n++) - continue; - ofd = o; - nfd = n; - - /* - * Find the end of both old and new - */ - while (*o) - o++; - /* - * Remove any trailing blanks off of the end, being careful not to - * back up past the beginning. - */ - while (ofd < o) { - if (o[-1] != ' ') - break; - o--; - } - oe = o; - *oe = '\0'; - - while (*n) - n++; - - /* remove blanks from end of new */ - while (nfd < n) { - if (n[-1] != ' ') - break; - n--; - } - ne = n; - *ne = '\0'; - - /* - * if no diff, continue to next line of redraw - */ - if (*ofd == '\0' && *nfd == '\0') { - ELRE_DEBUG(1, (__F, "no difference.\r\n")); - return; - } - /* - * find last same pointer - */ - while ((o > ofd) && (n > nfd) && (*--o == *--n)) - continue; - ols = ++o; - nls = ++n; - - /* - * find same begining and same end - */ - osb = ols; - nsb = nls; - ose = ols; - nse = nls; - - /* - * case 1: insert: scan from nfd to nls looking for *ofd - */ - if (*ofd) { - for (c = *ofd, n = nfd; n < nls; n++) { - if (c == *n) { - for (o = ofd, p = n; - p < nls && o < ols && *o == *p; - o++, p++) - continue; - /* - * if the new match is longer and it's worth - * keeping, then we take it - */ - if (((nse - nsb) < (p - n)) && - (2 * (p - n) > n - nfd)) { - nsb = n; - nse = p; - osb = ofd; - ose = o; - } - } - } - } - /* - * case 2: delete: scan from ofd to ols looking for *nfd - */ - if (*nfd) { - for (c = *nfd, o = ofd; o < ols; o++) { - if (c == *o) { - for (n = nfd, p = o; - p < ols && n < nls && *p == *n; - p++, n++) - continue; - /* - * if the new match is longer and it's worth - * keeping, then we take it - */ - if (((ose - osb) < (p - o)) && - (2 * (p - o) > o - ofd)) { - nsb = nfd; - nse = n; - osb = o; - ose = p; - } - } - } - } - /* - * Pragmatics I: If old trailing whitespace or not enough characters to - * save to be worth it, then don't save the last same info. - */ - if ((oe - ols) < MIN_END_KEEP) { - ols = oe; - nls = ne; - } - /* - * Pragmatics II: if the terminal isn't smart enough, make the data - * dumber so the smart update doesn't try anything fancy - */ - - /* - * fx is the number of characters we need to insert/delete: in the - * beginning to bring the two same begins together - */ - fx = (int)((nsb - nfd) - (osb - ofd)); - /* - * sx is the number of characters we need to insert/delete: in the - * end to bring the two same last parts together - */ - sx = (int)((nls - nse) - (ols - ose)); - - if (!EL_CAN_INSERT) { - if (fx > 0) { - osb = ols; - ose = ols; - nsb = nls; - nse = nls; - } - if (sx > 0) { - ols = oe; - nls = ne; - } - if ((ols - ofd) < (nls - nfd)) { - ols = oe; - nls = ne; - } - } - if (!EL_CAN_DELETE) { - if (fx < 0) { - osb = ols; - ose = ols; - nsb = nls; - nse = nls; - } - if (sx < 0) { - ols = oe; - nls = ne; - } - if ((ols - ofd) > (nls - nfd)) { - ols = oe; - nls = ne; - } - } - /* - * Pragmatics III: make sure the middle shifted pointers are correct if - * they don't point to anything (we may have moved ols or nls). - */ - /* if the change isn't worth it, don't bother */ - /* was: if (osb == ose) */ - if ((ose - osb) < MIN_END_KEEP) { - osb = ols; - ose = ols; - nsb = nls; - nse = nls; - } - /* - * Now that we are done with pragmatics we recompute fx, sx - */ - fx = (int)((nsb - nfd) - (osb - ofd)); - sx = (int)((nls - nse) - (ols - ose)); - - ELRE_DEBUG(1, (__F, "fx %d, sx %d\n", fx, sx)); - ELRE_DEBUG(1, (__F, "ofd %d, osb %d, ose %d, ols %d, oe %d\n", - ofd - old, osb - old, ose - old, ols - old, oe - old)); - ELRE_DEBUG(1, (__F, "nfd %d, nsb %d, nse %d, nls %d, ne %d\n", - nfd - new, nsb - new, nse - new, nls - new, ne - new)); - ELRE_DEBUG(1, (__F, - "xxx-xxx:\"00000000001111111111222222222233333333334\"\r\n")); - ELRE_DEBUG(1, (__F, - "xxx-xxx:\"01234567890123456789012345678901234567890\"\r\n")); -#ifdef DEBUG_REFRESH - re_printstr(el, "old- oe", old, oe); - re_printstr(el, "new- ne", new, ne); - re_printstr(el, "old-ofd", old, ofd); - re_printstr(el, "new-nfd", new, nfd); - re_printstr(el, "ofd-osb", ofd, osb); - re_printstr(el, "nfd-nsb", nfd, nsb); - re_printstr(el, "osb-ose", osb, ose); - re_printstr(el, "nsb-nse", nsb, nse); - re_printstr(el, "ose-ols", ose, ols); - re_printstr(el, "nse-nls", nse, nls); - re_printstr(el, "ols- oe", ols, oe); - re_printstr(el, "nls- ne", nls, ne); -#endif /* DEBUG_REFRESH */ - - /* - * el_cursor.v to this line i MUST be in this routine so that if we - * don't have to change the line, we don't move to it. el_cursor.h to - * first diff char - */ - term_move_to_line(el, i); - - /* - * at this point we have something like this: - * - * /old /ofd /osb /ose /ols /oe - * v.....................v v..................v v........v - * eddie> Oh, my fredded gruntle-buggy is to me, as foo var lurgid as - * eddie> Oh, my fredded quiux buggy is to me, as gruntle-lurgid as - * ^.....................^ ^..................^ ^........^ - * \new \nfd \nsb \nse \nls \ne - * - * fx is the difference in length between the chars between nfd and - * nsb, and the chars between ofd and osb, and is thus the number of - * characters to delete if < 0 (new is shorter than old, as above), - * or insert (new is longer than short). - * - * sx is the same for the second differences. - */ - - /* - * if we have a net insert on the first difference, AND inserting the - * net amount ((nsb-nfd) - (osb-ofd)) won't push the last useful - * character (which is ne if nls != ne, otherwise is nse) off the edge - * of the screen (el->el_term.t_size.h) else we do the deletes first - * so that we keep everything we need to. - */ - - /* - * if the last same is the same like the end, there is no last same - * part, otherwise we want to keep the last same part set p to the - * last useful old character - */ - p = (ols != oe) ? oe : ose; - - /* - * if (There is a diffence in the beginning) && (we need to insert - * characters) && (the number of characters to insert is less than - * the term width) - * We need to do an insert! - * else if (we need to delete characters) - * We need to delete characters! - * else - * No insert or delete - */ - if ((nsb != nfd) && fx > 0 && - ((p - old) + fx <= el->el_term.t_size.h)) { - ELRE_DEBUG(1, - (__F, "first diff insert at %d...\r\n", nfd - new)); - /* - * Move to the first char to insert, where the first diff is. - */ - term_move_to_char(el, (int)(nfd - new)); - /* - * Check if we have stuff to keep at end - */ - if (nsb != ne) { - ELRE_DEBUG(1, (__F, "with stuff to keep at end\r\n")); - /* - * insert fx chars of new starting at nfd - */ - if (fx > 0) { - ELRE_DEBUG(!EL_CAN_INSERT, (__F, - "ERROR: cannot insert in early first diff\n")); - term_insertwrite(el, nfd, fx); - re_insert(el, old, (int)(ofd - old), - el->el_term.t_size.h, nfd, fx); - } - /* - * write (nsb-nfd) - fx chars of new starting at - * (nfd + fx) - */ - len = (size_t) ((nsb - nfd) - fx); - term_overwrite(el, (nfd + fx), len); - re__strncopy(ofd + fx, nfd + fx, len); - } else { - ELRE_DEBUG(1, (__F, "without anything to save\r\n")); - len = (size_t)(nsb - nfd); - term_overwrite(el, nfd, len); - re__strncopy(ofd, nfd, len); - /* - * Done - */ - return; - } - } else if (fx < 0) { - ELRE_DEBUG(1, - (__F, "first diff delete at %d...\r\n", ofd - old)); - /* - * move to the first char to delete where the first diff is - */ - term_move_to_char(el, (int)(ofd - old)); - /* - * Check if we have stuff to save - */ - if (osb != oe) { - ELRE_DEBUG(1, (__F, "with stuff to save at end\r\n")); - /* - * fx is less than zero *always* here but we check - * for code symmetry - */ - if (fx < 0) { - ELRE_DEBUG(!EL_CAN_DELETE, (__F, - "ERROR: cannot delete in first diff\n")); - term_deletechars(el, -fx); - re_delete(el, old, (int)(ofd - old), - el->el_term.t_size.h, -fx); - } - /* - * write (nsb-nfd) chars of new starting at nfd - */ - len = (size_t) (nsb - nfd); - term_overwrite(el, nfd, len); - re__strncopy(ofd, nfd, len); - - } else { - ELRE_DEBUG(1, (__F, - "but with nothing left to save\r\n")); - /* - * write (nsb-nfd) chars of new starting at nfd - */ - term_overwrite(el, nfd, (size_t)(nsb - nfd)); - re_clear_eol(el, fx, sx, - (int)((oe - old) - (ne - new))); - /* - * Done - */ - return; - } - } else - fx = 0; - - if (sx < 0 && (ose - old) + fx < el->el_term.t_size.h) { - ELRE_DEBUG(1, (__F, - "second diff delete at %d...\r\n", (ose - old) + fx)); - /* - * Check if we have stuff to delete - */ - /* - * fx is the number of characters inserted (+) or deleted (-) - */ - - term_move_to_char(el, (int)((ose - old) + fx)); - /* - * Check if we have stuff to save - */ - if (ols != oe) { - ELRE_DEBUG(1, (__F, "with stuff to save at end\r\n")); - /* - * Again a duplicate test. - */ - if (sx < 0) { - ELRE_DEBUG(!EL_CAN_DELETE, (__F, - "ERROR: cannot delete in second diff\n")); - term_deletechars(el, -sx); - } - /* - * write (nls-nse) chars of new starting at nse - */ - term_overwrite(el, nse, (size_t)(nls - nse)); - } else { - ELRE_DEBUG(1, (__F, - "but with nothing left to save\r\n")); - term_overwrite(el, nse, (size_t)(nls - nse)); - re_clear_eol(el, fx, sx, - (int)((oe - old) - (ne - new))); - } - } - /* - * if we have a first insert AND WE HAVEN'T ALREADY DONE IT... - */ - if ((nsb != nfd) && (osb - ofd) <= (nsb - nfd) && (fx == 0)) { - ELRE_DEBUG(1, (__F, "late first diff insert at %d...\r\n", - nfd - new)); - - term_move_to_char(el, (int)(nfd - new)); - /* - * Check if we have stuff to keep at the end - */ - if (nsb != ne) { - ELRE_DEBUG(1, (__F, "with stuff to keep at end\r\n")); - /* - * We have to recalculate fx here because we set it - * to zero above as a flag saying that we hadn't done - * an early first insert. - */ - fx = (int)((nsb - nfd) - (osb - ofd)); - if (fx > 0) { - /* - * insert fx chars of new starting at nfd - */ - ELRE_DEBUG(!EL_CAN_INSERT, (__F, - "ERROR: cannot insert in late first diff\n")); - term_insertwrite(el, nfd, fx); - re_insert(el, old, (int)(ofd - old), - el->el_term.t_size.h, nfd, fx); - } - /* - * write (nsb-nfd) - fx chars of new starting at - * (nfd + fx) - */ - len = (size_t) ((nsb - nfd) - fx); - term_overwrite(el, (nfd + fx), len); - re__strncopy(ofd + fx, nfd + fx, len); - } else { - ELRE_DEBUG(1, (__F, "without anything to save\r\n")); - len = (size_t) (nsb - nfd); - term_overwrite(el, nfd, len); - re__strncopy(ofd, nfd, len); - } - } - /* - * line is now NEW up to nse - */ - if (sx >= 0) { - ELRE_DEBUG(1, (__F, - "second diff insert at %d...\r\n", (int)(nse - new))); - term_move_to_char(el, (int)(nse - new)); - if (ols != oe) { - ELRE_DEBUG(1, (__F, "with stuff to keep at end\r\n")); - if (sx > 0) { - /* insert sx chars of new starting at nse */ - ELRE_DEBUG(!EL_CAN_INSERT, (__F, - "ERROR: cannot insert in second diff\n")); - term_insertwrite(el, nse, sx); - } - /* - * write (nls-nse) - sx chars of new starting at - * (nse + sx) - */ - term_overwrite(el, (nse + sx), - (size_t)((nls - nse) - sx)); - } else { - ELRE_DEBUG(1, (__F, "without anything to save\r\n")); - term_overwrite(el, nse, (size_t)(nls - nse)); - - /* - * No need to do a clear-to-end here because we were - * doing a second insert, so we will have over - * written all of the old string. - */ - } - } - ELRE_DEBUG(1, (__F, "done.\r\n")); -} - - -/* re__copy_and_pad(): - * Copy string and pad with spaces - */ -private void -re__copy_and_pad(Char *dst, const Char *src, size_t width) -{ - size_t i; - - for (i = 0; i < width; i++) { - if (*src == '\0') - break; - *dst++ = *src++; - } - - for (; i < width; i++) - *dst++ = ' '; - - *dst = '\0'; -} - - -/* re_refresh_cursor(): - * Move to the new cursor position - */ -protected void -re_refresh_cursor(EditLine *el) -{ - Char *cp; - int h, v, th, w; - - if (el->el_line.cursor >= el->el_line.lastchar) { - if (el->el_map.current == el->el_map.alt - && el->el_line.lastchar != el->el_line.buffer) - el->el_line.cursor = el->el_line.lastchar - 1; - else - el->el_line.cursor = el->el_line.lastchar; - } - - /* first we must find where the cursor is... */ - h = el->el_prompt.p_pos.h; - v = el->el_prompt.p_pos.v; - th = el->el_term.t_size.h; /* optimize for speed */ - - /* do input buffer to el->el_line.cursor */ - for (cp = el->el_line.buffer; cp < el->el_line.cursor; cp++) { - switch (ct_chr_class(*cp)) { - case CHTYPE_NL: /* handle newline in data part too */ - h = 0; - v++; - break; - case CHTYPE_TAB: /* if a tab, to next tab stop */ - while (++h & 07) - continue; - break; - default: - w = Width(*cp); - if (w > 1 && h + w > th) { /* won't fit on line */ - h = 0; - v++; - } - h += ct_visual_width(*cp); - break; - } - - if (h >= th) { /* check, extra long tabs picked up here also */ - h -= th; - v++; - } - } - /* if we have a next character, and it's a doublewidth one, we need to - * check whether we need to linebreak for it to fit */ - if (cp < el->el_line.lastchar && (w = Width(*cp)) > 1) - if (h + w > th) { - h = 0; - v++; - } - - /* now go there */ - term_move_to_line(el, v); - term_move_to_char(el, h); - term__flush(el); -} - - -/* re_fastputc(): - * Add a character fast. - */ -private void -re_fastputc(EditLine *el, Int c) -{ - int w = Width((Char)c); - while (w > 1 && el->el_cursor.h + w > el->el_term.t_size.h) - re_fastputc(el, ' '); - - term__putc(el, c); - el->el_display[el->el_cursor.v][el->el_cursor.h++] = c; - while (--w > 0) - el->el_display[el->el_cursor.v][el->el_cursor.h++] - = MB_FILL_CHAR; - - if (el->el_cursor.h >= el->el_term.t_size.h) { - /* if we must overflow */ - el->el_cursor.h = 0; - - /* - * If we would overflow (input is longer than terminal size), - * emulate scroll by dropping first line and shuffling the rest. - * We do this via pointer shuffling - it's safe in this case - * and we avoid memcpy(). - */ - if (el->el_cursor.v + 1 >= el->el_term.t_size.v) { - int i, lins = el->el_term.t_size.v; - Char *firstline = el->el_display[0]; - - for(i = 1; i < lins; i++) - el->el_display[i - 1] = el->el_display[i]; - - re__copy_and_pad(firstline, STR(""), 0); - el->el_display[i - 1] = firstline; - } else { - el->el_cursor.v++; - el->el_refresh.r_oldcv++; - } - if (EL_HAS_AUTO_MARGINS) { - if (EL_HAS_MAGIC_MARGINS) { - term__putc(el, ' '); - term__putc(el, '\b'); - } - } else { - term__putc(el, '\r'); - term__putc(el, '\n'); - } - } -} - - -/* re_fastaddc(): - * we added just one char, handle it fast. - * Assumes that screen cursor == real cursor - */ -protected void -re_fastaddc(EditLine *el) -{ - Char c; - int rhdiff; - - c = el->el_line.cursor[-1]; - - if (c == '\t' || el->el_line.cursor != el->el_line.lastchar) { - re_refresh(el); /* too hard to handle */ - return; - } - rhdiff = el->el_term.t_size.h - el->el_cursor.h - - el->el_rprompt.p_pos.h; - if (el->el_rprompt.p_pos.h && rhdiff < 3) { - re_refresh(el); /* clear out rprompt if less than 1 char gap */ - return; - } /* else (only do at end of line, no TAB) */ - switch (ct_chr_class(c)) { - case CHTYPE_TAB: /* already handled, should never happen here */ - break; - case CHTYPE_NL: - case CHTYPE_PRINT: - re_fastputc(el, c); - break; - case CHTYPE_ASCIICTL: - case CHTYPE_NONPRINT: { - Char visbuf[VISUAL_WIDTH_MAX]; - ssize_t i, n = - ct_visual_char(visbuf, VISUAL_WIDTH_MAX, (Char)c); - for (i = 0; n-- > 0; ++i) - re_fastputc(el, visbuf[i]); - break; - } - } - term__flush(el); -} - - -/* re_clear_display(): - * clear the screen buffers so that new new prompt starts fresh. - */ -protected void -re_clear_display(EditLine *el) -{ - int i; - - el->el_cursor.v = 0; - el->el_cursor.h = 0; - for (i = 0; i < el->el_term.t_size.v; i++) - el->el_display[i][0] = '\0'; - el->el_refresh.r_oldcv = 0; -} - - -/* re_clear_lines(): - * Make sure all lines are *really* blank - */ -protected void -re_clear_lines(EditLine *el) -{ - - if (EL_CAN_CEOL) { - int i; - for (i = el->el_refresh.r_oldcv; i >= 0; i--) { - /* for each line on the screen */ - term_move_to_line(el, i); - term_move_to_char(el, 0); - term_clear_EOL(el, el->el_term.t_size.h); - } - } else { - term_move_to_line(el, el->el_refresh.r_oldcv); - /* go to last line */ - term__putc(el, '\r'); /* go to BOL */ - term__putc(el, '\n'); /* go to new line */ - } -} diff --git a/kerberosV/src/lib/libedit/src/refresh.h b/kerberosV/src/lib/libedit/src/refresh.h deleted file mode 100644 index f80be463545..00000000000 --- a/kerberosV/src/lib/libedit/src/refresh.h +++ /dev/null @@ -1,59 +0,0 @@ -/* $NetBSD: refresh.h,v 1.6 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)refresh.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.refresh.h: Screen refresh functions - */ -#ifndef _h_el_refresh -#define _h_el_refresh - -#include "histedit.h" - -typedef struct { - coord_t r_cursor; /* Refresh cursor position */ - int r_oldcv; /* Vertical locations */ - int r_newcv; -} el_refresh_t; - -protected void re_putc(EditLine *, Int, int); -protected void re_clear_lines(EditLine *); -protected void re_clear_display(EditLine *); -protected void re_refresh(EditLine *); -protected void re_refresh_cursor(EditLine *); -protected void re_fastaddc(EditLine *); -protected void re_goto_bottom(EditLine *); - -#endif /* _h_el_refresh */ diff --git a/kerberosV/src/lib/libedit/src/search.c b/kerberosV/src/lib/libedit/src/search.c deleted file mode 100644 index 59bbd1add0b..00000000000 --- a/kerberosV/src/lib/libedit/src/search.c +++ /dev/null @@ -1,639 +0,0 @@ -/* $NetBSD: search.c,v 1.24 2010/04/15 00:57:33 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)search.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: search.c,v 1.24 2010/04/15 00:57:33 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * search.c: History and character search functions - */ -#include -#include -#if defined(REGEX) -#include -#elif defined(REGEXP) -#include -#endif -#include "el.h" - -/* - * Adjust cursor in vi mode to include the character under it - */ -#define EL_CURSOR(el) \ - ((el)->el_line.cursor + (((el)->el_map.type == MAP_VI) && \ - ((el)->el_map.current == (el)->el_map.alt))) - -/* search_init(): - * Initialize the search stuff - */ -protected int -search_init(EditLine *el) -{ - - el->el_search.patbuf = el_malloc(EL_BUFSIZ * - sizeof(*el->el_search.patbuf)); - if (el->el_search.patbuf == NULL) - return (-1); - el->el_search.patlen = 0; - el->el_search.patdir = -1; - el->el_search.chacha = '\0'; - el->el_search.chadir = CHAR_FWD; - el->el_search.chatflg = 0; - return (0); -} - - -/* search_end(): - * Initialize the search stuff - */ -protected void -search_end(EditLine *el) -{ - - el_free((ptr_t) el->el_search.patbuf); - el->el_search.patbuf = NULL; -} - - -#ifdef REGEXP -/* regerror(): - * Handle regular expression errors - */ -public void -/*ARGSUSED*/ -regerror(const char *msg) -{ -} -#endif - - -/* el_match(): - * Return if string matches pattern - */ -protected int -el_match(const Char *str, const Char *pat) -{ -#ifdef WIDECHAR - static ct_buffer_t conv; -#endif -#if defined (REGEX) - regex_t re; - int rv; -#elif defined (REGEXP) - regexp *rp; - int rv; -#else - extern char *re_comp(const char *); - extern int re_exec(const char *); -#endif - - if (Strstr(str, pat) != 0) - return (1); - -#if defined(REGEX) - if (regcomp(&re, ct_encode_string(pat, &conv), 0) == 0) { - rv = regexec(&re, ct_encode_string(str, &conv), 0, NULL, 0) == 0; - regfree(&re); - } else { - rv = 0; - } - return (rv); -#elif defined(REGEXP) - if ((re = regcomp(ct_encode_string(pat, &conv))) != NULL) { - rv = regexec(re, ct_encode_string(str, &conv)); - free((ptr_t) re); - } else { - rv = 0; - } - return (rv); -#else - if (re_comp(ct_encode_string(pat, &conv)) != NULL) - return (0); - else - return (re_exec(ct_encode_string(str, &conv)) == 1); -#endif -} - - -/* c_hmatch(): - * return True if the pattern matches the prefix - */ -protected int -c_hmatch(EditLine *el, const Char *str) -{ -#ifdef SDEBUG - (void) fprintf(el->el_errfile, "match `%s' with `%s'\n", - el->el_search.patbuf, str); -#endif /* SDEBUG */ - - return (el_match(str, el->el_search.patbuf)); -} - - -/* c_setpat(): - * Set the history seatch pattern - */ -protected void -c_setpat(EditLine *el) -{ - if (el->el_state.lastcmd != ED_SEARCH_PREV_HISTORY && - el->el_state.lastcmd != ED_SEARCH_NEXT_HISTORY) { - el->el_search.patlen = EL_CURSOR(el) - el->el_line.buffer; - if (el->el_search.patlen >= EL_BUFSIZ) - el->el_search.patlen = EL_BUFSIZ - 1; - if (el->el_search.patlen != 0) { - (void) Strncpy(el->el_search.patbuf, el->el_line.buffer, - el->el_search.patlen); - el->el_search.patbuf[el->el_search.patlen] = '\0'; - } else - el->el_search.patlen = Strlen(el->el_search.patbuf); - } -#ifdef SDEBUG - (void) fprintf(el->el_errfile, "\neventno = %d\n", - el->el_history.eventno); - (void) fprintf(el->el_errfile, "patlen = %d\n", el->el_search.patlen); - (void) fprintf(el->el_errfile, "patbuf = \"%s\"\n", - el->el_search.patbuf); - (void) fprintf(el->el_errfile, "cursor %d lastchar %d\n", - EL_CURSOR(el) - el->el_line.buffer, - el->el_line.lastchar - el->el_line.buffer); -#endif -} - - -/* ce_inc_search(): - * Emacs incremental search - */ -protected el_action_t -ce_inc_search(EditLine *el, int dir) -{ - static const Char STRfwd[] = {'f', 'w', 'd', '\0'}, - STRbck[] = {'b', 'c', 'k', '\0'}; - static Char pchar = ':';/* ':' = normal, '?' = failed */ - static Char endcmd[2] = {'\0', '\0'}; - Char ch, *ocursor = el->el_line.cursor, oldpchar = pchar; - const Char *cp; - - el_action_t ret = CC_NORM; - - int ohisteventno = el->el_history.eventno; - size_t oldpatlen = el->el_search.patlen; - int newdir = dir; - int done, redo; - - if (el->el_line.lastchar + sizeof(STRfwd) / - sizeof(*el->el_line.lastchar) + 2 + - el->el_search.patlen >= el->el_line.limit) - return (CC_ERROR); - - for (;;) { - - if (el->el_search.patlen == 0) { /* first round */ - pchar = ':'; -#ifdef ANCHOR -#define LEN 2 - el->el_search.patbuf[el->el_search.patlen++] = '.'; - el->el_search.patbuf[el->el_search.patlen++] = '*'; -#else -#define LEN 0 -#endif - } - done = redo = 0; - *el->el_line.lastchar++ = '\n'; - for (cp = (newdir == ED_SEARCH_PREV_HISTORY) ? STRbck : STRfwd; - *cp; *el->el_line.lastchar++ = *cp++) - continue; - *el->el_line.lastchar++ = pchar; - for (cp = &el->el_search.patbuf[LEN]; - cp < &el->el_search.patbuf[el->el_search.patlen]; - *el->el_line.lastchar++ = *cp++) - continue; - *el->el_line.lastchar = '\0'; - re_refresh(el); - - if (FUN(el,getc)(el, &ch) != 1) - return (ed_end_of_file(el, 0)); - - switch (el->el_map.current[(unsigned char) ch]) { - case ED_INSERT: - case ED_DIGIT: - if (el->el_search.patlen >= EL_BUFSIZ - LEN) - term_beep(el); - else { - el->el_search.patbuf[el->el_search.patlen++] = - ch; - *el->el_line.lastchar++ = ch; - *el->el_line.lastchar = '\0'; - re_refresh(el); - } - break; - - case EM_INC_SEARCH_NEXT: - newdir = ED_SEARCH_NEXT_HISTORY; - redo++; - break; - - case EM_INC_SEARCH_PREV: - newdir = ED_SEARCH_PREV_HISTORY; - redo++; - break; - - case EM_DELETE_PREV_CHAR: - case ED_DELETE_PREV_CHAR: - if (el->el_search.patlen > LEN) - done++; - else - term_beep(el); - break; - - default: - switch (ch) { - case 0007: /* ^G: Abort */ - ret = CC_ERROR; - done++; - break; - - case 0027: /* ^W: Append word */ - /* No can do if globbing characters in pattern */ - for (cp = &el->el_search.patbuf[LEN];; cp++) - if (cp >= &el->el_search.patbuf[ - el->el_search.patlen]) { - el->el_line.cursor += - el->el_search.patlen - LEN - 1; - cp = c__next_word(el->el_line.cursor, - el->el_line.lastchar, 1, - ce__isword); - while (el->el_line.cursor < cp && - *el->el_line.cursor != '\n') { - if (el->el_search.patlen >= - EL_BUFSIZ - LEN) { - term_beep(el); - break; - } - el->el_search.patbuf[el->el_search.patlen++] = - *el->el_line.cursor; - *el->el_line.lastchar++ = - *el->el_line.cursor++; - } - el->el_line.cursor = ocursor; - *el->el_line.lastchar = '\0'; - re_refresh(el); - break; - } else if (isglob(*cp)) { - term_beep(el); - break; - } - break; - - default: /* Terminate and execute cmd */ - endcmd[0] = ch; - FUN(el,push)(el, endcmd); - /* FALLTHROUGH */ - - case 0033: /* ESC: Terminate */ - ret = CC_REFRESH; - done++; - break; - } - break; - } - - while (el->el_line.lastchar > el->el_line.buffer && - *el->el_line.lastchar != '\n') - *el->el_line.lastchar-- = '\0'; - *el->el_line.lastchar = '\0'; - - if (!done) { - - /* Can't search if unmatched '[' */ - for (cp = &el->el_search.patbuf[el->el_search.patlen-1], - ch = ']'; - cp >= &el->el_search.patbuf[LEN]; - cp--) - if (*cp == '[' || *cp == ']') { - ch = *cp; - break; - } - if (el->el_search.patlen > LEN && ch != '[') { - if (redo && newdir == dir) { - if (pchar == '?') { /* wrap around */ - el->el_history.eventno = - newdir == ED_SEARCH_PREV_HISTORY ? 0 : 0x7fffffff; - if (hist_get(el) == CC_ERROR) - /* el->el_history.event - * no was fixed by - * first call */ - (void) hist_get(el); - el->el_line.cursor = newdir == - ED_SEARCH_PREV_HISTORY ? - el->el_line.lastchar : - el->el_line.buffer; - } else - el->el_line.cursor += - newdir == - ED_SEARCH_PREV_HISTORY ? - -1 : 1; - } -#ifdef ANCHOR - el->el_search.patbuf[el->el_search.patlen++] = - '.'; - el->el_search.patbuf[el->el_search.patlen++] = - '*'; -#endif - el->el_search.patbuf[el->el_search.patlen] = - '\0'; - if (el->el_line.cursor < el->el_line.buffer || - el->el_line.cursor > el->el_line.lastchar || - (ret = ce_search_line(el, newdir)) - == CC_ERROR) { - /* avoid c_setpat */ - el->el_state.lastcmd = - (el_action_t) newdir; - ret = newdir == ED_SEARCH_PREV_HISTORY ? - ed_search_prev_history(el, 0) : - ed_search_next_history(el, 0); - if (ret != CC_ERROR) { - el->el_line.cursor = newdir == - ED_SEARCH_PREV_HISTORY ? - el->el_line.lastchar : - el->el_line.buffer; - (void) ce_search_line(el, - newdir); - } - } - el->el_search.patlen -= LEN; - el->el_search.patbuf[el->el_search.patlen] = - '\0'; - if (ret == CC_ERROR) { - term_beep(el); - if (el->el_history.eventno != - ohisteventno) { - el->el_history.eventno = - ohisteventno; - if (hist_get(el) == CC_ERROR) - return (CC_ERROR); - } - el->el_line.cursor = ocursor; - pchar = '?'; - } else { - pchar = ':'; - } - } - ret = ce_inc_search(el, newdir); - - if (ret == CC_ERROR && pchar == '?' && oldpchar == ':') - /* - * break abort of failed search at last - * non-failed - */ - ret = CC_NORM; - - } - if (ret == CC_NORM || (ret == CC_ERROR && oldpatlen == 0)) { - /* restore on normal return or error exit */ - pchar = oldpchar; - el->el_search.patlen = oldpatlen; - if (el->el_history.eventno != ohisteventno) { - el->el_history.eventno = ohisteventno; - if (hist_get(el) == CC_ERROR) - return (CC_ERROR); - } - el->el_line.cursor = ocursor; - if (ret == CC_ERROR) - re_refresh(el); - } - if (done || ret != CC_NORM) - return (ret); - } -} - - -/* cv_search(): - * Vi search. - */ -protected el_action_t -cv_search(EditLine *el, int dir) -{ - Char ch; - Char tmpbuf[EL_BUFSIZ]; - int tmplen; - -#ifdef ANCHOR - tmpbuf[0] = '.'; - tmpbuf[1] = '*'; -#endif - tmplen = LEN; - - el->el_search.patdir = dir; - - tmplen = c_gets(el, &tmpbuf[LEN], - dir == ED_SEARCH_PREV_HISTORY ? STR("\n/") : STR("\n?") ); - if (tmplen == -1) - return CC_REFRESH; - - tmplen += LEN; - ch = tmpbuf[tmplen]; - tmpbuf[tmplen] = '\0'; - - if (tmplen == LEN) { - /* - * Use the old pattern, but wild-card it. - */ - if (el->el_search.patlen == 0) { - re_refresh(el); - return (CC_ERROR); - } -#ifdef ANCHOR - if (el->el_search.patbuf[0] != '.' && - el->el_search.patbuf[0] != '*') { - (void) Strncpy(tmpbuf, el->el_search.patbuf, - sizeof(tmpbuf) / sizeof(*tmpbuf) - 1); - el->el_search.patbuf[0] = '.'; - el->el_search.patbuf[1] = '*'; - (void) Strncpy(&el->el_search.patbuf[2], tmpbuf, - EL_BUFSIZ - 3); - el->el_search.patlen++; - el->el_search.patbuf[el->el_search.patlen++] = '.'; - el->el_search.patbuf[el->el_search.patlen++] = '*'; - el->el_search.patbuf[el->el_search.patlen] = '\0'; - } -#endif - } else { -#ifdef ANCHOR - tmpbuf[tmplen++] = '.'; - tmpbuf[tmplen++] = '*'; -#endif - tmpbuf[tmplen] = '\0'; - (void) Strncpy(el->el_search.patbuf, tmpbuf, EL_BUFSIZ - 1); - el->el_search.patlen = tmplen; - } - el->el_state.lastcmd = (el_action_t) dir; /* avoid c_setpat */ - el->el_line.cursor = el->el_line.lastchar = el->el_line.buffer; - if ((dir == ED_SEARCH_PREV_HISTORY ? ed_search_prev_history(el, 0) : - ed_search_next_history(el, 0)) == CC_ERROR) { - re_refresh(el); - return (CC_ERROR); - } - if (ch == 0033) { - re_refresh(el); - return ed_newline(el, 0); - } - return (CC_REFRESH); -} - - -/* ce_search_line(): - * Look for a pattern inside a line - */ -protected el_action_t -ce_search_line(EditLine *el, int dir) -{ - Char *cp = el->el_line.cursor; - Char *pattern = el->el_search.patbuf; - Char oc, *ocp; -#ifdef ANCHOR - ocp = &pattern[1]; - oc = *ocp; - *ocp = '^'; -#else - ocp = pattern; - oc = *ocp; -#endif - - if (dir == ED_SEARCH_PREV_HISTORY) { - for (; cp >= el->el_line.buffer; cp--) { - if (el_match(cp, ocp)) { - *ocp = oc; - el->el_line.cursor = cp; - return (CC_NORM); - } - } - *ocp = oc; - return (CC_ERROR); - } else { - for (; *cp != '\0' && cp < el->el_line.limit; cp++) { - if (el_match(cp, ocp)) { - *ocp = oc; - el->el_line.cursor = cp; - return (CC_NORM); - } - } - *ocp = oc; - return (CC_ERROR); - } -} - - -/* cv_repeat_srch(): - * Vi repeat search - */ -protected el_action_t -cv_repeat_srch(EditLine *el, Int c) -{ - -#ifdef SDEBUG - (void) fprintf(el->el_errfile, "dir %d patlen %d patbuf %s\n", - c, el->el_search.patlen, ct_encode_string(el->el_search.patbuf)); -#endif - - el->el_state.lastcmd = (el_action_t) c; /* Hack to stop c_setpat */ - el->el_line.lastchar = el->el_line.buffer; - - switch (c) { - case ED_SEARCH_NEXT_HISTORY: - return (ed_search_next_history(el, 0)); - case ED_SEARCH_PREV_HISTORY: - return (ed_search_prev_history(el, 0)); - default: - return (CC_ERROR); - } -} - - -/* cv_csearch(): - * Vi character search - */ -protected el_action_t -cv_csearch(EditLine *el, int direction, Int ch, int count, int tflag) -{ - Char *cp; - - if (ch == 0) - return CC_ERROR; - - if (ch == -1) { - Char c; - if (FUN(el,getc)(el, &c) != 1) - return ed_end_of_file(el, 0); - ch = c; - } - - /* Save for ';' and ',' commands */ - el->el_search.chacha = ch; - el->el_search.chadir = direction; - el->el_search.chatflg = tflag; - - cp = el->el_line.cursor; - while (count--) { - if (*cp == ch) - cp += direction; - for (;;cp += direction) { - if (cp >= el->el_line.lastchar) - return CC_ERROR; - if (cp < el->el_line.buffer) - return CC_ERROR; - if (*cp == ch) - break; - } - } - - if (tflag) - cp -= direction; - - el->el_line.cursor = cp; - - if (el->el_chared.c_vcmd.action != NOP) { - if (direction > 0) - el->el_line.cursor++; - cv_delfini(el); - return CC_REFRESH; - } - return CC_CURSOR; -} diff --git a/kerberosV/src/lib/libedit/src/search.h b/kerberosV/src/lib/libedit/src/search.h deleted file mode 100644 index d9f27e56185..00000000000 --- a/kerberosV/src/lib/libedit/src/search.h +++ /dev/null @@ -1,66 +0,0 @@ -/* $NetBSD: search.h,v 1.9 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)search.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.search.h: Line and history searching utilities - */ -#ifndef _h_el_search -#define _h_el_search - -#include "histedit.h" - -typedef struct el_search_t { - Char *patbuf; /* The pattern buffer */ - size_t patlen; /* Length of the pattern buffer */ - int patdir; /* Direction of the last search */ - int chadir; /* Character search direction */ - Char chacha; /* Character we are looking for */ - char chatflg; /* 0 if f, 1 if t */ -} el_search_t; - - -protected int el_match(const Char *, const Char *); -protected int search_init(EditLine *); -protected void search_end(EditLine *); -protected int c_hmatch(EditLine *, const Char *); -protected void c_setpat(EditLine *); -protected el_action_t ce_inc_search(EditLine *, int); -protected el_action_t cv_search(EditLine *, int); -protected el_action_t ce_search_line(EditLine *, int); -protected el_action_t cv_repeat_srch(EditLine *, Int); -protected el_action_t cv_csearch(EditLine *, int, Int, int, int); - -#endif /* _h_el_search */ diff --git a/kerberosV/src/lib/libedit/src/shlib_version b/kerberosV/src/lib/libedit/src/shlib_version deleted file mode 100644 index 7bee409bba1..00000000000 --- a/kerberosV/src/lib/libedit/src/shlib_version +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: shlib_version,v 1.18 2009/01/11 03:07:48 christos Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# -major=4 -minor=0 diff --git a/kerberosV/src/lib/libedit/src/sig.c b/kerberosV/src/lib/libedit/src/sig.c deleted file mode 100644 index 1ea319faa06..00000000000 --- a/kerberosV/src/lib/libedit/src/sig.c +++ /dev/null @@ -1,200 +0,0 @@ -/* $NetBSD: sig.c,v 1.15 2009/02/19 15:20:22 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)sig.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: sig.c,v 1.15 2009/02/19 15:20:22 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * sig.c: Signal handling stuff. - * our policy is to trap all signals, set a good state - * and pass the ball to our caller. - */ -#include "el.h" -#include - -private EditLine *sel = NULL; - -private const int sighdl[] = { -#define _DO(a) (a), - ALLSIGS -#undef _DO - - 1 -}; - -private void sig_handler(int); - -/* sig_handler(): - * This is the handler called for all signals - * XXX: we cannot pass any data so we just store the old editline - * state in a private variable - */ -private void -sig_handler(int signo) -{ - int i; - sigset_t nset, oset; - - (void) sigemptyset(&nset); - (void) sigaddset(&nset, signo); - (void) sigprocmask(SIG_BLOCK, &nset, &oset); - - sel->el_signal->sig_no = signo; - - switch (signo) { - case SIGCONT: - tty_rawmode(sel); - if (ed_redisplay(sel, 0) == CC_REFRESH) - re_refresh(sel); - term__flush(sel); - break; - - case SIGWINCH: - el_resize(sel); - break; - - default: - tty_cookedmode(sel); - break; - } - - for (i = 0; sighdl[i] != -1; i++) - if (signo == sighdl[i]) - break; - - (void) sigaction(signo, &sel->el_signal->sig_action[i], NULL); - sel->el_signal->sig_action[i].sa_handler = SIG_ERR; - sel->el_signal->sig_action[i].sa_flags = 0; - sigemptyset(&sel->el_signal->sig_action[i].sa_mask); - (void) sigprocmask(SIG_SETMASK, &oset, NULL); - (void) kill(0, signo); -} - - -/* sig_init(): - * Initialize all signal stuff - */ -protected int -sig_init(EditLine *el) -{ - size_t i; - sigset_t *nset, oset; - - el->el_signal = el_malloc(sizeof(*el->el_signal)); - if (el->el_signal == NULL) - return -1; - - nset = &el->el_signal->sig_set; - (void) sigemptyset(nset); -#define _DO(a) (void) sigaddset(nset, a); - ALLSIGS -#undef _DO - (void) sigprocmask(SIG_BLOCK, nset, &oset); - - for (i = 0; sighdl[i] != -1; i++) { - el->el_signal->sig_action[i].sa_handler = SIG_ERR; - el->el_signal->sig_action[i].sa_flags = 0; - sigemptyset(&el->el_signal->sig_action[i].sa_mask); - } - - (void) sigprocmask(SIG_SETMASK, &oset, NULL); - - return 0; -} - - -/* sig_end(): - * Clear all signal stuff - */ -protected void -sig_end(EditLine *el) -{ - - el_free((ptr_t) el->el_signal); - el->el_signal = NULL; -} - - -/* sig_set(): - * set all the signal handlers - */ -protected void -sig_set(EditLine *el) -{ - size_t i; - sigset_t oset; - struct sigaction osa, nsa; - - nsa.sa_handler = sig_handler; - nsa.sa_flags = 0; - sigemptyset(&nsa.sa_mask); - - (void) sigprocmask(SIG_BLOCK, &el->el_signal->sig_set, &oset); - - for (i = 0; sighdl[i] != -1; i++) { - /* This could happen if we get interrupted */ - if (sigaction(sighdl[i], &nsa, &osa) != -1 && - osa.sa_handler != sig_handler) - el->el_signal->sig_action[i] = osa; - } - sel = el; - (void) sigprocmask(SIG_SETMASK, &oset, NULL); -} - - -/* sig_clr(): - * clear all the signal handlers - */ -protected void -sig_clr(EditLine *el) -{ - size_t i; - sigset_t oset; - - (void) sigprocmask(SIG_BLOCK, &el->el_signal->sig_set, &oset); - - for (i = 0; sighdl[i] != -1; i++) - if (el->el_signal->sig_action[i].sa_handler != SIG_ERR) - (void)sigaction(sighdl[i], - &el->el_signal->sig_action[i], NULL); - - sel = NULL; /* we are going to die if the handler is - * called */ - (void)sigprocmask(SIG_SETMASK, &oset, NULL); -} diff --git a/kerberosV/src/lib/libedit/src/sig.h b/kerberosV/src/lib/libedit/src/sig.h deleted file mode 100644 index c957cfdf5a7..00000000000 --- a/kerberosV/src/lib/libedit/src/sig.h +++ /dev/null @@ -1,72 +0,0 @@ -/* $NetBSD: sig.h,v 1.8 2009/02/19 15:20:22 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)sig.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.sig.h: Signal handling functions - */ -#ifndef _h_el_sig -#define _h_el_sig - -#include - -#include "histedit.h" - -/* - * Define here all the signals we are going to handle - * The _DO macro is used to iterate in the source code - */ -#define ALLSIGS \ - _DO(SIGINT) \ - _DO(SIGTSTP) \ - _DO(SIGQUIT) \ - _DO(SIGHUP) \ - _DO(SIGTERM) \ - _DO(SIGCONT) \ - _DO(SIGWINCH) -#define ALLSIGSNO 7 - -typedef struct { - struct sigaction sig_action[ALLSIGSNO]; - sigset_t sig_set; - volatile sig_atomic_t sig_no; -} *el_signal_t; - -protected void sig_end(EditLine*); -protected int sig_init(EditLine*); -protected void sig_set(EditLine*); -protected void sig_clr(EditLine*); - -#endif /* _h_el_sig */ diff --git a/kerberosV/src/lib/libedit/src/strlcat.c b/kerberosV/src/lib/libedit/src/strlcat.c deleted file mode 100644 index 1b4e1512497..00000000000 --- a/kerberosV/src/lib/libedit/src/strlcat.c +++ /dev/null @@ -1,74 +0,0 @@ -/* $NetBSD: strlcat.c,v 1.3 2007/06/04 18:19:27 christos Exp $ */ -/* $OpenBSD: strlcat.c,v 1.1 2013/06/17 19:11:44 robert Exp $ */ - -/* - * Copyright (c) 1998 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE - * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "config.h" - -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strlcat.c,v 1.3 2007/06/04 18:19:27 christos Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include -#include -#include - -#ifdef _LIBC -# ifdef __weak_alias -__weak_alias(strlcat, _strlcat) -# endif -#endif - -#if !HAVE_STRLCAT -/* - * Appends src to string dst of size siz (unlike strncat, siz is the - * full size of dst, not space left). At most siz-1 characters - * will be copied. Always NUL terminates (unless siz <= strlen(dst)). - * Returns strlen(src) + MIN(siz, strlen(initial dst)). - * If retval >= siz, truncation occurred. - */ -size_t -strlcat(char *dst, const char *src, size_t siz) -{ - char *d = dst; - const char *s = src; - size_t n = siz; - size_t dlen; - - _DIAGASSERT(dst != NULL); - _DIAGASSERT(src != NULL); - - /* Find the end of dst and adjust bytes left but don't go past end */ - while (n-- != 0 && *d != '\0') - d++; - dlen = d - dst; - n = siz - dlen; - - if (n == 0) - return(dlen + strlen(s)); - while (*s != '\0') { - if (n != 1) { - *d++ = *s; - n--; - } - s++; - } - *d = '\0'; - - return(dlen + (s - src)); /* count does not include NUL */ -} -#endif diff --git a/kerberosV/src/lib/libedit/src/strlcpy.c b/kerberosV/src/lib/libedit/src/strlcpy.c deleted file mode 100644 index 8faa53e1416..00000000000 --- a/kerberosV/src/lib/libedit/src/strlcpy.c +++ /dev/null @@ -1,70 +0,0 @@ -/* $NetBSD: strlcpy.c,v 1.3 2007/06/04 18:19:27 christos Exp $ */ -/* $OpenBSD: strlcpy.c,v 1.1 2013/06/17 19:11:44 robert Exp $ */ - -/* - * Copyright (c) 1998 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE - * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "config.h" - -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strlcpy.c,v 1.3 2007/06/04 18:19:27 christos Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include -#include -#include - -#ifdef _LIBC -# ifdef __weak_alias -__weak_alias(strlcpy, _strlcpy) -# endif -#endif - -#if !HAVE_STRLCPY -/* - * Copy src to string dst of size siz. At most siz-1 characters - * will be copied. Always NUL terminates (unless siz == 0). - * Returns strlen(src); if retval >= siz, truncation occurred. - */ -size_t -strlcpy(char *dst, const char *src, size_t siz) -{ - char *d = dst; - const char *s = src; - size_t n = siz; - - _DIAGASSERT(dst != NULL); - _DIAGASSERT(src != NULL); - - /* Copy as many bytes as will fit */ - if (n != 0 && --n != 0) { - do { - if ((*d++ = *s++) == 0) - break; - } while (--n != 0); - } - - /* Not enough room in dst, add NUL and traverse rest of src */ - if (n == 0) { - if (siz != 0) - *d = '\0'; /* NUL-terminate dst */ - while (*s++) - ; - } - - return(s - src - 1); /* count does not include NUL */ -} -#endif diff --git a/kerberosV/src/lib/libedit/src/sys.h b/kerberosV/src/lib/libedit/src/sys.h deleted file mode 100644 index 87c90df4e4a..00000000000 --- a/kerberosV/src/lib/libedit/src/sys.h +++ /dev/null @@ -1,161 +0,0 @@ -/* $NetBSD: sys.h,v 1.13 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)sys.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * sys.h: Put all the stupid compiler and system dependencies here... - */ -#ifndef _h_sys -#define _h_sys - -#ifdef HAVE_SYS_CDEFS_H -#include -#endif - -#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8) -# define __attribute__(A) -#endif - -#ifndef _DIAGASSERT -# define _DIAGASSERT(x) -#endif - -#ifndef __BEGIN_DECLS -# ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -# else -# define __BEGIN_DECLS -# define __END_DECLS -# endif -#endif - -#ifndef public -# define public /* Externally visible functions/variables */ -#endif - -#ifndef private -# define private static /* Always hidden internals */ -#endif - -#ifndef protected -# define protected /* Redefined from elsewhere to "static" */ - /* When we want to hide everything */ -#endif - -#ifndef __arraycount -# define __arraycount(a) (sizeof(a) / sizeof(*(a))) -#endif - -#ifndef HAVE_U_INT32_T -typedef unsigned int u_int32_t; -#endif - -#ifndef _PTR_T -# define _PTR_T -typedef void *ptr_t; -#endif - -#ifndef _IOCTL_T -# define _IOCTL_T -typedef void *ioctl_t; -#endif - -#include - -#ifndef HAVE_STRLCAT -#define strlcat libedit_strlcat -size_t strlcat(char *dst, const char *src, size_t size); -#endif - -#ifndef HAVE_STRLCPY -#define strlcpy libedit_strlcpy -size_t strlcpy(char *dst, const char *src, size_t size); -#endif - -#ifndef HAVE_FGETLN -#define fgetln libedit_fgetln -char *fgetln(FILE *fp, size_t *len); -#endif - -#define REGEX /* Use POSIX.2 regular expression functions */ -#undef REGEXP /* Use UNIX V8 regular expression functions */ - -#if defined(__sun) -extern int tgetent(char *, const char *); -extern int tgetflag(char *); -extern int tgetnum(char *); -extern int tputs(const char *, int, int (*)(int)); -extern char* tgoto(const char*, int, int); -extern char* tgetstr(char*, char**); -#endif - -#ifdef notdef -# undef REGEX -# undef REGEXP -# include -# ifdef __GNUC__ -/* - * Broken hdrs. - */ -extern int tgetent(const char *bp, char *name); -extern int tgetflag(const char *id); -extern int tgetnum(const char *id); -extern char *tgetstr(const char *id, char **area); -extern char *tgoto(const char *cap, int col, int row); -extern int tputs(const char *str, int affcnt, int (*putc)(int)); -extern char *getenv(const char *); -extern int fprintf(FILE *, const char *, ...); -extern int sigsetmask(int); -extern int sigblock(int); -extern int fputc(int, FILE *); -extern int fgetc(FILE *); -extern int fflush(FILE *); -extern int tolower(int); -extern int toupper(int); -extern int errno, sys_nerr; -extern char *sys_errlist[]; -extern void perror(const char *); -# include -# define strerror(e) sys_errlist[e] -# endif -# ifdef SABER -extern ptr_t memcpy(ptr_t, const ptr_t, size_t); -extern ptr_t memset(ptr_t, int, size_t); -# endif -extern char *fgetline(FILE *, int *); -#endif - -#endif /* _h_sys */ diff --git a/kerberosV/src/lib/libedit/src/term.c b/kerberosV/src/lib/libedit/src/term.c deleted file mode 100644 index 3a1b5e739ed..00000000000 --- a/kerberosV/src/lib/libedit/src/term.c +++ /dev/null @@ -1,1745 +0,0 @@ -/* $NetBSD: term.c,v 1.57 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)term.c 8.2 (Berkeley) 4/30/95"; -#else -__RCSID("$NetBSD: term.c,v 1.57 2009/12/30 22:37:40 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * term.c: Editor/termcap-curses interface - * We have to declare a static variable here, since the - * termcap putchar routine does not take an argument! - */ -#include -#include -#include -#include -#include -#include -#ifdef HAVE_TERMCAP_H -#include -#endif -#ifdef HAVE_CURSES_H -#include -#elif HAVE_NCURSES_H -#include -#endif -/* Solaris's term.h does horrid things. */ - -#if defined(HAVE_TERM_H) && !defined(__sun) -#include -#endif -#include -#include - -#ifdef _REENTRANT -#include -#endif - -#include "el.h" - -/* - * IMPORTANT NOTE: these routines are allowed to look at the current screen - * and the current position assuming that it is correct. If this is not - * true, then the update will be WRONG! This is (should be) a valid - * assumption... - */ - -#define TC_BUFSIZE 2048 - -#define GoodStr(a) (el->el_term.t_str[a] != NULL && \ - el->el_term.t_str[a][0] != '\0') -#define Str(a) el->el_term.t_str[a] -#define Val(a) el->el_term.t_val[a] - -#ifdef notdef -private const struct { - const char *b_name; - int b_rate; -} baud_rate[] = { -#ifdef B0 - { "0", B0 }, -#endif -#ifdef B50 - { "50", B50 }, -#endif -#ifdef B75 - { "75", B75 }, -#endif -#ifdef B110 - { "110", B110 }, -#endif -#ifdef B134 - { "134", B134 }, -#endif -#ifdef B150 - { "150", B150 }, -#endif -#ifdef B200 - { "200", B200 }, -#endif -#ifdef B300 - { "300", B300 }, -#endif -#ifdef B600 - { "600", B600 }, -#endif -#ifdef B900 - { "900", B900 }, -#endif -#ifdef B1200 - { "1200", B1200 }, -#endif -#ifdef B1800 - { "1800", B1800 }, -#endif -#ifdef B2400 - { "2400", B2400 }, -#endif -#ifdef B3600 - { "3600", B3600 }, -#endif -#ifdef B4800 - { "4800", B4800 }, -#endif -#ifdef B7200 - { "7200", B7200 }, -#endif -#ifdef B9600 - { "9600", B9600 }, -#endif -#ifdef EXTA - { "19200", EXTA }, -#endif -#ifdef B19200 - { "19200", B19200 }, -#endif -#ifdef EXTB - { "38400", EXTB }, -#endif -#ifdef B38400 - { "38400", B38400 }, -#endif - { NULL, 0 } -}; -#endif - -private const struct termcapstr { - const char *name; - const char *long_name; -} tstr[] = { -#define T_al 0 - { "al", "add new blank line" }, -#define T_bl 1 - { "bl", "audible bell" }, -#define T_cd 2 - { "cd", "clear to bottom" }, -#define T_ce 3 - { "ce", "clear to end of line" }, -#define T_ch 4 - { "ch", "cursor to horiz pos" }, -#define T_cl 5 - { "cl", "clear screen" }, -#define T_dc 6 - { "dc", "delete a character" }, -#define T_dl 7 - { "dl", "delete a line" }, -#define T_dm 8 - { "dm", "start delete mode" }, -#define T_ed 9 - { "ed", "end delete mode" }, -#define T_ei 10 - { "ei", "end insert mode" }, -#define T_fs 11 - { "fs", "cursor from status line" }, -#define T_ho 12 - { "ho", "home cursor" }, -#define T_ic 13 - { "ic", "insert character" }, -#define T_im 14 - { "im", "start insert mode" }, -#define T_ip 15 - { "ip", "insert padding" }, -#define T_kd 16 - { "kd", "sends cursor down" }, -#define T_kl 17 - { "kl", "sends cursor left" }, -#define T_kr 18 - { "kr", "sends cursor right" }, -#define T_ku 19 - { "ku", "sends cursor up" }, -#define T_md 20 - { "md", "begin bold" }, -#define T_me 21 - { "me", "end attributes" }, -#define T_nd 22 - { "nd", "non destructive space" }, -#define T_se 23 - { "se", "end standout" }, -#define T_so 24 - { "so", "begin standout" }, -#define T_ts 25 - { "ts", "cursor to status line" }, -#define T_up 26 - { "up", "cursor up one" }, -#define T_us 27 - { "us", "begin underline" }, -#define T_ue 28 - { "ue", "end underline" }, -#define T_vb 29 - { "vb", "visible bell" }, -#define T_DC 30 - { "DC", "delete multiple chars" }, -#define T_DO 31 - { "DO", "cursor down multiple" }, -#define T_IC 32 - { "IC", "insert multiple chars" }, -#define T_LE 33 - { "LE", "cursor left multiple" }, -#define T_RI 34 - { "RI", "cursor right multiple" }, -#define T_UP 35 - { "UP", "cursor up multiple" }, -#define T_kh 36 - { "kh", "send cursor home" }, -#define T_at7 37 - { "@7", "send cursor end" }, -#define T_str 38 - { NULL, NULL } -}; - -private const struct termcapval { - const char *name; - const char *long_name; -} tval[] = { -#define T_am 0 - { "am", "has automatic margins" }, -#define T_pt 1 - { "pt", "has physical tabs" }, -#define T_li 2 - { "li", "Number of lines" }, -#define T_co 3 - { "co", "Number of columns" }, -#define T_km 4 - { "km", "Has meta key" }, -#define T_xt 5 - { "xt", "Tab chars destructive" }, -#define T_xn 6 - { "xn", "newline ignored at right margin" }, -#define T_MT 7 - { "MT", "Has meta key" }, /* XXX? */ -#define T_val 8 - { NULL, NULL, } -}; -/* do two or more of the attributes use me */ - -private void term_setflags(EditLine *); -private int term_rebuffer_display(EditLine *); -private void term_free_display(EditLine *); -private int term_alloc_display(EditLine *); -private void term_alloc(EditLine *, const struct termcapstr *, const char *); -private void term_init_arrow(EditLine *); -private void term_reset_arrow(EditLine *); -private int term_putc(int); -private void term_tputs(EditLine *, const char *, int); - -#ifdef _REENTRANT -private pthread_mutex_t term_mutex = PTHREAD_MUTEX_INITIALIZER; -#endif -private FILE *term_outfile = NULL; - - -/* term_setflags(): - * Set the terminal capability flags - */ -private void -term_setflags(EditLine *el) -{ - EL_FLAGS = 0; - if (el->el_tty.t_tabs) - EL_FLAGS |= (Val(T_pt) && !Val(T_xt)) ? TERM_CAN_TAB : 0; - - EL_FLAGS |= (Val(T_km) || Val(T_MT)) ? TERM_HAS_META : 0; - EL_FLAGS |= GoodStr(T_ce) ? TERM_CAN_CEOL : 0; - EL_FLAGS |= (GoodStr(T_dc) || GoodStr(T_DC)) ? TERM_CAN_DELETE : 0; - EL_FLAGS |= (GoodStr(T_im) || GoodStr(T_ic) || GoodStr(T_IC)) ? - TERM_CAN_INSERT : 0; - EL_FLAGS |= (GoodStr(T_up) || GoodStr(T_UP)) ? TERM_CAN_UP : 0; - EL_FLAGS |= Val(T_am) ? TERM_HAS_AUTO_MARGINS : 0; - EL_FLAGS |= Val(T_xn) ? TERM_HAS_MAGIC_MARGINS : 0; - - if (GoodStr(T_me) && GoodStr(T_ue)) - EL_FLAGS |= (strcmp(Str(T_me), Str(T_ue)) == 0) ? - TERM_CAN_ME : 0; - else - EL_FLAGS &= ~TERM_CAN_ME; - if (GoodStr(T_me) && GoodStr(T_se)) - EL_FLAGS |= (strcmp(Str(T_me), Str(T_se)) == 0) ? - TERM_CAN_ME : 0; - - -#ifdef DEBUG_SCREEN - if (!EL_CAN_UP) { - (void) fprintf(el->el_errfile, - "WARNING: Your terminal cannot move up.\n"); - (void) fprintf(el->el_errfile, - "Editing may be odd for long lines.\n"); - } - if (!EL_CAN_CEOL) - (void) fprintf(el->el_errfile, "no clear EOL capability.\n"); - if (!EL_CAN_DELETE) - (void) fprintf(el->el_errfile, "no delete char capability.\n"); - if (!EL_CAN_INSERT) - (void) fprintf(el->el_errfile, "no insert char capability.\n"); -#endif /* DEBUG_SCREEN */ -} - -/* term_init(): - * Initialize the terminal stuff - */ -protected int -term_init(EditLine *el) -{ - - el->el_term.t_buf = (char *) el_malloc(TC_BUFSIZE); - if (el->el_term.t_buf == NULL) - return (-1); - el->el_term.t_cap = (char *) el_malloc(TC_BUFSIZE); - if (el->el_term.t_cap == NULL) - return (-1); - el->el_term.t_fkey = (fkey_t *) el_malloc(A_K_NKEYS * sizeof(fkey_t)); - if (el->el_term.t_fkey == NULL) - return (-1); - el->el_term.t_loc = 0; - el->el_term.t_str = (char **) el_malloc(T_str * sizeof(char *)); - if (el->el_term.t_str == NULL) - return (-1); - (void) memset(el->el_term.t_str, 0, T_str * sizeof(char *)); - el->el_term.t_val = (int *) el_malloc(T_val * sizeof(int)); - if (el->el_term.t_val == NULL) - return (-1); - (void) memset(el->el_term.t_val, 0, T_val * sizeof(int)); - (void) term_set(el, NULL); - term_init_arrow(el); - return (0); -} - -/* term_end(): - * Clean up the terminal stuff - */ -protected void -term_end(EditLine *el) -{ - - el_free((ptr_t) el->el_term.t_buf); - el->el_term.t_buf = NULL; - el_free((ptr_t) el->el_term.t_cap); - el->el_term.t_cap = NULL; - el->el_term.t_loc = 0; - el_free((ptr_t) el->el_term.t_str); - el->el_term.t_str = NULL; - el_free((ptr_t) el->el_term.t_val); - el->el_term.t_val = NULL; - el_free((ptr_t) el->el_term.t_fkey); - el->el_term.t_fkey = NULL; - term_free_display(el); -} - - -/* term_alloc(): - * Maintain a string pool for termcap strings - */ -private void -term_alloc(EditLine *el, const struct termcapstr *t, const char *cap) -{ - char termbuf[TC_BUFSIZE]; - size_t tlen, clen; - char **tlist = el->el_term.t_str; - char **tmp, **str = &tlist[t - tstr]; - - if (cap == NULL || *cap == '\0') { - *str = NULL; - return; - } else - clen = strlen(cap); - - tlen = *str == NULL ? 0 : strlen(*str); - - /* - * New string is shorter; no need to allocate space - */ - if (clen <= tlen) { - if (*str) - (void) strcpy(*str, cap); /* XXX strcpy is safe */ - return; - } - /* - * New string is longer; see if we have enough space to append - */ - if (el->el_term.t_loc + 3 < TC_BUFSIZE) { - /* XXX strcpy is safe */ - (void) strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], - cap); - el->el_term.t_loc += (int)clen + 1; /* one for \0 */ - return; - } - /* - * Compact our buffer; no need to check compaction, cause we know it - * fits... - */ - tlen = 0; - for (tmp = tlist; tmp < &tlist[T_str]; tmp++) - if (*tmp != NULL && *tmp != '\0' && *tmp != *str) { - char *ptr; - - for (ptr = *tmp; *ptr != '\0'; termbuf[tlen++] = *ptr++) - continue; - termbuf[tlen++] = '\0'; - } - memcpy(el->el_term.t_buf, termbuf, TC_BUFSIZE); - el->el_term.t_loc = (int)tlen; - if (el->el_term.t_loc + 3 >= TC_BUFSIZE) { - (void) fprintf(el->el_errfile, - "Out of termcap string space.\n"); - return; - } - /* XXX strcpy is safe */ - (void) strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], cap); - el->el_term.t_loc += (int)clen + 1; /* one for \0 */ - return; -} - - -/* term_rebuffer_display(): - * Rebuffer the display after the screen changed size - */ -private int -term_rebuffer_display(EditLine *el) -{ - coord_t *c = &el->el_term.t_size; - - term_free_display(el); - - c->h = Val(T_co); - c->v = Val(T_li); - - if (term_alloc_display(el) == -1) - return (-1); - return (0); -} - - -/* term_alloc_display(): - * Allocate a new display. - */ -private int -term_alloc_display(EditLine *el) -{ - int i; - Char **b; - coord_t *c = &el->el_term.t_size; - - b = el_malloc(sizeof(*b) * (c->v + 1)); - if (b == NULL) - return (-1); - for (i = 0; i < c->v; i++) { - b[i] = el_malloc(sizeof(**b) * (c->h + 1)); - if (b[i] == NULL) { - while (--i >= 0) - el_free((ptr_t) b[i]); - el_free((ptr_t) b); - return (-1); - } - } - b[c->v] = NULL; - el->el_display = b; - - b = el_malloc(sizeof(*b) * (c->v + 1)); - if (b == NULL) - return (-1); - for (i = 0; i < c->v; i++) { - b[i] = el_malloc(sizeof(**b) * (c->h + 1)); - if (b[i] == NULL) { - while (--i >= 0) - el_free((ptr_t) b[i]); - el_free((ptr_t) b); - return (-1); - } - } - b[c->v] = NULL; - el->el_vdisplay = b; - return (0); -} - - -/* term_free_display(): - * Free the display buffers - */ -private void -term_free_display(EditLine *el) -{ - Char **b; - Char **bufp; - - b = el->el_display; - el->el_display = NULL; - if (b != NULL) { - for (bufp = b; *bufp != NULL; bufp++) - el_free((ptr_t) *bufp); - el_free((ptr_t) b); - } - b = el->el_vdisplay; - el->el_vdisplay = NULL; - if (b != NULL) { - for (bufp = b; *bufp != NULL; bufp++) - el_free((ptr_t) *bufp); - el_free((ptr_t) b); - } -} - - -/* term_move_to_line(): - * move to line (first line == 0) - * as efficiently as possible - */ -protected void -term_move_to_line(EditLine *el, int where) -{ - int del; - - if (where == el->el_cursor.v) - return; - - if (where > el->el_term.t_size.v) { -#ifdef DEBUG_SCREEN - (void) fprintf(el->el_errfile, - "term_move_to_line: where is ridiculous: %d\r\n", where); -#endif /* DEBUG_SCREEN */ - return; - } - if ((del = where - el->el_cursor.v) > 0) { - while (del > 0) { - if (EL_HAS_AUTO_MARGINS && - el->el_display[el->el_cursor.v][0] != '\0') { - size_t h = el->el_term.t_size.h - 1; -#ifdef WIDECHAR - for (; h > 0 && - el->el_display[el->el_cursor.v][h] == - MB_FILL_CHAR; - h--) - continue; -#endif - /* move without newline */ - term_move_to_char(el, (int)h); - term_overwrite(el, &el->el_display - [el->el_cursor.v][el->el_cursor.h], - (size_t)(el->el_term.t_size.h - - el->el_cursor.h)); - /* updates Cursor */ - del--; - } else { - if ((del > 1) && GoodStr(T_DO)) { - term_tputs(el, tgoto(Str(T_DO), del, - del), del); - del = 0; - } else { - for (; del > 0; del--) - term__putc(el, '\n'); - /* because the \n will become \r\n */ - el->el_cursor.h = 0; - } - } - } - } else { /* del < 0 */ - if (GoodStr(T_UP) && (-del > 1 || !GoodStr(T_up))) - term_tputs(el, tgoto(Str(T_UP), -del, -del), -del); - else { - if (GoodStr(T_up)) - for (; del < 0; del++) - term_tputs(el, Str(T_up), 1); - } - } - el->el_cursor.v = where;/* now where is here */ -} - - -/* term_move_to_char(): - * Move to the character position specified - */ -protected void -term_move_to_char(EditLine *el, int where) -{ - int del, i; - -mc_again: - if (where == el->el_cursor.h) - return; - - if (where > el->el_term.t_size.h) { -#ifdef DEBUG_SCREEN - (void) fprintf(el->el_errfile, - "term_move_to_char: where is riduculous: %d\r\n", where); -#endif /* DEBUG_SCREEN */ - return; - } - if (!where) { /* if where is first column */ - term__putc(el, '\r'); /* do a CR */ - el->el_cursor.h = 0; - return; - } - del = where - el->el_cursor.h; - - if ((del < -4 || del > 4) && GoodStr(T_ch)) - /* go there directly */ - term_tputs(el, tgoto(Str(T_ch), where, where), where); - else { - if (del > 0) { /* moving forward */ - if ((del > 4) && GoodStr(T_RI)) - term_tputs(el, tgoto(Str(T_RI), del, del), del); - else { - /* if I can do tabs, use them */ - if (EL_CAN_TAB) { - if ((el->el_cursor.h & 0370) != - (where & ~0x7) -#ifdef WIDECHAR - && (el->el_display[ - el->el_cursor.v][where & 0370] != - MB_FILL_CHAR) -#endif - ) { - /* if not within tab stop */ - for (i = - (el->el_cursor.h & 0370); - i < (where & ~0x7); - i += 8) - term__putc(el, '\t'); - /* then tab over */ - el->el_cursor.h = where & ~0x7; - } - } - /* - * it's usually cheaper to just write the - * chars, so we do. - */ - /* - * NOTE THAT term_overwrite() WILL CHANGE - * el->el_cursor.h!!! - */ - term_overwrite(el, &el->el_display[ - el->el_cursor.v][el->el_cursor.h], - (size_t)(where - el->el_cursor.h)); - - } - } else { /* del < 0 := moving backward */ - if ((-del > 4) && GoodStr(T_LE)) - term_tputs(el, tgoto(Str(T_LE), -del, -del), - -del); - else { /* can't go directly there */ - /* - * if the "cost" is greater than the "cost" - * from col 0 - */ - if (EL_CAN_TAB ? - ((unsigned int)-del > - (((unsigned int) where >> 3) + - (where & 07))) - : (-del > where)) { - term__putc(el, '\r'); /* do a CR */ - el->el_cursor.h = 0; - goto mc_again; /* and try again */ - } - for (i = 0; i < -del; i++) - term__putc(el, '\b'); - } - } - } - el->el_cursor.h = where; /* now where is here */ -} - - -/* term_overwrite(): - * Overstrike num characters - * Assumes MB_FILL_CHARs are present to keep the column count correct - */ -protected void -term_overwrite(EditLine *el, const Char *cp, size_t n) -{ - if (n == 0) - return; - - if (n > (size_t)el->el_term.t_size.h) { -#ifdef DEBUG_SCREEN - (void) fprintf(el->el_errfile, - "term_overwrite: n is riduculous: %d\r\n", n); -#endif /* DEBUG_SCREEN */ - return; - } - - do { - /* term__putc() ignores any MB_FILL_CHARs */ - term__putc(el, *cp++); - el->el_cursor.h++; - } while (--n); - - if (el->el_cursor.h >= el->el_term.t_size.h) { /* wrap? */ - if (EL_HAS_AUTO_MARGINS) { /* yes */ - el->el_cursor.h = 0; - el->el_cursor.v++; - if (EL_HAS_MAGIC_MARGINS) { - /* force the wrap to avoid the "magic" - * situation */ - Char c; - if ((c = el->el_display[el->el_cursor.v] - [el->el_cursor.h]) != '\0') { - term_overwrite(el, &c, 1); -#ifdef WIDECHAR - while (el->el_display[el->el_cursor.v] - [el->el_cursor.h] == MB_FILL_CHAR) - el->el_cursor.h++; -#endif - } else { - term__putc(el, ' '); - el->el_cursor.h = 1; - } - } - } else /* no wrap, but cursor stays on screen */ - el->el_cursor.h = el->el_term.t_size.h - 1; - } -} - - -/* term_deletechars(): - * Delete num characters - */ -protected void -term_deletechars(EditLine *el, int num) -{ - if (num <= 0) - return; - - if (!EL_CAN_DELETE) { -#ifdef DEBUG_EDIT - (void) fprintf(el->el_errfile, " ERROR: cannot delete \n"); -#endif /* DEBUG_EDIT */ - return; - } - if (num > el->el_term.t_size.h) { -#ifdef DEBUG_SCREEN - (void) fprintf(el->el_errfile, - "term_deletechars: num is riduculous: %d\r\n", num); -#endif /* DEBUG_SCREEN */ - return; - } - if (GoodStr(T_DC)) /* if I have multiple delete */ - if ((num > 1) || !GoodStr(T_dc)) { /* if dc would be more - * expen. */ - term_tputs(el, tgoto(Str(T_DC), num, num), num); - return; - } - if (GoodStr(T_dm)) /* if I have delete mode */ - term_tputs(el, Str(T_dm), 1); - - if (GoodStr(T_dc)) /* else do one at a time */ - while (num--) - term_tputs(el, Str(T_dc), 1); - - if (GoodStr(T_ed)) /* if I have delete mode */ - term_tputs(el, Str(T_ed), 1); -} - - -/* term_insertwrite(): - * Puts terminal in insert character mode or inserts num - * characters in the line - * Assumes MB_FILL_CHARs are present to keep column count correct - */ -protected void -term_insertwrite(EditLine *el, Char *cp, int num) -{ - if (num <= 0) - return; - if (!EL_CAN_INSERT) { -#ifdef DEBUG_EDIT - (void) fprintf(el->el_errfile, " ERROR: cannot insert \n"); -#endif /* DEBUG_EDIT */ - return; - } - if (num > el->el_term.t_size.h) { -#ifdef DEBUG_SCREEN - (void) fprintf(el->el_errfile, - "StartInsert: num is riduculous: %d\r\n", num); -#endif /* DEBUG_SCREEN */ - return; - } - if (GoodStr(T_IC)) /* if I have multiple insert */ - if ((num > 1) || !GoodStr(T_ic)) { - /* if ic would be more expensive */ - term_tputs(el, tgoto(Str(T_IC), num, num), num); - term_overwrite(el, cp, (size_t)num); - /* this updates el_cursor.h */ - return; - } - if (GoodStr(T_im) && GoodStr(T_ei)) { /* if I have insert mode */ - term_tputs(el, Str(T_im), 1); - - el->el_cursor.h += num; - do - term__putc(el, *cp++); - while (--num); - - if (GoodStr(T_ip)) /* have to make num chars insert */ - term_tputs(el, Str(T_ip), 1); - - term_tputs(el, Str(T_ei), 1); - return; - } - do { - if (GoodStr(T_ic)) /* have to make num chars insert */ - term_tputs(el, Str(T_ic), 1); - - term__putc(el, *cp++); - - el->el_cursor.h++; - - if (GoodStr(T_ip)) /* have to make num chars insert */ - term_tputs(el, Str(T_ip), 1); - /* pad the inserted char */ - - } while (--num); -} - - -/* term_clear_EOL(): - * clear to end of line. There are num characters to clear - */ -protected void -term_clear_EOL(EditLine *el, int num) -{ - int i; - - if (EL_CAN_CEOL && GoodStr(T_ce)) - term_tputs(el, Str(T_ce), 1); - else { - for (i = 0; i < num; i++) - term__putc(el, ' '); - el->el_cursor.h += num; /* have written num spaces */ - } -} - - -/* term_clear_screen(): - * Clear the screen - */ -protected void -term_clear_screen(EditLine *el) -{ /* clear the whole screen and home */ - - if (GoodStr(T_cl)) - /* send the clear screen code */ - term_tputs(el, Str(T_cl), Val(T_li)); - else if (GoodStr(T_ho) && GoodStr(T_cd)) { - term_tputs(el, Str(T_ho), Val(T_li)); /* home */ - /* clear to bottom of screen */ - term_tputs(el, Str(T_cd), Val(T_li)); - } else { - term__putc(el, '\r'); - term__putc(el, '\n'); - } -} - - -/* term_beep(): - * Beep the way the terminal wants us - */ -protected void -term_beep(EditLine *el) -{ - if (GoodStr(T_bl)) - /* what termcap says we should use */ - term_tputs(el, Str(T_bl), 1); - else - term__putc(el, '\007'); /* an ASCII bell; ^G */ -} - - -#ifdef notdef -/* term_clear_to_bottom(): - * Clear to the bottom of the screen - */ -protected void -term_clear_to_bottom(EditLine *el) -{ - if (GoodStr(T_cd)) - term_tputs(el, Str(T_cd), Val(T_li)); - else if (GoodStr(T_ce)) - term_tputs(el, Str(T_ce), Val(T_li)); -} -#endif - -protected void -term_get(EditLine *el, const char **term) -{ - *term = el->el_term.t_name; -} - - -/* term_set(): - * Read in the terminal capabilities from the requested terminal - */ -protected int -term_set(EditLine *el, const char *term) -{ - int i; - char buf[TC_BUFSIZE]; - char *area; - const struct termcapstr *t; - sigset_t oset, nset; - int lins, cols; - - (void) sigemptyset(&nset); - (void) sigaddset(&nset, SIGWINCH); - (void) sigprocmask(SIG_BLOCK, &nset, &oset); - - area = buf; - - - if (term == NULL) - term = getenv("TERM"); - - if (!term || !term[0]) - term = "dumb"; - - if (strcmp(term, "emacs") == 0) - el->el_flags |= EDIT_DISABLED; - - memset(el->el_term.t_cap, 0, TC_BUFSIZE); - - i = tgetent(el->el_term.t_cap, term); - - if (i <= 0) { - if (i == -1) - (void) fprintf(el->el_errfile, - "Cannot read termcap database;\n"); - else if (i == 0) - (void) fprintf(el->el_errfile, - "No entry for terminal type \"%s\";\n", term); - (void) fprintf(el->el_errfile, - "using dumb terminal settings.\n"); - Val(T_co) = 80; /* do a dumb terminal */ - Val(T_pt) = Val(T_km) = Val(T_li) = 0; - Val(T_xt) = Val(T_MT); - for (t = tstr; t->name != NULL; t++) - term_alloc(el, t, NULL); - } else { - /* auto/magic margins */ - Val(T_am) = tgetflag("am"); - Val(T_xn) = tgetflag("xn"); - /* Can we tab */ - Val(T_pt) = tgetflag("pt"); - Val(T_xt) = tgetflag("xt"); - /* do we have a meta? */ - Val(T_km) = tgetflag("km"); - Val(T_MT) = tgetflag("MT"); - /* Get the size */ - Val(T_co) = tgetnum("co"); - Val(T_li) = tgetnum("li"); - for (t = tstr; t->name != NULL; t++) { - /* XXX: some systems' tgetstr needs non const */ - term_alloc(el, t, tgetstr(strchr(t->name, *t->name), - &area)); - } - } - - if (Val(T_co) < 2) - Val(T_co) = 80; /* just in case */ - if (Val(T_li) < 1) - Val(T_li) = 24; - - el->el_term.t_size.v = Val(T_co); - el->el_term.t_size.h = Val(T_li); - - term_setflags(el); - - /* get the correct window size */ - (void) term_get_size(el, &lins, &cols); - if (term_change_size(el, lins, cols) == -1) - return (-1); - (void) sigprocmask(SIG_SETMASK, &oset, NULL); - term_bind_arrow(el); - el->el_term.t_name = term; - return (i <= 0 ? -1 : 0); -} - - -/* term_get_size(): - * Return the new window size in lines and cols, and - * true if the size was changed. - */ -protected int -term_get_size(EditLine *el, int *lins, int *cols) -{ - - *cols = Val(T_co); - *lins = Val(T_li); - -#ifdef TIOCGWINSZ - { - struct winsize ws; - if (ioctl(el->el_infd, TIOCGWINSZ, (ioctl_t) & ws) != -1) { - if (ws.ws_col) - *cols = ws.ws_col; - if (ws.ws_row) - *lins = ws.ws_row; - } - } -#endif -#ifdef TIOCGSIZE - { - struct ttysize ts; - if (ioctl(el->el_infd, TIOCGSIZE, (ioctl_t) & ts) != -1) { - if (ts.ts_cols) - *cols = ts.ts_cols; - if (ts.ts_lines) - *lins = ts.ts_lines; - } - } -#endif - return (Val(T_co) != *cols || Val(T_li) != *lins); -} - - -/* term_change_size(): - * Change the size of the terminal - */ -protected int -term_change_size(EditLine *el, int lins, int cols) -{ - /* - * Just in case - */ - Val(T_co) = (cols < 2) ? 80 : cols; - Val(T_li) = (lins < 1) ? 24 : lins; - - /* re-make display buffers */ - if (term_rebuffer_display(el) == -1) - return (-1); - re_clear_display(el); - return (0); -} - - -/* term_init_arrow(): - * Initialize the arrow key bindings from termcap - */ -private void -term_init_arrow(EditLine *el) -{ - fkey_t *arrow = el->el_term.t_fkey; - - arrow[A_K_DN].name = STR("down"); - arrow[A_K_DN].key = T_kd; - arrow[A_K_DN].fun.cmd = ED_NEXT_HISTORY; - arrow[A_K_DN].type = XK_CMD; - - arrow[A_K_UP].name = STR("up"); - arrow[A_K_UP].key = T_ku; - arrow[A_K_UP].fun.cmd = ED_PREV_HISTORY; - arrow[A_K_UP].type = XK_CMD; - - arrow[A_K_LT].name = STR("left"); - arrow[A_K_LT].key = T_kl; - arrow[A_K_LT].fun.cmd = ED_PREV_CHAR; - arrow[A_K_LT].type = XK_CMD; - - arrow[A_K_RT].name = STR("right"); - arrow[A_K_RT].key = T_kr; - arrow[A_K_RT].fun.cmd = ED_NEXT_CHAR; - arrow[A_K_RT].type = XK_CMD; - - arrow[A_K_HO].name = STR("home"); - arrow[A_K_HO].key = T_kh; - arrow[A_K_HO].fun.cmd = ED_MOVE_TO_BEG; - arrow[A_K_HO].type = XK_CMD; - - arrow[A_K_EN].name = STR("end"); - arrow[A_K_EN].key = T_at7; - arrow[A_K_EN].fun.cmd = ED_MOVE_TO_END; - arrow[A_K_EN].type = XK_CMD; -} - - -/* term_reset_arrow(): - * Reset arrow key bindings - */ -private void -term_reset_arrow(EditLine *el) -{ - fkey_t *arrow = el->el_term.t_fkey; - static const Char strA[] = {033, '[', 'A', '\0'}; - static const Char strB[] = {033, '[', 'B', '\0'}; - static const Char strC[] = {033, '[', 'C', '\0'}; - static const Char strD[] = {033, '[', 'D', '\0'}; - static const Char strH[] = {033, '[', 'H', '\0'}; - static const Char strF[] = {033, '[', 'F', '\0'}; - static const Char stOA[] = {033, 'O', 'A', '\0'}; - static const Char stOB[] = {033, 'O', 'B', '\0'}; - static const Char stOC[] = {033, 'O', 'C', '\0'}; - static const Char stOD[] = {033, 'O', 'D', '\0'}; - static const Char stOH[] = {033, 'O', 'H', '\0'}; - static const Char stOF[] = {033, 'O', 'F', '\0'}; - - key_add(el, strA, &arrow[A_K_UP].fun, arrow[A_K_UP].type); - key_add(el, strB, &arrow[A_K_DN].fun, arrow[A_K_DN].type); - key_add(el, strC, &arrow[A_K_RT].fun, arrow[A_K_RT].type); - key_add(el, strD, &arrow[A_K_LT].fun, arrow[A_K_LT].type); - key_add(el, strH, &arrow[A_K_HO].fun, arrow[A_K_HO].type); - key_add(el, strF, &arrow[A_K_EN].fun, arrow[A_K_EN].type); - key_add(el, stOA, &arrow[A_K_UP].fun, arrow[A_K_UP].type); - key_add(el, stOB, &arrow[A_K_DN].fun, arrow[A_K_DN].type); - key_add(el, stOC, &arrow[A_K_RT].fun, arrow[A_K_RT].type); - key_add(el, stOD, &arrow[A_K_LT].fun, arrow[A_K_LT].type); - key_add(el, stOH, &arrow[A_K_HO].fun, arrow[A_K_HO].type); - key_add(el, stOF, &arrow[A_K_EN].fun, arrow[A_K_EN].type); - - if (el->el_map.type == MAP_VI) { - key_add(el, &strA[1], &arrow[A_K_UP].fun, arrow[A_K_UP].type); - key_add(el, &strB[1], &arrow[A_K_DN].fun, arrow[A_K_DN].type); - key_add(el, &strC[1], &arrow[A_K_RT].fun, arrow[A_K_RT].type); - key_add(el, &strD[1], &arrow[A_K_LT].fun, arrow[A_K_LT].type); - key_add(el, &strH[1], &arrow[A_K_HO].fun, arrow[A_K_HO].type); - key_add(el, &strF[1], &arrow[A_K_EN].fun, arrow[A_K_EN].type); - key_add(el, &stOA[1], &arrow[A_K_UP].fun, arrow[A_K_UP].type); - key_add(el, &stOB[1], &arrow[A_K_DN].fun, arrow[A_K_DN].type); - key_add(el, &stOC[1], &arrow[A_K_RT].fun, arrow[A_K_RT].type); - key_add(el, &stOD[1], &arrow[A_K_LT].fun, arrow[A_K_LT].type); - key_add(el, &stOH[1], &arrow[A_K_HO].fun, arrow[A_K_HO].type); - key_add(el, &stOF[1], &arrow[A_K_EN].fun, arrow[A_K_EN].type); - } -} - - -/* term_set_arrow(): - * Set an arrow key binding - */ -protected int -term_set_arrow(EditLine *el, const Char *name, key_value_t *fun, int type) -{ - fkey_t *arrow = el->el_term.t_fkey; - int i; - - for (i = 0; i < A_K_NKEYS; i++) - if (Strcmp(name, arrow[i].name) == 0) { - arrow[i].fun = *fun; - arrow[i].type = type; - return (0); - } - return (-1); -} - - -/* term_clear_arrow(): - * Clear an arrow key binding - */ -protected int -term_clear_arrow(EditLine *el, const Char *name) -{ - fkey_t *arrow = el->el_term.t_fkey; - int i; - - for (i = 0; i < A_K_NKEYS; i++) - if (Strcmp(name, arrow[i].name) == 0) { - arrow[i].type = XK_NOD; - return (0); - } - return (-1); -} - - -/* term_print_arrow(): - * Print the arrow key bindings - */ -protected void -term_print_arrow(EditLine *el, const Char *name) -{ - int i; - fkey_t *arrow = el->el_term.t_fkey; - - for (i = 0; i < A_K_NKEYS; i++) - if (*name == '\0' || Strcmp(name, arrow[i].name) == 0) - if (arrow[i].type != XK_NOD) - key_kprint(el, arrow[i].name, &arrow[i].fun, - arrow[i].type); -} - - -/* term_bind_arrow(): - * Bind the arrow keys - */ -protected void -term_bind_arrow(EditLine *el) -{ - el_action_t *map; - const el_action_t *dmap; - int i, j; - char *p; - fkey_t *arrow = el->el_term.t_fkey; - - /* Check if the components needed are initialized */ - if (el->el_term.t_buf == NULL || el->el_map.key == NULL) - return; - - map = el->el_map.type == MAP_VI ? el->el_map.alt : el->el_map.key; - dmap = el->el_map.type == MAP_VI ? el->el_map.vic : el->el_map.emacs; - - term_reset_arrow(el); - - for (i = 0; i < A_K_NKEYS; i++) { - Char wt_str[VISUAL_WIDTH_MAX]; - Char *px; - size_t n; - - p = el->el_term.t_str[arrow[i].key]; - if (!p || !*p) - continue; - for (n = 0; n < VISUAL_WIDTH_MAX && p[n]; ++n) - wt_str[n] = p[n]; - while (n < VISUAL_WIDTH_MAX) - wt_str[n++] = '\0'; - px = wt_str; - j = (unsigned char) *p; - /* - * Assign the arrow keys only if: - * - * 1. They are multi-character arrow keys and the user - * has not re-assigned the leading character, or - * has re-assigned the leading character to be - * ED_SEQUENCE_LEAD_IN - * 2. They are single arrow keys pointing to an - * unassigned key. - */ - if (arrow[i].type == XK_NOD) - key_clear(el, map, px); - else { - if (p[1] && (dmap[j] == map[j] || - map[j] == ED_SEQUENCE_LEAD_IN)) { - key_add(el, px, &arrow[i].fun, - arrow[i].type); - map[j] = ED_SEQUENCE_LEAD_IN; - } else if (map[j] == ED_UNASSIGNED) { - key_clear(el, map, px); - if (arrow[i].type == XK_CMD) - map[j] = arrow[i].fun.cmd; - else - key_add(el, px, &arrow[i].fun, - arrow[i].type); - } - } - } -} - -/* term_putc(): - * Add a character - */ -private int -term_putc(int c) -{ - if (term_outfile == NULL) - return -1; - return fputc(c, term_outfile); -} - -private void -term_tputs(EditLine *el, const char *cap, int affcnt) -{ -#ifdef _REENTRANT - pthread_mutex_lock(&term_mutex); -#endif - term_outfile = el->el_outfile; - (void)tputs(cap, affcnt, term_putc); -#ifdef _REENTRANT - pthread_mutex_unlock(&term_mutex); -#endif -} - -/* term__putc(): - * Add a character - */ -protected int -term__putc(EditLine *el, Int c) -{ - char buf[MB_LEN_MAX +1]; - ssize_t i; - if (c == MB_FILL_CHAR) - return 0; - i = ct_encode_char(buf, MB_LEN_MAX, c); - if (i <= 0) - return (int)i; - buf[i] = '\0'; - return fputs(buf, el->el_outfile); -} - -/* term__flush(): - * Flush output - */ -protected void -term__flush(EditLine *el) -{ - - (void) fflush(el->el_outfile); -} - -/* term_writec(): - * Write the given character out, in a human readable form - */ -protected void -term_writec(EditLine *el, Int c) -{ - Char visbuf[VISUAL_WIDTH_MAX +1]; - ssize_t vcnt = ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c); - visbuf[vcnt] = '\0'; - term_overwrite(el, visbuf, (size_t)vcnt); - term__flush(el); -} - - -/* term_telltc(): - * Print the current termcap characteristics - */ -protected int -/*ARGSUSED*/ -term_telltc(EditLine *el, int argc __attribute__((__unused__)), - const Char **argv __attribute__((__unused__))) -{ - const struct termcapstr *t; - char **ts; - - (void) fprintf(el->el_outfile, "\n\tYour terminal has the\n"); - (void) fprintf(el->el_outfile, "\tfollowing characteristics:\n\n"); - (void) fprintf(el->el_outfile, "\tIt has %d columns and %d lines\n", - Val(T_co), Val(T_li)); - (void) fprintf(el->el_outfile, - "\tIt has %s meta key\n", EL_HAS_META ? "a" : "no"); - (void) fprintf(el->el_outfile, - "\tIt can%suse tabs\n", EL_CAN_TAB ? " " : "not "); - (void) fprintf(el->el_outfile, "\tIt %s automatic margins\n", - EL_HAS_AUTO_MARGINS ? "has" : "does not have"); - if (EL_HAS_AUTO_MARGINS) - (void) fprintf(el->el_outfile, "\tIt %s magic margins\n", - EL_HAS_MAGIC_MARGINS ? "has" : "does not have"); - - for (t = tstr, ts = el->el_term.t_str; t->name != NULL; t++, ts++) { - const char *ub; - if (*ts && **ts) { - ub = ct_encode_string(ct_visual_string( - ct_decode_string(*ts, &el->el_scratch)), - &el->el_scratch); - } else { - ub = "(empty)"; - } - (void) fprintf(el->el_outfile, "\t%25s (%s) == %s\n", - t->long_name, t->name, ub); - } - (void) fputc('\n', el->el_outfile); - return (0); -} - - -/* term_settc(): - * Change the current terminal characteristics - */ -protected int -/*ARGSUSED*/ -term_settc(EditLine *el, int argc __attribute__((__unused__)), - const Char **argv) -{ - const struct termcapstr *ts; - const struct termcapval *tv; - char what[8], how[8]; - - if (argv == NULL || argv[1] == NULL || argv[2] == NULL) - return -1; - - strncpy(what, ct_encode_string(argv[1], &el->el_scratch), sizeof(what)); - what[sizeof(what) - 1] = '\0'; - strncpy(how, ct_encode_string(argv[2], &el->el_scratch), sizeof(how)); - how[sizeof(how) - 1] = '\0'; - - /* - * Do the strings first - */ - for (ts = tstr; ts->name != NULL; ts++) - if (strcmp(ts->name, what) == 0) - break; - - if (ts->name != NULL) { - term_alloc(el, ts, how); - term_setflags(el); - return 0; - } - /* - * Do the numeric ones second - */ - for (tv = tval; tv->name != NULL; tv++) - if (strcmp(tv->name, what) == 0) - break; - - if (tv->name != NULL) - return -1; - - if (tv == &tval[T_pt] || tv == &tval[T_km] || - tv == &tval[T_am] || tv == &tval[T_xn]) { - if (strcmp(how, "yes") == 0) - el->el_term.t_val[tv - tval] = 1; - else if (strcmp(how, "no") == 0) - el->el_term.t_val[tv - tval] = 0; - else { - (void) fprintf(el->el_errfile, - "" FSTR ": Bad value `%s'.\n", argv[0], how); - return -1; - } - term_setflags(el); - if (term_change_size(el, Val(T_li), Val(T_co)) == -1) - return -1; - return 0; - } else { - long i; - char *ep; - - i = strtol(how, &ep, 10); - if (*ep != '\0') { - (void) fprintf(el->el_errfile, - "" FSTR ": Bad value `%s'.\n", argv[0], how); - return -1; - } - el->el_term.t_val[tv - tval] = (int) i; - el->el_term.t_size.v = Val(T_co); - el->el_term.t_size.h = Val(T_li); - if (tv == &tval[T_co] || tv == &tval[T_li]) - if (term_change_size(el, Val(T_li), Val(T_co)) - == -1) - return -1; - return 0; - } -} - - -/* term_gettc(): - * Get the current terminal characteristics - */ -protected int -/*ARGSUSED*/ -term_gettc(EditLine *el, int argc __attribute__((__unused__)), char **argv) -{ - const struct termcapstr *ts; - const struct termcapval *tv; - char *what; - void *how; - - if (argv == NULL || argv[1] == NULL || argv[2] == NULL) - return (-1); - - what = argv[1]; - how = argv[2]; - - /* - * Do the strings first - */ - for (ts = tstr; ts->name != NULL; ts++) - if (strcmp(ts->name, what) == 0) - break; - - if (ts->name != NULL) { - *(char **)how = el->el_term.t_str[ts - tstr]; - return 0; - } - /* - * Do the numeric ones second - */ - for (tv = tval; tv->name != NULL; tv++) - if (strcmp(tv->name, what) == 0) - break; - - if (tv->name == NULL) - return -1; - - if (tv == &tval[T_pt] || tv == &tval[T_km] || - tv == &tval[T_am] || tv == &tval[T_xn]) { - static char yes[] = "yes"; - static char no[] = "no"; - if (el->el_term.t_val[tv - tval]) - *(char **)how = yes; - else - *(char **)how = no; - return 0; - } else { - *(int *)how = el->el_term.t_val[tv - tval]; - return 0; - } -} - -/* term_echotc(): - * Print the termcap string out with variable substitution - */ -protected int -/*ARGSUSED*/ -term_echotc(EditLine *el, int argc __attribute__((__unused__)), - const Char **argv) -{ - char *cap, *scap; - Char *ep; - int arg_need, arg_cols, arg_rows; - int verbose = 0, silent = 0; - char *area; - static const char fmts[] = "%s\n", fmtd[] = "%d\n"; - const struct termcapstr *t; - char buf[TC_BUFSIZE]; - long i; - - area = buf; - - if (argv == NULL || argv[1] == NULL) - return (-1); - argv++; - - if (argv[0][0] == '-') { - switch (argv[0][1]) { - case 'v': - verbose = 1; - break; - case 's': - silent = 1; - break; - default: - /* stderror(ERR_NAME | ERR_TCUSAGE); */ - break; - } - argv++; - } - if (!*argv || *argv[0] == '\0') - return (0); - if (Strcmp(*argv, STR("tabs")) == 0) { - (void) fprintf(el->el_outfile, fmts, EL_CAN_TAB ? "yes" : "no"); - return (0); - } else if (Strcmp(*argv, STR("meta")) == 0) { - (void) fprintf(el->el_outfile, fmts, Val(T_km) ? "yes" : "no"); - return (0); - } else if (Strcmp(*argv, STR("xn")) == 0) { - (void) fprintf(el->el_outfile, fmts, EL_HAS_MAGIC_MARGINS ? - "yes" : "no"); - return (0); - } else if (Strcmp(*argv, STR("am")) == 0) { - (void) fprintf(el->el_outfile, fmts, EL_HAS_AUTO_MARGINS ? - "yes" : "no"); - return (0); - } else if (Strcmp(*argv, STR("baud")) == 0) { -#ifdef notdef - int i; - - for (i = 0; baud_rate[i].b_name != NULL; i++) - if (el->el_tty.t_speed == baud_rate[i].b_rate) { - (void) fprintf(el->el_outfile, fmts, - baud_rate[i].b_name); - return (0); - } - (void) fprintf(el->el_outfile, fmtd, 0); -#else - (void) fprintf(el->el_outfile, fmtd, (int)el->el_tty.t_speed); -#endif - return (0); - } else if (Strcmp(*argv, STR("rows")) == 0 || - Strcmp(*argv, STR("lines")) == 0) { - (void) fprintf(el->el_outfile, fmtd, Val(T_li)); - return (0); - } else if (Strcmp(*argv, STR("cols")) == 0) { - (void) fprintf(el->el_outfile, fmtd, Val(T_co)); - return (0); - } - /* - * Try to use our local definition first - */ - scap = NULL; - for (t = tstr; t->name != NULL; t++) - if (strcmp(t->name, - ct_encode_string(*argv, &el->el_scratch)) == 0) { - scap = el->el_term.t_str[t - tstr]; - break; - } - if (t->name == NULL) { - /* XXX: some systems' tgetstr needs non const */ - scap = tgetstr(ct_encode_string(*argv, &el->el_scratch), &area); - } - if (!scap || scap[0] == '\0') { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Termcap parameter `" FSTR "' not found.\n", - *argv); - return (-1); - } - /* - * Count home many values we need for this capability. - */ - for (cap = scap, arg_need = 0; *cap; cap++) - if (*cap == '%') - switch (*++cap) { - case 'd': - case '2': - case '3': - case '.': - case '+': - arg_need++; - break; - case '%': - case '>': - case 'i': - case 'r': - case 'n': - case 'B': - case 'D': - break; - default: - /* - * hpux has lot's of them... - */ - if (verbose) - (void) fprintf(el->el_errfile, - "echotc: Warning: unknown termcap %% `%c'.\n", - *cap); - /* This is bad, but I won't complain */ - break; - } - - switch (arg_need) { - case 0: - argv++; - if (*argv && *argv[0]) { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Warning: Extra argument `" FSTR "'.\n", - *argv); - return (-1); - } - term_tputs(el, scap, 1); - break; - case 1: - argv++; - if (!*argv || *argv[0] == '\0') { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Warning: Missing argument.\n"); - return (-1); - } - arg_cols = 0; - i = Strtol(*argv, &ep, 10); - if (*ep != '\0' || i < 0) { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Bad value `" FSTR "' for rows.\n", - *argv); - return (-1); - } - arg_rows = (int) i; - argv++; - if (*argv && *argv[0]) { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Warning: Extra argument `" FSTR "'.\n", - *argv); - return (-1); - } - term_tputs(el, tgoto(scap, arg_cols, arg_rows), 1); - break; - default: - /* This is wrong, but I will ignore it... */ - if (verbose) - (void) fprintf(el->el_errfile, - "echotc: Warning: Too many required arguments (%d).\n", - arg_need); - /* FALLTHROUGH */ - case 2: - argv++; - if (!*argv || *argv[0] == '\0') { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Warning: Missing argument.\n"); - return (-1); - } - i = Strtol(*argv, &ep, 10); - if (*ep != '\0' || i < 0) { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Bad value `" FSTR "' for cols.\n", - *argv); - return (-1); - } - arg_cols = (int) i; - argv++; - if (!*argv || *argv[0] == '\0') { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Warning: Missing argument.\n"); - return (-1); - } - i = Strtol(*argv, &ep, 10); - if (*ep != '\0' || i < 0) { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Bad value `" FSTR "' for rows.\n", - *argv); - return (-1); - } - arg_rows = (int) i; - if (*ep != '\0') { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Bad value `" FSTR "'.\n", *argv); - return (-1); - } - argv++; - if (*argv && *argv[0]) { - if (!silent) - (void) fprintf(el->el_errfile, - "echotc: Warning: Extra argument `" FSTR "'.\n", - *argv); - return (-1); - } - term_tputs(el, tgoto(scap, arg_cols, arg_rows), arg_rows); - break; - } - return (0); -} diff --git a/kerberosV/src/lib/libedit/src/tokenizer.c b/kerberosV/src/lib/libedit/src/tokenizer.c deleted file mode 100644 index b1d5278d26c..00000000000 --- a/kerberosV/src/lib/libedit/src/tokenizer.c +++ /dev/null @@ -1,453 +0,0 @@ -/* $NetBSD: tokenizer.c,v 1.18 2010/01/03 18:27:10 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#ifndef NARROWCHAR -#include "config.h" -#endif - -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)tokenizer.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: tokenizer.c,v 1.18 2010/01/03 18:27:10 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* We build this file twice, once as NARROW, once as WIDE. */ -/* - * tokenize.c: Bourne shell like tokenizer - */ -#include -#include -#include "histedit.h" -#include "chartype.h" - -typedef enum { - Q_none, Q_single, Q_double, Q_one, Q_doubleone -} quote_t; - -#define TOK_KEEP 1 -#define TOK_EAT 2 - -#define WINCR 20 -#define AINCR 10 - -#define IFS STR("\t \n") - -#define tok_malloc(a) malloc(a) -#define tok_free(a) free(a) -#define tok_realloc(a, b) realloc(a, b) -#define tok_strdup(a) Strdup(a) - - -struct TYPE(tokenizer) { - Char *ifs; /* In field separator */ - int argc, amax; /* Current and maximum number of args */ - Char **argv; /* Argument list */ - Char *wptr, *wmax; /* Space and limit on the word buffer */ - Char *wstart; /* Beginning of next word */ - Char *wspace; /* Space of word buffer */ - quote_t quote; /* Quoting state */ - int flags; /* flags; */ -}; - - -private void FUN(tok,finish)(TYPE(Tokenizer) *); - - -/* FUN(tok,finish)(): - * Finish a word in the tokenizer. - */ -private void -FUN(tok,finish)(TYPE(Tokenizer) *tok) -{ - - *tok->wptr = '\0'; - if ((tok->flags & TOK_KEEP) || tok->wptr != tok->wstart) { - tok->argv[tok->argc++] = tok->wstart; - tok->argv[tok->argc] = NULL; - tok->wstart = ++tok->wptr; - } - tok->flags &= ~TOK_KEEP; -} - - -/* FUN(tok,init)(): - * Initialize the tokenizer - */ -public TYPE(Tokenizer) * -FUN(tok,init)(const Char *ifs) -{ - TYPE(Tokenizer) *tok = tok_malloc(sizeof(TYPE(Tokenizer))); - - if (tok == NULL) - return NULL; - tok->ifs = tok_strdup(ifs ? ifs : IFS); - if (tok->ifs == NULL) { - tok_free((ptr_t)tok); - return NULL; - } - tok->argc = 0; - tok->amax = AINCR; - tok->argv = tok_malloc(sizeof(*tok->argv) * tok->amax); - if (tok->argv == NULL) { - tok_free((ptr_t)tok->ifs); - tok_free((ptr_t)tok); - return NULL; - } - tok->argv[0] = NULL; - tok->wspace = tok_malloc(WINCR * sizeof(*tok->wspace)); - if (tok->wspace == NULL) { - tok_free((ptr_t)tok->argv); - tok_free((ptr_t)tok->ifs); - tok_free((ptr_t)tok); - return NULL; - } - tok->wmax = tok->wspace + WINCR; - tok->wstart = tok->wspace; - tok->wptr = tok->wspace; - tok->flags = 0; - tok->quote = Q_none; - - return (tok); -} - - -/* FUN(tok,reset)(): - * Reset the tokenizer - */ -public void -FUN(tok,reset)(TYPE(Tokenizer) *tok) -{ - - tok->argc = 0; - tok->wstart = tok->wspace; - tok->wptr = tok->wspace; - tok->flags = 0; - tok->quote = Q_none; -} - - -/* FUN(tok,end)(): - * Clean up - */ -public void -FUN(tok,end)(TYPE(Tokenizer) *tok) -{ - - tok_free((ptr_t) tok->ifs); - tok_free((ptr_t) tok->wspace); - tok_free((ptr_t) tok->argv); - tok_free((ptr_t) tok); -} - - - -/* FUN(tok,line)(): - * Bourne shell (sh(1)) like tokenizing - * Arguments: - * tok current tokenizer state (setup with FUN(tok,init)()) - * line line to parse - * Returns: - * -1 Internal error - * 3 Quoted return - * 2 Unmatched double quote - * 1 Unmatched single quote - * 0 Ok - * Modifies (if return value is 0): - * argc number of arguments - * argv argument array - * cursorc if !NULL, argv element containing cursor - * cursorv if !NULL, offset in argv[cursorc] of cursor - */ -public int -FUN(tok,line)(TYPE(Tokenizer) *tok, const TYPE(LineInfo) *line, - int *argc, const Char ***argv, int *cursorc, int *cursoro) -{ - const Char *ptr; - int cc, co; - - cc = co = -1; - ptr = line->buffer; - for (ptr = line->buffer; ;ptr++) { - if (ptr >= line->lastchar) - ptr = STR(""); - if (ptr == line->cursor) { - cc = tok->argc; - co = (int)(tok->wptr - tok->wstart); - } - switch (*ptr) { - case '\'': - tok->flags |= TOK_KEEP; - tok->flags &= ~TOK_EAT; - switch (tok->quote) { - case Q_none: - tok->quote = Q_single; /* Enter single quote - * mode */ - break; - - case Q_single: /* Exit single quote mode */ - tok->quote = Q_none; - break; - - case Q_one: /* Quote this ' */ - tok->quote = Q_none; - *tok->wptr++ = *ptr; - break; - - case Q_double: /* Stay in double quote mode */ - *tok->wptr++ = *ptr; - break; - - case Q_doubleone: /* Quote this ' */ - tok->quote = Q_double; - *tok->wptr++ = *ptr; - break; - - default: - return (-1); - } - break; - - case '"': - tok->flags &= ~TOK_EAT; - tok->flags |= TOK_KEEP; - switch (tok->quote) { - case Q_none: /* Enter double quote mode */ - tok->quote = Q_double; - break; - - case Q_double: /* Exit double quote mode */ - tok->quote = Q_none; - break; - - case Q_one: /* Quote this " */ - tok->quote = Q_none; - *tok->wptr++ = *ptr; - break; - - case Q_single: /* Stay in single quote mode */ - *tok->wptr++ = *ptr; - break; - - case Q_doubleone: /* Quote this " */ - tok->quote = Q_double; - *tok->wptr++ = *ptr; - break; - - default: - return (-1); - } - break; - - case '\\': - tok->flags |= TOK_KEEP; - tok->flags &= ~TOK_EAT; - switch (tok->quote) { - case Q_none: /* Quote next character */ - tok->quote = Q_one; - break; - - case Q_double: /* Quote next character */ - tok->quote = Q_doubleone; - break; - - case Q_one: /* Quote this, restore state */ - *tok->wptr++ = *ptr; - tok->quote = Q_none; - break; - - case Q_single: /* Stay in single quote mode */ - *tok->wptr++ = *ptr; - break; - - case Q_doubleone: /* Quote this \ */ - tok->quote = Q_double; - *tok->wptr++ = *ptr; - break; - - default: - return (-1); - } - break; - - case '\n': - tok->flags &= ~TOK_EAT; - switch (tok->quote) { - case Q_none: - goto tok_line_outok; - - case Q_single: - case Q_double: - *tok->wptr++ = *ptr; /* Add the return */ - break; - - case Q_doubleone: /* Back to double, eat the '\n' */ - tok->flags |= TOK_EAT; - tok->quote = Q_double; - break; - - case Q_one: /* No quote, more eat the '\n' */ - tok->flags |= TOK_EAT; - tok->quote = Q_none; - break; - - default: - return (0); - } - break; - - case '\0': - switch (tok->quote) { - case Q_none: - /* Finish word and return */ - if (tok->flags & TOK_EAT) { - tok->flags &= ~TOK_EAT; - return (3); - } - goto tok_line_outok; - - case Q_single: - return (1); - - case Q_double: - return (2); - - case Q_doubleone: - tok->quote = Q_double; - *tok->wptr++ = *ptr; - break; - - case Q_one: - tok->quote = Q_none; - *tok->wptr++ = *ptr; - break; - - default: - return (-1); - } - break; - - default: - tok->flags &= ~TOK_EAT; - switch (tok->quote) { - case Q_none: - if (Strchr(tok->ifs, *ptr) != NULL) - FUN(tok,finish)(tok); - else - *tok->wptr++ = *ptr; - break; - - case Q_single: - case Q_double: - *tok->wptr++ = *ptr; - break; - - - case Q_doubleone: - *tok->wptr++ = '\\'; - tok->quote = Q_double; - *tok->wptr++ = *ptr; - break; - - case Q_one: - tok->quote = Q_none; - *tok->wptr++ = *ptr; - break; - - default: - return (-1); - - } - break; - } - - if (tok->wptr >= tok->wmax - 4) { - size_t size = tok->wmax - tok->wspace + WINCR; - Char *s = tok_realloc(tok->wspace, - size * sizeof(*s)); - if (s == NULL) - return (-1); - - if (s != tok->wspace) { - int i; - for (i = 0; i < tok->argc; i++) { - tok->argv[i] = - (tok->argv[i] - tok->wspace) + s; - } - tok->wptr = (tok->wptr - tok->wspace) + s; - tok->wstart = (tok->wstart - tok->wspace) + s; - tok->wspace = s; - } - tok->wmax = s + size; - } - if (tok->argc >= tok->amax - 4) { - Char **p; - tok->amax += AINCR; - p = tok_realloc(tok->argv, tok->amax * sizeof(*p)); - if (p == NULL) - return (-1); - tok->argv = p; - } - } - tok_line_outok: - if (cc == -1 && co == -1) { - cc = tok->argc; - co = (int)(tok->wptr - tok->wstart); - } - if (cursorc != NULL) - *cursorc = cc; - if (cursoro != NULL) - *cursoro = co; - FUN(tok,finish)(tok); - *argv = (const Char **)tok->argv; - *argc = tok->argc; - return (0); -} - -/* FUN(tok,str)(): - * Simpler version of tok_line, taking a NUL terminated line - * and splitting into words, ignoring cursor state. - */ -public int -FUN(tok,str)(TYPE(Tokenizer) *tok, const Char *line, int *argc, - const Char ***argv) -{ - TYPE(LineInfo) li; - - memset(&li, 0, sizeof(li)); - li.buffer = line; - li.cursor = li.lastchar = Strchr(line, '\0'); - return (FUN(tok,line)(tok, &li, argc, argv, NULL, NULL)); -} diff --git a/kerberosV/src/lib/libedit/src/tty.c b/kerberosV/src/lib/libedit/src/tty.c deleted file mode 100644 index 94d23de2359..00000000000 --- a/kerberosV/src/lib/libedit/src/tty.c +++ /dev/null @@ -1,1357 +0,0 @@ -/* $NetBSD: tty.c,v 1.35 2011/01/28 03:41:52 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: tty.c,v 1.35 2011/01/28 03:41:52 christos Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * tty.c: tty interface stuff - */ -#include -#include -#include /* for isatty */ -#include /* for ffs */ -#include "el.h" -#include "tty.h" - -typedef struct ttymodes_t { - const char *m_name; - unsigned int m_value; - int m_type; -} ttymodes_t; - -typedef struct ttymap_t { - Int nch, och; /* Internal and termio rep of chars */ - el_action_t bind[3]; /* emacs, vi, and vi-cmd */ -} ttymap_t; - - -private const ttyperm_t ttyperm = { - { - {"iflag:", ICRNL, (INLCR | IGNCR)}, - {"oflag:", (OPOST | ONLCR), ONLRET}, - {"cflag:", 0, 0}, - {"lflag:", (ISIG | ICANON | ECHO | ECHOE | ECHOCTL | IEXTEN), - (NOFLSH | ECHONL | EXTPROC | FLUSHO)}, - {"chars:", 0, 0}, - }, - { - {"iflag:", (INLCR | ICRNL), IGNCR}, - {"oflag:", (OPOST | ONLCR), ONLRET}, - {"cflag:", 0, 0}, - {"lflag:", ISIG, - (NOFLSH | ICANON | ECHO | ECHOK | ECHONL | EXTPROC | IEXTEN | FLUSHO)}, - {"chars:", (C_SH(C_MIN) | C_SH(C_TIME) | C_SH(C_SWTCH) | C_SH(C_DSWTCH) | - C_SH(C_SUSP) | C_SH(C_DSUSP) | C_SH(C_EOL) | C_SH(C_DISCARD) | - C_SH(C_PGOFF) | C_SH(C_PAGE) | C_SH(C_STATUS)), 0} - }, - { - {"iflag:", 0, IXON | IXOFF | INLCR | ICRNL}, - {"oflag:", 0, 0}, - {"cflag:", 0, 0}, - {"lflag:", 0, ISIG | IEXTEN}, - {"chars:", 0, 0}, - } -}; - -private const ttychar_t ttychar = { - { - CINTR, CQUIT, CERASE, CKILL, - CEOF, CEOL, CEOL2, CSWTCH, - CDSWTCH, CERASE2, CSTART, CSTOP, - CWERASE, CSUSP, CDSUSP, CREPRINT, - CDISCARD, CLNEXT, CSTATUS, CPAGE, - CPGOFF, CKILL2, CBRK, CMIN, - CTIME - }, - { - CINTR, CQUIT, CERASE, CKILL, - _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, - _POSIX_VDISABLE, CERASE2, CSTART, CSTOP, - _POSIX_VDISABLE, CSUSP, _POSIX_VDISABLE, _POSIX_VDISABLE, - CDISCARD, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, - _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, 1, - 0 - }, - { - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0 - } -}; - -private const ttymap_t tty_map[] = { -#ifdef VERASE - {C_ERASE, VERASE, - {EM_DELETE_PREV_CHAR, VI_DELETE_PREV_CHAR, ED_PREV_CHAR}}, -#endif /* VERASE */ -#ifdef VERASE2 - {C_ERASE2, VERASE2, - {EM_DELETE_PREV_CHAR, VI_DELETE_PREV_CHAR, ED_PREV_CHAR}}, -#endif /* VERASE2 */ -#ifdef VKILL - {C_KILL, VKILL, - {EM_KILL_LINE, VI_KILL_LINE_PREV, ED_UNASSIGNED}}, -#endif /* VKILL */ -#ifdef VKILL2 - {C_KILL2, VKILL2, - {EM_KILL_LINE, VI_KILL_LINE_PREV, ED_UNASSIGNED}}, -#endif /* VKILL2 */ -#ifdef VEOF - {C_EOF, VEOF, - {EM_DELETE_OR_LIST, VI_LIST_OR_EOF, ED_UNASSIGNED}}, -#endif /* VEOF */ -#ifdef VWERASE - {C_WERASE, VWERASE, - {ED_DELETE_PREV_WORD, ED_DELETE_PREV_WORD, ED_PREV_WORD}}, -#endif /* VWERASE */ -#ifdef VREPRINT - {C_REPRINT, VREPRINT, - {ED_REDISPLAY, ED_INSERT, ED_REDISPLAY}}, -#endif /* VREPRINT */ -#ifdef VLNEXT - {C_LNEXT, VLNEXT, - {ED_QUOTED_INSERT, ED_QUOTED_INSERT, ED_UNASSIGNED}}, -#endif /* VLNEXT */ - {-1, -1, - {ED_UNASSIGNED, ED_UNASSIGNED, ED_UNASSIGNED}} -}; - -private const ttymodes_t ttymodes[] = { -#ifdef IGNBRK - {"ignbrk", IGNBRK, MD_INP}, -#endif /* IGNBRK */ -#ifdef BRKINT - {"brkint", BRKINT, MD_INP}, -#endif /* BRKINT */ -#ifdef IGNPAR - {"ignpar", IGNPAR, MD_INP}, -#endif /* IGNPAR */ -#ifdef PARMRK - {"parmrk", PARMRK, MD_INP}, -#endif /* PARMRK */ -#ifdef INPCK - {"inpck", INPCK, MD_INP}, -#endif /* INPCK */ -#ifdef ISTRIP - {"istrip", ISTRIP, MD_INP}, -#endif /* ISTRIP */ -#ifdef INLCR - {"inlcr", INLCR, MD_INP}, -#endif /* INLCR */ -#ifdef IGNCR - {"igncr", IGNCR, MD_INP}, -#endif /* IGNCR */ -#ifdef ICRNL - {"icrnl", ICRNL, MD_INP}, -#endif /* ICRNL */ -#ifdef IUCLC - {"iuclc", IUCLC, MD_INP}, -#endif /* IUCLC */ -#ifdef IXON - {"ixon", IXON, MD_INP}, -#endif /* IXON */ -#ifdef IXANY - {"ixany", IXANY, MD_INP}, -#endif /* IXANY */ -#ifdef IXOFF - {"ixoff", IXOFF, MD_INP}, -#endif /* IXOFF */ -#ifdef IMAXBEL - {"imaxbel", IMAXBEL, MD_INP}, -#endif /* IMAXBEL */ - -#ifdef OPOST - {"opost", OPOST, MD_OUT}, -#endif /* OPOST */ -#ifdef OLCUC - {"olcuc", OLCUC, MD_OUT}, -#endif /* OLCUC */ -#ifdef ONLCR - {"onlcr", ONLCR, MD_OUT}, -#endif /* ONLCR */ -#ifdef OCRNL - {"ocrnl", OCRNL, MD_OUT}, -#endif /* OCRNL */ -#ifdef ONOCR - {"onocr", ONOCR, MD_OUT}, -#endif /* ONOCR */ -#ifdef ONOEOT - {"onoeot", ONOEOT, MD_OUT}, -#endif /* ONOEOT */ -#ifdef ONLRET - {"onlret", ONLRET, MD_OUT}, -#endif /* ONLRET */ -#ifdef OFILL - {"ofill", OFILL, MD_OUT}, -#endif /* OFILL */ -#ifdef OFDEL - {"ofdel", OFDEL, MD_OUT}, -#endif /* OFDEL */ -#ifdef NLDLY - {"nldly", NLDLY, MD_OUT}, -#endif /* NLDLY */ -#ifdef CRDLY - {"crdly", CRDLY, MD_OUT}, -#endif /* CRDLY */ -#ifdef TABDLY - {"tabdly", TABDLY, MD_OUT}, -#endif /* TABDLY */ -#ifdef XTABS - {"xtabs", XTABS, MD_OUT}, -#endif /* XTABS */ -#ifdef BSDLY - {"bsdly", BSDLY, MD_OUT}, -#endif /* BSDLY */ -#ifdef VTDLY - {"vtdly", VTDLY, MD_OUT}, -#endif /* VTDLY */ -#ifdef FFDLY - {"ffdly", FFDLY, MD_OUT}, -#endif /* FFDLY */ -#ifdef PAGEOUT - {"pageout", PAGEOUT, MD_OUT}, -#endif /* PAGEOUT */ -#ifdef WRAP - {"wrap", WRAP, MD_OUT}, -#endif /* WRAP */ - -#ifdef CIGNORE - {"cignore", CIGNORE, MD_CTL}, -#endif /* CBAUD */ -#ifdef CBAUD - {"cbaud", CBAUD, MD_CTL}, -#endif /* CBAUD */ -#ifdef CSTOPB - {"cstopb", CSTOPB, MD_CTL}, -#endif /* CSTOPB */ -#ifdef CREAD - {"cread", CREAD, MD_CTL}, -#endif /* CREAD */ -#ifdef PARENB - {"parenb", PARENB, MD_CTL}, -#endif /* PARENB */ -#ifdef PARODD - {"parodd", PARODD, MD_CTL}, -#endif /* PARODD */ -#ifdef HUPCL - {"hupcl", HUPCL, MD_CTL}, -#endif /* HUPCL */ -#ifdef CLOCAL - {"clocal", CLOCAL, MD_CTL}, -#endif /* CLOCAL */ -#ifdef LOBLK - {"loblk", LOBLK, MD_CTL}, -#endif /* LOBLK */ -#ifdef CIBAUD - {"cibaud", CIBAUD, MD_CTL}, -#endif /* CIBAUD */ -#ifdef CRTSCTS -#ifdef CCTS_OFLOW - {"ccts_oflow", CCTS_OFLOW, MD_CTL}, -#else - {"crtscts", CRTSCTS, MD_CTL}, -#endif /* CCTS_OFLOW */ -#endif /* CRTSCTS */ -#ifdef CRTS_IFLOW - {"crts_iflow", CRTS_IFLOW, MD_CTL}, -#endif /* CRTS_IFLOW */ -#ifdef CDTRCTS - {"cdtrcts", CDTRCTS, MD_CTL}, -#endif /* CDTRCTS */ -#ifdef MDMBUF - {"mdmbuf", MDMBUF, MD_CTL}, -#endif /* MDMBUF */ -#ifdef RCV1EN - {"rcv1en", RCV1EN, MD_CTL}, -#endif /* RCV1EN */ -#ifdef XMT1EN - {"xmt1en", XMT1EN, MD_CTL}, -#endif /* XMT1EN */ - -#ifdef ISIG - {"isig", ISIG, MD_LIN}, -#endif /* ISIG */ -#ifdef ICANON - {"icanon", ICANON, MD_LIN}, -#endif /* ICANON */ -#ifdef XCASE - {"xcase", XCASE, MD_LIN}, -#endif /* XCASE */ -#ifdef ECHO - {"echo", ECHO, MD_LIN}, -#endif /* ECHO */ -#ifdef ECHOE - {"echoe", ECHOE, MD_LIN}, -#endif /* ECHOE */ -#ifdef ECHOK - {"echok", ECHOK, MD_LIN}, -#endif /* ECHOK */ -#ifdef ECHONL - {"echonl", ECHONL, MD_LIN}, -#endif /* ECHONL */ -#ifdef NOFLSH - {"noflsh", NOFLSH, MD_LIN}, -#endif /* NOFLSH */ -#ifdef TOSTOP - {"tostop", TOSTOP, MD_LIN}, -#endif /* TOSTOP */ -#ifdef ECHOCTL - {"echoctl", ECHOCTL, MD_LIN}, -#endif /* ECHOCTL */ -#ifdef ECHOPRT - {"echoprt", ECHOPRT, MD_LIN}, -#endif /* ECHOPRT */ -#ifdef ECHOKE - {"echoke", ECHOKE, MD_LIN}, -#endif /* ECHOKE */ -#ifdef DEFECHO - {"defecho", DEFECHO, MD_LIN}, -#endif /* DEFECHO */ -#ifdef FLUSHO - {"flusho", FLUSHO, MD_LIN}, -#endif /* FLUSHO */ -#ifdef PENDIN - {"pendin", PENDIN, MD_LIN}, -#endif /* PENDIN */ -#ifdef IEXTEN - {"iexten", IEXTEN, MD_LIN}, -#endif /* IEXTEN */ -#ifdef NOKERNINFO - {"nokerninfo", NOKERNINFO, MD_LIN}, -#endif /* NOKERNINFO */ -#ifdef ALTWERASE - {"altwerase", ALTWERASE, MD_LIN}, -#endif /* ALTWERASE */ -#ifdef EXTPROC - {"extproc", EXTPROC, MD_LIN}, -#endif /* EXTPROC */ - -#if defined(VINTR) - {"intr", C_SH(C_INTR), MD_CHAR}, -#endif /* VINTR */ -#if defined(VQUIT) - {"quit", C_SH(C_QUIT), MD_CHAR}, -#endif /* VQUIT */ -#if defined(VERASE) - {"erase", C_SH(C_ERASE), MD_CHAR}, -#endif /* VERASE */ -#if defined(VKILL) - {"kill", C_SH(C_KILL), MD_CHAR}, -#endif /* VKILL */ -#if defined(VEOF) - {"eof", C_SH(C_EOF), MD_CHAR}, -#endif /* VEOF */ -#if defined(VEOL) - {"eol", C_SH(C_EOL), MD_CHAR}, -#endif /* VEOL */ -#if defined(VEOL2) - {"eol2", C_SH(C_EOL2), MD_CHAR}, -#endif /* VEOL2 */ -#if defined(VSWTCH) - {"swtch", C_SH(C_SWTCH), MD_CHAR}, -#endif /* VSWTCH */ -#if defined(VDSWTCH) - {"dswtch", C_SH(C_DSWTCH), MD_CHAR}, -#endif /* VDSWTCH */ -#if defined(VERASE2) - {"erase2", C_SH(C_ERASE2), MD_CHAR}, -#endif /* VERASE2 */ -#if defined(VSTART) - {"start", C_SH(C_START), MD_CHAR}, -#endif /* VSTART */ -#if defined(VSTOP) - {"stop", C_SH(C_STOP), MD_CHAR}, -#endif /* VSTOP */ -#if defined(VWERASE) - {"werase", C_SH(C_WERASE), MD_CHAR}, -#endif /* VWERASE */ -#if defined(VSUSP) - {"susp", C_SH(C_SUSP), MD_CHAR}, -#endif /* VSUSP */ -#if defined(VDSUSP) - {"dsusp", C_SH(C_DSUSP), MD_CHAR}, -#endif /* VDSUSP */ -#if defined(VREPRINT) - {"reprint", C_SH(C_REPRINT), MD_CHAR}, -#endif /* VREPRINT */ -#if defined(VDISCARD) - {"discard", C_SH(C_DISCARD), MD_CHAR}, -#endif /* VDISCARD */ -#if defined(VLNEXT) - {"lnext", C_SH(C_LNEXT), MD_CHAR}, -#endif /* VLNEXT */ -#if defined(VSTATUS) - {"status", C_SH(C_STATUS), MD_CHAR}, -#endif /* VSTATUS */ -#if defined(VPAGE) - {"page", C_SH(C_PAGE), MD_CHAR}, -#endif /* VPAGE */ -#if defined(VPGOFF) - {"pgoff", C_SH(C_PGOFF), MD_CHAR}, -#endif /* VPGOFF */ -#if defined(VKILL2) - {"kill2", C_SH(C_KILL2), MD_CHAR}, -#endif /* VKILL2 */ -#if defined(VBRK) - {"brk", C_SH(C_BRK), MD_CHAR}, -#endif /* VBRK */ -#if defined(VMIN) - {"min", C_SH(C_MIN), MD_CHAR}, -#endif /* VMIN */ -#if defined(VTIME) - {"time", C_SH(C_TIME), MD_CHAR}, -#endif /* VTIME */ - {NULL, 0, -1}, -}; - - - -#define tty__gettabs(td) ((((td)->c_oflag & TAB3) == TAB3) ? 0 : 1) -#define tty__geteightbit(td) (((td)->c_cflag & CSIZE) == CS8) -#define tty__cooked_mode(td) ((td)->c_lflag & ICANON) - -private int tty_getty(EditLine *, struct termios *); -private int tty_setty(EditLine *, int, const struct termios *); -private int tty__getcharindex(int); -private void tty__getchar(struct termios *, unsigned char *); -private void tty__setchar(struct termios *, unsigned char *); -private speed_t tty__getspeed(struct termios *); -private int tty_setup(EditLine *); - -#define t_qu t_ts - -/* tty_getty(): - * Wrapper for tcgetattr to handle EINTR - */ -private int -tty_getty(EditLine *el, struct termios *t) -{ - int rv; - while ((rv = tcgetattr(el->el_infd, t)) == -1 && errno == EINTR) - continue; - return rv; -} - -/* tty_setty(): - * Wrapper for tcsetattr to handle EINTR - */ -private int -tty_setty(EditLine *el, int action, const struct termios *t) -{ - int rv; - while ((rv = tcsetattr(el->el_infd, action, t)) == -1 && errno == EINTR) - continue; - return rv; -} - -/* tty_setup(): - * Get the tty parameters and initialize the editing state - */ -private int -tty_setup(EditLine *el) -{ - int rst = 1; - - if (el->el_flags & EDIT_DISABLED) - return (0); - - if (!isatty(el->el_outfd)) { -#ifdef DEBUG_TTY - (void) fprintf(el->el_errfile, - "tty_setup: isatty: %s\n", strerror(errno)); -#endif /* DEBUG_TTY */ - return (-1); - } - if (tty_getty(el, &el->el_tty.t_ed) == -1) { -#ifdef DEBUG_TTY - (void) fprintf(el->el_errfile, - "tty_setup: tty_getty: %s\n", strerror(errno)); -#endif /* DEBUG_TTY */ - return (-1); - } - el->el_tty.t_ts = el->el_tty.t_ex = el->el_tty.t_ed; - - el->el_tty.t_speed = tty__getspeed(&el->el_tty.t_ex); - el->el_tty.t_tabs = tty__gettabs(&el->el_tty.t_ex); - el->el_tty.t_eight = tty__geteightbit(&el->el_tty.t_ex); - - el->el_tty.t_ex.c_iflag &= ~el->el_tty.t_t[EX_IO][MD_INP].t_clrmask; - el->el_tty.t_ex.c_iflag |= el->el_tty.t_t[EX_IO][MD_INP].t_setmask; - - el->el_tty.t_ex.c_oflag &= ~el->el_tty.t_t[EX_IO][MD_OUT].t_clrmask; - el->el_tty.t_ex.c_oflag |= el->el_tty.t_t[EX_IO][MD_OUT].t_setmask; - - el->el_tty.t_ex.c_cflag &= ~el->el_tty.t_t[EX_IO][MD_CTL].t_clrmask; - el->el_tty.t_ex.c_cflag |= el->el_tty.t_t[EX_IO][MD_CTL].t_setmask; - - el->el_tty.t_ex.c_lflag &= ~el->el_tty.t_t[EX_IO][MD_LIN].t_clrmask; - el->el_tty.t_ex.c_lflag |= el->el_tty.t_t[EX_IO][MD_LIN].t_setmask; - - /* - * Reset the tty chars to reasonable defaults - * If they are disabled, then enable them. - */ - if (rst) { - if (tty__cooked_mode(&el->el_tty.t_ts)) { - tty__getchar(&el->el_tty.t_ts, el->el_tty.t_c[TS_IO]); - /* - * Don't affect CMIN and CTIME for the editor mode - */ - for (rst = 0; rst < C_NCC - 2; rst++) - if (el->el_tty.t_c[TS_IO][rst] != - el->el_tty.t_vdisable - && el->el_tty.t_c[ED_IO][rst] != - el->el_tty.t_vdisable) - el->el_tty.t_c[ED_IO][rst] = - el->el_tty.t_c[TS_IO][rst]; - for (rst = 0; rst < C_NCC; rst++) - if (el->el_tty.t_c[TS_IO][rst] != - el->el_tty.t_vdisable) - el->el_tty.t_c[EX_IO][rst] = - el->el_tty.t_c[TS_IO][rst]; - } - tty__setchar(&el->el_tty.t_ex, el->el_tty.t_c[EX_IO]); - if (tty_setty(el, TCSADRAIN, &el->el_tty.t_ex) == -1) { -#ifdef DEBUG_TTY - (void) fprintf(el->el_errfile, - "tty_setup: tty_setty: %s\n", - strerror(errno)); -#endif /* DEBUG_TTY */ - return (-1); - } - } -#ifdef notdef - else - tty__setchar(&el->el_tty.t_ex, el->el_tty.t_c[EX_IO]); -#endif - - el->el_tty.t_ed.c_iflag &= ~el->el_tty.t_t[ED_IO][MD_INP].t_clrmask; - el->el_tty.t_ed.c_iflag |= el->el_tty.t_t[ED_IO][MD_INP].t_setmask; - - el->el_tty.t_ed.c_oflag &= ~el->el_tty.t_t[ED_IO][MD_OUT].t_clrmask; - el->el_tty.t_ed.c_oflag |= el->el_tty.t_t[ED_IO][MD_OUT].t_setmask; - - el->el_tty.t_ed.c_cflag &= ~el->el_tty.t_t[ED_IO][MD_CTL].t_clrmask; - el->el_tty.t_ed.c_cflag |= el->el_tty.t_t[ED_IO][MD_CTL].t_setmask; - - el->el_tty.t_ed.c_lflag &= ~el->el_tty.t_t[ED_IO][MD_LIN].t_clrmask; - el->el_tty.t_ed.c_lflag |= el->el_tty.t_t[ED_IO][MD_LIN].t_setmask; - - tty__setchar(&el->el_tty.t_ed, el->el_tty.t_c[ED_IO]); - tty_bind_char(el, 1); - return (0); -} - -protected int -tty_init(EditLine *el) -{ - - el->el_tty.t_mode = EX_IO; - el->el_tty.t_vdisable = _POSIX_VDISABLE; - (void) memcpy(el->el_tty.t_t, ttyperm, sizeof(ttyperm_t)); - (void) memcpy(el->el_tty.t_c, ttychar, sizeof(ttychar_t)); - return (tty_setup(el)); -} - - -/* tty_end(): - * Restore the tty to its original settings - */ -protected void -/*ARGSUSED*/ -tty_end(EditLine *el __attribute__((__unused__))) -{ - - /* XXX: Maybe reset to an initial state? */ -} - - -/* tty__getspeed(): - * Get the tty speed - */ -private speed_t -tty__getspeed(struct termios *td) -{ - speed_t spd; - - if ((spd = cfgetispeed(td)) == 0) - spd = cfgetospeed(td); - return (spd); -} - -/* tty__getspeed(): - * Return the index of the asked char in the c_cc array - */ -private int -tty__getcharindex(int i) -{ - switch (i) { -#ifdef VINTR - case C_INTR: - return VINTR; -#endif /* VINTR */ -#ifdef VQUIT - case C_QUIT: - return VQUIT; -#endif /* VQUIT */ -#ifdef VERASE - case C_ERASE: - return VERASE; -#endif /* VERASE */ -#ifdef VKILL - case C_KILL: - return VKILL; -#endif /* VKILL */ -#ifdef VEOF - case C_EOF: - return VEOF; -#endif /* VEOF */ -#ifdef VEOL - case C_EOL: - return VEOL; -#endif /* VEOL */ -#ifdef VEOL2 - case C_EOL2: - return VEOL2; -#endif /* VEOL2 */ -#ifdef VSWTCH - case C_SWTCH: - return VSWTCH; -#endif /* VSWTCH */ -#ifdef VDSWTCH - case C_DSWTCH: - return VDSWTCH; -#endif /* VDSWTCH */ -#ifdef VERASE2 - case C_ERASE2: - return VERASE2; -#endif /* VERASE2 */ -#ifdef VSTART - case C_START: - return VSTART; -#endif /* VSTART */ -#ifdef VSTOP - case C_STOP: - return VSTOP; -#endif /* VSTOP */ -#ifdef VWERASE - case C_WERASE: - return VWERASE; -#endif /* VWERASE */ -#ifdef VSUSP - case C_SUSP: - return VSUSP; -#endif /* VSUSP */ -#ifdef VDSUSP - case C_DSUSP: - return VDSUSP; -#endif /* VDSUSP */ -#ifdef VREPRINT - case C_REPRINT: - return VREPRINT; -#endif /* VREPRINT */ -#ifdef VDISCARD - case C_DISCARD: - return VDISCARD; -#endif /* VDISCARD */ -#ifdef VLNEXT - case C_LNEXT: - return VLNEXT; -#endif /* VLNEXT */ -#ifdef VSTATUS - case C_STATUS: - return VSTATUS; -#endif /* VSTATUS */ -#ifdef VPAGE - case C_PAGE: - return VPAGE; -#endif /* VPAGE */ -#ifdef VPGOFF - case C_PGOFF: - return VPGOFF; -#endif /* VPGOFF */ -#ifdef VKILL2 - case C_KILL2: - return VKILL2; -#endif /* KILL2 */ -#ifdef VMIN - case C_MIN: - return VMIN; -#endif /* VMIN */ -#ifdef VTIME - case C_TIME: - return VTIME; -#endif /* VTIME */ - default: - return -1; - } -} - -/* tty__getchar(): - * Get the tty characters - */ -private void -tty__getchar(struct termios *td, unsigned char *s) -{ - -#ifdef VINTR - s[C_INTR] = td->c_cc[VINTR]; -#endif /* VINTR */ -#ifdef VQUIT - s[C_QUIT] = td->c_cc[VQUIT]; -#endif /* VQUIT */ -#ifdef VERASE - s[C_ERASE] = td->c_cc[VERASE]; -#endif /* VERASE */ -#ifdef VKILL - s[C_KILL] = td->c_cc[VKILL]; -#endif /* VKILL */ -#ifdef VEOF - s[C_EOF] = td->c_cc[VEOF]; -#endif /* VEOF */ -#ifdef VEOL - s[C_EOL] = td->c_cc[VEOL]; -#endif /* VEOL */ -#ifdef VEOL2 - s[C_EOL2] = td->c_cc[VEOL2]; -#endif /* VEOL2 */ -#ifdef VSWTCH - s[C_SWTCH] = td->c_cc[VSWTCH]; -#endif /* VSWTCH */ -#ifdef VDSWTCH - s[C_DSWTCH] = td->c_cc[VDSWTCH]; -#endif /* VDSWTCH */ -#ifdef VERASE2 - s[C_ERASE2] = td->c_cc[VERASE2]; -#endif /* VERASE2 */ -#ifdef VSTART - s[C_START] = td->c_cc[VSTART]; -#endif /* VSTART */ -#ifdef VSTOP - s[C_STOP] = td->c_cc[VSTOP]; -#endif /* VSTOP */ -#ifdef VWERASE - s[C_WERASE] = td->c_cc[VWERASE]; -#endif /* VWERASE */ -#ifdef VSUSP - s[C_SUSP] = td->c_cc[VSUSP]; -#endif /* VSUSP */ -#ifdef VDSUSP - s[C_DSUSP] = td->c_cc[VDSUSP]; -#endif /* VDSUSP */ -#ifdef VREPRINT - s[C_REPRINT] = td->c_cc[VREPRINT]; -#endif /* VREPRINT */ -#ifdef VDISCARD - s[C_DISCARD] = td->c_cc[VDISCARD]; -#endif /* VDISCARD */ -#ifdef VLNEXT - s[C_LNEXT] = td->c_cc[VLNEXT]; -#endif /* VLNEXT */ -#ifdef VSTATUS - s[C_STATUS] = td->c_cc[VSTATUS]; -#endif /* VSTATUS */ -#ifdef VPAGE - s[C_PAGE] = td->c_cc[VPAGE]; -#endif /* VPAGE */ -#ifdef VPGOFF - s[C_PGOFF] = td->c_cc[VPGOFF]; -#endif /* VPGOFF */ -#ifdef VKILL2 - s[C_KILL2] = td->c_cc[VKILL2]; -#endif /* KILL2 */ -#ifdef VMIN - s[C_MIN] = td->c_cc[VMIN]; -#endif /* VMIN */ -#ifdef VTIME - s[C_TIME] = td->c_cc[VTIME]; -#endif /* VTIME */ -} /* tty__getchar */ - - -/* tty__setchar(): - * Set the tty characters - */ -private void -tty__setchar(struct termios *td, unsigned char *s) -{ - -#ifdef VINTR - td->c_cc[VINTR] = s[C_INTR]; -#endif /* VINTR */ -#ifdef VQUIT - td->c_cc[VQUIT] = s[C_QUIT]; -#endif /* VQUIT */ -#ifdef VERASE - td->c_cc[VERASE] = s[C_ERASE]; -#endif /* VERASE */ -#ifdef VKILL - td->c_cc[VKILL] = s[C_KILL]; -#endif /* VKILL */ -#ifdef VEOF - td->c_cc[VEOF] = s[C_EOF]; -#endif /* VEOF */ -#ifdef VEOL - td->c_cc[VEOL] = s[C_EOL]; -#endif /* VEOL */ -#ifdef VEOL2 - td->c_cc[VEOL2] = s[C_EOL2]; -#endif /* VEOL2 */ -#ifdef VSWTCH - td->c_cc[VSWTCH] = s[C_SWTCH]; -#endif /* VSWTCH */ -#ifdef VDSWTCH - td->c_cc[VDSWTCH] = s[C_DSWTCH]; -#endif /* VDSWTCH */ -#ifdef VERASE2 - td->c_cc[VERASE2] = s[C_ERASE2]; -#endif /* VERASE2 */ -#ifdef VSTART - td->c_cc[VSTART] = s[C_START]; -#endif /* VSTART */ -#ifdef VSTOP - td->c_cc[VSTOP] = s[C_STOP]; -#endif /* VSTOP */ -#ifdef VWERASE - td->c_cc[VWERASE] = s[C_WERASE]; -#endif /* VWERASE */ -#ifdef VSUSP - td->c_cc[VSUSP] = s[C_SUSP]; -#endif /* VSUSP */ -#ifdef VDSUSP - td->c_cc[VDSUSP] = s[C_DSUSP]; -#endif /* VDSUSP */ -#ifdef VREPRINT - td->c_cc[VREPRINT] = s[C_REPRINT]; -#endif /* VREPRINT */ -#ifdef VDISCARD - td->c_cc[VDISCARD] = s[C_DISCARD]; -#endif /* VDISCARD */ -#ifdef VLNEXT - td->c_cc[VLNEXT] = s[C_LNEXT]; -#endif /* VLNEXT */ -#ifdef VSTATUS - td->c_cc[VSTATUS] = s[C_STATUS]; -#endif /* VSTATUS */ -#ifdef VPAGE - td->c_cc[VPAGE] = s[C_PAGE]; -#endif /* VPAGE */ -#ifdef VPGOFF - td->c_cc[VPGOFF] = s[C_PGOFF]; -#endif /* VPGOFF */ -#ifdef VKILL2 - td->c_cc[VKILL2] = s[C_KILL2]; -#endif /* VKILL2 */ -#ifdef VMIN - td->c_cc[VMIN] = s[C_MIN]; -#endif /* VMIN */ -#ifdef VTIME - td->c_cc[VTIME] = s[C_TIME]; -#endif /* VTIME */ -} /* tty__setchar */ - - -/* tty_bind_char(): - * Rebind the editline functions - */ -protected void -tty_bind_char(EditLine *el, int force) -{ - - unsigned char *t_n = el->el_tty.t_c[ED_IO]; - unsigned char *t_o = el->el_tty.t_ed.c_cc; - Char new[2], old[2]; - const ttymap_t *tp; - el_action_t *map, *alt; - const el_action_t *dmap, *dalt; - new[1] = old[1] = '\0'; - - map = el->el_map.key; - alt = el->el_map.alt; - if (el->el_map.type == MAP_VI) { - dmap = el->el_map.vii; - dalt = el->el_map.vic; - } else { - dmap = el->el_map.emacs; - dalt = NULL; - } - - for (tp = tty_map; tp->nch != -1; tp++) { - new[0] = t_n[tp->nch]; - old[0] = t_o[tp->och]; - if (new[0] == old[0] && !force) - continue; - /* Put the old default binding back, and set the new binding */ - key_clear(el, map, old); - map[UC(old[0])] = dmap[UC(old[0])]; - key_clear(el, map, new); - /* MAP_VI == 1, MAP_EMACS == 0... */ - map[UC(new[0])] = tp->bind[el->el_map.type]; - if (dalt) { - key_clear(el, alt, old); - alt[UC(old[0])] = dalt[UC(old[0])]; - key_clear(el, alt, new); - alt[UC(new[0])] = tp->bind[el->el_map.type + 1]; - } - } -} - - -/* tty_rawmode(): - * Set terminal into 1 character at a time mode. - */ -protected int -tty_rawmode(EditLine *el) -{ - - if (el->el_tty.t_mode == ED_IO || el->el_tty.t_mode == QU_IO) - return (0); - - if (el->el_flags & EDIT_DISABLED) - return (0); - - if (tty_getty(el, &el->el_tty.t_ts) == -1) { -#ifdef DEBUG_TTY - (void) fprintf(el->el_errfile, "tty_rawmode: tty_getty: %s\n", - strerror(errno)); -#endif /* DEBUG_TTY */ - return (-1); - } - /* - * We always keep up with the eight bit setting and the speed of the - * tty. But we only believe changes that are made to cooked mode! - */ - el->el_tty.t_eight = tty__geteightbit(&el->el_tty.t_ts); - el->el_tty.t_speed = tty__getspeed(&el->el_tty.t_ts); - - if (tty__getspeed(&el->el_tty.t_ex) != el->el_tty.t_speed || - tty__getspeed(&el->el_tty.t_ed) != el->el_tty.t_speed) { - (void) cfsetispeed(&el->el_tty.t_ex, el->el_tty.t_speed); - (void) cfsetospeed(&el->el_tty.t_ex, el->el_tty.t_speed); - (void) cfsetispeed(&el->el_tty.t_ed, el->el_tty.t_speed); - (void) cfsetospeed(&el->el_tty.t_ed, el->el_tty.t_speed); - } - if (tty__cooked_mode(&el->el_tty.t_ts)) { - if (el->el_tty.t_ts.c_cflag != el->el_tty.t_ex.c_cflag) { - el->el_tty.t_ex.c_cflag = - el->el_tty.t_ts.c_cflag; - el->el_tty.t_ex.c_cflag &= - ~el->el_tty.t_t[EX_IO][MD_CTL].t_clrmask; - el->el_tty.t_ex.c_cflag |= - el->el_tty.t_t[EX_IO][MD_CTL].t_setmask; - - el->el_tty.t_ed.c_cflag = - el->el_tty.t_ts.c_cflag; - el->el_tty.t_ed.c_cflag &= - ~el->el_tty.t_t[ED_IO][MD_CTL].t_clrmask; - el->el_tty.t_ed.c_cflag |= - el->el_tty.t_t[ED_IO][MD_CTL].t_setmask; - } - if ((el->el_tty.t_ts.c_lflag != el->el_tty.t_ex.c_lflag) && - (el->el_tty.t_ts.c_lflag != el->el_tty.t_ed.c_lflag)) { - el->el_tty.t_ex.c_lflag = - el->el_tty.t_ts.c_lflag; - el->el_tty.t_ex.c_lflag &= - ~el->el_tty.t_t[EX_IO][MD_LIN].t_clrmask; - el->el_tty.t_ex.c_lflag |= - el->el_tty.t_t[EX_IO][MD_LIN].t_setmask; - - el->el_tty.t_ed.c_lflag = - el->el_tty.t_ts.c_lflag; - el->el_tty.t_ed.c_lflag &= - ~el->el_tty.t_t[ED_IO][MD_LIN].t_clrmask; - el->el_tty.t_ed.c_lflag |= - el->el_tty.t_t[ED_IO][MD_LIN].t_setmask; - } - if ((el->el_tty.t_ts.c_iflag != el->el_tty.t_ex.c_iflag) && - (el->el_tty.t_ts.c_iflag != el->el_tty.t_ed.c_iflag)) { - el->el_tty.t_ex.c_iflag = - el->el_tty.t_ts.c_iflag; - el->el_tty.t_ex.c_iflag &= - ~el->el_tty.t_t[EX_IO][MD_INP].t_clrmask; - el->el_tty.t_ex.c_iflag |= - el->el_tty.t_t[EX_IO][MD_INP].t_setmask; - - el->el_tty.t_ed.c_iflag = - el->el_tty.t_ts.c_iflag; - el->el_tty.t_ed.c_iflag &= - ~el->el_tty.t_t[ED_IO][MD_INP].t_clrmask; - el->el_tty.t_ed.c_iflag |= - el->el_tty.t_t[ED_IO][MD_INP].t_setmask; - } - if ((el->el_tty.t_ts.c_oflag != el->el_tty.t_ex.c_oflag) && - (el->el_tty.t_ts.c_oflag != el->el_tty.t_ed.c_oflag)) { - el->el_tty.t_ex.c_oflag = - el->el_tty.t_ts.c_oflag; - el->el_tty.t_ex.c_oflag &= - ~el->el_tty.t_t[EX_IO][MD_OUT].t_clrmask; - el->el_tty.t_ex.c_oflag |= - el->el_tty.t_t[EX_IO][MD_OUT].t_setmask; - - el->el_tty.t_ed.c_oflag = - el->el_tty.t_ts.c_oflag; - el->el_tty.t_ed.c_oflag &= - ~el->el_tty.t_t[ED_IO][MD_OUT].t_clrmask; - el->el_tty.t_ed.c_oflag |= - el->el_tty.t_t[ED_IO][MD_OUT].t_setmask; - } - if (tty__gettabs(&el->el_tty.t_ex) == 0) - el->el_tty.t_tabs = 0; - else - el->el_tty.t_tabs = EL_CAN_TAB ? 1 : 0; - - { - int i; - - tty__getchar(&el->el_tty.t_ts, el->el_tty.t_c[TS_IO]); - /* - * Check if the user made any changes. - * If he did, then propagate the changes to the - * edit and execute data structures. - */ - for (i = 0; i < C_NCC; i++) - if (el->el_tty.t_c[TS_IO][i] != - el->el_tty.t_c[EX_IO][i]) - break; - - if (i != C_NCC) { - /* - * Propagate changes only to the unprotected - * chars that have been modified just now. - */ - for (i = 0; i < C_NCC; i++) { - if (!((el->el_tty.t_t[ED_IO][MD_CHAR].t_setmask & C_SH(i))) - && (el->el_tty.t_c[TS_IO][i] != el->el_tty.t_c[EX_IO][i])) - el->el_tty.t_c[ED_IO][i] = el->el_tty.t_c[TS_IO][i]; - if (el->el_tty.t_t[ED_IO][MD_CHAR].t_clrmask & C_SH(i)) - el->el_tty.t_c[ED_IO][i] = el->el_tty.t_vdisable; - } - tty_bind_char(el, 0); - tty__setchar(&el->el_tty.t_ed, el->el_tty.t_c[ED_IO]); - - for (i = 0; i < C_NCC; i++) { - if (!((el->el_tty.t_t[EX_IO][MD_CHAR].t_setmask & C_SH(i))) - && (el->el_tty.t_c[TS_IO][i] != el->el_tty.t_c[EX_IO][i])) - el->el_tty.t_c[EX_IO][i] = el->el_tty.t_c[TS_IO][i]; - if (el->el_tty.t_t[EX_IO][MD_CHAR].t_clrmask & C_SH(i)) - el->el_tty.t_c[EX_IO][i] = el->el_tty.t_vdisable; - } - tty__setchar(&el->el_tty.t_ex, el->el_tty.t_c[EX_IO]); - } - } - } - if (tty_setty(el, TCSADRAIN, &el->el_tty.t_ed) == -1) { -#ifdef DEBUG_TTY - (void) fprintf(el->el_errfile, "tty_rawmode: tty_setty: %s\n", - strerror(errno)); -#endif /* DEBUG_TTY */ - return (-1); - } - el->el_tty.t_mode = ED_IO; - return (0); -} - - -/* tty_cookedmode(): - * Set the tty back to normal mode - */ -protected int -tty_cookedmode(EditLine *el) -{ /* set tty in normal setup */ - - if (el->el_tty.t_mode == EX_IO) - return (0); - - if (el->el_flags & EDIT_DISABLED) - return (0); - - if (tty_setty(el, TCSADRAIN, &el->el_tty.t_ex) == -1) { -#ifdef DEBUG_TTY - (void) fprintf(el->el_errfile, - "tty_cookedmode: tty_setty: %s\n", - strerror(errno)); -#endif /* DEBUG_TTY */ - return (-1); - } - el->el_tty.t_mode = EX_IO; - return (0); -} - - -/* tty_quotemode(): - * Turn on quote mode - */ -protected int -tty_quotemode(EditLine *el) -{ - if (el->el_tty.t_mode == QU_IO) - return (0); - - el->el_tty.t_qu = el->el_tty.t_ed; - - el->el_tty.t_qu.c_iflag &= ~el->el_tty.t_t[QU_IO][MD_INP].t_clrmask; - el->el_tty.t_qu.c_iflag |= el->el_tty.t_t[QU_IO][MD_INP].t_setmask; - - el->el_tty.t_qu.c_oflag &= ~el->el_tty.t_t[QU_IO][MD_OUT].t_clrmask; - el->el_tty.t_qu.c_oflag |= el->el_tty.t_t[QU_IO][MD_OUT].t_setmask; - - el->el_tty.t_qu.c_cflag &= ~el->el_tty.t_t[QU_IO][MD_CTL].t_clrmask; - el->el_tty.t_qu.c_cflag |= el->el_tty.t_t[QU_IO][MD_CTL].t_setmask; - - el->el_tty.t_qu.c_lflag &= ~el->el_tty.t_t[QU_IO][MD_LIN].t_clrmask; - el->el_tty.t_qu.c_lflag |= el->el_tty.t_t[QU_IO][MD_LIN].t_setmask; - - if (tty_setty(el, TCSADRAIN, &el->el_tty.t_qu) == -1) { -#ifdef DEBUG_TTY - (void) fprintf(el->el_errfile, "QuoteModeOn: tty_setty: %s\n", - strerror(errno)); -#endif /* DEBUG_TTY */ - return (-1); - } - el->el_tty.t_mode = QU_IO; - return (0); -} - - -/* tty_noquotemode(): - * Turn off quote mode - */ -protected int -tty_noquotemode(EditLine *el) -{ - - if (el->el_tty.t_mode != QU_IO) - return (0); - if (tty_setty(el, TCSADRAIN, &el->el_tty.t_ed) == -1) { -#ifdef DEBUG_TTY - (void) fprintf(el->el_errfile, "QuoteModeOff: tty_setty: %s\n", - strerror(errno)); -#endif /* DEBUG_TTY */ - return (-1); - } - el->el_tty.t_mode = ED_IO; - return (0); -} - - -/* tty_stty(): - * Stty builtin - */ -protected int -/*ARGSUSED*/ -tty_stty(EditLine *el, int argc __attribute__((__unused__)), const Char **argv) -{ - const ttymodes_t *m; - char x; - int aflag = 0; - const Char *s, *d; - char name[EL_BUFSIZ]; - struct termios *tios = &el->el_tty.t_ex; - int z = EX_IO; - - if (argv == NULL) - return (-1); - strncpy(name, ct_encode_string(*argv++, &el->el_scratch), sizeof(name)); - name[sizeof(name) - 1] = '\0'; - - while (argv && *argv && argv[0][0] == '-' && argv[0][2] == '\0') - switch (argv[0][1]) { - case 'a': - aflag++; - argv++; - break; - case 'd': - argv++; - tios = &el->el_tty.t_ed; - z = ED_IO; - break; - case 'x': - argv++; - tios = &el->el_tty.t_ex; - z = EX_IO; - break; - case 'q': - argv++; - tios = &el->el_tty.t_ts; - z = QU_IO; - break; - default: - (void) fprintf(el->el_errfile, - "%s: Unknown switch `%c'.\n", - name, argv[0][1]); - return (-1); - } - - if (!argv || !*argv) { - int i = -1; - size_t len = 0, st = 0, cu; - for (m = ttymodes; m->m_name; m++) { - if (m->m_type != i) { - (void) fprintf(el->el_outfile, "%s%s", - i != -1 ? "\n" : "", - el->el_tty.t_t[z][m->m_type].t_name); - i = m->m_type; - st = len = - strlen(el->el_tty.t_t[z][m->m_type].t_name); - } - if (i != -1) { - x = (el->el_tty.t_t[z][i].t_setmask & m->m_value) - ? '+' : '\0'; - x = (el->el_tty.t_t[z][i].t_clrmask & m->m_value) - ? '-' : x; - } else { - x = '\0'; - } - - if (x != '\0' || aflag) { - - cu = strlen(m->m_name) + (x != '\0') + 1; - - if (len + cu >= (size_t)el->el_term.t_size.h) { - (void) fprintf(el->el_outfile, "\n%*s", - (int)st, ""); - len = st + cu; - } else - len += cu; - - if (x != '\0') - (void) fprintf(el->el_outfile, "%c%s ", - x, m->m_name); - else - (void) fprintf(el->el_outfile, "%s ", - m->m_name); - } - } - (void) fprintf(el->el_outfile, "\n"); - return (0); - } - while (argv && (s = *argv++)) { - const Char *p; - switch (*s) { - case '+': - case '-': - x = *s++; - break; - default: - x = '\0'; - break; - } - d = s; - p = Strchr(s, '='); - for (m = ttymodes; m->m_name; m++) - if ((p ? strncmp(m->m_name, ct_encode_string(d, &el->el_scratch), (size_t)(p - d)) : - strcmp(m->m_name, ct_encode_string(d, &el->el_scratch))) == 0 && - (p == NULL || m->m_type == MD_CHAR)) - break; - - if (!m->m_name) { - (void) fprintf(el->el_errfile, - "%s: Invalid argument `" FSTR "'.\n", name, d); - return (-1); - } - if (p) { - int c = ffs((int)m->m_value); - int v = *++p ? parse__escape(&p) : - el->el_tty.t_vdisable; - assert(c != 0); - c--; - c = tty__getcharindex(c); - assert(c != -1); - tios->c_cc[c] = v; - continue; - } - switch (x) { - case '+': - el->el_tty.t_t[z][m->m_type].t_setmask |= m->m_value; - el->el_tty.t_t[z][m->m_type].t_clrmask &= ~m->m_value; - break; - case '-': - el->el_tty.t_t[z][m->m_type].t_setmask &= ~m->m_value; - el->el_tty.t_t[z][m->m_type].t_clrmask |= m->m_value; - break; - default: - el->el_tty.t_t[z][m->m_type].t_setmask &= ~m->m_value; - el->el_tty.t_t[z][m->m_type].t_clrmask &= ~m->m_value; - break; - } - } - - if (el->el_tty.t_mode == z) { - if (tty_setty(el, TCSADRAIN, tios) == -1) { -#ifdef DEBUG_TTY - (void) fprintf(el->el_errfile, - "tty_stty: tty_setty: %s\n", strerror(errno)); -#endif /* DEBUG_TTY */ - return (-1); - } - } - - return (0); -} - - -#ifdef notyet -/* tty_printchar(): - * DEbugging routine to print the tty characters - */ -private void -tty_printchar(EditLine *el, unsigned char *s) -{ - ttyperm_t *m; - int i; - - for (i = 0; i < C_NCC; i++) { - for (m = el->el_tty.t_t; m->m_name; m++) - if (m->m_type == MD_CHAR && C_SH(i) == m->m_value) - break; - if (m->m_name) - (void) fprintf(el->el_errfile, "%s ^%c ", - m->m_name, s[i] + 'A' - 1); - if (i % 5 == 0) - (void) fprintf(el->el_errfile, "\n"); - } - (void) fprintf(el->el_errfile, "\n"); -} -#endif /* notyet */ diff --git a/kerberosV/src/lib/libedit/src/tty.h b/kerberosV/src/lib/libedit/src/tty.h deleted file mode 100644 index f4b4d42a5ee..00000000000 --- a/kerberosV/src/lib/libedit/src/tty.h +++ /dev/null @@ -1,481 +0,0 @@ -/* $NetBSD: tty.h,v 1.12 2009/12/30 22:37:40 christos 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - * - * @(#)tty.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * el.tty.h: Local terminal header - */ -#ifndef _h_el_tty -#define _h_el_tty - -#include "sys.h" -#include "histedit.h" -#include -#include - -/* Define our own since everyone gets it wrong! */ -#define CONTROL(A) ((A) & 037) - -/* - * Aix compatible names - */ -# if defined(VWERSE) && !defined(VWERASE) -# define VWERASE VWERSE -# endif /* VWERSE && !VWERASE */ - -# if defined(VDISCRD) && !defined(VDISCARD) -# define VDISCARD VDISCRD -# endif /* VDISCRD && !VDISCARD */ - -# if defined(VFLUSHO) && !defined(VDISCARD) -# define VDISCARD VFLUSHO -# endif /* VFLUSHO && VDISCARD */ - -# if defined(VSTRT) && !defined(VSTART) -# define VSTART VSTRT -# endif /* VSTRT && ! VSTART */ - -# if defined(VSTAT) && !defined(VSTATUS) -# define VSTATUS VSTAT -# endif /* VSTAT && ! VSTATUS */ - -# ifndef ONLRET -# define ONLRET 0 -# endif /* ONLRET */ - -# ifndef TAB3 -# ifdef OXTABS -# define TAB3 OXTABS -# else -# define TAB3 0 -# endif /* OXTABS */ -# endif /* !TAB3 */ - -# if defined(OXTABS) && !defined(XTABS) -# define XTABS OXTABS -# endif /* OXTABS && !XTABS */ - -# ifndef ONLCR -# define ONLCR 0 -# endif /* ONLCR */ - -# ifndef IEXTEN -# define IEXTEN 0 -# endif /* IEXTEN */ - -# ifndef ECHOCTL -# define ECHOCTL 0 -# endif /* ECHOCTL */ - -# ifndef PARENB -# define PARENB 0 -# endif /* PARENB */ - -# ifndef EXTPROC -# define EXTPROC 0 -# endif /* EXTPROC */ - -# ifndef FLUSHO -# define FLUSHO 0 -# endif /* FLUSHO */ - - -# if defined(VDISABLE) && !defined(_POSIX_VDISABLE) -# define _POSIX_VDISABLE VDISABLE -# endif /* VDISABLE && ! _POSIX_VDISABLE */ - -/* - * Work around ISC's definition of IEXTEN which is - * XCASE! - */ -# ifdef ISC -# if defined(IEXTEN) && defined(XCASE) -# if IEXTEN == XCASE -# undef IEXTEN -# define IEXTEN 0 -# endif /* IEXTEN == XCASE */ -# endif /* IEXTEN && XCASE */ -# if defined(IEXTEN) && !defined(XCASE) -# define XCASE IEXTEN -# undef IEXTEN -# define IEXTEN 0 -# endif /* IEXTEN && !XCASE */ -# endif /* ISC */ - -/* - * Work around convex weirdness where turning off IEXTEN makes us - * lose all postprocessing! - */ -#if defined(convex) || defined(__convex__) -# if defined(IEXTEN) && IEXTEN != 0 -# undef IEXTEN -# define IEXTEN 0 -# endif /* IEXTEN != 0 */ -#endif /* convex || __convex__ */ - -/* - * So that we don't lose job control. - */ -#ifdef __SVR4 -# undef CSWTCH -#endif - -#ifndef _POSIX_VDISABLE -# define _POSIX_VDISABLE ((unsigned char) -1) -#endif /* _POSIX_VDISABLE */ - -#if !defined(CREPRINT) && defined(CRPRNT) -# define CREPRINT CRPRNT -#endif /* !CREPRINT && CRPRNT */ -#if !defined(CDISCARD) && defined(CFLUSH) -# define CDISCARD CFLUSH -#endif /* !CDISCARD && CFLUSH */ - -#ifndef CINTR -# define CINTR CONTROL('c') -#endif /* CINTR */ -#ifndef CQUIT -# define CQUIT 034 /* ^\ */ -#endif /* CQUIT */ -#ifndef CERASE -# define CERASE 0177 /* ^? */ -#endif /* CERASE */ -#ifndef CKILL -# define CKILL CONTROL('u') -#endif /* CKILL */ -#ifndef CEOF -# define CEOF CONTROL('d') -#endif /* CEOF */ -#ifndef CEOL -# define CEOL _POSIX_VDISABLE -#endif /* CEOL */ -#ifndef CEOL2 -# define CEOL2 _POSIX_VDISABLE -#endif /* CEOL2 */ -#ifndef CSWTCH -# define CSWTCH _POSIX_VDISABLE -#endif /* CSWTCH */ -#ifndef CDSWTCH -# define CDSWTCH _POSIX_VDISABLE -#endif /* CDSWTCH */ -#ifndef CERASE2 -# define CERASE2 _POSIX_VDISABLE -#endif /* CERASE2 */ -#ifndef CSTART -# define CSTART CONTROL('q') -#endif /* CSTART */ -#ifndef CSTOP -# define CSTOP CONTROL('s') -#endif /* CSTOP */ -#ifndef CSUSP -# define CSUSP CONTROL('z') -#endif /* CSUSP */ -#ifndef CDSUSP -# define CDSUSP CONTROL('y') -#endif /* CDSUSP */ - -#ifdef hpux - -# ifndef CREPRINT -# define CREPRINT _POSIX_VDISABLE -# endif /* CREPRINT */ -# ifndef CDISCARD -# define CDISCARD _POSIX_VDISABLE -# endif /* CDISCARD */ -# ifndef CLNEXT -# define CLNEXT _POSIX_VDISABLE -# endif /* CLNEXT */ -# ifndef CWERASE -# define CWERASE _POSIX_VDISABLE -# endif /* CWERASE */ - -#else /* !hpux */ - -# ifndef CREPRINT -# define CREPRINT CONTROL('r') -# endif /* CREPRINT */ -# ifndef CDISCARD -# define CDISCARD CONTROL('o') -# endif /* CDISCARD */ -# ifndef CLNEXT -# define CLNEXT CONTROL('v') -# endif /* CLNEXT */ -# ifndef CWERASE -# define CWERASE CONTROL('w') -# endif /* CWERASE */ - -#endif /* hpux */ - -#ifndef CSTATUS -# define CSTATUS CONTROL('t') -#endif /* CSTATUS */ -#ifndef CPAGE -# define CPAGE ' ' -#endif /* CPAGE */ -#ifndef CPGOFF -# define CPGOFF CONTROL('m') -#endif /* CPGOFF */ -#ifndef CKILL2 -# define CKILL2 _POSIX_VDISABLE -#endif /* CKILL2 */ -#ifndef CBRK -# ifndef masscomp -# define CBRK 0377 -# else -# define CBRK '\0' -# endif /* masscomp */ -#endif /* CBRK */ -#ifndef CMIN -# define CMIN CEOF -#endif /* CMIN */ -#ifndef CTIME -# define CTIME CEOL -#endif /* CTIME */ - -/* - * Fix for sun inconsistency. On termio VSUSP and the rest of the - * ttychars > NCC are defined. So we undefine them. - */ -#if defined(TERMIO) || defined(POSIX) -# if defined(POSIX) && defined(NCCS) -# define NUMCC NCCS -# else -# ifdef NCC -# define NUMCC NCC -# endif /* NCC */ -# endif /* POSIX && NCCS */ -# ifdef NUMCC -# ifdef VINTR -# if NUMCC <= VINTR -# undef VINTR -# endif /* NUMCC <= VINTR */ -# endif /* VINTR */ -# ifdef VQUIT -# if NUMCC <= VQUIT -# undef VQUIT -# endif /* NUMCC <= VQUIT */ -# endif /* VQUIT */ -# ifdef VERASE -# if NUMCC <= VERASE -# undef VERASE -# endif /* NUMCC <= VERASE */ -# endif /* VERASE */ -# ifdef VKILL -# if NUMCC <= VKILL -# undef VKILL -# endif /* NUMCC <= VKILL */ -# endif /* VKILL */ -# ifdef VEOF -# if NUMCC <= VEOF -# undef VEOF -# endif /* NUMCC <= VEOF */ -# endif /* VEOF */ -# ifdef VEOL -# if NUMCC <= VEOL -# undef VEOL -# endif /* NUMCC <= VEOL */ -# endif /* VEOL */ -# ifdef VEOL2 -# if NUMCC <= VEOL2 -# undef VEOL2 -# endif /* NUMCC <= VEOL2 */ -# endif /* VEOL2 */ -# ifdef VSWTCH -# if NUMCC <= VSWTCH -# undef VSWTCH -# endif /* NUMCC <= VSWTCH */ -# endif /* VSWTCH */ -# ifdef VDSWTCH -# if NUMCC <= VDSWTCH -# undef VDSWTCH -# endif /* NUMCC <= VDSWTCH */ -# endif /* VDSWTCH */ -# ifdef VERASE2 -# if NUMCC <= VERASE2 -# undef VERASE2 -# endif /* NUMCC <= VERASE2 */ -# endif /* VERASE2 */ -# ifdef VSTART -# if NUMCC <= VSTART -# undef VSTART -# endif /* NUMCC <= VSTART */ -# endif /* VSTART */ -# ifdef VSTOP -# if NUMCC <= VSTOP -# undef VSTOP -# endif /* NUMCC <= VSTOP */ -# endif /* VSTOP */ -# ifdef VWERASE -# if NUMCC <= VWERASE -# undef VWERASE -# endif /* NUMCC <= VWERASE */ -# endif /* VWERASE */ -# ifdef VSUSP -# if NUMCC <= VSUSP -# undef VSUSP -# endif /* NUMCC <= VSUSP */ -# endif /* VSUSP */ -# ifdef VDSUSP -# if NUMCC <= VDSUSP -# undef VDSUSP -# endif /* NUMCC <= VDSUSP */ -# endif /* VDSUSP */ -# ifdef VREPRINT -# if NUMCC <= VREPRINT -# undef VREPRINT -# endif /* NUMCC <= VREPRINT */ -# endif /* VREPRINT */ -# ifdef VDISCARD -# if NUMCC <= VDISCARD -# undef VDISCARD -# endif /* NUMCC <= VDISCARD */ -# endif /* VDISCARD */ -# ifdef VLNEXT -# if NUMCC <= VLNEXT -# undef VLNEXT -# endif /* NUMCC <= VLNEXT */ -# endif /* VLNEXT */ -# ifdef VSTATUS -# if NUMCC <= VSTATUS -# undef VSTATUS -# endif /* NUMCC <= VSTATUS */ -# endif /* VSTATUS */ -# ifdef VPAGE -# if NUMCC <= VPAGE -# undef VPAGE -# endif /* NUMCC <= VPAGE */ -# endif /* VPAGE */ -# ifdef VPGOFF -# if NUMCC <= VPGOFF -# undef VPGOFF -# endif /* NUMCC <= VPGOFF */ -# endif /* VPGOFF */ -# ifdef VKILL2 -# if NUMCC <= VKILL2 -# undef VKILL2 -# endif /* NUMCC <= VKILL2 */ -# endif /* VKILL2 */ -# ifdef VBRK -# if NUMCC <= VBRK -# undef VBRK -# endif /* NUMCC <= VBRK */ -# endif /* VBRK */ -# ifdef VMIN -# if NUMCC <= VMIN -# undef VMIN -# endif /* NUMCC <= VMIN */ -# endif /* VMIN */ -# ifdef VTIME -# if NUMCC <= VTIME -# undef VTIME -# endif /* NUMCC <= VTIME */ -# endif /* VTIME */ -# endif /* NUMCC */ -#endif /* !POSIX */ - -#define C_INTR 0 -#define C_QUIT 1 -#define C_ERASE 2 -#define C_KILL 3 -#define C_EOF 4 -#define C_EOL 5 -#define C_EOL2 6 -#define C_SWTCH 7 -#define C_DSWTCH 8 -#define C_ERASE2 9 -#define C_START 10 -#define C_STOP 11 -#define C_WERASE 12 -#define C_SUSP 13 -#define C_DSUSP 14 -#define C_REPRINT 15 -#define C_DISCARD 16 -#define C_LNEXT 17 -#define C_STATUS 18 -#define C_PAGE 19 -#define C_PGOFF 20 -#define C_KILL2 21 -#define C_BRK 22 -#define C_MIN 23 -#define C_TIME 24 -#define C_NCC 25 -#define C_SH(A) (1 << (A)) - -/* - * Terminal dependend data structures - */ -#define EX_IO 0 /* while we are executing */ -#define ED_IO 1 /* while we are editing */ -#define TS_IO 2 /* new mode from terminal */ -#define QU_IO 2 /* used only for quoted chars */ -#define NN_IO 3 /* The number of entries */ - -#define MD_INP 0 -#define MD_OUT 1 -#define MD_CTL 2 -#define MD_LIN 3 -#define MD_CHAR 4 -#define MD_NN 5 - -typedef struct { - const char *t_name; - unsigned int t_setmask; - unsigned int t_clrmask; -} ttyperm_t[NN_IO][MD_NN]; - -typedef unsigned char ttychar_t[NN_IO][C_NCC]; - -protected int tty_init(EditLine *); -protected void tty_end(EditLine *); -protected int tty_stty(EditLine *, int, const Char **); -protected int tty_rawmode(EditLine *); -protected int tty_cookedmode(EditLine *); -protected int tty_quotemode(EditLine *); -protected int tty_noquotemode(EditLine *); -protected void tty_bind_char(EditLine *, int); - -typedef struct { - ttyperm_t t_t; - ttychar_t t_c; - struct termios t_ex, t_ed, t_ts; - int t_tabs; - int t_eight; - speed_t t_speed; - int t_mode; - unsigned char t_vdisable; -} el_tty_t; - - -#endif /* _h_el_tty */ diff --git a/kerberosV/src/lib/libedit/src/unvis.c b/kerberosV/src/lib/libedit/src/unvis.c deleted file mode 100644 index 7f7fd352c96..00000000000 --- a/kerberosV/src/lib/libedit/src/unvis.c +++ /dev/null @@ -1,516 +0,0 @@ -/* $NetBSD: unvis.c,v 1.32 2010/11/27 21:22:11 christos Exp $ */ - -/*- - * Copyright (c) 1989, 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. 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. - */ - -#include "config.h" -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: unvis.c,v 1.32 2010/11/27 21:22:11 christos Exp $"); -#endif -#endif /* LIBC_SCCS and not lint */ - -#include -#include - -#include -#include -#include -#include - -#if !defined(__OpenBSD__) -#ifdef __weak_alias -__weak_alias(strunvis,_strunvis) -#endif -#endif - -#if !HAVE_VIS -/* - * decode driven by state machine - */ -#define S_GROUND 0 /* haven't seen escape char */ -#define S_START 1 /* start decoding special sequence */ -#define S_META 2 /* metachar started (M) */ -#define S_META1 3 /* metachar more, regular char (-) */ -#define S_CTRL 4 /* control char started (^) */ -#define S_OCTAL2 5 /* octal digit 2 */ -#define S_OCTAL3 6 /* octal digit 3 */ -#define S_HEX1 7 /* http hex digit */ -#define S_HEX2 8 /* http hex digit 2 */ -#define S_MIME1 9 /* mime hex digit 1 */ -#define S_MIME2 10 /* mime hex digit 2 */ -#define S_EATCRNL 11 /* mime eating CRNL */ -#define S_AMP 12 /* seen & */ -#define S_NUMBER 13 /* collecting number */ -#define S_STRING 14 /* collecting string */ - -#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') -#define xtod(c) (isdigit(c) ? (c - '0') : ((tolower(c) - 'a') + 10)) -#define XTOD(c) (isdigit(c) ? (c - '0') : ((c - 'A') + 10)) - -/* - * RFC 1866 - */ -static const struct nv { - const char *name; - uint8_t value; -} nv[] = { - { "AElig", 198 }, /* capital AE diphthong (ligature) */ - { "Aacute", 193 }, /* capital A, acute accent */ - { "Acirc", 194 }, /* capital A, circumflex accent */ - { "Agrave", 192 }, /* capital A, grave accent */ - { "Aring", 197 }, /* capital A, ring */ - { "Atilde", 195 }, /* capital A, tilde */ - { "Auml", 196 }, /* capital A, dieresis or umlaut mark */ - { "Ccedil", 199 }, /* capital C, cedilla */ - { "ETH", 208 }, /* capital Eth, Icelandic */ - { "Eacute", 201 }, /* capital E, acute accent */ - { "Ecirc", 202 }, /* capital E, circumflex accent */ - { "Egrave", 200 }, /* capital E, grave accent */ - { "Euml", 203 }, /* capital E, dieresis or umlaut mark */ - { "Iacute", 205 }, /* capital I, acute accent */ - { "Icirc", 206 }, /* capital I, circumflex accent */ - { "Igrave", 204 }, /* capital I, grave accent */ - { "Iuml", 207 }, /* capital I, dieresis or umlaut mark */ - { "Ntilde", 209 }, /* capital N, tilde */ - { "Oacute", 211 }, /* capital O, acute accent */ - { "Ocirc", 212 }, /* capital O, circumflex accent */ - { "Ograve", 210 }, /* capital O, grave accent */ - { "Oslash", 216 }, /* capital O, slash */ - { "Otilde", 213 }, /* capital O, tilde */ - { "Ouml", 214 }, /* capital O, dieresis or umlaut mark */ - { "THORN", 222 }, /* capital THORN, Icelandic */ - { "Uacute", 218 }, /* capital U, acute accent */ - { "Ucirc", 219 }, /* capital U, circumflex accent */ - { "Ugrave", 217 }, /* capital U, grave accent */ - { "Uuml", 220 }, /* capital U, dieresis or umlaut mark */ - { "Yacute", 221 }, /* capital Y, acute accent */ - { "aacute", 225 }, /* small a, acute accent */ - { "acirc", 226 }, /* small a, circumflex accent */ - { "acute", 180 }, /* acute accent */ - { "aelig", 230 }, /* small ae diphthong (ligature) */ - { "agrave", 224 }, /* small a, grave accent */ - { "amp", 38 }, /* ampersand */ - { "aring", 229 }, /* small a, ring */ - { "atilde", 227 }, /* small a, tilde */ - { "auml", 228 }, /* small a, dieresis or umlaut mark */ - { "brvbar", 166 }, /* broken (vertical) bar */ - { "ccedil", 231 }, /* small c, cedilla */ - { "cedil", 184 }, /* cedilla */ - { "cent", 162 }, /* cent sign */ - { "copy", 169 }, /* copyright sign */ - { "curren", 164 }, /* general currency sign */ - { "deg", 176 }, /* degree sign */ - { "divide", 247 }, /* divide sign */ - { "eacute", 233 }, /* small e, acute accent */ - { "ecirc", 234 }, /* small e, circumflex accent */ - { "egrave", 232 }, /* small e, grave accent */ - { "eth", 240 }, /* small eth, Icelandic */ - { "euml", 235 }, /* small e, dieresis or umlaut mark */ - { "frac12", 189 }, /* fraction one-half */ - { "frac14", 188 }, /* fraction one-quarter */ - { "frac34", 190 }, /* fraction three-quarters */ - { "gt", 62 }, /* greater than */ - { "iacute", 237 }, /* small i, acute accent */ - { "icirc", 238 }, /* small i, circumflex accent */ - { "iexcl", 161 }, /* inverted exclamation mark */ - { "igrave", 236 }, /* small i, grave accent */ - { "iquest", 191 }, /* inverted question mark */ - { "iuml", 239 }, /* small i, dieresis or umlaut mark */ - { "laquo", 171 }, /* angle quotation mark, left */ - { "lt", 60 }, /* less than */ - { "macr", 175 }, /* macron */ - { "micro", 181 }, /* micro sign */ - { "middot", 183 }, /* middle dot */ - { "nbsp", 160 }, /* no-break space */ - { "not", 172 }, /* not sign */ - { "ntilde", 241 }, /* small n, tilde */ - { "oacute", 243 }, /* small o, acute accent */ - { "ocirc", 244 }, /* small o, circumflex accent */ - { "ograve", 242 }, /* small o, grave accent */ - { "ordf", 170 }, /* ordinal indicator, feminine */ - { "ordm", 186 }, /* ordinal indicator, masculine */ - { "oslash", 248 }, /* small o, slash */ - { "otilde", 245 }, /* small o, tilde */ - { "ouml", 246 }, /* small o, dieresis or umlaut mark */ - { "para", 182 }, /* pilcrow (paragraph sign) */ - { "plusmn", 177 }, /* plus-or-minus sign */ - { "pound", 163 }, /* pound sterling sign */ - { "quot", 34 }, /* double quote */ - { "raquo", 187 }, /* angle quotation mark, right */ - { "reg", 174 }, /* registered sign */ - { "sect", 167 }, /* section sign */ - { "shy", 173 }, /* soft hyphen */ - { "sup1", 185 }, /* superscript one */ - { "sup2", 178 }, /* superscript two */ - { "sup3", 179 }, /* superscript three */ - { "szlig", 223 }, /* small sharp s, German (sz ligature) */ - { "thorn", 254 }, /* small thorn, Icelandic */ - { "times", 215 }, /* multiply sign */ - { "uacute", 250 }, /* small u, acute accent */ - { "ucirc", 251 }, /* small u, circumflex accent */ - { "ugrave", 249 }, /* small u, grave accent */ - { "uml", 168 }, /* umlaut (dieresis) */ - { "uuml", 252 }, /* small u, dieresis or umlaut mark */ - { "yacute", 253 }, /* small y, acute accent */ - { "yen", 165 }, /* yen sign */ - { "yuml", 255 }, /* small y, dieresis or umlaut mark */ -}; - -/* - * unvis - decode characters previously encoded by vis - */ -int -unvis(char *cp, int c, int *astate, int flag) -{ - unsigned char uc = (unsigned char)c; - unsigned char st, ia, is, lc; - -/* - * Bottom 8 bits of astate hold the state machine state. - * Top 8 bits hold the current character in the http 1866 nv string decoding - */ -#define GS(a) ((a) & 0xff) -#define SS(a, b) (((uint32_t)(a) << 24) | (b)) -#define GI(a) ((uint32_t)(a) >> 24) - - _DIAGASSERT(cp != NULL); - _DIAGASSERT(astate != NULL); - st = GS(*astate); - - if (flag & UNVIS_END) { - switch (st) { - case S_OCTAL2: - case S_OCTAL3: - case S_HEX2: - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case S_GROUND: - return UNVIS_NOCHAR; - default: - return UNVIS_SYNBAD; - } - } - - switch (st) { - - case S_GROUND: - *cp = 0; - if ((flag & VIS_NOESCAPE) == 0 && c == '\\') { - *astate = SS(0, S_START); - return UNVIS_NOCHAR; - } - if ((flag & VIS_HTTP1808) && c == '%') { - *astate = SS(0, S_HEX1); - return UNVIS_NOCHAR; - } - if ((flag & VIS_HTTP1866) && c == '&') { - *astate = SS(0, S_AMP); - return UNVIS_NOCHAR; - } - if ((flag & VIS_MIMESTYLE) && c == '=') { - *astate = SS(0, S_MIME1); - return UNVIS_NOCHAR; - } - *cp = c; - return UNVIS_VALID; - - case S_START: - switch(c) { - case '\\': - *cp = c; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case '0': case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - *cp = (c - '0'); - *astate = SS(0, S_OCTAL2); - return UNVIS_NOCHAR; - case 'M': - *cp = (char)0200; - *astate = SS(0, S_META); - return UNVIS_NOCHAR; - case '^': - *astate = SS(0, S_CTRL); - return UNVIS_NOCHAR; - case 'n': - *cp = '\n'; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case 'r': - *cp = '\r'; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case 'b': - *cp = '\b'; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case 'a': - *cp = '\007'; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case 'v': - *cp = '\v'; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case 't': - *cp = '\t'; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case 'f': - *cp = '\f'; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case 's': - *cp = ' '; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case 'E': - *cp = '\033'; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - case '\n': - /* - * hidden newline - */ - *astate = SS(0, S_GROUND); - return UNVIS_NOCHAR; - case '$': - /* - * hidden marker - */ - *astate = SS(0, S_GROUND); - return UNVIS_NOCHAR; - } - goto bad; - - case S_META: - if (c == '-') - *astate = SS(0, S_META1); - else if (c == '^') - *astate = SS(0, S_CTRL); - else - goto bad; - return UNVIS_NOCHAR; - - case S_META1: - *astate = SS(0, S_GROUND); - *cp |= c; - return UNVIS_VALID; - - case S_CTRL: - if (c == '?') - *cp |= 0177; - else - *cp |= c & 037; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - - case S_OCTAL2: /* second possible octal digit */ - if (isoctal(uc)) { - /* - * yes - and maybe a third - */ - *cp = (*cp << 3) + (c - '0'); - *astate = SS(0, S_OCTAL3); - return UNVIS_NOCHAR; - } - /* - * no - done with current sequence, push back passed char - */ - *astate = SS(0, S_GROUND); - return UNVIS_VALIDPUSH; - - case S_OCTAL3: /* third possible octal digit */ - *astate = SS(0, S_GROUND); - if (isoctal(uc)) { - *cp = (*cp << 3) + (c - '0'); - return UNVIS_VALID; - } - /* - * we were done, push back passed char - */ - return UNVIS_VALIDPUSH; - - case S_HEX1: - if (isxdigit(uc)) { - *cp = xtod(uc); - *astate = SS(0, S_HEX2); - return UNVIS_NOCHAR; - } - /* - * no - done with current sequence, push back passed char - */ - *astate = SS(0, S_GROUND); - return UNVIS_VALIDPUSH; - - case S_HEX2: - *astate = S_GROUND; - if (isxdigit(uc)) { - *cp = xtod(uc) | (*cp << 4); - return UNVIS_VALID; - } - return UNVIS_VALIDPUSH; - - case S_MIME1: - if (uc == '\n' || uc == '\r') { - *astate = SS(0, S_EATCRNL); - return UNVIS_NOCHAR; - } - if (isxdigit(uc) && (isdigit(uc) || isupper(uc))) { - *cp = XTOD(uc); - *astate = SS(0, S_MIME2); - return UNVIS_NOCHAR; - } - goto bad; - - case S_MIME2: - if (isxdigit(uc) && (isdigit(uc) || isupper(uc))) { - *astate = SS(0, S_GROUND); - *cp = XTOD(uc) | (*cp << 4); - return UNVIS_VALID; - } - goto bad; - - case S_EATCRNL: - switch (uc) { - case '\r': - case '\n': - return UNVIS_NOCHAR; - case '=': - *astate = SS(0, S_MIME1); - return UNVIS_NOCHAR; - default: - *cp = uc; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - } - - case S_AMP: - *cp = 0; - if (uc == '#') { - *astate = SS(0, S_NUMBER); - return UNVIS_NOCHAR; - } - *astate = SS(0, S_STRING); - /*FALLTHROUGH*/ - - case S_STRING: - ia = *cp; /* index in the array */ - is = GI(*astate); /* index in the string */ - lc = is == 0 ? 0 : nv[ia].name[is - 1]; /* last character */ - - if (uc == ';') - uc = '\0'; - - for (; ia < __arraycount(nv); ia++) { - if (is != 0 && nv[ia].name[is - 1] != lc) - goto bad; - if (nv[ia].name[is] == uc) - break; - } - - if (*cp == __arraycount(nv)) - goto bad; - - if (uc != 0) { - *cp = ia; - *astate = SS(is + 1, S_STRING); - return UNVIS_NOCHAR; - } - - *cp = nv[ia].value; - *astate = SS(0, S_GROUND); - return UNVIS_VALID; - - case S_NUMBER: - if (uc == ';') - return UNVIS_VALID; - if (!isdigit(uc)) - goto bad; - *cp += (*cp * 10) + uc - '0'; - return UNVIS_NOCHAR; - - default: - bad: - /* - * decoder in unknown state - (probably uninitialized) - */ - *astate = SS(0, S_GROUND); - return UNVIS_SYNBAD; - } -} - -/* - * strunvis - decode src into dst - * - * Number of chars decoded into dst is returned, -1 on error. - * Dst is null terminated. - */ - -int -strunvisx(char *dst, const char *src, int flag) -{ - char c; - char *start = dst; - int state = 0; - - _DIAGASSERT(src != NULL); - _DIAGASSERT(dst != NULL); - - while ((c = *src++) != '\0') { - again: - switch (unvis(dst, c, &state, flag)) { - case UNVIS_VALID: - dst++; - break; - case UNVIS_VALIDPUSH: - dst++; - goto again; - case 0: - case UNVIS_NOCHAR: - break; - default: - return (-1); - } - } - if (unvis(dst, c, &state, UNVIS_END) == UNVIS_VALID) - dst++; - *dst = '\0'; - return (int)(dst - start); -} - -int -strunvis(char *dst, const char *src) -{ - return strunvisx(dst, src, 0); -} -#endif diff --git a/kerberosV/src/lib/libedit/src/vi.c b/kerberosV/src/lib/libedit/src/vi.c deleted file mode 100644 index fb8ee720362..00000000000 --- a/kerberosV/src/lib/libedit/src/vi.c +++ /dev/null @@ -1,1162 +0,0 @@ -/* $NetBSD: vi.c,v 1.34 2011/02/22 05:45:08 joerg 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 - * Christos Zoulas of Cornell University. - * - * 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 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. - */ - -#include "config.h" -#include -#include -#include -#include - -#if !defined(lint) && !defined(SCCSID) -#if 0 -static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: vi.c,v 1.34 2011/02/22 05:45:08 joerg Exp $"); -#endif -#endif /* not lint && not SCCSID */ - -/* - * vi.c: Vi mode commands. - */ -#include "el.h" - -private el_action_t cv_action(EditLine *, Int); -private el_action_t cv_paste(EditLine *, Int); - -/* cv_action(): - * Handle vi actions. - */ -private el_action_t -cv_action(EditLine *el, Int c) -{ - - if (el->el_chared.c_vcmd.action != NOP) { - /* 'cc', 'dd' and (possibly) friends */ - if (c != el->el_chared.c_vcmd.action) - return CC_ERROR; - - if (!(c & YANK)) - cv_undo(el); - cv_yank(el, el->el_line.buffer, - (int)(el->el_line.lastchar - el->el_line.buffer)); - el->el_chared.c_vcmd.action = NOP; - el->el_chared.c_vcmd.pos = 0; - if (!(c & YANK)) { - el->el_line.lastchar = el->el_line.buffer; - el->el_line.cursor = el->el_line.buffer; - } - if (c & INSERT) - el->el_map.current = el->el_map.key; - - return (CC_REFRESH); - } - el->el_chared.c_vcmd.pos = el->el_line.cursor; - el->el_chared.c_vcmd.action = c; - return (CC_ARGHACK); -} - -/* cv_paste(): - * Paste previous deletion before or after the cursor - */ -private el_action_t -cv_paste(EditLine *el, Int c) -{ - c_kill_t *k = &el->el_chared.c_kill; - size_t len = (size_t)(k->last - k->buf); - - if (k->buf == NULL || len == 0) - return (CC_ERROR); -#ifdef DEBUG_PASTE - (void) fprintf(el->el_errfile, "Paste: \"%.*s\"\n", (int)len, k->buf); -#endif - - cv_undo(el); - - if (!c && el->el_line.cursor < el->el_line.lastchar) - el->el_line.cursor++; - - c_insert(el, (int)len); - if (el->el_line.cursor + len > el->el_line.lastchar) - return (CC_ERROR); - (void) memcpy(el->el_line.cursor, k->buf, len * - sizeof(*el->el_line.cursor)); - - return (CC_REFRESH); -} - - -/* vi_paste_next(): - * Vi paste previous deletion to the right of the cursor - * [p] - */ -protected el_action_t -/*ARGSUSED*/ -vi_paste_next(EditLine *el, Int c __attribute__((__unused__))) -{ - - return (cv_paste(el, 0)); -} - - -/* vi_paste_prev(): - * Vi paste previous deletion to the left of the cursor - * [P] - */ -protected el_action_t -/*ARGSUSED*/ -vi_paste_prev(EditLine *el, Int c __attribute__((__unused__))) -{ - - return (cv_paste(el, 1)); -} - - -/* vi_prev_big_word(): - * Vi move to the previous space delimited word - * [B] - */ -protected el_action_t -/*ARGSUSED*/ -vi_prev_big_word(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor == el->el_line.buffer) - return (CC_ERROR); - - el->el_line.cursor = cv_prev_word(el->el_line.cursor, - el->el_line.buffer, - el->el_state.argument, - cv__isWord); - - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - - -/* vi_prev_word(): - * Vi move to the previous word - * [b] - */ -protected el_action_t -/*ARGSUSED*/ -vi_prev_word(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor == el->el_line.buffer) - return (CC_ERROR); - - el->el_line.cursor = cv_prev_word(el->el_line.cursor, - el->el_line.buffer, - el->el_state.argument, - cv__isword); - - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - - -/* vi_next_big_word(): - * Vi move to the next space delimited word - * [W] - */ -protected el_action_t -/*ARGSUSED*/ -vi_next_big_word(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor >= el->el_line.lastchar - 1) - return (CC_ERROR); - - el->el_line.cursor = cv_next_word(el, el->el_line.cursor, - el->el_line.lastchar, el->el_state.argument, cv__isWord); - - if (el->el_map.type == MAP_VI) - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - - -/* vi_next_word(): - * Vi move to the next word - * [w] - */ -protected el_action_t -/*ARGSUSED*/ -vi_next_word(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor >= el->el_line.lastchar - 1) - return (CC_ERROR); - - el->el_line.cursor = cv_next_word(el, el->el_line.cursor, - el->el_line.lastchar, el->el_state.argument, cv__isword); - - if (el->el_map.type == MAP_VI) - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - - -/* vi_change_case(): - * Vi change case of character under the cursor and advance one character - * [~] - */ -protected el_action_t -vi_change_case(EditLine *el, Int c) -{ - int i; - - if (el->el_line.cursor >= el->el_line.lastchar) - return (CC_ERROR); - cv_undo(el); - for (i = 0; i < el->el_state.argument; i++) { - - c = *el->el_line.cursor; - if (Isupper(c)) - *el->el_line.cursor = Tolower(c); - else if (Islower(c)) - *el->el_line.cursor = Toupper(c); - - if (++el->el_line.cursor >= el->el_line.lastchar) { - el->el_line.cursor--; - re_fastaddc(el); - break; - } - re_fastaddc(el); - } - return CC_NORM; -} - - -/* vi_change_meta(): - * Vi change prefix command - * [c] - */ -protected el_action_t -/*ARGSUSED*/ -vi_change_meta(EditLine *el, Int c __attribute__((__unused__))) -{ - - /* - * Delete with insert == change: first we delete and then we leave in - * insert mode. - */ - return (cv_action(el, DELETE | INSERT)); -} - - -/* vi_insert_at_bol(): - * Vi enter insert mode at the beginning of line - * [I] - */ -protected el_action_t -/*ARGSUSED*/ -vi_insert_at_bol(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_line.cursor = el->el_line.buffer; - cv_undo(el); - el->el_map.current = el->el_map.key; - return (CC_CURSOR); -} - - -/* vi_replace_char(): - * Vi replace character under the cursor with the next character typed - * [r] - */ -protected el_action_t -/*ARGSUSED*/ -vi_replace_char(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor >= el->el_line.lastchar) - return CC_ERROR; - - el->el_map.current = el->el_map.key; - el->el_state.inputmode = MODE_REPLACE_1; - cv_undo(el); - return (CC_ARGHACK); -} - - -/* vi_replace_mode(): - * Vi enter replace mode - * [R] - */ -protected el_action_t -/*ARGSUSED*/ -vi_replace_mode(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_map.current = el->el_map.key; - el->el_state.inputmode = MODE_REPLACE; - cv_undo(el); - return (CC_NORM); -} - - -/* vi_substitute_char(): - * Vi replace character under the cursor and enter insert mode - * [s] - */ -protected el_action_t -/*ARGSUSED*/ -vi_substitute_char(EditLine *el, Int c __attribute__((__unused__))) -{ - - c_delafter(el, el->el_state.argument); - el->el_map.current = el->el_map.key; - return (CC_REFRESH); -} - - -/* vi_substitute_line(): - * Vi substitute entire line - * [S] - */ -protected el_action_t -/*ARGSUSED*/ -vi_substitute_line(EditLine *el, Int c __attribute__((__unused__))) -{ - - cv_undo(el); - cv_yank(el, el->el_line.buffer, - (int)(el->el_line.lastchar - el->el_line.buffer)); - (void) em_kill_line(el, 0); - el->el_map.current = el->el_map.key; - return (CC_REFRESH); -} - - -/* vi_change_to_eol(): - * Vi change to end of line - * [C] - */ -protected el_action_t -/*ARGSUSED*/ -vi_change_to_eol(EditLine *el, Int c __attribute__((__unused__))) -{ - - cv_undo(el); - cv_yank(el, el->el_line.cursor, - (int)(el->el_line.lastchar - el->el_line.cursor)); - (void) ed_kill_line(el, 0); - el->el_map.current = el->el_map.key; - return (CC_REFRESH); -} - - -/* vi_insert(): - * Vi enter insert mode - * [i] - */ -protected el_action_t -/*ARGSUSED*/ -vi_insert(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_map.current = el->el_map.key; - cv_undo(el); - return (CC_NORM); -} - - -/* vi_add(): - * Vi enter insert mode after the cursor - * [a] - */ -protected el_action_t -/*ARGSUSED*/ -vi_add(EditLine *el, Int c __attribute__((__unused__))) -{ - int ret; - - el->el_map.current = el->el_map.key; - if (el->el_line.cursor < el->el_line.lastchar) { - el->el_line.cursor++; - if (el->el_line.cursor > el->el_line.lastchar) - el->el_line.cursor = el->el_line.lastchar; - ret = CC_CURSOR; - } else - ret = CC_NORM; - - cv_undo(el); - - return (ret); -} - - -/* vi_add_at_eol(): - * Vi enter insert mode at end of line - * [A] - */ -protected el_action_t -/*ARGSUSED*/ -vi_add_at_eol(EditLine *el, Int c __attribute__((__unused__))) -{ - - el->el_map.current = el->el_map.key; - el->el_line.cursor = el->el_line.lastchar; - cv_undo(el); - return (CC_CURSOR); -} - - -/* vi_delete_meta(): - * Vi delete prefix command - * [d] - */ -protected el_action_t -/*ARGSUSED*/ -vi_delete_meta(EditLine *el, Int c __attribute__((__unused__))) -{ - - return (cv_action(el, DELETE)); -} - - -/* vi_end_big_word(): - * Vi move to the end of the current space delimited word - * [E] - */ -protected el_action_t -/*ARGSUSED*/ -vi_end_big_word(EditLine *el, Int c) -{ - - if (el->el_line.cursor == el->el_line.lastchar) - return (CC_ERROR); - - el->el_line.cursor = cv__endword(el->el_line.cursor, - el->el_line.lastchar, el->el_state.argument, cv__isWord); - - if (el->el_chared.c_vcmd.action != NOP) { - el->el_line.cursor++; - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - - -/* vi_end_word(): - * Vi move to the end of the current word - * [e] - */ -protected el_action_t -/*ARGSUSED*/ -vi_end_word(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor == el->el_line.lastchar) - return (CC_ERROR); - - el->el_line.cursor = cv__endword(el->el_line.cursor, - el->el_line.lastchar, el->el_state.argument, cv__isword); - - if (el->el_chared.c_vcmd.action != NOP) { - el->el_line.cursor++; - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - - -/* vi_undo(): - * Vi undo last change - * [u] - */ -protected el_action_t -/*ARGSUSED*/ -vi_undo(EditLine *el, Int c __attribute__((__unused__))) -{ - c_undo_t un = el->el_chared.c_undo; - - if (un.len == -1) - return CC_ERROR; - - /* switch line buffer and undo buffer */ - el->el_chared.c_undo.buf = el->el_line.buffer; - el->el_chared.c_undo.len = el->el_line.lastchar - el->el_line.buffer; - el->el_chared.c_undo.cursor = - (int)(el->el_line.cursor - el->el_line.buffer); - el->el_line.limit = un.buf + (el->el_line.limit - el->el_line.buffer); - el->el_line.buffer = un.buf; - el->el_line.cursor = un.buf + un.cursor; - el->el_line.lastchar = un.buf + un.len; - - return (CC_REFRESH); -} - - -/* vi_command_mode(): - * Vi enter command mode (use alternative key bindings) - * [] - */ -protected el_action_t -/*ARGSUSED*/ -vi_command_mode(EditLine *el, Int c __attribute__((__unused__))) -{ - - /* [Esc] cancels pending action */ - el->el_chared.c_vcmd.action = NOP; - el->el_chared.c_vcmd.pos = 0; - - el->el_state.doingarg = 0; - - el->el_state.inputmode = MODE_INSERT; - el->el_map.current = el->el_map.alt; -#ifdef VI_MOVE - if (el->el_line.cursor > el->el_line.buffer) - el->el_line.cursor--; -#endif - return (CC_CURSOR); -} - - -/* vi_zero(): - * Vi move to the beginning of line - * [0] - */ -protected el_action_t -vi_zero(EditLine *el, Int c) -{ - - if (el->el_state.doingarg) - return ed_argument_digit(el, c); - - el->el_line.cursor = el->el_line.buffer; - if (el->el_chared.c_vcmd.action != NOP) { - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - - -/* vi_delete_prev_char(): - * Vi move to previous character (backspace) - * [^H] in insert mode only - */ -protected el_action_t -/*ARGSUSED*/ -vi_delete_prev_char(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_line.cursor <= el->el_line.buffer) - return (CC_ERROR); - - c_delbefore1(el); - el->el_line.cursor--; - return (CC_REFRESH); -} - - -/* vi_list_or_eof(): - * Vi list choices for completion or indicate end of file if empty line - * [^D] - */ -protected el_action_t -/*ARGSUSED*/ -vi_list_or_eof(EditLine *el, Int c) -{ - - if (el->el_line.cursor == el->el_line.lastchar) { - if (el->el_line.cursor == el->el_line.buffer) { - term_writec(el, c); /* then do a EOF */ - return (CC_EOF); - } else { - /* - * Here we could list completions, but it is an - * error right now - */ - term_beep(el); - return (CC_ERROR); - } - } else { -#ifdef notyet - re_goto_bottom(el); - *el->el_line.lastchar = '\0'; /* just in case */ - return (CC_LIST_CHOICES); -#else - /* - * Just complain for now. - */ - term_beep(el); - return (CC_ERROR); -#endif - } -} - - -/* vi_kill_line_prev(): - * Vi cut from beginning of line to cursor - * [^U] - */ -protected el_action_t -/*ARGSUSED*/ -vi_kill_line_prev(EditLine *el, Int c __attribute__((__unused__))) -{ - Char *kp, *cp; - - cp = el->el_line.buffer; - kp = el->el_chared.c_kill.buf; - while (cp < el->el_line.cursor) - *kp++ = *cp++; /* copy it */ - el->el_chared.c_kill.last = kp; - c_delbefore(el, (int)(el->el_line.cursor - el->el_line.buffer)); - el->el_line.cursor = el->el_line.buffer; /* zap! */ - return (CC_REFRESH); -} - - -/* vi_search_prev(): - * Vi search history previous - * [?] - */ -protected el_action_t -/*ARGSUSED*/ -vi_search_prev(EditLine *el, Int c __attribute__((__unused__))) -{ - - return (cv_search(el, ED_SEARCH_PREV_HISTORY)); -} - - -/* vi_search_next(): - * Vi search history next - * [/] - */ -protected el_action_t -/*ARGSUSED*/ -vi_search_next(EditLine *el, Int c __attribute__((__unused__))) -{ - - return (cv_search(el, ED_SEARCH_NEXT_HISTORY)); -} - - -/* vi_repeat_search_next(): - * Vi repeat current search in the same search direction - * [n] - */ -protected el_action_t -/*ARGSUSED*/ -vi_repeat_search_next(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_search.patlen == 0) - return (CC_ERROR); - else - return (cv_repeat_srch(el, el->el_search.patdir)); -} - - -/* vi_repeat_search_prev(): - * Vi repeat current search in the opposite search direction - * [N] - */ -/*ARGSUSED*/ -protected el_action_t -vi_repeat_search_prev(EditLine *el, Int c __attribute__((__unused__))) -{ - - if (el->el_search.patlen == 0) - return (CC_ERROR); - else - return (cv_repeat_srch(el, - el->el_search.patdir == ED_SEARCH_PREV_HISTORY ? - ED_SEARCH_NEXT_HISTORY : ED_SEARCH_PREV_HISTORY)); -} - - -/* vi_next_char(): - * Vi move to the character specified next - * [f] - */ -protected el_action_t -/*ARGSUSED*/ -vi_next_char(EditLine *el, Int c __attribute__((__unused__))) -{ - return cv_csearch(el, CHAR_FWD, -1, el->el_state.argument, 0); -} - - -/* vi_prev_char(): - * Vi move to the character specified previous - * [F] - */ -protected el_action_t -/*ARGSUSED*/ -vi_prev_char(EditLine *el, Int c __attribute__((__unused__))) -{ - return cv_csearch(el, CHAR_BACK, -1, el->el_state.argument, 0); -} - - -/* vi_to_next_char(): - * Vi move up to the character specified next - * [t] - */ -protected el_action_t -/*ARGSUSED*/ -vi_to_next_char(EditLine *el, Int c __attribute__((__unused__))) -{ - return cv_csearch(el, CHAR_FWD, -1, el->el_state.argument, 1); -} - - -/* vi_to_prev_char(): - * Vi move up to the character specified previous - * [T] - */ -protected el_action_t -/*ARGSUSED*/ -vi_to_prev_char(EditLine *el, Int c __attribute__((__unused__))) -{ - return cv_csearch(el, CHAR_BACK, -1, el->el_state.argument, 1); -} - - -/* vi_repeat_next_char(): - * Vi repeat current character search in the same search direction - * [;] - */ -protected el_action_t -/*ARGSUSED*/ -vi_repeat_next_char(EditLine *el, Int c __attribute__((__unused__))) -{ - - return cv_csearch(el, el->el_search.chadir, el->el_search.chacha, - el->el_state.argument, el->el_search.chatflg); -} - - -/* vi_repeat_prev_char(): - * Vi repeat current character search in the opposite search direction - * [,] - */ -protected el_action_t -/*ARGSUSED*/ -vi_repeat_prev_char(EditLine *el, Int c __attribute__((__unused__))) -{ - el_action_t r; - int dir = el->el_search.chadir; - - r = cv_csearch(el, -dir, el->el_search.chacha, - el->el_state.argument, el->el_search.chatflg); - el->el_search.chadir = dir; - return r; -} - - -/* vi_match(): - * Vi go to matching () {} or [] - * [%] - */ -protected el_action_t -/*ARGSUSED*/ -vi_match(EditLine *el, Int c) -{ - const Char match_chars[] = STR("()[]{}"); - Char *cp; - size_t delta, i, count; - Char o_ch, c_ch; - - *el->el_line.lastchar = '\0'; /* just in case */ - - i = Strcspn(el->el_line.cursor, match_chars); - o_ch = el->el_line.cursor[i]; - if (o_ch == 0) - return CC_ERROR; - delta = Strchr(match_chars, o_ch) - match_chars; - c_ch = match_chars[delta ^ 1]; - count = 1; - delta = 1 - (delta & 1) * 2; - - for (cp = &el->el_line.cursor[i]; count; ) { - cp += delta; - if (cp < el->el_line.buffer || cp >= el->el_line.lastchar) - return CC_ERROR; - if (*cp == o_ch) - count++; - else if (*cp == c_ch) - count--; - } - - el->el_line.cursor = cp; - - if (el->el_chared.c_vcmd.action != NOP) { - /* NB posix says char under cursor should NOT be deleted - for -ve delta - this is different to netbsd vi. */ - if (delta > 0) - el->el_line.cursor++; - cv_delfini(el); - return (CC_REFRESH); - } - return (CC_CURSOR); -} - -/* vi_undo_line(): - * Vi undo all changes to line - * [U] - */ -protected el_action_t -/*ARGSUSED*/ -vi_undo_line(EditLine *el, Int c) -{ - - cv_undo(el); - return hist_get(el); -} - -/* vi_to_column(): - * Vi go to specified column - * [|] - * NB netbsd vi goes to screen column 'n', posix says nth character - */ -protected el_action_t -/*ARGSUSED*/ -vi_to_column(EditLine *el, Int c) -{ - - el->el_line.cursor = el->el_line.buffer; - el->el_state.argument--; - return ed_next_char(el, 0); -} - -/* vi_yank_end(): - * Vi yank to end of line - * [Y] - */ -protected el_action_t -/*ARGSUSED*/ -vi_yank_end(EditLine *el, Int c) -{ - - cv_yank(el, el->el_line.cursor, - (int)(el->el_line.lastchar - el->el_line.cursor)); - return CC_REFRESH; -} - -/* vi_yank(): - * Vi yank - * [y] - */ -protected el_action_t -/*ARGSUSED*/ -vi_yank(EditLine *el, Int c) -{ - - return cv_action(el, YANK); -} - -/* vi_comment_out(): - * Vi comment out current command - * [#] - */ -protected el_action_t -/*ARGSUSED*/ -vi_comment_out(EditLine *el, Int c) -{ - - el->el_line.cursor = el->el_line.buffer; - c_insert(el, 1); - *el->el_line.cursor = '#'; - re_refresh(el); - return ed_newline(el, 0); -} - -/* vi_alias(): - * Vi include shell alias - * [@] - * NB: posix implies that we should enter insert mode, however - * this is against historical precedent... - */ -#undef __weak_reference /* __weak_reference is different on freebsd */ -#ifdef __weak_reference -__weakref_visible char *my_get_alias_text(const char *) - __weak_reference(get_alias_text); -#endif -protected el_action_t -/*ARGSUSED*/ -vi_alias(EditLine *el, Int c) -{ -#ifdef __weak_reference - char alias_name[3]; - char *alias_text; - - if (my_get_alias_text == 0) { - return CC_ERROR; - } - - alias_name[0] = '_'; - alias_name[2] = 0; - if (el_getc(el, &alias_name[1]) != 1) - return CC_ERROR; - - alias_text = my_get_alias_text(alias_name); - if (alias_text != NULL) - FUN(el,push)(el, ct_decode_string(alias_text, &el->el_scratch)); - return CC_NORM; -#else - return CC_ERROR; -#endif -} - -/* vi_to_history_line(): - * Vi go to specified history file line. - * [G] - */ -protected el_action_t -/*ARGSUSED*/ -vi_to_history_line(EditLine *el, Int c) -{ - int sv_event_no = el->el_history.eventno; - el_action_t rval; - - - if (el->el_history.eventno == 0) { - (void) Strncpy(el->el_history.buf, el->el_line.buffer, - EL_BUFSIZ); - el->el_history.last = el->el_history.buf + - (el->el_line.lastchar - el->el_line.buffer); - } - - /* Lack of a 'count' means oldest, not 1 */ - if (!el->el_state.doingarg) { - el->el_history.eventno = 0x7fffffff; - hist_get(el); - } else { - /* This is brain dead, all the rest of this code counts - * upwards going into the past. Here we need count in the - * other direction (to match the output of fc -l). - * I could change the world, but this seems to suffice. - */ - el->el_history.eventno = 1; - if (hist_get(el) == CC_ERROR) - return CC_ERROR; - el->el_history.eventno = 1 + el->el_history.ev.num - - el->el_state.argument; - if (el->el_history.eventno < 0) { - el->el_history.eventno = sv_event_no; - return CC_ERROR; - } - } - rval = hist_get(el); - if (rval == CC_ERROR) - el->el_history.eventno = sv_event_no; - return rval; -} - -/* vi_histedit(): - * Vi edit history line with vi - * [v] - */ -protected el_action_t -/*ARGSUSED*/ -vi_histedit(EditLine *el, Int c) -{ - int fd; - pid_t pid; - ssize_t st; - int status; - char tempfile[] = "/tmp/histedit.XXXXXXXXXX"; - char *cp; - size_t len; - Char *line; - - if (el->el_state.doingarg) { - if (vi_to_history_line(el, 0) == CC_ERROR) - return CC_ERROR; - } - - fd = mkstemp(tempfile); - if (fd < 0) - return CC_ERROR; - len = (size_t)(el->el_line.lastchar - el->el_line.buffer); -#define TMP_BUFSIZ (EL_BUFSIZ * MB_LEN_MAX) - cp = el_malloc(TMP_BUFSIZ); - if (cp == NULL) { - unlink(tempfile); - close(fd); - return CC_ERROR; - } - line = el_malloc(len * sizeof(*line)); - if (line == NULL) { - el_free((ptr_t)cp); - return CC_ERROR; - } - Strncpy(line, el->el_line.buffer, len); - line[len] = '\0'; - ct_wcstombs(cp, line, TMP_BUFSIZ - 1); - cp[TMP_BUFSIZ - 1] = '\0'; - len = strlen(cp); - write(fd, cp, len); - write(fd, "\n", 1); - pid = fork(); - switch (pid) { - case -1: - close(fd); - unlink(tempfile); - el_free(cp); - el_free(line); - return CC_ERROR; - case 0: - close(fd); - execlp("vi", "vi", tempfile, (char *)NULL); - exit(0); - /*NOTREACHED*/ - default: - while (waitpid(pid, &status, 0) != pid) - continue; - lseek(fd, (off_t)0, SEEK_SET); - st = read(fd, cp, TMP_BUFSIZ); - if (st > 0) { - len = (size_t)(el->el_line.lastchar - - el->el_line.buffer); - len = ct_mbstowcs(el->el_line.buffer, cp, len); - if (len > 0 && el->el_line.buffer[len -1] == '\n') - --len; - } - else - len = 0; - el->el_line.cursor = el->el_line.buffer; - el->el_line.lastchar = el->el_line.buffer + len; - el_free(cp); - el_free(line); - break; - } - - close(fd); - unlink(tempfile); - /* return CC_REFRESH; */ - return ed_newline(el, 0); -} - -/* vi_history_word(): - * Vi append word from previous input line - * [_] - * Who knows where this one came from! - * '_' in vi means 'entire current line', so 'cc' is a synonym for 'c_' - */ -protected el_action_t -/*ARGSUSED*/ -vi_history_word(EditLine *el, Int c) -{ - const Char *wp = HIST_FIRST(el); - const Char *wep, *wsp; - int len; - Char *cp; - const Char *lim; - - if (wp == NULL) - return CC_ERROR; - - wep = wsp = 0; - do { - while (Isspace(*wp)) - wp++; - if (*wp == 0) - break; - wsp = wp; - while (*wp && !Isspace(*wp)) - wp++; - wep = wp; - } while ((!el->el_state.doingarg || --el->el_state.argument > 0) - && *wp != 0); - - if (wsp == 0 || (el->el_state.doingarg && el->el_state.argument != 0)) - return CC_ERROR; - - cv_undo(el); - len = (int)(wep - wsp); - if (el->el_line.cursor < el->el_line.lastchar) - el->el_line.cursor++; - c_insert(el, len + 1); - cp = el->el_line.cursor; - lim = el->el_line.limit; - if (cp < lim) - *cp++ = ' '; - while (wsp < wep && cp < lim) - *cp++ = *wsp++; - el->el_line.cursor = cp; - - el->el_map.current = el->el_map.key; - return CC_REFRESH; -} - -/* vi_redo(): - * Vi redo last non-motion command - * [.] - */ -protected el_action_t -/*ARGSUSED*/ -vi_redo(EditLine *el, Int c) -{ - c_redo_t *r = &el->el_chared.c_redo; - - if (!el->el_state.doingarg && r->count) { - el->el_state.doingarg = 1; - el->el_state.argument = r->count; - } - - el->el_chared.c_vcmd.pos = el->el_line.cursor; - el->el_chared.c_vcmd.action = r->action; - if (r->pos != r->buf) { - if (r->pos + 1 > r->lim) - /* sanity */ - r->pos = r->lim - 1; - r->pos[0] = 0; - FUN(el,push)(el, r->buf); - } - - el->el_state.thiscmd = r->cmd; - el->el_state.thisch = r->ch; - return (*el->el_map.func[r->cmd])(el, r->ch); -} diff --git a/kerberosV/src/lib/libedit/src/vis.c b/kerberosV/src/lib/libedit/src/vis.c deleted file mode 100644 index 57dfff5f354..00000000000 --- a/kerberosV/src/lib/libedit/src/vis.c +++ /dev/null @@ -1,425 +0,0 @@ -/* $NetBSD: vis.c,v 1.41 2009/11/23 10:08:47 plunky Exp $ */ - -/*- - * Copyright (c) 1989, 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. 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. - */ - -/*- - * Copyright (c) 1999, 2005 The NetBSD Foundation, Inc. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 "config.h" - -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vis.c,v 1.41 2009/11/23 10:08:47 plunky Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include - -#include -#include -#include - -#if !defined(__OpenBSD__) -#ifdef __weak_alias -__weak_alias(strsvis,_strsvis) -__weak_alias(strsvisx,_strsvisx) -__weak_alias(strvis,_strvis) -__weak_alias(strvisx,_strvisx) -__weak_alias(svis,_svis) -__weak_alias(vis,_vis) -#endif -#endif - -#if !HAVE_VIS || !HAVE_SVIS -#include -#include -#include -#include - -static char *do_svis(char *, int, int, int, const char *); - -#undef BELL -#define BELL '\a' - -#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') -#define iswhite(c) (c == ' ' || c == '\t' || c == '\n') -#define issafe(c) (c == '\b' || c == BELL || c == '\r') -#define xtoa(c) "0123456789abcdef"[c] -#define XTOA(c) "0123456789ABCDEF"[c] - -#define MAXEXTRAS 5 - -#define MAKEEXTRALIST(flag, extra, orig_str) \ -do { \ - const char *orig = orig_str; \ - const char *o = orig; \ - char *e; \ - while (*o++) \ - continue; \ - extra = malloc((size_t)((o - orig) + MAXEXTRAS)); \ - if (!extra) break; \ - for (o = orig, e = extra; (*e++ = *o++) != '\0';) \ - continue; \ - e--; \ - if (flag & VIS_SP) *e++ = ' '; \ - if (flag & VIS_TAB) *e++ = '\t'; \ - if (flag & VIS_NL) *e++ = '\n'; \ - if ((flag & VIS_NOSLASH) == 0) *e++ = '\\'; \ - *e = '\0'; \ -} while (/*CONSTCOND*/0) - -/* - * This is do_hvis, for HTTP style (RFC 1808) - */ -static char * -do_hvis(char *dst, int c, int flag, int nextc, const char *extra) -{ - - if ((isascii(c) && isalnum(c)) - /* safe */ - || c == '$' || c == '-' || c == '_' || c == '.' || c == '+' - /* extra */ - || c == '!' || c == '*' || c == '\'' || c == '(' || c == ')' - || c == ',') { - dst = do_svis(dst, c, flag, nextc, extra); - } else { - *dst++ = '%'; - *dst++ = xtoa(((unsigned int)c >> 4) & 0xf); - *dst++ = xtoa((unsigned int)c & 0xf); - } - - return dst; -} - -/* - * This is do_mvis, for Quoted-Printable MIME (RFC 2045) - * NB: No handling of long lines or CRLF. - */ -static char * -do_mvis(char *dst, int c, int flag, int nextc, const char *extra) -{ - if ((c != '\n') && - /* Space at the end of the line */ - ((isspace(c) && (nextc == '\r' || nextc == '\n')) || - /* Out of range */ - (!isspace(c) && (c < 33 || (c > 60 && c < 62) || c > 126)) || - /* Specific char to be escaped */ - strchr("#$@[\\]^`{|}~", c) != NULL)) { - *dst++ = '='; - *dst++ = XTOA(((unsigned int)c >> 4) & 0xf); - *dst++ = XTOA((unsigned int)c & 0xf); - } else { - dst = do_svis(dst, c, flag, nextc, extra); - } - return dst; -} - -/* - * This is do_vis, the central code of vis. - * dst: Pointer to the destination buffer - * c: Character to encode - * flag: Flag word - * nextc: The character following 'c' - * extra: Pointer to the list of extra characters to be - * backslash-protected. - */ -static char * -do_svis(char *dst, int c, int flag, int nextc, const char *extra) -{ - int isextra; - isextra = strchr(extra, c) != NULL; - if (!isextra && isascii(c) && (isgraph(c) || iswhite(c) || - ((flag & VIS_SAFE) && issafe(c)))) { - *dst++ = c; - return dst; - } - if (flag & VIS_CSTYLE) { - switch (c) { - case '\n': - *dst++ = '\\'; *dst++ = 'n'; - return dst; - case '\r': - *dst++ = '\\'; *dst++ = 'r'; - return dst; - case '\b': - *dst++ = '\\'; *dst++ = 'b'; - return dst; - case BELL: - *dst++ = '\\'; *dst++ = 'a'; - return dst; - case '\v': - *dst++ = '\\'; *dst++ = 'v'; - return dst; - case '\t': - *dst++ = '\\'; *dst++ = 't'; - return dst; - case '\f': - *dst++ = '\\'; *dst++ = 'f'; - return dst; - case ' ': - *dst++ = '\\'; *dst++ = 's'; - return dst; - case '\0': - *dst++ = '\\'; *dst++ = '0'; - if (isoctal(nextc)) { - *dst++ = '0'; - *dst++ = '0'; - } - return dst; - default: - if (isgraph(c)) { - *dst++ = '\\'; *dst++ = c; - return dst; - } - } - } - if (isextra || ((c & 0177) == ' ') || (flag & VIS_OCTAL)) { - *dst++ = '\\'; - *dst++ = (u_char)(((u_int32_t)(u_char)c >> 6) & 03) + '0'; - *dst++ = (u_char)(((u_int32_t)(u_char)c >> 3) & 07) + '0'; - *dst++ = (c & 07) + '0'; - } else { - if ((flag & VIS_NOSLASH) == 0) *dst++ = '\\'; - if (c & 0200) { - c &= 0177; *dst++ = 'M'; - } - if (iscntrl(c)) { - *dst++ = '^'; - if (c == 0177) - *dst++ = '?'; - else - *dst++ = c + '@'; - } else { - *dst++ = '-'; *dst++ = c; - } - } - return dst; -} - -typedef char *(*visfun_t)(char *, int, int, int, const char *); - -/* - * Return the appropriate encoding function depending on the flags given. - */ -static visfun_t -getvisfun(int flag) -{ - if (flag & VIS_HTTPSTYLE) - return do_hvis; - if (flag & VIS_MIMESTYLE) - return do_mvis; - return do_svis; -} - -/* - * svis - visually encode characters, also encoding the characters - * pointed to by `extra' - */ -char * -svis(char *dst, int c, int flag, int nextc, const char *extra) -{ - char *nextra = NULL; - visfun_t f; - - _DIAGASSERT(dst != NULL); - _DIAGASSERT(extra != NULL); - MAKEEXTRALIST(flag, nextra, extra); - if (!nextra) { - *dst = '\0'; /* can't create nextra, return "" */ - return dst; - } - f = getvisfun(flag); - dst = (*f)(dst, c, flag, nextc, nextra); - free(nextra); - *dst = '\0'; - return dst; -} - - -/* - * strsvis, strsvisx - visually encode characters from src into dst - * - * Extra is a pointer to a \0-terminated list of characters to - * be encoded, too. These functions are useful e. g. to - * encode strings in such a way so that they are not interpreted - * by a shell. - * - * Dst must be 4 times the size of src to account for possible - * expansion. The length of dst, not including the trailing NULL, - * is returned. - * - * Strsvisx encodes exactly len bytes from src into dst. - * This is useful for encoding a block of data. - */ -int -strsvis(char *dst, const char *csrc, int flag, const char *extra) -{ - int c; - char *start; - char *nextra = NULL; - const unsigned char *src = (const unsigned char *)csrc; - visfun_t f; - - _DIAGASSERT(dst != NULL); - _DIAGASSERT(src != NULL); - _DIAGASSERT(extra != NULL); - MAKEEXTRALIST(flag, nextra, extra); - if (!nextra) { - *dst = '\0'; /* can't create nextra, return "" */ - return 0; - } - f = getvisfun(flag); - for (start = dst; (c = *src++) != '\0'; /* empty */) - dst = (*f)(dst, c, flag, *src, nextra); - free(nextra); - *dst = '\0'; - return (int)(dst - start); -} - - -int -strsvisx(char *dst, const char *csrc, size_t len, int flag, const char *extra) -{ - unsigned char c; - char *start; - char *nextra = NULL; - const unsigned char *src = (const unsigned char *)csrc; - visfun_t f; - - _DIAGASSERT(dst != NULL); - _DIAGASSERT(src != NULL); - _DIAGASSERT(extra != NULL); - MAKEEXTRALIST(flag, nextra, extra); - if (! nextra) { - *dst = '\0'; /* can't create nextra, return "" */ - return 0; - } - - f = getvisfun(flag); - for (start = dst; len > 0; len--) { - c = *src++; - dst = (*f)(dst, c, flag, len > 1 ? *src : '\0', nextra); - } - free(nextra); - *dst = '\0'; - return (int)(dst - start); -} -#endif - -#if !HAVE_VIS -/* - * vis - visually encode characters - */ -char * -vis(char *dst, int c, int flag, int nextc) -{ - char *extra = NULL; - unsigned char uc = (unsigned char)c; - visfun_t f; - - _DIAGASSERT(dst != NULL); - - MAKEEXTRALIST(flag, extra, ""); - if (! extra) { - *dst = '\0'; /* can't create extra, return "" */ - return dst; - } - f = getvisfun(flag); - dst = (*f)(dst, uc, flag, nextc, extra); - free(extra); - *dst = '\0'; - return dst; -} - - -/* - * strvis, strvisx - visually encode characters from src into dst - * - * Dst must be 4 times the size of src to account for possible - * expansion. The length of dst, not including the trailing NULL, - * is returned. - * - * Strvisx encodes exactly len bytes from src into dst. - * This is useful for encoding a block of data. - */ -int -strvis(char *dst, const char *src, int flag) -{ - char *extra = NULL; - int rv; - - MAKEEXTRALIST(flag, extra, ""); - if (!extra) { - *dst = '\0'; /* can't create extra, return "" */ - return 0; - } - rv = strsvis(dst, src, flag, extra); - free(extra); - return rv; -} - - -int -strvisx(char *dst, const char *src, size_t len, int flag) -{ - char *extra = NULL; - int rv; - - MAKEEXTRALIST(flag, extra, ""); - if (!extra) { - *dst = '\0'; /* can't create extra, return "" */ - return 0; - } - rv = strsvisx(dst, src, len, flag, extra); - free(extra); - return rv; -} -#endif diff --git a/kerberosV/src/lib/libedit/src/vis.h b/kerberosV/src/lib/libedit/src/vis.h deleted file mode 100644 index 23fc0d8e6d0..00000000000 --- a/kerberosV/src/lib/libedit/src/vis.h +++ /dev/null @@ -1,91 +0,0 @@ -/* $NetBSD: vis.h,v 1.18 2010/11/27 19:44:54 christos Exp $ */ - -/*- - * Copyright (c) 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. 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. - * - * @(#)vis.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _VIS_H_ -#define _VIS_H_ - -/* - * to select alternate encoding format - */ -#define VIS_OCTAL 0x001 /* use octal \ddd format */ -#define VIS_CSTYLE 0x002 /* use \[nrft0..] where appropiate */ - -/* - * to alter set of characters encoded (default is to encode all - * non-graphic except space, tab, and newline). - */ -#define VIS_SP 0x004 /* also encode space */ -#define VIS_TAB 0x008 /* also encode tab */ -#define VIS_NL 0x010 /* also encode newline */ -#define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL) -#define VIS_SAFE 0x020 /* only encode "unsafe" characters */ - -/* - * other - */ -#define VIS_NOSLASH 0x040 /* inhibit printing '\' */ -#define VIS_HTTP1808 0x080 /* http-style escape % hex hex */ -#define VIS_HTTPSTYLE 0x080 /* http-style escape % hex hex */ -#define VIS_MIMESTYLE 0x100 /* mime-style escape = HEX HEX */ -#define VIS_HTTP1866 0x200 /* http-style &#num; or &string; */ -#define VIS_NOESCAPE 0x400 /* don't decode `\' */ - -/* - * unvis return codes - */ -#define UNVIS_VALID 1 /* character valid */ -#define UNVIS_VALIDPUSH 2 /* character valid, push back passed char */ -#define UNVIS_NOCHAR 3 /* valid sequence, no character produced */ -#define UNVIS_SYNBAD -1 /* unrecognized escape sequence */ -#define UNVIS_ERROR -2 /* decoder in unknown state (unrecoverable) */ - -/* - * unvis flags - */ -#define UNVIS_END 1 /* no more characters */ - -__BEGIN_DECLS -char *vis(char *, int, int, int); -char *svis(char *, int, int, int, const char *); -int strvis(char *, const char *, int); -int strsvis(char *, const char *, int, const char *); -int strvisx(char *, const char *, size_t, int); -int strsvisx(char *, const char *, size_t, int, const char *); -int strunvis(char *, const char *); -int strunvisx(char *, const char *, int); -#ifndef __LIBC12_SOURCE__ -int unvis(char *, int, int *, int); -#endif -__END_DECLS - -#endif /* !_VIS_H_ */ diff --git a/kerberosV/src/lib/libedit/src/wcsdup.c b/kerberosV/src/lib/libedit/src/wcsdup.c deleted file mode 100644 index 5cf7b5919e0..00000000000 --- a/kerberosV/src/lib/libedit/src/wcsdup.c +++ /dev/null @@ -1,43 +0,0 @@ -/* $NetBSD: wcsdup.c,v 1.3 2008/05/26 13:17:48 haad Exp $ */ - -/* - * Copyright (C) 2006 Aleksey Cheusov - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee. Permission to modify the code and to distribute modified - * code is also granted without any restrictions. - */ - -#ifndef HAVE_WCSDUP - -#include "config.h" - -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: wcsdup.c,v 1.3 2008/05/26 13:17:48 haad Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include -#include -#include - -wchar_t * -wcsdup(const wchar_t *str) -{ - wchar_t *copy; - size_t len; - - _DIAGASSERT(str != NULL); - - len = wcslen(str) + 1; - copy = malloc(len * sizeof (wchar_t)); - - if (!copy) - return NULL; - - return wmemcpy(copy, str, len); -} - -#endif diff --git a/kerberosV/src/lib/ntlm/ChangeLog b/kerberosV/src/lib/ntlm/ChangeLog deleted file mode 100644 index b2e151ac475..00000000000 --- a/kerberosV/src/lib/ntlm/ChangeLog +++ /dev/null @@ -1,120 +0,0 @@ -2008-05-14 Love Hornquist Astrand - - * ntlm.c: replace hashes with keys. - -2008-04-27 Love Hörnquist Åstrand - - * ntlm.c: Use DES_set_key_unchecked(). - -2007-12-28 Love Hörnquist Åstrand - - * heimntlm.h: Add NTLM_TARGET_* - - * ntlm.c: Make heim_ntlm_decode_type3 more useful and provide a - username. From Ming Yang. - -2007-11-11 Love Hörnquist Åstrand - - * move doxygen into the main file - - * write doxygen documentation - - * export heim_ntlm_free_buf, start doxygen documentation - -2007-07-17 Love Hörnquist Åstrand - - * ntlm.c: Use unsigned char * as argument to HMAC_Update to please - OpenSSL and gcc. - - * test_ntlm.c: more verbose what we are testing. - -2007-07-10 Love Hörnquist Åstrand - - * Makefile.am: New library version. - -2007-06-20 Love Hörnquist Åstrand - - * test_ntlm.c: heim_ntlm_calculate_ntlm2_sess_resp - - * ntlm.c: Change prototype to match other heim_ntlm_calculate - functions. - - * test_ntlm.c: Its ok if infotarget2 length is longer. - - * ntlm.c: Merge in changes from Puneet Mehra and make work again. - - * ntlm.c (heim_ntlm_ntlmv2_key): target should be uppercase. - From Puneet Mehra. - - * version-script.map: Add heim_ntlm_calculate_ntlm2_sess_resp from - Puneet Mehra. - - * ntlm.c: Add heim_ntlm_calculate_ntlm2_sess_resp from Puneet - Mehra. - - * test_ntlm.c: Test heim_ntlm_calculate_ntlm2_sess_resp from - Puneet Mehra. - -2007-06-08 Love Hörnquist Åstrand - - * Makefile.am: EXTRA_DIST += version-script.map. - -2007-06-03 Love Hörnquist Åstrand - - * test_ntlm.c: Free memory diffrently. - - * ntlm.c: Make free functions free memory. - -2007-04-22 Love Hörnquist Åstrand - - * Makefile.am: symbol versioning. - - * version-script.map: symbol versioning. - -2007-01-31 Love Hörnquist Åstrand - - * test_ntlm.c: No need to include . - -2007-01-04 Love Hörnquist Åstrand - - * Makefile.am: add LIB_roken for test_ntlm - -2006-12-26 Love Hörnquist Åstrand - - * test_ntlm.c: Verify infotarget. - - * ntlm.c: Extract the infotarget from the answer. - - * ntlm.c (heim_ntlm_verify_ntlm2): verify the ntlmv2 reply - -2006-12-22 Dave Love - - * ntlm.c: Include . - -2006-12-20 Love Hörnquist Åstrand - - * test_ntlm.c: add some new tests. - - * ntlm.c: Add ntlmv2 answer calculating functions. - - * ntlm.c: sent lm hashes, needed for NTLM2 session - - * heimntlm.h: Add NTLM_NEG_NTLM2_SESSION, NTLMv2 session security. - -2006-12-19 Love Hörnquist Åstrand - - * ntlm.c (heim_ntlm_build_ntlm1_master): return session master - key. - -2006-12-18 Love Hörnquist Åstrand - - * ntlm.c (heim_ntlm_build_ntlm1_master): calculate the ntlm - version 1 "master" key. - -2006-12-13 Love Hörnquist Åstrand - - * test_ntlm.c: Add simple parser test app. - - * inital version of a NTLM library, only handles ntml version 1 and - ascii strings for now - diff --git a/kerberosV/src/lib/ntlm/Makefile.am b/kerberosV/src/lib/ntlm/Makefile.am deleted file mode 100644 index ff961d07f80..00000000000 --- a/kerberosV/src/lib/ntlm/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -# $Id: Makefile.am,v 1.1 2013/06/17 19:11:44 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(INCLUDE_hcrypto) - -lib_LTLIBRARIES = libheimntlm.la - -dist_include_HEADERS = heimntlm.h heimntlm-protos.h - -nodist_include_HEADERS = ntlm_err.h - -dist_libheimntlm_la_SOURCES = ntlm.c heimntlm.h - -nodist_libheimntlm_la_SOURCES = ntlm_err.c - -libheimntlm_la_LDFLAGS = -version-info 1:0:1 - -if versionscript -libheimntlm_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -endif -$(libheimntlm_la_OBJECTS): $(srcdir)/version-script.map - -libheimntlm_la_LIBADD = \ - ../krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(LIBADD_roken) - -$(srcdir)/heimntlm-protos.h: - cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -o heimntlm-protos.h $(dist_libheimntlm_la_SOURCES) || rm -f heimntlm-protos.h - -$(libheimntlm_la_OBJECTS): $(srcdir)/heimntlm-protos.h ntlm_err.h - -TESTS = test_ntlm - -check_PROGRAMS = test_ntlm - -LDADD = libheimntlm.la $(LIB_roken) - -EXTRA_DIST = \ - NTMakefile \ - libheimntlm-version.rc \ - libheimntlm-exports.def \ - version-script.map \ - ntlm_err.et - -CLEANFILES = \ - ntlm_err.c ntlm_err.h - -ntlm_err.h: ntlm_err.et diff --git a/kerberosV/src/lib/ntlm/Makefile.in b/kerberosV/src/lib/ntlm/Makefile.in deleted file mode 100644 index a915e272d37..00000000000 --- a/kerberosV/src/lib/ntlm/Makefile.in +++ /dev/null @@ -1,1076 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:44 robert Exp $ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:44 robert Exp $ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:44 robert Exp $ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(dist_include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -@versionscript_TRUE@am__append_1 = $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -TESTS = test_ntlm$(EXEEXT) -check_PROGRAMS = test_ntlm$(EXEEXT) -subdir = lib/ntlm -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \ - "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -libheimntlm_la_DEPENDENCIES = ../krb5/libkrb5.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -dist_libheimntlm_la_OBJECTS = ntlm.lo -nodist_libheimntlm_la_OBJECTS = ntlm_err.lo -libheimntlm_la_OBJECTS = $(dist_libheimntlm_la_OBJECTS) \ - $(nodist_libheimntlm_la_OBJECTS) -libheimntlm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libheimntlm_la_LDFLAGS) $(LDFLAGS) -o $@ -test_ntlm_SOURCES = test_ntlm.c -test_ntlm_OBJECTS = test_ntlm.$(OBJEXT) -test_ntlm_LDADD = $(LDADD) -test_ntlm_DEPENDENCIES = libheimntlm.la $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(dist_libheimntlm_la_SOURCES) \ - $(nodist_libheimntlm_la_SOURCES) test_ntlm.c -DIST_SOURCES = $(dist_libheimntlm_la_SOURCES) test_ntlm.c -HEADERS = $(dist_include_HEADERS) $(nodist_include_HEADERS) -ETAGS = etags -CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(INCLUDE_hcrypto) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -lib_LTLIBRARIES = libheimntlm.la -dist_include_HEADERS = heimntlm.h heimntlm-protos.h -nodist_include_HEADERS = ntlm_err.h -dist_libheimntlm_la_SOURCES = ntlm.c heimntlm.h -nodist_libheimntlm_la_SOURCES = ntlm_err.c -libheimntlm_la_LDFLAGS = -version-info 1:0:1 $(am__append_1) -libheimntlm_la_LIBADD = \ - ../krb5/libkrb5.la \ - $(LIB_hcrypto) \ - $(LIBADD_roken) - -LDADD = libheimntlm.la $(LIB_roken) -EXTRA_DIST = \ - NTMakefile \ - libheimntlm-version.rc \ - libheimntlm-exports.def \ - version-script.map \ - ntlm_err.et - -CLEANFILES = \ - ntlm_err.c ntlm_err.h - -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/ntlm/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/ntlm/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libheimntlm.la: $(libheimntlm_la_OBJECTS) $(libheimntlm_la_DEPENDENCIES) - $(libheimntlm_la_LINK) -rpath $(libdir) $(libheimntlm_la_OBJECTS) $(libheimntlm_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -test_ntlm$(EXEEXT): $(test_ntlm_OBJECTS) $(test_ntlm_DEPENDENCIES) - @rm -f test_ntlm$(EXEEXT) - $(LINK) $(test_ntlm_OBJECTS) $(test_ntlm_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntlm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntlm_err.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ntlm.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-dist_includeHEADERS: $(dist_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(dist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-dist_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(dist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files -install-nodist_includeHEADERS: $(nodist_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-nodist_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-dist_includeHEADERS \ - install-nodist_includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-dist_includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-nodist_includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \ - check-local clean clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags dist-hook distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-hook install-dist_includeHEADERS install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man \ - install-nodist_includeHEADERS install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-dist_includeHEADERS \ - uninstall-hook uninstall-libLTLIBRARIES \ - uninstall-nodist_includeHEADERS - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done -$(libheimntlm_la_OBJECTS): $(srcdir)/version-script.map - -$(srcdir)/heimntlm-protos.h: - cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -o heimntlm-protos.h $(dist_libheimntlm_la_SOURCES) || rm -f heimntlm-protos.h - -$(libheimntlm_la_OBJECTS): $(srcdir)/heimntlm-protos.h ntlm_err.h - -ntlm_err.h: ntlm_err.et - -# 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/kerberosV/src/lib/ntlm/NTMakefile b/kerberosV/src/lib/ntlm/NTMakefile deleted file mode 100644 index 40ed6444957..00000000000 --- a/kerberosV/src/lib/ntlm/NTMakefile +++ /dev/null @@ -1,90 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=lib\ntlm - -!include ../../windows/NTMakefile.w32 - -INCFILES= \ - $(INCDIR)\heimntlm.h \ - $(INCDIR)\heimntlm-protos.h \ - $(INCDIR)\ntlm_err.h - -libheimntlm_la_SOURCES = ntlm.c heimntlm.h - -$(OBJ)\heimntlm-protos.h: $(libheimntlm_la_SOURCES) - $(PERL) ../../cf/make-proto.pl -q -P remove -o $(OBJ)\heimntlm-protos.h $(libheimntlm_la_SOURCES) - -$(OBJ)\ntlm_err.c $(OBJ)\ntlm_err.h: ntlm_err.et - cd $(OBJ) - $(BINDIR)\compile_et.exe $(SRCDIR)\ntlm_err.et - cd $(SRCDIR) - -!ifndef STATICLIBS - -RES=$(OBJ)\libheimntlm-version.res - -$(LIBHEIMNTLM): $(BINDIR)\heimntlm.dll - -$(BINDIR)\heimntlm.dll: $(OBJ)\ntlm.obj $(OBJ)\ntlm_err.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBCOMERR) $(RES) - $(DLLGUILINK) -def:libheimntlm-exports.def -implib:$(LIBHEIMNTLM) - $(DLLPREP_NODIST) - -clean:: - -$(RM) $(BINDIR)\heimntlm.* - -!else - -$(LIBHEIMNTLM): $(OBJ)\ntlm.obj $(OBJ)\ntlm_err.obj - $(LIBCON) - -!endif - -all:: $(INCFILES) $(LIBHEIMNTLM) - - -test-binaries: $(OBJ)\test_ntlm.exe - -test-run: - cd $(OBJ) - test_ntlm.exe - cd $(SRCDIR) - -$(OBJ)\test_ntlm.exe: $(OBJ)\test_ntlm.obj $(LIBHEIMNTLM) $(LIBHEIMDAL) $(LIBVERS) $(LIBROKEN) - $(EXECONLINK) - $(EXEPREP_NODIST) - -test:: test-binaries test-run - -test-exports: - $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libheimntlm-exports.def - -test:: test-exports diff --git a/kerberosV/src/lib/ntlm/heimntlm-protos.h b/kerberosV/src/lib/ntlm/heimntlm-protos.h deleted file mode 100644 index 5f56536ffc3..00000000000 --- a/kerberosV/src/lib/ntlm/heimntlm-protos.h +++ /dev/null @@ -1,194 +0,0 @@ -/* This is a generated file */ -#ifndef __heimntlm_protos_h__ -#define __heimntlm_protos_h__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -int -heim_ntlm_build_ntlm1_master ( - void */*key*/, - size_t /*len*/, - struct ntlm_buf */*session*/, - struct ntlm_buf */*master*/); - -int -heim_ntlm_build_ntlm2_master ( - void */*key*/, - size_t /*len*/, - struct ntlm_buf */*blob*/, - struct ntlm_buf */*session*/, - struct ntlm_buf */*master*/); - -int -heim_ntlm_calculate_lm2 ( - const void */*key*/, - size_t /*len*/, - const char */*username*/, - const char */*target*/, - const unsigned char serverchallenge[8], - unsigned char ntlmv2[16], - struct ntlm_buf */*answer*/); - -int -heim_ntlm_calculate_ntlm1 ( - void */*key*/, - size_t /*len*/, - unsigned char challenge[8], - struct ntlm_buf */*answer*/); - -int -heim_ntlm_calculate_ntlm2 ( - const void */*key*/, - size_t /*len*/, - const char */*username*/, - const char */*target*/, - const unsigned char serverchallenge[8], - const struct ntlm_buf */*infotarget*/, - unsigned char ntlmv2[16], - struct ntlm_buf */*answer*/); - -int -heim_ntlm_calculate_ntlm2_sess ( - const unsigned char clnt_nonce[8], - const unsigned char svr_chal[8], - const unsigned char ntlm_hash[16], - struct ntlm_buf */*lm*/, - struct ntlm_buf */*ntlm*/); - -int -heim_ntlm_calculate_ntlm2_sess_hash ( - const unsigned char clnt_nonce[8], - const unsigned char svr_chal[8], - unsigned char verifier[8]); - -int -heim_ntlm_decode_targetinfo ( - const struct ntlm_buf */*data*/, - int /*ucs2*/, - struct ntlm_targetinfo */*ti*/); - -int -heim_ntlm_decode_type1 ( - const struct ntlm_buf */*buf*/, - struct ntlm_type1 */*data*/); - -int -heim_ntlm_decode_type2 ( - const struct ntlm_buf */*buf*/, - struct ntlm_type2 */*type2*/); - -int -heim_ntlm_decode_type3 ( - const struct ntlm_buf */*buf*/, - int /*ucs2*/, - struct ntlm_type3 */*type3*/); - -void -heim_ntlm_derive_ntlm2_sess ( - const unsigned char sessionkey[16], - const unsigned char */*clnt_nonce*/, - size_t /*clnt_nonce_length*/, - const unsigned char svr_chal[8], - unsigned char derivedkey[16]); - -int -heim_ntlm_encode_targetinfo ( - const struct ntlm_targetinfo */*ti*/, - int /*ucs2*/, - struct ntlm_buf */*data*/); - -int -heim_ntlm_encode_type1 ( - const struct ntlm_type1 */*type1*/, - struct ntlm_buf */*data*/); - -int -heim_ntlm_encode_type2 ( - const struct ntlm_type2 */*type2*/, - struct ntlm_buf */*data*/); - -int -heim_ntlm_encode_type3 ( - const struct ntlm_type3 */*type3*/, - struct ntlm_buf */*data*/); - -void -heim_ntlm_free_buf (struct ntlm_buf */*p*/); - -void -heim_ntlm_free_targetinfo (struct ntlm_targetinfo */*ti*/); - -void -heim_ntlm_free_type1 (struct ntlm_type1 */*data*/); - -void -heim_ntlm_free_type2 (struct ntlm_type2 */*data*/); - -void -heim_ntlm_free_type3 (struct ntlm_type3 */*data*/); - -int -heim_ntlm_keyex_unwrap ( - struct ntlm_buf */*baseKey*/, - struct ntlm_buf */*encryptedSession*/, - struct ntlm_buf */*session*/); - -int -heim_ntlm_keyex_wrap ( - struct ntlm_buf */*base_session*/, - struct ntlm_buf */*session*/, - struct ntlm_buf */*encryptedSession*/); - -int -heim_ntlm_nt_key ( - const char */*password*/, - struct ntlm_buf */*key*/); - -int -heim_ntlm_ntlmv2_key ( - const void */*key*/, - size_t /*len*/, - const char */*username*/, - const char */*target*/, - unsigned char ntlmv2[16]); - -size_t -heim_ntlm_unparse_flags ( - uint32_t /*flags*/, - char */*s*/, - size_t /*len*/); - -int -heim_ntlm_v1_base_session ( - void */*key*/, - size_t /*len*/, - struct ntlm_buf */*session*/); - -int -heim_ntlm_v2_base_session ( - void */*key*/, - size_t /*len*/, - struct ntlm_buf */*ntlmResponse*/, - struct ntlm_buf */*session*/); - -int -heim_ntlm_verify_ntlm2 ( - const void */*key*/, - size_t /*len*/, - const char */*username*/, - const char */*target*/, - time_t /*now*/, - const unsigned char serverchallenge[8], - const struct ntlm_buf */*answer*/, - struct ntlm_buf */*infotarget*/, - unsigned char ntlmv2[16]); - -#ifdef __cplusplus -} -#endif - -#endif /* __heimntlm_protos_h__ */ diff --git a/kerberosV/src/lib/ntlm/heimntlm.h b/kerberosV/src/lib/ntlm/heimntlm.h deleted file mode 100644 index 5bb087561de..00000000000 --- a/kerberosV/src/lib/ntlm/heimntlm.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2006 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: heimntlm.h,v 1.1 2013/06/17 19:11:44 robert Exp $ */ - -#ifndef HEIM_NTLM_H -#define HEIM_NTLM_H - -/** - * Buffer for storing data in the NTLM library. When filled in by the - * library it should be freed with heim_ntlm_free_buf(). - */ -struct ntlm_buf { - size_t length; /**< length buffer data */ - void *data; /**< pointer to the data itself */ -}; - -#define NTLM_NEG_UNICODE 0x00000001 -#define NTLM_NEG_OEM 0x00000002 -#define NTLM_NEG_TARGET 0x00000004 -#define NTLM_MBZ9 0x00000008 - -#define NTLM_NEG_SIGN 0x00000010 -#define NTLM_NEG_SEAL 0x00000020 -#define NTLM_NEG_DATAGRAM 0x00000040 -#define NTLM_NEG_LM_KEY 0x00000080 -#define NTLM_NEG_NTLM 0x00000200 -#define NTLM_NEG_ANONYMOUS 0x00000800 - -#define NTLM_MBZ8 0x00000100 -#define NTLM_NEG_NTLM 0x00000200 -#define NTLM_NEG_NT_ONLY 0x00000400 -#define NTLM_MBZ7 0x00000800 /* anon ? */ - -#define NTLM_OEM_SUPPLIED_DOMAIN 0x00001000 -#define NTLM_OEM_SUPPLIED_WORKSTATION 0x00002000 -#define NTLM_MBZ6 0x00004000 /* local call ? */ -#define NTLM_NEG_ALWAYS_SIGN 0x00008000 - -#define NTLM_TARGET_DOMAIN 0x00010000 -#define NTLM_TARGET_SERVER 0x00020000 - -#define NTLM_TARGET_SHARE 0x00040000 -#define NTLM_NEG_NTLM2_SESSION 0x00080000 -#define NTLM_NEG_NTLM2 0x00080000 - -#define NTLM_NEG_IDENTIFY 0x00100000 -#define NTLM_MBZ5 0x00200000 -#define NTLM_NON_NT_SESSION_KEY 0x00400000 -#define NTLM_NEG_TARGET_INFO 0x00800000 - -#define NTLM_MBZ4 0x01000000 -#define NTLM_NEG_VERSION 0x02000000 -#define NTLM_MBZ3 0x04000000 -#define NTLM_MBZ2 0x08000000 - -#define NTLM_MBZ1 0x10000000 -#define NTLM_ENC_128 0x20000000 -#define NTLM_NEG_KEYEX 0x40000000 -#define NTLM_ENC_56 0x80000000 - -/** - * Struct for the NTLM target info, the strings is assumed to be in - * UTF8. When filled in by the library it should be freed with - * heim_ntlm_free_targetinfo(). - */ - -#define NTLM_TI_AV_FLAG_GUEST 0x00000001 - -struct ntlm_targetinfo { - char *servername; /**< */ - char *domainname; /**< */ - char *dnsdomainname; /**< */ - char *dnsservername; /**< */ - char *dnstreename; /**< */ - uint32_t avflags; /**< */ -}; - -/** - * Struct for the NTLM type1 message info, the strings is assumed to - * be in UTF8. When filled in by the library it should be freed with - * heim_ntlm_free_type1(). - */ - -struct ntlm_type1 { - uint32_t flags; /**< */ - char *domain; /**< */ - char *hostname; /**< */ - uint32_t os[2]; /**< */ -}; - -/** - * Struct for the NTLM type2 message info, the strings is assumed to - * be in UTF8. When filled in by the library it should be freed with - * heim_ntlm_free_type2(). - */ - -struct ntlm_type2 { - uint32_t flags; /**< */ - char *targetname; /**< */ - struct ntlm_buf targetinfo; /**< */ - unsigned char challenge[8]; /**< */ - uint32_t context[2]; /**< */ - uint32_t os[2]; /**< */ -}; - -/** - * Struct for the NTLM type3 message info, the strings is assumed to - * be in UTF8. When filled in by the library it should be freed with - * heim_ntlm_free_type3(). - */ - -struct ntlm_type3 { - uint32_t flags; /**< */ - char *username; /**< */ - char *targetname; /**< */ - struct ntlm_buf lm; /**< */ - struct ntlm_buf ntlm; /**< */ - struct ntlm_buf sessionkey; /**< */ - char *ws; /**< */ - uint32_t os[2]; /**< */ -}; - -#include -#include - -#endif /* NTLM_NTLM_H */ diff --git a/kerberosV/src/lib/ntlm/libheimntlm-exports.def b/kerberosV/src/lib/ntlm/libheimntlm-exports.def deleted file mode 100644 index 33ac09e70b3..00000000000 --- a/kerberosV/src/lib/ntlm/libheimntlm-exports.def +++ /dev/null @@ -1,24 +0,0 @@ -EXPORTS - heim_ntlm_build_ntlm1_master - heim_ntlm_calculate_lm2 - heim_ntlm_calculate_ntlm1 - heim_ntlm_calculate_ntlm2 - heim_ntlm_calculate_ntlm2_sess - heim_ntlm_decode_targetinfo - heim_ntlm_decode_type1 - heim_ntlm_decode_type2 - heim_ntlm_decode_type3 - heim_ntlm_encode_targetinfo - heim_ntlm_encode_type1 - heim_ntlm_encode_type2 - heim_ntlm_encode_type3 - heim_ntlm_free_buf - heim_ntlm_free_targetinfo - heim_ntlm_free_type1 - heim_ntlm_free_type2 - heim_ntlm_free_type3 - heim_ntlm_nt_key - heim_ntlm_ntlmv2_key - heim_ntlm_verify_ntlm2 - heim_ntlm_unparse_flags - initialize_ntlm_error_table_r diff --git a/kerberosV/src/lib/ntlm/libheimntlm-version.rc b/kerberosV/src/lib/ntlm/libheimntlm-version.rc deleted file mode 100644 index 2055c9d6716..00000000000 --- a/kerberosV/src/lib/ntlm/libheimntlm-version.rc +++ /dev/null @@ -1,36 +0,0 @@ -/*********************************************************************** - * Copyright (c) 2010, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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. - * - **********************************************************************/ - -#define RC_FILE_TYPE VFT_DLL -#define RC_FILE_DESC_0409 "Heimdal NTLM Support Library" -#define RC_FILE_ORIG_0409 "libheimntlm.dll" - -#include "../../windows/version.rc" diff --git a/kerberosV/src/lib/ntlm/ntlm.c b/kerberosV/src/lib/ntlm/ntlm.c deleted file mode 100644 index 7aafc8c0aa7..00000000000 --- a/kerberosV/src/lib/ntlm/ntlm.c +++ /dev/null @@ -1,1803 +0,0 @@ -/* - * Copyright (c) 2006 - 2008 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2010 Apple Inc. 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 - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#define HC_DEPRECATED_CRYPTO - -#include "krb5-types.h" -#include "crypto-headers.h" - -#include - -/*! \mainpage Heimdal NTLM library - * - * \section intro Introduction - * - * Heimdal libheimntlm library is a implementation of the NTLM - * protocol, both version 1 and 2. The GSS-API mech that uses this - * library adds support for transport encryption and integrity - * checking. - * - * NTLM is a protocol for mutual authentication, its still used in - * many protocol where Kerberos is not support, one example is - * EAP/X802.1x mechanism LEAP from Microsoft and Cisco. - * - * This is a support library for the core protocol, its used in - * Heimdal to implement and GSS-API mechanism. There is also support - * in the KDC to do remote digest authenticiation, this to allow - * services to authenticate users w/o direct access to the users ntlm - * hashes (same as Kerberos arcfour enctype keys). - * - * More information about the NTLM protocol can found here - * http://davenport.sourceforge.net/ntlm.html . - * - * The Heimdal projects web page: http://www.h5l.org/ - * - * @section ntlm_example NTLM Example - * - * Example to to use @ref test_ntlm.c . - * - * @example test_ntlm.c - * - * Example how to use the NTLM primitives. - * - */ - -/** @defgroup ntlm_core Heimdal NTLM library - * - * The NTLM core functions implement the string2key generation - * function, message encode and decode function, and the hash function - * functions. - */ - -struct sec_buffer { - uint16_t length; - uint16_t allocated; - uint32_t offset; -}; - -static const unsigned char ntlmsigature[8] = "NTLMSSP\x00"; - -/* - * - */ - -#define CHECK(f, e) \ - do { \ - ret = f; \ - if (ret != (ssize_t)(e)) { \ - ret = HNTLM_ERR_DECODE; \ - goto out; \ - } \ - } while(/*CONSTCOND*/0) - -static struct units ntlm_flag_units[] = { -#define ntlm_flag(x) { #x, NTLM_##x } - ntlm_flag(ENC_56), - ntlm_flag(NEG_KEYEX), - ntlm_flag(ENC_128), - ntlm_flag(MBZ1), - ntlm_flag(MBZ2), - ntlm_flag(MBZ3), - ntlm_flag(NEG_VERSION), - ntlm_flag(MBZ4), - ntlm_flag(NEG_TARGET_INFO), - ntlm_flag(NON_NT_SESSION_KEY), - ntlm_flag(MBZ5), - ntlm_flag(NEG_IDENTIFY), - ntlm_flag(NEG_NTLM2), - ntlm_flag(TARGET_SHARE), - ntlm_flag(TARGET_SERVER), - ntlm_flag(TARGET_DOMAIN), - ntlm_flag(NEG_ALWAYS_SIGN), - ntlm_flag(MBZ6), - ntlm_flag(OEM_SUPPLIED_WORKSTATION), - ntlm_flag(OEM_SUPPLIED_DOMAIN), - ntlm_flag(NEG_ANONYMOUS), - ntlm_flag(NEG_NT_ONLY), - ntlm_flag(NEG_NTLM), - ntlm_flag(MBZ8), - ntlm_flag(NEG_LM_KEY), - ntlm_flag(NEG_DATAGRAM), - ntlm_flag(NEG_SEAL), - ntlm_flag(NEG_SIGN), - ntlm_flag(MBZ9), - ntlm_flag(NEG_TARGET), - ntlm_flag(NEG_OEM), - ntlm_flag(NEG_UNICODE), -#undef ntlm_flag - {NULL, 0} -}; - -size_t -heim_ntlm_unparse_flags(uint32_t flags, char *s, size_t len) -{ - return unparse_flags(flags, ntlm_flag_units, s, len); -} - - -/** - * heim_ntlm_free_buf frees the ntlm buffer - * - * @param p buffer to be freed - * - * @ingroup ntlm_core - */ - -void -heim_ntlm_free_buf(struct ntlm_buf *p) -{ - if (p->data) - free(p->data); - p->data = NULL; - p->length = 0; -} - - -static int -ascii2ucs2le(const char *string, int up, struct ntlm_buf *buf) -{ - unsigned char *p; - size_t len, i; - - len = strlen(string); - if (len / 2 > UINT_MAX) - return ERANGE; - - buf->length = len * 2; - buf->data = malloc(buf->length); - if (buf->data == NULL && len != 0) { - heim_ntlm_free_buf(buf); - return ENOMEM; - } - - p = buf->data; - for (i = 0; i < len; i++) { - unsigned char t = (unsigned char)string[i]; - if (t & 0x80) { - heim_ntlm_free_buf(buf); - return EINVAL; - } - if (up) - t = toupper(t); - p[(i * 2) + 0] = t; - p[(i * 2) + 1] = 0; - } - return 0; -} - -/* - * - */ - -static krb5_error_code -ret_sec_buffer(krb5_storage *sp, struct sec_buffer *buf) -{ - krb5_error_code ret; - CHECK(krb5_ret_uint16(sp, &buf->length), 0); - CHECK(krb5_ret_uint16(sp, &buf->allocated), 0); - CHECK(krb5_ret_uint32(sp, &buf->offset), 0); -out: - return ret; -} - -static krb5_error_code -store_sec_buffer(krb5_storage *sp, const struct sec_buffer *buf) -{ - krb5_error_code ret; - CHECK(krb5_store_uint16(sp, buf->length), 0); - CHECK(krb5_store_uint16(sp, buf->allocated), 0); - CHECK(krb5_store_uint32(sp, buf->offset), 0); -out: - return ret; -} - -/* - * Strings are either OEM or UNICODE. The later is encoded as ucs2 on - * wire, but using utf8 in memory. - */ - -static krb5_error_code -len_string(int ucs2, const char *s) -{ - size_t len = strlen(s); - if (ucs2) - len *= 2; - return len; -} - -/* - * - */ - -static krb5_error_code -ret_string(krb5_storage *sp, int ucs2, size_t len, char **s) -{ - krb5_error_code ret; - - *s = malloc(len + 1); - if (*s == NULL) - return ENOMEM; - CHECK(krb5_storage_read(sp, *s, len), len); - - (*s)[len] = '\0'; - - if (ucs2) { - size_t i; - for (i = 0; i < len / 2; i++) { - (*s)[i] = (*s)[i * 2]; - if ((*s)[i * 2 + 1]) { - free(*s); - *s = NULL; - return EINVAL; - } - } - (*s)[i] = '\0'; - } - ret = 0; - out: - return ret; -} - - - -static krb5_error_code -ret_sec_string(krb5_storage *sp, int ucs2, struct sec_buffer *desc, char **s) -{ - krb5_error_code ret = 0; - CHECK(krb5_storage_seek(sp, desc->offset, SEEK_SET), desc->offset); - CHECK(ret_string(sp, ucs2, desc->length, s), 0); - out: - return ret; -} - -static krb5_error_code -put_string(krb5_storage *sp, int ucs2, const char *s) -{ - krb5_error_code ret; - struct ntlm_buf buf; - - if (ucs2) { - ret = ascii2ucs2le(s, 0, &buf); - if (ret) - return ret; - } else { - buf.data = rk_UNCONST(s); - buf.length = strlen(s); - } - - CHECK(krb5_storage_write(sp, buf.data, buf.length), buf.length); - if (ucs2) - heim_ntlm_free_buf(&buf); - ret = 0; -out: - return ret; -} - -/* - * - */ - -static krb5_error_code -ret_buf(krb5_storage *sp, struct sec_buffer *desc, struct ntlm_buf *buf) -{ - krb5_error_code ret; - - buf->data = malloc(desc->length); - buf->length = desc->length; - CHECK(krb5_storage_seek(sp, desc->offset, SEEK_SET), desc->offset); - CHECK(krb5_storage_read(sp, buf->data, buf->length), buf->length); - ret = 0; -out: - return ret; -} - -static krb5_error_code -put_buf(krb5_storage *sp, const struct ntlm_buf *buf) -{ - krb5_error_code ret; - CHECK(krb5_storage_write(sp, buf->data, buf->length), buf->length); - ret = 0; -out: - return ret; -} - -/** - * Frees the ntlm_targetinfo message - * - * @param ti targetinfo to be freed - * - * @ingroup ntlm_core - */ - -void -heim_ntlm_free_targetinfo(struct ntlm_targetinfo *ti) -{ - free(ti->servername); - free(ti->domainname); - free(ti->dnsdomainname); - free(ti->dnsservername); - free(ti->dnstreename); - memset(ti, 0, sizeof(*ti)); -} - -static int -encode_ti_string(krb5_storage *out, uint16_t type, int ucs2, char *s) -{ - krb5_error_code ret; - CHECK(krb5_store_uint16(out, type), 0); - CHECK(krb5_store_uint16(out, len_string(ucs2, s)), 0); - CHECK(put_string(out, ucs2, s), 0); -out: - return ret; -} - -/** - * Encodes a ntlm_targetinfo message. - * - * @param ti the ntlm_targetinfo message to encode. - * @param ucs2 ignored - * @param data is the return buffer with the encoded message, should be - * freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_encode_targetinfo(const struct ntlm_targetinfo *ti, - int ucs2, - struct ntlm_buf *data) -{ - krb5_error_code ret; - krb5_storage *out; - - data->data = NULL; - data->length = 0; - - out = krb5_storage_emem(); - if (out == NULL) - return ENOMEM; - - krb5_storage_set_byteorder(out, KRB5_STORAGE_BYTEORDER_LE); - - if (ti->servername) - CHECK(encode_ti_string(out, 1, ucs2, ti->servername), 0); - if (ti->domainname) - CHECK(encode_ti_string(out, 2, ucs2, ti->domainname), 0); - if (ti->dnsservername) - CHECK(encode_ti_string(out, 3, ucs2, ti->dnsservername), 0); - if (ti->dnsdomainname) - CHECK(encode_ti_string(out, 4, ucs2, ti->dnsdomainname), 0); - if (ti->dnstreename) - CHECK(encode_ti_string(out, 5, ucs2, ti->dnstreename), 0); - if (ti->avflags) { - CHECK(krb5_store_uint16(out, 6), 0); - CHECK(krb5_store_uint16(out, 4), 0); - CHECK(krb5_store_uint32(out, ti->avflags), 0); - } - - /* end tag */ - CHECK(krb5_store_int16(out, 0), 0); - CHECK(krb5_store_int16(out, 0), 0); - - { - krb5_data d; - ret = krb5_storage_to_data(out, &d); - data->data = d.data; - data->length = d.length; - } -out: - krb5_storage_free(out); - return ret; -} - -/** - * Decodes an NTLM targetinfo message - * - * @param data input data buffer with the encode NTLM targetinfo message - * @param ucs2 if the strings should be encoded with ucs2 (selected by flag in message). - * @param ti the decoded target info, should be freed with heim_ntlm_free_targetinfo(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_decode_targetinfo(const struct ntlm_buf *data, - int ucs2, - struct ntlm_targetinfo *ti) -{ - uint16_t type, len; - krb5_storage *in; - int ret = 0, done = 0; - - memset(ti, 0, sizeof(*ti)); - - if (data->length == 0) - return 0; - - in = krb5_storage_from_readonly_mem(data->data, data->length); - if (in == NULL) - return ENOMEM; - krb5_storage_set_byteorder(in, KRB5_STORAGE_BYTEORDER_LE); - - while (!done) { - CHECK(krb5_ret_uint16(in, &type), 0); - CHECK(krb5_ret_uint16(in, &len), 0); - - switch (type) { - case 0: - done = 1; - break; - case 1: - CHECK(ret_string(in, ucs2, len, &ti->servername), 0); - break; - case 2: - CHECK(ret_string(in, ucs2, len, &ti->domainname), 0); - break; - case 3: - CHECK(ret_string(in, ucs2, len, &ti->dnsservername), 0); - break; - case 4: - CHECK(ret_string(in, ucs2, len, &ti->dnsdomainname), 0); - break; - case 5: - CHECK(ret_string(in, ucs2, len, &ti->dnstreename), 0); - break; - case 6: - CHECK(krb5_ret_uint32(in, &ti->avflags), 0); - break; - default: - krb5_storage_seek(in, len, SEEK_CUR); - break; - } - } - out: - if (in) - krb5_storage_free(in); - return ret; -} - -/** - * Frees the ntlm_type1 message - * - * @param data message to be freed - * - * @ingroup ntlm_core - */ - -void -heim_ntlm_free_type1(struct ntlm_type1 *data) -{ - if (data->domain) - free(data->domain); - if (data->hostname) - free(data->hostname); - memset(data, 0, sizeof(*data)); -} - -int -heim_ntlm_decode_type1(const struct ntlm_buf *buf, struct ntlm_type1 *data) -{ - krb5_error_code ret; - unsigned char sig[8]; - uint32_t type; - struct sec_buffer domain, hostname; - krb5_storage *in; - - memset(data, 0, sizeof(*data)); - - in = krb5_storage_from_readonly_mem(buf->data, buf->length); - if (in == NULL) { - ret = ENOMEM; - goto out; - } - krb5_storage_set_byteorder(in, KRB5_STORAGE_BYTEORDER_LE); - - CHECK(krb5_storage_read(in, sig, sizeof(sig)), sizeof(sig)); - CHECK(memcmp(ntlmsigature, sig, sizeof(ntlmsigature)), 0); - CHECK(krb5_ret_uint32(in, &type), 0); - CHECK(type, 1); - CHECK(krb5_ret_uint32(in, &data->flags), 0); - if (data->flags & NTLM_OEM_SUPPLIED_DOMAIN) - CHECK(ret_sec_buffer(in, &domain), 0); - if (data->flags & NTLM_OEM_SUPPLIED_WORKSTATION) - CHECK(ret_sec_buffer(in, &hostname), 0); -#if 0 - if (domain.offset > 32) { - CHECK(krb5_ret_uint32(in, &data->os[0]), 0); - CHECK(krb5_ret_uint32(in, &data->os[1]), 0); - } -#endif - if (data->flags & NTLM_OEM_SUPPLIED_DOMAIN) - CHECK(ret_sec_string(in, 0, &domain, &data->domain), 0); - if (data->flags & NTLM_OEM_SUPPLIED_WORKSTATION) - CHECK(ret_sec_string(in, 0, &hostname, &data->hostname), 0); - -out: - if (in) - krb5_storage_free(in); - if (ret) - heim_ntlm_free_type1(data); - - return ret; -} - -/** - * Encodes an ntlm_type1 message. - * - * @param type1 the ntlm_type1 message to encode. - * @param data is the return buffer with the encoded message, should be - * freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_encode_type1(const struct ntlm_type1 *type1, struct ntlm_buf *data) -{ - krb5_error_code ret; - struct sec_buffer domain, hostname; - krb5_storage *out; - uint32_t base, flags; - - flags = type1->flags; - base = 16; - - if (type1->domain) { - base += 8; - flags |= NTLM_OEM_SUPPLIED_DOMAIN; - } - if (type1->hostname) { - base += 8; - flags |= NTLM_OEM_SUPPLIED_WORKSTATION; - } - if (type1->os[0]) - base += 8; - - domain.offset = base; - if (type1->domain) { - domain.length = len_string(0, type1->domain); - domain.allocated = domain.length; - } else { - domain.length = 0; - domain.allocated = 0; - } - - hostname.offset = domain.allocated + domain.offset; - if (type1->hostname) { - hostname.length = len_string(0, type1->hostname); - hostname.allocated = hostname.length; - } else { - hostname.length = 0; - hostname.allocated = 0; - } - - out = krb5_storage_emem(); - if (out == NULL) - return ENOMEM; - - krb5_storage_set_byteorder(out, KRB5_STORAGE_BYTEORDER_LE); - CHECK(krb5_storage_write(out, ntlmsigature, sizeof(ntlmsigature)), - sizeof(ntlmsigature)); - CHECK(krb5_store_uint32(out, 1), 0); - CHECK(krb5_store_uint32(out, flags), 0); - - CHECK(store_sec_buffer(out, &domain), 0); - CHECK(store_sec_buffer(out, &hostname), 0); -#if 0 - CHECK(krb5_store_uint32(out, type1->os[0]), 0); - CHECK(krb5_store_uint32(out, type1->os[1]), 0); -#endif - if (type1->domain) - CHECK(put_string(out, 0, type1->domain), 0); - if (type1->hostname) - CHECK(put_string(out, 0, type1->hostname), 0); - - { - krb5_data d; - ret = krb5_storage_to_data(out, &d); - data->data = d.data; - data->length = d.length; - } -out: - krb5_storage_free(out); - - return ret; -} - -/** - * Frees the ntlm_type2 message - * - * @param data message to be freed - * - * @ingroup ntlm_core - */ - -void -heim_ntlm_free_type2(struct ntlm_type2 *data) -{ - if (data->targetname) - free(data->targetname); - heim_ntlm_free_buf(&data->targetinfo); - memset(data, 0, sizeof(*data)); -} - -int -heim_ntlm_decode_type2(const struct ntlm_buf *buf, struct ntlm_type2 *type2) -{ - krb5_error_code ret; - unsigned char sig[8]; - uint32_t type, ctx[2]; - struct sec_buffer targetname, targetinfo; - krb5_storage *in; - int ucs2 = 0; - - memset(type2, 0, sizeof(*type2)); - - in = krb5_storage_from_readonly_mem(buf->data, buf->length); - if (in == NULL) { - ret = ENOMEM; - goto out; - } - krb5_storage_set_byteorder(in, KRB5_STORAGE_BYTEORDER_LE); - - CHECK(krb5_storage_read(in, sig, sizeof(sig)), sizeof(sig)); - CHECK(memcmp(ntlmsigature, sig, sizeof(ntlmsigature)), 0); - CHECK(krb5_ret_uint32(in, &type), 0); - CHECK(type, 2); - - CHECK(ret_sec_buffer(in, &targetname), 0); - CHECK(krb5_ret_uint32(in, &type2->flags), 0); - if (type2->flags & NTLM_NEG_UNICODE) - ucs2 = 1; - CHECK(krb5_storage_read(in, type2->challenge, sizeof(type2->challenge)), - sizeof(type2->challenge)); - CHECK(krb5_ret_uint32(in, &ctx[0]), 0); /* context */ - CHECK(krb5_ret_uint32(in, &ctx[1]), 0); - CHECK(ret_sec_buffer(in, &targetinfo), 0); - /* os version */ - if (type2->flags & NTLM_NEG_VERSION) { - CHECK(krb5_ret_uint32(in, &type2->os[0]), 0); - CHECK(krb5_ret_uint32(in, &type2->os[1]), 0); - } - - CHECK(ret_sec_string(in, ucs2, &targetname, &type2->targetname), 0); - CHECK(ret_buf(in, &targetinfo, &type2->targetinfo), 0); - ret = 0; - -out: - if (in) - krb5_storage_free(in); - if (ret) - heim_ntlm_free_type2(type2); - - return ret; -} - -/** - * Encodes an ntlm_type2 message. - * - * @param type2 the ntlm_type2 message to encode. - * @param data is the return buffer with the encoded message, should be - * freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_encode_type2(const struct ntlm_type2 *type2, struct ntlm_buf *data) -{ - struct sec_buffer targetname, targetinfo; - krb5_error_code ret; - krb5_storage *out = NULL; - uint32_t base; - int ucs2 = 0; - - base = 48; - - if (type2->flags & NTLM_NEG_VERSION) - base += 8; - - if (type2->flags & NTLM_NEG_UNICODE) - ucs2 = 1; - - targetname.offset = base; - targetname.length = len_string(ucs2, type2->targetname); - targetname.allocated = targetname.length; - - targetinfo.offset = targetname.allocated + targetname.offset; - targetinfo.length = type2->targetinfo.length; - targetinfo.allocated = type2->targetinfo.length; - - out = krb5_storage_emem(); - if (out == NULL) - return ENOMEM; - - krb5_storage_set_byteorder(out, KRB5_STORAGE_BYTEORDER_LE); - CHECK(krb5_storage_write(out, ntlmsigature, sizeof(ntlmsigature)), - sizeof(ntlmsigature)); - CHECK(krb5_store_uint32(out, 2), 0); - CHECK(store_sec_buffer(out, &targetname), 0); - CHECK(krb5_store_uint32(out, type2->flags), 0); - CHECK(krb5_storage_write(out, type2->challenge, sizeof(type2->challenge)), - sizeof(type2->challenge)); - CHECK(krb5_store_uint32(out, 0), 0); /* context */ - CHECK(krb5_store_uint32(out, 0), 0); - CHECK(store_sec_buffer(out, &targetinfo), 0); - /* os version */ - if (type2->flags & NTLM_NEG_VERSION) { - CHECK(krb5_store_uint32(out, type2->os[0]), 0); - CHECK(krb5_store_uint32(out, type2->os[1]), 0); - } - CHECK(put_string(out, ucs2, type2->targetname), 0); - CHECK(krb5_storage_write(out, type2->targetinfo.data, - type2->targetinfo.length), - type2->targetinfo.length); - - { - krb5_data d; - ret = krb5_storage_to_data(out, &d); - data->data = d.data; - data->length = d.length; - } - -out: - krb5_storage_free(out); - - return ret; -} - -/** - * Frees the ntlm_type3 message - * - * @param data message to be freed - * - * @ingroup ntlm_core - */ - -void -heim_ntlm_free_type3(struct ntlm_type3 *data) -{ - heim_ntlm_free_buf(&data->lm); - heim_ntlm_free_buf(&data->ntlm); - if (data->targetname) - free(data->targetname); - if (data->username) - free(data->username); - if (data->ws) - free(data->ws); - heim_ntlm_free_buf(&data->sessionkey); - memset(data, 0, sizeof(*data)); -} - -/* - * - */ - -int -heim_ntlm_decode_type3(const struct ntlm_buf *buf, - int ucs2, - struct ntlm_type3 *type3) -{ - krb5_error_code ret; - unsigned char sig[8]; - uint32_t type; - krb5_storage *in; - struct sec_buffer lm, ntlm, target, username, sessionkey, ws; - uint32_t min_offset = 72; - - memset(type3, 0, sizeof(*type3)); - memset(&sessionkey, 0, sizeof(sessionkey)); - - in = krb5_storage_from_readonly_mem(buf->data, buf->length); - if (in == NULL) { - ret = ENOMEM; - goto out; - } - krb5_storage_set_byteorder(in, KRB5_STORAGE_BYTEORDER_LE); - - CHECK(krb5_storage_read(in, sig, sizeof(sig)), sizeof(sig)); - CHECK(memcmp(ntlmsigature, sig, sizeof(ntlmsigature)), 0); - CHECK(krb5_ret_uint32(in, &type), 0); - CHECK(type, 3); - CHECK(ret_sec_buffer(in, &lm), 0); - if (lm.allocated) - min_offset = min(min_offset, lm.offset); - CHECK(ret_sec_buffer(in, &ntlm), 0); - if (ntlm.allocated) - min_offset = min(min_offset, ntlm.offset); - CHECK(ret_sec_buffer(in, &target), 0); - if (target.allocated) - min_offset = min(min_offset, target.offset); - CHECK(ret_sec_buffer(in, &username), 0); - if (username.allocated) - min_offset = min(min_offset, username.offset); - CHECK(ret_sec_buffer(in, &ws), 0); - if (ws.allocated) - min_offset = min(min_offset, ws.offset); - - if (min_offset > 52) { - CHECK(ret_sec_buffer(in, &sessionkey), 0); - min_offset = max(min_offset, sessionkey.offset); - CHECK(krb5_ret_uint32(in, &type3->flags), 0); - } - if (min_offset > 52 + 8 + 4 + 8) { - CHECK(krb5_ret_uint32(in, &type3->os[0]), 0); - CHECK(krb5_ret_uint32(in, &type3->os[1]), 0); - } - CHECK(ret_buf(in, &lm, &type3->lm), 0); - CHECK(ret_buf(in, &ntlm, &type3->ntlm), 0); - CHECK(ret_sec_string(in, ucs2, &target, &type3->targetname), 0); - CHECK(ret_sec_string(in, ucs2, &username, &type3->username), 0); - CHECK(ret_sec_string(in, ucs2, &ws, &type3->ws), 0); - if (sessionkey.offset) - CHECK(ret_buf(in, &sessionkey, &type3->sessionkey), 0); - -out: - if (in) - krb5_storage_free(in); - if (ret) - heim_ntlm_free_type3(type3); - - return ret; -} - -/** - * Encodes an ntlm_type3 message. - * - * @param type3 the ntlm_type3 message to encode. - * @param data is the return buffer with the encoded message, should be - * freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_encode_type3(const struct ntlm_type3 *type3, struct ntlm_buf *data) -{ - struct sec_buffer lm, ntlm, target, username, sessionkey, ws; - krb5_error_code ret; - krb5_storage *out = NULL; - uint32_t base; - int ucs2 = 0; - - memset(&lm, 0, sizeof(lm)); - memset(&ntlm, 0, sizeof(ntlm)); - memset(&target, 0, sizeof(target)); - memset(&username, 0, sizeof(username)); - memset(&ws, 0, sizeof(ws)); - memset(&sessionkey, 0, sizeof(sessionkey)); - - base = 52; - - base += 8; /* sessionkey sec buf */ - base += 4; /* flags */ - - if (type3->os[0]) { - base += 8; - } - - if (type3->flags & NTLM_NEG_UNICODE) - ucs2 = 1; - - target.offset = base; - target.length = len_string(ucs2, type3->targetname); - target.allocated = target.length; - - username.offset = target.offset + target.allocated; - username.length = len_string(ucs2, type3->username); - username.allocated = username.length; - - ws.offset = username.offset + username.allocated; - ws.length = len_string(ucs2, type3->ws); - ws.allocated = ws.length; - - lm.offset = ws.offset + ws.allocated; - lm.length = type3->lm.length; - lm.allocated = type3->lm.length; - - ntlm.offset = lm.offset + lm.allocated; - ntlm.length = type3->ntlm.length; - ntlm.allocated = ntlm.length; - - sessionkey.offset = ntlm.offset + ntlm.allocated; - sessionkey.length = type3->sessionkey.length; - sessionkey.allocated = type3->sessionkey.length; - - out = krb5_storage_emem(); - if (out == NULL) - return ENOMEM; - - krb5_storage_set_byteorder(out, KRB5_STORAGE_BYTEORDER_LE); - CHECK(krb5_storage_write(out, ntlmsigature, sizeof(ntlmsigature)), - sizeof(ntlmsigature)); - CHECK(krb5_store_uint32(out, 3), 0); - - CHECK(store_sec_buffer(out, &lm), 0); - CHECK(store_sec_buffer(out, &ntlm), 0); - CHECK(store_sec_buffer(out, &target), 0); - CHECK(store_sec_buffer(out, &username), 0); - CHECK(store_sec_buffer(out, &ws), 0); - CHECK(store_sec_buffer(out, &sessionkey), 0); - CHECK(krb5_store_uint32(out, type3->flags), 0); - -#if 0 - CHECK(krb5_store_uint32(out, 0), 0); /* os0 */ - CHECK(krb5_store_uint32(out, 0), 0); /* os1 */ -#endif - - CHECK(put_string(out, ucs2, type3->targetname), 0); - CHECK(put_string(out, ucs2, type3->username), 0); - CHECK(put_string(out, ucs2, type3->ws), 0); - CHECK(put_buf(out, &type3->lm), 0); - CHECK(put_buf(out, &type3->ntlm), 0); - CHECK(put_buf(out, &type3->sessionkey), 0); - - { - krb5_data d; - ret = krb5_storage_to_data(out, &d); - data->data = d.data; - data->length = d.length; - } - -out: - krb5_storage_free(out); - - return ret; -} - - -/* - * - */ - -static void -splitandenc(unsigned char *hash, - unsigned char *challenge, - unsigned char *answer) -{ - EVP_CIPHER_CTX ctx; - unsigned char key[8]; - - key[0] = hash[0]; - key[1] = (hash[0] << 7) | (hash[1] >> 1); - key[2] = (hash[1] << 6) | (hash[2] >> 2); - key[3] = (hash[2] << 5) | (hash[3] >> 3); - key[4] = (hash[3] << 4) | (hash[4] >> 4); - key[5] = (hash[4] << 3) | (hash[5] >> 5); - key[6] = (hash[5] << 2) | (hash[6] >> 6); - key[7] = (hash[6] << 1); - - EVP_CIPHER_CTX_init(&ctx); - - EVP_CipherInit_ex(&ctx, EVP_des_cbc(), NULL, key, NULL, 1); - EVP_Cipher(&ctx, answer, challenge, 8); - EVP_CIPHER_CTX_cleanup(&ctx); - memset(key, 0, sizeof(key)); -} - -/** - * Calculate the NTLM key, the password is assumed to be in UTF8. - * - * @param password password to calcute the key for. - * @param key calcuted key, should be freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_nt_key(const char *password, struct ntlm_buf *key) -{ - struct ntlm_buf buf; - EVP_MD_CTX *m; - int ret; - - key->data = malloc(MD5_DIGEST_LENGTH); - if (key->data == NULL) - return ENOMEM; - key->length = MD5_DIGEST_LENGTH; - - ret = ascii2ucs2le(password, 0, &buf); - if (ret) { - heim_ntlm_free_buf(key); - return ret; - } - - m = EVP_MD_CTX_create(); - if (m == NULL) { - heim_ntlm_free_buf(key); - heim_ntlm_free_buf(&buf); - return ENOMEM; - } - - EVP_DigestInit_ex(m, EVP_md4(), NULL); - EVP_DigestUpdate(m, buf.data, buf.length); - EVP_DigestFinal_ex(m, key->data, NULL); - EVP_MD_CTX_destroy(m); - - heim_ntlm_free_buf(&buf); - return 0; -} - -/** - * Calculate NTLMv1 response hash - * - * @param key the ntlm v1 key - * @param len length of key - * @param challenge sent by the server - * @param answer calculated answer, should be freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_calculate_ntlm1(void *key, size_t len, - unsigned char challenge[8], - struct ntlm_buf *answer) -{ - unsigned char res[21]; - - if (len != MD4_DIGEST_LENGTH) - return HNTLM_ERR_INVALID_LENGTH; - - memcpy(res, key, len); - memset(&res[MD4_DIGEST_LENGTH], 0, sizeof(res) - MD4_DIGEST_LENGTH); - - answer->data = malloc(24); - if (answer->data == NULL) - return ENOMEM; - answer->length = 24; - - splitandenc(&res[0], challenge, ((unsigned char *)answer->data) + 0); - splitandenc(&res[7], challenge, ((unsigned char *)answer->data) + 8); - splitandenc(&res[14], challenge, ((unsigned char *)answer->data) + 16); - - return 0; -} - -int -heim_ntlm_v1_base_session(void *key, size_t len, - struct ntlm_buf *session) -{ - EVP_MD_CTX *m; - - session->length = MD4_DIGEST_LENGTH; - session->data = malloc(session->length); - if (session->data == NULL) { - session->length = 0; - return ENOMEM; - } - - m = EVP_MD_CTX_create(); - if (m == NULL) { - heim_ntlm_free_buf(session); - return ENOMEM; - } - EVP_DigestInit_ex(m, EVP_md4(), NULL); - EVP_DigestUpdate(m, key, len); - EVP_DigestFinal_ex(m, session->data, NULL); - EVP_MD_CTX_destroy(m); - - return 0; -} - -int -heim_ntlm_v2_base_session(void *key, size_t len, - struct ntlm_buf *ntlmResponse, - struct ntlm_buf *session) -{ - unsigned int hmaclen; - HMAC_CTX c; - - if (ntlmResponse->length <= 16) - return HNTLM_ERR_INVALID_LENGTH; - - session->data = malloc(16); - if (session->data == NULL) - return ENOMEM; - session->length = 16; - - /* Note: key is the NTLMv2 key */ - HMAC_CTX_init(&c); - HMAC_Init_ex(&c, key, len, EVP_md5(), NULL); - HMAC_Update(&c, ntlmResponse->data, 16); - HMAC_Final(&c, session->data, &hmaclen); - HMAC_CTX_cleanup(&c); - - return 0; -} - - -int -heim_ntlm_keyex_wrap(struct ntlm_buf *base_session, - struct ntlm_buf *session, - struct ntlm_buf *encryptedSession) -{ - EVP_CIPHER_CTX c; - int ret; - - session->length = MD4_DIGEST_LENGTH; - session->data = malloc(session->length); - if (session->data == NULL) { - session->length = 0; - return ENOMEM; - } - encryptedSession->length = MD4_DIGEST_LENGTH; - encryptedSession->data = malloc(encryptedSession->length); - if (encryptedSession->data == NULL) { - heim_ntlm_free_buf(session); - encryptedSession->length = 0; - return ENOMEM; - } - - EVP_CIPHER_CTX_init(&c); - - ret = EVP_CipherInit_ex(&c, EVP_rc4(), NULL, base_session->data, NULL, 1); - if (ret != 1) { - EVP_CIPHER_CTX_cleanup(&c); - heim_ntlm_free_buf(encryptedSession); - heim_ntlm_free_buf(session); - return HNTLM_ERR_CRYPTO; - } - - if (RAND_bytes(session->data, session->length) != 1) { - EVP_CIPHER_CTX_cleanup(&c); - heim_ntlm_free_buf(encryptedSession); - heim_ntlm_free_buf(session); - return HNTLM_ERR_RAND; - } - - EVP_Cipher(&c, encryptedSession->data, session->data, encryptedSession->length); - EVP_CIPHER_CTX_cleanup(&c); - - return 0; - - - -} - - - -/** - * Generates an NTLMv1 session random with assosited session master key. - * - * @param key the ntlm v1 key - * @param len length of key - * @param session generated session nonce, should be freed with heim_ntlm_free_buf(). - * @param master calculated session master key, should be freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_build_ntlm1_master(void *key, size_t len, - struct ntlm_buf *session, - struct ntlm_buf *master) -{ - struct ntlm_buf sess; - int ret; - - ret = heim_ntlm_v1_base_session(key, len, &sess); - if (ret) - return ret; - - ret = heim_ntlm_keyex_wrap(&sess, session, master); - heim_ntlm_free_buf(&sess); - - return ret; -} - -/** - * Generates an NTLMv2 session random with associated session master key. - * - * @param key the NTLMv2 key - * @param len length of key - * @param blob the NTLMv2 "blob" - * @param session generated session nonce, should be freed with heim_ntlm_free_buf(). - * @param master calculated session master key, should be freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - - -int -heim_ntlm_build_ntlm2_master(void *key, size_t len, - struct ntlm_buf *blob, - struct ntlm_buf *session, - struct ntlm_buf *master) -{ - struct ntlm_buf sess; - int ret; - - ret = heim_ntlm_v2_base_session(key, len, blob, &sess); - if (ret) - return ret; - - ret = heim_ntlm_keyex_wrap(&sess, session, master); - heim_ntlm_free_buf(&sess); - - return ret; -} - -/** - * Given a key and encrypted session, unwrap the session key - * - * @param baseKey the sessionBaseKey - * @param encryptedSession encrypted session, type3.session field. - * @param session generated session nonce, should be freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_keyex_unwrap(struct ntlm_buf *baseKey, - struct ntlm_buf *encryptedSession, - struct ntlm_buf *session) -{ - EVP_CIPHER_CTX c; - - memset(session, 0, sizeof(*session)); - - if (baseKey->length != MD4_DIGEST_LENGTH) - return HNTLM_ERR_INVALID_LENGTH; - - session->length = MD4_DIGEST_LENGTH; - session->data = malloc(session->length); - if (session->data == NULL) { - session->length = 0; - return ENOMEM; - } - EVP_CIPHER_CTX_init(&c); - - if (EVP_CipherInit_ex(&c, EVP_rc4(), NULL, baseKey->data, NULL, 0) != 1) { - EVP_CIPHER_CTX_cleanup(&c); - heim_ntlm_free_buf(session); - return HNTLM_ERR_CRYPTO; - } - - EVP_Cipher(&c, session->data, encryptedSession->data, session->length); - EVP_CIPHER_CTX_cleanup(&c); - - return 0; -} - - -/** - * Generates an NTLMv2 session key. - * - * @param key the ntlm key - * @param len length of key - * @param username name of the user, as sent in the message, assumed to be in UTF8. - * @param target the name of the target, assumed to be in UTF8. - * @param ntlmv2 the ntlmv2 session key - * - * @return 0 on success, or an error code on failure. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_ntlmv2_key(const void *key, size_t len, - const char *username, - const char *target, - unsigned char ntlmv2[16]) -{ - int ret; - unsigned int hmaclen; - HMAC_CTX c; - - HMAC_CTX_init(&c); - HMAC_Init_ex(&c, key, len, EVP_md5(), NULL); - { - struct ntlm_buf buf; - /* uppercase username and turn it into ucs2-le */ - ret = ascii2ucs2le(username, 1, &buf); - if (ret) - goto out; - HMAC_Update(&c, buf.data, buf.length); - free(buf.data); - /* uppercase target and turn into ucs2-le */ - ret = ascii2ucs2le(target, 1, &buf); - if (ret) - goto out; - HMAC_Update(&c, buf.data, buf.length); - free(buf.data); - } - HMAC_Final(&c, ntlmv2, &hmaclen); - out: - HMAC_CTX_cleanup(&c); - - return ret; -} - -/* - * - */ - -#define NTTIME_EPOCH 0x019DB1DED53E8000LL - -static uint64_t -unix2nttime(time_t unix_time) -{ - long long wt; - wt = unix_time * (uint64_t)10000000 + (uint64_t)NTTIME_EPOCH; - return wt; -} - -static time_t -nt2unixtime(uint64_t t) -{ - t = ((t - (uint64_t)NTTIME_EPOCH) / (uint64_t)10000000); - if (t > (((uint64_t)(time_t)(~(uint64_t)0)) >> 1)) - return 0; - return (time_t)t; -} - -/** - * Calculate LMv2 response - * - * @param key the ntlm key - * @param len length of key - * @param username name of the user, as sent in the message, assumed to be in UTF8. - * @param target the name of the target, assumed to be in UTF8. - * @param serverchallenge challenge as sent by the server in the type2 message. - * @param ntlmv2 calculated session key - * @param answer ntlm response answer, should be freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_calculate_lm2(const void *key, size_t len, - const char *username, - const char *target, - const unsigned char serverchallenge[8], - unsigned char ntlmv2[16], - struct ntlm_buf *answer) -{ - unsigned char clientchallenge[8]; - - if (RAND_bytes(clientchallenge, sizeof(clientchallenge)) != 1) - return HNTLM_ERR_RAND; - - /* calculate ntlmv2 key */ - - heim_ntlm_ntlmv2_key(key, len, username, target, ntlmv2); - - answer->data = malloc(24); - if (answer->data == NULL) - return ENOMEM; - answer->length = 24; - - heim_ntlm_derive_ntlm2_sess(ntlmv2, clientchallenge, 8, - serverchallenge, answer->data); - - memcpy(((uint8_t *)answer->data) + 16, clientchallenge, 8); - - return 0; -} - - -/** - * Calculate NTLMv2 response - * - * @param key the ntlm key - * @param len length of key - * @param username name of the user, as sent in the message, assumed to be in UTF8. - * @param target the name of the target, assumed to be in UTF8. - * @param serverchallenge challenge as sent by the server in the type2 message. - * @param infotarget infotarget as sent by the server in the type2 message. - * @param ntlmv2 calculated session key - * @param answer ntlm response answer, should be freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_calculate_ntlm2(const void *key, size_t len, - const char *username, - const char *target, - const unsigned char serverchallenge[8], - const struct ntlm_buf *infotarget, - unsigned char ntlmv2[16], - struct ntlm_buf *answer) -{ - krb5_error_code ret; - krb5_data data; - unsigned char ntlmv2answer[16]; - krb5_storage *sp; - unsigned char clientchallenge[8]; - uint64_t t; - - t = unix2nttime(time(NULL)); - - if (RAND_bytes(clientchallenge, sizeof(clientchallenge)) != 1) - return HNTLM_ERR_RAND; - - /* calculate ntlmv2 key */ - - heim_ntlm_ntlmv2_key(key, len, username, target, ntlmv2); - - /* calculate and build ntlmv2 answer */ - - sp = krb5_storage_emem(); - if (sp == NULL) - return ENOMEM; - krb5_storage_set_flags(sp, KRB5_STORAGE_BYTEORDER_LE); - - CHECK(krb5_store_uint32(sp, 0x00000101), 0); - CHECK(krb5_store_uint32(sp, 0), 0); - /* timestamp le 64 bit ts */ - CHECK(krb5_store_uint32(sp, t & 0xffffffff), 0); - CHECK(krb5_store_uint32(sp, t >> 32), 0); - - CHECK(krb5_storage_write(sp, clientchallenge, 8), 8); - - CHECK(krb5_store_uint32(sp, 0), 0); /* unknown but zero will work */ - CHECK(krb5_storage_write(sp, infotarget->data, infotarget->length), - infotarget->length); - CHECK(krb5_store_uint32(sp, 0), 0); /* unknown but zero will work */ - - CHECK(krb5_storage_to_data(sp, &data), 0); - krb5_storage_free(sp); - sp = NULL; - - heim_ntlm_derive_ntlm2_sess(ntlmv2, data.data, data.length, serverchallenge, ntlmv2answer); - - sp = krb5_storage_emem(); - if (sp == NULL) { - krb5_data_free(&data); - return ENOMEM; - } - - CHECK(krb5_storage_write(sp, ntlmv2answer, 16), 16); - CHECK(krb5_storage_write(sp, data.data, data.length), data.length); - krb5_data_free(&data); - - CHECK(krb5_storage_to_data(sp, &data), 0); - krb5_storage_free(sp); - sp = NULL; - - answer->data = data.data; - answer->length = data.length; - - return 0; -out: - if (sp) - krb5_storage_free(sp); - return ret; -} - -static const int authtimediff = 3600 * 2; /* 2 hours */ - -/** - * Verify NTLMv2 response. - * - * @param key the ntlm key - * @param len length of key - * @param username name of the user, as sent in the message, assumed to be in UTF8. - * @param target the name of the target, assumed to be in UTF8. - * @param now the time now (0 if the library should pick it up itself) - * @param serverchallenge challenge as sent by the server in the type2 message. - * @param answer ntlm response answer, should be freed with heim_ntlm_free_buf(). - * @param infotarget infotarget as sent by the server in the type2 message. - * @param ntlmv2 calculated session key - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_verify_ntlm2(const void *key, size_t len, - const char *username, - const char *target, - time_t now, - const unsigned char serverchallenge[8], - const struct ntlm_buf *answer, - struct ntlm_buf *infotarget, - unsigned char ntlmv2[16]) -{ - krb5_error_code ret; - unsigned char clientanswer[16]; - unsigned char clientnonce[8]; - unsigned char serveranswer[16]; - krb5_storage *sp; - time_t authtime; - uint32_t temp; - uint64_t t; - - infotarget->length = 0; - infotarget->data = NULL; - - if (answer->length < 16) - return HNTLM_ERR_INVALID_LENGTH; - - if (now == 0) - now = time(NULL); - - /* calculate ntlmv2 key */ - - heim_ntlm_ntlmv2_key(key, len, username, target, ntlmv2); - - /* calculate and build ntlmv2 answer */ - - sp = krb5_storage_from_readonly_mem(answer->data, answer->length); - if (sp == NULL) - return ENOMEM; - krb5_storage_set_flags(sp, KRB5_STORAGE_BYTEORDER_LE); - - CHECK(krb5_storage_read(sp, clientanswer, 16), 16); - - CHECK(krb5_ret_uint32(sp, &temp), 0); - CHECK(temp, 0x00000101); - CHECK(krb5_ret_uint32(sp, &temp), 0); - CHECK(temp, 0); - /* timestamp le 64 bit ts */ - CHECK(krb5_ret_uint32(sp, &temp), 0); - t = temp; - CHECK(krb5_ret_uint32(sp, &temp), 0); - t |= ((uint64_t)temp)<< 32; - - authtime = nt2unixtime(t); - - if (abs((int)(authtime - now)) > authtimediff) { - ret = HNTLM_ERR_TIME_SKEW; - goto out; - } - - /* client challenge */ - CHECK(krb5_storage_read(sp, clientnonce, 8), 8); - - CHECK(krb5_ret_uint32(sp, &temp), 0); /* unknown */ - - /* should really unparse the infotarget, but lets pick up everything */ - infotarget->length = answer->length - krb5_storage_seek(sp, 0, SEEK_CUR); - infotarget->data = malloc(infotarget->length); - if (infotarget->data == NULL) { - ret = ENOMEM; - goto out; - } - CHECK(krb5_storage_read(sp, infotarget->data, infotarget->length), - infotarget->length); - /* XXX remove the unknown ?? */ - krb5_storage_free(sp); - sp = NULL; - - if (answer->length < 16) { - ret = HNTLM_ERR_INVALID_LENGTH; - goto out; - } - - heim_ntlm_derive_ntlm2_sess(ntlmv2, - ((unsigned char *)answer->data) + 16, answer->length - 16, - serverchallenge, - serveranswer); - - if (memcmp(serveranswer, clientanswer, 16) != 0) { - heim_ntlm_free_buf(infotarget); - return HNTLM_ERR_AUTH; - } - - return 0; -out: - heim_ntlm_free_buf(infotarget); - if (sp) - krb5_storage_free(sp); - return ret; -} - - -/* - * Calculate the NTLM2 Session Response - * - * @param clnt_nonce client nonce - * @param svr_chal server challage - * @param ntlm2_hash ntlm hash - * @param lm The LM response, should be freed with heim_ntlm_free_buf(). - * @param ntlm The NTLM response, should be freed with heim_ntlm_free_buf(). - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_calculate_ntlm2_sess(const unsigned char clnt_nonce[8], - const unsigned char svr_chal[8], - const unsigned char ntlm_hash[16], - struct ntlm_buf *lm, - struct ntlm_buf *ntlm) -{ - unsigned char ntlm2_sess_hash[8]; - unsigned char res[21], *resp; - int code; - - code = heim_ntlm_calculate_ntlm2_sess_hash(clnt_nonce, svr_chal, - ntlm2_sess_hash); - if (code) { - return code; - } - - lm->data = malloc(24); - if (lm->data == NULL) { - return ENOMEM; - } - lm->length = 24; - - ntlm->data = malloc(24); - if (ntlm->data == NULL) { - free(lm->data); - lm->data = NULL; - return ENOMEM; - } - ntlm->length = 24; - - /* first setup the lm resp */ - memset(lm->data, 0, 24); - memcpy(lm->data, clnt_nonce, 8); - - memset(res, 0, sizeof(res)); - memcpy(res, ntlm_hash, 16); - - resp = ntlm->data; - splitandenc(&res[0], ntlm2_sess_hash, resp + 0); - splitandenc(&res[7], ntlm2_sess_hash, resp + 8); - splitandenc(&res[14], ntlm2_sess_hash, resp + 16); - - return 0; -} - - -/* - * Calculate the NTLM2 Session "Verifier" - * - * @param clnt_nonce client nonce - * @param svr_chal server challage - * @param hash The NTLM session verifier - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -int -heim_ntlm_calculate_ntlm2_sess_hash(const unsigned char clnt_nonce[8], - const unsigned char svr_chal[8], - unsigned char verifier[8]) -{ - unsigned char ntlm2_sess_hash[MD5_DIGEST_LENGTH]; - EVP_MD_CTX *m; - - m = EVP_MD_CTX_create(); - if (m == NULL) - return ENOMEM; - - EVP_DigestInit_ex(m, EVP_md5(), NULL); - EVP_DigestUpdate(m, svr_chal, 8); /* session nonce part 1 */ - EVP_DigestUpdate(m, clnt_nonce, 8); /* session nonce part 2 */ - EVP_DigestFinal_ex(m, ntlm2_sess_hash, NULL); /* will only use first 8 bytes */ - EVP_MD_CTX_destroy(m); - - memcpy(verifier, ntlm2_sess_hash, 8); - - return 0; -} - - -/* - * Derive a NTLM2 session key - * - * @param sessionkey session key from domain controller - * @param clnt_nonce client nonce - * @param svr_chal server challenge - * @param derivedkey salted session key - * - * @return In case of success 0 is return, an errors, a errno in what - * went wrong. - * - * @ingroup ntlm_core - */ - -void -heim_ntlm_derive_ntlm2_sess(const unsigned char sessionkey[16], - const unsigned char *clnt_nonce, size_t clnt_nonce_length, - const unsigned char svr_chal[8], - unsigned char derivedkey[16]) -{ - unsigned int hmaclen; - HMAC_CTX c; - - /* HMAC(Ksession, serverchallenge || clientchallenge) */ - HMAC_CTX_init(&c); - HMAC_Init_ex(&c, sessionkey, 16, EVP_md5(), NULL); - HMAC_Update(&c, svr_chal, 8); - HMAC_Update(&c, clnt_nonce, clnt_nonce_length); - HMAC_Final(&c, derivedkey, &hmaclen); - HMAC_CTX_cleanup(&c); -} - diff --git a/kerberosV/src/lib/ntlm/ntlm_err.et b/kerberosV/src/lib/ntlm/ntlm_err.et deleted file mode 100644 index 0fd6e00a21c..00000000000 --- a/kerberosV/src/lib/ntlm/ntlm_err.et +++ /dev/null @@ -1,24 +0,0 @@ -# -# Error messages for the ntlm library -# -# This might look like a com_err file, but is not -# - -error_table ntlm - -prefix HNTLM_ERR -error_code DECODE, "Failed to decode packet" -error_code INVALID_LENGTH, "Input length invalid" -error_code CRYPTO, "Failed crypto primitive" -error_code RAND, "Random generator failed" -error_code AUTH, "NTLM authentication failed" -error_code TIME_SKEW, "Client time skewed to server" -error_code OEM, "Client set OEM string" -error_code MISSING_NAME_SEPARATOR, "missing @ or \ in name" -error_code MISSING_BUFFER, "missing expected buffer" -error_code INVALID_APOP, "Invalid APOP response" -error_code INVALID_CRAM_MD5, "Invalid CRAM-MD5 response" -error_code INVALID_DIGEST_MD5, "Invalid DIGEST-MD5 response" -error_code INVALID_DIGEST_MD5_RSPAUTH, "Invalid DIGEST-MD5 rspauth" - -end diff --git a/kerberosV/src/lib/ntlm/test_ntlm.c b/kerberosV/src/lib/ntlm/test_ntlm.c deleted file mode 100644 index 5a995adae48..00000000000 --- a/kerberosV/src/lib/ntlm/test_ntlm.c +++ /dev/null @@ -1,380 +0,0 @@ -/* - * Copyright (c) 2006 - 2007 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 "config.h" - -#include -#include -#include -#include - -#include /* or */ -#include - -static int -test_parse(void) -{ - const char *user = "foo", - *domain = "mydomain", - *password = "digestpassword", - *target = "DOMAIN"; - struct ntlm_type1 type1; - struct ntlm_type2 type2; - struct ntlm_type3 type3; - struct ntlm_buf data; - int ret, flags; - - memset(&type1, 0, sizeof(type1)); - - type1.flags = NTLM_NEG_UNICODE|NTLM_NEG_TARGET|NTLM_NEG_NTLM; - type1.domain = rk_UNCONST(domain); - type1.hostname = NULL; - type1.os[0] = 0; - type1.os[1] = 0; - - ret = heim_ntlm_encode_type1(&type1, &data); - if (ret) - errx(1, "heim_ntlm_encode_type1"); - - memset(&type1, 0, sizeof(type1)); - - ret = heim_ntlm_decode_type1(&data, &type1); - free(data.data); - if (ret) - errx(1, "heim_ntlm_encode_type1"); - - heim_ntlm_free_type1(&type1); - - /* - * - */ - - memset(&type2, 0, sizeof(type2)); - - flags = NTLM_NEG_UNICODE | NTLM_NEG_NTLM | NTLM_TARGET_DOMAIN; - type2.flags = flags; - - memset(type2.challenge, 0x7f, sizeof(type2.challenge)); - type2.targetname = rk_UNCONST(target); - type2.targetinfo.data = NULL; - type2.targetinfo.length = 0; - - ret = heim_ntlm_encode_type2(&type2, &data); - if (ret) - errx(1, "heim_ntlm_encode_type2"); - - memset(&type2, 0, sizeof(type2)); - - ret = heim_ntlm_decode_type2(&data, &type2); - free(data.data); - if (ret) - errx(1, "heim_ntlm_decode_type2"); - - heim_ntlm_free_type2(&type2); - - /* - * - */ - - memset(&type3, 0, sizeof(type3)); - - type3.flags = flags; - type3.username = rk_UNCONST(user); - type3.targetname = rk_UNCONST(target); - type3.ws = rk_UNCONST("workstation"); - - { - struct ntlm_buf key; - heim_ntlm_nt_key(password, &key); - - heim_ntlm_calculate_ntlm1(key.data, key.length, - type2.challenge, - &type3.ntlm); - free(key.data); - } - - ret = heim_ntlm_encode_type3(&type3, &data); - if (ret) - errx(1, "heim_ntlm_encode_type3"); - - free(type3.ntlm.data); - - memset(&type3, 0, sizeof(type3)); - - ret = heim_ntlm_decode_type3(&data, 1, &type3); - free(data.data); - if (ret) - errx(1, "heim_ntlm_decode_type3"); - - if (strcmp("workstation", type3.ws) != 0) - errx(1, "type3 ws wrong"); - - if (strcmp(target, type3.targetname) != 0) - errx(1, "type3 targetname wrong"); - - if (strcmp(user, type3.username) != 0) - errx(1, "type3 username wrong"); - - - heim_ntlm_free_type3(&type3); - - /* - * NTLMv2 - */ - - memset(&type2, 0, sizeof(type2)); - - flags = NTLM_NEG_UNICODE | NTLM_NEG_NTLM | NTLM_TARGET_DOMAIN; - type2.flags = flags; - - memset(type2.challenge, 0x7f, sizeof(type2.challenge)); - type2.targetname = rk_UNCONST(target); - type2.targetinfo.data = "\x00\x00"; - type2.targetinfo.length = 2; - - ret = heim_ntlm_encode_type2(&type2, &data); - if (ret) - errx(1, "heim_ntlm_encode_type2"); - - memset(&type2, 0, sizeof(type2)); - - ret = heim_ntlm_decode_type2(&data, &type2); - free(data.data); - if (ret) - errx(1, "heim_ntlm_decode_type2"); - - heim_ntlm_free_type2(&type2); - - return 0; -} - -static int -test_keys(void) -{ - const char - *username = "test", - *password = "test1234", - *target = "TESTNT"; - const unsigned char - serverchallenge[8] = "\x67\x7f\x1c\x55\x7a\x5e\xe9\x6c"; - struct ntlm_buf infotarget, infotarget2, answer, key; - unsigned char ntlmv2[16], ntlmv2_1[16]; - int ret; - - infotarget.length = 70; - infotarget.data = - "\x02\x00\x0c\x00\x54\x00\x45\x00\x53\x00\x54\x00\x4e\x00\x54\x00" - "\x01\x00\x0c\x00\x4d\x00\x45\x00\x4d\x00\x42\x00\x45\x00\x52\x00" - "\x03\x00\x1e\x00\x6d\x00\x65\x00\x6d\x00\x62\x00\x65\x00\x72\x00" - "\x2e\x00\x74\x00\x65\x00\x73\x00\x74\x00\x2e\x00\x63\x00\x6f" - "\x00\x6d\x00" - "\x00\x00\x00\x00"; - - answer.length = 0; - answer.data = NULL; - - heim_ntlm_nt_key(password, &key); - - ret = heim_ntlm_calculate_ntlm2(key.data, - key.length, - username, - target, - serverchallenge, - &infotarget, - ntlmv2, - &answer); - if (ret) - errx(1, "heim_ntlm_calculate_ntlm2"); - - ret = heim_ntlm_verify_ntlm2(key.data, - key.length, - username, - target, - 0, - serverchallenge, - &answer, - &infotarget2, - ntlmv2_1); - if (ret) - errx(1, "heim_ntlm_verify_ntlm2"); - - if (memcmp(ntlmv2, ntlmv2_1, sizeof(ntlmv2)) != 0) - errx(1, "ntlm master key not same"); - - if (infotarget.length > infotarget2.length) - errx(1, "infotarget length"); - - if (memcmp(infotarget.data, infotarget2.data, infotarget.length) != 0) - errx(1, "infotarget not the same"); - - free(key.data); - free(answer.data); - free(infotarget2.data); - - return 0; -} - -static int -test_ntlm2_session_resp(void) -{ - int ret; - struct ntlm_buf lm, ntlm; - - const unsigned char lm_resp[24] = - "\xff\xff\xff\x00\x11\x22\x33\x44" - "\x00\x00\x00\x00\x00\x00\x00\x00" - "\x00\x00\x00\x00\x00\x00\x00\x00"; - const unsigned char ntlm2_sess_resp[24] = - "\x10\xd5\x50\x83\x2d\x12\xb2\xcc" - "\xb7\x9d\x5a\xd1\xf4\xee\xd3\xdf" - "\x82\xac\xa4\xc3\x68\x1d\xd4\x55"; - - const unsigned char client_nonce[8] = - "\xff\xff\xff\x00\x11\x22\x33\x44"; - const unsigned char server_challenge[8] = - "\x01\x23\x45\x67\x89\xab\xcd\xef"; - - const unsigned char ntlm_hash[16] = - "\xcd\x06\xca\x7c\x7e\x10\xc9\x9b" - "\x1d\x33\xb7\x48\x5a\x2e\xd8\x08"; - - ret = heim_ntlm_calculate_ntlm2_sess(client_nonce, - server_challenge, - ntlm_hash, - &lm, - &ntlm); - if (ret) - errx(1, "heim_ntlm_calculate_ntlm2_sess_resp"); - - if (lm.length != 24 || memcmp(lm.data, lm_resp, 24) != 0) - errx(1, "lm_resp wrong"); - if (ntlm.length != 24 || memcmp(ntlm.data, ntlm2_sess_resp, 24) != 0) - errx(1, "ntlm2_sess_resp wrong"); - - free(lm.data); - free(ntlm.data); - - - return 0; -} - -static int -test_targetinfo(void) -{ - struct ntlm_targetinfo ti; - struct ntlm_buf buf; - const char *dnsservername = "dnsservername"; - int ret; - - memset(&ti, 0, sizeof(ti)); - - ti.dnsservername = rk_UNCONST(dnsservername); - ti.avflags = 1; - ret = heim_ntlm_encode_targetinfo(&ti, 1, &buf); - if (ret) - return ret; - - memset(&ti, 0, sizeof(ti)); - - ret = heim_ntlm_decode_targetinfo(&buf, 1, &ti); - if (ret) - return ret; - - if (ti.dnsservername == NULL || - strcmp(ti.dnsservername, dnsservername) != 0) - errx(1, "ti.dnshostname != %s", dnsservername); - if (ti.avflags != 1) - errx(1, "ti.avflags != 1"); - - heim_ntlm_free_targetinfo(&ti); - - return 0; -} - -static int verbose_flag = 0; -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"verbose", 0, arg_flag, &verbose_flag, "verbose printing", NULL }, - {"version", 0, arg_flag, &version_flag, "print version", NULL }, - {"help", 0, arg_flag, &help_flag, NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, sizeof(args)/sizeof(*args), - NULL, ""); - exit (ret); -} - -int -main(int argc, char **argv) -{ - int ret = 0, optind = 0; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optind)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - print_version(NULL); - exit(0); - } - - argc -= optind; - argv += optind; - - if (verbose_flag) - printf("test_parse\n"); - - ret += test_parse(); - if (verbose_flag) - printf("test_keys\n"); - - ret += test_keys(); - if (verbose_flag) - printf("test_ntlm2_session_resp\n"); - ret += test_ntlm2_session_resp(); - - if (verbose_flag) - printf("test_targetinfo\n"); - ret += test_targetinfo(); - - return ret; -} diff --git a/kerberosV/src/lib/ntlm/version-script.map b/kerberosV/src/lib/ntlm/version-script.map deleted file mode 100644 index 142d53876c5..00000000000 --- a/kerberosV/src/lib/ntlm/version-script.map +++ /dev/null @@ -1,30 +0,0 @@ -# $Id: version-script.map,v 1.1 2013/06/17 19:11:44 robert Exp $ - -HEIMDAL_NTLM_1.0 { - global: - heim_ntlm_build_ntlm1_master; - heim_ntlm_calculate_lm2; - heim_ntlm_calculate_ntlm1; - heim_ntlm_calculate_ntlm2; - heim_ntlm_calculate_ntlm2_sess; - heim_ntlm_decode_targetinfo; - heim_ntlm_decode_type1; - heim_ntlm_decode_type2; - heim_ntlm_decode_type3; - heim_ntlm_encode_targetinfo; - heim_ntlm_encode_type1; - heim_ntlm_encode_type2; - heim_ntlm_encode_type3; - heim_ntlm_free_buf; - heim_ntlm_free_targetinfo; - heim_ntlm_free_type1; - heim_ntlm_free_type2; - heim_ntlm_free_type3; - heim_ntlm_nt_key; - heim_ntlm_ntlmv2_key; - heim_ntlm_verify_ntlm2; - heim_ntlm_unparse_flags; - initialize_ntlm_error_table_r; - local: - *; -}; diff --git a/kerberosV/src/lib/otp/ChangeLog b/kerberosV/src/lib/otp/ChangeLog deleted file mode 100644 index d4fda44ba95..00000000000 --- a/kerberosV/src/lib/otp/ChangeLog +++ /dev/null @@ -1,128 +0,0 @@ -2007-07-17 Love Hörnquist Åstrand - - * Makefile.am: split source files in dist and nodist. - -2007-07-10 Love Hörnquist Åstrand - - * Makefile.am: New library version - -2007-06-07 Assar Westerlund - - * otp_parse.c: NIIL should be NIL - -2006-05-08 Love Hörnquist Åstrand - - * otp_parse.c: Less "pointer targets in passing argument differ in - signedness" warnings. - -2005-07-09 Love Hörnquist Åstrand - - * otp.h: remove parameter names to avoid shadow warnings - -2005-07-07 Love Hörnquist Åstrand - - * otp_parse.c (parse_words): avoid const warnings by making a - (shorter) copy of the string instead of truncating it - -2005-01-09 Love Hörnquist Åstrand - - * otp_parse.c: cast argument to tolower to unsigned char - -2003-04-16 Love Hörnquist Åstrand - - * roken_rename.h: rename strlcat, strlcpy - * Makefile.am: (ES): add strlcpy.c and strlcat.c - * otp_db.c: use strlcpy, from openbsd - * otp_md.c: use strlcat/strlcpy, from openbsd - * otp_challenge.c: do strdup again, we desupport ultrix - -2002-09-10 Johan Danielsson - - * otp_md.c: if we only have old hash names, we need to include - functions here that do the work - -2002-05-20 Johan Danielsson - - * otp_db.c: fix ndbm test - -2002-05-17 Johan Danielsson - - * Makefile.am: add hooks for ndbm_wrap - - * otp_db.c: use ndbm_wrap - -2001-07-12 Assar Westerlund - - * Makefile.am: add required library dependencies - -2001-01-30 Assar Westerlund - - * Makefile.am (libotp_la_LDFLAGS): bump version to 1:2:1 - -2001-01-29 Assar Westerlund - - * otp_md.c: update to new md4/md5/sha API - -2000-12-11 Assar Westerlund - - * Makefile.am (INCLUDES): add krb4 includes here, which are - somewhat bogusly used when linking against libdes supplied by krb4 - -2000-07-25 Johan Danielsson - - * Makefile.am: bump version to 1:1:1 - -2000-07-01 Assar Westerlund - - * const-ify - -2000-02-07 Assar Westerlund - - * Makefile.am: update version to 1:0:1 - -2000-01-26 Assar Westerlund - - * otp_md.c: update to pseudo-standard APIs for md4,md5,sha. - * otp_md.c: start using the pseudo-standard APIs for the hash - functions - -1999-10-20 Assar Westerlund - - * Makefile.am: set version to 0:1:0 - -Fri Mar 19 14:52:48 1999 Johan Danielsson - - * Makefile.am: add version-info - -Thu Mar 18 11:24:19 1999 Johan Danielsson - - * Makefile.am: include Makefile.am.common - -Sat Mar 13 22:27:10 1999 Assar Westerlund - - * otp_parse.c: unsigned-ify - -Sun Nov 22 10:44:16 1998 Assar Westerlund - - * Makefile.in (WFLAGS): set - -Mon May 25 05:27:07 1998 Assar Westerlund - - * Makefile.in (clean): try to remove shared library debris - -Sat May 23 20:54:28 1998 Assar Westerlund - - * Makefile.am: link with DBLIB - -Sun Apr 19 09:59:46 1998 Assar Westerlund - - * Makefile.in: add symlink magic for linux - -Sat Feb 7 07:27:18 1998 Assar Westerlund - - * otp_db.c (otp_put): make sure we don't overrun `buf' - -Sun Nov 9 07:14:59 1997 Assar Westerlund - - * otp_locl.h: use xdbm.h - diff --git a/kerberosV/src/lib/otp/Makefile.am b/kerberosV/src/lib/otp/Makefile.am deleted file mode 100644 index 0b8d8a7bc0e..00000000000 --- a/kerberosV/src/lib/otp/Makefile.am +++ /dev/null @@ -1,87 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 19:11:44 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -AM_CPPFLAGS += $(INCLUDE_hcrypto) $(ROKEN_RENAME) - -noinst_PROGRAMS = otptest - -check_PROGRAMS = otptest - -otptest_LDADD = libotp.la - -include_HEADERS = otp.h - -lib_LTLIBRARIES = libotp.la -libotp_la_LDFLAGS = -version-info 1:5:1 -libotp_la_LIBADD = $(LIB_hcrypto) $(LIB_roken) - -if HAVE_DB1 -ndbm_wrap = ndbm_wrap.c ndbm_wrap.h -libotp_la_LIBADD += $(LIB_db_create) -else -if HAVE_DB3 -ndbm_wrap = ndbm_wrap.c ndbm_wrap.h -libotp_la_LIBADD += $(LIB_db_create) -else -ndbm_wrap = -libotp_la_LIBADD += $(LIB_NDBM) -endif -endif - -dist_libotp_la_SOURCES = \ - otp.c \ - otp_challenge.c \ - otp_db.c \ - otp_md.c \ - otp_parse.c \ - otp_print.c \ - otp_verify.c \ - otp_locl.h \ - otp_md.h \ - roken_rename.h - -nodist_libotp_la_SOURCES = $(ndbm_wrap) $(ROKEN_SRCS) - -libotp_la_DEPENDENCIES = version-script.map - -if do_roken_rename -ROKEN_SRCS = snprintf.c strcasecmp.c strncasecmp.c strlwr.c strlcpy.c strlcat.c -endif - -if versionscript -libotp_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -endif - -$(libotp_la_OBJECTS): $(ndbm_wrap) - -ndbm_wrap.c: - $(LN_S) $(srcdir)/../roken/ndbm_wrap.c . -ndbm_wrap.h: - (echo '#define dbm_rename(X) __otp_ ## X'; cat $(srcdir)/../roken/ndbm_wrap.h) > ndbm_wrap.h - - -snprintf.c: - $(LN_S) $(srcdir)/../roken/snprintf.c . -strcasecmp.c: - $(LN_S) $(srcdir)/../roken/strcasecmp.c . -strncasecmp.c: - $(LN_S) $(srcdir)/../roken/strncasecmp.c . -strlwr.c: - $(LN_S) $(srcdir)/../roken/strlwr.c . -strlcpy.c: - $(LN_S) $(srcdir)/../roken/strlcpy.c . -strlcat.c: - $(LN_S) $(srcdir)/../roken/strlcat.c . - -CLEANFILES = \ - ndbm_wrap.c \ - ndbm_wrap.h \ - snprintf.c \ - strcasecmp.c \ - strlcat.c \ - strlcpy.c \ - strlwr.c \ - strncasecmp.c - -EXTRA_DIST = NTMakefile version-script.map diff --git a/kerberosV/src/lib/otp/Makefile.in b/kerberosV/src/lib/otp/Makefile.in deleted file mode 100644 index 29976ed681d..00000000000 --- a/kerberosV/src/lib/otp/Makefile.in +++ /dev/null @@ -1,1016 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:44 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:44 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 19:11:44 robert Exp $ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog -noinst_PROGRAMS = otptest$(EXEEXT) -check_PROGRAMS = otptest$(EXEEXT) -@HAVE_DB1_TRUE@am__append_1 = $(LIB_db_create) -@HAVE_DB1_FALSE@@HAVE_DB3_TRUE@am__append_2 = $(LIB_db_create) -@HAVE_DB1_FALSE@@HAVE_DB3_FALSE@am__append_3 = $(LIB_NDBM) -@versionscript_TRUE@am__append_4 = $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -subdir = lib/otp -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -@HAVE_DB1_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -@HAVE_DB1_FALSE@@HAVE_DB3_TRUE@am__DEPENDENCIES_3 = \ -@HAVE_DB1_FALSE@@HAVE_DB3_TRUE@ $(am__DEPENDENCIES_1) -@HAVE_DB1_FALSE@@HAVE_DB3_FALSE@am__DEPENDENCIES_4 = \ -@HAVE_DB1_FALSE@@HAVE_DB3_FALSE@ $(am__DEPENDENCIES_1) -dist_libotp_la_OBJECTS = otp.lo otp_challenge.lo otp_db.lo otp_md.lo \ - otp_parse.lo otp_print.lo otp_verify.lo -@HAVE_DB1_FALSE@@HAVE_DB3_TRUE@am__objects_1 = ndbm_wrap.lo -@HAVE_DB1_TRUE@am__objects_1 = ndbm_wrap.lo -@do_roken_rename_TRUE@am__objects_2 = snprintf.lo strcasecmp.lo \ -@do_roken_rename_TRUE@ strncasecmp.lo strlwr.lo strlcpy.lo \ -@do_roken_rename_TRUE@ strlcat.lo -nodist_libotp_la_OBJECTS = $(am__objects_1) $(am__objects_2) -libotp_la_OBJECTS = $(dist_libotp_la_OBJECTS) \ - $(nodist_libotp_la_OBJECTS) -libotp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libotp_la_LDFLAGS) $(LDFLAGS) -o $@ -PROGRAMS = $(noinst_PROGRAMS) -otptest_SOURCES = otptest.c -otptest_OBJECTS = otptest.$(OBJEXT) -otptest_DEPENDENCIES = libotp.la -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(dist_libotp_la_SOURCES) $(nodist_libotp_la_SOURCES) \ - otptest.c -DIST_SOURCES = $(dist_libotp_la_SOURCES) otptest.c -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(INCLUDE_hcrypto) $(ROKEN_RENAME) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -otptest_LDADD = libotp.la -include_HEADERS = otp.h -lib_LTLIBRARIES = libotp.la -libotp_la_LDFLAGS = -version-info 1:5:1 $(am__append_4) -libotp_la_LIBADD = $(LIB_hcrypto) $(LIB_roken) $(am__append_1) \ - $(am__append_2) $(am__append_3) -@HAVE_DB1_FALSE@@HAVE_DB3_FALSE@ndbm_wrap = -@HAVE_DB1_FALSE@@HAVE_DB3_TRUE@ndbm_wrap = ndbm_wrap.c ndbm_wrap.h -@HAVE_DB1_TRUE@ndbm_wrap = ndbm_wrap.c ndbm_wrap.h -dist_libotp_la_SOURCES = \ - otp.c \ - otp_challenge.c \ - otp_db.c \ - otp_md.c \ - otp_parse.c \ - otp_print.c \ - otp_verify.c \ - otp_locl.h \ - otp_md.h \ - roken_rename.h - -nodist_libotp_la_SOURCES = $(ndbm_wrap) $(ROKEN_SRCS) -libotp_la_DEPENDENCIES = version-script.map -@do_roken_rename_TRUE@ROKEN_SRCS = snprintf.c strcasecmp.c strncasecmp.c strlwr.c strlcpy.c strlcat.c -CLEANFILES = \ - ndbm_wrap.c \ - ndbm_wrap.h \ - snprintf.c \ - strcasecmp.c \ - strlcat.c \ - strlcpy.c \ - strlwr.c \ - strncasecmp.c - -EXTRA_DIST = NTMakefile version-script.map -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/otp/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/otp/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libotp.la: $(libotp_la_OBJECTS) $(libotp_la_DEPENDENCIES) - $(libotp_la_LINK) -rpath $(libdir) $(libotp_la_OBJECTS) $(libotp_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -otptest$(EXEEXT): $(otptest_OBJECTS) $(otptest_DEPENDENCIES) - @rm -f otptest$(EXEEXT) - $(LINK) $(otptest_OBJECTS) $(otptest_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndbm_wrap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp_challenge.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp_db.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp_md.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp_parse.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp_print.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp_verify.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otptest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlwr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-noinstPROGRAMS ctags dist-hook distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-exec-hook install-html install-html-am \ - install-includeHEADERS install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -$(libotp_la_OBJECTS): $(ndbm_wrap) - -ndbm_wrap.c: - $(LN_S) $(srcdir)/../roken/ndbm_wrap.c . -ndbm_wrap.h: - (echo '#define dbm_rename(X) __otp_ ## X'; cat $(srcdir)/../roken/ndbm_wrap.h) > ndbm_wrap.h - -snprintf.c: - $(LN_S) $(srcdir)/../roken/snprintf.c . -strcasecmp.c: - $(LN_S) $(srcdir)/../roken/strcasecmp.c . -strncasecmp.c: - $(LN_S) $(srcdir)/../roken/strncasecmp.c . -strlwr.c: - $(LN_S) $(srcdir)/../roken/strlwr.c . -strlcpy.c: - $(LN_S) $(srcdir)/../roken/strlcpy.c . -strlcat.c: - $(LN_S) $(srcdir)/../roken/strlcat.c . - -# 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/kerberosV/src/lib/otp/NTMakefile b/kerberosV/src/lib/otp/NTMakefile deleted file mode 100644 index a531c8b3fd0..00000000000 --- a/kerberosV/src/lib/otp/NTMakefile +++ /dev/null @@ -1,35 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=lib\otp - -!include ../../windows/NTMakefile.w32 - diff --git a/kerberosV/src/lib/otp/otp.c b/kerberosV/src/lib/otp/otp.c deleted file mode 100644 index e9c5da3280c..00000000000 --- a/kerberosV/src/lib/otp/otp.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -RCSID("$Id: otp.c,v 1.3 2013/06/17 19:11:44 robert Exp $"); -#endif - -#include "otp_locl.h" -#include "otp_md.h" - -static OtpAlgorithm algorithms[] = { - {OTP_ALG_MD4, "md4", 16, otp_md4_hash, otp_md4_init, otp_md4_next}, - {OTP_ALG_MD5, "md5", 16, otp_md5_hash, otp_md5_init, otp_md5_next}, - {OTP_ALG_SHA, "sha", 20, otp_sha_hash, otp_sha_init, otp_sha_next} -}; - -OtpAlgorithm * -otp_find_alg (char *name) -{ - int i; - - for (i = 0; i < sizeof(algorithms)/sizeof(*algorithms); ++i) - if (strcmp (name, algorithms[i].name) == 0) - return &algorithms[i]; - return NULL; -} - -char * -otp_error (OtpContext *o) -{ - return o->err; -} diff --git a/kerberosV/src/lib/otp/otp.h b/kerberosV/src/lib/otp/otp.h deleted file mode 100644 index 7611c1c9124..00000000000 --- a/kerberosV/src/lib/otp/otp.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: otp.h,v 1.3 2013/06/17 19:11:44 robert Exp $ */ - -#ifndef _OTP_H -#define _OTP_H - -#include -#include - -enum {OTPKEYSIZE = 8}; - -typedef unsigned char OtpKey[OTPKEYSIZE]; - -#define OTP_MIN_PASSPHRASE 10 -#define OTP_MAX_PASSPHRASE 63 - -#define OTP_USER_TIMEOUT 120 -#define OTP_DB_TIMEOUT 60 - -#define OTP_HEXPREFIX "hex:" -#define OTP_WORDPREFIX "word:" - -typedef enum { OTP_ALG_MD4, OTP_ALG_MD5, OTP_ALG_SHA } OtpAlgID; - -#define OTP_ALG_DEFAULT "md5" - -typedef struct { - OtpAlgID id; - char *name; - int hashsize; - int (*hash)(const char *, size_t, unsigned char *); - int (*init)(OtpKey, const char *, const char *); - int (*next)(OtpKey); -} OtpAlgorithm; - -typedef struct { - char *user; - OtpAlgorithm *alg; - unsigned n; - char seed[17]; - OtpKey key; - int challengep; - time_t lock_time; - char *err; -} OtpContext; - -OtpAlgorithm *otp_find_alg (char *); -void otp_print_stddict (OtpKey, char *, size_t); -void otp_print_hex (OtpKey, char *, size_t); -void otp_print_stddict_extended (OtpKey, char *, size_t); -void otp_print_hex_extended (OtpKey, char *, size_t); -unsigned otp_checksum (OtpKey); -int otp_parse_hex (OtpKey, const char *); -int otp_parse_stddict (OtpKey, const char *); -int otp_parse_altdict (OtpKey, const char *, OtpAlgorithm *); -int otp_parse (OtpKey, const char *, OtpAlgorithm *); -int otp_challenge (OtpContext *, char *, char *, size_t); -int otp_verify_user (OtpContext *, const char *); -int otp_verify_user_1 (OtpContext *, const char *); -char *otp_error (OtpContext *); - -void *otp_db_open (void); -void otp_db_close (void *); -int otp_put (void *, OtpContext *); -int otp_get (void *, OtpContext *); -int otp_simple_get (void *, OtpContext *); -int otp_delete (void *, OtpContext *); - -#endif /* _OTP_H */ diff --git a/kerberosV/src/lib/otp/otp_challenge.c b/kerberosV/src/lib/otp/otp_challenge.c deleted file mode 100644 index 85bdba1601e..00000000000 --- a/kerberosV/src/lib/otp/otp_challenge.c +++ /dev/null @@ -1,68 +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: otp_challenge.c,v 1.5 2013/06/17 19:11:44 robert Exp $"); -#endif - -#include "otp_locl.h" - -int -otp_challenge (OtpContext *ctx, char *user, char *str, size_t len) -{ - void *dbm; - int ret; - - ctx->challengep = 0; - ctx->err = NULL; - ctx->user = strdup(user); - if (ctx->user == NULL) { - ctx->err = "Out of memory"; - return -1; - } - dbm = otp_db_open (); - if (dbm == NULL) { - ctx->err = "Cannot open database"; - return -1; - } - ret = otp_get (dbm, ctx); - otp_db_close (dbm); - if (ret) - return ret; - snprintf (str, len, - "[ otp-%s %u %s ]", - ctx->alg->name, ctx->n-1, ctx->seed); - ctx->challengep = 1; - return 0; -} diff --git a/kerberosV/src/lib/otp/otp_db.c b/kerberosV/src/lib/otp/otp_db.c deleted file mode 100644 index c431d31a579..00000000000 --- a/kerberosV/src/lib/otp/otp_db.c +++ /dev/null @@ -1,233 +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: otp_db.c,v 1.5 2013/06/17 19:11:44 robert Exp $"); -#endif - -#include "otp_locl.h" - -#if !defined(HAVE_NDBM) && !defined(HAVE_DB_NDBM) -#include "ndbm_wrap.h" -#endif - -#define RETRIES 5 - -void * -otp_db_open (void) -{ - int lock; - int i; - void *ret; - - for(i = 0; i < RETRIES; ++i) { - struct stat statbuf; - - lock = open (OTP_DB_LOCK, O_WRONLY | O_CREAT | O_EXCL, 0666); - if (lock >= 0) { - close(lock); - break; - } - if (stat (OTP_DB_LOCK, &statbuf) == 0) { - if (time(NULL) - statbuf.st_mtime > OTP_DB_TIMEOUT) - unlink (OTP_DB_LOCK); - else - sleep (1); - } - } - if (i == RETRIES) - return NULL; - ret = dbm_open (OTP_DB, O_RDWR | O_CREAT, 0600); - if (ret == NULL) - unlink (OTP_DB_LOCK); - return ret; -} - -void -otp_db_close (void *dbm) -{ - dbm_close ((DBM *)dbm); - unlink (OTP_DB_LOCK); -} - -/* - * Remove this entry from the database. - * return 0 if ok. - */ - -int -otp_delete (void *v, OtpContext *ctx) -{ - DBM *dbm = (DBM *)v; - datum key; - - key.dsize = strlen(ctx->user); - key.dptr = ctx->user; - - return dbm_delete(dbm, key); -} - -/* - * Read this entry from the database and lock it if lockp. - */ - -static int -otp_get_internal (void *v, OtpContext *ctx, int lockp) -{ - DBM *dbm = (DBM *)v; - datum dat, key; - char *p; - time_t now, then; - - key.dsize = strlen(ctx->user); - key.dptr = ctx->user; - - dat = dbm_fetch (dbm, key); - if (dat.dptr == NULL) { - ctx->err = "Entry not found"; - return -1; - } - p = dat.dptr; - - memcpy (&then, p, sizeof(then)); - ctx->lock_time = then; - if (lockp) { - time(&now); - if (then && now - then < OTP_USER_TIMEOUT) { - ctx->err = "Entry locked"; - return -1; - } - memcpy (p, &now, sizeof(now)); - } - p += sizeof(now); - ctx->alg = otp_find_alg (p); - if (ctx->alg == NULL) { - ctx->err = "Bad algorithm"; - return -1; - } - p += strlen(p) + 1; - { - unsigned char *up = (unsigned char *)p; - ctx->n = (up[0] << 24) | (up[1] << 16) | (up[2] << 8) | up[3]; - } - p += 4; - memcpy (ctx->key, p, OTPKEYSIZE); - p += OTPKEYSIZE; - strlcpy (ctx->seed, p, sizeof(ctx->seed)); - if (lockp) - return dbm_store (dbm, key, dat, DBM_REPLACE); - else - return 0; -} - -/* - * Get and lock. - */ - -int -otp_get (void *v, OtpContext *ctx) -{ - return otp_get_internal (v, ctx, 1); -} - -/* - * Get and don't lock. - */ - -int -otp_simple_get (void *v, OtpContext *ctx) -{ - return otp_get_internal (v, ctx, 0); -} - -/* - * Write this entry to the database. - */ - -int -otp_put (void *v, OtpContext *ctx) -{ - DBM *dbm = (DBM *)v; - datum dat, key; - char buf[1024], *p; - time_t zero = 0; - size_t len, rem; - - key.dsize = strlen(ctx->user); - key.dptr = ctx->user; - - p = buf; - rem = sizeof(buf); - - if (rem < sizeof(zero)) - return -1; - memcpy (p, &zero, sizeof(zero)); - p += sizeof(zero); - rem -= sizeof(zero); - len = strlen(ctx->alg->name) + 1; - - if (rem < len) - return -1; - strlcpy (p, ctx->alg->name, rem); - p += len; - rem -= len; - - if (rem < 4) - return -1; - { - unsigned char *up = (unsigned char *)p; - *up++ = (ctx->n >> 24) & 0xFF; - *up++ = (ctx->n >> 16) & 0xFF; - *up++ = (ctx->n >> 8) & 0xFF; - *up++ = (ctx->n >> 0) & 0xFF; - } - p += 4; - rem -= 4; - - if (rem < OTPKEYSIZE) - return -1; - memcpy (p, ctx->key, OTPKEYSIZE); - p += OTPKEYSIZE; - rem -= OTPKEYSIZE; - - len = strlen(ctx->seed) + 1; - if (rem < len) - return -1; - strlcpy (p, ctx->seed, rem); - p += len; - rem -= len; - dat.dptr = buf; - dat.dsize = p - buf; - return dbm_store (dbm, key, dat, DBM_REPLACE); -} diff --git a/kerberosV/src/lib/otp/otp_locl.h b/kerberosV/src/lib/otp/otp_locl.h deleted file mode 100644 index 24ecea5c393..00000000000 --- a/kerberosV/src/lib/otp/otp_locl.h +++ /dev/null @@ -1,70 +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: otp_locl.h,v 1.3 2013/06/17 19:11:44 robert Exp $ */ - -#include -#include -#include -#include -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_PWD_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_IO_H -#include -#endif - -#include - -#include - -#include - -#define OTPKEYS "/.otpkeys" - -#define OTP_DB SYSCONFDIR "/otp" -#define OTP_DB_LOCK SYSCONFDIR "/otp-lock" diff --git a/kerberosV/src/lib/otp/otp_md.c b/kerberosV/src/lib/otp/otp_md.c deleted file mode 100644 index 1d6fe959437..00000000000 --- a/kerberosV/src/lib/otp/otp_md.c +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright (c) 1995 - 2003 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. - */ - -#define HC_DEPRECATED_CRYPTO - -#include "config.h" - -#include "otp_locl.h" - -#include "otp_md.h" -#include "crypto-headers.h" - -/* - * Compress len bytes from md into key - */ - -static void -compressmd (OtpKey key, unsigned char *md, size_t len) -{ - u_char *p = key; - - memset (p, 0, OTPKEYSIZE); - while(len) { - *p++ ^= *md++; - *p++ ^= *md++; - *p++ ^= *md++; - *p++ ^= *md++; - len -= 4; - if (p == key + OTPKEYSIZE) - p = key; - } -} - -/* - * For histerical reasons, in the OTP definition it's said that - * the result from SHA must be stored in little-endian order. See - * draft-ietf-otp-01.txt. - */ - -static void -little_endian(unsigned char *res, size_t len) -{ - unsigned char t; - size_t i; - - for (i = 0; i < len; i += 4) { - t = res[i + 0]; res[i + 0] = res[i + 3]; res[i + 3] = t; - t = res[i + 1]; res[i + 1] = res[i + 2]; res[i + 2] = t; - } -} - -static int -otp_md_init (OtpKey key, - const char *pwd, - const char *seed, - const EVP_MD *md, - int le, - unsigned char *res, - size_t ressz) -{ - EVP_MD_CTX *ctx; - char *p; - int len; - - ctx = EVP_MD_CTX_create(); - - len = strlen(pwd) + strlen(seed); - p = malloc (len + 1); - if (p == NULL) - return -1; - strlcpy (p, seed, len + 1); - strlwr (p); - strlcat (p, pwd, len + 1); - - EVP_DigestInit_ex(ctx, md, NULL); - EVP_DigestUpdate(ctx, p, len); - EVP_DigestFinal_ex(ctx, res, NULL); - - EVP_MD_CTX_destroy(ctx); - - if (le) - little_endian(res, ressz); - - free (p); - compressmd (key, res, ressz); - return 0; -} - -static int -otp_md_next (OtpKey key, - const EVP_MD *md, - int le, - unsigned char *res, - size_t ressz) -{ - EVP_MD_CTX *ctx; - - ctx = EVP_MD_CTX_create(); - - EVP_DigestInit_ex(ctx, md, NULL); - EVP_DigestUpdate(ctx, key, OTPKEYSIZE); - EVP_DigestFinal_ex(ctx, res, NULL); - - EVP_MD_CTX_destroy(ctx); - - if (le) - little_endian(res, ressz); - - compressmd (key, res, ressz); - return 0; -} - -static int -otp_md_hash (const char *data, - size_t len, - const EVP_MD *md, - int le, - unsigned char *res, - size_t ressz) -{ - EVP_MD_CTX *ctx; - ctx = EVP_MD_CTX_create(); - - EVP_DigestInit_ex(ctx, md, NULL); - EVP_DigestUpdate(ctx, data, len); - EVP_DigestFinal_ex(ctx, res, NULL); - - EVP_MD_CTX_destroy(ctx); - - if (le) - little_endian(res, ressz); - - return 0; -} - -int -otp_md4_init (OtpKey key, const char *pwd, const char *seed) -{ - unsigned char res[16]; - return otp_md_init (key, pwd, seed, EVP_md4(), 0, res, sizeof(res)); -} - -int -otp_md4_hash (const char *data, - size_t len, - unsigned char *res) -{ - return otp_md_hash (data, len, EVP_md4(), 0, res, 16); -} - -int -otp_md4_next (OtpKey key) -{ - unsigned char res[16]; - return otp_md_next (key, EVP_md4(), 0, res, sizeof(res)); -} - - -int -otp_md5_init (OtpKey key, const char *pwd, const char *seed) -{ - unsigned char res[16]; - return otp_md_init (key, pwd, seed, EVP_md5(), 0, res, sizeof(res)); -} - -int -otp_md5_hash (const char *data, - size_t len, - unsigned char *res) -{ - return otp_md_hash (data, len, EVP_md5(), 0, res, 16); -} - -int -otp_md5_next (OtpKey key) -{ - unsigned char res[16]; - return otp_md_next (key, EVP_md5(), 0, res, sizeof(res)); -} - -int -otp_sha_init (OtpKey key, const char *pwd, const char *seed) -{ - unsigned char res[20]; - return otp_md_init (key, pwd, seed, EVP_sha1(), 1, res, sizeof(res)); -} - -int -otp_sha_hash (const char *data, - size_t len, - unsigned char *res) -{ - return otp_md_hash (data, len, EVP_sha1(), 1, res, 20); -} - -int -otp_sha_next (OtpKey key) -{ - unsigned char res[20]; - return otp_md_next (key, EVP_sha1(), 1, res, sizeof(res)); -} diff --git a/kerberosV/src/lib/otp/otp_md.h b/kerberosV/src/lib/otp/otp_md.h deleted file mode 100644 index 6a69aa4040d..00000000000 --- a/kerberosV/src/lib/otp/otp_md.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: otp_md.h,v 1.3 2013/06/17 19:11:44 robert Exp $ */ - -int otp_md4_init (OtpKey key, const char *pwd, const char *seed); -int otp_md4_hash (const char *, size_t, unsigned char *res); -int otp_md4_next (OtpKey key); - -int otp_md5_init (OtpKey key, const char *pwd, const char *seed); -int otp_md5_hash (const char *, size_t, unsigned char *res); -int otp_md5_next (OtpKey key); - -int otp_sha_init (OtpKey key, const char *pwd, const char *seed); -int otp_sha_hash (const char *, size_t, unsigned char *res); -int otp_sha_next (OtpKey key); diff --git a/kerberosV/src/lib/otp/otp_parse.c b/kerberosV/src/lib/otp/otp_parse.c deleted file mode 100644 index b06fabfd305..00000000000 --- a/kerberosV/src/lib/otp/otp_parse.c +++ /dev/null @@ -1,2522 +0,0 @@ -/* - * Copyright (c) 1995-2000, 2005-2007 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: otp_parse.c,v 1.3 2013/06/17 19:11:44 robert Exp $"); -#endif - -#include "otp_locl.h" - -struct e { - const char *s; - unsigned n; -}; - -extern const struct e inv_std_dict[2048]; - -static int -cmp(const void *a, const void *b) -{ - const struct e *e1, *e2; - - e1 = (const struct e *)a; - e2 = (const struct e *)b; - return strcasecmp (e1->s, e2->s); -} - -static int -get_stdword (const char *s, void *v) -{ - struct e e, *r; - - e.s = s; - e.n = -1; - r = (struct e *) bsearch (&e, inv_std_dict, - sizeof(inv_std_dict)/sizeof(*inv_std_dict), - sizeof(*inv_std_dict), cmp); - if (r) - return r->n; - else - return -1; -} - -static void -compress (OtpKey key, unsigned wn[]) -{ - key[0] = wn[0] >> 3; - key[1] = ((wn[0] & 0x07) << 5) | (wn[1] >> 6); - key[2] = ((wn[1] & 0x3F) << 2) | (wn[2] >> 9); - key[3] = ((wn[2] >> 1) & 0xFF); - key[4] = ((wn[2] & 0x01) << 7) | (wn[3] >> 4); - key[5] = ((wn[3] & 0x0F) << 4) | (wn[4] >> 7); - key[6] = ((wn[4] & 0x7F) << 1) | (wn[5] >> 10); - key[7] = ((wn[5] >> 2) & 0xFF); -} - -static int -get_altword (const char *s, void *a) -{ - OtpAlgorithm *alg = (OtpAlgorithm *)a; - int ret; - unsigned char *res = malloc(alg->hashsize); - - if (res == NULL) - return -1; - alg->hash (s, strlen(s), res); - ret = (unsigned)(res[alg->hashsize - 1]) | - ((res[alg->hashsize - 2] & 0x03) << 8); - free (res); - return ret; -} - -static int -parse_words(unsigned wn[], - const char *str, - int (*convert)(const char *, void *), - void *arg) -{ - const unsigned char *w, *wend; - char *wcopy; - int i; - int tmp; - - w = (const unsigned char *)str; - for (i = 0; i < 6; ++i) { - while (isspace(*w)) - ++w; - wend = w; - while (isalpha (*wend)) - ++wend; - - tmp = wend - w; - wcopy = malloc(tmp + 1); - if (wcopy == NULL) - return -1; - memcpy(wcopy, w, tmp); - wcopy[tmp] = '\0'; - - tmp = (*convert)(wcopy, arg); - free(wcopy); - w = wend; - if (tmp < 0) - return -1; - wn[i] = tmp; - } - return 0; -} - -static int -otp_parse_internal (OtpKey key, const char *str, - OtpAlgorithm *alg, - int (*convert)(const char *, void *)) -{ - unsigned wn[6]; - - if (parse_words (wn, str, convert, alg)) - return -1; - compress (key, wn); - if (otp_checksum (key) != (wn[5] & 0x03)) - return -1; - return 0; -} - -int -otp_parse_stddict (OtpKey key, const char *str) -{ - return otp_parse_internal (key, str, NULL, get_stdword); -} - -int -otp_parse_altdict (OtpKey key, const char *str, OtpAlgorithm *alg) -{ - return otp_parse_internal (key, str, alg, get_altword); -} - -int -otp_parse_hex (OtpKey key, const char *s) -{ - char buf[17], *b; - int is[8]; - int i; - - b = buf; - while (*s) { - if (strchr ("0123456789ABCDEFabcdef", *s)) { - if (b - buf >= 16) - return -1; - else - *b++ = tolower((unsigned char)*s); - } - s++; - } - *b = '\0'; - if (sscanf (buf, "%2x%2x%2x%2x%2x%2x%2x%2x", - &is[0], &is[1], &is[2], &is[3], &is[4], - &is[5], &is[6], &is[7]) != 8) - return -1; - for (i = 0; i < OTPKEYSIZE; ++i) - key[i] = is[i]; - return 0; -} - -int -otp_parse (OtpKey key, const char *s, OtpAlgorithm *alg) -{ - int ret; - int dohex = 1; - - if (strncmp (s, OTP_HEXPREFIX, strlen(OTP_HEXPREFIX)) == 0) - return otp_parse_hex (key, s + strlen(OTP_HEXPREFIX)); - if (strncmp (s, OTP_WORDPREFIX, strlen(OTP_WORDPREFIX)) == 0) { - s += strlen(OTP_WORDPREFIX); - dohex = 0; - } - - ret = otp_parse_stddict (key, s); - if (ret) - ret = otp_parse_altdict (key, s, alg); - if (ret && dohex) - ret = otp_parse_hex (key, s); - return ret; -} - -const char *const std_dict[2048] = -{ "A", "ABE", "ACE", "ACT", "AD", "ADA", "ADD", -"AGO", "AID", "AIM", "AIR", "ALL", "ALP", "AM", "AMY", -"AN", "ANA", "AND", "ANN", "ANT", "ANY", "APE", "APS", -"APT", "ARC", "ARE", "ARK", "ARM", "ART", "AS", "ASH", -"ASK", "AT", "ATE", "AUG", "AUK", "AVE", "AWE", "AWK", -"AWL", "AWN", "AX", "AYE", "BAD", "BAG", "BAH", "BAM", -"BAN", "BAR", "BAT", "BAY", "BE", "BED", "BEE", "BEG", -"BEN", "BET", "BEY", "BIB", "BID", "BIG", "BIN", "BIT", -"BOB", "BOG", "BON", "BOO", "BOP", "BOW", "BOY", "BUB", -"BUD", "BUG", "BUM", "BUN", "BUS", "BUT", "BUY", "BY", -"BYE", "CAB", "CAL", "CAM", "CAN", "CAP", "CAR", "CAT", -"CAW", "COD", "COG", "COL", "CON", "COO", "COP", "COT", -"COW", "COY", "CRY", "CUB", "CUE", "CUP", "CUR", "CUT", -"DAB", "DAD", "DAM", "DAN", "DAR", "DAY", "DEE", "DEL", -"DEN", "DES", "DEW", "DID", "DIE", "DIG", "DIN", "DIP", -"DO", "DOE", "DOG", "DON", "DOT", "DOW", "DRY", "DUB", -"DUD", "DUE", "DUG", "DUN", "EAR", "EAT", "ED", "EEL", -"EGG", "EGO", "ELI", "ELK", "ELM", "ELY", "EM", "END", -"EST", "ETC", "EVA", "EVE", "EWE", "EYE", "FAD", "FAN", -"FAR", "FAT", "FAY", "FED", "FEE", "FEW", "FIB", "FIG", -"FIN", "FIR", "FIT", "FLO", "FLY", "FOE", "FOG", "FOR", -"FRY", "FUM", "FUN", "FUR", "GAB", "GAD", "GAG", "GAL", -"GAM", "GAP", "GAS", "GAY", "GEE", "GEL", "GEM", "GET", -"GIG", "GIL", "GIN", "GO", "GOT", "GUM", "GUN", "GUS", -"GUT", "GUY", "GYM", "GYP", "HA", "HAD", "HAL", "HAM", -"HAN", "HAP", "HAS", "HAT", "HAW", "HAY", "HE", "HEM", -"HEN", "HER", "HEW", "HEY", "HI", "HID", "HIM", "HIP", -"HIS", "HIT", "HO", "HOB", "HOC", "HOE", "HOG", "HOP", -"HOT", "HOW", "HUB", "HUE", "HUG", "HUH", "HUM", "HUT", -"I", "ICY", "IDA", "IF", "IKE", "ILL", "INK", "INN", -"IO", "ION", "IQ", "IRA", "IRE", "IRK", "IS", "IT", -"ITS", "IVY", "JAB", "JAG", "JAM", "JAN", "JAR", "JAW", -"JAY", "JET", "JIG", "JIM", "JO", "JOB", "JOE", "JOG", -"JOT", "JOY", "JUG", "JUT", "KAY", "KEG", "KEN", "KEY", -"KID", "KIM", "KIN", "KIT", "LA", "LAB", "LAC", "LAD", -"LAG", "LAM", "LAP", "LAW", "LAY", "LEA", "LED", "LEE", -"LEG", "LEN", "LEO", "LET", "LEW", "LID", "LIE", "LIN", -"LIP", "LIT", "LO", "LOB", "LOG", "LOP", "LOS", "LOT", -"LOU", "LOW", "LOY", "LUG", "LYE", "MA", "MAC", "MAD", -"MAE", "MAN", "MAO", "MAP", "MAT", "MAW", "MAY", "ME", -"MEG", "MEL", "MEN", "MET", "MEW", "MID", "MIN", "MIT", -"MOB", "MOD", "MOE", "MOO", "MOP", "MOS", "MOT", "MOW", -"MUD", "MUG", "MUM", "MY", "NAB", "NAG", "NAN", "NAP", -"NAT", "NAY", "NE", "NED", "NEE", "NET", "NEW", "NIB", -"NIL", "NIP", "NIT", "NO", "NOB", "NOD", "NON", "NOR", -"NOT", "NOV", "NOW", "NU", "NUN", "NUT", "O", "OAF", -"OAK", "OAR", "OAT", "ODD", "ODE", "OF", "OFF", "OFT", -"OH", "OIL", "OK", "OLD", "ON", "ONE", "OR", "ORB", -"ORE", "ORR", "OS", "OTT", "OUR", "OUT", "OVA", "OW", -"OWE", "OWL", "OWN", "OX", "PA", "PAD", "PAL", "PAM", -"PAN", "PAP", "PAR", "PAT", "PAW", "PAY", "PEA", "PEG", -"PEN", "PEP", "PER", "PET", "PEW", "PHI", "PI", "PIE", -"PIN", "PIT", "PLY", "PO", "POD", "POE", "POP", "POT", -"POW", "PRO", "PRY", "PUB", "PUG", "PUN", "PUP", "PUT", -"QUO", "RAG", "RAM", "RAN", "RAP", "RAT", "RAW", "RAY", -"REB", "RED", "REP", "RET", "RIB", "RID", "RIG", "RIM", -"RIO", "RIP", "ROB", "ROD", "ROE", "RON", "ROT", "ROW", -"ROY", "RUB", "RUE", "RUG", "RUM", "RUN", "RYE", "SAC", -"SAD", "SAG", "SAL", "SAM", "SAN", "SAP", "SAT", "SAW", -"SAY", "SEA", "SEC", "SEE", "SEN", "SET", "SEW", "SHE", -"SHY", "SIN", "SIP", "SIR", "SIS", "SIT", "SKI", "SKY", -"SLY", "SO", "SOB", "SOD", "SON", "SOP", "SOW", "SOY", -"SPA", "SPY", "SUB", "SUD", "SUE", "SUM", "SUN", "SUP", -"TAB", "TAD", "TAG", "TAN", "TAP", "TAR", "TEA", "TED", -"TEE", "TEN", "THE", "THY", "TIC", "TIE", "TIM", "TIN", -"TIP", "TO", "TOE", "TOG", "TOM", "TON", "TOO", "TOP", -"TOW", "TOY", "TRY", "TUB", "TUG", "TUM", "TUN", "TWO", -"UN", "UP", "US", "USE", "VAN", "VAT", "VET", "VIE", -"WAD", "WAG", "WAR", "WAS", "WAY", "WE", "WEB", "WED", -"WEE", "WET", "WHO", "WHY", "WIN", "WIT", "WOK", "WON", -"WOO", "WOW", "WRY", "WU", "YAM", "YAP", "YAW", "YE", -"YEA", "YES", "YET", "YOU", "ABED", "ABEL", "ABET", "ABLE", -"ABUT", "ACHE", "ACID", "ACME", "ACRE", "ACTA", "ACTS", "ADAM", -"ADDS", "ADEN", "AFAR", "AFRO", "AGEE", "AHEM", "AHOY", "AIDA", -"AIDE", "AIDS", "AIRY", "AJAR", "AKIN", "ALAN", "ALEC", "ALGA", -"ALIA", "ALLY", "ALMA", "ALOE", "ALSO", "ALTO", "ALUM", "ALVA", -"AMEN", "AMES", "AMID", "AMMO", "AMOK", "AMOS", "AMRA", "ANDY", -"ANEW", "ANNA", "ANNE", "ANTE", "ANTI", "AQUA", "ARAB", "ARCH", -"AREA", "ARGO", "ARID", "ARMY", "ARTS", "ARTY", "ASIA", "ASKS", -"ATOM", "AUNT", "AURA", "AUTO", "AVER", "AVID", "AVIS", "AVON", -"AVOW", "AWAY", "AWRY", "BABE", "BABY", "BACH", "BACK", "BADE", -"BAIL", "BAIT", "BAKE", "BALD", "BALE", "BALI", "BALK", "BALL", -"BALM", "BAND", "BANE", "BANG", "BANK", "BARB", "BARD", "BARE", -"BARK", "BARN", "BARR", "BASE", "BASH", "BASK", "BASS", "BATE", -"BATH", "BAWD", "BAWL", "BEAD", "BEAK", "BEAM", "BEAN", "BEAR", -"BEAT", "BEAU", "BECK", "BEEF", "BEEN", "BEER", "BEET", "BELA", -"BELL", "BELT", "BEND", "BENT", "BERG", "BERN", "BERT", "BESS", -"BEST", "BETA", "BETH", "BHOY", "BIAS", "BIDE", "BIEN", "BILE", -"BILK", "BILL", "BIND", "BING", "BIRD", "BITE", "BITS", "BLAB", -"BLAT", "BLED", "BLEW", "BLOB", "BLOC", "BLOT", "BLOW", "BLUE", -"BLUM", "BLUR", "BOAR", "BOAT", "BOCA", "BOCK", "BODE", "BODY", -"BOGY", "BOHR", "BOIL", "BOLD", "BOLO", "BOLT", "BOMB", "BONA", -"BOND", "BONE", "BONG", "BONN", "BONY", "BOOK", "BOOM", "BOON", -"BOOT", "BORE", "BORG", "BORN", "BOSE", "BOSS", "BOTH", "BOUT", -"BOWL", "BOYD", "BRAD", "BRAE", "BRAG", "BRAN", "BRAY", "BRED", -"BREW", "BRIG", "BRIM", "BROW", "BUCK", "BUDD", "BUFF", "BULB", -"BULK", "BULL", "BUNK", "BUNT", "BUOY", "BURG", "BURL", "BURN", -"BURR", "BURT", "BURY", "BUSH", "BUSS", "BUST", "BUSY", "BYTE", -"CADY", "CAFE", "CAGE", "CAIN", "CAKE", "CALF", "CALL", "CALM", -"CAME", "CANE", "CANT", "CARD", "CARE", "CARL", "CARR", "CART", -"CASE", "CASH", "CASK", "CAST", "CAVE", "CEIL", "CELL", "CENT", -"CERN", "CHAD", "CHAR", "CHAT", "CHAW", "CHEF", "CHEN", "CHEW", -"CHIC", "CHIN", "CHOU", "CHOW", "CHUB", "CHUG", "CHUM", "CITE", -"CITY", "CLAD", "CLAM", "CLAN", "CLAW", "CLAY", "CLOD", "CLOG", -"CLOT", "CLUB", "CLUE", "COAL", "COAT", "COCA", "COCK", "COCO", -"CODA", "CODE", "CODY", "COED", "COIL", "COIN", "COKE", "COLA", -"COLD", "COLT", "COMA", "COMB", "COME", "COOK", "COOL", "COON", -"COOT", "CORD", "CORE", "CORK", "CORN", "COST", "COVE", "COWL", -"CRAB", "CRAG", "CRAM", "CRAY", "CREW", "CRIB", "CROW", "CRUD", -"CUBA", "CUBE", "CUFF", "CULL", "CULT", "CUNY", "CURB", "CURD", -"CURE", "CURL", "CURT", "CUTS", "DADE", "DALE", "DAME", "DANA", -"DANE", "DANG", "DANK", "DARE", "DARK", "DARN", "DART", "DASH", -"DATA", "DATE", "DAVE", "DAVY", "DAWN", "DAYS", "DEAD", "DEAF", -"DEAL", "DEAN", "DEAR", "DEBT", "DECK", "DEED", "DEEM", "DEER", -"DEFT", "DEFY", "DELL", "DENT", "DENY", "DESK", "DIAL", "DICE", -"DIED", "DIET", "DIME", "DINE", "DING", "DINT", "DIRE", "DIRT", -"DISC", "DISH", "DISK", "DIVE", "DOCK", "DOES", "DOLE", "DOLL", -"DOLT", "DOME", "DONE", "DOOM", "DOOR", "DORA", "DOSE", "DOTE", -"DOUG", "DOUR", "DOVE", "DOWN", "DRAB", "DRAG", "DRAM", "DRAW", -"DREW", "DRUB", "DRUG", "DRUM", "DUAL", "DUCK", "DUCT", "DUEL", -"DUET", "DUKE", "DULL", "DUMB", "DUNE", "DUNK", "DUSK", "DUST", -"DUTY", "EACH", "EARL", "EARN", "EASE", "EAST", "EASY", "EBEN", -"ECHO", "EDDY", "EDEN", "EDGE", "EDGY", "EDIT", "EDNA", "EGAN", -"ELAN", "ELBA", "ELLA", "ELSE", "EMIL", "EMIT", "EMMA", "ENDS", -"ERIC", "EROS", "EVEN", "EVER", "EVIL", "EYED", "FACE", "FACT", -"FADE", "FAIL", "FAIN", "FAIR", "FAKE", "FALL", "FAME", "FANG", -"FARM", "FAST", "FATE", "FAWN", "FEAR", "FEAT", "FEED", "FEEL", -"FEET", "FELL", "FELT", "FEND", "FERN", "FEST", "FEUD", "FIEF", -"FIGS", "FILE", "FILL", "FILM", "FIND", "FINE", "FINK", "FIRE", -"FIRM", "FISH", "FISK", "FIST", "FITS", "FIVE", "FLAG", "FLAK", -"FLAM", "FLAT", "FLAW", "FLEA", "FLED", "FLEW", "FLIT", "FLOC", -"FLOG", "FLOW", "FLUB", "FLUE", "FOAL", "FOAM", "FOGY", "FOIL", -"FOLD", "FOLK", "FOND", "FONT", "FOOD", "FOOL", "FOOT", "FORD", -"FORE", "FORK", "FORM", "FORT", "FOSS", "FOUL", "FOUR", "FOWL", -"FRAU", "FRAY", "FRED", "FREE", "FRET", "FREY", "FROG", "FROM", -"FUEL", "FULL", "FUME", "FUND", "FUNK", "FURY", "FUSE", "FUSS", -"GAFF", "GAGE", "GAIL", "GAIN", "GAIT", "GALA", "GALE", "GALL", -"GALT", "GAME", "GANG", "GARB", "GARY", "GASH", "GATE", "GAUL", -"GAUR", "GAVE", "GAWK", "GEAR", "GELD", "GENE", "GENT", "GERM", -"GETS", "GIBE", "GIFT", "GILD", "GILL", "GILT", "GINA", "GIRD", -"GIRL", "GIST", "GIVE", "GLAD", "GLEE", "GLEN", "GLIB", "GLOB", -"GLOM", "GLOW", "GLUE", "GLUM", "GLUT", "GOAD", "GOAL", "GOAT", -"GOER", "GOES", "GOLD", "GOLF", "GONE", "GONG", "GOOD", "GOOF", -"GORE", "GORY", "GOSH", "GOUT", "GOWN", "GRAB", "GRAD", "GRAY", -"GREG", "GREW", "GREY", "GRID", "GRIM", "GRIN", "GRIT", "GROW", -"GRUB", "GULF", "GULL", "GUNK", "GURU", "GUSH", "GUST", "GWEN", -"GWYN", "HAAG", "HAAS", "HACK", "HAIL", "HAIR", "HALE", "HALF", -"HALL", "HALO", "HALT", "HAND", "HANG", "HANK", "HANS", "HARD", -"HARK", "HARM", "HART", "HASH", "HAST", "HATE", "HATH", "HAUL", -"HAVE", "HAWK", "HAYS", "HEAD", "HEAL", "HEAR", "HEAT", "HEBE", -"HECK", "HEED", "HEEL", "HEFT", "HELD", "HELL", "HELM", "HERB", -"HERD", "HERE", "HERO", "HERS", "HESS", "HEWN", "HICK", "HIDE", -"HIGH", "HIKE", "HILL", "HILT", "HIND", "HINT", "HIRE", "HISS", -"HIVE", "HOBO", "HOCK", "HOFF", "HOLD", "HOLE", "HOLM", "HOLT", -"HOME", "HONE", "HONK", "HOOD", "HOOF", "HOOK", "HOOT", "HORN", -"HOSE", "HOST", "HOUR", "HOVE", "HOWE", "HOWL", "HOYT", "HUCK", -"HUED", "HUFF", "HUGE", "HUGH", "HUGO", "HULK", "HULL", "HUNK", -"HUNT", "HURD", "HURL", "HURT", "HUSH", "HYDE", "HYMN", "IBIS", -"ICON", "IDEA", "IDLE", "IFFY", "INCA", "INCH", "INTO", "IONS", -"IOTA", "IOWA", "IRIS", "IRMA", "IRON", "ISLE", "ITCH", "ITEM", -"IVAN", "JACK", "JADE", "JAIL", "JAKE", "JANE", "JAVA", "JEAN", -"JEFF", "JERK", "JESS", "JEST", "JIBE", "JILL", "JILT", "JIVE", -"JOAN", "JOBS", "JOCK", "JOEL", "JOEY", "JOHN", "JOIN", "JOKE", -"JOLT", "JOVE", "JUDD", "JUDE", "JUDO", "JUDY", "JUJU", "JUKE", -"JULY", "JUNE", "JUNK", "JUNO", "JURY", "JUST", "JUTE", "KAHN", -"KALE", "KANE", "KANT", "KARL", "KATE", "KEEL", "KEEN", "KENO", -"KENT", "KERN", "KERR", "KEYS", "KICK", "KILL", "KIND", "KING", -"KIRK", "KISS", "KITE", "KLAN", "KNEE", "KNEW", "KNIT", "KNOB", -"KNOT", "KNOW", "KOCH", "KONG", "KUDO", "KURD", "KURT", "KYLE", -"LACE", "LACK", "LACY", "LADY", "LAID", "LAIN", "LAIR", "LAKE", -"LAMB", "LAME", "LAND", "LANE", "LANG", "LARD", "LARK", "LASS", -"LAST", "LATE", "LAUD", "LAVA", "LAWN", "LAWS", "LAYS", "LEAD", -"LEAF", "LEAK", "LEAN", "LEAR", "LEEK", "LEER", "LEFT", "LEND", -"LENS", "LENT", "LEON", "LESK", "LESS", "LEST", "LETS", "LIAR", -"LICE", "LICK", "LIED", "LIEN", "LIES", "LIEU", "LIFE", "LIFT", -"LIKE", "LILA", "LILT", "LILY", "LIMA", "LIMB", "LIME", "LIND", -"LINE", "LINK", "LINT", "LION", "LISA", "LIST", "LIVE", "LOAD", -"LOAF", "LOAM", "LOAN", "LOCK", "LOFT", "LOGE", "LOIS", "LOLA", -"LONE", "LONG", "LOOK", "LOON", "LOOT", "LORD", "LORE", "LOSE", -"LOSS", "LOST", "LOUD", "LOVE", "LOWE", "LUCK", "LUCY", "LUGE", -"LUKE", "LULU", "LUND", "LUNG", "LURA", "LURE", "LURK", "LUSH", -"LUST", "LYLE", "LYNN", "LYON", "LYRA", "MACE", "MADE", "MAGI", -"MAID", "MAIL", "MAIN", "MAKE", "MALE", "MALI", "MALL", "MALT", -"MANA", "MANN", "MANY", "MARC", "MARE", "MARK", "MARS", "MART", -"MARY", "MASH", "MASK", "MASS", "MAST", "MATE", "MATH", "MAUL", -"MAYO", "MEAD", "MEAL", "MEAN", "MEAT", "MEEK", "MEET", "MELD", -"MELT", "MEMO", "MEND", "MENU", "MERT", "MESH", "MESS", "MICE", -"MIKE", "MILD", "MILE", "MILK", "MILL", "MILT", "MIMI", "MIND", -"MINE", "MINI", "MINK", "MINT", "MIRE", "MISS", "MIST", "MITE", -"MITT", "MOAN", "MOAT", "MOCK", "MODE", "MOLD", "MOLE", "MOLL", -"MOLT", "MONA", "MONK", "MONT", "MOOD", "MOON", "MOOR", "MOOT", -"MORE", "MORN", "MORT", "MOSS", "MOST", "MOTH", "MOVE", "MUCH", -"MUCK", "MUDD", "MUFF", "MULE", "MULL", "MURK", "MUSH", "MUST", -"MUTE", "MUTT", "MYRA", "MYTH", "NAGY", "NAIL", "NAIR", "NAME", -"NARY", "NASH", "NAVE", "NAVY", "NEAL", "NEAR", "NEAT", "NECK", -"NEED", "NEIL", "NELL", "NEON", "NERO", "NESS", "NEST", "NEWS", -"NEWT", "NIBS", "NICE", "NICK", "NILE", "NINA", "NINE", "NOAH", -"NODE", "NOEL", "NOLL", "NONE", "NOOK", "NOON", "NORM", "NOSE", -"NOTE", "NOUN", "NOVA", "NUDE", "NULL", "NUMB", "OATH", "OBEY", -"OBOE", "ODIN", "OHIO", "OILY", "OINT", "OKAY", "OLAF", "OLDY", -"OLGA", "OLIN", "OMAN", "OMEN", "OMIT", "ONCE", "ONES", "ONLY", -"ONTO", "ONUS", "ORAL", "ORGY", "OSLO", "OTIS", "OTTO", "OUCH", -"OUST", "OUTS", "OVAL", "OVEN", "OVER", "OWLY", "OWNS", "QUAD", -"QUIT", "QUOD", "RACE", "RACK", "RACY", "RAFT", "RAGE", "RAID", -"RAIL", "RAIN", "RAKE", "RANK", "RANT", "RARE", "RASH", "RATE", -"RAVE", "RAYS", "READ", "REAL", "REAM", "REAR", "RECK", "REED", -"REEF", "REEK", "REEL", "REID", "REIN", "RENA", "REND", "RENT", -"REST", "RICE", "RICH", "RICK", "RIDE", "RIFT", "RILL", "RIME", -"RING", "RINK", "RISE", "RISK", "RITE", "ROAD", "ROAM", "ROAR", -"ROBE", "ROCK", "RODE", "ROIL", "ROLL", "ROME", "ROOD", "ROOF", -"ROOK", "ROOM", "ROOT", "ROSA", "ROSE", "ROSS", "ROSY", "ROTH", -"ROUT", "ROVE", "ROWE", "ROWS", "RUBE", "RUBY", "RUDE", "RUDY", -"RUIN", "RULE", "RUNG", "RUNS", "RUNT", "RUSE", "RUSH", "RUSK", -"RUSS", "RUST", "RUTH", "SACK", "SAFE", "SAGE", "SAID", "SAIL", -"SALE", "SALK", "SALT", "SAME", "SAND", "SANE", "SANG", "SANK", -"SARA", "SAUL", "SAVE", "SAYS", "SCAN", "SCAR", "SCAT", "SCOT", -"SEAL", "SEAM", "SEAR", "SEAT", "SEED", "SEEK", "SEEM", "SEEN", -"SEES", "SELF", "SELL", "SEND", "SENT", "SETS", "SEWN", "SHAG", -"SHAM", "SHAW", "SHAY", "SHED", "SHIM", "SHIN", "SHOD", "SHOE", -"SHOT", "SHOW", "SHUN", "SHUT", "SICK", "SIDE", "SIFT", "SIGH", -"SIGN", "SILK", "SILL", "SILO", "SILT", "SINE", "SING", "SINK", -"SIRE", "SITE", "SITS", "SITU", "SKAT", "SKEW", "SKID", "SKIM", -"SKIN", "SKIT", "SLAB", "SLAM", "SLAT", "SLAY", "SLED", "SLEW", -"SLID", "SLIM", "SLIT", "SLOB", "SLOG", "SLOT", "SLOW", "SLUG", -"SLUM", "SLUR", "SMOG", "SMUG", "SNAG", "SNOB", "SNOW", "SNUB", -"SNUG", "SOAK", "SOAR", "SOCK", "SODA", "SOFA", "SOFT", "SOIL", -"SOLD", "SOME", "SONG", "SOON", "SOOT", "SORE", "SORT", "SOUL", -"SOUR", "SOWN", "STAB", "STAG", "STAN", "STAR", "STAY", "STEM", -"STEW", "STIR", "STOW", "STUB", "STUN", "SUCH", "SUDS", "SUIT", -"SULK", "SUMS", "SUNG", "SUNK", "SURE", "SURF", "SWAB", "SWAG", -"SWAM", "SWAN", "SWAT", "SWAY", "SWIM", "SWUM", "TACK", "TACT", -"TAIL", "TAKE", "TALE", "TALK", "TALL", "TANK", "TASK", "TATE", -"TAUT", "TEAL", "TEAM", "TEAR", "TECH", "TEEM", "TEEN", "TEET", -"TELL", "TEND", "TENT", "TERM", "TERN", "TESS", "TEST", "THAN", -"THAT", "THEE", "THEM", "THEN", "THEY", "THIN", "THIS", "THUD", -"THUG", "TICK", "TIDE", "TIDY", "TIED", "TIER", "TILE", "TILL", -"TILT", "TIME", "TINA", "TINE", "TINT", "TINY", "TIRE", "TOAD", -"TOGO", "TOIL", "TOLD", "TOLL", "TONE", "TONG", "TONY", "TOOK", -"TOOL", "TOOT", "TORE", "TORN", "TOTE", "TOUR", "TOUT", "TOWN", -"TRAG", "TRAM", "TRAY", "TREE", "TREK", "TRIG", "TRIM", "TRIO", -"TROD", "TROT", "TROY", "TRUE", "TUBA", "TUBE", "TUCK", "TUFT", -"TUNA", "TUNE", "TUNG", "TURF", "TURN", "TUSK", "TWIG", "TWIN", -"TWIT", "ULAN", "UNIT", "URGE", "USED", "USER", "USES", "UTAH", -"VAIL", "VAIN", "VALE", "VARY", "VASE", "VAST", "VEAL", "VEDA", -"VEIL", "VEIN", "VEND", "VENT", "VERB", "VERY", "VETO", "VICE", -"VIEW", "VINE", "VISE", "VOID", "VOLT", "VOTE", "WACK", "WADE", -"WAGE", "WAIL", "WAIT", "WAKE", "WALE", "WALK", "WALL", "WALT", -"WAND", "WANE", "WANG", "WANT", "WARD", "WARM", "WARN", "WART", -"WASH", "WAST", "WATS", "WATT", "WAVE", "WAVY", "WAYS", "WEAK", -"WEAL", "WEAN", "WEAR", "WEED", "WEEK", "WEIR", "WELD", "WELL", -"WELT", "WENT", "WERE", "WERT", "WEST", "WHAM", "WHAT", "WHEE", -"WHEN", "WHET", "WHOA", "WHOM", "WICK", "WIFE", "WILD", "WILL", -"WIND", "WINE", "WING", "WINK", "WINO", "WIRE", "WISE", "WISH", -"WITH", "WOLF", "WONT", "WOOD", "WOOL", "WORD", "WORE", "WORK", -"WORM", "WORN", "WOVE", "WRIT", "WYNN", "YALE", "YANG", "YANK", -"YARD", "YARN", "YAWL", "YAWN", "YEAH", "YEAR", "YELL", "YOGA", -"YOKE" }; - -const struct e inv_std_dict[2048] = { -{"A", 0}, -{"ABE", 1}, -{"ABED", 571}, -{"ABEL", 572}, -{"ABET", 573}, -{"ABLE", 574}, -{"ABUT", 575}, -{"ACE", 2}, -{"ACHE", 576}, -{"ACID", 577}, -{"ACME", 578}, -{"ACRE", 579}, -{"ACT", 3}, -{"ACTA", 580}, -{"ACTS", 581}, -{"AD", 4}, -{"ADA", 5}, -{"ADAM", 582}, -{"ADD", 6}, -{"ADDS", 583}, -{"ADEN", 584}, -{"AFAR", 585}, -{"AFRO", 586}, -{"AGEE", 587}, -{"AGO", 7}, -{"AHEM", 588}, -{"AHOY", 589}, -{"AID", 8}, -{"AIDA", 590}, -{"AIDE", 591}, -{"AIDS", 592}, -{"AIM", 9}, -{"AIR", 10}, -{"AIRY", 593}, -{"AJAR", 594}, -{"AKIN", 595}, -{"ALAN", 596}, -{"ALEC", 597}, -{"ALGA", 598}, -{"ALIA", 599}, -{"ALL", 11}, -{"ALLY", 600}, -{"ALMA", 601}, -{"ALOE", 602}, -{"ALP", 12}, -{"ALSO", 603}, -{"ALTO", 604}, -{"ALUM", 605}, -{"ALVA", 606}, -{"AM", 13}, -{"AMEN", 607}, -{"AMES", 608}, -{"AMID", 609}, -{"AMMO", 610}, -{"AMOK", 611}, -{"AMOS", 612}, -{"AMRA", 613}, -{"AMY", 14}, -{"AN", 15}, -{"ANA", 16}, -{"AND", 17}, -{"ANDY", 614}, -{"ANEW", 615}, -{"ANN", 18}, -{"ANNA", 616}, -{"ANNE", 617}, -{"ANT", 19}, -{"ANTE", 618}, -{"ANTI", 619}, -{"ANY", 20}, -{"APE", 21}, -{"APS", 22}, -{"APT", 23}, -{"AQUA", 620}, -{"ARAB", 621}, -{"ARC", 24}, -{"ARCH", 622}, -{"ARE", 25}, -{"AREA", 623}, -{"ARGO", 624}, -{"ARID", 625}, -{"ARK", 26}, -{"ARM", 27}, -{"ARMY", 626}, -{"ART", 28}, -{"ARTS", 627}, -{"ARTY", 628}, -{"AS", 29}, -{"ASH", 30}, -{"ASIA", 629}, -{"ASK", 31}, -{"ASKS", 630}, -{"AT", 32}, -{"ATE", 33}, -{"ATOM", 631}, -{"AUG", 34}, -{"AUK", 35}, -{"AUNT", 632}, -{"AURA", 633}, -{"AUTO", 634}, -{"AVE", 36}, -{"AVER", 635}, -{"AVID", 636}, -{"AVIS", 637}, -{"AVON", 638}, -{"AVOW", 639}, -{"AWAY", 640}, -{"AWE", 37}, -{"AWK", 38}, -{"AWL", 39}, -{"AWN", 40}, -{"AWRY", 641}, -{"AX", 41}, -{"AYE", 42}, -{"BABE", 642}, -{"BABY", 643}, -{"BACH", 644}, -{"BACK", 645}, -{"BAD", 43}, -{"BADE", 646}, -{"BAG", 44}, -{"BAH", 45}, -{"BAIL", 647}, -{"BAIT", 648}, -{"BAKE", 649}, -{"BALD", 650}, -{"BALE", 651}, -{"BALI", 652}, -{"BALK", 653}, -{"BALL", 654}, -{"BALM", 655}, -{"BAM", 46}, -{"BAN", 47}, -{"BAND", 656}, -{"BANE", 657}, -{"BANG", 658}, -{"BANK", 659}, -{"BAR", 48}, -{"BARB", 660}, -{"BARD", 661}, -{"BARE", 662}, -{"BARK", 663}, -{"BARN", 664}, -{"BARR", 665}, -{"BASE", 666}, -{"BASH", 667}, -{"BASK", 668}, -{"BASS", 669}, -{"BAT", 49}, -{"BATE", 670}, -{"BATH", 671}, -{"BAWD", 672}, -{"BAWL", 673}, -{"BAY", 50}, -{"BE", 51}, -{"BEAD", 674}, -{"BEAK", 675}, -{"BEAM", 676}, -{"BEAN", 677}, -{"BEAR", 678}, -{"BEAT", 679}, -{"BEAU", 680}, -{"BECK", 681}, -{"BED", 52}, -{"BEE", 53}, -{"BEEF", 682}, -{"BEEN", 683}, -{"BEER", 684}, -{"BEET", 685}, -{"BEG", 54}, -{"BELA", 686}, -{"BELL", 687}, -{"BELT", 688}, -{"BEN", 55}, -{"BEND", 689}, -{"BENT", 690}, -{"BERG", 691}, -{"BERN", 692}, -{"BERT", 693}, -{"BESS", 694}, -{"BEST", 695}, -{"BET", 56}, -{"BETA", 696}, -{"BETH", 697}, -{"BEY", 57}, -{"BHOY", 698}, -{"BIAS", 699}, -{"BIB", 58}, -{"BID", 59}, -{"BIDE", 700}, -{"BIEN", 701}, -{"BIG", 60}, -{"BILE", 702}, -{"BILK", 703}, -{"BILL", 704}, -{"BIN", 61}, -{"BIND", 705}, -{"BING", 706}, -{"BIRD", 707}, -{"BIT", 62}, -{"BITE", 708}, -{"BITS", 709}, -{"BLAB", 710}, -{"BLAT", 711}, -{"BLED", 712}, -{"BLEW", 713}, -{"BLOB", 714}, -{"BLOC", 715}, -{"BLOT", 716}, -{"BLOW", 717}, -{"BLUE", 718}, -{"BLUM", 719}, -{"BLUR", 720}, -{"BOAR", 721}, -{"BOAT", 722}, -{"BOB", 63}, -{"BOCA", 723}, -{"BOCK", 724}, -{"BODE", 725}, -{"BODY", 726}, -{"BOG", 64}, -{"BOGY", 727}, -{"BOHR", 728}, -{"BOIL", 729}, -{"BOLD", 730}, -{"BOLO", 731}, -{"BOLT", 732}, -{"BOMB", 733}, -{"BON", 65}, -{"BONA", 734}, -{"BOND", 735}, -{"BONE", 736}, -{"BONG", 737}, -{"BONN", 738}, -{"BONY", 739}, -{"BOO", 66}, -{"BOOK", 740}, -{"BOOM", 741}, -{"BOON", 742}, -{"BOOT", 743}, -{"BOP", 67}, -{"BORE", 744}, -{"BORG", 745}, -{"BORN", 746}, -{"BOSE", 747}, -{"BOSS", 748}, -{"BOTH", 749}, -{"BOUT", 750}, -{"BOW", 68}, -{"BOWL", 751}, -{"BOY", 69}, -{"BOYD", 752}, -{"BRAD", 753}, -{"BRAE", 754}, -{"BRAG", 755}, -{"BRAN", 756}, -{"BRAY", 757}, -{"BRED", 758}, -{"BREW", 759}, -{"BRIG", 760}, -{"BRIM", 761}, -{"BROW", 762}, -{"BUB", 70}, -{"BUCK", 763}, -{"BUD", 71}, -{"BUDD", 764}, -{"BUFF", 765}, -{"BUG", 72}, -{"BULB", 766}, -{"BULK", 767}, -{"BULL", 768}, -{"BUM", 73}, -{"BUN", 74}, -{"BUNK", 769}, -{"BUNT", 770}, -{"BUOY", 771}, -{"BURG", 772}, -{"BURL", 773}, -{"BURN", 774}, -{"BURR", 775}, -{"BURT", 776}, -{"BURY", 777}, -{"BUS", 75}, -{"BUSH", 778}, -{"BUSS", 779}, -{"BUST", 780}, -{"BUSY", 781}, -{"BUT", 76}, -{"BUY", 77}, -{"BY", 78}, -{"BYE", 79}, -{"BYTE", 782}, -{"CAB", 80}, -{"CADY", 783}, -{"CAFE", 784}, -{"CAGE", 785}, -{"CAIN", 786}, -{"CAKE", 787}, -{"CAL", 81}, -{"CALF", 788}, -{"CALL", 789}, -{"CALM", 790}, -{"CAM", 82}, -{"CAME", 791}, -{"CAN", 83}, -{"CANE", 792}, -{"CANT", 793}, -{"CAP", 84}, -{"CAR", 85}, -{"CARD", 794}, -{"CARE", 795}, -{"CARL", 796}, -{"CARR", 797}, -{"CART", 798}, -{"CASE", 799}, -{"CASH", 800}, -{"CASK", 801}, -{"CAST", 802}, -{"CAT", 86}, -{"CAVE", 803}, -{"CAW", 87}, -{"CEIL", 804}, -{"CELL", 805}, -{"CENT", 806}, -{"CERN", 807}, -{"CHAD", 808}, -{"CHAR", 809}, -{"CHAT", 810}, -{"CHAW", 811}, -{"CHEF", 812}, -{"CHEN", 813}, -{"CHEW", 814}, -{"CHIC", 815}, -{"CHIN", 816}, -{"CHOU", 817}, -{"CHOW", 818}, -{"CHUB", 819}, -{"CHUG", 820}, -{"CHUM", 821}, -{"CITE", 822}, -{"CITY", 823}, -{"CLAD", 824}, -{"CLAM", 825}, -{"CLAN", 826}, -{"CLAW", 827}, -{"CLAY", 828}, -{"CLOD", 829}, -{"CLOG", 830}, -{"CLOT", 831}, -{"CLUB", 832}, -{"CLUE", 833}, -{"COAL", 834}, -{"COAT", 835}, -{"COCA", 836}, -{"COCK", 837}, -{"COCO", 838}, -{"COD", 88}, -{"CODA", 839}, -{"CODE", 840}, -{"CODY", 841}, -{"COED", 842}, -{"COG", 89}, -{"COIL", 843}, -{"COIN", 844}, -{"COKE", 845}, -{"COL", 90}, -{"COLA", 846}, -{"COLD", 847}, -{"COLT", 848}, -{"COMA", 849}, -{"COMB", 850}, -{"COME", 851}, -{"CON", 91}, -{"COO", 92}, -{"COOK", 852}, -{"COOL", 853}, -{"COON", 854}, -{"COOT", 855}, -{"COP", 93}, -{"CORD", 856}, -{"CORE", 857}, -{"CORK", 858}, -{"CORN", 859}, -{"COST", 860}, -{"COT", 94}, -{"COVE", 861}, -{"COW", 95}, -{"COWL", 862}, -{"COY", 96}, -{"CRAB", 863}, -{"CRAG", 864}, -{"CRAM", 865}, -{"CRAY", 866}, -{"CREW", 867}, -{"CRIB", 868}, -{"CROW", 869}, -{"CRUD", 870}, -{"CRY", 97}, -{"CUB", 98}, -{"CUBA", 871}, -{"CUBE", 872}, -{"CUE", 99}, -{"CUFF", 873}, -{"CULL", 874}, -{"CULT", 875}, -{"CUNY", 876}, -{"CUP", 100}, -{"CUR", 101}, -{"CURB", 877}, -{"CURD", 878}, -{"CURE", 879}, -{"CURL", 880}, -{"CURT", 881}, -{"CUT", 102}, -{"CUTS", 882}, -{"DAB", 103}, -{"DAD", 104}, -{"DADE", 883}, -{"DALE", 884}, -{"DAM", 105}, -{"DAME", 885}, -{"DAN", 106}, -{"DANA", 886}, -{"DANE", 887}, -{"DANG", 888}, -{"DANK", 889}, -{"DAR", 107}, -{"DARE", 890}, -{"DARK", 891}, -{"DARN", 892}, -{"DART", 893}, -{"DASH", 894}, -{"DATA", 895}, -{"DATE", 896}, -{"DAVE", 897}, -{"DAVY", 898}, -{"DAWN", 899}, -{"DAY", 108}, -{"DAYS", 900}, -{"DEAD", 901}, -{"DEAF", 902}, -{"DEAL", 903}, -{"DEAN", 904}, -{"DEAR", 905}, -{"DEBT", 906}, -{"DECK", 907}, -{"DEE", 109}, -{"DEED", 908}, -{"DEEM", 909}, -{"DEER", 910}, -{"DEFT", 911}, -{"DEFY", 912}, -{"DEL", 110}, -{"DELL", 913}, -{"DEN", 111}, -{"DENT", 914}, -{"DENY", 915}, -{"DES", 112}, -{"DESK", 916}, -{"DEW", 113}, -{"DIAL", 917}, -{"DICE", 918}, -{"DID", 114}, -{"DIE", 115}, -{"DIED", 919}, -{"DIET", 920}, -{"DIG", 116}, -{"DIME", 921}, -{"DIN", 117}, -{"DINE", 922}, -{"DING", 923}, -{"DINT", 924}, -{"DIP", 118}, -{"DIRE", 925}, -{"DIRT", 926}, -{"DISC", 927}, -{"DISH", 928}, -{"DISK", 929}, -{"DIVE", 930}, -{"DO", 119}, -{"DOCK", 931}, -{"DOE", 120}, -{"DOES", 932}, -{"DOG", 121}, -{"DOLE", 933}, -{"DOLL", 934}, -{"DOLT", 935}, -{"DOME", 936}, -{"DON", 122}, -{"DONE", 937}, -{"DOOM", 938}, -{"DOOR", 939}, -{"DORA", 940}, -{"DOSE", 941}, -{"DOT", 123}, -{"DOTE", 942}, -{"DOUG", 943}, -{"DOUR", 944}, -{"DOVE", 945}, -{"DOW", 124}, -{"DOWN", 946}, -{"DRAB", 947}, -{"DRAG", 948}, -{"DRAM", 949}, -{"DRAW", 950}, -{"DREW", 951}, -{"DRUB", 952}, -{"DRUG", 953}, -{"DRUM", 954}, -{"DRY", 125}, -{"DUAL", 955}, -{"DUB", 126}, -{"DUCK", 956}, -{"DUCT", 957}, -{"DUD", 127}, -{"DUE", 128}, -{"DUEL", 958}, -{"DUET", 959}, -{"DUG", 129}, -{"DUKE", 960}, -{"DULL", 961}, -{"DUMB", 962}, -{"DUN", 130}, -{"DUNE", 963}, -{"DUNK", 964}, -{"DUSK", 965}, -{"DUST", 966}, -{"DUTY", 967}, -{"EACH", 968}, -{"EAR", 131}, -{"EARL", 969}, -{"EARN", 970}, -{"EASE", 971}, -{"EAST", 972}, -{"EASY", 973}, -{"EAT", 132}, -{"EBEN", 974}, -{"ECHO", 975}, -{"ED", 133}, -{"EDDY", 976}, -{"EDEN", 977}, -{"EDGE", 978}, -{"EDGY", 979}, -{"EDIT", 980}, -{"EDNA", 981}, -{"EEL", 134}, -{"EGAN", 982}, -{"EGG", 135}, -{"EGO", 136}, -{"ELAN", 983}, -{"ELBA", 984}, -{"ELI", 137}, -{"ELK", 138}, -{"ELLA", 985}, -{"ELM", 139}, -{"ELSE", 986}, -{"ELY", 140}, -{"EM", 141}, -{"EMIL", 987}, -{"EMIT", 988}, -{"EMMA", 989}, -{"END", 142}, -{"ENDS", 990}, -{"ERIC", 991}, -{"EROS", 992}, -{"EST", 143}, -{"ETC", 144}, -{"EVA", 145}, -{"EVE", 146}, -{"EVEN", 993}, -{"EVER", 994}, -{"EVIL", 995}, -{"EWE", 147}, -{"EYE", 148}, -{"EYED", 996}, -{"FACE", 997}, -{"FACT", 998}, -{"FAD", 149}, -{"FADE", 999}, -{"FAIL", 1000}, -{"FAIN", 1001}, -{"FAIR", 1002}, -{"FAKE", 1003}, -{"FALL", 1004}, -{"FAME", 1005}, -{"FAN", 150}, -{"FANG", 1006}, -{"FAR", 151}, -{"FARM", 1007}, -{"FAST", 1008}, -{"FAT", 152}, -{"FATE", 1009}, -{"FAWN", 1010}, -{"FAY", 153}, -{"FEAR", 1011}, -{"FEAT", 1012}, -{"FED", 154}, -{"FEE", 155}, -{"FEED", 1013}, -{"FEEL", 1014}, -{"FEET", 1015}, -{"FELL", 1016}, -{"FELT", 1017}, -{"FEND", 1018}, -{"FERN", 1019}, -{"FEST", 1020}, -{"FEUD", 1021}, -{"FEW", 156}, -{"FIB", 157}, -{"FIEF", 1022}, -{"FIG", 158}, -{"FIGS", 1023}, -{"FILE", 1024}, -{"FILL", 1025}, -{"FILM", 1026}, -{"FIN", 159}, -{"FIND", 1027}, -{"FINE", 1028}, -{"FINK", 1029}, -{"FIR", 160}, -{"FIRE", 1030}, -{"FIRM", 1031}, -{"FISH", 1032}, -{"FISK", 1033}, -{"FIST", 1034}, -{"FIT", 161}, -{"FITS", 1035}, -{"FIVE", 1036}, -{"FLAG", 1037}, -{"FLAK", 1038}, -{"FLAM", 1039}, -{"FLAT", 1040}, -{"FLAW", 1041}, -{"FLEA", 1042}, -{"FLED", 1043}, -{"FLEW", 1044}, -{"FLIT", 1045}, -{"FLO", 162}, -{"FLOC", 1046}, -{"FLOG", 1047}, -{"FLOW", 1048}, -{"FLUB", 1049}, -{"FLUE", 1050}, -{"FLY", 163}, -{"FOAL", 1051}, -{"FOAM", 1052}, -{"FOE", 164}, -{"FOG", 165}, -{"FOGY", 1053}, -{"FOIL", 1054}, -{"FOLD", 1055}, -{"FOLK", 1056}, -{"FOND", 1057}, -{"FONT", 1058}, -{"FOOD", 1059}, -{"FOOL", 1060}, -{"FOOT", 1061}, -{"FOR", 166}, -{"FORD", 1062}, -{"FORE", 1063}, -{"FORK", 1064}, -{"FORM", 1065}, -{"FORT", 1066}, -{"FOSS", 1067}, -{"FOUL", 1068}, -{"FOUR", 1069}, -{"FOWL", 1070}, -{"FRAU", 1071}, -{"FRAY", 1072}, -{"FRED", 1073}, -{"FREE", 1074}, -{"FRET", 1075}, -{"FREY", 1076}, -{"FROG", 1077}, -{"FROM", 1078}, -{"FRY", 167}, -{"FUEL", 1079}, -{"FULL", 1080}, -{"FUM", 168}, -{"FUME", 1081}, -{"FUN", 169}, -{"FUND", 1082}, -{"FUNK", 1083}, -{"FUR", 170}, -{"FURY", 1084}, -{"FUSE", 1085}, -{"FUSS", 1086}, -{"GAB", 171}, -{"GAD", 172}, -{"GAFF", 1087}, -{"GAG", 173}, -{"GAGE", 1088}, -{"GAIL", 1089}, -{"GAIN", 1090}, -{"GAIT", 1091}, -{"GAL", 174}, -{"GALA", 1092}, -{"GALE", 1093}, -{"GALL", 1094}, -{"GALT", 1095}, -{"GAM", 175}, -{"GAME", 1096}, -{"GANG", 1097}, -{"GAP", 176}, -{"GARB", 1098}, -{"GARY", 1099}, -{"GAS", 177}, -{"GASH", 1100}, -{"GATE", 1101}, -{"GAUL", 1102}, -{"GAUR", 1103}, -{"GAVE", 1104}, -{"GAWK", 1105}, -{"GAY", 178}, -{"GEAR", 1106}, -{"GEE", 179}, -{"GEL", 180}, -{"GELD", 1107}, -{"GEM", 181}, -{"GENE", 1108}, -{"GENT", 1109}, -{"GERM", 1110}, -{"GET", 182}, -{"GETS", 1111}, -{"GIBE", 1112}, -{"GIFT", 1113}, -{"GIG", 183}, -{"GIL", 184}, -{"GILD", 1114}, -{"GILL", 1115}, -{"GILT", 1116}, -{"GIN", 185}, -{"GINA", 1117}, -{"GIRD", 1118}, -{"GIRL", 1119}, -{"GIST", 1120}, -{"GIVE", 1121}, -{"GLAD", 1122}, -{"GLEE", 1123}, -{"GLEN", 1124}, -{"GLIB", 1125}, -{"GLOB", 1126}, -{"GLOM", 1127}, -{"GLOW", 1128}, -{"GLUE", 1129}, -{"GLUM", 1130}, -{"GLUT", 1131}, -{"GO", 186}, -{"GOAD", 1132}, -{"GOAL", 1133}, -{"GOAT", 1134}, -{"GOER", 1135}, -{"GOES", 1136}, -{"GOLD", 1137}, -{"GOLF", 1138}, -{"GONE", 1139}, -{"GONG", 1140}, -{"GOOD", 1141}, -{"GOOF", 1142}, -{"GORE", 1143}, -{"GORY", 1144}, -{"GOSH", 1145}, -{"GOT", 187}, -{"GOUT", 1146}, -{"GOWN", 1147}, -{"GRAB", 1148}, -{"GRAD", 1149}, -{"GRAY", 1150}, -{"GREG", 1151}, -{"GREW", 1152}, -{"GREY", 1153}, -{"GRID", 1154}, -{"GRIM", 1155}, -{"GRIN", 1156}, -{"GRIT", 1157}, -{"GROW", 1158}, -{"GRUB", 1159}, -{"GULF", 1160}, -{"GULL", 1161}, -{"GUM", 188}, -{"GUN", 189}, -{"GUNK", 1162}, -{"GURU", 1163}, -{"GUS", 190}, -{"GUSH", 1164}, -{"GUST", 1165}, -{"GUT", 191}, -{"GUY", 192}, -{"GWEN", 1166}, -{"GWYN", 1167}, -{"GYM", 193}, -{"GYP", 194}, -{"HA", 195}, -{"HAAG", 1168}, -{"HAAS", 1169}, -{"HACK", 1170}, -{"HAD", 196}, -{"HAIL", 1171}, -{"HAIR", 1172}, -{"HAL", 197}, -{"HALE", 1173}, -{"HALF", 1174}, -{"HALL", 1175}, -{"HALO", 1176}, -{"HALT", 1177}, -{"HAM", 198}, -{"HAN", 199}, -{"HAND", 1178}, -{"HANG", 1179}, -{"HANK", 1180}, -{"HANS", 1181}, -{"HAP", 200}, -{"HARD", 1182}, -{"HARK", 1183}, -{"HARM", 1184}, -{"HART", 1185}, -{"HAS", 201}, -{"HASH", 1186}, -{"HAST", 1187}, -{"HAT", 202}, -{"HATE", 1188}, -{"HATH", 1189}, -{"HAUL", 1190}, -{"HAVE", 1191}, -{"HAW", 203}, -{"HAWK", 1192}, -{"HAY", 204}, -{"HAYS", 1193}, -{"HE", 205}, -{"HEAD", 1194}, -{"HEAL", 1195}, -{"HEAR", 1196}, -{"HEAT", 1197}, -{"HEBE", 1198}, -{"HECK", 1199}, -{"HEED", 1200}, -{"HEEL", 1201}, -{"HEFT", 1202}, -{"HELD", 1203}, -{"HELL", 1204}, -{"HELM", 1205}, -{"HEM", 206}, -{"HEN", 207}, -{"HER", 208}, -{"HERB", 1206}, -{"HERD", 1207}, -{"HERE", 1208}, -{"HERO", 1209}, -{"HERS", 1210}, -{"HESS", 1211}, -{"HEW", 209}, -{"HEWN", 1212}, -{"HEY", 210}, -{"HI", 211}, -{"HICK", 1213}, -{"HID", 212}, -{"HIDE", 1214}, -{"HIGH", 1215}, -{"HIKE", 1216}, -{"HILL", 1217}, -{"HILT", 1218}, -{"HIM", 213}, -{"HIND", 1219}, -{"HINT", 1220}, -{"HIP", 214}, -{"HIRE", 1221}, -{"HIS", 215}, -{"HISS", 1222}, -{"HIT", 216}, -{"HIVE", 1223}, -{"HO", 217}, -{"HOB", 218}, -{"HOBO", 1224}, -{"HOC", 219}, -{"HOCK", 1225}, -{"HOE", 220}, -{"HOFF", 1226}, -{"HOG", 221}, -{"HOLD", 1227}, -{"HOLE", 1228}, -{"HOLM", 1229}, -{"HOLT", 1230}, -{"HOME", 1231}, -{"HONE", 1232}, -{"HONK", 1233}, -{"HOOD", 1234}, -{"HOOF", 1235}, -{"HOOK", 1236}, -{"HOOT", 1237}, -{"HOP", 222}, -{"HORN", 1238}, -{"HOSE", 1239}, -{"HOST", 1240}, -{"HOT", 223}, -{"HOUR", 1241}, -{"HOVE", 1242}, -{"HOW", 224}, -{"HOWE", 1243}, -{"HOWL", 1244}, -{"HOYT", 1245}, -{"HUB", 225}, -{"HUCK", 1246}, -{"HUE", 226}, -{"HUED", 1247}, -{"HUFF", 1248}, -{"HUG", 227}, -{"HUGE", 1249}, -{"HUGH", 1250}, -{"HUGO", 1251}, -{"HUH", 228}, -{"HULK", 1252}, -{"HULL", 1253}, -{"HUM", 229}, -{"HUNK", 1254}, -{"HUNT", 1255}, -{"HURD", 1256}, -{"HURL", 1257}, -{"HURT", 1258}, -{"HUSH", 1259}, -{"HUT", 230}, -{"HYDE", 1260}, -{"HYMN", 1261}, -{"I", 231}, -{"IBIS", 1262}, -{"ICON", 1263}, -{"ICY", 232}, -{"IDA", 233}, -{"IDEA", 1264}, -{"IDLE", 1265}, -{"IF", 234}, -{"IFFY", 1266}, -{"IKE", 235}, -{"ILL", 236}, -{"INCA", 1267}, -{"INCH", 1268}, -{"INK", 237}, -{"INN", 238}, -{"INTO", 1269}, -{"IO", 239}, -{"ION", 240}, -{"IONS", 1270}, -{"IOTA", 1271}, -{"IOWA", 1272}, -{"IQ", 241}, -{"IRA", 242}, -{"IRE", 243}, -{"IRIS", 1273}, -{"IRK", 244}, -{"IRMA", 1274}, -{"IRON", 1275}, -{"IS", 245}, -{"ISLE", 1276}, -{"IT", 246}, -{"ITCH", 1277}, -{"ITEM", 1278}, -{"ITS", 247}, -{"IVAN", 1279}, -{"IVY", 248}, -{"JAB", 249}, -{"JACK", 1280}, -{"JADE", 1281}, -{"JAG", 250}, -{"JAIL", 1282}, -{"JAKE", 1283}, -{"JAM", 251}, -{"JAN", 252}, -{"JANE", 1284}, -{"JAR", 253}, -{"JAVA", 1285}, -{"JAW", 254}, -{"JAY", 255}, -{"JEAN", 1286}, -{"JEFF", 1287}, -{"JERK", 1288}, -{"JESS", 1289}, -{"JEST", 1290}, -{"JET", 256}, -{"JIBE", 1291}, -{"JIG", 257}, -{"JILL", 1292}, -{"JILT", 1293}, -{"JIM", 258}, -{"JIVE", 1294}, -{"JO", 259}, -{"JOAN", 1295}, -{"JOB", 260}, -{"JOBS", 1296}, -{"JOCK", 1297}, -{"JOE", 261}, -{"JOEL", 1298}, -{"JOEY", 1299}, -{"JOG", 262}, -{"JOHN", 1300}, -{"JOIN", 1301}, -{"JOKE", 1302}, -{"JOLT", 1303}, -{"JOT", 263}, -{"JOVE", 1304}, -{"JOY", 264}, -{"JUDD", 1305}, -{"JUDE", 1306}, -{"JUDO", 1307}, -{"JUDY", 1308}, -{"JUG", 265}, -{"JUJU", 1309}, -{"JUKE", 1310}, -{"JULY", 1311}, -{"JUNE", 1312}, -{"JUNK", 1313}, -{"JUNO", 1314}, -{"JURY", 1315}, -{"JUST", 1316}, -{"JUT", 266}, -{"JUTE", 1317}, -{"KAHN", 1318}, -{"KALE", 1319}, -{"KANE", 1320}, -{"KANT", 1321}, -{"KARL", 1322}, -{"KATE", 1323}, -{"KAY", 267}, -{"KEEL", 1324}, -{"KEEN", 1325}, -{"KEG", 268}, -{"KEN", 269}, -{"KENO", 1326}, -{"KENT", 1327}, -{"KERN", 1328}, -{"KERR", 1329}, -{"KEY", 270}, -{"KEYS", 1330}, -{"KICK", 1331}, -{"KID", 271}, -{"KILL", 1332}, -{"KIM", 272}, -{"KIN", 273}, -{"KIND", 1333}, -{"KING", 1334}, -{"KIRK", 1335}, -{"KISS", 1336}, -{"KIT", 274}, -{"KITE", 1337}, -{"KLAN", 1338}, -{"KNEE", 1339}, -{"KNEW", 1340}, -{"KNIT", 1341}, -{"KNOB", 1342}, -{"KNOT", 1343}, -{"KNOW", 1344}, -{"KOCH", 1345}, -{"KONG", 1346}, -{"KUDO", 1347}, -{"KURD", 1348}, -{"KURT", 1349}, -{"KYLE", 1350}, -{"LA", 275}, -{"LAB", 276}, -{"LAC", 277}, -{"LACE", 1351}, -{"LACK", 1352}, -{"LACY", 1353}, -{"LAD", 278}, -{"LADY", 1354}, -{"LAG", 279}, -{"LAID", 1355}, -{"LAIN", 1356}, -{"LAIR", 1357}, -{"LAKE", 1358}, -{"LAM", 280}, -{"LAMB", 1359}, -{"LAME", 1360}, -{"LAND", 1361}, -{"LANE", 1362}, -{"LANG", 1363}, -{"LAP", 281}, -{"LARD", 1364}, -{"LARK", 1365}, -{"LASS", 1366}, -{"LAST", 1367}, -{"LATE", 1368}, -{"LAUD", 1369}, -{"LAVA", 1370}, -{"LAW", 282}, -{"LAWN", 1371}, -{"LAWS", 1372}, -{"LAY", 283}, -{"LAYS", 1373}, -{"LEA", 284}, -{"LEAD", 1374}, -{"LEAF", 1375}, -{"LEAK", 1376}, -{"LEAN", 1377}, -{"LEAR", 1378}, -{"LED", 285}, -{"LEE", 286}, -{"LEEK", 1379}, -{"LEER", 1380}, -{"LEFT", 1381}, -{"LEG", 287}, -{"LEN", 288}, -{"LEND", 1382}, -{"LENS", 1383}, -{"LENT", 1384}, -{"LEO", 289}, -{"LEON", 1385}, -{"LESK", 1386}, -{"LESS", 1387}, -{"LEST", 1388}, -{"LET", 290}, -{"LETS", 1389}, -{"LEW", 291}, -{"LIAR", 1390}, -{"LICE", 1391}, -{"LICK", 1392}, -{"LID", 292}, -{"LIE", 293}, -{"LIED", 1393}, -{"LIEN", 1394}, -{"LIES", 1395}, -{"LIEU", 1396}, -{"LIFE", 1397}, -{"LIFT", 1398}, -{"LIKE", 1399}, -{"LILA", 1400}, -{"LILT", 1401}, -{"LILY", 1402}, -{"LIMA", 1403}, -{"LIMB", 1404}, -{"LIME", 1405}, -{"LIN", 294}, -{"LIND", 1406}, -{"LINE", 1407}, -{"LINK", 1408}, -{"LINT", 1409}, -{"LION", 1410}, -{"LIP", 295}, -{"LISA", 1411}, -{"LIST", 1412}, -{"LIT", 296}, -{"LIVE", 1413}, -{"LO", 297}, -{"LOAD", 1414}, -{"LOAF", 1415}, -{"LOAM", 1416}, -{"LOAN", 1417}, -{"LOB", 298}, -{"LOCK", 1418}, -{"LOFT", 1419}, -{"LOG", 299}, -{"LOGE", 1420}, -{"LOIS", 1421}, -{"LOLA", 1422}, -{"LONE", 1423}, -{"LONG", 1424}, -{"LOOK", 1425}, -{"LOON", 1426}, -{"LOOT", 1427}, -{"LOP", 300}, -{"LORD", 1428}, -{"LORE", 1429}, -{"LOS", 301}, -{"LOSE", 1430}, -{"LOSS", 1431}, -{"LOST", 1432}, -{"LOT", 302}, -{"LOU", 303}, -{"LOUD", 1433}, -{"LOVE", 1434}, -{"LOW", 304}, -{"LOWE", 1435}, -{"LOY", 305}, -{"LUCK", 1436}, -{"LUCY", 1437}, -{"LUG", 306}, -{"LUGE", 1438}, -{"LUKE", 1439}, -{"LULU", 1440}, -{"LUND", 1441}, -{"LUNG", 1442}, -{"LURA", 1443}, -{"LURE", 1444}, -{"LURK", 1445}, -{"LUSH", 1446}, -{"LUST", 1447}, -{"LYE", 307}, -{"LYLE", 1448}, -{"LYNN", 1449}, -{"LYON", 1450}, -{"LYRA", 1451}, -{"MA", 308}, -{"MAC", 309}, -{"MACE", 1452}, -{"MAD", 310}, -{"MADE", 1453}, -{"MAE", 311}, -{"MAGI", 1454}, -{"MAID", 1455}, -{"MAIL", 1456}, -{"MAIN", 1457}, -{"MAKE", 1458}, -{"MALE", 1459}, -{"MALI", 1460}, -{"MALL", 1461}, -{"MALT", 1462}, -{"MAN", 312}, -{"MANA", 1463}, -{"MANN", 1464}, -{"MANY", 1465}, -{"MAO", 313}, -{"MAP", 314}, -{"MARC", 1466}, -{"MARE", 1467}, -{"MARK", 1468}, -{"MARS", 1469}, -{"MART", 1470}, -{"MARY", 1471}, -{"MASH", 1472}, -{"MASK", 1473}, -{"MASS", 1474}, -{"MAST", 1475}, -{"MAT", 315}, -{"MATE", 1476}, -{"MATH", 1477}, -{"MAUL", 1478}, -{"MAW", 316}, -{"MAY", 317}, -{"MAYO", 1479}, -{"ME", 318}, -{"MEAD", 1480}, -{"MEAL", 1481}, -{"MEAN", 1482}, -{"MEAT", 1483}, -{"MEEK", 1484}, -{"MEET", 1485}, -{"MEG", 319}, -{"MEL", 320}, -{"MELD", 1486}, -{"MELT", 1487}, -{"MEMO", 1488}, -{"MEN", 321}, -{"MEND", 1489}, -{"MENU", 1490}, -{"MERT", 1491}, -{"MESH", 1492}, -{"MESS", 1493}, -{"MET", 322}, -{"MEW", 323}, -{"MICE", 1494}, -{"MID", 324}, -{"MIKE", 1495}, -{"MILD", 1496}, -{"MILE", 1497}, -{"MILK", 1498}, -{"MILL", 1499}, -{"MILT", 1500}, -{"MIMI", 1501}, -{"MIN", 325}, -{"MIND", 1502}, -{"MINE", 1503}, -{"MINI", 1504}, -{"MINK", 1505}, -{"MINT", 1506}, -{"MIRE", 1507}, -{"MISS", 1508}, -{"MIST", 1509}, -{"MIT", 326}, -{"MITE", 1510}, -{"MITT", 1511}, -{"MOAN", 1512}, -{"MOAT", 1513}, -{"MOB", 327}, -{"MOCK", 1514}, -{"MOD", 328}, -{"MODE", 1515}, -{"MOE", 329}, -{"MOLD", 1516}, -{"MOLE", 1517}, -{"MOLL", 1518}, -{"MOLT", 1519}, -{"MONA", 1520}, -{"MONK", 1521}, -{"MONT", 1522}, -{"MOO", 330}, -{"MOOD", 1523}, -{"MOON", 1524}, -{"MOOR", 1525}, -{"MOOT", 1526}, -{"MOP", 331}, -{"MORE", 1527}, -{"MORN", 1528}, -{"MORT", 1529}, -{"MOS", 332}, -{"MOSS", 1530}, -{"MOST", 1531}, -{"MOT", 333}, -{"MOTH", 1532}, -{"MOVE", 1533}, -{"MOW", 334}, -{"MUCH", 1534}, -{"MUCK", 1535}, -{"MUD", 335}, -{"MUDD", 1536}, -{"MUFF", 1537}, -{"MUG", 336}, -{"MULE", 1538}, -{"MULL", 1539}, -{"MUM", 337}, -{"MURK", 1540}, -{"MUSH", 1541}, -{"MUST", 1542}, -{"MUTE", 1543}, -{"MUTT", 1544}, -{"MY", 338}, -{"MYRA", 1545}, -{"MYTH", 1546}, -{"NAB", 339}, -{"NAG", 340}, -{"NAGY", 1547}, -{"NAIL", 1548}, -{"NAIR", 1549}, -{"NAME", 1550}, -{"NAN", 341}, -{"NAP", 342}, -{"NARY", 1551}, -{"NASH", 1552}, -{"NAT", 343}, -{"NAVE", 1553}, -{"NAVY", 1554}, -{"NAY", 344}, -{"NE", 345}, -{"NEAL", 1555}, -{"NEAR", 1556}, -{"NEAT", 1557}, -{"NECK", 1558}, -{"NED", 346}, -{"NEE", 347}, -{"NEED", 1559}, -{"NEIL", 1560}, -{"NELL", 1561}, -{"NEON", 1562}, -{"NERO", 1563}, -{"NESS", 1564}, -{"NEST", 1565}, -{"NET", 348}, -{"NEW", 349}, -{"NEWS", 1566}, -{"NEWT", 1567}, -{"NIB", 350}, -{"NIBS", 1568}, -{"NICE", 1569}, -{"NICK", 1570}, -{"NIL", 351}, -{"NILE", 1571}, -{"NINA", 1572}, -{"NINE", 1573}, -{"NIP", 352}, -{"NIT", 353}, -{"NO", 354}, -{"NOAH", 1574}, -{"NOB", 355}, -{"NOD", 356}, -{"NODE", 1575}, -{"NOEL", 1576}, -{"NOLL", 1577}, -{"NON", 357}, -{"NONE", 1578}, -{"NOOK", 1579}, -{"NOON", 1580}, -{"NOR", 358}, -{"NORM", 1581}, -{"NOSE", 1582}, -{"NOT", 359}, -{"NOTE", 1583}, -{"NOUN", 1584}, -{"NOV", 360}, -{"NOVA", 1585}, -{"NOW", 361}, -{"NU", 362}, -{"NUDE", 1586}, -{"NULL", 1587}, -{"NUMB", 1588}, -{"NUN", 363}, -{"NUT", 364}, -{"O", 365}, -{"OAF", 366}, -{"OAK", 367}, -{"OAR", 368}, -{"OAT", 369}, -{"OATH", 1589}, -{"OBEY", 1590}, -{"OBOE", 1591}, -{"ODD", 370}, -{"ODE", 371}, -{"ODIN", 1592}, -{"OF", 372}, -{"OFF", 373}, -{"OFT", 374}, -{"OH", 375}, -{"OHIO", 1593}, -{"OIL", 376}, -{"OILY", 1594}, -{"OINT", 1595}, -{"OK", 377}, -{"OKAY", 1596}, -{"OLAF", 1597}, -{"OLD", 378}, -{"OLDY", 1598}, -{"OLGA", 1599}, -{"OLIN", 1600}, -{"OMAN", 1601}, -{"OMEN", 1602}, -{"OMIT", 1603}, -{"ON", 379}, -{"ONCE", 1604}, -{"ONE", 380}, -{"ONES", 1605}, -{"ONLY", 1606}, -{"ONTO", 1607}, -{"ONUS", 1608}, -{"OR", 381}, -{"ORAL", 1609}, -{"ORB", 382}, -{"ORE", 383}, -{"ORGY", 1610}, -{"ORR", 384}, -{"OS", 385}, -{"OSLO", 1611}, -{"OTIS", 1612}, -{"OTT", 386}, -{"OTTO", 1613}, -{"OUCH", 1614}, -{"OUR", 387}, -{"OUST", 1615}, -{"OUT", 388}, -{"OUTS", 1616}, -{"OVA", 389}, -{"OVAL", 1617}, -{"OVEN", 1618}, -{"OVER", 1619}, -{"OW", 390}, -{"OWE", 391}, -{"OWL", 392}, -{"OWLY", 1620}, -{"OWN", 393}, -{"OWNS", 1621}, -{"OX", 394}, -{"PA", 395}, -{"PAD", 396}, -{"PAL", 397}, -{"PAM", 398}, -{"PAN", 399}, -{"PAP", 400}, -{"PAR", 401}, -{"PAT", 402}, -{"PAW", 403}, -{"PAY", 404}, -{"PEA", 405}, -{"PEG", 406}, -{"PEN", 407}, -{"PEP", 408}, -{"PER", 409}, -{"PET", 410}, -{"PEW", 411}, -{"PHI", 412}, -{"PI", 413}, -{"PIE", 414}, -{"PIN", 415}, -{"PIT", 416}, -{"PLY", 417}, -{"PO", 418}, -{"POD", 419}, -{"POE", 420}, -{"POP", 421}, -{"POT", 422}, -{"POW", 423}, -{"PRO", 424}, -{"PRY", 425}, -{"PUB", 426}, -{"PUG", 427}, -{"PUN", 428}, -{"PUP", 429}, -{"PUT", 430}, -{"QUAD", 1622}, -{"QUIT", 1623}, -{"QUO", 431}, -{"QUOD", 1624}, -{"RACE", 1625}, -{"RACK", 1626}, -{"RACY", 1627}, -{"RAFT", 1628}, -{"RAG", 432}, -{"RAGE", 1629}, -{"RAID", 1630}, -{"RAIL", 1631}, -{"RAIN", 1632}, -{"RAKE", 1633}, -{"RAM", 433}, -{"RAN", 434}, -{"RANK", 1634}, -{"RANT", 1635}, -{"RAP", 435}, -{"RARE", 1636}, -{"RASH", 1637}, -{"RAT", 436}, -{"RATE", 1638}, -{"RAVE", 1639}, -{"RAW", 437}, -{"RAY", 438}, -{"RAYS", 1640}, -{"READ", 1641}, -{"REAL", 1642}, -{"REAM", 1643}, -{"REAR", 1644}, -{"REB", 439}, -{"RECK", 1645}, -{"RED", 440}, -{"REED", 1646}, -{"REEF", 1647}, -{"REEK", 1648}, -{"REEL", 1649}, -{"REID", 1650}, -{"REIN", 1651}, -{"RENA", 1652}, -{"REND", 1653}, -{"RENT", 1654}, -{"REP", 441}, -{"REST", 1655}, -{"RET", 442}, -{"RIB", 443}, -{"RICE", 1656}, -{"RICH", 1657}, -{"RICK", 1658}, -{"RID", 444}, -{"RIDE", 1659}, -{"RIFT", 1660}, -{"RIG", 445}, -{"RILL", 1661}, -{"RIM", 446}, -{"RIME", 1662}, -{"RING", 1663}, -{"RINK", 1664}, -{"RIO", 447}, -{"RIP", 448}, -{"RISE", 1665}, -{"RISK", 1666}, -{"RITE", 1667}, -{"ROAD", 1668}, -{"ROAM", 1669}, -{"ROAR", 1670}, -{"ROB", 449}, -{"ROBE", 1671}, -{"ROCK", 1672}, -{"ROD", 450}, -{"RODE", 1673}, -{"ROE", 451}, -{"ROIL", 1674}, -{"ROLL", 1675}, -{"ROME", 1676}, -{"RON", 452}, -{"ROOD", 1677}, -{"ROOF", 1678}, -{"ROOK", 1679}, -{"ROOM", 1680}, -{"ROOT", 1681}, -{"ROSA", 1682}, -{"ROSE", 1683}, -{"ROSS", 1684}, -{"ROSY", 1685}, -{"ROT", 453}, -{"ROTH", 1686}, -{"ROUT", 1687}, -{"ROVE", 1688}, -{"ROW", 454}, -{"ROWE", 1689}, -{"ROWS", 1690}, -{"ROY", 455}, -{"RUB", 456}, -{"RUBE", 1691}, -{"RUBY", 1692}, -{"RUDE", 1693}, -{"RUDY", 1694}, -{"RUE", 457}, -{"RUG", 458}, -{"RUIN", 1695}, -{"RULE", 1696}, -{"RUM", 459}, -{"RUN", 460}, -{"RUNG", 1697}, -{"RUNS", 1698}, -{"RUNT", 1699}, -{"RUSE", 1700}, -{"RUSH", 1701}, -{"RUSK", 1702}, -{"RUSS", 1703}, -{"RUST", 1704}, -{"RUTH", 1705}, -{"RYE", 461}, -{"SAC", 462}, -{"SACK", 1706}, -{"SAD", 463}, -{"SAFE", 1707}, -{"SAG", 464}, -{"SAGE", 1708}, -{"SAID", 1709}, -{"SAIL", 1710}, -{"SAL", 465}, -{"SALE", 1711}, -{"SALK", 1712}, -{"SALT", 1713}, -{"SAM", 466}, -{"SAME", 1714}, -{"SAN", 467}, -{"SAND", 1715}, -{"SANE", 1716}, -{"SANG", 1717}, -{"SANK", 1718}, -{"SAP", 468}, -{"SARA", 1719}, -{"SAT", 469}, -{"SAUL", 1720}, -{"SAVE", 1721}, -{"SAW", 470}, -{"SAY", 471}, -{"SAYS", 1722}, -{"SCAN", 1723}, -{"SCAR", 1724}, -{"SCAT", 1725}, -{"SCOT", 1726}, -{"SEA", 472}, -{"SEAL", 1727}, -{"SEAM", 1728}, -{"SEAR", 1729}, -{"SEAT", 1730}, -{"SEC", 473}, -{"SEE", 474}, -{"SEED", 1731}, -{"SEEK", 1732}, -{"SEEM", 1733}, -{"SEEN", 1734}, -{"SEES", 1735}, -{"SELF", 1736}, -{"SELL", 1737}, -{"SEN", 475}, -{"SEND", 1738}, -{"SENT", 1739}, -{"SET", 476}, -{"SETS", 1740}, -{"SEW", 477}, -{"SEWN", 1741}, -{"SHAG", 1742}, -{"SHAM", 1743}, -{"SHAW", 1744}, -{"SHAY", 1745}, -{"SHE", 478}, -{"SHED", 1746}, -{"SHIM", 1747}, -{"SHIN", 1748}, -{"SHOD", 1749}, -{"SHOE", 1750}, -{"SHOT", 1751}, -{"SHOW", 1752}, -{"SHUN", 1753}, -{"SHUT", 1754}, -{"SHY", 479}, -{"SICK", 1755}, -{"SIDE", 1756}, -{"SIFT", 1757}, -{"SIGH", 1758}, -{"SIGN", 1759}, -{"SILK", 1760}, -{"SILL", 1761}, -{"SILO", 1762}, -{"SILT", 1763}, -{"SIN", 480}, -{"SINE", 1764}, -{"SING", 1765}, -{"SINK", 1766}, -{"SIP", 481}, -{"SIR", 482}, -{"SIRE", 1767}, -{"SIS", 483}, -{"SIT", 484}, -{"SITE", 1768}, -{"SITS", 1769}, -{"SITU", 1770}, -{"SKAT", 1771}, -{"SKEW", 1772}, -{"SKI", 485}, -{"SKID", 1773}, -{"SKIM", 1774}, -{"SKIN", 1775}, -{"SKIT", 1776}, -{"SKY", 486}, -{"SLAB", 1777}, -{"SLAM", 1778}, -{"SLAT", 1779}, -{"SLAY", 1780}, -{"SLED", 1781}, -{"SLEW", 1782}, -{"SLID", 1783}, -{"SLIM", 1784}, -{"SLIT", 1785}, -{"SLOB", 1786}, -{"SLOG", 1787}, -{"SLOT", 1788}, -{"SLOW", 1789}, -{"SLUG", 1790}, -{"SLUM", 1791}, -{"SLUR", 1792}, -{"SLY", 487}, -{"SMOG", 1793}, -{"SMUG", 1794}, -{"SNAG", 1795}, -{"SNOB", 1796}, -{"SNOW", 1797}, -{"SNUB", 1798}, -{"SNUG", 1799}, -{"SO", 488}, -{"SOAK", 1800}, -{"SOAR", 1801}, -{"SOB", 489}, -{"SOCK", 1802}, -{"SOD", 490}, -{"SODA", 1803}, -{"SOFA", 1804}, -{"SOFT", 1805}, -{"SOIL", 1806}, -{"SOLD", 1807}, -{"SOME", 1808}, -{"SON", 491}, -{"SONG", 1809}, -{"SOON", 1810}, -{"SOOT", 1811}, -{"SOP", 492}, -{"SORE", 1812}, -{"SORT", 1813}, -{"SOUL", 1814}, -{"SOUR", 1815}, -{"SOW", 493}, -{"SOWN", 1816}, -{"SOY", 494}, -{"SPA", 495}, -{"SPY", 496}, -{"STAB", 1817}, -{"STAG", 1818}, -{"STAN", 1819}, -{"STAR", 1820}, -{"STAY", 1821}, -{"STEM", 1822}, -{"STEW", 1823}, -{"STIR", 1824}, -{"STOW", 1825}, -{"STUB", 1826}, -{"STUN", 1827}, -{"SUB", 497}, -{"SUCH", 1828}, -{"SUD", 498}, -{"SUDS", 1829}, -{"SUE", 499}, -{"SUIT", 1830}, -{"SULK", 1831}, -{"SUM", 500}, -{"SUMS", 1832}, -{"SUN", 501}, -{"SUNG", 1833}, -{"SUNK", 1834}, -{"SUP", 502}, -{"SURE", 1835}, -{"SURF", 1836}, -{"SWAB", 1837}, -{"SWAG", 1838}, -{"SWAM", 1839}, -{"SWAN", 1840}, -{"SWAT", 1841}, -{"SWAY", 1842}, -{"SWIM", 1843}, -{"SWUM", 1844}, -{"TAB", 503}, -{"TACK", 1845}, -{"TACT", 1846}, -{"TAD", 504}, -{"TAG", 505}, -{"TAIL", 1847}, -{"TAKE", 1848}, -{"TALE", 1849}, -{"TALK", 1850}, -{"TALL", 1851}, -{"TAN", 506}, -{"TANK", 1852}, -{"TAP", 507}, -{"TAR", 508}, -{"TASK", 1853}, -{"TATE", 1854}, -{"TAUT", 1855}, -{"TEA", 509}, -{"TEAL", 1856}, -{"TEAM", 1857}, -{"TEAR", 1858}, -{"TECH", 1859}, -{"TED", 510}, -{"TEE", 511}, -{"TEEM", 1860}, -{"TEEN", 1861}, -{"TEET", 1862}, -{"TELL", 1863}, -{"TEN", 512}, -{"TEND", 1864}, -{"TENT", 1865}, -{"TERM", 1866}, -{"TERN", 1867}, -{"TESS", 1868}, -{"TEST", 1869}, -{"THAN", 1870}, -{"THAT", 1871}, -{"THE", 513}, -{"THEE", 1872}, -{"THEM", 1873}, -{"THEN", 1874}, -{"THEY", 1875}, -{"THIN", 1876}, -{"THIS", 1877}, -{"THUD", 1878}, -{"THUG", 1879}, -{"THY", 514}, -{"TIC", 515}, -{"TICK", 1880}, -{"TIDE", 1881}, -{"TIDY", 1882}, -{"TIE", 516}, -{"TIED", 1883}, -{"TIER", 1884}, -{"TILE", 1885}, -{"TILL", 1886}, -{"TILT", 1887}, -{"TIM", 517}, -{"TIME", 1888}, -{"TIN", 518}, -{"TINA", 1889}, -{"TINE", 1890}, -{"TINT", 1891}, -{"TINY", 1892}, -{"TIP", 519}, -{"TIRE", 1893}, -{"TO", 520}, -{"TOAD", 1894}, -{"TOE", 521}, -{"TOG", 522}, -{"TOGO", 1895}, -{"TOIL", 1896}, -{"TOLD", 1897}, -{"TOLL", 1898}, -{"TOM", 523}, -{"TON", 524}, -{"TONE", 1899}, -{"TONG", 1900}, -{"TONY", 1901}, -{"TOO", 525}, -{"TOOK", 1902}, -{"TOOL", 1903}, -{"TOOT", 1904}, -{"TOP", 526}, -{"TORE", 1905}, -{"TORN", 1906}, -{"TOTE", 1907}, -{"TOUR", 1908}, -{"TOUT", 1909}, -{"TOW", 527}, -{"TOWN", 1910}, -{"TOY", 528}, -{"TRAG", 1911}, -{"TRAM", 1912}, -{"TRAY", 1913}, -{"TREE", 1914}, -{"TREK", 1915}, -{"TRIG", 1916}, -{"TRIM", 1917}, -{"TRIO", 1918}, -{"TROD", 1919}, -{"TROT", 1920}, -{"TROY", 1921}, -{"TRUE", 1922}, -{"TRY", 529}, -{"TUB", 530}, -{"TUBA", 1923}, -{"TUBE", 1924}, -{"TUCK", 1925}, -{"TUFT", 1926}, -{"TUG", 531}, -{"TUM", 532}, -{"TUN", 533}, -{"TUNA", 1927}, -{"TUNE", 1928}, -{"TUNG", 1929}, -{"TURF", 1930}, -{"TURN", 1931}, -{"TUSK", 1932}, -{"TWIG", 1933}, -{"TWIN", 1934}, -{"TWIT", 1935}, -{"TWO", 534}, -{"ULAN", 1936}, -{"UN", 535}, -{"UNIT", 1937}, -{"UP", 536}, -{"URGE", 1938}, -{"US", 537}, -{"USE", 538}, -{"USED", 1939}, -{"USER", 1940}, -{"USES", 1941}, -{"UTAH", 1942}, -{"VAIL", 1943}, -{"VAIN", 1944}, -{"VALE", 1945}, -{"VAN", 539}, -{"VARY", 1946}, -{"VASE", 1947}, -{"VAST", 1948}, -{"VAT", 540}, -{"VEAL", 1949}, -{"VEDA", 1950}, -{"VEIL", 1951}, -{"VEIN", 1952}, -{"VEND", 1953}, -{"VENT", 1954}, -{"VERB", 1955}, -{"VERY", 1956}, -{"VET", 541}, -{"VETO", 1957}, -{"VICE", 1958}, -{"VIE", 542}, -{"VIEW", 1959}, -{"VINE", 1960}, -{"VISE", 1961}, -{"VOID", 1962}, -{"VOLT", 1963}, -{"VOTE", 1964}, -{"WACK", 1965}, -{"WAD", 543}, -{"WADE", 1966}, -{"WAG", 544}, -{"WAGE", 1967}, -{"WAIL", 1968}, -{"WAIT", 1969}, -{"WAKE", 1970}, -{"WALE", 1971}, -{"WALK", 1972}, -{"WALL", 1973}, -{"WALT", 1974}, -{"WAND", 1975}, -{"WANE", 1976}, -{"WANG", 1977}, -{"WANT", 1978}, -{"WAR", 545}, -{"WARD", 1979}, -{"WARM", 1980}, -{"WARN", 1981}, -{"WART", 1982}, -{"WAS", 546}, -{"WASH", 1983}, -{"WAST", 1984}, -{"WATS", 1985}, -{"WATT", 1986}, -{"WAVE", 1987}, -{"WAVY", 1988}, -{"WAY", 547}, -{"WAYS", 1989}, -{"WE", 548}, -{"WEAK", 1990}, -{"WEAL", 1991}, -{"WEAN", 1992}, -{"WEAR", 1993}, -{"WEB", 549}, -{"WED", 550}, -{"WEE", 551}, -{"WEED", 1994}, -{"WEEK", 1995}, -{"WEIR", 1996}, -{"WELD", 1997}, -{"WELL", 1998}, -{"WELT", 1999}, -{"WENT", 2000}, -{"WERE", 2001}, -{"WERT", 2002}, -{"WEST", 2003}, -{"WET", 552}, -{"WHAM", 2004}, -{"WHAT", 2005}, -{"WHEE", 2006}, -{"WHEN", 2007}, -{"WHET", 2008}, -{"WHO", 553}, -{"WHOA", 2009}, -{"WHOM", 2010}, -{"WHY", 554}, -{"WICK", 2011}, -{"WIFE", 2012}, -{"WILD", 2013}, -{"WILL", 2014}, -{"WIN", 555}, -{"WIND", 2015}, -{"WINE", 2016}, -{"WING", 2017}, -{"WINK", 2018}, -{"WINO", 2019}, -{"WIRE", 2020}, -{"WISE", 2021}, -{"WISH", 2022}, -{"WIT", 556}, -{"WITH", 2023}, -{"WOK", 557}, -{"WOLF", 2024}, -{"WON", 558}, -{"WONT", 2025}, -{"WOO", 559}, -{"WOOD", 2026}, -{"WOOL", 2027}, -{"WORD", 2028}, -{"WORE", 2029}, -{"WORK", 2030}, -{"WORM", 2031}, -{"WORN", 2032}, -{"WOVE", 2033}, -{"WOW", 560}, -{"WRIT", 2034}, -{"WRY", 561}, -{"WU", 562}, -{"WYNN", 2035}, -{"YALE", 2036}, -{"YAM", 563}, -{"YANG", 2037}, -{"YANK", 2038}, -{"YAP", 564}, -{"YARD", 2039}, -{"YARN", 2040}, -{"YAW", 565}, -{"YAWL", 2041}, -{"YAWN", 2042}, -{"YE", 566}, -{"YEA", 567}, -{"YEAH", 2043}, -{"YEAR", 2044}, -{"YELL", 2045}, -{"YES", 568}, -{"YET", 569}, -{"YOGA", 2046}, -{"YOKE", 2047}, -{"YOU", 570} -}; diff --git a/kerberosV/src/lib/otp/otp_print.c b/kerberosV/src/lib/otp/otp_print.c deleted file mode 100644 index 26d39fb6fba..00000000000 --- a/kerberosV/src/lib/otp/otp_print.c +++ /dev/null @@ -1,99 +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: otp_print.c,v 1.3 2013/06/17 19:11:44 robert Exp $"); -#endif - -#include "otp_locl.h" - -extern const char *const std_dict[]; - -unsigned -otp_checksum (OtpKey key) -{ - int i; - unsigned sum = 0; - - for (i = 0; i < OTPKEYSIZE; ++i) - sum += ((key[i] >> 0) & 0x03) - + ((key[i] >> 2) & 0x03) - + ((key[i] >> 4) & 0x03) - + ((key[i] >> 6) & 0x03); - sum &= 0x03; - return sum; -} - -void -otp_print_stddict (OtpKey key, char *str, size_t sz) -{ - unsigned sum; - - sum = otp_checksum (key); - snprintf (str, sz, - "%s %s %s %s %s %s", - std_dict[(key[0] << 3) | (key[1] >> 5)], - std_dict[((key[1] & 0x1F) << 6) | (key[2] >> 2)], - std_dict[((key[2] & 0x03) << 9) | (key[3] << 1) | (key[4] >> 7)], - std_dict[((key[4] & 0x7F) << 4) | (key[5] >> 4)], - std_dict[((key[5] & 0x0F) << 7) | (key[6] >> 1)], - std_dict[((key[6] & 0x01) << 10) | (key[7] << 2) | sum]); -} - -void -otp_print_hex (OtpKey key, char *str, size_t sz) -{ - snprintf (str, sz, - "%02x%02x%02x%02x%02x%02x%02x%02x", - key[0], key[1], key[2], key[3], - key[4], key[5], key[6], key[7]); -} - -void -otp_print_hex_extended (OtpKey key, char *str, size_t sz) -{ - strlcpy (str, OTP_HEXPREFIX, sz); - otp_print_hex (key, - str + strlen(OTP_HEXPREFIX), - sz - strlen(OTP_HEXPREFIX)); -} - -void -otp_print_stddict_extended (OtpKey key, char *str, size_t sz) -{ - strlcpy (str, OTP_WORDPREFIX, sz); - otp_print_stddict (key, - str + strlen(OTP_WORDPREFIX), - sz - strlen(OTP_WORDPREFIX)); -} diff --git a/kerberosV/src/lib/otp/otp_verify.c b/kerberosV/src/lib/otp/otp_verify.c deleted file mode 100644 index 7fa725bc86c..00000000000 --- a/kerberosV/src/lib/otp/otp_verify.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -RCSID("$Id: otp_verify.c,v 1.3 2013/06/17 19:11:44 robert Exp $"); -#endif - -#include "otp_locl.h" - -int -otp_verify_user_1 (OtpContext *ctx, const char *passwd) -{ - OtpKey key1, key2; - - if (otp_parse (key1, passwd, ctx->alg)) { - ctx->err = "Syntax error in reply"; - return -1; - } - memcpy (key2, key1, sizeof(key1)); - ctx->alg->next (key2); - if (memcmp (ctx->key, key2, sizeof(key2)) == 0) { - --ctx->n; - memcpy (ctx->key, key1, sizeof(key1)); - return 0; - } else - return -1; -} - -int -otp_verify_user (OtpContext *ctx, const char *passwd) -{ - void *dbm; - int ret; - - if (!ctx->challengep) - return -1; - ret = otp_verify_user_1 (ctx, passwd); - dbm = otp_db_open (); - if (dbm == NULL) { - free(ctx->user); - return -1; - } - otp_put (dbm, ctx); - free(ctx->user); - otp_db_close (dbm); - return ret; -} diff --git a/kerberosV/src/lib/otp/otptest.c b/kerberosV/src/lib/otp/otptest.c deleted file mode 100644 index 869f8742155..00000000000 --- a/kerberosV/src/lib/otp/otptest.c +++ /dev/null @@ -1,142 +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. - */ - -#include "config.h" - -#include -#include -#include - -static int -test_one(OtpKey key1, char *name, char *val, - void (*print)(OtpKey,char*, size_t), - OtpAlgorithm *alg) -{ - char buf[256]; - OtpKey key2; - - (*print)(key1, buf, sizeof(buf)); - printf ("%s: %s, ", name, buf); - if (strcmp (buf, val) != 0) { - printf ("failed(*%s* != *%s*)\n", buf, val); - return 1; - } - if (otp_parse (key2, buf, alg)) { - printf ("parse of %s failed\n", name); - return 1; - } - if (memcmp (key1, key2, OTPKEYSIZE) != 0) { - printf ("key1 != key2, "); - } - printf ("success\n"); - return 0; -} - -static int -test (void) -{ - struct test { - char *alg; - char *passphrase; - char *seed; - int count; - char *hex; - char *word; - } tests[] = { - - /* md4 */ - {"md4", "This is a test.", "TeSt", 0, "d1854218ebbb0b51", "ROME MUG FRED SCAN LIVE LACE"}, - {"md4", "This is a test.", "TeSt", 1, "63473ef01cd0b444", "CARD SAD MINI RYE COL KIN"}, - {"md4", "This is a test.", "TeSt", 99, "c5e612776e6c237a", "NOTE OUT IBIS SINK NAVE MODE"}, - {"md4", "AbCdEfGhIjK", "alpha1", 0, "50076f47eb1ade4e", "AWAY SEN ROOK SALT LICE MAP"}, - {"md4", "AbCdEfGhIjK", "alpha1", 1, "65d20d1949b5f7ab", "CHEW GRIM WU HANG BUCK SAID"}, - {"md4", "AbCdEfGhIjK", "alpha1", 99, "d150c82cce6f62d1", "ROIL FREE COG HUNK WAIT COCA"}, - {"md4", "OTP's are good", "correct", 0, "849c79d4f6f55388", "FOOL STEM DONE TOOL BECK NILE"}, - {"md4", "OTP's are good", "correct", 1, "8c0992fb250847b1", "GIST AMOS MOOT AIDS FOOD SEEM"}, - {"md4", "OTP's are good", "correct",99, "3f3bf4b4145fd74b", "TAG SLOW NOV MIN WOOL KENO"}, - - - /* md5 */ - {"md5", "This is a test.", "TeSt", 0, "9e876134d90499dd", "INCH SEA ANNE LONG AHEM TOUR"}, - {"md5", "This is a test.", "TeSt", 1, "7965e05436f5029f", "EASE OIL FUM CURE AWRY AVIS"}, - {"md5", "This is a test.", "TeSt", 99, "50fe1962c4965880", "BAIL TUFT BITS GANG CHEF THY"}, - {"md5", "AbCdEfGhIjK", "alpha1", 0, "87066dd9644bf206", "FULL PEW DOWN ONCE MORT ARC"}, - {"md5", "AbCdEfGhIjK", "alpha1", 1, "7cd34c1040add14b", "FACT HOOF AT FIST SITE KENT"}, - {"md5", "AbCdEfGhIjK", "alpha1", 99, "5aa37a81f212146c", "BODE HOP JAKE STOW JUT RAP"}, - {"md5", "OTP's are good", "correct", 0, "f205753943de4cf9", "ULAN NEW ARMY FUSE SUIT EYED"}, - {"md5", "OTP's are good", "correct", 1, "ddcdac956f234937", "SKIM CULT LOB SLAM POE HOWL"}, - {"md5", "OTP's are good", "correct",99, "b203e28fa525be47", "LONG IVY JULY AJAR BOND LEE"}, - - /* sha */ - {"sha", "This is a test.", "TeSt", 0, "bb9e6ae1979d8ff4", "MILT VARY MAST OK SEES WENT"}, - {"sha", "This is a test.", "TeSt", 1, "63d936639734385b", "CART OTTO HIVE ODE VAT NUT"}, - {"sha", "This is a test.", "TeSt", 99, "87fec7768b73ccf9", "GAFF WAIT SKID GIG SKY EYED"}, - {"sha", "AbCdEfGhIjK", "alpha1", 0, "ad85f658ebe383c9", "LEST OR HEEL SCOT ROB SUIT"}, - {"sha", "AbCdEfGhIjK", "alpha1", 1, "d07ce229b5cf119b", "RITE TAKE GELD COST TUNE RECK"}, - {"sha", "AbCdEfGhIjK", "alpha1", 99, "27bc71035aaf3dc6", "MAY STAR TIN LYON VEDA STAN"}, - {"sha", "OTP's are good", "correct", 0, "d51f3e99bf8e6f0b", "RUST WELT KICK FELL TAIL FRAU"}, - {"sha", "OTP's are good", "correct", 1, "82aeb52d943774e4", "FLIT DOSE ALSO MEW DRUM DEFY"}, - {"sha", "OTP's are good", "correct", 99, "4f296a74fe1567ec", "AURA ALOE HURL WING BERG WAIT"}, - {NULL} - }; - - struct test *t; - int sum = 0; - - for(t = tests; t->alg; ++t) { - int i; - OtpAlgorithm *alg = otp_find_alg (t->alg); - OtpKey key; - - if (alg == NULL) { - printf ("Could not find alg %s\n", t->alg); - return 1; - } - if(alg->init (key, t->passphrase, t->seed)) - return 1; - for (i = 0; i < t->count; ++i) { - if (alg->next (key)) - return 1; - } - sum += test_one (key, "hexadecimal", t->hex, otp_print_hex, - alg) + - test_one (key, "standard_word", t->word, otp_print_stddict, alg); - } - return sum; -} - -int -main (void) -{ - return test (); -} diff --git a/kerberosV/src/lib/otp/roken_rename.h b/kerberosV/src/lib/otp/roken_rename.h deleted file mode 100644 index 7248f224181..00000000000 --- a/kerberosV/src/lib/otp/roken_rename.h +++ /dev/null @@ -1,73 +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 2013/06/17 19:11:44 robert Exp $ */ - -#ifndef __roken_rename_h__ -#define __roken_rename_h__ - -#ifndef HAVE_SNPRINTF -#define rk_snprintf _otp_snprintf -#endif -#ifndef HAVE_ASPRINTF -#define rk_asprintf _otp_asprintf -#endif -#ifndef HAVE_ASNPRINTF -#define rk_asnprintf _otp_asnprintf -#endif -#ifndef HAVE_VASPRINTF -#define rk_vasprintf _otp_vasprintf -#endif -#ifndef HAVE_VASNPRINTF -#define rk_vasnprintf _otp_vasnprintf -#endif -#ifndef HAVE_VSNPRINTF -#define rk_vsnprintf _otp_vsnprintf -#endif -#ifndef HAVE_STRCASECMP -#define rk_strcasecmp _otp_strcasecmp -#endif -#ifndef HAVE_STRNCASECMP -#define rk_strncasecmp _otp_strncasecmp -#endif -#ifndef HAVE_STRLWR -#define rk_strlwr _otp_strlwr -#endif -#ifndef HAVE_STRLCAT -#define rk_strlcat _otp_strlcat -#endif -#ifndef HAVE_STRLCPY -#define rk_strlcpy _otp_strlcpy -#endif - -#endif /* __roken_rename_h__ */ diff --git a/kerberosV/src/lib/otp/version-script.map b/kerberosV/src/lib/otp/version-script.map deleted file mode 100644 index 499943f29fb..00000000000 --- a/kerberosV/src/lib/otp/version-script.map +++ /dev/null @@ -1,25 +0,0 @@ -HEIMDAL_OTP_1.0 { - global: - otp_challenge; - otp_checksum; - otp_db_close; - otp_db_open; - otp_delete; - otp_error; - otp_find_alg; - otp_get; - otp_parse; - otp_parse_altdict; - otp_parse_hex; - otp_parse_stddict; - otp_print_hex; - otp_print_hex_extended; - otp_print_stddict; - otp_print_stddict_extended; - otp_put; - otp_simple_get; - otp_verify_user; - otp_verify_user_1; - local: - *; -}; diff --git a/kerberosV/src/lib/roken/ChangeLog b/kerberosV/src/lib/roken/ChangeLog deleted file mode 100644 index 518987b26ab..00000000000 --- a/kerberosV/src/lib/roken/ChangeLog +++ /dev/null @@ -1,2229 +0,0 @@ -2008-07-12 Love Hörnquist Åstrand - - * rkpty.c: Always print output for status. - -2008-04-27 Love Hörnquist Åstrand - - * getaddrinfo-test.c: drop ) - - * Makefile.am: Add rkpty. - - * rkpty.c: More includes. - - * rkpty.c: Add timeout, add password command, add diffrent - verbosity levels. - -2008-04-26 Love Hörnquist Åstrand - - * rkpty.c: pty testing application - -2008-04-07 Love Hörnquist Åstrand - - * resolve.c: Use unsigned where appropriate. - -2008-02-23 Love Hörnquist Åstrand - - * Makefile.am: make AM_CPPFLAGS += - -2008-02-22 Love Hörnquist Åstrand - - * Makefile.am: Use AM_CPPFLAGS instead, not really right, but - definatly better then CPPFLAGS. Thanks to Mike Whitton for - pointing this out. - -2008-01-12 Love Hörnquist Åstrand - - * Makefile.am: add missing files. - -2007-08-09 Love Hörnquist Åstrand - - * strftime.c: rewrite str[pf]time for testing. - - * strptime.c: rewrite str[pf]time for testing. - - * Makefile.am: add TEST_STRPFTIME - -2007-07-17 Love Hörnquist Åstrand - - * ndbm_wrap.c (dbm_get): set dsize to 0 on failure. - - * Makefile.am: add ndbm_wrap.[ch] to EXTRA_DIST - - * ndbm_wrap.c (dbm_fetch): set dsize to 0 on failure. - -2007-07-16 Love Hörnquist Åstrand - - * socket_wrapper.c: Implement swrap_dup too. - - * socket_wrapper.c: Add dup(dummy stub) and dup2(real). - - * socket_wrapper.h: Add dup(dummy stub) and dup2(real). - -2007-07-10 Love Hörnquist Åstrand - - * Makefile.am: New library version. - -2007-06-19 Love Hörnquist Åstrand - - * roken_gethostby.c: set proxy_port to 0 to pacify BEAM. - -2007-06-07 Love Hörnquist Åstrand - - * use "roken.h" consitantly - -2007-06-03 Love Hörnquist Åstrand - - * test-readenv.c: Free environment. - - * environment.c (free_environment): free result of - read_environment(). - - * roken-common.h (free_environment): free result of - read_environment(). - -2007-05-10 Love Hörnquist Åstrand - - * fnmatch.c: Do recursive call to rk_fnmatch - -2007-01-12 Love Hörnquist Åstrand - - * resolve.c: Try harder to call res_ndestroy(). - -2006-12-27 Love Hörnquist Åstrand - - * Makefile.am: make sure built headers are copied to the - ${build_topdir}/include - -2006-12-15 Love Hörnquist Åstrand - - * unvis.c: Use internal version of rk_unvis - - * unvis.c: Always include rk_versions. - - * vis.c: Always include rk_versions. - - * vis.hin: Fix argument for unvis and strsvisx. - - * unvis.c: prefix unvis functions with rk_, and prototypes. - -2006-12-13 Love Hörnquist Åstrand - - * vis.c: Provide some prototypes for the rk_vis functions. - -2006-12-11 Love Hörnquist Åstrand - - * ifaddrs.hin: Prefix getifaddrs functions with rk_ and do symbol - renaming. - - * fnmatch.c: Prefix fnmatch functions with rk_ and do symbol - renaming. - - * vis.hin: Prefix strvis functions with rk_ and do symbol - renaming. - - * vis.c: prefix strvis functions with rk_ - - * Makefile.am: Install extra posix headers in to avoid - dup headers. - -2006-11-09 Love Hörnquist Åstrand - - * socket_wrapper.c (swrap_sendto): fail on to unknown si->type - -2006-11-06 Love Hörnquist Åstrand - - * socket_wrapper.c: A few fixes to have Heimdal pass the make - check under socket_wrapper. The first is a missing 'break' before - the (heimdal specific) IPv6 support. The second works around the - fact that sendto() *may* object to a destination being specified. - It appears to be that on Linux, this objects (with EISCONN) for - unix stream sockets, but not for TCP sockets. The alternate fix - would be to have the KDC use 'send()' in this case. Andrew Bartlett. - -2006-10-20 Love Hörnquist Åstrand - - * Makefile.am: split dist and nondist HEADERS - -2006-10-19 Love Hörnquist Åstrand - - * roken.h.in: Add timegm glue. - - * timegm.c: add timegm() - - * socket_wrapper.c: Include , gives os socklen_t on IRIX - 6.4. - - * socket_wrapper.c: Maybe include and/or maybe - include . - -2006-10-17 Love Hörnquist Åstrand - - * roken.h.in: Revert prevois for now, the problem is that we have - to include symbols unconditionally, even for those that just needs - protos. - - * roken.h.in: Provide symbol renaming, let see what breaks. - - * socket_wrapper.c: Maybe include . - -2006-10-10 Love Hörnquist Åstrand - - * socket_wrapper.c: more consitity check, remove dead code, add - socket length code, add missing break, make diffrent chars of type - type files for case-insensitiv filesystems - - * socket_wrapper.c: try even hard to not use socket wrapper for - socket_wrapper itself. - - * socket_wrapper.c: Force no socket wrapper for socket_wrapper - itself. - -2006-10-09 Love Hörnquist Åstrand - - * socket_wrapper.c: Maybe include . - - * socket_wrapper.c: Protect AF_INET6 with #ifdef HAVE_IPV6. - - * socket_wrapper.c: Use a symbol for the v6 address. - - * socket_wrapper.c: Add IPv6 suppport. - - * socket_wrapper.[ch]: Include socket wrapper from samba4 (rev - 19179). - -2006-10-07 Love Hörnquist Åstrand - - * Makefile.am: Add build_HEADERZ to EXTRA_DIST - - * Makefile.am: Add man_MANS to EXTRA_DIST - - * Makefile.am: Add to all objects BUILD_ROKEN_LIB. - -2006-09-16 Love Hörnquist Åstrand - - * roken.h.in: Add samba socket wrapper fragment. - - * Makefile.am: Add samba socket wrapper fragment. - -2006-09-05 Love Hörnquist Åstrand - - * snprintf.c: reapply patch that went away in last commit - - * snprintf-test.c: unbreak from previous commit - - * snprintf.c: Add size_t formater (z modifer). - - * snprintf-test.c: add tests for size_t printf formater - -2006-06-30 Love Hörnquist Åstrand - - * rtbl.h: Add extern "C" for C++. - - * rtbl.c: Add rtbl_add_column_entryv functions, printf like - - * rtbl.h: Add rtbl_add_column_entryv functions, printf like - -2006-06-22 Love Hörnquist Åstrand - - * glob.hin: Add extern "C" for C++. From joerg at britannica dot - bec dot de - - * fnmatch.hin: Add extern "C" for C++. From joerg at britannica - dot bec dot de - -2006-04-20 Love Hörnquist Åstrand - - * fnmatch.hin (fnmatch): CPP rename to rk_fnmatch - -2006-04-14 Love Hörnquist Åstrand - - * resolve.c (dns_srv_order): change a if (ptr == NULL) continue - into a assert(ptr != NULL) since it could never happen, found by - the IBM code checker (beam). Thanks to Florian Krohm for - explaining it. - -2006-04-02 Love Hörnquist Åstrand - - * roken_gethostby.c (roken_gethostby): make addr_list one larger - to avoid a off-by-one error. Found by IBM checker. - - * resolve.c: Plug memory leak found by IBM checker (and try to - please it). - -2006-02-06 Love Hörnquist Åstrand - - * resolve.c: Spelling, from Alexey Dobriyan, via Jason McIntyre - -2006-01-13 Love Hörnquist Åstrand - - * getcap.c: Don't use db support unless its build into libc but we - dont check for that now, so just disable the code. This removes - the dependency on libdb for roken, and that is a good thing since - it causes problem with nss plugins that uses DB3 that also - provides the same symbol, but with a diffrent ABI. so when the - application calls getpwnamn() and it linked to roken, it craches - in the nss functions. - -2006-01-09 Love Hörnquist Åstrand - - * hex.c (hex_decode): support decoding odd number of characters, - in the odd len case, the first character ends up in the first byte - in the lower nibble. - - * hex-test.c: Check that we can decode single character hex chars. - -2005-12-12 Love Hörnquist Åstrand - - * getifaddrs.c: Try handle HP/UX 11.nn, its diffrent from Solaris - large SIOCGIFCONF. - -2005-09-28 Love Hörnquist Åstrand - - * roken-common.h: Move rk_UNCONST to roken.h.in since it might use - uintptr_t depending on avaibility. - - * roken.h.in: Include if it exists. If avaiable, use - uintptr_t to define rk_UNCONST. - -2005-09-22 Love Hörnquist Åstrand - - * roken-common.h: Add rk_dumpdata. - - * dumpdata.c: Add rk_dumpdata() that write a chunk of data into a - file for later processing by some other tool (like asn1_print). - -2005-09-13 Love Hörnquist Åstrand - - * strptime.c: cast to unsigned char to make sure its not negative - when passing it to is* functions - -2005-09-01 Love Hörnquist Åstrand - - * socket.c: Add socket_set_ipv6only. - - * roken-common.h: Add socket_set_ipv6only, remove some argument - names. - -2005-08-25 Love Hörnquist Åstrand - - * strpool.c (rk_strpoolprintf): remove debug printf, plug memory - leak - -2005-08-23 Love Hörnquist Åstrand - - * setprogname.c (setprogname): const poision - - * print_version.c: Removed, moved to libvers. - -2005-08-22 Love Hörnquist Åstrand - - * resolve.c (dns_lookup_int): if we have res_ndestroy, prefeer - that before res_nclose - -2005-08-12 Love Hörnquist Åstrand - - * getaddrinfo-test.c: Rename optind to optidx to avoid shadowing. - -2005-08-05 Love Hörnquist Åstrand - - * gai_strerror.c: sprinkel more const - - * gai_strerror.c, roken.h.in: Make return value of gai_strerror - const to match SUSv3. Prompted by Stefan Metzmacher change to - Samba. - -2005-07-19 Love Hörnquist Åstrand - - * roken.h.in: Remove parameter names to avoid shadow warnings. - -2005-07-13 Love Hörnquist Åstrand - - * getifaddrs.c (nl_getlist): poll to get messages from kernel, and - retry if the message was lost - (free_nlmsglist): free all linked elements, not just the first one - -2005-07-08 Love Hörnquist Åstrand - - * snprintf-test.c: Check a very simple format string - -2005-07-07 Love Hörnquist Åstrand - - * roken.h.in: If we have include it, its needed for - strcasecmp() on those platforms that are SUS3/iso c99 strict (like - AIX) - - * roken-common.h: remove duplicate ; - -2005-07-06 Love Hörnquist Åstrand - - * roken-common.h: rk_strpoolprintf first variable identifier is 3 - -2005-06-30 Love Hörnquist Åstrand - - * base64.h: remove variable names - -2005-06-29 Love Hörnquist Åstrand - - * roken-common.h: fix format attribute - - * Makefile.am (libroken_la_SOURCES): += strpool.c - - * roken-common.h: add strpool, a printf collector to make it - eaiser to collect strings into one string - - * strpool.c: add strpool, a printf collector to make it eaiser to - collect strings into one string - -2005-06-23 Love Hörnquist Åstrand - - * base64.c: Add const, from Andrew Abartlet - -2005-06-21 Love Hörnquist Åstrand - - * strpftime-test.c: test for "%Y%m" - - * esetenv.c: unconst - - * strptime.c: Write a new parse_number function that is possible - to limit that amount of numbers used, with this strptime can - handle strptime("200505", "%Y%m", &tm); - -2005-06-16 Love Hörnquist Åstrand - - * getaddrinfo.c: avoid shadowing sin - - * resolve-test.c: rename optind to optidx to avoid shadowing - - * strptime.c: UNCONST return value from strptime - - * strftime.c: rk_UNCONST argument mktime - - * getnameinfo.c: avoid shadowing sin - - * socket.c: avoid shadowing sin - - * resolve.c (parse_record): fix casting to avoid losing const - - * roken.awk: since we got no feedback regarding people running - heimdal on the crays, remove the quoted # version - - * environment.c: rename index to idx to avoid shadowing - -2005-05-29 Love Hörnquist Åstrand - - * parse_reply-test.c: avoid signedness warnings - - * test-mem.c: avoid signedness warnings - -2005-05-27 Love Hörnquist Åstrand - - * hex.c: include "roken.h" to avoid undefined size_t/ssize_t - -2005-05-24 Dave Love - - * Makefile.am (snprintf_test_SOURCES): Add snprintf-test.h. - -2005-05-20 Love Hörnquist Åstrand - - * environment.c (rk_read_env_file): move assignment to later to - make pre c99 compiler happy - -2005-05-18 Love Hörnquist Åstrand - - * strptime.c: use english spelling of March - -2005-05-17 Johan Danielsson - - * Makefile.am: only link with dblib if we need it - - * Makefile.am: add test_readenv - - * test-readenv.c: test for read_environment() - - * environment.c: eliminate duplicates - -2005-05-13 Love Hörnquist Åstrand - - * issuid.c (issuid): change the #ifdef order to avoid unreachable - code warning. - -2005-05-10 Dave Love - - * roken.h.in: Get daemon declared on Solaris (it's in unistd.h but - masked by a feature test), just to avoid a warning, since it has - int args. Include err.h unconditionally, since it's always - supplied. - -2005-05-04 Dave Love - - * snprintf-test.c: Include snprintf-test.h earlier. - -2005-05-03 Dave Love - - * snprintf.c: Include snprintf-test.h earlier. - - * test-mem.c: Add member fd to map. - (rk_test_mem_alloc, rk_test_mem_free): Use it. - -2005-04-30 Love Hörnquist Åstrand - - * getifaddrs.c: add break on default: statements, from Douglas - E. Engert - - * snprintf.c (vsnprintf): don't write the NUL into the string if - the length was 0 - - * snprintf-test.c: add check that snprintf doesn't write the NUL - into the last byte when its a zero length input string - - * parse_time-test.c: Include . - -2005-04-27 Love Hörnquist Åstrand - - * parse_time-test.c: improve testing - - * roken-common.h: add rk_realloc - - * Makefile.am: add realloc - - * realloc.c: add rk_realloc, unbroken version of realloc - -2005-04-26 Dave Love - - * getusershell.c: Include roken.h - -2005-04-18 Love Hörnquist Åstrand - - * unvis.c: cast to unsigned char to make sure its not negative - when passing it to is* functions - - * strptime.c: cast to unsigned char to make sure its not negative - when passing it to to* functions - -2005-04-13 Love Hörnquist Åstrand - - * simple_exec.c: don't close stderr, close all fd that is num 3 - and larger - - * simple_exec.c (pipe_execv): use closefrom - - * add closefrom - -2005-04-12 Love Hörnquist Åstrand - - * add ROKEN_LIB_FUNCTION to all exported functions - -2005-04-10 Love Hörnquist Åstrand - - * resolve-test.c: print DS - -2005-04-07 Love Hörnquist Åstrand - - * parse_time-test.c: remove unused variable - -2005-04-04 Love Hörnquist Åstrand - - * strpftime-test.c: print size_t by casting to unsigned long - - * base64-test.c: print size_t by casting to unsigned long - - * hex-test.c: print size_t by casting to unsigned long - - * resolve-test.c: print size_t by casting to unsigned long - -2005-04-01 Love Hörnquist Åstrand - - * snprintf-test.c (try): reset va_list argument between reuse, - from Peter Kruty - -2005-03-30 Love Hörnquist Åstrand - - * roken_gethostby.c (roken_gethostby): s/sin/addr/ to avoid - shadowing - - * resolve.c (dns_lookup_int): s/stat/state/ to avoid shadowing - - * parse_units.c: avoid shadowing div - -2005-03-26 Love Hörnquist Åstrand - - * snprintf.c: use defined(TEST_SNPRINTF) like on all other places - in the same file - -2005-03-21 Love Hörnquist Åstrand - - * hex.c: check for overflows - -2005-03-18 Love Hörnquist Åstrand - - * vis.c: use RCSID instead of __RCSID - -2005-03-06 Love Hörnquist Åstrand - - * Makefile.am: check_PROGRAMS += hex-test - - * hex-test.c: hex encoding/decoding test - - * hex.c: fix decodeing, it processed to much data and thus - returned the wrong length - -2005-03-04 Love Hörnquist Åstrand - - * Makefile.am: add hex.[ch] - - * hex.c: add hex encoder/decoder - -2005-03-02 Love Hörnquist Åstrand - - * daemon.c fnmatch.c fnmatch.hin getcap.c getopt.c getusershell.c - glob.c glob.hin iruserok.c unvis.c vis.hin: - - In 1997, the University of California, Berkeley issued a statement - retroactively relicensing all code held under their copyright from - a 4-clause 'traditional' BSD license to a new 3-clause 'revised' - BSD license, which removed the advertising clause. - - From NetBSD, via Joel Baker, and Alistair G. Crooks - - * getaddrinfo-test.c: remove stray ( in output - - * vis.c: Update new revision from NetBSD (copyright update) - -2005-02-24 Love Hörnquist Åstrand - - * Makefile.am: bump version to 17:0:1 - -2005-01-19 Dave Love - - * getusershell.c: Include ctype.h, cast argument to isspace to - unsigned char. - -2004-10-31 Love Hörnquist Åstrand - - * parse_time.3, parse_units.c: Change the behavior of the - parse_unit code to return the number of bytes needed to print the - whole string (minus the trailing '\0'), just like snprintf. Idea - from bugreport from Gabriel Kihlman . - - * parse_time-test.c Makefile.am test-mem.c test-mem.h: test parse_time - -2004-10-16 Love Hörnquist Åstrand - - * resolve.c: put dns_type_to_string and dns_string_to_type in the - abi - - * resolve.c: add ds_record - - * resolve.h: add ds_record - -2004-10-06 Love Hörnquist Åstrand - - * ndbm_wrap.c: undefine open so this works on solaris with large - file support From netbsd's pkgsrc via Gavan Fantom - -2004-09-13 Love Hörnquist Åstrand - - * resolve-test.c: add --version/--help - -2004-09-12 Love Hörnquist Åstrand - - * Makefile.am: make resolve-test a noinst program - -2004-09-11 Love Hörnquist Åstrand - - * resolve-test.c: test program for libroken resolve from resolve.c - - * Makefile.am: add resolve-test - - * resolve.h: add constant for max DNS protocol packet size - - * resolve.c (dns_lookup_int): grow the answer buffer to the size - the server send to us if the answer buffer was too small (limited - to the dns protocol max packet size) - -2004-08-26 Johan Danielsson - - * err.hin: no need to declare __progname here - - * Makefile.am: always clean generated headers - -2004-06-26 Love Hörnquist Åstrand - - * rtbl.3: use .In for header, remove trailing space - -2004-06-23 Johan Danielsson - - * rtbl.h: add protos and macros - - * rtbl.c: implement a bunch of stuff: - - column separator (instead of global column prefix) - - per column suffix - - indexing columns by id-number instead of column header - - optional header supression (via settable flags) - - ability to end a row - - don't extend last column to full width - -2004-06-20 Love Hörnquist Åstrand - - * resolve.[ch]: add and use and bind9 version of rr type - (rk_ns_t_XXX) instead of the old bind4 version (T_XXX) - -2004-05-25 Love Hörnquist Åstrand - - * resolve.c (stot): add AAAA - -2004-02-17 Love Hörnquist Åstrand - - * getarg.c (add_string): catch error from realloc - -2004-02-12 Love Hörnquist Åstrand - - * roken-common.h: add simple_execve_timed - - * roken-common.h: add timed simple_exec - - * simple_exec.c: add timed simple_exec - -2004-01-05 Love Hörnquist Åstrand - - * gai_strerror.c: correct ifdef for EAI_ADDRFAMILY - -2003-12-14 Love Hörnquist Åstrand - - * resolve.c: parse dns header, add support for SSHFP - - * resolve.h: add cpp rewrite for sshfp_record - - * resolve.h: add SSHFP, clean up the the dns_header - -2003-12-14 Love Hörnquist Åstrand - - * resolve.h: remove HEADER (only used for crays) - - * resolve.c: number-of fields no longer stored in network order - -2003-12-13 Love Hörnquist Åstrand - - * resolve.c: remove depency on c99 types in resolv.h - - * resolve.h: remove depency on c99 types - -2003-12-06 Love Hörnquist Åstrand - - * resolv.h: add more T_ types and inline the dns headers, all this - for bind9 resolvers - -2003-12-02 Love Hörnquist Åstrand - - * gai_strerror.c: EAI_ADDRFAMILY and EAI_NODATA is deprecated - - * roken-common.h: use EAI_NONAME instead of EAI_ADDRFAMILY to - check for if we need EAI_ macros - -2003-10-04 Love Hörnquist Åstrand - - * strptime.c: let t and n match zero or more whitespaces - -2003-08-29 Love Hörnquist Åstrand - - * ndbm_wrap.c: patch for working with DB4 on heimdal-discuss - From: Luke Howard - -2003-08-27 Johan Danielsson - - * Makefile.am: don't include discovered files in EXTRA_SOURCES; - don't depend on all header files, just the built ones - -2003-08-15 Johan Danielsson - - * emalloc.3: manpage - -2003-07-11 Love - - * resolve.c: AIX have broken res_nsearch() in 5.1 (5.0 also ?) so - just don't use res_nsearch on AIX - -2003-06-29 Johan Danielsson - - * snprintf.c: * don't ever print sign for unsigned conversions * - don't break when right justifying a number past the end of the - buffer * handle zero precision and the value zero more correctly - -2003-06-14 Love - - * glob.hin: prefix glob symbols with rk_ - -2003-04-22 Love - - * resolve.c: copy NUL too, from janj@wenf.org via openbsd - -2003-04-16 Love - - * parse_units.h: remove typedef for units to avoid problems with - shadowing - - * resolve.c: use strlcpy, from openbsd - - * getcap.c: use strlcpy, from openbsd - - * getarg.3: Change .Fd #include to .In header.h - from Thomas Klausner - -2003-04-15 Love - - * socket.c (socket_set_tos): if setsockopt failed with EINVAL - failed, just ignore it, sock was probably a just a non AF_INET - socket - -2003-04-14 Love - - * strncasecmp.c: cast argument to toupper to unsigned char, from - Christian Biere via NetBSD - - * strlwr.c: cast argument to tolower to unsigned char, from - Christian Biere via NetBSD - - * strcasecmp.c: cast argument to toupper to unsigned char, from - Christian Biere via NetBSD - -2003-03-19 Love - - * getarg.3: spelling, from - -2003-03-07 Love - - * parse_bytes.c: use struct units instead of units - - * parse_time.c: use struct units instead of units - -2003-03-04 Love - - * roken.awk: use full prototype for main - -2002-10-15 Johan Danielsson - - * resolve.c: check length of txt records - -2002-09-10 Johan Danielsson - - * roken.awk: include config.h before stdio.h (breaks with - _FILE_OFFSET_BITS on solaris otherwise) - -2002-09-09 Johan Danielsson - - * resolve.c: fix res_nsearch call, but don't use it for now, AIX5 - has a broken version that trashes memory - - * roken-common.h: fix typo in previous - - * roken-common.h: change IRIX == 4 to IRIX4 - -2002-09-04 Assar Westerlund - - * getifaddrs.c: remove some warnings from the linux-portion - - * getnameinfo_verified.c (getnameinfo_verified): handle the case - of forward but no backward DNS information, and also describe the - desired behaviour. from Love - -2002-09-04 Johan Danielsson - - * rtbl.c (rtbl_destroy): free whole table - - * resolve.c: use res_nsearch if we have it (from Larry Greenfield) - -2002-09-03 Assar Westerlund - - * getifaddrs.c: add Linux AF_NETLINK getifaddrs from Hideaki - YOSHIFUJI of the Usagi project - - * parse_reply-test.c: make this build and return 77 if there is no - mmap - - * Makefile.am (parse_reply-test): add - * parse_reply-test.c: add a test case for parse_reply reading past - the given buffer - * resolve.c (parse_reply): update the arguments to more reasonable - types. allow parse_reply-test to call it - -2002-08-28 Johan Danielsson - - * resolve.c (dns_srv_order): do alignment tricks with the random() - state (from NetBSD) - -2002-08-27 Assar Westerlund - - * resolve.c (parse_reply): verify the lengths (both external and - internal) are consistent and not too long - (dns_lookup_int): be conservative in the length sent in to to - parse_reply - -2002-08-26 Assar Westerlund - - * roken.h.in: add prototypes for str, unvis functions - * resolve.h: add fallback definition for T_AAAA - -2002-08-22 Johan Danielsson - - * roken.h.in: we may need a prototype for strndup - -2002-08-20 Johan Danielsson - - * roken.h.in: typedef ssize_t here - - * getarg.c: don't put Ns before comma - - * resolve.c: _res might not be available - - * localtime_r.c: include stdio.h and roken.h - - * strftime.c: only use altzone if we have it - - * roken-common.h: AI_NUMERICHOST needs special handling - - * strlcat.c: add some consistency checks - - * strlcpy.c: make the logic simpler, and handle dst_sz == 0 - -2002-08-19 Johan Danielsson - - * resolve.h: prefix these functions to avoid conflicts with other - packages - -2002-08-14 Johan Danielsson - - * strsep_copy.c: don't write to buf if len == 0 - -2002-05-31 Assar Westerlund - - * Makefile.am: *_LDADD: add LDADD, so that libroken is used - -2002-05-17 Johan Danielsson - - * xdbm.h: remove old dbm part - -2002-04-30 Johan Danielsson - - * ndbm_wrap.{c,h}: ndbm wrapper for newer db libraries - -2002-04-18 Johan Danielsson - - * roken.h.in: move mini_inetd protos to after addrinfo definition - - * snprintf.c (append_number): make rep const - - * getarg.h: rename optind and optarg to avoid some gcc warnings - - * getarg.c: rename optind and optarg to avoid some gcc warnings - -2002-02-18 Johan Danielsson - - * mini_inetd.c: mini_inetd_addrinfo that takes an addrinfo instead - of a port number - -2001-11-30 Assar Westerlund - - * getifaddrs.c: support SIOCGLIFCONF and SIOCGLIFFLAGS which are - used on Solaris 8 to retrieve addresses larger than `struct - sockaddr'. From Magnus Ahltorp (with some - modifications by me) - -2001-10-27 Assar Westerlund - - * Makefile.am (libroken_la_LDFLAGS): set version to 15:0:6 - -2001-10-22 Assar Westerlund - - * localtime_r.c: add - -2001-10-02 Johan Danielsson - - * resolve.c (dns_srv_order): don't try to return a value - -2001-09-24 Johan Danielsson - - * snprintf.c: va_{start,end} fixes; from Thomas Klausner - -2001-09-20 Assar Westerlund - - * resolve.c (dns_srv_order): make sure of not reading after the - array - -2001-09-17 Assar Westerlund - - * Makefile.am (libroken_la_LDFLAGS): bump to 14:4:5 - * snprintf.c: rename 'struct state' -> 'struct snprintf_test' to - avoid collision with resolv.h on aix - -2001-09-04 Assar Westerlund - - * parse_bytes-test.c, parse_bytes.c, parse_bytes.h, parse_units.c, - parse_units.h: use int instead of size_t as return values to be - compatible with snprintf - - * strftime.c (strftime): check for return values from snprintf() < - 0 - -2001-09-03 Johan Danielsson - - * socket.c: restrict is a keyword - -2001-09-03 Assar Westerlund - - * write_pid.c: handle atexit or on_exit - - * Makefile.am (EXTRA_libroken_la_SOURCES): add vis.hin to help - solaris make - -2001-08-30 Johan Danielsson - - * Makefile.am: use LDADD directly - -2001-08-28 Assar Westerlund - - * Makefile.am (libroken_la_LDFLAGS): set to 14:3:5 - - * issuid.c (issuid): call issetugid if it exists - -2001-08-24 Assar Westerlund - - * Makefile.am: make it play better with recent automake - -2001-08-21 Assar Westerlund - - * glob.c: provide a fallback for ARG_MAX. from - - * roken.h.in: remove all winsock.h - for now, it does more harm than good under cygwin and if it should be - used, the correct conditional needs to be found - from - -2001-08-17 Johan Danielsson - - * getaddrinfo.c: include a definition of in6addr_loopback if it - doesn't exist - -2001-08-10 Assar Westerlund - - * Makefile.am (libroken_la_LDFLAGS): update to 14:2:5 - -2001-08-08 Assar Westerlund - - * hstrerror.c: move h_errno to its own file (h_errno.c) - -2001-08-04 Assar Westerlund - - * Makefile.am: add getarg.3 - -2001-08-01 Assar Westerlund - - * mini_inetd.c (mini_inetd): explicitly use PF_UNSPEC. be more - resilient to bind/listen failing. - -2001-07-31 Assar Westerlund - - * getifaddrs.c (getifaddrs2): remove unused variables - -2001-07-31 Assar Westerlund - - * Makefile.am (libroken_la_LDFLAGS): update version to 14:1:5 - -2001-07-23 Assar Westerlund - - * getarg.c (arg_match_long): fix parsing of arg_counter optional - argument - -2001-07-19 Assar Westerlund - - * Makefile.am (libroken_la_LDFLAGS): bump version to 14:0:5 - -2001-07-17 Assar Westerlund - - * snprintf-test.h: add a file with renaming of the snprintf - functions, to be used for running the tests - -2001-07-11 Assar Westerlund - - * snprintf-test.c: add more %X tests, and long and conditional - long long tests - * snprintf.c: add support for printing long long (if available) - -2001-07-10 Assar Westerlund - - * getaddrinfo.c (add_hostent): adapt to const hostent_find_fqdn - * hostent_find_fqdn.c (hostent_find_fqdn): const-ize - -2001-07-09 Assar Westerlund - - * roken-common.h (hostent_find_fqdn): add - * hostent_find_fqdn.c: separate out hostent_find_fqdn - - * warnerr.c: move out getprogname, setprogname - -2001-07-03 Assar Westerlund - - * warnerr.c (setprogname): add const cast - * vis.c (SVIS): add some (unsigned char) before calling isfoo* - * Makefile.am (libroken_la_LDFLAGS:) set version to 13:0:4 - - * Makefile.am: add snprintf_test - * snprintf.c: rewrite so that it does not stop as soon as there - are no more characters to print, we need to figure out how long - the string would have to be. this also fixes snprintf(NULL, 0 - -2001-06-21 Assar Westerlund - - * simple_exec.c (pipe_execv): remove unused variable - -2001-06-20 Johan Danielsson - - * getdtablesize.c: fix typo in obviously never used sysctl case - - * simple_exec.c: rename check_status to wait_for_process, and - export it; function pipe_execv similar to popen, but with more - control over input and output - - * roken-common.h: prototypes for wait_for_process and pipe_execv - -2001-06-17 Assar Westerlund - - * roken-common.h: move emalloc et al to roken.h.in - * Makefile.am: make emalloc,ecalloc,erealloc,estrdup conditional - * emalloc.c, erealloc.c, estrup.c: use errx, since errno might not - be set reliably - * ecalloc.c: add for symmetry - -2001-06-09 Johan Danielsson - - * resolve.c: dns_srv_order to order srv records - -2001-06-08 Johan Danielsson - - * getarg.c: Grog tries to figure out if to use mdoc.old instead of - mdoc by looking at some macros that were only present in the old - version, and by looking at the number of .Oo's present. In - mdoc.old .Oo was a toggle, but in mdoc it's closed by .Oc, so if - the number of .Oo's is bigger than the number of .Oc's, it figures - it must be mdoc.old. This doesn't however account for called Oc's, - and thus grog thinks that valid pages are mdoc.old when they - infact are mdoc. So let's make sure that Oc's are not called by - other macros. - -2001-05-29 Assar Westerlund - - * base64-test.c (main): initialize numerr - -2001-05-28 Johan Danielsson - - * base64.c: clean up the decode mess somewhat - - * base64-test.c: base64 tests - -2001-05-18 Johan Danielsson - - * roken.h.in: just use standard C types with bswap* - - * bswap.c: just use standard C types - -2001-05-17 Assar Westerlund - - * roken.h.in: include all the headers that AC_GROK_TYPES tries for - finding u_int17_t et al - - * Makefile.am: bump version to 12:0:3 - * roken.h.in: re-add set_progname and get_progname for backwards - compatability - * warnerr.c: re-add set_progname and get_progname for backwards - compatability - -2001-05-12 Assar Westerlund - - * glob.c: add limits.h, from - -2001-05-11 Johan Danielsson - - * Makefile.am: bswap.c - - * bswap.c: bswap{16,32} - -2001-05-08 Assar Westerlund - - * freeaddrinfo.c (freeaddrinfo): also free every `struct - addrinfo'. from - -2001-04-25 Assar Westerlund - - * getarg.h (free_getarg_strings): add prototype - * getarg.c (free_getarg_strings): add function - -2001-04-21 Johan Danielsson - - * getarg.c: pack short flag options togther, to shorten the usage - string - -2001-04-17 Johan Danielsson - - * getifaddrs.c (getifaddrs2): close socket when done - -2001-03-26 Johan Danielsson - - * roken.awk: END has to be last with Sun's awk - -2001-03-26 Assar Westerlund - - * parse_units.c (parse_something): do not check the return value - from strtod, it might return != 0.0 when the string has no digits. - just testing if it consumed any characters is enough and more - resilient - * glob.c: add GLOB_LIMIT (from NetBSD) - -2001-02-20 Assar Westerlund - - * warnerr.c (warnerr): do not use __progname - * roken.h.in (setprogname, getprogname): add prototypes - * warnerr.c (setprogname, getprogname): rename to. change all - callers - -2001-02-12 Assar Westerlund - - * getnameinfo_verified.c (getnameinfo_verified): do the first - getnameinfo with NI_NUMERICSERV to avoid the error that bind 8.2.3 - reports on not finding the service - (ENI_NOSERVNAME). reported by Ake Sandgren - -2001-02-09 Assar Westerlund - - * getnameinfo.c (doit): call inet_ntop with correct af, noted by - Ake Sandgren - -2001-02-08 Assar Westerlund - - * getnameinfo_verified.c (getnameinfo_verified): always capture - the service from getnameinfo so it can be sent back to getaddrinfo - and set socktype to avoid getaddrinfo not returning any addresses - -2001-01-30 Assar Westerlund - - * Makefile.am (libroken_la_LDFLAGS): bump version to 11:1:2 - * print_version.c (print_version): add 2001 - -2001-01-29 Assar Westerlund - - * getifaddrs.c (getifaddrs2): copy the entire sockaddr - - * roken-common.h (_PATH_BSHELL): add - -2001-01-27 Assar Westerlund - - * roken.h.in: move __attribute__ to roken-common.h - - * esetenv.c (esetenv): cast to handle a setenv that takes a `char - * which is the case on Unicos - -2000-12-29 Assar Westerlund - - * Makefile.am (EXTRA_libroken_la_SOURCES): ifaddrs.h -> - ifaddrs.hin - -2000-12-25 Assar Westerlund - - * getarg.c (print_arg): add a case for arg_strings - -2000-12-15 Johan Danielsson - - * snprintf.c (append_string): handle NULL strings by printing - `(null)' - -2000-12-12 Johan Danielsson - - * roken-common.h: add c++ externs - - * roken.h.in: fix last commit differently - -2000-12-11 Assar Westerlund - - * err.hin (warnerr): remove, it's not part of the err.h interface - * roken-common.h (warnerr): moved here from err.hin - * Makefile.am (libroken_la_LDFLAGS): set version to 11:0:2 - * vis.c: s/u_int32_t/unsigned/ for systems that do not define - u_int32_t - -2000-12-10 Johan Danielsson - - * Makefile.am: rename some headers to avoid conflict with possible - system headers - -2000-12-06 Johan Danielsson - - * vis.c: make sure _DIAGASSERT is defined - - * unvis.c: make sure _DIAGASSERT is defined - - * Makefile.am: unvis.c, and vis.h - - * vis.h: vis.h from NetBSD - - * unvis.c: unvis from NetBSD - - * roken.h.in: cleanup previous - - * roken-common.h: make `extern "C"' into a macro, this make emacs - much happier - - * vis.c: strvis implementation from NetBSD - - * roken.h.in: add prototypes for strvis* - -2000-12-05 Johan Danielsson - - * ifaddrs.h: fix freeifaddrs prototype, and add ifa_broadaddr - macro - - * getifaddrs.c: free some memory - -2000-12-04 Johan Danielsson - - * ifaddrs.h: getifaddrs implementation using SIOCGIFCONFIG etc - - * getifaddrs.c: getifaddrs implementation using SIOCGIFCONFIG etc - -2000-10-08 Assar Westerlund - - * mini_inetd.c (mini_inetd): check that fds are not too large to - select on - -2000-09-24 Assar Westerlund - - * esetenv.c: new file/function - -2000-08-16 Assar Westerlund - - * Makefile.am: bump version to 10:0:1 - -2000-08-10 Assar Westerlund - - * mini_inetd.c (accept_it): type-correctness on parameters to - accept - -2000-08-07 Johan Danielsson - - * roken.h.in: add proto compat for getsockname - -2000-08-04 Johan Danielsson - - * write_pid.c: conditionalise pidfile - - * write_pid.c: add pidfile function - -2000-07-25 Johan Danielsson - - * Makefile.am: bump version to 9:0:0 - - * warnerr.c: add get_progname - -2000-07-24 Assar Westerlund - - * getaddrinfo.c (add_hostent): if there's no fqdn in `he' try - reverse resolving to see if there's a fuller name there. don't - use just-freed memory - -2000-07-22 Assar Westerlund - - * xdbm.h: do not define ndbm functions in terms of dbm functions - if we're using db - -2000-07-20 Assar Westerlund - - * rtbl.c (rtbl_format): avoid printing an empty row at the end - -2000-07-19 Johan Danielsson - - * Makefile.am: make this compatible with `make dist' - - * Makefile.am: revert version number for now - -2000-07-18 Johan Danielsson - - * configure.in: AM_PROG_LIBTOOL -> AC_PROG_LIBTOOL - -2000-07-17 Johan Danielsson - - * Makefile.am: set ACLOCAL_AMFLAGS - -2000-07-15 Johan Danielsson - - * getaddrinfo_hostspec.c: add new function that takes socktype - hint as parameter - -2000-07-09 Assar Westerlund - - * rtbl.c (rtbl_add_column): initialize `col' completely - - * configure.in: bring headers and functions more in-line with - what's actually being used - -2000-07-08 Johan Danielsson - - * roken.h.in: declare ether_addr and sockaddr_dl for AIX - - * rtbl.{c,h}: simple table functions - -2000-07-08 Assar Westerlund - - * configure.in (AM_INIT_AUTOMAKE): bump version to 10 - * configure.in (AC_BROKEN): add strsep_copy - * Makefile.am (ACLOCAL): fetch files from cf - -2000-07-01 Assar Westerlund - - * roken-common.h (pid_file_*): fix protos - -2000-06-28 Assar Westerlund - - * getnameinfo_verified.c (getnameinfo_verified): free memory - returned from getaddrinfo - -2000-06-27 Assar Westerlund - - * resolve.c: export string_to_type and type_to_string - * resolve.c: add key,sig,cert update test-program - * resolve.h: add key,sig,cert - -2000-06-21 Assar Westerlund - - * resolve.h: add T_SIG, T_KEY - * resolve.c: add SIG and KEY - * Makefile.am (libroken_la_SOURCES): add environment.c and - write_pid.c - - * write_pid.c: new file for writing a pid file. - - * environment.c: new file with functionality for reading - /etc/environment. From Ake Sandgren - -2000-06-12 Johan Danielsson - - * strsep_copy.c: strsep, but with const stringp so returns string - in separate buffer - -2000-05-23 Assar Westerlund - - * vsyslog.c (vsyslog): calculate length of new format string - correctly - -2000-05-22 Johan Danielsson - - * getusershell.c: implment the AIX version use - /etc/security/login.cfg - -2000-05-21 Assar Westerlund - - * vsyslog.c (vsyslog): actually handle `%m' - -2000-05-15 Assar Westerlund - - * Makefile.am (libroken_la_LDFLAGS): set version to 8:1:3 - - * roken-common.h: moved __attribute__ to roken.h.in - -2000-04-14 Assar Westerlund - - * getaddrinfo_hostspec.c (roken_getaddrinfo_hostspec): copy the - correct length from `hostspec'. based on a patch from Love - - -2000-04-09 Assar Westerlund - - * xdbm.h: only include one of db.h and the dbm-series - -2000-04-05 Assar Westerlund - - * resolve.c (_resolve_debug): explicitly set to zero. this moves - the variable from bss to data and the dynamic linker on MacOS - X/Darwin seems unhappy with stuff in the bss segment. - -2000-04-03 Assar Westerlund - - * Makefile.am: set version to 8:0:3 - -2000-03-11 Assar Westerlund - - * roken.h.in (_SS_PAD1SIZE): try to write an inpenetrable - expression that also works on Crays - -2000-03-09 Assar Westerlund - - * getarg.c (arg_match_short): backup optind when there's a missing - argument so that the error can point at the flag and not the - non-existant argument - -2000-03-03 Assar Westerlund - - * Makefile.in (SOURCES): add timeval.c - * Makefile.am (libroken_la_SOURCES): add timeval.c - * timeval.c: new file - -2000-02-19 Assar Westerlund - - * Makefile.am: set version to 7:1:2 - -2000-02-16 Assar Westerlund - - * snprintf.c (PARSE_INT_FORMAT): note that shorts are actually - transmitted as ints - (according to the integer protomotion rules) in variable arguments - lists. Therefore, we should not call va_arg with short but rather - with int. See for - original bug report - -2000-02-13 Assar Westerlund - - * Makefile.am: bump version to 7:0:2 - - * getarg.c (mandoc_template): also fix no- prefix in .Sh OPTIONS - * getarg.c (mandoc_template): better man-stuff for negative - options - -2000-02-07 Assar Westerlund - - * Makefile.am: set version to 6:0:1 - -2000-02-06 Assar Westerlund - - * xdbm.h: hopefully catch a few more declarations by including - even if was found - -2000-01-26 Assar Westerlund - - * mini_inetd.c (mini_inetd): separate number of allocated sockets - and number of actual ones - * mini_inetd.c (mini_inetd): count sockets properly. and fail if - we cannot bind any - * mini_inetd.c (mini_inetd): make failing to create a socket - non-fatal - -2000-01-09 Assar Westerlund - - * Makefile.am(libroken_la_SOURCES): add strcollect.c - * Makefile.in: add strcollect.[co] - * simple_exec.c: use vstrcollect - * roken-common.h (_PATH_DEV): add - (strcollect, vstrcollect): add prototypes - * strcollect.c: new file. functions for collapsing an `va_list' - into an `char **' - -2000-01-06 Assar Westerlund - - * Makefile.am: bump version to 5:0:0 - -1999-12-30 Assar Westerlund - - * Makefile.am (strpftime_test_SOURCES): correct source file name - - * roken.h.in (sockaddr_storage): change padding so that we have - one char[] of pad and then an unsigned long[] (for alignment and - padding). this works much better in practice. - -1999-12-22 Assar Westerlund - - * roken.h.in (sockaddr_storage): drop leading underscore on - `public' fields. this was the consensus on the ipng mailing list - -1999-12-21 Assar Westerlund - - * Makefile.am (strpftime-test): define sources to avoid having - '.o' - * Makefile.am (print_version.h): use $(EXEEXT) - * Makefile.am (roken.h): add $(EXEEXT) to make this work on cygwin - et al - -1999-12-20 Assar Westerlund - - * Makefile.am (libroken_la_LDFLAGS): bump version to 4:3:0 - - * getaddrinfo.c (get_nodes): use getipnodebyname instead of - gethostbyname(2) - -1999-12-16 Assar Westerlund - - * Makefile.am (libroken_la_LDFLAGS): bump version to 4:2:0 - - * roken.h.in (struct sockaddr_storage): redefine with the example - code from rfc2553 - - * getaddrinfo.c (get_null): set loopback with correct endianess - for v4. dunno about v6. - -1999-12-13 Assar Westerlund - - * roken.h.in: add prototypes for str[pf]time - - * signal.c: macosx = rhapsody ~= nextstep also can't handle - various definitions of the same symbol. - -1999-12-12 Assar Westerlund - - * Makefile.am: bump version to 4:1:0 - -1999-12-06 Assar Westerlund - - * Makefile.am: bump version to 4:0:0 - -1999-12-05 Assar Westerlund - - * Makefile.in: replace inaddr2str with getnameinfo_verified - - * roken-common.h (INADDR_LOOPBACK): add fallback definition - - * roken-common.h: move getnameinfo_verified to roken.h.in - * roken.h.in (inaddr2str): remove - * Makefile.am (libroken_la_SOURCES); removed inaddr2str - * roken-common.h (getnameinfo_verified): add prototype - * getnameinfo_verified.c: new file - -1999-12-04 Assar Westerlund - - * roken-common.h: add constants for getaddrinfo, getnameinfo - * roken.h.in (socklen_t): make independent of sockaddr_storage - (AI_*, NI_*, EAI_*): move to roken-common.h - -1999-12-03 Assar Westerlund - - * mini_inetd.c (mini_inted): rewrite to use `getaddrinfo' - * getaddrinfo.c (const_v*): no sizeof(sizeof()) - * getaddrinfo.c (add_hostent): search for the canonical name among - all aliases - (getaddrinfo): handle AI_NUMERICHOST correctly - * Makefile.am (EXTRA_libroken_la_SOURCES): add freeaddinfo, - getaddrinfo, getnameinfo, gai_strerror - (getaddrinfo_test): add - * Makefile.in (SOURCES): add freeaddinfo, getaddrinfo, - getnameinfo, gai_strerror - (getaddrinfo_test): add - * roken.h.in: arpa/inet.h: include - (socklen_t): add - (struct addrinfo): add - (EAI_*): add - (NI_*): add - (AI_*): add - (getaddrinfo, getnameinfo, freeaddrinfo, gai_strerror): add - * getnameinfo.c: new file - * getaddrinfo-test.c: new file - * gai_strerror.c: new file - * getaddrinfo.c: new file - * freeaddrinfo.c: new file - -1999-11-25 Assar Westerlund - - * getopt.c (getopt): return -1 instead of EOF. From - - -1999-11-13 Assar Westerlund - - * 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 - - * 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 - - * 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 - - * Makefile.am: bump version to 3:2:0 - -1999-10-30 Assar Westerlund - - * snprintf.c (PARSE_INT_FORMAT): add redundant casts to work - around a gcc-bug that manifests itself on Linux-PPC. From Tom - Rini - -1999-10-28 Assar Westerlund - - * 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 - - * k_getpwuid.c (k_getpwuid): getspuid() does not exist (even - though it should), use getspnam(). - -1999-10-20 Assar Westerlund - - * Makefile.am: set version to 3:0:0 - -1999-10-18 Johan Danielsson - - * 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 - - * xdbm.h: undo last commit - - * xdbm.h: reorder db includes - -1999-10-10 Assar Westerlund - - * socket.c: const-ize and comment - - * net_write.c: const-ize - - * base64.c: const-ize - -1999-10-06 Assar Westerlund - - * getarg.c (getarg): also set optind when returning error - -1999-09-26 Assar Westerlund - - * Makefile.am: add parse_bytes.[ch] - -1999-09-24 Johan Danielsson - - * 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 - - * 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 - - * getcap.c: try to make this work on systems with DB - -1999-08-16 Johan Danielsson - - * getcap.c: protect from db-less systems - -1999-08-09 Johan Danielsson - - * simple_exec.c: add simple_exec{ve,le} - - * getcap.c: getcap from NetBSD - -1999-08-06 Assar Westerlund - - * roken.h.in (sockaddr_storage): cater for those that have - v6-support also - -1999-08-05 Assar Westerlund - - * inet_ntop.c (inet_ntop_v4): remember to call ntohl - -1999-08-04 Assar Westerlund - - * 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 - - * mini_inetd.c (socket_set_reuseaddr): remove duplicate - -1999-07-29 Assar Westerlund - - * mini_inetd.c (mini_inetd): fix my stupid bugs - -1999-07-28 Assar Westerlund - - * 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 - - * mini_inetd.c: support IPv6 - -1999-07-26 Assar Westerlund - - * 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 - - * roken.h.in (struct sockaddr_storage): define it needed - -1999-07-19 Assar Westerlund - - * Makefile.am (libroken_la_SOURCES): add copyhostent.c, - freehostent.c, getipnodebyname.c, getipnodebyaddr.c - - * roken.h.in: : 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 - - * 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 - - * roken.awk: use puts, as suggested by Jeffrey Hutzelman - - -1999-07-06 Assar Westerlund - - * readv.c (readv): typo - -1999-07-03 Assar Westerlund - - * 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 - - * 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 - - * 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 - - * xdbm.h: also try 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 - - * roken.h.in: include strsep prototype if needed - -Thu Apr 15 14:04:03 1999 Johan Danielsson - - * Makefile.am: make make-print-version.o depend on version.h - -Wed Apr 7 14:11:00 1999 Johan Danielsson - - * Makefile.am: make it compile w/o krb4 - -Sat Mar 27 17:33:03 1999 Johan Danielsson - - * snprintf.c (vasnprintf): correct check if realloc returns NULL - -Sat Mar 27 12:37:55 1999 Johan Danielsson - - * Makefile.am: link print_version with -ldes to avoid unresolved - references if -lkrb is shared - -Sat Mar 20 03:42:30 1999 Assar Westerlund - - * roken-common.h (eread, ewrite): add - - * simple_exec.c: add - -Fri Mar 19 21:29:58 1999 Assar Westerlund - - * 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 - - * Makefile.am: add version-info - -Thu Mar 18 12:53:32 1999 Johan Danielsson - - * 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 - - * Makefile.in (SOURCES): add glob.c - -Thu Mar 11 15:02:21 1999 Johan Danielsson - - * 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 - - * resolve.c: ugly fix for crays - -Mon Mar 8 11:52:20 1999 Johan Danielsson - - * roken.h.in: protos for {un,}setenv - -1999-02-16 Assar Westerlund - - * Makefile.in (SOURCES): add fnmatch - - * roken-common.h (abs): add - -Sat Feb 13 17:12:53 1999 Assar Westerlund - - * 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 - - * roken.h.in: mkstemp: add prototype - -1998-12-20 Assar Westerlund - - * 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 - - * 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 - - * resolve.c (stot): constify - (type_to_string): always declare - (dns_lookup_int): correct debug output - -Thu Nov 26 23:43:55 1998 Assar Westerlund - - * resolve.c (dns_lookup_int): send rr_class to res_search - -Thu Nov 26 17:09:47 1998 Johan Danielsson - - * resolve.c: some cleanup - - * resolve.h: add T_NAPTR - -Sun Nov 22 10:23:07 1998 Assar Westerlund - - * 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 - - * recvmsg.c (recvmsg): patch from bpreece@unity.ncsu.edu - -Fri Sep 4 16:29:27 1998 Johan Danielsson - - * vsyslog.c: asprintf -> vasprintf - -Tue Aug 18 22:25:52 1998 Assar Westerlund - - * 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 - - * Makefile.am: net_{read,write}.c - -Fri Jul 24 21:56:02 1998 Assar Westerlund - - * simple_exec.c (simple_execvp): loop around waitpid when errno == - EINTR - -Thu Jul 23 20:24:35 1998 Johan Danielsson - - * Makefile.am: net_{read,write}.c - -Wed Jul 22 21:38:35 1998 Assar Westerlund - - * simple_exec.c (simple_execlp): initialize `argv' - -Mon Jul 13 23:01:22 1998 Assar Westerlund - - * inaddr2str.c (inaddr2str): don't advance hostent->h_addr_list, - use a copy instead - -Fri Jul 10 01:20:08 1998 Assar Westerlund - - * 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 - - * 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 - - * getarg.c (mandoc_template): Put short and long options in - SYNOPSIS within the same [ ] pair. - -Sat May 30 00:13:01 1998 Johan Danielsson - - * 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 - - * 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 - - * roken.awk: stupid cray awk wants \# - -Fri May 1 01:29:36 1998 Assar Westerlund - - * 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 - - * roken.h.in: include paths.h - -Sun Apr 5 12:30:49 1998 Assar Westerlund - - * Makefile.in (SOURCES): add roken_gethostby.c to make solaris - make happy - -Thu Mar 19 20:41:25 1998 Johan Danielsson - - * simple_exec.c: Simple fork+exec system() replacement. - -Fri Mar 6 00:21:53 1998 Johan Danielsson - - * 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 - - * 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 - - * parse_time.c (print_time_table): don't return a void value. - -Tue Feb 3 11:06:24 1998 Johan Danielsson - - * 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 - - * getarg.c: Fix long form of negative flags. - -Mon Dec 29 23:31:10 1997 Johan Danielsson - - * roken.h.in: Include , to get linux __progname. - -Sun Dec 21 09:45:18 1997 Assar Westerlund - - * 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 - - * 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 - - * getarg.c: Add mandoc help back-end to getarg. - -Wed Nov 12 01:09:17 1997 Johan Danielsson - - * verr.c, verrx.c: Fix warnings by moving exit from. - -Tue Nov 11 21:12:09 1997 Johan Danielsson - - * 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 - - * roken.h: add - -Sun Nov 9 04:48:46 1997 Johan Danielsson - - * fnmatch.c: Add fnmatch from NetBSD - -Sun Nov 9 02:00:08 1997 Assar Westerlund - - * parse_units.c (parse_something): ignore white-space and ',' - -Mon Nov 3 22:38:32 1997 Assar Westerlund - - * 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 - - * roken.h: include and . - prototypes for readv and writev - - * readv.c, writev.c: new files - -Wed Oct 29 02:21:38 1997 Assar Westerlund - - * roken.h: Add ugly macros for openlog, gethostbyname, - gethostbyaddr, and getservbyname for the benefit of Crays. Add - default definition of MAXPATHLEN diff --git a/kerberosV/src/lib/roken/Makefile.am b/kerberosV/src/lib/roken/Makefile.am deleted file mode 100644 index 8becb04b5a6..00000000000 --- a/kerberosV/src/lib/roken/Makefile.am +++ /dev/null @@ -1,239 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:45 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -ACLOCAL_AMFLAGS = -I ../../cf - -CLEANFILES = roken.h make-roken.c $(XHEADERS) - -lib_LTLIBRARIES = libroken.la - -libroken_la_LDFLAGS = -version-info 19:0:1 -libroken_la_CPPFLAGS = -DBUILD_ROKEN_LIB - -if versionscript -libroken_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -endif - -AM_CPPFLAGS += $(libroken_la_CPPFLAGS) -if HAVE_DBHEADER -AM_CPPFLAGS += -I$(DBHEADER) -endif - -noinst_PROGRAMS = snprintf-test resolve-test rkpty - -check_PROGRAMS = \ - base64-test \ - getaddrinfo-test \ - getifaddrs-test \ - hex-test \ - test-readenv \ - parse_bytes-test \ - parse_reply-test \ - parse_time-test \ - snprintf-test \ - strpftime-test \ - tsearch-test - -TESTS = $(check_PROGRAMS) - -LDADD = libroken.la -make_roken_LDADD = - -noinst_LTLIBRARIES = libtest.la -libtest_la_SOURCES = strftime.c strptime.c snprintf.c tsearch.c -libtest_la_CFLAGS = -DTEST_SNPRINTF -DTEST_STRPFTIME - -parse_reply_test_SOURCES = parse_reply-test.c resolve.c -parse_reply_test_CFLAGS = -DTEST_RESOLVE - -test_readenv_SOURCES = test-readenv.c test-mem.c - -rkpty_LDADD = $(LIB_openpty) $(LDADD) - -parse_time_test_SOURCES = parse_time-test.c test-mem.c - -strpftime_test_SOURCES = strpftime-test.c strpftime-test.h -strpftime_test_LDADD = libtest.la $(LDADD) -strpftime_test_CFLAGS = -DTEST_STRPFTIME -snprintf_test_SOURCES = snprintf-test.c -snprintf_test_LDADD = libtest.la $(LDADD) -snprintf_test_CFLAGS = -DTEST_SNPRINTF -tsearch_test_SOURCES = tsearch-test.c -tsearch_test_LDADD = libtest.la $(LDADD) -tsearch_test_CFLAGS = -DTEST_TSEARCH - -resolve_test_SOURCES = resolve-test.c - -libroken_la_SOURCES = \ - base64.c \ - bswap.c \ - concat.c \ - cloexec.c \ - ct.c \ - doxygen.c \ - dumpdata.c \ - environment.c \ - eread.c \ - esetenv.c \ - ewrite.c \ - getaddrinfo_hostspec.c \ - get_default_username.c \ - get_window_size.c \ - getarg.c \ - getnameinfo_verified.c \ - getprogname.c \ - h_errno.c \ - hex.c \ - hostent_find_fqdn.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 \ - qsort.c \ - rand.c \ - realloc.c \ - resolve.c \ - roken_gethostby.c \ - rtbl.c \ - rtbl.h \ - setprogname.c \ - signal.c \ - simple_exec.c \ - snprintf.c \ - socket.c \ - strcollect.c \ - strerror_r.c \ - strpool.c \ - timeval.c \ - tm2time.c \ - unvis.c \ - verify.c \ - vis.c \ - warnerr.c \ - write_pid.c \ - xfree.c \ - xdbm.h - -EXTRA_libroken_la_SOURCES = \ - err.hin \ - glob.hin \ - fnmatch.hin \ - ifaddrs.hin \ - search.hin \ - vis.hin - -libroken_la_LIBADD = @LTLIBOBJS@ $(LIB_crypt) - -$(LTLIBOBJS) $(libroken_la_OBJECTS): roken.h $(XHEADERS) - -BUILT_SOURCES = roken.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 - -if have_ifaddrs_h -ifaddrs_h = -else -ifaddrs_h = ifaddrs.h -endif - -if have_search_h -search_h = -else -search_h = search.h -endif - -if have_vis_h -vis_h = -else -vis_h = vis.h -endif - -## these are controlled by configure -XHEADERS = $(err_h) $(fnmatch_h) $(glob_h) $(ifaddrs_h) $(search_h) $(vis_h) -CLEANFILES += err.h fnmatch.h glob.h ifaddrs.h search.h vis.h - -dist_include_HEADERS = \ - base64.h \ - getarg.h \ - hex.h \ - parse_bytes.h \ - parse_time.h \ - parse_units.h \ - resolve.h \ - roken-common.h \ - rtbl.h \ - xdbm.h - -if have_socket_wrapper -libroken_la_SOURCES += socket_wrapper.c socket_wrapper.h -dist_include_HEADERS += socket_wrapper.h -endif - -build_HEADERZ = test-mem.h $(XHEADERS) - -nodist_include_HEADERS = roken.h -rokenincludedir = $(includedir)/roken -nodist_rokeninclude_HEADERS = $(XHEADERS) - -man_MANS = getarg.3 parse_time.3 rtbl.3 ecalloc.3 - -SUFFIXES += .hin -.hin.h: - cp $< $@ - -# Make make-roken deprecated in 1.4 when we know that roken-h-process.pl works -if !CROSS_COMPILE - -noinst_PROGRAMS += make-roken -BUILT_SOURCES += make-roken.c - -nodist_make_roken_SOURCES = make-roken.c - -roken.h: make-roken$(EXEEXT) - @./make-roken$(EXEEXT) > 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 - -else - -roken.h: $(top_srcdir)/cf/roken-h-process.pl roken.h.in - perl $(top_srcdir)/cf/roken-h-process.pl \ - -c $(top_builddir)/include/config.h \ - -p $(srcdir)/roken.h.in -o roken.h - -endif - - -EXTRA_DIST = \ - NTMakefile \ - roken.awk roken.h.in \ - $(man_MANS) \ - test-mem.h \ - ndbm_wrap.c \ - ndbm_wrap.h \ - version-script.map diff --git a/kerberosV/src/lib/roken/Makefile.in b/kerberosV/src/lib/roken/Makefile.in deleted file mode 100644 index bedf75e038f..00000000000 --- a/kerberosV/src/lib/roken/Makefile.in +++ /dev/null @@ -1,2051 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:45 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:45 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:45 robert Exp $ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(am__dist_include_HEADERS_DIST) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog chown.c \ - closefrom.c copyhostent.c daemon.c ecalloc.c emalloc.c \ - erealloc.c err.c errx.c estrdup.c fchown.c flock.c fnmatch.c \ - freeaddrinfo.c freehostent.c gai_strerror.c getaddrinfo.c \ - getcap.c getcwd.c getdtablesize.c getegid.c geteuid.c getgid.c \ - gethostname.c getifaddrs.c getipnodebyaddr.c getipnodebyname.c \ - getnameinfo.c getopt.c gettimeofday.c getuid.c getusershell.c \ - glob.c hstrerror.c inet_aton.c inet_ntop.c inet_pton.c \ - initgroups.c innetgr.c install-sh iruserok.c localtime_r.c \ - lstat.c memmove.c missing mkinstalldirs 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 strsep_copy.c strtok_r.c strupr.c swab.c \ - timegm.c tsearch.c unsetenv.c verr.c verrx.c vsyslog.c vwarn.c \ - vwarnx.c warn.c warnx.c writev.c -@versionscript_TRUE@am__append_1 = $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map -@HAVE_DBHEADER_TRUE@am__append_2 = -I$(DBHEADER) -noinst_PROGRAMS = snprintf-test$(EXEEXT) resolve-test$(EXEEXT) \ - rkpty$(EXEEXT) $(am__EXEEXT_1) -check_PROGRAMS = base64-test$(EXEEXT) getaddrinfo-test$(EXEEXT) \ - getifaddrs-test$(EXEEXT) hex-test$(EXEEXT) \ - test-readenv$(EXEEXT) parse_bytes-test$(EXEEXT) \ - parse_reply-test$(EXEEXT) parse_time-test$(EXEEXT) \ - snprintf-test$(EXEEXT) strpftime-test$(EXEEXT) \ - tsearch-test$(EXEEXT) -@have_socket_wrapper_TRUE@am__append_3 = socket_wrapper.c socket_wrapper.h -@have_socket_wrapper_TRUE@am__append_4 = socket_wrapper.h - -# Make make-roken deprecated in 1.4 when we know that roken-h-process.pl works -@CROSS_COMPILE_FALSE@am__append_5 = make-roken -@CROSS_COMPILE_FALSE@am__append_6 = make-roken.c -subdir = lib/roken -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" \ - "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" \ - "$(DESTDIR)$(rokenincludedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -libroken_la_DEPENDENCIES = @LTLIBOBJS@ $(am__DEPENDENCIES_1) -am__libroken_la_SOURCES_DIST = base64.c bswap.c concat.c cloexec.c \ - ct.c doxygen.c dumpdata.c environment.c eread.c esetenv.c \ - ewrite.c getaddrinfo_hostspec.c get_default_username.c \ - get_window_size.c getarg.c getnameinfo_verified.c \ - getprogname.c h_errno.c hex.c hostent_find_fqdn.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 qsort.c rand.c \ - realloc.c resolve.c roken_gethostby.c rtbl.c rtbl.h \ - setprogname.c signal.c simple_exec.c snprintf.c socket.c \ - strcollect.c strerror_r.c strpool.c timeval.c tm2time.c \ - unvis.c verify.c vis.c warnerr.c write_pid.c xfree.c xdbm.h \ - socket_wrapper.c socket_wrapper.h -@have_socket_wrapper_TRUE@am__objects_1 = \ -@have_socket_wrapper_TRUE@ libroken_la-socket_wrapper.lo -am_libroken_la_OBJECTS = libroken_la-base64.lo libroken_la-bswap.lo \ - libroken_la-concat.lo libroken_la-cloexec.lo libroken_la-ct.lo \ - libroken_la-doxygen.lo libroken_la-dumpdata.lo \ - libroken_la-environment.lo libroken_la-eread.lo \ - libroken_la-esetenv.lo libroken_la-ewrite.lo \ - libroken_la-getaddrinfo_hostspec.lo \ - libroken_la-get_default_username.lo \ - libroken_la-get_window_size.lo libroken_la-getarg.lo \ - libroken_la-getnameinfo_verified.lo libroken_la-getprogname.lo \ - libroken_la-h_errno.lo libroken_la-hex.lo \ - libroken_la-hostent_find_fqdn.lo libroken_la-issuid.lo \ - libroken_la-k_getpwnam.lo libroken_la-k_getpwuid.lo \ - libroken_la-mini_inetd.lo libroken_la-net_read.lo \ - libroken_la-net_write.lo libroken_la-parse_bytes.lo \ - libroken_la-parse_time.lo libroken_la-parse_units.lo \ - libroken_la-qsort.lo libroken_la-rand.lo \ - libroken_la-realloc.lo libroken_la-resolve.lo \ - libroken_la-roken_gethostby.lo libroken_la-rtbl.lo \ - libroken_la-setprogname.lo libroken_la-signal.lo \ - libroken_la-simple_exec.lo libroken_la-snprintf.lo \ - libroken_la-socket.lo libroken_la-strcollect.lo \ - libroken_la-strerror_r.lo libroken_la-strpool.lo \ - libroken_la-timeval.lo libroken_la-tm2time.lo \ - libroken_la-unvis.lo libroken_la-verify.lo libroken_la-vis.lo \ - libroken_la-warnerr.lo libroken_la-write_pid.lo \ - libroken_la-xfree.lo $(am__objects_1) -libroken_la_OBJECTS = $(am_libroken_la_OBJECTS) -libroken_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libroken_la_LDFLAGS) $(LDFLAGS) -o $@ -libtest_la_LIBADD = -am_libtest_la_OBJECTS = libtest_la-strftime.lo libtest_la-strptime.lo \ - libtest_la-snprintf.lo libtest_la-tsearch.lo -libtest_la_OBJECTS = $(am_libtest_la_OBJECTS) -libtest_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libtest_la_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -@CROSS_COMPILE_FALSE@am__EXEEXT_1 = make-roken$(EXEEXT) -PROGRAMS = $(noinst_PROGRAMS) -base64_test_SOURCES = base64-test.c -base64_test_OBJECTS = base64-test.$(OBJEXT) -base64_test_LDADD = $(LDADD) -base64_test_DEPENDENCIES = libroken.la -getaddrinfo_test_SOURCES = getaddrinfo-test.c -getaddrinfo_test_OBJECTS = getaddrinfo-test.$(OBJEXT) -getaddrinfo_test_LDADD = $(LDADD) -getaddrinfo_test_DEPENDENCIES = libroken.la -getifaddrs_test_SOURCES = getifaddrs-test.c -getifaddrs_test_OBJECTS = getifaddrs-test.$(OBJEXT) -getifaddrs_test_LDADD = $(LDADD) -getifaddrs_test_DEPENDENCIES = libroken.la -hex_test_SOURCES = hex-test.c -hex_test_OBJECTS = hex-test.$(OBJEXT) -hex_test_LDADD = $(LDADD) -hex_test_DEPENDENCIES = libroken.la -@CROSS_COMPILE_FALSE@nodist_make_roken_OBJECTS = make-roken.$(OBJEXT) -make_roken_OBJECTS = $(nodist_make_roken_OBJECTS) -make_roken_DEPENDENCIES = -parse_bytes_test_SOURCES = parse_bytes-test.c -parse_bytes_test_OBJECTS = parse_bytes-test.$(OBJEXT) -parse_bytes_test_LDADD = $(LDADD) -parse_bytes_test_DEPENDENCIES = libroken.la -am_parse_reply_test_OBJECTS = \ - parse_reply_test-parse_reply-test.$(OBJEXT) \ - parse_reply_test-resolve.$(OBJEXT) -parse_reply_test_OBJECTS = $(am_parse_reply_test_OBJECTS) -parse_reply_test_LDADD = $(LDADD) -parse_reply_test_DEPENDENCIES = libroken.la -parse_reply_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(parse_reply_test_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -am_parse_time_test_OBJECTS = parse_time-test.$(OBJEXT) \ - test-mem.$(OBJEXT) -parse_time_test_OBJECTS = $(am_parse_time_test_OBJECTS) -parse_time_test_LDADD = $(LDADD) -parse_time_test_DEPENDENCIES = libroken.la -am_resolve_test_OBJECTS = resolve-test.$(OBJEXT) -resolve_test_OBJECTS = $(am_resolve_test_OBJECTS) -resolve_test_LDADD = $(LDADD) -resolve_test_DEPENDENCIES = libroken.la -rkpty_SOURCES = rkpty.c -rkpty_OBJECTS = rkpty.$(OBJEXT) -rkpty_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LDADD) -am_snprintf_test_OBJECTS = snprintf_test-snprintf-test.$(OBJEXT) -snprintf_test_OBJECTS = $(am_snprintf_test_OBJECTS) -snprintf_test_DEPENDENCIES = libtest.la $(LDADD) -snprintf_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(snprintf_test_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -am_strpftime_test_OBJECTS = strpftime_test-strpftime-test.$(OBJEXT) -strpftime_test_OBJECTS = $(am_strpftime_test_OBJECTS) -strpftime_test_DEPENDENCIES = libtest.la $(LDADD) -strpftime_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(strpftime_test_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -am_test_readenv_OBJECTS = test-readenv.$(OBJEXT) test-mem.$(OBJEXT) -test_readenv_OBJECTS = $(am_test_readenv_OBJECTS) -test_readenv_LDADD = $(LDADD) -test_readenv_DEPENDENCIES = libroken.la -am_tsearch_test_OBJECTS = tsearch_test-tsearch-test.$(OBJEXT) -tsearch_test_OBJECTS = $(am_tsearch_test_OBJECTS) -tsearch_test_DEPENDENCIES = libtest.la $(LDADD) -tsearch_test_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(tsearch_test_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libroken_la_SOURCES) $(EXTRA_libroken_la_SOURCES) \ - $(libtest_la_SOURCES) base64-test.c getaddrinfo-test.c \ - getifaddrs-test.c hex-test.c $(nodist_make_roken_SOURCES) \ - parse_bytes-test.c $(parse_reply_test_SOURCES) \ - $(parse_time_test_SOURCES) $(resolve_test_SOURCES) rkpty.c \ - $(snprintf_test_SOURCES) $(strpftime_test_SOURCES) \ - $(test_readenv_SOURCES) $(tsearch_test_SOURCES) -DIST_SOURCES = $(am__libroken_la_SOURCES_DIST) \ - $(EXTRA_libroken_la_SOURCES) $(libtest_la_SOURCES) \ - base64-test.c getaddrinfo-test.c getifaddrs-test.c hex-test.c \ - parse_bytes-test.c $(parse_reply_test_SOURCES) \ - $(parse_time_test_SOURCES) $(resolve_test_SOURCES) rkpty.c \ - $(snprintf_test_SOURCES) $(strpftime_test_SOURCES) \ - $(test_readenv_SOURCES) $(tsearch_test_SOURCES) -man3dir = $(mandir)/man3 -MANS = $(man_MANS) -am__dist_include_HEADERS_DIST = base64.h getarg.h hex.h parse_bytes.h \ - parse_time.h parse_units.h resolve.h roken-common.h rtbl.h \ - xdbm.h socket_wrapper.h -HEADERS = $(dist_include_HEADERS) $(nodist_include_HEADERS) \ - $(nodist_rokeninclude_HEADERS) -ETAGS = etags -CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .hin -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(libroken_la_CPPFLAGS) \ - $(am__append_2) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -ACLOCAL_AMFLAGS = -I ../../cf -CLEANFILES = roken.h make-roken.c $(XHEADERS) err.h fnmatch.h glob.h \ - ifaddrs.h search.h vis.h -lib_LTLIBRARIES = libroken.la -libroken_la_LDFLAGS = -version-info 19:0:1 $(am__append_1) -libroken_la_CPPFLAGS = -DBUILD_ROKEN_LIB -TESTS = $(check_PROGRAMS) -LDADD = libroken.la -make_roken_LDADD = -noinst_LTLIBRARIES = libtest.la -libtest_la_SOURCES = strftime.c strptime.c snprintf.c tsearch.c -libtest_la_CFLAGS = -DTEST_SNPRINTF -DTEST_STRPFTIME -parse_reply_test_SOURCES = parse_reply-test.c resolve.c -parse_reply_test_CFLAGS = -DTEST_RESOLVE -test_readenv_SOURCES = test-readenv.c test-mem.c -rkpty_LDADD = $(LIB_openpty) $(LDADD) -parse_time_test_SOURCES = parse_time-test.c test-mem.c -strpftime_test_SOURCES = strpftime-test.c strpftime-test.h -strpftime_test_LDADD = libtest.la $(LDADD) -strpftime_test_CFLAGS = -DTEST_STRPFTIME -snprintf_test_SOURCES = snprintf-test.c -snprintf_test_LDADD = libtest.la $(LDADD) -snprintf_test_CFLAGS = -DTEST_SNPRINTF -tsearch_test_SOURCES = tsearch-test.c -tsearch_test_LDADD = libtest.la $(LDADD) -tsearch_test_CFLAGS = -DTEST_TSEARCH -resolve_test_SOURCES = resolve-test.c -libroken_la_SOURCES = base64.c bswap.c concat.c cloexec.c ct.c \ - doxygen.c dumpdata.c environment.c eread.c esetenv.c ewrite.c \ - getaddrinfo_hostspec.c get_default_username.c \ - get_window_size.c getarg.c getnameinfo_verified.c \ - getprogname.c h_errno.c hex.c hostent_find_fqdn.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 qsort.c rand.c \ - realloc.c resolve.c roken_gethostby.c rtbl.c rtbl.h \ - setprogname.c signal.c simple_exec.c snprintf.c socket.c \ - strcollect.c strerror_r.c strpool.c timeval.c tm2time.c \ - unvis.c verify.c vis.c warnerr.c write_pid.c xfree.c xdbm.h \ - $(am__append_3) -EXTRA_libroken_la_SOURCES = \ - err.hin \ - glob.hin \ - fnmatch.hin \ - ifaddrs.hin \ - search.hin \ - vis.hin - -libroken_la_LIBADD = @LTLIBOBJS@ $(LIB_crypt) -BUILT_SOURCES = roken.h $(am__append_6) -@have_err_h_FALSE@err_h = err.h -@have_err_h_TRUE@err_h = -@have_fnmatch_h_FALSE@fnmatch_h = fnmatch.h -@have_fnmatch_h_TRUE@fnmatch_h = -@have_glob_h_FALSE@glob_h = glob.h -@have_glob_h_TRUE@glob_h = -@have_ifaddrs_h_FALSE@ifaddrs_h = ifaddrs.h -@have_ifaddrs_h_TRUE@ifaddrs_h = -@have_search_h_FALSE@search_h = search.h -@have_search_h_TRUE@search_h = -@have_vis_h_FALSE@vis_h = vis.h -@have_vis_h_TRUE@vis_h = -XHEADERS = $(err_h) $(fnmatch_h) $(glob_h) $(ifaddrs_h) $(search_h) $(vis_h) -dist_include_HEADERS = base64.h getarg.h hex.h parse_bytes.h \ - parse_time.h parse_units.h resolve.h roken-common.h rtbl.h \ - xdbm.h $(am__append_4) -build_HEADERZ = test-mem.h $(XHEADERS) -nodist_include_HEADERS = roken.h -rokenincludedir = $(includedir)/roken -nodist_rokeninclude_HEADERS = $(XHEADERS) -man_MANS = getarg.3 parse_time.3 rtbl.3 ecalloc.3 -@CROSS_COMPILE_FALSE@nodist_make_roken_SOURCES = make-roken.c -EXTRA_DIST = \ - NTMakefile \ - roken.awk roken.h.in \ - $(man_MANS) \ - test-mem.h \ - ndbm_wrap.c \ - ndbm_wrap.h \ - version-script.map - -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .hin .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/roken/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/roken/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libroken.la: $(libroken_la_OBJECTS) $(libroken_la_DEPENDENCIES) - $(libroken_la_LINK) -rpath $(libdir) $(libroken_la_OBJECTS) $(libroken_la_LIBADD) $(LIBS) -libtest.la: $(libtest_la_OBJECTS) $(libtest_la_DEPENDENCIES) - $(libtest_la_LINK) $(libtest_la_OBJECTS) $(libtest_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -base64-test$(EXEEXT): $(base64_test_OBJECTS) $(base64_test_DEPENDENCIES) - @rm -f base64-test$(EXEEXT) - $(LINK) $(base64_test_OBJECTS) $(base64_test_LDADD) $(LIBS) -getaddrinfo-test$(EXEEXT): $(getaddrinfo_test_OBJECTS) $(getaddrinfo_test_DEPENDENCIES) - @rm -f getaddrinfo-test$(EXEEXT) - $(LINK) $(getaddrinfo_test_OBJECTS) $(getaddrinfo_test_LDADD) $(LIBS) -getifaddrs-test$(EXEEXT): $(getifaddrs_test_OBJECTS) $(getifaddrs_test_DEPENDENCIES) - @rm -f getifaddrs-test$(EXEEXT) - $(LINK) $(getifaddrs_test_OBJECTS) $(getifaddrs_test_LDADD) $(LIBS) -hex-test$(EXEEXT): $(hex_test_OBJECTS) $(hex_test_DEPENDENCIES) - @rm -f hex-test$(EXEEXT) - $(LINK) $(hex_test_OBJECTS) $(hex_test_LDADD) $(LIBS) -make-roken$(EXEEXT): $(make_roken_OBJECTS) $(make_roken_DEPENDENCIES) - @rm -f make-roken$(EXEEXT) - $(LINK) $(make_roken_OBJECTS) $(make_roken_LDADD) $(LIBS) -parse_bytes-test$(EXEEXT): $(parse_bytes_test_OBJECTS) $(parse_bytes_test_DEPENDENCIES) - @rm -f parse_bytes-test$(EXEEXT) - $(LINK) $(parse_bytes_test_OBJECTS) $(parse_bytes_test_LDADD) $(LIBS) -parse_reply-test$(EXEEXT): $(parse_reply_test_OBJECTS) $(parse_reply_test_DEPENDENCIES) - @rm -f parse_reply-test$(EXEEXT) - $(parse_reply_test_LINK) $(parse_reply_test_OBJECTS) $(parse_reply_test_LDADD) $(LIBS) -parse_time-test$(EXEEXT): $(parse_time_test_OBJECTS) $(parse_time_test_DEPENDENCIES) - @rm -f parse_time-test$(EXEEXT) - $(LINK) $(parse_time_test_OBJECTS) $(parse_time_test_LDADD) $(LIBS) -resolve-test$(EXEEXT): $(resolve_test_OBJECTS) $(resolve_test_DEPENDENCIES) - @rm -f resolve-test$(EXEEXT) - $(LINK) $(resolve_test_OBJECTS) $(resolve_test_LDADD) $(LIBS) -rkpty$(EXEEXT): $(rkpty_OBJECTS) $(rkpty_DEPENDENCIES) - @rm -f rkpty$(EXEEXT) - $(LINK) $(rkpty_OBJECTS) $(rkpty_LDADD) $(LIBS) -snprintf-test$(EXEEXT): $(snprintf_test_OBJECTS) $(snprintf_test_DEPENDENCIES) - @rm -f snprintf-test$(EXEEXT) - $(snprintf_test_LINK) $(snprintf_test_OBJECTS) $(snprintf_test_LDADD) $(LIBS) -strpftime-test$(EXEEXT): $(strpftime_test_OBJECTS) $(strpftime_test_DEPENDENCIES) - @rm -f strpftime-test$(EXEEXT) - $(strpftime_test_LINK) $(strpftime_test_OBJECTS) $(strpftime_test_LDADD) $(LIBS) -test-readenv$(EXEEXT): $(test_readenv_OBJECTS) $(test_readenv_DEPENDENCIES) - @rm -f test-readenv$(EXEEXT) - $(LINK) $(test_readenv_OBJECTS) $(test_readenv_LDADD) $(LIBS) -tsearch-test$(EXEEXT): $(tsearch_test_OBJECTS) $(tsearch_test_DEPENDENCIES) - @rm -f tsearch-test$(EXEEXT) - $(tsearch_test_LINK) $(tsearch_test_OBJECTS) $(tsearch_test_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/chown.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/closefrom.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/copyhostent.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/daemon.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ecalloc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/emalloc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/erealloc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/err.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/errx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/estrdup.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fchown.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/flock.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fnmatch.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/freeaddrinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/freehostent.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gai_strerror.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getaddrinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getcap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getcwd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getdtablesize.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getegid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/geteuid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getgid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gethostname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getifaddrs.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getipnodebyaddr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getipnodebyname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getnameinfo.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/gettimeofday.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getuid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getusershell.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/glob.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hstrerror.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/inet_aton.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/inet_ntop.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/inet_pton.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/initgroups.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/innetgr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/iruserok.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/localtime_r.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lstat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memmove.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkstemp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/putenv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rcmd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/readv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/recvmsg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/sendmsg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setegid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/seteuid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasecmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strdup.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strftime.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strlcat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strlcpy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strlwr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strncasecmp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strndup.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strnlen.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strptime.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strsep.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strsep_copy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtok_r.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strupr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/swab.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/timegm.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tsearch.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/unsetenv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/verr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/verrx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vsyslog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vwarn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vwarnx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/warn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/warnx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/writev.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getaddrinfo-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getifaddrs-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hex-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-base64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-bswap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-cloexec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-concat.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-ct.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-doxygen.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-dumpdata.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-environment.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-eread.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-esetenv.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-ewrite.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-get_default_username.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-get_window_size.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-getaddrinfo_hostspec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-getarg.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-getnameinfo_verified.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-getprogname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-h_errno.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-hex.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-hostent_find_fqdn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-issuid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-k_getpwnam.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-k_getpwuid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-mini_inetd.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-net_read.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-net_write.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-parse_bytes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-parse_time.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-parse_units.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-qsort.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-rand.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-realloc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-resolve.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-roken_gethostby.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-rtbl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-setprogname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-signal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-simple_exec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-snprintf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-socket.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-socket_wrapper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-strcollect.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-strerror_r.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-strpool.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-timeval.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-tm2time.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-unvis.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-verify.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-vis.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-warnerr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-write_pid.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libroken_la-xfree.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_la-snprintf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_la-strftime.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_la-strptime.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtest_la-tsearch.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make-roken.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_bytes-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_reply_test-parse_reply-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_reply_test-resolve.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse_time-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rkpty.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf_test-snprintf-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strpftime_test-strpftime-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mem.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-readenv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsearch_test-tsearch-test.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -libroken_la-base64.lo: base64.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-base64.lo -MD -MP -MF $(DEPDIR)/libroken_la-base64.Tpo -c -o libroken_la-base64.lo `test -f 'base64.c' || echo '$(srcdir)/'`base64.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-base64.Tpo $(DEPDIR)/libroken_la-base64.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='base64.c' object='libroken_la-base64.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-base64.lo `test -f 'base64.c' || echo '$(srcdir)/'`base64.c - -libroken_la-bswap.lo: bswap.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-bswap.lo -MD -MP -MF $(DEPDIR)/libroken_la-bswap.Tpo -c -o libroken_la-bswap.lo `test -f 'bswap.c' || echo '$(srcdir)/'`bswap.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-bswap.Tpo $(DEPDIR)/libroken_la-bswap.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='bswap.c' object='libroken_la-bswap.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-bswap.lo `test -f 'bswap.c' || echo '$(srcdir)/'`bswap.c - -libroken_la-concat.lo: concat.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-concat.lo -MD -MP -MF $(DEPDIR)/libroken_la-concat.Tpo -c -o libroken_la-concat.lo `test -f 'concat.c' || echo '$(srcdir)/'`concat.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-concat.Tpo $(DEPDIR)/libroken_la-concat.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='concat.c' object='libroken_la-concat.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-concat.lo `test -f 'concat.c' || echo '$(srcdir)/'`concat.c - -libroken_la-cloexec.lo: cloexec.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-cloexec.lo -MD -MP -MF $(DEPDIR)/libroken_la-cloexec.Tpo -c -o libroken_la-cloexec.lo `test -f 'cloexec.c' || echo '$(srcdir)/'`cloexec.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-cloexec.Tpo $(DEPDIR)/libroken_la-cloexec.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cloexec.c' object='libroken_la-cloexec.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-cloexec.lo `test -f 'cloexec.c' || echo '$(srcdir)/'`cloexec.c - -libroken_la-ct.lo: ct.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-ct.lo -MD -MP -MF $(DEPDIR)/libroken_la-ct.Tpo -c -o libroken_la-ct.lo `test -f 'ct.c' || echo '$(srcdir)/'`ct.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-ct.Tpo $(DEPDIR)/libroken_la-ct.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ct.c' object='libroken_la-ct.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-ct.lo `test -f 'ct.c' || echo '$(srcdir)/'`ct.c - -libroken_la-doxygen.lo: doxygen.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-doxygen.lo -MD -MP -MF $(DEPDIR)/libroken_la-doxygen.Tpo -c -o libroken_la-doxygen.lo `test -f 'doxygen.c' || echo '$(srcdir)/'`doxygen.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-doxygen.Tpo $(DEPDIR)/libroken_la-doxygen.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='doxygen.c' object='libroken_la-doxygen.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-doxygen.lo `test -f 'doxygen.c' || echo '$(srcdir)/'`doxygen.c - -libroken_la-dumpdata.lo: dumpdata.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-dumpdata.lo -MD -MP -MF $(DEPDIR)/libroken_la-dumpdata.Tpo -c -o libroken_la-dumpdata.lo `test -f 'dumpdata.c' || echo '$(srcdir)/'`dumpdata.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-dumpdata.Tpo $(DEPDIR)/libroken_la-dumpdata.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dumpdata.c' object='libroken_la-dumpdata.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-dumpdata.lo `test -f 'dumpdata.c' || echo '$(srcdir)/'`dumpdata.c - -libroken_la-environment.lo: environment.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-environment.lo -MD -MP -MF $(DEPDIR)/libroken_la-environment.Tpo -c -o libroken_la-environment.lo `test -f 'environment.c' || echo '$(srcdir)/'`environment.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-environment.Tpo $(DEPDIR)/libroken_la-environment.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='environment.c' object='libroken_la-environment.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-environment.lo `test -f 'environment.c' || echo '$(srcdir)/'`environment.c - -libroken_la-eread.lo: eread.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-eread.lo -MD -MP -MF $(DEPDIR)/libroken_la-eread.Tpo -c -o libroken_la-eread.lo `test -f 'eread.c' || echo '$(srcdir)/'`eread.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-eread.Tpo $(DEPDIR)/libroken_la-eread.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eread.c' object='libroken_la-eread.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-eread.lo `test -f 'eread.c' || echo '$(srcdir)/'`eread.c - -libroken_la-esetenv.lo: esetenv.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-esetenv.lo -MD -MP -MF $(DEPDIR)/libroken_la-esetenv.Tpo -c -o libroken_la-esetenv.lo `test -f 'esetenv.c' || echo '$(srcdir)/'`esetenv.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-esetenv.Tpo $(DEPDIR)/libroken_la-esetenv.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='esetenv.c' object='libroken_la-esetenv.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-esetenv.lo `test -f 'esetenv.c' || echo '$(srcdir)/'`esetenv.c - -libroken_la-ewrite.lo: ewrite.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-ewrite.lo -MD -MP -MF $(DEPDIR)/libroken_la-ewrite.Tpo -c -o libroken_la-ewrite.lo `test -f 'ewrite.c' || echo '$(srcdir)/'`ewrite.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-ewrite.Tpo $(DEPDIR)/libroken_la-ewrite.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ewrite.c' object='libroken_la-ewrite.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-ewrite.lo `test -f 'ewrite.c' || echo '$(srcdir)/'`ewrite.c - -libroken_la-getaddrinfo_hostspec.lo: getaddrinfo_hostspec.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-getaddrinfo_hostspec.lo -MD -MP -MF $(DEPDIR)/libroken_la-getaddrinfo_hostspec.Tpo -c -o libroken_la-getaddrinfo_hostspec.lo `test -f 'getaddrinfo_hostspec.c' || echo '$(srcdir)/'`getaddrinfo_hostspec.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-getaddrinfo_hostspec.Tpo $(DEPDIR)/libroken_la-getaddrinfo_hostspec.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getaddrinfo_hostspec.c' object='libroken_la-getaddrinfo_hostspec.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-getaddrinfo_hostspec.lo `test -f 'getaddrinfo_hostspec.c' || echo '$(srcdir)/'`getaddrinfo_hostspec.c - -libroken_la-get_default_username.lo: get_default_username.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-get_default_username.lo -MD -MP -MF $(DEPDIR)/libroken_la-get_default_username.Tpo -c -o libroken_la-get_default_username.lo `test -f 'get_default_username.c' || echo '$(srcdir)/'`get_default_username.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-get_default_username.Tpo $(DEPDIR)/libroken_la-get_default_username.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='get_default_username.c' object='libroken_la-get_default_username.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-get_default_username.lo `test -f 'get_default_username.c' || echo '$(srcdir)/'`get_default_username.c - -libroken_la-get_window_size.lo: get_window_size.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-get_window_size.lo -MD -MP -MF $(DEPDIR)/libroken_la-get_window_size.Tpo -c -o libroken_la-get_window_size.lo `test -f 'get_window_size.c' || echo '$(srcdir)/'`get_window_size.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-get_window_size.Tpo $(DEPDIR)/libroken_la-get_window_size.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='get_window_size.c' object='libroken_la-get_window_size.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-get_window_size.lo `test -f 'get_window_size.c' || echo '$(srcdir)/'`get_window_size.c - -libroken_la-getarg.lo: getarg.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-getarg.lo -MD -MP -MF $(DEPDIR)/libroken_la-getarg.Tpo -c -o libroken_la-getarg.lo `test -f 'getarg.c' || echo '$(srcdir)/'`getarg.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-getarg.Tpo $(DEPDIR)/libroken_la-getarg.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getarg.c' object='libroken_la-getarg.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-getarg.lo `test -f 'getarg.c' || echo '$(srcdir)/'`getarg.c - -libroken_la-getnameinfo_verified.lo: getnameinfo_verified.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-getnameinfo_verified.lo -MD -MP -MF $(DEPDIR)/libroken_la-getnameinfo_verified.Tpo -c -o libroken_la-getnameinfo_verified.lo `test -f 'getnameinfo_verified.c' || echo '$(srcdir)/'`getnameinfo_verified.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-getnameinfo_verified.Tpo $(DEPDIR)/libroken_la-getnameinfo_verified.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getnameinfo_verified.c' object='libroken_la-getnameinfo_verified.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-getnameinfo_verified.lo `test -f 'getnameinfo_verified.c' || echo '$(srcdir)/'`getnameinfo_verified.c - -libroken_la-getprogname.lo: getprogname.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-getprogname.lo -MD -MP -MF $(DEPDIR)/libroken_la-getprogname.Tpo -c -o libroken_la-getprogname.lo `test -f 'getprogname.c' || echo '$(srcdir)/'`getprogname.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-getprogname.Tpo $(DEPDIR)/libroken_la-getprogname.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getprogname.c' object='libroken_la-getprogname.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-getprogname.lo `test -f 'getprogname.c' || echo '$(srcdir)/'`getprogname.c - -libroken_la-h_errno.lo: h_errno.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-h_errno.lo -MD -MP -MF $(DEPDIR)/libroken_la-h_errno.Tpo -c -o libroken_la-h_errno.lo `test -f 'h_errno.c' || echo '$(srcdir)/'`h_errno.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-h_errno.Tpo $(DEPDIR)/libroken_la-h_errno.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='h_errno.c' object='libroken_la-h_errno.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-h_errno.lo `test -f 'h_errno.c' || echo '$(srcdir)/'`h_errno.c - -libroken_la-hex.lo: hex.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-hex.lo -MD -MP -MF $(DEPDIR)/libroken_la-hex.Tpo -c -o libroken_la-hex.lo `test -f 'hex.c' || echo '$(srcdir)/'`hex.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-hex.Tpo $(DEPDIR)/libroken_la-hex.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hex.c' object='libroken_la-hex.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-hex.lo `test -f 'hex.c' || echo '$(srcdir)/'`hex.c - -libroken_la-hostent_find_fqdn.lo: hostent_find_fqdn.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-hostent_find_fqdn.lo -MD -MP -MF $(DEPDIR)/libroken_la-hostent_find_fqdn.Tpo -c -o libroken_la-hostent_find_fqdn.lo `test -f 'hostent_find_fqdn.c' || echo '$(srcdir)/'`hostent_find_fqdn.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-hostent_find_fqdn.Tpo $(DEPDIR)/libroken_la-hostent_find_fqdn.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hostent_find_fqdn.c' object='libroken_la-hostent_find_fqdn.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-hostent_find_fqdn.lo `test -f 'hostent_find_fqdn.c' || echo '$(srcdir)/'`hostent_find_fqdn.c - -libroken_la-issuid.lo: issuid.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-issuid.lo -MD -MP -MF $(DEPDIR)/libroken_la-issuid.Tpo -c -o libroken_la-issuid.lo `test -f 'issuid.c' || echo '$(srcdir)/'`issuid.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-issuid.Tpo $(DEPDIR)/libroken_la-issuid.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='issuid.c' object='libroken_la-issuid.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-issuid.lo `test -f 'issuid.c' || echo '$(srcdir)/'`issuid.c - -libroken_la-k_getpwnam.lo: k_getpwnam.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-k_getpwnam.lo -MD -MP -MF $(DEPDIR)/libroken_la-k_getpwnam.Tpo -c -o libroken_la-k_getpwnam.lo `test -f 'k_getpwnam.c' || echo '$(srcdir)/'`k_getpwnam.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-k_getpwnam.Tpo $(DEPDIR)/libroken_la-k_getpwnam.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='k_getpwnam.c' object='libroken_la-k_getpwnam.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-k_getpwnam.lo `test -f 'k_getpwnam.c' || echo '$(srcdir)/'`k_getpwnam.c - -libroken_la-k_getpwuid.lo: k_getpwuid.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-k_getpwuid.lo -MD -MP -MF $(DEPDIR)/libroken_la-k_getpwuid.Tpo -c -o libroken_la-k_getpwuid.lo `test -f 'k_getpwuid.c' || echo '$(srcdir)/'`k_getpwuid.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-k_getpwuid.Tpo $(DEPDIR)/libroken_la-k_getpwuid.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='k_getpwuid.c' object='libroken_la-k_getpwuid.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-k_getpwuid.lo `test -f 'k_getpwuid.c' || echo '$(srcdir)/'`k_getpwuid.c - -libroken_la-mini_inetd.lo: mini_inetd.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-mini_inetd.lo -MD -MP -MF $(DEPDIR)/libroken_la-mini_inetd.Tpo -c -o libroken_la-mini_inetd.lo `test -f 'mini_inetd.c' || echo '$(srcdir)/'`mini_inetd.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-mini_inetd.Tpo $(DEPDIR)/libroken_la-mini_inetd.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mini_inetd.c' object='libroken_la-mini_inetd.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-mini_inetd.lo `test -f 'mini_inetd.c' || echo '$(srcdir)/'`mini_inetd.c - -libroken_la-net_read.lo: net_read.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-net_read.lo -MD -MP -MF $(DEPDIR)/libroken_la-net_read.Tpo -c -o libroken_la-net_read.lo `test -f 'net_read.c' || echo '$(srcdir)/'`net_read.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-net_read.Tpo $(DEPDIR)/libroken_la-net_read.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='net_read.c' object='libroken_la-net_read.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-net_read.lo `test -f 'net_read.c' || echo '$(srcdir)/'`net_read.c - -libroken_la-net_write.lo: net_write.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-net_write.lo -MD -MP -MF $(DEPDIR)/libroken_la-net_write.Tpo -c -o libroken_la-net_write.lo `test -f 'net_write.c' || echo '$(srcdir)/'`net_write.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-net_write.Tpo $(DEPDIR)/libroken_la-net_write.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='net_write.c' object='libroken_la-net_write.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-net_write.lo `test -f 'net_write.c' || echo '$(srcdir)/'`net_write.c - -libroken_la-parse_bytes.lo: parse_bytes.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-parse_bytes.lo -MD -MP -MF $(DEPDIR)/libroken_la-parse_bytes.Tpo -c -o libroken_la-parse_bytes.lo `test -f 'parse_bytes.c' || echo '$(srcdir)/'`parse_bytes.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-parse_bytes.Tpo $(DEPDIR)/libroken_la-parse_bytes.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_bytes.c' object='libroken_la-parse_bytes.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-parse_bytes.lo `test -f 'parse_bytes.c' || echo '$(srcdir)/'`parse_bytes.c - -libroken_la-parse_time.lo: parse_time.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-parse_time.lo -MD -MP -MF $(DEPDIR)/libroken_la-parse_time.Tpo -c -o libroken_la-parse_time.lo `test -f 'parse_time.c' || echo '$(srcdir)/'`parse_time.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-parse_time.Tpo $(DEPDIR)/libroken_la-parse_time.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_time.c' object='libroken_la-parse_time.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-parse_time.lo `test -f 'parse_time.c' || echo '$(srcdir)/'`parse_time.c - -libroken_la-parse_units.lo: parse_units.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-parse_units.lo -MD -MP -MF $(DEPDIR)/libroken_la-parse_units.Tpo -c -o libroken_la-parse_units.lo `test -f 'parse_units.c' || echo '$(srcdir)/'`parse_units.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-parse_units.Tpo $(DEPDIR)/libroken_la-parse_units.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_units.c' object='libroken_la-parse_units.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-parse_units.lo `test -f 'parse_units.c' || echo '$(srcdir)/'`parse_units.c - -libroken_la-qsort.lo: qsort.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-qsort.lo -MD -MP -MF $(DEPDIR)/libroken_la-qsort.Tpo -c -o libroken_la-qsort.lo `test -f 'qsort.c' || echo '$(srcdir)/'`qsort.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-qsort.Tpo $(DEPDIR)/libroken_la-qsort.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='qsort.c' object='libroken_la-qsort.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-qsort.lo `test -f 'qsort.c' || echo '$(srcdir)/'`qsort.c - -libroken_la-rand.lo: rand.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-rand.lo -MD -MP -MF $(DEPDIR)/libroken_la-rand.Tpo -c -o libroken_la-rand.lo `test -f 'rand.c' || echo '$(srcdir)/'`rand.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-rand.Tpo $(DEPDIR)/libroken_la-rand.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rand.c' object='libroken_la-rand.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-rand.lo `test -f 'rand.c' || echo '$(srcdir)/'`rand.c - -libroken_la-realloc.lo: realloc.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-realloc.lo -MD -MP -MF $(DEPDIR)/libroken_la-realloc.Tpo -c -o libroken_la-realloc.lo `test -f 'realloc.c' || echo '$(srcdir)/'`realloc.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-realloc.Tpo $(DEPDIR)/libroken_la-realloc.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='realloc.c' object='libroken_la-realloc.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-realloc.lo `test -f 'realloc.c' || echo '$(srcdir)/'`realloc.c - -libroken_la-resolve.lo: resolve.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-resolve.lo -MD -MP -MF $(DEPDIR)/libroken_la-resolve.Tpo -c -o libroken_la-resolve.lo `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-resolve.Tpo $(DEPDIR)/libroken_la-resolve.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolve.c' object='libroken_la-resolve.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-resolve.lo `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c - -libroken_la-roken_gethostby.lo: roken_gethostby.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-roken_gethostby.lo -MD -MP -MF $(DEPDIR)/libroken_la-roken_gethostby.Tpo -c -o libroken_la-roken_gethostby.lo `test -f 'roken_gethostby.c' || echo '$(srcdir)/'`roken_gethostby.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-roken_gethostby.Tpo $(DEPDIR)/libroken_la-roken_gethostby.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='roken_gethostby.c' object='libroken_la-roken_gethostby.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-roken_gethostby.lo `test -f 'roken_gethostby.c' || echo '$(srcdir)/'`roken_gethostby.c - -libroken_la-rtbl.lo: rtbl.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-rtbl.lo -MD -MP -MF $(DEPDIR)/libroken_la-rtbl.Tpo -c -o libroken_la-rtbl.lo `test -f 'rtbl.c' || echo '$(srcdir)/'`rtbl.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-rtbl.Tpo $(DEPDIR)/libroken_la-rtbl.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtbl.c' object='libroken_la-rtbl.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-rtbl.lo `test -f 'rtbl.c' || echo '$(srcdir)/'`rtbl.c - -libroken_la-setprogname.lo: setprogname.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-setprogname.lo -MD -MP -MF $(DEPDIR)/libroken_la-setprogname.Tpo -c -o libroken_la-setprogname.lo `test -f 'setprogname.c' || echo '$(srcdir)/'`setprogname.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-setprogname.Tpo $(DEPDIR)/libroken_la-setprogname.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='setprogname.c' object='libroken_la-setprogname.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-setprogname.lo `test -f 'setprogname.c' || echo '$(srcdir)/'`setprogname.c - -libroken_la-signal.lo: signal.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-signal.lo -MD -MP -MF $(DEPDIR)/libroken_la-signal.Tpo -c -o libroken_la-signal.lo `test -f 'signal.c' || echo '$(srcdir)/'`signal.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-signal.Tpo $(DEPDIR)/libroken_la-signal.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='signal.c' object='libroken_la-signal.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-signal.lo `test -f 'signal.c' || echo '$(srcdir)/'`signal.c - -libroken_la-simple_exec.lo: simple_exec.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-simple_exec.lo -MD -MP -MF $(DEPDIR)/libroken_la-simple_exec.Tpo -c -o libroken_la-simple_exec.lo `test -f 'simple_exec.c' || echo '$(srcdir)/'`simple_exec.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-simple_exec.Tpo $(DEPDIR)/libroken_la-simple_exec.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simple_exec.c' object='libroken_la-simple_exec.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-simple_exec.lo `test -f 'simple_exec.c' || echo '$(srcdir)/'`simple_exec.c - -libroken_la-snprintf.lo: snprintf.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-snprintf.lo -MD -MP -MF $(DEPDIR)/libroken_la-snprintf.Tpo -c -o libroken_la-snprintf.lo `test -f 'snprintf.c' || echo '$(srcdir)/'`snprintf.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-snprintf.Tpo $(DEPDIR)/libroken_la-snprintf.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='snprintf.c' object='libroken_la-snprintf.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-snprintf.lo `test -f 'snprintf.c' || echo '$(srcdir)/'`snprintf.c - -libroken_la-socket.lo: socket.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-socket.lo -MD -MP -MF $(DEPDIR)/libroken_la-socket.Tpo -c -o libroken_la-socket.lo `test -f 'socket.c' || echo '$(srcdir)/'`socket.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-socket.Tpo $(DEPDIR)/libroken_la-socket.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='socket.c' object='libroken_la-socket.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-socket.lo `test -f 'socket.c' || echo '$(srcdir)/'`socket.c - -libroken_la-strcollect.lo: strcollect.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-strcollect.lo -MD -MP -MF $(DEPDIR)/libroken_la-strcollect.Tpo -c -o libroken_la-strcollect.lo `test -f 'strcollect.c' || echo '$(srcdir)/'`strcollect.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-strcollect.Tpo $(DEPDIR)/libroken_la-strcollect.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strcollect.c' object='libroken_la-strcollect.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-strcollect.lo `test -f 'strcollect.c' || echo '$(srcdir)/'`strcollect.c - -libroken_la-strerror_r.lo: strerror_r.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-strerror_r.lo -MD -MP -MF $(DEPDIR)/libroken_la-strerror_r.Tpo -c -o libroken_la-strerror_r.lo `test -f 'strerror_r.c' || echo '$(srcdir)/'`strerror_r.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-strerror_r.Tpo $(DEPDIR)/libroken_la-strerror_r.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strerror_r.c' object='libroken_la-strerror_r.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-strerror_r.lo `test -f 'strerror_r.c' || echo '$(srcdir)/'`strerror_r.c - -libroken_la-strpool.lo: strpool.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-strpool.lo -MD -MP -MF $(DEPDIR)/libroken_la-strpool.Tpo -c -o libroken_la-strpool.lo `test -f 'strpool.c' || echo '$(srcdir)/'`strpool.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-strpool.Tpo $(DEPDIR)/libroken_la-strpool.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strpool.c' object='libroken_la-strpool.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-strpool.lo `test -f 'strpool.c' || echo '$(srcdir)/'`strpool.c - -libroken_la-timeval.lo: timeval.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-timeval.lo -MD -MP -MF $(DEPDIR)/libroken_la-timeval.Tpo -c -o libroken_la-timeval.lo `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-timeval.Tpo $(DEPDIR)/libroken_la-timeval.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timeval.c' object='libroken_la-timeval.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-timeval.lo `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c - -libroken_la-tm2time.lo: tm2time.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-tm2time.lo -MD -MP -MF $(DEPDIR)/libroken_la-tm2time.Tpo -c -o libroken_la-tm2time.lo `test -f 'tm2time.c' || echo '$(srcdir)/'`tm2time.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-tm2time.Tpo $(DEPDIR)/libroken_la-tm2time.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tm2time.c' object='libroken_la-tm2time.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-tm2time.lo `test -f 'tm2time.c' || echo '$(srcdir)/'`tm2time.c - -libroken_la-unvis.lo: unvis.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-unvis.lo -MD -MP -MF $(DEPDIR)/libroken_la-unvis.Tpo -c -o libroken_la-unvis.lo `test -f 'unvis.c' || echo '$(srcdir)/'`unvis.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-unvis.Tpo $(DEPDIR)/libroken_la-unvis.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unvis.c' object='libroken_la-unvis.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-unvis.lo `test -f 'unvis.c' || echo '$(srcdir)/'`unvis.c - -libroken_la-verify.lo: verify.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-verify.lo -MD -MP -MF $(DEPDIR)/libroken_la-verify.Tpo -c -o libroken_la-verify.lo `test -f 'verify.c' || echo '$(srcdir)/'`verify.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-verify.Tpo $(DEPDIR)/libroken_la-verify.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='verify.c' object='libroken_la-verify.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-verify.lo `test -f 'verify.c' || echo '$(srcdir)/'`verify.c - -libroken_la-vis.lo: vis.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-vis.lo -MD -MP -MF $(DEPDIR)/libroken_la-vis.Tpo -c -o libroken_la-vis.lo `test -f 'vis.c' || echo '$(srcdir)/'`vis.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-vis.Tpo $(DEPDIR)/libroken_la-vis.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='vis.c' object='libroken_la-vis.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-vis.lo `test -f 'vis.c' || echo '$(srcdir)/'`vis.c - -libroken_la-warnerr.lo: warnerr.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-warnerr.lo -MD -MP -MF $(DEPDIR)/libroken_la-warnerr.Tpo -c -o libroken_la-warnerr.lo `test -f 'warnerr.c' || echo '$(srcdir)/'`warnerr.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-warnerr.Tpo $(DEPDIR)/libroken_la-warnerr.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='warnerr.c' object='libroken_la-warnerr.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-warnerr.lo `test -f 'warnerr.c' || echo '$(srcdir)/'`warnerr.c - -libroken_la-write_pid.lo: write_pid.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-write_pid.lo -MD -MP -MF $(DEPDIR)/libroken_la-write_pid.Tpo -c -o libroken_la-write_pid.lo `test -f 'write_pid.c' || echo '$(srcdir)/'`write_pid.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-write_pid.Tpo $(DEPDIR)/libroken_la-write_pid.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='write_pid.c' object='libroken_la-write_pid.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-write_pid.lo `test -f 'write_pid.c' || echo '$(srcdir)/'`write_pid.c - -libroken_la-xfree.lo: xfree.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-xfree.lo -MD -MP -MF $(DEPDIR)/libroken_la-xfree.Tpo -c -o libroken_la-xfree.lo `test -f 'xfree.c' || echo '$(srcdir)/'`xfree.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-xfree.Tpo $(DEPDIR)/libroken_la-xfree.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xfree.c' object='libroken_la-xfree.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-xfree.lo `test -f 'xfree.c' || echo '$(srcdir)/'`xfree.c - -libroken_la-socket_wrapper.lo: socket_wrapper.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libroken_la-socket_wrapper.lo -MD -MP -MF $(DEPDIR)/libroken_la-socket_wrapper.Tpo -c -o libroken_la-socket_wrapper.lo `test -f 'socket_wrapper.c' || echo '$(srcdir)/'`socket_wrapper.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libroken_la-socket_wrapper.Tpo $(DEPDIR)/libroken_la-socket_wrapper.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='socket_wrapper.c' object='libroken_la-socket_wrapper.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroken_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libroken_la-socket_wrapper.lo `test -f 'socket_wrapper.c' || echo '$(srcdir)/'`socket_wrapper.c - -libtest_la-strftime.lo: strftime.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_la_CFLAGS) $(CFLAGS) -MT libtest_la-strftime.lo -MD -MP -MF $(DEPDIR)/libtest_la-strftime.Tpo -c -o libtest_la-strftime.lo `test -f 'strftime.c' || echo '$(srcdir)/'`strftime.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libtest_la-strftime.Tpo $(DEPDIR)/libtest_la-strftime.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strftime.c' object='libtest_la-strftime.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_la_CFLAGS) $(CFLAGS) -c -o libtest_la-strftime.lo `test -f 'strftime.c' || echo '$(srcdir)/'`strftime.c - -libtest_la-strptime.lo: strptime.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_la_CFLAGS) $(CFLAGS) -MT libtest_la-strptime.lo -MD -MP -MF $(DEPDIR)/libtest_la-strptime.Tpo -c -o libtest_la-strptime.lo `test -f 'strptime.c' || echo '$(srcdir)/'`strptime.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libtest_la-strptime.Tpo $(DEPDIR)/libtest_la-strptime.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strptime.c' object='libtest_la-strptime.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_la_CFLAGS) $(CFLAGS) -c -o libtest_la-strptime.lo `test -f 'strptime.c' || echo '$(srcdir)/'`strptime.c - -libtest_la-snprintf.lo: snprintf.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_la_CFLAGS) $(CFLAGS) -MT libtest_la-snprintf.lo -MD -MP -MF $(DEPDIR)/libtest_la-snprintf.Tpo -c -o libtest_la-snprintf.lo `test -f 'snprintf.c' || echo '$(srcdir)/'`snprintf.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libtest_la-snprintf.Tpo $(DEPDIR)/libtest_la-snprintf.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='snprintf.c' object='libtest_la-snprintf.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_la_CFLAGS) $(CFLAGS) -c -o libtest_la-snprintf.lo `test -f 'snprintf.c' || echo '$(srcdir)/'`snprintf.c - -libtest_la-tsearch.lo: tsearch.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_la_CFLAGS) $(CFLAGS) -MT libtest_la-tsearch.lo -MD -MP -MF $(DEPDIR)/libtest_la-tsearch.Tpo -c -o libtest_la-tsearch.lo `test -f 'tsearch.c' || echo '$(srcdir)/'`tsearch.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libtest_la-tsearch.Tpo $(DEPDIR)/libtest_la-tsearch.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tsearch.c' object='libtest_la-tsearch.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_la_CFLAGS) $(CFLAGS) -c -o libtest_la-tsearch.lo `test -f 'tsearch.c' || echo '$(srcdir)/'`tsearch.c - -parse_reply_test-parse_reply-test.o: parse_reply-test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_reply_test_CFLAGS) $(CFLAGS) -MT parse_reply_test-parse_reply-test.o -MD -MP -MF $(DEPDIR)/parse_reply_test-parse_reply-test.Tpo -c -o parse_reply_test-parse_reply-test.o `test -f 'parse_reply-test.c' || echo '$(srcdir)/'`parse_reply-test.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/parse_reply_test-parse_reply-test.Tpo $(DEPDIR)/parse_reply_test-parse_reply-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_reply-test.c' object='parse_reply_test-parse_reply-test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_reply_test_CFLAGS) $(CFLAGS) -c -o parse_reply_test-parse_reply-test.o `test -f 'parse_reply-test.c' || echo '$(srcdir)/'`parse_reply-test.c - -parse_reply_test-parse_reply-test.obj: parse_reply-test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_reply_test_CFLAGS) $(CFLAGS) -MT parse_reply_test-parse_reply-test.obj -MD -MP -MF $(DEPDIR)/parse_reply_test-parse_reply-test.Tpo -c -o parse_reply_test-parse_reply-test.obj `if test -f 'parse_reply-test.c'; then $(CYGPATH_W) 'parse_reply-test.c'; else $(CYGPATH_W) '$(srcdir)/parse_reply-test.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/parse_reply_test-parse_reply-test.Tpo $(DEPDIR)/parse_reply_test-parse_reply-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parse_reply-test.c' object='parse_reply_test-parse_reply-test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_reply_test_CFLAGS) $(CFLAGS) -c -o parse_reply_test-parse_reply-test.obj `if test -f 'parse_reply-test.c'; then $(CYGPATH_W) 'parse_reply-test.c'; else $(CYGPATH_W) '$(srcdir)/parse_reply-test.c'; fi` - -parse_reply_test-resolve.o: resolve.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_reply_test_CFLAGS) $(CFLAGS) -MT parse_reply_test-resolve.o -MD -MP -MF $(DEPDIR)/parse_reply_test-resolve.Tpo -c -o parse_reply_test-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/parse_reply_test-resolve.Tpo $(DEPDIR)/parse_reply_test-resolve.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolve.c' object='parse_reply_test-resolve.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_reply_test_CFLAGS) $(CFLAGS) -c -o parse_reply_test-resolve.o `test -f 'resolve.c' || echo '$(srcdir)/'`resolve.c - -parse_reply_test-resolve.obj: resolve.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_reply_test_CFLAGS) $(CFLAGS) -MT parse_reply_test-resolve.obj -MD -MP -MF $(DEPDIR)/parse_reply_test-resolve.Tpo -c -o parse_reply_test-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/parse_reply_test-resolve.Tpo $(DEPDIR)/parse_reply_test-resolve.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='resolve.c' object='parse_reply_test-resolve.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(parse_reply_test_CFLAGS) $(CFLAGS) -c -o parse_reply_test-resolve.obj `if test -f 'resolve.c'; then $(CYGPATH_W) 'resolve.c'; else $(CYGPATH_W) '$(srcdir)/resolve.c'; fi` - -snprintf_test-snprintf-test.o: snprintf-test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(snprintf_test_CFLAGS) $(CFLAGS) -MT snprintf_test-snprintf-test.o -MD -MP -MF $(DEPDIR)/snprintf_test-snprintf-test.Tpo -c -o snprintf_test-snprintf-test.o `test -f 'snprintf-test.c' || echo '$(srcdir)/'`snprintf-test.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/snprintf_test-snprintf-test.Tpo $(DEPDIR)/snprintf_test-snprintf-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='snprintf-test.c' object='snprintf_test-snprintf-test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(snprintf_test_CFLAGS) $(CFLAGS) -c -o snprintf_test-snprintf-test.o `test -f 'snprintf-test.c' || echo '$(srcdir)/'`snprintf-test.c - -snprintf_test-snprintf-test.obj: snprintf-test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(snprintf_test_CFLAGS) $(CFLAGS) -MT snprintf_test-snprintf-test.obj -MD -MP -MF $(DEPDIR)/snprintf_test-snprintf-test.Tpo -c -o snprintf_test-snprintf-test.obj `if test -f 'snprintf-test.c'; then $(CYGPATH_W) 'snprintf-test.c'; else $(CYGPATH_W) '$(srcdir)/snprintf-test.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/snprintf_test-snprintf-test.Tpo $(DEPDIR)/snprintf_test-snprintf-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='snprintf-test.c' object='snprintf_test-snprintf-test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(snprintf_test_CFLAGS) $(CFLAGS) -c -o snprintf_test-snprintf-test.obj `if test -f 'snprintf-test.c'; then $(CYGPATH_W) 'snprintf-test.c'; else $(CYGPATH_W) '$(srcdir)/snprintf-test.c'; fi` - -strpftime_test-strpftime-test.o: strpftime-test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strpftime_test_CFLAGS) $(CFLAGS) -MT strpftime_test-strpftime-test.o -MD -MP -MF $(DEPDIR)/strpftime_test-strpftime-test.Tpo -c -o strpftime_test-strpftime-test.o `test -f 'strpftime-test.c' || echo '$(srcdir)/'`strpftime-test.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/strpftime_test-strpftime-test.Tpo $(DEPDIR)/strpftime_test-strpftime-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strpftime-test.c' object='strpftime_test-strpftime-test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strpftime_test_CFLAGS) $(CFLAGS) -c -o strpftime_test-strpftime-test.o `test -f 'strpftime-test.c' || echo '$(srcdir)/'`strpftime-test.c - -strpftime_test-strpftime-test.obj: strpftime-test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strpftime_test_CFLAGS) $(CFLAGS) -MT strpftime_test-strpftime-test.obj -MD -MP -MF $(DEPDIR)/strpftime_test-strpftime-test.Tpo -c -o strpftime_test-strpftime-test.obj `if test -f 'strpftime-test.c'; then $(CYGPATH_W) 'strpftime-test.c'; else $(CYGPATH_W) '$(srcdir)/strpftime-test.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/strpftime_test-strpftime-test.Tpo $(DEPDIR)/strpftime_test-strpftime-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='strpftime-test.c' object='strpftime_test-strpftime-test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(strpftime_test_CFLAGS) $(CFLAGS) -c -o strpftime_test-strpftime-test.obj `if test -f 'strpftime-test.c'; then $(CYGPATH_W) 'strpftime-test.c'; else $(CYGPATH_W) '$(srcdir)/strpftime-test.c'; fi` - -tsearch_test-tsearch-test.o: tsearch-test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tsearch_test_CFLAGS) $(CFLAGS) -MT tsearch_test-tsearch-test.o -MD -MP -MF $(DEPDIR)/tsearch_test-tsearch-test.Tpo -c -o tsearch_test-tsearch-test.o `test -f 'tsearch-test.c' || echo '$(srcdir)/'`tsearch-test.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tsearch_test-tsearch-test.Tpo $(DEPDIR)/tsearch_test-tsearch-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tsearch-test.c' object='tsearch_test-tsearch-test.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tsearch_test_CFLAGS) $(CFLAGS) -c -o tsearch_test-tsearch-test.o `test -f 'tsearch-test.c' || echo '$(srcdir)/'`tsearch-test.c - -tsearch_test-tsearch-test.obj: tsearch-test.c -@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tsearch_test_CFLAGS) $(CFLAGS) -MT tsearch_test-tsearch-test.obj -MD -MP -MF $(DEPDIR)/tsearch_test-tsearch-test.Tpo -c -o tsearch_test-tsearch-test.obj `if test -f 'tsearch-test.c'; then $(CYGPATH_W) 'tsearch-test.c'; else $(CYGPATH_W) '$(srcdir)/tsearch-test.c'; fi` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tsearch_test-tsearch-test.Tpo $(DEPDIR)/tsearch_test-tsearch-test.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tsearch-test.c' object='tsearch_test-tsearch-test.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tsearch_test_CFLAGS) $(CFLAGS) -c -o tsearch_test-tsearch-test.obj `if test -f 'tsearch-test.c'; then $(CYGPATH_W) 'tsearch-test.c'; else $(CYGPATH_W) '$(srcdir)/tsearch-test.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man3: $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" - @list=''; test -n "$(man3dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ - done; } - -uninstall-man3: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man3dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.3[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } -install-dist_includeHEADERS: $(dist_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(dist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-dist_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(dist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files -install-nodist_includeHEADERS: $(nodist_include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-nodist_includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files -install-nodist_rokenincludeHEADERS: $(nodist_rokeninclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(rokenincludedir)" || $(MKDIR_P) "$(DESTDIR)$(rokenincludedir)" - @list='$(nodist_rokeninclude_HEADERS)'; test -n "$(rokenincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(rokenincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(rokenincludedir)" || exit $$?; \ - done - -uninstall-nodist_rokenincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(nodist_rokeninclude_HEADERS)'; test -n "$(rokenincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(rokenincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(rokenincludedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS) \ - all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(rokenincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ - mostlyclean-am - -distclean: distclean-am - -rm -rf $(DEPDIR) ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-dist_includeHEADERS install-man \ - install-nodist_includeHEADERS \ - install-nodist_rokenincludeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man3 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf $(DEPDIR) ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-dist_includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-man uninstall-nodist_includeHEADERS \ - uninstall-nodist_rokenincludeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -uninstall-man: uninstall-man3 - -.MAKE: all check check-am install install-am install-data-am \ - install-exec-am install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \ - check-local clean clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS ctags dist-hook distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-hook install-dist_includeHEADERS install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-man3 \ - install-nodist_includeHEADERS \ - install-nodist_rokenincludeHEADERS install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-dist_includeHEADERS \ - uninstall-hook uninstall-libLTLIBRARIES uninstall-man \ - uninstall-man3 uninstall-nodist_includeHEADERS \ - uninstall-nodist_rokenincludeHEADERS - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -$(LTLIBOBJS) $(libroken_la_OBJECTS): roken.h $(XHEADERS) -.hin.h: - cp $< $@ - -@CROSS_COMPILE_FALSE@roken.h: make-roken$(EXEEXT) -@CROSS_COMPILE_FALSE@ @./make-roken$(EXEEXT) > tmp.h ;\ -@CROSS_COMPILE_FALSE@ if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \ -@CROSS_COMPILE_FALSE@ else rm -f roken.h; mv tmp.h roken.h; fi - -@CROSS_COMPILE_FALSE@make-roken.c: roken.h.in roken.awk -@CROSS_COMPILE_FALSE@ $(AWK) -f $(srcdir)/roken.awk $(srcdir)/roken.h.in > make-roken.c - -@CROSS_COMPILE_TRUE@roken.h: $(top_srcdir)/cf/roken-h-process.pl roken.h.in -@CROSS_COMPILE_TRUE@ perl $(top_srcdir)/cf/roken-h-process.pl \ -@CROSS_COMPILE_TRUE@ -c $(top_builddir)/include/config.h \ -@CROSS_COMPILE_TRUE@ -p $(srcdir)/roken.h.in -o roken.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/kerberosV/src/lib/roken/NTMakefile b/kerberosV/src/lib/roken/NTMakefile deleted file mode 100644 index fab0a0cc0fd..00000000000 --- a/kerberosV/src/lib/roken/NTMakefile +++ /dev/null @@ -1,274 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=lib\roken - -!include ../../windows/NTMakefile.w32 - -libroken_la_OBJS = \ - $(OBJ)\base64.obj \ - $(OBJ)\bswap.obj \ - $(OBJ)\concat.obj \ - $(OBJ)\cloexec.obj \ - $(OBJ)\ct.obj \ - $(OBJ)\dirent.obj \ - $(OBJ)\dlfcn_w32.obj \ - $(OBJ)\dumpdata.obj \ - $(OBJ)\ecalloc.obj \ - $(OBJ)\emalloc.obj \ - $(OBJ)\environment.obj \ - $(OBJ)\eread.obj \ - $(OBJ)\erealloc.obj \ - $(OBJ)\err.obj \ - $(OBJ)\errx.obj \ - $(OBJ)\esetenv.obj \ - $(OBJ)\estrdup.obj \ - $(OBJ)\ewrite.obj \ - $(OBJ)\flock.obj \ - $(OBJ)\fnmatch.obj \ - $(OBJ)\getaddrinfo_hostspec.obj \ - $(OBJ)\get_default_username.obj \ - $(OBJ)\get_window_size.obj \ - $(OBJ)\getarg.obj \ - $(OBJ)\getifaddrs_w32.obj \ - $(OBJ)\getnameinfo_verified.obj \ - $(OBJ)\getopt.obj \ - $(OBJ)\getprogname.obj \ - $(OBJ)\gettimeofday.obj \ - $(OBJ)\hex.obj \ - $(OBJ)\hostent_find_fqdn.obj \ - $(OBJ)\inet_aton.obj \ - $(OBJ)\issuid.obj \ - $(OBJ)\localtime_r.obj \ - $(OBJ)\lstat.obj \ - $(OBJ)\mini_inetd.obj \ - $(OBJ)\mkstemp.obj \ - $(OBJ)\net_read.obj \ - $(OBJ)\net_write.obj \ - $(OBJ)\parse_bytes.obj \ - $(OBJ)\parse_time.obj \ - $(OBJ)\parse_units.obj \ - $(OBJ)\realloc.obj \ - $(OBJ)\rename.obj \ - $(OBJ)\resolve.obj \ - $(OBJ)\rand.obj \ - $(OBJ)\roken_gethostby.obj \ - $(OBJ)\rtbl.obj \ - $(OBJ)\sendmsg.obj \ - $(OBJ)\setenv.obj \ - $(OBJ)\setprogname.obj \ - $(OBJ)\simple_exec_w32.obj \ - $(OBJ)\sleep.obj \ - $(OBJ)\snprintf.obj \ - $(OBJ)\socket.obj \ - $(OBJ)\sockstartup_w32.obj \ - $(OBJ)\strcollect.obj \ - $(OBJ)\strerror_r.obj \ - $(OBJ)\strlcat.obj \ - $(OBJ)\strlcpy.obj \ - $(OBJ)\strpool.obj \ - $(OBJ)\strptime.obj \ - $(OBJ)\strsep.obj \ - $(OBJ)\strsep_copy.obj \ - $(OBJ)\strtok_r.obj \ - $(OBJ)\syslogc.obj \ - $(OBJ)\timegm.obj \ - $(OBJ)\timeval.obj \ - $(OBJ)\tm2time.obj \ - $(OBJ)\tsearch.obj \ - $(OBJ)\unvis.obj \ - $(OBJ)\verr.obj \ - $(OBJ)\verrx.obj \ - $(OBJ)\vis.obj \ - $(OBJ)\vwarn.obj \ - $(OBJ)\vwarnx.obj \ - $(OBJ)\warn.obj \ - $(OBJ)\warnerr.obj \ - $(OBJ)\warnx.obj \ - $(OBJ)\xfree.obj - -!if $(NMAKE_WINVER) < 0x0600 -libroken_la_OBJS=$(libroken_la_OBJS) \ - $(OBJ)\inet_ntop.obj \ - $(OBJ)\inet_pton.obj -!endif - -{}.c{$(OBJ)}.obj:: - $(C2OBJ_P) -DBUILD_ROKEN_LIB - -$(LIBROKEN): $(libroken_la_OBJS) - $(LIBCON_C) -out:$@ @<< -$(**: = -) -<< - -$(OBJ)\make-roken.exe: $(OBJ)\make-roken.obj - $(EXECONLINK) - -$(OBJ)\make-roken.c: roken.h.in roken.awk $(INCDIR)\config.h - $(AWK) -f roken.awk roken.h.in > $(OBJ)\make-roken.c || $(RM) $(OBJ)\make-roken.c - -$(INCDIR)\roken.h: $(OBJ)\make-roken.exe - $(OBJ)\make-roken.exe > $@ || $(RM) $@ - -INCFILES = \ - $(INCDIR)\base64.h \ - $(INCDIR)\dirent.h \ - $(INCDIR)\dlfcn.h \ - $(INCDIR)\err.h \ - $(INCDIR)\fnmatch.h \ - $(INCDIR)\getarg.h \ - $(INCDIR)\glob.h \ - $(INCDIR)\hex.h \ - $(INCDIR)\ifaddrs.h \ - $(INCDIR)\parse_bytes.h \ - $(INCDIR)\parse_time.h \ - $(INCDIR)\parse_units.h \ - $(INCDIR)\resolve.h \ - $(INCDIR)\roken.h \ - $(INCDIR)\roken-common.h \ - $(INCDIR)\rtbl.h \ - $(INCDIR)\search.h \ - $(INCDIR)\stdbool.h \ - $(INCDIR)\syslog.h \ - $(INCDIR)\vis.h \ - $(INCDIR)\xdbm.h - -clean:: - -$(RM) $(XHEADERS) - -all:: $(INCFILES) $(LIBROKEN) - -clean:: - -$(RM) $(LIBROKEN) - -TMP_PROGS = $(OBJ)\snprintf-test.exe $(OBJ)\resolve-test.exe - -# Tests - -TEST_PROGS = \ - $(OBJ)\base64-test.exe \ - $(OBJ)\getaddrinfo-test.exe \ - $(OBJ)\getifaddrs-test.exe \ - $(OBJ)\hex-test.exe \ - $(OBJ)\test-readenv.exe \ - $(OBJ)\parse_bytes-test.exe \ - $(OBJ)\parse_reply-test.exe \ - $(OBJ)\parse_time-test.exe \ - $(OBJ)\snprintf-test.exe \ - $(OBJ)\strpftime-test.exe \ - $(OBJ)\dirent-test.exe \ - $(OBJ)\test-mini_inetd.exe - -$(OBJ)\strftime_test.obj: strftime.c - $(C2OBJ) -DTEST_SNPRINTF -DTEST_STRPFTIME -DBUILD_ROKEN_LIB - -$(OBJ)\strptime_test.obj: strptime.c - $(C2OBJ) -DTEST_SNPRINTF -DTEST_STRPFTIME -DBUILD_ROKEN_LIB - -$(OBJ)\snprintf_test.obj: snprintf.c - $(C2OBJ) -DTEST_SNPRINTF -DTEST_STRPFTIME -DBUILD_ROKEN_LIB - -$(OBJ)\libtest.lib: $(OBJ)\strftime_test.obj $(OBJ)\strptime_test.obj $(OBJ)\snprintf_test.obj - $(LIBCON) - -$(OBJ)\parse_reply-test.obj: parse_reply-test.c - $(C2OBJ) -DTEST_RESOLVE -DBUILD_ROKEN_LIB - -$(OBJ)\resolve_test.obj: resolve.c - $(C2OBJ) -DTEST_RESOLVE -DBUILD_ROKEN_LIB - -$(OBJ)\parse_reply-test.exe: $(OBJ)\parse_reply-test.obj $(OBJ)\resolve_test.obj $(LIBROKEN) - $(EXECONLINK) DnsAPI.lib - -$(OBJ)\test-readenv.exe: $(OBJ)\test-readenv.obj $(OBJ)\test-mem.obj $(LIBROKEN) - $(EXECONLINK) - -$(OBJ)\parse_time-test.exe: $(OBJ)\parse_time-test.obj $(OBJ)\test-mem.obj $(LIBROKEN) - $(EXECONLINK) - -$(OBJ)\strpftime-test.obj: strpftime-test.c - $(C2OBJ) -DTEST_STRPFTIME -DBUILD_ROKEN_LIB - -$(OBJ)\strpftime-test.exe: $(OBJ)\strpftime-test.obj $(OBJ)\libtest.lib $(LIBROKEN) - $(EXECONLINK) - -$(OBJ)\snprintf-test.obj: snprintf-test.c - $(C2OBJ) -DTEST_SNPRINTF -DBUILD_ROKEN_LIB - -$(OBJ)\snprintf-test.exe: $(OBJ)\snprintf-test.obj $(OBJ)\libtest.lib $(LIBROKEN) - $(EXECONLINK) - -$(OBJ)\resolve-test.exe: $(OBJ)\resolve-test.obj $(LIBROKEN) - $(EXECONLINK) DnsAPI.lib - -$(OBJ)\base64-test.exe: $(OBJ)\base64-test.obj $(OBJ)\base64.obj - $(EXECONLINK) - -$(OBJ)\getaddrinfo-test.exe: $(OBJ)\getaddrinfo-test.obj $(LIBROKEN) - $(EXECONLINK) - -$(OBJ)\hex-test.exe: $(OBJ)\hex-test.obj $(LIBROKEN) - $(EXECONLINK) - -$(OBJ)\parse_bytes-test.exe: $(OBJ)\parse_bytes-test.obj $(LIBROKEN) - $(EXECONLINK) - -$(OBJ)\dirent-test.exe: $(OBJ)\dirent-test.obj $(LIBROKEN) - $(EXECONLINK) - -$(OBJ)\getifaddrs-test.exe: $(OBJ)\getifaddrs-test.obj $(LIBROKEN) - $(EXECONLINK) - -$(OBJ)\test-mini_inetd.exe: $(OBJ)\test-mini_inetd.obj $(LIBROKEN) - $(EXECONLINK) - -test-binaries: $(TEST_PROGS) $(TMP_PROGS) - -test-run: - cd $(OBJ) - test-mini_inetd.exe - dirent-test.exe - base64-test.exe - getaddrinfo-test.exe - getifaddrs-test.exe - hex-test.exe - test-readenv.exe - parse_bytes-test.exe -# Need to rewrite this test: -# parse_reply-test.exe - parse_time-test.exe - snprintf-test.exe - strpftime-test.exe - cd $(SRCDIR) - -test:: test-binaries test-run - diff --git a/kerberosV/src/lib/roken/base64-test.c b/kerberosV/src/lib/roken/base64-test.c deleted file mode 100644 index e9a2835e85e..00000000000 --- a/kerberosV/src/lib/roken/base64-test.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#include "roken.h" -#include - -int -main(int argc, char **argv) -{ - int numerr = 0; - int numtest = 1; - struct test { - void *data; - size_t len; - const char *result; - } *t, tests[] = { - { "", 0 , "" }, - { "1", 1, "MQ==" }, - { "22", 2, "MjI=" }, - { "333", 3, "MzMz" }, - { "4444", 4, "NDQ0NA==" }, - { "55555", 5, "NTU1NTU=" }, - { "abc:def", 7, "YWJjOmRlZg==" }, - { NULL } - }; - for(t = tests; t->data; t++) { - char *str; - int len; - len = base64_encode(t->data, t->len, &str); - if(strcmp(str, t->result) != 0) { - fprintf(stderr, "failed test %d: %s != %s\n", numtest, - str, t->result); - numerr++; - } - free(str); - str = strdup(t->result); - len = base64_decode(t->result, str); - if(len != t->len) { - fprintf(stderr, "failed test %d: len %lu != %lu\n", numtest, - (unsigned long)len, (unsigned long)t->len); - numerr++; - } else if(memcmp(str, t->data, t->len) != 0) { - fprintf(stderr, "failed test %d: data\n", numtest); - numerr++; - } - free(str); - numtest++; - } - - { - char str[32]; - if(base64_decode("M=M=", str) != -1) { - fprintf(stderr, "failed test %d: successful decode of `M=M='\n", - numtest++); - numerr++; - } - if(base64_decode("MQ===", str) != -1) { - fprintf(stderr, "failed test %d: successful decode of `MQ==='\n", - numtest++); - numerr++; - } - } - return numerr; -} diff --git a/kerberosV/src/lib/roken/base64.c b/kerberosV/src/lib/roken/base64.c deleted file mode 100644 index 394e9841c78..00000000000 --- a/kerberosV/src/lib/roken/base64.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 1995-2001 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 - -#include -#include -#include -#include "base64.h" - -static const char base64_chars[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - -static int -pos(char c) -{ - const char *p; - for (p = base64_chars; *p; p++) - if (*p == c) - return p - base64_chars; - return -1; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -base64_encode(const void *data, int size, char **str) -{ - char *s, *p; - int i; - int c; - const unsigned char *q; - - if (size > INT_MAX/4 || size < 0) { - *str = NULL; - return -1; - } - - p = s = (char *) malloc(size * 4 / 3 + 4); - if (p == NULL) { - *str = NULL; - return -1; - } - q = (const unsigned char *) data; - - 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_chars[(c & 0x00fc0000) >> 18]; - p[1] = base64_chars[(c & 0x0003f000) >> 12]; - p[2] = base64_chars[(c & 0x00000fc0) >> 6]; - p[3] = base64_chars[(c & 0x0000003f) >> 0]; - if (i > size) - p[3] = '='; - if (i > size + 1) - p[2] = '='; - p += 4; - } - *p = 0; - *str = s; - return (int) strlen(s); -} - -#define DECODE_ERROR 0xffffffff - -static unsigned int -token_decode(const char *token) -{ - int i; - unsigned int val = 0; - int marker = 0; - if (strlen(token) < 4) - return DECODE_ERROR; - for (i = 0; i < 4; i++) { - val *= 64; - if (token[i] == '=') - marker++; - else if (marker > 0) - return DECODE_ERROR; - else - val += pos(token[i]); - } - if (marker > 2) - return DECODE_ERROR; - return (marker << 24) | val; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -base64_decode(const char *str, void *data) -{ - const char *p; - unsigned char *q; - - q = data; - for (p = str; *p && (*p == '=' || strchr(base64_chars, *p)); p += 4) { - unsigned int val = token_decode(p); - unsigned int marker = (val >> 24) & 0xff; - if (val == DECODE_ERROR) - return -1; - *q++ = (val >> 16) & 0xff; - if (marker < 2) - *q++ = (val >> 8) & 0xff; - if (marker < 1) - *q++ = val & 0xff; - } - return q - (unsigned char *) data; -} diff --git a/kerberosV/src/lib/roken/base64.h b/kerberosV/src/lib/roken/base64.h deleted file mode 100644 index 4d9030ed8f6..00000000000 --- a/kerberosV/src/lib/roken/base64.h +++ /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. - */ - -/* $Id: base64.h,v 1.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef _BASE64_H_ -#define _BASE64_H_ - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -base64_encode(const void *, int, char **); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -base64_decode(const char *, void *); - -#endif diff --git a/kerberosV/src/lib/roken/bswap.c b/kerberosV/src/lib/roken/bswap.c deleted file mode 100644 index 7f8c1c22b1b..00000000000 --- a/kerberosV/src/lib/roken/bswap.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2001 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 -#include "roken.h" - -#ifndef HAVE_BSWAP32 - -ROKEN_LIB_FUNCTION unsigned int ROKEN_LIB_CALL -bswap32 (unsigned int val) -{ - return (val & 0xff) << 24 | - (val & 0xff00) << 8 | - (val & 0xff0000) >> 8 | - (val & 0xff000000) >> 24; -} -#endif - -#ifndef HAVE_BSWAP16 - -ROKEN_LIB_FUNCTION unsigned short ROKEN_LIB_CALL -bswap16 (unsigned short val) -{ - return (val & 0xff) << 8 | - (val & 0xff00) >> 8; -} -#endif diff --git a/kerberosV/src/lib/roken/chown.c b/kerberosV/src/lib/roken/chown.c deleted file mode 100644 index 90a82d958ec..00000000000 --- a/kerberosV/src/lib/roken/chown.c +++ /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. - */ - -#include - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -chown(const char *path, uid_t owner, gid_t group) -{ - return 0; -} diff --git a/kerberosV/src/lib/roken/cloexec.c b/kerberosV/src/lib/roken/cloexec.c deleted file mode 100644 index 2d1fe033f2d..00000000000 --- a/kerberosV/src/lib/roken/cloexec.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2008 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 - -#include "roken.h" - -void ROKEN_LIB_FUNCTION -rk_cloexec(int fd) -{ -#ifdef HAVE_FCNTL - int ret; - - ret = fcntl(fd, F_GETFD); - if (ret == -1) - return; - if (fcntl(fd, F_SETFD, ret | FD_CLOEXEC) == -1) - return; -#endif -} - -void ROKEN_LIB_FUNCTION -rk_cloexec_file(FILE *f) -{ -#ifdef HAVE_FCNTL - rk_cloexec(fileno(f)); -#endif -} - -void ROKEN_LIB_FUNCTION -rk_cloexec_dir(DIR * d) -{ -#ifndef _WIN32 - rk_cloexec(dirfd(d)); -#endif -} diff --git a/kerberosV/src/lib/roken/closefrom.c b/kerberosV/src/lib/roken/closefrom.c deleted file mode 100644 index 770eb2c67ac..00000000000 --- a/kerberosV/src/lib/roken/closefrom.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2005 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 - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -closefrom(int fd) -{ - int num = getdtablesize(); - - if (num < 0) - num = 1024; /* XXX */ - - for (; fd <= num; fd++) - close(fd); - - return 0; -} diff --git a/kerberosV/src/lib/roken/concat.c b/kerberosV/src/lib/roken/concat.c deleted file mode 100644 index 0b4ac46824c..00000000000 --- a/kerberosV/src/lib/roken/concat.c +++ /dev/null @@ -1,110 +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. - */ - -#include - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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; -} - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -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; -} - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -roken_mconcat (char **s, size_t max_len, ...) -{ - size_t ret; - va_list args; - - va_start(args, max_len); - ret = roken_vmconcat (s, max_len, args); - va_end(args); - return ret; -} diff --git a/kerberosV/src/lib/roken/copyhostent.c b/kerberosV/src/lib/roken/copyhostent.c deleted file mode 100644 index 4ed630210fc..00000000000 --- a/kerberosV/src/lib/roken/copyhostent.c +++ /dev/null @@ -1,99 +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 - -#include "roken.h" - -/* - * return a malloced copy of `h' - */ - -ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/ct.c b/kerberosV/src/lib/roken/ct.c deleted file mode 100644 index 0778c2d4749..00000000000 --- a/kerberosV/src/lib/roken/ct.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2009 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 -#include "roken.h" - -/** - * Constant time compare to memory regions. The reason for making it - * constant time is to make sure that timeing information leak from - * where in the function the diffrence is. - * - * ct_memcmp() can't be used to order memory regions like memcmp(), - * for example, use ct_memcmp() with qsort(). - * - * @param p1 memory region 1 to compare - * @param p2 memory region 2 to compare - * @param len length of memory - * - * @return 0 when the memory regions are equal, non zero if not - * - * @ingroup roken - */ - -int -ct_memcmp(const void *p1, const void *p2, size_t len) -{ - const unsigned char *s1 = p1, *s2 = p2; - size_t i; - int r = 0; - - for (i = 0; i < len; i++) - r |= (s1[i] ^ s2[i]); - return !!r; -} diff --git a/kerberosV/src/lib/roken/daemon.c b/kerberosV/src/lib/roken/daemon.c deleted file mode 100644 index 591a9a9532f..00000000000 --- a/kerberosV/src/lib/roken/daemon.c +++ /dev/null @@ -1,80 +0,0 @@ -/*- - * Copyright (c) 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. 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) -static char sccsid[] = "@(#)daemon.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ - -#include - -#ifndef HAVE_DAEMON - -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_PATHS_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -daemon(int nochdir, int noclose) -{ - int fd; - - switch (fork()) { - case -1: - return (-1); - case 0: - break; - default: - _exit(0); - } - - if (setsid() == -1) - return (-1); - - if (!nochdir) - chdir("/"); - - if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { - dup2(fd, STDIN_FILENO); - dup2(fd, STDOUT_FILENO); - dup2(fd, STDERR_FILENO); - if (fd > 2) - close (fd); - } - return (0); -} - -#endif /* HAVE_DAEMON */ diff --git a/kerberosV/src/lib/roken/doxygen.c b/kerberosV/src/lib/roken/doxygen.c deleted file mode 100644 index 0d30a47a2c8..00000000000 --- a/kerberosV/src/lib/roken/doxygen.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2009 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. - */ - -/*! @mainpage Heimdal Roken support library - * - * @section intro Introduction - * - * Heimdal's roken implememnts missing functions and make it easier to - * work with almost unixies like cygwin and AIX. - * - * The project web page: http://www.h5l.org/ - */ - -/** @defgroup roken Heimdal roken library */ diff --git a/kerberosV/src/lib/roken/dumpdata.c b/kerberosV/src/lib/roken/dumpdata.c deleted file mode 100644 index 844360187f8..00000000000 --- a/kerberosV/src/lib/roken/dumpdata.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2005 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 - -#include "roken.h" - -/* - * Write datablob to a filename, don't care about errors. - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_dumpdata (const char *filename, const void *buf, size_t size) -{ - int fd; - - fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0640); - if (fd < 0) - return; - net_write(fd, buf, size); - close(fd); -} - -/* - * Read all data from a filename, care about errors. - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_undumpdata(const char *filename, void **buf, size_t *size) -{ - struct stat sb; - int fd, ret; - ssize_t sret; - - *buf = NULL; - - fd = open(filename, O_RDONLY, 0); - if (fd < 0) - return errno; - if (fstat(fd, &sb) != 0){ - ret = errno; - goto out; - } - *buf = malloc(sb.st_size); - if (*buf == NULL) { - ret = ENOMEM; - goto out; - } - *size = sb.st_size; - - sret = net_read(fd, *buf, *size); - if (sret < 0) - ret = errno; - else if (sret != (ssize_t)*size) { - ret = EINVAL; - free(*buf); - *buf = NULL; - } else - ret = 0; - - out: - close(fd); - return ret; -} diff --git a/kerberosV/src/lib/roken/ecalloc.3 b/kerberosV/src/lib/roken/ecalloc.3 deleted file mode 100644 index 40c7df455c5..00000000000 --- a/kerberosV/src/lib/roken/ecalloc.3 +++ /dev/null @@ -1,84 +0,0 @@ -.\" Copyright (c) 2001, 2003 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: ecalloc.3,v 1.2 2013/06/17 18:57:45 robert Exp $ -.\" -.Dd August 14, 2003 -.Dt ECALLOC 3 -.Os HEIMDAL -.Sh NAME -.Nm ecalloc , -.Nm emalloc , -.Nm eread , -.Nm erealloc , -.Nm esetenv , -.Nm estrdup , -.Nm ewrite -.Nd exit-on-failure wrapper functions -.Sh LIBRARY -The roken library (libroken, -lroken) -.Sh SYNOPSIS -.Fd #include -.Ft "void *" -.Fn ecalloc "size_t number" "size_t size" -.Ft "void *" -.Fn emalloc "size_t sz" -.Ft ssize_t -.Fn eread "int fd" "void *buf" "size_t nbytes" -.Ft "void *" -.Fn erealloc "void *ptr" "size_t sz" -.Ft void -.Fn esetenv "const char *var" "const char *val" "int rewrite" -.Ft "char *" -.Fn estrdup "const char *str" -.Ft ssize_t -.Fn ewrite "int fd" "const void *buf" "size_t nbytes" -.Sh DESCRIPTION -These functions do the same as the ones without the -.Dq e -prefix, but if there is an error they will print a message with -.Xr errx 3 , -and exit. For -.Nm eread -and -.Nm ewrite -this is also true for partial data. -.Pp -This is useful in applications when there is no need for a more -advanced failure mode. -.Sh SEE ALSO -.Xr read 2 , -.Xr write 2 , -.Xr calloc 3 , -.Xr errx 3 , -.Xr malloc 3 , -.Xr realloc 3 , -.Xr setenv 3 , -.Xr strdup 3 diff --git a/kerberosV/src/lib/roken/ecalloc.c b/kerberosV/src/lib/roken/ecalloc.c deleted file mode 100644 index 04b37330c9b..00000000000 --- a/kerberosV/src/lib/roken/ecalloc.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#include -#include - -#include "roken.h" - -/* - * Like calloc but never fails. - */ - -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL -ecalloc (size_t number, size_t size) -{ - void *tmp = calloc (number, size); - - if (tmp == NULL && number * size != 0) - errx (1, "calloc %lu failed", (unsigned long)number * size); - return tmp; -} diff --git a/kerberosV/src/lib/roken/emalloc.c b/kerberosV/src/lib/roken/emalloc.c deleted file mode 100644 index 2520230a354..00000000000 --- a/kerberosV/src/lib/roken/emalloc.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#include -#include - -#include "roken.h" - -/* - * Like malloc but never fails. - */ - -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL -emalloc (size_t sz) -{ - void *tmp = malloc (sz); - - if (tmp == NULL && sz != 0) - errx (1, "malloc %lu failed", (unsigned long)sz); - return tmp; -} diff --git a/kerberosV/src/lib/roken/environment.c b/kerberosV/src/lib/roken/environment.c deleted file mode 100644 index 64c354d62bb..00000000000 --- a/kerberosV/src/lib/roken/environment.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2000, 2005 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 - -#include -#include -#include -#include "roken.h" - -/* find assignment in env list; len is length of variable including - * equal - */ - -static int -find_var(char **env, char *assignment, size_t len) -{ - int i; - for(i = 0; env != NULL && env[i] != NULL; i++) - if(strncmp(env[i], assignment, len) == 0) - return i; - return -1; -} - -/* - * return count of environment assignments from open file F in - * assigned and list of malloced strings in env, return 0 or errno - * number - */ - -static int -read_env_file(FILE *F, char ***env, int *assigned) -{ - int idx = 0; - int i; - char **l; - char buf[BUFSIZ], *p, *r; - char **tmp; - int ret = 0; - - *assigned = 0; - - for(idx = 0; *env != NULL && (*env)[idx] != NULL; idx++); - l = *env; - - /* This is somewhat more relaxed on what it accepts then - * Wietses sysv_environ from K4 was... - */ - while (fgets(buf, BUFSIZ, F) != NULL) { - buf[strcspn(buf, "#\n")] = '\0'; - - for(p = buf; isspace((unsigned char)*p); p++); - if (*p == '\0') - continue; - - /* Here one should check that it's a 'valid' env string... */ - r = strchr(p, '='); - if (r == NULL) - continue; - - if((i = find_var(l, p, r - p + 1)) >= 0) { - char *val = strdup(p); - if(val == NULL) { - ret = ENOMEM; - break; - } - free(l[i]); - l[i] = val; - (*assigned)++; - continue; - } - - tmp = realloc(l, (idx+2) * sizeof (char *)); - if(tmp == NULL) { - ret = ENOMEM; - break; - } - - l = tmp; - l[idx] = strdup(p); - if(l[idx] == NULL) { - ret = ENOMEM; - break; - } - l[++idx] = NULL; - (*assigned)++; - } - if(ferror(F)) - ret = errno; - *env = l; - return ret; -} - -/* - * return count of environment assignments from file and - * list of malloced strings in `env' - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -read_environment(const char *file, char ***env) -{ - int assigned; - FILE *F; - - if ((F = fopen(file, "r")) == NULL) - return 0; - - read_env_file(F, env, &assigned); - fclose(F); - return assigned; -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -free_environment(char **env) -{ - int i; - if (env == NULL) - return; - for (i = 0; env[i]; i++) - free(env[i]); - free(env); -} diff --git a/kerberosV/src/lib/roken/eread.c b/kerberosV/src/lib/roken/eread.c deleted file mode 100644 index ba30f0230c5..00000000000 --- a/kerberosV/src/lib/roken/eread.c +++ /dev/null @@ -1,51 +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 - -#include "roken.h" - -/* - * Like read but never fails (and never returns partial data). - */ - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/erealloc.c b/kerberosV/src/lib/roken/erealloc.c deleted file mode 100644 index 1c30ecc60bf..00000000000 --- a/kerberosV/src/lib/roken/erealloc.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#include -#include - -#include "roken.h" - -/* - * Like realloc but never fails. - */ - -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL -erealloc (void *ptr, size_t sz) -{ - void *tmp = realloc (ptr, sz); - - if (tmp == NULL && sz != 0) - errx (1, "realloc %lu failed", (unsigned long)sz); - return tmp; -} diff --git a/kerberosV/src/lib/roken/err.c b/kerberosV/src/lib/roken/err.c deleted file mode 100644 index 5fbe84fdf76..00000000000 --- a/kerberosV/src/lib/roken/err.c +++ /dev/null @@ -1,45 +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. - */ - -#include - -#include "err.h" - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -err(int eval, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - verr(eval, fmt, ap); - va_end(ap); -} diff --git a/kerberosV/src/lib/roken/err.hin b/kerberosV/src/lib/roken/err.hin deleted file mode 100644 index aef85f4aa29..00000000000 --- a/kerberosV/src/lib/roken/err.hin +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 1995 - 2004 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: err.hin,v 1.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __ERR_H__ -#define __ERR_H__ - -#include -#include -#include -#include -#include - -#if !defined(__GNUC__) && !defined(__attribute__) -#define __attribute__(x) -#endif - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -verr(int eval, const char *fmt, va_list ap) - __attribute__ ((noreturn, format (printf, 2, 0))); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -err(int eval, const char *fmt, ...) - __attribute__ ((noreturn, format (printf, 2, 3))); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -verrx(int eval, const char *fmt, va_list ap) - __attribute__ ((noreturn, format (printf, 2, 0))); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -errx(int eval, const char *fmt, ...) - __attribute__ ((noreturn, format (printf, 2, 3))); -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -vwarn(const char *fmt, va_list ap) - __attribute__ ((format (printf, 1, 0))); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -warn(const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -vwarnx(const char *fmt, va_list ap) - __attribute__ ((format (printf, 1, 0))); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -warnx(const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))); - -#endif /* __ERR_H__ */ diff --git a/kerberosV/src/lib/roken/errx.c b/kerberosV/src/lib/roken/errx.c deleted file mode 100644 index f75ad0179e3..00000000000 --- a/kerberosV/src/lib/roken/errx.c +++ /dev/null @@ -1,45 +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. - */ - -#include - -#include "err.h" - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -errx(int eval, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - verrx(eval, fmt, ap); - va_end(ap); -} diff --git a/kerberosV/src/lib/roken/esetenv.c b/kerberosV/src/lib/roken/esetenv.c deleted file mode 100644 index 3cbf5ed365e..00000000000 --- a/kerberosV/src/lib/roken/esetenv.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2000, 2001 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 - -#include "roken.h" - -#include - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -esetenv(const char *var, const char *val, int rewrite) -{ - if (setenv (rk_UNCONST(var), rk_UNCONST(val), rewrite)) - errx (1, "failed setting environment variable %s", var); -} diff --git a/kerberosV/src/lib/roken/estrdup.c b/kerberosV/src/lib/roken/estrdup.c deleted file mode 100644 index d275a2830b0..00000000000 --- a/kerberosV/src/lib/roken/estrdup.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#include -#include - -#include "roken.h" - -/* - * Like strdup but never fails. - */ - -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -estrdup (const char *str) -{ - char *tmp = strdup (str); - - if (tmp == NULL) - errx (1, "strdup failed"); - return tmp; -} diff --git a/kerberosV/src/lib/roken/ewrite.c b/kerberosV/src/lib/roken/ewrite.c deleted file mode 100644 index fce57052922..00000000000 --- a/kerberosV/src/lib/roken/ewrite.c +++ /dev/null @@ -1,51 +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 - -#include "roken.h" - -/* - * Like write but never fails (and never returns partial data). - */ - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/fchown.c b/kerberosV/src/lib/roken/fchown.c deleted file mode 100644 index 050c2dd3be7..00000000000 --- a/kerberosV/src/lib/roken/fchown.c +++ /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. - */ - -#include - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -fchown(int fd, uid_t owner, gid_t group) -{ - return 0; -} diff --git a/kerberosV/src/lib/roken/flock.c b/kerberosV/src/lib/roken/flock.c deleted file mode 100644 index 068d09929e1..00000000000 --- a/kerberosV/src/lib/roken/flock.c +++ /dev/null @@ -1,154 +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. - */ - -#include - -#ifndef HAVE_FLOCK - -#include "roken.h" - -#define OP_MASK (LOCK_SH | LOCK_EX | LOCK_UN) - - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_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; - -#elif defined(_WIN32) - /* Windows */ - -#define FLOCK_OFFSET_LOW 0 -#define FLOCK_OFFSET_HIGH 0 -#define FLOCK_LENGTH_LOW 0x00000000 -#define FLOCK_LENGTH_HIGH 0x80000000 - - HANDLE hFile; - OVERLAPPED ov; - BOOL rv = FALSE; - DWORD f = 0; - - hFile = (HANDLE) _get_osfhandle(fd); - if (hFile == NULL || hFile == INVALID_HANDLE_VALUE) { - _set_errno(EBADF); - return -1; - } - - ZeroMemory(&ov, sizeof(ov)); - ov.hEvent = NULL; - ov.Offset = FLOCK_OFFSET_LOW; - ov.OffsetHigh = FLOCK_OFFSET_HIGH; - - if (operation & LOCK_NB) - f = LOCKFILE_FAIL_IMMEDIATELY; - - switch (operation & OP_MASK) { - case LOCK_UN: /* Unlock */ - rv = UnlockFileEx(hFile, 0, - FLOCK_LENGTH_LOW, FLOCK_LENGTH_HIGH, &ov); - break; - - case LOCK_SH: /* Shared lock */ - rv = LockFileEx(hFile, f, 0, - FLOCK_LENGTH_LOW, FLOCK_LENGTH_HIGH, &ov); - break; - - case LOCK_EX: /* Exclusive lock */ - rv = LockFileEx(hFile, f|LOCKFILE_EXCLUSIVE_LOCK, 0, - FLOCK_LENGTH_LOW, FLOCK_LENGTH_HIGH, - &ov); - break; - - default: - _set_errno(EINVAL); - return -1; - } - - if (!rv) { - switch (GetLastError()) { - case ERROR_SHARING_VIOLATION: - case ERROR_LOCK_VIOLATION: - case ERROR_IO_PENDING: - _set_errno(EWOULDBLOCK); - break; - - case ERROR_ACCESS_DENIED: - _set_errno(EACCES); - break; - - default: - _set_errno(ENOLCK); - } - return -1; - } - - return 0; - -#else - return -1; -#endif -} - -#endif - diff --git a/kerberosV/src/lib/roken/fnmatch.c b/kerberosV/src/lib/roken/fnmatch.c deleted file mode 100644 index 7dfe492179d..00000000000 --- a/kerberosV/src/lib/roken/fnmatch.c +++ /dev/null @@ -1,175 +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. 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. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include -#include - -#define EOS '\0' - -static const char *rangematch (const char *, int, int); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_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 (!rk_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/kerberosV/src/lib/roken/fnmatch.hin b/kerberosV/src/lib/roken/fnmatch.hin deleted file mode 100644 index fd96656de85..00000000000 --- a/kerberosV/src/lib/roken/fnmatch.hin +++ /dev/null @@ -1,66 +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. 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_ - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __stdcall -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#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 ROKEN_LIB_FUNCTION -rk_fnmatch (const char *, const char *, int); - -#define fnmatch(a,b,c) rk_fnmatch(a,b,c) - -#ifdef __cplusplus -} -#endif - -#endif /* !_FNMATCH_H_ */ diff --git a/kerberosV/src/lib/roken/freeaddrinfo.c b/kerberosV/src/lib/roken/freeaddrinfo.c deleted file mode 100644 index 7132e95dd38..00000000000 --- a/kerberosV/src/lib/roken/freeaddrinfo.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#include "roken.h" - -/* - * free the list of `struct addrinfo' starting at `ai' - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -freeaddrinfo(struct addrinfo *ai) -{ - struct addrinfo *tofree; - - while(ai != NULL) { - free (ai->ai_canonname); - free (ai->ai_addr); - tofree = ai; - ai = ai->ai_next; - free (tofree); - } -} diff --git a/kerberosV/src/lib/roken/freehostent.c b/kerberosV/src/lib/roken/freehostent.c deleted file mode 100644 index 61fbb223b5e..00000000000 --- a/kerberosV/src/lib/roken/freehostent.c +++ /dev/null @@ -1,59 +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 - -#include "roken.h" - -/* - * free a malloced hostent - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/gai_strerror.c b/kerberosV/src/lib/roken/gai_strerror.c deleted file mode 100644 index 1e326bee367..00000000000 --- a/kerberosV/src/lib/roken/gai_strerror.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. - */ - -#include - -#include "roken.h" - -static struct gai_error { - int code; - const char *str; -} errors[] = { -{EAI_NOERROR, "no error"}, -#ifdef EAI_ADDRFAMILY -{EAI_ADDRFAMILY, "address family for nodename not supported"}, -#endif -{EAI_AGAIN, "temporary failure in name resolution"}, -{EAI_BADFLAGS, "invalid value for ai_flags"}, -{EAI_FAIL, "non-recoverable failure in name resolution"}, -{EAI_FAMILY, "ai_family not supported"}, -{EAI_MEMORY, "memory allocation failure"}, -#ifdef EAI_NODATA -{EAI_NODATA, "no address associated with nodename"}, -#endif -{EAI_NONAME, "nodename nor servname provided, or not known"}, -{EAI_SERVICE, "servname not supported for ai_socktype"}, -{EAI_SOCKTYPE, "ai_socktype not supported"}, -{EAI_SYSTEM, "system error returned in errno"}, -{0, NULL}, -}; - -/* - * - */ - -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL -gai_strerror(int ecode) -{ - struct gai_error *g; - - for (g = errors; g->str != NULL; ++g) - if (g->code == ecode) - return g->str; - return "unknown error code in gai_strerror"; -} diff --git a/kerberosV/src/lib/roken/get_default_username.c b/kerberosV/src/lib/roken/get_default_username.c deleted file mode 100644 index da6806b15b4..00000000000 --- a/kerberosV/src/lib/roken/get_default_username.c +++ /dev/null @@ -1,83 +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 - -#include "roken.h" - -/* - * Try to return what should be considered the default username or - * NULL if we can't guess at all. - */ - -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL -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 -#ifdef _WIN32 - /* TODO: We can call GetUserNameEx() and figure out a - username. However, callers do not free the return value of this - function. */ -#endif - - return user; -} diff --git a/kerberosV/src/lib/roken/get_window_size.c b/kerberosV/src/lib/roken/get_window_size.c deleted file mode 100644 index 5a4a1753fef..00000000000 --- a/kerberosV/src/lib/roken/get_window_size.c +++ /dev/null @@ -1,132 +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 - -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#if 0 /* Where were those needed? /confused */ -#ifdef HAVE_SYS_PROC_H -#include -#endif - -#ifdef HAVE_SYS_TTY_H -#include -#endif -#endif - -#ifdef HAVE_TERMIOS_H -#include -#endif - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -get_window_size(int fd, int *lines, int *columns) -{ - char *s; - -#if defined(TIOCGWINSZ) - { - struct winsize ws; - int ret; - ret = ioctl(fd, TIOCGWINSZ, &ws); - if (ret != -1) { - if (lines) - *lines = ws.ws_row; - if (columns) - *columns = ws.ws_col; - return 0; - } - } -#elif defined(TIOCGSIZE) - { - struct ttysize ts; - int ret; - ret = ioctl(fd, TIOCGSIZE, &ts); - if (ret != -1) { - if (lines) - *lines = ts.ws_lines; - if (columns) - *columns = ts.ts_cols; - return 0; - } - } -#elif defined(HAVE__SCRSIZE) - { - int dst[2]; - - _scrsize(dst); - if (lines) - *lines = dst[1]; - if (columns) - *columns = dst[0]; - return 0; - } -#elif defined(_WIN32) - { - intptr_t fh = 0; - CONSOLE_SCREEN_BUFFER_INFO sb_info; - - fh = _get_osfhandle(fd); - if (fh != (intptr_t) INVALID_HANDLE_VALUE && - GetConsoleScreenBufferInfo((HANDLE) fh, &sb_info)) { - if (lines) - *lines = 1 + sb_info.srWindow.Bottom - sb_info.srWindow.Top; - if (columns) - *columns = 1 + sb_info.srWindow.Right - sb_info.srWindow.Left; - - return 0; - } - } -#endif - if (columns) { - if ((s = getenv("COLUMNS"))) - *columns = atoi(s); - else - return -1; - } - if (lines) { - if ((s = getenv("LINES"))) - *lines = atoi(s); - else - return -1; - } - return 0; -} diff --git a/kerberosV/src/lib/roken/getaddrinfo-test.c b/kerberosV/src/lib/roken/getaddrinfo-test.c deleted file mode 100644 index a2b726f9a2d..00000000000 --- a/kerberosV/src/lib/roken/getaddrinfo-test.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -#include "roken.h" -#include "getarg.h" - -static int flags; -static int family; -static int socktype; - -static int verbose_counter; -static int version_flag; -static int help_flag; - -static struct getargs args[] = { - {"verbose", 0, arg_counter, &verbose_counter,"verbose", NULL}, - {"flags", 0, arg_integer, &flags, "flags", NULL}, - {"family", 0, arg_integer, &family, "family", NULL}, - {"socktype",0, arg_integer, &socktype, "socktype", NULL}, - {"version", 0, arg_flag, &version_flag, "print version",NULL}, - {"help", 0, arg_flag, &help_flag, NULL, NULL} -}; - -static void -usage(int ret) -{ - arg_printusage (args, - sizeof(args) / sizeof(args[0]), - NULL, - "[nodename servname...]"); - exit (ret); -} - -static void -doit (const char *nodename, const char *servname) -{ - struct addrinfo hints; - struct addrinfo *res, *r; - int ret; - - if (verbose_counter) - printf ("(%s,%s)... ", nodename ? nodename : "null", servname); - - memset (&hints, 0, sizeof(hints)); - hints.ai_flags = flags; - hints.ai_family = family; - hints.ai_socktype = socktype; - - ret = getaddrinfo (nodename, servname, &hints, &res); - if (ret) - errx(1, "error: %s\n", gai_strerror(ret)); - - if (verbose_counter) - printf ("\n"); - - for (r = res; r != NULL; r = r->ai_next) { - char addrstr[256]; - - if (inet_ntop (r->ai_family, - socket_get_address (r->ai_addr), - addrstr, sizeof(addrstr)) == NULL) { - if (verbose_counter) - printf ("\tbad address?\n"); - continue; - } - if (verbose_counter) { - printf ("\tfamily = %d, socktype = %d, protocol = %d, " - "address = \"%s\", port = %d", - r->ai_family, r->ai_socktype, r->ai_protocol, - addrstr, - ntohs(socket_get_port (r->ai_addr))); - if (r->ai_canonname) - printf (", canonname = \"%s\"", r->ai_canonname); - printf ("\n"); - } - } - freeaddrinfo (res); -} - -int -main(int argc, char **argv) -{ - int optidx = 0; - int i; - - setprogname (argv[0]); - - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, - &optidx)) - usage (1); - - if (help_flag) - usage (0); - - if (version_flag) { - fprintf (stderr, "%s from %s-%s\n", getprogname(), PACKAGE, VERSION); - return 0; - } - - argc -= optidx; - argv += optidx; - - if (argc % 2 != 0) - usage (1); - - for (i = 0; i < argc; i += 2) { - const char *nodename = argv[i]; - - if (strcmp (nodename, "null") == 0) - nodename = NULL; - - doit (nodename, argv[i+1]); - } - return 0; -} diff --git a/kerberosV/src/lib/roken/getaddrinfo.c b/kerberosV/src/lib/roken/getaddrinfo.c deleted file mode 100644 index c8ed95413fe..00000000000 --- a/kerberosV/src/lib/roken/getaddrinfo.c +++ /dev/null @@ -1,414 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#include "roken.h" - -/* - * uses hints->ai_socktype and hints->ai_protocol - */ - -static int -get_port_protocol_socktype (const char *servname, - const struct addrinfo *hints, - int *port, - int *protocol, - int *socktype) -{ - struct servent *se; - const char *proto_str = NULL; - - *socktype = 0; - - if (hints != NULL && hints->ai_protocol != 0) { - struct protoent *protoent = getprotobynumber (hints->ai_protocol); - - if (protoent == NULL) - return EAI_SOCKTYPE; /* XXX */ - - proto_str = protoent->p_name; - *protocol = protoent->p_proto; - } - - if (hints != NULL) - *socktype = hints->ai_socktype; - - if (*socktype == SOCK_STREAM) { - se = getservbyname (servname, proto_str ? proto_str : "tcp"); - if (proto_str == NULL) - *protocol = IPPROTO_TCP; - } else if (*socktype == SOCK_DGRAM) { - se = getservbyname (servname, proto_str ? proto_str : "udp"); - if (proto_str == NULL) - *protocol = IPPROTO_UDP; - } else if (*socktype == 0) { - if (proto_str != NULL) { - se = getservbyname (servname, proto_str); - } else { - se = getservbyname (servname, "tcp"); - *protocol = IPPROTO_TCP; - *socktype = SOCK_STREAM; - if (se == NULL) { - se = getservbyname (servname, "udp"); - *protocol = IPPROTO_UDP; - *socktype = SOCK_DGRAM; - } - } - } else - return EAI_SOCKTYPE; - - if (se == NULL) { - char *endstr; - - *port = htons(strtol (servname, &endstr, 10)); - if (servname == endstr) - return EAI_NONAME; - } else { - *port = se->s_port; - } - return 0; -} - -static int -add_one (int port, int protocol, int socktype, - struct addrinfo ***ptr, - int (*func)(struct addrinfo *, void *data, int port), - void *data, - char *canonname) -{ - struct addrinfo *a; - int ret; - - a = malloc (sizeof (*a)); - if (a == NULL) - return EAI_MEMORY; - memset (a, 0, sizeof(*a)); - a->ai_flags = 0; - a->ai_next = NULL; - a->ai_protocol = protocol; - a->ai_socktype = socktype; - a->ai_canonname = canonname; - ret = (*func)(a, data, port); - if (ret) { - free (a); - return ret; - } - **ptr = a; - *ptr = &a->ai_next; - return 0; -} - -static int -const_v4 (struct addrinfo *a, void *data, int port) -{ - struct sockaddr_in *sin4; - struct in_addr *addr = (struct in_addr *)data; - - a->ai_family = PF_INET; - a->ai_addrlen = sizeof(*sin4); - a->ai_addr = malloc (sizeof(*sin4)); - if (a->ai_addr == NULL) - return EAI_MEMORY; - sin4 = (struct sockaddr_in *)a->ai_addr; - memset (sin4, 0, sizeof(*sin4)); - sin4->sin_family = AF_INET; - sin4->sin_port = port; - sin4->sin_addr = *addr; - return 0; -} - -#ifdef HAVE_IPV6 -static int -const_v6 (struct addrinfo *a, void *data, int port) -{ - struct sockaddr_in6 *sin6; - struct in6_addr *addr = (struct in6_addr *)data; - - a->ai_family = PF_INET6; - a->ai_addrlen = sizeof(*sin6); - a->ai_addr = malloc (sizeof(*sin6)); - if (a->ai_addr == NULL) - return EAI_MEMORY; - sin6 = (struct sockaddr_in6 *)a->ai_addr; - memset (sin6, 0, sizeof(*sin6)); - sin6->sin6_family = AF_INET6; - sin6->sin6_port = port; - sin6->sin6_addr = *addr; - return 0; -} -#endif - -/* this is mostly a hack for some versions of AIX that has a prototype - for in6addr_loopback but no actual symbol in libc */ -#if defined(HAVE_IPV6) && !defined(HAVE_IN6ADDR_LOOPBACK) && defined(IN6ADDR_LOOPBACK_INIT) -#define in6addr_loopback _roken_in6addr_loopback -struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT; -#endif - -static int -get_null (const struct addrinfo *hints, - int port, int protocol, int socktype, - struct addrinfo **res) -{ - struct in_addr v4_addr; -#ifdef HAVE_IPV6 - struct in6_addr v6_addr; -#endif - struct addrinfo *first = NULL; - struct addrinfo **current = &first; - int family = PF_UNSPEC; - int ret; - - if (hints != NULL) - family = hints->ai_family; - - if (hints && hints->ai_flags & AI_PASSIVE) { - v4_addr.s_addr = INADDR_ANY; -#ifdef HAVE_IPV6 - v6_addr = in6addr_any; -#endif - } else { - v4_addr.s_addr = htonl(INADDR_LOOPBACK); -#ifdef HAVE_IPV6 - v6_addr = in6addr_loopback; -#endif - } - -#ifdef HAVE_IPV6 - if (family == PF_INET6 || family == PF_UNSPEC) { - ret = add_one (port, protocol, socktype, - ¤t, const_v6, &v6_addr, NULL); - } -#endif - if (family == PF_INET || family == PF_UNSPEC) { - ret = add_one (port, protocol, socktype, - ¤t, const_v4, &v4_addr, NULL); - } - *res = first; - return 0; -} - -static int -add_hostent (int port, int protocol, int socktype, - struct addrinfo ***current, - int (*func)(struct addrinfo *, void *data, int port), - struct hostent *he, int *flags) -{ - int ret; - char *canonname = NULL; - char **h; - - if (*flags & AI_CANONNAME) { - struct hostent *he2 = NULL; - const char *tmp_canon; - - tmp_canon = hostent_find_fqdn (he); - if (strchr (tmp_canon, '.') == NULL) { - int error; - - he2 = getipnodebyaddr (he->h_addr_list[0], he->h_length, - he->h_addrtype, &error); - if (he2 != NULL) { - const char *tmp = hostent_find_fqdn (he2); - - if (strchr (tmp, '.') != NULL) - tmp_canon = tmp; - } - } - - canonname = strdup (tmp_canon); - if (he2 != NULL) - freehostent (he2); - if (canonname == NULL) - return EAI_MEMORY; - } - - for (h = he->h_addr_list; *h != NULL; ++h) { - ret = add_one (port, protocol, socktype, - current, func, *h, canonname); - if (ret) - return ret; - if (*flags & AI_CANONNAME) { - *flags &= ~AI_CANONNAME; - canonname = NULL; - } - } - return 0; -} - -static int -get_number (const char *nodename, - const struct addrinfo *hints, - int port, int protocol, int socktype, - struct addrinfo **res) -{ - struct addrinfo *first = NULL; - struct addrinfo **current = &first; - int family = PF_UNSPEC; - int ret; - - if (hints != NULL) { - family = hints->ai_family; - } - -#ifdef HAVE_IPV6 - if (family == PF_INET6 || family == PF_UNSPEC) { - struct in6_addr v6_addr; - - if (inet_pton (PF_INET6, nodename, &v6_addr) == 1) { - ret = add_one (port, protocol, socktype, - ¤t, const_v6, &v6_addr, NULL); - *res = first; - return ret; - } - } -#endif - if (family == PF_INET || family == PF_UNSPEC) { - struct in_addr v4_addr; - - if (inet_pton (PF_INET, nodename, &v4_addr) == 1) { - ret = add_one (port, protocol, socktype, - ¤t, const_v4, &v4_addr, NULL); - *res = first; - return ret; - } - } - return EAI_NONAME; -} - -static int -get_nodes (const char *nodename, - const struct addrinfo *hints, - int port, int protocol, int socktype, - struct addrinfo **res) -{ - struct addrinfo *first = NULL; - struct addrinfo **current = &first; - int family = PF_UNSPEC; - int flags = 0; - int ret = EAI_NONAME; - int error; - - if (hints != NULL) { - family = hints->ai_family; - flags = hints->ai_flags; - } - -#ifdef HAVE_IPV6 - if (family == PF_INET6 || family == PF_UNSPEC) { - struct hostent *he; - - he = getipnodebyname (nodename, PF_INET6, 0, &error); - - if (he != NULL) { - ret = add_hostent (port, protocol, socktype, - ¤t, const_v6, he, &flags); - freehostent (he); - } - } -#endif - if (family == PF_INET || family == PF_UNSPEC) { - struct hostent *he; - - he = getipnodebyname (nodename, PF_INET, 0, &error); - - if (he != NULL) { - ret = add_hostent (port, protocol, socktype, - ¤t, const_v4, he, &flags); - freehostent (he); - } - } - *res = first; - return ret; -} - -/* - * hints: - * - * struct addrinfo { - * int ai_flags; - * int ai_family; - * int ai_socktype; - * int ai_protocol; - * ... - * }; - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getaddrinfo(const char *nodename, - const char *servname, - const struct addrinfo *hints, - struct addrinfo **res) -{ - int ret; - int port = 0; - int protocol = 0; - int socktype = 0; - - *res = NULL; - - if (servname == NULL && nodename == NULL) - return EAI_NONAME; - - if (hints != NULL - && hints->ai_family != PF_UNSPEC - && hints->ai_family != PF_INET -#ifdef HAVE_IPV6 - && hints->ai_family != PF_INET6 -#endif - ) - return EAI_FAMILY; - - if (servname != NULL) { - ret = get_port_protocol_socktype (servname, hints, - &port, &protocol, &socktype); - if (ret) - return ret; - } - if (nodename != NULL) { - ret = get_number (nodename, hints, port, protocol, socktype, res); - if (ret) { - if(hints && hints->ai_flags & AI_NUMERICHOST) - ret = EAI_NONAME; - else - ret = get_nodes (nodename, hints, port, protocol, socktype, - res); - } - } else { - ret = get_null (hints, port, protocol, socktype, res); - } - if (ret) - freeaddrinfo (*res); - return ret; -} diff --git a/kerberosV/src/lib/roken/getaddrinfo_hostspec.c b/kerberosV/src/lib/roken/getaddrinfo_hostspec.c deleted file mode 100644 index 454121992d3..00000000000 --- a/kerberosV/src/lib/roken/getaddrinfo_hostspec.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -#include "roken.h" - -/* getaddrinfo via string specifying host and port */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -roken_getaddrinfo_hostspec2(const char *hostspec, - int socktype, - int port, - struct addrinfo **ai) -{ - const char *p; - char portstr[NI_MAXSERV]; - char host[MAXHOSTNAMELEN]; - struct addrinfo hints; - int hostspec_len; - - struct hst { - const char *prefix; - int socktype; - int protocol; - int port; - } *hstp, hst[] = { - { "http://", SOCK_STREAM, IPPROTO_TCP, 80 }, - { "http/", SOCK_STREAM, IPPROTO_TCP, 80 }, - { "tcp/", SOCK_STREAM, IPPROTO_TCP, 0 }, - { "udp/", SOCK_DGRAM, IPPROTO_UDP, 0 }, - { NULL, 0, 0, 0 } - }; - - memset(&hints, 0, sizeof(hints)); - - hints.ai_socktype = socktype; - - for(hstp = hst; hstp->prefix; hstp++) { - if(strncmp(hostspec, hstp->prefix, strlen(hstp->prefix)) == 0) { - hints.ai_socktype = hstp->socktype; - hints.ai_protocol = hstp->protocol; - if(port == 0) - port = hstp->port; - hostspec += strlen(hstp->prefix); - break; - } - } - - p = strchr (hostspec, ':'); - if (p != NULL) { - char *end; - - port = strtol (p + 1, &end, 0); - hostspec_len = p - hostspec; - } else { - hostspec_len = strlen(hostspec); - } - snprintf (portstr, sizeof(portstr), "%u", port); - - snprintf (host, sizeof(host), "%.*s", hostspec_len, hostspec); - return getaddrinfo (host, portstr, &hints, ai); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -roken_getaddrinfo_hostspec(const char *hostspec, - int port, - struct addrinfo **ai) -{ - return roken_getaddrinfo_hostspec2(hostspec, 0, port, ai); -} diff --git a/kerberosV/src/lib/roken/getarg.3 b/kerberosV/src/lib/roken/getarg.3 deleted file mode 100644 index 9a3fc386e84..00000000000 --- a/kerberosV/src/lib/roken/getarg.3 +++ /dev/null @@ -1,341 +0,0 @@ -.\" Copyright (c) 1999 - 2002 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.3,v 1.2 2013/06/17 18:57:45 robert Exp $ -.Dd September 24, 1999 -.Dt GETARG 3 -.Os ROKEN -.Sh NAME -.Nm getarg , -.Nm arg_printusage -.Nd collect command line options -.Sh SYNOPSIS -.In 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 being 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. -.Pp -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, ENOMEM -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 Fl foo= Ns Ar bar . -Long option flags can either be specified as they are -.Pf ( Fl Fl help ) , -or with an (boolean parsable) option -.Pf ( Fl Fl help= Ns Ar yes , -.Fl Fl help= Ns Ar true , -or similar), or they can also be negated -.Pf ( Fl Fl no-help -is the same as -.Fl Fl help= Ns no ) , -and if you're really confused you can do it multiple times -.Pf ( Fl Fl no-no-help= Ns Ar false , -or even -.Fl Fl no-no-help= Ns Ar maybe ) . -.Sh EXAMPLE -.Bd -literal -#include -#include -#include - -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\en", progname); - exit(1); - } - if (strcmp(source, destination) == 0) { - fprintf(stderr, "%s: destination must be different from source\en"); - 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/kerberosV/src/lib/roken/getarg.c b/kerberosV/src/lib/roken/getarg.c deleted file mode 100644 index d6a50486895..00000000000 --- a/kerberosV/src/lib/roken/getarg.c +++ /dev/null @@ -1,607 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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 - -#include -#include -#include -#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, - char *(i18n)(const char *)) -{ - 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 = (*i18n)(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_strings) - s = "strings"; - else if (arg->type == arg_double) - s = "float"; - else - s = ""; - - 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, - char *(i18n)(const char *)) -{ - size_t 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 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, i18n); - 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, i18n); - printf("Fl Fl %s%s%s", - args[i].type == arg_negative_flag ? "no-" : "", - args[i].long_name, buf); - } - printf("\n"); - } else { - print_arg(buf, sizeof(buf), 1, 0, args + i, i18n); - printf(".Oo Fl %c%s \\*(Ba Xo\n", args[i].short_name, buf); - print_arg(buf, sizeof(buf), 1, 1, args + i, i18n); - printf(".Fl Fl %s%s\n.Xc\n.Oc\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, i18n); - printf("%s", buf); - if(args[i].long_name) - printf(" ,"); - printf("\n"); - } - if(args[i].long_name){ - printf(".Fl Fl %s%s", - args[i].type == arg_negative_flag ? "no-" : "", - args[i].long_name); - print_arg(buf, sizeof(buf), 1, 1, args + i, i18n); - 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; -} - -static char * -builtin_i18n(const char *str) -{ - return rk_UNCONST(str); -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -arg_printusage (struct getargs *args, - size_t num_args, - const char *progname, - const char *extra_string) -{ - arg_printusage_i18n(args, num_args, "Usage", - progname, extra_string, builtin_i18n); -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -arg_printusage_i18n (struct getargs *args, - size_t num_args, - const char *usage, - const char *progname, - const char *extra_string, - char *(*i18n)(const char *)) -{ - size_t i, max_len = 0; - char buf[128]; - int col = 0, columns; - - if (progname == NULL) - progname = getprogname(); - - if (i18n == NULL) - i18n = builtin_i18n; - - if(getenv("GETARGMANDOC")){ - mandoc_template(args, num_args, progname, extra_string, i18n); - return; - } - if(get_window_size(2, NULL, &columns) == -1) - columns = 80; - col = 0; - col += fprintf (stderr, "%s: %s", usage, progname); - buf[0] = '\0'; - for (i = 0; i < num_args; ++i) { - if(args[i].short_name && ISFLAG(args[i])) { - char s[2]; - if(buf[0] == '\0') - strlcpy(buf, "[-", sizeof(buf)); - s[0] = args[i].short_name; - s[1] = '\0'; - strlcat(buf, s, sizeof(buf)); - } - } - if(buf[0] != '\0') { - strlcat(buf, "]", sizeof(buf)); - col = check_column(stderr, col, strlen(buf) + 1, columns); - col += fprintf(stderr, " %s", buf); - } - - 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], i18n); - 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 && !ISFLAG(args[i])) { - 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], i18n); - 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) { - 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], i18n); - 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], i18n); - count += fprintf(stderr, "%s", buf); - } - while(count++ <= max_len) - putc (' ', stderr); - fprintf (stderr, "%s\n", (*i18n)(args[i].help)); - } - } -} - -static int -add_string(getarg_strings *s, char *value) -{ - char **strings; - - strings = realloc(s->strings, (s->num_strings + 1) * sizeof(*s->strings)); - if (strings == NULL) { - free(s->strings); - s->strings = NULL; - s->num_strings = 0; - return ENOMEM; - } - s->strings = strings; - s->strings[s->num_strings] = value; - s->num_strings++; - return 0; -} - -static int -arg_match_long(struct getargs *args, size_t num_args, - char *argv, int argc, char **rargv, int *goptind) -{ - size_t i; - char *goptarg = NULL; - int negate = 0; - int partial_match = 0; - struct getargs *partial = NULL; - struct getargs *current = NULL; - int argv_len; - char *p; - int p_len; - - 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); - p = argv; - 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]; - } - goptarg = 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(*goptarg == '\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(goptarg + 1, "%d", &tmp) != 1) - return ARG_ERR_BAD_ARG; - *(int*)current->value = tmp; - return 0; - } - case arg_string: - { - *(char**)current->value = goptarg + 1; - return 0; - } - case arg_strings: - { - return add_string((getarg_strings*)current->value, goptarg + 1); - } - case arg_flag: - case arg_negative_flag: - { - int *flag = current->value; - if(*goptarg == '\0' || - strcmp(goptarg + 1, "yes") == 0 || - strcmp(goptarg + 1, "true") == 0){ - *flag = !negate; - return 0; - } else if (*goptarg && strcmp(goptarg + 1, "maybe") == 0) { - *flag = rk_random() & 1; - } else { - *flag = negate; - return 0; - } - return ARG_ERR_BAD_ARG; - } - case arg_counter : - { - int val; - - if (*goptarg == '\0') - val = 1; - else if(sscanf(goptarg + 1, "%d", &val) != 1) - return ARG_ERR_BAD_ARG; - *(int *)current->value += val; - return 0; - } - case arg_double: - { - double tmp; - if(sscanf(goptarg + 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[*goptind]; - return (*c->func)(FALSE, argc, rargv, goptind, &o, c->data); - } - - default: - abort (); - UNREACHABLE(return 0); - } -} - -static int -arg_match_short (struct getargs *args, size_t num_args, - char *argv, int argc, char **rargv, int *goptind) -{ - size_t j, k; - - for(j = 1; j > 0 && j < strlen(rargv[*goptind]); j++) { - for(k = 0; k < num_args; k++) { - char *goptarg; - - 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; - int a = (int)j; - - if((*c->func)(TRUE, argc, rargv, goptind, &a, c->data)) - return ARG_ERR_BAD_ARG; - j = a; - break; - } - - if(argv[j + 1]) - goptarg = &argv[j + 1]; - else { - ++*goptind; - goptarg = rargv[*goptind]; - } - if(goptarg == NULL) { - --*goptind; - return ARG_ERR_NO_ARG; - } - if(args[k].type == arg_integer) { - int tmp; - if(sscanf(goptarg, "%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 = goptarg; - return 0; - } else if(args[k].type == arg_strings) { - return add_string((getarg_strings*)args[k].value, goptarg); - } else if(args[k].type == arg_double) { - double tmp; - if(sscanf(goptarg, "%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; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getarg(struct getargs *args, size_t num_args, - int argc, char **argv, int *goptind) -{ - int i; - int ret = 0; - - rk_random_init(); - (*goptind)++; - for(i = *goptind; 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; - } - *goptind = i; - return ret; -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -free_getarg_strings (getarg_strings *s) -{ - free (s->strings); -} - -#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 goptind = 0; - while(getarg(args, 5, argc, argv, &goptind)) - printf("Bad arg: %s\n", argv[goptind]); - 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/kerberosV/src/lib/roken/getarg.h b/kerberosV/src/lib/roken/getarg.h deleted file mode 100644 index b3daff4085b..00000000000 --- a/kerberosV/src/lib/roken/getarg.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __GETARG_H__ -#define __GETARG_H__ - -#include - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -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 *goptind, - int *goptarg, - void *data); - -typedef struct getarg_collect_info { - getarg_collect_func func; - void *data; -} getarg_collect_info; - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getarg(struct getargs *args, size_t num_args, - int argc, char **argv, int *goptind); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -arg_printusage (struct getargs *args, - size_t num_args, - const char *progname, - const char *extra_string); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -arg_printusage_i18n (struct getargs *args, - size_t num_args, - const char *usage, - const char *progname, - const char *extra_string, - char *(*i18n)(const char *)); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -free_getarg_strings (getarg_strings *); - -#endif /* __GETARG_H__ */ diff --git a/kerberosV/src/lib/roken/getcap.c b/kerberosV/src/lib/roken/getcap.c deleted file mode 100644 index 42f8dc07d80..00000000000 --- a/kerberosV/src/lib/roken/getcap.c +++ /dev/null @@ -1,1129 +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. 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. - */ - -#include - -#include "roken.h" - -#include -#include -#if defined(HAVE_DB_185_H) -#include -#elif defined(HAVE_DB_H) -#include -#endif -#include -#include -#include -#include -#include -#include -#include - -#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 0 /* - * Don't use db support unless it's build into libc but we don't - * check for that now, so just disable the code. - */ -#if defined(HAVE_DBOPEN) && defined(HAVE_DB_H) -#define USE_DB -#endif -#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 *); - - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL cgetset(const char *ent); -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL cgetcap(char *buf, const char *cap, int type); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL cgetent(char **buf, char **db_array, const char *name); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL cgetmatch(const char *buf, const char *name); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL cgetclose(void); -#if 0 -int cgetfirst(char **buf, char **db_array); -int cgetnext(char **bp, char **db_array); -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL cgetstr(char *buf, const char *cap, char **str); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL cgetustr(char *buf, const char *cap, char **str); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL 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. - */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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. - */ -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -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. - */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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) { - size_t len = topreclen + BFRAG; - if ((record = malloc (len)) == NULL) { - errno = ENOMEM; - return (-2); - } - (void)strlcpy(record, toprec, len); - 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); - if (cbuf == NULL) - return (-2); - 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; - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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). - */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -cgetstr(char *buf, const char *cap, char **str) -{ - u_int m_room; - const char *bp; - char *mp; - int len; - char *mem, *nmem; - - *str = NULL; - - /* - * 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 ((nmem = realloc(mem, size + SFRAG)) == NULL) { - free(mem); - return (-2); - } - mem = nmem; - 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 ((nmem = realloc(mem, (size_t)(mp - mem))) == NULL) { - free(mem); - return (-2); - } - mem = nmem; - } - *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). - */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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. - */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/getcwd.c b/kerberosV/src/lib/roken/getcwd.c deleted file mode 100644 index f8917b245b4..00000000000 --- a/kerberosV/src/lib/roken/getcwd.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. - */ - -#include - -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#include "roken.h" - -ROKEN_LIB_FUNCTION char* ROKEN_LIB_CALL -getcwd(char *path, size_t size) -{ - char xxx[MaxPathLen]; - char *ret; - ret = getwd(xxx); - if(ret) - strlcpy(path, xxx, size); - return ret; -} diff --git a/kerberosV/src/lib/roken/getdtablesize.c b/kerberosV/src/lib/roken/getdtablesize.c deleted file mode 100644 index 08c0661faa1..00000000000 --- a/kerberosV/src/lib/roken/getdtablesize.c +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 1995-2001 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 - -#include "roken.h" - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#ifdef HAVE_SYS_RESOURCE_H -#include -#endif - -#ifdef HAVE_SYS_SYSCTL_H -#include -#endif - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getdtablesize(void) -{ - int files = -1; -#if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX) - files = sysconf(_SC_OPEN_MAX); -#else /* !defined(HAVE_SYSCONF) */ -#if defined(HAVE_GETRLIMIT) && defined(RLIMIT_NOFILE) - struct rlimit res; - if (getrlimit(RLIMIT_NOFILE, &res) == 0) - files = res.rlim_cur; -#else /* !definded(HAVE_GETRLIMIT) */ -#if defined(HAVE_SYSCTL) && defined(CTL_KERN) && defined(KERN_MAXFILES) - int mib[2]; - size_t len; - - mib[0] = CTL_KERN; - mib[1] = KERN_MAXFILES; - len = sizeof(files); - sysctl(&mib, 2, &files, sizeof(files), NULL, 0); -#endif /* defined(HAVE_SYSCTL) */ -#endif /* !definded(HAVE_GETRLIMIT) */ -#endif /* !defined(HAVE_SYSCONF) */ - -#ifdef OPEN_MAX - if (files < 0) - files = OPEN_MAX; -#endif - -#ifdef NOFILE - if (files < 0) - files = NOFILE; -#endif - - return files; -} diff --git a/kerberosV/src/lib/roken/getegid.c b/kerberosV/src/lib/roken/getegid.c deleted file mode 100644 index 663fb1df1be..00000000000 --- a/kerberosV/src/lib/roken/getegid.c +++ /dev/null @@ -1,46 +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. - */ - -#include - -#include "roken.h" - -#ifndef HAVE_GETEGID - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getegid(void) -{ - return getgid(); -} - -#endif diff --git a/kerberosV/src/lib/roken/geteuid.c b/kerberosV/src/lib/roken/geteuid.c deleted file mode 100644 index 598a73929fd..00000000000 --- a/kerberosV/src/lib/roken/geteuid.c +++ /dev/null @@ -1,46 +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. - */ - -#include - -#include "roken.h" - -#ifndef HAVE_GETEUID - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -geteuid(void) -{ - return getuid(); -} - -#endif diff --git a/kerberosV/src/lib/roken/getgid.c b/kerberosV/src/lib/roken/getgid.c deleted file mode 100644 index b24ceebc892..00000000000 --- a/kerberosV/src/lib/roken/getgid.c +++ /dev/null @@ -1,45 +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. - */ - -#include -#include "roken.h" - -#ifndef HAVE_GETGID - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getgid(void) -{ - return 17; -} - -#endif diff --git a/kerberosV/src/lib/roken/gethostname.c b/kerberosV/src/lib/roken/gethostname.c deleted file mode 100644 index 83890914028..00000000000 --- a/kerberosV/src/lib/roken/gethostname.c +++ /dev/null @@ -1,70 +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. - */ - -#include -#include "roken.h" - -#ifndef HAVE_GETHOSTNAME - -#ifdef HAVE_SYS_UTSNAME_H -#include -#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).) - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/getifaddrs-test.c b/kerberosV/src/lib/roken/getifaddrs-test.c deleted file mode 100644 index 8d0725a68f9..00000000000 --- a/kerberosV/src/lib/roken/getifaddrs-test.c +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2009 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Portions Copyright (c) 2009, Secure Endpoints Inc. 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 -#include -#include "getarg.h" - -#include "roken.h" - -#include - -static int verbose_counter; -static int version_flag; -static int help_flag; - -static struct getargs args[] = { - {"verbose", 0, arg_counter, &verbose_counter,"verbose", NULL}, - {"version", 0, arg_flag, &version_flag, "print version",NULL}, - {"help", 0, arg_flag, &help_flag, NULL, NULL} -}; - -static void -usage(int ret) -{ - arg_printusage (args, - sizeof(args) / sizeof(args[0]), - NULL, ""); - exit (ret); -} - - -static void -print_addr(const char *s, struct sockaddr *sa) -{ - int i; - printf(" %s=%d/", s, sa->sa_family); -#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - for(i = 0; i < sa->sa_len - ((long)sa->sa_data - (long)&sa->sa_family); i++) - printf("%02x", ((unsigned char*)sa->sa_data)[i]); -#else - for(i = 0; i < sizeof(sa->sa_data); i++) - printf("%02x", ((unsigned char*)sa->sa_data)[i]); -#endif - printf("\n"); -} - -static void -print_ifaddrs(struct ifaddrs *x) -{ - struct ifaddrs *p; - - for(p = x; p; p = p->ifa_next) { - if (verbose_counter) { - printf("%s\n", p->ifa_name); - printf(" flags=%x\n", p->ifa_flags); - if(p->ifa_addr) - print_addr("addr", p->ifa_addr); - if(p->ifa_dstaddr) - print_addr("dstaddr", p->ifa_dstaddr); - if(p->ifa_netmask) - print_addr("netmask", p->ifa_netmask); - printf(" %p\n", p->ifa_data); - } - } -} - -int -main(int argc, char **argv) -{ - struct ifaddrs *addrs = NULL; - int ret, optidx = 0; - - setprogname (argv[0]); - - if (getarg (args, sizeof(args) / sizeof(args[0]), argc, argv, - &optidx)) - usage (1); - - if (help_flag) - usage (0); - - if (version_flag) { - fprintf (stderr, "%s from %s-%s\n", getprogname(), PACKAGE, VERSION); - return 0; - } - - if (rk_SOCK_INIT()) - errx(1, "Couldn't initialize sockets. Err=%d\n", rk_SOCK_ERRNO); - - ret = getifaddrs(&addrs); - if (ret != 0) - err(1, "getifaddrs"); - - if (addrs == NULL) - errx(1, "address == NULL"); - - print_ifaddrs(addrs); - - /* Check that freeifaddrs doesn't crash */ - freeifaddrs(addrs); - - rk_SOCK_EXIT(); - - return 0; -} diff --git a/kerberosV/src/lib/roken/getifaddrs.c b/kerberosV/src/lib/roken/getifaddrs.c deleted file mode 100644 index cc949b0b1a8..00000000000 --- a/kerberosV/src/lib/roken/getifaddrs.c +++ /dev/null @@ -1,1309 +0,0 @@ -/* - * Copyright (c) 2000 - 2002, 2005 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 -#include "roken.h" - -#ifdef __osf__ -/* hate */ -struct rtentry; -struct mbuf; -#endif -#ifdef HAVE_NET_IF_H -#include -#endif - -#ifdef HAVE_SYS_SOCKIO_H -#include -#endif /* HAVE_SYS_SOCKIO_H */ - -#ifdef HAVE_NETINET_IN6_VAR_H -#include -#endif /* HAVE_NETINET_IN6_VAR_H */ - -#include - -#ifdef __hpux -#define lifconf if_laddrconf -#define lifc_len iflc_len -#define lifc_buf iflc_buf -#define lifc_req iflc_req - -#define lifreq if_laddrreq -#define lifr_addr iflr_addr -#define lifr_name iflr_name -#define lifr_dstaddr iflr_dstaddr -#define lifr_broadaddr iflr_broadaddr -#define lifr_flags iflr_flags -#define lifr_index iflr_index -#endif - -#ifdef AF_NETLINK - -/* - * The linux - AF_NETLINK version of getifaddrs - from Usagi. - * Linux does not return v6 addresses from SIOCGIFCONF. - */ - -/* $USAGI: ifaddrs.c,v 1.18 2002/03/06 01:50:46 yoshfuji Exp $ */ - -/************************************************************************** - * ifaddrs.c - * Copyright (C)2000 Hideaki YOSHIFUJI, 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 author 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 AUTHOR 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 AUTHOR 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 "config.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include /* the L2 protocols */ -#include -#include -#include -#include -#include - -#define __set_errno(e) (errno = (e)) -#define __close(fd) (close(fd)) -#undef ifa_broadaddr -#define ifa_broadaddr ifa_dstaddr -#define IFA_NETMASK - -/* ====================================================================== */ -struct nlmsg_list{ - struct nlmsg_list *nlm_next; - struct nlmsghdr *nlh; - int size; - time_t seq; -}; - -struct rtmaddr_ifamap { - void *address; - void *local; -#ifdef IFA_NETMASK - void *netmask; -#endif - void *broadcast; -#ifdef HAVE_IFADDRS_IFA_ANYCAST - void *anycast; -#endif - int address_len; - int local_len; -#ifdef IFA_NETMASK - int netmask_len; -#endif - int broadcast_len; -#ifdef HAVE_IFADDRS_IFA_ANYCAST - int anycast_len; -#endif -}; - -/* ====================================================================== */ -static size_t -ifa_sa_len(sa_family_t family, int len) -{ - size_t size; - switch(family){ - case AF_INET: - size = sizeof(struct sockaddr_in); - break; - case AF_INET6: - size = sizeof(struct sockaddr_in6); - break; - case AF_PACKET: - size = (size_t)(((struct sockaddr_ll *)NULL)->sll_addr) + len; - if (size < sizeof(struct sockaddr_ll)) - size = sizeof(struct sockaddr_ll); - break; - default: - size = (size_t)(((struct sockaddr *)NULL)->sa_data) + len; - if (size < sizeof(struct sockaddr)) - size = sizeof(struct sockaddr); - break; - } - return size; -} - -static void -ifa_make_sockaddr(sa_family_t family, - struct sockaddr *sa, - void *p, size_t len, - uint32_t scope, uint32_t scopeid) -{ - if (sa == NULL) return; - switch(family){ - case AF_INET: - memcpy(&((struct sockaddr_in*)sa)->sin_addr, (char *)p, len); - break; - case AF_INET6: - memcpy(&((struct sockaddr_in6*)sa)->sin6_addr, (char *)p, len); - if (IN6_IS_ADDR_LINKLOCAL(p) || - IN6_IS_ADDR_MC_LINKLOCAL(p)){ - ((struct sockaddr_in6*)sa)->sin6_scope_id = scopeid; - } - break; - case AF_PACKET: - memcpy(((struct sockaddr_ll*)sa)->sll_addr, (char *)p, len); - ((struct sockaddr_ll*)sa)->sll_halen = len; - break; - default: - memcpy(sa->sa_data, p, len); /*XXX*/ - break; - } - sa->sa_family = family; -#ifdef HAVE_SOCKADDR_SA_LEN - sa->sa_len = ifa_sa_len(family, len); -#endif -} - -#ifndef IFA_NETMASK -static struct sockaddr * -ifa_make_sockaddr_mask(sa_family_t family, - struct sockaddr *sa, - uint32_t prefixlen) -{ - int i; - char *p = NULL, c; - uint32_t max_prefixlen = 0; - - if (sa == NULL) return NULL; - switch(family){ - case AF_INET: - memset(&((struct sockaddr_in*)sa)->sin_addr, 0, sizeof(((struct sockaddr_in*)sa)->sin_addr)); - p = (char *)&((struct sockaddr_in*)sa)->sin_addr; - max_prefixlen = 32; - break; - case AF_INET6: - memset(&((struct sockaddr_in6*)sa)->sin6_addr, 0, sizeof(((struct sockaddr_in6*)sa)->sin6_addr)); - p = (char *)&((struct sockaddr_in6*)sa)->sin6_addr; -#if 0 /* XXX: fill scope-id? */ - if (IN6_IS_ADDR_LINKLOCAL(p) || - IN6_IS_ADDR_MC_LINKLOCAL(p)){ - ((struct sockaddr_in6*)sa)->sin6_scope_id = scopeid; - } -#endif - max_prefixlen = 128; - break; - default: - return NULL; - } - sa->sa_family = family; -#ifdef HAVE_SOCKADDR_SA_LEN - sa->sa_len = ifa_sa_len(family, len); -#endif - if (p){ - if (prefixlen > max_prefixlen) - prefixlen = max_prefixlen; - for (i=0; i<(prefixlen / 8); i++) - *p++ = 0xff; - c = 0xff; - c <<= (8 - (prefixlen % 8)); - *p = c; - } - return sa; -} -#endif - -/* ====================================================================== */ -static int -nl_sendreq(int sd, int request, int flags, int *seq) -{ - char reqbuf[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + - NLMSG_ALIGN(sizeof(struct rtgenmsg))]; - struct sockaddr_nl nladdr; - struct nlmsghdr *req_hdr; - struct rtgenmsg *req_msg; - time_t t = time(NULL); - - if (seq) *seq = t; - memset(&reqbuf, 0, sizeof(reqbuf)); - req_hdr = (struct nlmsghdr *)reqbuf; - req_msg = (struct rtgenmsg *)NLMSG_DATA(req_hdr); - req_hdr->nlmsg_len = NLMSG_LENGTH(sizeof(*req_msg)); - req_hdr->nlmsg_type = request; - req_hdr->nlmsg_flags = flags | NLM_F_REQUEST; - req_hdr->nlmsg_pid = 0; - req_hdr->nlmsg_seq = t; - req_msg->rtgen_family = AF_UNSPEC; - memset(&nladdr, 0, sizeof(nladdr)); - nladdr.nl_family = AF_NETLINK; - return (sendto(sd, (void *)req_hdr, req_hdr->nlmsg_len, 0, - (struct sockaddr *)&nladdr, sizeof(nladdr))); -} - -static int -nl_recvmsg(int sd, int request, int seq, - void *buf, size_t buflen, - int *flags) -{ - struct msghdr msg; - struct iovec iov = { buf, buflen }; - struct sockaddr_nl nladdr; - int read_len; - - for (;;){ - msg.msg_name = (void *)&nladdr; - msg.msg_namelen = sizeof(nladdr); - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_control = NULL; - msg.msg_controllen = 0; - msg.msg_flags = 0; - read_len = recvmsg(sd, &msg, 0); - if ((read_len < 0 && errno == EINTR) || (msg.msg_flags & MSG_TRUNC)) - continue; - if (flags) *flags = msg.msg_flags; - break; - } - return read_len; -} - -static int -nl_getmsg(int sd, int request, int seq, - struct nlmsghdr **nlhp, - int *done) -{ - struct nlmsghdr *nh; - size_t bufsize = 65536, lastbufsize = 0; - void *buff = NULL; - int result = 0, read_size; - int msg_flags; - pid_t pid = getpid(); - for (;;){ - void *newbuff = realloc(buff, bufsize); - if (newbuff == NULL || bufsize < lastbufsize) { - result = -1; - break; - } - buff = newbuff; - result = read_size = nl_recvmsg(sd, request, seq, buff, bufsize, &msg_flags); - if (read_size < 0 || (msg_flags & MSG_TRUNC)){ - lastbufsize = bufsize; - bufsize *= 2; - continue; - } - if (read_size == 0) break; - nh = (struct nlmsghdr *)buff; - for (nh = (struct nlmsghdr *)buff; - NLMSG_OK(nh, read_size); - nh = (struct nlmsghdr *)NLMSG_NEXT(nh, read_size)){ - if (nh->nlmsg_pid != pid || - nh->nlmsg_seq != seq) - continue; - if (nh->nlmsg_type == NLMSG_DONE){ - (*done)++; - break; /* ok */ - } - if (nh->nlmsg_type == NLMSG_ERROR){ - struct nlmsgerr *nlerr = (struct nlmsgerr *)NLMSG_DATA(nh); - result = -1; - if (nh->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr))) - __set_errno(EIO); - else - __set_errno(-nlerr->error); - break; - } - } - break; - } - if (result < 0) - if (buff){ - int saved_errno = errno; - free(buff); - __set_errno(saved_errno); - } - *nlhp = (struct nlmsghdr *)buff; - return result; -} - -static int -nl_getlist(int sd, int seq, - int request, - struct nlmsg_list **nlm_list, - struct nlmsg_list **nlm_end) -{ - struct nlmsghdr *nlh = NULL; - int status; - int done = 0; - int tries = 3; - - try_again: - status = nl_sendreq(sd, request, NLM_F_ROOT|NLM_F_MATCH, &seq); - if (status < 0) - return status; - if (seq == 0) - seq = (int)time(NULL); - while(!done){ - struct pollfd pfd; - - pfd.fd = sd; - pfd.events = POLLIN | POLLPRI; - pfd.revents = 0; - status = poll(&pfd, 1, 1000); - if (status < 0) - return status; - else if (status == 0) { - seq++; - if (tries-- > 0) - goto try_again; - return -1; - } - - status = nl_getmsg(sd, request, seq, &nlh, &done); - if (status < 0) - return status; - if (nlh){ - struct nlmsg_list *nlm_next = (struct nlmsg_list *)malloc(sizeof(struct nlmsg_list)); - if (nlm_next == NULL){ - int saved_errno = errno; - free(nlh); - __set_errno(saved_errno); - status = -1; - } else { - nlm_next->nlm_next = NULL; - nlm_next->nlh = (struct nlmsghdr *)nlh; - nlm_next->size = status; - nlm_next->seq = seq; - if (*nlm_list == NULL){ - *nlm_list = nlm_next; - *nlm_end = nlm_next; - } else { - (*nlm_end)->nlm_next = nlm_next; - *nlm_end = nlm_next; - } - } - } - } - return status >= 0 ? seq : status; -} - -/* ---------------------------------------------------------------------- */ -static void -free_nlmsglist(struct nlmsg_list *nlm0) -{ - struct nlmsg_list *nlm, *nlm_next; - int saved_errno; - if (!nlm0) - return; - saved_errno = errno; - for (nlm=nlm0; nlm; nlm=nlm_next){ - if (nlm->nlh) - free(nlm->nlh); - nlm_next=nlm->nlm_next; - free(nlm); - } - __set_errno(saved_errno); -} - -static void -free_data(void *data, void *ifdata) -{ - int saved_errno = errno; - if (data != NULL) free(data); - if (ifdata != NULL) free(ifdata); - __set_errno(saved_errno); -} - -/* ---------------------------------------------------------------------- */ -static void -nl_close(int sd) -{ - int saved_errno = errno; - if (sd >= 0) __close(sd); - __set_errno(saved_errno); -} - -/* ---------------------------------------------------------------------- */ -static int -nl_open(void) -{ - struct sockaddr_nl nladdr; - int sd; - - sd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); - if (sd < 0) return -1; - memset(&nladdr, 0, sizeof(nladdr)); - nladdr.nl_family = AF_NETLINK; - if (bind(sd, (struct sockaddr*)&nladdr, sizeof(nladdr)) < 0){ - nl_close(sd); - return -1; - } - return sd; -} - -/* ====================================================================== */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_getifaddrs(struct ifaddrs **ifap) -{ - int sd; - struct nlmsg_list *nlmsg_list, *nlmsg_end, *nlm; - /* - - - - - - - - - - - - - - - */ - int icnt; - size_t dlen, xlen, nlen; - uint32_t max_ifindex = 0; - - pid_t pid = getpid(); - int seq; - int result; - int build ; /* 0 or 1 */ - -/* ---------------------------------- */ - /* initialize */ - icnt = dlen = xlen = nlen = 0; - nlmsg_list = nlmsg_end = NULL; - - if (ifap) - *ifap = NULL; - -/* ---------------------------------- */ - /* open socket and bind */ - sd = nl_open(); - if (sd < 0) - return -1; - -/* ---------------------------------- */ - /* gather info */ - if ((seq = nl_getlist(sd, 0, RTM_GETLINK, - &nlmsg_list, &nlmsg_end)) < 0){ - free_nlmsglist(nlmsg_list); - nl_close(sd); - return -1; - } - if ((seq = nl_getlist(sd, seq+1, RTM_GETADDR, - &nlmsg_list, &nlmsg_end)) < 0){ - free_nlmsglist(nlmsg_list); - nl_close(sd); - return -1; - } - -/* ---------------------------------- */ - /* Estimate size of result buffer and fill it */ - for (build=0; build<=1; build++){ - struct ifaddrs *ifl = NULL, *ifa = NULL; - struct nlmsghdr *nlh, *nlh0; - char *data = NULL, *xdata = NULL; - void *ifdata = NULL; - char *ifname = NULL, **iflist = NULL; - uint16_t *ifflist = NULL; - struct rtmaddr_ifamap ifamap; - - if (build){ - data = calloc(1, - NLMSG_ALIGN(sizeof(struct ifaddrs[icnt])) - + dlen + xlen + nlen); - ifa = (struct ifaddrs *)data; - ifdata = calloc(1, - NLMSG_ALIGN(sizeof(char *[max_ifindex+1])) - + NLMSG_ALIGN(sizeof(uint16_t [max_ifindex+1]))); - if (ifap != NULL) - *ifap = (ifdata != NULL) ? ifa : NULL; - else{ - free_data(data, ifdata); - result = 0; - break; - } - if (data == NULL || ifdata == NULL){ - free_data(data, ifdata); - result = -1; - break; - } - ifl = NULL; - data += NLMSG_ALIGN(sizeof(struct ifaddrs)) * icnt; - xdata = data + dlen; - ifname = xdata + xlen; - iflist = ifdata; - ifflist = (uint16_t *)(((char *)iflist) + NLMSG_ALIGN(sizeof(char *[max_ifindex+1]))); - } - - for (nlm=nlmsg_list; nlm; nlm=nlm->nlm_next){ - int nlmlen = nlm->size; - if (!(nlh0 = nlm->nlh)) - continue; - for (nlh = nlh0; - NLMSG_OK(nlh, nlmlen); - nlh=NLMSG_NEXT(nlh,nlmlen)){ - struct ifinfomsg *ifim = NULL; - struct ifaddrmsg *ifam = NULL; - struct rtattr *rta; - - size_t nlm_struct_size = 0; - sa_family_t nlm_family = 0; - uint32_t nlm_scope = 0, nlm_index = 0; - size_t sockaddr_size = 0; - uint32_t nlm_prefixlen = 0; - size_t rtasize; - - memset(&ifamap, 0, sizeof(ifamap)); - - /* check if the message is what we want */ - if (nlh->nlmsg_pid != pid || - nlh->nlmsg_seq != nlm->seq) - continue; - if (nlh->nlmsg_type == NLMSG_DONE){ - break; /* ok */ - } - switch (nlh->nlmsg_type){ - case RTM_NEWLINK: - ifim = (struct ifinfomsg *)NLMSG_DATA(nlh); - nlm_struct_size = sizeof(*ifim); - nlm_family = ifim->ifi_family; - nlm_scope = 0; - nlm_index = ifim->ifi_index; - nlm_prefixlen = 0; - if (build) - ifflist[nlm_index] = ifa->ifa_flags = ifim->ifi_flags; - break; - case RTM_NEWADDR: - ifam = (struct ifaddrmsg *)NLMSG_DATA(nlh); - nlm_struct_size = sizeof(*ifam); - nlm_family = ifam->ifa_family; - nlm_scope = ifam->ifa_scope; - nlm_index = ifam->ifa_index; - nlm_prefixlen = ifam->ifa_prefixlen; - if (build) - ifa->ifa_flags = ifflist[nlm_index]; - break; - default: - continue; - } - - if (!build){ - if (max_ifindex < nlm_index) - max_ifindex = nlm_index; - } else { - if (ifl != NULL) - ifl->ifa_next = ifa; - } - - rtasize = NLMSG_PAYLOAD(nlh, nlmlen) - NLMSG_ALIGN(nlm_struct_size); - for (rta = (struct rtattr *)(((char *)NLMSG_DATA(nlh)) + NLMSG_ALIGN(nlm_struct_size)); - RTA_OK(rta, rtasize); - rta = RTA_NEXT(rta, rtasize)){ - struct sockaddr **sap = NULL; - void *rtadata = RTA_DATA(rta); - size_t rtapayload = RTA_PAYLOAD(rta); - socklen_t sa_len; - - switch(nlh->nlmsg_type){ - case RTM_NEWLINK: - switch(rta->rta_type){ - case IFLA_ADDRESS: - case IFLA_BROADCAST: - if (build){ - sap = (rta->rta_type == IFLA_ADDRESS) ? &ifa->ifa_addr : &ifa->ifa_broadaddr; - *sap = (struct sockaddr *)data; - } - sa_len = ifa_sa_len(AF_PACKET, rtapayload); - if (rta->rta_type == IFLA_ADDRESS) - sockaddr_size = NLMSG_ALIGN(sa_len); - if (!build){ - dlen += NLMSG_ALIGN(sa_len); - } else { - memset(*sap, 0, sa_len); - ifa_make_sockaddr(AF_PACKET, *sap, rtadata,rtapayload, 0,0); - ((struct sockaddr_ll *)*sap)->sll_ifindex = nlm_index; - ((struct sockaddr_ll *)*sap)->sll_hatype = ifim->ifi_type; - data += NLMSG_ALIGN(sa_len); - } - break; - case IFLA_IFNAME:/* Name of Interface */ - if (!build) - nlen += NLMSG_ALIGN(rtapayload + 1); - else{ - ifa->ifa_name = ifname; - if (iflist[nlm_index] == NULL) - iflist[nlm_index] = ifa->ifa_name; - strncpy(ifa->ifa_name, rtadata, rtapayload); - ifa->ifa_name[rtapayload] = '\0'; - ifname += NLMSG_ALIGN(rtapayload + 1); - } - break; - case IFLA_STATS:/* Statistics of Interface */ - if (!build) - xlen += NLMSG_ALIGN(rtapayload); - else{ - ifa->ifa_data = xdata; - memcpy(ifa->ifa_data, rtadata, rtapayload); - xdata += NLMSG_ALIGN(rtapayload); - } - break; - case IFLA_UNSPEC: - break; - case IFLA_MTU: - break; - case IFLA_LINK: - break; - case IFLA_QDISC: - break; - default: - break; - } - break; - case RTM_NEWADDR: - if (nlm_family == AF_PACKET) break; - switch(rta->rta_type){ - case IFA_ADDRESS: - ifamap.address = rtadata; - ifamap.address_len = rtapayload; - break; - case IFA_LOCAL: - ifamap.local = rtadata; - ifamap.local_len = rtapayload; - break; - case IFA_BROADCAST: - ifamap.broadcast = rtadata; - ifamap.broadcast_len = rtapayload; - break; -#ifdef HAVE_IFADDRS_IFA_ANYCAST - case IFA_ANYCAST: - ifamap.anycast = rtadata; - ifamap.anycast_len = rtapayload; - break; -#endif - case IFA_LABEL: - if (!build) - nlen += NLMSG_ALIGN(rtapayload + 1); - else{ - ifa->ifa_name = ifname; - if (iflist[nlm_index] == NULL) - iflist[nlm_index] = ifname; - strncpy(ifa->ifa_name, rtadata, rtapayload); - ifa->ifa_name[rtapayload] = '\0'; - ifname += NLMSG_ALIGN(rtapayload + 1); - } - break; - case IFA_UNSPEC: - break; - case IFA_CACHEINFO: - break; - default: - break; - } - } - } - if (nlh->nlmsg_type == RTM_NEWADDR && - nlm_family != AF_PACKET) { - if (!ifamap.local) { - ifamap.local = ifamap.address; - ifamap.local_len = ifamap.address_len; - } - if (!ifamap.address) { - ifamap.address = ifamap.local; - ifamap.address_len = ifamap.local_len; - } - if (ifamap.address_len != ifamap.local_len || - (ifamap.address != NULL && - memcmp(ifamap.address, ifamap.local, ifamap.address_len))) { - /* p2p; address is peer and local is ours */ - ifamap.broadcast = ifamap.address; - ifamap.broadcast_len = ifamap.address_len; - ifamap.address = ifamap.local; - ifamap.address_len = ifamap.local_len; - } - if (ifamap.address) { -#ifndef IFA_NETMASK - sockaddr_size = NLMSG_ALIGN(ifa_sa_len(nlm_family,ifamap.address_len)); -#endif - if (!build) - dlen += NLMSG_ALIGN(ifa_sa_len(nlm_family,ifamap.address_len)); - else { - ifa->ifa_addr = (struct sockaddr *)data; - ifa_make_sockaddr(nlm_family, ifa->ifa_addr, ifamap.address, ifamap.address_len, - nlm_scope, nlm_index); - data += NLMSG_ALIGN(ifa_sa_len(nlm_family, ifamap.address_len)); - } - } -#ifdef IFA_NETMASK - if (ifamap.netmask) { - if (!build) - dlen += NLMSG_ALIGN(ifa_sa_len(nlm_family,ifamap.netmask_len)); - else { - ifa->ifa_netmask = (struct sockaddr *)data; - ifa_make_sockaddr(nlm_family, ifa->ifa_netmask, ifamap.netmask, ifamap.netmask_len, - nlm_scope, nlm_index); - data += NLMSG_ALIGN(ifa_sa_len(nlm_family, ifamap.netmask_len)); - } - } -#endif - if (ifamap.broadcast) { - if (!build) - dlen += NLMSG_ALIGN(ifa_sa_len(nlm_family,ifamap.broadcast_len)); - else { - ifa->ifa_broadaddr = (struct sockaddr *)data; - ifa_make_sockaddr(nlm_family, ifa->ifa_broadaddr, ifamap.broadcast, ifamap.broadcast_len, - nlm_scope, nlm_index); - data += NLMSG_ALIGN(ifa_sa_len(nlm_family, ifamap.broadcast_len)); - } - } -#ifdef HAVE_IFADDRS_IFA_ANYCAST - if (ifamap.anycast) { - if (!build) - dlen += NLMSG_ALIGN(ifa_sa_len(nlm_family,ifamap.anycast_len)); - else { - ifa->ifa_anycast = (struct sockaddr *)data; - ifa_make_sockaddr(nlm_family, ifa->ifa_anyaddr, ifamap.anycast, ifamap.anycast_len, - nlm_scope, nlm_index); - data += NLMSG_ALIGN(ifa_sa_len(nlm_family, ifamap.anycast_len)); - } - } -#endif - } - if (!build){ -#ifndef IFA_NETMASK - dlen += sockaddr_size; -#endif - icnt++; - } else { - if (ifa->ifa_name == NULL) - ifa->ifa_name = iflist[nlm_index]; -#ifndef IFA_NETMASK - if (ifa->ifa_addr && - ifa->ifa_addr->sa_family != AF_UNSPEC && - ifa->ifa_addr->sa_family != AF_PACKET){ - ifa->ifa_netmask = (struct sockaddr *)data; - ifa_make_sockaddr_mask(ifa->ifa_addr->sa_family, ifa->ifa_netmask, nlm_prefixlen); - } - data += sockaddr_size; -#endif - ifl = ifa++; - } - } - } - if (!build){ - if (icnt == 0 && (dlen + nlen + xlen == 0)){ - if (ifap != NULL) - *ifap = NULL; - break; /* cannot found any addresses */ - } - } - else - free_data(NULL, ifdata); - } - -/* ---------------------------------- */ - /* Finalize */ - free_nlmsglist(nlmsg_list); - nl_close(sd); - return 0; -} - -void ROKEN_LIB_FUNCTION -rk_freeifaddrs(struct ifaddrs *ifp) -{ - /* AF_NETLINK method uses a single allocation for all interfaces */ - free(ifp); -} - -#else /* !AF_NETLINK */ - -/* - * The generic SIOCGIFCONF version. - */ - -static int -getifaddrs2(struct ifaddrs **ifap, - int af, int siocgifconf, int siocgifflags, - size_t ifreq_sz) -{ - int ret; - int fd; - size_t buf_size; - char *buf; - struct ifconf ifconf; - char *p; - size_t sz; - struct sockaddr sa_zero; - struct ifreq *ifr; - struct ifaddrs *start = NULL, **end = &start; - - buf = NULL; - - memset (&sa_zero, 0, sizeof(sa_zero)); - fd = socket(af, SOCK_DGRAM, 0); - if (fd < 0) - return -1; - - buf_size = 8192; - for (;;) { - buf = calloc(1, buf_size); - if (buf == NULL) { - ret = ENOMEM; - goto error_out; - } - ifconf.ifc_len = buf_size; - ifconf.ifc_buf = buf; - - /* - * Solaris returns EINVAL when the buffer is too small. - */ - if (ioctl (fd, siocgifconf, &ifconf) < 0 && errno != EINVAL) { - ret = errno; - goto error_out; - } - /* - * Can the difference between a full and a overfull buf - * be determined? - */ - - if (ifconf.ifc_len < buf_size) - break; - free (buf); - buf_size *= 2; - } - - for (p = ifconf.ifc_buf; - p < ifconf.ifc_buf + ifconf.ifc_len; - p += sz) { - struct ifreq ifreq; - struct sockaddr *sa; - size_t salen; - - ifr = (struct ifreq *)p; - sa = &ifr->ifr_addr; - - sz = ifreq_sz; - salen = sizeof(struct sockaddr); -#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - salen = sa->sa_len; - sz = max(sz, sizeof(ifr->ifr_name) + sa->sa_len); -#endif -#ifdef SA_LEN - salen = SA_LEN(sa); - sz = max(sz, sizeof(ifr->ifr_name) + SA_LEN(sa)); -#endif - memset (&ifreq, 0, sizeof(ifreq)); - memcpy (ifreq.ifr_name, ifr->ifr_name, sizeof(ifr->ifr_name)); - - if (ioctl(fd, siocgifflags, &ifreq) < 0) { - ret = errno; - goto error_out; - } - - *end = malloc(sizeof(**end)); - if (*end == NULL) { - ret = ENOMEM; - goto error_out; - } - - (*end)->ifa_next = NULL; - (*end)->ifa_name = strdup(ifr->ifr_name); - if ((*end)->ifa_name == NULL) { - ret = ENOMEM; - goto error_out; - } - (*end)->ifa_flags = ifreq.ifr_flags; - (*end)->ifa_addr = malloc(salen); - if ((*end)->ifa_addr == NULL) { - ret = ENOMEM; - goto error_out; - } - memcpy((*end)->ifa_addr, sa, salen); - (*end)->ifa_netmask = NULL; - -#if 0 - /* fix these when we actually need them */ - if(ifreq.ifr_flags & IFF_BROADCAST) { - (*end)->ifa_broadaddr = malloc(sizeof(ifr->ifr_broadaddr)); - if ((*end)->ifa_broadaddr == NULL) { - ret = ENOMEM; - goto error_out; - } - memcpy((*end)->ifa_broadaddr, &ifr->ifr_broadaddr, - sizeof(ifr->ifr_broadaddr)); - } else if(ifreq.ifr_flags & IFF_POINTOPOINT) { - (*end)->ifa_dstaddr = malloc(sizeof(ifr->ifr_dstaddr)); - if ((*end)->ifa_dstaddr == NULL) { - ret = ENOMEM; - goto error_out; - } - memcpy((*end)->ifa_dstaddr, &ifr->ifr_dstaddr, - sizeof(ifr->ifr_dstaddr)); - } else - (*end)->ifa_dstaddr = NULL; -#else - (*end)->ifa_dstaddr = NULL; -#endif - - (*end)->ifa_data = NULL; - - end = &(*end)->ifa_next; - - } - *ifap = start; - close(fd); - free(buf); - return 0; - error_out: - rk_freeifaddrs(start); - close(fd); - free(buf); - errno = ret; - return -1; -} - -#if defined(HAVE_IPV6) && defined(SIOCGLIFCONF) && defined(SIOCGLIFFLAGS) -static int -getlifaddrs2(struct ifaddrs **ifap, - int af, int siocgifconf, int siocgifflags, - size_t ifreq_sz) -{ - int ret; - int fd; - size_t buf_size; - char *buf; - struct lifconf ifconf; - char *p; - size_t sz; - struct sockaddr sa_zero; - struct lifreq *ifr; - struct ifaddrs *start = NULL, **end = &start; - - buf = NULL; - - memset (&sa_zero, 0, sizeof(sa_zero)); - fd = socket(af, SOCK_DGRAM, 0); - if (fd < 0) - return -1; - - buf_size = 8192; - for (;;) { - buf = calloc(1, buf_size); - if (buf == NULL) { - ret = ENOMEM; - goto error_out; - } -#ifndef __hpux - ifconf.lifc_family = af; - ifconf.lifc_flags = 0; -#endif - ifconf.lifc_len = buf_size; - ifconf.lifc_buf = buf; - - /* - * Solaris returns EINVAL when the buffer is too small. - */ - if (ioctl (fd, siocgifconf, &ifconf) < 0 && errno != EINVAL) { - ret = errno; - goto error_out; - } - /* - * Can the difference between a full and a overfull buf - * be determined? - */ - - if (ifconf.lifc_len < buf_size) - break; - free (buf); - buf_size *= 2; - } - - for (p = ifconf.lifc_buf; - p < ifconf.lifc_buf + ifconf.lifc_len; - p += sz) { - struct lifreq ifreq; - struct sockaddr_storage *sa; - size_t salen; - - ifr = (struct lifreq *)p; - sa = &ifr->lifr_addr; - - sz = ifreq_sz; - salen = sizeof(struct sockaddr_storage); -#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - salen = sa->sa_len; - sz = max(sz, sizeof(ifr->ifr_name) + sa->sa_len); -#endif -#ifdef SA_LEN - salen = SA_LEN(sa); - sz = max(sz, sizeof(ifr->ifr_name) + SA_LEN(sa)); -#endif - memset (&ifreq, 0, sizeof(ifreq)); - memcpy (ifreq.lifr_name, ifr->lifr_name, sizeof(ifr->lifr_name)); - - if (ioctl(fd, siocgifflags, &ifreq) < 0) { - ret = errno; - goto error_out; - } - - *end = malloc(sizeof(**end)); - if (*end == NULL) { - ret = ENOMEM; - goto error_out; - } - - (*end)->ifa_next = NULL; - (*end)->ifa_name = strdup(ifr->lifr_name); - if ((*end)->ifa_name == NULL) { - ret = ENOMEM; - goto error_out; - } - (*end)->ifa_flags = ifreq.lifr_flags; - (*end)->ifa_addr = malloc(salen); - if ((*end)->ifa_addr == NULL) { - ret = ENOMEM; - goto error_out; - } - memcpy((*end)->ifa_addr, sa, salen); - (*end)->ifa_netmask = NULL; - -#if 0 - /* fix these when we actually need them */ - if(ifreq.ifr_flags & IFF_BROADCAST) { - (*end)->ifa_broadaddr = malloc(sizeof(ifr->ifr_broadaddr)); - if ((*end)->ifa_broadaddr == NULL) { - ret = ENOMEM; - goto error_out; - } - memcpy((*end)->ifa_broadaddr, &ifr->ifr_broadaddr, - sizeof(ifr->ifr_broadaddr)); - } else if(ifreq.ifr_flags & IFF_POINTOPOINT) { - (*end)->ifa_dstaddr = malloc(sizeof(ifr->ifr_dstaddr)); - if ((*end)->ifa_dstaddr == NULL) { - ret = ENOMEM; - goto error_out; - } - memcpy((*end)->ifa_dstaddr, &ifr->ifr_dstaddr, - sizeof(ifr->ifr_dstaddr)); - } else - (*end)->ifa_dstaddr = NULL; -#else - (*end)->ifa_dstaddr = NULL; -#endif - - (*end)->ifa_data = NULL; - - end = &(*end)->ifa_next; - - } - *ifap = start; - close(fd); - free(buf); - return 0; - error_out: - rk_freeifaddrs(start); - close(fd); - free(buf); - errno = ret; - return -1; -} -#endif /* defined(HAVE_IPV6) && defined(SIOCGLIFCONF) && defined(SIOCGLIFFLAGS) */ - -/** - * Join two struct ifaddrs lists by appending supp to base. - * Either may be NULL. The new list head (usually base) will be - * returned. - */ -static struct ifaddrs * -append_ifaddrs(struct ifaddrs *base, struct ifaddrs *supp) { - if (!base) - return supp; - - if (!supp) - return base; - - while (base->ifa_next) - base = base->ifa_next; - - base->ifa_next = supp; - - return base; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_getifaddrs(struct ifaddrs **ifap) -{ - int ret = -1; - errno = ENXIO; -#if defined(AF_INET6) && defined(SIOCGIF6CONF) && defined(SIOCGIF6FLAGS) - if (ret) - ret = getifaddrs2 (ifap, AF_INET6, SIOCGIF6CONF, SIOCGIF6FLAGS, - sizeof(struct in6_ifreq)); -#endif -#if defined(HAVE_IPV6) && defined(SIOCGLIFCONF) && defined(SIOCGLIFFLAGS) - /* Do IPv6 and IPv4 queries separately then join the result. - * - * HP-UX only returns IPv6 addresses using SIOCGLIFCONF, - * SIOCGIFCONF has to be used for IPv4 addresses. The result is then - * merged. - * - * Solaris needs particular care, because a SIOCGLIFCONF lookup using - * AF_UNSPEC can fail in a Zone requiring an AF_INET lookup, so we just - * do them separately the same as for HP-UX. See - * http://repo.or.cz/w/heimdal.git/commitdiff/76afc31e9ba2f37e64c70adc006ade9e37e9ef73 - */ - if (ret) { - int v6err, v4err; - struct ifaddrs *v6addrs, *v4addrs; - - v6err = getlifaddrs2 (&v6addrs, AF_INET6, SIOCGLIFCONF, SIOCGLIFFLAGS, - sizeof(struct lifreq)); - v4err = getifaddrs2 (&v4addrs, AF_INET, SIOCGIFCONF, SIOCGIFFLAGS, - sizeof(struct ifreq)); - if (v6err) - v6addrs = NULL; - if (v4err) - v4addrs = NULL; - - if (v6addrs) { - if (v4addrs) - *ifap = append_ifaddrs(v6addrs, v4addrs); - else - *ifap = v6addrs; - } else if (v4addrs) { - *ifap = v4addrs; - } else { - *ifap = NULL; - } - - ret = (v6err || v4err) ? -1 : 0; - } -#endif -#if defined(HAVE_IPV6) && defined(SIOCGIFCONF) - if (ret) - ret = getifaddrs2 (ifap, AF_INET6, SIOCGIFCONF, SIOCGIFFLAGS, - sizeof(struct ifreq)); -#endif -#if defined(AF_INET) && defined(SIOCGIFCONF) && defined(SIOCGIFFLAGS) - if (ret) - ret = getifaddrs2 (ifap, AF_INET, SIOCGIFCONF, SIOCGIFFLAGS, - sizeof(struct ifreq)); -#endif - return ret; -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_freeifaddrs(struct ifaddrs *ifp) -{ - struct ifaddrs *p, *q; - - for(p = ifp; p; ) { - free(p->ifa_name); - if(p->ifa_addr) - free(p->ifa_addr); - if(p->ifa_dstaddr) - free(p->ifa_dstaddr); - if(p->ifa_netmask) - free(p->ifa_netmask); - if(p->ifa_data) - free(p->ifa_data); - q = p; - p = p->ifa_next; - free(q); - } -} - -#endif /* !AF_NETLINK */ - -#ifdef TEST - -void -print_addr(const char *s, struct sockaddr *sa) -{ - int i; - printf(" %s=%d/", s, sa->sa_family); -#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN - for(i = 0; i < sa->sa_len - ((long)sa->sa_data - (long)&sa->sa_family); i++) - printf("%02x", ((unsigned char*)sa->sa_data)[i]); -#else - for(i = 0; i < sizeof(sa->sa_data); i++) - printf("%02x", ((unsigned char*)sa->sa_data)[i]); -#endif - printf("\n"); -} - -void -print_ifaddrs(struct ifaddrs *x) -{ - struct ifaddrs *p; - - for(p = x; p; p = p->ifa_next) { - printf("%s\n", p->ifa_name); - printf(" flags=%x\n", p->ifa_flags); - if(p->ifa_addr) - print_addr("addr", p->ifa_addr); - if(p->ifa_dstaddr) - print_addr("dstaddr", p->ifa_dstaddr); - if(p->ifa_netmask) - print_addr("netmask", p->ifa_netmask); - printf(" %p\n", p->ifa_data); - } -} - -int -main() -{ - struct ifaddrs *a = NULL, *b; - getifaddrs2(&a, AF_INET, SIOCGIFCONF, SIOCGIFFLAGS, sizeof(struct ifreq)); - print_ifaddrs(a); - printf("---\n"); - getifaddrs(&b); - print_ifaddrs(b); - return 0; -} -#endif diff --git a/kerberosV/src/lib/roken/getipnodebyaddr.c b/kerberosV/src/lib/roken/getipnodebyaddr.c deleted file mode 100644 index 7d4095f1d84..00000000000 --- a/kerberosV/src/lib/roken/getipnodebyaddr.c +++ /dev/null @@ -1,71 +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 - -#include "roken.h" - -/* - * lookup `src, len' (address family `af') in DNS and return a pointer - * to a malloced struct hostent or NULL. - */ - -ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/getipnodebyname.c b/kerberosV/src/lib/roken/getipnodebyname.c deleted file mode 100644 index 2ff282707c2..00000000000 --- a/kerberosV/src/lib/roken/getipnodebyname.c +++ /dev/null @@ -1,83 +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 - -#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. - */ - -ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/getnameinfo.c b/kerberosV/src/lib/roken/getnameinfo.c deleted file mode 100644 index b23ad01ebdd..00000000000 --- a/kerberosV/src/lib/roken/getnameinfo.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#include "roken.h" - -static int -doit (int af, - const void *addr, - size_t addrlen, - int port, - char *host, size_t hostlen, - char *serv, size_t servlen, - int flags) -{ - if (host != NULL) { - if (flags & NI_NUMERICHOST) { - if (inet_ntop (af, addr, host, hostlen) == NULL) - return EAI_SYSTEM; - } else { - struct hostent *he = gethostbyaddr (addr, - addrlen, - af); - if (he != NULL) { - strlcpy (host, hostent_find_fqdn(he), hostlen); - if (flags & NI_NOFQDN) { - char *dot = strchr (host, '.'); - if (dot != NULL) - *dot = '\0'; - } - } else if (flags & NI_NAMEREQD) { - return EAI_NONAME; - } else if (inet_ntop (af, addr, host, hostlen) == NULL) - return EAI_SYSTEM; - } - } - - if (serv != NULL) { - if (flags & NI_NUMERICSERV) { - snprintf (serv, servlen, "%u", ntohs(port)); - } else { - const char *proto = "tcp"; - struct servent *se; - - if (flags & NI_DGRAM) - proto = "udp"; - - se = getservbyport (port, proto); - if (se == NULL) { - snprintf (serv, servlen, "%u", ntohs(port)); - } else { - strlcpy (serv, se->s_name, servlen); - } - } - } - return 0; -} - -/* - * - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getnameinfo(const struct sockaddr *sa, socklen_t salen, - char *host, size_t hostlen, - char *serv, size_t servlen, - int flags) -{ - switch (sa->sa_family) { -#ifdef HAVE_IPV6 - case AF_INET6 : { - const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; - - return doit (AF_INET6, &sin6->sin6_addr, sizeof(sin6->sin6_addr), - sin6->sin6_port, - host, hostlen, - serv, servlen, - flags); - } -#endif - case AF_INET : { - const struct sockaddr_in *sin4 = (const struct sockaddr_in *)sa; - - return doit (AF_INET, &sin4->sin_addr, sizeof(sin4->sin_addr), - sin4->sin_port, - host, hostlen, - serv, servlen, - flags); - } - default : - return EAI_FAMILY; - } -} diff --git a/kerberosV/src/lib/roken/getnameinfo_verified.c b/kerberosV/src/lib/roken/getnameinfo_verified.c deleted file mode 100644 index 6175291e457..00000000000 --- a/kerberosV/src/lib/roken/getnameinfo_verified.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 1999 - 2002 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 - -#include "roken.h" - -/* - * Try to obtain a verified name for the address in `sa, salen' (much - * similar to getnameinfo). - * Verified in this context means that forwards and backwards lookups - * in DNS are consistent. If that fails, return an error if the - * NI_NAMEREQD flag is set or return the numeric address as a string. - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getnameinfo_verified(const struct sockaddr *sa, socklen_t salen, - char *host, size_t hostlen, - char *serv, size_t servlen, - int flags) -{ - int ret; - struct addrinfo *ai, *a; - char servbuf[NI_MAXSERV]; - struct addrinfo hints; - void *saaddr; - size_t sasize; - - if (host == NULL) - return EAI_NONAME; - - if (serv == NULL) { - serv = servbuf; - servlen = sizeof(servbuf); - } - - ret = getnameinfo (sa, salen, host, hostlen, serv, servlen, - flags | NI_NUMERICSERV); - if (ret) - goto fail; - - memset (&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - ret = getaddrinfo (host, serv, &hints, &ai); - if (ret) - goto fail; - - saaddr = socket_get_address(sa); - sasize = socket_addr_size(sa); - for (a = ai; a != NULL; a = a->ai_next) { - if (sasize == socket_addr_size(a->ai_addr) && - memcmp(saaddr, socket_get_address(a->ai_addr), sasize) == 0) { - freeaddrinfo (ai); - return 0; - } - } - freeaddrinfo (ai); - fail: - if (flags & NI_NAMEREQD) - return EAI_NONAME; - ret = getnameinfo (sa, salen, host, hostlen, serv, servlen, - flags | NI_NUMERICSERV | NI_NUMERICHOST); - return ret; -} diff --git a/kerberosV/src/lib/roken/getopt.c b/kerberosV/src/lib/roken/getopt.c deleted file mode 100644 index f035f749747..00000000000 --- a/kerberosV/src/lib/roken/getopt.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 1987, 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. 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) -static char sccsid[] = "@(#)getopt.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ - -#ifndef __STDC__ -#define const -#endif -#include -#include "roken.h" - -#include -#include -#include - -/* - * get option letter from argument vector - */ -ROKEN_LIB_VARIABLE int opterr = 1; /* if error message should be printed */ -ROKEN_LIB_VARIABLE int optind = 1; /* index into parent argv vector */ -ROKEN_LIB_VARIABLE int optopt; /* character checked for validity */ -int optreset; /* reset getopt */ -ROKEN_LIB_VARIABLE char *optarg; /* argument associated with option */ - -#define BADCH (int)'?' -#define BADARG (int)':' -#define EMSG "" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getopt(int nargc, char * const *nargv, const char *ostr) -{ - static char *place = EMSG; /* option letter processing */ - char *oli; /* option letter list index */ - char *p; - - if (optreset || !*place) { /* update scanning pointer */ - optreset = 0; - if (optind >= nargc || *(place = nargv[optind]) != '-') { - place = EMSG; - return(-1); - } - if (place[1] && *++place == '-') { /* found "--" */ - ++optind; - place = EMSG; - return(-1); - } - } /* option letter okay? */ - if ((optopt = (int)*place++) == (int)':' || - !(oli = strchr(ostr, optopt))) { - /* - * if the user didn't specify '-' as an option, - * assume it means -1 (EOF). - */ - if (optopt == (int)'-') - return(-1); - if (!*place) - ++optind; - if (opterr && *ostr != ':') { - if (!(p = strrchr(*nargv, '/'))) - p = *nargv; - else - ++p; - fprintf(stderr, "%s: illegal option -- %c\n", - p, optopt); - } - return(BADCH); - } - if (*++oli != ':') { /* don't need argument */ - optarg = NULL; - if (!*place) - ++optind; - } - else { /* need an argument */ - if (*place) /* no white space */ - optarg = place; - else if (nargc <= ++optind) { /* no arg */ - place = EMSG; - if (!(p = strrchr(*nargv, '/'))) - p = *nargv; - else - ++p; - if (*ostr == ':') - return(BADARG); - if (opterr) - fprintf(stderr, - "%s: option requires an argument -- %c\n", - p, optopt); - return(BADCH); - } - else /* white space */ - optarg = nargv[optind]; - place = EMSG; - ++optind; - } - return(optopt); /* dump back option letter */ -} diff --git a/kerberosV/src/lib/roken/getprogname.c b/kerberosV/src/lib/roken/getprogname.c deleted file mode 100644 index 3adf44570c1..00000000000 --- a/kerberosV/src/lib/roken/getprogname.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 1995-2004 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 - -#include "roken.h" - -#ifndef HAVE___PROGNAME -extern char *__progname; -#endif - -#ifndef HAVE_GETPROGNAME -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL -getprogname(void) -{ - return __progname; -} -#endif /* HAVE_GETPROGNAME */ diff --git a/kerberosV/src/lib/roken/gettimeofday.c b/kerberosV/src/lib/roken/gettimeofday.c deleted file mode 100644 index a53b96f4f52..00000000000 --- a/kerberosV/src/lib/roken/gettimeofday.c +++ /dev/null @@ -1,78 +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. - */ - -#include -#include "roken.h" -#ifndef HAVE_GETTIMEOFDAY - -#ifdef _WIN32 - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -gettimeofday (struct timeval *tp, void *ignore) -{ - FILETIME ft; - ULARGE_INTEGER li; - ULONGLONG ull; - - GetSystemTimeAsFileTime(&ft); - li.LowPart = ft.dwLowDateTime; - li.HighPart = ft.dwHighDateTime; - ull = li.QuadPart; - - ull -= 116444736000000000i64; - ull /= 10i64; /* ull is now in microseconds */ - - tp->tv_usec = (ull % 1000000i64); - tp->tv_sec = (ull / 1000000i64); - - return 0; -} - -#else - -/* - * Simple gettimeofday that only returns seconds. - */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -gettimeofday (struct timeval *tp, void *ignore) -{ - time_t t; - - t = time(NULL); - tp->tv_sec = (long) t; - tp->tv_usec = 0; - return 0; -} - -#endif /* !_WIN32 */ -#endif diff --git a/kerberosV/src/lib/roken/getuid.c b/kerberosV/src/lib/roken/getuid.c deleted file mode 100644 index 63fdec19d8f..00000000000 --- a/kerberosV/src/lib/roken/getuid.c +++ /dev/null @@ -1,45 +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. - */ - -#include -#include "roken.h" - -#ifndef HAVE_GETUID - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getuid(void) -{ - return 17; -} - -#endif diff --git a/kerberosV/src/lib/roken/getusershell.c b/kerberosV/src/lib/roken/getusershell.c deleted file mode 100644 index 6f7145d52b0..00000000000 --- a/kerberosV/src/lib/roken/getusershell.c +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 1985, 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. 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. - */ - -#include - -#ifndef HAVE_GETUSERSHELL - -#include -#include -#include -#include -#ifdef HAVE_PATHS_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif - -#ifdef HAVE_USERSEC_H -struct aud_rec; -#include -#endif -#ifdef HAVE_USERCONF_H -#include -#endif -#include "roken.h" - -#ifndef _PATH_SHELLS -#define _PATH_SHELLS "/etc/shells" -#endif - -#ifndef _PATH_BSHELL -#define _PATH_BSHELL "/bin/sh" -#endif - -#ifndef _PATH_CSHELL -#define _PATH_CSHELL "/bin/csh" -#endif - -/* - * Local shells should NOT be added here. They should be added in - * /etc/shells. - */ - -static char *okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL }; -static char **curshell, **shells, *strings; -static char **initshells (void); - -/* - * Get a list of shells from _PATH_SHELLS, if it exists. - */ -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -getusershell() -{ - char *ret; - - if (curshell == NULL) - curshell = initshells(); - ret = *curshell; - if (ret != NULL) - curshell++; - return (ret); -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -endusershell() -{ - if (shells != NULL) - free(shells); - shells = NULL; - if (strings != NULL) - free(strings); - strings = NULL; - curshell = NULL; -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -setusershell() -{ - curshell = initshells(); -} - -static char ** -initshells() -{ - char **sp, *cp; -#ifdef HAVE_GETCONFATTR - char *tmp; - int nsh; -#else - FILE *fp; -#endif - struct stat statb; - - free(shells); - shells = NULL; - free(strings); - strings = NULL; -#ifdef HAVE_GETCONFATTR - if(getconfattr(SC_SYS_LOGIN, SC_SHELLS, &tmp, SEC_LIST) != 0) - return okshells; - - for(cp = tmp, nsh = 0; *cp; cp += strlen(cp) + 1, nsh++); - - shells = calloc(nsh + 1, sizeof(*shells)); - if(shells == NULL) - return okshells; - - strings = malloc(cp - tmp); - if(strings == NULL) { - free(shells); - shells = NULL; - return okshells; - } - memcpy(strings, tmp, cp - tmp); - for(sp = shells, cp = strings; *cp; cp += strlen(cp) + 1, sp++) - *sp = cp; -#else - if ((fp = fopen(_PATH_SHELLS, "r")) == NULL) - return (okshells); - if (fstat(fileno(fp), &statb) == -1) { - fclose(fp); - return (okshells); - } - if ((strings = malloc((u_int)statb.st_size)) == NULL) { - fclose(fp); - return (okshells); - } - shells = calloc((unsigned)statb.st_size / 3, sizeof (char *)); - if (shells == NULL) { - fclose(fp); - free(strings); - strings = NULL; - return (okshells); - } - sp = shells; - cp = strings; - while (fgets(cp, MaxPathLen + 1, fp) != NULL) { - while (*cp != '#' && *cp != '/' && *cp != '\0') - cp++; - if (*cp == '#' || *cp == '\0') - continue; - *sp++ = cp; - while (!isspace((unsigned char)*cp) && *cp != '#' && *cp != '\0') - cp++; - *cp++ = '\0'; - } - fclose(fp); -#endif - *sp = NULL; - return (shells); -} -#endif /* HAVE_GETUSERSHELL */ diff --git a/kerberosV/src/lib/roken/glob.c b/kerberosV/src/lib/roken/glob.c deleted file mode 100644 index 5a7ed65af80..00000000000 --- a/kerberosV/src/lib/roken/glob.c +++ /dev/null @@ -1,848 +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. 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. - */ - -#include - -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif - -#include -#ifdef HAVE_DIRENT_H -#include -#endif -#include -#ifdef HAVE_PWD_H -#include -#endif -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_LIMITS_H -#include -#endif - -#include "glob.h" -#include "roken.h" - -#ifndef ARG_MAX -#define ARG_MAX _POSIX_ARG_MAX -#endif - -#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 (const 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 *, size_t *); -static int glob2 (Char *, Char *, Char *, glob_t *, size_t *); -static int glob3 (Char *, Char *, Char *, Char *, glob_t *, size_t *); -static int globextend (const Char *, glob_t *, size_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 - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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 = (const 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(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]; - size_t limit = 0; - - 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(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, &limit)) != 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, &limit)); - 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, size_t *limit) -{ - 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, limit)); -} - -/* - * 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, - size_t *limit) -{ - 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, limit)); - } - - /* 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, - limit)); - } - /* NOTREACHED */ -} - -static int -glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern, - glob_t *pglob, size_t *limit) -{ - 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, limit); - 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, size_t *limit) -{ - char **pathv; - int i; - size_t newsize, len; - 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; - len = (size_t)(p - path); - *limit += len; - if ((copy = malloc(len)) != NULL) { - g_Ctoc(path, copy); - pathv[pglob->gl_offs + pglob->gl_pathc++] = copy; - } - pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; - - if ((pglob->gl_flags & GLOB_LIMIT) && (newsize + *limit) >= ARG_MAX) { - errno = 0; - return(GLOB_NOSPACE); - } - - 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. */ -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -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); - pglob->gl_pathv = NULL; - } -} - -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(const Char *str, int ch) -{ - do { - if (*str == ch) - return (Char *)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/kerberosV/src/lib/roken/glob.hin b/kerberosV/src/lib/roken/glob.hin deleted file mode 100644 index a4f16ce5e5d..00000000000 --- a/kerberosV/src/lib/roken/glob.hin +++ /dev/null @@ -1,106 +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. 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_ - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL _stdcall -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#define glob_t rk_glob_t -#define glob rk_glob -#define globfree rk_globfree - -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_LIMIT 0x1000 /* Limit memory used by matches to ARG_MAX */ - -#define GLOB_NOSPACE (-1) /* Malloc call failed. */ -#define GLOB_ABEND (-2) /* Unignored error. */ - -int ROKEN_LIB_FUNCTION -glob (const char *, int, int (*)(const char *, int), glob_t *); - -void ROKEN_LIB_FUNCTION -globfree (glob_t *); - -#ifdef __cplusplus -} -#endif - -#endif /* !_GLOB_H_ */ diff --git a/kerberosV/src/lib/roken/h_errno.c b/kerberosV/src/lib/roken/h_errno.c deleted file mode 100644 index 7e49f8008f9..00000000000 --- a/kerberosV/src/lib/roken/h_errno.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2001 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 - -#ifndef HAVE_H_ERRNO -int h_errno = -17; /* Some magic number */ -#endif diff --git a/kerberosV/src/lib/roken/hex-test.c b/kerberosV/src/lib/roken/hex-test.c deleted file mode 100644 index 9a3d10f2870..00000000000 --- a/kerberosV/src/lib/roken/hex-test.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 1999 - 2001, 2005 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 - -#include "roken.h" -#include - -int -main(int argc, char **argv) -{ - int numerr = 0; - int numtest = 1; - struct test { - void *data; - size_t len; - const char *result; - } *t, tests[] = { - { "", 0 , "" }, - { "a", 1, "61" }, - { "ab", 2, "6162" }, - { "abc", 3, "616263" }, - { "abcd", 4, "61626364" }, - { "abcde", 5, "6162636465" }, - { "abcdef", 6, "616263646566" }, - { "abcdefg", 7, "61626364656667" }, - { "=", 1, "3D" }, - { NULL } - }; - for(t = tests; t->data; t++) { - char *str; - int len; - len = hex_encode(t->data, t->len, &str); - if(strcmp(str, t->result) != 0) { - fprintf(stderr, "failed test %d: %s != %s\n", numtest, - str, t->result); - numerr++; - } - free(str); - str = strdup(t->result); - len = strlen(str); - len = hex_decode(t->result, str, len); - if(len != t->len) { - fprintf(stderr, "failed test %d: len %lu != %lu\n", numtest, - (unsigned long)len, (unsigned long)t->len); - numerr++; - } else if(memcmp(str, t->data, t->len) != 0) { - fprintf(stderr, "failed test %d: data\n", numtest); - numerr++; - } - free(str); - numtest++; - } - - { - unsigned char buf[2] = { 0, 0xff } ; - int len; - - len = hex_decode("A", buf, 1); - if (len != 1) { - fprintf(stderr, "len != 1"); - numerr++; - } - if (buf[0] != 10) { - fprintf(stderr, "buf != 10"); - numerr++; - } - if (buf[1] != 0xff) { - fprintf(stderr, "buf != 0xff"); - numerr++; - } - - } - - return numerr; -} diff --git a/kerberosV/src/lib/roken/hex.c b/kerberosV/src/lib/roken/hex.c deleted file mode 100644 index c66b324f790..00000000000 --- a/kerberosV/src/lib/roken/hex.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2004-2005 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 -#include "roken.h" -#include -#include "hex.h" - -static const char hexchar[16] = "0123456789ABCDEF"; - -static int -pos(char c) -{ - const char *p; - c = toupper((unsigned char)c); - for (p = hexchar; *p; p++) - if (*p == c) - return p - hexchar; - return -1; -} - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -hex_encode(const void *data, size_t size, char **str) -{ - const unsigned char *q = data; - size_t i; - char *p; - - /* check for overflow */ - if (size * 2 < size) { - *str = NULL; - return -1; - } - - p = malloc(size * 2 + 1); - if (p == NULL) { - *str = NULL; - return -1; - } - - for (i = 0; i < size; i++) { - p[i * 2] = hexchar[(*q >> 4) & 0xf]; - p[i * 2 + 1] = hexchar[*q & 0xf]; - q++; - } - p[i * 2] = '\0'; - *str = p; - - return i * 2; -} - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -hex_decode(const char *str, void *data, size_t len) -{ - size_t l; - unsigned char *p = data; - size_t i; - - l = strlen(str); - - /* check for overflow, same as (l+1)/2 but overflow safe */ - if ((l/2) + (l&1) > len) - return -1; - - if (l & 1) { - p[0] = pos(str[0]); - str++; - p++; - } - for (i = 0; i < l / 2; i++) - p[i] = pos(str[i * 2]) << 4 | pos(str[(i * 2) + 1]); - return i + (l & 1); -} diff --git a/kerberosV/src/lib/roken/hex.h b/kerberosV/src/lib/roken/hex.h deleted file mode 100644 index 6d937fe01aa..00000000000 --- a/kerberosV/src/lib/roken/hex.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2005 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: hex.h,v 1.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef _rk_HEX_H_ -#define _rk_HEX_H_ 1 - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -#define hex_encode rk_hex_encode -#define hex_decode rk_hex_decode - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL - hex_encode(const void *, size_t, char **); -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL - hex_decode(const char *, void *, size_t); - -#endif /* _rk_HEX_H_ */ diff --git a/kerberosV/src/lib/roken/hostent_find_fqdn.c b/kerberosV/src/lib/roken/hostent_find_fqdn.c deleted file mode 100644 index dc3c17ff22a..00000000000 --- a/kerberosV/src/lib/roken/hostent_find_fqdn.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#include "roken.h" - -/* - * Try to find a fqdn (with `.') in he if possible, else return h_name - */ - -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL -hostent_find_fqdn (const struct hostent *he) -{ - const char *ret = he->h_name; - const char **h; - - if (strchr (ret, '.') == NULL) - for (h = (const char **)he->h_aliases; *h != NULL; ++h) { - if (strchr (*h, '.') != NULL) { - ret = *h; - break; - } - } - return ret; -} diff --git a/kerberosV/src/lib/roken/hstrerror.c b/kerberosV/src/lib/roken/hstrerror.c deleted file mode 100644 index 70b63016e90..00000000000 --- a/kerberosV/src/lib/roken/hstrerror.c +++ /dev/null @@ -1,78 +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 - -#ifndef HAVE_HSTRERROR - -#if (defined(SunOS) && (SunOS >= 50)) -#define hstrerror broken_proto -#endif -#include "roken.h" -#if (defined(SunOS) && (SunOS >= 50)) -#undef hstrerror -#endif - -#if !(defined(HAVE_H_ERRLIST) && defined(HAVE_H_NERR)) -static const char *const h_errlist[] = { - "Resolver Error 0 (no error)", - "Unknown host", /* 1 HOST_NOT_FOUND */ - "Host name lookup failure", /* 2 TRY_AGAIN */ - "Unknown server error", /* 3 NO_RECOVERY */ - "No address associated with name", /* 4 NO_ADDRESS */ -}; - -static -const -int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] }; -#else - -#if !HAVE_DECL_H_ERRLIST -extern const char *h_errlist[]; -extern int h_nerr; -#endif - -#endif - -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL -hstrerror(int herr) -{ - if (0 <= herr && herr < h_nerr) - return h_errlist[herr]; - else if(herr == -17) - return "unknown error"; - else - return "Error number out of range (hstrerror)"; -} - -#endif diff --git a/kerberosV/src/lib/roken/ifaddrs.hin b/kerberosV/src/lib/roken/ifaddrs.hin deleted file mode 100644 index 81066a0be55..00000000000 --- a/kerberosV/src/lib/roken/ifaddrs.hin +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id: ifaddrs.hin,v 1.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __ifaddrs_h__ -#define __ifaddrs_h__ - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL _stdcall -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -/* - * the interface is defined in terms of the fields below, and this is - * sometimes #define'd, so there seems to be no simple way of solving - * this and this seemed the best. */ - -#undef ifa_dstaddr - -struct ifaddrs { - struct ifaddrs *ifa_next; - char *ifa_name; - unsigned int ifa_flags; - struct sockaddr *ifa_addr; - struct sockaddr *ifa_netmask; - struct sockaddr *ifa_dstaddr; - void *ifa_data; -}; - -#ifndef ifa_broadaddr -#define ifa_broadaddr ifa_dstaddr -#endif - -int ROKEN_LIB_FUNCTION -rk_getifaddrs(struct ifaddrs**); - -void ROKEN_LIB_FUNCTION -rk_freeifaddrs(struct ifaddrs*); - -#define getifaddrs(a) rk_getifaddrs(a) -#define freeifaddrs(a) rk_freeifaddrs(a) - -#endif /* __ifaddrs_h__ */ diff --git a/kerberosV/src/lib/roken/inet_aton.c b/kerberosV/src/lib/roken/inet_aton.c deleted file mode 100644 index 31644a0cd36..00000000000 --- a/kerberosV/src/lib/roken/inet_aton.c +++ /dev/null @@ -1,46 +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 - -#include "roken.h" - -/* Minimal implementation of inet_aton. - * Cannot distinguish between failure and a local broadcast address. */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -inet_aton(const char *cp, struct in_addr *addr) -{ - addr->s_addr = inet_addr(cp); - return (addr->s_addr == INADDR_NONE) ? 0 : 1; -} diff --git a/kerberosV/src/lib/roken/inet_ntop.c b/kerberosV/src/lib/roken/inet_ntop.c deleted file mode 100644 index b3c327cc3e5..00000000000 --- a/kerberosV/src/lib/roken/inet_ntop.c +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#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; - int compressed = 0; - - if (size < INET6_ADDRSTRLEN) { - errno = ENOSPC; - return NULL; - } - for (i = 0; i < 8; ++i) { - int non_zerop = 0; - - if (compressed == 0 && - ptr[0] == 0 && ptr[1] == 0 && - i <= 5 && - ptr[2] == 0 && ptr[3] == 0 && - ptr[4] == 0 && ptr[5] == 0) { - - compressed = 1; - - if (i == 0) - *dst++ = ':'; - *dst++ = ':'; - - for (ptr += 6, i += 3; - i < 8 && ptr[0] == 0 && ptr[1] == 0; - ++i, ptr += 2); - - if (i >= 8) - break; - } - - 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; - } - *dst++ = xdigits[ptr[1] & 0x0F]; - if (i != 7) - *dst++ = ':'; - ptr += 2; - } - *dst++ = '\0'; - return orig_dst; -} -#endif /* HAVE_IPV6 */ - -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/inet_pton.c b/kerberosV/src/lib/roken/inet_pton.c deleted file mode 100644 index e44fb1925ad..00000000000 --- a/kerberosV/src/lib/roken/inet_pton.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -#include "roken.h" - -#ifdef HAVE_WINSOCK - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -inet_pton(int af, const char *csrc, void *dst) -{ - char * src; - - if (csrc == NULL || (src = strdup(csrc)) == NULL) { - _set_errno( ENOMEM ); - return 0; - } - - switch (af) { - case AF_INET: - { - struct sockaddr_in si4; - INT r; - INT s = sizeof(si4); - - si4.sin_family = AF_INET; - r = WSAStringToAddress(src, AF_INET, NULL, (LPSOCKADDR) &si4, &s); - free(src); - src = NULL; - - if (r == 0) { - memcpy(dst, &si4.sin_addr, sizeof(si4.sin_addr)); - return 1; - } - } - break; - - case AF_INET6: - { - struct sockaddr_in6 si6; - INT r; - INT s = sizeof(si6); - - si6.sin6_family = AF_INET6; - r = WSAStringToAddress(src, AF_INET6, NULL, (LPSOCKADDR) &si6, &s); - free(src); - src = NULL; - - if (r == 0) { - memcpy(dst, &si6.sin6_addr, sizeof(si6.sin6_addr)); - return 1; - } - } - break; - - default: - _set_errno( EAFNOSUPPORT ); - return -1; - } - - /* the call failed */ - { - int le = WSAGetLastError(); - - if (le == WSAEINVAL) - return 0; - - _set_errno(le); - return -1; - } -} - -#else /* !HAVE_WINSOCK */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -inet_pton(int af, const char *src, void *dst) -{ - if (af != AF_INET) { - errno = EAFNOSUPPORT; - return -1; - } - return inet_aton (src, dst); -} - -#endif diff --git a/kerberosV/src/lib/roken/initgroups.c b/kerberosV/src/lib/roken/initgroups.c deleted file mode 100644 index 2ba944c1ac0..00000000000 --- a/kerberosV/src/lib/roken/initgroups.c +++ /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. - */ - -#include - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -initgroups(const char *name, gid_t basegid) -{ - return 0; -} diff --git a/kerberosV/src/lib/roken/innetgr.c b/kerberosV/src/lib/roken/innetgr.c deleted file mode 100644 index e1783bbfb4c..00000000000 --- a/kerberosV/src/lib/roken/innetgr.c +++ /dev/null @@ -1,45 +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 -#include "roken.h" - -#ifndef HAVE_INNETGR - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -innetgr(const char *netgroup, const char *machine, - const char *user, const char *domain) -{ - return 0; -} -#endif - diff --git a/kerberosV/src/lib/roken/install-sh b/kerberosV/src/lib/roken/install-sh deleted file mode 100644 index e9de23842dc..00000000000 --- a/kerberosV/src/lib/roken/install-sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/kerberosV/src/lib/roken/iruserok.c b/kerberosV/src/lib/roken/iruserok.c deleted file mode 100644 index 95f654681ec..00000000000 --- a/kerberosV/src/lib/roken/iruserok.c +++ /dev/null @@ -1,281 +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. 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. - */ - -#include - -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif -#ifdef HAVE_RPCSVC_YPCLNT_H -#include -#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. - */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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(); - if (seteuid(pwd->pw_uid) < 0) - return (-1); - 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/kerberosV/src/lib/roken/issuid.c b/kerberosV/src/lib/roken/issuid.c deleted file mode 100644 index ea0db803e2e..00000000000 --- a/kerberosV/src/lib/roken/issuid.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 1998 - 2001 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 - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -issuid(void) -{ -#if defined(HAVE_ISSETUGID) - return issetugid(); -#else /* !HAVE_ISSETUGID */ - -#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; -#endif /* HAVE_ISSETUGID */ -} diff --git a/kerberosV/src/lib/roken/k_getpwnam.c b/kerberosV/src/lib/roken/k_getpwnam.c deleted file mode 100644 index c0db757c43a..00000000000 --- a/kerberosV/src/lib/roken/k_getpwnam.c +++ /dev/null @@ -1,61 +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 - -#include "roken.h" -#ifdef HAVE_SHADOW_H -#include -#endif - -ROKEN_LIB_FUNCTION struct passwd * ROKEN_LIB_CALL -k_getpwnam (const char *user) -{ - struct passwd *p; - - p = getpwnam (user); -#if defined(HAVE_GETSPNAM) && defined(HAVE_STRUCT_SPWD) - if(p) - { - struct spwd *spwd; - - spwd = getspnam (user); - if (spwd) - p->pw_passwd = spwd->sp_pwdp; - endspent (); - } -#else - endpwent (); -#endif - return p; -} diff --git a/kerberosV/src/lib/roken/k_getpwuid.c b/kerberosV/src/lib/roken/k_getpwuid.c deleted file mode 100644 index d533738d9d0..00000000000 --- a/kerberosV/src/lib/roken/k_getpwuid.c +++ /dev/null @@ -1,61 +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 - -#include "roken.h" -#ifdef HAVE_SHADOW_H -#include -#endif - -ROKEN_LIB_FUNCTION struct passwd * ROKEN_LIB_CALL -k_getpwuid (uid_t uid) -{ - struct passwd *p; - - p = getpwuid (uid); -#if defined(HAVE_GETSPNAM) && defined(HAVE_STRUCT_SPWD) - if (p) - { - struct spwd *spwd; - - spwd = getspnam (p->pw_name); - if (spwd) - p->pw_passwd = spwd->sp_pwdp; - endspent (); - } -#else - endpwent (); -#endif - return p; -} diff --git a/kerberosV/src/lib/roken/localtime_r.c b/kerberosV/src/lib/roken/localtime_r.c deleted file mode 100644 index fa3d1269d64..00000000000 --- a/kerberosV/src/lib/roken/localtime_r.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -#include -#include -#include "roken.h" - -#ifndef HAVE_LOCALTIME_R - -ROKEN_LIB_FUNCTION struct tm * ROKEN_LIB_CALL -localtime_r(const time_t *timer, struct tm *result) -{ -#ifdef _MSC_VER - - return (localtime_s(result, timer) == 0)? result : NULL; - -#else - struct tm *tm; - - tm = localtime((time_t *)timer); - if (tm == NULL) - return NULL; - *result = *tm; - return result; -#endif -} - -#endif diff --git a/kerberosV/src/lib/roken/lstat.c b/kerberosV/src/lib/roken/lstat.c deleted file mode 100644 index 46925885062..00000000000 --- a/kerberosV/src/lib/roken/lstat.c +++ /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. - */ - -#include - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -lstat(const char *path, struct stat *buf) -{ - return stat(path, buf); -} diff --git a/kerberosV/src/lib/roken/memmove.c b/kerberosV/src/lib/roken/memmove.c deleted file mode 100644 index 1825d7eb3c6..00000000000 --- a/kerberosV/src/lib/roken/memmove.c +++ /dev/null @@ -1,62 +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. - */ - -#include - -/* - * memmove for systems that doesn't have it - */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -ROKEN_LIB_FUNCTION void* ROKEN_LIB_CALL -memmove(void *s1, const void *s2, size_t n) -{ - char *s=(char*)s2, *d=(char*)s1; - - if(d > s){ - s+=n-1; - d+=n-1; - while(n){ - *d--=*s--; - n--; - } - }else if(d < s) - while(n){ - *d++=*s++; - n--; - } - return s1; -} diff --git a/kerberosV/src/lib/roken/mini_inetd.c b/kerberosV/src/lib/roken/mini_inetd.c deleted file mode 100644 index a9398f4fdac..00000000000 --- a/kerberosV/src/lib/roken/mini_inetd.c +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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 - -#include -#include "roken.h" - -/* - * accept a connection on `s' and pretend it's served by inetd. - */ - -static void -accept_it (rk_socket_t s, rk_socket_t *ret_socket) -{ - rk_socket_t as; - - as = accept(s, NULL, NULL); - if(rk_IS_BAD_SOCKET(as)) - err (1, "accept"); - - if (ret_socket) { - - *ret_socket = as; - - } else { - int fd = socket_to_fd(as, 0); - - /* We would use _O_RDONLY for the socket_to_fd() call for - STDIN, but there are instances where we assume that STDIN - is a r/w socket. */ - - dup2(fd, STDIN_FILENO); - dup2(fd, STDOUT_FILENO); - - rk_closesocket(as); - } -} - -/** - * Listen on a specified addresses - * - * Listens on the specified addresses for incoming connections. If - * the \a ret_socket parameter is \a NULL, on return STDIN and STDOUT - * will be connected to an accepted socket. If the \a ret_socket - * parameter is non-NULL, the accepted socket will be returned in - * *ret_socket. In the latter case, STDIN and STDOUT will be left - * unmodified. - * - * This function does not return if there is an error or if no - * connection is established. - * - * @param[in] ai Addresses to listen on - * @param[out] ret_socket If non-NULL receives the accepted socket. - * - * @see mini_inetd() - */ -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -mini_inetd_addrinfo (struct addrinfo *ai, rk_socket_t *ret_socket) -{ - int ret; - struct addrinfo *a; - int n, nalloc, i; - rk_socket_t *fds; - fd_set orig_read_set, read_set; - rk_socket_t max_fd = (rk_socket_t)-1; - - for (nalloc = 0, a = ai; a != NULL; a = a->ai_next) - ++nalloc; - - fds = malloc (nalloc * sizeof(*fds)); - if (fds == NULL) { - errx (1, "mini_inetd: out of memory"); - UNREACHABLE(return); - } - - FD_ZERO(&orig_read_set); - - for (i = 0, a = ai; a != NULL; a = a->ai_next) { - fds[i] = socket (a->ai_family, a->ai_socktype, a->ai_protocol); - if (rk_IS_BAD_SOCKET(fds[i])) - continue; - socket_set_reuseaddr (fds[i], 1); - socket_set_ipv6only(fds[i], 1); - if (rk_IS_SOCKET_ERROR(bind (fds[i], a->ai_addr, a->ai_addrlen))) { - warn ("bind af = %d", a->ai_family); - rk_closesocket(fds[i]); - fds[i] = rk_INVALID_SOCKET; - continue; - } - if (rk_IS_SOCKET_ERROR(listen (fds[i], SOMAXCONN))) { - warn ("listen af = %d", a->ai_family); - rk_closesocket(fds[i]); - fds[i] = rk_INVALID_SOCKET; - continue; - } -#ifndef NO_LIMIT_FD_SETSIZE - if (fds[i] >= FD_SETSIZE) - errx (1, "fd too large"); -#endif - FD_SET(fds[i], &orig_read_set); - max_fd = max(max_fd, fds[i]); - ++i; - } - if (i == 0) - errx (1, "no sockets"); - n = i; - - do { - read_set = orig_read_set; - - ret = select (max_fd + 1, &read_set, NULL, NULL, NULL); - if (rk_IS_SOCKET_ERROR(ret) && rk_SOCK_ERRNO != EINTR) - err (1, "select"); - } while (ret <= 0); - - for (i = 0; i < n; ++i) - if (FD_ISSET (fds[i], &read_set)) { - accept_it (fds[i], ret_socket); - for (i = 0; i < n; ++i) - rk_closesocket(fds[i]); - free(fds); - return; - } - abort (); -} - -/** - * Listen on a specified port - * - * Listens on the specified port for incoming connections. If the \a - * ret_socket parameter is \a NULL, on return STDIN and STDOUT will be - * connected to an accepted socket. If the \a ret_socket parameter is - * non-NULL, the accepted socket will be returned in *ret_socket. In - * the latter case, STDIN and STDOUT will be left unmodified. - * - * This function does not return if there is an error or if no - * connection is established. - * - * @param[in] port Port to listen on - * @param[out] ret_socket If non-NULL receives the accepted socket. - * - * @see mini_inetd_addrinfo() - */ -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -mini_inetd(int port, rk_socket_t * ret_socket) -{ - int error; - struct addrinfo *ai, hints; - char portstr[NI_MAXSERV]; - - memset (&hints, 0, sizeof(hints)); - hints.ai_flags = AI_PASSIVE; - hints.ai_socktype = SOCK_STREAM; - hints.ai_family = PF_UNSPEC; - - snprintf (portstr, sizeof(portstr), "%d", ntohs(port)); - - error = getaddrinfo (NULL, portstr, &hints, &ai); - if (error) - errx (1, "getaddrinfo: %s", gai_strerror (error)); - - mini_inetd_addrinfo(ai, ret_socket); - - freeaddrinfo(ai); -} - diff --git a/kerberosV/src/lib/roken/missing b/kerberosV/src/lib/roken/missing deleted file mode 100644 index 7789652e877..00000000000 --- a/kerberosV/src/lib/roken/missing +++ /dev/null @@ -1,190 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 diff --git a/kerberosV/src/lib/roken/mkinstalldirs b/kerberosV/src/lib/roken/mkinstalldirs deleted file mode 100644 index 446fa4f6802..00000000000 --- a/kerberosV/src/lib/roken/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs,v 1.2 2013/06/17 18:57:45 robert Exp $ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/kerberosV/src/lib/roken/mkstemp.c b/kerberosV/src/lib/roken/mkstemp.c deleted file mode 100644 index a3ca6c717f0..00000000000 --- a/kerberosV/src/lib/roken/mkstemp.c +++ /dev/null @@ -1,82 +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. - */ - -#include - -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif -#include - -#include - -#ifndef HAVE_MKSTEMP - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -mkstemp(char *template) -{ - int start, i; - pid_t val; - val = getpid(); - start = strlen(template) - 1; - while(template[start] == 'X') { - template[start] = '0' + val % 10; - val /= 10; - start--; - } - - do{ - int fd; - fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600); - if(fd >= 0 || errno != EEXIST) - return fd; - i = start + 1; - do{ - if(template[i] == 0) - return -1; - template[i]++; - if(template[i] == '9' + 1) - template[i] = 'a'; - if(template[i] <= 'z') - break; - template[i] = 'a'; - i++; - }while(1); - }while(1); -} - -#endif diff --git a/kerberosV/src/lib/roken/ndbm_wrap.c b/kerberosV/src/lib/roken/ndbm_wrap.c deleted file mode 100644 index 73a3726d0f0..00000000000 --- a/kerberosV/src/lib/roken/ndbm_wrap.c +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright (c) 2002 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 - -#include "ndbm_wrap.h" -#if defined(HAVE_DBHEADER) -#include -#elif defined(HAVE_DB5_DB_H) -#include -#elif defined(HAVE_DB4_DB_H) -#include -#elif defined(HAVE_DB3_DB_H) -#include -#else -#include -#endif - -#include -#include -#include -#include - -/* XXX undefine open so this works on Solaris with large file support */ -#undef open - -#define DBT2DATUM(DBT, DATUM) do { (DATUM)->dptr = (DBT)->data; (DATUM)->dsize = (DBT)->size; } while(0) -#define DATUM2DBT(DATUM, DBT) do { (DBT)->data = (DATUM)->dptr; (DBT)->size = (DATUM)->dsize; } while(0) -#define RETURN(X) return ((X) == 0) ? 0 : -1 - -#ifdef HAVE_DB3 -static DBC *cursor; -#endif - -#define D(X) ((DB*)(X)) - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -dbm_close (DBM *db) -{ -#ifdef HAVE_DB3 - D(db)->close(D(db), 0); - cursor = NULL; -#else - D(db)->close(D(db)); -#endif -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -dbm_delete (DBM *db, datum dkey) -{ - DBT key; - DATUM2DBT(&dkey, &key); -#ifdef HAVE_DB3 - RETURN(D(db)->del(D(db), NULL, &key, 0)); -#else - RETURN(D(db)->del(D(db), &key, 0)); -#endif -} - -datum -dbm_fetch (DBM *db, datum dkey) -{ - datum dvalue; - DBT key, value; - DATUM2DBT(&dkey, &key); - if(D(db)->get(D(db), -#ifdef HAVE_DB3 - NULL, -#endif - &key, &value, 0) != 0) { - dvalue.dptr = NULL; - dvalue.dsize = 0; - } - else - DBT2DATUM(&value, &dvalue); - - return dvalue; -} - -static datum -dbm_get (DB *db, int flags) -{ - DBT key, value; - datum datum; -#ifdef HAVE_DB3 - if(cursor == NULL) - db->cursor(db, NULL, &cursor, 0); - if(cursor->c_get(cursor, &key, &value, flags) != 0) { - datum.dptr = NULL; - datum.dsize = 0; - } else - DBT2DATUM(&value, &datum); -#else - db->seq(db, &key, &value, flags); - DBT2DATUM(&value, &datum); -#endif - return datum; -} - -#ifndef DB_FIRST -#define DB_FIRST R_FIRST -#define DB_NEXT R_NEXT -#define DB_NOOVERWRITE R_NOOVERWRITE -#define DB_KEYEXIST 1 -#endif - -ROKEN_LIB_FUNCTION datum ROKEN_LIB_CALL -dbm_firstkey (DBM *db) -{ - return dbm_get(D(db), DB_FIRST); -} - -ROKEN_LIB_FUNCTION datum ROKEN_LIB_CALL -dbm_nextkey (DBM *db) -{ - return dbm_get(D(db), DB_NEXT); -} - -ROKEN_LIB_FUNCTION DBM* ROKEN_LIB_CALL -dbm_open (const char *file, int flags, mode_t mode) -{ -#ifdef HAVE_DB3 - int myflags = 0; -#endif - DB *db; - char *fn = malloc(strlen(file) + 4); - if(fn == NULL) - return NULL; - strcpy(fn, file); - strcat(fn, ".db"); -#ifdef HAVE_DB3 - if (flags & O_CREAT) - myflags |= DB_CREATE; - - if (flags & O_EXCL) - myflags |= DB_EXCL; - - if (flags & O_RDONLY) - myflags |= DB_RDONLY; - - if (flags & O_TRUNC) - myflags |= DB_TRUNCATE; - if(db_create(&db, NULL, 0) != 0) { - free(fn); - return NULL; - } - -#if (DB_VERSION_MAJOR > 3) && (DB_VERSION_MINOR > 0) - if(db->open(db, NULL, fn, NULL, DB_BTREE, myflags, mode) != 0) { -#else - if(db->open(db, fn, NULL, DB_BTREE, myflags, mode) != 0) { -#endif - free(fn); - db->close(db, 0); - return NULL; - } -#else - db = dbopen(fn, flags, mode, DB_BTREE, NULL); -#endif - free(fn); - return (DBM*)db; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -dbm_store (DBM *db, datum dkey, datum dvalue, int flags) -{ - int ret; - DBT key, value; - int myflags = 0; - if((flags & DBM_REPLACE) == 0) - myflags |= DB_NOOVERWRITE; - DATUM2DBT(&dkey, &key); - DATUM2DBT(&dvalue, &value); - ret = D(db)->put(D(db), -#ifdef HAVE_DB3 - NULL, -#endif -&key, &value, myflags); - if(ret == DB_KEYEXIST) - return 1; - RETURN(ret); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -dbm_error (DBM *db) -{ - return 0; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -dbm_clearerr (DBM *db) -{ - return 0; -} - diff --git a/kerberosV/src/lib/roken/ndbm_wrap.h b/kerberosV/src/lib/roken/ndbm_wrap.h deleted file mode 100644 index 903f3e67b30..00000000000 --- a/kerberosV/src/lib/roken/ndbm_wrap.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2002 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: ndbm_wrap.h,v 1.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __ndbm_wrap_h__ -#define __ndbm_wrap_h__ - -#include -#include - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -#ifndef dbm_rename -#define dbm_rename(X) __roken_ ## X -#endif - -#define dbm_open dbm_rename(dbm_open) -#define dbm_close dbm_rename(dbm_close) -#define dbm_delete dbm_rename(dbm_delete) -#define dbm_fetch dbm_rename(dbm_fetch) -#define dbm_get dbm_rename(dbm_get) -#define dbm_firstkey dbm_rename(dbm_firstkey) -#define dbm_nextkey dbm_rename(dbm_nextkey) -#define dbm_store dbm_rename(dbm_store) -#define dbm_error dbm_rename(dbm_error) -#define dbm_clearerr dbm_rename(dbm_clearerr) - -#define datum dbm_rename(datum) - -typedef struct { - void *dptr; - size_t dsize; -} datum; - -#define DBM_REPLACE 1 -typedef struct DBM DBM; - -#if 0 -typedef struct { - int dummy; -} DBM; -#endif - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL dbm_clearerr (DBM*); -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL dbm_close (DBM*); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL dbm_delete (DBM*, datum); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL dbm_error (DBM*); -ROKEN_LIB_FUNCTION datum ROKEN_LIB_CALL dbm_fetch (DBM*, datum); -ROKEN_LIB_FUNCTION datum ROKEN_LIB_CALL dbm_firstkey (DBM*); -ROKEN_LIB_FUNCTION datum ROKEN_LIB_CALL dbm_nextkey (DBM*); -ROKEN_LIB_FUNCTION DBM* ROKEN_LIB_CALL dbm_open (const char*, int, mode_t); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL dbm_store (DBM*, datum, datum, int); - -#endif /* __ndbm_wrap_h__ */ diff --git a/kerberosV/src/lib/roken/net_read.c b/kerberosV/src/lib/roken/net_read.c deleted file mode 100644 index df1ac53def1..00000000000 --- a/kerberosV/src/lib/roken/net_read.c +++ /dev/null @@ -1,118 +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 - -#include "roken.h" - -/* - * Like read but never return partial data. - */ - -#ifndef _WIN32 - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -net_read (rk_socket_t fd, void *buf, size_t nbytes) -{ - char *cbuf = (char *)buf; - ssize_t count; - size_t rem = nbytes; - - while (rem > 0) { - count = read (fd, cbuf, rem); - if (count < 0) { - if (errno == EINTR) - continue; - else - return count; - } else if (count == 0) { - return count; - } - cbuf += count; - rem -= count; - } - return nbytes; -} - -#else - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -net_read(rk_socket_t sock, void *buf, size_t nbytes) -{ - char *cbuf = (char *)buf; - ssize_t count; - size_t rem = nbytes; - -#ifdef SOCKET_IS_NOT_AN_FD - int use_read = 0; -#endif - - while (rem > 0) { -#ifdef SOCKET_IS_NOT_AN_FD - if (use_read) - count = _read (sock, cbuf, rem); - else - count = recv (sock, cbuf, rem, 0); - - if (use_read == 0 && - rk_IS_SOCKET_ERROR(count) && - (rk_SOCK_ERRNO == WSANOTINITIALISED || - rk_SOCK_ERRNO == WSAENOTSOCK)) { - use_read = 1; - - count = _read (sock, cbuf, rem); - } -#else - count = recv (sock, cbuf, rem, 0); -#endif - if (count < 0) { - - /* With WinSock, the error EINTR (WSAEINTR), is used to - indicate that a blocking call was cancelled using - WSACancelBlockingCall(). */ - -#ifndef HAVE_WINSOCK - if (rk_SOCK_ERRNO == EINTR) - continue; -#endif - return count; - } else if (count == 0) { - return count; - } - cbuf += count; - rem -= count; - } - return nbytes; -} - -#endif diff --git a/kerberosV/src/lib/roken/net_write.c b/kerberosV/src/lib/roken/net_write.c deleted file mode 100644 index e1cfa99074e..00000000000 --- a/kerberosV/src/lib/roken/net_write.c +++ /dev/null @@ -1,107 +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 - -#include "roken.h" - -/* - * Like write but never return partial data. - */ - -#ifndef _WIN32 - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -net_write (rk_socket_t fd, const void *buf, size_t nbytes) -{ - const char *cbuf = (const char *)buf; - ssize_t count; - size_t rem = nbytes; - - while (rem > 0) { - count = write (fd, cbuf, rem); - if (count < 0) { - if (errno == EINTR) - continue; - else - return count; - } - cbuf += count; - rem -= count; - } - return nbytes; -} - -#else - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -net_write(rk_socket_t sock, const void *buf, size_t nbytes) -{ - const char *cbuf = (const char *)buf; - ssize_t count; - size_t rem = nbytes; -#ifdef SOCKET_IS_NOT_AN_FD - int use_write = 0; -#endif - - while (rem > 0) { -#ifdef SOCKET_IS_NOT_AN_FD - if (use_write) - count = _write (sock, cbuf, rem); - else - count = send (sock, cbuf, rem, 0); - - if (use_write == 0 && - rk_IS_SOCKET_ERROR(count) && - (rk_SOCK_ERRNO == WSANOTINITIALISED || - rk_SOCK_ERRNO == WSAENOTSOCK)) { - use_write = 1; - - count = _write (sock, cbuf, rem); - } -#else - count = send (sock, cbuf, rem, 0); -#endif - if (count < 0) { - if (errno == EINTR) - continue; - else - return count; - } - cbuf += count; - rem -= count; - } - return nbytes; -} - -#endif diff --git a/kerberosV/src/lib/roken/parse_bytes-test.c b/kerberosV/src/lib/roken/parse_bytes-test.c deleted file mode 100644 index 3c42cb1827c..00000000000 --- a/kerberosV/src/lib/roken/parse_bytes-test.c +++ /dev/null @@ -1,89 +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 - -#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); - int 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/kerberosV/src/lib/roken/parse_bytes.c b/kerberosV/src/lib/roken/parse_bytes.c deleted file mode 100644 index 561079afc02..00000000000 --- a/kerberosV/src/lib/roken/parse_bytes.c +++ /dev/null @@ -1,75 +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 - -#include -#include "parse_bytes.h" - -static struct 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 struct units bytes_short_units[] = { - { "GB", 1024 * 1024 * 1024 }, - { "MB", 1024 * 1024 }, - { "KB", 1024 }, - { NULL, 0 } -}; - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -parse_bytes (const char *s, const char *def_unit) -{ - return parse_units (s, bytes_units, def_unit); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unparse_bytes (int t, char *s, size_t len) -{ - return unparse_units (t, bytes_units, s, len); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unparse_bytes_short (int t, char *s, size_t len) -{ - return unparse_units_approx (t, bytes_short_units, s, len); -} diff --git a/kerberosV/src/lib/roken/parse_bytes.h b/kerberosV/src/lib/roken/parse_bytes.h deleted file mode 100644 index 748fa915cea..00000000000 --- a/kerberosV/src/lib/roken/parse_bytes.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __PARSE_BYTES_H__ -#define __PARSE_BYTES_H__ - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -parse_bytes (const char *s, const char *def_unit); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unparse_bytes (int t, char *s, size_t len); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unparse_bytes_short (int t, char *s, size_t len); - -#endif /* __PARSE_BYTES_H__ */ diff --git a/kerberosV/src/lib/roken/parse_reply-test.c b/kerberosV/src/lib/roken/parse_reply-test.c deleted file mode 100644 index 5e40b818502..00000000000 --- a/kerberosV/src/lib/roken/parse_reply-test.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2002 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 - -#include -#ifdef HAVE_SYS_MMAN_H -#include -#endif -#include - -#include "roken.h" -#include "resolve.h" - -struct dns_reply* -parse_reply(const unsigned char *, size_t); - -enum { MAX_BUF = 36}; - -static struct testcase { - unsigned char buf[MAX_BUF]; - size_t buf_len; -} tests[] = { - {{0x12, 0x67, 0x84, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x03, 'f', 'o', 'o', 0x00, - 0x00, 0x10, 0x00, 0x01, - 0x03, 'f', 'o', 'o', 0x00, - 0x00, 0x10, 0x00, 0x01, - 0x00, 0x00, 0x12, 0x67, 0xff, 0xff}, 36} -}; - -#ifndef MAP_FAILED -#define MAP_FAILED (-1) -#endif - -static sig_atomic_t val = 0; - -static RETSIGTYPE -segv_handler(int sig) -{ - val = 1; -} - -int -main(int argc, char **argv) -{ -#ifndef HAVE_MMAP - return 77; /* signal to automake that this test - cannot be run */ -#else /* HAVE_MMAP */ - int ret; - int i; - struct sigaction sa; - - sigemptyset (&sa.sa_mask); - sa.sa_flags = 0; - sa.sa_handler = segv_handler; - sigaction (SIGSEGV, &sa, NULL); - - for (i = 0; val == 0 && i < sizeof(tests)/sizeof(tests[0]); ++i) { - const struct testcase *t = &tests[i]; - unsigned char *p1, *p2; - int flags; - int fd; - size_t pagesize = getpagesize(); - unsigned char *buf; - -#ifdef MAP_ANON - flags = MAP_ANON; - fd = -1; -#else - flags = 0; - fd = open ("/dev/zero", O_RDONLY); - if(fd < 0) - err (1, "open /dev/zero"); -#endif - flags |= MAP_PRIVATE; - - p1 = (unsigned char *)mmap(0, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (p1 == (unsigned char *)MAP_FAILED) - err (1, "mmap"); - p2 = p1 + pagesize; - ret = mprotect ((void *)p2, pagesize, 0); - if (ret < 0) - err (1, "mprotect"); - buf = p2 - t->buf_len; - memcpy (buf, t->buf, t->buf_len); - parse_reply (buf, t->buf_len); - ret = munmap ((void *)p1, 2 * pagesize); - if (ret < 0) - err (1, "munmap"); - } - return val; -#endif /* HAVE_MMAP */ -} diff --git a/kerberosV/src/lib/roken/parse_time-test.c b/kerberosV/src/lib/roken/parse_time-test.c deleted file mode 100644 index 851764d28e5..00000000000 --- a/kerberosV/src/lib/roken/parse_time-test.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2004 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 - -#include "roken.h" -#include "parse_time.h" -#include "test-mem.h" -#include "err.h" - -static struct testcase { - size_t size; - int val; - char *str; -} tests[] = { - { 8, 1, "1 second" }, - { 17, 61, "1 minute 1 second" }, - { 18, 62, "1 minute 2 seconds" }, - { 8, 60, "1 minute" }, - { 6, 3600, "1 hour" }, - { 15, 3601, "1 hour 1 second" }, - { 16, 3602, "1 hour 2 seconds" } -}; - -int -main(int argc, char **argv) -{ - size_t sz; - size_t buf_sz; - int i, j; - - for (i = 0; i < sizeof(tests)/sizeof(tests[0]); ++i) { - char *buf; - - sz = unparse_time(tests[i].val, NULL, 0); - if (sz != tests[i].size) - errx(1, "sz (%lu) != tests[%d].size (%lu)", - (unsigned long)sz, i, (unsigned long)tests[i].size); - - for (buf_sz = 0; buf_sz < tests[i].size + 2; buf_sz++) { - - buf = rk_test_mem_alloc(RK_TM_OVERRUN, "overrun", - NULL, buf_sz); - sz = unparse_time(tests[i].val, buf, buf_sz); - if (sz != tests[i].size) - errx(1, "sz (%lu) != tests[%d].size (%lu) with in size %lu", - (unsigned long)sz, i, - (unsigned long)tests[i].size, - (unsigned long)buf_sz); - if (buf_sz > 0 && memcmp(buf, tests[i].str, buf_sz - 1) != 0) - errx(1, "test %i wrong result %s vs %s", i, buf, tests[i].str); - if (buf_sz > 0 && buf[buf_sz - 1] != '\0') - errx(1, "test %i not zero terminated", i); - rk_test_mem_free("overrun"); - - buf = rk_test_mem_alloc(RK_TM_UNDERRUN, "underrun", - NULL, tests[i].size); - sz = unparse_time(tests[i].val, buf, min(buf_sz, tests[i].size)); - if (sz != tests[i].size) - errx(1, "sz (%lu) != tests[%d].size (%lu) with insize %lu", - (unsigned long)sz, i, - (unsigned long)tests[i].size, - (unsigned long)buf_sz); - if (buf_sz > 0 && strncmp(buf, tests[i].str, min(buf_sz, tests[i].size) - 1) != 0) - errx(1, "test %i wrong result %s vs %s", i, buf, tests[i].str); - if (buf_sz > 0 && buf[min(buf_sz, tests[i].size) - 1] != '\0') - errx(1, "test %i not zero terminated", i); - rk_test_mem_free("underrun"); - } - - buf = rk_test_mem_alloc(RK_TM_OVERRUN, "overrun", - tests[i].str, tests[i].size + 1); - j = parse_time(buf, "s"); - if (j != tests[i].val) - errx(1, "parse_time failed for test %d", i); - rk_test_mem_free("overrun"); - - buf = rk_test_mem_alloc(RK_TM_UNDERRUN, "underrun", - tests[i].str, tests[i].size + 1); - j = parse_time(buf, "s"); - if (j != tests[i].val) - errx(1, "parse_time failed for test %d", i); - rk_test_mem_free("underrun"); - - } - return 0; -} diff --git a/kerberosV/src/lib/roken/parse_time.3 b/kerberosV/src/lib/roken/parse_time.3 deleted file mode 100644 index 04673cc62a8..00000000000 --- a/kerberosV/src/lib/roken/parse_time.3 +++ /dev/null @@ -1,173 +0,0 @@ -.\" Copyright (c) 2004 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.3,v 1.3 2013/06/17 18:57:45 robert Exp $ -.\" -.Dd October 31, 2004 -.Dt PARSE_TIME 3 -.Os HEIMDAL -.Sh NAME -.Nm parse_time , -.Nm print_time_table , -.Nm unparse_time , -.Nm unparse_time_approx , -.Nd parse and unparse time intervals -.Sh LIBRARY -The roken library (libroken, -lroken) -.Sh SYNOPSIS -.Fd #include -.Ft int -.Fn parse_time "const char *timespec" "const char *def_unit" -.Ft void -.Fn print_time_table "FILE *f" -.Ft size_t -.Fn unparse_time "int seconds" "char *buf" "size_t len" -.Ft size_t -.Fn unparse_time_approx "int seconds" "char *buf" "size_t len" -.Sh DESCRIPTION -The -.Fn parse_time -function converts a the period of time specified in -into a number of seconds. -The -.Fa timespec -can be any number of -.Aq number unit -pairs separated by comma and whitespace. The number can be -negative. Number without explicit units are taken as being -.Fa def_unit . -.Pp -The -.Fn unparse_time -and -.Fn unparse_time_approx -does the opposite of -.Fn parse_time , -that is they take a number of seconds and express that as human -readable string. -.Fa unparse_time -produces an exact time, while -.Fa unparse_time_approx -restricts the result to only include one units. -.Pp -.Fn print_time_table -prints a descriptive list of available units on the passed file -descriptor. -.Pp -The possible units include: -.Bl -tag -width "month" -compact -offset indent -.It Li second , s -.It Li minute , m -.It Li hour , h -.It day -.It week -seven days -.It month -30 days -.It year -365 days -.El -.Pp -Units names can be arbitrarily abbreviated (as long as they are -unique). -.Sh RETURN VALUES -.Fn parse_time -returns the number of seconds that represents the expression in -.Fa timespec -or -1 on error. -.Fn unparse_time -and -.Fn unparse_time_approx -return the number of characters written to -.Fa buf . -if the return value is greater than or equal to the -.Fa len -argument, the string was too short and some of the printed characters -were discarded. -.Sh EXAMPLES -.Bd -literal -#include -#include - -int -main(int argc, char **argv) -{ - int i; - int result; - char buf[128]; - print_time_table(stdout); - for (i = 1; i < argc; i++) { - result = parse_time(argv[i], "second"); - if(result == -1) { - fprintf(stderr, "%s: parse error\\n", argv[i]); - continue; - } - printf("--\\n"); - printf("parse_time = %d\\n", result); - unparse_time(result, buf, sizeof(buf)); - printf("unparse_time = %s\\n", buf); - unparse_time_approx(result, buf, sizeof(buf)); - printf("unparse_time_approx = %s\\n", buf); - } - return 0; -} -.Ed -.Bd -literal -$ ./a.out "1 minute 30 seconds" "90 s" "1 y -1 s" -1 year = 365 days -1 month = 30 days -1 week = 7 days -1 day = 24 hours -1 hour = 60 minutes -1 minute = 60 seconds -1 second --- -parse_time = 90 -unparse_time = 1 minute 30 seconds -unparse_time_approx = 1 minute --- -parse_time = 90 -unparse_time = 1 minute 30 seconds -unparse_time_approx = 1 minute --- -parse_time = 31535999 -unparse_time = 12 months 4 days 23 hours 59 minutes 59 seconds -unparse_time_approx = 12 months -.Ed -.Sh BUGS -Since -.Fn parse_time -returns -1 on error there is no way to parse "minus one second". -Currently "s" at the end of units is ignored. This is a hack for -English plural forms. If these functions are ever localised, this -scheme will have to change. -.\".Sh SEE ALSO -.\".Xr parse_bytes 3 -.\".Xr parse_units 3 diff --git a/kerberosV/src/lib/roken/parse_time.c b/kerberosV/src/lib/roken/parse_time.c deleted file mode 100644 index febd6a5d2bf..00000000000 --- a/kerberosV/src/lib/roken/parse_time.c +++ /dev/null @@ -1,75 +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. - */ - -#include - -#include -#include "parse_time.h" - -static struct 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}, -}; - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -parse_time (const char *s, const char *def_unit) -{ - return parse_units (s, time_units, def_unit); -} - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -unparse_time (int t, char *s, size_t len) -{ - return unparse_units (t, time_units, s, len); -} - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -unparse_time_approx (int t, char *s, size_t len) -{ - return unparse_units_approx (t, time_units, s, len); -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -print_time_table (FILE *f) -{ - print_units_table (time_units, f); -} diff --git a/kerberosV/src/lib/roken/parse_time.h b/kerberosV/src/lib/roken/parse_time.h deleted file mode 100644 index aa9724d990d..00000000000 --- a/kerberosV/src/lib/roken/parse_time.h +++ /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. - */ - -/* $Id: parse_time.h,v 1.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __PARSE_TIME_H__ -#define __PARSE_TIME_H__ - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -parse_time (const char *s, const char *def_unit); - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -unparse_time (int t, char *s, size_t len); - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -unparse_time_approx (int t, char *s, size_t len); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -print_time_table (FILE *f); - -#endif /* __PARSE_TIME_H__ */ diff --git a/kerberosV/src/lib/roken/parse_units.c b/kerberosV/src/lib/roken/parse_units.c deleted file mode 100644 index 8b3cdf40e59..00000000000 --- a/kerberosV/src/lib/roken/parse_units.c +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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 - -#include -#include -#include -#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) { - int 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 = strtol(p, &next, 0); - if (p == next) { - val = 0; - 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; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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 int -unparse_something (int num, const struct units *units, char *s, size_t len, - int (*print) (char *, size_t, int, const char *, int), - int (*update) (int, unsigned), - const char *zero_string) -{ - const struct units *u; - int ret = 0, tmp; - - if (num == 0) - return snprintf (s, len, "%s", zero_string); - - for (u = units; num > 0 && u->name; ++u) { - int divisor; - - divisor = num / u->mult; - if (divisor) { - num = (*update) (num, u->mult); - tmp = (*print) (s, len, divisor, u->name, num); - if (tmp < 0) - return tmp; - if (tmp > (int) len) { - len = 0; - s = NULL; - } else { - len -= tmp; - s += tmp; - } - ret += tmp; - } - } - return ret; -} - -static int -print_unit (char *s, size_t len, int divisor, const char *name, int rem) -{ - return snprintf (s, len, "%u %s%s%s", - divisor, name, - divisor == 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); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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"); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -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"); -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -print_units_table (const struct units *units, FILE *f) -{ - const struct units *u, *u2; - size_t 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", (int)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 divisor, 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; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unparse_flags (int num, const struct units *units, char *s, size_t len) -{ - return unparse_something (num, units, s, len, - print_flag, - update_flag, - ""); -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/parse_units.h b/kerberosV/src/lib/roken/parse_units.h deleted file mode 100644 index 73656d8fd23..00000000000 --- a/kerberosV/src/lib/roken/parse_units.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 1997 - 2001 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.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __PARSE_UNITS_H__ -#define __PARSE_UNITS_H__ - -#include -#include - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -struct units { - const char *name; - unsigned mult; -}; - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -parse_units (const char *s, const struct units *units, - const char *def_unit); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -print_units_table (const struct units *units, FILE *f); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -parse_flags (const char *s, const struct units *units, - int orig); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unparse_units (int num, const struct units *units, char *s, size_t len); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unparse_units_approx (int num, const struct units *units, char *s, - size_t len); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unparse_flags (int num, const struct units *units, char *s, size_t len); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -print_flags_table (const struct units *units, FILE *f); - -#endif /* __PARSE_UNITS_H__ */ diff --git a/kerberosV/src/lib/roken/putenv.c b/kerberosV/src/lib/roken/putenv.c deleted file mode 100644 index 647eb7a348b..00000000000 --- a/kerberosV/src/lib/roken/putenv.c +++ /dev/null @@ -1,79 +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. - */ - -#include - -#include - -#if !HAVE_DECL_ENVIRON -extern char **environ; -#endif - -/* - * putenv -- - * String points to a string of the form name=value. - * - * Makes the value of the environment variable name equal to - * value by altering an existing variable or creating a new one. - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -putenv(const char *string) -{ - int i; - const char *eq = (const char *)strchr(string, '='); - int len; - - if (eq == NULL) - return 1; - len = eq - string; - - if(environ == NULL) { - environ = malloc(sizeof(char*)); - if(environ == NULL) - return 1; - environ[0] = NULL; - } - - for(i = 0; environ[i] != NULL; i++) - if(strncmp(string, environ[i], len) == 0) { - environ[i] = string; - return 0; - } - environ = realloc(environ, sizeof(char*) * (i + 2)); - if(environ == NULL) - return 1; - environ[i] = string; - environ[i+1] = NULL; - return 0; -} diff --git a/kerberosV/src/lib/roken/qsort.c b/kerberosV/src/lib/roken/qsort.c deleted file mode 100644 index 768981334f2..00000000000 --- a/kerberosV/src/lib/roken/qsort.c +++ /dev/null @@ -1,203 +0,0 @@ -/*- - * 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. - * 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 0 -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ -#include -__FBSDID("$FreeBSD$"); -#endif - -#include - -#ifdef NEED_QSORT - -#include "roken.h" - -#include - -#ifdef I_AM_QSORT_R -typedef int cmp_t(void *, const void *, const void *); -#else -typedef int cmp_t(const void *, const void *); -#endif -static inline char *med3(char *, char *, char *, cmp_t *, void *); -static inline void swapfunc(char *, char *, int, int); - -/* - * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". - */ -#define swapcode(TYPE, parmi, parmj, n) { \ - long i = (n) / sizeof (TYPE); \ - TYPE *pi = (TYPE *) (parmi); \ - TYPE *pj = (TYPE *) (parmj); \ - do { \ - TYPE t = *pi; \ - *pi++ = *pj; \ - *pj++ = t; \ - } while (--i > 0); \ -} - -#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ - es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; - -static inline void -swapfunc(a, b, n, swaptype) - char *a, *b; - int n, swaptype; -{ - if(swaptype <= 1) - swapcode(long, a, b, n) - else - swapcode(char, a, b, n) -} - -#define swap(a, b) \ - if (swaptype == 0) { \ - long t = *(long *)(a); \ - *(long *)(a) = *(long *)(b); \ - *(long *)(b) = t; \ - } else \ - swapfunc(a, b, es, swaptype) - -#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) - -#ifdef I_AM_QSORT_R -#define CMP(t, x, y) (cmp((t), (x), (y))) -#else -#define CMP(t, x, y) (cmp((x), (y))) -#endif - -static inline char * -med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk -#ifndef I_AM_QSORT_R -/* __unused */ -#endif -) -{ - return CMP(thunk, a, b) < 0 ? - (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) - :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); -} - -#ifdef I_AM_QSORT_R -void -rk_qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp) -#else -#define thunk NULL -void -rk_qsort(void *a, size_t n, size_t es, cmp_t *cmp) -#endif -{ - char *pa, *pb, *pc, *pd, *pl, *pm, *pn; - size_t d, r; - int cmp_result; - int swaptype, swap_cnt; - -loop: SWAPINIT(a, es); - swap_cnt = 0; - if (n < 7) { - for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; - pl > (char *)a && CMP(thunk, pl - es, pl) > 0; - pl -= es) - swap(pl, pl - es); - return; - } - pm = (char *)a + (n / 2) * es; - if (n > 7) { - pl = a; - pn = (char *)a + (n - 1) * es; - if (n > 40) { - d = (n / 8) * es; - pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk); - pm = med3(pm - d, pm, pm + d, cmp, thunk); - pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk); - } - pm = med3(pl, pm, pn, cmp, thunk); - } - swap(a, pm); - pa = pb = (char *)a + es; - - pc = pd = (char *)a + (n - 1) * es; - for (;;) { - while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { - if (cmp_result == 0) { - swap_cnt = 1; - swap(pa, pb); - pa += es; - } - pb += es; - } - while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { - if (cmp_result == 0) { - swap_cnt = 1; - swap(pc, pd); - pd -= es; - } - pc -= es; - } - if (pb > pc) - break; - swap(pb, pc); - swap_cnt = 1; - pb += es; - pc -= es; - } - if (swap_cnt == 0) { /* Switch to insertion sort */ - for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; - pl > (char *)a && CMP(thunk, pl - es, pl) > 0; - pl -= es) - swap(pl, pl - es); - return; - } - - pn = (char *)a + n * es; - r = min(pa - (char *)a, pb - pa); - vecswap(a, pb - r, r); - r = min(pd - pc, pn - pd - es); - vecswap(pb, pn - r, r); - if ((r = pb - pa) > es) -#ifdef I_AM_QSORT_R - rk_qsort_r(a, r / es, es, thunk, cmp); -#else - rk_qsort(a, r / es, es, cmp); -#endif - if ((r = pd - pc) > es) { - /* Iterate rather than recurse to save stack space */ - a = pn - r; - n = r / es; - goto loop; - } -/* rk_qsort(pn - r, r / es, es, cmp);*/ -} - -#endif /* NEED_QSORT */ diff --git a/kerberosV/src/lib/roken/rand.c b/kerberosV/src/lib/roken/rand.c deleted file mode 100644 index 22ff72bddb4..00000000000 --- a/kerberosV/src/lib/roken/rand.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 1997 - 2002 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 -#include "roken.h" - -void ROKEN_LIB_FUNCTION -rk_random_init(void) -{ -#if defined(HAVE_ARC4RANDOM) - /* do nothing */ -#elif defined(HAVE_SRANDOMDEV) - srandomdev(); -#elif defined(HAVE_RANDOM) - srandom(time(NULL)); -#else - srand (time(NULL)); -#endif -} diff --git a/kerberosV/src/lib/roken/rcmd.c b/kerberosV/src/lib/roken/rcmd.c deleted file mode 100644 index 7fa85a35b4a..00000000000 --- a/kerberosV/src/lib/roken/rcmd.c +++ /dev/null @@ -1,49 +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. - */ - -#include - -#include "roken.h" -#include - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rcmd(char **ahost, - unsigned short inport, - const char *locuser, - const char *remuser, - const char *cmd, - int *fd2p) -{ - fprintf(stderr, "Only kerberized services are implemented\n"); - return -1; -} diff --git a/kerberosV/src/lib/roken/readv.c b/kerberosV/src/lib/roken/readv.c deleted file mode 100644 index a1560158991..00000000000 --- a/kerberosV/src/lib/roken/readv.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. - */ - -#include - -#include "roken.h" - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/realloc.c b/kerberosV/src/lib/roken/realloc.c deleted file mode 100644 index 8cbc0d63e06..00000000000 --- a/kerberosV/src/lib/roken/realloc.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2005 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 -#undef realloc - -#include -#include "roken.h" - -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL -rk_realloc(void *ptr, size_t size) -{ - if (ptr == NULL) - return malloc(size); - return realloc(ptr, size); -} diff --git a/kerberosV/src/lib/roken/recvmsg.c b/kerberosV/src/lib/roken/recvmsg.c deleted file mode 100644 index aba298b9081..00000000000 --- a/kerberosV/src/lib/roken/recvmsg.c +++ /dev/null @@ -1,66 +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 - -#include "roken.h" - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/resolve-test.c b/kerberosV/src/lib/roken/resolve-test.c deleted file mode 100644 index 711d6e896e7..00000000000 --- a/kerberosV/src/lib/roken/resolve-test.c +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 1995 - 2004 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 - -#include "roken.h" -#include "getarg.h" -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -#include "resolve.h" - -static int loop_integer = 1; -static int version_flag = 0; -static int help_flag = 0; - -static struct getargs args[] = { - {"loop", 0, arg_integer, &loop_integer, - "loop resolving", NULL }, - {"version", 0, arg_flag, &version_flag, - "print version", NULL }, - {"help", 0, arg_flag, &help_flag, - NULL, NULL } -}; - -static void -usage (int ret) -{ - arg_printusage (args, - sizeof(args)/sizeof(*args), - NULL, - "dns-record resource-record-type"); - exit (ret); -} - -int -main(int argc, char **argv) -{ - struct rk_dns_reply *r; - struct rk_resource_record *rr; - int optidx = 0, i, exit_code = 0; - - setprogname (argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if(version_flag){ - printf("some version\n"); - exit(0); - } - - argc -= optidx; - argv += optidx; - - if (argc != 2) - usage(1); - - for (i = 0; i < loop_integer; i++) { - - r = rk_dns_lookup(argv[0], argv[1]); - if(r == NULL){ - printf("No reply.\n"); - exit_code = 1; - break; - } - if(r->q.type == rk_ns_t_srv) - rk_dns_srv_order(r); - - for(rr = r->head; rr;rr=rr->next){ - printf("%-30s %-5s %-6d ", rr->domain, rk_dns_type_to_string(rr->type), rr->ttl); - switch(rr->type){ - case rk_ns_t_ns: - case rk_ns_t_cname: - case rk_ns_t_ptr: - printf("%s\n", (char*)rr->u.data); - break; - case rk_ns_t_a: - printf("%s\n", inet_ntoa(*rr->u.a)); - break; - case rk_ns_t_mx: - case rk_ns_t_afsdb:{ - printf("%d %s\n", rr->u.mx->preference, rr->u.mx->domain); - break; - } - case rk_ns_t_srv:{ - struct rk_srv_record *srv = rr->u.srv; - printf("%d %d %d %s\n", srv->priority, srv->weight, - srv->port, srv->target); - break; - } - case rk_ns_t_txt: { - printf("%s\n", rr->u.txt); - break; - } - case rk_ns_t_sig : { - struct rk_sig_record *sig = rr->u.sig; - const char *type_string = rk_dns_type_to_string (sig->type); - - printf ("type %u (%s), algorithm %u, labels %u, orig_ttl %u, sig_expiration %u, sig_inception %u, key_tag %u, signer %s\n", - sig->type, type_string ? type_string : "", - sig->algorithm, sig->labels, sig->orig_ttl, - sig->sig_expiration, sig->sig_inception, sig->key_tag, - sig->signer); - break; - } - case rk_ns_t_key : { - struct rk_key_record *key = rr->u.key; - - printf ("flags %u, protocol %u, algorithm %u\n", - key->flags, key->protocol, key->algorithm); - break; - } - case rk_ns_t_sshfp : { - struct rk_sshfp_record *sshfp = rr->u.sshfp; - size_t i; - - printf ("alg %u type %u length %lu data ", sshfp->algorithm, - sshfp->type, (unsigned long)sshfp->sshfp_len); - for (i = 0; i < sshfp->sshfp_len; i++) - printf("%02X", sshfp->sshfp_data[i]); - printf("\n"); - - break; - } - case rk_ns_t_ds : { - struct rk_ds_record *ds = rr->u.ds; - size_t i; - - printf ("key tag %u alg %u type %u length %lu data ", - ds->key_tag, ds->algorithm, ds->digest_type, - (unsigned long)ds->digest_len); - for (i = 0; i < ds->digest_len; i++) - printf("%02X", ds->digest_data[i]); - printf("\n"); - - break; - } - default: - printf("\n"); - break; - } - } - rk_dns_free_data(r); - } - - return exit_code; -} diff --git a/kerberosV/src/lib/roken/resolve.c b/kerberosV/src/lib/roken/resolve.c deleted file mode 100644 index 2eeaaf34401..00000000000 --- a/kerberosV/src/lib/roken/resolve.c +++ /dev/null @@ -1,934 +0,0 @@ -/* - * Copyright (c) 1995 - 2006 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 - -#include "roken.h" -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -#ifdef HAVE_DNS_H -#include -#endif -#include "resolve.h" - -#include - -#ifdef _AIX /* AIX have broken res_nsearch() in 5.1 (5.0 also ?) */ -#undef HAVE_RES_NSEARCH -#endif - -#define DECL(X) {#X, rk_ns_t_##X} - -static struct stot{ - const char *name; - int type; -}stot[] = { - DECL(a), - DECL(aaaa), - DECL(ns), - DECL(cname), - DECL(soa), - DECL(ptr), - DECL(mx), - DECL(txt), - DECL(afsdb), - DECL(sig), - DECL(key), - DECL(srv), - DECL(naptr), - DECL(sshfp), - DECL(ds), - {NULL, 0} -}; - -int _resolve_debug = 0; - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_dns_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; -} - -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL -rk_dns_type_to_string(int type) -{ - struct stot *p = stot; - for(p = stot; p->name; p++) - if(type == p->type) - return p->name; - return NULL; -} - -#if ((defined(HAVE_RES_SEARCH) || defined(HAVE_RES_NSEARCH)) && defined(HAVE_DN_EXPAND)) || defined(HAVE_WINDNS) - -static void -dns_free_rr(struct rk_resource_record *rr) -{ - if(rr->domain) - free(rr->domain); - if(rr->u.data) - free(rr->u.data); - free(rr); -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_dns_free_data(struct rk_dns_reply *r) -{ - struct rk_resource_record *rr; - if(r->q.domain) - free(r->q.domain); - for(rr = r->head; rr;){ - struct rk_resource_record *tmp = rr; - rr = rr->next; - dns_free_rr(tmp); - } - free (r); -} - -#ifndef HAVE_WINDNS - -static int -parse_record(const unsigned char *data, const unsigned char *end_data, - const unsigned char **pp, struct rk_resource_record **ret_rr) -{ - struct rk_resource_record *rr; - int type, class, ttl; - unsigned size; - int status; - char host[MAXDNAME]; - const unsigned char *p = *pp; - - *ret_rr = NULL; - - status = dn_expand(data, end_data, p, host, sizeof(host)); - if(status < 0) - return -1; - if (p + status + 10 > end_data) - return -1; - - 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; - - if (p + size > end_data) - return -1; - - rr = calloc(1, sizeof(*rr)); - if(rr == NULL) - return -1; - rr->domain = strdup(host); - if(rr->domain == NULL) { - dns_free_rr(rr); - return -1; - } - rr->type = type; - rr->class = class; - rr->ttl = ttl; - rr->size = size; - switch(type){ - case rk_ns_t_ns: - case rk_ns_t_cname: - case rk_ns_t_ptr: - status = dn_expand(data, end_data, p, host, sizeof(host)); - if(status < 0) { - dns_free_rr(rr); - return -1; - } - rr->u.txt = strdup(host); - if(rr->u.txt == NULL) { - dns_free_rr(rr); - return -1; - } - break; - case rk_ns_t_mx: - case rk_ns_t_afsdb:{ - size_t hostlen; - - status = dn_expand(data, end_data, p + 2, host, sizeof(host)); - if(status < 0){ - dns_free_rr(rr); - return -1; - } - if ((size_t)status + 2 > size) { - dns_free_rr(rr); - return -1; - } - - hostlen = strlen(host); - rr->u.mx = (struct mx_record*)malloc(sizeof(struct mx_record) + - hostlen); - if(rr->u.mx == NULL) { - dns_free_rr(rr); - return -1; - } - rr->u.mx->preference = (p[0] << 8) | p[1]; - strlcpy(rr->u.mx->domain, host, hostlen + 1); - break; - } - case rk_ns_t_srv:{ - size_t hostlen; - status = dn_expand(data, end_data, p + 6, host, sizeof(host)); - if(status < 0){ - dns_free_rr(rr); - return -1; - } - if ((size_t)status + 6 > size) { - dns_free_rr(rr); - return -1; - } - - hostlen = strlen(host); - rr->u.srv = - (struct srv_record*)malloc(sizeof(struct srv_record) + - hostlen); - if(rr->u.srv == NULL) { - dns_free_rr(rr); - return -1; - } - 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]; - strlcpy(rr->u.srv->target, host, hostlen + 1); - break; - } - case rk_ns_t_txt:{ - if(size == 0 || size < (unsigned)(*p + 1)) { - dns_free_rr(rr); - return -1; - } - rr->u.txt = (char*)malloc(*p + 1); - if(rr->u.txt == NULL) { - dns_free_rr(rr); - return -1; - } - strncpy(rr->u.txt, (const char*)(p + 1), *p); - rr->u.txt[*p] = '\0'; - break; - } - case rk_ns_t_key : { - size_t key_len; - - if (size < 4) { - dns_free_rr(rr); - return -1; - } - - key_len = size - 4; - rr->u.key = malloc (sizeof(*rr->u.key) + key_len - 1); - if (rr->u.key == NULL) { - dns_free_rr(rr); - return -1; - } - - rr->u.key->flags = (p[0] << 8) | p[1]; - rr->u.key->protocol = p[2]; - rr->u.key->algorithm = p[3]; - rr->u.key->key_len = key_len; - memcpy (rr->u.key->key_data, p + 4, key_len); - break; - } - case rk_ns_t_sig : { - size_t sig_len, hostlen; - - if(size <= 18) { - dns_free_rr(rr); - return -1; - } - status = dn_expand (data, end_data, p + 18, host, sizeof(host)); - if (status < 0) { - dns_free_rr(rr); - return -1; - } - if ((size_t)status + 18 > size) { - dns_free_rr(rr); - return -1; - } - - /* the signer name is placed after the sig_data, to make it - easy to free this structure; the size calculation below - includes the zero-termination if the structure itself. - don't you just love C? - */ - sig_len = size - 18 - status; - hostlen = strlen(host); - rr->u.sig = malloc(sizeof(*rr->u.sig) - + hostlen + sig_len); - if (rr->u.sig == NULL) { - dns_free_rr(rr); - return -1; - } - rr->u.sig->type = (p[0] << 8) | p[1]; - rr->u.sig->algorithm = p[2]; - rr->u.sig->labels = p[3]; - rr->u.sig->orig_ttl = (p[4] << 24) | (p[5] << 16) - | (p[6] << 8) | p[7]; - rr->u.sig->sig_expiration = (p[8] << 24) | (p[9] << 16) - | (p[10] << 8) | p[11]; - rr->u.sig->sig_inception = (p[12] << 24) | (p[13] << 16) - | (p[14] << 8) | p[15]; - rr->u.sig->key_tag = (p[16] << 8) | p[17]; - rr->u.sig->sig_len = sig_len; - memcpy (rr->u.sig->sig_data, p + 18 + status, sig_len); - rr->u.sig->signer = &rr->u.sig->sig_data[sig_len]; - strlcpy(rr->u.sig->signer, host, hostlen + 1); - break; - } - - case rk_ns_t_cert : { - size_t cert_len; - - if (size < 5) { - dns_free_rr(rr); - return -1; - } - - cert_len = size - 5; - rr->u.cert = malloc (sizeof(*rr->u.cert) + cert_len - 1); - if (rr->u.cert == NULL) { - dns_free_rr(rr); - return -1; - } - - rr->u.cert->type = (p[0] << 8) | p[1]; - rr->u.cert->tag = (p[2] << 8) | p[3]; - rr->u.cert->algorithm = p[4]; - rr->u.cert->cert_len = cert_len; - memcpy (rr->u.cert->cert_data, p + 5, cert_len); - break; - } - case rk_ns_t_sshfp : { - size_t sshfp_len; - - if (size < 2) { - dns_free_rr(rr); - return -1; - } - - sshfp_len = size - 2; - - rr->u.sshfp = malloc (sizeof(*rr->u.sshfp) + sshfp_len - 1); - if (rr->u.sshfp == NULL) { - dns_free_rr(rr); - return -1; - } - - rr->u.sshfp->algorithm = p[0]; - rr->u.sshfp->type = p[1]; - rr->u.sshfp->sshfp_len = sshfp_len; - memcpy (rr->u.sshfp->sshfp_data, p + 2, sshfp_len); - break; - } - case rk_ns_t_ds: { - size_t digest_len; - - if (size < 4) { - dns_free_rr(rr); - return -1; - } - - digest_len = size - 4; - - rr->u.ds = malloc (sizeof(*rr->u.ds) + digest_len - 1); - if (rr->u.ds == NULL) { - dns_free_rr(rr); - return -1; - } - - rr->u.ds->key_tag = (p[0] << 8) | p[1]; - rr->u.ds->algorithm = p[2]; - rr->u.ds->digest_type = p[3]; - rr->u.ds->digest_len = digest_len; - memcpy (rr->u.ds->digest_data, p + 4, digest_len); - break; - } - default: - rr->u.data = (unsigned char*)malloc(size); - if(size != 0 && rr->u.data == NULL) { - dns_free_rr(rr); - return -1; - } - if (size) - memcpy(rr->u.data, p, size); - } - *pp = p + size; - *ret_rr = rr; - - return 0; -} - -#ifndef TEST_RESOLVE -static -#endif -struct rk_dns_reply* -parse_reply(const unsigned char *data, size_t len) -{ - const unsigned char *p; - int status; - size_t i; - char host[MAXDNAME]; - const unsigned char *end_data = data + len; - struct rk_dns_reply *r; - struct rk_resource_record **rr; - - r = calloc(1, sizeof(*r)); - if (r == NULL) - return NULL; - - p = data; - - r->h.id = (p[0] << 8) | p[1]; - r->h.flags = 0; - if (p[2] & 0x01) - r->h.flags |= rk_DNS_HEADER_RESPONSE_FLAG; - r->h.opcode = (p[2] >> 1) & 0xf; - if (p[2] & 0x20) - r->h.flags |= rk_DNS_HEADER_AUTHORITIVE_ANSWER; - if (p[2] & 0x40) - r->h.flags |= rk_DNS_HEADER_TRUNCATED_MESSAGE; - if (p[2] & 0x80) - r->h.flags |= rk_DNS_HEADER_RECURSION_DESIRED; - if (p[3] & 0x01) - r->h.flags |= rk_DNS_HEADER_RECURSION_AVAILABLE; - if (p[3] & 0x04) - r->h.flags |= rk_DNS_HEADER_AUTHORITIVE_ANSWER; - if (p[3] & 0x08) - r->h.flags |= rk_DNS_HEADER_CHECKING_DISABLED; - r->h.response_code = (p[3] >> 4) & 0xf; - r->h.qdcount = (p[4] << 8) | p[5]; - r->h.ancount = (p[6] << 8) | p[7]; - r->h.nscount = (p[8] << 8) | p[9]; - r->h.arcount = (p[10] << 8) | p[11]; - - p += 12; - - if(r->h.qdcount != 1) { - free(r); - return NULL; - } - status = dn_expand(data, end_data, p, host, sizeof(host)); - if(status < 0){ - rk_dns_free_data(r); - return NULL; - } - r->q.domain = strdup(host); - if(r->q.domain == NULL) { - rk_dns_free_data(r); - return NULL; - } - if (p + status + 4 > end_data) { - rk_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; - for(i = 0; i < r->h.ancount; i++) { - if(parse_record(data, end_data, &p, rr) != 0) { - rk_dns_free_data(r); - return NULL; - } - rr = &(*rr)->next; - } - for(i = 0; i < r->h.nscount; i++) { - if(parse_record(data, end_data, &p, rr) != 0) { - rk_dns_free_data(r); - return NULL; - } - rr = &(*rr)->next; - } - for(i = 0; i < r->h.arcount; i++) { - if(parse_record(data, end_data, &p, rr) != 0) { - rk_dns_free_data(r); - return NULL; - } - rr = &(*rr)->next; - } - *rr = NULL; - return r; -} - -#ifdef HAVE_RES_NSEARCH -#ifdef HAVE_RES_NDESTROY -#define rk_res_free(x) res_ndestroy(x) -#else -#define rk_res_free(x) res_nclose(x) -#endif -#endif - -#if defined(HAVE_DNS_SEARCH) -#define resolve_search(h,n,c,t,r,l) \ - ((int)dns_search(h,n,c,t,r,l,(struct sockaddr *)&from,&fromsize)) -#define resolve_free_handle(h) dns_free(h) -#elif defined(HAVE_RES_NSEARCH) -#define resolve_search(h,n,c,t,r,l) res_nsearch(h,n,c,t,r,l) -#define resolve_free_handle(h) rk_res_free(h); -#else -#define resolve_search(h,n,c,t,r,l) res_search(n,c,t,r,l) -#define handle 0 -#define resolve_free_handle(h) -#endif - - -static struct rk_dns_reply * -dns_lookup_int(const char *domain, int rr_class, int rr_type) -{ - struct rk_dns_reply *r; - void *reply = NULL; - int size, len; -#if defined(HAVE_DNS_SEARCH) - struct sockaddr_storage from; - uint32_t fromsize = sizeof(from); - dns_handle_t handle; - - handle = dns_open(NULL); - if (handle == NULL) - return NULL; -#elif defined(HAVE_RES_NSEARCH) - struct __res_state state; - struct __res_state *handle = &state; - - memset(&state, 0, sizeof(state)); - if(res_ninit(handle)) - return NULL; /* is this the best we can do? */ -#endif - - len = 1500; - while(1) { - if (reply) { - free(reply); - reply = NULL; - } - if (_resolve_debug) { -#if defined(HAVE_DNS_SEARCH) - dns_set_debug(handle, 1); -#elif defined(HAVE_RES_NSEARCH) - state.options |= RES_DEBUG; -#endif - fprintf(stderr, "dns_lookup(%s, %d, %s), buffer size %d\n", domain, - rr_class, rk_dns_type_to_string(rr_type), len); - } - reply = malloc(len); - if (reply == NULL) { - resolve_free_handle(handle); - return NULL; - } - - size = resolve_search(handle, domain, rr_class, rr_type, reply, len); - - if (_resolve_debug) { - fprintf(stderr, "dns_lookup(%s, %d, %s) --> %d\n", - domain, rr_class, rk_dns_type_to_string(rr_type), size); - } - if (size > len) { - /* resolver thinks it know better, go for it */ - len = size; - } else if (size > 0) { - /* got a good reply */ - break; - } else if (size <= 0 && len < rk_DNS_MAX_PACKET_SIZE) { - len *= 2; - if (len > rk_DNS_MAX_PACKET_SIZE) - len = rk_DNS_MAX_PACKET_SIZE; - } else { - /* the end, leave */ - resolve_free_handle(handle); - free(reply); - return NULL; - } - } - - len = min(len, size); - r = parse_reply(reply, len); - free(reply); - - resolve_free_handle(handle); - - return r; -} - -ROKEN_LIB_FUNCTION struct rk_dns_reply * ROKEN_LIB_CALL -rk_dns_lookup(const char *domain, const char *type_name) -{ - int type; - - type = rk_dns_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, rk_ns_c_in, type); -} - -#endif /* !HAVE_WINDNS */ - -static int -compare_srv(const void *a, const void *b) -{ - const struct rk_resource_record *const* aa = a, *const* bb = b; - - if((*aa)->u.srv->priority == (*bb)->u.srv->priority) - return ((*aa)->u.srv->weight - (*bb)->u.srv->weight); - return ((*aa)->u.srv->priority - (*bb)->u.srv->priority); -} - -/* try to rearrange the srv-records by the algorithm in RFC2782 */ -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_dns_srv_order(struct rk_dns_reply *r) -{ - struct rk_resource_record **srvs, **ss, **headp; - struct rk_resource_record *rr; - int num_srv = 0; - - rk_random_init(); - - for(rr = r->head; rr; rr = rr->next) - if(rr->type == rk_ns_t_srv) - num_srv++; - - if(num_srv == 0) - return; - - srvs = malloc(num_srv * sizeof(*srvs)); - if(srvs == NULL) - return; /* XXX not much to do here */ - - /* unlink all srv-records from the linked list and put them in - a vector */ - for(ss = srvs, headp = &r->head; *headp; ) - if((*headp)->type == rk_ns_t_srv) { - *ss = *headp; - *headp = (*headp)->next; - (*ss)->next = NULL; - ss++; - } else - headp = &(*headp)->next; - - /* sort them by priority and weight */ - qsort(srvs, num_srv, sizeof(*srvs), compare_srv); - - headp = &r->head; - - for(ss = srvs; ss < srvs + num_srv; ) { - int sum, rnd, count; - struct rk_resource_record **ee, **tt; - /* find the last record with the same priority and count the - sum of all weights */ - for(sum = 0, tt = ss; tt < srvs + num_srv; tt++) { - assert(*tt != NULL); - if((*tt)->u.srv->priority != (*ss)->u.srv->priority) - break; - sum += (*tt)->u.srv->weight; - } - ee = tt; - /* ss is now the first record of this priority and ee is the - first of the next */ - while(ss < ee) { - rnd = rk_random() % (sum + 1); - for(count = 0, tt = ss; ; tt++) { - if(*tt == NULL) - continue; - count += (*tt)->u.srv->weight; - if(count >= rnd) - break; - } - - assert(tt < ee); - - /* insert the selected record at the tail (of the head) of - the list */ - (*tt)->next = *headp; - *headp = *tt; - headp = &(*tt)->next; - sum -= (*tt)->u.srv->weight; - *tt = NULL; - while(ss < ee && *ss == NULL) - ss++; - } - } - - free(srvs); - return; -} - -#ifdef HAVE_WINDNS - -#include - -static struct rk_resource_record * -parse_dns_record(PDNS_RECORD pRec) -{ - struct rk_resource_record * rr; - - if (pRec == NULL) - return NULL; - - rr = calloc(1, sizeof(*rr)); - - rr->domain = strdup(pRec->pName); - rr->type = pRec->wType; - rr->class = 0; - rr->ttl = pRec->dwTtl; - rr->size = 0; - - switch (rr->type) { - case rk_ns_t_ns: - case rk_ns_t_cname: - case rk_ns_t_ptr: - rr->u.txt = strdup(pRec->Data.NS.pNameHost); - if(rr->u.txt == NULL) { - dns_free_rr(rr); - return NULL; - } - break; - - case rk_ns_t_mx: - case rk_ns_t_afsdb:{ - size_t hostlen = strnlen(pRec->Data.MX.pNameExchange, DNS_MAX_NAME_LENGTH); - - rr->u.mx = (struct mx_record *)malloc(sizeof(struct mx_record) + - hostlen); - if (rr->u.mx == NULL) { - dns_free_rr(rr); - return NULL; - } - - strcpy_s(rr->u.mx->domain, hostlen + 1, pRec->Data.MX.pNameExchange); - rr->u.mx->preference = pRec->Data.MX.wPreference; - break; - } - - case rk_ns_t_srv:{ - size_t hostlen = strnlen(pRec->Data.SRV.pNameTarget, DNS_MAX_NAME_LENGTH); - - rr->u.srv = - (struct srv_record*)malloc(sizeof(struct srv_record) + - hostlen); - if(rr->u.srv == NULL) { - dns_free_rr(rr); - return NULL; - } - - rr->u.srv->priority = pRec->Data.SRV.wPriority; - rr->u.srv->weight = pRec->Data.SRV.wWeight; - rr->u.srv->port = pRec->Data.SRV.wPort; - strcpy_s(rr->u.srv->target, hostlen + 1, pRec->Data.SRV.pNameTarget); - - break; - } - - case rk_ns_t_txt:{ - size_t len; - - if (pRec->Data.TXT.dwStringCount == 0) { - rr->u.txt = strdup(""); - break; - } - - len = strnlen(pRec->Data.TXT.pStringArray[0], DNS_MAX_TEXT_STRING_LENGTH); - - rr->u.txt = (char *)malloc(len + 1); - strcpy_s(rr->u.txt, len + 1, pRec->Data.TXT.pStringArray[0]); - - break; - } - - case rk_ns_t_key : { - size_t key_len; - - if (pRec->wDataLength < 4) { - dns_free_rr(rr); - return NULL; - } - - key_len = pRec->wDataLength - 4; - rr->u.key = malloc (sizeof(*rr->u.key) + key_len - 1); - if (rr->u.key == NULL) { - dns_free_rr(rr); - return NULL; - } - - rr->u.key->flags = pRec->Data.KEY.wFlags; - rr->u.key->protocol = pRec->Data.KEY.chProtocol; - rr->u.key->algorithm = pRec->Data.KEY.chAlgorithm; - rr->u.key->key_len = key_len; - memcpy_s (rr->u.key->key_data, key_len, - pRec->Data.KEY.Key, key_len); - break; - } - - case rk_ns_t_sig : { - size_t sig_len, hostlen; - - if(pRec->wDataLength <= 18) { - dns_free_rr(rr); - return NULL; - } - - sig_len = pRec->wDataLength; - - hostlen = strnlen(pRec->Data.SIG.pNameSigner, DNS_MAX_NAME_LENGTH); - - rr->u.sig = malloc(sizeof(*rr->u.sig) - + hostlen + sig_len); - if (rr->u.sig == NULL) { - dns_free_rr(rr); - return NULL; - } - rr->u.sig->type = pRec->Data.SIG.wTypeCovered; - rr->u.sig->algorithm = pRec->Data.SIG.chAlgorithm; - rr->u.sig->labels = pRec->Data.SIG.chLabelCount; - rr->u.sig->orig_ttl = pRec->Data.SIG.dwOriginalTtl; - rr->u.sig->sig_expiration = pRec->Data.SIG.dwExpiration; - rr->u.sig->sig_inception = pRec->Data.SIG.dwTimeSigned; - rr->u.sig->key_tag = pRec->Data.SIG.wKeyTag; - rr->u.sig->sig_len = sig_len; - memcpy_s (rr->u.sig->sig_data, sig_len, - pRec->Data.SIG.Signature, sig_len); - rr->u.sig->signer = &rr->u.sig->sig_data[sig_len]; - strcpy_s(rr->u.sig->signer, hostlen + 1, pRec->Data.SIG.pNameSigner); - break; - } - -#ifdef DNS_TYPE_DS - case rk_ns_t_ds: { - rr->u.ds = malloc (sizeof(*rr->u.ds) + pRec->Data.DS.wDigestLength - 1); - if (rr->u.ds == NULL) { - dns_free_rr(rr); - return NULL; - } - - rr->u.ds->key_tag = pRec->Data.DS.wKeyTag; - rr->u.ds->algorithm = pRec->Data.DS.chAlgorithm; - rr->u.ds->digest_type = pRec->Data.DS.chDigestType; - rr->u.ds->digest_len = pRec->Data.DS.wDigestLength; - memcpy_s (rr->u.ds->digest_data, pRec->Data.DS.wDigestLength, - pRec->Data.DS.Digest, pRec->Data.DS.wDigestLength); - break; - } -#endif - - default: - dns_free_rr(rr); - return NULL; - } - - rr->next = parse_dns_record(pRec->pNext); - return rr; -} - -ROKEN_LIB_FUNCTION struct rk_dns_reply * ROKEN_LIB_CALL -rk_dns_lookup(const char *domain, const char *type_name) -{ - DNS_STATUS status; - int type; - PDNS_RECORD pRec = NULL; - struct rk_dns_reply * r = NULL; - - __try { - - type = rk_dns_string_to_type(type_name); - if(type == -1) { - if(_resolve_debug) - fprintf(stderr, "dns_lookup: unknown resource type: `%s'\n", - type_name); - return NULL; - } - - status = DnsQuery_UTF8(domain, type, DNS_QUERY_STANDARD, NULL, - &pRec, NULL); - if (status != ERROR_SUCCESS) - return NULL; - - r = calloc(1, sizeof(*r)); - r->q.domain = strdup(domain); - r->q.type = type; - r->q.class = 0; - - r->head = parse_dns_record(pRec); - - if (r->head == NULL) { - rk_dns_free_data(r); - return NULL; - } else { - return r; - } - - } __finally { - - if (pRec) - DnsRecordListFree(pRec, DnsFreeRecordList); - - } -} -#endif /* HAVE_WINDNS */ - -#else /* NOT defined(HAVE_RES_SEARCH) && defined(HAVE_DN_EXPAND) */ - -ROKEN_LIB_FUNCTION struct rk_dns_reply * ROKEN_LIB_CALL -rk_dns_lookup(const char *domain, const char *type_name) -{ - return NULL; -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_dns_free_data(struct rk_dns_reply *r) -{ -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_dns_srv_order(struct rk_dns_reply *r) -{ -} - -#endif diff --git a/kerberosV/src/lib/roken/resolve.h b/kerberosV/src/lib/roken/resolve.h deleted file mode 100644 index 8192fee39a8..00000000000 --- a/kerberosV/src/lib/roken/resolve.h +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright (c) 1995 - 2002 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.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __RESOLVE_H__ -#define __RESOLVE_H__ - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -enum { - rk_ns_c_in = 1 -}; - -enum { - rk_ns_t_invalid = 0, /* Cookie. */ - rk_ns_t_a = 1, /* Host address. */ - rk_ns_t_ns = 2, /* Authoritative server. */ - rk_ns_t_md = 3, /* Mail destination. */ - rk_ns_t_mf = 4, /* Mail forwarder. */ - rk_ns_t_cname = 5, /* Canonical name. */ - rk_ns_t_soa = 6, /* Start of authority zone. */ - rk_ns_t_mb = 7, /* Mailbox domain name. */ - rk_ns_t_mg = 8, /* Mail group member. */ - rk_ns_t_mr = 9, /* Mail rename name. */ - rk_ns_t_null = 10, /* Null resource record. */ - rk_ns_t_wks = 11, /* Well known service. */ - rk_ns_t_ptr = 12, /* Domain name pointer. */ - rk_ns_t_hinfo = 13, /* Host information. */ - rk_ns_t_minfo = 14, /* Mailbox information. */ - rk_ns_t_mx = 15, /* Mail routing information. */ - rk_ns_t_txt = 16, /* Text strings. */ - rk_ns_t_rp = 17, /* Responsible person. */ - rk_ns_t_afsdb = 18, /* AFS cell database. */ - rk_ns_t_x25 = 19, /* X_25 calling address. */ - rk_ns_t_isdn = 20, /* ISDN calling address. */ - rk_ns_t_rt = 21, /* Router. */ - rk_ns_t_nsap = 22, /* NSAP address. */ - rk_ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */ - rk_ns_t_sig = 24, /* Security signature. */ - rk_ns_t_key = 25, /* Security key. */ - rk_ns_t_px = 26, /* X.400 mail mapping. */ - rk_ns_t_gpos = 27, /* Geographical position (withdrawn). */ - rk_ns_t_aaaa = 28, /* Ip6 Address. */ - rk_ns_t_loc = 29, /* Location Information. */ - rk_ns_t_nxt = 30, /* Next domain (security). */ - rk_ns_t_eid = 31, /* Endpoint identifier. */ - rk_ns_t_nimloc = 32, /* Nimrod Locator. */ - rk_ns_t_srv = 33, /* Server Selection. */ - rk_ns_t_atma = 34, /* ATM Address */ - rk_ns_t_naptr = 35, /* Naming Authority PoinTeR */ - rk_ns_t_kx = 36, /* Key Exchange */ - rk_ns_t_cert = 37, /* Certification record */ - rk_ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */ - rk_ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */ - rk_ns_t_sink = 40, /* Kitchen sink (experimentatl) */ - rk_ns_t_opt = 41, /* EDNS0 option (meta-RR) */ - rk_ns_t_apl = 42, /* Address prefix list (RFC 3123) */ - rk_ns_t_ds = 43, /* Delegation Signer (RFC 3658) */ - rk_ns_t_sshfp = 44, /* SSH fingerprint */ - rk_ns_t_tkey = 249, /* Transaction key */ - rk_ns_t_tsig = 250, /* Transaction signature. */ - rk_ns_t_ixfr = 251, /* Incremental zone transfer. */ - rk_ns_t_axfr = 252, /* Transfer zone of authority. */ - rk_ns_t_mailb = 253, /* Transfer mailbox records. */ - rk_ns_t_maila = 254, /* Transfer mail agent records. */ - rk_ns_t_any = 255, /* Wildcard match. */ - rk_ns_t_zxfr = 256, /* BIND-specific, nonstandard. */ - rk_ns_t_max = 65536 -}; - -#ifndef MAXDNAME -#define MAXDNAME 1025 -#endif - -#define mx_record rk_mx_record -#define srv_record rk_srv_record -#define key_record rk_key_record -#define sig_record rk_sig_record -#define cert_record rk_cert_record -#define sshfp_record rk_sshfp_record - -struct rk_dns_query{ - char *domain; - unsigned type; - unsigned class; -}; - -struct rk_mx_record{ - unsigned preference; - char domain[1]; -}; - -struct rk_srv_record{ - unsigned priority; - unsigned weight; - unsigned port; - char target[1]; -}; - -struct rk_key_record { - unsigned flags; - unsigned protocol; - unsigned algorithm; - size_t key_len; - u_char key_data[1]; -}; - -struct rk_sig_record { - unsigned type; - unsigned algorithm; - unsigned labels; - unsigned orig_ttl; - unsigned sig_expiration; - unsigned sig_inception; - unsigned key_tag; - char *signer; - size_t sig_len; - char sig_data[1]; /* also includes signer */ -}; - -struct rk_cert_record { - unsigned type; - unsigned tag; - unsigned algorithm; - size_t cert_len; - u_char cert_data[1]; -}; - -struct rk_sshfp_record { - unsigned algorithm; - unsigned type; - size_t sshfp_len; - u_char sshfp_data[1]; -}; - -struct rk_ds_record { - unsigned key_tag; - unsigned algorithm; - unsigned digest_type; - size_t digest_len; - u_char digest_data[1]; -}; - -struct rk_resource_record{ - char *domain; - unsigned type; - unsigned class; - unsigned ttl; - unsigned size; - union { - void *data; - struct rk_mx_record *mx; - struct rk_mx_record *afsdb; /* mx and afsdb are identical */ - struct rk_srv_record *srv; - struct in_addr *a; - char *txt; - struct rk_key_record *key; - struct rk_cert_record *cert; - struct rk_sig_record *sig; - struct rk_sshfp_record *sshfp; - struct rk_ds_record *ds; - }u; - struct rk_resource_record *next; -}; - -#define rk_DNS_MAX_PACKET_SIZE 0xffff - -struct rk_dns_header { - unsigned id; - unsigned flags; -#define rk_DNS_HEADER_RESPONSE_FLAG 1 -#define rk_DNS_HEADER_AUTHORITIVE_ANSWER 2 -#define rk_DNS_HEADER_TRUNCATED_MESSAGE 4 -#define rk_DNS_HEADER_RECURSION_DESIRED 8 -#define rk_DNS_HEADER_RECURSION_AVAILABLE 16 -#define rk_DNS_HEADER_AUTHENTIC_DATA 32 -#define rk_DNS_HEADER_CHECKING_DISABLED 64 - unsigned opcode; - unsigned response_code; - unsigned qdcount; - unsigned ancount; - unsigned nscount; - unsigned arcount; -}; - -struct rk_dns_reply{ - struct rk_dns_header h; - struct rk_dns_query q; - struct rk_resource_record *head; -}; - - -#ifdef __cplusplus -extern "C" { -#endif - -ROKEN_LIB_FUNCTION struct rk_dns_reply* ROKEN_LIB_CALL - rk_dns_lookup(const char *, const char *); -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL - rk_dns_free_data(struct rk_dns_reply *); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_dns_string_to_type(const char *name); -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL - rk_dns_type_to_string(int type); -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL - rk_dns_srv_order(struct rk_dns_reply*); - -#ifdef __cplusplus -} -#endif - -#endif /* __RESOLVE_H__ */ diff --git a/kerberosV/src/lib/roken/rkpty.c b/kerberosV/src/lib/roken/rkpty.c deleted file mode 100644 index f2c62f23f39..00000000000 --- a/kerberosV/src/lib/roken/rkpty.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (c) 2008 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 "config.h" - -#ifndef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_PTY_H -#include -#endif -#ifdef HAVE_UTIL_H -#include -#endif -#ifdef HAVE_LIBUTIL_H -#include -#endif - -#ifdef STREAMSPTY -#include -#endif /* STREAMPTY */ - -#include "roken.h" -#include - -struct command { - enum { CMD_EXPECT = 0, CMD_SEND, CMD_PASSWORD } type; - unsigned int lineno; - char *str; - struct command *next; -}; - -/* - * - */ - -static struct command *commands, **next = &commands; - -static sig_atomic_t alarmset = 0; - -static int timeout = 10; -static int verbose; -static int help_flag; -static int version_flag; - -static int master; -static int slave; -static char line[256] = { 0 }; - -static void -caught_signal(int signo) -{ - alarmset = signo; -} - - -static void -open_pty(void) -{ -#ifdef _AIX - printf("implement open_pty\n"); - exit(77); -#endif -#if defined(HAVE_OPENPTY) || defined(__linux) || defined(__osf__) /* XXX */ - if(openpty(&master, &slave, line, 0, 0) == 0) - return; -#endif /* HAVE_OPENPTY .... */ -#ifdef STREAMSPTY - { - char *clone[] = { - "/dev/ptc", - "/dev/ptmx", - "/dev/ptm", - "/dev/ptym/clone", - NULL - }; - char **q; - - for(q = clone; *q; q++){ - master = open(*q, O_RDWR); - if(master >= 0){ -#ifdef HAVE_GRANTPT - grantpt(master); -#endif -#ifdef HAVE_UNLOCKPT - unlockpt(master); -#endif - strlcpy(line, ptsname(master), sizeof(line)); - slave = open(line, O_RDWR); - if (slave < 0) - errx(1, "failed to open slave when using %s", *q); - ioctl(slave, I_PUSH, "ptem"); - ioctl(slave, I_PUSH, "ldterm"); - - return; - } - } - } -#endif /* STREAMSPTY */ - - /* more cases, like open /dev/ptmx, etc */ - - exit(77); -} - -/* - * - */ - -static char * -iscmd(const char *buf, const char *s) -{ - size_t len = strlen(s); - if (strncmp(buf, s, len) != 0) - return NULL; - return estrdup(buf + len); -} - -static void -parse_configuration(const char *fn) -{ - struct command *c; - char s[1024]; - char *str; - unsigned int lineno = 0; - FILE *cmd; - - cmd = fopen(fn, "r"); - if (cmd == NULL) - err(1, "open: %s", fn); - - while (fgets(s, sizeof(s), cmd) != NULL) { - - s[strcspn(s, "#\n")] = '\0'; - lineno++; - - c = calloc(1, sizeof(*c)); - if (c == NULL) - errx(1, "malloc"); - - c->lineno = lineno; - (*next) = c; - next = &(c->next); - - if ((str = iscmd(s, "expect ")) != NULL) { - c->type = CMD_EXPECT; - c->str = str; - } else if ((str = iscmd(s, "send ")) != NULL) { - c->type = CMD_SEND; - c->str = str; - } else if ((str = iscmd(s, "password ")) != NULL) { - c->type = CMD_PASSWORD; - c->str = str; - } else - errx(1, "Invalid command on line %d: %s", lineno, s); - } - - fclose(cmd); -} - - -/* - * - */ - -static int -eval_parent(pid_t pid) -{ - struct command *c; - char in; - size_t len = 0; - ssize_t sret; - - for (c = commands; c != NULL; c = c->next) { - switch(c->type) { - case CMD_EXPECT: - if (verbose) - printf("[expecting %s]", c->str); - len = 0; - alarm(timeout); - while((sret = read(master, &in, sizeof(in))) > 0) { - alarm(timeout); - printf("%c", in); - if (c->str[len] != in) { - len = 0; - continue; - } - len++; - if (c->str[len] == '\0') - break; - } - alarm(0); - if (alarmset == SIGALRM) - errx(1, "timeout waiting for %s (line %u)", - c->str, c->lineno); - else if (alarmset) - errx(1, "got a signal %d waiting for %s (line %u)", - alarmset, c->str, c->lineno); - if (sret <= 0) - errx(1, "end command while waiting for %s (line %u)", - c->str, c->lineno); - break; - case CMD_SEND: - case CMD_PASSWORD: { - size_t i = 0; - const char *msg = (c->type == CMD_PASSWORD) ? "****" : c->str; - - if (verbose) - printf("[send %s]", msg); - - len = strlen(c->str); - - while (i < len) { - if (c->str[i] == '\\' && i < len - 1) { - char ctrl; - i++; - switch(c->str[i]) { - case 'n': ctrl = '\n'; break; - case 'r': ctrl = '\r'; break; - case 't': ctrl = '\t'; break; - default: - errx(1, "unknown control char %c (line %u)", - c->str[i], c->lineno); - } - if (net_write(master, &ctrl, 1) != 1) - errx(1, "command refused input (line %u)", c->lineno); - } else { - if (net_write(master, &c->str[i], 1) != 1) - errx(1, "command refused input (line %u)", c->lineno); - } - i++; - } - break; - } - default: - abort(); - } - } - while(read(master, &in, sizeof(in)) > 0) - printf("%c", in); - - if (verbose) - printf("[end of program]\n"); - - /* - * Fetch status from child - */ - { - int ret, status; - - ret = waitpid(pid, &status, 0); - if (ret == -1) - err(1, "waitpid"); - if (WIFEXITED(status) && WEXITSTATUS(status)) - return WEXITSTATUS(status); - else if (WIFSIGNALED(status)) { - printf("killed by signal: %d\n", WTERMSIG(status)); - return 1; - } - } - return 0; -} - -/* - * - */ - -static struct getargs args[] = { - { "timeout", 't', arg_integer, &timeout, "timout", "seconds" }, - { "verbose", 'v', arg_counter, &verbose, "verbose debugging" }, - { "version", 0, arg_flag, &version_flag, "print version" }, - { "help", 0, arg_flag, &help_flag, NULL } -}; - -static void -usage(int ret) -{ - arg_printusage (args, sizeof(args)/sizeof(*args), NULL, "infile command.."); - exit (ret); -} - -int -main(int argc, char **argv) -{ - int optidx = 0; - pid_t pid; - - setprogname(argv[0]); - - if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) - usage(1); - - if (help_flag) - usage (0); - - if (version_flag) { - fprintf (stderr, "%s from %s-%s\n", getprogname(), PACKAGE, VERSION); - return 0; - } - - argv += optidx; - argc -= optidx; - - if (argc < 2) - usage(1); - - parse_configuration(argv[0]); - - argv += 1; - - open_pty(); - - pid = fork(); - switch (pid) { - case -1: - err(1, "Failed to fork"); - case 0: - - if(setsid()<0) - err(1, "setsid"); - - dup2(slave, STDIN_FILENO); - dup2(slave, STDOUT_FILENO); - dup2(slave, STDERR_FILENO); - closefrom(STDERR_FILENO + 1); - - execvp(argv[0], argv); /* add NULL to end of array ? */ - err(1, "Failed to exec: %s", argv[0]); - default: - close(slave); - { - struct sigaction sa; - - sa.sa_handler = caught_signal; - sa.sa_flags = 0; - sigemptyset (&sa.sa_mask); - - sigaction(SIGALRM, &sa, NULL); - } - - return eval_parent(pid); - } -} diff --git a/kerberosV/src/lib/roken/roken-common.h b/kerberosV/src/lib/roken/roken-common.h deleted file mode 100644 index 5d76a0e3c0b..00000000000 --- a/kerberosV/src/lib/roken/roken-common.h +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Copyright (c) 1995 - 2005 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.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __ROKEN_COMMON_H__ -#define __ROKEN_COMMON_H__ - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -#ifdef __cplusplus -#define ROKEN_CPP_START extern "C" { -#define ROKEN_CPP_END } -#else -#define ROKEN_CPP_START -#define ROKEN_CPP_END -#endif - -#ifndef INADDR_NONE -#define INADDR_NONE 0xffffffff -#endif - -#ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK 0x7f000001 -#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 _WIN32 - -#ifndef _PATH_DEV -#define _PATH_DEV "/dev/" -#endif - -#ifndef _PATH_DEVNULL -#define _PATH_DEVNULL "/dev/null" -#endif - -#ifndef _PATH_HEQUIV -#define _PATH_HEQUIV "/etc/hosts.equiv" -#endif - -#ifndef _PATH_VARRUN -#define _PATH_VARRUN "/var/run/" -#endif - -#ifndef _PATH_BSHELL -#define _PATH_BSHELL "/bin/sh" -#endif - -#ifndef MAXPATHLEN -#define MAXPATHLEN (1024+4) -#endif - -#endif /* !_WIN32 */ - -#ifndef PATH_MAX -#define PATH_MAX MAX_PATH -#endif - -#ifndef RETSIGTYPE -#define RETSIGTYPE void -#endif - -#ifndef SIG_ERR -#define SIG_ERR ((RETSIGTYPE (*)(int))-1) -#endif - -/* - * error code for getipnodeby{name,addr} - */ - -#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 - -/* - * error code for getaddrinfo - */ - -#ifndef EAI_NOERROR -#define EAI_NOERROR 0 /* no error */ -#endif - -#ifndef EAI_NONAME - -#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 */ - -#endif /* EAI_NONAME */ - -/* flags for getaddrinfo() */ - -#ifndef AI_PASSIVE -#define AI_PASSIVE 0x01 -#define AI_CANONNAME 0x02 -#endif /* AI_PASSIVE */ - -#ifndef AI_NUMERICHOST -#define AI_NUMERICHOST 0x04 -#endif - -#ifndef AI_NUMERICSERV -#define AI_NUMERICSERV 0x08 -#endif - -/* flags for getnameinfo() */ - -#ifndef NI_DGRAM -#define NI_DGRAM 0x01 -#define NI_NAMEREQD 0x02 -#define NI_NOFQDN 0x04 -#define NI_NUMERICHOST 0x08 -#define NI_NUMERICSERV 0x10 -#endif - -/* - * constants for getnameinfo - */ - -#ifndef NI_MAXHOST -#define NI_MAXHOST 1025 -#define NI_MAXSERV 32 -#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 - -ROKEN_CPP_START - -#ifndef IRIX4 /* fix for compiler bug */ -#ifndef _WIN32 -#ifdef RETSIGTYPE -typedef RETSIGTYPE (*SigAction)(int); -SigAction signal(int iSig, SigAction pAction); /* BSD compatible */ -#endif -#endif -#endif - -#define SE_E_UNSPECIFIED (-1) -#define SE_E_FORKFAILED (-2) -#define SE_E_WAITPIDFAILED (-3) -#define SE_E_EXECTIMEOUT (-4) -#define SE_E_NOEXEC 126 -#define SE_E_NOTFOUND 127 - -#define SE_PROCSTATUS(st) (((st) >= 0 && (st) < 126)? st: -1) -#define SE_PROCSIGNAL(st) (((st) >= 128)? (st) - 128: -1) -#define SE_IS_ERROR(st) ((st) < 0 || (st) >= 126) - - -#define simple_execve rk_simple_execve -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execve(const char*, char*const[], char*const[]); - -#define simple_execve_timed rk_simple_execve_timed -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execve_timed(const char *, char *const[], - char *const [], time_t (*)(void *), - void *, time_t); - -#define simple_execvp rk_simple_execvp -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execvp(const char*, char *const[]); - -#define simple_execvp_timed rk_simple_execvp_timed -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execvp_timed(const char *, char *const[], - time_t (*)(void *), void *, time_t); - -#define simple_execlp rk_simple_execlp -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execlp(const char*, ...); - -#define simple_execle rk_simple_execle -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execle(const char*, ...); - -#define wait_for_process rk_wait_for_process -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -wait_for_process(pid_t); - -#define wait_for_process_timed rk_wait_for_process_timed -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -wait_for_process_timed(pid_t, time_t (*)(void *), - void *, time_t); - -#define pipe_execv rk_pipe_execv -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -pipe_execv(FILE**, FILE**, FILE**, const char*, ...); - -#define print_version rk_print_version -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -print_version(const char *); - -#define eread rk_eread -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -eread (int fd, void *buf, size_t nbytes); - -#define ewrite rk_ewrite -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -ewrite (int fd, const void *buf, size_t nbytes); - -struct hostent; - -#define hostent_find_fqdn rk_hostent_find_fqdn -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL -hostent_find_fqdn (const struct hostent *); - -#define esetenv rk_esetenv -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -esetenv(const char *, const char *, int); - -#define socket_set_address_and_port rk_socket_set_address_and_port -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_address_and_port (struct sockaddr *, const void *, int); - -#define socket_addr_size rk_socket_addr_size -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -socket_addr_size (const struct sockaddr *); - -#define socket_set_any rk_socket_set_any -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_any (struct sockaddr *, int); - -#define socket_sockaddr_size rk_socket_sockaddr_size -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -socket_sockaddr_size (const struct sockaddr *); - -#define socket_get_address rk_socket_get_address -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL -socket_get_address (const struct sockaddr *); - -#define socket_get_port rk_socket_get_port -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -socket_get_port (const struct sockaddr *); - -#define socket_set_port rk_socket_set_port -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_port (struct sockaddr *, int); - -#define socket_set_portrange rk_socket_set_portrange -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_portrange (rk_socket_t, int, int); - -#define socket_set_debug rk_socket_set_debug -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_debug (rk_socket_t); - -#define socket_set_tos rk_socket_set_tos -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_tos (rk_socket_t, int); - -#define socket_set_reuseaddr rk_socket_set_reuseaddr -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_reuseaddr (rk_socket_t, int); - -#define socket_set_ipv6only rk_socket_set_ipv6only -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_ipv6only (rk_socket_t, int); - -#define socket_to_fd rk_socket_to_fd -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -socket_to_fd(rk_socket_t, int); - -#define vstrcollect rk_vstrcollect -ROKEN_LIB_FUNCTION char ** ROKEN_LIB_CALL -vstrcollect(va_list *ap); - -#define strcollect rk_strcollect -ROKEN_LIB_FUNCTION char ** ROKEN_LIB_CALL -strcollect(char *first, ...); - -#define timevalfix rk_timevalfix -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -timevalfix(struct timeval *t1); - -#define timevaladd rk_timevaladd -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -timevaladd(struct timeval *t1, const struct timeval *t2); - -#define timevalsub rk_timevalsub -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -timevalsub(struct timeval *t1, const struct timeval *t2); - -#define pid_file_write rk_pid_file_write -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -pid_file_write (const char *progname); - -#define pid_file_delete rk_pid_file_delete -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -pid_file_delete (char **); - -#define read_environment rk_read_environment -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -read_environment(const char *file, char ***env); - -#define free_environment rk_free_environment -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -free_environment(char **); - -#define warnerr rk_warnerr -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_warnerr(int doerrno, const char *fmt, va_list ap) - __attribute__ ((format (printf, 2, 0))); - -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL -rk_realloc(void *, size_t); - -struct rk_strpool; - -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -rk_strpoolcollect(struct rk_strpool *); - -ROKEN_LIB_FUNCTION struct rk_strpool * ROKEN_LIB_CALL -rk_strpoolprintf(struct rk_strpool *, const char *, ...) - __attribute__ ((format (printf, 2, 3))); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_strpoolfree(struct rk_strpool *); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_dumpdata (const char *, const void *, size_t); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_undumpdata (const char *, void **, size_t *); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_xfree (void *); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_cloexec(int); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_cloexec_file(FILE *); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_cloexec_dir(DIR *); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -ct_memcmp(const void *, const void *, size_t); - -void ROKEN_LIB_FUNCTION -rk_random_init(void); - -ROKEN_CPP_END - -#endif /* __ROKEN_COMMON_H__ */ diff --git a/kerberosV/src/lib/roken/roken.awk b/kerberosV/src/lib/roken/roken.awk deleted file mode 100644 index 750ecd7d84f..00000000000 --- a/kerberosV/src/lib/roken/roken.awk +++ /dev/null @@ -1,43 +0,0 @@ -# $Id: roken.awk,v 1.2 2013/06/17 18:57:45 robert Exp $ - -BEGIN { - print "#include " - print "#include " - print "#ifdef HAVE_SYS_TYPES_H" - print "#include " - print "#endif" - print "#ifdef HAVE_SYS_SOCKET_H" - print "#include " - print "#endif" - print "" - print "int main(int argc, char **argv)" - 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(\"\");" -} - -$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 "\");" -} - -END { - print "puts(\"\");" - print "puts(\"#endif /* __ROKEN_H__ */\");" - print "return 0;" - print "}" -} diff --git a/kerberosV/src/lib/roken/roken.h.in b/kerberosV/src/lib/roken/roken.h.in deleted file mode 100644 index ab8c8741ab0..00000000000 --- a/kerberosV/src/lib/roken/roken.h.in +++ /dev/null @@ -1,1142 +0,0 @@ -/* -*- C -*- */ -/* - * Copyright (c) 1995-2005 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 -#include -#include -#ifdef HAVE_STDINT_H -#include -#endif -#include -#include - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -# define ROKEN_LIB_CALL __cdecl -# ifdef ROKEN_LIB_DYNAMIC -# define ROKEN_LIB_FUNCTION __declspec(dllimport) -# define ROKEN_LIB_VARIABLE __declspec(dllimport) -# else -# define ROKEN_LIB_FUNCTION -# define ROKEN_LIB_VARIABLE -# endif -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#define ROKEN_LIB_VARIABLE -#endif -#endif - -#ifdef HAVE_WINSOCK -/* Declarations for Microsoft Windows */ - -#include -#include - -/* - * error codes for inet_ntop/inet_pton - */ -#define EAFNOSUPPORT WSAEAFNOSUPPORT - -typedef SOCKET rk_socket_t; - -#define rk_closesocket(x) closesocket(x) -#define rk_INVALID_SOCKET INVALID_SOCKET -#define rk_IS_BAD_SOCKET(s) ((s) == INVALID_SOCKET) -#define rk_IS_SOCKET_ERROR(rv) ((rv) == SOCKET_ERROR) -#define rk_SOCK_ERRNO WSAGetLastError() - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL rk_SOCK_IOCTL(SOCKET s, long cmd, int * argp); - -/* Microsoft VC 2010 POSIX definitions */ -#ifndef ENOTSOCK -#define ENOTSOCK 128 -#endif -#ifndef ENOTSUP -#define ENOTSUP 129 -#endif -#ifndef EOVERFLOW -#define EOVERFLOW 132 -#endif -#ifndef ETIMEDOUT -#define ETIMEDOUT 138 -#endif -#ifndef EWOULDBLOCK -#define EWOULDBLOCK 140 -#endif - -#define rk_SOCK_INIT() rk_WSAStartup() -#define rk_SOCK_EXIT() rk_WSACleanup() - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL rk_WSAStartup(void); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL rk_WSACleanup(void); - -#else /* not WinSock */ - -typedef int rk_socket_t; - -#define rk_closesocket(x) close(x) -#define rk_SOCK_IOCTL(s,c,a) ioctl((s),(c),(a)) -#define rk_IS_BAD_SOCKET(s) ((s) < 0) -#define rk_IS_SOCKET_ERROR(rv) ((rv) < 0) -#define rk_SOCK_ERRNO errno -#define rk_INVALID_SOCKET (-1) - -#define rk_SOCK_INIT() 0 -#define rk_SOCK_EXIT() do { } while(0) - -#endif - -#ifndef IN_LOOPBACKNET -#define IN_LOOPBACKNET 127 -#endif - -#ifdef _MSC_VER -/* Declarations for Microsoft Visual C runtime on Windows */ - -#include - -#include - -#ifndef __BIT_TYPES_DEFINED__ -#define __BIT_TYPES_DEFINED__ - -typedef __int8 int8_t; -typedef __int16 int16_t; -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int8 uint8_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int32 uint32_t; -typedef unsigned __int64 uint64_t; -typedef uint8_t u_int8_t; -typedef uint16_t u_int16_t; -typedef uint32_t u_int32_t; -typedef uint64_t u_int64_t; - -#endif /* __BIT_TYPES_DEFINED__ */ - -#define UNREACHABLE(x) x -#define UNUSED_ARGUMENT(x) ((void) x) - -#define RETSIGTYPE void - -#define VOID_RETSIGTYPE 1 - -#ifdef VOID_RETSIGTYPE -#define SIGRETURN(x) return -#else -#define SIGRETURN(x) return (RETSIGTYPE)(x) -#endif - -#ifndef CPP_ONLY - -typedef int pid_t; - -typedef unsigned int gid_t; - -typedef unsigned int uid_t; - -typedef unsigned short mode_t; - -#endif - -#ifndef __cplusplus -#define inline __inline -#endif - -#else - -#define UNREACHABLE(x) -#define UNUSED_ARGUMENT(x) - -#endif - -#ifdef _AIX -struct ether_addr; -struct sockaddr_dl; -#endif -#ifdef HAVE_SYS_PARAM_H -#include -#endif -#ifdef HAVE_INTTYPES_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_BITYPES_H -#include -#endif -#ifdef HAVE_BIND_BITYPES_H -#include -#endif -#ifdef HAVE_NETINET_IN6_MACHTYPES_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_SYS_UIO_H -#include -#endif -#ifdef HAVE_GRP_H -#include -#endif -#ifdef HAVE_SYS_STAT_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_IN6_H -#include -#endif -#ifdef HAVE_NETINET6_IN6_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif -#ifdef HAVE_ARPA_NAMESER_H -#include -#endif -#ifdef HAVE_RESOLV_H -#include -#endif -#ifdef HAVE_SYSLOG_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_ERRNO_H -#include -#endif -#include -#ifdef HAVE_TERMIOS_H -#include -#endif -#ifdef HAVE_SYS_IOCTL_H -#include -#endif -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif - -#ifdef HAVE_PATHS_H -#include -#endif - -#ifdef HAVE_DIRENT_H -#include -#endif - -#ifdef BACKSLASH_PATH_DELIM -#define rk_PATH_DELIM '\\' -#endif - -#ifndef HAVE_SSIZE_T -#ifndef SSIZE_T_DEFINED -#ifdef ssize_t -#undef ssize_t -#endif -#ifdef _WIN64 -typedef __int64 ssize_t; -#else -typedef int ssize_t; -#endif -#define SSIZE_T_DEFINED -#endif /* SSIZE_T_DEFINED */ -#endif /* HAVE_SSIZE_T */ - -#include - -ROKEN_CPP_START - -#ifdef HAVE_UINTPTR_T -#define rk_UNCONST(x) ((void *)(uintptr_t)(const void *)(x)) -#else -#define rk_UNCONST(x) ((void *)(unsigned long)(const void *)(x)) -#endif - -#if !defined(HAVE_SETSID) && defined(HAVE__SETSID) -#define setsid _setsid -#endif - -#ifdef _MSC_VER -/* Additional macros for Visual C/C++ runtime */ - -#define close _close - -#define getpid _getpid - -#define open _open - -#define chdir _chdir - -#define fsync _commit - -/* The MSVC implementation of snprintf is not C99 compliant. */ -#define snprintf rk_snprintf -#define vsnprintf rk_vsnprintf -#define vasnprintf rk_vasnprintf -#define vasprintf rk_vasprintf -#define asnprintf rk_asnprintf -#define asprintf rk_asprintf - -#define _PIPE_BUFFER_SZ 8192 -#define pipe(fds) _pipe((fds), _PIPE_BUFFER_SZ, O_BINARY); - -#define ftruncate(fd, sz) _chsize((fd), (sz)) - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_snprintf (char *str, size_t sz, const char *format, ...); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_asprintf (char **ret, const char *format, ...); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_asnprintf (char **ret, size_t max_sz, const char *format, ...); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_vasprintf (char **ret, const char *format, va_list args); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_vasnprintf (char **ret, size_t max_sz, const char *format, va_list args); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_vsnprintf (char *str, size_t sz, const char *format, va_list args); - -/* missing stat.h predicates */ - -#define S_ISREG(m) (((m) & _S_IFREG) == _S_IFREG) - -#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR) - -#define S_ISCHR(m) (((m) & _S_IFCHR) == _S_IFCHR) - -#define S_ISFIFO(m) (((m) & _S_IFIFO) == _S_IFIFO) - -/* The following are not implemented: - - S_ISLNK(m) - S_ISSOCK(m) - S_ISBLK(m) -*/ - -#endif /* _MSC_VER */ - -#ifdef HAVE_WINSOCK - -/* While we are at it, define WinSock specific scatter gather socket - I/O. */ - -#define iovec _WSABUF -#define iov_base buf -#define iov_len len - -struct msghdr { - void *msg_name; - socklen_t msg_namelen; - struct iovec *msg_iov; - size_t msg_iovlen; - void *msg_control; - socklen_t msg_controllen; - int msg_flags; -}; - -#define sendmsg sendmsg_w32 - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -sendmsg_w32(rk_socket_t s, const struct msghdr * msg, int flags); - -#endif /* HAVE_WINSOCK */ - -#ifndef HAVE_PUTENV -#define putenv rk_putenv -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL putenv(const char *); -#endif - -#if !defined(HAVE_SETENV) || defined(NEED_SETENV_PROTO) -#ifndef HAVE_SETENV -#define setenv rk_setenv -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL setenv(const char *, const char *, int); -#endif - -#if !defined(HAVE_UNSETENV) || defined(NEED_UNSETENV_PROTO) -#ifndef HAVE_UNSETENV -#define unsetenv rk_unsetenv -#endif -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL unsetenv(const char *); -#endif - -#if !defined(HAVE_GETUSERSHELL) || defined(NEED_GETUSERSHELL_PROTO) -#ifndef HAVE_GETUSERSHELL -#define getusershell rk_getusershell -#define endusershell rk_endusershell -#endif -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL getusershell(void); -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL endusershell(void); -#endif - -#if !defined(HAVE_SNPRINTF) || defined(NEED_SNPRINTF_PROTO) -#ifndef HAVE_SNPRINTF -#define snprintf rk_snprintf -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_snprintf (char *, size_t, const char *, ...) - __attribute__ ((format (printf, 3, 4))); -#endif - -#if !defined(HAVE_VSNPRINTF) || defined(NEED_VSNPRINTF_PROTO) -#ifndef HAVE_VSNPRINTF -#define vsnprintf rk_vsnprintf -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_vsnprintf (char *, size_t, const char *, va_list) - __attribute__((format (printf, 3, 0))); -#endif - -#if !defined(HAVE_ASPRINTF) || defined(NEED_ASPRINTF_PROTO) -#ifndef HAVE_ASPRINTF -#define asprintf rk_asprintf -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_asprintf (char **, const char *, ...) - __attribute__ ((format (printf, 2, 3))); -#endif - -#if !defined(HAVE_VASPRINTF) || defined(NEED_VASPRINTF_PROTO) -#ifndef HAVE_VASPRINTF -#define vasprintf rk_vasprintf -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_vasprintf (char **, const char *, va_list) - __attribute__((format (printf, 2, 0))); -#endif - -#if !defined(HAVE_ASNPRINTF) || defined(NEED_ASNPRINTF_PROTO) -#ifndef HAVE_ASNPRINTF -#define asnprintf rk_asnprintf -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_asnprintf (char **, size_t, const char *, ...) - __attribute__ ((format (printf, 3, 4))); -#endif - -#if !defined(HAVE_VASNPRINTF) || defined(NEED_VASNPRINTF_PROTO) -#ifndef HAVE_VASNPRINTF -#define vasnprintf rk_vasnprintf -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - vasnprintf (char **, size_t, const char *, va_list) - __attribute__((format (printf, 3, 0))); -#endif - -#ifndef HAVE_STRDUP -#define strdup rk_strdup -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strdup(const char *); -#endif - -#if !defined(HAVE_STRNDUP) || defined(NEED_STRNDUP_PROTO) -#ifndef HAVE_STRNDUP -#define strndup rk_strndup -#endif -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strndup(const char *, size_t); -#endif - -#ifndef HAVE_STRLWR -#define strlwr rk_strlwr -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strlwr(char *); -#endif - -#ifndef HAVE_STRNLEN -#define strnlen rk_strnlen -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL strnlen(const char*, size_t); -#endif - -#if !defined(HAVE_STRSEP) || defined(NEED_STRSEP_PROTO) -#ifndef HAVE_STRSEP -#define strsep rk_strsep -#endif -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strsep(char**, const char*); -#endif - -#if !defined(HAVE_STRSEP_COPY) || defined(NEED_STRSEP_COPY_PROTO) -#ifndef HAVE_STRSEP_COPY -#define strsep_copy rk_strsep_copy -#endif -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL strsep_copy(const char**, const char*, char*, size_t); -#endif - -#ifndef HAVE_STRCASECMP -#define strcasecmp rk_strcasecmp -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL strcasecmp(const char *, const char *); -#endif - -#ifdef NEED_FCLOSE_PROTO -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL fclose(FILE *); -#endif - -#ifdef NEED_STRTOK_R_PROTO -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strtok_r(char *, const char *, char **); -#endif - -#ifndef HAVE_STRUPR -#define strupr rk_strupr -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strupr(char *); -#endif - -#ifndef HAVE_STRLCPY -#define strlcpy rk_strlcpy -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL strlcpy (char *, const char *, size_t); -#endif - -#ifndef HAVE_STRLCAT -#define strlcat rk_strlcat -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL strlcat (char *, const char *, size_t); -#endif - -#ifndef HAVE_GETDTABLESIZE -#define getdtablesize rk_getdtablesize -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL getdtablesize(void); -#endif - -#if !defined(HAVE_STRERROR) && !defined(strerror) -#define strerror rk_strerror -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL strerror(int); -#endif - -#if (!defined(HAVE_STRERROR_R) && !defined(strerror_r)) || (!defined(STRERROR_R_PROTO_COMPATIBLE) && defined(HAVE_STRERROR_R)) -int ROKEN_LIB_FUNCTION rk_strerror_r(int, char *, size_t); -#else -#define rk_strerror_r strerror_r -#endif - -#if !defined(HAVE_HSTRERROR) || defined(NEED_HSTRERROR_PROTO) -#ifndef HAVE_HSTRERROR -#define hstrerror rk_hstrerror -#endif -/* This causes a fatal error under Psoriasis */ -#ifndef SunOS -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL hstrerror(int); -#endif -#endif - -#if !HAVE_DECL_H_ERRNO -extern int h_errno; -#endif - -#if !defined(HAVE_INET_ATON) || defined(NEED_INET_ATON_PROTO) -#ifndef HAVE_INET_ATON -#define inet_aton rk_inet_aton -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL inet_aton(const char *, struct in_addr *); -#endif - -#ifndef HAVE_INET_NTOP -#define inet_ntop rk_inet_ntop -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL -inet_ntop(int af, const void *src, char *dst, size_t size); -#endif - -#ifndef HAVE_INET_PTON -#define inet_pton rk_inet_pton -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -inet_pton(int, const char *, void *); -#endif - -#ifndef HAVE_GETCWD -#define getcwd rk_getcwd -ROKEN_LIB_FUNCTION char* ROKEN_LIB_CALL getcwd(char *, size_t); -#endif - -#ifdef HAVE_PWD_H -#include -ROKEN_LIB_FUNCTION struct passwd * ROKEN_LIB_CALL k_getpwnam (const char *); -ROKEN_LIB_FUNCTION struct passwd * ROKEN_LIB_CALL k_getpwuid (uid_t); -#endif - -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL get_default_username (void); - -#ifndef HAVE_SETEUID -#define seteuid rk_seteuid -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL seteuid(uid_t); -#endif - -#ifndef HAVE_SETEGID -#define setegid rk_setegid -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL setegid(gid_t); -#endif - -#ifndef HAVE_LSTAT -#define lstat rk_lstat -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL lstat(const char *, struct stat *); -#endif - -#if !defined(HAVE_MKSTEMP) || defined(NEED_MKSTEMP_PROTO) -#ifndef HAVE_MKSTEMP -#define mkstemp rk_mkstemp -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL mkstemp(char *); -#endif - -#ifndef HAVE_CGETENT -#define cgetent rk_cgetent -#define cgetstr rk_cgetstr -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL cgetent(char **, char **, const char *); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL cgetstr(char *, const char *, char **); -#endif - -#ifndef HAVE_INITGROUPS -#define initgroups rk_initgroups -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL initgroups(const char *, gid_t); -#endif - -#ifndef HAVE_FCHOWN -#define fchown rk_fchown -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL fchown(int, uid_t, gid_t); -#endif - -#ifdef RENAME_DOES_NOT_UNLINK -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL rk_rename(const char *, const char *); -#else -#define rk_rename(__rk_rn_from,__rk_rn_to) rename(__rk_rn_from,__rk_rn_to) -#endif - -#if !defined(HAVE_DAEMON) || defined(NEED_DAEMON_PROTO) -#ifndef HAVE_DAEMON -#define daemon rk_daemon -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL daemon(int, int); -#endif - -#ifndef HAVE_CHOWN -#define chown rk_chown -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL chown(const char *, uid_t, gid_t); -#endif - -#ifndef HAVE_RCMD -#define rcmd rk_rcmd -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rcmd(char **, unsigned short, const char *, - const char *, const char *, int *); -#endif - -#if !defined(HAVE_INNETGR) || defined(NEED_INNETGR_PROTO) -#ifndef HAVE_INNETGR -#define innetgr rk_innetgr -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL innetgr(const char*, const char*, - const char*, const char*); -#endif - -#ifndef HAVE_IRUSEROK -#define iruserok rk_iruserok -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL iruserok(unsigned, int, - const char *, const char *); -#endif - -#if !defined(HAVE_GETHOSTNAME) || defined(NEED_GETHOSTNAME_PROTO) -#ifndef HAVE_GETHOSTNAME -#define gethostname rk_gethostname -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL gethostname(char *, int); -#endif - -#ifndef HAVE_WRITEV -#define writev rk_writev -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -writev(int, const struct iovec *, int); -#endif - -#ifndef HAVE_READV -#define readv rk_readv -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -readv(int, const struct iovec *, int); -#endif - -#ifndef HAVE_PIDFILE -#ifdef NO_PIDFILES -#define pidfile(x) ((void) 0) -#else -#define pidfile rk_pidfile -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL pidfile (const char*); -#endif -#endif - -#ifndef HAVE_BSWAP32 -#define bswap32 rk_bswap32 -ROKEN_LIB_FUNCTION unsigned int ROKEN_LIB_CALL bswap32(unsigned int); -#endif - -#ifndef HAVE_BSWAP16 -#define bswap16 rk_bswap16 -ROKEN_LIB_FUNCTION unsigned short ROKEN_LIB_CALL bswap16(unsigned short); -#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 - -#define flock(_x,_y) rk_flock(_x,_y) -int rk_flock(int fd, int operation); -#endif /* HAVE_FLOCK */ - -#ifndef HAVE_DIRFD -#ifdef HAVE_DIR_DD_FD -#define dirfd(x) ((x)->dd_fd) -#else -#ifndef _WIN32 /* Windows code never calls dirfd */ -#error Missing dirfd() and ->dd_fd -#endif -#endif -#endif - -ROKEN_LIB_FUNCTION time_t ROKEN_LIB_CALL tm2time (struct tm, int); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL unix_verify_user(char *, char *); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL roken_concat (char *, size_t, ...); - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL roken_mconcat (char **, size_t, ...); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL roken_vconcat (char *, size_t, va_list); - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL - roken_vmconcat (char **, size_t, va_list); - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL - net_write (rk_socket_t, const void *, size_t); - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL - net_read (rk_socket_t, void *, size_t); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - issuid(void); - -#ifndef HAVE_STRUCT_WINSIZE -struct winsize { - unsigned short ws_row, ws_col; - unsigned short ws_xpixel, ws_ypixel; -}; -#endif - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL get_window_size(int fd, int *, int *); - -#ifndef HAVE_VSYSLOG -#define vsyslog rk_vsyslog -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL vsyslog(int, const char *, va_list); -#endif - -#ifndef HAVE_GETOPT -#define getopt rk_getopt -#define optarg rk_optarg -#define optind rk_optind -#define opterr rk_opterr -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getopt(int nargc, char * const *nargv, const char *ostr); -#endif - -#if !HAVE_DECL_OPTARG -ROKEN_LIB_VARIABLE extern char *optarg; -#endif -#if !HAVE_DECL_OPTIND -ROKEN_LIB_VARIABLE extern int optind; -#endif -#if !HAVE_DECL_OPTERR -ROKEN_LIB_VARIABLE extern int opterr; -#endif - -#ifndef HAVE_GETIPNODEBYNAME -#define getipnodebyname rk_getipnodebyname -ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL -getipnodebyname (const char *, int, int, int *); -#endif - -#ifndef HAVE_GETIPNODEBYADDR -#define getipnodebyaddr rk_getipnodebyaddr -ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL -getipnodebyaddr (const void *, size_t, int, int *); -#endif - -#ifndef HAVE_FREEHOSTENT -#define freehostent rk_freehostent -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -freehostent (struct hostent *); -#endif - -#ifndef HAVE_COPYHOSTENT -#define copyhostent rk_copyhostent -ROKEN_LIB_FUNCTION struct hostent * ROKEN_LIB_CALL -copyhostent (const struct hostent *); -#endif - -#ifndef HAVE_SOCKLEN_T -typedef int socklen_t; -#endif - -#ifndef HAVE_STRUCT_SOCKADDR_STORAGE - -#ifndef HAVE_SA_FAMILY_T -typedef unsigned short sa_family_t; -#endif - -#ifdef HAVE_IPV6 -#define _SS_MAXSIZE sizeof(struct sockaddr_in6) -#else -#define _SS_MAXSIZE sizeof(struct sockaddr_in) -#endif - -#define _SS_ALIGNSIZE sizeof(unsigned long) - -#if HAVE_STRUCT_SOCKADDR_SA_LEN - -typedef unsigned char roken_sa_family_t; - -#define _SS_PAD1SIZE ((2 * _SS_ALIGNSIZE - sizeof (roken_sa_family_t) - sizeof(unsigned char)) % _SS_ALIGNSIZE) -#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (roken_sa_family_t) + sizeof(unsigned char) + _SS_PAD1SIZE + _SS_ALIGNSIZE)) - -struct sockaddr_storage { - unsigned char ss_len; - roken_sa_family_t ss_family; - char __ss_pad1[_SS_PAD1SIZE]; - unsigned long __ss_align[_SS_PAD2SIZE / sizeof(unsigned long) + 1]; -}; - -#else /* !HAVE_STRUCT_SOCKADDR_SA_LEN */ - -typedef unsigned short roken_sa_family_t; - -#define _SS_PAD1SIZE ((2 * _SS_ALIGNSIZE - sizeof (roken_sa_family_t)) % _SS_ALIGNSIZE) -#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (roken_sa_family_t) + _SS_PAD1SIZE + _SS_ALIGNSIZE)) - -struct sockaddr_storage { - roken_sa_family_t ss_family; - char __ss_pad1[_SS_PAD1SIZE]; - unsigned long __ss_align[_SS_PAD2SIZE / sizeof(unsigned long) + 1]; -}; - -#endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */ - -#endif /* HAVE_STRUCT_SOCKADDR_STORAGE */ - -#ifndef HAVE_STRUCT_ADDRINFO -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; -}; -#endif - -#ifndef HAVE_GETADDRINFO -#define getaddrinfo rk_getaddrinfo -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getaddrinfo(const char *, - const char *, - const struct addrinfo *, - struct addrinfo **); -#endif - -#ifndef HAVE_GETNAMEINFO -#define getnameinfo rk_getnameinfo -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getnameinfo(const struct sockaddr *, socklen_t, - char *, size_t, - char *, size_t, - int); -#endif - -#ifndef HAVE_FREEADDRINFO -#define freeaddrinfo rk_freeaddrinfo -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -freeaddrinfo(struct addrinfo *); -#endif - -#ifndef HAVE_GAI_STRERROR -#define gai_strerror rk_gai_strerror -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL -gai_strerror(int); -#endif - -#ifdef NO_SLEEP - -ROKEN_LIB_FUNCTION unsigned int ROKEN_LIB_CALL -sleep(unsigned int seconds); - -#endif - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -getnameinfo_verified(const struct sockaddr *, socklen_t, - char *, size_t, - char *, size_t, - int); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -roken_getaddrinfo_hostspec(const char *, int, struct addrinfo **); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -roken_getaddrinfo_hostspec2(const char *, int, int, struct addrinfo **); - -#ifndef HAVE_STRFTIME -#define strftime rk_strftime -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -strftime (char *, size_t, const char *, const struct tm *); -#endif - -#ifndef HAVE_STRPTIME -#define strptime rk_strptime -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -strptime (const char *, const char *, struct tm *); -#endif - -#ifndef HAVE_GETTIMEOFDAY -#define gettimeofday rk_gettimeofday -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -gettimeofday (struct timeval *, void *); -#endif - -#ifndef HAVE_EMALLOC -#define emalloc rk_emalloc -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL emalloc (size_t); -#endif -#ifndef HAVE_ECALLOC -#define ecalloc rk_ecalloc -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL ecalloc(size_t, size_t); -#endif -#ifndef HAVE_EREALLOC -#define erealloc rk_erealloc -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL erealloc (void *, size_t); -#endif -#ifndef HAVE_ESTRDUP -#define estrdup rk_estrdup -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL estrdup (const char *); -#endif - -/* - * kludges and such - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -roken_gethostby_setup(const char*, const char*); -ROKEN_LIB_FUNCTION struct hostent* ROKEN_LIB_CALL -roken_gethostbyname(const char*); -ROKEN_LIB_FUNCTION struct hostent* ROKEN_LIB_CALL -roken_gethostbyaddr(const void*, size_t, int); - -#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 - -#ifdef GETSOCKNAME_PROTO_COMPATIBLE -#define roken_getsockname(a,b,c) getsockname(a,b,c) -#else -#define roken_getsockname(a,b,c) getsockname(a, b, (void*)c) -#endif - -#ifndef HAVE_SETPROGNAME -#define setprogname rk_setprogname -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL setprogname(const char *); -#endif - -#ifndef HAVE_GETPROGNAME -#define getprogname rk_getprogname -ROKEN_LIB_FUNCTION const char * ROKEN_LIB_CALL getprogname(void); -#endif - -#if !defined(HAVE_SETPROGNAME) && !defined(HAVE_GETPROGNAME) && !HAVE_DECL___PROGNAME -extern const char *__progname; -#endif - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -mini_inetd_addrinfo (struct addrinfo*, rk_socket_t *); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -mini_inetd (int, rk_socket_t *); - -#ifndef HAVE_LOCALTIME_R -#define localtime_r rk_localtime_r -ROKEN_LIB_FUNCTION struct tm * ROKEN_LIB_CALL -localtime_r(const time_t *, struct tm *); -#endif - -#if !defined(HAVE_STRSVIS) || defined(NEED_STRSVIS_PROTO) -#ifndef HAVE_STRSVIS -#define strsvis rk_strsvis -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strsvis(char *, const char *, int, const char *); -#endif - -#if !defined(HAVE_STRSVISX) || defined(NEED_STRSVISX_PROTO) -#ifndef HAVE_STRSVISX -#define strsvisx rk_strsvisx -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strsvisx(char *, const char *, size_t, int, const char *); -#endif - -#if !defined(HAVE_STRUNVIS) || defined(NEED_STRUNVIS_PROTO) -#ifndef HAVE_STRUNVIS -#define strunvis rk_strunvis -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strunvis(char *, const char *); -#endif - -#if !defined(HAVE_STRVIS) || defined(NEED_STRVIS_PROTO) -#ifndef HAVE_STRVIS -#define strvis rk_strvis -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strvis(char *, const char *, int); -#endif - -#if !defined(HAVE_STRVISX) || defined(NEED_STRVISX_PROTO) -#ifndef HAVE_STRVISX -#define strvisx rk_strvisx -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strvisx(char *, const char *, size_t, int); -#endif - -#if !defined(HAVE_SVIS) || defined(NEED_SVIS_PROTO) -#ifndef HAVE_SVIS -#define svis rk_svis -#endif -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -svis(char *, int, int, int, const char *); -#endif - -#if !defined(HAVE_UNVIS) || defined(NEED_UNVIS_PROTO) -#ifndef HAVE_UNVIS -#define unvis rk_unvis -#endif -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unvis(char *, int, int *, int); -#endif - -#if !defined(HAVE_VIS) || defined(NEED_VIS_PROTO) -#ifndef HAVE_VIS -#define vis rk_vis -#endif -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -vis(char *, int, int, int); -#endif - -#if !defined(HAVE_CLOSEFROM) -#define closefrom rk_closefrom -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -closefrom(int); -#endif - -#if !defined(HAVE_TIMEGM) -#define timegm rk_timegm -ROKEN_LIB_FUNCTION time_t ROKEN_LIB_CALL -rk_timegm(struct tm *tm); -#endif - -#ifdef NEED_QSORT -#define qsort rk_qsort -void -rk_qsort(void *, size_t, size_t, int (*)(const void *, const void *)); -#endif - -#if defined(HAVE_ARC4RANDOM) -#define rk_random() arc4random() -#elif defined(HAVE_RANDOM) -#define rk_random() random() -#else -#define rk_random() rand() -#endif - -#ifndef HAVE_TDELETE -#define tdelete(a,b,c) rk_tdelete(a,b,c) -#endif -#ifndef HAVE_TFIND -#define tfind(a,b,c) rk_tfind(a,b,c) -#endif -#ifndef HAVE_TSEARCH -#define tsearch(a,b,c) rk_tsearch(a,b,c) -#endif -#ifndef HAVE_TWALK -#define twalk(a,b) rk_twalk(a,b) -#endif - -#if defined(__linux__) && defined(SOCK_CLOEXEC) && !defined(SOCKET_WRAPPER_REPLACE) && !defined(__SOCKET_WRAPPER_H__) -#undef socket -#define socket(_fam,_type,_prot) rk_socket(_fam,_type,_prot) -int ROKEN_LIB_FUNCTION rk_socket(int, int, int); -#endif - -#ifdef SOCKET_WRAPPER_REPLACE -#include -#endif - -ROKEN_CPP_END diff --git a/kerberosV/src/lib/roken/roken_gethostby.c b/kerberosV/src/lib/roken/roken_gethostby.c deleted file mode 100644 index 1bb560d3baf..00000000000 --- a/kerberosV/src/lib/roken/roken_gethostby.c +++ /dev/null @@ -1,277 +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 - -#include "roken.h" - -#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); - dns_req = NULL; - if(proxy_host) { - if(make_address(proxy_host, &dns_addr.sin_addr) != 0) - return -1; - dns_addr.sin_port = htons(proxy_port); - if (asprintf(&dns_req, "http://%s:%d%s", dns_host, dns_port, dns_path) < 0) - return -1; - } 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; -} - - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -roken_gethostby_setup(const char *proxy_spec, const char *dns_spec) -{ - char *proxy_host = NULL; - int proxy_port = 0; - 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 addr; - char *request = NULL; - char buf[1024]; - int offset = 0; - int n; - char *p, *foo; - size_t len; - - if(dns_addr.sin_family == 0) - return NULL; /* no configured host */ - addr = dns_addr; - if (asprintf(&request, "GET %s?%s HTTP/1.0\r\n\r\n", dns_req, hostname) < 0) - return NULL; - if(request == NULL) - return NULL; - s = socket(AF_INET, SOCK_STREAM, 0); - if(s < 0) { - free(request); - return NULL; - } - if(connect(s, (struct sockaddr*)&addr, sizeof(addr)) < 0) { - close(s); - free(request); - return NULL; - } - - len = strlen(request); - if(write(s, request, len) != (ssize_t)len) { - 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 + 1]; - 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; - } -} - -ROKEN_LIB_FUNCTION struct hostent* ROKEN_LIB_CALL -roken_gethostbyname(const char *hostname) -{ - struct hostent *he; - he = gethostbyname(hostname); - if(he) - return he; - return roken_gethostby(hostname); -} - -ROKEN_LIB_FUNCTION struct hostent* ROKEN_LIB_CALL -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 -#include -#include -#include - -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/kerberosV/src/lib/roken/rtbl.3 b/kerberosV/src/lib/roken/rtbl.3 deleted file mode 100644 index b9fd71774f0..00000000000 --- a/kerberosV/src/lib/roken/rtbl.3 +++ /dev/null @@ -1,201 +0,0 @@ -.\" Copyright (c) 2004 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: rtbl.3,v 1.2 2013/06/17 18:57:45 robert Exp $ -.\" -.Dd June 26, 2004 -.Dt RTBL 3 -.Os HEIMDAL -.Sh NAME -.Nm rtbl_create , -.Nm rtbl_destroy , -.Nm rtbl_set_flags , -.Nm rtbl_get_flags , -.Nm rtbl_set_prefix , -.Nm rtbl_set_separator , -.Nm rtbl_set_column_prefix , -.Nm rtbl_set_column_affix_by_id , -.Nm rtbl_add_column , -.Nm rtbl_add_column_by_id , -.Nm rtbl_add_column_entry , -.Nm rtbl_add_column_entry_by_id , -.Nm rtbl_new_row , -.Nm rtbl_format -.Nd format data in simple tables -.Sh LIBRARY -The roken library (libroken, -lroken) -.Sh SYNOPSIS -.In rtbl.h -.Ft int -.Fn rtbl_add_column "rtbl_t table" "const char *column_name" "unsigned int flags" -.Ft int -.Fn rtbl_add_column_by_id "rtbl_t table" "unsigned int column_id" "const char *column_header" "unsigned int flags" -.Ft int -.Fn rtbl_add_column_entry "rtbl_t table" "const char *column_name" "const char *cell_entry" -.Ft int -.Fn rtbl_add_column_entry_by_id "rtbl_t table" "unsigned int column_id" "const char *cell_entry" -.Ft rtbl_t -.Fn rtbl_create "void" -.Ft void -.Fn rtbl_destroy "rtbl_t table" -.Ft int -.Fn rtbl_new_row "rtbl_t table" -.Ft int -.Fn rtbl_set_column_affix_by_id "rtbl_t table" "unsigned int column_id "const char *prefix" "const char *suffix" -.Ft int -.Fn rtbl_set_column_prefix "rtbl_t table" "const char *column_name" "const char *prefix" -.Ft "unsigned int" -.Fn rtbl_get_flags "rtbl_t table" -.Ft void -.Fn rtbl_set_flags "rtbl_t table" "unsigned int flags" -.Ft int -.Fn rtbl_set_prefix "rtbl_t table" "const char *prefix" -.Ft int -.Fn rtbl_set_separator "rtbl_t table" "const char *separator" -.Ft int -.Fn rtbl_format "rtbl_t table "FILE *file" -.Sh DESCRIPTION -This set of functions assemble a simple table consisting of rows and -columns, allowing it to be printed with certain options. Typical use -would be output from tools such as -.Xr ls 1 -or -.Xr netstat 1 , -where you have a fixed number of columns, but don't know the column -widths before hand. -.Pp -A table is created with -.Fn rtbl_create -and destroyed with -.Fn rtbl_destroy . -.Pp -Global flags on the table are set with -.Fa rtbl_set_flags -and retrieved with -.Fa rtbl_get_flags . -At present the only defined flag is -.Dv RTBL_HEADER_STYLE_NONE -which suppresses printing the header. -.Pp -Before adding data to the table, one or more columns need to be -created. This would normally be done with -.Fn rtbl_add_column_by_id , -.Fa column_id -is any number of your choice (it's used only to identify columns), -.Fa column_header -is the header to print at the top of the column, and -.Fa flags -are flags specific to this column. Currently the only defined flag is -.Dv RTBL_ALIGN_RIGHT , -aligning column entries to the right. Columns are printed in the order -they are added. -.Pp -There's also a way to add columns by column name with -.Fn rtbl_add_column , -but this is less flexible (you need unique header names), and is -considered deprecated. -.Pp -To add data to a column you use -.Fn rtbl_add_column_entry_by_id , -where the -.Fa column_id -is the same as when the column was added (adding data to a -non-existent column is undefined), and -.Fa cell_entry -is whatever string you wish to include in that cell. It should not -include newlines. -For columns added with -.Fn rtbl_add_column -you must use -.Fn rtbl_add_column_entry -instead. -.Pp -.Fn rtbl_new_row -fills all columns with blank entries until they all have the same -number of rows. -.Pp -Each column can have a separate prefix and suffix, set with -.Fa rtbl_set_column_affix_by_id ; -.Fa rtbl_set_column_prefix -allows setting the prefix only by column name. In addition to this, -columns may be separated by a string set with -.Fa rtbl_set_separator ( Ns -by default columns are not seprated by anything). -.Pp -The finished table is printed to -.Fa file -with -.Fa rtbl_format . -.Sh EXAMPLES -This program: -.Bd -literal -offset xxxx -#include -#include -int -main(int argc, char **argv) -{ - rtbl_t table; - table = rtbl_create(); - rtbl_set_separator(table, " "); - rtbl_add_column_by_id(table, 0, "Column A", 0); - rtbl_add_column_by_id(table, 1, "Column B", RTBL_ALIGN_RIGHT); - rtbl_add_column_by_id(table, 2, "Column C", 0); - rtbl_add_column_entry_by_id(table, 0, "A-1"); - rtbl_add_column_entry_by_id(table, 0, "A-2"); - rtbl_add_column_entry_by_id(table, 0, "A-3"); - rtbl_add_column_entry_by_id(table, 1, "B-1"); - rtbl_add_column_entry_by_id(table, 2, "C-1"); - rtbl_add_column_entry_by_id(table, 2, "C-2"); - rtbl_add_column_entry_by_id(table, 1, "B-2"); - rtbl_add_column_entry_by_id(table, 1, "B-3"); - rtbl_add_column_entry_by_id(table, 2, "C-3"); - rtbl_add_column_entry_by_id(table, 0, "A-4"); - rtbl_new_row(table); - rtbl_add_column_entry_by_id(table, 1, "B-4"); - rtbl_new_row(table); - rtbl_add_column_entry_by_id(table, 2, "C-4"); - rtbl_new_row(table); - rtbl_format(table, stdout); - rtbl_destroy(table); - return 0; -} -.Ed -.Pp -will output the following: -.Bd -literal -offset xxxx -Column A Column B Column C -A-1 B-1 C-1 -A-2 B-2 C-2 -A-3 B-3 C-3 -A-4 - B-4 - C-4 -.Ed -.\" .Sh SEE ALSO diff --git a/kerberosV/src/lib/roken/rtbl.c b/kerberosV/src/lib/roken/rtbl.c deleted file mode 100644 index fe0fde662b8..00000000000 --- a/kerberosV/src/lib/roken/rtbl.c +++ /dev/null @@ -1,487 +0,0 @@ -/* - * Copyright (c) 2000, 2002, 2004 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 - -#include "roken.h" -#include "rtbl.h" - -struct column_entry { - char *data; -}; - -struct column_data { - char *header; - char *prefix; - int width; - unsigned flags; - size_t num_rows; - struct column_entry *rows; - unsigned int column_id; - char *suffix; -}; - -struct rtbl_data { - char *column_prefix; - size_t num_columns; - struct column_data **columns; - unsigned int flags; - char *column_separator; -}; - -ROKEN_LIB_FUNCTION rtbl_t ROKEN_LIB_CALL -rtbl_create (void) -{ - return calloc (1, sizeof (struct rtbl_data)); -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rtbl_set_flags (rtbl_t table, unsigned int flags) -{ - table->flags = flags; -} - -ROKEN_LIB_FUNCTION unsigned int ROKEN_LIB_CALL -rtbl_get_flags (rtbl_t table) -{ - return table->flags; -} - -static struct column_data * -rtbl_get_column_by_id (rtbl_t table, unsigned int id) -{ - size_t i; - for(i = 0; i < table->num_columns; i++) - if(table->columns[i]->column_id == id) - return table->columns[i]; - return NULL; -} - -static struct column_data * -rtbl_get_column (rtbl_t table, const char *column) -{ - size_t i; - for(i = 0; i < table->num_columns; i++) - if(strcmp(table->columns[i]->header, column) == 0) - return table->columns[i]; - return NULL; -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rtbl_destroy (rtbl_t table) -{ - size_t i, j; - - for (i = 0; i < table->num_columns; i++) { - struct column_data *c = table->columns[i]; - - for (j = 0; j < c->num_rows; j++) - free (c->rows[j].data); - free (c->rows); - free (c->header); - free (c->prefix); - free (c->suffix); - free (c); - } - free (table->column_prefix); - free (table->column_separator); - free (table->columns); - free (table); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column_by_id (rtbl_t table, unsigned int id, - const char *header, unsigned int flags) -{ - struct column_data *col, **tmp; - - tmp = realloc (table->columns, (table->num_columns + 1) * sizeof (*tmp)); - if (tmp == NULL) - return ENOMEM; - table->columns = tmp; - col = malloc (sizeof (*col)); - if (col == NULL) - return ENOMEM; - col->header = strdup (header); - if (col->header == NULL) { - free (col); - return ENOMEM; - } - col->prefix = NULL; - col->width = 0; - col->flags = flags; - col->num_rows = 0; - col->rows = NULL; - col->column_id = id; - col->suffix = NULL; - table->columns[table->num_columns++] = col; - return 0; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column (rtbl_t table, const char *header, unsigned int flags) -{ - return rtbl_add_column_by_id(table, 0, header, flags); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_new_row(rtbl_t table) -{ - size_t max_rows = 0; - size_t c; - for (c = 0; c < table->num_columns; c++) - if(table->columns[c]->num_rows > max_rows) - max_rows = table->columns[c]->num_rows; - for (c = 0; c < table->num_columns; c++) { - struct column_entry *tmp; - - if(table->columns[c]->num_rows == max_rows) - continue; - tmp = realloc(table->columns[c]->rows, - max_rows * sizeof(table->columns[c]->rows)); - if(tmp == NULL) - return ENOMEM; - table->columns[c]->rows = tmp; - while(table->columns[c]->num_rows < max_rows) { - if((tmp[table->columns[c]->num_rows++].data = strdup("")) == NULL) - return ENOMEM; - } - } - return 0; -} - -static void -column_compute_width (rtbl_t table, struct column_data *column) -{ - size_t i; - - if(table->flags & RTBL_HEADER_STYLE_NONE) - column->width = 0; - else - column->width = strlen (column->header); - for (i = 0; i < column->num_rows; i++) - column->width = max (column->width, (int) strlen (column->rows[i].data)); -} - -/* DEPRECATED */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_set_prefix (rtbl_t table, const char *prefix) -{ - if (table->column_prefix) - free (table->column_prefix); - table->column_prefix = strdup (prefix); - if (table->column_prefix == NULL) - return ENOMEM; - return 0; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_set_separator (rtbl_t table, const char *separator) -{ - if (table->column_separator) - free (table->column_separator); - table->column_separator = strdup (separator); - if (table->column_separator == NULL) - return ENOMEM; - return 0; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_set_column_prefix (rtbl_t table, const char *column, - const char *prefix) -{ - struct column_data *c = rtbl_get_column (table, column); - - if (c == NULL) - return -1; - if (c->prefix) - free (c->prefix); - c->prefix = strdup (prefix); - if (c->prefix == NULL) - return ENOMEM; - return 0; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_set_column_affix_by_id(rtbl_t table, unsigned int id, - const char *prefix, const char *suffix) -{ - struct column_data *c = rtbl_get_column_by_id (table, id); - - if (c == NULL) - return -1; - if (c->prefix) - free (c->prefix); - if(prefix == NULL) - c->prefix = NULL; - else { - c->prefix = strdup (prefix); - if (c->prefix == NULL) - return ENOMEM; - } - - if (c->suffix) - free (c->suffix); - if(suffix == NULL) - c->suffix = NULL; - else { - c->suffix = strdup (suffix); - if (c->suffix == NULL) - return ENOMEM; - } - return 0; -} - - -static const char * -get_column_prefix (rtbl_t table, struct column_data *c) -{ - if (c == NULL) - return ""; - if (c->prefix) - return c->prefix; - if (table->column_prefix) - return table->column_prefix; - return ""; -} - -static const char * -get_column_suffix (rtbl_t table, struct column_data *c) -{ - if (c && c->suffix) - return c->suffix; - return ""; -} - -static int -add_column_entry (struct column_data *c, const char *data) -{ - struct column_entry row, *tmp; - - row.data = strdup (data); - if (row.data == NULL) - return ENOMEM; - tmp = realloc (c->rows, (c->num_rows + 1) * sizeof (*tmp)); - if (tmp == NULL) { - free (row.data); - return ENOMEM; - } - c->rows = tmp; - c->rows[c->num_rows++] = row; - return 0; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column_entry_by_id (rtbl_t table, unsigned int id, const char *data) -{ - struct column_data *c = rtbl_get_column_by_id (table, id); - - if (c == NULL) - return -1; - - return add_column_entry(c, data); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column_entryv_by_id (rtbl_t table, unsigned int id, - const char *fmt, ...) -{ - va_list ap; - char *str; - int ret; - - va_start(ap, fmt); - ret = vasprintf(&str, fmt, ap); - va_end(ap); - if (ret == -1) - return -1; - ret = rtbl_add_column_entry_by_id(table, id, str); - free(str); - return ret; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column_entry (rtbl_t table, const char *column, const char *data) -{ - struct column_data *c = rtbl_get_column (table, column); - - if (c == NULL) - return -1; - - return add_column_entry(c, data); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column_entryv (rtbl_t table, const char *column, const char *fmt, ...) -{ - va_list ap; - char *str; - int ret; - - va_start(ap, fmt); - ret = vasprintf(&str, fmt, ap); - va_end(ap); - if (ret == -1) - return -1; - ret = rtbl_add_column_entry(table, column, str); - free(str); - return ret; -} - - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_format (rtbl_t table, FILE * f) -{ - size_t i, j; - - for (i = 0; i < table->num_columns; i++) - column_compute_width (table, table->columns[i]); - if((table->flags & RTBL_HEADER_STYLE_NONE) == 0) { - for (i = 0; i < table->num_columns; i++) { - struct column_data *c = table->columns[i]; - - if(table->column_separator != NULL && i > 0) - fprintf (f, "%s", table->column_separator); - fprintf (f, "%s", get_column_prefix (table, c)); - if(i == table->num_columns - 1 && c->suffix == NULL) - /* last column, so no need to pad with spaces */ - fprintf (f, "%-*s", 0, c->header); - else - fprintf (f, "%-*s", (int)c->width, c->header); - fprintf (f, "%s", get_column_suffix (table, c)); - } - fprintf (f, "\n"); - } - - for (j = 0;; j++) { - int flag = 0; - - /* are there any more rows left? */ - for (i = 0; flag == 0 && i < table->num_columns; ++i) { - struct column_data *c = table->columns[i]; - - if (c->num_rows > j) { - ++flag; - break; - } - } - if (flag == 0) - break; - - for (i = 0; i < table->num_columns; i++) { - int w; - struct column_data *c = table->columns[i]; - - if(table->column_separator != NULL && i > 0) - fprintf (f, "%s", table->column_separator); - - w = c->width; - - if ((c->flags & RTBL_ALIGN_RIGHT) == 0) { - if(i == table->num_columns - 1 && c->suffix == NULL) - /* last column, so no need to pad with spaces */ - w = 0; - else - w = -w; - } - fprintf (f, "%s", get_column_prefix (table, c)); - if (c->num_rows <= j) - fprintf (f, "%*s", w, ""); - else - fprintf (f, "%*s", w, c->rows[j].data); - fprintf (f, "%s", get_column_suffix (table, c)); - } - fprintf (f, "\n"); - } - return 0; -} - -#ifdef TEST -int -main (int argc, char **argv) -{ - rtbl_t table; - - table = rtbl_create (); - rtbl_add_column_by_id (table, 0, "Issued", 0); - rtbl_add_column_by_id (table, 1, "Expires", 0); - rtbl_add_column_by_id (table, 2, "Foo", RTBL_ALIGN_RIGHT); - rtbl_add_column_by_id (table, 3, "Principal", 0); - - rtbl_add_column_entry_by_id (table, 0, "Jul 7 21:19:29"); - rtbl_add_column_entry_by_id (table, 1, "Jul 8 07:19:29"); - rtbl_add_column_entry_by_id (table, 2, "73"); - rtbl_add_column_entry_by_id (table, 2, "0"); - rtbl_add_column_entry_by_id (table, 2, "-2000"); - rtbl_add_column_entry_by_id (table, 3, "krbtgt/NADA.KTH.SE@NADA.KTH.SE"); - - rtbl_add_column_entry_by_id (table, 0, "Jul 7 21:19:29"); - rtbl_add_column_entry_by_id (table, 1, "Jul 8 07:19:29"); - rtbl_add_column_entry_by_id (table, 3, "afs/pdc.kth.se@NADA.KTH.SE"); - - rtbl_add_column_entry_by_id (table, 0, "Jul 7 21:19:29"); - rtbl_add_column_entry_by_id (table, 1, "Jul 8 07:19:29"); - rtbl_add_column_entry_by_id (table, 3, "afs@NADA.KTH.SE"); - - rtbl_set_separator (table, " "); - - rtbl_format (table, stdout); - - rtbl_destroy (table); - - printf("\n"); - - table = rtbl_create (); - rtbl_add_column_by_id (table, 0, "Column A", 0); - rtbl_set_column_affix_by_id (table, 0, "<", ">"); - rtbl_add_column_by_id (table, 1, "Column B", 0); - rtbl_set_column_affix_by_id (table, 1, "[", "]"); - rtbl_add_column_by_id (table, 2, "Column C", 0); - rtbl_set_column_affix_by_id (table, 2, "(", ")"); - - rtbl_add_column_entry_by_id (table, 0, "1"); - rtbl_new_row(table); - rtbl_add_column_entry_by_id (table, 1, "2"); - rtbl_new_row(table); - rtbl_add_column_entry_by_id (table, 2, "3"); - rtbl_new_row(table); - - rtbl_set_separator (table, " "); - rtbl_format (table, stdout); - - rtbl_destroy (table); - - return 0; -} - -#endif diff --git a/kerberosV/src/lib/roken/rtbl.h b/kerberosV/src/lib/roken/rtbl.h deleted file mode 100644 index 4cf95e444fe..00000000000 --- a/kerberosV/src/lib/roken/rtbl.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2000,2004 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: rtbl.h,v 1.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __rtbl_h__ -#define __rtbl_h__ - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -#if !defined(__GNUC__) && !defined(__attribute__) -#define __attribute__(x) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -struct rtbl_data; -typedef struct rtbl_data *rtbl_t; - -#define RTBL_ALIGN_LEFT 0 -#define RTBL_ALIGN_RIGHT 1 - -/* flags */ -#define RTBL_HEADER_STYLE_NONE 1 - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column (rtbl_t, const char*, unsigned int); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column_by_id (rtbl_t, unsigned int, const char*, unsigned int); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column_entryv_by_id (rtbl_t table, unsigned int id, - const char *fmt, ...) - __attribute__ ((format (printf, 3, 0))); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column_entry (rtbl_t, const char*, const char*); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column_entryv (rtbl_t, const char*, const char*, ...) - __attribute__ ((format (printf, 3, 0))); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_add_column_entry_by_id (rtbl_t, unsigned int, const char*); - -ROKEN_LIB_FUNCTION rtbl_t ROKEN_LIB_CALL -rtbl_create (void); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rtbl_destroy (rtbl_t); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_format (rtbl_t, FILE*); - -ROKEN_LIB_FUNCTION unsigned int ROKEN_LIB_CALL -rtbl_get_flags (rtbl_t); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_new_row (rtbl_t); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_set_column_affix_by_id (rtbl_t, unsigned int, const char*, const char*); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_set_column_prefix (rtbl_t, const char*, const char*); - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rtbl_set_flags (rtbl_t, unsigned int); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_set_prefix (rtbl_t, const char*); - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rtbl_set_separator (rtbl_t, const char*); - -#ifdef __cplusplus -} -#endif - -#endif /* __rtbl_h__ */ diff --git a/kerberosV/src/lib/roken/search.hin b/kerberosV/src/lib/roken/search.hin deleted file mode 100644 index f8592c481c3..00000000000 --- a/kerberosV/src/lib/roken/search.hin +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * Written by J.T. Conklin - * Public domain. - * - * $NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $ - */ - -#ifndef _rk_SEARCH_H_ -#define _rk_SEARCH_H_ 1 - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -#ifndef _WIN32 -#include -#endif -#include - -typedef enum { - preorder, - postorder, - endorder, - leaf -} VISIT; - -ROKEN_CPP_START - -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL rk_tdelete(const void *, void **, - int (*)(const void *, const void *)); -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL rk_tfind(const void *, void * const *, - int (*)(const void *, const void *)); -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL rk_tsearch(const void *, void **, int (*)(const void *, const void *)); -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL rk_twalk(const void *, void (*)(const void *, VISIT, int)); - -ROKEN_CPP_END - -#endif /* !_rk_SEARCH_H_ */ diff --git a/kerberosV/src/lib/roken/sendmsg.c b/kerberosV/src/lib/roken/sendmsg.c deleted file mode 100644 index c6853772ad7..00000000000 --- a/kerberosV/src/lib/roken/sendmsg.c +++ /dev/null @@ -1,148 +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 - -#include "roken.h" - -#ifndef _WIN32 - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -sendmsg(rk_socket_t 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; -} - -#else /* _WIN32 */ - -/*********************************************************************** - * Copyright (c) 2009, Secure Endpoints Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - 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. - * - * - Neither the name of Secure Endpoints Inc. 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 COPYRIGHT HOLDERS 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 - * COPYRIGHT HOLDER 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. - * - **********************************************************************/ - -/** - * Implementation of sendmsg() for WIN32 - * - * We are using a contrived definition of msghdr which actually uses - * an array of ::_WSABUF structures instead of ::iovec . This allows - * us to call WSASend directly using the given ::msghdr instead of - * having to allocate another array of ::_WSABUF and copying data for - * each call. - * - * Limitations: - * - * - msg->msg_name is ignored. So is msg->control. - * - WSASend() only supports ::MSG_DONTROUTE, ::MSG_OOB and - * ::MSG_PARTIAL. - * - * @param[in] s The socket to use. - * @param[in] msg The message - * @param[in] flags Flags. A combination of ::MSG_DONTROUTE, - * ::MSG_OOB and ::MSG_PARTIAL - * - * @return The number of bytes sent, on success. Or -1 on error. - */ -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -sendmsg_w32(rk_socket_t s, const struct msghdr * msg, int flags) -{ - int srv; - DWORD num_bytes_sent = 0; - - /* TODO: For _WIN32_WINNT >= 0x0600 we can use WSASendMsg using - WSAMSG which is a much more direct analogue to sendmsg(). */ - - srv = WSASend(s, msg->msg_iov, msg->msg_iovlen, - &num_bytes_sent, flags, NULL, NULL); - - if (srv == 0) - return (int) num_bytes_sent; - - /* srv == SOCKET_ERROR and WSAGetLastError() == WSA_IO_PENDING - indicates that a non-blocking transfer has been scheduled. - We'll have to check for that if we ever support non-blocking - I/O. */ - - return -1; -} - -#endif /* !_WIN32 */ diff --git a/kerberosV/src/lib/roken/setegid.c b/kerberosV/src/lib/roken/setegid.c deleted file mode 100644 index d9aef122ddb..00000000000 --- a/kerberosV/src/lib/roken/setegid.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. - */ - -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -setegid(gid_t egid) -{ -#ifdef HAVE_SETREGID - return setregid(-1, egid); -#endif - -#ifdef HAVE_SETRESGID - return setresgid(-1, egid, -1); -#endif - - return -1; -} diff --git a/kerberosV/src/lib/roken/setenv.c b/kerberosV/src/lib/roken/setenv.c deleted file mode 100644 index b4dbefef26f..00000000000 --- a/kerberosV/src/lib/roken/setenv.c +++ /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. - */ - -#include - -#include "roken.h" - -#include -#include - -/* - * This is the easy way out, use putenv to implement setenv. We might - * leak some memory but that is ok since we are usally about to exec - * anyway. - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -setenv(const char *var, const char *val, int rewrite) -{ -#ifndef _WIN32 - char *t = NULL; - - if (!rewrite && getenv(var) != 0) - return 0; - - if (asprintf (&t, "%s=%s", var, val) < 0 || t == NULL) - return -1; - - if (putenv(t) == 0) - return 0; - else - return -1; -#else /* Win32 */ - char dummy[8]; - - if (!rewrite && GetEnvironmentVariable(var, dummy, sizeof(dummy)/sizeof(char)) != 0) - return 0; - - if (SetEnvironmentVariable(var, val) == 0) - return -1; - else - return 0; -#endif -} diff --git a/kerberosV/src/lib/roken/seteuid.c b/kerberosV/src/lib/roken/seteuid.c deleted file mode 100644 index 2d8c14829e7..00000000000 --- a/kerberosV/src/lib/roken/seteuid.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. - */ - -#include - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -seteuid(uid_t euid) -{ -#ifdef HAVE_SETREUID - return setreuid(-1, euid); -#endif - -#ifdef HAVE_SETRESUID - return setresuid(-1, euid, -1); -#endif - - return -1; -} diff --git a/kerberosV/src/lib/roken/setprogname.c b/kerberosV/src/lib/roken/setprogname.c deleted file mode 100644 index 88a5f9bb449..00000000000 --- a/kerberosV/src/lib/roken/setprogname.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 1995-2004 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 - -#include "roken.h" - -#ifndef HAVE___PROGNAME -extern const char *__progname; -#endif - -#ifndef HAVE_SETPROGNAME - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -setprogname(const char *argv0) -{ - -#ifndef HAVE___PROGNAME - - const char *p; - if(argv0 == NULL) - return; - p = strrchr(argv0, '/'); - -#ifdef BACKSLASH_PATH_DELIM - { - const char * pb; - - pb = strrchr((p != NULL)? p : argv0, '\\'); - if (pb != NULL) - p = pb; - } -#endif - - if(p == NULL) - p = argv0; - else - p++; - -#ifdef _WIN32 - { - char * fn = strdup(p); - char * ext; - - strlwr(fn); - ext = strrchr(fn, '.'); - if (ext != NULL && !strcmp(ext, ".exe")) - *ext = '\0'; - - __progname = fn; - } -#else - - __progname = p; - -#endif - -#endif /* HAVE___PROGNAME */ -} - -#endif /* HAVE_SETPROGNAME */ diff --git a/kerberosV/src/lib/roken/signal.c b/kerberosV/src/lib/roken/signal.c deleted file mode 100644 index 284f1e79261..00000000000 --- a/kerberosV/src/lib/roken/signal.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -#include -#include "roken.h" - -/* - * We would like to always use this signal but there is a link error - * on NEXTSTEP - */ -#if !defined(NeXT) && !defined(__APPLE__) -/* - * Bugs: - * - * Do we need any extra hacks for SIGCLD and/or SIGCHLD? - */ - -ROKEN_LIB_FUNCTION SigAction ROKEN_LIB_CALL -signal(int iSig, SigAction pAction) -{ - struct sigaction saNew, saOld; - - saNew.sa_handler = pAction; - sigemptyset(&saNew.sa_mask); - saNew.sa_flags = 0; - - if (iSig == SIGALRM) - { -#ifdef SA_INTERRUPT - saNew.sa_flags |= SA_INTERRUPT; -#endif - } - else - { -#ifdef SA_RESTART - saNew.sa_flags |= SA_RESTART; -#endif - } - - if (sigaction(iSig, &saNew, &saOld) < 0) - return(SIG_ERR); - - return(saOld.sa_handler); -} -#endif diff --git a/kerberosV/src/lib/roken/simple_exec.c b/kerberosV/src/lib/roken/simple_exec.c deleted file mode 100644 index 97679d7e417..00000000000 --- a/kerberosV/src/lib/roken/simple_exec.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright (c) 1998 - 2001, 2004 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 - -#include -#include -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -#include "roken.h" - -#define EX_NOEXEC 126 -#define EX_NOTFOUND 127 - -/* return values: - SE_E_UNSPECIFIED on `unspecified' system errors - SE_E_FORKFAILED on fork failures - SE_E_WAITPIDFAILED on waitpid errors - SE_E_EXECTIMEOUT exec timeout - 0- is return value from subprocess - SE_E_NOEXEC if the program couldn't be executed - SE_E_NOTFOUND if the program couldn't be found - 128- is 128 + signal that killed subprocess - - possible values `func' can return: - ((time_t)-2) exit loop w/o killing child and return - `exec timeout'/-4 from simple_exec - ((time_t)-1) kill child with SIGTERM and wait for child to exit - 0 don't timeout again - n seconds to next timeout - */ - -static int sig_alarm; - -static RETSIGTYPE -sigtimeout(int sig) -{ - sig_alarm = 1; - SIGRETURN(0); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -wait_for_process_timed(pid_t pid, time_t (*func)(void *), - void *ptr, time_t timeout) -{ - RETSIGTYPE (*old_func)(int sig) = NULL; - unsigned int oldtime = 0; - int ret; - - sig_alarm = 0; - - if (func) { - old_func = signal(SIGALRM, sigtimeout); - oldtime = alarm(timeout); - } - - while(1) { - int status; - - while(waitpid(pid, &status, 0) < 0) { - if (errno != EINTR) { - ret = SE_E_WAITPIDFAILED; - goto out; - } - if (func == NULL) - continue; - if (sig_alarm == 0) - continue; - timeout = (*func)(ptr); - if (timeout == (time_t)-1) { - kill(pid, SIGTERM); - continue; - } else if (timeout == (time_t)-2) { - ret = SE_E_EXECTIMEOUT; - goto out; - } - alarm(timeout); - } - if(WIFSTOPPED(status)) - continue; - if(WIFEXITED(status)) { - ret = WEXITSTATUS(status); - break; - } - if(WIFSIGNALED(status)) { - ret = WTERMSIG(status) + 128; - break; - } - } - out: - if (func) { - signal(SIGALRM, old_func); - alarm(oldtime); - } - return ret; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -wait_for_process(pid_t pid) -{ - return wait_for_process_timed(pid, NULL, NULL, 0); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -pipe_execv(FILE **stdin_fd, FILE **stdout_fd, FILE **stderr_fd, - const char *file, ...) -{ - int in_fd[2], out_fd[2], err_fd[2]; - pid_t pid; - va_list ap; - char **argv; - - if(stdin_fd != NULL) - pipe(in_fd); - if(stdout_fd != NULL) - pipe(out_fd); - if(stderr_fd != NULL) - pipe(err_fd); - pid = fork(); - switch(pid) { - case 0: - va_start(ap, file); - argv = vstrcollect(&ap); - va_end(ap); - if(argv == NULL) - exit(-1); - - /* close pipes we're not interested in */ - if(stdin_fd != NULL) - close(in_fd[1]); - if(stdout_fd != NULL) - close(out_fd[0]); - if(stderr_fd != NULL) - close(err_fd[0]); - - /* pipe everything caller doesn't care about to /dev/null */ - if(stdin_fd == NULL) - in_fd[0] = open(_PATH_DEVNULL, O_RDONLY); - if(stdout_fd == NULL) - out_fd[1] = open(_PATH_DEVNULL, O_WRONLY); - if(stderr_fd == NULL) - err_fd[1] = open(_PATH_DEVNULL, O_WRONLY); - - /* move to proper descriptors */ - if(in_fd[0] != STDIN_FILENO) { - dup2(in_fd[0], STDIN_FILENO); - close(in_fd[0]); - } - if(out_fd[1] != STDOUT_FILENO) { - dup2(out_fd[1], STDOUT_FILENO); - close(out_fd[1]); - } - if(err_fd[1] != STDERR_FILENO) { - dup2(err_fd[1], STDERR_FILENO); - close(err_fd[1]); - } - - closefrom(3); - - execv(file, argv); - exit((errno == ENOENT) ? EX_NOTFOUND : EX_NOEXEC); - case -1: - if(stdin_fd != NULL) { - close(in_fd[0]); - close(in_fd[1]); - } - if(stdout_fd != NULL) { - close(out_fd[0]); - close(out_fd[1]); - } - if(stderr_fd != NULL) { - close(err_fd[0]); - close(err_fd[1]); - } - return SE_E_FORKFAILED; - default: - if(stdin_fd != NULL) { - close(in_fd[0]); - *stdin_fd = fdopen(in_fd[1], "w"); - } - if(stdout_fd != NULL) { - close(out_fd[1]); - *stdout_fd = fdopen(out_fd[0], "r"); - } - if(stderr_fd != NULL) { - close(err_fd[1]); - *stderr_fd = fdopen(err_fd[0], "r"); - } - } - return pid; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execvp_timed(const char *file, char *const args[], - time_t (*func)(void *), void *ptr, time_t timeout) -{ - pid_t pid = fork(); - switch(pid){ - case -1: - return SE_E_FORKFAILED; - case 0: - execvp(file, args); - exit((errno == ENOENT) ? EX_NOTFOUND : EX_NOEXEC); - default: - return wait_for_process_timed(pid, func, ptr, timeout); - } -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execvp(const char *file, char *const args[]) -{ - return simple_execvp_timed(file, args, NULL, NULL, 0); -} - -/* gee, I'd like a execvpe */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execve_timed(const char *file, char *const args[], char *const envp[], - time_t (*func)(void *), void *ptr, time_t timeout) -{ - pid_t pid = fork(); - switch(pid){ - case -1: - return SE_E_FORKFAILED; - case 0: - execve(file, args, envp); - exit((errno == ENOENT) ? EX_NOTFOUND : EX_NOEXEC); - default: - return wait_for_process_timed(pid, func, ptr, timeout); - } -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execve(const char *file, char *const args[], char *const envp[]) -{ - return simple_execve_timed(file, args, envp, NULL, NULL, 0); -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execlp(const char *file, ...) -{ - va_list ap; - char **argv; - int ret; - - va_start(ap, file); - argv = vstrcollect(&ap); - va_end(ap); - if(argv == NULL) - return SE_E_UNSPECIFIED; - ret = simple_execvp(file, argv); - free(argv); - return ret; -} - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -simple_execle(const char *file, ... /* ,char *const envp[] */) -{ - va_list ap; - char **argv; - char *const* envp; - int ret; - - va_start(ap, file); - argv = vstrcollect(&ap); - envp = va_arg(ap, char **); - va_end(ap); - if(argv == NULL) - return SE_E_UNSPECIFIED; - ret = simple_execve(file, argv, envp); - free(argv); - return ret; -} diff --git a/kerberosV/src/lib/roken/snprintf-test.c b/kerberosV/src/lib/roken/snprintf-test.c deleted file mode 100644 index adfcb713f61..00000000000 --- a/kerberosV/src/lib/roken/snprintf-test.c +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (c) 2000 - 2001 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 -#include "roken.h" -#include - -static int -try (const char *format, ...) -{ - int ret; - va_list ap; - char buf1[256], buf2[256]; - - va_start (ap, format); - ret = rk_vsnprintf (buf1, sizeof(buf1), format, ap); - if (ret >= sizeof(buf1)) - errx (1, "increase buf and try again"); - va_end (ap); - va_start (ap, format); - vsprintf (buf2, format, ap); - ret = strcmp (buf1, buf2); - if (ret) - printf ("failed: format = \"%s\", \"%s\" != \"%s\"\n", - format, buf1, buf2); - va_end (ap); - return ret; -} - -static int -cmp_with_sprintf_int (void) -{ - int tot = 0; - int int_values[] = {INT_MIN, -17, -1, 0, 1, 17, 4711, 65535, INT_MAX}; - int i; - - for (i = 0; i < sizeof(int_values) / sizeof(int_values[0]); ++i) { - tot += try ("%d", int_values[i]); - tot += try ("%x", int_values[i]); - tot += try ("%X", int_values[i]); - tot += try ("%o", int_values[i]); - tot += try ("%#x", int_values[i]); - tot += try ("%#X", int_values[i]); - tot += try ("%#o", int_values[i]); - tot += try ("%10d", int_values[i]); - tot += try ("%10x", int_values[i]); - tot += try ("%10X", int_values[i]); - tot += try ("%10o", int_values[i]); - tot += try ("%#10x", int_values[i]); - tot += try ("%#10X", int_values[i]); - tot += try ("%#10o", int_values[i]); - tot += try ("%-10d", int_values[i]); - tot += try ("%-10x", int_values[i]); - tot += try ("%-10X", int_values[i]); - tot += try ("%-10o", int_values[i]); - tot += try ("%-#10x", int_values[i]); - tot += try ("%-#10X", int_values[i]); - tot += try ("%-#10o", int_values[i]); - } - return tot; -} - -static int -cmp_with_sprintf_long (void) -{ - int tot = 0; - long long_values[] = {LONG_MIN, -17, -1, 0, 1, 17, 4711, 65535, LONG_MAX}; - int i; - - for (i = 0; i < sizeof(long_values) / sizeof(long_values[0]); ++i) { - tot += try ("%ld", long_values[i]); - tot += try ("%lx", long_values[i]); - tot += try ("%lX", long_values[i]); - tot += try ("%lo", long_values[i]); - tot += try ("%#lx", long_values[i]); - tot += try ("%#lX", long_values[i]); - tot += try ("%#lo", long_values[i]); - tot += try ("%10ld", long_values[i]); - tot += try ("%10lx", long_values[i]); - tot += try ("%10lX", long_values[i]); - tot += try ("%10lo", long_values[i]); - tot += try ("%#10lx", long_values[i]); - tot += try ("%#10lX", long_values[i]); - tot += try ("%#10lo", long_values[i]); - tot += try ("%-10ld", long_values[i]); - tot += try ("%-10lx", long_values[i]); - tot += try ("%-10lX", long_values[i]); - tot += try ("%-10lo", long_values[i]); - tot += try ("%-#10lx", long_values[i]); - tot += try ("%-#10lX", long_values[i]); - tot += try ("%-#10lo", long_values[i]); - } - return tot; -} - -#ifdef HAVE_LONG_LONG - -/* XXX doesn't work as expected on lp64 platforms with sizeof(long - * long) == sizeof(long) */ - -static int -cmp_with_sprintf_long_long (void) -{ - int tot = 0; - long long long_long_values[] = { - ((long long)LONG_MIN) -1, LONG_MIN, -17, -1, - 0, - 1, 17, 4711, 65535, LONG_MAX, ((long long)LONG_MAX) + 1}; - int i; - - for (i = 0; i < sizeof(long_long_values) / sizeof(long_long_values[0]); ++i) { - tot += try ("%lld", long_long_values[i]); - tot += try ("%llx", long_long_values[i]); - tot += try ("%llX", long_long_values[i]); - tot += try ("%llo", long_long_values[i]); - tot += try ("%#llx", long_long_values[i]); - tot += try ("%#llX", long_long_values[i]); - tot += try ("%#llo", long_long_values[i]); - tot += try ("%10lld", long_long_values[i]); - tot += try ("%10llx", long_long_values[i]); - tot += try ("%10llX", long_long_values[i]); - tot += try ("%10llo", long_long_values[i]); - tot += try ("%#10llx", long_long_values[i]); - tot += try ("%#10llX", long_long_values[i]); - tot += try ("%#10llo", long_long_values[i]); - tot += try ("%-10lld", long_long_values[i]); - tot += try ("%-10llx", long_long_values[i]); - tot += try ("%-10llX", long_long_values[i]); - tot += try ("%-10llo", long_long_values[i]); - tot += try ("%-#10llx", long_long_values[i]); - tot += try ("%-#10llX", long_long_values[i]); - tot += try ("%-#10llo", long_long_values[i]); - } - return tot; -} - -#endif - -#if 0 -static int -cmp_with_sprintf_float (void) -{ - int tot = 0; - double double_values[] = {-99999, -999, -17.4, -4.3, -3.0, -1.5, -1, - 0, 0.1, 0.2342374852, 0.2340007, - 3.1415926, 14.7845, 34.24758, 9999, 9999999}; - int i; - - for (i = 0; i < sizeof(double_values) / sizeof(double_values[0]); ++i) { - tot += try ("%f", double_values[i]); - tot += try ("%10f", double_values[i]); - tot += try ("%.2f", double_values[i]); - tot += try ("%7.0f", double_values[i]); - tot += try ("%5.2f", double_values[i]); - tot += try ("%0f", double_values[i]); - tot += try ("%#f", double_values[i]); - tot += try ("%e", double_values[i]); - tot += try ("%10e", double_values[i]); - tot += try ("%.2e", double_values[i]); - tot += try ("%7.0e", double_values[i]); - tot += try ("%5.2e", double_values[i]); - tot += try ("%0e", double_values[i]); - tot += try ("%#e", double_values[i]); - tot += try ("%E", double_values[i]); - tot += try ("%10E", double_values[i]); - tot += try ("%.2E", double_values[i]); - tot += try ("%7.0E", double_values[i]); - tot += try ("%5.2E", double_values[i]); - tot += try ("%0E", double_values[i]); - tot += try ("%#E", double_values[i]); - tot += try ("%g", double_values[i]); - tot += try ("%10g", double_values[i]); - tot += try ("%.2g", double_values[i]); - tot += try ("%7.0g", double_values[i]); - tot += try ("%5.2g", double_values[i]); - tot += try ("%0g", double_values[i]); - tot += try ("%#g", double_values[i]); - tot += try ("%G", double_values[i]); - tot += try ("%10G", double_values[i]); - tot += try ("%.2G", double_values[i]); - tot += try ("%7.0G", double_values[i]); - tot += try ("%5.2G", double_values[i]); - tot += try ("%0G", double_values[i]); - tot += try ("%#G", double_values[i]); - } - return tot; -} -#endif - -static int -test_null (void) -{ - return rk_snprintf (NULL, 0, "foo") != 3; -} - -static int -test_sizet (void) -{ - int tot = 0; - size_t sizet_values[] = { 0, 1, 2, 200, 4294967295u }; /* SIZE_MAX */ - char *result[] = { "0", "1", "2", "200", "4294967295" }; - int i; - - for (i = 0; i < sizeof(sizet_values) / sizeof(sizet_values[0]); ++i) { -#if 0 - tot += try("%zu", sizet_values[i]); - tot += try("%zx", sizet_values[i]); - tot += try("%zX", sizet_values[i]); -#else - char buf[256]; - rk_snprintf(buf, sizeof(buf), "%zu", sizet_values[i]); - if (strcmp(buf, result[i]) != 0) { - printf("%s != %s", buf, result[i]); - tot++; - } -#endif - } - return tot; -} - - -int -main (int argc, char **argv) -{ - int ret = 0; - - ret += cmp_with_sprintf_int (); - ret += cmp_with_sprintf_long (); -#ifdef HAVE_LONG_LONG - ret += cmp_with_sprintf_long_long (); -#endif - ret += test_null (); - ret += test_sizet (); - return ret; -} diff --git a/kerberosV/src/lib/roken/snprintf.c b/kerberosV/src/lib/roken/snprintf.c deleted file mode 100644 index 88e996c671f..00000000000 --- a/kerberosV/src/lib/roken/snprintf.c +++ /dev/null @@ -1,696 +0,0 @@ -/* - * Copyright (c) 1995-2003 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 -#include -#include -#include -#include -#include -#include "roken.h" -#include - -enum format_flags { - minus_flag = 1, - plus_flag = 2, - space_flag = 4, - alternate_flag = 8, - zero_flag = 16 -}; - -/* - * Common state - */ - -struct snprintf_state { - unsigned char *str; - unsigned char *s; - unsigned char *theend; - size_t sz; - size_t max_sz; - void (*append_char)(struct snprintf_state *, unsigned char); - /* XXX - methods */ -}; - -#if !defined(HAVE_VSNPRINTF) || defined(TEST_SNPRINTF) -static int -sn_reserve (struct snprintf_state *state, size_t n) -{ - return state->s + n > state->theend; -} - -static void -sn_append_char (struct snprintf_state *state, unsigned char c) -{ - if (!sn_reserve (state, 1)) - *state->s++ = c; -} -#endif - -static int -as_reserve (struct snprintf_state *state, size_t n) -{ - if (state->s + n > state->theend) { - int off = state->s - state->str; - unsigned char *tmp; - - if (state->max_sz && state->sz >= state->max_sz) - return 1; - - state->sz = max(state->sz * 2, state->sz + n); - if (state->max_sz) - state->sz = min(state->sz, state->max_sz); - tmp = realloc (state->str, state->sz); - if (tmp == NULL) - return 1; - state->str = tmp; - state->s = state->str + off; - state->theend = state->str + state->sz - 1; - } - return 0; -} - -static void -as_append_char (struct snprintf_state *state, unsigned char c) -{ - if(!as_reserve (state, 1)) - *state->s++ = c; -} - -/* longest integer types */ - -#ifdef HAVE_LONG_LONG -typedef unsigned long long u_longest; -typedef long long longest; -#else -typedef unsigned long u_longest; -typedef long longest; -#endif - - - -static size_t -pad(struct snprintf_state *state, int width, char c) -{ - size_t len = 0; - while(width-- > 0){ - (*state->append_char)(state, c); - ++len; - } - return len; -} - -/* return true if we should use alternatve hex form */ -static int -use_alternative (int flags, u_longest num, unsigned base) -{ - return (flags & alternate_flag) && base == 16 && num != 0; -} - -static int -append_number(struct snprintf_state *state, - u_longest num, unsigned base, const char *rep, - int width, int prec, int flags, int minusp) -{ - int len = 0; - u_longest n = num; - char nstr[64]; /* enough for <192 bit octal integers */ - int nstart, nlen; - char signchar; - - /* given precision, ignore zero flag */ - if(prec != -1) - flags &= ~zero_flag; - else - prec = 1; - - /* format number as string */ - nstart = sizeof(nstr); - nlen = 0; - nstr[--nstart] = '\0'; - do { - assert(nstart > 0); - nstr[--nstart] = rep[n % base]; - ++nlen; - n /= base; - } while(n); - - /* zero value with zero precision should produce no digits */ - if(prec == 0 && num == 0) { - nlen--; - nstart++; - } - - /* figure out what char to use for sign */ - if(minusp) - signchar = '-'; - else if((flags & plus_flag)) - signchar = '+'; - else if((flags & space_flag)) - signchar = ' '; - else - signchar = '\0'; - - if((flags & alternate_flag) && base == 8) { - /* if necessary, increase the precision to - make first digit a zero */ - - /* XXX C99 claims (regarding # and %o) that "if the value and - precision are both 0, a single 0 is printed", but there is - no such wording for %x. This would mean that %#.o would - output "0", but %#.x "". This does not make sense, and is - also not what other printf implementations are doing. */ - - if(prec <= nlen && nstr[nstart] != '0' && nstr[nstart] != '\0') - prec = nlen + 1; - } - - /* possible formats: - pad | sign | alt | zero | digits - sign | alt | zero | digits | pad minus_flag - sign | alt | zero | digits zero_flag */ - - /* if not right justifying or padding with zeros, we need to - compute the length of the rest of the string, and then pad with - spaces */ - if(!(flags & (minus_flag | zero_flag))) { - if(prec > nlen) - width -= prec; - else - width -= nlen; - - if(use_alternative(flags, num, base)) - width -= 2; - - if(signchar != '\0') - width--; - - /* pad to width */ - len += pad(state, width, ' '); - } - if(signchar != '\0') { - (*state->append_char)(state, signchar); - ++len; - } - if(use_alternative(flags, num, base)) { - (*state->append_char)(state, '0'); - (*state->append_char)(state, rep[10] + 23); /* XXX */ - len += 2; - } - if(flags & zero_flag) { - /* pad to width with zeros */ - if(prec - nlen > width - len - nlen) - len += pad(state, prec - nlen, '0'); - else - len += pad(state, width - len - nlen, '0'); - } else - /* pad to prec with zeros */ - len += pad(state, prec - nlen, '0'); - - while(nstr[nstart] != '\0') { - (*state->append_char)(state, nstr[nstart++]); - ++len; - } - - if(flags & minus_flag) - len += pad(state, width - len, ' '); - - return len; -} - -/* - * return length - */ - -static size_t -append_string (struct snprintf_state *state, - const unsigned char *arg, - int width, - int prec, - int flags) -{ - size_t len = 0; - - if(arg == NULL) - arg = (const unsigned char*)"(null)"; - - if(prec != -1) - width -= prec; - else - width -= strlen((const char *)arg); - if(!(flags & minus_flag)) - len += pad(state, width, ' '); - - if (prec != -1) { - while (*arg && prec--) { - (*state->append_char) (state, *arg++); - ++len; - } - } else { - while (*arg) { - (*state->append_char) (state, *arg++); - ++len; - } - } - if(flags & minus_flag) - len += pad(state, width, ' '); - return len; -} - -static int -append_char(struct snprintf_state *state, - unsigned char arg, - int width, - int flags) -{ - int len = 0; - - while(!(flags & minus_flag) && --width > 0) { - (*state->append_char) (state, ' ') ; - ++len; - } - (*state->append_char) (state, arg); - ++len; - while((flags & minus_flag) && --width > 0) { - (*state->append_char) (state, ' '); - ++len; - } - return 0; -} - -/* - * This can't be made into a function... - */ - -#ifdef HAVE_LONG_LONG - -#define PARSE_INT_FORMAT(res, arg, unsig) \ -if (long_long_flag) \ - res = (unsig long long)va_arg(arg, unsig long long); \ -else if (long_flag) \ - res = (unsig long)va_arg(arg, unsig long); \ -else if (size_t_flag) \ - res = (unsig long)va_arg(arg, size_t); \ -else if (short_flag) \ - res = (unsig short)va_arg(arg, unsig int); \ -else \ - res = (unsig int)va_arg(arg, unsig int) - -#else - -#define PARSE_INT_FORMAT(res, arg, unsig) \ -if (long_flag) \ - res = (unsig long)va_arg(arg, unsig long); \ -else if (size_t_flag) \ - res = (unsig long)va_arg(arg, size_t); \ -else if (short_flag) \ - res = (unsig short)va_arg(arg, unsig int); \ -else \ - res = (unsig int)va_arg(arg, unsig int) - -#endif - -/* - * zyxprintf - return length, as snprintf - */ - -static size_t -xyzprintf (struct snprintf_state *state, const char *char_format, va_list ap) -{ - const unsigned char *format = (const unsigned char *)char_format; - unsigned char c; - size_t len = 0; - - while((c = *format++)) { - if (c == '%') { - int flags = 0; - int width = 0; - int prec = -1; - int size_t_flag = 0; - int long_long_flag = 0; - int long_flag = 0; - int short_flag = 0; - - /* flags */ - while((c = *format++)){ - if(c == '-') - flags |= minus_flag; - else if(c == '+') - flags |= plus_flag; - else if(c == ' ') - flags |= space_flag; - else if(c == '#') - flags |= alternate_flag; - else if(c == '0') - flags |= zero_flag; - else if(c == '\'') - ; /* just ignore */ - else - break; - } - - if((flags & space_flag) && (flags & plus_flag)) - flags ^= space_flag; - - if((flags & minus_flag) && (flags & zero_flag)) - flags ^= zero_flag; - - /* width */ - if (isdigit(c)) - do { - width = width * 10 + c - '0'; - c = *format++; - } while(isdigit(c)); - else if(c == '*') { - width = va_arg(ap, int); - c = *format++; - } - - /* precision */ - if (c == '.') { - prec = 0; - c = *format++; - if (isdigit(c)) - do { - prec = prec * 10 + c - '0'; - c = *format++; - } while(isdigit(c)); - else if (c == '*') { - prec = va_arg(ap, int); - c = *format++; - } - } - - /* size */ - - if (c == 'h') { - short_flag = 1; - c = *format++; - } else if (c == 'z') { - size_t_flag = 1; - c = *format++; - } else if (c == 'l') { - long_flag = 1; - c = *format++; - if (c == 'l') { - long_long_flag = 1; - c = *format++; - } - } - - if(c != 'd' && c != 'i') - flags &= ~(plus_flag | space_flag); - - switch (c) { - case 'c' : - append_char(state, va_arg(ap, int), width, flags); - ++len; - break; - case 's' : - len += append_string(state, - va_arg(ap, unsigned char*), - width, - prec, - flags); - break; - case 'd' : - case 'i' : { - longest arg; - u_longest num; - int minusp = 0; - - PARSE_INT_FORMAT(arg, ap, signed); - - if (arg < 0) { - minusp = 1; - num = -arg; - } else - num = arg; - - len += append_number (state, num, 10, "0123456789", - width, prec, flags, minusp); - break; - } - case 'u' : { - u_longest arg; - - PARSE_INT_FORMAT(arg, ap, unsigned); - - len += append_number (state, arg, 10, "0123456789", - width, prec, flags, 0); - break; - } - case 'o' : { - u_longest arg; - - PARSE_INT_FORMAT(arg, ap, unsigned); - - len += append_number (state, arg, 010, "01234567", - width, prec, flags, 0); - break; - } - case 'x' : { - u_longest arg; - - PARSE_INT_FORMAT(arg, ap, unsigned); - - len += append_number (state, arg, 0x10, "0123456789abcdef", - width, prec, flags, 0); - break; - } - case 'X' :{ - u_longest arg; - - PARSE_INT_FORMAT(arg, ap, unsigned); - - len += append_number (state, arg, 0x10, "0123456789ABCDEF", - width, prec, flags, 0); - break; - } - case 'p' : { - u_longest arg = (u_longest)va_arg(ap, void*); - - len += append_number (state, arg, 0x10, "0123456789ABCDEF", - width, prec, flags, 0); - break; - } - case 'n' : { - int *arg = va_arg(ap, int*); - *arg = state->s - state->str; - break; - } - case '\0' : - --format; - /* FALLTHROUGH */ - case '%' : - (*state->append_char)(state, c); - ++len; - break; - default : - (*state->append_char)(state, '%'); - (*state->append_char)(state, c); - len += 2; - break; - } - } else { - (*state->append_char) (state, c); - ++len; - } - } - return len; -} - -#if !defined(HAVE_SNPRINTF) || defined(TEST_SNPRINTF) -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_snprintf (char *str, size_t sz, const char *format, ...) -{ - va_list args; - int ret; - - va_start(args, format); - ret = vsnprintf (str, sz, format, args); - va_end(args); - -#ifdef PARANOIA - { - int ret2; - char *tmp; - - tmp = malloc (sz); - if (tmp == NULL) - abort (); - - va_start(args, format); - ret2 = vsprintf (tmp, format, args); - va_end(args); - if (ret != ret2 || strcmp(str, tmp)) - abort (); - free (tmp); - } -#endif - - return ret; -} -#endif - -#if !defined(HAVE_ASPRINTF) || defined(TEST_SNPRINTF) -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_asprintf (char **ret, const char *format, ...) -{ - va_list args; - int val; - - va_start(args, format); - val = vasprintf (ret, format, args); - va_end(args); - -#ifdef PARANOIA - { - int ret2; - char *tmp; - tmp = malloc (val + 1); - if (tmp == NULL) - abort (); - - va_start(args, format); - ret2 = vsprintf (tmp, format, args); - va_end(args); - if (val != ret2 || strcmp(*ret, tmp)) - abort (); - free (tmp); - } -#endif - - return val; -} -#endif - -#if !defined(HAVE_ASNPRINTF) || defined(TEST_SNPRINTF) -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_asnprintf (char **ret, size_t max_sz, const char *format, ...) -{ - va_list args; - int val; - - va_start(args, format); - val = vasnprintf (ret, max_sz, format, args); - -#ifdef PARANOIA - { - int ret2; - char *tmp; - tmp = malloc (val + 1); - if (tmp == NULL) - abort (); - - ret2 = vsprintf (tmp, format, args); - if (val != ret2 || strcmp(*ret, tmp)) - abort (); - free (tmp); - } -#endif - - va_end(args); - return val; -} -#endif - -#if !defined(HAVE_VASPRINTF) || defined(TEST_SNPRINTF) -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_vasprintf (char **ret, const char *format, va_list args) -{ - return vasnprintf (ret, 0, format, args); -} -#endif - - -#if !defined(HAVE_VASNPRINTF) || defined(TEST_SNPRINTF) -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_vasnprintf (char **ret, size_t max_sz, const char *format, va_list args) -{ - size_t st; - struct snprintf_state state; - - state.max_sz = max_sz; - state.sz = 1; - state.str = malloc(state.sz); - if (state.str == NULL) { - *ret = NULL; - return -1; - } - state.s = state.str; - state.theend = state.s + state.sz - 1; - state.append_char = as_append_char; - - st = xyzprintf (&state, format, args); - if (st > state.sz) { - free (state.str); - *ret = NULL; - return -1; - } else { - char *tmp; - - *state.s = '\0'; - tmp = realloc (state.str, st+1); - if (tmp == NULL) { - free (state.str); - *ret = NULL; - return -1; - } - *ret = tmp; - return st; - } -} -#endif - -#if !defined(HAVE_VSNPRINTF) || defined(TEST_SNPRINTF) -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_vsnprintf (char *str, size_t sz, const char *format, va_list args) -{ - struct snprintf_state state; - int ret; - unsigned char *ustr = (unsigned char *)str; - - state.max_sz = 0; - state.sz = sz; - state.str = ustr; - state.s = ustr; - state.theend = ustr + sz - (sz > 0); - state.append_char = sn_append_char; - - ret = xyzprintf (&state, format, args); - if (state.s != NULL && sz != 0) - *state.s = '\0'; - return ret; -} -#endif diff --git a/kerberosV/src/lib/roken/socket.c b/kerberosV/src/lib/roken/socket.c deleted file mode 100644 index 017d6252ea1..00000000000 --- a/kerberosV/src/lib/roken/socket.c +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright (c) 1999 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -#include "roken.h" -#include - -/* - * Set `sa' to the unitialized address of address family `af' - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_any (struct sockaddr *sa, int af) -{ - switch (af) { - case AF_INET : { - struct sockaddr_in *sin4 = (struct sockaddr_in *)sa; - - memset (sin4, 0, sizeof(*sin4)); - sin4->sin_family = AF_INET; - sin4->sin_port = 0; - sin4->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') - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_address_and_port (struct sockaddr *sa, const void *ptr, int port) -{ - switch (sa->sa_family) { - case AF_INET : { - struct sockaddr_in *sin4 = (struct sockaddr_in *)sa; - - memset (sin4, 0, sizeof(*sin4)); - sin4->sin_family = AF_INET; - sin4->sin_port = port; - memcpy (&sin4->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' - */ - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -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 : - return 0; - } -} - -/* - * Return the size of a `struct sockaddr' in `sa'. - */ - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -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: - return 0; - } -} - -/* - * Return the binary address of `sa'. - */ - -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL -socket_get_address (const struct sockaddr *sa) -{ - switch (sa->sa_family) { - case AF_INET : { - const struct sockaddr_in *sin4 = (const struct sockaddr_in *)sa; - return rk_UNCONST(&sin4->sin_addr); - } -#ifdef HAVE_IPV6 - case AF_INET6 : { - const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; - return rk_UNCONST(&sin6->sin6_addr); - } -#endif - default: - return NULL; - } -} - -/* - * Return the port number from `sa'. - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -socket_get_port (const struct sockaddr *sa) -{ - switch (sa->sa_family) { - case AF_INET : { - const struct sockaddr_in *sin4 = (const struct sockaddr_in *)sa; - return sin4->sin_port; - } -#ifdef HAVE_IPV6 - case AF_INET6 : { - const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; - return sin6->sin6_port; - } -#endif - default : - return 0; - } -} - -/* - * Set the port in `sa' to `port'. - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_port (struct sockaddr *sa, int port) -{ - switch (sa->sa_family) { - case AF_INET : { - struct sockaddr_in *sin4 = (struct sockaddr_in *)sa; - sin4->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; - } -} - -/* - * Set the range of ports to use when binding with port = 0. - */ -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_portrange (rk_socket_t sock, int restr, int af) -{ -#if defined(IP_PORTRANGE) - if (af == AF_INET) { - int on = restr ? IP_PORTRANGE_HIGH : IP_PORTRANGE_DEFAULT; - setsockopt (sock, IPPROTO_IP, IP_PORTRANGE, &on, sizeof(on)); - } -#endif -#if defined(IPV6_PORTRANGE) - if (af == AF_INET6) { - int on = restr ? IPV6_PORTRANGE_HIGH : IPV6_PORTRANGE_DEFAULT; - setsockopt (sock, IPPROTO_IPV6, IPV6_PORTRANGE, &on, sizeof(on)); - } -#endif -} - -/* - * Enable debug on `sock'. - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_debug (rk_socket_t sock) -{ -#if defined(SO_DEBUG) && defined(HAVE_SETSOCKOPT) - int on = 1; - setsockopt (sock, SOL_SOCKET, SO_DEBUG, (void *) &on, sizeof (on)); -#endif -} - -/* - * Set the type-of-service of `sock' to `tos'. - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_tos (rk_socket_t sock, int tos) -{ -#if defined(IP_TOS) && defined(HAVE_SETSOCKOPT) - setsockopt (sock, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(int)); -#endif -} - -/* - * set the reuse of addresses on `sock' to `val'. - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_reuseaddr (rk_socket_t sock, int val) -{ -#if defined(SO_REUSEADDR) && defined(HAVE_SETSOCKOPT) - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&val, sizeof(val)); -#endif -} - -/* - * Set the that the `sock' should bind to only IPv6 addresses. - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -socket_set_ipv6only (rk_socket_t sock, int val) -{ -#if defined(IPV6_V6ONLY) && defined(HAVE_SETSOCKOPT) - setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&val, sizeof(val)); -#endif -} - -/** - * Create a file descriptor from a socket - * - * While the socket handle in \a sock can be used with WinSock - * functions after calling socket_to_fd(), it should not be closed - * with rk_closesocket(). The socket will be closed when the associated - * file descriptor is closed. - */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -socket_to_fd(rk_socket_t sock, int flags) -{ -#ifndef _WIN32 - return sock; -#else - return _open_osfhandle((intptr_t) sock, flags); -#endif -} - -#ifdef HAVE_WINSOCK -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_SOCK_IOCTL(SOCKET s, long cmd, int * argp) { - u_long ul = (argp)? *argp : 0; - int rv; - - rv = ioctlsocket(s, cmd, &ul); - if (argp) - *argp = (int) ul; - return rv; -} -#endif - -#ifndef HEIMDAL_SMALLER -#undef socket - -int rk_socket(int, int, int); - -int -rk_socket(int domain, int type, int protocol) -{ - int s; - s = socket (domain, type, protocol); -#ifdef SOCK_CLOEXEC - if ((SOCK_CLOEXEC & type) && s < 0 && errno == EINVAL) { - type &= ~SOCK_CLOEXEC; - s = socket (domain, type, protocol); - } -#endif - return s; -} - -#endif /* HEIMDAL_SMALLER */ diff --git a/kerberosV/src/lib/roken/socket_wrapper.c b/kerberosV/src/lib/roken/socket_wrapper.c deleted file mode 100644 index 94389494b19..00000000000 --- a/kerberosV/src/lib/roken/socket_wrapper.c +++ /dev/null @@ -1,1911 +0,0 @@ -/* - * Copyright (C) Jelmer Vernooij 2005 - * Copyright (C) Stefan Metzmacher 2006 - * - * 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 author 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 AUTHOR 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 AUTHOR 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. - * - */ - -/* - Socket wrapper library. Passes all socket communication over - unix domain sockets if the environment variable SOCKET_WRAPPER_DIR - is set. -*/ - -#define SOCKET_WRAPPER_NOT_REPLACE - -#ifdef _SAMBA_BUILD_ - -#include "includes.h" -#include "system/network.h" -#include "system/filesys.h" - -#ifdef malloc -#undef malloc -#endif -#ifdef calloc -#undef calloc -#endif -#ifdef strdup -#undef strdup -#endif - -#else /* _SAMBA_BUILD_ */ - -#include -#undef SOCKET_WRAPPER_REPLACE - -#include -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#include -#include -#include -#ifdef HAVE_SYS_FILIO_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "roken.h" - -#include "socket_wrapper.h" - -#define HAVE_GETTIMEOFDAY_TZ 1 - -#define _PUBLIC_ - -#endif - -#define SWRAP_DLIST_ADD(list,item) do { \ - if (!(list)) { \ - (item)->prev = NULL; \ - (item)->next = NULL; \ - (list) = (item); \ - } else { \ - (item)->prev = NULL; \ - (item)->next = (list); \ - (list)->prev = (item); \ - (list) = (item); \ - } \ -} while (0) - -#define SWRAP_DLIST_REMOVE(list,item) do { \ - if ((list) == (item)) { \ - (list) = (item)->next; \ - if (list) { \ - (list)->prev = NULL; \ - } \ - } else { \ - if ((item)->prev) { \ - (item)->prev->next = (item)->next; \ - } \ - if ((item)->next) { \ - (item)->next->prev = (item)->prev; \ - } \ - } \ - (item)->prev = NULL; \ - (item)->next = NULL; \ -} while (0) - -/* LD_PRELOAD doesn't work yet, so REWRITE_CALLS is all we support - * for now */ -#define REWRITE_CALLS - -#ifdef REWRITE_CALLS -#define real_accept accept -#define real_connect connect -#define real_bind bind -#define real_listen listen -#define real_getpeername getpeername -#define real_getsockname getsockname -#define real_getsockopt getsockopt -#define real_setsockopt setsockopt -#define real_recvfrom recvfrom -#define real_sendto sendto -#define real_ioctl ioctl -#define real_recv recv -#define real_send send -#define real_socket socket -#define real_close close -#define real_dup dup -#define real_dup2 dup2 -#endif - -#ifdef HAVE_GETTIMEOFDAY_TZ -#define swrapGetTimeOfDay(tval) gettimeofday(tval,NULL) -#else -#define swrapGetTimeOfDay(tval) gettimeofday(tval) -#endif - -/* we need to use a very terse format here as IRIX 6.4 silently - truncates names to 16 chars, so if we use a longer name then we - can't tell which port a packet came from with recvfrom() - - with this format we have 8 chars left for the directory name -*/ -#define SOCKET_FORMAT "%c%02X%04X" -#define SOCKET_TYPE_CHAR_TCP 'T' -#define SOCKET_TYPE_CHAR_UDP 'U' -#define SOCKET_TYPE_CHAR_TCP_V6 'X' -#define SOCKET_TYPE_CHAR_UDP_V6 'Y' - -#define MAX_WRAPPED_INTERFACES 16 - -#define SW_IPV6_ADDRESS 1 - -static struct sockaddr *sockaddr_dup(const void *data, socklen_t len) -{ - struct sockaddr *ret = (struct sockaddr *)malloc(len); - memcpy(ret, data, len); - return ret; -} - -static void set_port(int family, int prt, struct sockaddr *addr) -{ - switch (family) { - case AF_INET: - ((struct sockaddr_in *)addr)->sin_port = htons(prt); - break; -#ifdef HAVE_IPV6 - case AF_INET6: - ((struct sockaddr_in6 *)addr)->sin6_port = htons(prt); - break; -#endif - } -} - -static int socket_length(int family) -{ - switch (family) { - case AF_INET: - return sizeof(struct sockaddr_in); -#ifdef HAVE_IPV6 - case AF_INET6: - return sizeof(struct sockaddr_in6); -#endif - } - return -1; -} - - - -struct socket_info -{ - int fd; - - int family; - int type; - int protocol; - int bound; - int bcast; - int is_server; - - char *path; - char *tmp_path; - - struct sockaddr *myname; - socklen_t myname_len; - - struct sockaddr *peername; - socklen_t peername_len; - - struct { - unsigned long pck_snd; - unsigned long pck_rcv; - } io; - - struct socket_info *prev, *next; -}; - -static struct socket_info *sockets; - - -static const char *socket_wrapper_dir(void) -{ - const char *s = getenv("SOCKET_WRAPPER_DIR"); - if (s == NULL) { - return NULL; - } - if (strncmp(s, "./", 2) == 0) { - s += 2; - } - return s; -} - -static unsigned int socket_wrapper_default_iface(void) -{ - const char *s = getenv("SOCKET_WRAPPER_DEFAULT_IFACE"); - if (s) { - unsigned int iface; - if (sscanf(s, "%u", &iface) == 1) { - if (iface >= 1 && iface <= MAX_WRAPPED_INTERFACES) { - return iface; - } - } - } - - return 1;/* 127.0.0.1 */ -} - -static int convert_un_in(const struct sockaddr_un *un, struct sockaddr *in, socklen_t *len) -{ - unsigned int iface; - unsigned int prt; - const char *p; - char type; - - p = strrchr(un->sun_path, '/'); - if (p) p++; else p = un->sun_path; - - if (sscanf(p, SOCKET_FORMAT, &type, &iface, &prt) != 3) { - errno = EINVAL; - return -1; - } - - if (iface == 0 || iface > MAX_WRAPPED_INTERFACES) { - errno = EINVAL; - return -1; - } - - if (prt > 0xFFFF) { - errno = EINVAL; - return -1; - } - - switch(type) { - case SOCKET_TYPE_CHAR_TCP: - case SOCKET_TYPE_CHAR_UDP: { - struct sockaddr_in *in2 = (struct sockaddr_in *)in; - - if ((*len) < sizeof(*in2)) { - errno = EINVAL; - return -1; - } - - memset(in2, 0, sizeof(*in2)); - in2->sin_family = AF_INET; - in2->sin_addr.s_addr = htonl((127<<24) | iface); - in2->sin_port = htons(prt); - - *len = sizeof(*in2); - break; - } -#ifdef HAVE_IPV6 - case SOCKET_TYPE_CHAR_TCP_V6: - case SOCKET_TYPE_CHAR_UDP_V6: { - struct sockaddr_in6 *in2 = (struct sockaddr_in6 *)in; - - if ((*len) < sizeof(*in2)) { - errno = EINVAL; - return -1; - } - - memset(in2, 0, sizeof(*in2)); - in2->sin6_family = AF_INET6; - in2->sin6_addr.s6_addr[0] = SW_IPV6_ADDRESS; - in2->sin6_port = htons(prt); - - *len = sizeof(*in2); - break; - } -#endif - default: - errno = EINVAL; - return -1; - } - - return 0; -} - -static int convert_in_un_remote(struct socket_info *si, const struct sockaddr *inaddr, struct sockaddr_un *un, - int *bcast) -{ - char type = '\0'; - unsigned int prt; - unsigned int iface; - int is_bcast = 0; - - if (bcast) *bcast = 0; - - switch (si->family) { - case AF_INET: { - const struct sockaddr_in *in = - (const struct sockaddr_in *)inaddr; - unsigned int addr = ntohl(in->sin_addr.s_addr); - char u_type = '\0'; - char b_type = '\0'; - char a_type = '\0'; - - switch (si->type) { - case SOCK_STREAM: - u_type = SOCKET_TYPE_CHAR_TCP; - break; - case SOCK_DGRAM: - u_type = SOCKET_TYPE_CHAR_UDP; - a_type = SOCKET_TYPE_CHAR_UDP; - b_type = SOCKET_TYPE_CHAR_UDP; - break; - } - - prt = ntohs(in->sin_port); - if (a_type && addr == 0xFFFFFFFF) { - /* 255.255.255.255 only udp */ - is_bcast = 2; - type = a_type; - iface = socket_wrapper_default_iface(); - } else if (b_type && addr == 0x7FFFFFFF) { - /* 127.255.255.255 only udp */ - is_bcast = 1; - type = b_type; - iface = socket_wrapper_default_iface(); - } else if ((addr & 0xFFFFFF00) == 0x7F000000) { - /* 127.0.0.X */ - is_bcast = 0; - type = u_type; - iface = (addr & 0x000000FF); - } else { - errno = ENETUNREACH; - return -1; - } - if (bcast) *bcast = is_bcast; - break; - } -#ifdef HAVE_IPV6 - case AF_INET6: { - const struct sockaddr_in6 *in = - (const struct sockaddr_in6 *)inaddr; - - switch (si->type) { - case SOCK_STREAM: - type = SOCKET_TYPE_CHAR_TCP_V6; - break; - case SOCK_DGRAM: - type = SOCKET_TYPE_CHAR_UDP_V6; - break; - } - - /* XXX no multicast/broadcast */ - - prt = ntohs(in->sin6_port); - iface = SW_IPV6_ADDRESS; - - break; - } -#endif - default: - errno = ENETUNREACH; - return -1; - } - - if (prt == 0) { - errno = EINVAL; - return -1; - } - - if (is_bcast) { - snprintf(un->sun_path, sizeof(un->sun_path), "%s/EINVAL", - socket_wrapper_dir()); - /* the caller need to do more processing */ - return 0; - } - - snprintf(un->sun_path, sizeof(un->sun_path), "%s/"SOCKET_FORMAT, - socket_wrapper_dir(), type, iface, prt); - - return 0; -} - -static int convert_in_un_alloc(struct socket_info *si, const struct sockaddr *inaddr, struct sockaddr_un *un, - int *bcast) -{ - char type = '\0'; - unsigned int prt; - unsigned int iface; - struct stat st; - int is_bcast = 0; - - if (bcast) *bcast = 0; - - switch (si->family) { - case AF_INET: { - const struct sockaddr_in *in = - (const struct sockaddr_in *)inaddr; - unsigned int addr = ntohl(in->sin_addr.s_addr); - char u_type = '\0'; - char d_type = '\0'; - char b_type = '\0'; - char a_type = '\0'; - - prt = ntohs(in->sin_port); - - switch (si->type) { - case SOCK_STREAM: - u_type = SOCKET_TYPE_CHAR_TCP; - d_type = SOCKET_TYPE_CHAR_TCP; - break; - case SOCK_DGRAM: - u_type = SOCKET_TYPE_CHAR_UDP; - d_type = SOCKET_TYPE_CHAR_UDP; - a_type = SOCKET_TYPE_CHAR_UDP; - b_type = SOCKET_TYPE_CHAR_UDP; - break; - } - - if (addr == 0) { - /* 0.0.0.0 */ - is_bcast = 0; - type = d_type; - iface = socket_wrapper_default_iface(); - } else if (a_type && addr == 0xFFFFFFFF) { - /* 255.255.255.255 only udp */ - is_bcast = 2; - type = a_type; - iface = socket_wrapper_default_iface(); - } else if (b_type && addr == 0x7FFFFFFF) { - /* 127.255.255.255 only udp */ - is_bcast = 1; - type = b_type; - iface = socket_wrapper_default_iface(); - } else if ((addr & 0xFFFFFF00) == 0x7F000000) { - /* 127.0.0.X */ - is_bcast = 0; - type = u_type; - iface = (addr & 0x000000FF); - } else { - errno = EADDRNOTAVAIL; - return -1; - } - break; - } -#ifdef HAVE_IPV6 - case AF_INET6: { - const struct sockaddr_in6 *in = - (const struct sockaddr_in6 *)inaddr; - - switch (si->type) { - case SOCK_STREAM: - type = SOCKET_TYPE_CHAR_TCP_V6; - break; - case SOCK_DGRAM: - type = SOCKET_TYPE_CHAR_UDP_V6; - break; - } - - /* XXX no multicast/broadcast */ - - prt = ntohs(in->sin6_port); - iface = SW_IPV6_ADDRESS; - - break; - } -#endif - default: - errno = ENETUNREACH; - return -1; - } - - - if (bcast) *bcast = is_bcast; - - if (prt == 0) { - /* handle auto-allocation of ephemeral ports */ - for (prt = 5001; prt < 10000; prt++) { - snprintf(un->sun_path, sizeof(un->sun_path), "%s/"SOCKET_FORMAT, - socket_wrapper_dir(), type, iface, prt); - if (stat(un->sun_path, &st) == 0) continue; - - set_port(si->family, prt, si->myname); - } - } - - snprintf(un->sun_path, sizeof(un->sun_path), "%s/"SOCKET_FORMAT, - socket_wrapper_dir(), type, iface, prt); - return 0; -} - -static struct socket_info *find_socket_info(int fd) -{ - struct socket_info *i; - for (i = sockets; i; i = i->next) { - if (i->fd == fd) - return i; - } - - return NULL; -} - -static int sockaddr_convert_to_un(struct socket_info *si, const struct sockaddr *in_addr, socklen_t in_len, - struct sockaddr_un *out_addr, int alloc_sock, int *bcast) -{ - if (!out_addr) - return 0; - - out_addr->sun_family = AF_UNIX; - - switch (in_addr->sa_family) { - case AF_INET: -#ifdef HAVE_IPV6 - case AF_INET6: -#endif - switch (si->type) { - case SOCK_STREAM: - case SOCK_DGRAM: - break; - default: - errno = ESOCKTNOSUPPORT; - return -1; - } - if (alloc_sock) { - return convert_in_un_alloc(si, in_addr, out_addr, bcast); - } else { - return convert_in_un_remote(si, in_addr, out_addr, bcast); - } - default: - break; - } - - errno = EAFNOSUPPORT; - return -1; -} - -static int sockaddr_convert_from_un(const struct socket_info *si, - const struct sockaddr_un *in_addr, - socklen_t un_addrlen, - int family, - struct sockaddr *out_addr, - socklen_t *out_addrlen) -{ - if (out_addr == NULL || out_addrlen == NULL) - return 0; - - if (un_addrlen == 0) { - *out_addrlen = 0; - return 0; - } - - switch (family) { - case AF_INET: -#ifdef HAVE_IPV6 - case AF_INET6: -#endif - switch (si->type) { - case SOCK_STREAM: - case SOCK_DGRAM: - break; - default: - errno = ESOCKTNOSUPPORT; - return -1; - } - return convert_un_in(in_addr, out_addr, out_addrlen); - default: - break; - } - - errno = EAFNOSUPPORT; - return -1; -} - -enum swrap_packet_type { - SWRAP_CONNECT_SEND, - SWRAP_CONNECT_UNREACH, - SWRAP_CONNECT_RECV, - SWRAP_CONNECT_ACK, - SWRAP_ACCEPT_SEND, - SWRAP_ACCEPT_RECV, - SWRAP_ACCEPT_ACK, - SWRAP_RECVFROM, - SWRAP_SENDTO, - SWRAP_SENDTO_UNREACH, - SWRAP_PENDING_RST, - SWRAP_RECV, - SWRAP_RECV_RST, - SWRAP_SEND, - SWRAP_SEND_RST, - SWRAP_CLOSE_SEND, - SWRAP_CLOSE_RECV, - SWRAP_CLOSE_ACK -}; - -struct swrap_file_hdr { - unsigned long magic; - unsigned short version_major; - unsigned short version_minor; - long timezone; - unsigned long sigfigs; - unsigned long frame_max_len; -#define SWRAP_FRAME_LENGTH_MAX 0xFFFF - unsigned long link_type; -}; -#define SWRAP_FILE_HDR_SIZE 24 - -struct swrap_packet { - struct { - unsigned long seconds; - unsigned long micro_seconds; - unsigned long recorded_length; - unsigned long full_length; - } frame; -#define SWRAP_PACKET__FRAME_SIZE 16 - - struct { - struct { - unsigned char ver_hdrlen; - unsigned char tos; - unsigned short packet_length; - unsigned short identification; - unsigned char flags; - unsigned char fragment; - unsigned char ttl; - unsigned char protocol; - unsigned short hdr_checksum; - unsigned long src_addr; - unsigned long dest_addr; - } hdr; -#define SWRAP_PACKET__IP_HDR_SIZE 20 - - union { - struct { - unsigned short source_port; - unsigned short dest_port; - unsigned long seq_num; - unsigned long ack_num; - unsigned char hdr_length; - unsigned char control; - unsigned short window; - unsigned short checksum; - unsigned short urg; - } tcp; -#define SWRAP_PACKET__IP_P_TCP_SIZE 20 - struct { - unsigned short source_port; - unsigned short dest_port; - unsigned short length; - unsigned short checksum; - } udp; -#define SWRAP_PACKET__IP_P_UDP_SIZE 8 - struct { - unsigned char type; - unsigned char code; - unsigned short checksum; - unsigned long unused; - } icmp; -#define SWRAP_PACKET__IP_P_ICMP_SIZE 8 - } p; - } ip; -}; -#define SWRAP_PACKET_SIZE 56 - -static const char *socket_wrapper_pcap_file(void) -{ - static int initialized = 0; - static const char *s = NULL; - static const struct swrap_file_hdr h; - static const struct swrap_packet p; - - if (initialized == 1) { - return s; - } - initialized = 1; - - /* - * TODO: don't use the structs use plain buffer offsets - * and PUSH_U8(), PUSH_U16() and PUSH_U32() - * - * for now make sure we disable PCAP support - * if the struct has alignment! - */ - if (sizeof(h) != SWRAP_FILE_HDR_SIZE) { - return NULL; - } - if (sizeof(p) != SWRAP_PACKET_SIZE) { - return NULL; - } - if (sizeof(p.frame) != SWRAP_PACKET__FRAME_SIZE) { - return NULL; - } - if (sizeof(p.ip.hdr) != SWRAP_PACKET__IP_HDR_SIZE) { - return NULL; - } - if (sizeof(p.ip.p.tcp) != SWRAP_PACKET__IP_P_TCP_SIZE) { - return NULL; - } - if (sizeof(p.ip.p.udp) != SWRAP_PACKET__IP_P_UDP_SIZE) { - return NULL; - } - if (sizeof(p.ip.p.icmp) != SWRAP_PACKET__IP_P_ICMP_SIZE) { - return NULL; - } - - s = getenv("SOCKET_WRAPPER_PCAP_FILE"); - if (s == NULL) { - return NULL; - } - if (strncmp(s, "./", 2) == 0) { - s += 2; - } - return s; -} - -static struct swrap_packet *swrap_packet_init(struct timeval *tval, - const struct sockaddr_in *src_addr, - const struct sockaddr_in *dest_addr, - int socket_type, - const unsigned char *payload, - size_t payload_len, - unsigned long tcp_seq, - unsigned long tcp_ack, - unsigned char tcp_ctl, - int unreachable, - size_t *_packet_len) -{ - struct swrap_packet *ret; - struct swrap_packet *packet; - size_t packet_len; - size_t alloc_len; - size_t nonwire_len = sizeof(packet->frame); - size_t wire_hdr_len = 0; - size_t wire_len = 0; - size_t icmp_hdr_len = 0; - size_t icmp_truncate_len = 0; - unsigned char protocol = 0, icmp_protocol = 0; - unsigned short src_port = src_addr->sin_port; - unsigned short dest_port = dest_addr->sin_port; - - switch (socket_type) { - case SOCK_STREAM: - protocol = 0x06; /* TCP */ - wire_hdr_len = sizeof(packet->ip.hdr) + sizeof(packet->ip.p.tcp); - wire_len = wire_hdr_len + payload_len; - break; - - case SOCK_DGRAM: - protocol = 0x11; /* UDP */ - wire_hdr_len = sizeof(packet->ip.hdr) + sizeof(packet->ip.p.udp); - wire_len = wire_hdr_len + payload_len; - break; - } - - if (unreachable) { - icmp_protocol = protocol; - protocol = 0x01; /* ICMP */ - if (wire_len > 64 ) { - icmp_truncate_len = wire_len - 64; - } - icmp_hdr_len = sizeof(packet->ip.hdr) + sizeof(packet->ip.p.icmp); - wire_hdr_len += icmp_hdr_len; - wire_len += icmp_hdr_len; - } - - packet_len = nonwire_len + wire_len; - alloc_len = packet_len; - if (alloc_len < sizeof(struct swrap_packet)) { - alloc_len = sizeof(struct swrap_packet); - } - ret = (struct swrap_packet *)malloc(alloc_len); - if (!ret) return NULL; - - packet = ret; - - packet->frame.seconds = tval->tv_sec; - packet->frame.micro_seconds = tval->tv_usec; - packet->frame.recorded_length = wire_len - icmp_truncate_len; - packet->frame.full_length = wire_len - icmp_truncate_len; - - packet->ip.hdr.ver_hdrlen = 0x45; /* version 4 and 5 * 32 bit words */ - packet->ip.hdr.tos = 0x00; - packet->ip.hdr.packet_length = htons(wire_len - icmp_truncate_len); - packet->ip.hdr.identification = htons(0xFFFF); - packet->ip.hdr.flags = 0x40; /* BIT 1 set - means don't fraqment */ - packet->ip.hdr.fragment = htons(0x0000); - packet->ip.hdr.ttl = 0xFF; - packet->ip.hdr.protocol = protocol; - packet->ip.hdr.hdr_checksum = htons(0x0000); - packet->ip.hdr.src_addr = src_addr->sin_addr.s_addr; - packet->ip.hdr.dest_addr = dest_addr->sin_addr.s_addr; - - if (unreachable) { - packet->ip.p.icmp.type = 0x03; /* destination unreachable */ - packet->ip.p.icmp.code = 0x01; /* host unreachable */ - packet->ip.p.icmp.checksum = htons(0x0000); - packet->ip.p.icmp.unused = htonl(0x00000000); - - /* set the ip header in the ICMP payload */ - packet = (struct swrap_packet *)(((unsigned char *)ret) + icmp_hdr_len); - packet->ip.hdr.ver_hdrlen = 0x45; /* version 4 and 5 * 32 bit words */ - packet->ip.hdr.tos = 0x00; - packet->ip.hdr.packet_length = htons(wire_len - icmp_hdr_len); - packet->ip.hdr.identification = htons(0xFFFF); - packet->ip.hdr.flags = 0x40; /* BIT 1 set - means don't fraqment */ - packet->ip.hdr.fragment = htons(0x0000); - packet->ip.hdr.ttl = 0xFF; - packet->ip.hdr.protocol = icmp_protocol; - packet->ip.hdr.hdr_checksum = htons(0x0000); - packet->ip.hdr.src_addr = dest_addr->sin_addr.s_addr; - packet->ip.hdr.dest_addr = src_addr->sin_addr.s_addr; - - src_port = dest_addr->sin_port; - dest_port = src_addr->sin_port; - } - - switch (socket_type) { - case SOCK_STREAM: - packet->ip.p.tcp.source_port = src_port; - packet->ip.p.tcp.dest_port = dest_port; - packet->ip.p.tcp.seq_num = htonl(tcp_seq); - packet->ip.p.tcp.ack_num = htonl(tcp_ack); - packet->ip.p.tcp.hdr_length = 0x50; /* 5 * 32 bit words */ - packet->ip.p.tcp.control = tcp_ctl; - packet->ip.p.tcp.window = htons(0x7FFF); - packet->ip.p.tcp.checksum = htons(0x0000); - packet->ip.p.tcp.urg = htons(0x0000); - - break; - - case SOCK_DGRAM: - packet->ip.p.udp.source_port = src_addr->sin_port; - packet->ip.p.udp.dest_port = dest_addr->sin_port; - packet->ip.p.udp.length = htons(8 + payload_len); - packet->ip.p.udp.checksum = htons(0x0000); - - break; - } - - if (payload && payload_len > 0) { - unsigned char *p = (unsigned char *)ret; - p += nonwire_len; - p += wire_hdr_len; - memcpy(p, payload, payload_len); - } - - *_packet_len = packet_len - icmp_truncate_len; - return ret; -} - -static int swrap_get_pcap_fd(const char *fname) -{ - static int fd = -1; - - if (fd != -1) return fd; - - fd = open(fname, O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0644); - if (fd != -1) { - struct swrap_file_hdr file_hdr; - file_hdr.magic = 0xA1B2C3D4; - file_hdr.version_major = 0x0002; - file_hdr.version_minor = 0x0004; - file_hdr.timezone = 0x00000000; - file_hdr.sigfigs = 0x00000000; - file_hdr.frame_max_len = SWRAP_FRAME_LENGTH_MAX; - file_hdr.link_type = 0x0065; /* 101 RAW IP */ - - write(fd, &file_hdr, sizeof(file_hdr)); - return fd; - } - - fd = open(fname, O_WRONLY|O_APPEND, 0644); - - return fd; -} - -static void swrap_dump_packet(struct socket_info *si, const struct sockaddr *addr, - enum swrap_packet_type type, - const void *buf, size_t len) -{ - const struct sockaddr_in *src_addr; - const struct sockaddr_in *dest_addr; - const char *file_name; - unsigned long tcp_seq = 0; - unsigned long tcp_ack = 0; - unsigned char tcp_ctl = 0; - int unreachable = 0; - struct timeval tv; - struct swrap_packet *packet; - size_t packet_len = 0; - int fd; - - file_name = socket_wrapper_pcap_file(); - if (!file_name) { - return; - } - - switch (si->family) { - case AF_INET: -#ifdef HAVE_IPV6 - case AF_INET6: -#endif - break; - default: - return; - } - - switch (type) { - case SWRAP_CONNECT_SEND: - if (si->type != SOCK_STREAM) return; - - src_addr = (const struct sockaddr_in *)si->myname; - dest_addr = (const struct sockaddr_in *)addr; - - tcp_seq = si->io.pck_snd; - tcp_ack = si->io.pck_rcv; - tcp_ctl = 0x02; /* SYN */ - - si->io.pck_snd += 1; - - break; - - case SWRAP_CONNECT_RECV: - if (si->type != SOCK_STREAM) return; - - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)addr; - - tcp_seq = si->io.pck_rcv; - tcp_ack = si->io.pck_snd; - tcp_ctl = 0x12; /** SYN,ACK */ - - si->io.pck_rcv += 1; - - break; - - case SWRAP_CONNECT_UNREACH: - if (si->type != SOCK_STREAM) return; - - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)addr; - - /* Unreachable: resend the data of SWRAP_CONNECT_SEND */ - tcp_seq = si->io.pck_snd - 1; - tcp_ack = si->io.pck_rcv; - tcp_ctl = 0x02; /* SYN */ - unreachable = 1; - - break; - - case SWRAP_CONNECT_ACK: - if (si->type != SOCK_STREAM) return; - - src_addr = (const struct sockaddr_in *)si->myname; - dest_addr = (const struct sockaddr_in *)addr; - - tcp_seq = si->io.pck_snd; - tcp_ack = si->io.pck_rcv; - tcp_ctl = 0x10; /* ACK */ - - break; - - case SWRAP_ACCEPT_SEND: - if (si->type != SOCK_STREAM) return; - - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)addr; - - tcp_seq = si->io.pck_rcv; - tcp_ack = si->io.pck_snd; - tcp_ctl = 0x02; /* SYN */ - - si->io.pck_rcv += 1; - - break; - - case SWRAP_ACCEPT_RECV: - if (si->type != SOCK_STREAM) return; - - src_addr = (const struct sockaddr_in *)si->myname; - dest_addr = (const struct sockaddr_in *)addr; - - tcp_seq = si->io.pck_snd; - tcp_ack = si->io.pck_rcv; - tcp_ctl = 0x12; /* SYN,ACK */ - - si->io.pck_snd += 1; - - break; - - case SWRAP_ACCEPT_ACK: - if (si->type != SOCK_STREAM) return; - - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)addr; - - tcp_seq = si->io.pck_rcv; - tcp_ack = si->io.pck_snd; - tcp_ctl = 0x10; /* ACK */ - - break; - - case SWRAP_SEND: - src_addr = (const struct sockaddr_in *)si->myname; - dest_addr = (const struct sockaddr_in *)si->peername; - - tcp_seq = si->io.pck_snd; - tcp_ack = si->io.pck_rcv; - tcp_ctl = 0x18; /* PSH,ACK */ - - si->io.pck_snd += len; - - break; - - case SWRAP_SEND_RST: - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)si->peername; - - if (si->type == SOCK_DGRAM) { - swrap_dump_packet(si, si->peername, - SWRAP_SENDTO_UNREACH, - buf, len); - return; - } - - tcp_seq = si->io.pck_rcv; - tcp_ack = si->io.pck_snd; - tcp_ctl = 0x14; /** RST,ACK */ - - break; - - case SWRAP_PENDING_RST: - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)si->peername; - - if (si->type == SOCK_DGRAM) { - return; - } - - tcp_seq = si->io.pck_rcv; - tcp_ack = si->io.pck_snd; - tcp_ctl = 0x14; /* RST,ACK */ - - break; - - case SWRAP_RECV: - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)si->peername; - - tcp_seq = si->io.pck_rcv; - tcp_ack = si->io.pck_snd; - tcp_ctl = 0x18; /* PSH,ACK */ - - si->io.pck_rcv += len; - - break; - - case SWRAP_RECV_RST: - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)si->peername; - - if (si->type == SOCK_DGRAM) { - return; - } - - tcp_seq = si->io.pck_rcv; - tcp_ack = si->io.pck_snd; - tcp_ctl = 0x14; /* RST,ACK */ - - break; - - case SWRAP_SENDTO: - src_addr = (const struct sockaddr_in *)si->myname; - dest_addr = (const struct sockaddr_in *)addr; - - si->io.pck_snd += len; - - break; - - case SWRAP_SENDTO_UNREACH: - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)addr; - - unreachable = 1; - - break; - - case SWRAP_RECVFROM: - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)addr; - - si->io.pck_rcv += len; - - break; - - case SWRAP_CLOSE_SEND: - if (si->type != SOCK_STREAM) return; - - src_addr = (const struct sockaddr_in *)si->myname; - dest_addr = (const struct sockaddr_in *)si->peername; - - tcp_seq = si->io.pck_snd; - tcp_ack = si->io.pck_rcv; - tcp_ctl = 0x11; /* FIN, ACK */ - - si->io.pck_snd += 1; - - break; - - case SWRAP_CLOSE_RECV: - if (si->type != SOCK_STREAM) return; - - dest_addr = (const struct sockaddr_in *)si->myname; - src_addr = (const struct sockaddr_in *)si->peername; - - tcp_seq = si->io.pck_rcv; - tcp_ack = si->io.pck_snd; - tcp_ctl = 0x11; /* FIN,ACK */ - - si->io.pck_rcv += 1; - - break; - - case SWRAP_CLOSE_ACK: - if (si->type != SOCK_STREAM) return; - - src_addr = (const struct sockaddr_in *)si->myname; - dest_addr = (const struct sockaddr_in *)si->peername; - - tcp_seq = si->io.pck_snd; - tcp_ack = si->io.pck_rcv; - tcp_ctl = 0x10; /* ACK */ - - break; - default: - return; - } - - swrapGetTimeOfDay(&tv); - - packet = swrap_packet_init(&tv, src_addr, dest_addr, si->type, - (const unsigned char *)buf, len, - tcp_seq, tcp_ack, tcp_ctl, unreachable, - &packet_len); - if (!packet) { - return; - } - - fd = swrap_get_pcap_fd(file_name); - if (fd != -1) { - write(fd, packet, packet_len); - } - - free(packet); -} - -_PUBLIC_ int swrap_socket(int family, int type, int protocol) -{ - struct socket_info *si; - int fd; - - if (!socket_wrapper_dir()) { - return real_socket(family, type, protocol); - } - - switch (family) { - case AF_INET: -#ifdef HAVE_IPV6 - case AF_INET6: -#endif - break; - case AF_UNIX: - return real_socket(family, type, protocol); - default: - errno = EAFNOSUPPORT; - return -1; - } - - switch (type) { - case SOCK_STREAM: - break; - case SOCK_DGRAM: - break; - default: - errno = EPROTONOSUPPORT; - return -1; - } - -#if 0 - switch (protocol) { - case 0: - break; - default: - errno = EPROTONOSUPPORT; - return -1; - } -#endif - - fd = real_socket(AF_UNIX, type, 0); - - if (fd == -1) return -1; - - si = (struct socket_info *)calloc(1, sizeof(struct socket_info)); - - si->family = family; - si->type = type; - si->protocol = protocol; - si->fd = fd; - - SWRAP_DLIST_ADD(sockets, si); - - return si->fd; -} - -_PUBLIC_ int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen) -{ - struct socket_info *parent_si, *child_si; - int fd; - struct sockaddr_un un_addr; - socklen_t un_addrlen = sizeof(un_addr); - struct sockaddr_un un_my_addr; - socklen_t un_my_addrlen = sizeof(un_my_addr); - struct sockaddr *my_addr; - socklen_t my_addrlen, len; - int ret; - - parent_si = find_socket_info(s); - if (!parent_si) { - return real_accept(s, addr, addrlen); - } - - /* - * assume out sockaddr have the same size as the in parent - * socket family - */ - my_addrlen = socket_length(parent_si->family); - if (my_addrlen < 0) { - errno = EINVAL; - return -1; - } - - my_addr = malloc(my_addrlen); - if (my_addr == NULL) { - return -1; - } - - memset(&un_addr, 0, sizeof(un_addr)); - memset(&un_my_addr, 0, sizeof(un_my_addr)); - - ret = real_accept(s, (struct sockaddr *)&un_addr, &un_addrlen); - if (ret == -1) { - free(my_addr); - return ret; - } - - fd = ret; - - len = my_addrlen; - ret = sockaddr_convert_from_un(parent_si, &un_addr, un_addrlen, - parent_si->family, my_addr, &len); - if (ret == -1) { - free(my_addr); - close(fd); - return ret; - } - - child_si = (struct socket_info *)malloc(sizeof(struct socket_info)); - memset(child_si, 0, sizeof(*child_si)); - - child_si->fd = fd; - child_si->family = parent_si->family; - child_si->type = parent_si->type; - child_si->protocol = parent_si->protocol; - child_si->bound = 1; - child_si->is_server = 1; - - child_si->peername_len = len; - child_si->peername = sockaddr_dup(my_addr, len); - - if (addr != NULL && addrlen != NULL) { - *addrlen = len; - if (*addrlen >= len) - memcpy(addr, my_addr, len); - *addrlen = 0; - } - - ret = real_getsockname(fd, (struct sockaddr *)&un_my_addr, &un_my_addrlen); - if (ret == -1) { - free(child_si); - close(fd); - return ret; - } - - len = my_addrlen; - ret = sockaddr_convert_from_un(child_si, &un_my_addr, un_my_addrlen, - child_si->family, my_addr, &len); - if (ret == -1) { - free(child_si); - free(my_addr); - close(fd); - return ret; - } - - child_si->myname_len = len; - child_si->myname = sockaddr_dup(my_addr, len); - free(my_addr); - - SWRAP_DLIST_ADD(sockets, child_si); - - swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_SEND, NULL, 0); - swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_RECV, NULL, 0); - swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_ACK, NULL, 0); - - return fd; -} - -static int autobind_start_init; -static int autobind_start; - -/* using sendto() or connect() on an unbound socket would give the - recipient no way to reply, as unlike UDP and TCP, a unix domain - socket can't auto-assign emphemeral port numbers, so we need to - assign it here */ -static int swrap_auto_bind(struct socket_info *si) -{ - struct sockaddr_un un_addr; - int i; - char type; - int ret; - int port; - struct stat st; - - if (autobind_start_init != 1) { - autobind_start_init = 1; - autobind_start = getpid(); - autobind_start %= 50000; - autobind_start += 10000; - } - - un_addr.sun_family = AF_UNIX; - - switch (si->family) { - case AF_INET: { - struct sockaddr_in in; - - switch (si->type) { - case SOCK_STREAM: - type = SOCKET_TYPE_CHAR_TCP; - break; - case SOCK_DGRAM: - type = SOCKET_TYPE_CHAR_UDP; - break; - default: - errno = ESOCKTNOSUPPORT; - return -1; - } - - memset(&in, 0, sizeof(in)); - in.sin_family = AF_INET; - in.sin_addr.s_addr = htonl(127<<24 | - socket_wrapper_default_iface()); - - si->myname_len = sizeof(in); - si->myname = sockaddr_dup(&in, si->myname_len); - break; - } -#ifdef HAVE_IPV6 - case AF_INET6: { - struct sockaddr_in6 in6; - - switch (si->type) { - case SOCK_STREAM: - type = SOCKET_TYPE_CHAR_TCP_V6; - break; - case SOCK_DGRAM: - type = SOCKET_TYPE_CHAR_UDP_V6; - break; - default: - errno = ESOCKTNOSUPPORT; - return -1; - } - - memset(&in6, 0, sizeof(in6)); - in6.sin6_family = AF_INET6; - in6.sin6_addr.s6_addr[0] = SW_IPV6_ADDRESS; - si->myname_len = sizeof(in6); - si->myname = sockaddr_dup(&in6, si->myname_len); - break; - } -#endif - default: - errno = ESOCKTNOSUPPORT; - return -1; - } - - if (autobind_start > 60000) { - autobind_start = 10000; - } - - for (i=0;i<1000;i++) { - port = autobind_start + i; - snprintf(un_addr.sun_path, sizeof(un_addr.sun_path), - "%s/"SOCKET_FORMAT, socket_wrapper_dir(), - type, socket_wrapper_default_iface(), port); - if (stat(un_addr.sun_path, &st) == 0) continue; - - ret = real_bind(si->fd, (struct sockaddr *)&un_addr, sizeof(un_addr)); - if (ret == -1) return ret; - - si->tmp_path = strdup(un_addr.sun_path); - si->bound = 1; - autobind_start = port + 1; - break; - } - if (i == 1000) { - errno = ENFILE; - return -1; - } - - set_port(si->family, port, si->myname); - - return 0; -} - - -_PUBLIC_ int swrap_connect(int s, const struct sockaddr *serv_addr, socklen_t addrlen) -{ - int ret; - struct sockaddr_un un_addr; - struct socket_info *si = find_socket_info(s); - - if (!si) { - return real_connect(s, serv_addr, addrlen); - } - - if (si->bound == 0) { - ret = swrap_auto_bind(si); - if (ret == -1) return -1; - } - - if (si->family != serv_addr->sa_family) { - errno = EINVAL; - return -1; - } - - ret = sockaddr_convert_to_un(si, (const struct sockaddr *)serv_addr, addrlen, &un_addr, 0, NULL); - if (ret == -1) return -1; - - swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_SEND, NULL, 0); - - ret = real_connect(s, (struct sockaddr *)&un_addr, - sizeof(struct sockaddr_un)); - - /* to give better errors */ - if (ret == -1 && errno == ENOENT) { - errno = EHOSTUNREACH; - } - - if (ret == 0) { - si->peername_len = addrlen; - si->peername = sockaddr_dup(serv_addr, addrlen); - - swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_RECV, NULL, 0); - swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_ACK, NULL, 0); - } else { - swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_UNREACH, NULL, 0); - } - - return ret; -} - -_PUBLIC_ int swrap_bind(int s, const struct sockaddr *myaddr, socklen_t addrlen) -{ - int ret; - struct sockaddr_un un_addr; - struct socket_info *si = find_socket_info(s); - - if (!si) { - return real_bind(s, myaddr, addrlen); - } - - si->myname_len = addrlen; - si->myname = sockaddr_dup(myaddr, addrlen); - - ret = sockaddr_convert_to_un(si, (const struct sockaddr *)myaddr, addrlen, &un_addr, 1, &si->bcast); - if (ret == -1) return -1; - - unlink(un_addr.sun_path); - - ret = real_bind(s, (struct sockaddr *)&un_addr, - sizeof(struct sockaddr_un)); - - if (ret == 0) { - si->bound = 1; - } - - return ret; -} - -_PUBLIC_ int swrap_listen(int s, int backlog) -{ - int ret; - struct socket_info *si = find_socket_info(s); - - if (!si) { - return real_listen(s, backlog); - } - - ret = real_listen(s, backlog); - - return ret; -} - -_PUBLIC_ int swrap_getpeername(int s, struct sockaddr *name, socklen_t *addrlen) -{ - struct socket_info *si = find_socket_info(s); - - if (!si) { - return real_getpeername(s, name, addrlen); - } - - if (!si->peername) - { - errno = ENOTCONN; - return -1; - } - - memcpy(name, si->peername, si->peername_len); - *addrlen = si->peername_len; - - return 0; -} - -_PUBLIC_ int swrap_getsockname(int s, struct sockaddr *name, socklen_t *addrlen) -{ - struct socket_info *si = find_socket_info(s); - - if (!si) { - return real_getsockname(s, name, addrlen); - } - - memcpy(name, si->myname, si->myname_len); - *addrlen = si->myname_len; - - return 0; -} - -_PUBLIC_ int swrap_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) -{ - struct socket_info *si = find_socket_info(s); - - if (!si) { - return real_getsockopt(s, level, optname, optval, optlen); - } - - if (level == SOL_SOCKET) { - return real_getsockopt(s, level, optname, optval, optlen); - } - - errno = ENOPROTOOPT; - return -1; -} - -_PUBLIC_ int swrap_setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) -{ - struct socket_info *si = find_socket_info(s); - - if (!si) { - return real_setsockopt(s, level, optname, optval, optlen); - } - - if (level == SOL_SOCKET) { - return real_setsockopt(s, level, optname, optval, optlen); - } - - switch (si->family) { - case AF_INET: - return 0; - default: - errno = ENOPROTOOPT; - return -1; - } -} - -_PUBLIC_ ssize_t swrap_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) -{ - struct sockaddr_un un_addr; - socklen_t un_addrlen = sizeof(un_addr); - int ret; - struct socket_info *si = find_socket_info(s); - - if (!si) { - return real_recvfrom(s, buf, len, flags, from, fromlen); - } - - /* irix 6.4 forgets to null terminate the sun_path string :-( */ - memset(&un_addr, 0, sizeof(un_addr)); - ret = real_recvfrom(s, buf, len, flags, (struct sockaddr *)&un_addr, &un_addrlen); - if (ret == -1) - return ret; - - if (sockaddr_convert_from_un(si, &un_addr, un_addrlen, - si->family, from, fromlen) == -1) { - return -1; - } - - swrap_dump_packet(si, from, SWRAP_RECVFROM, buf, ret); - - return ret; -} - - -_PUBLIC_ ssize_t swrap_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) -{ - struct sockaddr_un un_addr; - int ret; - struct socket_info *si = find_socket_info(s); - int bcast = 0; - - if (!si) { - return real_sendto(s, buf, len, flags, to, tolen); - } - - switch (si->type) { - case SOCK_STREAM: - ret = real_send(s, buf, len, flags); - break; - case SOCK_DGRAM: - if (si->bound == 0) { - ret = swrap_auto_bind(si); - if (ret == -1) return -1; - } - - ret = sockaddr_convert_to_un(si, to, tolen, &un_addr, 0, &bcast); - if (ret == -1) return -1; - - if (bcast) { - struct stat st; - unsigned int iface; - unsigned int prt = ntohs(((const struct sockaddr_in *)to)->sin_port); - char type; - - type = SOCKET_TYPE_CHAR_UDP; - - for(iface=0; iface <= MAX_WRAPPED_INTERFACES; iface++) { - snprintf(un_addr.sun_path, sizeof(un_addr.sun_path), "%s/"SOCKET_FORMAT, - socket_wrapper_dir(), type, iface, prt); - if (stat(un_addr.sun_path, &st) != 0) continue; - - /* ignore the any errors in broadcast sends */ - real_sendto(s, buf, len, flags, (struct sockaddr *)&un_addr, sizeof(un_addr)); - } - - swrap_dump_packet(si, to, SWRAP_SENDTO, buf, len); - - return len; - } - - ret = real_sendto(s, buf, len, flags, (struct sockaddr *)&un_addr, sizeof(un_addr)); - break; - default: - ret = -1; - errno = EHOSTUNREACH; - break; - } - - /* to give better errors */ - if (ret == -1 && errno == ENOENT) { - errno = EHOSTUNREACH; - } - - if (ret == -1) { - swrap_dump_packet(si, to, SWRAP_SENDTO, buf, len); - swrap_dump_packet(si, to, SWRAP_SENDTO_UNREACH, buf, len); - } else { - swrap_dump_packet(si, to, SWRAP_SENDTO, buf, ret); - } - - return ret; -} - -_PUBLIC_ int swrap_ioctl(int s, int r, void *p) -{ - int ret; - struct socket_info *si = find_socket_info(s); - int value; - - if (!si) { - return real_ioctl(s, r, p); - } - - ret = real_ioctl(s, r, p); - - switch (r) { - case FIONREAD: - value = *((int *)p); - if (ret == -1 && errno != EAGAIN && errno != ENOBUFS) { - swrap_dump_packet(si, NULL, SWRAP_PENDING_RST, NULL, 0); - } else if (value == 0) { /* END OF FILE */ - swrap_dump_packet(si, NULL, SWRAP_PENDING_RST, NULL, 0); - } - break; - } - - return ret; -} - -_PUBLIC_ ssize_t swrap_recv(int s, void *buf, size_t len, int flags) -{ - int ret; - struct socket_info *si = find_socket_info(s); - - if (!si) { - return real_recv(s, buf, len, flags); - } - - ret = real_recv(s, buf, len, flags); - if (ret == -1 && errno != EAGAIN && errno != ENOBUFS) { - swrap_dump_packet(si, NULL, SWRAP_RECV_RST, NULL, 0); - } else if (ret == 0) { /* END OF FILE */ - swrap_dump_packet(si, NULL, SWRAP_RECV_RST, NULL, 0); - } else { - swrap_dump_packet(si, NULL, SWRAP_RECV, buf, ret); - } - - return ret; -} - - -_PUBLIC_ ssize_t swrap_send(int s, const void *buf, size_t len, int flags) -{ - int ret; - struct socket_info *si = find_socket_info(s); - - if (!si) { - return real_send(s, buf, len, flags); - } - - ret = real_send(s, buf, len, flags); - - if (ret == -1) { - swrap_dump_packet(si, NULL, SWRAP_SEND, buf, len); - swrap_dump_packet(si, NULL, SWRAP_SEND_RST, NULL, 0); - } else { - swrap_dump_packet(si, NULL, SWRAP_SEND, buf, ret); - } - - return ret; -} - -_PUBLIC_ int swrap_close(int fd) -{ - struct socket_info *si = find_socket_info(fd); - int ret; - - if (!si) { - return real_close(fd); - } - - SWRAP_DLIST_REMOVE(sockets, si); - - if (si->myname && si->peername) { - swrap_dump_packet(si, NULL, SWRAP_CLOSE_SEND, NULL, 0); - } - - ret = real_close(fd); - - if (si->myname && si->peername) { - swrap_dump_packet(si, NULL, SWRAP_CLOSE_RECV, NULL, 0); - swrap_dump_packet(si, NULL, SWRAP_CLOSE_ACK, NULL, 0); - } - - if (si->path) free(si->path); - if (si->myname) free(si->myname); - if (si->peername) free(si->peername); - if (si->tmp_path) { - unlink(si->tmp_path); - free(si->tmp_path); - } - free(si); - - return ret; -} - -static int -dup_internal(const struct socket_info *si_oldd, int fd) -{ - struct socket_info *si_newd; - - si_newd = (struct socket_info *)calloc(1, sizeof(struct socket_info)); - - si_newd->fd = fd; - - si_newd->family = si_oldd->family; - si_newd->type = si_oldd->type; - si_newd->protocol = si_oldd->protocol; - si_newd->bound = si_oldd->bound; - si_newd->bcast = si_oldd->bcast; - if (si_oldd->path) - si_newd->path = strdup(si_oldd->path); - if (si_oldd->tmp_path) - si_newd->tmp_path = strdup(si_oldd->tmp_path); - si_newd->myname = - sockaddr_dup(si_oldd->myname, si_oldd->myname_len); - si_newd->myname_len = si_oldd->myname_len; - si_newd->peername = - sockaddr_dup(si_oldd->peername, si_oldd->peername_len); - si_newd->peername_len = si_oldd->peername_len; - - si_newd->io = si_oldd->io; - - SWRAP_DLIST_ADD(sockets, si_newd); - - return fd; -} - - -_PUBLIC_ int swrap_dup(int oldd) -{ - struct socket_info *si; - int fd; - - si = find_socket_info(oldd); - if (si == NULL) - return real_dup(oldd); - - fd = real_dup(si->fd); - if (fd < 0) - return fd; - - return dup_internal(si, fd); -} - - -_PUBLIC_ int swrap_dup2(int oldd, int newd) -{ - struct socket_info *si_newd, *si_oldd; - int fd; - - if (newd == oldd) - return newd; - - si_oldd = find_socket_info(oldd); - si_newd = find_socket_info(newd); - - if (si_oldd == NULL && si_newd == NULL) - return real_dup2(oldd, newd); - - fd = real_dup2(si_oldd->fd, newd); - if (fd < 0) - return fd; - - /* close new socket first */ - if (si_newd) - swrap_close(newd); - - return dup_internal(si_oldd, fd); -} diff --git a/kerberosV/src/lib/roken/socket_wrapper.h b/kerberosV/src/lib/roken/socket_wrapper.h deleted file mode 100644 index 06fd63305d9..00000000000 --- a/kerberosV/src/lib/roken/socket_wrapper.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (C) Jelmer Vernooij 2005 - * Copyright (C) Stefan Metzmacher 2006 - * - * 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 author 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 AUTHOR 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 AUTHOR 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. - * - */ - -#ifndef __SOCKET_WRAPPER_H__ -#define __SOCKET_WRAPPER_H__ - -int swrap_socket(int family, int type, int protocol); -int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen); -int swrap_connect(int s, const struct sockaddr *serv_addr, socklen_t addrlen); -int swrap_bind(int s, const struct sockaddr *myaddr, socklen_t addrlen); -int swrap_listen(int s, int backlog); -int swrap_getpeername(int s, struct sockaddr *name, socklen_t *addrlen); -int swrap_getsockname(int s, struct sockaddr *name, socklen_t *addrlen); -int swrap_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen); -int swrap_setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen); -ssize_t swrap_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); -ssize_t swrap_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); -int swrap_ioctl(int s, int req, void *ptr); -ssize_t swrap_recv(int s, void *buf, size_t len, int flags); -ssize_t swrap_send(int s, const void *buf, size_t len, int flags); -int swrap_close(int); -int swrap_dup(int); -int swrap_dup2(int, int); - -#ifdef SOCKET_WRAPPER_REPLACE - -#ifdef accept -#undef accept -#endif -#define accept(s,addr,addrlen) swrap_accept(s,addr,addrlen) - -#ifdef connect -#undef connect -#endif -#define connect(s,serv_addr,addrlen) swrap_connect(s,serv_addr,addrlen) - -#ifdef bind -#undef bind -#endif -#define bind(s,myaddr,addrlen) swrap_bind(s,myaddr,addrlen) - -#ifdef listen -#undef listen -#endif -#define listen(s,blog) swrap_listen(s,blog) - -#ifdef getpeername -#undef getpeername -#endif -#define getpeername(s,name,addrlen) swrap_getpeername(s,name,addrlen) - -#ifdef getsockname -#undef getsockname -#endif -#define getsockname(s,name,addrlen) swrap_getsockname(s,name,addrlen) - -#ifdef getsockopt -#undef getsockopt -#endif -#define getsockopt(s,level,optname,optval,optlen) swrap_getsockopt(s,level,optname,optval,optlen) - -#ifdef setsockopt -#undef setsockopt -#endif -#define setsockopt(s,level,optname,optval,optlen) swrap_setsockopt(s,level,optname,optval,optlen) - -#ifdef recvfrom -#undef recvfrom -#endif -#define recvfrom(s,buf,len,flags,from,fromlen) swrap_recvfrom(s,buf,len,flags,from,fromlen) - -#ifdef sendto -#undef sendto -#endif -#define sendto(s,buf,len,flags,to,tolen) swrap_sendto(s,buf,len,flags,to,tolen) - -#ifdef ioctl -#undef ioctl -#endif -#define ioctl(s,req,ptr) swrap_ioctl(s,req,ptr) - -#ifdef recv -#undef recv -#endif -#define recv(s,buf,len,flags) swrap_recv(s,buf,len,flags) - -#ifdef send -#undef send -#endif -#define send(s,buf,len,flags) swrap_send(s,buf,len,flags) - -#ifdef socket -#undef socket -#endif -#define socket(domain,type,protocol) swrap_socket(domain,type,protocol) - -#ifdef close -#undef close -#endif -#define close(s) swrap_close(s) - -#ifdef dup -#undef dup -#endif -#define dup(oldd) swrap_dup(oldd) - -#ifdef dup2 -#undef dup2 -#endif -#define dup2(oldd, newd) swrap_dup2(oldd, newd) - -#endif - -#endif /* __SOCKET_WRAPPER_H__ */ diff --git a/kerberosV/src/lib/roken/strcasecmp.c b/kerberosV/src/lib/roken/strcasecmp.c deleted file mode 100644 index 00a0a8ef023..00000000000 --- a/kerberosV/src/lib/roken/strcasecmp.c +++ /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. - */ - -#include - -#include -#include -#include -#include "roken.h" - -#ifndef HAVE_STRCASECMP - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strcasecmp(const char *s1, const char *s2) -{ - while(toupper((unsigned char)*s1) == toupper((unsigned char)*s2)) { - if(*s1 == '\0') - return 0; - s1++; - s2++; - } - return toupper((unsigned char)*s1) - toupper((unsigned char)*s2); -} - -#endif diff --git a/kerberosV/src/lib/roken/strcollect.c b/kerberosV/src/lib/roken/strcollect.c deleted file mode 100644 index 0afc3f0c62e..00000000000 --- a/kerberosV/src/lib/roken/strcollect.c +++ /dev/null @@ -1,93 +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 - -#include -#include -#include -#include -#include "roken.h" - -enum { initial = 10, increment = 5 }; - -static char ** -sub (char **argv, int i, int argc, va_list *ap) -{ - do { - if(i == argc) { - /* realloc argv */ - char **tmp = realloc(argv, (argc + increment) * sizeof(*argv)); - if(tmp == NULL) { - free(argv); - errno = ENOMEM; - return NULL; - } - argv = tmp; - argc += increment; - } - argv[i++] = va_arg(*ap, char*); - } while(argv[i - 1] != NULL); - return argv; -} - -/* - * return a malloced vector of pointers to the strings in `ap' - * terminated by NULL. - */ - -ROKEN_LIB_FUNCTION char ** ROKEN_LIB_CALL -vstrcollect(va_list *ap) -{ - return sub (NULL, 0, 0, ap); -} - -/* - * - */ - -ROKEN_LIB_FUNCTION char ** ROKEN_LIB_CALL -strcollect(char *first, ...) -{ - va_list ap; - char **ret = malloc (initial * sizeof(char *)); - - if (ret == NULL) - return ret; - - ret[0] = first; - va_start(ap, first); - ret = sub (ret, 1, initial, &ap); - va_end(ap); - return ret; -} diff --git a/kerberosV/src/lib/roken/strdup.c b/kerberosV/src/lib/roken/strdup.c deleted file mode 100644 index ce004562f0f..00000000000 --- a/kerberosV/src/lib/roken/strdup.c +++ /dev/null @@ -1,47 +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. - */ - -#include -#include -#include - -#ifndef HAVE_STRDUP -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -strdup(const char *old) -{ - char *t = malloc(strlen(old)+1); - if (t != 0) - strcpy(t, old); - return t; -} -#endif diff --git a/kerberosV/src/lib/roken/strerror.c b/kerberosV/src/lib/roken/strerror.c deleted file mode 100644 index b5ec6918e69..00000000000 --- a/kerberosV/src/lib/roken/strerror.c +++ /dev/null @@ -1,54 +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 - -#include -#include -#include - -extern int sys_nerr; -extern char *sys_errlist[]; - -ROKEN_LIB_FUNCTION char* ROKEN_LIB_CALL -strerror(int eno) -{ - static char emsg[1024]; - - if(eno < 0 || eno >= sys_nerr) - snprintf(emsg, sizeof(emsg), "Error %d occurred.", eno); - else - snprintf(emsg, sizeof(emsg), "%s", sys_errlist[eno]); - - return emsg; -} diff --git a/kerberosV/src/lib/roken/strerror_r.c b/kerberosV/src/lib/roken/strerror_r.c deleted file mode 100644 index 85271ecaf5c..00000000000 --- a/kerberosV/src/lib/roken/strerror_r.c +++ /dev/null @@ -1,84 +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 - -#if (!defined(HAVE_STRERROR_R) && !defined(strerror_r)) || (!defined(STRERROR_R_PROTO_COMPATIBLE) && defined(HAVE_STRERROR_R)) - -#include -#include -#include -#include "roken.h" - -#ifdef _MSC_VER - -int ROKEN_LIB_FUNCTION -rk_strerror_r(int eno, char * strerrbuf, size_t buflen) -{ - errno_t err; - - err = strerror_s(strerrbuf, buflen, eno); - if (err != 0) { - int code; - code = sprintf_s(strerrbuf, buflen, "Error % occurred.", eno); - err = ((code != 0)? errno : 0); - } - - return err; -} - -#else /* _MSC_VER */ - -int ROKEN_LIB_FUNCTION -rk_strerror_r(int eno, char *strerrbuf, size_t buflen) -{ - /* Assume is the linux broken strerror_r (returns the a buffer (char *) if the input buffer wasn't use */ -#ifdef HAVE_STRERROR_R - const char *str; - str = strerror_r(eno, strerrbuf, buflen); - if (str != strerrbuf) - if (strlcpy(strerrbuf, str, buflen) >= buflen) - return ERANGE; - return 0; -#else - int ret; - ret = strlcpy(strerrbuf, strerror(eno), buflen); - if (ret > buflen) - return ERANGE; - return 0; -#endif -} - -#endif /* !_MSC_VER */ - -#endif diff --git a/kerberosV/src/lib/roken/strftime.c b/kerberosV/src/lib/roken/strftime.c deleted file mode 100644 index 447c1554337..00000000000 --- a/kerberosV/src/lib/roken/strftime.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Copyright (c) 1999 - 2002 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 -#include "roken.h" -#ifdef TEST_STRPFTIME -#include "strpftime-test.h" -#endif - -static const char *abb_weekdays[] = { - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat", -}; - -static const char *full_weekdays[] = { - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", -}; - -static const char *abb_month[] = { - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" -}; - -static const char *full_month[] = { - "January", - "February", - "Mars", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" -}; - -static const char *ampm[] = { - "AM", - "PM" -}; - -/* - * Convert hour in [0, 24] to [12 1 - 11 12 1 - 11 12] - */ - -static int -hour_24to12 (int hour) -{ - int ret = hour % 12; - - if (ret == 0) - ret = 12; - return ret; -} - -/* - * Return AM or PM for `hour' - */ - -static const char * -hour_to_ampm (int hour) -{ - return ampm[hour / 12]; -} - -/* - * Return the week number of `tm' (Sunday being the first day of the week) - * as [0, 53] - */ - -static int -week_number_sun (const struct tm *tm) -{ - return (tm->tm_yday + 7 - (tm->tm_yday % 7 - tm->tm_wday + 7) % 7) / 7; -} - -/* - * Return the week number of `tm' (Monday being the first day of the week) - * as [0, 53] - */ - -static int -week_number_mon (const struct tm *tm) -{ - int wday = (tm->tm_wday + 6) % 7; - - return (tm->tm_yday + 7 - (tm->tm_yday % 7 - wday + 7) % 7) / 7; -} - -/* - * Return the week number of `tm' (Monday being the first day of the - * week) as [01, 53]. Week number one is the one that has four or more - * days in that year. - */ - -static int -week_number_mon4 (const struct tm *tm) -{ - int wday = (tm->tm_wday + 6) % 7; - int w1day = (wday - tm->tm_yday % 7 + 7) % 7; - int ret; - - ret = (tm->tm_yday + w1day) / 7; - if (w1day >= 4) - --ret; - if (ret == -1) - ret = 53; - else - ++ret; - return ret; -} - -/* - * - */ - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -strftime (char *buf, size_t maxsize, const char *format, - const struct tm *tm) -{ - size_t n = 0; - int ret; - - while (*format != '\0' && n < maxsize) { - if (*format == '%') { - ++format; - if(*format == 'E' || *format == 'O') - ++format; - switch (*format) { - case 'a' : - ret = snprintf (buf, maxsize - n, - "%s", abb_weekdays[tm->tm_wday]); - break; - case 'A' : - ret = snprintf (buf, maxsize - n, - "%s", full_weekdays[tm->tm_wday]); - break; - case 'h' : - case 'b' : - ret = snprintf (buf, maxsize - n, - "%s", abb_month[tm->tm_mon]); - break; - case 'B' : - ret = snprintf (buf, maxsize - n, - "%s", full_month[tm->tm_mon]); - break; - case 'c' : - ret = snprintf (buf, maxsize - n, - "%d:%02d:%02d %02d:%02d:%02d", - tm->tm_year, - tm->tm_mon + 1, - tm->tm_mday, - tm->tm_hour, - tm->tm_min, - tm->tm_sec); - break; - case 'C' : - ret = snprintf (buf, maxsize - n, - "%02d", (tm->tm_year + 1900) / 100); - break; - case 'd' : - ret = snprintf (buf, maxsize - n, - "%02d", tm->tm_mday); - break; - case 'D' : - ret = snprintf (buf, maxsize - n, - "%02d/%02d/%02d", - tm->tm_mon + 1, - tm->tm_mday, - (tm->tm_year + 1900) % 100); - break; - case 'e' : - ret = snprintf (buf, maxsize - n, - "%2d", tm->tm_mday); - break; - case 'F': - ret = snprintf (buf, maxsize - n, - "%04d-%02d-%02d", tm->tm_year + 1900, - tm->tm_mon + 1, tm->tm_mday); - break; - case 'g': - /* last two digits of week-based year */ - abort(); - case 'G': - /* week-based year */ - abort(); - case 'H' : - ret = snprintf (buf, maxsize - n, - "%02d", tm->tm_hour); - break; - case 'I' : - ret = snprintf (buf, maxsize - n, - "%02d", - hour_24to12 (tm->tm_hour)); - break; - case 'j' : - ret = snprintf (buf, maxsize - n, - "%03d", tm->tm_yday + 1); - break; - case 'k' : - ret = snprintf (buf, maxsize - n, - "%2d", tm->tm_hour); - break; - case 'l' : - ret = snprintf (buf, maxsize - n, - "%2d", - hour_24to12 (tm->tm_hour)); - break; - case 'm' : - ret = snprintf (buf, maxsize - n, - "%02d", tm->tm_mon + 1); - break; - case 'M' : - ret = snprintf (buf, maxsize - n, - "%02d", tm->tm_min); - break; - case 'n' : - ret = snprintf (buf, maxsize - n, "\n"); - break; - case 'p' : - ret = snprintf (buf, maxsize - n, "%s", - hour_to_ampm (tm->tm_hour)); - break; - case 'r' : - ret = snprintf (buf, maxsize - n, - "%02d:%02d:%02d %s", - hour_24to12 (tm->tm_hour), - tm->tm_min, - tm->tm_sec, - hour_to_ampm (tm->tm_hour)); - break; - case 'R' : - ret = snprintf (buf, maxsize - n, - "%02d:%02d", - tm->tm_hour, - tm->tm_min); - break; - case 's' : - ret = snprintf (buf, maxsize - n, - "%d", (int)mktime(rk_UNCONST(tm))); - break; - case 'S' : - ret = snprintf (buf, maxsize - n, - "%02d", tm->tm_sec); - break; - case 't' : - ret = snprintf (buf, maxsize - n, "\t"); - break; - case 'T' : - case 'X' : - ret = snprintf (buf, maxsize - n, - "%02d:%02d:%02d", - tm->tm_hour, - tm->tm_min, - tm->tm_sec); - break; - case 'u' : - ret = snprintf (buf, maxsize - n, - "%d", (tm->tm_wday == 0) ? 7 : tm->tm_wday); - break; - case 'U' : - ret = snprintf (buf, maxsize - n, - "%02d", week_number_sun (tm)); - break; - case 'V' : - ret = snprintf (buf, maxsize - n, - "%02d", week_number_mon4 (tm)); - break; - case 'w' : - ret = snprintf (buf, maxsize - n, - "%d", tm->tm_wday); - break; - case 'W' : - ret = snprintf (buf, maxsize - n, - "%02d", week_number_mon (tm)); - break; - case 'x' : - ret = snprintf (buf, maxsize - n, - "%d:%02d:%02d", - tm->tm_year, - tm->tm_mon + 1, - tm->tm_mday); - break; - case 'y' : - ret = snprintf (buf, maxsize - n, - "%02d", (tm->tm_year + 1900) % 100); - break; - case 'Y' : - ret = snprintf (buf, maxsize - n, - "%d", tm->tm_year + 1900); - break; - case 'z': - ret = snprintf (buf, maxsize - n, - "%ld", -#if defined(HAVE_STRUCT_TM_TM_GMTOFF) - (long)tm->tm_gmtoff -#elif defined(HAVE_TIMEZONE) -#ifdef HAVE_ALTZONE - tm->tm_isdst ? - (long)altzone : -#endif - (long)timezone -#else -#error Where in timezone chaos are you? -#endif - ); - break; - case 'Z' : - ret = snprintf (buf, maxsize - n, - "%s", - -#if defined(HAVE_STRUCT_TM_TM_ZONE) - tm->tm_zone -#elif defined(HAVE_TIMEZONE) - tzname[tm->tm_isdst] -#else -#error what? -#endif - ); - break; - case '\0' : - --format; - /* FALLTHROUGH */ - case '%' : - ret = snprintf (buf, maxsize - n, - "%%"); - break; - default : - ret = snprintf (buf, maxsize - n, - "%%%c", *format); - break; - } - if (ret < 0 || ret >= (int)(maxsize - n)) - return 0; - n += ret; - buf += ret; - ++format; - } else { - *buf++ = *format++; - ++n; - } - } - *buf = '\0'; - return n; -} diff --git a/kerberosV/src/lib/roken/strlcat.c b/kerberosV/src/lib/roken/strlcat.c deleted file mode 100644 index e8fe1b781c6..00000000000 --- a/kerberosV/src/lib/roken/strlcat.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 1995-2002 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 -#include "roken.h" - -#ifndef HAVE_STRLCAT - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -strlcat (char *dst, const char *src, size_t dst_sz) -{ - size_t len; -#if defined(_MSC_VER) && _MSC_VER >= 1400 - len = strnlen_s(dst, dst_sz); -#elif defined(HAVE_STRNLEN) - len = strnlen(dst, dst_sz); -#else - len = strlen(dst); -#endif - - if (dst_sz <= len) - /* the total size of dst is less than the string it contains; - this could be considered bad input, but we might as well - handle it */ - return len + strlen(src); - - return len + strlcpy (dst + len, src, dst_sz - len); -} - -#endif diff --git a/kerberosV/src/lib/roken/strlcpy.c b/kerberosV/src/lib/roken/strlcpy.c deleted file mode 100644 index 0fe2b97fccb..00000000000 --- a/kerberosV/src/lib/roken/strlcpy.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 1995-2002 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 -#include "roken.h" - -#ifndef HAVE_STRLCPY - -#if defined(_MSC_VER) && _MSC_VER >= 1400 - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -strlcpy (char *dst, const char *src, size_t dst_cch) -{ - errno_t e; - - if (dst_cch > 0) - e = strncpy_s(dst, dst_cch, src, _TRUNCATE); - - return strlen (src); -} - -#else - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -strlcpy (char *dst, const char *src, size_t dst_sz) -{ - size_t n; - - for (n = 0; n < dst_sz; n++) { - if ((*dst++ = *src++) == '\0') - break; - } - - if (n < dst_sz) - return n; - if (n > 0) - *(dst - 1) = '\0'; - return n + strlen (src); -} - -#endif - -#endif diff --git a/kerberosV/src/lib/roken/strlwr.c b/kerberosV/src/lib/roken/strlwr.c deleted file mode 100644 index 68bd4edad3f..00000000000 --- a/kerberosV/src/lib/roken/strlwr.c +++ /dev/null @@ -1,50 +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. - */ - -#include -#include -#include - -#include "roken.h" - -#ifndef HAVE_STRLWR -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -strlwr(char *str) -{ - char *s; - - for(s = str; *s; s++) - *s = tolower((unsigned char)*s); - return str; -} -#endif diff --git a/kerberosV/src/lib/roken/strncasecmp.c b/kerberosV/src/lib/roken/strncasecmp.c deleted file mode 100644 index f244fb582f7..00000000000 --- a/kerberosV/src/lib/roken/strncasecmp.c +++ /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. - */ - -#include - -#include -#include -#include - -#ifndef HAVE_STRNCASECMP - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -strncasecmp(const char *s1, const char *s2, size_t n) -{ - while(n > 0 - && toupper((unsigned char)*s1) == toupper((unsigned char)*s2)) - { - if(*s1 == '\0') - return 0; - s1++; - s2++; - n--; - } - if(n == 0) - return 0; - return toupper((unsigned char)*s1) - toupper((unsigned char)*s2); -} - -#endif diff --git a/kerberosV/src/lib/roken/strndup.c b/kerberosV/src/lib/roken/strndup.c deleted file mode 100644 index e67c9983a4a..00000000000 --- a/kerberosV/src/lib/roken/strndup.c +++ /dev/null @@ -1,53 +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 -#include -#include - -#include "roken.h" - -#ifndef HAVE_STRNDUP -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/strnlen.c b/kerberosV/src/lib/roken/strnlen.c deleted file mode 100644 index f26cd845143..00000000000 --- a/kerberosV/src/lib/roken/strnlen.c +++ /dev/null @@ -1,46 +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 - -#include "roken.h" - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -strnlen(const char *s, size_t len) -{ - size_t i; - - for(i = 0; i < len && s[i]; i++) - ; - return i; -} diff --git a/kerberosV/src/lib/roken/strpftime-test.c b/kerberosV/src/lib/roken/strpftime-test.c deleted file mode 100644 index 8524ff5eeeb..00000000000 --- a/kerberosV/src/lib/roken/strpftime-test.c +++ /dev/null @@ -1,295 +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 -#include -#ifdef TEST_STRPFTIME -#include "strpftime-test.h" -#endif - -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\") = %lu (\"%s\")\n", - tests[i].vals[j].format, (unsigned long)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; - } - } - } - { - struct tm tm; - memset(&tm, 0, sizeof(tm)); - strptime ("200505", "%Y%m", &tm); - if (tm.tm_year != 105) - ++ret; - if (tm.tm_mon != 4) - ++ret; - } - if (ret) { - printf ("%d errors\n", ret); - return 1; - } else - return 0; -} diff --git a/kerberosV/src/lib/roken/strpftime-test.h b/kerberosV/src/lib/roken/strpftime-test.h deleted file mode 100644 index 63a92bd0124..00000000000 --- a/kerberosV/src/lib/roken/strpftime-test.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2007 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: strpftime-test.h,v 1.1 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __STRFTIME_TEST_H__ -#define __STRFTIME_TEST_H__ - -/* - * we cannot use the real names of the functions when testing, since - * they might have different prototypes as the system functions, hence - * these evil hacks - */ - -#define strftime test_strftime -#define strptime test_strptime - -ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -strftime (char *buf, size_t maxsize, const char *format, - const struct tm *tm); - -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -strptime (const char *buf, const char *format, struct tm *timeptr); - -#endif /* __STRFTIME_TEST_H__ */ diff --git a/kerberosV/src/lib/roken/strpool.c b/kerberosV/src/lib/roken/strpool.c deleted file mode 100644 index 6e6a737bc63..00000000000 --- a/kerberosV/src/lib/roken/strpool.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2005 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 - -#include -#include -#include "roken.h" - -struct rk_strpool { - char *str; - size_t len; -}; - -/* - * - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_strpoolfree(struct rk_strpool *p) -{ - if (p->str) { - free(p->str); - p->str = NULL; - } - free(p); -} - -/* - * - */ - -ROKEN_LIB_FUNCTION struct rk_strpool * ROKEN_LIB_CALL -rk_strpoolprintf(struct rk_strpool *p, const char *fmt, ...) -{ - va_list ap; - char *str, *str2; - int len; - - if (p == NULL) { - p = malloc(sizeof(*p)); - if (p == NULL) - return NULL; - p->str = NULL; - p->len = 0; - } - va_start(ap, fmt); - len = vasprintf(&str, fmt, ap); - va_end(ap); - if (str == NULL) { - rk_strpoolfree(p); - return NULL; - } - str2 = realloc(p->str, len + p->len + 1); - if (str2 == NULL) { - rk_strpoolfree(p); - return NULL; - } - p->str = str2; - memcpy(p->str + p->len, str, len + 1); - p->len += len; - free(str); - return p; -} - -/* - * - */ - -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -rk_strpoolcollect(struct rk_strpool *p) -{ - char *str; - if (p == NULL) - return strdup(""); - str = p->str; - p->str = NULL; - free(p); - return str; -} diff --git a/kerberosV/src/lib/roken/strptime.c b/kerberosV/src/lib/roken/strptime.c deleted file mode 100644 index 75c27a32877..00000000000 --- a/kerberosV/src/lib/roken/strptime.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Copyright (c) 1999, 2003, 2005 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 -#include "roken.h" -#ifdef TEST_STRPFTIME -#include "strpftime-test.h" -#endif -#include - -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", - "March", - "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; -} - -/* - * Try to match `*buf' to at the most `n' characters and return the - * resulting number in `num'. Returns 0 or an error. Also advance - * buf. - */ - -static int -parse_number (const char **buf, int n, int *num) -{ - char *s, *str; - int i; - - str = malloc(n + 1); - if (str == NULL) - return -1; - - /* skip whitespace */ - for (; **buf != '\0' && isspace((unsigned char)(**buf)); (*buf)++) - ; - - /* parse at least n characters */ - for (i = 0; **buf != '\0' && i < n && isdigit((unsigned char)(**buf)); i++, (*buf)++) - str[i] = **buf; - str[i] = '\0'; - - *num = strtol (str, &s, 10); - free(str); - if (s == str) - return -1; - - return 0; -} - -/* - * 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 + (is_leap_year (year) ? 366 : 365)) % 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; - } -} - -/* - * - */ - -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -strptime (const char *buf, const char *format, struct tm *timeptr) -{ - char c; - - for (; (c = *format) != '\0'; ++format) { - char *s; - int ret; - - if (isspace ((unsigned char)c)) { - while (isspace ((unsigned char)*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' : - if (parse_number(&buf, 2, &ret)) - return NULL; - timeptr->tm_year = (ret * 100) - tm_year_base; - 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' : - if (parse_number(&buf, 2, &ret)) - return NULL; - timeptr->tm_mday = ret; - break; - case 'H' : - case 'k' : - if (parse_number(&buf, 2, &ret)) - return NULL; - timeptr->tm_hour = ret; - break; - case 'I' : - case 'l' : - if (parse_number(&buf, 2, &ret)) - return NULL; - if (ret == 12) - timeptr->tm_hour = 0; - else - timeptr->tm_hour = ret; - break; - case 'j' : - if (parse_number(&buf, 3, &ret)) - return NULL; - if (ret == 0) - return NULL; - timeptr->tm_yday = ret - 1; - break; - case 'm' : - if (parse_number(&buf, 2, &ret)) - return NULL; - if (ret == 0) - return NULL; - timeptr->tm_mon = ret - 1; - break; - case 'M' : - if (parse_number(&buf, 2, &ret)) - return NULL; - timeptr->tm_min = ret; - break; - case 'n' : - while (isspace ((unsigned char)*buf)) - buf++; - 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' : - if (parse_number(&buf, 2, &ret)) - return NULL; - timeptr->tm_sec = ret; - break; - case 't' : - while (isspace ((unsigned char)*buf)) - buf++; - 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' : - if (parse_number(&buf, 1, &ret)) - return NULL; - if (ret <= 0) - return NULL; - timeptr->tm_wday = ret - 1; - break; - case 'w' : - if (parse_number(&buf, 1, &ret)) - return NULL; - timeptr->tm_wday = ret; - break; - case 'U' : - if (parse_number(&buf, 2, &ret)) - return NULL; - set_week_number_sun (timeptr, ret); - break; - case 'V' : - if (parse_number(&buf, 2, &ret)) - return NULL; - set_week_number_mon4 (timeptr, ret); - break; - case 'W' : - if (parse_number(&buf, 2, &ret)) - return NULL; - set_week_number_mon (timeptr, ret); - break; - case 'x' : - s = strptime (buf, "%Y:%m:%d", timeptr); - if (s == NULL) - return NULL; - buf = s; - break; - case 'y' : - if (parse_number(&buf, 2, &ret)) - return NULL; - if (ret < 70) - timeptr->tm_year = 100 + ret; - else - timeptr->tm_year = ret; - break; - case 'Y' : - if (parse_number(&buf, 4, &ret)) - return NULL; - timeptr->tm_year = ret - tm_year_base; - 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 rk_UNCONST(buf); -} diff --git a/kerberosV/src/lib/roken/strsep.c b/kerberosV/src/lib/roken/strsep.c deleted file mode 100644 index 76b447c373d..00000000000 --- a/kerberosV/src/lib/roken/strsep.c +++ /dev/null @@ -1,58 +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. - */ - -#include - -#include - -#include "roken.h" - -#ifndef HAVE_STRSEP - -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/strsep_copy.c b/kerberosV/src/lib/roken/strsep_copy.c deleted file mode 100644 index 1228f1a4504..00000000000 --- a/kerberosV/src/lib/roken/strsep_copy.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2000, 2002 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 - -#include - -#include "roken.h" - -#ifndef HAVE_STRSEP_COPY - -/* strsep, but with const stringp, so return string in buf */ - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -strsep_copy(const char **stringp, const char *delim, char *buf, size_t len) -{ - const char *save = *stringp; - size_t l; - if(save == NULL) - return -1; - *stringp = *stringp + strcspn(*stringp, delim); - l = min(len, (size_t)(*stringp - save)); - if(len > 0) { - memcpy(buf, save, l); - buf[l] = '\0'; - } - - l = *stringp - save; - if(**stringp == '\0') - *stringp = NULL; - else - (*stringp)++; - return l; -} - -#endif diff --git a/kerberosV/src/lib/roken/strtok_r.c b/kerberosV/src/lib/roken/strtok_r.c deleted file mode 100644 index 16a9daf2462..00000000000 --- a/kerberosV/src/lib/roken/strtok_r.c +++ /dev/null @@ -1,62 +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. - */ - -#include - -#include - -#include "roken.h" - -#ifndef HAVE_STRTOK_R - -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -strtok_r(char *s1, const char *s2, char **lasts) -{ - char *ret; - - if (s1 == NULL) - s1 = *lasts; - while(*s1 && strchr(s2, *s1)) - ++s1; - if(*s1 == '\0') - return NULL; - ret = s1; - while(*s1 && !strchr(s2, *s1)) - ++s1; - if(*s1) - *s1++ = '\0'; - *lasts = s1; - return ret; -} - -#endif /* HAVE_STRTOK_R */ diff --git a/kerberosV/src/lib/roken/strupr.c b/kerberosV/src/lib/roken/strupr.c deleted file mode 100644 index fdff7f44a89..00000000000 --- a/kerberosV/src/lib/roken/strupr.c +++ /dev/null @@ -1,50 +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. - */ - -#include -#include -#include - -#include "roken.h" - -#ifndef HAVE_STRUPR -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -strupr(char *str) -{ - char *s; - - for(s = str; *s; s++) - *s = toupper((unsigned char)*s); - return str; -} -#endif diff --git a/kerberosV/src/lib/roken/swab.c b/kerberosV/src/lib/roken/swab.c deleted file mode 100644 index 9b8d1d1f98a..00000000000 --- a/kerberosV/src/lib/roken/swab.c +++ /dev/null @@ -1,50 +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. - */ - -#include -#include "roken.h" - -#ifndef HAVE_SWAB - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/test-mem.c b/kerberosV/src/lib/roken/test-mem.c deleted file mode 100644 index 2ce961e0634..00000000000 --- a/kerberosV/src/lib/roken/test-mem.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) 1999 - 2004 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 - -#ifdef HAVE_SYS_MMAN_H -#include -#endif -#include -#include -#include -#include "roken.h" - -#include "test-mem.h" - -/* #undef HAVE_MMAP */ - -struct { - void *start; - size_t size; - void *data_start; - size_t data_size; - enum rk_test_mem_type type; - int fd; -} map; - -#ifdef HAVE_SIGACTION - -struct sigaction sa, osa; - -#else - -void (* osigh)(int); - -#endif - -char *testname; - -static RETSIGTYPE -segv_handler(int sig) -{ - int fd; - char msg[] = "SIGSEGV i current test: "; - - fd = open("/dev/stdout", O_WRONLY, 0600); - if (fd >= 0) { - (void)write(fd, msg, sizeof(msg) - 1); - (void)write(fd, testname, strlen(testname)); - (void)write(fd, "\n", 1); - close(fd); - } - _exit(1); -} - -#define TESTREC() \ - if (testname) \ - errx(1, "test %s run recursively on %s", name, testname); \ - testname = strdup(name); \ - if (testname == NULL) \ - errx(1, "malloc"); - - -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL -rk_test_mem_alloc(enum rk_test_mem_type type, const char *name, - void *buf, size_t size) -{ -#ifndef HAVE_MMAP - unsigned char *p; - - TESTREC(); - - p = malloc(size + 2); - if (p == NULL) - errx(1, "malloc"); - map.type = type; - map.start = p; - map.size = size + 2; - p[0] = 0xff; - p[map.size-1] = 0xff; - map.data_start = p + 1; -#else - unsigned char *p; - int flags, ret, fd; - size_t pagesize = getpagesize(); - - TESTREC(); - - map.type = type; - -#ifdef MAP_ANON - flags = MAP_ANON; - fd = -1; -#else - flags = 0; - fd = open ("/dev/zero", O_RDONLY); - if(fd < 0) - err (1, "open /dev/zero"); -#endif - map.fd = fd; - flags |= MAP_PRIVATE; - - map.size = size + pagesize - (size % pagesize) + pagesize * 2; - - p = (unsigned char *)mmap(0, map.size, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (p == (unsigned char *)MAP_FAILED) - err (1, "mmap"); - - map.start = p; - - ret = mprotect ((void *)p, pagesize, 0); - if (ret < 0) - err (1, "mprotect"); - - ret = mprotect (p + map.size - pagesize, pagesize, 0); - if (ret < 0) - err (1, "mprotect"); - - switch (type) { - case RK_TM_OVERRUN: - map.data_start = p + map.size - pagesize - size; - break; - case RK_TM_UNDERRUN: - map.data_start = p + pagesize; - break; - default: - abort(); - } -#endif -#ifdef HAVE_SIGACTION - sigemptyset (&sa.sa_mask); - sa.sa_flags = 0; -#ifdef SA_RESETHAND - sa.sa_flags |= SA_RESETHAND; -#endif - sa.sa_handler = segv_handler; - sigaction (SIGSEGV, &sa, &osa); -#else - osigh = signal(SIGSEGV, segv_handler); -#endif - - map.data_size = size; - if (buf) - memcpy(map.data_start, buf, size); - return map.data_start; -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_test_mem_free(const char *map_name) -{ -#ifndef HAVE_MMAP - unsigned char *p = map.start; - - if (testname == NULL) - errx(1, "test_mem_free call on no free"); - - if (p[0] != 0xff) - errx(1, "%s: %s underrun %x\n", testname, map_name, p[0]); - if (p[map.size-1] != 0xff) - errx(1, "%s: %s overrun %x\n", testname, map_name, p[map.size - 1]); - free(map.start); -#else - int ret; - - if (testname == NULL) - errx(1, "test_mem_free call on no free"); - - ret = munmap (map.start, map.size); - if (ret < 0) - err (1, "munmap"); - if (map.fd > 0) - close(map.fd); -#endif - free(testname); - testname = NULL; - -#ifdef HAVE_SIGACTION - sigaction (SIGSEGV, &osa, NULL); -#else - signal (SIGSEGV, osigh); -#endif -} diff --git a/kerberosV/src/lib/roken/test-mem.h b/kerberosV/src/lib/roken/test-mem.h deleted file mode 100644 index 4d900b4a6a3..00000000000 --- a/kerberosV/src/lib/roken/test-mem.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 1999 - 2004 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. - */ - -enum rk_test_mem_type { RK_TM_OVERRUN, RK_TM_UNDERRUN }; - -ROKEN_LIB_FUNCTION void * ROKEN_LIB_CALL - rk_test_mem_alloc(enum rk_test_mem_type, const char *, void *, size_t); -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL - rk_test_mem_free(const char *); diff --git a/kerberosV/src/lib/roken/test-readenv.c b/kerberosV/src/lib/roken/test-readenv.c deleted file mode 100644 index 24a666184b9..00000000000 --- a/kerberosV/src/lib/roken/test-readenv.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2005 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 - -#include "roken.h" -#include "test-mem.h" - -char *s1 = "VAR1=VAL1#comment\n\ -VAR2=VAL2 VAL2 #comment\n\ -#this another comment\n\ -\n\ -VAR3=FOO"; - -char *s2 = "VAR1=ENV2\n\ -"; - -static void -make_file(char *tmpl, size_t l) -{ - int fd; - strlcpy(tmpl, "env.XXXXXX", l); - fd = mkstemp(tmpl); - if(fd < 0) - err(1, "mkstemp"); - close(fd); -} - -static void -write_file(const char *fn, const char *s) -{ - FILE *f; - f = fopen(fn, "w"); - if(f == NULL) { - unlink(fn); - err(1, "fopen"); - } - if(fwrite(s, 1, strlen(s), f) != strlen(s)) - err(1, "short write"); - if(fclose(f) != 0) { - unlink(fn); - err(1, "fclose"); - } -} - -int -main(int argc, char **argv) -{ - char **env = NULL; - int count = 0; - char fn[MAXPATHLEN]; - int error = 0; - - make_file(fn, sizeof(fn)); - - write_file(fn, s1); - count = read_environment(fn, &env); - if(count != 3) { - warnx("test 1: variable count %d != 3", count); - error++; - } - - write_file(fn, s2); - count = read_environment(fn, &env); - if(count != 1) { - warnx("test 2: variable count %d != 1", count); - error++; - } - - unlink(fn); - count = read_environment(fn, &env); - if(count != 0) { - warnx("test 3: variable count %d != 0", count); - error++; - } - for(count = 0; env && env[count]; count++); - if(count != 3) { - warnx("total variable count %d != 3", count); - error++; - } - free_environment(env); - - - return error; -} diff --git a/kerberosV/src/lib/roken/timegm.c b/kerberosV/src/lib/roken/timegm.c deleted file mode 100644 index e6c8992ad21..00000000000 --- a/kerberosV/src/lib/roken/timegm.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 1997, 2006 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 - -#include "roken.h" - -static int -is_leap(unsigned y) -{ - y += 1900; - return (y % 4) == 0 && ((y % 100) != 0 || (y % 400) == 0); -} - -/* - * XXX This is a simplifed version of timegm, it needs to support out of - * bounds values. - */ - -time_t -rk_timegm (struct tm *tm) -{ - static const unsigned ndays[2][12] ={ - {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, - {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}}; - time_t res = 0; - unsigned i; - - if (tm->tm_year < 0) - return -1; - if (tm->tm_mon < 0 || tm->tm_mon > 11) - return -1; - if (tm->tm_mday < 1 || tm->tm_mday > ndays[is_leap(tm->tm_year)][tm->tm_mon]) - return -1; - if (tm->tm_hour < 0 || tm->tm_hour > 23) - return -1; - if (tm->tm_min < 0 || tm->tm_min > 59) - return -1; - if (tm->tm_sec < 0 || tm->tm_sec > 59) - return -1; - - for (i = 70; i < tm->tm_year; ++i) - res += is_leap(i) ? 366 : 365; - - for (i = 0; i < tm->tm_mon; ++i) - res += ndays[is_leap(tm->tm_year)][i]; - res += tm->tm_mday - 1; - res *= 24; - res += tm->tm_hour; - res *= 60; - res += tm->tm_min; - res *= 60; - res += tm->tm_sec; - return res; -} diff --git a/kerberosV/src/lib/roken/timeval.c b/kerberosV/src/lib/roken/timeval.c deleted file mode 100644 index 38b1f7ce9c3..00000000000 --- a/kerberosV/src/lib/roken/timeval.c +++ /dev/null @@ -1,81 +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. - */ - -/* - * Timeval stuff - */ - -#include - -#include "roken.h" - -/* - * Make `t1' consistent. - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -timevalfix(struct timeval *t1) -{ - if (t1->tv_usec < 0) { - t1->tv_sec--; - t1->tv_usec += 1000000; - } - if (t1->tv_usec >= 1000000) { - t1->tv_sec++; - t1->tv_usec -= 1000000; - } -} - -/* - * t1 += t2 - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -timevaladd(struct timeval *t1, const struct timeval *t2) -{ - t1->tv_sec += t2->tv_sec; - t1->tv_usec += t2->tv_usec; - timevalfix(t1); -} - -/* - * t1 -= t2 - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -timevalsub(struct timeval *t1, const struct timeval *t2) -{ - t1->tv_sec -= t2->tv_sec; - t1->tv_usec -= t2->tv_usec; - timevalfix(t1); -} diff --git a/kerberosV/src/lib/roken/tm2time.c b/kerberosV/src/lib/roken/tm2time.c deleted file mode 100644 index ba69a048793..00000000000 --- a/kerberosV/src/lib/roken/tm2time.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1995, 1996, 1997, 2004 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 - -#ifdef TIME_WITH_SYS_TIME -#include -#include -#elif defined(HAVE_SYS_TIME_H) -#include -#else -#include -#endif -#include "roken.h" - -ROKEN_LIB_FUNCTION time_t ROKEN_LIB_CALL -tm2time (struct tm tm, int local) -{ - time_t t; - - tm.tm_isdst = local ? -1 : 0; - - t = mktime (&tm); - - if (!local) - t += t - mktime (gmtime (&t)); - return t; -} diff --git a/kerberosV/src/lib/roken/tsearch-test.c b/kerberosV/src/lib/roken/tsearch-test.c deleted file mode 100644 index b9d99635a8e..00000000000 --- a/kerberosV/src/lib/roken/tsearch-test.c +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Tree search generalized from Knuth (6.2.2) Algorithm T just like - * the AT&T man page says. - * - * The node_t structure is for internal use only, lint doesn't grok it. - * - * Written by reading the System V Interface Definition, not the code. - * - * Totally public domain. - */ - -#include - -#include "roken.h" -#include "search.h" - -struct node { - char *string; - int order; -}; - -extern void *rk_tdelete(const void *, void **, - int (*)(const void *, const void *)); -extern void *rk_tfind(const void *, void * const *, - int (*)(const void *, const void *)); -extern void *rk_tsearch(const void *, void **, int (*)(const void *, const void *)); -extern void rk_twalk(const void *, void (*)(const void *, VISIT, int)); - -void *rootnode = NULL; -int numerr = 0; - -/* - * This routine compares two nodes, based on an - * alphabetical ordering of the string field. - */ -int -node_compare(const void *node1, const void *node2) -{ - return strcmp(((const struct node *) node1)->string, - ((const struct node *) node2)->string); -} - -static int walkorder = -1; - -void -list_node(const void *ptr, VISIT order, int level) -{ - const struct node *p = *(const struct node **) ptr; - - if (order == postorder || order == leaf) { - walkorder++; - if (p->order != walkorder) { - warnx("sort failed: expected %d next, got %d\n", walkorder, - p->order); - numerr++; - } - } -} - -int -main(int argc, char **argv) -{ - int numtest = 1; - struct node *t, *p, tests[] = { - { "", 0 }, - { "ab", 3 }, - { "abc", 4 }, - { "abcdefg", 8 }, - { "abcd", 5 }, - { "a", 2 }, - { "abcdef", 7 }, - { "abcde", 6 }, - { "=", 1 }, - { NULL } - }; - - for(t = tests; t->string; t++) { - /* Better not be there */ - p = (struct node *)rk_tfind((void *)t, (void **)&rootnode, - node_compare); - - if (p) { - warnx("erroneous list: found %d\n", p->order); - numerr++; - } - - /* Put node into the tree. */ - p = (struct node *) rk_tsearch((void *)t, (void **)&rootnode, - node_compare); - - if (!p) { - warnx("erroneous list: missing %d\n", t->order); - numerr++; - } - } - - rk_twalk(rootnode, list_node); - - for(t = tests; t->string; t++) { - /* Better be there */ - p = (struct node *) rk_tfind((void *)t, (void **)&rootnode, - node_compare); - - if (!p) { - warnx("erroneous list: missing %d\n", t->order); - numerr++; - } - - /* pull out node */ - (void) rk_tdelete((void *)t, (void **)&rootnode, - node_compare); - - /* Better not be there */ - p = (struct node *) rk_tfind((void *)t, (void **)&rootnode, - node_compare); - - if (p) { - warnx("erroneous list: found %d\n", p->order); - numerr++; - } - - } - - return numerr; -} diff --git a/kerberosV/src/lib/roken/tsearch.c b/kerberosV/src/lib/roken/tsearch.c deleted file mode 100644 index 65328d367df..00000000000 --- a/kerberosV/src/lib/roken/tsearch.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Tree search generalized from Knuth (6.2.2) Algorithm T just like - * the AT&T man page says. - * - * The node_t structure is for internal use only, lint doesn't grok it. - * - * Written by reading the System V Interface Definition, not the code. - * - * Totally public domain. - * - * $NetBSD: tsearch.c,v 1.3 1999/09/16 11:45:37 lukem Exp $ - * $NetBSD: twalk.c,v 1.1 1999/02/22 10:33:16 christos Exp $ - * $NetBSD: tdelete.c,v 1.2 1999/09/16 11:45:37 lukem Exp $ - * $NetBSD: tfind.c,v 1.2 1999/09/16 11:45:37 lukem Exp $ - */ - -#include -#include "roken.h" -#include "search.h" -#include - -typedef struct node { - char *key; - struct node *llink, *rlink; -} node_t; - -#ifndef __DECONST -#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) -#endif - -/* - * find or insert datum into search tree - * - * Parameters: - * vkey: key to be located - * vrootp: address of tree root - */ - -ROKEN_LIB_FUNCTION void * -rk_tsearch(const void *vkey, void **vrootp, - int (*compar)(const void *, const void *)) -{ - node_t *q; - node_t **rootp = (node_t **)vrootp; - - if (rootp == NULL) - return NULL; - - while (*rootp != NULL) { /* Knuth's T1: */ - int r; - - if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */ - return *rootp; /* we found it! */ - - rootp = (r < 0) ? - &(*rootp)->llink : /* T3: follow left branch */ - &(*rootp)->rlink; /* T4: follow right branch */ - } - - q = malloc(sizeof(node_t)); /* T5: key not found */ - if (q != 0) { /* make new node */ - *rootp = q; /* link new node to old */ - /* LINTED const castaway ok */ - q->key = __DECONST(void *, vkey); /* initialize new node */ - q->llink = q->rlink = NULL; - } - return q; -} - -/* - * Walk the nodes of a tree - * - * Parameters: - * root: Root of the tree to be walked - */ -static void -trecurse(const node_t *root, void (*action)(const void *, VISIT, int), - int level) -{ - - if (root->llink == NULL && root->rlink == NULL) - (*action)(root, leaf, level); - else { - (*action)(root, preorder, level); - if (root->llink != NULL) - trecurse(root->llink, action, level + 1); - (*action)(root, postorder, level); - if (root->rlink != NULL) - trecurse(root->rlink, action, level + 1); - (*action)(root, endorder, level); - } -} - -/* - * Walk the nodes of a tree - * - * Parameters: - * vroot: Root of the tree to be walked - */ -ROKEN_LIB_FUNCTION void -rk_twalk(const void *vroot, - void (*action)(const void *, VISIT, int)) -{ - if (vroot != NULL && action != NULL) - trecurse(vroot, action, 0); -} - -/* - * delete node with given key - * - * vkey: key to be deleted - * vrootp: address of the root of the tree - * compar: function to carry out node comparisons - */ -ROKEN_LIB_FUNCTION void * -rk_tdelete(const void * vkey, void ** vrootp, - int (*compar)(const void *, const void *)) -{ - node_t **rootp = (node_t **)vrootp; - node_t *p, *q, *r; - int cmp; - - if (rootp == NULL || (p = *rootp) == NULL) - return NULL; - - while ((cmp = (*compar)(vkey, (*rootp)->key)) != 0) { - p = *rootp; - rootp = (cmp < 0) ? - &(*rootp)->llink : /* follow llink branch */ - &(*rootp)->rlink; /* follow rlink branch */ - if (*rootp == NULL) - return NULL; /* key not found */ - } - r = (*rootp)->rlink; /* D1: */ - if ((q = (*rootp)->llink) == NULL) /* Left NULL? */ - q = r; - else if (r != NULL) { /* Right link is NULL? */ - if (r->llink == NULL) { /* D2: Find successor */ - r->llink = q; - q = r; - } else { /* D3: Find NULL link */ - for (q = r->llink; q->llink != NULL; q = r->llink) - r = q; - r->llink = q->rlink; - q->llink = (*rootp)->llink; - q->rlink = (*rootp)->rlink; - } - } - free(*rootp); /* D4: Free node */ - *rootp = q; /* link parent to new node */ - return p; -} - -/* - * find a node, or return 0 - * - * Parameters: - * vkey: key to be found - * vrootp: address of the tree root - */ -ROKEN_LIB_FUNCTION void * -rk_tfind(const void *vkey, void * const *vrootp, - int (*compar)(const void *, const void *)) -{ - node_t **rootp = (node_t **)vrootp; - - if (rootp == NULL) - return NULL; - - while (*rootp != NULL) { /* T1: */ - int r; - - if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */ - return *rootp; /* key found */ - rootp = (r < 0) ? - &(*rootp)->llink : /* T3: follow left branch */ - &(*rootp)->rlink; /* T4: follow right branch */ - } - return NULL; -} diff --git a/kerberosV/src/lib/roken/unsetenv.c b/kerberosV/src/lib/roken/unsetenv.c deleted file mode 100644 index 55ba5e36d9e..00000000000 --- a/kerberosV/src/lib/roken/unsetenv.c +++ /dev/null @@ -1,69 +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. - */ - -#include - -#include -#include - -#include "roken.h" - -#if !HAVE_DECL_ENVIRON -extern char **environ; -#endif - -/* - * unsetenv -- - */ -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -unsetenv(const char *name) -{ - int len; - const char *np; - char **p; - - if (name == 0 || environ == 0) - return; - - for (np = name; *np && *np != '='; np++) - /* nop */; - len = np - name; - - for (p = environ; *p != 0; p++) - if (strncmp(*p, name, len) == 0 && (*p)[len] == '=') - break; - - for (; *p != 0; p++) - *p = *(p + 1); -} - diff --git a/kerberosV/src/lib/roken/unvis.c b/kerberosV/src/lib/roken/unvis.c deleted file mode 100644 index f95424fbf9f..00000000000 --- a/kerberosV/src/lib/roken/unvis.c +++ /dev/null @@ -1,283 +0,0 @@ -/* $NetBSD: unvis.c,v 1.19 2000/01/22 22:19:13 mycroft Exp $ */ - -/*- - * Copyright (c) 1989, 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. 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 1 -#include -#include "roken.h" -#ifndef _DIAGASSERT -#define _DIAGASSERT(X) -#endif -#else -#include -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: unvis.c,v 1.19 2000/01/22 22:19:13 mycroft Exp $"); -#endif -#endif /* LIBC_SCCS and not lint */ - -#define __LIBC12_SOURCE__ - -#include "namespace.h" -#endif -#include - -#include -#include -#include -#include - -#if 0 -#ifdef __weak_alias -__weak_alias(strunvis,_strunvis) -__weak_alias(unvis,_unvis) -#endif - -__warn_references(unvis, - "warning: reference to compatibility unvis(); include for correct reference") -#endif - -/* - * decode driven by state machine - */ -#define S_GROUND 0 /* haven't seen escape char */ -#define S_START 1 /* start decoding special sequence */ -#define S_META 2 /* metachar started (M) */ -#define S_META1 3 /* metachar more, regular char (-) */ -#define S_CTRL 4 /* control char started (^) */ -#define S_OCTAL2 5 /* octal digit 2 */ -#define S_OCTAL3 6 /* octal digit 3 */ - -#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strunvis (char *, const char *); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_unvis (char *, int, int *, int); - -/* - * unvis - decode characters previously encoded by vis - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_unvis(char *cp, int c, int *astate, int flag) -{ - - _DIAGASSERT(cp != NULL); - _DIAGASSERT(astate != NULL); - - if (flag & UNVIS_END) { - if (*astate == S_OCTAL2 || *astate == S_OCTAL3) { - *astate = S_GROUND; - return (UNVIS_VALID); - } - return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD); - } - - switch (*astate) { - - case S_GROUND: - *cp = 0; - if (c == '\\') { - *astate = S_START; - return (0); - } - *cp = c; - return (UNVIS_VALID); - - case S_START: - switch(c) { - case '\\': - *cp = c; - *astate = S_GROUND; - return (UNVIS_VALID); - case '0': case '1': case '2': case '3': - case '4': case '5': case '6': case '7': - *cp = (c - '0'); - *astate = S_OCTAL2; - return (0); - case 'M': - *cp = (u_char)0200; - *astate = S_META; - return (0); - case '^': - *astate = S_CTRL; - return (0); - case 'n': - *cp = '\n'; - *astate = S_GROUND; - return (UNVIS_VALID); - case 'r': - *cp = '\r'; - *astate = S_GROUND; - return (UNVIS_VALID); - case 'b': - *cp = '\b'; - *astate = S_GROUND; - return (UNVIS_VALID); - case 'a': - *cp = '\007'; - *astate = S_GROUND; - return (UNVIS_VALID); - case 'v': - *cp = '\v'; - *astate = S_GROUND; - return (UNVIS_VALID); - case 't': - *cp = '\t'; - *astate = S_GROUND; - return (UNVIS_VALID); - case 'f': - *cp = '\f'; - *astate = S_GROUND; - return (UNVIS_VALID); - case 's': - *cp = ' '; - *astate = S_GROUND; - return (UNVIS_VALID); - case 'E': - *cp = '\033'; - *astate = S_GROUND; - return (UNVIS_VALID); - case '\n': - /* - * hidden newline - */ - *astate = S_GROUND; - return (UNVIS_NOCHAR); - case '$': - /* - * hidden marker - */ - *astate = S_GROUND; - return (UNVIS_NOCHAR); - } - *astate = S_GROUND; - return (UNVIS_SYNBAD); - - case S_META: - if (c == '-') - *astate = S_META1; - else if (c == '^') - *astate = S_CTRL; - else { - *astate = S_GROUND; - return (UNVIS_SYNBAD); - } - return (0); - - case S_META1: - *astate = S_GROUND; - *cp |= c; - return (UNVIS_VALID); - - case S_CTRL: - if (c == '?') - *cp |= 0177; - else - *cp |= c & 037; - *astate = S_GROUND; - return (UNVIS_VALID); - - case S_OCTAL2: /* second possible octal digit */ - if (isoctal(c)) { - /* - * yes - and maybe a third - */ - *cp = (*cp << 3) + (c - '0'); - *astate = S_OCTAL3; - return (0); - } - /* - * no - done with current sequence, push back passed char - */ - *astate = S_GROUND; - return (UNVIS_VALIDPUSH); - - case S_OCTAL3: /* third possible octal digit */ - *astate = S_GROUND; - if (isoctal(c)) { - *cp = (*cp << 3) + (c - '0'); - return (UNVIS_VALID); - } - /* - * we were done, push back passed char - */ - return (UNVIS_VALIDPUSH); - - default: - /* - * decoder in unknown state - (probably uninitialized) - */ - *astate = S_GROUND; - return (UNVIS_SYNBAD); - } -} - -/* - * strunvis - decode src into dst - * - * Number of chars decoded into dst is returned, -1 on error. - * Dst is null terminated. - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_strunvis(char *dst, const char *src) -{ - char c; - char *start = dst; - int state = 0; - - _DIAGASSERT(src != NULL); - _DIAGASSERT(dst != NULL); - - while ((c = *src++) != '\0') { - again: - switch (rk_unvis(dst, (unsigned char)c, &state, 0)) { - case UNVIS_VALID: - dst++; - break; - case UNVIS_VALIDPUSH: - dst++; - goto again; - case 0: - case UNVIS_NOCHAR: - break; - default: - return (-1); - } - } - if (unvis(dst, (unsigned char)c, &state, UNVIS_END) == UNVIS_VALID) - dst++; - *dst = '\0'; - return (dst - start); -} diff --git a/kerberosV/src/lib/roken/verify.c b/kerberosV/src/lib/roken/verify.c deleted file mode 100644 index fc8fc57b6f4..00000000000 --- a/kerberosV/src/lib/roken/verify.c +++ /dev/null @@ -1,59 +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. - */ - -#include - -#include -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_CRYPT_H -#include -#endif -#include "roken.h" - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -unix_verify_user(char *user, char *password) -{ - struct passwd *pw; - - pw = k_getpwnam(user); - if(pw == NULL) - return -1; - if(strlen(pw->pw_passwd) == 0 && strlen(password) == 0) - return 0; - if(strcmp(crypt(password, pw->pw_passwd), pw->pw_passwd) == 0) - return 0; - return -1; -} - diff --git a/kerberosV/src/lib/roken/verr.c b/kerberosV/src/lib/roken/verr.c deleted file mode 100644 index cd3cdf35ea6..00000000000 --- a/kerberosV/src/lib/roken/verr.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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 - -#include "roken.h" -#include - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -verr(int eval, const char *fmt, va_list ap) -{ - rk_warnerr(1, fmt, ap); - exit(eval); -} diff --git a/kerberosV/src/lib/roken/verrx.c b/kerberosV/src/lib/roken/verrx.c deleted file mode 100644 index 84645181c87..00000000000 --- a/kerberosV/src/lib/roken/verrx.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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 - -#include "roken.h" -#include - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -verrx(int eval, const char *fmt, va_list ap) -{ - rk_warnerr(0, fmt, ap); - exit(eval); -} diff --git a/kerberosV/src/lib/roken/vis.c b/kerberosV/src/lib/roken/vis.c deleted file mode 100644 index aba30a1c184..00000000000 --- a/kerberosV/src/lib/roken/vis.c +++ /dev/null @@ -1,422 +0,0 @@ -/* $NetBSD: vis.c,v 1.37 2008/07/25 22:29:23 dsl Exp $ */ - -/*- - * Copyright (c) 1989, 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. 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. - */ - -/*- - * Copyright (c) 1999, 2005 The NetBSD Foundation, Inc. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 1 -#include -#include "roken.h" -#ifndef _DIAGASSERT -#define _DIAGASSERT(X) -#endif -#else /* heimdal */ -#include -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vis.c,v 1.37 2008/07/25 22:29:23 dsl Exp $"); -#endif /* LIBC_SCCS and not lint */ - -#include "namespace.h" -#endif /* heimdal */ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#if 0 -#ifdef __weak_alias -__weak_alias(strsvis,_strsvis) -__weak_alias(strsvisx,_strsvisx) -__weak_alias(strvis,_strvis) -__weak_alias(strvisx,_strvisx) -__weak_alias(svis,_svis) -__weak_alias(vis,_vis) -#endif -#endif - -#if !HAVE_VIS || !HAVE_SVIS -#include -#include -#include -#include - -static char *do_svis(char *, int, int, int, const char *); - -#undef BELL -#if defined(__STDC__) -#define BELL '\a' -#else -#define BELL '\007' -#endif - -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL - rk_vis (char *, int, int, int); -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL - rk_svis (char *, int, int, int, const char *); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strvis (char *, const char *, int); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strsvis (char *, const char *, int, const char *); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strvisx (char *, const char *, size_t, int); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strsvisx (char *, const char *, size_t, int, const char *); - - -#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') -#define iswhite(c) (c == ' ' || c == '\t' || c == '\n') -#define issafe(c) (c == '\b' || c == BELL || c == '\r') -#define xtoa(c) "0123456789abcdef"[c] - -#define MAXEXTRAS 5 - -#define MAKEEXTRALIST(flag, extra, orig_str) \ -do { \ - const char *orig = orig_str; \ - const char *o = orig; \ - char *e; \ - while (*o++) \ - continue; \ - extra = malloc((size_t)((o - orig) + MAXEXTRAS)); \ - if (!extra) break; \ - for (o = orig, e = extra; (*e++ = *o++) != '\0';) \ - continue; \ - e--; \ - if (flag & VIS_SP) *e++ = ' '; \ - if (flag & VIS_TAB) *e++ = '\t'; \ - if (flag & VIS_NL) *e++ = '\n'; \ - if ((flag & VIS_NOSLASH) == 0) *e++ = '\\'; \ - *e = '\0'; \ -} while (/*CONSTCOND*/0) - -/* - * This is do_hvis, for HTTP style (RFC 1808) - */ -static char * -do_hvis(char *dst, int c, int flag, int nextc, const char *extra) -{ - if (!isascii(c) || !isalnum(c) || strchr("$-_.+!*'(),", c) != NULL) { - *dst++ = '%'; - *dst++ = xtoa(((unsigned int)c >> 4) & 0xf); - *dst++ = xtoa((unsigned int)c & 0xf); - } else { - dst = do_svis(dst, c, flag, nextc, extra); - } - return dst; -} - -/* - * This is do_vis, the central code of vis. - * dst: Pointer to the destination buffer - * c: Character to encode - * flag: Flag word - * nextc: The character following 'c' - * extra: Pointer to the list of extra characters to be - * backslash-protected. - */ -static char * -do_svis(char *dst, int c, int flag, int nextc, const char *extra) -{ - int isextra; - isextra = strchr(extra, c) != NULL; - if (!isextra && isascii(c) && (isgraph(c) || iswhite(c) || - ((flag & VIS_SAFE) && issafe(c)))) { - *dst++ = c; - return dst; - } - if (flag & VIS_CSTYLE) { - switch (c) { - case '\n': - *dst++ = '\\'; *dst++ = 'n'; - return dst; - case '\r': - *dst++ = '\\'; *dst++ = 'r'; - return dst; - case '\b': - *dst++ = '\\'; *dst++ = 'b'; - return dst; - case BELL: - *dst++ = '\\'; *dst++ = 'a'; - return dst; - case '\v': - *dst++ = '\\'; *dst++ = 'v'; - return dst; - case '\t': - *dst++ = '\\'; *dst++ = 't'; - return dst; - case '\f': - *dst++ = '\\'; *dst++ = 'f'; - return dst; - case ' ': - *dst++ = '\\'; *dst++ = 's'; - return dst; - case '\0': - *dst++ = '\\'; *dst++ = '0'; - if (isoctal(nextc)) { - *dst++ = '0'; - *dst++ = '0'; - } - return dst; - default: - if (isgraph(c)) { - *dst++ = '\\'; *dst++ = c; - return dst; - } - } - } - if (isextra || ((c & 0177) == ' ') || (flag & VIS_OCTAL)) { - *dst++ = '\\'; - *dst++ = (u_char)(((unsigned int)(u_char)c >> 6) & 03) + '0'; - *dst++ = (u_char)(((unsigned int)(u_char)c >> 3) & 07) + '0'; - *dst++ = (u_char)( c & 07) + '0'; - } else { - if ((flag & VIS_NOSLASH) == 0) *dst++ = '\\'; - if (c & 0200) { - c &= 0177; *dst++ = 'M'; - } - if (iscntrl(c)) { - *dst++ = '^'; - if (c == 0177) - *dst++ = '?'; - else - *dst++ = c + '@'; - } else { - *dst++ = '-'; *dst++ = c; - } - } - return dst; -} - - -/* - * svis - visually encode characters, also encoding the characters - * pointed to by `extra' - */ -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -rk_svis(char *dst, int c, int flag, int nextc, const char *extra) -{ - char *nextra = NULL; - - _DIAGASSERT(dst != NULL); - _DIAGASSERT(extra != NULL); - MAKEEXTRALIST(flag, nextra, extra); - if (!nextra) { - *dst = '\0'; /* can't create nextra, return "" */ - return dst; - } - if (flag & VIS_HTTPSTYLE) - dst = do_hvis(dst, c, flag, nextc, nextra); - else - dst = do_svis(dst, c, flag, nextc, nextra); - free(nextra); - *dst = '\0'; - return dst; -} - - -/* - * strsvis, strsvisx - visually encode characters from src into dst - * - * Extra is a pointer to a \0-terminated list of characters to - * be encoded, too. These functions are useful e. g. to - * encode strings in such a way so that they are not interpreted - * by a shell. - * - * Dst must be 4 times the size of src to account for possible - * expansion. The length of dst, not including the trailing NULL, - * is returned. - * - * Strsvisx encodes exactly len bytes from src into dst. - * This is useful for encoding a block of data. - */ - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_strsvis(char *dst, const char *csrc, int flag, const char *extra) -{ - int c; - char *start; - char *nextra = NULL; - const unsigned char *src = (const unsigned char *)csrc; - - _DIAGASSERT(dst != NULL); - _DIAGASSERT(src != NULL); - _DIAGASSERT(extra != NULL); - MAKEEXTRALIST(flag, nextra, extra); - if (!nextra) { - *dst = '\0'; /* can't create nextra, return "" */ - return 0; - } - if (flag & VIS_HTTPSTYLE) { - for (start = dst; (c = *src++) != '\0'; /* empty */) - dst = do_hvis(dst, c, flag, *src, nextra); - } else { - for (start = dst; (c = *src++) != '\0'; /* empty */) - dst = do_svis(dst, c, flag, *src, nextra); - } - free(nextra); - *dst = '\0'; - return (dst - start); -} - - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_strsvisx(char *dst, const char *csrc, size_t len, int flag, const char *extra) -{ - unsigned char c; - char *start; - char *nextra = NULL; - const unsigned char *src = (const unsigned char *)csrc; - - _DIAGASSERT(dst != NULL); - _DIAGASSERT(src != NULL); - _DIAGASSERT(extra != NULL); - MAKEEXTRALIST(flag, nextra, extra); - if (! nextra) { - *dst = '\0'; /* can't create nextra, return "" */ - return 0; - } - - if (flag & VIS_HTTPSTYLE) { - for (start = dst; len > 0; len--) { - c = *src++; - dst = do_hvis(dst, c, flag, len ? *src : '\0', nextra); - } - } else { - for (start = dst; len > 0; len--) { - c = *src++; - dst = do_svis(dst, c, flag, len ? *src : '\0', nextra); - } - } - free(nextra); - *dst = '\0'; - return (dst - start); -} -#endif - -#if !HAVE_VIS -/* - * vis - visually encode characters - */ -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -rk_vis(char *dst, int c, int flag, int nextc) -{ - char *extra = NULL; - unsigned char uc = (unsigned char)c; - - _DIAGASSERT(dst != NULL); - - MAKEEXTRALIST(flag, extra, ""); - if (! extra) { - *dst = '\0'; /* can't create extra, return "" */ - return dst; - } - if (flag & VIS_HTTPSTYLE) - dst = do_hvis(dst, uc, flag, nextc, extra); - else - dst = do_svis(dst, uc, flag, nextc, extra); - free(extra); - *dst = '\0'; - return dst; -} - - -/* - * strvis, strvisx - visually encode characters from src into dst - * - * Dst must be 4 times the size of src to account for possible - * expansion. The length of dst, not including the trailing NULL, - * is returned. - * - * Strvisx encodes exactly len bytes from src into dst. - * This is useful for encoding a block of data. - */ -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_strvis(char *dst, const char *src, int flag) -{ - char *extra = NULL; - int rv; - - MAKEEXTRALIST(flag, extra, ""); - if (!extra) { - *dst = '\0'; /* can't create extra, return "" */ - return 0; - } - rv = strsvis(dst, src, flag, extra); - free(extra); - return rv; -} - - -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL -rk_strvisx(char *dst, const char *src, size_t len, int flag) -{ - char *extra = NULL; - int rv; - - MAKEEXTRALIST(flag, extra, ""); - if (!extra) { - *dst = '\0'; /* can't create extra, return "" */ - return 0; - } - rv = strsvisx(dst, src, len, flag, extra); - free(extra); - return rv; -} -#endif diff --git a/kerberosV/src/lib/roken/vis.hin b/kerberosV/src/lib/roken/vis.hin deleted file mode 100644 index 25d662a9802..00000000000 --- a/kerberosV/src/lib/roken/vis.hin +++ /dev/null @@ -1,151 +0,0 @@ -/* $NetBSD: vis.h,v 1.16 2005/09/13 01:44:32 christos Exp $ */ - -/*- - * Copyright (c) 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. 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. - * - * @(#)vis.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _VIS_H_ -#define _VIS_H_ - -#ifndef ROKEN_LIB_FUNCTION -#ifdef _WIN32 -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL __cdecl -#else -#define ROKEN_LIB_FUNCTION -#define ROKEN_LIB_CALL -#endif -#endif - -#include - -#include - -/* - * to select alternate encoding format - */ -#define VIS_OCTAL 0x01 /* use octal \ddd format */ -#define VIS_CSTYLE 0x02 /* use \[nrft0..] where appropiate */ - -/* - * to alter set of characters encoded (default is to encode all - * non-graphic except space, tab, and newline). - */ -#define VIS_SP 0x04 /* also encode space */ -#define VIS_TAB 0x08 /* also encode tab */ -#define VIS_NL 0x10 /* also encode newline */ -#define VIS_WHITE (VIS_SP | VIS_TAB | VIS_NL) -#define VIS_SAFE 0x20 /* only encode "unsafe" characters */ - -/* - * other - */ -#define VIS_NOSLASH 0x40 /* inhibit printing '\' */ -#define VIS_HTTPSTYLE 0x80 /* http-style escape % HEX HEX */ - -/* - * unvis return codes - */ -#define UNVIS_VALID 1 /* character valid */ -#define UNVIS_VALIDPUSH 2 /* character valid, push back passed char */ -#define UNVIS_NOCHAR 3 /* valid sequence, no character produced */ -#define UNVIS_SYNBAD -1 /* unrecognized escape sequence */ -#define UNVIS_ERROR -2 /* decoder in unknown state (unrecoverable) */ - -/* - * unvis flags - */ -#define UNVIS_END 1 /* no more characters */ - -ROKEN_CPP_START - -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL - rk_vis(char *, int, int, int); -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL - rk_svis(char *, int, int, int, const char *); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strvis(char *, const char *, int); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strsvis(char *, const char *, int, const char *); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strvisx(char *, const char *, size_t, int); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strsvisx(char *, const char *, size_t, int, const char *); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strunvis(char *, const char *); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_strunvisx(char *, const char *, int); -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL - rk_unvis(char *, int, int *, int); - -ROKEN_CPP_END - -#ifndef HAVE_VIS -#undef vis -#define vis(a,b,c,d) rk_vis(a,b,c,d) -#endif - -#ifndef HAVE_SVIS -#undef svis -#define svis(a,b,c,d,e) rk_svis(a,b,c,d,e) -#endif - -#ifndef HAVE_STRVIS -#undef strvis -#define strvis(a,b,c) rk_strvis(a,b,c) -#endif - -#ifndef HAVE_STRSVIS -#undef strsvis -#define strsvis(a,b,c,d) rk_strsvis(a,b,c,d) -#endif - -#ifndef HAVE_STRVISX -#undef strvisx -#define strvisx(a,b,c,d) rk_strvisx(a,b,c,d) -#endif - -#ifndef HAVE_STRSVISX -#undef strsvisx -#define strsvisx(a,b,c,d,e) rk_strsvisx(a,b,c,d,e) -#endif - -#ifndef HAVE_STRUNVIS -#undef strunvis -#define strunvis(a,b) rk_strunvis(a,b) -#endif - - -#ifndef HAVE_UNVIS -#undef unvis -#define unvis(a,b,c,d) rk_unvis(a,b,c,d) -#endif - -#endif /* !_VIS_H_ */ diff --git a/kerberosV/src/lib/roken/vsyslog.c b/kerberosV/src/lib/roken/vsyslog.c deleted file mode 100644 index aea7086d712..00000000000 --- a/kerberosV/src/lib/roken/vsyslog.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include - -#ifndef HAVE_VSYSLOG - -#include -#include -#include - -#include "roken.h" - -/* - * the theory behind this is that we might be trying to call vsyslog - * when there's no memory left, and we should try to be as useful as - * possible. And the format string should say something about what's - * failing. - */ - -static void -simple_vsyslog(int pri, const char *fmt, va_list ap) -{ - syslog (pri, "%s", fmt); -} - -/* - * do like syslog but with a `va_list' - */ - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -vsyslog(int pri, const char *fmt, va_list ap) -{ - char *fmt2; - const char *p; - char *p2; - int ret; - int saved_errno = errno; - int fmt_len = strlen (fmt); - int fmt2_len = fmt_len; - char *buf; - - fmt2 = malloc (fmt_len + 1); - if (fmt2 == NULL) { - simple_vsyslog (pri, fmt, ap); - return; - } - - for (p = fmt, p2 = fmt2; *p != '\0'; ++p) { - if (p[0] == '%' && p[1] == 'm') { - const char *e = strerror (saved_errno); - int e_len = strlen (e); - char *tmp; - int pos; - - pos = p2 - fmt2; - fmt2_len += e_len - 2; - tmp = realloc (fmt2, fmt2_len + 1); - if (tmp == NULL) { - free (fmt2); - simple_vsyslog (pri, fmt, ap); - return; - } - fmt2 = tmp; - p2 = fmt2 + pos; - memmove (p2, e, e_len); - p2 += e_len; - ++p; - } else - *p2++ = *p; - } - *p2 = '\0'; - - ret = vasprintf (&buf, fmt2, ap); - free (fmt2); - if (ret < 0 || buf == NULL) { - simple_vsyslog (pri, fmt, ap); - return; - } - syslog (pri, "%s", buf); - free (buf); -} -#endif diff --git a/kerberosV/src/lib/roken/vwarn.c b/kerberosV/src/lib/roken/vwarn.c deleted file mode 100644 index 8f1706d4ab5..00000000000 --- a/kerberosV/src/lib/roken/vwarn.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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 - -#include "roken.h" -#include - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -vwarn(const char *fmt, va_list ap) -{ - rk_warnerr(1, fmt, ap); -} diff --git a/kerberosV/src/lib/roken/vwarnx.c b/kerberosV/src/lib/roken/vwarnx.c deleted file mode 100644 index 6fb1d8c8745..00000000000 --- a/kerberosV/src/lib/roken/vwarnx.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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 - -#include "roken.h" -#include - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -vwarnx(const char *fmt, va_list ap) -{ - rk_warnerr(0, fmt, ap); -} - diff --git a/kerberosV/src/lib/roken/warn.c b/kerberosV/src/lib/roken/warn.c deleted file mode 100644 index 09b9cf82e72..00000000000 --- a/kerberosV/src/lib/roken/warn.c +++ /dev/null @@ -1,45 +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. - */ - -#include - -#include "err.h" - -void -warn(const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - vwarn(fmt, ap); - va_end(ap); -} diff --git a/kerberosV/src/lib/roken/warnerr.c b/kerberosV/src/lib/roken/warnerr.c deleted file mode 100644 index 9e670239a1b..00000000000 --- a/kerberosV/src/lib/roken/warnerr.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1995 - 2001 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 - -#include "roken.h" -#include "err.h" - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -rk_warnerr(int doerrno, const char *fmt, va_list ap) -{ - int sverrno = errno; - const char *progname = getprogname(); - - if(progname != NULL){ - fprintf(stderr, "%s", progname); - if(fmt != NULL || doerrno) - fprintf(stderr, ": "); - } - if (fmt != NULL){ - vfprintf(stderr, fmt, ap); - if(doerrno) - fprintf(stderr, ": "); - } - if(doerrno) - fprintf(stderr, "%s", strerror(sverrno)); - fprintf(stderr, "\n"); -} diff --git a/kerberosV/src/lib/roken/warnx.c b/kerberosV/src/lib/roken/warnx.c deleted file mode 100644 index cf33939b247..00000000000 --- a/kerberosV/src/lib/roken/warnx.c +++ /dev/null @@ -1,45 +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. - */ - -#include - -#include "err.h" - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -warnx(const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - vwarnx(fmt, ap); - va_end(ap); -} diff --git a/kerberosV/src/lib/roken/write_pid.c b/kerberosV/src/lib/roken/write_pid.c deleted file mode 100644 index 5059369847a..00000000000 --- a/kerberosV/src/lib/roken/write_pid.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 1999 - 2001 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 - -#include "roken.h" - -ROKEN_LIB_FUNCTION char * ROKEN_LIB_CALL -pid_file_write (const char *progname) -{ - char *ret = NULL; - FILE *fp; - - if (asprintf (&ret, "%s%s.pid", _PATH_VARRUN, progname) < 0 || ret == NULL) - return NULL; - fp = fopen (ret, "w"); - if (fp == NULL) { - free (ret); - return NULL; - } - fprintf (fp, "%u", (unsigned)getpid()); - fclose (fp); - return ret; -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -pid_file_delete (char **filename) -{ - if (*filename != NULL) { - unlink (*filename); - free (*filename); - *filename = NULL; - } -} - -#ifndef HAVE_PIDFILE -static char *pidfile_path; - -static void -pidfile_cleanup(void) -{ - if(pidfile_path != NULL) - pid_file_delete(&pidfile_path); -} - -ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL -pidfile(const char *basename) -{ - if(pidfile_path != NULL) - return; - if(basename == NULL) - basename = getprogname(); - pidfile_path = pid_file_write(basename); -#if defined(HAVE_ATEXIT) - atexit(pidfile_cleanup); -#elif defined(HAVE_ON_EXIT) - on_exit(pidfile_cleanup); -#endif -} -#endif diff --git a/kerberosV/src/lib/roken/writev.c b/kerberosV/src/lib/roken/writev.c deleted file mode 100644 index 80945e95da4..00000000000 --- a/kerberosV/src/lib/roken/writev.c +++ /dev/null @@ -1,61 +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 - -#include "roken.h" - -ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL -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/kerberosV/src/lib/roken/xdbm.h b/kerberosV/src/lib/roken/xdbm.h deleted file mode 100644 index b254a54f9d8..00000000000 --- a/kerberosV/src/lib/roken/xdbm.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1995 - 2002 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: xdbm.h,v 1.2 2013/06/17 18:57:45 robert Exp $ */ - -/* Generic *dbm include file */ - -#ifndef __XDBM_H__ -#define __XDBM_H__ - -#if HAVE_DB_NDBM -#define DB_DBM_HSEARCH 1 -#include -#elif HAVE_NDBM -#if defined(HAVE_GDBM_NDBM_H) -#include -#elif defined(HAVE_NDBM_H) -#include -#endif -#endif /* HAVE_NDBM */ - -#endif /* __XDBM_H__ */ diff --git a/kerberosV/src/lib/roken/xfree.c b/kerberosV/src/lib/roken/xfree.c deleted file mode 100644 index c7e30daf85e..00000000000 --- a/kerberosV/src/lib/roken/xfree.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2008 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 - -#include "roken.h" - -void ROKEN_LIB_FUNCTION -rk_xfree (void *buf) -{ - free(buf); -} diff --git a/kerberosV/src/lib/sl/ChangeLog b/kerberosV/src/lib/sl/ChangeLog deleted file mode 100644 index 485e1dc3ff3..00000000000 --- a/kerberosV/src/lib/sl/ChangeLog +++ /dev/null @@ -1,329 +0,0 @@ -2008-05-05 Love Hörnquist Åstrand - - * drop libss and make_cmds - -2007-07-17 Love Hörnquist Åstrand - - * Makefile.am: roken_rename.h is a dist_ source k - - * Makefile.am: split source files in dist and nodist. - -2007-07-10 Love Hörnquist Åstrand - - * Makefile.am: New library version. - -2007-06-18 Love Hörnquist Åstrand - - * sl.c: make compile. - - * sl.c: Pass in pointer to strlen(). - - * sl.c (sl_make_argv): use memmove since we are dealing with - overlapping strings. - -2007-06-09 Love Hörnquist Åstrand - - * Makefile.am: don't clean yacc/lex files in CLEANFILES, - maintainers clean will do that for us. - -2007-06-01 Love Hörnquist Åstrand - - * slc-gram.y (main): also fclose yyin. - -2007-04-20 Love Hörnquist Åstrand - - * Makefile.am: Add dependency on slc-gram.h for slc-lex.c, breaks - in disttree with make -j - -2006-12-29 Love Hörnquist Åstrand - - * test_sl.c: Fix caseing for case-sensitive filesystems - -2006-12-27 Love Hörnquist Åstrand - - * test_sl.c: catch test that should fail but didn't - - * test_sl.c: Test more quoting variants. - - * sl_locl.h: Include . - - * test_sl.c: test sl_make_argv - - * sl.c (sl_make_argv): Add quoting support (both "" and \ style). - -2006-12-05 Love Hörnquist Åstrand - - * sl.c: Use strcspn to remove \n from fgets result. Prompted by - change by Ray Lai of OpenBSD via Björn Sandell. - -2006-10-19 Love Hörnquist Åstrand - - * Makefile.am (ES): add roken_rename.h - -2006-08-30 Love Hörnquist Åstrand - - * sl.c (sl_slc_help): remove return - -2006-08-28 Love Hörnquist Åstrand - - * sl.h: Add sl_slc_help. - - * sl.c: Add sl_slc_help. - -2005-07-27 Love Hörnquist Åstrand - - * slc-gram.y (gen_wrapper): use the generated version of name for - function, if no function is is used, also use the generated name - for the structure name. - -2005-06-16 Love Hörnquist Åstrand - - * slc-gram.y: fix a merge error - - * slc-gram.y: rename optind to optidx, rename variables to avoid - shadowing - - * make_cmds.c: rename optind to optidx, move variable define to - avoid shadowing - - * ss.c: rename index to idx - - * sl.c: use rk_UNCONST to un-constify - -2005-05-10 Dave Love - - * slc-lex.l: Include . - -2005-05-09 Love Hörnquist Åstrand - - * sl.c (sl_command_loop): new return code -2 for EOF - (sl_loop): treat all return value from sl_command_loop >= 0 as ok, and - continue. - -2005-04-29 Dave Love - - * Makefile.am (LDADD): Add libsl.la. - -2005-04-19 Love Hörnquist Åstrand - - * slc-gram.y: include since defines _GNU_SOURCE if - needed, avoid asprintf warning - -2005-01-21 Dave Love - - * slc-gram.y: include - -2005-01-09 Love Hörnquist Åstrand - - * slc-gram.y: cast argument to isalnum to unsigned char - -2004-09-22 Johan Danielsson - - * slc-gram.y: add support for "strings" and "negative-flag" types, - plus some usability tweaks and bug fixes - -2004-07-05 Johan Danielsson - - * slc-gram.y: add min_args/max_args checking - -2004-06-21 Love Hörnquist Åstrand - - * slc-gram.y: pull in and to avoid warnings - -2004-03-02 Love Hörnquist Åstrand - - * sl.h: make it possible to use libsl from c++ - From: Mattias Amnefelt - -2002-05-19 Johan Danielsson - - * Makefile.am: just link mk_cmds against libsl; avoids libtool - problem - -2001-07-09 Assar Westerlund - - * Makefile.am: add getprogname.c libss.la:add libcom_err.la noted - by Leif Johansson - -2001-05-17 Assar Westerlund - - * Makefile.am: bump versions to 1:2:1 and 1:4:1 - -2001-05-06 Assar Westerlund - - * roken_rename.h (strdup): add - -2001-03-06 Assar Westerlund - - * Makefile.am: re do the roken-renaming properly - -2001-02-13 Assar Westerlund - - * Makefile.am: add more functions to rename - -2001-01-26 Johan Danielsson - - * sl.h: proto - - * sl.c (sl_command_loop): try to handle user pressing C-c - -2000-12-11 Assar Westerlund - - * Makefile.am (libss_la_LDFLAGS): bump version to 1:2:1 - -2000-08-19 Assar Westerlund - - * Makefile.am: add dependencies for libss/libsl shared libraries - -2000-07-25 Johan Danielsson - - * Makefile.am: bump ss version to 1:1:1 - -2000-06-27 Assar Westerlund - - * parse.y (yyerror): static-ize - * make_cmds.h (error_message, yylex): add prototypes - * lex.l: fix prototypes and kill warnings - -2000-05-24 Assar Westerlund - - * ss.h (SS_ET_COMMAND_NOT_FOUND): add - * ss.c: check allocation and return some other error codes too - -2000-04-29 Assar Westerlund - - * Makefile.in: add LIB_tgetent. From Derrick J Brashear - - -2000-04-03 Assar Westerlund - - * Makefile.am: set version to 1:0:1 - -2000-03-07 Assar Westerlund - - * sl.h (SL_BADCOMMAND): define - (sl_apropos): add prototype - - * sl.c: mandoc-generation - (sl_apropos): stolen from arla - -2000-01-06 Assar Westerlund - - * Makefile.am: bump both versions to 0:1:0 - -1999-12-16 Assar Westerlund - - * parse.y (name2number): not used here. remove. - -Thu Apr 1 17:03:59 1999 Johan Danielsson - - * make_cmds.c: use getarg - -Tue Mar 23 14:36:21 1999 Johan Danielsson - - * Makefile.am: don't rename - -Sun Mar 21 14:13:29 1999 Johan Danielsson - - * Makefile.am: don't roken-rename - -Sat Mar 20 03:43:30 1999 Assar Westerlund - - * parse.y: replace return with YYACCEPT - -Fri Mar 19 14:53:20 1999 Johan Danielsson - - * Makefile.am: add libss; add version-info - -Thu Mar 18 15:07:06 1999 Johan Danielsson - - * 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 - - * parse.y: prototype for error_message - -Tue Feb 9 23:45:37 1999 Johan Danielsson - - * Makefile.in: add snprintf.o to make_cmds - -Sun Nov 22 10:46:23 1998 Assar Westerlund - - * 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 - - * make_cmds.c: clean-up and simplification - -Mon May 25 02:54:13 1998 Assar Westerlund - - * Makefile.in (clean): try to remove shared library debris - - * Makefile.in: make symlink magic work - -Sun Apr 19 10:00:26 1998 Assar Westerlund - - * Makefile.in: add symlink magic for linux - -Sun Apr 5 09:21:43 1998 Assar Westerlund - - * 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 - - * sl.c (sl_loop): s/2/1 - -Sat Mar 21 00:46:51 1998 Johan Danielsson - - * 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 - - * sl.c (sl_loop): Fix general broken-ness. - - * sl.c: Cleanup printing of help strings. - -Thu Feb 26 02:22:02 1998 Assar Westerlund - - * Makefile.am: @LEXLIB@ - -Sat Feb 21 15:18:21 1998 assar westerlund - - * Makefile.in: set YACC and LEX - -Mon Feb 16 16:08:25 1998 Johan Danielsson - - * Makefile.am: Some fixes for ss/mk_cmds. - -Sun Feb 15 05:12:11 1998 Johan Danielsson - - * 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 - - * sl.c: Add sl_command_loop, that is the loop body of sl_loop. - -Mon Oct 20 01:13:21 1997 Assar Westerlund - - * sl.c (sl_help): actually use the `help' field of `SL_cmd' - diff --git a/kerberosV/src/lib/sl/Makefile.am b/kerberosV/src/lib/sl/Makefile.am deleted file mode 100644 index d7bd74c5bba..00000000000 --- a/kerberosV/src/lib/sl/Makefile.am +++ /dev/null @@ -1,51 +0,0 @@ -# $Id: Makefile.am,v 1.3 2013/06/17 18:57:45 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -if do_roken_rename -ES = strtok_r.c snprintf.c strdup.c strupr.c getprogname.c -endif - -AM_CPPFLAGS += $(ROKEN_RENAME) - -YFLAGS = -d - -include_HEADERS = sl.h - -lib_LTLIBRARIES = libsl.la -libsl_la_LDFLAGS = -version-info 2:1:2 - -libsl_la_LIBADD = @LIB_readline@ - -dist_libsl_la_SOURCES = sl_locl.h sl.c roken_rename.h -nodist_libsl_la_SOURCES = $(ES) - -TESTS = test_sl -check_PROGRAMS = $(TESTS) - -# install these? - -libexec_heimdal_PROGRAMS = slc - -slc_SOURCES = slc-gram.y slc-lex.l slc.h - -CLEANFILES = snprintf.c strtok_r.c strdup.c strupr.c getprogname.c slc-lex.c - -LDADD = libsl.la $(LIB_roken) - -slc_LDADD = $(LEXLIB) $(LDADD) - -strtok_r.c: - $(LN_S) $(srcdir)/../roken/strtok_r.c . -snprintf.c: - $(LN_S) $(srcdir)/../roken/snprintf.c . -strdup.c: - $(LN_S) $(srcdir)/../roken/strdup.c . -strupr.c: - $(LN_S) $(srcdir)/../roken/strupr.c . -getprogname.c: - $(LN_S) $(srcdir)/../roken/getprogname.c . - -slc-lex.c: slc-gram.h - -EXTRA_DIST = NTMakefile diff --git a/kerberosV/src/lib/sl/Makefile.in b/kerberosV/src/lib/sl/Makefile.in deleted file mode 100644 index 871e85c34ba..00000000000 --- a/kerberosV/src/lib/sl/Makefile.in +++ /dev/null @@ -1,1134 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:45 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:45 robert Exp $ - -# $Id: Makefile.in,v 1.3 2013/06/17 18:57:45 robert Exp $ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common ChangeLog slc-gram.c \ - slc-gram.h slc-lex.c -TESTS = test_sl$(EXEEXT) -check_PROGRAMS = $(am__EXEEXT_1) -libexec_heimdal_PROGRAMS = slc$(EXEEXT) -subdir = lib/sl -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(libexec_heimdaldir)" "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libsl_la_DEPENDENCIES = -dist_libsl_la_OBJECTS = sl.lo -@do_roken_rename_TRUE@am__objects_1 = strtok_r.lo snprintf.lo \ -@do_roken_rename_TRUE@ strdup.lo strupr.lo getprogname.lo -nodist_libsl_la_OBJECTS = $(am__objects_1) -libsl_la_OBJECTS = $(dist_libsl_la_OBJECTS) $(nodist_libsl_la_OBJECTS) -libsl_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libsl_la_LDFLAGS) \ - $(LDFLAGS) -o $@ -am__EXEEXT_1 = test_sl$(EXEEXT) -PROGRAMS = $(libexec_heimdal_PROGRAMS) -am_slc_OBJECTS = slc-gram.$(OBJEXT) slc-lex.$(OBJEXT) -slc_OBJECTS = $(am_slc_OBJECTS) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = libsl.la $(am__DEPENDENCIES_1) -slc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) -test_sl_SOURCES = test_sl.c -test_sl_OBJECTS = test_sl.$(OBJEXT) -test_sl_LDADD = $(LDADD) -test_sl_DEPENDENCIES = libsl.la $(am__DEPENDENCIES_1) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || -LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) -YLWRAP = $(top_srcdir)/ylwrap -@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) -LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS) -SOURCES = $(dist_libsl_la_SOURCES) $(nodist_libsl_la_SOURCES) \ - $(slc_SOURCES) test_sl.c -DIST_SOURCES = $(dist_libsl_la_SOURCES) $(slc_SOURCES) test_sl.c -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = -d -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) $(ROKEN_RENAME) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -@do_roken_rename_TRUE@ES = strtok_r.c snprintf.c strdup.c strupr.c getprogname.c -include_HEADERS = sl.h -lib_LTLIBRARIES = libsl.la -libsl_la_LDFLAGS = -version-info 2:1:2 -libsl_la_LIBADD = @LIB_readline@ -dist_libsl_la_SOURCES = sl_locl.h sl.c roken_rename.h -nodist_libsl_la_SOURCES = $(ES) -slc_SOURCES = slc-gram.y slc-lex.l slc.h -CLEANFILES = snprintf.c strtok_r.c strdup.c strupr.c getprogname.c slc-lex.c -LDADD = libsl.la $(LIB_roken) -slc_LDADD = $(LEXLIB) $(LDADD) -EXTRA_DIST = NTMakefile -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .l .lo .o .obj .y -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/sl/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/sl/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libsl.la: $(libsl_la_OBJECTS) $(libsl_la_DEPENDENCIES) - $(libsl_la_LINK) -rpath $(libdir) $(libsl_la_OBJECTS) $(libsl_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -install-libexec_heimdalPROGRAMS: $(libexec_heimdal_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(libexec_heimdaldir)" || $(MKDIR_P) "$(DESTDIR)$(libexec_heimdaldir)" - @list='$(libexec_heimdal_PROGRAMS)'; test -n "$(libexec_heimdaldir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexec_heimdaldir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexec_heimdaldir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-libexec_heimdalPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(libexec_heimdal_PROGRAMS)'; test -n "$(libexec_heimdaldir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libexec_heimdaldir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(libexec_heimdaldir)" && rm -f $$files - -clean-libexec_heimdalPROGRAMS: - @list='$(libexec_heimdal_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -slc-gram.h: slc-gram.c - @if test ! -f $@; then \ - rm -f slc-gram.c; \ - $(MAKE) $(AM_MAKEFLAGS) slc-gram.c; \ - else :; fi -slc$(EXEEXT): $(slc_OBJECTS) $(slc_DEPENDENCIES) - @rm -f slc$(EXEEXT) - $(LINK) $(slc_OBJECTS) $(slc_LDADD) $(LIBS) -test_sl$(EXEEXT): $(test_sl_OBJECTS) $(test_sl_DEPENDENCIES) - @rm -f test_sl$(EXEEXT) - $(LINK) $(test_sl_OBJECTS) $(test_sl_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprogname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slc-gram.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slc-lex.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtok_r.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strupr.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sl.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -.l.c: - $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) - -.y.c: - $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ - fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ - else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ - fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ - else \ - skipped="($$skip tests were not run)"; \ - fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ - else \ - echo "$$red$$dashes"; \ - fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ - test "$$failed" -eq 0; \ - else :; fi - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexec_heimdaldir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -rm -f slc-gram.c - -rm -f slc-gram.h - -rm -f slc-lex.c -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libexec_heimdalPROGRAMS clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES \ - install-libexec_heimdalPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-libexec_heimdalPROGRAMS - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-TESTS check-am \ - check-local clean clean-checkPROGRAMS clean-generic \ - clean-libLTLIBRARIES clean-libexec_heimdalPROGRAMS \ - clean-libtool ctags dist-hook distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-hook install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-includeHEADERS \ - install-info install-info-am install-libLTLIBRARIES \ - install-libexec_heimdalPROGRAMS install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES \ - uninstall-libexec_heimdalPROGRAMS - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -strtok_r.c: - $(LN_S) $(srcdir)/../roken/strtok_r.c . -snprintf.c: - $(LN_S) $(srcdir)/../roken/snprintf.c . -strdup.c: - $(LN_S) $(srcdir)/../roken/strdup.c . -strupr.c: - $(LN_S) $(srcdir)/../roken/strupr.c . -getprogname.c: - $(LN_S) $(srcdir)/../roken/getprogname.c . - -slc-lex.c: slc-gram.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/kerberosV/src/lib/sl/NTMakefile b/kerberosV/src/lib/sl/NTMakefile deleted file mode 100644 index 285c5d7f129..00000000000 --- a/kerberosV/src/lib/sl/NTMakefile +++ /dev/null @@ -1,74 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=lib\sl - -!include ../../windows/NTMakefile.w32 - -INCFILES=$(INCDIR)\sl.h - -$(LIBSL): $(OBJ)\sl.obj - $(LIBCON) - -$(BINDIR)\slc.exe: $(OBJ)\slc-gram.obj $(OBJ)\slc-lex.obj - $(EXECONLINK) $(LIBROKEN) $(LIBVERS) - $(EXEPREP_NOHEIM) - -$(OBJ)\slc-gram.c: slc-gram.y - $(YACC) -o $@ --defines=$(@R).h slc-gram.y - -$(OBJ)\slc-gram.obj: $(OBJ)\slc-gram.c - $(C2OBJ) -I$(SRC)\$(RELDIR) - -$(OBJ)\slc-lex.c: slc-lex.l - $(LEX) -o$@ slc-lex.l - -$(OBJ)\slc-lex.obj: $(OBJ)\slc-lex.c - $(C2OBJ) -I$(SRC)\$(RELDIR) -DYY_NO_UNISTD_H - -$(OBJ)\test_sl.exe: $(OBJ)\test_sl.obj - $(EXECONLINK) $(LIBSL) $(LIBVERS) $(LIBROKEN) - $(EXEPREP_NODIST) - -all:: $(INCFILES) $(LIBSL) $(BINDIR)\slc.exe - -clean:: - -$(RM) $(LIBSL) - -$(RM) $(BINDIR)\slc.* - -test-binaries: $(OBJ)\test_sl.exe - -test-run: - cd $(OBJ) - test_sl.exe - cd $(SRC)\$(RELDIR) - -test:: test-binaries test-run diff --git a/kerberosV/src/lib/sl/roken_rename.h b/kerberosV/src/lib/sl/roken_rename.h deleted file mode 100644 index 1795ae7386d..00000000000 --- a/kerberosV/src/lib/sl/roken_rename.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 1998 - 2001 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.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef __roken_rename_h__ -#define __roken_rename_h__ - -#ifndef HAVE_STRTOK_R -#define rk_strtok_r _sl_strtok_r -#endif -#ifndef HAVE_SNPRINTF -#define rk_snprintf _sl_snprintf -#endif -#ifndef HAVE_ASPRINTF -#define rk_asprintf _sl_asprintf -#endif -#ifndef HAVE_ASNPRINTF -#define rk_asnprintf _sl_asnprintf -#endif -#ifndef HAVE_VASPRINTF -#define rk_vasprintf _sl_vasprintf -#endif -#ifndef HAVE_VASNPRINTF -#define rk_vasnprintf _sl_vasnprintf -#endif -#ifndef HAVE_VSNPRINTF -#define rk_vsnprintf _sl_vsnprintf -#endif -#ifndef HAVE_STRUPR -#define rk_strupr _sl_strupr -#endif -#ifndef HAVE_STRDUP -#define rk_strdup _sl_strdup -#endif - -#endif /* __roken_rename_h__ */ diff --git a/kerberosV/src/lib/sl/sl.c b/kerberosV/src/lib/sl/sl.c deleted file mode 100644 index 30f69436dd2..00000000000 --- a/kerberosV/src/lib/sl/sl.c +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Copyright (c) 1995 - 2006 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 - -#include "sl_locl.h" -#include - -static void -mandoc_template(SL_cmd *cmds, - const char *extra_string) -{ - SL_cmd *c, *prev; - char timestr[64], cmd[64]; - 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 %d, %Y", localtime(&t)); - printf(".Dd %s\n", timestr); - p = strrchr(getprogname(), '/'); - if(p) p++; else p = getprogname(); - strncpy(cmd, p, sizeof(cmd)); - cmd[sizeof(cmd)-1] = '\0'; - 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(c = cmds; c->name; ++c) { -/* if (c->func == NULL) - continue; */ - printf(".Op Fl %s", c->name); - printf("\n"); - - } - 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"); - prev = NULL; - for(c = cmds; c->name; ++c) { - if (c->func) { - if (prev) - printf ("\n%s\n", prev->usage); - - printf (".It Fl %s", c->name); - prev = c; - } else - printf (", %s\n", c->name); - } - if (prev) - printf ("\n%s\n", prev->usage); - - 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"); -} - -SL_cmd * -sl_match (SL_cmd *cmds, char *cmd, int exactp) -{ - SL_cmd *c, *current = NULL, *partial_cmd = NULL; - int partial_match = 0; - - for (c = cmds; c->name; ++c) { - if (c->func) - current = c; - if (strcmp (cmd, c->name) == 0) - return current; - else if (strncmp (cmd, c->name, strlen(cmd)) == 0 && - partial_cmd != current) { - ++partial_match; - partial_cmd = current; - } - } - if (partial_match == 1 && !exactp) - return partial_cmd; - else - return NULL; -} - -void -sl_help (SL_cmd *cmds, int argc, char **argv) -{ - SL_cmd *c, *prev_c; - - if (getenv("SLMANDOC")) { - mandoc_template(cmds, NULL); - return; - } - - if (argc == 1) { - prev_c = NULL; - for (c = cmds; c->name; ++c) { - if (c->func) { - if(prev_c) - printf ("\n\t%s%s", prev_c->usage ? prev_c->usage : "", - prev_c->usage ? "\n" : ""); - prev_c = c; - printf ("%s", c->name); - } else - printf (", %s", c->name); - } - if(prev_c) - printf ("\n\t%s%s", prev_c->usage ? prev_c->usage : "", - prev_c->usage ? "\n" : ""); - } else { - c = sl_match (cmds, argv[1], 0); - if (c == NULL) - printf ("No such command: %s. " - "Try \"help\" for a list of all commands\n", - argv[1]); - else { - printf ("%s\t%s\n", c->name, c->usage); - if(c->help && *c->help) - printf ("%s\n", c->help); - if((++c)->name && c->func == NULL) { - printf ("Synonyms:"); - while (c->name && c->func == NULL) - printf ("\t%s", (c++)->name); - printf ("\n"); - } - } - } -} - -#ifdef HAVE_READLINE - -char *readline(char *prompt); -void add_history(char *p); - -#else - -static char * -readline(char *prompt) -{ - char buf[BUFSIZ]; - printf ("%s", prompt); - fflush (stdout); - if(fgets(buf, sizeof(buf), stdin) == NULL) - return NULL; - buf[strcspn(buf, "\r\n")] = '\0'; - return strdup(buf); -} - -static void -add_history(char *p) -{ -} - -#endif - -int -sl_command(SL_cmd *cmds, int argc, char **argv) -{ - SL_cmd *c; - c = sl_match (cmds, argv[0], 0); - if (c == NULL) - return -1; - return (*c->func)(argc, argv); -} - -struct sl_data { - int max_count; - char **ptr; -}; - -int -sl_make_argv(char *line, int *ret_argc, char ***ret_argv) -{ - char *p, *begining; - int argc, nargv; - char **argv; - int quote = 0; - - nargv = 10; - argv = malloc(nargv * sizeof(*argv)); - if(argv == NULL) - return ENOMEM; - argc = 0; - - p = line; - - while(isspace((unsigned char)*p)) - p++; - begining = p; - - while (1) { - if (*p == '\0') { - ; - } else if (*p == '"') { - quote = !quote; - memmove(&p[0], &p[1], strlen(&p[1]) + 1); - continue; - } else if (*p == '\\') { - if (p[1] == '\0') - goto failed; - memmove(&p[0], &p[1], strlen(&p[1]) + 1); - p += 2; - continue; - } else if (quote || !isspace((unsigned char)*p)) { - p++; - continue; - } else - *p++ = '\0'; - if (quote) - goto failed; - if(argc == nargv - 1) { - char **tmp; - nargv *= 2; - tmp = realloc (argv, nargv * sizeof(*argv)); - if (tmp == NULL) { - free(argv); - return ENOMEM; - } - argv = tmp; - } - argv[argc++] = begining; - while(isspace((unsigned char)*p)) - p++; - if (*p == '\0') - break; - begining = p; - } - argv[argc] = NULL; - *ret_argc = argc; - *ret_argv = argv; - return 0; -failed: - free(argv); - return ERANGE; -} - -static jmp_buf sl_jmp; - -static void sl_sigint(int sig) -{ - longjmp(sl_jmp, 1); -} - -static char *sl_readline(const char *prompt) -{ - char *s; - void (*old)(int); - old = signal(SIGINT, sl_sigint); - if(setjmp(sl_jmp)) - printf("\n"); - s = readline(rk_UNCONST(prompt)); - signal(SIGINT, old); - return s; -} - -/* return values: - * 0 on success, - * -1 on fatal error, - * -2 if EOF, or - * return value of command */ -int -sl_command_loop(SL_cmd *cmds, const char *prompt, void **data) -{ - int ret = 0; - char *buf; - int argc; - char **argv; - - buf = sl_readline(prompt); - if(buf == NULL) - return -2; - - if(*buf) - add_history(buf); - ret = sl_make_argv(buf, &argc, &argv); - if(ret) { - fprintf(stderr, "sl_loop: out of memory\n"); - free(buf); - return -1; - } - if (argc >= 1) { - ret = sl_command(cmds, argc, argv); - if(ret == -1) { - printf ("Unrecognized command: %s\n", argv[0]); - ret = 0; - } - } - free(buf); - free(argv); - return ret; -} - -int -sl_loop(SL_cmd *cmds, const char *prompt) -{ - void *data = NULL; - int ret; - while((ret = sl_command_loop(cmds, prompt, &data)) >= 0) - ; - return ret; -} - -void -sl_apropos (SL_cmd *cmd, const char *topic) -{ - for (; cmd->name != NULL; ++cmd) - if (cmd->usage != NULL && strstr(cmd->usage, topic) != NULL) - printf ("%-20s%s\n", cmd->name, cmd->usage); -} - -/* - * Help to be used with slc. - */ - -void -sl_slc_help (SL_cmd *cmds, int argc, char **argv) -{ - if(argc == 0) { - sl_help(cmds, 1, argv - 1 /* XXX */); - } else { - SL_cmd *c = sl_match (cmds, argv[0], 0); - if(c == NULL) { - fprintf (stderr, "No such command: %s. " - "Try \"help\" for a list of commands\n", - argv[0]); - } else { - if(c->func) { - static char help[] = "--help"; - char *fake[3]; - fake[0] = argv[0]; - fake[1] = help; - fake[2] = NULL; - (*c->func)(2, fake); - fprintf(stderr, "\n"); - } - if(c->help && *c->help) - fprintf (stderr, "%s\n", c->help); - if((++c)->name && c->func == NULL) { - int f = 0; - fprintf (stderr, "Synonyms:"); - while (c->name && c->func == NULL) { - fprintf (stderr, "%s%s", f ? ", " : " ", (c++)->name); - f = 1; - } - fprintf (stderr, "\n"); - } - } - } -} diff --git a/kerberosV/src/lib/sl/sl.h b/kerberosV/src/lib/sl/sl.h deleted file mode 100644 index 959f0db8699..00000000000 --- a/kerberosV/src/lib/sl/sl.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 1995 - 2004 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: sl.h,v 1.2 2013/06/17 18:57:45 robert Exp $ */ - -#ifndef _SL_H -#define _SL_H - -#define SL_BADCOMMAND -1 - -typedef int (*cmd_func)(int, char **); - -struct sl_cmd { - const char *name; - cmd_func func; - const char *usage; - const char *help; -}; - -typedef struct sl_cmd SL_cmd; - -#ifdef __cplusplus -extern "C" { -#endif - -void sl_help (SL_cmd *, int argc, char **argv); -int sl_loop (SL_cmd *, const char *prompt); -int sl_command_loop (SL_cmd *cmds, const char *prompt, void **data); -int sl_command (SL_cmd *cmds, int argc, char **argv); -int sl_make_argv(char*, int*, char***); -void sl_apropos (SL_cmd *cmd, const char *topic); -SL_cmd *sl_match (SL_cmd *cmds, char *cmd, int exactp); -void sl_slc_help (SL_cmd *cmds, int argc, char **argv); - -#ifdef __cplusplus -} -#endif - -#endif /* _SL_H */ diff --git a/kerberosV/src/lib/sl/sl_locl.h b/kerberosV/src/lib/sl/sl_locl.h deleted file mode 100644 index e85baca4ac2..00000000000 --- a/kerberosV/src/lib/sl/sl_locl.h +++ /dev/null @@ -1,45 +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: sl_locl.h,v 1.2 2013/06/17 18:57:45 robert Exp $ */ - -#include -#include -#include -#include -#include -#include - -#include - -#include diff --git a/kerberosV/src/lib/sl/slc-gram.y b/kerberosV/src/lib/sl/slc-gram.y deleted file mode 100644 index 530b1a34477..00000000000 --- a/kerberosV/src/lib/sl/slc-gram.y +++ /dev/null @@ -1,785 +0,0 @@ -%{ -/* - * Copyright (c) 2004-2006 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 - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "slc.h" -extern FILE *yyin; -extern struct assignment *assignment; - -/* Declarations for Bison: - */ -#define YYMALLOC malloc -#define YYFREE free - -%} - -%union { - char *string; - struct assignment *assignment; -} - -%token LITERAL -%token STRING -%type assignment assignments - -%start start - -%% - -start : assignments - { - assignment = $1; - } - ; - -assignments : assignment assignments - { - $1->next = $2; - $$ = $1; - } - | assignment - ; - -assignment : LITERAL '=' STRING - { - $$ = malloc(sizeof(*$$)); - $$->name = $1; - $$->type = a_value; - $$->lineno = lineno; - $$->u.value = $3; - $$->next = NULL; - } - | LITERAL '=' '{' assignments '}' - { - $$ = malloc(sizeof(*$$)); - $$->name = $1; - $$->type = a_assignment; - $$->lineno = lineno; - $$->u.assignment = $4; - $$->next = NULL; - } - ; - -%% -char *filename; -FILE *cfile, *hfile; -int error_flag; -struct assignment *assignment; - - -static void -ex(struct assignment *a, const char *fmt, ...) -{ - va_list ap; - fprintf(stderr, "%s:%d: ", a->name, a->lineno); - va_start(ap, fmt); - vfprintf(stderr, fmt, ap); - va_end(ap); - fprintf(stderr, "\n"); -} - - - -static int -check_option(struct assignment *as) -{ - struct assignment *a; - int seen_long = 0; - int seen_name = 0; - int seen_short = 0; - int seen_type = 0; - int seen_argument = 0; - int seen_help = 0; - int seen_default = 0; - int ret = 0; - - for(a = as; a != NULL; a = a->next) { - if(strcmp(a->name, "long") == 0) - seen_long++; - else if(strcmp(a->name, "short") == 0) - seen_short++; - else if(strcmp(a->name, "name") == 0) - seen_name++; - else if(strcmp(a->name, "type") == 0) - seen_type++; - else if(strcmp(a->name, "argument") == 0) - seen_argument++; - else if(strcmp(a->name, "help") == 0) - seen_help++; - else if(strcmp(a->name, "default") == 0) - seen_default++; - else { - ex(a, "unknown name %s", a->name); - ret++; - } - } - if(seen_long == 0 && seen_short == 0) { - ex(as, "neither long nor short option"); - ret++; - } - if (seen_long == 0 && seen_name == 0) { - ex(as, "either of long or name option must be used"); - ret++; - } - if(seen_long > 1) { - ex(as, "multiple long options"); - ret++; - } - if(seen_short > 1) { - ex(as, "multiple short options"); - ret++; - } - if(seen_type > 1) { - ex(as, "multiple types"); - ret++; - } - if(seen_argument > 1) { - ex(as, "multiple arguments"); - ret++; - } - if(seen_help > 1) { - ex(as, "multiple help strings"); - ret++; - } - if(seen_default > 1) { - ex(as, "multiple default values"); - ret++; - } - return ret; -} - -static int -check_command(struct assignment *as) -{ - struct assignment *a; - int seen_name = 0; - int seen_function = 0; - int seen_help = 0; - int seen_argument = 0; - int seen_minargs = 0; - int seen_maxargs = 0; - int ret = 0; - for(a = as; a != NULL; a = a->next) { - if(strcmp(a->name, "name") == 0) - seen_name++; - else if(strcmp(a->name, "function") == 0) { - seen_function++; - } else if(strcmp(a->name, "option") == 0) - ret += check_option(a->u.assignment); - else if(strcmp(a->name, "help") == 0) { - seen_help++; - } else if(strcmp(a->name, "argument") == 0) { - seen_argument++; - } else if(strcmp(a->name, "min_args") == 0) { - seen_minargs++; - } else if(strcmp(a->name, "max_args") == 0) { - seen_maxargs++; - } else { - ex(a, "unknown name: %s", a->name); - ret++; - } - } - if(seen_name == 0) { - ex(as, "no command name"); - ret++; - } - if(seen_function > 1) { - ex(as, "multiple function names"); - ret++; - } - if(seen_help > 1) { - ex(as, "multiple help strings"); - ret++; - } - if(seen_argument > 1) { - ex(as, "multiple argument strings"); - ret++; - } - if(seen_minargs > 1) { - ex(as, "multiple min_args strings"); - ret++; - } - if(seen_maxargs > 1) { - ex(as, "multiple max_args strings"); - ret++; - } - - return ret; -} - -static int -check(struct assignment *as) -{ - struct assignment *a; - int ret = 0; - for(a = as; a != NULL; a = a->next) { - if(strcmp(a->name, "command")) { - fprintf(stderr, "unknown type %s line %d\n", a->name, a->lineno); - ret++; - continue; - } - if(a->type != a_assignment) { - fprintf(stderr, "bad command definition %s line %d\n", a->name, a->lineno); - ret++; - continue; - } - ret += check_command(a->u.assignment); - } - return ret; -} - -static struct assignment * -find_next(struct assignment *as, const char *name) -{ - for(as = as->next; as != NULL; as = as->next) { - if(strcmp(as->name, name) == 0) - return as; - } - return NULL; -} - -static struct assignment * -find(struct assignment *as, const char *name) -{ - for(; as != NULL; as = as->next) { - if(strcmp(as->name, name) == 0) - return as; - } - return NULL; -} - -static void -space(FILE *f, int level) -{ - fprintf(f, "%*.*s", level * 4, level * 4, " "); -} - -static void -cprint(int level, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - space(cfile, level); - vfprintf(cfile, fmt, ap); - va_end(ap); -} - -static void -hprint(int level, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - space(hfile, level); - vfprintf(hfile, fmt, ap); - va_end(ap); -} - -static void gen_name(char *str); - -static void -gen_command(struct assignment *as) -{ - struct assignment *a, *b; - char *f; - a = find(as, "name"); - f = strdup(a->u.value); - gen_name(f); - cprint(1, " { "); - fprintf(cfile, "\"%s\", ", a->u.value); - fprintf(cfile, "%s_wrap, ", f); - b = find(as, "argument"); - if(b) - fprintf(cfile, "\"%s %s\", ", a->u.value, b->u.value); - else - fprintf(cfile, "\"%s\", ", a->u.value); - b = find(as, "help"); - if(b) - fprintf(cfile, "\"%s\"", b->u.value); - else - fprintf(cfile, "NULL"); - fprintf(cfile, " },\n"); - for(a = a->next; a != NULL; a = a->next) - if(strcmp(a->name, "name") == 0) - cprint(1, " { \"%s\" },\n", a->u.value); - cprint(0, "\n"); -} - -static void -gen_name(char *str) -{ - char *p; - for(p = str; *p != '\0'; p++) - if(!isalnum((unsigned char)*p)) - *p = '_'; -} - -static char * -make_name(struct assignment *as) -{ - struct assignment *lopt; - struct assignment *type; - char *s; - - lopt = find(as, "long"); - if(lopt == NULL) - lopt = find(as, "name"); - if(lopt == NULL) - return NULL; - - type = find(as, "type"); - if(strcmp(type->u.value, "-flag") == 0) - asprintf(&s, "%s_flag", lopt->u.value); - else - asprintf(&s, "%s_%s", lopt->u.value, type->u.value); - gen_name(s); - return s; -} - - -static void defval_int(const char *name, struct assignment *defval) -{ - if(defval != NULL) - cprint(1, "opt.%s = %s;\n", name, defval->u.value); - else - cprint(1, "opt.%s = 0;\n", name); -} -static void defval_neg_flag(const char *name, struct assignment *defval) -{ - if(defval != NULL) - cprint(1, "opt.%s = %s;\n", name, defval->u.value); - else - cprint(1, "opt.%s = 1;\n", name); -} -static void defval_string(const char *name, struct assignment *defval) -{ - if(defval != NULL) - cprint(1, "opt.%s = (char *)(unsigned long)\"%s\";\n", name, defval->u.value); - else - cprint(1, "opt.%s = NULL;\n", name); -} -static void defval_strings(const char *name, struct assignment *defval) -{ - cprint(1, "opt.%s.num_strings = 0;\n", name); - cprint(1, "opt.%s.strings = NULL;\n", name); -} - -static void free_strings(const char *name) -{ - cprint(1, "free_getarg_strings (&opt.%s);\n", name); -} - -struct type_handler { - const char *typename; - const char *c_type; - const char *getarg_type; - void (*defval)(const char*, struct assignment*); - void (*free)(const char*); -} type_handlers[] = { - { "integer", - "int", - "arg_integer", - defval_int, - NULL - }, - { "string", - "char*", - "arg_string", - defval_string, - NULL - }, - { "strings", - "struct getarg_strings", - "arg_strings", - defval_strings, - free_strings - }, - { "flag", - "int", - "arg_flag", - defval_int, - NULL - }, - { "-flag", - "int", - "arg_negative_flag", - defval_neg_flag, - NULL - }, - { NULL } -}; - -static struct type_handler *find_handler(struct assignment *type) -{ - struct type_handler *th; - for(th = type_handlers; th->typename != NULL; th++) - if(strcmp(type->u.value, th->typename) == 0) - return th; - ex(type, "unknown type \"%s\"", type->u.value); - exit(1); -} - -static void -gen_options(struct assignment *opt1, const char *name) -{ - struct assignment *tmp; - - hprint(0, "struct %s_options {\n", name); - - for(tmp = opt1; - tmp != NULL; - tmp = find_next(tmp, "option")) { - struct assignment *type; - struct type_handler *th; - char *s; - - s = make_name(tmp->u.assignment); - type = find(tmp->u.assignment, "type"); - th = find_handler(type); - hprint(1, "%s %s;\n", th->c_type, s); - free(s); - } - hprint(0, "};\n"); -} - -static void -gen_wrapper(struct assignment *as) -{ - struct assignment *name; - struct assignment *arg; - struct assignment *opt1; - struct assignment *function; - struct assignment *tmp; - char *n, *f; - int nargs = 0; - int narguments = 0; - - name = find(as, "name"); - n = strdup(name->u.value); - gen_name(n); - arg = find(as, "argument"); - if (arg) - narguments++; - opt1 = find(as, "option"); - function = find(as, "function"); - if(function) - f = function->u.value; - else - f = n; - - - if(opt1 != NULL) { - gen_options(opt1, n); - hprint(0, "int %s(struct %s_options*, int, char **);\n", f, n); - } else { - hprint(0, "int %s(void*, int, char **);\n", f); - } - - fprintf(cfile, "static int\n"); - fprintf(cfile, "%s_wrap(int argc, char **argv)\n", n); - fprintf(cfile, "{\n"); - if(opt1 != NULL) - cprint(1, "struct %s_options opt;\n", n); - cprint(1, "int ret;\n"); - cprint(1, "int optidx = 0;\n"); - cprint(1, "struct getargs args[] = {\n"); - for(tmp = find(as, "option"); - tmp != NULL; - tmp = find_next(tmp, "option")) { - struct assignment *type = find(tmp->u.assignment, "type"); - struct assignment *lopt = find(tmp->u.assignment, "long"); - struct assignment *sopt = find(tmp->u.assignment, "short"); - struct assignment *aarg = find(tmp->u.assignment, "argument"); - struct assignment *help = find(tmp->u.assignment, "help"); - - struct type_handler *th; - - cprint(2, "{ "); - if(lopt) - fprintf(cfile, "\"%s\", ", lopt->u.value); - else - fprintf(cfile, "NULL, "); - if(sopt) - fprintf(cfile, "'%c', ", *sopt->u.value); - else - fprintf(cfile, "0, "); - th = find_handler(type); - fprintf(cfile, "%s, ", th->getarg_type); - fprintf(cfile, "NULL, "); - if(help) - fprintf(cfile, "\"%s\", ", help->u.value); - else - fprintf(cfile, "NULL, "); - if(aarg) { - fprintf(cfile, "\"%s\"", aarg->u.value); - narguments++; - } else - fprintf(cfile, "NULL"); - fprintf(cfile, " },\n"); - } - cprint(2, "{ \"help\", 'h', arg_flag, NULL, NULL, NULL }\n"); - cprint(1, "};\n"); - cprint(1, "int help_flag = 0;\n"); - - for(tmp = find(as, "option"); - tmp != NULL; - tmp = find_next(tmp, "option")) { - char *s; - struct assignment *type = find(tmp->u.assignment, "type"); - - struct assignment *defval = find(tmp->u.assignment, "default"); - - struct type_handler *th; - - s = make_name(tmp->u.assignment); - th = find_handler(type); - (*th->defval)(s, defval); - free(s); - } - - for(tmp = find(as, "option"); - tmp != NULL; - tmp = find_next(tmp, "option")) { - char *s; - s = make_name(tmp->u.assignment); - cprint(1, "args[%d].value = &opt.%s;\n", nargs++, s); - free(s); - } - cprint(1, "args[%d].value = &help_flag;\n", nargs++); - cprint(1, "if(getarg(args, %d, argc, argv, &optidx))\n", nargs); - cprint(2, "goto usage;\n"); - - { - int min_args = -1; - int max_args = -1; - char *end; - if(narguments == 0) { - max_args = 0; - } else { - if((tmp = find(as, "min_args")) != NULL) { - min_args = strtol(tmp->u.value, &end, 0); - if(*end != '\0') { - ex(tmp, "min_args is not numeric"); - exit(1); - } - if(min_args < 0) { - ex(tmp, "min_args must be non-negative"); - exit(1); - } - } - if((tmp = find(as, "max_args")) != NULL) { - max_args = strtol(tmp->u.value, &end, 0); - if(*end != '\0') { - ex(tmp, "max_args is not numeric"); - exit(1); - } - if(max_args < 0) { - ex(tmp, "max_args must be non-negative"); - exit(1); - } - } - } - if(min_args != -1 || max_args != -1) { - if(min_args == max_args) { - cprint(1, "if(argc - optidx != %d) {\n", - min_args); - cprint(2, "fprintf(stderr, \"Need exactly %u parameters (%%u given).\\n\\n\", argc - optidx);\n", min_args); - cprint(2, "goto usage;\n"); - cprint(1, "}\n"); - } else { - if(max_args != -1) { - cprint(1, "if(argc - optidx > %d) {\n", max_args); - cprint(2, "fprintf(stderr, \"Arguments given (%%u) are more than expected (%u).\\n\\n\", argc - optidx);\n", max_args); - cprint(2, "goto usage;\n"); - cprint(1, "}\n"); - } - if(min_args != -1) { - cprint(1, "if(argc - optidx < %d) {\n", min_args); - cprint(2, "fprintf(stderr, \"Arguments given (%%u) are less than expected (%u).\\n\\n\", argc - optidx);\n", min_args); - cprint(2, "goto usage;\n"); - cprint(1, "}\n"); - } - } - } - } - - cprint(1, "if(help_flag)\n"); - cprint(2, "goto usage;\n"); - - cprint(1, "ret = %s(%s, argc - optidx, argv + optidx);\n", - f, opt1 ? "&opt": "NULL"); - - /* free allocated data */ - for(tmp = find(as, "option"); - tmp != NULL; - tmp = find_next(tmp, "option")) { - char *s; - struct assignment *type = find(tmp->u.assignment, "type"); - struct type_handler *th; - th = find_handler(type); - if(th->free == NULL) - continue; - s = make_name(tmp->u.assignment); - (*th->free)(s); - free(s); - } - cprint(1, "return ret;\n"); - - cprint(0, "usage:\n"); - cprint(1, "arg_printusage (args, %d, \"%s\", \"%s\");\n", nargs, - name->u.value, arg ? arg->u.value : ""); - /* free allocated data */ - for(tmp = find(as, "option"); - tmp != NULL; - tmp = find_next(tmp, "option")) { - char *s; - struct assignment *type = find(tmp->u.assignment, "type"); - struct type_handler *th; - th = find_handler(type); - if(th->free == NULL) - continue; - s = make_name(tmp->u.assignment); - (*th->free)(s); - free(s); - } - cprint(1, "return 0;\n"); - cprint(0, "}\n"); - cprint(0, "\n"); -} - -char cname[PATH_MAX]; -char hname[PATH_MAX]; - -static void -gen(struct assignment *as) -{ - struct assignment *a; - cprint(0, "#include \n"); - cprint(0, "#include \n"); - cprint(0, "#include \n"); - cprint(0, "#include \"%s\"\n\n", hname); - - hprint(0, "#include \n"); - hprint(0, "#include \n"); - hprint(0, "\n"); - - - for(a = as; a != NULL; a = a->next) - gen_wrapper(a->u.assignment); - - cprint(0, "SL_cmd commands[] = {\n"); - for(a = as; a != NULL; a = a->next) - gen_command(a->u.assignment); - cprint(1, "{ NULL }\n"); - cprint(0, "};\n"); - - hprint(0, "extern SL_cmd commands[];\n"); -} - -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) -{ - char *p; - - int optidx = 0; - - setprogname(argv[0]); - if(getarg(args, num_args, argc, argv, &optidx)) - usage(1); - if(help_flag) - usage(0); - if(version_flag) { - print_version(NULL); - exit(0); - } - - if(argc == optidx) - usage(1); - - filename = argv[optidx]; - yyin = fopen(filename, "r"); - if(yyin == NULL) - err(1, "%s", filename); - p = strrchr(filename, '/'); - if(p) - strlcpy(cname, p + 1, sizeof(cname)); - else - strlcpy(cname, filename, sizeof(cname)); - p = strrchr(cname, '.'); - if(p) - *p = '\0'; - strlcpy(hname, cname, sizeof(hname)); - strlcat(cname, ".c", sizeof(cname)); - strlcat(hname, ".h", sizeof(hname)); - yyparse(); - if(error_flag) - exit(1); - if(check(assignment) == 0) { - cfile = fopen(cname, "w"); - if(cfile == NULL) - err(1, "%s", cname); - hfile = fopen(hname, "w"); - if(hfile == NULL) - err(1, "%s", hname); - gen(assignment); - fclose(cfile); - fclose(hfile); - } - fclose(yyin); - return 0; -} diff --git a/kerberosV/src/lib/sl/slc-lex.c b/kerberosV/src/lib/sl/slc-lex.c deleted file mode 100644 index 87f6a2f352c..00000000000 --- a/kerberosV/src/lib/sl/slc-lex.c +++ /dev/null @@ -1,1867 +0,0 @@ - -#line 3 "slc-lex.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN (yy_start) = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START (((yy_start) - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -extern yy_size_t yyleng; - -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = (yy_hold_char); \ - YY_RESTORE_YY_MORE_OFFSET \ - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, (yytext_ptr) ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* Stack of input buffers. */ -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ -yy_size_t yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart (FILE *input_file ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); -void yy_delete_buffer (YY_BUFFER_STATE b ); -void yy_flush_buffer (YY_BUFFER_STATE b ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); -void yypop_buffer_state (void ); - -static void yyensure_buffer_stack (void ); -static void yy_load_buffer_state (void ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); - -void *yyalloc (yy_size_t ); -void *yyrealloc (void *,yy_size_t ); -void yyfree (void * ); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -typedef unsigned char YY_CHAR; - -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; - -typedef int yy_state_type; - -extern int yylineno; - -int yylineno = 1; - -extern char *yytext; -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state (void ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); -static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 7 -#define YY_END_OF_BUFFER 8 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[14] = - { 0, - 0, 0, 8, 7, 6, 3, 2, 7, 5, 1, - 4, 1, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, - 1, 5, 1, 1, 6, 1, 7, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, - 8, 1, 1, 1, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 1, 1, 1, 1, 6, 1, 9, 9, 9, 9, - - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 8, 1, 8, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[10] = - { 0, - 1, 1, 1, 1, 1, 2, 1, 1, 2 - } ; - -static yyconst flex_int16_t yy_base[15] = - { 0, - 0, 0, 12, 13, 13, 13, 13, 6, 13, 0, - 13, 0, 13, 8 - } ; - -static yyconst flex_int16_t yy_def[15] = - { 0, - 13, 1, 13, 13, 13, 13, 13, 13, 13, 14, - 13, 14, 0, 13 - } ; - -static yyconst flex_int16_t yy_nxt[23] = - { 0, - 4, 5, 6, 7, 4, 4, 8, 9, 10, 12, - 11, 13, 3, 13, 13, 13, 13, 13, 13, 13, - 13, 13 - } ; - -static yyconst flex_int16_t yy_chk[23] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, - 8, 3, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int yy_flex_debug; -int yy_flex_debug = 0; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -#line 1 "slc-lex.l" -#line 2 "slc-lex.l" -/* - * Copyright (c) 2004 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: slc-lex.c,v 1.1 2013/06/17 18:57:45 robert Exp $ */ - -#undef ECHO - -#include -#include -#include -#include -#include "slc.h" -#include "slc-gram.h" -unsigned lineno = 1; - -static void handle_comment(void); -static char * handle_string(void); - -#define YY_NO_UNPUT - -#undef ECHO - -#line 509 "slc-lex.c" - -#define INITIAL 0 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -static int yy_init_globals (void ); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int yylex_destroy (void ); - -int yyget_debug (void ); - -void yyset_debug (int debug_flag ); - -YY_EXTRA_TYPE yyget_extra (void ); - -void yyset_extra (YY_EXTRA_TYPE user_defined ); - -FILE *yyget_in (void ); - -void yyset_in (FILE * in_str ); - -FILE *yyget_out (void ); - -void yyset_out (FILE * out_str ); - -yy_size_t yyget_leng (void ); - -char *yyget_text (void ); - -int yyget_lineno (void ); - -void yyset_lineno (int line_number ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap (void ); -#else -extern int yywrap (void ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (void ); -#else -static int input (void ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - yy_size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yylex (void); - -#define YY_DECL int yylex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 58 "slc-lex.l" - -#line 691 "slc-lex.c" - - if ( !(yy_init) ) - { - (yy_init) = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! (yy_start) ) - (yy_start) = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } - - yy_load_buffer_state( ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *yy_cp = (yy_hold_char); - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = (yy_start); -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 14 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 13 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = (yy_hold_char); - yy_cp = (yy_last_accepting_cpos); - yy_current_state = (yy_last_accepting_state); - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 59 "slc-lex.l" -{ - yylval.string = strdup ((const char *)yytext); - return LITERAL; - } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 63 "slc-lex.l" -{ yylval.string = handle_string(); return STRING; } - YY_BREAK -case 3: -/* rule 3 can match eol */ -YY_RULE_SETUP -#line 64 "slc-lex.l" -{ ++lineno; } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 65 "slc-lex.l" -{ handle_comment(); } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 66 "slc-lex.l" -{ return *yytext; } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 67 "slc-lex.l" -; - YY_BREAK -case 7: -YY_RULE_SETUP -#line 68 "slc-lex.l" -ECHO; - YY_BREAK -#line 813 "slc-lex.c" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = (yy_hold_char); - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++(yy_c_buf_p); - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = (yy_c_buf_p); - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_END_OF_FILE: - { - (yy_did_buffer_switch_on_eof) = 0; - - if ( yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = - (yytext_ptr) + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - (yy_c_buf_p) = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - - yy_current_state = yy_get_previous_state( ); - - yy_cp = (yy_c_buf_p); - yy_bp = (yytext_ptr) + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (void) -{ - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; - int ret_val; - - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) ((yy_c_buf_p) - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - if ( (yy_n_chars) == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (yy_n_chars) += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (void) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = (yy_start); - - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 14 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -{ - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - (yy_last_accepting_state) = yy_current_state; - (yy_last_accepting_cpos) = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 14 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 13); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (void) -#else - static int input (void) -#endif - -{ - int c; - - *(yy_c_buf_p) = (yy_hold_char); - - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) - /* This was really a NUL. */ - *(yy_c_buf_p) = '\0'; - - else - { /* need more input */ - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); - ++(yy_c_buf_p); - - switch ( yy_get_next_buffer( ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( ) ) - return 0; - - if ( ! (yy_did_buffer_switch_on_eof) ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - (yy_c_buf_p) = (yytext_ptr) + offset; - break; - } - } - } - - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ - *(yy_c_buf_p) = '\0'; /* preserve yytext */ - (yy_hold_char) = *++(yy_c_buf_p); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * - * @note This function does not reset the start condition to @c INITIAL . - */ - void yyrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } - - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void yy_load_buffer_state (void) -{ - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - (yy_hold_char) = *(yy_c_buf_p); -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * - */ - void yy_delete_buffer (YY_BUFFER_STATE b ) -{ - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ); - - yyfree((void *) b ); -} - -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - yy_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * - */ - void yy_flush_buffer (YY_BUFFER_STATE b ) -{ - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state( ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * - */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *(yy_c_buf_p) = (yy_hold_char); - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - (yy_buffer_stack_top)++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * - */ -void yypop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state( ); - (yy_did_buffer_switch_on_eof) = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yyensure_buffer_stack (void) -{ - yy_size_t num_to_alloc; - - if (!(yy_buffer_stack)) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - (yy_buffer_stack_max) = num_to_alloc; - (yy_buffer_stack_top) = 0; - return; - } - - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); - (yy_buffer_stack_max) = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) -{ - - return yy_scan_bytes(yystr,strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n, i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg ) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int yyget_lineno (void) -{ - - return yylineno; -} - -/** Get the input stream. - * - */ -FILE *yyget_in (void) -{ - return yyin; -} - -/** Get the output stream. - * - */ -FILE *yyget_out (void) -{ - return yyout; -} - -/** Get the length of the current token. - * - */ -yy_size_t yyget_leng (void) -{ - return yyleng; -} - -/** Get the current token. - * - */ - -char *yyget_text (void) -{ - return yytext; -} - -/** Set the current line number. - * @param line_number - * - */ -void yyset_lineno (int line_number ) -{ - - yylineno = line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * - * @see yy_switch_to_buffer - */ -void yyset_in (FILE * in_str ) -{ - yyin = in_str ; -} - -void yyset_out (FILE * out_str ) -{ - yyout = out_str ; -} - -int yyget_debug (void) -{ - return yy_flex_debug; -} - -void yyset_debug (int bdebug ) -{ - yy_flex_debug = bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = 0; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} - -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( ); - - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s ) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yyalloc (yy_size_t size ) -{ - return (void *) malloc( size ); -} - -void *yyrealloc (void * ptr, yy_size_t size ) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void yyfree (void * ptr ) -{ - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 68 "slc-lex.l" - - - -void -error_message (const char *format, ...) -{ - va_list args; - - va_start (args, format); - fprintf (stderr, "%s:%d: ", filename, lineno); - vfprintf (stderr, format, args); - va_end (args); - error_flag++; -} - -void -yyerror (char *s) -{ - error_message("%s\n", s); -} - -static void -handle_comment(void) -{ - int c; - int start_lineno = lineno; - int level = 1; - int seen_star = 0; - int seen_slash = 0; - while((c = input()) != EOF) { - if(c == '/') { - if(seen_star) { - if(--level == 0) - return; - seen_star = 0; - continue; - } - seen_slash = 1; - continue; - } else if(c == '*') { - if(seen_slash) { - level++; - seen_star = seen_slash = 0; - continue; - } - seen_star = 1; - continue; - } - seen_star = seen_slash = 0; - if(c == '\n') { - lineno++; - continue; - } - } - if(c == EOF) - error_message("unterminated comment, possibly started on line %d\n", start_lineno); -} - -static char * -handle_string(void) -{ - char x[1024]; - int i = 0; - int c; - int quote = 0; - while((c = input()) != EOF){ - if(quote) { - x[i++] = '\\'; - 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'; - return strdup(x); -} - -int -yywrap () -{ - return 1; -} - diff --git a/kerberosV/src/lib/sl/slc-lex.l b/kerberosV/src/lib/sl/slc-lex.l deleted file mode 100644 index 3081d857294..00000000000 --- a/kerberosV/src/lib/sl/slc-lex.l +++ /dev/null @@ -1,160 +0,0 @@ -%{ -/* - * Copyright (c) 2004 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: slc-lex.l,v 1.3 2013/06/17 18:57:45 robert Exp $ */ - -#undef ECHO - -#include -#include -#include -#include -#include "slc.h" -#include "slc-gram.h" -unsigned lineno = 1; - -static void handle_comment(void); -static char * handle_string(void); - -#define YY_NO_UNPUT - -#undef ECHO - -%} - -%option nounput - -%% -[A-Za-z][-A-Za-z0-9_]* { - yylval.string = strdup ((const char *)yytext); - return LITERAL; - } -"\"" { yylval.string = handle_string(); return STRING; } -\n { ++lineno; } -\/\* { handle_comment(); } -[={}] { return *yytext; } -[ \t] ; -%% - -void -error_message (const char *format, ...) -{ - va_list args; - - va_start (args, format); - fprintf (stderr, "%s:%d: ", filename, lineno); - vfprintf (stderr, format, args); - va_end (args); - error_flag++; -} - -void -yyerror (char *s) -{ - error_message("%s\n", s); -} - -static void -handle_comment(void) -{ - int c; - int start_lineno = lineno; - int level = 1; - int seen_star = 0; - int seen_slash = 0; - while((c = input()) != EOF) { - if(c == '/') { - if(seen_star) { - if(--level == 0) - return; - seen_star = 0; - continue; - } - seen_slash = 1; - continue; - } else if(c == '*') { - if(seen_slash) { - level++; - seen_star = seen_slash = 0; - continue; - } - seen_star = 1; - continue; - } - seen_star = seen_slash = 0; - if(c == '\n') { - lineno++; - continue; - } - } - if(c == EOF) - error_message("unterminated comment, possibly started on line %d\n", start_lineno); -} - -static char * -handle_string(void) -{ - char x[1024]; - int i = 0; - int c; - int quote = 0; - while((c = input()) != EOF){ - if(quote) { - x[i++] = '\\'; - 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'; - return strdup(x); -} - -int -yywrap () -{ - return 1; -} diff --git a/kerberosV/src/lib/sl/slc.h b/kerberosV/src/lib/sl/slc.h deleted file mode 100644 index e0be2e6347f..00000000000 --- a/kerberosV/src/lib/sl/slc.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2004 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: slc.h,v 1.2 2013/06/17 18:57:45 robert Exp $ */ -#include -#include -#include - -struct assignment { - char *name; - enum { a_value, a_assignment } type; - union { - char *value; - struct assignment *assignment; - } u; - unsigned int lineno; - struct assignment *next; -}; - -extern char *filename; -extern int error_flag; -void error_message (const char *format, ...); -int yylex(void); -void yyerror (char *s); -extern unsigned lineno; diff --git a/kerberosV/src/lib/sl/test_sl.c b/kerberosV/src/lib/sl/test_sl.c deleted file mode 100644 index 91140125ec9..00000000000 --- a/kerberosV/src/lib/sl/test_sl.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2006 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 "sl_locl.h" - -struct { - int ok; - const char *line; - int argc; - const char *argv[4]; -} lines[] = { - { 1, "", 1, { "" } }, - { 1, "foo", 1, { "foo" } }, - { 1, "foo bar", 2, { "foo", "bar" }}, - { 1, "foo bar baz", 3, { "foo", "bar", "baz" }}, - { 1, "foobar baz", 2, { "foobar", "baz" }}, - { 1, " foo", 1, { "foo" } }, - { 1, "foo ", 1, { "foo" } }, - { 1, " foo ", 1, { "foo" } }, - { 1, " foo bar", 2, { "foo", "bar" } }, - { 1, "foo\\ bar", 1, { "foo bar" } }, - { 1, "\"foo bar\"", 1, { "foo bar" } }, - { 1, "\"foo\\ bar\"", 1, { "foo bar" } }, - { 1, "\"foo\\\" bar\"", 1, { "foo\" bar" } }, - { 1, "\"\"f\"\"oo\"\"", 1, { "foo" } }, - { 1, "\"foobar\"baz", 1, { "foobarbaz" }}, - { 1, "foo\tbar baz", 3, { "foo", "bar", "baz" }}, - { 1, "\"foo bar\" baz", 2, { "foo bar", "baz" }}, - { 1, "\"foo bar baz\"", 1, { "foo bar baz" }}, - { 1, "\\\"foo bar baz", 3, { "\"foo", "bar", "baz" }}, - { 1, "\\ foo bar baz", 3, { " foo", "bar", "baz" }}, - { 0, "\\", 0, { "" }}, - { 0, "\"", 0, { "" }} -}; - -int -main(int argc, char **argv) -{ - int ret, i; - - for (i = 0; i < sizeof(lines)/sizeof(lines[0]); i++) { - int j, rargc = 0; - char **rargv = NULL; - char *buf = strdup(lines[i].line); - - ret = sl_make_argv(buf, &rargc, &rargv); - if (ret) { - if (!lines[i].ok) - goto next; - errx(1, "sl_make_argv test %d failed", i); - } else if (!lines[i].ok) - errx(1, "sl_make_argv passed test %d when it shouldn't", i); - if (rargc != lines[i].argc) - errx(1, "result argc (%d) != should be argc (%d) for test %d", - rargc, lines[i].argc, i); - for (j = 0; j < rargc; j++) - if (strcmp(rargv[j], lines[i].argv[j]) != 0) - errx(1, "result argv (%s) != should be argv (%s) for test %d", - rargv[j], lines[i].argv[j], i); - next: - free(buf); - free(rargv); - } - - return 0; -} diff --git a/kerberosV/src/lib/sqlite/Makefile.am b/kerberosV/src/lib/sqlite/Makefile.am deleted file mode 100644 index 3d45c4d1d30..00000000000 --- a/kerberosV/src/lib/sqlite/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -# $Id: Makefile.am,v 1.1 2013/06/17 19:11:44 robert Exp $ - -include $(top_srcdir)/Makefile.am.common - -lib_LTLIBRARIES = libheimsqlite.la - -noinst_HEADERS = sqlite3.h sqlite3ext.h - -libheimsqlite_la_SOURCES = sqlite3.c - -libheimsqlite_la_LIBADD = $(PTHREAD_LIBADD) - -EXTRA_DIST = NTMakefile diff --git a/kerberosV/src/lib/sqlite/Makefile.in b/kerberosV/src/lib/sqlite/Makefile.in deleted file mode 100644 index 0afd41b42db..00000000000 --- a/kerberosV/src/lib/sqlite/Makefile.in +++ /dev/null @@ -1,881 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - -@SET_MAKE@ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:44 robert Exp $ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:44 robert Exp $ - -# $Id: Makefile.in,v 1.1 2013/06/17 19:11:44 robert Exp $ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/Makefile.am.common \ - $(top_srcdir)/cf/Makefile.am.common -subdir = lib/sqlite -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/cf/aix.m4 \ - $(top_srcdir)/cf/auth-modules.m4 \ - $(top_srcdir)/cf/broken-getaddrinfo.m4 \ - $(top_srcdir)/cf/broken-glob.m4 \ - $(top_srcdir)/cf/broken-realloc.m4 \ - $(top_srcdir)/cf/broken-snprintf.m4 $(top_srcdir)/cf/broken.m4 \ - $(top_srcdir)/cf/broken2.m4 $(top_srcdir)/cf/c-attribute.m4 \ - $(top_srcdir)/cf/capabilities.m4 \ - $(top_srcdir)/cf/check-compile-et.m4 \ - $(top_srcdir)/cf/check-getpwnam_r-posix.m4 \ - $(top_srcdir)/cf/check-man.m4 \ - $(top_srcdir)/cf/check-netinet-ip-and-tcp.m4 \ - $(top_srcdir)/cf/check-type-extra.m4 \ - $(top_srcdir)/cf/check-var.m4 $(top_srcdir)/cf/check-x.m4 \ - $(top_srcdir)/cf/check-xau.m4 $(top_srcdir)/cf/crypto.m4 \ - $(top_srcdir)/cf/db.m4 $(top_srcdir)/cf/destdirs.m4 \ - $(top_srcdir)/cf/dispatch.m4 $(top_srcdir)/cf/dlopen.m4 \ - $(top_srcdir)/cf/find-func-no-libs.m4 \ - $(top_srcdir)/cf/find-func-no-libs2.m4 \ - $(top_srcdir)/cf/find-func.m4 \ - $(top_srcdir)/cf/find-if-not-broken.m4 \ - $(top_srcdir)/cf/framework-security.m4 \ - $(top_srcdir)/cf/have-struct-field.m4 \ - $(top_srcdir)/cf/have-type.m4 $(top_srcdir)/cf/irix.m4 \ - $(top_srcdir)/cf/krb-bigendian.m4 \ - $(top_srcdir)/cf/krb-func-getlogin.m4 \ - $(top_srcdir)/cf/krb-ipv6.m4 $(top_srcdir)/cf/krb-prog-ln-s.m4 \ - $(top_srcdir)/cf/krb-readline.m4 \ - $(top_srcdir)/cf/krb-struct-spwd.m4 \ - $(top_srcdir)/cf/krb-struct-winsize.m4 \ - $(top_srcdir)/cf/largefile.m4 $(top_srcdir)/cf/libtool.m4 \ - $(top_srcdir)/cf/ltoptions.m4 $(top_srcdir)/cf/ltsugar.m4 \ - $(top_srcdir)/cf/ltversion.m4 $(top_srcdir)/cf/lt~obsolete.m4 \ - $(top_srcdir)/cf/mips-abi.m4 $(top_srcdir)/cf/misc.m4 \ - $(top_srcdir)/cf/need-proto.m4 $(top_srcdir)/cf/osfc2.m4 \ - $(top_srcdir)/cf/otp.m4 $(top_srcdir)/cf/pkg.m4 \ - $(top_srcdir)/cf/proto-compat.m4 $(top_srcdir)/cf/pthreads.m4 \ - $(top_srcdir)/cf/resolv.m4 $(top_srcdir)/cf/retsigtype.m4 \ - $(top_srcdir)/cf/roken-frag.m4 \ - $(top_srcdir)/cf/socket-wrapper.m4 $(top_srcdir)/cf/sunos.m4 \ - $(top_srcdir)/cf/telnet.m4 $(top_srcdir)/cf/test-package.m4 \ - $(top_srcdir)/cf/version-script.m4 $(top_srcdir)/cf/wflags.m4 \ - $(top_srcdir)/cf/win32.m4 $(top_srcdir)/cf/with-all.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -am__DEPENDENCIES_1 = -libheimsqlite_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -am_libheimsqlite_la_OBJECTS = sqlite3.lo -libheimsqlite_la_OBJECTS = $(am_libheimsqlite_la_OBJECTS) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libheimsqlite_la_SOURCES) -DIST_SOURCES = $(libheimsqlite_la_SOURCES) -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AIX_EXTRA_KAFS = @AIX_EXTRA_KAFS@ -AMTAR = @AMTAR@ -AR = @AR@ -ASN1_COMPILE = @ASN1_COMPILE@ -ASN1_COMPILE_DEP = @ASN1_COMPILE_DEP@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CANONICAL_HOST = @CANONICAL_HOST@ -CAPNG_CFLAGS = @CAPNG_CFLAGS@ -CAPNG_LIBS = @CAPNG_LIBS@ -CATMAN = @CATMAN@ -CATMANEXT = @CATMANEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COMPILE_ET = @COMPILE_ET@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBHEADER = @DBHEADER@ -DBLIB = @DBLIB@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DIR_com_err = @DIR_com_err@ -DIR_hcrypto = @DIR_hcrypto@ -DIR_hdbdir = @DIR_hdbdir@ -DIR_roken = @DIR_roken@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -GROFF = @GROFF@ -INCLUDES_roken = @INCLUDES_roken@ -INCLUDE_hcrypto = @INCLUDE_hcrypto@ -INCLUDE_hesiod = @INCLUDE_hesiod@ -INCLUDE_krb4 = @INCLUDE_krb4@ -INCLUDE_libedit = @INCLUDE_libedit@ -INCLUDE_libintl = @INCLUDE_libintl@ -INCLUDE_openldap = @INCLUDE_openldap@ -INCLUDE_readline = @INCLUDE_readline@ -INCLUDE_sqlite3 = @INCLUDE_sqlite3@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LDFLAGS_VERSION_SCRIPT = @LDFLAGS_VERSION_SCRIPT@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBADD_roken = @LIBADD_roken@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_AUTH_SUBDIRS = @LIB_AUTH_SUBDIRS@ -LIB_NDBM = @LIB_NDBM@ -LIB_XauFileName = @LIB_XauFileName@ -LIB_XauReadAuth = @LIB_XauReadAuth@ -LIB_XauWriteAuth = @LIB_XauWriteAuth@ -LIB_bswap16 = @LIB_bswap16@ -LIB_bswap32 = @LIB_bswap32@ -LIB_com_err = @LIB_com_err@ -LIB_com_err_a = @LIB_com_err_a@ -LIB_com_err_so = @LIB_com_err_so@ -LIB_crypt = @LIB_crypt@ -LIB_db_create = @LIB_db_create@ -LIB_dbm_firstkey = @LIB_dbm_firstkey@ -LIB_dbopen = @LIB_dbopen@ -LIB_dispatch_async_f = @LIB_dispatch_async_f@ -LIB_dlopen = @LIB_dlopen@ -LIB_dn_expand = @LIB_dn_expand@ -LIB_dns_search = @LIB_dns_search@ -LIB_door_create = @LIB_door_create@ -LIB_freeaddrinfo = @LIB_freeaddrinfo@ -LIB_gai_strerror = @LIB_gai_strerror@ -LIB_getaddrinfo = @LIB_getaddrinfo@ -LIB_gethostbyname = @LIB_gethostbyname@ -LIB_gethostbyname2 = @LIB_gethostbyname2@ -LIB_getnameinfo = @LIB_getnameinfo@ -LIB_getpwnam_r = @LIB_getpwnam_r@ -LIB_getsockopt = @LIB_getsockopt@ -LIB_hcrypto = @LIB_hcrypto@ -LIB_hcrypto_a = @LIB_hcrypto_a@ -LIB_hcrypto_appl = @LIB_hcrypto_appl@ -LIB_hcrypto_so = @LIB_hcrypto_so@ -LIB_hesiod = @LIB_hesiod@ -LIB_hstrerror = @LIB_hstrerror@ -LIB_kdb = @LIB_kdb@ -LIB_krb4 = @LIB_krb4@ -LIB_libedit = @LIB_libedit@ -LIB_libintl = @LIB_libintl@ -LIB_loadquery = @LIB_loadquery@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ -LIB_openldap = @LIB_openldap@ -LIB_openpty = @LIB_openpty@ -LIB_otp = @LIB_otp@ -LIB_pidfile = @LIB_pidfile@ -LIB_readline = @LIB_readline@ -LIB_res_ndestroy = @LIB_res_ndestroy@ -LIB_res_nsearch = @LIB_res_nsearch@ -LIB_res_search = @LIB_res_search@ -LIB_roken = @LIB_roken@ -LIB_security = @LIB_security@ -LIB_setsockopt = @LIB_setsockopt@ -LIB_socket = @LIB_socket@ -LIB_sqlite3 = @LIB_sqlite3@ -LIB_syslog = @LIB_syslog@ -LIB_tgetent = @LIB_tgetent@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NO_AFS = @NO_AFS@ -NROFF = @NROFF@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LDADD = @PTHREAD_LDADD@ -PTHREAD_LIBADD = @PTHREAD_LIBADD@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLC = @SLC@ -SLC_DEP = @SLC_DEP@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONING = @VERSIONING@ -WFLAGS = @WFLAGS@ -WFLAGS_NOIMPLICITINT = @WFLAGS_NOIMPLICITINT@ -WFLAGS_NOUNUSED = @WFLAGS_NOUNUSED@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -YACC = @YACC@ -YFLAGS = @YFLAGS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dpagaix_cflags = @dpagaix_cflags@ -dpagaix_ldadd = @dpagaix_ldadd@ -dpagaix_ldflags = @dpagaix_ldflags@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -subdirs = @subdirs@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUFFIXES = .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CPPFLAGS = $(INCLUDES_roken) -@do_roken_rename_TRUE@ROKEN_RENAME = -DROKEN_RENAME -AM_CFLAGS = $(WFLAGS) -CP = cp -buildinclude = $(top_builddir)/include -LIB_el_init = @LIB_el_init@ -LIB_getattr = @LIB_getattr@ -LIB_getpwent_r = @LIB_getpwent_r@ -LIB_odm_initialize = @LIB_odm_initialize@ -LIB_setpcred = @LIB_setpcred@ -HESIODLIB = @HESIODLIB@ -HESIODINCLUDE = @HESIODINCLUDE@ -libexec_heimdaldir = $(libexecdir)/heimdal -NROFF_MAN = groff -mandoc -Tascii -LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS) -@KRB5_TRUE@LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \ -@KRB5_TRUE@ $(top_builddir)/lib/asn1/libasn1.la - -@KRB5_TRUE@LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la -LIB_heimbase = $(top_builddir)/base/libheimbase.la -@DCE_TRUE@LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la -lib_LTLIBRARIES = libheimsqlite.la -noinst_HEADERS = sqlite3.h sqlite3ext.h -libheimsqlite_la_SOURCES = sqlite3.c -libheimsqlite_la_LIBADD = $(PTHREAD_LIBADD) -EXTRA_DIST = NTMakefile -all: all-am - -.SUFFIXES: -.SUFFIXES: .et .h .x .z .hx .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8 .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(top_srcdir)/cf/Makefile.am.common $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/sqlite/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign lib/sqlite/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libheimsqlite.la: $(libheimsqlite_la_OBJECTS) $(libheimsqlite_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libheimsqlite_la_OBJECTS) $(libheimsqlite_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqlite3.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) all-local -installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-data-hook -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES - @$(NORMAL_INSTALL) - $(MAKE) $(AM_MAKEFLAGS) uninstall-hook -.MAKE: check-am install-am install-data-am install-exec-am \ - install-strip uninstall-am - -.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \ - clean clean-generic clean-libLTLIBRARIES clean-libtool ctags \ - dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-hook install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-hook \ - uninstall-libLTLIBRARIES - - -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 \ - echo "*"; \ - echo "* Failed to install $$x setuid root"; \ - echo "*"; \ - fi; done - -install-exec-hook: install-suid-programs - -install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) - @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_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 ; \ - foo='$(nobase_include_HEADERS)'; \ - for f in $$foo; do \ - if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \ - else file="$$f"; fi; \ - $(mkdir_p) $(buildinclude)/`dirname $$f` ; \ - 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 - -check-local:: - @if test '$(CHECK_LOCAL)' = "no-check-local"; then \ - foo=''; elif test '$(CHECK_LOCAL)'; then \ - foo='$(CHECK_LOCAL)'; else \ - foo='$(PROGRAMS)'; fi; \ - if test "$$foo"; then \ - failed=0; all=0; \ - for i in $$foo; do \ - all=`expr $$all + 1`; \ - if (./$$i --version && ./$$i --help) > /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 || exit 1; \ - fi - -.x.c: - @cmp -s $< $@ 2> /dev/null || cp $< $@ - -.hx.h: - @cmp -s $< $@ 2> /dev/null || cp $< $@ -#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-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -uninstall-cat-mans: - $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) - -install-data-hook: install-cat-mans -uninstall-hook: uninstall-cat-mans - -.et.h: - $(COMPILE_ET) $< -.et.c: - $(COMPILE_ET) $< - -# -# Useful target for debugging -# - -check-valgrind: - tobjdir=`cd $(top_builddir) && pwd` ; \ - tsrcdir=`cd $(top_srcdir) && pwd` ; \ - env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check - -# -# Target to please samba build farm, builds distfiles in-tree. -# Will break when automake changes... -# - -distdir-in-tree: $(DISTFILES) $(INFO_DEPS) - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" != .; then \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \ - fi ; \ - done - -# 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/kerberosV/src/lib/sqlite/NTMakefile b/kerberosV/src/lib/sqlite/NTMakefile deleted file mode 100644 index f9e90fb77ff..00000000000 --- a/kerberosV/src/lib/sqlite/NTMakefile +++ /dev/null @@ -1,47 +0,0 @@ -######################################################################## -# -# Copyright (c) 2009, Secure Endpoints Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# - 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. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 -# COPYRIGHT HOLDER 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. -# - -RELDIR=lib\sqlite - -!include ../../windows/NTMakefile.w32 - -INCFILES= \ - $(INCDIR)\sqlite3.h \ - $(INCDIR)\sqlite3ext.h - -$(LIBSQLITE): $(OBJ)\sqlite3.obj - $(LIBCON) - -all:: $(INCFILES) $(LIBSQLITE) - -clean:: - -$(RM) $(LIBSQLITE) - -$(RM) $(INCFILES) diff --git a/kerberosV/src/lib/sqlite/sqlite3.c b/kerberosV/src/lib/sqlite/sqlite3.c deleted file mode 100644 index e95033df936..00000000000 --- a/kerberosV/src/lib/sqlite/sqlite3.c +++ /dev/null @@ -1,131076 +0,0 @@ -/****************************************************************************** -** This file is an amalgamation of many separate C source files from SQLite -** version 3.7.8. By combining all the individual C code files into this -** single large file, the entire code can be compiled as a single translation -** unit. This allows many compilers to do optimizations that would not be -** possible if the files were compiled separately. Performance improvements -** of 5% or more are commonly seen when SQLite is compiled as a single -** translation unit. -** -** This file is all you need to compile SQLite. To use SQLite in other -** programs, you need this file and the "sqlite3.h" header file that defines -** the programming interface to the SQLite library. (If you do not have -** the "sqlite3.h" header file at hand, you will find a copy embedded within -** the text of this file. Search for "Begin file sqlite3.h" to find the start -** of the embedded sqlite3.h header file.) Additional code files may be needed -** if you want a wrapper to interface SQLite with your choice of programming -** language. The code for the "sqlite3" command-line shell is also in a -** separate file. This file contains only code for the core SQLite library. -*/ -#define SQLITE_CORE 1 -#define SQLITE_AMALGAMATION 1 -#ifndef SQLITE_PRIVATE -# define SQLITE_PRIVATE static -#endif -#ifndef SQLITE_API -# define SQLITE_API -#endif -/************** Begin file sqliteInt.h ***************************************/ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** Internal interface definitions for SQLite. -** -*/ -#ifndef _SQLITEINT_H_ -#define _SQLITEINT_H_ - -/* -** These #defines should enable >2GB file support on POSIX if the -** underlying operating system supports it. If the OS lacks -** large file support, or if the OS is windows, these should be no-ops. -** -** Ticket #2739: The _LARGEFILE_SOURCE macro must appear before any -** system #includes. Hence, this block of code must be the very first -** code in all source files. -** -** Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch -** on the compiler command line. This is necessary if you are compiling -** on a recent machine (ex: Red Hat 7.2) but you want your code to work -** on an older machine (ex: Red Hat 6.0). If you compile on Red Hat 7.2 -** without this option, LFS is enable. But LFS does not exist in the kernel -** in Red Hat 6.0, so the code won't work. Hence, for maximum binary -** portability you should omit LFS. -** -** Similar is true for Mac OS X. LFS is only supported on Mac OS X 9 and later. -*/ -#ifndef SQLITE_DISABLE_LFS -# define _LARGE_FILE 1 -# ifndef _FILE_OFFSET_BITS -# define _FILE_OFFSET_BITS 64 -# endif -# define _LARGEFILE_SOURCE 1 -#endif - -/* -** Include the configuration header output by 'configure' if we're using the -** autoconf-based build -*/ -#ifdef _HAVE_SQLITE_CONFIG_H -#include "config.h" -#endif - -/************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/ -/************** Begin file sqliteLimit.h *************************************/ -/* -** 2007 May 7 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** -** This file defines various limits of what SQLite can process. -*/ - -/* -** The maximum length of a TEXT or BLOB in bytes. This also -** limits the size of a row in a table or index. -** -** The hard limit is the ability of a 32-bit signed integer -** to count the size: 2^31-1 or 2147483647. -*/ -#ifndef SQLITE_MAX_LENGTH -# define SQLITE_MAX_LENGTH 1000000000 -#endif - -/* -** This is the maximum number of -** -** * Columns in a table -** * Columns in an index -** * Columns in a view -** * Terms in the SET clause of an UPDATE statement -** * Terms in the result set of a SELECT statement -** * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement. -** * Terms in the VALUES clause of an INSERT statement -** -** The hard upper limit here is 32676. Most database people will -** tell you that in a well-normalized database, you usually should -** not have more than a dozen or so columns in any table. And if -** that is the case, there is no point in having more than a few -** dozen values in any of the other situations described above. -*/ -#ifndef SQLITE_MAX_COLUMN -# define SQLITE_MAX_COLUMN 2000 -#endif - -/* -** The maximum length of a single SQL statement in bytes. -** -** It used to be the case that setting this value to zero would -** turn the limit off. That is no longer true. It is not possible -** to turn this limit off. -*/ -#ifndef SQLITE_MAX_SQL_LENGTH -# define SQLITE_MAX_SQL_LENGTH 1000000000 -#endif - -/* -** The maximum depth of an expression tree. This is limited to -** some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might -** want to place more severe limits on the complexity of an -** expression. -** -** A value of 0 used to mean that the limit was not enforced. -** But that is no longer true. The limit is now strictly enforced -** at all times. -*/ -#ifndef SQLITE_MAX_EXPR_DEPTH -# define SQLITE_MAX_EXPR_DEPTH 1000 -#endif - -/* -** The maximum number of terms in a compound SELECT statement. -** The code generator for compound SELECT statements does one -** level of recursion for each term. A stack overflow can result -** if the number of terms is too large. In practice, most SQL -** never has more than 3 or 4 terms. Use a value of 0 to disable -** any limit on the number of terms in a compount SELECT. -*/ -#ifndef SQLITE_MAX_COMPOUND_SELECT -# define SQLITE_MAX_COMPOUND_SELECT 500 -#endif - -/* -** The maximum number of opcodes in a VDBE program. -** Not currently enforced. -*/ -#ifndef SQLITE_MAX_VDBE_OP -# define SQLITE_MAX_VDBE_OP 25000 -#endif - -/* -** The maximum number of arguments to an SQL function. -*/ -#ifndef SQLITE_MAX_FUNCTION_ARG -# define SQLITE_MAX_FUNCTION_ARG 127 -#endif - -/* -** The maximum number of in-memory pages to use for the main database -** table and for temporary tables. The SQLITE_DEFAULT_CACHE_SIZE -*/ -#ifndef SQLITE_DEFAULT_CACHE_SIZE -# define SQLITE_DEFAULT_CACHE_SIZE 2000 -#endif -#ifndef SQLITE_DEFAULT_TEMP_CACHE_SIZE -# define SQLITE_DEFAULT_TEMP_CACHE_SIZE 500 -#endif - -/* -** The default number of frames to accumulate in the log file before -** checkpointing the database in WAL mode. -*/ -#ifndef SQLITE_DEFAULT_WAL_AUTOCHECKPOINT -# define SQLITE_DEFAULT_WAL_AUTOCHECKPOINT 1000 -#endif - -/* -** The maximum number of attached databases. This must be between 0 -** and 62. The upper bound on 62 is because a 64-bit integer bitmap -** is used internally to track attached databases. -*/ -#ifndef SQLITE_MAX_ATTACHED -# define SQLITE_MAX_ATTACHED 10 -#endif - - -/* -** The maximum value of a ?nnn wildcard that the parser will accept. -*/ -#ifndef SQLITE_MAX_VARIABLE_NUMBER -# define SQLITE_MAX_VARIABLE_NUMBER 999 -#endif - -/* Maximum page size. The upper bound on this value is 65536. This a limit -** imposed by the use of 16-bit offsets within each page. -** -** Earlier versions of SQLite allowed the user to change this value at -** compile time. This is no longer permitted, on the grounds that it creates -** a library that is technically incompatible with an SQLite library -** compiled with a different limit. If a process operating on a database -** with a page-size of 65536 bytes crashes, then an instance of SQLite -** compiled with the default page-size limit will not be able to rollback -** the aborted transaction. This could lead to database corruption. -*/ -#ifdef SQLITE_MAX_PAGE_SIZE -# undef SQLITE_MAX_PAGE_SIZE -#endif -#define SQLITE_MAX_PAGE_SIZE 65536 - - -/* -** The default size of a database page. -*/ -#ifndef SQLITE_DEFAULT_PAGE_SIZE -# define SQLITE_DEFAULT_PAGE_SIZE 1024 -#endif -#if SQLITE_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE -# undef SQLITE_DEFAULT_PAGE_SIZE -# define SQLITE_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE -#endif - -/* -** Ordinarily, if no value is explicitly provided, SQLite creates databases -** with page size SQLITE_DEFAULT_PAGE_SIZE. However, based on certain -** device characteristics (sector-size and atomic write() support), -** SQLite may choose a larger value. This constant is the maximum value -** SQLite will choose on its own. -*/ -#ifndef SQLITE_MAX_DEFAULT_PAGE_SIZE -# define SQLITE_MAX_DEFAULT_PAGE_SIZE 8192 -#endif -#if SQLITE_MAX_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE -# undef SQLITE_MAX_DEFAULT_PAGE_SIZE -# define SQLITE_MAX_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE -#endif - - -/* -** Maximum number of pages in one database file. -** -** This is really just the default value for the max_page_count pragma. -** This value can be lowered (or raised) at run-time using that the -** max_page_count macro. -*/ -#ifndef SQLITE_MAX_PAGE_COUNT -# define SQLITE_MAX_PAGE_COUNT 1073741823 -#endif - -/* -** Maximum length (in bytes) of the pattern in a LIKE or GLOB -** operator. -*/ -#ifndef SQLITE_MAX_LIKE_PATTERN_LENGTH -# define SQLITE_MAX_LIKE_PATTERN_LENGTH 50000 -#endif - -/* -** Maximum depth of recursion for triggers. -** -** A value of 1 means that a trigger program will not be able to itself -** fire any triggers. A value of 0 means that no trigger programs at all -** may be executed. -*/ -#ifndef SQLITE_MAX_TRIGGER_DEPTH -# define SQLITE_MAX_TRIGGER_DEPTH 1000 -#endif - -/************** End of sqliteLimit.h *****************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ - -/* Disable nuisance warnings on Borland compilers */ -#if defined(__BORLANDC__) -#pragma warn -rch /* unreachable code */ -#pragma warn -ccc /* Condition is always true or false */ -#pragma warn -aus /* Assigned value is never used */ -#pragma warn -csu /* Comparing signed and unsigned */ -#pragma warn -spa /* Suspicious pointer arithmetic */ -#endif - -/* Needed for various definitions... */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif - -/* -** Include standard header files as necessary -*/ -#ifdef HAVE_STDINT_H -#include -#endif -#ifdef HAVE_INTTYPES_H -#include -#endif - -/* -** The number of samples of an index that SQLite takes in order to -** construct a histogram of the table content when running ANALYZE -** and with SQLITE_ENABLE_STAT2 -*/ -#define SQLITE_INDEX_SAMPLES 10 - -/* -** The following macros are used to cast pointers to integers and -** integers to pointers. The way you do this varies from one compiler -** to the next, so we have developed the following set of #if statements -** to generate appropriate macros for a wide range of compilers. -** -** The correct "ANSI" way to do this is to use the intptr_t type. -** Unfortunately, that typedef is not available on all compilers, or -** if it is available, it requires an #include of specific headers -** that vary from one machine to the next. -** -** Ticket #3860: The llvm-gcc-4.2 compiler from Apple chokes on -** the ((void*)&((char*)0)[X]) construct. But MSVC chokes on ((void*)(X)). -** So we have to define the macros in different ways depending on the -** compiler. -*/ -#if defined(__PTRDIFF_TYPE__) /* This case should work for GCC */ -# define SQLITE_INT_TO_PTR(X) ((void*)(__PTRDIFF_TYPE__)(X)) -# define SQLITE_PTR_TO_INT(X) ((int)(__PTRDIFF_TYPE__)(X)) -#elif !defined(__GNUC__) /* Works for compilers other than LLVM */ -# define SQLITE_INT_TO_PTR(X) ((void*)&((char*)0)[X]) -# define SQLITE_PTR_TO_INT(X) ((int)(((char*)X)-(char*)0)) -#elif defined(HAVE_STDINT_H) /* Use this case if we have ANSI headers */ -# define SQLITE_INT_TO_PTR(X) ((void*)(intptr_t)(X)) -# define SQLITE_PTR_TO_INT(X) ((int)(intptr_t)(X)) -#else /* Generates a warning - but it always works */ -# define SQLITE_INT_TO_PTR(X) ((void*)(X)) -# define SQLITE_PTR_TO_INT(X) ((int)(X)) -#endif - -/* -** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2. -** 0 means mutexes are permanently disable and the library is never -** threadsafe. 1 means the library is serialized which is the highest -** level of threadsafety. 2 means the libary is multithreaded - multiple -** threads can use SQLite as long as no two threads try to use the same -** database connection at the same time. -** -** Older versions of SQLite used an optional THREADSAFE macro. -** We support that for legacy. -*/ -#if !defined(SQLITE_THREADSAFE) -#if defined(THREADSAFE) -# define SQLITE_THREADSAFE THREADSAFE -#else -# define SQLITE_THREADSAFE 1 /* IMP: R-07272-22309 */ -#endif -#endif - -/* -** The SQLITE_DEFAULT_MEMSTATUS macro must be defined as either 0 or 1. -** It determines whether or not the features related to -** SQLITE_CONFIG_MEMSTATUS are available by default or not. This value can -** be overridden at runtime using the sqlite3_config() API. -*/ -#if !defined(SQLITE_DEFAULT_MEMSTATUS) -# define SQLITE_DEFAULT_MEMSTATUS 1 -#endif - -/* -** Exactly one of the following macros must be defined in order to -** specify which memory allocation subsystem to use. -** -** SQLITE_SYSTEM_MALLOC // Use normal system malloc() -** SQLITE_WIN32_MALLOC // Use Win32 native heap API -** SQLITE_MEMDEBUG // Debugging version of system malloc() -** -** On Windows, if the SQLITE_WIN32_MALLOC_VALIDATE macro is defined and the -** assert() macro is enabled, each call into the Win32 native heap subsystem -** will cause HeapValidate to be called. If heap validation should fail, an -** assertion will be triggered. -** -** (Historical note: There used to be several other options, but we've -** pared it down to just these two.) -** -** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as -** the default. -*/ -#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_WIN32_MALLOC)+defined(SQLITE_MEMDEBUG)>1 -# error "At most one of the following compile-time configuration options\ - is allows: SQLITE_SYSTEM_MALLOC, SQLITE_WIN32_MALLOC, SQLITE_MEMDEBUG" -#endif -#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_WIN32_MALLOC)+defined(SQLITE_MEMDEBUG)==0 -# define SQLITE_SYSTEM_MALLOC 1 -#endif - -/* -** If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the -** sizes of memory allocations below this value where possible. -*/ -#if !defined(SQLITE_MALLOC_SOFT_LIMIT) -# define SQLITE_MALLOC_SOFT_LIMIT 1024 -#endif - -/* -** We need to define _XOPEN_SOURCE as follows in order to enable -** recursive mutexes on most Unix systems. But Mac OS X is different. -** The _XOPEN_SOURCE define causes problems for Mac OS X we are told, -** so it is omitted there. See ticket #2673. -** -** Later we learn that _XOPEN_SOURCE is poorly or incorrectly -** implemented on some systems. So we avoid defining it at all -** if it is already defined or if it is unneeded because we are -** not doing a threadsafe build. Ticket #2681. -** -** See also ticket #2741. -*/ -#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE -#ifdef __sun -# define _XOPEN_SOURCE 600 -#else -# define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */ -#endif -#endif - -/* -** The TCL headers are only needed when compiling the TCL bindings. -*/ -#if defined(SQLITE_TCL) || defined(TCLSH) -# include -#endif - -/* -** Many people are failing to set -DNDEBUG=1 when compiling SQLite. -** Setting NDEBUG makes the code smaller and run faster. So the following -** lines are added to automatically set NDEBUG unless the -DSQLITE_DEBUG=1 -** option is set. Thus NDEBUG becomes an opt-in rather than an opt-out -** feature. -*/ -#if !defined(NDEBUG) && !defined(SQLITE_DEBUG) -# define NDEBUG 1 -#endif - -/* -** The testcase() macro is used to aid in coverage testing. When -** doing coverage testing, the condition inside the argument to -** testcase() must be evaluated both true and false in order to -** get full branch coverage. The testcase() macro is inserted -** to help ensure adequate test coverage in places where simple -** condition/decision coverage is inadequate. For example, testcase() -** can be used to make sure boundary values are tested. For -** bitmask tests, testcase() can be used to make sure each bit -** is significant and used at least once. On switch statements -** where multiple cases go to the same block of code, testcase() -** can insure that all cases are evaluated. -** -*/ -#ifdef SQLITE_COVERAGE_TEST -SQLITE_PRIVATE void sqlite3Coverage(int); -# define testcase(X) if( X ){ sqlite3Coverage(__LINE__); } -#else -# define testcase(X) -#endif - -/* -** The TESTONLY macro is used to enclose variable declarations or -** other bits of code that are needed to support the arguments -** within testcase() and assert() macros. -*/ -#if !defined(NDEBUG) || defined(SQLITE_COVERAGE_TEST) -# define TESTONLY(X) X -#else -# define TESTONLY(X) -#endif - -/* -** Sometimes we need a small amount of code such as a variable initialization -** to setup for a later assert() statement. We do not want this code to -** appear when assert() is disabled. The following macro is therefore -** used to contain that setup code. The "VVA" acronym stands for -** "Verification, Validation, and Accreditation". In other words, the -** code within VVA_ONLY() will only run during verification processes. -*/ -#ifndef NDEBUG -# define VVA_ONLY(X) X -#else -# define VVA_ONLY(X) -#endif - -/* -** The ALWAYS and NEVER macros surround boolean expressions which -** are intended to always be true or false, respectively. Such -** expressions could be omitted from the code completely. But they -** are included in a few cases in order to enhance the resilience -** of SQLite to unexpected behavior - to make the code "self-healing" -** or "ductile" rather than being "brittle" and crashing at the first -** hint of unplanned behavior. -** -** In other words, ALWAYS and NEVER are added for defensive code. -** -** When doing coverage testing ALWAYS and NEVER are hard-coded to -** be true and false so that the unreachable code then specify will -** not be counted as untested code. -*/ -#if defined(SQLITE_COVERAGE_TEST) -# define ALWAYS(X) (1) -# define NEVER(X) (0) -#elif !defined(NDEBUG) -# define ALWAYS(X) ((X)?1:(assert(0),0)) -# define NEVER(X) ((X)?(assert(0),1):0) -#else -# define ALWAYS(X) (X) -# define NEVER(X) (X) -#endif - -/* -** Return true (non-zero) if the input is a integer that is too large -** to fit in 32-bits. This macro is used inside of various testcase() -** macros to verify that we have tested SQLite for large-file support. -*/ -#define IS_BIG_INT(X) (((X)&~(i64)0xffffffff)!=0) - -/* -** The macro unlikely() is a hint that surrounds a boolean -** expression that is usually false. Macro likely() surrounds -** a boolean expression that is usually true. GCC is able to -** use these hints to generate better code, sometimes. -*/ -#if defined(__GNUC__) && 0 -# define likely(X) __builtin_expect((X),1) -# define unlikely(X) __builtin_expect((X),0) -#else -# define likely(X) !!(X) -# define unlikely(X) !!(X) -#endif - -/************** Include sqlite3.h in the middle of sqliteInt.h ***************/ -/************** Begin file sqlite3.h *****************************************/ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This header file defines the interface that the SQLite library -** presents to client programs. If a C-function, structure, datatype, -** or constant definition does not appear in this file, then it is -** not a published API of SQLite, is subject to change without -** notice, and should not be referenced by programs that use SQLite. -** -** Some of the definitions that are in this file are marked as -** "experimental". Experimental interfaces are normally new -** features recently added to SQLite. We do not anticipate changes -** to experimental interfaces but reserve the right to make minor changes -** if experience from use "in the wild" suggest such changes are prudent. -** -** The official C-language API documentation for SQLite is derived -** from comments in this file. This file is the authoritative source -** on how SQLite interfaces are suppose to operate. -** -** The name of this file under configuration management is "sqlite.h.in". -** The makefile makes some minor changes to this file (such as inserting -** the version number) and changes its name to "sqlite3.h" as -** part of the build process. -*/ -#ifndef _SQLITE3_H_ -#define _SQLITE3_H_ -#include /* Needed for the definition of va_list */ - -/* -** Make sure we can call this stuff from C++. -*/ -#if 0 -extern "C" { -#endif - - -/* -** Add the ability to override 'extern' -*/ -#ifndef SQLITE_EXTERN -# define SQLITE_EXTERN extern -#endif - -#ifndef SQLITE_API -# define SQLITE_API -#endif - - -/* -** These no-op macros are used in front of interfaces to mark those -** interfaces as either deprecated or experimental. New applications -** should not use deprecated interfaces - they are support for backwards -** compatibility only. Application writers should be aware that -** experimental interfaces are subject to change in point releases. -** -** These macros used to resolve to various kinds of compiler magic that -** would generate warning messages when they were used. But that -** compiler magic ended up generating such a flurry of bug reports -** that we have taken it all out and gone back to using simple -** noop macros. -*/ -#define SQLITE_DEPRECATED -#define SQLITE_EXPERIMENTAL - -/* -** Ensure these symbols were not defined by some previous header file. -*/ -#ifdef SQLITE_VERSION -# undef SQLITE_VERSION -#endif -#ifdef SQLITE_VERSION_NUMBER -# undef SQLITE_VERSION_NUMBER -#endif - -/* -** CAPI3REF: Compile-Time Library Version Numbers -** -** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header -** evaluates to a string literal that is the SQLite version in the -** format "X.Y.Z" where X is the major version number (always 3 for -** SQLite3) and Y is the minor version number and Z is the release number.)^ -** ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer -** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same -** numbers used in [SQLITE_VERSION].)^ -** The SQLITE_VERSION_NUMBER for any given release of SQLite will also -** be larger than the release from which it is derived. Either Y will -** be held constant and Z will be incremented or else Y will be incremented -** and Z will be reset to zero. -** -** Since version 3.6.18, SQLite source code has been stored in the -** Fossil configuration management -** system. ^The SQLITE_SOURCE_ID macro evaluates to -** a string which identifies a particular check-in of SQLite -** within its configuration management system. ^The SQLITE_SOURCE_ID -** string contains the date and time of the check-in (UTC) and an SHA1 -** hash of the entire source tree. -** -** See also: [sqlite3_libversion()], -** [sqlite3_libversion_number()], [sqlite3_sourceid()], -** [sqlite_version()] and [sqlite_source_id()]. -*/ -#define SQLITE_VERSION "3.7.8" -#define SQLITE_VERSION_NUMBER 3007008 -#define SQLITE_SOURCE_ID "2011-09-19 14:49:19 3e0da808d2f5b4d12046e05980ca04578f581177" - -/* -** CAPI3REF: Run-Time Library Version Numbers -** KEYWORDS: sqlite3_version, sqlite3_sourceid -** -** These interfaces provide the same information as the [SQLITE_VERSION], -** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros -** but are associated with the library instead of the header file. ^(Cautious -** programmers might include assert() statements in their application to -** verify that values returned by these interfaces match the macros in -** the header, and thus insure that the application is -** compiled with matching library and header files. -** -**
-** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
-** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
-** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
-** 
)^ -** -** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] -** macro. ^The sqlite3_libversion() function returns a pointer to the -** to the sqlite3_version[] string constant. The sqlite3_libversion() -** function is provided for use in DLLs since DLL users usually do not have -** direct access to string constants within the DLL. ^The -** sqlite3_libversion_number() function returns an integer equal to -** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns -** a pointer to a string constant whose value is the same as the -** [SQLITE_SOURCE_ID] C preprocessor macro. -** -** See also: [sqlite_version()] and [sqlite_source_id()]. -*/ -SQLITE_API const char sqlite3_version[] = SQLITE_VERSION; -SQLITE_API const char *sqlite3_libversion(void); -SQLITE_API const char *sqlite3_sourceid(void); -SQLITE_API int sqlite3_libversion_number(void); - -/* -** CAPI3REF: Run-Time Library Compilation Options Diagnostics -** -** ^The sqlite3_compileoption_used() function returns 0 or 1 -** indicating whether the specified option was defined at -** compile time. ^The SQLITE_ prefix may be omitted from the -** option name passed to sqlite3_compileoption_used(). -** -** ^The sqlite3_compileoption_get() function allows iterating -** over the list of options that were defined at compile time by -** returning the N-th compile time option string. ^If N is out of range, -** sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_ -** prefix is omitted from any strings returned by -** sqlite3_compileoption_get(). -** -** ^Support for the diagnostic functions sqlite3_compileoption_used() -** and sqlite3_compileoption_get() may be omitted by specifying the -** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time. -** -** See also: SQL functions [sqlite_compileoption_used()] and -** [sqlite_compileoption_get()] and the [compile_options pragma]. -*/ -#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS -SQLITE_API int sqlite3_compileoption_used(const char *zOptName); -SQLITE_API const char *sqlite3_compileoption_get(int N); -#endif - -/* -** CAPI3REF: Test To See If The Library Is Threadsafe -** -** ^The sqlite3_threadsafe() function returns zero if and only if -** SQLite was compiled mutexing code omitted due to the -** [SQLITE_THREADSAFE] compile-time option being set to 0. -** -** SQLite can be compiled with or without mutexes. When -** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes -** are enabled and SQLite is threadsafe. When the -** [SQLITE_THREADSAFE] macro is 0, -** the mutexes are omitted. Without the mutexes, it is not safe -** to use SQLite concurrently from more than one thread. -** -** Enabling mutexes incurs a measurable performance penalty. -** So if speed is of utmost importance, it makes sense to disable -** the mutexes. But for maximum safety, mutexes should be enabled. -** ^The default behavior is for mutexes to be enabled. -** -** This interface can be used by an application to make sure that the -** version of SQLite that it is linking against was compiled with -** the desired setting of the [SQLITE_THREADSAFE] macro. -** -** This interface only reports on the compile-time mutex setting -** of the [SQLITE_THREADSAFE] flag. If SQLite is compiled with -** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but -** can be fully or partially disabled using a call to [sqlite3_config()] -** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD], -** or [SQLITE_CONFIG_MUTEX]. ^(The return value of the -** sqlite3_threadsafe() function shows only the compile-time setting of -** thread safety, not any run-time changes to that setting made by -** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() -** is unchanged by calls to sqlite3_config().)^ -** -** See the [threading mode] documentation for additional information. -*/ -SQLITE_API int sqlite3_threadsafe(void); - -/* -** CAPI3REF: Database Connection Handle -** KEYWORDS: {database connection} {database connections} -** -** Each open SQLite database is represented by a pointer to an instance of -** the opaque structure named "sqlite3". It is useful to think of an sqlite3 -** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and -** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] -** is its destructor. There are many other interfaces (such as -** [sqlite3_prepare_v2()], [sqlite3_create_function()], and -** [sqlite3_busy_timeout()] to name but three) that are methods on an -** sqlite3 object. -*/ -typedef struct sqlite3 sqlite3; - -/* -** CAPI3REF: 64-Bit Integer Types -** KEYWORDS: sqlite_int64 sqlite_uint64 -** -** Because there is no cross-platform way to specify 64-bit integer types -** SQLite includes typedefs for 64-bit signed and unsigned integers. -** -** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions. -** The sqlite_int64 and sqlite_uint64 types are supported for backwards -** compatibility only. -** -** ^The sqlite3_int64 and sqlite_int64 types can store integer values -** between -9223372036854775808 and +9223372036854775807 inclusive. ^The -** sqlite3_uint64 and sqlite_uint64 types can store integer values -** between 0 and +18446744073709551615 inclusive. -*/ -#ifdef SQLITE_INT64_TYPE - typedef SQLITE_INT64_TYPE sqlite_int64; - typedef unsigned SQLITE_INT64_TYPE sqlite_uint64; -#elif defined(_MSC_VER) || defined(__BORLANDC__) - typedef __int64 sqlite_int64; - typedef unsigned __int64 sqlite_uint64; -#else - typedef long long int sqlite_int64; - typedef unsigned long long int sqlite_uint64; -#endif -typedef sqlite_int64 sqlite3_int64; -typedef sqlite_uint64 sqlite3_uint64; - -/* -** If compiling for a processor that lacks floating point support, -** substitute integer for floating-point. -*/ -#ifdef SQLITE_OMIT_FLOATING_POINT -# define double sqlite3_int64 -#endif - -/* -** CAPI3REF: Closing A Database Connection -** -** ^The sqlite3_close() routine is the destructor for the [sqlite3] object. -** ^Calls to sqlite3_close() return SQLITE_OK if the [sqlite3] object is -** successfully destroyed and all associated resources are deallocated. -** -** Applications must [sqlite3_finalize | finalize] all [prepared statements] -** and [sqlite3_blob_close | close] all [BLOB handles] associated with -** the [sqlite3] object prior to attempting to close the object. ^If -** sqlite3_close() is called on a [database connection] that still has -** outstanding [prepared statements] or [BLOB handles], then it returns -** SQLITE_BUSY. -** -** ^If [sqlite3_close()] is invoked while a transaction is open, -** the transaction is automatically rolled back. -** -** The C parameter to [sqlite3_close(C)] must be either a NULL -** pointer or an [sqlite3] object pointer obtained -** from [sqlite3_open()], [sqlite3_open16()], or -** [sqlite3_open_v2()], and not previously closed. -** ^Calling sqlite3_close() with a NULL pointer argument is a -** harmless no-op. -*/ -SQLITE_API int sqlite3_close(sqlite3 *); - -/* -** The type for a callback function. -** This is legacy and deprecated. It is included for historical -** compatibility and is not documented. -*/ -typedef int (*sqlite3_callback)(void*,int,char**, char**); - -/* -** CAPI3REF: One-Step Query Execution Interface -** -** The sqlite3_exec() interface is a convenience wrapper around -** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], -** that allows an application to run multiple statements of SQL -** without having to use a lot of C code. -** -** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, -** semicolon-separate SQL statements passed into its 2nd argument, -** in the context of the [database connection] passed in as its 1st -** argument. ^If the callback function of the 3rd argument to -** sqlite3_exec() is not NULL, then it is invoked for each result row -** coming out of the evaluated SQL statements. ^The 4th argument to -** sqlite3_exec() is relayed through to the 1st argument of each -** callback invocation. ^If the callback pointer to sqlite3_exec() -** is NULL, then no callback is ever invoked and result rows are -** ignored. -** -** ^If an error occurs while evaluating the SQL statements passed into -** sqlite3_exec(), then execution of the current statement stops and -** subsequent statements are skipped. ^If the 5th parameter to sqlite3_exec() -** is not NULL then any error message is written into memory obtained -** from [sqlite3_malloc()] and passed back through the 5th parameter. -** To avoid memory leaks, the application should invoke [sqlite3_free()] -** on error message strings returned through the 5th parameter of -** of sqlite3_exec() after the error message string is no longer needed. -** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors -** occur, then sqlite3_exec() sets the pointer in its 5th parameter to -** NULL before returning. -** -** ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec() -** routine returns SQLITE_ABORT without invoking the callback again and -** without running any subsequent SQL statements. -** -** ^The 2nd argument to the sqlite3_exec() callback function is the -** number of columns in the result. ^The 3rd argument to the sqlite3_exec() -** callback is an array of pointers to strings obtained as if from -** [sqlite3_column_text()], one for each column. ^If an element of a -** result row is NULL then the corresponding string pointer for the -** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the -** sqlite3_exec() callback is an array of pointers to strings where each -** entry represents the name of corresponding result column as obtained -** from [sqlite3_column_name()]. -** -** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer -** to an empty string, or a pointer that contains only whitespace and/or -** SQL comments, then no SQL statements are evaluated and the database -** is not changed. -** -** Restrictions: -** -**
    -**
  • The application must insure that the 1st parameter to sqlite3_exec() -** is a valid and open [database connection]. -**
  • The application must not close [database connection] specified by -** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. -**
  • The application must not modify the SQL statement text passed into -** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. -**
-*/ -SQLITE_API int sqlite3_exec( - sqlite3*, /* An open database */ - const char *sql, /* SQL to be evaluated */ - int (*callback)(void*,int,char**,char**), /* Callback function */ - void *, /* 1st argument to callback */ - char **errmsg /* Error msg written here */ -); - -/* -** CAPI3REF: Result Codes -** KEYWORDS: SQLITE_OK {error code} {error codes} -** KEYWORDS: {result code} {result codes} -** -** Many SQLite functions return an integer result code from the set shown -** here in order to indicates success or failure. -** -** New error codes may be added in future versions of SQLite. -** -** See also: [SQLITE_IOERR_READ | extended result codes], -** [sqlite3_vtab_on_conflict()] [SQLITE_ROLLBACK | result codes]. -*/ -#define SQLITE_OK 0 /* Successful result */ -/* beginning-of-error-codes */ -#define SQLITE_ERROR 1 /* SQL error or missing database */ -#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */ -#define SQLITE_PERM 3 /* Access permission denied */ -#define SQLITE_ABORT 4 /* Callback routine requested an abort */ -#define SQLITE_BUSY 5 /* The database file is locked */ -#define SQLITE_LOCKED 6 /* A table in the database is locked */ -#define SQLITE_NOMEM 7 /* A malloc() failed */ -#define SQLITE_READONLY 8 /* Attempt to write a readonly database */ -#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/ -#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */ -#define SQLITE_CORRUPT 11 /* The database disk image is malformed */ -#define SQLITE_NOTFOUND 12 /* Unknown opcode in sqlite3_file_control() */ -#define SQLITE_FULL 13 /* Insertion failed because database is full */ -#define SQLITE_CANTOPEN 14 /* Unable to open the database file */ -#define SQLITE_PROTOCOL 15 /* Database lock protocol error */ -#define SQLITE_EMPTY 16 /* Database is empty */ -#define SQLITE_SCHEMA 17 /* The database schema changed */ -#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */ -#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */ -#define SQLITE_MISMATCH 20 /* Data type mismatch */ -#define SQLITE_MISUSE 21 /* Library used incorrectly */ -#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */ -#define SQLITE_AUTH 23 /* Authorization denied */ -#define SQLITE_FORMAT 24 /* Auxiliary database format error */ -#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ -#define SQLITE_NOTADB 26 /* File opened that is not a database file */ -#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */ -#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */ -/* end-of-error-codes */ - -/* -** CAPI3REF: Extended Result Codes -** KEYWORDS: {extended error code} {extended error codes} -** KEYWORDS: {extended result code} {extended result codes} -** -** In its default configuration, SQLite API routines return one of 26 integer -** [SQLITE_OK | result codes]. However, experience has shown that many of -** these result codes are too coarse-grained. They do not provide as -** much information about problems as programmers might like. In an effort to -** address this, newer versions of SQLite (version 3.3.8 and later) include -** support for additional result codes that provide more detailed information -** about errors. The extended result codes are enabled or disabled -** on a per database connection basis using the -** [sqlite3_extended_result_codes()] API. -** -** Some of the available extended result codes are listed here. -** One may expect the number of extended result codes will be expand -** over time. Software that uses extended result codes should expect -** to see new result codes in future releases of SQLite. -** -** The SQLITE_OK result code will never be extended. It will always -** be exactly zero. -*/ -#define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8)) -#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8)) -#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8)) -#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8)) -#define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8)) -#define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8)) -#define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8)) -#define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8)) -#define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8)) -#define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8)) -#define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8)) -#define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12<<8)) -#define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13<<8)) -#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8)) -#define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15<<8)) -#define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16<<8)) -#define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17<<8)) -#define SQLITE_IOERR_SHMOPEN (SQLITE_IOERR | (18<<8)) -#define SQLITE_IOERR_SHMSIZE (SQLITE_IOERR | (19<<8)) -#define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8)) -#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8)) -#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8)) -#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) -#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) -#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8)) -#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8)) -#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8)) -#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8)) - -/* -** CAPI3REF: Flags For File Open Operations -** -** These bit values are intended for use in the -** 3rd parameter to the [sqlite3_open_v2()] interface and -** in the 4th parameter to the [sqlite3_vfs.xOpen] method. -*/ -#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */ -#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */ -#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */ -#define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */ -#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */ -#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ -#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */ -#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */ -#define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */ -#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */ -#define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_WAL 0x00080000 /* VFS only */ - -/* Reserved: 0x00F00000 */ - -/* -** CAPI3REF: Device Characteristics -** -** The xDeviceCharacteristics method of the [sqlite3_io_methods] -** object returns an integer which is a vector of the these -** bit values expressing I/O characteristics of the mass storage -** device that holds the file that the [sqlite3_io_methods] -** refers to. -** -** The SQLITE_IOCAP_ATOMIC property means that all writes of -** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values -** mean that writes of blocks that are nnn bytes in size and -** are aligned to an address which is an integer multiple of -** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means -** that when data is appended to a file, the data is appended -** first then the size of the file is extended, never the other -** way around. The SQLITE_IOCAP_SEQUENTIAL property means that -** information is written to disk in the same order as calls -** to xWrite(). -*/ -#define SQLITE_IOCAP_ATOMIC 0x00000001 -#define SQLITE_IOCAP_ATOMIC512 0x00000002 -#define SQLITE_IOCAP_ATOMIC1K 0x00000004 -#define SQLITE_IOCAP_ATOMIC2K 0x00000008 -#define SQLITE_IOCAP_ATOMIC4K 0x00000010 -#define SQLITE_IOCAP_ATOMIC8K 0x00000020 -#define SQLITE_IOCAP_ATOMIC16K 0x00000040 -#define SQLITE_IOCAP_ATOMIC32K 0x00000080 -#define SQLITE_IOCAP_ATOMIC64K 0x00000100 -#define SQLITE_IOCAP_SAFE_APPEND 0x00000200 -#define SQLITE_IOCAP_SEQUENTIAL 0x00000400 -#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800 - -/* -** CAPI3REF: File Locking Levels -** -** SQLite uses one of these integer values as the second -** argument to calls it makes to the xLock() and xUnlock() methods -** of an [sqlite3_io_methods] object. -*/ -#define SQLITE_LOCK_NONE 0 -#define SQLITE_LOCK_SHARED 1 -#define SQLITE_LOCK_RESERVED 2 -#define SQLITE_LOCK_PENDING 3 -#define SQLITE_LOCK_EXCLUSIVE 4 - -/* -** CAPI3REF: Synchronization Type Flags -** -** When SQLite invokes the xSync() method of an -** [sqlite3_io_methods] object it uses a combination of -** these integer values as the second argument. -** -** When the SQLITE_SYNC_DATAONLY flag is used, it means that the -** sync operation only needs to flush data to mass storage. Inode -** information need not be flushed. If the lower four bits of the flag -** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics. -** If the lower four bits equal SQLITE_SYNC_FULL, that means -** to use Mac OS X style fullsync instead of fsync(). -** -** Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags -** with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL -** settings. The [synchronous pragma] determines when calls to the -** xSync VFS method occur and applies uniformly across all platforms. -** The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how -** energetic or rigorous or forceful the sync operations are and -** only make a difference on Mac OSX for the default SQLite code. -** (Third-party VFS implementations might also make the distinction -** between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the -** operating systems natively supported by SQLite, only Mac OSX -** cares about the difference.) -*/ -#define SQLITE_SYNC_NORMAL 0x00002 -#define SQLITE_SYNC_FULL 0x00003 -#define SQLITE_SYNC_DATAONLY 0x00010 - -/* -** CAPI3REF: OS Interface Open File Handle -** -** An [sqlite3_file] object represents an open file in the -** [sqlite3_vfs | OS interface layer]. Individual OS interface -** implementations will -** want to subclass this object by appending additional fields -** for their own use. The pMethods entry is a pointer to an -** [sqlite3_io_methods] object that defines methods for performing -** I/O operations on the open file. -*/ -typedef struct sqlite3_file sqlite3_file; -struct sqlite3_file { - const struct sqlite3_io_methods *pMethods; /* Methods for an open file */ -}; - -/* -** CAPI3REF: OS Interface File Virtual Methods Object -** -** Every file opened by the [sqlite3_vfs.xOpen] method populates an -** [sqlite3_file] object (or, more commonly, a subclass of the -** [sqlite3_file] object) with a pointer to an instance of this object. -** This object defines the methods used to perform various operations -** against the open file represented by the [sqlite3_file] object. -** -** If the [sqlite3_vfs.xOpen] method sets the sqlite3_file.pMethods element -** to a non-NULL pointer, then the sqlite3_io_methods.xClose method -** may be invoked even if the [sqlite3_vfs.xOpen] reported that it failed. The -** only way to prevent a call to xClose following a failed [sqlite3_vfs.xOpen] -** is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element -** to NULL. -** -** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or -** [SQLITE_SYNC_FULL]. The first choice is the normal fsync(). -** The second choice is a Mac OS X style fullsync. The [SQLITE_SYNC_DATAONLY] -** flag may be ORed in to indicate that only the data of the file -** and not its inode needs to be synced. -** -** The integer values to xLock() and xUnlock() are one of -**
    -**
  • [SQLITE_LOCK_NONE], -**
  • [SQLITE_LOCK_SHARED], -**
  • [SQLITE_LOCK_RESERVED], -**
  • [SQLITE_LOCK_PENDING], or -**
  • [SQLITE_LOCK_EXCLUSIVE]. -**
-** xLock() increases the lock. xUnlock() decreases the lock. -** The xCheckReservedLock() method checks whether any database connection, -** either in this process or in some other process, is holding a RESERVED, -** PENDING, or EXCLUSIVE lock on the file. It returns true -** if such a lock exists and false otherwise. -** -** The xFileControl() method is a generic interface that allows custom -** VFS implementations to directly control an open file using the -** [sqlite3_file_control()] interface. The second "op" argument is an -** integer opcode. The third argument is a generic pointer intended to -** point to a structure that may contain arguments or space in which to -** write return values. Potential uses for xFileControl() might be -** functions to enable blocking locks with timeouts, to change the -** locking strategy (for example to use dot-file locks), to inquire -** about the status of a lock, or to break stale locks. The SQLite -** core reserves all opcodes less than 100 for its own use. -** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available. -** Applications that define a custom xFileControl method should use opcodes -** greater than 100 to avoid conflicts. VFS implementations should -** return [SQLITE_NOTFOUND] for file control opcodes that they do not -** recognize. -** -** The xSectorSize() method returns the sector size of the -** device that underlies the file. The sector size is the -** minimum write that can be performed without disturbing -** other bytes in the file. The xDeviceCharacteristics() -** method returns a bit vector describing behaviors of the -** underlying device: -** -**
    -**
  • [SQLITE_IOCAP_ATOMIC] -**
  • [SQLITE_IOCAP_ATOMIC512] -**
  • [SQLITE_IOCAP_ATOMIC1K] -**
  • [SQLITE_IOCAP_ATOMIC2K] -**
  • [SQLITE_IOCAP_ATOMIC4K] -**
  • [SQLITE_IOCAP_ATOMIC8K] -**
  • [SQLITE_IOCAP_ATOMIC16K] -**
  • [SQLITE_IOCAP_ATOMIC32K] -**
  • [SQLITE_IOCAP_ATOMIC64K] -**
  • [SQLITE_IOCAP_SAFE_APPEND] -**
  • [SQLITE_IOCAP_SEQUENTIAL] -**
-** -** The SQLITE_IOCAP_ATOMIC property means that all writes of -** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values -** mean that writes of blocks that are nnn bytes in size and -** are aligned to an address which is an integer multiple of -** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means -** that when data is appended to a file, the data is appended -** first then the size of the file is extended, never the other -** way around. The SQLITE_IOCAP_SEQUENTIAL property means that -** information is written to disk in the same order as calls -** to xWrite(). -** -** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill -** in the unread portions of the buffer with zeros. A VFS that -** fails to zero-fill short reads might seem to work. However, -** failure to zero-fill short reads will eventually lead to -** database corruption. -*/ -typedef struct sqlite3_io_methods sqlite3_io_methods; -struct sqlite3_io_methods { - int iVersion; - int (*xClose)(sqlite3_file*); - int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); - int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); - int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); - int (*xSync)(sqlite3_file*, int flags); - int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); - int (*xLock)(sqlite3_file*, int); - int (*xUnlock)(sqlite3_file*, int); - int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); - int (*xFileControl)(sqlite3_file*, int op, void *pArg); - int (*xSectorSize)(sqlite3_file*); - int (*xDeviceCharacteristics)(sqlite3_file*); - /* Methods above are valid for version 1 */ - int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); - int (*xShmLock)(sqlite3_file*, int offset, int n, int flags); - void (*xShmBarrier)(sqlite3_file*); - int (*xShmUnmap)(sqlite3_file*, int deleteFlag); - /* Methods above are valid for version 2 */ - /* Additional methods may be added in future releases */ -}; - -/* -** CAPI3REF: Standard File Control Opcodes -** -** These integer constants are opcodes for the xFileControl method -** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()] -** interface. -** -** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This -** opcode causes the xFileControl method to write the current state of -** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED], -** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE]) -** into an integer that the pArg argument points to. This capability -** is used during testing and only needs to be supported when SQLITE_TEST -** is defined. -** -** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS -** layer a hint of how large the database file will grow to be during the -** current transaction. This hint is not guaranteed to be accurate but it -** is often close. The underlying VFS might choose to preallocate database -** file space based on this hint in order to help writes to the database -** file run faster. -** -** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS -** extends and truncates the database file in chunks of a size specified -** by the user. The fourth argument to [sqlite3_file_control()] should -** point to an integer (type int) containing the new chunk-size to use -** for the nominated database. Allocating database file space in large -** chunks (say 1MB at a time), may reduce file-system fragmentation and -** improve performance on some systems. -** -** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer -** to the [sqlite3_file] object associated with a particular database -** connection. See the [sqlite3_file_control()] documentation for -** additional information. -** -** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by -** SQLite and sent to all VFSes in place of a call to the xSync method -** when the database connection has [PRAGMA synchronous] set to OFF.)^ -** Some specialized VFSes need this signal in order to operate correctly -** when [PRAGMA synchronous | PRAGMA synchronous=OFF] is set, but most -** VFSes do not need this signal and should silently ignore this opcode. -** Applications should not call [sqlite3_file_control()] with this -** opcode as doing so may disrupt the operation of the specialized VFSes -** that do require it. -** -** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic -** retry counts and intervals for certain disk I/O operations for the -** windows [VFS] in order to work to provide robustness against -** anti-virus programs. By default, the windows VFS will retry file read, -** file write, and file delete opertions up to 10 times, with a delay -** of 25 milliseconds before the first retry and with the delay increasing -** by an additional 25 milliseconds with each subsequent retry. This -** opcode allows those to values (10 retries and 25 milliseconds of delay) -** to be adjusted. The values are changed for all database connections -** within the same process. The argument is a pointer to an array of two -** integers where the first integer i the new retry count and the second -** integer is the delay. If either integer is negative, then the setting -** is not changed but instead the prior value of that setting is written -** into the array entry, allowing the current retry settings to be -** interrogated. The zDbName parameter is ignored. -** -** ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the -** persistent [WAL | Write AHead Log] setting. By default, the auxiliary -** write ahead log and shared memory files used for transaction control -** are automatically deleted when the latest connection to the database -** closes. Setting persistent WAL mode causes those files to persist after -** close. Persisting the files is useful when other processes that do not -** have write permission on the directory containing the database file want -** to read the database file, as the WAL and shared memory files must exist -** in order for the database to be readable. The fourth parameter to -** [sqlite3_file_control()] for this opcode should be a pointer to an integer. -** That integer is 0 to disable persistent WAL mode or 1 to enable persistent -** WAL mode. If the integer is -1, then it is overwritten with the current -** WAL persistence setting. -** -*/ -#define SQLITE_FCNTL_LOCKSTATE 1 -#define SQLITE_GET_LOCKPROXYFILE 2 -#define SQLITE_SET_LOCKPROXYFILE 3 -#define SQLITE_LAST_ERRNO 4 -#define SQLITE_FCNTL_SIZE_HINT 5 -#define SQLITE_FCNTL_CHUNK_SIZE 6 -#define SQLITE_FCNTL_FILE_POINTER 7 -#define SQLITE_FCNTL_SYNC_OMITTED 8 -#define SQLITE_FCNTL_WIN32_AV_RETRY 9 -#define SQLITE_FCNTL_PERSIST_WAL 10 - -/* -** CAPI3REF: Mutex Handle -** -** The mutex module within SQLite defines [sqlite3_mutex] to be an -** abstract type for a mutex object. The SQLite core never looks -** at the internal representation of an [sqlite3_mutex]. It only -** deals with pointers to the [sqlite3_mutex] object. -** -** Mutexes are created using [sqlite3_mutex_alloc()]. -*/ -typedef struct sqlite3_mutex sqlite3_mutex; - -/* -** CAPI3REF: OS Interface Object -** -** An instance of the sqlite3_vfs object defines the interface between -** the SQLite core and the underlying operating system. The "vfs" -** in the name of the object stands for "virtual file system". See -** the [VFS | VFS documentation] for further information. -** -** The value of the iVersion field is initially 1 but may be larger in -** future versions of SQLite. Additional fields may be appended to this -** object when the iVersion value is increased. Note that the structure -** of the sqlite3_vfs object changes in the transaction between -** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not -** modified. -** -** The szOsFile field is the size of the subclassed [sqlite3_file] -** structure used by this VFS. mxPathname is the maximum length of -** a pathname in this VFS. -** -** Registered sqlite3_vfs objects are kept on a linked list formed by -** the pNext pointer. The [sqlite3_vfs_register()] -** and [sqlite3_vfs_unregister()] interfaces manage this list -** in a thread-safe way. The [sqlite3_vfs_find()] interface -** searches the list. Neither the application code nor the VFS -** implementation should use the pNext pointer. -** -** The pNext field is the only field in the sqlite3_vfs -** structure that SQLite will ever modify. SQLite will only access -** or modify this field while holding a particular static mutex. -** The application should never modify anything within the sqlite3_vfs -** object once the object has been registered. -** -** The zName field holds the name of the VFS module. The name must -** be unique across all VFS modules. -** -** [[sqlite3_vfs.xOpen]] -** ^SQLite guarantees that the zFilename parameter to xOpen -** is either a NULL pointer or string obtained -** from xFullPathname() with an optional suffix added. -** ^If a suffix is added to the zFilename parameter, it will -** consist of a single "-" character followed by no more than -** 10 alphanumeric and/or "-" characters. -** ^SQLite further guarantees that -** the string will be valid and unchanged until xClose() is -** called. Because of the previous sentence, -** the [sqlite3_file] can safely store a pointer to the -** filename if it needs to remember the filename for some reason. -** If the zFilename parameter to xOpen is a NULL pointer then xOpen -** must invent its own temporary name for the file. ^Whenever the -** xFilename parameter is NULL it will also be the case that the -** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE]. -** -** The flags argument to xOpen() includes all bits set in -** the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()] -** or [sqlite3_open16()] is used, then flags includes at least -** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. -** If xOpen() opens a file read-only then it sets *pOutFlags to -** include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set. -** -** ^(SQLite will also add one of the following flags to the xOpen() -** call, depending on the object being opened: -** -**
    -**
  • [SQLITE_OPEN_MAIN_DB] -**
  • [SQLITE_OPEN_MAIN_JOURNAL] -**
  • [SQLITE_OPEN_TEMP_DB] -**
  • [SQLITE_OPEN_TEMP_JOURNAL] -**
  • [SQLITE_OPEN_TRANSIENT_DB] -**
  • [SQLITE_OPEN_SUBJOURNAL] -**
  • [SQLITE_OPEN_MASTER_JOURNAL] -**
  • [SQLITE_OPEN_WAL] -**
)^ -** -** The file I/O implementation can use the object type flags to -** change the way it deals with files. For example, an application -** that does not care about crash recovery or rollback might make -** the open of a journal file a no-op. Writes to this journal would -** also be no-ops, and any attempt to read the journal would return -** SQLITE_IOERR. Or the implementation might recognize that a database -** file will be doing page-aligned sector reads and writes in a random -** order and set up its I/O subsystem accordingly. -** -** SQLite might also add one of the following flags to the xOpen method: -** -**
    -**
  • [SQLITE_OPEN_DELETEONCLOSE] -**
  • [SQLITE_OPEN_EXCLUSIVE] -**
-** -** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be -** deleted when it is closed. ^The [SQLITE_OPEN_DELETEONCLOSE] -** will be set for TEMP databases and their journals, transient -** databases, and subjournals. -** -** ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction -** with the [SQLITE_OPEN_CREATE] flag, which are both directly -** analogous to the O_EXCL and O_CREAT flags of the POSIX open() -** API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the -** SQLITE_OPEN_CREATE, is used to indicate that file should always -** be created, and that it is an error if it already exists. -** It is not used to indicate the file should be opened -** for exclusive access. -** -** ^At least szOsFile bytes of memory are allocated by SQLite -** to hold the [sqlite3_file] structure passed as the third -** argument to xOpen. The xOpen method does not have to -** allocate the structure; it should just fill it in. Note that -** the xOpen method must set the sqlite3_file.pMethods to either -** a valid [sqlite3_io_methods] object or to NULL. xOpen must do -** this even if the open fails. SQLite expects that the sqlite3_file.pMethods -** element will be valid after xOpen returns regardless of the success -** or failure of the xOpen call. -** -** [[sqlite3_vfs.xAccess]] -** ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] -** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to -** test whether a file is readable and writable, or [SQLITE_ACCESS_READ] -** to test whether a file is at least readable. The file can be a -** directory. -** -** ^SQLite will always allocate at least mxPathname+1 bytes for the -** output buffer xFullPathname. The exact size of the output buffer -** is also passed as a parameter to both methods. If the output buffer -** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is -** handled as a fatal error by SQLite, vfs implementations should endeavor -** to prevent this by setting mxPathname to a sufficiently large value. -** -** The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64() -** interfaces are not strictly a part of the filesystem, but they are -** included in the VFS structure for completeness. -** The xRandomness() function attempts to return nBytes bytes -** of good-quality randomness into zOut. The return value is -** the actual number of bytes of randomness obtained. -** The xSleep() method causes the calling thread to sleep for at -** least the number of microseconds given. ^The xCurrentTime() -** method returns a Julian Day Number for the current date and time as -** a floating point value. -** ^The xCurrentTimeInt64() method returns, as an integer, the Julian -** Day Number multiplied by 86400000 (the number of milliseconds in -** a 24-hour day). -** ^SQLite will use the xCurrentTimeInt64() method to get the current -** date and time if that method is available (if iVersion is 2 or -** greater and the function pointer is not NULL) and will fall back -** to xCurrentTime() if xCurrentTimeInt64() is unavailable. -** -** ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces -** are not used by the SQLite core. These optional interfaces are provided -** by some VFSes to facilitate testing of the VFS code. By overriding -** system calls with functions under its control, a test program can -** simulate faults and error conditions that would otherwise be difficult -** or impossible to induce. The set of system calls that can be overridden -** varies from one VFS to another, and from one version of the same VFS to the -** next. Applications that use these interfaces must be prepared for any -** or all of these interfaces to be NULL or for their behavior to change -** from one release to the next. Applications must not attempt to access -** any of these methods if the iVersion of the VFS is less than 3. -*/ -typedef struct sqlite3_vfs sqlite3_vfs; -typedef void (*sqlite3_syscall_ptr)(void); -struct sqlite3_vfs { - int iVersion; /* Structure version number (currently 3) */ - int szOsFile; /* Size of subclassed sqlite3_file */ - int mxPathname; /* Maximum file pathname length */ - sqlite3_vfs *pNext; /* Next registered VFS */ - const char *zName; /* Name of this virtual file system */ - void *pAppData; /* Pointer to application-specific data */ - int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, - int flags, int *pOutFlags); - int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); - int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); - int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); - void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); - void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); - void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); - void (*xDlClose)(sqlite3_vfs*, void*); - int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); - int (*xSleep)(sqlite3_vfs*, int microseconds); - int (*xCurrentTime)(sqlite3_vfs*, double*); - int (*xGetLastError)(sqlite3_vfs*, int, char *); - /* - ** The methods above are in version 1 of the sqlite_vfs object - ** definition. Those that follow are added in version 2 or later - */ - int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); - /* - ** The methods above are in versions 1 and 2 of the sqlite_vfs object. - ** Those below are for version 3 and greater. - */ - int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); - sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName); - const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName); - /* - ** The methods above are in versions 1 through 3 of the sqlite_vfs object. - ** New fields may be appended in figure versions. The iVersion - ** value will increment whenever this happens. - */ -}; - -/* -** CAPI3REF: Flags for the xAccess VFS method -** -** These integer constants can be used as the third parameter to -** the xAccess method of an [sqlite3_vfs] object. They determine -** what kind of permissions the xAccess method is looking for. -** With SQLITE_ACCESS_EXISTS, the xAccess method -** simply checks whether the file exists. -** With SQLITE_ACCESS_READWRITE, the xAccess method -** checks whether the named directory is both readable and writable -** (in other words, if files can be added, removed, and renamed within -** the directory). -** The SQLITE_ACCESS_READWRITE constant is currently used only by the -** [temp_store_directory pragma], though this could change in a future -** release of SQLite. -** With SQLITE_ACCESS_READ, the xAccess method -** checks whether the file is readable. The SQLITE_ACCESS_READ constant is -** currently unused, though it might be used in a future release of -** SQLite. -*/ -#define SQLITE_ACCESS_EXISTS 0 -#define SQLITE_ACCESS_READWRITE 1 /* Used by PRAGMA temp_store_directory */ -#define SQLITE_ACCESS_READ 2 /* Unused */ - -/* -** CAPI3REF: Flags for the xShmLock VFS method -** -** These integer constants define the various locking operations -** allowed by the xShmLock method of [sqlite3_io_methods]. The -** following are the only legal combinations of flags to the -** xShmLock method: -** -**
    -**
  • SQLITE_SHM_LOCK | SQLITE_SHM_SHARED -**
  • SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE -**
  • SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED -**
  • SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE -**
-** -** When unlocking, the same SHARED or EXCLUSIVE flag must be supplied as -** was given no the corresponding lock. -** -** The xShmLock method can transition between unlocked and SHARED or -** between unlocked and EXCLUSIVE. It cannot transition between SHARED -** and EXCLUSIVE. -*/ -#define SQLITE_SHM_UNLOCK 1 -#define SQLITE_SHM_LOCK 2 -#define SQLITE_SHM_SHARED 4 -#define SQLITE_SHM_EXCLUSIVE 8 - -/* -** CAPI3REF: Maximum xShmLock index -** -** The xShmLock method on [sqlite3_io_methods] may use values -** between 0 and this upper bound as its "offset" argument. -** The SQLite core will never attempt to acquire or release a -** lock outside of this range -*/ -#define SQLITE_SHM_NLOCK 8 - - -/* -** CAPI3REF: Initialize The SQLite Library -** -** ^The sqlite3_initialize() routine initializes the -** SQLite library. ^The sqlite3_shutdown() routine -** deallocates any resources that were allocated by sqlite3_initialize(). -** These routines are designed to aid in process initialization and -** shutdown on embedded systems. Workstation applications using -** SQLite normally do not need to invoke either of these routines. -** -** A call to sqlite3_initialize() is an "effective" call if it is -** the first time sqlite3_initialize() is invoked during the lifetime of -** the process, or if it is the first time sqlite3_initialize() is invoked -** following a call to sqlite3_shutdown(). ^(Only an effective call -** of sqlite3_initialize() does any initialization. All other calls -** are harmless no-ops.)^ -** -** A call to sqlite3_shutdown() is an "effective" call if it is the first -** call to sqlite3_shutdown() since the last sqlite3_initialize(). ^(Only -** an effective call to sqlite3_shutdown() does any deinitialization. -** All other valid calls to sqlite3_shutdown() are harmless no-ops.)^ -** -** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown() -** is not. The sqlite3_shutdown() interface must only be called from a -** single thread. All open [database connections] must be closed and all -** other SQLite resources must be deallocated prior to invoking -** sqlite3_shutdown(). -** -** Among other things, ^sqlite3_initialize() will invoke -** sqlite3_os_init(). Similarly, ^sqlite3_shutdown() -** will invoke sqlite3_os_end(). -** -** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success. -** ^If for some reason, sqlite3_initialize() is unable to initialize -** the library (perhaps it is unable to allocate a needed resource such -** as a mutex) it returns an [error code] other than [SQLITE_OK]. -** -** ^The sqlite3_initialize() routine is called internally by many other -** SQLite interfaces so that an application usually does not need to -** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] -** calls sqlite3_initialize() so the SQLite library will be automatically -** initialized when [sqlite3_open()] is called if it has not be initialized -** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] -** compile-time option, then the automatic calls to sqlite3_initialize() -** are omitted and the application must call sqlite3_initialize() directly -** prior to using any other SQLite interface. For maximum portability, -** it is recommended that applications always invoke sqlite3_initialize() -** directly prior to using any other SQLite interface. Future releases -** of SQLite may require this. In other words, the behavior exhibited -** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the -** default behavior in some future release of SQLite. -** -** The sqlite3_os_init() routine does operating-system specific -** initialization of the SQLite library. The sqlite3_os_end() -** routine undoes the effect of sqlite3_os_init(). Typical tasks -** performed by these routines include allocation or deallocation -** of static resources, initialization of global variables, -** setting up a default [sqlite3_vfs] module, or setting up -** a default configuration using [sqlite3_config()]. -** -** The application should never invoke either sqlite3_os_init() -** or sqlite3_os_end() directly. The application should only invoke -** sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init() -** interface is called automatically by sqlite3_initialize() and -** sqlite3_os_end() is called by sqlite3_shutdown(). Appropriate -** implementations for sqlite3_os_init() and sqlite3_os_end() -** are built into SQLite when it is compiled for Unix, Windows, or OS/2. -** When [custom builds | built for other platforms] -** (using the [SQLITE_OS_OTHER=1] compile-time -** option) the application must supply a suitable implementation for -** sqlite3_os_init() and sqlite3_os_end(). An application-supplied -** implementation of sqlite3_os_init() or sqlite3_os_end() -** must return [SQLITE_OK] on success and some other [error code] upon -** failure. -*/ -SQLITE_API int sqlite3_initialize(void); -SQLITE_API int sqlite3_shutdown(void); -SQLITE_API int sqlite3_os_init(void); -SQLITE_API int sqlite3_os_end(void); - -/* -** CAPI3REF: Configuring The SQLite Library -** -** The sqlite3_config() interface is used to make global configuration -** changes to SQLite in order to tune SQLite to the specific needs of -** the application. The default configuration is recommended for most -** applications and so this routine is usually not necessary. It is -** provided to support rare applications with unusual needs. -** -** The sqlite3_config() interface is not threadsafe. The application -** must insure that no other SQLite interfaces are invoked by other -** threads while sqlite3_config() is running. Furthermore, sqlite3_config() -** may only be invoked prior to library initialization using -** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. -** ^If sqlite3_config() is called after [sqlite3_initialize()] and before -** [sqlite3_shutdown()] then it will return SQLITE_MISUSE. -** Note, however, that ^sqlite3_config() can be called as part of the -** implementation of an application-defined [sqlite3_os_init()]. -** -** The first argument to sqlite3_config() is an integer -** [configuration option] that determines -** what property of SQLite is to be configured. Subsequent arguments -** vary depending on the [configuration option] -** in the first argument. -** -** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. -** ^If the option is unknown or SQLite is unable to set the option -** then this routine returns a non-zero [error code]. -*/ -SQLITE_API int sqlite3_config(int, ...); - -/* -** CAPI3REF: Configure database connections -** -** The sqlite3_db_config() interface is used to make configuration -** changes to a [database connection]. The interface is similar to -** [sqlite3_config()] except that the changes apply to a single -** [database connection] (specified in the first argument). -** -** The second argument to sqlite3_db_config(D,V,...) is the -** [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code -** that indicates what aspect of the [database connection] is being configured. -** Subsequent arguments vary depending on the configuration verb. -** -** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if -** the call is considered successful. -*/ -SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...); - -/* -** CAPI3REF: Memory Allocation Routines -** -** An instance of this object defines the interface between SQLite -** and low-level memory allocation routines. -** -** This object is used in only one place in the SQLite interface. -** A pointer to an instance of this object is the argument to -** [sqlite3_config()] when the configuration option is -** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC]. -** By creating an instance of this object -** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC]) -** during configuration, an application can specify an alternative -** memory allocation subsystem for SQLite to use for all of its -** dynamic memory needs. -** -** Note that SQLite comes with several [built-in memory allocators] -** that are perfectly adequate for the overwhelming majority of applications -** and that this object is only useful to a tiny minority of applications -** with specialized memory allocation requirements. This object is -** also used during testing of SQLite in order to specify an alternative -** memory allocator that simulates memory out-of-memory conditions in -** order to verify that SQLite recovers gracefully from such -** conditions. -** -** The xMalloc, xRealloc, and xFree methods must work like the -** malloc(), realloc() and free() functions from the standard C library. -** ^SQLite guarantees that the second argument to -** xRealloc is always a value returned by a prior call to xRoundup. -** -** xSize should return the allocated size of a memory allocation -** previously obtained from xMalloc or xRealloc. The allocated size -** is always at least as big as the requested size but may be larger. -** -** The xRoundup method returns what would be the allocated size of -** a memory allocation given a particular requested size. Most memory -** allocators round up memory allocations at least to the next multiple -** of 8. Some allocators round up to a larger multiple or to a power of 2. -** Every memory allocation request coming in through [sqlite3_malloc()] -** or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0, -** that causes the corresponding memory allocation to fail. -** -** The xInit method initializes the memory allocator. (For example, -** it might allocate any require mutexes or initialize internal data -** structures. The xShutdown method is invoked (indirectly) by -** [sqlite3_shutdown()] and should deallocate any resources acquired -** by xInit. The pAppData pointer is used as the only parameter to -** xInit and xShutdown. -** -** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes -** the xInit method, so the xInit method need not be threadsafe. The -** xShutdown method is only called from [sqlite3_shutdown()] so it does -** not need to be threadsafe either. For all other methods, SQLite -** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the -** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which -** it is by default) and so the methods are automatically serialized. -** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other -** methods must be threadsafe or else make their own arrangements for -** serialization. -** -** SQLite will never invoke xInit() more than once without an intervening -** call to xShutdown(). -*/ -typedef struct sqlite3_mem_methods sqlite3_mem_methods; -struct sqlite3_mem_methods { - void *(*xMalloc)(int); /* Memory allocation function */ - void (*xFree)(void*); /* Free a prior allocation */ - void *(*xRealloc)(void*,int); /* Resize an allocation */ - int (*xSize)(void*); /* Return the size of an allocation */ - int (*xRoundup)(int); /* Round up request size to allocation size */ - int (*xInit)(void*); /* Initialize the memory allocator */ - void (*xShutdown)(void*); /* Deinitialize the memory allocator */ - void *pAppData; /* Argument to xInit() and xShutdown() */ -}; - -/* -** CAPI3REF: Configuration Options -** KEYWORDS: {configuration option} -** -** These constants are the available integer configuration options that -** can be passed as the first argument to the [sqlite3_config()] interface. -** -** New configuration options may be added in future releases of SQLite. -** Existing configuration options might be discontinued. Applications -** should check the return code from [sqlite3_config()] to make sure that -** the call worked. The [sqlite3_config()] interface will return a -** non-zero [error code] if a discontinued or unsupported configuration option -** is invoked. -** -**
-** [[SQLITE_CONFIG_SINGLETHREAD]]
SQLITE_CONFIG_SINGLETHREAD
-**
There are no arguments to this option. ^This option sets the -** [threading mode] to Single-thread. In other words, it disables -** all mutexing and puts SQLite into a mode where it can only be used -** by a single thread. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** it is not possible to change the [threading mode] from its default -** value of Single-thread and so [sqlite3_config()] will return -** [SQLITE_ERROR] if called with the SQLITE_CONFIG_SINGLETHREAD -** configuration option.
-** -** [[SQLITE_CONFIG_MULTITHREAD]]
SQLITE_CONFIG_MULTITHREAD
-**
There are no arguments to this option. ^This option sets the -** [threading mode] to Multi-thread. In other words, it disables -** mutexing on [database connection] and [prepared statement] objects. -** The application is responsible for serializing access to -** [database connections] and [prepared statements]. But other mutexes -** are enabled so that SQLite will be safe to use in a multi-threaded -** environment as long as no two threads attempt to use the same -** [database connection] at the same time. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** it is not possible to set the Multi-thread [threading mode] and -** [sqlite3_config()] will return [SQLITE_ERROR] if called with the -** SQLITE_CONFIG_MULTITHREAD configuration option.
-** -** [[SQLITE_CONFIG_SERIALIZED]]
SQLITE_CONFIG_SERIALIZED
-**
There are no arguments to this option. ^This option sets the -** [threading mode] to Serialized. In other words, this option enables -** all mutexes including the recursive -** mutexes on [database connection] and [prepared statement] objects. -** In this mode (which is the default when SQLite is compiled with -** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access -** to [database connections] and [prepared statements] so that the -** application is free to use the same [database connection] or the -** same [prepared statement] in different threads at the same time. -** ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** it is not possible to set the Serialized [threading mode] and -** [sqlite3_config()] will return [SQLITE_ERROR] if called with the -** SQLITE_CONFIG_SERIALIZED configuration option.
-** -** [[SQLITE_CONFIG_MALLOC]]
SQLITE_CONFIG_MALLOC
-**
^(This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mem_methods] structure. The argument specifies -** alternative low-level memory allocation routines to be used in place of -** the memory allocation routines built into SQLite.)^ ^SQLite makes -** its own private copy of the content of the [sqlite3_mem_methods] structure -** before the [sqlite3_config()] call returns.
-** -** [[SQLITE_CONFIG_GETMALLOC]]
SQLITE_CONFIG_GETMALLOC
-**
^(This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mem_methods] structure. The [sqlite3_mem_methods] -** structure is filled with the currently defined memory allocation routines.)^ -** This option can be used to overload the default memory allocation -** routines with a wrapper that simulations memory allocation failure or -** tracks memory usage, for example.
-** -** [[SQLITE_CONFIG_MEMSTATUS]]
SQLITE_CONFIG_MEMSTATUS
-**
^This option takes single argument of type int, interpreted as a -** boolean, which enables or disables the collection of memory allocation -** statistics. ^(When memory allocation statistics are disabled, the -** following SQLite interfaces become non-operational: -**
    -**
  • [sqlite3_memory_used()] -**
  • [sqlite3_memory_highwater()] -**
  • [sqlite3_soft_heap_limit64()] -**
  • [sqlite3_status()] -**
)^ -** ^Memory allocation statistics are enabled by default unless SQLite is -** compiled with [SQLITE_DEFAULT_MEMSTATUS]=0 in which case memory -** allocation statistics are disabled by default. -**
-** -** [[SQLITE_CONFIG_SCRATCH]]
SQLITE_CONFIG_SCRATCH
-**
^This option specifies a static memory buffer that SQLite can use for -** scratch memory. There are three arguments: A pointer an 8-byte -** aligned memory buffer from which the scratch allocations will be -** drawn, the size of each scratch allocation (sz), -** and the maximum number of scratch allocations (N). The sz -** argument must be a multiple of 16. -** The first argument must be a pointer to an 8-byte aligned buffer -** of at least sz*N bytes of memory. -** ^SQLite will use no more than two scratch buffers per thread. So -** N should be set to twice the expected maximum number of threads. -** ^SQLite will never require a scratch buffer that is more than 6 -** times the database page size. ^If SQLite needs needs additional -** scratch memory beyond what is provided by this configuration option, then -** [sqlite3_malloc()] will be used to obtain the memory needed.
-** -** [[SQLITE_CONFIG_PAGECACHE]]
SQLITE_CONFIG_PAGECACHE
-**
^This option specifies a static memory buffer that SQLite can use for -** the database page cache with the default page cache implementation. -** This configuration should not be used if an application-define page -** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option. -** There are three arguments to this option: A pointer to 8-byte aligned -** memory, the size of each page buffer (sz), and the number of pages (N). -** The sz argument should be the size of the largest database page -** (a power of two between 512 and 32768) plus a little extra for each -** page header. ^The page header size is 20 to 40 bytes depending on -** the host architecture. ^It is harmless, apart from the wasted memory, -** to make sz a little too large. The first -** argument should point to an allocation of at least sz*N bytes of memory. -** ^SQLite will use the memory provided by the first argument to satisfy its -** memory needs for the first N pages that it adds to cache. ^If additional -** page cache memory is needed beyond what is provided by this option, then -** SQLite goes to [sqlite3_malloc()] for the additional storage space. -** The pointer in the first argument must -** be aligned to an 8-byte boundary or subsequent behavior of SQLite -** will be undefined.
-** -** [[SQLITE_CONFIG_HEAP]]
SQLITE_CONFIG_HEAP
-**
^This option specifies a static memory buffer that SQLite will use -** for all of its dynamic memory allocation needs beyond those provided -** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE]. -** There are three arguments: An 8-byte aligned pointer to the memory, -** the number of bytes in the memory buffer, and the minimum allocation size. -** ^If the first pointer (the memory pointer) is NULL, then SQLite reverts -** to using its default memory allocator (the system malloc() implementation), -** undoing any prior invocation of [SQLITE_CONFIG_MALLOC]. ^If the -** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or -** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory -** allocator is engaged to handle all of SQLites memory allocation needs. -** The first pointer (the memory pointer) must be aligned to an 8-byte -** boundary or subsequent behavior of SQLite will be undefined. -** The minimum allocation size is capped at 2^12. Reasonable values -** for the minimum allocation size are 2^5 through 2^8.
-** -** [[SQLITE_CONFIG_MUTEX]]
SQLITE_CONFIG_MUTEX
-**
^(This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mutex_methods] structure. The argument specifies -** alternative low-level mutex routines to be used in place -** the mutex routines built into SQLite.)^ ^SQLite makes a copy of the -** content of the [sqlite3_mutex_methods] structure before the call to -** [sqlite3_config()] returns. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** the entire mutexing subsystem is omitted from the build and hence calls to -** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will -** return [SQLITE_ERROR].
-** -** [[SQLITE_CONFIG_GETMUTEX]]
SQLITE_CONFIG_GETMUTEX
-**
^(This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mutex_methods] structure. The -** [sqlite3_mutex_methods] -** structure is filled with the currently defined mutex routines.)^ -** This option can be used to overload the default mutex allocation -** routines with a wrapper used to track mutex usage for performance -** profiling or testing, for example. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** the entire mutexing subsystem is omitted from the build and hence calls to -** [sqlite3_config()] with the SQLITE_CONFIG_GETMUTEX configuration option will -** return [SQLITE_ERROR].
-** -** [[SQLITE_CONFIG_LOOKASIDE]]
SQLITE_CONFIG_LOOKASIDE
-**
^(This option takes two arguments that determine the default -** memory allocation for the lookaside memory allocator on each -** [database connection]. The first argument is the -** size of each lookaside buffer slot and the second is the number of -** slots allocated to each database connection.)^ ^(This option sets the -** default lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE] -** verb to [sqlite3_db_config()] can be used to change the lookaside -** configuration on individual connections.)^
-** -** [[SQLITE_CONFIG_PCACHE]]
SQLITE_CONFIG_PCACHE
-**
^(This option takes a single argument which is a pointer to -** an [sqlite3_pcache_methods] object. This object specifies the interface -** to a custom page cache implementation.)^ ^SQLite makes a copy of the -** object and uses it for page cache memory allocations.
-** -** [[SQLITE_CONFIG_GETPCACHE]]
SQLITE_CONFIG_GETPCACHE
-**
^(This option takes a single argument which is a pointer to an -** [sqlite3_pcache_methods] object. SQLite copies of the current -** page cache implementation into that object.)^
-** -** [[SQLITE_CONFIG_LOG]]
SQLITE_CONFIG_LOG
-**
^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a -** function with a call signature of void(*)(void*,int,const char*), -** and a pointer to void. ^If the function pointer is not NULL, it is -** invoked by [sqlite3_log()] to process each logging event. ^If the -** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op. -** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is -** passed through as the first parameter to the application-defined logger -** function whenever that function is invoked. ^The second parameter to -** the logger function is a copy of the first parameter to the corresponding -** [sqlite3_log()] call and is intended to be a [result code] or an -** [extended result code]. ^The third parameter passed to the logger is -** log message after formatting via [sqlite3_snprintf()]. -** The SQLite logging interface is not reentrant; the logger function -** supplied by the application must not invoke any SQLite interface. -** In a multi-threaded application, the application-defined logger -** function must be threadsafe.
-** -** [[SQLITE_CONFIG_URI]]
SQLITE_CONFIG_URI -**
This option takes a single argument of type int. If non-zero, then -** URI handling is globally enabled. If the parameter is zero, then URI handling -** is globally disabled. If URI handling is globally enabled, all filenames -** passed to [sqlite3_open()], [sqlite3_open_v2()], [sqlite3_open16()] or -** specified as part of [ATTACH] commands are interpreted as URIs, regardless -** of whether or not the [SQLITE_OPEN_URI] flag is set when the database -** connection is opened. If it is globally disabled, filenames are -** only interpreted as URIs if the SQLITE_OPEN_URI flag is set when the -** database connection is opened. By default, URI handling is globally -** disabled. The default value may be changed by compiling with the -** [SQLITE_USE_URI] symbol defined. -**
-*/ -#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ -#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ -#define SQLITE_CONFIG_SERIALIZED 3 /* nil */ -#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_SCRATCH 6 /* void*, int sz, int N */ -#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ -#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ -#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ -#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ -#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ -/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ -#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ -#define SQLITE_CONFIG_PCACHE 14 /* sqlite3_pcache_methods* */ -#define SQLITE_CONFIG_GETPCACHE 15 /* sqlite3_pcache_methods* */ -#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ -#define SQLITE_CONFIG_URI 17 /* int */ - -/* -** CAPI3REF: Database Connection Configuration Options -** -** These constants are the available integer configuration options that -** can be passed as the second argument to the [sqlite3_db_config()] interface. -** -** New configuration options may be added in future releases of SQLite. -** Existing configuration options might be discontinued. Applications -** should check the return code from [sqlite3_db_config()] to make sure that -** the call worked. ^The [sqlite3_db_config()] interface will return a -** non-zero [error code] if a discontinued or unsupported configuration option -** is invoked. -** -**
-**
SQLITE_DBCONFIG_LOOKASIDE
-**
^This option takes three additional arguments that determine the -** [lookaside memory allocator] configuration for the [database connection]. -** ^The first argument (the third parameter to [sqlite3_db_config()] is a -** pointer to a memory buffer to use for lookaside memory. -** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb -** may be NULL in which case SQLite will allocate the -** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the -** size of each lookaside buffer slot. ^The third argument is the number of -** slots. The size of the buffer in the first argument must be greater than -** or equal to the product of the second and third arguments. The buffer -** must be aligned to an 8-byte boundary. ^If the second argument to -** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally -** rounded down to the next smaller multiple of 8. ^(The lookaside memory -** configuration for a database connection can only be changed when that -** connection is not currently using lookaside memory, or in other words -** when the "current value" returned by -** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero. -** Any attempt to change the lookaside memory configuration when lookaside -** memory is in use leaves the configuration unchanged and returns -** [SQLITE_BUSY].)^
-** -**
SQLITE_DBCONFIG_ENABLE_FKEY
-**
^This option is used to enable or disable the enforcement of -** [foreign key constraints]. There should be two additional arguments. -** The first argument is an integer which is 0 to disable FK enforcement, -** positive to enable FK enforcement or negative to leave FK enforcement -** unchanged. The second parameter is a pointer to an integer into which -** is written 0 or 1 to indicate whether FK enforcement is off or on -** following this call. The second parameter may be a NULL pointer, in -** which case the FK enforcement setting is not reported back.
-** -**
SQLITE_DBCONFIG_ENABLE_TRIGGER
-**
^This option is used to enable or disable [CREATE TRIGGER | triggers]. -** There should be two additional arguments. -** The first argument is an integer which is 0 to disable triggers, -** positive to enable triggers or negative to leave the setting unchanged. -** The second parameter is a pointer to an integer into which -** is written 0 or 1 to indicate whether triggers are disabled or enabled -** following this call. The second parameter may be a NULL pointer, in -** which case the trigger setting is not reported back.
-** -**
-*/ -#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */ -#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */ -#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */ - - -/* -** CAPI3REF: Enable Or Disable Extended Result Codes -** -** ^The sqlite3_extended_result_codes() routine enables or disables the -** [extended result codes] feature of SQLite. ^The extended result -** codes are disabled by default for historical compatibility. -*/ -SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); - -/* -** CAPI3REF: Last Insert Rowid -** -** ^Each entry in an SQLite table has a unique 64-bit signed -** integer key called the [ROWID | "rowid"]. ^The rowid is always available -** as an undeclared column named ROWID, OID, or _ROWID_ as long as those -** names are not also used by explicitly declared columns. ^If -** the table has a column of type [INTEGER PRIMARY KEY] then that column -** is another alias for the rowid. -** -** ^This routine returns the [rowid] of the most recent -** successful [INSERT] into the database from the [database connection] -** in the first argument. ^As of SQLite version 3.7.7, this routines -** records the last insert rowid of both ordinary tables and [virtual tables]. -** ^If no successful [INSERT]s -** have ever occurred on that database connection, zero is returned. -** -** ^(If an [INSERT] occurs within a trigger or within a [virtual table] -** method, then this routine will return the [rowid] of the inserted -** row as long as the trigger or virtual table method is running. -** But once the trigger or virtual table method ends, the value returned -** by this routine reverts to what it was before the trigger or virtual -** table method began.)^ -** -** ^An [INSERT] that fails due to a constraint violation is not a -** successful [INSERT] and does not change the value returned by this -** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, -** and INSERT OR ABORT make no changes to the return value of this -** routine when their insertion fails. ^(When INSERT OR REPLACE -** encounters a constraint violation, it does not fail. The -** INSERT continues to completion after deleting rows that caused -** the constraint problem so INSERT OR REPLACE will always change -** the return value of this interface.)^ -** -** ^For the purposes of this routine, an [INSERT] is considered to -** be successful even if it is subsequently rolled back. -** -** This function is accessible to SQL statements via the -** [last_insert_rowid() SQL function]. -** -** If a separate thread performs a new [INSERT] on the same -** database connection while the [sqlite3_last_insert_rowid()] -** function is running and thus changes the last insert [rowid], -** then the value returned by [sqlite3_last_insert_rowid()] is -** unpredictable and might not equal either the old or the new -** last insert [rowid]. -*/ -SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); - -/* -** CAPI3REF: Count The Number Of Rows Modified -** -** ^This function returns the number of database rows that were changed -** or inserted or deleted by the most recently completed SQL statement -** on the [database connection] specified by the first parameter. -** ^(Only changes that are directly specified by the [INSERT], [UPDATE], -** or [DELETE] statement are counted. Auxiliary changes caused by -** triggers or [foreign key actions] are not counted.)^ Use the -** [sqlite3_total_changes()] function to find the total number of changes -** including changes caused by triggers and foreign key actions. -** -** ^Changes to a view that are simulated by an [INSTEAD OF trigger] -** are not counted. Only real table changes are counted. -** -** ^(A "row change" is a change to a single row of a single table -** caused by an INSERT, DELETE, or UPDATE statement. Rows that -** are changed as side effects of [REPLACE] constraint resolution, -** rollback, ABORT processing, [DROP TABLE], or by any other -** mechanisms do not count as direct row changes.)^ -** -** A "trigger context" is a scope of execution that begins and -** ends with the script of a [CREATE TRIGGER | trigger]. -** Most SQL statements are -** evaluated outside of any trigger. This is the "top level" -** trigger context. If a trigger fires from the top level, a -** new trigger context is entered for the duration of that one -** trigger. Subtriggers create subcontexts for their duration. -** -** ^Calling [sqlite3_exec()] or [sqlite3_step()] recursively does -** not create a new trigger context. -** -** ^This function returns the number of direct row changes in the -** most recent INSERT, UPDATE, or DELETE statement within the same -** trigger context. -** -** ^Thus, when called from the top level, this function returns the -** number of changes in the most recent INSERT, UPDATE, or DELETE -** that also occurred at the top level. ^(Within the body of a trigger, -** the sqlite3_changes() interface can be called to find the number of -** changes in the most recently completed INSERT, UPDATE, or DELETE -** statement within the body of the same trigger. -** However, the number returned does not include changes -** caused by subtriggers since those have their own context.)^ -** -** See also the [sqlite3_total_changes()] interface, the -** [count_changes pragma], and the [changes() SQL function]. -** -** If a separate thread makes changes on the same database connection -** while [sqlite3_changes()] is running then the value returned -** is unpredictable and not meaningful. -*/ -SQLITE_API int sqlite3_changes(sqlite3*); - -/* -** CAPI3REF: Total Number Of Rows Modified -** -** ^This function returns the number of row changes caused by [INSERT], -** [UPDATE] or [DELETE] statements since the [database connection] was opened. -** ^(The count returned by sqlite3_total_changes() includes all changes -** from all [CREATE TRIGGER | trigger] contexts and changes made by -** [foreign key actions]. However, -** the count does not include changes used to implement [REPLACE] constraints, -** do rollbacks or ABORT processing, or [DROP TABLE] processing. The -** count does not include rows of views that fire an [INSTEAD OF trigger], -** though if the INSTEAD OF trigger makes changes of its own, those changes -** are counted.)^ -** ^The sqlite3_total_changes() function counts the changes as soon as -** the statement that makes them is completed (when the statement handle -** is passed to [sqlite3_reset()] or [sqlite3_finalize()]). -** -** See also the [sqlite3_changes()] interface, the -** [count_changes pragma], and the [total_changes() SQL function]. -** -** If a separate thread makes changes on the same database connection -** while [sqlite3_total_changes()] is running then the value -** returned is unpredictable and not meaningful. -*/ -SQLITE_API int sqlite3_total_changes(sqlite3*); - -/* -** CAPI3REF: Interrupt A Long-Running Query -** -** ^This function causes any pending database operation to abort and -** return at its earliest opportunity. This routine is typically -** called in response to a user action such as pressing "Cancel" -** or Ctrl-C where the user wants a long query operation to halt -** immediately. -** -** ^It is safe to call this routine from a thread different from the -** thread that is currently running the database operation. But it -** is not safe to call this routine with a [database connection] that -** is closed or might close before sqlite3_interrupt() returns. -** -** ^If an SQL operation is very nearly finished at the time when -** sqlite3_interrupt() is called, then it might not have an opportunity -** to be interrupted and might continue to completion. -** -** ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT]. -** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE -** that is inside an explicit transaction, then the entire transaction -** will be rolled back automatically. -** -** ^The sqlite3_interrupt(D) call is in effect until all currently running -** SQL statements on [database connection] D complete. ^Any new SQL statements -** that are started after the sqlite3_interrupt() call and before the -** running statements reaches zero are interrupted as if they had been -** running prior to the sqlite3_interrupt() call. ^New SQL statements -** that are started after the running statement count reaches zero are -** not effected by the sqlite3_interrupt(). -** ^A call to sqlite3_interrupt(D) that occurs when there are no running -** SQL statements is a no-op and has no effect on SQL statements -** that are started after the sqlite3_interrupt() call returns. -** -** If the database connection closes while [sqlite3_interrupt()] -** is running then bad things will likely happen. -*/ -SQLITE_API void sqlite3_interrupt(sqlite3*); - -/* -** CAPI3REF: Determine If An SQL Statement Is Complete -** -** These routines are useful during command-line input to determine if the -** currently entered text seems to form a complete SQL statement or -** if additional input is needed before sending the text into -** SQLite for parsing. ^These routines return 1 if the input string -** appears to be a complete SQL statement. ^A statement is judged to be -** complete if it ends with a semicolon token and is not a prefix of a -** well-formed CREATE TRIGGER statement. ^Semicolons that are embedded within -** string literals or quoted identifier names or comments are not -** independent tokens (they are part of the token in which they are -** embedded) and thus do not count as a statement terminator. ^Whitespace -** and comments that follow the final semicolon are ignored. -** -** ^These routines return 0 if the statement is incomplete. ^If a -** memory allocation fails, then SQLITE_NOMEM is returned. -** -** ^These routines do not parse the SQL statements thus -** will not detect syntactically incorrect SQL. -** -** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior -** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked -** automatically by sqlite3_complete16(). If that initialization fails, -** then the return value from sqlite3_complete16() will be non-zero -** regardless of whether or not the input SQL is complete.)^ -** -** The input to [sqlite3_complete()] must be a zero-terminated -** UTF-8 string. -** -** The input to [sqlite3_complete16()] must be a zero-terminated -** UTF-16 string in native byte order. -*/ -SQLITE_API int sqlite3_complete(const char *sql); -SQLITE_API int sqlite3_complete16(const void *sql); - -/* -** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors -** -** ^This routine sets a callback function that might be invoked whenever -** an attempt is made to open a database table that another thread -** or process has locked. -** -** ^If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] -** is returned immediately upon encountering the lock. ^If the busy callback -** is not NULL, then the callback might be invoked with two arguments. -** -** ^The first argument to the busy handler is a copy of the void* pointer which -** is the third argument to sqlite3_busy_handler(). ^The second argument to -** the busy handler callback is the number of times that the busy handler has -** been invoked for this locking event. ^If the -** busy callback returns 0, then no additional attempts are made to -** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned. -** ^If the callback returns non-zero, then another attempt -** is made to open the database for reading and the cycle repeats. -** -** The presence of a busy handler does not guarantee that it will be invoked -** when there is lock contention. ^If SQLite determines that invoking the busy -** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY] -** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler. -** Consider a scenario where one process is holding a read lock that -** it is trying to promote to a reserved lock and -** a second process is holding a reserved lock that it is trying -** to promote to an exclusive lock. The first process cannot proceed -** because it is blocked by the second and the second process cannot -** proceed because it is blocked by the first. If both processes -** invoke the busy handlers, neither will make any progress. Therefore, -** SQLite returns [SQLITE_BUSY] for the first process, hoping that this -** will induce the first process to release its read lock and allow -** the second process to proceed. -** -** ^The default busy callback is NULL. -** -** ^The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED] -** when SQLite is in the middle of a large transaction where all the -** changes will not fit into the in-memory cache. SQLite will -** already hold a RESERVED lock on the database file, but it needs -** to promote this lock to EXCLUSIVE so that it can spill cache -** pages into the database file without harm to concurrent -** readers. ^If it is unable to promote the lock, then the in-memory -** cache will be left in an inconsistent state and so the error -** code is promoted from the relatively benign [SQLITE_BUSY] to -** the more severe [SQLITE_IOERR_BLOCKED]. ^This error code promotion -** forces an automatic rollback of the changes. See the -** -** CorruptionFollowingBusyError wiki page for a discussion of why -** this is important. -** -** ^(There can only be a single busy handler defined for each -** [database connection]. Setting a new busy handler clears any -** previously set handler.)^ ^Note that calling [sqlite3_busy_timeout()] -** will also set or clear the busy handler. -** -** The busy callback should not take any actions which modify the -** database connection that invoked the busy handler. Any such actions -** result in undefined behavior. -** -** A busy handler must not close the database connection -** or [prepared statement] that invoked the busy handler. -*/ -SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); - -/* -** CAPI3REF: Set A Busy Timeout -** -** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps -** for a specified amount of time when a table is locked. ^The handler -** will sleep multiple times until at least "ms" milliseconds of sleeping -** have accumulated. ^After at least "ms" milliseconds of sleeping, -** the handler returns 0 which causes [sqlite3_step()] to return -** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]. -** -** ^Calling this routine with an argument less than or equal to zero -** turns off all busy handlers. -** -** ^(There can only be a single busy handler for a particular -** [database connection] any any given moment. If another busy handler -** was defined (using [sqlite3_busy_handler()]) prior to calling -** this routine, that other busy handler is cleared.)^ -*/ -SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); - -/* -** CAPI3REF: Convenience Routines For Running Queries -** -** This is a legacy interface that is preserved for backwards compatibility. -** Use of this interface is not recommended. -** -** Definition: A result table is memory data structure created by the -** [sqlite3_get_table()] interface. A result table records the -** complete query results from one or more queries. -** -** The table conceptually has a number of rows and columns. But -** these numbers are not part of the result table itself. These -** numbers are obtained separately. Let N be the number of rows -** and M be the number of columns. -** -** A result table is an array of pointers to zero-terminated UTF-8 strings. -** There are (N+1)*M elements in the array. The first M pointers point -** to zero-terminated strings that contain the names of the columns. -** The remaining entries all point to query results. NULL values result -** in NULL pointers. All other values are in their UTF-8 zero-terminated -** string representation as returned by [sqlite3_column_text()]. -** -** A result table might consist of one or more memory allocations. -** It is not safe to pass a result table directly to [sqlite3_free()]. -** A result table should be deallocated using [sqlite3_free_table()]. -** -** ^(As an example of the result table format, suppose a query result -** is as follows: -** -**
-**        Name        | Age
-**        -----------------------
-**        Alice       | 43
-**        Bob         | 28
-**        Cindy       | 21
-** 
-** -** There are two column (M==2) and three rows (N==3). Thus the -** result table has 8 entries. Suppose the result table is stored -** in an array names azResult. Then azResult holds this content: -** -**
-**        azResult[0] = "Name";
-**        azResult[1] = "Age";
-**        azResult[2] = "Alice";
-**        azResult[3] = "43";
-**        azResult[4] = "Bob";
-**        azResult[5] = "28";
-**        azResult[6] = "Cindy";
-**        azResult[7] = "21";
-** 
)^ -** -** ^The sqlite3_get_table() function evaluates one or more -** semicolon-separated SQL statements in the zero-terminated UTF-8 -** string of its 2nd parameter and returns a result table to the -** pointer given in its 3rd parameter. -** -** After the application has finished with the result from sqlite3_get_table(), -** it must pass the result table pointer to sqlite3_free_table() in order to -** release the memory that was malloced. Because of the way the -** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling -** function must not try to call [sqlite3_free()] directly. Only -** [sqlite3_free_table()] is able to release the memory properly and safely. -** -** The sqlite3_get_table() interface is implemented as a wrapper around -** [sqlite3_exec()]. The sqlite3_get_table() routine does not have access -** to any internal data structures of SQLite. It uses only the public -** interface defined here. As a consequence, errors that occur in the -** wrapper layer outside of the internal [sqlite3_exec()] call are not -** reflected in subsequent calls to [sqlite3_errcode()] or -** [sqlite3_errmsg()]. -*/ -SQLITE_API int sqlite3_get_table( - sqlite3 *db, /* An open database */ - const char *zSql, /* SQL to be evaluated */ - char ***pazResult, /* Results of the query */ - int *pnRow, /* Number of result rows written here */ - int *pnColumn, /* Number of result columns written here */ - char **pzErrmsg /* Error msg written here */ -); -SQLITE_API void sqlite3_free_table(char **result); - -/* -** CAPI3REF: Formatted String Printing Functions -** -** These routines are work-alikes of the "printf()" family of functions -** from the standard C library. -** -** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their -** results into memory obtained from [sqlite3_malloc()]. -** The strings returned by these two routines should be -** released by [sqlite3_free()]. ^Both routines return a -** NULL pointer if [sqlite3_malloc()] is unable to allocate enough -** memory to hold the resulting string. -** -** ^(The sqlite3_snprintf() routine is similar to "snprintf()" from -** the standard C library. The result is written into the -** buffer supplied as the second parameter whose size is given by -** the first parameter. Note that the order of the -** first two parameters is reversed from snprintf().)^ This is an -** historical accident that cannot be fixed without breaking -** backwards compatibility. ^(Note also that sqlite3_snprintf() -** returns a pointer to its buffer instead of the number of -** characters actually written into the buffer.)^ We admit that -** the number of characters written would be a more useful return -** value but we cannot change the implementation of sqlite3_snprintf() -** now without breaking compatibility. -** -** ^As long as the buffer size is greater than zero, sqlite3_snprintf() -** guarantees that the buffer is always zero-terminated. ^The first -** parameter "n" is the total size of the buffer, including space for -** the zero terminator. So the longest string that can be completely -** written will be n-1 characters. -** -** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf(). -** -** These routines all implement some additional formatting -** options that are useful for constructing SQL statements. -** All of the usual printf() formatting options apply. In addition, there -** is are "%q", "%Q", and "%z" options. -** -** ^(The %q option works like %s in that it substitutes a null-terminated -** string from the argument list. But %q also doubles every '\'' character. -** %q is designed for use inside a string literal.)^ By doubling each '\'' -** character it escapes that character and allows it to be inserted into -** the string. -** -** For example, assume the string variable zText contains text as follows: -** -**
-**  char *zText = "It's a happy day!";
-** 
-** -** One can use this text in an SQL statement as follows: -** -**
-**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
-**  sqlite3_exec(db, zSQL, 0, 0, 0);
-**  sqlite3_free(zSQL);
-** 
-** -** Because the %q format string is used, the '\'' character in zText -** is escaped and the SQL generated is as follows: -** -**
-**  INSERT INTO table1 VALUES('It''s a happy day!')
-** 
-** -** This is correct. Had we used %s instead of %q, the generated SQL -** would have looked like this: -** -**
-**  INSERT INTO table1 VALUES('It's a happy day!');
-** 
-** -** This second example is an SQL syntax error. As a general rule you should -** always use %q instead of %s when inserting text into a string literal. -** -** ^(The %Q option works like %q except it also adds single quotes around -** the outside of the total string. Additionally, if the parameter in the -** argument list is a NULL pointer, %Q substitutes the text "NULL" (without -** single quotes).)^ So, for example, one could say: -** -**
-**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
-**  sqlite3_exec(db, zSQL, 0, 0, 0);
-**  sqlite3_free(zSQL);
-** 
-** -** The code above will render a correct SQL statement in the zSQL -** variable even if the zText variable is a NULL pointer. -** -** ^(The "%z" formatting option works like "%s" but with the -** addition that after the string has been read and copied into -** the result, [sqlite3_free()] is called on the input string.)^ -*/ -SQLITE_API char *sqlite3_mprintf(const char*,...); -SQLITE_API char *sqlite3_vmprintf(const char*, va_list); -SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...); -SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list); - -/* -** CAPI3REF: Memory Allocation Subsystem -** -** The SQLite core uses these three routines for all of its own -** internal memory allocation needs. "Core" in the previous sentence -** does not include operating-system specific VFS implementation. The -** Windows VFS uses native malloc() and free() for some operations. -** -** ^The sqlite3_malloc() routine returns a pointer to a block -** of memory at least N bytes in length, where N is the parameter. -** ^If sqlite3_malloc() is unable to obtain sufficient free -** memory, it returns a NULL pointer. ^If the parameter N to -** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns -** a NULL pointer. -** -** ^Calling sqlite3_free() with a pointer previously returned -** by sqlite3_malloc() or sqlite3_realloc() releases that memory so -** that it might be reused. ^The sqlite3_free() routine is -** a no-op if is called with a NULL pointer. Passing a NULL pointer -** to sqlite3_free() is harmless. After being freed, memory -** should neither be read nor written. Even reading previously freed -** memory might result in a segmentation fault or other severe error. -** Memory corruption, a segmentation fault, or other severe error -** might result if sqlite3_free() is called with a non-NULL pointer that -** was not obtained from sqlite3_malloc() or sqlite3_realloc(). -** -** ^(The sqlite3_realloc() interface attempts to resize a -** prior memory allocation to be at least N bytes, where N is the -** second parameter. The memory allocation to be resized is the first -** parameter.)^ ^ If the first parameter to sqlite3_realloc() -** is a NULL pointer then its behavior is identical to calling -** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc(). -** ^If the second parameter to sqlite3_realloc() is zero or -** negative then the behavior is exactly the same as calling -** sqlite3_free(P) where P is the first parameter to sqlite3_realloc(). -** ^sqlite3_realloc() returns a pointer to a memory allocation -** of at least N bytes in size or NULL if sufficient memory is unavailable. -** ^If M is the size of the prior allocation, then min(N,M) bytes -** of the prior allocation are copied into the beginning of buffer returned -** by sqlite3_realloc() and the prior allocation is freed. -** ^If sqlite3_realloc() returns NULL, then the prior allocation -** is not freed. -** -** ^The memory returned by sqlite3_malloc() and sqlite3_realloc() -** is always aligned to at least an 8 byte boundary, or to a -** 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time -** option is used. -** -** In SQLite version 3.5.0 and 3.5.1, it was possible to define -** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in -** implementation of these routines to be omitted. That capability -** is no longer provided. Only built-in memory allocators can be used. -** -** The Windows OS interface layer calls -** the system malloc() and free() directly when converting -** filenames between the UTF-8 encoding used by SQLite -** and whatever filename encoding is used by the particular Windows -** installation. Memory allocation errors are detected, but -** they are reported back as [SQLITE_CANTOPEN] or -** [SQLITE_IOERR] rather than [SQLITE_NOMEM]. -** -** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()] -** must be either NULL or else pointers obtained from a prior -** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have -** not yet been released. -** -** The application must not read or write any part of -** a block of memory after it has been released using -** [sqlite3_free()] or [sqlite3_realloc()]. -*/ -SQLITE_API void *sqlite3_malloc(int); -SQLITE_API void *sqlite3_realloc(void*, int); -SQLITE_API void sqlite3_free(void*); - -/* -** CAPI3REF: Memory Allocator Statistics -** -** SQLite provides these two interfaces for reporting on the status -** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()] -** routines, which form the built-in memory allocation subsystem. -** -** ^The [sqlite3_memory_used()] routine returns the number of bytes -** of memory currently outstanding (malloced but not freed). -** ^The [sqlite3_memory_highwater()] routine returns the maximum -** value of [sqlite3_memory_used()] since the high-water mark -** was last reset. ^The values returned by [sqlite3_memory_used()] and -** [sqlite3_memory_highwater()] include any overhead -** added by SQLite in its implementation of [sqlite3_malloc()], -** but not overhead added by the any underlying system library -** routines that [sqlite3_malloc()] may call. -** -** ^The memory high-water mark is reset to the current value of -** [sqlite3_memory_used()] if and only if the parameter to -** [sqlite3_memory_highwater()] is true. ^The value returned -** by [sqlite3_memory_highwater(1)] is the high-water mark -** prior to the reset. -*/ -SQLITE_API sqlite3_int64 sqlite3_memory_used(void); -SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag); - -/* -** CAPI3REF: Pseudo-Random Number Generator -** -** SQLite contains a high-quality pseudo-random number generator (PRNG) used to -** select random [ROWID | ROWIDs] when inserting new records into a table that -** already uses the largest possible [ROWID]. The PRNG is also used for -** the build-in random() and randomblob() SQL functions. This interface allows -** applications to access the same PRNG for other purposes. -** -** ^A call to this routine stores N bytes of randomness into buffer P. -** -** ^The first time this routine is invoked (either internally or by -** the application) the PRNG is seeded using randomness obtained -** from the xRandomness method of the default [sqlite3_vfs] object. -** ^On all subsequent invocations, the pseudo-randomness is generated -** internally and without recourse to the [sqlite3_vfs] xRandomness -** method. -*/ -SQLITE_API void sqlite3_randomness(int N, void *P); - -/* -** CAPI3REF: Compile-Time Authorization Callbacks -** -** ^This routine registers an authorizer callback with a particular -** [database connection], supplied in the first argument. -** ^The authorizer callback is invoked as SQL statements are being compiled -** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()], -** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. ^At various -** points during the compilation process, as logic is being created -** to perform various actions, the authorizer callback is invoked to -** see if those actions are allowed. ^The authorizer callback should -** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the -** specific action but allow the SQL statement to continue to be -** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be -** rejected with an error. ^If the authorizer callback returns -** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY] -** then the [sqlite3_prepare_v2()] or equivalent call that triggered -** the authorizer will fail with an error message. -** -** When the callback returns [SQLITE_OK], that means the operation -** requested is ok. ^When the callback returns [SQLITE_DENY], the -** [sqlite3_prepare_v2()] or equivalent call that triggered the -** authorizer will fail with an error message explaining that -** access is denied. -** -** ^The first parameter to the authorizer callback is a copy of the third -** parameter to the sqlite3_set_authorizer() interface. ^The second parameter -** to the callback is an integer [SQLITE_COPY | action code] that specifies -** the particular action to be authorized. ^The third through sixth parameters -** to the callback are zero-terminated strings that contain additional -** details about the action to be authorized. -** -** ^If the action code is [SQLITE_READ] -** and the callback returns [SQLITE_IGNORE] then the -** [prepared statement] statement is constructed to substitute -** a NULL value in place of the table column that would have -** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE] -** return can be used to deny an untrusted user access to individual -** columns of a table. -** ^If the action code is [SQLITE_DELETE] and the callback returns -** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the -** [truncate optimization] is disabled and all rows are deleted individually. -** -** An authorizer is used when [sqlite3_prepare | preparing] -** SQL statements from an untrusted source, to ensure that the SQL statements -** do not try to access data they are not allowed to see, or that they do not -** try to execute malicious statements that damage the database. For -** example, an application may allow a user to enter arbitrary -** SQL queries for evaluation by a database. But the application does -** not want the user to be able to make arbitrary changes to the -** database. An authorizer could then be put in place while the -** user-entered SQL is being [sqlite3_prepare | prepared] that -** disallows everything except [SELECT] statements. -** -** Applications that need to process SQL from untrusted sources -** might also consider lowering resource limits using [sqlite3_limit()] -** and limiting database size using the [max_page_count] [PRAGMA] -** in addition to using an authorizer. -** -** ^(Only a single authorizer can be in place on a database connection -** at a time. Each call to sqlite3_set_authorizer overrides the -** previous call.)^ ^Disable the authorizer by installing a NULL callback. -** The authorizer is disabled by default. -** -** The authorizer callback must not do anything that will modify -** the database connection that invoked the authorizer callback. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the -** statement might be re-prepared during [sqlite3_step()] due to a -** schema change. Hence, the application should ensure that the -** correct authorizer callback remains in place during the [sqlite3_step()]. -** -** ^Note that the authorizer callback is invoked only during -** [sqlite3_prepare()] or its variants. Authorization is not -** performed during statement evaluation in [sqlite3_step()], unless -** as stated in the previous paragraph, sqlite3_step() invokes -** sqlite3_prepare_v2() to reprepare a statement after a schema change. -*/ -SQLITE_API int sqlite3_set_authorizer( - sqlite3*, - int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), - void *pUserData -); - -/* -** CAPI3REF: Authorizer Return Codes -** -** The [sqlite3_set_authorizer | authorizer callback function] must -** return either [SQLITE_OK] or one of these two constants in order -** to signal SQLite whether or not the action is permitted. See the -** [sqlite3_set_authorizer | authorizer documentation] for additional -** information. -** -** Note that SQLITE_IGNORE is also used as a [SQLITE_ROLLBACK | return code] -** from the [sqlite3_vtab_on_conflict()] interface. -*/ -#define SQLITE_DENY 1 /* Abort the SQL statement with an error */ -#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */ - -/* -** CAPI3REF: Authorizer Action Codes -** -** The [sqlite3_set_authorizer()] interface registers a callback function -** that is invoked to authorize certain SQL statement actions. The -** second parameter to the callback is an integer code that specifies -** what action is being authorized. These are the integer action codes that -** the authorizer callback may be passed. -** -** These action code values signify what kind of operation is to be -** authorized. The 3rd and 4th parameters to the authorization -** callback function will be parameters or NULL depending on which of these -** codes is used as the second parameter. ^(The 5th parameter to the -** authorizer callback is the name of the database ("main", "temp", -** etc.) if applicable.)^ ^The 6th parameter to the authorizer callback -** is the name of the inner-most trigger or view that is responsible for -** the access attempt or NULL if this access attempt is directly from -** top-level SQL code. -*/ -/******************************************* 3rd ************ 4th ***********/ -#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */ -#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */ -#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */ -#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */ -#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */ -#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */ -#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */ -#define SQLITE_CREATE_VIEW 8 /* View Name NULL */ -#define SQLITE_DELETE 9 /* Table Name NULL */ -#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */ -#define SQLITE_DROP_TABLE 11 /* Table Name NULL */ -#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */ -#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */ -#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */ -#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */ -#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */ -#define SQLITE_DROP_VIEW 17 /* View Name NULL */ -#define SQLITE_INSERT 18 /* Table Name NULL */ -#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */ -#define SQLITE_READ 20 /* Table Name Column Name */ -#define SQLITE_SELECT 21 /* NULL NULL */ -#define SQLITE_TRANSACTION 22 /* Operation NULL */ -#define SQLITE_UPDATE 23 /* Table Name Column Name */ -#define SQLITE_ATTACH 24 /* Filename NULL */ -#define SQLITE_DETACH 25 /* Database Name NULL */ -#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */ -#define SQLITE_REINDEX 27 /* Index Name NULL */ -#define SQLITE_ANALYZE 28 /* Table Name NULL */ -#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */ -#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */ -#define SQLITE_FUNCTION 31 /* NULL Function Name */ -#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */ -#define SQLITE_COPY 0 /* No longer used */ - -/* -** CAPI3REF: Tracing And Profiling Functions -** -** These routines register callback functions that can be used for -** tracing and profiling the execution of SQL statements. -** -** ^The callback function registered by sqlite3_trace() is invoked at -** various times when an SQL statement is being run by [sqlite3_step()]. -** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the -** SQL statement text as the statement first begins executing. -** ^(Additional sqlite3_trace() callbacks might occur -** as each triggered subprogram is entered. The callbacks for triggers -** contain a UTF-8 SQL comment that identifies the trigger.)^ -** -** ^The callback function registered by sqlite3_profile() is invoked -** as each SQL statement finishes. ^The profile callback contains -** the original statement text and an estimate of wall-clock time -** of how long that statement took to run. ^The profile callback -** time is in units of nanoseconds, however the current implementation -** is only capable of millisecond resolution so the six least significant -** digits in the time are meaningless. Future versions of SQLite -** might provide greater resolution on the profiler callback. The -** sqlite3_profile() function is considered experimental and is -** subject to change in future versions of SQLite. -*/ -SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); -SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*, - void(*xProfile)(void*,const char*,sqlite3_uint64), void*); - -/* -** CAPI3REF: Query Progress Callbacks -** -** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback -** function X to be invoked periodically during long running calls to -** [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for -** database connection D. An example use for this -** interface is to keep a GUI updated during a large query. -** -** ^The parameter P is passed through as the only parameter to the -** callback function X. ^The parameter N is the number of -** [virtual machine instructions] that are evaluated between successive -** invocations of the callback X. -** -** ^Only a single progress handler may be defined at one time per -** [database connection]; setting a new progress handler cancels the -** old one. ^Setting parameter X to NULL disables the progress handler. -** ^The progress handler is also disabled by setting N to a value less -** than 1. -** -** ^If the progress callback returns non-zero, the operation is -** interrupted. This feature can be used to implement a -** "Cancel" button on a GUI progress dialog box. -** -** The progress handler callback must not do anything that will modify -** the database connection that invoked the progress handler. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -*/ -SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); - -/* -** CAPI3REF: Opening A New Database Connection -** -** ^These routines open an SQLite database file as specified by the -** filename argument. ^The filename argument is interpreted as UTF-8 for -** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte -** order for sqlite3_open16(). ^(A [database connection] handle is usually -** returned in *ppDb, even if an error occurs. The only exception is that -** if SQLite is unable to allocate memory to hold the [sqlite3] object, -** a NULL will be written into *ppDb instead of a pointer to the [sqlite3] -** object.)^ ^(If the database is opened (and/or created) successfully, then -** [SQLITE_OK] is returned. Otherwise an [error code] is returned.)^ ^The -** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain -** an English language description of the error following a failure of any -** of the sqlite3_open() routines. -** -** ^The default encoding for the database will be UTF-8 if -** sqlite3_open() or sqlite3_open_v2() is called and -** UTF-16 in the native byte order if sqlite3_open16() is used. -** -** Whether or not an error occurs when it is opened, resources -** associated with the [database connection] handle should be released by -** passing it to [sqlite3_close()] when it is no longer required. -** -** The sqlite3_open_v2() interface works like sqlite3_open() -** except that it accepts two additional parameters for additional control -** over the new database connection. ^(The flags parameter to -** sqlite3_open_v2() can take one of -** the following three values, optionally combined with the -** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE], -** [SQLITE_OPEN_PRIVATECACHE], and/or [SQLITE_OPEN_URI] flags:)^ -** -**
-** ^(
[SQLITE_OPEN_READONLY]
-**
The database is opened in read-only mode. If the database does not -** already exist, an error is returned.
)^ -** -** ^(
[SQLITE_OPEN_READWRITE]
-**
The database is opened for reading and writing if possible, or reading -** only if the file is write protected by the operating system. In either -** case the database must already exist, otherwise an error is returned.
)^ -** -** ^(
[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]
-**
The database is opened for reading and writing, and is created if -** it does not already exist. This is the behavior that is always used for -** sqlite3_open() and sqlite3_open16().
)^ -**
-** -** If the 3rd parameter to sqlite3_open_v2() is not one of the -** combinations shown above optionally combined with other -** [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits] -** then the behavior is undefined. -** -** ^If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection -** opens in the multi-thread [threading mode] as long as the single-thread -** mode has not been set at compile-time or start-time. ^If the -** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens -** in the serialized [threading mode] unless single-thread was -** previously selected at compile-time or start-time. -** ^The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be -** eligible to use [shared cache mode], regardless of whether or not shared -** cache is enabled using [sqlite3_enable_shared_cache()]. ^The -** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not -** participate in [shared cache mode] even if it is enabled. -** -** ^The fourth parameter to sqlite3_open_v2() is the name of the -** [sqlite3_vfs] object that defines the operating system interface that -** the new database connection should use. ^If the fourth parameter is -** a NULL pointer then the default [sqlite3_vfs] object is used. -** -** ^If the filename is ":memory:", then a private, temporary in-memory database -** is created for the connection. ^This in-memory database will vanish when -** the database connection is closed. Future versions of SQLite might -** make use of additional special filenames that begin with the ":" character. -** It is recommended that when a database filename actually does begin with -** a ":" character you should prefix the filename with a pathname such as -** "./" to avoid ambiguity. -** -** ^If the filename is an empty string, then a private, temporary -** on-disk database will be created. ^This private database will be -** automatically deleted as soon as the database connection is closed. -** -** [[URI filenames in sqlite3_open()]]

URI Filenames

-** -** ^If [URI filename] interpretation is enabled, and the filename argument -** begins with "file:", then the filename is interpreted as a URI. ^URI -** filename interpretation is enabled if the [SQLITE_OPEN_URI] flag is -** set in the fourth argument to sqlite3_open_v2(), or if it has -** been enabled globally using the [SQLITE_CONFIG_URI] option with the -** [sqlite3_config()] method or by the [SQLITE_USE_URI] compile-time option. -** As of SQLite version 3.7.7, URI filename interpretation is turned off -** by default, but future releases of SQLite might enable URI filename -** interpretation by default. See "[URI filenames]" for additional -** information. -** -** URI filenames are parsed according to RFC 3986. ^If the URI contains an -** authority, then it must be either an empty string or the string -** "localhost". ^If the authority is not an empty string or "localhost", an -** error is returned to the caller. ^The fragment component of a URI, if -** present, is ignored. -** -** ^SQLite uses the path component of the URI as the name of the disk file -** which contains the database. ^If the path begins with a '/' character, -** then it is interpreted as an absolute path. ^If the path does not begin -** with a '/' (meaning that the authority section is omitted from the URI) -** then the path is interpreted as a relative path. -** ^On windows, the first component of an absolute path -** is a drive specification (e.g. "C:"). -** -** [[core URI query parameters]] -** The query component of a URI may contain parameters that are interpreted -** either by SQLite itself, or by a [VFS | custom VFS implementation]. -** SQLite interprets the following three query parameters: -** -**
    -**
  • vfs: ^The "vfs" parameter may be used to specify the name of -** a VFS object that provides the operating system interface that should -** be used to access the database file on disk. ^If this option is set to -** an empty string the default VFS object is used. ^Specifying an unknown -** VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is -** present, then the VFS specified by the option takes precedence over -** the value passed as the fourth parameter to sqlite3_open_v2(). -** -**
  • mode: ^(The mode parameter may be set to either "ro", "rw" or -** "rwc". Attempting to set it to any other value is an error)^. -** ^If "ro" is specified, then the database is opened for read-only -** access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the -** third argument to sqlite3_prepare_v2(). ^If the mode option is set to -** "rw", then the database is opened for read-write (but not create) -** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had -** been set. ^Value "rwc" is equivalent to setting both -** SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If sqlite3_open_v2() is -** used, it is an error to specify a value for the mode parameter that is -** less restrictive than that specified by the flags passed as the third -** parameter. -** -**
  • cache: ^The cache parameter may be set to either "shared" or -** "private". ^Setting it to "shared" is equivalent to setting the -** SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to -** sqlite3_open_v2(). ^Setting the cache parameter to "private" is -** equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit. -** ^If sqlite3_open_v2() is used and the "cache" parameter is present in -** a URI filename, its value overrides any behaviour requested by setting -** SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag. -**
-** -** ^Specifying an unknown parameter in the query component of a URI is not an -** error. Future versions of SQLite might understand additional query -** parameters. See "[query parameters with special meaning to SQLite]" for -** additional information. -** -** [[URI filename examples]]

URI filename examples

-** -** -**
URI filenames Results -**
file:data.db -** Open the file "data.db" in the current directory. -**
file:/home/fred/data.db
-** file:///home/fred/data.db
-** file://localhost/home/fred/data.db
-** Open the database file "/home/fred/data.db". -**
file://darkstar/home/fred/data.db -** An error. "darkstar" is not a recognized authority. -**
-** file:///C:/Documents%20and%20Settings/fred/Desktop/data.db -** Windows only: Open the file "data.db" on fred's desktop on drive -** C:. Note that the %20 escaping in this example is not strictly -** necessary - space characters can be used literally -** in URI filenames. -**
file:data.db?mode=ro&cache=private -** Open file "data.db" in the current directory for read-only access. -** Regardless of whether or not shared-cache mode is enabled by -** default, use a private cache. -**
file:/home/fred/data.db?vfs=unix-nolock -** Open file "/home/fred/data.db". Use the special VFS "unix-nolock". -**
file:data.db?mode=readonly -** An error. "readonly" is not a valid option for the "mode" parameter. -**
-** -** ^URI hexadecimal escape sequences (%HH) are supported within the path and -** query components of a URI. A hexadecimal escape sequence consists of a -** percent sign - "%" - followed by exactly two hexadecimal digits -** specifying an octet value. ^Before the path or query components of a -** URI filename are interpreted, they are encoded using UTF-8 and all -** hexadecimal escape sequences replaced by a single byte containing the -** corresponding octet. If this process generates an invalid UTF-8 encoding, -** the results are undefined. -** -** Note to Windows users: The encoding used for the filename argument -** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever -** codepage is currently defined. Filenames containing international -** characters must be converted to UTF-8 prior to passing them into -** sqlite3_open() or sqlite3_open_v2(). -*/ -SQLITE_API int sqlite3_open( - const char *filename, /* Database filename (UTF-8) */ - sqlite3 **ppDb /* OUT: SQLite db handle */ -); -SQLITE_API int sqlite3_open16( - const void *filename, /* Database filename (UTF-16) */ - sqlite3 **ppDb /* OUT: SQLite db handle */ -); -SQLITE_API int sqlite3_open_v2( - const char *filename, /* Database filename (UTF-8) */ - sqlite3 **ppDb, /* OUT: SQLite db handle */ - int flags, /* Flags */ - const char *zVfs /* Name of VFS module to use */ -); - -/* -** CAPI3REF: Obtain Values For URI Parameters -** -** This is a utility routine, useful to VFS implementations, that checks -** to see if a database file was a URI that contained a specific query -** parameter, and if so obtains the value of the query parameter. -** -** The zFilename argument is the filename pointer passed into the xOpen() -** method of a VFS implementation. The zParam argument is the name of the -** query parameter we seek. This routine returns the value of the zParam -** parameter if it exists. If the parameter does not exist, this routine -** returns a NULL pointer. -** -** If the zFilename argument to this function is not a pointer that SQLite -** passed into the xOpen VFS method, then the behavior of this routine -** is undefined and probably undesirable. -*/ -SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam); - - -/* -** CAPI3REF: Error Codes And Messages -** -** ^The sqlite3_errcode() interface returns the numeric [result code] or -** [extended result code] for the most recent failed sqlite3_* API call -** associated with a [database connection]. If a prior API call failed -** but the most recent API call succeeded, the return value from -** sqlite3_errcode() is undefined. ^The sqlite3_extended_errcode() -** interface is the same except that it always returns the -** [extended result code] even when extended result codes are -** disabled. -** -** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language -** text that describes the error, as either UTF-8 or UTF-16 respectively. -** ^(Memory to hold the error message string is managed internally. -** The application does not need to worry about freeing the result. -** However, the error string might be overwritten or deallocated by -** subsequent calls to other SQLite interface functions.)^ -** -** When the serialized [threading mode] is in use, it might be the -** case that a second error occurs on a separate thread in between -** the time of the first error and the call to these interfaces. -** When that happens, the second error will be reported since these -** interfaces always report the most recent result. To avoid -** this, each thread can obtain exclusive use of the [database connection] D -** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning -** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after -** all calls to the interfaces listed here are completed. -** -** If an interface fails with SQLITE_MISUSE, that means the interface -** was invoked incorrectly by the application. In that case, the -** error code and message may or may not be set. -*/ -SQLITE_API int sqlite3_errcode(sqlite3 *db); -SQLITE_API int sqlite3_extended_errcode(sqlite3 *db); -SQLITE_API const char *sqlite3_errmsg(sqlite3*); -SQLITE_API const void *sqlite3_errmsg16(sqlite3*); - -/* -** CAPI3REF: SQL Statement Object -** KEYWORDS: {prepared statement} {prepared statements} -** -** An instance of this object represents a single SQL statement. -** This object is variously known as a "prepared statement" or a -** "compiled SQL statement" or simply as a "statement". -** -** The life of a statement object goes something like this: -** -**
    -**
  1. Create the object using [sqlite3_prepare_v2()] or a related -** function. -**
  2. Bind values to [host parameters] using the sqlite3_bind_*() -** interfaces. -**
  3. Run the SQL by calling [sqlite3_step()] one or more times. -**
  4. Reset the statement using [sqlite3_reset()] then go back -** to step 2. Do this zero or more times. -**
  5. Destroy the object using [sqlite3_finalize()]. -**
-** -** Refer to documentation on individual methods above for additional -** information. -*/ -typedef struct sqlite3_stmt sqlite3_stmt; - -/* -** CAPI3REF: Run-time Limits -** -** ^(This interface allows the size of various constructs to be limited -** on a connection by connection basis. The first parameter is the -** [database connection] whose limit is to be set or queried. The -** second parameter is one of the [limit categories] that define a -** class of constructs to be size limited. The third parameter is the -** new limit for that construct.)^ -** -** ^If the new limit is a negative number, the limit is unchanged. -** ^(For each limit category SQLITE_LIMIT_NAME there is a -** [limits | hard upper bound] -** set at compile-time by a C preprocessor macro called -** [limits | SQLITE_MAX_NAME]. -** (The "_LIMIT_" in the name is changed to "_MAX_".))^ -** ^Attempts to increase a limit above its hard upper bound are -** silently truncated to the hard upper bound. -** -** ^Regardless of whether or not the limit was changed, the -** [sqlite3_limit()] interface returns the prior value of the limit. -** ^Hence, to find the current value of a limit without changing it, -** simply invoke this interface with the third parameter set to -1. -** -** Run-time limits are intended for use in applications that manage -** both their own internal database and also databases that are controlled -** by untrusted external sources. An example application might be a -** web browser that has its own databases for storing history and -** separate databases controlled by JavaScript applications downloaded -** off the Internet. The internal databases can be given the -** large, default limits. Databases managed by external sources can -** be given much smaller limits designed to prevent a denial of service -** attack. Developers might also want to use the [sqlite3_set_authorizer()] -** interface to further control untrusted SQL. The size of the database -** created by an untrusted script can be contained using the -** [max_page_count] [PRAGMA]. -** -** New run-time limit categories may be added in future releases. -*/ -SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); - -/* -** CAPI3REF: Run-Time Limit Categories -** KEYWORDS: {limit category} {*limit categories} -** -** These constants define various performance limits -** that can be lowered at run-time using [sqlite3_limit()]. -** The synopsis of the meanings of the various limits is shown below. -** Additional information is available at [limits | Limits in SQLite]. -** -**
-** [[SQLITE_LIMIT_LENGTH]] ^(
SQLITE_LIMIT_LENGTH
-**
The maximum size of any string or BLOB or table row, in bytes.
)^ -** -** [[SQLITE_LIMIT_SQL_LENGTH]] ^(
SQLITE_LIMIT_SQL_LENGTH
-**
The maximum length of an SQL statement, in bytes.
)^ -** -** [[SQLITE_LIMIT_COLUMN]] ^(
SQLITE_LIMIT_COLUMN
-**
The maximum number of columns in a table definition or in the -** result set of a [SELECT] or the maximum number of columns in an index -** or in an ORDER BY or GROUP BY clause.
)^ -** -** [[SQLITE_LIMIT_EXPR_DEPTH]] ^(
SQLITE_LIMIT_EXPR_DEPTH
-**
The maximum depth of the parse tree on any expression.
)^ -** -** [[SQLITE_LIMIT_COMPOUND_SELECT]] ^(
SQLITE_LIMIT_COMPOUND_SELECT
-**
The maximum number of terms in a compound SELECT statement.
)^ -** -** [[SQLITE_LIMIT_VDBE_OP]] ^(
SQLITE_LIMIT_VDBE_OP
-**
The maximum number of instructions in a virtual machine program -** used to implement an SQL statement. This limit is not currently -** enforced, though that might be added in some future release of -** SQLite.
)^ -** -** [[SQLITE_LIMIT_FUNCTION_ARG]] ^(
SQLITE_LIMIT_FUNCTION_ARG
-**
The maximum number of arguments on a function.
)^ -** -** [[SQLITE_LIMIT_ATTACHED]] ^(
SQLITE_LIMIT_ATTACHED
-**
The maximum number of [ATTACH | attached databases].)^
-** -** [[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]] -** ^(
SQLITE_LIMIT_LIKE_PATTERN_LENGTH
-**
The maximum length of the pattern argument to the [LIKE] or -** [GLOB] operators.
)^ -** -** [[SQLITE_LIMIT_VARIABLE_NUMBER]] -** ^(
SQLITE_LIMIT_VARIABLE_NUMBER
-**
The maximum index number of any [parameter] in an SQL statement.)^ -** -** [[SQLITE_LIMIT_TRIGGER_DEPTH]] ^(
SQLITE_LIMIT_TRIGGER_DEPTH
-**
The maximum depth of recursion for triggers.
)^ -**
-*/ -#define SQLITE_LIMIT_LENGTH 0 -#define SQLITE_LIMIT_SQL_LENGTH 1 -#define SQLITE_LIMIT_COLUMN 2 -#define SQLITE_LIMIT_EXPR_DEPTH 3 -#define SQLITE_LIMIT_COMPOUND_SELECT 4 -#define SQLITE_LIMIT_VDBE_OP 5 -#define SQLITE_LIMIT_FUNCTION_ARG 6 -#define SQLITE_LIMIT_ATTACHED 7 -#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8 -#define SQLITE_LIMIT_VARIABLE_NUMBER 9 -#define SQLITE_LIMIT_TRIGGER_DEPTH 10 - -/* -** CAPI3REF: Compiling An SQL Statement -** KEYWORDS: {SQL statement compiler} -** -** To execute an SQL query, it must first be compiled into a byte-code -** program using one of these routines. -** -** The first argument, "db", is a [database connection] obtained from a -** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or -** [sqlite3_open16()]. The database connection must not have been closed. -** -** The second argument, "zSql", is the statement to be compiled, encoded -** as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2() -** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2() -** use UTF-16. -** -** ^If the nByte argument is less than zero, then zSql is read up to the -** first zero terminator. ^If nByte is non-negative, then it is the maximum -** number of bytes read from zSql. ^When nByte is non-negative, the -** zSql string ends at either the first '\000' or '\u0000' character or -** the nByte-th byte, whichever comes first. If the caller knows -** that the supplied string is nul-terminated, then there is a small -** performance advantage to be gained by passing an nByte parameter that -** is equal to the number of bytes in the input string including -** the nul-terminator bytes. -** -** ^If pzTail is not NULL then *pzTail is made to point to the first byte -** past the end of the first SQL statement in zSql. These routines only -** compile the first statement in zSql, so *pzTail is left pointing to -** what remains uncompiled. -** -** ^*ppStmt is left pointing to a compiled [prepared statement] that can be -** executed using [sqlite3_step()]. ^If there is an error, *ppStmt is set -** to NULL. ^If the input text contains no SQL (if the input is an empty -** string or a comment) then *ppStmt is set to NULL. -** The calling procedure is responsible for deleting the compiled -** SQL statement using [sqlite3_finalize()] after it has finished with it. -** ppStmt may not be NULL. -** -** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK]; -** otherwise an [error code] is returned. -** -** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are -** recommended for all new programs. The two older interfaces are retained -** for backwards compatibility, but their use is discouraged. -** ^In the "v2" interfaces, the prepared statement -** that is returned (the [sqlite3_stmt] object) contains a copy of the -** original SQL text. This causes the [sqlite3_step()] interface to -** behave differently in three ways: -** -**
    -**
  1. -** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it -** always used to do, [sqlite3_step()] will automatically recompile the SQL -** statement and try to run it again. -**
  2. -** -**
  3. -** ^When an error occurs, [sqlite3_step()] will return one of the detailed -** [error codes] or [extended error codes]. ^The legacy behavior was that -** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code -** and the application would have to make a second call to [sqlite3_reset()] -** in order to find the underlying cause of the problem. With the "v2" prepare -** interfaces, the underlying reason for the error is returned immediately. -**
  4. -** -**
  5. -** ^If the specific value bound to [parameter | host parameter] in the -** WHERE clause might influence the choice of query plan for a statement, -** then the statement will be automatically recompiled, as if there had been -** a schema change, on the first [sqlite3_step()] call following any change -** to the [sqlite3_bind_text | bindings] of that [parameter]. -** ^The specific value of WHERE-clause [parameter] might influence the -** choice of query plan if the parameter is the left-hand side of a [LIKE] -** or [GLOB] operator or if the parameter is compared to an indexed column -** and the [SQLITE_ENABLE_STAT2] compile-time option is enabled. -** the -**
  6. -**
-*/ -SQLITE_API int sqlite3_prepare( - sqlite3 *db, /* Database handle */ - const char *zSql, /* SQL statement, UTF-8 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const char **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare_v2( - sqlite3 *db, /* Database handle */ - const char *zSql, /* SQL statement, UTF-8 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const char **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare16( - sqlite3 *db, /* Database handle */ - const void *zSql, /* SQL statement, UTF-16 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const void **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare16_v2( - sqlite3 *db, /* Database handle */ - const void *zSql, /* SQL statement, UTF-16 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const void **pzTail /* OUT: Pointer to unused portion of zSql */ -); - -/* -** CAPI3REF: Retrieving Statement SQL -** -** ^This interface can be used to retrieve a saved copy of the original -** SQL text used to create a [prepared statement] if that statement was -** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. -*/ -SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Determine If An SQL Statement Writes The Database -** -** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if -** and only if the [prepared statement] X makes no direct changes to -** the content of the database file. -** -** Note that [application-defined SQL functions] or -** [virtual tables] might change the database indirectly as a side effect. -** ^(For example, if an application defines a function "eval()" that -** calls [sqlite3_exec()], then the following SQL statement would -** change the database file through side-effects: -** -**
-**    SELECT eval('DELETE FROM t1') FROM t2;
-** 
-** -** But because the [SELECT] statement does not change the database file -** directly, sqlite3_stmt_readonly() would still return true.)^ -** -** ^Transaction control statements such as [BEGIN], [COMMIT], [ROLLBACK], -** [SAVEPOINT], and [RELEASE] cause sqlite3_stmt_readonly() to return true, -** since the statements themselves do not actually modify the database but -** rather they control the timing of when other statements modify the -** database. ^The [ATTACH] and [DETACH] statements also cause -** sqlite3_stmt_readonly() to return true since, while those statements -** change the configuration of a database connection, they do not make -** changes to the content of the database files on disk. -*/ -SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Dynamically Typed Value Object -** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} -** -** SQLite uses the sqlite3_value object to represent all values -** that can be stored in a database table. SQLite uses dynamic typing -** for the values it stores. ^Values stored in sqlite3_value objects -** can be integers, floating point values, strings, BLOBs, or NULL. -** -** An sqlite3_value object may be either "protected" or "unprotected". -** Some interfaces require a protected sqlite3_value. Other interfaces -** will accept either a protected or an unprotected sqlite3_value. -** Every interface that accepts sqlite3_value arguments specifies -** whether or not it requires a protected sqlite3_value. -** -** The terms "protected" and "unprotected" refer to whether or not -** a mutex is held. An internal mutex is held for a protected -** sqlite3_value object but no mutex is held for an unprotected -** sqlite3_value object. If SQLite is compiled to be single-threaded -** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0) -** or if SQLite is run in one of reduced mutex modes -** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD] -** then there is no distinction between protected and unprotected -** sqlite3_value objects and they can be used interchangeably. However, -** for maximum code portability it is recommended that applications -** still make the distinction between protected and unprotected -** sqlite3_value objects even when not strictly required. -** -** ^The sqlite3_value objects that are passed as parameters into the -** implementation of [application-defined SQL functions] are protected. -** ^The sqlite3_value object returned by -** [sqlite3_column_value()] is unprotected. -** Unprotected sqlite3_value objects may only be used with -** [sqlite3_result_value()] and [sqlite3_bind_value()]. -** The [sqlite3_value_blob | sqlite3_value_type()] family of -** interfaces require protected sqlite3_value objects. -*/ -typedef struct Mem sqlite3_value; - -/* -** CAPI3REF: SQL Function Context Object -** -** The context in which an SQL function executes is stored in an -** sqlite3_context object. ^A pointer to an sqlite3_context object -** is always first parameter to [application-defined SQL functions]. -** The application-defined SQL function implementation will pass this -** pointer through into calls to [sqlite3_result_int | sqlite3_result()], -** [sqlite3_aggregate_context()], [sqlite3_user_data()], -** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()], -** and/or [sqlite3_set_auxdata()]. -*/ -typedef struct sqlite3_context sqlite3_context; - -/* -** CAPI3REF: Binding Values To Prepared Statements -** KEYWORDS: {host parameter} {host parameters} {host parameter name} -** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding} -** -** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants, -** literals may be replaced by a [parameter] that matches one of following -** templates: -** -**
    -**
  • ? -**
  • ?NNN -**
  • :VVV -**
  • @VVV -**
  • $VVV -**
-** -** In the templates above, NNN represents an integer literal, -** and VVV represents an alphanumeric identifier.)^ ^The values of these -** parameters (also called "host parameter names" or "SQL parameters") -** can be set using the sqlite3_bind_*() routines defined here. -** -** ^The first argument to the sqlite3_bind_*() routines is always -** a pointer to the [sqlite3_stmt] object returned from -** [sqlite3_prepare_v2()] or its variants. -** -** ^The second argument is the index of the SQL parameter to be set. -** ^The leftmost SQL parameter has an index of 1. ^When the same named -** SQL parameter is used more than once, second and subsequent -** occurrences have the same index as the first occurrence. -** ^The index for named parameters can be looked up using the -** [sqlite3_bind_parameter_index()] API if desired. ^The index -** for "?NNN" parameters is the value of NNN. -** ^The NNN value must be between 1 and the [sqlite3_limit()] -** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999). -** -** ^The third argument is the value to bind to the parameter. -** -** ^(In those routines that have a fourth argument, its value is the -** number of bytes in the parameter. To be clear: the value is the -** number of bytes in the value, not the number of characters.)^ -** ^If the fourth parameter is negative, the length of the string is -** the number of bytes up to the first zero terminator. -** -** ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and -** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or -** string after SQLite has finished with it. ^The destructor is called -** to dispose of the BLOB or string even if the call to sqlite3_bind_blob(), -** sqlite3_bind_text(), or sqlite3_bind_text16() fails. -** ^If the fifth argument is -** the special value [SQLITE_STATIC], then SQLite assumes that the -** information is in static, unmanaged space and does not need to be freed. -** ^If the fifth argument has the value [SQLITE_TRANSIENT], then -** SQLite makes its own private copy of the data immediately, before -** the sqlite3_bind_*() routine returns. -** -** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that -** is filled with zeroes. ^A zeroblob uses a fixed amount of memory -** (just an integer to hold its size) while it is being processed. -** Zeroblobs are intended to serve as placeholders for BLOBs whose -** content is later written using -** [sqlite3_blob_open | incremental BLOB I/O] routines. -** ^A negative value for the zeroblob results in a zero-length BLOB. -** -** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer -** for the [prepared statement] or with a prepared statement for which -** [sqlite3_step()] has been called more recently than [sqlite3_reset()], -** then the call will return [SQLITE_MISUSE]. If any sqlite3_bind_() -** routine is passed a [prepared statement] that has been finalized, the -** result is undefined and probably harmful. -** -** ^Bindings are not cleared by the [sqlite3_reset()] routine. -** ^Unbound parameters are interpreted as NULL. -** -** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an -** [error code] if anything goes wrong. -** ^[SQLITE_RANGE] is returned if the parameter -** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. -** -** See also: [sqlite3_bind_parameter_count()], -** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); -SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double); -SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int); -SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); -SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int); -SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*)); -SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); -SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); -SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); - -/* -** CAPI3REF: Number Of SQL Parameters -** -** ^This routine can be used to find the number of [SQL parameters] -** in a [prepared statement]. SQL parameters are tokens of the -** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as -** placeholders for values that are [sqlite3_bind_blob | bound] -** to the parameters at a later time. -** -** ^(This routine actually returns the index of the largest (rightmost) -** parameter. For all forms except ?NNN, this will correspond to the -** number of unique parameters. If parameters of the ?NNN form are used, -** there may be gaps in the list.)^ -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_name()], and -** [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); - -/* -** CAPI3REF: Name Of A Host Parameter -** -** ^The sqlite3_bind_parameter_name(P,N) interface returns -** the name of the N-th [SQL parameter] in the [prepared statement] P. -** ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA" -** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA" -** respectively. -** In other words, the initial ":" or "$" or "@" or "?" -** is included as part of the name.)^ -** ^Parameters of the form "?" without a following integer have no name -** and are referred to as "nameless" or "anonymous parameters". -** -** ^The first host parameter has an index of 1, not 0. -** -** ^If the value N is out of range or if the N-th parameter is -** nameless, then NULL is returned. ^The returned string is -** always in UTF-8 encoding even if the named parameter was -** originally specified as UTF-16 in [sqlite3_prepare16()] or -** [sqlite3_prepare16_v2()]. -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_count()], and -** [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int); - -/* -** CAPI3REF: Index Of A Parameter With A Given Name -** -** ^Return the index of an SQL parameter given its name. ^The -** index value returned is suitable for use as the second -** parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero -** is returned if no matching parameter is found. ^The parameter -** name must be given in UTF-8 even if the original statement -** was prepared from UTF-16 text using [sqlite3_prepare16_v2()]. -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_count()], and -** [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); - -/* -** CAPI3REF: Reset All Bindings On A Prepared Statement -** -** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset -** the [sqlite3_bind_blob | bindings] on a [prepared statement]. -** ^Use this routine to reset all host parameters to NULL. -*/ -SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); - -/* -** CAPI3REF: Number Of Columns In A Result Set -** -** ^Return the number of columns in the result set returned by the -** [prepared statement]. ^This routine returns 0 if pStmt is an SQL -** statement that does not return data (for example an [UPDATE]). -** -** See also: [sqlite3_data_count()] -*/ -SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Column Names In A Result Set -** -** ^These routines return the name assigned to a particular column -** in the result set of a [SELECT] statement. ^The sqlite3_column_name() -** interface returns a pointer to a zero-terminated UTF-8 string -** and sqlite3_column_name16() returns a pointer to a zero-terminated -** UTF-16 string. ^The first parameter is the [prepared statement] -** that implements the [SELECT] statement. ^The second parameter is the -** column number. ^The leftmost column is number 0. -** -** ^The returned string pointer is valid until either the [prepared statement] -** is destroyed by [sqlite3_finalize()] or until the statement is automatically -** reprepared by the first call to [sqlite3_step()] for a particular run -** or until the next call to -** sqlite3_column_name() or sqlite3_column_name16() on the same column. -** -** ^If sqlite3_malloc() fails during the processing of either routine -** (for example during a conversion from UTF-8 to UTF-16) then a -** NULL pointer is returned. -** -** ^The name of a result column is the value of the "AS" clause for -** that column, if there is an AS clause. If there is no AS clause -** then the name of the column is unspecified and may change from -** one release of SQLite to the next. -*/ -SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N); -SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N); - -/* -** CAPI3REF: Source Of Data In A Query Result -** -** ^These routines provide a means to determine the database, table, and -** table column that is the origin of a particular result column in -** [SELECT] statement. -** ^The name of the database or table or column can be returned as -** either a UTF-8 or UTF-16 string. ^The _database_ routines return -** the database name, the _table_ routines return the table name, and -** the origin_ routines return the column name. -** ^The returned string is valid until the [prepared statement] is destroyed -** using [sqlite3_finalize()] or until the statement is automatically -** reprepared by the first call to [sqlite3_step()] for a particular run -** or until the same information is requested -** again in a different encoding. -** -** ^The names returned are the original un-aliased names of the -** database, table, and column. -** -** ^The first argument to these interfaces is a [prepared statement]. -** ^These functions return information about the Nth result column returned by -** the statement, where N is the second function argument. -** ^The left-most column is column 0 for these routines. -** -** ^If the Nth column returned by the statement is an expression or -** subquery and is not a column value, then all of these functions return -** NULL. ^These routine might also return NULL if a memory allocation error -** occurs. ^Otherwise, they return the name of the attached database, table, -** or column that query result column was extracted from. -** -** ^As with all other SQLite APIs, those whose names end with "16" return -** UTF-16 encoded strings and the other functions return UTF-8. -** -** ^These APIs are only available if the library was compiled with the -** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol. -** -** If two or more threads call one or more of these routines against the same -** prepared statement and column at the same time then the results are -** undefined. -** -** If two or more threads call one or more -** [sqlite3_column_database_name | column metadata interfaces] -** for the same [prepared statement] and result column -** at the same time then the results are undefined. -*/ -SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int); -SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int); -SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int); - -/* -** CAPI3REF: Declared Datatype Of A Query Result -** -** ^(The first parameter is a [prepared statement]. -** If this statement is a [SELECT] statement and the Nth column of the -** returned result set of that [SELECT] is a table column (not an -** expression or subquery) then the declared type of the table -** column is returned.)^ ^If the Nth column of the result set is an -** expression or subquery, then a NULL pointer is returned. -** ^The returned string is always UTF-8 encoded. -** -** ^(For example, given the database schema: -** -** CREATE TABLE t1(c1 VARIANT); -** -** and the following statement to be compiled: -** -** SELECT c1 + 1, c1 FROM t1; -** -** this routine would return the string "VARIANT" for the second result -** column (i==1), and a NULL pointer for the first result column (i==0).)^ -** -** ^SQLite uses dynamic run-time typing. ^So just because a column -** is declared to contain a particular type does not mean that the -** data stored in that column is of the declared type. SQLite is -** strongly typed, but the typing is dynamic not static. ^Type -** is associated with individual values, not with the containers -** used to hold those values. -*/ -SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); - -/* -** CAPI3REF: Evaluate An SQL Statement -** -** After a [prepared statement] has been prepared using either -** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy -** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function -** must be called one or more times to evaluate the statement. -** -** The details of the behavior of the sqlite3_step() interface depend -** on whether the statement was prepared using the newer "v2" interface -** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy -** interface [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the -** new "v2" interface is recommended for new applications but the legacy -** interface will continue to be supported. -** -** ^In the legacy interface, the return value will be either [SQLITE_BUSY], -** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE]. -** ^With the "v2" interface, any of the other [result codes] or -** [extended result codes] might be returned as well. -** -** ^[SQLITE_BUSY] means that the database engine was unable to acquire the -** database locks it needs to do its job. ^If the statement is a [COMMIT] -** or occurs outside of an explicit transaction, then you can retry the -** statement. If the statement is not a [COMMIT] and occurs within an -** explicit transaction then you should rollback the transaction before -** continuing. -** -** ^[SQLITE_DONE] means that the statement has finished executing -** successfully. sqlite3_step() should not be called again on this virtual -** machine without first calling [sqlite3_reset()] to reset the virtual -** machine back to its initial state. -** -** ^If the SQL statement being executed returns any data, then [SQLITE_ROW] -** is returned each time a new row of data is ready for processing by the -** caller. The values may be accessed using the [column access functions]. -** sqlite3_step() is called again to retrieve the next row of data. -** -** ^[SQLITE_ERROR] means that a run-time error (such as a constraint -** violation) has occurred. sqlite3_step() should not be called again on -** the VM. More information may be found by calling [sqlite3_errmsg()]. -** ^With the legacy interface, a more specific error code (for example, -** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth) -** can be obtained by calling [sqlite3_reset()] on the -** [prepared statement]. ^In the "v2" interface, -** the more specific error code is returned directly by sqlite3_step(). -** -** [SQLITE_MISUSE] means that the this routine was called inappropriately. -** Perhaps it was called on a [prepared statement] that has -** already been [sqlite3_finalize | finalized] or on one that had -** previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could -** be the case that the same database connection is being used by two or -** more threads at the same moment in time. -** -** For all versions of SQLite up to and including 3.6.23.1, a call to -** [sqlite3_reset()] was required after sqlite3_step() returned anything -** other than [SQLITE_ROW] before any subsequent invocation of -** sqlite3_step(). Failure to reset the prepared statement using -** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from -** sqlite3_step(). But after version 3.6.23.1, sqlite3_step() began -** calling [sqlite3_reset()] automatically in this circumstance rather -** than returning [SQLITE_MISUSE]. This is not considered a compatibility -** break because any application that ever receives an SQLITE_MISUSE error -** is broken by definition. The [SQLITE_OMIT_AUTORESET] compile-time option -** can be used to restore the legacy behavior. -** -** Goofy Interface Alert: In the legacy interface, the sqlite3_step() -** API always returns a generic error code, [SQLITE_ERROR], following any -** error other than [SQLITE_BUSY] and [SQLITE_MISUSE]. You must call -** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the -** specific [error codes] that better describes the error. -** We admit that this is a goofy design. The problem has been fixed -** with the "v2" interface. If you prepare all of your SQL statements -** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead -** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, -** then the more specific [error codes] are returned directly -** by sqlite3_step(). The use of the "v2" interface is recommended. -*/ -SQLITE_API int sqlite3_step(sqlite3_stmt*); - -/* -** CAPI3REF: Number of columns in a result set -** -** ^The sqlite3_data_count(P) interface returns the number of columns in the -** current row of the result set of [prepared statement] P. -** ^If prepared statement P does not have results ready to return -** (via calls to the [sqlite3_column_int | sqlite3_column_*()] of -** interfaces) then sqlite3_data_count(P) returns 0. -** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer. -** -** See also: [sqlite3_column_count()] -*/ -SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Fundamental Datatypes -** KEYWORDS: SQLITE_TEXT -** -** ^(Every value in SQLite has one of five fundamental datatypes: -** -**
    -**
  • 64-bit signed integer -**
  • 64-bit IEEE floating point number -**
  • string -**
  • BLOB -**
  • NULL -**
)^ -** -** These constants are codes for each of those types. -** -** Note that the SQLITE_TEXT constant was also used in SQLite version 2 -** for a completely different meaning. Software that links against both -** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not -** SQLITE_TEXT. -*/ -#define SQLITE_INTEGER 1 -#define SQLITE_FLOAT 2 -#define SQLITE_BLOB 4 -#define SQLITE_NULL 5 -#ifdef SQLITE_TEXT -# undef SQLITE_TEXT -#else -# define SQLITE_TEXT 3 -#endif -#define SQLITE3_TEXT 3 - -/* -** CAPI3REF: Result Values From A Query -** KEYWORDS: {column access functions} -** -** These routines form the "result set" interface. -** -** ^These routines return information about a single column of the current -** result row of a query. ^In every case the first argument is a pointer -** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*] -** that was returned from [sqlite3_prepare_v2()] or one of its variants) -** and the second argument is the index of the column for which information -** should be returned. ^The leftmost column of the result set has the index 0. -** ^The number of columns in the result can be determined using -** [sqlite3_column_count()]. -** -** If the SQL statement does not currently point to a valid row, or if the -** column index is out of range, the result is undefined. -** These routines may only be called when the most recent call to -** [sqlite3_step()] has returned [SQLITE_ROW] and neither -** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently. -** If any of these routines are called after [sqlite3_reset()] or -** [sqlite3_finalize()] or after [sqlite3_step()] has returned -** something other than [SQLITE_ROW], the results are undefined. -** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()] -** are called from a different thread while any of these routines -** are pending, then the results are undefined. -** -** ^The sqlite3_column_type() routine returns the -** [SQLITE_INTEGER | datatype code] for the initial data type -** of the result column. ^The returned value is one of [SQLITE_INTEGER], -** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. The value -** returned by sqlite3_column_type() is only meaningful if no type -** conversions have occurred as described below. After a type conversion, -** the value returned by sqlite3_column_type() is undefined. Future -** versions of SQLite may change the behavior of sqlite3_column_type() -** following a type conversion. -** -** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes() -** routine returns the number of bytes in that BLOB or string. -** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts -** the string to UTF-8 and then returns the number of bytes. -** ^If the result is a numeric value then sqlite3_column_bytes() uses -** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns -** the number of bytes in that string. -** ^If the result is NULL, then sqlite3_column_bytes() returns zero. -** -** ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16() -** routine returns the number of bytes in that BLOB or string. -** ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts -** the string to UTF-16 and then returns the number of bytes. -** ^If the result is a numeric value then sqlite3_column_bytes16() uses -** [sqlite3_snprintf()] to convert that value to a UTF-16 string and returns -** the number of bytes in that string. -** ^If the result is NULL, then sqlite3_column_bytes16() returns zero. -** -** ^The values returned by [sqlite3_column_bytes()] and -** [sqlite3_column_bytes16()] do not include the zero terminators at the end -** of the string. ^For clarity: the values returned by -** [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of -** bytes in the string, not the number of characters. -** -** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(), -** even empty strings, are always zero terminated. ^The return -** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer. -** -** ^The object returned by [sqlite3_column_value()] is an -** [unprotected sqlite3_value] object. An unprotected sqlite3_value object -** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()]. -** If the [unprotected sqlite3_value] object returned by -** [sqlite3_column_value()] is used in any other way, including calls -** to routines like [sqlite3_value_int()], [sqlite3_value_text()], -** or [sqlite3_value_bytes()], then the behavior is undefined. -** -** These routines attempt to convert the value where appropriate. ^For -** example, if the internal representation is FLOAT and a text result -** is requested, [sqlite3_snprintf()] is used internally to perform the -** conversion automatically. ^(The following table details the conversions -** that are applied: -** -**
-** -**
Internal
Type
Requested
Type
Conversion -** -**
NULL INTEGER Result is 0 -**
NULL FLOAT Result is 0.0 -**
NULL TEXT Result is NULL pointer -**
NULL BLOB Result is NULL pointer -**
INTEGER FLOAT Convert from integer to float -**
INTEGER TEXT ASCII rendering of the integer -**
INTEGER BLOB Same as INTEGER->TEXT -**
FLOAT INTEGER Convert from float to integer -**
FLOAT TEXT ASCII rendering of the float -**
FLOAT BLOB Same as FLOAT->TEXT -**
TEXT INTEGER Use atoi() -**
TEXT FLOAT Use atof() -**
TEXT BLOB No change -**
BLOB INTEGER Convert to TEXT then use atoi() -**
BLOB FLOAT Convert to TEXT then use atof() -**
BLOB TEXT Add a zero terminator if needed -**
-**
)^ -** -** The table above makes reference to standard C library functions atoi() -** and atof(). SQLite does not really use these functions. It has its -** own equivalent internal routines. The atoi() and atof() names are -** used in the table for brevity and because they are familiar to most -** C programmers. -** -** Note that when type conversions occur, pointers returned by prior -** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or -** sqlite3_column_text16() may be invalidated. -** Type conversions and pointer invalidations might occur -** in the following cases: -** -**
    -**
  • The initial content is a BLOB and sqlite3_column_text() or -** sqlite3_column_text16() is called. A zero-terminator might -** need to be added to the string.
  • -**
  • The initial content is UTF-8 text and sqlite3_column_bytes16() or -** sqlite3_column_text16() is called. The content must be converted -** to UTF-16.
  • -**
  • The initial content is UTF-16 text and sqlite3_column_bytes() or -** sqlite3_column_text() is called. The content must be converted -** to UTF-8.
  • -**
-** -** ^Conversions between UTF-16be and UTF-16le are always done in place and do -** not invalidate a prior pointer, though of course the content of the buffer -** that the prior pointer references will have been modified. Other kinds -** of conversion are done in place when it is possible, but sometimes they -** are not possible and in those cases prior pointers are invalidated. -** -** The safest and easiest to remember policy is to invoke these routines -** in one of the following ways: -** -**
    -**
  • sqlite3_column_text() followed by sqlite3_column_bytes()
  • -**
  • sqlite3_column_blob() followed by sqlite3_column_bytes()
  • -**
  • sqlite3_column_text16() followed by sqlite3_column_bytes16()
  • -**
-** -** In other words, you should call sqlite3_column_text(), -** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result -** into the desired format, then invoke sqlite3_column_bytes() or -** sqlite3_column_bytes16() to find the size of the result. Do not mix calls -** to sqlite3_column_text() or sqlite3_column_blob() with calls to -** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() -** with calls to sqlite3_column_bytes(). -** -** ^The pointers returned are valid until a type conversion occurs as -** described above, or until [sqlite3_step()] or [sqlite3_reset()] or -** [sqlite3_finalize()] is called. ^The memory space used to hold strings -** and BLOBs is freed automatically. Do not pass the pointers returned -** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into -** [sqlite3_free()]. -** -** ^(If a memory allocation error occurs during the evaluation of any -** of these routines, a default value is returned. The default value -** is either the integer 0, the floating point number 0.0, or a NULL -** pointer. Subsequent calls to [sqlite3_errcode()] will return -** [SQLITE_NOMEM].)^ -*/ -SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol); -SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol); -SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol); -SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); - -/* -** CAPI3REF: Destroy A Prepared Statement Object -** -** ^The sqlite3_finalize() function is called to delete a [prepared statement]. -** ^If the most recent evaluation of the statement encountered no errors -** or if the statement is never been evaluated, then sqlite3_finalize() returns -** SQLITE_OK. ^If the most recent evaluation of statement S failed, then -** sqlite3_finalize(S) returns the appropriate [error code] or -** [extended error code]. -** -** ^The sqlite3_finalize(S) routine can be called at any point during -** the life cycle of [prepared statement] S: -** before statement S is ever evaluated, after -** one or more calls to [sqlite3_reset()], or after any call -** to [sqlite3_step()] regardless of whether or not the statement has -** completed execution. -** -** ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op. -** -** The application must finalize every [prepared statement] in order to avoid -** resource leaks. It is a grievous error for the application to try to use -** a prepared statement after it has been finalized. Any use of a prepared -** statement after it has been finalized can result in undefined and -** undesirable behavior such as segfaults and heap corruption. -*/ -SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Reset A Prepared Statement Object -** -** The sqlite3_reset() function is called to reset a [prepared statement] -** object back to its initial state, ready to be re-executed. -** ^Any SQL statement variables that had values bound to them using -** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values. -** Use [sqlite3_clear_bindings()] to reset the bindings. -** -** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S -** back to the beginning of its program. -** -** ^If the most recent call to [sqlite3_step(S)] for the -** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE], -** or if [sqlite3_step(S)] has never before been called on S, -** then [sqlite3_reset(S)] returns [SQLITE_OK]. -** -** ^If the most recent call to [sqlite3_step(S)] for the -** [prepared statement] S indicated an error, then -** [sqlite3_reset(S)] returns an appropriate [error code]. -** -** ^The [sqlite3_reset(S)] interface does not change the values -** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. -*/ -SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Create Or Redefine SQL Functions -** KEYWORDS: {function creation routines} -** KEYWORDS: {application-defined SQL function} -** KEYWORDS: {application-defined SQL functions} -** -** ^These functions (collectively known as "function creation routines") -** are used to add SQL functions or aggregates or to redefine the behavior -** of existing SQL functions or aggregates. The only differences between -** these routines are the text encoding expected for -** the second parameter (the name of the function being created) -** and the presence or absence of a destructor callback for -** the application data pointer. -** -** ^The first parameter is the [database connection] to which the SQL -** function is to be added. ^If an application uses more than one database -** connection then application-defined SQL functions must be added -** to each database connection separately. -** -** ^The second parameter is the name of the SQL function to be created or -** redefined. ^The length of the name is limited to 255 bytes in a UTF-8 -** representation, exclusive of the zero-terminator. ^Note that the name -** length limit is in UTF-8 bytes, not characters nor UTF-16 bytes. -** ^Any attempt to create a function with a longer name -** will result in [SQLITE_MISUSE] being returned. -** -** ^The third parameter (nArg) -** is the number of arguments that the SQL function or -** aggregate takes. ^If this parameter is -1, then the SQL function or -** aggregate may take any number of arguments between 0 and the limit -** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]). If the third -** parameter is less than -1 or greater than 127 then the behavior is -** undefined. -** -** ^The fourth parameter, eTextRep, specifies what -** [SQLITE_UTF8 | text encoding] this SQL function prefers for -** its parameters. Every SQL function implementation must be able to work -** with UTF-8, UTF-16le, or UTF-16be. But some implementations may be -** more efficient with one encoding than another. ^An application may -** invoke sqlite3_create_function() or sqlite3_create_function16() multiple -** times with the same function but with different values of eTextRep. -** ^When multiple implementations of the same function are available, SQLite -** will pick the one that involves the least amount of data conversion. -** If there is only a single implementation which does not care what text -** encoding is used, then the fourth argument should be [SQLITE_ANY]. -** -** ^(The fifth parameter is an arbitrary pointer. The implementation of the -** function can gain access to this pointer using [sqlite3_user_data()].)^ -** -** ^The sixth, seventh and eighth parameters, xFunc, xStep and xFinal, are -** pointers to C-language functions that implement the SQL function or -** aggregate. ^A scalar SQL function requires an implementation of the xFunc -** callback only; NULL pointers must be passed as the xStep and xFinal -** parameters. ^An aggregate SQL function requires an implementation of xStep -** and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing -** SQL function or aggregate, pass NULL pointers for all three function -** callbacks. -** -** ^(If the ninth parameter to sqlite3_create_function_v2() is not NULL, -** then it is destructor for the application data pointer. -** The destructor is invoked when the function is deleted, either by being -** overloaded or when the database connection closes.)^ -** ^The destructor is also invoked if the call to -** sqlite3_create_function_v2() fails. -** ^When the destructor callback of the tenth parameter is invoked, it -** is passed a single argument which is a copy of the application data -** pointer which was the fifth parameter to sqlite3_create_function_v2(). -** -** ^It is permitted to register multiple implementations of the same -** functions with the same name but with either differing numbers of -** arguments or differing preferred text encodings. ^SQLite will use -** the implementation that most closely matches the way in which the -** SQL function is used. ^A function implementation with a non-negative -** nArg parameter is a better match than a function implementation with -** a negative nArg. ^A function where the preferred text encoding -** matches the database encoding is a better -** match than a function where the encoding is different. -** ^A function where the encoding difference is between UTF16le and UTF16be -** is a closer match than a function where the encoding difference is -** between UTF8 and UTF16. -** -** ^Built-in functions may be overloaded by new application-defined functions. -** -** ^An application-defined function is permitted to call other -** SQLite interfaces. However, such calls must not -** close the database connection nor finalize or reset the prepared -** statement in which the function is running. -*/ -SQLITE_API int sqlite3_create_function( - sqlite3 *db, - const char *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*) -); -SQLITE_API int sqlite3_create_function16( - sqlite3 *db, - const void *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*) -); -SQLITE_API int sqlite3_create_function_v2( - sqlite3 *db, - const char *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*), - void(*xDestroy)(void*) -); - -/* -** CAPI3REF: Text Encodings -** -** These constant define integer codes that represent the various -** text encodings supported by SQLite. -*/ -#define SQLITE_UTF8 1 -#define SQLITE_UTF16LE 2 -#define SQLITE_UTF16BE 3 -#define SQLITE_UTF16 4 /* Use native byte order */ -#define SQLITE_ANY 5 /* sqlite3_create_function only */ -#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */ - -/* -** CAPI3REF: Deprecated Functions -** DEPRECATED -** -** These functions are [deprecated]. In order to maintain -** backwards compatibility with older code, these functions continue -** to be supported. However, new applications should avoid -** the use of these functions. To help encourage people to avoid -** using these functions, we are not going to tell you what they do. -*/ -#ifndef SQLITE_OMIT_DEPRECATED -SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void); -SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); -SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64); -#endif - -/* -** CAPI3REF: Obtaining SQL Function Parameter Values -** -** The C-language implementation of SQL functions and aggregates uses -** this set of interface routines to access the parameter values on -** the function or aggregate. -** -** The xFunc (for scalar functions) or xStep (for aggregates) parameters -** to [sqlite3_create_function()] and [sqlite3_create_function16()] -** define callbacks that implement the SQL functions and aggregates. -** The 3rd parameter to these callbacks is an array of pointers to -** [protected sqlite3_value] objects. There is one [sqlite3_value] object for -** each parameter to the SQL function. These routines are used to -** extract values from the [sqlite3_value] objects. -** -** These routines work only with [protected sqlite3_value] objects. -** Any attempt to use these routines on an [unprotected sqlite3_value] -** object results in undefined behavior. -** -** ^These routines work just like the corresponding [column access functions] -** except that these routines take a single [protected sqlite3_value] object -** pointer instead of a [sqlite3_stmt*] pointer and an integer column number. -** -** ^The sqlite3_value_text16() interface extracts a UTF-16 string -** in the native byte-order of the host machine. ^The -** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces -** extract UTF-16 strings as big-endian and little-endian respectively. -** -** ^(The sqlite3_value_numeric_type() interface attempts to apply -** numeric affinity to the value. This means that an attempt is -** made to convert the value to an integer or floating point. If -** such a conversion is possible without loss of information (in other -** words, if the value is a string that looks like a number) -** then the conversion is performed. Otherwise no conversion occurs. -** The [SQLITE_INTEGER | datatype] after conversion is returned.)^ -** -** Please pay particular attention to the fact that the pointer returned -** from [sqlite3_value_blob()], [sqlite3_value_text()], or -** [sqlite3_value_text16()] can be invalidated by a subsequent call to -** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()], -** or [sqlite3_value_text16()]. -** -** These routines must be called from the same thread as -** the SQL function that supplied the [sqlite3_value*] parameters. -*/ -SQLITE_API const void *sqlite3_value_blob(sqlite3_value*); -SQLITE_API int sqlite3_value_bytes(sqlite3_value*); -SQLITE_API int sqlite3_value_bytes16(sqlite3_value*); -SQLITE_API double sqlite3_value_double(sqlite3_value*); -SQLITE_API int sqlite3_value_int(sqlite3_value*); -SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*); -SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*); -SQLITE_API int sqlite3_value_type(sqlite3_value*); -SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); - -/* -** CAPI3REF: Obtain Aggregate Function Context -** -** Implementations of aggregate SQL functions use this -** routine to allocate memory for storing their state. -** -** ^The first time the sqlite3_aggregate_context(C,N) routine is called -** for a particular aggregate function, SQLite -** allocates N of memory, zeroes out that memory, and returns a pointer -** to the new memory. ^On second and subsequent calls to -** sqlite3_aggregate_context() for the same aggregate function instance, -** the same buffer is returned. Sqlite3_aggregate_context() is normally -** called once for each invocation of the xStep callback and then one -** last time when the xFinal callback is invoked. ^(When no rows match -** an aggregate query, the xStep() callback of the aggregate function -** implementation is never called and xFinal() is called exactly once. -** In those cases, sqlite3_aggregate_context() might be called for the -** first time from within xFinal().)^ -** -** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer if N is -** less than or equal to zero or if a memory allocate error occurs. -** -** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is -** determined by the N parameter on first successful call. Changing the -** value of N in subsequent call to sqlite3_aggregate_context() within -** the same aggregate function instance will not resize the memory -** allocation.)^ -** -** ^SQLite automatically frees the memory allocated by -** sqlite3_aggregate_context() when the aggregate query concludes. -** -** The first parameter must be a copy of the -** [sqlite3_context | SQL function context] that is the first parameter -** to the xStep or xFinal callback routine that implements the aggregate -** function. -** -** This routine must be called from the same thread in which -** the aggregate SQL function is running. -*/ -SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); - -/* -** CAPI3REF: User Data For Functions -** -** ^The sqlite3_user_data() interface returns a copy of -** the pointer that was the pUserData parameter (the 5th parameter) -** of the [sqlite3_create_function()] -** and [sqlite3_create_function16()] routines that originally -** registered the application defined function. -** -** This routine must be called from the same thread in which -** the application-defined function is running. -*/ -SQLITE_API void *sqlite3_user_data(sqlite3_context*); - -/* -** CAPI3REF: Database Connection For Functions -** -** ^The sqlite3_context_db_handle() interface returns a copy of -** the pointer to the [database connection] (the 1st parameter) -** of the [sqlite3_create_function()] -** and [sqlite3_create_function16()] routines that originally -** registered the application defined function. -*/ -SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); - -/* -** CAPI3REF: Function Auxiliary Data -** -** The following two functions may be used by scalar SQL functions to -** associate metadata with argument values. If the same value is passed to -** multiple invocations of the same SQL function during query execution, under -** some circumstances the associated metadata may be preserved. This may -** be used, for example, to add a regular-expression matching scalar -** function. The compiled version of the regular expression is stored as -** metadata associated with the SQL value passed as the regular expression -** pattern. The compiled regular expression can be reused on multiple -** invocations of the same function so that the original pattern string -** does not need to be recompiled on each invocation. -** -** ^The sqlite3_get_auxdata() interface returns a pointer to the metadata -** associated by the sqlite3_set_auxdata() function with the Nth argument -** value to the application-defined function. ^If no metadata has been ever -** been set for the Nth argument of the function, or if the corresponding -** function parameter has changed since the meta-data was set, -** then sqlite3_get_auxdata() returns a NULL pointer. -** -** ^The sqlite3_set_auxdata() interface saves the metadata -** pointed to by its 3rd parameter as the metadata for the N-th -** argument of the application-defined function. Subsequent -** calls to sqlite3_get_auxdata() might return this data, if it has -** not been destroyed. -** ^If it is not NULL, SQLite will invoke the destructor -** function given by the 4th parameter to sqlite3_set_auxdata() on -** the metadata when the corresponding function parameter changes -** or when the SQL statement completes, whichever comes first. -** -** SQLite is free to call the destructor and drop metadata on any -** parameter of any function at any time. ^The only guarantee is that -** the destructor will be called before the metadata is dropped. -** -** ^(In practice, metadata is preserved between function calls for -** expressions that are constant at compile time. This includes literal -** values and [parameters].)^ -** -** These routines must be called from the same thread in which -** the SQL function is running. -*/ -SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N); -SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); - - -/* -** CAPI3REF: Constants Defining Special Destructor Behavior -** -** These are special values for the destructor that is passed in as the -** final argument to routines like [sqlite3_result_blob()]. ^If the destructor -** argument is SQLITE_STATIC, it means that the content pointer is constant -** and will never change. It does not need to be destroyed. ^The -** SQLITE_TRANSIENT value means that the content will likely change in -** the near future and that SQLite should make its own private copy of -** the content before returning. -** -** The typedef is necessary to work around problems in certain -** C++ compilers. See ticket #2191. -*/ -typedef void (*sqlite3_destructor_type)(void*); -#define SQLITE_STATIC ((sqlite3_destructor_type)0) -#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) - -/* -** CAPI3REF: Setting The Result Of An SQL Function -** -** These routines are used by the xFunc or xFinal callbacks that -** implement SQL functions and aggregates. See -** [sqlite3_create_function()] and [sqlite3_create_function16()] -** for additional information. -** -** These functions work very much like the [parameter binding] family of -** functions used to bind values to host parameters in prepared statements. -** Refer to the [SQL parameter] documentation for additional information. -** -** ^The sqlite3_result_blob() interface sets the result from -** an application-defined function to be the BLOB whose content is pointed -** to by the second parameter and which is N bytes long where N is the -** third parameter. -** -** ^The sqlite3_result_zeroblob() interfaces set the result of -** the application-defined function to be a BLOB containing all zero -** bytes and N bytes in size, where N is the value of the 2nd parameter. -** -** ^The sqlite3_result_double() interface sets the result from -** an application-defined function to be a floating point value specified -** by its 2nd argument. -** -** ^The sqlite3_result_error() and sqlite3_result_error16() functions -** cause the implemented SQL function to throw an exception. -** ^SQLite uses the string pointed to by the -** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16() -** as the text of an error message. ^SQLite interprets the error -** message string from sqlite3_result_error() as UTF-8. ^SQLite -** interprets the string from sqlite3_result_error16() as UTF-16 in native -** byte order. ^If the third parameter to sqlite3_result_error() -** or sqlite3_result_error16() is negative then SQLite takes as the error -** message all text up through the first zero character. -** ^If the third parameter to sqlite3_result_error() or -** sqlite3_result_error16() is non-negative then SQLite takes that many -** bytes (not characters) from the 2nd parameter as the error message. -** ^The sqlite3_result_error() and sqlite3_result_error16() -** routines make a private copy of the error message text before -** they return. Hence, the calling function can deallocate or -** modify the text after they return without harm. -** ^The sqlite3_result_error_code() function changes the error code -** returned by SQLite as a result of an error in a function. ^By default, -** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error() -** or sqlite3_result_error16() resets the error code to SQLITE_ERROR. -** -** ^The sqlite3_result_toobig() interface causes SQLite to throw an error -** indicating that a string or BLOB is too long to represent. -** -** ^The sqlite3_result_nomem() interface causes SQLite to throw an error -** indicating that a memory allocation failed. -** -** ^The sqlite3_result_int() interface sets the return value -** of the application-defined function to be the 32-bit signed integer -** value given in the 2nd argument. -** ^The sqlite3_result_int64() interface sets the return value -** of the application-defined function to be the 64-bit signed integer -** value given in the 2nd argument. -** -** ^The sqlite3_result_null() interface sets the return value -** of the application-defined function to be NULL. -** -** ^The sqlite3_result_text(), sqlite3_result_text16(), -** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces -** set the return value of the application-defined function to be -** a text string which is represented as UTF-8, UTF-16 native byte order, -** UTF-16 little endian, or UTF-16 big endian, respectively. -** ^SQLite takes the text result from the application from -** the 2nd parameter of the sqlite3_result_text* interfaces. -** ^If the 3rd parameter to the sqlite3_result_text* interfaces -** is negative, then SQLite takes result text from the 2nd parameter -** through the first zero character. -** ^If the 3rd parameter to the sqlite3_result_text* interfaces -** is non-negative, then as many bytes (not characters) of the text -** pointed to by the 2nd parameter are taken as the application-defined -** function result. -** ^If the 4th parameter to the sqlite3_result_text* interfaces -** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that -** function as the destructor on the text or BLOB result when it has -** finished using that result. -** ^If the 4th parameter to the sqlite3_result_text* interfaces or to -** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite -** assumes that the text or BLOB result is in constant space and does not -** copy the content of the parameter nor call a destructor on the content -** when it has finished using that result. -** ^If the 4th parameter to the sqlite3_result_text* interfaces -** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT -** then SQLite makes a copy of the result into space obtained from -** from [sqlite3_malloc()] before it returns. -** -** ^The sqlite3_result_value() interface sets the result of -** the application-defined function to be a copy the -** [unprotected sqlite3_value] object specified by the 2nd parameter. ^The -** sqlite3_result_value() interface makes a copy of the [sqlite3_value] -** so that the [sqlite3_value] specified in the parameter may change or -** be deallocated after sqlite3_result_value() returns without harm. -** ^A [protected sqlite3_value] object may always be used where an -** [unprotected sqlite3_value] object is required, so either -** kind of [sqlite3_value] object can be used with this interface. -** -** If these routines are called from within the different thread -** than the one containing the application-defined function that received -** the [sqlite3_context] pointer, the results are undefined. -*/ -SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_double(sqlite3_context*, double); -SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int); -SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int); -SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*); -SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*); -SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int); -SQLITE_API void sqlite3_result_int(sqlite3_context*, int); -SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); -SQLITE_API void sqlite3_result_null(sqlite3_context*); -SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*); -SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n); - -/* -** CAPI3REF: Define New Collating Sequences -** -** ^These functions add, remove, or modify a [collation] associated -** with the [database connection] specified as the first argument. -** -** ^The name of the collation is a UTF-8 string -** for sqlite3_create_collation() and sqlite3_create_collation_v2() -** and a UTF-16 string in native byte order for sqlite3_create_collation16(). -** ^Collation names that compare equal according to [sqlite3_strnicmp()] are -** considered to be the same name. -** -** ^(The third argument (eTextRep) must be one of the constants: -**
    -**
  • [SQLITE_UTF8], -**
  • [SQLITE_UTF16LE], -**
  • [SQLITE_UTF16BE], -**
  • [SQLITE_UTF16], or -**
  • [SQLITE_UTF16_ALIGNED]. -**
)^ -** ^The eTextRep argument determines the encoding of strings passed -** to the collating function callback, xCallback. -** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep -** force strings to be UTF16 with native byte order. -** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin -** on an even byte address. -** -** ^The fourth argument, pArg, is an application data pointer that is passed -** through as the first argument to the collating function callback. -** -** ^The fifth argument, xCallback, is a pointer to the collating function. -** ^Multiple collating functions can be registered using the same name but -** with different eTextRep parameters and SQLite will use whichever -** function requires the least amount of data transformation. -** ^If the xCallback argument is NULL then the collating function is -** deleted. ^When all collating functions having the same name are deleted, -** that collation is no longer usable. -** -** ^The collating function callback is invoked with a copy of the pArg -** application data pointer and with two strings in the encoding specified -** by the eTextRep argument. The collating function must return an -** integer that is negative, zero, or positive -** if the first string is less than, equal to, or greater than the second, -** respectively. A collating function must always return the same answer -** given the same inputs. If two or more collating functions are registered -** to the same collation name (using different eTextRep values) then all -** must give an equivalent answer when invoked with equivalent strings. -** The collating function must obey the following properties for all -** strings A, B, and C: -** -**
    -**
  1. If A==B then B==A. -**
  2. If A==B and B==C then A==C. -**
  3. If A<B THEN B>A. -**
  4. If A<B and B<C then A<C. -**
-** -** If a collating function fails any of the above constraints and that -** collating function is registered and used, then the behavior of SQLite -** is undefined. -** -** ^The sqlite3_create_collation_v2() works like sqlite3_create_collation() -** with the addition that the xDestroy callback is invoked on pArg when -** the collating function is deleted. -** ^Collating functions are deleted when they are overridden by later -** calls to the collation creation functions or when the -** [database connection] is closed using [sqlite3_close()]. -** -** ^The xDestroy callback is not called if the -** sqlite3_create_collation_v2() function fails. Applications that invoke -** sqlite3_create_collation_v2() with a non-NULL xDestroy argument should -** check the return code and dispose of the application data pointer -** themselves rather than expecting SQLite to deal with it for them. -** This is different from every other SQLite interface. The inconsistency -** is unfortunate but cannot be changed without breaking backwards -** compatibility. -** -** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. -*/ -SQLITE_API int sqlite3_create_collation( - sqlite3*, - const char *zName, - int eTextRep, - void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*) -); -SQLITE_API int sqlite3_create_collation_v2( - sqlite3*, - const char *zName, - int eTextRep, - void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*), - void(*xDestroy)(void*) -); -SQLITE_API int sqlite3_create_collation16( - sqlite3*, - const void *zName, - int eTextRep, - void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*) -); - -/* -** CAPI3REF: Collation Needed Callbacks -** -** ^To avoid having to register all collation sequences before a database -** can be used, a single callback function may be registered with the -** [database connection] to be invoked whenever an undefined collation -** sequence is required. -** -** ^If the function is registered using the sqlite3_collation_needed() API, -** then it is passed the names of undefined collation sequences as strings -** encoded in UTF-8. ^If sqlite3_collation_needed16() is used, -** the names are passed as UTF-16 in machine native byte order. -** ^A call to either function replaces the existing collation-needed callback. -** -** ^(When the callback is invoked, the first argument passed is a copy -** of the second argument to sqlite3_collation_needed() or -** sqlite3_collation_needed16(). The second argument is the database -** connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE], -** or [SQLITE_UTF16LE], indicating the most desirable form of the collation -** sequence function required. The fourth parameter is the name of the -** required collation sequence.)^ -** -** The callback function should register the desired collation using -** [sqlite3_create_collation()], [sqlite3_create_collation16()], or -** [sqlite3_create_collation_v2()]. -*/ -SQLITE_API int sqlite3_collation_needed( - sqlite3*, - void*, - void(*)(void*,sqlite3*,int eTextRep,const char*) -); -SQLITE_API int sqlite3_collation_needed16( - sqlite3*, - void*, - void(*)(void*,sqlite3*,int eTextRep,const void*) -); - -#ifdef SQLITE_HAS_CODEC -/* -** Specify the key for an encrypted database. This routine should be -** called right after sqlite3_open(). -** -** The code to implement this API is not available in the public release -** of SQLite. -*/ -SQLITE_API int sqlite3_key( - sqlite3 *db, /* Database to be rekeyed */ - const void *pKey, int nKey /* The key */ -); - -/* -** Change the key on an open database. If the current database is not -** encrypted, this routine will encrypt it. If pNew==0 or nNew==0, the -** database is decrypted. -** -** The code to implement this API is not available in the public release -** of SQLite. -*/ -SQLITE_API int sqlite3_rekey( - sqlite3 *db, /* Database to be rekeyed */ - const void *pKey, int nKey /* The new key */ -); - -/* -** Specify the activation key for a SEE database. Unless -** activated, none of the SEE routines will work. -*/ -SQLITE_API void sqlite3_activate_see( - const char *zPassPhrase /* Activation phrase */ -); -#endif - -#ifdef SQLITE_ENABLE_CEROD -/* -** Specify the activation key for a CEROD database. Unless -** activated, none of the CEROD routines will work. -*/ -SQLITE_API void sqlite3_activate_cerod( - const char *zPassPhrase /* Activation phrase */ -); -#endif - -/* -** CAPI3REF: Suspend Execution For A Short Time -** -** The sqlite3_sleep() function causes the current thread to suspend execution -** for at least a number of milliseconds specified in its parameter. -** -** If the operating system does not support sleep requests with -** millisecond time resolution, then the time will be rounded up to -** the nearest second. The number of milliseconds of sleep actually -** requested from the operating system is returned. -** -** ^SQLite implements this interface by calling the xSleep() -** method of the default [sqlite3_vfs] object. If the xSleep() method -** of the default VFS is not implemented correctly, or not implemented at -** all, then the behavior of sqlite3_sleep() may deviate from the description -** in the previous paragraphs. -*/ -SQLITE_API int sqlite3_sleep(int); - -/* -** CAPI3REF: Name Of The Folder Holding Temporary Files -** -** ^(If this global variable is made to point to a string which is -** the name of a folder (a.k.a. directory), then all temporary files -** created by SQLite when using a built-in [sqlite3_vfs | VFS] -** will be placed in that directory.)^ ^If this variable -** is a NULL pointer, then SQLite performs a search for an appropriate -** temporary file directory. -** -** It is not safe to read or modify this variable in more than one -** thread at a time. It is not safe to read or modify this variable -** if a [database connection] is being used at the same time in a separate -** thread. -** It is intended that this variable be set once -** as part of process initialization and before any SQLite interface -** routines have been called and that this variable remain unchanged -** thereafter. -** -** ^The [temp_store_directory pragma] may modify this variable and cause -** it to point to memory obtained from [sqlite3_malloc]. ^Furthermore, -** the [temp_store_directory pragma] always assumes that any string -** that this variable points to is held in memory obtained from -** [sqlite3_malloc] and the pragma may attempt to free that memory -** using [sqlite3_free]. -** Hence, if this variable is modified directly, either it should be -** made NULL or made to point to memory obtained from [sqlite3_malloc] -** or else the use of the [temp_store_directory pragma] should be avoided. -*/ -SQLITE_API char *sqlite3_temp_directory; - -/* -** CAPI3REF: Test For Auto-Commit Mode -** KEYWORDS: {autocommit mode} -** -** ^The sqlite3_get_autocommit() interface returns non-zero or -** zero if the given database connection is or is not in autocommit mode, -** respectively. ^Autocommit mode is on by default. -** ^Autocommit mode is disabled by a [BEGIN] statement. -** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK]. -** -** If certain kinds of errors occur on a statement within a multi-statement -** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR], -** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the -** transaction might be rolled back automatically. The only way to -** find out whether SQLite automatically rolled back the transaction after -** an error is to use this function. -** -** If another thread changes the autocommit status of the database -** connection while this routine is running, then the return value -** is undefined. -*/ -SQLITE_API int sqlite3_get_autocommit(sqlite3*); - -/* -** CAPI3REF: Find The Database Handle Of A Prepared Statement -** -** ^The sqlite3_db_handle interface returns the [database connection] handle -** to which a [prepared statement] belongs. ^The [database connection] -** returned by sqlite3_db_handle is the same [database connection] -** that was the first argument -** to the [sqlite3_prepare_v2()] call (or its variants) that was used to -** create the statement in the first place. -*/ -SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); - -/* -** CAPI3REF: Find the next prepared statement -** -** ^This interface returns a pointer to the next [prepared statement] after -** pStmt associated with the [database connection] pDb. ^If pStmt is NULL -** then this interface returns a pointer to the first prepared statement -** associated with the database connection pDb. ^If no prepared statement -** satisfies the conditions of this routine, it returns NULL. -** -** The [database connection] pointer D in a call to -** [sqlite3_next_stmt(D,S)] must refer to an open database -** connection and in particular must not be a NULL pointer. -*/ -SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Commit And Rollback Notification Callbacks -** -** ^The sqlite3_commit_hook() interface registers a callback -** function to be invoked whenever a transaction is [COMMIT | committed]. -** ^Any callback set by a previous call to sqlite3_commit_hook() -** for the same database connection is overridden. -** ^The sqlite3_rollback_hook() interface registers a callback -** function to be invoked whenever a transaction is [ROLLBACK | rolled back]. -** ^Any callback set by a previous call to sqlite3_rollback_hook() -** for the same database connection is overridden. -** ^The pArg argument is passed through to the callback. -** ^If the callback on a commit hook function returns non-zero, -** then the commit is converted into a rollback. -** -** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions -** return the P argument from the previous call of the same function -** on the same [database connection] D, or NULL for -** the first call for each function on D. -** -** The callback implementation must not do anything that will modify -** the database connection that invoked the callback. Any actions -** to modify the database connection must be deferred until after the -** completion of the [sqlite3_step()] call that triggered the commit -** or rollback hook in the first place. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** ^Registering a NULL function disables the callback. -** -** ^When the commit hook callback routine returns zero, the [COMMIT] -** operation is allowed to continue normally. ^If the commit hook -** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK]. -** ^The rollback hook is invoked on a rollback that results from a commit -** hook returning non-zero, just as it would be with any other rollback. -** -** ^For the purposes of this API, a transaction is said to have been -** rolled back if an explicit "ROLLBACK" statement is executed, or -** an error or constraint causes an implicit rollback to occur. -** ^The rollback callback is not invoked if a transaction is -** automatically rolled back because the database connection is closed. -** -** See also the [sqlite3_update_hook()] interface. -*/ -SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); -SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); - -/* -** CAPI3REF: Data Change Notification Callbacks -** -** ^The sqlite3_update_hook() interface registers a callback function -** with the [database connection] identified by the first argument -** to be invoked whenever a row is updated, inserted or deleted. -** ^Any callback set by a previous call to this function -** for the same database connection is overridden. -** -** ^The second argument is a pointer to the function to invoke when a -** row is updated, inserted or deleted. -** ^The first argument to the callback is a copy of the third argument -** to sqlite3_update_hook(). -** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE], -** or [SQLITE_UPDATE], depending on the operation that caused the callback -** to be invoked. -** ^The third and fourth arguments to the callback contain pointers to the -** database and table name containing the affected row. -** ^The final callback parameter is the [rowid] of the row. -** ^In the case of an update, this is the [rowid] after the update takes place. -** -** ^(The update hook is not invoked when internal system tables are -** modified (i.e. sqlite_master and sqlite_sequence).)^ -** -** ^In the current implementation, the update hook -** is not invoked when duplication rows are deleted because of an -** [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook -** invoked when rows are deleted using the [truncate optimization]. -** The exceptions defined in this paragraph might change in a future -** release of SQLite. -** -** The update hook implementation must not do anything that will modify -** the database connection that invoked the update hook. Any actions -** to modify the database connection must be deferred until after the -** completion of the [sqlite3_step()] call that triggered the update hook. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** ^The sqlite3_update_hook(D,C,P) function -** returns the P argument from the previous call -** on the same [database connection] D, or NULL for -** the first call on D. -** -** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()] -** interfaces. -*/ -SQLITE_API void *sqlite3_update_hook( - sqlite3*, - void(*)(void *,int ,char const *,char const *,sqlite3_int64), - void* -); - -/* -** CAPI3REF: Enable Or Disable Shared Pager Cache -** KEYWORDS: {shared cache} -** -** ^(This routine enables or disables the sharing of the database cache -** and schema data structures between [database connection | connections] -** to the same database. Sharing is enabled if the argument is true -** and disabled if the argument is false.)^ -** -** ^Cache sharing is enabled and disabled for an entire process. -** This is a change as of SQLite version 3.5.0. In prior versions of SQLite, -** sharing was enabled or disabled for each thread separately. -** -** ^(The cache sharing mode set by this interface effects all subsequent -** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()]. -** Existing database connections continue use the sharing mode -** that was in effect at the time they were opened.)^ -** -** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled -** successfully. An [error code] is returned otherwise.)^ -** -** ^Shared cache is disabled by default. But this might change in -** future releases of SQLite. Applications that care about shared -** cache setting should set it explicitly. -** -** See Also: [SQLite Shared-Cache Mode] -*/ -SQLITE_API int sqlite3_enable_shared_cache(int); - -/* -** CAPI3REF: Attempt To Free Heap Memory -** -** ^The sqlite3_release_memory() interface attempts to free N bytes -** of heap memory by deallocating non-essential memory allocations -** held by the database library. Memory used to cache database -** pages to improve performance is an example of non-essential memory. -** ^sqlite3_release_memory() returns the number of bytes actually freed, -** which might be more or less than the amount requested. -** ^The sqlite3_release_memory() routine is a no-op returning zero -** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. -*/ -SQLITE_API int sqlite3_release_memory(int); - -/* -** CAPI3REF: Impose A Limit On Heap Size -** -** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the -** soft limit on the amount of heap memory that may be allocated by SQLite. -** ^SQLite strives to keep heap memory utilization below the soft heap -** limit by reducing the number of pages held in the page cache -** as heap memory usages approaches the limit. -** ^The soft heap limit is "soft" because even though SQLite strives to stay -** below the limit, it will exceed the limit rather than generate -** an [SQLITE_NOMEM] error. In other words, the soft heap limit -** is advisory only. -** -** ^The return value from sqlite3_soft_heap_limit64() is the size of -** the soft heap limit prior to the call. ^If the argument N is negative -** then no change is made to the soft heap limit. Hence, the current -** size of the soft heap limit can be determined by invoking -** sqlite3_soft_heap_limit64() with a negative argument. -** -** ^If the argument N is zero then the soft heap limit is disabled. -** -** ^(The soft heap limit is not enforced in the current implementation -** if one or more of following conditions are true: -** -**
    -**
  • The soft heap limit is set to zero. -**
  • Memory accounting is disabled using a combination of the -** [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and -** the [SQLITE_DEFAULT_MEMSTATUS] compile-time option. -**
  • An alternative page cache implementation is specified using -** [sqlite3_config]([SQLITE_CONFIG_PCACHE],...). -**
  • The page cache allocates from its own memory pool supplied -** by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than -** from the heap. -**
)^ -** -** Beginning with SQLite version 3.7.3, the soft heap limit is enforced -** regardless of whether or not the [SQLITE_ENABLE_MEMORY_MANAGEMENT] -** compile-time option is invoked. With [SQLITE_ENABLE_MEMORY_MANAGEMENT], -** the soft heap limit is enforced on every memory allocation. Without -** [SQLITE_ENABLE_MEMORY_MANAGEMENT], the soft heap limit is only enforced -** when memory is allocated by the page cache. Testing suggests that because -** the page cache is the predominate memory user in SQLite, most -** applications will achieve adequate soft heap limit enforcement without -** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. -** -** The circumstances under which SQLite will enforce the soft heap limit may -** changes in future releases of SQLite. -*/ -SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N); - -/* -** CAPI3REF: Deprecated Soft Heap Limit Interface -** DEPRECATED -** -** This is a deprecated version of the [sqlite3_soft_heap_limit64()] -** interface. This routine is provided for historical compatibility -** only. All new applications should use the -** [sqlite3_soft_heap_limit64()] interface rather than this one. -*/ -SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N); - - -/* -** CAPI3REF: Extract Metadata About A Column Of A Table -** -** ^This routine returns metadata about a specific column of a specific -** database table accessible using the [database connection] handle -** passed as the first function argument. -** -** ^The column is identified by the second, third and fourth parameters to -** this function. ^The second parameter is either the name of the database -** (i.e. "main", "temp", or an attached database) containing the specified -** table or NULL. ^If it is NULL, then all attached databases are searched -** for the table using the same algorithm used by the database engine to -** resolve unqualified table references. -** -** ^The third and fourth parameters to this function are the table and column -** name of the desired column, respectively. Neither of these parameters -** may be NULL. -** -** ^Metadata is returned by writing to the memory locations passed as the 5th -** and subsequent parameters to this function. ^Any of these arguments may be -** NULL, in which case the corresponding element of metadata is omitted. -** -** ^(
-** -**
Parameter Output
Type
Description -** -**
5th const char* Data type -**
6th const char* Name of default collation sequence -**
7th int True if column has a NOT NULL constraint -**
8th int True if column is part of the PRIMARY KEY -**
9th int True if column is [AUTOINCREMENT] -**
-**
)^ -** -** ^The memory pointed to by the character pointers returned for the -** declaration type and collation sequence is valid only until the next -** call to any SQLite API function. -** -** ^If the specified table is actually a view, an [error code] is returned. -** -** ^If the specified column is "rowid", "oid" or "_rowid_" and an -** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output -** parameters are set for the explicitly declared column. ^(If there is no -** explicitly declared [INTEGER PRIMARY KEY] column, then the output -** parameters are set as follows: -** -**
-**     data type: "INTEGER"
-**     collation sequence: "BINARY"
-**     not null: 0
-**     primary key: 1
-**     auto increment: 0
-** 
)^ -** -** ^(This function may load one or more schemas from database files. If an -** error occurs during this process, or if the requested table or column -** cannot be found, an [error code] is returned and an error message left -** in the [database connection] (to be retrieved using sqlite3_errmsg()).)^ -** -** ^This API is only available if the library was compiled with the -** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined. -*/ -SQLITE_API int sqlite3_table_column_metadata( - sqlite3 *db, /* Connection handle */ - const char *zDbName, /* Database name or NULL */ - const char *zTableName, /* Table name */ - const char *zColumnName, /* Column name */ - char const **pzDataType, /* OUTPUT: Declared data type */ - char const **pzCollSeq, /* OUTPUT: Collation sequence name */ - int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */ - int *pPrimaryKey, /* OUTPUT: True if column part of PK */ - int *pAutoinc /* OUTPUT: True if column is auto-increment */ -); - -/* -** CAPI3REF: Load An Extension -** -** ^This interface loads an SQLite extension library from the named file. -** -** ^The sqlite3_load_extension() interface attempts to load an -** SQLite extension library contained in the file zFile. -** -** ^The entry point is zProc. -** ^zProc may be 0, in which case the name of the entry point -** defaults to "sqlite3_extension_init". -** ^The sqlite3_load_extension() interface returns -** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong. -** ^If an error occurs and pzErrMsg is not 0, then the -** [sqlite3_load_extension()] interface shall attempt to -** fill *pzErrMsg with error message text stored in memory -** obtained from [sqlite3_malloc()]. The calling function -** should free this memory by calling [sqlite3_free()]. -** -** ^Extension loading must be enabled using -** [sqlite3_enable_load_extension()] prior to calling this API, -** otherwise an error will be returned. -** -** See also the [load_extension() SQL function]. -*/ -SQLITE_API int sqlite3_load_extension( - sqlite3 *db, /* Load the extension into this database connection */ - const char *zFile, /* Name of the shared library containing extension */ - const char *zProc, /* Entry point. Derived from zFile if 0 */ - char **pzErrMsg /* Put error message here if not 0 */ -); - -/* -** CAPI3REF: Enable Or Disable Extension Loading -** -** ^So as not to open security holes in older applications that are -** unprepared to deal with extension loading, and as a means of disabling -** extension loading while evaluating user-entered SQL, the following API -** is provided to turn the [sqlite3_load_extension()] mechanism on and off. -** -** ^Extension loading is off by default. See ticket #1863. -** ^Call the sqlite3_enable_load_extension() routine with onoff==1 -** to turn extension loading on and call it with onoff==0 to turn -** it back off again. -*/ -SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); - -/* -** CAPI3REF: Automatically Load Statically Linked Extensions -** -** ^This interface causes the xEntryPoint() function to be invoked for -** each new [database connection] that is created. The idea here is that -** xEntryPoint() is the entry point for a statically linked SQLite extension -** that is to be automatically loaded into all new database connections. -** -** ^(Even though the function prototype shows that xEntryPoint() takes -** no arguments and returns void, SQLite invokes xEntryPoint() with three -** arguments and expects and integer result as if the signature of the -** entry point where as follows: -** -**
-**    int xEntryPoint(
-**      sqlite3 *db,
-**      const char **pzErrMsg,
-**      const struct sqlite3_api_routines *pThunk
-**    );
-** 
)^ -** -** If the xEntryPoint routine encounters an error, it should make *pzErrMsg -** point to an appropriate error message (obtained from [sqlite3_mprintf()]) -** and return an appropriate [error code]. ^SQLite ensures that *pzErrMsg -** is NULL before calling the xEntryPoint(). ^SQLite will invoke -** [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns. ^If any -** xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()], -** or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail. -** -** ^Calling sqlite3_auto_extension(X) with an entry point X that is already -** on the list of automatic extensions is a harmless no-op. ^No entry point -** will be called more than once for each database connection that is opened. -** -** See also: [sqlite3_reset_auto_extension()]. -*/ -SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void)); - -/* -** CAPI3REF: Reset Automatic Extension Loading -** -** ^This interface disables all automatic extensions previously -** registered using [sqlite3_auto_extension()]. -*/ -SQLITE_API void sqlite3_reset_auto_extension(void); - -/* -** The interface to the virtual-table mechanism is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - -/* -** Structures used by the virtual table interface -*/ -typedef struct sqlite3_vtab sqlite3_vtab; -typedef struct sqlite3_index_info sqlite3_index_info; -typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor; -typedef struct sqlite3_module sqlite3_module; - -/* -** CAPI3REF: Virtual Table Object -** KEYWORDS: sqlite3_module {virtual table module} -** -** This structure, sometimes called a "virtual table module", -** defines the implementation of a [virtual tables]. -** This structure consists mostly of methods for the module. -** -** ^A virtual table module is created by filling in a persistent -** instance of this structure and passing a pointer to that instance -** to [sqlite3_create_module()] or [sqlite3_create_module_v2()]. -** ^The registration remains valid until it is replaced by a different -** module or until the [database connection] closes. The content -** of this structure must not change while it is registered with -** any database connection. -*/ -struct sqlite3_module { - int iVersion; - int (*xCreate)(sqlite3*, void *pAux, - int argc, const char *const*argv, - sqlite3_vtab **ppVTab, char**); - int (*xConnect)(sqlite3*, void *pAux, - int argc, const char *const*argv, - sqlite3_vtab **ppVTab, char**); - int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); - int (*xDisconnect)(sqlite3_vtab *pVTab); - int (*xDestroy)(sqlite3_vtab *pVTab); - int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); - int (*xClose)(sqlite3_vtab_cursor*); - int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, - int argc, sqlite3_value **argv); - int (*xNext)(sqlite3_vtab_cursor*); - int (*xEof)(sqlite3_vtab_cursor*); - int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); - int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); - int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); - int (*xBegin)(sqlite3_vtab *pVTab); - int (*xSync)(sqlite3_vtab *pVTab); - int (*xCommit)(sqlite3_vtab *pVTab); - int (*xRollback)(sqlite3_vtab *pVTab); - int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, - void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), - void **ppArg); - int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); - /* The methods above are in version 1 of the sqlite_module object. Those - ** below are for version 2 and greater. */ - int (*xSavepoint)(sqlite3_vtab *pVTab, int); - int (*xRelease)(sqlite3_vtab *pVTab, int); - int (*xRollbackTo)(sqlite3_vtab *pVTab, int); -}; - -/* -** CAPI3REF: Virtual Table Indexing Information -** KEYWORDS: sqlite3_index_info -** -** The sqlite3_index_info structure and its substructures is used as part -** of the [virtual table] interface to -** pass information into and receive the reply from the [xBestIndex] -** method of a [virtual table module]. The fields under **Inputs** are the -** inputs to xBestIndex and are read-only. xBestIndex inserts its -** results into the **Outputs** fields. -** -** ^(The aConstraint[] array records WHERE clause constraints of the form: -** -**
column OP expr
-** -** where OP is =, <, <=, >, or >=.)^ ^(The particular operator is -** stored in aConstraint[].op using one of the -** [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ -** ^(The index of the column is stored in -** aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the -** expr on the right-hand side can be evaluated (and thus the constraint -** is usable) and false if it cannot.)^ -** -** ^The optimizer automatically inverts terms of the form "expr OP column" -** and makes other simplifications to the WHERE clause in an attempt to -** get as many WHERE clause terms into the form shown above as possible. -** ^The aConstraint[] array only reports WHERE clause terms that are -** relevant to the particular virtual table being queried. -** -** ^Information about the ORDER BY clause is stored in aOrderBy[]. -** ^Each term of aOrderBy records a column of the ORDER BY clause. -** -** The [xBestIndex] method must fill aConstraintUsage[] with information -** about what parameters to pass to xFilter. ^If argvIndex>0 then -** the right-hand side of the corresponding aConstraint[] is evaluated -** and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit -** is true, then the constraint is assumed to be fully handled by the -** virtual table and is not checked again by SQLite.)^ -** -** ^The idxNum and idxPtr values are recorded and passed into the -** [xFilter] method. -** ^[sqlite3_free()] is used to free idxPtr if and only if -** needToFreeIdxPtr is true. -** -** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in -** the correct order to satisfy the ORDER BY clause so that no separate -** sorting step is required. -** -** ^The estimatedCost value is an estimate of the cost of doing the -** particular lookup. A full scan of a table with N entries should have -** a cost of N. A binary search of a table of N entries should have a -** cost of approximately log(N). -*/ -struct sqlite3_index_info { - /* Inputs */ - int nConstraint; /* Number of entries in aConstraint */ - struct sqlite3_index_constraint { - int iColumn; /* Column on left-hand side of constraint */ - unsigned char op; /* Constraint operator */ - unsigned char usable; /* True if this constraint is usable */ - int iTermOffset; /* Used internally - xBestIndex should ignore */ - } *aConstraint; /* Table of WHERE clause constraints */ - int nOrderBy; /* Number of terms in the ORDER BY clause */ - struct sqlite3_index_orderby { - int iColumn; /* Column number */ - unsigned char desc; /* True for DESC. False for ASC. */ - } *aOrderBy; /* The ORDER BY clause */ - /* Outputs */ - struct sqlite3_index_constraint_usage { - int argvIndex; /* if >0, constraint is part of argv to xFilter */ - unsigned char omit; /* Do not code a test for this constraint */ - } *aConstraintUsage; - int idxNum; /* Number used to identify the index */ - char *idxStr; /* String, possibly obtained from sqlite3_malloc */ - int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */ - int orderByConsumed; /* True if output is already ordered */ - double estimatedCost; /* Estimated cost of using this index */ -}; - -/* -** CAPI3REF: Virtual Table Constraint Operator Codes -** -** These macros defined the allowed values for the -** [sqlite3_index_info].aConstraint[].op field. Each value represents -** an operator that is part of a constraint term in the wHERE clause of -** a query that uses a [virtual table]. -*/ -#define SQLITE_INDEX_CONSTRAINT_EQ 2 -#define SQLITE_INDEX_CONSTRAINT_GT 4 -#define SQLITE_INDEX_CONSTRAINT_LE 8 -#define SQLITE_INDEX_CONSTRAINT_LT 16 -#define SQLITE_INDEX_CONSTRAINT_GE 32 -#define SQLITE_INDEX_CONSTRAINT_MATCH 64 - -/* -** CAPI3REF: Register A Virtual Table Implementation -** -** ^These routines are used to register a new [virtual table module] name. -** ^Module names must be registered before -** creating a new [virtual table] using the module and before using a -** preexisting [virtual table] for the module. -** -** ^The module name is registered on the [database connection] specified -** by the first parameter. ^The name of the module is given by the -** second parameter. ^The third parameter is a pointer to -** the implementation of the [virtual table module]. ^The fourth -** parameter is an arbitrary client data pointer that is passed through -** into the [xCreate] and [xConnect] methods of the virtual table module -** when a new virtual table is be being created or reinitialized. -** -** ^The sqlite3_create_module_v2() interface has a fifth parameter which -** is a pointer to a destructor for the pClientData. ^SQLite will -** invoke the destructor function (if it is not NULL) when SQLite -** no longer needs the pClientData pointer. ^The destructor will also -** be invoked if the call to sqlite3_create_module_v2() fails. -** ^The sqlite3_create_module() -** interface is equivalent to sqlite3_create_module_v2() with a NULL -** destructor. -*/ -SQLITE_API int sqlite3_create_module( - sqlite3 *db, /* SQLite connection to register module with */ - const char *zName, /* Name of the module */ - const sqlite3_module *p, /* Methods for the module */ - void *pClientData /* Client data for xCreate/xConnect */ -); -SQLITE_API int sqlite3_create_module_v2( - sqlite3 *db, /* SQLite connection to register module with */ - const char *zName, /* Name of the module */ - const sqlite3_module *p, /* Methods for the module */ - void *pClientData, /* Client data for xCreate/xConnect */ - void(*xDestroy)(void*) /* Module destructor function */ -); - -/* -** CAPI3REF: Virtual Table Instance Object -** KEYWORDS: sqlite3_vtab -** -** Every [virtual table module] implementation uses a subclass -** of this object to describe a particular instance -** of the [virtual table]. Each subclass will -** be tailored to the specific needs of the module implementation. -** The purpose of this superclass is to define certain fields that are -** common to all module implementations. -** -** ^Virtual tables methods can set an error message by assigning a -** string obtained from [sqlite3_mprintf()] to zErrMsg. The method should -** take care that any prior string is freed by a call to [sqlite3_free()] -** prior to assigning a new string to zErrMsg. ^After the error message -** is delivered up to the client application, the string will be automatically -** freed by sqlite3_free() and the zErrMsg field will be zeroed. -*/ -struct sqlite3_vtab { - const sqlite3_module *pModule; /* The module for this virtual table */ - int nRef; /* NO LONGER USED */ - char *zErrMsg; /* Error message from sqlite3_mprintf() */ - /* Virtual table implementations will typically add additional fields */ -}; - -/* -** CAPI3REF: Virtual Table Cursor Object -** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor} -** -** Every [virtual table module] implementation uses a subclass of the -** following structure to describe cursors that point into the -** [virtual table] and are used -** to loop through the virtual table. Cursors are created using the -** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed -** by the [sqlite3_module.xClose | xClose] method. Cursors are used -** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods -** of the module. Each module implementation will define -** the content of a cursor structure to suit its own needs. -** -** This superclass exists in order to define fields of the cursor that -** are common to all implementations. -*/ -struct sqlite3_vtab_cursor { - sqlite3_vtab *pVtab; /* Virtual table of this cursor */ - /* Virtual table implementations will typically add additional fields */ -}; - -/* -** CAPI3REF: Declare The Schema Of A Virtual Table -** -** ^The [xCreate] and [xConnect] methods of a -** [virtual table module] call this interface -** to declare the format (the names and datatypes of the columns) of -** the virtual tables they implement. -*/ -SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL); - -/* -** CAPI3REF: Overload A Function For A Virtual Table -** -** ^(Virtual tables can provide alternative implementations of functions -** using the [xFindFunction] method of the [virtual table module]. -** But global versions of those functions -** must exist in order to be overloaded.)^ -** -** ^(This API makes sure a global version of a function with a particular -** name and number of parameters exists. If no such function exists -** before this API is called, a new function is created.)^ ^The implementation -** of the new function always causes an exception to be thrown. So -** the new function is not good for anything by itself. Its only -** purpose is to be a placeholder function that can be overloaded -** by a [virtual table]. -*/ -SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); - -/* -** The interface to the virtual-table mechanism defined above (back up -** to a comment remarkably similar to this one) is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - -/* -** CAPI3REF: A Handle To An Open BLOB -** KEYWORDS: {BLOB handle} {BLOB handles} -** -** An instance of this object represents an open BLOB on which -** [sqlite3_blob_open | incremental BLOB I/O] can be performed. -** ^Objects of this type are created by [sqlite3_blob_open()] -** and destroyed by [sqlite3_blob_close()]. -** ^The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces -** can be used to read or write small subsections of the BLOB. -** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes. -*/ -typedef struct sqlite3_blob sqlite3_blob; - -/* -** CAPI3REF: Open A BLOB For Incremental I/O -** -** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located -** in row iRow, column zColumn, table zTable in database zDb; -** in other words, the same BLOB that would be selected by: -** -**
-**     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
-** 
)^ -** -** ^If the flags parameter is non-zero, then the BLOB is opened for read -** and write access. ^If it is zero, the BLOB is opened for read access. -** ^It is not possible to open a column that is part of an index or primary -** key for writing. ^If [foreign key constraints] are enabled, it is -** not possible to open a column that is part of a [child key] for writing. -** -** ^Note that the database name is not the filename that contains -** the database but rather the symbolic name of the database that -** appears after the AS keyword when the database is connected using [ATTACH]. -** ^For the main database file, the database name is "main". -** ^For TEMP tables, the database name is "temp". -** -** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is written -** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set -** to be a null pointer.)^ -** ^This function sets the [database connection] error code and message -** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related -** functions. ^Note that the *ppBlob variable is always initialized in a -** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob -** regardless of the success or failure of this routine. -** -** ^(If the row that a BLOB handle points to is modified by an -** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects -** then the BLOB handle is marked as "expired". -** This is true if any column of the row is changed, even a column -** other than the one the BLOB handle is open on.)^ -** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for -** an expired BLOB handle fail with a return code of [SQLITE_ABORT]. -** ^(Changes written into a BLOB prior to the BLOB expiring are not -** rolled back by the expiration of the BLOB. Such changes will eventually -** commit if the transaction continues to completion.)^ -** -** ^Use the [sqlite3_blob_bytes()] interface to determine the size of -** the opened blob. ^The size of a blob may not be changed by this -** interface. Use the [UPDATE] SQL command to change the size of a -** blob. -** -** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces -** and the built-in [zeroblob] SQL function can be used, if desired, -** to create an empty, zero-filled blob in which to read or write using -** this interface. -** -** To avoid a resource leak, every open [BLOB handle] should eventually -** be released by a call to [sqlite3_blob_close()]. -*/ -SQLITE_API int sqlite3_blob_open( - sqlite3*, - const char *zDb, - const char *zTable, - const char *zColumn, - sqlite3_int64 iRow, - int flags, - sqlite3_blob **ppBlob -); - -/* -** CAPI3REF: Move a BLOB Handle to a New Row -** -** ^This function is used to move an existing blob handle so that it points -** to a different row of the same database table. ^The new row is identified -** by the rowid value passed as the second argument. Only the row can be -** changed. ^The database, table and column on which the blob handle is open -** remain the same. Moving an existing blob handle to a new row can be -** faster than closing the existing handle and opening a new one. -** -** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] - -** it must exist and there must be either a blob or text value stored in -** the nominated column.)^ ^If the new row is not present in the table, or if -** it does not contain a blob or text value, or if another error occurs, an -** SQLite error code is returned and the blob handle is considered aborted. -** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or -** [sqlite3_blob_reopen()] on an aborted blob handle immediately return -** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle -** always returns zero. -** -** ^This function sets the database handle error code and message. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); - -/* -** CAPI3REF: Close A BLOB Handle -** -** ^Closes an open [BLOB handle]. -** -** ^Closing a BLOB shall cause the current transaction to commit -** if there are no other BLOBs, no pending prepared statements, and the -** database connection is in [autocommit mode]. -** ^If any writes were made to the BLOB, they might be held in cache -** until the close operation if they will fit. -** -** ^(Closing the BLOB often forces the changes -** out to disk and so if any I/O errors occur, they will likely occur -** at the time when the BLOB is closed. Any errors that occur during -** closing are reported as a non-zero return value.)^ -** -** ^(The BLOB is closed unconditionally. Even if this routine returns -** an error code, the BLOB is still closed.)^ -** -** ^Calling this routine with a null pointer (such as would be returned -** by a failed call to [sqlite3_blob_open()]) is a harmless no-op. -*/ -SQLITE_API int sqlite3_blob_close(sqlite3_blob *); - -/* -** CAPI3REF: Return The Size Of An Open BLOB -** -** ^Returns the size in bytes of the BLOB accessible via the -** successfully opened [BLOB handle] in its only argument. ^The -** incremental blob I/O routines can only read or overwriting existing -** blob content; they cannot change the size of a blob. -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -*/ -SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *); - -/* -** CAPI3REF: Read Data From A BLOB Incrementally -** -** ^(This function is used to read data from an open [BLOB handle] into a -** caller-supplied buffer. N bytes of data are copied into buffer Z -** from the open BLOB, starting at offset iOffset.)^ -** -** ^If offset iOffset is less than N bytes from the end of the BLOB, -** [SQLITE_ERROR] is returned and no data is read. ^If N or iOffset is -** less than zero, [SQLITE_ERROR] is returned and no data is read. -** ^The size of the blob (and hence the maximum value of N+iOffset) -** can be determined using the [sqlite3_blob_bytes()] interface. -** -** ^An attempt to read from an expired [BLOB handle] fails with an -** error code of [SQLITE_ABORT]. -** -** ^(On success, sqlite3_blob_read() returns SQLITE_OK. -** Otherwise, an [error code] or an [extended error code] is returned.)^ -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -** -** See also: [sqlite3_blob_write()]. -*/ -SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); - -/* -** CAPI3REF: Write Data Into A BLOB Incrementally -** -** ^This function is used to write data into an open [BLOB handle] from a -** caller-supplied buffer. ^N bytes of data are copied from the buffer Z -** into the open BLOB, starting at offset iOffset. -** -** ^If the [BLOB handle] passed as the first argument was not opened for -** writing (the flags parameter to [sqlite3_blob_open()] was zero), -** this function returns [SQLITE_READONLY]. -** -** ^This function may only modify the contents of the BLOB; it is -** not possible to increase the size of a BLOB using this API. -** ^If offset iOffset is less than N bytes from the end of the BLOB, -** [SQLITE_ERROR] is returned and no data is written. ^If N is -** less than zero [SQLITE_ERROR] is returned and no data is written. -** The size of the BLOB (and hence the maximum value of N+iOffset) -** can be determined using the [sqlite3_blob_bytes()] interface. -** -** ^An attempt to write to an expired [BLOB handle] fails with an -** error code of [SQLITE_ABORT]. ^Writes to the BLOB that occurred -** before the [BLOB handle] expired are not rolled back by the -** expiration of the handle, though of course those changes might -** have been overwritten by the statement that expired the BLOB handle -** or by other independent statements. -** -** ^(On success, sqlite3_blob_write() returns SQLITE_OK. -** Otherwise, an [error code] or an [extended error code] is returned.)^ -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -** -** See also: [sqlite3_blob_read()]. -*/ -SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); - -/* -** CAPI3REF: Virtual File System Objects -** -** A virtual filesystem (VFS) is an [sqlite3_vfs] object -** that SQLite uses to interact -** with the underlying operating system. Most SQLite builds come with a -** single default VFS that is appropriate for the host computer. -** New VFSes can be registered and existing VFSes can be unregistered. -** The following interfaces are provided. -** -** ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name. -** ^Names are case sensitive. -** ^Names are zero-terminated UTF-8 strings. -** ^If there is no match, a NULL pointer is returned. -** ^If zVfsName is NULL then the default VFS is returned. -** -** ^New VFSes are registered with sqlite3_vfs_register(). -** ^Each new VFS becomes the default VFS if the makeDflt flag is set. -** ^The same VFS can be registered multiple times without injury. -** ^To make an existing VFS into the default VFS, register it again -** with the makeDflt flag set. If two different VFSes with the -** same name are registered, the behavior is undefined. If a -** VFS is registered with a name that is NULL or an empty string, -** then the behavior is undefined. -** -** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. -** ^(If the default VFS is unregistered, another VFS is chosen as -** the default. The choice for the new VFS is arbitrary.)^ -*/ -SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName); -SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); -SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*); - -/* -** CAPI3REF: Mutexes -** -** The SQLite core uses these routines for thread -** synchronization. Though they are intended for internal -** use by SQLite, code that links against SQLite is -** permitted to use any of these routines. -** -** The SQLite source code contains multiple implementations -** of these mutex routines. An appropriate implementation -** is selected automatically at compile-time. ^(The following -** implementations are available in the SQLite core: -** -**
    -**
  • SQLITE_MUTEX_OS2 -**
  • SQLITE_MUTEX_PTHREAD -**
  • SQLITE_MUTEX_W32 -**
  • SQLITE_MUTEX_NOOP -**
)^ -** -** ^The SQLITE_MUTEX_NOOP implementation is a set of routines -** that does no real locking and is appropriate for use in -** a single-threaded application. ^The SQLITE_MUTEX_OS2, -** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations -** are appropriate for use on OS/2, Unix, and Windows. -** -** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor -** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex -** implementation is included with the library. In this case the -** application must supply a custom mutex implementation using the -** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function -** before calling sqlite3_initialize() or any other public sqlite3_ -** function that calls sqlite3_initialize().)^ -** -** ^The sqlite3_mutex_alloc() routine allocates a new -** mutex and returns a pointer to it. ^If it returns NULL -** that means that a mutex could not be allocated. ^SQLite -** will unwind its stack and return an error. ^(The argument -** to sqlite3_mutex_alloc() is one of these integer constants: -** -**
    -**
  • SQLITE_MUTEX_FAST -**
  • SQLITE_MUTEX_RECURSIVE -**
  • SQLITE_MUTEX_STATIC_MASTER -**
  • SQLITE_MUTEX_STATIC_MEM -**
  • SQLITE_MUTEX_STATIC_MEM2 -**
  • SQLITE_MUTEX_STATIC_PRNG -**
  • SQLITE_MUTEX_STATIC_LRU -**
  • SQLITE_MUTEX_STATIC_LRU2 -**
)^ -** -** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) -** cause sqlite3_mutex_alloc() to create -** a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE -** is used but not necessarily so when SQLITE_MUTEX_FAST is used. -** The mutex implementation does not need to make a distinction -** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does -** not want to. ^SQLite will only request a recursive mutex in -** cases where it really needs one. ^If a faster non-recursive mutex -** implementation is available on the host platform, the mutex subsystem -** might return such a mutex in response to SQLITE_MUTEX_FAST. -** -** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other -** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return -** a pointer to a static preexisting mutex. ^Six static mutexes are -** used by the current version of SQLite. Future versions of SQLite -** may add additional static mutexes. Static mutexes are for internal -** use by SQLite only. Applications that use SQLite mutexes should -** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or -** SQLITE_MUTEX_RECURSIVE. -** -** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST -** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc() -** returns a different mutex on every call. ^But for the static -** mutex types, the same mutex is returned on every call that has -** the same type number. -** -** ^The sqlite3_mutex_free() routine deallocates a previously -** allocated dynamic mutex. ^SQLite is careful to deallocate every -** dynamic mutex that it allocates. The dynamic mutexes must not be in -** use when they are deallocated. Attempting to deallocate a static -** mutex results in undefined behavior. ^SQLite never deallocates -** a static mutex. -** -** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt -** to enter a mutex. ^If another thread is already within the mutex, -** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return -** SQLITE_BUSY. ^The sqlite3_mutex_try() interface returns [SQLITE_OK] -** upon successful entry. ^(Mutexes created using -** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread. -** In such cases the, -** mutex must be exited an equal number of times before another thread -** can enter.)^ ^(If the same thread tries to enter any other -** kind of mutex more than once, the behavior is undefined. -** SQLite will never exhibit -** such behavior in its own use of mutexes.)^ -** -** ^(Some systems (for example, Windows 95) do not support the operation -** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try() -** will always return SQLITE_BUSY. The SQLite core only ever uses -** sqlite3_mutex_try() as an optimization so this is acceptable behavior.)^ -** -** ^The sqlite3_mutex_leave() routine exits a mutex that was -** previously entered by the same thread. ^(The behavior -** is undefined if the mutex is not currently entered by the -** calling thread or is not currently allocated. SQLite will -** never do either.)^ -** -** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or -** sqlite3_mutex_leave() is a NULL pointer, then all three routines -** behave as no-ops. -** -** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. -*/ -SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int); -SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*); -SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*); -SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*); -SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*); - -/* -** CAPI3REF: Mutex Methods Object -** -** An instance of this structure defines the low-level routines -** used to allocate and use mutexes. -** -** Usually, the default mutex implementations provided by SQLite are -** sufficient, however the user has the option of substituting a custom -** implementation for specialized deployments or systems for which SQLite -** does not provide a suitable implementation. In this case, the user -** creates and populates an instance of this structure to pass -** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option. -** Additionally, an instance of this structure can be used as an -** output variable when querying the system for the current mutex -** implementation, using the [SQLITE_CONFIG_GETMUTEX] option. -** -** ^The xMutexInit method defined by this structure is invoked as -** part of system initialization by the sqlite3_initialize() function. -** ^The xMutexInit routine is called by SQLite exactly once for each -** effective call to [sqlite3_initialize()]. -** -** ^The xMutexEnd method defined by this structure is invoked as -** part of system shutdown by the sqlite3_shutdown() function. The -** implementation of this method is expected to release all outstanding -** resources obtained by the mutex methods implementation, especially -** those obtained by the xMutexInit method. ^The xMutexEnd() -** interface is invoked exactly once for each call to [sqlite3_shutdown()]. -** -** ^(The remaining seven methods defined by this structure (xMutexAlloc, -** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and -** xMutexNotheld) implement the following interfaces (respectively): -** -**
    -**
  • [sqlite3_mutex_alloc()]
  • -**
  • [sqlite3_mutex_free()]
  • -**
  • [sqlite3_mutex_enter()]
  • -**
  • [sqlite3_mutex_try()]
  • -**
  • [sqlite3_mutex_leave()]
  • -**
  • [sqlite3_mutex_held()]
  • -**
  • [sqlite3_mutex_notheld()]
  • -**
)^ -** -** The only difference is that the public sqlite3_XXX functions enumerated -** above silently ignore any invocations that pass a NULL pointer instead -** of a valid mutex handle. The implementations of the methods defined -** by this structure are not required to handle this case, the results -** of passing a NULL pointer instead of a valid mutex handle are undefined -** (i.e. it is acceptable to provide an implementation that segfaults if -** it is passed a NULL pointer). -** -** The xMutexInit() method must be threadsafe. ^It must be harmless to -** invoke xMutexInit() multiple times within the same process and without -** intervening calls to xMutexEnd(). Second and subsequent calls to -** xMutexInit() must be no-ops. -** -** ^xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()] -** and its associates). ^Similarly, xMutexAlloc() must not use SQLite memory -** allocation for a static mutex. ^However xMutexAlloc() may use SQLite -** memory allocation for a fast or recursive mutex. -** -** ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is -** called, but only if the prior call to xMutexInit returned SQLITE_OK. -** If xMutexInit fails in any way, it is expected to clean up after itself -** prior to returning. -*/ -typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; -struct sqlite3_mutex_methods { - int (*xMutexInit)(void); - int (*xMutexEnd)(void); - sqlite3_mutex *(*xMutexAlloc)(int); - void (*xMutexFree)(sqlite3_mutex *); - void (*xMutexEnter)(sqlite3_mutex *); - int (*xMutexTry)(sqlite3_mutex *); - void (*xMutexLeave)(sqlite3_mutex *); - int (*xMutexHeld)(sqlite3_mutex *); - int (*xMutexNotheld)(sqlite3_mutex *); -}; - -/* -** CAPI3REF: Mutex Verification Routines -** -** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines -** are intended for use inside assert() statements. ^The SQLite core -** never uses these routines except inside an assert() and applications -** are advised to follow the lead of the core. ^The SQLite core only -** provides implementations for these routines when it is compiled -** with the SQLITE_DEBUG flag. ^External mutex implementations -** are only required to provide these routines if SQLITE_DEBUG is -** defined and if NDEBUG is not defined. -** -** ^These routines should return true if the mutex in their argument -** is held or not held, respectively, by the calling thread. -** -** ^The implementation is not required to provided versions of these -** routines that actually work. If the implementation does not provide working -** versions of these routines, it should at least provide stubs that always -** return true so that one does not get spurious assertion failures. -** -** ^If the argument to sqlite3_mutex_held() is a NULL pointer then -** the routine should return 1. This seems counter-intuitive since -** clearly the mutex cannot be held if it does not exist. But -** the reason the mutex does not exist is because the build is not -** using mutexes. And we do not want the assert() containing the -** call to sqlite3_mutex_held() to fail, so a non-zero return is -** the appropriate thing to do. ^The sqlite3_mutex_notheld() -** interface should also return 1 when given a NULL pointer. -*/ -#ifndef NDEBUG -SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); -SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); -#endif - -/* -** CAPI3REF: Mutex Types -** -** The [sqlite3_mutex_alloc()] interface takes a single argument -** which is one of these integer constants. -** -** The set of static mutexes may change from one SQLite release to the -** next. Applications that override the built-in mutex logic must be -** prepared to accommodate additional static mutexes. -*/ -#define SQLITE_MUTEX_FAST 0 -#define SQLITE_MUTEX_RECURSIVE 1 -#define SQLITE_MUTEX_STATIC_MASTER 2 -#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */ -#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */ -#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */ -#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_random() */ -#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */ -#define SQLITE_MUTEX_STATIC_LRU2 7 /* NOT USED */ -#define SQLITE_MUTEX_STATIC_PMEM 7 /* sqlite3PageMalloc() */ - -/* -** CAPI3REF: Retrieve the mutex for a database connection -** -** ^This interface returns a pointer the [sqlite3_mutex] object that -** serializes access to the [database connection] given in the argument -** when the [threading mode] is Serialized. -** ^If the [threading mode] is Single-thread or Multi-thread then this -** routine returns a NULL pointer. -*/ -SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); - -/* -** CAPI3REF: Low-Level Control Of Database Files -** -** ^The [sqlite3_file_control()] interface makes a direct call to the -** xFileControl method for the [sqlite3_io_methods] object associated -** with a particular database identified by the second argument. ^The -** name of the database is "main" for the main database or "temp" for the -** TEMP database, or the name that appears after the AS keyword for -** databases that are added using the [ATTACH] SQL command. -** ^A NULL pointer can be used in place of "main" to refer to the -** main database file. -** ^The third and fourth parameters to this routine -** are passed directly through to the second and third parameters of -** the xFileControl method. ^The return value of the xFileControl -** method becomes the return value of this routine. -** -** ^The SQLITE_FCNTL_FILE_POINTER value for the op parameter causes -** a pointer to the underlying [sqlite3_file] object to be written into -** the space pointed to by the 4th parameter. ^The SQLITE_FCNTL_FILE_POINTER -** case is a short-circuit path which does not actually invoke the -** underlying sqlite3_io_methods.xFileControl method. -** -** ^If the second parameter (zDbName) does not match the name of any -** open database file, then SQLITE_ERROR is returned. ^This error -** code is not remembered and will not be recalled by [sqlite3_errcode()] -** or [sqlite3_errmsg()]. The underlying xFileControl method might -** also return SQLITE_ERROR. There is no way to distinguish between -** an incorrect zDbName and an SQLITE_ERROR return from the underlying -** xFileControl method. -** -** See also: [SQLITE_FCNTL_LOCKSTATE] -*/ -SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); - -/* -** CAPI3REF: Testing Interface -** -** ^The sqlite3_test_control() interface is used to read out internal -** state of SQLite and to inject faults into SQLite for testing -** purposes. ^The first parameter is an operation code that determines -** the number, meaning, and operation of all subsequent parameters. -** -** This interface is not for use by applications. It exists solely -** for verifying the correct operation of the SQLite library. Depending -** on how the SQLite library is compiled, this interface might not exist. -** -** The details of the operation codes, their meanings, the parameters -** they take, and what they do are all subject to change without notice. -** Unlike most of the SQLite API, this function is not guaranteed to -** operate consistently from one release to the next. -*/ -SQLITE_API int sqlite3_test_control(int op, ...); - -/* -** CAPI3REF: Testing Interface Operation Codes -** -** These constants are the valid operation code parameters used -** as the first argument to [sqlite3_test_control()]. -** -** These parameters and their meanings are subject to change -** without notice. These values are for testing purposes only. -** Applications should not use any of these parameters or the -** [sqlite3_test_control()] interface. -*/ -#define SQLITE_TESTCTRL_FIRST 5 -#define SQLITE_TESTCTRL_PRNG_SAVE 5 -#define SQLITE_TESTCTRL_PRNG_RESTORE 6 -#define SQLITE_TESTCTRL_PRNG_RESET 7 -#define SQLITE_TESTCTRL_BITVEC_TEST 8 -#define SQLITE_TESTCTRL_FAULT_INSTALL 9 -#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10 -#define SQLITE_TESTCTRL_PENDING_BYTE 11 -#define SQLITE_TESTCTRL_ASSERT 12 -#define SQLITE_TESTCTRL_ALWAYS 13 -#define SQLITE_TESTCTRL_RESERVE 14 -#define SQLITE_TESTCTRL_OPTIMIZATIONS 15 -#define SQLITE_TESTCTRL_ISKEYWORD 16 -#define SQLITE_TESTCTRL_PGHDRSZ 17 -#define SQLITE_TESTCTRL_SCRATCHMALLOC 18 -#define SQLITE_TESTCTRL_LOCALTIME_FAULT 19 -#define SQLITE_TESTCTRL_LAST 19 - -/* -** CAPI3REF: SQLite Runtime Status -** -** ^This interface is used to retrieve runtime status information -** about the performance of SQLite, and optionally to reset various -** highwater marks. ^The first argument is an integer code for -** the specific parameter to measure. ^(Recognized integer codes -** are of the form [status parameters | SQLITE_STATUS_...].)^ -** ^The current value of the parameter is returned into *pCurrent. -** ^The highest recorded value is returned in *pHighwater. ^If the -** resetFlag is true, then the highest record value is reset after -** *pHighwater is written. ^(Some parameters do not record the highest -** value. For those parameters -** nothing is written into *pHighwater and the resetFlag is ignored.)^ -** ^(Other parameters record only the highwater mark and not the current -** value. For these latter parameters nothing is written into *pCurrent.)^ -** -** ^The sqlite3_status() routine returns SQLITE_OK on success and a -** non-zero [error code] on failure. -** -** This routine is threadsafe but is not atomic. This routine can be -** called while other threads are running the same or different SQLite -** interfaces. However the values returned in *pCurrent and -** *pHighwater reflect the status of SQLite at different points in time -** and it is possible that another thread might change the parameter -** in between the times when *pCurrent and *pHighwater are written. -** -** See also: [sqlite3_db_status()] -*/ -SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); - - -/* -** CAPI3REF: Status Parameters -** KEYWORDS: {status parameters} -** -** These integer constants designate various run-time status parameters -** that can be returned by [sqlite3_status()]. -** -**
-** [[SQLITE_STATUS_MEMORY_USED]] ^(
SQLITE_STATUS_MEMORY_USED
-**
This parameter is the current amount of memory checked out -** using [sqlite3_malloc()], either directly or indirectly. The -** figure includes calls made to [sqlite3_malloc()] by the application -** and internal memory usage by the SQLite library. Scratch memory -** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache -** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in -** this parameter. The amount returned is the sum of the allocation -** sizes as reported by the xSize method in [sqlite3_mem_methods].
)^ -** -** [[SQLITE_STATUS_MALLOC_SIZE]] ^(
SQLITE_STATUS_MALLOC_SIZE
-**
This parameter records the largest memory allocation request -** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their -** internal equivalents). Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.
)^ -** -** [[SQLITE_STATUS_MALLOC_COUNT]] ^(
SQLITE_STATUS_MALLOC_COUNT
-**
This parameter records the number of separate memory allocations -** currently checked out.
)^ -** -** [[SQLITE_STATUS_PAGECACHE_USED]] ^(
SQLITE_STATUS_PAGECACHE_USED
-**
This parameter returns the number of pages used out of the -** [pagecache memory allocator] that was configured using -** [SQLITE_CONFIG_PAGECACHE]. The -** value returned is in pages, not in bytes.
)^ -** -** [[SQLITE_STATUS_PAGECACHE_OVERFLOW]] -** ^(
SQLITE_STATUS_PAGECACHE_OVERFLOW
-**
This parameter returns the number of bytes of page cache -** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE] -** buffer and where forced to overflow to [sqlite3_malloc()]. The -** returned value includes allocations that overflowed because they -** where too large (they were larger than the "sz" parameter to -** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because -** no space was left in the page cache.
)^ -** -** [[SQLITE_STATUS_PAGECACHE_SIZE]] ^(
SQLITE_STATUS_PAGECACHE_SIZE
-**
This parameter records the largest memory allocation request -** handed to [pagecache memory allocator]. Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.
)^ -** -** [[SQLITE_STATUS_SCRATCH_USED]] ^(
SQLITE_STATUS_SCRATCH_USED
-**
This parameter returns the number of allocations used out of the -** [scratch memory allocator] configured using -** [SQLITE_CONFIG_SCRATCH]. The value returned is in allocations, not -** in bytes. Since a single thread may only have one scratch allocation -** outstanding at time, this parameter also reports the number of threads -** using scratch memory at the same time.
)^ -** -** [[SQLITE_STATUS_SCRATCH_OVERFLOW]] ^(
SQLITE_STATUS_SCRATCH_OVERFLOW
-**
This parameter returns the number of bytes of scratch memory -** allocation which could not be satisfied by the [SQLITE_CONFIG_SCRATCH] -** buffer and where forced to overflow to [sqlite3_malloc()]. The values -** returned include overflows because the requested allocation was too -** larger (that is, because the requested allocation was larger than the -** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer -** slots were available. -**
)^ -** -** [[SQLITE_STATUS_SCRATCH_SIZE]] ^(
SQLITE_STATUS_SCRATCH_SIZE
-**
This parameter records the largest memory allocation request -** handed to [scratch memory allocator]. Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.
)^ -** -** [[SQLITE_STATUS_PARSER_STACK]] ^(
SQLITE_STATUS_PARSER_STACK
-**
This parameter records the deepest parser stack. It is only -** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].
)^ -**
-** -** New status parameters may be added from time to time. -*/ -#define SQLITE_STATUS_MEMORY_USED 0 -#define SQLITE_STATUS_PAGECACHE_USED 1 -#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2 -#define SQLITE_STATUS_SCRATCH_USED 3 -#define SQLITE_STATUS_SCRATCH_OVERFLOW 4 -#define SQLITE_STATUS_MALLOC_SIZE 5 -#define SQLITE_STATUS_PARSER_STACK 6 -#define SQLITE_STATUS_PAGECACHE_SIZE 7 -#define SQLITE_STATUS_SCRATCH_SIZE 8 -#define SQLITE_STATUS_MALLOC_COUNT 9 - -/* -** CAPI3REF: Database Connection Status -** -** ^This interface is used to retrieve runtime status information -** about a single [database connection]. ^The first argument is the -** database connection object to be interrogated. ^The second argument -** is an integer constant, taken from the set of -** [SQLITE_DBSTATUS options], that -** determines the parameter to interrogate. The set of -** [SQLITE_DBSTATUS options] is likely -** to grow in future releases of SQLite. -** -** ^The current value of the requested parameter is written into *pCur -** and the highest instantaneous value is written into *pHiwtr. ^If -** the resetFlg is true, then the highest instantaneous value is -** reset back down to the current value. -** -** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a -** non-zero [error code] on failure. -** -** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. -*/ -SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); - -/* -** CAPI3REF: Status Parameters for database connections -** KEYWORDS: {SQLITE_DBSTATUS options} -** -** These constants are the available integer "verbs" that can be passed as -** the second argument to the [sqlite3_db_status()] interface. -** -** New verbs may be added in future releases of SQLite. Existing verbs -** might be discontinued. Applications should check the return code from -** [sqlite3_db_status()] to make sure that the call worked. -** The [sqlite3_db_status()] interface will return a non-zero error code -** if a discontinued or unsupported verb is invoked. -** -**
-** [[SQLITE_DBSTATUS_LOOKASIDE_USED]] ^(
SQLITE_DBSTATUS_LOOKASIDE_USED
-**
This parameter returns the number of lookaside memory slots currently -** checked out.
)^ -** -** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(
SQLITE_DBSTATUS_LOOKASIDE_HIT
-**
This parameter returns the number malloc attempts that were -** satisfied using lookaside memory. Only the high-water value is meaningful; -** the current value is always zero.)^ -** -** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]] -** ^(
SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE
-**
This parameter returns the number malloc attempts that might have -** been satisfied using lookaside memory but failed due to the amount of -** memory requested being larger than the lookaside slot size. -** Only the high-water value is meaningful; -** the current value is always zero.)^ -** -** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]] -** ^(
SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL
-**
This parameter returns the number malloc attempts that might have -** been satisfied using lookaside memory but failed due to all lookaside -** memory already being in use. -** Only the high-water value is meaningful; -** the current value is always zero.)^ -** -** [[SQLITE_DBSTATUS_CACHE_USED]] ^(
SQLITE_DBSTATUS_CACHE_USED
-**
This parameter returns the approximate number of of bytes of heap -** memory used by all pager caches associated with the database connection.)^ -** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0. -** -** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(
SQLITE_DBSTATUS_SCHEMA_USED
-**
This parameter returns the approximate number of of bytes of heap -** memory used to store the schema for all databases associated -** with the connection - main, temp, and any [ATTACH]-ed databases.)^ -** ^The full amount of memory used by the schemas is reported, even if the -** schema memory is shared with other database connections due to -** [shared cache mode] being enabled. -** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0. -** -** [[SQLITE_DBSTATUS_STMT_USED]] ^(
SQLITE_DBSTATUS_STMT_USED
-**
This parameter returns the approximate number of of bytes of heap -** and lookaside memory used by all prepared statements associated with -** the database connection.)^ -** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0. -**
-**
-*/ -#define SQLITE_DBSTATUS_LOOKASIDE_USED 0 -#define SQLITE_DBSTATUS_CACHE_USED 1 -#define SQLITE_DBSTATUS_SCHEMA_USED 2 -#define SQLITE_DBSTATUS_STMT_USED 3 -#define SQLITE_DBSTATUS_LOOKASIDE_HIT 4 -#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 5 -#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6 -#define SQLITE_DBSTATUS_MAX 6 /* Largest defined DBSTATUS */ - - -/* -** CAPI3REF: Prepared Statement Status -** -** ^(Each prepared statement maintains various -** [SQLITE_STMTSTATUS counters] that measure the number -** of times it has performed specific operations.)^ These counters can -** be used to monitor the performance characteristics of the prepared -** statements. For example, if the number of table steps greatly exceeds -** the number of table searches or result rows, that would tend to indicate -** that the prepared statement is using a full table scan rather than -** an index. -** -** ^(This interface is used to retrieve and reset counter values from -** a [prepared statement]. The first argument is the prepared statement -** object to be interrogated. The second argument -** is an integer code for a specific [SQLITE_STMTSTATUS counter] -** to be interrogated.)^ -** ^The current value of the requested counter is returned. -** ^If the resetFlg is true, then the counter is reset to zero after this -** interface call returns. -** -** See also: [sqlite3_status()] and [sqlite3_db_status()]. -*/ -SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); - -/* -** CAPI3REF: Status Parameters for prepared statements -** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} -** -** These preprocessor macros define integer codes that name counter -** values associated with the [sqlite3_stmt_status()] interface. -** The meanings of the various counters are as follows: -** -**
-** [[SQLITE_STMTSTATUS_FULLSCAN_STEP]]
SQLITE_STMTSTATUS_FULLSCAN_STEP
-**
^This is the number of times that SQLite has stepped forward in -** a table as part of a full table scan. Large numbers for this counter -** may indicate opportunities for performance improvement through -** careful use of indices.
-** -** [[SQLITE_STMTSTATUS_SORT]]
SQLITE_STMTSTATUS_SORT
-**
^This is the number of sort operations that have occurred. -** A non-zero value in this counter may indicate an opportunity to -** improvement performance through careful use of indices.
-** -** [[SQLITE_STMTSTATUS_AUTOINDEX]]
SQLITE_STMTSTATUS_AUTOINDEX
-**
^This is the number of rows inserted into transient indices that -** were created automatically in order to help joins run faster. -** A non-zero value in this counter may indicate an opportunity to -** improvement performance by adding permanent indices that do not -** need to be reinitialized each time the statement is run.
-** -**
-*/ -#define SQLITE_STMTSTATUS_FULLSCAN_STEP 1 -#define SQLITE_STMTSTATUS_SORT 2 -#define SQLITE_STMTSTATUS_AUTOINDEX 3 - -/* -** CAPI3REF: Custom Page Cache Object -** -** The sqlite3_pcache type is opaque. It is implemented by -** the pluggable module. The SQLite core has no knowledge of -** its size or internal structure and never deals with the -** sqlite3_pcache object except by holding and passing pointers -** to the object. -** -** See [sqlite3_pcache_methods] for additional information. -*/ -typedef struct sqlite3_pcache sqlite3_pcache; - -/* -** CAPI3REF: Application Defined Page Cache. -** KEYWORDS: {page cache} -** -** ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can -** register an alternative page cache implementation by passing in an -** instance of the sqlite3_pcache_methods structure.)^ -** In many applications, most of the heap memory allocated by -** SQLite is used for the page cache. -** By implementing a -** custom page cache using this API, an application can better control -** the amount of memory consumed by SQLite, the way in which -** that memory is allocated and released, and the policies used to -** determine exactly which parts of a database file are cached and for -** how long. -** -** The alternative page cache mechanism is an -** extreme measure that is only needed by the most demanding applications. -** The built-in page cache is recommended for most uses. -** -** ^(The contents of the sqlite3_pcache_methods structure are copied to an -** internal buffer by SQLite within the call to [sqlite3_config]. Hence -** the application may discard the parameter after the call to -** [sqlite3_config()] returns.)^ -** -** [[the xInit() page cache method]] -** ^(The xInit() method is called once for each effective -** call to [sqlite3_initialize()])^ -** (usually only once during the lifetime of the process). ^(The xInit() -** method is passed a copy of the sqlite3_pcache_methods.pArg value.)^ -** The intent of the xInit() method is to set up global data structures -** required by the custom page cache implementation. -** ^(If the xInit() method is NULL, then the -** built-in default page cache is used instead of the application defined -** page cache.)^ -** -** [[the xShutdown() page cache method]] -** ^The xShutdown() method is called by [sqlite3_shutdown()]. -** It can be used to clean up -** any outstanding resources before process shutdown, if required. -** ^The xShutdown() method may be NULL. -** -** ^SQLite automatically serializes calls to the xInit method, -** so the xInit method need not be threadsafe. ^The -** xShutdown method is only called from [sqlite3_shutdown()] so it does -** not need to be threadsafe either. All other methods must be threadsafe -** in multithreaded applications. -** -** ^SQLite will never invoke xInit() more than once without an intervening -** call to xShutdown(). -** -** [[the xCreate() page cache methods]] -** ^SQLite invokes the xCreate() method to construct a new cache instance. -** SQLite will typically create one cache instance for each open database file, -** though this is not guaranteed. ^The -** first parameter, szPage, is the size in bytes of the pages that must -** be allocated by the cache. ^szPage will not be a power of two. ^szPage -** will the page size of the database file that is to be cached plus an -** increment (here called "R") of less than 250. SQLite will use the -** extra R bytes on each page to store metadata about the underlying -** database page on disk. The value of R depends -** on the SQLite version, the target platform, and how SQLite was compiled. -** ^(R is constant for a particular build of SQLite. Except, there are two -** distinct values of R when SQLite is compiled with the proprietary -** ZIPVFS extension.)^ ^The second argument to -** xCreate(), bPurgeable, is true if the cache being created will -** be used to cache database pages of a file stored on disk, or -** false if it is used for an in-memory database. The cache implementation -** does not have to do anything special based with the value of bPurgeable; -** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will -** never invoke xUnpin() except to deliberately delete a page. -** ^In other words, calls to xUnpin() on a cache with bPurgeable set to -** false will always have the "discard" flag set to true. -** ^Hence, a cache created with bPurgeable false will -** never contain any unpinned pages. -** -** [[the xCachesize() page cache method]] -** ^(The xCachesize() method may be called at any time by SQLite to set the -** suggested maximum cache-size (number of pages stored by) the cache -** instance passed as the first argument. This is the value configured using -** the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable -** parameter, the implementation is not required to do anything with this -** value; it is advisory only. -** -** [[the xPagecount() page cache methods]] -** The xPagecount() method must return the number of pages currently -** stored in the cache, both pinned and unpinned. -** -** [[the xFetch() page cache methods]] -** The xFetch() method locates a page in the cache and returns a pointer to -** the page, or a NULL pointer. -** A "page", in this context, means a buffer of szPage bytes aligned at an -** 8-byte boundary. The page to be fetched is determined by the key. ^The -** minimum key value is 1. After it has been retrieved using xFetch, the page -** is considered to be "pinned". -** -** If the requested page is already in the page cache, then the page cache -** implementation must return a pointer to the page buffer with its content -** intact. If the requested page is not already in the cache, then the -** cache implementation should use the value of the createFlag -** parameter to help it determined what action to take: -** -** -**
createFlag Behaviour when page is not already in cache -**
0 Do not allocate a new page. Return NULL. -**
1 Allocate a new page if it easy and convenient to do so. -** Otherwise return NULL. -**
2 Make every effort to allocate a new page. Only return -** NULL if allocating a new page is effectively impossible. -**
-** -** ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1. SQLite -** will only use a createFlag of 2 after a prior call with a createFlag of 1 -** failed.)^ In between the to xFetch() calls, SQLite may -** attempt to unpin one or more cache pages by spilling the content of -** pinned pages to disk and synching the operating system disk cache. -** -** [[the xUnpin() page cache method]] -** ^xUnpin() is called by SQLite with a pointer to a currently pinned page -** as its second argument. If the third parameter, discard, is non-zero, -** then the page must be evicted from the cache. -** ^If the discard parameter is -** zero, then the page may be discarded or retained at the discretion of -** page cache implementation. ^The page cache implementation -** may choose to evict unpinned pages at any time. -** -** The cache must not perform any reference counting. A single -** call to xUnpin() unpins the page regardless of the number of prior calls -** to xFetch(). -** -** [[the xRekey() page cache methods]] -** The xRekey() method is used to change the key value associated with the -** page passed as the second argument. If the cache -** previously contains an entry associated with newKey, it must be -** discarded. ^Any prior cache entry associated with newKey is guaranteed not -** to be pinned. -** -** When SQLite calls the xTruncate() method, the cache must discard all -** existing cache entries with page numbers (keys) greater than or equal -** to the value of the iLimit parameter passed to xTruncate(). If any -** of these pages are pinned, they are implicitly unpinned, meaning that -** they can be safely discarded. -** -** [[the xDestroy() page cache method]] -** ^The xDestroy() method is used to delete a cache allocated by xCreate(). -** All resources associated with the specified cache should be freed. ^After -** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] -** handle invalid, and will not use it with any other sqlite3_pcache_methods -** functions. -*/ -typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; -struct sqlite3_pcache_methods { - void *pArg; - int (*xInit)(void*); - void (*xShutdown)(void*); - sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); - void (*xCachesize)(sqlite3_pcache*, int nCachesize); - int (*xPagecount)(sqlite3_pcache*); - void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); - void (*xUnpin)(sqlite3_pcache*, void*, int discard); - void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (*xDestroy)(sqlite3_pcache*); -}; - -/* -** CAPI3REF: Online Backup Object -** -** The sqlite3_backup object records state information about an ongoing -** online backup operation. ^The sqlite3_backup object is created by -** a call to [sqlite3_backup_init()] and is destroyed by a call to -** [sqlite3_backup_finish()]. -** -** See Also: [Using the SQLite Online Backup API] -*/ -typedef struct sqlite3_backup sqlite3_backup; - -/* -** CAPI3REF: Online Backup API. -** -** The backup API copies the content of one database into another. -** It is useful either for creating backups of databases or -** for copying in-memory databases to or from persistent files. -** -** See Also: [Using the SQLite Online Backup API] -** -** ^SQLite holds a write transaction open on the destination database file -** for the duration of the backup operation. -** ^The source database is read-locked only while it is being read; -** it is not locked continuously for the entire backup operation. -** ^Thus, the backup may be performed on a live source database without -** preventing other database connections from -** reading or writing to the source database while the backup is underway. -** -** ^(To perform a backup operation: -**
    -**
  1. sqlite3_backup_init() is called once to initialize the -** backup, -**
  2. sqlite3_backup_step() is called one or more times to transfer -** the data between the two databases, and finally -**
  3. sqlite3_backup_finish() is called to release all resources -** associated with the backup operation. -**
)^ -** There should be exactly one call to sqlite3_backup_finish() for each -** successful call to sqlite3_backup_init(). -** -** [[sqlite3_backup_init()]] sqlite3_backup_init() -** -** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the -** [database connection] associated with the destination database -** and the database name, respectively. -** ^The database name is "main" for the main database, "temp" for the -** temporary database, or the name specified after the AS keyword in -** an [ATTACH] statement for an attached database. -** ^The S and M arguments passed to -** sqlite3_backup_init(D,N,S,M) identify the [database connection] -** and database name of the source database, respectively. -** ^The source and destination [database connections] (parameters S and D) -** must be different or else sqlite3_backup_init(D,N,S,M) will fail with -** an error. -** -** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is -** returned and an error code and error message are stored in the -** destination [database connection] D. -** ^The error code and message for the failed call to sqlite3_backup_init() -** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or -** [sqlite3_errmsg16()] functions. -** ^A successful call to sqlite3_backup_init() returns a pointer to an -** [sqlite3_backup] object. -** ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and -** sqlite3_backup_finish() functions to perform the specified backup -** operation. -** -** [[sqlite3_backup_step()]] sqlite3_backup_step() -** -** ^Function sqlite3_backup_step(B,N) will copy up to N pages between -** the source and destination databases specified by [sqlite3_backup] object B. -** ^If N is negative, all remaining source pages are copied. -** ^If sqlite3_backup_step(B,N) successfully copies N pages and there -** are still more pages to be copied, then the function returns [SQLITE_OK]. -** ^If sqlite3_backup_step(B,N) successfully finishes copying all pages -** from source to destination, then it returns [SQLITE_DONE]. -** ^If an error occurs while running sqlite3_backup_step(B,N), -** then an [error code] is returned. ^As well as [SQLITE_OK] and -** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY], -** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an -** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code. -** -** ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if -**
    -**
  1. the destination database was opened read-only, or -**
  2. the destination database is using write-ahead-log journaling -** and the destination and source page sizes differ, or -**
  3. the destination database is an in-memory database and the -** destination and source page sizes differ. -**
)^ -** -** ^If sqlite3_backup_step() cannot obtain a required file-system lock, then -** the [sqlite3_busy_handler | busy-handler function] -** is invoked (if one is specified). ^If the -** busy-handler returns non-zero before the lock is available, then -** [SQLITE_BUSY] is returned to the caller. ^In this case the call to -** sqlite3_backup_step() can be retried later. ^If the source -** [database connection] -** is being used to write to the source database when sqlite3_backup_step() -** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this -** case the call to sqlite3_backup_step() can be retried later on. ^(If -** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or -** [SQLITE_READONLY] is returned, then -** there is no point in retrying the call to sqlite3_backup_step(). These -** errors are considered fatal.)^ The application must accept -** that the backup operation has failed and pass the backup operation handle -** to the sqlite3_backup_finish() to release associated resources. -** -** ^The first call to sqlite3_backup_step() obtains an exclusive lock -** on the destination file. ^The exclusive lock is not released until either -** sqlite3_backup_finish() is called or the backup operation is complete -** and sqlite3_backup_step() returns [SQLITE_DONE]. ^Every call to -** sqlite3_backup_step() obtains a [shared lock] on the source database that -** lasts for the duration of the sqlite3_backup_step() call. -** ^Because the source database is not locked between calls to -** sqlite3_backup_step(), the source database may be modified mid-way -** through the backup process. ^If the source database is modified by an -** external process or via a database connection other than the one being -** used by the backup operation, then the backup will be automatically -** restarted by the next call to sqlite3_backup_step(). ^If the source -** database is modified by the using the same database connection as is used -** by the backup operation, then the backup database is automatically -** updated at the same time. -** -** [[sqlite3_backup_finish()]] sqlite3_backup_finish() -** -** When sqlite3_backup_step() has returned [SQLITE_DONE], or when the -** application wishes to abandon the backup operation, the application -** should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish(). -** ^The sqlite3_backup_finish() interfaces releases all -** resources associated with the [sqlite3_backup] object. -** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any -** active write-transaction on the destination database is rolled back. -** The [sqlite3_backup] object is invalid -** and may not be used following a call to sqlite3_backup_finish(). -** -** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no -** sqlite3_backup_step() errors occurred, regardless or whether or not -** sqlite3_backup_step() completed. -** ^If an out-of-memory condition or IO error occurred during any prior -** sqlite3_backup_step() call on the same [sqlite3_backup] object, then -** sqlite3_backup_finish() returns the corresponding [error code]. -** -** ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step() -** is not a permanent error and does not affect the return value of -** sqlite3_backup_finish(). -** -** [[sqlite3_backup__remaining()]] [[sqlite3_backup_pagecount()]] -** sqlite3_backup_remaining() and sqlite3_backup_pagecount() -** -** ^Each call to sqlite3_backup_step() sets two values inside -** the [sqlite3_backup] object: the number of pages still to be backed -** up and the total number of pages in the source database file. -** The sqlite3_backup_remaining() and sqlite3_backup_pagecount() interfaces -** retrieve these two values, respectively. -** -** ^The values returned by these functions are only updated by -** sqlite3_backup_step(). ^If the source database is modified during a backup -** operation, then the values are not updated to account for any extra -** pages that need to be updated or the size of the source database file -** changing. -** -** Concurrent Usage of Database Handles -** -** ^The source [database connection] may be used by the application for other -** purposes while a backup operation is underway or being initialized. -** ^If SQLite is compiled and configured to support threadsafe database -** connections, then the source database connection may be used concurrently -** from within other threads. -** -** However, the application must guarantee that the destination -** [database connection] is not passed to any other API (by any thread) after -** sqlite3_backup_init() is called and before the corresponding call to -** sqlite3_backup_finish(). SQLite does not currently check to see -** if the application incorrectly accesses the destination [database connection] -** and so no error code is reported, but the operations may malfunction -** nevertheless. Use of the destination database connection while a -** backup is in progress might also also cause a mutex deadlock. -** -** If running in [shared cache mode], the application must -** guarantee that the shared cache used by the destination database -** is not accessed while the backup is running. In practice this means -** that the application must guarantee that the disk file being -** backed up to is not accessed by any connection within the process, -** not just the specific connection that was passed to sqlite3_backup_init(). -** -** The [sqlite3_backup] object itself is partially threadsafe. Multiple -** threads may safely make multiple concurrent calls to sqlite3_backup_step(). -** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() -** APIs are not strictly speaking threadsafe. If they are invoked at the -** same time as another thread is invoking sqlite3_backup_step() it is -** possible that they return invalid values. -*/ -SQLITE_API sqlite3_backup *sqlite3_backup_init( - sqlite3 *pDest, /* Destination database handle */ - const char *zDestName, /* Destination database name */ - sqlite3 *pSource, /* Source database handle */ - const char *zSourceName /* Source database name */ -); -SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage); -SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p); -SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p); -SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); - -/* -** CAPI3REF: Unlock Notification -** -** ^When running in shared-cache mode, a database operation may fail with -** an [SQLITE_LOCKED] error if the required locks on the shared-cache or -** individual tables within the shared-cache cannot be obtained. See -** [SQLite Shared-Cache Mode] for a description of shared-cache locking. -** ^This API may be used to register a callback that SQLite will invoke -** when the connection currently holding the required lock relinquishes it. -** ^This API is only available if the library was compiled with the -** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined. -** -** See Also: [Using the SQLite Unlock Notification Feature]. -** -** ^Shared-cache locks are released when a database connection concludes -** its current transaction, either by committing it or rolling it back. -** -** ^When a connection (known as the blocked connection) fails to obtain a -** shared-cache lock and SQLITE_LOCKED is returned to the caller, the -** identity of the database connection (the blocking connection) that -** has locked the required resource is stored internally. ^After an -** application receives an SQLITE_LOCKED error, it may call the -** sqlite3_unlock_notify() method with the blocked connection handle as -** the first argument to register for a callback that will be invoked -** when the blocking connections current transaction is concluded. ^The -** callback is invoked from within the [sqlite3_step] or [sqlite3_close] -** call that concludes the blocking connections transaction. -** -** ^(If sqlite3_unlock_notify() is called in a multi-threaded application, -** there is a chance that the blocking connection will have already -** concluded its transaction by the time sqlite3_unlock_notify() is invoked. -** If this happens, then the specified callback is invoked immediately, -** from within the call to sqlite3_unlock_notify().)^ -** -** ^If the blocked connection is attempting to obtain a write-lock on a -** shared-cache table, and more than one other connection currently holds -** a read-lock on the same table, then SQLite arbitrarily selects one of -** the other connections to use as the blocking connection. -** -** ^(There may be at most one unlock-notify callback registered by a -** blocked connection. If sqlite3_unlock_notify() is called when the -** blocked connection already has a registered unlock-notify callback, -** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is -** called with a NULL pointer as its second argument, then any existing -** unlock-notify callback is canceled. ^The blocked connections -** unlock-notify callback may also be canceled by closing the blocked -** connection using [sqlite3_close()]. -** -** The unlock-notify callback is not reentrant. If an application invokes -** any sqlite3_xxx API functions from within an unlock-notify callback, a -** crash or deadlock may be the result. -** -** ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always -** returns SQLITE_OK. -** -** Callback Invocation Details -** -** When an unlock-notify callback is registered, the application provides a -** single void* pointer that is passed to the callback when it is invoked. -** However, the signature of the callback function allows SQLite to pass -** it an array of void* context pointers. The first argument passed to -** an unlock-notify callback is a pointer to an array of void* pointers, -** and the second is the number of entries in the array. -** -** When a blocking connections transaction is concluded, there may be -** more than one blocked connection that has registered for an unlock-notify -** callback. ^If two or more such blocked connections have specified the -** same callback function, then instead of invoking the callback function -** multiple times, it is invoked once with the set of void* context pointers -** specified by the blocked connections bundled together into an array. -** This gives the application an opportunity to prioritize any actions -** related to the set of unblocked database connections. -** -** Deadlock Detection -** -** Assuming that after registering for an unlock-notify callback a -** database waits for the callback to be issued before taking any further -** action (a reasonable assumption), then using this API may cause the -** application to deadlock. For example, if connection X is waiting for -** connection Y's transaction to be concluded, and similarly connection -** Y is waiting on connection X's transaction, then neither connection -** will proceed and the system may remain deadlocked indefinitely. -** -** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock -** detection. ^If a given call to sqlite3_unlock_notify() would put the -** system in a deadlocked state, then SQLITE_LOCKED is returned and no -** unlock-notify callback is registered. The system is said to be in -** a deadlocked state if connection A has registered for an unlock-notify -** callback on the conclusion of connection B's transaction, and connection -** B has itself registered for an unlock-notify callback when connection -** A's transaction is concluded. ^Indirect deadlock is also detected, so -** the system is also considered to be deadlocked if connection B has -** registered for an unlock-notify callback on the conclusion of connection -** C's transaction, where connection C is waiting on connection A. ^Any -** number of levels of indirection are allowed. -** -** The "DROP TABLE" Exception -** -** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost -** always appropriate to call sqlite3_unlock_notify(). There is however, -** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement, -** SQLite checks if there are any currently executing SELECT statements -** that belong to the same connection. If there are, SQLITE_LOCKED is -** returned. In this case there is no "blocking connection", so invoking -** sqlite3_unlock_notify() results in the unlock-notify callback being -** invoked immediately. If the application then re-attempts the "DROP TABLE" -** or "DROP INDEX" query, an infinite loop might be the result. -** -** One way around this problem is to check the extended error code returned -** by an sqlite3_step() call. ^(If there is a blocking connection, then the -** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in -** the special "DROP TABLE/INDEX" case, the extended error code is just -** SQLITE_LOCKED.)^ -*/ -SQLITE_API int sqlite3_unlock_notify( - sqlite3 *pBlocked, /* Waiting connection */ - void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ - void *pNotifyArg /* Argument to pass to xNotify */ -); - - -/* -** CAPI3REF: String Comparison -** -** ^The [sqlite3_strnicmp()] API allows applications and extensions to -** compare the contents of two buffers containing UTF-8 strings in a -** case-independent fashion, using the same definition of case independence -** that SQLite uses internally when comparing identifiers. -*/ -SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); - -/* -** CAPI3REF: Error Logging Interface -** -** ^The [sqlite3_log()] interface writes a message into the error log -** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()]. -** ^If logging is enabled, the zFormat string and subsequent arguments are -** used with [sqlite3_snprintf()] to generate the final output string. -** -** The sqlite3_log() interface is intended for use by extensions such as -** virtual tables, collating functions, and SQL functions. While there is -** nothing to prevent an application from calling sqlite3_log(), doing so -** is considered bad form. -** -** The zFormat string must not be NULL. -** -** To avoid deadlocks and other threading problems, the sqlite3_log() routine -** will not use dynamically allocated memory. The log message is stored in -** a fixed-length buffer on the stack. If the log message is longer than -** a few hundred characters, it will be truncated to the length of the -** buffer. -*/ -SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); - -/* -** CAPI3REF: Write-Ahead Log Commit Hook -** -** ^The [sqlite3_wal_hook()] function is used to register a callback that -** will be invoked each time a database connection commits data to a -** [write-ahead log] (i.e. whenever a transaction is committed in -** [journal_mode | journal_mode=WAL mode]). -** -** ^The callback is invoked by SQLite after the commit has taken place and -** the associated write-lock on the database released, so the implementation -** may read, write or [checkpoint] the database as required. -** -** ^The first parameter passed to the callback function when it is invoked -** is a copy of the third parameter passed to sqlite3_wal_hook() when -** registering the callback. ^The second is a copy of the database handle. -** ^The third parameter is the name of the database that was written to - -** either "main" or the name of an [ATTACH]-ed database. ^The fourth parameter -** is the number of pages currently in the write-ahead log file, -** including those that were just committed. -** -** The callback function should normally return [SQLITE_OK]. ^If an error -** code is returned, that error will propagate back up through the -** SQLite code base to cause the statement that provoked the callback -** to report an error, though the commit will have still occurred. If the -** callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value -** that does not correspond to any valid SQLite error code, the results -** are undefined. -** -** A single database handle may have at most a single write-ahead log callback -** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any -** previously registered write-ahead log callback. ^Note that the -** [sqlite3_wal_autocheckpoint()] interface and the -** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will -** those overwrite any prior [sqlite3_wal_hook()] settings. -*/ -SQLITE_API void *sqlite3_wal_hook( - sqlite3*, - int(*)(void *,sqlite3*,const char*,int), - void* -); - -/* -** CAPI3REF: Configure an auto-checkpoint -** -** ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around -** [sqlite3_wal_hook()] that causes any database on [database connection] D -** to automatically [checkpoint] -** after committing a transaction if there are N or -** more frames in the [write-ahead log] file. ^Passing zero or -** a negative value as the nFrame parameter disables automatic -** checkpoints entirely. -** -** ^The callback registered by this function replaces any existing callback -** registered using [sqlite3_wal_hook()]. ^Likewise, registering a callback -** using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism -** configured by this function. -** -** ^The [wal_autocheckpoint pragma] can be used to invoke this interface -** from SQL. -** -** ^Every new [database connection] defaults to having the auto-checkpoint -** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] -** pages. The use of this interface -** is only necessary if the default setting is found to be suboptimal -** for a particular application. -*/ -SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); - -/* -** CAPI3REF: Checkpoint a database -** -** ^The [sqlite3_wal_checkpoint(D,X)] interface causes database named X -** on [database connection] D to be [checkpointed]. ^If X is NULL or an -** empty string, then a checkpoint is run on all databases of -** connection D. ^If the database connection D is not in -** [WAL | write-ahead log mode] then this interface is a harmless no-op. -** -** ^The [wal_checkpoint pragma] can be used to invoke this interface -** from SQL. ^The [sqlite3_wal_autocheckpoint()] interface and the -** [wal_autocheckpoint pragma] can be used to cause this interface to be -** run whenever the WAL reaches a certain size threshold. -** -** See also: [sqlite3_wal_checkpoint_v2()] -*/ -SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); - -/* -** CAPI3REF: Checkpoint a database -** -** Run a checkpoint operation on WAL database zDb attached to database -** handle db. The specific operation is determined by the value of the -** eMode parameter: -** -**
-**
SQLITE_CHECKPOINT_PASSIVE
-** Checkpoint as many frames as possible without waiting for any database -** readers or writers to finish. Sync the db file if all frames in the log -** are checkpointed. This mode is the same as calling -** sqlite3_wal_checkpoint(). The busy-handler callback is never invoked. -** -**
SQLITE_CHECKPOINT_FULL
-** This mode blocks (calls the busy-handler callback) until there is no -** database writer and all readers are reading from the most recent database -** snapshot. It then checkpoints all frames in the log file and syncs the -** database file. This call blocks database writers while it is running, -** but not database readers. -** -**
SQLITE_CHECKPOINT_RESTART
-** This mode works the same way as SQLITE_CHECKPOINT_FULL, except after -** checkpointing the log file it blocks (calls the busy-handler callback) -** until all readers are reading from the database file only. This ensures -** that the next client to write to the database file restarts the log file -** from the beginning. This call blocks database writers while it is running, -** but not database readers. -**
-** -** If pnLog is not NULL, then *pnLog is set to the total number of frames in -** the log file before returning. If pnCkpt is not NULL, then *pnCkpt is set to -** the total number of checkpointed frames (including any that were already -** checkpointed when this function is called). *pnLog and *pnCkpt may be -** populated even if sqlite3_wal_checkpoint_v2() returns other than SQLITE_OK. -** If no values are available because of an error, they are both set to -1 -** before returning to communicate this to the caller. -** -** All calls obtain an exclusive "checkpoint" lock on the database file. If -** any other process is running a checkpoint operation at the same time, the -** lock cannot be obtained and SQLITE_BUSY is returned. Even if there is a -** busy-handler configured, it will not be invoked in this case. -** -** The SQLITE_CHECKPOINT_FULL and RESTART modes also obtain the exclusive -** "writer" lock on the database file. If the writer lock cannot be obtained -** immediately, and a busy-handler is configured, it is invoked and the writer -** lock retried until either the busy-handler returns 0 or the lock is -** successfully obtained. The busy-handler is also invoked while waiting for -** database readers as described above. If the busy-handler returns 0 before -** the writer lock is obtained or while waiting for database readers, the -** checkpoint operation proceeds from that point in the same way as -** SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible -** without blocking any further. SQLITE_BUSY is returned in this case. -** -** If parameter zDb is NULL or points to a zero length string, then the -** specified operation is attempted on all WAL databases. In this case the -** values written to output parameters *pnLog and *pnCkpt are undefined. If -** an SQLITE_BUSY error is encountered when processing one or more of the -** attached WAL databases, the operation is still attempted on any remaining -** attached databases and SQLITE_BUSY is returned to the caller. If any other -** error occurs while processing an attached database, processing is abandoned -** and the error code returned to the caller immediately. If no error -** (SQLITE_BUSY or otherwise) is encountered while processing the attached -** databases, SQLITE_OK is returned. -** -** If database zDb is the name of an attached database that is not in WAL -** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. If -** zDb is not NULL (or a zero length string) and is not the name of any -** attached database, SQLITE_ERROR is returned to the caller. -*/ -SQLITE_API int sqlite3_wal_checkpoint_v2( - sqlite3 *db, /* Database handle */ - const char *zDb, /* Name of attached database (or NULL) */ - int eMode, /* SQLITE_CHECKPOINT_* value */ - int *pnLog, /* OUT: Size of WAL log in frames */ - int *pnCkpt /* OUT: Total number of frames checkpointed */ -); - -/* -** CAPI3REF: Checkpoint operation parameters -** -** These constants can be used as the 3rd parameter to -** [sqlite3_wal_checkpoint_v2()]. See the [sqlite3_wal_checkpoint_v2()] -** documentation for additional information about the meaning and use of -** each of these values. -*/ -#define SQLITE_CHECKPOINT_PASSIVE 0 -#define SQLITE_CHECKPOINT_FULL 1 -#define SQLITE_CHECKPOINT_RESTART 2 - -/* -** CAPI3REF: Virtual Table Interface Configuration -** -** This function may be called by either the [xConnect] or [xCreate] method -** of a [virtual table] implementation to configure -** various facets of the virtual table interface. -** -** If this interface is invoked outside the context of an xConnect or -** xCreate virtual table method then the behavior is undefined. -** -** At present, there is only one option that may be configured using -** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options -** may be added in the future. -*/ -SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); - -/* -** CAPI3REF: Virtual Table Configuration Options -** -** These macros define the various options to the -** [sqlite3_vtab_config()] interface that [virtual table] implementations -** can use to customize and optimize their behavior. -** -**
-**
SQLITE_VTAB_CONSTRAINT_SUPPORT -**
Calls of the form -** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported, -** where X is an integer. If X is zero, then the [virtual table] whose -** [xCreate] or [xConnect] method invoked [sqlite3_vtab_config()] does not -** support constraints. In this configuration (which is the default) if -** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire -** statement is rolled back as if [ON CONFLICT | OR ABORT] had been -** specified as part of the users SQL statement, regardless of the actual -** ON CONFLICT mode specified. -** -** If X is non-zero, then the virtual table implementation guarantees -** that if [xUpdate] returns [SQLITE_CONSTRAINT], it will do so before -** any modifications to internal or persistent data structures have been made. -** If the [ON CONFLICT] mode is ABORT, FAIL, IGNORE or ROLLBACK, SQLite -** is able to roll back a statement or database transaction, and abandon -** or continue processing the current SQL statement as appropriate. -** If the ON CONFLICT mode is REPLACE and the [xUpdate] method returns -** [SQLITE_CONSTRAINT], SQLite handles this as if the ON CONFLICT mode -** had been ABORT. -** -** Virtual table implementations that are required to handle OR REPLACE -** must do so within the [xUpdate] method. If a call to the -** [sqlite3_vtab_on_conflict()] function indicates that the current ON -** CONFLICT policy is REPLACE, the virtual table implementation should -** silently replace the appropriate rows within the xUpdate callback and -** return SQLITE_OK. Or, if this is not possible, it may return -** SQLITE_CONSTRAINT, in which case SQLite falls back to OR ABORT -** constraint handling. -**
-*/ -#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1 - -/* -** CAPI3REF: Determine The Virtual Table Conflict Policy -** -** This function may only be called from within a call to the [xUpdate] method -** of a [virtual table] implementation for an INSERT or UPDATE operation. ^The -** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], -** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode -** of the SQL statement that triggered the call to the [xUpdate] method of the -** [virtual table]. -*/ -SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *); - -/* -** CAPI3REF: Conflict resolution modes -** -** These constants are returned by [sqlite3_vtab_on_conflict()] to -** inform a [virtual table] implementation what the [ON CONFLICT] mode -** is for the SQL statement being evaluated. -** -** Note that the [SQLITE_IGNORE] constant is also used as a potential -** return value from the [sqlite3_set_authorizer()] callback and that -** [SQLITE_ABORT] is also a [result code]. -*/ -#define SQLITE_ROLLBACK 1 -/* #define SQLITE_IGNORE 2 // Also used by sqlite3_authorizer() callback */ -#define SQLITE_FAIL 3 -/* #define SQLITE_ABORT 4 // Also an error code */ -#define SQLITE_REPLACE 5 - - - -/* -** Undo the hack that converts floating point types to integer for -** builds on processors without floating point support. -*/ -#ifdef SQLITE_OMIT_FLOATING_POINT -# undef double -#endif - -#if 0 -} /* End of the 'extern "C"' block */ -#endif -#endif - -/* -** 2010 August 30 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -*/ - -#ifndef _SQLITE3RTREE_H_ -#define _SQLITE3RTREE_H_ - - -#if 0 -extern "C" { -#endif - -typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry; - -/* -** Register a geometry callback named zGeom that can be used as part of an -** R-Tree geometry query as follows: -** -** SELECT ... FROM WHERE MATCH $zGeom(... params ...) -*/ -SQLITE_API int sqlite3_rtree_geometry_callback( - sqlite3 *db, - const char *zGeom, - int (*xGeom)(sqlite3_rtree_geometry *, int nCoord, double *aCoord, int *pRes), - void *pContext -); - - -/* -** A pointer to a structure of the following type is passed as the first -** argument to callbacks registered using rtree_geometry_callback(). -*/ -struct sqlite3_rtree_geometry { - void *pContext; /* Copy of pContext passed to s_r_g_c() */ - int nParam; /* Size of array aParam[] */ - double *aParam; /* Parameters passed to SQL geom function */ - void *pUser; /* Callback implementation user data */ - void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */ -}; - - -#if 0 -} /* end of the 'extern "C"' block */ -#endif - -#endif /* ifndef _SQLITE3RTREE_H_ */ - - -/************** End of sqlite3.h *********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include hash.h in the middle of sqliteInt.h ******************/ -/************** Begin file hash.h ********************************************/ -/* -** 2001 September 22 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This is the header file for the generic hash-table implemenation -** used in SQLite. -*/ -#ifndef _SQLITE_HASH_H_ -#define _SQLITE_HASH_H_ - -/* Forward declarations of structures. */ -typedef struct Hash Hash; -typedef struct HashElem HashElem; - -/* A complete hash table is an instance of the following structure. -** The internals of this structure are intended to be opaque -- client -** code should not attempt to access or modify the fields of this structure -** directly. Change this structure only by using the routines below. -** However, some of the "procedures" and "functions" for modifying and -** accessing this structure are really macros, so we can't really make -** this structure opaque. -** -** All elements of the hash table are on a single doubly-linked list. -** Hash.first points to the head of this list. -** -** There are Hash.htsize buckets. Each bucket points to a spot in -** the global doubly-linked list. The contents of the bucket are the -** element pointed to plus the next _ht.count-1 elements in the list. -** -** Hash.htsize and Hash.ht may be zero. In that case lookup is done -** by a linear search of the global list. For small tables, the -** Hash.ht table is never allocated because if there are few elements -** in the table, it is faster to do a linear search than to manage -** the hash table. -*/ -struct Hash { - unsigned int htsize; /* Number of buckets in the hash table */ - unsigned int count; /* Number of entries in this table */ - HashElem *first; /* The first element of the array */ - struct _ht { /* the hash table */ - int count; /* Number of entries with this hash */ - HashElem *chain; /* Pointer to first entry with this hash */ - } *ht; -}; - -/* Each element in the hash table is an instance of the following -** structure. All elements are stored on a single doubly-linked list. -** -** Again, this structure is intended to be opaque, but it can't really -** be opaque because it is used by macros. -*/ -struct HashElem { - HashElem *next, *prev; /* Next and previous elements in the table */ - void *data; /* Data associated with this element */ - const char *pKey; int nKey; /* Key associated with this element */ -}; - -/* -** Access routines. To delete, insert a NULL pointer. -*/ -SQLITE_PRIVATE void sqlite3HashInit(Hash*); -SQLITE_PRIVATE void *sqlite3HashInsert(Hash*, const char *pKey, int nKey, void *pData); -SQLITE_PRIVATE void *sqlite3HashFind(const Hash*, const char *pKey, int nKey); -SQLITE_PRIVATE void sqlite3HashClear(Hash*); - -/* -** Macros for looping over all elements of a hash table. The idiom is -** like this: -** -** Hash h; -** HashElem *p; -** ... -** for(p=sqliteHashFirst(&h); p; p=sqliteHashNext(p)){ -** SomeStructure *pData = sqliteHashData(p); -** // do something with pData -** } -*/ -#define sqliteHashFirst(H) ((H)->first) -#define sqliteHashNext(E) ((E)->next) -#define sqliteHashData(E) ((E)->data) -/* #define sqliteHashKey(E) ((E)->pKey) // NOT USED */ -/* #define sqliteHashKeysize(E) ((E)->nKey) // NOT USED */ - -/* -** Number of entries in a hash table -*/ -/* #define sqliteHashCount(H) ((H)->count) // NOT USED */ - -#endif /* _SQLITE_HASH_H_ */ - -/************** End of hash.h ************************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include parse.h in the middle of sqliteInt.h *****************/ -/************** Begin file parse.h *******************************************/ -#define TK_SEMI 1 -#define TK_EXPLAIN 2 -#define TK_QUERY 3 -#define TK_PLAN 4 -#define TK_BEGIN 5 -#define TK_TRANSACTION 6 -#define TK_DEFERRED 7 -#define TK_IMMEDIATE 8 -#define TK_EXCLUSIVE 9 -#define TK_COMMIT 10 -#define TK_END 11 -#define TK_ROLLBACK 12 -#define TK_SAVEPOINT 13 -#define TK_RELEASE 14 -#define TK_TO 15 -#define TK_TABLE 16 -#define TK_CREATE 17 -#define TK_IF 18 -#define TK_NOT 19 -#define TK_EXISTS 20 -#define TK_TEMP 21 -#define TK_LP 22 -#define TK_RP 23 -#define TK_AS 24 -#define TK_COMMA 25 -#define TK_ID 26 -#define TK_INDEXED 27 -#define TK_ABORT 28 -#define TK_ACTION 29 -#define TK_AFTER 30 -#define TK_ANALYZE 31 -#define TK_ASC 32 -#define TK_ATTACH 33 -#define TK_BEFORE 34 -#define TK_BY 35 -#define TK_CASCADE 36 -#define TK_CAST 37 -#define TK_COLUMNKW 38 -#define TK_CONFLICT 39 -#define TK_DATABASE 40 -#define TK_DESC 41 -#define TK_DETACH 42 -#define TK_EACH 43 -#define TK_FAIL 44 -#define TK_FOR 45 -#define TK_IGNORE 46 -#define TK_INITIALLY 47 -#define TK_INSTEAD 48 -#define TK_LIKE_KW 49 -#define TK_MATCH 50 -#define TK_NO 51 -#define TK_KEY 52 -#define TK_OF 53 -#define TK_OFFSET 54 -#define TK_PRAGMA 55 -#define TK_RAISE 56 -#define TK_REPLACE 57 -#define TK_RESTRICT 58 -#define TK_ROW 59 -#define TK_TRIGGER 60 -#define TK_VACUUM 61 -#define TK_VIEW 62 -#define TK_VIRTUAL 63 -#define TK_REINDEX 64 -#define TK_RENAME 65 -#define TK_CTIME_KW 66 -#define TK_ANY 67 -#define TK_OR 68 -#define TK_AND 69 -#define TK_IS 70 -#define TK_BETWEEN 71 -#define TK_IN 72 -#define TK_ISNULL 73 -#define TK_NOTNULL 74 -#define TK_NE 75 -#define TK_EQ 76 -#define TK_GT 77 -#define TK_LE 78 -#define TK_LT 79 -#define TK_GE 80 -#define TK_ESCAPE 81 -#define TK_BITAND 82 -#define TK_BITOR 83 -#define TK_LSHIFT 84 -#define TK_RSHIFT 85 -#define TK_PLUS 86 -#define TK_MINUS 87 -#define TK_STAR 88 -#define TK_SLASH 89 -#define TK_REM 90 -#define TK_CONCAT 91 -#define TK_COLLATE 92 -#define TK_BITNOT 93 -#define TK_STRING 94 -#define TK_JOIN_KW 95 -#define TK_CONSTRAINT 96 -#define TK_DEFAULT 97 -#define TK_NULL 98 -#define TK_PRIMARY 99 -#define TK_UNIQUE 100 -#define TK_CHECK 101 -#define TK_REFERENCES 102 -#define TK_AUTOINCR 103 -#define TK_ON 104 -#define TK_INSERT 105 -#define TK_DELETE 106 -#define TK_UPDATE 107 -#define TK_SET 108 -#define TK_DEFERRABLE 109 -#define TK_FOREIGN 110 -#define TK_DROP 111 -#define TK_UNION 112 -#define TK_ALL 113 -#define TK_EXCEPT 114 -#define TK_INTERSECT 115 -#define TK_SELECT 116 -#define TK_DISTINCT 117 -#define TK_DOT 118 -#define TK_FROM 119 -#define TK_JOIN 120 -#define TK_USING 121 -#define TK_ORDER 122 -#define TK_GROUP 123 -#define TK_HAVING 124 -#define TK_LIMIT 125 -#define TK_WHERE 126 -#define TK_INTO 127 -#define TK_VALUES 128 -#define TK_INTEGER 129 -#define TK_FLOAT 130 -#define TK_BLOB 131 -#define TK_REGISTER 132 -#define TK_VARIABLE 133 -#define TK_CASE 134 -#define TK_WHEN 135 -#define TK_THEN 136 -#define TK_ELSE 137 -#define TK_INDEX 138 -#define TK_ALTER 139 -#define TK_ADD 140 -#define TK_TO_TEXT 141 -#define TK_TO_BLOB 142 -#define TK_TO_NUMERIC 143 -#define TK_TO_INT 144 -#define TK_TO_REAL 145 -#define TK_ISNOT 146 -#define TK_END_OF_FILE 147 -#define TK_ILLEGAL 148 -#define TK_SPACE 149 -#define TK_UNCLOSED_STRING 150 -#define TK_FUNCTION 151 -#define TK_COLUMN 152 -#define TK_AGG_FUNCTION 153 -#define TK_AGG_COLUMN 154 -#define TK_CONST_FUNC 155 -#define TK_UMINUS 156 -#define TK_UPLUS 157 - -/************** End of parse.h ***********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -#include -#include -#include -#include -#include - -/* -** If compiling for a processor that lacks floating point support, -** substitute integer for floating-point -*/ -#ifdef SQLITE_OMIT_FLOATING_POINT -# define double sqlite_int64 -# define float sqlite_int64 -# define LONGDOUBLE_TYPE sqlite_int64 -# ifndef SQLITE_BIG_DBL -# define SQLITE_BIG_DBL (((sqlite3_int64)1)<<50) -# endif -# define SQLITE_OMIT_DATETIME_FUNCS 1 -# define SQLITE_OMIT_TRACE 1 -# undef SQLITE_MIXED_ENDIAN_64BIT_FLOAT -# undef SQLITE_HAVE_ISNAN -#endif -#ifndef SQLITE_BIG_DBL -# define SQLITE_BIG_DBL (1e99) -#endif - -/* -** OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0 -** afterward. Having this macro allows us to cause the C compiler -** to omit code used by TEMP tables without messy #ifndef statements. -*/ -#ifdef SQLITE_OMIT_TEMPDB -#define OMIT_TEMPDB 1 -#else -#define OMIT_TEMPDB 0 -#endif - -/* -** The "file format" number is an integer that is incremented whenever -** the VDBE-level file format changes. The following macros define the -** the default file format for new databases and the maximum file format -** that the library can read. -*/ -#define SQLITE_MAX_FILE_FORMAT 4 -#ifndef SQLITE_DEFAULT_FILE_FORMAT -# define SQLITE_DEFAULT_FILE_FORMAT 1 -#endif - -/* -** Determine whether triggers are recursive by default. This can be -** changed at run-time using a pragma. -*/ -#ifndef SQLITE_DEFAULT_RECURSIVE_TRIGGERS -# define SQLITE_DEFAULT_RECURSIVE_TRIGGERS 0 -#endif - -/* -** Provide a default value for SQLITE_TEMP_STORE in case it is not specified -** on the command-line -*/ -#ifndef SQLITE_TEMP_STORE -# define SQLITE_TEMP_STORE 1 -#endif - -/* -** GCC does not define the offsetof() macro so we'll have to do it -** ourselves. -*/ -#ifndef offsetof -#define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD)) -#endif - -/* -** Check to see if this machine uses EBCDIC. (Yes, believe it or -** not, there are still machines out there that use EBCDIC.) -*/ -#if 'A' == '\301' -# define SQLITE_EBCDIC 1 -#else -# define SQLITE_ASCII 1 -#endif - -/* -** Integers of known sizes. These typedefs might change for architectures -** where the sizes very. Preprocessor macros are available so that the -** types can be conveniently redefined at compile-type. Like this: -** -** cc '-DUINTPTR_TYPE=long long int' ... -*/ -#ifndef UINT32_TYPE -# ifdef HAVE_UINT32_T -# define UINT32_TYPE uint32_t -# else -# define UINT32_TYPE unsigned int -# endif -#endif -#ifndef UINT16_TYPE -# ifdef HAVE_UINT16_T -# define UINT16_TYPE uint16_t -# else -# define UINT16_TYPE unsigned short int -# endif -#endif -#ifndef INT16_TYPE -# ifdef HAVE_INT16_T -# define INT16_TYPE int16_t -# else -# define INT16_TYPE short int -# endif -#endif -#ifndef UINT8_TYPE -# ifdef HAVE_UINT8_T -# define UINT8_TYPE uint8_t -# else -# define UINT8_TYPE unsigned char -# endif -#endif -#ifndef INT8_TYPE -# ifdef HAVE_INT8_T -# define INT8_TYPE int8_t -# else -# define INT8_TYPE signed char -# endif -#endif -#ifndef LONGDOUBLE_TYPE -# define LONGDOUBLE_TYPE long double -#endif -typedef sqlite_int64 i64; /* 8-byte signed integer */ -typedef sqlite_uint64 u64; /* 8-byte unsigned integer */ -typedef UINT32_TYPE u32; /* 4-byte unsigned integer */ -typedef UINT16_TYPE u16; /* 2-byte unsigned integer */ -typedef INT16_TYPE i16; /* 2-byte signed integer */ -typedef UINT8_TYPE u8; /* 1-byte unsigned integer */ -typedef INT8_TYPE i8; /* 1-byte signed integer */ - -/* -** SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value -** that can be stored in a u32 without loss of data. The value -** is 0x00000000ffffffff. But because of quirks of some compilers, we -** have to specify the value in the less intuitive manner shown: -*/ -#define SQLITE_MAX_U32 ((((u64)1)<<32)-1) - -/* -** Macros to determine whether the machine is big or little endian, -** evaluated at runtime. -*/ -#ifdef SQLITE_AMALGAMATION -SQLITE_PRIVATE const int sqlite3one = 1; -#else -SQLITE_PRIVATE const int sqlite3one; -#endif -#if defined(i386) || defined(__i386__) || defined(_M_IX86)\ - || defined(__x86_64) || defined(__x86_64__) -# define SQLITE_BIGENDIAN 0 -# define SQLITE_LITTLEENDIAN 1 -# define SQLITE_UTF16NATIVE SQLITE_UTF16LE -#else -# define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0) -# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1) -# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE) -#endif - -/* -** Constants for the largest and smallest possible 64-bit signed integers. -** These macros are designed to work correctly on both 32-bit and 64-bit -** compilers. -*/ -#define LARGEST_INT64 (0xffffffff|(((i64)0x7fffffff)<<32)) -#define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64) - -/* -** Round up a number to the next larger multiple of 8. This is used -** to force 8-byte alignment on 64-bit architectures. -*/ -#define ROUND8(x) (((x)+7)&~7) - -/* -** Round down to the nearest multiple of 8 -*/ -#define ROUNDDOWN8(x) ((x)&~7) - -/* -** Assert that the pointer X is aligned to an 8-byte boundary. This -** macro is used only within assert() to verify that the code gets -** all alignment restrictions correct. -** -** Except, if SQLITE_4_BYTE_ALIGNED_MALLOC is defined, then the -** underlying malloc() implemention might return us 4-byte aligned -** pointers. In that case, only verify 4-byte alignment. -*/ -#ifdef SQLITE_4_BYTE_ALIGNED_MALLOC -# define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&3)==0) -#else -# define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&7)==0) -#endif - - -/* -** An instance of the following structure is used to store the busy-handler -** callback for a given sqlite handle. -** -** The sqlite.busyHandler member of the sqlite struct contains the busy -** callback for the database handle. Each pager opened via the sqlite -** handle is passed a pointer to sqlite.busyHandler. The busy-handler -** callback is currently invoked only from within pager.c. -*/ -typedef struct BusyHandler BusyHandler; -struct BusyHandler { - int (*xFunc)(void *,int); /* The busy callback */ - void *pArg; /* First arg to busy callback */ - int nBusy; /* Incremented with each busy call */ -}; - -/* -** Name of the master database table. The master database table -** is a special table that holds the names and attributes of all -** user tables and indices. -*/ -#define MASTER_NAME "sqlite_master" -#define TEMP_MASTER_NAME "sqlite_temp_master" - -/* -** The root-page of the master database table. -*/ -#define MASTER_ROOT 1 - -/* -** The name of the schema table. -*/ -#define SCHEMA_TABLE(x) ((!OMIT_TEMPDB)&&(x==1)?TEMP_MASTER_NAME:MASTER_NAME) - -/* -** A convenience macro that returns the number of elements in -** an array. -*/ -#define ArraySize(X) ((int)(sizeof(X)/sizeof(X[0]))) - -/* -** The following value as a destructor means to use sqlite3DbFree(). -** This is an internal extension to SQLITE_STATIC and SQLITE_TRANSIENT. -*/ -#define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3DbFree) - -/* -** When SQLITE_OMIT_WSD is defined, it means that the target platform does -** not support Writable Static Data (WSD) such as global and static variables. -** All variables must either be on the stack or dynamically allocated from -** the heap. When WSD is unsupported, the variable declarations scattered -** throughout the SQLite code must become constants instead. The SQLITE_WSD -** macro is used for this purpose. And instead of referencing the variable -** directly, we use its constant as a key to lookup the run-time allocated -** buffer that holds real variable. The constant is also the initializer -** for the run-time allocated buffer. -** -** In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL -** macros become no-ops and have zero performance impact. -*/ -#ifdef SQLITE_OMIT_WSD - #define SQLITE_WSD const - #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v))) - #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config) -SQLITE_API int sqlite3_wsd_init(int N, int J); -SQLITE_API void *sqlite3_wsd_find(void *K, int L); -#else - #define SQLITE_WSD - #define GLOBAL(t,v) v - #define sqlite3GlobalConfig sqlite3Config -#endif - -/* -** The following macros are used to suppress compiler warnings and to -** make it clear to human readers when a function parameter is deliberately -** left unused within the body of a function. This usually happens when -** a function is called via a function pointer. For example the -** implementation of an SQL aggregate step callback may not use the -** parameter indicating the number of arguments passed to the aggregate, -** if it knows that this is enforced elsewhere. -** -** When a function parameter is not used at all within the body of a function, -** it is generally named "NotUsed" or "NotUsed2" to make things even clearer. -** However, these macros may also be used to suppress warnings related to -** parameters that may or may not be used depending on compilation options. -** For example those parameters only used in assert() statements. In these -** cases the parameters are named as per the usual conventions. -*/ -#define UNUSED_PARAMETER(x) (void)(x) -#define UNUSED_PARAMETER2(x,y) UNUSED_PARAMETER(x),UNUSED_PARAMETER(y) - -/* -** Forward references to structures -*/ -typedef struct AggInfo AggInfo; -typedef struct AuthContext AuthContext; -typedef struct AutoincInfo AutoincInfo; -typedef struct Bitvec Bitvec; -typedef struct CollSeq CollSeq; -typedef struct Column Column; -typedef struct Db Db; -typedef struct Schema Schema; -typedef struct Expr Expr; -typedef struct ExprList ExprList; -typedef struct ExprSpan ExprSpan; -typedef struct FKey FKey; -typedef struct FuncDestructor FuncDestructor; -typedef struct FuncDef FuncDef; -typedef struct FuncDefHash FuncDefHash; -typedef struct IdList IdList; -typedef struct Index Index; -typedef struct IndexSample IndexSample; -typedef struct KeyClass KeyClass; -typedef struct KeyInfo KeyInfo; -typedef struct Lookaside Lookaside; -typedef struct LookasideSlot LookasideSlot; -typedef struct Module Module; -typedef struct NameContext NameContext; -typedef struct Parse Parse; -typedef struct RowSet RowSet; -typedef struct Savepoint Savepoint; -typedef struct Select Select; -typedef struct SrcList SrcList; -typedef struct StrAccum StrAccum; -typedef struct Table Table; -typedef struct TableLock TableLock; -typedef struct Token Token; -typedef struct Trigger Trigger; -typedef struct TriggerPrg TriggerPrg; -typedef struct TriggerStep TriggerStep; -typedef struct UnpackedRecord UnpackedRecord; -typedef struct VTable VTable; -typedef struct VtabCtx VtabCtx; -typedef struct Walker Walker; -typedef struct WherePlan WherePlan; -typedef struct WhereInfo WhereInfo; -typedef struct WhereLevel WhereLevel; - -/* -** Defer sourcing vdbe.h and btree.h until after the "u8" and -** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque -** pointer types (i.e. FuncDef) defined above. -*/ -/************** Include btree.h in the middle of sqliteInt.h *****************/ -/************** Begin file btree.h *******************************************/ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This header file defines the interface that the sqlite B-Tree file -** subsystem. See comments in the source code for a detailed description -** of what each interface routine does. -*/ -#ifndef _BTREE_H_ -#define _BTREE_H_ - -/* TODO: This definition is just included so other modules compile. It -** needs to be revisited. -*/ -#define SQLITE_N_BTREE_META 10 - -/* -** If defined as non-zero, auto-vacuum is enabled by default. Otherwise -** it must be turned on for each database using "PRAGMA auto_vacuum = 1". -*/ -#ifndef SQLITE_DEFAULT_AUTOVACUUM - #define SQLITE_DEFAULT_AUTOVACUUM 0 -#endif - -#define BTREE_AUTOVACUUM_NONE 0 /* Do not do auto-vacuum */ -#define BTREE_AUTOVACUUM_FULL 1 /* Do full auto-vacuum */ -#define BTREE_AUTOVACUUM_INCR 2 /* Incremental vacuum */ - -/* -** Forward declarations of structure -*/ -typedef struct Btree Btree; -typedef struct BtCursor BtCursor; -typedef struct BtShared BtShared; - - -SQLITE_PRIVATE int sqlite3BtreeOpen( - sqlite3_vfs *pVfs, /* VFS to use with this b-tree */ - const char *zFilename, /* Name of database file to open */ - sqlite3 *db, /* Associated database connection */ - Btree **ppBtree, /* Return open Btree* here */ - int flags, /* Flags */ - int vfsFlags /* Flags passed through to VFS open */ -); - -/* The flags parameter to sqlite3BtreeOpen can be the bitwise or of the -** following values. -** -** NOTE: These values must match the corresponding PAGER_ values in -** pager.h. -*/ -#define BTREE_OMIT_JOURNAL 1 /* Do not create or use a rollback journal */ -#define BTREE_NO_READLOCK 2 /* Omit readlocks on readonly files */ -#define BTREE_MEMORY 4 /* This is an in-memory DB */ -#define BTREE_SINGLE 8 /* The file contains at most 1 b-tree */ -#define BTREE_UNORDERED 16 /* Use of a hash implementation is OK */ - -SQLITE_PRIVATE int sqlite3BtreeClose(Btree*); -SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int); -SQLITE_PRIVATE int sqlite3BtreeSetSafetyLevel(Btree*,int,int,int); -SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*); -SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix); -SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*); -SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int); -SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree*); -SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree*,int); -SQLITE_PRIVATE int sqlite3BtreeGetReserve(Btree*); -SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int); -SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *); -SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int); -SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster); -SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree*, int); -SQLITE_PRIVATE int sqlite3BtreeCommit(Btree*); -SQLITE_PRIVATE int sqlite3BtreeRollback(Btree*); -SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree*,int); -SQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree*, int*, int flags); -SQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree*); -SQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree*); -SQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree*); -SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *, int, void(*)(void *)); -SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *pBtree); -SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *pBtree, int iTab, u8 isWriteLock); -SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *, int, int); - -SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *); -SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *); -SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *, Btree *); - -SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *); - -/* The flags parameter to sqlite3BtreeCreateTable can be the bitwise OR -** of the flags shown below. -** -** Every SQLite table must have either BTREE_INTKEY or BTREE_BLOBKEY set. -** With BTREE_INTKEY, the table key is a 64-bit integer and arbitrary data -** is stored in the leaves. (BTREE_INTKEY is used for SQL tables.) With -** BTREE_BLOBKEY, the key is an arbitrary BLOB and no content is stored -** anywhere - the key is the content. (BTREE_BLOBKEY is used for SQL -** indices.) -*/ -#define BTREE_INTKEY 1 /* Table has only 64-bit signed integer keys */ -#define BTREE_BLOBKEY 2 /* Table has keys only - no data */ - -SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree*, int, int*); -SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree*, int, int*); -SQLITE_PRIVATE void sqlite3BtreeTripAllCursors(Btree*, int); - -SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue); -SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value); - -/* -** The second parameter to sqlite3BtreeGetMeta or sqlite3BtreeUpdateMeta -** should be one of the following values. The integer values are assigned -** to constants so that the offset of the corresponding field in an -** SQLite database header may be found using the following formula: -** -** offset = 36 + (idx * 4) -** -** For example, the free-page-count field is located at byte offset 36 of -** the database file header. The incr-vacuum-flag field is located at -** byte offset 64 (== 36+4*7). -*/ -#define BTREE_FREE_PAGE_COUNT 0 -#define BTREE_SCHEMA_VERSION 1 -#define BTREE_FILE_FORMAT 2 -#define BTREE_DEFAULT_CACHE_SIZE 3 -#define BTREE_LARGEST_ROOT_PAGE 4 -#define BTREE_TEXT_ENCODING 5 -#define BTREE_USER_VERSION 6 -#define BTREE_INCR_VACUUM 7 - -SQLITE_PRIVATE int sqlite3BtreeCursor( - Btree*, /* BTree containing table to open */ - int iTable, /* Index of root page */ - int wrFlag, /* 1 for writing. 0 for read-only */ - struct KeyInfo*, /* First argument to compare function */ - BtCursor *pCursor /* Space to write cursor structure */ -); -SQLITE_PRIVATE int sqlite3BtreeCursorSize(void); -SQLITE_PRIVATE void sqlite3BtreeCursorZero(BtCursor*); - -SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor*); -SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked( - BtCursor*, - UnpackedRecord *pUnKey, - i64 intKey, - int bias, - int *pRes -); -SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor*, int*); -SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*); -SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey, - const void *pData, int nData, - int nZero, int bias, int seekResult); -SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor*, int *pRes); -SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor*, int *pRes); -SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor*, int *pRes); -SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor*); -SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int *pRes); -SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor*, i64 *pSize); -SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor*, u32 offset, u32 amt, void*); -SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor*, int *pAmt); -SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor*, int *pAmt); -SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor*, u32 *pSize); -SQLITE_PRIVATE int sqlite3BtreeData(BtCursor*, u32 offset, u32 amt, void*); -SQLITE_PRIVATE void sqlite3BtreeSetCachedRowid(BtCursor*, sqlite3_int64); -SQLITE_PRIVATE sqlite3_int64 sqlite3BtreeGetCachedRowid(BtCursor*); - -SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*); -SQLITE_PRIVATE struct Pager *sqlite3BtreePager(Btree*); - -SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*); -SQLITE_PRIVATE void sqlite3BtreeCacheOverflow(BtCursor *); -SQLITE_PRIVATE void sqlite3BtreeClearCursor(BtCursor *); - -SQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBt, int iVersion); - -#ifndef NDEBUG -SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor*); -#endif - -#ifndef SQLITE_OMIT_BTREECOUNT -SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *, i64 *); -#endif - -#ifdef SQLITE_TEST -SQLITE_PRIVATE int sqlite3BtreeCursorInfo(BtCursor*, int*, int); -SQLITE_PRIVATE void sqlite3BtreeCursorList(Btree*); -#endif - -#ifndef SQLITE_OMIT_WAL -SQLITE_PRIVATE int sqlite3BtreeCheckpoint(Btree*, int, int *, int *); -#endif - -/* -** If we are not using shared cache, then there is no need to -** use mutexes to access the BtShared structures. So make the -** Enter and Leave procedures no-ops. -*/ -#ifndef SQLITE_OMIT_SHARED_CACHE -SQLITE_PRIVATE void sqlite3BtreeEnter(Btree*); -SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3*); -#else -# define sqlite3BtreeEnter(X) -# define sqlite3BtreeEnterAll(X) -#endif - -#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE -SQLITE_PRIVATE int sqlite3BtreeSharable(Btree*); -SQLITE_PRIVATE void sqlite3BtreeLeave(Btree*); -SQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor*); -SQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor*); -SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3*); -#ifndef NDEBUG - /* These routines are used inside assert() statements only. */ -SQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree*); -SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3*); -SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*); -#endif -#else - -# define sqlite3BtreeSharable(X) 0 -# define sqlite3BtreeLeave(X) -# define sqlite3BtreeEnterCursor(X) -# define sqlite3BtreeLeaveCursor(X) -# define sqlite3BtreeLeaveAll(X) - -# define sqlite3BtreeHoldsMutex(X) 1 -# define sqlite3BtreeHoldsAllMutexes(X) 1 -# define sqlite3SchemaMutexHeld(X,Y,Z) 1 -#endif - - -#endif /* _BTREE_H_ */ - -/************** End of btree.h ***********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include vdbe.h in the middle of sqliteInt.h ******************/ -/************** Begin file vdbe.h ********************************************/ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** Header file for the Virtual DataBase Engine (VDBE) -** -** This header defines the interface to the virtual database engine -** or VDBE. The VDBE implements an abstract machine that runs a -** simple program to access and modify the underlying database. -*/ -#ifndef _SQLITE_VDBE_H_ -#define _SQLITE_VDBE_H_ -/* #include */ - -/* -** A single VDBE is an opaque structure named "Vdbe". Only routines -** in the source file sqliteVdbe.c are allowed to see the insides -** of this structure. -*/ -typedef struct Vdbe Vdbe; - -/* -** The names of the following types declared in vdbeInt.h are required -** for the VdbeOp definition. -*/ -typedef struct VdbeFunc VdbeFunc; -typedef struct Mem Mem; -typedef struct SubProgram SubProgram; - -/* -** A single instruction of the virtual machine has an opcode -** and as many as three operands. The instruction is recorded -** as an instance of the following structure: -*/ -struct VdbeOp { - u8 opcode; /* What operation to perform */ - signed char p4type; /* One of the P4_xxx constants for p4 */ - u8 opflags; /* Mask of the OPFLG_* flags in opcodes.h */ - u8 p5; /* Fifth parameter is an unsigned character */ - int p1; /* First operand */ - int p2; /* Second parameter (often the jump destination) */ - int p3; /* The third parameter */ - union { /* fourth parameter */ - int i; /* Integer value if p4type==P4_INT32 */ - void *p; /* Generic pointer */ - char *z; /* Pointer to data for string (char array) types */ - i64 *pI64; /* Used when p4type is P4_INT64 */ - double *pReal; /* Used when p4type is P4_REAL */ - FuncDef *pFunc; /* Used when p4type is P4_FUNCDEF */ - VdbeFunc *pVdbeFunc; /* Used when p4type is P4_VDBEFUNC */ - CollSeq *pColl; /* Used when p4type is P4_COLLSEQ */ - Mem *pMem; /* Used when p4type is P4_MEM */ - VTable *pVtab; /* Used when p4type is P4_VTAB */ - KeyInfo *pKeyInfo; /* Used when p4type is P4_KEYINFO */ - int *ai; /* Used when p4type is P4_INTARRAY */ - SubProgram *pProgram; /* Used when p4type is P4_SUBPROGRAM */ - int (*xAdvance)(BtCursor *, int *); - } p4; -#ifdef SQLITE_DEBUG - char *zComment; /* Comment to improve readability */ -#endif -#ifdef VDBE_PROFILE - int cnt; /* Number of times this instruction was executed */ - u64 cycles; /* Total time spent executing this instruction */ -#endif -}; -typedef struct VdbeOp VdbeOp; - - -/* -** A sub-routine used to implement a trigger program. -*/ -struct SubProgram { - VdbeOp *aOp; /* Array of opcodes for sub-program */ - int nOp; /* Elements in aOp[] */ - int nMem; /* Number of memory cells required */ - int nCsr; /* Number of cursors required */ - void *token; /* id that may be used to recursive triggers */ - SubProgram *pNext; /* Next sub-program already visited */ -}; - -/* -** A smaller version of VdbeOp used for the VdbeAddOpList() function because -** it takes up less space. -*/ -struct VdbeOpList { - u8 opcode; /* What operation to perform */ - signed char p1; /* First operand */ - signed char p2; /* Second parameter (often the jump destination) */ - signed char p3; /* Third parameter */ -}; -typedef struct VdbeOpList VdbeOpList; - -/* -** Allowed values of VdbeOp.p4type -*/ -#define P4_NOTUSED 0 /* The P4 parameter is not used */ -#define P4_DYNAMIC (-1) /* Pointer to a string obtained from sqliteMalloc() */ -#define P4_STATIC (-2) /* Pointer to a static string */ -#define P4_COLLSEQ (-4) /* P4 is a pointer to a CollSeq structure */ -#define P4_FUNCDEF (-5) /* P4 is a pointer to a FuncDef structure */ -#define P4_KEYINFO (-6) /* P4 is a pointer to a KeyInfo structure */ -#define P4_VDBEFUNC (-7) /* P4 is a pointer to a VdbeFunc structure */ -#define P4_MEM (-8) /* P4 is a pointer to a Mem* structure */ -#define P4_TRANSIENT 0 /* P4 is a pointer to a transient string */ -#define P4_VTAB (-10) /* P4 is a pointer to an sqlite3_vtab structure */ -#define P4_MPRINTF (-11) /* P4 is a string obtained from sqlite3_mprintf() */ -#define P4_REAL (-12) /* P4 is a 64-bit floating point value */ -#define P4_INT64 (-13) /* P4 is a 64-bit signed integer */ -#define P4_INT32 (-14) /* P4 is a 32-bit signed integer */ -#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */ -#define P4_SUBPROGRAM (-18) /* P4 is a pointer to a SubProgram structure */ -#define P4_ADVANCE (-19) /* P4 is a pointer to BtreeNext() or BtreePrev() */ - -/* When adding a P4 argument using P4_KEYINFO, a copy of the KeyInfo structure -** is made. That copy is freed when the Vdbe is finalized. But if the -** argument is P4_KEYINFO_HANDOFF, the passed in pointer is used. It still -** gets freed when the Vdbe is finalized so it still should be obtained -** from a single sqliteMalloc(). But no copy is made and the calling -** function should *not* try to free the KeyInfo. -*/ -#define P4_KEYINFO_HANDOFF (-16) -#define P4_KEYINFO_STATIC (-17) - -/* -** The Vdbe.aColName array contains 5n Mem structures, where n is the -** number of columns of data returned by the statement. -*/ -#define COLNAME_NAME 0 -#define COLNAME_DECLTYPE 1 -#define COLNAME_DATABASE 2 -#define COLNAME_TABLE 3 -#define COLNAME_COLUMN 4 -#ifdef SQLITE_ENABLE_COLUMN_METADATA -# define COLNAME_N 5 /* Number of COLNAME_xxx symbols */ -#else -# ifdef SQLITE_OMIT_DECLTYPE -# define COLNAME_N 1 /* Store only the name */ -# else -# define COLNAME_N 2 /* Store the name and decltype */ -# endif -#endif - -/* -** The following macro converts a relative address in the p2 field -** of a VdbeOp structure into a negative number so that -** sqlite3VdbeAddOpList() knows that the address is relative. Calling -** the macro again restores the address. -*/ -#define ADDR(X) (-1-(X)) - -/* -** The makefile scans the vdbe.c source file and creates the "opcodes.h" -** header file that defines a number for each opcode used by the VDBE. -*/ -/************** Include opcodes.h in the middle of vdbe.h ********************/ -/************** Begin file opcodes.h *****************************************/ -/* Automatically generated. Do not edit */ -/* See the mkopcodeh.awk script for details */ -#define OP_Goto 1 -#define OP_Gosub 2 -#define OP_Return 3 -#define OP_Yield 4 -#define OP_HaltIfNull 5 -#define OP_Halt 6 -#define OP_Integer 7 -#define OP_Int64 8 -#define OP_Real 130 /* same as TK_FLOAT */ -#define OP_String8 94 /* same as TK_STRING */ -#define OP_String 9 -#define OP_Null 10 -#define OP_Blob 11 -#define OP_Variable 12 -#define OP_Move 13 -#define OP_Copy 14 -#define OP_SCopy 15 -#define OP_ResultRow 16 -#define OP_Concat 91 /* same as TK_CONCAT */ -#define OP_Add 86 /* same as TK_PLUS */ -#define OP_Subtract 87 /* same as TK_MINUS */ -#define OP_Multiply 88 /* same as TK_STAR */ -#define OP_Divide 89 /* same as TK_SLASH */ -#define OP_Remainder 90 /* same as TK_REM */ -#define OP_CollSeq 17 -#define OP_Function 18 -#define OP_BitAnd 82 /* same as TK_BITAND */ -#define OP_BitOr 83 /* same as TK_BITOR */ -#define OP_ShiftLeft 84 /* same as TK_LSHIFT */ -#define OP_ShiftRight 85 /* same as TK_RSHIFT */ -#define OP_AddImm 20 -#define OP_MustBeInt 21 -#define OP_RealAffinity 22 -#define OP_ToText 141 /* same as TK_TO_TEXT */ -#define OP_ToBlob 142 /* same as TK_TO_BLOB */ -#define OP_ToNumeric 143 /* same as TK_TO_NUMERIC*/ -#define OP_ToInt 144 /* same as TK_TO_INT */ -#define OP_ToReal 145 /* same as TK_TO_REAL */ -#define OP_Eq 76 /* same as TK_EQ */ -#define OP_Ne 75 /* same as TK_NE */ -#define OP_Lt 79 /* same as TK_LT */ -#define OP_Le 78 /* same as TK_LE */ -#define OP_Gt 77 /* same as TK_GT */ -#define OP_Ge 80 /* same as TK_GE */ -#define OP_Permutation 23 -#define OP_Compare 24 -#define OP_Jump 25 -#define OP_And 69 /* same as TK_AND */ -#define OP_Or 68 /* same as TK_OR */ -#define OP_Not 19 /* same as TK_NOT */ -#define OP_BitNot 93 /* same as TK_BITNOT */ -#define OP_Once 26 -#define OP_If 27 -#define OP_IfNot 28 -#define OP_IsNull 73 /* same as TK_ISNULL */ -#define OP_NotNull 74 /* same as TK_NOTNULL */ -#define OP_Column 29 -#define OP_Affinity 30 -#define OP_MakeRecord 31 -#define OP_Count 32 -#define OP_Savepoint 33 -#define OP_AutoCommit 34 -#define OP_Transaction 35 -#define OP_ReadCookie 36 -#define OP_SetCookie 37 -#define OP_VerifyCookie 38 -#define OP_OpenRead 39 -#define OP_OpenWrite 40 -#define OP_OpenAutoindex 41 -#define OP_OpenEphemeral 42 -#define OP_SorterOpen 43 -#define OP_OpenPseudo 44 -#define OP_Close 45 -#define OP_SeekLt 46 -#define OP_SeekLe 47 -#define OP_SeekGe 48 -#define OP_SeekGt 49 -#define OP_Seek 50 -#define OP_NotFound 51 -#define OP_Found 52 -#define OP_IsUnique 53 -#define OP_NotExists 54 -#define OP_Sequence 55 -#define OP_NewRowid 56 -#define OP_Insert 57 -#define OP_InsertInt 58 -#define OP_Delete 59 -#define OP_ResetCount 60 -#define OP_SorterCompare 61 -#define OP_SorterData 62 -#define OP_RowKey 63 -#define OP_RowData 64 -#define OP_Rowid 65 -#define OP_NullRow 66 -#define OP_Last 67 -#define OP_SorterSort 70 -#define OP_Sort 71 -#define OP_Rewind 72 -#define OP_SorterNext 81 -#define OP_Prev 92 -#define OP_Next 95 -#define OP_SorterInsert 96 -#define OP_IdxInsert 97 -#define OP_IdxDelete 98 -#define OP_IdxRowid 99 -#define OP_IdxLT 100 -#define OP_IdxGE 101 -#define OP_Destroy 102 -#define OP_Clear 103 -#define OP_CreateIndex 104 -#define OP_CreateTable 105 -#define OP_ParseSchema 106 -#define OP_LoadAnalysis 107 -#define OP_DropTable 108 -#define OP_DropIndex 109 -#define OP_DropTrigger 110 -#define OP_IntegrityCk 111 -#define OP_RowSetAdd 112 -#define OP_RowSetRead 113 -#define OP_RowSetTest 114 -#define OP_Program 115 -#define OP_Param 116 -#define OP_FkCounter 117 -#define OP_FkIfZero 118 -#define OP_MemMax 119 -#define OP_IfPos 120 -#define OP_IfNeg 121 -#define OP_IfZero 122 -#define OP_AggStep 123 -#define OP_AggFinal 124 -#define OP_Checkpoint 125 -#define OP_JournalMode 126 -#define OP_Vacuum 127 -#define OP_IncrVacuum 128 -#define OP_Expire 129 -#define OP_TableLock 131 -#define OP_VBegin 132 -#define OP_VCreate 133 -#define OP_VDestroy 134 -#define OP_VOpen 135 -#define OP_VFilter 136 -#define OP_VColumn 137 -#define OP_VNext 138 -#define OP_VRename 139 -#define OP_VUpdate 140 -#define OP_Pagecount 146 -#define OP_MaxPgcnt 147 -#define OP_Trace 148 -#define OP_Noop 149 -#define OP_Explain 150 - - -/* Properties such as "out2" or "jump" that are specified in -** comments following the "case" for each opcode in the vdbe.c -** are encoded into bitvectors as follows: -*/ -#define OPFLG_JUMP 0x0001 /* jump: P2 holds jmp target */ -#define OPFLG_OUT2_PRERELEASE 0x0002 /* out2-prerelease: */ -#define OPFLG_IN1 0x0004 /* in1: P1 is an input */ -#define OPFLG_IN2 0x0008 /* in2: P2 is an input */ -#define OPFLG_IN3 0x0010 /* in3: P3 is an input */ -#define OPFLG_OUT2 0x0020 /* out2: P2 is an output */ -#define OPFLG_OUT3 0x0040 /* out3: P3 is an output */ -#define OPFLG_INITIALIZER {\ -/* 0 */ 0x00, 0x01, 0x05, 0x04, 0x04, 0x10, 0x00, 0x02,\ -/* 8 */ 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x24, 0x24,\ -/* 16 */ 0x00, 0x00, 0x00, 0x24, 0x04, 0x05, 0x04, 0x00,\ -/* 24 */ 0x00, 0x01, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00,\ -/* 32 */ 0x02, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00,\ -/* 40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11,\ -/* 48 */ 0x11, 0x11, 0x08, 0x11, 0x11, 0x11, 0x11, 0x02,\ -/* 56 */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ -/* 64 */ 0x00, 0x02, 0x00, 0x01, 0x4c, 0x4c, 0x01, 0x01,\ -/* 72 */ 0x01, 0x05, 0x05, 0x15, 0x15, 0x15, 0x15, 0x15,\ -/* 80 */ 0x15, 0x01, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c,\ -/* 88 */ 0x4c, 0x4c, 0x4c, 0x4c, 0x01, 0x24, 0x02, 0x01,\ -/* 96 */ 0x08, 0x08, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00,\ -/* 104 */ 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ -/* 112 */ 0x0c, 0x45, 0x15, 0x01, 0x02, 0x00, 0x01, 0x08,\ -/* 120 */ 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00,\ -/* 128 */ 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\ -/* 136 */ 0x01, 0x00, 0x01, 0x00, 0x00, 0x04, 0x04, 0x04,\ -/* 144 */ 0x04, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00,} - -/************** End of opcodes.h *********************************************/ -/************** Continuing where we left off in vdbe.h ***********************/ - -/* -** Prototypes for the VDBE interface. See comments on the implementation -** for a description of what each of these routines does. -*/ -SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3*); -SQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe*,int); -SQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe*,int,int); -SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe*,int,int,int); -SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe*,int,int,int,int); -SQLITE_PRIVATE int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int); -SQLITE_PRIVATE int sqlite3VdbeAddOp4Int(Vdbe*,int,int,int,int,int); -SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp); -SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*,int,char*); -SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1); -SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2); -SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3); -SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5); -SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr); -SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr); -SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N); -SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int); -SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int); -SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeDeleteObject(sqlite3*,Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeMakeReady(Vdbe*,Parse*); -SQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe*, int); -SQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe*); -#ifdef SQLITE_DEBUG -SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *, int); -SQLITE_PRIVATE void sqlite3VdbeTrace(Vdbe*,FILE*); -#endif -SQLITE_PRIVATE void sqlite3VdbeResetStepResult(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeRewind(Vdbe*); -SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe*,int); -SQLITE_PRIVATE int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, void(*)(void*)); -SQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe*); -SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, int); -SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe*,Vdbe*); -SQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe*, int*, int*); -SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetValue(Vdbe*, int, u8); -SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe*, int); -#ifndef SQLITE_OMIT_TRACE -SQLITE_PRIVATE char *sqlite3VdbeExpandSql(Vdbe*, const char*); -#endif - -SQLITE_PRIVATE void sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,UnpackedRecord*); -SQLITE_PRIVATE int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*); -SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(KeyInfo *, char *, int, char **); - -#ifndef SQLITE_OMIT_TRIGGER -SQLITE_PRIVATE void sqlite3VdbeLinkSubProgram(Vdbe *, SubProgram *); -#endif - - -#ifndef NDEBUG -SQLITE_PRIVATE void sqlite3VdbeComment(Vdbe*, const char*, ...); -# define VdbeComment(X) sqlite3VdbeComment X -SQLITE_PRIVATE void sqlite3VdbeNoopComment(Vdbe*, const char*, ...); -# define VdbeNoopComment(X) sqlite3VdbeNoopComment X -#else -# define VdbeComment(X) -# define VdbeNoopComment(X) -#endif - -#endif - -/************** End of vdbe.h ************************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include pager.h in the middle of sqliteInt.h *****************/ -/************** Begin file pager.h *******************************************/ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This header file defines the interface that the sqlite page cache -** subsystem. The page cache subsystem reads and writes a file a page -** at a time and provides a journal for rollback. -*/ - -#ifndef _PAGER_H_ -#define _PAGER_H_ - -/* -** Default maximum size for persistent journal files. A negative -** value means no limit. This value may be overridden using the -** sqlite3PagerJournalSizeLimit() API. See also "PRAGMA journal_size_limit". -*/ -#ifndef SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT - #define SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT -1 -#endif - -/* -** The type used to represent a page number. The first page in a file -** is called page 1. 0 is used to represent "not a page". -*/ -typedef u32 Pgno; - -/* -** Each open file is managed by a separate instance of the "Pager" structure. -*/ -typedef struct Pager Pager; - -/* -** Handle type for pages. -*/ -typedef struct PgHdr DbPage; - -/* -** Page number PAGER_MJ_PGNO is never used in an SQLite database (it is -** reserved for working around a windows/posix incompatibility). It is -** used in the journal to signify that the remainder of the journal file -** is devoted to storing a master journal name - there are no more pages to -** roll back. See comments for function writeMasterJournal() in pager.c -** for details. -*/ -#define PAGER_MJ_PGNO(x) ((Pgno)((PENDING_BYTE/((x)->pageSize))+1)) - -/* -** Allowed values for the flags parameter to sqlite3PagerOpen(). -** -** NOTE: These values must match the corresponding BTREE_ values in btree.h. -*/ -#define PAGER_OMIT_JOURNAL 0x0001 /* Do not use a rollback journal */ -#define PAGER_NO_READLOCK 0x0002 /* Omit readlocks on readonly files */ -#define PAGER_MEMORY 0x0004 /* In-memory database */ - -/* -** Valid values for the second argument to sqlite3PagerLockingMode(). -*/ -#define PAGER_LOCKINGMODE_QUERY -1 -#define PAGER_LOCKINGMODE_NORMAL 0 -#define PAGER_LOCKINGMODE_EXCLUSIVE 1 - -/* -** Numeric constants that encode the journalmode. -*/ -#define PAGER_JOURNALMODE_QUERY (-1) /* Query the value of journalmode */ -#define PAGER_JOURNALMODE_DELETE 0 /* Commit by deleting journal file */ -#define PAGER_JOURNALMODE_PERSIST 1 /* Commit by zeroing journal header */ -#define PAGER_JOURNALMODE_OFF 2 /* Journal omitted. */ -#define PAGER_JOURNALMODE_TRUNCATE 3 /* Commit by truncating journal */ -#define PAGER_JOURNALMODE_MEMORY 4 /* In-memory journal file */ -#define PAGER_JOURNALMODE_WAL 5 /* Use write-ahead logging */ - -/* -** The remainder of this file contains the declarations of the functions -** that make up the Pager sub-system API. See source code comments for -** a detailed description of each routine. -*/ - -/* Open and close a Pager connection. */ -SQLITE_PRIVATE int sqlite3PagerOpen( - sqlite3_vfs*, - Pager **ppPager, - const char*, - int, - int, - int, - void(*)(DbPage*) -); -SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager); -SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*); - -/* Functions used to configure a Pager object. */ -SQLITE_PRIVATE void sqlite3PagerSetBusyhandler(Pager*, int(*)(void *), void *); -SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u32*, int); -SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager*, int); -SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager*, int); -SQLITE_PRIVATE void sqlite3PagerSetSafetyLevel(Pager*,int,int,int); -SQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *, int); -SQLITE_PRIVATE int sqlite3PagerSetJournalMode(Pager *, int); -SQLITE_PRIVATE int sqlite3PagerGetJournalMode(Pager*); -SQLITE_PRIVATE int sqlite3PagerOkToChangeJournalMode(Pager*); -SQLITE_PRIVATE i64 sqlite3PagerJournalSizeLimit(Pager *, i64); -SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager*); - -/* Functions used to obtain and release page references. */ -SQLITE_PRIVATE int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag); -#define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0) -SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno); -SQLITE_PRIVATE void sqlite3PagerRef(DbPage*); -SQLITE_PRIVATE void sqlite3PagerUnref(DbPage*); - -/* Operations on page references. */ -SQLITE_PRIVATE int sqlite3PagerWrite(DbPage*); -SQLITE_PRIVATE void sqlite3PagerDontWrite(DbPage*); -SQLITE_PRIVATE int sqlite3PagerMovepage(Pager*,DbPage*,Pgno,int); -SQLITE_PRIVATE int sqlite3PagerPageRefcount(DbPage*); -SQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *); -SQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *); - -/* Functions used to manage pager transactions and savepoints. */ -SQLITE_PRIVATE void sqlite3PagerPagecount(Pager*, int*); -SQLITE_PRIVATE int sqlite3PagerBegin(Pager*, int exFlag, int); -SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, int); -SQLITE_PRIVATE int sqlite3PagerExclusiveLock(Pager*); -SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager); -SQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager*); -SQLITE_PRIVATE int sqlite3PagerRollback(Pager*); -SQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int n); -SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint); -SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager); - -SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, int, int*, int*); -SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager); -SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager); -SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen); -SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager); - -/* Functions used to query pager state and configuration. */ -SQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager*); -SQLITE_PRIVATE int sqlite3PagerRefcount(Pager*); -SQLITE_PRIVATE int sqlite3PagerMemUsed(Pager*); -SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*); -SQLITE_PRIVATE const sqlite3_vfs *sqlite3PagerVfs(Pager*); -SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager*); -SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*); -SQLITE_PRIVATE int sqlite3PagerNosync(Pager*); -SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*); -SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*); - -/* Functions used to truncate the database file. */ -SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno); - -#if defined(SQLITE_HAS_CODEC) && !defined(SQLITE_OMIT_WAL) -SQLITE_PRIVATE void *sqlite3PagerCodec(DbPage *); -#endif - -/* Functions to support testing and debugging. */ -#if !defined(NDEBUG) || defined(SQLITE_TEST) -SQLITE_PRIVATE Pgno sqlite3PagerPagenumber(DbPage*); -SQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage*); -#endif -#ifdef SQLITE_TEST -SQLITE_PRIVATE int *sqlite3PagerStats(Pager*); -SQLITE_PRIVATE void sqlite3PagerRefdump(Pager*); - void disable_simulated_io_errors(void); - void enable_simulated_io_errors(void); -#else -# define disable_simulated_io_errors() -# define enable_simulated_io_errors() -#endif - -#endif /* _PAGER_H_ */ - -/************** End of pager.h ***********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include pcache.h in the middle of sqliteInt.h ****************/ -/************** Begin file pcache.h ******************************************/ -/* -** 2008 August 05 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This header file defines the interface that the sqlite page cache -** subsystem. -*/ - -#ifndef _PCACHE_H_ - -typedef struct PgHdr PgHdr; -typedef struct PCache PCache; - -/* -** Every page in the cache is controlled by an instance of the following -** structure. -*/ -struct PgHdr { - void *pData; /* Content of this page */ - void *pExtra; /* Extra content */ - PgHdr *pDirty; /* Transient list of dirty pages */ - Pgno pgno; /* Page number for this page */ - Pager *pPager; /* The pager this page is part of */ -#ifdef SQLITE_CHECK_PAGES - u32 pageHash; /* Hash of page content */ -#endif - u16 flags; /* PGHDR flags defined below */ - - /********************************************************************** - ** Elements above are public. All that follows is private to pcache.c - ** and should not be accessed by other modules. - */ - i16 nRef; /* Number of users of this page */ - PCache *pCache; /* Cache that owns this page */ - - PgHdr *pDirtyNext; /* Next element in list of dirty pages */ - PgHdr *pDirtyPrev; /* Previous element in list of dirty pages */ -}; - -/* Bit values for PgHdr.flags */ -#define PGHDR_DIRTY 0x002 /* Page has changed */ -#define PGHDR_NEED_SYNC 0x004 /* Fsync the rollback journal before - ** writing this page to the database */ -#define PGHDR_NEED_READ 0x008 /* Content is unread */ -#define PGHDR_REUSE_UNLIKELY 0x010 /* A hint that reuse is unlikely */ -#define PGHDR_DONT_WRITE 0x020 /* Do not write content to disk */ - -/* Initialize and shutdown the page cache subsystem */ -SQLITE_PRIVATE int sqlite3PcacheInitialize(void); -SQLITE_PRIVATE void sqlite3PcacheShutdown(void); - -/* Page cache buffer management: -** These routines implement SQLITE_CONFIG_PAGECACHE. -*/ -SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *, int sz, int n); - -/* Create a new pager cache. -** Under memory stress, invoke xStress to try to make pages clean. -** Only clean and unpinned pages can be reclaimed. -*/ -SQLITE_PRIVATE void sqlite3PcacheOpen( - int szPage, /* Size of every page */ - int szExtra, /* Extra space associated with each page */ - int bPurgeable, /* True if pages are on backing store */ - int (*xStress)(void*, PgHdr*), /* Call to try to make pages clean */ - void *pStress, /* Argument to xStress */ - PCache *pToInit /* Preallocated space for the PCache */ -); - -/* Modify the page-size after the cache has been created. */ -SQLITE_PRIVATE void sqlite3PcacheSetPageSize(PCache *, int); - -/* Return the size in bytes of a PCache object. Used to preallocate -** storage space. -*/ -SQLITE_PRIVATE int sqlite3PcacheSize(void); - -/* One release per successful fetch. Page is pinned until released. -** Reference counted. -*/ -SQLITE_PRIVATE int sqlite3PcacheFetch(PCache*, Pgno, int createFlag, PgHdr**); -SQLITE_PRIVATE void sqlite3PcacheRelease(PgHdr*); - -SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr*); /* Remove page from cache */ -SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr*); /* Make sure page is marked dirty */ -SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr*); /* Mark a single page as clean */ -SQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache*); /* Mark all dirty list pages as clean */ - -/* Change a page number. Used by incr-vacuum. */ -SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr*, Pgno); - -/* Remove all pages with pgno>x. Reset the cache if x==0 */ -SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache*, Pgno x); - -/* Get a list of all dirty pages in the cache, sorted by page number */ -SQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache*); - -/* Reset and close the cache object */ -SQLITE_PRIVATE void sqlite3PcacheClose(PCache*); - -/* Clear flags from pages of the page cache */ -SQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *); - -/* Discard the contents of the cache */ -SQLITE_PRIVATE void sqlite3PcacheClear(PCache*); - -/* Return the total number of outstanding page references */ -SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache*); - -/* Increment the reference count of an existing page */ -SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr*); - -SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr*); - -/* Return the total number of pages stored in the cache */ -SQLITE_PRIVATE int sqlite3PcachePagecount(PCache*); - -#if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG) -/* Iterate through all dirty pages currently stored in the cache. This -** interface is only available if SQLITE_CHECK_PAGES is defined when the -** library is built. -*/ -SQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHdr *)); -#endif - -/* Set and get the suggested cache-size for the specified pager-cache. -** -** If no global maximum is configured, then the system attempts to limit -** the total number of pages cached by purgeable pager-caches to the sum -** of the suggested cache-sizes. -*/ -SQLITE_PRIVATE void sqlite3PcacheSetCachesize(PCache *, int); -#ifdef SQLITE_TEST -SQLITE_PRIVATE int sqlite3PcacheGetCachesize(PCache *); -#endif - -#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT -/* Try to return memory used by the pcache module to the main memory heap */ -SQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int); -#endif - -#ifdef SQLITE_TEST -SQLITE_PRIVATE void sqlite3PcacheStats(int*,int*,int*,int*); -#endif - -SQLITE_PRIVATE void sqlite3PCacheSetDefault(void); - -#endif /* _PCACHE_H_ */ - -/************** End of pcache.h **********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ - -/************** Include os.h in the middle of sqliteInt.h ********************/ -/************** Begin file os.h **********************************************/ -/* -** 2001 September 16 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -****************************************************************************** -** -** This header file (together with is companion C source-code file -** "os.c") attempt to abstract the underlying operating system so that -** the SQLite library will work on both POSIX and windows systems. -** -** This header file is #include-ed by sqliteInt.h and thus ends up -** being included by every source file. -*/ -#ifndef _SQLITE_OS_H_ -#define _SQLITE_OS_H_ - -/* -** Figure out if we are dealing with Unix, Windows, or some other -** operating system. After the following block of preprocess macros, -** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER -** will defined to either 1 or 0. One of the four will be 1. The other -** three will be 0. -*/ -#if defined(SQLITE_OS_OTHER) -# if SQLITE_OS_OTHER==1 -# undef SQLITE_OS_UNIX -# define SQLITE_OS_UNIX 0 -# undef SQLITE_OS_WIN -# define SQLITE_OS_WIN 0 -# undef SQLITE_OS_OS2 -# define SQLITE_OS_OS2 0 -# else -# undef SQLITE_OS_OTHER -# endif -#endif -#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER) -# define SQLITE_OS_OTHER 0 -# ifndef SQLITE_OS_WIN -# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) -# define SQLITE_OS_WIN 1 -# define SQLITE_OS_UNIX 0 -# define SQLITE_OS_OS2 0 -# elif defined(__EMX__) || defined(_OS2) || defined(OS2) || defined(_OS2_) || defined(__OS2__) -# define SQLITE_OS_WIN 0 -# define SQLITE_OS_UNIX 0 -# define SQLITE_OS_OS2 1 -# else -# define SQLITE_OS_WIN 0 -# define SQLITE_OS_UNIX 1 -# define SQLITE_OS_OS2 0 -# endif -# else -# define SQLITE_OS_UNIX 0 -# define SQLITE_OS_OS2 0 -# endif -#else -# ifndef SQLITE_OS_WIN -# define SQLITE_OS_WIN 0 -# endif -#endif - -/* -** Determine if we are dealing with WindowsCE - which has a much -** reduced API. -*/ -#if defined(_WIN32_WCE) -# define SQLITE_OS_WINCE 1 -#else -# define SQLITE_OS_WINCE 0 -#endif - - -/* -** Define the maximum size of a temporary filename -*/ -#if SQLITE_OS_WIN -# include -# define SQLITE_TEMPNAME_SIZE (MAX_PATH+50) -#elif SQLITE_OS_OS2 -# if (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3) && defined(OS2_HIGH_MEMORY) -# include /* has to be included before os2.h for linking to work */ -# endif -# define INCL_DOSDATETIME -# define INCL_DOSFILEMGR -# define INCL_DOSERRORS -# define INCL_DOSMISC -# define INCL_DOSPROCESS -# define INCL_DOSMODULEMGR -# define INCL_DOSSEMAPHORES -# include -# include -# define SQLITE_TEMPNAME_SIZE (CCHMAXPATHCOMP) -#else -# define SQLITE_TEMPNAME_SIZE 200 -#endif - -/* If the SET_FULLSYNC macro is not defined above, then make it -** a no-op -*/ -#ifndef SET_FULLSYNC -# define SET_FULLSYNC(x,y) -#endif - -/* -** The default size of a disk sector -*/ -#ifndef SQLITE_DEFAULT_SECTOR_SIZE -# define SQLITE_DEFAULT_SECTOR_SIZE 512 -#endif - -/* -** Temporary files are named starting with this prefix followed by 16 random -** alphanumeric characters, and no file extension. They are stored in the -** OS's standard temporary file directory, and are deleted prior to exit. -** If sqlite is being embedded in another program, you may wish to change the -** prefix to reflect your program's name, so that if your program exits -** prematurely, old temporary files can be easily identified. This can be done -** using -DSQLITE_TEMP_FILE_PREFIX=myprefix_ on the compiler command line. -** -** 2006-10-31: The default prefix used to be "sqlite_". But then -** Mcafee started using SQLite in their anti-virus product and it -** started putting files with the "sqlite" name in the c:/temp folder. -** This annoyed many windows users. Those users would then do a -** Google search for "sqlite", find the telephone numbers of the -** developers and call to wake them up at night and complain. -** For this reason, the default name prefix is changed to be "sqlite" -** spelled backwards. So the temp files are still identified, but -** anybody smart enough to figure out the code is also likely smart -** enough to know that calling the developer will not help get rid -** of the file. -*/ -#ifndef SQLITE_TEMP_FILE_PREFIX -# define SQLITE_TEMP_FILE_PREFIX "etilqs_" -#endif - -/* -** The following values may be passed as the second argument to -** sqlite3OsLock(). The various locks exhibit the following semantics: -** -** SHARED: Any number of processes may hold a SHARED lock simultaneously. -** RESERVED: A single process may hold a RESERVED lock on a file at -** any time. Other processes may hold and obtain new SHARED locks. -** PENDING: A single process may hold a PENDING lock on a file at -** any one time. Existing SHARED locks may persist, but no new -** SHARED locks may be obtained by other processes. -** EXCLUSIVE: An EXCLUSIVE lock precludes all other locks. -** -** PENDING_LOCK may not be passed directly to sqlite3OsLock(). Instead, a -** process that requests an EXCLUSIVE lock may actually obtain a PENDING -** lock. This can be upgraded to an EXCLUSIVE lock by a subsequent call to -** sqlite3OsLock(). -*/ -#define NO_LOCK 0 -#define SHARED_LOCK 1 -#define RESERVED_LOCK 2 -#define PENDING_LOCK 3 -#define EXCLUSIVE_LOCK 4 - -/* -** File Locking Notes: (Mostly about windows but also some info for Unix) -** -** We cannot use LockFileEx() or UnlockFileEx() on Win95/98/ME because -** those functions are not available. So we use only LockFile() and -** UnlockFile(). -** -** LockFile() prevents not just writing but also reading by other processes. -** A SHARED_LOCK is obtained by locking a single randomly-chosen -** byte out of a specific range of bytes. The lock byte is obtained at -** random so two separate readers can probably access the file at the -** same time, unless they are unlucky and choose the same lock byte. -** An EXCLUSIVE_LOCK is obtained by locking all bytes in the range. -** There can only be one writer. A RESERVED_LOCK is obtained by locking -** a single byte of the file that is designated as the reserved lock byte. -** A PENDING_LOCK is obtained by locking a designated byte different from -** the RESERVED_LOCK byte. -** -** On WinNT/2K/XP systems, LockFileEx() and UnlockFileEx() are available, -** which means we can use reader/writer locks. When reader/writer locks -** are used, the lock is placed on the same range of bytes that is used -** for probabilistic locking in Win95/98/ME. Hence, the locking scheme -** will support two or more Win95 readers or two or more WinNT readers. -** But a single Win95 reader will lock out all WinNT readers and a single -** WinNT reader will lock out all other Win95 readers. -** -** The following #defines specify the range of bytes used for locking. -** SHARED_SIZE is the number of bytes available in the pool from which -** a random byte is selected for a shared lock. The pool of bytes for -** shared locks begins at SHARED_FIRST. -** -** The same locking strategy and -** byte ranges are used for Unix. This leaves open the possiblity of having -** clients on win95, winNT, and unix all talking to the same shared file -** and all locking correctly. To do so would require that samba (or whatever -** tool is being used for file sharing) implements locks correctly between -** windows and unix. I'm guessing that isn't likely to happen, but by -** using the same locking range we are at least open to the possibility. -** -** Locking in windows is manditory. For this reason, we cannot store -** actual data in the bytes used for locking. The pager never allocates -** the pages involved in locking therefore. SHARED_SIZE is selected so -** that all locks will fit on a single page even at the minimum page size. -** PENDING_BYTE defines the beginning of the locks. By default PENDING_BYTE -** is set high so that we don't have to allocate an unused page except -** for very large databases. But one should test the page skipping logic -** by setting PENDING_BYTE low and running the entire regression suite. -** -** Changing the value of PENDING_BYTE results in a subtly incompatible -** file format. Depending on how it is changed, you might not notice -** the incompatibility right away, even running a full regression test. -** The default location of PENDING_BYTE is the first byte past the -** 1GB boundary. -** -*/ -#ifdef SQLITE_OMIT_WSD -# define PENDING_BYTE (0x40000000) -#else -# define PENDING_BYTE sqlite3PendingByte -#endif -#define RESERVED_BYTE (PENDING_BYTE+1) -#define SHARED_FIRST (PENDING_BYTE+2) -#define SHARED_SIZE 510 - -/* -** Wrapper around OS specific sqlite3_os_init() function. -*/ -SQLITE_PRIVATE int sqlite3OsInit(void); - -/* -** Functions for accessing sqlite3_file methods -*/ -SQLITE_PRIVATE int sqlite3OsClose(sqlite3_file*); -SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset); -SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file*, const void*, int amt, i64 offset); -SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file*, i64 size); -SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file*, int); -SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file*, i64 *pSize); -SQLITE_PRIVATE int sqlite3OsLock(sqlite3_file*, int); -SQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file*, int); -SQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut); -SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file*,int,void*); -#define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0 -SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id); -SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id); -SQLITE_PRIVATE int sqlite3OsShmMap(sqlite3_file *,int,int,int,void volatile **); -SQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int, int, int); -SQLITE_PRIVATE void sqlite3OsShmBarrier(sqlite3_file *id); -SQLITE_PRIVATE int sqlite3OsShmUnmap(sqlite3_file *id, int); - -/* -** Functions for accessing sqlite3_vfs methods -*/ -SQLITE_PRIVATE int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *); -SQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *, const char *, int); -SQLITE_PRIVATE int sqlite3OsAccess(sqlite3_vfs *, const char *, int, int *pResOut); -SQLITE_PRIVATE int sqlite3OsFullPathname(sqlite3_vfs *, const char *, int, char *); -#ifndef SQLITE_OMIT_LOAD_EXTENSION -SQLITE_PRIVATE void *sqlite3OsDlOpen(sqlite3_vfs *, const char *); -SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *, int, char *); -SQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *, void *, const char *))(void); -SQLITE_PRIVATE void sqlite3OsDlClose(sqlite3_vfs *, void *); -#endif /* SQLITE_OMIT_LOAD_EXTENSION */ -SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *, int, char *); -SQLITE_PRIVATE int sqlite3OsSleep(sqlite3_vfs *, int); -SQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *, sqlite3_int64*); - -/* -** Convenience functions for opening and closing files using -** sqlite3_malloc() to obtain space for the file-handle structure. -*/ -SQLITE_PRIVATE int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*); -SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *); - -#endif /* _SQLITE_OS_H_ */ - -/************** End of os.h **************************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include mutex.h in the middle of sqliteInt.h *****************/ -/************** Begin file mutex.h *******************************************/ -/* -** 2007 August 28 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** -** This file contains the common header for all mutex implementations. -** The sqliteInt.h header #includes this file so that it is available -** to all source files. We break it out in an effort to keep the code -** better organized. -** -** NOTE: source files should *not* #include this header file directly. -** Source files should #include the sqliteInt.h file and let that file -** include this one indirectly. -*/ - - -/* -** Figure out what version of the code to use. The choices are -** -** SQLITE_MUTEX_OMIT No mutex logic. Not even stubs. The -** mutexes implemention cannot be overridden -** at start-time. -** -** SQLITE_MUTEX_NOOP For single-threaded applications. No -** mutual exclusion is provided. But this -** implementation can be overridden at -** start-time. -** -** SQLITE_MUTEX_PTHREADS For multi-threaded applications on Unix. -** -** SQLITE_MUTEX_W32 For multi-threaded applications on Win32. -** -** SQLITE_MUTEX_OS2 For multi-threaded applications on OS/2. -*/ -#if !SQLITE_THREADSAFE -# define SQLITE_MUTEX_OMIT -#endif -#if SQLITE_THREADSAFE && !defined(SQLITE_MUTEX_NOOP) -# if SQLITE_OS_UNIX -# define SQLITE_MUTEX_PTHREADS -# elif SQLITE_OS_WIN -# define SQLITE_MUTEX_W32 -# elif SQLITE_OS_OS2 -# define SQLITE_MUTEX_OS2 -# else -# define SQLITE_MUTEX_NOOP -# endif -#endif - -#ifdef SQLITE_MUTEX_OMIT -/* -** If this is a no-op implementation, implement everything as macros. -*/ -#define sqlite3_mutex_alloc(X) ((sqlite3_mutex*)8) -#define sqlite3_mutex_free(X) -#define sqlite3_mutex_enter(X) -#define sqlite3_mutex_try(X) SQLITE_OK -#define sqlite3_mutex_leave(X) -#define sqlite3_mutex_held(X) ((void)(X),1) -#define sqlite3_mutex_notheld(X) ((void)(X),1) -#define sqlite3MutexAlloc(X) ((sqlite3_mutex*)8) -#define sqlite3MutexInit() SQLITE_OK -#define sqlite3MutexEnd() -#endif /* defined(SQLITE_MUTEX_OMIT) */ - -/************** End of mutex.h ***********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ - - -/* -** Each database file to be accessed by the system is an instance -** of the following structure. There are normally two of these structures -** in the sqlite.aDb[] array. aDb[0] is the main database file and -** aDb[1] is the database file used to hold temporary tables. Additional -** databases may be attached. -*/ -struct Db { - char *zName; /* Name of this database */ - Btree *pBt; /* The B*Tree structure for this database file */ - u8 inTrans; /* 0: not writable. 1: Transaction. 2: Checkpoint */ - u8 safety_level; /* How aggressive at syncing data to disk */ - Schema *pSchema; /* Pointer to database schema (possibly shared) */ -}; - -/* -** An instance of the following structure stores a database schema. -** -** Most Schema objects are associated with a Btree. The exception is -** the Schema for the TEMP databaes (sqlite3.aDb[1]) which is free-standing. -** In shared cache mode, a single Schema object can be shared by multiple -** Btrees that refer to the same underlying BtShared object. -** -** Schema objects are automatically deallocated when the last Btree that -** references them is destroyed. The TEMP Schema is manually freed by -** sqlite3_close(). -* -** A thread must be holding a mutex on the corresponding Btree in order -** to access Schema content. This implies that the thread must also be -** holding a mutex on the sqlite3 connection pointer that owns the Btree. -** For a TEMP Schema, only the connection mutex is required. -*/ -struct Schema { - int schema_cookie; /* Database schema version number for this file */ - int iGeneration; /* Generation counter. Incremented with each change */ - Hash tblHash; /* All tables indexed by name */ - Hash idxHash; /* All (named) indices indexed by name */ - Hash trigHash; /* All triggers indexed by name */ - Hash fkeyHash; /* All foreign keys by referenced table name */ - Table *pSeqTab; /* The sqlite_sequence table used by AUTOINCREMENT */ - u8 file_format; /* Schema format version for this file */ - u8 enc; /* Text encoding used by this database */ - u16 flags; /* Flags associated with this schema */ - int cache_size; /* Number of pages to use in the cache */ -}; - -/* -** These macros can be used to test, set, or clear bits in the -** Db.pSchema->flags field. -*/ -#define DbHasProperty(D,I,P) (((D)->aDb[I].pSchema->flags&(P))==(P)) -#define DbHasAnyProperty(D,I,P) (((D)->aDb[I].pSchema->flags&(P))!=0) -#define DbSetProperty(D,I,P) (D)->aDb[I].pSchema->flags|=(P) -#define DbClearProperty(D,I,P) (D)->aDb[I].pSchema->flags&=~(P) - -/* -** Allowed values for the DB.pSchema->flags field. -** -** The DB_SchemaLoaded flag is set after the database schema has been -** read into internal hash tables. -** -** DB_UnresetViews means that one or more views have column names that -** have been filled out. If the schema changes, these column names might -** changes and so the view will need to be reset. -*/ -#define DB_SchemaLoaded 0x0001 /* The schema has been loaded */ -#define DB_UnresetViews 0x0002 /* Some views have defined column names */ -#define DB_Empty 0x0004 /* The file is empty (length 0 bytes) */ - -/* -** The number of different kinds of things that can be limited -** using the sqlite3_limit() interface. -*/ -#define SQLITE_N_LIMIT (SQLITE_LIMIT_TRIGGER_DEPTH+1) - -/* -** Lookaside malloc is a set of fixed-size buffers that can be used -** to satisfy small transient memory allocation requests for objects -** associated with a particular database connection. The use of -** lookaside malloc provides a significant performance enhancement -** (approx 10%) by avoiding numerous malloc/free requests while parsing -** SQL statements. -** -** The Lookaside structure holds configuration information about the -** lookaside malloc subsystem. Each available memory allocation in -** the lookaside subsystem is stored on a linked list of LookasideSlot -** objects. -** -** Lookaside allocations are only allowed for objects that are associated -** with a particular database connection. Hence, schema information cannot -** be stored in lookaside because in shared cache mode the schema information -** is shared by multiple database connections. Therefore, while parsing -** schema information, the Lookaside.bEnabled flag is cleared so that -** lookaside allocations are not used to construct the schema objects. -*/ -struct Lookaside { - u16 sz; /* Size of each buffer in bytes */ - u8 bEnabled; /* False to disable new lookaside allocations */ - u8 bMalloced; /* True if pStart obtained from sqlite3_malloc() */ - int nOut; /* Number of buffers currently checked out */ - int mxOut; /* Highwater mark for nOut */ - int anStat[3]; /* 0: hits. 1: size misses. 2: full misses */ - LookasideSlot *pFree; /* List of available buffers */ - void *pStart; /* First byte of available memory space */ - void *pEnd; /* First byte past end of available space */ -}; -struct LookasideSlot { - LookasideSlot *pNext; /* Next buffer in the list of free buffers */ -}; - -/* -** A hash table for function definitions. -** -** Hash each FuncDef structure into one of the FuncDefHash.a[] slots. -** Collisions are on the FuncDef.pHash chain. -*/ -struct FuncDefHash { - FuncDef *a[23]; /* Hash table for functions */ -}; - -/* -** Each database connection is an instance of the following structure. -** -** The sqlite.lastRowid records the last insert rowid generated by an -** insert statement. Inserts on views do not affect its value. Each -** trigger has its own context, so that lastRowid can be updated inside -** triggers as usual. The previous value will be restored once the trigger -** exits. Upon entering a before or instead of trigger, lastRowid is no -** longer (since after version 2.8.12) reset to -1. -** -** The sqlite.nChange does not count changes within triggers and keeps no -** context. It is reset at start of sqlite3_exec. -** The sqlite.lsChange represents the number of changes made by the last -** insert, update, or delete statement. It remains constant throughout the -** length of a statement and is then updated by OP_SetCounts. It keeps a -** context stack just like lastRowid so that the count of changes -** within a trigger is not seen outside the trigger. Changes to views do not -** affect the value of lsChange. -** The sqlite.csChange keeps track of the number of current changes (since -** the last statement) and is used to update sqlite_lsChange. -** -** The member variables sqlite.errCode, sqlite.zErrMsg and sqlite.zErrMsg16 -** store the most recent error code and, if applicable, string. The -** internal function sqlite3Error() is used to set these variables -** consistently. -*/ -struct sqlite3 { - sqlite3_vfs *pVfs; /* OS Interface */ - int nDb; /* Number of backends currently in use */ - Db *aDb; /* All backends */ - int flags; /* Miscellaneous flags. See below */ - unsigned int openFlags; /* Flags passed to sqlite3_vfs.xOpen() */ - int errCode; /* Most recent error code (SQLITE_*) */ - int errMask; /* & result codes with this before returning */ - u8 autoCommit; /* The auto-commit flag. */ - u8 temp_store; /* 1: file 2: memory 0: default */ - u8 mallocFailed; /* True if we have seen a malloc failure */ - u8 dfltLockMode; /* Default locking-mode for attached dbs */ - signed char nextAutovac; /* Autovac setting after VACUUM if >=0 */ - u8 suppressErr; /* Do not issue error messages if true */ - u8 vtabOnConflict; /* Value to return for s3_vtab_on_conflict() */ - int nextPagesize; /* Pagesize after VACUUM if >0 */ - int nTable; /* Number of tables in the database */ - CollSeq *pDfltColl; /* The default collating sequence (BINARY) */ - i64 lastRowid; /* ROWID of most recent insert (see above) */ - u32 magic; /* Magic number for detect library misuse */ - int nChange; /* Value returned by sqlite3_changes() */ - int nTotalChange; /* Value returned by sqlite3_total_changes() */ - sqlite3_mutex *mutex; /* Connection mutex */ - int aLimit[SQLITE_N_LIMIT]; /* Limits */ - struct sqlite3InitInfo { /* Information used during initialization */ - int iDb; /* When back is being initialized */ - int newTnum; /* Rootpage of table being initialized */ - u8 busy; /* TRUE if currently initializing */ - u8 orphanTrigger; /* Last statement is orphaned TEMP trigger */ - } init; - int nExtension; /* Number of loaded extensions */ - void **aExtension; /* Array of shared library handles */ - struct Vdbe *pVdbe; /* List of active virtual machines */ - int activeVdbeCnt; /* Number of VDBEs currently executing */ - int writeVdbeCnt; /* Number of active VDBEs that are writing */ - int vdbeExecCnt; /* Number of nested calls to VdbeExec() */ - void (*xTrace)(void*,const char*); /* Trace function */ - void *pTraceArg; /* Argument to the trace function */ - void (*xProfile)(void*,const char*,u64); /* Profiling function */ - void *pProfileArg; /* Argument to profile function */ - void *pCommitArg; /* Argument to xCommitCallback() */ - int (*xCommitCallback)(void*); /* Invoked at every commit. */ - void *pRollbackArg; /* Argument to xRollbackCallback() */ - void (*xRollbackCallback)(void*); /* Invoked at every commit. */ - void *pUpdateArg; - void (*xUpdateCallback)(void*,int, const char*,const char*,sqlite_int64); -#ifndef SQLITE_OMIT_WAL - int (*xWalCallback)(void *, sqlite3 *, const char *, int); - void *pWalArg; -#endif - void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*); - void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*); - void *pCollNeededArg; - sqlite3_value *pErr; /* Most recent error message */ - char *zErrMsg; /* Most recent error message (UTF-8 encoded) */ - char *zErrMsg16; /* Most recent error message (UTF-16 encoded) */ - union { - volatile int isInterrupted; /* True if sqlite3_interrupt has been called */ - double notUsed1; /* Spacer */ - } u1; - Lookaside lookaside; /* Lookaside malloc configuration */ -#ifndef SQLITE_OMIT_AUTHORIZATION - int (*xAuth)(void*,int,const char*,const char*,const char*,const char*); - /* Access authorization function */ - void *pAuthArg; /* 1st argument to the access auth function */ -#endif -#ifndef SQLITE_OMIT_PROGRESS_CALLBACK - int (*xProgress)(void *); /* The progress callback */ - void *pProgressArg; /* Argument to the progress callback */ - int nProgressOps; /* Number of opcodes for progress callback */ -#endif -#ifndef SQLITE_OMIT_VIRTUALTABLE - Hash aModule; /* populated by sqlite3_create_module() */ - VtabCtx *pVtabCtx; /* Context for active vtab connect/create */ - VTable **aVTrans; /* Virtual tables with open transactions */ - int nVTrans; /* Allocated size of aVTrans */ - VTable *pDisconnect; /* Disconnect these in next sqlite3_prepare() */ -#endif - FuncDefHash aFunc; /* Hash table of connection functions */ - Hash aCollSeq; /* All collating sequences */ - BusyHandler busyHandler; /* Busy callback */ - int busyTimeout; /* Busy handler timeout, in msec */ - Db aDbStatic[2]; /* Static space for the 2 default backends */ - Savepoint *pSavepoint; /* List of active savepoints */ - int nSavepoint; /* Number of non-transaction savepoints */ - int nStatement; /* Number of nested statement-transactions */ - u8 isTransactionSavepoint; /* True if the outermost savepoint is a TS */ - i64 nDeferredCons; /* Net deferred constraints this transaction. */ - int *pnBytesFreed; /* If not NULL, increment this in DbFree() */ - -#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY - /* The following variables are all protected by the STATIC_MASTER - ** mutex, not by sqlite3.mutex. They are used by code in notify.c. - ** - ** When X.pUnlockConnection==Y, that means that X is waiting for Y to - ** unlock so that it can proceed. - ** - ** When X.pBlockingConnection==Y, that means that something that X tried - ** tried to do recently failed with an SQLITE_LOCKED error due to locks - ** held by Y. - */ - sqlite3 *pBlockingConnection; /* Connection that caused SQLITE_LOCKED */ - sqlite3 *pUnlockConnection; /* Connection to watch for unlock */ - void *pUnlockArg; /* Argument to xUnlockNotify */ - void (*xUnlockNotify)(void **, int); /* Unlock notify callback */ - sqlite3 *pNextBlocked; /* Next in list of all blocked connections */ -#endif -}; - -/* -** A macro to discover the encoding of a database. -*/ -#define ENC(db) ((db)->aDb[0].pSchema->enc) - -/* -** Possible values for the sqlite3.flags. -*/ -#define SQLITE_VdbeTrace 0x00000100 /* True to trace VDBE execution */ -#define SQLITE_InternChanges 0x00000200 /* Uncommitted Hash table changes */ -#define SQLITE_FullColNames 0x00000400 /* Show full column names on SELECT */ -#define SQLITE_ShortColNames 0x00000800 /* Show short columns names */ -#define SQLITE_CountRows 0x00001000 /* Count rows changed by INSERT, */ - /* DELETE, or UPDATE and return */ - /* the count using a callback. */ -#define SQLITE_NullCallback 0x00002000 /* Invoke the callback once if the */ - /* result set is empty */ -#define SQLITE_SqlTrace 0x00004000 /* Debug print SQL as it executes */ -#define SQLITE_VdbeListing 0x00008000 /* Debug listings of VDBE programs */ -#define SQLITE_WriteSchema 0x00010000 /* OK to update SQLITE_MASTER */ -#define SQLITE_NoReadlock 0x00020000 /* Readlocks are omitted when - ** accessing read-only databases */ -#define SQLITE_IgnoreChecks 0x00040000 /* Do not enforce check constraints */ -#define SQLITE_ReadUncommitted 0x0080000 /* For shared-cache mode */ -#define SQLITE_LegacyFileFmt 0x00100000 /* Create new databases in format 1 */ -#define SQLITE_FullFSync 0x00200000 /* Use full fsync on the backend */ -#define SQLITE_CkptFullFSync 0x00400000 /* Use full fsync for checkpoint */ -#define SQLITE_RecoveryMode 0x00800000 /* Ignore schema errors */ -#define SQLITE_ReverseOrder 0x01000000 /* Reverse unordered SELECTs */ -#define SQLITE_RecTriggers 0x02000000 /* Enable recursive triggers */ -#define SQLITE_ForeignKeys 0x04000000 /* Enforce foreign key constraints */ -#define SQLITE_AutoIndex 0x08000000 /* Enable automatic indexes */ -#define SQLITE_PreferBuiltin 0x10000000 /* Preference to built-in funcs */ -#define SQLITE_LoadExtension 0x20000000 /* Enable load_extension */ -#define SQLITE_EnableTrigger 0x40000000 /* True to enable triggers */ - -/* -** Bits of the sqlite3.flags field that are used by the -** sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS,...) interface. -** These must be the low-order bits of the flags field. -*/ -#define SQLITE_QueryFlattener 0x01 /* Disable query flattening */ -#define SQLITE_ColumnCache 0x02 /* Disable the column cache */ -#define SQLITE_IndexSort 0x04 /* Disable indexes for sorting */ -#define SQLITE_IndexSearch 0x08 /* Disable indexes for searching */ -#define SQLITE_IndexCover 0x10 /* Disable index covering table */ -#define SQLITE_GroupByOrder 0x20 /* Disable GROUPBY cover of ORDERBY */ -#define SQLITE_FactorOutConst 0x40 /* Disable factoring out constants */ -#define SQLITE_IdxRealAsInt 0x80 /* Store REAL as INT in indices */ -#define SQLITE_DistinctOpt 0x80 /* DISTINCT using indexes */ -#define SQLITE_OptMask 0xff /* Mask of all disablable opts */ - -/* -** Possible values for the sqlite.magic field. -** The numbers are obtained at random and have no special meaning, other -** than being distinct from one another. -*/ -#define SQLITE_MAGIC_OPEN 0xa029a697 /* Database is open */ -#define SQLITE_MAGIC_CLOSED 0x9f3c2d33 /* Database is closed */ -#define SQLITE_MAGIC_SICK 0x4b771290 /* Error and awaiting close */ -#define SQLITE_MAGIC_BUSY 0xf03b7906 /* Database currently in use */ -#define SQLITE_MAGIC_ERROR 0xb5357930 /* An SQLITE_MISUSE error occurred */ - -/* -** Each SQL function is defined by an instance of the following -** structure. A pointer to this structure is stored in the sqlite.aFunc -** hash table. When multiple functions have the same name, the hash table -** points to a linked list of these structures. -*/ -struct FuncDef { - i16 nArg; /* Number of arguments. -1 means unlimited */ - u8 iPrefEnc; /* Preferred text encoding (SQLITE_UTF8, 16LE, 16BE) */ - u8 flags; /* Some combination of SQLITE_FUNC_* */ - void *pUserData; /* User data parameter */ - FuncDef *pNext; /* Next function with same name */ - void (*xFunc)(sqlite3_context*,int,sqlite3_value**); /* Regular function */ - void (*xStep)(sqlite3_context*,int,sqlite3_value**); /* Aggregate step */ - void (*xFinalize)(sqlite3_context*); /* Aggregate finalizer */ - char *zName; /* SQL name of the function. */ - FuncDef *pHash; /* Next with a different name but the same hash */ - FuncDestructor *pDestructor; /* Reference counted destructor function */ -}; - -/* -** This structure encapsulates a user-function destructor callback (as -** configured using create_function_v2()) and a reference counter. When -** create_function_v2() is called to create a function with a destructor, -** a single object of this type is allocated. FuncDestructor.nRef is set to -** the number of FuncDef objects created (either 1 or 3, depending on whether -** or not the specified encoding is SQLITE_ANY). The FuncDef.pDestructor -** member of each of the new FuncDef objects is set to point to the allocated -** FuncDestructor. -** -** Thereafter, when one of the FuncDef objects is deleted, the reference -** count on this object is decremented. When it reaches 0, the destructor -** is invoked and the FuncDestructor structure freed. -*/ -struct FuncDestructor { - int nRef; - void (*xDestroy)(void *); - void *pUserData; -}; - -/* -** Possible values for FuncDef.flags -*/ -#define SQLITE_FUNC_LIKE 0x01 /* Candidate for the LIKE optimization */ -#define SQLITE_FUNC_CASE 0x02 /* Case-sensitive LIKE-type function */ -#define SQLITE_FUNC_EPHEM 0x04 /* Ephemeral. Delete with VDBE */ -#define SQLITE_FUNC_NEEDCOLL 0x08 /* sqlite3GetFuncCollSeq() might be called */ -#define SQLITE_FUNC_PRIVATE 0x10 /* Allowed for internal use only */ -#define SQLITE_FUNC_COUNT 0x20 /* Built-in count(*) aggregate */ -#define SQLITE_FUNC_COALESCE 0x40 /* Built-in coalesce() or ifnull() function */ - -/* -** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are -** used to create the initializers for the FuncDef structures. -** -** FUNCTION(zName, nArg, iArg, bNC, xFunc) -** Used to create a scalar function definition of a function zName -** implemented by C function xFunc that accepts nArg arguments. The -** value passed as iArg is cast to a (void*) and made available -** as the user-data (sqlite3_user_data()) for the function. If -** argument bNC is true, then the SQLITE_FUNC_NEEDCOLL flag is set. -** -** AGGREGATE(zName, nArg, iArg, bNC, xStep, xFinal) -** Used to create an aggregate function definition implemented by -** the C functions xStep and xFinal. The first four parameters -** are interpreted in the same way as the first 4 parameters to -** FUNCTION(). -** -** LIKEFUNC(zName, nArg, pArg, flags) -** Used to create a scalar function definition of a function zName -** that accepts nArg arguments and is implemented by a call to C -** function likeFunc. Argument pArg is cast to a (void *) and made -** available as the function user-data (sqlite3_user_data()). The -** FuncDef.flags variable is set to the value passed as the flags -** parameter. -*/ -#define FUNCTION(zName, nArg, iArg, bNC, xFunc) \ - {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \ - SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0} -#define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \ - {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \ - pArg, 0, xFunc, 0, 0, #zName, 0, 0} -#define LIKEFUNC(zName, nArg, arg, flags) \ - {nArg, SQLITE_UTF8, flags, (void *)arg, 0, likeFunc, 0, 0, #zName, 0, 0} -#define AGGREGATE(zName, nArg, arg, nc, xStep, xFinal) \ - {nArg, SQLITE_UTF8, nc*SQLITE_FUNC_NEEDCOLL, \ - SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0,0} - -/* -** All current savepoints are stored in a linked list starting at -** sqlite3.pSavepoint. The first element in the list is the most recently -** opened savepoint. Savepoints are added to the list by the vdbe -** OP_Savepoint instruction. -*/ -struct Savepoint { - char *zName; /* Savepoint name (nul-terminated) */ - i64 nDeferredCons; /* Number of deferred fk violations */ - Savepoint *pNext; /* Parent savepoint (if any) */ -}; - -/* -** The following are used as the second parameter to sqlite3Savepoint(), -** and as the P1 argument to the OP_Savepoint instruction. -*/ -#define SAVEPOINT_BEGIN 0 -#define SAVEPOINT_RELEASE 1 -#define SAVEPOINT_ROLLBACK 2 - - -/* -** Each SQLite module (virtual table definition) is defined by an -** instance of the following structure, stored in the sqlite3.aModule -** hash table. -*/ -struct Module { - const sqlite3_module *pModule; /* Callback pointers */ - const char *zName; /* Name passed to create_module() */ - void *pAux; /* pAux passed to create_module() */ - void (*xDestroy)(void *); /* Module destructor function */ -}; - -/* -** information about each column of an SQL table is held in an instance -** of this structure. -*/ -struct Column { - char *zName; /* Name of this column */ - Expr *pDflt; /* Default value of this column */ - char *zDflt; /* Original text of the default value */ - char *zType; /* Data type for this column */ - char *zColl; /* Collating sequence. If NULL, use the default */ - u8 notNull; /* True if there is a NOT NULL constraint */ - u8 isPrimKey; /* True if this column is part of the PRIMARY KEY */ - char affinity; /* One of the SQLITE_AFF_... values */ -#ifndef SQLITE_OMIT_VIRTUALTABLE - u8 isHidden; /* True if this column is 'hidden' */ -#endif -}; - -/* -** A "Collating Sequence" is defined by an instance of the following -** structure. Conceptually, a collating sequence consists of a name and -** a comparison routine that defines the order of that sequence. -** -** There may two separate implementations of the collation function, one -** that processes text in UTF-8 encoding (CollSeq.xCmp) and another that -** processes text encoded in UTF-16 (CollSeq.xCmp16), using the machine -** native byte order. When a collation sequence is invoked, SQLite selects -** the version that will require the least expensive encoding -** translations, if any. -** -** The CollSeq.pUser member variable is an extra parameter that passed in -** as the first argument to the UTF-8 comparison function, xCmp. -** CollSeq.pUser16 is the equivalent for the UTF-16 comparison function, -** xCmp16. -** -** If both CollSeq.xCmp and CollSeq.xCmp16 are NULL, it means that the -** collating sequence is undefined. Indices built on an undefined -** collating sequence may not be read or written. -*/ -struct CollSeq { - char *zName; /* Name of the collating sequence, UTF-8 encoded */ - u8 enc; /* Text encoding handled by xCmp() */ - u8 type; /* One of the SQLITE_COLL_... values below */ - void *pUser; /* First argument to xCmp() */ - int (*xCmp)(void*,int, const void*, int, const void*); - void (*xDel)(void*); /* Destructor for pUser */ -}; - -/* -** Allowed values of CollSeq.type: -*/ -#define SQLITE_COLL_BINARY 1 /* The default memcmp() collating sequence */ -#define SQLITE_COLL_NOCASE 2 /* The built-in NOCASE collating sequence */ -#define SQLITE_COLL_REVERSE 3 /* The built-in REVERSE collating sequence */ -#define SQLITE_COLL_USER 0 /* Any other user-defined collating sequence */ - -/* -** A sort order can be either ASC or DESC. -*/ -#define SQLITE_SO_ASC 0 /* Sort in ascending order */ -#define SQLITE_SO_DESC 1 /* Sort in ascending order */ - -/* -** Column affinity types. -** -** These used to have mnemonic name like 'i' for SQLITE_AFF_INTEGER and -** 't' for SQLITE_AFF_TEXT. But we can save a little space and improve -** the speed a little by numbering the values consecutively. -** -** But rather than start with 0 or 1, we begin with 'a'. That way, -** when multiple affinity types are concatenated into a string and -** used as the P4 operand, they will be more readable. -** -** Note also that the numeric types are grouped together so that testing -** for a numeric type is a single comparison. -*/ -#define SQLITE_AFF_TEXT 'a' -#define SQLITE_AFF_NONE 'b' -#define SQLITE_AFF_NUMERIC 'c' -#define SQLITE_AFF_INTEGER 'd' -#define SQLITE_AFF_REAL 'e' - -#define sqlite3IsNumericAffinity(X) ((X)>=SQLITE_AFF_NUMERIC) - -/* -** The SQLITE_AFF_MASK values masks off the significant bits of an -** affinity value. -*/ -#define SQLITE_AFF_MASK 0x67 - -/* -** Additional bit values that can be ORed with an affinity without -** changing the affinity. -*/ -#define SQLITE_JUMPIFNULL 0x08 /* jumps if either operand is NULL */ -#define SQLITE_STOREP2 0x10 /* Store result in reg[P2] rather than jump */ -#define SQLITE_NULLEQ 0x80 /* NULL=NULL */ - -/* -** An object of this type is created for each virtual table present in -** the database schema. -** -** If the database schema is shared, then there is one instance of this -** structure for each database connection (sqlite3*) that uses the shared -** schema. This is because each database connection requires its own unique -** instance of the sqlite3_vtab* handle used to access the virtual table -** implementation. sqlite3_vtab* handles can not be shared between -** database connections, even when the rest of the in-memory database -** schema is shared, as the implementation often stores the database -** connection handle passed to it via the xConnect() or xCreate() method -** during initialization internally. This database connection handle may -** then be used by the virtual table implementation to access real tables -** within the database. So that they appear as part of the callers -** transaction, these accesses need to be made via the same database -** connection as that used to execute SQL operations on the virtual table. -** -** All VTable objects that correspond to a single table in a shared -** database schema are initially stored in a linked-list pointed to by -** the Table.pVTable member variable of the corresponding Table object. -** When an sqlite3_prepare() operation is required to access the virtual -** table, it searches the list for the VTable that corresponds to the -** database connection doing the preparing so as to use the correct -** sqlite3_vtab* handle in the compiled query. -** -** When an in-memory Table object is deleted (for example when the -** schema is being reloaded for some reason), the VTable objects are not -** deleted and the sqlite3_vtab* handles are not xDisconnect()ed -** immediately. Instead, they are moved from the Table.pVTable list to -** another linked list headed by the sqlite3.pDisconnect member of the -** corresponding sqlite3 structure. They are then deleted/xDisconnected -** next time a statement is prepared using said sqlite3*. This is done -** to avoid deadlock issues involving multiple sqlite3.mutex mutexes. -** Refer to comments above function sqlite3VtabUnlockList() for an -** explanation as to why it is safe to add an entry to an sqlite3.pDisconnect -** list without holding the corresponding sqlite3.mutex mutex. -** -** The memory for objects of this type is always allocated by -** sqlite3DbMalloc(), using the connection handle stored in VTable.db as -** the first argument. -*/ -struct VTable { - sqlite3 *db; /* Database connection associated with this table */ - Module *pMod; /* Pointer to module implementation */ - sqlite3_vtab *pVtab; /* Pointer to vtab instance */ - int nRef; /* Number of pointers to this structure */ - u8 bConstraint; /* True if constraints are supported */ - int iSavepoint; /* Depth of the SAVEPOINT stack */ - VTable *pNext; /* Next in linked list (see above) */ -}; - -/* -** Each SQL table is represented in memory by an instance of the -** following structure. -** -** Table.zName is the name of the table. The case of the original -** CREATE TABLE statement is stored, but case is not significant for -** comparisons. -** -** Table.nCol is the number of columns in this table. Table.aCol is a -** pointer to an array of Column structures, one for each column. -** -** If the table has an INTEGER PRIMARY KEY, then Table.iPKey is the index of -** the column that is that key. Otherwise Table.iPKey is negative. Note -** that the datatype of the PRIMARY KEY must be INTEGER for this field to -** be set. An INTEGER PRIMARY KEY is used as the rowid for each row of -** the table. If a table has no INTEGER PRIMARY KEY, then a random rowid -** is generated for each row of the table. TF_HasPrimaryKey is set if -** the table has any PRIMARY KEY, INTEGER or otherwise. -** -** Table.tnum is the page number for the root BTree page of the table in the -** database file. If Table.iDb is the index of the database table backend -** in sqlite.aDb[]. 0 is for the main database and 1 is for the file that -** holds temporary tables and indices. If TF_Ephemeral is set -** then the table is stored in a file that is automatically deleted -** when the VDBE cursor to the table is closed. In this case Table.tnum -** refers VDBE cursor number that holds the table open, not to the root -** page number. Transient tables are used to hold the results of a -** sub-query that appears instead of a real table name in the FROM clause -** of a SELECT statement. -*/ -struct Table { - char *zName; /* Name of the table or view */ - int iPKey; /* If not negative, use aCol[iPKey] as the primary key */ - int nCol; /* Number of columns in this table */ - Column *aCol; /* Information about each column */ - Index *pIndex; /* List of SQL indexes on this table. */ - int tnum; /* Root BTree node for this table (see note above) */ - unsigned nRowEst; /* Estimated rows in table - from sqlite_stat1 table */ - Select *pSelect; /* NULL for tables. Points to definition if a view. */ - u16 nRef; /* Number of pointers to this Table */ - u8 tabFlags; /* Mask of TF_* values */ - u8 keyConf; /* What to do in case of uniqueness conflict on iPKey */ - FKey *pFKey; /* Linked list of all foreign keys in this table */ - char *zColAff; /* String defining the affinity of each column */ -#ifndef SQLITE_OMIT_CHECK - Expr *pCheck; /* The AND of all CHECK constraints */ -#endif -#ifndef SQLITE_OMIT_ALTERTABLE - int addColOffset; /* Offset in CREATE TABLE stmt to add a new column */ -#endif -#ifndef SQLITE_OMIT_VIRTUALTABLE - VTable *pVTable; /* List of VTable objects. */ - int nModuleArg; /* Number of arguments to the module */ - char **azModuleArg; /* Text of all module args. [0] is module name */ -#endif - Trigger *pTrigger; /* List of triggers stored in pSchema */ - Schema *pSchema; /* Schema that contains this table */ - Table *pNextZombie; /* Next on the Parse.pZombieTab list */ -}; - -/* -** Allowed values for Tabe.tabFlags. -*/ -#define TF_Readonly 0x01 /* Read-only system table */ -#define TF_Ephemeral 0x02 /* An ephemeral table */ -#define TF_HasPrimaryKey 0x04 /* Table has a primary key */ -#define TF_Autoincrement 0x08 /* Integer primary key is autoincrement */ -#define TF_Virtual 0x10 /* Is a virtual table */ -#define TF_NeedMetadata 0x20 /* aCol[].zType and aCol[].pColl missing */ - - - -/* -** Test to see whether or not a table is a virtual table. This is -** done as a macro so that it will be optimized out when virtual -** table support is omitted from the build. -*/ -#ifndef SQLITE_OMIT_VIRTUALTABLE -# define IsVirtual(X) (((X)->tabFlags & TF_Virtual)!=0) -# define IsHiddenColumn(X) ((X)->isHidden) -#else -# define IsVirtual(X) 0 -# define IsHiddenColumn(X) 0 -#endif - -/* -** Each foreign key constraint is an instance of the following structure. -** -** A foreign key is associated with two tables. The "from" table is -** the table that contains the REFERENCES clause that creates the foreign -** key. The "to" table is the table that is named in the REFERENCES clause. -** Consider this example: -** -** CREATE TABLE ex1( -** a INTEGER PRIMARY KEY, -** b INTEGER CONSTRAINT fk1 REFERENCES ex2(x) -** ); -** -** For foreign key "fk1", the from-table is "ex1" and the to-table is "ex2". -** -** Each REFERENCES clause generates an instance of the following structure -** which is attached to the from-table. The to-table need not exist when -** the from-table is created. The existence of the to-table is not checked. -*/ -struct FKey { - Table *pFrom; /* Table containing the REFERENCES clause (aka: Child) */ - FKey *pNextFrom; /* Next foreign key in pFrom */ - char *zTo; /* Name of table that the key points to (aka: Parent) */ - FKey *pNextTo; /* Next foreign key on table named zTo */ - FKey *pPrevTo; /* Previous foreign key on table named zTo */ - int nCol; /* Number of columns in this key */ - /* EV: R-30323-21917 */ - u8 isDeferred; /* True if constraint checking is deferred till COMMIT */ - u8 aAction[2]; /* ON DELETE and ON UPDATE actions, respectively */ - Trigger *apTrigger[2]; /* Triggers for aAction[] actions */ - struct sColMap { /* Mapping of columns in pFrom to columns in zTo */ - int iFrom; /* Index of column in pFrom */ - char *zCol; /* Name of column in zTo. If 0 use PRIMARY KEY */ - } aCol[1]; /* One entry for each of nCol column s */ -}; - -/* -** SQLite supports many different ways to resolve a constraint -** error. ROLLBACK processing means that a constraint violation -** causes the operation in process to fail and for the current transaction -** to be rolled back. ABORT processing means the operation in process -** fails and any prior changes from that one operation are backed out, -** but the transaction is not rolled back. FAIL processing means that -** the operation in progress stops and returns an error code. But prior -** changes due to the same operation are not backed out and no rollback -** occurs. IGNORE means that the particular row that caused the constraint -** error is not inserted or updated. Processing continues and no error -** is returned. REPLACE means that preexisting database rows that caused -** a UNIQUE constraint violation are removed so that the new insert or -** update can proceed. Processing continues and no error is reported. -** -** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys. -** RESTRICT is the same as ABORT for IMMEDIATE foreign keys and the -** same as ROLLBACK for DEFERRED keys. SETNULL means that the foreign -** key is set to NULL. CASCADE means that a DELETE or UPDATE of the -** referenced table row is propagated into the row that holds the -** foreign key. -** -** The following symbolic values are used to record which type -** of action to take. -*/ -#define OE_None 0 /* There is no constraint to check */ -#define OE_Rollback 1 /* Fail the operation and rollback the transaction */ -#define OE_Abort 2 /* Back out changes but do no rollback transaction */ -#define OE_Fail 3 /* Stop the operation but leave all prior changes */ -#define OE_Ignore 4 /* Ignore the error. Do not do the INSERT or UPDATE */ -#define OE_Replace 5 /* Delete existing record, then do INSERT or UPDATE */ - -#define OE_Restrict 6 /* OE_Abort for IMMEDIATE, OE_Rollback for DEFERRED */ -#define OE_SetNull 7 /* Set the foreign key value to NULL */ -#define OE_SetDflt 8 /* Set the foreign key value to its default */ -#define OE_Cascade 9 /* Cascade the changes */ - -#define OE_Default 99 /* Do whatever the default action is */ - - -/* -** An instance of the following structure is passed as the first -** argument to sqlite3VdbeKeyCompare and is used to control the -** comparison of the two index keys. -*/ -struct KeyInfo { - sqlite3 *db; /* The database connection */ - u8 enc; /* Text encoding - one of the SQLITE_UTF* values */ - u16 nField; /* Number of entries in aColl[] */ - u8 *aSortOrder; /* Sort order for each column. May be NULL */ - CollSeq *aColl[1]; /* Collating sequence for each term of the key */ -}; - -/* -** An instance of the following structure holds information about a -** single index record that has already been parsed out into individual -** values. -** -** A record is an object that contains one or more fields of data. -** Records are used to store the content of a table row and to store -** the key of an index. A blob encoding of a record is created by -** the OP_MakeRecord opcode of the VDBE and is disassembled by the -** OP_Column opcode. -** -** This structure holds a record that has already been disassembled -** into its constituent fields. -*/ -struct UnpackedRecord { - KeyInfo *pKeyInfo; /* Collation and sort-order information */ - u16 nField; /* Number of entries in apMem[] */ - u16 flags; /* Boolean settings. UNPACKED_... below */ - i64 rowid; /* Used by UNPACKED_PREFIX_SEARCH */ - Mem *aMem; /* Values */ -}; - -/* -** Allowed values of UnpackedRecord.flags -*/ -#define UNPACKED_NEED_FREE 0x0001 /* Memory is from sqlite3Malloc() */ -#define UNPACKED_NEED_DESTROY 0x0002 /* apMem[]s should all be destroyed */ -#define UNPACKED_IGNORE_ROWID 0x0004 /* Ignore trailing rowid on key1 */ -#define UNPACKED_INCRKEY 0x0008 /* Make this key an epsilon larger */ -#define UNPACKED_PREFIX_MATCH 0x0010 /* A prefix match is considered OK */ -#define UNPACKED_PREFIX_SEARCH 0x0020 /* A prefix match is considered OK */ - -/* -** Each SQL index is represented in memory by an -** instance of the following structure. -** -** The columns of the table that are to be indexed are described -** by the aiColumn[] field of this structure. For example, suppose -** we have the following table and index: -** -** CREATE TABLE Ex1(c1 int, c2 int, c3 text); -** CREATE INDEX Ex2 ON Ex1(c3,c1); -** -** In the Table structure describing Ex1, nCol==3 because there are -** three columns in the table. In the Index structure describing -** Ex2, nColumn==2 since 2 of the 3 columns of Ex1 are indexed. -** The value of aiColumn is {2, 0}. aiColumn[0]==2 because the -** first column to be indexed (c3) has an index of 2 in Ex1.aCol[]. -** The second column to be indexed (c1) has an index of 0 in -** Ex1.aCol[], hence Ex2.aiColumn[1]==0. -** -** The Index.onError field determines whether or not the indexed columns -** must be unique and what to do if they are not. When Index.onError=OE_None, -** it means this is not a unique index. Otherwise it is a unique index -** and the value of Index.onError indicate the which conflict resolution -** algorithm to employ whenever an attempt is made to insert a non-unique -** element. -*/ -struct Index { - char *zName; /* Name of this index */ - int nColumn; /* Number of columns in the table used by this index */ - int *aiColumn; /* Which columns are used by this index. 1st is 0 */ - unsigned *aiRowEst; /* Result of ANALYZE: Est. rows selected by each column */ - Table *pTable; /* The SQL table being indexed */ - int tnum; /* Page containing root of this index in database file */ - u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */ - u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */ - u8 bUnordered; /* Use this index for == or IN queries only */ - char *zColAff; /* String defining the affinity of each column */ - Index *pNext; /* The next index associated with the same table */ - Schema *pSchema; /* Schema containing this index */ - u8 *aSortOrder; /* Array of size Index.nColumn. True==DESC, False==ASC */ - char **azColl; /* Array of collation sequence names for index */ - IndexSample *aSample; /* Array of SQLITE_INDEX_SAMPLES samples */ -}; - -/* -** Each sample stored in the sqlite_stat2 table is represented in memory -** using a structure of this type. -*/ -struct IndexSample { - union { - char *z; /* Value if eType is SQLITE_TEXT or SQLITE_BLOB */ - double r; /* Value if eType is SQLITE_FLOAT or SQLITE_INTEGER */ - } u; - u8 eType; /* SQLITE_NULL, SQLITE_INTEGER ... etc. */ - u8 nByte; /* Size in byte of text or blob. */ -}; - -/* -** Each token coming out of the lexer is an instance of -** this structure. Tokens are also used as part of an expression. -** -** Note if Token.z==0 then Token.dyn and Token.n are undefined and -** may contain random values. Do not make any assumptions about Token.dyn -** and Token.n when Token.z==0. -*/ -struct Token { - const char *z; /* Text of the token. Not NULL-terminated! */ - unsigned int n; /* Number of characters in this token */ -}; - -/* -** An instance of this structure contains information needed to generate -** code for a SELECT that contains aggregate functions. -** -** If Expr.op==TK_AGG_COLUMN or TK_AGG_FUNCTION then Expr.pAggInfo is a -** pointer to this structure. The Expr.iColumn field is the index in -** AggInfo.aCol[] or AggInfo.aFunc[] of information needed to generate -** code for that node. -** -** AggInfo.pGroupBy and AggInfo.aFunc.pExpr point to fields within the -** original Select structure that describes the SELECT statement. These -** fields do not need to be freed when deallocating the AggInfo structure. -*/ -struct AggInfo { - u8 directMode; /* Direct rendering mode means take data directly - ** from source tables rather than from accumulators */ - u8 useSortingIdx; /* In direct mode, reference the sorting index rather - ** than the source table */ - int sortingIdx; /* Cursor number of the sorting index */ - int sortingIdxPTab; /* Cursor number of pseudo-table */ - ExprList *pGroupBy; /* The group by clause */ - int nSortingColumn; /* Number of columns in the sorting index */ - struct AggInfo_col { /* For each column used in source tables */ - Table *pTab; /* Source table */ - int iTable; /* Cursor number of the source table */ - int iColumn; /* Column number within the source table */ - int iSorterColumn; /* Column number in the sorting index */ - int iMem; /* Memory location that acts as accumulator */ - Expr *pExpr; /* The original expression */ - } *aCol; - int nColumn; /* Number of used entries in aCol[] */ - int nColumnAlloc; /* Number of slots allocated for aCol[] */ - int nAccumulator; /* Number of columns that show through to the output. - ** Additional columns are used only as parameters to - ** aggregate functions */ - struct AggInfo_func { /* For each aggregate function */ - Expr *pExpr; /* Expression encoding the function */ - FuncDef *pFunc; /* The aggregate function implementation */ - int iMem; /* Memory location that acts as accumulator */ - int iDistinct; /* Ephemeral table used to enforce DISTINCT */ - } *aFunc; - int nFunc; /* Number of entries in aFunc[] */ - int nFuncAlloc; /* Number of slots allocated for aFunc[] */ -}; - -/* -** The datatype ynVar is a signed integer, either 16-bit or 32-bit. -** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater -** than 32767 we have to make it 32-bit. 16-bit is preferred because -** it uses less memory in the Expr object, which is a big memory user -** in systems with lots of prepared statements. And few applications -** need more than about 10 or 20 variables. But some extreme users want -** to have prepared statements with over 32767 variables, and for them -** the option is available (at compile-time). -*/ -#if SQLITE_MAX_VARIABLE_NUMBER<=32767 -typedef i16 ynVar; -#else -typedef int ynVar; -#endif - -/* -** Each node of an expression in the parse tree is an instance -** of this structure. -** -** Expr.op is the opcode. The integer parser token codes are reused -** as opcodes here. For example, the parser defines TK_GE to be an integer -** code representing the ">=" operator. This same integer code is reused -** to represent the greater-than-or-equal-to operator in the expression -** tree. -** -** If the expression is an SQL literal (TK_INTEGER, TK_FLOAT, TK_BLOB, -** or TK_STRING), then Expr.token contains the text of the SQL literal. If -** the expression is a variable (TK_VARIABLE), then Expr.token contains the -** variable name. Finally, if the expression is an SQL function (TK_FUNCTION), -** then Expr.token contains the name of the function. -** -** Expr.pRight and Expr.pLeft are the left and right subexpressions of a -** binary operator. Either or both may be NULL. -** -** Expr.x.pList is a list of arguments if the expression is an SQL function, -** a CASE expression or an IN expression of the form " IN (, ...)". -** Expr.x.pSelect is used if the expression is a sub-select or an expression of -** the form " IN (SELECT ...)". If the EP_xIsSelect bit is set in the -** Expr.flags mask, then Expr.x.pSelect is valid. Otherwise, Expr.x.pList is -** valid. -** -** An expression of the form ID or ID.ID refers to a column in a table. -** For such expressions, Expr.op is set to TK_COLUMN and Expr.iTable is -** the integer cursor number of a VDBE cursor pointing to that table and -** Expr.iColumn is the column number for the specific column. If the -** expression is used as a result in an aggregate SELECT, then the -** value is also stored in the Expr.iAgg column in the aggregate so that -** it can be accessed after all aggregates are computed. -** -** If the expression is an unbound variable marker (a question mark -** character '?' in the original SQL) then the Expr.iTable holds the index -** number for that variable. -** -** If the expression is a subquery then Expr.iColumn holds an integer -** register number containing the result of the subquery. If the -** subquery gives a constant result, then iTable is -1. If the subquery -** gives a different answer at different times during statement processing -** then iTable is the address of a subroutine that computes the subquery. -** -** If the Expr is of type OP_Column, and the table it is selecting from -** is a disk table or the "old.*" pseudo-table, then pTab points to the -** corresponding table definition. -** -** ALLOCATION NOTES: -** -** Expr objects can use a lot of memory space in database schema. To -** help reduce memory requirements, sometimes an Expr object will be -** truncated. And to reduce the number of memory allocations, sometimes -** two or more Expr objects will be stored in a single memory allocation, -** together with Expr.zToken strings. -** -** If the EP_Reduced and EP_TokenOnly flags are set when -** an Expr object is truncated. When EP_Reduced is set, then all -** the child Expr objects in the Expr.pLeft and Expr.pRight subtrees -** are contained within the same memory allocation. Note, however, that -** the subtrees in Expr.x.pList or Expr.x.pSelect are always separately -** allocated, regardless of whether or not EP_Reduced is set. -*/ -struct Expr { - u8 op; /* Operation performed by this node */ - char affinity; /* The affinity of the column or 0 if not a column */ - u16 flags; /* Various flags. EP_* See below */ - union { - char *zToken; /* Token value. Zero terminated and dequoted */ - int iValue; /* Non-negative integer value if EP_IntValue */ - } u; - - /* If the EP_TokenOnly flag is set in the Expr.flags mask, then no - ** space is allocated for the fields below this point. An attempt to - ** access them will result in a segfault or malfunction. - *********************************************************************/ - - Expr *pLeft; /* Left subnode */ - Expr *pRight; /* Right subnode */ - union { - ExprList *pList; /* Function arguments or in " IN ( IN (